var pR = Object.defineProperty;
var gR = (t, e, r) => e in t ? pR(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
var io = (t, e, r) => (gR(t, typeof e != "symbol" ? e + "" : e, r), r);
var Ol = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function yR(t) {
var e = t.default;
if (typeof e == "function") {
var r = function() {
return e.apply(this, arguments);
};
r.prototype = e.prototype;
} else
r = {};
return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(n) {
var i = Object.getOwnPropertyDescriptor(t, n);
Object.defineProperty(r, n, i.get ? i : {
enumerable: !0,
get: function() {
return t[n];
}
});
}), r;
}
function Za(t) {
throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var vw = { exports: {} };
(function(t, e) {
(function(r, n) {
t.exports = n();
})(Ol, function() {
var r;
function n() {
return r.apply(null, arguments);
}
function i(g) {
return g instanceof Array || Object.prototype.toString.call(g) === "[object Array]";
}
function a(g) {
return g != null && Object.prototype.toString.call(g) === "[object Object]";
}
function s(g, E) {
return Object.prototype.hasOwnProperty.call(g, E);
}
function o(g) {
if (Object.getOwnPropertyNames)
return Object.getOwnPropertyNames(g).length === 0;
for (var E in g)
if (s(g, E))
return;
return 1;
}
function l(g) {
return g === void 0;
}
function u(g) {
return typeof g == "number" || Object.prototype.toString.call(g) === "[object Number]";
}
function h(g) {
return g instanceof Date || Object.prototype.toString.call(g) === "[object Date]";
}
function d(g, E) {
for (var I = [], O = g.length, G = 0; G < O; ++G)
I.push(E(g[G], G));
return I;
}
function f(g, E) {
for (var I in E)
s(E, I) && (g[I] = E[I]);
return s(E, "toString") && (g.toString = E.toString), s(E, "valueOf") && (g.valueOf = E.valueOf), g;
}
function p(g, E, I, O) {
return Rr(g, E, I, O, !0).utc();
}
function m(g) {
return g._pf == null && (g._pf = { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidEra: null, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1, parsedDateParts: [], era: null, meridiem: null, rfc2822: !1, weekdayMismatch: !1 }), g._pf;
}
function _(g) {
if (g._isValid == null) {
var E = m(g), I = b.call(E.parsedDateParts, function(O) {
return O != null;
}), I = !isNaN(g._d.getTime()) && E.overflow < 0 && !E.empty && !E.invalidEra && !E.invalidMonth && !E.invalidWeekday && !E.weekdayMismatch && !E.nullInput && !E.invalidFormat && !E.userInvalidated && (!E.meridiem || E.meridiem && I);
if (g._strict && (I = I && E.charsLeftOver === 0 && E.unusedTokens.length === 0 && E.bigHour === void 0), Object.isFrozen != null && Object.isFrozen(g))
return I;
g._isValid = I;
}
return g._isValid;
}
function y(g) {
var E = p(NaN);
return g != null ? f(m(E), g) : m(E).userInvalidated = !0, E;
}
var b = Array.prototype.some || function(g) {
for (var E = Object(this), I = E.length >>> 0, O = 0; O < I; O++)
if (O in E && g.call(this, E[O], O, E))
return !0;
return !1;
}, x = n.momentProperties = [], k = !1;
function T(g, E) {
var I, O, G, ht = x.length;
if (l(E._isAMomentObject) || (g._isAMomentObject = E._isAMomentObject), l(E._i) || (g._i = E._i), l(E._f) || (g._f = E._f), l(E._l) || (g._l = E._l), l(E._strict) || (g._strict = E._strict), l(E._tzm) || (g._tzm = E._tzm), l(E._isUTC) || (g._isUTC = E._isUTC), l(E._offset) || (g._offset = E._offset), l(E._pf) || (g._pf = m(E)), l(E._locale) || (g._locale = E._locale), 0 < ht)
for (I = 0; I < ht; I++)
l(G = E[O = x[I]]) || (g[O] = G);
return g;
}
function C(g) {
T(this, g), this._d = new Date(g._d != null ? g._d.getTime() : NaN), this.isValid() || (this._d = new Date(NaN)), k === !1 && (k = !0, n.updateOffset(this), k = !1);
}
function M(g) {
return g instanceof C || g != null && g._isAMomentObject != null;
}
function S(g) {
n.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + g);
}
function R(g, E) {
var I = !0;
return f(function() {
if (n.deprecationHandler != null && n.deprecationHandler(null, g), I) {
for (var O, G, ht = [], vt = arguments.length, Mt = 0; Mt < vt; Mt++) {
if (O = "", typeof arguments[Mt] == "object") {
for (G in O += `
[` + Mt + "] ", arguments[0])
s(arguments[0], G) && (O += G + ": " + arguments[0][G] + ", ");
O = O.slice(0, -2);
} else
O = arguments[Mt];
ht.push(O);
}
S(g + `
Arguments: ` + Array.prototype.slice.call(ht).join("") + `
` + new Error().stack), I = !1;
}
return E.apply(this, arguments);
}, E);
}
var A = {};
function L(g, E) {
n.deprecationHandler != null && n.deprecationHandler(g, E), A[g] || (S(E), A[g] = !0);
}
function v(g) {
return typeof Function < "u" && g instanceof Function || Object.prototype.toString.call(g) === "[object Function]";
}
function B(g, E) {
var I, O = f({}, g);
for (I in E)
s(E, I) && (a(g[I]) && a(E[I]) ? (O[I] = {}, f(O[I], g[I]), f(O[I], E[I])) : E[I] != null ? O[I] = E[I] : delete O[I]);
for (I in g)
s(g, I) && !s(E, I) && a(g[I]) && (O[I] = f({}, O[I]));
return O;
}
function w(g) {
g != null && this.set(g);
}
n.suppressDeprecationWarnings = !1, n.deprecationHandler = null;
var D = Object.keys || function(g) {
var E, I = [];
for (E in g)
s(g, E) && I.push(E);
return I;
};
function N(g, E, I) {
var O = "" + Math.abs(g);
return (0 <= g ? I ? "+" : "" : "-") + Math.pow(10, Math.max(0, E - O.length)).toString().substr(1) + O;
}
var z = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, X = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, ct = {}, J = {};
function Y(g, E, I, O) {
var G = typeof O == "string" ? function() {
return this[O]();
} : O;
g && (J[g] = G), E && (J[E[0]] = function() {
return N(G.apply(this, arguments), E[1], E[2]);
}), I && (J[I] = function() {
return this.localeData().ordinal(G.apply(this, arguments), g);
});
}
function $(g, E) {
return g.isValid() ? (E = lt(E, g.localeData()), ct[E] = ct[E] || function(I) {
for (var O, G = I.match(z), ht = 0, vt = G.length; ht < vt; ht++)
J[G[ht]] ? G[ht] = J[G[ht]] : G[ht] = (O = G[ht]).match(/\[[\s\S]/) ? O.replace(/^\[|\]$/g, "") : O.replace(/\\/g, "");
return function(Mt) {
for (var Vt = "", Ot = 0; Ot < vt; Ot++)
Vt += v(G[Ot]) ? G[Ot].call(Mt, I) : G[Ot];
return Vt;
};
}(E), ct[E](g)) : g.localeData().invalidDate();
}
function lt(g, E) {
var I = 5;
function O(G) {
return E.longDateFormat(G) || G;
}
for (X.lastIndex = 0; 0 <= I && X.test(g); )
g = g.replace(X, O), X.lastIndex = 0, --I;
return g;
}
var ut = {};
function W(g, E) {
var I = g.toLowerCase();
ut[I] = ut[I + "s"] = ut[E] = g;
}
function tt(g) {
return typeof g == "string" ? ut[g] || ut[g.toLowerCase()] : void 0;
}
function K(g) {
var E, I, O = {};
for (I in g)
s(g, I) && (E = tt(I)) && (O[E] = g[I]);
return O;
}
var it = {};
function Z(g, E) {
it[g] = E;
}
function V(g) {
return g % 4 == 0 && g % 100 != 0 || g % 400 == 0;
}
function Q(g) {
return g < 0 ? Math.ceil(g) || 0 : Math.floor(g);
}
function q(E) {
var E = +E, I = 0;
return I = E != 0 && isFinite(E) ? Q(E) : I;
}
function U(g, E) {
return function(I) {
return I != null ? (j(this, g, I), n.updateOffset(this, E), this) : F(this, g);
};
}
function F(g, E) {
return g.isValid() ? g._d["get" + (g._isUTC ? "UTC" : "") + E]() : NaN;
}
function j(g, E, I) {
g.isValid() && !isNaN(I) && (E === "FullYear" && V(g.year()) && g.month() === 1 && g.date() === 29 ? (I = q(I), g._d["set" + (g._isUTC ? "UTC" : "") + E](I, g.month(), yt(I, g.month()))) : g._d["set" + (g._isUTC ? "UTC" : "") + E](I));
}
var P = /\d/, fe = /\d\d/, et = /\d{3}/, hs = /\d{4}/, Ea = /[+-]?\d{6}/, at = /\d\d?/, It = /\d\d\d\d?/, Lt = /\d\d\d\d\d\d?/, Rt = /\d{1,3}/, Ca = /\d{1,4}/, Ta = /[+-]?\d{1,6}/, Ct = /\d+/, pt = /[+-]?\d+/, mt = /Z|[+-]\d\d:?\d\d/gi, _t = /Z|[+-]\d\d(?::?\d\d)?/gi, Tt = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
function ft(g, E, I) {
Ht[g] = v(E) ? E : function(O, G) {
return O && I ? I : E;
};
}
function le(g, E) {
return s(Ht, g) ? Ht[g](E._strict, E._locale) : new RegExp(Dt(g.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(I, O, G, ht, vt) {
return O || G || ht || vt;
})));
}
function Dt(g) {
return g.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
}
var Ht = {}, $t = {};
function Qt(g, E) {
var I, O, G = E;
for (typeof g == "string" && (g = [g]), u(E) && (G = function(ht, vt) {
vt[E] = q(ht);
}), O = g.length, I = 0; I < O; I++)
$t[g[I]] = G;
}
function we(g, E) {
Qt(g, function(I, O, G, ht) {
G._w = G._w || {}, E(I, G._w, G, ht);
});
}
var Gt, Ft = 0, zt = 1, wt = 2, bt = 3, Et = 4, kt = 5, Ut = 6, gt = 7, he = 8;
function yt(g, E) {
if (isNaN(g) || isNaN(E))
return NaN;
var I = (E % (I = 12) + I) % I;
return g += (E - I) / 12, I == 1 ? V(g) ? 29 : 28 : 31 - I % 7 % 2;
}
Gt = Array.prototype.indexOf || function(g) {
for (var E = 0; E < this.length; ++E)
if (this[E] === g)
return E;
return -1;
}, Y("M", ["MM", 2], "Mo", function() {
return this.month() + 1;
}), Y("MMM", 0, 0, function(g) {
return this.localeData().monthsShort(this, g);
}), Y("MMMM", 0, 0, function(g) {
return this.localeData().months(this, g);
}), W("month", "M"), Z("month", 8), ft("M", at), ft("MM", at, fe), ft("MMM", function(g, E) {
return E.monthsShortRegex(g);
}), ft("MMMM", function(g, E) {
return E.monthsRegex(g);
}), Qt(["M", "MM"], function(g, E) {
E[zt] = q(g) - 1;
}), Qt(["MMM", "MMMM"], function(g, E, I, O) {
O = I._locale.monthsParse(g, O, I._strict), O != null ? E[zt] = O : m(I).invalidMonth = g;
});
var re = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), _e = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), ge = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, be = Tt, Te = Tt;
function Wt(g, E) {
var I;
if (g.isValid()) {
if (typeof E == "string") {
if (/^\d+$/.test(E))
E = q(E);
else if (!u(E = g.localeData().monthsParse(E)))
return;
}
I = Math.min(g.date(), yt(g.year(), E)), g._d["set" + (g._isUTC ? "UTC" : "") + "Month"](E, I);
}
}
function ae(g) {
return g != null ? (Wt(this, g), n.updateOffset(this, !0), this) : F(this, "Month");
}
function ye() {
function g(vt, Mt) {
return Mt.length - vt.length;
}
for (var E, I = [], O = [], G = [], ht = 0; ht < 12; ht++)
E = p([2e3, ht]), I.push(this.monthsShort(E, "")), O.push(this.months(E, "")), G.push(this.months(E, "")), G.push(this.monthsShort(E, ""));
for (I.sort(g), O.sort(g), G.sort(g), ht = 0; ht < 12; ht++)
I[ht] = Dt(I[ht]), O[ht] = Dt(O[ht]);
for (ht = 0; ht < 24; ht++)
G[ht] = Dt(G[ht]);
this._monthsRegex = new RegExp("^(" + G.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + O.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + I.join("|") + ")", "i");
}
function ue(g) {
return V(g) ? 366 : 365;
}
Y("Y", 0, 0, function() {
var g = this.year();
return g <= 9999 ? N(g, 4) : "+" + g;
}), Y(0, ["YY", 2], 0, function() {
return this.year() % 100;
}), Y(0, ["YYYY", 4], 0, "year"), Y(0, ["YYYYY", 5], 0, "year"), Y(0, ["YYYYYY", 6, !0], 0, "year"), W("year", "y"), Z("year", 1), ft("Y", pt), ft("YY", at, fe), ft("YYYY", Ca, hs), ft("YYYYY", Ta, Ea), ft("YYYYYY", Ta, Ea), Qt(["YYYYY", "YYYYYY"], Ft), Qt("YYYY", function(g, E) {
E[Ft] = g.length === 2 ? n.parseTwoDigitYear(g) : q(g);
}), Qt("YY", function(g, E) {
E[Ft] = n.parseTwoDigitYear(g);
}), Qt("Y", function(g, E) {
E[Ft] = parseInt(g, 10);
}), n.parseTwoDigitYear = function(g) {
return q(g) + (68 < q(g) ? 1900 : 2e3);
};
var Eu = U("FullYear", !0);
function Wi(g, E, I, O, G, ht, vt) {
var Mt;
return g < 100 && 0 <= g ? (Mt = new Date(g + 400, E, I, O, G, ht, vt), isFinite(Mt.getFullYear()) && Mt.setFullYear(g)) : Mt = new Date(g, E, I, O, G, ht, vt), Mt;
}
function Or(g) {
var E;
return g < 100 && 0 <= g ? ((E = Array.prototype.slice.call(arguments))[0] = g + 400, E = new Date(Date.UTC.apply(null, E)), isFinite(E.getUTCFullYear()) && E.setUTCFullYear(g)) : E = new Date(Date.UTC.apply(null, arguments)), E;
}
function Ie(g, E, I) {
return I = 7 + E - I, I - (7 + Or(g, 0, I).getUTCDay() - E) % 7 - 1;
}
function se(g, vt, Mt, O, G) {
var ht, vt = 1 + 7 * (vt - 1) + (7 + Mt - O) % 7 + Ie(g, O, G), Mt = vt <= 0 ? ue(ht = g - 1) + vt : vt > ue(g) ? (ht = g + 1, vt - ue(g)) : (ht = g, vt);
return { year: ht, dayOfYear: Mt };
}
function $e(g, E, I) {
var O, G, ht = Ie(g.year(), E, I), ht = Math.floor((g.dayOfYear() - ht - 1) / 7) + 1;
return ht < 1 ? O = ht + _r(G = g.year() - 1, E, I) : ht > _r(g.year(), E, I) ? (O = ht - _r(g.year(), E, I), G = g.year() + 1) : (G = g.year(), O = ht), { week: O, year: G };
}
function _r(g, G, I) {
var O = Ie(g, G, I), G = Ie(g + 1, G, I);
return (ue(g) - O + G) / 7;
}
Y("w", ["ww", 2], "wo", "week"), Y("W", ["WW", 2], "Wo", "isoWeek"), W("week", "w"), W("isoWeek", "W"), Z("week", 5), Z("isoWeek", 5), ft("w", at), ft("ww", at, fe), ft("W", at), ft("WW", at, fe), we(["w", "ww", "W", "WW"], function(g, E, I, O) {
E[O.substr(0, 1)] = q(g);
});
function He(g, E) {
return g.slice(E, 7).concat(g.slice(0, E));
}
Y("d", 0, "do", "day"), Y("dd", 0, 0, function(g) {
return this.localeData().weekdaysMin(this, g);
}), Y("ddd", 0, 0, function(g) {
return this.localeData().weekdaysShort(this, g);
}), Y("dddd", 0, 0, function(g) {
return this.localeData().weekdays(this, g);
}), Y("e", 0, 0, "weekday"), Y("E", 0, 0, "isoWeekday"), W("day", "d"), W("weekday", "e"), W("isoWeekday", "E"), Z("day", 11), Z("weekday", 11), Z("isoWeekday", 11), ft("d", at), ft("e", at), ft("E", at), ft("dd", function(g, E) {
return E.weekdaysMinRegex(g);
}), ft("ddd", function(g, E) {
return E.weekdaysShortRegex(g);
}), ft("dddd", function(g, E) {
return E.weekdaysRegex(g);
}), we(["dd", "ddd", "dddd"], function(g, E, I, O) {
O = I._locale.weekdaysParse(g, O, I._strict), O != null ? E.d = O : m(I).invalidWeekday = g;
}), we(["d", "e", "E"], function(g, E, I, O) {
E[O] = q(g);
});
var Xe = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), qt = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), st = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), At = Tt, Nt = Tt, Jt = Tt;
function ze() {
function g(Ot, de) {
return de.length - Ot.length;
}
for (var E, I, O, G = [], ht = [], vt = [], Mt = [], Vt = 0; Vt < 7; Vt++)
O = p([2e3, 1]).day(Vt), E = Dt(this.weekdaysMin(O, "")), I = Dt(this.weekdaysShort(O, "")), O = Dt(this.weekdays(O, "")), G.push(E), ht.push(I), vt.push(O), Mt.push(E), Mt.push(I), Mt.push(O);
G.sort(g), ht.sort(g), vt.sort(g), Mt.sort(g), this._weekdaysRegex = new RegExp("^(" + Mt.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + vt.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + ht.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + G.join("|") + ")", "i");
}
function Oe() {
return this.hours() % 12 || 12;
}
function Fe(g, E) {
Y(g, 0, 0, function() {
return this.localeData().meridiem(this.hours(), this.minutes(), E);
});
}
function vr(g, E) {
return E._meridiemParse;
}
Y("H", ["HH", 2], 0, "hour"), Y("h", ["hh", 2], 0, Oe), Y("k", ["kk", 2], 0, function() {
return this.hours() || 24;
}), Y("hmm", 0, 0, function() {
return "" + Oe.apply(this) + N(this.minutes(), 2);
}), Y("hmmss", 0, 0, function() {
return "" + Oe.apply(this) + N(this.minutes(), 2) + N(this.seconds(), 2);
}), Y("Hmm", 0, 0, function() {
return "" + this.hours() + N(this.minutes(), 2);
}), Y("Hmmss", 0, 0, function() {
return "" + this.hours() + N(this.minutes(), 2) + N(this.seconds(), 2);
}), Fe("a", !0), Fe("A", !1), W("hour", "h"), Z("hour", 13), ft("a", vr), ft("A", vr), ft("H", at), ft("h", at), ft("k", at), ft("HH", at, fe), ft("hh", at, fe), ft("kk", at, fe), ft("hmm", It), ft("hmmss", Lt), ft("Hmm", It), ft("Hmmss", Lt), Qt(["H", "HH"], bt), Qt(["k", "kk"], function(g, E, I) {
g = q(g), E[bt] = g === 24 ? 0 : g;
}), Qt(["a", "A"], function(g, E, I) {
I._isPm = I._locale.isPM(g), I._meridiem = g;
}), Qt(["h", "hh"], function(g, E, I) {
E[bt] = q(g), m(I).bigHour = !0;
}), Qt("hmm", function(g, E, I) {
var O = g.length - 2;
E[bt] = q(g.substr(0, O)), E[Et] = q(g.substr(O)), m(I).bigHour = !0;
}), Qt("hmmss", function(g, E, I) {
var O = g.length - 4, G = g.length - 2;
E[bt] = q(g.substr(0, O)), E[Et] = q(g.substr(O, 2)), E[kt] = q(g.substr(G)), m(I).bigHour = !0;
}), Qt("Hmm", function(g, E, I) {
var O = g.length - 2;
E[bt] = q(g.substr(0, O)), E[Et] = q(g.substr(O));
}), Qt("Hmmss", function(g, E, I) {
var O = g.length - 4, G = g.length - 2;
E[bt] = q(g.substr(0, O)), E[Et] = q(g.substr(O, 2)), E[kt] = q(g.substr(G));
}), Tt = U("Hours", !0);
var Ve, Hi = { calendar: { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }, longDateFormat: { 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" }, invalidDate: "Invalid date", ordinal: "%d", dayOfMonthOrdinalParse: /\d{1,2}/, relativeTime: { future: "in %s", past: "%s ago", s: "a few seconds", ss: "%d seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", w: "a week", ww: "%d weeks", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }, months: re, monthsShort: _e, week: { dow: 0, doy: 6 }, weekdays: Xe, weekdaysMin: st, weekdaysShort: qt, meridiemParse: /[ap]\.?m?\.?/i }, Ee = {}, _i = {};
function mu(g) {
return g && g.toLowerCase().replace("_", "-");
}
function bl(g) {
for (var E, I, O, G, ht = 0; ht < g.length; ) {
for (E = (G = mu(g[ht]).split("-")).length, I = (I = mu(g[ht + 1])) ? I.split("-") : null; 0 < E; ) {
if (O = xn(G.slice(0, E).join("-")))
return O;
if (I && I.length >= E && function(vt, Mt) {
for (var Vt = Math.min(vt.length, Mt.length), Ot = 0; Ot < Vt; Ot += 1)
if (vt[Ot] !== Mt[Ot])
return Ot;
return Vt;
}(G, I) >= E - 1)
break;
E--;
}
ht++;
}
return Ve;
}
function xn(g) {
var E;
if (Ee[g] === void 0 && !0 && t && t.exports && g.match("^[^/\\\\]*$") != null)
try {
E = Ve._abbr, Za("./locale/" + g), Xt(E);
} catch {
Ee[g] = null;
}
return Ee[g];
}
function Xt(g, E) {
return g && ((E = l(E) ? ce(g) : te(g, E)) ? Ve = E : typeof console < "u" && console.warn && console.warn("Locale " + g + " not found. Did you forget to load it?")), Ve._abbr;
}
function te(g, E) {
if (E === null)
return delete Ee[g], null;
var I, O = Hi;
if (E.abbr = g, Ee[g] != null)
L("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), O = Ee[g]._config;
else if (E.parentLocale != null)
if (Ee[E.parentLocale] != null)
O = Ee[E.parentLocale]._config;
else {
if ((I = xn(E.parentLocale)) == null)
return _i[E.parentLocale] || (_i[E.parentLocale] = []), _i[E.parentLocale].push({ name: g, config: E }), null;
O = I._config;
}
return Ee[g] = new w(B(O, E)), _i[g] && _i[g].forEach(function(G) {
te(G.name, G.config);
}), Xt(g), Ee[g];
}
function ce(g) {
var E;
if (!(g = g && g._locale && g._locale._abbr ? g._locale._abbr : g))
return Ve;
if (!i(g)) {
if (E = xn(g))
return E;
g = [g];
}
return bl(g);
}
function Pt(g) {
var E = g._a;
return E && m(g).overflow === -2 && (E = E[zt] < 0 || 11 < E[zt] ? zt : E[wt] < 1 || E[wt] > yt(E[Ft], E[zt]) ? wt : E[bt] < 0 || 24 < E[bt] || E[bt] === 24 && (E[Et] !== 0 || E[kt] !== 0 || E[Ut] !== 0) ? bt : E[Et] < 0 || 59 < E[Et] ? Et : E[kt] < 0 || 59 < E[kt] ? kt : E[Ut] < 0 || 999 < E[Ut] ? Ut : -1, m(g)._overflowDayOfYear && (E < Ft || wt < E) && (E = wt), m(g)._overflowWeeks && E === -1 && (E = gt), m(g)._overflowWeekday && E === -1 && (E = he), m(g).overflow = E), g;
}
var Ge = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, rt = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, os = /Z|[+-]\d\d(?::?\d\d)?/, ot = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/], ["YYYYMM", /\d{6}/, !1], ["YYYY", /\d{4}/, !1]], Fr = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], bu = /^\/?Date\((-?\d+)/i, I0 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, _u = { UT: 0, GMT: 0, EDT: -240, EST: -300, CDT: -300, CST: -360, MDT: -360, MST: -420, PDT: -420, PST: -480 };
function vu(g) {
var E, I, O, G, ht, vt, Vt = g._i, Mt = Ge.exec(Vt) || rt.exec(Vt), Vt = ot.length, Ot = Fr.length;
if (Mt) {
for (m(g).iso = !0, E = 0, I = Vt; E < I; E++)
if (ot[E][1].exec(Mt[1])) {
G = ot[E][0], O = ot[E][2] !== !1;
break;
}
if (G == null)
g._isValid = !1;
else {
if (Mt[3]) {
for (E = 0, I = Ot; E < I; E++)
if (Fr[E][1].exec(Mt[3])) {
ht = (Mt[2] || " ") + Fr[E][0];
break;
}
if (ht == null)
return void (g._isValid = !1);
}
if (O || ht == null) {
if (Mt[4]) {
if (!os.exec(Mt[4]))
return void (g._isValid = !1);
vt = "Z";
}
g._f = G + (ht || "") + (vt || ""), _l(g);
} else
g._isValid = !1;
}
} else
g._isValid = !1;
}
function fr(g, E, I, O, G, ht) {
return g = [function(vt) {
vt = parseInt(vt, 10);
{
if (vt <= 49)
return 2e3 + vt;
if (vt <= 999)
return 1900 + vt;
}
return vt;
}(g), _e.indexOf(E), parseInt(I, 10), parseInt(O, 10), parseInt(G, 10)], ht && g.push(parseInt(ht, 10)), g;
}
function vi(g) {
var E, I, O, G, ht = I0.exec(g._i.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""));
ht ? (E = fr(ht[4], ht[3], ht[2], ht[5], ht[6], ht[7]), I = ht[1], O = E, G = g, I && qt.indexOf(I) !== new Date(O[0], O[1], O[2]).getDay() ? (m(G).weekdayMismatch = !0, G._isValid = !1) : (g._a = E, g._tzm = (I = ht[8], O = ht[9], G = ht[10], I ? _u[I] : O ? 0 : 60 * (((I = parseInt(G, 10)) - (O = I % 100)) / 100) + O), g._d = Or.apply(null, g._a), g._d.setUTCMinutes(g._d.getUTCMinutes() - g._tzm), m(g).rfc2822 = !0)) : g._isValid = !1;
}
function xi(g, E, I) {
return g != null ? g : E != null ? E : I;
}
function ls(g) {
var E, I, O, G, ht, vt, Mt, Vt, Ot, de, ne, Ze = [];
if (!g._d) {
for (O = g, G = new Date(n.now()), I = O._useUTC ? [G.getUTCFullYear(), G.getUTCMonth(), G.getUTCDate()] : [G.getFullYear(), G.getMonth(), G.getDate()], g._w && g._a[wt] == null && g._a[zt] == null && ((G = (O = g)._w).GG != null || G.W != null || G.E != null ? (Vt = 1, Ot = 4, ht = xi(G.GG, O._a[Ft], $e(De(), 1, 4).year), vt = xi(G.W, 1), ((Mt = xi(G.E, 1)) < 1 || 7 < Mt) && (de = !0)) : (Vt = O._locale._week.dow, Ot = O._locale._week.doy, ne = $e(De(), Vt, Ot), ht = xi(G.gg, O._a[Ft], ne.year), vt = xi(G.w, ne.week), G.d != null ? ((Mt = G.d) < 0 || 6 < Mt) && (de = !0) : G.e != null ? (Mt = G.e + Vt, (G.e < 0 || 6 < G.e) && (de = !0)) : Mt = Vt), vt < 1 || vt > _r(ht, Vt, Ot) ? m(O)._overflowWeeks = !0 : de != null ? m(O)._overflowWeekday = !0 : (ne = se(ht, vt, Mt, Vt, Ot), O._a[Ft] = ne.year, O._dayOfYear = ne.dayOfYear)), g._dayOfYear != null && (G = xi(g._a[Ft], I[Ft]), (g._dayOfYear > ue(G) || g._dayOfYear === 0) && (m(g)._overflowDayOfYear = !0), de = Or(G, 0, g._dayOfYear), g._a[zt] = de.getUTCMonth(), g._a[wt] = de.getUTCDate()), E = 0; E < 3 && g._a[E] == null; ++E)
g._a[E] = Ze[E] = I[E];
for (; E < 7; E++)
g._a[E] = Ze[E] = g._a[E] == null ? E === 2 ? 1 : 0 : g._a[E];
g._a[bt] === 24 && g._a[Et] === 0 && g._a[kt] === 0 && g._a[Ut] === 0 && (g._nextDay = !0, g._a[bt] = 0), g._d = (g._useUTC ? Or : Wi).apply(null, Ze), ht = g._useUTC ? g._d.getUTCDay() : g._d.getDay(), g._tzm != null && g._d.setUTCMinutes(g._d.getUTCMinutes() - g._tzm), g._nextDay && (g._a[bt] = 24), g._w && g._w.d !== void 0 && g._w.d !== ht && (m(g).weekdayMismatch = !0);
}
}
function _l(g) {
if (g._f === n.ISO_8601)
vu(g);
else if (g._f === n.RFC_2822)
vi(g);
else {
g._a = [], m(g).empty = !0;
for (var E, I, O, G, ht, vt = "" + g._i, Mt = vt.length, Vt = 0, Ot = lt(g._f, g._locale).match(z) || [], de = Ot.length, ne = 0; ne < de; ne++)
I = Ot[ne], (E = (vt.match(le(I, g)) || [])[0]) && (0 < (O = vt.substr(0, vt.indexOf(E))).length && m(g).unusedInput.push(O), vt = vt.slice(vt.indexOf(E) + E.length), Vt += E.length), J[I] ? (E ? m(g).empty = !1 : m(g).unusedTokens.push(I), O = I, ht = g, (G = E) != null && s($t, O) && $t[O](G, ht._a, ht, O)) : g._strict && !E && m(g).unusedTokens.push(I);
m(g).charsLeftOver = Mt - Vt, 0 < vt.length && m(g).unusedInput.push(vt), g._a[bt] <= 12 && m(g).bigHour === !0 && 0 < g._a[bt] && (m(g).bigHour = void 0), m(g).parsedDateParts = g._a.slice(0), m(g).meridiem = g._meridiem, g._a[bt] = function(Ze, dr, $n) {
return $n == null ? dr : Ze.meridiemHour != null ? Ze.meridiemHour(dr, $n) : Ze.isPM != null ? ((Ze = Ze.isPM($n)) && dr < 12 && (dr += 12), dr = Ze || dr !== 12 ? dr : 0) : dr;
}(g._locale, g._a[bt], g._meridiem), (Mt = m(g).era) !== null && (g._a[Ft] = g._locale.erasConvertYear(Mt, g._a[Ft])), ls(g), Pt(g);
}
}
function xu(g) {
var E, I, O, G = g._i, ht = g._f;
return g._locale = g._locale || ce(g._l), G === null || ht === void 0 && G === "" ? y({ nullInput: !0 }) : (typeof G == "string" && (g._i = G = g._locale.preparse(G)), M(G) ? new C(Pt(G)) : (h(G) ? g._d = G : i(ht) ? function(vt) {
var Mt, Vt, Ot, de, ne, Ze, dr = !1, $n = vt._f.length;
if ($n === 0)
return m(vt).invalidFormat = !0, vt._d = new Date(NaN);
for (de = 0; de < $n; de++)
ne = 0, Ze = !1, Mt = T({}, vt), vt._useUTC != null && (Mt._useUTC = vt._useUTC), Mt._f = vt._f[de], _l(Mt), _(Mt) && (Ze = !0), ne = (ne += m(Mt).charsLeftOver) + 10 * m(Mt).unusedTokens.length, m(Mt).score = ne, dr ? ne < Ot && (Ot = ne, Vt = Mt) : (Ot == null || ne < Ot || Ze) && (Ot = ne, Vt = Mt, Ze && (dr = !0));
f(vt, Vt || Mt);
}(g) : ht ? _l(g) : l(ht = (G = g)._i) ? G._d = new Date(n.now()) : h(ht) ? G._d = new Date(ht.valueOf()) : typeof ht == "string" ? (I = G, (E = bu.exec(I._i)) !== null ? I._d = new Date(+E[1]) : (vu(I), I._isValid === !1 && (delete I._isValid, vi(I), I._isValid === !1 && (delete I._isValid, I._strict ? I._isValid = !1 : n.createFromInputFallback(I))))) : i(ht) ? (G._a = d(ht.slice(0), function(vt) {
return parseInt(vt, 10);
}), ls(G)) : a(ht) ? (E = G)._d || (O = (I = K(E._i)).day === void 0 ? I.date : I.day, E._a = d([I.year, I.month, O, I.hour, I.minute, I.second, I.millisecond], function(vt) {
return vt && parseInt(vt, 10);
}), ls(E)) : u(ht) ? G._d = new Date(ht) : n.createFromInputFallback(G), _(g) || (g._d = null), g));
}
function Rr(g, E, I, O, G) {
var ht = {};
return E !== !0 && E !== !1 || (O = E, E = void 0), I !== !0 && I !== !1 || (O = I, I = void 0), (a(g) && o(g) || i(g) && g.length === 0) && (g = void 0), ht._isAMomentObject = !0, ht._useUTC = ht._isUTC = G, ht._l = I, ht._i = g, ht._f = E, ht._strict = O, (G = new C(Pt(xu(G = ht))))._nextDay && (G.add(1, "d"), G._nextDay = void 0), G;
}
function De(g, E, I, O) {
return Rr(g, E, I, O, !1);
}
n.createFromInputFallback = R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function(g) {
g._d = new Date(g._i + (g._useUTC ? " UTC" : ""));
}), n.ISO_8601 = function() {
}, n.RFC_2822 = function() {
}, It = R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
var g = De.apply(null, arguments);
return this.isValid() && g.isValid() ? g < this ? this : g : y();
}), Lt = R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
var g = De.apply(null, arguments);
return this.isValid() && g.isValid() ? this < g ? this : g : y();
});
function jr(g, E) {
var I, O;
if (!(E = E.length === 1 && i(E[0]) ? E[0] : E).length)
return De();
for (I = E[0], O = 1; O < E.length; ++O)
E[O].isValid() && !E[O][g](I) || (I = E[O]);
return I;
}
var Gi = ["year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond"];
function Gn(E) {
var E = K(E), I = E.year || 0, O = E.quarter || 0, G = E.month || 0, ht = E.week || E.isoWeek || 0, vt = E.day || 0, Mt = E.hour || 0, Vt = E.minute || 0, Ot = E.second || 0, de = E.millisecond || 0;
this._isValid = function(ne) {
var Ze, dr, $n = !1, q0 = Gi.length;
for (Ze in ne)
if (s(ne, Ze) && (Gt.call(Gi, Ze) === -1 || ne[Ze] != null && isNaN(ne[Ze])))
return !1;
for (dr = 0; dr < q0; ++dr)
if (ne[Gi[dr]]) {
if ($n)
return !1;
parseFloat(ne[Gi[dr]]) !== q(ne[Gi[dr]]) && ($n = !0);
}
return !0;
}(E), this._milliseconds = +de + 1e3 * Ot + 6e4 * Vt + 1e3 * Mt * 60 * 60, this._days = +vt + 7 * ht, this._months = +G + 3 * O + 12 * I, this._data = {}, this._locale = ce(), this._bubble();
}
function ji(g) {
return g instanceof Gn;
}
function kn(g) {
return g < 0 ? -1 * Math.round(-1 * g) : Math.round(g);
}
function vl(g, E) {
Y(g, 0, 0, function() {
var I = this.utcOffset(), O = "+";
return I < 0 && (I = -I, O = "-"), O + N(~~(I / 60), 2) + E + N(~~I % 60, 2);
});
}
vl("Z", ":"), vl("ZZ", ""), ft("Z", _t), ft("ZZ", _t), Qt(["Z", "ZZ"], function(g, E, I) {
I._useUTC = !0, I._tzm = cs(_t, g);
});
var to = /([\+\-]|\d\d)/gi;
function cs(g, I) {
var I = (I || "").match(g);
return I === null ? null : (I = 60 * (g = ((I[I.length - 1] || []) + "").match(to) || ["-", 0, 0])[1] + q(g[2])) === 0 ? 0 : g[0] === "+" ? I : -I;
}
function wn(g, E) {
var I;
return E._isUTC ? (E = E.clone(), I = (M(g) || h(g) ? g : De(g)).valueOf() - E.valueOf(), E._d.setTime(E._d.valueOf() + I), n.updateOffset(E, !1), E) : De(g).local();
}
function N0(g) {
return -Math.round(g._d.getTimezoneOffset());
}
function u_() {
return !!this.isValid() && this._isUTC && this._offset === 0;
}
n.updateOffset = function() {
};
var sR = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, oR = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function jn(g, E) {
var I, O = g, G = null;
return ji(g) ? O = { ms: g._milliseconds, d: g._days, M: g._months } : u(g) || !isNaN(+g) ? (O = {}, E ? O[E] = +g : O.milliseconds = +g) : (G = sR.exec(g)) ? (I = G[1] === "-" ? -1 : 1, O = { y: 0, d: q(G[wt]) * I, h: q(G[bt]) * I, m: q(G[Et]) * I, s: q(G[kt]) * I, ms: q(kn(1e3 * G[Ut])) * I }) : (G = oR.exec(g)) ? (I = G[1] === "-" ? -1 : 1, O = { y: us(G[2], I), M: us(G[3], I), w: us(G[4], I), d: us(G[5], I), h: us(G[6], I), m: us(G[7], I), s: us(G[8], I) }) : O == null ? O = {} : typeof O == "object" && ("from" in O || "to" in O) && (E = function(ht, vt) {
var Mt;
return !ht.isValid() || !vt.isValid() ? { milliseconds: 0, months: 0 } : (vt = wn(vt, ht), ht.isBefore(vt) ? Mt = h_(ht, vt) : ((Mt = h_(vt, ht)).milliseconds = -Mt.milliseconds, Mt.months = -Mt.months), Mt);
}(De(O.from), De(O.to)), (O = {}).ms = E.milliseconds, O.M = E.months), G = new Gn(O), ji(g) && s(g, "_locale") && (G._locale = g._locale), ji(g) && s(g, "_isValid") && (G._isValid = g._isValid), G;
}
function us(g, E) {
return g = g && parseFloat(g.replace(",", ".")), (isNaN(g) ? 0 : g) * E;
}
function h_(g, E) {
var I = {};
return I.months = E.month() - g.month() + 12 * (E.year() - g.year()), g.clone().add(I.months, "M").isAfter(E) && --I.months, I.milliseconds = +E - +g.clone().add(I.months, "M"), I;
}
function f_(g, E) {
return function(I, O) {
var G;
return O === null || isNaN(+O) || (L(E, "moment()." + E + "(period, number) is deprecated. Please use moment()." + E + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), G = I, I = O, O = G), d_(this, jn(I, O), g), this;
};
}
function d_(g, vt, I, O) {
var G = vt._milliseconds, ht = kn(vt._days), vt = kn(vt._months);
g.isValid() && (O = O == null || O, vt && Wt(g, F(g, "Month") + vt * I), ht && j(g, "Date", F(g, "Date") + ht * I), G && g._d.setTime(g._d.valueOf() + G * I), O && n.updateOffset(g, ht || vt));
}
jn.fn = Gn.prototype, jn.invalid = function() {
return jn(NaN);
}, re = f_(1, "add"), Xe = f_(-1, "subtract");
function p_(g) {
return typeof g == "string" || g instanceof String;
}
function lR(g) {
return M(g) || h(g) || p_(g) || u(g) || function(E) {
var I = i(E), O = !1;
return I && (O = E.filter(function(G) {
return !u(G) && p_(E);
}).length === 0), I && O;
}(g) || function(E) {
var I, O, G = a(E) && !o(E), ht = !1, vt = ["years", "year", "y", "months", "month", "M", "days", "day", "d", "dates", "date", "D", "hours", "hour", "h", "minutes", "minute", "m", "seconds", "second", "s", "milliseconds", "millisecond", "ms"], Mt = vt.length;
for (I = 0; I < Mt; I += 1)
O = vt[I], ht = ht || s(E, O);
return G && ht;
}(g) || g == null;
}
function ku(g, G) {
if (g.date() < G.date())
return -ku(G, g);
var I = 12 * (G.year() - g.year()) + (G.month() - g.month()), O = g.clone().add(I, "months"), G = G - O < 0 ? (G - O) / (O - g.clone().add(I - 1, "months")) : (G - O) / (g.clone().add(1 + I, "months") - O);
return -(I + G) || 0;
}
function g_(g) {
return g === void 0 ? this._locale._abbr : ((g = ce(g)) != null && (this._locale = g), this);
}
n.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ", n.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]", st = R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(g) {
return g === void 0 ? this.localeData() : this.locale(g);
});
function y_() {
return this._locale;
}
var m_ = 126227808e5;
function eo(g, E) {
return (g % E + E) % E;
}
function b_(g, E, I) {
return g < 100 && 0 <= g ? new Date(g + 400, E, I) - m_ : new Date(g, E, I).valueOf();
}
function __(g, E, I) {
return g < 100 && 0 <= g ? Date.UTC(g + 400, E, I) - m_ : Date.UTC(g, E, I);
}
function B0(g, E) {
return E.erasAbbrRegex(g);
}
function D0() {
for (var g = [], E = [], I = [], O = [], G = this.eras(), ht = 0, vt = G.length; ht < vt; ++ht)
E.push(Dt(G[ht].name)), g.push(Dt(G[ht].abbr)), I.push(Dt(G[ht].narrow)), O.push(Dt(G[ht].name)), O.push(Dt(G[ht].abbr)), O.push(Dt(G[ht].narrow));
this._erasRegex = new RegExp("^(" + O.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + E.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + g.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp("^(" + I.join("|") + ")", "i");
}
function wu(g, E) {
Y(0, [g, g.length], 0, E);
}
function v_(g, E, I, O, G) {
var ht;
return g == null ? $e(this, O, G).year : (ht = _r(g, O, G), function(vt, Mt, Vt, Ot, de) {
return vt = se(vt, Mt, Vt, Ot, de), Mt = Or(vt.year, 0, vt.dayOfYear), this.year(Mt.getUTCFullYear()), this.month(Mt.getUTCMonth()), this.date(Mt.getUTCDate()), this;
}.call(this, g, E = ht < E ? ht : E, I, O, G));
}
Y("N", 0, 0, "eraAbbr"), Y("NN", 0, 0, "eraAbbr"), Y("NNN", 0, 0, "eraAbbr"), Y("NNNN", 0, 0, "eraName"), Y("NNNNN", 0, 0, "eraNarrow"), Y("y", ["y", 1], "yo", "eraYear"), Y("y", ["yy", 2], 0, "eraYear"), Y("y", ["yyy", 3], 0, "eraYear"), Y("y", ["yyyy", 4], 0, "eraYear"), ft("N", B0), ft("NN", B0), ft("NNN", B0), ft("NNNN", function(g, E) {
return E.erasNameRegex(g);
}), ft("NNNNN", function(g, E) {
return E.erasNarrowRegex(g);
}), Qt(["N", "NN", "NNN", "NNNN", "NNNNN"], function(g, E, I, O) {
O = I._locale.erasParse(g, O, I._strict), O ? m(I).era = O : m(I).invalidEra = g;
}), ft("y", Ct), ft("yy", Ct), ft("yyy", Ct), ft("yyyy", Ct), ft("yo", function(g, E) {
return E._eraYearOrdinalRegex || Ct;
}), Qt(["y", "yy", "yyy", "yyyy"], Ft), Qt(["yo"], function(g, E, I, O) {
var G;
I._locale._eraYearOrdinalRegex && (G = g.match(I._locale._eraYearOrdinalRegex)), I._locale.eraYearOrdinalParse ? E[Ft] = I._locale.eraYearOrdinalParse(g, G) : E[Ft] = parseInt(g, 10);
}), Y(0, ["gg", 2], 0, function() {
return this.weekYear() % 100;
}), Y(0, ["GG", 2], 0, function() {
return this.isoWeekYear() % 100;
}), wu("gggg", "weekYear"), wu("ggggg", "weekYear"), wu("GGGG", "isoWeekYear"), wu("GGGGG", "isoWeekYear"), W("weekYear", "gg"), W("isoWeekYear", "GG"), Z("weekYear", 1), Z("isoWeekYear", 1), ft("G", pt), ft("g", pt), ft("GG", at, fe), ft("gg", at, fe), ft("GGGG", Ca, hs), ft("gggg", Ca, hs), ft("GGGGG", Ta, Ea), ft("ggggg", Ta, Ea), we(["gggg", "ggggg", "GGGG", "GGGGG"], function(g, E, I, O) {
E[O.substr(0, 2)] = q(g);
}), we(["gg", "GG"], function(g, E, I, O) {
E[O] = n.parseTwoDigitYear(g);
}), Y("Q", 0, "Qo", "quarter"), W("quarter", "Q"), Z("quarter", 7), ft("Q", P), Qt("Q", function(g, E) {
E[zt] = 3 * (q(g) - 1);
}), Y("D", ["DD", 2], "Do", "date"), W("date", "D"), Z("date", 9), ft("D", at), ft("DD", at, fe), ft("Do", function(g, E) {
return g ? E._dayOfMonthOrdinalParse || E._ordinalParse : E._dayOfMonthOrdinalParseLenient;
}), Qt(["D", "DD"], wt), Qt("Do", function(g, E) {
E[wt] = q(g.match(at)[0]);
}), Ca = U("Date", !0), Y("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), W("dayOfYear", "DDD"), Z("dayOfYear", 4), ft("DDD", Rt), ft("DDDD", et), Qt(["DDD", "DDDD"], function(g, E, I) {
I._dayOfYear = q(g);
}), Y("m", ["mm", 2], 0, "minute"), W("minute", "m"), Z("minute", 14), ft("m", at), ft("mm", at, fe), Qt(["m", "mm"], Et);
var wa, hs = U("Minutes", !1), Ta = (Y("s", ["ss", 2], 0, "second"), W("second", "s"), Z("second", 15), ft("s", at), ft("ss", at, fe), Qt(["s", "ss"], kt), U("Seconds", !1));
for (Y("S", 0, 0, function() {
return ~~(this.millisecond() / 100);
}), Y(0, ["SS", 2], 0, function() {
return ~~(this.millisecond() / 10);
}), Y(0, ["SSS", 3], 0, "millisecond"), Y(0, ["SSSS", 4], 0, function() {
return 10 * this.millisecond();
}), Y(0, ["SSSSS", 5], 0, function() {
return 100 * this.millisecond();
}), Y(0, ["SSSSSS", 6], 0, function() {
return 1e3 * this.millisecond();
}), Y(0, ["SSSSSSS", 7], 0, function() {
return 1e4 * this.millisecond();
}), Y(0, ["SSSSSSSS", 8], 0, function() {
return 1e5 * this.millisecond();
}), Y(0, ["SSSSSSSSS", 9], 0, function() {
return 1e6 * this.millisecond();
}), W("millisecond", "ms"), Z("millisecond", 16), ft("S", Rt, P), ft("SS", Rt, fe), ft("SSS", Rt, et), wa = "SSSS"; wa.length <= 9; wa += "S")
ft(wa, Ct);
function cR(g, E) {
E[Ut] = q(1e3 * ("0." + g));
}
for (wa = "S"; wa.length <= 9; wa += "S")
Qt(wa, cR);
Ea = U("Milliseconds", !1), Y("z", 0, 0, "zoneAbbr"), Y("zz", 0, 0, "zoneName"), P = C.prototype;
function x_(g) {
return g;
}
P.add = re, P.calendar = function(I, G) {
arguments.length === 1 && (arguments[0] ? lR(arguments[0]) ? (I = arguments[0], G = void 0) : function(ht) {
for (var vt = a(ht) && !o(ht), Mt = !1, Vt = ["sameDay", "nextDay", "lastDay", "nextWeek", "lastWeek", "sameElse"], Ot = 0; Ot < Vt.length; Ot += 1)
Mt = Mt || s(ht, Vt[Ot]);
return vt && Mt;
}(arguments[0]) && (G = arguments[0], I = void 0) : G = I = void 0);
var I = I || De(), O = wn(I, this).startOf("day"), O = n.calendarFormat(this, O) || "sameElse", G = G && (v(G[O]) ? G[O].call(this, I) : G[O]);
return this.format(G || this.localeData().calendar(O, this, De(I)));
}, P.clone = function() {
return new C(this);
}, P.diff = function(g, E, I) {
var O, G, ht;
if (!this.isValid())
return NaN;
if (!(O = wn(g, this)).isValid())
return NaN;
switch (G = 6e4 * (O.utcOffset() - this.utcOffset()), E = tt(E)) {
case "year":
ht = ku(this, O) / 12;
break;
case "month":
ht = ku(this, O);
break;
case "quarter":
ht = ku(this, O) / 3;
break;
case "second":
ht = (this - O) / 1e3;
break;
case "minute":
ht = (this - O) / 6e4;
break;
case "hour":
ht = (this - O) / 36e5;
break;
case "day":
ht = (this - O - G) / 864e5;
break;
case "week":
ht = (this - O - G) / 6048e5;
break;
default:
ht = this - O;
}
return I ? ht : Q(ht);
}, P.endOf = function(g) {
var E, I;
if ((g = tt(g)) === void 0 || g === "millisecond" || !this.isValid())
return this;
switch (I = this._isUTC ? __ : b_, g) {
case "year":
E = I(this.year() + 1, 0, 1) - 1;
break;
case "quarter":
E = I(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;
break;
case "month":
E = I(this.year(), this.month() + 1, 1) - 1;
break;
case "week":
E = I(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;
break;
case "isoWeek":
E = I(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;
break;
case "day":
case "date":
E = I(this.year(), this.month(), this.date() + 1) - 1;
break;
case "hour":
E = this._d.valueOf(), E += 36e5 - eo(E + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) - 1;
break;
case "minute":
E = this._d.valueOf(), E += 6e4 - eo(E, 6e4) - 1;
break;
case "second":
E = this._d.valueOf(), E += 1e3 - eo(E, 1e3) - 1;
break;
}
return this._d.setTime(E), n.updateOffset(this, !0), this;
}, P.format = function(g) {
return g = g || (this.isUtc() ? n.defaultFormatUtc : n.defaultFormat), g = $(this, g), this.localeData().postformat(g);
}, P.from = function(g, E) {
return this.isValid() && (M(g) && g.isValid() || De(g).isValid()) ? jn({ to: this, from: g }).locale(this.locale()).humanize(!E) : this.localeData().invalidDate();
}, P.fromNow = function(g) {
return this.from(De(), g);
}, P.to = function(g, E) {
return this.isValid() && (M(g) && g.isValid() || De(g).isValid()) ? jn({ from: this, to: g }).locale(this.locale()).humanize(!E) : this.localeData().invalidDate();
}, P.toNow = function(g) {
return this.to(De(), g);
}, P.get = function(g) {
return v(this[g = tt(g)]) ? this[g]() : this;
}, P.invalidAt = function() {
return m(this).overflow;
}, P.isAfter = function(g, E) {
return g = M(g) ? g : De(g), !(!this.isValid() || !g.isValid()) && ((E = tt(E) || "millisecond") === "millisecond" ? this.valueOf() > g.valueOf() : g.valueOf() < this.clone().startOf(E).valueOf());
}, P.isBefore = function(g, E) {
return g = M(g) ? g : De(g), !(!this.isValid() || !g.isValid()) && ((E = tt(E) || "millisecond") === "millisecond" ? this.valueOf() < g.valueOf() : this.clone().endOf(E).valueOf() < g.valueOf());
}, P.isBetween = function(g, E, I, O) {
return g = M(g) ? g : De(g), E = M(E) ? E : De(E), !!(this.isValid() && g.isValid() && E.isValid()) && ((O = O || "()")[0] === "(" ? this.isAfter(g, I) : !this.isBefore(g, I)) && (O[1] === ")" ? this.isBefore(E, I) : !this.isAfter(E, I));
}, P.isSame = function(I, E) {
var I = M(I) ? I : De(I);
return !(!this.isValid() || !I.isValid()) && ((E = tt(E) || "millisecond") === "millisecond" ? this.valueOf() === I.valueOf() : (I = I.valueOf(), this.clone().startOf(E).valueOf() <= I && I <= this.clone().endOf(E).valueOf()));
}, P.isSameOrAfter = function(g, E) {
return this.isSame(g, E) || this.isAfter(g, E);
}, P.isSameOrBefore = function(g, E) {
return this.isSame(g, E) || this.isBefore(g, E);
}, P.isValid = function() {
return _(this);
}, P.lang = st, P.locale = g_, P.localeData = y_, P.max = Lt, P.min = It, P.parsingFlags = function() {
return f({}, m(this));
}, P.set = function(g, E) {
if (typeof g == "object")
for (var I = function(ht) {
var vt, Mt = [];
for (vt in ht)
s(ht, vt) && Mt.push({ unit: vt, priority: it[vt] });
return Mt.sort(function(Vt, Ot) {
return Vt.priority - Ot.priority;
}), Mt;
}(g = K(g)), O = I.length, G = 0; G < O; G++)
this[I[G].unit](g[I[G].unit]);
else if (v(this[g = tt(g)]))
return this[g](E);
return this;
}, P.startOf = function(g) {
var E, I;
if ((g = tt(g)) === void 0 || g === "millisecond" || !this.isValid())
return this;
switch (I = this._isUTC ? __ : b_, g) {
case "year":
E = I(this.year(), 0, 1);
break;
case "quarter":
E = I(this.year(), this.month() - this.month() % 3, 1);
break;
case "month":
E = I(this.year(), this.month(), 1);
break;
case "week":
E = I(this.year(), this.month(), this.date() - this.weekday());
break;
case "isoWeek":
E = I(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));
break;
case "day":
case "date":
E = I(this.year(), this.month(), this.date());
break;
case "hour":
E = this._d.valueOf(), E -= eo(E + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5);
break;
case "minute":
E = this._d.valueOf(), E -= eo(E, 6e4);
break;
case "second":
E = this._d.valueOf(), E -= eo(E, 1e3);
break;
}
return this._d.setTime(E), n.updateOffset(this, !0), this;
}, P.subtract = Xe, P.toArray = function() {
var g = this;
return [g.year(), g.month(), g.date(), g.hour(), g.minute(), g.second(), g.millisecond()];
}, P.toObject = function() {
var g = this;
return { years: g.year(), months: g.month(), date: g.date(), hours: g.hours(), minutes: g.minutes(), seconds: g.seconds(), milliseconds: g.milliseconds() };
}, P.toDate = function() {
return new Date(this.valueOf());
}, P.toISOString = function(g) {
if (!this.isValid())
return null;
var E = (g = g !== !0) ? this.clone().utc() : this;
return E.year() < 0 || 9999 < E.year() ? $(E, g ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ") : v(Date.prototype.toISOString) ? g ? this.toDate().toISOString() : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3).toISOString().replace("Z", $(E, "Z")) : $(E, g ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ");
}, P.inspect = function() {
if (!this.isValid())
return "moment.invalid(/* " + this._i + " */)";
var g, E = "moment", I = "";
return this.isLocal() || (E = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", I = "Z"), E = "[" + E + '("]', g = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", this.format(E + g + "-MM-DD[T]HH:mm:ss.SSS" + (I + '[")]'));
}, typeof Symbol < "u" && Symbol.for != null && (P[Symbol.for("nodejs.util.inspect.custom")] = function() {
return "Moment<" + this.format() + ">";
}), P.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, P.toString = function() {
return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
}, P.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, P.valueOf = function() {
return this._d.valueOf() - 6e4 * (this._offset || 0);
}, P.creationData = function() {
return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict };
}, P.eraName = function() {
for (var g, E = this.localeData().eras(), I = 0, O = E.length; I < O; ++I)
if (g = this.clone().startOf("day").valueOf(), E[I].since <= g && g <= E[I].until || E[I].until <= g && g <= E[I].since)
return E[I].name;
return "";
}, P.eraNarrow = function() {
for (var g, E = this.localeData().eras(), I = 0, O = E.length; I < O; ++I)
if (g = this.clone().startOf("day").valueOf(), E[I].since <= g && g <= E[I].until || E[I].until <= g && g <= E[I].since)
return E[I].narrow;
return "";
}, P.eraAbbr = function() {
for (var g, E = this.localeData().eras(), I = 0, O = E.length; I < O; ++I)
if (g = this.clone().startOf("day").valueOf(), E[I].since <= g && g <= E[I].until || E[I].until <= g && g <= E[I].since)
return E[I].abbr;
return "";
}, P.eraYear = function() {
for (var g, E, I = this.localeData().eras(), O = 0, G = I.length; O < G; ++O)
if (g = I[O].since <= I[O].until ? 1 : -1, E = this.clone().startOf("day").valueOf(), I[O].since <= E && E <= I[O].until || I[O].until <= E && E <= I[O].since)
return (this.year() - n(I[O].since).year()) * g + I[O].offset;
return this.year();
}, P.year = Eu, P.isLeapYear = function() {
return V(this.year());
}, P.weekYear = function(g) {
return v_.call(this, g, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);
}, P.isoWeekYear = function(g) {
return v_.call(this, g, this.isoWeek(), this.isoWeekday(), 1, 4);
}, P.quarter = P.quarters = function(g) {
return g == null ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (g - 1) + this.month() % 3);
}, P.month = ae, P.daysInMonth = function() {
return yt(this.year(), this.month());
}, P.week = P.weeks = function(g) {
var E = this.localeData().week(this);
return g == null ? E : this.add(7 * (g - E), "d");
}, P.isoWeek = P.isoWeeks = function(g) {
var E = $e(this, 1, 4).week;
return g == null ? E : this.add(7 * (g - E), "d");
}, P.weeksInYear = function() {
var g = this.localeData()._week;
return _r(this.year(), g.dow, g.doy);
}, P.weeksInWeekYear = function() {
var g = this.localeData()._week;
return _r(this.weekYear(), g.dow, g.doy);
}, P.isoWeeksInYear = function() {
return _r(this.year(), 1, 4);
}, P.isoWeeksInISOWeekYear = function() {
return _r(this.isoWeekYear(), 1, 4);
}, P.date = Ca, P.day = P.days = function(g) {
if (!this.isValid())
return g != null ? this : NaN;
var E, I, O = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
return g != null ? (E = g, I = this.localeData(), g = typeof E != "string" ? E : isNaN(E) ? typeof (E = I.weekdaysParse(E)) == "number" ? E : null : parseInt(E, 10), this.add(g - O, "d")) : O;
}, P.weekday = function(g) {
if (!this.isValid())
return g != null ? this : NaN;
var E = (this.day() + 7 - this.localeData()._week.dow) % 7;
return g == null ? E : this.add(g - E, "d");
}, P.isoWeekday = function(g) {
return this.isValid() ? g != null ? (E = g, I = this.localeData(), I = typeof E == "string" ? I.weekdaysParse(E) % 7 || 7 : isNaN(E) ? null : E, this.day(this.day() % 7 ? I : I - 7)) : this.day() || 7 : g != null ? this : NaN;
var E, I;
}, P.dayOfYear = function(g) {
var E = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
return g == null ? E : this.add(g - E, "d");
}, P.hour = P.hours = Tt, P.minute = P.minutes = hs, P.second = P.seconds = Ta, P.millisecond = P.milliseconds = Ea, P.utcOffset = function(g, E, I) {
var O, G = this._offset || 0;
if (!this.isValid())
return g != null ? this : NaN;
if (g == null)
return this._isUTC ? G : N0(this);
if (typeof g == "string") {
if ((g = cs(_t, g)) === null)
return this;
} else
Math.abs(g) < 16 && !I && (g *= 60);
return !this._isUTC && E && (O = N0(this)), this._offset = g, this._isUTC = !0, O != null && this.add(O, "m"), G !== g && (!E || this._changeInProgress ? d_(this, jn(g - G, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, n.updateOffset(this, !0), this._changeInProgress = null)), this;
}, P.utc = function(g) {
return this.utcOffset(0, g);
}, P.local = function(g) {
return this._isUTC && (this.utcOffset(0, g), this._isUTC = !1, g && this.subtract(N0(this), "m")), this;
}, P.parseZone = function() {
var g;
return this._tzm != null ? this.utcOffset(this._tzm, !1, !0) : typeof this._i == "string" && ((g = cs(mt, this._i)) != null ? this.utcOffset(g) : this.utcOffset(0, !0)), this;
}, P.hasAlignedHourOffset = function(g) {
return !!this.isValid() && (g = g ? De(g).utcOffset() : 0, (this.utcOffset() - g) % 60 == 0);
}, P.isDST = function() {
return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}, P.isLocal = function() {
return !!this.isValid() && !this._isUTC;
}, P.isUtcOffset = function() {
return !!this.isValid() && this._isUTC;
}, P.isUtc = u_, P.isUTC = u_, P.zoneAbbr = function() {
return this._isUTC ? "UTC" : "";
}, P.zoneName = function() {
return this._isUTC ? "Coordinated Universal Time" : "";
}, P.dates = R("dates accessor is deprecated. Use date instead.", Ca), P.months = R("months accessor is deprecated. Use month instead", ae), P.years = R("years accessor is deprecated. Use year instead", Eu), P.zone = R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", function(g, E) {
return g != null ? (this.utcOffset(g = typeof g != "string" ? -g : g, E), this) : -this.utcOffset();
}), P.isDSTShifted = R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", function() {
if (!l(this._isDSTShifted))
return this._isDSTShifted;
var g, E = {};
return T(E, this), (E = xu(E))._a ? (g = (E._isUTC ? p : De)(E._a), this._isDSTShifted = this.isValid() && 0 < function(I, O, G) {
for (var ht = Math.min(I.length, O.length), vt = Math.abs(I.length - O.length), Mt = 0, Vt = 0; Vt < ht; Vt++)
(G && I[Vt] !== O[Vt] || !G && q(I[Vt]) !== q(O[Vt])) && Mt++;
return Mt + vt;
}(E._a, g.toArray())) : this._isDSTShifted = !1, this._isDSTShifted;
}), fe = w.prototype;
function Tu(g, E, I, ht) {
var G = ce(), ht = p().set(ht, E);
return G[I](ht, g);
}
function k_(g, E, I) {
if (u(g) && (E = g, g = void 0), g = g || "", E != null)
return Tu(g, E, I, "month");
for (var O = [], G = 0; G < 12; G++)
O[G] = Tu(g, G, I, "month");
return O;
}
function O0(g, E, I, O) {
E = (typeof g == "boolean" ? u(E) && (I = E, E = void 0) : (E = g, g = !1, u(I = E) && (I = E, E = void 0)), E || "");
var G, ht = ce(), vt = g ? ht._week.dow : 0, Mt = [];
if (I != null)
return Tu(E, (I + vt) % 7, O, "day");
for (G = 0; G < 7; G++)
Mt[G] = Tu(E, (G + vt) % 7, O, "day");
return Mt;
}
fe.calendar = function(g, E, I) {
return v(g = this._calendar[g] || this._calendar.sameElse) ? g.call(E, I) : g;
}, fe.longDateFormat = function(g) {
var E = this._longDateFormat[g], I = this._longDateFormat[g.toUpperCase()];
return E || !I ? E : (this._longDateFormat[g] = I.match(z).map(function(O) {
return O === "MMMM" || O === "MM" || O === "DD" || O === "dddd" ? O.slice(1) : O;
}).join(""), this._longDateFormat[g]);
}, fe.invalidDate = function() {
return this._invalidDate;
}, fe.ordinal = function(g) {
return this._ordinal.replace("%d", g);
}, fe.preparse = x_, fe.postformat = x_, fe.relativeTime = function(g, E, I, O) {
var G = this._relativeTime[I];
return v(G) ? G(g, E, I, O) : G.replace(/%d/i, g);
}, fe.pastFuture = function(g, E) {
return v(g = this._relativeTime[0 < g ? "future" : "past"]) ? g(E) : g.replace(/%s/i, E);
}, fe.set = function(g) {
var E, I;
for (I in g)
s(g, I) && (v(E = g[I]) ? this[I] = E : this["_" + I] = E);
this._config = g, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source);
}, fe.eras = function(g, E) {
for (var I, O = this._eras || ce("en")._eras, G = 0, ht = O.length; G < ht; ++G) {
switch (typeof O[G].since) {
case "string":
I = n(O[G].since).startOf("day"), O[G].since = I.valueOf();
break;
}
switch (typeof O[G].until) {
case "undefined":
O[G].until = 1 / 0;
break;
case "string":
I = n(O[G].until).startOf("day").valueOf(), O[G].until = I.valueOf();
break;
}
}
return O;
}, fe.erasParse = function(g, E, I) {
var O, G, ht, vt, Mt, Vt = this.eras();
for (g = g.toUpperCase(), O = 0, G = Vt.length; O < G; ++O)
if (ht = Vt[O].name.toUpperCase(), vt = Vt[O].abbr.toUpperCase(), Mt = Vt[O].narrow.toUpperCase(), I)
switch (E) {
case "N":
case "NN":
case "NNN":
if (vt === g)
return Vt[O];
break;
case "NNNN":
if (ht === g)
return Vt[O];
break;
case "NNNNN":
if (Mt === g)
return Vt[O];
break;
}
else if (0 <= [ht, vt, Mt].indexOf(g))
return Vt[O];
}, fe.erasConvertYear = function(g, E) {
var I = g.since <= g.until ? 1 : -1;
return E === void 0 ? n(g.since).year() : n(g.since).year() + (E - g.offset) * I;
}, fe.erasAbbrRegex = function(g) {
return s(this, "_erasAbbrRegex") || D0.call(this), g ? this._erasAbbrRegex : this._erasRegex;
}, fe.erasNameRegex = function(g) {
return s(this, "_erasNameRegex") || D0.call(this), g ? this._erasNameRegex : this._erasRegex;
}, fe.erasNarrowRegex = function(g) {
return s(this, "_erasNarrowRegex") || D0.call(this), g ? this._erasNarrowRegex : this._erasRegex;
}, fe.months = function(g, E) {
return g ? (i(this._months) ? this._months : this._months[(this._months.isFormat || ge).test(E) ? "format" : "standalone"])[g.month()] : i(this._months) ? this._months : this._months.standalone;
}, fe.monthsShort = function(g, E) {
return g ? (i(this._monthsShort) ? this._monthsShort : this._monthsShort[ge.test(E) ? "format" : "standalone"])[g.month()] : i(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
}, fe.monthsParse = function(g, E, I) {
var O, G;
if (this._monthsParseExact)
return function(ne, vt, Mt) {
var Vt, Ot, de, ne = ne.toLocaleLowerCase();
if (!this._monthsParse)
for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], Vt = 0; Vt < 12; ++Vt)
de = p([2e3, Vt]), this._shortMonthsParse[Vt] = this.monthsShort(de, "").toLocaleLowerCase(), this._longMonthsParse[Vt] = this.months(de, "").toLocaleLowerCase();
return Mt ? vt === "MMM" ? (Ot = Gt.call(this._shortMonthsParse, ne)) !== -1 ? Ot : null : (Ot = Gt.call(this._longMonthsParse, ne)) !== -1 ? Ot : null : vt === "MMM" ? (Ot = Gt.call(this._shortMonthsParse, ne)) !== -1 || (Ot = Gt.call(this._longMonthsParse, ne)) !== -1 ? Ot : null : (Ot = Gt.call(this._longMonthsParse, ne)) !== -1 || (Ot = Gt.call(this._shortMonthsParse, ne)) !== -1 ? Ot : null;
}.call(this, g, E, I);
for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), O = 0; O < 12; O++)
if (G = p([2e3, O]), I && !this._longMonthsParse[O] && (this._longMonthsParse[O] = new RegExp("^" + this.months(G, "").replace(".", "") + "$", "i"), this._shortMonthsParse[O] = new RegExp("^" + this.monthsShort(G, "").replace(".", "") + "$", "i")), I || this._monthsParse[O] || (G = "^" + this.months(G, "") + "|^" + this.monthsShort(G, ""), this._monthsParse[O] = new RegExp(G.replace(".", ""), "i")), I && E === "MMMM" && this._longMonthsParse[O].test(g) || I && E === "MMM" && this._shortMonthsParse[O].test(g) || !I && this._monthsParse[O].test(g))
return O;
}, fe.monthsRegex = function(g) {
return this._monthsParseExact ? (s(this, "_monthsRegex") || ye.call(this), g ? this._monthsStrictRegex : this._monthsRegex) : (s(this, "_monthsRegex") || (this._monthsRegex = Te), this._monthsStrictRegex && g ? this._monthsStrictRegex : this._monthsRegex);
}, fe.monthsShortRegex = function(g) {
return this._monthsParseExact ? (s(this, "_monthsRegex") || ye.call(this), g ? this._monthsShortStrictRegex : this._monthsShortRegex) : (s(this, "_monthsShortRegex") || (this._monthsShortRegex = be), this._monthsShortStrictRegex && g ? this._monthsShortStrictRegex : this._monthsShortRegex);
}, fe.week = function(g) {
return $e(g, this._week.dow, this._week.doy).week;
}, fe.firstDayOfYear = function() {
return this._week.doy;
}, fe.firstDayOfWeek = function() {
return this._week.dow;
}, fe.weekdays = function(g, E) {
return E = i(this._weekdays) ? this._weekdays : this._weekdays[g && g !== !0 && this._weekdays.isFormat.test(E) ? "format" : "standalone"], g === !0 ? He(E, this._week.dow) : g ? E[g.day()] : E;
}, fe.weekdaysMin = function(g) {
return g === !0 ? He(this._weekdaysMin, this._week.dow) : g ? this._weekdaysMin[g.day()] : this._weekdaysMin;
}, fe.weekdaysShort = function(g) {
return g === !0 ? He(this._weekdaysShort, this._week.dow) : g ? this._weekdaysShort[g.day()] : this._weekdaysShort;
}, fe.weekdaysParse = function(g, E, I) {
var O, G;
if (this._weekdaysParseExact)
return function(ne, vt, Mt) {
var Vt, Ot, de, ne = ne.toLocaleLowerCase();
if (!this._weekdaysParse)
for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], Vt = 0; Vt < 7; ++Vt)
de = p([2e3, 1]).day(Vt), this._minWeekdaysParse[Vt] = this.weekdaysMin(de, "").toLocaleLowerCase(), this._shortWeekdaysParse[Vt] = this.weekdaysShort(de, "").toLocaleLowerCase(), this._weekdaysParse[Vt] = this.weekdays(de, "").toLocaleLowerCase();
return Mt ? vt === "dddd" ? (Ot = Gt.call(this._weekdaysParse, ne)) !== -1 ? Ot : null : vt === "ddd" ? (Ot = Gt.call(this._shortWeekdaysParse, ne)) !== -1 ? Ot : null : (Ot = Gt.call(this._minWeekdaysParse, ne)) !== -1 ? Ot : null : vt === "dddd" ? (Ot = Gt.call(this._weekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._shortWeekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._minWeekdaysParse, ne)) !== -1 ? Ot : null : vt === "ddd" ? (Ot = Gt.call(this._shortWeekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._weekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._minWeekdaysParse, ne)) !== -1 ? Ot : null : (Ot = Gt.call(this._minWeekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._weekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._shortWeekdaysParse, ne)) !== -1 ? Ot : null;
}.call(this, g, E, I);
for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), O = 0; O < 7; O++)
if (G = p([2e3, 1]).day(O), I && !this._fullWeekdaysParse[O] && (this._fullWeekdaysParse[O] = new RegExp("^" + this.weekdays(G, "").replace(".", "\\.?") + "$", "i"), this._shortWeekdaysParse[O] = new RegExp("^" + this.weekdaysShort(G, "").replace(".", "\\.?") + "$", "i"), this._minWeekdaysParse[O] = new RegExp("^" + this.weekdaysMin(G, "").replace(".", "\\.?") + "$", "i")), this._weekdaysParse[O] || (G = "^" + this.weekdays(G, "") + "|^" + this.weekdaysShort(G, "") + "|^" + this.weekdaysMin(G, ""), this._weekdaysParse[O] = new RegExp(G.replace(".", ""), "i")), I && E === "dddd" && this._fullWeekdaysParse[O].test(g) || I && E === "ddd" && this._shortWeekdaysParse[O].test(g) || I && E === "dd" && this._minWeekdaysParse[O].test(g) || !I && this._weekdaysParse[O].test(g))
return O;
}, fe.weekdaysRegex = function(g) {
return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || ze.call(this), g ? this._weekdaysStrictRegex : this._weekdaysRegex) : (s(this, "_weekdaysRegex") || (this._weekdaysRegex = At), this._weekdaysStrictRegex && g ? this._weekdaysStrictRegex : this._weekdaysRegex);
}, fe.weekdaysShortRegex = function(g) {
return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || ze.call(this), g ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (s(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Nt), this._weekdaysShortStrictRegex && g ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
}, fe.weekdaysMinRegex = function(g) {
return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || ze.call(this), g ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (s(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = Jt), this._weekdaysMinStrictRegex && g ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
}, fe.isPM = function(g) {
return (g + "").toLowerCase().charAt(0) === "p";
}, fe.meridiem = function(g, E, I) {
return 11 < g ? I ? "pm" : "PM" : I ? "am" : "AM";
}, Xt("en", { eras: [{ since: "0001-01-01", until: 1 / 0, offset: 1, name: "Anno Domini", narrow: "AD", abbr: "AD" }, { since: "0000-12-31", until: -1 / 0, offset: 1, name: "Before Christ", narrow: "BC", abbr: "BC" }], dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function(g) {
var E = g % 10;
return g + (q(g % 100 / 10) === 1 ? "th" : E == 1 ? "st" : E == 2 ? "nd" : E == 3 ? "rd" : "th");
} }), n.lang = R("moment.lang is deprecated. Use moment.locale instead.", Xt), n.langData = R("moment.langData is deprecated. Use moment.localeData instead.", ce);
var $i = Math.abs;
function w_(g, E, I, O) {
return E = jn(E, I), g._milliseconds += O * E._milliseconds, g._days += O * E._days, g._months += O * E._months, g._bubble();
}
function T_(g) {
return g < 0 ? Math.floor(g) : Math.ceil(g);
}
function E_(g) {
return 4800 * g / 146097;
}
function F0(g) {
return 146097 * g / 4800;
}
function Xi(g) {
return function() {
return this.as(g);
};
}
Rt = Xi("ms"), et = Xi("s"), re = Xi("m"), Lt = Xi("h"), It = Xi("d"), Xe = Xi("w"), Tt = Xi("M"), hs = Xi("Q"), Ta = Xi("y");
function fs(g) {
return function() {
return this.isValid() ? this._data[g] : NaN;
};
}
var Ea = fs("milliseconds"), Ca = fs("seconds"), Eu = fs("minutes"), fe = fs("hours"), uR = fs("days"), hR = fs("months"), fR = fs("years"), Ki = Math.round, ro = { ss: 44, s: 45, m: 45, h: 22, d: 26, w: null, M: 11 };
function dR(g, E, I, O) {
var Ot = jn(g).abs(), de = Ki(Ot.as("s")), G = Ki(Ot.as("m")), ht = Ki(Ot.as("h")), vt = Ki(Ot.as("d")), Mt = Ki(Ot.as("M")), Vt = Ki(Ot.as("w")), Ot = Ki(Ot.as("y")), de = (de <= I.ss ? ["s", de] : de < I.s && ["ss", de]) || G <= 1 && ["m"] || G < I.m && ["mm", G] || ht <= 1 && ["h"] || ht < I.h && ["hh", ht] || vt <= 1 && ["d"] || vt < I.d && ["dd", vt];
return (de = (de = I.w != null ? de || Vt <= 1 && ["w"] || Vt < I.w && ["ww", Vt] : de) || Mt <= 1 && ["M"] || Mt < I.M && ["MM", Mt] || Ot <= 1 && ["y"] || ["yy", Ot])[2] = E, de[3] = 0 < +g, de[4] = O, function(ne, Ze, dr, $n, q0) {
return q0.relativeTime(Ze || 1, !!dr, ne, $n);
}.apply(null, de);
}
var P0 = Math.abs;
function no(g) {
return (0 < g) - (g < 0) || +g;
}
function Cu() {
if (!this.isValid())
return this.localeData().invalidDate();
var g, E, I, O, G, ht, vt, Mt = P0(this._milliseconds) / 1e3, Vt = P0(this._days), Ot = P0(this._months), de = this.asSeconds();
return de ? (g = Q(Mt / 60), E = Q(g / 60), Mt %= 60, g %= 60, I = Q(Ot / 12), Ot %= 12, O = Mt ? Mt.toFixed(3).replace(/\.?0+$/, "") : "", G = no(this._months) !== no(de) ? "-" : "", ht = no(this._days) !== no(de) ? "-" : "", vt = no(this._milliseconds) !== no(de) ? "-" : "", (de < 0 ? "-" : "") + "P" + (I ? G + I + "Y" : "") + (Ot ? G + Ot + "M" : "") + (Vt ? ht + Vt + "D" : "") + (E || g || Mt ? "T" : "") + (E ? vt + E + "H" : "") + (g ? vt + g + "M" : "") + (Mt ? vt + O + "S" : "")) : "P0D";
}
var Be = Gn.prototype;
return Be.isValid = function() {
return this._isValid;
}, Be.abs = function() {
var g = this._data;
return this._milliseconds = $i(this._milliseconds), this._days = $i(this._days), this._months = $i(this._months), g.milliseconds = $i(g.milliseconds), g.seconds = $i(g.seconds), g.minutes = $i(g.minutes), g.hours = $i(g.hours), g.months = $i(g.months), g.years = $i(g.years), this;
}, Be.add = function(g, E) {
return w_(this, g, E, 1);
}, Be.subtract = function(g, E) {
return w_(this, g, E, -1);
}, Be.as = function(g) {
if (!this.isValid())
return NaN;
var E, I, O = this._milliseconds;
if ((g = tt(g)) === "month" || g === "quarter" || g === "year")
switch (E = this._days + O / 864e5, I = this._months + E_(E), g) {
case "month":
return I;
case "quarter":
return I / 3;
case "year":
return I / 12;
}
else
switch (E = this._days + Math.round(F0(this._months)), g) {
case "week":
return E / 7 + O / 6048e5;
case "day":
return E + O / 864e5;
case "hour":
return 24 * E + O / 36e5;
case "minute":
return 1440 * E + O / 6e4;
case "second":
return 86400 * E + O / 1e3;
case "millisecond":
return Math.floor(864e5 * E) + O;
default:
throw new Error("Unknown unit " + g);
}
}, Be.asMilliseconds = Rt, Be.asSeconds = et, Be.asMinutes = re, Be.asHours = Lt, Be.asDays = It, Be.asWeeks = Xe, Be.asMonths = Tt, Be.asQuarters = hs, Be.asYears = Ta, Be.valueOf = function() {
return this.isValid() ? this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * q(this._months / 12) : NaN;
}, Be._bubble = function() {
var g = this._milliseconds, E = this._days, I = this._months, O = this._data;
return 0 <= g && 0 <= E && 0 <= I || g <= 0 && E <= 0 && I <= 0 || (g += 864e5 * T_(F0(I) + E), I = E = 0), O.milliseconds = g % 1e3, g = Q(g / 1e3), O.seconds = g % 60, g = Q(g / 60), O.minutes = g % 60, g = Q(g / 60), O.hours = g % 24, E += Q(g / 24), I += g = Q(E_(E)), E -= T_(F0(g)), g = Q(I / 12), I %= 12, O.days = E, O.months = I, O.years = g, this;
}, Be.clone = function() {
return jn(this);
}, Be.get = function(g) {
return g = tt(g), this.isValid() ? this[g + "s"]() : NaN;
}, Be.milliseconds = Ea, Be.seconds = Ca, Be.minutes = Eu, Be.hours = fe, Be.days = uR, Be.weeks = function() {
return Q(this.days() / 7);
}, Be.months = hR, Be.years = fR, Be.humanize = function(g, E) {
if (!this.isValid())
return this.localeData().invalidDate();
var I = !1, O = ro;
return typeof g == "object" && (E = g, g = !1), typeof g == "boolean" && (I = g), typeof E == "object" && (O = Object.assign({}, ro, E), E.s != null && E.ss == null && (O.ss = E.s - 1)), g = this.localeData(), E = dR(this, !I, O, g), I && (E = g.pastFuture(+this, E)), g.postformat(E);
}, Be.toISOString = Cu, Be.toString = Cu, Be.toJSON = Cu, Be.locale = g_, Be.localeData = y_, Be.toIsoString = R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", Cu), Be.lang = st, Y("X", 0, 0, "unix"), Y("x", 0, 0, "valueOf"), ft("x", pt), ft("X", /[+-]?\d+(\.\d{1,3})?/), Qt("X", function(g, E, I) {
I._d = new Date(1e3 * parseFloat(g));
}), Qt("x", function(g, E, I) {
I._d = new Date(q(g));
}), n.version = "2.29.4", r = De, n.fn = P, n.min = function() {
return jr("isBefore", [].slice.call(arguments, 0));
}, n.max = function() {
return jr("isAfter", [].slice.call(arguments, 0));
}, n.now = function() {
return Date.now ? Date.now() : +new Date();
}, n.utc = p, n.unix = function(g) {
return De(1e3 * g);
}, n.months = function(g, E) {
return k_(g, E, "months");
}, n.isDate = h, n.locale = Xt, n.invalid = y, n.duration = jn, n.isMoment = M, n.weekdays = function(g, E, I) {
return O0(g, E, I, "weekdays");
}, n.parseZone = function() {
return De.apply(null, arguments).parseZone();
}, n.localeData = ce, n.isDuration = ji, n.monthsShort = function(g, E) {
return k_(g, E, "monthsShort");
}, n.weekdaysMin = function(g, E, I) {
return O0(g, E, I, "weekdaysMin");
}, n.defineLocale = te, n.updateLocale = function(g, E) {
var I, O;
return E != null ? (O = Hi, Ee[g] != null && Ee[g].parentLocale != null ? Ee[g].set(B(Ee[g]._config, E)) : (E = B(O = (I = xn(g)) != null ? I._config : O, E), I == null && (E.abbr = g), (O = new w(E)).parentLocale = Ee[g], Ee[g] = O), Xt(g)) : Ee[g] != null && (Ee[g].parentLocale != null ? (Ee[g] = Ee[g].parentLocale, g === Xt() && Xt(g)) : Ee[g] != null && delete Ee[g]), Ee[g];
}, n.locales = function() {
return D(Ee);
}, n.weekdaysShort = function(g, E, I) {
return O0(g, E, I, "weekdaysShort");
}, n.normalizeUnits = tt, n.relativeTimeRounding = function(g) {
return g === void 0 ? Ki : typeof g == "function" && (Ki = g, !0);
}, n.relativeTimeThreshold = function(g, E) {
return ro[g] !== void 0 && (E === void 0 ? ro[g] : (ro[g] = E, g === "s" && (ro.ss = E - 1), !0));
}, n.calendarFormat = function(g, E) {
return (g = g.diff(E, "days", !0)) < -6 ? "sameElse" : g < -1 ? "lastWeek" : g < 0 ? "lastDay" : g < 1 ? "sameDay" : g < 2 ? "nextDay" : g < 7 ? "nextWeek" : "sameElse";
}, n.prototype = P, n.HTML5_FMT = { DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", DATE: "YYYY-MM-DD", TIME: "HH:mm", TIME_SECONDS: "HH:mm:ss", TIME_MS: "HH:mm:ss.SSS", WEEK: "GGGG-[W]WW", MONTH: "YYYY-MM" }, n;
});
})(vw);
const si = vw.exports, Zi = {
trace: 0,
debug: 1,
info: 2,
warn: 3,
error: 4,
fatal: 5
}, H = {
trace: (...t) => {
},
debug: (...t) => {
},
info: (...t) => {
},
warn: (...t) => {
},
error: (...t) => {
},
fatal: (...t) => {
}
}, Ob = function(t = "fatal") {
let e = Zi.fatal;
typeof t == "string" ? (t = t.toLowerCase(), t in Zi && (e = Zi[t])) : typeof t == "number" && (e = t), H.trace = () => {
}, H.debug = () => {
}, H.info = () => {
}, H.warn = () => {
}, H.error = () => {
}, H.fatal = () => {
}, e <= Zi.fatal && (H.fatal = console.error ? console.error.bind(console, Ln("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", Ln("FATAL"))), e <= Zi.error && (H.error = console.error ? console.error.bind(console, Ln("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", Ln("ERROR"))), e <= Zi.warn && (H.warn = console.warn ? console.warn.bind(console, Ln("WARN"), "color: orange") : console.log.bind(console, "\x1B[33m", Ln("WARN"))), e <= Zi.info && (H.info = console.info ? console.info.bind(console, Ln("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", Ln("INFO"))), e <= Zi.debug && (H.debug = console.debug ? console.debug.bind(console, Ln("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Ln("DEBUG"))), e <= Zi.trace && (H.trace = console.debug ? console.debug.bind(console, Ln("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Ln("TRACE")));
}, Ln = (t) => `%c${si().format("ss.SSS")} : ${t} : `;
var Fb = {};
Object.defineProperty(Fb, "__esModule", { value: !0 });
var Vi = Fb.sanitizeUrl = void 0, mR = /^([^\w]*)(javascript|data|vbscript)/im, bR = /(\w+)(^\w|;)?/g, _R = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, vR = /^([^:]+):/gm, xR = [".", "/"];
function kR(t) {
return xR.indexOf(t[0]) > -1;
}
function wR(t) {
return t.replace(bR, function(e, r) {
return String.fromCharCode(r);
});
}
function TR(t) {
var e = wR(t || "").replace(_R, "").trim();
if (!e)
return "about:blank";
if (kR(e))
return e;
var r = e.match(vR);
if (!r)
return e;
var n = r[0];
return mR.test(n) ? "about:blank" : e;
}
Vi = Fb.sanitizeUrl = TR;
function tr(t, e) {
return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
function xw(t, e) {
return t == null || e == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function s1(t) {
let e, r, n;
t.length !== 2 ? (e = tr, r = (o, l) => tr(t(o), l), n = (o, l) => t(o) - l) : (e = t === tr || t === xw ? t : ER, r = t, n = t);
function i(o, l, u = 0, h = o.length) {
if (u < h) {
if (e(l, l) !== 0)
return h;
do {
const d = u + h >>> 1;
r(o[d], l) < 0 ? u = d + 1 : h = d;
} while (u < h);
}
return u;
}
function a(o, l, u = 0, h = o.length) {
if (u < h) {
if (e(l, l) !== 0)
return h;
do {
const d = u + h >>> 1;
r(o[d], l) <= 0 ? u = d + 1 : h = d;
} while (u < h);
}
return u;
}
function s(o, l, u = 0, h = o.length) {
const d = i(o, l, u, h - 1);
return d > u && n(o[d - 1], l) > -n(o[d], l) ? d - 1 : d;
}
return { left: i, center: s, right: a };
}
function ER() {
return 0;
}
function kw(t) {
return t === null ? NaN : +t;
}
function* ww(t, e) {
if (e === void 0)
for (let r of t)
r != null && (r = +r) >= r && (yield r);
else {
let r = -1;
for (let n of t)
(n = e(n, ++r, t)) != null && (n = +n) >= n && (yield n);
}
}
const Tw = s1(tr), Ew = Tw.right, CR = Tw.left, SR = s1(kw).center, Us = Ew;
function AR(t, e) {
if (!((e = +e) >= 0))
throw new RangeError("invalid r");
let r = t.length;
if (!((r = Math.floor(r)) >= 0))
throw new RangeError("invalid length");
if (!r || !e)
return t;
const n = Pb(e), i = t.slice();
return n(t, i, 0, r, 1), n(i, t, 0, r, 1), n(t, i, 0, r, 1), t;
}
const Cw = Sw(Pb), MR = Sw(LR);
function Sw(t) {
return function(e, r, n = r) {
if (!((r = +r) >= 0))
throw new RangeError("invalid rx");
if (!((n = +n) >= 0))
throw new RangeError("invalid ry");
let { data: i, width: a, height: s } = e;
if (!((a = Math.floor(a)) >= 0))
throw new RangeError("invalid width");
if (!((s = Math.floor(s !== void 0 ? s : i.length / a)) >= 0))
throw new RangeError("invalid height");
if (!a || !s || !r && !n)
return e;
const o = r && t(r), l = n && t(n), u = i.slice();
return o && l ? (ao(o, u, i, a, s), ao(o, i, u, a, s), ao(o, u, i, a, s), so(l, i, u, a, s), so(l, u, i, a, s), so(l, i, u, a, s)) : o ? (ao(o, i, u, a, s), ao(o, u, i, a, s), ao(o, i, u, a, s)) : l && (so(l, i, u, a, s), so(l, u, i, a, s), so(l, i, u, a, s)), e;
};
}
function ao(t, e, r, n, i) {
for (let a = 0, s = n * i; a < s; )
t(e, r, a, a += n, 1);
}
function so(t, e, r, n, i) {
for (let a = 0, s = n * i; a < n; ++a)
t(e, r, a, a + s, n);
}
function LR(t) {
const e = Pb(t);
return (r, n, i, a, s) => {
i <<= 2, a <<= 2, s <<= 2, e(r, n, i + 0, a + 0, s), e(r, n, i + 1, a + 1, s), e(r, n, i + 2, a + 2, s), e(r, n, i + 3, a + 3, s);
};
}
function Pb(t) {
const e = Math.floor(t);
if (e === t)
return RR(t);
const r = t - e, n = 2 * t + 1;
return (i, a, s, o, l) => {
if (!((o -= l) >= s))
return;
let u = e * a[s];
const h = l * e, d = h + l;
for (let f = s, p = s + h; f < p; f += l)
u += a[Math.min(o, f)];
for (let f = s, p = o; f <= p; f += l)
u += a[Math.min(o, f + h)], i[f] = (u + r * (a[Math.max(s, f - d)] + a[Math.min(o, f + d)])) / n, u -= a[Math.max(s, f - h)];
};
}
function RR(t) {
const e = 2 * t + 1;
return (r, n, i, a, s) => {
if (!((a -= s) >= i))
return;
let o = t * n[i];
const l = s * t;
for (let u = i, h = i + l; u < h; u += s)
o += n[Math.min(a, u)];
for (let u = i, h = a; u <= h; u += s)
o += n[Math.min(a, u + l)], r[u] = o / e, o -= n[Math.max(i, u - l)];
};
}
function o1(t, e) {
let r = 0;
if (e === void 0)
for (let n of t)
n != null && (n = +n) >= n && ++r;
else {
let n = -1;
for (let i of t)
(i = e(i, ++n, t)) != null && (i = +i) >= i && ++r;
}
return r;
}
function IR(t) {
return t.length | 0;
}
function NR(t) {
return !(t > 0);
}
function BR(t) {
return typeof t != "object" || "length" in t ? t : Array.from(t);
}
function DR(t) {
return (e) => t(...e);
}
function OR(...t) {
const e = typeof t[t.length - 1] == "function" && DR(t.pop());
t = t.map(BR);
const r = t.map(IR), n = t.length - 1, i = new Array(n + 1).fill(0), a = [];
if (n < 0 || r.some(NR))
return a;
for (; ; ) {
a.push(i.map((o, l) => t[l][o]));
let s = n;
for (; ++i[s] === r[s]; ) {
if (s === 0)
return e ? a.map(e) : a;
i[s--] = 0;
}
}
}
function FR(t, e) {
var r = 0, n = 0;
return Float64Array.from(t, e === void 0 ? (i) => r += +i || 0 : (i) => r += +e(i, n++, t) || 0);
}
function Aw(t, e) {
let r = 0, n, i = 0, a = 0;
if (e === void 0)
for (let s of t)
s != null && (s = +s) >= s && (n = s - i, i += n / ++r, a += n * (s - i));
else {
let s = -1;
for (let o of t)
(o = e(o, ++s, t)) != null && (o = +o) >= o && (n = o - i, i += n / ++r, a += n * (o - i));
}
if (r > 1)
return a / (r - 1);
}
function Mw(t, e) {
const r = Aw(t, e);
return r && Math.sqrt(r);
}
function Zl(t, e) {
let r, n;
if (e === void 0)
for (const i of t)
i != null && (r === void 0 ? i >= i && (r = n = i) : (r > i && (r = i), n < i && (n = i)));
else {
let i = -1;
for (let a of t)
(a = e(a, ++i, t)) != null && (r === void 0 ? a >= a && (r = n = a) : (r > a && (r = a), n < a && (n = a)));
}
return [r, n];
}
class wr {
constructor() {
this._partials = new Float64Array(32), this._n = 0;
}
add(e) {
const r = this._partials;
let n = 0;
for (let i = 0; i < this._n && i < 32; i++) {
const a = r[i], s = e + a, o = Math.abs(e) < Math.abs(a) ? e - (s - a) : a - (s - e);
o && (r[n++] = o), e = s;
}
return r[n] = e, this._n = n + 1, this;
}
valueOf() {
const e = this._partials;
let r = this._n, n, i, a, s = 0;
if (r > 0) {
for (s = e[--r]; r > 0 && (n = s, i = e[--r], s = n + i, a = i - (s - n), !a); )
;
r > 0 && (a < 0 && e[r - 1] < 0 || a > 0 && e[r - 1] > 0) && (i = a * 2, n = s + i, i == n - s && (s = n));
}
return s;
}
}
function PR(t, e) {
const r = new wr();
if (e === void 0)
for (let n of t)
(n = +n) && r.add(n);
else {
let n = -1;
for (let i of t)
(i = +e(i, ++n, t)) && r.add(i);
}
return +r;
}
function qR(t, e) {
const r = new wr();
let n = -1;
return Float64Array.from(
t,
e === void 0 ? (i) => r.add(+i || 0) : (i) => r.add(+e(i, ++n, t) || 0)
);
}
class fc extends Map {
constructor(e, r = Iw) {
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), e != null)
for (const [n, i] of e)
this.set(n, i);
}
get(e) {
return super.get(im(this, e));
}
has(e) {
return super.has(im(this, e));
}
set(e, r) {
return super.set(Lw(this, e), r);
}
delete(e) {
return super.delete(Rw(this, e));
}
}
class Ss extends Set {
constructor(e, r = Iw) {
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), e != null)
for (const n of e)
this.add(n);
}
has(e) {
return super.has(im(this, e));
}
add(e) {
return super.add(Lw(this, e));
}
delete(e) {
return super.delete(Rw(this, e));
}
}
function im({ _intern: t, _key: e }, r) {
const n = e(r);
return t.has(n) ? t.get(n) : r;
}
function Lw({ _intern: t, _key: e }, r) {
const n = e(r);
return t.has(n) ? t.get(n) : (t.set(n, r), r);
}
function Rw({ _intern: t, _key: e }, r) {
const n = e(r);
return t.has(n) && (r = t.get(n), t.delete(n)), r;
}
function Iw(t) {
return t !== null && typeof t == "object" ? t.valueOf() : t;
}
function Lo(t) {
return t;
}
function Nw(t, ...e) {
return nl(t, Lo, Lo, e);
}
function Bw(t, ...e) {
return nl(t, Array.from, Lo, e);
}
function Dw(t, e) {
for (let r = 1, n = e.length; r < n; ++r)
t = t.flatMap((i) => i.pop().map(([a, s]) => [...i, a, s]));
return t;
}
function VR(t, ...e) {
return Dw(Bw(t, ...e), e);
}
function zR(t, e, ...r) {
return Dw(Fw(t, e, ...r), r);
}
function Ow(t, e, ...r) {
return nl(t, Lo, e, r);
}
function Fw(t, e, ...r) {
return nl(t, Array.from, e, r);
}
function YR(t, ...e) {
return nl(t, Lo, Pw, e);
}
function UR(t, ...e) {
return nl(t, Array.from, Pw, e);
}
function Pw(t) {
if (t.length !== 1)
throw new Error("duplicate key");
return t[0];
}
function nl(t, e, r, n) {
return function i(a, s) {
if (s >= n.length)
return r(a);
const o = new fc(), l = n[s++];
let u = -1;
for (const h of a) {
const d = l(h, ++u, a), f = o.get(d);
f ? f.push(h) : o.set(d, [h]);
}
for (const [h, d] of o)
o.set(h, i(d, s));
return e(o);
}(t, 0);
}
function qw(t, e) {
return Array.from(e, (r) => t[r]);
}
function am(t, ...e) {
if (typeof t[Symbol.iterator] != "function")
throw new TypeError("values is not iterable");
t = Array.from(t);
let [r] = e;
if (r && r.length !== 2 || e.length > 1) {
const n = Uint32Array.from(t, (i, a) => a);
return e.length > 1 ? (e = e.map((i) => t.map(i)), n.sort((i, a) => {
for (const s of e) {
const o = Ro(s[i], s[a]);
if (o)
return o;
}
})) : (r = t.map(r), n.sort((i, a) => Ro(r[i], r[a]))), qw(t, n);
}
return t.sort(qb(r));
}
function qb(t = tr) {
if (t === tr)
return Ro;
if (typeof t != "function")
throw new TypeError("compare is not a function");
return (e, r) => {
const n = t(e, r);
return n || n === 0 ? n : (t(r, r) === 0) - (t(e, e) === 0);
};
}
function Ro(t, e) {
return (t == null || !(t >= t)) - (e == null || !(e >= e)) || (t < e ? -1 : t > e ? 1 : 0);
}
function WR(t, e, r) {
return (e.length !== 2 ? am(Ow(t, e, r), ([n, i], [a, s]) => tr(i, s) || tr(n, a)) : am(Nw(t, r), ([n, i], [a, s]) => e(i, s) || tr(n, a))).map(([n]) => n);
}
var HR = Array.prototype, GR = HR.slice;
function Su(t) {
return () => t;
}
var sm = Math.sqrt(50), om = Math.sqrt(10), lm = Math.sqrt(2);
function As(t, e, r) {
var n, i = -1, a, s, o;
if (e = +e, t = +t, r = +r, t === e && r > 0)
return [t];
if ((n = e < t) && (a = t, t = e, e = a), (o = Io(t, e, r)) === 0 || !isFinite(o))
return [];
if (o > 0) {
let l = Math.round(t / o), u = Math.round(e / o);
for (l * o < t && ++l, u * o > e && --u, s = new Array(a = u - l + 1); ++i < a; )
s[i] = (l + i) * o;
} else {
o = -o;
let l = Math.round(t * o), u = Math.round(e * o);
for (l / o < t && ++l, u / o > e && --u, s = new Array(a = u - l + 1); ++i < a; )
s[i] = (l + i) / o;
}
return n && s.reverse(), s;
}
function Io(t, e, r) {
var n = (e - t) / Math.max(0, r), i = Math.floor(Math.log(n) / Math.LN10), a = n / Math.pow(10, i);
return i >= 0 ? (a >= sm ? 10 : a >= om ? 5 : a >= lm ? 2 : 1) * Math.pow(10, i) : -Math.pow(10, -i) / (a >= sm ? 10 : a >= om ? 5 : a >= lm ? 2 : 1);
}
function dc(t, e, r) {
var n = Math.abs(e - t) / Math.max(0, r), i = Math.pow(10, Math.floor(Math.log(n) / Math.LN10)), a = n / i;
return a >= sm ? i *= 10 : a >= om ? i *= 5 : a >= lm && (i *= 2), e < t ? -i : i;
}
function Vw(t, e, r) {
let n;
for (; ; ) {
const i = Io(t, e, r);
if (i === n || i === 0 || !isFinite(i))
return [t, e];
i > 0 ? (t = Math.floor(t / i) * i, e = Math.ceil(e / i) * i) : i < 0 && (t = Math.ceil(t * i) / i, e = Math.floor(e * i) / i), n = i;
}
}
function Vb(t) {
return Math.ceil(Math.log(o1(t)) / Math.LN2) + 1;
}
function C_() {
var t = Lo, e = Zl, r = Vb;
function n(i) {
Array.isArray(i) || (i = Array.from(i));
var a, s = i.length, o, l, u = new Array(s);
for (a = 0; a < s; ++a)
u[a] = t(i[a], a, i);
var h = e(u), d = h[0], f = h[1], p = r(u, d, f);
if (!Array.isArray(p)) {
const b = f, x = +p;
if (e === Zl && ([d, f] = Vw(d, f, x)), p = As(d, f, x), p[0] <= d && (l = Io(d, f, x)), p[p.length - 1] >= f)
if (b >= f && e === Zl) {
const k = Io(d, f, x);
isFinite(k) && (k > 0 ? f = (Math.floor(f / k) + 1) * k : k < 0 && (f = (Math.ceil(f * -k) + 1) / -k));
} else
p.pop();
}
for (var m = p.length; p[0] <= d; )
p.shift(), --m;
for (; p[m - 1] > f; )
p.pop(), --m;
var _ = new Array(m + 1), y;
for (a = 0; a <= m; ++a)
y = _[a] = [], y.x0 = a > 0 ? p[a - 1] : d, y.x1 = a < m ? p[a] : f;
if (isFinite(l)) {
if (l > 0)
for (a = 0; a < s; ++a)
(o = u[a]) != null && d <= o && o <= f && _[Math.min(m, Math.floor((o - d) / l))].push(i[a]);
else if (l < 0) {
for (a = 0; a < s; ++a)
if ((o = u[a]) != null && d <= o && o <= f) {
const b = Math.floor((d - o) * l);
_[Math.min(m, b + (p[b] <= o))].push(i[a]);
}
}
} else
for (a = 0; a < s; ++a)
(o = u[a]) != null && d <= o && o <= f && _[Us(p, o, 0, m)].push(i[a]);
return _;
}
return n.value = function(i) {
return arguments.length ? (t = typeof i == "function" ? i : Su(i), n) : t;
}, n.domain = function(i) {
return arguments.length ? (e = typeof i == "function" ? i : Su([i[0], i[1]]), n) : e;
}, n.thresholds = function(i) {
return arguments.length ? (r = typeof i == "function" ? i : Array.isArray(i) ? Su(GR.call(i)) : Su(i), n) : r;
}, n;
}
function No(t, e) {
let r;
if (e === void 0)
for (const n of t)
n != null && (r < n || r === void 0 && n >= n) && (r = n);
else {
let n = -1;
for (let i of t)
(i = e(i, ++n, t)) != null && (r < i || r === void 0 && i >= i) && (r = i);
}
return r;
}
function zb(t, e) {
let r, n = -1, i = -1;
if (e === void 0)
for (const a of t)
++i, a != null && (r < a || r === void 0 && a >= a) && (r = a, n = i);
else
for (let a of t)
(a = e(a, ++i, t)) != null && (r < a || r === void 0 && a >= a) && (r = a, n = i);
return n;
}
function pc(t, e) {
let r;
if (e === void 0)
for (const n of t)
n != null && (r > n || r === void 0 && n >= n) && (r = n);
else {
let n = -1;
for (let i of t)
(i = e(i, ++n, t)) != null && (r > i || r === void 0 && i >= i) && (r = i);
}
return r;
}
function Yb(t, e) {
let r, n = -1, i = -1;
if (e === void 0)
for (const a of t)
++i, a != null && (r > a || r === void 0 && a >= a) && (r = a, n = i);
else
for (let a of t)
(a = e(a, ++i, t)) != null && (r > a || r === void 0 && a >= a) && (r = a, n = i);
return n;
}
function l1(t, e, r = 0, n = t.length - 1, i) {
for (i = i === void 0 ? Ro : qb(i); n > r; ) {
if (n - r > 600) {
const l = n - r + 1, u = e - r + 1, h = Math.log(l), d = 0.5 * Math.exp(2 * h / 3), f = 0.5 * Math.sqrt(h * d * (l - d) / l) * (u - l / 2 < 0 ? -1 : 1), p = Math.max(r, Math.floor(e - u * d / l + f)), m = Math.min(n, Math.floor(e + (l - u) * d / l + f));
l1(t, e, p, m, i);
}
const a = t[e];
let s = r, o = n;
for (xl(t, r, e), i(t[n], a) > 0 && xl(t, r, n); s < o; ) {
for (xl(t, s, o), ++s, --o; i(t[s], a) < 0; )
++s;
for (; i(t[o], a) > 0; )
--o;
}
i(t[r], a) === 0 ? xl(t, r, o) : (++o, xl(t, o, n)), o <= e && (r = o + 1), e <= o && (n = o - 1);
}
return t;
}
function xl(t, e, r) {
const n = t[e];
t[e] = t[r], t[r] = n;
}
function zw(t, e = tr) {
let r, n = !1;
if (e.length === 1) {
let i;
for (const a of t) {
const s = e(a);
(n ? tr(s, i) > 0 : tr(s, s) === 0) && (r = a, i = s, n = !0);
}
} else
for (const i of t)
(n ? e(i, r) > 0 : e(i, i) === 0) && (r = i, n = !0);
return r;
}
function gc(t, e, r) {
if (t = Float64Array.from(ww(t, r)), !!(n = t.length)) {
if ((e = +e) <= 0 || n < 2)
return pc(t);
if (e >= 1)
return No(t);
var n, i = (n - 1) * e, a = Math.floor(i), s = No(l1(t, a).subarray(0, a + 1)), o = pc(t.subarray(a + 1));
return s + (o - s) * (i - a);
}
}
function Yw(t, e, r = kw) {
if (!!(n = t.length)) {
if ((e = +e) <= 0 || n < 2)
return +r(t[0], 0, t);
if (e >= 1)
return +r(t[n - 1], n - 1, t);
var n, i = (n - 1) * e, a = Math.floor(i), s = +r(t[a], a, t), o = +r(t[a + 1], a + 1, t);
return s + (o - s) * (i - a);
}
}
function Uw(t, e, r) {
if (t = Float64Array.from(ww(t, r)), !!(n = t.length)) {
if ((e = +e) <= 0 || n < 2)
return Yb(t);
if (e >= 1)
return zb(t);
var n, i = Math.floor((n - 1) * e), a = (o, l) => Ro(t[o], t[l]), s = l1(Uint32Array.from(t, (o, l) => l), i, 0, n - 1, a);
return zw(s.subarray(0, i + 1), (o) => t[o]);
}
}
function jR(t, e, r) {
return Math.ceil((r - e) / (2 * (gc(t, 0.75) - gc(t, 0.25)) * Math.pow(o1(t), -1 / 3)));
}
function $R(t, e, r) {
return Math.ceil((r - e) * Math.cbrt(o1(t)) / (3.49 * Mw(t)));
}
function XR(t, e) {
let r = 0, n = 0;
if (e === void 0)
for (let i of t)
i != null && (i = +i) >= i && (++r, n += i);
else {
let i = -1;
for (let a of t)
(a = e(a, ++i, t)) != null && (a = +a) >= a && (++r, n += a);
}
if (r)
return n / r;
}
function KR(t, e) {
return gc(t, 0.5, e);
}
function ZR(t, e) {
return Uw(t, 0.5, e);
}
function* QR(t) {
for (const e of t)
yield* e;
}
function Ub(t) {
return Array.from(QR(t));
}
function JR(t, e) {
const r = new fc();
if (e === void 0)
for (let a of t)
a != null && a >= a && r.set(a, (r.get(a) || 0) + 1);
else {
let a = -1;
for (let s of t)
(s = e(s, ++a, t)) != null && s >= s && r.set(s, (r.get(s) || 0) + 1);
}
let n, i = 0;
for (const [a, s] of r)
s > i && (i = s, n = a);
return n;
}
function tI(t, e = eI) {
const r = [];
let n, i = !1;
for (const a of t)
i && r.push(e(n, a)), n = a, i = !0;
return r;
}
function eI(t, e) {
return [t, e];
}
function Da(t, e, r) {
t = +t, e = +e, r = (i = arguments.length) < 2 ? (e = t, t = 0, 1) : i < 3 ? 1 : +r;
for (var n = -1, i = Math.max(0, Math.ceil((e - t) / r)) | 0, a = new Array(i); ++n < i; )
a[n] = t + n * r;
return a;
}
function rI(t, e = tr) {
if (typeof t[Symbol.iterator] != "function")
throw new TypeError("values is not iterable");
let r = Array.from(t);
const n = new Float64Array(r.length);
e.length !== 2 && (r = r.map(e), e = tr);
const i = (o, l) => e(r[o], r[l]);
let a, s;
return Uint32Array.from(r, (o, l) => l).sort(e === tr ? (o, l) => Ro(r[o], r[l]) : qb(i)).forEach((o, l) => {
const u = i(o, a === void 0 ? o : a);
u >= 0 ? ((a === void 0 || u > 0) && (a = o, s = l), n[o] = s) : n[o] = NaN;
}), n;
}
function nI(t, e = tr) {
let r, n = !1;
if (e.length === 1) {
let i;
for (const a of t) {
const s = e(a);
(n ? tr(s, i) < 0 : tr(s, s) === 0) && (r = a, i = s, n = !0);
}
} else
for (const i of t)
(n ? e(i, r) < 0 : e(i, i) === 0) && (r = i, n = !0);
return r;
}
function Ww(t, e = tr) {
if (e.length === 1)
return Yb(t, e);
let r, n = -1, i = -1;
for (const a of t)
++i, (n < 0 ? e(a, a) === 0 : e(a, r) < 0) && (r = a, n = i);
return n;
}
function iI(t, e = tr) {
if (e.length === 1)
return zb(t, e);
let r, n = -1, i = -1;
for (const a of t)
++i, (n < 0 ? e(a, a) === 0 : e(a, r) > 0) && (r = a, n = i);
return n;
}
function aI(t, e) {
const r = Ww(t, e);
return r < 0 ? void 0 : r;
}
const sI = Hw(Math.random);
function Hw(t) {
return function(r, n = 0, i = r.length) {
let a = i - (n = +n);
for (; a; ) {
const s = t() * a-- | 0, o = r[a + n];
r[a + n] = r[s + n], r[s + n] = o;
}
return r;
};
}
function oI(t, e) {
let r = 0;
if (e === void 0)
for (let n of t)
(n = +n) && (r += n);
else {
let n = -1;
for (let i of t)
(i = +e(i, ++n, t)) && (r += i);
}
return r;
}
function Gw(t) {
if (!(a = t.length))
return [];
for (var e = -1, r = pc(t, lI), n = new Array(r); ++e < r; )
for (var i = -1, a, s = n[e] = new Array(a); ++i < a; )
s[i] = t[i][e];
return n;
}
function lI(t) {
return t.length;
}
function cI() {
return Gw(arguments);
}
function uI(t, e) {
if (typeof e != "function")
throw new TypeError("test is not a function");
let r = -1;
for (const n of t)
if (!e(n, ++r, t))
return !1;
return !0;
}
function hI(t, e) {
if (typeof e != "function")
throw new TypeError("test is not a function");
let r = -1;
for (const n of t)
if (e(n, ++r, t))
return !0;
return !1;
}
function fI(t, e) {
if (typeof e != "function")
throw new TypeError("test is not a function");
const r = [];
let n = -1;
for (const i of t)
e(i, ++n, t) && r.push(i);
return r;
}
function dI(t, e) {
if (typeof t[Symbol.iterator] != "function")
throw new TypeError("values is not iterable");
if (typeof e != "function")
throw new TypeError("mapper is not a function");
return Array.from(t, (r, n) => e(r, n, t));
}
function pI(t, e, r) {
if (typeof e != "function")
throw new TypeError("reducer is not a function");
const n = t[Symbol.iterator]();
let i, a, s = -1;
if (arguments.length < 3) {
if ({ done: i, value: r } = n.next(), i)
return;
++s;
}
for (; { done: i, value: a } = n.next(), !i; )
r = e(r, a, ++s, t);
return r;
}
function gI(t) {
if (typeof t[Symbol.iterator] != "function")
throw new TypeError("values is not iterable");
return Array.from(t).reverse();
}
function yI(t, ...e) {
t = new Ss(t);
for (const r of e)
for (const n of r)
t.delete(n);
return t;
}
function mI(t, e) {
const r = e[Symbol.iterator](), n = new Ss();
for (const i of t) {
if (n.has(i))
return !1;
let a, s;
for (; ({ value: a, done: s } = r.next()) && !s; ) {
if (Object.is(i, a))
return !1;
n.add(a);
}
}
return !0;
}
function bI(t, ...e) {
t = new Ss(t), e = e.map(_I);
t:
for (const r of t)
for (const n of e)
if (!n.has(r)) {
t.delete(r);
continue t;
}
return t;
}
function _I(t) {
return t instanceof Ss ? t : new Ss(t);
}
function jw(t, e) {
const r = t[Symbol.iterator](), n = /* @__PURE__ */ new Set();
for (const i of e) {
const a = S_(i);
if (n.has(a))
continue;
let s, o;
for (; { value: s, done: o } = r.next(); ) {
if (o)
return !1;
const l = S_(s);
if (n.add(l), Object.is(a, l))
break;
}
}
return !0;
}
function S_(t) {
return t !== null && typeof t == "object" ? t.valueOf() : t;
}
function vI(t, e) {
return jw(e, t);
}
function xI(...t) {
const e = new Ss();
for (const r of t)
for (const n of r)
e.add(n);
return e;
}
function kI(t) {
return t;
}
var hh = 1, fh = 2, cm = 3, Fl = 4, A_ = 1e-6;
function wI(t) {
return "translate(" + t + ",0)";
}
function TI(t) {
return "translate(0," + t + ")";
}
function EI(t) {
return (e) => +t(e);
}
function CI(t, e) {
return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (r) => +t(r) + e;
}
function SI() {
return !this.__axis;
}
function c1(t, e) {
var r = [], n = null, i = null, a = 6, s = 6, o = 3, l = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = t === hh || t === Fl ? -1 : 1, h = t === Fl || t === fh ? "x" : "y", d = t === hh || t === cm ? wI : TI;
function f(p) {
var m = n == null ? e.ticks ? e.ticks.apply(e, r) : e.domain() : n, _ = i == null ? e.tickFormat ? e.tickFormat.apply(e, r) : kI : i, y = Math.max(a, 0) + o, b = e.range(), x = +b[0] + l, k = +b[b.length - 1] + l, T = (e.bandwidth ? CI : EI)(e.copy(), l), C = p.selection ? p.selection() : p, M = C.selectAll(".domain").data([null]), S = C.selectAll(".tick").data(m, e).order(), R = S.exit(), A = S.enter().append("g").attr("class", "tick"), L = S.select("line"), v = S.select("text");
M = M.merge(M.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), S = S.merge(A), L = L.merge(A.append("line").attr("stroke", "currentColor").attr(h + "2", u * a)), v = v.merge(A.append("text").attr("fill", "currentColor").attr(h, u * y).attr("dy", t === hh ? "0em" : t === cm ? "0.71em" : "0.32em")), p !== C && (M = M.transition(p), S = S.transition(p), L = L.transition(p), v = v.transition(p), R = R.transition(p).attr("opacity", A_).attr("transform", function(B) {
return isFinite(B = T(B)) ? d(B + l) : this.getAttribute("transform");
}), A.attr("opacity", A_).attr("transform", function(B) {
var w = this.parentNode.__axis;
return d((w && isFinite(w = w(B)) ? w : T(B)) + l);
})), R.remove(), M.attr("d", t === Fl || t === fh ? s ? "M" + u * s + "," + x + "H" + l + "V" + k + "H" + u * s : "M" + l + "," + x + "V" + k : s ? "M" + x + "," + u * s + "V" + l + "H" + k + "V" + u * s : "M" + x + "," + l + "H" + k), S.attr("opacity", 1).attr("transform", function(B) {
return d(T(B) + l);
}), L.attr(h + "2", u * a), v.attr(h, u * y).text(_), C.filter(SI).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === fh ? "start" : t === Fl ? "end" : "middle"), C.each(function() {
this.__axis = T;
});
}
return f.scale = function(p) {
return arguments.length ? (e = p, f) : e;
}, f.ticks = function() {
return r = Array.from(arguments), f;
}, f.tickArguments = function(p) {
return arguments.length ? (r = p == null ? [] : Array.from(p), f) : r.slice();
}, f.tickValues = function(p) {
return arguments.length ? (n = p == null ? null : Array.from(p), f) : n && n.slice();
}, f.tickFormat = function(p) {
return arguments.length ? (i = p, f) : i;
}, f.tickSize = function(p) {
return arguments.length ? (a = s = +p, f) : a;
}, f.tickSizeInner = function(p) {
return arguments.length ? (a = +p, f) : a;
}, f.tickSizeOuter = function(p) {
return arguments.length ? (s = +p, f) : s;
}, f.tickPadding = function(p) {
return arguments.length ? (o = +p, f) : o;
}, f.offset = function(p) {
return arguments.length ? (l = +p, f) : l;
}, f;
}
function $w(t) {
return c1(hh, t);
}
function AI(t) {
return c1(fh, t);
}
function Xw(t) {
return c1(cm, t);
}
function MI(t) {
return c1(Fl, t);
}
var LI = { value: () => {
} };
function Ws() {
for (var t = 0, e = arguments.length, r = {}, n; t < e; ++t) {
if (!(n = arguments[t] + "") || n in r || /[\s.]/.test(n))
throw new Error("illegal type: " + n);
r[n] = [];
}
return new dh(r);
}
function dh(t) {
this._ = t;
}
function RI(t, e) {
return t.trim().split(/^|\s+/).map(function(r) {
var n = "", i = r.indexOf(".");
if (i >= 0 && (n = r.slice(i + 1), r = r.slice(0, i)), r && !e.hasOwnProperty(r))
throw new Error("unknown type: " + r);
return { type: r, name: n };
});
}
dh.prototype = Ws.prototype = {
constructor: dh,
on: function(t, e) {
var r = this._, n = RI(t + "", r), i, a = -1, s = n.length;
if (arguments.length < 2) {
for (; ++a < s; )
if ((i = (t = n[a]).type) && (i = II(r[i], t.name)))
return i;
return;
}
if (e != null && typeof e != "function")
throw new Error("invalid callback: " + e);
for (; ++a < s; )
if (i = (t = n[a]).type)
r[i] = M_(r[i], t.name, e);
else if (e == null)
for (i in r)
r[i] = M_(r[i], t.name, null);
return this;
},
copy: function() {
var t = {}, e = this._;
for (var r in e)
t[r] = e[r].slice();
return new dh(t);
},
call: function(t, e) {
if ((i = arguments.length - 2) > 0)
for (var r = new Array(i), n = 0, i, a; n < i; ++n)
r[n] = arguments[n + 2];
if (!this._.hasOwnProperty(t))
throw new Error("unknown type: " + t);
for (a = this._[t], n = 0, i = a.length; n < i; ++n)
a[n].value.apply(e, r);
},
apply: function(t, e, r) {
if (!this._.hasOwnProperty(t))
throw new Error("unknown type: " + t);
for (var n = this._[t], i = 0, a = n.length; i < a; ++i)
n[i].value.apply(e, r);
}
};
function II(t, e) {
for (var r = 0, n = t.length, i; r < n; ++r)
if ((i = t[r]).name === e)
return i.value;
}
function M_(t, e, r) {
for (var n = 0, i = t.length; n < i; ++n)
if (t[n].name === e) {
t[n] = LI, t = t.slice(0, n).concat(t.slice(n + 1));
break;
}
return r != null && t.push({ name: e, value: r }), t;
}
var um = "http://www.w3.org/1999/xhtml";
const hm = {
svg: "http://www.w3.org/2000/svg",
xhtml: um,
xlink: "http://www.w3.org/1999/xlink",
xml: "http://www.w3.org/XML/1998/namespace",
xmlns: "http://www.w3.org/2000/xmlns/"
};
function $c(t) {
var e = t += "", r = e.indexOf(":");
return r >= 0 && (e = t.slice(0, r)) !== "xmlns" && (t = t.slice(r + 1)), hm.hasOwnProperty(e) ? { space: hm[e], local: t } : t;
}
function NI(t) {
return function() {
var e = this.ownerDocument, r = this.namespaceURI;
return r === um && e.documentElement.namespaceURI === um ? e.createElement(t) : e.createElementNS(r, t);
};
}
function BI(t) {
return function() {
return this.ownerDocument.createElementNS(t.space, t.local);
};
}
function u1(t) {
var e = $c(t);
return (e.local ? BI : NI)(e);
}
function DI() {
}
function h1(t) {
return t == null ? DI : function() {
return this.querySelector(t);
};
}
function OI(t) {
typeof t != "function" && (t = h1(t));
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
for (var a = e[i], s = a.length, o = n[i] = new Array(s), l, u, h = 0; h < s; ++h)
(l = a[h]) && (u = t.call(l, l.__data__, h, a)) && ("__data__" in l && (u.__data__ = l.__data__), o[h] = u);
return new an(n, this._parents);
}
function Kw(t) {
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
}
function FI() {
return [];
}
function Wb(t) {
return t == null ? FI : function() {
return this.querySelectorAll(t);
};
}
function PI(t) {
return function() {
return Kw(t.apply(this, arguments));
};
}
function qI(t) {
typeof t == "function" ? t = PI(t) : t = Wb(t);
for (var e = this._groups, r = e.length, n = [], i = [], a = 0; a < r; ++a)
for (var s = e[a], o = s.length, l, u = 0; u < o; ++u)
(l = s[u]) && (n.push(t.call(l, l.__data__, u, s)), i.push(l));
return new an(n, i);
}
function Hb(t) {
return function() {
return this.matches(t);
};
}
function Zw(t) {
return function(e) {
return e.matches(t);
};
}
var VI = Array.prototype.find;
function zI(t) {
return function() {
return VI.call(this.children, t);
};
}
function YI() {
return this.firstElementChild;
}
function UI(t) {
return this.select(t == null ? YI : zI(typeof t == "function" ? t : Zw(t)));
}
var WI = Array.prototype.filter;
function HI() {
return Array.from(this.children);
}
function GI(t) {
return function() {
return WI.call(this.children, t);
};
}
function jI(t) {
return this.selectAll(t == null ? HI : GI(typeof t == "function" ? t : Zw(t)));
}
function $I(t) {
typeof t != "function" && (t = Hb(t));
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
for (var a = e[i], s = a.length, o = n[i] = [], l, u = 0; u < s; ++u)
(l = a[u]) && t.call(l, l.__data__, u, a) && o.push(l);
return new an(n, this._parents);
}
function Qw(t) {
return new Array(t.length);
}
function XI() {
return new an(this._enter || this._groups.map(Qw), this._parents);
}
function qh(t, e) {
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
}
qh.prototype = {
constructor: qh,
appendChild: function(t) {
return this._parent.insertBefore(t, this._next);
},
insertBefore: function(t, e) {
return this._parent.insertBefore(t, e);
},
querySelector: function(t) {
return this._parent.querySelector(t);
},
querySelectorAll: function(t) {
return this._parent.querySelectorAll(t);
}
};
function KI(t) {
return function() {
return t;
};
}
function ZI(t, e, r, n, i, a) {
for (var s = 0, o, l = e.length, u = a.length; s < u; ++s)
(o = e[s]) ? (o.__data__ = a[s], n[s] = o) : r[s] = new qh(t, a[s]);
for (; s < l; ++s)
(o = e[s]) && (i[s] = o);
}
function QI(t, e, r, n, i, a, s) {
var o, l, u = /* @__PURE__ */ new Map(), h = e.length, d = a.length, f = new Array(h), p;
for (o = 0; o < h; ++o)
(l = e[o]) && (f[o] = p = s.call(l, l.__data__, o, e) + "", u.has(p) ? i[o] = l : u.set(p, l));
for (o = 0; o < d; ++o)
p = s.call(t, a[o], o, a) + "", (l = u.get(p)) ? (n[o] = l, l.__data__ = a[o], u.delete(p)) : r[o] = new qh(t, a[o]);
for (o = 0; o < h; ++o)
(l = e[o]) && u.get(f[o]) === l && (i[o] = l);
}
function JI(t) {
return t.__data__;
}
function tN(t, e) {
if (!arguments.length)
return Array.from(this, JI);
var r = e ? QI : ZI, n = this._parents, i = this._groups;
typeof t != "function" && (t = KI(t));
for (var a = i.length, s = new Array(a), o = new Array(a), l = new Array(a), u = 0; u < a; ++u) {
var h = n[u], d = i[u], f = d.length, p = eN(t.call(h, h && h.__data__, u, n)), m = p.length, _ = o[u] = new Array(m), y = s[u] = new Array(m), b = l[u] = new Array(f);
r(h, d, _, y, b, p, e);
for (var x = 0, k = 0, T, C; x < m; ++x)
if (T = _[x]) {
for (x >= k && (k = x + 1); !(C = y[k]) && ++k < m; )
;
T._next = C || null;
}
}
return s = new an(s, n), s._enter = o, s._exit = l, s;
}
function eN(t) {
return typeof t == "object" && "length" in t ? t : Array.from(t);
}
function rN() {
return new an(this._exit || this._groups.map(Qw), this._parents);
}
function nN(t, e, r) {
var n = this.enter(), i = this, a = this.exit();
return typeof t == "function" ? (n = t(n), n && (n = n.selection())) : n = n.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), r == null ? a.remove() : r(a), n && i ? n.merge(i).order() : i;
}
function iN(t) {
for (var e = t.selection ? t.selection() : t, r = this._groups, n = e._groups, i = r.length, a = n.length, s = Math.min(i, a), o = new Array(i), l = 0; l < s; ++l)
for (var u = r[l], h = n[l], d = u.length, f = o[l] = new Array(d), p, m = 0; m < d; ++m)
(p = u[m] || h[m]) && (f[m] = p);
for (; l < i; ++l)
o[l] = r[l];
return new an(o, this._parents);
}
function aN() {
for (var t = this._groups, e = -1, r = t.length; ++e < r; )
for (var n = t[e], i = n.length - 1, a = n[i], s; --i >= 0; )
(s = n[i]) && (a && s.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(s, a), a = s);
return this;
}
function sN(t) {
t || (t = oN);
function e(d, f) {
return d && f ? t(d.__data__, f.__data__) : !d - !f;
}
for (var r = this._groups, n = r.length, i = new Array(n), a = 0; a < n; ++a) {
for (var s = r[a], o = s.length, l = i[a] = new Array(o), u, h = 0; h < o; ++h)
(u = s[h]) && (l[h] = u);
l.sort(e);
}
return new an(i, this._parents).order();
}
function oN(t, e) {
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
function lN() {
var t = arguments[0];
return arguments[0] = this, t.apply(null, arguments), this;
}
function cN() {
return Array.from(this);
}
function uN() {
for (var t = this._groups, e = 0, r = t.length; e < r; ++e)
for (var n = t[e], i = 0, a = n.length; i < a; ++i) {
var s = n[i];
if (s)
return s;
}
return null;
}
function hN() {
let t = 0;
for (const e of this)
++t;
return t;
}
function fN() {
return !this.node();
}
function dN(t) {
for (var e = this._groups, r = 0, n = e.length; r < n; ++r)
for (var i = e[r], a = 0, s = i.length, o; a < s; ++a)
(o = i[a]) && t.call(o, o.__data__, a, i);
return this;
}
function pN(t) {
return function() {
this.removeAttribute(t);
};
}
function gN(t) {
return function() {
this.removeAttributeNS(t.space, t.local);
};
}
function yN(t, e) {
return function() {
this.setAttribute(t, e);
};
}
function mN(t, e) {
return function() {
this.setAttributeNS(t.space, t.local, e);
};
}
function bN(t, e) {
return function() {
var r = e.apply(this, arguments);
r == null ? this.removeAttribute(t) : this.setAttribute(t, r);
};
}
function _N(t, e) {
return function() {
var r = e.apply(this, arguments);
r == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, r);
};
}
function vN(t, e) {
var r = $c(t);
if (arguments.length < 2) {
var n = this.node();
return r.local ? n.getAttributeNS(r.space, r.local) : n.getAttribute(r);
}
return this.each((e == null ? r.local ? gN : pN : typeof e == "function" ? r.local ? _N : bN : r.local ? mN : yN)(r, e));
}
function Gb(t) {
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
}
function xN(t) {
return function() {
this.style.removeProperty(t);
};
}
function kN(t, e, r) {
return function() {
this.style.setProperty(t, e, r);
};
}
function wN(t, e, r) {
return function() {
var n = e.apply(this, arguments);
n == null ? this.style.removeProperty(t) : this.style.setProperty(t, n, r);
};
}
function TN(t, e, r) {
return arguments.length > 1 ? this.each((e == null ? xN : typeof e == "function" ? wN : kN)(t, e, r == null ? "" : r)) : Ms(this.node(), t);
}
function Ms(t, e) {
return t.style.getPropertyValue(e) || Gb(t).getComputedStyle(t, null).getPropertyValue(e);
}
function EN(t) {
return function() {
delete this[t];
};
}
function CN(t, e) {
return function() {
this[t] = e;
};
}
function SN(t, e) {
return function() {
var r = e.apply(this, arguments);
r == null ? delete this[t] : this[t] = r;
};
}
function AN(t, e) {
return arguments.length > 1 ? this.each((e == null ? EN : typeof e == "function" ? SN : CN)(t, e)) : this.node()[t];
}
function Jw(t) {
return t.trim().split(/^|\s+/);
}
function jb(t) {
return t.classList || new t9(t);
}
function t9(t) {
this._node = t, this._names = Jw(t.getAttribute("class") || "");
}
t9.prototype = {
add: function(t) {
var e = this._names.indexOf(t);
e < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" ")));
},
remove: function(t) {
var e = this._names.indexOf(t);
e >= 0 && (this._names.splice(e, 1), this._node.setAttribute("class", this._names.join(" ")));
},
contains: function(t) {
return this._names.indexOf(t) >= 0;
}
};
function e9(t, e) {
for (var r = jb(t), n = -1, i = e.length; ++n < i; )
r.add(e[n]);
}
function r9(t, e) {
for (var r = jb(t), n = -1, i = e.length; ++n < i; )
r.remove(e[n]);
}
function MN(t) {
return function() {
e9(this, t);
};
}
function LN(t) {
return function() {
r9(this, t);
};
}
function RN(t, e) {
return function() {
(e.apply(this, arguments) ? e9 : r9)(this, t);
};
}
function IN(t, e) {
var r = Jw(t + "");
if (arguments.length < 2) {
for (var n = jb(this.node()), i = -1, a = r.length; ++i < a; )
if (!n.contains(r[i]))
return !1;
return !0;
}
return this.each((typeof e == "function" ? RN : e ? MN : LN)(r, e));
}
function NN() {
this.textContent = "";
}
function BN(t) {
return function() {
this.textContent = t;
};
}
function DN(t) {
return function() {
var e = t.apply(this, arguments);
this.textContent = e == null ? "" : e;
};
}
function ON(t) {
return arguments.length ? this.each(t == null ? NN : (typeof t == "function" ? DN : BN)(t)) : this.node().textContent;
}
function FN() {
this.innerHTML = "";
}
function PN(t) {
return function() {
this.innerHTML = t;
};
}
function qN(t) {
return function() {
var e = t.apply(this, arguments);
this.innerHTML = e == null ? "" : e;
};
}
function VN(t) {
return arguments.length ? this.each(t == null ? FN : (typeof t == "function" ? qN : PN)(t)) : this.node().innerHTML;
}
function zN() {
this.nextSibling && this.parentNode.appendChild(this);
}
function YN() {
return this.each(zN);
}
function UN() {
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
function WN() {
return this.each(UN);
}
function HN(t) {
var e = typeof t == "function" ? t : u1(t);
return this.select(function() {
return this.appendChild(e.apply(this, arguments));
});
}
function GN() {
return null;
}
function jN(t, e) {
var r = typeof t == "function" ? t : u1(t), n = e == null ? GN : typeof e == "function" ? e : h1(e);
return this.select(function() {
return this.insertBefore(r.apply(this, arguments), n.apply(this, arguments) || null);
});
}
function $N() {
var t = this.parentNode;
t && t.removeChild(this);
}
function XN() {
return this.each($N);
}
function KN() {
var t = this.cloneNode(!1), e = this.parentNode;
return e ? e.insertBefore(t, this.nextSibling) : t;
}
function ZN() {
var t = this.cloneNode(!0), e = this.parentNode;
return e ? e.insertBefore(t, this.nextSibling) : t;
}
function QN(t) {
return this.select(t ? ZN : KN);
}
function JN(t) {
return arguments.length ? this.property("__data__", t) : this.node().__data__;
}
function tB(t) {
return function(e) {
t.call(this, e, this.__data__);
};
}
function eB(t) {
return t.trim().split(/^|\s+/).map(function(e) {
var r = "", n = e.indexOf(".");
return n >= 0 && (r = e.slice(n + 1), e = e.slice(0, n)), { type: e, name: r };
});
}
function rB(t) {
return function() {
var e = this.__on;
if (!!e) {
for (var r = 0, n = -1, i = e.length, a; r < i; ++r)
a = e[r], (!t.type || a.type === t.type) && a.name === t.name ? this.removeEventListener(a.type, a.listener, a.options) : e[++n] = a;
++n ? e.length = n : delete this.__on;
}
};
}
function nB(t, e, r) {
return function() {
var n = this.__on, i, a = tB(e);
if (n) {
for (var s = 0, o = n.length; s < o; ++s)
if ((i = n[s]).type === t.type && i.name === t.name) {
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = r), i.value = e;
return;
}
}
this.addEventListener(t.type, a, r), i = { type: t.type, name: t.name, value: e, listener: a, options: r }, n ? n.push(i) : this.__on = [i];
};
}
function iB(t, e, r) {
var n = eB(t + ""), i, a = n.length, s;
if (arguments.length < 2) {
var o = this.node().__on;
if (o) {
for (var l = 0, u = o.length, h; l < u; ++l)
for (i = 0, h = o[l]; i < a; ++i)
if ((s = n[i]).type === h.type && s.name === h.name)
return h.value;
}
return;
}
for (o = e ? nB : rB, i = 0; i < a; ++i)
this.each(o(n[i], e, r));
return this;
}
function n9(t, e, r) {
var n = Gb(t), i = n.CustomEvent;
typeof i == "function" ? i = new i(e, r) : (i = n.document.createEvent("Event"), r ? (i.initEvent(e, r.bubbles, r.cancelable), i.detail = r.detail) : i.initEvent(e, !1, !1)), t.dispatchEvent(i);
}
function aB(t, e) {
return function() {
return n9(this, t, e);
};
}
function sB(t, e) {
return function() {
return n9(this, t, e.apply(this, arguments));
};
}
function oB(t, e) {
return this.each((typeof e == "function" ? sB : aB)(t, e));
}
function* lB() {
for (var t = this._groups, e = 0, r = t.length; e < r; ++e)
for (var n = t[e], i = 0, a = n.length, s; i < a; ++i)
(s = n[i]) && (yield s);
}
var $b = [null];
function an(t, e) {
this._groups = t, this._parents = e;
}
function Hs() {
return new an([[document.documentElement]], $b);
}
function cB() {
return this;
}
an.prototype = Hs.prototype = {
constructor: an,
select: OI,
selectAll: qI,
selectChild: UI,
selectChildren: jI,
filter: $I,
data: tN,
enter: XI,
exit: rN,
join: nN,
merge: iN,
selection: cB,
order: aN,
sort: sN,
call: lN,
nodes: cN,
node: uN,
size: hN,
empty: fN,
each: dN,
attr: vN,
style: TN,
property: AN,
classed: IN,
text: ON,
html: VN,
raise: YN,
lower: WN,
append: HN,
insert: jN,
remove: XN,
clone: QN,
datum: JN,
on: iB,
dispatch: oB,
[Symbol.iterator]: lB
};
function St(t) {
return typeof t == "string" ? new an([[document.querySelector(t)]], [document.documentElement]) : new an([[t]], $b);
}
function uB(t) {
return St(u1(t).call(document.documentElement));
}
var hB = 0;
function i9() {
return new fm();
}
function fm() {
this._ = "@" + (++hB).toString(36);
}
fm.prototype = i9.prototype = {
constructor: fm,
get: function(t) {
for (var e = this._; !(e in t); )
if (!(t = t.parentNode))
return;
return t[e];
},
set: function(t, e) {
return t[this._] = e;
},
remove: function(t) {
return this._ in t && delete t[this._];
},
toString: function() {
return this._;
}
};
function a9(t) {
let e;
for (; e = t.sourceEvent; )
t = e;
return t;
}
function Cn(t, e) {
if (t = a9(t), e === void 0 && (e = t.currentTarget), e) {
var r = e.ownerSVGElement || e;
if (r.createSVGPoint) {
var n = r.createSVGPoint();
return n.x = t.clientX, n.y = t.clientY, n = n.matrixTransform(e.getScreenCTM().inverse()), [n.x, n.y];
}
if (e.getBoundingClientRect) {
var i = e.getBoundingClientRect();
return [t.clientX - i.left - e.clientLeft, t.clientY - i.top - e.clientTop];
}
}
return [t.pageX, t.pageY];
}
function fB(t, e) {
return t.target && (t = a9(t), e === void 0 && (e = t.currentTarget), t = t.touches || [t]), Array.from(t, (r) => Cn(r, e));
}
function f1(t) {
return typeof t == "string" ? new an([document.querySelectorAll(t)], [document.documentElement]) : new an([Kw(t)], $b);
}
const dB = { passive: !1 }, yc = { capture: !0, passive: !1 };
function V0(t) {
t.stopImmediatePropagation();
}
function ko(t) {
t.preventDefault(), t.stopImmediatePropagation();
}
function d1(t) {
var e = t.document.documentElement, r = St(t).on("dragstart.drag", ko, yc);
"onselectstart" in e ? r.on("selectstart.drag", ko, yc) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
}
function p1(t, e) {
var r = t.document.documentElement, n = St(t).on("dragstart.drag", null);
e && (n.on("click.drag", ko, yc), setTimeout(function() {
n.on("click.drag", null);
}, 0)), "onselectstart" in r ? n.on("selectstart.drag", null) : (r.style.MozUserSelect = r.__noselect, delete r.__noselect);
}
const Au = (t) => () => t;
function dm(t, {
sourceEvent: e,
subject: r,
target: n,
identifier: i,
active: a,
x: s,
y: o,
dx: l,
dy: u,
dispatch: h
}) {
Object.defineProperties(this, {
type: { value: t, enumerable: !0, configurable: !0 },
sourceEvent: { value: e, enumerable: !0, configurable: !0 },
subject: { value: r, enumerable: !0, configurable: !0 },
target: { value: n, enumerable: !0, configurable: !0 },
identifier: { value: i, enumerable: !0, configurable: !0 },
active: { value: a, enumerable: !0, configurable: !0 },
x: { value: s, enumerable: !0, configurable: !0 },
y: { value: o, enumerable: !0, configurable: !0 },
dx: { value: l, enumerable: !0, configurable: !0 },
dy: { value: u, enumerable: !0, configurable: !0 },
_: { value: h }
});
}
dm.prototype.on = function() {
var t = this._.on.apply(this._, arguments);
return t === this._ ? this : t;
};
function pB(t) {
return !t.ctrlKey && !t.button;
}
function gB() {
return this.parentNode;
}
function yB(t, e) {
return e == null ? { x: t.x, y: t.y } : e;
}
function mB() {
return navigator.maxTouchPoints || "ontouchstart" in this;
}
function bB() {
var t = pB, e = gB, r = yB, n = mB, i = {}, a = Ws("start", "drag", "end"), s = 0, o, l, u, h, d = 0;
function f(T) {
T.on("mousedown.drag", p).filter(n).on("touchstart.drag", y).on("touchmove.drag", b, dB).on("touchend.drag touchcancel.drag", x).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
}
function p(T, C) {
if (!(h || !t.call(this, T, C))) {
var M = k(this, e.call(this, T, C), T, C, "mouse");
!M || (St(T.view).on("mousemove.drag", m, yc).on("mouseup.drag", _, yc), d1(T.view), V0(T), u = !1, o = T.clientX, l = T.clientY, M("start", T));
}
}
function m(T) {
if (ko(T), !u) {
var C = T.clientX - o, M = T.clientY - l;
u = C * C + M * M > d;
}
i.mouse("drag", T);
}
function _(T) {
St(T.view).on("mousemove.drag mouseup.drag", null), p1(T.view, u), ko(T), i.mouse("end", T);
}
function y(T, C) {
if (!!t.call(this, T, C)) {
var M = T.changedTouches, S = e.call(this, T, C), R = M.length, A, L;
for (A = 0; A < R; ++A)
(L = k(this, S, T, C, M[A].identifier, M[A])) && (V0(T), L("start", T, M[A]));
}
}
function b(T) {
var C = T.changedTouches, M = C.length, S, R;
for (S = 0; S < M; ++S)
(R = i[C[S].identifier]) && (ko(T), R("drag", T, C[S]));
}
function x(T) {
var C = T.changedTouches, M = C.length, S, R;
for (h && clearTimeout(h), h = setTimeout(function() {
h = null;
}, 500), S = 0; S < M; ++S)
(R = i[C[S].identifier]) && (V0(T), R("end", T, C[S]));
}
function k(T, C, M, S, R, A) {
var L = a.copy(), v = Cn(A || M, C), B, w, D;
if ((D = r.call(T, new dm("beforestart", {
sourceEvent: M,
target: f,
identifier: R,
active: s,
x: v[0],
y: v[1],
dx: 0,
dy: 0,
dispatch: L
}), S)) != null)
return B = D.x - v[0] || 0, w = D.y - v[1] || 0, function N(z, X, ct) {
var J = v, Y;
switch (z) {
case "start":
i[R] = N, Y = s++;
break;
case "end":
delete i[R], --s;
case "drag":
v = Cn(ct || X, C), Y = s;
break;
}
L.call(
z,
T,
new dm(z, {
sourceEvent: X,
subject: D,
target: f,
identifier: R,
active: Y,
x: v[0] + B,
y: v[1] + w,
dx: v[0] - J[0],
dy: v[1] - J[1],
dispatch: L
}),
S
);
};
}
return f.filter = function(T) {
return arguments.length ? (t = typeof T == "function" ? T : Au(!!T), f) : t;
}, f.container = function(T) {
return arguments.length ? (e = typeof T == "function" ? T : Au(T), f) : e;
}, f.subject = function(T) {
return arguments.length ? (r = typeof T == "function" ? T : Au(T), f) : r;
}, f.touchable = function(T) {
return arguments.length ? (n = typeof T == "function" ? T : Au(!!T), f) : n;
}, f.on = function() {
var T = a.on.apply(a, arguments);
return T === a ? f : T;
}, f.clickDistance = function(T) {
return arguments.length ? (d = (T = +T) * T, f) : Math.sqrt(d);
}, f;
}
function il(t, e, r) {
t.prototype = e.prototype = r, r.constructor = t;
}
function Xc(t, e) {
var r = Object.create(t.prototype);
for (var n in e)
r[n] = e[n];
return r;
}
function Qa() {
}
var Ls = 0.7, Bo = 1 / Ls, wo = "\\s*([+-]?\\d+)\\s*", mc = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Ri = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", _B = /^#([0-9a-f]{3,8})$/, vB = new RegExp(`^rgb\\(${wo},${wo},${wo}\\)$`), xB = new RegExp(`^rgb\\(${Ri},${Ri},${Ri}\\)$`), kB = new RegExp(`^rgba\\(${wo},${wo},${wo},${mc}\\)$`), wB = new RegExp(`^rgba\\(${Ri},${Ri},${Ri},${mc}\\)$`), TB = new RegExp(`^hsl\\(${mc},${Ri},${Ri}\\)$`), EB = new RegExp(`^hsla\\(${mc},${Ri},${Ri},${mc}\\)$`), L_ = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
aquamarine: 8388564,
azure: 15794175,
beige: 16119260,
bisque: 16770244,
black: 0,
blanchedalmond: 16772045,
blue: 255,
blueviolet: 9055202,
brown: 10824234,
burlywood: 14596231,
cadetblue: 6266528,
chartreuse: 8388352,
chocolate: 13789470,
coral: 16744272,
cornflowerblue: 6591981,
cornsilk: 16775388,
crimson: 14423100,
cyan: 65535,
darkblue: 139,
darkcyan: 35723,
darkgoldenrod: 12092939,
darkgray: 11119017,
darkgreen: 25600,
darkgrey: 11119017,
darkkhaki: 12433259,
darkmagenta: 9109643,
darkolivegreen: 5597999,
darkorange: 16747520,
darkorchid: 10040012,
darkred: 9109504,
darksalmon: 15308410,
darkseagreen: 9419919,
darkslateblue: 4734347,
darkslategray: 3100495,
darkslategrey: 3100495,
darkturquoise: 52945,
darkviolet: 9699539,
deeppink: 16716947,
deepskyblue: 49151,
dimgray: 6908265,
dimgrey: 6908265,
dodgerblue: 2003199,
firebrick: 11674146,
floralwhite: 16775920,
forestgreen: 2263842,
fuchsia: 16711935,
gainsboro: 14474460,
ghostwhite: 16316671,
gold: 16766720,
goldenrod: 14329120,
gray: 8421504,
green: 32768,
greenyellow: 11403055,
grey: 8421504,
honeydew: 15794160,
hotpink: 16738740,
indianred: 13458524,
indigo: 4915330,
ivory: 16777200,
khaki: 15787660,
lavender: 15132410,
lavenderblush: 16773365,
lawngreen: 8190976,
lemonchiffon: 16775885,
lightblue: 11393254,
lightcoral: 15761536,
lightcyan: 14745599,
lightgoldenrodyellow: 16448210,
lightgray: 13882323,
lightgreen: 9498256,
lightgrey: 13882323,
lightpink: 16758465,
lightsalmon: 16752762,
lightseagreen: 2142890,
lightskyblue: 8900346,
lightslategray: 7833753,
lightslategrey: 7833753,
lightsteelblue: 11584734,
lightyellow: 16777184,
lime: 65280,
limegreen: 3329330,
linen: 16445670,
magenta: 16711935,
maroon: 8388608,
mediumaquamarine: 6737322,
mediumblue: 205,
mediumorchid: 12211667,
mediumpurple: 9662683,
mediumseagreen: 3978097,
mediumslateblue: 8087790,
mediumspringgreen: 64154,
mediumturquoise: 4772300,
mediumvioletred: 13047173,
midnightblue: 1644912,
mintcream: 16121850,
mistyrose: 16770273,
moccasin: 16770229,
navajowhite: 16768685,
navy: 128,
oldlace: 16643558,
olive: 8421376,
olivedrab: 7048739,
orange: 16753920,
orangered: 16729344,
orchid: 14315734,
palegoldenrod: 15657130,
palegreen: 10025880,
paleturquoise: 11529966,
palevioletred: 14381203,
papayawhip: 16773077,
peachpuff: 16767673,
peru: 13468991,
pink: 16761035,
plum: 14524637,
powderblue: 11591910,
purple: 8388736,
rebeccapurple: 6697881,
red: 16711680,
rosybrown: 12357519,
royalblue: 4286945,
saddlebrown: 9127187,
salmon: 16416882,
sandybrown: 16032864,
seagreen: 3050327,
seashell: 16774638,
sienna: 10506797,
silver: 12632256,
skyblue: 8900331,
slateblue: 6970061,
slategray: 7372944,
slategrey: 7372944,
snow: 16775930,
springgreen: 65407,
steelblue: 4620980,
tan: 13808780,
teal: 32896,
thistle: 14204888,
tomato: 16737095,
turquoise: 4251856,
violet: 15631086,
wheat: 16113331,
white: 16777215,
whitesmoke: 16119285,
yellow: 16776960,
yellowgreen: 10145074
};
il(Qa, Wa, {
copy(t) {
return Object.assign(new this.constructor(), this, t);
},
displayable() {
return this.rgb().displayable();
},
hex: R_,
formatHex: R_,
formatHex8: CB,
formatHsl: SB,
formatRgb: I_,
toString: I_
});
function R_() {
return this.rgb().formatHex();
}
function CB() {
return this.rgb().formatHex8();
}
function SB() {
return s9(this).formatHsl();
}
function I_() {
return this.rgb().formatRgb();
}
function Wa(t) {
var e, r;
return t = (t + "").trim().toLowerCase(), (e = _B.exec(t)) ? (r = e[1].length, e = parseInt(e[1], 16), r === 6 ? N_(e) : r === 3 ? new Cr(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : r === 8 ? Mu(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : r === 4 ? Mu(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = vB.exec(t)) ? new Cr(e[1], e[2], e[3], 1) : (e = xB.exec(t)) ? new Cr(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = kB.exec(t)) ? Mu(e[1], e[2], e[3], e[4]) : (e = wB.exec(t)) ? Mu(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = TB.exec(t)) ? O_(e[1], e[2] / 100, e[3] / 100, 1) : (e = EB.exec(t)) ? O_(e[1], e[2] / 100, e[3] / 100, e[4]) : L_.hasOwnProperty(t) ? N_(L_[t]) : t === "transparent" ? new Cr(NaN, NaN, NaN, 0) : null;
}
function N_(t) {
return new Cr(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
}
function Mu(t, e, r, n) {
return n <= 0 && (t = e = r = NaN), new Cr(t, e, r, n);
}
function Xb(t) {
return t instanceof Qa || (t = Wa(t)), t ? (t = t.rgb(), new Cr(t.r, t.g, t.b, t.opacity)) : new Cr();
}
function Do(t, e, r, n) {
return arguments.length === 1 ? Xb(t) : new Cr(t, e, r, n == null ? 1 : n);
}
function Cr(t, e, r, n) {
this.r = +t, this.g = +e, this.b = +r, this.opacity = +n;
}
il(Cr, Do, Xc(Qa, {
brighter(t) {
return t = t == null ? Bo : Math.pow(Bo, t), new Cr(this.r * t, this.g * t, this.b * t, this.opacity);
},
darker(t) {
return t = t == null ? Ls : Math.pow(Ls, t), new Cr(this.r * t, this.g * t, this.b * t, this.opacity);
},
rgb() {
return this;
},
clamp() {
return new Cr(ws(this.r), ws(this.g), ws(this.b), Vh(this.opacity));
},
displayable() {
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
},
hex: B_,
formatHex: B_,
formatHex8: AB,
formatRgb: D_,
toString: D_
}));
function B_() {
return `#${xs(this.r)}${xs(this.g)}${xs(this.b)}`;
}
function AB() {
return `#${xs(this.r)}${xs(this.g)}${xs(this.b)}${xs((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function D_() {
const t = Vh(this.opacity);
return `${t === 1 ? "rgb(" : "rgba("}${ws(this.r)}, ${ws(this.g)}, ${ws(this.b)}${t === 1 ? ")" : `, ${t})`}`;
}
function Vh(t) {
return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
}
function ws(t) {
return Math.max(0, Math.min(255, Math.round(t) || 0));
}
function xs(t) {
return t = ws(t), (t < 16 ? "0" : "") + t.toString(16);
}
function O_(t, e, r, n) {
return n <= 0 ? t = e = r = NaN : r <= 0 || r >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new Kn(t, e, r, n);
}
function s9(t) {
if (t instanceof Kn)
return new Kn(t.h, t.s, t.l, t.opacity);
if (t instanceof Qa || (t = Wa(t)), !t)
return new Kn();
if (t instanceof Kn)
return t;
t = t.rgb();
var e = t.r / 255, r = t.g / 255, n = t.b / 255, i = Math.min(e, r, n), a = Math.max(e, r, n), s = NaN, o = a - i, l = (a + i) / 2;
return o ? (e === a ? s = (r - n) / o + (r < n) * 6 : r === a ? s = (n - e) / o + 2 : s = (e - r) / o + 4, o /= l < 0.5 ? a + i : 2 - a - i, s *= 60) : o = l > 0 && l < 1 ? 0 : s, new Kn(s, o, l, t.opacity);
}
function zh(t, e, r, n) {
return arguments.length === 1 ? s9(t) : new Kn(t, e, r, n == null ? 1 : n);
}
function Kn(t, e, r, n) {
this.h = +t, this.s = +e, this.l = +r, this.opacity = +n;
}
il(Kn, zh, Xc(Qa, {
brighter(t) {
return t = t == null ? Bo : Math.pow(Bo, t), new Kn(this.h, this.s, this.l * t, this.opacity);
},
darker(t) {
return t = t == null ? Ls : Math.pow(Ls, t), new Kn(this.h, this.s, this.l * t, this.opacity);
},
rgb() {
var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, r = this.l, n = r + (r < 0.5 ? r : 1 - r) * e, i = 2 * r - n;
return new Cr(
z0(t >= 240 ? t - 240 : t + 120, i, n),
z0(t, i, n),
z0(t < 120 ? t + 240 : t - 120, i, n),
this.opacity
);
},
clamp() {
return new Kn(F_(this.h), Lu(this.s), Lu(this.l), Vh(this.opacity));
},
displayable() {
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
},
formatHsl() {
const t = Vh(this.opacity);
return `${t === 1 ? "hsl(" : "hsla("}${F_(this.h)}, ${Lu(this.s) * 100}%, ${Lu(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
}
}));
function F_(t) {
return t = (t || 0) % 360, t < 0 ? t + 360 : t;
}
function Lu(t) {
return Math.max(0, Math.min(1, t || 0));
}
function z0(t, e, r) {
return (t < 60 ? e + (r - e) * t / 60 : t < 180 ? r : t < 240 ? e + (r - e) * (240 - t) / 60 : e) * 255;
}
const o9 = Math.PI / 180, l9 = 180 / Math.PI, Yh = 18, c9 = 0.96422, u9 = 1, h9 = 0.82521, f9 = 4 / 29, To = 6 / 29, d9 = 3 * To * To, MB = To * To * To;
function p9(t) {
if (t instanceof ni)
return new ni(t.l, t.a, t.b, t.opacity);
if (t instanceof Ai)
return y9(t);
t instanceof Cr || (t = Xb(t));
var e = H0(t.r), r = H0(t.g), n = H0(t.b), i = Y0((0.2225045 * e + 0.7168786 * r + 0.0606169 * n) / u9), a, s;
return e === r && r === n ? a = s = i : (a = Y0((0.4360747 * e + 0.3850649 * r + 0.1430804 * n) / c9), s = Y0((0.0139322 * e + 0.0971045 * r + 0.7141733 * n) / h9)), new ni(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity);
}
function LB(t, e) {
return new ni(t, 0, 0, e == null ? 1 : e);
}
function Uh(t, e, r, n) {
return arguments.length === 1 ? p9(t) : new ni(t, e, r, n == null ? 1 : n);
}
function ni(t, e, r, n) {
this.l = +t, this.a = +e, this.b = +r, this.opacity = +n;
}
il(ni, Uh, Xc(Qa, {
brighter(t) {
return new ni(this.l + Yh * (t == null ? 1 : t), this.a, this.b, this.opacity);
},
darker(t) {
return new ni(this.l - Yh * (t == null ? 1 : t), this.a, this.b, this.opacity);
},
rgb() {
var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, r = isNaN(this.b) ? t : t - this.b / 200;
return e = c9 * U0(e), t = u9 * U0(t), r = h9 * U0(r), new Cr(
W0(3.1338561 * e - 1.6168667 * t - 0.4906146 * r),
W0(-0.9787684 * e + 1.9161415 * t + 0.033454 * r),
W0(0.0719453 * e - 0.2289914 * t + 1.4052427 * r),
this.opacity
);
}
}));
function Y0(t) {
return t > MB ? Math.pow(t, 1 / 3) : t / d9 + f9;
}
function U0(t) {
return t > To ? t * t * t : d9 * (t - f9);
}
function W0(t) {
return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
}
function H0(t) {
return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
}
function g9(t) {
if (t instanceof Ai)
return new Ai(t.h, t.c, t.l, t.opacity);
if (t instanceof ni || (t = p9(t)), t.a === 0 && t.b === 0)
return new Ai(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
var e = Math.atan2(t.b, t.a) * l9;
return new Ai(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
}
function RB(t, e, r, n) {
return arguments.length === 1 ? g9(t) : new Ai(r, e, t, n == null ? 1 : n);
}
function Wh(t, e, r, n) {
return arguments.length === 1 ? g9(t) : new Ai(t, e, r, n == null ? 1 : n);
}
function Ai(t, e, r, n) {
this.h = +t, this.c = +e, this.l = +r, this.opacity = +n;
}
function y9(t) {
if (isNaN(t.h))
return new ni(t.l, 0, 0, t.opacity);
var e = t.h * o9;
return new ni(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
}
il(Ai, Wh, Xc(Qa, {
brighter(t) {
return new Ai(this.h, this.c, this.l + Yh * (t == null ? 1 : t), this.opacity);
},
darker(t) {
return new Ai(this.h, this.c, this.l - Yh * (t == null ? 1 : t), this.opacity);
},
rgb() {
return y9(this).rgb();
}
}));
var m9 = -0.14861, Kb = 1.78277, Zb = -0.29227, g1 = -0.90649, bc = 1.97294, P_ = bc * g1, q_ = bc * Kb, V_ = Kb * Zb - g1 * m9;
function IB(t) {
if (t instanceof Ts)
return new Ts(t.h, t.s, t.l, t.opacity);
t instanceof Cr || (t = Xb(t));
var e = t.r / 255, r = t.g / 255, n = t.b / 255, i = (V_ * n + P_ * e - q_ * r) / (V_ + P_ - q_), a = n - i, s = (bc * (r - i) - Zb * a) / g1, o = Math.sqrt(s * s + a * a) / (bc * i * (1 - i)), l = o ? Math.atan2(s, a) * l9 - 120 : NaN;
return new Ts(l < 0 ? l + 360 : l, o, i, t.opacity);
}
function oi(t, e, r, n) {
return arguments.length === 1 ? IB(t) : new Ts(t, e, r, n == null ? 1 : n);
}
function Ts(t, e, r, n) {
this.h = +t, this.s = +e, this.l = +r, this.opacity = +n;
}
il(Ts, oi, Xc(Qa, {
brighter(t) {
return t = t == null ? Bo : Math.pow(Bo, t), new Ts(this.h, this.s, this.l * t, this.opacity);
},
darker(t) {
return t = t == null ? Ls : Math.pow(Ls, t), new Ts(this.h, this.s, this.l * t, this.opacity);
},
rgb() {
var t = isNaN(this.h) ? 0 : (this.h + 120) * o9, e = +this.l, r = isNaN(this.s) ? 0 : this.s * e * (1 - e), n = Math.cos(t), i = Math.sin(t);
return new Cr(
255 * (e + r * (m9 * n + Kb * i)),
255 * (e + r * (Zb * n + g1 * i)),
255 * (e + r * (bc * n)),
this.opacity
);
}
}));
function b9(t, e, r, n, i) {
var a = t * t, s = a * t;
return ((1 - 3 * t + 3 * a - s) * e + (4 - 6 * a + 3 * s) * r + (1 + 3 * t + 3 * a - 3 * s) * n + s * i) / 6;
}
function _9(t) {
var e = t.length - 1;
return function(r) {
var n = r <= 0 ? r = 0 : r >= 1 ? (r = 1, e - 1) : Math.floor(r * e), i = t[n], a = t[n + 1], s = n > 0 ? t[n - 1] : 2 * i - a, o = n < e - 1 ? t[n + 2] : 2 * a - i;
return b9((r - n / e) * e, s, i, a, o);
};
}
function v9(t) {
var e = t.length;
return function(r) {
var n = Math.floor(((r %= 1) < 0 ? ++r : r) * e), i = t[(n + e - 1) % e], a = t[n % e], s = t[(n + 1) % e], o = t[(n + 2) % e];
return b9((r - n / e) * e, i, a, s, o);
};
}
const y1 = (t) => () => t;
function x9(t, e) {
return function(r) {
return t + r * e;
};
}
function NB(t, e, r) {
return t = Math.pow(t, r), e = Math.pow(e, r) - t, r = 1 / r, function(n) {
return Math.pow(t + n * e, r);
};
}
function m1(t, e) {
var r = e - t;
return r ? x9(t, r > 180 || r < -180 ? r - 360 * Math.round(r / 360) : r) : y1(isNaN(t) ? e : t);
}
function BB(t) {
return (t = +t) == 1 ? Sr : function(e, r) {
return r - e ? NB(e, r, t) : y1(isNaN(e) ? r : e);
};
}
function Sr(t, e) {
var r = e - t;
return r ? x9(t, r) : y1(isNaN(t) ? e : t);
}
const _c = function t(e) {
var r = BB(e);
function n(i, a) {
var s = r((i = Do(i)).r, (a = Do(a)).r), o = r(i.g, a.g), l = r(i.b, a.b), u = Sr(i.opacity, a.opacity);
return function(h) {
return i.r = s(h), i.g = o(h), i.b = l(h), i.opacity = u(h), i + "";
};
}
return n.gamma = t, n;
}(1);
function k9(t) {
return function(e) {
var r = e.length, n = new Array(r), i = new Array(r), a = new Array(r), s, o;
for (s = 0; s < r; ++s)
o = Do(e[s]), n[s] = o.r || 0, i[s] = o.g || 0, a[s] = o.b || 0;
return n = t(n), i = t(i), a = t(a), o.opacity = 1, function(l) {
return o.r = n(l), o.g = i(l), o.b = a(l), o + "";
};
};
}
var w9 = k9(_9), DB = k9(v9);
function Qb(t, e) {
e || (e = []);
var r = t ? Math.min(e.length, t.length) : 0, n = e.slice(), i;
return function(a) {
for (i = 0; i < r; ++i)
n[i] = t[i] * (1 - a) + e[i] * a;
return n;
};
}
function T9(t) {
return ArrayBuffer.isView(t) && !(t instanceof DataView);
}
function OB(t, e) {
return (T9(e) ? Qb : E9)(t, e);
}
function E9(t, e) {
var r = e ? e.length : 0, n = t ? Math.min(r, t.length) : 0, i = new Array(n), a = new Array(r), s;
for (s = 0; s < n; ++s)
i[s] = Ja(t[s], e[s]);
for (; s < r; ++s)
a[s] = e[s];
return function(o) {
for (s = 0; s < n; ++s)
a[s] = i[s](o);
return a;
};
}
function C9(t, e) {
var r = new Date();
return t = +t, e = +e, function(n) {
return r.setTime(t * (1 - n) + e * n), r;
};
}
function Dn(t, e) {
return t = +t, e = +e, function(r) {
return t * (1 - r) + e * r;
};
}
function S9(t, e) {
var r = {}, n = {}, i;
(t === null || typeof t != "object") && (t = {}), (e === null || typeof e != "object") && (e = {});
for (i in e)
i in t ? r[i] = Ja(t[i], e[i]) : n[i] = e[i];
return function(a) {
for (i in r)
n[i] = r[i](a);
return n;
};
}
var pm = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, G0 = new RegExp(pm.source, "g");
function FB(t) {
return function() {
return t;
};
}
function PB(t) {
return function(e) {
return t(e) + "";
};
}
function Jb(t, e) {
var r = pm.lastIndex = G0.lastIndex = 0, n, i, a, s = -1, o = [], l = [];
for (t = t + "", e = e + ""; (n = pm.exec(t)) && (i = G0.exec(e)); )
(a = i.index) > r && (a = e.slice(r, a), o[s] ? o[s] += a : o[++s] = a), (n = n[0]) === (i = i[0]) ? o[s] ? o[s] += i : o[++s] = i : (o[++s] = null, l.push({ i: s, x: Dn(n, i) })), r = G0.lastIndex;
return r < e.length && (a = e.slice(r), o[s] ? o[s] += a : o[++s] = a), o.length < 2 ? l[0] ? PB(l[0].x) : FB(e) : (e = l.length, function(u) {
for (var h = 0, d; h < e; ++h)
o[(d = l[h]).i] = d.x(u);
return o.join("");
});
}
function Ja(t, e) {
var r = typeof e, n;
return e == null || r === "boolean" ? y1(e) : (r === "number" ? Dn : r === "string" ? (n = Wa(e)) ? (e = n, _c) : Jb : e instanceof Wa ? _c : e instanceof Date ? C9 : T9(e) ? Qb : Array.isArray(e) ? E9 : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? S9 : Dn)(t, e);
}
function qB(t) {
var e = t.length;
return function(r) {
return t[Math.max(0, Math.min(e - 1, Math.floor(r * e)))];
};
}
function VB(t, e) {
var r = m1(+t, +e);
return function(n) {
var i = r(n);
return i - 360 * Math.floor(i / 360);
};
}
function b1(t, e) {
return t = +t, e = +e, function(r) {
return Math.round(t * (1 - r) + e * r);
};
}
var z_ = 180 / Math.PI, gm = {
translateX: 0,
translateY: 0,
rotate: 0,
skewX: 0,
scaleX: 1,
scaleY: 1
};
function A9(t, e, r, n, i, a) {
var s, o, l;
return (s = Math.sqrt(t * t + e * e)) && (t /= s, e /= s), (l = t * r + e * n) && (r -= t * l, n -= e * l), (o = Math.sqrt(r * r + n * n)) && (r /= o, n /= o, l /= o), t * n < e * r && (t = -t, e = -e, l = -l, s = -s), {
translateX: i,
translateY: a,
rotate: Math.atan2(e, t) * z_,
skewX: Math.atan(l) * z_,
scaleX: s,
scaleY: o
};
}
var Ru;
function zB(t) {
const e = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(t + "");
return e.isIdentity ? gm : A9(e.a, e.b, e.c, e.d, e.e, e.f);
}
function YB(t) {
return t == null || (Ru || (Ru = document.createElementNS("http://www.w3.org/2000/svg", "g")), Ru.setAttribute("transform", t), !(t = Ru.transform.baseVal.consolidate())) ? gm : (t = t.matrix, A9(t.a, t.b, t.c, t.d, t.e, t.f));
}
function M9(t, e, r, n) {
function i(u) {
return u.length ? u.pop() + " " : "";
}
function a(u, h, d, f, p, m) {
if (u !== d || h !== f) {
var _ = p.push("translate(", null, e, null, r);
m.push({ i: _ - 4, x: Dn(u, d) }, { i: _ - 2, x: Dn(h, f) });
} else
(d || f) && p.push("translate(" + d + e + f + r);
}
function s(u, h, d, f) {
u !== h ? (u - h > 180 ? h += 360 : h - u > 180 && (u += 360), f.push({ i: d.push(i(d) + "rotate(", null, n) - 2, x: Dn(u, h) })) : h && d.push(i(d) + "rotate(" + h + n);
}
function o(u, h, d, f) {
u !== h ? f.push({ i: d.push(i(d) + "skewX(", null, n) - 2, x: Dn(u, h) }) : h && d.push(i(d) + "skewX(" + h + n);
}
function l(u, h, d, f, p, m) {
if (u !== d || h !== f) {
var _ = p.push(i(p) + "scale(", null, ",", null, ")");
m.push({ i: _ - 4, x: Dn(u, d) }, { i: _ - 2, x: Dn(h, f) });
} else
(d !== 1 || f !== 1) && p.push(i(p) + "scale(" + d + "," + f + ")");
}
return function(u, h) {
var d = [], f = [];
return u = t(u), h = t(h), a(u.translateX, u.translateY, h.translateX, h.translateY, d, f), s(u.rotate, h.rotate, d, f), o(u.skewX, h.skewX, d, f), l(u.scaleX, u.scaleY, h.scaleX, h.scaleY, d, f), u = h = null, function(p) {
for (var m = -1, _ = f.length, y; ++m < _; )
d[(y = f[m]).i] = y.x(p);
return d.join("");
};
};
}
var L9 = M9(zB, "px, ", "px)", "deg)"), R9 = M9(YB, ", ", ")", ")"), UB = 1e-12;
function Y_(t) {
return ((t = Math.exp(t)) + 1 / t) / 2;
}
function WB(t) {
return ((t = Math.exp(t)) - 1 / t) / 2;
}
function HB(t) {
return ((t = Math.exp(2 * t)) - 1) / (t + 1);
}
const I9 = function t(e, r, n) {
function i(a, s) {
var o = a[0], l = a[1], u = a[2], h = s[0], d = s[1], f = s[2], p = h - o, m = d - l, _ = p * p + m * m, y, b;
if (_ < UB)
b = Math.log(f / u) / e, y = function(S) {
return [
o + S * p,
l + S * m,
u * Math.exp(e * S * b)
];
};
else {
var x = Math.sqrt(_), k = (f * f - u * u + n * _) / (2 * u * r * x), T = (f * f - u * u - n * _) / (2 * f * r * x), C = Math.log(Math.sqrt(k * k + 1) - k), M = Math.log(Math.sqrt(T * T + 1) - T);
b = (M - C) / e, y = function(S) {
var R = S * b, A = Y_(C), L = u / (r * x) * (A * HB(e * R + C) - WB(C));
return [
o + L * p,
l + L * m,
u * A / Y_(e * R + C)
];
};
}
return y.duration = b * 1e3 * e / Math.SQRT2, y;
}
return i.rho = function(a) {
var s = Math.max(1e-3, +a), o = s * s, l = o * o;
return t(s, o, l);
}, i;
}(Math.SQRT2, 2, 4);
function N9(t) {
return function(e, r) {
var n = t((e = zh(e)).h, (r = zh(r)).h), i = Sr(e.s, r.s), a = Sr(e.l, r.l), s = Sr(e.opacity, r.opacity);
return function(o) {
return e.h = n(o), e.s = i(o), e.l = a(o), e.opacity = s(o), e + "";
};
};
}
const GB = N9(m1);
var jB = N9(Sr);
function $B(t, e) {
var r = Sr((t = Uh(t)).l, (e = Uh(e)).l), n = Sr(t.a, e.a), i = Sr(t.b, e.b), a = Sr(t.opacity, e.opacity);
return function(s) {
return t.l = r(s), t.a = n(s), t.b = i(s), t.opacity = a(s), t + "";
};
}
function B9(t) {
return function(e, r) {
var n = t((e = Wh(e)).h, (r = Wh(r)).h), i = Sr(e.c, r.c), a = Sr(e.l, r.l), s = Sr(e.opacity, r.opacity);
return function(o) {
return e.h = n(o), e.c = i(o), e.l = a(o), e.opacity = s(o), e + "";
};
};
}
const D9 = B9(m1);
var XB = B9(Sr);
function O9(t) {
return function e(r) {
r = +r;
function n(i, a) {
var s = t((i = oi(i)).h, (a = oi(a)).h), o = Sr(i.s, a.s), l = Sr(i.l, a.l), u = Sr(i.opacity, a.opacity);
return function(h) {
return i.h = s(h), i.s = o(h), i.l = l(Math.pow(h, r)), i.opacity = u(h), i + "";
};
}
return n.gamma = e, n;
}(1);
}
const KB = O9(m1);
var _1 = O9(Sr);
function F9(t, e) {
e === void 0 && (e = t, t = Ja);
for (var r = 0, n = e.length - 1, i = e[0], a = new Array(n < 0 ? 0 : n); r < n; )
a[r] = t(i, i = e[++r]);
return function(s) {
var o = Math.max(0, Math.min(n - 1, Math.floor(s *= n)));
return a[o](s - o);
};
}
function ZB(t, e) {
for (var r = new Array(e), n = 0; n < e; ++n)
r[n] = t(n / (e - 1));
return r;
}
var Oo = 0, Pl = 0, kl = 0, P9 = 1e3, Hh, ql, Gh = 0, Rs = 0, v1 = 0, vc = typeof performance == "object" && performance.now ? performance : Date, q9 = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
setTimeout(t, 17);
};
function Kc() {
return Rs || (q9(QB), Rs = vc.now() + v1);
}
function QB() {
Rs = 0;
}
function xc() {
this._call = this._time = this._next = null;
}
xc.prototype = x1.prototype = {
constructor: xc,
restart: function(t, e, r) {
if (typeof t != "function")
throw new TypeError("callback is not a function");
r = (r == null ? Kc() : +r) + (e == null ? 0 : +e), !this._next && ql !== this && (ql ? ql._next = this : Hh = this, ql = this), this._call = t, this._time = r, ym();
},
stop: function() {
this._call && (this._call = null, this._time = 1 / 0, ym());
}
};
function x1(t, e, r) {
var n = new xc();
return n.restart(t, e, r), n;
}
function V9() {
Kc(), ++Oo;
for (var t = Hh, e; t; )
(e = Rs - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
--Oo;
}
function U_() {
Rs = (Gh = vc.now()) + v1, Oo = Pl = 0;
try {
V9();
} finally {
Oo = 0, tD(), Rs = 0;
}
}
function JB() {
var t = vc.now(), e = t - Gh;
e > P9 && (v1 -= e, Gh = t);
}
function tD() {
for (var t, e = Hh, r, n = 1 / 0; e; )
e._call ? (n > e._time && (n = e._time), t = e, e = e._next) : (r = e._next, e._next = null, e = t ? t._next = r : Hh = r);
ql = t, ym(n);
}
function ym(t) {
if (!Oo) {
Pl && (Pl = clearTimeout(Pl));
var e = t - Rs;
e > 24 ? (t < 1 / 0 && (Pl = setTimeout(U_, t - vc.now() - v1)), kl && (kl = clearInterval(kl))) : (kl || (Gh = vc.now(), kl = setInterval(JB, P9)), Oo = 1, q9(U_));
}
}
function mm(t, e, r) {
var n = new xc();
return e = e == null ? 0 : +e, n.restart((i) => {
n.stop(), t(i + e);
}, e, r), n;
}
function eD(t, e, r) {
var n = new xc(), i = e;
return e == null ? (n.restart(t, e, r), n) : (n._restart = n.restart, n.restart = function(a, s, o) {
s = +s, o = o == null ? Kc() : +o, n._restart(function l(u) {
u += i, n._restart(l, i += s, o), a(u);
}, s, o);
}, n.restart(t, e, r), n);
}
var rD = Ws("start", "end", "cancel", "interrupt"), nD = [], z9 = 0, bm = 1, _m = 2, ph = 3, W_ = 4, vm = 5, gh = 6;
function k1(t, e, r, n, i, a) {
var s = t.__transition;
if (!s)
t.__transition = {};
else if (r in s)
return;
iD(t, r, {
name: e,
index: n,
group: i,
on: rD,
tween: nD,
time: a.time,
delay: a.delay,
duration: a.duration,
ease: a.ease,
timer: null,
state: z9
});
}
function t3(t, e) {
var r = fi(t, e);
if (r.state > z9)
throw new Error("too late; already scheduled");
return r;
}
function zi(t, e) {
var r = fi(t, e);
if (r.state > ph)
throw new Error("too late; already running");
return r;
}
function fi(t, e) {
var r = t.__transition;
if (!r || !(r = r[e]))
throw new Error("transition not found");
return r;
}
function iD(t, e, r) {
var n = t.__transition, i;
n[e] = r, r.timer = x1(a, 0, r.time);
function a(u) {
r.state = bm, r.timer.restart(s, r.delay, r.time), r.delay <= u && s(u - r.delay);
}
function s(u) {
var h, d, f, p;
if (r.state !== bm)
return l();
for (h in n)
if (p = n[h], p.name === r.name) {
if (p.state === ph)
return mm(s);
p.state === W_ ? (p.state = gh, p.timer.stop(), p.on.call("interrupt", t, t.__data__, p.index, p.group), delete n[h]) : +h < e && (p.state = gh, p.timer.stop(), p.on.call("cancel", t, t.__data__, p.index, p.group), delete n[h]);
}
if (mm(function() {
r.state === ph && (r.state = W_, r.timer.restart(o, r.delay, r.time), o(u));
}), r.state = _m, r.on.call("start", t, t.__data__, r.index, r.group), r.state === _m) {
for (r.state = ph, i = new Array(f = r.tween.length), h = 0, d = -1; h < f; ++h)
(p = r.tween[h].value.call(t, t.__data__, r.index, r.group)) && (i[++d] = p);
i.length = d + 1;
}
}
function o(u) {
for (var h = u < r.duration ? r.ease.call(null, u / r.duration) : (r.timer.restart(l), r.state = vm, 1), d = -1, f = i.length; ++d < f; )
i[d].call(t, h);
r.state === vm && (r.on.call("end", t, t.__data__, r.index, r.group), l());
}
function l() {
r.state = gh, r.timer.stop(), delete n[e];
for (var u in n)
return;
delete t.__transition;
}
}
function Es(t, e) {
var r = t.__transition, n, i, a = !0, s;
if (!!r) {
e = e == null ? null : e + "";
for (s in r) {
if ((n = r[s]).name !== e) {
a = !1;
continue;
}
i = n.state > _m && n.state < vm, n.state = gh, n.timer.stop(), n.on.call(i ? "interrupt" : "cancel", t, t.__data__, n.index, n.group), delete r[s];
}
a && delete t.__transition;
}
}
function aD(t) {
return this.each(function() {
Es(this, t);
});
}
function sD(t, e) {
var r, n;
return function() {
var i = zi(this, t), a = i.tween;
if (a !== r) {
n = r = a;
for (var s = 0, o = n.length; s < o; ++s)
if (n[s].name === e) {
n = n.slice(), n.splice(s, 1);
break;
}
}
i.tween = n;
};
}
function oD(t, e, r) {
var n, i;
if (typeof r != "function")
throw new Error();
return function() {
var a = zi(this, t), s = a.tween;
if (s !== n) {
i = (n = s).slice();
for (var o = { name: e, value: r }, l = 0, u = i.length; l < u; ++l)
if (i[l].name === e) {
i[l] = o;
break;
}
l === u && i.push(o);
}
a.tween = i;
};
}
function lD(t, e) {
var r = this._id;
if (t += "", arguments.length < 2) {
for (var n = fi(this.node(), r).tween, i = 0, a = n.length, s; i < a; ++i)
if ((s = n[i]).name === t)
return s.value;
return null;
}
return this.each((e == null ? sD : oD)(r, t, e));
}
function e3(t, e, r) {
var n = t._id;
return t.each(function() {
var i = zi(this, n);
(i.value || (i.value = {}))[e] = r.apply(this, arguments);
}), function(i) {
return fi(i, n).value[e];
};
}
function Y9(t, e) {
var r;
return (typeof e == "number" ? Dn : e instanceof Wa ? _c : (r = Wa(e)) ? (e = r, _c) : Jb)(t, e);
}
function cD(t) {
return function() {
this.removeAttribute(t);
};
}
function uD(t) {
return function() {
this.removeAttributeNS(t.space, t.local);
};
}
function hD(t, e, r) {
var n, i = r + "", a;
return function() {
var s = this.getAttribute(t);
return s === i ? null : s === n ? a : a = e(n = s, r);
};
}
function fD(t, e, r) {
var n, i = r + "", a;
return function() {
var s = this.getAttributeNS(t.space, t.local);
return s === i ? null : s === n ? a : a = e(n = s, r);
};
}
function dD(t, e, r) {
var n, i, a;
return function() {
var s, o = r(this), l;
return o == null ? void this.removeAttribute(t) : (s = this.getAttribute(t), l = o + "", s === l ? null : s === n && l === i ? a : (i = l, a = e(n = s, o)));
};
}
function pD(t, e, r) {
var n, i, a;
return function() {
var s, o = r(this), l;
return o == null ? void this.removeAttributeNS(t.space, t.local) : (s = this.getAttributeNS(t.space, t.local), l = o + "", s === l ? null : s === n && l === i ? a : (i = l, a = e(n = s, o)));
};
}
function gD(t, e) {
var r = $c(t), n = r === "transform" ? R9 : Y9;
return this.attrTween(t, typeof e == "function" ? (r.local ? pD : dD)(r, n, e3(this, "attr." + t, e)) : e == null ? (r.local ? uD : cD)(r) : (r.local ? fD : hD)(r, n, e));
}
function yD(t, e) {
return function(r) {
this.setAttribute(t, e.call(this, r));
};
}
function mD(t, e) {
return function(r) {
this.setAttributeNS(t.space, t.local, e.call(this, r));
};
}
function bD(t, e) {
var r, n;
function i() {
var a = e.apply(this, arguments);
return a !== n && (r = (n = a) && mD(t, a)), r;
}
return i._value = e, i;
}
function _D(t, e) {
var r, n;
function i() {
var a = e.apply(this, arguments);
return a !== n && (r = (n = a) && yD(t, a)), r;
}
return i._value = e, i;
}
function vD(t, e) {
var r = "attr." + t;
if (arguments.length < 2)
return (r = this.tween(r)) && r._value;
if (e == null)
return this.tween(r, null);
if (typeof e != "function")
throw new Error();
var n = $c(t);
return this.tween(r, (n.local ? bD : _D)(n, e));
}
function xD(t, e) {
return function() {
t3(this, t).delay = +e.apply(this, arguments);
};
}
function kD(t, e) {
return e = +e, function() {
t3(this, t).delay = e;
};
}
function wD(t) {
var e = this._id;
return arguments.length ? this.each((typeof t == "function" ? xD : kD)(e, t)) : fi(this.node(), e).delay;
}
function TD(t, e) {
return function() {
zi(this, t).duration = +e.apply(this, arguments);
};
}
function ED(t, e) {
return e = +e, function() {
zi(this, t).duration = e;
};
}
function CD(t) {
var e = this._id;
return arguments.length ? this.each((typeof t == "function" ? TD : ED)(e, t)) : fi(this.node(), e).duration;
}
function SD(t, e) {
if (typeof e != "function")
throw new Error();
return function() {
zi(this, t).ease = e;
};
}
function AD(t) {
var e = this._id;
return arguments.length ? this.each(SD(e, t)) : fi(this.node(), e).ease;
}
function MD(t, e) {
return function() {
var r = e.apply(this, arguments);
if (typeof r != "function")
throw new Error();
zi(this, t).ease = r;
};
}
function LD(t) {
if (typeof t != "function")
throw new Error();
return this.each(MD(this._id, t));
}
function RD(t) {
typeof t != "function" && (t = Hb(t));
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
for (var a = e[i], s = a.length, o = n[i] = [], l, u = 0; u < s; ++u)
(l = a[u]) && t.call(l, l.__data__, u, a) && o.push(l);
return new Di(n, this._parents, this._name, this._id);
}
function ID(t) {
if (t._id !== this._id)
throw new Error();
for (var e = this._groups, r = t._groups, n = e.length, i = r.length, a = Math.min(n, i), s = new Array(n), o = 0; o < a; ++o)
for (var l = e[o], u = r[o], h = l.length, d = s[o] = new Array(h), f, p = 0; p < h; ++p)
(f = l[p] || u[p]) && (d[p] = f);
for (; o < n; ++o)
s[o] = e[o];
return new Di(s, this._parents, this._name, this._id);
}
function ND(t) {
return (t + "").trim().split(/^|\s+/).every(function(e) {
var r = e.indexOf(".");
return r >= 0 && (e = e.slice(0, r)), !e || e === "start";
});
}
function BD(t, e, r) {
var n, i, a = ND(e) ? t3 : zi;
return function() {
var s = a(this, t), o = s.on;
o !== n && (i = (n = o).copy()).on(e, r), s.on = i;
};
}
function DD(t, e) {
var r = this._id;
return arguments.length < 2 ? fi(this.node(), r).on.on(t) : this.each(BD(r, t, e));
}
function OD(t) {
return function() {
var e = this.parentNode;
for (var r in this.__transition)
if (+r !== t)
return;
e && e.removeChild(this);
};
}
function FD() {
return this.on("end.remove", OD(this._id));
}
function PD(t) {
var e = this._name, r = this._id;
typeof t != "function" && (t = h1(t));
for (var n = this._groups, i = n.length, a = new Array(i), s = 0; s < i; ++s)
for (var o = n[s], l = o.length, u = a[s] = new Array(l), h, d, f = 0; f < l; ++f)
(h = o[f]) && (d = t.call(h, h.__data__, f, o)) && ("__data__" in h && (d.__data__ = h.__data__), u[f] = d, k1(u[f], e, r, f, u, fi(h, r)));
return new Di(a, this._parents, e, r);
}
function qD(t) {
var e = this._name, r = this._id;
typeof t != "function" && (t = Wb(t));
for (var n = this._groups, i = n.length, a = [], s = [], o = 0; o < i; ++o)
for (var l = n[o], u = l.length, h, d = 0; d < u; ++d)
if (h = l[d]) {
for (var f = t.call(h, h.__data__, d, l), p, m = fi(h, r), _ = 0, y = f.length; _ < y; ++_)
(p = f[_]) && k1(p, e, r, _, f, m);
a.push(f), s.push(h);
}
return new Di(a, s, e, r);
}
var VD = Hs.prototype.constructor;
function zD() {
return new VD(this._groups, this._parents);
}
function YD(t, e) {
var r, n, i;
return function() {
var a = Ms(this, t), s = (this.style.removeProperty(t), Ms(this, t));
return a === s ? null : a === r && s === n ? i : i = e(r = a, n = s);
};
}
function U9(t) {
return function() {
this.style.removeProperty(t);
};
}
function UD(t, e, r) {
var n, i = r + "", a;
return function() {
var s = Ms(this, t);
return s === i ? null : s === n ? a : a = e(n = s, r);
};
}
function WD(t, e, r) {
var n, i, a;
return function() {
var s = Ms(this, t), o = r(this), l = o + "";
return o == null && (l = o = (this.style.removeProperty(t), Ms(this, t))), s === l ? null : s === n && l === i ? a : (i = l, a = e(n = s, o));
};
}
function HD(t, e) {
var r, n, i, a = "style." + e, s = "end." + a, o;
return function() {
var l = zi(this, t), u = l.on, h = l.value[a] == null ? o || (o = U9(e)) : void 0;
(u !== r || i !== h) && (n = (r = u).copy()).on(s, i = h), l.on = n;
};
}
function GD(t, e, r) {
var n = (t += "") == "transform" ? L9 : Y9;
return e == null ? this.styleTween(t, YD(t, n)).on("end.style." + t, U9(t)) : typeof e == "function" ? this.styleTween(t, WD(t, n, e3(this, "style." + t, e))).each(HD(this._id, t)) : this.styleTween(t, UD(t, n, e), r).on("end.style." + t, null);
}
function jD(t, e, r) {
return function(n) {
this.style.setProperty(t, e.call(this, n), r);
};
}
function $D(t, e, r) {
var n, i;
function a() {
var s = e.apply(this, arguments);
return s !== i && (n = (i = s) && jD(t, s, r)), n;
}
return a._value = e, a;
}
function XD(t, e, r) {
var n = "style." + (t += "");
if (arguments.length < 2)
return (n = this.tween(n)) && n._value;
if (e == null)
return this.tween(n, null);
if (typeof e != "function")
throw new Error();
return this.tween(n, $D(t, e, r == null ? "" : r));
}
function KD(t) {
return function() {
this.textContent = t;
};
}
function ZD(t) {
return function() {
var e = t(this);
this.textContent = e == null ? "" : e;
};
}
function QD(t) {
return this.tween("text", typeof t == "function" ? ZD(e3(this, "text", t)) : KD(t == null ? "" : t + ""));
}
function JD(t) {
return function(e) {
this.textContent = t.call(this, e);
};
}
function tO(t) {
var e, r;
function n() {
var i = t.apply(this, arguments);
return i !== r && (e = (r = i) && JD(i)), e;
}
return n._value = t, n;
}
function eO(t) {
var e = "text";
if (arguments.length < 1)
return (e = this.tween(e)) && e._value;
if (t == null)
return this.tween(e, null);
if (typeof t != "function")
throw new Error();
return this.tween(e, tO(t));
}
function rO() {
for (var t = this._name, e = this._id, r = H9(), n = this._groups, i = n.length, a = 0; a < i; ++a)
for (var s = n[a], o = s.length, l, u = 0; u < o; ++u)
if (l = s[u]) {
var h = fi(l, e);
k1(l, t, r, u, s, {
time: h.time + h.delay + h.duration,
delay: 0,
duration: h.duration,
ease: h.ease
});
}
return new Di(n, this._parents, t, r);
}
function nO() {
var t, e, r = this, n = r._id, i = r.size();
return new Promise(function(a, s) {
var o = { value: s }, l = { value: function() {
--i === 0 && a();
} };
r.each(function() {
var u = zi(this, n), h = u.on;
h !== t && (e = (t = h).copy(), e._.cancel.push(o), e._.interrupt.push(o), e._.end.push(l)), u.on = e;
}), i === 0 && a();
});
}
var iO = 0;
function Di(t, e, r, n) {
this._groups = t, this._parents = e, this._name = r, this._id = n;
}
function W9(t) {
return Hs().transition(t);
}
function H9() {
return ++iO;
}
var Qi = Hs.prototype;
Di.prototype = W9.prototype = {
constructor: Di,
select: PD,
selectAll: qD,
selectChild: Qi.selectChild,
selectChildren: Qi.selectChildren,
filter: RD,
merge: ID,
selection: zD,
transition: rO,
call: Qi.call,
nodes: Qi.nodes,
node: Qi.node,
size: Qi.size,
empty: Qi.empty,
each: Qi.each,
on: DD,
attr: gD,
attrTween: vD,
style: GD,
styleTween: XD,
text: QD,
textTween: eO,
remove: FD,
tween: lD,
delay: wD,
duration: CD,
ease: AD,
easeVarying: LD,
end: nO,
[Symbol.iterator]: Qi[Symbol.iterator]
};
const aO = (t) => +t;
function sO(t) {
return t * t;
}
function oO(t) {
return t * (2 - t);
}
function H_(t) {
return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
}
function lO(t) {
return t * t * t;
}
function cO(t) {
return --t * t * t + 1;
}
function xm(t) {
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
}
var r3 = 3, uO = function t(e) {
e = +e;
function r(n) {
return Math.pow(n, e);
}
return r.exponent = t, r;
}(r3), hO = function t(e) {
e = +e;
function r(n) {
return 1 - Math.pow(1 - n, e);
}
return r.exponent = t, r;
}(r3), G_ = function t(e) {
e = +e;
function r(n) {
return ((n *= 2) <= 1 ? Math.pow(n, e) : 2 - Math.pow(2 - n, e)) / 2;
}
return r.exponent = t, r;
}(r3), G9 = Math.PI, j9 = G9 / 2;
function fO(t) {
return +t == 1 ? 1 : 1 - Math.cos(t * j9);
}
function dO(t) {
return Math.sin(t * j9);
}
function j_(t) {
return (1 - Math.cos(G9 * t)) / 2;
}
function Ha(t) {
return (Math.pow(2, -10 * t) - 9765625e-10) * 1.0009775171065494;
}
function pO(t) {
return Ha(1 - +t);
}
function gO(t) {
return 1 - Ha(t);
}
function $_(t) {
return ((t *= 2) <= 1 ? Ha(1 - t) : 2 - Ha(t - 1)) / 2;
}
function yO(t) {
return 1 - Math.sqrt(1 - t * t);
}
function mO(t) {
return Math.sqrt(1 - --t * t);
}
function X_(t) {
return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
}
var km = 4 / 11, bO = 6 / 11, _O = 8 / 11, vO = 3 / 4, xO = 9 / 11, kO = 10 / 11, wO = 15 / 16, TO = 21 / 22, EO = 63 / 64, Iu = 1 / km / km;
function CO(t) {
return 1 - kc(1 - t);
}
function kc(t) {
return (t = +t) < km ? Iu * t * t : t < _O ? Iu * (t -= bO) * t + vO : t < kO ? Iu * (t -= xO) * t + wO : Iu * (t -= TO) * t + EO;
}
function SO(t) {
return ((t *= 2) <= 1 ? 1 - kc(1 - t) : kc(t - 1) + 1) / 2;
}
var n3 = 1.70158, AO = function t(e) {
e = +e;
function r(n) {
return (n = +n) * n * (e * (n - 1) + n);
}
return r.overshoot = t, r;
}(n3), MO = function t(e) {
e = +e;
function r(n) {
return --n * n * ((n + 1) * e + n) + 1;
}
return r.overshoot = t, r;
}(n3), K_ = function t(e) {
e = +e;
function r(n) {
return ((n *= 2) < 1 ? n * n * ((e + 1) * n - e) : (n -= 2) * n * ((e + 1) * n + e) + 2) / 2;
}
return r.overshoot = t, r;
}(n3), Fo = 2 * Math.PI, i3 = 1, a3 = 0.3, LO = function t(e, r) {
var n = Math.asin(1 / (e = Math.max(1, e))) * (r /= Fo);
function i(a) {
return e * Ha(- --a) * Math.sin((n - a) / r);
}
return i.amplitude = function(a) {
return t(a, r * Fo);
}, i.period = function(a) {
return t(e, a);
}, i;
}(i3, a3), Z_ = function t(e, r) {
var n = Math.asin(1 / (e = Math.max(1, e))) * (r /= Fo);
function i(a) {
return 1 - e * Ha(a = +a) * Math.sin((a + n) / r);
}
return i.amplitude = function(a) {
return t(a, r * Fo);
}, i.period = function(a) {
return t(e, a);
}, i;
}(i3, a3), RO = function t(e, r) {
var n = Math.asin(1 / (e = Math.max(1, e))) * (r /= Fo);
function i(a) {
return ((a = a * 2 - 1) < 0 ? e * Ha(-a) * Math.sin((n - a) / r) : 2 - e * Ha(a) * Math.sin((n + a) / r)) / 2;
}
return i.amplitude = function(a) {
return t(a, r * Fo);
}, i.period = function(a) {
return t(e, a);
}, i;
}(i3, a3), IO = {
time: null,
delay: 0,
duration: 250,
ease: xm
};
function NO(t, e) {
for (var r; !(r = t.__transition) || !(r = r[e]); )
if (!(t = t.parentNode))
throw new Error(`transition ${e} not found`);
return r;
}
function BO(t) {
var e, r;
t instanceof Di ? (e = t._id, t = t._name) : (e = H9(), (r = IO).time = Kc(), t = t == null ? null : t + "");
for (var n = this._groups, i = n.length, a = 0; a < i; ++a)
for (var s = n[a], o = s.length, l, u = 0; u < o; ++u)
(l = s[u]) && k1(l, t, e, u, s, r || NO(l, e));
return new Di(n, this._parents, t, e);
}
Hs.prototype.interrupt = aD;
Hs.prototype.transition = BO;
var DO = [null];
function OO(t, e) {
var r = t.__transition, n, i;
if (r) {
e = e == null ? null : e + "";
for (i in r)
if ((n = r[i]).state > bm && n.name === e)
return new Di([[t]], DO, e, +i);
}
return null;
}
const j0 = (t) => () => t;
function FO(t, {
sourceEvent: e,
target: r,
selection: n,
mode: i,
dispatch: a
}) {
Object.defineProperties(this, {
type: { value: t, enumerable: !0, configurable: !0 },
sourceEvent: { value: e, enumerable: !0, configurable: !0 },
target: { value: r, enumerable: !0, configurable: !0 },
selection: { value: n, enumerable: !0, configurable: !0 },
mode: { value: i, enumerable: !0, configurable: !0 },
_: { value: a }
});
}
function PO(t) {
t.stopImmediatePropagation();
}
function $0(t) {
t.preventDefault(), t.stopImmediatePropagation();
}
var Q_ = { name: "drag" }, X0 = { name: "space" }, oo = { name: "handle" }, lo = { name: "center" };
const { abs: J_, max: Pr, min: qr } = Math;
function t5(t) {
return [+t[0], +t[1]];
}
function wm(t) {
return [t5(t[0]), t5(t[1])];
}
var yh = {
name: "x",
handles: ["w", "e"].map(wc),
input: function(t, e) {
return t == null ? null : [[+t[0], e[0][1]], [+t[1], e[1][1]]];
},
output: function(t) {
return t && [t[0][0], t[1][0]];
}
}, mh = {
name: "y",
handles: ["n", "s"].map(wc),
input: function(t, e) {
return t == null ? null : [[e[0][0], +t[0]], [e[1][0], +t[1]]];
},
output: function(t) {
return t && [t[0][1], t[1][1]];
}
}, qO = {
name: "xy",
handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(wc),
input: function(t) {
return t == null ? null : wm(t);
},
output: function(t) {
return t;
}
}, Ji = {
overlay: "crosshair",
selection: "move",
n: "ns-resize",
e: "ew-resize",
s: "ns-resize",
w: "ew-resize",
nw: "nwse-resize",
ne: "nesw-resize",
se: "nwse-resize",
sw: "nesw-resize"
}, e5 = {
e: "w",
w: "e",
nw: "ne",
ne: "nw",
se: "sw",
sw: "se"
}, r5 = {
n: "s",
s: "n",
nw: "sw",
ne: "se",
se: "ne",
sw: "nw"
}, VO = {
overlay: 1,
selection: 1,
n: null,
e: 1,
s: null,
w: -1,
nw: -1,
ne: 1,
se: 1,
sw: -1
}, zO = {
overlay: 1,
selection: 1,
n: -1,
e: null,
s: 1,
w: null,
nw: -1,
ne: -1,
se: 1,
sw: 1
};
function wc(t) {
return { type: t };
}
function YO(t) {
return !t.ctrlKey && !t.button;
}
function UO() {
var t = this.ownerSVGElement || this;
return t.hasAttribute("viewBox") ? (t = t.viewBox.baseVal, [[t.x, t.y], [t.x + t.width, t.y + t.height]]) : [[0, 0], [t.width.baseVal.value, t.height.baseVal.value]];
}
function WO() {
return navigator.maxTouchPoints || "ontouchstart" in this;
}
function K0(t) {
for (; !t.__brush; )
if (!(t = t.parentNode))
return;
return t.__brush;
}
function HO(t) {
return t[0][0] === t[1][0] || t[0][1] === t[1][1];
}
function GO(t) {
var e = t.__brush;
return e ? e.dim.output(e.selection) : null;
}
function jO() {
return s3(yh);
}
function $O() {
return s3(mh);
}
function XO() {
return s3(qO);
}
function s3(t) {
var e = UO, r = YO, n = WO, i = !0, a = Ws("start", "brush", "end"), s = 6, o;
function l(y) {
var b = y.property("__brush", _).selectAll(".overlay").data([wc("overlay")]);
b.enter().append("rect").attr("class", "overlay").attr("pointer-events", "all").attr("cursor", Ji.overlay).merge(b).each(function() {
var k = K0(this).extent;
St(this).attr("x", k[0][0]).attr("y", k[0][1]).attr("width", k[1][0] - k[0][0]).attr("height", k[1][1] - k[0][1]);
}), y.selectAll(".selection").data([wc("selection")]).enter().append("rect").attr("class", "selection").attr("cursor", Ji.selection).attr("fill", "#777").attr("fill-opacity", 0.3).attr("stroke", "#fff").attr("shape-rendering", "crispEdges");
var x = y.selectAll(".handle").data(t.handles, function(k) {
return k.type;
});
x.exit().remove(), x.enter().append("rect").attr("class", function(k) {
return "handle handle--" + k.type;
}).attr("cursor", function(k) {
return Ji[k.type];
}), y.each(u).attr("fill", "none").attr("pointer-events", "all").on("mousedown.brush", f).filter(n).on("touchstart.brush", f).on("touchmove.brush", p).on("touchend.brush touchcancel.brush", m).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
}
l.move = function(y, b, x) {
y.tween ? y.on("start.brush", function(k) {
h(this, arguments).beforestart().start(k);
}).on("interrupt.brush end.brush", function(k) {
h(this, arguments).end(k);
}).tween("brush", function() {
var k = this, T = k.__brush, C = h(k, arguments), M = T.selection, S = t.input(typeof b == "function" ? b.apply(this, arguments) : b, T.extent), R = Ja(M, S);
function A(L) {
T.selection = L === 1 && S === null ? null : R(L), u.call(k), C.brush();
}
return M !== null && S !== null ? A : A(1);
}) : y.each(function() {
var k = this, T = arguments, C = k.__brush, M = t.input(typeof b == "function" ? b.apply(k, T) : b, C.extent), S = h(k, T).beforestart();
Es(k), C.selection = M === null ? null : M, u.call(k), S.start(x).brush(x).end(x);
});
}, l.clear = function(y, b) {
l.move(y, null, b);
};
function u() {
var y = St(this), b = K0(this).selection;
b ? (y.selectAll(".selection").style("display", null).attr("x", b[0][0]).attr("y", b[0][1]).attr("width", b[1][0] - b[0][0]).attr("height", b[1][1] - b[0][1]), y.selectAll(".handle").style("display", null).attr("x", function(x) {
return x.type[x.type.length - 1] === "e" ? b[1][0] - s / 2 : b[0][0] - s / 2;
}).attr("y", function(x) {
return x.type[0] === "s" ? b[1][1] - s / 2 : b[0][1] - s / 2;
}).attr("width", function(x) {
return x.type === "n" || x.type === "s" ? b[1][0] - b[0][0] + s : s;
}).attr("height", function(x) {
return x.type === "e" || x.type === "w" ? b[1][1] - b[0][1] + s : s;
})) : y.selectAll(".selection,.handle").style("display", "none").attr("x", null).attr("y", null).attr("width", null).attr("height", null);
}
function h(y, b, x) {
var k = y.__brush.emitter;
return k && (!x || !k.clean) ? k : new d(y, b, x);
}
function d(y, b, x) {
this.that = y, this.args = b, this.state = y.__brush, this.active = 0, this.clean = x;
}
d.prototype = {
beforestart: function() {
return ++this.active === 1 && (this.state.emitter = this, this.starting = !0), this;
},
start: function(y, b) {
return this.starting ? (this.starting = !1, this.emit("start", y, b)) : this.emit("brush", y), this;
},
brush: function(y, b) {
return this.emit("brush", y, b), this;
},
end: function(y, b) {
return --this.active === 0 && (delete this.state.emitter, this.emit("end", y, b)), this;
},
emit: function(y, b, x) {
var k = St(this.that).datum();
a.call(
y,
this.that,
new FO(y, {
sourceEvent: b,
target: l,
selection: t.output(this.state.selection),
mode: x,
dispatch: a
}),
k
);
}
};
function f(y) {
if (o && !y.touches || !r.apply(this, arguments))
return;
var b = this, x = y.target.__data__.type, k = (i && y.metaKey ? x = "overlay" : x) === "selection" ? Q_ : i && y.altKey ? lo : oo, T = t === mh ? null : VO[x], C = t === yh ? null : zO[x], M = K0(b), S = M.extent, R = M.selection, A = S[0][0], L, v, B = S[0][1], w, D, N = S[1][0], z, X, ct = S[1][1], J, Y, $ = 0, lt = 0, ut, W = T && C && i && y.shiftKey, tt, K, it = Array.from(y.touches || [y], (at) => {
const It = at.identifier;
return at = Cn(at, b), at.point0 = at.slice(), at.identifier = It, at;
});
Es(b);
var Z = h(b, arguments, !0).beforestart();
if (x === "overlay") {
R && (ut = !0);
const at = [it[0], it[1] || it[0]];
M.selection = R = [[
L = t === mh ? A : qr(at[0][0], at[1][0]),
w = t === yh ? B : qr(at[0][1], at[1][1])
], [
z = t === mh ? N : Pr(at[0][0], at[1][0]),
J = t === yh ? ct : Pr(at[0][1], at[1][1])
]], it.length > 1 && F(y);
} else
L = R[0][0], w = R[0][1], z = R[1][0], J = R[1][1];
v = L, D = w, X = z, Y = J;
var V = St(b).attr("pointer-events", "none"), Q = V.selectAll(".overlay").attr("cursor", Ji[x]);
if (y.touches)
Z.moved = U, Z.ended = j;
else {
var q = St(y.view).on("mousemove.brush", U, !0).on("mouseup.brush", j, !0);
i && q.on("keydown.brush", P, !0).on("keyup.brush", et, !0), d1(y.view);
}
u.call(b), Z.start(y, k.name);
function U(at) {
for (const It of at.changedTouches || [at])
for (const Lt of it)
Lt.identifier === It.identifier && (Lt.cur = Cn(It, b));
if (W && !tt && !K && it.length === 1) {
const It = it[0];
J_(It.cur[0] - It[0]) > J_(It.cur[1] - It[1]) ? K = !0 : tt = !0;
}
for (const It of it)
It.cur && (It[0] = It.cur[0], It[1] = It.cur[1]);
ut = !0, $0(at), F(at);
}
function F(at) {
const It = it[0], Lt = It.point0;
var Rt;
switch ($ = It[0] - Lt[0], lt = It[1] - Lt[1], k) {
case X0:
case Q_: {
T && ($ = Pr(A - L, qr(N - z, $)), v = L + $, X = z + $), C && (lt = Pr(B - w, qr(ct - J, lt)), D = w + lt, Y = J + lt);
break;
}
case oo: {
it[1] ? (T && (v = Pr(A, qr(N, it[0][0])), X = Pr(A, qr(N, it[1][0])), T = 1), C && (D = Pr(B, qr(ct, it[0][1])), Y = Pr(B, qr(ct, it[1][1])), C = 1)) : (T < 0 ? ($ = Pr(A - L, qr(N - L, $)), v = L + $, X = z) : T > 0 && ($ = Pr(A - z, qr(N - z, $)), v = L, X = z + $), C < 0 ? (lt = Pr(B - w, qr(ct - w, lt)), D = w + lt, Y = J) : C > 0 && (lt = Pr(B - J, qr(ct - J, lt)), D = w, Y = J + lt));
break;
}
case lo: {
T && (v = Pr(A, qr(N, L - $ * T)), X = Pr(A, qr(N, z + $ * T))), C && (D = Pr(B, qr(ct, w - lt * C)), Y = Pr(B, qr(ct, J + lt * C)));
break;
}
}
X < v && (T *= -1, Rt = L, L = z, z = Rt, Rt = v, v = X, X = Rt, x in e5 && Q.attr("cursor", Ji[x = e5[x]])), Y < D && (C *= -1, Rt = w, w = J, J = Rt, Rt = D, D = Y, Y = Rt, x in r5 && Q.attr("cursor", Ji[x = r5[x]])), M.selection && (R = M.selection), tt && (v = R[0][0], X = R[1][0]), K && (D = R[0][1], Y = R[1][1]), (R[0][0] !== v || R[0][1] !== D || R[1][0] !== X || R[1][1] !== Y) && (M.selection = [[v, D], [X, Y]], u.call(b), Z.brush(at, k.name));
}
function j(at) {
if (PO(at), at.touches) {
if (at.touches.length)
return;
o && clearTimeout(o), o = setTimeout(function() {
o = null;
}, 500);
} else
p1(at.view, ut), q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null);
V.attr("pointer-events", "all"), Q.attr("cursor", Ji.overlay), M.selection && (R = M.selection), HO(R) && (M.selection = null, u.call(b)), Z.end(at, k.name);
}
function P(at) {
switch (at.keyCode) {
case 16: {
W = T && C;
break;
}
case 18: {
k === oo && (T && (z = X - $ * T, L = v + $ * T), C && (J = Y - lt * C, w = D + lt * C), k = lo, F(at));
break;
}
case 32: {
(k === oo || k === lo) && (T < 0 ? z = X - $ : T > 0 && (L = v - $), C < 0 ? J = Y - lt : C > 0 && (w = D - lt), k = X0, Q.attr("cursor", Ji.selection), F(at));
break;
}
default:
return;
}
$0(at);
}
function et(at) {
switch (at.keyCode) {
case 16: {
W && (tt = K = W = !1, F(at));
break;
}
case 18: {
k === lo && (T < 0 ? z = X : T > 0 && (L = v), C < 0 ? J = Y : C > 0 && (w = D), k = oo, F(at));
break;
}
case 32: {
k === X0 && (at.altKey ? (T && (z = X - $ * T, L = v + $ * T), C && (J = Y - lt * C, w = D + lt * C), k = lo) : (T < 0 ? z = X : T > 0 && (L = v), C < 0 ? J = Y : C > 0 && (w = D), k = oo), Q.attr("cursor", Ji[x]), F(at));
break;
}
default:
return;
}
$0(at);
}
}
function p(y) {
h(this, arguments).moved(y);
}
function m(y) {
h(this, arguments).ended(y);
}
function _() {
var y = this.__brush || { selection: null };
return y.extent = wm(e.apply(this, arguments)), y.dim = t, y;
}
return l.extent = function(y) {
return arguments.length ? (e = typeof y == "function" ? y : j0(wm(y)), l) : e;
}, l.filter = function(y) {
return arguments.length ? (r = typeof y == "function" ? y : j0(!!y), l) : r;
}, l.touchable = function(y) {
return arguments.length ? (n = typeof y == "function" ? y : j0(!!y), l) : n;
}, l.handleSize = function(y) {
return arguments.length ? (s = +y, l) : s;
}, l.keyModifiers = function(y) {
return arguments.length ? (i = !!y, l) : i;
}, l.on = function() {
var y = a.on.apply(a, arguments);
return y === a ? l : y;
}, l;
}
var n5 = Math.abs, co = Math.cos, uo = Math.sin, $9 = Math.PI, Nu = $9 / 2, i5 = $9 * 2, a5 = Math.max, Z0 = 1e-12;
function Q0(t, e) {
return Array.from({ length: e - t }, (r, n) => t + n);
}
function KO(t) {
return function(e, r) {
return t(
e.source.value + e.target.value,
r.source.value + r.target.value
);
};
}
function ZO() {
return o3(!1, !1);
}
function QO() {
return o3(!1, !0);
}
function JO() {
return o3(!0, !1);
}
function o3(t, e) {
var r = 0, n = null, i = null, a = null;
function s(o) {
var l = o.length, u = new Array(l), h = Q0(0, l), d = new Array(l * l), f = new Array(l), p = 0, m;
o = Float64Array.from({ length: l * l }, e ? (_, y) => o[y % l][y / l | 0] : (_, y) => o[y / l | 0][y % l]);
for (let _ = 0; _ < l; ++_) {
let y = 0;
for (let b = 0; b < l; ++b)
y += o[_ * l + b] + t * o[b * l + _];
p += u[_] = y;
}
p = a5(0, i5 - r * l) / p, m = p ? r : i5 / l;
{
let _ = 0;
n && h.sort((y, b) => n(u[y], u[b]));
for (const y of h) {
const b = _;
if (t) {
const x = Q0(~l + 1, l).filter((k) => k < 0 ? o[~k * l + y] : o[y * l + k]);
i && x.sort((k, T) => i(k < 0 ? -o[~k * l + y] : o[y * l + k], T < 0 ? -o[~T * l + y] : o[y * l + T]));
for (const k of x)
if (k < 0) {
const T = d[~k * l + y] || (d[~k * l + y] = { source: null, target: null });
T.target = { index: y, startAngle: _, endAngle: _ += o[~k * l + y] * p, value: o[~k * l + y] };
} else {
const T = d[y * l + k] || (d[y * l + k] = { source: null, target: null });
T.source = { index: y, startAngle: _, endAngle: _ += o[y * l + k] * p, value: o[y * l + k] };
}
f[y] = { index: y, startAngle: b, endAngle: _, value: u[y] };
} else {
const x = Q0(0, l).filter((k) => o[y * l + k] || o[k * l + y]);
i && x.sort((k, T) => i(o[y * l + k], o[y * l + T]));
for (const k of x) {
let T;
if (y < k ? (T = d[y * l + k] || (d[y * l + k] = { source: null, target: null }), T.source = { index: y, startAngle: _, endAngle: _ += o[y * l + k] * p, value: o[y * l + k] }) : (T = d[k * l + y] || (d[k * l + y] = { source: null, target: null }), T.target = { index: y, startAngle: _, endAngle: _ += o[y * l + k] * p, value: o[y * l + k] }, y === k && (T.source = T.target)), T.source && T.target && T.source.value < T.target.value) {
const C = T.source;
T.source = T.target, T.target = C;
}
}
f[y] = { index: y, startAngle: b, endAngle: _, value: u[y] };
}
_ += m;
}
}
return d = Object.values(d), d.groups = f, a ? d.sort(a) : d;
}
return s.padAngle = function(o) {
return arguments.length ? (r = a5(0, o), s) : r;
}, s.sortGroups = function(o) {
return arguments.length ? (n = o, s) : n;
}, s.sortSubgroups = function(o) {
return arguments.length ? (i = o, s) : i;
}, s.sortChords = function(o) {
return arguments.length ? (o == null ? a = null : (a = KO(o))._ = o, s) : a && a._;
}, s;
}
const Tm = Math.PI, Em = 2 * Tm, ys = 1e-6, tF = Em - ys;
function Cm() {
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
}
function ts() {
return new Cm();
}
Cm.prototype = ts.prototype = {
constructor: Cm,
moveTo: function(t, e) {
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e);
},
closePath: function() {
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
},
lineTo: function(t, e) {
this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +e);
},
quadraticCurveTo: function(t, e, r, n) {
this._ += "Q" + +t + "," + +e + "," + (this._x1 = +r) + "," + (this._y1 = +n);
},
bezierCurveTo: function(t, e, r, n, i, a) {
this._ += "C" + +t + "," + +e + "," + +r + "," + +n + "," + (this._x1 = +i) + "," + (this._y1 = +a);
},
arcTo: function(t, e, r, n, i) {
t = +t, e = +e, r = +r, n = +n, i = +i;
var a = this._x1, s = this._y1, o = r - t, l = n - e, u = a - t, h = s - e, d = u * u + h * h;
if (i < 0)
throw new Error("negative radius: " + i);
if (this._x1 === null)
this._ += "M" + (this._x1 = t) + "," + (this._y1 = e);
else if (d > ys)
if (!(Math.abs(h * o - l * u) > ys) || !i)
this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
else {
var f = r - a, p = n - s, m = o * o + l * l, _ = f * f + p * p, y = Math.sqrt(m), b = Math.sqrt(d), x = i * Math.tan((Tm - Math.acos((m + d - _) / (2 * y * b))) / 2), k = x / b, T = x / y;
Math.abs(k - 1) > ys && (this._ += "L" + (t + k * u) + "," + (e + k * h)), this._ += "A" + i + "," + i + ",0,0," + +(h * f > u * p) + "," + (this._x1 = t + T * o) + "," + (this._y1 = e + T * l);
}
},
arc: function(t, e, r, n, i, a) {
t = +t, e = +e, r = +r, a = !!a;
var s = r * Math.cos(n), o = r * Math.sin(n), l = t + s, u = e + o, h = 1 ^ a, d = a ? n - i : i - n;
if (r < 0)
throw new Error("negative radius: " + r);
this._x1 === null ? this._ += "M" + l + "," + u : (Math.abs(this._x1 - l) > ys || Math.abs(this._y1 - u) > ys) && (this._ += "L" + l + "," + u), r && (d < 0 && (d = d % Em + Em), d > tF ? this._ += "A" + r + "," + r + ",0,1," + h + "," + (t - s) + "," + (e - o) + "A" + r + "," + r + ",0,1," + h + "," + (this._x1 = l) + "," + (this._y1 = u) : d > ys && (this._ += "A" + r + "," + r + ",0," + +(d >= Tm) + "," + h + "," + (this._x1 = t + r * Math.cos(i)) + "," + (this._y1 = e + r * Math.sin(i))));
},
rect: function(t, e, r, n) {
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e) + "h" + +r + "v" + +n + "h" + -r + "Z";
},
toString: function() {
return this._;
}
};
var eF = Array.prototype.slice;
function ds(t) {
return function() {
return t;
};
}
function rF(t) {
return t.source;
}
function nF(t) {
return t.target;
}
function s5(t) {
return t.radius;
}
function iF(t) {
return t.startAngle;
}
function aF(t) {
return t.endAngle;
}
function sF() {
return 0;
}
function oF() {
return 10;
}
function X9(t) {
var e = rF, r = nF, n = s5, i = s5, a = iF, s = aF, o = sF, l = null;
function u() {
var h, d = e.apply(this, arguments), f = r.apply(this, arguments), p = o.apply(this, arguments) / 2, m = eF.call(arguments), _ = +n.apply(this, (m[0] = d, m)), y = a.apply(this, m) - Nu, b = s.apply(this, m) - Nu, x = +i.apply(this, (m[0] = f, m)), k = a.apply(this, m) - Nu, T = s.apply(this, m) - Nu;
if (l || (l = h = ts()), p > Z0 && (n5(b - y) > p * 2 + Z0 ? b > y ? (y += p, b -= p) : (y -= p, b += p) : y = b = (y + b) / 2, n5(T - k) > p * 2 + Z0 ? T > k ? (k += p, T -= p) : (k -= p, T += p) : k = T = (k + T) / 2), l.moveTo(_ * co(y), _ * uo(y)), l.arc(0, 0, _, y, b), y !== k || b !== T)
if (t) {
var C = +t.apply(this, arguments), M = x - C, S = (k + T) / 2;
l.quadraticCurveTo(0, 0, M * co(k), M * uo(k)), l.lineTo(x * co(S), x * uo(S)), l.lineTo(M * co(T), M * uo(T));
} else
l.quadraticCurveTo(0, 0, x * co(k), x * uo(k)), l.arc(0, 0, x, k, T);
if (l.quadraticCurveTo(0, 0, _ * co(y), _ * uo(y)), l.closePath(), h)
return l = null, h + "" || null;
}
return t && (u.headRadius = function(h) {
return arguments.length ? (t = typeof h == "function" ? h : ds(+h), u) : t;
}), u.radius = function(h) {
return arguments.length ? (n = i = typeof h == "function" ? h : ds(+h), u) : n;
}, u.sourceRadius = function(h) {
return arguments.length ? (n = typeof h == "function" ? h : ds(+h), u) : n;
}, u.targetRadius = function(h) {
return arguments.length ? (i = typeof h == "function" ? h : ds(+h), u) : i;
}, u.startAngle = function(h) {
return arguments.length ? (a = typeof h == "function" ? h : ds(+h), u) : a;
}, u.endAngle = function(h) {
return arguments.length ? (s = typeof h == "function" ? h : ds(+h), u) : s;
}, u.padAngle = function(h) {
return arguments.length ? (o = typeof h == "function" ? h : ds(+h), u) : o;
}, u.source = function(h) {
return arguments.length ? (e = h, u) : e;
}, u.target = function(h) {
return arguments.length ? (r = h, u) : r;
}, u.context = function(h) {
return arguments.length ? (l = h == null ? null : h, u) : l;
}, u;
}
function lF() {
return X9();
}
function cF() {
return X9(oF);
}
var uF = Array.prototype, K9 = uF.slice;
function hF(t, e) {
return t - e;
}
function fF(t) {
for (var e = 0, r = t.length, n = t[r - 1][1] * t[0][0] - t[r - 1][0] * t[0][1]; ++e < r; )
n += t[e - 1][1] * t[e][0] - t[e - 1][0] * t[e][1];
return n;
}
const Ma = (t) => () => t;
function dF(t, e) {
for (var r = -1, n = e.length, i; ++r < n; )
if (i = pF(t, e[r]))
return i;
return 0;
}
function pF(t, e) {
for (var r = e[0], n = e[1], i = -1, a = 0, s = t.length, o = s - 1; a < s; o = a++) {
var l = t[a], u = l[0], h = l[1], d = t[o], f = d[0], p = d[1];
if (gF(l, d, e))
return 0;
h > n != p > n && r < (f - u) * (n - h) / (p - h) + u && (i = -i);
}
return i;
}
function gF(t, e, r) {
var n;
return yF(t, e, r) && mF(t[n = +(t[0] === e[0])], r[n], e[n]);
}
function yF(t, e, r) {
return (e[0] - t[0]) * (r[1] - t[1]) === (r[0] - t[0]) * (e[1] - t[1]);
}
function mF(t, e, r) {
return t <= e && e <= r || r <= e && e <= t;
}
function bF() {
}
var ta = [
[],
[[[1, 1.5], [0.5, 1]]],
[[[1.5, 1], [1, 1.5]]],
[[[1.5, 1], [0.5, 1]]],
[[[1, 0.5], [1.5, 1]]],
[[[1, 1.5], [0.5, 1]], [[1, 0.5], [1.5, 1]]],
[[[1, 0.5], [1, 1.5]]],
[[[1, 0.5], [0.5, 1]]],
[[[0.5, 1], [1, 0.5]]],
[[[1, 1.5], [1, 0.5]]],
[[[0.5, 1], [1, 0.5]], [[1.5, 1], [1, 1.5]]],
[[[1.5, 1], [1, 0.5]]],
[[[0.5, 1], [1.5, 1]]],
[[[1, 1.5], [1.5, 1]]],
[[[0.5, 1], [1, 1.5]]],
[]
];
function Sm() {
var t = 1, e = 1, r = Vb, n = l;
function i(u) {
var h = r(u);
if (Array.isArray(h))
h = h.slice().sort(hF);
else {
const d = Zl(u), f = dc(d[0], d[1], h);
h = As(Math.floor(d[0] / f) * f, Math.floor(d[1] / f - 1) * f, h);
}
return h.map((d) => a(u, d));
}
function a(u, h) {
var d = [], f = [];
return s(u, h, function(p) {
n(p, u, h), fF(p) > 0 ? d.push([p]) : f.push(p);
}), f.forEach(function(p) {
for (var m = 0, _ = d.length, y; m < _; ++m)
if (dF((y = d[m])[0], p) !== -1) {
y.push(p);
return;
}
}), {
type: "MultiPolygon",
value: h,
coordinates: d
};
}
function s(u, h, d) {
var f = new Array(), p = new Array(), m, _, y, b, x, k;
for (m = _ = -1, b = u[0] >= h, ta[b << 1].forEach(T); ++m < t - 1; )
y = b, b = u[m + 1] >= h, ta[y | b << 1].forEach(T);
for (ta[b << 0].forEach(T); ++_ < e - 1; ) {
for (m = -1, b = u[_ * t + t] >= h, x = u[_ * t] >= h, ta[b << 1 | x << 2].forEach(T); ++m < t - 1; )
y = b, b = u[_ * t + t + m + 1] >= h, k = x, x = u[_ * t + m + 1] >= h, ta[y | b << 1 | x << 2 | k << 3].forEach(T);
ta[b | x << 3].forEach(T);
}
for (m = -1, x = u[_ * t] >= h, ta[x << 2].forEach(T); ++m < t - 1; )
k = x, x = u[_ * t + m + 1] >= h, ta[x << 2 | k << 3].forEach(T);
ta[x << 3].forEach(T);
function T(C) {
var M = [C[0][0] + m, C[0][1] + _], S = [C[1][0] + m, C[1][1] + _], R = o(M), A = o(S), L, v;
(L = p[R]) ? (v = f[A]) ? (delete p[L.end], delete f[v.start], L === v ? (L.ring.push(S), d(L.ring)) : f[L.start] = p[v.end] = { start: L.start, end: v.end, ring: L.ring.concat(v.ring) }) : (delete p[L.end], L.ring.push(S), p[L.end = A] = L) : (L = f[A]) ? (v = p[R]) ? (delete f[L.start], delete p[v.end], L === v ? (L.ring.push(S), d(L.ring)) : f[v.start] = p[L.end] = { start: v.start, end: L.end, ring: v.ring.concat(L.ring) }) : (delete f[L.start], L.ring.unshift(M), f[L.start = R] = L) : f[R] = p[A] = { start: R, end: A, ring: [M, S] };
}
}
function o(u) {
return u[0] * 2 + u[1] * (t + 1) * 4;
}
function l(u, h, d) {
u.forEach(function(f) {
var p = f[0], m = f[1], _ = p | 0, y = m | 0, b, x = h[y * t + _];
p > 0 && p < t && _ === p && (b = h[y * t + _ - 1], f[0] = p + (d - b) / (x - b) - 0.5), m > 0 && m < e && y === m && (b = h[(y - 1) * t + _], f[1] = m + (d - b) / (x - b) - 0.5);
});
}
return i.contour = a, i.size = function(u) {
if (!arguments.length)
return [t, e];
var h = Math.floor(u[0]), d = Math.floor(u[1]);
if (!(h >= 0 && d >= 0))
throw new Error("invalid size");
return t = h, e = d, i;
}, i.thresholds = function(u) {
return arguments.length ? (r = typeof u == "function" ? u : Array.isArray(u) ? Ma(K9.call(u)) : Ma(u), i) : r;
}, i.smooth = function(u) {
return arguments.length ? (n = u ? l : bF, i) : n === l;
}, i;
}
function _F(t) {
return t[0];
}
function vF(t) {
return t[1];
}
function xF() {
return 1;
}
function kF() {
var t = _F, e = vF, r = xF, n = 960, i = 500, a = 20, s = 2, o = a * 3, l = n + o * 2 >> s, u = i + o * 2 >> s, h = Ma(20);
function d(x) {
var k = new Float32Array(l * u), T = Math.pow(2, -s), C = -1;
for (const w of x) {
var M = (t(w, ++C, x) + o) * T, S = (e(w, C, x) + o) * T, R = +r(w, C, x);
if (M >= 0 && M < l && S >= 0 && S < u) {
var A = Math.floor(M), L = Math.floor(S), v = M - A - 0.5, B = S - L - 0.5;
k[A + L * l] += (1 - v) * (1 - B) * R, k[A + 1 + L * l] += v * (1 - B) * R, k[A + 1 + (L + 1) * l] += v * B * R, k[A + (L + 1) * l] += (1 - v) * B * R;
}
}
return Cw({ data: k, width: l, height: u }, a * T), k;
}
function f(x) {
var k = d(x), T = h(k), C = Math.pow(2, 2 * s);
return Array.isArray(T) || (T = As(Number.MIN_VALUE, No(k) / C, T)), Sm().size([l, u]).thresholds(T.map((M) => M * C))(k).map((M, S) => (M.value = +T[S], p(M)));
}
f.contours = function(x) {
var k = d(x), T = Sm().size([l, u]), C = Math.pow(2, 2 * s), M = (S) => {
S = +S;
var R = p(T.contour(k, S * C));
return R.value = S, R;
};
return Object.defineProperty(M, "max", { get: () => No(k) / C }), M;
};
function p(x) {
return x.coordinates.forEach(m), x;
}
function m(x) {
x.forEach(_);
}
function _(x) {
x.forEach(y);
}
function y(x) {
x[0] = x[0] * Math.pow(2, s) - o, x[1] = x[1] * Math.pow(2, s) - o;
}
function b() {
return o = a * 3, l = n + o * 2 >> s, u = i + o * 2 >> s, f;
}
return f.x = function(x) {
return arguments.length ? (t = typeof x == "function" ? x : Ma(+x), f) : t;
}, f.y = function(x) {
return arguments.length ? (e = typeof x == "function" ? x : Ma(+x), f) : e;
}, f.weight = function(x) {
return arguments.length ? (r = typeof x == "function" ? x : Ma(+x), f) : r;
}, f.size = function(x) {
if (!arguments.length)
return [n, i];
var k = +x[0], T = +x[1];
if (!(k >= 0 && T >= 0))
throw new Error("invalid size");
return n = k, i = T, b();
}, f.cellSize = function(x) {
if (!arguments.length)
return 1 << s;
if (!((x = +x) >= 1))
throw new Error("invalid cell size");
return s = Math.floor(Math.log(x) / Math.LN2), b();
}, f.thresholds = function(x) {
return arguments.length ? (h = typeof x == "function" ? x : Array.isArray(x) ? Ma(K9.call(x)) : Ma(x), f) : h;
}, f.bandwidth = function(x) {
if (!arguments.length)
return Math.sqrt(a * (a + 1));
if (!((x = +x) >= 0))
throw new Error("invalid bandwidth");
return a = (Math.sqrt(4 * x * x + 1) - 1) / 2, b();
}, f;
}
const pa = 11102230246251565e-32, Vr = 134217729, wF = (3 + 8 * pa) * pa;
function J0(t, e, r, n, i) {
let a, s, o, l, u = e[0], h = n[0], d = 0, f = 0;
h > u == h > -u ? (a = u, u = e[++d]) : (a = h, h = n[++f]);
let p = 0;
if (d < t && f < r)
for (h > u == h > -u ? (s = u + a, o = a - (s - u), u = e[++d]) : (s = h + a, o = a - (s - h), h = n[++f]), a = s, o !== 0 && (i[p++] = o); d < t && f < r; )
h > u == h > -u ? (s = a + u, l = s - a, o = a - (s - l) + (u - l), u = e[++d]) : (s = a + h, l = s - a, o = a - (s - l) + (h - l), h = n[++f]), a = s, o !== 0 && (i[p++] = o);
for (; d < t; )
s = a + u, l = s - a, o = a - (s - l) + (u - l), u = e[++d], a = s, o !== 0 && (i[p++] = o);
for (; f < r; )
s = a + h, l = s - a, o = a - (s - l) + (h - l), h = n[++f], a = s, o !== 0 && (i[p++] = o);
return (a !== 0 || p === 0) && (i[p++] = a), p;
}
function TF(t, e) {
let r = e[0];
for (let n = 1; n < t; n++)
r += e[n];
return r;
}
function Zc(t) {
return new Float64Array(t);
}
const EF = (3 + 16 * pa) * pa, CF = (2 + 12 * pa) * pa, SF = (9 + 64 * pa) * pa * pa, ho = Zc(4), o5 = Zc(8), l5 = Zc(12), c5 = Zc(16), $r = Zc(4);
function AF(t, e, r, n, i, a, s) {
let o, l, u, h, d, f, p, m, _, y, b, x, k, T, C, M, S, R;
const A = t - i, L = r - i, v = e - a, B = n - a;
T = A * B, f = Vr * A, p = f - (f - A), m = A - p, f = Vr * B, _ = f - (f - B), y = B - _, C = m * y - (T - p * _ - m * _ - p * y), M = v * L, f = Vr * v, p = f - (f - v), m = v - p, f = Vr * L, _ = f - (f - L), y = L - _, S = m * y - (M - p * _ - m * _ - p * y), b = C - S, d = C - b, ho[0] = C - (b + d) + (d - S), x = T + b, d = x - T, k = T - (x - d) + (b - d), b = k - M, d = k - b, ho[1] = k - (b + d) + (d - M), R = x + b, d = R - x, ho[2] = x - (R - d) + (b - d), ho[3] = R;
let w = TF(4, ho), D = CF * s;
if (w >= D || -w >= D || (d = t - A, o = t - (A + d) + (d - i), d = r - L, u = r - (L + d) + (d - i), d = e - v, l = e - (v + d) + (d - a), d = n - B, h = n - (B + d) + (d - a), o === 0 && l === 0 && u === 0 && h === 0) || (D = SF * s + wF * Math.abs(w), w += A * h + B * o - (v * u + L * l), w >= D || -w >= D))
return w;
T = o * B, f = Vr * o, p = f - (f - o), m = o - p, f = Vr * B, _ = f - (f - B), y = B - _, C = m * y - (T - p * _ - m * _ - p * y), M = l * L, f = Vr * l, p = f - (f - l), m = l - p, f = Vr * L, _ = f - (f - L), y = L - _, S = m * y - (M - p * _ - m * _ - p * y), b = C - S, d = C - b, $r[0] = C - (b + d) + (d - S), x = T + b, d = x - T, k = T - (x - d) + (b - d), b = k - M, d = k - b, $r[1] = k - (b + d) + (d - M), R = x + b, d = R - x, $r[2] = x - (R - d) + (b - d), $r[3] = R;
const N = J0(4, ho, 4, $r, o5);
T = A * h, f = Vr * A, p = f - (f - A), m = A - p, f = Vr * h, _ = f - (f - h), y = h - _, C = m * y - (T - p * _ - m * _ - p * y), M = v * u, f = Vr * v, p = f - (f - v), m = v - p, f = Vr * u, _ = f - (f - u), y = u - _, S = m * y - (M - p * _ - m * _ - p * y), b = C - S, d = C - b, $r[0] = C - (b + d) + (d - S), x = T + b, d = x - T, k = T - (x - d) + (b - d), b = k - M, d = k - b, $r[1] = k - (b + d) + (d - M), R = x + b, d = R - x, $r[2] = x - (R - d) + (b - d), $r[3] = R;
const z = J0(N, o5, 4, $r, l5);
T = o * h, f = Vr * o, p = f - (f - o), m = o - p, f = Vr * h, _ = f - (f - h), y = h - _, C = m * y - (T - p * _ - m * _ - p * y), M = l * u, f = Vr * l, p = f - (f - l), m = l - p, f = Vr * u, _ = f - (f - u), y = u - _, S = m * y - (M - p * _ - m * _ - p * y), b = C - S, d = C - b, $r[0] = C - (b + d) + (d - S), x = T + b, d = x - T, k = T - (x - d) + (b - d), b = k - M, d = k - b, $r[1] = k - (b + d) + (d - M), R = x + b, d = R - x, $r[2] = x - (R - d) + (b - d), $r[3] = R;
const X = J0(z, l5, 4, $r, c5);
return c5[X - 1];
}
function Bu(t, e, r, n, i, a) {
const s = (e - a) * (r - i), o = (t - i) * (n - a), l = s - o;
if (s === 0 || o === 0 || s > 0 != o > 0)
return l;
const u = Math.abs(s + o);
return Math.abs(l) >= EF * u ? l : -AF(t, e, r, n, i, a, u);
}
const u5 = Math.pow(2, -52), Du = new Uint32Array(512);
class jh {
static from(e, r = NF, n = BF) {
const i = e.length, a = new Float64Array(i * 2);
for (let s = 0; s < i; s++) {
const o = e[s];
a[2 * s] = r(o), a[2 * s + 1] = n(o);
}
return new jh(a);
}
constructor(e) {
const r = e.length >> 1;
if (r > 0 && typeof e[0] != "number")
throw new Error("Expected coords to contain numbers.");
this.coords = e;
const n = Math.max(2 * r - 5, 0);
this._triangles = new Uint32Array(n * 3), this._halfedges = new Int32Array(n * 3), this._hashSize = Math.ceil(Math.sqrt(r)), this._hullPrev = new Uint32Array(r), this._hullNext = new Uint32Array(r), this._hullTri = new Uint32Array(r), this._hullHash = new Int32Array(this._hashSize).fill(-1), this._ids = new Uint32Array(r), this._dists = new Float64Array(r), this.update();
}
update() {
const { coords: e, _hullPrev: r, _hullNext: n, _hullTri: i, _hullHash: a } = this, s = e.length >> 1;
let o = 1 / 0, l = 1 / 0, u = -1 / 0, h = -1 / 0;
for (let L = 0; L < s; L++) {
const v = e[2 * L], B = e[2 * L + 1];
v < o && (o = v), B < l && (l = B), v > u && (u = v), B > h && (h = B), this._ids[L] = L;
}
const d = (o + u) / 2, f = (l + h) / 2;
let p = 1 / 0, m, _, y;
for (let L = 0; L < s; L++) {
const v = td(d, f, e[2 * L], e[2 * L + 1]);
v < p && (m = L, p = v);
}
const b = e[2 * m], x = e[2 * m + 1];
p = 1 / 0;
for (let L = 0; L < s; L++) {
if (L === m)
continue;
const v = td(b, x, e[2 * L], e[2 * L + 1]);
v < p && v > 0 && (_ = L, p = v);
}
let k = e[2 * _], T = e[2 * _ + 1], C = 1 / 0;
for (let L = 0; L < s; L++) {
if (L === m || L === _)
continue;
const v = RF(b, x, k, T, e[2 * L], e[2 * L + 1]);
v < C && (y = L, C = v);
}
let M = e[2 * y], S = e[2 * y + 1];
if (C === 1 / 0) {
for (let B = 0; B < s; B++)
this._dists[B] = e[2 * B] - e[0] || e[2 * B + 1] - e[1];
bo(this._ids, this._dists, 0, s - 1);
const L = new Uint32Array(s);
let v = 0;
for (let B = 0, w = -1 / 0; B < s; B++) {
const D = this._ids[B];
this._dists[D] > w && (L[v++] = D, w = this._dists[D]);
}
this.hull = L.subarray(0, v), this.triangles = new Uint32Array(0), this.halfedges = new Uint32Array(0);
return;
}
if (Bu(b, x, k, T, M, S) < 0) {
const L = _, v = k, B = T;
_ = y, k = M, T = S, y = L, M = v, S = B;
}
const R = IF(b, x, k, T, M, S);
this._cx = R.x, this._cy = R.y;
for (let L = 0; L < s; L++)
this._dists[L] = td(e[2 * L], e[2 * L + 1], R.x, R.y);
bo(this._ids, this._dists, 0, s - 1), this._hullStart = m;
let A = 3;
n[m] = r[y] = _, n[_] = r[m] = y, n[y] = r[_] = m, i[m] = 0, i[_] = 1, i[y] = 2, a.fill(-1), a[this._hashKey(b, x)] = m, a[this._hashKey(k, T)] = _, a[this._hashKey(M, S)] = y, this.trianglesLen = 0, this._addTriangle(m, _, y, -1, -1, -1);
for (let L = 0, v, B; L < this._ids.length; L++) {
const w = this._ids[L], D = e[2 * w], N = e[2 * w + 1];
if (L > 0 && Math.abs(D - v) <= u5 && Math.abs(N - B) <= u5 || (v = D, B = N, w === m || w === _ || w === y))
continue;
let z = 0;
for (let $ = 0, lt = this._hashKey(D, N); $ < this._hashSize && (z = a[(lt + $) % this._hashSize], !(z !== -1 && z !== n[z])); $++)
;
z = r[z];
let X = z, ct;
for (; ct = n[X], Bu(D, N, e[2 * X], e[2 * X + 1], e[2 * ct], e[2 * ct + 1]) >= 0; )
if (X = ct, X === z) {
X = -1;
break;
}
if (X === -1)
continue;
let J = this._addTriangle(X, w, n[X], -1, -1, i[X]);
i[w] = this._legalize(J + 2), i[X] = J, A++;
let Y = n[X];
for (; ct = n[Y], Bu(D, N, e[2 * Y], e[2 * Y + 1], e[2 * ct], e[2 * ct + 1]) < 0; )
J = this._addTriangle(Y, w, ct, i[w], -1, i[Y]), i[w] = this._legalize(J + 2), n[Y] = Y, A--, Y = ct;
if (X === z)
for (; ct = r[X], Bu(D, N, e[2 * ct], e[2 * ct + 1], e[2 * X], e[2 * X + 1]) < 0; )
J = this._addTriangle(ct, w, X, -1, i[X], i[ct]), this._legalize(J + 2), i[ct] = J, n[X] = X, A--, X = ct;
this._hullStart = r[w] = X, n[X] = r[Y] = w, n[w] = Y, a[this._hashKey(D, N)] = w, a[this._hashKey(e[2 * X], e[2 * X + 1])] = X;
}
this.hull = new Uint32Array(A);
for (let L = 0, v = this._hullStart; L < A; L++)
this.hull[L] = v, v = n[v];
this.triangles = this._triangles.subarray(0, this.trianglesLen), this.halfedges = this._halfedges.subarray(0, this.trianglesLen);
}
_hashKey(e, r) {
return Math.floor(MF(e - this._cx, r - this._cy) * this._hashSize) % this._hashSize;
}
_legalize(e) {
const { _triangles: r, _halfedges: n, coords: i } = this;
let a = 0, s = 0;
for (; ; ) {
const o = n[e], l = e - e % 3;
if (s = l + (e + 2) % 3, o === -1) {
if (a === 0)
break;
e = Du[--a];
continue;
}
const u = o - o % 3, h = l + (e + 1) % 3, d = u + (o + 2) % 3, f = r[s], p = r[e], m = r[h], _ = r[d];
if (LF(
i[2 * f],
i[2 * f + 1],
i[2 * p],
i[2 * p + 1],
i[2 * m],
i[2 * m + 1],
i[2 * _],
i[2 * _ + 1]
)) {
r[e] = _, r[o] = f;
const b = n[d];
if (b === -1) {
let k = this._hullStart;
do {
if (this._hullTri[k] === d) {
this._hullTri[k] = e;
break;
}
k = this._hullPrev[k];
} while (k !== this._hullStart);
}
this._link(e, b), this._link(o, n[s]), this._link(s, d);
const x = u + (o + 1) % 3;
a < Du.length && (Du[a++] = x);
} else {
if (a === 0)
break;
e = Du[--a];
}
}
return s;
}
_link(e, r) {
this._halfedges[e] = r, r !== -1 && (this._halfedges[r] = e);
}
_addTriangle(e, r, n, i, a, s) {
const o = this.trianglesLen;
return this._triangles[o] = e, this._triangles[o + 1] = r, this._triangles[o + 2] = n, this._link(o, i), this._link(o + 1, a), this._link(o + 2, s), this.trianglesLen += 3, o;
}
}
function MF(t, e) {
const r = t / (Math.abs(t) + Math.abs(e));
return (e > 0 ? 3 - r : 1 + r) / 4;
}
function td(t, e, r, n) {
const i = t - r, a = e - n;
return i * i + a * a;
}
function LF(t, e, r, n, i, a, s, o) {
const l = t - s, u = e - o, h = r - s, d = n - o, f = i - s, p = a - o, m = l * l + u * u, _ = h * h + d * d, y = f * f + p * p;
return l * (d * y - _ * p) - u * (h * y - _ * f) + m * (h * p - d * f) < 0;
}
function RF(t, e, r, n, i, a) {
const s = r - t, o = n - e, l = i - t, u = a - e, h = s * s + o * o, d = l * l + u * u, f = 0.5 / (s * u - o * l), p = (u * h - o * d) * f, m = (s * d - l * h) * f;
return p * p + m * m;
}
function IF(t, e, r, n, i, a) {
const s = r - t, o = n - e, l = i - t, u = a - e, h = s * s + o * o, d = l * l + u * u, f = 0.5 / (s * u - o * l), p = t + (u * h - o * d) * f, m = e + (s * d - l * h) * f;
return { x: p, y: m };
}
function bo(t, e, r, n) {
if (n - r <= 20)
for (let i = r + 1; i <= n; i++) {
const a = t[i], s = e[a];
let o = i - 1;
for (; o >= r && e[t[o]] > s; )
t[o + 1] = t[o--];
t[o + 1] = a;
}
else {
const i = r + n >> 1;
let a = r + 1, s = n;
wl(t, i, a), e[t[r]] > e[t[n]] && wl(t, r, n), e[t[a]] > e[t[n]] && wl(t, a, n), e[t[r]] > e[t[a]] && wl(t, r, a);
const o = t[a], l = e[o];
for (; ; ) {
do
a++;
while (e[t[a]] < l);
do
s--;
while (e[t[s]] > l);
if (s < a)
break;
wl(t, a, s);
}
t[r + 1] = t[s], t[s] = o, n - a + 1 >= s - r ? (bo(t, e, a, n), bo(t, e, r, s - 1)) : (bo(t, e, r, s - 1), bo(t, e, a, n));
}
}
function wl(t, e, r) {
const n = t[e];
t[e] = t[r], t[r] = n;
}
function NF(t) {
return t[0];
}
function BF(t) {
return t[1];
}
const h5 = 1e-6;
class ks {
constructor() {
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
}
moveTo(e, r) {
this._ += `M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +r}`;
}
closePath() {
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
}
lineTo(e, r) {
this._ += `L${this._x1 = +e},${this._y1 = +r}`;
}
arc(e, r, n) {
e = +e, r = +r, n = +n;
const i = e + n, a = r;
if (n < 0)
throw new Error("negative radius");
this._x1 === null ? this._ += `M${i},${a}` : (Math.abs(this._x1 - i) > h5 || Math.abs(this._y1 - a) > h5) && (this._ += "L" + i + "," + a), n && (this._ += `A${n},${n},0,1,1,${e - n},${r}A${n},${n},0,1,1,${this._x1 = i},${this._y1 = a}`);
}
rect(e, r, n, i) {
this._ += `M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +r}h${+n}v${+i}h${-n}Z`;
}
value() {
return this._ || null;
}
}
class Am {
constructor() {
this._ = [];
}
moveTo(e, r) {
this._.push([e, r]);
}
closePath() {
this._.push(this._[0].slice());
}
lineTo(e, r) {
this._.push([e, r]);
}
value() {
return this._.length ? this._ : null;
}
}
class Z9 {
constructor(e, [r, n, i, a] = [0, 0, 960, 500]) {
if (!((i = +i) >= (r = +r)) || !((a = +a) >= (n = +n)))
throw new Error("invalid bounds");
this.delaunay = e, this._circumcenters = new Float64Array(e.points.length * 2), this.vectors = new Float64Array(e.points.length * 2), this.xmax = i, this.xmin = r, this.ymax = a, this.ymin = n, this._init();
}
update() {
return this.delaunay.update(), this._init(), this;
}
_init() {
const { delaunay: { points: e, hull: r, triangles: n }, vectors: i } = this, a = this.circumcenters = this._circumcenters.subarray(0, n.length / 3 * 2);
for (let p = 0, m = 0, _ = n.length, y, b; p < _; p += 3, m += 2) {
const x = n[p] * 2, k = n[p + 1] * 2, T = n[p + 2] * 2, C = e[x], M = e[x + 1], S = e[k], R = e[k + 1], A = e[T], L = e[T + 1], v = S - C, B = R - M, w = A - C, D = L - M, N = (v * D - B * w) * 2;
if (Math.abs(N) < 1e-9) {
let z = 1e9;
const X = n[0] * 2;
z *= Math.sign((e[X] - C) * D - (e[X + 1] - M) * w), y = (C + A) / 2 - z * D, b = (M + L) / 2 + z * w;
} else {
const z = 1 / N, X = v * v + B * B, ct = w * w + D * D;
y = C + (D * X - B * ct) * z, b = M + (v * ct - w * X) * z;
}
a[m] = y, a[m + 1] = b;
}
let s = r[r.length - 1], o, l = s * 4, u, h = e[2 * s], d, f = e[2 * s + 1];
i.fill(0);
for (let p = 0; p < r.length; ++p)
s = r[p], o = l, u = h, d = f, l = s * 4, h = e[2 * s], f = e[2 * s + 1], i[o + 2] = i[l] = d - f, i[o + 3] = i[l + 1] = h - u;
}
render(e) {
const r = e == null ? e = new ks() : void 0, { delaunay: { halfedges: n, inedges: i, hull: a }, circumcenters: s, vectors: o } = this;
if (a.length <= 1)
return null;
for (let h = 0, d = n.length; h < d; ++h) {
const f = n[h];
if (f < h)
continue;
const p = Math.floor(h / 3) * 2, m = Math.floor(f / 3) * 2, _ = s[p], y = s[p + 1], b = s[m], x = s[m + 1];
this._renderSegment(_, y, b, x, e);
}
let l, u = a[a.length - 1];
for (let h = 0; h < a.length; ++h) {
l = u, u = a[h];
const d = Math.floor(i[u] / 3) * 2, f = s[d], p = s[d + 1], m = l * 4, _ = this._project(f, p, o[m + 2], o[m + 3]);
_ && this._renderSegment(f, p, _[0], _[1], e);
}
return r && r.value();
}
renderBounds(e) {
const r = e == null ? e = new ks() : void 0;
return e.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin), r && r.value();
}
renderCell(e, r) {
const n = r == null ? r = new ks() : void 0, i = this._clip(e);
if (i === null || !i.length)
return;
r.moveTo(i[0], i[1]);
let a = i.length;
for (; i[0] === i[a - 2] && i[1] === i[a - 1] && a > 1; )
a -= 2;
for (let s = 2; s < a; s += 2)
(i[s] !== i[s - 2] || i[s + 1] !== i[s - 1]) && r.lineTo(i[s], i[s + 1]);
return r.closePath(), n && n.value();
}
*cellPolygons() {
const { delaunay: { points: e } } = this;
for (let r = 0, n = e.length / 2; r < n; ++r) {
const i = this.cellPolygon(r);
i && (i.index = r, yield i);
}
}
cellPolygon(e) {
const r = new Am();
return this.renderCell(e, r), r.value();
}
_renderSegment(e, r, n, i, a) {
let s;
const o = this._regioncode(e, r), l = this._regioncode(n, i);
o === 0 && l === 0 ? (a.moveTo(e, r), a.lineTo(n, i)) : (s = this._clipSegment(e, r, n, i, o, l)) && (a.moveTo(s[0], s[1]), a.lineTo(s[2], s[3]));
}
contains(e, r, n) {
return r = +r, r !== r || (n = +n, n !== n) ? !1 : this.delaunay._step(e, r, n) === e;
}
*neighbors(e) {
const r = this._clip(e);
if (r)
for (const n of this.delaunay.neighbors(e)) {
const i = this._clip(n);
if (i) {
t:
for (let a = 0, s = r.length; a < s; a += 2)
for (let o = 0, l = i.length; o < l; o += 2)
if (r[a] == i[o] && r[a + 1] == i[o + 1] && r[(a + 2) % s] == i[(o + l - 2) % l] && r[(a + 3) % s] == i[(o + l - 1) % l]) {
yield n;
break t;
}
}
}
}
_cell(e) {
const { circumcenters: r, delaunay: { inedges: n, halfedges: i, triangles: a } } = this, s = n[e];
if (s === -1)
return null;
const o = [];
let l = s;
do {
const u = Math.floor(l / 3);
if (o.push(r[u * 2], r[u * 2 + 1]), l = l % 3 === 2 ? l - 2 : l + 1, a[l] !== e)
break;
l = i[l];
} while (l !== s && l !== -1);
return o;
}
_clip(e) {
if (e === 0 && this.delaunay.hull.length === 1)
return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
const r = this._cell(e);
if (r === null)
return null;
const { vectors: n } = this, i = e * 4;
return n[i] || n[i + 1] ? this._clipInfinite(e, r, n[i], n[i + 1], n[i + 2], n[i + 3]) : this._clipFinite(e, r);
}
_clipFinite(e, r) {
const n = r.length;
let i = null, a, s, o = r[n - 2], l = r[n - 1], u, h = this._regioncode(o, l), d, f = 0;
for (let p = 0; p < n; p += 2)
if (a = o, s = l, o = r[p], l = r[p + 1], u = h, h = this._regioncode(o, l), u === 0 && h === 0)
d = f, f = 0, i ? i.push(o, l) : i = [o, l];
else {
let m, _, y, b, x;
if (u === 0) {
if ((m = this._clipSegment(a, s, o, l, u, h)) === null)
continue;
[_, y, b, x] = m;
} else {
if ((m = this._clipSegment(o, l, a, s, h, u)) === null)
continue;
[b, x, _, y] = m, d = f, f = this._edgecode(_, y), d && f && this._edge(e, d, f, i, i.length), i ? i.push(_, y) : i = [_, y];
}
d = f, f = this._edgecode(b, x), d && f && this._edge(e, d, f, i, i.length), i ? i.push(b, x) : i = [b, x];
}
if (i)
d = f, f = this._edgecode(i[0], i[1]), d && f && this._edge(e, d, f, i, i.length);
else if (this.contains(e, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2))
return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
return i;
}
_clipSegment(e, r, n, i, a, s) {
for (; ; ) {
if (a === 0 && s === 0)
return [e, r, n, i];
if (a & s)
return null;
let o, l, u = a || s;
u & 8 ? (o = e + (n - e) * (this.ymax - r) / (i - r), l = this.ymax) : u & 4 ? (o = e + (n - e) * (this.ymin - r) / (i - r), l = this.ymin) : u & 2 ? (l = r + (i - r) * (this.xmax - e) / (n - e), o = this.xmax) : (l = r + (i - r) * (this.xmin - e) / (n - e), o = this.xmin), a ? (e = o, r = l, a = this._regioncode(e, r)) : (n = o, i = l, s = this._regioncode(n, i));
}
}
_clipInfinite(e, r, n, i, a, s) {
let o = Array.from(r), l;
if ((l = this._project(o[0], o[1], n, i)) && o.unshift(l[0], l[1]), (l = this._project(o[o.length - 2], o[o.length - 1], a, s)) && o.push(l[0], l[1]), o = this._clipFinite(e, o))
for (let u = 0, h = o.length, d, f = this._edgecode(o[h - 2], o[h - 1]); u < h; u += 2)
d = f, f = this._edgecode(o[u], o[u + 1]), d && f && (u = this._edge(e, d, f, o, u), h = o.length);
else
this.contains(e, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2) && (o = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]);
return o;
}
_edge(e, r, n, i, a) {
for (; r !== n; ) {
let s, o;
switch (r) {
case 5:
r = 4;
continue;
case 4:
r = 6, s = this.xmax, o = this.ymin;
break;
case 6:
r = 2;
continue;
case 2:
r = 10, s = this.xmax, o = this.ymax;
break;
case 10:
r = 8;
continue;
case 8:
r = 9, s = this.xmin, o = this.ymax;
break;
case 9:
r = 1;
continue;
case 1:
r = 5, s = this.xmin, o = this.ymin;
break;
}
(i[a] !== s || i[a + 1] !== o) && this.contains(e, s, o) && (i.splice(a, 0, s, o), a += 2);
}
if (i.length > 4)
for (let s = 0; s < i.length; s += 2) {
const o = (s + 2) % i.length, l = (s + 4) % i.length;
(i[s] === i[o] && i[o] === i[l] || i[s + 1] === i[o + 1] && i[o + 1] === i[l + 1]) && (i.splice(o, 2), s -= 2);
}
return a;
}
_project(e, r, n, i) {
let a = 1 / 0, s, o, l;
if (i < 0) {
if (r <= this.ymin)
return null;
(s = (this.ymin - r) / i) < a && (l = this.ymin, o = e + (a = s) * n);
} else if (i > 0) {
if (r >= this.ymax)
return null;
(s = (this.ymax - r) / i) < a && (l = this.ymax, o = e + (a = s) * n);
}
if (n > 0) {
if (e >= this.xmax)
return null;
(s = (this.xmax - e) / n) < a && (o = this.xmax, l = r + (a = s) * i);
} else if (n < 0) {
if (e <= this.xmin)
return null;
(s = (this.xmin - e) / n) < a && (o = this.xmin, l = r + (a = s) * i);
}
return [o, l];
}
_edgecode(e, r) {
return (e === this.xmin ? 1 : e === this.xmax ? 2 : 0) | (r === this.ymin ? 4 : r === this.ymax ? 8 : 0);
}
_regioncode(e, r) {
return (e < this.xmin ? 1 : e > this.xmax ? 2 : 0) | (r < this.ymin ? 4 : r > this.ymax ? 8 : 0);
}
}
const DF = 2 * Math.PI, fo = Math.pow;
function OF(t) {
return t[0];
}
function FF(t) {
return t[1];
}
function PF(t) {
const { triangles: e, coords: r } = t;
for (let n = 0; n < e.length; n += 3) {
const i = 2 * e[n], a = 2 * e[n + 1], s = 2 * e[n + 2];
if ((r[s] - r[i]) * (r[a + 1] - r[i + 1]) - (r[a] - r[i]) * (r[s + 1] - r[i + 1]) > 1e-10)
return !1;
}
return !0;
}
function qF(t, e, r) {
return [t + Math.sin(t + e) * r, e + Math.cos(t - e) * r];
}
class l3 {
static from(e, r = OF, n = FF, i) {
return new l3("length" in e ? VF(e, r, n, i) : Float64Array.from(zF(e, r, n, i)));
}
constructor(e) {
this._delaunator = new jh(e), this.inedges = new Int32Array(e.length / 2), this._hullIndex = new Int32Array(e.length / 2), this.points = this._delaunator.coords, this._init();
}
update() {
return this._delaunator.update(), this._init(), this;
}
_init() {
const e = this._delaunator, r = this.points;
if (e.hull && e.hull.length > 2 && PF(e)) {
this.collinear = Int32Array.from({ length: r.length / 2 }, (f, p) => p).sort((f, p) => r[2 * f] - r[2 * p] || r[2 * f + 1] - r[2 * p + 1]);
const l = this.collinear[0], u = this.collinear[this.collinear.length - 1], h = [r[2 * l], r[2 * l + 1], r[2 * u], r[2 * u + 1]], d = 1e-8 * Math.hypot(h[3] - h[1], h[2] - h[0]);
for (let f = 0, p = r.length / 2; f < p; ++f) {
const m = qF(r[2 * f], r[2 * f + 1], d);
r[2 * f] = m[0], r[2 * f + 1] = m[1];
}
this._delaunator = new jh(r);
} else
delete this.collinear;
const n = this.halfedges = this._delaunator.halfedges, i = this.hull = this._delaunator.hull, a = this.triangles = this._delaunator.triangles, s = this.inedges.fill(-1), o = this._hullIndex.fill(-1);
for (let l = 0, u = n.length; l < u; ++l) {
const h = a[l % 3 === 2 ? l - 2 : l + 1];
(n[l] === -1 || s[h] === -1) && (s[h] = l);
}
for (let l = 0, u = i.length; l < u; ++l)
o[i[l]] = l;
i.length <= 2 && i.length > 0 && (this.triangles = new Int32Array(3).fill(-1), this.halfedges = new Int32Array(3).fill(-1), this.triangles[0] = i[0], s[i[0]] = 1, i.length === 2 && (s[i[1]] = 0, this.triangles[1] = i[1], this.triangles[2] = i[1]));
}
voronoi(e) {
return new Z9(this, e);
}
*neighbors(e) {
const { inedges: r, hull: n, _hullIndex: i, halfedges: a, triangles: s, collinear: o } = this;
if (o) {
const d = o.indexOf(e);
d > 0 && (yield o[d - 1]), d < o.length - 1 && (yield o[d + 1]);
return;
}
const l = r[e];
if (l === -1)
return;
let u = l, h = -1;
do {
if (yield h = s[u], u = u % 3 === 2 ? u - 2 : u + 1, s[u] !== e)
return;
if (u = a[u], u === -1) {
const d = n[(i[e] + 1) % n.length];
d !== h && (yield d);
return;
}
} while (u !== l);
}
find(e, r, n = 0) {
if (e = +e, e !== e || (r = +r, r !== r))
return -1;
const i = n;
let a;
for (; (a = this._step(n, e, r)) >= 0 && a !== n && a !== i; )
n = a;
return a;
}
_step(e, r, n) {
const { inedges: i, hull: a, _hullIndex: s, halfedges: o, triangles: l, points: u } = this;
if (i[e] === -1 || !u.length)
return (e + 1) % (u.length >> 1);
let h = e, d = fo(r - u[e * 2], 2) + fo(n - u[e * 2 + 1], 2);
const f = i[e];
let p = f;
do {
let m = l[p];
const _ = fo(r - u[m * 2], 2) + fo(n - u[m * 2 + 1], 2);
if (_ < d && (d = _, h = m), p = p % 3 === 2 ? p - 2 : p + 1, l[p] !== e)
break;
if (p = o[p], p === -1) {
if (p = a[(s[e] + 1) % a.length], p !== m && fo(r - u[p * 2], 2) + fo(n - u[p * 2 + 1], 2) < d)
return p;
break;
}
} while (p !== f);
return h;
}
render(e) {
const r = e == null ? e = new ks() : void 0, { points: n, halfedges: i, triangles: a } = this;
for (let s = 0, o = i.length; s < o; ++s) {
const l = i[s];
if (l < s)
continue;
const u = a[s] * 2, h = a[l] * 2;
e.moveTo(n[u], n[u + 1]), e.lineTo(n[h], n[h + 1]);
}
return this.renderHull(e), r && r.value();
}
renderPoints(e, r) {
r === void 0 && (!e || typeof e.moveTo != "function") && (r = e, e = null), r = r == null ? 2 : +r;
const n = e == null ? e = new ks() : void 0, { points: i } = this;
for (let a = 0, s = i.length; a < s; a += 2) {
const o = i[a], l = i[a + 1];
e.moveTo(o + r, l), e.arc(o, l, r, 0, DF);
}
return n && n.value();
}
renderHull(e) {
const r = e == null ? e = new ks() : void 0, { hull: n, points: i } = this, a = n[0] * 2, s = n.length;
e.moveTo(i[a], i[a + 1]);
for (let o = 1; o < s; ++o) {
const l = 2 * n[o];
e.lineTo(i[l], i[l + 1]);
}
return e.closePath(), r && r.value();
}
hullPolygon() {
const e = new Am();
return this.renderHull(e), e.value();
}
renderTriangle(e, r) {
const n = r == null ? r = new ks() : void 0, { points: i, triangles: a } = this, s = a[e *= 3] * 2, o = a[e + 1] * 2, l = a[e + 2] * 2;
return r.moveTo(i[s], i[s + 1]), r.lineTo(i[o], i[o + 1]), r.lineTo(i[l], i[l + 1]), r.closePath(), n && n.value();
}
*trianglePolygons() {
const { triangles: e } = this;
for (let r = 0, n = e.length / 3; r < n; ++r)
yield this.trianglePolygon(r);
}
trianglePolygon(e) {
const r = new Am();
return this.renderTriangle(e, r), r.value();
}
}
function VF(t, e, r, n) {
const i = t.length, a = new Float64Array(i * 2);
for (let s = 0; s < i; ++s) {
const o = t[s];
a[s * 2] = e.call(n, o, s, t), a[s * 2 + 1] = r.call(n, o, s, t);
}
return a;
}
function* zF(t, e, r, n) {
let i = 0;
for (const a of t)
yield e.call(n, a, i, t), yield r.call(n, a, i, t), ++i;
}
var f5 = {}, ed = {}, rd = 34, Tl = 10, nd = 13;
function Q9(t) {
return new Function("d", "return {" + t.map(function(e, r) {
return JSON.stringify(e) + ": d[" + r + '] || ""';
}).join(",") + "}");
}
function YF(t, e) {
var r = Q9(t);
return function(n, i) {
return e(r(n), i, t);
};
}
function d5(t) {
var e = /* @__PURE__ */ Object.create(null), r = [];
return t.forEach(function(n) {
for (var i in n)
i in e || r.push(e[i] = i);
}), r;
}
function hn(t, e) {
var r = t + "", n = r.length;
return n < e ? new Array(e - n + 1).join(0) + r : r;
}
function UF(t) {
return t < 0 ? "-" + hn(-t, 6) : t > 9999 ? "+" + hn(t, 6) : hn(t, 4);
}
function WF(t) {
var e = t.getUTCHours(), r = t.getUTCMinutes(), n = t.getUTCSeconds(), i = t.getUTCMilliseconds();
return isNaN(t) ? "Invalid Date" : UF(t.getUTCFullYear()) + "-" + hn(t.getUTCMonth() + 1, 2) + "-" + hn(t.getUTCDate(), 2) + (i ? "T" + hn(e, 2) + ":" + hn(r, 2) + ":" + hn(n, 2) + "." + hn(i, 3) + "Z" : n ? "T" + hn(e, 2) + ":" + hn(r, 2) + ":" + hn(n, 2) + "Z" : r || e ? "T" + hn(e, 2) + ":" + hn(r, 2) + "Z" : "");
}
function w1(t) {
var e = new RegExp('["' + t + `
\r]`), r = t.charCodeAt(0);
function n(d, f) {
var p, m, _ = i(d, function(y, b) {
if (p)
return p(y, b - 1);
m = y, p = f ? YF(y, f) : Q9(y);
});
return _.columns = m || [], _;
}
function i(d, f) {
var p = [], m = d.length, _ = 0, y = 0, b, x = m <= 0, k = !1;
d.charCodeAt(m - 1) === Tl && --m, d.charCodeAt(m - 1) === nd && --m;
function T() {
if (x)
return ed;
if (k)
return k = !1, f5;
var M, S = _, R;
if (d.charCodeAt(S) === rd) {
for (; _++ < m && d.charCodeAt(_) !== rd || d.charCodeAt(++_) === rd; )
;
return (M = _) >= m ? x = !0 : (R = d.charCodeAt(_++)) === Tl ? k = !0 : R === nd && (k = !0, d.charCodeAt(_) === Tl && ++_), d.slice(S + 1, M - 1).replace(/""/g, '"');
}
for (; _ < m; ) {
if ((R = d.charCodeAt(M = _++)) === Tl)
k = !0;
else if (R === nd)
k = !0, d.charCodeAt(_) === Tl && ++_;
else if (R !== r)
continue;
return d.slice(S, M);
}
return x = !0, d.slice(S, m);
}
for (; (b = T()) !== ed; ) {
for (var C = []; b !== f5 && b !== ed; )
C.push(b), b = T();
f && (C = f(C, y++)) == null || p.push(C);
}
return p;
}
function a(d, f) {
return d.map(function(p) {
return f.map(function(m) {
return h(p[m]);
}).join(t);
});
}
function s(d, f) {
return f == null && (f = d5(d)), [f.map(h).join(t)].concat(a(d, f)).join(`
`);
}
function o(d, f) {
return f == null && (f = d5(d)), a(d, f).join(`
`);
}
function l(d) {
return d.map(u).join(`
`);
}
function u(d) {
return d.map(h).join(t);
}
function h(d) {
return d == null ? "" : d instanceof Date ? WF(d) : e.test(d += "") ? '"' + d.replace(/"/g, '""') + '"' : d;
}
return {
parse: n,
parseRows: i,
format: s,
formatBody: o,
formatRows: l,
formatRow: u,
formatValue: h
};
}
var Gs = w1(","), J9 = Gs.parse, HF = Gs.parseRows, GF = Gs.format, jF = Gs.formatBody, $F = Gs.formatRows, XF = Gs.formatRow, KF = Gs.formatValue, js = w1(" "), tT = js.parse, ZF = js.parseRows, QF = js.format, JF = js.formatBody, tP = js.formatRows, eP = js.formatRow, rP = js.formatValue;
function nP(t) {
for (var e in t) {
var r = t[e].trim(), n, i;
if (!r)
r = null;
else if (r === "true")
r = !0;
else if (r === "false")
r = !1;
else if (r === "NaN")
r = NaN;
else if (!isNaN(n = +r))
r = n;
else if (i = r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))
iP && !!i[4] && !i[7] && (r = r.replace(/-/g, "/").replace(/T/, " ")), r = new Date(r);
else
continue;
t[e] = r;
}
return t;
}
const iP = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours();
function aP(t) {
if (!t.ok)
throw new Error(t.status + " " + t.statusText);
return t.blob();
}
function sP(t, e) {
return fetch(t, e).then(aP);
}
function oP(t) {
if (!t.ok)
throw new Error(t.status + " " + t.statusText);
return t.arrayBuffer();
}
function lP(t, e) {
return fetch(t, e).then(oP);
}
function cP(t) {
if (!t.ok)
throw new Error(t.status + " " + t.statusText);
return t.text();
}
function T1(t, e) {
return fetch(t, e).then(cP);
}
function eT(t) {
return function(e, r, n) {
return arguments.length === 2 && typeof r == "function" && (n = r, r = void 0), T1(e, r).then(function(i) {
return t(i, n);
});
};
}
function uP(t, e, r, n) {
arguments.length === 3 && typeof r == "function" && (n = r, r = void 0);
var i = w1(t);
return T1(e, r).then(function(a) {
return i.parse(a, n);
});
}
var hP = eT(J9), fP = eT(tT);
function dP(t, e) {
return new Promise(function(r, n) {
var i = new Image();
for (var a in e)
i[a] = e[a];
i.onerror = n, i.onload = function() {
r(i);
}, i.src = t;
});
}
function pP(t) {
if (!t.ok)
throw new Error(t.status + " " + t.statusText);
if (!(t.status === 204 || t.status === 205))
return t.json();
}
function gP(t, e) {
return fetch(t, e).then(pP);
}
function c3(t) {
return (e, r) => T1(e, r).then((n) => new DOMParser().parseFromString(n, t));
}
const yP = c3("application/xml");
var mP = c3("text/html"), bP = c3("image/svg+xml");
function _P(t, e) {
var r, n = 1;
t == null && (t = 0), e == null && (e = 0);
function i() {
var a, s = r.length, o, l = 0, u = 0;
for (a = 0; a < s; ++a)
o = r[a], l += o.x, u += o.y;
for (l = (l / s - t) * n, u = (u / s - e) * n, a = 0; a < s; ++a)
o = r[a], o.x -= l, o.y -= u;
}
return i.initialize = function(a) {
r = a;
}, i.x = function(a) {
return arguments.length ? (t = +a, i) : t;
}, i.y = function(a) {
return arguments.length ? (e = +a, i) : e;
}, i.strength = function(a) {
return arguments.length ? (n = +a, i) : n;
}, i;
}
function vP(t) {
const e = +this._x.call(null, t), r = +this._y.call(null, t);
return rT(this.cover(e, r), e, r, t);
}
function rT(t, e, r, n) {
if (isNaN(e) || isNaN(r))
return t;
var i, a = t._root, s = { data: n }, o = t._x0, l = t._y0, u = t._x1, h = t._y1, d, f, p, m, _, y, b, x;
if (!a)
return t._root = s, t;
for (; a.length; )
if ((_ = e >= (d = (o + u) / 2)) ? o = d : u = d, (y = r >= (f = (l + h) / 2)) ? l = f : h = f, i = a, !(a = a[b = y << 1 | _]))
return i[b] = s, t;
if (p = +t._x.call(null, a.data), m = +t._y.call(null, a.data), e === p && r === m)
return s.next = a, i ? i[b] = s : t._root = s, t;
do
i = i ? i[b] = new Array(4) : t._root = new Array(4), (_ = e >= (d = (o + u) / 2)) ? o = d : u = d, (y = r >= (f = (l + h) / 2)) ? l = f : h = f;
while ((b = y << 1 | _) === (x = (m >= f) << 1 | p >= d));
return i[x] = a, i[b] = s, t;
}
function xP(t) {
var e, r, n = t.length, i, a, s = new Array(n), o = new Array(n), l = 1 / 0, u = 1 / 0, h = -1 / 0, d = -1 / 0;
for (r = 0; r < n; ++r)
isNaN(i = +this._x.call(null, e = t[r])) || isNaN(a = +this._y.call(null, e)) || (s[r] = i, o[r] = a, i < l && (l = i), i > h && (h = i), a < u && (u = a), a > d && (d = a));
if (l > h || u > d)
return this;
for (this.cover(l, u).cover(h, d), r = 0; r < n; ++r)
rT(this, s[r], o[r], t[r]);
return this;
}
function kP(t, e) {
if (isNaN(t = +t) || isNaN(e = +e))
return this;
var r = this._x0, n = this._y0, i = this._x1, a = this._y1;
if (isNaN(r))
i = (r = Math.floor(t)) + 1, a = (n = Math.floor(e)) + 1;
else {
for (var s = i - r || 1, o = this._root, l, u; r > t || t >= i || n > e || e >= a; )
switch (u = (e < n) << 1 | t < r, l = new Array(4), l[u] = o, o = l, s *= 2, u) {
case 0:
i = r + s, a = n + s;
break;
case 1:
r = i - s, a = n + s;
break;
case 2:
i = r + s, n = a - s;
break;
case 3:
r = i - s, n = a - s;
break;
}
this._root && this._root.length && (this._root = o);
}
return this._x0 = r, this._y0 = n, this._x1 = i, this._y1 = a, this;
}
function wP() {
var t = [];
return this.visit(function(e) {
if (!e.length)
do
t.push(e.data);
while (e = e.next);
}), t;
}
function TP(t) {
return arguments.length ? this.cover(+t[0][0], +t[0][1]).cover(+t[1][0], +t[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
}
function Jr(t, e, r, n, i) {
this.node = t, this.x0 = e, this.y0 = r, this.x1 = n, this.y1 = i;
}
function EP(t, e, r) {
var n, i = this._x0, a = this._y0, s, o, l, u, h = this._x1, d = this._y1, f = [], p = this._root, m, _;
for (p && f.push(new Jr(p, i, a, h, d)), r == null ? r = 1 / 0 : (i = t - r, a = e - r, h = t + r, d = e + r, r *= r); m = f.pop(); )
if (!(!(p = m.node) || (s = m.x0) > h || (o = m.y0) > d || (l = m.x1) < i || (u = m.y1) < a))
if (p.length) {
var y = (s + l) / 2, b = (o + u) / 2;
f.push(
new Jr(p[3], y, b, l, u),
new Jr(p[2], s, b, y, u),
new Jr(p[1], y, o, l, b),
new Jr(p[0], s, o, y, b)
), (_ = (e >= b) << 1 | t >= y) && (m = f[f.length - 1], f[f.length - 1] = f[f.length - 1 - _], f[f.length - 1 - _] = m);
} else {
var x = t - +this._x.call(null, p.data), k = e - +this._y.call(null, p.data), T = x * x + k * k;
if (T < r) {
var C = Math.sqrt(r = T);
i = t - C, a = e - C, h = t + C, d = e + C, n = p.data;
}
}
return n;
}
function CP(t) {
if (isNaN(h = +this._x.call(null, t)) || isNaN(d = +this._y.call(null, t)))
return this;
var e, r = this._root, n, i, a, s = this._x0, o = this._y0, l = this._x1, u = this._y1, h, d, f, p, m, _, y, b;
if (!r)
return this;
if (r.length)
for (; ; ) {
if ((m = h >= (f = (s + l) / 2)) ? s = f : l = f, (_ = d >= (p = (o + u) / 2)) ? o = p : u = p, e = r, !(r = r[y = _ << 1 | m]))
return this;
if (!r.length)
break;
(e[y + 1 & 3] || e[y + 2 & 3] || e[y + 3 & 3]) && (n = e, b = y);
}
for (; r.data !== t; )
if (i = r, !(r = r.next))
return this;
return (a = r.next) && delete r.next, i ? (a ? i.next = a : delete i.next, this) : e ? (a ? e[y] = a : delete e[y], (r = e[0] || e[1] || e[2] || e[3]) && r === (e[3] || e[2] || e[1] || e[0]) && !r.length && (n ? n[b] = r : this._root = r), this) : (this._root = a, this);
}
function SP(t) {
for (var e = 0, r = t.length; e < r; ++e)
this.remove(t[e]);
return this;
}
function AP() {
return this._root;
}
function MP() {
var t = 0;
return this.visit(function(e) {
if (!e.length)
do
++t;
while (e = e.next);
}), t;
}
function LP(t) {
var e = [], r, n = this._root, i, a, s, o, l;
for (n && e.push(new Jr(n, this._x0, this._y0, this._x1, this._y1)); r = e.pop(); )
if (!t(n = r.node, a = r.x0, s = r.y0, o = r.x1, l = r.y1) && n.length) {
var u = (a + o) / 2, h = (s + l) / 2;
(i = n[3]) && e.push(new Jr(i, u, h, o, l)), (i = n[2]) && e.push(new Jr(i, a, h, u, l)), (i = n[1]) && e.push(new Jr(i, u, s, o, h)), (i = n[0]) && e.push(new Jr(i, a, s, u, h));
}
return this;
}
function RP(t) {
var e = [], r = [], n;
for (this._root && e.push(new Jr(this._root, this._x0, this._y0, this._x1, this._y1)); n = e.pop(); ) {
var i = n.node;
if (i.length) {
var a, s = n.x0, o = n.y0, l = n.x1, u = n.y1, h = (s + l) / 2, d = (o + u) / 2;
(a = i[0]) && e.push(new Jr(a, s, o, h, d)), (a = i[1]) && e.push(new Jr(a, h, o, l, d)), (a = i[2]) && e.push(new Jr(a, s, d, h, u)), (a = i[3]) && e.push(new Jr(a, h, d, l, u));
}
r.push(n);
}
for (; n = r.pop(); )
t(n.node, n.x0, n.y0, n.x1, n.y1);
return this;
}
function IP(t) {
return t[0];
}
function NP(t) {
return arguments.length ? (this._x = t, this) : this._x;
}
function BP(t) {
return t[1];
}
function DP(t) {
return arguments.length ? (this._y = t, this) : this._y;
}
function E1(t, e, r) {
var n = new u3(e == null ? IP : e, r == null ? BP : r, NaN, NaN, NaN, NaN);
return t == null ? n : n.addAll(t);
}
function u3(t, e, r, n, i, a) {
this._x = t, this._y = e, this._x0 = r, this._y0 = n, this._x1 = i, this._y1 = a, this._root = void 0;
}
function p5(t) {
for (var e = { data: t.data }, r = e; t = t.next; )
r = r.next = { data: t.data };
return e;
}
var un = E1.prototype = u3.prototype;
un.copy = function() {
var t = new u3(this._x, this._y, this._x0, this._y0, this._x1, this._y1), e = this._root, r, n;
if (!e)
return t;
if (!e.length)
return t._root = p5(e), t;
for (r = [{ source: e, target: t._root = new Array(4) }]; e = r.pop(); )
for (var i = 0; i < 4; ++i)
(n = e.source[i]) && (n.length ? r.push({ source: n, target: e.target[i] = new Array(4) }) : e.target[i] = p5(n));
return t;
};
un.add = vP;
un.addAll = xP;
un.cover = kP;
un.data = wP;
un.extent = TP;
un.find = EP;
un.remove = CP;
un.removeAll = SP;
un.root = AP;
un.size = MP;
un.visit = LP;
un.visitAfter = RP;
un.x = NP;
un.y = DP;
function kr(t) {
return function() {
return t;
};
}
function Oa(t) {
return (t() - 0.5) * 1e-6;
}
function OP(t) {
return t.x + t.vx;
}
function FP(t) {
return t.y + t.vy;
}
function PP(t) {
var e, r, n, i = 1, a = 1;
typeof t != "function" && (t = kr(t == null ? 1 : +t));
function s() {
for (var u, h = e.length, d, f, p, m, _, y, b = 0; b < a; ++b)
for (d = E1(e, OP, FP).visitAfter(o), u = 0; u < h; ++u)
f = e[u], _ = r[f.index], y = _ * _, p = f.x + f.vx, m = f.y + f.vy, d.visit(x);
function x(k, T, C, M, S) {
var R = k.data, A = k.r, L = _ + A;
if (R) {
if (R.index > f.index) {
var v = p - R.x - R.vx, B = m - R.y - R.vy, w = v * v + B * B;
w < L * L && (v === 0 && (v = Oa(n), w += v * v), B === 0 && (B = Oa(n), w += B * B), w = (L - (w = Math.sqrt(w))) / w * i, f.vx += (v *= w) * (L = (A *= A) / (y + A)), f.vy += (B *= w) * L, R.vx -= v * (L = 1 - L), R.vy -= B * L);
}
return;
}
return T > p + L || M < p - L || C > m + L || S < m - L;
}
}
function o(u) {
if (u.data)
return u.r = r[u.data.index];
for (var h = u.r = 0; h < 4; ++h)
u[h] && u[h].r > u.r && (u.r = u[h].r);
}
function l() {
if (!!e) {
var u, h = e.length, d;
for (r = new Array(h), u = 0; u < h; ++u)
d = e[u], r[d.index] = +t(d, u, e);
}
}
return s.initialize = function(u, h) {
e = u, n = h, l();
}, s.iterations = function(u) {
return arguments.length ? (a = +u, s) : a;
}, s.strength = function(u) {
return arguments.length ? (i = +u, s) : i;
}, s.radius = function(u) {
return arguments.length ? (t = typeof u == "function" ? u : kr(+u), l(), s) : t;
}, s;
}
function qP(t) {
return t.index;
}
function g5(t, e) {
var r = t.get(e);
if (!r)
throw new Error("node not found: " + e);
return r;
}
function VP(t) {
var e = qP, r = d, n, i = kr(30), a, s, o, l, u, h = 1;
t == null && (t = []);
function d(y) {
return 1 / Math.min(o[y.source.index], o[y.target.index]);
}
function f(y) {
for (var b = 0, x = t.length; b < h; ++b)
for (var k = 0, T, C, M, S, R, A, L; k < x; ++k)
T = t[k], C = T.source, M = T.target, S = M.x + M.vx - C.x - C.vx || Oa(u), R = M.y + M.vy - C.y - C.vy || Oa(u), A = Math.sqrt(S * S + R * R), A = (A - a[k]) / A * y * n[k], S *= A, R *= A, M.vx -= S * (L = l[k]), M.vy -= R * L, C.vx += S * (L = 1 - L), C.vy += R * L;
}
function p() {
if (!!s) {
var y, b = s.length, x = t.length, k = new Map(s.map((C, M) => [e(C, M, s), C])), T;
for (y = 0, o = new Array(b); y < x; ++y)
T = t[y], T.index = y, typeof T.source != "object" && (T.source = g5(k, T.source)), typeof T.target != "object" && (T.target = g5(k, T.target)), o[T.source.index] = (o[T.source.index] || 0) + 1, o[T.target.index] = (o[T.target.index] || 0) + 1;
for (y = 0, l = new Array(x); y < x; ++y)
T = t[y], l[y] = o[T.source.index] / (o[T.source.index] + o[T.target.index]);
n = new Array(x), m(), a = new Array(x), _();
}
}
function m() {
if (!!s)
for (var y = 0, b = t.length; y < b; ++y)
n[y] = +r(t[y], y, t);
}
function _() {
if (!!s)
for (var y = 0, b = t.length; y < b; ++y)
a[y] = +i(t[y], y, t);
}
return f.initialize = function(y, b) {
s = y, u = b, p();
}, f.links = function(y) {
return arguments.length ? (t = y, p(), f) : t;
}, f.id = function(y) {
return arguments.length ? (e = y, f) : e;
}, f.iterations = function(y) {
return arguments.length ? (h = +y, f) : h;
}, f.strength = function(y) {
return arguments.length ? (r = typeof y == "function" ? y : kr(+y), m(), f) : r;
}, f.distance = function(y) {
return arguments.length ? (i = typeof y == "function" ? y : kr(+y), _(), f) : i;
}, f;
}
const zP = 1664525, YP = 1013904223, y5 = 4294967296;
function UP() {
let t = 1;
return () => (t = (zP * t + YP) % y5) / y5;
}
function WP(t) {
return t.x;
}
function HP(t) {
return t.y;
}
var GP = 10, jP = Math.PI * (3 - Math.sqrt(5));
function $P(t) {
var e, r = 1, n = 1e-3, i = 1 - Math.pow(n, 1 / 300), a = 0, s = 0.6, o = /* @__PURE__ */ new Map(), l = x1(d), u = Ws("tick", "end"), h = UP();
t == null && (t = []);
function d() {
f(), u.call("tick", e), r < n && (l.stop(), u.call("end", e));
}
function f(_) {
var y, b = t.length, x;
_ === void 0 && (_ = 1);
for (var k = 0; k < _; ++k)
for (r += (a - r) * i, o.forEach(function(T) {
T(r);
}), y = 0; y < b; ++y)
x = t[y], x.fx == null ? x.x += x.vx *= s : (x.x = x.fx, x.vx = 0), x.fy == null ? x.y += x.vy *= s : (x.y = x.fy, x.vy = 0);
return e;
}
function p() {
for (var _ = 0, y = t.length, b; _ < y; ++_) {
if (b = t[_], b.index = _, b.fx != null && (b.x = b.fx), b.fy != null && (b.y = b.fy), isNaN(b.x) || isNaN(b.y)) {
var x = GP * Math.sqrt(0.5 + _), k = _ * jP;
b.x = x * Math.cos(k), b.y = x * Math.sin(k);
}
(isNaN(b.vx) || isNaN(b.vy)) && (b.vx = b.vy = 0);
}
}
function m(_) {
return _.initialize && _.initialize(t, h), _;
}
return p(), e = {
tick: f,
restart: function() {
return l.restart(d), e;
},
stop: function() {
return l.stop(), e;
},
nodes: function(_) {
return arguments.length ? (t = _, p(), o.forEach(m), e) : t;
},
alpha: function(_) {
return arguments.length ? (r = +_, e) : r;
},
alphaMin: function(_) {
return arguments.length ? (n = +_, e) : n;
},
alphaDecay: function(_) {
return arguments.length ? (i = +_, e) : +i;
},
alphaTarget: function(_) {
return arguments.length ? (a = +_, e) : a;
},
velocityDecay: function(_) {
return arguments.length ? (s = 1 - _, e) : 1 - s;
},
randomSource: function(_) {
return arguments.length ? (h = _, o.forEach(m), e) : h;
},
force: function(_, y) {
return arguments.length > 1 ? (y == null ? o.delete(_) : o.set(_, m(y)), e) : o.get(_);
},
find: function(_, y, b) {
var x = 0, k = t.length, T, C, M, S, R;
for (b == null ? b = 1 / 0 : b *= b, x = 0; x < k; ++x)
S = t[x], T = _ - S.x, C = y - S.y, M = T * T + C * C, M < b && (R = S, b = M);
return R;
},
on: function(_, y) {
return arguments.length > 1 ? (u.on(_, y), e) : u.on(_);
}
};
}
function XP() {
var t, e, r, n, i = kr(-30), a, s = 1, o = 1 / 0, l = 0.81;
function u(p) {
var m, _ = t.length, y = E1(t, WP, HP).visitAfter(d);
for (n = p, m = 0; m < _; ++m)
e = t[m], y.visit(f);
}
function h() {
if (!!t) {
var p, m = t.length, _;
for (a = new Array(m), p = 0; p < m; ++p)
_ = t[p], a[_.index] = +i(_, p, t);
}
}
function d(p) {
var m = 0, _, y, b = 0, x, k, T;
if (p.length) {
for (x = k = T = 0; T < 4; ++T)
(_ = p[T]) && (y = Math.abs(_.value)) && (m += _.value, b += y, x += y * _.x, k += y * _.y);
p.x = x / b, p.y = k / b;
} else {
_ = p, _.x = _.data.x, _.y = _.data.y;
do
m += a[_.data.index];
while (_ = _.next);
}
p.value = m;
}
function f(p, m, _, y) {
if (!p.value)
return !0;
var b = p.x - e.x, x = p.y - e.y, k = y - m, T = b * b + x * x;
if (k * k / l < T)
return T < o && (b === 0 && (b = Oa(r), T += b * b), x === 0 && (x = Oa(r), T += x * x), T < s && (T = Math.sqrt(s * T)), e.vx += b * p.value * n / T, e.vy += x * p.value * n / T), !0;
if (p.length || T >= o)
return;
(p.data !== e || p.next) && (b === 0 && (b = Oa(r), T += b * b), x === 0 && (x = Oa(r), T += x * x), T < s && (T = Math.sqrt(s * T)));
do
p.data !== e && (k = a[p.data.index] * n / T, e.vx += b * k, e.vy += x * k);
while (p = p.next);
}
return u.initialize = function(p, m) {
t = p, r = m, h();
}, u.strength = function(p) {
return arguments.length ? (i = typeof p == "function" ? p : kr(+p), h(), u) : i;
}, u.distanceMin = function(p) {
return arguments.length ? (s = p * p, u) : Math.sqrt(s);
}, u.distanceMax = function(p) {
return arguments.length ? (o = p * p, u) : Math.sqrt(o);
}, u.theta = function(p) {
return arguments.length ? (l = p * p, u) : Math.sqrt(l);
}, u;
}
function KP(t, e, r) {
var n, i = kr(0.1), a, s;
typeof t != "function" && (t = kr(+t)), e == null && (e = 0), r == null && (r = 0);
function o(u) {
for (var h = 0, d = n.length; h < d; ++h) {
var f = n[h], p = f.x - e || 1e-6, m = f.y - r || 1e-6, _ = Math.sqrt(p * p + m * m), y = (s[h] - _) * a[h] * u / _;
f.vx += p * y, f.vy += m * y;
}
}
function l() {
if (!!n) {
var u, h = n.length;
for (a = new Array(h), s = new Array(h), u = 0; u < h; ++u)
s[u] = +t(n[u], u, n), a[u] = isNaN(s[u]) ? 0 : +i(n[u], u, n);
}
}
return o.initialize = function(u) {
n = u, l();
}, o.strength = function(u) {
return arguments.length ? (i = typeof u == "function" ? u : kr(+u), l(), o) : i;
}, o.radius = function(u) {
return arguments.length ? (t = typeof u == "function" ? u : kr(+u), l(), o) : t;
}, o.x = function(u) {
return arguments.length ? (e = +u, o) : e;
}, o.y = function(u) {
return arguments.length ? (r = +u, o) : r;
}, o;
}
function ZP(t) {
var e = kr(0.1), r, n, i;
typeof t != "function" && (t = kr(t == null ? 0 : +t));
function a(o) {
for (var l = 0, u = r.length, h; l < u; ++l)
h = r[l], h.vx += (i[l] - h.x) * n[l] * o;
}
function s() {
if (!!r) {
var o, l = r.length;
for (n = new Array(l), i = new Array(l), o = 0; o < l; ++o)
n[o] = isNaN(i[o] = +t(r[o], o, r)) ? 0 : +e(r[o], o, r);
}
}
return a.initialize = function(o) {
r = o, s();
}, a.strength = function(o) {
return arguments.length ? (e = typeof o == "function" ? o : kr(+o), s(), a) : e;
}, a.x = function(o) {
return arguments.length ? (t = typeof o == "function" ? o : kr(+o), s(), a) : t;
}, a;
}
function QP(t) {
var e = kr(0.1), r, n, i;
typeof t != "function" && (t = kr(t == null ? 0 : +t));
function a(o) {
for (var l = 0, u = r.length, h; l < u; ++l)
h = r[l], h.vy += (i[l] - h.y) * n[l] * o;
}
function s() {
if (!!r) {
var o, l = r.length;
for (n = new Array(l), i = new Array(l), o = 0; o < l; ++o)
n[o] = isNaN(i[o] = +t(r[o], o, r)) ? 0 : +e(r[o], o, r);
}
}
return a.initialize = function(o) {
r = o, s();
}, a.strength = function(o) {
return arguments.length ? (e = typeof o == "function" ? o : kr(+o), s(), a) : e;
}, a.y = function(o) {
return arguments.length ? (t = typeof o == "function" ? o : kr(+o), s(), a) : t;
}, a;
}
function JP(t) {
return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
}
function $h(t, e) {
if ((r = (t = e ? t.toExponential(e - 1) : t.toExponential()).indexOf("e")) < 0)
return null;
var r, n = t.slice(0, r);
return [
n.length > 1 ? n[0] + n.slice(2) : n,
+t.slice(r + 1)
];
}
function Po(t) {
return t = $h(Math.abs(t)), t ? t[1] : NaN;
}
function tq(t, e) {
return function(r, n) {
for (var i = r.length, a = [], s = 0, o = t[0], l = 0; i > 0 && o > 0 && (l + o + 1 > n && (o = Math.max(1, n - l)), a.push(r.substring(i -= o, i + o)), !((l += o + 1) > n)); )
o = t[s = (s + 1) % t.length];
return a.reverse().join(e);
};
}
function eq(t) {
return function(e) {
return e.replace(/[0-9]/g, function(r) {
return t[+r];
});
};
}
var rq = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function qo(t) {
if (!(e = rq.exec(t)))
throw new Error("invalid format: " + t);
var e;
return new C1({
fill: e[1],
align: e[2],
sign: e[3],
symbol: e[4],
zero: e[5],
width: e[6],
comma: e[7],
precision: e[8] && e[8].slice(1),
trim: e[9],
type: e[10]
});
}
qo.prototype = C1.prototype;
function C1(t) {
this.fill = t.fill === void 0 ? " " : t.fill + "", this.align = t.align === void 0 ? ">" : t.align + "", this.sign = t.sign === void 0 ? "-" : t.sign + "", this.symbol = t.symbol === void 0 ? "" : t.symbol + "", this.zero = !!t.zero, this.width = t.width === void 0 ? void 0 : +t.width, this.comma = !!t.comma, this.precision = t.precision === void 0 ? void 0 : +t.precision, this.trim = !!t.trim, this.type = t.type === void 0 ? "" : t.type + "";
}
C1.prototype.toString = function() {
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
};
function nq(t) {
t:
for (var e = t.length, r = 1, n = -1, i; r < e; ++r)
switch (t[r]) {
case ".":
n = i = r;
break;
case "0":
n === 0 && (n = r), i = r;
break;
default:
if (!+t[r])
break t;
n > 0 && (n = 0);
break;
}
return n > 0 ? t.slice(0, n) + t.slice(i + 1) : t;
}
var nT;
function iq(t, e) {
var r = $h(t, e);
if (!r)
return t + "";
var n = r[0], i = r[1], a = i - (nT = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, s = n.length;
return a === s ? n : a > s ? n + new Array(a - s + 1).join("0") : a > 0 ? n.slice(0, a) + "." + n.slice(a) : "0." + new Array(1 - a).join("0") + $h(t, Math.max(0, e + a - 1))[0];
}
function m5(t, e) {
var r = $h(t, e);
if (!r)
return t + "";
var n = r[0], i = r[1];
return i < 0 ? "0." + new Array(-i).join("0") + n : n.length > i + 1 ? n.slice(0, i + 1) + "." + n.slice(i + 1) : n + new Array(i - n.length + 2).join("0");
}
const b5 = {
"%": (t, e) => (t * 100).toFixed(e),
b: (t) => Math.round(t).toString(2),
c: (t) => t + "",
d: JP,
e: (t, e) => t.toExponential(e),
f: (t, e) => t.toFixed(e),
g: (t, e) => t.toPrecision(e),
o: (t) => Math.round(t).toString(8),
p: (t, e) => m5(t * 100, e),
r: m5,
s: iq,
X: (t) => Math.round(t).toString(16).toUpperCase(),
x: (t) => Math.round(t).toString(16)
};
function _5(t) {
return t;
}
var v5 = Array.prototype.map, x5 = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
function iT(t) {
var e = t.grouping === void 0 || t.thousands === void 0 ? _5 : tq(v5.call(t.grouping, Number), t.thousands + ""), r = t.currency === void 0 ? "" : t.currency[0] + "", n = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? _5 : eq(v5.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", o = t.minus === void 0 ? "\u2212" : t.minus + "", l = t.nan === void 0 ? "NaN" : t.nan + "";
function u(d) {
d = qo(d);
var f = d.fill, p = d.align, m = d.sign, _ = d.symbol, y = d.zero, b = d.width, x = d.comma, k = d.precision, T = d.trim, C = d.type;
C === "n" ? (x = !0, C = "g") : b5[C] || (k === void 0 && (k = 12), T = !0, C = "g"), (y || f === "0" && p === "=") && (y = !0, f = "0", p = "=");
var M = _ === "$" ? r : _ === "#" && /[boxX]/.test(C) ? "0" + C.toLowerCase() : "", S = _ === "$" ? n : /[%p]/.test(C) ? s : "", R = b5[C], A = /[defgprs%]/.test(C);
k = k === void 0 ? 6 : /[gprs]/.test(C) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
function L(v) {
var B = M, w = S, D, N, z;
if (C === "c")
w = R(v) + w, v = "";
else {
v = +v;
var X = v < 0 || 1 / v < 0;
if (v = isNaN(v) ? l : R(Math.abs(v), k), T && (v = nq(v)), X && +v == 0 && m !== "+" && (X = !1), B = (X ? m === "(" ? m : o : m === "-" || m === "(" ? "" : m) + B, w = (C === "s" ? x5[8 + nT / 3] : "") + w + (X && m === "(" ? ")" : ""), A) {
for (D = -1, N = v.length; ++D < N; )
if (z = v.charCodeAt(D), 48 > z || z > 57) {
w = (z === 46 ? i + v.slice(D + 1) : v.slice(D)) + w, v = v.slice(0, D);
break;
}
}
}
x && !y && (v = e(v, 1 / 0));
var ct = B.length + v.length + w.length, J = ct < b ? new Array(b - ct + 1).join(f) : "";
switch (x && y && (v = e(J + v, J.length ? b - w.length : 1 / 0), J = ""), p) {
case "<":
v = B + v + w + J;
break;
case "=":
v = B + J + v + w;
break;
case "^":
v = J.slice(0, ct = J.length >> 1) + B + v + w + J.slice(ct);
break;
default:
v = J + B + v + w;
break;
}
return a(v);
}
return L.toString = function() {
return d + "";
}, L;
}
function h(d, f) {
var p = u((d = qo(d), d.type = "f", d)), m = Math.max(-8, Math.min(8, Math.floor(Po(f) / 3))) * 3, _ = Math.pow(10, -m), y = x5[8 + m / 3];
return function(b) {
return p(_ * b) + y;
};
}
return {
format: u,
formatPrefix: h
};
}
var Ou, S1, h3;
aT({
thousands: ",",
grouping: [3],
currency: ["$", ""]
});
function aT(t) {
return Ou = iT(t), S1 = Ou.format, h3 = Ou.formatPrefix, Ou;
}
function sT(t) {
return Math.max(0, -Po(Math.abs(t)));
}
function oT(t, e) {
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Po(e) / 3))) * 3 - Po(Math.abs(t)));
}
function lT(t, e) {
return t = Math.abs(t), e = Math.abs(e) - t, Math.max(0, Po(e) - Po(t)) + 1;
}
var ee = 1e-6, Tc = 1e-12, Ae = Math.PI, sr = Ae / 2, Xh = Ae / 4, sn = Ae * 2, Ue = 180 / Ae, ie = Ae / 180, Ne = Math.abs, al = Math.atan, on = Math.atan2, Zt = Math.cos, Fu = Math.ceil, cT = Math.exp, Mm = Math.hypot, Kh = Math.log, id = Math.pow, jt = Math.sin, On = Math.sign || function(t) {
return t > 0 ? 1 : t < 0 ? -1 : 0;
}, Mr = Math.sqrt, f3 = Math.tan;
function uT(t) {
return t > 1 ? 0 : t < -1 ? Ae : Math.acos(t);
}
function ln(t) {
return t > 1 ? sr : t < -1 ? -sr : Math.asin(t);
}
function k5(t) {
return (t = jt(t / 2)) * t;
}
function Je() {
}
function Zh(t, e) {
t && T5.hasOwnProperty(t.type) && T5[t.type](t, e);
}
var w5 = {
Feature: function(t, e) {
Zh(t.geometry, e);
},
FeatureCollection: function(t, e) {
for (var r = t.features, n = -1, i = r.length; ++n < i; )
Zh(r[n].geometry, e);
}
}, T5 = {
Sphere: function(t, e) {
e.sphere();
},
Point: function(t, e) {
t = t.coordinates, e.point(t[0], t[1], t[2]);
},
MultiPoint: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
t = r[n], e.point(t[0], t[1], t[2]);
},
LineString: function(t, e) {
Lm(t.coordinates, e, 0);
},
MultiLineString: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
Lm(r[n], e, 0);
},
Polygon: function(t, e) {
E5(t.coordinates, e);
},
MultiPolygon: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
E5(r[n], e);
},
GeometryCollection: function(t, e) {
for (var r = t.geometries, n = -1, i = r.length; ++n < i; )
Zh(r[n], e);
}
};
function Lm(t, e, r) {
var n = -1, i = t.length - r, a;
for (e.lineStart(); ++n < i; )
a = t[n], e.point(a[0], a[1], a[2]);
e.lineEnd();
}
function E5(t, e) {
var r = -1, n = t.length;
for (e.polygonStart(); ++r < n; )
Lm(t[r], e, 1);
e.polygonEnd();
}
function Zn(t, e) {
t && w5.hasOwnProperty(t.type) ? w5[t.type](t, e) : Zh(t, e);
}
var Qh = new wr(), Jh = new wr(), hT, fT, Rm, Im, Nm, Oi = {
point: Je,
lineStart: Je,
lineEnd: Je,
polygonStart: function() {
Qh = new wr(), Oi.lineStart = aq, Oi.lineEnd = sq;
},
polygonEnd: function() {
var t = +Qh;
Jh.add(t < 0 ? sn + t : t), this.lineStart = this.lineEnd = this.point = Je;
},
sphere: function() {
Jh.add(sn);
}
};
function aq() {
Oi.point = oq;
}
function sq() {
dT(hT, fT);
}
function oq(t, e) {
Oi.point = dT, hT = t, fT = e, t *= ie, e *= ie, Rm = t, Im = Zt(e = e / 2 + Xh), Nm = jt(e);
}
function dT(t, e) {
t *= ie, e *= ie, e = e / 2 + Xh;
var r = t - Rm, n = r >= 0 ? 1 : -1, i = n * r, a = Zt(e), s = jt(e), o = Nm * s, l = Im * a + o * Zt(i), u = o * n * jt(i);
Qh.add(on(u, l)), Rm = t, Im = a, Nm = s;
}
function lq(t) {
return Jh = new wr(), Zn(t, Oi), Jh * 2;
}
function tf(t) {
return [on(t[1], t[0]), ln(t[2])];
}
function Is(t) {
var e = t[0], r = t[1], n = Zt(r);
return [n * Zt(e), n * jt(e), jt(r)];
}
function Pu(t, e) {
return t[0] * e[0] + t[1] * e[1] + t[2] * e[2];
}
function Vo(t, e) {
return [t[1] * e[2] - t[2] * e[1], t[2] * e[0] - t[0] * e[2], t[0] * e[1] - t[1] * e[0]];
}
function ad(t, e) {
t[0] += e[0], t[1] += e[1], t[2] += e[2];
}
function qu(t, e) {
return [t[0] * e, t[1] * e, t[2] * e];
}
function ef(t) {
var e = Mr(t[0] * t[0] + t[1] * t[1] + t[2] * t[2]);
t[0] /= e, t[1] /= e, t[2] /= e;
}
var Qe, dn, nr, An, ms, pT, gT, Eo, Ql, La, ya, oa = {
point: Bm,
lineStart: C5,
lineEnd: S5,
polygonStart: function() {
oa.point = mT, oa.lineStart = cq, oa.lineEnd = uq, Ql = new wr(), Oi.polygonStart();
},
polygonEnd: function() {
Oi.polygonEnd(), oa.point = Bm, oa.lineStart = C5, oa.lineEnd = S5, Qh < 0 ? (Qe = -(nr = 180), dn = -(An = 90)) : Ql > ee ? An = 90 : Ql < -ee && (dn = -90), ya[0] = Qe, ya[1] = nr;
},
sphere: function() {
Qe = -(nr = 180), dn = -(An = 90);
}
};
function Bm(t, e) {
La.push(ya = [Qe = t, nr = t]), e < dn && (dn = e), e > An && (An = e);
}
function yT(t, e) {
var r = Is([t * ie, e * ie]);
if (Eo) {
var n = Vo(Eo, r), i = [n[1], -n[0], 0], a = Vo(i, n);
ef(a), a = tf(a);
var s = t - ms, o = s > 0 ? 1 : -1, l = a[0] * Ue * o, u, h = Ne(s) > 180;
h ^ (o * ms < l && l < o * t) ? (u = a[1] * Ue, u > An && (An = u)) : (l = (l + 360) % 360 - 180, h ^ (o * ms < l && l < o * t) ? (u = -a[1] * Ue, u < dn && (dn = u)) : (e < dn && (dn = e), e > An && (An = e))), h ? t < ms ? En(Qe, t) > En(Qe, nr) && (nr = t) : En(t, nr) > En(Qe, nr) && (Qe = t) : nr >= Qe ? (t < Qe && (Qe = t), t > nr && (nr = t)) : t > ms ? En(Qe, t) > En(Qe, nr) && (nr = t) : En(t, nr) > En(Qe, nr) && (Qe = t);
} else
La.push(ya = [Qe = t, nr = t]);
e < dn && (dn = e), e > An && (An = e), Eo = r, ms = t;
}
function C5() {
oa.point = yT;
}
function S5() {
ya[0] = Qe, ya[1] = nr, oa.point = Bm, Eo = null;
}
function mT(t, e) {
if (Eo) {
var r = t - ms;
Ql.add(Ne(r) > 180 ? r + (r > 0 ? 360 : -360) : r);
} else
pT = t, gT = e;
Oi.point(t, e), yT(t, e);
}
function cq() {
Oi.lineStart();
}
function uq() {
mT(pT, gT), Oi.lineEnd(), Ne(Ql) > ee && (Qe = -(nr = 180)), ya[0] = Qe, ya[1] = nr, Eo = null;
}
function En(t, e) {
return (e -= t) < 0 ? e + 360 : e;
}
function hq(t, e) {
return t[0] - e[0];
}
function A5(t, e) {
return t[0] <= t[1] ? t[0] <= e && e <= t[1] : e < t[0] || t[1] < e;
}
function fq(t) {
var e, r, n, i, a, s, o;
if (An = nr = -(Qe = dn = 1 / 0), La = [], Zn(t, oa), r = La.length) {
for (La.sort(hq), e = 1, n = La[0], a = [n]; e < r; ++e)
i = La[e], A5(n, i[0]) || A5(n, i[1]) ? (En(n[0], i[1]) > En(n[0], n[1]) && (n[1] = i[1]), En(i[0], n[1]) > En(n[0], n[1]) && (n[0] = i[0])) : a.push(n = i);
for (s = -1 / 0, r = a.length - 1, e = 0, n = a[r]; e <= r; n = i, ++e)
i = a[e], (o = En(n[1], i[0])) > s && (s = o, Qe = i[0], nr = n[1]);
}
return La = ya = null, Qe === 1 / 0 || dn === 1 / 0 ? [[NaN, NaN], [NaN, NaN]] : [[Qe, dn], [nr, An]];
}
var Vl, rf, nf, af, sf, of, lf, cf, Dm, Om, Fm, bT, _T, Kr, Zr, Qr, ti = {
sphere: Je,
point: d3,
lineStart: M5,
lineEnd: L5,
polygonStart: function() {
ti.lineStart = gq, ti.lineEnd = yq;
},
polygonEnd: function() {
ti.lineStart = M5, ti.lineEnd = L5;
}
};
function d3(t, e) {
t *= ie, e *= ie;
var r = Zt(e);
Qc(r * Zt(t), r * jt(t), jt(e));
}
function Qc(t, e, r) {
++Vl, nf += (t - nf) / Vl, af += (e - af) / Vl, sf += (r - sf) / Vl;
}
function M5() {
ti.point = dq;
}
function dq(t, e) {
t *= ie, e *= ie;
var r = Zt(e);
Kr = r * Zt(t), Zr = r * jt(t), Qr = jt(e), ti.point = pq, Qc(Kr, Zr, Qr);
}
function pq(t, e) {
t *= ie, e *= ie;
var r = Zt(e), n = r * Zt(t), i = r * jt(t), a = jt(e), s = on(Mr((s = Zr * a - Qr * i) * s + (s = Qr * n - Kr * a) * s + (s = Kr * i - Zr * n) * s), Kr * n + Zr * i + Qr * a);
rf += s, of += s * (Kr + (Kr = n)), lf += s * (Zr + (Zr = i)), cf += s * (Qr + (Qr = a)), Qc(Kr, Zr, Qr);
}
function L5() {
ti.point = d3;
}
function gq() {
ti.point = mq;
}
function yq() {
vT(bT, _T), ti.point = d3;
}
function mq(t, e) {
bT = t, _T = e, t *= ie, e *= ie, ti.point = vT;
var r = Zt(e);
Kr = r * Zt(t), Zr = r * jt(t), Qr = jt(e), Qc(Kr, Zr, Qr);
}
function vT(t, e) {
t *= ie, e *= ie;
var r = Zt(e), n = r * Zt(t), i = r * jt(t), a = jt(e), s = Zr * a - Qr * i, o = Qr * n - Kr * a, l = Kr * i - Zr * n, u = Mm(s, o, l), h = ln(u), d = u && -h / u;
Dm.add(d * s), Om.add(d * o), Fm.add(d * l), rf += h, of += h * (Kr + (Kr = n)), lf += h * (Zr + (Zr = i)), cf += h * (Qr + (Qr = a)), Qc(Kr, Zr, Qr);
}
function bq(t) {
Vl = rf = nf = af = sf = of = lf = cf = 0, Dm = new wr(), Om = new wr(), Fm = new wr(), Zn(t, ti);
var e = +Dm, r = +Om, n = +Fm, i = Mm(e, r, n);
return i < Tc && (e = of, r = lf, n = cf, rf < ee && (e = nf, r = af, n = sf), i = Mm(e, r, n), i < Tc) ? [NaN, NaN] : [on(r, e) * Ue, ln(n / i) * Ue];
}
function po(t) {
return function() {
return t;
};
}
function Pm(t, e) {
function r(n, i) {
return n = t(n, i), e(n[0], n[1]);
}
return t.invert && e.invert && (r.invert = function(n, i) {
return n = e.invert(n, i), n && t.invert(n[0], n[1]);
}), r;
}
function qm(t, e) {
return [Ne(t) > Ae ? t + Math.round(-t / sn) * sn : t, e];
}
qm.invert = qm;
function p3(t, e, r) {
return (t %= sn) ? e || r ? Pm(I5(t), N5(e, r)) : I5(t) : e || r ? N5(e, r) : qm;
}
function R5(t) {
return function(e, r) {
return e += t, [e > Ae ? e - sn : e < -Ae ? e + sn : e, r];
};
}
function I5(t) {
var e = R5(t);
return e.invert = R5(-t), e;
}
function N5(t, e) {
var r = Zt(t), n = jt(t), i = Zt(e), a = jt(e);
function s(o, l) {
var u = Zt(l), h = Zt(o) * u, d = jt(o) * u, f = jt(l), p = f * r + h * n;
return [
on(d * i - p * a, h * r - f * n),
ln(p * i + d * a)
];
}
return s.invert = function(o, l) {
var u = Zt(l), h = Zt(o) * u, d = jt(o) * u, f = jt(l), p = f * i - d * a;
return [
on(d * i + f * a, h * r + p * n),
ln(p * r - h * n)
];
}, s;
}
function xT(t) {
t = p3(t[0] * ie, t[1] * ie, t.length > 2 ? t[2] * ie : 0);
function e(r) {
return r = t(r[0] * ie, r[1] * ie), r[0] *= Ue, r[1] *= Ue, r;
}
return e.invert = function(r) {
return r = t.invert(r[0] * ie, r[1] * ie), r[0] *= Ue, r[1] *= Ue, r;
}, e;
}
function kT(t, e, r, n, i, a) {
if (!!r) {
var s = Zt(e), o = jt(e), l = n * r;
i == null ? (i = e + n * sn, a = e - l / 2) : (i = B5(s, i), a = B5(s, a), (n > 0 ? i < a : i > a) && (i += n * sn));
for (var u, h = i; n > 0 ? h > a : h < a; h -= l)
u = tf([s, -o * Zt(h), -o * jt(h)]), t.point(u[0], u[1]);
}
}
function B5(t, e) {
e = Is(e), e[0] -= t, ef(e);
var r = uT(-e[1]);
return ((-e[2] < 0 ? -r : r) + sn - ee) % sn;
}
function _q() {
var t = po([0, 0]), e = po(90), r = po(6), n, i, a = { point: s };
function s(l, u) {
n.push(l = i(l, u)), l[0] *= Ue, l[1] *= Ue;
}
function o() {
var l = t.apply(this, arguments), u = e.apply(this, arguments) * ie, h = r.apply(this, arguments) * ie;
return n = [], i = p3(-l[0] * ie, -l[1] * ie, 0).invert, kT(a, u, h, 1), l = { type: "Polygon", coordinates: [n] }, n = i = null, l;
}
return o.center = function(l) {
return arguments.length ? (t = typeof l == "function" ? l : po([+l[0], +l[1]]), o) : t;
}, o.radius = function(l) {
return arguments.length ? (e = typeof l == "function" ? l : po(+l), o) : e;
}, o.precision = function(l) {
return arguments.length ? (r = typeof l == "function" ? l : po(+l), o) : r;
}, o;
}
function wT() {
var t = [], e;
return {
point: function(r, n, i) {
e.push([r, n, i]);
},
lineStart: function() {
t.push(e = []);
},
lineEnd: Je,
rejoin: function() {
t.length > 1 && t.push(t.pop().concat(t.shift()));
},
result: function() {
var r = t;
return t = [], e = null, r;
}
};
}
function bh(t, e) {
return Ne(t[0] - e[0]) < ee && Ne(t[1] - e[1]) < ee;
}
function Vu(t, e, r, n) {
this.x = t, this.z = e, this.o = r, this.e = n, this.v = !1, this.n = this.p = null;
}
function TT(t, e, r, n, i) {
var a = [], s = [], o, l;
if (t.forEach(function(m) {
if (!((_ = m.length - 1) <= 0)) {
var _, y = m[0], b = m[_], x;
if (bh(y, b)) {
if (!y[2] && !b[2]) {
for (i.lineStart(), o = 0; o < _; ++o)
i.point((y = m[o])[0], y[1]);
i.lineEnd();
return;
}
b[0] += 2 * ee;
}
a.push(x = new Vu(y, m, null, !0)), s.push(x.o = new Vu(y, null, x, !1)), a.push(x = new Vu(b, m, null, !1)), s.push(x.o = new Vu(b, null, x, !0));
}
}), !!a.length) {
for (s.sort(e), D5(a), D5(s), o = 0, l = s.length; o < l; ++o)
s[o].e = r = !r;
for (var u = a[0], h, d; ; ) {
for (var f = u, p = !0; f.v; )
if ((f = f.n) === u)
return;
h = f.z, i.lineStart();
do {
if (f.v = f.o.v = !0, f.e) {
if (p)
for (o = 0, l = h.length; o < l; ++o)
i.point((d = h[o])[0], d[1]);
else
n(f.x, f.n.x, 1, i);
f = f.n;
} else {
if (p)
for (h = f.p.z, o = h.length - 1; o >= 0; --o)
i.point((d = h[o])[0], d[1]);
else
n(f.x, f.p.x, -1, i);
f = f.p;
}
f = f.o, h = f.z, p = !p;
} while (!f.v);
i.lineEnd();
}
}
}
function D5(t) {
if (!!(e = t.length)) {
for (var e, r = 0, n = t[0], i; ++r < e; )
n.n = i = t[r], i.p = n, n = i;
n.n = i = t[0], i.p = n;
}
}
function sd(t) {
return Ne(t[0]) <= Ae ? t[0] : On(t[0]) * ((Ne(t[0]) + Ae) % sn - Ae);
}
function ET(t, e) {
var r = sd(e), n = e[1], i = jt(n), a = [jt(r), -Zt(r), 0], s = 0, o = 0, l = new wr();
i === 1 ? n = sr + ee : i === -1 && (n = -sr - ee);
for (var u = 0, h = t.length; u < h; ++u)
if (!!(f = (d = t[u]).length))
for (var d, f, p = d[f - 1], m = sd(p), _ = p[1] / 2 + Xh, y = jt(_), b = Zt(_), x = 0; x < f; ++x, m = T, y = M, b = S, p = k) {
var k = d[x], T = sd(k), C = k[1] / 2 + Xh, M = jt(C), S = Zt(C), R = T - m, A = R >= 0 ? 1 : -1, L = A * R, v = L > Ae, B = y * M;
if (l.add(on(B * A * jt(L), b * S + B * Zt(L))), s += v ? R + A * sn : R, v ^ m >= r ^ T >= r) {
var w = Vo(Is(p), Is(k));
ef(w);
var D = Vo(a, w);
ef(D);
var N = (v ^ R >= 0 ? -1 : 1) * ln(D[2]);
(n > N || n === N && (w[0] || w[1])) && (o += v ^ R >= 0 ? 1 : -1);
}
}
return (s < -ee || s < ee && l < -Tc) ^ o & 1;
}
function CT(t, e, r, n) {
return function(i) {
var a = e(i), s = wT(), o = e(s), l = !1, u, h, d, f = {
point: p,
lineStart: _,
lineEnd: y,
polygonStart: function() {
f.point = b, f.lineStart = x, f.lineEnd = k, h = [], u = [];
},
polygonEnd: function() {
f.point = p, f.lineStart = _, f.lineEnd = y, h = Ub(h);
var T = ET(u, n);
h.length ? (l || (i.polygonStart(), l = !0), TT(h, xq, T, r, i)) : T && (l || (i.polygonStart(), l = !0), i.lineStart(), r(null, null, 1, i), i.lineEnd()), l && (i.polygonEnd(), l = !1), h = u = null;
},
sphere: function() {
i.polygonStart(), i.lineStart(), r(null, null, 1, i), i.lineEnd(), i.polygonEnd();
}
};
function p(T, C) {
t(T, C) && i.point(T, C);
}
function m(T, C) {
a.point(T, C);
}
function _() {
f.point = m, a.lineStart();
}
function y() {
f.point = p, a.lineEnd();
}
function b(T, C) {
d.push([T, C]), o.point(T, C);
}
function x() {
o.lineStart(), d = [];
}
function k() {
b(d[0][0], d[0][1]), o.lineEnd();
var T = o.clean(), C = s.result(), M, S = C.length, R, A, L;
if (d.pop(), u.push(d), d = null, !!S) {
if (T & 1) {
if (A = C[0], (R = A.length - 1) > 0) {
for (l || (i.polygonStart(), l = !0), i.lineStart(), M = 0; M < R; ++M)
i.point((L = A[M])[0], L[1]);
i.lineEnd();
}
return;
}
S > 1 && T & 2 && C.push(C.pop().concat(C.shift())), h.push(C.filter(vq));
}
}
return f;
};
}
function vq(t) {
return t.length > 1;
}
function xq(t, e) {
return ((t = t.x)[0] < 0 ? t[1] - sr - ee : sr - t[1]) - ((e = e.x)[0] < 0 ? e[1] - sr - ee : sr - e[1]);
}
const Vm = CT(
function() {
return !0;
},
kq,
Tq,
[-Ae, -sr]
);
function kq(t) {
var e = NaN, r = NaN, n = NaN, i;
return {
lineStart: function() {
t.lineStart(), i = 1;
},
point: function(a, s) {
var o = a > 0 ? Ae : -Ae, l = Ne(a - e);
Ne(l - Ae) < ee ? (t.point(e, r = (r + s) / 2 > 0 ? sr : -sr), t.point(n, r), t.lineEnd(), t.lineStart(), t.point(o, r), t.point(a, r), i = 0) : n !== o && l >= Ae && (Ne(e - n) < ee && (e -= n * ee), Ne(a - o) < ee && (a -= o * ee), r = wq(e, r, a, s), t.point(n, r), t.lineEnd(), t.lineStart(), t.point(o, r), i = 0), t.point(e = a, r = s), n = o;
},
lineEnd: function() {
t.lineEnd(), e = r = NaN;
},
clean: function() {
return 2 - i;
}
};
}
function wq(t, e, r, n) {
var i, a, s = jt(t - r);
return Ne(s) > ee ? al((jt(e) * (a = Zt(n)) * jt(r) - jt(n) * (i = Zt(e)) * jt(t)) / (i * a * s)) : (e + n) / 2;
}
function Tq(t, e, r, n) {
var i;
if (t == null)
i = r * sr, n.point(-Ae, i), n.point(0, i), n.point(Ae, i), n.point(Ae, 0), n.point(Ae, -i), n.point(0, -i), n.point(-Ae, -i), n.point(-Ae, 0), n.point(-Ae, i);
else if (Ne(t[0] - e[0]) > ee) {
var a = t[0] < e[0] ? Ae : -Ae;
i = r * a / 2, n.point(-a, i), n.point(0, i), n.point(a, i);
} else
n.point(e[0], e[1]);
}
function ST(t) {
var e = Zt(t), r = 6 * ie, n = e > 0, i = Ne(e) > ee;
function a(h, d, f, p) {
kT(p, t, r, f, h, d);
}
function s(h, d) {
return Zt(h) * Zt(d) > e;
}
function o(h) {
var d, f, p, m, _;
return {
lineStart: function() {
m = p = !1, _ = 1;
},
point: function(y, b) {
var x = [y, b], k, T = s(y, b), C = n ? T ? 0 : u(y, b) : T ? u(y + (y < 0 ? Ae : -Ae), b) : 0;
if (!d && (m = p = T) && h.lineStart(), T !== p && (k = l(d, x), (!k || bh(d, k) || bh(x, k)) && (x[2] = 1)), T !== p)
_ = 0, T ? (h.lineStart(), k = l(x, d), h.point(k[0], k[1])) : (k = l(d, x), h.point(k[0], k[1], 2), h.lineEnd()), d = k;
else if (i && d && n ^ T) {
var M;
!(C & f) && (M = l(x, d, !0)) && (_ = 0, n ? (h.lineStart(), h.point(M[0][0], M[0][1]), h.point(M[1][0], M[1][1]), h.lineEnd()) : (h.point(M[1][0], M[1][1]), h.lineEnd(), h.lineStart(), h.point(M[0][0], M[0][1], 3)));
}
T && (!d || !bh(d, x)) && h.point(x[0], x[1]), d = x, p = T, f = C;
},
lineEnd: function() {
p && h.lineEnd(), d = null;
},
clean: function() {
return _ | (m && p) << 1;
}
};
}
function l(h, d, f) {
var p = Is(h), m = Is(d), _ = [1, 0, 0], y = Vo(p, m), b = Pu(y, y), x = y[0], k = b - x * x;
if (!k)
return !f && h;
var T = e * b / k, C = -e * x / k, M = Vo(_, y), S = qu(_, T), R = qu(y, C);
ad(S, R);
var A = M, L = Pu(S, A), v = Pu(A, A), B = L * L - v * (Pu(S, S) - 1);
if (!(B < 0)) {
var w = Mr(B), D = qu(A, (-L - w) / v);
if (ad(D, S), D = tf(D), !f)
return D;
var N = h[0], z = d[0], X = h[1], ct = d[1], J;
z < N && (J = N, N = z, z = J);
var Y = z - N, $ = Ne(Y - Ae) < ee, lt = $ || Y < ee;
if (!$ && ct < X && (J = X, X = ct, ct = J), lt ? $ ? X + ct > 0 ^ D[1] < (Ne(D[0] - N) < ee ? X : ct) : X <= D[1] && D[1] <= ct : Y > Ae ^ (N <= D[0] && D[0] <= z)) {
var ut = qu(A, (-L + w) / v);
return ad(ut, S), [D, tf(ut)];
}
}
}
function u(h, d) {
var f = n ? t : Ae - t, p = 0;
return h < -f ? p |= 1 : h > f && (p |= 2), d < -f ? p |= 4 : d > f && (p |= 8), p;
}
return CT(s, o, a, n ? [0, -t] : [-Ae, t - Ae]);
}
function Eq(t, e, r, n, i, a) {
var s = t[0], o = t[1], l = e[0], u = e[1], h = 0, d = 1, f = l - s, p = u - o, m;
if (m = r - s, !(!f && m > 0)) {
if (m /= f, f < 0) {
if (m < h)
return;
m < d && (d = m);
} else if (f > 0) {
if (m > d)
return;
m > h && (h = m);
}
if (m = i - s, !(!f && m < 0)) {
if (m /= f, f < 0) {
if (m > d)
return;
m > h && (h = m);
} else if (f > 0) {
if (m < h)
return;
m < d && (d = m);
}
if (m = n - o, !(!p && m > 0)) {
if (m /= p, p < 0) {
if (m < h)
return;
m < d && (d = m);
} else if (p > 0) {
if (m > d)
return;
m > h && (h = m);
}
if (m = a - o, !(!p && m < 0)) {
if (m /= p, p < 0) {
if (m > d)
return;
m > h && (h = m);
} else if (p > 0) {
if (m < h)
return;
m < d && (d = m);
}
return h > 0 && (t[0] = s + h * f, t[1] = o + h * p), d < 1 && (e[0] = s + d * f, e[1] = o + d * p), !0;
}
}
}
}
}
var zl = 1e9, zu = -zl;
function A1(t, e, r, n) {
function i(u, h) {
return t <= u && u <= r && e <= h && h <= n;
}
function a(u, h, d, f) {
var p = 0, m = 0;
if (u == null || (p = s(u, d)) !== (m = s(h, d)) || l(u, h) < 0 ^ d > 0)
do
f.point(p === 0 || p === 3 ? t : r, p > 1 ? n : e);
while ((p = (p + d + 4) % 4) !== m);
else
f.point(h[0], h[1]);
}
function s(u, h) {
return Ne(u[0] - t) < ee ? h > 0 ? 0 : 3 : Ne(u[0] - r) < ee ? h > 0 ? 2 : 1 : Ne(u[1] - e) < ee ? h > 0 ? 1 : 0 : h > 0 ? 3 : 2;
}
function o(u, h) {
return l(u.x, h.x);
}
function l(u, h) {
var d = s(u, 1), f = s(h, 1);
return d !== f ? d - f : d === 0 ? h[1] - u[1] : d === 1 ? u[0] - h[0] : d === 2 ? u[1] - h[1] : h[0] - u[0];
}
return function(u) {
var h = u, d = wT(), f, p, m, _, y, b, x, k, T, C, M, S = {
point: R,
lineStart: B,
lineEnd: w,
polygonStart: L,
polygonEnd: v
};
function R(N, z) {
i(N, z) && h.point(N, z);
}
function A() {
for (var N = 0, z = 0, X = p.length; z < X; ++z)
for (var ct = p[z], J = 1, Y = ct.length, $ = ct[0], lt, ut, W = $[0], tt = $[1]; J < Y; ++J)
lt = W, ut = tt, $ = ct[J], W = $[0], tt = $[1], ut <= n ? tt > n && (W - lt) * (n - ut) > (tt - ut) * (t - lt) && ++N : tt <= n && (W - lt) * (n - ut) < (tt - ut) * (t - lt) && --N;
return N;
}
function L() {
h = d, f = [], p = [], M = !0;
}
function v() {
var N = A(), z = M && N, X = (f = Ub(f)).length;
(z || X) && (u.polygonStart(), z && (u.lineStart(), a(null, null, 1, u), u.lineEnd()), X && TT(f, o, N, a, u), u.polygonEnd()), h = u, f = p = m = null;
}
function B() {
S.point = D, p && p.push(m = []), C = !0, T = !1, x = k = NaN;
}
function w() {
f && (D(_, y), b && T && d.rejoin(), f.push(d.result())), S.point = R, T && h.lineEnd();
}
function D(N, z) {
var X = i(N, z);
if (p && m.push([N, z]), C)
_ = N, y = z, b = X, C = !1, X && (h.lineStart(), h.point(N, z));
else if (X && T)
h.point(N, z);
else {
var ct = [x = Math.max(zu, Math.min(zl, x)), k = Math.max(zu, Math.min(zl, k))], J = [N = Math.max(zu, Math.min(zl, N)), z = Math.max(zu, Math.min(zl, z))];
Eq(ct, J, t, e, r, n) ? (T || (h.lineStart(), h.point(ct[0], ct[1])), h.point(J[0], J[1]), X || h.lineEnd(), M = !1) : X && (h.lineStart(), h.point(N, z), M = !1);
}
x = N, k = z, T = X;
}
return S;
};
}
function Cq() {
var t = 0, e = 0, r = 960, n = 500, i, a, s;
return s = {
stream: function(o) {
return i && a === o ? i : i = A1(t, e, r, n)(a = o);
},
extent: function(o) {
return arguments.length ? (t = +o[0][0], e = +o[0][1], r = +o[1][0], n = +o[1][1], i = a = null, s) : [[t, e], [r, n]];
}
};
}
var zm, Ym, _h, vh, zo = {
sphere: Je,
point: Je,
lineStart: Sq,
lineEnd: Je,
polygonStart: Je,
polygonEnd: Je
};
function Sq() {
zo.point = Mq, zo.lineEnd = Aq;
}
function Aq() {
zo.point = zo.lineEnd = Je;
}
function Mq(t, e) {
t *= ie, e *= ie, Ym = t, _h = jt(e), vh = Zt(e), zo.point = Lq;
}
function Lq(t, e) {
t *= ie, e *= ie;
var r = jt(e), n = Zt(e), i = Ne(t - Ym), a = Zt(i), s = jt(i), o = n * s, l = vh * r - _h * n * a, u = _h * r + vh * n * a;
zm.add(on(Mr(o * o + l * l), u)), Ym = t, _h = r, vh = n;
}
function AT(t) {
return zm = new wr(), Zn(t, zo), +zm;
}
var Um = [null, null], Rq = { type: "LineString", coordinates: Um };
function uf(t, e) {
return Um[0] = t, Um[1] = e, AT(Rq);
}
var O5 = {
Feature: function(t, e) {
return hf(t.geometry, e);
},
FeatureCollection: function(t, e) {
for (var r = t.features, n = -1, i = r.length; ++n < i; )
if (hf(r[n].geometry, e))
return !0;
return !1;
}
}, F5 = {
Sphere: function() {
return !0;
},
Point: function(t, e) {
return P5(t.coordinates, e);
},
MultiPoint: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
if (P5(r[n], e))
return !0;
return !1;
},
LineString: function(t, e) {
return q5(t.coordinates, e);
},
MultiLineString: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
if (q5(r[n], e))
return !0;
return !1;
},
Polygon: function(t, e) {
return V5(t.coordinates, e);
},
MultiPolygon: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
if (V5(r[n], e))
return !0;
return !1;
},
GeometryCollection: function(t, e) {
for (var r = t.geometries, n = -1, i = r.length; ++n < i; )
if (hf(r[n], e))
return !0;
return !1;
}
};
function hf(t, e) {
return t && F5.hasOwnProperty(t.type) ? F5[t.type](t, e) : !1;
}
function P5(t, e) {
return uf(t, e) === 0;
}
function q5(t, e) {
for (var r, n, i, a = 0, s = t.length; a < s; a++) {
if (n = uf(t[a], e), n === 0 || a > 0 && (i = uf(t[a], t[a - 1]), i > 0 && r <= i && n <= i && (r + n - i) * (1 - Math.pow((r - n) / i, 2)) < Tc * i))
return !0;
r = n;
}
return !1;
}
function V5(t, e) {
return !!ET(t.map(Iq), MT(e));
}
function Iq(t) {
return t = t.map(MT), t.pop(), t;
}
function MT(t) {
return [t[0] * ie, t[1] * ie];
}
function Nq(t, e) {
return (t && O5.hasOwnProperty(t.type) ? O5[t.type] : hf)(t, e);
}
function z5(t, e, r) {
var n = Da(t, e - ee, r).concat(e);
return function(i) {
return n.map(function(a) {
return [i, a];
});
};
}
function Y5(t, e, r) {
var n = Da(t, e - ee, r).concat(e);
return function(i) {
return n.map(function(a) {
return [a, i];
});
};
}
function LT() {
var t, e, r, n, i, a, s, o, l = 10, u = l, h = 90, d = 360, f, p, m, _, y = 2.5;
function b() {
return { type: "MultiLineString", coordinates: x() };
}
function x() {
return Da(Fu(n / h) * h, r, h).map(m).concat(Da(Fu(o / d) * d, s, d).map(_)).concat(Da(Fu(e / l) * l, t, l).filter(function(k) {
return Ne(k % h) > ee;
}).map(f)).concat(Da(Fu(a / u) * u, i, u).filter(function(k) {
return Ne(k % d) > ee;
}).map(p));
}
return b.lines = function() {
return x().map(function(k) {
return { type: "LineString", coordinates: k };
});
}, b.outline = function() {
return {
type: "Polygon",
coordinates: [
m(n).concat(
_(s).slice(1),
m(r).reverse().slice(1),
_(o).reverse().slice(1)
)
]
};
}, b.extent = function(k) {
return arguments.length ? b.extentMajor(k).extentMinor(k) : b.extentMinor();
}, b.extentMajor = function(k) {
return arguments.length ? (n = +k[0][0], r = +k[1][0], o = +k[0][1], s = +k[1][1], n > r && (k = n, n = r, r = k), o > s && (k = o, o = s, s = k), b.precision(y)) : [[n, o], [r, s]];
}, b.extentMinor = function(k) {
return arguments.length ? (e = +k[0][0], t = +k[1][0], a = +k[0][1], i = +k[1][1], e > t && (k = e, e = t, t = k), a > i && (k = a, a = i, i = k), b.precision(y)) : [[e, a], [t, i]];
}, b.step = function(k) {
return arguments.length ? b.stepMajor(k).stepMinor(k) : b.stepMinor();
}, b.stepMajor = function(k) {
return arguments.length ? (h = +k[0], d = +k[1], b) : [h, d];
}, b.stepMinor = function(k) {
return arguments.length ? (l = +k[0], u = +k[1], b) : [l, u];
}, b.precision = function(k) {
return arguments.length ? (y = +k, f = z5(a, i, 90), p = Y5(e, t, y), m = z5(o, s, 90), _ = Y5(n, r, y), b) : y;
}, b.extentMajor([[-180, -90 + ee], [180, 90 - ee]]).extentMinor([[-180, -80 - ee], [180, 80 + ee]]);
}
function Bq() {
return LT()();
}
function Dq(t, e) {
var r = t[0] * ie, n = t[1] * ie, i = e[0] * ie, a = e[1] * ie, s = Zt(n), o = jt(n), l = Zt(a), u = jt(a), h = s * Zt(r), d = s * jt(r), f = l * Zt(i), p = l * jt(i), m = 2 * ln(Mr(k5(a - n) + s * l * k5(i - r))), _ = jt(m), y = m ? function(b) {
var x = jt(b *= m) / _, k = jt(m - b) / _, T = k * h + x * f, C = k * d + x * p, M = k * o + x * u;
return [
on(C, T) * Ue,
on(M, Mr(T * T + C * C)) * Ue
];
} : function() {
return [r * Ue, n * Ue];
};
return y.distance = m, y;
}
const Ec = (t) => t;
var od = new wr(), Wm = new wr(), RT, IT, Hm, Gm, Ia = {
point: Je,
lineStart: Je,
lineEnd: Je,
polygonStart: function() {
Ia.lineStart = Oq, Ia.lineEnd = Pq;
},
polygonEnd: function() {
Ia.lineStart = Ia.lineEnd = Ia.point = Je, od.add(Ne(Wm)), Wm = new wr();
},
result: function() {
var t = od / 2;
return od = new wr(), t;
}
};
function Oq() {
Ia.point = Fq;
}
function Fq(t, e) {
Ia.point = NT, RT = Hm = t, IT = Gm = e;
}
function NT(t, e) {
Wm.add(Gm * t - Hm * e), Hm = t, Gm = e;
}
function Pq() {
NT(RT, IT);
}
const U5 = Ia;
var Yo = 1 / 0, ff = Yo, Cc = -Yo, df = Cc, qq = {
point: Vq,
lineStart: Je,
lineEnd: Je,
polygonStart: Je,
polygonEnd: Je,
result: function() {
var t = [[Yo, ff], [Cc, df]];
return Cc = df = -(ff = Yo = 1 / 0), t;
}
};
function Vq(t, e) {
t < Yo && (Yo = t), t > Cc && (Cc = t), e < ff && (ff = e), e > df && (df = e);
}
const pf = qq;
var jm = 0, $m = 0, Yl = 0, gf = 0, yf = 0, _o = 0, Xm = 0, Km = 0, Ul = 0, BT, DT, Ci, Si, Qn = {
point: Ns,
lineStart: W5,
lineEnd: H5,
polygonStart: function() {
Qn.lineStart = Uq, Qn.lineEnd = Wq;
},
polygonEnd: function() {
Qn.point = Ns, Qn.lineStart = W5, Qn.lineEnd = H5;
},
result: function() {
var t = Ul ? [Xm / Ul, Km / Ul] : _o ? [gf / _o, yf / _o] : Yl ? [jm / Yl, $m / Yl] : [NaN, NaN];
return jm = $m = Yl = gf = yf = _o = Xm = Km = Ul = 0, t;
}
};
function Ns(t, e) {
jm += t, $m += e, ++Yl;
}
function W5() {
Qn.point = zq;
}
function zq(t, e) {
Qn.point = Yq, Ns(Ci = t, Si = e);
}
function Yq(t, e) {
var r = t - Ci, n = e - Si, i = Mr(r * r + n * n);
gf += i * (Ci + t) / 2, yf += i * (Si + e) / 2, _o += i, Ns(Ci = t, Si = e);
}
function H5() {
Qn.point = Ns;
}
function Uq() {
Qn.point = Hq;
}
function Wq() {
OT(BT, DT);
}
function Hq(t, e) {
Qn.point = OT, Ns(BT = Ci = t, DT = Si = e);
}
function OT(t, e) {
var r = t - Ci, n = e - Si, i = Mr(r * r + n * n);
gf += i * (Ci + t) / 2, yf += i * (Si + e) / 2, _o += i, i = Si * t - Ci * e, Xm += i * (Ci + t), Km += i * (Si + e), Ul += i * 3, Ns(Ci = t, Si = e);
}
const G5 = Qn;
function FT(t) {
this._context = t;
}
FT.prototype = {
_radius: 4.5,
pointRadius: function(t) {
return this._radius = t, this;
},
polygonStart: function() {
this._line = 0;
},
polygonEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
this._line === 0 && this._context.closePath(), this._point = NaN;
},
point: function(t, e) {
switch (this._point) {
case 0: {
this._context.moveTo(t, e), this._point = 1;
break;
}
case 1: {
this._context.lineTo(t, e);
break;
}
default: {
this._context.moveTo(t + this._radius, e), this._context.arc(t, e, this._radius, 0, sn);
break;
}
}
},
result: Je
};
var Zm = new wr(), ld, PT, qT, Wl, Hl, mf = {
point: Je,
lineStart: function() {
mf.point = Gq;
},
lineEnd: function() {
ld && VT(PT, qT), mf.point = Je;
},
polygonStart: function() {
ld = !0;
},
polygonEnd: function() {
ld = null;
},
result: function() {
var t = +Zm;
return Zm = new wr(), t;
}
};
function Gq(t, e) {
mf.point = VT, PT = Wl = t, qT = Hl = e;
}
function VT(t, e) {
Wl -= t, Hl -= e, Zm.add(Mr(Wl * Wl + Hl * Hl)), Wl = t, Hl = e;
}
const j5 = mf;
function zT() {
this._string = [];
}
zT.prototype = {
_radius: 4.5,
_circle: $5(4.5),
pointRadius: function(t) {
return (t = +t) !== this._radius && (this._radius = t, this._circle = null), this;
},
polygonStart: function() {
this._line = 0;
},
polygonEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
this._line === 0 && this._string.push("Z"), this._point = NaN;
},
point: function(t, e) {
switch (this._point) {
case 0: {
this._string.push("M", t, ",", e), this._point = 1;
break;
}
case 1: {
this._string.push("L", t, ",", e);
break;
}
default: {
this._circle == null && (this._circle = $5(this._radius)), this._string.push("M", t, ",", e, this._circle);
break;
}
}
},
result: function() {
if (this._string.length) {
var t = this._string.join("");
return this._string = [], t;
} else
return null;
}
};
function $5(t) {
return "m0," + t + "a" + t + "," + t + " 0 1,1 0," + -2 * t + "a" + t + "," + t + " 0 1,1 0," + 2 * t + "z";
}
function jq(t, e) {
var r = 4.5, n, i;
function a(s) {
return s && (typeof r == "function" && i.pointRadius(+r.apply(this, arguments)), Zn(s, n(i))), i.result();
}
return a.area = function(s) {
return Zn(s, n(U5)), U5.result();
}, a.measure = function(s) {
return Zn(s, n(j5)), j5.result();
}, a.bounds = function(s) {
return Zn(s, n(pf)), pf.result();
}, a.centroid = function(s) {
return Zn(s, n(G5)), G5.result();
}, a.projection = function(s) {
return arguments.length ? (n = s == null ? (t = null, Ec) : (t = s).stream, a) : t;
}, a.context = function(s) {
return arguments.length ? (i = s == null ? (e = null, new zT()) : new FT(e = s), typeof r != "function" && i.pointRadius(r), a) : e;
}, a.pointRadius = function(s) {
return arguments.length ? (r = typeof s == "function" ? s : (i.pointRadius(+s), +s), a) : r;
}, a.projection(t).context(e);
}
function $q(t) {
return {
stream: Jc(t)
};
}
function Jc(t) {
return function(e) {
var r = new Qm();
for (var n in t)
r[n] = t[n];
return r.stream = e, r;
};
}
function Qm() {
}
Qm.prototype = {
constructor: Qm,
point: function(t, e) {
this.stream.point(t, e);
},
sphere: function() {
this.stream.sphere();
},
lineStart: function() {
this.stream.lineStart();
},
lineEnd: function() {
this.stream.lineEnd();
},
polygonStart: function() {
this.stream.polygonStart();
},
polygonEnd: function() {
this.stream.polygonEnd();
}
};
function g3(t, e, r) {
var n = t.clipExtent && t.clipExtent();
return t.scale(150).translate([0, 0]), n != null && t.clipExtent(null), Zn(r, t.stream(pf)), e(pf.result()), n != null && t.clipExtent(n), t;
}
function M1(t, e, r) {
return g3(t, function(n) {
var i = e[1][0] - e[0][0], a = e[1][1] - e[0][1], s = Math.min(i / (n[1][0] - n[0][0]), a / (n[1][1] - n[0][1])), o = +e[0][0] + (i - s * (n[1][0] + n[0][0])) / 2, l = +e[0][1] + (a - s * (n[1][1] + n[0][1])) / 2;
t.scale(150 * s).translate([o, l]);
}, r);
}
function y3(t, e, r) {
return M1(t, [[0, 0], e], r);
}
function m3(t, e, r) {
return g3(t, function(n) {
var i = +e, a = i / (n[1][0] - n[0][0]), s = (i - a * (n[1][0] + n[0][0])) / 2, o = -a * n[0][1];
t.scale(150 * a).translate([s, o]);
}, r);
}
function b3(t, e, r) {
return g3(t, function(n) {
var i = +e, a = i / (n[1][1] - n[0][1]), s = -a * n[0][0], o = (i - a * (n[1][1] + n[0][1])) / 2;
t.scale(150 * a).translate([s, o]);
}, r);
}
var X5 = 16, Xq = Zt(30 * ie);
function K5(t, e) {
return +e ? Zq(t, e) : Kq(t);
}
function Kq(t) {
return Jc({
point: function(e, r) {
e = t(e, r), this.stream.point(e[0], e[1]);
}
});
}
function Zq(t, e) {
function r(n, i, a, s, o, l, u, h, d, f, p, m, _, y) {
var b = u - n, x = h - i, k = b * b + x * x;
if (k > 4 * e && _--) {
var T = s + f, C = o + p, M = l + m, S = Mr(T * T + C * C + M * M), R = ln(M /= S), A = Ne(Ne(M) - 1) < ee || Ne(a - d) < ee ? (a + d) / 2 : on(C, T), L = t(A, R), v = L[0], B = L[1], w = v - n, D = B - i, N = x * w - b * D;
(N * N / k > e || Ne((b * w + x * D) / k - 0.5) > 0.3 || s * f + o * p + l * m < Xq) && (r(n, i, a, s, o, l, v, B, A, T /= S, C /= S, M, _, y), y.point(v, B), r(v, B, A, T, C, M, u, h, d, f, p, m, _, y));
}
}
return function(n) {
var i, a, s, o, l, u, h, d, f, p, m, _, y = {
point: b,
lineStart: x,
lineEnd: T,
polygonStart: function() {
n.polygonStart(), y.lineStart = C;
},
polygonEnd: function() {
n.polygonEnd(), y.lineStart = x;
}
};
function b(R, A) {
R = t(R, A), n.point(R[0], R[1]);
}
function x() {
d = NaN, y.point = k, n.lineStart();
}
function k(R, A) {
var L = Is([R, A]), v = t(R, A);
r(d, f, h, p, m, _, d = v[0], f = v[1], h = R, p = L[0], m = L[1], _ = L[2], X5, n), n.point(d, f);
}
function T() {
y.point = b, n.lineEnd();
}
function C() {
x(), y.point = M, y.lineEnd = S;
}
function M(R, A) {
k(i = R, A), a = d, s = f, o = p, l = m, u = _, y.point = k;
}
function S() {
r(d, f, h, p, m, _, a, s, i, o, l, u, X5, n), y.lineEnd = T, T();
}
return y;
};
}
var Qq = Jc({
point: function(t, e) {
this.stream.point(t * ie, e * ie);
}
});
function Jq(t) {
return Jc({
point: function(e, r) {
var n = t(e, r);
return this.stream.point(n[0], n[1]);
}
});
}
function tV(t, e, r, n, i) {
function a(s, o) {
return s *= n, o *= i, [e + t * s, r - t * o];
}
return a.invert = function(s, o) {
return [(s - e) / t * n, (r - o) / t * i];
}, a;
}
function Z5(t, e, r, n, i, a) {
if (!a)
return tV(t, e, r, n, i);
var s = Zt(a), o = jt(a), l = s * t, u = o * t, h = s / t, d = o / t, f = (o * r - s * e) / t, p = (o * e + s * r) / t;
function m(_, y) {
return _ *= n, y *= i, [l * _ - u * y + e, r - u * _ - l * y];
}
return m.invert = function(_, y) {
return [n * (h * _ - d * y + f), i * (p - d * _ - h * y)];
}, m;
}
function Yi(t) {
return _3(function() {
return t;
})();
}
function _3(t) {
var e, r = 150, n = 480, i = 250, a = 0, s = 0, o = 0, l = 0, u = 0, h, d = 0, f = 1, p = 1, m = null, _ = Vm, y = null, b, x, k, T = Ec, C = 0.5, M, S, R, A, L;
function v(N) {
return R(N[0] * ie, N[1] * ie);
}
function B(N) {
return N = R.invert(N[0], N[1]), N && [N[0] * Ue, N[1] * Ue];
}
v.stream = function(N) {
return A && L === N ? A : A = Qq(Jq(h)(_(M(T(L = N)))));
}, v.preclip = function(N) {
return arguments.length ? (_ = N, m = void 0, D()) : _;
}, v.postclip = function(N) {
return arguments.length ? (T = N, y = b = x = k = null, D()) : T;
}, v.clipAngle = function(N) {
return arguments.length ? (_ = +N ? ST(m = N * ie) : (m = null, Vm), D()) : m * Ue;
}, v.clipExtent = function(N) {
return arguments.length ? (T = N == null ? (y = b = x = k = null, Ec) : A1(y = +N[0][0], b = +N[0][1], x = +N[1][0], k = +N[1][1]), D()) : y == null ? null : [[y, b], [x, k]];
}, v.scale = function(N) {
return arguments.length ? (r = +N, w()) : r;
}, v.translate = function(N) {
return arguments.length ? (n = +N[0], i = +N[1], w()) : [n, i];
}, v.center = function(N) {
return arguments.length ? (a = N[0] % 360 * ie, s = N[1] % 360 * ie, w()) : [a * Ue, s * Ue];
}, v.rotate = function(N) {
return arguments.length ? (o = N[0] % 360 * ie, l = N[1] % 360 * ie, u = N.length > 2 ? N[2] % 360 * ie : 0, w()) : [o * Ue, l * Ue, u * Ue];
}, v.angle = function(N) {
return arguments.length ? (d = N % 360 * ie, w()) : d * Ue;
}, v.reflectX = function(N) {
return arguments.length ? (f = N ? -1 : 1, w()) : f < 0;
}, v.reflectY = function(N) {
return arguments.length ? (p = N ? -1 : 1, w()) : p < 0;
}, v.precision = function(N) {
return arguments.length ? (M = K5(S, C = N * N), D()) : Mr(C);
}, v.fitExtent = function(N, z) {
return M1(v, N, z);
}, v.fitSize = function(N, z) {
return y3(v, N, z);
}, v.fitWidth = function(N, z) {
return m3(v, N, z);
}, v.fitHeight = function(N, z) {
return b3(v, N, z);
};
function w() {
var N = Z5(r, 0, 0, f, p, d).apply(null, e(a, s)), z = Z5(r, n - N[0], i - N[1], f, p, d);
return h = p3(o, l, u), S = Pm(e, z), R = Pm(h, S), M = K5(S, C), D();
}
function D() {
return A = L = null, v;
}
return function() {
return e = t.apply(this, arguments), v.invert = e.invert && B, w();
};
}
function v3(t) {
var e = 0, r = Ae / 3, n = _3(t), i = n(e, r);
return i.parallels = function(a) {
return arguments.length ? n(e = a[0] * ie, r = a[1] * ie) : [e * Ue, r * Ue];
}, i;
}
function eV(t) {
var e = Zt(t);
function r(n, i) {
return [n * e, jt(i) / e];
}
return r.invert = function(n, i) {
return [n / e, ln(i * e)];
}, r;
}
function YT(t, e) {
var r = jt(t), n = (r + jt(e)) / 2;
if (Ne(n) < ee)
return eV(t);
var i = 1 + r * (2 * n - r), a = Mr(i) / n;
function s(o, l) {
var u = Mr(i - 2 * n * jt(l)) / n;
return [u * jt(o *= n), a - u * Zt(o)];
}
return s.invert = function(o, l) {
var u = a - l, h = on(o, Ne(u)) * On(u);
return u * n < 0 && (h -= Ae * On(o) * On(u)), [h / n, ln((i - (o * o + u * u) * n * n) / (2 * n))];
}, s;
}
function bf() {
return v3(YT).scale(155.424).center([0, 33.6442]);
}
function UT() {
return bf().parallels([29.5, 45.5]).scale(1070).translate([480, 250]).rotate([96, 0]).center([-0.6, 38.7]);
}
function rV(t) {
var e = t.length;
return {
point: function(r, n) {
for (var i = -1; ++i < e; )
t[i].point(r, n);
},
sphere: function() {
for (var r = -1; ++r < e; )
t[r].sphere();
},
lineStart: function() {
for (var r = -1; ++r < e; )
t[r].lineStart();
},
lineEnd: function() {
for (var r = -1; ++r < e; )
t[r].lineEnd();
},
polygonStart: function() {
for (var r = -1; ++r < e; )
t[r].polygonStart();
},
polygonEnd: function() {
for (var r = -1; ++r < e; )
t[r].polygonEnd();
}
};
}
function nV() {
var t, e, r = UT(), n, i = bf().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), a, s = bf().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), o, l, u = { point: function(f, p) {
l = [f, p];
} };
function h(f) {
var p = f[0], m = f[1];
return l = null, n.point(p, m), l || (a.point(p, m), l) || (o.point(p, m), l);
}
h.invert = function(f) {
var p = r.scale(), m = r.translate(), _ = (f[0] - m[0]) / p, y = (f[1] - m[1]) / p;
return (y >= 0.12 && y < 0.234 && _ >= -0.425 && _ < -0.214 ? i : y >= 0.166 && y < 0.234 && _ >= -0.214 && _ < -0.115 ? s : r).invert(f);
}, h.stream = function(f) {
return t && e === f ? t : t = rV([r.stream(e = f), i.stream(f), s.stream(f)]);
}, h.precision = function(f) {
return arguments.length ? (r.precision(f), i.precision(f), s.precision(f), d()) : r.precision();
}, h.scale = function(f) {
return arguments.length ? (r.scale(f), i.scale(f * 0.35), s.scale(f), h.translate(r.translate())) : r.scale();
}, h.translate = function(f) {
if (!arguments.length)
return r.translate();
var p = r.scale(), m = +f[0], _ = +f[1];
return n = r.translate(f).clipExtent([[m - 0.455 * p, _ - 0.238 * p], [m + 0.455 * p, _ + 0.238 * p]]).stream(u), a = i.translate([m - 0.307 * p, _ + 0.201 * p]).clipExtent([[m - 0.425 * p + ee, _ + 0.12 * p + ee], [m - 0.214 * p - ee, _ + 0.234 * p - ee]]).stream(u), o = s.translate([m - 0.205 * p, _ + 0.212 * p]).clipExtent([[m - 0.214 * p + ee, _ + 0.166 * p + ee], [m - 0.115 * p - ee, _ + 0.234 * p - ee]]).stream(u), d();
}, h.fitExtent = function(f, p) {
return M1(h, f, p);
}, h.fitSize = function(f, p) {
return y3(h, f, p);
}, h.fitWidth = function(f, p) {
return m3(h, f, p);
}, h.fitHeight = function(f, p) {
return b3(h, f, p);
};
function d() {
return t = e = null, h;
}
return h.scale(1070);
}
function WT(t) {
return function(e, r) {
var n = Zt(e), i = Zt(r), a = t(n * i);
return a === 1 / 0 ? [2, 0] : [
a * i * jt(e),
a * jt(r)
];
};
}
function tu(t) {
return function(e, r) {
var n = Mr(e * e + r * r), i = t(n), a = jt(i), s = Zt(i);
return [
on(e * a, n * s),
ln(n && r * a / n)
];
};
}
var x3 = WT(function(t) {
return Mr(2 / (1 + t));
});
x3.invert = tu(function(t) {
return 2 * ln(t / 2);
});
function iV() {
return Yi(x3).scale(124.75).clipAngle(180 - 1e-3);
}
var k3 = WT(function(t) {
return (t = uT(t)) && t / jt(t);
});
k3.invert = tu(function(t) {
return t;
});
function aV() {
return Yi(k3).scale(79.4188).clipAngle(180 - 1e-3);
}
function eu(t, e) {
return [t, Kh(f3((sr + e) / 2))];
}
eu.invert = function(t, e) {
return [t, 2 * al(cT(e)) - sr];
};
function sV() {
return HT(eu).scale(961 / sn);
}
function HT(t) {
var e = Yi(t), r = e.center, n = e.scale, i = e.translate, a = e.clipExtent, s = null, o, l, u;
e.scale = function(d) {
return arguments.length ? (n(d), h()) : n();
}, e.translate = function(d) {
return arguments.length ? (i(d), h()) : i();
}, e.center = function(d) {
return arguments.length ? (r(d), h()) : r();
}, e.clipExtent = function(d) {
return arguments.length ? (d == null ? s = o = l = u = null : (s = +d[0][0], o = +d[0][1], l = +d[1][0], u = +d[1][1]), h()) : s == null ? null : [[s, o], [l, u]];
};
function h() {
var d = Ae * n(), f = e(xT(e.rotate()).invert([0, 0]));
return a(s == null ? [[f[0] - d, f[1] - d], [f[0] + d, f[1] + d]] : t === eu ? [[Math.max(f[0] - d, s), o], [Math.min(f[0] + d, l), u]] : [[s, Math.max(f[1] - d, o)], [l, Math.min(f[1] + d, u)]]);
}
return h();
}
function Yu(t) {
return f3((sr + t) / 2);
}
function GT(t, e) {
var r = Zt(t), n = t === e ? jt(t) : Kh(r / Zt(e)) / Kh(Yu(e) / Yu(t)), i = r * id(Yu(t), n) / n;
if (!n)
return eu;
function a(s, o) {
i > 0 ? o < -sr + ee && (o = -sr + ee) : o > sr - ee && (o = sr - ee);
var l = i / id(Yu(o), n);
return [l * jt(n * s), i - l * Zt(n * s)];
}
return a.invert = function(s, o) {
var l = i - o, u = On(n) * Mr(s * s + l * l), h = on(s, Ne(l)) * On(l);
return l * n < 0 && (h -= Ae * On(s) * On(l)), [h / n, 2 * al(id(i / u, 1 / n)) - sr];
}, a;
}
function oV() {
return v3(GT).scale(109.5).parallels([30, 30]);
}
function Sc(t, e) {
return [t, e];
}
Sc.invert = Sc;
function lV() {
return Yi(Sc).scale(152.63);
}
function jT(t, e) {
var r = Zt(t), n = t === e ? jt(t) : (r - Zt(e)) / (e - t), i = r / n + t;
if (Ne(n) < ee)
return Sc;
function a(s, o) {
var l = i - o, u = n * s;
return [l * jt(u), i - l * Zt(u)];
}
return a.invert = function(s, o) {
var l = i - o, u = on(s, Ne(l)) * On(l);
return l * n < 0 && (u -= Ae * On(s) * On(l)), [u / n, i - On(n) * Mr(s * s + l * l)];
}, a;
}
function cV() {
return v3(jT).scale(131.154).center([0, 13.9389]);
}
var Jl = 1.340264, tc = -0.081106, ec = 893e-6, rc = 3796e-6, _f = Mr(3) / 2, uV = 12;
function w3(t, e) {
var r = ln(_f * jt(e)), n = r * r, i = n * n * n;
return [
t * Zt(r) / (_f * (Jl + 3 * tc * n + i * (7 * ec + 9 * rc * n))),
r * (Jl + tc * n + i * (ec + rc * n))
];
}
w3.invert = function(t, e) {
for (var r = e, n = r * r, i = n * n * n, a = 0, s, o, l; a < uV && (o = r * (Jl + tc * n + i * (ec + rc * n)) - e, l = Jl + 3 * tc * n + i * (7 * ec + 9 * rc * n), r -= s = o / l, n = r * r, i = n * n * n, !(Ne(s) < Tc)); ++a)
;
return [
_f * t * (Jl + 3 * tc * n + i * (7 * ec + 9 * rc * n)) / Zt(r),
ln(jt(r) / _f)
];
};
function hV() {
return Yi(w3).scale(177.158);
}
function T3(t, e) {
var r = Zt(e), n = Zt(t) * r;
return [r * jt(t) / n, jt(e) / n];
}
T3.invert = tu(al);
function fV() {
return Yi(T3).scale(144.049).clipAngle(60);
}
function dV() {
var t = 1, e = 0, r = 0, n = 1, i = 1, a = 0, s, o, l = null, u, h, d, f = 1, p = 1, m = Jc({
point: function(T, C) {
var M = k([T, C]);
this.stream.point(M[0], M[1]);
}
}), _ = Ec, y, b;
function x() {
return f = t * n, p = t * i, y = b = null, k;
}
function k(T) {
var C = T[0] * f, M = T[1] * p;
if (a) {
var S = M * s - C * o;
C = C * s + M * o, M = S;
}
return [C + e, M + r];
}
return k.invert = function(T) {
var C = T[0] - e, M = T[1] - r;
if (a) {
var S = M * s + C * o;
C = C * s - M * o, M = S;
}
return [C / f, M / p];
}, k.stream = function(T) {
return y && b === T ? y : y = m(_(b = T));
}, k.postclip = function(T) {
return arguments.length ? (_ = T, l = u = h = d = null, x()) : _;
}, k.clipExtent = function(T) {
return arguments.length ? (_ = T == null ? (l = u = h = d = null, Ec) : A1(l = +T[0][0], u = +T[0][1], h = +T[1][0], d = +T[1][1]), x()) : l == null ? null : [[l, u], [h, d]];
}, k.scale = function(T) {
return arguments.length ? (t = +T, x()) : t;
}, k.translate = function(T) {
return arguments.length ? (e = +T[0], r = +T[1], x()) : [e, r];
}, k.angle = function(T) {
return arguments.length ? (a = T % 360 * ie, o = jt(a), s = Zt(a), x()) : a * Ue;
}, k.reflectX = function(T) {
return arguments.length ? (n = T ? -1 : 1, x()) : n < 0;
}, k.reflectY = function(T) {
return arguments.length ? (i = T ? -1 : 1, x()) : i < 0;
}, k.fitExtent = function(T, C) {
return M1(k, T, C);
}, k.fitSize = function(T, C) {
return y3(k, T, C);
}, k.fitWidth = function(T, C) {
return m3(k, T, C);
}, k.fitHeight = function(T, C) {
return b3(k, T, C);
}, k;
}
function E3(t, e) {
var r = e * e, n = r * r;
return [
t * (0.8707 - 0.131979 * r + n * (-0.013791 + n * (3971e-6 * r - 1529e-6 * n))),
e * (1.007226 + r * (0.015085 + n * (-0.044475 + 0.028874 * r - 5916e-6 * n)))
];
}
E3.invert = function(t, e) {
var r = e, n = 25, i;
do {
var a = r * r, s = a * a;
r -= i = (r * (1.007226 + a * (0.015085 + s * (-0.044475 + 0.028874 * a - 5916e-6 * s))) - e) / (1.007226 + a * (0.015085 * 3 + s * (-0.044475 * 7 + 0.028874 * 9 * a - 5916e-6 * 11 * s)));
} while (Ne(i) > ee && --n > 0);
return [
t / (0.8707 + (a = r * r) * (-0.131979 + a * (-0.013791 + a * a * a * (3971e-6 - 1529e-6 * a)))),
r
];
};
function pV() {
return Yi(E3).scale(175.295);
}
function C3(t, e) {
return [Zt(e) * jt(t), jt(e)];
}
C3.invert = tu(ln);
function gV() {
return Yi(C3).scale(249.5).clipAngle(90 + ee);
}
function S3(t, e) {
var r = Zt(e), n = 1 + Zt(t) * r;
return [r * jt(t) / n, jt(e) / n];
}
S3.invert = tu(function(t) {
return 2 * al(t);
});
function yV() {
return Yi(S3).scale(250).clipAngle(142);
}
function A3(t, e) {
return [Kh(f3((sr + e) / 2)), -t];
}
A3.invert = function(t, e) {
return [-e, 2 * al(cT(t)) - sr];
};
function mV() {
var t = HT(A3), e = t.center, r = t.rotate;
return t.center = function(n) {
return arguments.length ? e([-n[1], n[0]]) : (n = e(), [n[1], -n[0]]);
}, t.rotate = function(n) {
return arguments.length ? r([n[0], n[1], n.length > 2 ? n[2] + 90 : 90]) : (n = r(), [n[0], n[1], n[2] - 90]);
}, r([0, 0, 90]).scale(159.155);
}
function bV(t, e) {
return t.parent === e.parent ? 1 : 2;
}
function _V(t) {
return t.reduce(vV, 0) / t.length;
}
function vV(t, e) {
return t + e.x;
}
function xV(t) {
return 1 + t.reduce(kV, 0);
}
function kV(t, e) {
return Math.max(t, e.y);
}
function wV(t) {
for (var e; e = t.children; )
t = e[0];
return t;
}
function TV(t) {
for (var e; e = t.children; )
t = e[e.length - 1];
return t;
}
function EV() {
var t = bV, e = 1, r = 1, n = !1;
function i(a) {
var s, o = 0;
a.eachAfter(function(f) {
var p = f.children;
p ? (f.x = _V(p), f.y = xV(p)) : (f.x = s ? o += t(f, s) : 0, f.y = 0, s = f);
});
var l = wV(a), u = TV(a), h = l.x - t(l, u) / 2, d = u.x + t(u, l) / 2;
return a.eachAfter(n ? function(f) {
f.x = (f.x - a.x) * e, f.y = (a.y - f.y) * r;
} : function(f) {
f.x = (f.x - h) / (d - h) * e, f.y = (1 - (a.y ? f.y / a.y : 1)) * r;
});
}
return i.separation = function(a) {
return arguments.length ? (t = a, i) : t;
}, i.size = function(a) {
return arguments.length ? (n = !1, e = +a[0], r = +a[1], i) : n ? null : [e, r];
}, i.nodeSize = function(a) {
return arguments.length ? (n = !0, e = +a[0], r = +a[1], i) : n ? [e, r] : null;
}, i;
}
function CV(t) {
var e = 0, r = t.children, n = r && r.length;
if (!n)
e = 1;
else
for (; --n >= 0; )
e += r[n].value;
t.value = e;
}
function SV() {
return this.eachAfter(CV);
}
function AV(t, e) {
let r = -1;
for (const n of this)
t.call(e, n, ++r, this);
return this;
}
function MV(t, e) {
for (var r = this, n = [r], i, a, s = -1; r = n.pop(); )
if (t.call(e, r, ++s, this), i = r.children)
for (a = i.length - 1; a >= 0; --a)
n.push(i[a]);
return this;
}
function LV(t, e) {
for (var r = this, n = [r], i = [], a, s, o, l = -1; r = n.pop(); )
if (i.push(r), a = r.children)
for (s = 0, o = a.length; s < o; ++s)
n.push(a[s]);
for (; r = i.pop(); )
t.call(e, r, ++l, this);
return this;
}
function RV(t, e) {
let r = -1;
for (const n of this)
if (t.call(e, n, ++r, this))
return n;
}
function IV(t) {
return this.eachAfter(function(e) {
for (var r = +t(e.data) || 0, n = e.children, i = n && n.length; --i >= 0; )
r += n[i].value;
e.value = r;
});
}
function NV(t) {
return this.eachBefore(function(e) {
e.children && e.children.sort(t);
});
}
function BV(t) {
for (var e = this, r = DV(e, t), n = [e]; e !== r; )
e = e.parent, n.push(e);
for (var i = n.length; t !== r; )
n.splice(i, 0, t), t = t.parent;
return n;
}
function DV(t, e) {
if (t === e)
return t;
var r = t.ancestors(), n = e.ancestors(), i = null;
for (t = r.pop(), e = n.pop(); t === e; )
i = t, t = r.pop(), e = n.pop();
return i;
}
function OV() {
for (var t = this, e = [t]; t = t.parent; )
e.push(t);
return e;
}
function FV() {
return Array.from(this);
}
function PV() {
var t = [];
return this.eachBefore(function(e) {
e.children || t.push(e);
}), t;
}
function qV() {
var t = this, e = [];
return t.each(function(r) {
r !== t && e.push({ source: r.parent, target: r });
}), e;
}
function* VV() {
var t = this, e, r = [t], n, i, a;
do
for (e = r.reverse(), r = []; t = e.pop(); )
if (yield t, n = t.children)
for (i = 0, a = n.length; i < a; ++i)
r.push(n[i]);
while (r.length);
}
function M3(t, e) {
t instanceof Map ? (t = [void 0, t], e === void 0 && (e = UV)) : e === void 0 && (e = YV);
for (var r = new Bs(t), n, i = [r], a, s, o, l; n = i.pop(); )
if ((s = e(n.data)) && (l = (s = Array.from(s)).length))
for (n.children = s, o = l - 1; o >= 0; --o)
i.push(a = s[o] = new Bs(s[o])), a.parent = n, a.depth = n.depth + 1;
return r.eachBefore($T);
}
function zV() {
return M3(this).eachBefore(WV);
}
function YV(t) {
return t.children;
}
function UV(t) {
return Array.isArray(t) ? t[1] : null;
}
function WV(t) {
t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
}
function $T(t) {
var e = 0;
do
t.height = e;
while ((t = t.parent) && t.height < ++e);
}
function Bs(t) {
this.data = t, this.depth = this.height = 0, this.parent = null;
}
Bs.prototype = M3.prototype = {
constructor: Bs,
count: SV,
each: AV,
eachAfter: LV,
eachBefore: MV,
find: RV,
sum: IV,
sort: NV,
path: BV,
ancestors: OV,
descendants: FV,
leaves: PV,
links: qV,
copy: zV,
[Symbol.iterator]: VV
};
function xh(t) {
return t == null ? null : XT(t);
}
function XT(t) {
if (typeof t != "function")
throw new Error();
return t;
}
function bs() {
return 0;
}
function yo(t) {
return function() {
return t;
};
}
const HV = 1664525, GV = 1013904223, Q5 = 4294967296;
function L3() {
let t = 1;
return () => (t = (HV * t + GV) % Q5) / Q5;
}
function jV(t) {
return typeof t == "object" && "length" in t ? t : Array.from(t);
}
function $V(t, e) {
let r = t.length, n, i;
for (; r; )
i = e() * r-- | 0, n = t[r], t[r] = t[i], t[i] = n;
return t;
}
function XV(t) {
return KT(t, L3());
}
function KT(t, e) {
for (var r = 0, n = (t = $V(Array.from(t), e)).length, i = [], a, s; r < n; )
a = t[r], s && ZT(s, a) ? ++r : (s = ZV(i = KV(i, a)), r = 0);
return s;
}
function KV(t, e) {
var r, n;
if (cd(e, t))
return [e];
for (r = 0; r < t.length; ++r)
if (Uu(e, t[r]) && cd(Gl(t[r], e), t))
return [t[r], e];
for (r = 0; r < t.length - 1; ++r)
for (n = r + 1; n < t.length; ++n)
if (Uu(Gl(t[r], t[n]), e) && Uu(Gl(t[r], e), t[n]) && Uu(Gl(t[n], e), t[r]) && cd(QT(t[r], t[n], e), t))
return [t[r], t[n], e];
throw new Error();
}
function Uu(t, e) {
var r = t.r - e.r, n = e.x - t.x, i = e.y - t.y;
return r < 0 || r * r < n * n + i * i;
}
function ZT(t, e) {
var r = t.r - e.r + Math.max(t.r, e.r, 1) * 1e-9, n = e.x - t.x, i = e.y - t.y;
return r > 0 && r * r > n * n + i * i;
}
function cd(t, e) {
for (var r = 0; r < e.length; ++r)
if (!ZT(t, e[r]))
return !1;
return !0;
}
function ZV(t) {
switch (t.length) {
case 1:
return QV(t[0]);
case 2:
return Gl(t[0], t[1]);
case 3:
return QT(t[0], t[1], t[2]);
}
}
function QV(t) {
return {
x: t.x,
y: t.y,
r: t.r
};
}
function Gl(t, e) {
var r = t.x, n = t.y, i = t.r, a = e.x, s = e.y, o = e.r, l = a - r, u = s - n, h = o - i, d = Math.sqrt(l * l + u * u);
return {
x: (r + a + l / d * h) / 2,
y: (n + s + u / d * h) / 2,
r: (d + i + o) / 2
};
}
function QT(t, e, r) {
var n = t.x, i = t.y, a = t.r, s = e.x, o = e.y, l = e.r, u = r.x, h = r.y, d = r.r, f = n - s, p = n - u, m = i - o, _ = i - h, y = l - a, b = d - a, x = n * n + i * i - a * a, k = x - s * s - o * o + l * l, T = x - u * u - h * h + d * d, C = p * m - f * _, M = (m * T - _ * k) / (C * 2) - n, S = (_ * y - m * b) / C, R = (p * k - f * T) / (C * 2) - i, A = (f * b - p * y) / C, L = S * S + A * A - 1, v = 2 * (a + M * S + R * A), B = M * M + R * R - a * a, w = -(Math.abs(L) > 1e-6 ? (v + Math.sqrt(v * v - 4 * L * B)) / (2 * L) : B / v);
return {
x: n + M + S * w,
y: i + R + A * w,
r: w
};
}
function J5(t, e, r) {
var n = t.x - e.x, i, a, s = t.y - e.y, o, l, u = n * n + s * s;
u ? (a = e.r + r.r, a *= a, l = t.r + r.r, l *= l, a > l ? (i = (u + l - a) / (2 * u), o = Math.sqrt(Math.max(0, l / u - i * i)), r.x = t.x - i * n - o * s, r.y = t.y - i * s + o * n) : (i = (u + a - l) / (2 * u), o = Math.sqrt(Math.max(0, a / u - i * i)), r.x = e.x + i * n - o * s, r.y = e.y + i * s + o * n)) : (r.x = e.x + r.r, r.y = e.y);
}
function tv(t, e) {
var r = t.r + e.r - 1e-6, n = e.x - t.x, i = e.y - t.y;
return r > 0 && r * r > n * n + i * i;
}
function ev(t) {
var e = t._, r = t.next._, n = e.r + r.r, i = (e.x * r.r + r.x * e.r) / n, a = (e.y * r.r + r.y * e.r) / n;
return i * i + a * a;
}
function Wu(t) {
this._ = t, this.next = null, this.previous = null;
}
function JT(t, e) {
if (!(a = (t = jV(t)).length))
return 0;
var r, n, i, a, s, o, l, u, h, d, f;
if (r = t[0], r.x = 0, r.y = 0, !(a > 1))
return r.r;
if (n = t[1], r.x = -n.r, n.x = r.r, n.y = 0, !(a > 2))
return r.r + n.r;
J5(n, r, i = t[2]), r = new Wu(r), n = new Wu(n), i = new Wu(i), r.next = i.previous = n, n.next = r.previous = i, i.next = n.previous = r;
t:
for (l = 3; l < a; ++l) {
J5(r._, n._, i = t[l]), i = new Wu(i), u = n.next, h = r.previous, d = n._.r, f = r._.r;
do
if (d <= f) {
if (tv(u._, i._)) {
n = u, r.next = n, n.previous = r, --l;
continue t;
}
d += u._.r, u = u.next;
} else {
if (tv(h._, i._)) {
r = h, r.next = n, n.previous = r, --l;
continue t;
}
f += h._.r, h = h.previous;
}
while (u !== h.next);
for (i.previous = r, i.next = n, r.next = n.previous = n = i, s = ev(r); (i = i.next) !== n; )
(o = ev(i)) < s && (r = i, s = o);
n = r.next;
}
for (r = [n._], i = n; (i = i.next) !== n; )
r.push(i._);
for (i = KT(r, e), l = 0; l < a; ++l)
r = t[l], r.x -= i.x, r.y -= i.y;
return i.r;
}
function JV(t) {
return JT(t, L3()), t;
}
function tz(t) {
return Math.sqrt(t.value);
}
function ez() {
var t = null, e = 1, r = 1, n = bs;
function i(a) {
const s = L3();
return a.x = e / 2, a.y = r / 2, t ? a.eachBefore(rv(t)).eachAfter(ud(n, 0.5, s)).eachBefore(nv(1)) : a.eachBefore(rv(tz)).eachAfter(ud(bs, 1, s)).eachAfter(ud(n, a.r / Math.min(e, r), s)).eachBefore(nv(Math.min(e, r) / (2 * a.r))), a;
}
return i.radius = function(a) {
return arguments.length ? (t = xh(a), i) : t;
}, i.size = function(a) {
return arguments.length ? (e = +a[0], r = +a[1], i) : [e, r];
}, i.padding = function(a) {
return arguments.length ? (n = typeof a == "function" ? a : yo(+a), i) : n;
}, i;
}
function rv(t) {
return function(e) {
e.children || (e.r = Math.max(0, +t(e) || 0));
};
}
function ud(t, e, r) {
return function(n) {
if (i = n.children) {
var i, a, s = i.length, o = t(n) * e || 0, l;
if (o)
for (a = 0; a < s; ++a)
i[a].r += o;
if (l = JT(i, r), o)
for (a = 0; a < s; ++a)
i[a].r -= o;
n.r = l + o;
}
};
}
function nv(t) {
return function(e) {
var r = e.parent;
e.r *= t, r && (e.x = r.x + t * e.x, e.y = r.y + t * e.y);
};
}
function tE(t) {
t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
}
function ru(t, e, r, n, i) {
for (var a = t.children, s, o = -1, l = a.length, u = t.value && (n - e) / t.value; ++o < l; )
s = a[o], s.y0 = r, s.y1 = i, s.x0 = e, s.x1 = e += s.value * u;
}
function rz() {
var t = 1, e = 1, r = 0, n = !1;
function i(s) {
var o = s.height + 1;
return s.x0 = s.y0 = r, s.x1 = t, s.y1 = e / o, s.eachBefore(a(e, o)), n && s.eachBefore(tE), s;
}
function a(s, o) {
return function(l) {
l.children && ru(l, l.x0, s * (l.depth + 1) / o, l.x1, s * (l.depth + 2) / o);
var u = l.x0, h = l.y0, d = l.x1 - r, f = l.y1 - r;
d < u && (u = d = (u + d) / 2), f < h && (h = f = (h + f) / 2), l.x0 = u, l.y0 = h, l.x1 = d, l.y1 = f;
};
}
return i.round = function(s) {
return arguments.length ? (n = !!s, i) : n;
}, i.size = function(s) {
return arguments.length ? (t = +s[0], e = +s[1], i) : [t, e];
}, i.padding = function(s) {
return arguments.length ? (r = +s, i) : r;
}, i;
}
var nz = { depth: -1 }, iv = {}, hd = {};
function iz(t) {
return t.id;
}
function az(t) {
return t.parentId;
}
function sz() {
var t = iz, e = az, r;
function n(i) {
var a = Array.from(i), s = t, o = e, l, u, h, d, f, p, m, _, y = /* @__PURE__ */ new Map();
if (r != null) {
const b = a.map((T, C) => oz(r(T, C, i))), x = b.map(av), k = new Set(b).add("");
for (const T of x)
k.has(T) || (k.add(T), b.push(T), x.push(av(T)), a.push(hd));
s = (T, C) => b[C], o = (T, C) => x[C];
}
for (h = 0, l = a.length; h < l; ++h)
u = a[h], p = a[h] = new Bs(u), (m = s(u, h, i)) != null && (m += "") && (_ = p.id = m, y.set(_, y.has(_) ? iv : p)), (m = o(u, h, i)) != null && (m += "") && (p.parent = m);
for (h = 0; h < l; ++h)
if (p = a[h], m = p.parent) {
if (f = y.get(m), !f)
throw new Error("missing: " + m);
if (f === iv)
throw new Error("ambiguous: " + m);
f.children ? f.children.push(p) : f.children = [p], p.parent = f;
} else {
if (d)
throw new Error("multiple roots");
d = p;
}
if (!d)
throw new Error("no root");
if (r != null) {
for (; d.data === hd && d.children.length === 1; )
d = d.children[0], --l;
for (let b = a.length - 1; b >= 0 && (p = a[b], p.data === hd); --b)
p.data = null;
}
if (d.parent = nz, d.eachBefore(function(b) {
b.depth = b.parent.depth + 1, --l;
}).eachBefore($T), d.parent = null, l > 0)
throw new Error("cycle");
return d;
}
return n.id = function(i) {
return arguments.length ? (t = xh(i), n) : t;
}, n.parentId = function(i) {
return arguments.length ? (e = xh(i), n) : e;
}, n.path = function(i) {
return arguments.length ? (r = xh(i), n) : r;
}, n;
}
function oz(t) {
t = `${t}`;
let e = t.length;
return Jm(t, e - 1) && !Jm(t, e - 2) && (t = t.slice(0, -1)), t[0] === "/" ? t : `/${t}`;
}
function av(t) {
let e = t.length;
if (e < 2)
return "";
for (; --e > 1 && !Jm(t, e); )
;
return t.slice(0, e);
}
function Jm(t, e) {
if (t[e] === "/") {
let r = 0;
for (; e > 0 && t[--e] === "\\"; )
++r;
if ((r & 1) === 0)
return !0;
}
return !1;
}
function lz(t, e) {
return t.parent === e.parent ? 1 : 2;
}
function fd(t) {
var e = t.children;
return e ? e[0] : t.t;
}
function dd(t) {
var e = t.children;
return e ? e[e.length - 1] : t.t;
}
function cz(t, e, r) {
var n = r / (e.i - t.i);
e.c -= n, e.s += r, t.c += n, e.z += r, e.m += r;
}
function uz(t) {
for (var e = 0, r = 0, n = t.children, i = n.length, a; --i >= 0; )
a = n[i], a.z += e, a.m += e, e += a.s + (r += a.c);
}
function hz(t, e, r) {
return t.a.parent === e.parent ? t.a : r;
}
function kh(t, e) {
this._ = t, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = e;
}
kh.prototype = Object.create(Bs.prototype);
function fz(t) {
for (var e = new kh(t, 0), r, n = [e], i, a, s, o; r = n.pop(); )
if (a = r._.children)
for (r.children = new Array(o = a.length), s = o - 1; s >= 0; --s)
n.push(i = r.children[s] = new kh(a[s], s)), i.parent = r;
return (e.parent = new kh(null, 0)).children = [e], e;
}
function dz() {
var t = lz, e = 1, r = 1, n = null;
function i(u) {
var h = fz(u);
if (h.eachAfter(a), h.parent.m = -h.z, h.eachBefore(s), n)
u.eachBefore(l);
else {
var d = u, f = u, p = u;
u.eachBefore(function(x) {
x.x < d.x && (d = x), x.x > f.x && (f = x), x.depth > p.depth && (p = x);
});
var m = d === f ? 1 : t(d, f) / 2, _ = m - d.x, y = e / (f.x + m + _), b = r / (p.depth || 1);
u.eachBefore(function(x) {
x.x = (x.x + _) * y, x.y = x.depth * b;
});
}
return u;
}
function a(u) {
var h = u.children, d = u.parent.children, f = u.i ? d[u.i - 1] : null;
if (h) {
uz(u);
var p = (h[0].z + h[h.length - 1].z) / 2;
f ? (u.z = f.z + t(u._, f._), u.m = u.z - p) : u.z = p;
} else
f && (u.z = f.z + t(u._, f._));
u.parent.A = o(u, f, u.parent.A || d[0]);
}
function s(u) {
u._.x = u.z + u.parent.m, u.m += u.parent.m;
}
function o(u, h, d) {
if (h) {
for (var f = u, p = u, m = h, _ = f.parent.children[0], y = f.m, b = p.m, x = m.m, k = _.m, T; m = dd(m), f = fd(f), m && f; )
_ = fd(_), p = dd(p), p.a = u, T = m.z + x - f.z - y + t(m._, f._), T > 0 && (cz(hz(m, u, d), u, T), y += T, b += T), x += m.m, y += f.m, k += _.m, b += p.m;
m && !dd(p) && (p.t = m, p.m += x - b), f && !fd(_) && (_.t = f, _.m += y - k, d = u);
}
return d;
}
function l(u) {
u.x *= e, u.y = u.depth * r;
}
return i.separation = function(u) {
return arguments.length ? (t = u, i) : t;
}, i.size = function(u) {
return arguments.length ? (n = !1, e = +u[0], r = +u[1], i) : n ? null : [e, r];
}, i.nodeSize = function(u) {
return arguments.length ? (n = !0, e = +u[0], r = +u[1], i) : n ? [e, r] : null;
}, i;
}
function L1(t, e, r, n, i) {
for (var a = t.children, s, o = -1, l = a.length, u = t.value && (i - r) / t.value; ++o < l; )
s = a[o], s.x0 = e, s.x1 = n, s.y0 = r, s.y1 = r += s.value * u;
}
var eE = (1 + Math.sqrt(5)) / 2;
function rE(t, e, r, n, i, a) {
for (var s = [], o = e.children, l, u, h = 0, d = 0, f = o.length, p, m, _ = e.value, y, b, x, k, T, C, M; h < f; ) {
p = i - r, m = a - n;
do
y = o[d++].value;
while (!y && d < f);
for (b = x = y, C = Math.max(m / p, p / m) / (_ * t), M = y * y * C, T = Math.max(x / M, M / b); d < f; ++d) {
if (y += u = o[d].value, u < b && (b = u), u > x && (x = u), M = y * y * C, k = Math.max(x / M, M / b), k > T) {
y -= u;
break;
}
T = k;
}
s.push(l = { value: y, dice: p < m, children: o.slice(h, d) }), l.dice ? ru(l, r, n, i, _ ? n += m * y / _ : a) : L1(l, r, n, _ ? r += p * y / _ : i, a), _ -= y, h = d;
}
return s;
}
const nE = function t(e) {
function r(n, i, a, s, o) {
rE(e, n, i, a, s, o);
}
return r.ratio = function(n) {
return t((n = +n) > 1 ? n : 1);
}, r;
}(eE);
function pz() {
var t = nE, e = !1, r = 1, n = 1, i = [0], a = bs, s = bs, o = bs, l = bs, u = bs;
function h(f) {
return f.x0 = f.y0 = 0, f.x1 = r, f.y1 = n, f.eachBefore(d), i = [0], e && f.eachBefore(tE), f;
}
function d(f) {
var p = i[f.depth], m = f.x0 + p, _ = f.y0 + p, y = f.x1 - p, b = f.y1 - p;
y < m && (m = y = (m + y) / 2), b < _ && (_ = b = (_ + b) / 2), f.x0 = m, f.y0 = _, f.x1 = y, f.y1 = b, f.children && (p = i[f.depth + 1] = a(f) / 2, m += u(f) - p, _ += s(f) - p, y -= o(f) - p, b -= l(f) - p, y < m && (m = y = (m + y) / 2), b < _ && (_ = b = (_ + b) / 2), t(f, m, _, y, b));
}
return h.round = function(f) {
return arguments.length ? (e = !!f, h) : e;
}, h.size = function(f) {
return arguments.length ? (r = +f[0], n = +f[1], h) : [r, n];
}, h.tile = function(f) {
return arguments.length ? (t = XT(f), h) : t;
}, h.padding = function(f) {
return arguments.length ? h.paddingInner(f).paddingOuter(f) : h.paddingInner();
}, h.paddingInner = function(f) {
return arguments.length ? (a = typeof f == "function" ? f : yo(+f), h) : a;
}, h.paddingOuter = function(f) {
return arguments.length ? h.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f) : h.paddingTop();
}, h.paddingTop = function(f) {
return arguments.length ? (s = typeof f == "function" ? f : yo(+f), h) : s;
}, h.paddingRight = function(f) {
return arguments.length ? (o = typeof f == "function" ? f : yo(+f), h) : o;
}, h.paddingBottom = function(f) {
return arguments.length ? (l = typeof f == "function" ? f : yo(+f), h) : l;
}, h.paddingLeft = function(f) {
return arguments.length ? (u = typeof f == "function" ? f : yo(+f), h) : u;
}, h;
}
function gz(t, e, r, n, i) {
var a = t.children, s, o = a.length, l, u = new Array(o + 1);
for (u[0] = l = s = 0; s < o; ++s)
u[s + 1] = l += a[s].value;
h(0, o, t.value, e, r, n, i);
function h(d, f, p, m, _, y, b) {
if (d >= f - 1) {
var x = a[d];
x.x0 = m, x.y0 = _, x.x1 = y, x.y1 = b;
return;
}
for (var k = u[d], T = p / 2 + k, C = d + 1, M = f - 1; C < M; ) {
var S = C + M >>> 1;
u[S] < T ? C = S + 1 : M = S;
}
T - u[C - 1] < u[C] - T && d + 1 < C && --C;
var R = u[C] - k, A = p - R;
if (y - m > b - _) {
var L = p ? (m * A + y * R) / p : y;
h(d, C, R, m, _, L, b), h(C, f, A, L, _, y, b);
} else {
var v = p ? (_ * A + b * R) / p : b;
h(d, C, R, m, _, y, v), h(C, f, A, m, v, y, b);
}
}
}
function yz(t, e, r, n, i) {
(t.depth & 1 ? L1 : ru)(t, e, r, n, i);
}
const mz = function t(e) {
function r(n, i, a, s, o) {
if ((l = n._squarify) && l.ratio === e)
for (var l, u, h, d, f = -1, p, m = l.length, _ = n.value; ++f < m; ) {
for (u = l[f], h = u.children, d = u.value = 0, p = h.length; d < p; ++d)
u.value += h[d].value;
u.dice ? ru(u, i, a, s, _ ? a += (o - a) * u.value / _ : o) : L1(u, i, a, _ ? i += (s - i) * u.value / _ : s, o), _ -= u.value;
}
else
n._squarify = l = rE(e, n, i, a, s, o), l.ratio = e;
}
return r.ratio = function(n) {
return t((n = +n) > 1 ? n : 1);
}, r;
}(eE);
function bz(t) {
for (var e = -1, r = t.length, n, i = t[r - 1], a = 0; ++e < r; )
n = i, i = t[e], a += n[1] * i[0] - n[0] * i[1];
return a / 2;
}
function _z(t) {
for (var e = -1, r = t.length, n = 0, i = 0, a, s = t[r - 1], o, l = 0; ++e < r; )
a = s, s = t[e], l += o = a[0] * s[1] - s[0] * a[1], n += (a[0] + s[0]) * o, i += (a[1] + s[1]) * o;
return l *= 3, [n / l, i / l];
}
function vz(t, e, r) {
return (e[0] - t[0]) * (r[1] - t[1]) - (e[1] - t[1]) * (r[0] - t[0]);
}
function xz(t, e) {
return t[0] - e[0] || t[1] - e[1];
}
function sv(t) {
const e = t.length, r = [0, 1];
let n = 2, i;
for (i = 2; i < e; ++i) {
for (; n > 1 && vz(t[r[n - 2]], t[r[n - 1]], t[i]) <= 0; )
--n;
r[n++] = i;
}
return r.slice(0, n);
}
function kz(t) {
if ((r = t.length) < 3)
return null;
var e, r, n = new Array(r), i = new Array(r);
for (e = 0; e < r; ++e)
n[e] = [+t[e][0], +t[e][1], e];
for (n.sort(xz), e = 0; e < r; ++e)
i[e] = [n[e][0], -n[e][1]];
var a = sv(n), s = sv(i), o = s[0] === a[0], l = s[s.length - 1] === a[a.length - 1], u = [];
for (e = a.length - 1; e >= 0; --e)
u.push(t[n[a[e]][2]]);
for (e = +o; e < s.length - l; ++e)
u.push(t[n[s[e]][2]]);
return u;
}
function wz(t, e) {
for (var r = t.length, n = t[r - 1], i = e[0], a = e[1], s = n[0], o = n[1], l, u, h = !1, d = 0; d < r; ++d)
n = t[d], l = n[0], u = n[1], u > a != o > a && i < (s - l) * (a - u) / (o - u) + l && (h = !h), s = l, o = u;
return h;
}
function Tz(t) {
for (var e = -1, r = t.length, n = t[r - 1], i, a, s = n[0], o = n[1], l = 0; ++e < r; )
i = s, a = o, n = t[e], s = n[0], o = n[1], i -= s, a -= o, l += Math.hypot(i, a);
return l;
}
const Dr = Math.random, Ez = function t(e) {
function r(n, i) {
return n = n == null ? 0 : +n, i = i == null ? 1 : +i, arguments.length === 1 ? (i = n, n = 0) : i -= n, function() {
return e() * i + n;
};
}
return r.source = t, r;
}(Dr), Cz = function t(e) {
function r(n, i) {
return arguments.length < 2 && (i = n, n = 0), n = Math.floor(n), i = Math.floor(i) - n, function() {
return Math.floor(e() * i + n);
};
}
return r.source = t, r;
}(Dr), R3 = function t(e) {
function r(n, i) {
var a, s;
return n = n == null ? 0 : +n, i = i == null ? 1 : +i, function() {
var o;
if (a != null)
o = a, a = null;
else
do
a = e() * 2 - 1, o = e() * 2 - 1, s = a * a + o * o;
while (!s || s > 1);
return n + i * o * Math.sqrt(-2 * Math.log(s) / s);
};
}
return r.source = t, r;
}(Dr), Sz = function t(e) {
var r = R3.source(e);
function n() {
var i = r.apply(this, arguments);
return function() {
return Math.exp(i());
};
}
return n.source = t, n;
}(Dr), iE = function t(e) {
function r(n) {
return (n = +n) <= 0 ? () => 0 : function() {
for (var i = 0, a = n; a > 1; --a)
i += e();
return i + a * e();
};
}
return r.source = t, r;
}(Dr), Az = function t(e) {
var r = iE.source(e);
function n(i) {
if ((i = +i) == 0)
return e;
var a = r(i);
return function() {
return a() / i;
};
}
return n.source = t, n;
}(Dr), Mz = function t(e) {
function r(n) {
return function() {
return -Math.log1p(-e()) / n;
};
}
return r.source = t, r;
}(Dr), Lz = function t(e) {
function r(n) {
if ((n = +n) < 0)
throw new RangeError("invalid alpha");
return n = 1 / -n, function() {
return Math.pow(1 - e(), n);
};
}
return r.source = t, r;
}(Dr), Rz = function t(e) {
function r(n) {
if ((n = +n) < 0 || n > 1)
throw new RangeError("invalid p");
return function() {
return Math.floor(e() + n);
};
}
return r.source = t, r;
}(Dr), aE = function t(e) {
function r(n) {
if ((n = +n) < 0 || n > 1)
throw new RangeError("invalid p");
return n === 0 ? () => 1 / 0 : n === 1 ? () => 1 : (n = Math.log1p(-n), function() {
return 1 + Math.floor(Math.log1p(-e()) / n);
});
}
return r.source = t, r;
}(Dr), I3 = function t(e) {
var r = R3.source(e)();
function n(i, a) {
if ((i = +i) < 0)
throw new RangeError("invalid k");
if (i === 0)
return () => 0;
if (a = a == null ? 1 : +a, i === 1)
return () => -Math.log1p(-e()) * a;
var s = (i < 1 ? i + 1 : i) - 1 / 3, o = 1 / (3 * Math.sqrt(s)), l = i < 1 ? () => Math.pow(e(), 1 / i) : () => 1;
return function() {
do {
do
var u = r(), h = 1 + o * u;
while (h <= 0);
h *= h * h;
var d = 1 - e();
} while (d >= 1 - 0.0331 * u * u * u * u && Math.log(d) >= 0.5 * u * u + s * (1 - h + Math.log(h)));
return s * h * l() * a;
};
}
return n.source = t, n;
}(Dr), sE = function t(e) {
var r = I3.source(e);
function n(i, a) {
var s = r(i), o = r(a);
return function() {
var l = s();
return l === 0 ? 0 : l / (l + o());
};
}
return n.source = t, n;
}(Dr), oE = function t(e) {
var r = aE.source(e), n = sE.source(e);
function i(a, s) {
return a = +a, (s = +s) >= 1 ? () => a : s <= 0 ? () => 0 : function() {
for (var o = 0, l = a, u = s; l * u > 16 && l * (1 - u) > 16; ) {
var h = Math.floor((l + 1) * u), d = n(h, l - h + 1)();
d <= u ? (o += h, l -= h, u = (u - d) / (1 - d)) : (l = h - 1, u /= d);
}
for (var f = u < 0.5, p = f ? u : 1 - u, m = r(p), _ = m(), y = 0; _ <= l; ++y)
_ += m();
return o + (f ? y : l - y);
};
}
return i.source = t, i;
}(Dr), Iz = function t(e) {
function r(n, i, a) {
var s;
return (n = +n) == 0 ? s = (o) => -Math.log(o) : (n = 1 / n, s = (o) => Math.pow(o, n)), i = i == null ? 0 : +i, a = a == null ? 1 : +a, function() {
return i + a * s(-Math.log1p(-e()));
};
}
return r.source = t, r;
}(Dr), Nz = function t(e) {
function r(n, i) {
return n = n == null ? 0 : +n, i = i == null ? 1 : +i, function() {
return n + i * Math.tan(Math.PI * e());
};
}
return r.source = t, r;
}(Dr), Bz = function t(e) {
function r(n, i) {
return n = n == null ? 0 : +n, i = i == null ? 1 : +i, function() {
var a = e();
return n + i * Math.log(a / (1 - a));
};
}
return r.source = t, r;
}(Dr), Dz = function t(e) {
var r = I3.source(e), n = oE.source(e);
function i(a) {
return function() {
for (var s = 0, o = a; o > 16; ) {
var l = Math.floor(0.875 * o), u = r(l)();
if (u > o)
return s + n(l - 1, o / u)();
s += l, o -= u;
}
for (var h = -Math.log1p(-e()), d = 0; h <= o; ++d)
h -= Math.log1p(-e());
return s + d;
};
}
return i.source = t, i;
}(Dr), Oz = 1664525, Fz = 1013904223, ov = 1 / 4294967296;
function Pz(t = Math.random()) {
let e = (0 <= t && t < 1 ? t / ov : Math.abs(t)) | 0;
return () => (e = Oz * e + Fz | 0, ov * (e >>> 0));
}
function Vn(t, e) {
switch (arguments.length) {
case 0:
break;
case 1:
this.range(t);
break;
default:
this.range(e).domain(t);
break;
}
return this;
}
function ba(t, e) {
switch (arguments.length) {
case 0:
break;
case 1: {
typeof t == "function" ? this.interpolator(t) : this.range(t);
break;
}
default: {
this.domain(t), typeof e == "function" ? this.interpolator(e) : this.range(e);
break;
}
}
return this;
}
const tb = Symbol("implicit");
function R1() {
var t = new fc(), e = [], r = [], n = tb;
function i(a) {
let s = t.get(a);
if (s === void 0) {
if (n !== tb)
return n;
t.set(a, s = e.push(a) - 1);
}
return r[s % r.length];
}
return i.domain = function(a) {
if (!arguments.length)
return e.slice();
e = [], t = new fc();
for (const s of a)
t.has(s) || t.set(s, e.push(s) - 1);
return i;
}, i.range = function(a) {
return arguments.length ? (r = Array.from(a), i) : r.slice();
}, i.unknown = function(a) {
return arguments.length ? (n = a, i) : n;
}, i.copy = function() {
return R1(e, r).unknown(n);
}, Vn.apply(i, arguments), i;
}
function N3() {
var t = R1().unknown(void 0), e = t.domain, r = t.range, n = 0, i = 1, a, s, o = !1, l = 0, u = 0, h = 0.5;
delete t.unknown;
function d() {
var f = e().length, p = i < n, m = p ? i : n, _ = p ? n : i;
a = (_ - m) / Math.max(1, f - l + u * 2), o && (a = Math.floor(a)), m += (_ - m - a * (f - l)) * h, s = a * (1 - l), o && (m = Math.round(m), s = Math.round(s));
var y = Da(f).map(function(b) {
return m + a * b;
});
return r(p ? y.reverse() : y);
}
return t.domain = function(f) {
return arguments.length ? (e(f), d()) : e();
}, t.range = function(f) {
return arguments.length ? ([n, i] = f, n = +n, i = +i, d()) : [n, i];
}, t.rangeRound = function(f) {
return [n, i] = f, n = +n, i = +i, o = !0, d();
}, t.bandwidth = function() {
return s;
}, t.step = function() {
return a;
}, t.round = function(f) {
return arguments.length ? (o = !!f, d()) : o;
}, t.padding = function(f) {
return arguments.length ? (l = Math.min(1, u = +f), d()) : l;
}, t.paddingInner = function(f) {
return arguments.length ? (l = Math.min(1, f), d()) : l;
}, t.paddingOuter = function(f) {
return arguments.length ? (u = +f, d()) : u;
}, t.align = function(f) {
return arguments.length ? (h = Math.max(0, Math.min(1, f)), d()) : h;
}, t.copy = function() {
return N3(e(), [n, i]).round(o).paddingInner(l).paddingOuter(u).align(h);
}, Vn.apply(d(), arguments);
}
function lE(t) {
var e = t.copy;
return t.padding = t.paddingOuter, delete t.paddingInner, delete t.paddingOuter, t.copy = function() {
return lE(e());
}, t;
}
function qz() {
return lE(N3.apply(null, arguments).paddingInner(1));
}
function Vz(t) {
return function() {
return t;
};
}
function vf(t) {
return +t;
}
var lv = [0, 1];
function tn(t) {
return t;
}
function eb(t, e) {
return (e -= t = +t) ? function(r) {
return (r - t) / e;
} : Vz(isNaN(e) ? NaN : 0.5);
}
function zz(t, e) {
var r;
return t > e && (r = t, t = e, e = r), function(n) {
return Math.max(t, Math.min(e, n));
};
}
function Yz(t, e, r) {
var n = t[0], i = t[1], a = e[0], s = e[1];
return i < n ? (n = eb(i, n), a = r(s, a)) : (n = eb(n, i), a = r(a, s)), function(o) {
return a(n(o));
};
}
function Uz(t, e, r) {
var n = Math.min(t.length, e.length) - 1, i = new Array(n), a = new Array(n), s = -1;
for (t[n] < t[0] && (t = t.slice().reverse(), e = e.slice().reverse()); ++s < n; )
i[s] = eb(t[s], t[s + 1]), a[s] = r(e[s], e[s + 1]);
return function(o) {
var l = Us(t, o, 1, n) - 1;
return a[l](i[l](o));
};
}
function nu(t, e) {
return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());
}
function I1() {
var t = lv, e = lv, r = Ja, n, i, a, s = tn, o, l, u;
function h() {
var f = Math.min(t.length, e.length);
return s !== tn && (s = zz(t[0], t[f - 1])), o = f > 2 ? Uz : Yz, l = u = null, d;
}
function d(f) {
return f == null || isNaN(f = +f) ? a : (l || (l = o(t.map(n), e, r)))(n(s(f)));
}
return d.invert = function(f) {
return s(i((u || (u = o(e, t.map(n), Dn)))(f)));
}, d.domain = function(f) {
return arguments.length ? (t = Array.from(f, vf), h()) : t.slice();
}, d.range = function(f) {
return arguments.length ? (e = Array.from(f), h()) : e.slice();
}, d.rangeRound = function(f) {
return e = Array.from(f), r = b1, h();
}, d.clamp = function(f) {
return arguments.length ? (s = f ? !0 : tn, h()) : s !== tn;
}, d.interpolate = function(f) {
return arguments.length ? (r = f, h()) : r;
}, d.unknown = function(f) {
return arguments.length ? (a = f, d) : a;
}, function(f, p) {
return n = f, i = p, h();
};
}
function B3() {
return I1()(tn, tn);
}
function cE(t, e, r, n) {
var i = dc(t, e, r), a;
switch (n = qo(n == null ? ",f" : n), n.type) {
case "s": {
var s = Math.max(Math.abs(t), Math.abs(e));
return n.precision == null && !isNaN(a = oT(i, s)) && (n.precision = a), h3(n, s);
}
case "":
case "e":
case "g":
case "p":
case "r": {
n.precision == null && !isNaN(a = lT(i, Math.max(Math.abs(t), Math.abs(e)))) && (n.precision = a - (n.type === "e"));
break;
}
case "f":
case "%": {
n.precision == null && !isNaN(a = sT(i)) && (n.precision = a - (n.type === "%") * 2);
break;
}
}
return S1(n);
}
function es(t) {
var e = t.domain;
return t.ticks = function(r) {
var n = e();
return As(n[0], n[n.length - 1], r == null ? 10 : r);
}, t.tickFormat = function(r, n) {
var i = e();
return cE(i[0], i[i.length - 1], r == null ? 10 : r, n);
}, t.nice = function(r) {
r == null && (r = 10);
var n = e(), i = 0, a = n.length - 1, s = n[i], o = n[a], l, u, h = 10;
for (o < s && (u = s, s = o, o = u, u = i, i = a, a = u); h-- > 0; ) {
if (u = Io(s, o, r), u === l)
return n[i] = s, n[a] = o, e(n);
if (u > 0)
s = Math.floor(s / u) * u, o = Math.ceil(o / u) * u;
else if (u < 0)
s = Math.ceil(s * u) / u, o = Math.floor(o * u) / u;
else
break;
l = u;
}
return t;
}, t;
}
function D3() {
var t = B3();
return t.copy = function() {
return nu(t, D3());
}, Vn.apply(t, arguments), es(t);
}
function uE(t) {
var e;
function r(n) {
return n == null || isNaN(n = +n) ? e : n;
}
return r.invert = r, r.domain = r.range = function(n) {
return arguments.length ? (t = Array.from(n, vf), r) : t.slice();
}, r.unknown = function(n) {
return arguments.length ? (e = n, r) : e;
}, r.copy = function() {
return uE(t).unknown(e);
}, t = arguments.length ? Array.from(t, vf) : [0, 1], es(r);
}
function hE(t, e) {
t = t.slice();
var r = 0, n = t.length - 1, i = t[r], a = t[n], s;
return a < i && (s = r, r = n, n = s, s = i, i = a, a = s), t[r] = e.floor(i), t[n] = e.ceil(a), t;
}
function cv(t) {
return Math.log(t);
}
function uv(t) {
return Math.exp(t);
}
function Wz(t) {
return -Math.log(-t);
}
function Hz(t) {
return -Math.exp(-t);
}
function Gz(t) {
return isFinite(t) ? +("1e" + t) : t < 0 ? 0 : t;
}
function jz(t) {
return t === 10 ? Gz : t === Math.E ? Math.exp : (e) => Math.pow(t, e);
}
function $z(t) {
return t === Math.E ? Math.log : t === 10 && Math.log10 || t === 2 && Math.log2 || (t = Math.log(t), (e) => Math.log(e) / t);
}
function hv(t) {
return (e, r) => -t(-e, r);
}
function O3(t) {
const e = t(cv, uv), r = e.domain;
let n = 10, i, a;
function s() {
return i = $z(n), a = jz(n), r()[0] < 0 ? (i = hv(i), a = hv(a), t(Wz, Hz)) : t(cv, uv), e;
}
return e.base = function(o) {
return arguments.length ? (n = +o, s()) : n;
}, e.domain = function(o) {
return arguments.length ? (r(o), s()) : r();
}, e.ticks = (o) => {
const l = r();
let u = l[0], h = l[l.length - 1];
const d = h < u;
d && ([u, h] = [h, u]);
let f = i(u), p = i(h), m, _;
const y = o == null ? 10 : +o;
let b = [];
if (!(n % 1) && p - f < y) {
if (f = Math.floor(f), p = Math.ceil(p), u > 0) {
for (; f <= p; ++f)
for (m = 1; m < n; ++m)
if (_ = f < 0 ? m / a(-f) : m * a(f), !(_ < u)) {
if (_ > h)
break;
b.push(_);
}
} else
for (; f <= p; ++f)
for (m = n - 1; m >= 1; --m)
if (_ = f > 0 ? m / a(-f) : m * a(f), !(_ < u)) {
if (_ > h)
break;
b.push(_);
}
b.length * 2 < y && (b = As(u, h, y));
} else
b = As(f, p, Math.min(p - f, y)).map(a);
return d ? b.reverse() : b;
}, e.tickFormat = (o, l) => {
if (o == null && (o = 10), l == null && (l = n === 10 ? "s" : ","), typeof l != "function" && (!(n % 1) && (l = qo(l)).precision == null && (l.trim = !0), l = S1(l)), o === 1 / 0)
return l;
const u = Math.max(1, n * o / e.ticks().length);
return (h) => {
let d = h / a(Math.round(i(h)));
return d * n < n - 0.5 && (d *= n), d <= u ? l(h) : "";
};
}, e.nice = () => r(hE(r(), {
floor: (o) => a(Math.floor(i(o))),
ceil: (o) => a(Math.ceil(i(o)))
})), e;
}
function fE() {
const t = O3(I1()).domain([1, 10]);
return t.copy = () => nu(t, fE()).base(t.base()), Vn.apply(t, arguments), t;
}
function fv(t) {
return function(e) {
return Math.sign(e) * Math.log1p(Math.abs(e / t));
};
}
function dv(t) {
return function(e) {
return Math.sign(e) * Math.expm1(Math.abs(e)) * t;
};
}
function F3(t) {
var e = 1, r = t(fv(e), dv(e));
return r.constant = function(n) {
return arguments.length ? t(fv(e = +n), dv(e)) : e;
}, es(r);
}
function dE() {
var t = F3(I1());
return t.copy = function() {
return nu(t, dE()).constant(t.constant());
}, Vn.apply(t, arguments);
}
function pv(t) {
return function(e) {
return e < 0 ? -Math.pow(-e, t) : Math.pow(e, t);
};
}
function Xz(t) {
return t < 0 ? -Math.sqrt(-t) : Math.sqrt(t);
}
function Kz(t) {
return t < 0 ? -t * t : t * t;
}
function P3(t) {
var e = t(tn, tn), r = 1;
function n() {
return r === 1 ? t(tn, tn) : r === 0.5 ? t(Xz, Kz) : t(pv(r), pv(1 / r));
}
return e.exponent = function(i) {
return arguments.length ? (r = +i, n()) : r;
}, es(e);
}
function q3() {
var t = P3(I1());
return t.copy = function() {
return nu(t, q3()).exponent(t.exponent());
}, Vn.apply(t, arguments), t;
}
function Zz() {
return q3.apply(null, arguments).exponent(0.5);
}
function gv(t) {
return Math.sign(t) * t * t;
}
function Qz(t) {
return Math.sign(t) * Math.sqrt(Math.abs(t));
}
function pE() {
var t = B3(), e = [0, 1], r = !1, n;
function i(a) {
var s = Qz(t(a));
return isNaN(s) ? n : r ? Math.round(s) : s;
}
return i.invert = function(a) {
return t.invert(gv(a));
}, i.domain = function(a) {
return arguments.length ? (t.domain(a), i) : t.domain();
}, i.range = function(a) {
return arguments.length ? (t.range((e = Array.from(a, vf)).map(gv)), i) : e.slice();
}, i.rangeRound = function(a) {
return i.range(a).round(!0);
}, i.round = function(a) {
return arguments.length ? (r = !!a, i) : r;
}, i.clamp = function(a) {
return arguments.length ? (t.clamp(a), i) : t.clamp();
}, i.unknown = function(a) {
return arguments.length ? (n = a, i) : n;
}, i.copy = function() {
return pE(t.domain(), e).round(r).clamp(t.clamp()).unknown(n);
}, Vn.apply(i, arguments), es(i);
}
function gE() {
var t = [], e = [], r = [], n;
function i() {
var s = 0, o = Math.max(1, e.length);
for (r = new Array(o - 1); ++s < o; )
r[s - 1] = Yw(t, s / o);
return a;
}
function a(s) {
return s == null || isNaN(s = +s) ? n : e[Us(r, s)];
}
return a.invertExtent = function(s) {
var o = e.indexOf(s);
return o < 0 ? [NaN, NaN] : [
o > 0 ? r[o - 1] : t[0],
o < r.length ? r[o] : t[t.length - 1]
];
}, a.domain = function(s) {
if (!arguments.length)
return t.slice();
t = [];
for (let o of s)
o != null && !isNaN(o = +o) && t.push(o);
return t.sort(tr), i();
}, a.range = function(s) {
return arguments.length ? (e = Array.from(s), i()) : e.slice();
}, a.unknown = function(s) {
return arguments.length ? (n = s, a) : n;
}, a.quantiles = function() {
return r.slice();
}, a.copy = function() {
return gE().domain(t).range(e).unknown(n);
}, Vn.apply(a, arguments);
}
function yE() {
var t = 0, e = 1, r = 1, n = [0.5], i = [0, 1], a;
function s(l) {
return l != null && l <= l ? i[Us(n, l, 0, r)] : a;
}
function o() {
var l = -1;
for (n = new Array(r); ++l < r; )
n[l] = ((l + 1) * e - (l - r) * t) / (r + 1);
return s;
}
return s.domain = function(l) {
return arguments.length ? ([t, e] = l, t = +t, e = +e, o()) : [t, e];
}, s.range = function(l) {
return arguments.length ? (r = (i = Array.from(l)).length - 1, o()) : i.slice();
}, s.invertExtent = function(l) {
var u = i.indexOf(l);
return u < 0 ? [NaN, NaN] : u < 1 ? [t, n[0]] : u >= r ? [n[r - 1], e] : [n[u - 1], n[u]];
}, s.unknown = function(l) {
return arguments.length && (a = l), s;
}, s.thresholds = function() {
return n.slice();
}, s.copy = function() {
return yE().domain([t, e]).range(i).unknown(a);
}, Vn.apply(es(s), arguments);
}
function mE() {
var t = [0.5], e = [0, 1], r, n = 1;
function i(a) {
return a != null && a <= a ? e[Us(t, a, 0, n)] : r;
}
return i.domain = function(a) {
return arguments.length ? (t = Array.from(a), n = Math.min(t.length, e.length - 1), i) : t.slice();
}, i.range = function(a) {
return arguments.length ? (e = Array.from(a), n = Math.min(t.length, e.length - 1), i) : e.slice();
}, i.invertExtent = function(a) {
var s = e.indexOf(a);
return [t[s - 1], t[s]];
}, i.unknown = function(a) {
return arguments.length ? (r = a, i) : r;
}, i.copy = function() {
return mE().domain(t).range(e).unknown(r);
}, Vn.apply(i, arguments);
}
var pd = new Date(), gd = new Date();
function Tr(t, e, r, n) {
function i(a) {
return t(a = arguments.length === 0 ? new Date() : new Date(+a)), a;
}
return i.floor = function(a) {
return t(a = new Date(+a)), a;
}, i.ceil = function(a) {
return t(a = new Date(a - 1)), e(a, 1), t(a), a;
}, i.round = function(a) {
var s = i(a), o = i.ceil(a);
return a - s < o - a ? s : o;
}, i.offset = function(a, s) {
return e(a = new Date(+a), s == null ? 1 : Math.floor(s)), a;
}, i.range = function(a, s, o) {
var l = [], u;
if (a = i.ceil(a), o = o == null ? 1 : Math.floor(o), !(a < s) || !(o > 0))
return l;
do
l.push(u = new Date(+a)), e(a, o), t(a);
while (u < a && a < s);
return l;
}, i.filter = function(a) {
return Tr(function(s) {
if (s >= s)
for (; t(s), !a(s); )
s.setTime(s - 1);
}, function(s, o) {
if (s >= s)
if (o < 0)
for (; ++o <= 0; )
for (; e(s, -1), !a(s); )
;
else
for (; --o >= 0; )
for (; e(s, 1), !a(s); )
;
});
}, r && (i.count = function(a, s) {
return pd.setTime(+a), gd.setTime(+s), t(pd), t(gd), Math.floor(r(pd, gd));
}, i.every = function(a) {
return a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? i.filter(n ? function(s) {
return n(s) % a === 0;
} : function(s) {
return i.count(0, s) % a === 0;
}) : i;
}), i;
}
var xf = Tr(function() {
}, function(t, e) {
t.setTime(+t + e);
}, function(t, e) {
return e - t;
});
xf.every = function(t) {
return t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? Tr(function(e) {
e.setTime(Math.floor(e / t) * t);
}, function(e, r) {
e.setTime(+e + r * t);
}, function(e, r) {
return (r - e) / t;
}) : xf;
};
const rb = xf;
var yv = xf.range;
const ua = 1e3, Fn = ua * 60, ha = Fn * 60, Ds = ha * 24, V3 = Ds * 7, mv = Ds * 30, yd = Ds * 365;
var bE = Tr(function(t) {
t.setTime(t - t.getMilliseconds());
}, function(t, e) {
t.setTime(+t + e * ua);
}, function(t, e) {
return (e - t) / ua;
}, function(t) {
return t.getUTCSeconds();
});
const Fa = bE;
var bv = bE.range, _E = Tr(function(t) {
t.setTime(t - t.getMilliseconds() - t.getSeconds() * ua);
}, function(t, e) {
t.setTime(+t + e * Fn);
}, function(t, e) {
return (e - t) / Fn;
}, function(t) {
return t.getMinutes();
});
const z3 = _E;
var Jz = _E.range, vE = Tr(function(t) {
t.setTime(t - t.getMilliseconds() - t.getSeconds() * ua - t.getMinutes() * Fn);
}, function(t, e) {
t.setTime(+t + e * ha);
}, function(t, e) {
return (e - t) / ha;
}, function(t) {
return t.getHours();
});
const Y3 = vE;
var tY = vE.range, xE = Tr(
(t) => t.setHours(0, 0, 0, 0),
(t, e) => t.setDate(t.getDate() + e),
(t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * Fn) / Ds,
(t) => t.getDate() - 1
);
const iu = xE;
var eY = xE.range;
function $s(t) {
return Tr(function(e) {
e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
}, function(e, r) {
e.setDate(e.getDate() + r * 7);
}, function(e, r) {
return (r - e - (r.getTimezoneOffset() - e.getTimezoneOffset()) * Fn) / V3;
});
}
var Uo = $s(0), Ac = $s(1), kE = $s(2), wE = $s(3), Os = $s(4), TE = $s(5), EE = $s(6), _v = Uo.range, rY = Ac.range, nY = kE.range, iY = wE.range, aY = Os.range, sY = TE.range, oY = EE.range, CE = Tr(function(t) {
t.setDate(1), t.setHours(0, 0, 0, 0);
}, function(t, e) {
t.setMonth(t.getMonth() + e);
}, function(t, e) {
return e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12;
}, function(t) {
return t.getMonth();
});
const U3 = CE;
var lY = CE.range, W3 = Tr(function(t) {
t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
}, function(t, e) {
t.setFullYear(t.getFullYear() + e);
}, function(t, e) {
return e.getFullYear() - t.getFullYear();
}, function(t) {
return t.getFullYear();
});
W3.every = function(t) {
return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : Tr(function(e) {
e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
}, function(e, r) {
e.setFullYear(e.getFullYear() + r * t);
});
};
const Ga = W3;
var cY = W3.range, SE = Tr(function(t) {
t.setUTCSeconds(0, 0);
}, function(t, e) {
t.setTime(+t + e * Fn);
}, function(t, e) {
return (e - t) / Fn;
}, function(t) {
return t.getUTCMinutes();
});
const H3 = SE;
var uY = SE.range, AE = Tr(function(t) {
t.setUTCMinutes(0, 0, 0);
}, function(t, e) {
t.setTime(+t + e * ha);
}, function(t, e) {
return (e - t) / ha;
}, function(t) {
return t.getUTCHours();
});
const G3 = AE;
var hY = AE.range, ME = Tr(function(t) {
t.setUTCHours(0, 0, 0, 0);
}, function(t, e) {
t.setUTCDate(t.getUTCDate() + e);
}, function(t, e) {
return (e - t) / Ds;
}, function(t) {
return t.getUTCDate() - 1;
});
const au = ME;
var fY = ME.range;
function Xs(t) {
return Tr(function(e) {
e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
}, function(e, r) {
e.setUTCDate(e.getUTCDate() + r * 7);
}, function(e, r) {
return (r - e) / V3;
});
}
var Wo = Xs(0), Mc = Xs(1), LE = Xs(2), RE = Xs(3), Fs = Xs(4), IE = Xs(5), NE = Xs(6), vv = Wo.range, dY = Mc.range, pY = LE.range, gY = RE.range, yY = Fs.range, mY = IE.range, bY = NE.range, BE = Tr(function(t) {
t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0);
}, function(t, e) {
t.setUTCMonth(t.getUTCMonth() + e);
}, function(t, e) {
return e.getUTCMonth() - t.getUTCMonth() + (e.getUTCFullYear() - t.getUTCFullYear()) * 12;
}, function(t) {
return t.getUTCMonth();
});
const j3 = BE;
var _Y = BE.range, $3 = Tr(function(t) {
t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
}, function(t, e) {
t.setUTCFullYear(t.getUTCFullYear() + e);
}, function(t, e) {
return e.getUTCFullYear() - t.getUTCFullYear();
}, function(t) {
return t.getUTCFullYear();
});
$3.every = function(t) {
return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : Tr(function(e) {
e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
}, function(e, r) {
e.setUTCFullYear(e.getUTCFullYear() + r * t);
});
};
const ja = $3;
var vY = $3.range;
function DE(t, e, r, n, i, a) {
const s = [
[Fa, 1, ua],
[Fa, 5, 5 * ua],
[Fa, 15, 15 * ua],
[Fa, 30, 30 * ua],
[a, 1, Fn],
[a, 5, 5 * Fn],
[a, 15, 15 * Fn],
[a, 30, 30 * Fn],
[i, 1, ha],
[i, 3, 3 * ha],
[i, 6, 6 * ha],
[i, 12, 12 * ha],
[n, 1, Ds],
[n, 2, 2 * Ds],
[r, 1, V3],
[e, 1, mv],
[e, 3, 3 * mv],
[t, 1, yd]
];
function o(u, h, d) {
const f = h < u;
f && ([u, h] = [h, u]);
const p = d && typeof d.range == "function" ? d : l(u, h, d), m = p ? p.range(u, +h + 1) : [];
return f ? m.reverse() : m;
}
function l(u, h, d) {
const f = Math.abs(h - u) / d, p = s1(([, , y]) => y).right(s, f);
if (p === s.length)
return t.every(dc(u / yd, h / yd, d));
if (p === 0)
return rb.every(Math.max(dc(u, h, d), 1));
const [m, _] = s[f / s[p - 1][2] < s[p][2] / f ? p - 1 : p];
return m.every(_);
}
return [o, l];
}
const [OE, FE] = DE(ja, j3, Wo, au, G3, H3), [PE, qE] = DE(Ga, U3, Uo, iu, Y3, z3);
function md(t) {
if (0 <= t.y && t.y < 100) {
var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
return e.setFullYear(t.y), e;
}
return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
}
function bd(t) {
if (0 <= t.y && t.y < 100) {
var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
return e.setUTCFullYear(t.y), e;
}
return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
}
function El(t, e, r) {
return { y: t, m: e, d: r, H: 0, M: 0, S: 0, L: 0 };
}
function VE(t) {
var e = t.dateTime, r = t.date, n = t.time, i = t.periods, a = t.days, s = t.shortDays, o = t.months, l = t.shortMonths, u = Cl(i), h = Sl(i), d = Cl(a), f = Sl(a), p = Cl(s), m = Sl(s), _ = Cl(o), y = Sl(o), b = Cl(l), x = Sl(l), k = {
a: X,
A: ct,
b: J,
B: Y,
c: null,
d: Cv,
e: Cv,
f: UY,
g: JY,
G: eU,
H: VY,
I: zY,
j: YY,
L: zE,
m: WY,
M: HY,
p: $,
q: lt,
Q: Mv,
s: Lv,
S: GY,
u: jY,
U: $Y,
V: XY,
w: KY,
W: ZY,
x: null,
X: null,
y: QY,
Y: tU,
Z: rU,
"%": Av
}, T = {
a: ut,
A: W,
b: tt,
B: K,
c: null,
d: Sv,
e: Sv,
f: sU,
g: yU,
G: bU,
H: nU,
I: iU,
j: aU,
L: UE,
m: oU,
M: lU,
p: it,
q: Z,
Q: Mv,
s: Lv,
S: cU,
u: uU,
U: hU,
V: fU,
w: dU,
W: pU,
x: null,
X: null,
y: gU,
Y: mU,
Z: _U,
"%": Av
}, C = {
a: L,
A: v,
b: B,
B: w,
c: D,
d: Tv,
e: Tv,
f: OY,
g: wv,
G: kv,
H: Ev,
I: Ev,
j: IY,
L: DY,
m: RY,
M: NY,
p: A,
q: LY,
Q: PY,
s: qY,
S: BY,
u: EY,
U: CY,
V: SY,
w: TY,
W: AY,
x: N,
X: z,
y: wv,
Y: kv,
Z: MY,
"%": FY
};
k.x = M(r, k), k.X = M(n, k), k.c = M(e, k), T.x = M(r, T), T.X = M(n, T), T.c = M(e, T);
function M(V, Q) {
return function(q) {
var U = [], F = -1, j = 0, P = V.length, et, at, It;
for (q instanceof Date || (q = new Date(+q)); ++F < P; )
V.charCodeAt(F) === 37 && (U.push(V.slice(j, F)), (at = xv[et = V.charAt(++F)]) != null ? et = V.charAt(++F) : at = et === "e" ? " " : "0", (It = Q[et]) && (et = It(q, at)), U.push(et), j = F + 1);
return U.push(V.slice(j, F)), U.join("");
};
}
function S(V, Q) {
return function(q) {
var U = El(1900, void 0, 1), F = R(U, V, q += "", 0), j, P;
if (F != q.length)
return null;
if ("Q" in U)
return new Date(U.Q);
if ("s" in U)
return new Date(U.s * 1e3 + ("L" in U ? U.L : 0));
if (Q && !("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) {
if (U.V < 1 || U.V > 53)
return null;
"w" in U || (U.w = 1), "Z" in U ? (j = bd(El(U.y, 0, 1)), P = j.getUTCDay(), j = P > 4 || P === 0 ? Mc.ceil(j) : Mc(j), j = au.offset(j, (U.V - 1) * 7), U.y = j.getUTCFullYear(), U.m = j.getUTCMonth(), U.d = j.getUTCDate() + (U.w + 6) % 7) : (j = md(El(U.y, 0, 1)), P = j.getDay(), j = P > 4 || P === 0 ? Ac.ceil(j) : Ac(j), j = iu.offset(j, (U.V - 1) * 7), U.y = j.getFullYear(), U.m = j.getMonth(), U.d = j.getDate() + (U.w + 6) % 7);
} else
("W" in U || "U" in U) && ("w" in U || (U.w = "u" in U ? U.u % 7 : "W" in U ? 1 : 0), P = "Z" in U ? bd(El(U.y, 0, 1)).getUTCDay() : md(El(U.y, 0, 1)).getDay(), U.m = 0, U.d = "W" in U ? (U.w + 6) % 7 + U.W * 7 - (P + 5) % 7 : U.w + U.U * 7 - (P + 6) % 7);
return "Z" in U ? (U.H += U.Z / 100 | 0, U.M += U.Z % 100, bd(U)) : md(U);
};
}
function R(V, Q, q, U) {
for (var F = 0, j = Q.length, P = q.length, et, at; F < j; ) {
if (U >= P)
return -1;
if (et = Q.charCodeAt(F++), et === 37) {
if (et = Q.charAt(F++), at = C[et in xv ? Q.charAt(F++) : et], !at || (U = at(V, q, U)) < 0)
return -1;
} else if (et != q.charCodeAt(U++))
return -1;
}
return U;
}
function A(V, Q, q) {
var U = u.exec(Q.slice(q));
return U ? (V.p = h.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function L(V, Q, q) {
var U = p.exec(Q.slice(q));
return U ? (V.w = m.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function v(V, Q, q) {
var U = d.exec(Q.slice(q));
return U ? (V.w = f.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function B(V, Q, q) {
var U = b.exec(Q.slice(q));
return U ? (V.m = x.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function w(V, Q, q) {
var U = _.exec(Q.slice(q));
return U ? (V.m = y.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function D(V, Q, q) {
return R(V, e, Q, q);
}
function N(V, Q, q) {
return R(V, r, Q, q);
}
function z(V, Q, q) {
return R(V, n, Q, q);
}
function X(V) {
return s[V.getDay()];
}
function ct(V) {
return a[V.getDay()];
}
function J(V) {
return l[V.getMonth()];
}
function Y(V) {
return o[V.getMonth()];
}
function $(V) {
return i[+(V.getHours() >= 12)];
}
function lt(V) {
return 1 + ~~(V.getMonth() / 3);
}
function ut(V) {
return s[V.getUTCDay()];
}
function W(V) {
return a[V.getUTCDay()];
}
function tt(V) {
return l[V.getUTCMonth()];
}
function K(V) {
return o[V.getUTCMonth()];
}
function it(V) {
return i[+(V.getUTCHours() >= 12)];
}
function Z(V) {
return 1 + ~~(V.getUTCMonth() / 3);
}
return {
format: function(V) {
var Q = M(V += "", k);
return Q.toString = function() {
return V;
}, Q;
},
parse: function(V) {
var Q = S(V += "", !1);
return Q.toString = function() {
return V;
}, Q;
},
utcFormat: function(V) {
var Q = M(V += "", T);
return Q.toString = function() {
return V;
}, Q;
},
utcParse: function(V) {
var Q = S(V += "", !0);
return Q.toString = function() {
return V;
}, Q;
}
};
}
var xv = { "-": "", _: " ", 0: "0" }, Lr = /^\s*\d+/, xY = /^%/, kY = /[\\^$*+?|[\]().{}]/g;
function qe(t, e, r) {
var n = t < 0 ? "-" : "", i = (n ? -t : t) + "", a = i.length;
return n + (a < r ? new Array(r - a + 1).join(e) + i : i);
}
function wY(t) {
return t.replace(kY, "\\$&");
}
function Cl(t) {
return new RegExp("^(?:" + t.map(wY).join("|") + ")", "i");
}
function Sl(t) {
return new Map(t.map((e, r) => [e.toLowerCase(), r]));
}
function TY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 1));
return n ? (t.w = +n[0], r + n[0].length) : -1;
}
function EY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 1));
return n ? (t.u = +n[0], r + n[0].length) : -1;
}
function CY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.U = +n[0], r + n[0].length) : -1;
}
function SY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.V = +n[0], r + n[0].length) : -1;
}
function AY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.W = +n[0], r + n[0].length) : -1;
}
function kv(t, e, r) {
var n = Lr.exec(e.slice(r, r + 4));
return n ? (t.y = +n[0], r + n[0].length) : -1;
}
function wv(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), r + n[0].length) : -1;
}
function MY(t, e, r) {
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r, r + 6));
return n ? (t.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), r + n[0].length) : -1;
}
function LY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 1));
return n ? (t.q = n[0] * 3 - 3, r + n[0].length) : -1;
}
function RY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.m = n[0] - 1, r + n[0].length) : -1;
}
function Tv(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.d = +n[0], r + n[0].length) : -1;
}
function IY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 3));
return n ? (t.m = 0, t.d = +n[0], r + n[0].length) : -1;
}
function Ev(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.H = +n[0], r + n[0].length) : -1;
}
function NY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.M = +n[0], r + n[0].length) : -1;
}
function BY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 2));
return n ? (t.S = +n[0], r + n[0].length) : -1;
}
function DY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 3));
return n ? (t.L = +n[0], r + n[0].length) : -1;
}
function OY(t, e, r) {
var n = Lr.exec(e.slice(r, r + 6));
return n ? (t.L = Math.floor(n[0] / 1e3), r + n[0].length) : -1;
}
function FY(t, e, r) {
var n = xY.exec(e.slice(r, r + 1));
return n ? r + n[0].length : -1;
}
function PY(t, e, r) {
var n = Lr.exec(e.slice(r));
return n ? (t.Q = +n[0], r + n[0].length) : -1;
}
function qY(t, e, r) {
var n = Lr.exec(e.slice(r));
return n ? (t.s = +n[0], r + n[0].length) : -1;
}
function Cv(t, e) {
return qe(t.getDate(), e, 2);
}
function VY(t, e) {
return qe(t.getHours(), e, 2);
}
function zY(t, e) {
return qe(t.getHours() % 12 || 12, e, 2);
}
function YY(t, e) {
return qe(1 + iu.count(Ga(t), t), e, 3);
}
function zE(t, e) {
return qe(t.getMilliseconds(), e, 3);
}
function UY(t, e) {
return zE(t, e) + "000";
}
function WY(t, e) {
return qe(t.getMonth() + 1, e, 2);
}
function HY(t, e) {
return qe(t.getMinutes(), e, 2);
}
function GY(t, e) {
return qe(t.getSeconds(), e, 2);
}
function jY(t) {
var e = t.getDay();
return e === 0 ? 7 : e;
}
function $Y(t, e) {
return qe(Uo.count(Ga(t) - 1, t), e, 2);
}
function YE(t) {
var e = t.getDay();
return e >= 4 || e === 0 ? Os(t) : Os.ceil(t);
}
function XY(t, e) {
return t = YE(t), qe(Os.count(Ga(t), t) + (Ga(t).getDay() === 4), e, 2);
}
function KY(t) {
return t.getDay();
}
function ZY(t, e) {
return qe(Ac.count(Ga(t) - 1, t), e, 2);
}
function QY(t, e) {
return qe(t.getFullYear() % 100, e, 2);
}
function JY(t, e) {
return t = YE(t), qe(t.getFullYear() % 100, e, 2);
}
function tU(t, e) {
return qe(t.getFullYear() % 1e4, e, 4);
}
function eU(t, e) {
var r = t.getDay();
return t = r >= 4 || r === 0 ? Os(t) : Os.ceil(t), qe(t.getFullYear() % 1e4, e, 4);
}
function rU(t) {
var e = t.getTimezoneOffset();
return (e > 0 ? "-" : (e *= -1, "+")) + qe(e / 60 | 0, "0", 2) + qe(e % 60, "0", 2);
}
function Sv(t, e) {
return qe(t.getUTCDate(), e, 2);
}
function nU(t, e) {
return qe(t.getUTCHours(), e, 2);
}
function iU(t, e) {
return qe(t.getUTCHours() % 12 || 12, e, 2);
}
function aU(t, e) {
return qe(1 + au.count(ja(t), t), e, 3);
}
function UE(t, e) {
return qe(t.getUTCMilliseconds(), e, 3);
}
function sU(t, e) {
return UE(t, e) + "000";
}
function oU(t, e) {
return qe(t.getUTCMonth() + 1, e, 2);
}
function lU(t, e) {
return qe(t.getUTCMinutes(), e, 2);
}
function cU(t, e) {
return qe(t.getUTCSeconds(), e, 2);
}
function uU(t) {
var e = t.getUTCDay();
return e === 0 ? 7 : e;
}
function hU(t, e) {
return qe(Wo.count(ja(t) - 1, t), e, 2);
}
function WE(t) {
var e = t.getUTCDay();
return e >= 4 || e === 0 ? Fs(t) : Fs.ceil(t);
}
function fU(t, e) {
return t = WE(t), qe(Fs.count(ja(t), t) + (ja(t).getUTCDay() === 4), e, 2);
}
function dU(t) {
return t.getUTCDay();
}
function pU(t, e) {
return qe(Mc.count(ja(t) - 1, t), e, 2);
}
function gU(t, e) {
return qe(t.getUTCFullYear() % 100, e, 2);
}
function yU(t, e) {
return t = WE(t), qe(t.getUTCFullYear() % 100, e, 2);
}
function mU(t, e) {
return qe(t.getUTCFullYear() % 1e4, e, 4);
}
function bU(t, e) {
var r = t.getUTCDay();
return t = r >= 4 || r === 0 ? Fs(t) : Fs.ceil(t), qe(t.getUTCFullYear() % 1e4, e, 4);
}
function _U() {
return "+0000";
}
function Av() {
return "%";
}
function Mv(t) {
return +t;
}
function Lv(t) {
return Math.floor(+t / 1e3);
}
var go, Lc, HE, N1, X3;
GE({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
periods: ["AM", "PM"],
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
function GE(t) {
return go = VE(t), Lc = go.format, HE = go.parse, N1 = go.utcFormat, X3 = go.utcParse, go;
}
var jE = "%Y-%m-%dT%H:%M:%S.%LZ";
function vU(t) {
return t.toISOString();
}
var xU = Date.prototype.toISOString ? vU : N1(jE);
const kU = xU;
function wU(t) {
var e = new Date(t);
return isNaN(e) ? null : e;
}
var TU = +new Date("2000-01-01T00:00:00.000Z") ? wU : X3(jE);
const EU = TU;
function CU(t) {
return new Date(t);
}
function SU(t) {
return t instanceof Date ? +t : +new Date(+t);
}
function K3(t, e, r, n, i, a, s, o, l, u) {
var h = B3(), d = h.invert, f = h.domain, p = u(".%L"), m = u(":%S"), _ = u("%I:%M"), y = u("%I %p"), b = u("%a %d"), x = u("%b %d"), k = u("%B"), T = u("%Y");
function C(M) {
return (l(M) < M ? p : o(M) < M ? m : s(M) < M ? _ : a(M) < M ? y : n(M) < M ? i(M) < M ? b : x : r(M) < M ? k : T)(M);
}
return h.invert = function(M) {
return new Date(d(M));
}, h.domain = function(M) {
return arguments.length ? f(Array.from(M, SU)) : f().map(CU);
}, h.ticks = function(M) {
var S = f();
return t(S[0], S[S.length - 1], M == null ? 10 : M);
}, h.tickFormat = function(M, S) {
return S == null ? C : u(S);
}, h.nice = function(M) {
var S = f();
return (!M || typeof M.range != "function") && (M = e(S[0], S[S.length - 1], M == null ? 10 : M)), M ? f(hE(S, M)) : h;
}, h.copy = function() {
return nu(h, K3(t, e, r, n, i, a, s, o, l, u));
}, h;
}
function $E() {
return Vn.apply(K3(PE, qE, Ga, U3, Uo, iu, Y3, z3, Fa, Lc).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
function AU() {
return Vn.apply(K3(OE, FE, ja, j3, Wo, au, G3, H3, Fa, N1).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
}
function B1() {
var t = 0, e = 1, r, n, i, a, s = tn, o = !1, l;
function u(d) {
return d == null || isNaN(d = +d) ? l : s(i === 0 ? 0.5 : (d = (a(d) - r) * i, o ? Math.max(0, Math.min(1, d)) : d));
}
u.domain = function(d) {
return arguments.length ? ([t, e] = d, r = a(t = +t), n = a(e = +e), i = r === n ? 0 : 1 / (n - r), u) : [t, e];
}, u.clamp = function(d) {
return arguments.length ? (o = !!d, u) : o;
}, u.interpolator = function(d) {
return arguments.length ? (s = d, u) : s;
};
function h(d) {
return function(f) {
var p, m;
return arguments.length ? ([p, m] = f, s = d(p, m), u) : [s(0), s(1)];
};
}
return u.range = h(Ja), u.rangeRound = h(b1), u.unknown = function(d) {
return arguments.length ? (l = d, u) : l;
}, function(d) {
return a = d, r = d(t), n = d(e), i = r === n ? 0 : 1 / (n - r), u;
};
}
function rs(t, e) {
return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown());
}
function XE() {
var t = es(B1()(tn));
return t.copy = function() {
return rs(t, XE());
}, ba.apply(t, arguments);
}
function KE() {
var t = O3(B1()).domain([1, 10]);
return t.copy = function() {
return rs(t, KE()).base(t.base());
}, ba.apply(t, arguments);
}
function ZE() {
var t = F3(B1());
return t.copy = function() {
return rs(t, ZE()).constant(t.constant());
}, ba.apply(t, arguments);
}
function Z3() {
var t = P3(B1());
return t.copy = function() {
return rs(t, Z3()).exponent(t.exponent());
}, ba.apply(t, arguments);
}
function MU() {
return Z3.apply(null, arguments).exponent(0.5);
}
function QE() {
var t = [], e = tn;
function r(n) {
if (n != null && !isNaN(n = +n))
return e((Us(t, n, 1) - 1) / (t.length - 1));
}
return r.domain = function(n) {
if (!arguments.length)
return t.slice();
t = [];
for (let i of n)
i != null && !isNaN(i = +i) && t.push(i);
return t.sort(tr), r;
}, r.interpolator = function(n) {
return arguments.length ? (e = n, r) : e;
}, r.range = function() {
return t.map((n, i) => e(i / (t.length - 1)));
}, r.quantiles = function(n) {
return Array.from({ length: n + 1 }, (i, a) => gc(t, a / n));
}, r.copy = function() {
return QE(e).domain(t);
}, ba.apply(r, arguments);
}
function D1() {
var t = 0, e = 0.5, r = 1, n = 1, i, a, s, o, l, u = tn, h, d = !1, f;
function p(_) {
return isNaN(_ = +_) ? f : (_ = 0.5 + ((_ = +h(_)) - a) * (n * _ < n * a ? o : l), u(d ? Math.max(0, Math.min(1, _)) : _));
}
p.domain = function(_) {
return arguments.length ? ([t, e, r] = _, i = h(t = +t), a = h(e = +e), s = h(r = +r), o = i === a ? 0 : 0.5 / (a - i), l = a === s ? 0 : 0.5 / (s - a), n = a < i ? -1 : 1, p) : [t, e, r];
}, p.clamp = function(_) {
return arguments.length ? (d = !!_, p) : d;
}, p.interpolator = function(_) {
return arguments.length ? (u = _, p) : u;
};
function m(_) {
return function(y) {
var b, x, k;
return arguments.length ? ([b, x, k] = y, u = F9(_, [b, x, k]), p) : [u(0), u(0.5), u(1)];
};
}
return p.range = m(Ja), p.rangeRound = m(b1), p.unknown = function(_) {
return arguments.length ? (f = _, p) : f;
}, function(_) {
return h = _, i = _(t), a = _(e), s = _(r), o = i === a ? 0 : 0.5 / (a - i), l = a === s ? 0 : 0.5 / (s - a), n = a < i ? -1 : 1, p;
};
}
function JE() {
var t = es(D1()(tn));
return t.copy = function() {
return rs(t, JE());
}, ba.apply(t, arguments);
}
function tC() {
var t = O3(D1()).domain([0.1, 1, 10]);
return t.copy = function() {
return rs(t, tC()).base(t.base());
}, ba.apply(t, arguments);
}
function eC() {
var t = F3(D1());
return t.copy = function() {
return rs(t, eC()).constant(t.constant());
}, ba.apply(t, arguments);
}
function Q3() {
var t = P3(D1());
return t.copy = function() {
return rs(t, Q3()).exponent(t.exponent());
}, ba.apply(t, arguments);
}
function LU() {
return Q3.apply(null, arguments).exponent(0.5);
}
function Ce(t) {
for (var e = t.length / 6 | 0, r = new Array(e), n = 0; n < e; )
r[n] = "#" + t.slice(n * 6, ++n * 6);
return r;
}
const RU = Ce("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"), IU = Ce("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"), NU = Ce("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"), BU = Ce("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"), DU = Ce("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"), OU = Ce("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"), FU = Ce("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"), PU = Ce("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"), qU = Ce("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"), VU = Ce("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"), We = (t) => w9(t[t.length - 1]);
var rC = new Array(3).concat(
"d8b365f5f5f55ab4ac",
"a6611adfc27d80cdc1018571",
"a6611adfc27df5f5f580cdc1018571",
"8c510ad8b365f6e8c3c7eae55ab4ac01665e",
"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
).map(Ce);
const zU = We(rC);
var nC = new Array(3).concat(
"af8dc3f7f7f77fbf7b",
"7b3294c2a5cfa6dba0008837",
"7b3294c2a5cff7f7f7a6dba0008837",
"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
).map(Ce);
const YU = We(nC);
var iC = new Array(3).concat(
"e9a3c9f7f7f7a1d76a",
"d01c8bf1b6dab8e1864dac26",
"d01c8bf1b6daf7f7f7b8e1864dac26",
"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
).map(Ce);
const UU = We(iC);
var aC = new Array(3).concat(
"998ec3f7f7f7f1a340",
"5e3c99b2abd2fdb863e66101",
"5e3c99b2abd2f7f7f7fdb863e66101",
"542788998ec3d8daebfee0b6f1a340b35806",
"542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
).map(Ce);
const WU = We(aC);
var sC = new Array(3).concat(
"ef8a62f7f7f767a9cf",
"ca0020f4a58292c5de0571b0",
"ca0020f4a582f7f7f792c5de0571b0",
"b2182bef8a62fddbc7d1e5f067a9cf2166ac",
"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
).map(Ce);
const HU = We(sC);
var oC = new Array(3).concat(
"ef8a62ffffff999999",
"ca0020f4a582bababa404040",
"ca0020f4a582ffffffbababa404040",
"b2182bef8a62fddbc7e0e0e09999994d4d4d",
"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
).map(Ce);
const GU = We(oC);
var lC = new Array(3).concat(
"fc8d59ffffbf91bfdb",
"d7191cfdae61abd9e92c7bb6",
"d7191cfdae61ffffbfabd9e92c7bb6",
"d73027fc8d59fee090e0f3f891bfdb4575b4",
"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
).map(Ce);
const jU = We(lC);
var cC = new Array(3).concat(
"fc8d59ffffbf91cf60",
"d7191cfdae61a6d96a1a9641",
"d7191cfdae61ffffbfa6d96a1a9641",
"d73027fc8d59fee08bd9ef8b91cf601a9850",
"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
).map(Ce);
const $U = We(cC);
var uC = new Array(3).concat(
"fc8d59ffffbf99d594",
"d7191cfdae61abdda42b83ba",
"d7191cfdae61ffffbfabdda42b83ba",
"d53e4ffc8d59fee08be6f59899d5943288bd",
"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
).map(Ce);
const XU = We(uC);
var hC = new Array(3).concat(
"e5f5f999d8c92ca25f",
"edf8fbb2e2e266c2a4238b45",
"edf8fbb2e2e266c2a42ca25f006d2c",
"edf8fbccece699d8c966c2a42ca25f006d2c",
"edf8fbccece699d8c966c2a441ae76238b45005824",
"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
).map(Ce);
const KU = We(hC);
var fC = new Array(3).concat(
"e0ecf49ebcda8856a7",
"edf8fbb3cde38c96c688419d",
"edf8fbb3cde38c96c68856a7810f7c",
"edf8fbbfd3e69ebcda8c96c68856a7810f7c",
"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
).map(Ce);
const ZU = We(fC);
var dC = new Array(3).concat(
"e0f3dba8ddb543a2ca",
"f0f9e8bae4bc7bccc42b8cbe",
"f0f9e8bae4bc7bccc443a2ca0868ac",
"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
).map(Ce);
const QU = We(dC);
var pC = new Array(3).concat(
"fee8c8fdbb84e34a33",
"fef0d9fdcc8afc8d59d7301f",
"fef0d9fdcc8afc8d59e34a33b30000",
"fef0d9fdd49efdbb84fc8d59e34a33b30000",
"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
).map(Ce);
const JU = We(pC);
var gC = new Array(3).concat(
"ece2f0a6bddb1c9099",
"f6eff7bdc9e167a9cf02818a",
"f6eff7bdc9e167a9cf1c9099016c59",
"f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
).map(Ce);
const tW = We(gC);
var yC = new Array(3).concat(
"ece7f2a6bddb2b8cbe",
"f1eef6bdc9e174a9cf0570b0",
"f1eef6bdc9e174a9cf2b8cbe045a8d",
"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
).map(Ce);
const eW = We(yC);
var mC = new Array(3).concat(
"e7e1efc994c7dd1c77",
"f1eef6d7b5d8df65b0ce1256",
"f1eef6d7b5d8df65b0dd1c77980043",
"f1eef6d4b9dac994c7df65b0dd1c77980043",
"f1eef6d4b9dac994c7df65b0e7298ace125691003f",
"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
).map(Ce);
const rW = We(mC);
var bC = new Array(3).concat(
"fde0ddfa9fb5c51b8a",
"feebe2fbb4b9f768a1ae017e",
"feebe2fbb4b9f768a1c51b8a7a0177",
"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
).map(Ce);
const nW = We(bC);
var _C = new Array(3).concat(
"edf8b17fcdbb2c7fb8",
"ffffcca1dab441b6c4225ea8",
"ffffcca1dab441b6c42c7fb8253494",
"ffffccc7e9b47fcdbb41b6c42c7fb8253494",
"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
).map(Ce);
const iW = We(_C);
var vC = new Array(3).concat(
"f7fcb9addd8e31a354",
"ffffccc2e69978c679238443",
"ffffccc2e69978c67931a354006837",
"ffffccd9f0a3addd8e78c67931a354006837",
"ffffccd9f0a3addd8e78c67941ab5d238443005a32",
"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
).map(Ce);
const aW = We(vC);
var xC = new Array(3).concat(
"fff7bcfec44fd95f0e",
"ffffd4fed98efe9929cc4c02",
"ffffd4fed98efe9929d95f0e993404",
"ffffd4fee391fec44ffe9929d95f0e993404",
"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
).map(Ce);
const sW = We(xC);
var kC = new Array(3).concat(
"ffeda0feb24cf03b20",
"ffffb2fecc5cfd8d3ce31a1c",
"ffffb2fecc5cfd8d3cf03b20bd0026",
"ffffb2fed976feb24cfd8d3cf03b20bd0026",
"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
).map(Ce);
const oW = We(kC);
var wC = new Array(3).concat(
"deebf79ecae13182bd",
"eff3ffbdd7e76baed62171b5",
"eff3ffbdd7e76baed63182bd08519c",
"eff3ffc6dbef9ecae16baed63182bd08519c",
"eff3ffc6dbef9ecae16baed64292c62171b5084594",
"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
).map(Ce);
const lW = We(wC);
var TC = new Array(3).concat(
"e5f5e0a1d99b31a354",
"edf8e9bae4b374c476238b45",
"edf8e9bae4b374c47631a354006d2c",
"edf8e9c7e9c0a1d99b74c47631a354006d2c",
"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
).map(Ce);
const cW = We(TC);
var EC = new Array(3).concat(
"f0f0f0bdbdbd636363",
"f7f7f7cccccc969696525252",
"f7f7f7cccccc969696636363252525",
"f7f7f7d9d9d9bdbdbd969696636363252525",
"f7f7f7d9d9d9bdbdbd969696737373525252252525",
"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
).map(Ce);
const uW = We(EC);
var CC = new Array(3).concat(
"efedf5bcbddc756bb1",
"f2f0f7cbc9e29e9ac86a51a3",
"f2f0f7cbc9e29e9ac8756bb154278f",
"f2f0f7dadaebbcbddc9e9ac8756bb154278f",
"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
).map(Ce);
const hW = We(CC);
var SC = new Array(3).concat(
"fee0d2fc9272de2d26",
"fee5d9fcae91fb6a4acb181d",
"fee5d9fcae91fb6a4ade2d26a50f15",
"fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
).map(Ce);
const fW = We(SC);
var AC = new Array(3).concat(
"fee6cefdae6be6550d",
"feeddefdbe85fd8d3cd94701",
"feeddefdbe85fd8d3ce6550da63603",
"feeddefdd0a2fdae6bfd8d3ce6550da63603",
"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
).map(Ce);
const dW = We(AC);
function pW(t) {
return t = Math.max(0, Math.min(1, t)), "rgb(" + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) + ")";
}
const gW = _1(oi(300, 0.5, 0), oi(-240, 0.5, 1));
var yW = _1(oi(-100, 0.75, 0.35), oi(80, 1.5, 0.8)), mW = _1(oi(260, 0.75, 0.35), oi(80, 1.5, 0.8)), Hu = oi();
function bW(t) {
(t < 0 || t > 1) && (t -= Math.floor(t));
var e = Math.abs(t - 0.5);
return Hu.h = 360 * t - 100, Hu.s = 1.5 - 1.5 * e, Hu.l = 0.8 - 0.9 * e, Hu + "";
}
var Gu = Do(), _W = Math.PI / 3, vW = Math.PI * 2 / 3;
function xW(t) {
var e;
return t = (0.5 - t) * Math.PI, Gu.r = 255 * (e = Math.sin(t)) * e, Gu.g = 255 * (e = Math.sin(t + _W)) * e, Gu.b = 255 * (e = Math.sin(t + vW)) * e, Gu + "";
}
function kW(t) {
return t = Math.max(0, Math.min(1, t)), "rgb(" + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) + ")";
}
function O1(t) {
var e = t.length;
return function(r) {
return t[Math.max(0, Math.min(e - 1, Math.floor(r * e)))];
};
}
const wW = O1(Ce("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
var TW = O1(Ce("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")), EW = O1(Ce("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")), CW = O1(Ce("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
function ke(t) {
return function() {
return t;
};
}
const Rv = Math.abs, zr = Math.atan2, sa = Math.cos, SW = Math.max, Co = Math.min, fn = Math.sin, je = Math.sqrt, Yr = 1e-12, $a = Math.PI, kf = $a / 2, qa = 2 * $a;
function AW(t) {
return t > 1 ? 0 : t < -1 ? $a : Math.acos(t);
}
function Iv(t) {
return t >= 1 ? kf : t <= -1 ? -kf : Math.asin(t);
}
function MW(t) {
return t.innerRadius;
}
function LW(t) {
return t.outerRadius;
}
function RW(t) {
return t.startAngle;
}
function IW(t) {
return t.endAngle;
}
function NW(t) {
return t && t.padAngle;
}
function BW(t, e, r, n, i, a, s, o) {
var l = r - t, u = n - e, h = s - i, d = o - a, f = d * l - h * u;
if (!(f * f < Yr))
return f = (h * (e - a) - d * (t - i)) / f, [t + f * l, e + f * u];
}
function ju(t, e, r, n, i, a, s) {
var o = t - r, l = e - n, u = (s ? a : -a) / je(o * o + l * l), h = u * l, d = -u * o, f = t + h, p = e + d, m = r + h, _ = n + d, y = (f + m) / 2, b = (p + _) / 2, x = m - f, k = _ - p, T = x * x + k * k, C = i - a, M = f * _ - m * p, S = (k < 0 ? -1 : 1) * je(SW(0, C * C * T - M * M)), R = (M * k - x * S) / T, A = (-M * x - k * S) / T, L = (M * k + x * S) / T, v = (-M * x + k * S) / T, B = R - y, w = A - b, D = L - y, N = v - b;
return B * B + w * w > D * D + N * N && (R = L, A = v), {
cx: R,
cy: A,
x01: -h,
y01: -d,
x11: R * (i / C - 1),
y11: A * (i / C - 1)
};
}
function wf() {
var t = MW, e = LW, r = ke(0), n = null, i = RW, a = IW, s = NW, o = null;
function l() {
var u, h, d = +t.apply(this, arguments), f = +e.apply(this, arguments), p = i.apply(this, arguments) - kf, m = a.apply(this, arguments) - kf, _ = Rv(m - p), y = m > p;
if (o || (o = u = ts()), f < d && (h = f, f = d, d = h), !(f > Yr))
o.moveTo(0, 0);
else if (_ > qa - Yr)
o.moveTo(f * sa(p), f * fn(p)), o.arc(0, 0, f, p, m, !y), d > Yr && (o.moveTo(d * sa(m), d * fn(m)), o.arc(0, 0, d, m, p, y));
else {
var b = p, x = m, k = p, T = m, C = _, M = _, S = s.apply(this, arguments) / 2, R = S > Yr && (n ? +n.apply(this, arguments) : je(d * d + f * f)), A = Co(Rv(f - d) / 2, +r.apply(this, arguments)), L = A, v = A, B, w;
if (R > Yr) {
var D = Iv(R / d * fn(S)), N = Iv(R / f * fn(S));
(C -= D * 2) > Yr ? (D *= y ? 1 : -1, k += D, T -= D) : (C = 0, k = T = (p + m) / 2), (M -= N * 2) > Yr ? (N *= y ? 1 : -1, b += N, x -= N) : (M = 0, b = x = (p + m) / 2);
}
var z = f * sa(b), X = f * fn(b), ct = d * sa(T), J = d * fn(T);
if (A > Yr) {
var Y = f * sa(x), $ = f * fn(x), lt = d * sa(k), ut = d * fn(k), W;
if (_ < $a && (W = BW(z, X, lt, ut, Y, $, ct, J))) {
var tt = z - W[0], K = X - W[1], it = Y - W[0], Z = $ - W[1], V = 1 / fn(AW((tt * it + K * Z) / (je(tt * tt + K * K) * je(it * it + Z * Z))) / 2), Q = je(W[0] * W[0] + W[1] * W[1]);
L = Co(A, (d - Q) / (V - 1)), v = Co(A, (f - Q) / (V + 1));
}
}
M > Yr ? v > Yr ? (B = ju(lt, ut, z, X, f, v, y), w = ju(Y, $, ct, J, f, v, y), o.moveTo(B.cx + B.x01, B.cy + B.y01), v < A ? o.arc(B.cx, B.cy, v, zr(B.y01, B.x01), zr(w.y01, w.x01), !y) : (o.arc(B.cx, B.cy, v, zr(B.y01, B.x01), zr(B.y11, B.x11), !y), o.arc(0, 0, f, zr(B.cy + B.y11, B.cx + B.x11), zr(w.cy + w.y11, w.cx + w.x11), !y), o.arc(w.cx, w.cy, v, zr(w.y11, w.x11), zr(w.y01, w.x01), !y))) : (o.moveTo(z, X), o.arc(0, 0, f, b, x, !y)) : o.moveTo(z, X), !(d > Yr) || !(C > Yr) ? o.lineTo(ct, J) : L > Yr ? (B = ju(ct, J, Y, $, d, -L, y), w = ju(z, X, lt, ut, d, -L, y), o.lineTo(B.cx + B.x01, B.cy + B.y01), L < A ? o.arc(B.cx, B.cy, L, zr(B.y01, B.x01), zr(w.y01, w.x01), !y) : (o.arc(B.cx, B.cy, L, zr(B.y01, B.x01), zr(B.y11, B.x11), !y), o.arc(0, 0, d, zr(B.cy + B.y11, B.cx + B.x11), zr(w.cy + w.y11, w.cx + w.x11), y), o.arc(w.cx, w.cy, L, zr(w.y11, w.x11), zr(w.y01, w.x01), !y))) : o.arc(0, 0, d, T, k, y);
}
if (o.closePath(), u)
return o = null, u + "" || null;
}
return l.centroid = function() {
var u = (+t.apply(this, arguments) + +e.apply(this, arguments)) / 2, h = (+i.apply(this, arguments) + +a.apply(this, arguments)) / 2 - $a / 2;
return [sa(h) * u, fn(h) * u];
}, l.innerRadius = function(u) {
return arguments.length ? (t = typeof u == "function" ? u : ke(+u), l) : t;
}, l.outerRadius = function(u) {
return arguments.length ? (e = typeof u == "function" ? u : ke(+u), l) : e;
}, l.cornerRadius = function(u) {
return arguments.length ? (r = typeof u == "function" ? u : ke(+u), l) : r;
}, l.padRadius = function(u) {
return arguments.length ? (n = u == null ? null : typeof u == "function" ? u : ke(+u), l) : n;
}, l.startAngle = function(u) {
return arguments.length ? (i = typeof u == "function" ? u : ke(+u), l) : i;
}, l.endAngle = function(u) {
return arguments.length ? (a = typeof u == "function" ? u : ke(+u), l) : a;
}, l.padAngle = function(u) {
return arguments.length ? (s = typeof u == "function" ? u : ke(+u), l) : s;
}, l.context = function(u) {
return arguments.length ? (o = u == null ? null : u, l) : o;
}, l;
}
var DW = Array.prototype.slice;
function F1(t) {
return typeof t == "object" && "length" in t ? t : Array.from(t);
}
function MC(t) {
this._context = t;
}
MC.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
default:
this._context.lineTo(t, e);
break;
}
}
};
function bn(t) {
return new MC(t);
}
function J3(t) {
return t[0];
}
function t4(t) {
return t[1];
}
function ns(t, e) {
var r = ke(!0), n = null, i = bn, a = null;
t = typeof t == "function" ? t : t === void 0 ? J3 : ke(t), e = typeof e == "function" ? e : e === void 0 ? t4 : ke(e);
function s(o) {
var l, u = (o = F1(o)).length, h, d = !1, f;
for (n == null && (a = i(f = ts())), l = 0; l <= u; ++l)
!(l < u && r(h = o[l], l, o)) === d && ((d = !d) ? a.lineStart() : a.lineEnd()), d && a.point(+t(h, l, o), +e(h, l, o));
if (f)
return a = null, f + "" || null;
}
return s.x = function(o) {
return arguments.length ? (t = typeof o == "function" ? o : ke(+o), s) : t;
}, s.y = function(o) {
return arguments.length ? (e = typeof o == "function" ? o : ke(+o), s) : e;
}, s.defined = function(o) {
return arguments.length ? (r = typeof o == "function" ? o : ke(!!o), s) : r;
}, s.curve = function(o) {
return arguments.length ? (i = o, n != null && (a = i(n)), s) : i;
}, s.context = function(o) {
return arguments.length ? (o == null ? n = a = null : a = i(n = o), s) : n;
}, s;
}
function LC(t, e, r) {
var n = null, i = ke(!0), a = null, s = bn, o = null;
t = typeof t == "function" ? t : t === void 0 ? J3 : ke(+t), e = typeof e == "function" ? e : ke(e === void 0 ? 0 : +e), r = typeof r == "function" ? r : r === void 0 ? t4 : ke(+r);
function l(h) {
var d, f, p, m = (h = F1(h)).length, _, y = !1, b, x = new Array(m), k = new Array(m);
for (a == null && (o = s(b = ts())), d = 0; d <= m; ++d) {
if (!(d < m && i(_ = h[d], d, h)) === y)
if (y = !y)
f = d, o.areaStart(), o.lineStart();
else {
for (o.lineEnd(), o.lineStart(), p = d - 1; p >= f; --p)
o.point(x[p], k[p]);
o.lineEnd(), o.areaEnd();
}
y && (x[d] = +t(_, d, h), k[d] = +e(_, d, h), o.point(n ? +n(_, d, h) : x[d], r ? +r(_, d, h) : k[d]));
}
if (b)
return o = null, b + "" || null;
}
function u() {
return ns().defined(i).curve(s).context(a);
}
return l.x = function(h) {
return arguments.length ? (t = typeof h == "function" ? h : ke(+h), n = null, l) : t;
}, l.x0 = function(h) {
return arguments.length ? (t = typeof h == "function" ? h : ke(+h), l) : t;
}, l.x1 = function(h) {
return arguments.length ? (n = h == null ? null : typeof h == "function" ? h : ke(+h), l) : n;
}, l.y = function(h) {
return arguments.length ? (e = typeof h == "function" ? h : ke(+h), r = null, l) : e;
}, l.y0 = function(h) {
return arguments.length ? (e = typeof h == "function" ? h : ke(+h), l) : e;
}, l.y1 = function(h) {
return arguments.length ? (r = h == null ? null : typeof h == "function" ? h : ke(+h), l) : r;
}, l.lineX0 = l.lineY0 = function() {
return u().x(t).y(e);
}, l.lineY1 = function() {
return u().x(t).y(r);
}, l.lineX1 = function() {
return u().x(n).y(e);
}, l.defined = function(h) {
return arguments.length ? (i = typeof h == "function" ? h : ke(!!h), l) : i;
}, l.curve = function(h) {
return arguments.length ? (s = h, a != null && (o = s(a)), l) : s;
}, l.context = function(h) {
return arguments.length ? (h == null ? a = o = null : o = s(a = h), l) : a;
}, l;
}
function OW(t, e) {
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function FW(t) {
return t;
}
function RC() {
var t = FW, e = OW, r = null, n = ke(0), i = ke(qa), a = ke(0);
function s(o) {
var l, u = (o = F1(o)).length, h, d, f = 0, p = new Array(u), m = new Array(u), _ = +n.apply(this, arguments), y = Math.min(qa, Math.max(-qa, i.apply(this, arguments) - _)), b, x = Math.min(Math.abs(y) / u, a.apply(this, arguments)), k = x * (y < 0 ? -1 : 1), T;
for (l = 0; l < u; ++l)
(T = m[p[l] = l] = +t(o[l], l, o)) > 0 && (f += T);
for (e != null ? p.sort(function(C, M) {
return e(m[C], m[M]);
}) : r != null && p.sort(function(C, M) {
return r(o[C], o[M]);
}), l = 0, d = f ? (y - u * k) / f : 0; l < u; ++l, _ = b)
h = p[l], T = m[h], b = _ + (T > 0 ? T * d : 0) + k, m[h] = {
data: o[h],
index: l,
value: T,
startAngle: _,
endAngle: b,
padAngle: x
};
return m;
}
return s.value = function(o) {
return arguments.length ? (t = typeof o == "function" ? o : ke(+o), s) : t;
}, s.sortValues = function(o) {
return arguments.length ? (e = o, r = null, s) : e;
}, s.sort = function(o) {
return arguments.length ? (r = o, e = null, s) : r;
}, s.startAngle = function(o) {
return arguments.length ? (n = typeof o == "function" ? o : ke(+o), s) : n;
}, s.endAngle = function(o) {
return arguments.length ? (i = typeof o == "function" ? o : ke(+o), s) : i;
}, s.padAngle = function(o) {
return arguments.length ? (a = typeof o == "function" ? o : ke(+o), s) : a;
}, s;
}
var IC = e4(bn);
function NC(t) {
this._curve = t;
}
NC.prototype = {
areaStart: function() {
this._curve.areaStart();
},
areaEnd: function() {
this._curve.areaEnd();
},
lineStart: function() {
this._curve.lineStart();
},
lineEnd: function() {
this._curve.lineEnd();
},
point: function(t, e) {
this._curve.point(e * Math.sin(t), e * -Math.cos(t));
}
};
function e4(t) {
function e(r) {
return new NC(t(r));
}
return e._curve = t, e;
}
function jl(t) {
var e = t.curve;
return t.angle = t.x, delete t.x, t.radius = t.y, delete t.y, t.curve = function(r) {
return arguments.length ? e(e4(r)) : e()._curve;
}, t;
}
function Nv() {
return jl(ns().curve(IC));
}
function Bv() {
var t = LC().curve(IC), e = t.curve, r = t.lineX0, n = t.lineX1, i = t.lineY0, a = t.lineY1;
return t.angle = t.x, delete t.x, t.startAngle = t.x0, delete t.x0, t.endAngle = t.x1, delete t.x1, t.radius = t.y, delete t.y, t.innerRadius = t.y0, delete t.y0, t.outerRadius = t.y1, delete t.y1, t.lineStartAngle = function() {
return jl(r());
}, delete t.lineX0, t.lineEndAngle = function() {
return jl(n());
}, delete t.lineX1, t.lineInnerRadius = function() {
return jl(i());
}, delete t.lineY0, t.lineOuterRadius = function() {
return jl(a());
}, delete t.lineY1, t.curve = function(s) {
return arguments.length ? e(e4(s)) : e()._curve;
}, t;
}
function $l(t, e) {
return [(e = +e) * Math.cos(t -= Math.PI / 2), e * Math.sin(t)];
}
class BC {
constructor(e, r) {
this._context = e, this._x = r;
}
areaStart() {
this._line = 0;
}
areaEnd() {
this._line = NaN;
}
lineStart() {
this._point = 0;
}
lineEnd() {
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
}
point(e, r) {
switch (e = +e, r = +r, this._point) {
case 0: {
this._point = 1, this._line ? this._context.lineTo(e, r) : this._context.moveTo(e, r);
break;
}
case 1:
this._point = 2;
default: {
this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + e) / 2, this._y0, this._x0, r, e, r) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + r) / 2, e, this._y0, e, r);
break;
}
}
this._x0 = e, this._y0 = r;
}
}
class PW {
constructor(e) {
this._context = e;
}
lineStart() {
this._point = 0;
}
lineEnd() {
}
point(e, r) {
if (e = +e, r = +r, this._point++ === 0)
this._x0 = e, this._y0 = r;
else {
const n = $l(this._x0, this._y0), i = $l(this._x0, this._y0 = (this._y0 + r) / 2), a = $l(e, this._y0), s = $l(e, r);
this._context.moveTo(...n), this._context.bezierCurveTo(...i, ...a, ...s);
}
}
}
function DC(t) {
return new BC(t, !0);
}
function OC(t) {
return new BC(t, !1);
}
function qW(t) {
return new PW(t);
}
function VW(t) {
return t.source;
}
function zW(t) {
return t.target;
}
function P1(t) {
let e = VW, r = zW, n = J3, i = t4, a = null, s = null;
function o() {
let l;
const u = DW.call(arguments), h = e.apply(this, u), d = r.apply(this, u);
if (a == null && (s = t(l = ts())), s.lineStart(), u[0] = h, s.point(+n.apply(this, u), +i.apply(this, u)), u[0] = d, s.point(+n.apply(this, u), +i.apply(this, u)), s.lineEnd(), l)
return s = null, l + "" || null;
}
return o.source = function(l) {
return arguments.length ? (e = l, o) : e;
}, o.target = function(l) {
return arguments.length ? (r = l, o) : r;
}, o.x = function(l) {
return arguments.length ? (n = typeof l == "function" ? l : ke(+l), o) : n;
}, o.y = function(l) {
return arguments.length ? (i = typeof l == "function" ? l : ke(+l), o) : i;
}, o.context = function(l) {
return arguments.length ? (l == null ? a = s = null : s = t(a = l), o) : a;
}, o;
}
function YW() {
return P1(DC);
}
function UW() {
return P1(OC);
}
function WW() {
const t = P1(qW);
return t.angle = t.x, delete t.x, t.radius = t.y, delete t.y, t;
}
const HW = je(3), FC = {
draw(t, e) {
const r = je(e + Co(e / 28, 0.75)) * 0.59436, n = r / 2, i = n * HW;
t.moveTo(0, r), t.lineTo(0, -r), t.moveTo(-i, -n), t.lineTo(i, n), t.moveTo(-i, n), t.lineTo(i, -n);
}
}, q1 = {
draw(t, e) {
const r = je(e / $a);
t.moveTo(r, 0), t.arc(0, 0, r, 0, qa);
}
}, PC = {
draw(t, e) {
const r = je(e / 5) / 2;
t.moveTo(-3 * r, -r), t.lineTo(-r, -r), t.lineTo(-r, -3 * r), t.lineTo(r, -3 * r), t.lineTo(r, -r), t.lineTo(3 * r, -r), t.lineTo(3 * r, r), t.lineTo(r, r), t.lineTo(r, 3 * r), t.lineTo(-r, 3 * r), t.lineTo(-r, r), t.lineTo(-3 * r, r), t.closePath();
}
}, qC = je(1 / 3), GW = qC * 2, VC = {
draw(t, e) {
const r = je(e / GW), n = r * qC;
t.moveTo(0, -r), t.lineTo(n, 0), t.lineTo(0, r), t.lineTo(-n, 0), t.closePath();
}
}, zC = {
draw(t, e) {
const r = je(e) * 0.62625;
t.moveTo(0, -r), t.lineTo(r, 0), t.lineTo(0, r), t.lineTo(-r, 0), t.closePath();
}
}, YC = {
draw(t, e) {
const r = je(e - Co(e / 7, 2)) * 0.87559;
t.moveTo(-r, 0), t.lineTo(r, 0), t.moveTo(0, r), t.lineTo(0, -r);
}
}, UC = {
draw(t, e) {
const r = je(e), n = -r / 2;
t.rect(n, n, r, r);
}
}, WC = {
draw(t, e) {
const r = je(e) * 0.4431;
t.moveTo(r, r), t.lineTo(r, -r), t.lineTo(-r, -r), t.lineTo(-r, r), t.closePath();
}
}, jW = 0.8908130915292852, HC = fn($a / 10) / fn(7 * $a / 10), $W = fn(qa / 10) * HC, XW = -sa(qa / 10) * HC, GC = {
draw(t, e) {
const r = je(e * jW), n = $W * r, i = XW * r;
t.moveTo(0, -r), t.lineTo(n, i);
for (let a = 1; a < 5; ++a) {
const s = qa * a / 5, o = sa(s), l = fn(s);
t.lineTo(l * r, -o * r), t.lineTo(o * n - l * i, l * n + o * i);
}
t.closePath();
}
}, _d = je(3), jC = {
draw(t, e) {
const r = -je(e / (_d * 3));
t.moveTo(0, r * 2), t.lineTo(-_d * r, -r), t.lineTo(_d * r, -r), t.closePath();
}
}, KW = je(3), $C = {
draw(t, e) {
const r = je(e) * 0.6824, n = r / 2, i = r * KW / 2;
t.moveTo(0, -r), t.lineTo(i, n), t.lineTo(-i, n), t.closePath();
}
}, Rn = -0.5, In = je(3) / 2, nb = 1 / je(12), ZW = (nb / 2 + 1) * 3, XC = {
draw(t, e) {
const r = je(e / ZW), n = r / 2, i = r * nb, a = n, s = r * nb + r, o = -a, l = s;
t.moveTo(n, i), t.lineTo(a, s), t.lineTo(o, l), t.lineTo(Rn * n - In * i, In * n + Rn * i), t.lineTo(Rn * a - In * s, In * a + Rn * s), t.lineTo(Rn * o - In * l, In * o + Rn * l), t.lineTo(Rn * n + In * i, Rn * i - In * n), t.lineTo(Rn * a + In * s, Rn * s - In * a), t.lineTo(Rn * o + In * l, Rn * l - In * o), t.closePath();
}
}, KC = {
draw(t, e) {
const r = je(e - Co(e / 6, 1.7)) * 0.6189;
t.moveTo(-r, -r), t.lineTo(r, r), t.moveTo(-r, r), t.lineTo(r, -r);
}
}, Dv = [
q1,
PC,
VC,
UC,
GC,
jC,
XC
], QW = [
q1,
YC,
KC,
$C,
FC,
WC,
zC
];
function JW(t, e) {
let r = null;
t = typeof t == "function" ? t : ke(t || q1), e = typeof e == "function" ? e : ke(e === void 0 ? 64 : +e);
function n() {
let i;
if (r || (r = i = ts()), t.apply(this, arguments).draw(r, +e.apply(this, arguments)), i)
return r = null, i + "" || null;
}
return n.type = function(i) {
return arguments.length ? (t = typeof i == "function" ? i : ke(i), n) : t;
}, n.size = function(i) {
return arguments.length ? (e = typeof i == "function" ? i : ke(+i), n) : e;
}, n.context = function(i) {
return arguments.length ? (r = i == null ? null : i, n) : r;
}, n;
}
function Xa() {
}
function Tf(t, e, r) {
t._context.bezierCurveTo(
(2 * t._x0 + t._x1) / 3,
(2 * t._y0 + t._y1) / 3,
(t._x0 + 2 * t._x1) / 3,
(t._y0 + 2 * t._y1) / 3,
(t._x0 + 4 * t._x1 + e) / 6,
(t._y0 + 4 * t._y1 + r) / 6
);
}
function V1(t) {
this._context = t;
}
V1.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 3:
Tf(this, this._x1, this._y1);
case 2:
this._context.lineTo(this._x1, this._y1);
break;
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
default:
Tf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
}
};
function Ps(t) {
return new V1(t);
}
function ZC(t) {
this._context = t;
}
ZC.prototype = {
areaStart: Xa,
areaEnd: Xa,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x2, this._y2), this._context.closePath();
break;
}
case 2: {
this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
break;
}
case 3: {
this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4);
break;
}
}
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._x2 = t, this._y2 = e;
break;
case 1:
this._point = 2, this._x3 = t, this._y3 = e;
break;
case 2:
this._point = 3, this._x4 = t, this._y4 = e, this._context.moveTo((this._x0 + 4 * this._x1 + t) / 6, (this._y0 + 4 * this._y1 + e) / 6);
break;
default:
Tf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
}
};
function QC(t) {
return new ZC(t);
}
function JC(t) {
this._context = t;
}
JC.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
},
lineEnd: function() {
(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
var r = (this._x0 + 4 * this._x1 + t) / 6, n = (this._y0 + 4 * this._y1 + e) / 6;
this._line ? this._context.lineTo(r, n) : this._context.moveTo(r, n);
break;
case 3:
this._point = 4;
default:
Tf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
}
};
function tS(t) {
return new JC(t);
}
function eS(t, e) {
this._basis = new V1(t), this._beta = e;
}
eS.prototype = {
lineStart: function() {
this._x = [], this._y = [], this._basis.lineStart();
},
lineEnd: function() {
var t = this._x, e = this._y, r = t.length - 1;
if (r > 0)
for (var n = t[0], i = e[0], a = t[r] - n, s = e[r] - i, o = -1, l; ++o <= r; )
l = o / r, this._basis.point(
this._beta * t[o] + (1 - this._beta) * (n + l * a),
this._beta * e[o] + (1 - this._beta) * (i + l * s)
);
this._x = this._y = null, this._basis.lineEnd();
},
point: function(t, e) {
this._x.push(+t), this._y.push(+e);
}
};
const tH = function t(e) {
function r(n) {
return e === 1 ? new V1(n) : new eS(n, e);
}
return r.beta = function(n) {
return t(+n);
}, r;
}(0.85);
function Ef(t, e, r) {
t._context.bezierCurveTo(
t._x1 + t._k * (t._x2 - t._x0),
t._y1 + t._k * (t._y2 - t._y0),
t._x2 + t._k * (t._x1 - e),
t._y2 + t._k * (t._y1 - r),
t._x2,
t._y2
);
}
function r4(t, e) {
this._context = t, this._k = (1 - e) / 6;
}
r4.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2:
this._context.lineTo(this._x2, this._y2);
break;
case 3:
Ef(this, this._x1, this._y1);
break;
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2, this._x1 = t, this._y1 = e;
break;
case 2:
this._point = 3;
default:
Ef(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const eH = function t(e) {
function r(n) {
return new r4(n, e);
}
return r.tension = function(n) {
return t(+n);
}, r;
}(0);
function n4(t, e) {
this._context = t, this._k = (1 - e) / 6;
}
n4.prototype = {
areaStart: Xa,
areaEnd: Xa,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x3, this._y3), this._context.closePath();
break;
}
case 2: {
this._context.lineTo(this._x3, this._y3), this._context.closePath();
break;
}
case 3: {
this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
break;
}
}
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._x3 = t, this._y3 = e;
break;
case 1:
this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = e);
break;
case 2:
this._point = 3, this._x5 = t, this._y5 = e;
break;
default:
Ef(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const rH = function t(e) {
function r(n) {
return new n4(n, e);
}
return r.tension = function(n) {
return t(+n);
}, r;
}(0);
function i4(t, e) {
this._context = t, this._k = (1 - e) / 6;
}
i4.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
},
lineEnd: function() {
(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
break;
case 3:
this._point = 4;
default:
Ef(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const nH = function t(e) {
function r(n) {
return new i4(n, e);
}
return r.tension = function(n) {
return t(+n);
}, r;
}(0);
function a4(t, e, r) {
var n = t._x1, i = t._y1, a = t._x2, s = t._y2;
if (t._l01_a > Yr) {
var o = 2 * t._l01_2a + 3 * t._l01_a * t._l12_a + t._l12_2a, l = 3 * t._l01_a * (t._l01_a + t._l12_a);
n = (n * o - t._x0 * t._l12_2a + t._x2 * t._l01_2a) / l, i = (i * o - t._y0 * t._l12_2a + t._y2 * t._l01_2a) / l;
}
if (t._l23_a > Yr) {
var u = 2 * t._l23_2a + 3 * t._l23_a * t._l12_a + t._l12_2a, h = 3 * t._l23_a * (t._l23_a + t._l12_a);
a = (a * u + t._x1 * t._l23_2a - e * t._l12_2a) / h, s = (s * u + t._y1 * t._l23_2a - r * t._l12_2a) / h;
}
t._context.bezierCurveTo(n, i, a, s, t._x2, t._y2);
}
function rS(t, e) {
this._context = t, this._alpha = e;
}
rS.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2:
this._context.lineTo(this._x2, this._y2);
break;
case 3:
this.point(this._x2, this._y2);
break;
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
if (t = +t, e = +e, this._point) {
var r = this._x2 - t, n = this._y2 - e;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + n * n, this._alpha));
}
switch (this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
default:
a4(this, t, e);
break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const iH = function t(e) {
function r(n) {
return e ? new rS(n, e) : new r4(n, 0);
}
return r.alpha = function(n) {
return t(+n);
}, r;
}(0.5);
function nS(t, e) {
this._context = t, this._alpha = e;
}
nS.prototype = {
areaStart: Xa,
areaEnd: Xa,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x3, this._y3), this._context.closePath();
break;
}
case 2: {
this._context.lineTo(this._x3, this._y3), this._context.closePath();
break;
}
case 3: {
this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
break;
}
}
},
point: function(t, e) {
if (t = +t, e = +e, this._point) {
var r = this._x2 - t, n = this._y2 - e;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + n * n, this._alpha));
}
switch (this._point) {
case 0:
this._point = 1, this._x3 = t, this._y3 = e;
break;
case 1:
this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = e);
break;
case 2:
this._point = 3, this._x5 = t, this._y5 = e;
break;
default:
a4(this, t, e);
break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const aH = function t(e) {
function r(n) {
return e ? new nS(n, e) : new n4(n, 0);
}
return r.alpha = function(n) {
return t(+n);
}, r;
}(0.5);
function iS(t, e) {
this._context = t, this._alpha = e;
}
iS.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
},
lineEnd: function() {
(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
if (t = +t, e = +e, this._point) {
var r = this._x2 - t, n = this._y2 - e;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + n * n, this._alpha));
}
switch (this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
break;
case 3:
this._point = 4;
default:
a4(this, t, e);
break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const sH = function t(e) {
function r(n) {
return e ? new iS(n, e) : new i4(n, 0);
}
return r.alpha = function(n) {
return t(+n);
}, r;
}(0.5);
function aS(t) {
this._context = t;
}
aS.prototype = {
areaStart: Xa,
areaEnd: Xa,
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
this._point && this._context.closePath();
},
point: function(t, e) {
t = +t, e = +e, this._point ? this._context.lineTo(t, e) : (this._point = 1, this._context.moveTo(t, e));
}
};
function sS(t) {
return new aS(t);
}
function Ov(t) {
return t < 0 ? -1 : 1;
}
function Fv(t, e, r) {
var n = t._x1 - t._x0, i = e - t._x1, a = (t._y1 - t._y0) / (n || i < 0 && -0), s = (r - t._y1) / (i || n < 0 && -0), o = (a * i + s * n) / (n + i);
return (Ov(a) + Ov(s)) * Math.min(Math.abs(a), Math.abs(s), 0.5 * Math.abs(o)) || 0;
}
function Pv(t, e) {
var r = t._x1 - t._x0;
return r ? (3 * (t._y1 - t._y0) / r - e) / 2 : e;
}
function vd(t, e, r) {
var n = t._x0, i = t._y0, a = t._x1, s = t._y1, o = (a - n) / 3;
t._context.bezierCurveTo(n + o, i + o * e, a - o, s - o * r, a, s);
}
function Cf(t) {
this._context = t;
}
Cf.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2:
this._context.lineTo(this._x1, this._y1);
break;
case 3:
vd(this, this._t0, Pv(this, this._t0));
break;
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
var r = NaN;
if (t = +t, e = +e, !(t === this._x1 && e === this._y1)) {
switch (this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3, vd(this, Pv(this, r = Fv(this, t, e)), r);
break;
default:
vd(this, this._t0, r = Fv(this, t, e));
break;
}
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e, this._t0 = r;
}
}
};
function oS(t) {
this._context = new lS(t);
}
(oS.prototype = Object.create(Cf.prototype)).point = function(t, e) {
Cf.prototype.point.call(this, e, t);
};
function lS(t) {
this._context = t;
}
lS.prototype = {
moveTo: function(t, e) {
this._context.moveTo(e, t);
},
closePath: function() {
this._context.closePath();
},
lineTo: function(t, e) {
this._context.lineTo(e, t);
},
bezierCurveTo: function(t, e, r, n, i, a) {
this._context.bezierCurveTo(e, t, n, r, a, i);
}
};
function cS(t) {
return new Cf(t);
}
function uS(t) {
return new oS(t);
}
function hS(t) {
this._context = t;
}
hS.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = [], this._y = [];
},
lineEnd: function() {
var t = this._x, e = this._y, r = t.length;
if (r)
if (this._line ? this._context.lineTo(t[0], e[0]) : this._context.moveTo(t[0], e[0]), r === 2)
this._context.lineTo(t[1], e[1]);
else
for (var n = qv(t), i = qv(e), a = 0, s = 1; s < r; ++a, ++s)
this._context.bezierCurveTo(n[0][a], i[0][a], n[1][a], i[1][a], t[s], e[s]);
(this._line || this._line !== 0 && r === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
},
point: function(t, e) {
this._x.push(+t), this._y.push(+e);
}
};
function qv(t) {
var e, r = t.length - 1, n, i = new Array(r), a = new Array(r), s = new Array(r);
for (i[0] = 0, a[0] = 2, s[0] = t[0] + 2 * t[1], e = 1; e < r - 1; ++e)
i[e] = 1, a[e] = 4, s[e] = 4 * t[e] + 2 * t[e + 1];
for (i[r - 1] = 2, a[r - 1] = 7, s[r - 1] = 8 * t[r - 1] + t[r], e = 1; e < r; ++e)
n = i[e] / a[e - 1], a[e] -= n, s[e] -= n * s[e - 1];
for (i[r - 1] = s[r - 1] / a[r - 1], e = r - 2; e >= 0; --e)
i[e] = (s[e] - i[e + 1]) / a[e];
for (a[r - 1] = (t[r] + i[r - 1]) / 2, e = 0; e < r - 1; ++e)
a[e] = 2 * t[e + 1] - i[e + 1];
return [i, a];
}
function fS(t) {
return new hS(t);
}
function z1(t, e) {
this._context = t, this._t = e;
}
z1.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = this._y = NaN, this._point = 0;
},
lineEnd: function() {
0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
default: {
if (this._t <= 0)
this._context.lineTo(this._x, e), this._context.lineTo(t, e);
else {
var r = this._x * (1 - this._t) + t * this._t;
this._context.lineTo(r, this._y), this._context.lineTo(r, e);
}
break;
}
}
this._x = t, this._y = e;
}
};
function dS(t) {
return new z1(t, 0.5);
}
function pS(t) {
return new z1(t, 0);
}
function gS(t) {
return new z1(t, 1);
}
function Ho(t, e) {
if ((s = t.length) > 1)
for (var r = 1, n, i, a = t[e[0]], s, o = a.length; r < s; ++r)
for (i = a, a = t[e[r]], n = 0; n < o; ++n)
a[n][1] += a[n][0] = isNaN(i[n][1]) ? i[n][0] : i[n][1];
}
function Go(t) {
for (var e = t.length, r = new Array(e); --e >= 0; )
r[e] = e;
return r;
}
function oH(t, e) {
return t[e];
}
function lH(t) {
const e = [];
return e.key = t, e;
}
function cH() {
var t = ke([]), e = Go, r = Ho, n = oH;
function i(a) {
var s = Array.from(t.apply(this, arguments), lH), o, l = s.length, u = -1, h;
for (const d of a)
for (o = 0, ++u; o < l; ++o)
(s[o][u] = [0, +n(d, s[o].key, u, a)]).data = d;
for (o = 0, h = F1(e(s)); o < l; ++o)
s[h[o]].index = o;
return r(s, h), s;
}
return i.keys = function(a) {
return arguments.length ? (t = typeof a == "function" ? a : ke(Array.from(a)), i) : t;
}, i.value = function(a) {
return arguments.length ? (n = typeof a == "function" ? a : ke(+a), i) : n;
}, i.order = function(a) {
return arguments.length ? (e = a == null ? Go : typeof a == "function" ? a : ke(Array.from(a)), i) : e;
}, i.offset = function(a) {
return arguments.length ? (r = a == null ? Ho : a, i) : r;
}, i;
}
function uH(t, e) {
if ((n = t.length) > 0) {
for (var r, n, i = 0, a = t[0].length, s; i < a; ++i) {
for (s = r = 0; r < n; ++r)
s += t[r][i][1] || 0;
if (s)
for (r = 0; r < n; ++r)
t[r][i][1] /= s;
}
Ho(t, e);
}
}
function hH(t, e) {
if ((l = t.length) > 0)
for (var r, n = 0, i, a, s, o, l, u = t[e[0]].length; n < u; ++n)
for (s = o = 0, r = 0; r < l; ++r)
(a = (i = t[e[r]][n])[1] - i[0]) > 0 ? (i[0] = s, i[1] = s += a) : a < 0 ? (i[1] = o, i[0] = o += a) : (i[0] = 0, i[1] = a);
}
function fH(t, e) {
if ((i = t.length) > 0) {
for (var r = 0, n = t[e[0]], i, a = n.length; r < a; ++r) {
for (var s = 0, o = 0; s < i; ++s)
o += t[s][r][1] || 0;
n[r][1] += n[r][0] = -o / 2;
}
Ho(t, e);
}
}
function dH(t, e) {
if (!(!((s = t.length) > 0) || !((a = (i = t[e[0]]).length) > 0))) {
for (var r = 0, n = 1, i, a, s; n < a; ++n) {
for (var o = 0, l = 0, u = 0; o < s; ++o) {
for (var h = t[e[o]], d = h[n][1] || 0, f = h[n - 1][1] || 0, p = (d - f) / 2, m = 0; m < o; ++m) {
var _ = t[e[m]], y = _[n][1] || 0, b = _[n - 1][1] || 0;
p += y - b;
}
l += d, u += p * d;
}
i[n - 1][1] += i[n - 1][0] = r, l && (r -= u / l);
}
i[n - 1][1] += i[n - 1][0] = r, Ho(t, e);
}
}
function yS(t) {
var e = t.map(pH);
return Go(t).sort(function(r, n) {
return e[r] - e[n];
});
}
function pH(t) {
for (var e = -1, r = 0, n = t.length, i, a = -1 / 0; ++e < n; )
(i = +t[e][1]) > a && (a = i, r = e);
return r;
}
function mS(t) {
var e = t.map(bS);
return Go(t).sort(function(r, n) {
return e[r] - e[n];
});
}
function bS(t) {
for (var e = 0, r = -1, n = t.length, i; ++r < n; )
(i = +t[r][1]) && (e += i);
return e;
}
function gH(t) {
return mS(t).reverse();
}
function yH(t) {
var e = t.length, r, n, i = t.map(bS), a = yS(t), s = 0, o = 0, l = [], u = [];
for (r = 0; r < e; ++r)
n = a[r], s < o ? (s += i[n], l.push(n)) : (o += i[n], u.push(n));
return u.reverse().concat(l);
}
function mH(t) {
return Go(t).reverse();
}
const $u = (t) => () => t;
function bH(t, {
sourceEvent: e,
target: r,
transform: n,
dispatch: i
}) {
Object.defineProperties(this, {
type: { value: t, enumerable: !0, configurable: !0 },
sourceEvent: { value: e, enumerable: !0, configurable: !0 },
target: { value: r, enumerable: !0, configurable: !0 },
transform: { value: n, enumerable: !0, configurable: !0 },
_: { value: i }
});
}
function Mi(t, e, r) {
this.k = t, this.x = e, this.y = r;
}
Mi.prototype = {
constructor: Mi,
scale: function(t) {
return t === 1 ? this : new Mi(this.k * t, this.x, this.y);
},
translate: function(t, e) {
return t === 0 & e === 0 ? this : new Mi(this.k, this.x + this.k * t, this.y + this.k * e);
},
apply: function(t) {
return [t[0] * this.k + this.x, t[1] * this.k + this.y];
},
applyX: function(t) {
return t * this.k + this.x;
},
applyY: function(t) {
return t * this.k + this.y;
},
invert: function(t) {
return [(t[0] - this.x) / this.k, (t[1] - this.y) / this.k];
},
invertX: function(t) {
return (t - this.x) / this.k;
},
invertY: function(t) {
return (t - this.y) / this.k;
},
rescaleX: function(t) {
return t.copy().domain(t.range().map(this.invertX, this).map(t.invert, t));
},
rescaleY: function(t) {
return t.copy().domain(t.range().map(this.invertY, this).map(t.invert, t));
},
toString: function() {
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
}
};
var Y1 = new Mi(1, 0, 0);
_S.prototype = Mi.prototype;
function _S(t) {
for (; !t.__zoom; )
if (!(t = t.parentNode))
return Y1;
return t.__zoom;
}
function xd(t) {
t.stopImmediatePropagation();
}
function Al(t) {
t.preventDefault(), t.stopImmediatePropagation();
}
function _H(t) {
return (!t.ctrlKey || t.type === "wheel") && !t.button;
}
function vH() {
var t = this;
return t instanceof SVGElement ? (t = t.ownerSVGElement || t, t.hasAttribute("viewBox") ? (t = t.viewBox.baseVal, [[t.x, t.y], [t.x + t.width, t.y + t.height]]) : [[0, 0], [t.width.baseVal.value, t.height.baseVal.value]]) : [[0, 0], [t.clientWidth, t.clientHeight]];
}
function Vv() {
return this.__zoom || Y1;
}
function xH(t) {
return -t.deltaY * (t.deltaMode === 1 ? 0.05 : t.deltaMode ? 1 : 2e-3) * (t.ctrlKey ? 10 : 1);
}
function kH() {
return navigator.maxTouchPoints || "ontouchstart" in this;
}
function wH(t, e, r) {
var n = t.invertX(e[0][0]) - r[0][0], i = t.invertX(e[1][0]) - r[1][0], a = t.invertY(e[0][1]) - r[0][1], s = t.invertY(e[1][1]) - r[1][1];
return t.translate(
i > n ? (n + i) / 2 : Math.min(0, n) || Math.max(0, i),
s > a ? (a + s) / 2 : Math.min(0, a) || Math.max(0, s)
);
}
function TH() {
var t = _H, e = vH, r = wH, n = xH, i = kH, a = [0, 1 / 0], s = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], o = 250, l = I9, u = Ws("start", "zoom", "end"), h, d, f, p = 500, m = 150, _ = 0, y = 10;
function b(D) {
D.property("__zoom", Vv).on("wheel.zoom", R, { passive: !1 }).on("mousedown.zoom", A).on("dblclick.zoom", L).filter(i).on("touchstart.zoom", v).on("touchmove.zoom", B).on("touchend.zoom touchcancel.zoom", w).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
}
b.transform = function(D, N, z, X) {
var ct = D.selection ? D.selection() : D;
ct.property("__zoom", Vv), D !== ct ? C(D, N, z, X) : ct.interrupt().each(function() {
M(this, arguments).event(X).start().zoom(null, typeof N == "function" ? N.apply(this, arguments) : N).end();
});
}, b.scaleBy = function(D, N, z, X) {
b.scaleTo(D, function() {
var ct = this.__zoom.k, J = typeof N == "function" ? N.apply(this, arguments) : N;
return ct * J;
}, z, X);
}, b.scaleTo = function(D, N, z, X) {
b.transform(D, function() {
var ct = e.apply(this, arguments), J = this.__zoom, Y = z == null ? T(ct) : typeof z == "function" ? z.apply(this, arguments) : z, $ = J.invert(Y), lt = typeof N == "function" ? N.apply(this, arguments) : N;
return r(k(x(J, lt), Y, $), ct, s);
}, z, X);
}, b.translateBy = function(D, N, z, X) {
b.transform(D, function() {
return r(this.__zoom.translate(
typeof N == "function" ? N.apply(this, arguments) : N,
typeof z == "function" ? z.apply(this, arguments) : z
), e.apply(this, arguments), s);
}, null, X);
}, b.translateTo = function(D, N, z, X, ct) {
b.transform(D, function() {
var J = e.apply(this, arguments), Y = this.__zoom, $ = X == null ? T(J) : typeof X == "function" ? X.apply(this, arguments) : X;
return r(Y1.translate($[0], $[1]).scale(Y.k).translate(
typeof N == "function" ? -N.apply(this, arguments) : -N,
typeof z == "function" ? -z.apply(this, arguments) : -z
), J, s);
}, X, ct);
};
function x(D, N) {
return N = Math.max(a[0], Math.min(a[1], N)), N === D.k ? D : new Mi(N, D.x, D.y);
}
function k(D, N, z) {
var X = N[0] - z[0] * D.k, ct = N[1] - z[1] * D.k;
return X === D.x && ct === D.y ? D : new Mi(D.k, X, ct);
}
function T(D) {
return [(+D[0][0] + +D[1][0]) / 2, (+D[0][1] + +D[1][1]) / 2];
}
function C(D, N, z, X) {
D.on("start.zoom", function() {
M(this, arguments).event(X).start();
}).on("interrupt.zoom end.zoom", function() {
M(this, arguments).event(X).end();
}).tween("zoom", function() {
var ct = this, J = arguments, Y = M(ct, J).event(X), $ = e.apply(ct, J), lt = z == null ? T($) : typeof z == "function" ? z.apply(ct, J) : z, ut = Math.max($[1][0] - $[0][0], $[1][1] - $[0][1]), W = ct.__zoom, tt = typeof N == "function" ? N.apply(ct, J) : N, K = l(W.invert(lt).concat(ut / W.k), tt.invert(lt).concat(ut / tt.k));
return function(it) {
if (it === 1)
it = tt;
else {
var Z = K(it), V = ut / Z[2];
it = new Mi(V, lt[0] - Z[0] * V, lt[1] - Z[1] * V);
}
Y.zoom(null, it);
};
});
}
function M(D, N, z) {
return !z && D.__zooming || new S(D, N);
}
function S(D, N) {
this.that = D, this.args = N, this.active = 0, this.sourceEvent = null, this.extent = e.apply(D, N), this.taps = 0;
}
S.prototype = {
event: function(D) {
return D && (this.sourceEvent = D), this;
},
start: function() {
return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
},
zoom: function(D, N) {
return this.mouse && D !== "mouse" && (this.mouse[1] = N.invert(this.mouse[0])), this.touch0 && D !== "touch" && (this.touch0[1] = N.invert(this.touch0[0])), this.touch1 && D !== "touch" && (this.touch1[1] = N.invert(this.touch1[0])), this.that.__zoom = N, this.emit("zoom"), this;
},
end: function() {
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
},
emit: function(D) {
var N = St(this.that).datum();
u.call(
D,
this.that,
new bH(D, {
sourceEvent: this.sourceEvent,
target: b,
type: D,
transform: this.that.__zoom,
dispatch: u
}),
N
);
}
};
function R(D, ...N) {
if (!t.apply(this, arguments))
return;
var z = M(this, N).event(D), X = this.__zoom, ct = Math.max(a[0], Math.min(a[1], X.k * Math.pow(2, n.apply(this, arguments)))), J = Cn(D);
if (z.wheel)
(z.mouse[0][0] !== J[0] || z.mouse[0][1] !== J[1]) && (z.mouse[1] = X.invert(z.mouse[0] = J)), clearTimeout(z.wheel);
else {
if (X.k === ct)
return;
z.mouse = [J, X.invert(J)], Es(this), z.start();
}
Al(D), z.wheel = setTimeout(Y, m), z.zoom("mouse", r(k(x(X, ct), z.mouse[0], z.mouse[1]), z.extent, s));
function Y() {
z.wheel = null, z.end();
}
}
function A(D, ...N) {
if (f || !t.apply(this, arguments))
return;
var z = D.currentTarget, X = M(this, N, !0).event(D), ct = St(D.view).on("mousemove.zoom", lt, !0).on("mouseup.zoom", ut, !0), J = Cn(D, z), Y = D.clientX, $ = D.clientY;
d1(D.view), xd(D), X.mouse = [J, this.__zoom.invert(J)], Es(this), X.start();
function lt(W) {
if (Al(W), !X.moved) {
var tt = W.clientX - Y, K = W.clientY - $;
X.moved = tt * tt + K * K > _;
}
X.event(W).zoom("mouse", r(k(X.that.__zoom, X.mouse[0] = Cn(W, z), X.mouse[1]), X.extent, s));
}
function ut(W) {
ct.on("mousemove.zoom mouseup.zoom", null), p1(W.view, X.moved), Al(W), X.event(W).end();
}
}
function L(D, ...N) {
if (!!t.apply(this, arguments)) {
var z = this.__zoom, X = Cn(D.changedTouches ? D.changedTouches[0] : D, this), ct = z.invert(X), J = z.k * (D.shiftKey ? 0.5 : 2), Y = r(k(x(z, J), X, ct), e.apply(this, N), s);
Al(D), o > 0 ? St(this).transition().duration(o).call(C, Y, X, D) : St(this).call(b.transform, Y, X, D);
}
}
function v(D, ...N) {
if (!!t.apply(this, arguments)) {
var z = D.touches, X = z.length, ct = M(this, N, D.changedTouches.length === X).event(D), J, Y, $, lt;
for (xd(D), Y = 0; Y < X; ++Y)
$ = z[Y], lt = Cn($, this), lt = [lt, this.__zoom.invert(lt), $.identifier], ct.touch0 ? !ct.touch1 && ct.touch0[2] !== lt[2] && (ct.touch1 = lt, ct.taps = 0) : (ct.touch0 = lt, J = !0, ct.taps = 1 + !!h);
h && (h = clearTimeout(h)), J && (ct.taps < 2 && (d = lt[0], h = setTimeout(function() {
h = null;
}, p)), Es(this), ct.start());
}
}
function B(D, ...N) {
if (!!this.__zooming) {
var z = M(this, N).event(D), X = D.changedTouches, ct = X.length, J, Y, $, lt;
for (Al(D), J = 0; J < ct; ++J)
Y = X[J], $ = Cn(Y, this), z.touch0 && z.touch0[2] === Y.identifier ? z.touch0[0] = $ : z.touch1 && z.touch1[2] === Y.identifier && (z.touch1[0] = $);
if (Y = z.that.__zoom, z.touch1) {
var ut = z.touch0[0], W = z.touch0[1], tt = z.touch1[0], K = z.touch1[1], it = (it = tt[0] - ut[0]) * it + (it = tt[1] - ut[1]) * it, Z = (Z = K[0] - W[0]) * Z + (Z = K[1] - W[1]) * Z;
Y = x(Y, Math.sqrt(it / Z)), $ = [(ut[0] + tt[0]) / 2, (ut[1] + tt[1]) / 2], lt = [(W[0] + K[0]) / 2, (W[1] + K[1]) / 2];
} else if (z.touch0)
$ = z.touch0[0], lt = z.touch0[1];
else
return;
z.zoom("touch", r(k(Y, $, lt), z.extent, s));
}
}
function w(D, ...N) {
if (!!this.__zooming) {
var z = M(this, N).event(D), X = D.changedTouches, ct = X.length, J, Y;
for (xd(D), f && clearTimeout(f), f = setTimeout(function() {
f = null;
}, p), J = 0; J < ct; ++J)
Y = X[J], z.touch0 && z.touch0[2] === Y.identifier ? delete z.touch0 : z.touch1 && z.touch1[2] === Y.identifier && delete z.touch1;
if (z.touch1 && !z.touch0 && (z.touch0 = z.touch1, delete z.touch1), z.touch0)
z.touch0[1] = this.__zoom.invert(z.touch0[0]);
else if (z.end(), z.taps === 2 && (Y = Cn(Y, this), Math.hypot(d[0] - Y[0], d[1] - Y[1]) < y)) {
var $ = St(this).on("dblclick.zoom");
$ && $.apply(this, arguments);
}
}
}
return b.wheelDelta = function(D) {
return arguments.length ? (n = typeof D == "function" ? D : $u(+D), b) : n;
}, b.filter = function(D) {
return arguments.length ? (t = typeof D == "function" ? D : $u(!!D), b) : t;
}, b.touchable = function(D) {
return arguments.length ? (i = typeof D == "function" ? D : $u(!!D), b) : i;
}, b.extent = function(D) {
return arguments.length ? (e = typeof D == "function" ? D : $u([[+D[0][0], +D[0][1]], [+D[1][0], +D[1][1]]]), b) : e;
}, b.scaleExtent = function(D) {
return arguments.length ? (a[0] = +D[0], a[1] = +D[1], b) : [a[0], a[1]];
}, b.translateExtent = function(D) {
return arguments.length ? (s[0][0] = +D[0][0], s[1][0] = +D[1][0], s[0][1] = +D[0][1], s[1][1] = +D[1][1], b) : [[s[0][0], s[0][1]], [s[1][0], s[1][1]]];
}, b.constrain = function(D) {
return arguments.length ? (r = D, b) : r;
}, b.duration = function(D) {
return arguments.length ? (o = +D, b) : o;
}, b.interpolate = function(D) {
return arguments.length ? (l = D, b) : l;
}, b.on = function() {
var D = u.on.apply(u, arguments);
return D === u ? b : D;
}, b.clickDistance = function(D) {
return arguments.length ? (_ = (D = +D) * D, b) : Math.sqrt(_);
}, b.tapDistance = function(D) {
return arguments.length ? (y = +D, b) : y;
}, b;
}
const EH = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
bisect: Us,
bisectRight: Ew,
bisectLeft: CR,
bisectCenter: SR,
ascending: tr,
bisector: s1,
blur: AR,
blur2: Cw,
blurImage: MR,
count: o1,
cross: OR,
cumsum: FR,
descending: xw,
deviation: Mw,
extent: Zl,
Adder: wr,
fsum: PR,
fcumsum: qR,
group: Nw,
flatGroup: VR,
flatRollup: zR,
groups: Bw,
index: YR,
indexes: UR,
rollup: Ow,
rollups: Fw,
groupSort: WR,
bin: C_,
histogram: C_,
thresholdFreedmanDiaconis: jR,
thresholdScott: $R,
thresholdSturges: Vb,
max: No,
maxIndex: zb,
mean: XR,
median: KR,
medianIndex: ZR,
merge: Ub,
min: pc,
minIndex: Yb,
mode: JR,
nice: Vw,
pairs: tI,
permute: qw,
quantile: gc,
quantileIndex: Uw,
quantileSorted: Yw,
quickselect: l1,
range: Da,
rank: rI,
least: nI,
leastIndex: Ww,
greatest: zw,
greatestIndex: iI,
scan: aI,
shuffle: sI,
shuffler: Hw,
sum: oI,
ticks: As,
tickIncrement: Io,
tickStep: dc,
transpose: Gw,
variance: Aw,
zip: cI,
every: uI,
some: hI,
filter: fI,
map: dI,
reduce: pI,
reverse: gI,
sort: am,
difference: yI,
disjoint: mI,
intersection: bI,
subset: vI,
superset: jw,
union: xI,
InternMap: fc,
InternSet: Ss,
axisTop: $w,
axisRight: AI,
axisBottom: Xw,
axisLeft: MI,
brush: XO,
brushX: jO,
brushY: $O,
brushSelection: GO,
chord: ZO,
chordTranspose: QO,
chordDirected: JO,
ribbon: lF,
ribbonArrow: cF,
color: Wa,
rgb: Do,
hsl: zh,
lab: Uh,
hcl: Wh,
lch: RB,
gray: LB,
cubehelix: oi,
contours: Sm,
contourDensity: kF,
Delaunay: l3,
Voronoi: Z9,
dispatch: Ws,
drag: bB,
dragDisable: d1,
dragEnable: p1,
dsvFormat: w1,
csvParse: J9,
csvParseRows: HF,
csvFormat: GF,
csvFormatBody: jF,
csvFormatRows: $F,
csvFormatRow: XF,
csvFormatValue: KF,
tsvParse: tT,
tsvParseRows: ZF,
tsvFormat: QF,
tsvFormatBody: JF,
tsvFormatRows: tP,
tsvFormatRow: eP,
tsvFormatValue: rP,
autoType: nP,
easeLinear: aO,
easeQuad: H_,
easeQuadIn: sO,
easeQuadOut: oO,
easeQuadInOut: H_,
easeCubic: xm,
easeCubicIn: lO,
easeCubicOut: cO,
easeCubicInOut: xm,
easePoly: G_,
easePolyIn: uO,
easePolyOut: hO,
easePolyInOut: G_,
easeSin: j_,
easeSinIn: fO,
easeSinOut: dO,
easeSinInOut: j_,
easeExp: $_,
easeExpIn: pO,
easeExpOut: gO,
easeExpInOut: $_,
easeCircle: X_,
easeCircleIn: yO,
easeCircleOut: mO,
easeCircleInOut: X_,
easeBounce: kc,
easeBounceIn: CO,
easeBounceOut: kc,
easeBounceInOut: SO,
easeBack: K_,
easeBackIn: AO,
easeBackOut: MO,
easeBackInOut: K_,
easeElastic: Z_,
easeElasticIn: LO,
easeElasticOut: Z_,
easeElasticInOut: RO,
blob: sP,
buffer: lP,
dsv: uP,
csv: hP,
tsv: fP,
image: dP,
json: gP,
text: T1,
xml: yP,
html: mP,
svg: bP,
forceCenter: _P,
forceCollide: PP,
forceLink: VP,
forceManyBody: XP,
forceRadial: KP,
forceSimulation: $P,
forceX: ZP,
forceY: QP,
formatDefaultLocale: aT,
get format() {
return S1;
},
get formatPrefix() {
return h3;
},
formatLocale: iT,
formatSpecifier: qo,
FormatSpecifier: C1,
precisionFixed: sT,
precisionPrefix: oT,
precisionRound: lT,
geoArea: lq,
geoBounds: fq,
geoCentroid: bq,
geoCircle: _q,
geoClipAntimeridian: Vm,
geoClipCircle: ST,
geoClipExtent: Cq,
geoClipRectangle: A1,
geoContains: Nq,
geoDistance: uf,
geoGraticule: LT,
geoGraticule10: Bq,
geoInterpolate: Dq,
geoLength: AT,
geoPath: jq,
geoAlbers: UT,
geoAlbersUsa: nV,
geoAzimuthalEqualArea: iV,
geoAzimuthalEqualAreaRaw: x3,
geoAzimuthalEquidistant: aV,
geoAzimuthalEquidistantRaw: k3,
geoConicConformal: oV,
geoConicConformalRaw: GT,
geoConicEqualArea: bf,
geoConicEqualAreaRaw: YT,
geoConicEquidistant: cV,
geoConicEquidistantRaw: jT,
geoEqualEarth: hV,
geoEqualEarthRaw: w3,
geoEquirectangular: lV,
geoEquirectangularRaw: Sc,
geoGnomonic: fV,
geoGnomonicRaw: T3,
geoIdentity: dV,
geoProjection: Yi,
geoProjectionMutator: _3,
geoMercator: sV,
geoMercatorRaw: eu,
geoNaturalEarth1: pV,
geoNaturalEarth1Raw: E3,
geoOrthographic: gV,
geoOrthographicRaw: C3,
geoStereographic: yV,
geoStereographicRaw: S3,
geoTransverseMercator: mV,
geoTransverseMercatorRaw: A3,
geoRotation: xT,
geoStream: Zn,
geoTransform: $q,
cluster: EV,
hierarchy: M3,
Node: Bs,
pack: ez,
packSiblings: JV,
packEnclose: XV,
partition: rz,
stratify: sz,
tree: dz,
treemap: pz,
treemapBinary: gz,
treemapDice: ru,
treemapSlice: L1,
treemapSliceDice: yz,
treemapSquarify: nE,
treemapResquarify: mz,
interpolate: Ja,
interpolateArray: OB,
interpolateBasis: _9,
interpolateBasisClosed: v9,
interpolateDate: C9,
interpolateDiscrete: qB,
interpolateHue: VB,
interpolateNumber: Dn,
interpolateNumberArray: Qb,
interpolateObject: S9,
interpolateRound: b1,
interpolateString: Jb,
interpolateTransformCss: L9,
interpolateTransformSvg: R9,
interpolateZoom: I9,
interpolateRgb: _c,
interpolateRgbBasis: w9,
interpolateRgbBasisClosed: DB,
interpolateHsl: GB,
interpolateHslLong: jB,
interpolateLab: $B,
interpolateHcl: D9,
interpolateHclLong: XB,
interpolateCubehelix: KB,
interpolateCubehelixLong: _1,
piecewise: F9,
quantize: ZB,
path: ts,
polygonArea: bz,
polygonCentroid: _z,
polygonHull: kz,
polygonContains: wz,
polygonLength: Tz,
quadtree: E1,
randomUniform: Ez,
randomInt: Cz,
randomNormal: R3,
randomLogNormal: Sz,
randomBates: Az,
randomIrwinHall: iE,
randomExponential: Mz,
randomPareto: Lz,
randomBernoulli: Rz,
randomGeometric: aE,
randomBinomial: oE,
randomGamma: I3,
randomBeta: sE,
randomWeibull: Iz,
randomCauchy: Nz,
randomLogistic: Bz,
randomPoisson: Dz,
randomLcg: Pz,
scaleBand: N3,
scalePoint: qz,
scaleIdentity: uE,
scaleLinear: D3,
scaleLog: fE,
scaleSymlog: dE,
scaleOrdinal: R1,
scaleImplicit: tb,
scalePow: q3,
scaleSqrt: Zz,
scaleRadial: pE,
scaleQuantile: gE,
scaleQuantize: yE,
scaleThreshold: mE,
scaleTime: $E,
scaleUtc: AU,
scaleSequential: XE,
scaleSequentialLog: KE,
scaleSequentialPow: Z3,
scaleSequentialSqrt: MU,
scaleSequentialSymlog: ZE,
scaleSequentialQuantile: QE,
scaleDiverging: JE,
scaleDivergingLog: tC,
scaleDivergingPow: Q3,
scaleDivergingSqrt: LU,
scaleDivergingSymlog: eC,
tickFormat: cE,
schemeCategory10: RU,
schemeAccent: IU,
schemeDark2: NU,
schemePaired: BU,
schemePastel1: DU,
schemePastel2: OU,
schemeSet1: FU,
schemeSet2: PU,
schemeSet3: qU,
schemeTableau10: VU,
interpolateBrBG: zU,
schemeBrBG: rC,
interpolatePRGn: YU,
schemePRGn: nC,
interpolatePiYG: UU,
schemePiYG: iC,
interpolatePuOr: WU,
schemePuOr: aC,
interpolateRdBu: HU,
schemeRdBu: sC,
interpolateRdGy: GU,
schemeRdGy: oC,
interpolateRdYlBu: jU,
schemeRdYlBu: lC,
interpolateRdYlGn: $U,
schemeRdYlGn: cC,
interpolateSpectral: XU,
schemeSpectral: uC,
interpolateBuGn: KU,
schemeBuGn: hC,
interpolateBuPu: ZU,
schemeBuPu: fC,
interpolateGnBu: QU,
schemeGnBu: dC,
interpolateOrRd: JU,
schemeOrRd: pC,
interpolatePuBuGn: tW,
schemePuBuGn: gC,
interpolatePuBu: eW,
schemePuBu: yC,
interpolatePuRd: rW,
schemePuRd: mC,
interpolateRdPu: nW,
schemeRdPu: bC,
interpolateYlGnBu: iW,
schemeYlGnBu: _C,
interpolateYlGn: aW,
schemeYlGn: vC,
interpolateYlOrBr: sW,
schemeYlOrBr: xC,
interpolateYlOrRd: oW,
schemeYlOrRd: kC,
interpolateBlues: lW,
schemeBlues: wC,
interpolateGreens: cW,
schemeGreens: TC,
interpolateGreys: uW,
schemeGreys: EC,
interpolatePurples: hW,
schemePurples: CC,
interpolateReds: fW,
schemeReds: SC,
interpolateOranges: dW,
schemeOranges: AC,
interpolateCividis: pW,
interpolateCubehelixDefault: gW,
interpolateRainbow: bW,
interpolateWarm: yW,
interpolateCool: mW,
interpolateSinebow: xW,
interpolateTurbo: kW,
interpolateViridis: wW,
interpolateMagma: TW,
interpolateInferno: EW,
interpolatePlasma: CW,
create: uB,
creator: u1,
local: i9,
matcher: Hb,
namespace: $c,
namespaces: hm,
pointer: Cn,
pointers: fB,
select: St,
selectAll: f1,
selection: Hs,
selector: h1,
selectorAll: Wb,
style: Ms,
window: Gb,
arc: wf,
area: LC,
line: ns,
pie: RC,
areaRadial: Bv,
radialArea: Bv,
lineRadial: Nv,
radialLine: Nv,
pointRadial: $l,
link: P1,
linkHorizontal: YW,
linkVertical: UW,
linkRadial: WW,
symbol: JW,
symbolsStroke: QW,
symbolsFill: Dv,
symbols: Dv,
symbolAsterisk: FC,
symbolCircle: q1,
symbolCross: PC,
symbolDiamond: VC,
symbolDiamond2: zC,
symbolPlus: YC,
symbolSquare: UC,
symbolSquare2: WC,
symbolStar: GC,
symbolTriangle: jC,
symbolTriangle2: $C,
symbolWye: XC,
symbolX: KC,
curveBasisClosed: QC,
curveBasisOpen: tS,
curveBasis: Ps,
curveBumpX: DC,
curveBumpY: OC,
curveBundle: tH,
curveCardinalClosed: rH,
curveCardinalOpen: nH,
curveCardinal: eH,
curveCatmullRomClosed: aH,
curveCatmullRomOpen: sH,
curveCatmullRom: iH,
curveLinearClosed: sS,
curveLinear: bn,
curveMonotoneX: cS,
curveMonotoneY: uS,
curveNatural: fS,
curveStep: dS,
curveStepAfter: gS,
curveStepBefore: pS,
stack: cH,
stackOffsetExpand: uH,
stackOffsetDiverging: hH,
stackOffsetNone: Ho,
stackOffsetSilhouette: fH,
stackOffsetWiggle: dH,
stackOrderAppearance: yS,
stackOrderAscending: mS,
stackOrderDescending: gH,
stackOrderInsideOut: yH,
stackOrderNone: Go,
stackOrderReverse: mH,
timeInterval: Tr,
timeMillisecond: rb,
timeMilliseconds: yv,
utcMillisecond: rb,
utcMilliseconds: yv,
timeSecond: Fa,
timeSeconds: bv,
utcSecond: Fa,
utcSeconds: bv,
timeMinute: z3,
timeMinutes: Jz,
timeHour: Y3,
timeHours: tY,
timeDay: iu,
timeDays: eY,
timeWeek: Uo,
timeWeeks: _v,
timeSunday: Uo,
timeSundays: _v,
timeMonday: Ac,
timeMondays: rY,
timeTuesday: kE,
timeTuesdays: nY,
timeWednesday: wE,
timeWednesdays: iY,
timeThursday: Os,
timeThursdays: aY,
timeFriday: TE,
timeFridays: sY,
timeSaturday: EE,
timeSaturdays: oY,
timeMonth: U3,
timeMonths: lY,
timeYear: Ga,
timeYears: cY,
utcMinute: H3,
utcMinutes: uY,
utcHour: G3,
utcHours: hY,
utcDay: au,
utcDays: fY,
utcWeek: Wo,
utcWeeks: vv,
utcSunday: Wo,
utcSundays: vv,
utcMonday: Mc,
utcMondays: dY,
utcTuesday: LE,
utcTuesdays: pY,
utcWednesday: RE,
utcWednesdays: gY,
utcThursday: Fs,
utcThursdays: yY,
utcFriday: IE,
utcFridays: mY,
utcSaturday: NE,
utcSaturdays: bY,
utcMonth: j3,
utcMonths: _Y,
utcYear: ja,
utcYears: vY,
utcTicks: OE,
utcTickInterval: FE,
timeTicks: PE,
timeTickInterval: qE,
timeFormatDefaultLocale: GE,
get timeFormat() {
return Lc;
},
get timeParse() {
return HE;
},
get utcFormat() {
return N1;
},
get utcParse() {
return X3;
},
timeFormatLocale: VE,
isoFormat: kU,
isoParse: EU,
now: Kc,
timer: x1,
timerFlush: V9,
timeout: mm,
interval: eD,
transition: W9,
active: OO,
interrupt: Es,
zoom: TH,
zoomTransform: _S,
zoomIdentity: Y1,
ZoomTransform: Mi
}, Symbol.toStringTag, { value: "Module" }));
/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */
function Na(t) {
return Na = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
return typeof e;
} : function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, Na(t);
}
function ib(t, e) {
return ib = Object.setPrototypeOf || function(n, i) {
return n.__proto__ = i, n;
}, ib(t, e);
}
function CH() {
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
return !1;
if (typeof Proxy == "function")
return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
})), !0;
} catch {
return !1;
}
}
function wh(t, e, r) {
return CH() ? wh = Reflect.construct : wh = function(i, a, s) {
var o = [null];
o.push.apply(o, a);
var l = Function.bind.apply(i, o), u = new l();
return s && ib(u, s.prototype), u;
}, wh.apply(null, arguments);
}
function Xn(t) {
return SH(t) || AH(t) || MH(t) || LH();
}
function SH(t) {
if (Array.isArray(t))
return ab(t);
}
function AH(t) {
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null)
return Array.from(t);
}
function MH(t, e) {
if (!!t) {
if (typeof t == "string")
return ab(t, e);
var r = Object.prototype.toString.call(t).slice(8, -1);
if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set")
return Array.from(t);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
return ab(t, e);
}
}
function ab(t, e) {
(e == null || e > t.length) && (e = t.length);
for (var r = 0, n = new Array(e); r < e; r++)
n[r] = t[r];
return n;
}
function LH() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var RH = Object.hasOwnProperty, zv = Object.setPrototypeOf, IH = Object.isFrozen, NH = Object.getPrototypeOf, BH = Object.getOwnPropertyDescriptor, cn = Object.freeze, Fi = Object.seal, DH = Object.create, vS = typeof Reflect < "u" && Reflect, Sf = vS.apply, sb = vS.construct;
Sf || (Sf = function(e, r, n) {
return e.apply(r, n);
});
cn || (cn = function(e) {
return e;
});
Fi || (Fi = function(e) {
return e;
});
sb || (sb = function(e, r) {
return wh(e, Xn(r));
});
var OH = li(Array.prototype.forEach), Yv = li(Array.prototype.pop), Ml = li(Array.prototype.push), Th = li(String.prototype.toLowerCase), FH = li(String.prototype.match), Sa = li(String.prototype.replace), PH = li(String.prototype.indexOf), qH = li(String.prototype.trim), Xr = li(RegExp.prototype.test), kd = VH(TypeError);
function li(t) {
return function(e) {
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
n[i - 1] = arguments[i];
return Sf(t, e, n);
};
}
function VH(t) {
return function() {
for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++)
r[n] = arguments[n];
return sb(t, r);
};
}
function Me(t, e, r) {
r = r || Th, zv && zv(t, null);
for (var n = e.length; n--; ) {
var i = e[n];
if (typeof i == "string") {
var a = r(i);
a !== i && (IH(e) || (e[n] = a), i = a);
}
t[i] = !0;
}
return t;
}
function ps(t) {
var e = DH(null), r;
for (r in t)
Sf(RH, t, [r]) && (e[r] = t[r]);
return e;
}
function Xu(t, e) {
for (; t !== null; ) {
var r = BH(t, e);
if (r) {
if (r.get)
return li(r.get);
if (typeof r.value == "function")
return li(r.value);
}
t = NH(t);
}
function n(i) {
return console.warn("fallback value for", i), null;
}
return n;
}
var Uv = cn(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), wd = cn(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Td = cn(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), zH = cn(["animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ed = cn(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover"]), YH = cn(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Wv = cn(["#text"]), Hv = cn(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), Cd = cn(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Gv = cn(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ku = cn(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), UH = Fi(/\{\{[\w\W]*|[\w\W]*\}\}/gm), WH = Fi(/<%[\w\W]*|[\w\W]*%>/gm), HH = Fi(/^data-[\-\w.\u00B7-\uFFFF]/), GH = Fi(/^aria-[\-\w]+$/), jH = Fi(
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
), $H = Fi(/^(?:\w+script|data):/i), XH = Fi(
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
), KH = Fi(/^html$/i), ZH = function() {
return typeof window > "u" ? null : window;
}, QH = function(e, r) {
if (Na(e) !== "object" || typeof e.createPolicy != "function")
return null;
var n = null, i = "data-tt-policy-suffix";
r.currentScript && r.currentScript.hasAttribute(i) && (n = r.currentScript.getAttribute(i));
var a = "dompurify" + (n ? "#" + n : "");
try {
return e.createPolicy(a, {
createHTML: function(o) {
return o;
},
createScriptURL: function(o) {
return o;
}
});
} catch {
return console.warn("TrustedTypes policy " + a + " could not be created."), null;
}
};
function xS() {
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ZH(), e = function(st) {
return xS(st);
};
if (e.version = "2.4.0", e.removed = [], !t || !t.document || t.document.nodeType !== 9)
return e.isSupported = !1, e;
var r = t.document, n = t.document, i = t.DocumentFragment, a = t.HTMLTemplateElement, s = t.Node, o = t.Element, l = t.NodeFilter, u = t.NamedNodeMap, h = u === void 0 ? t.NamedNodeMap || t.MozNamedAttrMap : u, d = t.HTMLFormElement, f = t.DOMParser, p = t.trustedTypes, m = o.prototype, _ = Xu(m, "cloneNode"), y = Xu(m, "nextSibling"), b = Xu(m, "childNodes"), x = Xu(m, "parentNode");
if (typeof a == "function") {
var k = n.createElement("template");
k.content && k.content.ownerDocument && (n = k.content.ownerDocument);
}
var T = QH(p, r), C = T ? T.createHTML("") : "", M = n, S = M.implementation, R = M.createNodeIterator, A = M.createDocumentFragment, L = M.getElementsByTagName, v = r.importNode, B = {};
try {
B = ps(n).documentMode ? n.documentMode : {};
} catch {
}
var w = {};
e.isSupported = typeof x == "function" && S && typeof S.createHTMLDocument < "u" && B !== 9;
var D = UH, N = WH, z = HH, X = GH, ct = $H, J = XH, Y = jH, $ = null, lt = Me({}, [].concat(Xn(Uv), Xn(wd), Xn(Td), Xn(Ed), Xn(Wv))), ut = null, W = Me({}, [].concat(Xn(Hv), Xn(Cd), Xn(Gv), Xn(Ku))), tt = Object.seal(Object.create(null, {
tagNameCheck: {
writable: !0,
configurable: !1,
enumerable: !0,
value: null
},
attributeNameCheck: {
writable: !0,
configurable: !1,
enumerable: !0,
value: null
},
allowCustomizedBuiltInElements: {
writable: !0,
configurable: !1,
enumerable: !0,
value: !1
}
})), K = null, it = null, Z = !0, V = !0, Q = !1, q = !1, U = !1, F = !1, j = !1, P = !1, et = !1, at = !1, It = !0, Lt = !1, Rt = "user-content-", Ct = !0, pt = !1, mt = {}, _t = null, Tt = Me({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]), ft = null, le = Me({}, ["audio", "video", "img", "source", "image", "track"]), Dt = null, Ht = Me({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), $t = "http://www.w3.org/1998/Math/MathML", Qt = "http://www.w3.org/2000/svg", we = "http://www.w3.org/1999/xhtml", Gt = we, Ft = !1, zt, wt = ["application/xhtml+xml", "text/html"], bt = "text/html", Et, kt = null, Ut = n.createElement("form"), gt = function(st) {
return st instanceof RegExp || st instanceof Function;
}, he = function(st) {
kt && kt === st || ((!st || Na(st) !== "object") && (st = {}), st = ps(st), zt = wt.indexOf(st.PARSER_MEDIA_TYPE) === -1 ? zt = bt : zt = st.PARSER_MEDIA_TYPE, Et = zt === "application/xhtml+xml" ? function(At) {
return At;
} : Th, $ = "ALLOWED_TAGS" in st ? Me({}, st.ALLOWED_TAGS, Et) : lt, ut = "ALLOWED_ATTR" in st ? Me({}, st.ALLOWED_ATTR, Et) : W, Dt = "ADD_URI_SAFE_ATTR" in st ? Me(
ps(Ht),
st.ADD_URI_SAFE_ATTR,
Et
) : Ht, ft = "ADD_DATA_URI_TAGS" in st ? Me(
ps(le),
st.ADD_DATA_URI_TAGS,
Et
) : le, _t = "FORBID_CONTENTS" in st ? Me({}, st.FORBID_CONTENTS, Et) : Tt, K = "FORBID_TAGS" in st ? Me({}, st.FORBID_TAGS, Et) : {}, it = "FORBID_ATTR" in st ? Me({}, st.FORBID_ATTR, Et) : {}, mt = "USE_PROFILES" in st ? st.USE_PROFILES : !1, Z = st.ALLOW_ARIA_ATTR !== !1, V = st.ALLOW_DATA_ATTR !== !1, Q = st.ALLOW_UNKNOWN_PROTOCOLS || !1, q = st.SAFE_FOR_TEMPLATES || !1, U = st.WHOLE_DOCUMENT || !1, P = st.RETURN_DOM || !1, et = st.RETURN_DOM_FRAGMENT || !1, at = st.RETURN_TRUSTED_TYPE || !1, j = st.FORCE_BODY || !1, It = st.SANITIZE_DOM !== !1, Lt = st.SANITIZE_NAMED_PROPS || !1, Ct = st.KEEP_CONTENT !== !1, pt = st.IN_PLACE || !1, Y = st.ALLOWED_URI_REGEXP || Y, Gt = st.NAMESPACE || we, st.CUSTOM_ELEMENT_HANDLING && gt(st.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (tt.tagNameCheck = st.CUSTOM_ELEMENT_HANDLING.tagNameCheck), st.CUSTOM_ELEMENT_HANDLING && gt(st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (tt.attributeNameCheck = st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), st.CUSTOM_ELEMENT_HANDLING && typeof st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (tt.allowCustomizedBuiltInElements = st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), q && (V = !1), et && (P = !0), mt && ($ = Me({}, Xn(Wv)), ut = [], mt.html === !0 && (Me($, Uv), Me(ut, Hv)), mt.svg === !0 && (Me($, wd), Me(ut, Cd), Me(ut, Ku)), mt.svgFilters === !0 && (Me($, Td), Me(ut, Cd), Me(ut, Ku)), mt.mathMl === !0 && (Me($, Ed), Me(ut, Gv), Me(ut, Ku))), st.ADD_TAGS && ($ === lt && ($ = ps($)), Me($, st.ADD_TAGS, Et)), st.ADD_ATTR && (ut === W && (ut = ps(ut)), Me(ut, st.ADD_ATTR, Et)), st.ADD_URI_SAFE_ATTR && Me(Dt, st.ADD_URI_SAFE_ATTR, Et), st.FORBID_CONTENTS && (_t === Tt && (_t = ps(_t)), Me(_t, st.FORBID_CONTENTS, Et)), Ct && ($["#text"] = !0), U && Me($, ["html", "head", "body"]), $.table && (Me($, ["tbody"]), delete K.tbody), cn && cn(st), kt = st);
}, yt = Me({}, ["mi", "mo", "mn", "ms", "mtext"]), re = Me({}, ["foreignobject", "desc", "title", "annotation-xml"]), _e = Me({}, ["title", "style", "font", "a", "script"]), ge = Me({}, wd);
Me(ge, Td), Me(ge, zH);
var be = Me({}, Ed);
Me(be, YH);
var Te = function(st) {
var At = x(st);
(!At || !At.tagName) && (At = {
namespaceURI: we,
tagName: "template"
});
var Nt = Th(st.tagName), Jt = Th(At.tagName);
return st.namespaceURI === Qt ? At.namespaceURI === we ? Nt === "svg" : At.namespaceURI === $t ? Nt === "svg" && (Jt === "annotation-xml" || yt[Jt]) : Boolean(ge[Nt]) : st.namespaceURI === $t ? At.namespaceURI === we ? Nt === "math" : At.namespaceURI === Qt ? Nt === "math" && re[Jt] : Boolean(be[Nt]) : st.namespaceURI === we ? At.namespaceURI === Qt && !re[Jt] || At.namespaceURI === $t && !yt[Jt] ? !1 : !be[Nt] && (_e[Nt] || !ge[Nt]) : !1;
}, Wt = function(st) {
Ml(e.removed, {
element: st
});
try {
st.parentNode.removeChild(st);
} catch {
try {
st.outerHTML = C;
} catch {
st.remove();
}
}
}, ae = function(st, At) {
try {
Ml(e.removed, {
attribute: At.getAttributeNode(st),
from: At
});
} catch {
Ml(e.removed, {
attribute: null,
from: At
});
}
if (At.removeAttribute(st), st === "is" && !ut[st])
if (P || et)
try {
Wt(At);
} catch {
}
else
try {
At.setAttribute(st, "");
} catch {
}
}, ye = function(st) {
var At, Nt;
if (j)
st = "" + st;
else {
var Jt = FH(st, /^[\r\n\t ]+/);
Nt = Jt && Jt[0];
}
zt === "application/xhtml+xml" && (st = '
' + st + "");
var ze = T ? T.createHTML(st) : st;
if (Gt === we)
try {
At = new f().parseFromString(ze, zt);
} catch {
}
if (!At || !At.documentElement) {
At = S.createDocument(Gt, "template", null);
try {
At.documentElement.innerHTML = Ft ? "" : ze;
} catch {
}
}
var Oe = At.body || At.documentElement;
return st && Nt && Oe.insertBefore(n.createTextNode(Nt), Oe.childNodes[0] || null), Gt === we ? L.call(At, U ? "html" : "body")[0] : U ? At.documentElement : Oe;
}, ue = function(st) {
return R.call(
st.ownerDocument || st,
st,
l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT,
null,
!1
);
}, Wi = function(st) {
return st instanceof d && (typeof st.nodeName != "string" || typeof st.textContent != "string" || typeof st.removeChild != "function" || !(st.attributes instanceof h) || typeof st.removeAttribute != "function" || typeof st.setAttribute != "function" || typeof st.namespaceURI != "string" || typeof st.insertBefore != "function");
}, Or = function(st) {
return Na(s) === "object" ? st instanceof s : st && Na(st) === "object" && typeof st.nodeType == "number" && typeof st.nodeName == "string";
}, Ie = function(st, At, Nt) {
!w[st] || OH(w[st], function(Jt) {
Jt.call(e, At, Nt, kt);
});
}, se = function(st) {
var At;
if (Ie("beforeSanitizeElements", st, null), Wi(st) || Xr(/[\u0080-\uFFFF]/, st.nodeName))
return Wt(st), !0;
var Nt = Et(st.nodeName);
if (Ie("uponSanitizeElement", st, {
tagName: Nt,
allowedTags: $
}), st.hasChildNodes() && !Or(st.firstElementChild) && (!Or(st.content) || !Or(st.content.firstElementChild)) && Xr(/<[/\w]/g, st.innerHTML) && Xr(/<[/\w]/g, st.textContent) || Nt === "select" && Xr(/= 0; --Fe)
Jt.insertBefore(_(ze[Fe], !0), y(st));
}
return Wt(st), !0;
}
return st instanceof o && !Te(st) || (Nt === "noscript" || Nt === "noembed") && Xr(/<\/no(script|embed)/i, st.innerHTML) ? (Wt(st), !0) : (q && st.nodeType === 3 && (At = st.textContent, At = Sa(At, D, " "), At = Sa(At, N, " "), st.textContent !== At && (Ml(e.removed, {
element: st.cloneNode()
}), st.textContent = At)), Ie("afterSanitizeElements", st, null), !1);
}, $e = function(st, At, Nt) {
if (It && (At === "id" || At === "name") && (Nt in n || Nt in Ut))
return !1;
if (!(V && !it[At] && Xr(z, At))) {
if (!(Z && Xr(X, At))) {
if (!ut[At] || it[At]) {
if (!(_r(st) && (tt.tagNameCheck instanceof RegExp && Xr(tt.tagNameCheck, st) || tt.tagNameCheck instanceof Function && tt.tagNameCheck(st)) && (tt.attributeNameCheck instanceof RegExp && Xr(tt.attributeNameCheck, At) || tt.attributeNameCheck instanceof Function && tt.attributeNameCheck(At)) || At === "is" && tt.allowCustomizedBuiltInElements && (tt.tagNameCheck instanceof RegExp && Xr(tt.tagNameCheck, Nt) || tt.tagNameCheck instanceof Function && tt.tagNameCheck(Nt))))
return !1;
} else if (!Dt[At]) {
if (!Xr(Y, Sa(Nt, J, ""))) {
if (!((At === "src" || At === "xlink:href" || At === "href") && st !== "script" && PH(Nt, "data:") === 0 && ft[st])) {
if (!(Q && !Xr(ct, Sa(Nt, J, "")))) {
if (Nt)
return !1;
}
}
}
}
}
}
return !0;
}, _r = function(st) {
return st.indexOf("-") > 0;
}, He = function(st) {
var At, Nt, Jt, ze;
Ie("beforeSanitizeAttributes", st, null);
var Oe = st.attributes;
if (!!Oe) {
var Fe = {
attrName: "",
attrValue: "",
keepAttr: !0,
allowedAttributes: ut
};
for (ze = Oe.length; ze--; ) {
At = Oe[ze];
var vr = At, Ve = vr.name, Hi = vr.namespaceURI;
if (Nt = Ve === "value" ? At.value : qH(At.value), Jt = Et(Ve), Fe.attrName = Jt, Fe.attrValue = Nt, Fe.keepAttr = !0, Fe.forceKeepAttr = void 0, Ie("uponSanitizeAttribute", st, Fe), Nt = Fe.attrValue, !Fe.forceKeepAttr && (ae(Ve, st), !!Fe.keepAttr)) {
if (Xr(/\/>/i, Nt)) {
ae(Ve, st);
continue;
}
q && (Nt = Sa(Nt, D, " "), Nt = Sa(Nt, N, " "));
var Ee = Et(st.nodeName);
if (!!$e(Ee, Jt, Nt)) {
if (Lt && (Jt === "id" || Jt === "name") && (ae(Ve, st), Nt = Rt + Nt), T && Na(p) === "object" && typeof p.getAttributeType == "function" && !Hi)
switch (p.getAttributeType(Ee, Jt)) {
case "TrustedHTML":
Nt = T.createHTML(Nt);
break;
case "TrustedScriptURL":
Nt = T.createScriptURL(Nt);
break;
}
try {
Hi ? st.setAttributeNS(Hi, Ve, Nt) : st.setAttribute(Ve, Nt), Yv(e.removed);
} catch {
}
}
}
}
Ie("afterSanitizeAttributes", st, null);
}
}, Xe = function qt(st) {
var At, Nt = ue(st);
for (Ie("beforeSanitizeShadowDOM", st, null); At = Nt.nextNode(); )
Ie("uponSanitizeShadowNode", At, null), !se(At) && (At.content instanceof i && qt(At.content), He(At));
Ie("afterSanitizeShadowDOM", st, null);
};
return e.sanitize = function(qt) {
var st = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, At, Nt, Jt, ze, Oe;
if (Ft = !qt, Ft && (qt = ""), typeof qt != "string" && !Or(qt)) {
if (typeof qt.toString != "function")
throw kd("toString is not a function");
if (qt = qt.toString(), typeof qt != "string")
throw kd("dirty is not a string, aborting");
}
if (!e.isSupported) {
if (Na(t.toStaticHTML) === "object" || typeof t.toStaticHTML == "function") {
if (typeof qt == "string")
return t.toStaticHTML(qt);
if (Or(qt))
return t.toStaticHTML(qt.outerHTML);
}
return qt;
}
if (F || he(st), e.removed = [], typeof qt == "string" && (pt = !1), pt) {
if (qt.nodeName) {
var Fe = Et(qt.nodeName);
if (!$[Fe] || K[Fe])
throw kd("root node is forbidden and cannot be sanitized in-place");
}
} else if (qt instanceof s)
At = ye(""), Nt = At.ownerDocument.importNode(qt, !0), Nt.nodeType === 1 && Nt.nodeName === "BODY" || Nt.nodeName === "HTML" ? At = Nt : At.appendChild(Nt);
else {
if (!P && !q && !U && qt.indexOf("<") === -1)
return T && at ? T.createHTML(qt) : qt;
if (At = ye(qt), !At)
return P ? null : at ? C : "";
}
At && j && Wt(At.firstChild);
for (var vr = ue(pt ? qt : At); Jt = vr.nextNode(); )
Jt.nodeType === 3 && Jt === ze || se(Jt) || (Jt.content instanceof i && Xe(Jt.content), He(Jt), ze = Jt);
if (ze = null, pt)
return qt;
if (P) {
if (et)
for (Oe = A.call(At.ownerDocument); At.firstChild; )
Oe.appendChild(At.firstChild);
else
Oe = At;
return ut.shadowroot && (Oe = v.call(r, Oe, !0)), Oe;
}
var Ve = U ? At.outerHTML : At.innerHTML;
return U && $["!doctype"] && At.ownerDocument && At.ownerDocument.doctype && At.ownerDocument.doctype.name && Xr(KH, At.ownerDocument.doctype.name) && (Ve = "
` + Ve), q && (Ve = Sa(Ve, D, " "), Ve = Sa(Ve, N, " ")), T && at ? T.createHTML(Ve) : Ve;
}, e.setConfig = function(qt) {
he(qt), F = !0;
}, e.clearConfig = function() {
kt = null, F = !1;
}, e.isValidAttribute = function(qt, st, At) {
kt || he({});
var Nt = Et(qt), Jt = Et(st);
return $e(Nt, Jt, At);
}, e.addHook = function(qt, st) {
typeof st == "function" && (w[qt] = w[qt] || [], Ml(w[qt], st));
}, e.removeHook = function(qt) {
if (w[qt])
return Yv(w[qt]);
}, e.removeHooks = function(qt) {
w[qt] && (w[qt] = []);
}, e.removeAllHooks = function() {
w = {};
}, e;
}
var Rc = xS();
const JH = (t) => t ? wS(t).replace(/\\n/g, "#br#").split("#br#") : [""], kS = (t) => Rc.sanitize(t), jv = (t, e) => {
var r;
if (((r = e.flowchart) == null ? void 0 : r.htmlLabels) !== !1) {
const n = e.securityLevel;
n === "antiscript" || n === "strict" ? t = kS(t) : n !== "loose" && (t = wS(t), t = t.replace(//g, ">"), t = t.replace(/=/g, "="), t = nG(t));
}
return t;
}, ci = (t, e) => t && (e.dompurifyConfig ? t = Rc.sanitize(jv(t, e), e.dompurifyConfig).toString() : t = Rc.sanitize(jv(t, e)), t), tG = (t, e) => typeof t == "string" ? ci(t, e) : t.flat().map((r) => ci(r, e)), U1 = /
/gi, eG = (t) => U1.test(t), rG = (t) => t.split(U1), nG = (t) => t.replace(/#br#/g, "
"), wS = (t) => t.replace(U1, "#br#"), iG = (t) => {
let e = "";
return t && (e = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, e = e.replaceAll(/\(/g, "\\("), e = e.replaceAll(/\)/g, "\\)")), e;
}, Ar = (t) => !(t === !1 || ["false", "null", "0"].includes(String(t).trim().toLowerCase())), Va = function(t) {
let e = t;
return t.indexOf("~") !== -1 ? (e = e.replace(/~([^~].*)/, "<$1"), e = e.replace(/~([^~]*)$/, ">$1"), Va(e)) : e;
}, pe = {
getRows: JH,
sanitizeText: ci,
sanitizeTextOrArray: tG,
hasBreaks: eG,
splitBreaks: rG,
lineBreakRegex: U1,
removeScript: kS,
getUrl: iG,
evaluate: Ar
}, Eh = {
min: {
r: 0,
g: 0,
b: 0,
s: 0,
l: 0,
a: 0
},
max: {
r: 255,
g: 255,
b: 255,
h: 360,
s: 100,
l: 100,
a: 1
},
clamp: {
r: (t) => t >= 255 ? 255 : t < 0 ? 0 : t,
g: (t) => t >= 255 ? 255 : t < 0 ? 0 : t,
b: (t) => t >= 255 ? 255 : t < 0 ? 0 : t,
h: (t) => t % 360,
s: (t) => t >= 100 ? 100 : t < 0 ? 0 : t,
l: (t) => t >= 100 ? 100 : t < 0 ? 0 : t,
a: (t) => t >= 1 ? 1 : t < 0 ? 0 : t
},
toLinear: (t) => {
const e = t / 255;
return t > 0.03928 ? Math.pow((e + 0.055) / 1.055, 2.4) : e / 12.92;
},
hue2rgb: (t, e, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t),
hsl2rgb: ({ h: t, s: e, l: r }, n) => {
if (!e)
return r * 2.55;
t /= 360, e /= 100, r /= 100;
const i = r < 0.5 ? r * (1 + e) : r + e - r * e, a = 2 * r - i;
switch (n) {
case "r":
return Eh.hue2rgb(a, i, t + 1 / 3) * 255;
case "g":
return Eh.hue2rgb(a, i, t) * 255;
case "b":
return Eh.hue2rgb(a, i, t - 1 / 3) * 255;
}
},
rgb2hsl: ({ r: t, g: e, b: r }, n) => {
t /= 255, e /= 255, r /= 255;
const i = Math.max(t, e, r), a = Math.min(t, e, r), s = (i + a) / 2;
if (n === "l")
return s * 100;
if (i === a)
return 0;
const o = i - a, l = s > 0.5 ? o / (2 - i - a) : o / (i + a);
if (n === "s")
return l * 100;
switch (i) {
case t:
return ((e - r) / o + (e < r ? 6 : 0)) * 60;
case e:
return ((r - t) / o + 2) * 60;
case r:
return ((t - e) / o + 4) * 60;
default:
return -1;
}
}
}, aG = Eh, sG = {
clamp: (t, e, r) => e > r ? Math.min(e, Math.max(r, t)) : Math.min(r, Math.max(e, t)),
round: (t) => Math.round(t * 1e10) / 1e10
}, oG = sG, lG = {
dec2hex: (t) => {
const e = Math.round(t).toString(16);
return e.length > 1 ? e : `0${e}`;
}
}, cG = lG, uG = {
channel: aG,
lang: oG,
unit: cG
}, xe = uG, Aa = {};
for (let t = 0; t <= 255; t++)
Aa[t] = xe.unit.dec2hex(t);
const Ur = {
ALL: 0,
RGB: 1,
HSL: 2
};
class hG {
constructor() {
this.type = Ur.ALL;
}
get() {
return this.type;
}
set(e) {
if (this.type && this.type !== e)
throw new Error("Cannot change both RGB and HSL channels at the same time");
this.type = e;
}
reset() {
this.type = Ur.ALL;
}
is(e) {
return this.type === e;
}
}
const fG = hG;
class dG {
constructor(e, r) {
this.color = r, this.changed = !1, this.data = e, this.type = new fG();
}
set(e, r) {
return this.color = r, this.changed = !1, this.data = e, this.type.type = Ur.ALL, this;
}
_ensureHSL() {
const e = this.data, { h: r, s: n, l: i } = e;
r === void 0 && (e.h = xe.channel.rgb2hsl(e, "h")), n === void 0 && (e.s = xe.channel.rgb2hsl(e, "s")), i === void 0 && (e.l = xe.channel.rgb2hsl(e, "l"));
}
_ensureRGB() {
const e = this.data, { r, g: n, b: i } = e;
r === void 0 && (e.r = xe.channel.hsl2rgb(e, "r")), n === void 0 && (e.g = xe.channel.hsl2rgb(e, "g")), i === void 0 && (e.b = xe.channel.hsl2rgb(e, "b"));
}
get r() {
const e = this.data, r = e.r;
return !this.type.is(Ur.HSL) && r !== void 0 ? r : (this._ensureHSL(), xe.channel.hsl2rgb(e, "r"));
}
get g() {
const e = this.data, r = e.g;
return !this.type.is(Ur.HSL) && r !== void 0 ? r : (this._ensureHSL(), xe.channel.hsl2rgb(e, "g"));
}
get b() {
const e = this.data, r = e.b;
return !this.type.is(Ur.HSL) && r !== void 0 ? r : (this._ensureHSL(), xe.channel.hsl2rgb(e, "b"));
}
get h() {
const e = this.data, r = e.h;
return !this.type.is(Ur.RGB) && r !== void 0 ? r : (this._ensureRGB(), xe.channel.rgb2hsl(e, "h"));
}
get s() {
const e = this.data, r = e.s;
return !this.type.is(Ur.RGB) && r !== void 0 ? r : (this._ensureRGB(), xe.channel.rgb2hsl(e, "s"));
}
get l() {
const e = this.data, r = e.l;
return !this.type.is(Ur.RGB) && r !== void 0 ? r : (this._ensureRGB(), xe.channel.rgb2hsl(e, "l"));
}
get a() {
return this.data.a;
}
set r(e) {
this.type.set(Ur.RGB), this.changed = !0, this.data.r = e;
}
set g(e) {
this.type.set(Ur.RGB), this.changed = !0, this.data.g = e;
}
set b(e) {
this.type.set(Ur.RGB), this.changed = !0, this.data.b = e;
}
set h(e) {
this.type.set(Ur.HSL), this.changed = !0, this.data.h = e;
}
set s(e) {
this.type.set(Ur.HSL), this.changed = !0, this.data.s = e;
}
set l(e) {
this.type.set(Ur.HSL), this.changed = !0, this.data.l = e;
}
set a(e) {
this.changed = !0, this.data.a = e;
}
}
const pG = dG, gG = new pG({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), W1 = gG, TS = {
re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
parse: (t) => {
if (t.charCodeAt(0) !== 35)
return;
const e = t.match(TS.re);
if (!e)
return;
const r = e[1], n = parseInt(r, 16), i = r.length, a = i % 4 === 0, s = i > 4, o = s ? 1 : 17, l = s ? 8 : 4, u = a ? 0 : -1, h = s ? 255 : 15;
return W1.set({
r: (n >> l * (u + 3) & h) * o,
g: (n >> l * (u + 2) & h) * o,
b: (n >> l * (u + 1) & h) * o,
a: a ? (n & h) * o / 255 : 1
}, t);
},
stringify: (t) => {
const { r: e, g: r, b: n, a: i } = t;
return i < 1 ? `#${Aa[Math.round(e)]}${Aa[Math.round(r)]}${Aa[Math.round(n)]}${Aa[Math.round(i * 255)]}` : `#${Aa[Math.round(e)]}${Aa[Math.round(r)]}${Aa[Math.round(n)]}`;
}
}, nc = TS, Ch = {
re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,
hueRe: /^(.+?)(deg|grad|rad|turn)$/i,
_hue2deg: (t) => {
const e = t.match(Ch.hueRe);
if (e) {
const [, r, n] = e;
switch (n) {
case "grad":
return xe.channel.clamp.h(parseFloat(r) * 0.9);
case "rad":
return xe.channel.clamp.h(parseFloat(r) * 180 / Math.PI);
case "turn":
return xe.channel.clamp.h(parseFloat(r) * 360);
}
}
return xe.channel.clamp.h(parseFloat(t));
},
parse: (t) => {
const e = t.charCodeAt(0);
if (e !== 104 && e !== 72)
return;
const r = t.match(Ch.re);
if (!r)
return;
const [, n, i, a, s, o] = r;
return W1.set({
h: Ch._hue2deg(n),
s: xe.channel.clamp.s(parseFloat(i)),
l: xe.channel.clamp.l(parseFloat(a)),
a: s ? xe.channel.clamp.a(o ? parseFloat(s) / 100 : parseFloat(s)) : 1
}, t);
},
stringify: (t) => {
const { h: e, s: r, l: n, a: i } = t;
return i < 1 ? `hsla(${xe.lang.round(e)}, ${xe.lang.round(r)}%, ${xe.lang.round(n)}%, ${i})` : `hsl(${xe.lang.round(e)}, ${xe.lang.round(r)}%, ${xe.lang.round(n)}%)`;
}
}, Zu = Ch, Sh = {
colors: {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
bisque: "#ffe4c4",
black: "#000000",
blanchedalmond: "#ffebcd",
blue: "#0000ff",
blueviolet: "#8a2be2",
brown: "#a52a2a",
burlywood: "#deb887",
cadetblue: "#5f9ea0",
chartreuse: "#7fff00",
chocolate: "#d2691e",
coral: "#ff7f50",
cornflowerblue: "#6495ed",
cornsilk: "#fff8dc",
crimson: "#dc143c",
cyanaqua: "#00ffff",
darkblue: "#00008b",
darkcyan: "#008b8b",
darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9",
darkgreen: "#006400",
darkgrey: "#a9a9a9",
darkkhaki: "#bdb76b",
darkmagenta: "#8b008b",
darkolivegreen: "#556b2f",
darkorange: "#ff8c00",
darkorchid: "#9932cc",
darkred: "#8b0000",
darksalmon: "#e9967a",
darkseagreen: "#8fbc8f",
darkslateblue: "#483d8b",
darkslategray: "#2f4f4f",
darkslategrey: "#2f4f4f",
darkturquoise: "#00ced1",
darkviolet: "#9400d3",
deeppink: "#ff1493",
deepskyblue: "#00bfff",
dimgray: "#696969",
dimgrey: "#696969",
dodgerblue: "#1e90ff",
firebrick: "#b22222",
floralwhite: "#fffaf0",
forestgreen: "#228b22",
fuchsia: "#ff00ff",
gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff",
gold: "#ffd700",
goldenrod: "#daa520",
gray: "#808080",
green: "#008000",
greenyellow: "#adff2f",
grey: "#808080",
honeydew: "#f0fff0",
hotpink: "#ff69b4",
indianred: "#cd5c5c",
indigo: "#4b0082",
ivory: "#fffff0",
khaki: "#f0e68c",
lavender: "#e6e6fa",
lavenderblush: "#fff0f5",
lawngreen: "#7cfc00",
lemonchiffon: "#fffacd",
lightblue: "#add8e6",
lightcoral: "#f08080",
lightcyan: "#e0ffff",
lightgoldenrodyellow: "#fafad2",
lightgray: "#d3d3d3",
lightgreen: "#90ee90",
lightgrey: "#d3d3d3",
lightpink: "#ffb6c1",
lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa",
lightskyblue: "#87cefa",
lightslategray: "#778899",
lightslategrey: "#778899",
lightsteelblue: "#b0c4de",
lightyellow: "#ffffe0",
lime: "#00ff00",
limegreen: "#32cd32",
linen: "#faf0e6",
magenta: "#ff00ff",
maroon: "#800000",
mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd",
mediumorchid: "#ba55d3",
mediumpurple: "#9370db",
mediumseagreen: "#3cb371",
mediumslateblue: "#7b68ee",
mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc",
mediumvioletred: "#c71585",
midnightblue: "#191970",
mintcream: "#f5fffa",
mistyrose: "#ffe4e1",
moccasin: "#ffe4b5",
navajowhite: "#ffdead",
navy: "#000080",
oldlace: "#fdf5e6",
olive: "#808000",
olivedrab: "#6b8e23",
orange: "#ffa500",
orangered: "#ff4500",
orchid: "#da70d6",
palegoldenrod: "#eee8aa",
palegreen: "#98fb98",
paleturquoise: "#afeeee",
palevioletred: "#db7093",
papayawhip: "#ffefd5",
peachpuff: "#ffdab9",
peru: "#cd853f",
pink: "#ffc0cb",
plum: "#dda0dd",
powderblue: "#b0e0e6",
purple: "#800080",
rebeccapurple: "#663399",
red: "#ff0000",
rosybrown: "#bc8f8f",
royalblue: "#4169e1",
saddlebrown: "#8b4513",
salmon: "#fa8072",
sandybrown: "#f4a460",
seagreen: "#2e8b57",
seashell: "#fff5ee",
sienna: "#a0522d",
silver: "#c0c0c0",
skyblue: "#87ceeb",
slateblue: "#6a5acd",
slategray: "#708090",
slategrey: "#708090",
snow: "#fffafa",
springgreen: "#00ff7f",
tan: "#d2b48c",
teal: "#008080",
thistle: "#d8bfd8",
transparent: "#00000000",
turquoise: "#40e0d0",
violet: "#ee82ee",
wheat: "#f5deb3",
white: "#ffffff",
whitesmoke: "#f5f5f5",
yellow: "#ffff00",
yellowgreen: "#9acd32"
},
parse: (t) => {
t = t.toLowerCase();
const e = Sh.colors[t];
if (!!e)
return nc.parse(e);
},
stringify: (t) => {
const e = nc.stringify(t);
for (const r in Sh.colors)
if (Sh.colors[r] === e)
return r;
}
}, $v = Sh, ES = {
re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,
parse: (t) => {
const e = t.charCodeAt(0);
if (e !== 114 && e !== 82)
return;
const r = t.match(ES.re);
if (!r)
return;
const [, n, i, a, s, o, l, u, h] = r;
return W1.set({
r: xe.channel.clamp.r(i ? parseFloat(n) * 2.55 : parseFloat(n)),
g: xe.channel.clamp.g(s ? parseFloat(a) * 2.55 : parseFloat(a)),
b: xe.channel.clamp.b(l ? parseFloat(o) * 2.55 : parseFloat(o)),
a: u ? xe.channel.clamp.a(h ? parseFloat(u) / 100 : parseFloat(u)) : 1
}, t);
},
stringify: (t) => {
const { r: e, g: r, b: n, a: i } = t;
return i < 1 ? `rgba(${xe.lang.round(e)}, ${xe.lang.round(r)}, ${xe.lang.round(n)}, ${xe.lang.round(i)})` : `rgb(${xe.lang.round(e)}, ${xe.lang.round(r)}, ${xe.lang.round(n)})`;
}
}, Qu = ES, yG = {
format: {
keyword: $v,
hex: nc,
rgb: Qu,
rgba: Qu,
hsl: Zu,
hsla: Zu
},
parse: (t) => {
if (typeof t != "string")
return t;
const e = nc.parse(t) || Qu.parse(t) || Zu.parse(t) || $v.parse(t);
if (e)
return e;
throw new Error(`Unsupported color format: "${t}"`);
},
stringify: (t) => !t.changed && t.color ? t.color : t.type.is(Ur.HSL) || t.data.r === void 0 ? Zu.stringify(t) : t.a < 1 || !Number.isInteger(t.r) || !Number.isInteger(t.g) || !Number.isInteger(t.b) ? Qu.stringify(t) : nc.stringify(t)
}, ma = yG, mG = (t, e) => {
const r = ma.parse(t);
for (const n in e)
r[n] = xe.channel.clamp[n](e[n]);
return ma.stringify(r);
}, CS = mG, bG = (t, e, r = 0, n = 1) => {
if (typeof t != "number")
return CS(t, { a: e });
const i = W1.set({
r: xe.channel.clamp.r(t),
g: xe.channel.clamp.g(e),
b: xe.channel.clamp.b(r),
a: xe.channel.clamp.a(n)
});
return ma.stringify(i);
}, ic = bG, _G = (t, e, r) => {
const n = ma.parse(t), i = n[e], a = xe.channel.clamp[e](i + r);
return i !== a && (n[e] = a), ma.stringify(n);
}, SS = _G, vG = (t, e) => SS(t, "l", e), oe = vG, xG = (t, e) => SS(t, "l", -e), me = xG, kG = (t, e) => {
const r = ma.parse(t), n = {};
for (const i in e)
!e[i] || (n[i] = r[i] + e[i]);
return CS(t, n);
}, xt = kG, wG = (t, e, r = 50) => {
const { r: n, g: i, b: a, a: s } = ma.parse(t), { r: o, g: l, b: u, a: h } = ma.parse(e), d = r / 100, f = d * 2 - 1, p = s - h, _ = ((f * p === -1 ? f : (f + p) / (1 + f * p)) + 1) / 2, y = 1 - _, b = n * _ + o * y, x = i * _ + l * y, k = a * _ + u * y, T = s * d + h * (1 - d);
return ic(b, x, k, T);
}, TG = wG, EG = (t, e = 100) => {
const r = ma.parse(t);
return r.r = 255 - r.r, r.g = 255 - r.g, r.b = 255 - r.b, TG(r, t, e);
}, Yt = EG, en = (t, e) => e ? xt(t, { s: -40, l: 10 }) : xt(t, { s: -40, l: -10 }), H1 = "#ffffff", G1 = "#f2f2f2";
class CG {
constructor() {
this.background = "#f4f4f4", this.darkMode = !1, this.primaryColor = "#fff4dd", this.noteBkgColor = "#fff5ad", this.noteTextColor = "#333", this.THEME_COLOR_LIMIT = 12, this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px";
}
updateColors() {
if (this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333"), this.secondaryColor = this.secondaryColor || xt(this.primaryColor, { h: -120 }), this.tertiaryColor = this.tertiaryColor || xt(this.primaryColor, { h: 180, l: 5 }), this.primaryBorderColor = this.primaryBorderColor || en(this.primaryColor, this.darkMode), this.secondaryBorderColor = this.secondaryBorderColor || en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = this.tertiaryBorderColor || en(this.tertiaryColor, this.darkMode), this.noteBorderColor = this.noteBorderColor || en(this.noteBkgColor, this.darkMode), this.noteBkgColor = this.noteBkgColor || "#fff5ad", this.noteTextColor = this.noteTextColor || "#333", this.secondaryTextColor = this.secondaryTextColor || Yt(this.secondaryColor), this.tertiaryTextColor = this.tertiaryTextColor || Yt(this.tertiaryColor), this.lineColor = this.lineColor || Yt(this.background), this.textColor = this.textColor || this.primaryTextColor, this.nodeBkg = this.nodeBkg || this.primaryColor, this.mainBkg = this.mainBkg || this.primaryColor, this.nodeBorder = this.nodeBorder || this.primaryBorderColor, this.clusterBkg = this.clusterBkg || this.tertiaryColor, this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor, this.defaultLinkColor = this.defaultLinkColor || this.lineColor, this.titleColor = this.titleColor || this.tertiaryTextColor, this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? me(this.secondaryColor, 30) : this.secondaryColor), this.nodeTextColor = this.nodeTextColor || this.primaryTextColor, this.actorBorder = this.actorBorder || this.primaryBorderColor, this.actorBkg = this.actorBkg || this.mainBkg, this.actorTextColor = this.actorTextColor || this.primaryTextColor, this.actorLineColor = this.actorLineColor || "grey", this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg, this.signalColor = this.signalColor || this.textColor, this.signalTextColor = this.signalTextColor || this.textColor, this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder, this.labelTextColor = this.labelTextColor || this.actorTextColor, this.loopTextColor = this.loopTextColor || this.actorTextColor, this.activationBorderColor = this.activationBorderColor || me(this.secondaryColor, 10), this.activationBkgColor = this.activationBkgColor || this.secondaryColor, this.sequenceNumberColor = this.sequenceNumberColor || Yt(this.lineColor), this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor, this.altSectionBkgColor = this.altSectionBkgColor || "white", this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor, this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor, this.excludeBkgColor = this.excludeBkgColor || "#eeeeee", this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor, this.taskBkgColor = this.taskBkgColor || this.primaryColor, this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor, this.activeTaskBkgColor = this.activeTaskBkgColor || oe(this.primaryColor, 23), this.gridColor = this.gridColor || "lightgrey", this.doneTaskBkgColor = this.doneTaskBkgColor || "lightgrey", this.doneTaskBorderColor = this.doneTaskBorderColor || "grey", this.critBorderColor = this.critBorderColor || "#ff8888", this.critBkgColor = this.critBkgColor || "red", this.todayLineColor = this.todayLineColor || "red", this.taskTextColor = this.taskTextColor || this.textColor, this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor, this.taskTextLightColor = this.taskTextLightColor || this.textColor, this.taskTextColor = this.taskTextColor || this.primaryTextColor, this.taskTextDarkColor = this.taskTextDarkColor || this.textColor, this.taskTextClickableColor = this.taskTextClickableColor || "#003163", this.personBorder = this.personBorder || this.primaryBorderColor, this.personBkg = this.personBkg || this.mainBkg, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || this.tertiaryColor, this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.nodeBorder, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.specialStateColor = this.lineColor, this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || xt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || xt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || xt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || xt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || xt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || xt(this.primaryColor, { h: 210, l: 150 }), this.cScale9 = this.cScale9 || xt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || xt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || xt(this.primaryColor, { h: 330 }), this.darkMode)
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScale" + e] = me(this["cScale" + e], 75);
else
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScale" + e] = me(this["cScale" + e], 25);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || Yt(this["cScale" + e]);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this.darkMode ? this["cScalePeer" + e] = this["cScalePeer" + e] || oe(this["cScale" + e], 10) : this["cScalePeer" + e] = this["cScalePeer" + e] || me(this["cScale" + e], 10);
this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
this.classText = this.classText || this.textColor, this.fillType0 = this.fillType0 || this.primaryColor, this.fillType1 = this.fillType1 || this.secondaryColor, this.fillType2 = this.fillType2 || xt(this.primaryColor, { h: 64 }), this.fillType3 = this.fillType3 || xt(this.secondaryColor, { h: 64 }), this.fillType4 = this.fillType4 || xt(this.primaryColor, { h: -64 }), this.fillType5 = this.fillType5 || xt(this.secondaryColor, { h: -64 }), this.fillType6 = this.fillType6 || xt(this.primaryColor, { h: 128 }), this.fillType7 = this.fillType7 || xt(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || this.tertiaryColor, this.pie4 = this.pie4 || xt(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || xt(this.secondaryColor, { l: -10 }), this.pie6 = this.pie6 || xt(this.tertiaryColor, { l: -10 }), this.pie7 = this.pie7 || xt(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || xt(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || xt(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || xt(this.primaryColor, { h: 60, l: -20 }), this.pie11 = this.pie11 || xt(this.primaryColor, { h: -60, l: -20 }), this.pie12 = this.pie12 || xt(this.primaryColor, { h: 120, l: -10 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? me(this.secondaryColor, 30) : this.secondaryColor), this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || xt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || xt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || xt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || xt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || xt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = oe(this.git0, 25), this.git1 = oe(this.git1, 25), this.git2 = oe(this.git2, 25), this.git3 = oe(this.git3, 25), this.git4 = oe(this.git4, 25), this.git5 = oe(this.git5, 25), this.git6 = oe(this.git6, 25), this.git7 = oe(this.git7, 25)) : (this.git0 = me(this.git0, 25), this.git1 = me(this.git1, 25), this.git2 = me(this.git2, 25), this.git3 = me(this.git3, 25), this.git4 = me(this.git4, 25), this.git5 = me(this.git5, 25), this.git6 = me(this.git6, 25), this.git7 = me(this.git7, 25)), this.gitInv0 = this.gitInv0 || Yt(this.git0), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.branchLabelColor = this.branchLabelColor || (this.darkMode ? "black" : this.labelTextColor), this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor, this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor, this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor, this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor, this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor, this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor, this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || H1, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || G1;
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const SG = (t) => {
const e = new CG();
return e.calculate(t), e;
};
class AG {
constructor() {
this.background = "#333", this.primaryColor = "#1f2020", this.secondaryColor = oe(this.primaryColor, 16), this.tertiaryColor = xt(this.primaryColor, { h: -160 }), this.primaryBorderColor = Yt(this.background), this.secondaryBorderColor = en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = en(this.tertiaryColor, this.darkMode), this.primaryTextColor = Yt(this.primaryColor), this.secondaryTextColor = Yt(this.secondaryColor), this.tertiaryTextColor = Yt(this.tertiaryColor), this.lineColor = Yt(this.background), this.textColor = Yt(this.background), this.mainBkg = "#1f2020", this.secondBkg = "calculated", this.mainContrastColor = "lightgrey", this.darkTextColor = oe(Yt("#323D47"), 10), this.lineColor = "calculated", this.border1 = "#81B1DB", this.border2 = ic(255, 255, 255, 0.25), this.arrowheadColor = "calculated", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.labelBackground = "#181818", this.textColor = "#ccc", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "#F9FFFE", this.edgeLabelBackground = "calculated", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "calculated", this.actorLineColor = "calculated", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "calculated", this.activationBkgColor = "calculated", this.sequenceNumberColor = "black", this.sectionBkgColor = me("#EAE8D9", 30), this.altSectionBkgColor = "calculated", this.sectionBkgColor2 = "#EAE8D9", this.taskBorderColor = ic(255, 255, 255, 70), this.taskBkgColor = "calculated", this.taskTextColor = "calculated", this.taskTextLightColor = "calculated", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = ic(255, 255, 255, 50), this.activeTaskBkgColor = "#81B1DB", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "grey", this.critBorderColor = "#E83737", this.critBkgColor = "#E83737", this.taskTextDarkColor = "calculated", this.todayLineColor = "#DB5757", this.personBorder = "calculated", this.personBkg = "calculated", this.labelColor = "calculated", this.errorBkgColor = "#a44141", this.errorTextColor = "#ddd";
}
updateColors() {
this.secondBkg = oe(this.mainBkg, 16), this.lineColor = this.mainContrastColor, this.arrowheadColor = this.mainContrastColor, this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.edgeLabelBackground = oe(this.labelBackground, 25), this.actorBorder = this.border1, this.actorBkg = this.mainBkg, this.actorTextColor = this.mainContrastColor, this.actorLineColor = this.mainContrastColor, this.signalColor = this.mainContrastColor, this.signalTextColor = this.mainContrastColor, this.labelBoxBkgColor = this.actorBkg, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.mainContrastColor, this.loopTextColor = this.mainContrastColor, this.noteBorderColor = this.secondaryBorderColor, this.noteBkgColor = this.secondBkg, this.noteTextColor = this.secondaryTextColor, this.activationBorderColor = this.border1, this.activationBkgColor = this.secondBkg, this.altSectionBkgColor = this.background, this.taskBkgColor = oe(this.mainBkg, 23), this.taskTextColor = this.darkTextColor, this.taskTextLightColor = this.mainContrastColor, this.taskTextOutsideColor = this.taskTextLightColor, this.gridColor = this.mainContrastColor, this.doneTaskBkgColor = this.mainContrastColor, this.taskTextDarkColor = this.darkTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#555", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = "#f4f4f4", this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = xt(this.primaryColor, { h: 64 }), this.fillType3 = xt(this.secondaryColor, { h: 64 }), this.fillType4 = xt(this.primaryColor, { h: -64 }), this.fillType5 = xt(this.secondaryColor, { h: -64 }), this.fillType6 = xt(this.primaryColor, { h: 128 }), this.fillType7 = xt(this.secondaryColor, { h: 128 }), this.cScale1 = this.cScale1 || "#0b0000", this.cScale2 = this.cScale2 || "#4d1037", this.cScale3 = this.cScale3 || "#3f5258", this.cScale4 = this.cScale4 || "#4f2f1b", this.cScale5 = this.cScale5 || "#6e0a0a", this.cScale6 = this.cScale6 || "#3b0048", this.cScale7 = this.cScale7 || "#995a01", this.cScale8 = this.cScale8 || "#154706", this.cScale9 = this.cScale9 || "#161722", this.cScale10 = this.cScale10 || "#00296f", this.cScale11 = this.cScale11 || "#01629c", this.cScale12 = this.cScale12 || "#010029", this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || xt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || xt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || xt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || xt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || xt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || xt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || xt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || xt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || xt(this.primaryColor, { h: 330 });
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || Yt(this["cScale" + e]);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScalePeer" + e] = this["cScalePeer" + e] || oe(this["cScale" + e], 10);
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["pie" + e] = this["cScale" + e];
this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.classText = this.primaryTextColor, this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? me(this.secondaryColor, 30) : this.secondaryColor), this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = oe(this.secondaryColor, 20), this.git1 = oe(this.pie2 || this.secondaryColor, 20), this.git2 = oe(this.pie3 || this.tertiaryColor, 20), this.git3 = oe(this.pie4 || xt(this.primaryColor, { h: -30 }), 20), this.git4 = oe(this.pie5 || xt(this.primaryColor, { h: -60 }), 20), this.git5 = oe(this.pie6 || xt(this.primaryColor, { h: -90 }), 10), this.git6 = oe(this.pie7 || xt(this.primaryColor, { h: 60 }), 10), this.git7 = oe(this.pie8 || xt(this.primaryColor, { h: 120 }), 20), this.gitInv0 = this.gitInv0 || Yt(this.git0), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oe(this.background, 12), this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oe(this.background, 2);
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const MG = (t) => {
const e = new AG();
return e.calculate(t), e;
};
class LG {
constructor() {
this.background = "#f4f4f4", this.primaryColor = "#ECECFF", this.secondaryColor = xt(this.primaryColor, { h: 120 }), this.secondaryColor = "#ffffde", this.tertiaryColor = xt(this.primaryColor, { h: -160 }), this.primaryBorderColor = en(this.primaryColor, this.darkMode), this.secondaryBorderColor = en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = en(this.tertiaryColor, this.darkMode), this.primaryTextColor = Yt(this.primaryColor), this.secondaryTextColor = Yt(this.secondaryColor), this.tertiaryTextColor = Yt(this.tertiaryColor), this.lineColor = Yt(this.background), this.textColor = Yt(this.background), this.background = "white", this.mainBkg = "#ECECFF", this.secondBkg = "#ffffde", this.lineColor = "#333333", this.border1 = "#9370DB", this.border2 = "#aaaa33", this.arrowheadColor = "#333333", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.labelBackground = "#e8e8e8", this.textColor = "#333", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "calculated", this.edgeLabelBackground = "calculated", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "black", this.actorLineColor = "grey", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "calculated", this.altSectionBkgColor = "calculated", this.sectionBkgColor2 = "calculated", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "calculated", this.taskTextLightColor = "calculated", this.taskTextColor = this.taskTextLightColor, this.taskTextDarkColor = "calculated", this.taskTextOutsideColor = this.taskTextDarkColor, this.taskTextClickableColor = "calculated", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "calculated", this.critBorderColor = "calculated", this.critBkgColor = "calculated", this.todayLineColor = "calculated", this.sectionBkgColor = ic(102, 102, 255, 0.49), this.altSectionBkgColor = "white", this.sectionBkgColor2 = "#fff400", this.taskBorderColor = "#534fbc", this.taskBkgColor = "#8a90dd", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "black", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "#534fbc", this.activeTaskBkgColor = "#bfc7ff", this.gridColor = "lightgrey", this.doneTaskBkgColor = "lightgrey", this.doneTaskBorderColor = "grey", this.critBorderColor = "#ff8888", this.critBkgColor = "red", this.todayLineColor = "red", this.personBorder = "calculated", this.personBkg = "calculated", this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222", this.updateColors();
}
updateColors() {
this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || xt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || xt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || xt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || xt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || xt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || xt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || xt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || xt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || xt(this.primaryColor, { h: 330 }), this["cScalePeer" + 1] = this["cScalePeer" + 1] || me(this.secondaryColor, 45), this["cScalePeer" + 2] = this["cScalePeer" + 2] || me(this.tertiaryColor, 40);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScale" + e] = me(this["cScale" + e], 10), this["cScalePeer" + e] = this["cScalePeer" + e] || me(this["cScale" + e], 25);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || xt(this["cScale" + e], { h: 180 });
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.titleColor = this.textColor, this.edgeLabelBackground = this.labelBackground, this.actorBorder = oe(this.border1, 23), this.actorBkg = this.mainBkg, this.labelBoxBkgColor = this.actorBkg, this.signalColor = this.textColor, this.signalTextColor = this.textColor, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.actorTextColor, this.loopTextColor = this.actorTextColor, this.noteBorderColor = this.border2, this.noteTextColor = this.actorTextColor, this.taskTextColor = this.taskTextLightColor, this.taskTextOutsideColor = this.taskTextDarkColor, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f0f0f0", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.nodeBorder, this.specialStateColor = this.lineColor, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = xt(this.primaryColor, { h: 64 }), this.fillType3 = xt(this.secondaryColor, { h: 64 }), this.fillType4 = xt(this.primaryColor, { h: -64 }), this.fillType5 = xt(this.secondaryColor, { h: -64 }), this.fillType6 = xt(this.primaryColor, { h: 128 }), this.fillType7 = xt(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || xt(this.tertiaryColor, { l: -40 }), this.pie4 = this.pie4 || xt(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || xt(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || xt(this.tertiaryColor, { l: -20 }), this.pie7 = this.pie7 || xt(this.primaryColor, { h: 60, l: -20 }), this.pie8 = this.pie8 || xt(this.primaryColor, { h: -60, l: -40 }), this.pie9 = this.pie9 || xt(this.primaryColor, { h: 120, l: -40 }), this.pie10 = this.pie10 || xt(this.primaryColor, { h: 60, l: -40 }), this.pie11 = this.pie11 || xt(this.primaryColor, { h: -90, l: -40 }), this.pie12 = this.pie12 || xt(this.primaryColor, { h: 120, l: -30 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.labelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || xt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || xt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || xt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || xt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || xt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = oe(this.git0, 25), this.git1 = oe(this.git1, 25), this.git2 = oe(this.git2, 25), this.git3 = oe(this.git3, 25), this.git4 = oe(this.git4, 25), this.git5 = oe(this.git5, 25), this.git6 = oe(this.git6, 25), this.git7 = oe(this.git7, 25)) : (this.git0 = me(this.git0, 25), this.git1 = me(this.git1, 25), this.git2 = me(this.git2, 25), this.git3 = me(this.git3, 25), this.git4 = me(this.git4, 25), this.git5 = me(this.git5, 25), this.git6 = me(this.git6, 25), this.git7 = me(this.git7, 25)), this.gitInv0 = this.gitInv0 || me(Yt(this.git0), 25), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.gitBranchLabel0 = this.gitBranchLabel0 || Yt(this.labelTextColor), this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor, this.gitBranchLabel3 = this.gitBranchLabel3 || Yt(this.labelTextColor), this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor, this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor, this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor, this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || H1, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || G1;
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const RG = (t) => {
const e = new LG();
return e.calculate(t), e;
};
class IG {
constructor() {
this.background = "#f4f4f4", this.primaryColor = "#cde498", this.secondaryColor = "#cdffb2", this.background = "white", this.mainBkg = "#cde498", this.secondBkg = "#cdffb2", this.lineColor = "green", this.border1 = "#13540c", this.border2 = "#6eaa49", this.arrowheadColor = "green", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.tertiaryColor = oe("#cde498", 10), this.primaryBorderColor = en(this.primaryColor, this.darkMode), this.secondaryBorderColor = en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = en(this.tertiaryColor, this.darkMode), this.primaryTextColor = Yt(this.primaryColor), this.secondaryTextColor = Yt(this.secondaryColor), this.tertiaryTextColor = Yt(this.primaryColor), this.lineColor = Yt(this.background), this.textColor = Yt(this.background), this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "#333", this.edgeLabelBackground = "#e8e8e8", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "black", this.actorLineColor = "grey", this.signalColor = "#333", this.signalTextColor = "#333", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "#326932", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "#6eaa49", this.altSectionBkgColor = "white", this.sectionBkgColor2 = "#6eaa49", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "#487e3a", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "black", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "lightgrey", this.doneTaskBkgColor = "lightgrey", this.doneTaskBorderColor = "grey", this.critBorderColor = "#ff8888", this.critBkgColor = "red", this.todayLineColor = "red", this.personBorder = "calculated", this.personBkg = "calculated", this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222";
}
updateColors() {
this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || xt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || xt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || xt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || xt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || xt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || xt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || xt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || xt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || xt(this.primaryColor, { h: 330 }), this["cScalePeer" + 1] = this["cScalePeer" + 1] || me(this.secondaryColor, 45), this["cScalePeer" + 2] = this["cScalePeer" + 2] || me(this.tertiaryColor, 40);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScale" + e] = me(this["cScale" + e], 10), this["cScalePeer" + e] = this["cScalePeer" + e] || me(this["cScale" + e], 25);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || xt(this["cScale" + e], { h: 180 });
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.actorBorder = me(this.mainBkg, 20), this.actorBkg = this.mainBkg, this.labelBoxBkgColor = this.actorBkg, this.labelTextColor = this.actorTextColor, this.loopTextColor = this.actorTextColor, this.noteBorderColor = this.border2, this.noteTextColor = this.actorTextColor, this.taskBorderColor = this.border1, this.taskTextColor = this.taskTextLightColor, this.taskTextOutsideColor = this.taskTextDarkColor, this.activeTaskBorderColor = this.taskBorderColor, this.activeTaskBkgColor = this.mainBkg, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f0f0f0", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = this.lineColor, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = xt(this.primaryColor, { h: 64 }), this.fillType3 = xt(this.secondaryColor, { h: 64 }), this.fillType4 = xt(this.primaryColor, { h: -64 }), this.fillType5 = xt(this.secondaryColor, { h: -64 }), this.fillType6 = xt(this.primaryColor, { h: 128 }), this.fillType7 = xt(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || this.tertiaryColor, this.pie4 = this.pie4 || xt(this.primaryColor, { l: -30 }), this.pie5 = this.pie5 || xt(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || xt(this.tertiaryColor, { h: 40, l: -40 }), this.pie7 = this.pie7 || xt(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || xt(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || xt(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || xt(this.primaryColor, { h: 60, l: -50 }), this.pie11 = this.pie11 || xt(this.primaryColor, { h: -60, l: -50 }), this.pie12 = this.pie12 || xt(this.primaryColor, { h: 120, l: -50 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || xt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || xt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || xt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || xt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || xt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = oe(this.git0, 25), this.git1 = oe(this.git1, 25), this.git2 = oe(this.git2, 25), this.git3 = oe(this.git3, 25), this.git4 = oe(this.git4, 25), this.git5 = oe(this.git5, 25), this.git6 = oe(this.git6, 25), this.git7 = oe(this.git7, 25)) : (this.git0 = me(this.git0, 25), this.git1 = me(this.git1, 25), this.git2 = me(this.git2, 25), this.git3 = me(this.git3, 25), this.git4 = me(this.git4, 25), this.git5 = me(this.git5, 25), this.git6 = me(this.git6, 25), this.git7 = me(this.git7, 25)), this.gitInv0 = this.gitInv0 || Yt(this.git0), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || H1, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || G1;
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const NG = (t) => {
const e = new IG();
return e.calculate(t), e;
};
class BG {
constructor() {
this.primaryColor = "#eee", this.contrast = "#707070", this.secondaryColor = oe(this.contrast, 55), this.background = "#ffffff", this.tertiaryColor = xt(this.primaryColor, { h: -160 }), this.primaryBorderColor = en(this.primaryColor, this.darkMode), this.secondaryBorderColor = en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = en(this.tertiaryColor, this.darkMode), this.primaryTextColor = Yt(this.primaryColor), this.secondaryTextColor = Yt(this.secondaryColor), this.tertiaryTextColor = Yt(this.tertiaryColor), this.lineColor = Yt(this.background), this.textColor = Yt(this.background), this.mainBkg = "#eee", this.secondBkg = "calculated", this.lineColor = "#666", this.border1 = "#999", this.border2 = "calculated", this.note = "#ffa", this.text = "#333", this.critical = "#d42", this.done = "#bbb", this.arrowheadColor = "#333333", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "calculated", this.edgeLabelBackground = "white", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "calculated", this.actorLineColor = "calculated", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "calculated", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "calculated", this.altSectionBkgColor = "white", this.sectionBkgColor2 = "calculated", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "calculated", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "calculated", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "calculated", this.critBkgColor = "calculated", this.critBorderColor = "calculated", this.todayLineColor = "calculated", this.personBorder = "calculated", this.personBkg = "calculated", this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222";
}
updateColors() {
this.secondBkg = oe(this.contrast, 55), this.border2 = this.contrast, this.cScale0 = this.cScale0 || "#555", this.cScale1 = this.cScale1 || "#F4F4F4", this.cScale2 = this.cScale2 || "#555", this.cScale3 = this.cScale3 || "#BBB", this.cScale4 = this.cScale4 || "#777", this.cScale5 = this.cScale5 || "#999", this.cScale6 = this.cScale6 || "#DDD", this.cScale7 = this.cScale7 || "#FFF", this.cScale8 = this.cScale8 || "#DDD", this.cScale9 = this.cScale9 || "#BBB", this.cScale10 = this.cScale10 || "#999", this.cScale11 = this.cScale11 || "#777";
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || Yt(this["cScale" + e]);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this.darkMode ? this["cScalePeer" + e] = this["cScalePeer" + e] || oe(this["cScale" + e], 10) : this["cScalePeer" + e] = this["cScalePeer" + e] || me(this["cScale" + e], 10);
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor), this.cScaleLabel0 = this.cScaleLabel0 || this.cScale1, this.cScaleLabel2 = this.cScaleLabel2 || this.cScale1;
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.titleColor = this.text, this.actorBorder = oe(this.border1, 23), this.actorBkg = this.mainBkg, this.actorTextColor = this.text, this.actorLineColor = this.lineColor, this.signalColor = this.text, this.signalTextColor = this.text, this.labelBoxBkgColor = this.actorBkg, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.text, this.loopTextColor = this.text, this.noteBorderColor = "#999", this.noteBkgColor = "#666", this.noteTextColor = "#fff", this.sectionBkgColor = oe(this.contrast, 30), this.sectionBkgColor2 = oe(this.contrast, 30), this.taskBorderColor = me(this.contrast, 10), this.taskBkgColor = this.contrast, this.taskTextColor = this.taskTextLightColor, this.taskTextDarkColor = this.text, this.taskTextOutsideColor = this.taskTextDarkColor, this.activeTaskBorderColor = this.taskBorderColor, this.activeTaskBkgColor = this.mainBkg, this.gridColor = oe(this.border1, 30), this.doneTaskBkgColor = this.done, this.doneTaskBorderColor = this.lineColor, this.critBkgColor = this.critical, this.critBorderColor = me(this.critBkgColor, 10), this.todayLineColor = this.critBkgColor, this.transitionColor = this.transitionColor || "#000", this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f4f4f4", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.stateBorder = this.stateBorder || "#000", this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = "#222", this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = xt(this.primaryColor, { h: 64 }), this.fillType3 = xt(this.secondaryColor, { h: 64 }), this.fillType4 = xt(this.primaryColor, { h: -64 }), this.fillType5 = xt(this.secondaryColor, { h: -64 }), this.fillType6 = xt(this.primaryColor, { h: 128 }), this.fillType7 = xt(this.secondaryColor, { h: 128 });
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["pie" + e] = this["cScale" + e];
this.pie12 = this.pie0, this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = me(this.pie1, 25) || this.primaryColor, this.git1 = this.pie2 || this.secondaryColor, this.git2 = this.pie3 || this.tertiaryColor, this.git3 = this.pie4 || xt(this.primaryColor, { h: -30 }), this.git4 = this.pie5 || xt(this.primaryColor, { h: -60 }), this.git5 = this.pie6 || xt(this.primaryColor, { h: -90 }), this.git6 = this.pie7 || xt(this.primaryColor, { h: 60 }), this.git7 = this.pie8 || xt(this.primaryColor, { h: 120 }), this.gitInv0 = this.gitInv0 || Yt(this.git0), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.branchLabelColor = this.branchLabelColor || this.labelTextColor, this.gitBranchLabel0 = this.branchLabelColor, this.gitBranchLabel1 = "white", this.gitBranchLabel2 = this.branchLabelColor, this.gitBranchLabel3 = "white", this.gitBranchLabel4 = this.branchLabelColor, this.gitBranchLabel5 = this.branchLabelColor, this.gitBranchLabel6 = this.branchLabelColor, this.gitBranchLabel7 = this.branchLabelColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || H1, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || G1;
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const DG = (t) => {
const e = new BG();
return e.calculate(t), e;
}, ga = {
base: {
getThemeVariables: SG
},
dark: {
getThemeVariables: MG
},
default: {
getThemeVariables: RG
},
forest: {
getThemeVariables: NG
},
neutral: {
getThemeVariables: DG
}
}, za = {
theme: "default",
themeVariables: ga.default.getThemeVariables(),
themeCSS: void 0,
maxTextSize: 5e4,
darkMode: !1,
fontFamily: '"trebuchet ms", verdana, arial, sans-serif;',
logLevel: 5,
securityLevel: "strict",
startOnLoad: !0,
arrowMarkerAbsolute: !1,
secure: ["secure", "securityLevel", "startOnLoad", "maxTextSize"],
lazyLoadedDiagrams: [],
deterministicIds: !1,
deterministicIDSeed: void 0,
flowchart: {
diagramPadding: 8,
htmlLabels: !0,
nodeSpacing: 50,
rankSpacing: 50,
curve: "basis",
padding: 15,
useMaxWidth: !0,
defaultRenderer: "dagre-wrapper"
},
sequence: {
hideUnusedParticipants: !1,
activationWidth: 10,
diagramMarginX: 50,
diagramMarginY: 10,
actorMargin: 50,
width: 150,
height: 65,
boxMargin: 10,
boxTextMargin: 5,
noteMargin: 10,
messageMargin: 35,
messageAlign: "center",
mirrorActors: !0,
forceMenus: !1,
bottomMarginAdj: 1,
useMaxWidth: !0,
rightAngles: !1,
showSequenceNumbers: !1,
actorFontSize: 14,
actorFontFamily: '"Open Sans", sans-serif',
actorFontWeight: 400,
noteFontSize: 14,
noteFontFamily: '"trebuchet ms", verdana, arial, sans-serif',
noteFontWeight: 400,
noteAlign: "center",
messageFontSize: 16,
messageFontFamily: '"trebuchet ms", verdana, arial, sans-serif',
messageFontWeight: 400,
wrap: !1,
wrapPadding: 10,
labelBoxWidth: 50,
labelBoxHeight: 20,
messageFont: function() {
return {
fontFamily: this.messageFontFamily,
fontSize: this.messageFontSize,
fontWeight: this.messageFontWeight
};
},
noteFont: function() {
return {
fontFamily: this.noteFontFamily,
fontSize: this.noteFontSize,
fontWeight: this.noteFontWeight
};
},
actorFont: function() {
return {
fontFamily: this.actorFontFamily,
fontSize: this.actorFontSize,
fontWeight: this.actorFontWeight
};
}
},
gantt: {
titleTopMargin: 25,
barHeight: 20,
barGap: 4,
topPadding: 50,
rightPadding: 75,
leftPadding: 75,
gridLineStartPadding: 35,
fontSize: 11,
sectionFontSize: 11,
numberSectionStyles: 4,
axisFormat: "%Y-%m-%d",
useMaxWidth: !0,
topAxis: !1,
useWidth: void 0
},
journey: {
diagramMarginX: 50,
diagramMarginY: 10,
leftMargin: 150,
width: 150,
height: 50,
boxMargin: 10,
boxTextMargin: 5,
noteMargin: 10,
messageMargin: 35,
messageAlign: "center",
bottomMarginAdj: 1,
useMaxWidth: !0,
rightAngles: !1,
taskFontSize: 14,
taskFontFamily: '"Open Sans", sans-serif',
taskMargin: 50,
activationWidth: 10,
textPlacement: "fo",
actorColours: ["#8FBC8F", "#7CFC00", "#00FFFF", "#20B2AA", "#B0E0E6", "#FFFFE0"],
sectionFills: ["#191970", "#8B008B", "#4B0082", "#2F4F4F", "#800000", "#8B4513", "#00008B"],
sectionColours: ["#fff"]
},
class: {
arrowMarkerAbsolute: !1,
dividerMargin: 10,
padding: 5,
textHeight: 10,
useMaxWidth: !0,
defaultRenderer: "dagre-wrapper"
},
state: {
dividerMargin: 10,
sizeUnit: 5,
padding: 8,
textHeight: 10,
titleShift: -15,
noteMargin: 10,
forkWidth: 70,
forkHeight: 7,
miniPadding: 2,
fontSizeFactor: 5.02,
fontSize: 24,
labelHeight: 16,
edgeLengthFactor: "20",
compositTitleSize: 35,
radius: 5,
useMaxWidth: !0,
defaultRenderer: "dagre-wrapper"
},
er: {
diagramPadding: 20,
layoutDirection: "TB",
minEntityWidth: 100,
minEntityHeight: 75,
entityPadding: 15,
stroke: "gray",
fill: "honeydew",
fontSize: 12,
useMaxWidth: !0
},
pie: {
useWidth: void 0,
useMaxWidth: !0
},
requirement: {
useWidth: void 0,
useMaxWidth: !0,
rect_fill: "#f9f9f9",
text_color: "#333",
rect_border_size: "0.5px",
rect_border_color: "#bbb",
rect_min_width: 200,
rect_min_height: 200,
fontSize: 14,
rect_padding: 10,
line_height: 20
},
gitGraph: {
diagramPadding: 8,
nodeLabel: {
width: 75,
height: 100,
x: -25,
y: 0
},
mainBranchName: "main",
mainBranchOrder: 0,
showCommitLabel: !0,
showBranches: !0,
rotateCommitLabel: !0
},
c4: {
useWidth: void 0,
diagramMarginX: 50,
diagramMarginY: 10,
c4ShapeMargin: 50,
c4ShapePadding: 20,
width: 216,
height: 60,
boxMargin: 10,
useMaxWidth: !0,
c4ShapeInRow: 4,
nextLinePaddingX: 0,
c4BoundaryInRow: 2,
personFontSize: 14,
personFontFamily: '"Open Sans", sans-serif',
personFontWeight: "normal",
external_personFontSize: 14,
external_personFontFamily: '"Open Sans", sans-serif',
external_personFontWeight: "normal",
systemFontSize: 14,
systemFontFamily: '"Open Sans", sans-serif',
systemFontWeight: "normal",
external_systemFontSize: 14,
external_systemFontFamily: '"Open Sans", sans-serif',
external_systemFontWeight: "normal",
system_dbFontSize: 14,
system_dbFontFamily: '"Open Sans", sans-serif',
system_dbFontWeight: "normal",
external_system_dbFontSize: 14,
external_system_dbFontFamily: '"Open Sans", sans-serif',
external_system_dbFontWeight: "normal",
system_queueFontSize: 14,
system_queueFontFamily: '"Open Sans", sans-serif',
system_queueFontWeight: "normal",
external_system_queueFontSize: 14,
external_system_queueFontFamily: '"Open Sans", sans-serif',
external_system_queueFontWeight: "normal",
boundaryFontSize: 14,
boundaryFontFamily: '"Open Sans", sans-serif',
boundaryFontWeight: "normal",
messageFontSize: 12,
messageFontFamily: '"Open Sans", sans-serif',
messageFontWeight: "normal",
containerFontSize: 14,
containerFontFamily: '"Open Sans", sans-serif',
containerFontWeight: "normal",
external_containerFontSize: 14,
external_containerFontFamily: '"Open Sans", sans-serif',
external_containerFontWeight: "normal",
container_dbFontSize: 14,
container_dbFontFamily: '"Open Sans", sans-serif',
container_dbFontWeight: "normal",
external_container_dbFontSize: 14,
external_container_dbFontFamily: '"Open Sans", sans-serif',
external_container_dbFontWeight: "normal",
container_queueFontSize: 14,
container_queueFontFamily: '"Open Sans", sans-serif',
container_queueFontWeight: "normal",
external_container_queueFontSize: 14,
external_container_queueFontFamily: '"Open Sans", sans-serif',
external_container_queueFontWeight: "normal",
componentFontSize: 14,
componentFontFamily: '"Open Sans", sans-serif',
componentFontWeight: "normal",
external_componentFontSize: 14,
external_componentFontFamily: '"Open Sans", sans-serif',
external_componentFontWeight: "normal",
component_dbFontSize: 14,
component_dbFontFamily: '"Open Sans", sans-serif',
component_dbFontWeight: "normal",
external_component_dbFontSize: 14,
external_component_dbFontFamily: '"Open Sans", sans-serif',
external_component_dbFontWeight: "normal",
component_queueFontSize: 14,
component_queueFontFamily: '"Open Sans", sans-serif',
component_queueFontWeight: "normal",
external_component_queueFontSize: 14,
external_component_queueFontFamily: '"Open Sans", sans-serif',
external_component_queueFontWeight: "normal",
wrap: !0,
wrapPadding: 10,
personFont: function() {
return {
fontFamily: this.personFontFamily,
fontSize: this.personFontSize,
fontWeight: this.personFontWeight
};
},
external_personFont: function() {
return {
fontFamily: this.external_personFontFamily,
fontSize: this.external_personFontSize,
fontWeight: this.external_personFontWeight
};
},
systemFont: function() {
return {
fontFamily: this.systemFontFamily,
fontSize: this.systemFontSize,
fontWeight: this.systemFontWeight
};
},
external_systemFont: function() {
return {
fontFamily: this.external_systemFontFamily,
fontSize: this.external_systemFontSize,
fontWeight: this.external_systemFontWeight
};
},
system_dbFont: function() {
return {
fontFamily: this.system_dbFontFamily,
fontSize: this.system_dbFontSize,
fontWeight: this.system_dbFontWeight
};
},
external_system_dbFont: function() {
return {
fontFamily: this.external_system_dbFontFamily,
fontSize: this.external_system_dbFontSize,
fontWeight: this.external_system_dbFontWeight
};
},
system_queueFont: function() {
return {
fontFamily: this.system_queueFontFamily,
fontSize: this.system_queueFontSize,
fontWeight: this.system_queueFontWeight
};
},
external_system_queueFont: function() {
return {
fontFamily: this.external_system_queueFontFamily,
fontSize: this.external_system_queueFontSize,
fontWeight: this.external_system_queueFontWeight
};
},
containerFont: function() {
return {
fontFamily: this.containerFontFamily,
fontSize: this.containerFontSize,
fontWeight: this.containerFontWeight
};
},
external_containerFont: function() {
return {
fontFamily: this.external_containerFontFamily,
fontSize: this.external_containerFontSize,
fontWeight: this.external_containerFontWeight
};
},
container_dbFont: function() {
return {
fontFamily: this.container_dbFontFamily,
fontSize: this.container_dbFontSize,
fontWeight: this.container_dbFontWeight
};
},
external_container_dbFont: function() {
return {
fontFamily: this.external_container_dbFontFamily,
fontSize: this.external_container_dbFontSize,
fontWeight: this.external_container_dbFontWeight
};
},
container_queueFont: function() {
return {
fontFamily: this.container_queueFontFamily,
fontSize: this.container_queueFontSize,
fontWeight: this.container_queueFontWeight
};
},
external_container_queueFont: function() {
return {
fontFamily: this.external_container_queueFontFamily,
fontSize: this.external_container_queueFontSize,
fontWeight: this.external_container_queueFontWeight
};
},
componentFont: function() {
return {
fontFamily: this.componentFontFamily,
fontSize: this.componentFontSize,
fontWeight: this.componentFontWeight
};
},
external_componentFont: function() {
return {
fontFamily: this.external_componentFontFamily,
fontSize: this.external_componentFontSize,
fontWeight: this.external_componentFontWeight
};
},
component_dbFont: function() {
return {
fontFamily: this.component_dbFontFamily,
fontSize: this.component_dbFontSize,
fontWeight: this.component_dbFontWeight
};
},
external_component_dbFont: function() {
return {
fontFamily: this.external_component_dbFontFamily,
fontSize: this.external_component_dbFontSize,
fontWeight: this.external_component_dbFontWeight
};
},
component_queueFont: function() {
return {
fontFamily: this.component_queueFontFamily,
fontSize: this.component_queueFontSize,
fontWeight: this.component_queueFontWeight
};
},
external_component_queueFont: function() {
return {
fontFamily: this.external_component_queueFontFamily,
fontSize: this.external_component_queueFontSize,
fontWeight: this.external_component_queueFontWeight
};
},
boundaryFont: function() {
return {
fontFamily: this.boundaryFontFamily,
fontSize: this.boundaryFontSize,
fontWeight: this.boundaryFontWeight
};
},
messageFont: function() {
return {
fontFamily: this.messageFontFamily,
fontSize: this.messageFontSize,
fontWeight: this.messageFontWeight
};
},
person_bg_color: "#08427B",
person_border_color: "#073B6F",
external_person_bg_color: "#686868",
external_person_border_color: "#8A8A8A",
system_bg_color: "#1168BD",
system_border_color: "#3C7FC0",
system_db_bg_color: "#1168BD",
system_db_border_color: "#3C7FC0",
system_queue_bg_color: "#1168BD",
system_queue_border_color: "#3C7FC0",
external_system_bg_color: "#999999",
external_system_border_color: "#8A8A8A",
external_system_db_bg_color: "#999999",
external_system_db_border_color: "#8A8A8A",
external_system_queue_bg_color: "#999999",
external_system_queue_border_color: "#8A8A8A",
container_bg_color: "#438DD5",
container_border_color: "#3C7FC0",
container_db_bg_color: "#438DD5",
container_db_border_color: "#3C7FC0",
container_queue_bg_color: "#438DD5",
container_queue_border_color: "#3C7FC0",
external_container_bg_color: "#B3B3B3",
external_container_border_color: "#A6A6A6",
external_container_db_bg_color: "#B3B3B3",
external_container_db_border_color: "#A6A6A6",
external_container_queue_bg_color: "#B3B3B3",
external_container_queue_border_color: "#A6A6A6",
component_bg_color: "#85BBF0",
component_border_color: "#78A8D8",
component_db_bg_color: "#85BBF0",
component_db_border_color: "#78A8D8",
component_queue_bg_color: "#85BBF0",
component_queue_border_color: "#78A8D8",
external_component_bg_color: "#CCCCCC",
external_component_border_color: "#BFBFBF",
external_component_db_bg_color: "#CCCCCC",
external_component_db_border_color: "#BFBFBF",
external_component_queue_bg_color: "#CCCCCC",
external_component_queue_border_color: "#BFBFBF"
},
mindmap: {
useMaxWidth: !0,
padding: 10,
maxNodeWidth: 200
},
fontSize: 16
};
za.class && (za.class.arrowMarkerAbsolute = za.arrowMarkerAbsolute);
za.gitGraph && (za.gitGraph.arrowMarkerAbsolute = za.arrowMarkerAbsolute);
const AS = (t, e = "") => Object.keys(t).reduce((r, n) => Array.isArray(t[n]) ? r : typeof t[n] == "object" && t[n] !== null ? [...r, e + n, ...AS(t[n], "")] : [...r, e + n], []), OG = AS(za, ""), FG = /[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi, PG = /\s*%%.*\n/gm, Af = {}, s4 = function(t, e) {
t = t.replace(FG, "").replace(PG, `
`);
for (const [r, { detector: n }] of Object.entries(Af))
if (n(t, e))
return r;
throw new Error(`No diagram type detected for text: ${t}`);
}, MS = (t, e, r) => {
if (Af[t])
throw new Error(`Detector with key ${t} already exists`);
Af[t] = { detector: e, loader: r }, H.debug(`Detector with key ${t} added${r ? " with loader" : ""}`);
}, qG = (t) => Af[t].loader, mr = function(t, e, r) {
const { depth: n, clobber: i } = Object.assign({ depth: 2, clobber: !1 }, r);
return Array.isArray(e) && !Array.isArray(t) ? (e.forEach((a) => mr(t, a, r)), t) : Array.isArray(e) && Array.isArray(t) ? (e.forEach((a) => {
t.indexOf(a) === -1 && t.push(a);
}), t) : typeof t > "u" || n <= 0 ? t != null && typeof t == "object" && typeof e == "object" ? Object.assign(t, e) : e : (typeof e < "u" && typeof t == "object" && typeof e == "object" && Object.keys(e).forEach((a) => {
typeof e[a] == "object" && (t[a] === void 0 || typeof t[a] == "object") ? (t[a] === void 0 && (t[a] = Array.isArray(e[a]) ? [] : {}), t[a] = mr(t[a], e[a], { depth: n - 1, clobber: i })) : (i || typeof t[a] != "object" && typeof e[a] != "object") && (t[a] = e[a]);
}), t);
};
var VG = typeof Ol == "object" && Ol && Ol.Object === Object && Ol, LS = VG, zG = LS, YG = typeof self == "object" && self && self.Object === Object && self, UG = zG || YG || Function("return this")(), di = UG, WG = di, HG = WG.Symbol, sl = HG, Xv = sl, RS = Object.prototype, GG = RS.hasOwnProperty, jG = RS.toString, Ll = Xv ? Xv.toStringTag : void 0;
function $G(t) {
var e = GG.call(t, Ll), r = t[Ll];
try {
t[Ll] = void 0;
var n = !0;
} catch {
}
var i = jG.call(t);
return n && (e ? t[Ll] = r : delete t[Ll]), i;
}
var XG = $G, KG = Object.prototype, ZG = KG.toString;
function QG(t) {
return ZG.call(t);
}
var JG = QG, Kv = sl, tj = XG, ej = JG, rj = "[object Null]", nj = "[object Undefined]", Zv = Kv ? Kv.toStringTag : void 0;
function ij(t) {
return t == null ? t === void 0 ? nj : rj : Zv && Zv in Object(t) ? tj(t) : ej(t);
}
var Ks = ij;
function aj(t) {
var e = typeof t;
return t != null && (e == "object" || e == "function");
}
var zn = aj, sj = Ks, oj = zn, lj = "[object AsyncFunction]", cj = "[object Function]", uj = "[object GeneratorFunction]", hj = "[object Proxy]";
function fj(t) {
if (!oj(t))
return !1;
var e = sj(t);
return e == cj || e == uj || e == lj || e == hj;
}
var ol = fj, dj = di, pj = dj["__core-js_shared__"], gj = pj, Sd = gj, Qv = function() {
var t = /[^.]+$/.exec(Sd && Sd.keys && Sd.keys.IE_PROTO || "");
return t ? "Symbol(src)_1." + t : "";
}();
function yj(t) {
return !!Qv && Qv in t;
}
var mj = yj, bj = Function.prototype, _j = bj.toString;
function vj(t) {
if (t != null) {
try {
return _j.call(t);
} catch {
}
try {
return t + "";
} catch {
}
}
return "";
}
var IS = vj, xj = ol, kj = mj, wj = zn, Tj = IS, Ej = /[\\^$.*+?()[\]{}|]/g, Cj = /^\[object .+?Constructor\]$/, Sj = Function.prototype, Aj = Object.prototype, Mj = Sj.toString, Lj = Aj.hasOwnProperty, Rj = RegExp(
"^" + Mj.call(Lj).replace(Ej, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Ij(t) {
if (!wj(t) || kj(t))
return !1;
var e = xj(t) ? Rj : Cj;
return e.test(Tj(t));
}
var Nj = Ij;
function Bj(t, e) {
return t == null ? void 0 : t[e];
}
var Dj = Bj, Oj = Nj, Fj = Dj;
function Pj(t, e) {
var r = Fj(t, e);
return Oj(r) ? r : void 0;
}
var Zs = Pj, qj = Zs, Vj = qj(Object, "create"), j1 = Vj, Jv = j1;
function zj() {
this.__data__ = Jv ? Jv(null) : {}, this.size = 0;
}
var Yj = zj;
function Uj(t) {
var e = this.has(t) && delete this.__data__[t];
return this.size -= e ? 1 : 0, e;
}
var Wj = Uj, Hj = j1, Gj = "__lodash_hash_undefined__", jj = Object.prototype, $j = jj.hasOwnProperty;
function Xj(t) {
var e = this.__data__;
if (Hj) {
var r = e[t];
return r === Gj ? void 0 : r;
}
return $j.call(e, t) ? e[t] : void 0;
}
var Kj = Xj, Zj = j1, Qj = Object.prototype, Jj = Qj.hasOwnProperty;
function t$(t) {
var e = this.__data__;
return Zj ? e[t] !== void 0 : Jj.call(e, t);
}
var e$ = t$, r$ = j1, n$ = "__lodash_hash_undefined__";
function i$(t, e) {
var r = this.__data__;
return this.size += this.has(t) ? 0 : 1, r[t] = r$ && e === void 0 ? n$ : e, this;
}
var a$ = i$, s$ = Yj, o$ = Wj, l$ = Kj, c$ = e$, u$ = a$;
function ll(t) {
var e = -1, r = t == null ? 0 : t.length;
for (this.clear(); ++e < r; ) {
var n = t[e];
this.set(n[0], n[1]);
}
}
ll.prototype.clear = s$;
ll.prototype.delete = o$;
ll.prototype.get = l$;
ll.prototype.has = c$;
ll.prototype.set = u$;
var h$ = ll;
function f$() {
this.__data__ = [], this.size = 0;
}
var d$ = f$;
function p$(t, e) {
return t === e || t !== t && e !== e;
}
var cl = p$, g$ = cl;
function y$(t, e) {
for (var r = t.length; r--; )
if (g$(t[r][0], e))
return r;
return -1;
}
var $1 = y$, m$ = $1, b$ = Array.prototype, _$ = b$.splice;
function v$(t) {
var e = this.__data__, r = m$(e, t);
if (r < 0)
return !1;
var n = e.length - 1;
return r == n ? e.pop() : _$.call(e, r, 1), --this.size, !0;
}
var x$ = v$, k$ = $1;
function w$(t) {
var e = this.__data__, r = k$(e, t);
return r < 0 ? void 0 : e[r][1];
}
var T$ = w$, E$ = $1;
function C$(t) {
return E$(this.__data__, t) > -1;
}
var S$ = C$, A$ = $1;
function M$(t, e) {
var r = this.__data__, n = A$(r, t);
return n < 0 ? (++this.size, r.push([t, e])) : r[n][1] = e, this;
}
var L$ = M$, R$ = d$, I$ = x$, N$ = T$, B$ = S$, D$ = L$;
function ul(t) {
var e = -1, r = t == null ? 0 : t.length;
for (this.clear(); ++e < r; ) {
var n = t[e];
this.set(n[0], n[1]);
}
}
ul.prototype.clear = R$;
ul.prototype.delete = I$;
ul.prototype.get = N$;
ul.prototype.has = B$;
ul.prototype.set = D$;
var X1 = ul, O$ = Zs, F$ = di, P$ = O$(F$, "Map"), o4 = P$, t6 = h$, q$ = X1, V$ = o4;
function z$() {
this.size = 0, this.__data__ = {
hash: new t6(),
map: new (V$ || q$)(),
string: new t6()
};
}
var Y$ = z$;
function U$(t) {
var e = typeof t;
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
}
var W$ = U$, H$ = W$;
function G$(t, e) {
var r = t.__data__;
return H$(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
}
var K1 = G$, j$ = K1;
function $$(t) {
var e = j$(this, t).delete(t);
return this.size -= e ? 1 : 0, e;
}
var X$ = $$, K$ = K1;
function Z$(t) {
return K$(this, t).get(t);
}
var Q$ = Z$, J$ = K1;
function tX(t) {
return J$(this, t).has(t);
}
var eX = tX, rX = K1;
function nX(t, e) {
var r = rX(this, t), n = r.size;
return r.set(t, e), this.size += r.size == n ? 0 : 1, this;
}
var iX = nX, aX = Y$, sX = X$, oX = Q$, lX = eX, cX = iX;
function hl(t) {
var e = -1, r = t == null ? 0 : t.length;
for (this.clear(); ++e < r; ) {
var n = t[e];
this.set(n[0], n[1]);
}
}
hl.prototype.clear = aX;
hl.prototype.delete = sX;
hl.prototype.get = oX;
hl.prototype.has = lX;
hl.prototype.set = cX;
var l4 = hl, NS = l4, uX = "Expected a function";
function c4(t, e) {
if (typeof t != "function" || e != null && typeof e != "function")
throw new TypeError(uX);
var r = function() {
var n = arguments, i = e ? e.apply(this, n) : n[0], a = r.cache;
if (a.has(i))
return a.get(i);
var s = t.apply(this, n);
return r.cache = a.set(i, s) || a, s;
};
return r.cache = new (c4.Cache || NS)(), r;
}
c4.Cache = NS;
var Z1 = c4;
const hX = {
curveBasis: Ps,
curveBasisClosed: QC,
curveBasisOpen: tS,
curveLinear: bn,
curveLinearClosed: sS,
curveMonotoneX: cS,
curveMonotoneY: uS,
curveNatural: fS,
curveStep: dS,
curveStepAfter: gS,
curveStepBefore: pS
}, Ad = /[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi, fX = /\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi, dX = function(t, e) {
const r = BS(t, /(?:init\b)|(?:initialize\b)/);
let n = {};
if (Array.isArray(r)) {
const i = r.map((a) => a.args);
qs(i), n = mr(n, [...i]);
} else
n = r.args;
if (n) {
let i = s4(t, e);
["config"].forEach((a) => {
typeof n[a] < "u" && (i === "flowchart-v2" && (i = "flowchart"), n[i] = n[a], delete n[a]);
});
}
return n;
}, BS = function(t, e = null) {
try {
const r = new RegExp(
`[%]{2}(?![{]${fX.source})(?=[}][%]{2}).*
`,
"ig"
);
t = t.trim().replace(r, "").replace(/'/gm, '"'), H.debug(
`Detecting diagram directive${e !== null ? " type:" + e : ""} based on the text:${t}`
);
let n;
const i = [];
for (; (n = Ad.exec(t)) !== null; )
if (n.index === Ad.lastIndex && Ad.lastIndex++, n && !e || e && n[1] && n[1].match(e) || e && n[2] && n[2].match(e)) {
const a = n[1] ? n[1] : n[2], s = n[3] ? n[3].trim() : n[4] ? JSON.parse(n[4].trim()) : null;
i.push({ type: a, args: s });
}
return i.length === 0 && i.push({ type: t, args: null }), i.length === 1 ? i[0] : i;
} catch (r) {
return H.error(
`ERROR: ${r.message} - Unable to parse directive
${e !== null ? " type:" + e : ""} based on the text:${t}`
), { type: null, args: null };
}
}, pX = function(t, e) {
for (let r = 0; r < e.length; r++)
if (e[r].match(t))
return r;
return -1;
}, Ii = (t, e) => {
if (!t)
return e;
const r = `curve${t.charAt(0).toUpperCase() + t.slice(1)}`;
return hX[r] || e;
}, gX = (t, e) => {
const r = t.trim();
if (r)
return e.securityLevel !== "loose" ? Vi(r) : r;
}, yX = (t, ...e) => {
const r = t.split("."), n = r.length - 1, i = r[n];
let a = window;
for (let s = 0; s < n; s++)
if (a = a[r[s]], !a)
return;
a[i](...e);
}, Ic = (t, e) => t && e ? Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2)) : 0, mX = (t) => {
let e, r = 0;
t.forEach((a) => {
r += Ic(a, e), e = a;
});
let n = r / 2, i;
return e = void 0, t.forEach((a) => {
if (e && !i) {
const s = Ic(a, e);
if (s < n)
n -= s;
else {
const o = n / s;
o <= 0 && (i = e), o >= 1 && (i = { x: a.x, y: a.y }), o > 0 && o < 1 && (i = {
x: (1 - o) * e.x + o * a.x,
y: (1 - o) * e.y + o * a.y
});
}
}
e = a;
}), i;
}, bX = (t) => t.length === 1 ? t[0] : mX(t), _X = (t, e, r) => {
let n;
H.info("our points", e), e[0] !== r && (e = e.reverse()), e.forEach((h) => {
totalDistance += Ic(h, n), n = h;
});
let a = 25, s;
n = void 0, e.forEach((h) => {
if (n && !s) {
const d = Ic(h, n);
if (d < a)
a -= d;
else {
const f = a / d;
f <= 0 && (s = n), f >= 1 && (s = { x: h.x, y: h.y }), f > 0 && f < 1 && (s = {
x: (1 - f) * n.x + f * h.x,
y: (1 - f) * n.y + f * h.y
});
}
}
n = h;
});
const o = t ? 10 : 5, l = Math.atan2(e[0].y - s.y, e[0].x - s.x), u = { x: 0, y: 0 };
return u.x = Math.sin(l) * o + (e[0].x + s.x) / 2, u.y = -Math.cos(l) * o + (e[0].y + s.y) / 2, u;
}, vX = (t, e, r) => {
let n = JSON.parse(JSON.stringify(r)), i;
H.info("our points", n), e !== "start_left" && e !== "start_right" && (n = n.reverse()), n.forEach((d) => {
i = d;
});
let s = 25 + t, o;
i = void 0, n.forEach((d) => {
if (i && !o) {
const f = Ic(d, i);
if (f < s)
s -= f;
else {
const p = s / f;
p <= 0 && (o = i), p >= 1 && (o = { x: d.x, y: d.y }), p > 0 && p < 1 && (o = {
x: (1 - p) * i.x + p * d.x,
y: (1 - p) * i.y + p * d.y
});
}
}
i = d;
});
const l = 10 + t * 0.5, u = Math.atan2(n[0].y - o.y, n[0].x - o.x), h = { x: 0, y: 0 };
return h.x = Math.sin(u) * l + (n[0].x + o.x) / 2, h.y = -Math.cos(u) * l + (n[0].y + o.y) / 2, e === "start_left" && (h.x = Math.sin(u + Math.PI) * l + (n[0].x + o.x) / 2, h.y = -Math.cos(u + Math.PI) * l + (n[0].y + o.y) / 2), e === "end_right" && (h.x = Math.sin(u - Math.PI) * l + (n[0].x + o.x) / 2 - 5, h.y = -Math.cos(u - Math.PI) * l + (n[0].y + o.y) / 2 - 5), e === "end_left" && (h.x = Math.sin(u) * l + (n[0].x + o.x) / 2 - 5, h.y = -Math.cos(u) * l + (n[0].y + o.y) / 2 - 5), h;
}, Ka = (t) => {
let e = "", r = "";
for (let n = 0; n < t.length; n++)
typeof t[n] < "u" && (t[n].startsWith("color:") || t[n].startsWith("text-align:") ? r = r + t[n] + ";" : e = e + t[n] + ";");
return { style: e, labelStyle: r };
};
let e6 = 0;
const DS = () => (e6++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + e6);
function xX(t) {
let e = "";
const r = "0123456789abcdef", n = r.length;
for (let i = 0; i < t; i++)
e += r.charAt(Math.floor(Math.random() * n));
return e;
}
const OS = (t) => xX(t.length), kX = function() {
return {
x: 0,
y: 0,
fill: void 0,
anchor: "start",
style: "#666",
width: 100,
height: 100,
textMargin: 0,
rx: 0,
ry: 0,
valign: void 0
};
}, wX = function(t, e) {
const r = e.text.replace(pe.lineBreakRegex, " "), n = t.append("text");
n.attr("x", e.x), n.attr("y", e.y), n.style("text-anchor", e.anchor), n.style("font-family", e.fontFamily), n.style("font-size", e.fontSize), n.style("font-weight", e.fontWeight), n.attr("fill", e.fill), typeof e.class < "u" && n.attr("class", e.class);
const i = n.append("tspan");
return i.attr("x", e.x + e.textMargin * 2), i.attr("fill", e.fill), i.text(r), n;
}, FS = Z1(
(t, e, r) => {
if (!t || (r = Object.assign(
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" },
r
), pe.lineBreakRegex.test(t)))
return t;
const n = t.split(" "), i = [];
let a = "";
return n.forEach((s, o) => {
const l = Ni(`${s} `, r), u = Ni(a, r);
if (l > e) {
const { hyphenatedStrings: f, remainingWord: p } = TX(s, e, "-", r);
i.push(a, ...f), a = p;
} else
u + l >= e ? (i.push(a), a = s) : a = [a, s].filter(Boolean).join(" ");
o + 1 === n.length && i.push(a);
}), i.filter((s) => s !== "").join(r.joinWith);
},
(t, e, r) => `${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`
), TX = Z1(
(t, e, r = "-", n) => {
n = Object.assign(
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 },
n
);
const i = t.split(""), a = [];
let s = "";
return i.forEach((o, l) => {
const u = `${s}${o}`;
if (Ni(u, n) >= e) {
const d = l + 1, f = i.length === d, p = `${u}${r}`;
a.push(f ? u : p), s = "";
} else
s = u;
}), { hyphenatedStrings: a, remainingWord: s };
},
(t, e, r = "-", n) => `${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`
), ob = function(t, e) {
return e = Object.assign(
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 15 },
e
), u4(t, e).height;
}, Ni = function(t, e) {
return e = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, e), u4(t, e).width;
}, u4 = Z1(
function(t, e) {
e = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, e);
const { fontSize: r, fontFamily: n, fontWeight: i } = e;
if (!t)
return { width: 0, height: 0 };
const a = ["sans-serif", n], s = t.split(pe.lineBreakRegex), o = [], l = St("body");
if (!l.remove)
return { width: 0, height: 0, lineHeight: 0 };
const u = l.append("svg");
for (const d of a) {
let f = 0;
const p = { width: 0, height: 0, lineHeight: 0 };
for (const m of s) {
const _ = kX();
_.text = m;
const y = wX(u, _).style("font-size", r).style("font-weight", i).style("font-family", d), b = (y._groups || y)[0][0].getBBox();
p.width = Math.round(Math.max(p.width, b.width)), f = Math.round(b.height), p.height += f, p.lineHeight = Math.round(Math.max(p.lineHeight, f));
}
o.push(p);
}
u.remove();
const h = isNaN(o[1].height) || isNaN(o[1].width) || isNaN(o[1].lineHeight) || o[0].height > o[1].height && o[0].width > o[1].width && o[0].lineHeight > o[1].lineHeight ? 0 : 1;
return o[h];
},
(t, e) => `${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`
), EX = class {
constructor(e, r) {
this.deterministic = e, this.seed = r, this.count = r ? r.length : 0;
}
next() {
return this.deterministic ? this.count++ : Date.now();
}
};
let Ju;
const CX = function(t) {
return Ju = Ju || document.createElement("div"), t = escape(t).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"), Ju.innerHTML = t, unescape(Ju.textContent);
}, qs = (t) => {
if (H.debug("directiveSanitizer called with", t), typeof t == "object" && (t.length ? t.forEach((e) => qs(e)) : Object.keys(t).forEach((e) => {
H.debug("Checking key", e), e.indexOf("__") === 0 && (H.debug("sanitize deleting __ option", e), delete t[e]), e.indexOf("proto") >= 0 && (H.debug("sanitize deleting proto option", e), delete t[e]), e.indexOf("constr") >= 0 && (H.debug("sanitize deleting constr option", e), delete t[e]), e.indexOf("themeCSS") >= 0 && (H.debug("sanitizing themeCss option"), t[e] = Ah(t[e])), e.indexOf("fontFamily") >= 0 && (H.debug("sanitizing fontFamily option"), t[e] = Ah(t[e])), e.indexOf("altFontFamily") >= 0 && (H.debug("sanitizing altFontFamily option"), t[e] = Ah(t[e])), OG.indexOf(e) < 0 ? (H.debug("sanitize deleting option", e), delete t[e]) : typeof t[e] == "object" && (H.debug("sanitize deleting object", e), qs(t[e]));
})), t.themeVariables) {
const e = Object.keys(t.themeVariables);
for (let r = 0; r < e.length; r++) {
const n = e[r], i = t.themeVariables[n];
i && i.match && !i.match(/^[a-zA-Z0-9#,";()%. ]+$/) && (t.themeVariables[n] = "");
}
}
H.debug("After sanitization", t);
}, Ah = (t) => {
let e = 0, r = 0;
for (let n = 0; n < t.length; n++) {
if (e < r)
return "{ /* ERROR: Unbalanced CSS */ }";
t[n] === "{" ? e++ : t[n] === "}" && r++;
}
return e !== r ? "{ /* ERROR: Unbalanced CSS */ }" : t;
};
function PS(t) {
return "str" in t;
}
function SX(t) {
return t instanceof Error ? t.message : String(t);
}
const Se = {
assignWithDepth: mr,
wrapLabel: FS,
calculateTextHeight: ob,
calculateTextWidth: Ni,
calculateTextDimensions: u4,
detectInit: dX,
detectDirective: BS,
isSubstringInArray: pX,
interpolateToCurve: Ii,
calcLabelPosition: bX,
calcCardinalityPosition: _X,
calcTerminalLabelPosition: vX,
formatUrl: gX,
getStylesFromArray: Ka,
generateId: DS,
random: OS,
runFunc: yX,
entityDecode: CX,
initIdGenerator: EX,
directiveSanitizer: qs,
sanitizeCss: Ah
};
var qS = "comm", VS = "rule", zS = "decl", AX = "@import", MX = "@keyframes", LX = Math.abs, h4 = String.fromCharCode;
function YS(t) {
return t.trim();
}
function lb(t, e, r) {
return t.replace(e, r);
}
function RX(t, e) {
return t.indexOf(e);
}
function Q1(t, e) {
return t.charCodeAt(e) | 0;
}
function Nc(t, e, r) {
return t.slice(e, r);
}
function Ra(t) {
return t.length;
}
function US(t) {
return t.length;
}
function th(t, e) {
return e.push(t), t;
}
var J1 = 1, jo = 1, WS = 0, qn = 0, gr = 0, fl = "";
function f4(t, e, r, n, i, a, s) {
return { value: t, root: e, parent: r, type: n, props: i, children: a, line: J1, column: jo, length: s, return: "" };
}
function IX() {
return gr;
}
function NX() {
return gr = qn > 0 ? Q1(fl, --qn) : 0, jo--, gr === 10 && (jo = 1, J1--), gr;
}
function ii() {
return gr = qn < WS ? Q1(fl, qn++) : 0, jo++, gr === 10 && (jo = 1, J1++), gr;
}
function Cs() {
return Q1(fl, qn);
}
function Mh() {
return qn;
}
function t0(t, e) {
return Nc(fl, t, e);
}
function cb(t) {
switch (t) {
case 0:
case 9:
case 10:
case 13:
case 32:
return 5;
case 33:
case 43:
case 44:
case 47:
case 62:
case 64:
case 126:
case 59:
case 123:
case 125:
return 4;
case 58:
return 3;
case 34:
case 39:
case 40:
case 91:
return 2;
case 41:
case 93:
return 1;
}
return 0;
}
function BX(t) {
return J1 = jo = 1, WS = Ra(fl = t), qn = 0, [];
}
function DX(t) {
return fl = "", t;
}
function Md(t) {
return YS(t0(qn - 1, ub(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
}
function OX(t) {
for (; (gr = Cs()) && gr < 33; )
ii();
return cb(t) > 2 || cb(gr) > 3 ? "" : " ";
}
function FX(t, e) {
for (; --e && ii() && !(gr < 48 || gr > 102 || gr > 57 && gr < 65 || gr > 70 && gr < 97); )
;
return t0(t, Mh() + (e < 6 && Cs() == 32 && ii() == 32));
}
function ub(t) {
for (; ii(); )
switch (gr) {
case t:
return qn;
case 34:
case 39:
t !== 34 && t !== 39 && ub(gr);
break;
case 40:
t === 41 && ub(t);
break;
case 92:
ii();
break;
}
return qn;
}
function PX(t, e) {
for (; ii() && t + gr !== 47 + 10; )
if (t + gr === 42 + 42 && Cs() === 47)
break;
return "/*" + t0(e, qn - 1) + "*" + h4(t === 47 ? t : ii());
}
function qX(t) {
for (; !cb(Cs()); )
ii();
return t0(t, qn);
}
function HS(t) {
return DX(Lh("", null, null, null, [""], t = BX(t), 0, [0], t));
}
function Lh(t, e, r, n, i, a, s, o, l) {
for (var u = 0, h = 0, d = s, f = 0, p = 0, m = 0, _ = 1, y = 1, b = 1, x = 0, k = "", T = i, C = a, M = n, S = k; y; )
switch (m = x, x = ii()) {
case 40:
if (m != 108 && Q1(S, d - 1) == 58) {
RX(S += lb(Md(x), "&", "&\f"), "&\f") != -1 && (b = -1);
break;
}
case 34:
case 39:
case 91:
S += Md(x);
break;
case 9:
case 10:
case 13:
case 32:
S += OX(m);
break;
case 92:
S += FX(Mh() - 1, 7);
continue;
case 47:
switch (Cs()) {
case 42:
case 47:
th(VX(PX(ii(), Mh()), e, r), l);
break;
default:
S += "/";
}
break;
case 123 * _:
o[u++] = Ra(S) * b;
case 125 * _:
case 59:
case 0:
switch (x) {
case 0:
case 125:
y = 0;
case 59 + h:
p > 0 && Ra(S) - d && th(p > 32 ? n6(S + ";", n, r, d - 1) : n6(lb(S, " ", "") + ";", n, r, d - 2), l);
break;
case 59:
S += ";";
default:
if (th(M = r6(S, e, r, u, h, i, o, k, T = [], C = [], d), a), x === 123)
if (h === 0)
Lh(S, e, M, M, T, a, d, o, C);
else
switch (f) {
case 100:
case 109:
case 115:
Lh(t, M, M, n && th(r6(t, M, M, 0, 0, i, o, k, i, T = [], d), C), i, C, d, o, n ? T : C);
break;
default:
Lh(S, M, M, M, [""], C, 0, o, C);
}
}
u = h = p = 0, _ = b = 1, k = S = "", d = s;
break;
case 58:
d = 1 + Ra(S), p = m;
default:
if (_ < 1) {
if (x == 123)
--_;
else if (x == 125 && _++ == 0 && NX() == 125)
continue;
}
switch (S += h4(x), x * _) {
case 38:
b = h > 0 ? 1 : (S += "\f", -1);
break;
case 44:
o[u++] = (Ra(S) - 1) * b, b = 1;
break;
case 64:
Cs() === 45 && (S += Md(ii())), f = Cs(), h = d = Ra(k = S += qX(Mh())), x++;
break;
case 45:
m === 45 && Ra(S) == 2 && (_ = 0);
}
}
return a;
}
function r6(t, e, r, n, i, a, s, o, l, u, h) {
for (var d = i - 1, f = i === 0 ? a : [""], p = US(f), m = 0, _ = 0, y = 0; m < n; ++m)
for (var b = 0, x = Nc(t, d + 1, d = LX(_ = s[m])), k = t; b < p; ++b)
(k = YS(_ > 0 ? f[b] + " " + x : lb(x, /&\f/g, f[b]))) && (l[y++] = k);
return f4(t, e, r, i === 0 ? VS : o, l, u, h);
}
function VX(t, e, r) {
return f4(t, e, r, qS, h4(IX()), Nc(t, 2, -2), 0);
}
function n6(t, e, r, n) {
return f4(t, e, r, zS, Nc(t, 0, n), Nc(t, n + 1, -1), n);
}
function Mf(t, e) {
for (var r = "", n = US(t), i = 0; i < n; i++)
r += e(t[i], i, t, e) || "";
return r;
}
function GS(t, e, r, n) {
switch (t.type) {
case AX:
case zS:
return t.return = t.return || t.value;
case qS:
return "";
case MX:
return t.return = t.value + "{" + Mf(t.children, n) + "}";
case VS:
t.value = t.props.join(",");
}
return Ra(r = Mf(t.children, n)) ? t.return = t.value + "{" + r + "}" : "";
}
const zX = "mermaid", YX = "9.2.0-rc3", UX = "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", WX = "./dist/mermaid.core.mjs", HX = "./dist/mermaid.core.mjs", GX = "./dist/mermaid.d.ts", jX = "module", $X = {
".": {
require: "./dist/mermaid.min.js",
import: "./dist/mermaid.core.mjs",
types: "./dist/mermaid.d.ts"
},
"./*": "./*"
}, XX = [
"diagram",
"markdown",
"flowchart",
"sequence diagram",
"gantt",
"class diagram",
"git graph"
], KX = {
clean: "rimraf dist",
"build:code": "node .esbuild/esbuild.cjs",
"build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
"build:watch": "yarn build:code --watch",
"build:esbuild": 'concurrently "yarn build:code" "yarn build:types"',
build: "yarn clean; yarn build:esbuild",
dev: "node .esbuild/serve.cjs",
"docs:build": "ts-node-esm src/docs.mts",
"docs:verify": "yarn docs:build --verify",
"todo-postbuild": "documentation build src/mermaidAPI.ts src/config.ts src/defaultConfig.ts --shallow -f md --markdown-toc false > src/docs/Setup.md && prettier --write src/docs/Setup.md",
release: "yarn build",
lint: "eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .",
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .",
"lint:jison": "ts-node-esm src/jison/lint.mts",
cypress: "cypress run",
"cypress:open": "cypress open",
e2e: "start-server-and-test dev http://localhost:9000/ cypress",
"todo-prepare": 'concurrently "husky install" "yarn build"',
"pre-commit": "lint-staged"
}, ZX = {
type: "git",
url: "https://github.com/mermaid-js/mermaid"
}, QX = "Knut Sveidqvist", JX = "MIT", tK = {
ignore: [
"**/parser/*.js",
"dist/**/*.js",
"cypress/**/*.js"
],
globals: [
"page"
]
}, eK = {
"@braintree/sanitize-url": "^6.0.0",
d3: "^7.0.0",
dagre: "^0.8.5",
"dagre-d3": "^0.6.4",
dompurify: "2.4.0",
"fast-clone": "^1.5.13",
graphlib: "^2.1.8",
khroma: "^2.0.0",
lodash: "^4.17.21",
"moment-mini": "^2.24.0",
"non-layered-tidy-tree-layout": "^2.0.2",
stylis: "^4.1.2"
}, rK = {
"@applitools/eyes-cypress": "^3.25.7",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.0.0",
"@types/d3": "^7.4.0",
"@types/dompurify": "^2.3.4",
"@types/eslint": "^8.4.6",
"@types/express": "^4.17.13",
"@types/jsdom": "^20.0.0",
"@types/lodash": "^4.14.185",
"@types/prettier": "^2.7.0",
"@types/stylis": "^4.0.2",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
concurrently: "^7.4.0",
coveralls: "^3.1.1",
cypress: "^10.0.0",
"cypress-image-snapshot": "^4.0.1",
documentation: "13.2.0",
esbuild: "^0.15.8",
eslint: "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-jest": "^27.0.4",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-markdown": "^3.0.0",
express: "^4.18.1",
globby: "^13.1.2",
husky: "^8.0.0",
"identity-obj-proxy": "^3.0.0",
jison: "^0.4.18",
"js-base64": "3.7.2",
jsdom: "^20.0.0",
"lint-staged": "^13.0.0",
moment: "^2.23.0",
"path-browserify": "^1.0.1",
prettier: "^2.7.1",
"prettier-plugin-jsdoc": "^0.4.2",
remark: "^14.0.2",
rimraf: "^3.0.2",
"start-server-and-test": "^1.12.6",
"ts-node": "^10.9.1",
typescript: "^4.8.3",
"unist-util-flatmap": "^1.0.0"
}, nK = {
d3: "^7.0.0"
}, iK = [
"dist"
], aK = [
"**/*.css",
"**/*.scss"
], Lf = {
name: zX,
version: YX,
description: UX,
main: WX,
module: HX,
types: GX,
type: jX,
exports: $X,
keywords: XX,
scripts: KX,
repository: ZX,
author: QX,
license: JX,
standard: tK,
dependencies: eK,
devDependencies: rK,
resolutions: nK,
files: iK,
sideEffects: aK
}, $o = Object.freeze(za);
let pn = mr({}, $o), jS, Xo = [], e0 = mr({}, $o);
const r0 = (t, e) => {
let r = mr({}, t), n = {};
for (let i = 0; i < e.length; i++) {
const a = e[i];
KS(a), n = mr(n, a);
}
if (r = mr(r, n), n.theme && n.theme in ga) {
const i = mr({}, jS), a = mr(
i.themeVariables || {},
n.themeVariables
);
r.theme && r.theme in ga && (r.themeVariables = ga[r.theme].getThemeVariables(a));
}
return e0 = r, r;
}, sK = (t) => (pn = mr({}, $o), pn = mr(pn, t), t.theme && ga[t.theme] && (pn.themeVariables = ga[t.theme].getThemeVariables(t.themeVariables)), e0 = r0(pn, Xo), pn), oK = (t) => {
jS = mr({}, t);
}, lK = (t) => (pn = mr(pn, t), r0(pn, Xo), pn), $S = () => mr({}, pn), XS = (t) => (mr(e0, t), nt()), nt = () => mr({}, e0), KS = (t) => {
var e;
["secure", ...(e = pn.secure) != null ? e : []].forEach((r) => {
typeof t[r] < "u" && (H.debug(`Denied attempt to modify a secure key ${r}`, t[r]), delete t[r]);
}), Object.keys(t).forEach((r) => {
r.indexOf("__") === 0 && delete t[r];
}), Object.keys(t).forEach((r) => {
typeof t[r] == "string" && (t[r].indexOf("<") > -1 || t[r].indexOf(">") > -1 || t[r].indexOf("url(data:") > -1) && delete t[r], typeof t[r] == "object" && KS(t[r]);
});
}, d4 = (t) => {
t.fontFamily && (t.themeVariables ? t.themeVariables.fontFamily || (t.themeVariables = { fontFamily: t.fontFamily }) : t.themeVariables = { fontFamily: t.fontFamily }), Xo.push(t), r0(pn, Xo);
}, Bc = (t = pn) => {
Xo = [], r0(t, Xo);
}, cK = function(t, e) {
for (let r of e)
t.attr(r[0], r[1]);
}, uK = function(t, e, r) {
let n = /* @__PURE__ */ new Map();
return r ? (n.set("width", "100%"), n.set("style", `max-width: ${e}px;`)) : n.set("width", e), n;
}, pi = function(t, e, r, n) {
const i = uK(e, r, n);
cK(t, i);
}, n0 = function(t, e, r, n) {
const i = e.node().getBBox(), a = i.width, s = i.height;
H.info(`SVG bounds: ${a}x${s}`, i);
let o = 0, l = 0;
H.info(`Graph bounds: ${o}x${l}`, t), o = a + r * 2, l = s + r * 2, H.info(`Calculated bounds: ${o}x${l}`), pi(e, l, o, n);
const u = `${i.x - r} ${i.y - r} ${i.width + 2 * r} ${i.height + 2 * r}`;
e.attr("viewBox", u);
}, ac = (t) => `g.classGroup text {
fill: ${t.nodeBorder};
fill: ${t.classText};
stroke: none;
font-family: ${t.fontFamily};
font-size: 10px;
.title {
font-weight: bolder;
}
}
.nodeLabel, .edgeLabel {
color: ${t.classText};
}
.edgeLabel .label rect {
fill: ${t.mainBkg};
}
.label text {
fill: ${t.classText};
}
.edgeLabel .label span {
background: ${t.mainBkg};
}
.classTitle {
font-weight: bolder;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.divider {
stroke: ${t.nodeBorder};
stroke: 1;
}
g.clickable {
cursor: pointer;
}
g.classGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.classGroup line {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
.classLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.classLabel .label {
fill: ${t.nodeBorder};
font-size: 10px;
}
.relation {
stroke: ${t.lineColor};
stroke-width: 1;
fill: none;
}
.dashed-line{
stroke-dasharray: 3;
}
#compositionStart, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#compositionEnd, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionStart, .extension {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionEnd, .extension {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationStart, .aggregation {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationEnd, .aggregation {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopStart, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopEnd, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
.edgeTerminals {
font-size: 11px;
}
`, ZS = (t) => `
.entityBox {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
.attributeBoxOdd {
fill: ${t.attributeBackgroundColorOdd};
stroke: ${t.nodeBorder};
}
.attributeBoxEven {
fill: ${t.attributeBackgroundColorEven};
stroke: ${t.nodeBorder};
}
.relationshipLabelBox {
fill: ${t.tertiaryColor};
opacity: 0.7;
background-color: ${t.tertiaryColor};
rect {
opacity: 0.5;
}
}
.relationshipLine {
stroke: ${t.lineColor};
}
`, QS = () => "", Rf = (t) => `.label {
font-family: ${t.fontFamily};
color: ${t.nodeTextColor || t.textColor};
}
.cluster-label text {
fill: ${t.titleColor};
}
.cluster-label span {
color: ${t.titleColor};
}
.label text,span {
fill: ${t.nodeTextColor || t.textColor};
color: ${t.nodeTextColor || t.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
.cluster rect {
fill: ${t.clusterBkg};
stroke: ${t.clusterBorder};
stroke-width: 1px;
}
.cluster text {
fill: ${t.titleColor};
}
.cluster span {
color: ${t.titleColor};
}
/* .cluster div {
color: ${t.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
`, JS = (t) => `
.mermaid-main-font {
font-family: "trebuchet ms", verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
// font-size: ${t.ganttFontSize};
// text-height: 14px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
// .taskText:not([font-size]) {
// font-size: ${t.ganttFontSize};
// }
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
// font-size: ${t.ganttFontSize};
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
// font-size: ${t.ganttFontSize};
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor} ;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
`, tA = () => "", eA = (t) => `
.pieCircle{
stroke: ${t.pieStrokeColor};
stroke-width : ${t.pieStrokeWidth};
opacity : ${t.pieOpacity};
}
.pieTitleText {
text-anchor: middle;
font-size: ${t.pieTitleTextSize};
fill: ${t.pieTitleTextColor};
font-family: ${t.fontFamily};
}
.slice {
font-family: ${t.fontFamily};
fill: ${t.pieSectionTextColor};
font-size:${t.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${t.pieLegendTextColor};
font-family: ${t.fontFamily};
font-size: ${t.pieLegendTextSize};
}
`, rA = (t) => `
marker {
fill: ${t.relationColor};
stroke: ${t.relationColor};
}
marker.cross {
stroke: ${t.lineColor};
}
svg {
font-family: ${t.fontFamily};
font-size: ${t.fontSize};
}
.reqBox {
fill: ${t.requirementBackground};
fill-opacity: 100%;
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${t.requirementTextColor};
}
.reqLabelBox {
fill: ${t.relationLabelBackground};
fill-opacity: 100%;
}
.req-title-line {
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.relationshipLine {
stroke: ${t.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${t.relationLabelColor};
}
`, nA = (t) => `.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`, If = (t) => `
defs #statediagram-barbEnd {
fill: ${t.transitionColor};
stroke: ${t.transitionColor};
}
g.stateGroup text {
fill: ${t.nodeBorder};
stroke: none;
font-size: 10px;
}
g.stateGroup text {
fill: ${t.textColor};
stroke: none;
font-size: 10px;
}
g.stateGroup .state-title {
font-weight: bolder;
fill: ${t.stateLabelColor};
}
g.stateGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.stateGroup line {
stroke: ${t.lineColor};
stroke-width: 1;
}
.transition {
stroke: ${t.transitionColor};
stroke-width: 1;
fill: none;
}
.stateGroup .composit {
fill: ${t.background};
border-bottom: 1px
}
.stateGroup .alt-composit {
fill: #e0e0e0;
border-bottom: 1px
}
.state-note {
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
text {
fill: ${t.noteTextColor};
stroke: none;
font-size: 10px;
}
}
.stateLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.edgeLabel .label rect {
fill: ${t.labelBackgroundColor};
opacity: 0.5;
}
.edgeLabel .label text {
fill: ${t.transitionLabelColor || t.tertiaryTextColor};
}
.label div .edgeLabel {
color: ${t.transitionLabelColor || t.tertiaryTextColor};
}
.stateLabel text {
fill: ${t.stateLabelColor};
font-size: 10px;
font-weight: bold;
}
.node circle.state-start {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node .fork-join {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node circle.state-end {
fill: ${t.innerEndBackground};
stroke: ${t.background};
stroke-width: 1.5
}
.end-state-inner {
fill: ${t.compositeBackground || t.background};
// stroke: ${t.background};
stroke-width: 1.5
}
.node rect {
fill: ${t.stateBkg || t.mainBkg};
stroke: ${t.stateBorder || t.nodeBorder};
stroke-width: 1px;
}
.node polygon {
fill: ${t.mainBkg};
stroke: ${t.stateBorder || t.nodeBorder};;
stroke-width: 1px;
}
#statediagram-barbEnd {
fill: ${t.lineColor};
}
.statediagram-cluster rect {
fill: ${t.compositeTitleBackground};
stroke: ${t.stateBorder || t.nodeBorder};
stroke-width: 1px;
}
.cluster-label, .nodeLabel {
color: ${t.stateLabelColor};
}
.statediagram-cluster rect.outer {
rx: 5px;
ry: 5px;
}
.statediagram-state .divider {
stroke: ${t.stateBorder || t.nodeBorder};
}
.statediagram-state .title-state {
rx: 5px;
ry: 5px;
}
.statediagram-cluster.statediagram-cluster .inner {
fill: ${t.compositeBackground || t.background};
}
.statediagram-cluster.statediagram-cluster-alt .inner {
fill: ${t.altBackground ? t.altBackground : "#efefef"};
}
.statediagram-cluster .inner {
rx:0;
ry:0;
}
.statediagram-state rect.basic {
rx: 5px;
ry: 5px;
}
.statediagram-state rect.divider {
stroke-dasharray: 10,10;
fill: ${t.altBackground ? t.altBackground : "#efefef"};
}
.note-edge {
stroke-dasharray: 5;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note text {
fill: ${t.noteTextColor};
}
.statediagram-note .nodeLabel {
color: ${t.noteTextColor};
}
.statediagram .edgeLabel {
color: red; // ${t.noteTextColor};
}
#dependencyStart, #dependencyEnd {
fill: ${t.lineColor};
stroke: ${t.lineColor};
stroke-width: 1;
}
`, iA = (t) => `.label {
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
}
.label text {
fill: #333;
}
.label {
color: ${t.textColor}
}
.face {
${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
stroke: #999;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 1.5px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
}
text-align: center;
}
.cluster rect {
}
.cluster text {
fill: ${t.titleColor};
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.task-type-0, .section-type-0 {
${t.fillType0 ? `fill: ${t.fillType0}` : ""};
}
.task-type-1, .section-type-1 {
${t.fillType0 ? `fill: ${t.fillType1}` : ""};
}
.task-type-2, .section-type-2 {
${t.fillType0 ? `fill: ${t.fillType2}` : ""};
}
.task-type-3, .section-type-3 {
${t.fillType0 ? `fill: ${t.fillType3}` : ""};
}
.task-type-4, .section-type-4 {
${t.fillType0 ? `fill: ${t.fillType4}` : ""};
}
.task-type-5, .section-type-5 {
${t.fillType0 ? `fill: ${t.fillType5}` : ""};
}
.task-type-6, .section-type-6 {
${t.fillType0 ? `fill: ${t.fillType6}` : ""};
}
.task-type-7, .section-type-7 {
${t.fillType0 ? `fill: ${t.fillType7}` : ""};
}
.actor-0 {
${t.actor0 ? `fill: ${t.actor0}` : ""};
}
.actor-1 {
${t.actor1 ? `fill: ${t.actor1}` : ""};
}
.actor-2 {
${t.actor2 ? `fill: ${t.actor2}` : ""};
}
.actor-3 {
${t.actor3 ? `fill: ${t.actor3}` : ""};
}
.actor-4 {
${t.actor4 ? `fill: ${t.actor4}` : ""};
}
.actor-5 {
${t.actor5 ? `fill: ${t.actor5}` : ""};
}
`, aA = (t) => `.person {
stroke: ${t.personBorder};
fill: ${t.personBkg};
}
`, Rh = {
flowchart: Rf,
"flowchart-v2": Rf,
sequence: nA,
gantt: JS,
classDiagram: ac,
"classDiagram-v2": ac,
class: ac,
stateDiagram: If,
state: If,
info: tA,
pie: eA,
er: ZS,
error: QS,
journey: iA,
requirement: rA,
c4: aA
}, sA = (t, e, r) => {
let n = "";
return t in Rh && Rh[t] ? n = Rh[t](r) : H.warn(`No theme found for ${t}`), ` {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* Classes common for multiple diagrams */
.error-icon {
fill: ${r.errorBkgColor};
}
.error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
.edge-thickness-normal {
stroke-width: 2px;
}
.edge-thickness-thick {
stroke-width: 3.5px
}
.edge-pattern-solid {
stroke-dasharray: 0;
}
.edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
.marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
.marker.cross {
stroke: ${r.lineColor};
}
svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
${n}
${e}
`;
}, hK = (t, e) => {
Rh[t] = e;
}, fK = H, dK = Ob, Ko = nt, pK = (t) => ci(t, Ko()), oA = n0, Nf = {}, Ir = (t, e, r, n) => {
if (Nf[t])
throw new Error(`Diagram ${t} already registered.`);
Nf[t] = e, r && MS(t, r), hK(t, e.styles), typeof n < "u" && n(fK, dK, Ko, pK, oA);
}, lA = (t) => {
if (t in Nf)
return Nf[t];
throw new Error(`Diagram ${t} not found.`);
};
var hb = function() {
var t = function(C, M, S, R) {
for (S = S || {}, R = C.length; R--; S[C[R]] = M)
;
return S;
}, e = [1, 4], r = [1, 7], n = [1, 5], i = [1, 9], a = [1, 6], s = [2, 6], o = [1, 16], l = [6, 8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40, 50, 54], u = [8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], h = [8, 13, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], d = [1, 26], f = [6, 8, 14, 50, 54], p = [8, 14, 54], m = [1, 65], _ = [1, 66], y = [1, 67], b = [8, 14, 33, 35, 42, 54], x = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, eol: 4, directive: 5, GG: 6, document: 7, EOF: 8, ":": 9, DIR: 10, options: 11, body: 12, OPT: 13, NL: 14, line: 15, statement: 16, commitStatement: 17, mergeStatement: 18, cherryPickStatement: 19, acc_title: 20, acc_title_value: 21, acc_descr: 22, acc_descr_value: 23, acc_descr_multiline_value: 24, section: 25, branchStatement: 26, CHECKOUT: 27, ID: 28, BRANCH: 29, ORDER: 30, NUM: 31, CHERRY_PICK: 32, COMMIT_ID: 33, STR: 34, COMMIT_TAG: 35, EMPTYSTR: 36, MERGE: 37, COMMIT_TYPE: 38, commitType: 39, COMMIT: 40, commit_arg: 41, COMMIT_MSG: 42, NORMAL: 43, REVERSE: 44, HIGHLIGHT: 45, openDirective: 46, typeDirective: 47, closeDirective: 48, argDirective: 49, open_directive: 50, type_directive: 51, arg_directive: 52, close_directive: 53, ";": 54, $accept: 0, $end: 1 },
terminals_: { 2: "error", 6: "GG", 8: "EOF", 9: ":", 10: "DIR", 13: "OPT", 14: "NL", 20: "acc_title", 21: "acc_title_value", 22: "acc_descr", 23: "acc_descr_value", 24: "acc_descr_multiline_value", 25: "section", 27: "CHECKOUT", 28: "ID", 29: "BRANCH", 30: "ORDER", 31: "NUM", 32: "CHERRY_PICK", 33: "COMMIT_ID", 34: "STR", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 50: "open_directive", 51: "type_directive", 52: "arg_directive", 53: "close_directive", 54: ";" },
productions_: [0, [3, 2], [3, 2], [3, 3], [3, 4], [3, 5], [7, 0], [7, 2], [11, 2], [11, 1], [12, 0], [12, 2], [15, 2], [15, 1], [16, 1], [16, 1], [16, 1], [16, 2], [16, 2], [16, 1], [16, 1], [16, 1], [16, 2], [26, 2], [26, 4], [19, 3], [19, 5], [19, 5], [19, 5], [19, 5], [18, 2], [18, 4], [18, 4], [18, 4], [18, 6], [18, 6], [18, 6], [18, 6], [18, 6], [18, 6], [18, 8], [18, 8], [18, 8], [18, 8], [18, 8], [18, 8], [17, 2], [17, 3], [17, 3], [17, 5], [17, 5], [17, 3], [17, 5], [17, 5], [17, 5], [17, 5], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 3], [17, 5], [17, 5], [17, 5], [17, 5], [17, 5], [17, 5], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [5, 3], [5, 5], [46, 1], [47, 1], [49, 1], [48, 1], [4, 1], [4, 1], [4, 1]],
performAction: function(M, S, R, A, L, v, B) {
var w = v.length - 1;
switch (L) {
case 3:
return v[w];
case 4:
return v[w - 1];
case 5:
return A.setDirection(v[w - 3]), v[w - 1];
case 7:
A.setOptions(v[w - 1]), this.$ = v[w];
break;
case 8:
v[w - 1] += v[w], this.$ = v[w - 1];
break;
case 10:
this.$ = [];
break;
case 11:
v[w - 1].push(v[w]), this.$ = v[w - 1];
break;
case 12:
this.$ = v[w - 1];
break;
case 17:
this.$ = v[w].trim(), A.setAccTitle(this.$);
break;
case 18:
case 19:
this.$ = v[w].trim(), A.setAccDescription(this.$);
break;
case 20:
A.addSection(v[w].substr(8)), this.$ = v[w].substr(8);
break;
case 22:
A.checkout(v[w]);
break;
case 23:
A.branch(v[w]);
break;
case 24:
A.branch(v[w - 2], v[w]);
break;
case 25:
A.cherryPick(v[w], "", void 0);
break;
case 26:
A.cherryPick(v[w - 2], "", v[w]);
break;
case 27:
case 29:
A.cherryPick(v[w - 2], "", "");
break;
case 28:
A.cherryPick(v[w], "", v[w - 2]);
break;
case 30:
A.merge(v[w], "", "", "");
break;
case 31:
A.merge(v[w - 2], v[w], "", "");
break;
case 32:
A.merge(v[w - 2], "", v[w], "");
break;
case 33:
A.merge(v[w - 2], "", "", v[w]);
break;
case 34:
A.merge(v[w - 4], v[w], "", v[w - 2]);
break;
case 35:
A.merge(v[w - 4], "", v[w], v[w - 2]);
break;
case 36:
A.merge(v[w - 4], "", v[w - 2], v[w]);
break;
case 37:
A.merge(v[w - 4], v[w - 2], v[w], "");
break;
case 38:
A.merge(v[w - 4], v[w - 2], "", v[w]);
break;
case 39:
A.merge(v[w - 4], v[w], v[w - 2], "");
break;
case 40:
A.merge(v[w - 6], v[w - 4], v[w - 2], v[w]);
break;
case 41:
A.merge(v[w - 6], v[w], v[w - 4], v[w - 2]);
break;
case 42:
A.merge(v[w - 6], v[w - 4], v[w], v[w - 2]);
break;
case 43:
A.merge(v[w - 6], v[w - 2], v[w - 4], v[w]);
break;
case 44:
A.merge(v[w - 6], v[w], v[w - 2], v[w - 4]);
break;
case 45:
A.merge(v[w - 6], v[w - 2], v[w], v[w - 4]);
break;
case 46:
A.commit(v[w]);
break;
case 47:
A.commit("", "", A.commitType.NORMAL, v[w]);
break;
case 48:
A.commit("", "", v[w], "");
break;
case 49:
A.commit("", "", v[w], v[w - 2]);
break;
case 50:
A.commit("", "", v[w - 2], v[w]);
break;
case 51:
A.commit("", v[w], A.commitType.NORMAL, "");
break;
case 52:
A.commit("", v[w - 2], A.commitType.NORMAL, v[w]);
break;
case 53:
A.commit("", v[w], A.commitType.NORMAL, v[w - 2]);
break;
case 54:
A.commit("", v[w - 2], v[w], "");
break;
case 55:
A.commit("", v[w], v[w - 2], "");
break;
case 56:
A.commit("", v[w - 4], v[w - 2], v[w]);
break;
case 57:
A.commit("", v[w - 4], v[w], v[w - 2]);
break;
case 58:
A.commit("", v[w - 2], v[w - 4], v[w]);
break;
case 59:
A.commit("", v[w], v[w - 4], v[w - 2]);
break;
case 60:
A.commit("", v[w], v[w - 2], v[w - 4]);
break;
case 61:
A.commit("", v[w - 2], v[w], v[w - 4]);
break;
case 62:
A.commit(v[w], "", A.commitType.NORMAL, "");
break;
case 63:
A.commit(v[w], "", A.commitType.NORMAL, v[w - 2]);
break;
case 64:
A.commit(v[w - 2], "", A.commitType.NORMAL, v[w]);
break;
case 65:
A.commit(v[w - 2], "", v[w], "");
break;
case 66:
A.commit(v[w], "", v[w - 2], "");
break;
case 67:
A.commit(v[w], v[w - 2], A.commitType.NORMAL, "");
break;
case 68:
A.commit(v[w - 2], v[w], A.commitType.NORMAL, "");
break;
case 69:
A.commit(v[w - 4], "", v[w - 2], v[w]);
break;
case 70:
A.commit(v[w - 4], "", v[w], v[w - 2]);
break;
case 71:
A.commit(v[w - 2], "", v[w - 4], v[w]);
break;
case 72:
A.commit(v[w], "", v[w - 4], v[w - 2]);
break;
case 73:
A.commit(v[w], "", v[w - 2], v[w - 4]);
break;
case 74:
A.commit(v[w - 2], "", v[w], v[w - 4]);
break;
case 75:
A.commit(v[w - 4], v[w], v[w - 2], "");
break;
case 76:
A.commit(v[w - 4], v[w - 2], v[w], "");
break;
case 77:
A.commit(v[w - 2], v[w], v[w - 4], "");
break;
case 78:
A.commit(v[w], v[w - 2], v[w - 4], "");
break;
case 79:
A.commit(v[w], v[w - 4], v[w - 2], "");
break;
case 80:
A.commit(v[w - 2], v[w - 4], v[w], "");
break;
case 81:
A.commit(v[w - 4], v[w], A.commitType.NORMAL, v[w - 2]);
break;
case 82:
A.commit(v[w - 4], v[w - 2], A.commitType.NORMAL, v[w]);
break;
case 83:
A.commit(v[w - 2], v[w], A.commitType.NORMAL, v[w - 4]);
break;
case 84:
A.commit(v[w], v[w - 2], A.commitType.NORMAL, v[w - 4]);
break;
case 85:
A.commit(v[w], v[w - 4], A.commitType.NORMAL, v[w - 2]);
break;
case 86:
A.commit(v[w - 2], v[w - 4], A.commitType.NORMAL, v[w]);
break;
case 87:
A.commit(v[w - 6], v[w - 4], v[w - 2], v[w]);
break;
case 88:
A.commit(v[w - 6], v[w - 4], v[w], v[w - 2]);
break;
case 89:
A.commit(v[w - 6], v[w - 2], v[w - 4], v[w]);
break;
case 90:
A.commit(v[w - 6], v[w], v[w - 4], v[w - 2]);
break;
case 91:
A.commit(v[w - 6], v[w - 2], v[w], v[w - 4]);
break;
case 92:
A.commit(v[w - 6], v[w], v[w - 2], v[w - 4]);
break;
case 93:
A.commit(v[w - 4], v[w - 6], v[w - 2], v[w]);
break;
case 94:
A.commit(v[w - 4], v[w - 6], v[w], v[w - 2]);
break;
case 95:
A.commit(v[w - 2], v[w - 6], v[w - 4], v[w]);
break;
case 96:
A.commit(v[w], v[w - 6], v[w - 4], v[w - 2]);
break;
case 97:
A.commit(v[w - 2], v[w - 6], v[w], v[w - 4]);
break;
case 98:
A.commit(v[w], v[w - 6], v[w - 2], v[w - 4]);
break;
case 99:
A.commit(v[w], v[w - 4], v[w - 2], v[w - 6]);
break;
case 100:
A.commit(v[w - 2], v[w - 4], v[w], v[w - 6]);
break;
case 101:
A.commit(v[w], v[w - 2], v[w - 4], v[w - 6]);
break;
case 102:
A.commit(v[w - 2], v[w], v[w - 4], v[w - 6]);
break;
case 103:
A.commit(v[w - 4], v[w - 2], v[w], v[w - 6]);
break;
case 104:
A.commit(v[w - 4], v[w], v[w - 2], v[w - 6]);
break;
case 105:
A.commit(v[w - 2], v[w - 4], v[w - 6], v[w]);
break;
case 106:
A.commit(v[w], v[w - 4], v[w - 6], v[w - 2]);
break;
case 107:
A.commit(v[w - 2], v[w], v[w - 6], v[w - 4]);
break;
case 108:
A.commit(v[w], v[w - 2], v[w - 6], v[w - 4]);
break;
case 109:
A.commit(v[w - 4], v[w - 2], v[w - 6], v[w]);
break;
case 110:
A.commit(v[w - 4], v[w], v[w - 6], v[w - 2]);
break;
case 111:
this.$ = "";
break;
case 112:
this.$ = v[w];
break;
case 113:
this.$ = A.commitType.NORMAL;
break;
case 114:
this.$ = A.commitType.REVERSE;
break;
case 115:
this.$ = A.commitType.HIGHLIGHT;
break;
case 118:
A.parseDirective("%%{", "open_directive");
break;
case 119:
A.parseDirective(v[w], "type_directive");
break;
case 120:
v[w] = v[w].trim().replace(/'/g, '"'), A.parseDirective(v[w], "arg_directive");
break;
case 121:
A.parseDirective("}%%", "close_directive", "gitGraph");
break;
}
},
table: [{ 3: 1, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 54: a }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 54: a }, { 3: 11, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 54: a }, { 7: 12, 8: s, 9: [1, 13], 10: [1, 14], 11: 15, 14: o }, t(l, [2, 122]), t(l, [2, 123]), t(l, [2, 124]), { 47: 17, 51: [1, 18] }, { 51: [2, 118] }, { 1: [2, 1] }, { 1: [2, 2] }, { 8: [1, 19] }, { 7: 20, 8: s, 11: 15, 14: o }, { 9: [1, 21] }, t(u, [2, 10], { 12: 22, 13: [1, 23] }), t(h, [2, 9]), { 9: [1, 25], 48: 24, 53: d }, t([9, 53], [2, 119]), { 1: [2, 3] }, { 8: [1, 27] }, { 7: 28, 8: s, 11: 15, 14: o }, { 8: [2, 7], 14: [1, 31], 15: 29, 16: 30, 17: 32, 18: 33, 19: 34, 20: [1, 35], 22: [1, 36], 24: [1, 37], 25: [1, 38], 26: 39, 27: [1, 40], 29: [1, 44], 32: [1, 43], 37: [1, 42], 40: [1, 41] }, t(h, [2, 8]), t(f, [2, 116]), { 49: 45, 52: [1, 46] }, t(f, [2, 121]), { 1: [2, 4] }, { 8: [1, 47] }, t(u, [2, 11]), { 4: 48, 8: r, 14: n, 54: a }, t(u, [2, 13]), t(p, [2, 14]), t(p, [2, 15]), t(p, [2, 16]), { 21: [1, 49] }, { 23: [1, 50] }, t(p, [2, 19]), t(p, [2, 20]), t(p, [2, 21]), { 28: [1, 51] }, t(p, [2, 111], { 41: 52, 33: [1, 55], 34: [1, 57], 35: [1, 53], 38: [1, 54], 42: [1, 56] }), { 28: [1, 58] }, { 33: [1, 59], 35: [1, 60] }, { 28: [1, 61] }, { 48: 62, 53: d }, { 53: [2, 120] }, { 1: [2, 5] }, t(u, [2, 12]), t(p, [2, 17]), t(p, [2, 18]), t(p, [2, 22]), t(p, [2, 46]), { 34: [1, 63] }, { 39: 64, 43: m, 44: _, 45: y }, { 34: [1, 68] }, { 34: [1, 69] }, t(p, [2, 112]), t(p, [2, 30], { 33: [1, 70], 35: [1, 72], 38: [1, 71] }), { 34: [1, 73] }, { 34: [1, 74], 36: [1, 75] }, t(p, [2, 23], { 30: [1, 76] }), t(f, [2, 117]), t(p, [2, 47], { 33: [1, 78], 38: [1, 77], 42: [1, 79] }), t(p, [2, 48], { 33: [1, 81], 35: [1, 80], 42: [1, 82] }), t(b, [2, 113]), t(b, [2, 114]), t(b, [2, 115]), t(p, [2, 51], { 35: [1, 83], 38: [1, 84], 42: [1, 85] }), t(p, [2, 62], { 33: [1, 88], 35: [1, 86], 38: [1, 87] }), { 34: [1, 89] }, { 39: 90, 43: m, 44: _, 45: y }, { 34: [1, 91] }, t(p, [2, 25], { 35: [1, 92] }), { 33: [1, 93] }, { 33: [1, 94] }, { 31: [1, 95] }, { 39: 96, 43: m, 44: _, 45: y }, { 34: [1, 97] }, { 34: [1, 98] }, { 34: [1, 99] }, { 34: [1, 100] }, { 34: [1, 101] }, { 34: [1, 102] }, { 39: 103, 43: m, 44: _, 45: y }, { 34: [1, 104] }, { 34: [1, 105] }, { 39: 106, 43: m, 44: _, 45: y }, { 34: [1, 107] }, t(p, [2, 31], { 35: [1, 109], 38: [1, 108] }), t(p, [2, 32], { 33: [1, 111], 35: [1, 110] }), t(p, [2, 33], { 33: [1, 112], 38: [1, 113] }), { 34: [1, 114], 36: [1, 115] }, { 34: [1, 116] }, { 34: [1, 117] }, t(p, [2, 24]), t(p, [2, 49], { 33: [1, 118], 42: [1, 119] }), t(p, [2, 53], { 38: [1, 120], 42: [1, 121] }), t(p, [2, 63], { 33: [1, 123], 38: [1, 122] }), t(p, [2, 50], { 33: [1, 124], 42: [1, 125] }), t(p, [2, 55], { 35: [1, 126], 42: [1, 127] }), t(p, [2, 66], { 33: [1, 129], 35: [1, 128] }), t(p, [2, 52], { 38: [1, 130], 42: [1, 131] }), t(p, [2, 54], { 35: [1, 132], 42: [1, 133] }), t(p, [2, 67], { 35: [1, 135], 38: [1, 134] }), t(p, [2, 64], { 33: [1, 137], 38: [1, 136] }), t(p, [2, 65], { 33: [1, 139], 35: [1, 138] }), t(p, [2, 68], { 35: [1, 141], 38: [1, 140] }), { 39: 142, 43: m, 44: _, 45: y }, { 34: [1, 143] }, { 34: [1, 144] }, { 34: [1, 145] }, { 34: [1, 146] }, { 39: 147, 43: m, 44: _, 45: y }, t(p, [2, 26]), t(p, [2, 27]), t(p, [2, 28]), t(p, [2, 29]), { 34: [1, 148] }, { 34: [1, 149] }, { 39: 150, 43: m, 44: _, 45: y }, { 34: [1, 151] }, { 39: 152, 43: m, 44: _, 45: y }, { 34: [1, 153] }, { 34: [1, 154] }, { 34: [1, 155] }, { 34: [1, 156] }, { 34: [1, 157] }, { 34: [1, 158] }, { 34: [1, 159] }, { 39: 160, 43: m, 44: _, 45: y }, { 34: [1, 161] }, { 34: [1, 162] }, { 34: [1, 163] }, { 39: 164, 43: m, 44: _, 45: y }, { 34: [1, 165] }, { 39: 166, 43: m, 44: _, 45: y }, { 34: [1, 167] }, { 34: [1, 168] }, { 34: [1, 169] }, { 39: 170, 43: m, 44: _, 45: y }, { 34: [1, 171] }, t(p, [2, 37], { 35: [1, 172] }), t(p, [2, 38], { 38: [1, 173] }), t(p, [2, 36], { 33: [1, 174] }), t(p, [2, 39], { 35: [1, 175] }), t(p, [2, 34], { 38: [1, 176] }), t(p, [2, 35], { 33: [1, 177] }), t(p, [2, 60], { 42: [1, 178] }), t(p, [2, 73], { 33: [1, 179] }), t(p, [2, 61], { 42: [1, 180] }), t(p, [2, 84], { 38: [1, 181] }), t(p, [2, 74], { 33: [1, 182] }), t(p, [2, 83], { 38: [1, 183] }), t(p, [2, 59], { 42: [1, 184] }), t(p, [2, 72], { 33: [1, 185] }), t(p, [2, 58], { 42: [1, 186] }), t(p, [2, 78], { 35: [1, 187] }), t(p, [2, 71], { 33: [1, 188] }), t(p, [2, 77], { 35: [1, 189] }), t(p, [2, 57], { 42: [1, 190] }), t(p, [2, 85], { 38: [1, 191] }), t(p, [2, 56], { 42: [1, 192] }), t(p, [2, 79], { 35: [1, 193] }), t(p, [2, 80], { 35: [1, 194] }), t(p, [2, 86], { 38: [1, 195] }), t(p, [2, 70], { 33: [1, 196] }), t(p, [2, 81], { 38: [1, 197] }), t(p, [2, 69], { 33: [1, 198] }), t(p, [2, 75], { 35: [1, 199] }), t(p, [2, 76], { 35: [1, 200] }), t(p, [2, 82], { 38: [1, 201] }), { 34: [1, 202] }, { 39: 203, 43: m, 44: _, 45: y }, { 34: [1, 204] }, { 34: [1, 205] }, { 39: 206, 43: m, 44: _, 45: y }, { 34: [1, 207] }, { 34: [1, 208] }, { 34: [1, 209] }, { 34: [1, 210] }, { 39: 211, 43: m, 44: _, 45: y }, { 34: [1, 212] }, { 39: 213, 43: m, 44: _, 45: y }, { 34: [1, 214] }, { 34: [1, 215] }, { 34: [1, 216] }, { 34: [1, 217] }, { 34: [1, 218] }, { 34: [1, 219] }, { 34: [1, 220] }, { 39: 221, 43: m, 44: _, 45: y }, { 34: [1, 222] }, { 34: [1, 223] }, { 34: [1, 224] }, { 39: 225, 43: m, 44: _, 45: y }, { 34: [1, 226] }, { 39: 227, 43: m, 44: _, 45: y }, { 34: [1, 228] }, { 34: [1, 229] }, { 34: [1, 230] }, { 39: 231, 43: m, 44: _, 45: y }, t(p, [2, 40]), t(p, [2, 42]), t(p, [2, 41]), t(p, [2, 43]), t(p, [2, 45]), t(p, [2, 44]), t(p, [2, 101]), t(p, [2, 102]), t(p, [2, 99]), t(p, [2, 100]), t(p, [2, 104]), t(p, [2, 103]), t(p, [2, 108]), t(p, [2, 107]), t(p, [2, 106]), t(p, [2, 105]), t(p, [2, 110]), t(p, [2, 109]), t(p, [2, 98]), t(p, [2, 97]), t(p, [2, 96]), t(p, [2, 95]), t(p, [2, 93]), t(p, [2, 94]), t(p, [2, 92]), t(p, [2, 91]), t(p, [2, 90]), t(p, [2, 89]), t(p, [2, 87]), t(p, [2, 88])],
defaultActions: { 9: [2, 118], 10: [2, 1], 11: [2, 2], 19: [2, 3], 27: [2, 4], 46: [2, 120], 47: [2, 5] },
parseError: function(M, S) {
if (S.recoverable)
this.trace(M);
else {
var R = new Error(M);
throw R.hash = S, R;
}
},
parse: function(M) {
var S = this, R = [0], A = [], L = [null], v = [], B = this.table, w = "", D = 0, N = 0, z = 2, X = 1, ct = v.slice.call(arguments, 1), J = Object.create(this.lexer), Y = { yy: {} };
for (var $ in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, $) && (Y.yy[$] = this.yy[$]);
J.setInput(M, Y.yy), Y.yy.lexer = J, Y.yy.parser = this, typeof J.yylloc > "u" && (J.yylloc = {});
var lt = J.yylloc;
v.push(lt);
var ut = J.options && J.options.ranges;
typeof Y.yy.parseError == "function" ? this.parseError = Y.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function W() {
var P;
return P = A.pop() || J.lex() || X, typeof P != "number" && (P instanceof Array && (A = P, P = A.pop()), P = S.symbols_[P] || P), P;
}
for (var tt, K, it, Z, V = {}, Q, q, U, F; ; ) {
if (K = R[R.length - 1], this.defaultActions[K] ? it = this.defaultActions[K] : ((tt === null || typeof tt > "u") && (tt = W()), it = B[K] && B[K][tt]), typeof it > "u" || !it.length || !it[0]) {
var j = "";
F = [];
for (Q in B[K])
this.terminals_[Q] && Q > z && F.push("'" + this.terminals_[Q] + "'");
J.showPosition ? j = "Parse error on line " + (D + 1) + `:
` + J.showPosition() + `
Expecting ` + F.join(", ") + ", got '" + (this.terminals_[tt] || tt) + "'" : j = "Parse error on line " + (D + 1) + ": Unexpected " + (tt == X ? "end of input" : "'" + (this.terminals_[tt] || tt) + "'"), this.parseError(j, {
text: J.match,
token: this.terminals_[tt] || tt,
line: J.yylineno,
loc: lt,
expected: F
});
}
if (it[0] instanceof Array && it.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + K + ", token: " + tt);
switch (it[0]) {
case 1:
R.push(tt), L.push(J.yytext), v.push(J.yylloc), R.push(it[1]), tt = null, N = J.yyleng, w = J.yytext, D = J.yylineno, lt = J.yylloc;
break;
case 2:
if (q = this.productions_[it[1]][1], V.$ = L[L.length - q], V._$ = {
first_line: v[v.length - (q || 1)].first_line,
last_line: v[v.length - 1].last_line,
first_column: v[v.length - (q || 1)].first_column,
last_column: v[v.length - 1].last_column
}, ut && (V._$.range = [
v[v.length - (q || 1)].range[0],
v[v.length - 1].range[1]
]), Z = this.performAction.apply(V, [
w,
N,
D,
Y.yy,
it[1],
L,
v
].concat(ct)), typeof Z < "u")
return Z;
q && (R = R.slice(0, -1 * q * 2), L = L.slice(0, -1 * q), v = v.slice(0, -1 * q)), R.push(this.productions_[it[1]][0]), L.push(V.$), v.push(V._$), U = B[R[R.length - 2]][R[R.length - 1]], R.push(U);
break;
case 3:
return !0;
}
}
return !0;
}
}, k = function() {
var C = {
EOF: 1,
parseError: function(S, R) {
if (this.yy.parser)
this.yy.parser.parseError(S, R);
else
throw new Error(S);
},
setInput: function(M, S) {
return this.yy = S || this.yy || {}, this._input = M, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var M = this._input[0];
this.yytext += M, this.yyleng++, this.offset++, this.match += M, this.matched += M;
var S = M.match(/(?:\r\n?|\n).*/g);
return S ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), M;
},
unput: function(M) {
var S = M.length, R = M.split(/(?:\r\n?|\n)/g);
this._input = M + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - S), this.offset -= S;
var A = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), R.length - 1 && (this.yylineno -= R.length - 1);
var L = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: R ? (R.length === A.length ? this.yylloc.first_column : 0) + A[A.length - R.length].length - R[0].length : this.yylloc.first_column - S
}, this.options.ranges && (this.yylloc.range = [L[0], L[0] + this.yyleng - S]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(M) {
this.unput(this.match.slice(M));
},
pastInput: function() {
var M = this.matched.substr(0, this.matched.length - this.match.length);
return (M.length > 20 ? "..." : "") + M.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var M = this.match;
return M.length < 20 && (M += this._input.substr(0, 20 - M.length)), (M.substr(0, 20) + (M.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var M = this.pastInput(), S = new Array(M.length + 1).join("-");
return M + this.upcomingInput() + `
` + S + "^";
},
test_match: function(M, S) {
var R, A, L;
if (this.options.backtrack_lexer && (L = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (L.yylloc.range = this.yylloc.range.slice(0))), A = M[0].match(/(?:\r\n?|\n).*/g), A && (this.yylineno += A.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: A ? A[A.length - 1].length - A[A.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + M[0].length
}, this.yytext += M[0], this.match += M[0], this.matches = M, 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(M[0].length), this.matched += M[0], R = this.performAction.call(this, this.yy, this, S, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), R)
return R;
if (this._backtrack) {
for (var v in L)
this[v] = L[v];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var M, S, R, A;
this._more || (this.yytext = "", this.match = "");
for (var L = this._currentRules(), v = 0; v < L.length; v++)
if (R = this._input.match(this.rules[L[v]]), R && (!S || R[0].length > S[0].length)) {
if (S = R, A = v, this.options.backtrack_lexer) {
if (M = this.test_match(R, L[v]), M !== !1)
return M;
if (this._backtrack) {
S = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return S ? (M = this.test_match(S, L[A]), M !== !1 ? M : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var S = this.next();
return S || this.lex();
},
begin: function(S) {
this.conditionStack.push(S);
},
popState: function() {
var S = this.conditionStack.length - 1;
return S > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(S) {
return S = this.conditionStack.length - 1 - Math.abs(S || 0), S >= 0 ? this.conditionStack[S] : "INITIAL";
},
pushState: function(S) {
this.begin(S);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(S, R, A, L) {
switch (A) {
case 0:
return this.begin("open_directive"), 50;
case 1:
return this.begin("type_directive"), 51;
case 2:
return this.popState(), this.begin("arg_directive"), 9;
case 3:
return this.popState(), this.popState(), 53;
case 4:
return 52;
case 5:
return this.begin("acc_title"), 20;
case 6:
return this.popState(), "acc_title_value";
case 7:
return this.begin("acc_descr"), 22;
case 8:
return this.popState(), "acc_descr_value";
case 9:
this.begin("acc_descr_multiline");
break;
case 10:
this.popState();
break;
case 11:
return "acc_descr_multiline_value";
case 12:
return 14;
case 13:
break;
case 14:
break;
case 15:
return 6;
case 16:
return 40;
case 17:
return 33;
case 18:
return 38;
case 19:
return 42;
case 20:
return 43;
case 21:
return 44;
case 22:
return 45;
case 23:
return 35;
case 24:
return 29;
case 25:
return 30;
case 26:
return 37;
case 27:
return 32;
case 28:
return 27;
case 29:
return 10;
case 30:
return 10;
case 31:
return 9;
case 32:
return "CARET";
case 33:
this.begin("options");
break;
case 34:
this.popState();
break;
case 35:
return 13;
case 36:
return 36;
case 37:
this.begin("string");
break;
case 38:
this.popState();
break;
case 39:
return 34;
case 40:
return 31;
case 41:
return 28;
case 42:
return 8;
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:BT\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i],
conditions: { acc_descr_multiline: { rules: [10, 11], inclusive: !1 }, acc_descr: { rules: [8], inclusive: !1 }, acc_title: { rules: [6], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, options: { rules: [34, 35], inclusive: !1 }, string: { rules: [38, 39], inclusive: !1 }, INITIAL: { rules: [0, 5, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 40, 41, 42, 43], inclusive: !0 } }
};
return C;
}();
x.lexer = k;
function T() {
this.yy = {};
}
return T.prototype = x, x.Parser = T, new T();
}();
hb.parser = hb;
const gK = (t) => t.match(/^\s*gitGraph/) !== null;
let p4 = "", i0 = "", g4 = "";
const y4 = (t) => ci(t, nt()), gi = function() {
p4 = "", g4 = "", i0 = "";
}, Yn = function(t) {
p4 = y4(t).replace(/^\s+/g, "");
}, yi = function() {
return p4 || i0;
}, mi = function(t) {
g4 = y4(t).replace(/\n\s+/g, `
`);
}, bi = function() {
return g4;
}, a0 = function(t) {
i0 = y4(t);
}, s0 = function() {
return i0;
};
let Bf = nt().gitGraph.mainBranchName, yK = nt().gitGraph.mainBranchOrder, xr = {}, rn = null, Dc = {};
Dc[Bf] = { name: Bf, order: yK };
let yr = {};
yr[Bf] = rn;
let Er = Bf, cA = "LR", Vs = 0;
function m4() {
return OS({ length: 7 });
}
const mK = function(t, e, r) {
er.parseDirective(this, t, e, r);
};
function bK(t, e) {
const r = /* @__PURE__ */ Object.create(null);
return t.reduce((n, i) => {
const a = e(i);
return r[a] || (r[a] = !0, n.push(i)), n;
}, []);
}
const _K = function(t) {
cA = t;
};
let uA = {};
const vK = function(t) {
H.debug("options str", t), t = t && t.trim(), t = t || "{}";
try {
uA = JSON.parse(t);
} catch (e) {
H.error("error while parsing gitGraph options", e.message);
}
}, xK = function() {
return uA;
}, kK = function(t, e, r, n) {
H.debug("Entering commit:", t, e, r, n), e = pe.sanitizeText(e, nt()), t = pe.sanitizeText(t, nt()), n = pe.sanitizeText(n, nt());
const i = {
id: e || Vs + "-" + m4(),
message: t,
seq: Vs++,
type: r || Oc.NORMAL,
tag: n || "",
parents: rn == null ? [] : [rn.id],
branch: Er
};
rn = i, xr[i.id] = i, yr[Er] = i.id, H.debug("in pushCommit " + i.id);
}, wK = function(t, e) {
if (t = pe.sanitizeText(t, nt()), typeof yr[t] > "u")
yr[t] = rn != null ? rn.id : null, Dc[t] = { name: t, order: e ? parseInt(e, 10) : null }, hA(t), H.debug("in createBranch");
else {
let r = new Error(
'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + t + '")'
);
throw r.hash = {
text: "branch " + t,
token: "branch " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ['"checkout ' + t + '"']
}, r;
}
}, TK = function(t, e, r, n) {
t = pe.sanitizeText(t, nt()), e = pe.sanitizeText(e, nt());
const i = xr[yr[Er]], a = xr[yr[t]];
if (Er === t) {
let o = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["branch abc"]
}, o;
} else if (typeof i > "u" || !i) {
let o = new Error(
'Incorrect usage of "merge". Current branch (' + Er + ")has no commits"
);
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["commit"]
}, o;
} else if (typeof yr[t] > "u") {
let o = new Error(
'Incorrect usage of "merge". Branch to be merged (' + t + ") does not exist"
);
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["branch " + t]
}, o;
} else if (typeof a > "u" || !a) {
let o = new Error(
'Incorrect usage of "merge". Branch to be merged (' + t + ") has no commits"
);
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ['"commit"']
}, o;
} else if (i === a) {
let o = new Error('Incorrect usage of "merge". Both branches have same head');
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["branch abc"]
}, o;
} else if (e && typeof xr[e] < "u") {
let o = new Error(
'Incorrect usage of "merge". Commit with id:' + e + " already exists, use different custom Id"
);
throw o.hash = {
text: "merge " + t + e + r + n,
token: "merge " + t + e + r + n,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: [
"merge " + t + " " + e + "_UNIQUE " + r + " " + n
]
}, o;
}
const s = {
id: e || Vs + "-" + m4(),
message: "merged branch " + t + " into " + Er,
seq: Vs++,
parents: [rn == null ? null : rn.id, yr[t]],
branch: Er,
type: Oc.MERGE,
customType: r,
customId: !!e,
tag: n || ""
};
rn = s, xr[s.id] = s, yr[Er] = s.id, H.debug(yr), H.debug("in mergeBranch");
}, EK = function(t, e, r) {
if (H.debug("Entering cherryPick:", t, e, r), t = pe.sanitizeText(t, nt()), e = pe.sanitizeText(e, nt()), r = pe.sanitizeText(r, nt()), !t || typeof xr[t] > "u") {
let a = new Error(
'Incorrect usage of "cherryPick". Source commit id should exist and provided'
);
throw a.hash = {
text: "cherryPick " + t + " " + e,
token: "cherryPick " + t + " " + e,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["cherry-pick abc"]
}, a;
}
let n = xr[t], i = n.branch;
if (n.type === Oc.MERGE) {
let a = new Error(
'Incorrect usage of "cherryPick". Source commit should not be a merge commit'
);
throw a.hash = {
text: "cherryPick " + t + " " + e,
token: "cherryPick " + t + " " + e,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["cherry-pick abc"]
}, a;
}
if (!e || typeof xr[e] > "u") {
if (i === Er) {
let o = new Error(
'Incorrect usage of "cherryPick". Source commit is already on current branch'
);
throw o.hash = {
text: "cherryPick " + t + " " + e,
token: "cherryPick " + t + " " + e,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["cherry-pick abc"]
}, o;
}
const a = xr[yr[Er]];
if (typeof a > "u" || !a) {
let o = new Error(
'Incorrect usage of "cherry-pick". Current branch (' + Er + ")has no commits"
);
throw o.hash = {
text: "cherryPick " + t + " " + e,
token: "cherryPick " + t + " " + e,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["cherry-pick abc"]
}, o;
}
const s = {
id: Vs + "-" + m4(),
message: "cherry-picked " + n + " into " + Er,
seq: Vs++,
parents: [rn == null ? null : rn.id, n.id],
branch: Er,
type: Oc.CHERRY_PICK,
tag: r != null ? r : "cherry-pick:" + n.id
};
rn = s, xr[s.id] = s, yr[Er] = s.id, H.debug(yr), H.debug("in cherryPick");
}
}, hA = function(t) {
if (t = pe.sanitizeText(t, nt()), typeof yr[t] > "u") {
let e = new Error(
'Trying to checkout branch which is not yet created. (Help try using "branch ' + t + '")'
);
throw e.hash = {
text: "checkout " + t,
token: "checkout " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ['"branch ' + t + '"']
}, e;
} else {
Er = t;
const e = yr[Er];
rn = xr[e];
}
};
function i6(t, e, r) {
const n = t.indexOf(e);
n === -1 ? t.push(r) : t.splice(n, 1, r);
}
function fA(t) {
const e = t.reduce((i, a) => i.seq > a.seq ? i : a, t[0]);
let r = "";
t.forEach(function(i) {
i === e ? r += " *" : r += " |";
});
const n = [r, e.id, e.seq];
for (let i in yr)
yr[i] === e.id && n.push(i);
if (H.debug(n.join(" ")), e.parents && e.parents.length == 2) {
const i = xr[e.parents[0]];
i6(t, e, i), t.push(xr[e.parents[1]]);
} else {
if (e.parents.length == 0)
return;
{
const i = xr[e.parents];
i6(t, e, i);
}
}
t = bK(t, (i) => i.id), fA(t);
}
const CK = function() {
H.debug(xr);
const t = dA()[0];
fA([t]);
}, SK = function() {
xr = {}, rn = null;
let t = nt().gitGraph.mainBranchName, e = nt().gitGraph.mainBranchOrder;
yr = {}, yr[t] = null, Dc = {}, Dc[t] = { name: t, order: e }, Er = t, Vs = 0, gi();
}, AK = function() {
return Object.values(Dc).map((e, r) => e.order !== null ? e : {
...e,
order: parseFloat(`0.${r}`, 10)
}).sort((e, r) => e.order - r.order).map(({ name: e }) => ({ name: e }));
}, MK = function() {
return yr;
}, LK = function() {
return xr;
}, dA = function() {
const t = Object.keys(xr).map(function(e) {
return xr[e];
});
return t.forEach(function(e) {
H.debug(e.id);
}), t.sort((e, r) => e.seq - r.seq), t;
}, RK = function() {
return Er;
}, IK = function() {
return cA;
}, NK = function() {
return rn;
}, Oc = {
NORMAL: 0,
REVERSE: 1,
HIGHLIGHT: 2,
MERGE: 3,
CHERRY_PICK: 4
}, BK = {
parseDirective: mK,
getConfig: () => nt().gitGraph,
setDirection: _K,
setOptions: vK,
getOptions: xK,
commit: kK,
branch: wK,
merge: TK,
cherryPick: EK,
checkout: hA,
prettyPrint: CK,
clear: SK,
getBranchesAsObjArray: AK,
getBranches: MK,
getCommits: LK,
getCommitsArray: dA,
getCurrentBranch: RK,
getDirection: IK,
getHead: NK,
setAccTitle: Yn,
getAccTitle: yi,
getAccDescription: bi,
setAccDescription: mi,
commitType: Oc
};
function vn(t, e, r) {
if (typeof e.insert > "u")
return;
let n = t.getAccTitle(), i = t.getAccDescription();
e.attr("role", "img").attr("aria-labelledby", "chart-title-" + r + " chart-desc-" + r), e.insert("desc", ":first-child").attr("id", "chart-desc-" + r).text(i), e.insert("title", ":first-child").attr("id", "chart-title-" + r).text(n);
}
let Xl = {};
const Tn = {
NORMAL: 0,
REVERSE: 1,
HIGHLIGHT: 2,
MERGE: 3,
CHERRY_PICK: 4
}, _s = 8;
let gn = {}, Df = {}, sc = [], Of = 0;
const DK = () => {
gn = {}, Df = {}, Xl = {}, Of = 0, sc = [];
}, OK = (t) => {
const e = document.createElementNS("http://www.w3.org/2000/svg", "text");
let r = [];
typeof t == "string" ? r = t.split(/\\n|\n|
/gi) : Array.isArray(t) ? r = t : r = [];
for (let n = 0; n < r.length; n++) {
const i = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
i.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), i.setAttribute("dy", "1em"), i.setAttribute("x", "0"), i.setAttribute("class", "row"), i.textContent = r[n].trim(), e.appendChild(i);
}
return e;
}, a6 = (t, e, r) => {
const n = Ko().gitGraph, i = t.append("g").attr("class", "commit-bullets"), a = t.append("g").attr("class", "commit-labels");
let s = 0;
Object.keys(e).sort((u, h) => e[u].seq - e[h].seq).forEach((u) => {
const h = e[u], d = gn[h.branch].pos, f = s + 10;
if (r) {
let p, m = typeof h.customType < "u" && h.customType !== "" ? h.customType : h.type;
switch (m) {
case Tn.NORMAL:
p = "commit-normal";
break;
case Tn.REVERSE:
p = "commit-reverse";
break;
case Tn.HIGHLIGHT:
p = "commit-highlight";
break;
case Tn.MERGE:
p = "commit-merge";
break;
case Tn.CHERRY_PICK:
p = "commit-cherry-pick";
break;
default:
p = "commit-normal";
}
if (m === Tn.HIGHLIGHT) {
const _ = i.append("rect");
_.attr("x", f - 10), _.attr("y", d - 10), _.attr("height", 20), _.attr("width", 20), _.attr(
"class",
`commit ${h.id} commit-highlight${gn[h.branch].index % _s} ${p}-outer`
), i.append("rect").attr("x", f - 6).attr("y", d - 6).attr("height", 12).attr("width", 12).attr(
"class",
`commit ${h.id} commit${gn[h.branch].index % _s} ${p}-inner`
);
} else if (m === Tn.CHERRY_PICK)
i.append("circle").attr("cx", f).attr("cy", d).attr("r", 10).attr("class", `commit ${h.id} ${p}`), i.append("circle").attr("cx", f - 3).attr("cy", d + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${h.id} ${p}`), i.append("circle").attr("cx", f + 3).attr("cy", d + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${h.id} ${p}`), i.append("line").attr("x1", f + 3).attr("y1", d + 1).attr("x2", f).attr("y2", d - 5).attr("stroke", "#fff").attr("class", `commit ${h.id} ${p}`), i.append("line").attr("x1", f - 3).attr("y1", d + 1).attr("x2", f).attr("y2", d - 5).attr("stroke", "#fff").attr("class", `commit ${h.id} ${p}`);
else {
const _ = i.append("circle");
if (_.attr("cx", f), _.attr("cy", d), _.attr("r", h.type === Tn.MERGE ? 9 : 10), _.attr(
"class",
`commit ${h.id} commit${gn[h.branch].index % _s}`
), m === Tn.MERGE) {
const y = i.append("circle");
y.attr("cx", f), y.attr("cy", d), y.attr("r", 6), y.attr(
"class",
`commit ${p} ${h.id} commit${gn[h.branch].index % _s}`
);
}
m === Tn.REVERSE && i.append("path").attr("d", `M ${f - 5},${d - 5}L${f + 5},${d + 5}M${f - 5},${d + 5}L${f + 5},${d - 5}`).attr(
"class",
`commit ${p} ${h.id} commit${gn[h.branch].index % _s}`
);
}
}
if (Df[h.id] = { x: s + 10, y: d }, r) {
if (h.type !== Tn.CHERRY_PICK && (h.customId && h.type === Tn.MERGE || h.type !== Tn.MERGE) && n.showCommitLabel) {
const _ = a.append("g"), y = _.insert("rect").attr("class", "commit-label-bkg"), b = _.append("text").attr("x", s).attr("y", d + 25).attr("class", "commit-label").text(h.id);
let x = b.node().getBBox();
if (y.attr("x", s + 10 - x.width / 2 - 2).attr("y", d + 13.5).attr("width", x.width + 2 * 2).attr("height", x.height + 2 * 2), b.attr("x", s + 10 - x.width / 2), n.rotateCommitLabel) {
let k = -7.5 - (x.width + 10) / 25 * 9.5, T = 10 + x.width / 25 * 8.5;
_.attr(
"transform",
"translate(" + k + ", " + T + ") rotate(" + -45 + ", " + s + ", " + d + ")"
);
}
}
if (h.tag) {
const _ = a.insert("polygon"), y = a.append("circle"), b = a.append("text").attr("y", d - 16).attr("class", "tag-label").text(h.tag);
let x = b.node().getBBox();
b.attr("x", s + 10 - x.width / 2);
const k = x.height / 2, T = d - 19.2;
_.attr("class", "tag-label-bkg").attr(
"points",
`
${s - x.width / 2 - 4 / 2},${T + 2}
${s - x.width / 2 - 4 / 2},${T - 2}
${s + 10 - x.width / 2 - 4},${T - k - 2}
${s + 10 + x.width / 2 + 4},${T - k - 2}
${s + 10 + x.width / 2 + 4},${T + k + 2}
${s + 10 - x.width / 2 - 4},${T + k + 2}`
), y.attr("cx", s - x.width / 2 + 4 / 2).attr("cy", T).attr("r", 1.5).attr("class", "tag-hole");
}
}
s += 50, s > Of && (Of = s);
});
}, FK = (t, e, r) => Object.keys(r).filter((a) => r[a].branch === e.branch && r[a].seq > t.seq && r[a].seq < e.seq).length > 0, fb = (t, e, r) => {
const n = r || 0, i = t + Math.abs(t - e) / 2;
if (n > 5)
return i;
let a = !0;
for (let o = 0; o < sc.length; o++)
Math.abs(sc[o] - i) < 10 && (a = !1);
if (a)
return sc.push(i), i;
const s = Math.abs(t - e);
return fb(t, e - s / 5, n + 1);
}, PK = (t, e, r, n) => {
const i = Df[e.id], a = Df[r.id], s = FK(e, r, n);
let o = "", l = "", u = 0, h = 0, d = gn[r.branch].index, f;
if (s) {
o = "A 10 10, 0, 0, 0,", l = "A 10 10, 0, 0, 1,", u = 10, h = 10, d = gn[r.branch].index;
const p = i.y < a.y ? fb(i.y, a.y) : fb(a.y, i.y);
i.y < a.y ? f = `M ${i.x} ${i.y} L ${i.x} ${p - u} ${o} ${i.x + h} ${p} L ${a.x - u} ${p} ${l} ${a.x} ${p + h} L ${a.x} ${a.y}` : f = `M ${i.x} ${i.y} L ${i.x} ${p + u} ${l} ${i.x + h} ${p} L ${a.x - u} ${p} ${o} ${a.x} ${p - h} L ${a.x} ${a.y}`;
} else
i.y < a.y && (o = "A 20 20, 0, 0, 0,", u = 20, h = 20, d = gn[r.branch].index, f = `M ${i.x} ${i.y} L ${i.x} ${a.y - u} ${o} ${i.x + h} ${a.y} L ${a.x} ${a.y}`), i.y > a.y && (o = "A 20 20, 0, 0, 0,", u = 20, h = 20, d = gn[e.branch].index, f = `M ${i.x} ${i.y} L ${a.x - u} ${i.y} ${o} ${a.x} ${i.y - h} L ${a.x} ${a.y}`), i.y === a.y && (d = gn[e.branch].index, f = `M ${i.x} ${i.y} L ${i.x} ${a.y - u} ${o} ${i.x + h} ${a.y} L ${a.x} ${a.y}`);
t.append("path").attr("d", f).attr("class", "arrow arrow" + d % _s);
}, qK = (t, e) => {
const r = t.append("g").attr("class", "commit-arrows");
Object.keys(e).forEach((n) => {
const i = e[n];
i.parents && i.parents.length > 0 && i.parents.forEach((a) => {
PK(r, e[a], i, e);
});
});
}, VK = (t, e) => {
const r = Ko().gitGraph, n = t.append("g");
e.forEach((i, a) => {
const s = a % _s, o = gn[i.name].pos, l = n.append("line");
l.attr("x1", 0), l.attr("y1", o), l.attr("x2", Of), l.attr("y2", o), l.attr("class", "branch branch" + s), sc.push(o);
let u = i.name;
const h = OK(u), d = n.insert("rect"), p = n.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + s);
p.node().appendChild(h);
let m = h.getBBox();
d.attr("class", "branchLabelBkg label" + s).attr("rx", 4).attr("ry", 4).attr("x", -m.width - 4 - (r.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -m.height / 2 + 8).attr("width", m.width + 18).attr("height", m.height + 4), p.attr(
"transform",
"translate(" + (-m.width - 14 - (r.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (o - m.height / 2 - 1) + ")"
), d.attr("transform", "translate(" + -19 + ", " + (o - m.height / 2) + ")");
});
}, zK = function(t, e, r, n) {
DK();
const i = Ko(), a = Ko().gitGraph;
H.debug("in gitgraph renderer", t + `
`, "id:", e, r), Xl = n.db.getCommits();
const s = n.db.getBranchesAsObjArray();
let o = 0;
s.forEach((u, h) => {
gn[u.name] = { pos: o, index: h }, o += 50 + (a.rotateCommitLabel ? 40 : 0);
});
const l = St(`[id="${e}"]`);
vn(n.db, l, e), a6(l, Xl, !1), a.showBranches && VK(l, s), qK(l, Xl), a6(l, Xl, !0), oA(void 0, l, a.diagramPadding, i.useMaxWidth);
}, YK = {
draw: zK
}, UK = (t) => `
.commit-id,
.commit-msg,
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
${[0, 1, 2, 3, 4, 5, 6, 7].map(
(e) => `
.branch-label${e} { fill: ${t["gitBranchLabel" + e]}; }
.commit${e} { stroke: ${t["git" + e]}; fill: ${t["git" + e]}; }
.commit-highlight${e} { stroke: ${t["gitInv" + e]}; fill: ${t["gitInv" + e]}; }
.label${e} { fill: ${t["git" + e]}; }
.arrow${e} { stroke: ${t["git" + e]}; }
`
).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${t.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
.tag-hole { fill: ${t.textColor}; }
.commit-merge {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
}
.commit-reverse {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
}
`;
var Fc = function() {
var t = function(zt, wt, bt, Et) {
for (bt = bt || {}, Et = zt.length; Et--; bt[zt[Et]] = wt)
;
return bt;
}, e = [1, 6], r = [1, 7], n = [1, 8], i = [1, 9], a = [1, 16], s = [1, 11], o = [1, 12], l = [1, 13], u = [1, 14], h = [1, 15], d = [1, 27], f = [1, 33], p = [1, 34], m = [1, 35], _ = [1, 36], y = [1, 37], b = [1, 72], x = [1, 73], k = [1, 74], T = [1, 75], C = [1, 76], M = [1, 77], S = [1, 78], R = [1, 38], A = [1, 39], L = [1, 40], v = [1, 41], B = [1, 42], w = [1, 43], D = [1, 44], N = [1, 45], z = [1, 46], X = [1, 47], ct = [1, 48], J = [1, 49], Y = [1, 50], $ = [1, 51], lt = [1, 52], ut = [1, 53], W = [1, 54], tt = [1, 55], K = [1, 56], it = [1, 57], Z = [1, 59], V = [1, 60], Q = [1, 61], q = [1, 62], U = [1, 63], F = [1, 64], j = [1, 65], P = [1, 66], et = [1, 67], at = [1, 68], It = [1, 69], Lt = [24, 52], Rt = [24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], Ct = [15, 24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], pt = [1, 94], mt = [1, 95], _t = [1, 96], Tt = [1, 97], ft = [15, 24, 52], le = [7, 8, 9, 10, 18, 22, 25, 26, 27, 28], Dt = [15, 24, 43, 52], Ht = [15, 24, 43, 52, 86, 87, 89, 90], $t = [15, 43], Qt = [44, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], we = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, mermaidDoc: 4, direction: 5, directive: 6, direction_tb: 7, direction_bt: 8, direction_rl: 9, direction_lr: 10, graphConfig: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, NEWLINE: 15, ":": 16, argDirective: 17, open_directive: 18, type_directive: 19, arg_directive: 20, close_directive: 21, C4_CONTEXT: 22, statements: 23, EOF: 24, C4_CONTAINER: 25, C4_COMPONENT: 26, C4_DYNAMIC: 27, C4_DEPLOYMENT: 28, otherStatements: 29, diagramStatements: 30, otherStatement: 31, title: 32, accDescription: 33, acc_title: 34, acc_title_value: 35, acc_descr: 36, acc_descr_value: 37, acc_descr_multiline_value: 38, boundaryStatement: 39, boundaryStartStatement: 40, boundaryStopStatement: 41, boundaryStart: 42, LBRACE: 43, ENTERPRISE_BOUNDARY: 44, attributes: 45, SYSTEM_BOUNDARY: 46, BOUNDARY: 47, CONTAINER_BOUNDARY: 48, NODE: 49, NODE_L: 50, NODE_R: 51, RBRACE: 52, diagramStatement: 53, PERSON: 54, PERSON_EXT: 55, SYSTEM: 56, SYSTEM_DB: 57, SYSTEM_QUEUE: 58, SYSTEM_EXT: 59, SYSTEM_EXT_DB: 60, SYSTEM_EXT_QUEUE: 61, CONTAINER: 62, CONTAINER_DB: 63, CONTAINER_QUEUE: 64, CONTAINER_EXT: 65, CONTAINER_EXT_DB: 66, CONTAINER_EXT_QUEUE: 67, COMPONENT: 68, COMPONENT_DB: 69, COMPONENT_QUEUE: 70, COMPONENT_EXT: 71, COMPONENT_EXT_DB: 72, COMPONENT_EXT_QUEUE: 73, REL: 74, BIREL: 75, REL_U: 76, REL_D: 77, REL_L: 78, REL_R: 79, REL_B: 80, REL_INDEX: 81, UPDATE_EL_STYLE: 82, UPDATE_REL_STYLE: 83, UPDATE_LAYOUT_CONFIG: 84, attribute: 85, STR: 86, STR_KEY: 87, STR_VALUE: 88, ATTRIBUTE: 89, ATTRIBUTE_EMPTY: 90, $accept: 0, $end: 1 },
terminals_: { 2: "error", 7: "direction_tb", 8: "direction_bt", 9: "direction_rl", 10: "direction_lr", 15: "NEWLINE", 16: ":", 18: "open_directive", 19: "type_directive", 20: "arg_directive", 21: "close_directive", 22: "C4_CONTEXT", 24: "EOF", 25: "C4_CONTAINER", 26: "C4_COMPONENT", 27: "C4_DYNAMIC", 28: "C4_DEPLOYMENT", 32: "title", 33: "accDescription", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 43: "LBRACE", 44: "ENTERPRISE_BOUNDARY", 46: "SYSTEM_BOUNDARY", 47: "BOUNDARY", 48: "CONTAINER_BOUNDARY", 49: "NODE", 50: "NODE_L", 51: "NODE_R", 52: "RBRACE", 54: "PERSON", 55: "PERSON_EXT", 56: "SYSTEM", 57: "SYSTEM_DB", 58: "SYSTEM_QUEUE", 59: "SYSTEM_EXT", 60: "SYSTEM_EXT_DB", 61: "SYSTEM_EXT_QUEUE", 62: "CONTAINER", 63: "CONTAINER_DB", 64: "CONTAINER_QUEUE", 65: "CONTAINER_EXT", 66: "CONTAINER_EXT_DB", 67: "CONTAINER_EXT_QUEUE", 68: "COMPONENT", 69: "COMPONENT_DB", 70: "COMPONENT_QUEUE", 71: "COMPONENT_EXT", 72: "COMPONENT_EXT_DB", 73: "COMPONENT_EXT_QUEUE", 74: "REL", 75: "BIREL", 76: "REL_U", 77: "REL_D", 78: "REL_L", 79: "REL_R", 80: "REL_B", 81: "REL_INDEX", 82: "UPDATE_EL_STYLE", 83: "UPDATE_REL_STYLE", 84: "UPDATE_LAYOUT_CONFIG", 86: "STR", 87: "STR_KEY", 88: "STR_VALUE", 89: "ATTRIBUTE", 90: "ATTRIBUTE_EMPTY" },
productions_: [0, [3, 1], [3, 1], [3, 2], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [6, 4], [6, 6], [12, 1], [13, 1], [17, 1], [14, 1], [11, 4], [11, 4], [11, 4], [11, 4], [11, 4], [23, 1], [23, 1], [23, 2], [29, 1], [29, 2], [29, 3], [31, 1], [31, 1], [31, 2], [31, 2], [31, 1], [39, 3], [40, 3], [40, 3], [40, 4], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [41, 1], [30, 1], [30, 2], [30, 3], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 1], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [45, 1], [45, 2], [85, 1], [85, 2], [85, 1], [85, 1]],
performAction: function(wt, bt, Et, kt, Ut, gt, he) {
var yt = gt.length - 1;
switch (Ut) {
case 4:
kt.setDirection("TB");
break;
case 5:
kt.setDirection("BT");
break;
case 6:
kt.setDirection("RL");
break;
case 7:
kt.setDirection("LR");
break;
case 11:
kt.parseDirective("%%{", "open_directive");
break;
case 12:
break;
case 13:
gt[yt] = gt[yt].trim().replace(/'/g, '"'), kt.parseDirective(gt[yt], "arg_directive");
break;
case 14:
kt.parseDirective("}%%", "close_directive", "c4Context");
break;
case 15:
case 16:
case 17:
case 18:
case 19:
kt.setC4Type(gt[yt - 3]);
break;
case 26:
kt.setTitle(gt[yt].substring(6)), this.$ = gt[yt].substring(6);
break;
case 27:
kt.setAccDescription(gt[yt].substring(15)), this.$ = gt[yt].substring(15);
break;
case 28:
this.$ = gt[yt].trim(), kt.setTitle(this.$);
break;
case 29:
case 30:
this.$ = gt[yt].trim(), kt.setAccDescription(this.$);
break;
case 35:
case 36:
gt[yt].splice(2, 0, "ENTERPRISE"), kt.addPersonOrSystemBoundary(...gt[yt]), this.$ = gt[yt];
break;
case 37:
kt.addPersonOrSystemBoundary(...gt[yt]), this.$ = gt[yt];
break;
case 38:
gt[yt].splice(2, 0, "CONTAINER"), kt.addContainerBoundary(...gt[yt]), this.$ = gt[yt];
break;
case 39:
kt.addDeploymentNode("node", ...gt[yt]), this.$ = gt[yt];
break;
case 40:
kt.addDeploymentNode("nodeL", ...gt[yt]), this.$ = gt[yt];
break;
case 41:
kt.addDeploymentNode("nodeR", ...gt[yt]), this.$ = gt[yt];
break;
case 42:
kt.popBoundaryParseStack();
break;
case 46:
kt.addPersonOrSystem("person", ...gt[yt]), this.$ = gt[yt];
break;
case 47:
kt.addPersonOrSystem("external_person", ...gt[yt]), this.$ = gt[yt];
break;
case 48:
kt.addPersonOrSystem("system", ...gt[yt]), this.$ = gt[yt];
break;
case 49:
kt.addPersonOrSystem("system_db", ...gt[yt]), this.$ = gt[yt];
break;
case 50:
kt.addPersonOrSystem("system_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 51:
kt.addPersonOrSystem("external_system", ...gt[yt]), this.$ = gt[yt];
break;
case 52:
kt.addPersonOrSystem("external_system_db", ...gt[yt]), this.$ = gt[yt];
break;
case 53:
kt.addPersonOrSystem("external_system_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 54:
kt.addContainer("container", ...gt[yt]), this.$ = gt[yt];
break;
case 55:
kt.addContainer("container_db", ...gt[yt]), this.$ = gt[yt];
break;
case 56:
kt.addContainer("container_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 57:
kt.addContainer("external_container", ...gt[yt]), this.$ = gt[yt];
break;
case 58:
kt.addContainer("external_container_db", ...gt[yt]), this.$ = gt[yt];
break;
case 59:
kt.addContainer("external_container_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 60:
kt.addComponent("component", ...gt[yt]), this.$ = gt[yt];
break;
case 61:
kt.addComponent("component_db", ...gt[yt]), this.$ = gt[yt];
break;
case 62:
kt.addComponent("component_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 63:
kt.addComponent("external_component", ...gt[yt]), this.$ = gt[yt];
break;
case 64:
kt.addComponent("external_component_db", ...gt[yt]), this.$ = gt[yt];
break;
case 65:
kt.addComponent("external_component_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 67:
kt.addRel("rel", ...gt[yt]), this.$ = gt[yt];
break;
case 68:
kt.addRel("birel", ...gt[yt]), this.$ = gt[yt];
break;
case 69:
kt.addRel("rel_u", ...gt[yt]), this.$ = gt[yt];
break;
case 70:
kt.addRel("rel_d", ...gt[yt]), this.$ = gt[yt];
break;
case 71:
kt.addRel("rel_l", ...gt[yt]), this.$ = gt[yt];
break;
case 72:
kt.addRel("rel_r", ...gt[yt]), this.$ = gt[yt];
break;
case 73:
kt.addRel("rel_b", ...gt[yt]), this.$ = gt[yt];
break;
case 74:
gt[yt].splice(0, 1), kt.addRel("rel", ...gt[yt]), this.$ = gt[yt];
break;
case 75:
kt.updateElStyle("update_el_style", ...gt[yt]), this.$ = gt[yt];
break;
case 76:
kt.updateRelStyle("update_rel_style", ...gt[yt]), this.$ = gt[yt];
break;
case 77:
kt.updateLayoutConfig("update_layout_config", ...gt[yt]), this.$ = gt[yt];
break;
case 78:
this.$ = [gt[yt]];
break;
case 79:
gt[yt].unshift(gt[yt - 1]), this.$ = gt[yt];
break;
case 80:
case 82:
this.$ = gt[yt].trim();
break;
case 81:
let re = {};
re[gt[yt - 1].trim()] = gt[yt].trim(), this.$ = re;
break;
case 83:
this.$ = "";
break;
}
},
table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: e, 8: r, 9: n, 10: i, 11: 5, 12: 10, 18: a, 22: s, 25: o, 26: l, 27: u, 28: h }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 3: 17, 4: 2, 5: 3, 6: 4, 7: e, 8: r, 9: n, 10: i, 11: 5, 12: 10, 18: a, 22: s, 25: o, 26: l, 27: u, 28: h }, { 1: [2, 8] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 1: [2, 7] }, { 13: 18, 19: [1, 19] }, { 15: [1, 20] }, { 15: [1, 21] }, { 15: [1, 22] }, { 15: [1, 23] }, { 15: [1, 24] }, { 19: [2, 11] }, { 1: [2, 3] }, { 14: 25, 16: [1, 26], 21: d }, t([16, 21], [2, 12]), { 23: 28, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 23: 79, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 23: 80, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 23: 81, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 23: 82, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 15: [1, 83] }, { 17: 84, 20: [1, 85] }, { 15: [2, 14] }, { 24: [1, 86] }, t(Lt, [2, 20], { 53: 32, 39: 58, 40: 70, 42: 71, 30: 87, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }), t(Lt, [2, 21]), t(Rt, [2, 23], { 15: [1, 88] }), t(Lt, [2, 43], { 15: [1, 89] }), t(Ct, [2, 26]), t(Ct, [2, 27]), { 35: [1, 90] }, { 37: [1, 91] }, t(Ct, [2, 30]), { 45: 92, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 98, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 99, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 100, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 101, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 102, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 103, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 104, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 105, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 106, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 107, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 108, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 109, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 110, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 111, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 112, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 113, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 114, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 115, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 116, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, t(ft, [2, 66]), { 45: 117, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 118, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 119, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 120, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 121, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 122, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 123, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 124, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 125, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 126, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 127, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 30: 128, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 15: [1, 130], 43: [1, 129] }, { 45: 131, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 132, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 133, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 134, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 135, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 136, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 137, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 24: [1, 138] }, { 24: [1, 139] }, { 24: [1, 140] }, { 24: [1, 141] }, t(le, [2, 9]), { 14: 142, 21: d }, { 21: [2, 13] }, { 1: [2, 15] }, t(Lt, [2, 22]), t(Rt, [2, 24], { 31: 31, 29: 143, 32: f, 33: p, 34: m, 36: _, 38: y }), t(Lt, [2, 44], { 29: 29, 30: 30, 31: 31, 53: 32, 39: 58, 40: 70, 42: 71, 23: 144, 32: f, 33: p, 34: m, 36: _, 38: y, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }), t(Ct, [2, 28]), t(Ct, [2, 29]), t(ft, [2, 46]), t(Dt, [2, 78], { 85: 93, 45: 145, 86: pt, 87: mt, 89: _t, 90: Tt }), t(Ht, [2, 80]), { 88: [1, 146] }, t(Ht, [2, 82]), t(Ht, [2, 83]), t(ft, [2, 47]), t(ft, [2, 48]), t(ft, [2, 49]), t(ft, [2, 50]), t(ft, [2, 51]), t(ft, [2, 52]), t(ft, [2, 53]), t(ft, [2, 54]), t(ft, [2, 55]), t(ft, [2, 56]), t(ft, [2, 57]), t(ft, [2, 58]), t(ft, [2, 59]), t(ft, [2, 60]), t(ft, [2, 61]), t(ft, [2, 62]), t(ft, [2, 63]), t(ft, [2, 64]), t(ft, [2, 65]), t(ft, [2, 67]), t(ft, [2, 68]), t(ft, [2, 69]), t(ft, [2, 70]), t(ft, [2, 71]), t(ft, [2, 72]), t(ft, [2, 73]), t(ft, [2, 74]), t(ft, [2, 75]), t(ft, [2, 76]), t(ft, [2, 77]), { 41: 147, 52: [1, 148] }, { 15: [1, 149] }, { 43: [1, 150] }, t($t, [2, 35]), t($t, [2, 36]), t($t, [2, 37]), t($t, [2, 38]), t($t, [2, 39]), t($t, [2, 40]), t($t, [2, 41]), { 1: [2, 16] }, { 1: [2, 17] }, { 1: [2, 18] }, { 1: [2, 19] }, { 15: [1, 151] }, t(Rt, [2, 25]), t(Lt, [2, 45]), t(Dt, [2, 79]), t(Ht, [2, 81]), t(ft, [2, 31]), t(ft, [2, 42]), t(Qt, [2, 32]), t(Qt, [2, 33], { 15: [1, 152] }), t(le, [2, 10]), t(Qt, [2, 34])],
defaultActions: { 2: [2, 1], 3: [2, 2], 5: [2, 8], 6: [2, 4], 7: [2, 5], 8: [2, 6], 9: [2, 7], 16: [2, 11], 17: [2, 3], 27: [2, 14], 85: [2, 13], 86: [2, 15], 138: [2, 16], 139: [2, 17], 140: [2, 18], 141: [2, 19] },
parseError: function(wt, bt) {
if (bt.recoverable)
this.trace(wt);
else {
var Et = new Error(wt);
throw Et.hash = bt, Et;
}
},
parse: function(wt) {
var bt = this, Et = [0], kt = [], Ut = [null], gt = [], he = this.table, yt = "", re = 0, _e = 0, ge = 2, be = 1, Te = gt.slice.call(arguments, 1), Wt = Object.create(this.lexer), ae = { yy: {} };
for (var ye in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, ye) && (ae.yy[ye] = this.yy[ye]);
Wt.setInput(wt, ae.yy), ae.yy.lexer = Wt, ae.yy.parser = this, typeof Wt.yylloc > "u" && (Wt.yylloc = {});
var ue = Wt.yylloc;
gt.push(ue);
var Wi = Wt.options && Wt.options.ranges;
typeof ae.yy.parseError == "function" ? this.parseError = ae.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function Or() {
var Jt;
return Jt = kt.pop() || Wt.lex() || be, typeof Jt != "number" && (Jt instanceof Array && (kt = Jt, Jt = kt.pop()), Jt = bt.symbols_[Jt] || Jt), Jt;
}
for (var Ie, se, $e, _r, He = {}, Xe, qt, st, At; ; ) {
if (se = Et[Et.length - 1], this.defaultActions[se] ? $e = this.defaultActions[se] : ((Ie === null || typeof Ie > "u") && (Ie = Or()), $e = he[se] && he[se][Ie]), typeof $e > "u" || !$e.length || !$e[0]) {
var Nt = "";
At = [];
for (Xe in he[se])
this.terminals_[Xe] && Xe > ge && At.push("'" + this.terminals_[Xe] + "'");
Wt.showPosition ? Nt = "Parse error on line " + (re + 1) + `:
` + Wt.showPosition() + `
Expecting ` + At.join(", ") + ", got '" + (this.terminals_[Ie] || Ie) + "'" : Nt = "Parse error on line " + (re + 1) + ": Unexpected " + (Ie == be ? "end of input" : "'" + (this.terminals_[Ie] || Ie) + "'"), this.parseError(Nt, {
text: Wt.match,
token: this.terminals_[Ie] || Ie,
line: Wt.yylineno,
loc: ue,
expected: At
});
}
if ($e[0] instanceof Array && $e.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + se + ", token: " + Ie);
switch ($e[0]) {
case 1:
Et.push(Ie), Ut.push(Wt.yytext), gt.push(Wt.yylloc), Et.push($e[1]), Ie = null, _e = Wt.yyleng, yt = Wt.yytext, re = Wt.yylineno, ue = Wt.yylloc;
break;
case 2:
if (qt = this.productions_[$e[1]][1], He.$ = Ut[Ut.length - qt], He._$ = {
first_line: gt[gt.length - (qt || 1)].first_line,
last_line: gt[gt.length - 1].last_line,
first_column: gt[gt.length - (qt || 1)].first_column,
last_column: gt[gt.length - 1].last_column
}, Wi && (He._$.range = [
gt[gt.length - (qt || 1)].range[0],
gt[gt.length - 1].range[1]
]), _r = this.performAction.apply(He, [
yt,
_e,
re,
ae.yy,
$e[1],
Ut,
gt
].concat(Te)), typeof _r < "u")
return _r;
qt && (Et = Et.slice(0, -1 * qt * 2), Ut = Ut.slice(0, -1 * qt), gt = gt.slice(0, -1 * qt)), Et.push(this.productions_[$e[1]][0]), Ut.push(He.$), gt.push(He._$), st = he[Et[Et.length - 2]][Et[Et.length - 1]], Et.push(st);
break;
case 3:
return !0;
}
}
return !0;
}
}, Gt = function() {
var zt = {
EOF: 1,
parseError: function(bt, Et) {
if (this.yy.parser)
this.yy.parser.parseError(bt, Et);
else
throw new Error(bt);
},
setInput: function(wt, bt) {
return this.yy = bt || this.yy || {}, this._input = wt, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var wt = this._input[0];
this.yytext += wt, this.yyleng++, this.offset++, this.match += wt, this.matched += wt;
var bt = wt.match(/(?:\r\n?|\n).*/g);
return bt ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), wt;
},
unput: function(wt) {
var bt = wt.length, Et = wt.split(/(?:\r\n?|\n)/g);
this._input = wt + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - bt), this.offset -= bt;
var kt = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), Et.length - 1 && (this.yylineno -= Et.length - 1);
var Ut = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: Et ? (Et.length === kt.length ? this.yylloc.first_column : 0) + kt[kt.length - Et.length].length - Et[0].length : this.yylloc.first_column - bt
}, this.options.ranges && (this.yylloc.range = [Ut[0], Ut[0] + this.yyleng - bt]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(wt) {
this.unput(this.match.slice(wt));
},
pastInput: function() {
var wt = this.matched.substr(0, this.matched.length - this.match.length);
return (wt.length > 20 ? "..." : "") + wt.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var wt = this.match;
return wt.length < 20 && (wt += this._input.substr(0, 20 - wt.length)), (wt.substr(0, 20) + (wt.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var wt = this.pastInput(), bt = new Array(wt.length + 1).join("-");
return wt + this.upcomingInput() + `
` + bt + "^";
},
test_match: function(wt, bt) {
var Et, kt, Ut;
if (this.options.backtrack_lexer && (Ut = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (Ut.yylloc.range = this.yylloc.range.slice(0))), kt = wt[0].match(/(?:\r\n?|\n).*/g), kt && (this.yylineno += kt.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: kt ? kt[kt.length - 1].length - kt[kt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + wt[0].length
}, this.yytext += wt[0], this.match += wt[0], this.matches = wt, 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(wt[0].length), this.matched += wt[0], Et = this.performAction.call(this, this.yy, this, bt, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), Et)
return Et;
if (this._backtrack) {
for (var gt in Ut)
this[gt] = Ut[gt];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var wt, bt, Et, kt;
this._more || (this.yytext = "", this.match = "");
for (var Ut = this._currentRules(), gt = 0; gt < Ut.length; gt++)
if (Et = this._input.match(this.rules[Ut[gt]]), Et && (!bt || Et[0].length > bt[0].length)) {
if (bt = Et, kt = gt, this.options.backtrack_lexer) {
if (wt = this.test_match(Et, Ut[gt]), wt !== !1)
return wt;
if (this._backtrack) {
bt = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return bt ? (wt = this.test_match(bt, Ut[kt]), wt !== !1 ? wt : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var bt = this.next();
return bt || this.lex();
},
begin: function(bt) {
this.conditionStack.push(bt);
},
popState: function() {
var bt = this.conditionStack.length - 1;
return bt > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(bt) {
return bt = this.conditionStack.length - 1 - Math.abs(bt || 0), bt >= 0 ? this.conditionStack[bt] : "INITIAL";
},
pushState: function(bt) {
this.begin(bt);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: {},
performAction: function(bt, Et, kt, Ut) {
switch (kt) {
case 0:
return this.begin("open_directive"), 18;
case 1:
return 7;
case 2:
return 8;
case 3:
return 9;
case 4:
return 10;
case 5:
return this.begin("type_directive"), 19;
case 6:
return this.popState(), this.begin("arg_directive"), 16;
case 7:
return this.popState(), this.popState(), 21;
case 8:
return 20;
case 9:
return 32;
case 10:
return 33;
case 11:
return this.begin("acc_title"), 34;
case 12:
return this.popState(), "acc_title_value";
case 13:
return this.begin("acc_descr"), 36;
case 14:
return this.popState(), "acc_descr_value";
case 15:
this.begin("acc_descr_multiline");
break;
case 16:
this.popState();
break;
case 17:
return "acc_descr_multiline_value";
case 18:
break;
case 19:
c;
break;
case 20:
return 15;
case 21:
break;
case 22:
return 22;
case 23:
return 25;
case 24:
return 26;
case 25:
return 27;
case 26:
return 28;
case 27:
return this.begin("person_ext"), 55;
case 28:
return this.begin("person"), 54;
case 29:
return this.begin("system_ext_queue"), 61;
case 30:
return this.begin("system_ext_db"), 60;
case 31:
return this.begin("system_ext"), 59;
case 32:
return this.begin("system_queue"), 58;
case 33:
return this.begin("system_db"), 57;
case 34:
return this.begin("system"), 56;
case 35:
return this.begin("boundary"), 47;
case 36:
return this.begin("enterprise_boundary"), 44;
case 37:
return this.begin("system_boundary"), 46;
case 38:
return this.begin("container_ext_queue"), 67;
case 39:
return this.begin("container_ext_db"), 66;
case 40:
return this.begin("container_ext"), 65;
case 41:
return this.begin("container_queue"), 64;
case 42:
return this.begin("container_db"), 63;
case 43:
return this.begin("container"), 62;
case 44:
return this.begin("container_boundary"), 48;
case 45:
return this.begin("component_ext_queue"), 73;
case 46:
return this.begin("component_ext_db"), 72;
case 47:
return this.begin("component_ext"), 71;
case 48:
return this.begin("component_queue"), 70;
case 49:
return this.begin("component_db"), 69;
case 50:
return this.begin("component"), 68;
case 51:
return this.begin("node"), 49;
case 52:
return this.begin("node"), 49;
case 53:
return this.begin("node_l"), 50;
case 54:
return this.begin("node_r"), 51;
case 55:
return this.begin("rel"), 74;
case 56:
return this.begin("birel"), 75;
case 57:
return this.begin("rel_u"), 76;
case 58:
return this.begin("rel_u"), 76;
case 59:
return this.begin("rel_d"), 77;
case 60:
return this.begin("rel_d"), 77;
case 61:
return this.begin("rel_l"), 78;
case 62:
return this.begin("rel_l"), 78;
case 63:
return this.begin("rel_r"), 79;
case 64:
return this.begin("rel_r"), 79;
case 65:
return this.begin("rel_b"), 80;
case 66:
return this.begin("rel_index"), 81;
case 67:
return this.begin("update_el_style"), 82;
case 68:
return this.begin("update_rel_style"), 83;
case 69:
return this.begin("update_layout_config"), 84;
case 70:
return "EOF_IN_STRUCT";
case 71:
return this.begin("attribute"), "ATTRIBUTE_EMPTY";
case 72:
this.begin("attribute");
break;
case 73:
this.popState(), this.popState();
break;
case 74:
return 90;
case 75:
break;
case 76:
return 90;
case 77:
this.begin("string");
break;
case 78:
this.popState();
break;
case 79:
return "STR";
case 80:
this.begin("string_kv");
break;
case 81:
return this.begin("string_kv_key"), "STR_KEY";
case 82:
this.popState(), this.begin("string_kv_value");
break;
case 83:
return "STR_VALUE";
case 84:
this.popState(), this.popState();
break;
case 85:
return "STR";
case 86:
return "LBRACE";
case 87:
return "RBRACE";
case 88:
return "SPACE";
case 89:
return "EOL";
case 90:
return 24;
}
},
rules: [/^(?:%%\{)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
conditions: { acc_descr_multiline: { rules: [16, 17], inclusive: !1 }, acc_descr: { rules: [14], inclusive: !1 }, acc_title: { rules: [12], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [7, 8], inclusive: !1 }, type_directive: { rules: [6, 7], inclusive: !1 }, open_directive: { rules: [5], inclusive: !1 }, string_kv_value: { rules: [83, 84], inclusive: !1 }, string_kv_key: { rules: [82], inclusive: !1 }, string_kv: { rules: [81], inclusive: !1 }, string: { rules: [78, 79], inclusive: !1 }, attribute: { rules: [73, 74, 75, 76, 77, 80, 85], inclusive: !1 }, update_layout_config: { rules: [70, 71, 72, 73], inclusive: !1 }, update_rel_style: { rules: [70, 71, 72, 73], inclusive: !1 }, update_el_style: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_b: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_r: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_l: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_d: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_u: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_bi: { rules: [], inclusive: !1 }, rel: { rules: [70, 71, 72, 73], inclusive: !1 }, node_r: { rules: [70, 71, 72, 73], inclusive: !1 }, node_l: { rules: [70, 71, 72, 73], inclusive: !1 }, node: { rules: [70, 71, 72, 73], inclusive: !1 }, index: { rules: [], inclusive: !1 }, rel_index: { rules: [70, 71, 72, 73], inclusive: !1 }, component_ext_queue: { rules: [], inclusive: !1 }, component_ext_db: { rules: [70, 71, 72, 73], inclusive: !1 }, component_ext: { rules: [70, 71, 72, 73], inclusive: !1 }, component_queue: { rules: [70, 71, 72, 73], inclusive: !1 }, component_db: { rules: [70, 71, 72, 73], inclusive: !1 }, component: { rules: [70, 71, 72, 73], inclusive: !1 }, container_boundary: { rules: [70, 71, 72, 73], inclusive: !1 }, container_ext_queue: { rules: [], inclusive: !1 }, container_ext_db: { rules: [70, 71, 72, 73], inclusive: !1 }, container_ext: { rules: [70, 71, 72, 73], inclusive: !1 }, container_queue: { rules: [70, 71, 72, 73], inclusive: !1 }, container_db: { rules: [70, 71, 72, 73], inclusive: !1 }, container: { rules: [70, 71, 72, 73], inclusive: !1 }, birel: { rules: [70, 71, 72, 73], inclusive: !1 }, system_boundary: { rules: [70, 71, 72, 73], inclusive: !1 }, enterprise_boundary: { rules: [70, 71, 72, 73], inclusive: !1 }, boundary: { rules: [70, 71, 72, 73], inclusive: !1 }, system_ext_queue: { rules: [70, 71, 72, 73], inclusive: !1 }, system_ext_db: { rules: [70, 71, 72, 73], inclusive: !1 }, system_ext: { rules: [70, 71, 72, 73], inclusive: !1 }, system_queue: { rules: [70, 71, 72, 73], inclusive: !1 }, system_db: { rules: [70, 71, 72, 73], inclusive: !1 }, system: { rules: [70, 71, 72, 73], inclusive: !1 }, person_ext: { rules: [70, 71, 72, 73], inclusive: !1 }, person: { rules: [70, 71, 72, 73], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 18, 19, 20, 21, 22, 23, 24, 25, 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, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 86, 87, 88, 89, 90], inclusive: !0 } }
};
return zt;
}();
we.lexer = Gt;
function Ft() {
this.yy = {};
}
return Ft.prototype = we, we.Parser = Ft, new Ft();
}();
Fc.parser = Fc;
const WK = (t) => t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null;
let ui = [], Ya = [""], nn = "global", ai = "", Pi = [
{
alias: "global",
label: { text: "global" },
type: { text: "global" },
tags: null,
link: null,
parentBoundary: ""
}
], Pc = [], b4 = "", _4 = !1, Ff = 4, Pf = 2;
var pA;
const HK = function() {
return pA;
}, GK = function(t) {
pA = ci(t, nt());
}, jK = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, $K = function(t, e, r, n, i, a, s, o, l) {
if (t == null || e === void 0 || e === null || r === void 0 || r === null || n === void 0 || n === null)
return;
let u = {};
const h = Pc.find((d) => d.from === e && d.to === r);
if (h ? u = h : Pc.push(u), u.type = t, u.from = e, u.to = r, u.label = { text: n }, i == null)
u.techn = { text: "" };
else if (typeof i == "object") {
let [d, f] = Object.entries(i)[0];
u[d] = { text: f };
} else
u.techn = { text: i };
if (a == null)
u.descr = { text: "" };
else if (typeof a == "object") {
let [d, f] = Object.entries(a)[0];
u[d] = { text: f };
} else
u.descr = { text: a };
if (typeof s == "object") {
let [d, f] = Object.entries(s)[0];
u[d] = f;
} else
u.sprite = s;
if (typeof o == "object") {
let [d, f] = Object.entries(o)[0];
u[d] = f;
} else
u.tags = o;
if (typeof l == "object") {
let [d, f] = Object.entries(l)[0];
u[d] = f;
} else
u.link = l;
u.wrap = is();
}, XK = function(t, e, r, n, i, a, s) {
if (e === null || r === null)
return;
let o = {};
const l = ui.find((u) => u.alias === e);
if (l && e === l.alias ? o = l : (o.alias = e, ui.push(o)), r == null ? o.label = { text: "" } : o.label = { text: r }, n == null)
o.descr = { text: "" };
else if (typeof n == "object") {
let [u, h] = Object.entries(n)[0];
o[u] = { text: h };
} else
o.descr = { text: n };
if (typeof i == "object") {
let [u, h] = Object.entries(i)[0];
o[u] = h;
} else
o.sprite = i;
if (typeof a == "object") {
let [u, h] = Object.entries(a)[0];
o[u] = h;
} else
o.tags = a;
if (typeof s == "object") {
let [u, h] = Object.entries(s)[0];
o[u] = h;
} else
o.link = s;
o.typeC4Shape = { text: t }, o.parentBoundary = nn, o.wrap = is();
}, KK = function(t, e, r, n, i, a, s, o) {
if (e === null || r === null)
return;
let l = {};
const u = ui.find((h) => h.alias === e);
if (u && e === u.alias ? l = u : (l.alias = e, ui.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
l.techn = { text: "" };
else if (typeof n == "object") {
let [h, d] = Object.entries(n)[0];
l[h] = { text: d };
} else
l.techn = { text: n };
if (i == null)
l.descr = { text: "" };
else if (typeof i == "object") {
let [h, d] = Object.entries(i)[0];
l[h] = { text: d };
} else
l.descr = { text: i };
if (typeof a == "object") {
let [h, d] = Object.entries(a)[0];
l[h] = d;
} else
l.sprite = a;
if (typeof s == "object") {
let [h, d] = Object.entries(s)[0];
l[h] = d;
} else
l.tags = s;
if (typeof o == "object") {
let [h, d] = Object.entries(o)[0];
l[h] = d;
} else
l.link = o;
l.wrap = is(), l.typeC4Shape = { text: t }, l.parentBoundary = nn;
}, ZK = function(t, e, r, n, i, a, s, o) {
if (e === null || r === null)
return;
let l = {};
const u = ui.find((h) => h.alias === e);
if (u && e === u.alias ? l = u : (l.alias = e, ui.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
l.techn = { text: "" };
else if (typeof n == "object") {
let [h, d] = Object.entries(n)[0];
l[h] = { text: d };
} else
l.techn = { text: n };
if (i == null)
l.descr = { text: "" };
else if (typeof i == "object") {
let [h, d] = Object.entries(i)[0];
l[h] = { text: d };
} else
l.descr = { text: i };
if (typeof a == "object") {
let [h, d] = Object.entries(a)[0];
l[h] = d;
} else
l.sprite = a;
if (typeof s == "object") {
let [h, d] = Object.entries(s)[0];
l[h] = d;
} else
l.tags = s;
if (typeof o == "object") {
let [h, d] = Object.entries(o)[0];
l[h] = d;
} else
l.link = o;
l.wrap = is(), l.typeC4Shape = { text: t }, l.parentBoundary = nn;
}, QK = function(t, e, r, n, i) {
if (t === null || e === null)
return;
let a = {};
const s = Pi.find((o) => o.alias === t);
if (s && t === s.alias ? a = s : (a.alias = t, Pi.push(a)), e == null ? a.label = { text: "" } : a.label = { text: e }, r == null)
a.type = { text: "system" };
else if (typeof r == "object") {
let [o, l] = Object.entries(r)[0];
a[o] = { text: l };
} else
a.type = { text: r };
if (typeof n == "object") {
let [o, l] = Object.entries(n)[0];
a[o] = l;
} else
a.tags = n;
if (typeof i == "object") {
let [o, l] = Object.entries(i)[0];
a[o] = l;
} else
a.link = i;
a.parentBoundary = nn, a.wrap = is(), ai = nn, nn = t, Ya.push(ai);
}, JK = function(t, e, r, n, i) {
if (t === null || e === null)
return;
let a = {};
const s = Pi.find((o) => o.alias === t);
if (s && t === s.alias ? a = s : (a.alias = t, Pi.push(a)), e == null ? a.label = { text: "" } : a.label = { text: e }, r == null)
a.type = { text: "container" };
else if (typeof r == "object") {
let [o, l] = Object.entries(r)[0];
a[o] = { text: l };
} else
a.type = { text: r };
if (typeof n == "object") {
let [o, l] = Object.entries(n)[0];
a[o] = l;
} else
a.tags = n;
if (typeof i == "object") {
let [o, l] = Object.entries(i)[0];
a[o] = l;
} else
a.link = i;
a.parentBoundary = nn, a.wrap = is(), ai = nn, nn = t, Ya.push(ai);
}, tZ = function(t, e, r, n, i, a, s, o) {
if (e === null || r === null)
return;
let l = {};
const u = Pi.find((h) => h.alias === e);
if (u && e === u.alias ? l = u : (l.alias = e, Pi.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
l.type = { text: "node" };
else if (typeof n == "object") {
let [h, d] = Object.entries(n)[0];
l[h] = { text: d };
} else
l.type = { text: n };
if (i == null)
l.descr = { text: "" };
else if (typeof i == "object") {
let [h, d] = Object.entries(i)[0];
l[h] = { text: d };
} else
l.descr = { text: i };
if (typeof s == "object") {
let [h, d] = Object.entries(s)[0];
l[h] = d;
} else
l.tags = s;
if (typeof o == "object") {
let [h, d] = Object.entries(o)[0];
l[h] = d;
} else
l.link = o;
l.nodeType = t, l.parentBoundary = nn, l.wrap = is(), ai = nn, nn = e, Ya.push(ai);
}, eZ = function() {
nn = ai, Ya.pop(), ai = Ya.pop(), Ya.push(ai);
}, rZ = function(t, e, r, n, i, a, s, o, l, u, h) {
let d = ui.find((f) => f.alias === e);
if (!(d === void 0 && (d = Pi.find((f) => f.alias === e), d === void 0))) {
if (r != null)
if (typeof r == "object") {
let [f, p] = Object.entries(r)[0];
d[f] = p;
} else
d.bgColor = r;
if (n != null)
if (typeof n == "object") {
let [f, p] = Object.entries(n)[0];
d[f] = p;
} else
d.fontColor = n;
if (i != null)
if (typeof i == "object") {
let [f, p] = Object.entries(i)[0];
d[f] = p;
} else
d.borderColor = i;
if (a != null)
if (typeof a == "object") {
let [f, p] = Object.entries(a)[0];
d[f] = p;
} else
d.shadowing = a;
if (s != null)
if (typeof s == "object") {
let [f, p] = Object.entries(s)[0];
d[f] = p;
} else
d.shape = s;
if (o != null)
if (typeof o == "object") {
let [f, p] = Object.entries(o)[0];
d[f] = p;
} else
d.sprite = o;
if (l != null)
if (typeof l == "object") {
let [f, p] = Object.entries(l)[0];
d[f] = p;
} else
d.techn = l;
if (u != null)
if (typeof u == "object") {
let [f, p] = Object.entries(u)[0];
d[f] = p;
} else
d.legendText = u;
if (h != null)
if (typeof h == "object") {
let [f, p] = Object.entries(h)[0];
d[f] = p;
} else
d.legendSprite = h;
}
}, nZ = function(t, e, r, n, i, a, s) {
const o = Pc.find((l) => l.from === e && l.to === r);
if (o !== void 0) {
if (n != null)
if (typeof n == "object") {
let [l, u] = Object.entries(n)[0];
o[l] = u;
} else
o.textColor = n;
if (i != null)
if (typeof i == "object") {
let [l, u] = Object.entries(i)[0];
o[l] = u;
} else
o.lineColor = i;
if (a != null)
if (typeof a == "object") {
let [l, u] = Object.entries(a)[0];
o[l] = parseInt(u);
} else
o.offsetX = parseInt(a);
if (s != null)
if (typeof s == "object") {
let [l, u] = Object.entries(s)[0];
o[l] = parseInt(u);
} else
o.offsetY = parseInt(s);
}
}, iZ = function(t, e, r) {
let n = Ff, i = Pf;
if (typeof e == "object") {
const a = Object.values(e)[0];
n = parseInt(a);
} else
n = parseInt(e);
if (typeof r == "object") {
const a = Object.values(r)[0];
i = parseInt(a);
} else
i = parseInt(r);
n >= 1 && (Ff = n), i >= 1 && (Pf = i);
}, aZ = function() {
return Ff;
}, sZ = function() {
return Pf;
}, oZ = function() {
return nn;
}, lZ = function() {
return ai;
}, gA = function(t) {
return t == null ? ui : ui.filter((e) => e.parentBoundary === t);
}, cZ = function(t) {
return ui.find((e) => e.alias === t);
}, uZ = function(t) {
return Object.keys(gA(t));
}, hZ = function(t) {
return t == null ? Pi : Pi.filter((e) => e.parentBoundary === t);
}, fZ = function() {
return Pc;
}, dZ = function() {
return b4;
}, pZ = function(t) {
_4 = t;
}, is = function() {
return _4;
}, gZ = function() {
ui = [], Pi = [
{
alias: "global",
label: { text: "global" },
type: { text: "global" },
tags: null,
link: null,
parentBoundary: ""
}
], ai = "", nn = "global", Ya = [""], Pc = [], Ya = [""], b4 = "", _4 = !1, Ff = 4, Pf = 2;
}, yZ = {
SOLID: 0,
DOTTED: 1,
NOTE: 2,
SOLID_CROSS: 3,
DOTTED_CROSS: 4,
SOLID_OPEN: 5,
DOTTED_OPEN: 6,
LOOP_START: 10,
LOOP_END: 11,
ALT_START: 12,
ALT_ELSE: 13,
ALT_END: 14,
OPT_START: 15,
OPT_END: 16,
ACTIVE_START: 17,
ACTIVE_END: 18,
PAR_START: 19,
PAR_AND: 20,
PAR_END: 21,
RECT_START: 22,
RECT_END: 23,
SOLID_POINT: 24,
DOTTED_POINT: 25
}, mZ = {
FILLED: 0,
OPEN: 1
}, bZ = {
LEFTOF: 0,
RIGHTOF: 1,
OVER: 2
}, _Z = function(t) {
b4 = ci(t, nt());
}, yA = {
addPersonOrSystem: XK,
addPersonOrSystemBoundary: QK,
addContainer: KK,
addContainerBoundary: JK,
addComponent: ZK,
addDeploymentNode: tZ,
popBoundaryParseStack: eZ,
addRel: $K,
updateElStyle: rZ,
updateRelStyle: nZ,
updateLayoutConfig: iZ,
autoWrap: is,
setWrap: pZ,
getC4ShapeArray: gA,
getC4Shape: cZ,
getC4ShapeKeys: uZ,
getBoundarys: hZ,
getCurrentBoundaryParse: oZ,
getParentBoundaryParse: lZ,
getRels: fZ,
getTitle: dZ,
getC4Type: HK,
getC4ShapeInRow: aZ,
getC4BoundaryInRow: sZ,
setAccTitle: Yn,
getAccTitle: yi,
getAccDescription: bi,
setAccDescription: mi,
parseDirective: jK,
getConfig: () => nt().c4,
clear: gZ,
LINETYPE: yZ,
ARROWTYPE: mZ,
PLACEMENT: bZ,
setTitle: _Z,
setC4Type: GK
}, v4 = function(t, e) {
const r = t.append("rect");
if (r.attr("x", e.x), r.attr("y", e.y), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("width", e.width), r.attr("height", e.height), r.attr("rx", e.rx), r.attr("ry", e.ry), e.attrs !== "undefined" && e.attrs !== null)
for (let n in e.attrs)
r.attr(n, e.attrs[n]);
return e.class !== "undefined" && r.attr("class", e.class), r;
}, mA = function(t, e, r, n, i, a) {
const s = t.append("image");
s.attr("width", e), s.attr("height", r), s.attr("x", n), s.attr("y", i);
let o = a.startsWith("data:image/png;base64") ? a : Vi(a);
s.attr("xlink:href", o);
}, vZ = function(t, e, r, n) {
const i = t.append("use");
i.attr("x", e), i.attr("y", r);
var a = Vi(n);
i.attr("xlink:href", "#" + a);
}, bA = function(t, e) {
let r = 0, n = 0;
const i = e.text.split(pe.lineBreakRegex);
let a = [], s = 0, o = () => e.y;
if (typeof e.valign < "u" && typeof e.textMargin < "u" && e.textMargin > 0)
switch (e.valign) {
case "top":
case "start":
o = () => Math.round(e.y + e.textMargin);
break;
case "middle":
case "center":
o = () => Math.round(e.y + (r + n + e.textMargin) / 2);
break;
case "bottom":
case "end":
o = () => Math.round(
e.y + (r + n + 2 * e.textMargin) - e.textMargin
);
break;
}
if (typeof e.anchor < "u" && typeof e.textMargin < "u" && typeof e.width < "u")
switch (e.anchor) {
case "left":
case "start":
e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "text-after-edge", e.alignmentBaseline = "middle";
break;
case "middle":
case "center":
e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
break;
case "right":
case "end":
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "text-before-edge", e.alignmentBaseline = "middle";
break;
}
for (let l = 0; l < i.length; l++) {
let u = i[l];
typeof e.textMargin < "u" && e.textMargin === 0 && typeof e.fontSize < "u" && (s = l * e.fontSize);
const h = t.append("text");
if (h.attr("x", e.x), h.attr("y", o()), typeof e.anchor < "u" && h.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), typeof e.fontFamily < "u" && h.style("font-family", e.fontFamily), typeof e.fontSize < "u" && h.style("font-size", e.fontSize), typeof e.fontWeight < "u" && h.style("font-weight", e.fontWeight), typeof e.fill < "u" && h.attr("fill", e.fill), typeof e.class < "u" && h.attr("class", e.class), typeof e.dy < "u" ? h.attr("dy", e.dy) : s !== 0 && h.attr("dy", s), e.tspan) {
const d = h.append("tspan");
d.attr("x", e.x), typeof e.fill < "u" && d.attr("fill", e.fill), d.text(u);
} else
h.text(u);
typeof e.valign < "u" && typeof e.textMargin < "u" && e.textMargin > 0 && (n += (h._groups || h)[0][0].getBBox().height, r = n), a.push(h);
}
return a;
}, xZ = function(t, e) {
function r(i, a, s, o, l) {
return i + "," + a + " " + (i + s) + "," + a + " " + (i + s) + "," + (a + o - l) + " " + (i + s - l * 1.2) + "," + (a + o) + " " + i + "," + (a + o);
}
const n = t.append("polygon");
return n.attr("points", r(e.x, e.y, e.width, e.height, 7)), n.attr("class", "labelBox"), e.y = e.y + e.height / 2, bA(t, e), n;
}, kZ = (t, e, r) => {
const n = t.append("g");
let i = 0;
for (let a of e) {
let s = a.textColor ? a.textColor : "#444444", o = a.lineColor ? a.lineColor : "#444444", l = a.offsetX ? parseInt(a.offsetX) : 0, u = a.offsetY ? parseInt(a.offsetY) : 0, h = "";
if (i === 0) {
let f = n.append("line");
f.attr("x1", a.startPoint.x), f.attr("y1", a.startPoint.y), f.attr("x2", a.endPoint.x), f.attr("y2", a.endPoint.y), f.attr("stroke-width", "1"), f.attr("stroke", o), f.style("fill", "none"), a.type !== "rel_b" && f.attr("marker-end", "url(" + h + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && f.attr("marker-start", "url(" + h + "#arrowend)"), i = -1;
} else {
let f = n.append("path");
f.attr("fill", "none").attr("stroke-width", "1").attr("stroke", o).attr(
"d",
"Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", a.startPoint.x).replaceAll("starty", a.startPoint.y).replaceAll(
"controlx",
a.startPoint.x + (a.endPoint.x - a.startPoint.x) / 2 - (a.endPoint.x - a.startPoint.x) / 4
).replaceAll("controly", a.startPoint.y + (a.endPoint.y - a.startPoint.y) / 2).replaceAll("stopx", a.endPoint.x).replaceAll("stopy", a.endPoint.y)
), a.type !== "rel_b" && f.attr("marker-end", "url(" + h + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && f.attr("marker-start", "url(" + h + "#arrowend)");
}
let d = r.messageFont();
fa(r)(
a.label.text,
n,
Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + l,
Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + u,
a.label.width,
a.label.height,
{ fill: s },
d
), a.techn && a.techn.text !== "" && (d = r.messageFont(), fa(r)(
"[" + a.techn.text + "]",
n,
Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + l,
Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + r.messageFontSize + 5 + u,
Math.max(a.label.width, a.techn.width),
a.techn.height,
{ fill: s, "font-style": "italic" },
d
));
}
}, wZ = function(t, e, r) {
const n = t.append("g");
let i = e.bgColor ? e.bgColor : "none", a = e.borderColor ? e.borderColor : "#444444", s = e.fontColor ? e.fontColor : "black", o = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
e.nodeType && (o = { "stroke-width": 1 });
let l = {
x: e.x,
y: e.y,
fill: i,
stroke: a,
width: e.width,
height: e.height,
rx: 2.5,
ry: 2.5,
attrs: o
};
v4(n, l);
let u = r.boundaryFont();
u.fontWeight = "bold", u.fontSize = u.fontSize + 2, u.fontColor = s, fa(r)(
e.label.text,
n,
e.x,
e.y + e.label.Y,
e.width,
e.height,
{ fill: "#444444" },
u
), e.type && e.type.text !== "" && (u = r.boundaryFont(), u.fontColor = s, fa(r)(
e.type.text,
n,
e.x,
e.y + e.type.Y,
e.width,
e.height,
{ fill: "#444444" },
u
)), e.descr && e.descr.text !== "" && (u = r.boundaryFont(), u.fontSize = u.fontSize - 2, u.fontColor = s, fa(r)(
e.descr.text,
n,
e.x,
e.y + e.descr.Y,
e.width,
e.height,
{ fill: "#444444" },
u
));
}, TZ = function(t, e, r) {
let n = e.bgColor ? e.bgColor : r[e.typeC4Shape.text + "_bg_color"], i = e.borderColor ? e.borderColor : r[e.typeC4Shape.text + "_border_color"], a = e.fontColor ? e.fontColor : "#FFFFFF", s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
switch (e.typeC4Shape.text) {
case "person":
s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
break;
case "external_person":
s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
break;
}
const o = t.append("g");
o.attr("class", "person-man");
const l = _A();
switch (e.typeC4Shape.text) {
case "person":
case "external_person":
case "system":
case "external_system":
case "container":
case "external_container":
case "component":
case "external_component":
l.x = e.x, l.y = e.y, l.fill = n, l.width = e.width, l.height = e.height, l.style = "stroke:" + i + ";stroke-width:0.5;", l.rx = 2.5, l.ry = 2.5, v4(o, l);
break;
case "system_db":
case "external_system_db":
case "container_db":
case "external_container_db":
case "component_db":
case "external_component_db":
o.append("path").attr("fill", n).attr("stroke-width", "0.5").attr("stroke", i).attr(
"d",
"Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", e.x).replaceAll("starty", e.y).replaceAll("half", e.width / 2).replaceAll("height", e.height)
), o.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", i).attr(
"d",
"Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", e.x).replaceAll("starty", e.y).replaceAll("half", e.width / 2)
);
break;
case "system_queue":
case "external_system_queue":
case "container_queue":
case "external_container_queue":
case "component_queue":
case "external_component_queue":
o.append("path").attr("fill", n).attr("stroke-width", "0.5").attr("stroke", i).attr(
"d",
"Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", e.x).replaceAll("starty", e.y).replaceAll("width", e.width).replaceAll("half", e.height / 2)
), o.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", i).attr(
"d",
"Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", e.x + e.width).replaceAll("starty", e.y).replaceAll("half", e.height / 2)
);
break;
}
let u = BZ(r, e.typeC4Shape.text);
switch (o.append("text").attr("fill", a).attr("font-family", u.fontFamily).attr("font-size", u.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", e.typeC4Shape.width).attr("x", e.x + e.width / 2 - e.typeC4Shape.width / 2).attr("y", e.y + e.typeC4Shape.Y).text("<<" + e.typeC4Shape.text + ">>"), e.typeC4Shape.text) {
case "person":
case "external_person":
mA(
o,
48,
48,
e.x + e.width / 2 - 24,
e.y + e.image.Y,
s
);
break;
}
let h = r[e.typeC4Shape.text + "Font"]();
return h.fontWeight = "bold", h.fontSize = h.fontSize + 2, h.fontColor = a, fa(r)(
e.label.text,
o,
e.x,
e.y + e.label.Y,
e.width,
e.height,
{ fill: a },
h
), h = r[e.typeC4Shape.text + "Font"](), h.fontColor = a, e.thchn && e.thchn.text !== "" ? fa(r)(
e.thchn.text,
o,
e.x,
e.y + e.thchn.Y,
e.width,
e.height,
{ fill: a, "font-style": "italic" },
h
) : e.type && e.type.text !== "" && fa(r)(
e.type.text,
o,
e.x,
e.y + e.type.Y,
e.width,
e.height,
{ fill: a, "font-style": "italic" },
h
), e.descr && e.descr.text !== "" && (h = r.personFont(), h.fontColor = a, fa(r)(
e.descr.text,
o,
e.x,
e.y + e.descr.Y,
e.width,
e.height,
{ fill: a },
h
)), e.height;
}, EZ = function(t) {
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
"d",
"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
);
}, CZ = function(t) {
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
"d",
"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
);
}, SZ = function(t) {
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
"d",
"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
);
}, AZ = function(t) {
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
}, MZ = function(t) {
t.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
}, LZ = function(t) {
t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, RZ = function(t) {
t.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
}, IZ = function(t) {
const r = t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
r.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"), r.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
}, NZ = function() {
return {
x: 0,
y: 0,
fill: void 0,
anchor: void 0,
style: "#666",
width: void 0,
height: void 0,
textMargin: 0,
rx: 0,
ry: 0,
tspan: !0,
valign: void 0
};
}, _A = function() {
return {
x: 0,
y: 0,
fill: "#EDF2AE",
stroke: "#666",
width: 100,
anchor: "start",
height: 100,
rx: 0,
ry: 0
};
}, BZ = (t, e) => ({
fontFamily: t[e + "FontFamily"],
fontSize: t[e + "FontSize"],
fontWeight: t[e + "FontWeight"]
}), fa = function() {
function t(i, a, s, o, l, u, h) {
const d = a.append("text").attr("x", s + l / 2).attr("y", o + u / 2 + 5).style("text-anchor", "middle").text(i);
n(d, h);
}
function e(i, a, s, o, l, u, h, d) {
const { fontSize: f, fontFamily: p, fontWeight: m } = d, _ = i.split(pe.lineBreakRegex);
for (let y = 0; y < _.length; y++) {
const b = y * f - f * (_.length - 1) / 2, x = a.append("text").attr("x", s + l / 2).attr("y", o).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", f).style("font-weight", m).style("font-family", p);
x.append("tspan").attr("dy", b).text(_[y]).attr("alignment-baseline", "mathematical"), n(x, h);
}
}
function r(i, a, s, o, l, u, h, d) {
const f = a.append("switch"), m = f.append("foreignObject").attr("x", s).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, f, s, o, l, u, h, d), n(m, h);
}
function n(i, a) {
for (const s in a)
a.hasOwnProperty(s) && i.attr(s, a[s]);
}
return function(i) {
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
};
}(), Ti = {
drawRect: v4,
drawText: bA,
drawLabel: xZ,
drawBoundary: wZ,
drawC4Shape: TZ,
drawRels: kZ,
drawImage: mA,
drawEmbeddedImage: vZ,
insertArrowHead: AZ,
insertArrowEnd: MZ,
insertArrowFilledHead: LZ,
insertDynamicNumber: RZ,
insertArrowCrossHead: IZ,
insertDatabaseIcon: EZ,
insertComputerIcon: CZ,
insertClockIcon: SZ,
getTextObj: NZ,
getNoteRect: _A,
sanitizeUrl: Vi
};
let qf = 0, Vf = 0, vA = 4, db = 2;
Fc.yy = yA;
let Kt = {};
class xA {
constructor(e) {
this.name = "", this.data = {}, this.data.startx = void 0, this.data.stopx = void 0, this.data.starty = void 0, this.data.stopy = void 0, this.data.widthLimit = void 0, this.nextData = {}, this.nextData.startx = void 0, this.nextData.stopx = void 0, this.nextData.starty = void 0, this.nextData.stopy = void 0, this.nextData.cnt = 0, pb(e.db.getConfig());
}
setData(e, r, n, i) {
this.nextData.startx = this.data.startx = e, this.nextData.stopx = this.data.stopx = r, this.nextData.starty = this.data.starty = n, this.nextData.stopy = this.data.stopy = i;
}
updateVal(e, r, n, i) {
typeof e[r] > "u" ? e[r] = n : e[r] = i(n, e[r]);
}
insert(e) {
this.nextData.cnt = this.nextData.cnt + 1;
let r = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + e.margin : this.nextData.stopx + e.margin * 2, n = r + e.width, i = this.nextData.starty + e.margin * 2, a = i + e.height;
(r >= this.data.widthLimit || n >= this.data.widthLimit || this.nextData.cnt > vA) && (r = this.nextData.startx + e.margin + Kt.nextLinePaddingX, i = this.nextData.stopy + e.margin * 2, this.nextData.stopx = n = r + e.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = a = i + e.height, this.nextData.cnt = 1), e.x = r, e.y = i, this.updateVal(this.data, "startx", r, Math.min), this.updateVal(this.data, "starty", i, Math.min), this.updateVal(this.data, "stopx", n, Math.max), this.updateVal(this.data, "stopy", a, Math.max), this.updateVal(this.nextData, "startx", r, Math.min), this.updateVal(this.nextData, "starty", i, Math.min), this.updateVal(this.nextData, "stopx", n, Math.max), this.updateVal(this.nextData, "stopy", a, Math.max);
}
init(e) {
this.name = "", this.data = {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0,
widthLimit: void 0
}, this.nextData = {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0,
cnt: 0
}, pb(e.db.getConfig());
}
bumpLastMargin(e) {
this.data.stopx += e, this.data.stopy += e;
}
}
const pb = function(t) {
mr(Kt, t), t.fontFamily && (Kt.personFontFamily = Kt.systemFontFamily = Kt.messageFontFamily = t.fontFamily), t.fontSize && (Kt.personFontSize = Kt.systemFontSize = Kt.messageFontSize = t.fontSize), t.fontWeight && (Kt.personFontWeight = Kt.systemFontWeight = Kt.messageFontWeight = t.fontWeight);
}, Rl = (t, e) => ({
fontFamily: t[e + "FontFamily"],
fontSize: t[e + "FontSize"],
fontWeight: t[e + "FontWeight"]
}), Ih = (t) => ({
fontFamily: t.boundaryFontFamily,
fontSize: t.boundaryFontSize,
fontWeight: t.boundaryFontWeight
}), DZ = (t) => ({
fontFamily: t.messageFontFamily,
fontSize: t.messageFontSize,
fontWeight: t.messageFontWeight
});
function ei(t, e, r, n, i) {
if (!e[t].width)
if (r)
e[t].text = FS(e[t].text, i, n), e[t].textLines = e[t].text.split(pe.lineBreakRegex).length, e[t].width = i, e[t].height = ob(e[t].text, n);
else {
let a = e[t].text.split(pe.lineBreakRegex);
e[t].textLines = a.length;
let s = 0;
e[t].height = 0, e[t].width = 0;
for (let o = 0; o < a.length; o++)
e[t].width = Math.max(
Ni(a[o], n),
e[t].width
), s = ob(a[o], n), e[t].height = e[t].height + s;
}
}
const kA = function(t, e, r) {
e.x = r.data.startx, e.y = r.data.starty, e.width = r.data.stopx - r.data.startx, e.height = r.data.stopy - r.data.starty, e.label.y = Kt.c4ShapeMargin - 35;
let n = e.wrap && Kt.wrap, i = Ih(Kt);
i.fontSize = i.fontSize + 2, i.fontWeight = "bold";
let a = Ni(e.label.text, i);
ei("label", e, n, i, a), Ti.drawBoundary(t, e, Kt);
}, wA = function(t, e, r, n) {
let i = 0;
for (let a = 0; a < n.length; a++) {
i = 0;
const s = r[n[a]];
let o = Rl(Kt, s.typeC4Shape.text);
switch (o.fontSize = o.fontSize - 2, s.typeC4Shape.width = Ni(
"<<" + s.typeC4Shape.text + ">>",
o
), s.typeC4Shape.height = o.fontSize + 2, s.typeC4Shape.Y = Kt.c4ShapePadding, i = s.typeC4Shape.Y + s.typeC4Shape.height - 4, s.image = { width: 0, height: 0, Y: 0 }, s.typeC4Shape.text) {
case "person":
case "external_person":
s.image.width = 48, s.image.height = 48, s.image.Y = i, i = s.image.Y + s.image.height;
break;
}
s.sprite && (s.image.width = 48, s.image.height = 48, s.image.Y = i, i = s.image.Y + s.image.height);
let l = s.wrap && Kt.wrap, u = Kt.width - Kt.c4ShapePadding * 2, h = Rl(Kt, s.typeC4Shape.text);
if (h.fontSize = h.fontSize + 2, h.fontWeight = "bold", ei("label", s, l, h, u), s.label.Y = i + 8, i = s.label.Y + s.label.height, s.type && s.type.text !== "") {
s.type.text = "[" + s.type.text + "]";
let p = Rl(Kt, s.typeC4Shape.text);
ei("type", s, l, p, u), s.type.Y = i + 5, i = s.type.Y + s.type.height;
} else if (s.techn && s.techn.text !== "") {
s.techn.text = "[" + s.techn.text + "]";
let p = Rl(Kt, s.techn.text);
ei("techn", s, l, p, u), s.techn.Y = i + 5, i = s.techn.Y + s.techn.height;
}
let d = i, f = s.label.width;
if (s.descr && s.descr.text !== "") {
let p = Rl(Kt, s.typeC4Shape.text);
ei("descr", s, l, p, u), s.descr.Y = i + 20, i = s.descr.Y + s.descr.height, f = Math.max(s.label.width, s.descr.width), d = i - s.descr.textLines * 5;
}
f = f + Kt.c4ShapePadding, s.width = Math.max(s.width || Kt.width, f, Kt.width), s.height = Math.max(s.height || Kt.height, d, Kt.height), s.margin = s.margin || Kt.c4ShapeMargin, t.insert(s), Ti.drawC4Shape(e, s, Kt);
}
t.bumpLastMargin(Kt.c4ShapeMargin);
};
class Nn {
constructor(e, r) {
this.x = e, this.y = r;
}
}
let s6 = function(t, e) {
let r = t.x, n = t.y, i = e.x, a = e.y, s = r + t.width / 2, o = n + t.height / 2, l = Math.abs(r - i), u = Math.abs(n - a), h = u / l, d = t.height / t.width, f = null;
return n == a && r < i ? f = new Nn(r + t.width, o) : n == a && r > i ? f = new Nn(r, o) : r == i && n < a ? f = new Nn(s, n + t.height) : r == i && n > a && (f = new Nn(s, n)), r > i && n < a ? d >= h ? f = new Nn(r, o + h * t.width / 2) : f = new Nn(
s - l / u * t.height / 2,
n + t.height
) : r < i && n < a ? d >= h ? f = new Nn(r + t.width, o + h * t.width / 2) : f = new Nn(
s + l / u * t.height / 2,
n + t.height
) : r < i && n > a ? d >= h ? f = new Nn(r + t.width, o - h * t.width / 2) : f = new Nn(s + t.height / 2 * l / u, n) : r > i && n > a && (d >= h ? f = new Nn(r, o - t.width / 2 * h) : f = new Nn(s - t.height / 2 * l / u, n)), f;
}, OZ = function(t, e) {
let r = { x: 0, y: 0 };
r.x = e.x + e.width / 2, r.y = e.y + e.height / 2;
let n = s6(t, r);
r.x = t.x + t.width / 2, r.y = t.y + t.height / 2;
let i = s6(e, r);
return { startPoint: n, endPoint: i };
};
const FZ = function(t, e, r, n) {
let i = 0;
for (let a of e) {
i = i + 1;
let s = a.wrap && Kt.wrap, o = DZ(Kt);
n.db.getC4Type() === "C4Dynamic" && (a.label.text = i + ": " + a.label.text);
let u = Ni(a.label.text, o);
ei("label", a, s, o, u), a.techn && a.techn.text !== "" && (u = Ni(a.techn.text, o), ei("techn", a, s, o, u)), a.descr && a.descr.text !== "" && (u = Ni(a.descr.text, o), ei("descr", a, s, o, u));
let h = r(a.from), d = r(a.to), f = OZ(h, d);
a.startPoint = f.startPoint, a.endPoint = f.endPoint;
}
Ti.drawRels(t, e, Kt);
};
function TA(t, e, r, n, i) {
let a = new xA(i);
a.data.widthLimit = r.data.widthLimit / Math.min(db, n.length);
for (let s = 0; s < n.length; s++) {
let o = n[s], l = 0;
o.image = { width: 0, height: 0, Y: 0 }, o.sprite && (o.image.width = 48, o.image.height = 48, o.image.Y = l, l = o.image.Y + o.image.height);
let u = o.wrap && Kt.wrap, h = Ih(Kt);
if (h.fontSize = h.fontSize + 2, h.fontWeight = "bold", ei(
"label",
o,
u,
h,
a.data.widthLimit
), o.label.Y = l + 8, l = o.label.Y + o.label.height, o.type && o.type.text !== "") {
o.type.text = "[" + o.type.text + "]";
let m = Ih(Kt);
ei(
"type",
o,
u,
m,
a.data.widthLimit
), o.type.Y = l + 5, l = o.type.Y + o.type.height;
}
if (o.descr && o.descr.text !== "") {
let m = Ih(Kt);
m.fontSize = m.fontSize - 2, ei(
"descr",
o,
u,
m,
a.data.widthLimit
), o.descr.Y = l + 20, l = o.descr.Y + o.descr.height;
}
if (s == 0 || s % db === 0) {
let m = r.data.startx + Kt.diagramMarginX, _ = r.data.stopy + Kt.diagramMarginY + l;
a.setData(m, m, _, _);
} else {
let m = a.data.stopx !== a.data.startx ? a.data.stopx + Kt.diagramMarginX : a.data.startx, _ = a.data.starty;
a.setData(m, m, _, _);
}
a.name = o.alias;
let d = i.db.getC4ShapeArray(o.alias), f = i.db.getC4ShapeKeys(o.alias);
f.length > 0 && wA(
a,
t,
d,
f
), e = o.alias;
let p = i.db.getBoundarys(e);
p.length > 0 && TA(
t,
e,
a,
p,
i
), o.alias !== "global" && kA(t, o, a), r.data.stopy = Math.max(
a.data.stopy + Kt.c4ShapeMargin,
r.data.stopy
), r.data.stopx = Math.max(
a.data.stopx + Kt.c4ShapeMargin,
r.data.stopx
), qf = Math.max(qf, r.data.stopx), Vf = Math.max(Vf, r.data.stopy);
}
}
const PZ = function(t, e, r, n) {
Kt = nt().c4;
const i = nt().securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const s = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body");
let o = n.db;
n.db.setWrap(Kt.wrap), vA = o.getC4ShapeInRow(), db = o.getC4BoundaryInRow(), H.debug(`C:${JSON.stringify(Kt, null, 2)}`);
const l = i === "sandbox" ? s.select(`[id="${e}"]`) : St(`[id="${e}"]`);
Ti.insertComputerIcon(l), Ti.insertDatabaseIcon(l), Ti.insertClockIcon(l);
let u = new xA(n);
u.setData(
Kt.diagramMarginX,
Kt.diagramMarginX,
Kt.diagramMarginY,
Kt.diagramMarginY
), u.data.widthLimit = screen.availWidth, qf = Kt.diagramMarginX, Vf = Kt.diagramMarginY;
const h = n.db.getTitle();
let d = n.db.getBoundarys("");
TA(l, "", u, d, n), Ti.insertArrowHead(l), Ti.insertArrowEnd(l), Ti.insertArrowCrossHead(l), Ti.insertArrowFilledHead(l), FZ(l, n.db.getRels(), n.db.getC4Shape, n), u.data.stopx = qf, u.data.stopy = Vf;
const f = u.data;
let m = f.stopy - f.starty + 2 * Kt.diagramMarginY;
const y = f.stopx - f.startx + 2 * Kt.diagramMarginX;
h && l.append("text").text(h).attr("x", (f.stopx - f.startx) / 2 - 4 * Kt.diagramMarginX).attr("y", f.starty + Kt.diagramMarginY), pi(l, m, y, Kt.useMaxWidth);
const b = h ? 60 : 0;
l.attr(
"viewBox",
f.startx - Kt.diagramMarginX + " -" + (Kt.diagramMarginY + b) + " " + y + " " + (m + b)
), vn(Fc.yy, l, e), H.debug("models:", f);
}, o6 = {
drawPersonOrSystemArray: wA,
drawBoundary: kA,
setConf: pb,
draw: PZ
};
var zf = function() {
var t = function(Z, V, Q, q) {
for (Q = Q || {}, q = Z.length; q--; Q[Z[q]] = V)
;
return Q;
}, e = [1, 3], r = [1, 7], n = [1, 8], i = [1, 9], a = [1, 10], s = [1, 13], o = [1, 12], l = [1, 16, 25], u = [1, 20], h = [1, 31], d = [1, 32], f = [1, 33], p = [1, 35], m = [1, 38], _ = [1, 36], y = [1, 37], b = [1, 39], x = [1, 40], k = [1, 41], T = [1, 42], C = [1, 45], M = [1, 46], S = [1, 47], R = [1, 48], A = [16, 25], L = [1, 62], v = [1, 63], B = [1, 64], w = [1, 65], D = [1, 66], N = [1, 67], z = [1, 68], X = [16, 25, 32, 44, 45, 53, 56, 57, 58, 59, 60, 61, 62, 67, 69], ct = [16, 25, 30, 32, 44, 45, 49, 53, 56, 57, 58, 59, 60, 61, 62, 67, 69, 84, 85, 86, 87], J = [5, 8, 9, 10, 11, 16, 19, 23, 25], Y = [53, 84, 85, 86, 87], $ = [53, 61, 62, 84, 85, 86, 87], lt = [53, 56, 57, 58, 59, 60, 84, 85, 86, 87], ut = [16, 25, 32], W = [1, 100], tt = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, mermaidDoc: 4, statments: 5, direction: 6, directive: 7, direction_tb: 8, direction_bt: 9, direction_rl: 10, direction_lr: 11, graphConfig: 12, openDirective: 13, typeDirective: 14, closeDirective: 15, NEWLINE: 16, ":": 17, argDirective: 18, open_directive: 19, type_directive: 20, arg_directive: 21, close_directive: 22, CLASS_DIAGRAM: 23, statements: 24, EOF: 25, statement: 26, className: 27, alphaNumToken: 28, classLiteralName: 29, GENERICTYPE: 30, relationStatement: 31, LABEL: 32, classStatement: 33, methodStatement: 34, annotationStatement: 35, clickStatement: 36, cssClassStatement: 37, acc_title: 38, acc_title_value: 39, acc_descr: 40, acc_descr_value: 41, acc_descr_multiline_value: 42, CLASS: 43, STYLE_SEPARATOR: 44, STRUCT_START: 45, members: 46, STRUCT_STOP: 47, ANNOTATION_START: 48, ANNOTATION_END: 49, MEMBER: 50, SEPARATOR: 51, relation: 52, STR: 53, relationType: 54, lineType: 55, AGGREGATION: 56, EXTENSION: 57, COMPOSITION: 58, DEPENDENCY: 59, LOLLIPOP: 60, LINE: 61, DOTTED_LINE: 62, CALLBACK: 63, LINK: 64, LINK_TARGET: 65, CLICK: 66, CALLBACK_NAME: 67, CALLBACK_ARGS: 68, HREF: 69, CSSCLASS: 70, commentToken: 71, textToken: 72, graphCodeTokens: 73, textNoTagsToken: 74, TAGSTART: 75, TAGEND: 76, "==": 77, "--": 78, PCT: 79, DEFAULT: 80, SPACE: 81, MINUS: 82, keywords: 83, UNICODE_TEXT: 84, NUM: 85, ALPHA: 86, BQUOTE_STR: 87, $accept: 0, $end: 1 },
terminals_: { 2: "error", 5: "statments", 8: "direction_tb", 9: "direction_bt", 10: "direction_rl", 11: "direction_lr", 16: "NEWLINE", 17: ":", 19: "open_directive", 20: "type_directive", 21: "arg_directive", 22: "close_directive", 23: "CLASS_DIAGRAM", 25: "EOF", 30: "GENERICTYPE", 32: "LABEL", 38: "acc_title", 39: "acc_title_value", 40: "acc_descr", 41: "acc_descr_value", 42: "acc_descr_multiline_value", 43: "CLASS", 44: "STYLE_SEPARATOR", 45: "STRUCT_START", 47: "STRUCT_STOP", 48: "ANNOTATION_START", 49: "ANNOTATION_END", 50: "MEMBER", 51: "SEPARATOR", 53: "STR", 56: "AGGREGATION", 57: "EXTENSION", 58: "COMPOSITION", 59: "DEPENDENCY", 60: "LOLLIPOP", 61: "LINE", 62: "DOTTED_LINE", 63: "CALLBACK", 64: "LINK", 65: "LINK_TARGET", 66: "CLICK", 67: "CALLBACK_NAME", 68: "CALLBACK_ARGS", 69: "HREF", 70: "CSSCLASS", 73: "graphCodeTokens", 75: "TAGSTART", 76: "TAGEND", 77: "==", 78: "--", 79: "PCT", 80: "DEFAULT", 81: "SPACE", 82: "MINUS", 83: "keywords", 84: "UNICODE_TEXT", 85: "NUM", 86: "ALPHA", 87: "BQUOTE_STR" },
productions_: [0, [3, 1], [3, 1], [3, 1], [3, 2], [6, 1], [6, 1], [6, 1], [6, 1], [4, 1], [7, 4], [7, 6], [13, 1], [14, 1], [18, 1], [15, 1], [12, 4], [24, 1], [24, 2], [24, 3], [27, 1], [27, 1], [27, 2], [27, 2], [27, 2], [26, 1], [26, 2], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 2], [26, 2], [26, 1], [33, 2], [33, 4], [33, 5], [33, 7], [35, 4], [46, 1], [46, 2], [34, 1], [34, 2], [34, 1], [34, 1], [31, 3], [31, 4], [31, 4], [31, 5], [52, 3], [52, 2], [52, 2], [52, 1], [54, 1], [54, 1], [54, 1], [54, 1], [54, 1], [55, 1], [55, 1], [36, 3], [36, 4], [36, 3], [36, 4], [36, 4], [36, 5], [36, 3], [36, 4], [36, 4], [36, 5], [36, 3], [36, 4], [36, 4], [36, 5], [37, 3], [71, 1], [71, 1], [72, 1], [72, 1], [72, 1], [72, 1], [72, 1], [72, 1], [72, 1], [74, 1], [74, 1], [74, 1], [74, 1], [28, 1], [28, 1], [28, 1], [29, 1]],
performAction: function(V, Q, q, U, F, j, P) {
var et = j.length - 1;
switch (F) {
case 5:
U.setDirection("TB");
break;
case 6:
U.setDirection("BT");
break;
case 7:
U.setDirection("RL");
break;
case 8:
U.setDirection("LR");
break;
case 12:
U.parseDirective("%%{", "open_directive");
break;
case 13:
U.parseDirective(j[et], "type_directive");
break;
case 14:
j[et] = j[et].trim().replace(/'/g, '"'), U.parseDirective(j[et], "arg_directive");
break;
case 15:
U.parseDirective("}%%", "close_directive", "class");
break;
case 20:
case 21:
this.$ = j[et];
break;
case 22:
this.$ = j[et - 1] + j[et];
break;
case 23:
case 24:
this.$ = j[et - 1] + "~" + j[et];
break;
case 25:
U.addRelation(j[et]);
break;
case 26:
j[et - 1].title = U.cleanupLabel(j[et]), U.addRelation(j[et - 1]);
break;
case 34:
this.$ = j[et].trim(), U.setAccTitle(this.$);
break;
case 35:
case 36:
this.$ = j[et].trim(), U.setAccDescription(this.$);
break;
case 37:
U.addClass(j[et]);
break;
case 38:
U.addClass(j[et - 2]), U.setCssClass(j[et - 2], j[et]);
break;
case 39:
U.addClass(j[et - 3]), U.addMembers(j[et - 3], j[et - 1]);
break;
case 40:
U.addClass(j[et - 5]), U.setCssClass(j[et - 5], j[et - 3]), U.addMembers(j[et - 5], j[et - 1]);
break;
case 41:
U.addAnnotation(j[et], j[et - 2]);
break;
case 42:
this.$ = [j[et]];
break;
case 43:
j[et].push(j[et - 1]), this.$ = j[et];
break;
case 44:
break;
case 45:
U.addMember(j[et - 1], U.cleanupLabel(j[et]));
break;
case 46:
break;
case 47:
break;
case 48:
this.$ = { id1: j[et - 2], id2: j[et], relation: j[et - 1], relationTitle1: "none", relationTitle2: "none" };
break;
case 49:
this.$ = { id1: j[et - 3], id2: j[et], relation: j[et - 1], relationTitle1: j[et - 2], relationTitle2: "none" };
break;
case 50:
this.$ = { id1: j[et - 3], id2: j[et], relation: j[et - 2], relationTitle1: "none", relationTitle2: j[et - 1] };
break;
case 51:
this.$ = { id1: j[et - 4], id2: j[et], relation: j[et - 2], relationTitle1: j[et - 3], relationTitle2: j[et - 1] };
break;
case 52:
this.$ = { type1: j[et - 2], type2: j[et], lineType: j[et - 1] };
break;
case 53:
this.$ = { type1: "none", type2: j[et], lineType: j[et - 1] };
break;
case 54:
this.$ = { type1: j[et - 1], type2: "none", lineType: j[et] };
break;
case 55:
this.$ = { type1: "none", type2: "none", lineType: j[et] };
break;
case 56:
this.$ = U.relationType.AGGREGATION;
break;
case 57:
this.$ = U.relationType.EXTENSION;
break;
case 58:
this.$ = U.relationType.COMPOSITION;
break;
case 59:
this.$ = U.relationType.DEPENDENCY;
break;
case 60:
this.$ = U.relationType.LOLLIPOP;
break;
case 61:
this.$ = U.lineType.LINE;
break;
case 62:
this.$ = U.lineType.DOTTED_LINE;
break;
case 63:
case 69:
this.$ = j[et - 2], U.setClickEvent(j[et - 1], j[et]);
break;
case 64:
case 70:
this.$ = j[et - 3], U.setClickEvent(j[et - 2], j[et - 1]), U.setTooltip(j[et - 2], j[et]);
break;
case 65:
case 73:
this.$ = j[et - 2], U.setLink(j[et - 1], j[et]);
break;
case 66:
this.$ = j[et - 3], U.setLink(j[et - 2], j[et - 1], j[et]);
break;
case 67:
case 75:
this.$ = j[et - 3], U.setLink(j[et - 2], j[et - 1]), U.setTooltip(j[et - 2], j[et]);
break;
case 68:
case 76:
this.$ = j[et - 4], U.setLink(j[et - 3], j[et - 2], j[et]), U.setTooltip(j[et - 3], j[et - 1]);
break;
case 71:
this.$ = j[et - 3], U.setClickEvent(j[et - 2], j[et - 1], j[et]);
break;
case 72:
this.$ = j[et - 4], U.setClickEvent(j[et - 3], j[et - 2], j[et - 1]), U.setTooltip(j[et - 3], j[et]);
break;
case 74:
this.$ = j[et - 3], U.setLink(j[et - 2], j[et - 1], j[et]);
break;
case 77:
U.setCssClass(j[et - 1], j[et]);
break;
}
},
table: [{ 3: 1, 4: 2, 5: e, 6: 4, 7: 5, 8: r, 9: n, 10: i, 11: a, 12: 6, 13: 11, 19: s, 23: o }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 3: 14, 4: 2, 5: e, 6: 4, 7: 5, 8: r, 9: n, 10: i, 11: a, 12: 6, 13: 11, 19: s, 23: o }, { 1: [2, 9] }, t(l, [2, 5]), t(l, [2, 6]), t(l, [2, 7]), t(l, [2, 8]), { 14: 15, 20: [1, 16] }, { 16: [1, 17] }, { 20: [2, 12] }, { 1: [2, 4] }, { 15: 18, 17: [1, 19], 22: u }, t([17, 22], [2, 13]), { 6: 30, 7: 29, 8: r, 9: n, 10: i, 11: a, 13: 11, 19: s, 24: 21, 26: 22, 27: 34, 28: 43, 29: 44, 31: 23, 33: 24, 34: 25, 35: 26, 36: 27, 37: 28, 38: h, 40: d, 42: f, 43: p, 48: m, 50: _, 51: y, 63: b, 64: x, 66: k, 70: T, 84: C, 85: M, 86: S, 87: R }, { 16: [1, 49] }, { 18: 50, 21: [1, 51] }, { 16: [2, 15] }, { 25: [1, 52] }, { 16: [1, 53], 25: [2, 17] }, t(A, [2, 25], { 32: [1, 54] }), t(A, [2, 27]), t(A, [2, 28]), t(A, [2, 29]), t(A, [2, 30]), t(A, [2, 31]), t(A, [2, 32]), t(A, [2, 33]), { 39: [1, 55] }, { 41: [1, 56] }, t(A, [2, 36]), t(A, [2, 44], { 52: 57, 54: 60, 55: 61, 32: [1, 59], 53: [1, 58], 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z }), { 27: 69, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, t(A, [2, 46]), t(A, [2, 47]), { 28: 70, 84: C, 85: M, 86: S }, { 27: 71, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, { 27: 72, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, { 27: 73, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, { 53: [1, 74] }, t(X, [2, 20], { 28: 43, 29: 44, 27: 75, 30: [1, 76], 84: C, 85: M, 86: S, 87: R }), t(X, [2, 21], { 30: [1, 77] }), t(ct, [2, 91]), t(ct, [2, 92]), t(ct, [2, 93]), t([16, 25, 30, 32, 44, 45, 53, 56, 57, 58, 59, 60, 61, 62, 67, 69], [2, 94]), t(J, [2, 10]), { 15: 78, 22: u }, { 22: [2, 14] }, { 1: [2, 16] }, { 6: 30, 7: 29, 8: r, 9: n, 10: i, 11: a, 13: 11, 19: s, 24: 79, 25: [2, 18], 26: 22, 27: 34, 28: 43, 29: 44, 31: 23, 33: 24, 34: 25, 35: 26, 36: 27, 37: 28, 38: h, 40: d, 42: f, 43: p, 48: m, 50: _, 51: y, 63: b, 64: x, 66: k, 70: T, 84: C, 85: M, 86: S, 87: R }, t(A, [2, 26]), t(A, [2, 34]), t(A, [2, 35]), { 27: 80, 28: 43, 29: 44, 53: [1, 81], 84: C, 85: M, 86: S, 87: R }, { 52: 82, 54: 60, 55: 61, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z }, t(A, [2, 45]), { 55: 83, 61: N, 62: z }, t(Y, [2, 55], { 54: 84, 56: L, 57: v, 58: B, 59: w, 60: D }), t($, [2, 56]), t($, [2, 57]), t($, [2, 58]), t($, [2, 59]), t($, [2, 60]), t(lt, [2, 61]), t(lt, [2, 62]), t(A, [2, 37], { 44: [1, 85], 45: [1, 86] }), { 49: [1, 87] }, { 53: [1, 88] }, { 53: [1, 89] }, { 67: [1, 90], 69: [1, 91] }, { 28: 92, 84: C, 85: M, 86: S }, t(X, [2, 22]), t(X, [2, 23]), t(X, [2, 24]), { 16: [1, 93] }, { 25: [2, 19] }, t(ut, [2, 48]), { 27: 94, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, { 27: 95, 28: 43, 29: 44, 53: [1, 96], 84: C, 85: M, 86: S, 87: R }, t(Y, [2, 54], { 54: 97, 56: L, 57: v, 58: B, 59: w, 60: D }), t(Y, [2, 53]), { 28: 98, 84: C, 85: M, 86: S }, { 46: 99, 50: W }, { 27: 101, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, t(A, [2, 63], { 53: [1, 102] }), t(A, [2, 65], { 53: [1, 104], 65: [1, 103] }), t(A, [2, 69], { 53: [1, 105], 68: [1, 106] }), t(A, [2, 73], { 53: [1, 108], 65: [1, 107] }), t(A, [2, 77]), t(J, [2, 11]), t(ut, [2, 50]), t(ut, [2, 49]), { 27: 109, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, t(Y, [2, 52]), t(A, [2, 38], { 45: [1, 110] }), { 47: [1, 111] }, { 46: 112, 47: [2, 42], 50: W }, t(A, [2, 41]), t(A, [2, 64]), t(A, [2, 66]), t(A, [2, 67], { 65: [1, 113] }), t(A, [2, 70]), t(A, [2, 71], { 53: [1, 114] }), t(A, [2, 74]), t(A, [2, 75], { 65: [1, 115] }), t(ut, [2, 51]), { 46: 116, 50: W }, t(A, [2, 39]), { 47: [2, 43] }, t(A, [2, 68]), t(A, [2, 72]), t(A, [2, 76]), { 47: [1, 117] }, t(A, [2, 40])],
defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 6: [2, 9], 13: [2, 12], 14: [2, 4], 20: [2, 15], 51: [2, 14], 52: [2, 16], 79: [2, 19], 112: [2, 43] },
parseError: function(V, Q) {
if (Q.recoverable)
this.trace(V);
else {
var q = new Error(V);
throw q.hash = Q, q;
}
},
parse: function(V) {
var Q = this, q = [0], U = [], F = [null], j = [], P = this.table, et = "", at = 0, It = 0, Lt = 2, Rt = 1, Ct = j.slice.call(arguments, 1), pt = Object.create(this.lexer), mt = { yy: {} };
for (var _t in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, _t) && (mt.yy[_t] = this.yy[_t]);
pt.setInput(V, mt.yy), mt.yy.lexer = pt, mt.yy.parser = this, typeof pt.yylloc > "u" && (pt.yylloc = {});
var Tt = pt.yylloc;
j.push(Tt);
var ft = pt.options && pt.options.ranges;
typeof mt.yy.parseError == "function" ? this.parseError = mt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function le() {
var Et;
return Et = U.pop() || pt.lex() || Rt, typeof Et != "number" && (Et instanceof Array && (U = Et, Et = U.pop()), Et = Q.symbols_[Et] || Et), Et;
}
for (var Dt, Ht, $t, Qt, we = {}, Gt, Ft, zt, wt; ; ) {
if (Ht = q[q.length - 1], this.defaultActions[Ht] ? $t = this.defaultActions[Ht] : ((Dt === null || typeof Dt > "u") && (Dt = le()), $t = P[Ht] && P[Ht][Dt]), typeof $t > "u" || !$t.length || !$t[0]) {
var bt = "";
wt = [];
for (Gt in P[Ht])
this.terminals_[Gt] && Gt > Lt && wt.push("'" + this.terminals_[Gt] + "'");
pt.showPosition ? bt = "Parse error on line " + (at + 1) + `:
` + pt.showPosition() + `
Expecting ` + wt.join(", ") + ", got '" + (this.terminals_[Dt] || Dt) + "'" : bt = "Parse error on line " + (at + 1) + ": Unexpected " + (Dt == Rt ? "end of input" : "'" + (this.terminals_[Dt] || Dt) + "'"), this.parseError(bt, {
text: pt.match,
token: this.terminals_[Dt] || Dt,
line: pt.yylineno,
loc: Tt,
expected: wt
});
}
if ($t[0] instanceof Array && $t.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Ht + ", token: " + Dt);
switch ($t[0]) {
case 1:
q.push(Dt), F.push(pt.yytext), j.push(pt.yylloc), q.push($t[1]), Dt = null, It = pt.yyleng, et = pt.yytext, at = pt.yylineno, Tt = pt.yylloc;
break;
case 2:
if (Ft = this.productions_[$t[1]][1], we.$ = F[F.length - Ft], we._$ = {
first_line: j[j.length - (Ft || 1)].first_line,
last_line: j[j.length - 1].last_line,
first_column: j[j.length - (Ft || 1)].first_column,
last_column: j[j.length - 1].last_column
}, ft && (we._$.range = [
j[j.length - (Ft || 1)].range[0],
j[j.length - 1].range[1]
]), Qt = this.performAction.apply(we, [
et,
It,
at,
mt.yy,
$t[1],
F,
j
].concat(Ct)), typeof Qt < "u")
return Qt;
Ft && (q = q.slice(0, -1 * Ft * 2), F = F.slice(0, -1 * Ft), j = j.slice(0, -1 * Ft)), q.push(this.productions_[$t[1]][0]), F.push(we.$), j.push(we._$), zt = P[q[q.length - 2]][q[q.length - 1]], q.push(zt);
break;
case 3:
return !0;
}
}
return !0;
}
}, K = function() {
var Z = {
EOF: 1,
parseError: function(Q, q) {
if (this.yy.parser)
this.yy.parser.parseError(Q, q);
else
throw new Error(Q);
},
setInput: function(V, Q) {
return this.yy = Q || this.yy || {}, this._input = V, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var V = this._input[0];
this.yytext += V, this.yyleng++, this.offset++, this.match += V, this.matched += V;
var Q = V.match(/(?:\r\n?|\n).*/g);
return Q ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), V;
},
unput: function(V) {
var Q = V.length, q = V.split(/(?:\r\n?|\n)/g);
this._input = V + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Q), this.offset -= Q;
var U = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), q.length - 1 && (this.yylineno -= q.length - 1);
var F = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: q ? (q.length === U.length ? this.yylloc.first_column : 0) + U[U.length - q.length].length - q[0].length : this.yylloc.first_column - Q
}, this.options.ranges && (this.yylloc.range = [F[0], F[0] + this.yyleng - Q]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(V) {
this.unput(this.match.slice(V));
},
pastInput: function() {
var V = this.matched.substr(0, this.matched.length - this.match.length);
return (V.length > 20 ? "..." : "") + V.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var V = this.match;
return V.length < 20 && (V += this._input.substr(0, 20 - V.length)), (V.substr(0, 20) + (V.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var V = this.pastInput(), Q = new Array(V.length + 1).join("-");
return V + this.upcomingInput() + `
` + Q + "^";
},
test_match: function(V, Q) {
var q, U, F;
if (this.options.backtrack_lexer && (F = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (F.yylloc.range = this.yylloc.range.slice(0))), U = V[0].match(/(?:\r\n?|\n).*/g), U && (this.yylineno += U.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: U ? U[U.length - 1].length - U[U.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + V[0].length
}, this.yytext += V[0], this.match += V[0], this.matches = V, 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(V[0].length), this.matched += V[0], q = this.performAction.call(this, this.yy, this, Q, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), q)
return q;
if (this._backtrack) {
for (var j in F)
this[j] = F[j];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var V, Q, q, U;
this._more || (this.yytext = "", this.match = "");
for (var F = this._currentRules(), j = 0; j < F.length; j++)
if (q = this._input.match(this.rules[F[j]]), q && (!Q || q[0].length > Q[0].length)) {
if (Q = q, U = j, this.options.backtrack_lexer) {
if (V = this.test_match(q, F[j]), V !== !1)
return V;
if (this._backtrack) {
Q = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return Q ? (V = this.test_match(Q, F[U]), V !== !1 ? V : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var Q = this.next();
return Q || this.lex();
},
begin: function(Q) {
this.conditionStack.push(Q);
},
popState: function() {
var Q = this.conditionStack.length - 1;
return Q > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(Q) {
return Q = this.conditionStack.length - 1 - Math.abs(Q || 0), Q >= 0 ? this.conditionStack[Q] : "INITIAL";
},
pushState: function(Q) {
this.begin(Q);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: {},
performAction: function(Q, q, U, F) {
switch (U) {
case 0:
return this.begin("open_directive"), 19;
case 1:
return 8;
case 2:
return 9;
case 3:
return 10;
case 4:
return 11;
case 5:
return this.begin("type_directive"), 20;
case 6:
return this.popState(), this.begin("arg_directive"), 17;
case 7:
return this.popState(), this.popState(), 22;
case 8:
return 21;
case 9:
break;
case 10:
break;
case 11:
return this.begin("acc_title"), 38;
case 12:
return this.popState(), "acc_title_value";
case 13:
return this.begin("acc_descr"), 40;
case 14:
return this.popState(), "acc_descr_value";
case 15:
this.begin("acc_descr_multiline");
break;
case 16:
this.popState();
break;
case 17:
return "acc_descr_multiline_value";
case 18:
return 16;
case 19:
break;
case 20:
return 23;
case 21:
return 23;
case 22:
return this.begin("struct"), 45;
case 23:
return "EDGE_STATE";
case 24:
return "EOF_IN_STRUCT";
case 25:
return "OPEN_IN_STRUCT";
case 26:
return this.popState(), 47;
case 27:
break;
case 28:
return "MEMBER";
case 29:
return 43;
case 30:
return 70;
case 31:
return 63;
case 32:
return 64;
case 33:
return 66;
case 34:
return 48;
case 35:
return 49;
case 36:
this.begin("generic");
break;
case 37:
this.popState();
break;
case 38:
return "GENERICTYPE";
case 39:
this.begin("string");
break;
case 40:
this.popState();
break;
case 41:
return "STR";
case 42:
this.begin("bqstring");
break;
case 43:
this.popState();
break;
case 44:
return "BQUOTE_STR";
case 45:
this.begin("href");
break;
case 46:
this.popState();
break;
case 47:
return 69;
case 48:
this.begin("callback_name");
break;
case 49:
this.popState();
break;
case 50:
this.popState(), this.begin("callback_args");
break;
case 51:
return 67;
case 52:
this.popState();
break;
case 53:
return 68;
case 54:
return 65;
case 55:
return 65;
case 56:
return 65;
case 57:
return 65;
case 58:
return 57;
case 59:
return 57;
case 60:
return 59;
case 61:
return 59;
case 62:
return 58;
case 63:
return 56;
case 64:
return 60;
case 65:
return 61;
case 66:
return 62;
case 67:
return 32;
case 68:
return 44;
case 69:
return 82;
case 70:
return "DOT";
case 71:
return "PLUS";
case 72:
return 79;
case 73:
return "EQUALS";
case 74:
return "EQUALS";
case 75:
return 86;
case 76:
return "PUNCTUATION";
case 77:
return 85;
case 78:
return 84;
case 79:
return 81;
case 80:
return 25;
}
},
rules: [/^(?:%%\{)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:[{])/, /^(?:\[\*\])/, /^(?:$)/, /^(?:[{])/, /^(?:[}])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:class\b)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:[~])/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[`])/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:href[\s]+["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:$)/],
conditions: { acc_descr_multiline: { rules: [16, 17], inclusive: !1 }, acc_descr: { rules: [14], inclusive: !1 }, acc_title: { rules: [12], inclusive: !1 }, arg_directive: { rules: [7, 8], inclusive: !1 }, type_directive: { rules: [6, 7], inclusive: !1 }, open_directive: { rules: [5], inclusive: !1 }, callback_args: { rules: [52, 53], inclusive: !1 }, callback_name: { rules: [49, 50, 51], inclusive: !1 }, href: { rules: [46, 47], inclusive: !1 }, struct: { rules: [23, 24, 25, 26, 27, 28], inclusive: !1 }, generic: { rules: [37, 38], inclusive: !1 }, bqstring: { rules: [43, 44], inclusive: !1 }, string: { rules: [40, 41], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 18, 19, 20, 21, 22, 23, 29, 30, 31, 32, 33, 34, 35, 36, 39, 42, 45, 48, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80], inclusive: !0 } }
};
return Z;
}();
tt.lexer = K;
function it() {
this.yy = {};
}
return it.prototype = tt, tt.Parser = it, new it();
}();
zf.parser = zf;
const qZ = (t, e) => {
var r;
return ((r = e == null ? void 0 : e.class) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !1 : t.match(/^\s*classDiagram/) !== null;
}, VZ = (t, e) => {
var r;
return t.match(/^\s*classDiagram/) !== null && ((r = e == null ? void 0 : e.class) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !0 : t.match(/^\s*classDiagram-v2/) !== null;
}, x4 = "classid-";
let k4 = [], cr = {}, l6 = 0, qc = [];
const oc = (t) => pe.sanitizeText(t, nt()), zZ = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, Vc = function(t) {
let e = "", r = t;
if (t.indexOf("~") > 0) {
let n = t.split("~");
r = n[0], e = pe.sanitizeText(n[1], nt());
}
return { className: r, type: e };
}, gb = function(t) {
let e = Vc(t);
typeof cr[e.className] < "u" || (cr[e.className] = {
id: e.className,
type: e.type,
cssClasses: [],
methods: [],
members: [],
annotations: [],
domId: x4 + e.className + "-" + l6
}, l6++);
}, EA = function(t) {
const e = Object.keys(cr);
for (let r = 0; r < e.length; r++)
if (cr[e[r]].id === t)
return cr[e[r]].domId;
}, YZ = function() {
k4 = [], cr = {}, qc = [], qc.push(SA), gi();
}, UZ = function(t) {
return cr[t];
}, WZ = function() {
return cr;
}, HZ = function() {
return k4;
}, GZ = function(t) {
H.debug("Adding relation: " + JSON.stringify(t)), gb(t.id1), gb(t.id2), t.id1 = Vc(t.id1).className, t.id2 = Vc(t.id2).className, t.relationTitle1 = pe.sanitizeText(
t.relationTitle1.trim(),
nt()
), t.relationTitle2 = pe.sanitizeText(
t.relationTitle2.trim(),
nt()
), k4.push(t);
}, jZ = function(t, e) {
const r = Vc(t).className;
cr[r].annotations.push(e);
}, CA = function(t, e) {
const r = Vc(t).className, n = cr[r];
if (typeof e == "string") {
const i = e.trim();
i.startsWith("<<") && i.endsWith(">>") ? n.annotations.push(oc(i.substring(2, i.length - 2))) : i.indexOf(")") > 0 ? n.methods.push(oc(i)) : i && n.members.push(oc(i));
}
}, $Z = function(t, e) {
Array.isArray(e) && (e.reverse(), e.forEach((r) => CA(t, r)));
}, XZ = function(t) {
return t.substring(0, 1) === ":" ? pe.sanitizeText(t.substr(1).trim(), nt()) : oc(t.trim());
}, w4 = function(t, e) {
t.split(",").forEach(function(r) {
let n = r;
r[0].match(/\d/) && (n = x4 + n), typeof cr[n] < "u" && cr[n].cssClasses.push(e);
});
}, KZ = function(t, e) {
const r = nt();
t.split(",").forEach(function(n) {
typeof e < "u" && (cr[n].tooltip = pe.sanitizeText(e, r));
});
}, ZZ = function(t) {
return cr[t].tooltip;
}, QZ = function(t, e, r) {
const n = nt();
t.split(",").forEach(function(i) {
let a = i;
i[0].match(/\d/) && (a = x4 + a), typeof cr[a] < "u" && (cr[a].link = Se.formatUrl(e, n), n.securityLevel === "sandbox" ? cr[a].linkTarget = "_top" : typeof r == "string" ? cr[a].linkTarget = oc(r) : cr[a].linkTarget = "_blank");
}), w4(t, "clickable");
}, JZ = function(t, e, r) {
t.split(",").forEach(function(n) {
tQ(n, e, r), cr[n].haveCallback = !0;
}), w4(t, "clickable");
}, tQ = function(t, e, r) {
const n = nt();
let i = t, a = EA(i);
if (n.securityLevel === "loose" && !(typeof e > "u") && typeof cr[i] < "u") {
let s = [];
if (typeof r == "string") {
s = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
for (let o = 0; o < s.length; o++) {
let l = s[o].trim();
l.charAt(0) === '"' && l.charAt(l.length - 1) === '"' && (l = l.substr(1, l.length - 2)), s[o] = l;
}
}
s.length === 0 && s.push(a), qc.push(function() {
const o = document.querySelector(`[id="${a}"]`);
o !== null && o.addEventListener(
"click",
function() {
Se.runFunc(e, ...s);
},
!1
);
});
}
}, eQ = function(t) {
qc.forEach(function(e) {
e(t);
});
}, rQ = {
LINE: 0,
DOTTED_LINE: 1
}, nQ = {
AGGREGATION: 0,
EXTENSION: 1,
COMPOSITION: 2,
DEPENDENCY: 3,
LOLLIPOP: 4
}, SA = function(t) {
let e = St(".mermaidTooltip");
(e._groups || e)[0][0] === null && (e = St("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), St(t).select("svg").selectAll("g.node").on("mouseover", function() {
const i = St(this);
if (i.attr("title") === null)
return;
const s = this.getBoundingClientRect();
e.transition().duration(200).style("opacity", ".9"), e.text(i.attr("title")).style("left", window.scrollX + s.left + (s.right - s.left) / 2 + "px").style("top", window.scrollY + s.top - 14 + document.body.scrollTop + "px"), e.html(e.html().replace(/<br\/>/g, "
")), i.classed("hover", !0);
}).on("mouseout", function() {
e.transition().duration(500).style("opacity", 0), St(this).classed("hover", !1);
});
};
qc.push(SA);
let AA = "TB";
const iQ = () => AA, aQ = (t) => {
AA = t;
}, vo = {
parseDirective: zZ,
setAccTitle: Yn,
getAccTitle: yi,
getAccDescription: bi,
setAccDescription: mi,
getConfig: () => nt().class,
addClass: gb,
bindFunctions: eQ,
clear: YZ,
getClass: UZ,
getClasses: WZ,
addAnnotation: jZ,
getRelations: HZ,
addRelation: GZ,
getDirection: iQ,
setDirection: aQ,
addMember: CA,
addMembers: $Z,
cleanupLabel: XZ,
lineType: rQ,
relationType: nQ,
setClickEvent: JZ,
setCssClass: w4,
setLink: QZ,
getTooltip: ZZ,
setTooltip: KZ,
lookUpDomId: EA
};
var Ld, c6;
function sQ() {
if (c6)
return Ld;
c6 = 1;
var t = X1;
function e() {
this.__data__ = new t(), this.size = 0;
}
return Ld = e, Ld;
}
var Rd, u6;
function oQ() {
if (u6)
return Rd;
u6 = 1;
function t(e) {
var r = this.__data__, n = r.delete(e);
return this.size = r.size, n;
}
return Rd = t, Rd;
}
var Id, h6;
function lQ() {
if (h6)
return Id;
h6 = 1;
function t(e) {
return this.__data__.get(e);
}
return Id = t, Id;
}
var Nd, f6;
function cQ() {
if (f6)
return Nd;
f6 = 1;
function t(e) {
return this.__data__.has(e);
}
return Nd = t, Nd;
}
var Bd, d6;
function uQ() {
if (d6)
return Bd;
d6 = 1;
var t = X1, e = o4, r = l4, n = 200;
function i(a, s) {
var o = this.__data__;
if (o instanceof t) {
var l = o.__data__;
if (!e || l.length < n - 1)
return l.push([a, s]), this.size = ++o.size, this;
o = this.__data__ = new r(l);
}
return o.set(a, s), this.size = o.size, this;
}
return Bd = i, Bd;
}
var Dd, p6;
function o0() {
if (p6)
return Dd;
p6 = 1;
var t = X1, e = sQ(), r = oQ(), n = lQ(), i = cQ(), a = uQ();
function s(o) {
var l = this.__data__ = new t(o);
this.size = l.size;
}
return s.prototype.clear = e, s.prototype.delete = r, s.prototype.get = n, s.prototype.has = i, s.prototype.set = a, Dd = s, Dd;
}
var Od, g6;
function T4() {
if (g6)
return Od;
g6 = 1;
function t(e, r) {
for (var n = -1, i = e == null ? 0 : e.length; ++n < i && r(e[n], n, e) !== !1; )
;
return e;
}
return Od = t, Od;
}
var Fd, y6;
function MA() {
if (y6)
return Fd;
y6 = 1;
var t = Zs, e = function() {
try {
var r = t(Object, "defineProperty");
return r({}, "", {}), r;
} catch {
}
}();
return Fd = e, Fd;
}
var Pd, m6;
function l0() {
if (m6)
return Pd;
m6 = 1;
var t = MA();
function e(r, n, i) {
n == "__proto__" && t ? t(r, n, {
configurable: !0,
enumerable: !0,
value: i,
writable: !0
}) : r[n] = i;
}
return Pd = e, Pd;
}
var qd, b6;
function c0() {
if (b6)
return qd;
b6 = 1;
var t = l0(), e = cl, r = Object.prototype, n = r.hasOwnProperty;
function i(a, s, o) {
var l = a[s];
(!(n.call(a, s) && e(l, o)) || o === void 0 && !(s in a)) && t(a, s, o);
}
return qd = i, qd;
}
var Vd, _6;
function su() {
if (_6)
return Vd;
_6 = 1;
var t = c0(), e = l0();
function r(n, i, a, s) {
var o = !a;
a || (a = {});
for (var l = -1, u = i.length; ++l < u; ) {
var h = i[l], d = s ? s(a[h], n[h], h, a, n) : void 0;
d === void 0 && (d = n[h]), o ? e(a, h, d) : t(a, h, d);
}
return a;
}
return Vd = r, Vd;
}
var zd, v6;
function hQ() {
if (v6)
return zd;
v6 = 1;
function t(e, r) {
for (var n = -1, i = Array(e); ++n < e; )
i[n] = r(n);
return i;
}
return zd = t, zd;
}
var Yd, x6;
function Ui() {
if (x6)
return Yd;
x6 = 1;
function t(e) {
return e != null && typeof e == "object";
}
return Yd = t, Yd;
}
var Ud, k6;
function fQ() {
if (k6)
return Ud;
k6 = 1;
var t = Ks, e = Ui(), r = "[object Arguments]";
function n(i) {
return e(i) && t(i) == r;
}
return Ud = n, Ud;
}
var Wd, w6;
function ou() {
if (w6)
return Wd;
w6 = 1;
var t = fQ(), e = Ui(), r = Object.prototype, n = r.hasOwnProperty, i = r.propertyIsEnumerable, a = t(function() {
return arguments;
}()) ? t : function(s) {
return e(s) && n.call(s, "callee") && !i.call(s, "callee");
};
return Wd = a, Wd;
}
var Hd, T6;
function br() {
if (T6)
return Hd;
T6 = 1;
var t = Array.isArray;
return Hd = t, Hd;
}
var eh = { exports: {} }, Gd, E6;
function dQ() {
if (E6)
return Gd;
E6 = 1;
function t() {
return !1;
}
return Gd = t, Gd;
}
var C6;
function dl() {
return C6 || (C6 = 1, function(t, e) {
var r = di, n = dQ(), i = e && !e.nodeType && e, a = i && !0 && t && !t.nodeType && t, s = a && a.exports === i, o = s ? r.Buffer : void 0, l = o ? o.isBuffer : void 0, u = l || n;
t.exports = u;
}(eh, eh.exports)), eh.exports;
}
var jd, S6;
function u0() {
if (S6)
return jd;
S6 = 1;
var t = 9007199254740991, e = /^(?:0|[1-9]\d*)$/;
function r(n, i) {
var a = typeof n;
return i = i == null ? t : i, !!i && (a == "number" || a != "symbol" && e.test(n)) && n > -1 && n % 1 == 0 && n < i;
}
return jd = r, jd;
}
var $d, A6;
function E4() {
if (A6)
return $d;
A6 = 1;
var t = 9007199254740991;
function e(r) {
return typeof r == "number" && r > -1 && r % 1 == 0 && r <= t;
}
return $d = e, $d;
}
var Xd, M6;
function pQ() {
if (M6)
return Xd;
M6 = 1;
var t = Ks, e = E4(), r = Ui(), n = "[object Arguments]", i = "[object Array]", a = "[object Boolean]", s = "[object Date]", o = "[object Error]", l = "[object Function]", u = "[object Map]", h = "[object Number]", d = "[object Object]", f = "[object RegExp]", p = "[object Set]", m = "[object String]", _ = "[object WeakMap]", y = "[object ArrayBuffer]", b = "[object DataView]", x = "[object Float32Array]", k = "[object Float64Array]", T = "[object Int8Array]", C = "[object Int16Array]", M = "[object Int32Array]", S = "[object Uint8Array]", R = "[object Uint8ClampedArray]", A = "[object Uint16Array]", L = "[object Uint32Array]", v = {};
v[x] = v[k] = v[T] = v[C] = v[M] = v[S] = v[R] = v[A] = v[L] = !0, v[n] = v[i] = v[y] = v[a] = v[b] = v[s] = v[o] = v[l] = v[u] = v[h] = v[d] = v[f] = v[p] = v[m] = v[_] = !1;
function B(w) {
return r(w) && e(w.length) && !!v[t(w)];
}
return Xd = B, Xd;
}
var Kd, L6;
function h0() {
if (L6)
return Kd;
L6 = 1;
function t(e) {
return function(r) {
return e(r);
};
}
return Kd = t, Kd;
}
var rh = { exports: {} }, R6;
function C4() {
return R6 || (R6 = 1, function(t, e) {
var r = LS, n = e && !e.nodeType && e, i = n && !0 && t && !t.nodeType && t, a = i && i.exports === n, s = a && r.process, o = function() {
try {
var l = i && i.require && i.require("util").types;
return l || s && s.binding && s.binding("util");
} catch {
}
}();
t.exports = o;
}(rh, rh.exports)), rh.exports;
}
var Zd, I6;
function lu() {
if (I6)
return Zd;
I6 = 1;
var t = pQ(), e = h0(), r = C4(), n = r && r.isTypedArray, i = n ? e(n) : t;
return Zd = i, Zd;
}
var Qd, N6;
function LA() {
if (N6)
return Qd;
N6 = 1;
var t = hQ(), e = ou(), r = br(), n = dl(), i = u0(), a = lu(), s = Object.prototype, o = s.hasOwnProperty;
function l(u, h) {
var d = r(u), f = !d && e(u), p = !d && !f && n(u), m = !d && !f && !p && a(u), _ = d || f || p || m, y = _ ? t(u.length, String) : [], b = y.length;
for (var x in u)
(h || o.call(u, x)) && !(_ && (x == "length" || p && (x == "offset" || x == "parent") || m && (x == "buffer" || x == "byteLength" || x == "byteOffset") || i(x, b))) && y.push(x);
return y;
}
return Qd = l, Qd;
}
var Jd, B6;
function f0() {
if (B6)
return Jd;
B6 = 1;
var t = Object.prototype;
function e(r) {
var n = r && r.constructor, i = typeof n == "function" && n.prototype || t;
return r === i;
}
return Jd = e, Jd;
}
var t2, D6;
function RA() {
if (D6)
return t2;
D6 = 1;
function t(e, r) {
return function(n) {
return e(r(n));
};
}
return t2 = t, t2;
}
var e2, O6;
function gQ() {
if (O6)
return e2;
O6 = 1;
var t = RA(), e = t(Object.keys, Object);
return e2 = e, e2;
}
var r2, F6;
function S4() {
if (F6)
return r2;
F6 = 1;
var t = f0(), e = gQ(), r = Object.prototype, n = r.hasOwnProperty;
function i(a) {
if (!t(a))
return e(a);
var s = [];
for (var o in Object(a))
n.call(a, o) && o != "constructor" && s.push(o);
return s;
}
return r2 = i, r2;
}
var n2, P6;
function _a() {
if (P6)
return n2;
P6 = 1;
var t = ol, e = E4();
function r(n) {
return n != null && e(n.length) && !t(n);
}
return n2 = r, n2;
}
var i2, q6;
function as() {
if (q6)
return i2;
q6 = 1;
var t = LA(), e = S4(), r = _a();
function n(i) {
return r(i) ? t(i) : e(i);
}
return i2 = n, i2;
}
var a2, V6;
function yQ() {
if (V6)
return a2;
V6 = 1;
var t = su(), e = as();
function r(n, i) {
return n && t(i, e(i), n);
}
return a2 = r, a2;
}
var s2, z6;
function mQ() {
if (z6)
return s2;
z6 = 1;
function t(e) {
var r = [];
if (e != null)
for (var n in Object(e))
r.push(n);
return r;
}
return s2 = t, s2;
}
var o2, Y6;
function bQ() {
if (Y6)
return o2;
Y6 = 1;
var t = zn, e = f0(), r = mQ(), n = Object.prototype, i = n.hasOwnProperty;
function a(s) {
if (!t(s))
return r(s);
var o = e(s), l = [];
for (var u in s)
u == "constructor" && (o || !i.call(s, u)) || l.push(u);
return l;
}
return o2 = a, o2;
}
var l2, U6;
function Qs() {
if (U6)
return l2;
U6 = 1;
var t = LA(), e = bQ(), r = _a();
function n(i) {
return r(i) ? t(i, !0) : e(i);
}
return l2 = n, l2;
}
var c2, W6;
function _Q() {
if (W6)
return c2;
W6 = 1;
var t = su(), e = Qs();
function r(n, i) {
return n && t(i, e(i), n);
}
return c2 = r, c2;
}
var nh = { exports: {} }, H6;
function IA() {
return H6 || (H6 = 1, function(t, e) {
var r = di, n = e && !e.nodeType && e, i = n && !0 && t && !t.nodeType && t, a = i && i.exports === n, s = a ? r.Buffer : void 0, o = s ? s.allocUnsafe : void 0;
function l(u, h) {
if (h)
return u.slice();
var d = u.length, f = o ? o(d) : new u.constructor(d);
return u.copy(f), f;
}
t.exports = l;
}(nh, nh.exports)), nh.exports;
}
var u2, G6;
function NA() {
if (G6)
return u2;
G6 = 1;
function t(e, r) {
var n = -1, i = e.length;
for (r || (r = Array(i)); ++n < i; )
r[n] = e[n];
return r;
}
return u2 = t, u2;
}
var h2, j6;
function BA() {
if (j6)
return h2;
j6 = 1;
function t(e, r) {
for (var n = -1, i = e == null ? 0 : e.length, a = 0, s = []; ++n < i; ) {
var o = e[n];
r(o, n, e) && (s[a++] = o);
}
return s;
}
return h2 = t, h2;
}
var f2, $6;
function DA() {
if ($6)
return f2;
$6 = 1;
function t() {
return [];
}
return f2 = t, f2;
}
var d2, X6;
function A4() {
if (X6)
return d2;
X6 = 1;
var t = BA(), e = DA(), r = Object.prototype, n = r.propertyIsEnumerable, i = Object.getOwnPropertySymbols, a = i ? function(s) {
return s == null ? [] : (s = Object(s), t(i(s), function(o) {
return n.call(s, o);
}));
} : e;
return d2 = a, d2;
}
var p2, K6;
function vQ() {
if (K6)
return p2;
K6 = 1;
var t = su(), e = A4();
function r(n, i) {
return t(n, e(n), i);
}
return p2 = r, p2;
}
var g2, Z6;
function M4() {
if (Z6)
return g2;
Z6 = 1;
function t(e, r) {
for (var n = -1, i = r.length, a = e.length; ++n < i; )
e[a + n] = r[n];
return e;
}
return g2 = t, g2;
}
var y2, Q6;
function d0() {
if (Q6)
return y2;
Q6 = 1;
var t = RA(), e = t(Object.getPrototypeOf, Object);
return y2 = e, y2;
}
var m2, J6;
function OA() {
if (J6)
return m2;
J6 = 1;
var t = M4(), e = d0(), r = A4(), n = DA(), i = Object.getOwnPropertySymbols, a = i ? function(s) {
for (var o = []; s; )
t(o, r(s)), s = e(s);
return o;
} : n;
return m2 = a, m2;
}
var b2, tx;
function xQ() {
if (tx)
return b2;
tx = 1;
var t = su(), e = OA();
function r(n, i) {
return t(n, e(n), i);
}
return b2 = r, b2;
}
var _2, ex;
function FA() {
if (ex)
return _2;
ex = 1;
var t = M4(), e = br();
function r(n, i, a) {
var s = i(n);
return e(n) ? s : t(s, a(n));
}
return _2 = r, _2;
}
var v2, rx;
function PA() {
if (rx)
return v2;
rx = 1;
var t = FA(), e = A4(), r = as();
function n(i) {
return t(i, r, e);
}
return v2 = n, v2;
}
var x2, nx;
function kQ() {
if (nx)
return x2;
nx = 1;
var t = FA(), e = OA(), r = Qs();
function n(i) {
return t(i, r, e);
}
return x2 = n, x2;
}
var k2, ix;
function wQ() {
if (ix)
return k2;
ix = 1;
var t = Zs, e = di, r = t(e, "DataView");
return k2 = r, k2;
}
var w2, ax;
function TQ() {
if (ax)
return w2;
ax = 1;
var t = Zs, e = di, r = t(e, "Promise");
return w2 = r, w2;
}
var T2, sx;
function qA() {
if (sx)
return T2;
sx = 1;
var t = Zs, e = di, r = t(e, "Set");
return T2 = r, T2;
}
var E2, ox;
function EQ() {
if (ox)
return E2;
ox = 1;
var t = Zs, e = di, r = t(e, "WeakMap");
return E2 = r, E2;
}
var C2, lx;
function pl() {
if (lx)
return C2;
lx = 1;
var t = wQ(), e = o4, r = TQ(), n = qA(), i = EQ(), a = Ks, s = IS, o = "[object Map]", l = "[object Object]", u = "[object Promise]", h = "[object Set]", d = "[object WeakMap]", f = "[object DataView]", p = s(t), m = s(e), _ = s(r), y = s(n), b = s(i), x = a;
return (t && x(new t(new ArrayBuffer(1))) != f || e && x(new e()) != o || r && x(r.resolve()) != u || n && x(new n()) != h || i && x(new i()) != d) && (x = function(k) {
var T = a(k), C = T == l ? k.constructor : void 0, M = C ? s(C) : "";
if (M)
switch (M) {
case p:
return f;
case m:
return o;
case _:
return u;
case y:
return h;
case b:
return d;
}
return T;
}), C2 = x, C2;
}
var S2, cx;
function CQ() {
if (cx)
return S2;
cx = 1;
var t = Object.prototype, e = t.hasOwnProperty;
function r(n) {
var i = n.length, a = new n.constructor(i);
return i && typeof n[0] == "string" && e.call(n, "index") && (a.index = n.index, a.input = n.input), a;
}
return S2 = r, S2;
}
var A2, ux;
function VA() {
if (ux)
return A2;
ux = 1;
var t = di, e = t.Uint8Array;
return A2 = e, A2;
}
var M2, hx;
function L4() {
if (hx)
return M2;
hx = 1;
var t = VA();
function e(r) {
var n = new r.constructor(r.byteLength);
return new t(n).set(new t(r)), n;
}
return M2 = e, M2;
}
var L2, fx;
function SQ() {
if (fx)
return L2;
fx = 1;
var t = L4();
function e(r, n) {
var i = n ? t(r.buffer) : r.buffer;
return new r.constructor(i, r.byteOffset, r.byteLength);
}
return L2 = e, L2;
}
var R2, dx;
function AQ() {
if (dx)
return R2;
dx = 1;
var t = /\w*$/;
function e(r) {
var n = new r.constructor(r.source, t.exec(r));
return n.lastIndex = r.lastIndex, n;
}
return R2 = e, R2;
}
var I2, px;
function MQ() {
if (px)
return I2;
px = 1;
var t = sl, e = t ? t.prototype : void 0, r = e ? e.valueOf : void 0;
function n(i) {
return r ? Object(r.call(i)) : {};
}
return I2 = n, I2;
}
var N2, gx;
function zA() {
if (gx)
return N2;
gx = 1;
var t = L4();
function e(r, n) {
var i = n ? t(r.buffer) : r.buffer;
return new r.constructor(i, r.byteOffset, r.length);
}
return N2 = e, N2;
}
var B2, yx;
function LQ() {
if (yx)
return B2;
yx = 1;
var t = L4(), e = SQ(), r = AQ(), n = MQ(), i = zA(), a = "[object Boolean]", s = "[object Date]", o = "[object Map]", l = "[object Number]", u = "[object RegExp]", h = "[object Set]", d = "[object String]", f = "[object Symbol]", p = "[object ArrayBuffer]", m = "[object DataView]", _ = "[object Float32Array]", y = "[object Float64Array]", b = "[object Int8Array]", x = "[object Int16Array]", k = "[object Int32Array]", T = "[object Uint8Array]", C = "[object Uint8ClampedArray]", M = "[object Uint16Array]", S = "[object Uint32Array]";
function R(A, L, v) {
var B = A.constructor;
switch (L) {
case p:
return t(A);
case a:
case s:
return new B(+A);
case m:
return e(A, v);
case _:
case y:
case b:
case x:
case k:
case T:
case C:
case M:
case S:
return i(A, v);
case o:
return new B();
case l:
case d:
return new B(A);
case u:
return r(A);
case h:
return new B();
case f:
return n(A);
}
}
return B2 = R, B2;
}
var D2, mx;
function YA() {
if (mx)
return D2;
mx = 1;
var t = zn, e = Object.create, r = function() {
function n() {
}
return function(i) {
if (!t(i))
return {};
if (e)
return e(i);
n.prototype = i;
var a = new n();
return n.prototype = void 0, a;
};
}();
return D2 = r, D2;
}
var O2, bx;
function UA() {
if (bx)
return O2;
bx = 1;
var t = YA(), e = d0(), r = f0();
function n(i) {
return typeof i.constructor == "function" && !r(i) ? t(e(i)) : {};
}
return O2 = n, O2;
}
var F2, _x;
function RQ() {
if (_x)
return F2;
_x = 1;
var t = pl(), e = Ui(), r = "[object Map]";
function n(i) {
return e(i) && t(i) == r;
}
return F2 = n, F2;
}
var P2, vx;
function IQ() {
if (vx)
return P2;
vx = 1;
var t = RQ(), e = h0(), r = C4(), n = r && r.isMap, i = n ? e(n) : t;
return P2 = i, P2;
}
var q2, xx;
function NQ() {
if (xx)
return q2;
xx = 1;
var t = pl(), e = Ui(), r = "[object Set]";
function n(i) {
return e(i) && t(i) == r;
}
return q2 = n, q2;
}
var V2, kx;
function BQ() {
if (kx)
return V2;
kx = 1;
var t = NQ(), e = h0(), r = C4(), n = r && r.isSet, i = n ? e(n) : t;
return V2 = i, V2;
}
var z2, wx;
function WA() {
if (wx)
return z2;
wx = 1;
var t = o0(), e = T4(), r = c0(), n = yQ(), i = _Q(), a = IA(), s = NA(), o = vQ(), l = xQ(), u = PA(), h = kQ(), d = pl(), f = CQ(), p = LQ(), m = UA(), _ = br(), y = dl(), b = IQ(), x = zn, k = BQ(), T = as(), C = Qs(), M = 1, S = 2, R = 4, A = "[object Arguments]", L = "[object Array]", v = "[object Boolean]", B = "[object Date]", w = "[object Error]", D = "[object Function]", N = "[object GeneratorFunction]", z = "[object Map]", X = "[object Number]", ct = "[object Object]", J = "[object RegExp]", Y = "[object Set]", $ = "[object String]", lt = "[object Symbol]", ut = "[object WeakMap]", W = "[object ArrayBuffer]", tt = "[object DataView]", K = "[object Float32Array]", it = "[object Float64Array]", Z = "[object Int8Array]", V = "[object Int16Array]", Q = "[object Int32Array]", q = "[object Uint8Array]", U = "[object Uint8ClampedArray]", F = "[object Uint16Array]", j = "[object Uint32Array]", P = {};
P[A] = P[L] = P[W] = P[tt] = P[v] = P[B] = P[K] = P[it] = P[Z] = P[V] = P[Q] = P[z] = P[X] = P[ct] = P[J] = P[Y] = P[$] = P[lt] = P[q] = P[U] = P[F] = P[j] = !0, P[w] = P[D] = P[ut] = !1;
function et(at, It, Lt, Rt, Ct, pt) {
var mt, _t = It & M, Tt = It & S, ft = It & R;
if (Lt && (mt = Ct ? Lt(at, Rt, Ct, pt) : Lt(at)), mt !== void 0)
return mt;
if (!x(at))
return at;
var le = _(at);
if (le) {
if (mt = f(at), !_t)
return s(at, mt);
} else {
var Dt = d(at), Ht = Dt == D || Dt == N;
if (y(at))
return a(at, _t);
if (Dt == ct || Dt == A || Ht && !Ct) {
if (mt = Tt || Ht ? {} : m(at), !_t)
return Tt ? l(at, i(mt, at)) : o(at, n(mt, at));
} else {
if (!P[Dt])
return Ct ? at : {};
mt = p(at, Dt, _t);
}
}
pt || (pt = new t());
var $t = pt.get(at);
if ($t)
return $t;
pt.set(at, mt), k(at) ? at.forEach(function(Gt) {
mt.add(et(Gt, It, Lt, Gt, at, pt));
}) : b(at) && at.forEach(function(Gt, Ft) {
mt.set(Ft, et(Gt, It, Lt, Ft, at, pt));
});
var Qt = ft ? Tt ? h : u : Tt ? C : T, we = le ? void 0 : Qt(at);
return e(we || at, function(Gt, Ft) {
we && (Ft = Gt, Gt = at[Ft]), r(mt, Ft, et(Gt, It, Lt, Ft, at, pt));
}), mt;
}
return z2 = et, z2;
}
var Y2, Tx;
function DQ() {
if (Tx)
return Y2;
Tx = 1;
var t = WA(), e = 4;
function r(n) {
return t(n, e);
}
return Y2 = r, Y2;
}
var U2, Ex;
function R4() {
if (Ex)
return U2;
Ex = 1;
function t(e) {
return function() {
return e;
};
}
return U2 = t, U2;
}
var W2 = { exports: {} }, H2, Cx;
function OQ() {
if (Cx)
return H2;
Cx = 1;
function t(e) {
return function(r, n, i) {
for (var a = -1, s = Object(r), o = i(r), l = o.length; l--; ) {
var u = o[e ? l : ++a];
if (n(s[u], u, s) === !1)
break;
}
return r;
};
}
return H2 = t, H2;
}
var G2, Sx;
function I4() {
if (Sx)
return G2;
Sx = 1;
var t = OQ(), e = t();
return G2 = e, G2;
}
var j2, Ax;
function N4() {
if (Ax)
return j2;
Ax = 1;
var t = I4(), e = as();
function r(n, i) {
return n && t(n, i, e);
}
return j2 = r, j2;
}
var $2, Mx;
function FQ() {
if (Mx)
return $2;
Mx = 1;
var t = _a();
function e(r, n) {
return function(i, a) {
if (i == null)
return i;
if (!t(i))
return r(i, a);
for (var s = i.length, o = n ? s : -1, l = Object(i); (n ? o-- : ++o < s) && a(l[o], o, l) !== !1; )
;
return i;
};
}
return $2 = e, $2;
}
var X2, Lx;
function p0() {
if (Lx)
return X2;
Lx = 1;
var t = N4(), e = FQ(), r = e(t);
return X2 = r, X2;
}
var K2, Rx;
function Js() {
if (Rx)
return K2;
Rx = 1;
function t(e) {
return e;
}
return K2 = t, K2;
}
var Z2, Ix;
function HA() {
if (Ix)
return Z2;
Ix = 1;
var t = Js();
function e(r) {
return typeof r == "function" ? r : t;
}
return Z2 = e, Z2;
}
var Q2, Nx;
function GA() {
if (Nx)
return Q2;
Nx = 1;
var t = T4(), e = p0(), r = HA(), n = br();
function i(a, s) {
var o = n(a) ? t : e;
return o(a, r(s));
}
return Q2 = i, Q2;
}
var Bx;
function B4() {
return Bx || (Bx = 1, function(t) {
t.exports = GA();
}(W2)), W2.exports;
}
var J2, Dx;
function PQ() {
if (Dx)
return J2;
Dx = 1;
var t = p0();
function e(r, n) {
var i = [];
return t(r, function(a, s, o) {
n(a, s, o) && i.push(a);
}), i;
}
return J2 = e, J2;
}
var tp, Ox;
function qQ() {
if (Ox)
return tp;
Ox = 1;
var t = "__lodash_hash_undefined__";
function e(r) {
return this.__data__.set(r, t), this;
}
return tp = e, tp;
}
var ep, Fx;
function VQ() {
if (Fx)
return ep;
Fx = 1;
function t(e) {
return this.__data__.has(e);
}
return ep = t, ep;
}
var rp, Px;
function jA() {
if (Px)
return rp;
Px = 1;
var t = l4, e = qQ(), r = VQ();
function n(i) {
var a = -1, s = i == null ? 0 : i.length;
for (this.__data__ = new t(); ++a < s; )
this.add(i[a]);
}
return n.prototype.add = n.prototype.push = e, n.prototype.has = r, rp = n, rp;
}
var np, qx;
function zQ() {
if (qx)
return np;
qx = 1;
function t(e, r) {
for (var n = -1, i = e == null ? 0 : e.length; ++n < i; )
if (r(e[n], n, e))
return !0;
return !1;
}
return np = t, np;
}
var ip, Vx;
function $A() {
if (Vx)
return ip;
Vx = 1;
function t(e, r) {
return e.has(r);
}
return ip = t, ip;
}
var ap, zx;
function XA() {
if (zx)
return ap;
zx = 1;
var t = jA(), e = zQ(), r = $A(), n = 1, i = 2;
function a(s, o, l, u, h, d) {
var f = l & n, p = s.length, m = o.length;
if (p != m && !(f && m > p))
return !1;
var _ = d.get(s), y = d.get(o);
if (_ && y)
return _ == o && y == s;
var b = -1, x = !0, k = l & i ? new t() : void 0;
for (d.set(s, o), d.set(o, s); ++b < p; ) {
var T = s[b], C = o[b];
if (u)
var M = f ? u(C, T, b, o, s, d) : u(T, C, b, s, o, d);
if (M !== void 0) {
if (M)
continue;
x = !1;
break;
}
if (k) {
if (!e(o, function(S, R) {
if (!r(k, R) && (T === S || h(T, S, l, u, d)))
return k.push(R);
})) {
x = !1;
break;
}
} else if (!(T === C || h(T, C, l, u, d))) {
x = !1;
break;
}
}
return d.delete(s), d.delete(o), x;
}
return ap = a, ap;
}
var sp, Yx;
function YQ() {
if (Yx)
return sp;
Yx = 1;
function t(e) {
var r = -1, n = Array(e.size);
return e.forEach(function(i, a) {
n[++r] = [a, i];
}), n;
}
return sp = t, sp;
}
var op, Ux;
function D4() {
if (Ux)
return op;
Ux = 1;
function t(e) {
var r = -1, n = Array(e.size);
return e.forEach(function(i) {
n[++r] = i;
}), n;
}
return op = t, op;
}
var lp, Wx;
function UQ() {
if (Wx)
return lp;
Wx = 1;
var t = sl, e = VA(), r = cl, n = XA(), i = YQ(), a = D4(), s = 1, o = 2, l = "[object Boolean]", u = "[object Date]", h = "[object Error]", d = "[object Map]", f = "[object Number]", p = "[object RegExp]", m = "[object Set]", _ = "[object String]", y = "[object Symbol]", b = "[object ArrayBuffer]", x = "[object DataView]", k = t ? t.prototype : void 0, T = k ? k.valueOf : void 0;
function C(M, S, R, A, L, v, B) {
switch (R) {
case x:
if (M.byteLength != S.byteLength || M.byteOffset != S.byteOffset)
return !1;
M = M.buffer, S = S.buffer;
case b:
return !(M.byteLength != S.byteLength || !v(new e(M), new e(S)));
case l:
case u:
case f:
return r(+M, +S);
case h:
return M.name == S.name && M.message == S.message;
case p:
case _:
return M == S + "";
case d:
var w = i;
case m:
var D = A & s;
if (w || (w = a), M.size != S.size && !D)
return !1;
var N = B.get(M);
if (N)
return N == S;
A |= o, B.set(M, S);
var z = n(w(M), w(S), A, L, v, B);
return B.delete(M), z;
case y:
if (T)
return T.call(M) == T.call(S);
}
return !1;
}
return lp = C, lp;
}
var cp, Hx;
function WQ() {
if (Hx)
return cp;
Hx = 1;
var t = PA(), e = 1, r = Object.prototype, n = r.hasOwnProperty;
function i(a, s, o, l, u, h) {
var d = o & e, f = t(a), p = f.length, m = t(s), _ = m.length;
if (p != _ && !d)
return !1;
for (var y = p; y--; ) {
var b = f[y];
if (!(d ? b in s : n.call(s, b)))
return !1;
}
var x = h.get(a), k = h.get(s);
if (x && k)
return x == s && k == a;
var T = !0;
h.set(a, s), h.set(s, a);
for (var C = d; ++y < p; ) {
b = f[y];
var M = a[b], S = s[b];
if (l)
var R = d ? l(S, M, b, s, a, h) : l(M, S, b, a, s, h);
if (!(R === void 0 ? M === S || u(M, S, o, l, h) : R)) {
T = !1;
break;
}
C || (C = b == "constructor");
}
if (T && !C) {
var A = a.constructor, L = s.constructor;
A != L && "constructor" in a && "constructor" in s && !(typeof A == "function" && A instanceof A && typeof L == "function" && L instanceof L) && (T = !1);
}
return h.delete(a), h.delete(s), T;
}
return cp = i, cp;
}
var up, Gx;
function HQ() {
if (Gx)
return up;
Gx = 1;
var t = o0(), e = XA(), r = UQ(), n = WQ(), i = pl(), a = br(), s = dl(), o = lu(), l = 1, u = "[object Arguments]", h = "[object Array]", d = "[object Object]", f = Object.prototype, p = f.hasOwnProperty;
function m(_, y, b, x, k, T) {
var C = a(_), M = a(y), S = C ? h : i(_), R = M ? h : i(y);
S = S == u ? d : S, R = R == u ? d : R;
var A = S == d, L = R == d, v = S == R;
if (v && s(_)) {
if (!s(y))
return !1;
C = !0, A = !1;
}
if (v && !A)
return T || (T = new t()), C || o(_) ? e(_, y, b, x, k, T) : r(_, y, S, b, x, k, T);
if (!(b & l)) {
var B = A && p.call(_, "__wrapped__"), w = L && p.call(y, "__wrapped__");
if (B || w) {
var D = B ? _.value() : _, N = w ? y.value() : y;
return T || (T = new t()), k(D, N, b, x, T);
}
}
return v ? (T || (T = new t()), n(_, y, b, x, k, T)) : !1;
}
return up = m, up;
}
var hp, jx;
function KA() {
if (jx)
return hp;
jx = 1;
var t = HQ(), e = Ui();
function r(n, i, a, s, o) {
return n === i ? !0 : n == null || i == null || !e(n) && !e(i) ? n !== n && i !== i : t(n, i, a, s, r, o);
}
return hp = r, hp;
}
var fp, $x;
function GQ() {
if ($x)
return fp;
$x = 1;
var t = o0(), e = KA(), r = 1, n = 2;
function i(a, s, o, l) {
var u = o.length, h = u, d = !l;
if (a == null)
return !h;
for (a = Object(a); u--; ) {
var f = o[u];
if (d && f[2] ? f[1] !== a[f[0]] : !(f[0] in a))
return !1;
}
for (; ++u < h; ) {
f = o[u];
var p = f[0], m = a[p], _ = f[1];
if (d && f[2]) {
if (m === void 0 && !(p in a))
return !1;
} else {
var y = new t();
if (l)
var b = l(m, _, p, a, s, y);
if (!(b === void 0 ? e(_, m, r | n, l, y) : b))
return !1;
}
}
return !0;
}
return fp = i, fp;
}
var dp, Xx;
function ZA() {
if (Xx)
return dp;
Xx = 1;
var t = zn;
function e(r) {
return r === r && !t(r);
}
return dp = e, dp;
}
var pp, Kx;
function jQ() {
if (Kx)
return pp;
Kx = 1;
var t = ZA(), e = as();
function r(n) {
for (var i = e(n), a = i.length; a--; ) {
var s = i[a], o = n[s];
i[a] = [s, o, t(o)];
}
return i;
}
return pp = r, pp;
}
var gp, Zx;
function QA() {
if (Zx)
return gp;
Zx = 1;
function t(e, r) {
return function(n) {
return n == null ? !1 : n[e] === r && (r !== void 0 || e in Object(n));
};
}
return gp = t, gp;
}
var yp, Qx;
function $Q() {
if (Qx)
return yp;
Qx = 1;
var t = GQ(), e = jQ(), r = QA();
function n(i) {
var a = e(i);
return a.length == 1 && a[0][2] ? r(a[0][0], a[0][1]) : function(s) {
return s === i || t(s, i, a);
};
}
return yp = n, yp;
}
var mp, Jx;
function gl() {
if (Jx)
return mp;
Jx = 1;
var t = Ks, e = Ui(), r = "[object Symbol]";
function n(i) {
return typeof i == "symbol" || e(i) && t(i) == r;
}
return mp = n, mp;
}
var bp, t8;
function O4() {
if (t8)
return bp;
t8 = 1;
var t = br(), e = gl(), r = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, n = /^\w*$/;
function i(a, s) {
if (t(a))
return !1;
var o = typeof a;
return o == "number" || o == "symbol" || o == "boolean" || a == null || e(a) ? !0 : n.test(a) || !r.test(a) || s != null && a in Object(s);
}
return bp = i, bp;
}
var _p, e8;
function XQ() {
if (e8)
return _p;
e8 = 1;
var t = Z1, e = 500;
function r(n) {
var i = t(n, function(s) {
return a.size === e && a.clear(), s;
}), a = i.cache;
return i;
}
return _p = r, _p;
}
var vp, r8;
function KQ() {
if (r8)
return vp;
r8 = 1;
var t = XQ(), e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, r = /\\(\\)?/g, n = t(function(i) {
var a = [];
return i.charCodeAt(0) === 46 && a.push(""), i.replace(e, function(s, o, l, u) {
a.push(l ? u.replace(r, "$1") : o || s);
}), a;
});
return vp = n, vp;
}
var xp, n8;
function g0() {
if (n8)
return xp;
n8 = 1;
function t(e, r) {
for (var n = -1, i = e == null ? 0 : e.length, a = Array(i); ++n < i; )
a[n] = r(e[n], n, e);
return a;
}
return xp = t, xp;
}
var kp, i8;
function ZQ() {
if (i8)
return kp;
i8 = 1;
var t = sl, e = g0(), r = br(), n = gl(), i = 1 / 0, a = t ? t.prototype : void 0, s = a ? a.toString : void 0;
function o(l) {
if (typeof l == "string")
return l;
if (r(l))
return e(l, o) + "";
if (n(l))
return s ? s.call(l) : "";
var u = l + "";
return u == "0" && 1 / l == -i ? "-0" : u;
}
return kp = o, kp;
}
var wp, a8;
function JA() {
if (a8)
return wp;
a8 = 1;
var t = ZQ();
function e(r) {
return r == null ? "" : t(r);
}
return wp = e, wp;
}
var Tp, s8;
function y0() {
if (s8)
return Tp;
s8 = 1;
var t = br(), e = O4(), r = KQ(), n = JA();
function i(a, s) {
return t(a) ? a : e(a, s) ? [a] : r(n(a));
}
return Tp = i, Tp;
}
var Ep, o8;
function cu() {
if (o8)
return Ep;
o8 = 1;
var t = gl(), e = 1 / 0;
function r(n) {
if (typeof n == "string" || t(n))
return n;
var i = n + "";
return i == "0" && 1 / n == -e ? "-0" : i;
}
return Ep = r, Ep;
}
var Cp, l8;
function m0() {
if (l8)
return Cp;
l8 = 1;
var t = y0(), e = cu();
function r(n, i) {
i = t(i, n);
for (var a = 0, s = i.length; n != null && a < s; )
n = n[e(i[a++])];
return a && a == s ? n : void 0;
}
return Cp = r, Cp;
}
var Sp, c8;
function QQ() {
if (c8)
return Sp;
c8 = 1;
var t = m0();
function e(r, n, i) {
var a = r == null ? void 0 : t(r, n);
return a === void 0 ? i : a;
}
return Sp = e, Sp;
}
var Ap, u8;
function JQ() {
if (u8)
return Ap;
u8 = 1;
function t(e, r) {
return e != null && r in Object(e);
}
return Ap = t, Ap;
}
var Mp, h8;
function tM() {
if (h8)
return Mp;
h8 = 1;
var t = y0(), e = ou(), r = br(), n = u0(), i = E4(), a = cu();
function s(o, l, u) {
l = t(l, o);
for (var h = -1, d = l.length, f = !1; ++h < d; ) {
var p = a(l[h]);
if (!(f = o != null && u(o, p)))
break;
o = o[p];
}
return f || ++h != d ? f : (d = o == null ? 0 : o.length, !!d && i(d) && n(p, d) && (r(o) || e(o)));
}
return Mp = s, Mp;
}
var Lp, f8;
function eM() {
if (f8)
return Lp;
f8 = 1;
var t = JQ(), e = tM();
function r(n, i) {
return n != null && e(n, i, t);
}
return Lp = r, Lp;
}
var Rp, d8;
function tJ() {
if (d8)
return Rp;
d8 = 1;
var t = KA(), e = QQ(), r = eM(), n = O4(), i = ZA(), a = QA(), s = cu(), o = 1, l = 2;
function u(h, d) {
return n(h) && i(d) ? a(s(h), d) : function(f) {
var p = e(f, h);
return p === void 0 && p === d ? r(f, h) : t(d, p, o | l);
};
}
return Rp = u, Rp;
}
var Ip, p8;
function rM() {
if (p8)
return Ip;
p8 = 1;
function t(e) {
return function(r) {
return r == null ? void 0 : r[e];
};
}
return Ip = t, Ip;
}
var Np, g8;
function eJ() {
if (g8)
return Np;
g8 = 1;
var t = m0();
function e(r) {
return function(n) {
return t(n, r);
};
}
return Np = e, Np;
}
var Bp, y8;
function rJ() {
if (y8)
return Bp;
y8 = 1;
var t = rM(), e = eJ(), r = O4(), n = cu();
function i(a) {
return r(a) ? t(n(a)) : e(a);
}
return Bp = i, Bp;
}
var Dp, m8;
function va() {
if (m8)
return Dp;
m8 = 1;
var t = $Q(), e = tJ(), r = Js(), n = br(), i = rJ();
function a(s) {
return typeof s == "function" ? s : s == null ? r : typeof s == "object" ? n(s) ? e(s[0], s[1]) : t(s) : i(s);
}
return Dp = a, Dp;
}
var Op, b8;
function nM() {
if (b8)
return Op;
b8 = 1;
var t = BA(), e = PQ(), r = va(), n = br();
function i(a, s) {
var o = n(a) ? t : e;
return o(a, r(s, 3));
}
return Op = i, Op;
}
var Fp, _8;
function nJ() {
if (_8)
return Fp;
_8 = 1;
var t = Object.prototype, e = t.hasOwnProperty;
function r(n, i) {
return n != null && e.call(n, i);
}
return Fp = r, Fp;
}
var Pp, v8;
function F4() {
if (v8)
return Pp;
v8 = 1;
var t = nJ(), e = tM();
function r(n, i) {
return n != null && e(n, i, t);
}
return Pp = r, Pp;
}
var qp, x8;
function iJ() {
if (x8)
return qp;
x8 = 1;
var t = S4(), e = pl(), r = ou(), n = br(), i = _a(), a = dl(), s = f0(), o = lu(), l = "[object Map]", u = "[object Set]", h = Object.prototype, d = h.hasOwnProperty;
function f(p) {
if (p == null)
return !0;
if (i(p) && (n(p) || typeof p == "string" || typeof p.splice == "function" || a(p) || o(p) || r(p)))
return !p.length;
var m = e(p);
if (m == l || m == u)
return !p.size;
if (s(p))
return !t(p).length;
for (var _ in p)
if (d.call(p, _))
return !1;
return !0;
}
return qp = f, qp;
}
var Vp, k8;
function iM() {
if (k8)
return Vp;
k8 = 1;
function t(e) {
return e === void 0;
}
return Vp = t, Vp;
}
var zp, w8;
function aM() {
if (w8)
return zp;
w8 = 1;
var t = p0(), e = _a();
function r(n, i) {
var a = -1, s = e(n) ? Array(n.length) : [];
return t(n, function(o, l, u) {
s[++a] = i(o, l, u);
}), s;
}
return zp = r, zp;
}
var Yp, T8;
function sM() {
if (T8)
return Yp;
T8 = 1;
var t = g0(), e = va(), r = aM(), n = br();
function i(a, s) {
var o = n(a) ? t : r;
return o(a, e(s, 3));
}
return Yp = i, Yp;
}
var Up, E8;
function aJ() {
if (E8)
return Up;
E8 = 1;
function t(e, r, n, i) {
var a = -1, s = e == null ? 0 : e.length;
for (i && s && (n = e[++a]); ++a < s; )
n = r(n, e[a], a, e);
return n;
}
return Up = t, Up;
}
var Wp, C8;
function sJ() {
if (C8)
return Wp;
C8 = 1;
function t(e, r, n, i, a) {
return a(e, function(s, o, l) {
n = i ? (i = !1, s) : r(n, s, o, l);
}), n;
}
return Wp = t, Wp;
}
var Hp, S8;
function oM() {
if (S8)
return Hp;
S8 = 1;
var t = aJ(), e = p0(), r = va(), n = sJ(), i = br();
function a(s, o, l) {
var u = i(s) ? t : n, h = arguments.length < 3;
return u(s, r(o, 4), l, h, e);
}
return Hp = a, Hp;
}
var Gp, A8;
function oJ() {
if (A8)
return Gp;
A8 = 1;
var t = Ks, e = br(), r = Ui(), n = "[object String]";
function i(a) {
return typeof a == "string" || !e(a) && r(a) && t(a) == n;
}
return Gp = i, Gp;
}
var jp, M8;
function lJ() {
if (M8)
return jp;
M8 = 1;
var t = rM(), e = t("length");
return jp = e, jp;
}
var $p, L8;
function cJ() {
if (L8)
return $p;
L8 = 1;
var t = "\\ud800-\\udfff", e = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", i = e + r + n, a = "\\ufe0e\\ufe0f", s = "\\u200d", o = RegExp("[" + s + t + i + a + "]");
function l(u) {
return o.test(u);
}
return $p = l, $p;
}
var Xp, R8;
function uJ() {
if (R8)
return Xp;
R8 = 1;
var t = "\\ud800-\\udfff", e = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", i = e + r + n, a = "\\ufe0e\\ufe0f", s = "[" + t + "]", o = "[" + i + "]", l = "\\ud83c[\\udffb-\\udfff]", u = "(?:" + o + "|" + l + ")", h = "[^" + t + "]", d = "(?:\\ud83c[\\udde6-\\uddff]){2}", f = "[\\ud800-\\udbff][\\udc00-\\udfff]", p = "\\u200d", m = u + "?", _ = "[" + a + "]?", y = "(?:" + p + "(?:" + [h, d, f].join("|") + ")" + _ + m + ")*", b = _ + m + y, x = "(?:" + [h + o + "?", o, d, f, s].join("|") + ")", k = RegExp(l + "(?=" + l + ")|" + x + b, "g");
function T(C) {
for (var M = k.lastIndex = 0; k.test(C); )
++M;
return M;
}
return Xp = T, Xp;
}
var Kp, I8;
function hJ() {
if (I8)
return Kp;
I8 = 1;
var t = lJ(), e = cJ(), r = uJ();
function n(i) {
return e(i) ? r(i) : t(i);
}
return Kp = n, Kp;
}
var Zp, N8;
function fJ() {
if (N8)
return Zp;
N8 = 1;
var t = S4(), e = pl(), r = _a(), n = oJ(), i = hJ(), a = "[object Map]", s = "[object Set]";
function o(l) {
if (l == null)
return 0;
if (r(l))
return n(l) ? i(l) : l.length;
var u = e(l);
return u == a || u == s ? l.size : t(l).length;
}
return Zp = o, Zp;
}
var Qp, B8;
function dJ() {
if (B8)
return Qp;
B8 = 1;
var t = T4(), e = YA(), r = N4(), n = va(), i = d0(), a = br(), s = dl(), o = ol, l = zn, u = lu();
function h(d, f, p) {
var m = a(d), _ = m || s(d) || u(d);
if (f = n(f, 4), p == null) {
var y = d && d.constructor;
_ ? p = m ? new y() : [] : l(d) ? p = o(y) ? e(i(d)) : {} : p = {};
}
return (_ ? t : r)(d, function(b, x, k) {
return f(p, b, x, k);
}), p;
}
return Qp = h, Qp;
}
var Jp, D8;
function pJ() {
if (D8)
return Jp;
D8 = 1;
var t = sl, e = ou(), r = br(), n = t ? t.isConcatSpreadable : void 0;
function i(a) {
return r(a) || e(a) || !!(n && a && a[n]);
}
return Jp = i, Jp;
}
var tg, O8;
function P4() {
if (O8)
return tg;
O8 = 1;
var t = M4(), e = pJ();
function r(n, i, a, s, o) {
var l = -1, u = n.length;
for (a || (a = e), o || (o = []); ++l < u; ) {
var h = n[l];
i > 0 && a(h) ? i > 1 ? r(h, i - 1, a, s, o) : t(o, h) : s || (o[o.length] = h);
}
return o;
}
return tg = r, tg;
}
var eg, F8;
function gJ() {
if (F8)
return eg;
F8 = 1;
function t(e, r, n) {
switch (n.length) {
case 0:
return e.call(r);
case 1:
return e.call(r, n[0]);
case 2:
return e.call(r, n[0], n[1]);
case 3:
return e.call(r, n[0], n[1], n[2]);
}
return e.apply(r, n);
}
return eg = t, eg;
}
var rg, P8;
function lM() {
if (P8)
return rg;
P8 = 1;
var t = gJ(), e = Math.max;
function r(n, i, a) {
return i = e(i === void 0 ? n.length - 1 : i, 0), function() {
for (var s = arguments, o = -1, l = e(s.length - i, 0), u = Array(l); ++o < l; )
u[o] = s[i + o];
o = -1;
for (var h = Array(i + 1); ++o < i; )
h[o] = s[o];
return h[i] = a(u), t(n, this, h);
};
}
return rg = r, rg;
}
var ng, q8;
function yJ() {
if (q8)
return ng;
q8 = 1;
var t = R4(), e = MA(), r = Js(), n = e ? function(i, a) {
return e(i, "toString", {
configurable: !0,
enumerable: !1,
value: t(a),
writable: !0
});
} : r;
return ng = n, ng;
}
var ig, V8;
function mJ() {
if (V8)
return ig;
V8 = 1;
var t = 800, e = 16, r = Date.now;
function n(i) {
var a = 0, s = 0;
return function() {
var o = r(), l = e - (o - s);
if (s = o, l > 0) {
if (++a >= t)
return arguments[0];
} else
a = 0;
return i.apply(void 0, arguments);
};
}
return ig = n, ig;
}
var ag, z8;
function cM() {
if (z8)
return ag;
z8 = 1;
var t = yJ(), e = mJ(), r = e(t);
return ag = r, ag;
}
var sg, Y8;
function b0() {
if (Y8)
return sg;
Y8 = 1;
var t = Js(), e = lM(), r = cM();
function n(i, a) {
return r(e(i, a, t), i + "");
}
return sg = n, sg;
}
var og, U8;
function uM() {
if (U8)
return og;
U8 = 1;
function t(e, r, n, i) {
for (var a = e.length, s = n + (i ? 1 : -1); i ? s-- : ++s < a; )
if (r(e[s], s, e))
return s;
return -1;
}
return og = t, og;
}
var lg, W8;
function bJ() {
if (W8)
return lg;
W8 = 1;
function t(e) {
return e !== e;
}
return lg = t, lg;
}
var cg, H8;
function _J() {
if (H8)
return cg;
H8 = 1;
function t(e, r, n) {
for (var i = n - 1, a = e.length; ++i < a; )
if (e[i] === r)
return i;
return -1;
}
return cg = t, cg;
}
var ug, G8;
function vJ() {
if (G8)
return ug;
G8 = 1;
var t = uM(), e = bJ(), r = _J();
function n(i, a, s) {
return a === a ? r(i, a, s) : t(i, e, s);
}
return ug = n, ug;
}
var hg, j8;
function xJ() {
if (j8)
return hg;
j8 = 1;
var t = vJ();
function e(r, n) {
var i = r == null ? 0 : r.length;
return !!i && t(r, n, 0) > -1;
}
return hg = e, hg;
}
var fg, $8;
function kJ() {
if ($8)
return fg;
$8 = 1;
function t(e, r, n) {
for (var i = -1, a = e == null ? 0 : e.length; ++i < a; )
if (n(r, e[i]))
return !0;
return !1;
}
return fg = t, fg;
}
var dg, X8;
function wJ() {
if (X8)
return dg;
X8 = 1;
function t() {
}
return dg = t, dg;
}
var pg, K8;
function TJ() {
if (K8)
return pg;
K8 = 1;
var t = qA(), e = wJ(), r = D4(), n = 1 / 0, i = t && 1 / r(new t([, -0]))[1] == n ? function(a) {
return new t(a);
} : e;
return pg = i, pg;
}
var gg, Z8;
function EJ() {
if (Z8)
return gg;
Z8 = 1;
var t = jA(), e = xJ(), r = kJ(), n = $A(), i = TJ(), a = D4(), s = 200;
function o(l, u, h) {
var d = -1, f = e, p = l.length, m = !0, _ = [], y = _;
if (h)
m = !1, f = r;
else if (p >= s) {
var b = u ? null : i(l);
if (b)
return a(b);
m = !1, f = n, y = new t();
} else
y = u ? [] : _;
t:
for (; ++d < p; ) {
var x = l[d], k = u ? u(x) : x;
if (x = h || x !== 0 ? x : 0, m && k === k) {
for (var T = y.length; T--; )
if (y[T] === k)
continue t;
u && y.push(k), _.push(x);
} else
f(y, k, h) || (y !== _ && y.push(k), _.push(x));
}
return _;
}
return gg = o, gg;
}
var yg, Q8;
function hM() {
if (Q8)
return yg;
Q8 = 1;
var t = _a(), e = Ui();
function r(n) {
return e(n) && t(n);
}
return yg = r, yg;
}
var mg, J8;
function CJ() {
if (J8)
return mg;
J8 = 1;
var t = P4(), e = b0(), r = EJ(), n = hM(), i = e(function(a) {
return r(t(a, 1, n, !0));
});
return mg = i, mg;
}
var bg, t7;
function SJ() {
if (t7)
return bg;
t7 = 1;
var t = g0();
function e(r, n) {
return t(n, function(i) {
return r[i];
});
}
return bg = e, bg;
}
var _g, e7;
function fM() {
if (e7)
return _g;
e7 = 1;
var t = SJ(), e = as();
function r(n) {
return n == null ? [] : t(n, e(n));
}
return _g = r, _g;
}
var Yf;
if (typeof Za == "function")
try {
Yf = {
clone: DQ(),
constant: R4(),
each: B4(),
filter: nM(),
has: F4(),
isArray: br(),
isEmpty: iJ(),
isFunction: ol,
isUndefined: iM(),
keys: as(),
map: sM(),
reduce: oM(),
size: fJ(),
transform: dJ(),
union: CJ(),
values: fM()
};
} catch {
}
Yf || (Yf = window._);
var Un = Yf, ve = Un, q4 = Le, AJ = "\0", zs = "\0", r7 = "";
function Le(t) {
this._isDirected = ve.has(t, "directed") ? t.directed : !0, this._isMultigraph = ve.has(t, "multigraph") ? t.multigraph : !1, this._isCompound = ve.has(t, "compound") ? t.compound : !1, this._label = void 0, this._defaultNodeLabelFn = ve.constant(void 0), this._defaultEdgeLabelFn = ve.constant(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[zs] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
}
Le.prototype._nodeCount = 0;
Le.prototype._edgeCount = 0;
Le.prototype.isDirected = function() {
return this._isDirected;
};
Le.prototype.isMultigraph = function() {
return this._isMultigraph;
};
Le.prototype.isCompound = function() {
return this._isCompound;
};
Le.prototype.setGraph = function(t) {
return this._label = t, this;
};
Le.prototype.graph = function() {
return this._label;
};
Le.prototype.setDefaultNodeLabel = function(t) {
return ve.isFunction(t) || (t = ve.constant(t)), this._defaultNodeLabelFn = t, this;
};
Le.prototype.nodeCount = function() {
return this._nodeCount;
};
Le.prototype.nodes = function() {
return ve.keys(this._nodes);
};
Le.prototype.sources = function() {
var t = this;
return ve.filter(this.nodes(), function(e) {
return ve.isEmpty(t._in[e]);
});
};
Le.prototype.sinks = function() {
var t = this;
return ve.filter(this.nodes(), function(e) {
return ve.isEmpty(t._out[e]);
});
};
Le.prototype.setNodes = function(t, e) {
var r = arguments, n = this;
return ve.each(t, function(i) {
r.length > 1 ? n.setNode(i, e) : n.setNode(i);
}), this;
};
Le.prototype.setNode = function(t, e) {
return ve.has(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = e), this) : (this._nodes[t] = arguments.length > 1 ? e : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] = zs, this._children[t] = {}, this._children[zs][t] = !0), this._in[t] = {}, this._preds[t] = {}, this._out[t] = {}, this._sucs[t] = {}, ++this._nodeCount, this);
};
Le.prototype.node = function(t) {
return this._nodes[t];
};
Le.prototype.hasNode = function(t) {
return ve.has(this._nodes, t);
};
Le.prototype.removeNode = function(t) {
var e = this;
if (ve.has(this._nodes, t)) {
var r = function(n) {
e.removeEdge(e._edgeObjs[n]);
};
delete this._nodes[t], this._isCompound && (this._removeFromParentsChildList(t), delete this._parent[t], ve.each(this.children(t), function(n) {
e.setParent(n);
}), delete this._children[t]), ve.each(ve.keys(this._in[t]), r), delete this._in[t], delete this._preds[t], ve.each(ve.keys(this._out[t]), r), delete this._out[t], delete this._sucs[t], --this._nodeCount;
}
return this;
};
Le.prototype.setParent = function(t, e) {
if (!this._isCompound)
throw new Error("Cannot set parent in a non-compound graph");
if (ve.isUndefined(e))
e = zs;
else {
e += "";
for (var r = e; !ve.isUndefined(r); r = this.parent(r))
if (r === t)
throw new Error("Setting " + e + " as parent of " + t + " would create a cycle");
this.setNode(e);
}
return this.setNode(t), this._removeFromParentsChildList(t), this._parent[t] = e, this._children[e][t] = !0, this;
};
Le.prototype._removeFromParentsChildList = function(t) {
delete this._children[this._parent[t]][t];
};
Le.prototype.parent = function(t) {
if (this._isCompound) {
var e = this._parent[t];
if (e !== zs)
return e;
}
};
Le.prototype.children = function(t) {
if (ve.isUndefined(t) && (t = zs), this._isCompound) {
var e = this._children[t];
if (e)
return ve.keys(e);
} else {
if (t === zs)
return this.nodes();
if (this.hasNode(t))
return [];
}
};
Le.prototype.predecessors = function(t) {
var e = this._preds[t];
if (e)
return ve.keys(e);
};
Le.prototype.successors = function(t) {
var e = this._sucs[t];
if (e)
return ve.keys(e);
};
Le.prototype.neighbors = function(t) {
var e = this.predecessors(t);
if (e)
return ve.union(e, this.successors(t));
};
Le.prototype.isLeaf = function(t) {
var e;
return this.isDirected() ? e = this.successors(t) : e = this.neighbors(t), e.length === 0;
};
Le.prototype.filterNodes = function(t) {
var e = new this.constructor({
directed: this._isDirected,
multigraph: this._isMultigraph,
compound: this._isCompound
});
e.setGraph(this.graph());
var r = this;
ve.each(this._nodes, function(a, s) {
t(s) && e.setNode(s, a);
}), ve.each(this._edgeObjs, function(a) {
e.hasNode(a.v) && e.hasNode(a.w) && e.setEdge(a, r.edge(a));
});
var n = {};
function i(a) {
var s = r.parent(a);
return s === void 0 || e.hasNode(s) ? (n[a] = s, s) : s in n ? n[s] : i(s);
}
return this._isCompound && ve.each(e.nodes(), function(a) {
e.setParent(a, i(a));
}), e;
};
Le.prototype.setDefaultEdgeLabel = function(t) {
return ve.isFunction(t) || (t = ve.constant(t)), this._defaultEdgeLabelFn = t, this;
};
Le.prototype.edgeCount = function() {
return this._edgeCount;
};
Le.prototype.edges = function() {
return ve.values(this._edgeObjs);
};
Le.prototype.setPath = function(t, e) {
var r = this, n = arguments;
return ve.reduce(t, function(i, a) {
return n.length > 1 ? r.setEdge(i, a, e) : r.setEdge(i, a), a;
}), this;
};
Le.prototype.setEdge = function() {
var t, e, r, n, i = !1, a = arguments[0];
typeof a == "object" && a !== null && "v" in a ? (t = a.v, e = a.w, r = a.name, arguments.length === 2 && (n = arguments[1], i = !0)) : (t = a, e = arguments[1], r = arguments[3], arguments.length > 2 && (n = arguments[2], i = !0)), t = "" + t, e = "" + e, ve.isUndefined(r) || (r = "" + r);
var s = uu(this._isDirected, t, e, r);
if (ve.has(this._edgeLabels, s))
return i && (this._edgeLabels[s] = n), this;
if (!ve.isUndefined(r) && !this._isMultigraph)
throw new Error("Cannot set a named edge when isMultigraph = false");
this.setNode(t), this.setNode(e), this._edgeLabels[s] = i ? n : this._defaultEdgeLabelFn(t, e, r);
var o = MJ(this._isDirected, t, e, r);
return t = o.v, e = o.w, Object.freeze(o), this._edgeObjs[s] = o, n7(this._preds[e], t), n7(this._sucs[t], e), this._in[e][s] = o, this._out[t][s] = o, this._edgeCount++, this;
};
Le.prototype.edge = function(t, e, r) {
var n = arguments.length === 1 ? V4(this._isDirected, arguments[0]) : uu(this._isDirected, t, e, r);
return this._edgeLabels[n];
};
Le.prototype.hasEdge = function(t, e, r) {
var n = arguments.length === 1 ? V4(this._isDirected, arguments[0]) : uu(this._isDirected, t, e, r);
return ve.has(this._edgeLabels, n);
};
Le.prototype.removeEdge = function(t, e, r) {
var n = arguments.length === 1 ? V4(this._isDirected, arguments[0]) : uu(this._isDirected, t, e, r), i = this._edgeObjs[n];
return i && (t = i.v, e = i.w, delete this._edgeLabels[n], delete this._edgeObjs[n], i7(this._preds[e], t), i7(this._sucs[t], e), delete this._in[e][n], delete this._out[t][n], this._edgeCount--), this;
};
Le.prototype.inEdges = function(t, e) {
var r = this._in[t];
if (r) {
var n = ve.values(r);
return e ? ve.filter(n, function(i) {
return i.v === e;
}) : n;
}
};
Le.prototype.outEdges = function(t, e) {
var r = this._out[t];
if (r) {
var n = ve.values(r);
return e ? ve.filter(n, function(i) {
return i.w === e;
}) : n;
}
};
Le.prototype.nodeEdges = function(t, e) {
var r = this.inEdges(t, e);
if (r)
return r.concat(this.outEdges(t, e));
};
function n7(t, e) {
t[e] ? t[e]++ : t[e] = 1;
}
function i7(t, e) {
--t[e] || delete t[e];
}
function uu(t, e, r, n) {
var i = "" + e, a = "" + r;
if (!t && i > a) {
var s = i;
i = a, a = s;
}
return i + r7 + a + r7 + (ve.isUndefined(n) ? AJ : n);
}
function MJ(t, e, r, n) {
var i = "" + e, a = "" + r;
if (!t && i > a) {
var s = i;
i = a, a = s;
}
var o = { v: i, w: a };
return n && (o.name = n), o;
}
function V4(t, e) {
return uu(t, e.v, e.w, e.name);
}
var LJ = "2.1.8", RJ = {
Graph: q4,
version: LJ
}, Bi = Un, IJ = q4, NJ = {
write: BJ,
read: FJ
};
function BJ(t) {
var e = {
options: {
directed: t.isDirected(),
multigraph: t.isMultigraph(),
compound: t.isCompound()
},
nodes: DJ(t),
edges: OJ(t)
};
return Bi.isUndefined(t.graph()) || (e.value = Bi.clone(t.graph())), e;
}
function DJ(t) {
return Bi.map(t.nodes(), function(e) {
var r = t.node(e), n = t.parent(e), i = { v: e };
return Bi.isUndefined(r) || (i.value = r), Bi.isUndefined(n) || (i.parent = n), i;
});
}
function OJ(t) {
return Bi.map(t.edges(), function(e) {
var r = t.edge(e), n = { v: e.v, w: e.w };
return Bi.isUndefined(e.name) || (n.name = e.name), Bi.isUndefined(r) || (n.value = r), n;
});
}
function FJ(t) {
var e = new IJ(t.options).setGraph(t.value);
return Bi.each(t.nodes, function(r) {
e.setNode(r.v, r.value), r.parent && e.setParent(r.v, r.parent);
}), Bi.each(t.edges, function(r) {
e.setEdge({ v: r.v, w: r.w, name: r.name }, r.value);
}), e;
}
var ih = Un, PJ = qJ;
function qJ(t) {
var e = {}, r = [], n;
function i(a) {
ih.has(e, a) || (e[a] = !0, n.push(a), ih.each(t.successors(a), i), ih.each(t.predecessors(a), i));
}
return ih.each(t.nodes(), function(a) {
n = [], i(a), n.length && r.push(n);
}), r;
}
var dM = Un, pM = Wn;
function Wn() {
this._arr = [], this._keyIndices = {};
}
Wn.prototype.size = function() {
return this._arr.length;
};
Wn.prototype.keys = function() {
return this._arr.map(function(t) {
return t.key;
});
};
Wn.prototype.has = function(t) {
return dM.has(this._keyIndices, t);
};
Wn.prototype.priority = function(t) {
var e = this._keyIndices[t];
if (e !== void 0)
return this._arr[e].priority;
};
Wn.prototype.min = function() {
if (this.size() === 0)
throw new Error("Queue underflow");
return this._arr[0].key;
};
Wn.prototype.add = function(t, e) {
var r = this._keyIndices;
if (t = String(t), !dM.has(r, t)) {
var n = this._arr, i = n.length;
return r[t] = i, n.push({ key: t, priority: e }), this._decrease(i), !0;
}
return !1;
};
Wn.prototype.removeMin = function() {
this._swap(0, this._arr.length - 1);
var t = this._arr.pop();
return delete this._keyIndices[t.key], this._heapify(0), t.key;
};
Wn.prototype.decrease = function(t, e) {
var r = this._keyIndices[t];
if (e > this._arr[r].priority)
throw new Error("New priority is greater than current priority. Key: " + t + " Old: " + this._arr[r].priority + " New: " + e);
this._arr[r].priority = e, this._decrease(r);
};
Wn.prototype._heapify = function(t) {
var e = this._arr, r = 2 * t, n = r + 1, i = t;
r < e.length && (i = e[r].priority < e[i].priority ? r : i, n < e.length && (i = e[n].priority < e[i].priority ? n : i), i !== t && (this._swap(t, i), this._heapify(i)));
};
Wn.prototype._decrease = function(t) {
for (var e = this._arr, r = e[t].priority, n; t !== 0 && (n = t >> 1, !(e[n].priority < r)); )
this._swap(t, n), t = n;
};
Wn.prototype._swap = function(t, e) {
var r = this._arr, n = this._keyIndices, i = r[t], a = r[e];
r[t] = a, r[e] = i, n[a.key] = t, n[i.key] = e;
};
var VJ = Un, zJ = pM, gM = UJ, YJ = VJ.constant(1);
function UJ(t, e, r, n) {
return WJ(
t,
String(e),
r || YJ,
n || function(i) {
return t.outEdges(i);
}
);
}
function WJ(t, e, r, n) {
var i = {}, a = new zJ(), s, o, l = function(u) {
var h = u.v !== s ? u.v : u.w, d = i[h], f = r(u), p = o.distance + f;
if (f < 0)
throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + u + " Weight: " + f);
p < d.distance && (d.distance = p, d.predecessor = s, a.decrease(h, p));
};
for (t.nodes().forEach(function(u) {
var h = u === e ? 0 : Number.POSITIVE_INFINITY;
i[u] = { distance: h }, a.add(u, h);
}); a.size() > 0 && (s = a.removeMin(), o = i[s], o.distance !== Number.POSITIVE_INFINITY); )
n(s).forEach(l);
return i;
}
var HJ = gM, GJ = Un, jJ = $J;
function $J(t, e, r) {
return GJ.transform(t.nodes(), function(n, i) {
n[i] = HJ(t, i, e, r);
}, {});
}
var a7 = Un, yM = XJ;
function XJ(t) {
var e = 0, r = [], n = {}, i = [];
function a(s) {
var o = n[s] = {
onStack: !0,
lowlink: e,
index: e++
};
if (r.push(s), t.successors(s).forEach(function(h) {
a7.has(n, h) ? n[h].onStack && (o.lowlink = Math.min(o.lowlink, n[h].index)) : (a(h), o.lowlink = Math.min(o.lowlink, n[h].lowlink));
}), o.lowlink === o.index) {
var l = [], u;
do
u = r.pop(), n[u].onStack = !1, l.push(u);
while (s !== u);
i.push(l);
}
}
return t.nodes().forEach(function(s) {
a7.has(n, s) || a(s);
}), i;
}
var KJ = Un, ZJ = yM, QJ = JJ;
function JJ(t) {
return KJ.filter(ZJ(t), function(e) {
return e.length > 1 || e.length === 1 && t.hasEdge(e[0], e[0]);
});
}
var ttt = Un, ett = ntt, rtt = ttt.constant(1);
function ntt(t, e, r) {
return itt(
t,
e || rtt,
r || function(n) {
return t.outEdges(n);
}
);
}
function itt(t, e, r) {
var n = {}, i = t.nodes();
return i.forEach(function(a) {
n[a] = {}, n[a][a] = { distance: 0 }, i.forEach(function(s) {
a !== s && (n[a][s] = { distance: Number.POSITIVE_INFINITY });
}), r(a).forEach(function(s) {
var o = s.v === a ? s.w : s.v, l = e(s);
n[a][o] = { distance: l, predecessor: a };
});
}), i.forEach(function(a) {
var s = n[a];
i.forEach(function(o) {
var l = n[o];
i.forEach(function(u) {
var h = l[a], d = s[u], f = l[u], p = h.distance + d.distance;
p < f.distance && (f.distance = p, f.predecessor = d.predecessor);
});
});
}), n;
}
var Il = Un, mM = bM;
bM.CycleException = Uf;
function bM(t) {
var e = {}, r = {}, n = [];
function i(a) {
if (Il.has(r, a))
throw new Uf();
Il.has(e, a) || (r[a] = !0, e[a] = !0, Il.each(t.predecessors(a), i), delete r[a], n.push(a));
}
if (Il.each(t.sinks(), i), Il.size(e) !== t.nodeCount())
throw new Uf();
return n;
}
function Uf() {
}
Uf.prototype = new Error();
var s7 = mM, att = stt;
function stt(t) {
try {
s7(t);
} catch (e) {
if (e instanceof s7.CycleException)
return !1;
throw e;
}
return !0;
}
var Wf = Un, _M = ott;
function ott(t, e, r) {
Wf.isArray(e) || (e = [e]);
var n = (t.isDirected() ? t.successors : t.neighbors).bind(t), i = [], a = {};
return Wf.each(e, function(s) {
if (!t.hasNode(s))
throw new Error("Graph does not have node: " + s);
vM(t, s, r === "post", a, n, i);
}), i;
}
function vM(t, e, r, n, i, a) {
Wf.has(n, e) || (n[e] = !0, r || a.push(e), Wf.each(i(e), function(s) {
vM(t, s, r, n, i, a);
}), r && a.push(e));
}
var ltt = _M, ctt = utt;
function utt(t, e) {
return ltt(t, e, "post");
}
var htt = _M, ftt = dtt;
function dtt(t, e) {
return htt(t, e, "pre");
}
var o7 = Un, ptt = q4, gtt = pM, ytt = mtt;
function mtt(t, e) {
var r = new ptt(), n = {}, i = new gtt(), a;
function s(l) {
var u = l.v === a ? l.w : l.v, h = i.priority(u);
if (h !== void 0) {
var d = e(l);
d < h && (n[u] = a, i.decrease(u, d));
}
}
if (t.nodeCount() === 0)
return r;
o7.each(t.nodes(), function(l) {
i.add(l, Number.POSITIVE_INFINITY), r.setNode(l);
}), i.decrease(t.nodes()[0], 0);
for (var o = !1; i.size() > 0; ) {
if (a = i.removeMin(), o7.has(n, a))
r.setEdge(a, n[a]);
else {
if (o)
throw new Error("Input graph is not connected: " + t);
o = !0;
}
t.nodeEdges(a).forEach(s);
}
return r;
}
var btt = {
components: PJ,
dijkstra: gM,
dijkstraAll: jJ,
findCycles: QJ,
floydWarshall: ett,
isAcyclic: att,
postorder: ctt,
preorder: ftt,
prim: ytt,
tarjan: yM,
topsort: mM
}, l7 = RJ, ur = {
Graph: l7.Graph,
json: NJ,
alg: btt,
version: l7.version
}, vg, c7;
function hi() {
if (c7)
return vg;
c7 = 1;
var t;
if (typeof Za == "function")
try {
t = ur;
} catch {
}
return t || (t = window.graphlib), vg = t, vg;
}
var xg, u7;
function _tt() {
if (u7)
return xg;
u7 = 1;
var t = WA(), e = 1, r = 4;
function n(i) {
return t(i, e | r);
}
return xg = n, xg;
}
var kg, h7;
function _0() {
if (h7)
return kg;
h7 = 1;
var t = cl, e = _a(), r = u0(), n = zn;
function i(a, s, o) {
if (!n(o))
return !1;
var l = typeof s;
return (l == "number" ? e(o) && r(s, o.length) : l == "string" && s in o) ? t(o[s], a) : !1;
}
return kg = i, kg;
}
var wg, f7;
function xM() {
if (f7)
return wg;
f7 = 1;
var t = b0(), e = cl, r = _0(), n = Qs(), i = Object.prototype, a = i.hasOwnProperty, s = t(function(o, l) {
o = Object(o);
var u = -1, h = l.length, d = h > 2 ? l[2] : void 0;
for (d && r(l[0], l[1], d) && (h = 1); ++u < h; )
for (var f = l[u], p = n(f), m = -1, _ = p.length; ++m < _; ) {
var y = p[m], b = o[y];
(b === void 0 || e(b, i[y]) && !a.call(o, y)) && (o[y] = f[y]);
}
return o;
});
return wg = s, wg;
}
var Tg, d7;
function vtt() {
if (d7)
return Tg;
d7 = 1;
var t = va(), e = _a(), r = as();
function n(i) {
return function(a, s, o) {
var l = Object(a);
if (!e(a)) {
var u = t(s, 3);
a = r(a), s = function(d) {
return u(l[d], d, l);
};
}
var h = i(a, s, o);
return h > -1 ? l[u ? a[h] : h] : void 0;
};
}
return Tg = n, Tg;
}
var Eg, p7;
function xtt() {
if (p7)
return Eg;
p7 = 1;
var t = /\s/;
function e(r) {
for (var n = r.length; n-- && t.test(r.charAt(n)); )
;
return n;
}
return Eg = e, Eg;
}
var Cg, g7;
function ktt() {
if (g7)
return Cg;
g7 = 1;
var t = xtt(), e = /^\s+/;
function r(n) {
return n && n.slice(0, t(n) + 1).replace(e, "");
}
return Cg = r, Cg;
}
var Sg, y7;
function wtt() {
if (y7)
return Sg;
y7 = 1;
var t = ktt(), e = zn, r = gl(), n = 0 / 0, i = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, s = /^0o[0-7]+$/i, o = parseInt;
function l(u) {
if (typeof u == "number")
return u;
if (r(u))
return n;
if (e(u)) {
var h = typeof u.valueOf == "function" ? u.valueOf() : u;
u = e(h) ? h + "" : h;
}
if (typeof u != "string")
return u === 0 ? u : +u;
u = t(u);
var d = a.test(u);
return d || s.test(u) ? o(u.slice(2), d ? 2 : 8) : i.test(u) ? n : +u;
}
return Sg = l, Sg;
}
var Ag, m7;
function kM() {
if (m7)
return Ag;
m7 = 1;
var t = wtt(), e = 1 / 0, r = 17976931348623157e292;
function n(i) {
if (!i)
return i === 0 ? i : 0;
if (i = t(i), i === e || i === -e) {
var a = i < 0 ? -1 : 1;
return a * r;
}
return i === i ? i : 0;
}
return Ag = n, Ag;
}
var Mg, b7;
function Ttt() {
if (b7)
return Mg;
b7 = 1;
var t = kM();
function e(r) {
var n = t(r), i = n % 1;
return n === n ? i ? n - i : n : 0;
}
return Mg = e, Mg;
}
var Lg, _7;
function Ett() {
if (_7)
return Lg;
_7 = 1;
var t = uM(), e = va(), r = Ttt(), n = Math.max;
function i(a, s, o) {
var l = a == null ? 0 : a.length;
if (!l)
return -1;
var u = o == null ? 0 : r(o);
return u < 0 && (u = n(l + u, 0)), t(a, e(s, 3), u);
}
return Lg = i, Lg;
}
var Rg, v7;
function Ctt() {
if (v7)
return Rg;
v7 = 1;
var t = vtt(), e = Ett(), r = t(e);
return Rg = r, Rg;
}
var Ig, x7;
function wM() {
if (x7)
return Ig;
x7 = 1;
var t = P4();
function e(r) {
var n = r == null ? 0 : r.length;
return n ? t(r, 1) : [];
}
return Ig = e, Ig;
}
var Ng, k7;
function Stt() {
if (k7)
return Ng;
k7 = 1;
var t = I4(), e = HA(), r = Qs();
function n(i, a) {
return i == null ? i : t(i, e(a), r);
}
return Ng = n, Ng;
}
var Bg, w7;
function Att() {
if (w7)
return Bg;
w7 = 1;
function t(e) {
var r = e == null ? 0 : e.length;
return r ? e[r - 1] : void 0;
}
return Bg = t, Bg;
}
var Dg, T7;
function Mtt() {
if (T7)
return Dg;
T7 = 1;
var t = l0(), e = N4(), r = va();
function n(i, a) {
var s = {};
return a = r(a, 3), e(i, function(o, l, u) {
t(s, l, a(o, l, u));
}), s;
}
return Dg = n, Dg;
}
var Og, E7;
function z4() {
if (E7)
return Og;
E7 = 1;
var t = gl();
function e(r, n, i) {
for (var a = -1, s = r.length; ++a < s; ) {
var o = r[a], l = n(o);
if (l != null && (u === void 0 ? l === l && !t(l) : i(l, u)))
var u = l, h = o;
}
return h;
}
return Og = e, Og;
}
var Fg, C7;
function Ltt() {
if (C7)
return Fg;
C7 = 1;
function t(e, r) {
return e > r;
}
return Fg = t, Fg;
}
var Pg, S7;
function Rtt() {
if (S7)
return Pg;
S7 = 1;
var t = z4(), e = Ltt(), r = Js();
function n(i) {
return i && i.length ? t(i, r, e) : void 0;
}
return Pg = n, Pg;
}
var qg, A7;
function TM() {
if (A7)
return qg;
A7 = 1;
var t = l0(), e = cl;
function r(n, i, a) {
(a !== void 0 && !e(n[i], a) || a === void 0 && !(i in n)) && t(n, i, a);
}
return qg = r, qg;
}
var Vg, M7;
function EM() {
if (M7)
return Vg;
M7 = 1;
var t = Ks, e = d0(), r = Ui(), n = "[object Object]", i = Function.prototype, a = Object.prototype, s = i.toString, o = a.hasOwnProperty, l = s.call(Object);
function u(h) {
if (!r(h) || t(h) != n)
return !1;
var d = e(h);
if (d === null)
return !0;
var f = o.call(d, "constructor") && d.constructor;
return typeof f == "function" && f instanceof f && s.call(f) == l;
}
return Vg = u, Vg;
}
var zg, L7;
function CM() {
if (L7)
return zg;
L7 = 1;
function t(e, r) {
if (!(r === "constructor" && typeof e[r] == "function") && r != "__proto__")
return e[r];
}
return zg = t, zg;
}
var Yg, R7;
function Itt() {
if (R7)
return Yg;
R7 = 1;
var t = su(), e = Qs();
function r(n) {
return t(n, e(n));
}
return Yg = r, Yg;
}
var Ug, I7;
function Ntt() {
if (I7)
return Ug;
I7 = 1;
var t = TM(), e = IA(), r = zA(), n = NA(), i = UA(), a = ou(), s = br(), o = hM(), l = dl(), u = ol, h = zn, d = EM(), f = lu(), p = CM(), m = Itt();
function _(y, b, x, k, T, C, M) {
var S = p(y, x), R = p(b, x), A = M.get(R);
if (A) {
t(y, x, A);
return;
}
var L = C ? C(S, R, x + "", y, b, M) : void 0, v = L === void 0;
if (v) {
var B = s(R), w = !B && l(R), D = !B && !w && f(R);
L = R, B || w || D ? s(S) ? L = S : o(S) ? L = n(S) : w ? (v = !1, L = e(R, !0)) : D ? (v = !1, L = r(R, !0)) : L = [] : d(R) || a(R) ? (L = S, a(S) ? L = m(S) : (!h(S) || u(S)) && (L = i(R))) : v = !1;
}
v && (M.set(R, L), T(L, R, k, C, M), M.delete(R)), t(y, x, L);
}
return Ug = _, Ug;
}
var Wg, N7;
function Btt() {
if (N7)
return Wg;
N7 = 1;
var t = o0(), e = TM(), r = I4(), n = Ntt(), i = zn, a = Qs(), s = CM();
function o(l, u, h, d, f) {
l !== u && r(u, function(p, m) {
if (f || (f = new t()), i(p))
n(l, u, m, h, o, d, f);
else {
var _ = d ? d(s(l, m), p, m + "", l, u, f) : void 0;
_ === void 0 && (_ = p), e(l, m, _);
}
}, a);
}
return Wg = o, Wg;
}
var Hg, B7;
function Dtt() {
if (B7)
return Hg;
B7 = 1;
var t = b0(), e = _0();
function r(n) {
return t(function(i, a) {
var s = -1, o = a.length, l = o > 1 ? a[o - 1] : void 0, u = o > 2 ? a[2] : void 0;
for (l = n.length > 3 && typeof l == "function" ? (o--, l) : void 0, u && e(a[0], a[1], u) && (l = o < 3 ? void 0 : l, o = 1), i = Object(i); ++s < o; ) {
var h = a[s];
h && n(i, h, s, l);
}
return i;
});
}
return Hg = r, Hg;
}
var Gg, D7;
function Ott() {
if (D7)
return Gg;
D7 = 1;
var t = Btt(), e = Dtt(), r = e(function(n, i, a) {
t(n, i, a);
});
return Gg = r, Gg;
}
var jg, O7;
function SM() {
if (O7)
return jg;
O7 = 1;
function t(e, r) {
return e < r;
}
return jg = t, jg;
}
var $g, F7;
function Ftt() {
if (F7)
return $g;
F7 = 1;
var t = z4(), e = SM(), r = Js();
function n(i) {
return i && i.length ? t(i, r, e) : void 0;
}
return $g = n, $g;
}
var Xg, P7;
function Ptt() {
if (P7)
return Xg;
P7 = 1;
var t = z4(), e = va(), r = SM();
function n(i, a) {
return i && i.length ? t(i, e(a, 2), r) : void 0;
}
return Xg = n, Xg;
}
var Kg, q7;
function qtt() {
if (q7)
return Kg;
q7 = 1;
var t = di, e = function() {
return t.Date.now();
};
return Kg = e, Kg;
}
var Zg, V7;
function Vtt() {
if (V7)
return Zg;
V7 = 1;
var t = c0(), e = y0(), r = u0(), n = zn, i = cu();
function a(s, o, l, u) {
if (!n(s))
return s;
o = e(o, s);
for (var h = -1, d = o.length, f = d - 1, p = s; p != null && ++h < d; ) {
var m = i(o[h]), _ = l;
if (m === "__proto__" || m === "constructor" || m === "prototype")
return s;
if (h != f) {
var y = p[m];
_ = u ? u(y, m, p) : void 0, _ === void 0 && (_ = n(y) ? y : r(o[h + 1]) ? [] : {});
}
t(p, m, _), p = p[m];
}
return s;
}
return Zg = a, Zg;
}
var Qg, z7;
function ztt() {
if (z7)
return Qg;
z7 = 1;
var t = m0(), e = Vtt(), r = y0();
function n(i, a, s) {
for (var o = -1, l = a.length, u = {}; ++o < l; ) {
var h = a[o], d = t(i, h);
s(d, h) && e(u, r(h, i), d);
}
return u;
}
return Qg = n, Qg;
}
var Jg, Y7;
function Ytt() {
if (Y7)
return Jg;
Y7 = 1;
var t = ztt(), e = eM();
function r(n, i) {
return t(n, i, function(a, s) {
return e(n, s);
});
}
return Jg = r, Jg;
}
var ty, U7;
function Utt() {
if (U7)
return ty;
U7 = 1;
var t = wM(), e = lM(), r = cM();
function n(i) {
return r(e(i, void 0, t), i + "");
}
return ty = n, ty;
}
var ey, W7;
function AM() {
if (W7)
return ey;
W7 = 1;
var t = Ytt(), e = Utt(), r = e(function(n, i) {
return n == null ? {} : t(n, i);
});
return ey = r, ey;
}
var ry, H7;
function Wtt() {
if (H7)
return ry;
H7 = 1;
var t = Math.ceil, e = Math.max;
function r(n, i, a, s) {
for (var o = -1, l = e(t((i - n) / (a || 1)), 0), u = Array(l); l--; )
u[s ? l : ++o] = n, n += a;
return u;
}
return ry = r, ry;
}
var ny, G7;
function Htt() {
if (G7)
return ny;
G7 = 1;
var t = Wtt(), e = _0(), r = kM();
function n(i) {
return function(a, s, o) {
return o && typeof o != "number" && e(a, s, o) && (s = o = void 0), a = r(a), s === void 0 ? (s = a, a = 0) : s = r(s), o = o === void 0 ? a < s ? 1 : -1 : r(o), t(a, s, o, i);
};
}
return ny = n, ny;
}
var iy, j7;
function MM() {
if (j7)
return iy;
j7 = 1;
var t = Htt(), e = t();
return iy = e, iy;
}
var ay, $7;
function Gtt() {
if ($7)
return ay;
$7 = 1;
function t(e, r) {
var n = e.length;
for (e.sort(r); n--; )
e[n] = e[n].value;
return e;
}
return ay = t, ay;
}
var sy, X7;
function jtt() {
if (X7)
return sy;
X7 = 1;
var t = gl();
function e(r, n) {
if (r !== n) {
var i = r !== void 0, a = r === null, s = r === r, o = t(r), l = n !== void 0, u = n === null, h = n === n, d = t(n);
if (!u && !d && !o && r > n || o && l && h && !u && !d || a && l && h || !i && h || !s)
return 1;
if (!a && !o && !d && r < n || d && i && s && !a && !o || u && i && s || !l && s || !h)
return -1;
}
return 0;
}
return sy = e, sy;
}
var oy, K7;
function $tt() {
if (K7)
return oy;
K7 = 1;
var t = jtt();
function e(r, n, i) {
for (var a = -1, s = r.criteria, o = n.criteria, l = s.length, u = i.length; ++a < l; ) {
var h = t(s[a], o[a]);
if (h) {
if (a >= u)
return h;
var d = i[a];
return h * (d == "desc" ? -1 : 1);
}
}
return r.index - n.index;
}
return oy = e, oy;
}
var ly, Z7;
function Xtt() {
if (Z7)
return ly;
Z7 = 1;
var t = g0(), e = m0(), r = va(), n = aM(), i = Gtt(), a = h0(), s = $tt(), o = Js(), l = br();
function u(h, d, f) {
d.length ? d = t(d, function(_) {
return l(_) ? function(y) {
return e(y, _.length === 1 ? _[0] : _);
} : _;
}) : d = [o];
var p = -1;
d = t(d, a(r));
var m = n(h, function(_, y, b) {
var x = t(d, function(k) {
return k(_);
});
return { criteria: x, index: ++p, value: _ };
});
return i(m, function(_, y) {
return s(_, y, f);
});
}
return ly = u, ly;
}
var cy, Q7;
function Ktt() {
if (Q7)
return cy;
Q7 = 1;
var t = P4(), e = Xtt(), r = b0(), n = _0(), i = r(function(a, s) {
if (a == null)
return [];
var o = s.length;
return o > 1 && n(a, s[0], s[1]) ? s = [] : o > 2 && n(s[0], s[1], s[2]) && (s = [s[0]]), e(a, t(s, 1), []);
});
return cy = i, cy;
}
var uy, J7;
function LM() {
if (J7)
return uy;
J7 = 1;
var t = JA(), e = 0;
function r(n) {
var i = ++e;
return t(n) + i;
}
return uy = r, uy;
}
var hy, tk;
function Ztt() {
if (tk)
return hy;
tk = 1;
function t(e, r, n) {
for (var i = -1, a = e.length, s = r.length, o = {}; ++i < a; ) {
var l = i < s ? r[i] : void 0;
n(o, e[i], l);
}
return o;
}
return hy = t, hy;
}
var fy, ek;
function Qtt() {
if (ek)
return fy;
ek = 1;
var t = c0(), e = Ztt();
function r(n, i) {
return e(n || [], i || [], t);
}
return fy = r, fy;
}
var dy, rk;
function Ke() {
if (rk)
return dy;
rk = 1;
var t;
if (typeof Za == "function")
try {
t = {
cloneDeep: _tt(),
constant: R4(),
defaults: xM(),
each: B4(),
filter: nM(),
find: Ctt(),
flatten: wM(),
forEach: GA(),
forIn: Stt(),
has: F4(),
isUndefined: iM(),
last: Att(),
map: sM(),
mapValues: Mtt(),
max: Rtt(),
merge: Ott(),
min: Ftt(),
minBy: Ptt(),
now: qtt(),
pick: AM(),
range: MM(),
reduce: oM(),
sortBy: Ktt(),
uniqueId: LM(),
values: fM(),
zipObject: Qtt()
};
} catch {
}
return t || (t = window._), dy = t, dy;
}
var py, nk;
function Jtt() {
if (nk)
return py;
nk = 1, py = t;
function t() {
var n = {};
n._next = n._prev = n, this._sentinel = n;
}
t.prototype.dequeue = function() {
var n = this._sentinel, i = n._prev;
if (i !== n)
return e(i), i;
}, t.prototype.enqueue = function(n) {
var i = this._sentinel;
n._prev && n._next && e(n), n._next = i._next, i._next._prev = n, i._next = n, n._prev = i;
}, t.prototype.toString = function() {
for (var n = [], i = this._sentinel, a = i._prev; a !== i; )
n.push(JSON.stringify(a, r)), a = a._prev;
return "[" + n.join(", ") + "]";
};
function e(n) {
n._prev._next = n._next, n._next._prev = n._prev, delete n._next, delete n._prev;
}
function r(n, i) {
if (n !== "_next" && n !== "_prev")
return i;
}
return py;
}
var gy, ik;
function tet() {
if (ik)
return gy;
ik = 1;
var t = Ke(), e = hi().Graph, r = Jtt();
gy = i;
var n = t.constant(1);
function i(u, h) {
if (u.nodeCount() <= 1)
return [];
var d = o(u, h || n), f = a(d.graph, d.buckets, d.zeroIdx);
return t.flatten(t.map(f, function(p) {
return u.outEdges(p.v, p.w);
}), !0);
}
function a(u, h, d) {
for (var f = [], p = h[h.length - 1], m = h[0], _; u.nodeCount(); ) {
for (; _ = m.dequeue(); )
s(u, h, d, _);
for (; _ = p.dequeue(); )
s(u, h, d, _);
if (u.nodeCount()) {
for (var y = h.length - 2; y > 0; --y)
if (_ = h[y].dequeue(), _) {
f = f.concat(s(u, h, d, _, !0));
break;
}
}
}
return f;
}
function s(u, h, d, f, p) {
var m = p ? [] : void 0;
return t.forEach(u.inEdges(f.v), function(_) {
var y = u.edge(_), b = u.node(_.v);
p && m.push({ v: _.v, w: _.w }), b.out -= y, l(h, d, b);
}), t.forEach(u.outEdges(f.v), function(_) {
var y = u.edge(_), b = _.w, x = u.node(b);
x.in -= y, l(h, d, x);
}), u.removeNode(f.v), m;
}
function o(u, h) {
var d = new e(), f = 0, p = 0;
t.forEach(u.nodes(), function(y) {
d.setNode(y, { v: y, in: 0, out: 0 });
}), t.forEach(u.edges(), function(y) {
var b = d.edge(y.v, y.w) || 0, x = h(y), k = b + x;
d.setEdge(y.v, y.w, k), p = Math.max(p, d.node(y.v).out += x), f = Math.max(f, d.node(y.w).in += x);
});
var m = t.range(p + f + 3).map(function() {
return new r();
}), _ = f + 1;
return t.forEach(d.nodes(), function(y) {
l(m, _, d.node(y));
}), { graph: d, buckets: m, zeroIdx: _ };
}
function l(u, h, d) {
d.out ? d.in ? u[d.out - d.in + h].enqueue(d) : u[u.length - 1].enqueue(d) : u[0].enqueue(d);
}
return gy;
}
var yy, ak;
function eet() {
if (ak)
return yy;
ak = 1;
var t = Ke(), e = tet();
yy = {
run: r,
undo: i
};
function r(a) {
var s = a.graph().acyclicer === "greedy" ? e(a, o(a)) : n(a);
t.forEach(s, function(l) {
var u = a.edge(l);
a.removeEdge(l), u.forwardName = l.name, u.reversed = !0, a.setEdge(l.w, l.v, u, t.uniqueId("rev"));
});
function o(l) {
return function(u) {
return l.edge(u).weight;
};
}
}
function n(a) {
var s = [], o = {}, l = {};
function u(h) {
t.has(l, h) || (l[h] = !0, o[h] = !0, t.forEach(a.outEdges(h), function(d) {
t.has(o, d.w) ? s.push(d) : u(d.w);
}), delete o[h]);
}
return t.forEach(a.nodes(), u), s;
}
function i(a) {
t.forEach(a.edges(), function(s) {
var o = a.edge(s);
if (o.reversed) {
a.removeEdge(s);
var l = o.forwardName;
delete o.reversed, delete o.forwardName, a.setEdge(s.w, s.v, o, l);
}
});
}
return yy;
}
var my, sk;
function _n() {
if (sk)
return my;
sk = 1;
var t = Ke(), e = hi().Graph;
my = {
addDummyNode: r,
simplify: n,
asNonCompoundGraph: i,
successorWeights: a,
predecessorWeights: s,
intersectRect: o,
buildLayerMatrix: l,
normalizeRanks: u,
removeEmptyRanks: h,
addBorderNode: d,
maxRank: f,
partition: p,
time: m,
notime: _
};
function r(y, b, x, k) {
var T;
do
T = t.uniqueId(k);
while (y.hasNode(T));
return x.dummy = b, y.setNode(T, x), T;
}
function n(y) {
var b = new e().setGraph(y.graph());
return t.forEach(y.nodes(), function(x) {
b.setNode(x, y.node(x));
}), t.forEach(y.edges(), function(x) {
var k = b.edge(x.v, x.w) || { weight: 0, minlen: 1 }, T = y.edge(x);
b.setEdge(x.v, x.w, {
weight: k.weight + T.weight,
minlen: Math.max(k.minlen, T.minlen)
});
}), b;
}
function i(y) {
var b = new e({ multigraph: y.isMultigraph() }).setGraph(y.graph());
return t.forEach(y.nodes(), function(x) {
y.children(x).length || b.setNode(x, y.node(x));
}), t.forEach(y.edges(), function(x) {
b.setEdge(x, y.edge(x));
}), b;
}
function a(y) {
var b = t.map(y.nodes(), function(x) {
var k = {};
return t.forEach(y.outEdges(x), function(T) {
k[T.w] = (k[T.w] || 0) + y.edge(T).weight;
}), k;
});
return t.zipObject(y.nodes(), b);
}
function s(y) {
var b = t.map(y.nodes(), function(x) {
var k = {};
return t.forEach(y.inEdges(x), function(T) {
k[T.v] = (k[T.v] || 0) + y.edge(T).weight;
}), k;
});
return t.zipObject(y.nodes(), b);
}
function o(y, b) {
var x = y.x, k = y.y, T = b.x - x, C = b.y - k, M = y.width / 2, S = y.height / 2;
if (!T && !C)
throw new Error("Not possible to find intersection inside of the rectangle");
var R, A;
return Math.abs(C) * M > Math.abs(T) * S ? (C < 0 && (S = -S), R = S * T / C, A = S) : (T < 0 && (M = -M), R = M, A = M * C / T), { x: x + R, y: k + A };
}
function l(y) {
var b = t.map(t.range(f(y) + 1), function() {
return [];
});
return t.forEach(y.nodes(), function(x) {
var k = y.node(x), T = k.rank;
t.isUndefined(T) || (b[T][k.order] = x);
}), b;
}
function u(y) {
var b = t.min(t.map(y.nodes(), function(x) {
return y.node(x).rank;
}));
t.forEach(y.nodes(), function(x) {
var k = y.node(x);
t.has(k, "rank") && (k.rank -= b);
});
}
function h(y) {
var b = t.min(t.map(y.nodes(), function(C) {
return y.node(C).rank;
})), x = [];
t.forEach(y.nodes(), function(C) {
var M = y.node(C).rank - b;
x[M] || (x[M] = []), x[M].push(C);
});
var k = 0, T = y.graph().nodeRankFactor;
t.forEach(x, function(C, M) {
t.isUndefined(C) && M % T !== 0 ? --k : k && t.forEach(C, function(S) {
y.node(S).rank += k;
});
});
}
function d(y, b, x, k) {
var T = {
width: 0,
height: 0
};
return arguments.length >= 4 && (T.rank = x, T.order = k), r(y, "border", T, b);
}
function f(y) {
return t.max(t.map(y.nodes(), function(b) {
var x = y.node(b).rank;
if (!t.isUndefined(x))
return x;
}));
}
function p(y, b) {
var x = { lhs: [], rhs: [] };
return t.forEach(y, function(k) {
b(k) ? x.lhs.push(k) : x.rhs.push(k);
}), x;
}
function m(y, b) {
var x = t.now();
try {
return b();
} finally {
console.log(y + " time: " + (t.now() - x) + "ms");
}
}
function _(y, b) {
return b();
}
return my;
}
var by, ok;
function ret() {
if (ok)
return by;
ok = 1;
var t = Ke(), e = _n();
by = {
run: r,
undo: i
};
function r(a) {
a.graph().dummyChains = [], t.forEach(a.edges(), function(s) {
n(a, s);
});
}
function n(a, s) {
var o = s.v, l = a.node(o).rank, u = s.w, h = a.node(u).rank, d = s.name, f = a.edge(s), p = f.labelRank;
if (h !== l + 1) {
a.removeEdge(s);
var m, _, y;
for (y = 0, ++l; l < h; ++y, ++l)
f.points = [], _ = {
width: 0,
height: 0,
edgeLabel: f,
edgeObj: s,
rank: l
}, m = e.addDummyNode(a, "edge", _, "_d"), l === p && (_.width = f.width, _.height = f.height, _.dummy = "edge-label", _.labelpos = f.labelpos), a.setEdge(o, m, { weight: f.weight }, d), y === 0 && a.graph().dummyChains.push(m), o = m;
a.setEdge(o, u, { weight: f.weight }, d);
}
}
function i(a) {
t.forEach(a.graph().dummyChains, function(s) {
var o = a.node(s), l = o.edgeLabel, u;
for (a.setEdge(o.edgeObj, l); o.dummy; )
u = a.successors(s)[0], a.removeNode(s), l.points.push({ x: o.x, y: o.y }), o.dummy === "edge-label" && (l.x = o.x, l.y = o.y, l.width = o.width, l.height = o.height), s = u, o = a.node(s);
});
}
return by;
}
var _y, lk;
function Hf() {
if (lk)
return _y;
lk = 1;
var t = Ke();
_y = {
longestPath: e,
slack: r
};
function e(n) {
var i = {};
function a(s) {
var o = n.node(s);
if (t.has(i, s))
return o.rank;
i[s] = !0;
var l = t.min(t.map(n.outEdges(s), function(u) {
return a(u.w) - n.edge(u).minlen;
}));
return (l === Number.POSITIVE_INFINITY || l === void 0 || l === null) && (l = 0), o.rank = l;
}
t.forEach(n.sources(), a);
}
function r(n, i) {
return n.node(i.w).rank - n.node(i.v).rank - n.edge(i).minlen;
}
return _y;
}
var vy, ck;
function RM() {
if (ck)
return vy;
ck = 1;
var t = Ke(), e = hi().Graph, r = Hf().slack;
vy = n;
function n(o) {
var l = new e({ directed: !1 }), u = o.nodes()[0], h = o.nodeCount();
l.setNode(u, {});
for (var d, f; i(l, o) < h; )
d = a(l, o), f = l.hasNode(d.v) ? r(o, d) : -r(o, d), s(l, o, f);
return l;
}
function i(o, l) {
function u(h) {
t.forEach(l.nodeEdges(h), function(d) {
var f = d.v, p = h === f ? d.w : f;
!o.hasNode(p) && !r(l, d) && (o.setNode(p, {}), o.setEdge(h, p, {}), u(p));
});
}
return t.forEach(o.nodes(), u), o.nodeCount();
}
function a(o, l) {
return t.minBy(l.edges(), function(u) {
if (o.hasNode(u.v) !== o.hasNode(u.w))
return r(l, u);
});
}
function s(o, l, u) {
t.forEach(o.nodes(), function(h) {
l.node(h).rank += u;
});
}
return vy;
}
var xy, uk;
function net() {
if (uk)
return xy;
uk = 1;
var t = Ke(), e = RM(), r = Hf().slack, n = Hf().longestPath, i = hi().alg.preorder, a = hi().alg.postorder, s = _n().simplify;
xy = o, o.initLowLimValues = d, o.initCutValues = l, o.calcCutValue = h, o.leaveEdge = p, o.enterEdge = m, o.exchangeEdges = _;
function o(k) {
k = s(k), n(k);
var T = e(k);
d(T), l(T, k);
for (var C, M; C = p(T); )
M = m(T, k, C), _(T, k, C, M);
}
function l(k, T) {
var C = a(k, k.nodes());
C = C.slice(0, C.length - 1), t.forEach(C, function(M) {
u(k, T, M);
});
}
function u(k, T, C) {
var M = k.node(C), S = M.parent;
k.edge(C, S).cutvalue = h(k, T, C);
}
function h(k, T, C) {
var M = k.node(C), S = M.parent, R = !0, A = T.edge(C, S), L = 0;
return A || (R = !1, A = T.edge(S, C)), L = A.weight, t.forEach(T.nodeEdges(C), function(v) {
var B = v.v === C, w = B ? v.w : v.v;
if (w !== S) {
var D = B === R, N = T.edge(v).weight;
if (L += D ? N : -N, b(k, C, w)) {
var z = k.edge(C, w).cutvalue;
L += D ? -z : z;
}
}
}), L;
}
function d(k, T) {
arguments.length < 2 && (T = k.nodes()[0]), f(k, {}, 1, T);
}
function f(k, T, C, M, S) {
var R = C, A = k.node(M);
return T[M] = !0, t.forEach(k.neighbors(M), function(L) {
t.has(T, L) || (C = f(k, T, C, L, M));
}), A.low = R, A.lim = C++, S ? A.parent = S : delete A.parent, C;
}
function p(k) {
return t.find(k.edges(), function(T) {
return k.edge(T).cutvalue < 0;
});
}
function m(k, T, C) {
var M = C.v, S = C.w;
T.hasEdge(M, S) || (M = C.w, S = C.v);
var R = k.node(M), A = k.node(S), L = R, v = !1;
R.lim > A.lim && (L = A, v = !0);
var B = t.filter(T.edges(), function(w) {
return v === x(k, k.node(w.v), L) && v !== x(k, k.node(w.w), L);
});
return t.minBy(B, function(w) {
return r(T, w);
});
}
function _(k, T, C, M) {
var S = C.v, R = C.w;
k.removeEdge(S, R), k.setEdge(M.v, M.w, {}), d(k), l(k, T), y(k, T);
}
function y(k, T) {
var C = t.find(k.nodes(), function(S) {
return !T.node(S).parent;
}), M = i(k, C);
M = M.slice(1), t.forEach(M, function(S) {
var R = k.node(S).parent, A = T.edge(S, R), L = !1;
A || (A = T.edge(R, S), L = !0), T.node(S).rank = T.node(R).rank + (L ? A.minlen : -A.minlen);
});
}
function b(k, T, C) {
return k.hasEdge(T, C);
}
function x(k, T, C) {
return C.low <= T.lim && T.lim <= C.lim;
}
return xy;
}
var ky, hk;
function iet() {
if (hk)
return ky;
hk = 1;
var t = Hf(), e = t.longestPath, r = RM(), n = net();
ky = i;
function i(l) {
switch (l.graph().ranker) {
case "network-simplex":
o(l);
break;
case "tight-tree":
s(l);
break;
case "longest-path":
a(l);
break;
default:
o(l);
}
}
var a = e;
function s(l) {
e(l), r(l);
}
function o(l) {
n(l);
}
return ky;
}
var wy, fk;
function aet() {
if (fk)
return wy;
fk = 1;
var t = Ke();
wy = e;
function e(i) {
var a = n(i);
t.forEach(i.graph().dummyChains, function(s) {
for (var o = i.node(s), l = o.edgeObj, u = r(i, a, l.v, l.w), h = u.path, d = u.lca, f = 0, p = h[f], m = !0; s !== l.w; ) {
if (o = i.node(s), m) {
for (; (p = h[f]) !== d && i.node(p).maxRank < o.rank; )
f++;
p === d && (m = !1);
}
if (!m) {
for (; f < h.length - 1 && i.node(p = h[f + 1]).minRank <= o.rank; )
f++;
p = h[f];
}
i.setParent(s, p), s = i.successors(s)[0];
}
});
}
function r(i, a, s, o) {
var l = [], u = [], h = Math.min(a[s].low, a[o].low), d = Math.max(a[s].lim, a[o].lim), f, p;
f = s;
do
f = i.parent(f), l.push(f);
while (f && (a[f].low > h || d > a[f].lim));
for (p = f, f = o; (f = i.parent(f)) !== p; )
u.push(f);
return { path: l.concat(u.reverse()), lca: p };
}
function n(i) {
var a = {}, s = 0;
function o(l) {
var u = s;
t.forEach(i.children(l), o), a[l] = { low: u, lim: s++ };
}
return t.forEach(i.children(), o), a;
}
return wy;
}
var Ty, dk;
function set() {
if (dk)
return Ty;
dk = 1;
var t = Ke(), e = _n();
Ty = {
run: r,
cleanup: s
};
function r(o) {
var l = e.addDummyNode(o, "root", {}, "_root"), u = i(o), h = t.max(t.values(u)) - 1, d = 2 * h + 1;
o.graph().nestingRoot = l, t.forEach(o.edges(), function(p) {
o.edge(p).minlen *= d;
});
var f = a(o) + 1;
t.forEach(o.children(), function(p) {
n(o, l, d, f, h, u, p);
}), o.graph().nodeRankFactor = d;
}
function n(o, l, u, h, d, f, p) {
var m = o.children(p);
if (!m.length) {
p !== l && o.setEdge(l, p, { weight: 0, minlen: u });
return;
}
var _ = e.addBorderNode(o, "_bt"), y = e.addBorderNode(o, "_bb"), b = o.node(p);
o.setParent(_, p), b.borderTop = _, o.setParent(y, p), b.borderBottom = y, t.forEach(m, function(x) {
n(o, l, u, h, d, f, x);
var k = o.node(x), T = k.borderTop ? k.borderTop : x, C = k.borderBottom ? k.borderBottom : x, M = k.borderTop ? h : 2 * h, S = T !== C ? 1 : d - f[p] + 1;
o.setEdge(_, T, {
weight: M,
minlen: S,
nestingEdge: !0
}), o.setEdge(C, y, {
weight: M,
minlen: S,
nestingEdge: !0
});
}), o.parent(p) || o.setEdge(l, _, { weight: 0, minlen: d + f[p] });
}
function i(o) {
var l = {};
function u(h, d) {
var f = o.children(h);
f && f.length && t.forEach(f, function(p) {
u(p, d + 1);
}), l[h] = d;
}
return t.forEach(o.children(), function(h) {
u(h, 1);
}), l;
}
function a(o) {
return t.reduce(o.edges(), function(l, u) {
return l + o.edge(u).weight;
}, 0);
}
function s(o) {
var l = o.graph();
o.removeNode(l.nestingRoot), delete l.nestingRoot, t.forEach(o.edges(), function(u) {
var h = o.edge(u);
h.nestingEdge && o.removeEdge(u);
});
}
return Ty;
}
var Ey, pk;
function oet() {
if (pk)
return Ey;
pk = 1;
var t = Ke(), e = _n();
Ey = r;
function r(i) {
function a(s) {
var o = i.children(s), l = i.node(s);
if (o.length && t.forEach(o, a), t.has(l, "minRank")) {
l.borderLeft = [], l.borderRight = [];
for (var u = l.minRank, h = l.maxRank + 1; u < h; ++u)
n(i, "borderLeft", "_bl", s, l, u), n(i, "borderRight", "_br", s, l, u);
}
}
t.forEach(i.children(), a);
}
function n(i, a, s, o, l, u) {
var h = { width: 0, height: 0, rank: u, borderType: a }, d = l[a][u - 1], f = e.addDummyNode(i, "border", h, s);
l[a][u] = f, i.setParent(f, o), d && i.setEdge(d, f, { weight: 1 });
}
return Ey;
}
var Cy, gk;
function cet() {
if (gk)
return Cy;
gk = 1;
var t = Ke();
Cy = {
adjust: e,
undo: r
};
function e(u) {
var h = u.graph().rankdir.toLowerCase();
(h === "lr" || h === "rl") && n(u);
}
function r(u) {
var h = u.graph().rankdir.toLowerCase();
(h === "bt" || h === "rl") && a(u), (h === "lr" || h === "rl") && (o(u), n(u));
}
function n(u) {
t.forEach(u.nodes(), function(h) {
i(u.node(h));
}), t.forEach(u.edges(), function(h) {
i(u.edge(h));
});
}
function i(u) {
var h = u.width;
u.width = u.height, u.height = h;
}
function a(u) {
t.forEach(u.nodes(), function(h) {
s(u.node(h));
}), t.forEach(u.edges(), function(h) {
var d = u.edge(h);
t.forEach(d.points, s), t.has(d, "y") && s(d);
});
}
function s(u) {
u.y = -u.y;
}
function o(u) {
t.forEach(u.nodes(), function(h) {
l(u.node(h));
}), t.forEach(u.edges(), function(h) {
var d = u.edge(h);
t.forEach(d.points, l), t.has(d, "x") && l(d);
});
}
function l(u) {
var h = u.x;
u.x = u.y, u.y = h;
}
return Cy;
}
var Sy, yk;
function uet() {
if (yk)
return Sy;
yk = 1;
var t = Ke();
Sy = e;
function e(r) {
var n = {}, i = t.filter(r.nodes(), function(u) {
return !r.children(u).length;
}), a = t.max(t.map(i, function(u) {
return r.node(u).rank;
})), s = t.map(t.range(a + 1), function() {
return [];
});
function o(u) {
if (!t.has(n, u)) {
n[u] = !0;
var h = r.node(u);
s[h.rank].push(u), t.forEach(r.successors(u), o);
}
}
var l = t.sortBy(i, function(u) {
return r.node(u).rank;
});
return t.forEach(l, o), s;
}
return Sy;
}
var Ay, mk;
function het() {
if (mk)
return Ay;
mk = 1;
var t = Ke();
Ay = e;
function e(n, i) {
for (var a = 0, s = 1; s < i.length; ++s)
a += r(n, i[s - 1], i[s]);
return a;
}
function r(n, i, a) {
for (var s = t.zipObject(
a,
t.map(a, function(f, p) {
return p;
})
), o = t.flatten(t.map(i, function(f) {
return t.sortBy(t.map(n.outEdges(f), function(p) {
return { pos: s[p.w], weight: n.edge(p).weight };
}), "pos");
}), !0), l = 1; l < a.length; )
l <<= 1;
var u = 2 * l - 1;
l -= 1;
var h = t.map(new Array(u), function() {
return 0;
}), d = 0;
return t.forEach(o.forEach(function(f) {
var p = f.pos + l;
h[p] += f.weight;
for (var m = 0; p > 0; )
p % 2 && (m += h[p + 1]), p = p - 1 >> 1, h[p] += f.weight;
d += f.weight * m;
})), d;
}
return Ay;
}
var My, bk;
function fet() {
if (bk)
return My;
bk = 1;
var t = Ke();
My = e;
function e(r, n) {
return t.map(n, function(i) {
var a = r.inEdges(i);
if (a.length) {
var s = t.reduce(a, function(o, l) {
var u = r.edge(l), h = r.node(l.v);
return {
sum: o.sum + u.weight * h.order,
weight: o.weight + u.weight
};
}, { sum: 0, weight: 0 });
return {
v: i,
barycenter: s.sum / s.weight,
weight: s.weight
};
} else
return { v: i };
});
}
return My;
}
var Ly, _k;
function det() {
if (_k)
return Ly;
_k = 1;
var t = Ke();
Ly = e;
function e(i, a) {
var s = {};
t.forEach(i, function(l, u) {
var h = s[l.v] = {
indegree: 0,
in: [],
out: [],
vs: [l.v],
i: u
};
t.isUndefined(l.barycenter) || (h.barycenter = l.barycenter, h.weight = l.weight);
}), t.forEach(a.edges(), function(l) {
var u = s[l.v], h = s[l.w];
!t.isUndefined(u) && !t.isUndefined(h) && (h.indegree++, u.out.push(s[l.w]));
});
var o = t.filter(s, function(l) {
return !l.indegree;
});
return r(o);
}
function r(i) {
var a = [];
function s(u) {
return function(h) {
h.merged || (t.isUndefined(h.barycenter) || t.isUndefined(u.barycenter) || h.barycenter >= u.barycenter) && n(u, h);
};
}
function o(u) {
return function(h) {
h.in.push(u), --h.indegree === 0 && i.push(h);
};
}
for (; i.length; ) {
var l = i.pop();
a.push(l), t.forEach(l.in.reverse(), s(l)), t.forEach(l.out, o(l));
}
return t.map(
t.filter(a, function(u) {
return !u.merged;
}),
function(u) {
return t.pick(u, ["vs", "i", "barycenter", "weight"]);
}
);
}
function n(i, a) {
var s = 0, o = 0;
i.weight && (s += i.barycenter * i.weight, o += i.weight), a.weight && (s += a.barycenter * a.weight, o += a.weight), i.vs = a.vs.concat(i.vs), i.barycenter = s / o, i.weight = o, i.i = Math.min(a.i, i.i), a.merged = !0;
}
return Ly;
}
var Ry, vk;
function pet() {
if (vk)
return Ry;
vk = 1;
var t = Ke(), e = _n();
Ry = r;
function r(a, s) {
var o = e.partition(a, function(_) {
return t.has(_, "barycenter");
}), l = o.lhs, u = t.sortBy(o.rhs, function(_) {
return -_.i;
}), h = [], d = 0, f = 0, p = 0;
l.sort(i(!!s)), p = n(h, u, p), t.forEach(l, function(_) {
p += _.vs.length, h.push(_.vs), d += _.barycenter * _.weight, f += _.weight, p = n(h, u, p);
});
var m = { vs: t.flatten(h, !0) };
return f && (m.barycenter = d / f, m.weight = f), m;
}
function n(a, s, o) {
for (var l; s.length && (l = t.last(s)).i <= o; )
s.pop(), a.push(l.vs), o++;
return o;
}
function i(a) {
return function(s, o) {
return s.barycenter < o.barycenter ? -1 : s.barycenter > o.barycenter ? 1 : a ? o.i - s.i : s.i - o.i;
};
}
return Ry;
}
var Iy, xk;
function get() {
if (xk)
return Iy;
xk = 1;
var t = Ke(), e = fet(), r = det(), n = pet();
Iy = i;
function i(o, l, u, h) {
var d = o.children(l), f = o.node(l), p = f ? f.borderLeft : void 0, m = f ? f.borderRight : void 0, _ = {};
p && (d = t.filter(d, function(C) {
return C !== p && C !== m;
}));
var y = e(o, d);
t.forEach(y, function(C) {
if (o.children(C.v).length) {
var M = i(o, C.v, u, h);
_[C.v] = M, t.has(M, "barycenter") && s(C, M);
}
});
var b = r(y, u);
a(b, _);
var x = n(b, h);
if (p && (x.vs = t.flatten([p, x.vs, m], !0), o.predecessors(p).length)) {
var k = o.node(o.predecessors(p)[0]), T = o.node(o.predecessors(m)[0]);
t.has(x, "barycenter") || (x.barycenter = 0, x.weight = 0), x.barycenter = (x.barycenter * x.weight + k.order + T.order) / (x.weight + 2), x.weight += 2;
}
return x;
}
function a(o, l) {
t.forEach(o, function(u) {
u.vs = t.flatten(u.vs.map(function(h) {
return l[h] ? l[h].vs : h;
}), !0);
});
}
function s(o, l) {
t.isUndefined(o.barycenter) ? (o.barycenter = l.barycenter, o.weight = l.weight) : (o.barycenter = (o.barycenter * o.weight + l.barycenter * l.weight) / (o.weight + l.weight), o.weight += l.weight);
}
return Iy;
}
var Ny, kk;
function yet() {
if (kk)
return Ny;
kk = 1;
var t = Ke(), e = hi().Graph;
Ny = r;
function r(i, a, s) {
var o = n(i), l = new e({ compound: !0 }).setGraph({ root: o }).setDefaultNodeLabel(function(u) {
return i.node(u);
});
return t.forEach(i.nodes(), function(u) {
var h = i.node(u), d = i.parent(u);
(h.rank === a || h.minRank <= a && a <= h.maxRank) && (l.setNode(u), l.setParent(u, d || o), t.forEach(i[s](u), function(f) {
var p = f.v === u ? f.w : f.v, m = l.edge(p, u), _ = t.isUndefined(m) ? 0 : m.weight;
l.setEdge(p, u, { weight: i.edge(f).weight + _ });
}), t.has(h, "minRank") && l.setNode(u, {
borderLeft: h.borderLeft[a],
borderRight: h.borderRight[a]
}));
}), l;
}
function n(i) {
for (var a; i.hasNode(a = t.uniqueId("_root")); )
;
return a;
}
return Ny;
}
var By, wk;
function met() {
if (wk)
return By;
wk = 1;
var t = Ke();
By = e;
function e(r, n, i) {
var a = {}, s;
t.forEach(i, function(o) {
for (var l = r.parent(o), u, h; l; ) {
if (u = r.parent(l), u ? (h = a[u], a[u] = l) : (h = s, s = l), h && h !== l) {
n.setEdge(h, l);
return;
}
l = u;
}
});
}
return By;
}
var Dy, Tk;
function bet() {
if (Tk)
return Dy;
Tk = 1;
var t = Ke(), e = uet(), r = het(), n = get(), i = yet(), a = met(), s = hi().Graph, o = _n();
Dy = l;
function l(f) {
var p = o.maxRank(f), m = u(f, t.range(1, p + 1), "inEdges"), _ = u(f, t.range(p - 1, -1, -1), "outEdges"), y = e(f);
d(f, y);
for (var b = Number.POSITIVE_INFINITY, x, k = 0, T = 0; T < 4; ++k, ++T) {
h(k % 2 ? m : _, k % 4 >= 2), y = o.buildLayerMatrix(f);
var C = r(f, y);
C < b && (T = 0, x = t.cloneDeep(y), b = C);
}
d(f, x);
}
function u(f, p, m) {
return t.map(p, function(_) {
return i(f, _, m);
});
}
function h(f, p) {
var m = new s();
t.forEach(f, function(_) {
var y = _.graph().root, b = n(_, y, m, p);
t.forEach(b.vs, function(x, k) {
_.node(x).order = k;
}), a(_, m, b.vs);
});
}
function d(f, p) {
t.forEach(p, function(m) {
t.forEach(m, function(_, y) {
f.node(_).order = y;
});
});
}
return Dy;
}
var Oy, Ek;
function _et() {
if (Ek)
return Oy;
Ek = 1;
var t = Ke(), e = hi().Graph, r = _n();
Oy = {
positionX: m,
findType1Conflicts: n,
findType2Conflicts: i,
addConflict: s,
hasConflict: o,
verticalAlignment: l,
horizontalCompaction: u,
alignCoordinates: f,
findSmallestWidthAlignment: d,
balance: p
};
function n(b, x) {
var k = {};
function T(C, M) {
var S = 0, R = 0, A = C.length, L = t.last(M);
return t.forEach(M, function(v, B) {
var w = a(b, v), D = w ? b.node(w).order : A;
(w || v === L) && (t.forEach(M.slice(R, B + 1), function(N) {
t.forEach(b.predecessors(N), function(z) {
var X = b.node(z), ct = X.order;
(ct < S || D < ct) && !(X.dummy && b.node(N).dummy) && s(k, z, N);
});
}), R = B + 1, S = D);
}), M;
}
return t.reduce(x, T), k;
}
function i(b, x) {
var k = {};
function T(M, S, R, A, L) {
var v;
t.forEach(t.range(S, R), function(B) {
v = M[B], b.node(v).dummy && t.forEach(b.predecessors(v), function(w) {
var D = b.node(w);
D.dummy && (D.order < A || D.order > L) && s(k, w, v);
});
});
}
function C(M, S) {
var R = -1, A, L = 0;
return t.forEach(S, function(v, B) {
if (b.node(v).dummy === "border") {
var w = b.predecessors(v);
w.length && (A = b.node(w[0]).order, T(S, L, B, R, A), L = B, R = A);
}
T(S, L, S.length, A, M.length);
}), S;
}
return t.reduce(x, C), k;
}
function a(b, x) {
if (b.node(x).dummy)
return t.find(b.predecessors(x), function(k) {
return b.node(k).dummy;
});
}
function s(b, x, k) {
if (x > k) {
var T = x;
x = k, k = T;
}
var C = b[x];
C || (b[x] = C = {}), C[k] = !0;
}
function o(b, x, k) {
if (x > k) {
var T = x;
x = k, k = T;
}
return t.has(b[x], k);
}
function l(b, x, k, T) {
var C = {}, M = {}, S = {};
return t.forEach(x, function(R) {
t.forEach(R, function(A, L) {
C[A] = A, M[A] = A, S[A] = L;
});
}), t.forEach(x, function(R) {
var A = -1;
t.forEach(R, function(L) {
var v = T(L);
if (v.length) {
v = t.sortBy(v, function(z) {
return S[z];
});
for (var B = (v.length - 1) / 2, w = Math.floor(B), D = Math.ceil(B); w <= D; ++w) {
var N = v[w];
M[L] === L && A < S[N] && !o(k, L, N) && (M[N] = L, M[L] = C[L] = C[N], A = S[N]);
}
}
});
}), { root: C, align: M };
}
function u(b, x, k, T, C) {
var M = {}, S = h(b, x, k, C), R = C ? "borderLeft" : "borderRight";
function A(B, w) {
for (var D = S.nodes(), N = D.pop(), z = {}; N; )
z[N] ? B(N) : (z[N] = !0, D.push(N), D = D.concat(w(N))), N = D.pop();
}
function L(B) {
M[B] = S.inEdges(B).reduce(function(w, D) {
return Math.max(w, M[D.v] + S.edge(D));
}, 0);
}
function v(B) {
var w = S.outEdges(B).reduce(function(N, z) {
return Math.min(N, M[z.w] - S.edge(z));
}, Number.POSITIVE_INFINITY), D = b.node(B);
w !== Number.POSITIVE_INFINITY && D.borderType !== R && (M[B] = Math.max(M[B], w));
}
return A(L, S.predecessors.bind(S)), A(v, S.successors.bind(S)), t.forEach(T, function(B) {
M[B] = M[k[B]];
}), M;
}
function h(b, x, k, T) {
var C = new e(), M = b.graph(), S = _(M.nodesep, M.edgesep, T);
return t.forEach(x, function(R) {
var A;
t.forEach(R, function(L) {
var v = k[L];
if (C.setNode(v), A) {
var B = k[A], w = C.edge(B, v);
C.setEdge(B, v, Math.max(S(b, L, A), w || 0));
}
A = L;
});
}), C;
}
function d(b, x) {
return t.minBy(t.values(x), function(k) {
var T = Number.NEGATIVE_INFINITY, C = Number.POSITIVE_INFINITY;
return t.forIn(k, function(M, S) {
var R = y(b, S) / 2;
T = Math.max(M + R, T), C = Math.min(M - R, C);
}), T - C;
});
}
function f(b, x) {
var k = t.values(x), T = t.min(k), C = t.max(k);
t.forEach(["u", "d"], function(M) {
t.forEach(["l", "r"], function(S) {
var R = M + S, A = b[R], L;
if (A !== x) {
var v = t.values(A);
L = S === "l" ? T - t.min(v) : C - t.max(v), L && (b[R] = t.mapValues(A, function(B) {
return B + L;
}));
}
});
});
}
function p(b, x) {
return t.mapValues(b.ul, function(k, T) {
if (x)
return b[x.toLowerCase()][T];
var C = t.sortBy(t.map(b, T));
return (C[1] + C[2]) / 2;
});
}
function m(b) {
var x = r.buildLayerMatrix(b), k = t.merge(
n(b, x),
i(b, x)
), T = {}, C;
t.forEach(["u", "d"], function(S) {
C = S === "u" ? x : t.values(x).reverse(), t.forEach(["l", "r"], function(R) {
R === "r" && (C = t.map(C, function(B) {
return t.values(B).reverse();
}));
var A = (S === "u" ? b.predecessors : b.successors).bind(b), L = l(b, C, k, A), v = u(
b,
C,
L.root,
L.align,
R === "r"
);
R === "r" && (v = t.mapValues(v, function(B) {
return -B;
})), T[S + R] = v;
});
});
var M = d(b, T);
return f(T, M), p(T, b.graph().align);
}
function _(b, x, k) {
return function(T, C, M) {
var S = T.node(C), R = T.node(M), A = 0, L;
if (A += S.width / 2, t.has(S, "labelpos"))
switch (S.labelpos.toLowerCase()) {
case "l":
L = -S.width / 2;
break;
case "r":
L = S.width / 2;
break;
}
if (L && (A += k ? L : -L), L = 0, A += (S.dummy ? x : b) / 2, A += (R.dummy ? x : b) / 2, A += R.width / 2, t.has(R, "labelpos"))
switch (R.labelpos.toLowerCase()) {
case "l":
L = R.width / 2;
break;
case "r":
L = -R.width / 2;
break;
}
return L && (A += k ? L : -L), L = 0, A;
};
}
function y(b, x) {
return b.node(x).width;
}
return Oy;
}
var Fy, Ck;
function vet() {
if (Ck)
return Fy;
Ck = 1;
var t = Ke(), e = _n(), r = _et().positionX;
Fy = n;
function n(a) {
a = e.asNonCompoundGraph(a), i(a), t.forEach(r(a), function(s, o) {
a.node(o).x = s;
});
}
function i(a) {
var s = e.buildLayerMatrix(a), o = a.graph().ranksep, l = 0;
t.forEach(s, function(u) {
var h = t.max(t.map(u, function(d) {
return a.node(d).height;
}));
t.forEach(u, function(d) {
a.node(d).y = l + h / 2;
}), l += h + o;
});
}
return Fy;
}
var Py, Sk;
function xet() {
if (Sk)
return Py;
Sk = 1;
var t = Ke(), e = eet(), r = ret(), n = iet(), i = _n().normalizeRanks, a = aet(), s = _n().removeEmptyRanks, o = set(), l = oet(), u = cet(), h = bet(), d = vet(), f = _n(), p = hi().Graph;
Py = m;
function m(W, tt) {
var K = tt && tt.debugTiming ? f.time : f.notime;
K("layout", function() {
var it = K(" buildLayoutGraph", function() {
return A(W);
});
K(" runLayout", function() {
_(it, K);
}), K(" updateInputGraph", function() {
y(W, it);
});
});
}
function _(W, tt) {
tt(" makeSpaceForEdgeLabels", function() {
L(W);
}), tt(" removeSelfEdges", function() {
J(W);
}), tt(" acyclic", function() {
e.run(W);
}), tt(" nestingGraph.run", function() {
o.run(W);
}), tt(" rank", function() {
n(f.asNonCompoundGraph(W));
}), tt(" injectEdgeLabelProxies", function() {
v(W);
}), tt(" removeEmptyRanks", function() {
s(W);
}), tt(" nestingGraph.cleanup", function() {
o.cleanup(W);
}), tt(" normalizeRanks", function() {
i(W);
}), tt(" assignRankMinMax", function() {
B(W);
}), tt(" removeEdgeLabelProxies", function() {
w(W);
}), tt(" normalize.run", function() {
r.run(W);
}), tt(" parentDummyChains", function() {
a(W);
}), tt(" addBorderSegments", function() {
l(W);
}), tt(" order", function() {
h(W);
}), tt(" insertSelfEdges", function() {
Y(W);
}), tt(" adjustCoordinateSystem", function() {
u.adjust(W);
}), tt(" position", function() {
d(W);
}), tt(" positionSelfEdges", function() {
$(W);
}), tt(" removeBorderNodes", function() {
ct(W);
}), tt(" normalize.undo", function() {
r.undo(W);
}), tt(" fixupEdgeLabelCoords", function() {
z(W);
}), tt(" undoCoordinateSystem", function() {
u.undo(W);
}), tt(" translateGraph", function() {
D(W);
}), tt(" assignNodeIntersects", function() {
N(W);
}), tt(" reversePoints", function() {
X(W);
}), tt(" acyclic.undo", function() {
e.undo(W);
});
}
function y(W, tt) {
t.forEach(W.nodes(), function(K) {
var it = W.node(K), Z = tt.node(K);
it && (it.x = Z.x, it.y = Z.y, tt.children(K).length && (it.width = Z.width, it.height = Z.height));
}), t.forEach(W.edges(), function(K) {
var it = W.edge(K), Z = tt.edge(K);
it.points = Z.points, t.has(Z, "x") && (it.x = Z.x, it.y = Z.y);
}), W.graph().width = tt.graph().width, W.graph().height = tt.graph().height;
}
var b = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], x = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, k = ["acyclicer", "ranker", "rankdir", "align"], T = ["width", "height"], C = { width: 0, height: 0 }, M = ["minlen", "weight", "width", "height", "labeloffset"], S = {
minlen: 1,
weight: 1,
width: 0,
height: 0,
labeloffset: 10,
labelpos: "r"
}, R = ["labelpos"];
function A(W) {
var tt = new p({ multigraph: !0, compound: !0 }), K = ut(W.graph());
return tt.setGraph(t.merge(
{},
x,
lt(K, b),
t.pick(K, k)
)), t.forEach(W.nodes(), function(it) {
var Z = ut(W.node(it));
tt.setNode(it, t.defaults(lt(Z, T), C)), tt.setParent(it, W.parent(it));
}), t.forEach(W.edges(), function(it) {
var Z = ut(W.edge(it));
tt.setEdge(it, t.merge(
{},
S,
lt(Z, M),
t.pick(Z, R)
));
}), tt;
}
function L(W) {
var tt = W.graph();
tt.ranksep /= 2, t.forEach(W.edges(), function(K) {
var it = W.edge(K);
it.minlen *= 2, it.labelpos.toLowerCase() !== "c" && (tt.rankdir === "TB" || tt.rankdir === "BT" ? it.width += it.labeloffset : it.height += it.labeloffset);
});
}
function v(W) {
t.forEach(W.edges(), function(tt) {
var K = W.edge(tt);
if (K.width && K.height) {
var it = W.node(tt.v), Z = W.node(tt.w), V = { rank: (Z.rank - it.rank) / 2 + it.rank, e: tt };
f.addDummyNode(W, "edge-proxy", V, "_ep");
}
});
}
function B(W) {
var tt = 0;
t.forEach(W.nodes(), function(K) {
var it = W.node(K);
it.borderTop && (it.minRank = W.node(it.borderTop).rank, it.maxRank = W.node(it.borderBottom).rank, tt = t.max(tt, it.maxRank));
}), W.graph().maxRank = tt;
}
function w(W) {
t.forEach(W.nodes(), function(tt) {
var K = W.node(tt);
K.dummy === "edge-proxy" && (W.edge(K.e).labelRank = K.rank, W.removeNode(tt));
});
}
function D(W) {
var tt = Number.POSITIVE_INFINITY, K = 0, it = Number.POSITIVE_INFINITY, Z = 0, V = W.graph(), Q = V.marginx || 0, q = V.marginy || 0;
function U(F) {
var j = F.x, P = F.y, et = F.width, at = F.height;
tt = Math.min(tt, j - et / 2), K = Math.max(K, j + et / 2), it = Math.min(it, P - at / 2), Z = Math.max(Z, P + at / 2);
}
t.forEach(W.nodes(), function(F) {
U(W.node(F));
}), t.forEach(W.edges(), function(F) {
var j = W.edge(F);
t.has(j, "x") && U(j);
}), tt -= Q, it -= q, t.forEach(W.nodes(), function(F) {
var j = W.node(F);
j.x -= tt, j.y -= it;
}), t.forEach(W.edges(), function(F) {
var j = W.edge(F);
t.forEach(j.points, function(P) {
P.x -= tt, P.y -= it;
}), t.has(j, "x") && (j.x -= tt), t.has(j, "y") && (j.y -= it);
}), V.width = K - tt + Q, V.height = Z - it + q;
}
function N(W) {
t.forEach(W.edges(), function(tt) {
var K = W.edge(tt), it = W.node(tt.v), Z = W.node(tt.w), V, Q;
K.points ? (V = K.points[0], Q = K.points[K.points.length - 1]) : (K.points = [], V = Z, Q = it), K.points.unshift(f.intersectRect(it, V)), K.points.push(f.intersectRect(Z, Q));
});
}
function z(W) {
t.forEach(W.edges(), function(tt) {
var K = W.edge(tt);
if (t.has(K, "x"))
switch ((K.labelpos === "l" || K.labelpos === "r") && (K.width -= K.labeloffset), K.labelpos) {
case "l":
K.x -= K.width / 2 + K.labeloffset;
break;
case "r":
K.x += K.width / 2 + K.labeloffset;
break;
}
});
}
function X(W) {
t.forEach(W.edges(), function(tt) {
var K = W.edge(tt);
K.reversed && K.points.reverse();
});
}
function ct(W) {
t.forEach(W.nodes(), function(tt) {
if (W.children(tt).length) {
var K = W.node(tt), it = W.node(K.borderTop), Z = W.node(K.borderBottom), V = W.node(t.last(K.borderLeft)), Q = W.node(t.last(K.borderRight));
K.width = Math.abs(Q.x - V.x), K.height = Math.abs(Z.y - it.y), K.x = V.x + K.width / 2, K.y = it.y + K.height / 2;
}
}), t.forEach(W.nodes(), function(tt) {
W.node(tt).dummy === "border" && W.removeNode(tt);
});
}
function J(W) {
t.forEach(W.edges(), function(tt) {
if (tt.v === tt.w) {
var K = W.node(tt.v);
K.selfEdges || (K.selfEdges = []), K.selfEdges.push({ e: tt, label: W.edge(tt) }), W.removeEdge(tt);
}
});
}
function Y(W) {
var tt = f.buildLayerMatrix(W);
t.forEach(tt, function(K) {
var it = 0;
t.forEach(K, function(Z, V) {
var Q = W.node(Z);
Q.order = V + it, t.forEach(Q.selfEdges, function(q) {
f.addDummyNode(W, "selfedge", {
width: q.label.width,
height: q.label.height,
rank: Q.rank,
order: V + ++it,
e: q.e,
label: q.label
}, "_se");
}), delete Q.selfEdges;
});
});
}
function $(W) {
t.forEach(W.nodes(), function(tt) {
var K = W.node(tt);
if (K.dummy === "selfedge") {
var it = W.node(K.e.v), Z = it.x + it.width / 2, V = it.y, Q = K.x - Z, q = it.height / 2;
W.setEdge(K.e, K.label), W.removeNode(tt), K.label.points = [
{ x: Z + 2 * Q / 3, y: V - q },
{ x: Z + 5 * Q / 6, y: V - q },
{ x: Z + Q, y: V },
{ x: Z + 5 * Q / 6, y: V + q },
{ x: Z + 2 * Q / 3, y: V + q }
], K.label.x = K.x, K.label.y = K.y;
}
});
}
function lt(W, tt) {
return t.mapValues(t.pick(W, tt), Number);
}
function ut(W) {
var tt = {};
return t.forEach(W, function(K, it) {
tt[it.toLowerCase()] = K;
}), tt;
}
return Py;
}
var qy, Ak;
function ket() {
if (Ak)
return qy;
Ak = 1;
var t = Ke(), e = _n(), r = hi().Graph;
qy = {
debugOrdering: n
};
function n(i) {
var a = e.buildLayerMatrix(i), s = new r({ compound: !0, multigraph: !0 }).setGraph({});
return t.forEach(i.nodes(), function(o) {
s.setNode(o, { label: o }), s.setParent(o, "layer" + i.node(o).rank);
}), t.forEach(i.edges(), function(o) {
s.setEdge(o.v, o.w, {}, o.name);
}), t.forEach(a, function(o, l) {
var u = "layer" + l;
s.setNode(u, { rank: "same" }), t.reduce(o, function(h, d) {
return s.setEdge(h, d, { style: "invis" }), d;
});
}), s;
}
return qy;
}
var Vy, Mk;
function wet() {
return Mk || (Mk = 1, Vy = "0.8.5"), Vy;
}
var zy, Lk;
function IM() {
return Lk || (Lk = 1, zy = {
graphlib: hi(),
layout: xet(),
debug: ket(),
util: {
time: _n().time,
notime: _n().notime
},
version: wet()
}), zy;
}
var hu = IM();
let Rk = 0;
const Tet = function(t, e, r, n, i) {
const a = function(x) {
switch (x) {
case i.db.relationType.AGGREGATION:
return "aggregation";
case i.db.EXTENSION:
return "extension";
case i.db.COMPOSITION:
return "composition";
case i.db.DEPENDENCY:
return "dependency";
case i.db.LOLLIPOP:
return "lollipop";
}
};
e.points = e.points.filter((x) => !Number.isNaN(x.y));
const s = e.points, o = ns().x(function(x) {
return x.x;
}).y(function(x) {
return x.y;
}).curve(Ps), l = t.append("path").attr("d", o(s)).attr("id", "edge" + Rk).attr("class", "relation");
let u = "";
n.arrowMarkerAbsolute && (u = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, u = u.replace(/\(/g, "\\("), u = u.replace(/\)/g, "\\)")), r.relation.lineType == 1 && l.attr("class", "relation dashed-line"), r.relation.type1 !== "none" && l.attr(
"marker-start",
"url(" + u + "#" + a(r.relation.type1) + "Start)"
), r.relation.type2 !== "none" && l.attr(
"marker-end",
"url(" + u + "#" + a(r.relation.type2) + "End)"
);
let h, d;
const f = e.points.length;
let p = Se.calcLabelPosition(e.points);
h = p.x, d = p.y;
let m, _, y, b;
if (f % 2 !== 0 && f > 1) {
let x = Se.calcCardinalityPosition(
r.relation.type1 !== "none",
e.points,
e.points[0]
), k = Se.calcCardinalityPosition(
r.relation.type2 !== "none",
e.points,
e.points[f - 1]
);
H.debug("cardinality_1_point " + JSON.stringify(x)), H.debug("cardinality_2_point " + JSON.stringify(k)), m = x.x, _ = x.y, y = k.x, b = k.y;
}
if (typeof r.title < "u") {
const x = t.append("g").attr("class", "classLabel"), k = x.append("text").attr("class", "label").attr("x", h).attr("y", d).attr("fill", "red").attr("text-anchor", "middle").text(r.title);
window.label = k;
const T = k.node().getBBox();
x.insert("rect", ":first-child").attr("class", "box").attr("x", T.x - n.padding / 2).attr("y", T.y - n.padding / 2).attr("width", T.width + n.padding).attr("height", T.height + n.padding);
}
H.info("Rendering relation " + JSON.stringify(r)), typeof r.relationTitle1 < "u" && r.relationTitle1 !== "none" && t.append("g").attr("class", "cardinality").append("text").attr("class", "type1").attr("x", m).attr("y", _).attr("fill", "black").attr("font-size", "6").text(r.relationTitle1), typeof r.relationTitle2 < "u" && r.relationTitle2 !== "none" && t.append("g").attr("class", "cardinality").append("text").attr("class", "type2").attr("x", y).attr("y", b).attr("fill", "black").attr("font-size", "6").text(r.relationTitle2), Rk++;
}, Eet = function(t, e, r, n) {
H.debug("Rendering class ", e, r);
const i = e.id, a = {
id: i,
label: e.id,
width: 0,
height: 0
}, s = t.append("g").attr("id", n.db.lookUpDomId(i)).attr("class", "classGroup");
let o;
e.link ? o = s.append("svg:a").attr("xlink:href", e.link).attr("target", e.linkTarget).append("text").attr("y", r.textHeight + r.padding).attr("x", 0) : o = s.append("text").attr("y", r.textHeight + r.padding).attr("x", 0);
let l = !0;
e.annotations.forEach(function(C) {
const M = o.append("tspan").text("\xAB" + C + "\xBB");
l || M.attr("dy", r.textHeight), l = !1;
});
let u = e.id;
e.type !== void 0 && e.type !== "" && (u += "<" + e.type + ">");
const h = o.append("tspan").text(u).attr("class", "title");
l || h.attr("dy", r.textHeight);
const d = o.node().getBBox().height, f = s.append("line").attr("x1", 0).attr("y1", r.padding + d + r.dividerMargin / 2).attr("y2", r.padding + d + r.dividerMargin / 2), p = s.append("text").attr("x", r.padding).attr("y", d + r.dividerMargin + r.textHeight).attr("fill", "white").attr("class", "classText");
l = !0, e.members.forEach(function(C) {
Ik(p, C, l, r), l = !1;
});
const m = p.node().getBBox(), _ = s.append("line").attr("x1", 0).attr("y1", r.padding + d + r.dividerMargin + m.height).attr("y2", r.padding + d + r.dividerMargin + m.height), y = s.append("text").attr("x", r.padding).attr("y", d + 2 * r.dividerMargin + m.height + r.textHeight).attr("fill", "white").attr("class", "classText");
l = !0, e.methods.forEach(function(C) {
Ik(y, C, l, r), l = !1;
});
const b = s.node().getBBox();
var x = " ";
e.cssClasses.length > 0 && (x = x + e.cssClasses.join(" "));
const T = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", b.width + 2 * r.padding).attr("height", b.height + r.padding + 0.5 * r.dividerMargin).attr("class", x).node().getBBox().width;
return o.node().childNodes.forEach(function(C) {
C.setAttribute("x", (T - C.getBBox().width) / 2);
}), e.tooltip && o.insert("title").text(e.tooltip), f.attr("x2", T), _.attr("x2", T), a.width = T, a.height = b.height + r.padding + 0.5 * r.dividerMargin, a;
}, Gf = function(t) {
const e = /^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/, r = /^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/;
let n = t.match(e), i = t.match(r);
return n && !i ? Cet(n) : i ? Aet(i) : Met(t);
}, Cet = function(t) {
let e = "", r = "";
try {
let n = t[1] ? t[1].trim() : "", i = t[2] ? t[2].trim() : "", a = t[3] ? Va(t[3].trim()) : "", s = t[4] ? t[4].trim() : "", o = t[5] ? t[5].trim() : "";
r = n + i + a + " " + s, e = Y4(o);
} catch {
r = t;
}
return {
displayText: r,
cssStyle: e
};
}, Aet = function(t) {
let e = "", r = "";
try {
let n = t[1] ? t[1].trim() : "", i = t[2] ? t[2].trim() : "", a = t[3] ? Va(t[3].trim()) : "", s = t[4] ? t[4].trim() : "", o = t[5] ? " : " + Va(t[5]).trim() : "";
r = n + i + "(" + a + ")" + o, e = Y4(s);
} catch {
r = t;
}
return {
displayText: r,
cssStyle: e
};
}, Met = function(t) {
let e = "", r = "", n = "", i = t.indexOf("("), a = t.indexOf(")");
if (i > 1 && a > i && a <= t.length) {
let s = "", o = "", l = t.substring(0, 1);
l.match(/\w/) ? o = t.substring(0, i).trim() : (l.match(/\+|-|~|#/) && (s = l), o = t.substring(1, i).trim());
const u = t.substring(i + 1, a);
t.substring(a + 1, 1), r = Y4(t.substring(a + 1, a + 2)), e = s + o + "(" + Va(u.trim()) + ")", a < t.length && (n = t.substring(a + 2).trim(), n !== "" && (n = " : " + Va(n), e += n));
} else
e = Va(t);
return {
displayText: e,
cssStyle: r
};
}, Ik = function(t, e, r, n) {
let i = Gf(e);
const a = t.append("tspan").attr("x", n.padding).text(i.displayText);
i.cssStyle !== "" && a.attr("style", i.cssStyle), r || a.attr("dy", n.textHeight);
}, Y4 = function(t) {
switch (t) {
case "*":
return "font-style:italic;";
case "$":
return "text-decoration:underline;";
default:
return "";
}
}, Nk = {
drawClass: Eet,
drawEdge: Tet,
parseMember: Gf
};
let yb = {};
const ah = 20, sh = function(t) {
const e = Object.entries(yb).find((r) => r[1].label === t);
if (e)
return e[0];
}, Let = function(t) {
t.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), t.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, Ret = function(t, e, r, n) {
const i = nt().class;
yb = {}, H.info("Rendering diagram " + t);
const a = nt().securityLevel;
let s;
a === "sandbox" && (s = St("#i" + e));
const o = St(a === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = o.select(`[id='${e}']`);
Let(l);
const u = new ur.Graph({
multigraph: !0
});
u.setGraph({
isMultiGraph: !0
}), u.setDefaultEdgeLabel(function() {
return {};
});
const h = n.db.getClasses(), d = Object.keys(h);
for (let b = 0; b < d.length; b++) {
const x = h[d[b]], k = Nk.drawClass(l, x, i, n);
yb[k.id] = k, u.setNode(k.id, k), H.info("Org height: " + k.height);
}
n.db.getRelations().forEach(function(b) {
H.info(
"tjoho" + sh(b.id1) + sh(b.id2) + JSON.stringify(b)
), u.setEdge(
sh(b.id1),
sh(b.id2),
{
relation: b
},
b.title || "DEFAULT"
);
}), hu.layout(u), u.nodes().forEach(function(b) {
typeof b < "u" && typeof u.node(b) < "u" && (H.debug("Node " + b + ": " + JSON.stringify(u.node(b))), o.select("#" + n.db.lookUpDomId(b)).attr(
"transform",
"translate(" + (u.node(b).x - u.node(b).width / 2) + "," + (u.node(b).y - u.node(b).height / 2) + " )"
));
}), u.edges().forEach(function(b) {
typeof b < "u" && typeof u.edge(b) < "u" && (H.debug("Edge " + b.v + " -> " + b.w + ": " + JSON.stringify(u.edge(b))), Nk.drawEdge(l, u.edge(b), u.edge(b).relation, i, n));
});
const p = l.node().getBBox(), m = p.width + ah * 2, _ = p.height + ah * 2;
pi(l, _, m, i.useMaxWidth);
const y = `${p.x - ah} ${p.y - ah} ${m} ${_}`;
H.debug(`viewBox ${y}`), l.attr("viewBox", y), vn(n.db, l, e);
}, Iet = {
draw: Ret
}, Net = (t, e, r, n) => {
e.forEach((i) => {
Uet[i](t, r, n);
});
}, Bet = (t, e, r) => {
H.trace("Making markers for ", r), t.append("defs").append("marker").attr("id", e + "-extensionStart").attr("class", "marker extension " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", e + "-extensionEnd").attr("class", "marker extension " + e).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
}, Det = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-compositionStart").attr("class", "marker composition " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", e + "-compositionEnd").attr("class", "marker composition " + e).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
}, Oet = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-aggregationStart").attr("class", "marker aggregation " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", e + "-aggregationEnd").attr("class", "marker aggregation " + e).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
}, Fet = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-dependencyStart").attr("class", "marker dependency " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", e + "-dependencyEnd").attr("class", "marker dependency " + e).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, Pet = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-lollipopStart").attr("class", "marker lollipop " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "white").attr("cx", 6).attr("cy", 7).attr("r", 6);
}, qet = (t, e) => {
t.append("marker").attr("id", e + "-pointEnd").attr("class", "marker " + e).attr("viewBox", "0 0 10 10").attr("refX", 10).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", e + "-pointStart").attr("class", "marker " + e).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
}, Vet = (t, e) => {
t.append("marker").attr("id", e + "-circleEnd").attr("class", "marker " + e).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", e + "-circleStart").attr("class", "marker " + e).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
}, zet = (t, e) => {
t.append("marker").attr("id", e + "-crossEnd").attr("class", "marker cross " + e).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", e + "-crossStart").attr("class", "marker cross " + e).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
}, Yet = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
}, Uet = {
extension: Bet,
composition: Det,
aggregation: Oet,
dependency: Fet,
lollipop: Pet,
point: qet,
circle: Vet,
cross: zet,
barb: Yet
};
function Wet(t, e) {
e && t.attr("style", e);
}
function Het(t) {
const e = St(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), r = e.append("xhtml:div"), n = t.label, i = t.isNode ? "nodeLabel" : "edgeLabel";
return r.html(
'" + n + ""
), Wet(r, t.labelStyle), r.style("display", "inline-block"), r.style("white-space", "nowrap"), r.attr("xmlns", "http://www.w3.org/1999/xhtml"), e.node();
}
const yn = (t, e, r, n) => {
let i = t || "";
if (typeof i == "object" && (i = i[0]), Ar(nt().flowchart.htmlLabels)) {
i = i.replace(/\\n|\n/g, "
"), H.info("vertexText" + i);
const a = {
isNode: n,
label: R0(i).replace(
/fa[lrsb]?:fa-[\w-]+/g,
(o) => ``
),
labelStyle: e.replace("fill:", "color:")
};
return Het(a);
} else {
const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
a.setAttribute("style", e.replace("color:", "fill:"));
let s = [];
typeof i == "string" ? s = i.split(/\\n|\n|
/gi) : Array.isArray(i) ? s = i : s = [];
for (let o = 0; o < s.length; o++) {
const l = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
l.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), l.setAttribute("dy", "1em"), l.setAttribute("x", "0"), r ? l.setAttribute("class", "title-row") : l.setAttribute("class", "row"), l.textContent = s[o].trim(), a.appendChild(l);
}
return a;
}
}, Gr = (t, e, r, n) => {
let i;
r ? i = r : i = "node default";
const a = t.insert("g").attr("class", i).attr("id", e.domId || e.id), s = a.insert("g").attr("class", "label").attr("style", e.labelStyle);
let o;
typeof e.labelText > "u" ? o = "" : o = typeof e.labelText == "string" ? e.labelText : e.labelText[0];
const l = s.node().appendChild(
yn(
ci(R0(o), nt()),
e.labelStyle,
!1,
n
)
);
let u = l.getBBox();
if (Ar(nt().flowchart.htmlLabels)) {
const d = l.children[0], f = St(l);
u = d.getBoundingClientRect(), f.attr("width", u.width), f.attr("height", u.height);
}
const h = e.padding / 2;
return s.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), { shapeSvg: a, bbox: u, halfPadding: h, label: s };
}, hr = (t, e) => {
const r = e.node().getBBox();
t.width = r.width, t.height = r.height;
};
function xa(t, e, r, n) {
return t.insert("polygon", ":first-child").attr(
"points",
n.map(function(i) {
return i.x + "," + i.y;
}).join(" ")
).attr("class", "label-container").attr("transform", "translate(" + -e / 2 + "," + r / 2 + ")");
}
let Re = {}, ri = {}, NM = {};
const Get = () => {
ri = {}, NM = {}, Re = {};
}, jf = (t, e) => (H.trace(
"In isDecendant",
e,
" ",
t,
" = ",
ri[e].indexOf(t) >= 0
), ri[e].indexOf(t) >= 0), jet = (t, e) => (H.info("Decendants of ", e, " is ", ri[e]), H.info("Edge is ", t), t.v === e || t.w === e ? !1 : ri[e] ? !!(ri[e].indexOf(t.v) >= 0 || jf(t.v, e) || jf(t.w, e) || ri[e].indexOf(t.w) >= 0) : (H.debug("Tilt, ", e, ",not in decendants"), !1)), BM = (t, e, r, n) => {
H.warn(
"Copying children of ",
t,
"root",
n,
"data",
e.node(t),
n
);
const i = e.children(t) || [];
t !== n && i.push(t), H.warn("Copying (nodes) clusterId", t, "nodes", i), i.forEach((a) => {
if (e.children(a).length > 0)
BM(a, e, r, n);
else {
const s = e.node(a);
H.info("cp ", a, " to ", n, " with parent ", t), r.setNode(a, s), n !== e.parent(a) && (H.warn("Setting parent", a, e.parent(a)), r.setParent(a, e.parent(a))), t !== n && a !== t ? (H.debug("Setting parent", a, t), r.setParent(a, t)) : (H.info("In copy ", t, "root", n, "data", e.node(t), n), H.debug(
"Not Setting parent for node=",
a,
"cluster!==rootId",
t !== n,
"node!==clusterId",
a !== t
));
const o = e.edges(a);
H.debug("Copying Edges", o), o.forEach((l) => {
H.info("Edge", l);
const u = e.edge(l.v, l.w, l.name);
H.info("Edge data", u, n);
try {
jet(l, n) ? (H.info("Copying as ", l.v, l.w, u, l.name), r.setEdge(l.v, l.w, u, l.name), H.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : H.info(
"Skipping copy of edge ",
l.v,
"-->",
l.w,
" rootId: ",
n,
" clusterId:",
t
);
} catch (h) {
H.error(h);
}
});
}
H.debug("Removing node", a), e.removeNode(a);
});
}, DM = (t, e) => {
const r = e.children(t);
let n = [].concat(r);
for (let i = 0; i < r.length; i++)
NM[r[i]] = t, n = n.concat(DM(r[i], e));
return n;
}, zc = (t, e) => {
H.trace("Searching", t);
const r = e.children(t);
if (H.trace("Searching children of id ", t, r), r.length < 1)
return H.trace("This is a valid node", t), t;
for (let n = 0; n < r.length; n++) {
const i = zc(r[n], e);
if (i)
return H.trace("Found replacement for", t, " => ", i), i;
}
}, oh = (t) => !Re[t] || !Re[t].externalConnections ? t : Re[t] ? Re[t].id : t, $et = (t, e) => {
if (!t || e > 10) {
H.debug("Opting out, no graph ");
return;
} else
H.debug("Opting in, graph ");
t.nodes().forEach(function(r) {
t.children(r).length > 0 && (H.warn(
"Cluster identified",
r,
" Replacement id in edges: ",
zc(r, t)
), ri[r] = DM(r, t), Re[r] = { id: zc(r, t), clusterData: t.node(r) });
}), t.nodes().forEach(function(r) {
const n = t.children(r), i = t.edges();
n.length > 0 ? (H.debug("Cluster identified", r, ri), i.forEach((a) => {
if (a.v !== r && a.w !== r) {
const s = jf(a.v, r), o = jf(a.w, r);
s ^ o && (H.warn("Edge: ", a, " leaves cluster ", r), H.warn("Decendants of XXX ", r, ": ", ri[r]), Re[r].externalConnections = !0);
}
})) : H.debug("Not a cluster ", r, ri);
}), t.edges().forEach(function(r) {
const n = t.edge(r);
H.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(r)), H.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(t.edge(r)));
let i = r.v, a = r.w;
if (H.warn(
"Fix XXX",
Re,
"ids:",
r.v,
r.w,
"Translateing: ",
Re[r.v],
" --- ",
Re[r.w]
), Re[r.v] && Re[r.w] && Re[r.v] === Re[r.w]) {
H.warn("Fixing and trixing link to self - removing XXX", r.v, r.w, r.name), H.warn("Fixing and trixing - removing XXX", r.v, r.w, r.name), i = oh(r.v), a = oh(r.w), t.removeEdge(r.v, r.w, r.name);
const s = r.w + "---" + r.v;
t.setNode(s, {
domId: s,
id: s,
labelStyle: "",
labelText: n.label,
padding: 0,
shape: "labelRect",
style: ""
});
const o = JSON.parse(JSON.stringify(n)), l = JSON.parse(JSON.stringify(n));
o.label = "", o.arrowTypeEnd = "none", l.label = "", o.fromCluster = r.v, l.toCluster = r.v, t.setEdge(i, s, o, r.name + "-cyclic-special"), t.setEdge(s, a, l, r.name + "-cyclic-special");
} else
(Re[r.v] || Re[r.w]) && (H.warn("Fixing and trixing - removing XXX", r.v, r.w, r.name), i = oh(r.v), a = oh(r.w), t.removeEdge(r.v, r.w, r.name), i !== r.v && (n.fromCluster = r.v), a !== r.w && (n.toCluster = r.w), H.warn("Fix Replacing with XXX", i, a, r.name), t.setEdge(i, a, n, r.name));
}), H.warn("Adjusted Graph", ur.json.write(t)), OM(t, 0), H.trace(Re);
}, OM = (t, e) => {
if (H.warn("extractor - ", e, ur.json.write(t), t.children("D")), e > 10) {
H.error("Bailing out");
return;
}
let r = t.nodes(), n = !1;
for (let i = 0; i < r.length; i++) {
const a = r[i], s = t.children(a);
n = n || s.length > 0;
}
if (!n) {
H.debug("Done, no node has children", t.nodes());
return;
}
H.debug("Nodes = ", r, e);
for (let i = 0; i < r.length; i++) {
const a = r[i];
if (H.debug(
"Extracting node",
a,
Re,
Re[a] && !Re[a].externalConnections,
!t.parent(a),
t.node(a),
t.children("D"),
" Depth ",
e
), !Re[a])
H.debug("Not a cluster", a, e);
else if (!Re[a].externalConnections && t.children(a) && t.children(a).length > 0) {
H.warn(
"Cluster without external connections, without a parent and with children",
a,
e
);
let o = t.graph().rankdir === "TB" ? "LR" : "TB";
Re[a] && Re[a].clusterData && Re[a].clusterData.dir && (o = Re[a].clusterData.dir, H.warn("Fixing dir", Re[a].clusterData.dir, o));
const l = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: o,
nodesep: 50,
ranksep: 50,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
H.warn("Old graph before copy", ur.json.write(t)), BM(a, t, l, a), t.setNode(a, {
clusterNode: !0,
id: a,
clusterData: Re[a].clusterData,
labelText: Re[a].labelText,
graph: l
}), H.warn("New graph after copy node: (", a, ")", ur.json.write(l)), H.debug("Old graph after copy", ur.json.write(t));
} else
H.warn(
"Cluster ** ",
a,
" **not meeting the criteria !externalConnections:",
!Re[a].externalConnections,
" no parent: ",
!t.parent(a),
" children ",
t.children(a) && t.children(a).length > 0,
t.children("D"),
e
), H.debug(Re);
}
r = t.nodes(), H.warn("New list of nodes", r);
for (let i = 0; i < r.length; i++) {
const a = r[i], s = t.node(a);
H.warn(" Now next level", a, s), s.clusterNode && OM(s.graph, e + 1);
}
}, FM = (t, e) => {
if (e.length === 0)
return [];
let r = Object.assign(e);
return e.forEach((n) => {
const i = t.children(n), a = FM(t, i);
r = r.concat(a);
}), r;
}, Xet = (t) => FM(t, t.children());
function Ket(t, e) {
return t.intersect(e);
}
function PM(t, e, r, n) {
var i = t.x, a = t.y, s = i - n.x, o = a - n.y, l = Math.sqrt(e * e * o * o + r * r * s * s), u = Math.abs(e * r * s / l);
n.x < i && (u = -u);
var h = Math.abs(e * r * o / l);
return n.y < a && (h = -h), { x: i + u, y: a + h };
}
function Zet(t, e, r) {
return PM(t, e, e, r);
}
function Qet(t, e, r, n) {
var i, a, s, o, l, u, h, d, f, p, m, _, y, b, x;
if (i = e.y - t.y, s = t.x - e.x, l = e.x * t.y - t.x * e.y, f = i * r.x + s * r.y + l, p = i * n.x + s * n.y + l, !(f !== 0 && p !== 0 && Bk(f, p)) && (a = n.y - r.y, o = r.x - n.x, u = n.x * r.y - r.x * n.y, h = a * t.x + o * t.y + u, d = a * e.x + o * e.y + u, !(h !== 0 && d !== 0 && Bk(h, d)) && (m = i * o - a * s, m !== 0)))
return _ = Math.abs(m / 2), y = s * u - o * l, b = y < 0 ? (y - _) / m : (y + _) / m, y = a * l - i * u, x = y < 0 ? (y - _) / m : (y + _) / m, { x: b, y: x };
}
function Bk(t, e) {
return t * e > 0;
}
function Jet(t, e, r) {
var n = t.x, i = t.y, a = [], s = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
typeof e.forEach == "function" ? e.forEach(function(m) {
s = Math.min(s, m.x), o = Math.min(o, m.y);
}) : (s = Math.min(s, e.x), o = Math.min(o, e.y));
for (var l = n - t.width / 2 - s, u = i - t.height / 2 - o, h = 0; h < e.length; h++) {
var d = e[h], f = e[h < e.length - 1 ? h + 1 : 0], p = Qet(
t,
r,
{ x: l + d.x, y: u + d.y },
{ x: l + f.x, y: u + f.y }
);
p && a.push(p);
}
return a.length ? (a.length > 1 && a.sort(function(m, _) {
var y = m.x - r.x, b = m.y - r.y, x = Math.sqrt(y * y + b * b), k = _.x - r.x, T = _.y - r.y, C = Math.sqrt(k * k + T * T);
return x < C ? -1 : x === C ? 0 : 1;
}), a[0]) : t;
}
const fu = (t, e) => {
var r = t.x, n = t.y, i = e.x - r, a = e.y - n, s = t.width / 2, o = t.height / 2, l, u;
return Math.abs(a) * s > Math.abs(i) * o ? (a < 0 && (o = -o), l = a === 0 ? 0 : o * i / a, u = o) : (i < 0 && (s = -s), l = s, u = i === 0 ? 0 : s * a / i), { x: r + l, y: n + u };
}, or = {
node: Ket,
circle: Zet,
ellipse: PM,
polygon: Jet,
rect: fu
}, trt = (t, e) => {
const { shapeSvg: r, bbox: n, halfPadding: i } = Gr(t, e, "node " + e.classes, !0);
H.info("Classes = ", e.classes);
const a = r.insert("rect", ":first-child");
return a.attr("rx", e.rx).attr("ry", e.ry).attr("x", -n.width / 2 - i).attr("y", -n.height / 2 - i).attr("width", n.width + e.padding).attr("height", n.height + e.padding), hr(e, a), e.intersect = function(s) {
return or.rect(e, s);
}, r;
}, ert = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = i + a, o = [
{ x: s / 2, y: 0 },
{ x: s, y: -s / 2 },
{ x: s / 2, y: -s },
{ x: 0, y: -s / 2 }
];
H.info("Question main (Circle)");
const l = xa(r, s, s, o);
return l.attr("style", e.style), hr(e, l), e.intersect = function(u) {
return H.warn("Intersect called"), or.polygon(e, o, u);
}, r;
}, rrt = (t, e) => {
const r = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id), n = 28, i = [
{ x: 0, y: n / 2 },
{ x: n / 2, y: 0 },
{ x: 0, y: -n / 2 },
{ x: -n / 2, y: 0 }
];
return r.insert("polygon", ":first-child").attr(
"points",
i.map(function(s) {
return s.x + "," + s.y;
}).join(" ")
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), e.width = 28, e.height = 28, e.intersect = function(s) {
return or.circle(e, 14, s);
}, r;
}, nrt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = 4, a = n.height + e.padding, s = a / i, o = n.width + 2 * s + e.padding, l = [
{ x: s, y: 0 },
{ x: o - s, y: 0 },
{ x: o, y: -a / 2 },
{ x: o - s, y: -a },
{ x: s, y: -a },
{ x: 0, y: -a / 2 }
], u = xa(r, o, a, l);
return u.attr("style", e.style), hr(e, u), e.intersect = function(h) {
return or.polygon(e, l, h);
}, r;
}, irt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: -a / 2, y: 0 },
{ x: i, y: 0 },
{ x: i, y: -a },
{ x: -a / 2, y: -a },
{ x: 0, y: -a / 2 }
];
return xa(r, i, a, s).attr("style", e.style), e.width = i + a, e.height = a, e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, art = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: -2 * a / 6, y: 0 },
{ x: i - a / 6, y: 0 },
{ x: i + 2 * a / 6, y: -a },
{ x: a / 6, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, srt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: 2 * a / 6, y: 0 },
{ x: i + a / 6, y: 0 },
{ x: i - 2 * a / 6, y: -a },
{ x: -a / 6, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, ort = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: -2 * a / 6, y: 0 },
{ x: i + 2 * a / 6, y: 0 },
{ x: i - a / 6, y: -a },
{ x: a / 6, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, lrt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: a / 6, y: 0 },
{ x: i - a / 6, y: 0 },
{ x: i + 2 * a / 6, y: -a },
{ x: -2 * a / 6, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, crt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: 0, y: 0 },
{ x: i + a / 2, y: 0 },
{ x: i, y: -a / 2 },
{ x: i + a / 2, y: -a },
{ x: 0, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, urt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = i / 2, s = a / (2.5 + i / 50), o = n.height + s + e.padding, l = "M 0," + s + " a " + a + "," + s + " 0,0,0 " + i + " 0 a " + a + "," + s + " 0,0,0 " + -i + " 0 l 0," + o + " a " + a + "," + s + " 0,0,0 " + i + " 0 l 0," + -o, u = r.attr("label-offset-y", s).insert("path", ":first-child").attr("style", e.style).attr("d", l).attr("transform", "translate(" + -i / 2 + "," + -(o / 2 + s) + ")");
return hr(e, u), e.intersect = function(h) {
const d = or.rect(e, h), f = d.x - e.x;
if (a != 0 && (Math.abs(f) < e.width / 2 || Math.abs(f) == e.width / 2 && Math.abs(d.y - e.y) > e.height / 2 - s)) {
let p = s * s * (1 - f * f / (a * a));
p != 0 && (p = Math.sqrt(p)), p = s - p, h.y - e.y > 0 && (p = -p), d.y += p;
}
return d;
}, r;
}, hrt = (t, e) => {
const { shapeSvg: r, bbox: n, halfPadding: i } = Gr(t, e, "node " + e.classes, !0);
H.trace("Classes = ", e.classes);
const a = r.insert("rect", ":first-child"), s = n.width + e.padding, o = n.height + e.padding;
if (a.attr("class", "basic label-container").attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("x", -n.width / 2 - i).attr("y", -n.height / 2 - i).attr("width", s).attr("height", o), e.props) {
const l = new Set(Object.keys(e.props));
e.props.borders && (qM(a, e.props.borders, s, o), l.delete("borders")), l.forEach((u) => {
H.warn(`Unknown node property ${u}`);
});
}
return hr(e, a), e.intersect = function(l) {
return or.rect(e, l);
}, r;
}, frt = (t, e) => {
const { shapeSvg: r } = Gr(t, e, "label", !0);
H.trace("Classes = ", e.classes);
const n = r.insert("rect", ":first-child"), i = 0, a = 0;
if (n.attr("width", i).attr("height", a), r.attr("class", "label edgeLabel"), e.props) {
const s = new Set(Object.keys(e.props));
e.props.borders && (qM(n, e.props.borders, i, a), s.delete("borders")), s.forEach((o) => {
H.warn(`Unknown node property ${o}`);
});
}
return hr(e, n), e.intersect = function(s) {
return or.rect(e, s);
}, r;
};
function qM(t, e, r, n) {
const i = [], a = (o) => {
i.push(o), i.push(0);
}, s = (o) => {
i.push(0), i.push(o);
};
e.includes("t") ? (H.debug("add top border"), a(r)) : s(r), e.includes("r") ? (H.debug("add right border"), a(n)) : s(n), e.includes("b") ? (H.debug("add bottom border"), a(r)) : s(r), e.includes("l") ? (H.debug("add left border"), a(n)) : s(n), t.attr("stroke-dasharray", i.join(" "));
}
const drt = (t, e) => {
let r;
e.classes ? r = "node " + e.classes : r = "node default";
const n = t.insert("g").attr("class", r).attr("id", e.domId || e.id), i = n.insert("rect", ":first-child"), a = n.insert("line"), s = n.insert("g").attr("class", "label"), o = e.labelText.flat ? e.labelText.flat() : e.labelText;
let l = "";
typeof o == "object" ? l = o[0] : l = o, H.info("Label text abc79", l, o, typeof o == "object");
const u = s.node().appendChild(yn(l, e.labelStyle, !0, !0));
let h = { width: 0, height: 0 };
if (Ar(nt().flowchart.htmlLabels)) {
const _ = u.children[0], y = St(u);
h = _.getBoundingClientRect(), y.attr("width", h.width), y.attr("height", h.height);
}
H.info("Text 2", o);
const d = o.slice(1, o.length);
let f = u.getBBox();
const p = s.node().appendChild(
yn(d.join ? d.join("
") : d, e.labelStyle, !0, !0)
);
if (Ar(nt().flowchart.htmlLabels)) {
const _ = p.children[0], y = St(p);
h = _.getBoundingClientRect(), y.attr("width", h.width), y.attr("height", h.height);
}
const m = e.padding / 2;
return St(p).attr(
"transform",
"translate( " + (h.width > f.width ? 0 : (f.width - h.width) / 2) + ", " + (f.height + m + 5) + ")"
), St(u).attr(
"transform",
"translate( " + (h.width < f.width ? 0 : -(f.width - h.width) / 2) + ", " + 0 + ")"
), h = s.node().getBBox(), s.attr(
"transform",
"translate(" + -h.width / 2 + ", " + (-h.height / 2 - m + 3) + ")"
), i.attr("class", "outer title-state").attr("x", -h.width / 2 - m).attr("y", -h.height / 2 - m).attr("width", h.width + e.padding).attr("height", h.height + e.padding), a.attr("class", "divider").attr("x1", -h.width / 2 - m).attr("x2", h.width / 2 + m).attr("y1", -h.height / 2 - m + f.height + m).attr("y2", -h.height / 2 - m + f.height + m), hr(e, i), e.intersect = function(_) {
return or.rect(e, _);
}, n;
}, prt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.height + e.padding, a = n.width + i / 4 + e.padding, s = r.insert("rect", ":first-child").attr("style", e.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i);
return hr(e, s), e.intersect = function(o) {
return or.rect(e, o);
}, r;
}, grt = (t, e) => {
const { shapeSvg: r, bbox: n, halfPadding: i } = Gr(t, e, void 0, !0), a = r.insert("circle", ":first-child");
return a.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("r", n.width / 2 + i).attr("width", n.width + e.padding).attr("height", n.height + e.padding), H.info("Circle main"), hr(e, a), e.intersect = function(s) {
return H.info("Circle intersect", e, n.width / 2 + i, s), or.circle(e, n.width / 2 + i, s);
}, r;
}, yrt = (t, e) => {
const { shapeSvg: r, bbox: n, halfPadding: i } = Gr(t, e, void 0, !0), a = 5, s = r.insert("g", ":first-child"), o = s.insert("circle"), l = s.insert("circle");
return o.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("r", n.width / 2 + i + a).attr("width", n.width + e.padding + a * 2).attr("height", n.height + e.padding + a * 2), l.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("r", n.width / 2 + i).attr("width", n.width + e.padding).attr("height", n.height + e.padding), H.info("DoubleCircle main"), hr(e, o), e.intersect = function(u) {
return H.info("DoubleCircle intersect", e, n.width / 2 + i + a, u), or.circle(e, n.width / 2 + i + a, u);
}, r;
}, mrt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: 0, y: 0 },
{ x: i, y: 0 },
{ x: i, y: -a },
{ x: 0, y: -a },
{ x: 0, y: 0 },
{ x: -8, y: 0 },
{ x: i + 8, y: 0 },
{ x: i + 8, y: -a },
{ x: -8, y: -a },
{ x: -8, y: 0 }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, brt = (t, e) => {
const r = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id), n = r.insert("circle", ":first-child");
return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), hr(e, n), e.intersect = function(i) {
return or.circle(e, 7, i);
}, r;
}, Dk = (t, e, r) => {
const n = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id);
let i = 70, a = 10;
r === "LR" && (i = 10, a = 70);
const s = n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join");
return hr(e, s), e.height = e.height + e.padding / 2, e.width = e.width + e.padding / 2, e.intersect = function(o) {
return or.rect(e, o);
}, n;
}, _rt = (t, e) => {
const r = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id), n = r.insert("circle", ":first-child"), i = r.insert("circle", ":first-child");
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), hr(e, i), e.intersect = function(a) {
return or.circle(e, 7, a);
}, r;
}, vrt = (t, e) => {
const r = e.padding / 2, n = 4, i = 8;
let a;
e.classes ? a = "node " + e.classes : a = "node default";
const s = t.insert("g").attr("class", a).attr("id", e.domId || e.id), o = s.insert("rect", ":first-child"), l = s.insert("line"), u = s.insert("line");
let h = 0, d = n;
const f = s.insert("g").attr("class", "label");
let p = 0;
const m = e.classData.annotations && e.classData.annotations[0], _ = e.classData.annotations[0] ? "\xAB" + e.classData.annotations[0] + "\xBB" : "", y = f.node().appendChild(yn(_, e.labelStyle, !0, !0));
let b = y.getBBox();
if (Ar(nt().flowchart.htmlLabels)) {
const R = y.children[0], A = St(y);
b = R.getBoundingClientRect(), A.attr("width", b.width), A.attr("height", b.height);
}
e.classData.annotations[0] && (d += b.height + n, h += b.width);
let x = e.classData.id;
e.classData.type !== void 0 && e.classData.type !== "" && (nt().flowchart.htmlLabels ? x += "<" + e.classData.type + ">" : x += "<" + e.classData.type + ">");
const k = f.node().appendChild(yn(x, e.labelStyle, !0, !0));
St(k).attr("class", "classTitle");
let T = k.getBBox();
if (Ar(nt().flowchart.htmlLabels)) {
const R = k.children[0], A = St(k);
T = R.getBoundingClientRect(), A.attr("width", T.width), A.attr("height", T.height);
}
d += T.height + n, T.width > h && (h = T.width);
const C = [];
e.classData.members.forEach((R) => {
const A = Gf(R);
let L = A.displayText;
nt().flowchart.htmlLabels && (L = L.replace(//g, ">"));
const v = f.node().appendChild(
yn(
L,
A.cssStyle ? A.cssStyle : e.labelStyle,
!0,
!0
)
);
let B = v.getBBox();
if (Ar(nt().flowchart.htmlLabels)) {
const w = v.children[0], D = St(v);
B = w.getBoundingClientRect(), D.attr("width", B.width), D.attr("height", B.height);
}
B.width > h && (h = B.width), d += B.height + n, C.push(v);
}), d += i;
const M = [];
if (e.classData.methods.forEach((R) => {
const A = Gf(R);
let L = A.displayText;
nt().flowchart.htmlLabels && (L = L.replace(//g, ">"));
const v = f.node().appendChild(
yn(
L,
A.cssStyle ? A.cssStyle : e.labelStyle,
!0,
!0
)
);
let B = v.getBBox();
if (Ar(nt().flowchart.htmlLabels)) {
const w = v.children[0], D = St(v);
B = w.getBoundingClientRect(), D.attr("width", B.width), D.attr("height", B.height);
}
B.width > h && (h = B.width), d += B.height + n, M.push(v);
}), d += i, m) {
let R = (h - b.width) / 2;
St(y).attr(
"transform",
"translate( " + (-1 * h / 2 + R) + ", " + -1 * d / 2 + ")"
), p = b.height + n;
}
let S = (h - T.width) / 2;
return St(k).attr(
"transform",
"translate( " + (-1 * h / 2 + S) + ", " + (-1 * d / 2 + p) + ")"
), p += T.height + n, l.attr("class", "divider").attr("x1", -h / 2 - r).attr("x2", h / 2 + r).attr("y1", -d / 2 - r + i + p).attr("y2", -d / 2 - r + i + p), p += i, C.forEach((R) => {
St(R).attr(
"transform",
"translate( " + -h / 2 + ", " + (-1 * d / 2 + p + i / 2) + ")"
), p += T.height + n;
}), p += i, u.attr("class", "divider").attr("x1", -h / 2 - r).attr("x2", h / 2 + r).attr("y1", -d / 2 - r + i + p).attr("y2", -d / 2 - r + i + p), p += i, M.forEach((R) => {
St(R).attr(
"transform",
"translate( " + -h / 2 + ", " + (-1 * d / 2 + p) + ")"
), p += T.height + n;
}), o.attr("class", "outer title-state").attr("x", -h / 2 - r).attr("y", -(d / 2) - r).attr("width", h + e.padding).attr("height", d + e.padding), hr(e, o), e.intersect = function(R) {
return or.rect(e, R);
}, s;
}, Ok = {
question: ert,
rect: hrt,
labelRect: frt,
rectWithTitle: drt,
choice: rrt,
circle: grt,
doublecircle: yrt,
stadium: prt,
hexagon: nrt,
rect_left_inv_arrow: irt,
lean_right: art,
lean_left: srt,
trapezoid: ort,
inv_trapezoid: lrt,
rect_right_inv_arrow: crt,
cylinder: urt,
start: brt,
end: _rt,
note: trt,
subroutine: mrt,
fork: Dk,
join: Dk,
class_box: vrt
};
let So = {};
const xrt = (t, e, r) => {
let n, i;
if (e.link) {
let a;
nt().securityLevel === "sandbox" ? a = "_top" : e.linkTarget && (a = e.linkTarget || "_blank"), n = t.insert("svg:a").attr("xlink:href", e.link).attr("target", a), i = Ok[e.shape](n, e, r);
} else
i = Ok[e.shape](t, e, r), n = i;
e.tooltip && i.attr("title", e.tooltip), e.class && i.attr("class", "node default " + e.class), So[e.id] = n, e.haveCallback && So[e.id].attr("class", So[e.id].attr("class") + " clickable");
}, krt = (t, e) => {
So[e.id] = t;
}, wrt = () => {
So = {};
}, Fk = (t) => {
const e = So[t.id];
H.trace(
"Transforming node",
t.diff,
t,
"translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")"
);
const r = 8, n = t.diff || 0;
return t.clusterNode ? e.attr(
"transform",
"translate(" + (t.x + n - t.width / 2) + ", " + (t.y - t.height / 2 - r) + ")"
) : e.attr("transform", "translate(" + t.x + ", " + t.y + ")"), n;
}, Trt = (t, e) => {
H.trace("Creating subgraph rect for ", e.id, e);
const r = t.insert("g").attr("class", "cluster" + (e.class ? " " + e.class : "")).attr("id", e.id), n = r.insert("rect", ":first-child"), i = r.insert("g").attr("class", "cluster-label"), a = i.node().appendChild(yn(e.labelText, e.labelStyle, void 0, !0));
let s = a.getBBox();
if (Ar(nt().flowchart.htmlLabels)) {
const d = a.children[0], f = St(a);
s = d.getBoundingClientRect(), f.attr("width", s.width), f.attr("height", s.height);
}
const o = 0 * e.padding, l = o / 2, u = e.width <= s.width + o ? s.width + o : e.width;
e.width <= s.width + o ? e.diff = (s.width - e.width) / 2 - e.padding / 2 : e.diff = -e.padding / 2, H.trace("Data ", e, JSON.stringify(e)), n.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("x", e.x - u / 2).attr("y", e.y - e.height / 2 - l).attr("width", u).attr("height", e.height + o), i.attr(
"transform",
"translate(" + (e.x - s.width / 2) + ", " + (e.y - e.height / 2 + e.padding / 3) + ")"
);
const h = n.node().getBBox();
return e.width = h.width, e.height = h.height, e.intersect = function(d) {
return fu(e, d);
}, r;
}, Ert = (t, e) => {
const r = t.insert("g").attr("class", "note-cluster").attr("id", e.id), n = r.insert("rect", ":first-child"), i = 0 * e.padding, a = i / 2;
n.attr("rx", e.rx).attr("ry", e.ry).attr("x", e.x - e.width / 2 - a).attr("y", e.y - e.height / 2 - a).attr("width", e.width + i).attr("height", e.height + i).attr("fill", "none");
const s = n.node().getBBox();
return e.width = s.width, e.height = s.height, e.intersect = function(o) {
return fu(e, o);
}, r;
}, Crt = (t, e) => {
const r = t.insert("g").attr("class", e.classes).attr("id", e.id), n = r.insert("rect", ":first-child"), i = r.insert("g").attr("class", "cluster-label"), a = r.append("rect"), s = i.node().appendChild(yn(e.labelText, e.labelStyle, void 0, !0));
let o = s.getBBox();
if (Ar(nt().flowchart.htmlLabels)) {
const f = s.children[0], p = St(s);
o = f.getBoundingClientRect(), p.attr("width", o.width), p.attr("height", o.height);
}
o = s.getBBox();
const l = 0 * e.padding, u = l / 2, h = e.width <= o.width + e.padding ? o.width + e.padding : e.width;
e.width <= o.width + e.padding ? e.diff = (o.width + e.padding * 0 - e.width) / 2 : e.diff = -e.padding / 2, n.attr("class", "outer").attr("x", e.x - h / 2 - u).attr("y", e.y - e.height / 2 - u).attr("width", h + l).attr("height", e.height + l), a.attr("class", "inner").attr("x", e.x - h / 2 - u).attr("y", e.y - e.height / 2 - u + o.height - 1).attr("width", h + l).attr("height", e.height + l - o.height - 3), i.attr(
"transform",
"translate(" + (e.x - o.width / 2) + ", " + (e.y - e.height / 2 - e.padding / 3 + (Ar(nt().flowchart.htmlLabels) ? 5 : 3)) + ")"
);
const d = n.node().getBBox();
return e.height = d.height, e.intersect = function(f) {
return fu(e, f);
}, r;
}, Srt = (t, e) => {
const r = t.insert("g").attr("class", e.classes).attr("id", e.id), n = r.insert("rect", ":first-child"), i = 0 * e.padding, a = i / 2;
n.attr("class", "divider").attr("x", e.x - e.width / 2 - a).attr("y", e.y - e.height / 2).attr("width", e.width + i).attr("height", e.height + i);
const s = n.node().getBBox();
return e.width = s.width, e.height = s.height, e.diff = -e.padding / 2, e.intersect = function(o) {
return fu(e, o);
}, r;
}, Art = { rect: Trt, roundedWithTitle: Crt, noteGroup: Ert, divider: Srt };
let VM = {};
const Mrt = (t, e) => {
H.trace("Inserting cluster");
const r = e.shape || "rect";
VM[e.id] = Art[r](t, e);
}, Lrt = () => {
VM = {};
};
let $f = {}, Br = {};
const Rrt = () => {
$f = {}, Br = {};
}, Irt = (t, e) => {
const r = yn(e.label, e.labelStyle), n = t.insert("g").attr("class", "edgeLabel"), i = n.insert("g").attr("class", "label");
i.node().appendChild(r);
let a = r.getBBox();
if (Ar(nt().flowchart.htmlLabels)) {
const o = r.children[0], l = St(r);
a = o.getBoundingClientRect(), l.attr("width", a.width), l.attr("height", a.height);
}
i.attr("transform", "translate(" + -a.width / 2 + ", " + -a.height / 2 + ")"), $f[e.id] = n, e.width = a.width, e.height = a.height;
let s;
if (e.startLabelLeft) {
const o = yn(e.startLabelLeft, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
s = u.node().appendChild(o);
const h = o.getBBox();
u.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), Br[e.id] || (Br[e.id] = {}), Br[e.id].startLeft = l, lh(s, e.startLabelLeft);
}
if (e.startLabelRight) {
const o = yn(e.startLabelRight, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
s = l.node().appendChild(o), u.node().appendChild(o);
const h = o.getBBox();
u.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), Br[e.id] || (Br[e.id] = {}), Br[e.id].startRight = l, lh(s, e.startLabelRight);
}
if (e.endLabelLeft) {
const o = yn(e.endLabelLeft, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
s = u.node().appendChild(o);
const h = o.getBBox();
u.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), l.node().appendChild(o), Br[e.id] || (Br[e.id] = {}), Br[e.id].endLeft = l, lh(s, e.endLabelLeft);
}
if (e.endLabelRight) {
const o = yn(e.endLabelRight, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
s = u.node().appendChild(o);
const h = o.getBBox();
u.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), l.node().appendChild(o), Br[e.id] || (Br[e.id] = {}), Br[e.id].endRight = l, lh(s, e.endLabelRight);
}
};
function lh(t, e) {
nt().flowchart.htmlLabels && t && (t.style.width = e.length * 9 + "px", t.style.height = "12px");
}
const Nrt = (t, e) => {
H.info("Moving label abc78 ", t.id, t.label, $f[t.id]);
let r = e.updatedPath ? e.updatedPath : e.originalPath;
if (t.label) {
const n = $f[t.id];
let i = t.x, a = t.y;
if (r) {
const s = Se.calcLabelPosition(r);
H.info("Moving label from (", i, ",", a, ") to (", s.x, ",", s.y, ") abc78");
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
if (t.startLabelLeft) {
const n = Br[t.id].startLeft;
let i = t.x, a = t.y;
if (r) {
const s = Se.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
i = s.x, a = s.y;
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
if (t.startLabelRight) {
const n = Br[t.id].startRight;
let i = t.x, a = t.y;
if (r) {
const s = Se.calcTerminalLabelPosition(
t.arrowTypeStart ? 10 : 0,
"start_right",
r
);
i = s.x, a = s.y;
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
if (t.endLabelLeft) {
const n = Br[t.id].endLeft;
let i = t.x, a = t.y;
if (r) {
const s = Se.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
i = s.x, a = s.y;
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
if (t.endLabelRight) {
const n = Br[t.id].endRight;
let i = t.x, a = t.y;
if (r) {
const s = Se.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
i = s.x, a = s.y;
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
}, Brt = (t, e) => {
const r = t.x, n = t.y, i = Math.abs(e.x - r), a = Math.abs(e.y - n), s = t.width / 2, o = t.height / 2;
return i >= s || a >= o;
}, Drt = (t, e, r) => {
H.warn(`intersection calc abc89:
outsidePoint: ${JSON.stringify(e)}
insidePoint : ${JSON.stringify(r)}
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);
const n = t.x, i = t.y, a = Math.abs(n - r.x), s = t.width / 2;
let o = r.x < e.x ? s - a : s + a;
const l = t.height / 2, u = Math.abs(e.y - r.y), h = Math.abs(e.x - r.x);
if (Math.abs(i - e.y) * s > Math.abs(n - e.x) * l) {
let d = r.y < e.y ? e.y - l - i : i - l - e.y;
o = h * d / u;
const f = {
x: r.x < e.x ? r.x + o : r.x - h + o,
y: r.y < e.y ? r.y + u - d : r.y - u + d
};
return o === 0 && (f.x = e.x, f.y = e.y), h === 0 && (f.x = e.x), u === 0 && (f.y = e.y), H.warn(`abc89 topp/bott calc, Q ${u}, q ${d}, R ${h}, r ${o}`, f), f;
} else {
r.x < e.x ? o = e.x - s - n : o = n - s - e.x;
let d = u * o / h, f = r.x < e.x ? r.x + h - o : r.x - h + o, p = r.y < e.y ? r.y + d : r.y - d;
return H.warn(`sides calc abc89, Q ${u}, q ${d}, R ${h}, r ${o}`, { _x: f, _y: p }), o === 0 && (f = e.x, p = e.y), h === 0 && (f = e.x), u === 0 && (p = e.y), { x: f, y: p };
}
}, Pk = (t, e) => {
H.warn("abc88 cutPathAtIntersect", t, e);
let r = [], n = t[0], i = !1;
return t.forEach((a) => {
if (H.info("abc88 checking point", a, e), !Brt(e, a) && !i) {
const s = Drt(e, n, a);
H.warn("abc88 inside", a, n, s), H.warn("abc88 intersection", s);
let o = !1;
r.forEach((l) => {
o = o || l.x === s.x && l.y === s.y;
}), r.find((l) => l.x === s.x && l.y === s.y) ? H.warn("abc88 no intersect", s, r) : r.push(s), i = !0;
} else
H.warn("abc88 outside", a, n), n = a, i || r.push(a);
}), H.warn("abc88 returning points", r), r;
}, Ort = function(t, e, r, n, i, a) {
let s = r.points, o = !1;
const l = a.node(e.v);
var u = a.node(e.w);
H.info("abc88 InsertEdge: ", r), u.intersect && l.intersect && (s = s.slice(1, r.points.length - 1), s.unshift(l.intersect(s[0])), H.info(
"Last point",
s[s.length - 1],
u,
u.intersect(s[s.length - 1])
), s.push(u.intersect(s[s.length - 1]))), r.toCluster && (H.info("to cluster abc88", n[r.toCluster]), s = Pk(r.points, n[r.toCluster].node), o = !0), r.fromCluster && (H.info("from cluster abc88", n[r.fromCluster]), s = Pk(s.reverse(), n[r.fromCluster].node).reverse(), o = !0);
const h = s.filter((b) => !Number.isNaN(b.y));
let d;
i === "graph" || i === "flowchart" ? d = r.curve || Ps : d = Ps;
const f = ns().x(function(b) {
return b.x;
}).y(function(b) {
return b.y;
}).curve(d);
let p;
switch (r.thickness) {
case "normal":
p = "edge-thickness-normal";
break;
case "thick":
p = "edge-thickness-thick";
break;
default:
p = "";
}
switch (r.pattern) {
case "solid":
p += " edge-pattern-solid";
break;
case "dotted":
p += " edge-pattern-dotted";
break;
case "dashed":
p += " edge-pattern-dashed";
break;
}
const m = t.append("path").attr("d", f(h)).attr("id", r.id).attr("class", " " + p + (r.classes ? " " + r.classes : "")).attr("style", r.style);
let _ = "";
switch ((nt().flowchart.arrowMarkerAbsolute || nt().state.arrowMarkerAbsolute) && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), H.info("arrowTypeStart", r.arrowTypeStart), H.info("arrowTypeEnd", r.arrowTypeEnd), r.arrowTypeStart) {
case "arrow_cross":
m.attr("marker-start", "url(" + _ + "#" + i + "-crossStart)");
break;
case "arrow_point":
m.attr("marker-start", "url(" + _ + "#" + i + "-pointStart)");
break;
case "arrow_barb":
m.attr("marker-start", "url(" + _ + "#" + i + "-barbStart)");
break;
case "arrow_circle":
m.attr("marker-start", "url(" + _ + "#" + i + "-circleStart)");
break;
case "aggregation":
m.attr("marker-start", "url(" + _ + "#" + i + "-aggregationStart)");
break;
case "extension":
m.attr("marker-start", "url(" + _ + "#" + i + "-extensionStart)");
break;
case "composition":
m.attr("marker-start", "url(" + _ + "#" + i + "-compositionStart)");
break;
case "dependency":
m.attr("marker-start", "url(" + _ + "#" + i + "-dependencyStart)");
break;
case "lollipop":
m.attr("marker-start", "url(" + _ + "#" + i + "-lollipopStart)");
break;
}
switch (r.arrowTypeEnd) {
case "arrow_cross":
m.attr("marker-end", "url(" + _ + "#" + i + "-crossEnd)");
break;
case "arrow_point":
m.attr("marker-end", "url(" + _ + "#" + i + "-pointEnd)");
break;
case "arrow_barb":
m.attr("marker-end", "url(" + _ + "#" + i + "-barbEnd)");
break;
case "arrow_circle":
m.attr("marker-end", "url(" + _ + "#" + i + "-circleEnd)");
break;
case "aggregation":
m.attr("marker-end", "url(" + _ + "#" + i + "-aggregationEnd)");
break;
case "extension":
m.attr("marker-end", "url(" + _ + "#" + i + "-extensionEnd)");
break;
case "composition":
m.attr("marker-end", "url(" + _ + "#" + i + "-compositionEnd)");
break;
case "dependency":
m.attr("marker-end", "url(" + _ + "#" + i + "-dependencyEnd)");
break;
case "lollipop":
m.attr("marker-end", "url(" + _ + "#" + i + "-lollipopEnd)");
break;
}
let y = {};
return o && (y.updatedPath = s), y.originalPath = r.points, y;
}, zM = (t, e, r, n) => {
H.info("Graph in recursive render: XXX", ur.json.write(e), n);
const i = e.graph().rankdir;
H.trace("Dir in recursive render - dir:", i);
const a = t.insert("g").attr("class", "root");
e.nodes() ? H.info("Recursive render XXX", e.nodes()) : H.info("No nodes found for", e), e.edges().length > 0 && H.trace("Recursive edges", e.edge(e.edges()[0]));
const s = a.insert("g").attr("class", "clusters"), o = a.insert("g").attr("class", "edgePaths"), l = a.insert("g").attr("class", "edgeLabels"), u = a.insert("g").attr("class", "nodes");
e.nodes().forEach(function(d) {
const f = e.node(d);
if (typeof n < "u") {
const p = JSON.parse(JSON.stringify(n.clusterData));
H.info("Setting data for cluster XXX (", d, ") ", p, n), e.setNode(n.id, p), e.parent(d) || (H.trace("Setting parent", d, n.id), e.setParent(d, n.id, p));
}
if (H.info("(Insert) Node XXX" + d + ": " + JSON.stringify(e.node(d))), f && f.clusterNode) {
H.info("Cluster identified", d, f.width, e.node(d));
const p = zM(u, f.graph, r, e.node(d)), m = p.elem;
hr(f, m), f.diff = p.diff || 0, H.info("Node bounds (abc123)", d, f, f.width, f.x, f.y), krt(m, f), H.warn("Recursive render complete ", m, f);
} else
e.children(d).length > 0 ? (H.info("Cluster - the non recursive path XXX", d, f.id, f, e), H.info(zc(f.id, e)), Re[f.id] = { id: zc(f.id, e), node: f }) : (H.info("Node - the non recursive path", d, f.id, f), xrt(u, e.node(d), i));
}), e.edges().forEach(function(d) {
const f = e.edge(d.v, d.w, d.name);
H.info("Edge " + d.v + " -> " + d.w + ": " + JSON.stringify(d)), H.info("Edge " + d.v + " -> " + d.w + ": ", d, " ", JSON.stringify(e.edge(d))), H.info("Fix", Re, "ids:", d.v, d.w, "Translateing: ", Re[d.v], Re[d.w]), Irt(l, f);
}), e.edges().forEach(function(d) {
H.info("Edge " + d.v + " -> " + d.w + ": " + JSON.stringify(d));
}), H.info("#############################################"), H.info("### Layout ###"), H.info("#############################################"), H.info(e), hu.layout(e), H.info("Graph after layout:", ur.json.write(e));
let h = 0;
return Xet(e).forEach(function(d) {
const f = e.node(d);
H.info("Position " + d + ": " + JSON.stringify(e.node(d))), H.info(
"Position " + d + ": (" + f.x,
"," + f.y,
") width: ",
f.width,
" height: ",
f.height
), f && f.clusterNode ? Fk(f) : e.children(d).length > 0 ? (Mrt(s, f), Re[f.id].node = f) : Fk(f);
}), e.edges().forEach(function(d) {
const f = e.edge(d);
H.info("Edge " + d.v + " -> " + d.w + ": " + JSON.stringify(f), f);
const p = Ort(o, d, f, Re, r, e);
Nrt(f, p);
}), e.nodes().forEach(function(d) {
const f = e.node(d);
H.info(d, f.type, f.diff), f.type === "group" && (h = f.diff);
}), { elem: a, diff: h };
}, U4 = (t, e, r, n, i) => {
Net(t, r, n, i), wrt(), Rrt(), Lrt(), Get(), H.warn("Graph at first:", ur.json.write(e)), $et(e), H.warn("Graph after:", ur.json.write(e)), zM(t, e, n);
}, Frt = (t) => pe.sanitizeText(t, nt()), Prt = function(t, e, r, n) {
const i = Object.keys(t);
H.info("keys:", i), H.info(t), i.forEach(function(a) {
const s = t[a];
let o = "";
s.cssClasses.length > 0 && (o = o + " " + s.cssClasses.join(" "));
const l = { labelStyle: "" };
let u = s.text !== void 0 ? s.text : s.id, h = 0, d = "";
switch (s.type) {
case "class":
d = "class_box";
break;
default:
d = "class_box";
}
e.setNode(s.id, {
labelStyle: l.labelStyle,
shape: d,
labelText: Frt(u),
classData: s,
rx: h,
ry: h,
class: o,
style: l.style,
id: s.id,
domId: s.domId,
tooltip: n.db.getTooltip(s.id) || "",
haveCallback: s.haveCallback,
link: s.link,
width: s.type === "group" ? 500 : void 0,
type: s.type,
padding: nt().flowchart.padding
}), H.info("setNode", {
labelStyle: l.labelStyle,
shape: d,
labelText: u,
rx: h,
ry: h,
class: o,
style: l.style,
id: s.id,
width: s.type === "group" ? 500 : void 0,
type: s.type,
padding: nt().flowchart.padding
});
});
}, qrt = function(t, e) {
const r = nt().flowchart;
let n = 0;
t.forEach(function(i) {
n++;
const a = {};
a.classes = "relation", a.pattern = i.relation.lineType == 1 ? "dashed" : "solid", a.id = "id" + n, i.type === "arrow_open" ? a.arrowhead = "none" : a.arrowhead = "normal", H.info(a, i), a.startLabelRight = i.relationTitle1 === "none" ? "" : i.relationTitle1, a.endLabelLeft = i.relationTitle2 === "none" ? "" : i.relationTitle2, a.arrowTypeStart = qk(i.relation.type1), a.arrowTypeEnd = qk(i.relation.type2);
let s = "", o = "";
if (typeof i.style < "u") {
const l = Ka(i.style);
s = l.style, o = l.labelStyle;
} else
s = "fill:none";
a.style = s, a.labelStyle = o, typeof i.interpolate < "u" ? a.curve = Ii(i.interpolate, bn) : typeof t.defaultInterpolate < "u" ? a.curve = Ii(t.defaultInterpolate, bn) : a.curve = Ii(r.curve, bn), i.text = i.title, typeof i.text > "u" ? typeof i.style < "u" && (a.arrowheadStyle = "fill: #333") : (a.arrowheadStyle = "fill: #333", a.labelpos = "c", nt().flowchart.htmlLabels ? (a.labelType = "html", a.label = '' + i.text + "") : (a.labelType = "text", a.label = i.text.replace(pe.lineBreakRegex, `
`), typeof i.style > "u" && (a.style = a.style || "stroke: #333; stroke-width: 1.5px;fill:none"), a.labelStyle = a.labelStyle.replace("color:", "fill:"))), e.setEdge(i.id1, i.id2, a, n);
});
}, Vrt = function(t) {
Object.keys(t).forEach(function(r) {
t[r];
});
}, zrt = function(t, e, r, n) {
H.info("Drawing class - ", e);
const i = nt().flowchart, a = nt().securityLevel;
H.info("config:", i);
const s = i.nodeSpacing || 50, o = i.rankSpacing || 50, l = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: n.db.getDirection(),
nodesep: s,
ranksep: o,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
}), u = n.db.getClasses(), h = n.db.getRelations();
H.info(h), Prt(u, l, e, n), qrt(h, l);
let d;
a === "sandbox" && (d = St("#i" + e));
const f = St(a === "sandbox" ? d.nodes()[0].contentDocument.body : "body"), p = f.select(`[id="${e}"]`), m = f.select("#" + e + " g");
if (U4(
m,
l,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
e
), n0(l, p, i.diagramPadding, i.useMaxWidth), !i.htmlLabels) {
const _ = a === "sandbox" ? d.nodes()[0].contentDocument : document, y = _.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (let b = 0; b < y.length; b++) {
const x = y[b], k = x.getBBox(), T = _.createElementNS("http://www.w3.org/2000/svg", "rect");
T.setAttribute("rx", 0), T.setAttribute("ry", 0), T.setAttribute("width", k.width), T.setAttribute("height", k.height), x.insertBefore(T, x.firstChild);
}
}
vn(n.db, p, e);
};
function qk(t) {
let e;
switch (t) {
case 0:
e = "aggregation";
break;
case 1:
e = "extension";
break;
case 2:
e = "composition";
break;
case 3:
e = "dependency";
break;
case 4:
e = "lollipop";
break;
default:
e = "none";
}
return e;
}
const Yrt = {
setConf: Vrt,
draw: zrt
};
var mb = function() {
var t = function(A, L, v, B) {
for (v = v || {}, B = A.length; B--; v[A[B]] = L)
;
return v;
}, e = [1, 2], r = [1, 5], n = [6, 9, 11, 23, 25, 27, 29, 30, 31, 49], i = [1, 17], a = [1, 18], s = [1, 19], o = [1, 20], l = [1, 21], u = [1, 22], h = [1, 25], d = [1, 30], f = [1, 31], p = [1, 32], m = [1, 33], _ = [6, 9, 11, 15, 20, 23, 25, 27, 29, 30, 31, 42, 43, 44, 45, 49], y = [1, 45], b = [30, 31, 46, 47], x = [4, 6, 9, 11, 23, 25, 27, 29, 30, 31, 49], k = [42, 43, 44, 45], T = [22, 37], C = [1, 64], M = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, directive: 7, line: 8, SPACE: 9, statement: 10, NEWLINE: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, ":": 15, argDirective: 16, entityName: 17, relSpec: 18, role: 19, BLOCK_START: 20, attributes: 21, BLOCK_STOP: 22, title: 23, title_value: 24, acc_title: 25, acc_title_value: 26, acc_descr: 27, acc_descr_value: 28, acc_descr_multiline_value: 29, ALPHANUM: 30, ENTITY_NAME: 31, attribute: 32, attributeType: 33, attributeName: 34, attributeKeyType: 35, attributeComment: 36, ATTRIBUTE_WORD: 37, ATTRIBUTE_KEY: 38, COMMENT: 39, cardinality: 40, relType: 41, ZERO_OR_ONE: 42, ZERO_OR_MORE: 43, ONE_OR_MORE: 44, ONLY_ONE: 45, NON_IDENTIFYING: 46, IDENTIFYING: 47, WORD: 48, open_directive: 49, type_directive: 50, arg_directive: 51, close_directive: 52, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 20: "BLOCK_START", 22: "BLOCK_STOP", 23: "title", 24: "title_value", 25: "acc_title", 26: "acc_title_value", 27: "acc_descr", 28: "acc_descr_value", 29: "acc_descr_multiline_value", 30: "ALPHANUM", 31: "ENTITY_NAME", 37: "ATTRIBUTE_WORD", 38: "ATTRIBUTE_KEY", 39: "COMMENT", 42: "ZERO_OR_ONE", 43: "ZERO_OR_MORE", 44: "ONE_OR_MORE", 45: "ONLY_ONE", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD", 49: "open_directive", 50: "type_directive", 51: "arg_directive", 52: "close_directive" },
productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 5], [10, 4], [10, 3], [10, 1], [10, 2], [10, 2], [10, 2], [10, 1], [17, 1], [17, 1], [21, 1], [21, 2], [32, 2], [32, 3], [32, 3], [32, 4], [33, 1], [34, 1], [35, 1], [36, 1], [18, 3], [40, 1], [40, 1], [40, 1], [40, 1], [41, 1], [41, 1], [19, 1], [19, 1], [19, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
performAction: function(L, v, B, w, D, N, z) {
var X = N.length - 1;
switch (D) {
case 1:
break;
case 3:
this.$ = [];
break;
case 4:
N[X - 1].push(N[X]), this.$ = N[X - 1];
break;
case 5:
case 6:
this.$ = N[X];
break;
case 7:
case 8:
this.$ = [];
break;
case 12:
w.addEntity(N[X - 4]), w.addEntity(N[X - 2]), w.addRelationship(N[X - 4], N[X], N[X - 2], N[X - 3]);
break;
case 13:
w.addEntity(N[X - 3]), w.addAttributes(N[X - 3], N[X - 1]);
break;
case 14:
w.addEntity(N[X - 2]);
break;
case 15:
w.addEntity(N[X]);
break;
case 16:
case 17:
this.$ = N[X].trim(), w.setAccTitle(this.$);
break;
case 18:
case 19:
this.$ = N[X].trim(), w.setAccDescription(this.$);
break;
case 20:
case 41:
this.$ = N[X];
break;
case 21:
case 39:
case 40:
this.$ = N[X].replace(/"/g, "");
break;
case 22:
this.$ = [N[X]];
break;
case 23:
N[X].push(N[X - 1]), this.$ = N[X];
break;
case 24:
this.$ = { attributeType: N[X - 1], attributeName: N[X] };
break;
case 25:
this.$ = { attributeType: N[X - 2], attributeName: N[X - 1], attributeKeyType: N[X] };
break;
case 26:
this.$ = { attributeType: N[X - 2], attributeName: N[X - 1], attributeComment: N[X] };
break;
case 27:
this.$ = { attributeType: N[X - 3], attributeName: N[X - 2], attributeKeyType: N[X - 1], attributeComment: N[X] };
break;
case 28:
case 29:
case 30:
this.$ = N[X];
break;
case 31:
this.$ = N[X].replace(/"/g, "");
break;
case 32:
this.$ = { cardA: N[X], relType: N[X - 1], cardB: N[X - 2] };
break;
case 33:
this.$ = w.Cardinality.ZERO_OR_ONE;
break;
case 34:
this.$ = w.Cardinality.ZERO_OR_MORE;
break;
case 35:
this.$ = w.Cardinality.ONE_OR_MORE;
break;
case 36:
this.$ = w.Cardinality.ONLY_ONE;
break;
case 37:
this.$ = w.Identification.NON_IDENTIFYING;
break;
case 38:
this.$ = w.Identification.IDENTIFYING;
break;
case 42:
w.parseDirective("%%{", "open_directive");
break;
case 43:
w.parseDirective(N[X], "type_directive");
break;
case 44:
N[X] = N[X].trim().replace(/'/g, '"'), w.parseDirective(N[X], "arg_directive");
break;
case 45:
w.parseDirective("}%%", "close_directive", "er");
break;
}
},
table: [{ 3: 1, 4: e, 7: 3, 12: 4, 49: r }, { 1: [3] }, t(n, [2, 3], { 5: 6 }), { 3: 7, 4: e, 7: 3, 12: 4, 49: r }, { 13: 8, 50: [1, 9] }, { 50: [2, 42] }, { 6: [1, 10], 7: 15, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: 16, 23: i, 25: a, 27: s, 29: o, 30: l, 31: u, 49: r }, { 1: [2, 2] }, { 14: 23, 15: [1, 24], 52: h }, t([15, 52], [2, 43]), t(n, [2, 8], { 1: [2, 1] }), t(n, [2, 4]), { 7: 15, 10: 26, 12: 4, 17: 16, 23: i, 25: a, 27: s, 29: o, 30: l, 31: u, 49: r }, t(n, [2, 6]), t(n, [2, 7]), t(n, [2, 11]), t(n, [2, 15], { 18: 27, 40: 29, 20: [1, 28], 42: d, 43: f, 44: p, 45: m }), { 24: [1, 34] }, { 26: [1, 35] }, { 28: [1, 36] }, t(n, [2, 19]), t(_, [2, 20]), t(_, [2, 21]), { 11: [1, 37] }, { 16: 38, 51: [1, 39] }, { 11: [2, 45] }, t(n, [2, 5]), { 17: 40, 30: l, 31: u }, { 21: 41, 22: [1, 42], 32: 43, 33: 44, 37: y }, { 41: 46, 46: [1, 47], 47: [1, 48] }, t(b, [2, 33]), t(b, [2, 34]), t(b, [2, 35]), t(b, [2, 36]), t(n, [2, 16]), t(n, [2, 17]), t(n, [2, 18]), t(x, [2, 9]), { 14: 49, 52: h }, { 52: [2, 44] }, { 15: [1, 50] }, { 22: [1, 51] }, t(n, [2, 14]), { 21: 52, 22: [2, 22], 32: 43, 33: 44, 37: y }, { 34: 53, 37: [1, 54] }, { 37: [2, 28] }, { 40: 55, 42: d, 43: f, 44: p, 45: m }, t(k, [2, 37]), t(k, [2, 38]), { 11: [1, 56] }, { 19: 57, 30: [1, 60], 31: [1, 59], 48: [1, 58] }, t(n, [2, 13]), { 22: [2, 23] }, t(T, [2, 24], { 35: 61, 36: 62, 38: [1, 63], 39: C }), t([22, 37, 38, 39], [2, 29]), t([30, 31], [2, 32]), t(x, [2, 10]), t(n, [2, 12]), t(n, [2, 39]), t(n, [2, 40]), t(n, [2, 41]), t(T, [2, 25], { 36: 65, 39: C }), t(T, [2, 26]), t([22, 37, 39], [2, 30]), t(T, [2, 31]), t(T, [2, 27])],
defaultActions: { 5: [2, 42], 7: [2, 2], 25: [2, 45], 39: [2, 44], 45: [2, 28], 52: [2, 23] },
parseError: function(L, v) {
if (v.recoverable)
this.trace(L);
else {
var B = new Error(L);
throw B.hash = v, B;
}
},
parse: function(L) {
var v = this, B = [0], w = [], D = [null], N = [], z = this.table, X = "", ct = 0, J = 0, Y = 2, $ = 1, lt = N.slice.call(arguments, 1), ut = Object.create(this.lexer), W = { yy: {} };
for (var tt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, tt) && (W.yy[tt] = this.yy[tt]);
ut.setInput(L, W.yy), W.yy.lexer = ut, W.yy.parser = this, typeof ut.yylloc > "u" && (ut.yylloc = {});
var K = ut.yylloc;
N.push(K);
var it = ut.options && ut.options.ranges;
typeof W.yy.parseError == "function" ? this.parseError = W.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function Z() {
var Lt;
return Lt = w.pop() || ut.lex() || $, typeof Lt != "number" && (Lt instanceof Array && (w = Lt, Lt = w.pop()), Lt = v.symbols_[Lt] || Lt), Lt;
}
for (var V, Q, q, U, F = {}, j, P, et, at; ; ) {
if (Q = B[B.length - 1], this.defaultActions[Q] ? q = this.defaultActions[Q] : ((V === null || typeof V > "u") && (V = Z()), q = z[Q] && z[Q][V]), typeof q > "u" || !q.length || !q[0]) {
var It = "";
at = [];
for (j in z[Q])
this.terminals_[j] && j > Y && at.push("'" + this.terminals_[j] + "'");
ut.showPosition ? It = "Parse error on line " + (ct + 1) + `:
` + ut.showPosition() + `
Expecting ` + at.join(", ") + ", got '" + (this.terminals_[V] || V) + "'" : It = "Parse error on line " + (ct + 1) + ": Unexpected " + (V == $ ? "end of input" : "'" + (this.terminals_[V] || V) + "'"), this.parseError(It, {
text: ut.match,
token: this.terminals_[V] || V,
line: ut.yylineno,
loc: K,
expected: at
});
}
if (q[0] instanceof Array && q.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Q + ", token: " + V);
switch (q[0]) {
case 1:
B.push(V), D.push(ut.yytext), N.push(ut.yylloc), B.push(q[1]), V = null, J = ut.yyleng, X = ut.yytext, ct = ut.yylineno, K = ut.yylloc;
break;
case 2:
if (P = this.productions_[q[1]][1], F.$ = D[D.length - P], F._$ = {
first_line: N[N.length - (P || 1)].first_line,
last_line: N[N.length - 1].last_line,
first_column: N[N.length - (P || 1)].first_column,
last_column: N[N.length - 1].last_column
}, it && (F._$.range = [
N[N.length - (P || 1)].range[0],
N[N.length - 1].range[1]
]), U = this.performAction.apply(F, [
X,
J,
ct,
W.yy,
q[1],
D,
N
].concat(lt)), typeof U < "u")
return U;
P && (B = B.slice(0, -1 * P * 2), D = D.slice(0, -1 * P), N = N.slice(0, -1 * P)), B.push(this.productions_[q[1]][0]), D.push(F.$), N.push(F._$), et = z[B[B.length - 2]][B[B.length - 1]], B.push(et);
break;
case 3:
return !0;
}
}
return !0;
}
}, S = function() {
var A = {
EOF: 1,
parseError: function(v, B) {
if (this.yy.parser)
this.yy.parser.parseError(v, B);
else
throw new Error(v);
},
setInput: function(L, v) {
return this.yy = v || 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 = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var L = this._input[0];
this.yytext += L, this.yyleng++, this.offset++, this.match += L, this.matched += L;
var v = L.match(/(?:\r\n?|\n).*/g);
return v ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), L;
},
unput: function(L) {
var v = L.length, B = L.split(/(?:\r\n?|\n)/g);
this._input = L + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - v), this.offset -= v;
var w = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), B.length - 1 && (this.yylineno -= B.length - 1);
var D = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: B ? (B.length === w.length ? this.yylloc.first_column : 0) + w[w.length - B.length].length - B[0].length : this.yylloc.first_column - v
}, this.options.ranges && (this.yylloc.range = [D[0], D[0] + this.yyleng - v]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(L) {
this.unput(this.match.slice(L));
},
pastInput: function() {
var L = this.matched.substr(0, this.matched.length - this.match.length);
return (L.length > 20 ? "..." : "") + L.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var L = this.match;
return L.length < 20 && (L += this._input.substr(0, 20 - L.length)), (L.substr(0, 20) + (L.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var L = this.pastInput(), v = new Array(L.length + 1).join("-");
return L + this.upcomingInput() + `
` + v + "^";
},
test_match: function(L, v) {
var B, w, D;
if (this.options.backtrack_lexer && (D = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (D.yylloc.range = this.yylloc.range.slice(0))), w = L[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + L[0].length
}, 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], B = this.performAction.call(this, this.yy, this, v, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), B)
return B;
if (this._backtrack) {
for (var N in D)
this[N] = D[N];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var L, v, B, w;
this._more || (this.yytext = "", this.match = "");
for (var D = this._currentRules(), N = 0; N < D.length; N++)
if (B = this._input.match(this.rules[D[N]]), B && (!v || B[0].length > v[0].length)) {
if (v = B, w = N, this.options.backtrack_lexer) {
if (L = this.test_match(B, D[N]), L !== !1)
return L;
if (this._backtrack) {
v = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return v ? (L = this.test_match(v, D[w]), L !== !1 ? L : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var v = this.next();
return v || this.lex();
},
begin: function(v) {
this.conditionStack.push(v);
},
popState: function() {
var v = this.conditionStack.length - 1;
return v > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(v) {
return v = this.conditionStack.length - 1 - Math.abs(v || 0), v >= 0 ? this.conditionStack[v] : "INITIAL";
},
pushState: function(v) {
this.begin(v);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(v, B, w, D) {
switch (w) {
case 0:
return this.begin("acc_title"), 25;
case 1:
return this.popState(), "acc_title_value";
case 2:
return this.begin("acc_descr"), 27;
case 3:
return this.popState(), "acc_descr_value";
case 4:
this.begin("acc_descr_multiline");
break;
case 5:
this.popState();
break;
case 6:
return "acc_descr_multiline_value";
case 7:
return this.begin("open_directive"), 49;
case 8:
return this.begin("type_directive"), 50;
case 9:
return this.popState(), this.begin("arg_directive"), 15;
case 10:
return this.popState(), this.popState(), 52;
case 11:
return 51;
case 12:
break;
case 13:
break;
case 14:
return 11;
case 15:
break;
case 16:
return 9;
case 17:
return 31;
case 18:
return 48;
case 19:
return 4;
case 20:
return this.begin("block"), 20;
case 21:
break;
case 22:
return 38;
case 23:
return 37;
case 24:
return 37;
case 25:
return 39;
case 26:
break;
case 27:
return this.popState(), 22;
case 28:
return B.yytext[0];
case 29:
return 42;
case 30:
return 43;
case 31:
return 44;
case 32:
return 45;
case 33:
return 42;
case 34:
return 43;
case 35:
return 44;
case 36:
return 46;
case 37:
return 47;
case 38:
return 46;
case 39:
return 46;
case 40:
return 30;
case 41:
return B.yytext[0];
case 42:
return 6;
}
},
rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\|o\b)/i, /^(?:\}o\b)/i, /^(?:\}\|)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i],
conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, open_directive: { rules: [8], inclusive: !1 }, type_directive: { rules: [9, 10], inclusive: !1 }, arg_directive: { rules: [10, 11], inclusive: !1 }, block: { rules: [21, 22, 23, 24, 25, 26, 27, 28], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 12, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: !0 } }
};
return A;
}();
M.lexer = S;
function R() {
this.yy = {};
}
return R.prototype = M, M.Parser = R, new R();
}();
mb.parser = mb;
const Urt = (t) => t.match(/^\s*erDiagram/) !== null;
let lc = {}, W4 = [];
const Wrt = {
ZERO_OR_ONE: "ZERO_OR_ONE",
ZERO_OR_MORE: "ZERO_OR_MORE",
ONE_OR_MORE: "ONE_OR_MORE",
ONLY_ONE: "ONLY_ONE"
}, Hrt = {
NON_IDENTIFYING: "NON_IDENTIFYING",
IDENTIFYING: "IDENTIFYING"
}, Grt = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, YM = function(t) {
return typeof lc[t] > "u" && (lc[t] = { attributes: [] }, H.info("Added new entity :", t)), lc[t];
}, jrt = () => lc, $rt = function(t, e) {
let r = YM(t), n;
for (n = e.length - 1; n >= 0; n--)
r.attributes.push(e[n]), H.debug("Added attribute ", e[n].attributeName);
}, Xrt = function(t, e, r, n) {
let i = {
entityA: t,
roleA: e,
entityB: r,
relSpec: n
};
W4.push(i), H.debug("Added new relationship :", i);
}, Krt = () => W4, Zrt = function() {
lc = {}, W4 = [], gi();
}, Qrt = {
Cardinality: Wrt,
Identification: Hrt,
parseDirective: Grt,
getConfig: () => nt().er,
addEntity: YM,
addAttributes: $rt,
getEntities: jrt,
addRelationship: Xrt,
getRelationships: Krt,
clear: Zrt,
setAccTitle: Yn,
getAccTitle: yi,
setAccDescription: mi,
getAccDescription: bi
}, ia = {
ONLY_ONE_START: "ONLY_ONE_START",
ONLY_ONE_END: "ONLY_ONE_END",
ZERO_OR_ONE_START: "ZERO_OR_ONE_START",
ZERO_OR_ONE_END: "ZERO_OR_ONE_END",
ONE_OR_MORE_START: "ONE_OR_MORE_START",
ONE_OR_MORE_END: "ONE_OR_MORE_END",
ZERO_OR_MORE_START: "ZERO_OR_MORE_START",
ZERO_OR_MORE_END: "ZERO_OR_MORE_END"
}, Jrt = function(t, e) {
let r;
t.append("defs").append("marker").attr("id", ia.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"), t.append("defs").append("marker").attr("id", ia.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", ia.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", ia.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"), t.append("defs").append("marker").attr("id", ia.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), t.append("defs").append("marker").attr("id", ia.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"), r = t.append("defs").append("marker").attr("id", ia.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"), r = t.append("defs").append("marker").attr("id", ia.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
}, aa = {
ERMarkers: ia,
insertMarkers: Jrt
};
let ch;
const tnt = new Uint8Array(16);
function ent() {
if (!ch && (ch = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ch))
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
return ch(tnt);
}
const Nr = [];
for (let t = 0; t < 256; ++t)
Nr.push((t + 256).toString(16).slice(1));
function rnt(t, e = 0) {
return (Nr[t[e + 0]] + Nr[t[e + 1]] + Nr[t[e + 2]] + Nr[t[e + 3]] + "-" + Nr[t[e + 4]] + Nr[t[e + 5]] + "-" + Nr[t[e + 6]] + Nr[t[e + 7]] + "-" + Nr[t[e + 8]] + Nr[t[e + 9]] + "-" + Nr[t[e + 10]] + Nr[t[e + 11]] + Nr[t[e + 12]] + Nr[t[e + 13]] + Nr[t[e + 14]] + Nr[t[e + 15]]).toLowerCase();
}
const nnt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Vk = {
randomUUID: nnt
};
function int(t, e, r) {
if (Vk.randomUUID && !e && !t)
return Vk.randomUUID();
t = t || {};
const n = t.random || (t.rng || ent)();
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) {
r = r || 0;
for (let i = 0; i < 16; ++i)
e[r + i] = n[i];
return e;
}
return rnt(n);
}
const ant = /[^A-Za-z0-9]([\W])*/g;
let Ye = {}, Yc = /* @__PURE__ */ new Map();
const snt = function(t) {
const e = Object.keys(t);
for (let r = 0; r < e.length; r++)
Ye[e[r]] = t[e[r]];
}, ont = (t, e, r) => {
const n = Ye.entityPadding / 3, i = Ye.entityPadding / 3, a = Ye.fontSize * 0.85, s = e.node().getBBox(), o = [];
let l = !1, u = !1, h = 0, d = 0, f = 0, p = 0, m = s.height + n * 2, _ = 1;
r.forEach((k) => {
k.attributeKeyType !== void 0 && (l = !0), k.attributeComment !== void 0 && (u = !0);
}), r.forEach((k) => {
const T = `${e.node().id}-attr-${_}`;
let C = 0;
const M = Va(k.attributeType), S = t.append("text").attr("class", "er entityLabel").attr("id", `${T}-type`).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "left").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + a + "px"
).text(M), R = t.append("text").attr("class", "er entityLabel").attr("id", `${T}-name`).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "left").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + a + "px"
).text(k.attributeName), A = {};
A.tn = S, A.nn = R;
const L = S.node().getBBox(), v = R.node().getBBox();
if (h = Math.max(h, L.width), d = Math.max(d, v.width), C = Math.max(L.height, v.height), l) {
const B = t.append("text").attr("class", "er entityLabel").attr("id", `${T}-key`).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "left").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + a + "px"
).text(k.attributeKeyType || "");
A.kn = B;
const w = B.node().getBBox();
f = Math.max(f, w.width), C = Math.max(C, w.height);
}
if (u) {
const B = t.append("text").attr("class", "er entityLabel").attr("id", `${T}-comment`).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "left").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + a + "px"
).text(k.attributeComment || "");
A.cn = B;
const w = B.node().getBBox();
p = Math.max(p, w.width), C = Math.max(C, w.height);
}
A.height = C, o.push(A), m += C + n * 2, _ += 1;
});
let y = 4;
l && (y += 2), u && (y += 2);
const b = h + d + f + p, x = {
width: Math.max(
Ye.minEntityWidth,
Math.max(
s.width + Ye.entityPadding * 2,
b + i * y
)
),
height: r.length > 0 ? m : Math.max(Ye.minEntityHeight, s.height + Ye.entityPadding * 2)
};
if (r.length > 0) {
const k = Math.max(
0,
(x.width - b - i * y) / (y / 2)
);
e.attr(
"transform",
"translate(" + x.width / 2 + "," + (n + s.height / 2) + ")"
);
let T = s.height + n * 2, C = "attributeBoxOdd";
o.forEach((M) => {
const S = T + n + M.height / 2;
M.tn.attr("transform", "translate(" + i + "," + S + ")");
const R = t.insert("rect", "#" + M.tn.node().id).attr("class", `er ${C}`).attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", 0).attr("y", T).attr("width", h + i * 2 + k).attr("height", M.height + n * 2), A = parseFloat(R.attr("x")) + parseFloat(R.attr("width"));
M.nn.attr(
"transform",
"translate(" + (A + i) + "," + S + ")"
);
const L = t.insert("rect", "#" + M.nn.node().id).attr("class", `er ${C}`).attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", A).attr("y", T).attr("width", d + i * 2 + k).attr("height", M.height + n * 2);
let v = parseFloat(L.attr("x")) + parseFloat(L.attr("width"));
if (l) {
M.kn.attr(
"transform",
"translate(" + (v + i) + "," + S + ")"
);
const B = t.insert("rect", "#" + M.kn.node().id).attr("class", `er ${C}`).attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", v).attr("y", T).attr("width", f + i * 2 + k).attr("height", M.height + n * 2);
v = parseFloat(B.attr("x")) + parseFloat(B.attr("width"));
}
u && (M.cn.attr(
"transform",
"translate(" + (v + i) + "," + S + ")"
), t.insert("rect", "#" + M.cn.node().id).attr("class", `er ${C}`).attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", v).attr("y", T).attr("width", p + i * 2 + k).attr("height", M.height + n * 2)), T += M.height + n * 2, C = C === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd";
});
} else
x.height = Math.max(Ye.minEntityHeight, m), e.attr("transform", "translate(" + x.width / 2 + "," + x.height / 2 + ")");
return x;
}, lnt = function(t, e, r) {
const n = Object.keys(e);
let i;
return n.forEach(function(a) {
const s = dnt(a, "entity");
Yc.set(a, s);
const o = t.append("g").attr("id", s);
i = i === void 0 ? s : i;
const l = "text-" + s, u = o.append("text").attr("class", "er entityLabel").attr("id", l).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + Ye.fontSize + "px"
).text(a), { width: h, height: d } = ont(
o,
u,
e[a].attributes
), p = o.insert("rect", "#" + l).attr("class", "er entityBox").attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", 0).attr("y", 0).attr("width", h).attr("height", d).node().getBBox();
r.setNode(s, {
width: p.width,
height: p.height,
shape: "rect",
id: s
});
}), i;
}, cnt = function(t, e) {
e.nodes().forEach(function(r) {
typeof r < "u" && typeof e.node(r) < "u" && t.select("#" + r).attr(
"transform",
"translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
);
});
}, UM = function(t) {
return (t.entityA + t.roleA + t.entityB).replace(/\s/g, "");
}, unt = function(t, e) {
return t.forEach(function(r) {
e.setEdge(
Yc.get(r.entityA),
Yc.get(r.entityB),
{ relationship: r },
UM(r)
);
}), t;
};
let zk = 0;
const hnt = function(t, e, r, n, i) {
zk++;
const a = r.edge(
Yc.get(e.entityA),
Yc.get(e.entityB),
UM(e)
), s = ns().x(function(m) {
return m.x;
}).y(function(m) {
return m.y;
}).curve(Ps), o = t.insert("path", "#" + n).attr("class", "er relationshipLine").attr("d", s(a.points)).attr("stroke", Ye.stroke).attr("fill", "none");
e.relSpec.relType === i.db.Identification.NON_IDENTIFYING && o.attr("stroke-dasharray", "8,8");
let l = "";
switch (Ye.arrowMarkerAbsolute && (l = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, l = l.replace(/\(/g, "\\("), l = l.replace(/\)/g, "\\)")), e.relSpec.cardA) {
case i.db.Cardinality.ZERO_OR_ONE:
o.attr("marker-end", "url(" + l + "#" + aa.ERMarkers.ZERO_OR_ONE_END + ")");
break;
case i.db.Cardinality.ZERO_OR_MORE:
o.attr("marker-end", "url(" + l + "#" + aa.ERMarkers.ZERO_OR_MORE_END + ")");
break;
case i.db.Cardinality.ONE_OR_MORE:
o.attr("marker-end", "url(" + l + "#" + aa.ERMarkers.ONE_OR_MORE_END + ")");
break;
case i.db.Cardinality.ONLY_ONE:
o.attr("marker-end", "url(" + l + "#" + aa.ERMarkers.ONLY_ONE_END + ")");
break;
}
switch (e.relSpec.cardB) {
case i.db.Cardinality.ZERO_OR_ONE:
o.attr(
"marker-start",
"url(" + l + "#" + aa.ERMarkers.ZERO_OR_ONE_START + ")"
);
break;
case i.db.Cardinality.ZERO_OR_MORE:
o.attr(
"marker-start",
"url(" + l + "#" + aa.ERMarkers.ZERO_OR_MORE_START + ")"
);
break;
case i.db.Cardinality.ONE_OR_MORE:
o.attr(
"marker-start",
"url(" + l + "#" + aa.ERMarkers.ONE_OR_MORE_START + ")"
);
break;
case i.db.Cardinality.ONLY_ONE:
o.attr("marker-start", "url(" + l + "#" + aa.ERMarkers.ONLY_ONE_START + ")");
break;
}
const u = o.node().getTotalLength(), h = o.node().getPointAtLength(u * 0.5), d = "rel" + zk, p = t.append("text").attr("class", "er relationshipLabel").attr("id", d).attr("x", h.x).attr("y", h.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + Ye.fontSize + "px"
).text(e.roleA).node().getBBox();
t.insert("rect", "#" + d).attr("class", "er relationshipLabelBox").attr("x", h.x - p.width / 2).attr("y", h.y - p.height / 2).attr("width", p.width).attr("height", p.height).attr("fill", "white").attr("fill-opacity", "85%");
}, fnt = function(t, e, r, n) {
Ye = nt().er, H.info("Drawing ER diagram");
const i = nt().securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const o = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body").select(`[id='${e}']`);
aa.insertMarkers(o, Ye);
let l;
l = new ur.Graph({
multigraph: !0,
directed: !0,
compound: !1
}).setGraph({
rankdir: Ye.layoutDirection,
marginx: 20,
marginy: 20,
nodesep: 100,
edgesep: 100,
ranksep: 100
}).setDefaultEdgeLabel(function() {
return {};
});
const u = lnt(o, n.db.getEntities(), l), h = unt(n.db.getRelationships(), l);
hu.layout(l), cnt(o, l), h.forEach(function(_) {
hnt(o, _, l, u, n);
});
const d = Ye.diagramPadding, f = o.node().getBBox(), p = f.width + d * 2, m = f.height + d * 2;
pi(o, m, p, Ye.useMaxWidth), o.attr("viewBox", `${f.x - d} ${f.y - d} ${p} ${m}`), vn(n.db, o, e);
};
function dnt(t = "", e = "") {
const r = t.replace(ant, "");
return `${Yk(e)}${Yk(r)}${int()}`;
}
function Yk(t = "") {
return t.length > 0 ? `${t}-` : "";
}
const pnt = {
setConf: snt,
draw: fnt
};
var Xf = function() {
var t = function(xn, Xt, te, ce) {
for (te = te || {}, ce = xn.length; ce--; te[xn[ce]] = Xt)
;
return te;
}, e = [1, 9], r = [1, 7], n = [1, 6], i = [1, 8], a = [1, 20, 21, 22, 23, 38, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], s = [2, 10], o = [1, 20], l = [1, 21], u = [1, 22], h = [1, 23], d = [1, 30], f = [1, 32], p = [1, 33], m = [1, 34], _ = [1, 62], y = [1, 48], b = [1, 52], x = [1, 36], k = [1, 37], T = [1, 38], C = [1, 39], M = [1, 40], S = [1, 56], R = [1, 63], A = [1, 51], L = [1, 53], v = [1, 55], B = [1, 59], w = [1, 60], D = [1, 41], N = [1, 42], z = [1, 43], X = [1, 44], ct = [1, 61], J = [1, 50], Y = [1, 54], $ = [1, 57], lt = [1, 58], ut = [1, 49], W = [1, 66], tt = [1, 71], K = [1, 20, 21, 22, 23, 38, 42, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], it = [1, 75], Z = [1, 74], V = [1, 76], Q = [20, 21, 23, 81, 82], q = [1, 99], U = [1, 104], F = [1, 107], j = [1, 108], P = [1, 101], et = [1, 106], at = [1, 109], It = [1, 102], Lt = [1, 114], Rt = [1, 113], Ct = [1, 103], pt = [1, 105], mt = [1, 110], _t = [1, 111], Tt = [1, 112], ft = [1, 115], le = [20, 21, 22, 23, 81, 82], Dt = [20, 21, 22, 23, 53, 81, 82], Ht = [20, 21, 22, 23, 40, 52, 53, 55, 57, 59, 61, 63, 65, 66, 67, 69, 71, 73, 74, 76, 81, 82, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], $t = [20, 21, 23], Qt = [20, 21, 23, 52, 66, 67, 81, 82, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], we = [1, 12, 20, 21, 22, 23, 24, 38, 42, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], Gt = [52, 66, 67, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], Ft = [1, 149], zt = [1, 157], wt = [1, 158], bt = [1, 159], Et = [1, 160], kt = [1, 144], Ut = [1, 145], gt = [1, 141], he = [1, 152], yt = [1, 153], re = [1, 154], _e = [1, 155], ge = [1, 156], be = [1, 161], Te = [1, 162], Wt = [1, 147], ae = [1, 150], ye = [1, 146], ue = [1, 143], Wi = [20, 21, 22, 23, 38, 42, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], Or = [1, 165], Ie = [20, 21, 22, 23, 26, 52, 66, 67, 91, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], se = [20, 21, 22, 23, 24, 26, 38, 40, 41, 42, 52, 56, 58, 60, 62, 64, 66, 67, 68, 70, 72, 73, 75, 77, 81, 82, 86, 87, 88, 89, 90, 91, 92, 95, 105, 106, 109, 111, 112, 113, 114, 122, 123, 124, 125, 126, 127], $e = [12, 21, 22, 24], _r = [22, 106], He = [1, 250], Xe = [1, 245], qt = [1, 246], st = [1, 254], At = [1, 251], Nt = [1, 248], Jt = [1, 247], ze = [1, 249], Oe = [1, 252], Fe = [1, 253], vr = [1, 255], Ve = [1, 273], Hi = [20, 21, 23, 106], Ee = [20, 21, 22, 23, 66, 67, 86, 102, 105, 106, 109, 110, 111, 112, 113], _i = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, mermaidDoc: 4, directive: 5, openDirective: 6, typeDirective: 7, closeDirective: 8, separator: 9, ":": 10, argDirective: 11, open_directive: 12, type_directive: 13, arg_directive: 14, close_directive: 15, graphConfig: 16, document: 17, line: 18, statement: 19, SEMI: 20, NEWLINE: 21, SPACE: 22, EOF: 23, GRAPH: 24, NODIR: 25, DIR: 26, FirstStmtSeperator: 27, ending: 28, endToken: 29, spaceList: 30, spaceListNewline: 31, verticeStatement: 32, styleStatement: 33, linkStyleStatement: 34, classDefStatement: 35, classStatement: 36, clickStatement: 37, subgraph: 38, text: 39, SQS: 40, SQE: 41, end: 42, direction: 43, acc_title: 44, acc_title_value: 45, acc_descr: 46, acc_descr_value: 47, acc_descr_multiline_value: 48, link: 49, node: 50, vertex: 51, AMP: 52, STYLE_SEPARATOR: 53, idString: 54, DOUBLECIRCLESTART: 55, DOUBLECIRCLEEND: 56, PS: 57, PE: 58, "(-": 59, "-)": 60, STADIUMSTART: 61, STADIUMEND: 62, SUBROUTINESTART: 63, SUBROUTINEEND: 64, VERTEX_WITH_PROPS_START: 65, ALPHA: 66, COLON: 67, PIPE: 68, CYLINDERSTART: 69, CYLINDEREND: 70, DIAMOND_START: 71, DIAMOND_STOP: 72, TAGEND: 73, TRAPSTART: 74, TRAPEND: 75, INVTRAPSTART: 76, INVTRAPEND: 77, linkStatement: 78, arrowText: 79, TESTSTR: 80, START_LINK: 81, LINK: 82, textToken: 83, STR: 84, keywords: 85, STYLE: 86, LINKSTYLE: 87, CLASSDEF: 88, CLASS: 89, CLICK: 90, DOWN: 91, UP: 92, textNoTags: 93, textNoTagsToken: 94, DEFAULT: 95, stylesOpt: 96, alphaNum: 97, CALLBACKNAME: 98, CALLBACKARGS: 99, HREF: 100, LINK_TARGET: 101, HEX: 102, numList: 103, INTERPOLATE: 104, NUM: 105, COMMA: 106, style: 107, styleComponent: 108, MINUS: 109, UNIT: 110, BRKT: 111, DOT: 112, PCT: 113, TAGSTART: 114, alphaNumToken: 115, idStringToken: 116, alphaNumStatement: 117, direction_tb: 118, direction_bt: 119, direction_rl: 120, direction_lr: 121, PUNCTUATION: 122, UNICODE_TEXT: 123, PLUS: 124, EQUALS: 125, MULT: 126, UNDERSCORE: 127, graphCodeTokens: 128, ARROW_CROSS: 129, ARROW_POINT: 130, ARROW_CIRCLE: 131, ARROW_OPEN: 132, QUOTE: 133, $accept: 0, $end: 1 },
terminals_: { 2: "error", 10: ":", 12: "open_directive", 13: "type_directive", 14: "arg_directive", 15: "close_directive", 20: "SEMI", 21: "NEWLINE", 22: "SPACE", 23: "EOF", 24: "GRAPH", 25: "NODIR", 26: "DIR", 38: "subgraph", 40: "SQS", 41: "SQE", 42: "end", 44: "acc_title", 45: "acc_title_value", 46: "acc_descr", 47: "acc_descr_value", 48: "acc_descr_multiline_value", 52: "AMP", 53: "STYLE_SEPARATOR", 55: "DOUBLECIRCLESTART", 56: "DOUBLECIRCLEEND", 57: "PS", 58: "PE", 59: "(-", 60: "-)", 61: "STADIUMSTART", 62: "STADIUMEND", 63: "SUBROUTINESTART", 64: "SUBROUTINEEND", 65: "VERTEX_WITH_PROPS_START", 66: "ALPHA", 67: "COLON", 68: "PIPE", 69: "CYLINDERSTART", 70: "CYLINDEREND", 71: "DIAMOND_START", 72: "DIAMOND_STOP", 73: "TAGEND", 74: "TRAPSTART", 75: "TRAPEND", 76: "INVTRAPSTART", 77: "INVTRAPEND", 80: "TESTSTR", 81: "START_LINK", 82: "LINK", 84: "STR", 86: "STYLE", 87: "LINKSTYLE", 88: "CLASSDEF", 89: "CLASS", 90: "CLICK", 91: "DOWN", 92: "UP", 95: "DEFAULT", 98: "CALLBACKNAME", 99: "CALLBACKARGS", 100: "HREF", 101: "LINK_TARGET", 102: "HEX", 104: "INTERPOLATE", 105: "NUM", 106: "COMMA", 109: "MINUS", 110: "UNIT", 111: "BRKT", 112: "DOT", 113: "PCT", 114: "TAGSTART", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr", 122: "PUNCTUATION", 123: "UNICODE_TEXT", 124: "PLUS", 125: "EQUALS", 126: "MULT", 127: "UNDERSCORE", 129: "ARROW_CROSS", 130: "ARROW_POINT", 131: "ARROW_CIRCLE", 132: "ARROW_OPEN", 133: "QUOTE" },
productions_: [0, [3, 1], [3, 2], [5, 4], [5, 6], [6, 1], [7, 1], [11, 1], [8, 1], [4, 2], [17, 0], [17, 2], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [16, 2], [16, 2], [16, 2], [16, 3], [28, 2], [28, 1], [29, 1], [29, 1], [29, 1], [27, 1], [27, 1], [27, 2], [31, 2], [31, 2], [31, 1], [31, 1], [30, 2], [30, 1], [19, 2], [19, 2], [19, 2], [19, 2], [19, 2], [19, 2], [19, 9], [19, 6], [19, 4], [19, 1], [19, 2], [19, 2], [19, 1], [9, 1], [9, 1], [9, 1], [32, 3], [32, 4], [32, 2], [32, 1], [50, 1], [50, 5], [50, 3], [51, 4], [51, 4], [51, 6], [51, 4], [51, 4], [51, 4], [51, 8], [51, 4], [51, 4], [51, 4], [51, 6], [51, 4], [51, 4], [51, 4], [51, 4], [51, 4], [51, 1], [49, 2], [49, 3], [49, 3], [49, 1], [49, 3], [78, 1], [79, 3], [39, 1], [39, 2], [39, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [93, 1], [93, 2], [35, 5], [35, 5], [36, 5], [37, 2], [37, 4], [37, 3], [37, 5], [37, 2], [37, 4], [37, 4], [37, 6], [37, 2], [37, 4], [37, 2], [37, 4], [37, 4], [37, 6], [33, 5], [33, 5], [34, 5], [34, 5], [34, 9], [34, 9], [34, 7], [34, 7], [103, 1], [103, 3], [96, 1], [96, 3], [107, 1], [107, 2], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [94, 1], [94, 1], [94, 1], [94, 1], [54, 1], [54, 2], [97, 1], [97, 2], [117, 1], [117, 1], [117, 1], [117, 1], [43, 1], [43, 1], [43, 1], [43, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1]],
performAction: function(Xt, te, ce, Pt, Ge, rt, os) {
var ot = rt.length - 1;
switch (Ge) {
case 5:
Pt.parseDirective("%%{", "open_directive");
break;
case 6:
Pt.parseDirective(rt[ot], "type_directive");
break;
case 7:
rt[ot] = rt[ot].trim().replace(/'/g, '"'), Pt.parseDirective(rt[ot], "arg_directive");
break;
case 8:
Pt.parseDirective("}%%", "close_directive", "flowchart");
break;
case 10:
this.$ = [];
break;
case 11:
(!Array.isArray(rt[ot]) || rt[ot].length > 0) && rt[ot - 1].push(rt[ot]), this.$ = rt[ot - 1];
break;
case 12:
case 82:
case 84:
case 96:
case 152:
case 154:
case 155:
this.$ = rt[ot];
break;
case 19:
Pt.setDirection("TB"), this.$ = "TB";
break;
case 20:
Pt.setDirection(rt[ot - 1]), this.$ = rt[ot - 1];
break;
case 35:
this.$ = rt[ot - 1].nodes;
break;
case 36:
case 37:
case 38:
case 39:
case 40:
this.$ = [];
break;
case 41:
this.$ = Pt.addSubGraph(rt[ot - 6], rt[ot - 1], rt[ot - 4]);
break;
case 42:
this.$ = Pt.addSubGraph(rt[ot - 3], rt[ot - 1], rt[ot - 3]);
break;
case 43:
this.$ = Pt.addSubGraph(void 0, rt[ot - 1], void 0);
break;
case 45:
this.$ = rt[ot].trim(), Pt.setAccTitle(this.$);
break;
case 46:
case 47:
this.$ = rt[ot].trim(), Pt.setAccDescription(this.$);
break;
case 51:
Pt.addLink(rt[ot - 2].stmt, rt[ot], rt[ot - 1]), this.$ = { stmt: rt[ot], nodes: rt[ot].concat(rt[ot - 2].nodes) };
break;
case 52:
Pt.addLink(rt[ot - 3].stmt, rt[ot - 1], rt[ot - 2]), this.$ = { stmt: rt[ot - 1], nodes: rt[ot - 1].concat(rt[ot - 3].nodes) };
break;
case 53:
this.$ = { stmt: rt[ot - 1], nodes: rt[ot - 1] };
break;
case 54:
this.$ = { stmt: rt[ot], nodes: rt[ot] };
break;
case 55:
this.$ = [rt[ot]];
break;
case 56:
this.$ = rt[ot - 4].concat(rt[ot]);
break;
case 57:
this.$ = [rt[ot - 2]], Pt.setClass(rt[ot - 2], rt[ot]);
break;
case 58:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "square");
break;
case 59:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "doublecircle");
break;
case 60:
this.$ = rt[ot - 5], Pt.addVertex(rt[ot - 5], rt[ot - 2], "circle");
break;
case 61:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "ellipse");
break;
case 62:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "stadium");
break;
case 63:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "subroutine");
break;
case 64:
this.$ = rt[ot - 7], Pt.addVertex(rt[ot - 7], rt[ot - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[rt[ot - 5], rt[ot - 3]]]));
break;
case 65:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "cylinder");
break;
case 66:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "round");
break;
case 67:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "diamond");
break;
case 68:
this.$ = rt[ot - 5], Pt.addVertex(rt[ot - 5], rt[ot - 2], "hexagon");
break;
case 69:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "odd");
break;
case 70:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "trapezoid");
break;
case 71:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "inv_trapezoid");
break;
case 72:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "lean_right");
break;
case 73:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "lean_left");
break;
case 74:
this.$ = rt[ot], Pt.addVertex(rt[ot]);
break;
case 75:
rt[ot - 1].text = rt[ot], this.$ = rt[ot - 1];
break;
case 76:
case 77:
rt[ot - 2].text = rt[ot - 1], this.$ = rt[ot - 2];
break;
case 78:
this.$ = rt[ot];
break;
case 79:
var Fr = Pt.destructLink(rt[ot], rt[ot - 2]);
this.$ = { type: Fr.type, stroke: Fr.stroke, length: Fr.length, text: rt[ot - 1] };
break;
case 80:
var Fr = Pt.destructLink(rt[ot]);
this.$ = { type: Fr.type, stroke: Fr.stroke, length: Fr.length };
break;
case 81:
this.$ = rt[ot - 1];
break;
case 83:
case 97:
case 153:
this.$ = rt[ot - 1] + "" + rt[ot];
break;
case 98:
case 99:
this.$ = rt[ot - 4], Pt.addClass(rt[ot - 2], rt[ot]);
break;
case 100:
this.$ = rt[ot - 4], Pt.setClass(rt[ot - 2], rt[ot]);
break;
case 101:
case 109:
this.$ = rt[ot - 1], Pt.setClickEvent(rt[ot - 1], rt[ot]);
break;
case 102:
case 110:
this.$ = rt[ot - 3], Pt.setClickEvent(rt[ot - 3], rt[ot - 2]), Pt.setTooltip(rt[ot - 3], rt[ot]);
break;
case 103:
this.$ = rt[ot - 2], Pt.setClickEvent(rt[ot - 2], rt[ot - 1], rt[ot]);
break;
case 104:
this.$ = rt[ot - 4], Pt.setClickEvent(rt[ot - 4], rt[ot - 3], rt[ot - 2]), Pt.setTooltip(rt[ot - 4], rt[ot]);
break;
case 105:
case 111:
this.$ = rt[ot - 1], Pt.setLink(rt[ot - 1], rt[ot]);
break;
case 106:
case 112:
this.$ = rt[ot - 3], Pt.setLink(rt[ot - 3], rt[ot - 2]), Pt.setTooltip(rt[ot - 3], rt[ot]);
break;
case 107:
case 113:
this.$ = rt[ot - 3], Pt.setLink(rt[ot - 3], rt[ot - 2], rt[ot]);
break;
case 108:
case 114:
this.$ = rt[ot - 5], Pt.setLink(rt[ot - 5], rt[ot - 4], rt[ot]), Pt.setTooltip(rt[ot - 5], rt[ot - 2]);
break;
case 115:
this.$ = rt[ot - 4], Pt.addVertex(rt[ot - 2], void 0, void 0, rt[ot]);
break;
case 116:
case 118:
this.$ = rt[ot - 4], Pt.updateLink(rt[ot - 2], rt[ot]);
break;
case 117:
this.$ = rt[ot - 4], Pt.updateLink([rt[ot - 2]], rt[ot]);
break;
case 119:
this.$ = rt[ot - 8], Pt.updateLinkInterpolate([rt[ot - 6]], rt[ot - 2]), Pt.updateLink([rt[ot - 6]], rt[ot]);
break;
case 120:
this.$ = rt[ot - 8], Pt.updateLinkInterpolate(rt[ot - 6], rt[ot - 2]), Pt.updateLink(rt[ot - 6], rt[ot]);
break;
case 121:
this.$ = rt[ot - 6], Pt.updateLinkInterpolate([rt[ot - 4]], rt[ot]);
break;
case 122:
this.$ = rt[ot - 6], Pt.updateLinkInterpolate(rt[ot - 4], rt[ot]);
break;
case 123:
case 125:
this.$ = [rt[ot]];
break;
case 124:
case 126:
rt[ot - 2].push(rt[ot]), this.$ = rt[ot - 2];
break;
case 128:
this.$ = rt[ot - 1] + rt[ot];
break;
case 150:
this.$ = rt[ot];
break;
case 151:
this.$ = rt[ot - 1] + "" + rt[ot];
break;
case 156:
this.$ = "v";
break;
case 157:
this.$ = "-";
break;
case 158:
this.$ = { stmt: "dir", value: "TB" };
break;
case 159:
this.$ = { stmt: "dir", value: "BT" };
break;
case 160:
this.$ = { stmt: "dir", value: "RL" };
break;
case 161:
this.$ = { stmt: "dir", value: "LR" };
break;
}
},
table: [{ 3: 1, 4: 2, 5: 3, 6: 5, 12: e, 16: 4, 21: r, 22: n, 24: i }, { 1: [3] }, { 1: [2, 1] }, { 3: 10, 4: 2, 5: 3, 6: 5, 12: e, 16: 4, 21: r, 22: n, 24: i }, t(a, s, { 17: 11 }), { 7: 12, 13: [1, 13] }, { 16: 14, 21: r, 22: n, 24: i }, { 16: 15, 21: r, 22: n, 24: i }, { 25: [1, 16], 26: [1, 17] }, { 13: [2, 5] }, { 1: [2, 2] }, { 1: [2, 9], 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: h, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: d, 43: 31, 44: f, 46: p, 48: m, 50: 35, 51: 45, 52: _, 54: 46, 66: y, 67: b, 86: x, 87: k, 88: T, 89: C, 90: M, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 118: D, 119: N, 120: z, 121: X, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 8: 64, 10: [1, 65], 15: W }, t([10, 15], [2, 6]), t(a, [2, 17]), t(a, [2, 18]), t(a, [2, 19]), { 20: [1, 68], 21: [1, 69], 22: tt, 27: 67, 30: 70 }, t(K, [2, 11]), t(K, [2, 12]), t(K, [2, 13]), t(K, [2, 14]), t(K, [2, 15]), t(K, [2, 16]), { 9: 72, 20: it, 21: Z, 23: V, 49: 73, 78: 77, 81: [1, 78], 82: [1, 79] }, { 9: 80, 20: it, 21: Z, 23: V }, { 9: 81, 20: it, 21: Z, 23: V }, { 9: 82, 20: it, 21: Z, 23: V }, { 9: 83, 20: it, 21: Z, 23: V }, { 9: 84, 20: it, 21: Z, 23: V }, { 9: 86, 20: it, 21: Z, 22: [1, 85], 23: V }, t(K, [2, 44]), { 45: [1, 87] }, { 47: [1, 88] }, t(K, [2, 47]), t(Q, [2, 54], { 30: 89, 22: tt }), { 22: [1, 90] }, { 22: [1, 91] }, { 22: [1, 92] }, { 22: [1, 93] }, { 26: q, 52: U, 66: F, 67: j, 84: [1, 97], 91: P, 97: 96, 98: [1, 94], 100: [1, 95], 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(K, [2, 158]), t(K, [2, 159]), t(K, [2, 160]), t(K, [2, 161]), t(le, [2, 55], { 53: [1, 116] }), t(Dt, [2, 74], { 116: 129, 40: [1, 117], 52: _, 55: [1, 118], 57: [1, 119], 59: [1, 120], 61: [1, 121], 63: [1, 122], 65: [1, 123], 66: y, 67: b, 69: [1, 124], 71: [1, 125], 73: [1, 126], 74: [1, 127], 76: [1, 128], 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }), t(Ht, [2, 150]), t(Ht, [2, 175]), t(Ht, [2, 176]), t(Ht, [2, 177]), t(Ht, [2, 178]), t(Ht, [2, 179]), t(Ht, [2, 180]), t(Ht, [2, 181]), t(Ht, [2, 182]), t(Ht, [2, 183]), t(Ht, [2, 184]), t(Ht, [2, 185]), t(Ht, [2, 186]), t(Ht, [2, 187]), t(Ht, [2, 188]), t(Ht, [2, 189]), t(Ht, [2, 190]), { 9: 130, 20: it, 21: Z, 23: V }, { 11: 131, 14: [1, 132] }, t($t, [2, 8]), t(a, [2, 20]), t(a, [2, 26]), t(a, [2, 27]), { 21: [1, 133] }, t(Qt, [2, 34], { 30: 134, 22: tt }), t(K, [2, 35]), { 50: 135, 51: 45, 52: _, 54: 46, 66: y, 67: b, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, t(we, [2, 48]), t(we, [2, 49]), t(we, [2, 50]), t(Gt, [2, 78], { 79: 136, 68: [1, 138], 80: [1, 137] }), { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 139, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t([52, 66, 67, 68, 80, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], [2, 80]), t(K, [2, 36]), t(K, [2, 37]), t(K, [2, 38]), t(K, [2, 39]), t(K, [2, 40]), { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 163, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Wi, s, { 17: 164 }), t(K, [2, 45]), t(K, [2, 46]), t(Q, [2, 53], { 52: Or }), { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 166, 102: [1, 167], 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 95: [1, 168], 103: 169, 105: [1, 170] }, { 26: q, 52: U, 66: F, 67: j, 91: P, 95: [1, 171], 97: 172, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 173, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t($t, [2, 101], { 22: [1, 174], 99: [1, 175] }), t($t, [2, 105], { 22: [1, 176] }), t($t, [2, 109], { 115: 100, 117: 178, 22: [1, 177], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }), t($t, [2, 111], { 22: [1, 179] }), t(Ie, [2, 152]), t(Ie, [2, 154]), t(Ie, [2, 155]), t(Ie, [2, 156]), t(Ie, [2, 157]), t(se, [2, 162]), t(se, [2, 163]), t(se, [2, 164]), t(se, [2, 165]), t(se, [2, 166]), t(se, [2, 167]), t(se, [2, 168]), t(se, [2, 169]), t(se, [2, 170]), t(se, [2, 171]), t(se, [2, 172]), t(se, [2, 173]), t(se, [2, 174]), { 52: _, 54: 180, 66: y, 67: b, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 181, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 182, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 184, 42: Et, 52: U, 57: [1, 183], 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 185, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 186, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 187, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 66: [1, 188] }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 189, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 190, 42: Et, 52: U, 66: F, 67: j, 71: [1, 191], 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 192, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 193, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 194, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Ht, [2, 151]), t($e, [2, 3]), { 8: 195, 15: W }, { 15: [2, 7] }, t(a, [2, 28]), t(Qt, [2, 33]), t(Q, [2, 51], { 30: 196, 22: tt }), t(Gt, [2, 75], { 22: [1, 197] }), { 22: [1, 198] }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 199, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 82: [1, 200], 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(se, [2, 82]), t(se, [2, 84]), t(se, [2, 140]), t(se, [2, 141]), t(se, [2, 142]), t(se, [2, 143]), t(se, [2, 144]), t(se, [2, 145]), t(se, [2, 146]), t(se, [2, 147]), t(se, [2, 148]), t(se, [2, 149]), t(se, [2, 85]), t(se, [2, 86]), t(se, [2, 87]), t(se, [2, 88]), t(se, [2, 89]), t(se, [2, 90]), t(se, [2, 91]), t(se, [2, 92]), t(se, [2, 93]), t(se, [2, 94]), t(se, [2, 95]), { 9: 203, 20: it, 21: Z, 22: Ft, 23: V, 24: zt, 26: wt, 38: bt, 40: [1, 202], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: h, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: d, 42: [1, 204], 43: 31, 44: f, 46: p, 48: m, 50: 35, 51: 45, 52: _, 54: 46, 66: y, 67: b, 86: x, 87: k, 88: T, 89: C, 90: M, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 118: D, 119: N, 120: z, 121: X, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 22: tt, 30: 205 }, { 22: [1, 206], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 178, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: [1, 207] }, { 22: [1, 208] }, { 22: [1, 209], 106: [1, 210] }, t(_r, [2, 123]), { 22: [1, 211] }, { 22: [1, 212], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 178, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: [1, 213], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 178, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 84: [1, 214] }, t($t, [2, 103], { 22: [1, 215] }), { 84: [1, 216], 101: [1, 217] }, { 84: [1, 218] }, t(Ie, [2, 153]), { 84: [1, 219], 101: [1, 220] }, t(le, [2, 57], { 116: 129, 52: _, 66: y, 67: b, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }), { 22: Ft, 24: zt, 26: wt, 38: bt, 41: [1, 221], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 56: [1, 222], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 223, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 58: [1, 224], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 60: [1, 225], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 62: [1, 226], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 64: [1, 227], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 67: [1, 228] }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 70: [1, 229], 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 72: [1, 230], 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 231, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 41: [1, 232], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 73: kt, 75: [1, 233], 77: [1, 234], 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 73: kt, 75: [1, 236], 77: [1, 235], 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 9: 237, 20: it, 21: Z, 23: V }, t(Q, [2, 52], { 52: Or }), t(Gt, [2, 77]), t(Gt, [2, 76]), { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 68: [1, 238], 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Gt, [2, 79]), t(se, [2, 83]), { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 239, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Wi, s, { 17: 240 }), t(K, [2, 43]), { 51: 241, 52: _, 54: 46, 66: y, 67: b, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 242, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 256, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 257, 102: At, 104: [1, 258], 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 259, 102: At, 104: [1, 260], 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 105: [1, 261] }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 262, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 263, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 264, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t($t, [2, 102]), { 84: [1, 265] }, t($t, [2, 106], { 22: [1, 266] }), t($t, [2, 107]), t($t, [2, 110]), t($t, [2, 112], { 22: [1, 267] }), t($t, [2, 113]), t(Dt, [2, 58]), t(Dt, [2, 59]), { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 58: [1, 268], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Dt, [2, 66]), t(Dt, [2, 61]), t(Dt, [2, 62]), t(Dt, [2, 63]), { 66: [1, 269] }, t(Dt, [2, 65]), t(Dt, [2, 67]), { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 72: [1, 270], 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Dt, [2, 69]), t(Dt, [2, 70]), t(Dt, [2, 72]), t(Dt, [2, 71]), t(Dt, [2, 73]), t($e, [2, 4]), t([22, 52, 66, 67, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], [2, 81]), { 22: Ft, 24: zt, 26: wt, 38: bt, 41: [1, 271], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: h, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: d, 42: [1, 272], 43: 31, 44: f, 46: p, 48: m, 50: 35, 51: 45, 52: _, 54: 46, 66: y, 67: b, 86: x, 87: k, 88: T, 89: C, 90: M, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 118: D, 119: N, 120: z, 121: X, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, t(le, [2, 56]), t($t, [2, 115], { 106: Ve }), t(Hi, [2, 125], { 108: 274, 22: He, 66: Xe, 67: qt, 86: st, 102: At, 105: Nt, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }), t(Ee, [2, 127]), t(Ee, [2, 129]), t(Ee, [2, 130]), t(Ee, [2, 131]), t(Ee, [2, 132]), t(Ee, [2, 133]), t(Ee, [2, 134]), t(Ee, [2, 135]), t(Ee, [2, 136]), t(Ee, [2, 137]), t(Ee, [2, 138]), t(Ee, [2, 139]), t($t, [2, 116], { 106: Ve }), t($t, [2, 117], { 106: Ve }), { 22: [1, 275] }, t($t, [2, 118], { 106: Ve }), { 22: [1, 276] }, t(_r, [2, 124]), t($t, [2, 98], { 106: Ve }), t($t, [2, 99], { 106: Ve }), t($t, [2, 100], { 115: 100, 117: 178, 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }), t($t, [2, 104]), { 101: [1, 277] }, { 101: [1, 278] }, { 58: [1, 279] }, { 68: [1, 280] }, { 72: [1, 281] }, { 9: 282, 20: it, 21: Z, 23: V }, t(K, [2, 42]), { 22: He, 66: Xe, 67: qt, 86: st, 102: At, 105: Nt, 107: 283, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, t(Ee, [2, 128]), { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 284, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 285, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t($t, [2, 108]), t($t, [2, 114]), t(Dt, [2, 60]), { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 286, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Dt, [2, 68]), t(Wi, s, { 17: 287 }), t(Hi, [2, 126], { 108: 274, 22: He, 66: Xe, 67: qt, 86: st, 102: At, 105: Nt, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }), t($t, [2, 121], { 115: 100, 117: 178, 22: [1, 288], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }), t($t, [2, 122], { 115: 100, 117: 178, 22: [1, 289], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }), { 22: Ft, 24: zt, 26: wt, 38: bt, 41: [1, 290], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: h, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: d, 42: [1, 291], 43: 31, 44: f, 46: p, 48: m, 50: 35, 51: 45, 52: _, 54: 46, 66: y, 67: b, 86: x, 87: k, 88: T, 89: C, 90: M, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 118: D, 119: N, 120: z, 121: X, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 292, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 293, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, t(Dt, [2, 64]), t(K, [2, 41]), t($t, [2, 119], { 106: Ve }), t($t, [2, 120], { 106: Ve })],
defaultActions: { 2: [2, 1], 9: [2, 5], 10: [2, 2], 132: [2, 7] },
parseError: function(Xt, te) {
if (te.recoverable)
this.trace(Xt);
else {
var ce = new Error(Xt);
throw ce.hash = te, ce;
}
},
parse: function(Xt) {
var te = this, ce = [0], Pt = [], Ge = [null], rt = [], os = this.table, ot = "", Fr = 0, bu = 0, I0 = 2, _u = 1, vu = rt.slice.call(arguments, 1), fr = Object.create(this.lexer), vi = { yy: {} };
for (var xi in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, xi) && (vi.yy[xi] = this.yy[xi]);
fr.setInput(Xt, vi.yy), vi.yy.lexer = fr, vi.yy.parser = this, typeof fr.yylloc > "u" && (fr.yylloc = {});
var ls = fr.yylloc;
rt.push(ls);
var _l = fr.options && fr.options.ranges;
typeof vi.yy.parseError == "function" ? this.parseError = vi.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function xu() {
var wn;
return wn = Pt.pop() || fr.lex() || _u, typeof wn != "number" && (wn instanceof Array && (Pt = wn, wn = Pt.pop()), wn = te.symbols_[wn] || wn), wn;
}
for (var Rr, De, jr, Gi, Gn = {}, ji, kn, vl, to; ; ) {
if (De = ce[ce.length - 1], this.defaultActions[De] ? jr = this.defaultActions[De] : ((Rr === null || typeof Rr > "u") && (Rr = xu()), jr = os[De] && os[De][Rr]), typeof jr > "u" || !jr.length || !jr[0]) {
var cs = "";
to = [];
for (ji in os[De])
this.terminals_[ji] && ji > I0 && to.push("'" + this.terminals_[ji] + "'");
fr.showPosition ? cs = "Parse error on line " + (Fr + 1) + `:
` + fr.showPosition() + `
Expecting ` + to.join(", ") + ", got '" + (this.terminals_[Rr] || Rr) + "'" : cs = "Parse error on line " + (Fr + 1) + ": Unexpected " + (Rr == _u ? "end of input" : "'" + (this.terminals_[Rr] || Rr) + "'"), this.parseError(cs, {
text: fr.match,
token: this.terminals_[Rr] || Rr,
line: fr.yylineno,
loc: ls,
expected: to
});
}
if (jr[0] instanceof Array && jr.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + De + ", token: " + Rr);
switch (jr[0]) {
case 1:
ce.push(Rr), Ge.push(fr.yytext), rt.push(fr.yylloc), ce.push(jr[1]), Rr = null, bu = fr.yyleng, ot = fr.yytext, Fr = fr.yylineno, ls = fr.yylloc;
break;
case 2:
if (kn = this.productions_[jr[1]][1], Gn.$ = Ge[Ge.length - kn], Gn._$ = {
first_line: rt[rt.length - (kn || 1)].first_line,
last_line: rt[rt.length - 1].last_line,
first_column: rt[rt.length - (kn || 1)].first_column,
last_column: rt[rt.length - 1].last_column
}, _l && (Gn._$.range = [
rt[rt.length - (kn || 1)].range[0],
rt[rt.length - 1].range[1]
]), Gi = this.performAction.apply(Gn, [
ot,
bu,
Fr,
vi.yy,
jr[1],
Ge,
rt
].concat(vu)), typeof Gi < "u")
return Gi;
kn && (ce = ce.slice(0, -1 * kn * 2), Ge = Ge.slice(0, -1 * kn), rt = rt.slice(0, -1 * kn)), ce.push(this.productions_[jr[1]][0]), Ge.push(Gn.$), rt.push(Gn._$), vl = os[ce[ce.length - 2]][ce[ce.length - 1]], ce.push(vl);
break;
case 3:
return !0;
}
}
return !0;
}
}, mu = function() {
var xn = {
EOF: 1,
parseError: function(te, ce) {
if (this.yy.parser)
this.yy.parser.parseError(te, ce);
else
throw new Error(te);
},
setInput: function(Xt, te) {
return this.yy = te || this.yy || {}, this._input = Xt, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var Xt = this._input[0];
this.yytext += Xt, this.yyleng++, this.offset++, this.match += Xt, this.matched += Xt;
var te = Xt.match(/(?:\r\n?|\n).*/g);
return te ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Xt;
},
unput: function(Xt) {
var te = Xt.length, ce = Xt.split(/(?:\r\n?|\n)/g);
this._input = Xt + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - te), this.offset -= te;
var Pt = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), ce.length - 1 && (this.yylineno -= ce.length - 1);
var Ge = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: ce ? (ce.length === Pt.length ? this.yylloc.first_column : 0) + Pt[Pt.length - ce.length].length - ce[0].length : this.yylloc.first_column - te
}, this.options.ranges && (this.yylloc.range = [Ge[0], Ge[0] + this.yyleng - te]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(Xt) {
this.unput(this.match.slice(Xt));
},
pastInput: function() {
var Xt = this.matched.substr(0, this.matched.length - this.match.length);
return (Xt.length > 20 ? "..." : "") + Xt.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var Xt = this.match;
return Xt.length < 20 && (Xt += this._input.substr(0, 20 - Xt.length)), (Xt.substr(0, 20) + (Xt.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var Xt = this.pastInput(), te = new Array(Xt.length + 1).join("-");
return Xt + this.upcomingInput() + `
` + te + "^";
},
test_match: function(Xt, te) {
var ce, Pt, Ge;
if (this.options.backtrack_lexer && (Ge = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (Ge.yylloc.range = this.yylloc.range.slice(0))), Pt = Xt[0].match(/(?:\r\n?|\n).*/g), Pt && (this.yylineno += Pt.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: Pt ? Pt[Pt.length - 1].length - Pt[Pt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Xt[0].length
}, this.yytext += Xt[0], this.match += Xt[0], this.matches = Xt, 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(Xt[0].length), this.matched += Xt[0], ce = this.performAction.call(this, this.yy, this, te, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), ce)
return ce;
if (this._backtrack) {
for (var rt in Ge)
this[rt] = Ge[rt];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var Xt, te, ce, Pt;
this._more || (this.yytext = "", this.match = "");
for (var Ge = this._currentRules(), rt = 0; rt < Ge.length; rt++)
if (ce = this._input.match(this.rules[Ge[rt]]), ce && (!te || ce[0].length > te[0].length)) {
if (te = ce, Pt = rt, this.options.backtrack_lexer) {
if (Xt = this.test_match(ce, Ge[rt]), Xt !== !1)
return Xt;
if (this._backtrack) {
te = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return te ? (Xt = this.test_match(te, Ge[Pt]), Xt !== !1 ? Xt : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var te = this.next();
return te || this.lex();
},
begin: function(te) {
this.conditionStack.push(te);
},
popState: function() {
var te = this.conditionStack.length - 1;
return te > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(te) {
return te = this.conditionStack.length - 1 - Math.abs(te || 0), te >= 0 ? this.conditionStack[te] : "INITIAL";
},
pushState: function(te) {
this.begin(te);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: {},
performAction: function(te, ce, Pt, Ge) {
switch (Pt) {
case 0:
return this.begin("open_directive"), 12;
case 1:
return this.begin("type_directive"), 13;
case 2:
return this.popState(), this.begin("arg_directive"), 10;
case 3:
return this.popState(), this.popState(), 15;
case 4:
return 14;
case 5:
break;
case 6:
break;
case 7:
return this.begin("acc_title"), 44;
case 8:
return this.popState(), "acc_title_value";
case 9:
return this.begin("acc_descr"), 46;
case 10:
return this.popState(), "acc_descr_value";
case 11:
this.begin("acc_descr_multiline");
break;
case 12:
this.popState();
break;
case 13:
return "acc_descr_multiline_value";
case 14:
this.begin("string");
break;
case 15:
this.popState();
break;
case 16:
return "STR";
case 17:
return 86;
case 18:
return 95;
case 19:
return 87;
case 20:
return 104;
case 21:
return 88;
case 22:
return 89;
case 23:
this.begin("href");
break;
case 24:
this.popState();
break;
case 25:
return 100;
case 26:
this.begin("callbackname");
break;
case 27:
this.popState();
break;
case 28:
this.popState(), this.begin("callbackargs");
break;
case 29:
return 98;
case 30:
this.popState();
break;
case 31:
return 99;
case 32:
this.begin("click");
break;
case 33:
this.popState();
break;
case 34:
return 90;
case 35:
return te.lex.firstGraph() && this.begin("dir"), 24;
case 36:
return te.lex.firstGraph() && this.begin("dir"), 24;
case 37:
return 38;
case 38:
return 42;
case 39:
return 101;
case 40:
return 101;
case 41:
return 101;
case 42:
return 101;
case 43:
return this.popState(), 25;
case 44:
return this.popState(), 26;
case 45:
return this.popState(), 26;
case 46:
return this.popState(), 26;
case 47:
return this.popState(), 26;
case 48:
return this.popState(), 26;
case 49:
return this.popState(), 26;
case 50:
return this.popState(), 26;
case 51:
return this.popState(), 26;
case 52:
return this.popState(), 26;
case 53:
return this.popState(), 26;
case 54:
return 118;
case 55:
return 119;
case 56:
return 120;
case 57:
return 121;
case 58:
return 105;
case 59:
return 111;
case 60:
return 53;
case 61:
return 67;
case 62:
return 52;
case 63:
return 20;
case 64:
return 106;
case 65:
return 126;
case 66:
return 82;
case 67:
return 82;
case 68:
return 82;
case 69:
return 81;
case 70:
return 81;
case 71:
return 81;
case 72:
return 59;
case 73:
return 60;
case 74:
return 61;
case 75:
return 62;
case 76:
return 63;
case 77:
return 64;
case 78:
return 65;
case 79:
return 69;
case 80:
return 70;
case 81:
return 55;
case 82:
return 56;
case 83:
return 109;
case 84:
return 112;
case 85:
return 127;
case 86:
return 124;
case 87:
return 113;
case 88:
return 125;
case 89:
return 125;
case 90:
return 114;
case 91:
return 73;
case 92:
return 92;
case 93:
return "SEP";
case 94:
return 91;
case 95:
return 66;
case 96:
return 75;
case 97:
return 74;
case 98:
return 77;
case 99:
return 76;
case 100:
return 122;
case 101:
return 123;
case 102:
return 68;
case 103:
return 57;
case 104:
return 58;
case 105:
return 40;
case 106:
return 41;
case 107:
return 71;
case 108:
return 72;
case 109:
return 133;
case 110:
return 21;
case 111:
return 22;
case 112:
return 23;
}
},
rules: [/^(?:%%\{)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:%%(?!\{)[^\n]*)/, /^(?:[^\}]%%[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s]+["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\[)/, /^(?:\]\))/, /^(?:\[\[)/, /^(?:\]\])/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\])/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:-)/, /^(?:\.)/, /^(?:[\_])/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:[A-Za-z]+)/, /^(?:\\\])/, /^(?:\[\/)/, /^(?:\/\])/, /^(?:\[\\)/, /^(?:[!"#$%&'*+,-.`?\\_/])/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\()/, /^(?:\))/, /^(?:\[)/, /^(?:\])/, /^(?:\{)/, /^(?:\})/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/],
conditions: { close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, callbackargs: { rules: [30, 31], inclusive: !1 }, callbackname: { rules: [27, 28, 29], inclusive: !1 }, href: { rules: [24, 25], inclusive: !1 }, click: { rules: [33, 34], inclusive: !1 }, vertex: { rules: [], inclusive: !1 }, dir: { rules: [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53], inclusive: !1 }, acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, string: { rules: [15, 16], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 9, 11, 14, 17, 18, 19, 20, 21, 22, 23, 26, 32, 35, 36, 37, 38, 39, 40, 41, 42, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112], inclusive: !0 } }
};
return xn;
}();
_i.lexer = mu;
function bl() {
this.yy = {};
}
return bl.prototype = _i, _i.Parser = bl, new bl();
}();
Xf.parser = Xf;
const gnt = (t, e) => {
var r;
return ((r = e == null ? void 0 : e.flowchart) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !1 : t.match(/^\s*graph/) !== null;
}, ynt = (t, e) => {
var r;
return ((r = e == null ? void 0 : e.flowchart) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" && t.match(/^\s*graph/) !== null ? !0 : t.match(/^\s*flowchart/) !== null;
}, mnt = "flowchart-";
let Uk = 0, H4 = nt(), ir = {}, Ys = [], xo = [], qi = [], Kf = {}, G4 = {}, Nh = 0, bb = !0, wi, v0, x0 = [];
const k0 = (t) => pe.sanitizeText(t, H4), bnt = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, w0 = function(t) {
const e = Object.keys(ir);
for (let r = 0; r < e.length; r++)
if (ir[e[r]].id === t)
return ir[e[r]].domId;
return t;
}, _nt = function(t, e, r, n, i, a, s = {}) {
let o, l = t;
typeof l > "u" || l.trim().length !== 0 && (typeof ir[l] > "u" && (ir[l] = {
id: l,
domId: mnt + l + "-" + Uk,
styles: [],
classes: []
}), Uk++, typeof e < "u" ? (H4 = nt(), o = k0(e.trim()), o[0] === '"' && o[o.length - 1] === '"' && (o = o.substring(1, o.length - 1)), ir[l].text = o) : typeof ir[l].text > "u" && (ir[l].text = t), typeof r < "u" && (ir[l].type = r), typeof n < "u" && n !== null && n.forEach(function(u) {
ir[l].styles.push(u);
}), typeof i < "u" && i !== null && i.forEach(function(u) {
ir[l].classes.push(u);
}), typeof a < "u" && (ir[l].dir = a), ir[l].props = s);
}, vnt = function(t, e, r, n) {
const s = { start: t, end: e, type: void 0, text: "" };
n = r.text, typeof n < "u" && (s.text = k0(n.trim()), s.text[0] === '"' && s.text[s.text.length - 1] === '"' && (s.text = s.text.substring(1, s.text.length - 1))), typeof r < "u" && (s.type = r.type, s.stroke = r.stroke, s.length = r.length), Ys.push(s);
}, xnt = function(t, e, r, n) {
let i, a;
for (i = 0; i < t.length; i++)
for (a = 0; a < e.length; a++)
vnt(t[i], e[a], r, n);
}, knt = function(t, e) {
t.forEach(function(r) {
r === "default" ? Ys.defaultInterpolate = e : Ys[r].interpolate = e;
});
}, wnt = function(t, e) {
t.forEach(function(r) {
r === "default" ? Ys.defaultStyle = e : (Se.isSubstringInArray("fill", e) === -1 && e.push("fill:none"), Ys[r].style = e);
});
}, Tnt = function(t, e) {
typeof xo[t] > "u" && (xo[t] = { id: t, styles: [], textStyles: [] }), typeof e < "u" && e !== null && e.forEach(function(r) {
if (r.match("color")) {
const i = r.replace("fill", "bgFill").replace("color", "fill");
xo[t].textStyles.push(i);
}
xo[t].styles.push(r);
});
}, Ent = function(t) {
wi = t, wi.match(/.*) && (wi = "RL"), wi.match(/.*\^/) && (wi = "BT"), wi.match(/.*>/) && (wi = "LR"), wi.match(/.*v/) && (wi = "TB");
}, j4 = function(t, e) {
t.split(",").forEach(function(r) {
let n = r;
typeof ir[n] < "u" && ir[n].classes.push(e), typeof Kf[n] < "u" && Kf[n].classes.push(e);
});
}, Cnt = function(t, e) {
t.split(",").forEach(function(r) {
typeof e < "u" && (G4[v0 === "gen-1" ? w0(r) : r] = k0(e));
});
}, Snt = function(t, e, r) {
let n = w0(t);
if (nt().securityLevel !== "loose" || typeof e > "u")
return;
let i = [];
if (typeof r == "string") {
i = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
for (let a = 0; a < i.length; a++) {
let s = i[a].trim();
s.charAt(0) === '"' && s.charAt(s.length - 1) === '"' && (s = s.substr(1, s.length - 2)), i[a] = s;
}
}
i.length === 0 && i.push(t), typeof ir[t] < "u" && (ir[t].haveCallback = !0, x0.push(function() {
const a = document.querySelector(`[id="${n}"]`);
a !== null && a.addEventListener(
"click",
function() {
Se.runFunc(e, ...i);
},
!1
);
}));
}, Ant = function(t, e, r) {
t.split(",").forEach(function(n) {
typeof ir[n] < "u" && (ir[n].link = Se.formatUrl(e, H4), ir[n].linkTarget = r);
}), j4(t, "clickable");
}, Mnt = function(t) {
return G4[t];
}, Lnt = function(t, e, r) {
t.split(",").forEach(function(n) {
Snt(n, e, r);
}), j4(t, "clickable");
}, Rnt = function(t) {
x0.forEach(function(e) {
e(t);
});
}, Int = function() {
return wi.trim();
}, Nnt = function() {
return ir;
}, Bnt = function() {
return Ys;
}, Dnt = function() {
return xo;
}, WM = function(t) {
let e = St(".mermaidTooltip");
(e._groups || e)[0][0] === null && (e = St("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), St(t).select("svg").selectAll("g.node").on("mouseover", function() {
const i = St(this);
if (i.attr("title") === null)
return;
const s = this.getBoundingClientRect();
e.transition().duration(200).style("opacity", ".9"), e.text(i.attr("title")).style("left", window.scrollX + s.left + (s.right - s.left) / 2 + "px").style("top", window.scrollY + s.top - 14 + document.body.scrollTop + "px"), e.html(e.html().replace(/<br\/>/g, "
")), i.classed("hover", !0);
}).on("mouseout", function() {
e.transition().duration(500).style("opacity", 0), St(this).classed("hover", !1);
});
};
x0.push(WM);
const Ont = function(t = "gen-1") {
ir = {}, xo = {}, Ys = [], x0 = [WM], qi = [], Kf = {}, Nh = 0, G4 = [], bb = !0, v0 = t, gi();
}, Fnt = (t) => {
v0 = t || "gen-1";
}, Pnt = function() {
return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
}, qnt = function(t, e, r) {
let n = t.trim(), i = r;
t === r && r.match(/\s/) && (n = void 0);
function a(h) {
const d = { boolean: {}, number: {}, string: {} }, f = [];
let p;
return { nodeList: h.filter(function(_) {
const y = typeof _;
return _.stmt && _.stmt === "dir" ? (p = _.value, !1) : _.trim() === "" ? !1 : y in d ? d[y].hasOwnProperty(_) ? !1 : d[y][_] = !0 : f.indexOf(_) >= 0 ? !1 : f.push(_);
}), dir: p };
}
let s = [];
const { nodeList: o, dir: l } = a(s.concat.apply(s, e));
if (s = o, v0 === "gen-1")
for (let h = 0; h < s.length; h++)
s[h] = w0(s[h]);
n = n || "subGraph" + Nh, i = i || "", i = k0(i), Nh = Nh + 1;
const u = { id: n, nodes: s, title: i.trim(), classes: [], dir: l };
return H.info("Adding", u.id, u.nodes, u.dir), u.nodes = $M(u, qi).nodes, qi.push(u), Kf[n] = u, n;
}, Vnt = function(t) {
for (let e = 0; e < qi.length; e++)
if (qi[e].id === t)
return e;
return -1;
};
let Kl = -1;
const HM = [], GM = function(t, e) {
const r = qi[e].nodes;
if (Kl = Kl + 1, Kl > 2e3)
return;
if (HM[Kl] = e, qi[e].id === t)
return {
result: !0,
count: 0
};
let n = 0, i = 1;
for (; n < r.length; ) {
const a = Vnt(r[n]);
if (a >= 0) {
const s = GM(t, a);
if (s.result)
return {
result: !0,
count: i + s.count
};
i = i + s.count;
}
n = n + 1;
}
return {
result: !1,
count: i
};
}, znt = function(t) {
return HM[t];
}, Ynt = function() {
Kl = -1, qi.length > 0 && GM("none", qi.length - 1);
}, Unt = function() {
return qi;
}, Wnt = () => bb ? (bb = !1, !0) : !1, Hnt = (t) => {
let e = t.trim(), r = "arrow_open";
switch (e[0]) {
case "<":
r = "arrow_point", e = e.slice(1);
break;
case "x":
r = "arrow_cross", e = e.slice(1);
break;
case "o":
r = "arrow_circle", e = e.slice(1);
break;
}
let n = "normal";
return e.indexOf("=") !== -1 && (n = "thick"), e.indexOf(".") !== -1 && (n = "dotted"), { type: r, stroke: n };
}, Gnt = (t, e) => {
const r = e.length;
let n = 0;
for (let i = 0; i < r; ++i)
e[i] === t && ++n;
return n;
}, jnt = (t) => {
const e = t.trim();
let r = e.slice(0, -1), n = "arrow_open";
switch (e.slice(-1)) {
case "x":
n = "arrow_cross", e[0] === "x" && (n = "double_" + n, r = r.slice(1));
break;
case ">":
n = "arrow_point", e[0] === "<" && (n = "double_" + n, r = r.slice(1));
break;
case "o":
n = "arrow_circle", e[0] === "o" && (n = "double_" + n, r = r.slice(1));
break;
}
let i = "normal", a = r.length - 1;
r[0] === "=" && (i = "thick");
let s = Gnt(".", r);
return s && (i = "dotted", a = s), { type: n, stroke: i, length: a };
}, $nt = (t, e) => {
const r = jnt(t);
let n;
if (e) {
if (n = Hnt(e), n.stroke !== r.stroke)
return { type: "INVALID", stroke: "INVALID" };
if (n.type === "arrow_open")
n.type = r.type;
else {
if (n.type !== r.type)
return { type: "INVALID", stroke: "INVALID" };
n.type = "double_" + n.type;
}
return n.type === "double_arrow" && (n.type = "double_arrow_point"), n.length = r.length, n;
}
return r;
}, jM = (t, e) => {
let r = !1;
return t.forEach((n) => {
n.nodes.indexOf(e) >= 0 && (r = !0);
}), r;
}, $M = (t, e) => {
const r = [];
return t.nodes.forEach((n, i) => {
jM(e, n) || r.push(t.nodes[i]);
}), { nodes: r };
}, la = {
parseDirective: bnt,
defaultConfig: () => $o.flowchart,
setAccTitle: Yn,
getAccTitle: yi,
getAccDescription: bi,
setAccDescription: mi,
addVertex: _nt,
lookUpDomId: w0,
addLink: xnt,
updateLinkInterpolate: knt,
updateLink: wnt,
addClass: Tnt,
setDirection: Ent,
setClass: j4,
setTooltip: Cnt,
getTooltip: Mnt,
setClickEvent: Lnt,
setLink: Ant,
bindFunctions: Rnt,
getDirection: Int,
getVertices: Nnt,
getEdges: Bnt,
getClasses: Dnt,
clear: Ont,
setGen: Fnt,
defaultStyle: Pnt,
addSubGraph: qnt,
getDepthFirstPos: znt,
indexNodes: Ynt,
getSubGraphs: Unt,
destructLink: $nt,
lex: {
firstGraph: Wnt
},
exists: jM,
makeUniq: $M
};
var Zf;
if (typeof Za == "function")
try {
Zf = ur;
} catch {
}
Zf || (Zf = window.graphlib);
var Xnt = Zf, Qf;
if (typeof Za == "function")
try {
Qf = IM();
} catch {
}
Qf || (Qf = window.dagre);
var XM = Qf, KM = Knt;
function Knt(t, e) {
return t.intersect(e);
}
var $4 = Znt;
function Znt(t, e, r, n) {
var i = t.x, a = t.y, s = i - n.x, o = a - n.y, l = Math.sqrt(e * e * o * o + r * r * s * s), u = Math.abs(e * r * s / l);
n.x < i && (u = -u);
var h = Math.abs(e * r * o / l);
return n.y < a && (h = -h), { x: i + u, y: a + h };
}
var Qnt = $4, ZM = Jnt;
function Jnt(t, e, r) {
return Qnt(t, e, e, r);
}
var tit = eit;
function eit(t, e, r, n) {
var i, a, s, o, l, u, h, d, f, p, m, _, y, b, x;
if (i = e.y - t.y, s = t.x - e.x, l = e.x * t.y - t.x * e.y, f = i * r.x + s * r.y + l, p = i * n.x + s * n.y + l, !(f !== 0 && p !== 0 && Wk(f, p)) && (a = n.y - r.y, o = r.x - n.x, u = n.x * r.y - r.x * n.y, h = a * t.x + o * t.y + u, d = a * e.x + o * e.y + u, !(h !== 0 && d !== 0 && Wk(h, d)) && (m = i * o - a * s, m !== 0)))
return _ = Math.abs(m / 2), y = s * u - o * l, b = y < 0 ? (y - _) / m : (y + _) / m, y = a * l - i * u, x = y < 0 ? (y - _) / m : (y + _) / m, { x: b, y: x };
}
function Wk(t, e) {
return t * e > 0;
}
var rit = tit, QM = nit;
function nit(t, e, r) {
var n = t.x, i = t.y, a = [], s = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
e.forEach(function(m) {
s = Math.min(s, m.x), o = Math.min(o, m.y);
});
for (var l = n - t.width / 2 - s, u = i - t.height / 2 - o, h = 0; h < e.length; h++) {
var d = e[h], f = e[h < e.length - 1 ? h + 1 : 0], p = rit(
t,
r,
{ x: l + d.x, y: u + d.y },
{ x: l + f.x, y: u + f.y }
);
p && a.push(p);
}
return a.length ? (a.length > 1 && a.sort(function(m, _) {
var y = m.x - r.x, b = m.y - r.y, x = Math.sqrt(y * y + b * b), k = _.x - r.x, T = _.y - r.y, C = Math.sqrt(k * k + T * T);
return x < C ? -1 : x === C ? 0 : 1;
}), a[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", t), t);
}
var JM = iit;
function iit(t, e) {
var r = t.x, n = t.y, i = e.x - r, a = e.y - n, s = t.width / 2, o = t.height / 2, l, u;
return Math.abs(a) * s > Math.abs(i) * o ? (a < 0 && (o = -o), l = a === 0 ? 0 : o * i / a, u = o) : (i < 0 && (s = -s), l = s, u = i === 0 ? 0 : s * a / i), { x: r + l, y: n + u };
}
var ait = {
node: KM,
circle: ZM,
ellipse: $4,
polygon: QM,
rect: JM
}, Jf;
if (typeof Za == "function")
try {
Jf = {
defaults: xM(),
each: B4(),
isFunction: ol,
isPlainObject: EM(),
pick: AM(),
has: F4(),
range: MM(),
uniqueId: LM()
};
} catch {
}
Jf || (Jf = window._);
var yl = Jf;
const sit = /* @__PURE__ */ yR(EH);
var Uc;
if (!Uc && typeof Za == "function")
try {
Uc = sit;
} catch {
}
Uc || (Uc = window.d3);
var ss = Uc, Hk = yl, Hn = {
isSubgraph: oit,
edgeToId: lit,
applyStyle: uit,
applyClass: hit,
applyTransition: fit
};
function oit(t, e) {
return !!t.children(e).length;
}
function lit(t) {
return Yy(t.v) + ":" + Yy(t.w) + ":" + Yy(t.name);
}
var cit = /:/g;
function Yy(t) {
return t ? String(t).replace(cit, "\\:") : "";
}
function uit(t, e) {
e && t.attr("style", e);
}
function hit(t, e, r) {
e && t.attr("class", e).attr("class", r + " " + t.attr("class"));
}
function fit(t, e) {
var r = e.graph();
if (Hk.isPlainObject(r)) {
var n = r.transition;
if (Hk.isFunction(n))
return n(t);
}
return t;
}
var Uy, Gk;
function dit() {
if (Gk)
return Uy;
Gk = 1;
var t = Hn;
Uy = e;
function e(n, i) {
for (var a = n.append("text"), s = r(i.label).split(`
`), o = 0; o < s.length; o++)
a.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(s[o]);
return t.applyStyle(a, i.labelStyle), a;
}
function r(n) {
for (var i = "", a = !1, s, o = 0; o < n.length; ++o)
if (s = n[o], a) {
switch (s) {
case "n":
i += `
`;
break;
default:
i += s;
}
a = !1;
} else
s === "\\" ? a = !0 : i += s;
return i;
}
return Uy;
}
var pit = Hn, X4 = git;
function git(t, e) {
var r = t.append("foreignObject").attr("width", "100000"), n = r.append("xhtml:div");
n.attr("xmlns", "http://www.w3.org/1999/xhtml");
var i = e.label;
switch (typeof i) {
case "function":
n.insert(i);
break;
case "object":
n.insert(function() {
return i;
});
break;
default:
n.html(i);
}
pit.applyStyle(n, e.labelStyle), n.style("display", "inline-block"), n.style("white-space", "nowrap");
var a = n.node().getBoundingClientRect();
return r.attr("width", a.width).attr("height", a.height), r;
}
var Wy, jk;
function yit() {
if (jk)
return Wy;
jk = 1;
var t = Hn;
Wy = e;
function e(r, n) {
var i = r;
return i.node().appendChild(n.label), t.applyStyle(i, n.labelStyle), i;
}
return Wy;
}
var Hy, $k;
function K4() {
if ($k)
return Hy;
$k = 1;
var t = dit(), e = X4, r = yit();
Hy = n;
function n(i, a, s) {
var o = a.label, l = i.append("g");
a.labelType === "svg" ? r(l, a) : typeof o != "string" || a.labelType === "html" ? e(l, a) : t(l, a);
var u = l.node().getBBox(), h;
switch (s) {
case "top":
h = -a.height / 2;
break;
case "bottom":
h = a.height / 2 - u.height;
break;
default:
h = -u.height / 2;
}
return l.attr(
"transform",
"translate(" + -u.width / 2 + "," + h + ")"
), l;
}
return Hy;
}
var Gy, Xk;
function mit() {
if (Xk)
return Gy;
Xk = 1;
var t = yl, e = K4(), r = Hn, n = ss;
Gy = i;
function i(a, s, o) {
var l = s.nodes().filter(function(d) {
return !r.isSubgraph(s, d);
}), u = a.selectAll("g.node").data(l, function(d) {
return d;
}).classed("update", !0);
u.exit().remove(), u.enter().append("g").attr("class", "node").style("opacity", 0), u = a.selectAll("g.node"), u.each(function(d) {
var f = s.node(d), p = n.select(this);
r.applyClass(
p,
f.class,
(p.classed("update") ? "update " : "") + "node"
), p.select("g.label").remove();
var m = p.append("g").attr("class", "label"), _ = e(m, f), y = o[f.shape], b = t.pick(_.node().getBBox(), "width", "height");
f.elem = this, f.id && p.attr("id", f.id), f.labelId && m.attr("id", f.labelId), t.has(f, "width") && (b.width = f.width), t.has(f, "height") && (b.height = f.height), b.width += f.paddingLeft + f.paddingRight, b.height += f.paddingTop + f.paddingBottom, m.attr("transform", "translate(" + (f.paddingLeft - f.paddingRight) / 2 + "," + (f.paddingTop - f.paddingBottom) / 2 + ")");
var x = n.select(this);
x.select(".label-container").remove();
var k = y(x, b, f).classed("label-container", !0);
r.applyStyle(k, f.style);
var T = k.node().getBBox();
f.width = T.width, f.height = T.height;
});
var h;
return u.exit ? h = u.exit() : h = u.selectAll(null), r.applyTransition(h, s).style("opacity", 0).remove(), u;
}
return Gy;
}
var jy, Kk;
function bit() {
if (Kk)
return jy;
Kk = 1;
var t = Hn, e = ss, r = K4();
jy = n;
function n(i, a) {
var s = a.nodes().filter(function(u) {
return t.isSubgraph(a, u);
}), o = i.selectAll("g.cluster").data(s, function(u) {
return u;
});
o.selectAll("*").remove(), o.enter().append("g").attr("class", "cluster").attr("id", function(u) {
var h = a.node(u);
return h.id;
}).style("opacity", 0), o = i.selectAll("g.cluster"), t.applyTransition(o, a).style("opacity", 1), o.each(function(u) {
var h = a.node(u), d = e.select(this);
e.select(this).append("rect");
var f = d.append("g").attr("class", "label");
r(f, h, h.clusterLabelPos);
}), o.selectAll("rect").each(function(u) {
var h = a.node(u), d = e.select(this);
t.applyStyle(d, h.style);
});
var l;
return o.exit ? l = o.exit() : l = o.selectAll(null), t.applyTransition(l, a).style("opacity", 0).remove(), o;
}
return jy;
}
var $y, Zk;
function _it() {
if (Zk)
return $y;
Zk = 1;
var t = yl, e = K4(), r = Hn, n = ss;
$y = i;
function i(a, s) {
var o = a.selectAll("g.edgeLabel").data(s.edges(), function(u) {
return r.edgeToId(u);
}).classed("update", !0);
o.exit().remove(), o.enter().append("g").classed("edgeLabel", !0).style("opacity", 0), o = a.selectAll("g.edgeLabel"), o.each(function(u) {
var h = n.select(this);
h.select(".label").remove();
var d = s.edge(u), f = e(h, s.edge(u), 0, 0).classed("label", !0), p = f.node().getBBox();
d.labelId && f.attr("id", d.labelId), t.has(d, "width") || (d.width = p.width), t.has(d, "height") || (d.height = p.height);
});
var l;
return o.exit ? l = o.exit() : l = o.selectAll(null), r.applyTransition(l, s).style("opacity", 0).remove(), o;
}
return $y;
}
var Xy, Qk;
function vit() {
if (Qk)
return Xy;
Qk = 1;
var t = yl, e = KM, r = Hn, n = ss;
Xy = i;
function i(d, f, p) {
var m = d.selectAll("g.edgePath").data(f.edges(), function(b) {
return r.edgeToId(b);
}).classed("update", !0), _ = u(m, f);
h(m, f);
var y = m.merge !== void 0 ? m.merge(_) : m;
return r.applyTransition(y, f).style("opacity", 1), y.each(function(b) {
var x = n.select(this), k = f.edge(b);
k.elem = this, k.id && x.attr("id", k.id), r.applyClass(
x,
k.class,
(x.classed("update") ? "update " : "") + "edgePath"
);
}), y.selectAll("path.path").each(function(b) {
var x = f.edge(b);
x.arrowheadId = t.uniqueId("arrowhead");
var k = n.select(this).attr("marker-end", function() {
return "url(" + a(location.href, x.arrowheadId) + ")";
}).style("fill", "none");
r.applyTransition(k, f).attr("d", function(T) {
return s(f, T);
}), r.applyStyle(k, x.style);
}), y.selectAll("defs *").remove(), y.selectAll("defs").each(function(b) {
var x = f.edge(b), k = p[x.arrowhead];
k(n.select(this), x.arrowheadId, x, "arrowhead");
}), y;
}
function a(d, f) {
var p = d.split("#")[0];
return p + "#" + f;
}
function s(d, f) {
var p = d.edge(f), m = d.node(f.v), _ = d.node(f.w), y = p.points.slice(1, p.points.length - 1);
return y.unshift(e(m, y[0])), y.push(e(_, y[y.length - 1])), o(p, y);
}
function o(d, f) {
var p = (n.line || n.svg.line)().x(function(m) {
return m.x;
}).y(function(m) {
return m.y;
});
return (p.curve || p.interpolate)(d.curve), p(f);
}
function l(d) {
var f = d.getBBox(), p = d.ownerSVGElement.getScreenCTM().inverse().multiply(d.getScreenCTM()).translate(f.width / 2, f.height / 2);
return { x: p.e, y: p.f };
}
function u(d, f) {
var p = d.enter().append("g").attr("class", "edgePath").style("opacity", 0);
return p.append("path").attr("class", "path").attr("d", function(m) {
var _ = f.edge(m), y = f.node(m.v).elem, b = t.range(_.points.length).map(function() {
return l(y);
});
return o(_, b);
}), p.append("defs"), p;
}
function h(d, f) {
var p = d.exit();
r.applyTransition(p, f).style("opacity", 0).remove();
}
return Xy;
}
var Ky, Jk;
function xit() {
if (Jk)
return Ky;
Jk = 1;
var t = Hn, e = ss;
Ky = r;
function r(n, i) {
var a = n.filter(function() {
return !e.select(this).classed("update");
});
function s(o) {
var l = i.node(o);
return "translate(" + l.x + "," + l.y + ")";
}
a.attr("transform", s), t.applyTransition(n, i).style("opacity", 1).attr("transform", s);
}
return Ky;
}
var Zy, tw;
function kit() {
if (tw)
return Zy;
tw = 1;
var t = Hn, e = ss, r = yl;
Zy = n;
function n(i, a) {
var s = i.filter(function() {
return !e.select(this).classed("update");
});
function o(l) {
var u = a.edge(l);
return r.has(u, "x") ? "translate(" + u.x + "," + u.y + ")" : "";
}
s.attr("transform", o), t.applyTransition(i, a).style("opacity", 1).attr("transform", o);
}
return Zy;
}
var Qy, ew;
function wit() {
if (ew)
return Qy;
ew = 1;
var t = Hn, e = ss;
Qy = r;
function r(n, i) {
var a = n.filter(function() {
return !e.select(this).classed("update");
});
function s(o) {
var l = i.node(o);
return "translate(" + l.x + "," + l.y + ")";
}
a.attr("transform", s), t.applyTransition(n, i).style("opacity", 1).attr("transform", s), t.applyTransition(a.selectAll("rect"), i).attr("width", function(o) {
return i.node(o).width;
}).attr("height", function(o) {
return i.node(o).height;
}).attr("x", function(o) {
var l = i.node(o);
return -l.width / 2;
}).attr("y", function(o) {
var l = i.node(o);
return -l.height / 2;
});
}
return Qy;
}
var Jy, rw;
function Tit() {
if (rw)
return Jy;
rw = 1;
var t = JM, e = $4, r = ZM, n = QM;
Jy = {
rect: i,
ellipse: a,
circle: s,
diamond: o
};
function i(l, u, h) {
var d = l.insert("rect", ":first-child").attr("rx", h.rx).attr("ry", h.ry).attr("x", -u.width / 2).attr("y", -u.height / 2).attr("width", u.width).attr("height", u.height);
return h.intersect = function(f) {
return t(h, f);
}, d;
}
function a(l, u, h) {
var d = u.width / 2, f = u.height / 2, p = l.insert("ellipse", ":first-child").attr("x", -u.width / 2).attr("y", -u.height / 2).attr("rx", d).attr("ry", f);
return h.intersect = function(m) {
return e(h, d, f, m);
}, p;
}
function s(l, u, h) {
var d = Math.max(u.width, u.height) / 2, f = l.insert("circle", ":first-child").attr("x", -u.width / 2).attr("y", -u.height / 2).attr("r", d);
return h.intersect = function(p) {
return r(h, d, p);
}, f;
}
function o(l, u, h) {
var d = u.width * Math.SQRT2 / 2, f = u.height * Math.SQRT2 / 2, p = [
{ x: 0, y: -f },
{ x: -d, y: 0 },
{ x: 0, y: f },
{ x: d, y: 0 }
], m = l.insert("polygon", ":first-child").attr("points", p.map(function(_) {
return _.x + "," + _.y;
}).join(" "));
return h.intersect = function(_) {
return n(h, p, _);
}, m;
}
return Jy;
}
var tm, nw;
function Eit() {
if (nw)
return tm;
nw = 1;
var t = Hn;
tm = {
default: e,
normal: e,
vee: r,
undirected: n
};
function e(i, a, s, o) {
var l = i.append("marker").attr("id", a).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), u = l.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
t.applyStyle(u, s[o + "Style"]), s[o + "Class"] && u.attr("class", s[o + "Class"]);
}
function r(i, a, s, o) {
var l = i.append("marker").attr("id", a).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), u = l.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
t.applyStyle(u, s[o + "Style"]), s[o + "Class"] && u.attr("class", s[o + "Class"]);
}
function n(i, a, s, o) {
var l = i.append("marker").attr("id", a).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), u = l.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0");
t.applyStyle(u, s[o + "Style"]), s[o + "Class"] && u.attr("class", s[o + "Class"]);
}
return tm;
}
var Wr = yl, Cit = ss, Sit = XM.layout, Ait = Mit;
function Mit() {
var t = mit(), e = bit(), r = _it(), n = vit(), i = xit(), a = kit(), s = wit(), o = Tit(), l = Eit(), u = function(h, d) {
Iit(d);
var f = Nl(h, "output"), p = Nl(f, "clusters"), m = Nl(f, "edgePaths"), _ = r(Nl(f, "edgeLabels"), d), y = t(Nl(f, "nodes"), d, o);
Sit(d), i(y, d), a(_, d), n(m, d, l);
var b = e(p, d);
s(b, d), Nit(d);
};
return u.createNodes = function(h) {
return arguments.length ? (t = h, u) : t;
}, u.createClusters = function(h) {
return arguments.length ? (e = h, u) : e;
}, u.createEdgeLabels = function(h) {
return arguments.length ? (r = h, u) : r;
}, u.createEdgePaths = function(h) {
return arguments.length ? (n = h, u) : n;
}, u.shapes = function(h) {
return arguments.length ? (o = h, u) : o;
}, u.arrows = function(h) {
return arguments.length ? (l = h, u) : l;
}, u;
}
var Lit = {
paddingLeft: 10,
paddingRight: 10,
paddingTop: 10,
paddingBottom: 10,
rx: 0,
ry: 0,
shape: "rect"
}, Rit = {
arrowhead: "normal",
curve: Cit.curveLinear
};
function Iit(t) {
t.nodes().forEach(function(e) {
var r = t.node(e);
!Wr.has(r, "label") && !t.children(e).length && (r.label = e), Wr.has(r, "paddingX") && Wr.defaults(r, {
paddingLeft: r.paddingX,
paddingRight: r.paddingX
}), Wr.has(r, "paddingY") && Wr.defaults(r, {
paddingTop: r.paddingY,
paddingBottom: r.paddingY
}), Wr.has(r, "padding") && Wr.defaults(r, {
paddingLeft: r.padding,
paddingRight: r.padding,
paddingTop: r.padding,
paddingBottom: r.padding
}), Wr.defaults(r, Lit), Wr.each(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(n) {
r[n] = Number(r[n]);
}), Wr.has(r, "width") && (r._prevWidth = r.width), Wr.has(r, "height") && (r._prevHeight = r.height);
}), t.edges().forEach(function(e) {
var r = t.edge(e);
Wr.has(r, "label") || (r.label = ""), Wr.defaults(r, Rit);
});
}
function Nit(t) {
Wr.each(t.nodes(), function(e) {
var r = t.node(e);
Wr.has(r, "_prevWidth") ? r.width = r._prevWidth : delete r.width, Wr.has(r, "_prevHeight") ? r.height = r._prevHeight : delete r.height, delete r._prevWidth, delete r._prevHeight;
});
}
function Nl(t, e) {
var r = t.select("g." + e);
return r.empty() && (r = t.append("g").attr("class", e)), r;
}
var Bit = "0.6.4";
/**
* @license
* Copyright (c) 2012-2013 Chris Pettitt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var Mn = {
graphlib: Xnt,
dagre: XM,
intersect: ait,
render: Ait,
util: Hn,
version: Bit
};
function tL(t, e, r) {
const n = e.width, i = e.height, a = (n + i) * 0.9, s = [
{ x: a / 2, y: 0 },
{ x: a, y: -a / 2 },
{ x: a / 2, y: -a },
{ x: 0, y: -a / 2 }
], o = ka(t, a, a, s);
return r.intersect = function(l) {
return Mn.intersect.polygon(r, s, l);
}, o;
}
function eL(t, e, r) {
const i = e.height, a = i / 4, s = e.width + 2 * a, o = [
{ x: a, y: 0 },
{ x: s - a, y: 0 },
{ x: s, y: -i / 2 },
{ x: s - a, y: -i },
{ x: a, y: -i },
{ x: 0, y: -i / 2 }
], l = ka(t, s, i, o);
return r.intersect = function(u) {
return Mn.intersect.polygon(r, o, u);
}, l;
}
function rL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: -i / 2, y: 0 },
{ x: n, y: 0 },
{ x: n, y: -i },
{ x: -i / 2, y: -i },
{ x: 0, y: -i / 2 }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function nL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: -2 * i / 6, y: 0 },
{ x: n - i / 6, y: 0 },
{ x: n + 2 * i / 6, y: -i },
{ x: i / 6, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function iL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: 2 * i / 6, y: 0 },
{ x: n + i / 6, y: 0 },
{ x: n - 2 * i / 6, y: -i },
{ x: -i / 6, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function aL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: -2 * i / 6, y: 0 },
{ x: n + 2 * i / 6, y: 0 },
{ x: n - i / 6, y: -i },
{ x: i / 6, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function sL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: i / 6, y: 0 },
{ x: n - i / 6, y: 0 },
{ x: n + 2 * i / 6, y: -i },
{ x: -2 * i / 6, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function oL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: 0, y: 0 },
{ x: n + i / 2, y: 0 },
{ x: n, y: -i / 2 },
{ x: n + i / 2, y: -i },
{ x: 0, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function lL(t, e, r) {
const n = e.height, i = e.width + n / 4, a = t.insert("rect", ":first-child").attr("rx", n / 2).attr("ry", n / 2).attr("x", -i / 2).attr("y", -n / 2).attr("width", i).attr("height", n);
return r.intersect = function(s) {
return Mn.intersect.rect(r, s);
}, a;
}
function cL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: 0, y: 0 },
{ x: n, y: 0 },
{ x: n, y: -i },
{ x: 0, y: -i },
{ x: 0, y: 0 },
{ x: -8, y: 0 },
{ x: n + 8, y: 0 },
{ x: n + 8, y: -i },
{ x: -8, y: -i },
{ x: -8, y: 0 }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function uL(t, e, r) {
const n = e.width, i = n / 2, a = i / (2.5 + n / 50), s = e.height + a, o = "M 0," + a + " a " + i + "," + a + " 0,0,0 " + n + " 0 a " + i + "," + a + " 0,0,0 " + -n + " 0 l 0," + s + " a " + i + "," + a + " 0,0,0 " + n + " 0 l 0," + -s, l = t.attr("label-offset-y", a).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -n / 2 + "," + -(s / 2 + a) + ")");
return r.intersect = function(u) {
const h = Mn.intersect.rect(r, u), d = h.x - r.x;
if (i != 0 && (Math.abs(d) < r.width / 2 || Math.abs(d) == r.width / 2 && Math.abs(h.y - r.y) > r.height / 2 - a)) {
let f = a * a * (1 - d * d / (i * i));
f != 0 && (f = Math.sqrt(f)), f = a - f, u.y - r.y > 0 && (f = -f), h.y += f;
}
return h;
}, l;
}
function Dit(t) {
t.shapes().question = tL, t.shapes().hexagon = eL, t.shapes().stadium = lL, t.shapes().subroutine = cL, t.shapes().cylinder = uL, t.shapes().rect_left_inv_arrow = rL, t.shapes().lean_right = nL, t.shapes().lean_left = iL, t.shapes().trapezoid = aL, t.shapes().inv_trapezoid = sL, t.shapes().rect_right_inv_arrow = oL;
}
function Oit(t) {
t({ question: tL }), t({ hexagon: eL }), t({ stadium: lL }), t({ subroutine: cL }), t({ cylinder: uL }), t({ rect_left_inv_arrow: rL }), t({ lean_right: nL }), t({ lean_left: iL }), t({ trapezoid: aL }), t({ inv_trapezoid: sL }), t({ rect_right_inv_arrow: oL });
}
function ka(t, e, r, n) {
return t.insert("polygon", ":first-child").attr(
"points",
n.map(function(i) {
return i.x + "," + i.y;
}).join(" ")
).attr("transform", "translate(" + -e / 2 + "," + r / 2 + ")");
}
const Fit = {
addToRender: Dit,
addToRenderV2: Oit
}, hL = {}, Pit = function(t) {
const e = Object.keys(t);
for (let r = 0; r < e.length; r++)
hL[e[r]] = t[e[r]];
}, fL = function(t, e, r, n, i, a) {
const s = n ? n.select(`[id="${r}"]`) : St(`[id="${r}"]`), o = i || document;
Object.keys(t).forEach(function(u) {
const h = t[u];
let d = "default";
h.classes.length > 0 && (d = h.classes.join(" "));
const f = Ka(h.styles);
let p = h.text !== void 0 ? h.text : h.id, m;
if (Ar(nt().flowchart.htmlLabels)) {
const b = {
label: p.replace(
/fa[lrsb]?:fa-[\w-]+/g,
(x) => ``
)
};
m = X4(s, b).node(), m.parentNode.removeChild(m);
} else {
const b = o.createElementNS("http://www.w3.org/2000/svg", "text");
b.setAttribute("style", f.labelStyle.replace("color:", "fill:"));
const x = p.split(pe.lineBreakRegex);
for (let k = 0; k < x.length; k++) {
const T = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
T.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), T.setAttribute("dy", "1em"), T.setAttribute("x", "1"), T.textContent = x[k], b.appendChild(T);
}
m = b;
}
let _ = 0, y = "";
switch (h.type) {
case "round":
_ = 5, y = "rect";
break;
case "square":
y = "rect";
break;
case "diamond":
y = "question";
break;
case "hexagon":
y = "hexagon";
break;
case "odd":
y = "rect_left_inv_arrow";
break;
case "lean_right":
y = "lean_right";
break;
case "lean_left":
y = "lean_left";
break;
case "trapezoid":
y = "trapezoid";
break;
case "inv_trapezoid":
y = "inv_trapezoid";
break;
case "odd_right":
y = "rect_left_inv_arrow";
break;
case "circle":
y = "circle";
break;
case "ellipse":
y = "ellipse";
break;
case "stadium":
y = "stadium";
break;
case "subroutine":
y = "subroutine";
break;
case "cylinder":
y = "cylinder";
break;
case "group":
y = "rect";
break;
default:
y = "rect";
}
H.warn("Adding node", h.id, h.domId), e.setNode(a.db.lookUpDomId(h.id), {
labelType: "svg",
labelStyle: f.labelStyle,
shape: y,
label: m,
rx: _,
ry: _,
class: d,
style: f.style,
id: a.db.lookUpDomId(h.id)
});
});
}, dL = function(t, e, r) {
let n = 0, i, a;
if (typeof t.defaultStyle < "u") {
const s = Ka(t.defaultStyle);
i = s.style, a = s.labelStyle;
}
t.forEach(function(s) {
n++;
var o = "L-" + s.start + "-" + s.end, l = "LS-" + s.start, u = "LE-" + s.end;
const h = {};
s.type === "arrow_open" ? h.arrowhead = "none" : h.arrowhead = "normal";
let d = "", f = "";
if (typeof s.style < "u") {
const p = Ka(s.style);
d = p.style, f = p.labelStyle;
} else
switch (s.stroke) {
case "normal":
d = "fill:none", typeof i < "u" && (d = i), typeof a < "u" && (f = a);
break;
case "dotted":
d = "fill:none;stroke-width:2px;stroke-dasharray:3;";
break;
case "thick":
d = " stroke-width: 3.5px;fill:none";
break;
}
h.style = d, h.labelStyle = f, typeof s.interpolate < "u" ? h.curve = Ii(s.interpolate, bn) : typeof t.defaultInterpolate < "u" ? h.curve = Ii(t.defaultInterpolate, bn) : h.curve = Ii(hL.curve, bn), typeof s.text > "u" ? typeof s.style < "u" && (h.arrowheadStyle = "fill: #333") : (h.arrowheadStyle = "fill: #333", h.labelpos = "c", Ar(nt().flowchart.htmlLabels) ? (h.labelType = "html", h.label = `${s.text.replace(
/fa[lrsb]?:fa-[\w-]+/g,
(p) => ``
)}`) : (h.labelType = "text", h.label = s.text.replace(pe.lineBreakRegex, `
`), typeof s.style > "u" && (h.style = h.style || "stroke: #333; stroke-width: 1.5px;fill:none"), h.labelStyle = h.labelStyle.replace("color:", "fill:"))), h.id = o, h.class = l + " " + u, h.minlen = s.length || 1, e.setEdge(r.db.lookUpDomId(s.start), r.db.lookUpDomId(s.end), h, n);
});
}, qit = function(t, e) {
H.info("Extracting classes"), e.db.clear();
try {
return e.parse(t), e.db.getClasses();
} catch {
return;
}
}, Vit = function(t, e, r, n) {
H.info("Drawing flowchart"), n.db.clear();
const { securityLevel: i, flowchart: a } = nt();
let s;
i === "sandbox" && (s = St("#i" + e));
const o = St(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = i === "sandbox" ? s.nodes()[0].contentDocument : document;
try {
n.parser.parse(t);
} catch {
H.debug("Parsing failed");
}
let u = n.db.getDirection();
typeof u > "u" && (u = "TD");
const h = a.nodeSpacing || 50, d = a.rankSpacing || 50, f = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: u,
nodesep: h,
ranksep: d,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
let p;
const m = n.db.getSubGraphs();
for (let S = m.length - 1; S >= 0; S--)
p = m[S], n.db.addVertex(p.id, p.title, "group", void 0, p.classes);
const _ = n.db.getVertices();
H.warn("Get vertices", _);
const y = n.db.getEdges();
let b = 0;
for (b = m.length - 1; b >= 0; b--) {
p = m[b], f1("cluster").append("text");
for (let S = 0; S < p.nodes.length; S++)
H.warn(
"Setting subgraph",
p.nodes[S],
n.db.lookUpDomId(p.nodes[S]),
n.db.lookUpDomId(p.id)
), f.setParent(n.db.lookUpDomId(p.nodes[S]), n.db.lookUpDomId(p.id));
}
fL(_, f, e, o, l, n), dL(y, f, n);
const x = Mn.render, k = new x();
Fit.addToRender(k), k.arrows().none = function(R, A, L, v) {
const w = R.append("marker").attr("id", A).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
Mn.util.applyStyle(w, L[v + "Style"]);
}, k.arrows().normal = function(R, A) {
R.append("marker").attr("id", A).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
};
const T = o.select(`[id="${e}"]`);
vn(n.db, T, e);
const C = o.select("#" + e + " g");
for (k(C, f), C.selectAll("g.node").attr("title", function() {
return n.db.getTooltip(this.id);
}), n.db.indexNodes("subGraph" + b), b = 0; b < m.length; b++)
if (p = m[b], p.title !== "undefined") {
const S = l.querySelectorAll(
"#" + e + ' [id="' + n.db.lookUpDomId(p.id) + '"] rect'
), R = l.querySelectorAll(
"#" + e + ' [id="' + n.db.lookUpDomId(p.id) + '"]'
), A = S[0].x.baseVal.value, L = S[0].y.baseVal.value, v = S[0].width.baseVal.value, w = St(R[0]).select(".label");
w.attr("transform", `translate(${A + v / 2}, ${L + 14})`), w.attr("id", e + "Text");
for (let D = 0; D < p.classes.length; D++)
R[0].classList.add(p.classes[D]);
}
if (!a.htmlLabels) {
const S = l.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (let R = 0; R < S.length; R++) {
const A = S[R], L = A.getBBox(), v = l.createElementNS("http://www.w3.org/2000/svg", "rect");
v.setAttribute("rx", 0), v.setAttribute("ry", 0), v.setAttribute("width", L.width), v.setAttribute("height", L.height), A.insertBefore(v, A.firstChild);
}
}
n0(f, T, a.diagramPadding, a.useMaxWidth), Object.keys(_).forEach(function(S) {
const R = _[S];
if (R.link) {
const A = o.select("#" + e + ' [id="' + n.db.lookUpDomId(S) + '"]');
if (A) {
const L = l.createElementNS("http://www.w3.org/2000/svg", "a");
L.setAttributeNS("http://www.w3.org/2000/svg", "class", R.classes.join(" ")), L.setAttributeNS("http://www.w3.org/2000/svg", "href", R.link), L.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), i === "sandbox" ? L.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : R.linkTarget && L.setAttributeNS("http://www.w3.org/2000/svg", "target", R.linkTarget);
const v = A.insert(function() {
return L;
}, ":first-child"), B = A.select(".label-container");
B && v.append(function() {
return B.node();
});
const w = A.select(".label");
w && v.append(function() {
return w.node();
});
}
}
});
}, Z4 = {
setConf: Pit,
addVertices: fL,
addEdges: dL,
getClasses: qit,
draw: Vit
}, pL = {}, zit = function(t) {
const e = Object.keys(t);
for (let r = 0; r < e.length; r++)
pL[e[r]] = t[e[r]];
}, gL = function(t, e, r, n, i, a) {
const s = n.select(`[id="${r}"]`);
Object.keys(t).forEach(function(l) {
const u = t[l];
let h = "default";
u.classes.length > 0 && (h = u.classes.join(" "));
const d = Ka(u.styles);
let f = u.text !== void 0 ? u.text : u.id, p;
if (Ar(nt().flowchart.htmlLabels)) {
const y = {
label: f.replace(
/fa[lrsb]?:fa-[\w-]+/g,
(b) => ``
)
};
p = X4(s, y).node(), p.parentNode.removeChild(p);
} else {
const y = i.createElementNS("http://www.w3.org/2000/svg", "text");
y.setAttribute("style", d.labelStyle.replace("color:", "fill:"));
const b = f.split(pe.lineBreakRegex);
for (let x = 0; x < b.length; x++) {
const k = i.createElementNS("http://www.w3.org/2000/svg", "tspan");
k.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), k.setAttribute("dy", "1em"), k.setAttribute("x", "1"), k.textContent = b[x], y.appendChild(k);
}
p = y;
}
let m = 0, _ = "";
switch (u.type) {
case "round":
m = 5, _ = "rect";
break;
case "square":
_ = "rect";
break;
case "diamond":
_ = "question";
break;
case "hexagon":
_ = "hexagon";
break;
case "odd":
_ = "rect_left_inv_arrow";
break;
case "lean_right":
_ = "lean_right";
break;
case "lean_left":
_ = "lean_left";
break;
case "trapezoid":
_ = "trapezoid";
break;
case "inv_trapezoid":
_ = "inv_trapezoid";
break;
case "odd_right":
_ = "rect_left_inv_arrow";
break;
case "circle":
_ = "circle";
break;
case "ellipse":
_ = "ellipse";
break;
case "stadium":
_ = "stadium";
break;
case "subroutine":
_ = "subroutine";
break;
case "cylinder":
_ = "cylinder";
break;
case "group":
_ = "rect";
break;
case "doublecircle":
_ = "doublecircle";
break;
default:
_ = "rect";
}
e.setNode(u.id, {
labelStyle: d.labelStyle,
shape: _,
labelText: f,
rx: m,
ry: m,
class: h,
style: d.style,
id: u.id,
link: u.link,
linkTarget: u.linkTarget,
tooltip: a.db.getTooltip(u.id) || "",
domId: a.db.lookUpDomId(u.id),
haveCallback: u.haveCallback,
width: u.type === "group" ? 500 : void 0,
dir: u.dir,
type: u.type,
props: u.props,
padding: nt().flowchart.padding
}), H.info("setNode", {
labelStyle: d.labelStyle,
shape: _,
labelText: f,
rx: m,
ry: m,
class: h,
style: d.style,
id: u.id,
domId: a.db.lookUpDomId(u.id),
width: u.type === "group" ? 500 : void 0,
type: u.type,
dir: u.dir,
props: u.props,
padding: nt().flowchart.padding
});
});
}, yL = function(t, e, r) {
H.info("abc78 edges = ", t);
let n = 0, i = {}, a, s;
if (typeof t.defaultStyle < "u") {
const o = Ka(t.defaultStyle);
a = o.style, s = o.labelStyle;
}
t.forEach(function(o) {
n++;
var l = "L-" + o.start + "-" + o.end;
typeof i[l] > "u" ? (i[l] = 0, H.info("abc78 new entry", l, i[l])) : (i[l]++, H.info("abc78 new entry", l, i[l]));
let u = l + "-" + i[l];
H.info("abc78 new link id to be used is", l, u, i[l]);
var h = "LS-" + o.start, d = "LE-" + o.end;
const f = { style: "", labelStyle: "" };
switch (f.minlen = o.length || 1, o.type === "arrow_open" ? f.arrowhead = "none" : f.arrowhead = "normal", f.arrowTypeStart = "arrow_open", f.arrowTypeEnd = "arrow_open", o.type) {
case "double_arrow_cross":
f.arrowTypeStart = "arrow_cross";
case "arrow_cross":
f.arrowTypeEnd = "arrow_cross";
break;
case "double_arrow_point":
f.arrowTypeStart = "arrow_point";
case "arrow_point":
f.arrowTypeEnd = "arrow_point";
break;
case "double_arrow_circle":
f.arrowTypeStart = "arrow_circle";
case "arrow_circle":
f.arrowTypeEnd = "arrow_circle";
break;
}
let p = "", m = "";
switch (o.stroke) {
case "normal":
p = "fill:none;", typeof a < "u" && (p = a), typeof s < "u" && (m = s), f.thickness = "normal", f.pattern = "solid";
break;
case "dotted":
f.thickness = "normal", f.pattern = "dotted", f.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
break;
case "thick":
f.thickness = "thick", f.pattern = "solid", f.style = "stroke-width: 3.5px;fill:none;";
break;
}
if (typeof o.style < "u") {
const _ = Ka(o.style);
p = _.style, m = _.labelStyle;
}
f.style = f.style += p, f.labelStyle = f.labelStyle += m, typeof o.interpolate < "u" ? f.curve = Ii(o.interpolate, bn) : typeof t.defaultInterpolate < "u" ? f.curve = Ii(t.defaultInterpolate, bn) : f.curve = Ii(pL.curve, bn), typeof o.text > "u" ? typeof o.style < "u" && (f.arrowheadStyle = "fill: #333") : (f.arrowheadStyle = "fill: #333", f.labelpos = "c"), f.labelType = "text", f.label = o.text.replace(pe.lineBreakRegex, `
`), typeof o.style > "u" && (f.style = f.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), f.labelStyle = f.labelStyle.replace("color:", "fill:"), f.id = u, f.classes = "flowchart-link " + h + " " + d, e.setEdge(o.start, o.end, f, n);
});
}, Yit = function(t, e) {
H.info("Extracting classes"), e.db.clear();
try {
return e.parse(t), e.db.getClasses();
} catch {
return;
}
}, Uit = function(t, e, r, n) {
H.info("Drawing flowchart"), n.db.clear(), la.setGen("gen-2"), n.parser.parse(t);
let i = n.db.getDirection();
typeof i > "u" && (i = "TD");
const { securityLevel: a, flowchart: s } = nt(), o = s.nodeSpacing || 50, l = s.rankSpacing || 50;
let u;
a === "sandbox" && (u = St("#i" + e));
const h = St(a === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), d = a === "sandbox" ? u.nodes()[0].contentDocument : document, f = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: i,
nodesep: o,
ranksep: l,
marginx: 0,
marginy: 0
}).setDefaultEdgeLabel(function() {
return {};
});
let p;
const m = n.db.getSubGraphs();
H.info("Subgraphs - ", m);
for (let C = m.length - 1; C >= 0; C--)
p = m[C], H.info("Subgraph - ", p), n.db.addVertex(p.id, p.title, "group", void 0, p.classes, p.dir);
const _ = n.db.getVertices(), y = n.db.getEdges();
H.info(y);
let b = 0;
for (b = m.length - 1; b >= 0; b--) {
p = m[b], f1("cluster").append("text");
for (let C = 0; C < p.nodes.length; C++)
H.info("Setting up subgraphs", p.nodes[C], p.id), f.setParent(p.nodes[C], p.id);
}
gL(_, f, e, h, d, n), yL(y, f);
const x = h.select(`[id="${e}"]`);
vn(n.db, x, e);
const k = h.select("#" + e + " g");
if (U4(k, f, ["point", "circle", "cross"], "flowchart", e), n0(f, x, s.diagramPadding, s.useMaxWidth), n.db.indexNodes("subGraph" + b), !s.htmlLabels) {
const C = d.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (let M = 0; M < C.length; M++) {
const S = C[M], R = S.getBBox(), A = d.createElementNS("http://www.w3.org/2000/svg", "rect");
A.setAttribute("rx", 0), A.setAttribute("ry", 0), A.setAttribute("width", R.width), A.setAttribute("height", R.height), S.insertBefore(A, S.firstChild);
}
}
Object.keys(_).forEach(function(C) {
const M = _[C];
if (M.link) {
const S = St("#" + e + ' [id="' + C + '"]');
if (S) {
const R = d.createElementNS("http://www.w3.org/2000/svg", "a");
R.setAttributeNS("http://www.w3.org/2000/svg", "class", M.classes.join(" ")), R.setAttributeNS("http://www.w3.org/2000/svg", "href", M.link), R.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), a === "sandbox" ? R.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : M.linkTarget && R.setAttributeNS("http://www.w3.org/2000/svg", "target", M.linkTarget);
const A = S.insert(function() {
return R;
}, ":first-child"), L = S.select(".label-container");
L && A.append(function() {
return L.node();
});
const v = S.select(".label");
v && A.append(function() {
return v.node();
});
}
}
});
}, em = {
setConf: zit,
addVertices: gL,
addEdges: yL,
getClasses: Yit,
draw: Uit
};
var _b = function() {
var t = function(S, R, A, L) {
for (A = A || {}, L = S.length; L--; A[S[L]] = R)
;
return A;
}, e = [1, 3], r = [1, 5], n = [7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 25, 27, 34, 39], i = [1, 15], a = [1, 16], s = [1, 17], o = [1, 18], l = [1, 19], u = [1, 20], h = [1, 21], d = [1, 22], f = [1, 23], p = [1, 24], m = [1, 25], _ = [1, 26], y = [1, 28], b = [1, 30], x = [1, 33], k = [5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 25, 27, 34, 39], T = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, directive: 4, gantt: 5, document: 6, EOF: 7, line: 8, SPACE: 9, statement: 10, NL: 11, dateFormat: 12, inclusiveEndDates: 13, topAxis: 14, axisFormat: 15, excludes: 16, includes: 17, todayMarker: 18, title: 19, acc_title: 20, acc_title_value: 21, acc_descr: 22, acc_descr_value: 23, acc_descr_multiline_value: 24, section: 25, clickStatement: 26, taskTxt: 27, taskData: 28, openDirective: 29, typeDirective: 30, closeDirective: 31, ":": 32, argDirective: 33, click: 34, callbackname: 35, callbackargs: 36, href: 37, clickStatementDebug: 38, open_directive: 39, type_directive: 40, arg_directive: 41, close_directive: 42, $accept: 0, $end: 1 },
terminals_: { 2: "error", 5: "gantt", 7: "EOF", 9: "SPACE", 11: "NL", 12: "dateFormat", 13: "inclusiveEndDates", 14: "topAxis", 15: "axisFormat", 16: "excludes", 17: "includes", 18: "todayMarker", 19: "title", 20: "acc_title", 21: "acc_title_value", 22: "acc_descr", 23: "acc_descr_value", 24: "acc_descr_multiline_value", 25: "section", 27: "taskTxt", 28: "taskData", 32: ":", 34: "click", 35: "callbackname", 36: "callbackargs", 37: "href", 39: "open_directive", 40: "type_directive", 41: "arg_directive", 42: "close_directive" },
productions_: [0, [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [8, 1], [8, 1], [8, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 2], [10, 1], [4, 4], [4, 6], [26, 2], [26, 3], [26, 3], [26, 4], [26, 3], [26, 4], [26, 2], [38, 2], [38, 3], [38, 3], [38, 4], [38, 3], [38, 4], [38, 2], [29, 1], [30, 1], [33, 1], [31, 1]],
performAction: function(R, A, L, v, B, w, D) {
var N = w.length - 1;
switch (B) {
case 2:
return w[N - 1];
case 3:
this.$ = [];
break;
case 4:
w[N - 1].push(w[N]), this.$ = w[N - 1];
break;
case 5:
case 6:
this.$ = w[N];
break;
case 7:
case 8:
this.$ = [];
break;
case 9:
v.setDateFormat(w[N].substr(11)), this.$ = w[N].substr(11);
break;
case 10:
v.enableInclusiveEndDates(), this.$ = w[N].substr(18);
break;
case 11:
v.TopAxis(), this.$ = w[N].substr(8);
break;
case 12:
v.setAxisFormat(w[N].substr(11)), this.$ = w[N].substr(11);
break;
case 13:
v.setExcludes(w[N].substr(9)), this.$ = w[N].substr(9);
break;
case 14:
v.setIncludes(w[N].substr(9)), this.$ = w[N].substr(9);
break;
case 15:
v.setTodayMarker(w[N].substr(12)), this.$ = w[N].substr(12);
break;
case 16:
v.setDiagramTitle(w[N].substr(6)), this.$ = w[N].substr(6);
break;
case 17:
this.$ = w[N].trim(), v.setAccTitle(this.$);
break;
case 18:
case 19:
this.$ = w[N].trim(), v.setAccDescription(this.$);
break;
case 20:
v.addSection(w[N].substr(8)), this.$ = w[N].substr(8);
break;
case 22:
v.addTask(w[N - 1], w[N]), this.$ = "task";
break;
case 26:
this.$ = w[N - 1], v.setClickEvent(w[N - 1], w[N], null);
break;
case 27:
this.$ = w[N - 2], v.setClickEvent(w[N - 2], w[N - 1], w[N]);
break;
case 28:
this.$ = w[N - 2], v.setClickEvent(w[N - 2], w[N - 1], null), v.setLink(w[N - 2], w[N]);
break;
case 29:
this.$ = w[N - 3], v.setClickEvent(w[N - 3], w[N - 2], w[N - 1]), v.setLink(w[N - 3], w[N]);
break;
case 30:
this.$ = w[N - 2], v.setClickEvent(w[N - 2], w[N], null), v.setLink(w[N - 2], w[N - 1]);
break;
case 31:
this.$ = w[N - 3], v.setClickEvent(w[N - 3], w[N - 1], w[N]), v.setLink(w[N - 3], w[N - 2]);
break;
case 32:
this.$ = w[N - 1], v.setLink(w[N - 1], w[N]);
break;
case 33:
case 39:
this.$ = w[N - 1] + " " + w[N];
break;
case 34:
case 35:
case 37:
this.$ = w[N - 2] + " " + w[N - 1] + " " + w[N];
break;
case 36:
case 38:
this.$ = w[N - 3] + " " + w[N - 2] + " " + w[N - 1] + " " + w[N];
break;
case 40:
v.parseDirective("%%{", "open_directive");
break;
case 41:
v.parseDirective(w[N], "type_directive");
break;
case 42:
w[N] = w[N].trim().replace(/'/g, '"'), v.parseDirective(w[N], "arg_directive");
break;
case 43:
v.parseDirective("}%%", "close_directive", "gantt");
break;
}
},
table: [{ 3: 1, 4: 2, 5: e, 29: 4, 39: r }, { 1: [3] }, { 3: 6, 4: 2, 5: e, 29: 4, 39: r }, t(n, [2, 3], { 6: 7 }), { 30: 8, 40: [1, 9] }, { 40: [2, 40] }, { 1: [2, 1] }, { 4: 29, 7: [1, 10], 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: i, 13: a, 14: s, 15: o, 16: l, 17: u, 18: h, 19: d, 20: f, 22: p, 24: m, 25: _, 26: 27, 27: y, 29: 4, 34: b, 39: r }, { 31: 31, 32: [1, 32], 42: x }, t([32, 42], [2, 41]), t(n, [2, 8], { 1: [2, 2] }), t(n, [2, 4]), { 4: 29, 10: 34, 12: i, 13: a, 14: s, 15: o, 16: l, 17: u, 18: h, 19: d, 20: f, 22: p, 24: m, 25: _, 26: 27, 27: y, 29: 4, 34: b, 39: r }, t(n, [2, 6]), t(n, [2, 7]), t(n, [2, 9]), t(n, [2, 10]), t(n, [2, 11]), t(n, [2, 12]), t(n, [2, 13]), t(n, [2, 14]), t(n, [2, 15]), t(n, [2, 16]), { 21: [1, 35] }, { 23: [1, 36] }, t(n, [2, 19]), t(n, [2, 20]), t(n, [2, 21]), { 28: [1, 37] }, t(n, [2, 23]), { 35: [1, 38], 37: [1, 39] }, { 11: [1, 40] }, { 33: 41, 41: [1, 42] }, { 11: [2, 43] }, t(n, [2, 5]), t(n, [2, 17]), t(n, [2, 18]), t(n, [2, 22]), t(n, [2, 26], { 36: [1, 43], 37: [1, 44] }), t(n, [2, 32], { 35: [1, 45] }), t(k, [2, 24]), { 31: 46, 42: x }, { 42: [2, 42] }, t(n, [2, 27], { 37: [1, 47] }), t(n, [2, 28]), t(n, [2, 30], { 36: [1, 48] }), { 11: [1, 49] }, t(n, [2, 29]), t(n, [2, 31]), t(k, [2, 25])],
defaultActions: { 5: [2, 40], 6: [2, 1], 33: [2, 43], 42: [2, 42] },
parseError: function(R, A) {
if (A.recoverable)
this.trace(R);
else {
var L = new Error(R);
throw L.hash = A, L;
}
},
parse: function(R) {
var A = this, L = [0], v = [], B = [null], w = [], D = this.table, N = "", z = 0, X = 0, ct = 2, J = 1, Y = w.slice.call(arguments, 1), $ = Object.create(this.lexer), lt = { yy: {} };
for (var ut in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, ut) && (lt.yy[ut] = this.yy[ut]);
$.setInput(R, lt.yy), lt.yy.lexer = $, lt.yy.parser = this, typeof $.yylloc > "u" && ($.yylloc = {});
var W = $.yylloc;
w.push(W);
var tt = $.options && $.options.ranges;
typeof lt.yy.parseError == "function" ? this.parseError = lt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function K() {
var at;
return at = v.pop() || $.lex() || J, typeof at != "number" && (at instanceof Array && (v = at, at = v.pop()), at = A.symbols_[at] || at), at;
}
for (var it, Z, V, Q, q = {}, U, F, j, P; ; ) {
if (Z = L[L.length - 1], this.defaultActions[Z] ? V = this.defaultActions[Z] : ((it === null || typeof it > "u") && (it = K()), V = D[Z] && D[Z][it]), typeof V > "u" || !V.length || !V[0]) {
var et = "";
P = [];
for (U in D[Z])
this.terminals_[U] && U > ct && P.push("'" + this.terminals_[U] + "'");
$.showPosition ? et = "Parse error on line " + (z + 1) + `:
` + $.showPosition() + `
Expecting ` + P.join(", ") + ", got '" + (this.terminals_[it] || it) + "'" : et = "Parse error on line " + (z + 1) + ": Unexpected " + (it == J ? "end of input" : "'" + (this.terminals_[it] || it) + "'"), this.parseError(et, {
text: $.match,
token: this.terminals_[it] || it,
line: $.yylineno,
loc: W,
expected: P
});
}
if (V[0] instanceof Array && V.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Z + ", token: " + it);
switch (V[0]) {
case 1:
L.push(it), B.push($.yytext), w.push($.yylloc), L.push(V[1]), it = null, X = $.yyleng, N = $.yytext, z = $.yylineno, W = $.yylloc;
break;
case 2:
if (F = this.productions_[V[1]][1], q.$ = B[B.length - F], q._$ = {
first_line: w[w.length - (F || 1)].first_line,
last_line: w[w.length - 1].last_line,
first_column: w[w.length - (F || 1)].first_column,
last_column: w[w.length - 1].last_column
}, tt && (q._$.range = [
w[w.length - (F || 1)].range[0],
w[w.length - 1].range[1]
]), Q = this.performAction.apply(q, [
N,
X,
z,
lt.yy,
V[1],
B,
w
].concat(Y)), typeof Q < "u")
return Q;
F && (L = L.slice(0, -1 * F * 2), B = B.slice(0, -1 * F), w = w.slice(0, -1 * F)), L.push(this.productions_[V[1]][0]), B.push(q.$), w.push(q._$), j = D[L[L.length - 2]][L[L.length - 1]], L.push(j);
break;
case 3:
return !0;
}
}
return !0;
}
}, C = function() {
var S = {
EOF: 1,
parseError: function(A, L) {
if (this.yy.parser)
this.yy.parser.parseError(A, L);
else
throw new Error(A);
},
setInput: function(R, A) {
return this.yy = A || 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 = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var R = this._input[0];
this.yytext += R, this.yyleng++, this.offset++, this.match += R, this.matched += R;
var A = R.match(/(?:\r\n?|\n).*/g);
return A ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), R;
},
unput: function(R) {
var A = R.length, L = R.split(/(?:\r\n?|\n)/g);
this._input = R + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - A), this.offset -= A;
var v = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), L.length - 1 && (this.yylineno -= L.length - 1);
var B = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: L ? (L.length === v.length ? this.yylloc.first_column : 0) + v[v.length - L.length].length - L[0].length : this.yylloc.first_column - A
}, this.options.ranges && (this.yylloc.range = [B[0], B[0] + this.yyleng - A]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(R) {
this.unput(this.match.slice(R));
},
pastInput: function() {
var R = this.matched.substr(0, this.matched.length - this.match.length);
return (R.length > 20 ? "..." : "") + R.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var R = this.match;
return R.length < 20 && (R += this._input.substr(0, 20 - R.length)), (R.substr(0, 20) + (R.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var R = this.pastInput(), A = new Array(R.length + 1).join("-");
return R + this.upcomingInput() + `
` + A + "^";
},
test_match: function(R, A) {
var L, v, B;
if (this.options.backtrack_lexer && (B = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (B.yylloc.range = this.yylloc.range.slice(0))), v = R[0].match(/(?:\r\n?|\n).*/g), v && (this.yylineno += v.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: v ? v[v.length - 1].length - v[v.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + R[0].length
}, 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], L = this.performAction.call(this, this.yy, this, A, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), L)
return L;
if (this._backtrack) {
for (var w in B)
this[w] = B[w];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var R, A, L, v;
this._more || (this.yytext = "", this.match = "");
for (var B = this._currentRules(), w = 0; w < B.length; w++)
if (L = this._input.match(this.rules[B[w]]), L && (!A || L[0].length > A[0].length)) {
if (A = L, v = w, this.options.backtrack_lexer) {
if (R = this.test_match(L, B[w]), R !== !1)
return R;
if (this._backtrack) {
A = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return A ? (R = this.test_match(A, B[v]), R !== !1 ? R : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var A = this.next();
return A || this.lex();
},
begin: function(A) {
this.conditionStack.push(A);
},
popState: function() {
var A = this.conditionStack.length - 1;
return A > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(A) {
return A = this.conditionStack.length - 1 - Math.abs(A || 0), A >= 0 ? this.conditionStack[A] : "INITIAL";
},
pushState: function(A) {
this.begin(A);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(A, L, v, B) {
switch (v) {
case 0:
return this.begin("open_directive"), 39;
case 1:
return this.begin("type_directive"), 40;
case 2:
return this.popState(), this.begin("arg_directive"), 32;
case 3:
return this.popState(), this.popState(), 42;
case 4:
return 41;
case 5:
return this.begin("acc_title"), 20;
case 6:
return this.popState(), "acc_title_value";
case 7:
return this.begin("acc_descr"), 22;
case 8:
return this.popState(), "acc_descr_value";
case 9:
this.begin("acc_descr_multiline");
break;
case 10:
this.popState();
break;
case 11:
return "acc_descr_multiline_value";
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
return 11;
case 16:
break;
case 17:
break;
case 18:
break;
case 19:
this.begin("href");
break;
case 20:
this.popState();
break;
case 21:
return 37;
case 22:
this.begin("callbackname");
break;
case 23:
this.popState();
break;
case 24:
this.popState(), this.begin("callbackargs");
break;
case 25:
return 35;
case 26:
this.popState();
break;
case 27:
return 36;
case 28:
this.begin("click");
break;
case 29:
this.popState();
break;
case 30:
return 34;
case 31:
return 5;
case 32:
return 12;
case 33:
return 13;
case 34:
return 14;
case 35:
return 15;
case 36:
return 17;
case 37:
return 16;
case 38:
return 18;
case 39:
return "date";
case 40:
return 19;
case 41:
return "accDescription";
case 42:
return 25;
case 43:
return 27;
case 44:
return 28;
case 45:
return 32;
case 46:
return 7;
case 47:
return "INVALID";
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/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, /^(?:%[^\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, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/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],
conditions: { acc_descr_multiline: { rules: [10, 11], inclusive: !1 }, acc_descr: { rules: [8], inclusive: !1 }, acc_title: { rules: [6], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, callbackargs: { rules: [26, 27], inclusive: !1 }, callbackname: { rules: [23, 24, 25], inclusive: !1 }, href: { rules: [20, 21], inclusive: !1 }, click: { rules: [29, 30], inclusive: !1 }, INITIAL: { rules: [0, 5, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 22, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], inclusive: !0 } }
};
return S;
}();
T.lexer = C;
function M() {
this.yy = {};
}
return M.prototype = T, T.Parser = M, new M();
}();
_b.parser = _b;
const Wit = (t) => t.match(/^\s*gantt/) !== null;
let Li = "", Q4 = "", J4 = "", du = [], pu = [], t_ = {}, e_ = [], t1 = [], Zo = "";
const mL = ["active", "done", "crit", "milestone"];
let e1 = [], gu = !1, r_ = !1, vb = 0;
const Hit = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, Git = function() {
e_ = [], t1 = [], Zo = "", e1 = [], Bh = 0, kb = void 0, Dh = void 0, pr = [], Li = "", Q4 = "", J4 = "", du = [], pu = [], gu = !1, r_ = !1, vb = 0, t_ = {}, gi();
}, jit = function(t) {
Q4 = t;
}, $it = function() {
return Q4;
}, Xit = function(t) {
J4 = t;
}, Kit = function() {
return J4;
}, Zit = function(t) {
Li = t;
}, Qit = function() {
gu = !0;
}, Jit = function() {
return gu;
}, tat = function() {
r_ = !0;
}, eat = function() {
return r_;
}, rat = function() {
return Li;
}, nat = function(t) {
du = t.toLowerCase().split(/[\s,]+/);
}, iat = function() {
return du;
}, aat = function(t) {
pu = t.toLowerCase().split(/[\s,]+/);
}, sat = function() {
return pu;
}, oat = function() {
return t_;
}, lat = function(t) {
Zo = t, e_.push(t);
}, cat = function() {
return e_;
}, uat = function() {
let t = iw();
const e = 10;
let r = 0;
for (; !t && r < e; )
t = iw(), r++;
return t1 = pr, t1;
}, bL = function(t, e, r, n) {
return n.indexOf(t.format(e.trim())) >= 0 ? !1 : t.isoWeekday() >= 6 && r.indexOf("weekends") >= 0 || r.indexOf(t.format("dddd").toLowerCase()) >= 0 ? !0 : r.indexOf(t.format(e.trim())) >= 0;
}, _L = function(t, e, r, n) {
if (!r.length || t.manualEndTime)
return;
let i = si(t.startTime, e, !0);
i.add(1, "d");
let a = si(t.endTime, e, !0), s = hat(i, a, e, r, n);
t.endTime = a.toDate(), t.renderEndTime = s;
}, hat = function(t, e, r, n, i) {
let a = !1, s = null;
for (; t <= e; )
a || (s = e.toDate()), a = bL(t, r, n, i), a && e.add(1, "d"), t.add(1, "d");
return s;
}, xb = function(t, e, r) {
r = r.trim();
const i = /^after\s+([\d\w- ]+)/.exec(r.trim());
if (i !== null) {
let s = null;
if (i[1].split(" ").forEach(function(o) {
let l = ml(o);
typeof l < "u" && (s ? l.endTime > s.endTime && (s = l) : s = l);
}), s)
return s.endTime;
{
const o = new Date();
return o.setHours(0, 0, 0, 0), o;
}
}
let a = si(r, e.trim(), !0);
if (a.isValid())
return a.toDate();
{
H.debug("Invalid date:" + r), H.debug("With date format:" + e.trim());
const s = new Date(r);
if (typeof s > "u" || isNaN(s.getTime()))
throw new Error("Invalid date:" + r);
return s;
}
}, vL = function(t) {
const e = /^(\d+(?:\.\d+)?)([yMwdhms]|ms)$/.exec(t.trim());
return e !== null ? si.duration(Number.parseFloat(e[1]), e[2]) : si.duration.invalid();
}, xL = function(t, e, r, n) {
n = n || !1, r = r.trim();
let i = si(r, e.trim(), !0);
if (i.isValid())
return n && i.add(1, "d"), i.toDate();
const a = si(t), s = vL(r);
return s.isValid() && a.add(s), a.toDate();
};
let Bh = 0;
const Ao = function(t) {
return typeof t > "u" ? (Bh = Bh + 1, "task" + Bh) : t;
}, fat = function(t, e) {
let r;
e.substr(0, 1) === ":" ? r = e.substr(1, e.length) : r = e;
const n = r.split(","), i = {};
EL(n, i, mL);
for (let s = 0; s < n.length; s++)
n[s] = n[s].trim();
let a = "";
switch (n.length) {
case 1:
i.id = Ao(), i.startTime = t.endTime, a = n[0];
break;
case 2:
i.id = Ao(), i.startTime = xb(void 0, Li, n[0]), a = n[1];
break;
case 3:
i.id = Ao(n[0]), i.startTime = xb(void 0, Li, n[1]), a = n[2];
break;
}
return a && (i.endTime = xL(i.startTime, Li, a, gu), i.manualEndTime = si(a, "YYYY-MM-DD", !0).isValid(), _L(i, Li, pu, du)), i;
}, dat = function(t, e) {
let r;
e.substr(0, 1) === ":" ? r = e.substr(1, e.length) : r = e;
const n = r.split(","), i = {};
EL(n, i, mL);
for (let a = 0; a < n.length; a++)
n[a] = n[a].trim();
switch (n.length) {
case 1:
i.id = Ao(), i.startTime = {
type: "prevTaskEnd",
id: t
}, i.endTime = {
data: n[0]
};
break;
case 2:
i.id = Ao(), i.startTime = {
type: "getStartDate",
startData: n[0]
}, i.endTime = {
data: n[1]
};
break;
case 3:
i.id = Ao(n[0]), i.startTime = {
type: "getStartDate",
startData: n[1]
}, i.endTime = {
data: n[2]
};
break;
}
return i;
};
let kb, Dh, pr = [];
const kL = {}, pat = function(t, e) {
const r = {
section: Zo,
type: Zo,
processed: !1,
manualEndTime: !1,
renderEndTime: null,
raw: { data: e },
task: t,
classes: []
}, n = dat(Dh, e);
r.raw.startTime = n.startTime, r.raw.endTime = n.endTime, r.id = n.id, r.prevTaskId = Dh, r.active = n.active, r.done = n.done, r.crit = n.crit, r.milestone = n.milestone, r.order = vb, vb++;
const i = pr.push(r);
Dh = r.id, kL[r.id] = i - 1;
}, ml = function(t) {
const e = kL[t];
return pr[e];
}, gat = function(t, e) {
const r = {
section: Zo,
type: Zo,
description: t,
task: t,
classes: []
}, n = fat(kb, e);
r.startTime = n.startTime, r.endTime = n.endTime, r.id = n.id, r.active = n.active, r.done = n.done, r.crit = n.crit, r.milestone = n.milestone, kb = r, t1.push(r);
}, iw = function() {
const t = function(r) {
const n = pr[r];
let i = "";
switch (pr[r].raw.startTime.type) {
case "prevTaskEnd": {
const a = ml(n.prevTaskId);
n.startTime = a.endTime;
break;
}
case "getStartDate":
i = xb(void 0, Li, pr[r].raw.startTime.startData), i && (pr[r].startTime = i);
break;
}
return pr[r].startTime && (pr[r].endTime = xL(
pr[r].startTime,
Li,
pr[r].raw.endTime.data,
gu
), pr[r].endTime && (pr[r].processed = !0, pr[r].manualEndTime = si(
pr[r].raw.endTime.data,
"YYYY-MM-DD",
!0
).isValid(), _L(pr[r], Li, pu, du))), pr[r].processed;
};
let e = !0;
for (let r = 0; r < pr.length; r++)
t(r), e = e && pr[r].processed;
return e;
}, yat = function(t, e) {
let r = e;
nt().securityLevel !== "loose" && (r = Vi(e)), t.split(",").forEach(function(n) {
typeof ml(n) < "u" && (TL(n, () => {
window.open(r, "_self");
}), t_[n] = r);
}), wL(t, "clickable");
}, wL = function(t, e) {
t.split(",").forEach(function(r) {
let n = ml(r);
typeof n < "u" && n.classes.push(e);
});
}, mat = function(t, e, r) {
if (nt().securityLevel !== "loose" || typeof e > "u")
return;
let n = [];
if (typeof r == "string") {
n = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
for (let a = 0; a < n.length; a++) {
let s = n[a].trim();
s.charAt(0) === '"' && s.charAt(s.length - 1) === '"' && (s = s.substr(1, s.length - 2)), n[a] = s;
}
}
n.length === 0 && n.push(t), typeof ml(t) < "u" && TL(t, () => {
Se.runFunc(e, ...n);
});
}, TL = function(t, e) {
e1.push(function() {
const r = document.querySelector(`[id="${t}"]`);
r !== null && r.addEventListener("click", function() {
e();
});
}), e1.push(function() {
const r = document.querySelector(`[id="${t}-text"]`);
r !== null && r.addEventListener("click", function() {
e();
});
});
}, bat = function(t, e, r) {
t.split(",").forEach(function(n) {
mat(n, e, r);
}), wL(t, "clickable");
}, _at = function(t) {
e1.forEach(function(e) {
e(t);
});
}, n_ = {
parseDirective: Hit,
getConfig: () => nt().gantt,
clear: Git,
setDateFormat: Zit,
getDateFormat: rat,
enableInclusiveEndDates: Qit,
endDatesAreInclusive: Jit,
enableTopAxis: tat,
topAxisEnabled: eat,
setAxisFormat: jit,
getAxisFormat: $it,
setTodayMarker: Xit,
getTodayMarker: Kit,
setAccTitle: Yn,
getAccTitle: yi,
setDiagramTitle: a0,
getDiagramTitle: s0,
setAccDescription: mi,
getAccDescription: bi,
addSection: lat,
getSections: cat,
getTasks: uat,
addTask: pat,
findTaskById: ml,
addTaskOrg: gat,
setIncludes: nat,
getIncludes: iat,
setExcludes: aat,
getExcludes: sat,
setClickEvent: bat,
setLink: yat,
getLinks: oat,
bindFunctions: _at,
parseDuration: vL,
isInvalidDate: bL
};
function EL(t, e, r) {
let n = !0;
for (; n; )
n = !1, r.forEach(function(i) {
const a = "^\\s*" + i + "\\s*$", s = new RegExp(a);
t[0].match(s) && (e[i] = !0, t.shift(1), n = !0);
});
}
const vat = function() {
H.debug("Something is calling, setConf, remove the call");
};
let ea;
const xat = function(t, e, r, n) {
const i = nt().gantt, a = nt().securityLevel;
let s;
a === "sandbox" && (s = St("#i" + e));
const o = St(a === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = a === "sandbox" ? s.nodes()[0].contentDocument : document, u = l.getElementById(e);
ea = u.parentElement.offsetWidth, typeof ea > "u" && (ea = 1200), typeof i.useWidth < "u" && (ea = i.useWidth);
const h = n.db.getTasks(), d = h.length * (i.barHeight + i.barGap) + 2 * i.topPadding;
u.setAttribute("viewBox", "0 0 " + ea + " " + d);
const f = o.select(`[id="${e}"]`), p = $E().domain([
pc(h, function(L) {
return L.startTime;
}),
No(h, function(L) {
return L.endTime;
})
]).rangeRound([0, ea - i.leftPadding - i.rightPadding]);
let m = [];
for (let L = 0; L < h.length; L++)
m.push(h[L].type);
const _ = m;
m = S(m);
function y(L, v) {
const B = L.startTime, w = v.startTime;
let D = 0;
return B > w ? D = 1 : B < w && (D = -1), D;
}
h.sort(y), b(h, ea, d), pi(f, d, ea, i.useMaxWidth), f.append("text").text(n.db.getDiagramTitle()).attr("x", ea / 2).attr("y", i.titleTopMargin).attr("class", "titleText"), vn(n.db, f, e);
function b(L, v, B) {
const w = i.barHeight, D = w + i.barGap, N = i.topPadding, z = i.leftPadding, X = D3().domain([0, m.length]).range(["#00B9FA", "#F95002"]).interpolate(D9);
k(
D,
N,
z,
v,
B,
L,
n.db.getExcludes(),
n.db.getIncludes()
), T(z, N, v, B), x(L, D, N, z, w, X, v), C(D, N), M(z, N, v, B);
}
function x(L, v, B, w, D, N, z) {
f.append("g").selectAll("rect").data(L).enter().append("rect").attr("x", 0).attr("y", function(Y, $) {
return $ = Y.order, $ * v + B - 2;
}).attr("width", function() {
return z - i.rightPadding / 2;
}).attr("height", v).attr("class", function(Y) {
for (let $ = 0; $ < m.length; $++)
if (Y.type === m[$])
return "section section" + $ % i.numberSectionStyles;
return "section section0";
});
const X = f.append("g").selectAll("rect").data(L).enter(), ct = n.db.getLinks();
if (X.append("rect").attr("id", function(Y) {
return Y.id;
}).attr("rx", 3).attr("ry", 3).attr("x", function(Y) {
return Y.milestone ? p(Y.startTime) + w + 0.5 * (p(Y.endTime) - p(Y.startTime)) - 0.5 * D : p(Y.startTime) + w;
}).attr("y", function(Y, $) {
return $ = Y.order, $ * v + B;
}).attr("width", function(Y) {
return Y.milestone ? D : p(Y.renderEndTime || Y.endTime) - p(Y.startTime);
}).attr("height", D).attr("transform-origin", function(Y, $) {
return $ = Y.order, (p(Y.startTime) + w + 0.5 * (p(Y.endTime) - p(Y.startTime))).toString() + "px " + ($ * v + B + 0.5 * D).toString() + "px";
}).attr("class", function(Y) {
const $ = "task";
let lt = "";
Y.classes.length > 0 && (lt = Y.classes.join(" "));
let ut = 0;
for (let tt = 0; tt < m.length; tt++)
Y.type === m[tt] && (ut = tt % i.numberSectionStyles);
let W = "";
return Y.active ? Y.crit ? W += " activeCrit" : W = " active" : Y.done ? Y.crit ? W = " doneCrit" : W = " done" : Y.crit && (W += " crit"), W.length === 0 && (W = " task"), Y.milestone && (W = " milestone " + W), W += ut, W += " " + lt, $ + W;
}), X.append("text").attr("id", function(Y) {
return Y.id + "-text";
}).text(function(Y) {
return Y.task;
}).attr("font-size", i.fontSize).attr("x", function(Y) {
let $ = p(Y.startTime), lt = p(Y.renderEndTime || Y.endTime);
Y.milestone && ($ += 0.5 * (p(Y.endTime) - p(Y.startTime)) - 0.5 * D), Y.milestone && (lt = $ + D);
const ut = this.getBBox().width;
return ut > lt - $ ? lt + ut + 1.5 * i.leftPadding > z ? $ + w - 5 : lt + w + 5 : (lt - $) / 2 + $ + w;
}).attr("y", function(Y, $) {
return $ = Y.order, $ * v + i.barHeight / 2 + (i.fontSize / 2 - 2) + B;
}).attr("text-height", D).attr("class", function(Y) {
const $ = p(Y.startTime);
let lt = p(Y.endTime);
Y.milestone && (lt = $ + D);
const ut = this.getBBox().width;
let W = "";
Y.classes.length > 0 && (W = Y.classes.join(" "));
let tt = 0;
for (let it = 0; it < m.length; it++)
Y.type === m[it] && (tt = it % i.numberSectionStyles);
let K = "";
return Y.active && (Y.crit ? K = "activeCritText" + tt : K = "activeText" + tt), Y.done ? Y.crit ? K = K + " doneCritText" + tt : K = K + " doneText" + tt : Y.crit && (K = K + " critText" + tt), Y.milestone && (K += " milestoneText"), ut > lt - $ ? lt + ut + 1.5 * i.leftPadding > z ? W + " taskTextOutsideLeft taskTextOutside" + tt + " " + K : W + " taskTextOutsideRight taskTextOutside" + tt + " " + K + " width-" + ut : W + " taskText taskText" + tt + " " + K + " width-" + ut;
}), nt().securityLevel === "sandbox") {
let Y;
Y = St("#i" + e);
const $ = Y.nodes()[0].contentDocument;
X.filter(function(lt) {
return typeof ct[lt.id] < "u";
}).each(function(lt) {
var ut = $.querySelector("#" + lt.id), W = $.querySelector("#" + lt.id + "-text");
const tt = ut.parentNode;
var K = $.createElement("a");
K.setAttribute("xlink:href", ct[lt.id]), K.setAttribute("target", "_top"), tt.appendChild(K), K.appendChild(ut), K.appendChild(W);
});
}
}
function k(L, v, B, w, D, N, z, X) {
const ct = N.reduce(
(tt, { startTime: K }) => tt ? Math.min(tt, K) : K,
0
), J = N.reduce((tt, { endTime: K }) => tt ? Math.max(tt, K) : K, 0), Y = n.db.getDateFormat();
if (!ct || !J)
return;
const $ = [];
let lt = null, ut = si(ct);
for (; ut.valueOf() <= J; )
n.db.isInvalidDate(ut, Y, z, X) ? lt ? lt.end = ut.clone() : lt = {
start: ut.clone(),
end: ut.clone()
} : lt && ($.push(lt), lt = null), ut.add(1, "d");
f.append("g").selectAll("rect").data($).enter().append("rect").attr("id", function(tt) {
return "exclude-" + tt.start.format("YYYY-MM-DD");
}).attr("x", function(tt) {
return p(tt.start) + B;
}).attr("y", i.gridLineStartPadding).attr("width", function(tt) {
const K = tt.end.clone().add(1, "day");
return p(K) - p(tt.start);
}).attr("height", D - v - i.gridLineStartPadding).attr("transform-origin", function(tt, K) {
return (p(tt.start) + B + 0.5 * (p(tt.end) - p(tt.start))).toString() + "px " + (K * L + 0.5 * D).toString() + "px";
}).attr("class", "exclude-range");
}
function T(L, v, B, w) {
let D = Xw(p).tickSize(-w + v + i.gridLineStartPadding).tickFormat(Lc(n.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
if (f.append("g").attr("class", "grid").attr("transform", "translate(" + L + ", " + (w - 50) + ")").call(D).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), n.db.topAxisEnabled() || i.topAxis) {
let N = $w(p).tickSize(-w + v + i.gridLineStartPadding).tickFormat(Lc(n.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
f.append("g").attr("class", "grid").attr("transform", "translate(" + L + ", " + v + ")").call(N).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
}
}
function C(L, v) {
const B = [];
let w = 0;
for (let D = 0; D < m.length; D++)
B[D] = [m[D], A(m[D], _)];
f.append("g").selectAll("text").data(B).enter().append(function(D) {
const N = D[0].split(pe.lineBreakRegex), z = -(N.length - 1) / 2, X = l.createElementNS("http://www.w3.org/2000/svg", "text");
X.setAttribute("dy", z + "em");
for (let ct = 0; ct < N.length; ct++) {
const J = l.createElementNS("http://www.w3.org/2000/svg", "tspan");
J.setAttribute("alignment-baseline", "central"), J.setAttribute("x", "10"), ct > 0 && J.setAttribute("dy", "1em"), J.textContent = N[ct], X.appendChild(J);
}
return X;
}).attr("x", 10).attr("y", function(D, N) {
if (N > 0)
for (let z = 0; z < N; z++)
return w += B[N - 1][1], D[1] * L / 2 + w * L + v;
else
return D[1] * L / 2 + v;
}).attr("font-size", i.sectionFontSize).attr("font-size", i.sectionFontSize).attr("class", function(D) {
for (let N = 0; N < m.length; N++)
if (D[0] === m[N])
return "sectionTitle sectionTitle" + N % i.numberSectionStyles;
return "sectionTitle";
});
}
function M(L, v, B, w) {
const D = n.db.getTodayMarker();
if (D === "off")
return;
const N = f.append("g").attr("class", "today"), z = new Date(), X = N.append("line");
X.attr("x1", p(z) + L).attr("x2", p(z) + L).attr("y1", i.titleTopMargin).attr("y2", w - i.titleTopMargin).attr("class", "today"), D !== "" && X.attr("style", D.replace(/,/g, ";"));
}
function S(L) {
const v = {}, B = [];
for (let w = 0, D = L.length; w < D; ++w)
Object.prototype.hasOwnProperty.call(v, L[w]) || (v[L[w]] = !0, B.push(L[w]));
return B;
}
function R(L) {
let v = L.length;
const B = {};
for (; v; )
B[L[--v]] = (B[L[v]] || 0) + 1;
return B;
}
function A(L, v) {
return R(v)[L] || 0;
}
}, kat = {
setConf: vat,
draw: xat
};
var wb = function() {
var t = function(a, s, o, l) {
for (o = o || {}, l = a.length; l--; o[a[l]] = s)
;
return o;
}, e = [6, 9, 10], r = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, info: 4, document: 5, EOF: 6, line: 7, statement: 8, NL: 9, showInfo: 10, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" },
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]],
performAction: function(s, o, l, u, h, d, f) {
switch (d.length - 1, h) {
case 1:
return u;
case 4:
break;
case 6:
u.setInfo(!0);
break;
}
},
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, t(e, [2, 3]), t(e, [2, 4]), t(e, [2, 5]), t(e, [2, 6])],
defaultActions: { 4: [2, 1] },
parseError: function(s, o) {
if (o.recoverable)
this.trace(s);
else {
var l = new Error(s);
throw l.hash = o, l;
}
},
parse: function(s) {
var o = this, l = [0], u = [], h = [null], d = [], f = this.table, p = "", m = 0, _ = 0, y = 2, b = 1, x = d.slice.call(arguments, 1), k = Object.create(this.lexer), T = { yy: {} };
for (var C in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, C) && (T.yy[C] = this.yy[C]);
k.setInput(s, T.yy), T.yy.lexer = k, T.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
var M = k.yylloc;
d.push(M);
var S = k.options && k.options.ranges;
typeof T.yy.parseError == "function" ? this.parseError = T.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function R() {
var J;
return J = u.pop() || k.lex() || b, typeof J != "number" && (J instanceof Array && (u = J, J = u.pop()), J = o.symbols_[J] || J), J;
}
for (var A, L, v, B, w = {}, D, N, z, X; ; ) {
if (L = l[l.length - 1], this.defaultActions[L] ? v = this.defaultActions[L] : ((A === null || typeof A > "u") && (A = R()), v = f[L] && f[L][A]), typeof v > "u" || !v.length || !v[0]) {
var ct = "";
X = [];
for (D in f[L])
this.terminals_[D] && D > y && X.push("'" + this.terminals_[D] + "'");
k.showPosition ? ct = "Parse error on line " + (m + 1) + `:
` + k.showPosition() + `
Expecting ` + X.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : ct = "Parse error on line " + (m + 1) + ": Unexpected " + (A == b ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(ct, {
text: k.match,
token: this.terminals_[A] || A,
line: k.yylineno,
loc: M,
expected: X
});
}
if (v[0] instanceof Array && v.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + A);
switch (v[0]) {
case 1:
l.push(A), h.push(k.yytext), d.push(k.yylloc), l.push(v[1]), A = null, _ = k.yyleng, p = k.yytext, m = k.yylineno, M = k.yylloc;
break;
case 2:
if (N = this.productions_[v[1]][1], w.$ = h[h.length - N], w._$ = {
first_line: d[d.length - (N || 1)].first_line,
last_line: d[d.length - 1].last_line,
first_column: d[d.length - (N || 1)].first_column,
last_column: d[d.length - 1].last_column
}, S && (w._$.range = [
d[d.length - (N || 1)].range[0],
d[d.length - 1].range[1]
]), B = this.performAction.apply(w, [
p,
_,
m,
T.yy,
v[1],
h,
d
].concat(x)), typeof B < "u")
return B;
N && (l = l.slice(0, -1 * N * 2), h = h.slice(0, -1 * N), d = d.slice(0, -1 * N)), l.push(this.productions_[v[1]][0]), h.push(w.$), d.push(w._$), z = f[l[l.length - 2]][l[l.length - 1]], l.push(z);
break;
case 3:
return !0;
}
}
return !0;
}
}, n = function() {
var a = {
EOF: 1,
parseError: function(o, l) {
if (this.yy.parser)
this.yy.parser.parseError(o, l);
else
throw new Error(o);
},
setInput: function(s, o) {
return this.yy = o || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var s = this._input[0];
this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
var o = s.match(/(?:\r\n?|\n).*/g);
return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
},
unput: function(s) {
var o = s.length, l = s.split(/(?:\r\n?|\n)/g);
this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
var u = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
var h = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: l ? (l.length === u.length ? this.yylloc.first_column : 0) + u[u.length - l.length].length - l[0].length : this.yylloc.first_column - o
}, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(s) {
this.unput(this.match.slice(s));
},
pastInput: function() {
var s = this.matched.substr(0, this.matched.length - this.match.length);
return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var s = this.match;
return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var s = this.pastInput(), o = new Array(s.length + 1).join("-");
return s + this.upcomingInput() + `
` + o + "^";
},
test_match: function(s, o) {
var l, u, h;
if (this.options.backtrack_lexer && (h = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), u = s[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
}, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], l = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
return l;
if (this._backtrack) {
for (var d in h)
this[d] = h[d];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var s, o, l, u;
this._more || (this.yytext = "", this.match = "");
for (var h = this._currentRules(), d = 0; d < h.length; d++)
if (l = this._input.match(this.rules[h[d]]), l && (!o || l[0].length > o[0].length)) {
if (o = l, u = d, this.options.backtrack_lexer) {
if (s = this.test_match(l, h[d]), s !== !1)
return s;
if (this._backtrack) {
o = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return o ? (s = this.test_match(o, h[u]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var o = this.next();
return o || this.lex();
},
begin: function(o) {
this.conditionStack.push(o);
},
popState: function() {
var o = this.conditionStack.length - 1;
return o > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(o) {
return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL";
},
pushState: function(o) {
this.begin(o);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(o, l, u, h) {
switch (u) {
case 0:
return 4;
case 1:
return 9;
case 2:
return "space";
case 3:
return 10;
case 4:
return 6;
case 5:
return "TXT";
}
},
rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5], inclusive: !0 } }
};
return a;
}();
r.lexer = n;
function i() {
this.yy = {};
}
return i.prototype = r, r.Parser = i, new i();
}();
wb.parser = wb;
var CL = "", SL = !1;
const wat = (t) => {
H.debug("Setting message to: " + t), CL = t;
}, Tat = () => CL, Eat = (t) => {
SL = t;
}, Cat = () => SL, Sat = {
setMessage: wat,
getMessage: Tat,
setInfo: Eat,
getInfo: Cat,
clear: gi
}, Aat = (t, e, r, n) => {
try {
H.debug(`Rendering info diagram
` + t);
const i = nt().securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const o = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body").select("#" + e);
o.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", "32px").style("text-anchor", "middle").text("v " + r), o.attr("height", 100), o.attr("width", 400);
} catch (i) {
H.error("Error while rendering info diagram"), H.error(i.message);
}
}, Mat = {
draw: Aat
}, Lat = (t) => t.match(/^\s*info/) !== null;
var Tb = function() {
var t = function(M, S, R, A) {
for (R = R || {}, A = M.length; A--; R[M[A]] = S)
;
return R;
}, e = [1, 4], r = [1, 5], n = [1, 6], i = [1, 7], a = [1, 9], s = [1, 11, 13, 15, 17, 19, 20, 26, 27, 28, 29], o = [2, 5], l = [1, 6, 11, 13, 15, 17, 19, 20, 26, 27, 28, 29], u = [26, 27, 28], h = [2, 8], d = [1, 18], f = [1, 19], p = [1, 20], m = [1, 21], _ = [1, 22], y = [1, 23], b = [1, 28], x = [6, 26, 27, 28, 29], k = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, eol: 4, directive: 5, PIE: 6, document: 7, showData: 8, line: 9, statement: 10, txt: 11, value: 12, title: 13, title_value: 14, acc_title: 15, acc_title_value: 16, acc_descr: 17, acc_descr_value: 18, acc_descr_multiline_value: 19, section: 20, openDirective: 21, typeDirective: 22, closeDirective: 23, ":": 24, argDirective: 25, NEWLINE: 26, ";": 27, EOF: 28, open_directive: 29, type_directive: 30, arg_directive: 31, close_directive: 32, $accept: 0, $end: 1 },
terminals_: { 2: "error", 6: "PIE", 8: "showData", 11: "txt", 12: "value", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 24: ":", 26: "NEWLINE", 27: ";", 28: "EOF", 29: "open_directive", 30: "type_directive", 31: "arg_directive", 32: "close_directive" },
productions_: [0, [3, 2], [3, 2], [3, 2], [3, 3], [7, 0], [7, 2], [9, 2], [10, 0], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [5, 3], [5, 5], [4, 1], [4, 1], [4, 1], [21, 1], [22, 1], [25, 1], [23, 1]],
performAction: function(S, R, A, L, v, B, w) {
var D = B.length - 1;
switch (v) {
case 4:
L.setShowData(!0);
break;
case 7:
this.$ = B[D - 1];
break;
case 9:
L.addSection(B[D - 1], L.cleanupValue(B[D]));
break;
case 10:
this.$ = B[D].trim(), L.setDiagramTitle(this.$);
break;
case 11:
this.$ = B[D].trim(), L.setAccTitle(this.$);
break;
case 12:
case 13:
this.$ = B[D].trim(), L.setAccDescription(this.$);
break;
case 14:
L.addSection(B[D].substr(8)), this.$ = B[D].substr(8);
break;
case 21:
L.parseDirective("%%{", "open_directive");
break;
case 22:
L.parseDirective(B[D], "type_directive");
break;
case 23:
B[D] = B[D].trim().replace(/'/g, '"'), L.parseDirective(B[D], "arg_directive");
break;
case 24:
L.parseDirective("}%%", "close_directive", "pie");
break;
}
},
table: [{ 3: 1, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: a }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: a }, { 3: 11, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: a }, t(s, o, { 7: 12, 8: [1, 13] }), t(l, [2, 18]), t(l, [2, 19]), t(l, [2, 20]), { 22: 14, 30: [1, 15] }, { 30: [2, 21] }, { 1: [2, 1] }, { 1: [2, 2] }, t(u, h, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 3], 11: d, 13: f, 15: p, 17: m, 19: _, 20: y, 29: a }), t(s, o, { 7: 25 }), { 23: 26, 24: [1, 27], 32: b }, t([24, 32], [2, 22]), t(s, [2, 6]), { 4: 29, 26: r, 27: n, 28: i }, { 12: [1, 30] }, { 14: [1, 31] }, { 16: [1, 32] }, { 18: [1, 33] }, t(u, [2, 13]), t(u, [2, 14]), t(u, [2, 15]), t(u, h, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 4], 11: d, 13: f, 15: p, 17: m, 19: _, 20: y, 29: a }), t(x, [2, 16]), { 25: 34, 31: [1, 35] }, t(x, [2, 24]), t(s, [2, 7]), t(u, [2, 9]), t(u, [2, 10]), t(u, [2, 11]), t(u, [2, 12]), { 23: 36, 32: b }, { 32: [2, 23] }, t(x, [2, 17])],
defaultActions: { 9: [2, 21], 10: [2, 1], 11: [2, 2], 35: [2, 23] },
parseError: function(S, R) {
if (R.recoverable)
this.trace(S);
else {
var A = new Error(S);
throw A.hash = R, A;
}
},
parse: function(S) {
var R = this, A = [0], L = [], v = [null], B = [], w = this.table, D = "", N = 0, z = 0, X = 2, ct = 1, J = B.slice.call(arguments, 1), Y = Object.create(this.lexer), $ = { yy: {} };
for (var lt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, lt) && ($.yy[lt] = this.yy[lt]);
Y.setInput(S, $.yy), $.yy.lexer = Y, $.yy.parser = this, typeof Y.yylloc > "u" && (Y.yylloc = {});
var ut = Y.yylloc;
B.push(ut);
var W = Y.options && Y.options.ranges;
typeof $.yy.parseError == "function" ? this.parseError = $.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function tt() {
var et;
return et = L.pop() || Y.lex() || ct, typeof et != "number" && (et instanceof Array && (L = et, et = L.pop()), et = R.symbols_[et] || et), et;
}
for (var K, it, Z, V, Q = {}, q, U, F, j; ; ) {
if (it = A[A.length - 1], this.defaultActions[it] ? Z = this.defaultActions[it] : ((K === null || typeof K > "u") && (K = tt()), Z = w[it] && w[it][K]), typeof Z > "u" || !Z.length || !Z[0]) {
var P = "";
j = [];
for (q in w[it])
this.terminals_[q] && q > X && j.push("'" + this.terminals_[q] + "'");
Y.showPosition ? P = "Parse error on line " + (N + 1) + `:
` + Y.showPosition() + `
Expecting ` + j.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : P = "Parse error on line " + (N + 1) + ": Unexpected " + (K == ct ? "end of input" : "'" + (this.terminals_[K] || K) + "'"), this.parseError(P, {
text: Y.match,
token: this.terminals_[K] || K,
line: Y.yylineno,
loc: ut,
expected: j
});
}
if (Z[0] instanceof Array && Z.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + it + ", token: " + K);
switch (Z[0]) {
case 1:
A.push(K), v.push(Y.yytext), B.push(Y.yylloc), A.push(Z[1]), K = null, z = Y.yyleng, D = Y.yytext, N = Y.yylineno, ut = Y.yylloc;
break;
case 2:
if (U = this.productions_[Z[1]][1], Q.$ = v[v.length - U], Q._$ = {
first_line: B[B.length - (U || 1)].first_line,
last_line: B[B.length - 1].last_line,
first_column: B[B.length - (U || 1)].first_column,
last_column: B[B.length - 1].last_column
}, W && (Q._$.range = [
B[B.length - (U || 1)].range[0],
B[B.length - 1].range[1]
]), V = this.performAction.apply(Q, [
D,
z,
N,
$.yy,
Z[1],
v,
B
].concat(J)), typeof V < "u")
return V;
U && (A = A.slice(0, -1 * U * 2), v = v.slice(0, -1 * U), B = B.slice(0, -1 * U)), A.push(this.productions_[Z[1]][0]), v.push(Q.$), B.push(Q._$), F = w[A[A.length - 2]][A[A.length - 1]], A.push(F);
break;
case 3:
return !0;
}
}
return !0;
}
}, T = function() {
var M = {
EOF: 1,
parseError: function(R, A) {
if (this.yy.parser)
this.yy.parser.parseError(R, A);
else
throw new Error(R);
},
setInput: function(S, R) {
return this.yy = R || this.yy || {}, this._input = S, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var S = this._input[0];
this.yytext += S, this.yyleng++, this.offset++, this.match += S, this.matched += S;
var R = S.match(/(?:\r\n?|\n).*/g);
return R ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), S;
},
unput: function(S) {
var R = S.length, A = S.split(/(?:\r\n?|\n)/g);
this._input = S + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - R), this.offset -= R;
var L = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), A.length - 1 && (this.yylineno -= A.length - 1);
var v = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: A ? (A.length === L.length ? this.yylloc.first_column : 0) + L[L.length - A.length].length - A[0].length : this.yylloc.first_column - R
}, this.options.ranges && (this.yylloc.range = [v[0], v[0] + this.yyleng - R]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(S) {
this.unput(this.match.slice(S));
},
pastInput: function() {
var S = this.matched.substr(0, this.matched.length - this.match.length);
return (S.length > 20 ? "..." : "") + S.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var S = this.match;
return S.length < 20 && (S += this._input.substr(0, 20 - S.length)), (S.substr(0, 20) + (S.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var S = this.pastInput(), R = new Array(S.length + 1).join("-");
return S + this.upcomingInput() + `
` + R + "^";
},
test_match: function(S, R) {
var A, L, v;
if (this.options.backtrack_lexer && (v = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (v.yylloc.range = this.yylloc.range.slice(0))), L = S[0].match(/(?:\r\n?|\n).*/g), L && (this.yylineno += L.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: L ? L[L.length - 1].length - L[L.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + S[0].length
}, this.yytext += S[0], this.match += S[0], this.matches = S, 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(S[0].length), this.matched += S[0], A = this.performAction.call(this, this.yy, this, R, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), A)
return A;
if (this._backtrack) {
for (var B in v)
this[B] = v[B];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var S, R, A, L;
this._more || (this.yytext = "", this.match = "");
for (var v = this._currentRules(), B = 0; B < v.length; B++)
if (A = this._input.match(this.rules[v[B]]), A && (!R || A[0].length > R[0].length)) {
if (R = A, L = B, this.options.backtrack_lexer) {
if (S = this.test_match(A, v[B]), S !== !1)
return S;
if (this._backtrack) {
R = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return R ? (S = this.test_match(R, v[L]), S !== !1 ? S : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var R = this.next();
return R || this.lex();
},
begin: function(R) {
this.conditionStack.push(R);
},
popState: function() {
var R = this.conditionStack.length - 1;
return R > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(R) {
return R = this.conditionStack.length - 1 - Math.abs(R || 0), R >= 0 ? this.conditionStack[R] : "INITIAL";
},
pushState: function(R) {
this.begin(R);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(R, A, L, v) {
switch (L) {
case 0:
return this.begin("open_directive"), 29;
case 1:
return this.begin("type_directive"), 30;
case 2:
return this.popState(), this.begin("arg_directive"), 24;
case 3:
return this.popState(), this.popState(), 32;
case 4:
return 31;
case 5:
break;
case 6:
break;
case 7:
return 26;
case 8:
break;
case 9:
break;
case 10:
return this.begin("title"), 13;
case 11:
return this.popState(), "title_value";
case 12:
return this.begin("acc_title"), 15;
case 13:
return this.popState(), "acc_title_value";
case 14:
return this.begin("acc_descr"), 17;
case 15:
return this.popState(), "acc_descr_value";
case 16:
this.begin("acc_descr_multiline");
break;
case 17:
this.popState();
break;
case 18:
return "acc_descr_multiline_value";
case 19:
this.begin("string");
break;
case 20:
this.popState();
break;
case 21:
return "txt";
case 22:
return 6;
case 23:
return 8;
case 24:
return "value";
case 25:
return 28;
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i],
conditions: { acc_descr_multiline: { rules: [17, 18], inclusive: !1 }, acc_descr: { rules: [15], inclusive: !1 }, acc_title: { rules: [13], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, title: { rules: [11], inclusive: !1 }, string: { rules: [20, 21], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 8, 9, 10, 12, 14, 16, 19, 22, 23, 24, 25], inclusive: !0 } }
};
return M;
}();
k.lexer = T;
function C() {
this.yy = {};
}
return C.prototype = k, k.Parser = C, new C();
}();
Tb.parser = Tb;
const Rat = (t) => t.match(/^\s*pie/) !== null;
let r1 = {}, i_ = !1;
const Iat = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, Nat = function(t, e) {
t = pe.sanitizeText(t, nt()), typeof r1[t] > "u" && (r1[t] = e, H.debug("Added new section :", t));
}, Bat = () => r1, Dat = function(t) {
i_ = t;
}, Oat = function() {
return i_;
}, Fat = function(t) {
return t.substring(0, 1) === ":" && (t = t.substring(1).trim()), Number(t.trim());
}, Pat = function() {
r1 = {}, i_ = !1, gi();
}, qat = {
parseDirective: Iat,
getConfig: () => nt().pie,
addSection: Nat,
getSections: Bat,
cleanupValue: Fat,
clear: Pat,
setAccTitle: Yn,
getAccTitle: yi,
setDiagramTitle: a0,
getDiagramTitle: s0,
setShowData: Dat,
getShowData: Oat,
getAccDescription: bi,
setAccDescription: mi
};
let ra = nt(), na;
const Bl = 450, Vat = (t, e, r, n) => {
try {
ra = nt(), H.debug(`Rendering info diagram
` + t);
const b = nt().securityLevel;
let x;
b === "sandbox" && (x = St("#i" + e));
const k = St(b === "sandbox" ? x.nodes()[0].contentDocument.body : "body"), T = b === "sandbox" ? x.nodes()[0].contentDocument : document;
n.db.clear(), n.parser.parse(t), H.debug("Parsed info diagram");
const C = T.getElementById(e);
na = C.parentElement.offsetWidth, typeof na > "u" && (na = 1200), typeof ra.useWidth < "u" && (na = ra.useWidth), typeof ra.pie.useWidth < "u" && (na = ra.pie.useWidth);
const M = k.select("#" + e);
pi(M, Bl, na, ra.pie.useMaxWidth), vn(n.db, M, e), C.setAttribute("viewBox", "0 0 " + na + " " + Bl);
var i = 40, a = 18, s = 4, o = Math.min(na, Bl) / 2 - i, l = M.append("g").attr("transform", "translate(" + na / 2 + "," + Bl / 2 + ")"), u = n.db.getSections(), h = 0;
Object.keys(u).forEach(function(R) {
h += u[R];
});
const S = ra.themeVariables;
var d = [
S.pie1,
S.pie2,
S.pie3,
S.pie4,
S.pie5,
S.pie6,
S.pie7,
S.pie8,
S.pie9,
S.pie10,
S.pie11,
S.pie12
], f = R1().range(d), p = RC().value(function(R) {
return R[1];
}), m = p(Object.entries(u)), _ = wf().innerRadius(0).outerRadius(o);
l.selectAll("mySlices").data(m).enter().append("path").attr("d", _).attr("fill", function(R) {
return f(R.data[0]);
}).attr("class", "pieCircle"), l.selectAll("mySlices").data(m).enter().append("text").text(function(R) {
return (R.data[1] / h * 100).toFixed(0) + "%";
}).attr("transform", function(R) {
return "translate(" + _.centroid(R) + ")";
}).style("text-anchor", "middle").attr("class", "slice"), l.append("text").text(n.db.getDiagramTitle()).attr("x", 0).attr("y", -(Bl - 50) / 2).attr("class", "pieTitleText");
var y = l.selectAll(".legend").data(f.domain()).enter().append("g").attr("class", "legend").attr("transform", function(R, A) {
var L = a + s, v = L * f.domain().length / 2, B = 12 * a, w = A * L - v;
return "translate(" + B + "," + w + ")";
});
y.append("rect").attr("width", a).attr("height", a).style("fill", f).style("stroke", f), y.data(m).append("text").attr("x", a + s).attr("y", a - s).text(function(R) {
return n.db.getShowData() || ra.showData || ra.pie.showData ? R.data[0] + " [" + R.data[1] + "]" : R.data[0];
});
} catch (b) {
H.error("Error while rendering info diagram"), H.error(b);
}
}, zat = {
draw: Vat
};
var Eb = function() {
var t = function(it, Z, V, Q) {
for (V = V || {}, Q = it.length; Q--; V[it[Q]] = Z)
;
return V;
}, e = [1, 3], r = [1, 5], n = [1, 6], i = [1, 7], a = [1, 8], s = [5, 6, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72], o = [1, 22], l = [2, 13], u = [1, 26], h = [1, 27], d = [1, 28], f = [1, 29], p = [1, 30], m = [1, 31], _ = [1, 24], y = [1, 32], b = [1, 33], x = [1, 36], k = [71, 72], T = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 60, 62, 71, 72], C = [1, 56], M = [1, 57], S = [1, 58], R = [1, 59], A = [1, 60], L = [1, 61], v = [1, 62], B = [62, 63], w = [1, 74], D = [1, 70], N = [1, 71], z = [1, 72], X = [1, 73], ct = [1, 75], J = [1, 79], Y = [1, 80], $ = [1, 77], lt = [1, 78], ut = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72], W = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, directive: 4, NEWLINE: 5, RD: 6, diagram: 7, EOF: 8, openDirective: 9, typeDirective: 10, closeDirective: 11, ":": 12, argDirective: 13, acc_title: 14, acc_title_value: 15, acc_descr: 16, acc_descr_value: 17, acc_descr_multiline_value: 18, open_directive: 19, type_directive: 20, arg_directive: 21, close_directive: 22, requirementDef: 23, elementDef: 24, relationshipDef: 25, requirementType: 26, requirementName: 27, STRUCT_START: 28, requirementBody: 29, ID: 30, COLONSEP: 31, id: 32, TEXT: 33, text: 34, RISK: 35, riskLevel: 36, VERIFYMTHD: 37, verifyType: 38, STRUCT_STOP: 39, REQUIREMENT: 40, FUNCTIONAL_REQUIREMENT: 41, INTERFACE_REQUIREMENT: 42, PERFORMANCE_REQUIREMENT: 43, PHYSICAL_REQUIREMENT: 44, DESIGN_CONSTRAINT: 45, LOW_RISK: 46, MED_RISK: 47, HIGH_RISK: 48, VERIFY_ANALYSIS: 49, VERIFY_DEMONSTRATION: 50, VERIFY_INSPECTION: 51, VERIFY_TEST: 52, ELEMENT: 53, elementName: 54, elementBody: 55, TYPE: 56, type: 57, DOCREF: 58, ref: 59, END_ARROW_L: 60, relationship: 61, LINE: 62, END_ARROW_R: 63, CONTAINS: 64, COPIES: 65, DERIVES: 66, SATISFIES: 67, VERIFIES: 68, REFINES: 69, TRACES: 70, unqString: 71, qString: 72, $accept: 0, $end: 1 },
terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 12: ":", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "open_directive", 20: "type_directive", 21: "arg_directive", 22: "close_directive", 28: "STRUCT_START", 30: "ID", 31: "COLONSEP", 33: "TEXT", 35: "RISK", 37: "VERIFYMTHD", 39: "STRUCT_STOP", 40: "REQUIREMENT", 41: "FUNCTIONAL_REQUIREMENT", 42: "INTERFACE_REQUIREMENT", 43: "PERFORMANCE_REQUIREMENT", 44: "PHYSICAL_REQUIREMENT", 45: "DESIGN_CONSTRAINT", 46: "LOW_RISK", 47: "MED_RISK", 48: "HIGH_RISK", 49: "VERIFY_ANALYSIS", 50: "VERIFY_DEMONSTRATION", 51: "VERIFY_INSPECTION", 52: "VERIFY_TEST", 53: "ELEMENT", 56: "TYPE", 58: "DOCREF", 60: "END_ARROW_L", 62: "LINE", 63: "END_ARROW_R", 64: "CONTAINS", 65: "COPIES", 66: "DERIVES", 67: "SATISFIES", 68: "VERIFIES", 69: "REFINES", 70: "TRACES", 71: "unqString", 72: "qString" },
productions_: [0, [3, 3], [3, 2], [3, 4], [4, 3], [4, 5], [4, 2], [4, 2], [4, 1], [9, 1], [10, 1], [13, 1], [11, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [23, 5], [29, 5], [29, 5], [29, 5], [29, 5], [29, 2], [29, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [36, 1], [36, 1], [36, 1], [38, 1], [38, 1], [38, 1], [38, 1], [24, 5], [55, 5], [55, 5], [55, 2], [55, 1], [25, 5], [25, 5], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [27, 1], [27, 1], [32, 1], [32, 1], [34, 1], [34, 1], [54, 1], [54, 1], [57, 1], [57, 1], [59, 1], [59, 1]],
performAction: function(Z, V, Q, q, U, F, j) {
var P = F.length - 1;
switch (U) {
case 6:
this.$ = F[P].trim(), q.setAccTitle(this.$);
break;
case 7:
case 8:
this.$ = F[P].trim(), q.setAccDescription(this.$);
break;
case 9:
q.parseDirective("%%{", "open_directive");
break;
case 10:
q.parseDirective(F[P], "type_directive");
break;
case 11:
F[P] = F[P].trim().replace(/'/g, '"'), q.parseDirective(F[P], "arg_directive");
break;
case 12:
q.parseDirective("}%%", "close_directive", "pie");
break;
case 13:
this.$ = [];
break;
case 19:
q.addRequirement(F[P - 3], F[P - 4]);
break;
case 20:
q.setNewReqId(F[P - 2]);
break;
case 21:
q.setNewReqText(F[P - 2]);
break;
case 22:
q.setNewReqRisk(F[P - 2]);
break;
case 23:
q.setNewReqVerifyMethod(F[P - 2]);
break;
case 26:
this.$ = q.RequirementType.REQUIREMENT;
break;
case 27:
this.$ = q.RequirementType.FUNCTIONAL_REQUIREMENT;
break;
case 28:
this.$ = q.RequirementType.INTERFACE_REQUIREMENT;
break;
case 29:
this.$ = q.RequirementType.PERFORMANCE_REQUIREMENT;
break;
case 30:
this.$ = q.RequirementType.PHYSICAL_REQUIREMENT;
break;
case 31:
this.$ = q.RequirementType.DESIGN_CONSTRAINT;
break;
case 32:
this.$ = q.RiskLevel.LOW_RISK;
break;
case 33:
this.$ = q.RiskLevel.MED_RISK;
break;
case 34:
this.$ = q.RiskLevel.HIGH_RISK;
break;
case 35:
this.$ = q.VerifyType.VERIFY_ANALYSIS;
break;
case 36:
this.$ = q.VerifyType.VERIFY_DEMONSTRATION;
break;
case 37:
this.$ = q.VerifyType.VERIFY_INSPECTION;
break;
case 38:
this.$ = q.VerifyType.VERIFY_TEST;
break;
case 39:
q.addElement(F[P - 3]);
break;
case 40:
q.setNewElementType(F[P - 2]);
break;
case 41:
q.setNewElementDocRef(F[P - 2]);
break;
case 44:
q.addRelationship(F[P - 2], F[P], F[P - 4]);
break;
case 45:
q.addRelationship(F[P - 2], F[P - 4], F[P]);
break;
case 46:
this.$ = q.Relationships.CONTAINS;
break;
case 47:
this.$ = q.Relationships.COPIES;
break;
case 48:
this.$ = q.Relationships.DERIVES;
break;
case 49:
this.$ = q.Relationships.SATISFIES;
break;
case 50:
this.$ = q.Relationships.VERIFIES;
break;
case 51:
this.$ = q.Relationships.REFINES;
break;
case 52:
this.$ = q.Relationships.TRACES;
break;
}
},
table: [{ 3: 1, 4: 2, 6: e, 9: 4, 14: r, 16: n, 18: i, 19: a }, { 1: [3] }, { 3: 10, 4: 2, 5: [1, 9], 6: e, 9: 4, 14: r, 16: n, 18: i, 19: a }, { 5: [1, 11] }, { 10: 12, 20: [1, 13] }, { 15: [1, 14] }, { 17: [1, 15] }, t(s, [2, 8]), { 20: [2, 9] }, { 3: 16, 4: 2, 6: e, 9: 4, 14: r, 16: n, 18: i, 19: a }, { 1: [2, 2] }, { 4: 21, 5: o, 7: 17, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 11: 34, 12: [1, 35], 22: x }, t([12, 22], [2, 10]), t(s, [2, 6]), t(s, [2, 7]), { 1: [2, 1] }, { 8: [1, 37] }, { 4: 21, 5: o, 7: 38, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 4: 21, 5: o, 7: 39, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 4: 21, 5: o, 7: 40, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 4: 21, 5: o, 7: 41, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 4: 21, 5: o, 7: 42, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 27: 43, 71: [1, 44], 72: [1, 45] }, { 54: 46, 71: [1, 47], 72: [1, 48] }, { 60: [1, 49], 62: [1, 50] }, t(k, [2, 26]), t(k, [2, 27]), t(k, [2, 28]), t(k, [2, 29]), t(k, [2, 30]), t(k, [2, 31]), t(T, [2, 55]), t(T, [2, 56]), t(s, [2, 4]), { 13: 51, 21: [1, 52] }, t(s, [2, 12]), { 1: [2, 3] }, { 8: [2, 14] }, { 8: [2, 15] }, { 8: [2, 16] }, { 8: [2, 17] }, { 8: [2, 18] }, { 28: [1, 53] }, { 28: [2, 53] }, { 28: [2, 54] }, { 28: [1, 54] }, { 28: [2, 59] }, { 28: [2, 60] }, { 61: 55, 64: C, 65: M, 66: S, 67: R, 68: A, 69: L, 70: v }, { 61: 63, 64: C, 65: M, 66: S, 67: R, 68: A, 69: L, 70: v }, { 11: 64, 22: x }, { 22: [2, 11] }, { 5: [1, 65] }, { 5: [1, 66] }, { 62: [1, 67] }, t(B, [2, 46]), t(B, [2, 47]), t(B, [2, 48]), t(B, [2, 49]), t(B, [2, 50]), t(B, [2, 51]), t(B, [2, 52]), { 63: [1, 68] }, t(s, [2, 5]), { 5: w, 29: 69, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: J, 39: Y, 55: 76, 56: $, 58: lt }, { 32: 81, 71: y, 72: b }, { 32: 82, 71: y, 72: b }, t(ut, [2, 19]), { 31: [1, 83] }, { 31: [1, 84] }, { 31: [1, 85] }, { 31: [1, 86] }, { 5: w, 29: 87, 30: D, 33: N, 35: z, 37: X, 39: ct }, t(ut, [2, 25]), t(ut, [2, 39]), { 31: [1, 88] }, { 31: [1, 89] }, { 5: J, 39: Y, 55: 90, 56: $, 58: lt }, t(ut, [2, 43]), t(ut, [2, 44]), t(ut, [2, 45]), { 32: 91, 71: y, 72: b }, { 34: 92, 71: [1, 93], 72: [1, 94] }, { 36: 95, 46: [1, 96], 47: [1, 97], 48: [1, 98] }, { 38: 99, 49: [1, 100], 50: [1, 101], 51: [1, 102], 52: [1, 103] }, t(ut, [2, 24]), { 57: 104, 71: [1, 105], 72: [1, 106] }, { 59: 107, 71: [1, 108], 72: [1, 109] }, t(ut, [2, 42]), { 5: [1, 110] }, { 5: [1, 111] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: [1, 112] }, { 5: [2, 32] }, { 5: [2, 33] }, { 5: [2, 34] }, { 5: [1, 113] }, { 5: [2, 35] }, { 5: [2, 36] }, { 5: [2, 37] }, { 5: [2, 38] }, { 5: [1, 114] }, { 5: [2, 61] }, { 5: [2, 62] }, { 5: [1, 115] }, { 5: [2, 63] }, { 5: [2, 64] }, { 5: w, 29: 116, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: w, 29: 117, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: w, 29: 118, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: w, 29: 119, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: J, 39: Y, 55: 120, 56: $, 58: lt }, { 5: J, 39: Y, 55: 121, 56: $, 58: lt }, t(ut, [2, 20]), t(ut, [2, 21]), t(ut, [2, 22]), t(ut, [2, 23]), t(ut, [2, 40]), t(ut, [2, 41])],
defaultActions: { 8: [2, 9], 10: [2, 2], 16: [2, 1], 37: [2, 3], 38: [2, 14], 39: [2, 15], 40: [2, 16], 41: [2, 17], 42: [2, 18], 44: [2, 53], 45: [2, 54], 47: [2, 59], 48: [2, 60], 52: [2, 11], 93: [2, 57], 94: [2, 58], 96: [2, 32], 97: [2, 33], 98: [2, 34], 100: [2, 35], 101: [2, 36], 102: [2, 37], 103: [2, 38], 105: [2, 61], 106: [2, 62], 108: [2, 63], 109: [2, 64] },
parseError: function(Z, V) {
if (V.recoverable)
this.trace(Z);
else {
var Q = new Error(Z);
throw Q.hash = V, Q;
}
},
parse: function(Z) {
var V = this, Q = [0], q = [], U = [null], F = [], j = this.table, P = "", et = 0, at = 0, It = 2, Lt = 1, Rt = F.slice.call(arguments, 1), Ct = Object.create(this.lexer), pt = { yy: {} };
for (var mt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, mt) && (pt.yy[mt] = this.yy[mt]);
Ct.setInput(Z, pt.yy), pt.yy.lexer = Ct, pt.yy.parser = this, typeof Ct.yylloc > "u" && (Ct.yylloc = {});
var _t = Ct.yylloc;
F.push(_t);
var Tt = Ct.options && Ct.options.ranges;
typeof pt.yy.parseError == "function" ? this.parseError = pt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function ft() {
var bt;
return bt = q.pop() || Ct.lex() || Lt, typeof bt != "number" && (bt instanceof Array && (q = bt, bt = q.pop()), bt = V.symbols_[bt] || bt), bt;
}
for (var le, Dt, Ht, $t, Qt = {}, we, Gt, Ft, zt; ; ) {
if (Dt = Q[Q.length - 1], this.defaultActions[Dt] ? Ht = this.defaultActions[Dt] : ((le === null || typeof le > "u") && (le = ft()), Ht = j[Dt] && j[Dt][le]), typeof Ht > "u" || !Ht.length || !Ht[0]) {
var wt = "";
zt = [];
for (we in j[Dt])
this.terminals_[we] && we > It && zt.push("'" + this.terminals_[we] + "'");
Ct.showPosition ? wt = "Parse error on line " + (et + 1) + `:
` + Ct.showPosition() + `
Expecting ` + zt.join(", ") + ", got '" + (this.terminals_[le] || le) + "'" : wt = "Parse error on line " + (et + 1) + ": Unexpected " + (le == Lt ? "end of input" : "'" + (this.terminals_[le] || le) + "'"), this.parseError(wt, {
text: Ct.match,
token: this.terminals_[le] || le,
line: Ct.yylineno,
loc: _t,
expected: zt
});
}
if (Ht[0] instanceof Array && Ht.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Dt + ", token: " + le);
switch (Ht[0]) {
case 1:
Q.push(le), U.push(Ct.yytext), F.push(Ct.yylloc), Q.push(Ht[1]), le = null, at = Ct.yyleng, P = Ct.yytext, et = Ct.yylineno, _t = Ct.yylloc;
break;
case 2:
if (Gt = this.productions_[Ht[1]][1], Qt.$ = U[U.length - Gt], Qt._$ = {
first_line: F[F.length - (Gt || 1)].first_line,
last_line: F[F.length - 1].last_line,
first_column: F[F.length - (Gt || 1)].first_column,
last_column: F[F.length - 1].last_column
}, Tt && (Qt._$.range = [
F[F.length - (Gt || 1)].range[0],
F[F.length - 1].range[1]
]), $t = this.performAction.apply(Qt, [
P,
at,
et,
pt.yy,
Ht[1],
U,
F
].concat(Rt)), typeof $t < "u")
return $t;
Gt && (Q = Q.slice(0, -1 * Gt * 2), U = U.slice(0, -1 * Gt), F = F.slice(0, -1 * Gt)), Q.push(this.productions_[Ht[1]][0]), U.push(Qt.$), F.push(Qt._$), Ft = j[Q[Q.length - 2]][Q[Q.length - 1]], Q.push(Ft);
break;
case 3:
return !0;
}
}
return !0;
}
}, tt = function() {
var it = {
EOF: 1,
parseError: function(V, Q) {
if (this.yy.parser)
this.yy.parser.parseError(V, Q);
else
throw new Error(V);
},
setInput: function(Z, V) {
return this.yy = V || this.yy || {}, this._input = Z, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var Z = this._input[0];
this.yytext += Z, this.yyleng++, this.offset++, this.match += Z, this.matched += Z;
var V = Z.match(/(?:\r\n?|\n).*/g);
return V ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Z;
},
unput: function(Z) {
var V = Z.length, Q = Z.split(/(?:\r\n?|\n)/g);
this._input = Z + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - V), this.offset -= V;
var q = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), Q.length - 1 && (this.yylineno -= Q.length - 1);
var U = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: Q ? (Q.length === q.length ? this.yylloc.first_column : 0) + q[q.length - Q.length].length - Q[0].length : this.yylloc.first_column - V
}, this.options.ranges && (this.yylloc.range = [U[0], U[0] + this.yyleng - V]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(Z) {
this.unput(this.match.slice(Z));
},
pastInput: function() {
var Z = this.matched.substr(0, this.matched.length - this.match.length);
return (Z.length > 20 ? "..." : "") + Z.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var Z = this.match;
return Z.length < 20 && (Z += this._input.substr(0, 20 - Z.length)), (Z.substr(0, 20) + (Z.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var Z = this.pastInput(), V = new Array(Z.length + 1).join("-");
return Z + this.upcomingInput() + `
` + V + "^";
},
test_match: function(Z, V) {
var Q, q, U;
if (this.options.backtrack_lexer && (U = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (U.yylloc.range = this.yylloc.range.slice(0))), q = Z[0].match(/(?:\r\n?|\n).*/g), q && (this.yylineno += q.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: q ? q[q.length - 1].length - q[q.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Z[0].length
}, this.yytext += Z[0], this.match += Z[0], this.matches = Z, 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(Z[0].length), this.matched += Z[0], Q = this.performAction.call(this, this.yy, this, V, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), Q)
return Q;
if (this._backtrack) {
for (var F in U)
this[F] = U[F];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var Z, V, Q, q;
this._more || (this.yytext = "", this.match = "");
for (var U = this._currentRules(), F = 0; F < U.length; F++)
if (Q = this._input.match(this.rules[U[F]]), Q && (!V || Q[0].length > V[0].length)) {
if (V = Q, q = F, this.options.backtrack_lexer) {
if (Z = this.test_match(Q, U[F]), Z !== !1)
return Z;
if (this._backtrack) {
V = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return V ? (Z = this.test_match(V, U[q]), Z !== !1 ? Z : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var V = this.next();
return V || this.lex();
},
begin: function(V) {
this.conditionStack.push(V);
},
popState: function() {
var V = this.conditionStack.length - 1;
return V > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(V) {
return V = this.conditionStack.length - 1 - Math.abs(V || 0), V >= 0 ? this.conditionStack[V] : "INITIAL";
},
pushState: function(V) {
this.begin(V);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(V, Q, q, U) {
switch (q) {
case 0:
return this.begin("open_directive"), 19;
case 1:
return this.begin("type_directive"), 20;
case 2:
return this.popState(), this.begin("arg_directive"), 12;
case 3:
return this.popState(), this.popState(), 22;
case 4:
return 21;
case 5:
return "title";
case 6:
return this.begin("acc_title"), 14;
case 7:
return this.popState(), "acc_title_value";
case 8:
return this.begin("acc_descr"), 16;
case 9:
return this.popState(), "acc_descr_value";
case 10:
this.begin("acc_descr_multiline");
break;
case 11:
this.popState();
break;
case 12:
return "acc_descr_multiline_value";
case 13:
return 5;
case 14:
break;
case 15:
break;
case 16:
break;
case 17:
return 8;
case 18:
return 6;
case 19:
return 28;
case 20:
return 39;
case 21:
return 31;
case 22:
return 30;
case 23:
return 33;
case 24:
return 35;
case 25:
return 37;
case 26:
return 40;
case 27:
return 41;
case 28:
return 42;
case 29:
return 43;
case 30:
return 44;
case 31:
return 45;
case 32:
return 46;
case 33:
return 47;
case 34:
return 48;
case 35:
return 49;
case 36:
return 50;
case 37:
return 51;
case 38:
return 52;
case 39:
return 53;
case 40:
return 64;
case 41:
return 65;
case 42:
return 66;
case 43:
return 67;
case 44:
return 68;
case 45:
return 69;
case 46:
return 70;
case 47:
return 56;
case 48:
return 58;
case 49:
return 60;
case 50:
return 63;
case 51:
return 62;
case 52:
this.begin("string");
break;
case 53:
this.popState();
break;
case 54:
return "qString";
case 55:
return Q.yytext = Q.yytext.trim(), 71;
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i],
conditions: { acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, unqString: { rules: [], inclusive: !1 }, token: { rules: [], inclusive: !1 }, string: { rules: [53, 54], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 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, 55], inclusive: !0 } }
};
return it;
}();
W.lexer = tt;
function K() {
this.yy = {};
}
return K.prototype = W, W.Parser = K, new K();
}();
Eb.parser = Eb;
const Yat = (t) => t.match(/^\s*requirement(Diagram)?/) !== null;
let a_ = [], mn = {}, cc = {}, Ua = {}, uc = {};
const Uat = {
REQUIREMENT: "Requirement",
FUNCTIONAL_REQUIREMENT: "Functional Requirement",
INTERFACE_REQUIREMENT: "Interface Requirement",
PERFORMANCE_REQUIREMENT: "Performance Requirement",
PHYSICAL_REQUIREMENT: "Physical Requirement",
DESIGN_CONSTRAINT: "Design Constraint"
}, Wat = {
LOW_RISK: "Low",
MED_RISK: "Medium",
HIGH_RISK: "High"
}, Hat = {
VERIFY_ANALYSIS: "Analysis",
VERIFY_DEMONSTRATION: "Demonstration",
VERIFY_INSPECTION: "Inspection",
VERIFY_TEST: "Test"
}, Gat = {
CONTAINS: "contains",
COPIES: "copies",
DERIVES: "derives",
SATISFIES: "satisfies",
VERIFIES: "verifies",
REFINES: "refines",
TRACES: "traces"
}, jat = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, $at = (t, e) => (typeof cc[t] > "u" && (cc[t] = {
name: t,
type: e,
id: mn.id,
text: mn.text,
risk: mn.risk,
verifyMethod: mn.verifyMethod
}), mn = {}, cc[t]), Xat = () => cc, Kat = (t) => {
typeof mn < "u" && (mn.id = t);
}, Zat = (t) => {
typeof mn < "u" && (mn.text = t);
}, Qat = (t) => {
typeof mn < "u" && (mn.risk = t);
}, Jat = (t) => {
typeof mn < "u" && (mn.verifyMethod = t);
}, tst = (t) => (typeof uc[t] > "u" && (uc[t] = {
name: t,
type: Ua.type,
docRef: Ua.docRef
}, H.info("Added new requirement: ", t)), Ua = {}, uc[t]), est = () => uc, rst = (t) => {
typeof Ua < "u" && (Ua.type = t);
}, nst = (t) => {
typeof Ua < "u" && (Ua.docRef = t);
}, ist = (t, e, r) => {
a_.push({
type: t,
src: e,
dst: r
});
}, ast = () => a_, sst = () => {
a_ = [], mn = {}, cc = {}, Ua = {}, uc = {}, gi();
}, ost = {
RequirementType: Uat,
RiskLevel: Wat,
VerifyType: Hat,
Relationships: Gat,
parseDirective: jat,
getConfig: () => nt().req,
addRequirement: $at,
getRequirements: Xat,
setNewReqId: Kat,
setNewReqText: Zat,
setNewReqRisk: Qat,
setNewReqVerifyMethod: Jat,
setAccTitle: Yn,
getAccTitle: yi,
setAccDescription: mi,
getAccDescription: bi,
addElement: tst,
getElements: est,
setNewElementType: rst,
setNewElementDocRef: nst,
addRelationship: ist,
getRelationships: ast,
clear: sst
}, Cb = {
CONTAINS: "contains",
ARROW: "arrow"
}, lst = (t, e) => {
let r = t.append("defs").append("marker").attr("id", Cb.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", e.line_height / 2).attr("markerWidth", e.line_height).attr("markerHeight", e.line_height).attr("orient", "auto").append("g");
r.append("circle").attr("cx", e.line_height / 2).attr("cy", e.line_height / 2).attr("r", e.line_height / 2).attr("fill", "none"), r.append("line").attr("x1", 0).attr("x2", e.line_height).attr("y1", e.line_height / 2).attr("y2", e.line_height / 2).attr("stroke-width", 1), r.append("line").attr("y1", 0).attr("y2", e.line_height).attr("x1", e.line_height / 2).attr("x2", e.line_height / 2).attr("stroke-width", 1), t.append("defs").append("marker").attr("id", Cb.ARROW + "_line_ending").attr("refX", e.line_height).attr("refY", 0.5 * e.line_height).attr("markerWidth", e.line_height).attr("markerHeight", e.line_height).attr("orient", "auto").append("path").attr(
"d",
`M0,0
L${e.line_height},${e.line_height / 2}
M${e.line_height},${e.line_height / 2}
L0,${e.line_height}`
).attr("stroke-width", 1);
}, AL = {
ReqMarkers: Cb,
insertLineEndings: lst
};
let ar = {}, aw = 0;
const ML = (t, e) => t.insert("rect", "#" + e).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", ar.rect_min_width + "px").attr("height", ar.rect_min_height + "px"), LL = (t, e, r) => {
let n = ar.rect_min_width / 2, i = t.append("text").attr("class", "req reqLabel reqTitle").attr("id", e).attr("x", n).attr("y", ar.rect_padding).attr("dominant-baseline", "hanging"), a = 0;
r.forEach((u) => {
a == 0 ? i.append("tspan").attr("text-anchor", "middle").attr("x", ar.rect_min_width / 2).attr("dy", 0).text(u) : i.append("tspan").attr("text-anchor", "middle").attr("x", ar.rect_min_width / 2).attr("dy", ar.line_height * 0.75).text(u), a++;
});
let s = 1.5 * ar.rect_padding, o = a * ar.line_height * 0.75, l = s + o;
return t.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", ar.rect_min_width).attr("y1", l).attr("y2", l), {
titleNode: i,
y: l
};
}, RL = (t, e, r, n) => {
let i = t.append("text").attr("class", "req reqLabel").attr("id", e).attr("x", ar.rect_padding).attr("y", n).attr("dominant-baseline", "hanging"), a = 0;
const s = 30;
let o = [];
return r.forEach((l) => {
let u = l.length;
for (; u > s && a < 3; ) {
let h = l.substring(0, s);
l = l.substring(s, l.length), u = l.length, o[o.length] = h, a++;
}
if (a == 3) {
let h = o[o.length - 1];
o[o.length - 1] = h.substring(0, h.length - 4) + "...";
} else
o[o.length] = l;
a = 0;
}), o.forEach((l) => {
i.append("tspan").attr("x", ar.rect_padding).attr("dy", ar.line_height).text(l);
}), i;
}, cst = (t, e, r, n) => {
const i = e.node().getTotalLength(), a = e.node().getPointAtLength(i * 0.5), s = "rel" + aw;
aw++;
const l = t.append("text").attr("class", "req relationshipLabel").attr("id", s).attr("x", a.x).attr("y", a.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(n).node().getBBox();
t.insert("rect", "#" + s).attr("class", "req reqLabelBox").attr("x", a.x - l.width / 2).attr("y", a.y - l.height / 2).attr("width", l.width).attr("height", l.height).attr("fill", "white").attr("fill-opacity", "85%");
}, ust = function(t, e, r, n, i) {
const a = r.edge(Qo(e.src), Qo(e.dst)), s = ns().x(function(l) {
return l.x;
}).y(function(l) {
return l.y;
}), o = t.insert("path", "#" + n).attr("class", "er relationshipLine").attr("d", s(a.points)).attr("fill", "none");
e.type == i.db.Relationships.CONTAINS ? o.attr(
"marker-start",
"url(" + pe.getUrl(ar.arrowMarkerAbsolute) + "#" + e.type + "_line_ending)"
) : (o.attr("stroke-dasharray", "10,7"), o.attr(
"marker-end",
"url(" + pe.getUrl(ar.arrowMarkerAbsolute) + "#" + AL.ReqMarkers.ARROW + "_line_ending)"
)), cst(t, o, ar, `<<${e.type}>>`);
}, hst = (t, e, r) => {
Object.keys(t).forEach((n) => {
let i = t[n];
n = Qo(n), H.info("Added new requirement: ", n);
const a = r.append("g").attr("id", n), s = "req-" + n, o = ML(a, s);
let l = LL(a, n + "_title", [
`<<${i.type}>>`,
`${i.name}`
]);
RL(
a,
n + "_body",
[
`Id: ${i.id}`,
`Text: ${i.text}`,
`Risk: ${i.risk}`,
`Verification: ${i.verifyMethod}`
],
l.y
);
const u = o.node().getBBox();
e.setNode(n, {
width: u.width,
height: u.height,
shape: "rect",
id: n
});
});
}, fst = (t, e, r) => {
Object.keys(t).forEach((n) => {
let i = t[n];
const a = Qo(n), s = r.append("g").attr("id", a), o = "element-" + a, l = ML(s, o);
let u = LL(s, o + "_title", ["<>", `${n}`]);
RL(
s,
o + "_body",
[`Type: ${i.type || "Not Specified"}`, `Doc Ref: ${i.docRef || "None"}`],
u.y
);
const h = l.node().getBBox();
e.setNode(a, {
width: h.width,
height: h.height,
shape: "rect",
id: a
});
});
}, dst = (t, e) => (t.forEach(function(r) {
let n = Qo(r.src), i = Qo(r.dst);
e.setEdge(n, i, { relationship: r });
}), t), pst = function(t, e) {
e.nodes().forEach(function(r) {
typeof r < "u" && typeof e.node(r) < "u" && (t.select("#" + r), t.select("#" + r).attr(
"transform",
"translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
));
});
}, Qo = (t) => t.replace(/\s/g, "").replace(/\./g, "_"), gst = (t, e, r, n) => {
ar = nt().requirement, n.db.clear(), n.parser.parse(t);
const i = ar.securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const o = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body").select(`[id='${e}']`);
AL.insertLineEndings(o, ar);
const l = new ur.Graph({
multigraph: !1,
compound: !1,
directed: !0
}).setGraph({
rankdir: ar.layoutDirection,
marginx: 20,
marginy: 20,
nodesep: 100,
edgesep: 100,
ranksep: 100
}).setDefaultEdgeLabel(function() {
return {};
});
let u = n.db.getRequirements(), h = n.db.getElements(), d = n.db.getRelationships();
hst(u, l, o), fst(h, l, o), dst(d, l), hu.layout(l), pst(o, l), d.forEach(function(y) {
ust(o, y, l, e, n);
});
const f = ar.rect_padding, p = o.node().getBBox(), m = p.width + f * 2, _ = p.height + f * 2;
pi(o, _, m, ar.useMaxWidth), o.attr("viewBox", `${p.x - f} ${p.y - f} ${m} ${_}`), vn(n.db, o, e);
}, yst = {
draw: gst
};
var Sb = function() {
var t = function(it, Z, V, Q) {
for (V = V || {}, Q = it.length; Q--; V[it[Q]] = Z)
;
return V;
}, e = [1, 2], r = [1, 3], n = [1, 5], i = [1, 7], a = [2, 5], s = [1, 15], o = [1, 17], l = [1, 18], u = [1, 19], h = [1, 21], d = [1, 22], f = [1, 23], p = [1, 29], m = [1, 30], _ = [1, 31], y = [1, 32], b = [1, 33], x = [1, 34], k = [1, 35], T = [1, 36], C = [1, 37], M = [1, 38], S = [1, 39], R = [1, 40], A = [1, 43], L = [1, 44], v = [1, 45], B = [1, 46], w = [1, 47], D = [1, 48], N = [1, 51], z = [1, 4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 50, 51, 52, 53, 58, 59, 60, 61, 69, 79], X = [4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 53, 58, 59, 60, 61, 69, 79], ct = [4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 52, 53, 58, 59, 60, 61, 69, 79], J = [4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 51, 53, 58, 59, 60, 61, 69, 79], Y = [4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 50, 53, 58, 59, 60, 61, 69, 79], $ = [67, 68, 69], lt = [1, 121], ut = [1, 4, 5, 7, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 50, 51, 52, 53, 58, 59, 60, 61, 69, 79], W = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, openDirective: 11, typeDirective: 12, closeDirective: 13, ":": 14, argDirective: 15, participant: 16, actor: 17, AS: 18, restOfLine: 19, participant_actor: 20, signal: 21, autonumber: 22, NUM: 23, off: 24, activate: 25, deactivate: 26, note_statement: 27, links_statement: 28, link_statement: 29, properties_statement: 30, details_statement: 31, title: 32, legacy_title: 33, acc_title: 34, acc_title_value: 35, acc_descr: 36, acc_descr_value: 37, acc_descr_multiline_value: 38, loop: 39, end: 40, rect: 41, opt: 42, alt: 43, else_sections: 44, par: 45, par_sections: 46, critical: 47, option_sections: 48, break: 49, option: 50, and: 51, else: 52, note: 53, placement: 54, text2: 55, over: 56, actor_pair: 57, links: 58, link: 59, properties: 60, details: 61, spaceList: 62, ",": 63, left_of: 64, right_of: 65, signaltype: 66, "+": 67, "-": 68, ACTOR: 69, SOLID_OPEN_ARROW: 70, DOTTED_OPEN_ARROW: 71, SOLID_ARROW: 72, DOTTED_ARROW: 73, SOLID_CROSS: 74, DOTTED_CROSS: 75, SOLID_POINT: 76, DOTTED_POINT: 77, TXT: 78, open_directive: 79, type_directive: 80, arg_directive: 81, close_directive: 82, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 7: "SD", 14: ":", 16: "participant", 18: "AS", 19: "restOfLine", 20: "participant_actor", 22: "autonumber", 23: "NUM", 24: "off", 25: "activate", 26: "deactivate", 32: "title", 33: "legacy_title", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 39: "loop", 40: "end", 41: "rect", 42: "opt", 43: "alt", 45: "par", 47: "critical", 49: "break", 50: "option", 51: "and", 52: "else", 53: "note", 56: "over", 58: "links", 59: "link", 60: "properties", 61: "details", 63: ",", 64: "left_of", 65: "right_of", 67: "+", 68: "-", 69: "ACTOR", 70: "SOLID_OPEN_ARROW", 71: "DOTTED_OPEN_ARROW", 72: "SOLID_ARROW", 73: "DOTTED_ARROW", 74: "SOLID_CROSS", 75: "DOTTED_CROSS", 76: "SOLID_POINT", 77: "DOTTED_POINT", 78: "TXT", 79: "open_directive", 80: "type_directive", 81: "arg_directive", 82: "close_directive" },
productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [6, 4], [6, 6], [10, 5], [10, 3], [10, 5], [10, 3], [10, 2], [10, 4], [10, 3], [10, 3], [10, 2], [10, 3], [10, 3], [10, 2], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 1], [48, 1], [48, 4], [46, 1], [46, 4], [44, 1], [44, 4], [27, 4], [27, 4], [28, 3], [29, 3], [30, 3], [31, 3], [62, 2], [62, 1], [57, 3], [57, 1], [54, 1], [54, 1], [21, 5], [21, 5], [21, 4], [17, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [55, 1], [11, 1], [12, 1], [15, 1], [13, 1]],
performAction: function(Z, V, Q, q, U, F, j) {
var P = F.length - 1;
switch (U) {
case 4:
return q.apply(F[P]), F[P];
case 5:
this.$ = [];
break;
case 6:
F[P - 1].push(F[P]), this.$ = F[P - 1];
break;
case 7:
case 8:
this.$ = F[P];
break;
case 9:
this.$ = [];
break;
case 12:
F[P - 3].type = "addParticipant", F[P - 3].description = q.parseMessage(F[P - 1]), this.$ = F[P - 3];
break;
case 13:
F[P - 1].type = "addParticipant", this.$ = F[P - 1];
break;
case 14:
F[P - 3].type = "addActor", F[P - 3].description = q.parseMessage(F[P - 1]), this.$ = F[P - 3];
break;
case 15:
F[P - 1].type = "addActor", this.$ = F[P - 1];
break;
case 17:
this.$ = { type: "sequenceIndex", sequenceIndex: Number(F[P - 2]), sequenceIndexStep: Number(F[P - 1]), sequenceVisible: !0, signalType: q.LINETYPE.AUTONUMBER };
break;
case 18:
this.$ = { type: "sequenceIndex", sequenceIndex: Number(F[P - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: q.LINETYPE.AUTONUMBER };
break;
case 19:
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: q.LINETYPE.AUTONUMBER };
break;
case 20:
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: q.LINETYPE.AUTONUMBER };
break;
case 21:
this.$ = { type: "activeStart", signalType: q.LINETYPE.ACTIVE_START, actor: F[P - 1] };
break;
case 22:
this.$ = { type: "activeEnd", signalType: q.LINETYPE.ACTIVE_END, actor: F[P - 1] };
break;
case 28:
q.setDiagramTitle(F[P].substring(6)), this.$ = F[P].substring(6);
break;
case 29:
q.setDiagramTitle(F[P].substring(7)), this.$ = F[P].substring(7);
break;
case 30:
this.$ = F[P].trim(), q.setAccTitle(this.$);
break;
case 31:
case 32:
this.$ = F[P].trim(), q.setAccDescription(this.$);
break;
case 33:
F[P - 1].unshift({ type: "loopStart", loopText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.LOOP_START }), F[P - 1].push({ type: "loopEnd", loopText: F[P - 2], signalType: q.LINETYPE.LOOP_END }), this.$ = F[P - 1];
break;
case 34:
F[P - 1].unshift({ type: "rectStart", color: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.RECT_START }), F[P - 1].push({ type: "rectEnd", color: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.RECT_END }), this.$ = F[P - 1];
break;
case 35:
F[P - 1].unshift({ type: "optStart", optText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.OPT_START }), F[P - 1].push({ type: "optEnd", optText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.OPT_END }), this.$ = F[P - 1];
break;
case 36:
F[P - 1].unshift({ type: "altStart", altText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.ALT_START }), F[P - 1].push({ type: "altEnd", signalType: q.LINETYPE.ALT_END }), this.$ = F[P - 1];
break;
case 37:
F[P - 1].unshift({ type: "parStart", parText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.PAR_START }), F[P - 1].push({ type: "parEnd", signalType: q.LINETYPE.PAR_END }), this.$ = F[P - 1];
break;
case 38:
F[P - 1].unshift({ type: "criticalStart", criticalText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.CRITICAL_START }), F[P - 1].push({ type: "criticalEnd", signalType: q.LINETYPE.CRITICAL_END }), this.$ = F[P - 1];
break;
case 39:
F[P - 1].unshift({ type: "breakStart", breakText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.BREAK_START }), F[P - 1].push({ type: "breakEnd", optText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.BREAK_END }), this.$ = F[P - 1];
break;
case 42:
this.$ = F[P - 3].concat([{ type: "option", optionText: q.parseMessage(F[P - 1]), signalType: q.LINETYPE.CRITICAL_OPTION }, F[P]]);
break;
case 44:
this.$ = F[P - 3].concat([{ type: "and", parText: q.parseMessage(F[P - 1]), signalType: q.LINETYPE.PAR_AND }, F[P]]);
break;
case 46:
this.$ = F[P - 3].concat([{ type: "else", altText: q.parseMessage(F[P - 1]), signalType: q.LINETYPE.ALT_ELSE }, F[P]]);
break;
case 47:
this.$ = [F[P - 1], { type: "addNote", placement: F[P - 2], actor: F[P - 1].actor, text: F[P] }];
break;
case 48:
F[P - 2] = [].concat(F[P - 1], F[P - 1]).slice(0, 2), F[P - 2][0] = F[P - 2][0].actor, F[P - 2][1] = F[P - 2][1].actor, this.$ = [F[P - 1], { type: "addNote", placement: q.PLACEMENT.OVER, actor: F[P - 2].slice(0, 2), text: F[P] }];
break;
case 49:
this.$ = [F[P - 1], { type: "addLinks", actor: F[P - 1].actor, text: F[P] }];
break;
case 50:
this.$ = [F[P - 1], { type: "addALink", actor: F[P - 1].actor, text: F[P] }];
break;
case 51:
this.$ = [F[P - 1], { type: "addProperties", actor: F[P - 1].actor, text: F[P] }];
break;
case 52:
this.$ = [F[P - 1], { type: "addDetails", actor: F[P - 1].actor, text: F[P] }];
break;
case 55:
this.$ = [F[P - 2], F[P]];
break;
case 56:
this.$ = F[P];
break;
case 57:
this.$ = q.PLACEMENT.LEFTOF;
break;
case 58:
this.$ = q.PLACEMENT.RIGHTOF;
break;
case 59:
this.$ = [
F[P - 4],
F[P - 1],
{ type: "addMessage", from: F[P - 4].actor, to: F[P - 1].actor, signalType: F[P - 3], msg: F[P] },
{ type: "activeStart", signalType: q.LINETYPE.ACTIVE_START, actor: F[P - 1] }
];
break;
case 60:
this.$ = [
F[P - 4],
F[P - 1],
{ type: "addMessage", from: F[P - 4].actor, to: F[P - 1].actor, signalType: F[P - 3], msg: F[P] },
{ type: "activeEnd", signalType: q.LINETYPE.ACTIVE_END, actor: F[P - 4] }
];
break;
case 61:
this.$ = [F[P - 3], F[P - 1], { type: "addMessage", from: F[P - 3].actor, to: F[P - 1].actor, signalType: F[P - 2], msg: F[P] }];
break;
case 62:
this.$ = { type: "addParticipant", actor: F[P] };
break;
case 63:
this.$ = q.LINETYPE.SOLID_OPEN;
break;
case 64:
this.$ = q.LINETYPE.DOTTED_OPEN;
break;
case 65:
this.$ = q.LINETYPE.SOLID;
break;
case 66:
this.$ = q.LINETYPE.DOTTED;
break;
case 67:
this.$ = q.LINETYPE.SOLID_CROSS;
break;
case 68:
this.$ = q.LINETYPE.DOTTED_CROSS;
break;
case 69:
this.$ = q.LINETYPE.SOLID_POINT;
break;
case 70:
this.$ = q.LINETYPE.DOTTED_POINT;
break;
case 71:
this.$ = q.parseMessage(F[P].trim().substring(1));
break;
case 72:
q.parseDirective("%%{", "open_directive");
break;
case 73:
q.parseDirective(F[P], "type_directive");
break;
case 74:
F[P] = F[P].trim().replace(/'/g, '"'), q.parseDirective(F[P], "arg_directive");
break;
case 75:
q.parseDirective("}%%", "close_directive", "sequence");
break;
}
},
table: [{ 3: 1, 4: e, 5: r, 6: 4, 7: n, 11: 6, 79: i }, { 1: [3] }, { 3: 8, 4: e, 5: r, 6: 4, 7: n, 11: 6, 79: i }, { 3: 9, 4: e, 5: r, 6: 4, 7: n, 11: 6, 79: i }, { 3: 10, 4: e, 5: r, 6: 4, 7: n, 11: 6, 79: i }, t([1, 4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 41, 42, 43, 45, 47, 49, 53, 58, 59, 60, 61, 69, 79], a, { 8: 11 }), { 12: 12, 80: [1, 13] }, { 80: [2, 72] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 13: 49, 14: [1, 50], 82: N }, t([14, 82], [2, 73]), t(z, [2, 6]), { 6: 41, 10: 52, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, t(z, [2, 8]), t(z, [2, 9]), { 17: 53, 69: D }, { 17: 54, 69: D }, { 5: [1, 55] }, { 5: [1, 58], 23: [1, 56], 24: [1, 57] }, { 17: 59, 69: D }, { 17: 60, 69: D }, { 5: [1, 61] }, { 5: [1, 62] }, { 5: [1, 63] }, { 5: [1, 64] }, { 5: [1, 65] }, t(z, [2, 28]), t(z, [2, 29]), { 35: [1, 66] }, { 37: [1, 67] }, t(z, [2, 32]), { 19: [1, 68] }, { 19: [1, 69] }, { 19: [1, 70] }, { 19: [1, 71] }, { 19: [1, 72] }, { 19: [1, 73] }, { 19: [1, 74] }, t(z, [2, 40]), { 66: 75, 70: [1, 76], 71: [1, 77], 72: [1, 78], 73: [1, 79], 74: [1, 80], 75: [1, 81], 76: [1, 82], 77: [1, 83] }, { 54: 84, 56: [1, 85], 64: [1, 86], 65: [1, 87] }, { 17: 88, 69: D }, { 17: 89, 69: D }, { 17: 90, 69: D }, { 17: 91, 69: D }, t([5, 18, 63, 70, 71, 72, 73, 74, 75, 76, 77, 78], [2, 62]), { 5: [1, 92] }, { 15: 93, 81: [1, 94] }, { 5: [2, 75] }, t(z, [2, 7]), { 5: [1, 96], 18: [1, 95] }, { 5: [1, 98], 18: [1, 97] }, t(z, [2, 16]), { 5: [1, 100], 23: [1, 99] }, { 5: [1, 101] }, t(z, [2, 20]), { 5: [1, 102] }, { 5: [1, 103] }, t(z, [2, 23]), t(z, [2, 24]), t(z, [2, 25]), t(z, [2, 26]), t(z, [2, 27]), t(z, [2, 30]), t(z, [2, 31]), t(X, a, { 8: 104 }), t(X, a, { 8: 105 }), t(X, a, { 8: 106 }), t(ct, a, { 44: 107, 8: 108 }), t(J, a, { 46: 109, 8: 110 }), t(Y, a, { 48: 111, 8: 112 }), t(X, a, { 8: 113 }), { 17: 116, 67: [1, 114], 68: [1, 115], 69: D }, t($, [2, 63]), t($, [2, 64]), t($, [2, 65]), t($, [2, 66]), t($, [2, 67]), t($, [2, 68]), t($, [2, 69]), t($, [2, 70]), { 17: 117, 69: D }, { 17: 119, 57: 118, 69: D }, { 69: [2, 57] }, { 69: [2, 58] }, { 55: 120, 78: lt }, { 55: 122, 78: lt }, { 55: 123, 78: lt }, { 55: 124, 78: lt }, t(ut, [2, 10]), { 13: 125, 82: N }, { 82: [2, 74] }, { 19: [1, 126] }, t(z, [2, 13]), { 19: [1, 127] }, t(z, [2, 15]), { 5: [1, 128] }, t(z, [2, 18]), t(z, [2, 19]), t(z, [2, 21]), t(z, [2, 22]), { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [1, 129], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [1, 130], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [1, 131], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 40: [1, 132] }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [2, 45], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 52: [1, 133], 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 40: [1, 134] }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [2, 43], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 51: [1, 135], 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 40: [1, 136] }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [2, 41], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 50: [1, 137], 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [1, 138], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 17: 139, 69: D }, { 17: 140, 69: D }, { 55: 141, 78: lt }, { 55: 142, 78: lt }, { 55: 143, 78: lt }, { 63: [1, 144], 78: [2, 56] }, { 5: [2, 49] }, { 5: [2, 71] }, { 5: [2, 50] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 145] }, { 5: [1, 146] }, { 5: [1, 147] }, t(z, [2, 17]), t(z, [2, 33]), t(z, [2, 34]), t(z, [2, 35]), t(z, [2, 36]), { 19: [1, 148] }, t(z, [2, 37]), { 19: [1, 149] }, t(z, [2, 38]), { 19: [1, 150] }, t(z, [2, 39]), { 55: 151, 78: lt }, { 55: 152, 78: lt }, { 5: [2, 61] }, { 5: [2, 47] }, { 5: [2, 48] }, { 17: 153, 69: D }, t(ut, [2, 11]), t(z, [2, 12]), t(z, [2, 14]), t(ct, a, { 8: 108, 44: 154 }), t(J, a, { 8: 110, 46: 155 }), t(Y, a, { 8: 112, 48: 156 }), { 5: [2, 59] }, { 5: [2, 60] }, { 78: [2, 55] }, { 40: [2, 46] }, { 40: [2, 44] }, { 40: [2, 42] }],
defaultActions: { 7: [2, 72], 8: [2, 1], 9: [2, 2], 10: [2, 3], 51: [2, 75], 86: [2, 57], 87: [2, 58], 94: [2, 74], 120: [2, 49], 121: [2, 71], 122: [2, 50], 123: [2, 51], 124: [2, 52], 141: [2, 61], 142: [2, 47], 143: [2, 48], 151: [2, 59], 152: [2, 60], 153: [2, 55], 154: [2, 46], 155: [2, 44], 156: [2, 42] },
parseError: function(Z, V) {
if (V.recoverable)
this.trace(Z);
else {
var Q = new Error(Z);
throw Q.hash = V, Q;
}
},
parse: function(Z) {
var V = this, Q = [0], q = [], U = [null], F = [], j = this.table, P = "", et = 0, at = 0, It = 2, Lt = 1, Rt = F.slice.call(arguments, 1), Ct = Object.create(this.lexer), pt = { yy: {} };
for (var mt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, mt) && (pt.yy[mt] = this.yy[mt]);
Ct.setInput(Z, pt.yy), pt.yy.lexer = Ct, pt.yy.parser = this, typeof Ct.yylloc > "u" && (Ct.yylloc = {});
var _t = Ct.yylloc;
F.push(_t);
var Tt = Ct.options && Ct.options.ranges;
typeof pt.yy.parseError == "function" ? this.parseError = pt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function ft() {
var bt;
return bt = q.pop() || Ct.lex() || Lt, typeof bt != "number" && (bt instanceof Array && (q = bt, bt = q.pop()), bt = V.symbols_[bt] || bt), bt;
}
for (var le, Dt, Ht, $t, Qt = {}, we, Gt, Ft, zt; ; ) {
if (Dt = Q[Q.length - 1], this.defaultActions[Dt] ? Ht = this.defaultActions[Dt] : ((le === null || typeof le > "u") && (le = ft()), Ht = j[Dt] && j[Dt][le]), typeof Ht > "u" || !Ht.length || !Ht[0]) {
var wt = "";
zt = [];
for (we in j[Dt])
this.terminals_[we] && we > It && zt.push("'" + this.terminals_[we] + "'");
Ct.showPosition ? wt = "Parse error on line " + (et + 1) + `:
` + Ct.showPosition() + `
Expecting ` + zt.join(", ") + ", got '" + (this.terminals_[le] || le) + "'" : wt = "Parse error on line " + (et + 1) + ": Unexpected " + (le == Lt ? "end of input" : "'" + (this.terminals_[le] || le) + "'"), this.parseError(wt, {
text: Ct.match,
token: this.terminals_[le] || le,
line: Ct.yylineno,
loc: _t,
expected: zt
});
}
if (Ht[0] instanceof Array && Ht.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Dt + ", token: " + le);
switch (Ht[0]) {
case 1:
Q.push(le), U.push(Ct.yytext), F.push(Ct.yylloc), Q.push(Ht[1]), le = null, at = Ct.yyleng, P = Ct.yytext, et = Ct.yylineno, _t = Ct.yylloc;
break;
case 2:
if (Gt = this.productions_[Ht[1]][1], Qt.$ = U[U.length - Gt], Qt._$ = {
first_line: F[F.length - (Gt || 1)].first_line,
last_line: F[F.length - 1].last_line,
first_column: F[F.length - (Gt || 1)].first_column,
last_column: F[F.length - 1].last_column
}, Tt && (Qt._$.range = [
F[F.length - (Gt || 1)].range[0],
F[F.length - 1].range[1]
]), $t = this.performAction.apply(Qt, [
P,
at,
et,
pt.yy,
Ht[1],
U,
F
].concat(Rt)), typeof $t < "u")
return $t;
Gt && (Q = Q.slice(0, -1 * Gt * 2), U = U.slice(0, -1 * Gt), F = F.slice(0, -1 * Gt)), Q.push(this.productions_[Ht[1]][0]), U.push(Qt.$), F.push(Qt._$), Ft = j[Q[Q.length - 2]][Q[Q.length - 1]], Q.push(Ft);
break;
case 3:
return !0;
}
}
return !0;
}
}, tt = function() {
var it = {
EOF: 1,
parseError: function(V, Q) {
if (this.yy.parser)
this.yy.parser.parseError(V, Q);
else
throw new Error(V);
},
setInput: function(Z, V) {
return this.yy = V || this.yy || {}, this._input = Z, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var Z = this._input[0];
this.yytext += Z, this.yyleng++, this.offset++, this.match += Z, this.matched += Z;
var V = Z.match(/(?:\r\n?|\n).*/g);
return V ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Z;
},
unput: function(Z) {
var V = Z.length, Q = Z.split(/(?:\r\n?|\n)/g);
this._input = Z + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - V), this.offset -= V;
var q = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), Q.length - 1 && (this.yylineno -= Q.length - 1);
var U = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: Q ? (Q.length === q.length ? this.yylloc.first_column : 0) + q[q.length - Q.length].length - Q[0].length : this.yylloc.first_column - V
}, this.options.ranges && (this.yylloc.range = [U[0], U[0] + this.yyleng - V]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(Z) {
this.unput(this.match.slice(Z));
},
pastInput: function() {
var Z = this.matched.substr(0, this.matched.length - this.match.length);
return (Z.length > 20 ? "..." : "") + Z.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var Z = this.match;
return Z.length < 20 && (Z += this._input.substr(0, 20 - Z.length)), (Z.substr(0, 20) + (Z.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var Z = this.pastInput(), V = new Array(Z.length + 1).join("-");
return Z + this.upcomingInput() + `
` + V + "^";
},
test_match: function(Z, V) {
var Q, q, U;
if (this.options.backtrack_lexer && (U = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (U.yylloc.range = this.yylloc.range.slice(0))), q = Z[0].match(/(?:\r\n?|\n).*/g), q && (this.yylineno += q.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: q ? q[q.length - 1].length - q[q.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Z[0].length
}, this.yytext += Z[0], this.match += Z[0], this.matches = Z, 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(Z[0].length), this.matched += Z[0], Q = this.performAction.call(this, this.yy, this, V, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), Q)
return Q;
if (this._backtrack) {
for (var F in U)
this[F] = U[F];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var Z, V, Q, q;
this._more || (this.yytext = "", this.match = "");
for (var U = this._currentRules(), F = 0; F < U.length; F++)
if (Q = this._input.match(this.rules[U[F]]), Q && (!V || Q[0].length > V[0].length)) {
if (V = Q, q = F, this.options.backtrack_lexer) {
if (Z = this.test_match(Q, U[F]), Z !== !1)
return Z;
if (this._backtrack) {
V = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return V ? (Z = this.test_match(V, U[q]), Z !== !1 ? Z : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var V = this.next();
return V || this.lex();
},
begin: function(V) {
this.conditionStack.push(V);
},
popState: function() {
var V = this.conditionStack.length - 1;
return V > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(V) {
return V = this.conditionStack.length - 1 - Math.abs(V || 0), V >= 0 ? this.conditionStack[V] : "INITIAL";
},
pushState: function(V) {
this.begin(V);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(V, Q, q, U) {
switch (q) {
case 0:
return this.begin("open_directive"), 79;
case 1:
return this.begin("type_directive"), 80;
case 2:
return this.popState(), this.begin("arg_directive"), 14;
case 3:
return this.popState(), this.popState(), 82;
case 4:
return 81;
case 5:
return 5;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
case 11:
return 23;
case 12:
return this.begin("ID"), 16;
case 13:
return this.begin("ID"), 20;
case 14:
return Q.yytext = Q.yytext.trim(), this.begin("ALIAS"), 69;
case 15:
return this.popState(), this.popState(), this.begin("LINE"), 18;
case 16:
return this.popState(), this.popState(), 5;
case 17:
return this.begin("LINE"), 39;
case 18:
return this.begin("LINE"), 41;
case 19:
return this.begin("LINE"), 42;
case 20:
return this.begin("LINE"), 43;
case 21:
return this.begin("LINE"), 52;
case 22:
return this.begin("LINE"), 45;
case 23:
return this.begin("LINE"), 51;
case 24:
return this.begin("LINE"), 47;
case 25:
return this.begin("LINE"), 50;
case 26:
return this.begin("LINE"), 49;
case 27:
return this.popState(), 19;
case 28:
return 40;
case 29:
return 64;
case 30:
return 65;
case 31:
return 58;
case 32:
return 59;
case 33:
return 60;
case 34:
return 61;
case 35:
return 56;
case 36:
return 53;
case 37:
return this.begin("ID"), 25;
case 38:
return this.begin("ID"), 26;
case 39:
return 32;
case 40:
return 33;
case 41:
return this.begin("acc_title"), 34;
case 42:
return this.popState(), "acc_title_value";
case 43:
return this.begin("acc_descr"), 36;
case 44:
return this.popState(), "acc_descr_value";
case 45:
this.begin("acc_descr_multiline");
break;
case 46:
this.popState();
break;
case 47:
return "acc_descr_multiline_value";
case 48:
return 7;
case 49:
return 22;
case 50:
return 24;
case 51:
return 63;
case 52:
return 5;
case 53:
return Q.yytext = Q.yytext.trim(), 69;
case 54:
return 72;
case 55:
return 73;
case 56:
return 70;
case 57:
return 71;
case 58:
return 74;
case 59:
return 75;
case 60:
return 76;
case 61:
return 77;
case 62:
return 78;
case 63:
return 67;
case 64:
return 68;
case 65:
return 5;
case 66:
return "INVALID";
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { acc_descr_multiline: { rules: [46, 47], inclusive: !1 }, acc_descr: { rules: [44], inclusive: !1 }, acc_title: { rules: [42], inclusive: !1 }, open_directive: { rules: [1, 8], inclusive: !1 }, type_directive: { rules: [2, 3, 8], inclusive: !1 }, arg_directive: { rules: [3, 4, 8], inclusive: !1 }, ID: { rules: [7, 8, 14], inclusive: !1 }, ALIAS: { rules: [7, 8, 15, 16], inclusive: !1 }, LINE: { rules: [7, 8, 27], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 8, 9, 10, 11, 12, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66], inclusive: !0 } }
};
return it;
}();
W.lexer = tt;
function K() {
this.yy = {};
}
return K.prototype = W, W.Parser = K, new K();
}();
Sb.parser = Sb;
const mst = (t) => t.match(/^\s*sequenceDiagram/) !== null;
let Dl, Pa = {}, Jn = [], T0 = !1, Ab;
const bst = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, Mb = function(t, e, r, n) {
const i = Pa[t];
i && e === i.name && r == null || ((r == null || r.text == null) && (r = { text: e, wrap: null, type: n }), (n == null || r.text == null) && (r = { text: e, wrap: null, type: n }), Pa[t] = {
name: e,
description: r.text,
wrap: r.wrap === void 0 && Jo() || !!r.wrap,
prevActor: Dl,
links: {},
properties: {},
actorCnt: null,
rectData: null,
type: n || "participant"
}, Dl && Pa[Dl] && (Pa[Dl].nextActor = t), Dl = t);
}, _st = (t) => {
let e, r = 0;
for (e = 0; e < Jn.length; e++)
Jn[e].type === Wc.ACTIVE_START && Jn[e].from.actor === t && r++, Jn[e].type === Wc.ACTIVE_END && Jn[e].from.actor === t && r--;
return r;
}, vst = function(t, e, r, n) {
Jn.push({
from: t,
to: e,
message: r.text,
wrap: r.wrap === void 0 && Jo() || !!r.wrap,
answer: n
});
}, lr = function(t, e, r = { text: void 0, wrap: void 0 }, n) {
if (n === Wc.ACTIVE_END && _st(t.actor) < 1) {
let a = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
throw a.hash = {
text: "->>-",
token: "->>-",
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["'ACTIVE_PARTICIPANT'"]
}, a;
}
return Jn.push({
from: t,
to: e,
message: r.text,
wrap: r.wrap === void 0 && Jo() || !!r.wrap,
type: n
}), !0;
}, xst = function() {
return Jn;
}, kst = function() {
return Pa;
}, yu = function(t) {
return Pa[t];
}, wst = function() {
return Object.keys(Pa);
}, Tst = function() {
T0 = !0;
}, Est = function() {
T0 = !1;
}, Cst = () => T0, Sst = function(t) {
Ab = t;
}, Jo = () => typeof Ab < "u" ? Ab : nt().sequence.wrap, Ast = function() {
Pa = {}, Jn = [], T0 = !1, gi();
}, Mst = function(t) {
const e = t.trim(), r = {
text: e.replace(/^[:]?(?:no)?wrap:/, "").trim(),
wrap: e.match(/^[:]?wrap:/) !== null ? !0 : e.match(/^[:]?nowrap:/) !== null ? !1 : void 0
};
return H.debug("parseMessage:", r), r;
}, Wc = {
SOLID: 0,
DOTTED: 1,
NOTE: 2,
SOLID_CROSS: 3,
DOTTED_CROSS: 4,
SOLID_OPEN: 5,
DOTTED_OPEN: 6,
LOOP_START: 10,
LOOP_END: 11,
ALT_START: 12,
ALT_ELSE: 13,
ALT_END: 14,
OPT_START: 15,
OPT_END: 16,
ACTIVE_START: 17,
ACTIVE_END: 18,
PAR_START: 19,
PAR_AND: 20,
PAR_END: 21,
RECT_START: 22,
RECT_END: 23,
SOLID_POINT: 24,
DOTTED_POINT: 25,
AUTONUMBER: 26,
CRITICAL_START: 27,
CRITICAL_OPTION: 28,
CRITICAL_END: 29,
BREAK_START: 30,
BREAK_END: 31
}, Lst = {
FILLED: 0,
OPEN: 1
}, Rst = {
LEFTOF: 0,
RIGHTOF: 1,
OVER: 2
}, IL = function(t, e, r) {
r.text, r.wrap === void 0 && Jo() || r.wrap;
const n = [].concat(t, t);
Jn.push({
from: n[0],
to: n[1],
message: r.text,
wrap: r.wrap === void 0 && Jo() || !!r.wrap,
type: Wc.NOTE,
placement: e
});
}, NL = function(t, e) {
const r = yu(t);
try {
let n = ci(e.text, nt());
n = n.replace(/&/g, "&"), n = n.replace(/=/g, "=");
const i = JSON.parse(n);
s_(r, i);
} catch (n) {
H.error("error while parsing actor link text", n);
}
}, Ist = function(t, e) {
const r = yu(t);
try {
const s = {};
let o = ci(e.text, nt());
var n = o.indexOf("@");
o = o.replace(/&/g, "&"), o = o.replace(/=/g, "=");
var i = o.slice(0, n - 1).trim(), a = o.slice(n + 1).trim();
s[i] = a, s_(r, s);
} catch (s) {
H.error("error while parsing actor link text", s);
}
};
function s_(t, e) {
if (t.links == null)
t.links = e;
else
for (let r in e)
t.links[r] = e[r];
}
const BL = function(t, e) {
const r = yu(t);
try {
let n = ci(e.text, nt());
const i = JSON.parse(n);
DL(r, i);
} catch (n) {
H.error("error while parsing actor properties text", n);
}
};
function DL(t, e) {
if (t.properties == null)
t.properties = e;
else
for (let r in e)
t.properties[r] = e[r];
}
const OL = function(t, e) {
const r = yu(t), n = document.getElementById(e.text);
try {
const i = n.innerHTML, a = JSON.parse(i);
a.properties && DL(r, a.properties), a.links && s_(r, a.links);
} catch (i) {
H.error("error while parsing actor details text", i);
}
}, Nst = function(t, e) {
if (typeof t < "u" && typeof t.properties < "u")
return t.properties[e];
}, FL = function(t) {
if (t instanceof Array)
t.forEach(function(e) {
FL(e);
});
else
switch (t.type) {
case "sequenceIndex":
Jn.push({
from: void 0,
to: void 0,
message: {
start: t.sequenceIndex,
step: t.sequenceIndexStep,
visible: t.sequenceVisible
},
wrap: !1,
type: t.signalType
});
break;
case "addParticipant":
Mb(t.actor, t.actor, t.description, "participant");
break;
case "addActor":
Mb(t.actor, t.actor, t.description, "actor");
break;
case "activeStart":
lr(t.actor, void 0, void 0, t.signalType);
break;
case "activeEnd":
lr(t.actor, void 0, void 0, t.signalType);
break;
case "addNote":
IL(t.actor, t.placement, t.text);
break;
case "addLinks":
NL(t.actor, t.text);
break;
case "addALink":
Ist(t.actor, t.text);
break;
case "addProperties":
BL(t.actor, t.text);
break;
case "addDetails":
OL(t.actor, t.text);
break;
case "addMessage":
lr(t.from, t.to, t.msg, t.signalType);
break;
case "loopStart":
lr(void 0, void 0, t.loopText, t.signalType);
break;
case "loopEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "rectStart":
lr(void 0, void 0, t.color, t.signalType);
break;
case "rectEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "optStart":
lr(void 0, void 0, t.optText, t.signalType);
break;
case "optEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "altStart":
lr(void 0, void 0, t.altText, t.signalType);
break;
case "else":
lr(void 0, void 0, t.altText, t.signalType);
break;
case "altEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "setAccTitle":
Yn(t.text);
break;
case "parStart":
lr(void 0, void 0, t.parText, t.signalType);
break;
case "and":
lr(void 0, void 0, t.parText, t.signalType);
break;
case "parEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "criticalStart":
lr(void 0, void 0, t.criticalText, t.signalType);
break;
case "option":
lr(void 0, void 0, t.optionText, t.signalType);
break;
case "criticalEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "breakStart":
lr(void 0, void 0, t.breakText, t.signalType);
break;
case "breakEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
}
}, sw = {
addActor: Mb,
addMessage: vst,
addSignal: lr,
addLinks: NL,
addDetails: OL,
addProperties: BL,
autoWrap: Jo,
setWrap: Sst,
enableSequenceNumbers: Tst,
disableSequenceNumbers: Est,
showSequenceNumbers: Cst,
getMessages: xst,
getActors: kst,
getActor: yu,
getActorKeys: wst,
getActorProperty: Nst,
getAccTitle: yi,
getDiagramTitle: s0,
setDiagramTitle: a0,
parseDirective: bst,
getConfig: () => nt().sequence,
clear: Ast,
parseMessage: Mst,
LINETYPE: Wc,
ARROWTYPE: Lst,
PLACEMENT: Rst,
addNote: IL,
setAccTitle: Yn,
apply: FL,
setAccDescription: mi,
getAccDescription: bi
};
let Lb = [];
const Bst = (t) => {
Lb.push(t);
}, PL = () => {
Lb.forEach((t) => {
t();
}), Lb = [];
}, E0 = function(t, e) {
const r = t.append("rect");
return r.attr("x", e.x), r.attr("y", e.y), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("width", e.width), r.attr("height", e.height), r.attr("rx", e.rx), r.attr("ry", e.ry), typeof e.class < "u" && r.attr("class", e.class), r;
}, qL = (t, e) => {
Bst(() => {
const r = document.querySelectorAll(t);
r.length !== 0 && (r[0].addEventListener("mouseover", function() {
Pst("actor" + e + "_popup");
}), r[0].addEventListener("mouseout", function() {
qst("actor" + e + "_popup");
}));
});
}, Dst = function(t, e, r, n, i) {
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
return { height: 0, width: 0 };
const a = e.links, s = e.actorCnt, o = e.rectData;
var l = "none";
i && (l = "block !important");
const u = t.append("g");
u.attr("id", "actor" + s + "_popup"), u.attr("class", "actorPopupMenu"), u.attr("display", l), qL("#actor" + s + "_popup", s);
var h = "";
typeof o.class < "u" && (h = " " + o.class);
let d = o.width > r ? o.width : r;
const f = u.append("rect");
if (f.attr("class", "actorPopupMenuPanel" + h), f.attr("x", o.x), f.attr("y", o.height), f.attr("fill", o.fill), f.attr("stroke", o.stroke), f.attr("width", d), f.attr("height", o.height), f.attr("rx", o.rx), f.attr("ry", o.ry), a != null) {
var p = 20;
for (let y in a) {
var m = u.append("a"), _ = Vi(a[y]);
m.attr("xlink:href", _), m.attr("target", "_blank"), tot(n)(
y,
m,
o.x + 10,
o.height + p,
d,
20,
{ class: "actor" },
n
), p += 30;
}
}
return f.attr("height", p), { height: o.height + p, width: d };
}, VL = function(t, e, r, n) {
const i = t.append("image");
i.attr("x", e), i.attr("y", r);
var a = Vi(n);
i.attr("xlink:href", a);
}, zL = function(t, e, r, n) {
const i = t.append("use");
i.attr("x", e), i.attr("y", r);
var a = Vi(n);
i.attr("xlink:href", "#" + a);
}, Ost = function(t) {
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'block'; }";
}, Fst = function(t) {
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'none'; }";
}, Pst = function(t) {
var e = document.getElementById(t);
e != null && (e.style.display = "block");
}, qst = function(t) {
var e = document.getElementById(t);
e != null && (e.style.display = "none");
}, tl = function(t, e) {
let r = 0, n = 0;
const i = e.text.split(pe.lineBreakRegex);
let a = [], s = 0, o = () => e.y;
if (typeof e.valign < "u" && typeof e.textMargin < "u" && e.textMargin > 0)
switch (e.valign) {
case "top":
case "start":
o = () => Math.round(e.y + e.textMargin);
break;
case "middle":
case "center":
o = () => Math.round(e.y + (r + n + e.textMargin) / 2);
break;
case "bottom":
case "end":
o = () => Math.round(
e.y + (r + n + 2 * e.textMargin) - e.textMargin
);
break;
}
if (typeof e.anchor < "u" && typeof e.textMargin < "u" && typeof e.width < "u")
switch (e.anchor) {
case "left":
case "start":
e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
break;
case "middle":
case "center":
e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
break;
case "right":
case "end":
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
break;
}
for (let l = 0; l < i.length; l++) {
let u = i[l];
typeof e.textMargin < "u" && e.textMargin === 0 && typeof e.fontSize < "u" && (s = l * e.fontSize);
const h = t.append("text");
if (h.attr("x", e.x), h.attr("y", o()), typeof e.anchor < "u" && h.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), typeof e.fontFamily < "u" && h.style("font-family", e.fontFamily), typeof e.fontSize < "u" && h.style("font-size", e.fontSize), typeof e.fontWeight < "u" && h.style("font-weight", e.fontWeight), typeof e.fill < "u" && h.attr("fill", e.fill), typeof e.class < "u" && h.attr("class", e.class), typeof e.dy < "u" ? h.attr("dy", e.dy) : s !== 0 && h.attr("dy", s), e.tspan) {
const d = h.append("tspan");
d.attr("x", e.x), typeof e.fill < "u" && d.attr("fill", e.fill), d.text(u);
} else
h.text(u);
typeof e.valign < "u" && typeof e.textMargin < "u" && e.textMargin > 0 && (n += (h._groups || h)[0][0].getBBox().height, r = n), a.push(h);
}
return a;
}, YL = function(t, e) {
function r(i, a, s, o, l) {
return i + "," + a + " " + (i + s) + "," + a + " " + (i + s) + "," + (a + o - l) + " " + (i + s - l * 1.2) + "," + (a + o) + " " + i + "," + (a + o);
}
const n = t.append("polygon");
return n.attr("points", r(e.x, e.y, e.width, e.height, 7)), n.attr("class", "labelBox"), e.y = e.y + e.height / 2, tl(t, e), n;
};
let Ei = -1;
const UL = (t, e) => {
!t.selectAll || t.selectAll(".actor-line").attr("class", "200").attr("y2", e - 55);
}, Vst = function(t, e, r) {
const n = e.x + e.width / 2, i = t.append("g");
var a = i;
e.y === 0 && (Ei++, a.append("line").attr("id", "actor" + Ei).attr("x1", n).attr("y1", 5).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"), a = i.append("g"), e.actorCnt = Ei, e.links != null && (a.attr("id", "root-" + Ei), qL("#root-" + Ei, Ei)));
const s = C0();
var o = "actor";
e.properties != null && e.properties.class ? o = e.properties.class : s.fill = "#eaeaea", s.x = e.x, s.y = e.y, s.width = e.width, s.height = e.height, s.class = o, s.rx = 3, s.ry = 3;
const l = E0(a, s);
if (e.rectData = s, e.properties != null && e.properties.icon) {
const h = e.properties.icon.trim();
h.charAt(0) === "@" ? zL(a, s.x + s.width - 20, s.y + 10, h.substr(1)) : VL(a, s.x + s.width - 20, s.y + 10, h);
}
WL(r)(
e.description,
a,
s.x,
s.y,
s.width,
s.height,
{ class: "actor" },
r
);
let u = e.height;
if (l.node) {
const h = l.node().getBBox();
e.height = h.height, u = h.height;
}
return u;
}, zst = function(t, e, r) {
const n = e.x + e.width / 2;
e.y === 0 && (Ei++, t.append("line").attr("id", "actor" + Ei).attr("x1", n).attr("y1", 80).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"));
const i = t.append("g");
i.attr("class", "actor-man");
const a = C0();
a.x = e.x, a.y = e.y, a.fill = "#eaeaea", a.width = e.width, a.height = e.height, a.class = "actor", a.rx = 3, a.ry = 3, i.append("line").attr("id", "actor-man-torso" + Ei).attr("x1", n).attr("y1", e.y + 25).attr("x2", n).attr("y2", e.y + 45), i.append("line").attr("id", "actor-man-arms" + Ei).attr("x1", n - 18).attr("y1", e.y + 33).attr("x2", n + 18).attr("y2", e.y + 33), i.append("line").attr("x1", n - 18).attr("y1", e.y + 60).attr("x2", n).attr("y2", e.y + 45), i.append("line").attr("x1", n).attr("y1", e.y + 45).attr("x2", n + 16).attr("y2", e.y + 60);
const s = i.append("circle");
s.attr("cx", e.x + e.width / 2), s.attr("cy", e.y + 10), s.attr("r", 15), s.attr("width", e.width), s.attr("height", e.height);
const o = i.node().getBBox();
return e.height = o.height, WL(r)(
e.description,
i,
a.x,
a.y + 35,
a.width,
a.height,
{ class: "actor" },
r
), e.height;
}, Yst = function(t, e, r) {
switch (e.type) {
case "actor":
return zst(t, e, r);
case "participant":
return Vst(t, e, r);
}
}, Ust = function(t) {
return t.append("g");
}, Wst = function(t, e, r, n, i) {
const a = C0(), s = e.anchored;
a.x = e.startx, a.y = e.starty, a.class = "activation" + i % 3, a.width = e.stopx - e.startx, a.height = r - e.starty, E0(s, a);
}, Hst = function(t, e, r, n) {
const {
boxMargin: i,
boxTextMargin: a,
labelBoxHeight: s,
labelBoxWidth: o,
messageFontFamily: l,
messageFontSize: u,
messageFontWeight: h
} = n, d = t.append("g"), f = function(_, y, b, x) {
return d.append("line").attr("x1", _).attr("y1", y).attr("x2", b).attr("y2", x).attr("class", "loopLine");
};
f(e.startx, e.starty, e.stopx, e.starty), f(e.stopx, e.starty, e.stopx, e.stopy), f(e.startx, e.stopy, e.stopx, e.stopy), f(e.startx, e.starty, e.startx, e.stopy), typeof e.sections < "u" && e.sections.forEach(function(_) {
f(e.startx, _.y, e.stopx, _.y).style(
"stroke-dasharray",
"3, 3"
);
});
let p = Rb();
p.text = r, p.x = e.startx, p.y = e.starty, p.fontFamily = l, p.fontSize = u, p.fontWeight = h, p.anchor = "middle", p.valign = "middle", p.tspan = !1, p.width = o || 50, p.height = s || 20, p.textMargin = a, p.class = "labelText", YL(d, p), p = Rb(), p.text = e.title, p.x = e.startx + o / 2 + (e.stopx - e.startx) / 2, p.y = e.starty + i + a, p.anchor = "middle", p.valign = "middle", p.textMargin = a, p.class = "loopText", p.fontFamily = l, p.fontSize = u, p.fontWeight = h, p.wrap = !0;
let m = tl(d, p);
return typeof e.sectionTitles < "u" && e.sectionTitles.forEach(function(_, y) {
if (_.message) {
p.text = _.message, p.x = e.startx + (e.stopx - e.startx) / 2, p.y = e.sections[y].y + i + a, p.class = "loopText", p.anchor = "middle", p.valign = "middle", p.tspan = !1, p.fontFamily = l, p.fontSize = u, p.fontWeight = h, p.wrap = e.wrap, m = tl(d, p);
let b = Math.round(
m.map((x) => (x._groups || x)[0][0].getBBox().height).reduce((x, k) => x + k)
);
e.sections[y].height += b - (i + a);
}
}), e.height = Math.round(e.stopy - e.starty), d;
}, Gst = function(t, e) {
E0(t, {
x: e.startx,
y: e.starty,
width: e.stopx - e.startx,
height: e.stopy - e.starty,
fill: e.fill,
class: "rect"
}).lower();
}, jst = function(t) {
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
"d",
"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
);
}, $st = function(t) {
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
"d",
"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
);
}, Xst = function(t) {
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
"d",
"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
);
}, Kst = function(t) {
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
}, Zst = function(t) {
t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, Qst = function(t) {
t.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
}, Jst = function(t) {
const r = t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
r.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"), r.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
}, Rb = function() {
return {
x: 0,
y: 0,
fill: void 0,
anchor: void 0,
style: "#666",
width: void 0,
height: void 0,
textMargin: 0,
rx: 0,
ry: 0,
tspan: !0,
valign: void 0
};
}, C0 = function() {
return {
x: 0,
y: 0,
fill: "#EDF2AE",
stroke: "#666",
width: 100,
anchor: "start",
height: 100,
rx: 0,
ry: 0
};
}, WL = function() {
function t(i, a, s, o, l, u, h) {
const d = a.append("text").attr("x", s + l / 2).attr("y", o + u / 2 + 5).style("text-anchor", "middle").text(i);
n(d, h);
}
function e(i, a, s, o, l, u, h, d) {
const { actorFontSize: f, actorFontFamily: p, actorFontWeight: m } = d;
let _ = f && f.replace ? f.replace("px", "") : f;
const y = i.split(pe.lineBreakRegex);
for (let b = 0; b < y.length; b++) {
const x = b * _ - _ * (y.length - 1) / 2, k = a.append("text").attr("x", s + l / 2).attr("y", o).style("text-anchor", "middle").style("font-size", f).style("font-weight", m).style("font-family", p);
k.append("tspan").attr("x", s + l / 2).attr("dy", x).text(y[b]), k.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(k, h);
}
}
function r(i, a, s, o, l, u, h, d) {
const f = a.append("switch"), m = f.append("foreignObject").attr("x", s).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, f, s, o, l, u, h, d), n(m, h);
}
function n(i, a) {
for (const s in a)
a.hasOwnProperty(s) && i.attr(s, a[s]);
}
return function(i) {
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
};
}(), tot = function() {
function t(i, a, s, o, l, u, h) {
const d = a.append("text").attr("x", s).attr("y", o).style("text-anchor", "start").text(i);
n(d, h);
}
function e(i, a, s, o, l, u, h, d) {
const { actorFontSize: f, actorFontFamily: p, actorFontWeight: m } = d, _ = i.split(pe.lineBreakRegex);
for (let y = 0; y < _.length; y++) {
const b = y * f - f * (_.length - 1) / 2, x = a.append("text").attr("x", s).attr("y", o).style("text-anchor", "start").style("font-size", f).style("font-weight", m).style("font-family", p);
x.append("tspan").attr("x", s).attr("dy", b).text(_[y]), x.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(x, h);
}
}
function r(i, a, s, o, l, u, h, d) {
const f = a.append("switch"), m = f.append("foreignObject").attr("x", s).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, f, s, o, l, u, h, d), n(m, h);
}
function n(i, a) {
for (const s in a)
a.hasOwnProperty(s) && i.attr(s, a[s]);
}
return function(i) {
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
};
}(), rr = {
drawRect: E0,
drawText: tl,
drawLabel: YL,
drawActor: Yst,
drawPopup: Dst,
drawImage: VL,
drawEmbeddedImage: zL,
anchorElement: Ust,
drawActivation: Wst,
drawLoop: Hst,
drawBackgroundRect: Gst,
insertArrowHead: Kst,
insertArrowFilledHead: Zst,
insertSequenceNumber: Qst,
insertArrowCrossHead: Jst,
insertDatabaseIcon: jst,
insertComputerIcon: $st,
insertClockIcon: Xst,
getTextObj: Rb,
getNoteRect: C0,
popupMenu: Ost,
popdownMenu: Fst,
fixLifeLineHeights: UL,
sanitizeUrl: Vi
};
let dt = {};
const Bt = {
data: {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0
},
verticalPos: 0,
sequenceItems: [],
activations: [],
models: {
getHeight: function() {
return Math.max.apply(
null,
this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)
) + (this.loops.length === 0 ? 0 : this.loops.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.messages.length === 0 ? 0 : this.messages.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.notes.length === 0 ? 0 : this.notes.map((t) => t.height || 0).reduce((t, e) => t + e));
},
clear: function() {
this.actors = [], this.loops = [], this.messages = [], this.notes = [];
},
addActor: function(t) {
this.actors.push(t);
},
addLoop: function(t) {
this.loops.push(t);
},
addMessage: function(t) {
this.messages.push(t);
},
addNote: function(t) {
this.notes.push(t);
},
lastActor: function() {
return this.actors[this.actors.length - 1];
},
lastLoop: function() {
return this.loops[this.loops.length - 1];
},
lastMessage: function() {
return this.messages[this.messages.length - 1];
},
lastNote: function() {
return this.notes[this.notes.length - 1];
},
actors: [],
loops: [],
messages: [],
notes: []
},
init: function() {
this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0
}, this.verticalPos = 0, GL(nt());
},
updateVal: function(t, e, r, n) {
typeof t[e] > "u" ? t[e] = r : t[e] = n(r, t[e]);
},
updateBounds: function(t, e, r, n) {
const i = this;
let a = 0;
function s(o) {
return function(u) {
a++;
const h = i.sequenceItems.length - a + 1;
i.updateVal(u, "starty", e - h * dt.boxMargin, Math.min), i.updateVal(u, "stopy", n + h * dt.boxMargin, Math.max), i.updateVal(Bt.data, "startx", t - h * dt.boxMargin, Math.min), i.updateVal(Bt.data, "stopx", r + h * dt.boxMargin, Math.max), o !== "activation" && (i.updateVal(u, "startx", t - h * dt.boxMargin, Math.min), i.updateVal(u, "stopx", r + h * dt.boxMargin, Math.max), i.updateVal(Bt.data, "starty", e - h * dt.boxMargin, Math.min), i.updateVal(Bt.data, "stopy", n + h * dt.boxMargin, Math.max));
};
}
this.sequenceItems.forEach(s()), this.activations.forEach(s("activation"));
},
insert: function(t, e, r, n) {
const i = Math.min(t, r), a = Math.max(t, r), s = Math.min(e, n), o = Math.max(e, n);
this.updateVal(Bt.data, "startx", i, Math.min), this.updateVal(Bt.data, "starty", s, Math.min), this.updateVal(Bt.data, "stopx", a, Math.max), this.updateVal(Bt.data, "stopy", o, Math.max), this.updateBounds(i, s, a, o);
},
newActivation: function(t, e, r) {
const n = r[t.from.actor], i = S0(t.from.actor).length || 0, a = n.x + n.width / 2 + (i - 1) * dt.activationWidth / 2;
this.activations.push({
startx: a,
starty: this.verticalPos + 2,
stopx: a + dt.activationWidth,
stopy: void 0,
actor: t.from.actor,
anchored: rr.anchorElement(e)
});
},
endActivation: function(t) {
const e = this.activations.map(function(r) {
return r.actor;
}).lastIndexOf(t.from.actor);
return this.activations.splice(e, 1)[0];
},
createLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
return {
startx: void 0,
starty: this.verticalPos,
stopx: void 0,
stopy: void 0,
title: t.message,
wrap: t.wrap,
width: t.width,
height: 0,
fill: e
};
},
newLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
this.sequenceItems.push(this.createLoop(t, e));
},
endLoop: function() {
return this.sequenceItems.pop();
},
addSectionToLoop: function(t) {
const e = this.sequenceItems.pop();
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: Bt.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
},
bumpVerticalPos: function(t) {
this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
},
getVerticalPos: function() {
return this.verticalPos;
},
getBounds: function() {
return { bounds: this.data, models: this.models };
}
}, eot = function(t, e) {
Bt.bumpVerticalPos(dt.boxMargin), e.height = dt.boxMargin, e.starty = Bt.getVerticalPos();
const r = rr.getNoteRect();
r.x = e.startx, r.y = e.starty, r.width = e.width || dt.width, r.class = "note";
const n = t.append("g"), i = rr.drawRect(n, r), a = rr.getTextObj();
a.x = e.startx, a.y = e.starty, a.width = r.width, a.dy = "1em", a.text = e.message, a.class = "noteText", a.fontFamily = dt.noteFontFamily, a.fontSize = dt.noteFontSize, a.fontWeight = dt.noteFontWeight, a.anchor = dt.noteAlign, a.textMargin = dt.noteMargin, a.valign = "center";
const s = tl(n, a), o = Math.round(
s.map((l) => (l._groups || l)[0][0].getBBox().height).reduce((l, u) => l + u)
);
i.attr("height", o + 2 * dt.noteMargin), e.height += o + 2 * dt.noteMargin, Bt.bumpVerticalPos(o + 2 * dt.noteMargin), e.stopy = e.starty + o + 2 * dt.noteMargin, e.stopx = e.startx + r.width, Bt.insert(e.startx, e.starty, e.stopx, e.stopy), Bt.models.addNote(e);
}, el = (t) => ({
fontFamily: t.messageFontFamily,
fontSize: t.messageFontSize,
fontWeight: t.messageFontWeight
}), mo = (t) => ({
fontFamily: t.noteFontFamily,
fontSize: t.noteFontSize,
fontWeight: t.noteFontWeight
}), Ib = (t) => ({
fontFamily: t.actorFontFamily,
fontSize: t.actorFontSize,
fontWeight: t.actorFontWeight
}), rot = function(t, e) {
Bt.bumpVerticalPos(10);
const { startx: r, stopx: n, message: i } = e, a = pe.splitBreaks(i).length, s = Se.calculateTextDimensions(i, el(dt)), o = s.height / a;
e.height += o, Bt.bumpVerticalPos(o);
let l, u = s.height - 10;
const h = s.width;
if (r === n) {
l = Bt.getVerticalPos() + u, dt.rightAngles || (u += dt.boxMargin, l = Bt.getVerticalPos() + u), u += 30;
const d = Math.max(h / 2, dt.width / 2);
Bt.insert(
r - d,
Bt.getVerticalPos() - 10 + u,
n + d,
Bt.getVerticalPos() + 30 + u
);
} else
u += dt.boxMargin, l = Bt.getVerticalPos() + u, Bt.insert(r, l - 10, n, l);
return Bt.bumpVerticalPos(u), e.height += u, e.stopy = e.starty + e.height, Bt.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), l;
}, not = function(t, e, r, n) {
const { startx: i, stopx: a, starty: s, message: o, type: l, sequenceIndex: u, sequenceVisible: h } = e, d = Se.calculateTextDimensions(o, el(dt)), f = rr.getTextObj();
f.x = i, f.y = s + 10, f.width = a - i, f.class = "messageText", f.dy = "1em", f.text = o, f.fontFamily = dt.messageFontFamily, f.fontSize = dt.messageFontSize, f.fontWeight = dt.messageFontWeight, f.anchor = dt.messageAlign, f.valign = "center", f.textMargin = dt.wrapPadding, f.tspan = !1, tl(t, f);
const p = d.width;
let m;
i === a ? dt.rightAngles ? m = t.append("path").attr(
"d",
`M ${i},${r} H ${i + Math.max(dt.width / 2, p / 2)} V ${r + 25} H ${i}`
) : m = t.append("path").attr(
"d",
"M " + i + "," + r + " C " + (i + 60) + "," + (r - 10) + " " + (i + 60) + "," + (r + 30) + " " + i + "," + (r + 20)
) : (m = t.append("line"), m.attr("x1", i), m.attr("y1", r), m.attr("x2", a), m.attr("y2", r)), l === n.db.LINETYPE.DOTTED || l === n.db.LINETYPE.DOTTED_CROSS || l === n.db.LINETYPE.DOTTED_POINT || l === n.db.LINETYPE.DOTTED_OPEN ? (m.style("stroke-dasharray", "3, 3"), m.attr("class", "messageLine1")) : m.attr("class", "messageLine0");
let _ = "";
dt.arrowMarkerAbsolute && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), m.attr("stroke-width", 2), m.attr("stroke", "none"), m.style("fill", "none"), (l === n.db.LINETYPE.SOLID || l === n.db.LINETYPE.DOTTED) && m.attr("marker-end", "url(" + _ + "#arrowhead)"), (l === n.db.LINETYPE.SOLID_POINT || l === n.db.LINETYPE.DOTTED_POINT) && m.attr("marker-end", "url(" + _ + "#filled-head)"), (l === n.db.LINETYPE.SOLID_CROSS || l === n.db.LINETYPE.DOTTED_CROSS) && m.attr("marker-end", "url(" + _ + "#crosshead)"), (h || dt.showSequenceNumbers) && (m.attr("marker-start", "url(" + _ + "#sequencenumber)"), t.append("text").attr("x", i).attr("y", r + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(u));
}, Nb = function(t, e, r, n, i, a) {
if (i.hideUnusedParticipants === !0) {
const u = /* @__PURE__ */ new Set();
a.forEach((h) => {
u.add(h.from), u.add(h.to);
}), r = r.filter((h) => u.has(h));
}
let s = 0, o = 0, l = 0;
for (let u = 0; u < r.length; u++) {
const h = e[r[u]];
h.width = h.width || dt.width, h.height = Math.max(h.height || dt.height, dt.height), h.margin = h.margin || dt.actorMargin, h.x = s + o, h.y = n;
const d = rr.drawActor(t, h, dt);
l = Math.max(l, d), Bt.insert(h.x, n, h.x + h.width, h.height), s += h.width, o += h.margin, Bt.models.addActor(h);
}
Bt.bumpVerticalPos(l);
}, HL = function(t, e, r, n) {
let i = 0, a = 0;
for (let s = 0; s < r.length; s++) {
const o = e[r[s]], l = sot(o), u = rr.drawPopup(
t,
o,
l,
dt,
dt.forceMenus,
n
);
u.height > i && (i = u.height), u.width + o.x > a && (a = u.width + o.x);
}
return { maxHeight: i, maxWidth: a };
}, GL = function(t) {
mr(dt, t), t.fontFamily && (dt.actorFontFamily = dt.noteFontFamily = dt.messageFontFamily = t.fontFamily), t.fontSize && (dt.actorFontSize = dt.noteFontSize = dt.messageFontSize = t.fontSize), t.fontWeight && (dt.actorFontWeight = dt.noteFontWeight = dt.messageFontWeight = t.fontWeight);
}, S0 = function(t) {
return Bt.activations.filter(function(e) {
return e.actor === t;
});
}, ow = function(t, e) {
const r = e[t], n = S0(t), i = n.reduce(function(s, o) {
return Math.min(s, o.startx);
}, r.x + r.width / 2), a = n.reduce(function(s, o) {
return Math.max(s, o.stopx);
}, r.x + r.width / 2);
return [i, a];
};
function ki(t, e, r, n, i) {
Bt.bumpVerticalPos(r);
let a = n;
if (e.id && e.message && t[e.id]) {
const s = t[e.id].width, o = el(dt);
e.message = Se.wrapLabel(`[${e.message}]`, s - 2 * dt.wrapPadding, o), e.width = s, e.wrap = !0;
const l = Se.calculateTextDimensions(e.message, o), u = Math.max(l.height, dt.labelBoxHeight);
a = n + u, H.debug(`${u} - ${e.message}`);
}
i(e), Bt.bumpVerticalPos(a);
}
const iot = function(t, e, r, n) {
const { securityLevel: i, sequence: a } = nt();
dt = a;
let s;
i === "sandbox" && (s = St("#i" + e));
const o = St(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = i === "sandbox" ? s.nodes()[0].contentDocument : document;
Bt.init(), H.debug(n.db);
const u = i === "sandbox" ? o.select(`[id="${e}"]`) : St(`[id="${e}"]`), h = n.db.getActors(), d = n.db.getActorKeys(), f = n.db.getMessages(), p = n.db.getDiagramTitle(), m = aot(h, f, n);
dt.height = oot(h, m), rr.insertComputerIcon(u), rr.insertDatabaseIcon(u), rr.insertClockIcon(u), Nb(u, h, d, 0, dt, f);
const _ = uot(f, h, m, n);
rr.insertArrowHead(u), rr.insertArrowCrossHead(u), rr.insertArrowFilledHead(u), rr.insertSequenceNumber(u);
function y(B, w) {
const D = Bt.endActivation(B);
D.starty + 18 > w && (D.starty = w - 6, w += 12), rr.drawActivation(
u,
D,
w,
dt,
S0(B.from.actor).length
), Bt.insert(D.startx, w - 10, D.stopx, w);
}
let b = 1, x = 1;
const k = [];
f.forEach(function(B) {
let w, D, N;
switch (B.type) {
case n.db.LINETYPE.NOTE:
D = B.noteModel, eot(u, D);
break;
case n.db.LINETYPE.ACTIVE_START:
Bt.newActivation(B, u, h);
break;
case n.db.LINETYPE.ACTIVE_END:
y(B, Bt.getVerticalPos());
break;
case n.db.LINETYPE.LOOP_START:
ki(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.LOOP_END:
w = Bt.endLoop(), rr.drawLoop(u, w, "loop", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.RECT_START:
ki(
_,
B,
dt.boxMargin,
dt.boxMargin,
(z) => Bt.newLoop(void 0, z.message)
);
break;
case n.db.LINETYPE.RECT_END:
w = Bt.endLoop(), rr.drawBackgroundRect(u, w), Bt.models.addLoop(w), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos());
break;
case n.db.LINETYPE.OPT_START:
ki(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.OPT_END:
w = Bt.endLoop(), rr.drawLoop(u, w, "opt", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.ALT_START:
ki(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.ALT_ELSE:
ki(
_,
B,
dt.boxMargin + dt.boxTextMargin,
dt.boxMargin,
(z) => Bt.addSectionToLoop(z)
);
break;
case n.db.LINETYPE.ALT_END:
w = Bt.endLoop(), rr.drawLoop(u, w, "alt", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.PAR_START:
ki(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.PAR_AND:
ki(
_,
B,
dt.boxMargin + dt.boxTextMargin,
dt.boxMargin,
(z) => Bt.addSectionToLoop(z)
);
break;
case n.db.LINETYPE.PAR_END:
w = Bt.endLoop(), rr.drawLoop(u, w, "par", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.AUTONUMBER:
b = B.message.start || b, x = B.message.step || x, B.message.visible ? n.db.enableSequenceNumbers() : n.db.disableSequenceNumbers();
break;
case n.db.LINETYPE.CRITICAL_START:
ki(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.CRITICAL_OPTION:
ki(
_,
B,
dt.boxMargin + dt.boxTextMargin,
dt.boxMargin,
(z) => Bt.addSectionToLoop(z)
);
break;
case n.db.LINETYPE.CRITICAL_END:
w = Bt.endLoop(), rr.drawLoop(u, w, "critical", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.BREAK_START:
ki(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.BREAK_END:
w = Bt.endLoop(), rr.drawLoop(u, w, "break", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
default:
try {
N = B.msgModel, N.starty = Bt.getVerticalPos(), N.sequenceIndex = b, N.sequenceVisible = n.db.showSequenceNumbers();
const z = rot(u, N);
k.push({ messageModel: N, lineStarty: z }), Bt.models.addMessage(N);
} catch (z) {
H.error("error while drawing message", z);
}
}
[
n.db.LINETYPE.SOLID_OPEN,
n.db.LINETYPE.DOTTED_OPEN,
n.db.LINETYPE.SOLID,
n.db.LINETYPE.DOTTED,
n.db.LINETYPE.SOLID_CROSS,
n.db.LINETYPE.DOTTED_CROSS,
n.db.LINETYPE.SOLID_POINT,
n.db.LINETYPE.DOTTED_POINT
].includes(B.type) && (b = b + x);
}), k.forEach((B) => not(u, B.messageModel, B.lineStarty, n)), dt.mirrorActors && (Bt.bumpVerticalPos(dt.boxMargin * 2), Nb(u, h, d, Bt.getVerticalPos(), dt, f), Bt.bumpVerticalPos(dt.boxMargin), UL(u, Bt.getVerticalPos()));
const T = HL(u, h, d, l), { bounds: C } = Bt.getBounds();
H.debug("For line height fix Querying: #" + e + " .actor-line"), f1("#" + e + " .actor-line").attr("y2", C.stopy);
let S = C.stopy - C.starty;
S < T.maxHeight && (S = T.maxHeight);
let R = S + 2 * dt.diagramMarginY;
dt.mirrorActors && (R = R - dt.boxMargin + dt.bottomMarginAdj);
let A = C.stopx - C.startx;
A < T.maxWidth && (A = T.maxWidth);
const L = A + 2 * dt.diagramMarginX;
p && u.append("text").text(p).attr("x", (C.stopx - C.startx) / 2 - 2 * dt.diagramMarginX).attr("y", -25), pi(u, R, L, dt.useMaxWidth);
const v = p ? 40 : 0;
u.attr(
"viewBox",
C.startx - dt.diagramMarginX + " -" + (dt.diagramMarginY + v) + " " + L + " " + (R + v)
), vn(n.db, u, e), H.debug("models:", Bt.models);
}, aot = function(t, e, r) {
const n = {};
return e.forEach(function(i) {
if (t[i.to] && t[i.from]) {
const a = t[i.to];
if (i.placement === r.db.PLACEMENT.LEFTOF && !a.prevActor || i.placement === r.db.PLACEMENT.RIGHTOF && !a.nextActor)
return;
const s = i.placement !== void 0, o = !s, l = s ? mo(dt) : el(dt), u = i.wrap ? Se.wrapLabel(i.message, dt.width - 2 * dt.wrapPadding, l) : i.message, d = Se.calculateTextDimensions(u, l).width + 2 * dt.wrapPadding;
o && i.from === a.nextActor ? n[i.to] = Math.max(
n[i.to] || 0,
d
) : o && i.from === a.prevActor ? n[i.from] = Math.max(
n[i.from] || 0,
d
) : o && i.from === i.to ? (n[i.from] = Math.max(
n[i.from] || 0,
d / 2
), n[i.to] = Math.max(
n[i.to] || 0,
d / 2
)) : i.placement === r.db.PLACEMENT.RIGHTOF ? n[i.from] = Math.max(
n[i.from] || 0,
d
) : i.placement === r.db.PLACEMENT.LEFTOF ? n[a.prevActor] = Math.max(
n[a.prevActor] || 0,
d
) : i.placement === r.db.PLACEMENT.OVER && (a.prevActor && (n[a.prevActor] = Math.max(
n[a.prevActor] || 0,
d / 2
)), a.nextActor && (n[i.from] = Math.max(
n[i.from] || 0,
d / 2
)));
}
}), H.debug("maxMessageWidthPerActor:", n), n;
}, sot = function(t) {
let e = 0;
const r = Ib(dt);
for (const n in t.links) {
const a = Se.calculateTextDimensions(n, r).width + 2 * dt.wrapPadding + 2 * dt.boxMargin;
e < a && (e = a);
}
return e;
}, oot = function(t, e) {
let r = 0;
Object.keys(t).forEach((n) => {
const i = t[n];
i.wrap && (i.description = Se.wrapLabel(
i.description,
dt.width - 2 * dt.wrapPadding,
Ib(dt)
));
const a = Se.calculateTextDimensions(i.description, Ib(dt));
i.width = i.wrap ? dt.width : Math.max(dt.width, a.width + 2 * dt.wrapPadding), i.height = i.wrap ? Math.max(a.height, dt.height) : dt.height, r = Math.max(r, i.height);
});
for (const n in e) {
const i = t[n];
if (!i)
continue;
const a = t[i.nextActor];
if (!a)
continue;
const o = e[n] + dt.actorMargin - i.width / 2 - a.width / 2;
i.margin = Math.max(o, dt.actorMargin);
}
return Math.max(r, dt.height);
}, lot = function(t, e, r) {
const n = e[t.from].x, i = e[t.to].x, a = t.wrap && t.message;
let s = Se.calculateTextDimensions(
a ? Se.wrapLabel(t.message, dt.width, mo(dt)) : t.message,
mo(dt)
);
const o = {
width: a ? dt.width : Math.max(dt.width, s.width + 2 * dt.noteMargin),
height: 0,
startx: e[t.from].x,
stopx: 0,
starty: 0,
stopy: 0,
message: t.message
};
return t.placement === r.db.PLACEMENT.RIGHTOF ? (o.width = a ? Math.max(dt.width, s.width) : Math.max(
e[t.from].width / 2 + e[t.to].width / 2,
s.width + 2 * dt.noteMargin
), o.startx = n + (e[t.from].width + dt.actorMargin) / 2) : t.placement === r.db.PLACEMENT.LEFTOF ? (o.width = Math.max(a ? dt.width : e[t.from].width / 2 + e[t.to].width / 2, s.width + 2 * dt.noteMargin), o.startx = n - o.width + (e[t.from].width - dt.actorMargin) / 2) : t.to === t.from ? (s = Se.calculateTextDimensions(
a ? Se.wrapLabel(t.message, Math.max(dt.width, e[t.from].width), mo(dt)) : t.message,
mo(dt)
), o.width = a ? Math.max(dt.width, e[t.from].width) : Math.max(e[t.from].width, dt.width, s.width + 2 * dt.noteMargin), o.startx = n + (e[t.from].width - o.width) / 2) : (o.width = Math.abs(n + e[t.from].width / 2 - (i + e[t.to].width / 2)) + dt.actorMargin, o.startx = n < i ? n + e[t.from].width / 2 - dt.actorMargin / 2 : i + e[t.to].width / 2 - dt.actorMargin / 2), a && (o.message = Se.wrapLabel(
t.message,
o.width - 2 * dt.wrapPadding,
mo(dt)
)), H.debug(
`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`
), o;
}, cot = function(t, e, r) {
let n = !1;
if ([
r.db.LINETYPE.SOLID_OPEN,
r.db.LINETYPE.DOTTED_OPEN,
r.db.LINETYPE.SOLID,
r.db.LINETYPE.DOTTED,
r.db.LINETYPE.SOLID_CROSS,
r.db.LINETYPE.DOTTED_CROSS,
r.db.LINETYPE.SOLID_POINT,
r.db.LINETYPE.DOTTED_POINT
].includes(t.type) && (n = !0), !n)
return {};
const i = ow(t.from, e), a = ow(t.to, e), s = i[0] <= a[0] ? 1 : 0, o = i[0] < a[0] ? 0 : 1, l = i.concat(a), u = Math.abs(a[o] - i[s]);
t.wrap && t.message && (t.message = Se.wrapLabel(
t.message,
Math.max(u + 2 * dt.wrapPadding, dt.width),
el(dt)
));
const h = Se.calculateTextDimensions(t.message, el(dt));
return {
width: Math.max(
t.wrap ? 0 : h.width + 2 * dt.wrapPadding,
u + 2 * dt.wrapPadding,
dt.width
),
height: 0,
startx: i[s],
stopx: a[o],
starty: 0,
stopy: 0,
message: t.message,
type: t.type,
wrap: t.wrap,
fromBounds: Math.min.apply(null, l),
toBounds: Math.max.apply(null, l)
};
}, uot = function(t, e, r, n) {
const i = {}, a = [];
let s, o, l;
return t.forEach(function(u) {
switch (u.id = Se.random({ length: 10 }), u.type) {
case n.db.LINETYPE.LOOP_START:
case n.db.LINETYPE.ALT_START:
case n.db.LINETYPE.OPT_START:
case n.db.LINETYPE.PAR_START:
case n.db.LINETYPE.CRITICAL_START:
case n.db.LINETYPE.BREAK_START:
a.push({
id: u.id,
msg: u.message,
from: Number.MAX_SAFE_INTEGER,
to: Number.MIN_SAFE_INTEGER,
width: 0
});
break;
case n.db.LINETYPE.ALT_ELSE:
case n.db.LINETYPE.PAR_AND:
case n.db.LINETYPE.CRITICAL_OPTION:
u.message && (s = a.pop(), i[s.id] = s, i[u.id] = s, a.push(s));
break;
case n.db.LINETYPE.LOOP_END:
case n.db.LINETYPE.ALT_END:
case n.db.LINETYPE.OPT_END:
case n.db.LINETYPE.PAR_END:
case n.db.LINETYPE.CRITICAL_END:
case n.db.LINETYPE.BREAK_END:
s = a.pop(), i[s.id] = s;
break;
case n.db.LINETYPE.ACTIVE_START:
{
const d = e[u.from ? u.from.actor : u.to.actor], f = S0(u.from ? u.from.actor : u.to.actor).length, p = d.x + d.width / 2 + (f - 1) * dt.activationWidth / 2, m = {
startx: p,
stopx: p + dt.activationWidth,
actor: u.from.actor,
enabled: !0
};
Bt.activations.push(m);
}
break;
case n.db.LINETYPE.ACTIVE_END:
{
const d = Bt.activations.map((f) => f.actor).lastIndexOf(u.from.actor);
delete Bt.activations.splice(d, 1)[0];
}
break;
}
u.placement !== void 0 ? (o = lot(u, e, n), u.noteModel = o, a.forEach((d) => {
s = d, s.from = Math.min(s.from, o.startx), s.to = Math.max(s.to, o.startx + o.width), s.width = Math.max(s.width, Math.abs(s.from - s.to)) - dt.labelBoxWidth;
})) : (l = cot(u, e, n), u.msgModel = l, l.startx && l.stopx && a.length > 0 && a.forEach((d) => {
if (s = d, l.startx === l.stopx) {
const f = e[u.from], p = e[u.to];
s.from = Math.min(
f.x - l.width / 2,
f.x - f.width / 2,
s.from
), s.to = Math.max(p.x + l.width / 2, p.x + f.width / 2, s.to), s.width = Math.max(s.width, Math.abs(s.to - s.from)) - dt.labelBoxWidth;
} else
s.from = Math.min(l.startx, s.from), s.to = Math.max(l.stopx, s.to), s.width = Math.max(s.width, l.width) - dt.labelBoxWidth;
}));
}), Bt.activations = [], H.debug("Loop type widths:", i), i;
}, lw = {
bounds: Bt,
drawActors: Nb,
drawActorsPopup: HL,
setConf: GL,
draw: iot
};
var n1 = function() {
var t = function(ct, J, Y, $) {
for (Y = Y || {}, $ = ct.length; $--; Y[ct[$]] = J)
;
return Y;
}, e = [1, 2], r = [1, 3], n = [1, 5], i = [1, 7], a = [2, 5], s = [1, 15], o = [1, 17], l = [1, 19], u = [1, 20], h = [1, 21], d = [1, 22], f = [1, 33], p = [1, 23], m = [1, 24], _ = [1, 25], y = [1, 26], b = [1, 27], x = [1, 30], k = [1, 31], T = [1, 32], C = [1, 35], M = [1, 36], S = [1, 37], R = [1, 38], A = [1, 34], L = [1, 41], v = [1, 4, 5, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], B = [1, 4, 5, 12, 13, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], w = [1, 4, 5, 7, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], D = [4, 5, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], N = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, idStatement: 11, DESCR: 12, "-->": 13, HIDE_EMPTY: 14, scale: 15, WIDTH: 16, COMPOSIT_STATE: 17, STRUCT_START: 18, STRUCT_STOP: 19, STATE_DESCR: 20, AS: 21, ID: 22, FORK: 23, JOIN: 24, CHOICE: 25, CONCURRENT: 26, note: 27, notePosition: 28, NOTE_TEXT: 29, direction: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, openDirective: 36, typeDirective: 37, closeDirective: 38, ":": 39, argDirective: 40, direction_tb: 41, direction_bt: 42, direction_rl: 43, direction_lr: 44, eol: 45, ";": 46, EDGE_STATE: 47, left_of: 48, right_of: 49, open_directive: 50, type_directive: 51, arg_directive: 52, close_directive: 53, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "SPACE", 5: "NL", 7: "SD", 12: "DESCR", 13: "-->", 14: "HIDE_EMPTY", 15: "scale", 16: "WIDTH", 17: "COMPOSIT_STATE", 18: "STRUCT_START", 19: "STRUCT_STOP", 20: "STATE_DESCR", 21: "AS", 22: "ID", 23: "FORK", 24: "JOIN", 25: "CHOICE", 26: "CONCURRENT", 27: "note", 29: "NOTE_TEXT", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 39: ":", 41: "direction_tb", 42: "direction_bt", 43: "direction_rl", 44: "direction_lr", 46: ";", 47: "EDGE_STATE", 48: "left_of", 49: "right_of", 50: "open_directive", 51: "type_directive", 52: "arg_directive", 53: "close_directive" },
productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [10, 1], [10, 2], [10, 3], [10, 4], [10, 1], [10, 2], [10, 1], [10, 4], [10, 3], [10, 6], [10, 1], [10, 1], [10, 1], [10, 1], [10, 4], [10, 4], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [6, 3], [6, 5], [30, 1], [30, 1], [30, 1], [30, 1], [45, 1], [45, 1], [11, 1], [11, 1], [28, 1], [28, 1], [36, 1], [37, 1], [40, 1], [38, 1]],
performAction: function(J, Y, $, lt, ut, W, tt) {
var K = W.length - 1;
switch (ut) {
case 4:
return lt.setRootDoc(W[K]), W[K];
case 5:
this.$ = [];
break;
case 6:
W[K] != "nl" && (W[K - 1].push(W[K]), this.$ = W[K - 1]);
break;
case 7:
case 8:
this.$ = W[K];
break;
case 9:
this.$ = "nl";
break;
case 10:
this.$ = { stmt: "state", id: W[K], type: "default", description: "" };
break;
case 11:
this.$ = { stmt: "state", id: W[K - 1], type: "default", description: lt.trimColon(W[K]) };
break;
case 12:
this.$ = { stmt: "relation", state1: { stmt: "state", id: W[K - 2], type: "default", description: "" }, state2: { stmt: "state", id: W[K], type: "default", description: "" } };
break;
case 13:
this.$ = { stmt: "relation", state1: { stmt: "state", id: W[K - 3], type: "default", description: "" }, state2: { stmt: "state", id: W[K - 1], type: "default", description: "" }, description: W[K].substr(1).trim() };
break;
case 17:
this.$ = { stmt: "state", id: W[K - 3], type: "default", description: "", doc: W[K - 1] };
break;
case 18:
var it = W[K], Z = W[K - 2].trim();
if (W[K].match(":")) {
var V = W[K].split(":");
it = V[0], Z = [Z, V[1]];
}
this.$ = { stmt: "state", id: it, type: "default", description: Z };
break;
case 19:
this.$ = { stmt: "state", id: W[K - 3], type: "default", description: W[K - 5], doc: W[K - 1] };
break;
case 20:
this.$ = { stmt: "state", id: W[K], type: "fork" };
break;
case 21:
this.$ = { stmt: "state", id: W[K], type: "join" };
break;
case 22:
this.$ = { stmt: "state", id: W[K], type: "choice" };
break;
case 23:
this.$ = { stmt: "state", id: lt.getDividerId(), type: "divider" };
break;
case 24:
this.$ = { stmt: "state", id: W[K - 1].trim(), note: { position: W[K - 2].trim(), text: W[K].trim() } };
break;
case 28:
this.$ = W[K].trim(), lt.setAccTitle(this.$);
break;
case 29:
case 30:
this.$ = W[K].trim(), lt.setAccDescription(this.$);
break;
case 33:
lt.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
break;
case 34:
lt.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
break;
case 35:
lt.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
break;
case 36:
lt.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
break;
case 39:
case 40:
this.$ = W[K];
break;
case 43:
lt.parseDirective("%%{", "open_directive");
break;
case 44:
lt.parseDirective(W[K], "type_directive");
break;
case 45:
W[K] = W[K].trim().replace(/'/g, '"'), lt.parseDirective(W[K], "arg_directive");
break;
case 46:
lt.parseDirective("}%%", "close_directive", "state");
break;
}
},
table: [{ 3: 1, 4: e, 5: r, 6: 4, 7: n, 36: 6, 50: i }, { 1: [3] }, { 3: 8, 4: e, 5: r, 6: 4, 7: n, 36: 6, 50: i }, { 3: 9, 4: e, 5: r, 6: 4, 7: n, 36: 6, 50: i }, { 3: 10, 4: e, 5: r, 6: 4, 7: n, 36: 6, 50: i }, t([1, 4, 5, 14, 15, 17, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], a, { 8: 11 }), { 37: 12, 51: [1, 13] }, { 51: [2, 43] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: s, 5: o, 6: 28, 9: 14, 10: 16, 11: 18, 14: l, 15: u, 17: h, 20: d, 22: f, 23: p, 24: m, 25: _, 26: y, 27: b, 30: 29, 31: x, 33: k, 35: T, 36: 6, 41: C, 42: M, 43: S, 44: R, 47: A, 50: i }, { 38: 39, 39: [1, 40], 53: L }, t([39, 53], [2, 44]), t(v, [2, 6]), { 6: 28, 10: 42, 11: 18, 14: l, 15: u, 17: h, 20: d, 22: f, 23: p, 24: m, 25: _, 26: y, 27: b, 30: 29, 31: x, 33: k, 35: T, 36: 6, 41: C, 42: M, 43: S, 44: R, 47: A, 50: i }, t(v, [2, 8]), t(v, [2, 9]), t(v, [2, 10], { 12: [1, 43], 13: [1, 44] }), t(v, [2, 14]), { 16: [1, 45] }, t(v, [2, 16], { 18: [1, 46] }), { 21: [1, 47] }, t(v, [2, 20]), t(v, [2, 21]), t(v, [2, 22]), t(v, [2, 23]), { 28: 48, 29: [1, 49], 48: [1, 50], 49: [1, 51] }, t(v, [2, 26]), t(v, [2, 27]), { 32: [1, 52] }, { 34: [1, 53] }, t(v, [2, 30]), t(B, [2, 39]), t(B, [2, 40]), t(v, [2, 33]), t(v, [2, 34]), t(v, [2, 35]), t(v, [2, 36]), t(w, [2, 31]), { 40: 54, 52: [1, 55] }, t(w, [2, 46]), t(v, [2, 7]), t(v, [2, 11]), { 11: 56, 22: f, 47: A }, t(v, [2, 15]), t(D, a, { 8: 57 }), { 22: [1, 58] }, { 22: [1, 59] }, { 21: [1, 60] }, { 22: [2, 41] }, { 22: [2, 42] }, t(v, [2, 28]), t(v, [2, 29]), { 38: 61, 53: L }, { 53: [2, 45] }, t(v, [2, 12], { 12: [1, 62] }), { 4: s, 5: o, 6: 28, 9: 14, 10: 16, 11: 18, 14: l, 15: u, 17: h, 19: [1, 63], 20: d, 22: f, 23: p, 24: m, 25: _, 26: y, 27: b, 30: 29, 31: x, 33: k, 35: T, 36: 6, 41: C, 42: M, 43: S, 44: R, 47: A, 50: i }, t(v, [2, 18], { 18: [1, 64] }), { 29: [1, 65] }, { 22: [1, 66] }, t(w, [2, 32]), t(v, [2, 13]), t(v, [2, 17]), t(D, a, { 8: 67 }), t(v, [2, 24]), t(v, [2, 25]), { 4: s, 5: o, 6: 28, 9: 14, 10: 16, 11: 18, 14: l, 15: u, 17: h, 19: [1, 68], 20: d, 22: f, 23: p, 24: m, 25: _, 26: y, 27: b, 30: 29, 31: x, 33: k, 35: T, 36: 6, 41: C, 42: M, 43: S, 44: R, 47: A, 50: i }, t(v, [2, 19])],
defaultActions: { 7: [2, 43], 8: [2, 1], 9: [2, 2], 10: [2, 3], 50: [2, 41], 51: [2, 42], 55: [2, 45] },
parseError: function(J, Y) {
if (Y.recoverable)
this.trace(J);
else {
var $ = new Error(J);
throw $.hash = Y, $;
}
},
parse: function(J) {
var Y = this, $ = [0], lt = [], ut = [null], W = [], tt = this.table, K = "", it = 0, Z = 0, V = 2, Q = 1, q = W.slice.call(arguments, 1), U = Object.create(this.lexer), F = { yy: {} };
for (var j in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, j) && (F.yy[j] = this.yy[j]);
U.setInput(J, F.yy), F.yy.lexer = U, F.yy.parser = this, typeof U.yylloc > "u" && (U.yylloc = {});
var P = U.yylloc;
W.push(P);
var et = U.options && U.options.ranges;
typeof F.yy.parseError == "function" ? this.parseError = F.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function at() {
var Dt;
return Dt = lt.pop() || U.lex() || Q, typeof Dt != "number" && (Dt instanceof Array && (lt = Dt, Dt = lt.pop()), Dt = Y.symbols_[Dt] || Dt), Dt;
}
for (var It, Lt, Rt, Ct, pt = {}, mt, _t, Tt, ft; ; ) {
if (Lt = $[$.length - 1], this.defaultActions[Lt] ? Rt = this.defaultActions[Lt] : ((It === null || typeof It > "u") && (It = at()), Rt = tt[Lt] && tt[Lt][It]), typeof Rt > "u" || !Rt.length || !Rt[0]) {
var le = "";
ft = [];
for (mt in tt[Lt])
this.terminals_[mt] && mt > V && ft.push("'" + this.terminals_[mt] + "'");
U.showPosition ? le = "Parse error on line " + (it + 1) + `:
` + U.showPosition() + `
Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[It] || It) + "'" : le = "Parse error on line " + (it + 1) + ": Unexpected " + (It == Q ? "end of input" : "'" + (this.terminals_[It] || It) + "'"), this.parseError(le, {
text: U.match,
token: this.terminals_[It] || It,
line: U.yylineno,
loc: P,
expected: ft
});
}
if (Rt[0] instanceof Array && Rt.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Lt + ", token: " + It);
switch (Rt[0]) {
case 1:
$.push(It), ut.push(U.yytext), W.push(U.yylloc), $.push(Rt[1]), It = null, Z = U.yyleng, K = U.yytext, it = U.yylineno, P = U.yylloc;
break;
case 2:
if (_t = this.productions_[Rt[1]][1], pt.$ = ut[ut.length - _t], pt._$ = {
first_line: W[W.length - (_t || 1)].first_line,
last_line: W[W.length - 1].last_line,
first_column: W[W.length - (_t || 1)].first_column,
last_column: W[W.length - 1].last_column
}, et && (pt._$.range = [
W[W.length - (_t || 1)].range[0],
W[W.length - 1].range[1]
]), Ct = this.performAction.apply(pt, [
K,
Z,
it,
F.yy,
Rt[1],
ut,
W
].concat(q)), typeof Ct < "u")
return Ct;
_t && ($ = $.slice(0, -1 * _t * 2), ut = ut.slice(0, -1 * _t), W = W.slice(0, -1 * _t)), $.push(this.productions_[Rt[1]][0]), ut.push(pt.$), W.push(pt._$), Tt = tt[$[$.length - 2]][$[$.length - 1]], $.push(Tt);
break;
case 3:
return !0;
}
}
return !0;
}
}, z = function() {
var ct = {
EOF: 1,
parseError: function(Y, $) {
if (this.yy.parser)
this.yy.parser.parseError(Y, $);
else
throw new Error(Y);
},
setInput: function(J, Y) {
return this.yy = Y || this.yy || {}, this._input = J, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var J = this._input[0];
this.yytext += J, this.yyleng++, this.offset++, this.match += J, this.matched += J;
var Y = J.match(/(?:\r\n?|\n).*/g);
return Y ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), J;
},
unput: function(J) {
var Y = J.length, $ = J.split(/(?:\r\n?|\n)/g);
this._input = J + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Y), this.offset -= Y;
var lt = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), $.length - 1 && (this.yylineno -= $.length - 1);
var ut = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: $ ? ($.length === lt.length ? this.yylloc.first_column : 0) + lt[lt.length - $.length].length - $[0].length : this.yylloc.first_column - Y
}, this.options.ranges && (this.yylloc.range = [ut[0], ut[0] + this.yyleng - Y]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(J) {
this.unput(this.match.slice(J));
},
pastInput: function() {
var J = this.matched.substr(0, this.matched.length - this.match.length);
return (J.length > 20 ? "..." : "") + J.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var J = this.match;
return J.length < 20 && (J += this._input.substr(0, 20 - J.length)), (J.substr(0, 20) + (J.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var J = this.pastInput(), Y = new Array(J.length + 1).join("-");
return J + this.upcomingInput() + `
` + Y + "^";
},
test_match: function(J, Y) {
var $, lt, ut;
if (this.options.backtrack_lexer && (ut = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (ut.yylloc.range = this.yylloc.range.slice(0))), lt = J[0].match(/(?:\r\n?|\n).*/g), lt && (this.yylineno += lt.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: lt ? lt[lt.length - 1].length - lt[lt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + J[0].length
}, this.yytext += J[0], this.match += J[0], this.matches = J, 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(J[0].length), this.matched += J[0], $ = this.performAction.call(this, this.yy, this, Y, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), $)
return $;
if (this._backtrack) {
for (var W in ut)
this[W] = ut[W];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var J, Y, $, lt;
this._more || (this.yytext = "", this.match = "");
for (var ut = this._currentRules(), W = 0; W < ut.length; W++)
if ($ = this._input.match(this.rules[ut[W]]), $ && (!Y || $[0].length > Y[0].length)) {
if (Y = $, lt = W, this.options.backtrack_lexer) {
if (J = this.test_match($, ut[W]), J !== !1)
return J;
if (this._backtrack) {
Y = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return Y ? (J = this.test_match(Y, ut[lt]), J !== !1 ? J : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var Y = this.next();
return Y || this.lex();
},
begin: function(Y) {
this.conditionStack.push(Y);
},
popState: function() {
var Y = this.conditionStack.length - 1;
return Y > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(Y) {
return Y = this.conditionStack.length - 1 - Math.abs(Y || 0), Y >= 0 ? this.conditionStack[Y] : "INITIAL";
},
pushState: function(Y) {
this.begin(Y);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(Y, $, lt, ut) {
switch (lt) {
case 0:
return 41;
case 1:
return 42;
case 2:
return 43;
case 3:
return 44;
case 4:
return this.begin("open_directive"), 50;
case 5:
return this.begin("type_directive"), 51;
case 6:
return this.popState(), this.begin("arg_directive"), 39;
case 7:
return this.popState(), this.popState(), 53;
case 8:
return 52;
case 9:
break;
case 10:
break;
case 11:
return 5;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
case 16:
return this.pushState("SCALE"), 15;
case 17:
return 16;
case 18:
this.popState();
break;
case 19:
return this.begin("acc_title"), 31;
case 20:
return this.popState(), "acc_title_value";
case 21:
return this.begin("acc_descr"), 33;
case 22:
return this.popState(), "acc_descr_value";
case 23:
this.begin("acc_descr_multiline");
break;
case 24:
this.popState();
break;
case 25:
return "acc_descr_multiline_value";
case 26:
this.pushState("STATE");
break;
case 27:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 23;
case 28:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 24;
case 29:
return this.popState(), $.yytext = $.yytext.slice(0, -10).trim(), 25;
case 30:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 23;
case 31:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 24;
case 32:
return this.popState(), $.yytext = $.yytext.slice(0, -10).trim(), 25;
case 33:
return 41;
case 34:
return 42;
case 35:
return 43;
case 36:
return 44;
case 37:
this.begin("STATE_STRING");
break;
case 38:
return this.popState(), this.pushState("STATE_ID"), "AS";
case 39:
return this.popState(), "ID";
case 40:
this.popState();
break;
case 41:
return "STATE_DESCR";
case 42:
return 17;
case 43:
this.popState();
break;
case 44:
return this.popState(), this.pushState("struct"), 18;
case 45:
return this.popState(), 19;
case 46:
break;
case 47:
return this.begin("NOTE"), 27;
case 48:
return this.popState(), this.pushState("NOTE_ID"), 48;
case 49:
return this.popState(), this.pushState("NOTE_ID"), 49;
case 50:
this.popState(), this.pushState("FLOATING_NOTE");
break;
case 51:
return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
case 52:
break;
case 53:
return "NOTE_TEXT";
case 54:
return this.popState(), "ID";
case 55:
return this.popState(), this.pushState("NOTE_TEXT"), 22;
case 56:
return this.popState(), $.yytext = $.yytext.substr(2).trim(), 29;
case 57:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 29;
case 58:
return 7;
case 59:
return 7;
case 60:
return 14;
case 61:
return 47;
case 62:
return 22;
case 63:
return $.yytext = $.yytext.trim(), 12;
case 64:
return 13;
case 65:
return 26;
case 66:
return 5;
case 67:
return "INVALID";
}
},
rules: [/^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:state\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { LINE: { rules: [13, 14], inclusive: !1 }, close_directive: { rules: [13, 14], inclusive: !1 }, arg_directive: { rules: [7, 8, 13, 14], inclusive: !1 }, type_directive: { rules: [6, 7, 13, 14], inclusive: !1 }, open_directive: { rules: [5, 13, 14], inclusive: !1 }, struct: { rules: [13, 14, 26, 33, 34, 35, 36, 45, 46, 47, 61, 62, 63, 64, 65], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [54], inclusive: !1 }, FLOATING_NOTE: { rules: [51, 52, 53], inclusive: !1 }, NOTE_TEXT: { rules: [56, 57], inclusive: !1 }, NOTE_ID: { rules: [55], inclusive: !1 }, NOTE: { rules: [48, 49, 50], inclusive: !1 }, acc_descr_multiline: { rules: [24, 25], inclusive: !1 }, acc_descr: { rules: [22], inclusive: !1 }, acc_title: { rules: [20], inclusive: !1 }, SCALE: { rules: [17, 18], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [39], inclusive: !1 }, STATE_STRING: { rules: [40, 41], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [13, 14, 27, 28, 29, 30, 31, 32, 37, 38, 42, 43, 44], inclusive: !1 }, ID: { rules: [13, 14], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 9, 10, 11, 12, 14, 15, 16, 19, 21, 23, 26, 44, 47, 58, 59, 60, 61, 62, 63, 64, 66, 67], inclusive: !0 } }
};
return ct;
}();
N.lexer = z;
function X() {
this.yy = {};
}
return X.prototype = N, N.Parser = X, new X();
}();
n1.parser = n1;
const hot = (t, e) => {
var r;
return ((r = e == null ? void 0 : e.state) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !1 : t.match(/^\s*stateDiagram/) !== null;
}, fot = (t, e) => {
var r;
return !!(t.match(/^\s*stateDiagram-v2/) !== null || t.match(/^\s*stateDiagram/) && ((r = e == null ? void 0 : e.state) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper");
}, uh = (t) => JSON.parse(JSON.stringify(t));
let i1 = [];
const dot = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, pot = (t) => {
H.info("Setting root doc", t), i1 = t;
}, got = () => i1, Oh = (t, e, r) => {
if (e.stmt === "relation")
Oh(t, e.state1, !0), Oh(t, e.state2, !1);
else if (e.stmt === "state" && e.id === "[*]" && (e.id = r ? t.id + "_start" : t.id + "_end", e.start = r), e.doc) {
const n = [];
let i = 0, a = [];
for (i = 0; i < e.doc.length; i++)
if (e.doc[i].type === "divider") {
const s = uh(e.doc[i]);
s.doc = uh(a), n.push(s), a = [];
} else
a.push(e.doc[i]);
if (n.length > 0 && a.length > 0) {
const s = {
stmt: "state",
id: DS(),
type: "divider",
doc: uh(a)
};
n.push(uh(s)), e.doc = n;
}
e.doc.forEach((s) => Oh(e, s, !0));
}
}, yot = () => (Oh({ id: "root" }, { id: "root", doc: i1 }, !0), { id: "root", doc: i1 }), mot = (t) => {
let e;
t.doc ? e = t.doc : e = t, H.info(e), $L(!0), H.info("Extract", e), e.forEach((r) => {
r.stmt === "state" && a1(r.id, r.type, r.doc, r.description, r.note), r.stmt === "relation" && XL(r.state1.id, r.state2.id, r.description);
});
}, jL = () => ({
relations: [],
states: {},
documents: {}
});
let hc = {
root: jL()
}, Hr = hc.root, Fh = 0;
const a1 = function(t, e, r, n, i) {
typeof Hr.states[t] > "u" ? Hr.states[t] = {
id: t,
descriptions: [],
type: e,
doc: r,
note: i
} : (Hr.states[t].doc || (Hr.states[t].doc = r), Hr.states[t].type || (Hr.states[t].type = e)), n && (H.info("Adding state ", t, n), typeof n == "string" && cw(t, n.trim()), typeof n == "object" && n.forEach((a) => cw(t, a.trim()))), i && (Hr.states[t].note = i, Hr.states[t].note.text = pe.sanitizeText(
Hr.states[t].note.text,
nt()
));
}, $L = function(t) {
hc = {
root: jL()
}, Hr = hc.root, Hr = hc.root, Fh = 0, KL = [], t || gi();
}, bot = function(t) {
return Hr.states[t];
}, _ot = function() {
return Hr.states;
}, vot = function() {
H.info("Documents = ", hc);
}, xot = function() {
return Hr.relations;
}, XL = function(t, e, r) {
let n = t, i = e, a = "default", s = "default";
t === "[*]" && (Fh++, n = "start" + Fh, a = "start"), e === "[*]" && (i = "end" + Fh, s = "end"), a1(n, a), a1(i, s), Hr.relations.push({
id1: n,
id2: i,
title: pe.sanitizeText(r, nt())
});
}, cw = function(t, e) {
const r = Hr.states[t];
let n = e;
n[0] === ":" && (n = n.substr(1).trim()), r.descriptions.push(pe.sanitizeText(n, nt()));
}, kot = function(t) {
return t.substring(0, 1) === ":" ? t.substr(2).trim() : t.trim();
}, wot = {
LINE: 0,
DOTTED_LINE: 1
};
let uw = 0;
const Tot = () => (uw++, "divider-id-" + uw);
let KL = [];
const Eot = () => KL;
let ZL = "TB";
const Cot = () => ZL, Sot = (t) => {
ZL = t;
}, Aot = {
AGGREGATION: 0,
EXTENSION: 1,
COMPOSITION: 2,
DEPENDENCY: 3
}, Mot = (t) => t && t[0] === ":" ? t.substr(1).trim() : t.trim(), ca = {
parseDirective: dot,
getConfig: () => nt().state,
addState: a1,
clear: $L,
getState: bot,
getStates: _ot,
getRelations: xot,
getClasses: Eot,
getDirection: Cot,
addRelation: XL,
getDividerId: Tot,
setDirection: Sot,
cleanupLabel: kot,
lineType: wot,
relationType: Aot,
logDocuments: vot,
getRootDoc: got,
setRootDoc: pot,
getRootDocV2: yot,
extract: mot,
trimColon: Mot,
getAccTitle: yi,
setAccTitle: Yn,
getAccDescription: bi,
setAccDescription: mi
}, Lot = (t) => t.append("circle").attr("class", "start-state").attr("r", nt().state.sizeUnit).attr("cx", nt().state.padding + nt().state.sizeUnit).attr("cy", nt().state.padding + nt().state.sizeUnit), Rot = (t) => t.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", nt().state.textHeight).attr("class", "divider").attr("x2", nt().state.textHeight * 2).attr("y1", 0).attr("y2", 0), Iot = (t, e) => {
const r = t.append("text").attr("x", 2 * nt().state.padding).attr("y", nt().state.textHeight + 2 * nt().state.padding).attr("font-size", nt().state.fontSize).attr("class", "state-title").text(e.id), n = r.node().getBBox();
return t.insert("rect", ":first-child").attr("x", nt().state.padding).attr("y", nt().state.padding).attr("width", n.width + 2 * nt().state.padding).attr("height", n.height + 2 * nt().state.padding).attr("rx", nt().state.radius), r;
}, Not = (t, e) => {
const r = function(f, p, m) {
const _ = f.append("tspan").attr("x", 2 * nt().state.padding).text(p);
m || _.attr("dy", nt().state.textHeight);
}, i = t.append("text").attr("x", 2 * nt().state.padding).attr("y", nt().state.textHeight + 1.3 * nt().state.padding).attr("font-size", nt().state.fontSize).attr("class", "state-title").text(e.descriptions[0]).node().getBBox(), a = i.height, s = t.append("text").attr("x", nt().state.padding).attr(
"y",
a + nt().state.padding * 0.4 + nt().state.dividerMargin + nt().state.textHeight
).attr("class", "state-description");
let o = !0, l = !0;
e.descriptions.forEach(function(f) {
o || (r(s, f, l), l = !1), o = !1;
});
const u = t.append("line").attr("x1", nt().state.padding).attr("y1", nt().state.padding + a + nt().state.dividerMargin / 2).attr("y2", nt().state.padding + a + nt().state.dividerMargin / 2).attr("class", "descr-divider"), h = s.node().getBBox(), d = Math.max(h.width, i.width);
return u.attr("x2", d + 3 * nt().state.padding), t.insert("rect", ":first-child").attr("x", nt().state.padding).attr("y", nt().state.padding).attr("width", d + 2 * nt().state.padding).attr("height", h.height + a + 2 * nt().state.padding).attr("rx", nt().state.radius), t;
}, Bot = (t, e, r) => {
const n = nt().state.padding, i = 2 * nt().state.padding, a = t.node().getBBox(), s = a.width, o = a.x, l = t.append("text").attr("x", 0).attr("y", nt().state.titleShift).attr("font-size", nt().state.fontSize).attr("class", "state-title").text(e.id), h = l.node().getBBox().width + i;
let d = Math.max(h, s);
d === s && (d = d + i);
let f;
const p = t.node().getBBox();
e.doc, f = o - n, h > s && (f = (s - d) / 2 + n), Math.abs(o - p.x) < n && h > s && (f = o - (h - s) / 2);
const m = 1 - nt().state.textHeight;
return t.insert("rect", ":first-child").attr("x", f).attr("y", m).attr("class", r ? "alt-composit" : "composit").attr("width", d).attr(
"height",
p.height + nt().state.textHeight + nt().state.titleShift + 1
).attr("rx", "0"), l.attr("x", f + n), h <= s && l.attr("x", o + (d - i) / 2 - h / 2 + n), t.insert("rect", ":first-child").attr("x", f).attr(
"y",
nt().state.titleShift - nt().state.textHeight - nt().state.padding
).attr("width", d).attr("height", nt().state.textHeight * 3).attr("rx", nt().state.radius), t.insert("rect", ":first-child").attr("x", f).attr(
"y",
nt().state.titleShift - nt().state.textHeight - nt().state.padding
).attr("width", d).attr("height", p.height + 3 + 2 * nt().state.textHeight).attr("rx", nt().state.radius), t;
}, Dot = (t) => (t.append("circle").attr("class", "end-state-outer").attr("r", nt().state.sizeUnit + nt().state.miniPadding).attr(
"cx",
nt().state.padding + nt().state.sizeUnit + nt().state.miniPadding
).attr(
"cy",
nt().state.padding + nt().state.sizeUnit + nt().state.miniPadding
), t.append("circle").attr("class", "end-state-inner").attr("r", nt().state.sizeUnit).attr("cx", nt().state.padding + nt().state.sizeUnit + 2).attr("cy", nt().state.padding + nt().state.sizeUnit + 2)), Oot = (t, e) => {
let r = nt().state.forkWidth, n = nt().state.forkHeight;
if (e.parentId) {
let i = r;
r = n, n = i;
}
return t.append("rect").style("stroke", "black").style("fill", "black").attr("width", r).attr("height", n).attr("x", nt().state.padding).attr("y", nt().state.padding);
}, Fot = (t, e, r, n) => {
let i = 0;
const a = n.append("text");
a.style("text-anchor", "start"), a.attr("class", "noteText");
let s = t.replace(/\r\n/g, "
");
s = s.replace(/\n/g, "
");
const o = s.split(pe.lineBreakRegex);
let l = 1.25 * nt().state.noteMargin;
for (const u of o) {
const h = u.trim();
if (h.length > 0) {
const d = a.append("tspan");
d.text(h), l === 0 && (l += d.node().getBBox().height), i += l, d.attr("x", e + nt().state.noteMargin), d.attr("y", r + i + 1.25 * nt().state.noteMargin);
}
}
return { textWidth: a.node().getBBox().width, textHeight: i };
}, Pot = (t, e) => {
e.attr("class", "state-note");
const r = e.append("rect").attr("x", 0).attr("y", nt().state.padding), n = e.append("g"), { textWidth: i, textHeight: a } = Fot(t, 0, 0, n);
return r.attr("height", a + 2 * nt().state.noteMargin), r.attr("width", i + nt().state.noteMargin * 2), r;
}, hw = function(t, e) {
const r = e.id, n = {
id: r,
label: e.id,
width: 0,
height: 0
}, i = t.append("g").attr("id", r).attr("class", "stateGroup");
e.type === "start" && Lot(i), e.type === "end" && Dot(i), (e.type === "fork" || e.type === "join") && Oot(i, e), e.type === "note" && Pot(e.note.text, i), e.type === "divider" && Rot(i), e.type === "default" && e.descriptions.length === 0 && Iot(i, e), e.type === "default" && e.descriptions.length > 0 && Not(i, e);
const a = i.node().getBBox();
return n.width = a.width + 2 * nt().state.padding, n.height = a.height + 2 * nt().state.padding, n;
};
let fw = 0;
const qot = function(t, e, r) {
const n = function(l) {
switch (l) {
case ca.relationType.AGGREGATION:
return "aggregation";
case ca.relationType.EXTENSION:
return "extension";
case ca.relationType.COMPOSITION:
return "composition";
case ca.relationType.DEPENDENCY:
return "dependency";
}
};
e.points = e.points.filter((l) => !Number.isNaN(l.y));
const i = e.points, a = ns().x(function(l) {
return l.x;
}).y(function(l) {
return l.y;
}).curve(Ps), s = t.append("path").attr("d", a(i)).attr("id", "edge" + fw).attr("class", "transition");
let o = "";
if (nt().state.arrowMarkerAbsolute && (o = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, o = o.replace(/\(/g, "\\("), o = o.replace(/\)/g, "\\)")), s.attr(
"marker-end",
"url(" + o + "#" + n(ca.relationType.DEPENDENCY) + "End)"
), typeof r.title < "u") {
const l = t.append("g").attr("class", "stateLabel"), { x: u, y: h } = Se.calcLabelPosition(e.points), d = pe.getRows(r.title);
let f = 0;
const p = [];
let m = 0, _ = 0;
for (let x = 0; x <= d.length; x++) {
const k = l.append("text").attr("text-anchor", "middle").text(d[x]).attr("x", u).attr("y", h + f), T = k.node().getBBox();
m = Math.max(m, T.width), _ = Math.min(_, T.x), H.info(T.x, u, h + f), f === 0 && (f = k.node().getBBox().height, H.info("Title height", f, h)), p.push(k);
}
let y = f * d.length;
if (d.length > 1) {
const x = (d.length - 1) * f * 0.5;
p.forEach((k, T) => k.attr("y", h + T * f - x)), y = f * d.length;
}
const b = l.node().getBBox();
l.insert("rect", ":first-child").attr("class", "box").attr("x", u - m / 2 - nt().state.padding / 2).attr("y", h - y / 2 - nt().state.padding / 2 - 3.5).attr("width", m + nt().state.padding).attr("height", y + nt().state.padding), H.info(b);
}
fw++;
};
let Sn;
const rm = {}, Vot = function() {
}, zot = function(t) {
t.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
}, Yot = function(t, e, r, n) {
Sn = nt().state;
const i = nt().securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const s = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body"), o = i === "sandbox" ? a.nodes()[0].contentDocument : document;
H.debug("Rendering diagram " + t);
const l = s.select(`[id='${e}']`);
zot(l), new ur.Graph({
multigraph: !0,
compound: !0,
rankdir: "RL"
}).setDefaultEdgeLabel(function() {
return {};
});
const h = n.db.getRootDoc();
QL(h, l, void 0, !1, s, o, n);
const d = Sn.padding, f = l.node().getBBox(), p = f.width + d * 2, m = f.height + d * 2, _ = p * 1.75;
pi(l, m, _, Sn.useMaxWidth), l.attr(
"viewBox",
`${f.x - Sn.padding} ${f.y - Sn.padding} ` + p + " " + m
), vn(n.db, l, e);
}, Uot = (t) => t ? t.length * Sn.fontSizeFactor : 1, QL = (t, e, r, n, i, a, s) => {
const o = new ur.Graph({
compound: !0,
multigraph: !0
});
let l, u = !0;
for (l = 0; l < t.length; l++)
if (t[l].stmt === "relation") {
u = !1;
break;
}
r ? o.setGraph({
rankdir: "LR",
multigraph: !0,
compound: !0,
ranker: "tight-tree",
ranksep: u ? 1 : Sn.edgeLengthFactor,
nodeSep: u ? 1 : 50,
isMultiGraph: !0
}) : o.setGraph({
rankdir: "TB",
multigraph: !0,
compound: !0,
ranksep: u ? 1 : Sn.edgeLengthFactor,
nodeSep: u ? 1 : 50,
ranker: "tight-tree",
isMultiGraph: !0
}), o.setDefaultEdgeLabel(function() {
return {};
}), s.db.extract(t);
const h = s.db.getStates(), d = s.db.getRelations(), f = Object.keys(h);
for (let b = 0; b < f.length; b++) {
const x = h[f[b]];
r && (x.parentId = r);
let k;
if (x.doc) {
let T = e.append("g").attr("id", x.id).attr("class", "stateGroup");
k = QL(x.doc, T, x.id, !n, i, a, s);
{
T = Bot(T, x, n);
let C = T.node().getBBox();
k.width = C.width, k.height = C.height + Sn.padding / 2, rm[x.id] = { y: Sn.compositTitleSize };
}
} else
k = hw(e, x);
if (x.note) {
const T = {
descriptions: [],
id: x.id + "-note",
note: x.note,
type: "note"
}, C = hw(e, T);
x.note.position === "left of" ? (o.setNode(k.id + "-note", C), o.setNode(k.id, k)) : (o.setNode(k.id, k), o.setNode(k.id + "-note", C)), o.setParent(k.id, k.id + "-group"), o.setParent(k.id + "-note", k.id + "-group");
} else
o.setNode(k.id, k);
}
H.debug("Count=", o.nodeCount(), o);
let p = 0;
d.forEach(function(b) {
p++, H.debug("Setting edge", b), o.setEdge(
b.id1,
b.id2,
{
relation: b,
width: Uot(b.title),
height: Sn.labelHeight * pe.getRows(b.title).length,
labelpos: "c"
},
"id" + p
);
}), hu.layout(o), H.debug("Graph after layout", o.nodes());
const m = e.node();
o.nodes().forEach(function(b) {
typeof b < "u" && typeof o.node(b) < "u" ? (H.warn("Node " + b + ": " + JSON.stringify(o.node(b))), i.select("#" + m.id + " #" + b).attr(
"transform",
"translate(" + (o.node(b).x - o.node(b).width / 2) + "," + (o.node(b).y + (rm[b] ? rm[b].y : 0) - o.node(b).height / 2) + " )"
), i.select("#" + m.id + " #" + b).attr("data-x-shift", o.node(b).x - o.node(b).width / 2), a.querySelectorAll("#" + m.id + " #" + b + " .divider").forEach((k) => {
const T = k.parentElement;
let C = 0, M = 0;
T && (T.parentElement && (C = T.parentElement.getBBox().width), M = parseInt(T.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), k.setAttribute("x1", 0 - M + 8), k.setAttribute("x2", C - M - 8);
})) : H.debug("No Node " + b + ": " + JSON.stringify(o.node(b)));
});
let _ = m.getBBox();
o.edges().forEach(function(b) {
typeof b < "u" && typeof o.edge(b) < "u" && (H.debug("Edge " + b.v + " -> " + b.w + ": " + JSON.stringify(o.edge(b))), qot(e, o.edge(b), o.edge(b).relation));
}), _ = m.getBBox();
const y = {
id: r || "root",
label: r || "root",
width: 0,
height: 0
};
return y.width = _.width + 2 * Sn.padding, y.height = _.height + 2 * Sn.padding, H.debug("Doc rendered", y, o), y;
}, Wot = {
setConf: Vot,
draw: Yot
}, Hot = {}, Got = function(t) {
const e = Object.keys(t);
for (let r = 0; r < e.length; r++)
Hot[e[r]] = t[e[r]];
};
let Pe = {};
const jot = function(t, e) {
return H.trace("Extracting classes"), e.sb.clear(), e.parser.parse(t), e.sb.getClasses();
}, Ph = (t, e, r, n) => {
if (r.id !== "root") {
let i = "rect";
r.start === !0 && (i = "start"), r.start === !1 && (i = "end"), r.type !== "default" && (i = r.type), Pe[r.id] || (Pe[r.id] = {
id: r.id,
shape: i,
description: pe.sanitizeText(r.id, nt()),
classes: "statediagram-state"
}), r.description && (Array.isArray(Pe[r.id].description) ? (Pe[r.id].shape = "rectWithTitle", Pe[r.id].description.push(r.description)) : Pe[r.id].description.length > 0 ? (Pe[r.id].shape = "rectWithTitle", Pe[r.id].description === r.id ? Pe[r.id].description = [r.description] : Pe[r.id].description = [Pe[r.id].description, r.description]) : (Pe[r.id].shape = "rect", Pe[r.id].description = r.description), Pe[r.id].description = pe.sanitizeTextOrArray(
Pe[r.id].description,
nt()
)), Pe[r.id].description.length === 1 && Pe[r.id].shape === "rectWithTitle" && (Pe[r.id].shape = "rect"), !Pe[r.id].type && r.doc && (H.info("Setting cluster for ", r.id, Bb(r)), Pe[r.id].type = "group", Pe[r.id].dir = Bb(r), Pe[r.id].shape = r.type === "divider" ? "divider" : "roundedWithTitle", Pe[r.id].classes = Pe[r.id].classes + " " + (n ? "statediagram-cluster statediagram-cluster-alt" : "statediagram-cluster"));
const a = {
labelStyle: "",
shape: Pe[r.id].shape,
labelText: Pe[r.id].description,
classes: Pe[r.id].classes,
style: "",
id: r.id,
dir: Pe[r.id].dir,
domId: "state-" + r.id + "-" + Ba,
type: Pe[r.id].type,
padding: 15
};
if (r.note) {
const s = {
labelStyle: "",
shape: "note",
labelText: r.note.text,
classes: "statediagram-note",
style: "",
id: r.id + "----note-" + Ba,
domId: "state-" + r.id + "----note-" + Ba,
type: Pe[r.id].type,
padding: 15
}, o = {
labelStyle: "",
shape: "noteGroup",
labelText: r.note.text,
classes: Pe[r.id].classes,
style: "",
id: r.id + "----parent",
domId: "state-" + r.id + "----parent-" + Ba,
type: "group",
padding: 0
};
Ba++, t.setNode(r.id + "----parent", o), t.setNode(s.id, s), t.setNode(r.id, a), t.setParent(r.id, r.id + "----parent"), t.setParent(s.id, r.id + "----parent");
let l = r.id, u = s.id;
r.note.position === "left of" && (l = s.id, u = r.id), t.setEdge(l, u, {
arrowhead: "none",
arrowType: "",
style: "fill:none",
labelStyle: "",
classes: "transition note-edge",
arrowheadStyle: "fill: #333",
labelpos: "c",
labelType: "text",
thickness: "normal"
});
} else
t.setNode(r.id, a);
}
e && e.id !== "root" && (H.trace("Setting node ", r.id, " to be child of its parent ", e.id), t.setParent(r.id, e.id)), r.doc && (H.trace("Adding nodes children "), $ot(t, r, r.doc, !n));
};
let Ba = 0;
const $ot = (t, e, r, n) => {
H.trace("items", r), r.forEach((i) => {
if (i.stmt === "state" || i.stmt === "default")
Ph(t, e, i, n);
else if (i.stmt === "relation") {
Ph(t, e, i.state1, n), Ph(t, e, i.state2, n);
const a = {
id: "edge" + Ba,
arrowhead: "normal",
arrowTypeEnd: "arrow_barb",
style: "fill:none",
labelStyle: "",
label: pe.sanitizeText(i.description, nt()),
arrowheadStyle: "fill: #333",
labelpos: "c",
labelType: "text",
thickness: "normal",
classes: "transition"
};
let s = i.state1.id, o = i.state2.id;
t.setEdge(s, o, a, Ba), Ba++;
}
});
}, Bb = (t, e) => {
let r = e || "TB";
if (t.doc)
for (let n = 0; n < t.doc.length; n++) {
const i = t.doc[n];
i.stmt === "dir" && (r = i.value);
}
return r;
}, Xot = function(t, e, r, n) {
H.info("Drawing state diagram (v2)", e), Pe = {}, n.db.getDirection();
const { securityLevel: i, state: a } = nt(), s = a.nodeSpacing || 50, o = a.rankSpacing || 50;
H.info(n.db.getRootDocV2()), n.db.extract(n.db.getRootDocV2()), H.info(n.db.getRootDocV2());
const l = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: Bb(n.db.getRootDocV2()),
nodesep: s,
ranksep: o,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
Ph(l, void 0, n.db.getRootDocV2(), !0);
let u;
i === "sandbox" && (u = St("#i" + e));
const h = St(i === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), d = h.select(`[id="${e}"]`), f = h.select("#" + e + " g");
U4(f, l, ["barb"], "statediagram", e);
const p = 8, m = d.node().getBBox(), _ = m.width + p * 2, y = m.height + p * 2;
d.attr("class", "statediagram");
const b = d.node().getBBox();
pi(d, y, _, a.useMaxWidth);
const x = `${b.x - p} ${b.y - p} ${_} ${y}`;
H.debug(`viewBox ${x}`), d.attr("viewBox", x);
const k = document.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (let T = 0; T < k.length; T++) {
const C = k[T], M = C.getBBox(), S = document.createElementNS("http://www.w3.org/2000/svg", "rect");
S.setAttribute("rx", 0), S.setAttribute("ry", 0), S.setAttribute("width", M.width), S.setAttribute("height", M.height), C.insertBefore(S, C.firstChild);
}
vn(n.db, d, e);
}, Kot = {
setConf: Got,
getClasses: jot,
draw: Xot
};
var Db = function() {
var t = function(_, y, b, x) {
for (b = b || {}, x = _.length; x--; b[_[x]] = y)
;
return b;
}, e = [1, 2], r = [1, 5], n = [6, 9, 11, 17, 18, 20, 22, 23, 24, 26], i = [1, 15], a = [1, 16], s = [1, 17], o = [1, 18], l = [1, 19], u = [1, 20], h = [1, 24], d = [4, 6, 9, 11, 17, 18, 20, 22, 23, 24, 26], f = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, journey: 4, document: 5, EOF: 6, directive: 7, line: 8, SPACE: 9, statement: 10, NEWLINE: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, ":": 15, argDirective: 16, title: 17, acc_title: 18, acc_title_value: 19, acc_descr: 20, acc_descr_value: 21, acc_descr_multiline_value: 22, section: 23, taskName: 24, taskData: 25, open_directive: 26, type_directive: 27, arg_directive: 28, close_directive: 29, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "journey", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 24: "taskName", 25: "taskData", 26: "open_directive", 27: "type_directive", 28: "arg_directive", 29: "close_directive" },
productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
performAction: function(y, b, x, k, T, C, M) {
var S = C.length - 1;
switch (T) {
case 1:
return C[S - 1];
case 3:
this.$ = [];
break;
case 4:
C[S - 1].push(C[S]), this.$ = C[S - 1];
break;
case 5:
case 6:
this.$ = C[S];
break;
case 7:
case 8:
this.$ = [];
break;
case 11:
k.setDiagramTitle(C[S].substr(6)), this.$ = C[S].substr(6);
break;
case 12:
this.$ = C[S].trim(), k.setAccTitle(this.$);
break;
case 13:
case 14:
this.$ = C[S].trim(), k.setAccDescription(this.$);
break;
case 15:
k.addSection(C[S].substr(8)), this.$ = C[S].substr(8);
break;
case 16:
k.addTask(C[S - 1], C[S]), this.$ = "task";
break;
case 18:
k.parseDirective("%%{", "open_directive");
break;
case 19:
k.parseDirective(C[S], "type_directive");
break;
case 20:
C[S] = C[S].trim().replace(/'/g, '"'), k.parseDirective(C[S], "arg_directive");
break;
case 21:
k.parseDirective("}%%", "close_directive", "journey");
break;
}
},
table: [{ 3: 1, 4: e, 7: 3, 12: 4, 26: r }, { 1: [3] }, t(n, [2, 3], { 5: 6 }), { 3: 7, 4: e, 7: 3, 12: 4, 26: r }, { 13: 8, 27: [1, 9] }, { 27: [2, 18] }, { 6: [1, 10], 7: 21, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: i, 18: a, 20: s, 22: o, 23: l, 24: u, 26: r }, { 1: [2, 2] }, { 14: 22, 15: [1, 23], 29: h }, t([15, 29], [2, 19]), t(n, [2, 8], { 1: [2, 1] }), t(n, [2, 4]), { 7: 21, 10: 25, 12: 4, 17: i, 18: a, 20: s, 22: o, 23: l, 24: u, 26: r }, t(n, [2, 6]), t(n, [2, 7]), t(n, [2, 11]), { 19: [1, 26] }, { 21: [1, 27] }, t(n, [2, 14]), t(n, [2, 15]), { 25: [1, 28] }, t(n, [2, 17]), { 11: [1, 29] }, { 16: 30, 28: [1, 31] }, { 11: [2, 21] }, t(n, [2, 5]), t(n, [2, 12]), t(n, [2, 13]), t(n, [2, 16]), t(d, [2, 9]), { 14: 32, 29: h }, { 29: [2, 20] }, { 11: [1, 33] }, t(d, [2, 10])],
defaultActions: { 5: [2, 18], 7: [2, 2], 24: [2, 21], 31: [2, 20] },
parseError: function(y, b) {
if (b.recoverable)
this.trace(y);
else {
var x = new Error(y);
throw x.hash = b, x;
}
},
parse: function(y) {
var b = this, x = [0], k = [], T = [null], C = [], M = this.table, S = "", R = 0, A = 0, L = 2, v = 1, B = C.slice.call(arguments, 1), w = Object.create(this.lexer), D = { yy: {} };
for (var N in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, N) && (D.yy[N] = this.yy[N]);
w.setInput(y, D.yy), D.yy.lexer = w, D.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
var z = w.yylloc;
C.push(z);
var X = w.options && w.options.ranges;
typeof D.yy.parseError == "function" ? this.parseError = D.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function ct() {
var V;
return V = k.pop() || w.lex() || v, typeof V != "number" && (V instanceof Array && (k = V, V = k.pop()), V = b.symbols_[V] || V), V;
}
for (var J, Y, $, lt, ut = {}, W, tt, K, it; ; ) {
if (Y = x[x.length - 1], this.defaultActions[Y] ? $ = this.defaultActions[Y] : ((J === null || typeof J > "u") && (J = ct()), $ = M[Y] && M[Y][J]), typeof $ > "u" || !$.length || !$[0]) {
var Z = "";
it = [];
for (W in M[Y])
this.terminals_[W] && W > L && it.push("'" + this.terminals_[W] + "'");
w.showPosition ? Z = "Parse error on line " + (R + 1) + `:
` + w.showPosition() + `
Expecting ` + it.join(", ") + ", got '" + (this.terminals_[J] || J) + "'" : Z = "Parse error on line " + (R + 1) + ": Unexpected " + (J == v ? "end of input" : "'" + (this.terminals_[J] || J) + "'"), this.parseError(Z, {
text: w.match,
token: this.terminals_[J] || J,
line: w.yylineno,
loc: z,
expected: it
});
}
if ($[0] instanceof Array && $.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Y + ", token: " + J);
switch ($[0]) {
case 1:
x.push(J), T.push(w.yytext), C.push(w.yylloc), x.push($[1]), J = null, A = w.yyleng, S = w.yytext, R = w.yylineno, z = w.yylloc;
break;
case 2:
if (tt = this.productions_[$[1]][1], ut.$ = T[T.length - tt], ut._$ = {
first_line: C[C.length - (tt || 1)].first_line,
last_line: C[C.length - 1].last_line,
first_column: C[C.length - (tt || 1)].first_column,
last_column: C[C.length - 1].last_column
}, X && (ut._$.range = [
C[C.length - (tt || 1)].range[0],
C[C.length - 1].range[1]
]), lt = this.performAction.apply(ut, [
S,
A,
R,
D.yy,
$[1],
T,
C
].concat(B)), typeof lt < "u")
return lt;
tt && (x = x.slice(0, -1 * tt * 2), T = T.slice(0, -1 * tt), C = C.slice(0, -1 * tt)), x.push(this.productions_[$[1]][0]), T.push(ut.$), C.push(ut._$), K = M[x[x.length - 2]][x[x.length - 1]], x.push(K);
break;
case 3:
return !0;
}
}
return !0;
}
}, p = function() {
var _ = {
EOF: 1,
parseError: function(b, x) {
if (this.yy.parser)
this.yy.parser.parseError(b, x);
else
throw new Error(b);
},
setInput: function(y, b) {
return this.yy = b || this.yy || {}, this._input = y, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var y = this._input[0];
this.yytext += y, this.yyleng++, this.offset++, this.match += y, this.matched += y;
var b = y.match(/(?:\r\n?|\n).*/g);
return b ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), y;
},
unput: function(y) {
var b = y.length, x = y.split(/(?:\r\n?|\n)/g);
this._input = y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - b), this.offset -= b;
var k = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), x.length - 1 && (this.yylineno -= x.length - 1);
var T = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: x ? (x.length === k.length ? this.yylloc.first_column : 0) + k[k.length - x.length].length - x[0].length : this.yylloc.first_column - b
}, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - b]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(y) {
this.unput(this.match.slice(y));
},
pastInput: function() {
var y = this.matched.substr(0, this.matched.length - this.match.length);
return (y.length > 20 ? "..." : "") + y.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var y = this.match;
return y.length < 20 && (y += this._input.substr(0, 20 - y.length)), (y.substr(0, 20) + (y.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var y = this.pastInput(), b = new Array(y.length + 1).join("-");
return y + this.upcomingInput() + `
` + b + "^";
},
test_match: function(y, b) {
var x, k, T;
if (this.options.backtrack_lexer && (T = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), k = y[0].match(/(?:\r\n?|\n).*/g), k && (this.yylineno += k.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: k ? k[k.length - 1].length - k[k.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + y[0].length
}, this.yytext += y[0], this.match += y[0], this.matches = y, 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(y[0].length), this.matched += y[0], x = this.performAction.call(this, this.yy, this, b, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
return x;
if (this._backtrack) {
for (var C in T)
this[C] = T[C];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var y, b, x, k;
this._more || (this.yytext = "", this.match = "");
for (var T = this._currentRules(), C = 0; C < T.length; C++)
if (x = this._input.match(this.rules[T[C]]), x && (!b || x[0].length > b[0].length)) {
if (b = x, k = C, this.options.backtrack_lexer) {
if (y = this.test_match(x, T[C]), y !== !1)
return y;
if (this._backtrack) {
b = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return b ? (y = this.test_match(b, T[k]), y !== !1 ? y : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var b = this.next();
return b || this.lex();
},
begin: function(b) {
this.conditionStack.push(b);
},
popState: function() {
var b = this.conditionStack.length - 1;
return b > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(b) {
return b = this.conditionStack.length - 1 - Math.abs(b || 0), b >= 0 ? this.conditionStack[b] : "INITIAL";
},
pushState: function(b) {
this.begin(b);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(b, x, k, T) {
switch (k) {
case 0:
return this.begin("open_directive"), 26;
case 1:
return this.begin("type_directive"), 27;
case 2:
return this.popState(), this.begin("arg_directive"), 15;
case 3:
return this.popState(), this.popState(), 29;
case 4:
return 28;
case 5:
break;
case 6:
break;
case 7:
return 11;
case 8:
break;
case 9:
break;
case 10:
return 4;
case 11:
return 17;
case 12:
return this.begin("acc_title"), 18;
case 13:
return this.popState(), "acc_title_value";
case 14:
return this.begin("acc_descr"), 20;
case 15:
return this.popState(), "acc_descr_value";
case 16:
this.begin("acc_descr_multiline");
break;
case 17:
this.popState();
break;
case 18:
return "acc_descr_multiline_value";
case 19:
return 23;
case 20:
return 24;
case 21:
return 25;
case 22:
return 15;
case 23:
return 6;
case 24:
return "INVALID";
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { open_directive: { rules: [1], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, acc_descr_multiline: { rules: [17, 18], inclusive: !1 }, acc_descr: { rules: [15], inclusive: !1 }, acc_title: { rules: [13], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 20, 21, 22, 23, 24], inclusive: !0 } }
};
return _;
}();
f.lexer = p;
function m() {
this.yy = {};
}
return m.prototype = f, f.Parser = m, new m();
}();
Db.parser = Db;
const Zot = (t) => t.match(/^\s*journey/) !== null;
let rl = "";
const o_ = [], Hc = [], Mo = [], Qot = function(t, e, r) {
er.parseDirective(this, t, e, r);
}, Jot = function() {
o_.length = 0, Hc.length = 0, rl = "", Mo.length = 0, gi();
}, tlt = function(t) {
rl = t, o_.push(t);
}, elt = function() {
return o_;
}, rlt = function() {
let t = dw();
const e = 100;
let r = 0;
for (; !t && r < e; )
t = dw(), r++;
return Hc.push(...Mo), Hc;
}, nlt = function() {
const t = [];
return Hc.forEach((r) => {
r.people && t.push(...r.people);
}), [...new Set(t)].sort();
}, ilt = function(t, e) {
const r = e.substr(1).split(":");
let n = 0, i = [];
r.length === 1 ? (n = Number(r[0]), i = []) : (n = Number(r[0]), i = r[1].split(","));
const a = i.map((o) => o.trim()), s = {
section: rl,
type: rl,
people: a,
task: t,
score: n
};
Mo.push(s);
}, alt = function(t) {
const e = {
section: rl,
type: rl,
description: t,
task: t,
classes: []
};
Hc.push(e);
}, dw = function() {
const t = function(r) {
return Mo[r].processed;
};
let e = !0;
for (let r = 0; r < Mo.length; r++)
t(r), e = e && Mo[r].processed;
return e;
}, slt = function() {
return nlt();
}, pw = {
parseDirective: Qot,
getConfig: () => nt().journey,
clear: Jot,
setDiagramTitle: a0,
getDiagramTitle: s0,
setAccTitle: Yn,
getAccTitle: yi,
setAccDescription: mi,
getAccDescription: bi,
addSection: tlt,
getSections: elt,
getTasks: rlt,
addTask: ilt,
addTaskOrg: alt,
getActors: slt
}, A0 = function(t, e) {
const r = t.append("rect");
return r.attr("x", e.x), r.attr("y", e.y), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("width", e.width), r.attr("height", e.height), r.attr("rx", e.rx), r.attr("ry", e.ry), typeof e.class < "u" && r.attr("class", e.class), r;
}, olt = function(t, e) {
const n = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = t.append("g");
i.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), i.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
function a(l) {
const u = wf().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
l.append("path").attr("class", "mouth").attr("d", u).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
}
function s(l) {
const u = wf().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
l.append("path").attr("class", "mouth").attr("d", u).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
}
function o(l) {
l.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
}
return e.score > 3 ? a(i) : e.score < 3 ? s(i) : o(i), n;
}, JL = function(t, e) {
const r = t.append("circle");
return r.attr("cx", e.cx), r.attr("cy", e.cy), r.attr("class", "actor-" + e.pos), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("r", e.r), typeof r.class < "u" && r.attr("class", r.class), typeof e.title < "u" && r.append("title").text(e.title), r;
}, tR = function(t, e) {
const r = e.text.replace(/
/gi, " "), n = t.append("text");
n.attr("x", e.x), n.attr("y", e.y), n.attr("class", "legend"), n.style("text-anchor", e.anchor), typeof e.class < "u" && n.attr("class", e.class);
const i = n.append("tspan");
return i.attr("x", e.x + e.textMargin * 2), i.text(r), n;
}, llt = function(t, e) {
function r(i, a, s, o, l) {
return i + "," + a + " " + (i + s) + "," + a + " " + (i + s) + "," + (a + o - l) + " " + (i + s - l * 1.2) + "," + (a + o) + " " + i + "," + (a + o);
}
const n = t.append("polygon");
n.attr("points", r(e.x, e.y, 50, 20, 7)), n.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, tR(t, e);
}, clt = function(t, e, r) {
const n = t.append("g"), i = l_();
i.x = e.x, i.y = e.y, i.fill = e.fill, i.width = r.width, i.height = r.height, i.class = "journey-section section-type-" + e.num, i.rx = 3, i.ry = 3, A0(n, i), eR(r)(
e.text,
n,
i.x,
i.y,
i.width,
i.height,
{ class: "journey-section section-type-" + e.num },
r,
e.colour
);
};
let gw = -1;
const ult = function(t, e, r) {
const n = e.x + r.width / 2, i = t.append("g");
gw++;
const a = 300 + 5 * 30;
i.append("line").attr("id", "task" + gw).attr("x1", n).attr("y1", e.y).attr("x2", n).attr("y2", a).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), olt(i, {
cx: n,
cy: 300 + (5 - e.score) * 30,
score: e.score
});
const s = l_();
s.x = e.x, s.y = e.y, s.fill = e.fill, s.width = r.width, s.height = r.height, s.class = "task task-type-" + e.num, s.rx = 3, s.ry = 3, A0(i, s);
let o = e.x + 14;
e.people.forEach((l) => {
const u = e.actors[l].color, h = {
cx: o,
cy: e.y,
r: 7,
fill: u,
stroke: "#000",
title: l,
pos: e.actors[l].position
};
JL(i, h), o += 10;
}), eR(r)(
e.task,
i,
s.x,
s.y,
s.width,
s.height,
{ class: "task" },
r,
e.colour
);
}, hlt = function(t, e) {
A0(t, {
x: e.startx,
y: e.starty,
width: e.stopx - e.startx,
height: e.stopy - e.starty,
fill: e.fill,
class: "rect"
}).lower();
}, flt = function() {
return {
x: 0,
y: 0,
fill: void 0,
"text-anchor": "start",
width: 100,
height: 100,
textMargin: 0,
rx: 0,
ry: 0
};
}, l_ = function() {
return {
x: 0,
y: 0,
width: 100,
anchor: "start",
height: 100,
rx: 0,
ry: 0
};
}, eR = function() {
function t(i, a, s, o, l, u, h, d) {
const f = a.append("text").attr("x", s + l / 2).attr("y", o + u / 2 + 5).style("font-color", d).style("text-anchor", "middle").text(i);
n(f, h);
}
function e(i, a, s, o, l, u, h, d, f) {
const { taskFontSize: p, taskFontFamily: m } = d, _ = i.split(/
/gi);
for (let y = 0; y < _.length; y++) {
const b = y * p - p * (_.length - 1) / 2, x = a.append("text").attr("x", s + l / 2).attr("y", o).attr("fill", f).style("text-anchor", "middle").style("font-size", p).style("font-family", m);
x.append("tspan").attr("x", s + l / 2).attr("dy", b).text(_[y]), x.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(x, h);
}
}
function r(i, a, s, o, l, u, h, d) {
const f = a.append("switch"), m = f.append("foreignObject").attr("x", s).attr("y", o).attr("width", l).attr("height", u).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
m.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, f, s, o, l, u, h, d), n(m, h);
}
function n(i, a) {
for (const s in a)
s in a && i.attr(s, a[s]);
}
return function(i) {
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
};
}(), dlt = function(t) {
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
}, Gc = {
drawRect: A0,
drawCircle: JL,
drawSection: clt,
drawText: tR,
drawLabel: llt,
drawTask: ult,
drawBackgroundRect: hlt,
getTextObj: flt,
getNoteRect: l_,
initGraphics: dlt
}, plt = function(t) {
Object.keys(t).forEach(function(r) {
M0[r] = t[r];
});
}, da = {};
function glt(t) {
const e = nt().journey;
let r = 60;
Object.keys(da).forEach((n) => {
const i = da[n].color, a = {
cx: 20,
cy: r,
r: 7,
fill: i,
stroke: "#000",
pos: da[n].position
};
Gc.drawCircle(t, a);
const s = {
x: 40,
y: r + 7,
fill: "#666",
text: n,
textMargin: e.boxTextMargin | 5
};
Gc.drawText(t, s), r += 20;
});
}
const M0 = nt().journey, vs = M0.leftMargin, ylt = function(t, e, r, n) {
const i = nt().journey;
n.db.clear(), n.parser.parse(t + `
`);
const a = nt().securityLevel;
let s;
a === "sandbox" && (s = St("#i" + e));
const o = St(a === "sandbox" ? s.nodes()[0].contentDocument.body : "body");
Bn.init();
const l = o.select("#" + e);
Gc.initGraphics(l);
const u = n.db.getTasks(), h = n.db.getDiagramTitle(), d = n.db.getActors();
for (const b in da)
delete da[b];
let f = 0;
d.forEach((b) => {
da[b] = {
color: i.actorColours[f % i.actorColours.length],
position: f
}, f++;
}), glt(l), Bn.insert(0, 0, vs, Object.keys(da).length * 50), mlt(l, u, 0);
const p = Bn.getBounds();
h && l.append("text").text(h).attr("x", vs).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
const m = p.stopy - p.starty + 2 * i.diagramMarginY, _ = vs + p.stopx + 2 * i.diagramMarginX;
pi(l, m, _, i.useMaxWidth), l.append("line").attr("x1", vs).attr("y1", i.height * 4).attr("x2", _ - vs - 4).attr("y2", i.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
const y = h ? 70 : 0;
l.attr("viewBox", `${p.startx} -25 ${_} ${m + y}`), l.attr("preserveAspectRatio", "xMinYMin meet"), l.attr("height", m + y + 25), vn(n.db, l, e);
}, Bn = {
data: {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0
},
verticalPos: 0,
sequenceItems: [],
init: function() {
this.sequenceItems = [], this.data = {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0
}, this.verticalPos = 0;
},
updateVal: function(t, e, r, n) {
typeof t[e] > "u" ? t[e] = r : t[e] = n(r, t[e]);
},
updateBounds: function(t, e, r, n) {
const i = nt().journey, a = this;
let s = 0;
function o(l) {
return function(h) {
s++;
const d = a.sequenceItems.length - s + 1;
a.updateVal(h, "starty", e - d * i.boxMargin, Math.min), a.updateVal(h, "stopy", n + d * i.boxMargin, Math.max), a.updateVal(Bn.data, "startx", t - d * i.boxMargin, Math.min), a.updateVal(Bn.data, "stopx", r + d * i.boxMargin, Math.max), l !== "activation" && (a.updateVal(h, "startx", t - d * i.boxMargin, Math.min), a.updateVal(h, "stopx", r + d * i.boxMargin, Math.max), a.updateVal(Bn.data, "starty", e - d * i.boxMargin, Math.min), a.updateVal(Bn.data, "stopy", n + d * i.boxMargin, Math.max));
};
}
this.sequenceItems.forEach(o());
},
insert: function(t, e, r, n) {
const i = Math.min(t, r), a = Math.max(t, r), s = Math.min(e, n), o = Math.max(e, n);
this.updateVal(Bn.data, "startx", i, Math.min), this.updateVal(Bn.data, "starty", s, Math.min), this.updateVal(Bn.data, "stopx", a, Math.max), this.updateVal(Bn.data, "stopy", o, Math.max), this.updateBounds(i, s, a, o);
},
bumpVerticalPos: function(t) {
this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
},
getVerticalPos: function() {
return this.verticalPos;
},
getBounds: function() {
return this.data;
}
}, nm = M0.sectionFills, yw = M0.sectionColours, mlt = function(t, e, r) {
const n = nt().journey;
let i = "";
const a = n.height * 2 + n.diagramMarginY, s = r + a;
let o = 0, l = "#CCC", u = "black", h = 0;
for (let d = 0; d < e.length; d++) {
const f = e[d];
if (i !== f.section) {
l = nm[o % nm.length], h = o % nm.length, u = yw[o % yw.length];
const m = {
x: d * n.taskMargin + d * n.width + vs,
y: 50,
text: f.section,
fill: l,
num: h,
colour: u
};
Gc.drawSection(t, m, n), i = f.section, o++;
}
const p = f.people.reduce((m, _) => (da[_] && (m[_] = da[_]), m), {});
f.x = d * n.taskMargin + d * n.width + vs, f.y = s, f.width = n.diagramMarginX, f.height = n.diagramMarginY, f.colour = u, f.fill = l, f.num = h, f.actors = p, Gc.drawTask(t, f, n), Bn.insert(f.x, f.y, f.x + f.width + n.taskMargin, 300 + 5 * 30);
}
}, mw = {
setConf: plt,
draw: ylt
};
let bw = {};
const blt = function(t) {
bw = { ...bw, ...t };
}, _lt = (t, e, r) => {
try {
H.debug(`Renering svg for syntax error
`);
const n = St("#" + e), i = n.append("g");
i.append("path").attr("class", "error-icon").attr(
"d",
"m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"
), i.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in graph"), i.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text("mermaid version " + r), n.attr("height", 100), n.attr("width", 500), n.attr("viewBox", "768 0 912 512");
} catch (n) {
H.error("Error while rendering info diagram"), H.error(SX(n));
}
}, c_ = {
setConf: blt,
draw: _lt
};
let _w = !1;
const L0 = () => {
_w || (_w = !0, Ir(
"error",
{
db: {
clear: () => {
}
},
styles: QS,
renderer: c_,
parser: {
parser: { yy: {} },
parse: () => {
}
},
init: () => {
}
},
(t) => t.toLowerCase().trim() === "error"
), Ir(
"c4",
{
parser: Fc,
db: yA,
renderer: o6,
styles: aA,
init: (t) => {
o6.setConf(t.c4);
}
},
WK
), Ir(
"class",
{
parser: zf,
db: vo,
renderer: Iet,
styles: ac,
init: (t) => {
t.class || (t.class = {}), t.class.arrowMarkerAbsolute = t.arrowMarkerAbsolute, vo.clear();
}
},
qZ
), Ir(
"classDiagram",
{
parser: zf,
db: vo,
renderer: Yrt,
styles: ac,
init: (t) => {
t.class || (t.class = {}), t.class.arrowMarkerAbsolute = t.arrowMarkerAbsolute, vo.clear();
}
},
VZ
), Ir(
"er",
{
parser: mb,
db: Qrt,
renderer: pnt,
styles: ZS
},
Urt
), Ir(
"gantt",
{
parser: _b,
db: n_,
renderer: kat,
styles: JS
},
Wit
), Ir(
"info",
{
parser: wb,
db: Sat,
renderer: Mat,
styles: tA
},
Lat
), Ir(
"pie",
{
parser: Tb,
db: qat,
renderer: zat,
styles: eA
},
Rat
), Ir(
"requirement",
{
parser: Eb,
db: ost,
renderer: yst,
styles: rA
},
Yat
), Ir(
"sequence",
{
parser: Sb,
db: sw,
renderer: lw,
styles: nA,
init: (t) => {
if (t.sequence || (t.sequence = {}), t.sequence.arrowMarkerAbsolute = t.arrowMarkerAbsolute, "sequenceDiagram" in t)
throw new Error(
"`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config."
);
sw.setWrap(t.wrap), lw.setConf(t.sequence);
}
},
mst
), Ir(
"state",
{
parser: n1,
db: ca,
renderer: Wot,
styles: If,
init: (t) => {
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, ca.clear();
}
},
hot
), Ir(
"stateDiagram",
{
parser: n1,
db: ca,
renderer: Kot,
styles: If,
init: (t) => {
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, ca.clear();
}
},
fot
), Ir(
"journey",
{
parser: Db,
db: pw,
renderer: mw,
styles: iA,
init: (t) => {
mw.setConf(t.journey), pw.clear();
}
},
Zot
), Ir(
"flowchart",
{
parser: Xf,
db: la,
renderer: em,
styles: Rf,
init: (t) => {
t.flowchart || (t.flowchart = {}), t.flowchart.arrowMarkerAbsolute = t.arrowMarkerAbsolute, Z4.setConf(t.flowchart), la.clear(), la.setGen("gen-1");
}
},
gnt
), Ir(
"flowchart-v2",
{
parser: Xf,
db: la,
renderer: em,
styles: Rf,
init: (t) => {
t.flowchart || (t.flowchart = {}), t.flowchart.arrowMarkerAbsolute = t.arrowMarkerAbsolute, XS({ flowchart: { arrowMarkerAbsolute: t.arrowMarkerAbsolute } }), em.setConf(t.flowchart), la.clear(), la.setGen("gen-2");
}
},
ynt
), Ir(
"gitGraph",
{ parser: hb, db: BK, renderer: YK, styles: UK },
gK
));
};
class jc {
constructor(e, r) {
io(this, "type", "graph");
io(this, "parser");
io(this, "renderer");
io(this, "db");
io(this, "detectTypeFailed", !1);
var a, s;
this.txt = e;
const n = nt();
this.txt = e;
try {
this.type = s4(e, n);
} catch (o) {
this.handleError(o, r), this.type = "error", this.detectTypeFailed = !0;
}
const i = lA(this.type);
H.debug("Type " + this.type), this.db = i.db, (s = (a = this.db).clear) == null || s.call(a), this.renderer = i.renderer, this.parser = i.parser, this.parser.parser.yy = this.db, i.init && (i.init(n), H.debug("Initialized diagram " + this.type, n)), this.txt += `
`, this.parse(this.txt, r);
}
parse(e, r) {
if (this.detectTypeFailed)
return !1;
try {
return e = e + `
`, this.db.clear(), this.parser.parse(e), !0;
} catch (n) {
this.handleError(n, r);
}
return !1;
}
handleError(e, r) {
if (r)
PS(e) ? r(e.str, e.hash) : r(e);
else
throw e;
}
getParser() {
return this.parser;
}
getType() {
return this.type;
}
}
const rR = (t, e) => {
const r = s4(t, nt());
try {
return lA(r), new jc(t, e);
} catch {
const i = qG(r);
if (!i)
throw new Error(`Diagram ${r} not found.`);
return i().then(({ diagram: a }) => (Ir(r, a, void 0, a.injectUtils), new jc(t, e)));
}
};
function vlt(t, e) {
return L0(), new jc(t, e).parse(t, e);
}
const nR = function(t) {
let e = t;
return e = e.replace(/style.*:\S*#.*;/g, function(r) {
return r.substring(0, r.length - 1);
}), e = e.replace(/classDef.*:\S*#.*;/g, function(r) {
return r.substring(0, r.length - 1);
}), e = e.replace(/#\w+;/g, function(r) {
const n = r.substring(1, r.length - 1);
return /^\+?\d+$/.test(n) ? "\uFB02\xB0\xB0" + n + "\xB6\xDF" : "\uFB02\xB0" + n + "\xB6\xDF";
}), e;
}, R0 = function(t) {
let e = t;
return e = e.replace(/fl°°/g, function() {
return "";
}), e = e.replace(/fl°/g, function() {
return "&";
}), e = e.replace(/¶ß/g, function() {
return ";";
}), e;
}, xlt = function(t, e, r, n) {
var T;
L0(), Bc(), e = e.replace(/\r\n?/g, `
`);
const i = Se.detectInit(e);
i && (qs(i), d4(i));
const a = nt();
H.debug(a), e.length > a.maxTextSize && (e = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");
let s = St("body");
if (typeof n < "u") {
if (n && (n.innerHTML = ""), a.securityLevel === "sandbox") {
const C = St(n).append("iframe").attr("id", "i" + t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
s = St(C.nodes()[0].contentDocument.body), s.node().style.margin = 0;
} else
s = St(n);
s.append("div").attr("id", "d" + t).attr("style", "font-family: " + a.fontFamily).append("svg").attr("id", t).attr("width", "100%").attr("xmlns", "http://www.w3.org/2000/svg").attr("xmlns:xlink", "http://www.w3.org/1999/xlink").append("g");
} else {
const C = document.getElementById(t);
C && C.remove();
let M;
if (a.securityLevel === "sandbox" ? M = document.querySelector("#i" + t) : M = document.querySelector("#d" + t), M && M.remove(), a.securityLevel === "sandbox") {
const S = St("body").append("iframe").attr("id", "i" + t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
s = St(S.nodes()[0].contentDocument.body), s.node().style.margin = 0;
} else
s = St("body");
s.append("div").attr("id", "d" + t).append("svg").attr("id", t).attr("width", "100%").attr("xmlns", "http://www.w3.org/2000/svg").append("g");
}
e = nR(e);
let o, l;
try {
if (o = rR(e), "then" in o)
throw new Error("Diagram is a promise");
} catch (C) {
o = new jc("error"), l = C;
}
const u = s.select("#d" + t).node(), h = o.type, d = u.firstChild, f = d.firstChild;
let p = "";
if (a.themeCSS !== void 0 && (p += `
${a.themeCSS}`), a.fontFamily !== void 0 && (p += `
:root { --mermaid-font-family: ${a.fontFamily}}`), a.altFontFamily !== void 0 && (p += `
:root { --mermaid-alt-font-family: ${a.altFontFamily}}`), h === "flowchart" || h === "flowchart-v2" || h === "graph") {
const C = Z4.getClasses(e, o), M = a.htmlLabels || ((T = a.flowchart) == null ? void 0 : T.htmlLabels);
for (const S in C)
M ? (p += `
.${S} > * { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} span { ${C[S].styles.join(
" !important; "
)} !important; }`) : (p += `
.${S} path { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} rect { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} polygon { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} ellipse { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} circle { ${C[S].styles.join(
" !important; "
)} !important; }`, C[S].textStyles && (p += `
.${S} tspan { ${C[S].textStyles.join(
" !important; "
)} !important; }`));
}
const _ = ((C, M) => Mf(HS(`${C}{${M}}`), GS))(`#${t}`, sA(h, p, a.themeVariables)), y = document.createElement("style");
y.innerHTML = `#${t} ` + _, d.insertBefore(y, f);
try {
o.renderer.draw(e, t, Lf.version, o);
} catch (C) {
throw c_.draw(e, t, Lf.version), C;
}
s.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns", "http://www.w3.org/1999/xhtml");
let b = s.select("#d" + t).node().innerHTML;
if (H.debug("cnf.arrowMarkerAbsolute", a.arrowMarkerAbsolute), !Ar(a.arrowMarkerAbsolute) && a.securityLevel !== "sandbox" && (b = b.replace(/marker-end="url\(.*?#/g, 'marker-end="url(#', "g")), b = R0(b), b = b.replace(/
/g, "
"), a.securityLevel === "sandbox") {
const C = s.select("#d" + t + " svg").node(), M = "100%";
let S = "100%";
C && (S = C.viewBox.baseVal.height + "px"), b = `