import { purify } from "./chunk-CJRZFFQO.js"; import { cubehelix, cubehelixLong, number_default, rgb, rgbBasis, round_default, select_default, value_default } from "./chunk-5KLUPWDV.js"; import { require_dayjs_min } from "./chunk-V3IZG5IE.js"; import { __commonJS, __toESM } from "./chunk-TNDHKS54.js"; // node_modules/@braintree/sanitize-url/dist/index.js var require_dist = __commonJS({ "node_modules/@braintree/sanitize-url/dist/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.sanitizeUrl = exports2.BLANK_URL = void 0; var invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im; var htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g; var htmlCtrlEntityRegex = /&(newline|tab);/gi; var ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim; var urlSchemeRegex = /^.+(:|:)/gim; var relativeFirstCharacters = [".", "/"]; exports2.BLANK_URL = "about:blank"; function isRelativeUrlWithoutProtocol(url) { return relativeFirstCharacters.indexOf(url[0]) > -1; } function decodeHtmlCharacters(str2) { var removedNullByte = str2.replace(ctrlCharactersRegex, ""); return removedNullByte.replace(htmlEntitiesRegex, function(match2, dec) { return String.fromCharCode(dec); }); } function sanitizeUrl2(url) { if (!url) { return exports2.BLANK_URL; } var sanitizedUrl = decodeHtmlCharacters(url).replace(htmlCtrlEntityRegex, "").replace(ctrlCharactersRegex, "").trim(); if (!sanitizedUrl) { return exports2.BLANK_URL; } if (isRelativeUrlWithoutProtocol(sanitizedUrl)) { return sanitizedUrl; } var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex); if (!urlSchemeParseResults) { return sanitizedUrl; } var urlScheme = urlSchemeParseResults[0]; if (invalidProtocolRegex.test(urlScheme)) { return exports2.BLANK_URL; } return sanitizedUrl; } exports2.sanitizeUrl = sanitizeUrl2; } }); // node_modules/ts-dedent/esm/index.js function dedent(templ) { var values = []; for (var _i = 1; _i < arguments.length; _i++) { values[_i - 1] = arguments[_i]; } var strings = Array.from(typeof templ === "string" ? [templ] : templ); strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, ""); var indentLengths = strings.reduce(function(arr, str2) { var matches = str2.match(/\n([\t ]+|(?!\s).)/g); if (matches) { return arr.concat(matches.map(function(match2) { var _a, _b; return (_b = (_a = match2.match(/[\t ]/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; })); } return arr; }, []); if (indentLengths.length) { var pattern_1 = new RegExp("\n[ ]{" + Math.min.apply(Math, indentLengths) + "}", "g"); strings = strings.map(function(str2) { return str2.replace(pattern_1, "\n"); }); } strings[0] = strings[0].replace(/^\r?\n/, ""); var string = strings[0]; values.forEach(function(value, i) { var endentations = string.match(/(?:^|\n)( *)$/); var endentation = endentations ? endentations[1] : ""; var indentedValue = value; if (typeof value === "string" && value.includes("\n")) { indentedValue = String(value).split("\n").map(function(str2, i2) { return i2 === 0 ? str2 : "" + endentation + str2; }).join("\n"); } string += indentedValue + strings[i + 1]; }); return string; } // node_modules/d3-array/src/max.js function max(values, valueof) { let max5; if (valueof === void 0) { for (const value of values) { if (value != null && (max5 < value || max5 === void 0 && value >= value)) { max5 = value; } } } else { let index2 = -1; for (let value of values) { if ((value = valueof(value, ++index2, values)) != null && (max5 < value || max5 === void 0 && value >= value)) { max5 = value; } } } return max5; } // 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 index2 = -1; for (let value of values) { if ((value = valueof(value, ++index2, values)) != null && (min4 > value || min4 === void 0 && value >= value)) { min4 = value; } } } return min4; } // node_modules/d3-array/src/ascending.js function ascending(a2, b) { return a2 == null || b == null ? NaN : a2 < b ? -1 : a2 > b ? 1 : a2 >= b ? 0 : NaN; } // node_modules/d3-array/src/descending.js function descending(a2, b) { return a2 == null || b == null ? NaN : b < a2 ? -1 : b > a2 ? 1 : b >= a2 ? 0 : NaN; } // node_modules/d3-array/src/bisector.js function bisector(f) { let compare1, compare2, delta; if (f.length !== 2) { compare1 = ascending; compare2 = (d, x3) => ascending(f(d), x3); delta = (d, x3) => f(d) - x3; } else { compare1 = f === ascending || f === descending ? f : zero; compare2 = f; delta = f; } function left2(a2, x3, lo = 0, hi = a2.length) { if (lo < hi) { if (compare1(x3, x3) !== 0) return hi; do { const mid = lo + hi >>> 1; if (compare2(a2[mid], x3) < 0) lo = mid + 1; else hi = mid; } while (lo < hi); } return lo; } function right2(a2, x3, lo = 0, hi = a2.length) { if (lo < hi) { if (compare1(x3, x3) !== 0) return hi; do { const mid = lo + hi >>> 1; if (compare2(a2[mid], x3) <= 0) lo = mid + 1; else hi = mid; } while (lo < hi); } return lo; } function center2(a2, x3, lo = 0, hi = a2.length) { const i = left2(a2, x3, lo, hi - 1); return i > lo && delta(a2[i - 1], x3) > -delta(a2[i], x3) ? i - 1 : i; } return { left: left2, center: center2, right: right2 }; } function zero() { return 0; } // node_modules/d3-array/src/number.js function number(x3) { return x3 === null ? NaN : +x3; } // 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/d3-array/src/blur.js var blur2 = Blur2(blurf); var blurImage = Blur2(blurfImage); function Blur2(blur3) { return function(data, rx, ry = rx) { if (!((rx = +rx) >= 0)) throw new RangeError("invalid rx"); if (!((ry = +ry) >= 0)) throw new RangeError("invalid ry"); let { data: values, width, height } = data; if (!((width = Math.floor(width)) >= 0)) throw new RangeError("invalid width"); if (!((height = Math.floor(height !== void 0 ? height : values.length / width)) >= 0)) throw new RangeError("invalid height"); if (!width || !height || !rx && !ry) return data; const blurx = rx && blur3(rx); const blury = ry && blur3(ry); const temp = values.slice(); if (blurx && blury) { blurh(blurx, temp, values, width, height); blurh(blurx, values, temp, width, height); blurh(blurx, temp, values, width, height); blurv(blury, values, temp, width, height); blurv(blury, temp, values, width, height); blurv(blury, values, temp, width, height); } else if (blurx) { blurh(blurx, values, temp, width, height); blurh(blurx, temp, values, width, height); blurh(blurx, values, temp, width, height); } else if (blury) { blurv(blury, values, temp, width, height); blurv(blury, temp, values, width, height); blurv(blury, values, temp, width, height); } return data; }; } function blurh(blur3, T, S, w, h) { for (let y3 = 0, n = w * h; y3 < n; ) { blur3(T, S, y3, y3 += w, 1); } } function blurv(blur3, T, S, w, h) { for (let x3 = 0, n = w * h; x3 < w; ++x3) { blur3(T, S, x3, x3 + n, w); } } function blurfImage(radius) { const blur3 = blurf(radius); return (T, S, start, stop, step) => { start <<= 2, stop <<= 2, step <<= 2; blur3(T, S, start + 0, stop + 0, step); blur3(T, S, start + 1, stop + 1, step); blur3(T, S, start + 2, stop + 2, step); blur3(T, S, start + 3, stop + 3, step); }; } function blurf(radius) { const radius0 = Math.floor(radius); if (radius0 === radius) return bluri(radius); const t = radius - radius0; const w = 2 * radius + 1; return (T, S, start, stop, step) => { if (!((stop -= step) >= start)) return; let sum4 = radius0 * S[start]; const s0 = step * radius0; const s1 = s0 + step; for (let i = start, j = start + s0; i < j; i += step) { sum4 += S[Math.min(stop, i)]; } for (let i = start, j = stop; i <= j; i += step) { sum4 += S[Math.min(stop, i + s0)]; T[i] = (sum4 + t * (S[Math.max(start, i - s1)] + S[Math.min(stop, i + s1)])) / w; sum4 -= S[Math.max(start, i - s0)]; } }; } function bluri(radius) { const w = 2 * radius + 1; return (T, S, start, stop, step) => { if (!((stop -= step) >= start)) return; let sum4 = radius * S[start]; const s2 = step * radius; for (let i = start, j = start + s2; i < j; i += step) { sum4 += S[Math.min(stop, i)]; } for (let i = start, j = stop; i <= j; i += step) { sum4 += S[Math.min(stop, i + s2)]; T[i] = sum4 / w; sum4 -= S[Math.max(start, i - s2)]; } }; } // node_modules/d3-array/src/fsum.js var Adder = class { constructor() { this._partials = new Float64Array(32); this._n = 0; } add(x3) { const p = this._partials; let i = 0; for (let j = 0; j < this._n && j < 32; j++) { const y3 = p[j], hi = x3 + y3, lo = Math.abs(x3) < Math.abs(y3) ? x3 - (hi - y3) : y3 - (hi - x3); if (lo) p[i++] = lo; x3 = hi; } p[i] = x3; this._n = i + 1; return this; } valueOf() { const p = this._partials; let n = this._n, x3, y3, lo, hi = 0; if (n > 0) { hi = p[--n]; while (n > 0) { x3 = hi; y3 = p[--n]; hi = x3 + y3; lo = y3 - (hi - x3); if (lo) break; } if (n > 0 && (lo < 0 && p[n - 1] < 0 || lo > 0 && p[n - 1] > 0)) { y3 = lo * 2; x3 = hi + y3; if (y3 == x3 - hi) hi = x3; } } return hi; } }; // node_modules/internmap/src/index.js var InternMap = class extends Map { 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; } function intern_set({ _intern, _key }, value) { const key = _key(value); if (_intern.has(key)) return _intern.get(key); _intern.set(key, value); return value; } function intern_delete({ _intern, _key }, value) { const key = _key(value); if (_intern.has(key)) { value = _intern.get(key); _intern.delete(key); } return value; } function keyof(value) { return value !== null && typeof value === "object" ? value.valueOf() : value; } // node_modules/d3-array/src/array.js var array = Array.prototype; var slice = array.slice; var map = array.map; // node_modules/d3-array/src/ticks.js var e10 = Math.sqrt(50); var e5 = Math.sqrt(10); var e2 = Math.sqrt(2); function tickSpec(start, stop, count3) { const step = (stop - start) / Math.max(0, count3), 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(start * inc); i2 = Math.round(stop * inc); if (i1 / inc < start) ++i1; if (i2 / inc > stop) --i2; inc = -inc; } else { inc = Math.pow(10, power) * factor; i1 = Math.round(start / inc); i2 = Math.round(stop / inc); if (i1 * inc < start) ++i1; if (i2 * inc > stop) --i2; } if (i2 < i1 && 0.5 <= count3 && count3 < 2) return tickSpec(start, stop, count3 * 2); return [i1, i2, inc]; } function ticks(start, stop, count3) { stop = +stop, start = +start, count3 = +count3; if (!(count3 > 0)) return []; if (start === stop) return [start]; const reverse2 = stop < start, [i1, i2, inc] = reverse2 ? tickSpec(stop, start, count3) : tickSpec(start, stop, count3); if (!(i2 >= i1)) return []; const n = i2 - i1 + 1, ticks2 = new Array(n); if (reverse2) { 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; } function tickIncrement(start, stop, count3) { stop = +stop, start = +start, count3 = +count3; return tickSpec(start, stop, count3)[2]; } function tickStep(start, stop, count3) { stop = +stop, start = +start, count3 = +count3; const reverse2 = stop < start, inc = reverse2 ? tickIncrement(stop, start, count3) : tickIncrement(start, stop, count3); return (reverse2 ? -1 : 1) * (inc < 0 ? 1 / -inc : inc); } // node_modules/d3-array/src/merge.js function* flatten(arrays) { for (const array3 of arrays) { yield* array3; } } function merge(arrays) { return Array.from(flatten(arrays)); } // node_modules/d3-array/src/range.js function range(start, stop, step) { start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; var i = -1, n = Math.max(0, Math.ceil((stop - start) / step)) | 0, range2 = new Array(n); while (++i < n) { range2[i] = start + i * step; } return range2; } // node_modules/d3-array/src/shuffle.js var shuffle_default = shuffler(Math.random); function shuffler(random2) { return function shuffle2(array3, i0 = 0, i1 = array3.length) { let m = i1 - (i0 = +i0); while (m) { const i = random2() * m-- | 0, t = array3[m + i0]; array3[m + i0] = array3[i + i0]; array3[i + i0] = t; } return array3; }; } // node_modules/d3-axis/src/identity.js function identity_default(x3) { return x3; } // 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(x3) { return "translate(" + x3 + ",0)"; } function translateY(y3) { return "translate(0," + y3 + ")"; } function number2(scale2) { return (d) => +scale2(d); } function center(scale2, offset) { offset = Math.max(0, scale2.bandwidth() - offset * 2) / 2; if (scale2.round()) offset = Math.round(offset); return (d) => +scale2(d) + offset; } function entering() { return !this.__axis; } function axis(orient, scale2) { var tickArguments = [], tickValues = null, tickFormat2 = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k2 = orient === top || orient === left ? -1 : 1, x3 = orient === left || orient === right ? "x" : "y", transform = orient === top || orient === bottom ? translateX : translateY; function axis2(context) { var values = tickValues == null ? scale2.ticks ? scale2.ticks.apply(scale2, tickArguments) : scale2.domain() : tickValues, format3 = tickFormat2 == null ? scale2.tickFormat ? scale2.tickFormat.apply(scale2, tickArguments) : identity_default : tickFormat2, spacing = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale2.range(), range0 = +range2[0] + offset, range1 = +range2[range2.length - 1] + offset, position2 = (scale2.bandwidth ? center : number2)(scale2.copy(), offset), selection = context.selection ? context.selection() : context, path2 = selection.selectAll(".domain").data([null]), tick = selection.selectAll(".tick").data(values, scale2).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line2 = 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); line2 = line2.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x3 + "2", k2 * tickSizeInner)); text = text.merge(tickEnter.append("text").attr("fill", "currentColor").attr(x3, k2 * spacing).attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); if (context !== selection) { path2 = path2.transition(context); tick = tick.transition(context); line2 = line2.transition(context); text = text.transition(context); tickExit = tickExit.transition(context).attr("opacity", epsilon).attr("transform", function(d) { return isFinite(d = position2(d)) ? transform(d + offset) : this.getAttribute("transform"); }); tickEnter.attr("opacity", epsilon).attr("transform", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position2(d)) + offset); }); } tickExit.remove(); path2.attr("d", orient === left || orient === right ? tickSizeOuter ? "M" + k2 * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k2 * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1 : tickSizeOuter ? "M" + range0 + "," + k2 * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k2 * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1); tick.attr("opacity", 1).attr("transform", function(d) { return transform(position2(d) + offset); }); line2.attr(x3 + "2", k2 * tickSizeInner); text.attr(x3, k2 * spacing).text(format3); selection.filter(entering).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); selection.each(function() { this.__axis = position2; }); } axis2.scale = function(_) { return arguments.length ? (scale2 = _, axis2) : scale2; }; 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; } function axisTop(scale2) { return axis(top, scale2); } function axisBottom(scale2) { return axis(bottom, scale2); } // node_modules/d3-scale/src/init.js function initRange(domain, range2) { switch (arguments.length) { case 0: break; case 1: this.range(domain); break; default: this.range(range2).domain(domain); break; } return this; } // node_modules/d3-scale/src/ordinal.js var implicit = Symbol("implicit"); function ordinal() { var index2 = new InternMap(), domain = [], range2 = [], unknown = implicit; function scale2(d) { let i = index2.get(d); if (i === void 0) { if (unknown !== implicit) return unknown; index2.set(d, i = domain.push(d) - 1); } return range2[i % range2.length]; } scale2.domain = function(_) { if (!arguments.length) return domain.slice(); domain = [], index2 = new InternMap(); for (const value of _) { if (index2.has(value)) continue; index2.set(value, domain.push(value) - 1); } return scale2; }; scale2.range = function(_) { return arguments.length ? (range2 = Array.from(_), scale2) : range2.slice(); }; scale2.unknown = function(_) { return arguments.length ? (unknown = _, scale2) : unknown; }; scale2.copy = function() { return ordinal(domain, range2).unknown(unknown); }; initRange.apply(scale2, arguments); return scale2; } // node_modules/d3-scale/src/band.js function band() { var scale2 = ordinal().unknown(void 0), domain = scale2.domain, ordinalRange = scale2.range, r0 = 0, r1 = 1, step, bandwidth, round = false, paddingInner = 0, paddingOuter = 0, align = 0.5; delete scale2.unknown; function rescale() { var n = domain().length, reverse2 = r1 < r0, start = reverse2 ? r1 : r0, stop = reverse2 ? r0 : r1; step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); if (round) step = Math.floor(step); start += (stop - start - step * (n - paddingInner)) * align; bandwidth = step * (1 - paddingInner); if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); var values = range(n).map(function(i) { return start + step * i; }); return ordinalRange(reverse2 ? values.reverse() : values); } scale2.domain = function(_) { return arguments.length ? (domain(_), rescale()) : domain(); }; scale2.range = function(_) { return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1]; }; scale2.rangeRound = function(_) { return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale(); }; scale2.bandwidth = function() { return bandwidth; }; scale2.step = function() { return step; }; scale2.round = function(_) { return arguments.length ? (round = !!_, rescale()) : round; }; scale2.padding = function(_) { return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; }; scale2.paddingInner = function(_) { return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; }; scale2.paddingOuter = function(_) { return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; }; scale2.align = function(_) { return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; }; scale2.copy = function() { return band(domain(), [r0, r1]).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align); }; return initRange.apply(rescale(), arguments); } // node_modules/d3-scale/src/constant.js function constants(x3) { return function() { return x3; }; } // node_modules/d3-scale/src/number.js function number3(x3) { return +x3; } // node_modules/d3-scale/src/continuous.js var unit = [0, 1]; function identity2(x3) { return x3; } function normalize(a2, b) { return (b -= a2 = +a2) ? function(x3) { return (x3 - a2) / b; } : constants(isNaN(b) ? NaN : 0.5); } function clamper(a2, b) { var t; if (a2 > b) t = a2, a2 = b, b = t; return function(x3) { return Math.max(a2, Math.min(b, x3)); }; } function bimap(domain, range2, interpolate) { var d0 = domain[0], d1 = domain[1], r0 = range2[0], r1 = range2[1]; if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); return function(x3) { return r0(d0(x3)); }; } function polymap(domain, range2, interpolate) { var j = Math.min(domain.length, range2.length) - 1, d = new Array(j), r = new Array(j), i = -1; if (domain[j] < domain[0]) { domain = domain.slice().reverse(); range2 = range2.slice().reverse(); } while (++i < j) { d[i] = normalize(domain[i], domain[i + 1]); r[i] = interpolate(range2[i], range2[i + 1]); } return function(x3) { var i2 = bisect_default(domain, x3, 1, j) - 1; return r[i2](d[i2](x3)); }; } function copy(source, target) { return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown()); } function transformer() { var domain = unit, range2 = unit, interpolate = value_default, transform, untransform, unknown, clamp = identity2, piecewise2, output, input; function rescale() { var n = Math.min(domain.length, range2.length); if (clamp !== identity2) clamp = clamper(domain[0], domain[n - 1]); piecewise2 = n > 2 ? polymap : bimap; output = input = null; return scale2; } function scale2(x3) { return x3 == null || isNaN(x3 = +x3) ? unknown : (output || (output = piecewise2(domain.map(transform), range2, interpolate)))(transform(clamp(x3))); } scale2.invert = function(y3) { return clamp(untransform((input || (input = piecewise2(range2, domain.map(transform), number_default)))(y3))); }; scale2.domain = function(_) { return arguments.length ? (domain = Array.from(_, number3), rescale()) : domain.slice(); }; scale2.range = function(_) { return arguments.length ? (range2 = Array.from(_), rescale()) : range2.slice(); }; scale2.rangeRound = function(_) { return range2 = Array.from(_), interpolate = round_default, rescale(); }; scale2.clamp = function(_) { return arguments.length ? (clamp = _ ? true : identity2, rescale()) : clamp !== identity2; }; scale2.interpolate = function(_) { return arguments.length ? (interpolate = _, rescale()) : interpolate; }; scale2.unknown = function(_) { return arguments.length ? (unknown = _, scale2) : unknown; }; return function(t, u4) { transform = t, untransform = u4; return rescale(); }; } function continuous() { return transformer()(identity2, identity2); } // node_modules/d3-format/src/formatDecimal.js function formatDecimal_default(x3) { return Math.abs(x3 = Math.round(x3)) >= 1e21 ? x3.toLocaleString("en").replace(/,/g, "") : x3.toString(10); } function formatDecimalParts(x3, p) { if ((i = (x3 = p ? x3.toExponential(p - 1) : x3.toExponential()).indexOf("e")) < 0) return null; var i, coefficient = x3.slice(0, i); return [ coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x3.slice(i + 1) ]; } // node_modules/d3-format/src/exponent.js function exponent_default(x3) { return x3 = formatDecimalParts(Math.abs(x3)), x3 ? x3[1] : NaN; } // node_modules/d3-format/src/formatGroup.js function formatGroup_default(grouping, thousands) { return function(value, width) { var i = value.length, t = [], j = 0, g = grouping[0], length2 = 0; while (i > 0 && g > 0) { if (length2 + g + 1 > width) g = Math.max(1, width - length2); t.push(value.substring(i -= g, i + g)); if ((length2 += g + 1) > width) break; g = grouping[j = (j + 1) % grouping.length]; } return t.reverse().join(thousands); }; } // node_modules/d3-format/src/formatNumerals.js function formatNumerals_default(numerals) { return function(value) { return value.replace(/[0-9]/g, function(i) { return numerals[+i]; }); }; } // node_modules/d3-format/src/formatSpecifier.js var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; function formatSpecifier(specifier) { if (!(match2 = re.exec(specifier))) throw new Error("invalid format: " + specifier); var match2; return new FormatSpecifier({ fill: match2[1], align: match2[2], sign: match2[3], symbol: match2[4], zero: match2[5], width: match2[6], comma: match2[7], precision: match2[8] && match2[8].slice(1), trim: match2[9], type: match2[10] }); } formatSpecifier.prototype = FormatSpecifier.prototype; function FormatSpecifier(specifier) { this.fill = specifier.fill === void 0 ? " " : specifier.fill + ""; this.align = specifier.align === void 0 ? ">" : specifier.align + ""; this.sign = specifier.sign === void 0 ? "-" : specifier.sign + ""; this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + ""; this.zero = !!specifier.zero; this.width = specifier.width === void 0 ? void 0 : +specifier.width; this.comma = !!specifier.comma; this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision; this.trim = !!specifier.trim; this.type = specifier.type === void 0 ? "" : specifier.type + ""; } FormatSpecifier.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; }; // node_modules/d3-format/src/formatTrim.js function formatTrim_default(s2) { out: for (var n = s2.length, i = 1, i0 = -1, i1; i < n; ++i) { switch (s2[i]) { case ".": i0 = i1 = i; break; case "0": if (i0 === 0) i0 = i; i1 = i; break; default: if (!+s2[i]) break out; if (i0 > 0) i0 = 0; break; } } return i0 > 0 ? s2.slice(0, i0) + s2.slice(i1 + 1) : s2; } // node_modules/d3-format/src/formatPrefixAuto.js var prefixExponent; function formatPrefixAuto_default(x3, p) { var d = formatDecimalParts(x3, p); if (!d) return x3 + ""; var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length; return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x3, Math.max(0, p + i - 1))[0]; } // node_modules/d3-format/src/formatRounded.js function formatRounded_default(x3, p) { var d = formatDecimalParts(x3, p); if (!d) return x3 + ""; var coefficient = d[0], exponent = d[1]; return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0"); } // node_modules/d3-format/src/formatTypes.js var formatTypes_default = { "%": (x3, p) => (x3 * 100).toFixed(p), "b": (x3) => Math.round(x3).toString(2), "c": (x3) => x3 + "", "d": formatDecimal_default, "e": (x3, p) => x3.toExponential(p), "f": (x3, p) => x3.toFixed(p), "g": (x3, p) => x3.toPrecision(p), "o": (x3) => Math.round(x3).toString(8), "p": (x3, p) => formatRounded_default(x3 * 100, p), "r": formatRounded_default, "s": formatPrefixAuto_default, "X": (x3) => Math.round(x3).toString(16).toUpperCase(), "x": (x3) => Math.round(x3).toString(16) }; // node_modules/d3-format/src/identity.js function identity_default2(x3) { return x3; } // node_modules/d3-format/src/locale.js var map3 = Array.prototype.map; var prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"]; function locale_default(locale3) { var group2 = locale3.grouping === void 0 || locale3.thousands === void 0 ? identity_default2 : formatGroup_default(map3.call(locale3.grouping, Number), locale3.thousands + ""), currencyPrefix = locale3.currency === void 0 ? "" : locale3.currency[0] + "", currencySuffix = locale3.currency === void 0 ? "" : locale3.currency[1] + "", decimal = locale3.decimal === void 0 ? "." : locale3.decimal + "", numerals = locale3.numerals === void 0 ? identity_default2 : formatNumerals_default(map3.call(locale3.numerals, String)), percent = locale3.percent === void 0 ? "%" : locale3.percent + "", minus = locale3.minus === void 0 ? "−" : locale3.minus + "", nan = locale3.nan === void 0 ? "NaN" : locale3.nan + ""; function newFormat(specifier) { specifier = formatSpecifier(specifier); var fill = specifier.fill, align = specifier.align, sign3 = specifier.sign, symbol = specifier.symbol, zero2 = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim2 = specifier.trim, type3 = specifier.type; if (type3 === "n") comma = true, type3 = "g"; else if (!formatTypes_default[type3]) precision === void 0 && (precision = 12), trim2 = true, type3 = "g"; if (zero2 || fill === "0" && align === "=") zero2 = true, fill = "0", align = "="; var prefix2 = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type3) ? "0" + type3.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type3) ? percent : ""; var formatType = formatTypes_default[type3], maybeSuffix = /[defgprs%]/.test(type3); precision = precision === void 0 ? 6 : /[gprs]/.test(type3) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision)); function format3(value) { var valuePrefix = prefix2, valueSuffix = suffix, i, n, c3; if (type3 === "c") { valueSuffix = formatType(value) + valueSuffix; value = ""; } else { value = +value; var valueNegative = value < 0 || 1 / value < 0; value = isNaN(value) ? nan : formatType(Math.abs(value), precision); if (trim2) value = formatTrim_default(value); if (valueNegative && +value === 0 && sign3 !== "+") valueNegative = false; valuePrefix = (valueNegative ? sign3 === "(" ? sign3 : minus : sign3 === "-" || sign3 === "(" ? "" : sign3) + valuePrefix; valueSuffix = (type3 === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign3 === "(" ? ")" : ""); if (maybeSuffix) { i = -1, n = value.length; while (++i < n) { if (c3 = value.charCodeAt(i), 48 > c3 || c3 > 57) { valueSuffix = (c3 === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; value = value.slice(0, i); break; } } } } if (comma && !zero2) value = group2(value, Infinity); var length2 = valuePrefix.length + value.length + valueSuffix.length, padding = length2 < width ? new Array(width - length2 + 1).join(fill) : ""; if (comma && zero2) value = group2(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; switch (align) { case "<": value = valuePrefix + value + valueSuffix + padding; break; case "=": value = valuePrefix + padding + value + valueSuffix; break; case "^": value = padding.slice(0, length2 = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length2); break; default: value = padding + valuePrefix + value + valueSuffix; break; } return numerals(value); } format3.toString = function() { return specifier + ""; }; return format3; } function formatPrefix2(specifier, value) { var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k2 = Math.pow(10, -e), prefix2 = prefixes[8 + e / 3]; return function(value2) { return f(k2 * value2) + prefix2; }; } return { format: newFormat, formatPrefix: formatPrefix2 }; } // node_modules/d3-format/src/defaultLocale.js var locale; var format; var formatPrefix; defaultLocale({ thousands: ",", grouping: [3], currency: ["$", ""] }); function defaultLocale(definition) { locale = locale_default(definition); format = locale.format; formatPrefix = locale.formatPrefix; return locale; } // node_modules/d3-format/src/precisionFixed.js function precisionFixed_default(step) { return Math.max(0, -exponent_default(Math.abs(step))); } // node_modules/d3-format/src/precisionPrefix.js function precisionPrefix_default(step, value) { return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3 - exponent_default(Math.abs(step))); } // node_modules/d3-format/src/precisionRound.js function precisionRound_default(step, max5) { step = Math.abs(step), max5 = Math.abs(max5) - step; return Math.max(0, exponent_default(max5) - exponent_default(step)) + 1; } // node_modules/d3-scale/src/tickFormat.js function tickFormat(start, stop, count3, specifier) { var step = tickStep(start, stop, count3), precision; specifier = formatSpecifier(specifier == null ? ",f" : specifier); switch (specifier.type) { case "s": { var value = Math.max(Math.abs(start), Math.abs(stop)); if (specifier.precision == null && !isNaN(precision = precisionPrefix_default(step, value))) specifier.precision = precision; return formatPrefix(specifier, value); } case "": case "e": case "g": case "p": case "r": { if (specifier.precision == null && !isNaN(precision = precisionRound_default(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); break; } case "f": case "%": { if (specifier.precision == null && !isNaN(precision = precisionFixed_default(step))) specifier.precision = precision - (specifier.type === "%") * 2; break; } } return format(specifier); } // node_modules/d3-scale/src/linear.js function linearish(scale2) { var domain = scale2.domain; scale2.ticks = function(count3) { var d = domain(); return ticks(d[0], d[d.length - 1], count3 == null ? 10 : count3); }; scale2.tickFormat = function(count3, specifier) { var d = domain(); return tickFormat(d[0], d[d.length - 1], count3 == null ? 10 : count3, specifier); }; scale2.nice = function(count3) { if (count3 == null) count3 = 10; var d = domain(); var i0 = 0; var i1 = d.length - 1; var start = d[i0]; var stop = d[i1]; var prestep; var step; var maxIter = 10; if (stop < start) { step = start, start = stop, stop = step; step = i0, i0 = i1, i1 = step; } while (maxIter-- > 0) { step = tickIncrement(start, stop, count3); if (step === prestep) { d[i0] = start; d[i1] = stop; return domain(d); } else if (step > 0) { start = Math.floor(start / step) * step; stop = Math.ceil(stop / step) * step; } else if (step < 0) { start = Math.ceil(start * step) / step; stop = Math.floor(stop * step) / step; } else { break; } prestep = step; } return scale2; }; return scale2; } function linear() { var scale2 = continuous(); scale2.copy = function() { return copy(scale2, linear()); }; initRange.apply(scale2, arguments); return linearish(scale2); } // node_modules/d3-time/src/interval.js var t0 = /* @__PURE__ */ new Date(); var t1 = /* @__PURE__ */ new Date(); function timeInterval(floori, offseti, count3, field) { function interval(date2) { return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2; } interval.floor = (date2) => { return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2; }; interval.ceil = (date2) => { return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2; }; interval.round = (date2) => { const d0 = interval(date2), d1 = interval.ceil(date2); return date2 - d0 < d1 - date2 ? d0 : d1; }; interval.offset = (date2, step) => { return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2; }; interval.range = (start, stop, step) => { const range2 = []; start = interval.ceil(start); step = step == null ? 1 : Math.floor(step); if (!(start < stop) || !(step > 0)) return range2; let previous; do range2.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start); while (previous < start && start < stop); return range2; }; interval.filter = (test) => { return timeInterval((date2) => { if (date2 >= date2) while (floori(date2), !test(date2)) date2.setTime(date2 - 1); }, (date2, step) => { if (date2 >= date2) { if (step < 0) while (++step <= 0) { while (offseti(date2, -1), !test(date2)) { } } else while (--step >= 0) { while (offseti(date2, 1), !test(date2)) { } } } }); }; if (count3) { interval.count = (start, end) => { t0.setTime(+start), t1.setTime(+end); floori(t0), floori(t1); return Math.floor(count3(t0, t1)); }; interval.every = (step) => { step = Math.floor(step); return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? (d) => field(d) % step === 0 : (d) => interval.count(0, d) % step === 0); }; } return interval; } // node_modules/d3-time/src/millisecond.js var millisecond = timeInterval(() => { }, (date2, step) => { date2.setTime(+date2 + step); }, (start, end) => { return end - start; }); millisecond.every = (k2) => { k2 = Math.floor(k2); if (!isFinite(k2) || !(k2 > 0)) return null; if (!(k2 > 1)) return millisecond; return timeInterval((date2) => { date2.setTime(Math.floor(date2 / k2) * k2); }, (date2, step) => { date2.setTime(+date2 + step * k2); }, (start, end) => { return (end - start) / k2; }); }; var milliseconds = millisecond.range; // node_modules/d3-time/src/duration.js var durationSecond = 1e3; var durationMinute = durationSecond * 60; var durationHour = durationMinute * 60; var durationDay = durationHour * 24; var durationWeek = durationDay * 7; var durationMonth = durationDay * 30; var durationYear = durationDay * 365; // node_modules/d3-time/src/second.js var second = timeInterval((date2) => { date2.setTime(date2 - date2.getMilliseconds()); }, (date2, step) => { date2.setTime(+date2 + step * durationSecond); }, (start, end) => { return (end - start) / durationSecond; }, (date2) => { return date2.getUTCSeconds(); }); var seconds = second.range; // node_modules/d3-time/src/minute.js var timeMinute = timeInterval((date2) => { date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond); }, (date2, step) => { date2.setTime(+date2 + step * durationMinute); }, (start, end) => { return (end - start) / durationMinute; }, (date2) => { return date2.getMinutes(); }); var timeMinutes = timeMinute.range; var utcMinute = timeInterval((date2) => { date2.setUTCSeconds(0, 0); }, (date2, step) => { date2.setTime(+date2 + step * durationMinute); }, (start, end) => { return (end - start) / durationMinute; }, (date2) => { return date2.getUTCMinutes(); }); var utcMinutes = utcMinute.range; // node_modules/d3-time/src/hour.js var timeHour = timeInterval((date2) => { date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond - date2.getMinutes() * durationMinute); }, (date2, step) => { date2.setTime(+date2 + step * durationHour); }, (start, end) => { return (end - start) / durationHour; }, (date2) => { return date2.getHours(); }); var timeHours = timeHour.range; var utcHour = timeInterval((date2) => { date2.setUTCMinutes(0, 0, 0); }, (date2, step) => { date2.setTime(+date2 + step * durationHour); }, (start, end) => { return (end - start) / durationHour; }, (date2) => { return date2.getUTCHours(); }); var utcHours = utcHour.range; // node_modules/d3-time/src/day.js var timeDay = timeInterval( (date2) => date2.setHours(0, 0, 0, 0), (date2, step) => date2.setDate(date2.getDate() + step), (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, (date2) => date2.getDate() - 1 ); var timeDays = timeDay.range; var utcDay = timeInterval((date2) => { date2.setUTCHours(0, 0, 0, 0); }, (date2, step) => { date2.setUTCDate(date2.getUTCDate() + step); }, (start, end) => { return (end - start) / durationDay; }, (date2) => { return date2.getUTCDate() - 1; }); var utcDays = utcDay.range; var unixDay = timeInterval((date2) => { date2.setUTCHours(0, 0, 0, 0); }, (date2, step) => { date2.setUTCDate(date2.getUTCDate() + step); }, (start, end) => { return (end - start) / durationDay; }, (date2) => { return Math.floor(date2 / durationDay); }); var unixDays = unixDay.range; // node_modules/d3-time/src/week.js function timeWeekday(i) { return timeInterval((date2) => { date2.setDate(date2.getDate() - (date2.getDay() + 7 - i) % 7); date2.setHours(0, 0, 0, 0); }, (date2, step) => { date2.setDate(date2.getDate() + step * 7); }, (start, end) => { return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; }); } var timeSunday = timeWeekday(0); var timeMonday = timeWeekday(1); var timeTuesday = timeWeekday(2); var timeWednesday = timeWeekday(3); var timeThursday = timeWeekday(4); var timeFriday = timeWeekday(5); var timeSaturday = timeWeekday(6); var timeSundays = timeSunday.range; var timeMondays = timeMonday.range; var timeTuesdays = timeTuesday.range; var timeWednesdays = timeWednesday.range; var timeThursdays = timeThursday.range; var timeFridays = timeFriday.range; var timeSaturdays = timeSaturday.range; function utcWeekday(i) { return timeInterval((date2) => { date2.setUTCDate(date2.getUTCDate() - (date2.getUTCDay() + 7 - i) % 7); date2.setUTCHours(0, 0, 0, 0); }, (date2, step) => { date2.setUTCDate(date2.getUTCDate() + step * 7); }, (start, end) => { return (end - start) / durationWeek; }); } var utcSunday = utcWeekday(0); var utcMonday = utcWeekday(1); var utcTuesday = utcWeekday(2); var utcWednesday = utcWeekday(3); var utcThursday = utcWeekday(4); var utcFriday = utcWeekday(5); var utcSaturday = utcWeekday(6); var utcSundays = utcSunday.range; var utcMondays = utcMonday.range; var utcTuesdays = utcTuesday.range; var utcWednesdays = utcWednesday.range; var utcThursdays = utcThursday.range; var utcFridays = utcFriday.range; var utcSaturdays = utcSaturday.range; // node_modules/d3-time/src/month.js var timeMonth = timeInterval((date2) => { date2.setDate(1); date2.setHours(0, 0, 0, 0); }, (date2, step) => { date2.setMonth(date2.getMonth() + step); }, (start, end) => { return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; }, (date2) => { return date2.getMonth(); }); var timeMonths = timeMonth.range; var utcMonth = timeInterval((date2) => { date2.setUTCDate(1); date2.setUTCHours(0, 0, 0, 0); }, (date2, step) => { date2.setUTCMonth(date2.getUTCMonth() + step); }, (start, end) => { return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; }, (date2) => { return date2.getUTCMonth(); }); var utcMonths = utcMonth.range; // node_modules/d3-time/src/year.js var timeYear = timeInterval((date2) => { date2.setMonth(0, 1); date2.setHours(0, 0, 0, 0); }, (date2, step) => { date2.setFullYear(date2.getFullYear() + step); }, (start, end) => { return end.getFullYear() - start.getFullYear(); }, (date2) => { return date2.getFullYear(); }); timeYear.every = (k2) => { return !isFinite(k2 = Math.floor(k2)) || !(k2 > 0) ? null : timeInterval((date2) => { date2.setFullYear(Math.floor(date2.getFullYear() / k2) * k2); date2.setMonth(0, 1); date2.setHours(0, 0, 0, 0); }, (date2, step) => { date2.setFullYear(date2.getFullYear() + step * k2); }); }; var timeYears = timeYear.range; var utcYear = timeInterval((date2) => { date2.setUTCMonth(0, 1); date2.setUTCHours(0, 0, 0, 0); }, (date2, step) => { date2.setUTCFullYear(date2.getUTCFullYear() + step); }, (start, end) => { return end.getUTCFullYear() - start.getUTCFullYear(); }, (date2) => { return date2.getUTCFullYear(); }); utcYear.every = (k2) => { return !isFinite(k2 = Math.floor(k2)) || !(k2 > 0) ? null : timeInterval((date2) => { date2.setUTCFullYear(Math.floor(date2.getUTCFullYear() / k2) * k2); date2.setUTCMonth(0, 1); date2.setUTCHours(0, 0, 0, 0); }, (date2, step) => { date2.setUTCFullYear(date2.getUTCFullYear() + step * k2); }); }; var utcYears = utcYear.range; // node_modules/d3-time/src/ticks.js function ticker(year, month, week, day, hour, minute) { const tickIntervals = [ [second, 1, durationSecond], [second, 5, 5 * durationSecond], [second, 15, 15 * durationSecond], [second, 30, 30 * durationSecond], [minute, 1, durationMinute], [minute, 5, 5 * durationMinute], [minute, 15, 15 * durationMinute], [minute, 30, 30 * durationMinute], [hour, 1, durationHour], [hour, 3, 3 * durationHour], [hour, 6, 6 * durationHour], [hour, 12, 12 * durationHour], [day, 1, durationDay], [day, 2, 2 * durationDay], [week, 1, durationWeek], [month, 1, durationMonth], [month, 3, 3 * durationMonth], [year, 1, durationYear] ]; function ticks2(start, stop, count3) { const reverse2 = stop < start; if (reverse2) [start, stop] = [stop, start]; const interval = count3 && typeof count3.range === "function" ? count3 : tickInterval(start, stop, count3); const ticks3 = interval ? interval.range(start, +stop + 1) : []; return reverse2 ? ticks3.reverse() : ticks3; } function tickInterval(start, stop, count3) { const target = Math.abs(stop - start) / count3; const i = bisector(([, , step2]) => step2).right(tickIntervals, target); if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count3)); if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count3), 1)); const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; return t.every(step); } return [ticks2, tickInterval]; } var [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute); var [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute); // node_modules/d3-time-format/src/locale.js function localDate(d) { if (0 <= d.y && d.y < 100) { var date2 = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); date2.setFullYear(d.y); return date2; } return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); } function utcDate(d) { if (0 <= d.y && d.y < 100) { var date2 = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); date2.setUTCFullYear(d.y); return date2; } return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); } function newDate(y3, m, d) { return { y: y3, m, d, H: 0, M: 0, S: 0, L: 0 }; } function formatLocale(locale3) { var locale_dateTime = locale3.dateTime, locale_date = locale3.date, locale_time = locale3.time, locale_periods = locale3.periods, locale_weekdays = locale3.days, locale_shortWeekdays = locale3.shortDays, locale_months = locale3.months, locale_shortMonths = locale3.shortMonths; var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths); var formats = { "a": formatShortWeekday, "A": formatWeekday, "b": formatShortMonth, "B": formatMonth, "c": null, "d": formatDayOfMonth, "e": formatDayOfMonth, "f": formatMicroseconds, "g": formatYearISO, "G": formatFullYearISO, "H": formatHour24, "I": formatHour12, "j": formatDayOfYear, "L": formatMilliseconds, "m": formatMonthNumber, "M": formatMinutes, "p": formatPeriod, "q": formatQuarter, "Q": formatUnixTimestamp, "s": formatUnixTimestampSeconds, "S": formatSeconds, "u": formatWeekdayNumberMonday, "U": formatWeekNumberSunday, "V": formatWeekNumberISO, "w": formatWeekdayNumberSunday, "W": formatWeekNumberMonday, "x": null, "X": null, "y": formatYear, "Y": formatFullYear, "Z": formatZone, "%": formatLiteralPercent }; var utcFormats = { "a": formatUTCShortWeekday, "A": formatUTCWeekday, "b": formatUTCShortMonth, "B": formatUTCMonth, "c": null, "d": formatUTCDayOfMonth, "e": formatUTCDayOfMonth, "f": formatUTCMicroseconds, "g": formatUTCYearISO, "G": formatUTCFullYearISO, "H": formatUTCHour24, "I": formatUTCHour12, "j": formatUTCDayOfYear, "L": formatUTCMilliseconds, "m": formatUTCMonthNumber, "M": formatUTCMinutes, "p": formatUTCPeriod, "q": formatUTCQuarter, "Q": formatUnixTimestamp, "s": formatUnixTimestampSeconds, "S": formatUTCSeconds, "u": formatUTCWeekdayNumberMonday, "U": formatUTCWeekNumberSunday, "V": formatUTCWeekNumberISO, "w": formatUTCWeekdayNumberSunday, "W": formatUTCWeekNumberMonday, "x": null, "X": null, "y": formatUTCYear, "Y": formatUTCFullYear, "Z": formatUTCZone, "%": formatLiteralPercent }; var parses = { "a": parseShortWeekday, "A": parseWeekday, "b": parseShortMonth, "B": parseMonth, "c": parseLocaleDateTime, "d": parseDayOfMonth, "e": parseDayOfMonth, "f": parseMicroseconds, "g": parseYear, "G": parseFullYear, "H": parseHour24, "I": parseHour24, "j": parseDayOfYear, "L": parseMilliseconds, "m": parseMonthNumber, "M": parseMinutes, "p": parsePeriod, "q": parseQuarter, "Q": parseUnixTimestamp, "s": parseUnixTimestampSeconds, "S": parseSeconds, "u": parseWeekdayNumberMonday, "U": parseWeekNumberSunday, "V": parseWeekNumberISO, "w": parseWeekdayNumberSunday, "W": parseWeekNumberMonday, "x": parseLocaleDate, "X": parseLocaleTime, "y": parseYear, "Y": parseFullYear, "Z": parseZone, "%": parseLiteralPercent }; formats.x = newFormat(locale_date, formats); formats.X = newFormat(locale_time, formats); formats.c = newFormat(locale_dateTime, formats); utcFormats.x = newFormat(locale_date, utcFormats); utcFormats.X = newFormat(locale_time, utcFormats); utcFormats.c = newFormat(locale_dateTime, utcFormats); function newFormat(specifier, formats2) { return function(date2) { var string = [], i = -1, j = 0, n = specifier.length, c3, pad3, format3; if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2); while (++i < n) { if (specifier.charCodeAt(i) === 37) { string.push(specifier.slice(j, i)); if ((pad3 = pads[c3 = specifier.charAt(++i)]) != null) c3 = specifier.charAt(++i); else pad3 = c3 === "e" ? " " : "0"; if (format3 = formats2[c3]) c3 = format3(date2, pad3); string.push(c3); j = i + 1; } } string.push(specifier.slice(j, i)); return string.join(""); }; } function newParse(specifier, Z) { return function(string) { var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day; if (i != string.length) return null; if ("Q" in d) return new Date(d.Q); if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0)); if (Z && !("Z" in d)) d.Z = 0; if ("p" in d) d.H = d.H % 12 + d.p * 12; if (d.m === void 0) d.m = "q" in d ? d.q : 0; if ("V" in d) { if (d.V < 1 || d.V > 53) return null; if (!("w" in d)) d.w = 1; if ("Z" in d) { week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay(); week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week); week = utcDay.offset(week, (d.V - 1) * 7); d.y = week.getUTCFullYear(); d.m = week.getUTCMonth(); d.d = week.getUTCDate() + (d.w + 6) % 7; } else { week = localDate(newDate(d.y, 0, 1)), day = week.getDay(); week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week); week = timeDay.offset(week, (d.V - 1) * 7); d.y = week.getFullYear(); d.m = week.getMonth(); d.d = week.getDate() + (d.w + 6) % 7; } } else if ("W" in d || "U" in d) { if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); d.m = 0; d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; } if ("Z" in d) { d.H += d.Z / 100 | 0; d.M += d.Z % 100; return utcDate(d); } return localDate(d); }; } function parseSpecifier(d, specifier, string, j) { var i = 0, n = specifier.length, m = string.length, c3, parse3; while (i < n) { if (j >= m) return -1; c3 = specifier.charCodeAt(i++); if (c3 === 37) { c3 = specifier.charAt(i++); parse3 = parses[c3 in pads ? specifier.charAt(i++) : c3]; if (!parse3 || (j = parse3(d, string, j)) < 0) return -1; } else if (c3 != string.charCodeAt(j++)) { return -1; } } return j; } function parsePeriod(d, string, i) { var n = periodRe.exec(string.slice(i)); return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseShortWeekday(d, string, i) { var n = shortWeekdayRe.exec(string.slice(i)); return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseWeekday(d, string, i) { var n = weekdayRe.exec(string.slice(i)); return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseShortMonth(d, string, i) { var n = shortMonthRe.exec(string.slice(i)); return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseMonth(d, string, i) { var n = monthRe.exec(string.slice(i)); return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseLocaleDateTime(d, string, i) { return parseSpecifier(d, locale_dateTime, string, i); } function parseLocaleDate(d, string, i) { return parseSpecifier(d, locale_date, string, i); } function parseLocaleTime(d, string, i) { return parseSpecifier(d, locale_time, string, i); } function formatShortWeekday(d) { return locale_shortWeekdays[d.getDay()]; } function formatWeekday(d) { return locale_weekdays[d.getDay()]; } function formatShortMonth(d) { return locale_shortMonths[d.getMonth()]; } function formatMonth(d) { return locale_months[d.getMonth()]; } function formatPeriod(d) { return locale_periods[+(d.getHours() >= 12)]; } function formatQuarter(d) { return 1 + ~~(d.getMonth() / 3); } function formatUTCShortWeekday(d) { return locale_shortWeekdays[d.getUTCDay()]; } function formatUTCWeekday(d) { return locale_weekdays[d.getUTCDay()]; } function formatUTCShortMonth(d) { return locale_shortMonths[d.getUTCMonth()]; } function formatUTCMonth(d) { return locale_months[d.getUTCMonth()]; } function formatUTCPeriod(d) { return locale_periods[+(d.getUTCHours() >= 12)]; } function formatUTCQuarter(d) { return 1 + ~~(d.getUTCMonth() / 3); } return { format: function(specifier) { var f = newFormat(specifier += "", formats); f.toString = function() { return specifier; }; return f; }, parse: function(specifier) { var p = newParse(specifier += "", false); p.toString = function() { return specifier; }; return p; }, utcFormat: function(specifier) { var f = newFormat(specifier += "", utcFormats); f.toString = function() { return specifier; }; return f; }, utcParse: function(specifier) { var p = newParse(specifier += "", true); p.toString = function() { return specifier; }; return p; } }; } var pads = { "-": "", "_": " ", "0": "0" }; var numberRe = /^\s*\d+/; var percentRe = /^%/; var requoteRe = /[\\^$*+?|[\]().{}]/g; function pad(value, fill, width) { var sign3 = value < 0 ? "-" : "", string = (sign3 ? -value : value) + "", length2 = string.length; return sign3 + (length2 < width ? new Array(width - length2 + 1).join(fill) + string : string); } function requote(s2) { return s2.replace(requoteRe, "\\$&"); } function formatRe(names) { return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); } function formatLookup(names) { return new Map(names.map((name, i) => [name.toLowerCase(), i])); } function parseWeekdayNumberSunday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.w = +n[0], i + n[0].length) : -1; } function parseWeekdayNumberMonday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.u = +n[0], i + n[0].length) : -1; } function parseWeekNumberSunday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.U = +n[0], i + n[0].length) : -1; } function parseWeekNumberISO(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.V = +n[0], i + n[0].length) : -1; } function parseWeekNumberMonday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.W = +n[0], i + n[0].length) : -1; } function parseFullYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 4)); return n ? (d.y = +n[0], i + n[0].length) : -1; } function parseYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1; } function parseZone(d, string, i) { var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; } function parseQuarter(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; } function parseMonthNumber(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.m = n[0] - 1, i + n[0].length) : -1; } function parseDayOfMonth(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.d = +n[0], i + n[0].length) : -1; } function parseDayOfYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 3)); return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; } function parseHour24(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.H = +n[0], i + n[0].length) : -1; } function parseMinutes(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.M = +n[0], i + n[0].length) : -1; } function parseSeconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.S = +n[0], i + n[0].length) : -1; } function parseMilliseconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 3)); return n ? (d.L = +n[0], i + n[0].length) : -1; } function parseMicroseconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 6)); return n ? (d.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1; } function parseLiteralPercent(d, string, i) { var n = percentRe.exec(string.slice(i, i + 1)); return n ? i + n[0].length : -1; } function parseUnixTimestamp(d, string, i) { var n = numberRe.exec(string.slice(i)); return n ? (d.Q = +n[0], i + n[0].length) : -1; } function parseUnixTimestampSeconds(d, string, i) { var n = numberRe.exec(string.slice(i)); return n ? (d.s = +n[0], i + n[0].length) : -1; } function formatDayOfMonth(d, p) { return pad(d.getDate(), p, 2); } function formatHour24(d, p) { return pad(d.getHours(), p, 2); } function formatHour12(d, p) { return pad(d.getHours() % 12 || 12, p, 2); } function formatDayOfYear(d, p) { return pad(1 + timeDay.count(timeYear(d), d), p, 3); } function formatMilliseconds(d, p) { return pad(d.getMilliseconds(), p, 3); } function formatMicroseconds(d, p) { return formatMilliseconds(d, p) + "000"; } function formatMonthNumber(d, p) { return pad(d.getMonth() + 1, p, 2); } function formatMinutes(d, p) { return pad(d.getMinutes(), p, 2); } function formatSeconds(d, p) { return pad(d.getSeconds(), p, 2); } function formatWeekdayNumberMonday(d) { var day = d.getDay(); return day === 0 ? 7 : day; } function formatWeekNumberSunday(d, p) { return pad(timeSunday.count(timeYear(d) - 1, d), p, 2); } function dISO(d) { var day = d.getDay(); return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d); } function formatWeekNumberISO(d, p) { d = dISO(d); return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2); } function formatWeekdayNumberSunday(d) { return d.getDay(); } function formatWeekNumberMonday(d, p) { return pad(timeMonday.count(timeYear(d) - 1, d), p, 2); } function formatYear(d, p) { return pad(d.getFullYear() % 100, p, 2); } function formatYearISO(d, p) { d = dISO(d); return pad(d.getFullYear() % 100, p, 2); } function formatFullYear(d, p) { return pad(d.getFullYear() % 1e4, p, 4); } function formatFullYearISO(d, p) { var day = d.getDay(); d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d); return pad(d.getFullYear() % 1e4, p, 4); } function formatZone(d) { var z = d.getTimezoneOffset(); return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2); } function formatUTCDayOfMonth(d, p) { return pad(d.getUTCDate(), p, 2); } function formatUTCHour24(d, p) { return pad(d.getUTCHours(), p, 2); } function formatUTCHour12(d, p) { return pad(d.getUTCHours() % 12 || 12, p, 2); } function formatUTCDayOfYear(d, p) { return pad(1 + utcDay.count(utcYear(d), d), p, 3); } function formatUTCMilliseconds(d, p) { return pad(d.getUTCMilliseconds(), p, 3); } function formatUTCMicroseconds(d, p) { return formatUTCMilliseconds(d, p) + "000"; } function formatUTCMonthNumber(d, p) { return pad(d.getUTCMonth() + 1, p, 2); } function formatUTCMinutes(d, p) { return pad(d.getUTCMinutes(), p, 2); } function formatUTCSeconds(d, p) { return pad(d.getUTCSeconds(), p, 2); } function formatUTCWeekdayNumberMonday(d) { var dow = d.getUTCDay(); return dow === 0 ? 7 : dow; } function formatUTCWeekNumberSunday(d, p) { return pad(utcSunday.count(utcYear(d) - 1, d), p, 2); } function UTCdISO(d) { var day = d.getUTCDay(); return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d); } function formatUTCWeekNumberISO(d, p) { d = UTCdISO(d); return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2); } function formatUTCWeekdayNumberSunday(d) { return d.getUTCDay(); } function formatUTCWeekNumberMonday(d, p) { return pad(utcMonday.count(utcYear(d) - 1, d), p, 2); } function formatUTCYear(d, p) { return pad(d.getUTCFullYear() % 100, p, 2); } function formatUTCYearISO(d, p) { d = UTCdISO(d); return pad(d.getUTCFullYear() % 100, p, 2); } function formatUTCFullYear(d, p) { return pad(d.getUTCFullYear() % 1e4, p, 4); } function formatUTCFullYearISO(d, p) { var day = d.getUTCDay(); d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d); return pad(d.getUTCFullYear() % 1e4, p, 4); } function formatUTCZone() { return "+0000"; } function formatLiteralPercent() { return "%"; } function formatUnixTimestamp(d) { return +d; } function formatUnixTimestampSeconds(d) { return Math.floor(+d / 1e3); } // node_modules/d3-time-format/src/defaultLocale.js var locale2; var timeFormat; var timeParse; var utcFormat; var utcParse; defaultLocale2({ 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 defaultLocale2(definition) { locale2 = formatLocale(definition); timeFormat = locale2.format; timeParse = locale2.parse; utcFormat = locale2.utcFormat; utcParse = locale2.utcParse; return locale2; } // node_modules/d3-time-format/src/isoFormat.js var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; function formatIsoNative(date2) { return date2.toISOString(); } var formatIso = Date.prototype.toISOString ? formatIsoNative : utcFormat(isoSpecifier); // node_modules/d3-time-format/src/isoParse.js function parseIsoNative(string) { var date2 = new Date(string); return isNaN(date2) ? null : date2; } var parseIso = +/* @__PURE__ */ new Date("2000-01-01T00:00:00.000Z") ? parseIsoNative : utcParse(isoSpecifier); // node_modules/d3-scale/src/nice.js function nice2(domain, interval) { domain = domain.slice(); var i0 = 0, i1 = domain.length - 1, x02 = domain[i0], x12 = domain[i1], t; if (x12 < x02) { t = i0, i0 = i1, i1 = t; t = x02, x02 = x12, x12 = t; } domain[i0] = interval.floor(x02); domain[i1] = interval.ceil(x12); return domain; } // node_modules/d3-scale/src/time.js function date(t) { return new Date(t); } function number4(t) { return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t); } function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3) { var scale2 = continuous(), invert2 = scale2.invert, domain = scale2.domain; var formatMillisecond = format3(".%L"), formatSecond = format3(":%S"), formatMinute = format3("%I:%M"), formatHour = format3("%I %p"), formatDay = format3("%a %d"), formatWeek = format3("%b %d"), formatMonth = format3("%B"), formatYear3 = format3("%Y"); function tickFormat2(date2) { return (second2(date2) < date2 ? formatMillisecond : minute(date2) < date2 ? formatSecond : hour(date2) < date2 ? formatMinute : day(date2) < date2 ? formatHour : month(date2) < date2 ? week(date2) < date2 ? formatDay : formatWeek : year(date2) < date2 ? formatMonth : formatYear3)(date2); } scale2.invert = function(y3) { return new Date(invert2(y3)); }; scale2.domain = function(_) { return arguments.length ? domain(Array.from(_, number4)) : domain().map(date); }; scale2.ticks = function(interval) { var d = domain(); return ticks2(d[0], d[d.length - 1], interval == null ? 10 : interval); }; scale2.tickFormat = function(count3, specifier) { return specifier == null ? tickFormat2 : format3(specifier); }; scale2.nice = function(interval) { var d = domain(); if (!interval || typeof interval.range !== "function") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval); return interval ? domain(nice2(d, interval)) : scale2; }; scale2.copy = function() { return copy(scale2, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3)); }; return scale2; } function time() { return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute, second, timeFormat).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments); } // node_modules/d3-scale-chromatic/src/colors.js function colors_default(specifier) { var n = specifier.length / 6 | 0, colors = new Array(n), i = 0; while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6); return colors; } // node_modules/d3-scale-chromatic/src/categorical/Tableau10.js var Tableau10_default = colors_default("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"); // node_modules/d3-scale-chromatic/src/categorical/category10.js var category10_default = colors_default("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"); // node_modules/d3-scale-chromatic/src/categorical/Accent.js var Accent_default = colors_default("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"); // node_modules/d3-scale-chromatic/src/categorical/Dark2.js var Dark2_default = colors_default("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"); // node_modules/d3-scale-chromatic/src/categorical/observable10.js var observable10_default = colors_default("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"); // node_modules/d3-scale-chromatic/src/categorical/Paired.js var Paired_default = colors_default("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"); // node_modules/d3-scale-chromatic/src/categorical/Pastel1.js var Pastel1_default = colors_default("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"); // node_modules/d3-scale-chromatic/src/categorical/Pastel2.js var Pastel2_default = colors_default("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"); // node_modules/d3-scale-chromatic/src/categorical/Set1.js var Set1_default = colors_default("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"); // node_modules/d3-scale-chromatic/src/categorical/Set2.js var Set2_default = colors_default("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"); // node_modules/d3-scale-chromatic/src/categorical/Set3.js var Set3_default = colors_default("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"); // node_modules/d3-scale-chromatic/src/ramp.js var ramp_default = (scheme28) => rgbBasis(scheme28[scheme28.length - 1]); // node_modules/d3-scale-chromatic/src/diverging/BrBG.js var scheme = new Array(3).concat( "d8b365f5f5f55ab4ac", "a6611adfc27d80cdc1018571", "a6611adfc27df5f5f580cdc1018571", "8c510ad8b365f6e8c3c7eae55ab4ac01665e", "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30" ).map(colors_default); var BrBG_default = ramp_default(scheme); // node_modules/d3-scale-chromatic/src/diverging/PRGn.js var scheme2 = new Array(3).concat( "af8dc3f7f7f77fbf7b", "7b3294c2a5cfa6dba0008837", "7b3294c2a5cff7f7f7a6dba0008837", "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b" ).map(colors_default); var PRGn_default = ramp_default(scheme2); // node_modules/d3-scale-chromatic/src/diverging/PiYG.js var scheme3 = new Array(3).concat( "e9a3c9f7f7f7a1d76a", "d01c8bf1b6dab8e1864dac26", "d01c8bf1b6daf7f7f7b8e1864dac26", "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419" ).map(colors_default); var PiYG_default = ramp_default(scheme3); // node_modules/d3-scale-chromatic/src/diverging/PuOr.js var scheme4 = new Array(3).concat( "998ec3f7f7f7f1a340", "5e3c99b2abd2fdb863e66101", "5e3c99b2abd2f7f7f7fdb863e66101", "542788998ec3d8daebfee0b6f1a340b35806", "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08" ).map(colors_default); var PuOr_default = ramp_default(scheme4); // node_modules/d3-scale-chromatic/src/diverging/RdBu.js var scheme5 = new Array(3).concat( "ef8a62f7f7f767a9cf", "ca0020f4a58292c5de0571b0", "ca0020f4a582f7f7f792c5de0571b0", "b2182bef8a62fddbc7d1e5f067a9cf2166ac", "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061" ).map(colors_default); var RdBu_default = ramp_default(scheme5); // node_modules/d3-scale-chromatic/src/diverging/RdGy.js var scheme6 = new Array(3).concat( "ef8a62ffffff999999", "ca0020f4a582bababa404040", "ca0020f4a582ffffffbababa404040", "b2182bef8a62fddbc7e0e0e09999994d4d4d", "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a" ).map(colors_default); var RdGy_default = ramp_default(scheme6); // node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js var scheme7 = new Array(3).concat( "fc8d59ffffbf91bfdb", "d7191cfdae61abd9e92c7bb6", "d7191cfdae61ffffbfabd9e92c7bb6", "d73027fc8d59fee090e0f3f891bfdb4575b4", "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695" ).map(colors_default); var RdYlBu_default = ramp_default(scheme7); // node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js var scheme8 = new Array(3).concat( "fc8d59ffffbf91cf60", "d7191cfdae61a6d96a1a9641", "d7191cfdae61ffffbfa6d96a1a9641", "d73027fc8d59fee08bd9ef8b91cf601a9850", "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837" ).map(colors_default); var RdYlGn_default = ramp_default(scheme8); // node_modules/d3-scale-chromatic/src/diverging/Spectral.js var scheme9 = new Array(3).concat( "fc8d59ffffbf99d594", "d7191cfdae61abdda42b83ba", "d7191cfdae61ffffbfabdda42b83ba", "d53e4ffc8d59fee08be6f59899d5943288bd", "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2" ).map(colors_default); var Spectral_default = ramp_default(scheme9); // node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js var scheme10 = new Array(3).concat( "e5f5f999d8c92ca25f", "edf8fbb2e2e266c2a4238b45", "edf8fbb2e2e266c2a42ca25f006d2c", "edf8fbccece699d8c966c2a42ca25f006d2c", "edf8fbccece699d8c966c2a441ae76238b45005824", "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b" ).map(colors_default); var BuGn_default = ramp_default(scheme10); // node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js var scheme11 = new Array(3).concat( "e0ecf49ebcda8856a7", "edf8fbb3cde38c96c688419d", "edf8fbb3cde38c96c68856a7810f7c", "edf8fbbfd3e69ebcda8c96c68856a7810f7c", "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b" ).map(colors_default); var BuPu_default = ramp_default(scheme11); // node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js var scheme12 = new Array(3).concat( "e0f3dba8ddb543a2ca", "f0f9e8bae4bc7bccc42b8cbe", "f0f9e8bae4bc7bccc443a2ca0868ac", "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081" ).map(colors_default); var GnBu_default = ramp_default(scheme12); // node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js var scheme13 = new Array(3).concat( "fee8c8fdbb84e34a33", "fef0d9fdcc8afc8d59d7301f", "fef0d9fdcc8afc8d59e34a33b30000", "fef0d9fdd49efdbb84fc8d59e34a33b30000", "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000" ).map(colors_default); var OrRd_default = ramp_default(scheme13); // node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js var scheme14 = new Array(3).concat( "ece2f0a6bddb1c9099", "f6eff7bdc9e167a9cf02818a", "f6eff7bdc9e167a9cf1c9099016c59", "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636" ).map(colors_default); var PuBuGn_default = ramp_default(scheme14); // node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js var scheme15 = new Array(3).concat( "ece7f2a6bddb2b8cbe", "f1eef6bdc9e174a9cf0570b0", "f1eef6bdc9e174a9cf2b8cbe045a8d", "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858" ).map(colors_default); var PuBu_default = ramp_default(scheme15); // node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js var scheme16 = new Array(3).concat( "e7e1efc994c7dd1c77", "f1eef6d7b5d8df65b0ce1256", "f1eef6d7b5d8df65b0dd1c77980043", "f1eef6d4b9dac994c7df65b0dd1c77980043", "f1eef6d4b9dac994c7df65b0e7298ace125691003f", "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f" ).map(colors_default); var PuRd_default = ramp_default(scheme16); // node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js var scheme17 = new Array(3).concat( "fde0ddfa9fb5c51b8a", "feebe2fbb4b9f768a1ae017e", "feebe2fbb4b9f768a1c51b8a7a0177", "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a" ).map(colors_default); var RdPu_default = ramp_default(scheme17); // node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js var scheme18 = new Array(3).concat( "edf8b17fcdbb2c7fb8", "ffffcca1dab441b6c4225ea8", "ffffcca1dab441b6c42c7fb8253494", "ffffccc7e9b47fcdbb41b6c42c7fb8253494", "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58" ).map(colors_default); var YlGnBu_default = ramp_default(scheme18); // node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js var scheme19 = new Array(3).concat( "f7fcb9addd8e31a354", "ffffccc2e69978c679238443", "ffffccc2e69978c67931a354006837", "ffffccd9f0a3addd8e78c67931a354006837", "ffffccd9f0a3addd8e78c67941ab5d238443005a32", "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529" ).map(colors_default); var YlGn_default = ramp_default(scheme19); // node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js var scheme20 = new Array(3).concat( "fff7bcfec44fd95f0e", "ffffd4fed98efe9929cc4c02", "ffffd4fed98efe9929d95f0e993404", "ffffd4fee391fec44ffe9929d95f0e993404", "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506" ).map(colors_default); var YlOrBr_default = ramp_default(scheme20); // node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js var scheme21 = new Array(3).concat( "ffeda0feb24cf03b20", "ffffb2fecc5cfd8d3ce31a1c", "ffffb2fecc5cfd8d3cf03b20bd0026", "ffffb2fed976feb24cfd8d3cf03b20bd0026", "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026" ).map(colors_default); var YlOrRd_default = ramp_default(scheme21); // node_modules/d3-scale-chromatic/src/sequential-single/Blues.js var scheme22 = new Array(3).concat( "deebf79ecae13182bd", "eff3ffbdd7e76baed62171b5", "eff3ffbdd7e76baed63182bd08519c", "eff3ffc6dbef9ecae16baed63182bd08519c", "eff3ffc6dbef9ecae16baed64292c62171b5084594", "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b" ).map(colors_default); var Blues_default = ramp_default(scheme22); // node_modules/d3-scale-chromatic/src/sequential-single/Greens.js var scheme23 = new Array(3).concat( "e5f5e0a1d99b31a354", "edf8e9bae4b374c476238b45", "edf8e9bae4b374c47631a354006d2c", "edf8e9c7e9c0a1d99b74c47631a354006d2c", "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b" ).map(colors_default); var Greens_default = ramp_default(scheme23); // node_modules/d3-scale-chromatic/src/sequential-single/Greys.js var scheme24 = new Array(3).concat( "f0f0f0bdbdbd636363", "f7f7f7cccccc969696525252", "f7f7f7cccccc969696636363252525", "f7f7f7d9d9d9bdbdbd969696636363252525", "f7f7f7d9d9d9bdbdbd969696737373525252252525", "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000" ).map(colors_default); var Greys_default = ramp_default(scheme24); // node_modules/d3-scale-chromatic/src/sequential-single/Purples.js var scheme25 = new Array(3).concat( "efedf5bcbddc756bb1", "f2f0f7cbc9e29e9ac86a51a3", "f2f0f7cbc9e29e9ac8756bb154278f", "f2f0f7dadaebbcbddc9e9ac8756bb154278f", "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d" ).map(colors_default); var Purples_default = ramp_default(scheme25); // node_modules/d3-scale-chromatic/src/sequential-single/Reds.js var scheme26 = new Array(3).concat( "fee0d2fc9272de2d26", "fee5d9fcae91fb6a4acb181d", "fee5d9fcae91fb6a4ade2d26a50f15", "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d" ).map(colors_default); var Reds_default = ramp_default(scheme26); // node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js var scheme27 = new Array(3).concat( "fee6cefdae6be6550d", "feeddefdbe85fd8d3cd94701", "feeddefdbe85fd8d3ce6550da63603", "feeddefdd0a2fdae6bfd8d3ce6550da63603", "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704" ).map(colors_default); var Oranges_default = ramp_default(scheme27); // node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js var cubehelix_default = cubehelixLong(cubehelix(300, 0.5, 0), cubehelix(-240, 0.5, 1)); // node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js var warm = cubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.5, 0.8)); var cool = cubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.5, 0.8)); var c = cubehelix(); // node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js var c2 = rgb(); var pi_1_3 = Math.PI / 3; var pi_2_3 = Math.PI * 2 / 3; // node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js function ramp(range2) { var n = range2.length; return function(t) { return range2[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; }; } var viridis_default = ramp(colors_default("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")); var magma = ramp(colors_default("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")); var inferno = ramp(colors_default("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")); var plasma = ramp(colors_default("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")); // node_modules/d3-shape/src/constant.js function constant_default(x3) { return function constant3() { return x3; }; } // node_modules/d3-shape/src/math.js var abs = Math.abs; var atan2 = Math.atan2; var cos = Math.cos; var max2 = Math.max; var min2 = Math.min; var sin = Math.sin; var sqrt2 = Math.sqrt; var epsilon2 = 1e-12; var pi = Math.PI; var halfPi = pi / 2; var tau = 2 * pi; function acos(x3) { return x3 > 1 ? 0 : x3 < -1 ? pi : Math.acos(x3); } function asin(x3) { return x3 >= 1 ? halfPi : x3 <= -1 ? -halfPi : Math.asin(x3); } // node_modules/d3-path/src/path.js var pi2 = Math.PI; var tau2 = 2 * pi2; var epsilon3 = 1e-6; var tauEpsilon = tau2 - epsilon3; function append(strings) { this._ += strings[0]; for (let i = 1, n = strings.length; i < n; ++i) { this._ += arguments[i] + strings[i]; } } function appendRound(digits) { let d = Math.floor(digits); if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`); if (d > 15) return append; const k2 = 10 ** d; return function(strings) { this._ += strings[0]; for (let i = 1, n = strings.length; i < n; ++i) { this._ += Math.round(arguments[i] * k2) / k2 + strings[i]; } }; } var Path = class { constructor(digits) { this._x0 = this._y0 = // start of current subpath this._x1 = this._y1 = null; this._ = ""; this._append = digits == null ? append : appendRound(digits); } moveTo(x3, y3) { this._append`M${this._x0 = this._x1 = +x3},${this._y0 = this._y1 = +y3}`; } closePath() { if (this._x1 !== null) { this._x1 = this._x0, this._y1 = this._y0; this._append`Z`; } } lineTo(x3, y3) { this._append`L${this._x1 = +x3},${this._y1 = +y3}`; } quadraticCurveTo(x12, y1, x3, y3) { this._append`Q${+x12},${+y1},${this._x1 = +x3},${this._y1 = +y3}`; } bezierCurveTo(x12, y1, x22, y22, x3, y3) { this._append`C${+x12},${+y1},${+x22},${+y22},${this._x1 = +x3},${this._y1 = +y3}`; } arcTo(x12, y1, x22, y22, r) { x12 = +x12, y1 = +y1, x22 = +x22, y22 = +y22, r = +r; if (r < 0) throw new Error(`negative radius: ${r}`); let x02 = this._x1, y0 = this._y1, x21 = x22 - x12, y21 = y22 - y1, x01 = x02 - x12, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01; if (this._x1 === null) { this._append`M${this._x1 = x12},${this._y1 = y1}`; } else if (!(l01_2 > epsilon3)) ; else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon3) || !r) { this._append`L${this._x1 = x12},${this._y1 = y1}`; } else { let x20 = x22 - x02, y20 = y22 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi2 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21; if (Math.abs(t01 - 1) > epsilon3) { this._append`L${x12 + t01 * x01},${y1 + t01 * y01}`; } this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x12 + t21 * x21},${this._y1 = y1 + t21 * y21}`; } } arc(x3, y3, r, a0, a1, ccw) { x3 = +x3, y3 = +y3, r = +r, ccw = !!ccw; if (r < 0) throw new Error(`negative radius: ${r}`); let dx = r * Math.cos(a0), dy = r * Math.sin(a0), x02 = x3 + dx, y0 = y3 + dy, cw = 1 ^ ccw, da2 = ccw ? a0 - a1 : a1 - a0; if (this._x1 === null) { this._append`M${x02},${y0}`; } else if (Math.abs(this._x1 - x02) > epsilon3 || Math.abs(this._y1 - y0) > epsilon3) { this._append`L${x02},${y0}`; } if (!r) return; if (da2 < 0) da2 = da2 % tau2 + tau2; if (da2 > tauEpsilon) { this._append`A${r},${r},0,1,${cw},${x3 - dx},${y3 - dy}A${r},${r},0,1,${cw},${this._x1 = x02},${this._y1 = y0}`; } else if (da2 > epsilon3) { this._append`A${r},${r},0,${+(da2 >= pi2)},${cw},${this._x1 = x3 + r * Math.cos(a1)},${this._y1 = y3 + r * Math.sin(a1)}`; } } rect(x3, y3, w, h) { this._append`M${this._x0 = this._x1 = +x3},${this._y0 = this._y1 = +y3}h${w = +w}v${+h}h${-w}Z`; } toString() { return this._; } }; function path() { return new Path(); } path.prototype = Path.prototype; // node_modules/d3-shape/src/path.js function withPath(shape) { let digits = 3; shape.digits = function(_) { if (!arguments.length) return digits; if (_ == null) { digits = null; } else { const d = Math.floor(_); if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`); digits = d; } return shape; }; return () => new Path(digits); } // node_modules/d3-shape/src/arc.js function arcInnerRadius(d) { return d.innerRadius; } function arcOuterRadius(d) { return d.outerRadius; } function arcStartAngle(d) { return d.startAngle; } function arcEndAngle(d) { return d.endAngle; } function arcPadAngle(d) { return d && d.padAngle; } function intersect(x02, y0, x12, y1, x22, y22, x3, y3) { var x10 = x12 - x02, y10 = y1 - y0, x32 = x3 - x22, y32 = y3 - y22, t = y32 * x10 - x32 * y10; if (t * t < epsilon2) return; t = (x32 * (y0 - y22) - y32 * (x02 - x22)) / t; return [x02 + t * x10, y0 + t * y10]; } function cornerTangents(x02, y0, x12, y1, r1, rc, cw) { var x01 = x02 - x12, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt2(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x02 + ox, y11 = y0 + oy, x10 = x12 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D2 = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt2(max2(0, r * r * d2 - D2 * D2)), cx0 = (D2 * dy - dx * d) / d2, cy0 = (-D2 * dx - dy * d) / d2, cx1 = (D2 * dy + dx * d) / d2, cy1 = (-D2 * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00; if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; return { cx: cx0, cy: cy0, x01: -ox, y01: -oy, x11: cx0 * (r1 / r - 1), y11: cy0 * (r1 / r - 1) }; } function arc_default() { var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant_default(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null, path2 = withPath(arc); function arc() { var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da2 = abs(a1 - a0), cw = a1 > a0; if (!context) context = buffer = path2(); if (r1 < r0) r = r1, r1 = r0, r0 = r; if (!(r1 > epsilon2)) context.moveTo(0, 0); else if (da2 > tau - epsilon2) { context.moveTo(r1 * cos(a0), r1 * sin(a0)); context.arc(0, 0, r1, a0, a1, !cw); if (r0 > epsilon2) { context.moveTo(r0 * cos(a1), r0 * sin(a1)); context.arc(0, 0, r0, a1, a0, cw); } } else { var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da2, da1 = da2, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon2 && (padRadius ? +padRadius.apply(this, arguments) : sqrt2(r0 * r0 + r1 * r1)), rc = min2(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t02, t12; if (rp > epsilon2) { var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap)); if ((da0 -= p0 * 2) > epsilon2) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0; else da0 = 0, a00 = a10 = (a0 + a1) / 2; if ((da1 -= p1 * 2) > epsilon2) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1; else da1 = 0, a01 = a11 = (a0 + a1) / 2; } var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10); if (rc > epsilon2) { var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc; if (da2 < pi) { if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) { var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt2(ax * ax + ay * ay) * sqrt2(bx * bx + by * by))) / 2), lc = sqrt2(oc[0] * oc[0] + oc[1] * oc[1]); rc0 = min2(rc, (r0 - lc) / (kc - 1)); rc1 = min2(rc, (r1 - lc) / (kc + 1)); } else { rc0 = rc1 = 0; } } } if (!(da1 > epsilon2)) context.moveTo(x01, y01); else if (rc1 > epsilon2) { t02 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); t12 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); context.moveTo(t02.cx + t02.x01, t02.cy + t02.y01); if (rc1 < rc) context.arc(t02.cx, t02.cy, rc1, atan2(t02.y01, t02.x01), atan2(t12.y01, t12.x01), !cw); else { context.arc(t02.cx, t02.cy, rc1, atan2(t02.y01, t02.x01), atan2(t02.y11, t02.x11), !cw); context.arc(0, 0, r1, atan2(t02.cy + t02.y11, t02.cx + t02.x11), atan2(t12.cy + t12.y11, t12.cx + t12.x11), !cw); context.arc(t12.cx, t12.cy, rc1, atan2(t12.y11, t12.x11), atan2(t12.y01, t12.x01), !cw); } } else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); if (!(r0 > epsilon2) || !(da0 > epsilon2)) context.lineTo(x10, y10); else if (rc0 > epsilon2) { t02 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); t12 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); context.lineTo(t02.cx + t02.x01, t02.cy + t02.y01); if (rc0 < rc) context.arc(t02.cx, t02.cy, rc0, atan2(t02.y01, t02.x01), atan2(t12.y01, t12.x01), !cw); else { context.arc(t02.cx, t02.cy, rc0, atan2(t02.y01, t02.x01), atan2(t02.y11, t02.x11), !cw); context.arc(0, 0, r0, atan2(t02.cy + t02.y11, t02.cx + t02.x11), atan2(t12.cy + t12.y11, t12.cx + t12.x11), cw); context.arc(t12.cx, t12.cy, rc0, atan2(t12.y11, t12.x11), atan2(t12.y01, t12.x01), !cw); } } else context.arc(0, 0, r0, a10, a00, cw); } context.closePath(); if (buffer) return context = null, buffer + "" || null; } arc.centroid = function() { var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a2 = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2; return [cos(a2) * r, sin(a2) * r]; }; arc.innerRadius = function(_) { return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : innerRadius; }; arc.outerRadius = function(_) { return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : outerRadius; }; arc.cornerRadius = function(_) { return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : cornerRadius; }; arc.padRadius = function(_) { return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant_default(+_), arc) : padRadius; }; arc.startAngle = function(_) { return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : startAngle; }; arc.endAngle = function(_) { return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : endAngle; }; arc.padAngle = function(_) { return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : padAngle; }; arc.context = function(_) { return arguments.length ? (context = _ == null ? null : _, arc) : context; }; return arc; } // node_modules/d3-shape/src/curve/linear.js function Linear(context) { this._context = context; } Linear.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); this._line = 1 - this._line; }, point: function(x3, y3) { x3 = +x3, y3 = +y3; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3); break; case 1: this._point = 2; default: this._context.lineTo(x3, y3); break; } } }; function linear_default(context) { return new Linear(context); } // node_modules/d3-shape/src/array.js var slice2 = Array.prototype.slice; function array_default(x3) { return typeof x3 === "object" && "length" in x3 ? x3 : Array.from(x3); } // node_modules/d3-shape/src/point.js function x(p) { return p[0]; } function y(p) { return p[1]; } // node_modules/d3-shape/src/line.js function line_default(x3, y3) { var defined = constant_default(true), context = null, curve = linear_default, output = null, path2 = withPath(line2); x3 = typeof x3 === "function" ? x3 : x3 === void 0 ? x : constant_default(x3); y3 = typeof y3 === "function" ? y3 : y3 === void 0 ? y : constant_default(y3); function line2(data) { var i, n = (data = array_default(data)).length, d, defined0 = false, buffer; if (context == null) output = curve(buffer = path2()); for (i = 0; i <= n; ++i) { if (!(i < n && defined(d = data[i], i, data)) === defined0) { if (defined0 = !defined0) output.lineStart(); else output.lineEnd(); } if (defined0) output.point(+x3(d, i, data), +y3(d, i, data)); } if (buffer) return output = null, buffer + "" || null; } line2.x = function(_) { return arguments.length ? (x3 = typeof _ === "function" ? _ : constant_default(+_), line2) : x3; }; line2.y = function(_) { return arguments.length ? (y3 = typeof _ === "function" ? _ : constant_default(+_), line2) : y3; }; line2.defined = function(_) { return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default(!!_), line2) : defined; }; line2.curve = function(_) { return arguments.length ? (curve = _, context != null && (output = curve(context)), line2) : curve; }; line2.context = function(_) { return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line2) : context; }; return line2; } // node_modules/d3-shape/src/descending.js function descending_default(a2, b) { return b < a2 ? -1 : b > a2 ? 1 : b >= a2 ? 0 : NaN; } // node_modules/d3-shape/src/identity.js function identity_default3(d) { return d; } // node_modules/d3-shape/src/pie.js function pie_default() { var value = identity_default3, sortValues = descending_default, sort2 = null, startAngle = constant_default(0), endAngle = constant_default(tau), padAngle = constant_default(0); function pie2(data) { var i, n = (data = array_default(data)).length, j, k2, sum4 = 0, index2 = new Array(n), arcs = new Array(n), a0 = +startAngle.apply(this, arguments), da2 = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)), a1, p = Math.min(Math.abs(da2) / n, padAngle.apply(this, arguments)), pa = p * (da2 < 0 ? -1 : 1), v2; for (i = 0; i < n; ++i) { if ((v2 = arcs[index2[i] = i] = +value(data[i], i, data)) > 0) { sum4 += v2; } } if (sortValues != null) index2.sort(function(i2, j2) { return sortValues(arcs[i2], arcs[j2]); }); else if (sort2 != null) index2.sort(function(i2, j2) { return sort2(data[i2], data[j2]); }); for (i = 0, k2 = sum4 ? (da2 - n * pa) / sum4 : 0; i < n; ++i, a0 = a1) { j = index2[i], v2 = arcs[j], a1 = a0 + (v2 > 0 ? v2 * k2 : 0) + pa, arcs[j] = { data: data[j], index: i, value: v2, startAngle: a0, endAngle: a1, padAngle: p }; } return arcs; } pie2.value = function(_) { return arguments.length ? (value = typeof _ === "function" ? _ : constant_default(+_), pie2) : value; }; pie2.sortValues = function(_) { return arguments.length ? (sortValues = _, sort2 = null, pie2) : sortValues; }; pie2.sort = function(_) { return arguments.length ? (sort2 = _, sortValues = null, pie2) : sort2; }; pie2.startAngle = function(_) { return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant_default(+_), pie2) : startAngle; }; pie2.endAngle = function(_) { return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant_default(+_), pie2) : endAngle; }; pie2.padAngle = function(_) { return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant_default(+_), pie2) : padAngle; }; return pie2; } // node_modules/d3-shape/src/curve/basis.js function point2(that, x3, y3) { that._context.bezierCurveTo( (2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x3) / 6, (that._y0 + 4 * that._y1 + y3) / 6 ); } function Basis(context) { this._context = context; } Basis.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: point2(this, this._x1, this._y1); case 2: this._context.lineTo(this._x1, this._y1); break; } if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); this._line = 1 - this._line; }, point: function(x3, y3) { x3 = +x3, y3 = +y3; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3); 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: point2(this, x3, y3); break; } this._x0 = this._x1, this._x1 = x3; this._y0 = this._y1, this._y1 = y3; } }; function basis_default(context) { return new Basis(context); } // node_modules/d3-shape/src/curve/radial.js var curveRadialLinear = curveRadial(linear_default); function Radial(curve) { this._curve = curve; } Radial.prototype = { areaStart: function() { this._curve.areaStart(); }, areaEnd: function() { this._curve.areaEnd(); }, lineStart: function() { this._curve.lineStart(); }, lineEnd: function() { this._curve.lineEnd(); }, point: function(a2, r) { this._curve.point(r * Math.sin(a2), r * -Math.cos(a2)); } }; function curveRadial(curve) { function radial2(context) { return new Radial(curve(context)); } radial2._curve = curve; return radial2; } // node_modules/d3-shape/src/curve/bump.js var Bump = class { constructor(context, x3) { this._context = context; this._x = x3; } areaStart() { this._line = 0; } areaEnd() { this._line = NaN; } lineStart() { this._point = 0; } lineEnd() { if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); this._line = 1 - this._line; } point(x3, y3) { x3 = +x3, y3 = +y3; switch (this._point) { case 0: { this._point = 1; if (this._line) this._context.lineTo(x3, y3); else this._context.moveTo(x3, y3); break; } case 1: this._point = 2; default: { if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x3) / 2, this._y0, this._x0, y3, x3, y3); else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y3) / 2, x3, this._y0, x3, y3); break; } } this._x0 = x3, this._y0 = y3; } }; function bumpX(context) { return new Bump(context, true); } function bumpY(context) { return new Bump(context, false); } // node_modules/d3-shape/src/symbol/asterisk.js var sqrt3 = sqrt2(3); // node_modules/d3-shape/src/symbol/diamond.js var tan30 = sqrt2(1 / 3); var tan30_2 = tan30 * 2; // node_modules/d3-shape/src/symbol/star.js var kr = sin(pi / 10) / sin(7 * pi / 10); var kx = sin(tau / 10) * kr; var ky = -cos(tau / 10) * kr; // node_modules/d3-shape/src/symbol/triangle.js var sqrt32 = sqrt2(3); // node_modules/d3-shape/src/symbol/triangle2.js var sqrt33 = sqrt2(3); // node_modules/d3-shape/src/symbol/wye.js var s = sqrt2(3) / 2; var k = 1 / sqrt2(12); var a = (k / 2 + 1) * 3; // node_modules/d3-shape/src/noop.js function noop_default() { } // node_modules/d3-shape/src/curve/basisClosed.js function BasisClosed(context) { this._context = context; } BasisClosed.prototype = { areaStart: noop_default, areaEnd: noop_default, 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(x3, y3) { x3 = +x3, y3 = +y3; switch (this._point) { case 0: this._point = 1; this._x2 = x3, this._y2 = y3; break; case 1: this._point = 2; this._x3 = x3, this._y3 = y3; break; case 2: this._point = 3; this._x4 = x3, this._y4 = y3; this._context.moveTo((this._x0 + 4 * this._x1 + x3) / 6, (this._y0 + 4 * this._y1 + y3) / 6); break; default: point2(this, x3, y3); break; } this._x0 = this._x1, this._x1 = x3; this._y0 = this._y1, this._y1 = y3; } }; function basisClosed_default(context) { return new BasisClosed(context); } // node_modules/d3-shape/src/curve/basisOpen.js function BasisOpen(context) { this._context = context; } BasisOpen.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() { if (this._line || this._line !== 0 && this._point === 3) this._context.closePath(); this._line = 1 - this._line; }, point: function(x3, y3) { x3 = +x3, y3 = +y3; switch (this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; var x02 = (this._x0 + 4 * this._x1 + x3) / 6, y0 = (this._y0 + 4 * this._y1 + y3) / 6; this._line ? this._context.lineTo(x02, y0) : this._context.moveTo(x02, y0); break; case 3: this._point = 4; default: point2(this, x3, y3); break; } this._x0 = this._x1, this._x1 = x3; this._y0 = this._y1, this._y1 = y3; } }; function basisOpen_default(context) { return new BasisOpen(context); } // node_modules/d3-shape/src/curve/bundle.js function Bundle(context, beta) { this._basis = new Basis(context); this._beta = beta; } Bundle.prototype = { lineStart: function() { this._x = []; this._y = []; this._basis.lineStart(); }, lineEnd: function() { var x3 = this._x, y3 = this._y, j = x3.length - 1; if (j > 0) { var x02 = x3[0], y0 = y3[0], dx = x3[j] - x02, dy = y3[j] - y0, i = -1, t; while (++i <= j) { t = i / j; this._basis.point( this._beta * x3[i] + (1 - this._beta) * (x02 + t * dx), this._beta * y3[i] + (1 - this._beta) * (y0 + t * dy) ); } } this._x = this._y = null; this._basis.lineEnd(); }, point: function(x3, y3) { this._x.push(+x3); this._y.push(+y3); } }; var bundle_default = function custom(beta) { function bundle(context) { return beta === 1 ? new Basis(context) : new Bundle(context, beta); } bundle.beta = function(beta2) { return custom(+beta2); }; return bundle; }(0.85); // node_modules/d3-shape/src/curve/cardinal.js function point3(that, x3, y3) { that._context.bezierCurveTo( that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x3), that._y2 + that._k * (that._y1 - y3), that._x2, that._y2 ); } function Cardinal(context, tension) { this._context = context; this._k = (1 - tension) / 6; } Cardinal.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: point3(this, this._x1, this._y1); break; } if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); this._line = 1 - this._line; }, point: function(x3, y3) { x3 = +x3, y3 = +y3; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3); break; case 1: this._point = 2; this._x1 = x3, this._y1 = y3; break; case 2: this._point = 3; default: point3(this, x3, y3); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3; } }; var cardinal_default = function custom2(tension) { function cardinal(context) { return new Cardinal(context, tension); } cardinal.tension = function(tension2) { return custom2(+tension2); }; return cardinal; }(0); // node_modules/d3-shape/src/curve/cardinalClosed.js function CardinalClosed(context, tension) { this._context = context; this._k = (1 - tension) / 6; } CardinalClosed.prototype = { areaStart: noop_default, areaEnd: noop_default, 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(x3, y3) { x3 = +x3, y3 = +y3; switch (this._point) { case 0: this._point = 1; this._x3 = x3, this._y3 = y3; break; case 1: this._point = 2; this._context.moveTo(this._x4 = x3, this._y4 = y3); break; case 2: this._point = 3; this._x5 = x3, this._y5 = y3; break; default: point3(this, x3, y3); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3; } }; var cardinalClosed_default = function custom3(tension) { function cardinal(context) { return new CardinalClosed(context, tension); } cardinal.tension = function(tension2) { return custom3(+tension2); }; return cardinal; }(0); // node_modules/d3-shape/src/curve/cardinalOpen.js function CardinalOpen(context, tension) { this._context = context; this._k = (1 - tension) / 6; } CardinalOpen.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() { if (this._line || this._line !== 0 && this._point === 3) this._context.closePath(); this._line = 1 - this._line; }, point: function(x3, y3) { x3 = +x3, y3 = +y3; 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: point3(this, x3, y3); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3; } }; var cardinalOpen_default = function custom4(tension) { function cardinal(context) { return new CardinalOpen(context, tension); } cardinal.tension = function(tension2) { return custom4(+tension2); }; return cardinal; }(0); // node_modules/d3-shape/src/curve/catmullRom.js function point4(that, x3, y3) { var x12 = that._x1, y1 = that._y1, x22 = that._x2, y22 = that._y2; if (that._l01_a > epsilon2) { var a2 = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a); x12 = (x12 * a2 - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; y1 = (y1 * a2 - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; } if (that._l23_a > epsilon2) { var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a); x22 = (x22 * b + that._x1 * that._l23_2a - x3 * that._l12_2a) / m; y22 = (y22 * b + that._y1 * that._l23_2a - y3 * that._l12_2a) / m; } that._context.bezierCurveTo(x12, y1, x22, y22, that._x2, that._y2); } function CatmullRom(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRom.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; } if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); this._line = 1 - this._line; }, point: function(x3, y3) { x3 = +x3, y3 = +y3; if (this._point) { var x23 = this._x2 - x3, y23 = this._y2 - y3; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3); break; case 1: this._point = 2; break; case 2: this._point = 3; default: point4(this, x3, y3); 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 = x3; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3; } }; var catmullRom_default = function custom5(alpha) { function catmullRom(context) { return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0); } catmullRom.alpha = function(alpha2) { return custom5(+alpha2); }; return catmullRom; }(0.5); // node_modules/d3-shape/src/curve/catmullRomClosed.js function CatmullRomClosed(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRomClosed.prototype = { areaStart: noop_default, areaEnd: noop_default, 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(x3, y3) { x3 = +x3, y3 = +y3; if (this._point) { var x23 = this._x2 - x3, y23 = this._y2 - y3; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; this._x3 = x3, this._y3 = y3; break; case 1: this._point = 2; this._context.moveTo(this._x4 = x3, this._y4 = y3); break; case 2: this._point = 3; this._x5 = x3, this._y5 = y3; break; default: point4(this, x3, y3); 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 = x3; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3; } }; var catmullRomClosed_default = function custom6(alpha) { function catmullRom(context) { return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0); } catmullRom.alpha = function(alpha2) { return custom6(+alpha2); }; return catmullRom; }(0.5); // node_modules/d3-shape/src/curve/catmullRomOpen.js function CatmullRomOpen(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRomOpen.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() { if (this._line || this._line !== 0 && this._point === 3) this._context.closePath(); this._line = 1 - this._line; }, point: function(x3, y3) { x3 = +x3, y3 = +y3; if (this._point) { var x23 = this._x2 - x3, y23 = this._y2 - y3; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, 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: point4(this, x3, y3); 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 = x3; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3; } }; var catmullRomOpen_default = function custom7(alpha) { function catmullRom(context) { return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0); } catmullRom.alpha = function(alpha2) { return custom7(+alpha2); }; return catmullRom; }(0.5); // node_modules/d3-shape/src/curve/linearClosed.js function LinearClosed(context) { this._context = context; } LinearClosed.prototype = { areaStart: noop_default, areaEnd: noop_default, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._point) this._context.closePath(); }, point: function(x3, y3) { x3 = +x3, y3 = +y3; if (this._point) this._context.lineTo(x3, y3); else this._point = 1, this._context.moveTo(x3, y3); } }; function linearClosed_default(context) { return new LinearClosed(context); } // node_modules/d3-shape/src/curve/monotone.js function sign(x3) { return x3 < 0 ? -1 : 1; } function slope3(that, x22, y22) { var h0 = that._x1 - that._x0, h1 = x22 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y22 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1); return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; } function slope2(that, t) { var h = that._x1 - that._x0; return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; } function point5(that, t02, t12) { var x02 = that._x0, y0 = that._y0, x12 = that._x1, y1 = that._y1, dx = (x12 - x02) / 3; that._context.bezierCurveTo(x02 + dx, y0 + dx * t02, x12 - dx, y1 - dx * t12, x12, y1); } function MonotoneX(context) { this._context = context; } MonotoneX.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: point5(this, this._t0, slope2(this, this._t0)); break; } if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); this._line = 1 - this._line; }, point: function(x3, y3) { var t12 = NaN; x3 = +x3, y3 = +y3; if (x3 === this._x1 && y3 === this._y1) return; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3); break; case 1: this._point = 2; break; case 2: this._point = 3; point5(this, slope2(this, t12 = slope3(this, x3, y3)), t12); break; default: point5(this, this._t0, t12 = slope3(this, x3, y3)); break; } this._x0 = this._x1, this._x1 = x3; this._y0 = this._y1, this._y1 = y3; this._t0 = t12; } }; function MonotoneY(context) { this._context = new ReflectContext(context); } (MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x3, y3) { MonotoneX.prototype.point.call(this, y3, x3); }; function ReflectContext(context) { this._context = context; } ReflectContext.prototype = { moveTo: function(x3, y3) { this._context.moveTo(y3, x3); }, closePath: function() { this._context.closePath(); }, lineTo: function(x3, y3) { this._context.lineTo(y3, x3); }, bezierCurveTo: function(x12, y1, x22, y22, x3, y3) { this._context.bezierCurveTo(y1, x12, y22, x22, y3, x3); } }; function monotoneX(context) { return new MonotoneX(context); } function monotoneY(context) { return new MonotoneY(context); } // node_modules/d3-shape/src/curve/natural.js function Natural(context) { this._context = context; } Natural.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x = []; this._y = []; }, lineEnd: function() { var x3 = this._x, y3 = this._y, n = x3.length; if (n) { this._line ? this._context.lineTo(x3[0], y3[0]) : this._context.moveTo(x3[0], y3[0]); if (n === 2) { this._context.lineTo(x3[1], y3[1]); } else { var px = controlPoints(x3), py = controlPoints(y3); for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x3[i1], y3[i1]); } } } if (this._line || this._line !== 0 && n === 1) this._context.closePath(); this._line = 1 - this._line; this._x = this._y = null; }, point: function(x3, y3) { this._x.push(+x3); this._y.push(+y3); } }; function controlPoints(x3) { var i, n = x3.length - 1, m, a2 = new Array(n), b = new Array(n), r = new Array(n); a2[0] = 0, b[0] = 2, r[0] = x3[0] + 2 * x3[1]; for (i = 1; i < n - 1; ++i) a2[i] = 1, b[i] = 4, r[i] = 4 * x3[i] + 2 * x3[i + 1]; a2[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x3[n - 1] + x3[n]; for (i = 1; i < n; ++i) m = a2[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; a2[n - 1] = r[n - 1] / b[n - 1]; for (i = n - 2; i >= 0; --i) a2[i] = (r[i] - a2[i + 1]) / b[i]; b[n - 1] = (x3[n] + a2[n - 1]) / 2; for (i = 0; i < n - 1; ++i) b[i] = 2 * x3[i + 1] - a2[i + 1]; return [a2, b]; } function natural_default(context) { return new Natural(context); } // node_modules/d3-shape/src/curve/step.js function Step(context, t) { this._context = context; this._t = t; } Step.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x = this._y = NaN; this._point = 0; }, lineEnd: function() { if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); if (this._line || this._line !== 0 && this._point === 1) this._context.closePath(); if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; }, point: function(x3, y3) { x3 = +x3, y3 = +y3; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3); break; case 1: this._point = 2; default: { if (this._t <= 0) { this._context.lineTo(this._x, y3); this._context.lineTo(x3, y3); } else { var x12 = this._x * (1 - this._t) + x3 * this._t; this._context.lineTo(x12, this._y); this._context.lineTo(x12, y3); } break; } } this._x = x3, this._y = y3; } }; function step_default(context) { return new Step(context, 0.5); } function stepBefore(context) { return new Step(context, 0); } function stepAfter(context) { return new Step(context, 1); } // node_modules/d3-brush/src/brush.js var { abs: abs2, max: max3, min: min3 } = Math; function number1(e) { return [+e[0], +e[1]]; } function number22(e) { return [number1(e[0]), number1(e[1])]; } var X = { name: "x", handles: ["w", "e"].map(type), input: function(x3, e) { return x3 == null ? null : [[+x3[0], e[0][1]], [+x3[1], e[1][1]]]; }, output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } }; var Y = { name: "y", handles: ["n", "s"].map(type), input: function(y3, e) { return y3 == null ? null : [[e[0][0], +y3[0]], [e[1][0], +y3[1]]]; }, output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } }; var XY = { name: "xy", handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type), input: function(xy) { return xy == null ? null : number22(xy); }, output: function(xy) { return xy; } }; function type(t) { return { type: t }; } // node_modules/d3-chord/src/math.js var pi3 = Math.PI; var halfPi2 = pi3 / 2; var tau3 = pi3 * 2; // node_modules/d3-chord/src/array.js var slice3 = Array.prototype.slice; // node_modules/d3-contour/src/array.js var array2 = Array.prototype; var slice4 = array2.slice; // node_modules/robust-predicates/esm/util.js var epsilon5 = 11102230246251565e-32; var resulterrbound = (3 + 8 * epsilon5) * epsilon5; function vec(n) { return new Float64Array(n); } // node_modules/robust-predicates/esm/orient2d.js var ccwerrboundA = (3 + 16 * epsilon5) * epsilon5; var ccwerrboundB = (2 + 12 * epsilon5) * epsilon5; var ccwerrboundC = (9 + 64 * epsilon5) * epsilon5 * epsilon5; var B = vec(4); var C1 = vec(8); var C2 = vec(12); var D = vec(16); var u = vec(4); // node_modules/robust-predicates/esm/orient3d.js var o3derrboundA = (7 + 56 * epsilon5) * epsilon5; var o3derrboundB = (3 + 28 * epsilon5) * epsilon5; var o3derrboundC = (26 + 288 * epsilon5) * epsilon5 * epsilon5; var bc = vec(4); var ca = vec(4); var ab = vec(4); var at_b = vec(4); var at_c = vec(4); var bt_c = vec(4); var bt_a = vec(4); var ct_a = vec(4); var ct_b = vec(4); var bct = vec(8); var cat = vec(8); var abt = vec(8); var u2 = vec(4); var _8 = vec(8); var _8b = vec(8); var _16 = vec(8); var _12 = vec(12); var fin = vec(192); var fin2 = vec(192); // node_modules/robust-predicates/esm/incircle.js var iccerrboundA = (10 + 96 * epsilon5) * epsilon5; var iccerrboundB = (4 + 48 * epsilon5) * epsilon5; var iccerrboundC = (44 + 576 * epsilon5) * epsilon5 * epsilon5; var bc2 = vec(4); var ca2 = vec(4); var ab2 = vec(4); var aa = vec(4); var bb = vec(4); var cc = vec(4); var u3 = vec(4); var v = vec(4); var axtbc = vec(8); var aytbc = vec(8); var bxtca = vec(8); var bytca = vec(8); var cxtab = vec(8); var cytab = vec(8); var abt2 = vec(8); var bct2 = vec(8); var cat2 = vec(8); var abtt = vec(4); var bctt = vec(4); var catt = vec(4); var _82 = vec(8); var _162 = vec(16); var _16b = vec(16); var _16c = vec(16); var _32 = vec(32); var _32b = vec(32); var _48 = vec(48); var _64 = vec(64); var fin3 = vec(1152); var fin22 = vec(1152); // node_modules/robust-predicates/esm/insphere.js var isperrboundA = (16 + 224 * epsilon5) * epsilon5; var isperrboundB = (5 + 72 * epsilon5) * epsilon5; var isperrboundC = (71 + 1408 * epsilon5) * epsilon5 * epsilon5; var ab3 = vec(4); var bc3 = vec(4); var cd = vec(4); var de = vec(4); var ea = vec(4); var ac = vec(4); var bd = vec(4); var ce = vec(4); var da = vec(4); var eb = vec(4); var abc = vec(24); var bcd = vec(24); var cde = vec(24); var dea = vec(24); var eab = vec(24); var abd = vec(24); var bce = vec(24); var cda = vec(24); var deb = vec(24); var eac = vec(24); var adet = vec(1152); var bdet = vec(1152); var cdet = vec(1152); var ddet = vec(1152); var edet = vec(1152); var abdet = vec(2304); var cddet = vec(2304); var cdedet = vec(3456); var deter = vec(5760); var _83 = vec(8); var _8b2 = vec(8); var _8c = vec(8); var _163 = vec(16); var _24 = vec(24); var _482 = vec(48); var _48b = vec(48); var _96 = vec(96); var _192 = vec(192); var _384x = vec(384); var _384y = vec(384); var _384z = vec(384); var _768 = vec(768); var xdet = vec(96); var ydet = vec(96); var zdet = vec(96); var fin4 = vec(1152); // node_modules/delaunator/index.js var EPSILON = Math.pow(2, -52); var EDGE_STACK = new Uint32Array(512); // node_modules/d3-delaunay/src/delaunay.js var tau4 = 2 * Math.PI; // node_modules/d3-dsv/src/dsv.js var EOL = {}; var EOF = {}; var QUOTE = 34; var NEWLINE = 10; var RETURN = 13; function objectConverter(columns) { return new Function("d", "return {" + columns.map(function(name, i) { return JSON.stringify(name) + ": d[" + i + '] || ""'; }).join(",") + "}"); } function customConverter(columns, f) { var object = objectConverter(columns); return function(row, i) { return f(object(row), i, columns); }; } function inferColumns(rows) { var columnSet = /* @__PURE__ */ Object.create(null), columns = []; rows.forEach(function(row) { for (var column2 in row) { if (!(column2 in columnSet)) { columns.push(columnSet[column2] = column2); } } }); return columns; } function pad2(value, width) { var s2 = value + "", length2 = s2.length; return length2 < width ? new Array(width - length2 + 1).join(0) + s2 : s2; } function formatYear2(year) { return year < 0 ? "-" + pad2(-year, 6) : year > 9999 ? "+" + pad2(year, 6) : pad2(year, 4); } function formatDate(date2) { var hours = date2.getUTCHours(), minutes = date2.getUTCMinutes(), seconds2 = date2.getUTCSeconds(), milliseconds2 = date2.getUTCMilliseconds(); return isNaN(date2) ? "Invalid Date" : formatYear2(date2.getUTCFullYear(), 4) + "-" + pad2(date2.getUTCMonth() + 1, 2) + "-" + pad2(date2.getUTCDate(), 2) + (milliseconds2 ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + ":" + pad2(seconds2, 2) + "." + pad2(milliseconds2, 3) + "Z" : seconds2 ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + ":" + pad2(seconds2, 2) + "Z" : minutes || hours ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + "Z" : ""); } function dsv_default(delimiter2) { var reFormat = new RegExp('["' + delimiter2 + "\n\r]"), DELIMITER = delimiter2.charCodeAt(0); function parse3(text, f) { var convert, columns, rows = parseRows(text, function(row, i) { if (convert) return convert(row, i - 1); columns = row, convert = f ? customConverter(row, f) : objectConverter(row); }); rows.columns = columns || []; return rows; } function parseRows(text, f) { var rows = [], N = text.length, I = 0, n = 0, t, eof = N <= 0, eol = false; if (text.charCodeAt(N - 1) === NEWLINE) --N; if (text.charCodeAt(N - 1) === RETURN) --N; function token2() { if (eof) return EOF; if (eol) return eol = false, EOL; var i, j = I, c3; if (text.charCodeAt(j) === QUOTE) { while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE) ; if ((i = I) >= N) eof = true; else if ((c3 = text.charCodeAt(I++)) === NEWLINE) eol = true; else if (c3 === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } return text.slice(j + 1, i - 1).replace(/""/g, '"'); } while (I < N) { if ((c3 = text.charCodeAt(i = I++)) === NEWLINE) eol = true; else if (c3 === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } else if (c3 !== DELIMITER) continue; return text.slice(j, i); } return eof = true, text.slice(j, N); } while ((t = token2()) !== EOF) { var row = []; while (t !== EOL && t !== EOF) row.push(t), t = token2(); if (f && (row = f(row, n++)) == null) continue; rows.push(row); } return rows; } function preformatBody(rows, columns) { return rows.map(function(row) { return columns.map(function(column2) { return formatValue(row[column2]); }).join(delimiter2); }); } function format3(rows, columns) { if (columns == null) columns = inferColumns(rows); return [columns.map(formatValue).join(delimiter2)].concat(preformatBody(rows, columns)).join("\n"); } function formatBody(rows, columns) { if (columns == null) columns = inferColumns(rows); return preformatBody(rows, columns).join("\n"); } function formatRows(rows) { return rows.map(formatRow).join("\n"); } function formatRow(row) { return row.map(formatValue).join(delimiter2); } function formatValue(value) { return value == null ? "" : value instanceof Date ? formatDate(value) : reFormat.test(value += "") ? '"' + value.replace(/"/g, '""') + '"' : value; } return { parse: parse3, parseRows, format: format3, formatBody, formatRows, formatRow, formatValue }; } // node_modules/d3-dsv/src/csv.js var csv = dsv_default(","); var csvParse = csv.parse; var csvParseRows = csv.parseRows; var csvFormat = csv.format; var csvFormatBody = csv.formatBody; var csvFormatRows = csv.formatRows; var csvFormatRow = csv.formatRow; var csvFormatValue = csv.formatValue; // node_modules/d3-dsv/src/tsv.js var tsv = dsv_default(" "); var tsvParse = tsv.parse; var tsvParseRows = tsv.parseRows; var tsvFormat = tsv.format; var tsvFormatBody = tsv.formatBody; var tsvFormatRows = tsv.formatRows; var tsvFormatRow = tsv.formatRow; var tsvFormatValue = tsv.formatValue; // node_modules/d3-dsv/src/autoType.js var fixtz = (/* @__PURE__ */ new Date("2019-01-01T00:00")).getHours() || (/* @__PURE__ */ new Date("2019-07-01T00:00")).getHours(); // node_modules/d3-fetch/src/text.js function responseText(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); return response.text(); } function text_default(input, init2) { return fetch(input, init2).then(responseText); } // node_modules/d3-fetch/src/dsv.js function dsvParse(parse3) { return function(input, init2, row) { if (arguments.length === 2 && typeof init2 === "function") row = init2, init2 = void 0; return text_default(input, init2).then(function(response) { return parse3(response, row); }); }; } var csv2 = dsvParse(csvParse); var tsv2 = dsvParse(tsvParse); // node_modules/d3-fetch/src/xml.js function parser(type3) { return (input, init2) => text_default(input, init2).then((text) => new DOMParser().parseFromString(text, type3)); } var xml_default = parser("application/xml"); var html = parser("text/html"); var svg = parser("image/svg+xml"); // node_modules/d3-quadtree/src/add.js function add_default(d) { const x3 = +this._x.call(null, d), y3 = +this._y.call(null, d); return add(this.cover(x3, y3), x3, y3, d); } function add(tree, x3, y3, d) { if (isNaN(x3) || isNaN(y3)) return tree; var parent, node2 = tree._root, leaf = { data: d }, x02 = tree._x0, y0 = tree._y0, x12 = tree._x1, y1 = tree._y1, xm, ym, xp, yp, right2, bottom2, i, j; if (!node2) return tree._root = leaf, tree; while (node2.length) { if (right2 = x3 >= (xm = (x02 + x12) / 2)) x02 = xm; else x12 = xm; if (bottom2 = y3 >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; if (parent = node2, !(node2 = node2[i = bottom2 << 1 | right2])) return parent[i] = leaf, tree; } xp = +tree._x.call(null, node2.data); yp = +tree._y.call(null, node2.data); if (x3 === xp && y3 === yp) return leaf.next = node2, parent ? parent[i] = leaf : tree._root = leaf, tree; do { parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); if (right2 = x3 >= (xm = (x02 + x12) / 2)) x02 = xm; else x12 = xm; if (bottom2 = y3 >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; } while ((i = bottom2 << 1 | right2) === (j = (yp >= ym) << 1 | xp >= xm)); return parent[j] = node2, parent[i] = leaf, tree; } function addAll(data) { var d, i, n = data.length, x3, y3, xz = new Array(n), yz = new Array(n), x02 = Infinity, y0 = Infinity, x12 = -Infinity, y1 = -Infinity; for (i = 0; i < n; ++i) { if (isNaN(x3 = +this._x.call(null, d = data[i])) || isNaN(y3 = +this._y.call(null, d))) continue; xz[i] = x3; yz[i] = y3; if (x3 < x02) x02 = x3; if (x3 > x12) x12 = x3; if (y3 < y0) y0 = y3; if (y3 > y1) y1 = y3; } if (x02 > x12 || y0 > y1) return this; this.cover(x02, y0).cover(x12, y1); for (i = 0; i < n; ++i) { add(this, xz[i], yz[i], data[i]); } return this; } // node_modules/d3-quadtree/src/cover.js function cover_default(x3, y3) { if (isNaN(x3 = +x3) || isNaN(y3 = +y3)) return this; var x02 = this._x0, y0 = this._y0, x12 = this._x1, y1 = this._y1; if (isNaN(x02)) { x12 = (x02 = Math.floor(x3)) + 1; y1 = (y0 = Math.floor(y3)) + 1; } else { var z = x12 - x02 || 1, node2 = this._root, parent, i; while (x02 > x3 || x3 >= x12 || y0 > y3 || y3 >= y1) { i = (y3 < y0) << 1 | x3 < x02; parent = new Array(4), parent[i] = node2, node2 = parent, z *= 2; switch (i) { case 0: x12 = x02 + z, y1 = y0 + z; break; case 1: x02 = x12 - z, y1 = y0 + z; break; case 2: x12 = x02 + z, y0 = y1 - z; break; case 3: x02 = x12 - z, y0 = y1 - z; break; } } if (this._root && this._root.length) this._root = node2; } this._x0 = x02; this._y0 = y0; this._x1 = x12; this._y1 = y1; return this; } // node_modules/d3-quadtree/src/data.js function data_default() { var data = []; this.visit(function(node2) { if (!node2.length) do data.push(node2.data); while (node2 = node2.next); }); return data; } // node_modules/d3-quadtree/src/extent.js function extent_default(_) { return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]]; } // node_modules/d3-quadtree/src/quad.js function quad_default(node2, x02, y0, x12, y1) { this.node = node2; this.x0 = x02; this.y0 = y0; this.x1 = x12; this.y1 = y1; } // node_modules/d3-quadtree/src/find.js function find_default(x3, y3, radius) { var data, x02 = this._x0, y0 = this._y0, x12, y1, x22, y22, x32 = this._x1, y32 = this._y1, quads = [], node2 = this._root, q, i; if (node2) quads.push(new quad_default(node2, x02, y0, x32, y32)); if (radius == null) radius = Infinity; else { x02 = x3 - radius, y0 = y3 - radius; x32 = x3 + radius, y32 = y3 + radius; radius *= radius; } while (q = quads.pop()) { if (!(node2 = q.node) || (x12 = q.x0) > x32 || (y1 = q.y0) > y32 || (x22 = q.x1) < x02 || (y22 = q.y1) < y0) continue; if (node2.length) { var xm = (x12 + x22) / 2, ym = (y1 + y22) / 2; quads.push( new quad_default(node2[3], xm, ym, x22, y22), new quad_default(node2[2], x12, ym, xm, y22), new quad_default(node2[1], xm, y1, x22, ym), new quad_default(node2[0], x12, y1, xm, ym) ); if (i = (y3 >= ym) << 1 | x3 >= xm) { q = quads[quads.length - 1]; quads[quads.length - 1] = quads[quads.length - 1 - i]; quads[quads.length - 1 - i] = q; } } else { var dx = x3 - +this._x.call(null, node2.data), dy = y3 - +this._y.call(null, node2.data), d2 = dx * dx + dy * dy; if (d2 < radius) { var d = Math.sqrt(radius = d2); x02 = x3 - d, y0 = y3 - d; x32 = x3 + d, y32 = y3 + d; data = node2.data; } } } return data; } // node_modules/d3-quadtree/src/remove.js function remove_default(d) { if (isNaN(x3 = +this._x.call(null, d)) || isNaN(y3 = +this._y.call(null, d))) return this; var parent, node2 = this._root, retainer, previous, next2, x02 = this._x0, y0 = this._y0, x12 = this._x1, y1 = this._y1, x3, y3, xm, ym, right2, bottom2, i, j; if (!node2) return this; if (node2.length) while (true) { if (right2 = x3 >= (xm = (x02 + x12) / 2)) x02 = xm; else x12 = xm; if (bottom2 = y3 >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; if (!(parent = node2, node2 = node2[i = bottom2 << 1 | right2])) return this; if (!node2.length) break; if (parent[i + 1 & 3] || parent[i + 2 & 3] || parent[i + 3 & 3]) retainer = parent, j = i; } while (node2.data !== d) if (!(previous = node2, node2 = node2.next)) return this; if (next2 = node2.next) delete node2.next; if (previous) return next2 ? previous.next = next2 : delete previous.next, this; if (!parent) return this._root = next2, this; next2 ? parent[i] = next2 : delete parent[i]; if ((node2 = parent[0] || parent[1] || parent[2] || parent[3]) && node2 === (parent[3] || parent[2] || parent[1] || parent[0]) && !node2.length) { if (retainer) retainer[j] = node2; else this._root = node2; } return this; } function removeAll(data) { for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); return this; } // node_modules/d3-quadtree/src/root.js function root_default() { return this._root; } // node_modules/d3-quadtree/src/size.js function size_default() { var size = 0; this.visit(function(node2) { if (!node2.length) do ++size; while (node2 = node2.next); }); return size; } // node_modules/d3-quadtree/src/visit.js function visit_default(callback) { var quads = [], q, node2 = this._root, child, x02, y0, x12, y1; if (node2) quads.push(new quad_default(node2, this._x0, this._y0, this._x1, this._y1)); while (q = quads.pop()) { if (!callback(node2 = q.node, x02 = q.x0, y0 = q.y0, x12 = q.x1, y1 = q.y1) && node2.length) { var xm = (x02 + x12) / 2, ym = (y0 + y1) / 2; if (child = node2[3]) quads.push(new quad_default(child, xm, ym, x12, y1)); if (child = node2[2]) quads.push(new quad_default(child, x02, ym, xm, y1)); if (child = node2[1]) quads.push(new quad_default(child, xm, y0, x12, ym)); if (child = node2[0]) quads.push(new quad_default(child, x02, y0, xm, ym)); } } return this; } // node_modules/d3-quadtree/src/visitAfter.js function visitAfter_default(callback) { var quads = [], next2 = [], q; if (this._root) quads.push(new quad_default(this._root, this._x0, this._y0, this._x1, this._y1)); while (q = quads.pop()) { var node2 = q.node; if (node2.length) { var child, x02 = q.x0, y0 = q.y0, x12 = q.x1, y1 = q.y1, xm = (x02 + x12) / 2, ym = (y0 + y1) / 2; if (child = node2[0]) quads.push(new quad_default(child, x02, y0, xm, ym)); if (child = node2[1]) quads.push(new quad_default(child, xm, y0, x12, ym)); if (child = node2[2]) quads.push(new quad_default(child, x02, ym, xm, y1)); if (child = node2[3]) quads.push(new quad_default(child, xm, ym, x12, y1)); } next2.push(q); } while (q = next2.pop()) { callback(q.node, q.x0, q.y0, q.x1, q.y1); } return this; } // node_modules/d3-quadtree/src/x.js function defaultX(d) { return d[0]; } function x_default(_) { return arguments.length ? (this._x = _, this) : this._x; } // node_modules/d3-quadtree/src/y.js function defaultY(d) { return d[1]; } function y_default(_) { return arguments.length ? (this._y = _, this) : this._y; } // node_modules/d3-quadtree/src/quadtree.js function quadtree(nodes, x3, y3) { var tree = new Quadtree(x3 == null ? defaultX : x3, y3 == null ? defaultY : y3, NaN, NaN, NaN, NaN); return nodes == null ? tree : tree.addAll(nodes); } function Quadtree(x3, y3, x02, y0, x12, y1) { this._x = x3; this._y = y3; this._x0 = x02; this._y0 = y0; this._x1 = x12; this._y1 = y1; this._root = void 0; } function leaf_copy(leaf) { var copy4 = { data: leaf.data }, next2 = copy4; while (leaf = leaf.next) next2 = next2.next = { data: leaf.data }; return copy4; } var treeProto = quadtree.prototype = Quadtree.prototype; treeProto.copy = function() { var copy4 = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), node2 = this._root, nodes, child; if (!node2) return copy4; if (!node2.length) return copy4._root = leaf_copy(node2), copy4; nodes = [{ source: node2, target: copy4._root = new Array(4) }]; while (node2 = nodes.pop()) { for (var i = 0; i < 4; ++i) { if (child = node2.source[i]) { if (child.length) nodes.push({ source: child, target: node2.target[i] = new Array(4) }); else node2.target[i] = leaf_copy(child); } } } return copy4; }; treeProto.add = add_default; treeProto.addAll = addAll; treeProto.cover = cover_default; treeProto.data = data_default; treeProto.extent = extent_default; treeProto.find = find_default; treeProto.remove = remove_default; treeProto.removeAll = removeAll; treeProto.root = root_default; treeProto.size = size_default; treeProto.visit = visit_default; treeProto.visitAfter = visitAfter_default; treeProto.x = x_default; treeProto.y = y_default; // node_modules/d3-force/src/simulation.js var initialAngle = Math.PI * (3 - Math.sqrt(5)); // node_modules/d3-geo/src/math.js var epsilon6 = 1e-6; var epsilon22 = 1e-12; var pi4 = Math.PI; var halfPi3 = pi4 / 2; var quarterPi = pi4 / 4; var tau5 = pi4 * 2; var degrees = 180 / pi4; var radians = pi4 / 180; var abs4 = Math.abs; var atan = Math.atan; var atan22 = Math.atan2; var cos3 = Math.cos; var exp = Math.exp; var log2 = Math.log; var sin3 = Math.sin; var sign2 = Math.sign || function(x3) { return x3 > 0 ? 1 : x3 < 0 ? -1 : 0; }; var sqrt4 = Math.sqrt; var tan = Math.tan; function acos2(x3) { return x3 > 1 ? 0 : x3 < -1 ? pi4 : Math.acos(x3); } function asin2(x3) { return x3 > 1 ? halfPi3 : x3 < -1 ? -halfPi3 : Math.asin(x3); } // node_modules/d3-geo/src/noop.js function noop() { } // node_modules/d3-geo/src/area.js var areaRingSum = new Adder(); var areaSum = new Adder(); // node_modules/d3-geo/src/cartesian.js function cartesian(spherical2) { var lambda = spherical2[0], phi2 = spherical2[1], cosPhi = cos3(phi2); return [cosPhi * cos3(lambda), cosPhi * sin3(lambda), sin3(phi2)]; } function cartesianCross(a2, b) { return [a2[1] * b[2] - a2[2] * b[1], a2[2] * b[0] - a2[0] * b[2], a2[0] * b[1] - a2[1] * b[0]]; } function cartesianNormalizeInPlace(d) { var l = sqrt4(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); d[0] /= l, d[1] /= l, d[2] /= l; } // node_modules/d3-geo/src/rotation.js function rotationIdentity(lambda, phi2) { if (abs4(lambda) > pi4) lambda -= Math.round(lambda / tau5) * tau5; return [lambda, phi2]; } rotationIdentity.invert = rotationIdentity; // node_modules/d3-geo/src/clip/buffer.js function buffer_default2() { var lines = [], line2; return { point: function(x3, y3, m) { line2.push([x3, y3, m]); }, lineStart: function() { lines.push(line2 = []); }, lineEnd: noop, rejoin: function() { if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); }, result: function() { var result = lines; lines = []; line2 = null; return result; } }; } // node_modules/d3-geo/src/pointEqual.js function pointEqual_default(a2, b) { return abs4(a2[0] - b[0]) < epsilon6 && abs4(a2[1] - b[1]) < epsilon6; } // node_modules/d3-geo/src/clip/rejoin.js function Intersection(point6, points, other, entry) { this.x = point6; this.z = points; this.o = other; this.e = entry; this.v = false; this.n = this.p = null; } function rejoin_default(segments, compareIntersection2, startInside, interpolate, stream) { var subject = [], clip = [], i, n; segments.forEach(function(segment) { if ((n2 = segment.length - 1) <= 0) return; var n2, p0 = segment[0], p1 = segment[n2], x3; if (pointEqual_default(p0, p1)) { if (!p0[2] && !p1[2]) { stream.lineStart(); for (i = 0; i < n2; ++i) stream.point((p0 = segment[i])[0], p0[1]); stream.lineEnd(); return; } p1[0] += 2 * epsilon6; } subject.push(x3 = new Intersection(p0, segment, null, true)); clip.push(x3.o = new Intersection(p0, null, x3, false)); subject.push(x3 = new Intersection(p1, segment, null, false)); clip.push(x3.o = new Intersection(p1, null, x3, true)); }); if (!subject.length) return; clip.sort(compareIntersection2); link2(subject); link2(clip); for (i = 0, n = clip.length; i < n; ++i) { clip[i].e = startInside = !startInside; } var start = subject[0], points, point6; while (1) { var current = start, isSubject = true; while (current.v) if ((current = current.n) === start) return; points = current.z; stream.lineStart(); do { current.v = current.o.v = true; if (current.e) { if (isSubject) { for (i = 0, n = points.length; i < n; ++i) stream.point((point6 = points[i])[0], point6[1]); } else { interpolate(current.x, current.n.x, 1, stream); } current = current.n; } else { if (isSubject) { points = current.p.z; for (i = points.length - 1; i >= 0; --i) stream.point((point6 = points[i])[0], point6[1]); } else { interpolate(current.x, current.p.x, -1, stream); } current = current.p; } current = current.o; points = current.z; isSubject = !isSubject; } while (!current.v); stream.lineEnd(); } } function link2(array3) { if (!(n = array3.length)) return; var n, i = 0, a2 = array3[0], b; while (++i < n) { a2.n = b = array3[i]; b.p = a2; a2 = b; } a2.n = b = array3[0]; b.p = a2; } // node_modules/d3-geo/src/polygonContains.js function longitude(point6) { return abs4(point6[0]) <= pi4 ? point6[0] : sign2(point6[0]) * ((abs4(point6[0]) + pi4) % tau5 - pi4); } function polygonContains_default(polygon, point6) { var lambda = longitude(point6), phi2 = point6[1], sinPhi = sin3(phi2), normal = [sin3(lambda), -cos3(lambda), 0], angle = 0, winding = 0; var sum4 = new Adder(); if (sinPhi === 1) phi2 = halfPi3 + epsilon6; else if (sinPhi === -1) phi2 = -halfPi3 - epsilon6; for (var i = 0, n = polygon.length; i < n; ++i) { if (!(m = (ring = polygon[i]).length)) continue; var ring, m, point0 = ring[m - 1], lambda0 = longitude(point0), phi0 = point0[1] / 2 + quarterPi, sinPhi0 = sin3(phi0), cosPhi0 = cos3(phi0); for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { var point1 = ring[j], lambda1 = longitude(point1), phi1 = point1[1] / 2 + quarterPi, sinPhi1 = sin3(phi1), cosPhi1 = cos3(phi1), delta = lambda1 - lambda0, sign3 = delta >= 0 ? 1 : -1, absDelta = sign3 * delta, antimeridian = absDelta > pi4, k2 = sinPhi0 * sinPhi1; sum4.add(atan22(k2 * sign3 * sin3(absDelta), cosPhi0 * cosPhi1 + k2 * cos3(absDelta))); angle += antimeridian ? delta + sign3 * tau5 : delta; if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { var arc = cartesianCross(cartesian(point0), cartesian(point1)); cartesianNormalizeInPlace(arc); var intersection2 = cartesianCross(normal, arc); cartesianNormalizeInPlace(intersection2); var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin2(intersection2[2]); if (phi2 > phiArc || phi2 === phiArc && (arc[0] || arc[1])) { winding += antimeridian ^ delta >= 0 ? 1 : -1; } } } } return (angle < -epsilon6 || angle < epsilon6 && sum4 < -epsilon22) ^ winding & 1; } // node_modules/d3-geo/src/clip/index.js function clip_default(pointVisible, clipLine, interpolate, start) { return function(sink) { var line2 = clipLine(sink), ringBuffer = buffer_default2(), ringSink = clipLine(ringBuffer), polygonStarted = false, polygon, segments, ring; var clip = { point: point6, lineStart, lineEnd, polygonStart: function() { clip.point = pointRing; clip.lineStart = ringStart; clip.lineEnd = ringEnd; segments = []; polygon = []; }, polygonEnd: function() { clip.point = point6; clip.lineStart = lineStart; clip.lineEnd = lineEnd; segments = merge(segments); var startInside = polygonContains_default(polygon, start); if (segments.length) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; rejoin_default(segments, compareIntersection, startInside, interpolate, sink); } else if (startInside) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; sink.lineStart(); interpolate(null, null, 1, sink); sink.lineEnd(); } if (polygonStarted) sink.polygonEnd(), polygonStarted = false; segments = polygon = null; }, sphere: function() { sink.polygonStart(); sink.lineStart(); interpolate(null, null, 1, sink); sink.lineEnd(); sink.polygonEnd(); } }; function point6(lambda, phi2) { if (pointVisible(lambda, phi2)) sink.point(lambda, phi2); } function pointLine(lambda, phi2) { line2.point(lambda, phi2); } function lineStart() { clip.point = pointLine; line2.lineStart(); } function lineEnd() { clip.point = point6; line2.lineEnd(); } function pointRing(lambda, phi2) { ring.push([lambda, phi2]); ringSink.point(lambda, phi2); } function ringStart() { ringSink.lineStart(); ring = []; } function ringEnd() { pointRing(ring[0][0], ring[0][1]); ringSink.lineEnd(); var clean = ringSink.clean(), ringSegments = ringBuffer.result(), i, n = ringSegments.length, m, segment, point7; ring.pop(); polygon.push(ring); ring = null; if (!n) return; if (clean & 1) { segment = ringSegments[0]; if ((m = segment.length - 1) > 0) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; sink.lineStart(); for (i = 0; i < m; ++i) sink.point((point7 = segment[i])[0], point7[1]); sink.lineEnd(); } return; } if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); segments.push(ringSegments.filter(validSegment)); } return clip; }; } function validSegment(segment) { return segment.length > 1; } function compareIntersection(a2, b) { return ((a2 = a2.x)[0] < 0 ? a2[1] - halfPi3 - epsilon6 : halfPi3 - a2[1]) - ((b = b.x)[0] < 0 ? b[1] - halfPi3 - epsilon6 : halfPi3 - b[1]); } // node_modules/d3-geo/src/clip/antimeridian.js var antimeridian_default = clip_default( function() { return true; }, clipAntimeridianLine, clipAntimeridianInterpolate, [-pi4, -halfPi3] ); function clipAntimeridianLine(stream) { var lambda0 = NaN, phi0 = NaN, sign0 = NaN, clean; return { lineStart: function() { stream.lineStart(); clean = 1; }, point: function(lambda1, phi1) { var sign1 = lambda1 > 0 ? pi4 : -pi4, delta = abs4(lambda1 - lambda0); if (abs4(delta - pi4) < epsilon6) { stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi3 : -halfPi3); stream.point(sign0, phi0); stream.lineEnd(); stream.lineStart(); stream.point(sign1, phi0); stream.point(lambda1, phi0); clean = 0; } else if (sign0 !== sign1 && delta >= pi4) { if (abs4(lambda0 - sign0) < epsilon6) lambda0 -= sign0 * epsilon6; if (abs4(lambda1 - sign1) < epsilon6) lambda1 -= sign1 * epsilon6; phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); stream.point(sign0, phi0); stream.lineEnd(); stream.lineStart(); stream.point(sign1, phi0); clean = 0; } stream.point(lambda0 = lambda1, phi0 = phi1); sign0 = sign1; }, lineEnd: function() { stream.lineEnd(); lambda0 = phi0 = NaN; }, clean: function() { return 2 - clean; } }; } function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { var cosPhi0, cosPhi1, sinLambda0Lambda1 = sin3(lambda0 - lambda1); return abs4(sinLambda0Lambda1) > epsilon6 ? atan((sin3(phi0) * (cosPhi1 = cos3(phi1)) * sin3(lambda1) - sin3(phi1) * (cosPhi0 = cos3(phi0)) * sin3(lambda0)) / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) : (phi0 + phi1) / 2; } function clipAntimeridianInterpolate(from2, to, direction, stream) { var phi2; if (from2 == null) { phi2 = direction * halfPi3; stream.point(-pi4, phi2); stream.point(0, phi2); stream.point(pi4, phi2); stream.point(pi4, 0); stream.point(pi4, -phi2); stream.point(0, -phi2); stream.point(-pi4, -phi2); stream.point(-pi4, 0); stream.point(-pi4, phi2); } else if (abs4(from2[0] - to[0]) > epsilon6) { var lambda = from2[0] < to[0] ? pi4 : -pi4; phi2 = direction * lambda / 2; stream.point(-lambda, phi2); stream.point(0, phi2); stream.point(lambda, phi2); } else { stream.point(to[0], to[1]); } } // node_modules/d3-geo/src/clip/rectangle.js var clipMax = 1e9; var clipMin = -clipMax; // node_modules/d3-geo/src/path/area.js var areaSum2 = new Adder(); var areaRingSum2 = new Adder(); // node_modules/d3-geo/src/path/bounds.js var x0 = Infinity; var x1 = -x0; // node_modules/d3-geo/src/path/context.js function PathContext(context) { this._context = context; } PathContext.prototype = { _radius: 4.5, pointRadius: function(_) { return this._radius = _, this; }, polygonStart: function() { this._line = 0; }, polygonEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line === 0) this._context.closePath(); this._point = NaN; }, point: function(x3, y3) { switch (this._point) { case 0: { this._context.moveTo(x3, y3); this._point = 1; break; } case 1: { this._context.lineTo(x3, y3); break; } default: { this._context.moveTo(x3 + this._radius, y3); this._context.arc(x3, y3, this._radius, 0, tau5); break; } } }, result: noop }; // node_modules/d3-geo/src/path/measure.js var lengthSum = new Adder(); // node_modules/d3-geo/src/transform.js function transformer2(methods) { return function(stream) { var s2 = new TransformStream(); for (var key in methods) s2[key] = methods[key]; s2.stream = stream; return s2; }; } function TransformStream() { } TransformStream.prototype = { constructor: TransformStream, point: function(x3, y3) { this.stream.point(x3, y3); }, 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(); } }; // node_modules/d3-geo/src/projection/resample.js var cosMinDistance = cos3(30 * radians); // node_modules/d3-geo/src/projection/index.js var transformRadians = transformer2({ point: function(x3, y3) { this.stream.point(x3 * radians, y3 * radians); } }); // node_modules/d3-geo/src/projection/azimuthal.js function azimuthalRaw(scale2) { return function(x3, y3) { var cx = cos3(x3), cy = cos3(y3), k2 = scale2(cx * cy); if (k2 === Infinity) return [2, 0]; return [ k2 * cy * sin3(x3), k2 * sin3(y3) ]; }; } function azimuthalInvert(angle) { return function(x3, y3) { var z = sqrt4(x3 * x3 + y3 * y3), c3 = angle(z), sc = sin3(c3), cc2 = cos3(c3); return [ atan22(x3 * sc, z * cc2), asin2(z && y3 * sc / z) ]; }; } // node_modules/d3-geo/src/projection/azimuthalEqualArea.js var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) { return sqrt4(2 / (1 + cxcy)); }); azimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) { return 2 * asin2(z / 2); }); // node_modules/d3-geo/src/projection/azimuthalEquidistant.js var azimuthalEquidistantRaw = azimuthalRaw(function(c3) { return (c3 = acos2(c3)) && c3 / sin3(c3); }); azimuthalEquidistantRaw.invert = azimuthalInvert(function(z) { return z; }); // node_modules/d3-geo/src/projection/mercator.js function mercatorRaw(lambda, phi2) { return [lambda, log2(tan((halfPi3 + phi2) / 2))]; } mercatorRaw.invert = function(x3, y3) { return [x3, 2 * atan(exp(y3)) - halfPi3]; }; // node_modules/d3-geo/src/projection/equirectangular.js function equirectangularRaw(lambda, phi2) { return [lambda, phi2]; } equirectangularRaw.invert = equirectangularRaw; // node_modules/d3-geo/src/projection/equalEarth.js var A1 = 1.340264; var A2 = -0.081106; var A3 = 893e-6; var A4 = 3796e-6; var M = sqrt4(3) / 2; var iterations = 12; function equalEarthRaw(lambda, phi2) { var l = asin2(M * sin3(phi2)), l2 = l * l, l6 = l2 * l2 * l2; return [ lambda * cos3(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) ]; } equalEarthRaw.invert = function(x3, y3) { var l = y3, l2 = l * l, l6 = l2 * l2 * l2; for (var i = 0, delta, fy, fpy; i < iterations; ++i) { fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y3; fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; if (abs4(delta) < epsilon22) break; } return [ M * x3 * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos3(l), asin2(sin3(l) / M) ]; }; // node_modules/d3-geo/src/projection/gnomonic.js function gnomonicRaw(x3, y3) { var cy = cos3(y3), k2 = cos3(x3) * cy; return [cy * sin3(x3) / k2, sin3(y3) / k2]; } gnomonicRaw.invert = azimuthalInvert(atan); // node_modules/d3-geo/src/projection/naturalEarth1.js function naturalEarth1Raw(lambda, phi2) { var phi22 = phi2 * phi2, phi4 = phi22 * phi22; return [ lambda * (0.8707 - 0.131979 * phi22 + phi4 * (-0.013791 + phi4 * (3971e-6 * phi22 - 1529e-6 * phi4))), phi2 * (1.007226 + phi22 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi22 - 5916e-6 * phi4))) ]; } naturalEarth1Raw.invert = function(x3, y3) { var phi2 = y3, i = 25, delta; do { var phi22 = phi2 * phi2, phi4 = phi22 * phi22; phi2 -= delta = (phi2 * (1.007226 + phi22 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi22 - 5916e-6 * phi4))) - y3) / (1.007226 + phi22 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi22 - 5916e-6 * 11 * phi4))); } while (abs4(delta) > epsilon6 && --i > 0); return [ x3 / (0.8707 + (phi22 = phi2 * phi2) * (-0.131979 + phi22 * (-0.013791 + phi22 * phi22 * phi22 * (3971e-6 - 1529e-6 * phi22)))), phi2 ]; }; // node_modules/d3-geo/src/projection/orthographic.js function orthographicRaw(x3, y3) { return [cos3(y3) * sin3(x3), sin3(y3)]; } orthographicRaw.invert = azimuthalInvert(asin2); // node_modules/d3-geo/src/projection/stereographic.js function stereographicRaw(x3, y3) { var cy = cos3(y3), k2 = 1 + cos3(x3) * cy; return [cy * sin3(x3) / k2, sin3(y3) / k2]; } stereographicRaw.invert = azimuthalInvert(function(z) { return 2 * atan(z); }); // node_modules/d3-geo/src/projection/transverseMercator.js function transverseMercatorRaw(lambda, phi2) { return [log2(tan((halfPi3 + phi2) / 2)), -lambda]; } transverseMercatorRaw.invert = function(x3, y3) { return [-y3, 2 * atan(exp(x3)) - halfPi3]; }; // node_modules/d3-hierarchy/src/hierarchy/count.js function count2(node2) { var sum4 = 0, children = node2.children, i = children && children.length; if (!i) sum4 = 1; else while (--i >= 0) sum4 += children[i].value; node2.value = sum4; } function count_default() { return this.eachAfter(count2); } // node_modules/d3-hierarchy/src/hierarchy/each.js function each_default(callback, that) { let index2 = -1; for (const node2 of this) { callback.call(that, node2, ++index2, this); } return this; } // node_modules/d3-hierarchy/src/hierarchy/eachBefore.js function eachBefore_default(callback, that) { var node2 = this, nodes = [node2], children, i, index2 = -1; while (node2 = nodes.pop()) { callback.call(that, node2, ++index2, this); if (children = node2.children) { for (i = children.length - 1; i >= 0; --i) { nodes.push(children[i]); } } } return this; } // node_modules/d3-hierarchy/src/hierarchy/eachAfter.js function eachAfter_default(callback, that) { var node2 = this, nodes = [node2], next2 = [], children, i, n, index2 = -1; while (node2 = nodes.pop()) { next2.push(node2); if (children = node2.children) { for (i = 0, n = children.length; i < n; ++i) { nodes.push(children[i]); } } } while (node2 = next2.pop()) { callback.call(that, node2, ++index2, this); } return this; } // node_modules/d3-hierarchy/src/hierarchy/find.js function find_default2(callback, that) { let index2 = -1; for (const node2 of this) { if (callback.call(that, node2, ++index2, this)) { return node2; } } } // node_modules/d3-hierarchy/src/hierarchy/sum.js function sum_default(value) { return this.eachAfter(function(node2) { var sum4 = +value(node2.data) || 0, children = node2.children, i = children && children.length; while (--i >= 0) sum4 += children[i].value; node2.value = sum4; }); } // node_modules/d3-hierarchy/src/hierarchy/sort.js function sort_default(compare) { return this.eachBefore(function(node2) { if (node2.children) { node2.children.sort(compare); } }); } // node_modules/d3-hierarchy/src/hierarchy/path.js function path_default2(end) { var start = this, ancestor = leastCommonAncestor(start, end), nodes = [start]; while (start !== ancestor) { start = start.parent; nodes.push(start); } var k2 = nodes.length; while (end !== ancestor) { nodes.splice(k2, 0, end); end = end.parent; } return nodes; } function leastCommonAncestor(a2, b) { if (a2 === b) return a2; var aNodes = a2.ancestors(), bNodes = b.ancestors(), c3 = null; a2 = aNodes.pop(); b = bNodes.pop(); while (a2 === b) { c3 = a2; a2 = aNodes.pop(); b = bNodes.pop(); } return c3; } // node_modules/d3-hierarchy/src/hierarchy/ancestors.js function ancestors_default() { var node2 = this, nodes = [node2]; while (node2 = node2.parent) { nodes.push(node2); } return nodes; } // node_modules/d3-hierarchy/src/hierarchy/descendants.js function descendants_default() { return Array.from(this); } // node_modules/d3-hierarchy/src/hierarchy/leaves.js function leaves_default() { var leaves = []; this.eachBefore(function(node2) { if (!node2.children) { leaves.push(node2); } }); return leaves; } // node_modules/d3-hierarchy/src/hierarchy/links.js function links_default() { var root2 = this, links = []; root2.each(function(node2) { if (node2 !== root2) { links.push({ source: node2.parent, target: node2 }); } }); return links; } // node_modules/d3-hierarchy/src/hierarchy/iterator.js function* iterator_default() { var node2 = this, current, next2 = [node2], children, i, n; do { current = next2.reverse(), next2 = []; while (node2 = current.pop()) { yield node2; if (children = node2.children) { for (i = 0, n = children.length; i < n; ++i) { next2.push(children[i]); } } } } while (next2.length); } // node_modules/d3-hierarchy/src/hierarchy/index.js function hierarchy(data, children) { if (data instanceof Map) { data = [void 0, data]; if (children === void 0) children = mapChildren; } else if (children === void 0) { children = objectChildren; } var root2 = new Node(data), node2, nodes = [root2], child, childs, i, n; while (node2 = nodes.pop()) { if ((childs = children(node2.data)) && (n = (childs = Array.from(childs)).length)) { node2.children = childs; for (i = n - 1; i >= 0; --i) { nodes.push(child = childs[i] = new Node(childs[i])); child.parent = node2; child.depth = node2.depth + 1; } } } return root2.eachBefore(computeHeight); } function node_copy() { return hierarchy(this).eachBefore(copyData); } function objectChildren(d) { return d.children; } function mapChildren(d) { return Array.isArray(d) ? d[1] : null; } function copyData(node2) { if (node2.data.value !== void 0) node2.value = node2.data.value; node2.data = node2.data.data; } function computeHeight(node2) { var height = 0; do node2.height = height; while ((node2 = node2.parent) && node2.height < ++height); } function Node(data) { this.data = data; this.depth = this.height = 0; this.parent = null; } Node.prototype = hierarchy.prototype = { constructor: Node, count: count_default, each: each_default, eachAfter: eachAfter_default, eachBefore: eachBefore_default, find: find_default2, sum: sum_default, sort: sort_default, path: path_default2, ancestors: ancestors_default, descendants: descendants_default, leaves: leaves_default, links: links_default, copy: node_copy, [Symbol.iterator]: iterator_default }; // node_modules/d3-hierarchy/src/treemap/dice.js function dice_default(parent, x02, y0, x12, y1) { var nodes = parent.children, node2, i = -1, n = nodes.length, k2 = parent.value && (x12 - x02) / parent.value; while (++i < n) { node2 = nodes[i], node2.y0 = y0, node2.y1 = y1; node2.x0 = x02, node2.x1 = x02 += node2.value * k2; } } // node_modules/d3-hierarchy/src/tree.js function TreeNode(node2, i) { this._ = node2; 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 = i; } TreeNode.prototype = Object.create(Node.prototype); // node_modules/d3-hierarchy/src/treemap/slice.js function slice_default(parent, x02, y0, x12, y1) { var nodes = parent.children, node2, i = -1, n = nodes.length, k2 = parent.value && (y1 - y0) / parent.value; while (++i < n) { node2 = nodes[i], node2.x0 = x02, node2.x1 = x12; node2.y0 = y0, node2.y1 = y0 += node2.value * k2; } } // node_modules/d3-hierarchy/src/treemap/squarify.js var phi = (1 + Math.sqrt(5)) / 2; function squarifyRatio(ratio, parent, x02, y0, x12, y1) { var rows = [], nodes = parent.children, row, nodeValue, i0 = 0, i1 = 0, n = nodes.length, dx, dy, value = parent.value, sumValue, minValue, maxValue, newRatio, minRatio, alpha, beta; while (i0 < n) { dx = x12 - x02, dy = y1 - y0; do sumValue = nodes[i1++].value; while (!sumValue && i1 < n); minValue = maxValue = sumValue; alpha = Math.max(dy / dx, dx / dy) / (value * ratio); beta = sumValue * sumValue * alpha; minRatio = Math.max(maxValue / beta, beta / minValue); for (; i1 < n; ++i1) { sumValue += nodeValue = nodes[i1].value; if (nodeValue < minValue) minValue = nodeValue; if (nodeValue > maxValue) maxValue = nodeValue; beta = sumValue * sumValue * alpha; newRatio = Math.max(maxValue / beta, beta / minValue); if (newRatio > minRatio) { sumValue -= nodeValue; break; } minRatio = newRatio; } rows.push(row = { value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1) }); if (row.dice) dice_default(row, x02, y0, x12, value ? y0 += dy * sumValue / value : y1); else slice_default(row, x02, y0, value ? x02 += dx * sumValue / value : x12, y1); value -= sumValue, i0 = i1; } return rows; } var squarify_default = function custom8(ratio) { function squarify(parent, x02, y0, x12, y1) { squarifyRatio(ratio, parent, x02, y0, x12, y1); } squarify.ratio = function(x3) { return custom8((x3 = +x3) > 1 ? x3 : 1); }; return squarify; }(phi); // node_modules/d3-hierarchy/src/treemap/resquarify.js var resquarify_default = function custom9(ratio) { function resquarify(parent, x02, y0, x12, y1) { if ((rows = parent._squarify) && rows.ratio === ratio) { var rows, row, nodes, i, j = -1, n, m = rows.length, value = parent.value; while (++j < m) { row = rows[j], nodes = row.children; for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value; if (row.dice) dice_default(row, x02, y0, x12, value ? y0 += (y1 - y0) * row.value / value : y1); else slice_default(row, x02, y0, value ? x02 += (x12 - x02) * row.value / value : x12, y1); value -= row.value; } } else { parent._squarify = rows = squarifyRatio(ratio, parent, x02, y0, x12, y1); rows.ratio = ratio; } } resquarify.ratio = function(x3) { return custom9((x3 = +x3) > 1 ? x3 : 1); }; return resquarify; }(phi); // node_modules/d3-random/src/defaultSource.js var defaultSource_default = Math.random; // node_modules/d3-random/src/uniform.js var uniform_default = function sourceRandomUniform(source) { function randomUniform(min4, max5) { min4 = min4 == null ? 0 : +min4; max5 = max5 == null ? 1 : +max5; if (arguments.length === 1) max5 = min4, min4 = 0; else max5 -= min4; return function() { return source() * max5 + min4; }; } randomUniform.source = sourceRandomUniform; return randomUniform; }(defaultSource_default); // node_modules/d3-random/src/int.js var int_default = function sourceRandomInt(source) { function randomInt(min4, max5) { if (arguments.length < 2) max5 = min4, min4 = 0; min4 = Math.floor(min4); max5 = Math.floor(max5) - min4; return function() { return Math.floor(source() * max5 + min4); }; } randomInt.source = sourceRandomInt; return randomInt; }(defaultSource_default); // node_modules/d3-random/src/normal.js var normal_default = function sourceRandomNormal(source) { function randomNormal(mu, sigma) { var x3, r; mu = mu == null ? 0 : +mu; sigma = sigma == null ? 1 : +sigma; return function() { var y3; if (x3 != null) y3 = x3, x3 = null; else do { x3 = source() * 2 - 1; y3 = source() * 2 - 1; r = x3 * x3 + y3 * y3; } while (!r || r > 1); return mu + sigma * y3 * Math.sqrt(-2 * Math.log(r) / r); }; } randomNormal.source = sourceRandomNormal; return randomNormal; }(defaultSource_default); // node_modules/d3-random/src/logNormal.js var logNormal_default = function sourceRandomLogNormal(source) { var N = normal_default.source(source); function randomLogNormal() { var randomNormal = N.apply(this, arguments); return function() { return Math.exp(randomNormal()); }; } randomLogNormal.source = sourceRandomLogNormal; return randomLogNormal; }(defaultSource_default); // node_modules/d3-random/src/irwinHall.js var irwinHall_default = function sourceRandomIrwinHall(source) { function randomIrwinHall(n) { if ((n = +n) <= 0) return () => 0; return function() { for (var sum4 = 0, i = n; i > 1; --i) sum4 += source(); return sum4 + i * source(); }; } randomIrwinHall.source = sourceRandomIrwinHall; return randomIrwinHall; }(defaultSource_default); // node_modules/d3-random/src/bates.js var bates_default = function sourceRandomBates(source) { var I = irwinHall_default.source(source); function randomBates(n) { if ((n = +n) === 0) return source; var randomIrwinHall = I(n); return function() { return randomIrwinHall() / n; }; } randomBates.source = sourceRandomBates; return randomBates; }(defaultSource_default); // node_modules/d3-random/src/exponential.js var exponential_default = function sourceRandomExponential(source) { function randomExponential(lambda) { return function() { return -Math.log1p(-source()) / lambda; }; } randomExponential.source = sourceRandomExponential; return randomExponential; }(defaultSource_default); // node_modules/d3-random/src/pareto.js var pareto_default = function sourceRandomPareto(source) { function randomPareto(alpha) { if ((alpha = +alpha) < 0) throw new RangeError("invalid alpha"); alpha = 1 / -alpha; return function() { return Math.pow(1 - source(), alpha); }; } randomPareto.source = sourceRandomPareto; return randomPareto; }(defaultSource_default); // node_modules/d3-random/src/bernoulli.js var bernoulli_default = function sourceRandomBernoulli(source) { function randomBernoulli(p) { if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); return function() { return Math.floor(source() + p); }; } randomBernoulli.source = sourceRandomBernoulli; return randomBernoulli; }(defaultSource_default); // node_modules/d3-random/src/geometric.js var geometric_default = function sourceRandomGeometric(source) { function randomGeometric(p) { if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); if (p === 0) return () => Infinity; if (p === 1) return () => 1; p = Math.log1p(-p); return function() { return 1 + Math.floor(Math.log1p(-source()) / p); }; } randomGeometric.source = sourceRandomGeometric; return randomGeometric; }(defaultSource_default); // node_modules/d3-random/src/gamma.js var gamma_default = function sourceRandomGamma(source) { var randomNormal = normal_default.source(source)(); function randomGamma(k2, theta) { if ((k2 = +k2) < 0) throw new RangeError("invalid k"); if (k2 === 0) return () => 0; theta = theta == null ? 1 : +theta; if (k2 === 1) return () => -Math.log1p(-source()) * theta; var d = (k2 < 1 ? k2 + 1 : k2) - 1 / 3, c3 = 1 / (3 * Math.sqrt(d)), multiplier = k2 < 1 ? () => Math.pow(source(), 1 / k2) : () => 1; return function() { do { do { var x3 = randomNormal(), v2 = 1 + c3 * x3; } while (v2 <= 0); v2 *= v2 * v2; var u4 = 1 - source(); } while (u4 >= 1 - 0.0331 * x3 * x3 * x3 * x3 && Math.log(u4) >= 0.5 * x3 * x3 + d * (1 - v2 + Math.log(v2))); return d * v2 * multiplier() * theta; }; } randomGamma.source = sourceRandomGamma; return randomGamma; }(defaultSource_default); // node_modules/d3-random/src/beta.js var beta_default = function sourceRandomBeta(source) { var G = gamma_default.source(source); function randomBeta(alpha, beta) { var X2 = G(alpha), Y2 = G(beta); return function() { var x3 = X2(); return x3 === 0 ? 0 : x3 / (x3 + Y2()); }; } randomBeta.source = sourceRandomBeta; return randomBeta; }(defaultSource_default); // node_modules/d3-random/src/binomial.js var binomial_default = function sourceRandomBinomial(source) { var G = geometric_default.source(source), B2 = beta_default.source(source); function randomBinomial(n, p) { n = +n; if ((p = +p) >= 1) return () => n; if (p <= 0) return () => 0; return function() { var acc = 0, nn = n, pp = p; while (nn * pp > 16 && nn * (1 - pp) > 16) { var i = Math.floor((nn + 1) * pp), y3 = B2(i, nn - i + 1)(); if (y3 <= pp) { acc += i; nn -= i; pp = (pp - y3) / (1 - y3); } else { nn = i - 1; pp /= y3; } } var sign3 = pp < 0.5, pFinal = sign3 ? pp : 1 - pp, g = G(pFinal); for (var s2 = g(), k2 = 0; s2 <= nn; ++k2) s2 += g(); return acc + (sign3 ? k2 : nn - k2); }; } randomBinomial.source = sourceRandomBinomial; return randomBinomial; }(defaultSource_default); // node_modules/d3-random/src/weibull.js var weibull_default = function sourceRandomWeibull(source) { function randomWeibull(k2, a2, b) { var outerFunc; if ((k2 = +k2) === 0) { outerFunc = (x3) => -Math.log(x3); } else { k2 = 1 / k2; outerFunc = (x3) => Math.pow(x3, k2); } a2 = a2 == null ? 0 : +a2; b = b == null ? 1 : +b; return function() { return a2 + b * outerFunc(-Math.log1p(-source())); }; } randomWeibull.source = sourceRandomWeibull; return randomWeibull; }(defaultSource_default); // node_modules/d3-random/src/cauchy.js var cauchy_default = function sourceRandomCauchy(source) { function randomCauchy(a2, b) { a2 = a2 == null ? 0 : +a2; b = b == null ? 1 : +b; return function() { return a2 + b * Math.tan(Math.PI * source()); }; } randomCauchy.source = sourceRandomCauchy; return randomCauchy; }(defaultSource_default); // node_modules/d3-random/src/logistic.js var logistic_default = function sourceRandomLogistic(source) { function randomLogistic(a2, b) { a2 = a2 == null ? 0 : +a2; b = b == null ? 1 : +b; return function() { var u4 = source(); return a2 + b * Math.log(u4 / (1 - u4)); }; } randomLogistic.source = sourceRandomLogistic; return randomLogistic; }(defaultSource_default); // node_modules/d3-random/src/poisson.js var poisson_default = function sourceRandomPoisson(source) { var G = gamma_default.source(source), B2 = binomial_default.source(source); function randomPoisson(lambda) { return function() { var acc = 0, l = lambda; while (l > 16) { var n = Math.floor(0.875 * l), t = G(n)(); if (t > l) return acc + B2(n - 1, l / t)(); acc += n; l -= t; } for (var s2 = -Math.log1p(-source()), k2 = 0; s2 <= l; ++k2) s2 -= Math.log1p(-source()); return acc + k2; }; } randomPoisson.source = sourceRandomPoisson; return randomPoisson; }(defaultSource_default); // node_modules/d3-random/src/lcg.js var eps = 1 / 4294967296; // node_modules/khroma/dist/utils/channel.js var Channel = { /* CLAMP */ 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: (r) => r >= 255 ? 255 : r < 0 ? 0 : r, g: (g) => g >= 255 ? 255 : g < 0 ? 0 : g, b: (b) => b >= 255 ? 255 : b < 0 ? 0 : b, h: (h) => h % 360, s: (s2) => s2 >= 100 ? 100 : s2 < 0 ? 0 : s2, l: (l) => l >= 100 ? 100 : l < 0 ? 0 : l, a: (a2) => a2 >= 1 ? 1 : a2 < 0 ? 0 : a2 }, /* CONVERSION */ //SOURCE: https://planetcalc.com/7779 toLinear: (c3) => { const n = c3 / 255; return c3 > 0.03928 ? Math.pow((n + 0.055) / 1.055, 2.4) : n / 12.92; }, //SOURCE: https://gist.github.com/mjackson/5311256 hue2rgb: (p, q, t) => { if (t < 0) t += 1; if (t > 1) t -= 1; if (t < 1 / 6) return p + (q - p) * 6 * t; if (t < 1 / 2) return q; if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; return p; }, hsl2rgb: ({ h, s: s2, l }, channel2) => { if (!s2) return l * 2.55; h /= 360; s2 /= 100; l /= 100; const q = l < 0.5 ? l * (1 + s2) : l + s2 - l * s2; const p = 2 * l - q; switch (channel2) { case "r": return Channel.hue2rgb(p, q, h + 1 / 3) * 255; case "g": return Channel.hue2rgb(p, q, h) * 255; case "b": return Channel.hue2rgb(p, q, h - 1 / 3) * 255; } }, rgb2hsl: ({ r, g, b }, channel2) => { r /= 255; g /= 255; b /= 255; const max5 = Math.max(r, g, b); const min4 = Math.min(r, g, b); const l = (max5 + min4) / 2; if (channel2 === "l") return l * 100; if (max5 === min4) return 0; const d = max5 - min4; const s2 = l > 0.5 ? d / (2 - max5 - min4) : d / (max5 + min4); if (channel2 === "s") return s2 * 100; switch (max5) { case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60; case g: return ((b - r) / d + 2) * 60; case b: return ((r - g) / d + 4) * 60; default: return -1; } } }; var channel_default = Channel; // node_modules/khroma/dist/utils/lang.js var Lang = { /* API */ clamp: (number5, lower, upper) => { if (lower > upper) return Math.min(lower, Math.max(upper, number5)); return Math.min(upper, Math.max(lower, number5)); }, round: (number5) => { return Math.round(number5 * 1e10) / 1e10; } }; var lang_default = Lang; // node_modules/khroma/dist/utils/unit.js var Unit = { /* API */ dec2hex: (dec) => { const hex = Math.round(dec).toString(16); return hex.length > 1 ? hex : `0${hex}`; } }; var unit_default = Unit; // node_modules/khroma/dist/utils/index.js var Utils = { channel: channel_default, lang: lang_default, unit: unit_default }; var utils_default = Utils; // node_modules/khroma/dist/constants.js var DEC2HEX = {}; for (let i = 0; i <= 255; i++) DEC2HEX[i] = utils_default.unit.dec2hex(i); var TYPE = { ALL: 0, RGB: 1, HSL: 2 }; // node_modules/khroma/dist/channels/type.js var Type = class { constructor() { this.type = TYPE.ALL; } /* API */ get() { return this.type; } set(type3) { if (this.type && this.type !== type3) throw new Error("Cannot change both RGB and HSL channels at the same time"); this.type = type3; } reset() { this.type = TYPE.ALL; } is(type3) { return this.type === type3; } }; var type_default = Type; // node_modules/khroma/dist/channels/index.js var Channels = class { /* CONSTRUCTOR */ constructor(data, color) { this.color = color; this.changed = false; this.data = data; this.type = new type_default(); } /* API */ set(data, color) { this.color = color; this.changed = false; this.data = data; this.type.type = TYPE.ALL; return this; } /* HELPERS */ _ensureHSL() { const data = this.data; const { h, s: s2, l } = data; if (h === void 0) data.h = utils_default.channel.rgb2hsl(data, "h"); if (s2 === void 0) data.s = utils_default.channel.rgb2hsl(data, "s"); if (l === void 0) data.l = utils_default.channel.rgb2hsl(data, "l"); } _ensureRGB() { const data = this.data; const { r, g, b } = data; if (r === void 0) data.r = utils_default.channel.hsl2rgb(data, "r"); if (g === void 0) data.g = utils_default.channel.hsl2rgb(data, "g"); if (b === void 0) data.b = utils_default.channel.hsl2rgb(data, "b"); } /* GETTERS */ get r() { const data = this.data; const r = data.r; if (!this.type.is(TYPE.HSL) && r !== void 0) return r; this._ensureHSL(); return utils_default.channel.hsl2rgb(data, "r"); } get g() { const data = this.data; const g = data.g; if (!this.type.is(TYPE.HSL) && g !== void 0) return g; this._ensureHSL(); return utils_default.channel.hsl2rgb(data, "g"); } get b() { const data = this.data; const b = data.b; if (!this.type.is(TYPE.HSL) && b !== void 0) return b; this._ensureHSL(); return utils_default.channel.hsl2rgb(data, "b"); } get h() { const data = this.data; const h = data.h; if (!this.type.is(TYPE.RGB) && h !== void 0) return h; this._ensureRGB(); return utils_default.channel.rgb2hsl(data, "h"); } get s() { const data = this.data; const s2 = data.s; if (!this.type.is(TYPE.RGB) && s2 !== void 0) return s2; this._ensureRGB(); return utils_default.channel.rgb2hsl(data, "s"); } get l() { const data = this.data; const l = data.l; if (!this.type.is(TYPE.RGB) && l !== void 0) return l; this._ensureRGB(); return utils_default.channel.rgb2hsl(data, "l"); } get a() { return this.data.a; } /* SETTERS */ set r(r) { this.type.set(TYPE.RGB); this.changed = true; this.data.r = r; } set g(g) { this.type.set(TYPE.RGB); this.changed = true; this.data.g = g; } set b(b) { this.type.set(TYPE.RGB); this.changed = true; this.data.b = b; } set h(h) { this.type.set(TYPE.HSL); this.changed = true; this.data.h = h; } set s(s2) { this.type.set(TYPE.HSL); this.changed = true; this.data.s = s2; } set l(l) { this.type.set(TYPE.HSL); this.changed = true; this.data.l = l; } set a(a2) { this.changed = true; this.data.a = a2; } }; var channels_default = Channels; // node_modules/khroma/dist/channels/reusable.js var channels = new channels_default({ r: 0, g: 0, b: 0, a: 0 }, "transparent"); var reusable_default = channels; // node_modules/khroma/dist/color/hex.js var Hex = { /* VARIABLES */ re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i, /* API */ parse: (color) => { if (color.charCodeAt(0) !== 35) return; const match2 = color.match(Hex.re); if (!match2) return; const hex = match2[1]; const dec = parseInt(hex, 16); const length2 = hex.length; const hasAlpha = length2 % 4 === 0; const isFullLength = length2 > 4; const multiplier = isFullLength ? 1 : 17; const bits = isFullLength ? 8 : 4; const bitsOffset = hasAlpha ? 0 : -1; const mask = isFullLength ? 255 : 15; return reusable_default.set({ r: (dec >> bits * (bitsOffset + 3) & mask) * multiplier, g: (dec >> bits * (bitsOffset + 2) & mask) * multiplier, b: (dec >> bits * (bitsOffset + 1) & mask) * multiplier, a: hasAlpha ? (dec & mask) * multiplier / 255 : 1 }, color); }, stringify: (channels2) => { const { r, g, b, a: a2 } = channels2; if (a2 < 1) { return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a2 * 255)]}`; } else { return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`; } } }; var hex_default = Hex; // node_modules/khroma/dist/color/hsl.js var HSL = { /* VARIABLES */ 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, /* HELPERS */ _hue2deg: (hue) => { const match2 = hue.match(HSL.hueRe); if (match2) { const [, number5, unit2] = match2; switch (unit2) { case "grad": return utils_default.channel.clamp.h(parseFloat(number5) * 0.9); case "rad": return utils_default.channel.clamp.h(parseFloat(number5) * 180 / Math.PI); case "turn": return utils_default.channel.clamp.h(parseFloat(number5) * 360); } } return utils_default.channel.clamp.h(parseFloat(hue)); }, /* API */ parse: (color) => { const charCode = color.charCodeAt(0); if (charCode !== 104 && charCode !== 72) return; const match2 = color.match(HSL.re); if (!match2) return; const [, h, s2, l, a2, isAlphaPercentage] = match2; return reusable_default.set({ h: HSL._hue2deg(h), s: utils_default.channel.clamp.s(parseFloat(s2)), l: utils_default.channel.clamp.l(parseFloat(l)), a: a2 ? utils_default.channel.clamp.a(isAlphaPercentage ? parseFloat(a2) / 100 : parseFloat(a2)) : 1 }, color); }, stringify: (channels2) => { const { h, s: s2, l, a: a2 } = channels2; if (a2 < 1) { return `hsla(${utils_default.lang.round(h)}, ${utils_default.lang.round(s2)}%, ${utils_default.lang.round(l)}%, ${a2})`; } else { return `hsl(${utils_default.lang.round(h)}, ${utils_default.lang.round(s2)}%, ${utils_default.lang.round(l)}%)`; } } }; var hsl_default = HSL; // node_modules/khroma/dist/color/keyword.js var Keyword = { /* VARIABLES */ 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" }, /* API */ parse: (color) => { color = color.toLowerCase(); const hex = Keyword.colors[color]; if (!hex) return; return hex_default.parse(hex); }, stringify: (channels2) => { const hex = hex_default.stringify(channels2); for (const name in Keyword.colors) { if (Keyword.colors[name] === hex) return name; } return; } }; var keyword_default = Keyword; // node_modules/khroma/dist/color/rgb.js var RGB = { /* VARIABLES */ 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, /* API */ parse: (color) => { const charCode = color.charCodeAt(0); if (charCode !== 114 && charCode !== 82) return; const match2 = color.match(RGB.re); if (!match2) return; const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a2, isAlphaPercentage] = match2; return reusable_default.set({ r: utils_default.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)), g: utils_default.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)), b: utils_default.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)), a: a2 ? utils_default.channel.clamp.a(isAlphaPercentage ? parseFloat(a2) / 100 : parseFloat(a2)) : 1 }, color); }, stringify: (channels2) => { const { r, g, b, a: a2 } = channels2; if (a2 < 1) { return `rgba(${utils_default.lang.round(r)}, ${utils_default.lang.round(g)}, ${utils_default.lang.round(b)}, ${utils_default.lang.round(a2)})`; } else { return `rgb(${utils_default.lang.round(r)}, ${utils_default.lang.round(g)}, ${utils_default.lang.round(b)})`; } } }; var rgb_default = RGB; // node_modules/khroma/dist/color/index.js var Color = { /* VARIABLES */ format: { keyword: keyword_default, hex: hex_default, rgb: rgb_default, rgba: rgb_default, hsl: hsl_default, hsla: hsl_default }, /* API */ parse: (color) => { if (typeof color !== "string") return color; const channels2 = hex_default.parse(color) || rgb_default.parse(color) || hsl_default.parse(color) || keyword_default.parse(color); if (channels2) return channels2; throw new Error(`Unsupported color format: "${color}"`); }, stringify: (channels2) => { if (!channels2.changed && channels2.color) return channels2.color; if (channels2.type.is(TYPE.HSL) || channels2.data.r === void 0) { return hsl_default.stringify(channels2); } else if (channels2.a < 1 || !Number.isInteger(channels2.r) || !Number.isInteger(channels2.g) || !Number.isInteger(channels2.b)) { return rgb_default.stringify(channels2); } else { return hex_default.stringify(channels2); } } }; var color_default = Color; // node_modules/khroma/dist/methods/change.js var change = (color, channels2) => { const ch = color_default.parse(color); for (const c3 in channels2) { ch[c3] = utils_default.channel.clamp[c3](channels2[c3]); } return color_default.stringify(ch); }; var change_default = change; // node_modules/khroma/dist/methods/rgba.js var rgba = (r, g, b = 0, a2 = 1) => { if (typeof r !== "number") return change_default(r, { a: g }); const channels2 = reusable_default.set({ r: utils_default.channel.clamp.r(r), g: utils_default.channel.clamp.g(g), b: utils_default.channel.clamp.b(b), a: utils_default.channel.clamp.a(a2) }); return color_default.stringify(channels2); }; var rgba_default = rgba; // node_modules/khroma/dist/methods/channel.js var channel = (color, channel2) => { return utils_default.lang.round(color_default.parse(color)[channel2]); }; var channel_default2 = channel; // node_modules/khroma/dist/methods/luminance.js var luminance = (color) => { const { r, g, b } = color_default.parse(color); const luminance2 = 0.2126 * utils_default.channel.toLinear(r) + 0.7152 * utils_default.channel.toLinear(g) + 0.0722 * utils_default.channel.toLinear(b); return utils_default.lang.round(luminance2); }; var luminance_default = luminance; // node_modules/khroma/dist/methods/is_light.js var isLight = (color) => { return luminance_default(color) >= 0.5; }; var is_light_default = isLight; // node_modules/khroma/dist/methods/is_dark.js var isDark = (color) => { return !is_light_default(color); }; var is_dark_default = isDark; // node_modules/khroma/dist/methods/adjust_channel.js var adjustChannel = (color, channel2, amount) => { const channels2 = color_default.parse(color); const amountCurrent = channels2[channel2]; const amountNext = utils_default.channel.clamp[channel2](amountCurrent + amount); if (amountCurrent !== amountNext) channels2[channel2] = amountNext; return color_default.stringify(channels2); }; var adjust_channel_default = adjustChannel; // node_modules/khroma/dist/methods/lighten.js var lighten = (color, amount) => { return adjust_channel_default(color, "l", amount); }; var lighten_default = lighten; // node_modules/khroma/dist/methods/darken.js var darken = (color, amount) => { return adjust_channel_default(color, "l", -amount); }; var darken_default = darken; // node_modules/khroma/dist/methods/adjust.js var adjust = (color, channels2) => { const ch = color_default.parse(color); const changes = {}; for (const c3 in channels2) { if (!channels2[c3]) continue; changes[c3] = ch[c3] + channels2[c3]; } return change_default(color, changes); }; var adjust_default = adjust; // node_modules/khroma/dist/methods/mix.js var mix = (color1, color2, weight = 50) => { const { r: r1, g: g1, b: b1, a: a1 } = color_default.parse(color1); const { r: r2, g: g2, b: b2, a: a2 } = color_default.parse(color2); const weightScale = weight / 100; const weightNormalized = weightScale * 2 - 1; const alphaDelta = a1 - a2; const weight1combined = weightNormalized * alphaDelta === -1 ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta); const weight1 = (weight1combined + 1) / 2; const weight2 = 1 - weight1; const r = r1 * weight1 + r2 * weight2; const g = g1 * weight1 + g2 * weight2; const b = b1 * weight1 + b2 * weight2; const a3 = a1 * weightScale + a2 * (1 - weightScale); return rgba_default(r, g, b, a3); }; var mix_default = mix; // node_modules/khroma/dist/methods/invert.js var invert = (color, weight = 100) => { const inverse = color_default.parse(color); inverse.r = 255 - inverse.r; inverse.g = 255 - inverse.g; inverse.b = 255 - inverse.b; return mix_default(inverse, color, weight); }; var invert_default = invert; // node_modules/lodash-es/_freeGlobal.js var freeGlobal = typeof global == "object" && global && global.Object === Object && global; var freeGlobal_default = freeGlobal; // node_modules/lodash-es/_root.js var freeSelf = typeof self == "object" && self && self.Object === Object && self; var root = freeGlobal_default || freeSelf || Function("return this")(); var root_default2 = root; // node_modules/lodash-es/_Symbol.js var Symbol3 = root_default2.Symbol; var Symbol_default = Symbol3; // node_modules/lodash-es/_getRawTag.js var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; var nativeObjectToString = objectProto.toString; var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0; function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = void 0; var unmasked = true; } catch (e) { } var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } var getRawTag_default = getRawTag; // node_modules/lodash-es/_objectToString.js var objectProto2 = Object.prototype; var nativeObjectToString2 = objectProto2.toString; function objectToString(value) { return nativeObjectToString2.call(value); } var objectToString_default = objectToString; // node_modules/lodash-es/_baseGetTag.js var nullTag = "[object Null]"; var undefinedTag = "[object Undefined]"; var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0; function baseGetTag(value) { if (value == null) { return value === void 0 ? undefinedTag : nullTag; } return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value); } var baseGetTag_default = baseGetTag; // node_modules/lodash-es/isObject.js function isObject(value) { var type3 = typeof value; return value != null && (type3 == "object" || type3 == "function"); } var isObject_default = isObject; // node_modules/lodash-es/isFunction.js var asyncTag = "[object AsyncFunction]"; var funcTag = "[object Function]"; var genTag = "[object GeneratorFunction]"; var proxyTag = "[object Proxy]"; function isFunction(value) { if (!isObject_default(value)) { return false; } var tag = baseGetTag_default(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } var isFunction_default = isFunction; // node_modules/lodash-es/_coreJsData.js var coreJsData = root_default2["__core-js_shared__"]; var coreJsData_default = coreJsData; // node_modules/lodash-es/_isMasked.js var maskSrcKey = function() { var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || ""); return uid ? "Symbol(src)_1." + uid : ""; }(); function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } var isMasked_default = isMasked; // node_modules/lodash-es/_toSource.js var funcProto = Function.prototype; var funcToString = funcProto.toString; function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) { } try { return func + ""; } catch (e) { } } return ""; } var toSource_default = toSource; // node_modules/lodash-es/_baseIsNative.js var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; var reIsHostCtor = /^\[object .+?Constructor\]$/; var funcProto2 = Function.prototype; var objectProto3 = Object.prototype; var funcToString2 = funcProto2.toString; var hasOwnProperty2 = objectProto3.hasOwnProperty; var reIsNative = RegExp( "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function baseIsNative(value) { if (!isObject_default(value) || isMasked_default(value)) { return false; } var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource_default(value)); } var baseIsNative_default = baseIsNative; // node_modules/lodash-es/_getValue.js function getValue(object, key) { return object == null ? void 0 : object[key]; } var getValue_default = getValue; // node_modules/lodash-es/_getNative.js function getNative(object, key) { var value = getValue_default(object, key); return baseIsNative_default(value) ? value : void 0; } var getNative_default = getNative; // node_modules/lodash-es/_nativeCreate.js var nativeCreate = getNative_default(Object, "create"); var nativeCreate_default = nativeCreate; // node_modules/lodash-es/_hashClear.js function hashClear() { this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {}; this.size = 0; } var hashClear_default = hashClear; // node_modules/lodash-es/_hashDelete.js function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } var hashDelete_default = hashDelete; // node_modules/lodash-es/_hashGet.js var HASH_UNDEFINED = "__lodash_hash_undefined__"; var objectProto4 = Object.prototype; var hasOwnProperty3 = objectProto4.hasOwnProperty; function hashGet(key) { var data = this.__data__; if (nativeCreate_default) { var result = data[key]; return result === HASH_UNDEFINED ? void 0 : result; } return hasOwnProperty3.call(data, key) ? data[key] : void 0; } var hashGet_default = hashGet; // node_modules/lodash-es/_hashHas.js var objectProto5 = Object.prototype; var hasOwnProperty4 = objectProto5.hasOwnProperty; function hashHas(key) { var data = this.__data__; return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty4.call(data, key); } var hashHas_default = hashHas; // node_modules/lodash-es/_hashSet.js var HASH_UNDEFINED2 = "__lodash_hash_undefined__"; function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value; return this; } var hashSet_default = hashSet; // node_modules/lodash-es/_Hash.js function Hash(entries) { var index2 = -1, length2 = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length2) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } Hash.prototype.clear = hashClear_default; Hash.prototype["delete"] = hashDelete_default; Hash.prototype.get = hashGet_default; Hash.prototype.has = hashHas_default; Hash.prototype.set = hashSet_default; var Hash_default = Hash; // node_modules/lodash-es/_listCacheClear.js function listCacheClear() { this.__data__ = []; this.size = 0; } var listCacheClear_default = listCacheClear; // node_modules/lodash-es/eq.js function eq(value, other) { return value === other || value !== value && other !== other; } var eq_default = eq; // node_modules/lodash-es/_assocIndexOf.js function assocIndexOf(array3, key) { var length2 = array3.length; while (length2--) { if (eq_default(array3[length2][0], key)) { return length2; } } return -1; } var assocIndexOf_default = assocIndexOf; // node_modules/lodash-es/_listCacheDelete.js var arrayProto = Array.prototype; var splice = arrayProto.splice; function listCacheDelete(key) { var data = this.__data__, index2 = assocIndexOf_default(data, key); if (index2 < 0) { return false; } var lastIndex = data.length - 1; if (index2 == lastIndex) { data.pop(); } else { splice.call(data, index2, 1); } --this.size; return true; } var listCacheDelete_default = listCacheDelete; // node_modules/lodash-es/_listCacheGet.js function listCacheGet(key) { var data = this.__data__, index2 = assocIndexOf_default(data, key); return index2 < 0 ? void 0 : data[index2][1]; } var listCacheGet_default = listCacheGet; // node_modules/lodash-es/_listCacheHas.js function listCacheHas(key) { return assocIndexOf_default(this.__data__, key) > -1; } var listCacheHas_default = listCacheHas; // node_modules/lodash-es/_listCacheSet.js function listCacheSet(key, value) { var data = this.__data__, index2 = assocIndexOf_default(data, key); if (index2 < 0) { ++this.size; data.push([key, value]); } else { data[index2][1] = value; } return this; } var listCacheSet_default = listCacheSet; // node_modules/lodash-es/_ListCache.js function ListCache(entries) { var index2 = -1, length2 = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length2) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } ListCache.prototype.clear = listCacheClear_default; ListCache.prototype["delete"] = listCacheDelete_default; ListCache.prototype.get = listCacheGet_default; ListCache.prototype.has = listCacheHas_default; ListCache.prototype.set = listCacheSet_default; var ListCache_default = ListCache; // node_modules/lodash-es/_Map.js var Map2 = getNative_default(root_default2, "Map"); var Map_default = Map2; // node_modules/lodash-es/_mapCacheClear.js function mapCacheClear() { this.size = 0; this.__data__ = { "hash": new Hash_default(), "map": new (Map_default || ListCache_default)(), "string": new Hash_default() }; } var mapCacheClear_default = mapCacheClear; // node_modules/lodash-es/_isKeyable.js function isKeyable(value) { var type3 = typeof value; return type3 == "string" || type3 == "number" || type3 == "symbol" || type3 == "boolean" ? value !== "__proto__" : value === null; } var isKeyable_default = isKeyable; // node_modules/lodash-es/_getMapData.js function getMapData(map5, key) { var data = map5.__data__; return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; } var getMapData_default = getMapData; // node_modules/lodash-es/_mapCacheDelete.js function mapCacheDelete(key) { var result = getMapData_default(this, key)["delete"](key); this.size -= result ? 1 : 0; return result; } var mapCacheDelete_default = mapCacheDelete; // node_modules/lodash-es/_mapCacheGet.js function mapCacheGet(key) { return getMapData_default(this, key).get(key); } var mapCacheGet_default = mapCacheGet; // node_modules/lodash-es/_mapCacheHas.js function mapCacheHas(key) { return getMapData_default(this, key).has(key); } var mapCacheHas_default = mapCacheHas; // node_modules/lodash-es/_mapCacheSet.js function mapCacheSet(key, value) { var data = getMapData_default(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } var mapCacheSet_default = mapCacheSet; // node_modules/lodash-es/_MapCache.js function MapCache(entries) { var index2 = -1, length2 = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length2) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } MapCache.prototype.clear = mapCacheClear_default; MapCache.prototype["delete"] = mapCacheDelete_default; MapCache.prototype.get = mapCacheGet_default; MapCache.prototype.has = mapCacheHas_default; MapCache.prototype.set = mapCacheSet_default; var MapCache_default = MapCache; // node_modules/lodash-es/memoize.js var FUNC_ERROR_TEXT = "Expected a function"; function memoize(func, resolver) { if (typeof func != "function" || resolver != null && typeof resolver != "function") { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache_default)(); return memoized; } memoize.Cache = MapCache_default; var memoize_default = memoize; // node_modules/lodash-es/_stackClear.js function stackClear() { this.__data__ = new ListCache_default(); this.size = 0; } var stackClear_default = stackClear; // node_modules/lodash-es/_stackDelete.js function stackDelete(key) { var data = this.__data__, result = data["delete"](key); this.size = data.size; return result; } var stackDelete_default = stackDelete; // node_modules/lodash-es/_stackGet.js function stackGet(key) { return this.__data__.get(key); } var stackGet_default = stackGet; // node_modules/lodash-es/_stackHas.js function stackHas(key) { return this.__data__.has(key); } var stackHas_default = stackHas; // node_modules/lodash-es/_stackSet.js var LARGE_ARRAY_SIZE = 200; function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache_default) { var pairs3 = data.__data__; if (!Map_default || pairs3.length < LARGE_ARRAY_SIZE - 1) { pairs3.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache_default(pairs3); } data.set(key, value); this.size = data.size; return this; } var stackSet_default = stackSet; // node_modules/lodash-es/_Stack.js function Stack(entries) { var data = this.__data__ = new ListCache_default(entries); this.size = data.size; } Stack.prototype.clear = stackClear_default; Stack.prototype["delete"] = stackDelete_default; Stack.prototype.get = stackGet_default; Stack.prototype.has = stackHas_default; Stack.prototype.set = stackSet_default; var Stack_default = Stack; // node_modules/lodash-es/_defineProperty.js var defineProperty = function() { try { var func = getNative_default(Object, "defineProperty"); func({}, "", {}); return func; } catch (e) { } }(); var defineProperty_default = defineProperty; // node_modules/lodash-es/_baseAssignValue.js function baseAssignValue(object, key, value) { if (key == "__proto__" && defineProperty_default) { defineProperty_default(object, key, { "configurable": true, "enumerable": true, "value": value, "writable": true }); } else { object[key] = value; } } var baseAssignValue_default = baseAssignValue; // node_modules/lodash-es/_assignMergeValue.js function assignMergeValue(object, key, value) { if (value !== void 0 && !eq_default(object[key], value) || value === void 0 && !(key in object)) { baseAssignValue_default(object, key, value); } } var assignMergeValue_default = assignMergeValue; // node_modules/lodash-es/_createBaseFor.js function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index2 = -1, iterable = Object(object), props = keysFunc(object), length2 = props.length; while (length2--) { var key = props[fromRight ? length2 : ++index2]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } var createBaseFor_default = createBaseFor; // node_modules/lodash-es/_baseFor.js var baseFor = createBaseFor_default(); var baseFor_default = baseFor; // node_modules/lodash-es/_cloneBuffer.js var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports; var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var Buffer = moduleExports ? root_default2.Buffer : void 0; var allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0; function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length2 = buffer.length, result = allocUnsafe ? allocUnsafe(length2) : new buffer.constructor(length2); buffer.copy(result); return result; } var cloneBuffer_default = cloneBuffer; // node_modules/lodash-es/_Uint8Array.js var Uint8Array2 = root_default2.Uint8Array; var Uint8Array_default = Uint8Array2; // node_modules/lodash-es/_cloneArrayBuffer.js function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array_default(result).set(new Uint8Array_default(arrayBuffer)); return result; } var cloneArrayBuffer_default = cloneArrayBuffer; // node_modules/lodash-es/_cloneTypedArray.js function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } var cloneTypedArray_default = cloneTypedArray; // node_modules/lodash-es/_copyArray.js function copyArray(source, array3) { var index2 = -1, length2 = source.length; array3 || (array3 = Array(length2)); while (++index2 < length2) { array3[index2] = source[index2]; } return array3; } var copyArray_default = copyArray; // node_modules/lodash-es/_baseCreate.js var objectCreate = Object.create; var baseCreate = /* @__PURE__ */ function() { function object() { } return function(proto) { if (!isObject_default(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object(); object.prototype = void 0; return result; }; }(); var baseCreate_default = baseCreate; // node_modules/lodash-es/_overArg.js function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } var overArg_default = overArg; // node_modules/lodash-es/_getPrototype.js var getPrototype = overArg_default(Object.getPrototypeOf, Object); var getPrototype_default = getPrototype; // node_modules/lodash-es/_isPrototype.js var objectProto6 = Object.prototype; function isPrototype(value) { var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto6; return value === proto; } var isPrototype_default = isPrototype; // node_modules/lodash-es/_initCloneObject.js function initCloneObject(object) { return typeof object.constructor == "function" && !isPrototype_default(object) ? baseCreate_default(getPrototype_default(object)) : {}; } var initCloneObject_default = initCloneObject; // node_modules/lodash-es/isObjectLike.js function isObjectLike(value) { return value != null && typeof value == "object"; } var isObjectLike_default = isObjectLike; // node_modules/lodash-es/_baseIsArguments.js var argsTag = "[object Arguments]"; function baseIsArguments(value) { return isObjectLike_default(value) && baseGetTag_default(value) == argsTag; } var baseIsArguments_default = baseIsArguments; // node_modules/lodash-es/isArguments.js var objectProto7 = Object.prototype; var hasOwnProperty5 = objectProto7.hasOwnProperty; var propertyIsEnumerable = objectProto7.propertyIsEnumerable; var isArguments = baseIsArguments_default(/* @__PURE__ */ function() { return arguments; }()) ? baseIsArguments_default : function(value) { return isObjectLike_default(value) && hasOwnProperty5.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); }; var isArguments_default = isArguments; // node_modules/lodash-es/isArray.js var isArray = Array.isArray; var isArray_default = isArray; // node_modules/lodash-es/isLength.js var MAX_SAFE_INTEGER = 9007199254740991; function isLength(value) { return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } var isLength_default = isLength; // node_modules/lodash-es/isArrayLike.js function isArrayLike(value) { return value != null && isLength_default(value.length) && !isFunction_default(value); } var isArrayLike_default = isArrayLike; // node_modules/lodash-es/isArrayLikeObject.js function isArrayLikeObject(value) { return isObjectLike_default(value) && isArrayLike_default(value); } var isArrayLikeObject_default = isArrayLikeObject; // node_modules/lodash-es/stubFalse.js function stubFalse() { return false; } var stubFalse_default = stubFalse; // node_modules/lodash-es/isBuffer.js var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports; var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module; var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2; var Buffer2 = moduleExports2 ? root_default2.Buffer : void 0; var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; var isBuffer = nativeIsBuffer || stubFalse_default; var isBuffer_default = isBuffer; // node_modules/lodash-es/isPlainObject.js var objectTag = "[object Object]"; var funcProto3 = Function.prototype; var objectProto8 = Object.prototype; var funcToString3 = funcProto3.toString; var hasOwnProperty6 = objectProto8.hasOwnProperty; var objectCtorString = funcToString3.call(Object); function isPlainObject(value) { if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag) { return false; } var proto = getPrototype_default(value); if (proto === null) { return true; } var Ctor = hasOwnProperty6.call(proto, "constructor") && proto.constructor; return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString; } var isPlainObject_default = isPlainObject; // node_modules/lodash-es/_baseIsTypedArray.js var argsTag2 = "[object Arguments]"; var arrayTag = "[object Array]"; var boolTag = "[object Boolean]"; var dateTag = "[object Date]"; var errorTag = "[object Error]"; var funcTag2 = "[object Function]"; var mapTag = "[object Map]"; var numberTag = "[object Number]"; var objectTag2 = "[object Object]"; var regexpTag = "[object RegExp]"; var setTag = "[object Set]"; var stringTag = "[object String]"; var weakMapTag = "[object WeakMap]"; var arrayBufferTag = "[object ArrayBuffer]"; var dataViewTag = "[object DataView]"; var float32Tag = "[object Float32Array]"; var float64Tag = "[object Float64Array]"; var int8Tag = "[object Int8Array]"; var int16Tag = "[object Int16Array]"; var int32Tag = "[object Int32Array]"; var uint8Tag = "[object Uint8Array]"; var uint8ClampedTag = "[object Uint8ClampedArray]"; var uint16Tag = "[object Uint16Array]"; var uint32Tag = "[object Uint32Array]"; var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag2] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; function baseIsTypedArray(value) { return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)]; } var baseIsTypedArray_default = baseIsTypedArray; // node_modules/lodash-es/_baseUnary.js function baseUnary(func) { return function(value) { return func(value); }; } var baseUnary_default = baseUnary; // node_modules/lodash-es/_nodeUtil.js var freeExports3 = typeof exports == "object" && exports && !exports.nodeType && exports; var freeModule3 = freeExports3 && typeof module == "object" && module && !module.nodeType && module; var moduleExports3 = freeModule3 && freeModule3.exports === freeExports3; var freeProcess = moduleExports3 && freeGlobal_default.process; var nodeUtil = function() { try { var types = freeModule3 && freeModule3.require && freeModule3.require("util").types; if (types) { return types; } return freeProcess && freeProcess.binding && freeProcess.binding("util"); } catch (e) { } }(); var nodeUtil_default = nodeUtil; // node_modules/lodash-es/isTypedArray.js var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray; var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default; var isTypedArray_default = isTypedArray; // node_modules/lodash-es/_safeGet.js function safeGet(object, key) { if (key === "constructor" && typeof object[key] === "function") { return; } if (key == "__proto__") { return; } return object[key]; } var safeGet_default = safeGet; // node_modules/lodash-es/_assignValue.js var objectProto9 = Object.prototype; var hasOwnProperty7 = objectProto9.hasOwnProperty; function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty7.call(object, key) && eq_default(objValue, value)) || value === void 0 && !(key in object)) { baseAssignValue_default(object, key, value); } } var assignValue_default = assignValue; // node_modules/lodash-es/_copyObject.js function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index2 = -1, length2 = props.length; while (++index2 < length2) { var key = props[index2]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; if (newValue === void 0) { newValue = source[key]; } if (isNew) { baseAssignValue_default(object, key, newValue); } else { assignValue_default(object, key, newValue); } } return object; } var copyObject_default = copyObject; // node_modules/lodash-es/_baseTimes.js function baseTimes(n, iteratee) { var index2 = -1, result = Array(n); while (++index2 < n) { result[index2] = iteratee(index2); } return result; } var baseTimes_default = baseTimes; // node_modules/lodash-es/_isIndex.js var MAX_SAFE_INTEGER2 = 9007199254740991; var reIsUint = /^(?:0|[1-9]\d*)$/; function isIndex(value, length2) { var type3 = typeof value; length2 = length2 == null ? MAX_SAFE_INTEGER2 : length2; return !!length2 && (type3 == "number" || type3 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length2); } var isIndex_default = isIndex; // node_modules/lodash-es/_arrayLikeKeys.js var objectProto10 = Object.prototype; var hasOwnProperty8 = objectProto10.hasOwnProperty; function arrayLikeKeys(value, inherited) { var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes_default(value.length, String) : [], length2 = result.length; for (var key in value) { if ((inherited || hasOwnProperty8.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. isIndex_default(key, length2)))) { result.push(key); } } return result; } var arrayLikeKeys_default = arrayLikeKeys; // node_modules/lodash-es/_nativeKeysIn.js function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } var nativeKeysIn_default = nativeKeysIn; // node_modules/lodash-es/_baseKeysIn.js var objectProto11 = Object.prototype; var hasOwnProperty9 = objectProto11.hasOwnProperty; function baseKeysIn(object) { if (!isObject_default(object)) { return nativeKeysIn_default(object); } var isProto = isPrototype_default(object), result = []; for (var key in object) { if (!(key == "constructor" && (isProto || !hasOwnProperty9.call(object, key)))) { result.push(key); } } return result; } var baseKeysIn_default = baseKeysIn; // node_modules/lodash-es/keysIn.js function keysIn(object) { return isArrayLike_default(object) ? arrayLikeKeys_default(object, true) : baseKeysIn_default(object); } var keysIn_default = keysIn; // node_modules/lodash-es/toPlainObject.js function toPlainObject(value) { return copyObject_default(value, keysIn_default(value)); } var toPlainObject_default = toPlainObject; // node_modules/lodash-es/_baseMergeDeep.js function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet_default(object, key), srcValue = safeGet_default(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue_default(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0; var isCommon = newValue === void 0; if (isCommon) { var isArr = isArray_default(srcValue), isBuff = !isArr && isBuffer_default(srcValue), isTyped = !isArr && !isBuff && isTypedArray_default(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray_default(objValue)) { newValue = objValue; } else if (isArrayLikeObject_default(objValue)) { newValue = copyArray_default(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer_default(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray_default(srcValue, true); } else { newValue = []; } } else if (isPlainObject_default(srcValue) || isArguments_default(srcValue)) { newValue = objValue; if (isArguments_default(objValue)) { newValue = toPlainObject_default(objValue); } else if (!isObject_default(objValue) || isFunction_default(objValue)) { newValue = initCloneObject_default(srcValue); } } else { isCommon = false; } } if (isCommon) { stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack["delete"](srcValue); } assignMergeValue_default(object, key, newValue); } var baseMergeDeep_default = baseMergeDeep; // node_modules/lodash-es/_baseMerge.js function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor_default(source, function(srcValue, key) { stack || (stack = new Stack_default()); if (isObject_default(srcValue)) { baseMergeDeep_default(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet_default(object, key), srcValue, key + "", object, source, stack) : void 0; if (newValue === void 0) { newValue = srcValue; } assignMergeValue_default(object, key, newValue); } }, keysIn_default); } var baseMerge_default = baseMerge; // node_modules/lodash-es/identity.js function identity4(value) { return value; } var identity_default6 = identity4; // node_modules/lodash-es/_apply.js function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } var apply_default = apply; // node_modules/lodash-es/_overRest.js var nativeMax = Math.max; function overRest(func, start, transform) { start = nativeMax(start === void 0 ? func.length - 1 : start, 0); return function() { var args = arguments, index2 = -1, length2 = nativeMax(args.length - start, 0), array3 = Array(length2); while (++index2 < length2) { array3[index2] = args[start + index2]; } index2 = -1; var otherArgs = Array(start + 1); while (++index2 < start) { otherArgs[index2] = args[index2]; } otherArgs[start] = transform(array3); return apply_default(func, this, otherArgs); }; } var overRest_default = overRest; // node_modules/lodash-es/constant.js function constant2(value) { return function() { return value; }; } var constant_default8 = constant2; // node_modules/lodash-es/_baseSetToString.js var baseSetToString = !defineProperty_default ? identity_default6 : function(func, string) { return defineProperty_default(func, "toString", { "configurable": true, "enumerable": false, "value": constant_default8(string), "writable": true }); }; var baseSetToString_default = baseSetToString; // node_modules/lodash-es/_shortOut.js var HOT_COUNT = 800; var HOT_SPAN = 16; var nativeNow = Date.now; function shortOut(func) { var count3 = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count3 >= HOT_COUNT) { return arguments[0]; } } else { count3 = 0; } return func.apply(void 0, arguments); }; } var shortOut_default = shortOut; // node_modules/lodash-es/_setToString.js var setToString = shortOut_default(baseSetToString_default); var setToString_default = setToString; // node_modules/lodash-es/_baseRest.js function baseRest(func, start) { return setToString_default(overRest_default(func, start, identity_default6), func + ""); } var baseRest_default = baseRest; // node_modules/lodash-es/_isIterateeCall.js function isIterateeCall(value, index2, object) { if (!isObject_default(object)) { return false; } var type3 = typeof index2; if (type3 == "number" ? isArrayLike_default(object) && isIndex_default(index2, object.length) : type3 == "string" && index2 in object) { return eq_default(object[index2], value); } return false; } var isIterateeCall_default = isIterateeCall; // node_modules/lodash-es/_createAssigner.js function createAssigner(assigner) { return baseRest_default(function(object, sources) { var index2 = -1, length2 = sources.length, customizer = length2 > 1 ? sources[length2 - 1] : void 0, guard = length2 > 2 ? sources[2] : void 0; customizer = assigner.length > 3 && typeof customizer == "function" ? (length2--, customizer) : void 0; if (guard && isIterateeCall_default(sources[0], sources[1], guard)) { customizer = length2 < 3 ? void 0 : customizer; length2 = 1; } object = Object(object); while (++index2 < length2) { var source = sources[index2]; if (source) { assigner(object, source, index2, customizer); } } return object; }); } var createAssigner_default = createAssigner; // node_modules/lodash-es/merge.js var merge2 = createAssigner_default(function(object, source, srcIndex) { baseMerge_default(object, source, srcIndex); }); var merge_default = merge2; // node_modules/stylis/src/Enum.js var COMMENT = "comm"; var RULESET = "rule"; var DECLARATION = "decl"; var IMPORT = "@import"; var KEYFRAMES = "@keyframes"; var LAYER = "@layer"; // node_modules/stylis/src/Utility.js var abs5 = Math.abs; var from = String.fromCharCode; function trim(value) { return value.trim(); } function replace(value, pattern, replacement) { return value.replace(pattern, replacement); } function indexof(value, search, position2) { return value.indexOf(search, position2); } function charat(value, index2) { return value.charCodeAt(index2) | 0; } function substr(value, begin, end) { return value.slice(begin, end); } function strlen(value) { return value.length; } function sizeof(value) { return value.length; } function append2(value, array3) { return array3.push(value), value; } // node_modules/stylis/src/Tokenizer.js var line = 1; var column = 1; var length = 0; var position = 0; var character = 0; var characters = ""; function node(value, root2, parent, type3, props, children, length2, siblings) { return { value, root: root2, parent, type: type3, props, children, line, column, length: length2, return: "", siblings }; } function char() { return character; } function prev() { character = position > 0 ? charat(characters, --position) : 0; if (column--, character === 10) column = 1, line--; return character; } function next() { character = position < length ? charat(characters, position++) : 0; if (column++, character === 10) column = 1, line++; return character; } function peek() { return charat(characters, position); } function caret() { return position; } function slice5(begin, end) { return substr(characters, begin, end); } function token(type3) { switch (type3) { 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 alloc(value) { return line = column = 1, length = strlen(characters = value), position = 0, []; } function dealloc(value) { return characters = "", value; } function delimit(type3) { return trim(slice5(position - 1, delimiter(type3 === 91 ? type3 + 2 : type3 === 40 ? type3 + 1 : type3))); } function whitespace(type3) { while (character = peek()) if (character < 33) next(); else break; return token(type3) > 2 || token(character) > 3 ? "" : " "; } function escaping(index2, count3) { while (--count3 && next()) if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break; return slice5(index2, caret() + (count3 < 6 && peek() == 32 && next() == 32)); } function delimiter(type3) { while (next()) switch (character) { case type3: return position; case 34: case 39: if (type3 !== 34 && type3 !== 39) delimiter(character); break; case 40: if (type3 === 41) delimiter(type3); break; case 92: next(); break; } return position; } function commenter(type3, index2) { while (next()) if (type3 + character === 47 + 10) break; else if (type3 + character === 42 + 42 && peek() === 47) break; return "/*" + slice5(index2, position - 1) + "*" + from(type3 === 47 ? type3 : next()); } function identifier(index2) { while (!token(peek())) next(); return slice5(index2, position); } // node_modules/stylis/src/Parser.js function compile(value) { return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value)); } function parse(value, root2, parent, rule, rules, rulesets, pseudo, points, declarations) { var index2 = 0; var offset = 0; var length2 = pseudo; var atrule = 0; var property = 0; var previous = 0; var variable = 1; var scanning = 1; var ampersand = 1; var character2 = 0; var type3 = ""; var props = rules; var children = rulesets; var reference = rule; var characters2 = type3; while (scanning) switch (previous = character2, character2 = next()) { case 40: if (previous != 108 && charat(characters2, length2 - 1) == 58) { if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs5(index2 ? points[index2 - 1] : 0)) != -1) ampersand = -1; break; } case 34: case 39: case 91: characters2 += delimit(character2); break; case 9: case 10: case 13: case 32: characters2 += whitespace(previous); break; case 92: characters2 += escaping(caret() - 1, 7); continue; case 47: switch (peek()) { case 42: case 47: append2(comment(commenter(next(), caret()), root2, parent, declarations), declarations); break; default: characters2 += "/"; } break; case 123 * variable: points[index2++] = strlen(characters2) * ampersand; case 125 * variable: case 59: case 0: switch (character2) { case 0: case 125: scanning = 0; case 59 + offset: if (ampersand == -1) characters2 = replace(characters2, /\f/g, ""); if (property > 0 && strlen(characters2) - length2) append2(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations); break; case 59: characters2 += ";"; default: append2(reference = ruleset(characters2, root2, parent, index2, offset, rules, points, type3, props = [], children = [], length2, rulesets), rulesets); if (character2 === 123) if (offset === 0) parse(characters2, root2, reference, reference, props, rulesets, length2, points, children); else switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) { case 100: case 108: case 109: case 115: parse(value, reference, reference, rule && append2(ruleset(value, reference, reference, 0, 0, rules, points, type3, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children); break; default: parse(characters2, reference, reference, reference, [""], children, 0, points, children); } } index2 = offset = property = 0, variable = ampersand = 1, type3 = characters2 = "", length2 = pseudo; break; case 58: length2 = 1 + strlen(characters2), property = previous; default: if (variable < 1) { if (character2 == 123) --variable; else if (character2 == 125 && variable++ == 0 && prev() == 125) continue; } switch (characters2 += from(character2), character2 * variable) { case 38: ampersand = offset > 0 ? 1 : (characters2 += "\f", -1); break; case 44: points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1; break; case 64: if (peek() === 45) characters2 += delimit(next()); atrule = peek(), offset = length2 = strlen(type3 = characters2 += identifier(caret())), character2++; break; case 45: if (previous === 45 && strlen(characters2) == 2) variable = 0; } } return rulesets; } function ruleset(value, root2, parent, index2, offset, rules, points, type3, props, children, length2, siblings) { var post = offset - 1; var rule = offset === 0 ? rules : [""]; var size = sizeof(rule); for (var i = 0, j = 0, k2 = 0; i < index2; ++i) for (var x3 = 0, y3 = substr(value, post + 1, post = abs5(j = points[i])), z = value; x3 < size; ++x3) if (z = trim(j > 0 ? rule[x3] + " " + y3 : replace(y3, /&\f/g, rule[x3]))) props[k2++] = z; return node(value, root2, parent, offset === 0 ? RULESET : type3, props, children, length2, siblings); } function comment(value, root2, parent, siblings) { return node(value, root2, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings); } function declaration(value, root2, parent, length2, siblings) { return node(value, root2, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings); } // node_modules/stylis/src/Serializer.js function serialize(children, callback) { var output = ""; for (var i = 0; i < children.length; i++) output += callback(children[i], i, children, callback) || ""; return output; } function stringify(element, index2, children, callback) { switch (element.type) { case LAYER: if (element.children.length) break; case IMPORT: case DECLARATION: return element.return = element.return || element.value; case COMMENT: return ""; case KEYFRAMES: return element.return = element.value + "{" + serialize(element.children, callback) + "}"; case RULESET: if (!strlen(element.value = element.props.join(","))) return ""; } return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : ""; } // node_modules/lodash-es/_nativeKeys.js var nativeKeys = overArg_default(Object.keys, Object); var nativeKeys_default = nativeKeys; // node_modules/lodash-es/_baseKeys.js var objectProto12 = Object.prototype; var hasOwnProperty10 = objectProto12.hasOwnProperty; function baseKeys(object) { if (!isPrototype_default(object)) { return nativeKeys_default(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty10.call(object, key) && key != "constructor") { result.push(key); } } return result; } var baseKeys_default = baseKeys; // node_modules/lodash-es/_DataView.js var DataView = getNative_default(root_default2, "DataView"); var DataView_default = DataView; // node_modules/lodash-es/_Promise.js var Promise2 = getNative_default(root_default2, "Promise"); var Promise_default = Promise2; // node_modules/lodash-es/_Set.js var Set2 = getNative_default(root_default2, "Set"); var Set_default = Set2; // node_modules/lodash-es/_WeakMap.js var WeakMap = getNative_default(root_default2, "WeakMap"); var WeakMap_default = WeakMap; // node_modules/lodash-es/_getTag.js var mapTag2 = "[object Map]"; var objectTag3 = "[object Object]"; var promiseTag = "[object Promise]"; var setTag2 = "[object Set]"; var weakMapTag2 = "[object WeakMap]"; var dataViewTag2 = "[object DataView]"; var dataViewCtorString = toSource_default(DataView_default); var mapCtorString = toSource_default(Map_default); var promiseCtorString = toSource_default(Promise_default); var setCtorString = toSource_default(Set_default); var weakMapCtorString = toSource_default(WeakMap_default); var getTag = baseGetTag_default; if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag2 || Map_default && getTag(new Map_default()) != mapTag2 || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag2 || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag2) { getTag = function(value) { var result = baseGetTag_default(value), Ctor = result == objectTag3 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : ""; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag2; case mapCtorString: return mapTag2; case promiseCtorString: return promiseTag; case setCtorString: return setTag2; case weakMapCtorString: return weakMapTag2; } } return result; }; } var getTag_default = getTag; // node_modules/lodash-es/isEmpty.js var mapTag3 = "[object Map]"; var setTag3 = "[object Set]"; var objectProto13 = Object.prototype; var hasOwnProperty11 = objectProto13.hasOwnProperty; function isEmpty(value) { if (value == null) { return true; } if (isArrayLike_default(value) && (isArray_default(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer_default(value) || isTypedArray_default(value) || isArguments_default(value))) { return !value.length; } var tag = getTag_default(value); if (tag == mapTag3 || tag == setTag3) { return !value.size; } if (isPrototype_default(value)) { return !baseKeys_default(value).length; } for (var key in value) { if (hasOwnProperty11.call(value, key)) { return false; } } return true; } var isEmpty_default = isEmpty; // node_modules/mermaid/dist/mermaid-6dc72991.js var import_dayjs = __toESM(require_dayjs_min(), 1); var import_sanitize_url = __toESM(require_dist(), 1); var LEVELS = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, fatal: 5 }; var log$1 = { trace: (..._args) => { }, debug: (..._args) => { }, info: (..._args) => { }, warn: (..._args) => { }, error: (..._args) => { }, fatal: (..._args) => { } }; var setLogLevel$1 = function(level = "fatal") { let numericLevel = LEVELS.fatal; if (typeof level === "string") { level = level.toLowerCase(); if (level in LEVELS) { numericLevel = LEVELS[level]; } } else if (typeof level === "number") { numericLevel = level; } log$1.trace = () => { }; log$1.debug = () => { }; log$1.info = () => { }; log$1.warn = () => { }; log$1.error = () => { }; log$1.fatal = () => { }; if (numericLevel <= LEVELS.fatal) { log$1.fatal = console.error ? console.error.bind(console, format2("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format2("FATAL")); } if (numericLevel <= LEVELS.error) { log$1.error = console.error ? console.error.bind(console, format2("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format2("ERROR")); } if (numericLevel <= LEVELS.warn) { log$1.warn = console.warn ? console.warn.bind(console, format2("WARN"), "color: orange") : console.log.bind(console, `\x1B[33m`, format2("WARN")); } if (numericLevel <= LEVELS.info) { log$1.info = console.info ? console.info.bind(console, format2("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format2("INFO")); } if (numericLevel <= LEVELS.debug) { log$1.debug = console.debug ? console.debug.bind(console, format2("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format2("DEBUG")); } if (numericLevel <= LEVELS.trace) { log$1.trace = console.debug ? console.debug.bind(console, format2("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format2("TRACE")); } }; var format2 = (level) => { const time2 = (0, import_dayjs.default)().format("ss.SSS"); return `%c${time2} : ${level} : `; }; var lineBreakRegex = //gi; var getRows = (s2) => { if (!s2) { return [""]; } const str2 = breakToPlaceholder(s2).replace(/\\n/g, "#br#"); return str2.split("#br#"); }; var setupDompurifyHooksIfNotSetup = /* @__PURE__ */ (() => { let setup = false; return () => { if (!setup) { setupDompurifyHooks(); setup = true; } }; })(); function setupDompurifyHooks() { const TEMPORARY_ATTRIBUTE = "data-temp-href-target"; purify.addHook("beforeSanitizeAttributes", (node2) => { if (node2.tagName === "A" && node2.hasAttribute("target")) { node2.setAttribute(TEMPORARY_ATTRIBUTE, node2.getAttribute("target") || ""); } }); purify.addHook("afterSanitizeAttributes", (node2) => { if (node2.tagName === "A" && node2.hasAttribute(TEMPORARY_ATTRIBUTE)) { node2.setAttribute("target", node2.getAttribute(TEMPORARY_ATTRIBUTE) || ""); node2.removeAttribute(TEMPORARY_ATTRIBUTE); if (node2.getAttribute("target") === "_blank") { node2.setAttribute("rel", "noopener"); } } }); } var removeScript = (txt) => { setupDompurifyHooksIfNotSetup(); const sanitizedText = purify.sanitize(txt); return sanitizedText; }; var sanitizeMore = (text, config2) => { var _a; if (((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels) !== false) { const level = config2.securityLevel; if (level === "antiscript" || level === "strict") { text = removeScript(text); } else if (level !== "loose") { text = breakToPlaceholder(text); text = text.replace(//g, ">"); text = text.replace(/=/g, "="); text = placeholderToBreak(text); } } return text; }; var sanitizeText$2 = (text, config2) => { if (!text) { return text; } if (config2.dompurifyConfig) { text = purify.sanitize(sanitizeMore(text, config2), config2.dompurifyConfig).toString(); } else { text = purify.sanitize(sanitizeMore(text, config2), { FORBID_TAGS: ["style"] }).toString(); } return text; }; var sanitizeTextOrArray = (a2, config2) => { if (typeof a2 === "string") { return sanitizeText$2(a2, config2); } return a2.flat().map((x3) => sanitizeText$2(x3, config2)); }; var hasBreaks = (text) => { return lineBreakRegex.test(text); }; var splitBreaks = (text) => { return text.split(lineBreakRegex); }; var placeholderToBreak = (s2) => { return s2.replace(/#br#/g, "
"); }; var breakToPlaceholder = (s2) => { return s2.replace(lineBreakRegex, "#br#"); }; var getUrl = (useAbsolute) => { let url = ""; if (useAbsolute) { url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; url = url.replaceAll(/\(/g, "\\("); url = url.replaceAll(/\)/g, "\\)"); } return url; }; var evaluate = (val) => val === false || ["false", "null", "0"].includes(String(val).trim().toLowerCase()) ? false : true; var getMax = function(...values) { const newValues = values.filter((value) => { return !isNaN(value); }); return Math.max(...newValues); }; var getMin = function(...values) { const newValues = values.filter((value) => { return !isNaN(value); }); return Math.min(...newValues); }; var parseGenericTypes = function(input) { const inputSets = input.split(/(,)/); const output = []; for (let i = 0; i < inputSets.length; i++) { let thisSet = inputSets[i]; if (thisSet === "," && i > 0 && i + 1 < inputSets.length) { const previousSet = inputSets[i - 1]; const nextSet = inputSets[i + 1]; if (shouldCombineSets(previousSet, nextSet)) { thisSet = previousSet + "," + nextSet; i++; output.pop(); } } output.push(processSet(thisSet)); } return output.join(""); }; var countOccurrence = (string, substring) => { return Math.max(0, string.split(substring).length - 1); }; var shouldCombineSets = (previousSet, nextSet) => { const prevCount = countOccurrence(previousSet, "~"); const nextCount = countOccurrence(nextSet, "~"); return prevCount === 1 && nextCount === 1; }; var processSet = (input) => { const tildeCount = countOccurrence(input, "~"); let hasStartingTilde = false; if (tildeCount <= 1) { return input; } if (tildeCount % 2 !== 0 && input.startsWith("~")) { input = input.substring(1); hasStartingTilde = true; } const chars = [...input]; let first = chars.indexOf("~"); let last = chars.lastIndexOf("~"); while (first !== -1 && last !== -1 && first !== last) { chars[first] = "<"; chars[last] = ">"; first = chars.indexOf("~"); last = chars.lastIndexOf("~"); } if (hasStartingTilde) { chars.unshift("~"); } return chars.join(""); }; var isMathMLSupported = () => window.MathMLElement !== void 0; var katexRegex = /\$\$(.*)\$\$/g; var hasKatex = (text) => { var _a; return (((_a = text.match(katexRegex)) == null ? void 0 : _a.length) ?? 0) > 0; }; var calculateMathMLDimensions = async (text, config2) => { text = await renderKatex(text, config2); const divElem = document.createElement("div"); divElem.innerHTML = text; divElem.id = "katex-temp"; divElem.style.visibility = "hidden"; divElem.style.position = "absolute"; divElem.style.top = "0"; const body = document.querySelector("body"); body == null ? void 0 : body.insertAdjacentElement("beforeend", divElem); const dim = { width: divElem.clientWidth, height: divElem.clientHeight }; divElem.remove(); return dim; }; var renderKatex = async (text, config2) => { if (!hasKatex(text)) { return text; } if (!isMathMLSupported() && !config2.legacyMathML) { return text.replace(katexRegex, "MathML is unsupported in this environment."); } const { default: katex } = await import("./katex.js"); return text.split(lineBreakRegex).map( (line2) => hasKatex(line2) ? `
${line2}
` : `
${line2}
` ).join("").replace( katexRegex, (_, c3) => katex.renderToString(c3, { throwOnError: true, displayMode: true, output: isMathMLSupported() ? "mathml" : "htmlAndMathml" }).replace(/\n/g, " ").replace(//g, "") ); }; var common$1 = { getRows, sanitizeText: sanitizeText$2, sanitizeTextOrArray, hasBreaks, splitBreaks, lineBreakRegex, removeScript, getUrl, evaluate, getMax, getMin }; var mkBorder = (col, darkMode) => darkMode ? adjust_default(col, { s: -40, l: 10 }) : adjust_default(col, { s: -40, l: -10 }); var oldAttributeBackgroundColorOdd = "#ffffff"; var oldAttributeBackgroundColorEven = "#f2f2f2"; var Theme$4 = class Theme { constructor() { this.background = "#f4f4f4"; 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() { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333"); this.secondaryColor = this.secondaryColor || adjust_default(this.primaryColor, { h: -120 }); this.tertiaryColor = this.tertiaryColor || adjust_default(this.primaryColor, { h: 180, l: 5 }); this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode); this.secondaryBorderColor = this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode); this.tertiaryBorderColor = this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode); this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode); this.noteBkgColor = this.noteBkgColor || "#fff5ad"; this.noteTextColor = this.noteTextColor || "#333"; this.secondaryTextColor = this.secondaryTextColor || invert_default(this.secondaryColor); this.tertiaryTextColor = this.tertiaryTextColor || invert_default(this.tertiaryColor); this.lineColor = this.lineColor || invert_default(this.background); this.arrowheadColor = this.arrowheadColor || invert_default(this.background); this.textColor = this.textColor || this.primaryTextColor; this.border2 = this.border2 || this.tertiaryBorderColor; 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 ? darken_default(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 || darken_default(this.secondaryColor, 10); this.activationBkgColor = this.activationBkgColor || this.secondaryColor; this.sequenceNumberColor = this.sequenceNumberColor || invert_default(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 || lighten_default(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 || adjust_default(this.primaryColor, { h: 30 }); this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 }); this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 }); this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 }); this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 }); this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210, l: 150 }); this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 }); this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 }); this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 }); if (this.darkMode) { for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScale" + i] = darken_default(this["cScale" + i], 75); } } else { for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScale" + i] = darken_default(this["cScale" + i], 25); } } for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]); } for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { if (this.darkMode) { this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10); } else { this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 10); } } this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor; for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; } const multiplier = this.darkMode ? -4 : -1; for (let i = 0; i < 5; i++) { this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) }); this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) }); } this.classText = this.classText || this.textColor; this.fillType0 = this.fillType0 || this.primaryColor; this.fillType1 = this.fillType1 || this.secondaryColor; this.fillType2 = this.fillType2 || adjust_default(this.primaryColor, { h: 64 }); this.fillType3 = this.fillType3 || adjust_default(this.secondaryColor, { h: 64 }); this.fillType4 = this.fillType4 || adjust_default(this.primaryColor, { h: -64 }); this.fillType5 = this.fillType5 || adjust_default(this.secondaryColor, { h: -64 }); this.fillType6 = this.fillType6 || adjust_default(this.primaryColor, { h: 128 }); this.fillType7 = this.fillType7 || adjust_default(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 || adjust_default(this.primaryColor, { l: -10 }); this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -10 }); this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { l: -10 }); this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -10 }); this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -10 }); this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: 0 }); this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -20 }); this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -60, l: -20 }); this.pie12 = this.pie12 || adjust_default(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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; this.pieOpacity = this.pieOpacity || "0.7"; this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 }); this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 }); this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 }); this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 }); this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 }); this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 }); this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill); this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; this.xyChart = { backgroundColor: ((_a = this.xyChart) == null ? void 0 : _a.backgroundColor) || this.background, titleColor: ((_b = this.xyChart) == null ? void 0 : _b.titleColor) || this.primaryTextColor, xAxisTitleColor: ((_c = this.xyChart) == null ? void 0 : _c.xAxisTitleColor) || this.primaryTextColor, xAxisLabelColor: ((_d = this.xyChart) == null ? void 0 : _d.xAxisLabelColor) || this.primaryTextColor, xAxisTickColor: ((_e = this.xyChart) == null ? void 0 : _e.xAxisTickColor) || this.primaryTextColor, xAxisLineColor: ((_f = this.xyChart) == null ? void 0 : _f.xAxisLineColor) || this.primaryTextColor, yAxisTitleColor: ((_g = this.xyChart) == null ? void 0 : _g.yAxisTitleColor) || this.primaryTextColor, yAxisLabelColor: ((_h = this.xyChart) == null ? void 0 : _h.yAxisLabelColor) || this.primaryTextColor, yAxisTickColor: ((_i = this.xyChart) == null ? void 0 : _i.yAxisTickColor) || this.primaryTextColor, yAxisLineColor: ((_j = this.xyChart) == null ? void 0 : _j.yAxisLineColor) || this.primaryTextColor, plotColorPalette: ((_k = this.xyChart) == null ? void 0 : _k.plotColorPalette) || "#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0" }; this.requirementBackground = this.requirementBackground || this.primaryColor; this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; this.requirementBorderSize = this.requirementBorderSize || "1"; this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; this.relationColor = this.relationColor || this.lineColor; this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken_default(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 || adjust_default(this.primaryColor, { h: -30 }); this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 }); this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 }); this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 }); this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 }); if (this.darkMode) { this.git0 = lighten_default(this.git0, 25); this.git1 = lighten_default(this.git1, 25); this.git2 = lighten_default(this.git2, 25); this.git3 = lighten_default(this.git3, 25); this.git4 = lighten_default(this.git4, 25); this.git5 = lighten_default(this.git5, 25); this.git6 = lighten_default(this.git6, 25); this.git7 = lighten_default(this.git7, 25); } else { this.git0 = darken_default(this.git0, 25); this.git1 = darken_default(this.git1, 25); this.git2 = darken_default(this.git2, 25); this.git3 = darken_default(this.git3, 25); this.git4 = darken_default(this.git4, 25); this.git5 = darken_default(this.git5, 25); this.git6 = darken_default(this.git6, 25); this.git7 = darken_default(this.git7, 25); } this.gitInv0 = this.gitInv0 || invert_default(this.git0); this.gitInv1 = this.gitInv1 || invert_default(this.git1); this.gitInv2 = this.gitInv2 || invert_default(this.git2); this.gitInv3 = this.gitInv3 || invert_default(this.git3); this.gitInv4 = this.gitInv4 || invert_default(this.git4); this.gitInv5 = this.gitInv5 || invert_default(this.git5); this.gitInv6 = this.gitInv6 || invert_default(this.git6); this.gitInv7 = this.gitInv7 || invert_default(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 || oldAttributeBackgroundColorOdd; this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; } calculate(overrides) { if (typeof overrides !== "object") { this.updateColors(); return; } const keys = Object.keys(overrides); keys.forEach((k2) => { this[k2] = overrides[k2]; }); this.updateColors(); keys.forEach((k2) => { this[k2] = overrides[k2]; }); } }; var getThemeVariables$4 = (userOverrides) => { const theme2 = new Theme$4(); theme2.calculate(userOverrides); return theme2; }; var Theme$3 = class Theme2 { constructor() { this.background = "#333"; this.primaryColor = "#1f2020"; this.secondaryColor = lighten_default(this.primaryColor, 16); this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 }); this.primaryBorderColor = invert_default(this.background); this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); this.primaryTextColor = invert_default(this.primaryColor); this.secondaryTextColor = invert_default(this.secondaryColor); this.tertiaryTextColor = invert_default(this.tertiaryColor); this.lineColor = invert_default(this.background); this.textColor = invert_default(this.background); this.mainBkg = "#1f2020"; this.secondBkg = "calculated"; this.mainContrastColor = "lightgrey"; this.darkTextColor = lighten_default(invert_default("#323D47"), 10); this.lineColor = "calculated"; this.border1 = "#81B1DB"; this.border2 = rgba_default(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 = darken_default("#EAE8D9", 30); this.altSectionBkgColor = "calculated"; this.sectionBkgColor2 = "#EAE8D9"; this.excludeBkgColor = darken_default(this.sectionBkgColor, 10); this.taskBorderColor = rgba_default(255, 255, 255, 70); this.taskBkgColor = "calculated"; this.taskTextColor = "calculated"; this.taskTextLightColor = "calculated"; this.taskTextOutsideColor = "calculated"; this.taskTextClickableColor = "#003163"; this.activeTaskBorderColor = rgba_default(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 = this.primaryBorderColor; this.personBkg = this.mainBkg; this.labelColor = "calculated"; this.errorBkgColor = "#a44141"; this.errorTextColor = "#ddd"; } updateColors() { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; this.secondBkg = lighten_default(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 = lighten_default(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 = lighten_default(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 = adjust_default(this.primaryColor, { h: 64 }); this.fillType3 = adjust_default(this.secondaryColor, { h: 64 }); this.fillType4 = adjust_default(this.primaryColor, { h: -64 }); this.fillType5 = adjust_default(this.secondaryColor, { h: -64 }); this.fillType6 = adjust_default(this.primaryColor, { h: 128 }); this.fillType7 = adjust_default(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 || adjust_default(this.primaryColor, { h: 30 }); this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 }); this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 }); this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 }); this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 }); this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 }); this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 }); this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 }); this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 }); for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]); } for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10); } for (let i = 0; i < 5; i++) { this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(-10 + i * 4) }); this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) }); } this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; } for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["pie" + i] = this["cScale" + i]; } 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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; this.pieOpacity = this.pieOpacity || "0.7"; this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 }); this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 }); this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 }); this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 }); this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 }); this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 }); this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill); this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; this.xyChart = { backgroundColor: ((_a = this.xyChart) == null ? void 0 : _a.backgroundColor) || this.background, titleColor: ((_b = this.xyChart) == null ? void 0 : _b.titleColor) || this.primaryTextColor, xAxisTitleColor: ((_c = this.xyChart) == null ? void 0 : _c.xAxisTitleColor) || this.primaryTextColor, xAxisLabelColor: ((_d = this.xyChart) == null ? void 0 : _d.xAxisLabelColor) || this.primaryTextColor, xAxisTickColor: ((_e = this.xyChart) == null ? void 0 : _e.xAxisTickColor) || this.primaryTextColor, xAxisLineColor: ((_f = this.xyChart) == null ? void 0 : _f.xAxisLineColor) || this.primaryTextColor, yAxisTitleColor: ((_g = this.xyChart) == null ? void 0 : _g.yAxisTitleColor) || this.primaryTextColor, yAxisLabelColor: ((_h = this.xyChart) == null ? void 0 : _h.yAxisLabelColor) || this.primaryTextColor, yAxisTickColor: ((_i = this.xyChart) == null ? void 0 : _i.yAxisTickColor) || this.primaryTextColor, yAxisLineColor: ((_j = this.xyChart) == null ? void 0 : _j.yAxisLineColor) || this.primaryTextColor, plotColorPalette: ((_k = this.xyChart) == null ? void 0 : _k.plotColorPalette) || "#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22" }; this.classText = this.primaryTextColor; this.requirementBackground = this.requirementBackground || this.primaryColor; this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; this.requirementBorderSize = this.requirementBorderSize || "1"; this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; this.relationColor = this.relationColor || this.lineColor; this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken_default(this.secondaryColor, 30) : this.secondaryColor); this.relationLabelColor = this.relationLabelColor || this.actorTextColor; this.git0 = lighten_default(this.secondaryColor, 20); this.git1 = lighten_default(this.pie2 || this.secondaryColor, 20); this.git2 = lighten_default(this.pie3 || this.tertiaryColor, 20); this.git3 = lighten_default(this.pie4 || adjust_default(this.primaryColor, { h: -30 }), 20); this.git4 = lighten_default(this.pie5 || adjust_default(this.primaryColor, { h: -60 }), 20); this.git5 = lighten_default(this.pie6 || adjust_default(this.primaryColor, { h: -90 }), 10); this.git6 = lighten_default(this.pie7 || adjust_default(this.primaryColor, { h: 60 }), 10); this.git7 = lighten_default(this.pie8 || adjust_default(this.primaryColor, { h: 120 }), 20); this.gitInv0 = this.gitInv0 || invert_default(this.git0); this.gitInv1 = this.gitInv1 || invert_default(this.git1); this.gitInv2 = this.gitInv2 || invert_default(this.git2); this.gitInv3 = this.gitInv3 || invert_default(this.git3); this.gitInv4 = this.gitInv4 || invert_default(this.git4); this.gitInv5 = this.gitInv5 || invert_default(this.git5); this.gitInv6 = this.gitInv6 || invert_default(this.git6); this.gitInv7 = this.gitInv7 || invert_default(this.git7); this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor); this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(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 || lighten_default(this.background, 12); this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || lighten_default(this.background, 2); } calculate(overrides) { if (typeof overrides !== "object") { this.updateColors(); return; } const keys = Object.keys(overrides); keys.forEach((k2) => { this[k2] = overrides[k2]; }); this.updateColors(); keys.forEach((k2) => { this[k2] = overrides[k2]; }); } }; var getThemeVariables$3 = (userOverrides) => { const theme2 = new Theme$3(); theme2.calculate(userOverrides); return theme2; }; var Theme$2 = class Theme3 { constructor() { this.background = "#f4f4f4"; this.primaryColor = "#ECECFF"; this.secondaryColor = adjust_default(this.primaryColor, { h: 120 }); this.secondaryColor = "#ffffde"; this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 }); this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); this.primaryTextColor = invert_default(this.primaryColor); this.secondaryTextColor = invert_default(this.secondaryColor); this.tertiaryTextColor = invert_default(this.tertiaryColor); this.lineColor = invert_default(this.background); this.textColor = invert_default(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 = rgba_default(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 = this.primaryBorderColor; this.personBkg = this.mainBkg; this.labelColor = "black"; this.errorBkgColor = "#552222"; this.errorTextColor = "#552222"; this.updateColors(); } updateColors() { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; this.cScale0 = this.cScale0 || this.primaryColor; this.cScale1 = this.cScale1 || this.secondaryColor; this.cScale2 = this.cScale2 || this.tertiaryColor; this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 }); this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 }); this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 }); this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 }); this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 }); this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 }); this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 }); this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 }); this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 }); this["cScalePeer1"] = this["cScalePeer1"] || darken_default(this.secondaryColor, 45); this["cScalePeer2"] = this["cScalePeer2"] || darken_default(this.tertiaryColor, 40); for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScale" + i] = darken_default(this["cScale" + i], 10); this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 25); } for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleInv" + i] = this["cScaleInv" + i] || adjust_default(this["cScale" + i], { h: 180 }); } for (let i = 0; i < 5; i++) { this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, l: -(5 + i * 5) }); this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, l: -(7 + i * 5) }); } this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; if (this.labelTextColor !== "calculated") { this.cScaleLabel0 = this.cScaleLabel0 || invert_default(this.labelTextColor); this.cScaleLabel3 = this.cScaleLabel3 || invert_default(this.labelTextColor); for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.labelTextColor; } } 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 = lighten_default(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 = adjust_default(this.primaryColor, { h: 64 }); this.fillType3 = adjust_default(this.secondaryColor, { h: 64 }); this.fillType4 = adjust_default(this.primaryColor, { h: -64 }); this.fillType5 = adjust_default(this.secondaryColor, { h: -64 }); this.fillType6 = adjust_default(this.primaryColor, { h: 128 }); this.fillType7 = adjust_default(this.secondaryColor, { h: 128 }); this.pie1 = this.pie1 || this.primaryColor; this.pie2 = this.pie2 || this.secondaryColor; this.pie3 = this.pie3 || adjust_default(this.tertiaryColor, { l: -40 }); this.pie4 = this.pie4 || adjust_default(this.primaryColor, { l: -10 }); this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -30 }); this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { l: -20 }); this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -20 }); this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -40 }); this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: -40 }); this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -40 }); this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -90, l: -40 }); this.pie12 = this.pie12 || adjust_default(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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; this.pieOpacity = this.pieOpacity || "0.7"; this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 }); this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 }); this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 }); this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 }); this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 }); this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 }); this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill); this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; this.xyChart = { backgroundColor: ((_a = this.xyChart) == null ? void 0 : _a.backgroundColor) || this.background, titleColor: ((_b = this.xyChart) == null ? void 0 : _b.titleColor) || this.primaryTextColor, xAxisTitleColor: ((_c = this.xyChart) == null ? void 0 : _c.xAxisTitleColor) || this.primaryTextColor, xAxisLabelColor: ((_d = this.xyChart) == null ? void 0 : _d.xAxisLabelColor) || this.primaryTextColor, xAxisTickColor: ((_e = this.xyChart) == null ? void 0 : _e.xAxisTickColor) || this.primaryTextColor, xAxisLineColor: ((_f = this.xyChart) == null ? void 0 : _f.xAxisLineColor) || this.primaryTextColor, yAxisTitleColor: ((_g = this.xyChart) == null ? void 0 : _g.yAxisTitleColor) || this.primaryTextColor, yAxisLabelColor: ((_h = this.xyChart) == null ? void 0 : _h.yAxisLabelColor) || this.primaryTextColor, yAxisTickColor: ((_i = this.xyChart) == null ? void 0 : _i.yAxisTickColor) || this.primaryTextColor, yAxisLineColor: ((_j = this.xyChart) == null ? void 0 : _j.yAxisLineColor) || this.primaryTextColor, plotColorPalette: ((_k = this.xyChart) == null ? void 0 : _k.plotColorPalette) || "#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3" }; this.requirementBackground = this.requirementBackground || this.primaryColor; this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; this.requirementBorderSize = this.requirementBorderSize || "1"; 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 || adjust_default(this.primaryColor, { h: -30 }); this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 }); this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 }); this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 }); this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 }); if (this.darkMode) { this.git0 = lighten_default(this.git0, 25); this.git1 = lighten_default(this.git1, 25); this.git2 = lighten_default(this.git2, 25); this.git3 = lighten_default(this.git3, 25); this.git4 = lighten_default(this.git4, 25); this.git5 = lighten_default(this.git5, 25); this.git6 = lighten_default(this.git6, 25); this.git7 = lighten_default(this.git7, 25); } else { this.git0 = darken_default(this.git0, 25); this.git1 = darken_default(this.git1, 25); this.git2 = darken_default(this.git2, 25); this.git3 = darken_default(this.git3, 25); this.git4 = darken_default(this.git4, 25); this.git5 = darken_default(this.git5, 25); this.git6 = darken_default(this.git6, 25); this.git7 = darken_default(this.git7, 25); } this.gitInv0 = this.gitInv0 || darken_default(invert_default(this.git0), 25); this.gitInv1 = this.gitInv1 || invert_default(this.git1); this.gitInv2 = this.gitInv2 || invert_default(this.git2); this.gitInv3 = this.gitInv3 || invert_default(this.git3); this.gitInv4 = this.gitInv4 || invert_default(this.git4); this.gitInv5 = this.gitInv5 || invert_default(this.git5); this.gitInv6 = this.gitInv6 || invert_default(this.git6); this.gitInv7 = this.gitInv7 || invert_default(this.git7); this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor); this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(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 || oldAttributeBackgroundColorOdd; this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; } calculate(overrides) { if (typeof overrides !== "object") { this.updateColors(); return; } const keys = Object.keys(overrides); keys.forEach((k2) => { this[k2] = overrides[k2]; }); this.updateColors(); keys.forEach((k2) => { this[k2] = overrides[k2]; }); } }; var getThemeVariables$2 = (userOverrides) => { const theme2 = new Theme$2(); theme2.calculate(userOverrides); return theme2; }; var Theme$1 = class Theme4 { 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 = lighten_default("#cde498", 10); this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); this.primaryTextColor = invert_default(this.primaryColor); this.secondaryTextColor = invert_default(this.secondaryColor); this.tertiaryTextColor = invert_default(this.primaryColor); this.lineColor = invert_default(this.background); this.textColor = invert_default(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 = this.primaryBorderColor; this.personBkg = this.mainBkg; this.labelColor = "black"; this.errorBkgColor = "#552222"; this.errorTextColor = "#552222"; } updateColors() { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; this.actorBorder = darken_default(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.cScale0 = this.cScale0 || this.primaryColor; this.cScale1 = this.cScale1 || this.secondaryColor; this.cScale2 = this.cScale2 || this.tertiaryColor; this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 }); this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 }); this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 }); this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 }); this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 }); this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 }); this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 }); this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 }); this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 }); this["cScalePeer1"] = this["cScalePeer1"] || darken_default(this.secondaryColor, 45); this["cScalePeer2"] = this["cScalePeer2"] || darken_default(this.tertiaryColor, 40); for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScale" + i] = darken_default(this["cScale" + i], 10); this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 25); } for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleInv" + i] = this["cScaleInv" + i] || adjust_default(this["cScale" + i], { h: 180 }); } this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; } for (let i = 0; i < 5; i++) { this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(5 + i * 5) }); this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(8 + i * 5) }); } this.nodeBkg = this.mainBkg; this.nodeBorder = this.border1; this.clusterBkg = this.secondBkg; this.clusterBorder = this.border2; this.defaultLinkColor = this.lineColor; 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 = adjust_default(this.primaryColor, { h: 64 }); this.fillType3 = adjust_default(this.secondaryColor, { h: 64 }); this.fillType4 = adjust_default(this.primaryColor, { h: -64 }); this.fillType5 = adjust_default(this.secondaryColor, { h: -64 }); this.fillType6 = adjust_default(this.primaryColor, { h: 128 }); this.fillType7 = adjust_default(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 || adjust_default(this.primaryColor, { l: -30 }); this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -30 }); this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { h: 40, l: -40 }); this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -10 }); this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -10 }); this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: 0 }); this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -50 }); this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -60, l: -50 }); this.pie12 = this.pie12 || adjust_default(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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; this.pieOpacity = this.pieOpacity || "0.7"; this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 }); this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 }); this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 }); this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 }); this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 }); this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 }); this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill); this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; this.xyChart = { backgroundColor: ((_a = this.xyChart) == null ? void 0 : _a.backgroundColor) || this.background, titleColor: ((_b = this.xyChart) == null ? void 0 : _b.titleColor) || this.primaryTextColor, xAxisTitleColor: ((_c = this.xyChart) == null ? void 0 : _c.xAxisTitleColor) || this.primaryTextColor, xAxisLabelColor: ((_d = this.xyChart) == null ? void 0 : _d.xAxisLabelColor) || this.primaryTextColor, xAxisTickColor: ((_e = this.xyChart) == null ? void 0 : _e.xAxisTickColor) || this.primaryTextColor, xAxisLineColor: ((_f = this.xyChart) == null ? void 0 : _f.xAxisLineColor) || this.primaryTextColor, yAxisTitleColor: ((_g = this.xyChart) == null ? void 0 : _g.yAxisTitleColor) || this.primaryTextColor, yAxisLabelColor: ((_h = this.xyChart) == null ? void 0 : _h.yAxisLabelColor) || this.primaryTextColor, yAxisTickColor: ((_i = this.xyChart) == null ? void 0 : _i.yAxisTickColor) || this.primaryTextColor, yAxisLineColor: ((_j = this.xyChart) == null ? void 0 : _j.yAxisLineColor) || this.primaryTextColor, plotColorPalette: ((_k = this.xyChart) == null ? void 0 : _k.plotColorPalette) || "#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176" }; this.requirementBackground = this.requirementBackground || this.primaryColor; this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; this.requirementBorderSize = this.requirementBorderSize || "1"; 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 || adjust_default(this.primaryColor, { h: -30 }); this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 }); this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 }); this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 }); this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 }); if (this.darkMode) { this.git0 = lighten_default(this.git0, 25); this.git1 = lighten_default(this.git1, 25); this.git2 = lighten_default(this.git2, 25); this.git3 = lighten_default(this.git3, 25); this.git4 = lighten_default(this.git4, 25); this.git5 = lighten_default(this.git5, 25); this.git6 = lighten_default(this.git6, 25); this.git7 = lighten_default(this.git7, 25); } else { this.git0 = darken_default(this.git0, 25); this.git1 = darken_default(this.git1, 25); this.git2 = darken_default(this.git2, 25); this.git3 = darken_default(this.git3, 25); this.git4 = darken_default(this.git4, 25); this.git5 = darken_default(this.git5, 25); this.git6 = darken_default(this.git6, 25); this.git7 = darken_default(this.git7, 25); } this.gitInv0 = this.gitInv0 || invert_default(this.git0); this.gitInv1 = this.gitInv1 || invert_default(this.git1); this.gitInv2 = this.gitInv2 || invert_default(this.git2); this.gitInv3 = this.gitInv3 || invert_default(this.git3); this.gitInv4 = this.gitInv4 || invert_default(this.git4); this.gitInv5 = this.gitInv5 || invert_default(this.git5); this.gitInv6 = this.gitInv6 || invert_default(this.git6); this.gitInv7 = this.gitInv7 || invert_default(this.git7); this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor); this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(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 || oldAttributeBackgroundColorOdd; this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; } calculate(overrides) { if (typeof overrides !== "object") { this.updateColors(); return; } const keys = Object.keys(overrides); keys.forEach((k2) => { this[k2] = overrides[k2]; }); this.updateColors(); keys.forEach((k2) => { this[k2] = overrides[k2]; }); } }; var getThemeVariables$1 = (userOverrides) => { const theme2 = new Theme$1(); theme2.calculate(userOverrides); return theme2; }; var Theme5 = class { constructor() { this.primaryColor = "#eee"; this.contrast = "#707070"; this.secondaryColor = lighten_default(this.contrast, 55); this.background = "#ffffff"; this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 }); this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); this.primaryTextColor = invert_default(this.primaryColor); this.secondaryTextColor = invert_default(this.secondaryColor); this.tertiaryTextColor = invert_default(this.tertiaryColor); this.lineColor = invert_default(this.background); this.textColor = invert_default(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 = this.primaryBorderColor; this.personBkg = this.mainBkg; this.labelColor = "black"; this.errorBkgColor = "#552222"; this.errorTextColor = "#552222"; } updateColors() { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; this.secondBkg = lighten_default(this.contrast, 55); this.border2 = this.contrast; this.actorBorder = lighten_default(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.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 i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]); } for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { if (this.darkMode) { this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10); } else { this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 10); } } this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); this["cScaleLabel0"] = this["cScaleLabel0"] || this.cScale1; this["cScaleLabel2"] = this["cScaleLabel2"] || this.cScale1; for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; } for (let i = 0; i < 5; i++) { this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { l: -(5 + i * 5) }); this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { l: -(8 + i * 5) }); } 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.sectionBkgColor = lighten_default(this.contrast, 30); this.sectionBkgColor2 = lighten_default(this.contrast, 30); this.taskBorderColor = darken_default(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 = lighten_default(this.border1, 30); this.doneTaskBkgColor = this.done; this.doneTaskBorderColor = this.lineColor; this.critBkgColor = this.critical; this.critBorderColor = darken_default(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 = adjust_default(this.primaryColor, { h: 64 }); this.fillType3 = adjust_default(this.secondaryColor, { h: 64 }); this.fillType4 = adjust_default(this.primaryColor, { h: -64 }); this.fillType5 = adjust_default(this.secondaryColor, { h: -64 }); this.fillType6 = adjust_default(this.primaryColor, { h: 128 }); this.fillType7 = adjust_default(this.secondaryColor, { h: 128 }); for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { this["pie" + i] = this["cScale" + i]; } 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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; this.pieOpacity = this.pieOpacity || "0.7"; this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 }); this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 }); this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 }); this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 }); this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 }); this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 }); this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill); this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; this.xyChart = { backgroundColor: ((_a = this.xyChart) == null ? void 0 : _a.backgroundColor) || this.background, titleColor: ((_b = this.xyChart) == null ? void 0 : _b.titleColor) || this.primaryTextColor, xAxisTitleColor: ((_c = this.xyChart) == null ? void 0 : _c.xAxisTitleColor) || this.primaryTextColor, xAxisLabelColor: ((_d = this.xyChart) == null ? void 0 : _d.xAxisLabelColor) || this.primaryTextColor, xAxisTickColor: ((_e = this.xyChart) == null ? void 0 : _e.xAxisTickColor) || this.primaryTextColor, xAxisLineColor: ((_f = this.xyChart) == null ? void 0 : _f.xAxisLineColor) || this.primaryTextColor, yAxisTitleColor: ((_g = this.xyChart) == null ? void 0 : _g.yAxisTitleColor) || this.primaryTextColor, yAxisLabelColor: ((_h = this.xyChart) == null ? void 0 : _h.yAxisLabelColor) || this.primaryTextColor, yAxisTickColor: ((_i = this.xyChart) == null ? void 0 : _i.yAxisTickColor) || this.primaryTextColor, yAxisLineColor: ((_j = this.xyChart) == null ? void 0 : _j.yAxisLineColor) || this.primaryTextColor, plotColorPalette: ((_k = this.xyChart) == null ? void 0 : _k.plotColorPalette) || "#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0" }; this.requirementBackground = this.requirementBackground || this.primaryColor; this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; this.requirementBorderSize = this.requirementBorderSize || "1"; 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 = darken_default(this.pie1, 25) || this.primaryColor; this.git1 = this.pie2 || this.secondaryColor; this.git2 = this.pie3 || this.tertiaryColor; this.git3 = this.pie4 || adjust_default(this.primaryColor, { h: -30 }); this.git4 = this.pie5 || adjust_default(this.primaryColor, { h: -60 }); this.git5 = this.pie6 || adjust_default(this.primaryColor, { h: -90 }); this.git6 = this.pie7 || adjust_default(this.primaryColor, { h: 60 }); this.git7 = this.pie8 || adjust_default(this.primaryColor, { h: 120 }); this.gitInv0 = this.gitInv0 || invert_default(this.git0); this.gitInv1 = this.gitInv1 || invert_default(this.git1); this.gitInv2 = this.gitInv2 || invert_default(this.git2); this.gitInv3 = this.gitInv3 || invert_default(this.git3); this.gitInv4 = this.gitInv4 || invert_default(this.git4); this.gitInv5 = this.gitInv5 || invert_default(this.git5); this.gitInv6 = this.gitInv6 || invert_default(this.git6); this.gitInv7 = this.gitInv7 || invert_default(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 || oldAttributeBackgroundColorOdd; this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; } calculate(overrides) { if (typeof overrides !== "object") { this.updateColors(); return; } const keys = Object.keys(overrides); keys.forEach((k2) => { this[k2] = overrides[k2]; }); this.updateColors(); keys.forEach((k2) => { this[k2] = overrides[k2]; }); } }; var getThemeVariables = (userOverrides) => { const theme2 = new Theme5(); theme2.calculate(userOverrides); return theme2; }; var theme = { base: { getThemeVariables: getThemeVariables$4 }, dark: { getThemeVariables: getThemeVariables$3 }, default: { getThemeVariables: getThemeVariables$2 }, forest: { getThemeVariables: getThemeVariables$1 }, neutral: { getThemeVariables } }; var defaultConfigJson = { "flowchart": { "useMaxWidth": true, "titleTopMargin": 25, "subGraphTitleMargin": { "top": 0, "bottom": 0 }, "diagramPadding": 8, "htmlLabels": true, "nodeSpacing": 50, "rankSpacing": 50, "curve": "basis", "padding": 15, "defaultRenderer": "dagre-wrapper", "wrappingWidth": 200 }, "sequence": { "useMaxWidth": true, "hideUnusedParticipants": false, "activationWidth": 10, "diagramMarginX": 50, "diagramMarginY": 10, "actorMargin": 50, "width": 150, "height": 65, "boxMargin": 10, "boxTextMargin": 5, "noteMargin": 10, "messageMargin": 35, "messageAlign": "center", "mirrorActors": true, "forceMenus": false, "bottomMarginAdj": 1, "rightAngles": false, "showSequenceNumbers": false, "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": false, "wrapPadding": 10, "labelBoxWidth": 50, "labelBoxHeight": 20 }, "gantt": { "useMaxWidth": true, "titleTopMargin": 25, "barHeight": 20, "barGap": 4, "topPadding": 50, "rightPadding": 75, "leftPadding": 75, "gridLineStartPadding": 35, "fontSize": 11, "sectionFontSize": 11, "numberSectionStyles": 4, "axisFormat": "%Y-%m-%d", "topAxis": false, "displayMode": "", "weekday": "sunday" }, "journey": { "useMaxWidth": true, "diagramMarginX": 50, "diagramMarginY": 10, "leftMargin": 150, "width": 150, "height": 50, "boxMargin": 10, "boxTextMargin": 5, "noteMargin": 10, "messageMargin": 35, "messageAlign": "center", "bottomMarginAdj": 1, "rightAngles": false, "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": { "useMaxWidth": true, "titleTopMargin": 25, "arrowMarkerAbsolute": false, "dividerMargin": 10, "padding": 5, "textHeight": 10, "defaultRenderer": "dagre-wrapper", "htmlLabels": false }, "state": { "useMaxWidth": true, "titleTopMargin": 25, "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, "defaultRenderer": "dagre-wrapper" }, "er": { "useMaxWidth": true, "titleTopMargin": 25, "diagramPadding": 20, "layoutDirection": "TB", "minEntityWidth": 100, "minEntityHeight": 75, "entityPadding": 15, "stroke": "gray", "fill": "honeydew", "fontSize": 12 }, "pie": { "useMaxWidth": true, "textPosition": 0.75 }, "quadrantChart": { "useMaxWidth": true, "chartWidth": 500, "chartHeight": 500, "titleFontSize": 20, "titlePadding": 10, "quadrantPadding": 5, "xAxisLabelPadding": 5, "yAxisLabelPadding": 5, "xAxisLabelFontSize": 16, "yAxisLabelFontSize": 16, "quadrantLabelFontSize": 16, "quadrantTextTopPadding": 5, "pointTextPadding": 5, "pointLabelFontSize": 12, "pointRadius": 5, "xAxisPosition": "top", "yAxisPosition": "left", "quadrantInternalBorderStrokeWidth": 1, "quadrantExternalBorderStrokeWidth": 2 }, "xyChart": { "useMaxWidth": true, "width": 700, "height": 500, "titleFontSize": 20, "titlePadding": 10, "showTitle": true, "xAxis": { "$ref": "#/$defs/XYChartAxisConfig", "showLabel": true, "labelFontSize": 14, "labelPadding": 5, "showTitle": true, "titleFontSize": 16, "titlePadding": 5, "showTick": true, "tickLength": 5, "tickWidth": 2, "showAxisLine": true, "axisLineWidth": 2 }, "yAxis": { "$ref": "#/$defs/XYChartAxisConfig", "showLabel": true, "labelFontSize": 14, "labelPadding": 5, "showTitle": true, "titleFontSize": 16, "titlePadding": 5, "showTick": true, "tickLength": 5, "tickWidth": 2, "showAxisLine": true, "axisLineWidth": 2 }, "chartOrientation": "vertical", "plotReservedSpacePercent": 50 }, "requirement": { "useMaxWidth": true, "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 }, "mindmap": { "useMaxWidth": true, "padding": 10, "maxNodeWidth": 200 }, "timeline": { "useMaxWidth": true, "diagramMarginX": 50, "diagramMarginY": 10, "leftMargin": 150, "width": 150, "height": 50, "boxMargin": 10, "boxTextMargin": 5, "noteMargin": 10, "messageMargin": 35, "messageAlign": "center", "bottomMarginAdj": 1, "rightAngles": false, "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" ], "disableMulticolor": false }, "gitGraph": { "useMaxWidth": true, "titleTopMargin": 25, "diagramPadding": 8, "nodeLabel": { "width": 75, "height": 100, "x": -25, "y": 0 }, "mainBranchName": "main", "mainBranchOrder": 0, "showCommitLabel": true, "showBranches": true, "rotateCommitLabel": true, "parallelCommits": false, "arrowMarkerAbsolute": false }, "c4": { "useMaxWidth": true, "diagramMarginX": 50, "diagramMarginY": 10, "c4ShapeMargin": 50, "c4ShapePadding": 20, "width": 216, "height": 60, "boxMargin": 10, "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": true, "wrapPadding": 10, "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" }, "sankey": { "useMaxWidth": true, "width": 600, "height": 400, "linkColor": "gradient", "nodeAlignment": "justify", "showValues": true, "prefix": "", "suffix": "" }, "block": { "useMaxWidth": true, "padding": 8 }, "theme": "default", "maxTextSize": 5e4, "maxEdges": 500, "darkMode": false, "fontFamily": '"trebuchet ms", verdana, arial, sans-serif;', "logLevel": 5, "securityLevel": "strict", "startOnLoad": true, "arrowMarkerAbsolute": false, "secure": [ "secure", "securityLevel", "startOnLoad", "maxTextSize", "maxEdges" ], "legacyMathML": false, "deterministicIds": false, "fontSize": 16 }; var config = { ...defaultConfigJson, // Set, even though they're `undefined` so that `configKeys` finds these keys // TODO: Should we replace these with `null` so that they can go in the JSON Schema? deterministicIDSeed: void 0, themeCSS: void 0, // add non-JSON default config values themeVariables: theme["default"].getThemeVariables(), sequence: { ...defaultConfigJson.sequence, 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: { ...defaultConfigJson.gantt, tickInterval: void 0, useWidth: void 0 // can probably be removed since `configKeys` already includes this }, c4: { ...defaultConfigJson.c4, useWidth: void 0, 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 }; } }, pie: { ...defaultConfigJson.pie, useWidth: 984 }, xyChart: { ...defaultConfigJson.xyChart, useWidth: void 0 }, requirement: { ...defaultConfigJson.requirement, useWidth: void 0 }, gitGraph: { ...defaultConfigJson.gitGraph, // TODO: This is a temporary override for `gitGraph`, since every other // diagram does have `useMaxWidth`, but instead sets it to `true`. // Should we set this to `true` instead? useMaxWidth: false }, sankey: { ...defaultConfigJson.sankey, // this is false, unlike every other diagram (other than gitGraph) // TODO: can we make this default to `true` instead? useMaxWidth: false } }; var keyify = (obj, prefix2 = "") => Object.keys(obj).reduce((res, el) => { if (Array.isArray(obj[el])) { return res; } else if (typeof obj[el] === "object" && obj[el] !== null) { return [...res, prefix2 + el, ...keyify(obj[el], "")]; } return [...res, prefix2 + el]; }, []); var configKeys = new Set(keyify(config, "")); var defaultConfig$2 = config; var sanitizeDirective = (args) => { log$1.debug("sanitizeDirective called with", args); if (typeof args !== "object" || args == null) { return; } if (Array.isArray(args)) { args.forEach((arg) => sanitizeDirective(arg)); return; } for (const key of Object.keys(args)) { log$1.debug("Checking key", key); if (key.startsWith("__") || key.includes("proto") || key.includes("constr") || !configKeys.has(key) || args[key] == null) { log$1.debug("sanitize deleting key: ", key); delete args[key]; continue; } if (typeof args[key] === "object") { log$1.debug("sanitizing object", key); sanitizeDirective(args[key]); continue; } const cssMatchers = ["themeCSS", "fontFamily", "altFontFamily"]; for (const cssKey of cssMatchers) { if (key.includes(cssKey)) { log$1.debug("sanitizing css option", key); args[key] = sanitizeCss(args[key]); } } } if (args.themeVariables) { for (const k2 of Object.keys(args.themeVariables)) { const val = args.themeVariables[k2]; if ((val == null ? void 0 : val.match) && !val.match(/^[\d "#%(),.;A-Za-z]+$/)) { args.themeVariables[k2] = ""; } } } log$1.debug("After sanitization", args); }; var sanitizeCss = (str2) => { let startCnt = 0; let endCnt = 0; for (const element of str2) { if (startCnt < endCnt) { return "{ /* ERROR: Unbalanced CSS */ }"; } if (element === "{") { startCnt++; } else if (element === "}") { endCnt++; } } if (startCnt !== endCnt) { return "{ /* ERROR: Unbalanced CSS */ }"; } return str2; }; var frontMatterRegex = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s; var directiveRegex = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi; var anyCommentRegex = /\s*%%.*\n/gm; var UnknownDiagramError = class extends Error { constructor(message) { super(message); this.name = "UnknownDiagramError"; } }; var detectors = {}; var detectType = function(text, config2) { text = text.replace(frontMatterRegex, "").replace(directiveRegex, "").replace(anyCommentRegex, "\n"); for (const [key, { detector: detector2 }] of Object.entries(detectors)) { const diagram2 = detector2(text, config2); if (diagram2) { return key; } } throw new UnknownDiagramError( `No diagram type detected matching given configuration for text: ${text}` ); }; var registerLazyLoadedDiagrams = (...diagrams2) => { for (const { id: id2, detector: detector2, loader: loader2 } of diagrams2) { addDetector(id2, detector2, loader2); } }; var addDetector = (key, detector2, loader2) => { if (detectors[key]) { log$1.error(`Detector with key ${key} already exists`); } else { detectors[key] = { detector: detector2, loader: loader2 }; } log$1.debug(`Detector with key ${key} added${loader2 ? " with loader" : ""}`); }; var getDiagramLoader = (key) => { return detectors[key].loader; }; var assignWithDepth = (dst, src, { depth = 2, clobber = false } = {}) => { const config2 = { depth, clobber }; if (Array.isArray(src) && !Array.isArray(dst)) { src.forEach((s2) => assignWithDepth(dst, s2, config2)); return dst; } else if (Array.isArray(src) && Array.isArray(dst)) { src.forEach((s2) => { if (!dst.includes(s2)) { dst.push(s2); } }); return dst; } if (dst === void 0 || depth <= 0) { if (dst !== void 0 && dst !== null && typeof dst === "object" && typeof src === "object") { return Object.assign(dst, src); } else { return src; } } if (src !== void 0 && typeof dst === "object" && typeof src === "object") { Object.keys(src).forEach((key) => { if (typeof src[key] === "object" && (dst[key] === void 0 || typeof dst[key] === "object")) { if (dst[key] === void 0) { dst[key] = Array.isArray(src[key]) ? [] : {}; } dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber }); } else if (clobber || typeof dst[key] !== "object" && typeof src[key] !== "object") { dst[key] = src[key]; } }); } return dst; }; var assignWithDepth$1 = assignWithDepth; var ZERO_WIDTH_SPACE = "​"; var d3CurveTypes = { curveBasis: basis_default, curveBasisClosed: basisClosed_default, curveBasisOpen: basisOpen_default, curveBumpX: bumpX, curveBumpY: bumpY, curveBundle: bundle_default, curveCardinalClosed: cardinalClosed_default, curveCardinalOpen: cardinalOpen_default, curveCardinal: cardinal_default, curveCatmullRomClosed: catmullRomClosed_default, curveCatmullRomOpen: catmullRomOpen_default, curveCatmullRom: catmullRom_default, curveLinear: linear_default, curveLinearClosed: linearClosed_default, curveMonotoneX: monotoneX, curveMonotoneY: monotoneY, curveNatural: natural_default, curveStep: step_default, curveStepAfter: stepAfter, curveStepBefore: stepBefore }; var directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi; var detectInit = function(text, config2) { const inits = detectDirective(text, /(?:init\b)|(?:initialize\b)/); let results = {}; if (Array.isArray(inits)) { const args = inits.map((init2) => init2.args); sanitizeDirective(args); results = assignWithDepth$1(results, [...args]); } else { results = inits.args; } if (!results) { return; } let type22 = detectType(text, config2); const prop = "config"; if (results[prop] !== void 0) { if (type22 === "flowchart-v2") { type22 = "flowchart"; } results[type22] = results[prop]; delete results[prop]; } return results; }; var detectDirective = function(text, type22 = null) { try { const commentWithoutDirectives = new RegExp( `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).* `, "ig" ); text = text.trim().replace(commentWithoutDirectives, "").replace(/'/gm, '"'); log$1.debug( `Detecting diagram directive${type22 !== null ? " type:" + type22 : ""} based on the text:${text}` ); let match2; const result = []; while ((match2 = directiveRegex.exec(text)) !== null) { if (match2.index === directiveRegex.lastIndex) { directiveRegex.lastIndex++; } if (match2 && !type22 || type22 && match2[1] && match2[1].match(type22) || type22 && match2[2] && match2[2].match(type22)) { const type222 = match2[1] ? match2[1] : match2[2]; const args = match2[3] ? match2[3].trim() : match2[4] ? JSON.parse(match2[4].trim()) : null; result.push({ type: type222, args }); } } if (result.length === 0) { return { type: text, args: null }; } return result.length === 1 ? result[0] : result; } catch (error) { log$1.error( `ERROR: ${error.message} - Unable to parse directive type: '${type22}' based on the text: '${text}'` ); return { type: void 0, args: null }; } }; var removeDirectives = function(text) { return text.replace(directiveRegex, ""); }; var isSubstringInArray = function(str2, arr) { for (const [i, element] of arr.entries()) { if (element.match(str2)) { return i; } } return -1; }; function interpolateToCurve(interpolate, defaultCurve) { if (!interpolate) { return defaultCurve; } const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`; return d3CurveTypes[curveName] ?? defaultCurve; } function formatUrl(linkStr, config2) { const url = linkStr.trim(); if (!url) { return void 0; } if (config2.securityLevel !== "loose") { return (0, import_sanitize_url.sanitizeUrl)(url); } return url; } var runFunc = (functionName, ...params) => { const arrPaths = functionName.split("."); const len = arrPaths.length - 1; const fnName = arrPaths[len]; let obj = window; for (let i = 0; i < len; i++) { obj = obj[arrPaths[i]]; if (!obj) { log$1.error(`Function name: ${functionName} not found in window`); return; } } obj[fnName](...params); }; function distance(p1, p2) { if (!p1 || !p2) { return 0; } return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)); } function traverseEdge(points) { let prevPoint; let totalDistance = 0; points.forEach((point6) => { totalDistance += distance(point6, prevPoint); prevPoint = point6; }); const remainingDistance = totalDistance / 2; return calculatePoint(points, remainingDistance); } function calcLabelPosition(points) { if (points.length === 1) { return points[0]; } return traverseEdge(points); } var roundNumber = (num, precision = 2) => { const factor = Math.pow(10, precision); return Math.round(num * factor) / factor; }; var calculatePoint = (points, distanceToTraverse) => { let prevPoint = void 0; let remainingDistance = distanceToTraverse; for (const point6 of points) { if (prevPoint) { const vectorDistance = distance(point6, prevPoint); if (vectorDistance < remainingDistance) { remainingDistance -= vectorDistance; } else { const distanceRatio = remainingDistance / vectorDistance; if (distanceRatio <= 0) { return prevPoint; } if (distanceRatio >= 1) { return { x: point6.x, y: point6.y }; } if (distanceRatio > 0 && distanceRatio < 1) { return { x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point6.x, 5), y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point6.y, 5) }; } } } prevPoint = point6; } throw new Error("Could not find a suitable point for the given distance"); }; var calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => { log$1.info(`our points ${JSON.stringify(points)}`); if (points[0] !== initialPosition) { points = points.reverse(); } const distanceToCardinalityPoint = 25; const center2 = calculatePoint(points, distanceToCardinalityPoint); const d = isRelationTypePresent ? 10 : 5; const angle = Math.atan2(points[0].y - center2.y, points[0].x - center2.x); const cardinalityPosition = { x: 0, y: 0 }; cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2; cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2; return cardinalityPosition; }; function calcTerminalLabelPosition(terminalMarkerSize, position2, _points) { const points = structuredClone(_points); log$1.info("our points", points); if (position2 !== "start_left" && position2 !== "start_right") { points.reverse(); } const distanceToCardinalityPoint = 25 + terminalMarkerSize; const center2 = calculatePoint(points, distanceToCardinalityPoint); const d = 10 + terminalMarkerSize * 0.5; const angle = Math.atan2(points[0].y - center2.y, points[0].x - center2.x); const cardinalityPosition = { x: 0, y: 0 }; if (position2 === "start_left") { cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center2.x) / 2; cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center2.y) / 2; } else if (position2 === "end_right") { cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center2.x) / 2 - 5; cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center2.y) / 2 - 5; } else if (position2 === "end_left") { cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2 - 5; cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2 - 5; } else { cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2; cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2; } return cardinalityPosition; } function getStylesFromArray(arr) { let style = ""; let labelStyle = ""; for (const element of arr) { if (element !== void 0) { if (element.startsWith("color:") || element.startsWith("text-align:")) { labelStyle = labelStyle + element + ";"; } else { style = style + element + ";"; } } } return { style, labelStyle }; } var cnt = 0; var generateId = () => { cnt++; return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt; }; function makeRandomHex(length2) { let result = ""; const characters2 = "0123456789abcdef"; const charactersLength = characters2.length; for (let i = 0; i < length2; i++) { result += characters2.charAt(Math.floor(Math.random() * charactersLength)); } return result; } var random = (options) => { return makeRandomHex(options.length); }; var getTextObj = 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, text: "" }; }; var drawSimpleText = function(elem, textData) { const nText = textData.text.replace(common$1.lineBreakRegex, " "); const [, _fontSizePx] = parseFontSize(textData.fontSize); const textElem = elem.append("text"); textElem.attr("x", textData.x); textElem.attr("y", textData.y); textElem.style("text-anchor", textData.anchor); textElem.style("font-family", textData.fontFamily); textElem.style("font-size", _fontSizePx); textElem.style("font-weight", textData.fontWeight); textElem.attr("fill", textData.fill); if (textData.class !== void 0) { textElem.attr("class", textData.class); } const span = textElem.append("tspan"); span.attr("x", textData.x + textData.textMargin * 2); span.attr("fill", textData.fill); span.text(nText); return textElem; }; var wrapLabel = memoize_default( (label, maxWidth, config2) => { if (!label) { return label; } config2 = Object.assign( { fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" }, config2 ); if (common$1.lineBreakRegex.test(label)) { return label; } const words = label.split(" "); const completedLines = []; let nextLine = ""; words.forEach((word, index2) => { const wordLength = calculateTextWidth(`${word} `, config2); const nextLineLength = calculateTextWidth(nextLine, config2); if (wordLength > maxWidth) { const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config2); completedLines.push(nextLine, ...hyphenatedStrings); nextLine = remainingWord; } else if (nextLineLength + wordLength >= maxWidth) { completedLines.push(nextLine); nextLine = word; } else { nextLine = [nextLine, word].filter(Boolean).join(" "); } const currentWord = index2 + 1; const isLastWord = currentWord === words.length; if (isLastWord) { completedLines.push(nextLine); } }); return completedLines.filter((line2) => line2 !== "").join(config2.joinWith); }, (label, maxWidth, config2) => `${label}${maxWidth}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}${config2.joinWith}` ); var breakString = memoize_default( (word, maxWidth, hyphenCharacter = "-", config2) => { config2 = Object.assign( { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 }, config2 ); const characters2 = [...word]; const lines = []; let currentLine = ""; characters2.forEach((character2, index2) => { const nextLine = `${currentLine}${character2}`; const lineWidth = calculateTextWidth(nextLine, config2); if (lineWidth >= maxWidth) { const currentCharacter = index2 + 1; const isLastLine = characters2.length === currentCharacter; const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`; lines.push(isLastLine ? nextLine : hyphenatedNextLine); currentLine = ""; } else { currentLine = nextLine; } }); return { hyphenatedStrings: lines, remainingWord: currentLine }; }, (word, maxWidth, hyphenCharacter = "-", config2) => `${word}${maxWidth}${hyphenCharacter}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` ); function calculateTextHeight(text, config2) { return calculateTextDimensions(text, config2).height; } function calculateTextWidth(text, config2) { return calculateTextDimensions(text, config2).width; } var calculateTextDimensions = memoize_default( (text, config2) => { const { fontSize = 12, fontFamily = "Arial", fontWeight = 400 } = config2; if (!text) { return { width: 0, height: 0 }; } const [, _fontSizePx] = parseFontSize(fontSize); const fontFamilies = ["sans-serif", fontFamily]; const lines = text.split(common$1.lineBreakRegex); const dims = []; const body = select_default("body"); if (!body.remove) { return { width: 0, height: 0, lineHeight: 0 }; } const g = body.append("svg"); for (const fontFamily2 of fontFamilies) { let cHeight = 0; const dim = { width: 0, height: 0, lineHeight: 0 }; for (const line2 of lines) { const textObj = getTextObj(); textObj.text = line2 || ZERO_WIDTH_SPACE; const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2); const bBox = (textElem._groups || textElem)[0][0].getBBox(); if (bBox.width === 0 && bBox.height === 0) { throw new Error("svg element not in render tree"); } dim.width = Math.round(Math.max(dim.width, bBox.width)); cHeight = Math.round(bBox.height); dim.height += cHeight; dim.lineHeight = Math.round(Math.max(dim.lineHeight, cHeight)); } dims.push(dim); } g.remove(); const index2 = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1; return dims[index2]; }, (text, config2) => `${text}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` ); var InitIDGenerator = class { constructor(deterministic = false, seed) { this.count = 0; this.count = seed ? seed.length : 0; this.next = deterministic ? () => this.count++ : () => Date.now(); } }; var decoder; var entityDecode = function(html2) { decoder = decoder || document.createElement("div"); html2 = escape(html2).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"); decoder.innerHTML = html2; return unescape(decoder.textContent); }; function isDetailedError(error) { return "str" in error; } var insertTitle = (parent, cssClass, titleTopMargin, title) => { var _a; if (!title) { return; } const bounds = (_a = parent.node()) == null ? void 0 : _a.getBBox(); if (!bounds) { return; } parent.append("text").text(title).attr("x", bounds.x + bounds.width / 2).attr("y", -titleTopMargin).attr("class", cssClass); }; var parseFontSize = (fontSize) => { if (typeof fontSize === "number") { return [fontSize, fontSize + "px"]; } const fontSizeNumber = parseInt(fontSize ?? "", 10); if (Number.isNaN(fontSizeNumber)) { return [void 0, void 0]; } else if (fontSize === String(fontSizeNumber)) { return [fontSizeNumber, fontSize + "px"]; } else { return [fontSizeNumber, fontSize]; } }; function cleanAndMerge(defaultData, data) { return merge_default({}, defaultData, data); } var utils = { assignWithDepth: assignWithDepth$1, wrapLabel, calculateTextHeight, calculateTextWidth, calculateTextDimensions, cleanAndMerge, detectInit, detectDirective, isSubstringInArray, interpolateToCurve, calcLabelPosition, calcCardinalityPosition, calcTerminalLabelPosition, formatUrl, getStylesFromArray, generateId, random, runFunc, entityDecode, insertTitle, parseFontSize, InitIDGenerator }; var encodeEntities = function(text) { let txt = text; txt = txt.replace(/style.*:\S*#.*;/g, function(s2) { return s2.substring(0, s2.length - 1); }); txt = txt.replace(/classDef.*:\S*#.*;/g, function(s2) { return s2.substring(0, s2.length - 1); }); txt = txt.replace(/#\w+;/g, function(s2) { const innerTxt = s2.substring(1, s2.length - 1); const isInt = /^\+?\d+$/.test(innerTxt); if (isInt) { return "fl°°" + innerTxt + "¶ß"; } else { return "fl°" + innerTxt + "¶ß"; } }); return txt; }; var decodeEntities = function(text) { return text.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";"); }; var version = "10.9.1"; var defaultConfig$1 = Object.freeze(defaultConfig$2); var siteConfig = assignWithDepth$1({}, defaultConfig$1); var configFromInitialize; var directives = []; var currentConfig = assignWithDepth$1({}, defaultConfig$1); var updateCurrentConfig = (siteCfg, _directives) => { let cfg = assignWithDepth$1({}, siteCfg); let sumOfDirectives = {}; for (const d of _directives) { sanitize(d); sumOfDirectives = assignWithDepth$1(sumOfDirectives, d); } cfg = assignWithDepth$1(cfg, sumOfDirectives); if (sumOfDirectives.theme && sumOfDirectives.theme in theme) { const tmpConfigFromInitialize = assignWithDepth$1({}, configFromInitialize); const themeVariables = assignWithDepth$1( tmpConfigFromInitialize.themeVariables || {}, sumOfDirectives.themeVariables ); if (cfg.theme && cfg.theme in theme) { cfg.themeVariables = theme[cfg.theme].getThemeVariables(themeVariables); } } currentConfig = cfg; checkConfig(currentConfig); return currentConfig; }; var setSiteConfig = (conf) => { siteConfig = assignWithDepth$1({}, defaultConfig$1); siteConfig = assignWithDepth$1(siteConfig, conf); if (conf.theme && theme[conf.theme]) { siteConfig.themeVariables = theme[conf.theme].getThemeVariables(conf.themeVariables); } updateCurrentConfig(siteConfig, directives); return siteConfig; }; var saveConfigFromInitialize = (conf) => { configFromInitialize = assignWithDepth$1({}, conf); }; var updateSiteConfig = (conf) => { siteConfig = assignWithDepth$1(siteConfig, conf); updateCurrentConfig(siteConfig, directives); return siteConfig; }; var getSiteConfig = () => { return assignWithDepth$1({}, siteConfig); }; var setConfig$1 = (conf) => { checkConfig(conf); assignWithDepth$1(currentConfig, conf); return getConfig$1(); }; var getConfig$1 = () => { return assignWithDepth$1({}, currentConfig); }; var sanitize = (options) => { if (!options) { return; } ["secure", ...siteConfig.secure ?? []].forEach((key) => { if (Object.hasOwn(options, key)) { log$1.debug(`Denied attempt to modify a secure key ${key}`, options[key]); delete options[key]; } }); Object.keys(options).forEach((key) => { if (key.startsWith("__")) { delete options[key]; } }); Object.keys(options).forEach((key) => { if (typeof options[key] === "string" && (options[key].includes("<") || options[key].includes(">") || options[key].includes("url(data:"))) { delete options[key]; } if (typeof options[key] === "object") { sanitize(options[key]); } }); }; var addDirective = (directive) => { sanitizeDirective(directive); if (directive.fontFamily && (!directive.themeVariables || !directive.themeVariables.fontFamily)) { directive.themeVariables = { fontFamily: directive.fontFamily }; } directives.push(directive); updateCurrentConfig(siteConfig, directives); }; var reset = (config2 = siteConfig) => { directives = []; updateCurrentConfig(config2, directives); }; var ConfigWarning = { LAZY_LOAD_DEPRECATED: "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead." }; var issuedWarnings = {}; var issueWarning = (warning) => { if (issuedWarnings[warning]) { return; } log$1.warn(ConfigWarning[warning]); issuedWarnings[warning] = true; }; var checkConfig = (config2) => { if (!config2) { return; } if (config2.lazyLoadedDiagrams || config2.loadExternalDiagramsAtStartup) { issueWarning("LAZY_LOAD_DEPRECATED"); } }; var id$l = "c4"; var detector$l = (txt) => { return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt); }; var loader$m = async () => { const { diagram: diagram2 } = await import("./c4Diagram-ae766693-EYWU4D6X.js"); return { id: id$l, diagram: diagram2 }; }; var plugin$j = { id: id$l, detector: detector$l, loader: loader$m }; var c4 = plugin$j; var id$k = "flowchart"; var detector$k = (txt, config2) => { var _a, _b; if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") { return false; } return /^\s*graph/.test(txt); }; var loader$l = async () => { const { diagram: diagram2 } = await import("./flowDiagram-b222e15a-C6FGFEJC.js"); return { id: id$k, diagram: diagram2 }; }; var plugin$i = { id: id$k, detector: detector$k, loader: loader$l }; var flowchart = plugin$i; var id$j = "flowchart-v2"; var detector$j = (txt, config2) => { var _a, _b, _c; if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-d3" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") { return false; } if (/^\s*graph/.test(txt) && ((_c = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _c.defaultRenderer) === "dagre-wrapper") { return true; } return /^\s*flowchart/.test(txt); }; var loader$k = async () => { const { diagram: diagram2 } = await import("./flowDiagram-v2-13329dc7-2EHGMZXJ.js"); return { id: id$j, diagram: diagram2 }; }; var plugin$h = { id: id$j, detector: detector$j, loader: loader$k }; var flowchartV2 = plugin$h; var id$i = "er"; var detector$i = (txt) => { return /^\s*erDiagram/.test(txt); }; var loader$j = async () => { const { diagram: diagram2 } = await import("./erDiagram-09d1c15f-ZE6C7DHL.js"); return { id: id$i, diagram: diagram2 }; }; var plugin$g = { id: id$i, detector: detector$i, loader: loader$j }; var er = plugin$g; var id$h = "gitGraph"; var detector$h = (txt) => { return /^\s*gitGraph/.test(txt); }; var loader$i = async () => { const { diagram: diagram2 } = await import("./gitGraphDiagram-942e62fe-G5UTVLSX.js"); return { id: id$h, diagram: diagram2 }; }; var plugin$f = { id: id$h, detector: detector$h, loader: loader$i }; var git = plugin$f; var id$g = "gantt"; var detector$g = (txt) => { return /^\s*gantt/.test(txt); }; var loader$h = async () => { const { diagram: diagram2 } = await import("./ganttDiagram-b62c793e-NFKIQDKT.js"); return { id: id$g, diagram: diagram2 }; }; var plugin$e = { id: id$g, detector: detector$g, loader: loader$h }; var gantt = plugin$e; var id$f = "info"; var detector$f = (txt) => { return /^\s*info/.test(txt); }; var loader$g = async () => { const { diagram: diagram2 } = await import("./infoDiagram-94cd232f-CVKY36UZ.js"); return { id: id$f, diagram: diagram2 }; }; var info = { id: id$f, detector: detector$f, loader: loader$g }; var id$e = "pie"; var detector$e = (txt) => { return /^\s*pie/.test(txt); }; var loader$f = async () => { const { diagram: diagram2 } = await import("./pieDiagram-bb1d19e5-PPGONHVG.js"); return { id: id$e, diagram: diagram2 }; }; var pie = { id: id$e, detector: detector$e, loader: loader$f }; var id$d = "quadrantChart"; var detector$d = (txt) => { return /^\s*quadrantChart/.test(txt); }; var loader$e = async () => { const { diagram: diagram2 } = await import("./quadrantDiagram-c759a472-AQAZVZYM.js"); return { id: id$d, diagram: diagram2 }; }; var plugin$d = { id: id$d, detector: detector$d, loader: loader$e }; var quadrantChart = plugin$d; var id$c = "xychart"; var detector$c = (txt) => { return /^\s*xychart-beta/.test(txt); }; var loader$d = async () => { const { diagram: diagram2 } = await import("./xychartDiagram-f11f50a6-PJ4BO6VX.js"); return { id: id$c, diagram: diagram2 }; }; var plugin$c = { id: id$c, detector: detector$c, loader: loader$d }; var xychart = plugin$c; var id$b = "requirement"; var detector$b = (txt) => { return /^\s*requirement(Diagram)?/.test(txt); }; var loader$c = async () => { const { diagram: diagram2 } = await import("./requirementDiagram-87253d64-7CUO6MW3.js"); return { id: id$b, diagram: diagram2 }; }; var plugin$b = { id: id$b, detector: detector$b, loader: loader$c }; var requirement = plugin$b; var id$a = "sequence"; var detector$a = (txt) => { return /^\s*sequenceDiagram/.test(txt); }; var loader$b = async () => { const { diagram: diagram2 } = await import("./sequenceDiagram-6894f283-GYKJVPAO.js"); return { id: id$a, diagram: diagram2 }; }; var plugin$a = { id: id$a, detector: detector$a, loader: loader$b }; var sequence = plugin$a; var id$9 = "class"; var detector$9 = (txt, config2) => { var _a; if (((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { return false; } return /^\s*classDiagram/.test(txt); }; var loader$a = async () => { const { diagram: diagram2 } = await import("./classDiagram-fb54d2a0-IDXTEOXL.js"); return { id: id$9, diagram: diagram2 }; }; var plugin$9 = { id: id$9, detector: detector$9, loader: loader$a }; var classDiagram = plugin$9; var id$8 = "classDiagram"; var detector$8 = (txt, config2) => { var _a; if (/^\s*classDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { return true; } return /^\s*classDiagram-v2/.test(txt); }; var loader$9 = async () => { const { diagram: diagram2 } = await import("./classDiagram-v2-a2b738ad-PK5HSPCP.js"); return { id: id$8, diagram: diagram2 }; }; var plugin$8 = { id: id$8, detector: detector$8, loader: loader$9 }; var classDiagramV2 = plugin$8; var id$7 = "state"; var detector$7 = (txt, config2) => { var _a; if (((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { return false; } return /^\s*stateDiagram/.test(txt); }; var loader$8 = async () => { const { diagram: diagram2 } = await import("./stateDiagram-5dee940d-7ZTPR6WG.js"); return { id: id$7, diagram: diagram2 }; }; var plugin$7 = { id: id$7, detector: detector$7, loader: loader$8 }; var state = plugin$7; var id$6 = "stateDiagram"; var detector$6 = (txt, config2) => { var _a; if (/^\s*stateDiagram-v2/.test(txt)) { return true; } if (/^\s*stateDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { return true; } return false; }; var loader$7 = async () => { const { diagram: diagram2 } = await import("./stateDiagram-v2-1992cada-EKZ4Y2JN.js"); return { id: id$6, diagram: diagram2 }; }; var plugin$6 = { id: id$6, detector: detector$6, loader: loader$7 }; var stateV2 = plugin$6; var id$5 = "journey"; var detector$5 = (txt) => { return /^\s*journey/.test(txt); }; var loader$6 = async () => { const { diagram: diagram2 } = await import("./journeyDiagram-6625b456-NGDFK5U2.js"); return { id: id$5, diagram: diagram2 }; }; var plugin$5 = { id: id$5, detector: detector$5, loader: loader$6 }; var journey = plugin$5; var d3Attrs = function(d3Elem, attrs) { for (let attr of attrs) { d3Elem.attr(attr[0], attr[1]); } }; var calculateSvgSizeAttrs = function(height, width, useMaxWidth) { let attrs = /* @__PURE__ */ new Map(); if (useMaxWidth) { attrs.set("width", "100%"); attrs.set("style", `max-width: ${width}px;`); } else { attrs.set("height", height); attrs.set("width", width); } return attrs; }; var configureSvgSize = function(svgElem, height, width, useMaxWidth) { const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth); d3Attrs(svgElem, attrs); }; var setupGraphViewbox$1 = function(graph, svgElem, padding, useMaxWidth) { const svgBounds = svgElem.node().getBBox(); const sWidth = svgBounds.width; const sHeight = svgBounds.height; log$1.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds); let width = 0; let height = 0; log$1.info(`Graph bounds: ${width}x${height}`, graph); width = sWidth + padding * 2; height = sHeight + padding * 2; log$1.info(`Calculated bounds: ${width}x${height}`); configureSvgSize(svgElem, height, width, useMaxWidth); const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${svgBounds.width + 2 * padding} ${svgBounds.height + 2 * padding}`; svgElem.attr("viewBox", vBox); }; var themes = {}; var getStyles = (type22, userStyles, options) => { let diagramStyles = ""; if (type22 in themes && themes[type22]) { diagramStyles = themes[type22](options); } else { log$1.warn(`No theme found for ${type22}`); } return ` & { font-family: ${options.fontFamily}; font-size: ${options.fontSize}; fill: ${options.textColor} } /* Classes common for multiple diagrams */ & .error-icon { fill: ${options.errorBkgColor}; } & .error-text { fill: ${options.errorTextColor}; stroke: ${options.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: ${options.lineColor}; stroke: ${options.lineColor}; } & .marker.cross { stroke: ${options.lineColor}; } & svg { font-family: ${options.fontFamily}; font-size: ${options.fontSize}; } ${diagramStyles} ${userStyles} `; }; var addStylesForDiagram = (type22, diagramTheme) => { if (diagramTheme !== void 0) { themes[type22] = diagramTheme; } }; var getStyles$1 = getStyles; var accTitle = ""; var diagramTitle = ""; var accDescription = ""; var sanitizeText$1 = (txt) => sanitizeText$2(txt, getConfig$1()); var clear = () => { accTitle = ""; accDescription = ""; diagramTitle = ""; }; var setAccTitle = (txt) => { accTitle = sanitizeText$1(txt).replace(/^\s+/g, ""); }; var getAccTitle = () => accTitle; var setAccDescription = (txt) => { accDescription = sanitizeText$1(txt).replace(/\n\s+/g, "\n"); }; var getAccDescription = () => accDescription; var setDiagramTitle = (txt) => { diagramTitle = sanitizeText$1(txt); }; var getDiagramTitle = () => diagramTitle; var commonDb = Object.freeze(Object.defineProperty({ __proto__: null, clear, getAccDescription, getAccTitle, getDiagramTitle, setAccDescription, setAccTitle, setDiagramTitle }, Symbol.toStringTag, { value: "Module" })); var log3 = log$1; var setLogLevel = setLogLevel$1; var getConfig = getConfig$1; var setConfig = setConfig$1; var defaultConfig = defaultConfig$1; var sanitizeText = (text) => sanitizeText$2(text, getConfig()); var setupGraphViewbox = setupGraphViewbox$1; var getCommonDb = () => { return commonDb; }; var diagrams = {}; var registerDiagram = (id2, diagram2, detector2) => { var _a; if (diagrams[id2]) { throw new Error(`Diagram ${id2} already registered.`); } diagrams[id2] = diagram2; if (detector2) { addDetector(id2, detector2); } addStylesForDiagram(id2, diagram2.styles); (_a = diagram2.injectUtils) == null ? void 0 : _a.call( diagram2, log3, setLogLevel, getConfig, sanitizeText, setupGraphViewbox, getCommonDb(), () => { } ); }; var getDiagram = (name) => { if (name in diagrams) { return diagrams[name]; } throw new DiagramNotFoundError(name); }; var DiagramNotFoundError = class extends Error { constructor(name) { super(`Diagram ${name} not found.`); } }; var selectSvgElement = (id2) => { var _a; const { securityLevel } = getConfig(); let root2 = select_default("body"); if (securityLevel === "sandbox") { const sandboxElement = select_default(`#i${id2}`); const doc = ((_a = sandboxElement.node()) == null ? void 0 : _a.contentDocument) ?? document; root2 = select_default(doc.body); } const svg2 = root2.select(`#${id2}`); return svg2; }; var draw = (_text, id2, version2) => { log$1.debug("rendering svg for syntax error\n"); const svg2 = selectSvgElement(id2); const g = svg2.append("g"); svg2.attr("viewBox", "0 0 2412 512"); configureSvgSize(svg2, 100, 512, true); g.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" ); g.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" ); g.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" ); g.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" ); g.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" ); g.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" ); g.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"); g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${version2}`); }; var renderer = { draw }; var errorRenderer = renderer; var diagram = { db: {}, renderer, parser: { parser: { yy: {} }, parse: () => { return; } } }; var errorDiagram = diagram; var id$4 = "flowchart-elk"; var detector$4 = (txt, config2) => { var _a; if ( // If diagram explicitly states flowchart-elk /^\s*flowchart-elk/.test(txt) || // If a flowchart/graph diagram has their default renderer set to elk /^\s*flowchart|graph/.test(txt) && ((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "elk" ) { return true; } return false; }; var loader$5 = async () => { const { diagram: diagram2 } = await import("./flowchart-elk-definition-ae0efee6-2MZ2V3PR.js"); return { id: id$4, diagram: diagram2 }; }; var plugin$4 = { id: id$4, detector: detector$4, loader: loader$5 }; var flowchartElk = plugin$4; var id$3 = "timeline"; var detector$3 = (txt) => { return /^\s*timeline/.test(txt); }; var loader$4 = async () => { const { diagram: diagram2 } = await import("./timeline-definition-bf702344-SUJ6FMAZ.js"); return { id: id$3, diagram: diagram2 }; }; var plugin$3 = { id: id$3, detector: detector$3, loader: loader$4 }; var timeline = plugin$3; var id$2 = "mindmap"; var detector$2 = (txt) => { return /^\s*mindmap/.test(txt); }; var loader$3 = async () => { const { diagram: diagram2 } = await import("./mindmap-definition-307c710a-S6Q3R62Z.js"); return { id: id$2, diagram: diagram2 }; }; var plugin$2 = { id: id$2, detector: detector$2, loader: loader$3 }; var mindmap = plugin$2; var id$1 = "sankey"; var detector$1 = (txt) => { return /^\s*sankey-beta/.test(txt); }; var loader$2 = async () => { const { diagram: diagram2 } = await import("./sankeyDiagram-707fac0f-Y75RVOW6.js"); return { id: id$1, diagram: diagram2 }; }; var plugin$1 = { id: id$1, detector: detector$1, loader: loader$2 }; var sankey = plugin$1; var id = "block"; var detector = (txt) => { return /^\s*block-beta/.test(txt); }; var loader$1 = async () => { const { diagram: diagram2 } = await import("./blockDiagram-9f4a6865-CRJ63NLF.js"); return { id, diagram: diagram2 }; }; var plugin = { id, detector, loader: loader$1 }; var block = plugin; var hasLoadedDiagrams = false; var addDiagrams = () => { if (hasLoadedDiagrams) { return; } hasLoadedDiagrams = true; registerDiagram("error", errorDiagram, (text) => { return text.toLowerCase().trim() === "error"; }); registerDiagram( "---", // --- diagram type may appear if YAML front-matter is not parsed correctly { db: { clear: () => { } }, styles: {}, // should never be used renderer: { draw: () => { } }, parser: { parser: { yy: {} }, parse: () => { throw new Error( "Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks" ); } }, init: () => null // no op }, (text) => { return text.toLowerCase().trimStart().startsWith("---"); } ); registerLazyLoadedDiagrams( c4, classDiagramV2, classDiagram, er, gantt, info, pie, requirement, sequence, flowchartElk, flowchartV2, flowchart, mindmap, timeline, git, stateV2, state, journey, quadrantChart, sankey, xychart, block ); }; var Diagram = class { constructor(text, metadata = {}) { this.text = text; this.metadata = metadata; this.type = "graph"; this.text = encodeEntities(text); this.text += "\n"; const cnf = getConfig$1(); try { this.type = detectType(text, cnf); } catch (e) { this.type = "error"; this.detectError = e; } const diagram2 = getDiagram(this.type); log$1.debug("Type " + this.type); this.db = diagram2.db; this.renderer = diagram2.renderer; this.parser = diagram2.parser; this.parser.parser.yy = this.db; this.init = diagram2.init; this.parse(); } parse() { var _a, _b, _c, _d, _e; if (this.detectError) { throw this.detectError; } (_b = (_a = this.db).clear) == null ? void 0 : _b.call(_a); const config2 = getConfig$1(); (_c = this.init) == null ? void 0 : _c.call(this, config2); if (this.metadata.title) { (_e = (_d = this.db).setDiagramTitle) == null ? void 0 : _e.call(_d, this.metadata.title); } this.parser.parse(this.text); } async render(id2, version2) { await this.renderer.draw(this.text, id2, version2, this); } getParser() { return this.parser; } getType() { return this.type; } }; var getDiagramFromText$1 = async (text, metadata = {}) => { const type22 = detectType(text, getConfig$1()); try { getDiagram(type22); } catch (error) { const loader2 = getDiagramLoader(type22); if (!loader2) { throw new UnknownDiagramError(`Diagram ${type22} not found.`); } const { id: id2, diagram: diagram2 } = await loader2(); registerDiagram(id2, diagram2); } return new Diagram(text, metadata); }; var interactionFunctions = []; var attachFunctions = () => { interactionFunctions.forEach((f) => { f(); }); interactionFunctions = []; }; var SVG_ROLE = "graphics-document document"; function setA11yDiagramInfo(svg2, diagramType) { svg2.attr("role", SVG_ROLE); if (diagramType !== "") { svg2.attr("aria-roledescription", diagramType); } } function addSVGa11yTitleDescription(svg2, a11yTitle, a11yDesc, baseId) { if (svg2.insert === void 0) { return; } if (a11yDesc) { const descId = `chart-desc-${baseId}`; svg2.attr("aria-describedby", descId); svg2.insert("desc", ":first-child").attr("id", descId).text(a11yDesc); } if (a11yTitle) { const titleId = `chart-title-${baseId}`; svg2.attr("aria-labelledby", titleId); svg2.insert("title", ":first-child").attr("id", titleId).text(a11yTitle); } } var cleanupComments = (text) => { return text.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(); }; function isNothing(subject) { return typeof subject === "undefined" || subject === null; } function isObject2(subject) { return typeof subject === "object" && subject !== null; } function toArray(sequence2) { if (Array.isArray(sequence2)) return sequence2; else if (isNothing(sequence2)) return []; return [sequence2]; } function extend(target, source) { var index2, length2, key, sourceKeys; if (source) { sourceKeys = Object.keys(source); for (index2 = 0, length2 = sourceKeys.length; index2 < length2; index2 += 1) { key = sourceKeys[index2]; target[key] = source[key]; } } return target; } function repeat(string, count3) { var result = "", cycle; for (cycle = 0; cycle < count3; cycle += 1) { result += string; } return result; } function isNegativeZero(number5) { return number5 === 0 && Number.NEGATIVE_INFINITY === 1 / number5; } var isNothing_1 = isNothing; var isObject_1 = isObject2; var toArray_1 = toArray; var repeat_1 = repeat; var isNegativeZero_1 = isNegativeZero; var extend_1 = extend; var common = { isNothing: isNothing_1, isObject: isObject_1, toArray: toArray_1, repeat: repeat_1, isNegativeZero: isNegativeZero_1, extend: extend_1 }; function formatError(exception2, compact) { var where = "", message = exception2.reason || "(unknown reason)"; if (!exception2.mark) return message; if (exception2.mark.name) { where += 'in "' + exception2.mark.name + '" '; } where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; if (!compact && exception2.mark.snippet) { where += "\n\n" + exception2.mark.snippet; } return message + " " + where; } function YAMLException$1(reason, mark) { Error.call(this); this.name = "YAMLException"; this.reason = reason; this.mark = mark; this.message = formatError(this, false); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } else { this.stack = new Error().stack || ""; } } YAMLException$1.prototype = Object.create(Error.prototype); YAMLException$1.prototype.constructor = YAMLException$1; YAMLException$1.prototype.toString = function toString(compact) { return this.name + ": " + formatError(this, compact); }; var exception = YAMLException$1; function getLine(buffer, lineStart, lineEnd, position2, maxLineLength) { var head = ""; var tail = ""; var maxHalfLength = Math.floor(maxLineLength / 2) - 1; if (position2 - lineStart > maxHalfLength) { head = " ... "; lineStart = position2 - maxHalfLength + head.length; } if (lineEnd - position2 > maxHalfLength) { tail = " ..."; lineEnd = position2 + maxHalfLength - tail.length; } return { str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail, pos: position2 - lineStart + head.length // relative position }; } function padStart(string, max5) { return common.repeat(" ", max5 - string.length) + string; } function makeSnippet(mark, options) { options = Object.create(options || null); if (!mark.buffer) return null; if (!options.maxLength) options.maxLength = 79; if (typeof options.indent !== "number") options.indent = 1; if (typeof options.linesBefore !== "number") options.linesBefore = 3; if (typeof options.linesAfter !== "number") options.linesAfter = 2; var re2 = /\r?\n|\r|\0/g; var lineStarts = [0]; var lineEnds = []; var match2; var foundLineNo = -1; while (match2 = re2.exec(mark.buffer)) { lineEnds.push(match2.index); lineStarts.push(match2.index + match2[0].length); if (mark.position <= match2.index && foundLineNo < 0) { foundLineNo = lineStarts.length - 2; } } if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; var result = "", i, line2; var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); for (i = 1; i <= options.linesBefore; i++) { if (foundLineNo - i < 0) break; line2 = getLine( mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength ); result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result; } line2 = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; result += common.repeat("-", options.indent + lineNoLength + 3 + line2.pos) + "^\n"; for (i = 1; i <= options.linesAfter; i++) { if (foundLineNo + i >= lineEnds.length) break; line2 = getLine( mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength ); result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; } return result.replace(/\n$/, ""); } var snippet = makeSnippet; var TYPE_CONSTRUCTOR_OPTIONS = [ "kind", "multi", "resolve", "construct", "instanceOf", "predicate", "represent", "representName", "defaultStyle", "styleAliases" ]; var YAML_NODE_KINDS = [ "scalar", "sequence", "mapping" ]; function compileStyleAliases(map22) { var result = {}; if (map22 !== null) { Object.keys(map22).forEach(function(style) { map22[style].forEach(function(alias) { result[String(alias)] = style; }); }); } return result; } function Type$1(tag, options) { options = options || {}; Object.keys(options).forEach(function(name) { if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); } }); this.options = options; this.tag = tag; this.kind = options["kind"] || null; this.resolve = options["resolve"] || function() { return true; }; this.construct = options["construct"] || function(data) { return data; }; this.instanceOf = options["instanceOf"] || null; this.predicate = options["predicate"] || null; this.represent = options["represent"] || null; this.representName = options["representName"] || null; this.defaultStyle = options["defaultStyle"] || null; this.multi = options["multi"] || false; this.styleAliases = compileStyleAliases(options["styleAliases"] || null); if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); } } var type2 = Type$1; function compileList(schema2, name) { var result = []; schema2[name].forEach(function(currentType) { var newIndex = result.length; result.forEach(function(previousType, previousIndex) { if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { newIndex = previousIndex; } }); result[newIndex] = currentType; }); return result; } function compileMap() { var result = { scalar: {}, sequence: {}, mapping: {}, fallback: {}, multi: { scalar: [], sequence: [], mapping: [], fallback: [] } }, index2, length2; function collectType(type22) { if (type22.multi) { result.multi[type22.kind].push(type22); result.multi["fallback"].push(type22); } else { result[type22.kind][type22.tag] = result["fallback"][type22.tag] = type22; } } for (index2 = 0, length2 = arguments.length; index2 < length2; index2 += 1) { arguments[index2].forEach(collectType); } return result; } function Schema$1(definition) { return this.extend(definition); } Schema$1.prototype.extend = function extend2(definition) { var implicit2 = []; var explicit = []; if (definition instanceof type2) { explicit.push(definition); } else if (Array.isArray(definition)) { explicit = explicit.concat(definition); } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { if (definition.implicit) implicit2 = implicit2.concat(definition.implicit); if (definition.explicit) explicit = explicit.concat(definition.explicit); } else { throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); } implicit2.forEach(function(type$1) { if (!(type$1 instanceof type2)) { throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); } if (type$1.loadKind && type$1.loadKind !== "scalar") { throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); } if (type$1.multi) { throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); } }); explicit.forEach(function(type$1) { if (!(type$1 instanceof type2)) { throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); } }); var result = Object.create(Schema$1.prototype); result.implicit = (this.implicit || []).concat(implicit2); result.explicit = (this.explicit || []).concat(explicit); result.compiledImplicit = compileList(result, "implicit"); result.compiledExplicit = compileList(result, "explicit"); result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); return result; }; var schema = Schema$1; var str = new type2("tag:yaml.org,2002:str", { kind: "scalar", construct: function(data) { return data !== null ? data : ""; } }); var seq = new type2("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(data) { return data !== null ? data : []; } }); var map4 = new type2("tag:yaml.org,2002:map", { kind: "mapping", construct: function(data) { return data !== null ? data : {}; } }); var failsafe = new schema({ explicit: [ str, seq, map4 ] }); function resolveYamlNull(data) { if (data === null) return true; var max5 = data.length; return max5 === 1 && data === "~" || max5 === 4 && (data === "null" || data === "Null" || data === "NULL"); } function constructYamlNull() { return null; } function isNull(object) { return object === null; } var _null = new type2("tag:yaml.org,2002:null", { kind: "scalar", resolve: resolveYamlNull, construct: constructYamlNull, predicate: isNull, represent: { canonical: function() { return "~"; }, lowercase: function() { return "null"; }, uppercase: function() { return "NULL"; }, camelcase: function() { return "Null"; }, empty: function() { return ""; } }, defaultStyle: "lowercase" }); function resolveYamlBoolean(data) { if (data === null) return false; var max5 = data.length; return max5 === 4 && (data === "true" || data === "True" || data === "TRUE") || max5 === 5 && (data === "false" || data === "False" || data === "FALSE"); } function constructYamlBoolean(data) { return data === "true" || data === "True" || data === "TRUE"; } function isBoolean(object) { return Object.prototype.toString.call(object) === "[object Boolean]"; } var bool = new type2("tag:yaml.org,2002:bool", { kind: "scalar", resolve: resolveYamlBoolean, construct: constructYamlBoolean, predicate: isBoolean, represent: { lowercase: function(object) { return object ? "true" : "false"; }, uppercase: function(object) { return object ? "TRUE" : "FALSE"; }, camelcase: function(object) { return object ? "True" : "False"; } }, defaultStyle: "lowercase" }); function isHexCode(c3) { return 48 <= c3 && c3 <= 57 || 65 <= c3 && c3 <= 70 || 97 <= c3 && c3 <= 102; } function isOctCode(c3) { return 48 <= c3 && c3 <= 55; } function isDecCode(c3) { return 48 <= c3 && c3 <= 57; } function resolveYamlInteger(data) { if (data === null) return false; var max5 = data.length, index2 = 0, hasDigits = false, ch; if (!max5) return false; ch = data[index2]; if (ch === "-" || ch === "+") { ch = data[++index2]; } if (ch === "0") { if (index2 + 1 === max5) return true; ch = data[++index2]; if (ch === "b") { index2++; for (; index2 < max5; index2++) { ch = data[index2]; if (ch === "_") continue; if (ch !== "0" && ch !== "1") return false; hasDigits = true; } return hasDigits && ch !== "_"; } if (ch === "x") { index2++; for (; index2 < max5; index2++) { ch = data[index2]; if (ch === "_") continue; if (!isHexCode(data.charCodeAt(index2))) return false; hasDigits = true; } return hasDigits && ch !== "_"; } if (ch === "o") { index2++; for (; index2 < max5; index2++) { ch = data[index2]; if (ch === "_") continue; if (!isOctCode(data.charCodeAt(index2))) return false; hasDigits = true; } return hasDigits && ch !== "_"; } } if (ch === "_") return false; for (; index2 < max5; index2++) { ch = data[index2]; if (ch === "_") continue; if (!isDecCode(data.charCodeAt(index2))) { return false; } hasDigits = true; } if (!hasDigits || ch === "_") return false; return true; } function constructYamlInteger(data) { var value = data, sign3 = 1, ch; if (value.indexOf("_") !== -1) { value = value.replace(/_/g, ""); } ch = value[0]; if (ch === "-" || ch === "+") { if (ch === "-") sign3 = -1; value = value.slice(1); ch = value[0]; } if (value === "0") return 0; if (ch === "0") { if (value[1] === "b") return sign3 * parseInt(value.slice(2), 2); if (value[1] === "x") return sign3 * parseInt(value.slice(2), 16); if (value[1] === "o") return sign3 * parseInt(value.slice(2), 8); } return sign3 * parseInt(value, 10); } function isInteger(object) { return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); } var int = new type2("tag:yaml.org,2002:int", { kind: "scalar", resolve: resolveYamlInteger, construct: constructYamlInteger, predicate: isInteger, represent: { binary: function(obj) { return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); }, octal: function(obj) { return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); }, decimal: function(obj) { return obj.toString(10); }, /* eslint-disable max-len */ hexadecimal: function(obj) { return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); } }, defaultStyle: "decimal", styleAliases: { binary: [2, "bin"], octal: [8, "oct"], decimal: [10, "dec"], hexadecimal: [16, "hex"] } }); var YAML_FLOAT_PATTERN = new RegExp( // 2.5e4, 2.5 and integers "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" ); function resolveYamlFloat(data) { if (data === null) return false; if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` // Probably should update regexp & check speed data[data.length - 1] === "_") { return false; } return true; } function constructYamlFloat(data) { var value, sign3; value = data.replace(/_/g, "").toLowerCase(); sign3 = value[0] === "-" ? -1 : 1; if ("+-".indexOf(value[0]) >= 0) { value = value.slice(1); } if (value === ".inf") { return sign3 === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; } else if (value === ".nan") { return NaN; } return sign3 * parseFloat(value, 10); } var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; function representYamlFloat(object, style) { var res; if (isNaN(object)) { switch (style) { case "lowercase": return ".nan"; case "uppercase": return ".NAN"; case "camelcase": return ".NaN"; } } else if (Number.POSITIVE_INFINITY === object) { switch (style) { case "lowercase": return ".inf"; case "uppercase": return ".INF"; case "camelcase": return ".Inf"; } } else if (Number.NEGATIVE_INFINITY === object) { switch (style) { case "lowercase": return "-.inf"; case "uppercase": return "-.INF"; case "camelcase": return "-.Inf"; } } else if (common.isNegativeZero(object)) { return "-0.0"; } res = object.toString(10); return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; } function isFloat(object) { return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); } var float = new type2("tag:yaml.org,2002:float", { kind: "scalar", resolve: resolveYamlFloat, construct: constructYamlFloat, predicate: isFloat, represent: representYamlFloat, defaultStyle: "lowercase" }); var json = failsafe.extend({ implicit: [ _null, bool, int, float ] }); var core = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); var YAML_TIMESTAMP_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" ); function resolveYamlTimestamp(data) { if (data === null) return false; if (YAML_DATE_REGEXP.exec(data) !== null) return true; if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; return false; } function constructYamlTimestamp(data) { var match2, year, month, day, hour, minute, second2, fraction = 0, delta = null, tz_hour, tz_minute, date2; match2 = YAML_DATE_REGEXP.exec(data); if (match2 === null) match2 = YAML_TIMESTAMP_REGEXP.exec(data); if (match2 === null) throw new Error("Date resolve error"); year = +match2[1]; month = +match2[2] - 1; day = +match2[3]; if (!match2[4]) { return new Date(Date.UTC(year, month, day)); } hour = +match2[4]; minute = +match2[5]; second2 = +match2[6]; if (match2[7]) { fraction = match2[7].slice(0, 3); while (fraction.length < 3) { fraction += "0"; } fraction = +fraction; } if (match2[9]) { tz_hour = +match2[10]; tz_minute = +(match2[11] || 0); delta = (tz_hour * 60 + tz_minute) * 6e4; if (match2[9] === "-") delta = -delta; } date2 = new Date(Date.UTC(year, month, day, hour, minute, second2, fraction)); if (delta) date2.setTime(date2.getTime() - delta); return date2; } function representYamlTimestamp(object) { return object.toISOString(); } var timestamp = new type2("tag:yaml.org,2002:timestamp", { kind: "scalar", resolve: resolveYamlTimestamp, construct: constructYamlTimestamp, instanceOf: Date, represent: representYamlTimestamp }); function resolveYamlMerge(data) { return data === "<<" || data === null; } var merge3 = new type2("tag:yaml.org,2002:merge", { kind: "scalar", resolve: resolveYamlMerge }); var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; function resolveYamlBinary(data) { if (data === null) return false; var code, idx, bitlen = 0, max5 = data.length, map22 = BASE64_MAP; for (idx = 0; idx < max5; idx++) { code = map22.indexOf(data.charAt(idx)); if (code > 64) continue; if (code < 0) return false; bitlen += 6; } return bitlen % 8 === 0; } function constructYamlBinary(data) { var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max5 = input.length, map22 = BASE64_MAP, bits = 0, result = []; for (idx = 0; idx < max5; idx++) { if (idx % 4 === 0 && idx) { result.push(bits >> 16 & 255); result.push(bits >> 8 & 255); result.push(bits & 255); } bits = bits << 6 | map22.indexOf(input.charAt(idx)); } tailbits = max5 % 4 * 6; if (tailbits === 0) { result.push(bits >> 16 & 255); result.push(bits >> 8 & 255); result.push(bits & 255); } else if (tailbits === 18) { result.push(bits >> 10 & 255); result.push(bits >> 2 & 255); } else if (tailbits === 12) { result.push(bits >> 4 & 255); } return new Uint8Array(result); } function representYamlBinary(object) { var result = "", bits = 0, idx, tail, max5 = object.length, map22 = BASE64_MAP; for (idx = 0; idx < max5; idx++) { if (idx % 3 === 0 && idx) { result += map22[bits >> 18 & 63]; result += map22[bits >> 12 & 63]; result += map22[bits >> 6 & 63]; result += map22[bits & 63]; } bits = (bits << 8) + object[idx]; } tail = max5 % 3; if (tail === 0) { result += map22[bits >> 18 & 63]; result += map22[bits >> 12 & 63]; result += map22[bits >> 6 & 63]; result += map22[bits & 63]; } else if (tail === 2) { result += map22[bits >> 10 & 63]; result += map22[bits >> 4 & 63]; result += map22[bits << 2 & 63]; result += map22[64]; } else if (tail === 1) { result += map22[bits >> 2 & 63]; result += map22[bits << 4 & 63]; result += map22[64]; result += map22[64]; } return result; } function isBinary(obj) { return Object.prototype.toString.call(obj) === "[object Uint8Array]"; } var binary = new type2("tag:yaml.org,2002:binary", { kind: "scalar", resolve: resolveYamlBinary, construct: constructYamlBinary, predicate: isBinary, represent: representYamlBinary }); var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; var _toString$2 = Object.prototype.toString; function resolveYamlOmap(data) { if (data === null) return true; var objectKeys = [], index2, length2, pair, pairKey, pairHasKey, object = data; for (index2 = 0, length2 = object.length; index2 < length2; index2 += 1) { pair = object[index2]; pairHasKey = false; if (_toString$2.call(pair) !== "[object Object]") return false; for (pairKey in pair) { if (_hasOwnProperty$3.call(pair, pairKey)) { if (!pairHasKey) pairHasKey = true; else return false; } } if (!pairHasKey) return false; if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); else return false; } return true; } function constructYamlOmap(data) { return data !== null ? data : []; } var omap = new type2("tag:yaml.org,2002:omap", { kind: "sequence", resolve: resolveYamlOmap, construct: constructYamlOmap }); var _toString$1 = Object.prototype.toString; function resolveYamlPairs(data) { if (data === null) return true; var index2, length2, pair, keys, result, object = data; result = new Array(object.length); for (index2 = 0, length2 = object.length; index2 < length2; index2 += 1) { pair = object[index2]; if (_toString$1.call(pair) !== "[object Object]") return false; keys = Object.keys(pair); if (keys.length !== 1) return false; result[index2] = [keys[0], pair[keys[0]]]; } return true; } function constructYamlPairs(data) { if (data === null) return []; var index2, length2, pair, keys, result, object = data; result = new Array(object.length); for (index2 = 0, length2 = object.length; index2 < length2; index2 += 1) { pair = object[index2]; keys = Object.keys(pair); result[index2] = [keys[0], pair[keys[0]]]; } return result; } var pairs2 = new type2("tag:yaml.org,2002:pairs", { kind: "sequence", resolve: resolveYamlPairs, construct: constructYamlPairs }); var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; function resolveYamlSet(data) { if (data === null) return true; var key, object = data; for (key in object) { if (_hasOwnProperty$2.call(object, key)) { if (object[key] !== null) return false; } } return true; } function constructYamlSet(data) { return data !== null ? data : {}; } var set = new type2("tag:yaml.org,2002:set", { kind: "mapping", resolve: resolveYamlSet, construct: constructYamlSet }); var _default = core.extend({ implicit: [ timestamp, merge3 ], explicit: [ binary, omap, pairs2, set ] }); var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; var CONTEXT_FLOW_IN = 1; var CONTEXT_FLOW_OUT = 2; var CONTEXT_BLOCK_IN = 3; var CONTEXT_BLOCK_OUT = 4; var CHOMPING_CLIP = 1; var CHOMPING_STRIP = 2; var CHOMPING_KEEP = 3; var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; function _class(obj) { return Object.prototype.toString.call(obj); } function is_EOL(c3) { return c3 === 10 || c3 === 13; } function is_WHITE_SPACE(c3) { return c3 === 9 || c3 === 32; } function is_WS_OR_EOL(c3) { return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13; } function is_FLOW_INDICATOR(c3) { return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125; } function fromHexCode(c3) { var lc; if (48 <= c3 && c3 <= 57) { return c3 - 48; } lc = c3 | 32; if (97 <= lc && lc <= 102) { return lc - 97 + 10; } return -1; } function escapedHexLen(c3) { if (c3 === 120) { return 2; } if (c3 === 117) { return 4; } if (c3 === 85) { return 8; } return 0; } function fromDecimalCode(c3) { if (48 <= c3 && c3 <= 57) { return c3 - 48; } return -1; } function simpleEscapeSequence(c3) { return c3 === 48 ? "\0" : c3 === 97 ? "\x07" : c3 === 98 ? "\b" : c3 === 116 ? " " : c3 === 9 ? " " : c3 === 110 ? "\n" : c3 === 118 ? "\v" : c3 === 102 ? "\f" : c3 === 114 ? "\r" : c3 === 101 ? "\x1B" : c3 === 32 ? " " : c3 === 34 ? '"' : c3 === 47 ? "/" : c3 === 92 ? "\\" : c3 === 78 ? "…" : c3 === 95 ? " " : c3 === 76 ? "\u2028" : c3 === 80 ? "\u2029" : ""; } function charFromCodepoint(c3) { if (c3 <= 65535) { return String.fromCharCode(c3); } return String.fromCharCode( (c3 - 65536 >> 10) + 55296, (c3 - 65536 & 1023) + 56320 ); } var simpleEscapeCheck = new Array(256); var simpleEscapeMap = new Array(256); for (i = 0; i < 256; i++) { simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; simpleEscapeMap[i] = simpleEscapeSequence(i); } var i; function State$1(input, options) { this.input = input; this.filename = options["filename"] || null; this.schema = options["schema"] || _default; this.onWarning = options["onWarning"] || null; this.legacy = options["legacy"] || false; this.json = options["json"] || false; this.listener = options["listener"] || null; this.implicitTypes = this.schema.compiledImplicit; this.typeMap = this.schema.compiledTypeMap; this.length = input.length; this.position = 0; this.line = 0; this.lineStart = 0; this.lineIndent = 0; this.firstTabInLine = -1; this.documents = []; } function generateError(state2, message) { var mark = { name: state2.filename, buffer: state2.input.slice(0, -1), // omit trailing \0 position: state2.position, line: state2.line, column: state2.position - state2.lineStart }; mark.snippet = snippet(mark); return new exception(message, mark); } function throwError(state2, message) { throw generateError(state2, message); } function throwWarning(state2, message) { if (state2.onWarning) { state2.onWarning.call(null, generateError(state2, message)); } } var directiveHandlers = { YAML: function handleYamlDirective(state2, name, args) { var match2, major, minor; if (state2.version !== null) { throwError(state2, "duplication of %YAML directive"); } if (args.length !== 1) { throwError(state2, "YAML directive accepts exactly one argument"); } match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); if (match2 === null) { throwError(state2, "ill-formed argument of the YAML directive"); } major = parseInt(match2[1], 10); minor = parseInt(match2[2], 10); if (major !== 1) { throwError(state2, "unacceptable YAML version of the document"); } state2.version = args[0]; state2.checkLineBreaks = minor < 2; if (minor !== 1 && minor !== 2) { throwWarning(state2, "unsupported YAML version of the document"); } }, TAG: function handleTagDirective(state2, name, args) { var handle, prefix2; if (args.length !== 2) { throwError(state2, "TAG directive accepts exactly two arguments"); } handle = args[0]; prefix2 = args[1]; if (!PATTERN_TAG_HANDLE.test(handle)) { throwError(state2, "ill-formed tag handle (first argument) of the TAG directive"); } if (_hasOwnProperty$1.call(state2.tagMap, handle)) { throwError(state2, 'there is a previously declared suffix for "' + handle + '" tag handle'); } if (!PATTERN_TAG_URI.test(prefix2)) { throwError(state2, "ill-formed tag prefix (second argument) of the TAG directive"); } try { prefix2 = decodeURIComponent(prefix2); } catch (err) { throwError(state2, "tag prefix is malformed: " + prefix2); } state2.tagMap[handle] = prefix2; } }; function captureSegment(state2, start, end, checkJson) { var _position, _length, _character, _result; if (start < end) { _result = state2.input.slice(start, end); if (checkJson) { for (_position = 0, _length = _result.length; _position < _length; _position += 1) { _character = _result.charCodeAt(_position); if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { throwError(state2, "expected valid JSON character"); } } } else if (PATTERN_NON_PRINTABLE.test(_result)) { throwError(state2, "the stream contains non-printable characters"); } state2.result += _result; } } function mergeMappings(state2, destination, source, overridableKeys) { var sourceKeys, key, index2, quantity; if (!common.isObject(source)) { throwError(state2, "cannot merge mappings; the provided source object is unacceptable"); } sourceKeys = Object.keys(source); for (index2 = 0, quantity = sourceKeys.length; index2 < quantity; index2 += 1) { key = sourceKeys[index2]; if (!_hasOwnProperty$1.call(destination, key)) { destination[key] = source[key]; overridableKeys[key] = true; } } } function storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { var index2, quantity; if (Array.isArray(keyNode)) { keyNode = Array.prototype.slice.call(keyNode); for (index2 = 0, quantity = keyNode.length; index2 < quantity; index2 += 1) { if (Array.isArray(keyNode[index2])) { throwError(state2, "nested arrays are not supported inside keys"); } if (typeof keyNode === "object" && _class(keyNode[index2]) === "[object Object]") { keyNode[index2] = "[object Object]"; } } } if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { keyNode = "[object Object]"; } keyNode = String(keyNode); if (_result === null) { _result = {}; } if (keyTag === "tag:yaml.org,2002:merge") { if (Array.isArray(valueNode)) { for (index2 = 0, quantity = valueNode.length; index2 < quantity; index2 += 1) { mergeMappings(state2, _result, valueNode[index2], overridableKeys); } } else { mergeMappings(state2, _result, valueNode, overridableKeys); } } else { if (!state2.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { state2.line = startLine || state2.line; state2.lineStart = startLineStart || state2.lineStart; state2.position = startPos || state2.position; throwError(state2, "duplicated mapping key"); } if (keyNode === "__proto__") { Object.defineProperty(_result, keyNode, { configurable: true, enumerable: true, writable: true, value: valueNode }); } else { _result[keyNode] = valueNode; } delete overridableKeys[keyNode]; } return _result; } function readLineBreak(state2) { var ch; ch = state2.input.charCodeAt(state2.position); if (ch === 10) { state2.position++; } else if (ch === 13) { state2.position++; if (state2.input.charCodeAt(state2.position) === 10) { state2.position++; } } else { throwError(state2, "a line break is expected"); } state2.line += 1; state2.lineStart = state2.position; state2.firstTabInLine = -1; } function skipSeparationSpace(state2, allowComments, checkIndent) { var lineBreaks = 0, ch = state2.input.charCodeAt(state2.position); while (ch !== 0) { while (is_WHITE_SPACE(ch)) { if (ch === 9 && state2.firstTabInLine === -1) { state2.firstTabInLine = state2.position; } ch = state2.input.charCodeAt(++state2.position); } if (allowComments && ch === 35) { do { ch = state2.input.charCodeAt(++state2.position); } while (ch !== 10 && ch !== 13 && ch !== 0); } if (is_EOL(ch)) { readLineBreak(state2); ch = state2.input.charCodeAt(state2.position); lineBreaks++; state2.lineIndent = 0; while (ch === 32) { state2.lineIndent++; ch = state2.input.charCodeAt(++state2.position); } } else { break; } } if (checkIndent !== -1 && lineBreaks !== 0 && state2.lineIndent < checkIndent) { throwWarning(state2, "deficient indentation"); } return lineBreaks; } function testDocumentSeparator(state2) { var _position = state2.position, ch; ch = state2.input.charCodeAt(_position); if ((ch === 45 || ch === 46) && ch === state2.input.charCodeAt(_position + 1) && ch === state2.input.charCodeAt(_position + 2)) { _position += 3; ch = state2.input.charCodeAt(_position); if (ch === 0 || is_WS_OR_EOL(ch)) { return true; } } return false; } function writeFoldedLines(state2, count3) { if (count3 === 1) { state2.result += " "; } else if (count3 > 1) { state2.result += common.repeat("\n", count3 - 1); } } function readPlainScalar(state2, nodeIndent, withinFlowCollection) { var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state2.kind, _result = state2.result, ch; ch = state2.input.charCodeAt(state2.position); if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { return false; } if (ch === 63 || ch === 45) { following = state2.input.charCodeAt(state2.position + 1); if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { return false; } } state2.kind = "scalar"; state2.result = ""; captureStart = captureEnd = state2.position; hasPendingContent = false; while (ch !== 0) { if (ch === 58) { following = state2.input.charCodeAt(state2.position + 1); if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { break; } } else if (ch === 35) { preceding = state2.input.charCodeAt(state2.position - 1); if (is_WS_OR_EOL(preceding)) { break; } } else if (state2.position === state2.lineStart && testDocumentSeparator(state2) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { break; } else if (is_EOL(ch)) { _line = state2.line; _lineStart = state2.lineStart; _lineIndent = state2.lineIndent; skipSeparationSpace(state2, false, -1); if (state2.lineIndent >= nodeIndent) { hasPendingContent = true; ch = state2.input.charCodeAt(state2.position); continue; } else { state2.position = captureEnd; state2.line = _line; state2.lineStart = _lineStart; state2.lineIndent = _lineIndent; break; } } if (hasPendingContent) { captureSegment(state2, captureStart, captureEnd, false); writeFoldedLines(state2, state2.line - _line); captureStart = captureEnd = state2.position; hasPendingContent = false; } if (!is_WHITE_SPACE(ch)) { captureEnd = state2.position + 1; } ch = state2.input.charCodeAt(++state2.position); } captureSegment(state2, captureStart, captureEnd, false); if (state2.result) { return true; } state2.kind = _kind; state2.result = _result; return false; } function readSingleQuotedScalar(state2, nodeIndent) { var ch, captureStart, captureEnd; ch = state2.input.charCodeAt(state2.position); if (ch !== 39) { return false; } state2.kind = "scalar"; state2.result = ""; state2.position++; captureStart = captureEnd = state2.position; while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { if (ch === 39) { captureSegment(state2, captureStart, state2.position, true); ch = state2.input.charCodeAt(++state2.position); if (ch === 39) { captureStart = state2.position; state2.position++; captureEnd = state2.position; } else { return true; } } else if (is_EOL(ch)) { captureSegment(state2, captureStart, captureEnd, true); writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent)); captureStart = captureEnd = state2.position; } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { throwError(state2, "unexpected end of the document within a single quoted scalar"); } else { state2.position++; captureEnd = state2.position; } } throwError(state2, "unexpected end of the stream within a single quoted scalar"); } function readDoubleQuotedScalar(state2, nodeIndent) { var captureStart, captureEnd, hexLength, hexResult, tmp, ch; ch = state2.input.charCodeAt(state2.position); if (ch !== 34) { return false; } state2.kind = "scalar"; state2.result = ""; state2.position++; captureStart = captureEnd = state2.position; while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { if (ch === 34) { captureSegment(state2, captureStart, state2.position, true); state2.position++; return true; } else if (ch === 92) { captureSegment(state2, captureStart, state2.position, true); ch = state2.input.charCodeAt(++state2.position); if (is_EOL(ch)) { skipSeparationSpace(state2, false, nodeIndent); } else if (ch < 256 && simpleEscapeCheck[ch]) { state2.result += simpleEscapeMap[ch]; state2.position++; } else if ((tmp = escapedHexLen(ch)) > 0) { hexLength = tmp; hexResult = 0; for (; hexLength > 0; hexLength--) { ch = state2.input.charCodeAt(++state2.position); if ((tmp = fromHexCode(ch)) >= 0) { hexResult = (hexResult << 4) + tmp; } else { throwError(state2, "expected hexadecimal character"); } } state2.result += charFromCodepoint(hexResult); state2.position++; } else { throwError(state2, "unknown escape sequence"); } captureStart = captureEnd = state2.position; } else if (is_EOL(ch)) { captureSegment(state2, captureStart, captureEnd, true); writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent)); captureStart = captureEnd = state2.position; } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { throwError(state2, "unexpected end of the document within a double quoted scalar"); } else { state2.position++; captureEnd = state2.position; } } throwError(state2, "unexpected end of the stream within a double quoted scalar"); } function readFlowCollection(state2, nodeIndent) { var readNext = true, _line, _lineStart, _pos, _tag = state2.tag, _result, _anchor = state2.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; ch = state2.input.charCodeAt(state2.position); if (ch === 91) { terminator = 93; isMapping = false; _result = []; } else if (ch === 123) { terminator = 125; isMapping = true; _result = {}; } else { return false; } if (state2.anchor !== null) { state2.anchorMap[state2.anchor] = _result; } ch = state2.input.charCodeAt(++state2.position); while (ch !== 0) { skipSeparationSpace(state2, true, nodeIndent); ch = state2.input.charCodeAt(state2.position); if (ch === terminator) { state2.position++; state2.tag = _tag; state2.anchor = _anchor; state2.kind = isMapping ? "mapping" : "sequence"; state2.result = _result; return true; } else if (!readNext) { throwError(state2, "missed comma between flow collection entries"); } else if (ch === 44) { throwError(state2, "expected the node content, but found ','"); } keyTag = keyNode = valueNode = null; isPair = isExplicitPair = false; if (ch === 63) { following = state2.input.charCodeAt(state2.position + 1); if (is_WS_OR_EOL(following)) { isPair = isExplicitPair = true; state2.position++; skipSeparationSpace(state2, true, nodeIndent); } } _line = state2.line; _lineStart = state2.lineStart; _pos = state2.position; composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true); keyTag = state2.tag; keyNode = state2.result; skipSeparationSpace(state2, true, nodeIndent); ch = state2.input.charCodeAt(state2.position); if ((isExplicitPair || state2.line === _line) && ch === 58) { isPair = true; ch = state2.input.charCodeAt(++state2.position); skipSeparationSpace(state2, true, nodeIndent); composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true); valueNode = state2.result; } if (isMapping) { storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); } else if (isPair) { _result.push(storeMappingPair(state2, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); } else { _result.push(keyNode); } skipSeparationSpace(state2, true, nodeIndent); ch = state2.input.charCodeAt(state2.position); if (ch === 44) { readNext = true; ch = state2.input.charCodeAt(++state2.position); } else { readNext = false; } } throwError(state2, "unexpected end of the stream within a flow collection"); } function readBlockScalar(state2, nodeIndent) { var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; ch = state2.input.charCodeAt(state2.position); if (ch === 124) { folding = false; } else if (ch === 62) { folding = true; } else { return false; } state2.kind = "scalar"; state2.result = ""; while (ch !== 0) { ch = state2.input.charCodeAt(++state2.position); if (ch === 43 || ch === 45) { if (CHOMPING_CLIP === chomping) { chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; } else { throwError(state2, "repeat of a chomping mode identifier"); } } else if ((tmp = fromDecimalCode(ch)) >= 0) { if (tmp === 0) { throwError(state2, "bad explicit indentation width of a block scalar; it cannot be less than one"); } else if (!detectedIndent) { textIndent = nodeIndent + tmp - 1; detectedIndent = true; } else { throwError(state2, "repeat of an indentation width identifier"); } } else { break; } } if (is_WHITE_SPACE(ch)) { do { ch = state2.input.charCodeAt(++state2.position); } while (is_WHITE_SPACE(ch)); if (ch === 35) { do { ch = state2.input.charCodeAt(++state2.position); } while (!is_EOL(ch) && ch !== 0); } } while (ch !== 0) { readLineBreak(state2); state2.lineIndent = 0; ch = state2.input.charCodeAt(state2.position); while ((!detectedIndent || state2.lineIndent < textIndent) && ch === 32) { state2.lineIndent++; ch = state2.input.charCodeAt(++state2.position); } if (!detectedIndent && state2.lineIndent > textIndent) { textIndent = state2.lineIndent; } if (is_EOL(ch)) { emptyLines++; continue; } if (state2.lineIndent < textIndent) { if (chomping === CHOMPING_KEEP) { state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } else if (chomping === CHOMPING_CLIP) { if (didReadContent) { state2.result += "\n"; } } break; } if (folding) { if (is_WHITE_SPACE(ch)) { atMoreIndented = true; state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } else if (atMoreIndented) { atMoreIndented = false; state2.result += common.repeat("\n", emptyLines + 1); } else if (emptyLines === 0) { if (didReadContent) { state2.result += " "; } } else { state2.result += common.repeat("\n", emptyLines); } } else { state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } didReadContent = true; detectedIndent = true; emptyLines = 0; captureStart = state2.position; while (!is_EOL(ch) && ch !== 0) { ch = state2.input.charCodeAt(++state2.position); } captureSegment(state2, captureStart, state2.position, false); } return true; } function readBlockSequence(state2, nodeIndent) { var _line, _tag = state2.tag, _anchor = state2.anchor, _result = [], following, detected = false, ch; if (state2.firstTabInLine !== -1) return false; if (state2.anchor !== null) { state2.anchorMap[state2.anchor] = _result; } ch = state2.input.charCodeAt(state2.position); while (ch !== 0) { if (state2.firstTabInLine !== -1) { state2.position = state2.firstTabInLine; throwError(state2, "tab characters must not be used in indentation"); } if (ch !== 45) { break; } following = state2.input.charCodeAt(state2.position + 1); if (!is_WS_OR_EOL(following)) { break; } detected = true; state2.position++; if (skipSeparationSpace(state2, true, -1)) { if (state2.lineIndent <= nodeIndent) { _result.push(null); ch = state2.input.charCodeAt(state2.position); continue; } } _line = state2.line; composeNode(state2, nodeIndent, CONTEXT_BLOCK_IN, false, true); _result.push(state2.result); skipSeparationSpace(state2, true, -1); ch = state2.input.charCodeAt(state2.position); if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) { throwError(state2, "bad indentation of a sequence entry"); } else if (state2.lineIndent < nodeIndent) { break; } } if (detected) { state2.tag = _tag; state2.anchor = _anchor; state2.kind = "sequence"; state2.result = _result; return true; } return false; } function readBlockMapping(state2, nodeIndent, flowIndent) { var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state2.tag, _anchor = state2.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; if (state2.firstTabInLine !== -1) return false; if (state2.anchor !== null) { state2.anchorMap[state2.anchor] = _result; } ch = state2.input.charCodeAt(state2.position); while (ch !== 0) { if (!atExplicitKey && state2.firstTabInLine !== -1) { state2.position = state2.firstTabInLine; throwError(state2, "tab characters must not be used in indentation"); } following = state2.input.charCodeAt(state2.position + 1); _line = state2.line; if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { if (ch === 63) { if (atExplicitKey) { storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } detected = true; atExplicitKey = true; allowCompact = true; } else if (atExplicitKey) { atExplicitKey = false; allowCompact = true; } else { throwError(state2, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); } state2.position += 1; ch = following; } else { _keyLine = state2.line; _keyLineStart = state2.lineStart; _keyPos = state2.position; if (!composeNode(state2, flowIndent, CONTEXT_FLOW_OUT, false, true)) { break; } if (state2.line === _line) { ch = state2.input.charCodeAt(state2.position); while (is_WHITE_SPACE(ch)) { ch = state2.input.charCodeAt(++state2.position); } if (ch === 58) { ch = state2.input.charCodeAt(++state2.position); if (!is_WS_OR_EOL(ch)) { throwError(state2, "a whitespace character is expected after the key-value separator within a block mapping"); } if (atExplicitKey) { storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } detected = true; atExplicitKey = false; allowCompact = false; keyTag = state2.tag; keyNode = state2.result; } else if (detected) { throwError(state2, "can not read an implicit mapping pair; a colon is missed"); } else { state2.tag = _tag; state2.anchor = _anchor; return true; } } else if (detected) { throwError(state2, "can not read a block mapping entry; a multiline key may not be an implicit key"); } else { state2.tag = _tag; state2.anchor = _anchor; return true; } } if (state2.line === _line || state2.lineIndent > nodeIndent) { if (atExplicitKey) { _keyLine = state2.line; _keyLineStart = state2.lineStart; _keyPos = state2.position; } if (composeNode(state2, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { if (atExplicitKey) { keyNode = state2.result; } else { valueNode = state2.result; } } if (!atExplicitKey) { storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } skipSeparationSpace(state2, true, -1); ch = state2.input.charCodeAt(state2.position); } if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) { throwError(state2, "bad indentation of a mapping entry"); } else if (state2.lineIndent < nodeIndent) { break; } } if (atExplicitKey) { storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); } if (detected) { state2.tag = _tag; state2.anchor = _anchor; state2.kind = "mapping"; state2.result = _result; } return detected; } function readTagProperty(state2) { var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; ch = state2.input.charCodeAt(state2.position); if (ch !== 33) return false; if (state2.tag !== null) { throwError(state2, "duplication of a tag property"); } ch = state2.input.charCodeAt(++state2.position); if (ch === 60) { isVerbatim = true; ch = state2.input.charCodeAt(++state2.position); } else if (ch === 33) { isNamed = true; tagHandle = "!!"; ch = state2.input.charCodeAt(++state2.position); } else { tagHandle = "!"; } _position = state2.position; if (isVerbatim) { do { ch = state2.input.charCodeAt(++state2.position); } while (ch !== 0 && ch !== 62); if (state2.position < state2.length) { tagName = state2.input.slice(_position, state2.position); ch = state2.input.charCodeAt(++state2.position); } else { throwError(state2, "unexpected end of the stream within a verbatim tag"); } } else { while (ch !== 0 && !is_WS_OR_EOL(ch)) { if (ch === 33) { if (!isNamed) { tagHandle = state2.input.slice(_position - 1, state2.position + 1); if (!PATTERN_TAG_HANDLE.test(tagHandle)) { throwError(state2, "named tag handle cannot contain such characters"); } isNamed = true; _position = state2.position + 1; } else { throwError(state2, "tag suffix cannot contain exclamation marks"); } } ch = state2.input.charCodeAt(++state2.position); } tagName = state2.input.slice(_position, state2.position); if (PATTERN_FLOW_INDICATORS.test(tagName)) { throwError(state2, "tag suffix cannot contain flow indicator characters"); } } if (tagName && !PATTERN_TAG_URI.test(tagName)) { throwError(state2, "tag name cannot contain such characters: " + tagName); } try { tagName = decodeURIComponent(tagName); } catch (err) { throwError(state2, "tag name is malformed: " + tagName); } if (isVerbatim) { state2.tag = tagName; } else if (_hasOwnProperty$1.call(state2.tagMap, tagHandle)) { state2.tag = state2.tagMap[tagHandle] + tagName; } else if (tagHandle === "!") { state2.tag = "!" + tagName; } else if (tagHandle === "!!") { state2.tag = "tag:yaml.org,2002:" + tagName; } else { throwError(state2, 'undeclared tag handle "' + tagHandle + '"'); } return true; } function readAnchorProperty(state2) { var _position, ch; ch = state2.input.charCodeAt(state2.position); if (ch !== 38) return false; if (state2.anchor !== null) { throwError(state2, "duplication of an anchor property"); } ch = state2.input.charCodeAt(++state2.position); _position = state2.position; while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { ch = state2.input.charCodeAt(++state2.position); } if (state2.position === _position) { throwError(state2, "name of an anchor node must contain at least one character"); } state2.anchor = state2.input.slice(_position, state2.position); return true; } function readAlias(state2) { var _position, alias, ch; ch = state2.input.charCodeAt(state2.position); if (ch !== 42) return false; ch = state2.input.charCodeAt(++state2.position); _position = state2.position; while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { ch = state2.input.charCodeAt(++state2.position); } if (state2.position === _position) { throwError(state2, "name of an alias node must contain at least one character"); } alias = state2.input.slice(_position, state2.position); if (!_hasOwnProperty$1.call(state2.anchorMap, alias)) { throwError(state2, 'unidentified alias "' + alias + '"'); } state2.result = state2.anchorMap[alias]; skipSeparationSpace(state2, true, -1); return true; } function composeNode(state2, parentIndent, nodeContext, allowToSeek, allowCompact) { var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type22, flowIndent, blockIndent; if (state2.listener !== null) { state2.listener("open", state2); } state2.tag = null; state2.anchor = null; state2.kind = null; state2.result = null; allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; if (allowToSeek) { if (skipSeparationSpace(state2, true, -1)) { atNewLine = true; if (state2.lineIndent > parentIndent) { indentStatus = 1; } else if (state2.lineIndent === parentIndent) { indentStatus = 0; } else if (state2.lineIndent < parentIndent) { indentStatus = -1; } } } if (indentStatus === 1) { while (readTagProperty(state2) || readAnchorProperty(state2)) { if (skipSeparationSpace(state2, true, -1)) { atNewLine = true; allowBlockCollections = allowBlockStyles; if (state2.lineIndent > parentIndent) { indentStatus = 1; } else if (state2.lineIndent === parentIndent) { indentStatus = 0; } else if (state2.lineIndent < parentIndent) { indentStatus = -1; } } else { allowBlockCollections = false; } } } if (allowBlockCollections) { allowBlockCollections = atNewLine || allowCompact; } if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { flowIndent = parentIndent; } else { flowIndent = parentIndent + 1; } blockIndent = state2.position - state2.lineStart; if (indentStatus === 1) { if (allowBlockCollections && (readBlockSequence(state2, blockIndent) || readBlockMapping(state2, blockIndent, flowIndent)) || readFlowCollection(state2, flowIndent)) { hasContent = true; } else { if (allowBlockScalars && readBlockScalar(state2, flowIndent) || readSingleQuotedScalar(state2, flowIndent) || readDoubleQuotedScalar(state2, flowIndent)) { hasContent = true; } else if (readAlias(state2)) { hasContent = true; if (state2.tag !== null || state2.anchor !== null) { throwError(state2, "alias node should not have any properties"); } } else if (readPlainScalar(state2, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { hasContent = true; if (state2.tag === null) { state2.tag = "?"; } } if (state2.anchor !== null) { state2.anchorMap[state2.anchor] = state2.result; } } } else if (indentStatus === 0) { hasContent = allowBlockCollections && readBlockSequence(state2, blockIndent); } } if (state2.tag === null) { if (state2.anchor !== null) { state2.anchorMap[state2.anchor] = state2.result; } } else if (state2.tag === "?") { if (state2.result !== null && state2.kind !== "scalar") { throwError(state2, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state2.kind + '"'); } for (typeIndex = 0, typeQuantity = state2.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { type22 = state2.implicitTypes[typeIndex]; if (type22.resolve(state2.result)) { state2.result = type22.construct(state2.result); state2.tag = type22.tag; if (state2.anchor !== null) { state2.anchorMap[state2.anchor] = state2.result; } break; } } } else if (state2.tag !== "!") { if (_hasOwnProperty$1.call(state2.typeMap[state2.kind || "fallback"], state2.tag)) { type22 = state2.typeMap[state2.kind || "fallback"][state2.tag]; } else { type22 = null; typeList = state2.typeMap.multi[state2.kind || "fallback"]; for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { if (state2.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { type22 = typeList[typeIndex]; break; } } } if (!type22) { throwError(state2, "unknown tag !<" + state2.tag + ">"); } if (state2.result !== null && type22.kind !== state2.kind) { throwError(state2, "unacceptable node kind for !<" + state2.tag + '> tag; it should be "' + type22.kind + '", not "' + state2.kind + '"'); } if (!type22.resolve(state2.result, state2.tag)) { throwError(state2, "cannot resolve a node with !<" + state2.tag + "> explicit tag"); } else { state2.result = type22.construct(state2.result, state2.tag); if (state2.anchor !== null) { state2.anchorMap[state2.anchor] = state2.result; } } } if (state2.listener !== null) { state2.listener("close", state2); } return state2.tag !== null || state2.anchor !== null || hasContent; } function readDocument(state2) { var documentStart = state2.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; state2.version = null; state2.checkLineBreaks = state2.legacy; state2.tagMap = /* @__PURE__ */ Object.create(null); state2.anchorMap = /* @__PURE__ */ Object.create(null); while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { skipSeparationSpace(state2, true, -1); ch = state2.input.charCodeAt(state2.position); if (state2.lineIndent > 0 || ch !== 37) { break; } hasDirectives = true; ch = state2.input.charCodeAt(++state2.position); _position = state2.position; while (ch !== 0 && !is_WS_OR_EOL(ch)) { ch = state2.input.charCodeAt(++state2.position); } directiveName = state2.input.slice(_position, state2.position); directiveArgs = []; if (directiveName.length < 1) { throwError(state2, "directive name must not be less than one character in length"); } while (ch !== 0) { while (is_WHITE_SPACE(ch)) { ch = state2.input.charCodeAt(++state2.position); } if (ch === 35) { do { ch = state2.input.charCodeAt(++state2.position); } while (ch !== 0 && !is_EOL(ch)); break; } if (is_EOL(ch)) break; _position = state2.position; while (ch !== 0 && !is_WS_OR_EOL(ch)) { ch = state2.input.charCodeAt(++state2.position); } directiveArgs.push(state2.input.slice(_position, state2.position)); } if (ch !== 0) readLineBreak(state2); if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { directiveHandlers[directiveName](state2, directiveName, directiveArgs); } else { throwWarning(state2, 'unknown document directive "' + directiveName + '"'); } } skipSeparationSpace(state2, true, -1); if (state2.lineIndent === 0 && state2.input.charCodeAt(state2.position) === 45 && state2.input.charCodeAt(state2.position + 1) === 45 && state2.input.charCodeAt(state2.position + 2) === 45) { state2.position += 3; skipSeparationSpace(state2, true, -1); } else if (hasDirectives) { throwError(state2, "directives end mark is expected"); } composeNode(state2, state2.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); skipSeparationSpace(state2, true, -1); if (state2.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state2.input.slice(documentStart, state2.position))) { throwWarning(state2, "non-ASCII line breaks are interpreted as content"); } state2.documents.push(state2.result); if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { if (state2.input.charCodeAt(state2.position) === 46) { state2.position += 3; skipSeparationSpace(state2, true, -1); } return; } if (state2.position < state2.length - 1) { throwError(state2, "end of the stream or a document separator is expected"); } else { return; } } function loadDocuments(input, options) { input = String(input); options = options || {}; if (input.length !== 0) { if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { input += "\n"; } if (input.charCodeAt(0) === 65279) { input = input.slice(1); } } var state2 = new State$1(input, options); var nullpos = input.indexOf("\0"); if (nullpos !== -1) { state2.position = nullpos; throwError(state2, "null byte is not allowed in input"); } state2.input += "\0"; while (state2.input.charCodeAt(state2.position) === 32) { state2.lineIndent += 1; state2.position += 1; } while (state2.position < state2.length - 1) { readDocument(state2); } return state2.documents; } function loadAll$1(input, iterator, options) { if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { options = iterator; iterator = null; } var documents = loadDocuments(input, options); if (typeof iterator !== "function") { return documents; } for (var index2 = 0, length2 = documents.length; index2 < length2; index2 += 1) { iterator(documents[index2]); } } function load$1(input, options) { var documents = loadDocuments(input, options); if (documents.length === 0) { return void 0; } else if (documents.length === 1) { return documents[0]; } throw new exception("expected a single document in the stream, but found more"); } var loadAll_1 = loadAll$1; var load_1 = load$1; var loader = { loadAll: loadAll_1, load: load_1 }; var JSON_SCHEMA = json; var load = loader.load; function extractFrontMatter(text) { const matches = text.match(frontMatterRegex); if (!matches) { return { text, metadata: {} }; } let parsed = load(matches[1], { // To support config, we need JSON schema. // https://www.yaml.org/spec/1.2/spec.html#id2803231 schema: JSON_SCHEMA }) ?? {}; parsed = typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {}; const metadata = {}; if (parsed.displayMode) { metadata.displayMode = parsed.displayMode.toString(); } if (parsed.title) { metadata.title = parsed.title.toString(); } if (parsed.config) { metadata.config = parsed.config; } return { text: text.slice(matches[0].length), metadata }; } var cleanupText = (code) => { return code.replace(/\r\n?/g, "\n").replace( /<(\w+)([^>]*)>/g, (match2, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">" ); }; var processFrontmatter = (code) => { const { text, metadata } = extractFrontMatter(code); const { displayMode, title, config: config2 = {} } = metadata; if (displayMode) { if (!config2.gantt) { config2.gantt = {}; } config2.gantt.displayMode = displayMode; } return { title, config: config2, text }; }; var processDirectives = (code) => { const initDirective = utils.detectInit(code) ?? {}; const wrapDirectives = utils.detectDirective(code, "wrap"); if (Array.isArray(wrapDirectives)) { initDirective.wrap = wrapDirectives.some(({ type: type22 }) => { }); } else if ((wrapDirectives == null ? void 0 : wrapDirectives.type) === "wrap") { initDirective.wrap = true; } return { text: removeDirectives(code), directive: initDirective }; }; function preprocessDiagram(code) { const cleanedCode = cleanupText(code); const frontMatterResult = processFrontmatter(cleanedCode); const directiveResult = processDirectives(frontMatterResult.text); const config2 = cleanAndMerge(frontMatterResult.config, directiveResult.directive); code = cleanupComments(directiveResult.text); return { code, title: frontMatterResult.title, config: config2 }; } var MAX_TEXTLENGTH = 5e4; var MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"; var SECURITY_LVL_SANDBOX = "sandbox"; var SECURITY_LVL_LOOSE = "loose"; var XMLNS_SVG_STD = "http://www.w3.org/2000/svg"; var XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink"; var XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml"; var IFRAME_WIDTH = "100%"; var IFRAME_HEIGHT = "100%"; var IFRAME_STYLES = "border:0;margin:0;"; var IFRAME_BODY_STYLE = "margin:0"; var IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups"; var IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.'; var DOMPURIFY_TAGS = ["foreignobject"]; var DOMPURIFY_ATTR = ["dominant-baseline"]; function processAndSetConfigs(text) { const processed = preprocessDiagram(text); reset(); addDirective(processed.config ?? {}); return processed; } async function parse$1(text, parseOptions) { addDiagrams(); text = processAndSetConfigs(text).code; try { await getDiagramFromText(text); } catch (error) { if (parseOptions == null ? void 0 : parseOptions.suppressErrors) { return false; } throw error; } return true; } var cssImportantStyles = (cssClass, element, cssClasses = []) => { return ` .${cssClass} ${element} { ${cssClasses.join(" !important; ")} !important; }`; }; var createCssStyles = (config2, classDefs = {}) => { var _a; let cssStyles = ""; if (config2.themeCSS !== void 0) { cssStyles += ` ${config2.themeCSS}`; } if (config2.fontFamily !== void 0) { cssStyles += ` :root { --mermaid-font-family: ${config2.fontFamily}}`; } if (config2.altFontFamily !== void 0) { cssStyles += ` :root { --mermaid-alt-font-family: ${config2.altFontFamily}}`; } if (!isEmpty_default(classDefs)) { const htmlLabels = config2.htmlLabels || ((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels); const cssHtmlElements = ["> *", "span"]; const cssShapeElements = ["rect", "polygon", "ellipse", "circle", "path"]; const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements; for (const classId in classDefs) { const styleClassDef = classDefs[classId]; if (!isEmpty_default(styleClassDef.styles)) { cssElements.forEach((cssElement) => { cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles); }); } if (!isEmpty_default(styleClassDef.textStyles)) { cssStyles += cssImportantStyles(styleClassDef.id, "tspan", styleClassDef.textStyles); } } } return cssStyles; }; var createUserStyles = (config2, graphType, classDefs, svgId) => { const userCSSstyles = createCssStyles(config2, classDefs); const allStyles = getStyles$1(graphType, userCSSstyles, config2.themeVariables); return serialize(compile(`${svgId}{${allStyles}}`), stringify); }; var cleanUpSvgCode = (svgCode = "", inSandboxMode, useArrowMarkerUrls) => { let cleanedUpSvg = svgCode; if (!useArrowMarkerUrls && !inSandboxMode) { cleanedUpSvg = cleanedUpSvg.replace( /marker-end="url\([\d+./:=?A-Za-z-]*?#/g, 'marker-end="url(#' ); } cleanedUpSvg = decodeEntities(cleanedUpSvg); cleanedUpSvg = cleanedUpSvg.replace(/
/g, "
"); return cleanedUpSvg; }; var putIntoIFrame = (svgCode = "", svgElement) => { var _a, _b; const height = ((_b = (_a = svgElement == null ? void 0 : svgElement.viewBox) == null ? void 0 : _a.baseVal) == null ? void 0 : _b.height) ? svgElement.viewBox.baseVal.height + "px" : IFRAME_HEIGHT; const base64encodedSrc = btoa('' + svgCode + ""); return ``; }; var appendDivSvgG = (parentRoot, id2, enclosingDivId, divStyle, svgXlink) => { const enclosingDiv = parentRoot.append("div"); enclosingDiv.attr("id", enclosingDivId); if (divStyle) { enclosingDiv.attr("style", divStyle); } const svgNode = enclosingDiv.append("svg").attr("id", id2).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD); if (svgXlink) { svgNode.attr("xmlns:xlink", svgXlink); } svgNode.append("g"); return parentRoot; }; function sandboxedIframe(parentNode, iFrameId) { return parentNode.append("iframe").attr("id", iFrameId).attr("style", "width: 100%; height: 100%;").attr("sandbox", ""); } var removeExistingElements = (doc, id2, divId, iFrameId) => { var _a, _b, _c; (_a = doc.getElementById(id2)) == null ? void 0 : _a.remove(); (_b = doc.getElementById(divId)) == null ? void 0 : _b.remove(); (_c = doc.getElementById(iFrameId)) == null ? void 0 : _c.remove(); }; var render$1 = async function(id2, text, svgContainingElement) { var _a, _b, _c, _d, _e, _f; addDiagrams(); const processed = processAndSetConfigs(text); text = processed.code; const config2 = getConfig$1(); log$1.debug(config2); if (text.length > ((config2 == null ? void 0 : config2.maxTextSize) ?? MAX_TEXTLENGTH)) { text = MAX_TEXTLENGTH_EXCEEDED_MSG; } const idSelector = "#" + id2; const iFrameID = "i" + id2; const iFrameID_selector = "#" + iFrameID; const enclosingDivID = "d" + id2; const enclosingDivID_selector = "#" + enclosingDivID; let root2 = select_default("body"); const isSandboxed = config2.securityLevel === SECURITY_LVL_SANDBOX; const isLooseSecurityLevel = config2.securityLevel === SECURITY_LVL_LOOSE; const fontFamily = config2.fontFamily; if (svgContainingElement !== void 0) { if (svgContainingElement) { svgContainingElement.innerHTML = ""; } if (isSandboxed) { const iframe = sandboxedIframe(select_default(svgContainingElement), iFrameID); root2 = select_default(iframe.nodes()[0].contentDocument.body); root2.node().style.margin = 0; } else { root2 = select_default(svgContainingElement); } appendDivSvgG(root2, id2, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD); } else { removeExistingElements(document, id2, enclosingDivID, iFrameID); if (isSandboxed) { const iframe = sandboxedIframe(select_default("body"), iFrameID); root2 = select_default(iframe.nodes()[0].contentDocument.body); root2.node().style.margin = 0; } else { root2 = select_default("body"); } appendDivSvgG(root2, id2, enclosingDivID); } let diag; let parseEncounteredException; try { diag = await getDiagramFromText(text, { title: processed.title }); } catch (error) { diag = new Diagram("error"); parseEncounteredException = error; } const element = root2.select(enclosingDivID_selector).node(); const diagramType = diag.type; const svg2 = element.firstChild; const firstChild = svg2.firstChild; const diagramClassDefs = (_b = (_a = diag.renderer).getClasses) == null ? void 0 : _b.call(_a, text, diag); const rules = createUserStyles(config2, diagramType, diagramClassDefs, idSelector); const style1 = document.createElement("style"); style1.innerHTML = rules; svg2.insertBefore(style1, firstChild); try { await diag.renderer.draw(text, id2, version, diag); } catch (e) { errorRenderer.draw(text, id2, version); throw e; } const svgNode = root2.select(`${enclosingDivID_selector} svg`); const a11yTitle = (_d = (_c = diag.db).getAccTitle) == null ? void 0 : _d.call(_c); const a11yDescr = (_f = (_e = diag.db).getAccDescription) == null ? void 0 : _f.call(_e); addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr); root2.select(`[id="${id2}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD); let svgCode = root2.select(enclosingDivID_selector).node().innerHTML; log$1.debug("config.arrowMarkerAbsolute", config2.arrowMarkerAbsolute); svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config2.arrowMarkerAbsolute)); if (isSandboxed) { const svgEl = root2.select(enclosingDivID_selector + " svg").node(); svgCode = putIntoIFrame(svgCode, svgEl); } else if (!isLooseSecurityLevel) { svgCode = purify.sanitize(svgCode, { ADD_TAGS: DOMPURIFY_TAGS, ADD_ATTR: DOMPURIFY_ATTR }); } attachFunctions(); if (parseEncounteredException) { throw parseEncounteredException; } const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector; const node2 = select_default(tmpElementSelector).node(); if (node2 && "remove" in node2) { node2.remove(); } return { svg: svgCode, bindFunctions: diag.db.bindFunctions }; }; function initialize$1(options = {}) { var _a; if ((options == null ? void 0 : options.fontFamily) && !((_a = options.themeVariables) == null ? void 0 : _a.fontFamily)) { if (!options.themeVariables) { options.themeVariables = {}; } options.themeVariables.fontFamily = options.fontFamily; } saveConfigFromInitialize(options); if ((options == null ? void 0 : options.theme) && options.theme in theme) { options.themeVariables = theme[options.theme].getThemeVariables( options.themeVariables ); } else if (options) { options.themeVariables = theme.default.getThemeVariables(options.themeVariables); } const config2 = typeof options === "object" ? setSiteConfig(options) : getSiteConfig(); setLogLevel$1(config2.logLevel); addDiagrams(); } var getDiagramFromText = (text, metadata = {}) => { const { code } = preprocessDiagram(text); return getDiagramFromText$1(code, metadata); }; function addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr) { setA11yDiagramInfo(svgNode, diagramType); addSVGa11yTitleDescription(svgNode, a11yTitle, a11yDescr, svgNode.attr("id")); } var mermaidAPI = Object.freeze({ render: render$1, parse: parse$1, getDiagramFromText, initialize: initialize$1, getConfig: getConfig$1, setConfig: setConfig$1, getSiteConfig, updateSiteConfig, reset: () => { reset(); }, globalReset: () => { reset(defaultConfig$1); }, defaultConfig: defaultConfig$1 }); setLogLevel$1(getConfig$1().logLevel); reset(getConfig$1()); var loadRegisteredDiagrams = async () => { log$1.debug(`Loading registered diagrams`); const results = await Promise.allSettled( Object.entries(detectors).map(async ([key, { detector: detector2, loader: loader2 }]) => { if (loader2) { try { getDiagram(key); } catch (error) { try { const { diagram: diagram2, id: id2 } = await loader2(); registerDiagram(id2, diagram2, detector2); } catch (err) { log$1.error(`Failed to load external diagram with key ${key}. Removing from detectors.`); delete detectors[key]; throw err; } } } }) ); const failed = results.filter((result) => result.status === "rejected"); if (failed.length > 0) { log$1.error(`Failed to load ${failed.length} external diagrams`); for (const res of failed) { log$1.error(res); } throw new Error(`Failed to load ${failed.length} external diagrams`); } }; var handleError = (error, errors, parseError) => { log$1.warn(error); if (isDetailedError(error)) { if (parseError) { parseError(error.str, error.hash); } errors.push({ ...error, message: error.str, error }); } else { if (parseError) { parseError(error); } if (error instanceof Error) { errors.push({ str: error.message, message: error.message, hash: error.name, error }); } } }; var run = async function(options = { querySelector: ".mermaid" }) { try { await runThrowsErrors(options); } catch (e) { if (isDetailedError(e)) { log$1.error(e.str); } if (mermaid.parseError) { mermaid.parseError(e); } if (!options.suppressErrors) { log$1.error("Use the suppressErrors option to suppress these errors"); throw e; } } }; var runThrowsErrors = async function({ postRenderCallback, querySelector, nodes } = { querySelector: ".mermaid" }) { const conf = mermaidAPI.getConfig(); log$1.debug(`${!postRenderCallback ? "No " : ""}Callback function found`); let nodesToProcess; if (nodes) { nodesToProcess = nodes; } else if (querySelector) { nodesToProcess = document.querySelectorAll(querySelector); } else { throw new Error("Nodes and querySelector are both undefined"); } log$1.debug(`Found ${nodesToProcess.length} diagrams`); if ((conf == null ? void 0 : conf.startOnLoad) !== void 0) { log$1.debug("Start On Load: " + (conf == null ? void 0 : conf.startOnLoad)); mermaidAPI.updateSiteConfig({ startOnLoad: conf == null ? void 0 : conf.startOnLoad }); } const idGenerator = new utils.InitIDGenerator(conf.deterministicIds, conf.deterministicIDSeed); let txt; const errors = []; for (const element of Array.from(nodesToProcess)) { log$1.info("Rendering diagram: " + element.id); if (element.getAttribute("data-processed")) { continue; } element.setAttribute("data-processed", "true"); const id2 = `mermaid-${idGenerator.next()}`; txt = element.innerHTML; txt = dedent(utils.entityDecode(txt)).trim().replace(//gi, "
"); const init2 = utils.detectInit(txt); if (init2) { log$1.debug("Detected early reinit: ", init2); } try { const { svg: svg2, bindFunctions } = await render(id2, txt, element); element.innerHTML = svg2; if (postRenderCallback) { await postRenderCallback(id2); } if (bindFunctions) { bindFunctions(element); } } catch (error) { handleError(error, errors, mermaid.parseError); } } if (errors.length > 0) { throw errors[0]; } }; var initialize = function(config2) { mermaidAPI.initialize(config2); }; var init = async function(config2, nodes, callback) { log$1.warn("mermaid.init is deprecated. Please use run instead."); if (config2) { initialize(config2); } const runOptions = { postRenderCallback: callback, querySelector: ".mermaid" }; if (typeof nodes === "string") { runOptions.querySelector = nodes; } else if (nodes) { if (nodes instanceof HTMLElement) { runOptions.nodes = [nodes]; } else { runOptions.nodes = nodes; } } await run(runOptions); }; var registerExternalDiagrams = async (diagrams2, { lazyLoad = true } = {}) => { registerLazyLoadedDiagrams(...diagrams2); if (lazyLoad === false) { await loadRegisteredDiagrams(); } }; var contentLoaded = function() { if (mermaid.startOnLoad) { const { startOnLoad } = mermaidAPI.getConfig(); if (startOnLoad) { mermaid.run().catch((err) => log$1.error("Mermaid failed to initialize", err)); } } }; if (typeof document !== "undefined") { window.addEventListener("load", contentLoaded, false); } var setParseErrorHandler = function(parseErrorHandler) { mermaid.parseError = parseErrorHandler; }; var executionQueue = []; var executionQueueRunning = false; var executeQueue = async () => { if (executionQueueRunning) { return; } executionQueueRunning = true; while (executionQueue.length > 0) { const f = executionQueue.shift(); if (f) { try { await f(); } catch (e) { log$1.error("Error executing queue", e); } } } executionQueueRunning = false; }; var parse2 = async (text, parseOptions) => { return new Promise((resolve, reject) => { const performCall = () => new Promise((res, rej) => { mermaidAPI.parse(text, parseOptions).then( (r) => { res(r); resolve(r); }, (e) => { var _a; log$1.error("Error parsing", e); (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e); rej(e); reject(e); } ); }); executionQueue.push(performCall); executeQueue().catch(reject); }); }; var render = (id2, text, container) => { return new Promise((resolve, reject) => { const performCall = () => new Promise((res, rej) => { mermaidAPI.render(id2, text, container).then( (r) => { res(r); resolve(r); }, (e) => { var _a; log$1.error("Error parsing", e); (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e); rej(e); reject(e); } ); }); executionQueue.push(performCall); executeQueue().catch(reject); }); }; var mermaid = { startOnLoad: true, mermaidAPI, parse: parse2, render, init, run, registerExternalDiagrams, initialize, parseError: void 0, contentLoaded, setParseErrorHandler, detectType }; export { dedent, require_dist, max, min, axisTop, axisBottom, svg, ordinal, band, linear, millisecond, second, timeMinute, timeHour, timeDay, timeSunday, timeMonday, timeTuesday, timeWednesday, timeThursday, timeFriday, timeSaturday, timeMonth, timeFormat, time, Tableau10_default, arc_default, linear_default, line_default, pie_default, basis_default, rgba_default, channel_default2 as channel_default, is_dark_default, lighten_default, darken_default, root_default2 as root_default, Symbol_default, baseGetTag_default, isObject_default, isFunction_default, coreJsData_default, baseIsNative_default, eq_default, MapCache_default, memoize_default, Stack_default, baseAssignValue_default, createBaseFor_default, baseFor_default, cloneBuffer_default, Uint8Array_default, cloneArrayBuffer_default, cloneTypedArray_default, copyArray_default, baseCreate_default, getPrototype_default, isPrototype_default, initCloneObject_default, isObjectLike_default, isArguments_default, isArray_default, isLength_default, isArrayLike_default, isArrayLikeObject_default, stubFalse_default, isBuffer_default, isPlainObject_default, baseUnary_default, nodeUtil_default, isTypedArray_default, assignValue_default, copyObject_default, baseTimes_default, isIndex_default, arrayLikeKeys_default, keysIn_default, toPlainObject_default, baseMerge_default, identity_default6 as identity_default, apply_default, overRest_default, constant_default8 as constant_default, shortOut_default, setToString_default, baseRest_default, isIterateeCall_default, createAssigner_default, merge_default, baseKeys_default, Set_default, WeakMap_default, getTag_default, isEmpty_default, log$1, lineBreakRegex, sanitizeText$2, evaluate, parseGenericTypes, hasKatex, calculateMathMLDimensions, renderKatex, common$1, getThemeVariables$2, defaultConfig$2, assignWithDepth$1, ZERO_WIDTH_SPACE, interpolateToCurve, getStylesFromArray, generateId, random, wrapLabel, calculateTextHeight, calculateTextWidth, parseFontSize, cleanAndMerge, utils, decodeEntities, getConfig$1, configureSvgSize, setupGraphViewbox$1, clear, setAccTitle, getAccTitle, setAccDescription, getAccDescription, setDiagramTitle, getDiagramTitle, commonDb, getConfig, setConfig, defaultConfig, setupGraphViewbox, selectSvgElement, mermaid }; /*! Bundled license information: mermaid/dist/mermaid-6dc72991.js: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) (*! Check if previously processed *) (*! * Wait for document loaded before starting the execution *) */ //# sourceMappingURL=chunk-3PMDUHG4.js.map