UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

1,314 lines (1,267 loc) 246 kB
import { __commonJS, __name, __toESM } from "./chunk-DLQEHMXD.mjs"; // ../../node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/dayjs.min.js var require_dayjs_min = __commonJS({ "../../node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/dayjs.min.js"(exports, module) { "use strict"; !(function(t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e(); })(exports, (function() { "use strict"; var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: /* @__PURE__ */ __name(function(t4) { var e3 = ["th", "st", "nd", "rd"], n2 = t4 % 100; return "[" + t4 + (e3[(n2 - 20) % 10] || e3[n2] || e3[0]) + "]"; }, "ordinal") }, m = /* @__PURE__ */ __name(function(t4, e3, n2) { var r2 = String(t4); return !r2 || r2.length >= e3 ? t4 : "" + Array(e3 + 1 - r2.length).join(n2) + t4; }, "m"), v = { s: m, z: /* @__PURE__ */ __name(function(t4) { var e3 = -t4.utcOffset(), n2 = Math.abs(e3), r2 = Math.floor(n2 / 60), i2 = n2 % 60; return (e3 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0"); }, "z"), m: /* @__PURE__ */ __name(function t4(e3, n2) { if (e3.date() < n2.date()) return -t4(n2, e3); var r2 = 12 * (n2.year() - e3.year()) + (n2.month() - e3.month()), i2 = e3.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e3.clone().add(r2 + (s2 ? -1 : 1), c); return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0); }, "t"), a: /* @__PURE__ */ __name(function(t4) { return t4 < 0 ? Math.ceil(t4) || 0 : Math.floor(t4); }, "a"), p: /* @__PURE__ */ __name(function(t4) { return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t4] || String(t4 || "").toLowerCase().replace(/s$/, ""); }, "p"), u: /* @__PURE__ */ __name(function(t4) { return void 0 === t4; }, "u") }, g = "en", D = {}; D[g] = M; var p = "$isDayjsObject", S = /* @__PURE__ */ __name(function(t4) { return t4 instanceof _ || !(!t4 || !t4[p]); }, "S"), w = /* @__PURE__ */ __name(function t4(e3, n2, r2) { var i2; if (!e3) return g; if ("string" == typeof e3) { var s2 = e3.toLowerCase(); D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2); var u2 = e3.split("-"); if (!i2 && u2.length > 1) return t4(u2[0]); } else { var a2 = e3.name; D[a2] = e3, i2 = a2; } return !r2 && i2 && (g = i2), i2 || !r2 && g; }, "t"), O = /* @__PURE__ */ __name(function(t4, e3) { if (S(t4)) return t4.clone(); var n2 = "object" == typeof e3 ? e3 : {}; return n2.date = t4, n2.args = arguments, new _(n2); }, "O"), b = v; b.l = w, b.i = S, b.w = function(t4, e3) { return O(t4, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset }); }; var _ = (function() { function M2(t4) { this.$L = w(t4.locale, null, true), this.parse(t4), this.$x = this.$x || t4.x || {}, this[p] = true; } __name(M2, "M"); var m2 = M2.prototype; return m2.parse = function(t4) { this.$d = (function(t5) { var e3 = t5.date, n2 = t5.utc; if (null === e3) return /* @__PURE__ */ new Date(NaN); if (b.u(e3)) return /* @__PURE__ */ new Date(); if (e3 instanceof Date) return new Date(e3); if ("string" == typeof e3 && !/Z$/i.test(e3)) { var r2 = e3.match($); if (r2) { var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3); return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2); } } return new Date(e3); })(t4), this.init(); }, m2.init = function() { var t4 = this.$d; this.$y = t4.getFullYear(), this.$M = t4.getMonth(), this.$D = t4.getDate(), this.$W = t4.getDay(), this.$H = t4.getHours(), this.$m = t4.getMinutes(), this.$s = t4.getSeconds(), this.$ms = t4.getMilliseconds(); }, m2.$utils = function() { return b; }, m2.isValid = function() { return !(this.$d.toString() === l); }, m2.isSame = function(t4, e3) { var n2 = O(t4); return this.startOf(e3) <= n2 && n2 <= this.endOf(e3); }, m2.isAfter = function(t4, e3) { return O(t4) < this.startOf(e3); }, m2.isBefore = function(t4, e3) { return this.endOf(e3) < O(t4); }, m2.$g = function(t4, e3, n2) { return b.u(t4) ? this[e3] : this.set(n2, t4); }, m2.unix = function() { return Math.floor(this.valueOf() / 1e3); }, m2.valueOf = function() { return this.$d.getTime(); }, m2.startOf = function(t4, e3) { var n2 = this, r2 = !!b.u(e3) || e3, f2 = b.p(t4), l2 = /* @__PURE__ */ __name(function(t5, e4) { var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e4, t5) : new Date(n2.$y, e4, t5), n2); return r2 ? i2 : i2.endOf(a); }, "l"), $2 = /* @__PURE__ */ __name(function(t5, e4) { return b.w(n2.toDate()[t5].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2); }, "$"), y3 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : ""); switch (f2) { case h: return r2 ? l2(1, 0) : l2(31, 11); case c: return r2 ? l2(1, M3) : l2(0, M3 + 1); case o: var g2 = this.$locale().weekStart || 0, D2 = (y3 < g2 ? y3 + 7 : y3) - g2; return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3); case a: case d: return $2(v2 + "Hours", 0); case u: return $2(v2 + "Minutes", 1); case s: return $2(v2 + "Seconds", 2); case i: return $2(v2 + "Milliseconds", 3); default: return this.clone(); } }, m2.endOf = function(t4) { return this.startOf(t4, false); }, m2.$set = function(t4, e3) { var n2, o2 = b.p(t4), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e3 - this.$W) : e3; if (o2 === c || o2 === h) { var y3 = this.clone().set(d, 1); y3.$d[l2]($2), y3.init(), this.$d = y3.set(d, Math.min(this.$D, y3.daysInMonth())).$d; } else l2 && this.$d[l2]($2); return this.init(), this; }, m2.set = function(t4, e3) { return this.clone().$set(t4, e3); }, m2.get = function(t4) { return this[b.p(t4)](); }, m2.add = function(r2, f2) { var d2, l2 = this; r2 = Number(r2); var $2 = b.p(f2), y3 = /* @__PURE__ */ __name(function(t4) { var e3 = O(l2); return b.w(e3.date(e3.date() + Math.round(t4 * r2)), l2); }, "y"); if ($2 === c) return this.set(c, this.$M + r2); if ($2 === h) return this.set(h, this.$y + r2); if ($2 === a) return y3(1); if ($2 === o) return y3(7); var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3; return b.w(m3, this); }, m2.subtract = function(t4, e3) { return this.add(-1 * t4, e3); }, m2.format = function(t4) { var e3 = this, n2 = this.$locale(); if (!this.isValid()) return n2.invalidDate || l; var r2 = t4 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = /* @__PURE__ */ __name(function(t5, n3, i3, s3) { return t5 && (t5[n3] || t5(e3, r2)) || i3[n3].slice(0, s3); }, "h"), d2 = /* @__PURE__ */ __name(function(t5) { return b.s(s2 % 12 || 12, t5, "0"); }, "d"), $2 = f2 || function(t5, e4, n3) { var r3 = t5 < 12 ? "AM" : "PM"; return n3 ? r3.toLowerCase() : r3; }; return r2.replace(y2, (function(t5, r3) { return r3 || (function(t6) { switch (t6) { case "YY": return String(e3.$y).slice(-2); case "YYYY": return b.s(e3.$y, 4, "0"); case "M": return a2 + 1; case "MM": return b.s(a2 + 1, 2, "0"); case "MMM": return h2(n2.monthsShort, a2, c2, 3); case "MMMM": return h2(c2, a2); case "D": return e3.$D; case "DD": return b.s(e3.$D, 2, "0"); case "d": return String(e3.$W); case "dd": return h2(n2.weekdaysMin, e3.$W, o2, 2); case "ddd": return h2(n2.weekdaysShort, e3.$W, o2, 3); case "dddd": return o2[e3.$W]; case "H": return String(s2); case "HH": return b.s(s2, 2, "0"); case "h": return d2(1); case "hh": return d2(2); case "a": return $2(s2, u2, true); case "A": return $2(s2, u2, false); case "m": return String(u2); case "mm": return b.s(u2, 2, "0"); case "s": return String(e3.$s); case "ss": return b.s(e3.$s, 2, "0"); case "SSS": return b.s(e3.$ms, 3, "0"); case "Z": return i2; } return null; })(t5) || i2.replace(":", ""); })); }, m2.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, m2.diff = function(r2, d2, l2) { var $2, y3 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = /* @__PURE__ */ __name(function() { return b.m(y3, m3); }, "D"); switch (M3) { case h: $2 = D2() / 12; break; case c: $2 = D2(); break; case f: $2 = D2() / 3; break; case o: $2 = (g2 - v2) / 6048e5; break; case a: $2 = (g2 - v2) / 864e5; break; case u: $2 = g2 / n; break; case s: $2 = g2 / e; break; case i: $2 = g2 / t; break; default: $2 = g2; } return l2 ? $2 : b.a($2); }, m2.daysInMonth = function() { return this.endOf(c).$D; }, m2.$locale = function() { return D[this.$L]; }, m2.locale = function(t4, e3) { if (!t4) return this.$L; var n2 = this.clone(), r2 = w(t4, e3, true); return r2 && (n2.$L = r2), n2; }, m2.clone = function() { return b.w(this.$d, this); }, m2.toDate = function() { return new Date(this.valueOf()); }, m2.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, m2.toISOString = function() { return this.$d.toISOString(); }, m2.toString = function() { return this.$d.toUTCString(); }, M2; })(), k = _.prototype; return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t4) { k[t4[1]] = function(e3) { return this.$g(e3, t4[0], t4[1]); }; })), O.extend = function(t4, e3) { return t4.$i || (t4(e3, _, O), t4.$i = true), O; }, O.locale = w, O.isDayjs = S, O.unix = function(t4) { return O(1e3 * t4); }, O.en = D[g], O.Ls = D, O.p = {}, O; })); } }); // src/logger.ts var import_dayjs = __toESM(require_dayjs_min(), 1); var LEVELS = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, fatal: 5 }; var log = { trace: /* @__PURE__ */ __name((..._args) => { }, "trace"), debug: /* @__PURE__ */ __name((..._args) => { }, "debug"), info: /* @__PURE__ */ __name((..._args) => { }, "info"), warn: /* @__PURE__ */ __name((..._args) => { }, "warn"), error: /* @__PURE__ */ __name((..._args) => { }, "error"), fatal: /* @__PURE__ */ __name((..._args) => { }, "fatal") }; var setLogLevel = /* @__PURE__ */ __name(function(level = "fatal") { let numericLevel = LEVELS.fatal; if (typeof level === "string") { if (level.toLowerCase() in LEVELS) { numericLevel = LEVELS[level]; } } else if (typeof level === "number") { numericLevel = level; } log.trace = () => { }; log.debug = () => { }; log.info = () => { }; log.warn = () => { }; log.error = () => { }; log.fatal = () => { }; if (numericLevel <= LEVELS.fatal) { log.fatal = console.error ? console.error.bind(console, format("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format("FATAL")); } if (numericLevel <= LEVELS.error) { log.error = console.error ? console.error.bind(console, format("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format("ERROR")); } if (numericLevel <= LEVELS.warn) { log.warn = console.warn ? console.warn.bind(console, format("WARN"), "color: orange") : console.log.bind(console, `\x1B[33m`, format("WARN")); } if (numericLevel <= LEVELS.info) { log.info = console.info ? console.info.bind(console, format("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format("INFO")); } if (numericLevel <= LEVELS.debug) { log.debug = console.debug ? console.debug.bind(console, format("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("DEBUG")); } if (numericLevel <= LEVELS.trace) { log.trace = console.debug ? console.debug.bind(console, format("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("TRACE")); } }, "setLogLevel"); var format = /* @__PURE__ */ __name((level) => { const time2 = (0, import_dayjs.default)().format("ss.SSS"); return `%c${time2} : ${level} : `; }, "format"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js function max(values, valueof) { let max4; if (valueof === void 0) { for (const value of values) { if (value != null && (max4 < value || max4 === void 0 && value >= value)) { max4 = value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (max4 < value || max4 === void 0 && value >= value)) { max4 = value; } } } return max4; } __name(max, "max"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js function min(values, valueof) { let min4; if (valueof === void 0) { for (const value of values) { if (value != null && (min4 > value || min4 === void 0 && value >= value)) { min4 = value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (min4 > value || min4 === void 0 && value >= value)) { min4 = value; } } } return min4; } __name(min, "min"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js function ascending(a, b) { return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; } __name(ascending, "ascending"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/descending.js function descending(a, b) { return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; } __name(descending, "descending"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisector.js function bisector(f) { let compare1, compare2, delta; if (f.length !== 2) { compare1 = ascending; compare2 = /* @__PURE__ */ __name((d, x2) => ascending(f(d), x2), "compare2"); delta = /* @__PURE__ */ __name((d, x2) => f(d) - x2, "delta"); } else { compare1 = f === ascending || f === descending ? f : zero; compare2 = f; delta = f; } function left2(a, x2, lo = 0, hi = a.length) { if (lo < hi) { if (compare1(x2, x2) !== 0) return hi; do { const mid = lo + hi >>> 1; if (compare2(a[mid], x2) < 0) lo = mid + 1; else hi = mid; } while (lo < hi); } return lo; } __name(left2, "left"); function right2(a, x2, lo = 0, hi = a.length) { if (lo < hi) { if (compare1(x2, x2) !== 0) return hi; do { const mid = lo + hi >>> 1; if (compare2(a[mid], x2) <= 0) lo = mid + 1; else hi = mid; } while (lo < hi); } return lo; } __name(right2, "right"); function center2(a, x2, lo = 0, hi = a.length) { const i = left2(a, x2, lo, hi - 1); return i > lo && delta(a[i - 1], x2) > -delta(a[i], x2) ? i - 1 : i; } __name(center2, "center"); return { left: left2, center: center2, right: right2 }; } __name(bisector, "bisector"); function zero() { return 0; } __name(zero, "zero"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/number.js function number(x2) { return x2 === null ? NaN : +x2; } __name(number, "number"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisect.js var ascendingBisect = bisector(ascending); var bisectRight = ascendingBisect.right; var bisectLeft = ascendingBisect.left; var bisectCenter = bisector(number).center; var bisect_default = bisectRight; // ../../node_modules/.pnpm/internmap@2.0.3/node_modules/internmap/src/index.js var InternMap = class extends Map { static { __name(this, "InternMap"); } constructor(entries, key = keyof) { super(); Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } }); if (entries != null) for (const [key2, value] of entries) this.set(key2, value); } get(key) { return super.get(intern_get(this, key)); } has(key) { return super.has(intern_get(this, key)); } set(key, value) { return super.set(intern_set(this, key), value); } delete(key) { return super.delete(intern_delete(this, key)); } }; function intern_get({ _intern, _key }, value) { const key = _key(value); return _intern.has(key) ? _intern.get(key) : value; } __name(intern_get, "intern_get"); function intern_set({ _intern, _key }, value) { const key = _key(value); if (_intern.has(key)) return _intern.get(key); _intern.set(key, value); return value; } __name(intern_set, "intern_set"); function intern_delete({ _intern, _key }, value) { const key = _key(value); if (_intern.has(key)) { value = _intern.get(key); _intern.delete(key); } return value; } __name(intern_delete, "intern_delete"); function keyof(value) { return value !== null && typeof value === "object" ? value.valueOf() : value; } __name(keyof, "keyof"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ticks.js var e10 = Math.sqrt(50); var e5 = Math.sqrt(10); var e2 = Math.sqrt(2); function tickSpec(start2, stop, count2) { const step = (stop - start2) / Math.max(0, count2), power = Math.floor(Math.log10(step)), error = step / Math.pow(10, power), factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1; let i1, i2, inc; if (power < 0) { inc = Math.pow(10, -power) / factor; i1 = Math.round(start2 * inc); i2 = Math.round(stop * inc); if (i1 / inc < start2) ++i1; if (i2 / inc > stop) --i2; inc = -inc; } else { inc = Math.pow(10, power) * factor; i1 = Math.round(start2 / inc); i2 = Math.round(stop / inc); if (i1 * inc < start2) ++i1; if (i2 * inc > stop) --i2; } if (i2 < i1 && 0.5 <= count2 && count2 < 2) return tickSpec(start2, stop, count2 * 2); return [i1, i2, inc]; } __name(tickSpec, "tickSpec"); function ticks(start2, stop, count2) { stop = +stop, start2 = +start2, count2 = +count2; if (!(count2 > 0)) return []; if (start2 === stop) return [start2]; const reverse = stop < start2, [i1, i2, inc] = reverse ? tickSpec(stop, start2, count2) : tickSpec(start2, stop, count2); if (!(i2 >= i1)) return []; const n = i2 - i1 + 1, ticks2 = new Array(n); if (reverse) { if (inc < 0) for (let i = 0; i < n; ++i) ticks2[i] = (i2 - i) / -inc; else for (let i = 0; i < n; ++i) ticks2[i] = (i2 - i) * inc; } else { if (inc < 0) for (let i = 0; i < n; ++i) ticks2[i] = (i1 + i) / -inc; else for (let i = 0; i < n; ++i) ticks2[i] = (i1 + i) * inc; } return ticks2; } __name(ticks, "ticks"); function tickIncrement(start2, stop, count2) { stop = +stop, start2 = +start2, count2 = +count2; return tickSpec(start2, stop, count2)[2]; } __name(tickIncrement, "tickIncrement"); function tickStep(start2, stop, count2) { stop = +stop, start2 = +start2, count2 = +count2; const reverse = stop < start2, inc = reverse ? tickIncrement(stop, start2, count2) : tickIncrement(start2, stop, count2); return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc); } __name(tickStep, "tickStep"); // ../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/range.js function range(start2, stop, step) { start2 = +start2, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start2, start2 = 0, 1) : n < 3 ? 1 : +step; var i = -1, n = Math.max(0, Math.ceil((stop - start2) / step)) | 0, range2 = new Array(n); while (++i < n) { range2[i] = start2 + i * step; } return range2; } __name(range, "range"); // ../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/identity.js function identity_default(x2) { return x2; } __name(identity_default, "default"); // ../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js var top = 1; var right = 2; var bottom = 3; var left = 4; var epsilon = 1e-6; function translateX(x2) { return "translate(" + x2 + ",0)"; } __name(translateX, "translateX"); function translateY(y2) { return "translate(0," + y2 + ")"; } __name(translateY, "translateY"); function number2(scale) { return (d) => +scale(d); } __name(number2, "number"); function center(scale, offset) { offset = Math.max(0, scale.bandwidth() - offset * 2) / 2; if (scale.round()) offset = Math.round(offset); return (d) => +scale(d) + offset; } __name(center, "center"); function entering() { return !this.__axis; } __name(entering, "entering"); function axis(orient, scale) { var tickArguments = [], tickValues = null, tickFormat2 = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient === top || orient === left ? -1 : 1, x2 = orient === left || orient === right ? "x" : "y", transform2 = orient === top || orient === bottom ? translateX : translateY; function axis2(context) { var values = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain() : tickValues, format3 = tickFormat2 == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity_default : tickFormat2, spacing = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale.range(), range0 = +range2[0] + offset, range1 = +range2[range2.length - 1] + offset, position = (scale.bandwidth ? center : number2)(scale.copy(), offset), selection2 = context.selection ? context.selection() : context, path2 = selection2.selectAll(".domain").data([null]), tick = selection2.selectAll(".tick").data(values, scale).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line = tick.select("line"), text = tick.select("text"); path2 = path2.merge(path2.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")); tick = tick.merge(tickEnter); line = line.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x2 + "2", k * tickSizeInner)); text = text.merge(tickEnter.append("text").attr("fill", "currentColor").attr(x2, k * spacing).attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); if (context !== selection2) { path2 = path2.transition(context); tick = tick.transition(context); line = line.transition(context); text = text.transition(context); tickExit = tickExit.transition(context).attr("opacity", epsilon).attr("transform", function(d) { return isFinite(d = position(d)) ? transform2(d + offset) : this.getAttribute("transform"); }); tickEnter.attr("opacity", epsilon).attr("transform", function(d) { var p = this.parentNode.__axis; return transform2((p && isFinite(p = p(d)) ? p : position(d)) + offset); }); } tickExit.remove(); path2.attr("d", orient === left || orient === right ? tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1 : tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1); tick.attr("opacity", 1).attr("transform", function(d) { return transform2(position(d) + offset); }); line.attr(x2 + "2", k * tickSizeInner); text.attr(x2, k * spacing).text(format3); selection2.filter(entering).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); selection2.each(function() { this.__axis = position; }); } __name(axis2, "axis"); axis2.scale = function(_) { return arguments.length ? (scale = _, axis2) : scale; }; axis2.ticks = function() { return tickArguments = Array.from(arguments), axis2; }; axis2.tickArguments = function(_) { return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis2) : tickArguments.slice(); }; axis2.tickValues = function(_) { return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis2) : tickValues && tickValues.slice(); }; axis2.tickFormat = function(_) { return arguments.length ? (tickFormat2 = _, axis2) : tickFormat2; }; axis2.tickSize = function(_) { return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis2) : tickSizeInner; }; axis2.tickSizeInner = function(_) { return arguments.length ? (tickSizeInner = +_, axis2) : tickSizeInner; }; axis2.tickSizeOuter = function(_) { return arguments.length ? (tickSizeOuter = +_, axis2) : tickSizeOuter; }; axis2.tickPadding = function(_) { return arguments.length ? (tickPadding = +_, axis2) : tickPadding; }; axis2.offset = function(_) { return arguments.length ? (offset = +_, axis2) : offset; }; return axis2; } __name(axis, "axis"); function axisTop(scale) { return axis(top, scale); } __name(axisTop, "axisTop"); function axisBottom(scale) { return axis(bottom, scale); } __name(axisBottom, "axisBottom"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js function none() { } __name(none, "none"); function selector_default(selector) { return selector == null ? none : function() { return this.querySelector(selector); }; } __name(selector_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js function select_default(select) { if (typeof select !== "function") select = selector_default(select); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { if ("__data__" in node) subnode.__data__ = node.__data__; subgroup[i] = subnode; } } } return new Selection(subgroups, this._parents); } __name(select_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js function array(x2) { return x2 == null ? [] : Array.isArray(x2) ? x2 : Array.from(x2); } __name(array, "array"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js function empty() { return []; } __name(empty, "empty"); function selectorAll_default(selector) { return selector == null ? empty : function() { return this.querySelectorAll(selector); }; } __name(selectorAll_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js function arrayAll(select) { return function() { return array(select.apply(this, arguments)); }; } __name(arrayAll, "arrayAll"); function selectAll_default(select) { if (typeof select === "function") select = arrayAll(select); else select = selectorAll_default(select); for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { subgroups.push(select.call(node, node.__data__, i, group)); parents.push(node); } } } return new Selection(subgroups, parents); } __name(selectAll_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js function matcher_default(selector) { return function() { return this.matches(selector); }; } __name(matcher_default, "default"); function childMatcher(selector) { return function(node) { return node.matches(selector); }; } __name(childMatcher, "childMatcher"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js var find = Array.prototype.find; function childFind(match) { return function() { return find.call(this.children, match); }; } __name(childFind, "childFind"); function childFirst() { return this.firstElementChild; } __name(childFirst, "childFirst"); function selectChild_default(match) { return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match))); } __name(selectChild_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js var filter = Array.prototype.filter; function children() { return Array.from(this.children); } __name(children, "children"); function childrenFilter(match) { return function() { return filter.call(this.children, match); }; } __name(childrenFilter, "childrenFilter"); function selectChildren_default(match) { return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match))); } __name(selectChildren_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js function filter_default(match) { if (typeof match !== "function") match = matcher_default(match); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { if ((node = group[i]) && match.call(node, node.__data__, i, group)) { subgroup.push(node); } } } return new Selection(subgroups, this._parents); } __name(filter_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js function sparse_default(update) { return new Array(update.length); } __name(sparse_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js function enter_default() { return new Selection(this._enter || this._groups.map(sparse_default), this._parents); } __name(enter_default, "default"); function EnterNode(parent, datum2) { this.ownerDocument = parent.ownerDocument; this.namespaceURI = parent.namespaceURI; this._next = null; this._parent = parent; this.__data__ = datum2; } __name(EnterNode, "EnterNode"); EnterNode.prototype = { constructor: EnterNode, appendChild: /* @__PURE__ */ __name(function(child) { return this._parent.insertBefore(child, this._next); }, "appendChild"), insertBefore: /* @__PURE__ */ __name(function(child, next) { return this._parent.insertBefore(child, next); }, "insertBefore"), querySelector: /* @__PURE__ */ __name(function(selector) { return this._parent.querySelector(selector); }, "querySelector"), querySelectorAll: /* @__PURE__ */ __name(function(selector) { return this._parent.querySelectorAll(selector); }, "querySelectorAll") }; // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js function constant_default(x2) { return function() { return x2; }; } __name(constant_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js function bindIndex(parent, group, enter, update, exit, data) { var i = 0, node, groupLength = group.length, dataLength = data.length; for (; i < dataLength; ++i) { if (node = group[i]) { node.__data__ = data[i]; update[i] = node; } else { enter[i] = new EnterNode(parent, data[i]); } } for (; i < groupLength; ++i) { if (node = group[i]) { exit[i] = node; } } } __name(bindIndex, "bindIndex"); function bindKey(parent, group, enter, update, exit, data, key) { var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; for (i = 0; i < groupLength; ++i) { if (node = group[i]) { keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + ""; if (nodeByKeyValue.has(keyValue)) { exit[i] = node; } else { nodeByKeyValue.set(keyValue, node); } } } for (i = 0; i < dataLength; ++i) { keyValue = key.call(parent, data[i], i, data) + ""; if (node = nodeByKeyValue.get(keyValue)) { update[i] = node; node.__data__ = data[i]; nodeByKeyValue.delete(keyValue); } else { enter[i] = new EnterNode(parent, data[i]); } } for (i = 0; i < groupLength; ++i) { if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) { exit[i] = node; } } } __name(bindKey, "bindKey"); function datum(node) { return node.__data__; } __name(datum, "datum"); function data_default(value, key) { if (!arguments.length) return Array.from(this, datum); var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups; if (typeof value !== "function") value = constant_default(value); for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength); bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { if (previous = enterGroup[i0]) { if (i0 >= i1) i1 = i0 + 1; while (!(next = updateGroup[i1]) && ++i1 < dataLength) ; previous._next = next || null; } } } update = new Selection(update, parents); update._enter = enter; update._exit = exit; return update; } __name(data_default, "default"); function arraylike(data) { return typeof data === "object" && "length" in data ? data : Array.from(data); } __name(arraylike, "arraylike"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js function exit_default() { return new Selection(this._exit || this._groups.map(sparse_default), this._parents); } __name(exit_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js function join_default(onenter, onupdate, onexit) { var enter = this.enter(), update = this, exit = this.exit(); if (typeof onenter === "function") { enter = onenter(enter); if (enter) enter = enter.selection(); } else { enter = enter.append(onenter + ""); } if (onupdate != null) { update = onupdate(update); if (update) update = update.selection(); } if (onexit == null) exit.remove(); else onexit(exit); return enter && update ? enter.merge(update).order() : update; } __name(join_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js function merge_default(context) { var selection2 = context.selection ? context.selection() : context; for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group0[i] || group1[i]) { merge[i] = node; } } } for (; j < m0; ++j) { merges[j] = groups0[j]; } return new Selection(merges, this._parents); } __name(merge_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js function order_default() { for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) { for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) { if (node = group[i]) { if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); next = node; } } } return this; } __name(order_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js function sort_default(compare) { if (!compare) compare = ascending2; function compareNode(a, b) { return a && b ? compare(a.__data__, b.__data__) : !a - !b; } __name(compareNode, "compareNode"); for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group[i]) { sortgroup[i] = node; } } sortgroup.sort(compareNode); } return new Selection(sortgroups, this._parents).order(); } __name(sort_default, "default"); function ascending2(a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; } __name(ascending2, "ascending"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js function call_default() { var callback = arguments[0]; arguments[0] = this; callback.apply(null, arguments); return this; } __name(call_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js function nodes_default() { return Array.from(this); } __name(nodes_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js function node_default() { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { var node = group[i]; if (node) return node; } } return null; } __name(node_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js function size_default() { let size = 0; for (const node of this) ++size; return size; } __name(size_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js function empty_default() { return !this.node(); } __name(empty_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js function each_default(callback) { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { if (node = group[i]) callback.call(node, node.__data__, i, group); } } return this; } __name(each_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespaces.js var xhtml = "http://www.w3.org/1999/xhtml"; var namespaces_default = { svg: "http://www.w3.org/2000/svg", xhtml, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" }; // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js function namespace_default(name) { var prefix = name += "", i = prefix.indexOf(":"); if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); return namespaces_default.hasOwnProperty(prefix) ? { space: namespaces_default[prefix], local: name } : name; } __name(namespace_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js function attrRemove(name) { return function() { this.removeAttribute(name); }; } __name(attrRemove, "attrRemove"); function attrRemoveNS(fullname) { return function() { this.removeAttributeNS(fullname.space, fullname.local); }; } __name(attrRemoveNS, "attrRemoveNS"); function attrConstant(name, value) { return function() { this.setAttribute(name, value); }; } __name(attrConstant, "attrConstant"); function attrConstantNS(fullname, value) { return function() { this.setAttributeNS(fullname.space, fullname.local, value); }; } __name(attrConstantNS, "attrConstantNS"); function attrFunction(name, value) { return function() { var v = value.apply(this, arguments); if (v == null) this.removeAttribute(name); else this.setAttribute(name, v); }; } __name(attrFunction, "attrFunction"); function attrFunctionNS(fullname, value) { return function() { var v = value.apply(this, arguments); if (v == null) this.removeAttributeNS(fullname.space, fullname.local); else this.setAttributeNS(fullname.space, fullname.local, v); }; } __name(attrFunctionNS, "attrFunctionNS"); function attr_default(name, value) { var fullname = namespace_default(name); if (arguments.length < 2) { var node = this.node(); return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname); } return this.each((value == null ? fullname.local ? attrRemoveNS : attrRemove : typeof value === "function" ? fullname.local ? attrFunctionNS : attrFunction : fullname.local ? attrConstantNS : attrConstant)(fullname, value)); } __name(attr_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js function window_default(node) { return node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView; } __name(window_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js function styleRemove(name) { return function() { this.style.removeProperty(name); }; } __name(styleRemove, "styleRemove"); function styleConstant(name, value, priority) { return function() { this.style.setProperty(name, value, priority); }; } __name(styleConstant, "styleConstant"); function styleFunction(name, value, priority) { return function() { var v = value.apply(this, arguments); if (v == null) this.style.removeProperty(name); else this.style.setProperty(name, v, priority); }; } __name(styleFunction, "styleFunction"); function style_default(name, value, priority) { return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name); } __name(style_default, "default"); function styleValue(node, name) { return node.style.getPropertyValue(name) || window_default(node).getComputedStyle(node, null).getPropertyValue(name); } __name(styleValue, "styleValue"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js function propertyRemove(name) { return function() { delete this[name]; }; } __name(propertyRemove, "propertyRemove"); function propertyConstant(name, value) { return function() { this[name] = value; }; } __name(propertyConstant, "propertyConstant"); function propertyFunction(name, value) { return function() { var v = value.apply(this, arguments); if (v == null) delete this[name]; else this[name] = v; }; } __name(propertyFunction, "propertyFunction"); function property_default(name, value) { return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name]; } __name(property_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js function classArray(string) { return string.trim().split(/^|\s+/); } __name(classArray, "classArray"); function classList(node) { return node.classList || new ClassList(node); } __name(classList, "classList"); function ClassList(node) { this._node = node; this._names = classArray(node.getAttribute("class") || ""); } __name(ClassList, "ClassList"); ClassList.prototype = { add: /* @__PURE__ */ __name(function(name) { var i = this._names.indexOf(name); if (i < 0) { this._names.push(name); this._node.setAttribute("class", this._names.join(" ")); } }, "add"), remove: /* @__PURE__ */ __name(function(name) { var i = this._names.indexOf(name); if (i >= 0) { this._names.splice(i, 1); this._node.setAttribute("class", this._names.join(" ")); } }, "remove"), contains: /* @__PURE__ */ __name(function(name) { return this._names.indexOf(name) >= 0; }, "contains") }; function classedAdd(node, names) { var list = classList(node), i = -1, n = names.length; while (++i < n) list.add(names[i]); } __name(classedAdd, "classedAdd"); function classedRemove(node, names) { var list = classList(node), i = -1, n = names.length; while (++i < n) list.remove(names[i]); } __name(classedRemove, "classedRemove"); function classedTrue(names) { return function() { classedAdd(this, names); }; } __name(classedTrue, "classedTrue"); function classedFalse(names) { return function() { classedRemove(this, names); }; } __name(classedFalse, "classedFalse"); function classedFunction(names, value) { return function() { (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); }; } __name(classedFunction, "classedFunction"); function classed_default(name, value) { var names = classArray(name + ""); if (arguments.length < 2) { var list = classList(this.node()), i = -1, n = names.length; while (++i < n) if (!list.contains(names[i])) return false; return true; } return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value)); } __name(classed_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js function textRemove() { this.textContent = ""; } __name(textRemove, "textRemove"); function textConstant(value) { return function() { this.textContent = value; }; } __name(textConstant, "textConstant"); function textFunction(value) { return function() { var v = value.apply(this, arguments); this.textContent = v == null ? "" : v; }; } __name(textFunction, "textFunction"); function text_default(value) { return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent; } __name(text_default, "default"); // ../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js function htmlRemove() { this.innerHTML = ""; } __name(htmlRemove, "htmlRemove"); function htmlConstant(value) { return function() { this.innerHTML = value; }; } __name(htmlConstant, "htmlConstant"); func