UNPKG

mermaid

Version:

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

1,243 lines (1,234 loc) 756 kB
import { b as yp, g as sn, l as qr, f as nn, H as Ca, J as mp, K as bp, L as Ep } from "./config-e567ef17.js"; import { s as wp } from "./setupGraphViewbox-a4603a92.js"; import { i as xp } from "./is_dark-151801f4.js"; var Ki = function() { var fe = function(ee, H, te, S) { for (te = te || {}, S = ee.length; S--; te[ee[S]] = H) ; return te; }, he = [1, 4], Q = [1, 13], ce = [1, 12], Y = [1, 15], A = [1, 16], T = [1, 20], w = [1, 19], L = [6, 7, 8], G = [1, 26], U = [1, 24], P = [1, 25], K = [6, 7, 11], D = [1, 6, 13, 15, 16, 19, 22], V = [1, 33], _ = [1, 34], J = [1, 6, 7, 11, 13, 15, 16, 19, 22], ne = { trace: function() { }, yy: {}, symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 }, terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], performAction: function(H, te, S, $, k, q, ve) { var pe = q.length - 1; switch (k) { case 6: case 7: return $; case 8: $.getLogger().trace("Stop NL "); break; case 9: $.getLogger().trace("Stop EOF "); break; case 11: $.getLogger().trace("Stop NL2 "); break; case 12: $.getLogger().trace("Stop EOF2 "); break; case 15: $.getLogger().info("Node: ", q[pe].id), $.addNode(q[pe - 1].length, q[pe].id, q[pe].descr, q[pe].type); break; case 16: $.getLogger().trace("Icon: ", q[pe]), $.decorateNode({ icon: q[pe] }); break; case 17: case 21: $.decorateNode({ class: q[pe] }); break; case 18: $.getLogger().trace("SPACELIST"); break; case 19: $.getLogger().trace("Node: ", q[pe].id), $.addNode(0, q[pe].id, q[pe].descr, q[pe].type); break; case 20: $.decorateNode({ icon: q[pe] }); break; case 25: $.getLogger().trace("node found ..", q[pe - 2]), this.$ = { id: q[pe - 1], descr: q[pe - 1], type: $.getType(q[pe - 2], q[pe]) }; break; case 26: this.$ = { id: q[pe], descr: q[pe], type: $.nodeType.DEFAULT }; break; case 27: $.getLogger().trace("node found ..", q[pe - 3]), this.$ = { id: q[pe - 3], descr: q[pe - 1], type: $.getType(q[pe - 2], q[pe]) }; break; } }, table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: he }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: he }, { 6: Q, 7: [1, 10], 9: 9, 12: 11, 13: ce, 14: 14, 15: Y, 16: A, 17: 17, 18: 18, 19: T, 22: w }, fe(L, [2, 3]), { 1: [2, 2] }, fe(L, [2, 4]), fe(L, [2, 5]), { 1: [2, 6], 6: Q, 12: 21, 13: ce, 14: 14, 15: Y, 16: A, 17: 17, 18: 18, 19: T, 22: w }, { 6: Q, 9: 22, 12: 11, 13: ce, 14: 14, 15: Y, 16: A, 17: 17, 18: 18, 19: T, 22: w }, { 6: G, 7: U, 10: 23, 11: P }, fe(K, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: T, 22: w }), fe(K, [2, 18]), fe(K, [2, 19]), fe(K, [2, 20]), fe(K, [2, 21]), fe(K, [2, 23]), fe(K, [2, 24]), fe(K, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: G, 7: U, 10: 32, 11: P }, { 1: [2, 7], 6: Q, 12: 21, 13: ce, 14: 14, 15: Y, 16: A, 17: 17, 18: 18, 19: T, 22: w }, fe(D, [2, 14], { 7: V, 11: _ }), fe(J, [2, 8]), fe(J, [2, 9]), fe(J, [2, 10]), fe(K, [2, 15]), fe(K, [2, 16]), fe(K, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, fe(D, [2, 13], { 7: V, 11: _ }), fe(J, [2, 11]), fe(J, [2, 12]), { 21: [1, 37] }, fe(K, [2, 25]), fe(K, [2, 27])], defaultActions: { 2: [2, 1], 6: [2, 2] }, parseError: function(H, te) { if (te.recoverable) this.trace(H); else { var S = new Error(H); throw S.hash = te, S; } }, parse: function(H) { var te = this, S = [0], $ = [], k = [null], q = [], ve = this.table, pe = "", Ae = 0, Ne = 0, _e = 2, tt = 1, ct = q.slice.call(arguments, 1), Pe = Object.create(this.lexer), $e = { yy: {} }; for (var Xe in this.yy) Object.prototype.hasOwnProperty.call(this.yy, Xe) && ($e.yy[Xe] = this.yy[Xe]); Pe.setInput(H, $e.yy), $e.yy.lexer = Pe, $e.yy.parser = this, typeof Pe.yylloc > "u" && (Pe.yylloc = {}); var rt = Pe.yylloc; q.push(rt); var lt = Pe.options && Pe.options.ranges; typeof $e.yy.parseError == "function" ? this.parseError = $e.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; function nt() { var jt; return jt = $.pop() || Pe.lex() || tt, typeof jt != "number" && (jt instanceof Array && ($ = jt, jt = $.pop()), jt = te.symbols_[jt] || jt), jt; } for (var je, pt, Et, kt, vt = {}, vr, qt, un, Kr; ; ) { if (pt = S[S.length - 1], this.defaultActions[pt] ? Et = this.defaultActions[pt] : ((je === null || typeof je > "u") && (je = nt()), Et = ve[pt] && ve[pt][je]), typeof Et > "u" || !Et.length || !Et[0]) { var Da = ""; Kr = []; for (vr in ve[pt]) this.terminals_[vr] && vr > _e && Kr.push("'" + this.terminals_[vr] + "'"); Pe.showPosition ? Da = "Parse error on line " + (Ae + 1) + `: ` + Pe.showPosition() + ` Expecting ` + Kr.join(", ") + ", got '" + (this.terminals_[je] || je) + "'" : Da = "Parse error on line " + (Ae + 1) + ": Unexpected " + (je == tt ? "end of input" : "'" + (this.terminals_[je] || je) + "'"), this.parseError(Da, { text: Pe.match, token: this.terminals_[je] || je, line: Pe.yylineno, loc: rt, expected: Kr }); } if (Et[0] instanceof Array && Et.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + pt + ", token: " + je); switch (Et[0]) { case 1: S.push(je), k.push(Pe.yytext), q.push(Pe.yylloc), S.push(Et[1]), je = null, Ne = Pe.yyleng, pe = Pe.yytext, Ae = Pe.yylineno, rt = Pe.yylloc; break; case 2: if (qt = this.productions_[Et[1]][1], vt.$ = k[k.length - qt], vt._$ = { first_line: q[q.length - (qt || 1)].first_line, last_line: q[q.length - 1].last_line, first_column: q[q.length - (qt || 1)].first_column, last_column: q[q.length - 1].last_column }, lt && (vt._$.range = [ q[q.length - (qt || 1)].range[0], q[q.length - 1].range[1] ]), kt = this.performAction.apply(vt, [ pe, Ne, Ae, $e.yy, Et[1], k, q ].concat(ct)), typeof kt < "u") return kt; qt && (S = S.slice(0, -1 * qt * 2), k = k.slice(0, -1 * qt), q = q.slice(0, -1 * qt)), S.push(this.productions_[Et[1]][0]), k.push(vt.$), q.push(vt._$), un = ve[S[S.length - 2]][S[S.length - 1]], S.push(un); break; case 3: return !0; } } return !0; } }, ue = function() { var ee = { EOF: 1, parseError: function(te, S) { if (this.yy.parser) this.yy.parser.parseError(te, S); else throw new Error(te); }, // resets the lexer, sets new input setInput: function(H, te) { return this.yy = te || this.yy || {}, this._input = H, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; }, // consumes and returns one char from the input input: function() { var H = this._input[0]; this.yytext += H, this.yyleng++, this.offset++, this.match += H, this.matched += H; var te = H.match(/(?:\r\n?|\n).*/g); return te ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), H; }, // unshifts one char (or a string) into the input unput: function(H) { var te = H.length, S = H.split(/(?:\r\n?|\n)/g); this._input = H + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - te), this.offset -= te; var $ = this.match.split(/(?:\r\n?|\n)/g); this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), S.length - 1 && (this.yylineno -= S.length - 1); var k = this.yylloc.range; return this.yylloc = { first_line: this.yylloc.first_line, last_line: this.yylineno + 1, first_column: this.yylloc.first_column, last_column: S ? (S.length === $.length ? this.yylloc.first_column : 0) + $[$.length - S.length].length - S[0].length : this.yylloc.first_column - te }, this.options.ranges && (this.yylloc.range = [k[0], k[0] + this.yyleng - te]), this.yyleng = this.yytext.length, this; }, // When called from action, caches matched text and appends it on next action more: function() { return this._more = !0, this; }, // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. reject: function() { if (this.options.backtrack_lexer) this._backtrack = !0; else return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). ` + this.showPosition(), { text: "", token: null, line: this.yylineno }); return this; }, // retain first n characters of the match less: function(H) { this.unput(this.match.slice(H)); }, // displays already matched input, i.e. for error messages pastInput: function() { var H = this.matched.substr(0, this.matched.length - this.match.length); return (H.length > 20 ? "..." : "") + H.substr(-20).replace(/\n/g, ""); }, // displays upcoming input, i.e. for error messages upcomingInput: function() { var H = this.match; return H.length < 20 && (H += this._input.substr(0, 20 - H.length)), (H.substr(0, 20) + (H.length > 20 ? "..." : "")).replace(/\n/g, ""); }, // displays the character position where the lexing error occurred, i.e. for error messages showPosition: function() { var H = this.pastInput(), te = new Array(H.length + 1).join("-"); return H + this.upcomingInput() + ` ` + te + "^"; }, // test the lexed token: return FALSE when not a match, otherwise return token test_match: function(H, te) { var S, $, k; if (this.options.backtrack_lexer && (k = { yylineno: this.yylineno, yylloc: { first_line: this.yylloc.first_line, last_line: this.last_line, first_column: this.yylloc.first_column, last_column: this.yylloc.last_column }, yytext: this.yytext, match: this.match, matches: this.matches, matched: this.matched, yyleng: this.yyleng, offset: this.offset, _more: this._more, _input: this._input, yy: this.yy, conditionStack: this.conditionStack.slice(0), done: this.done }, this.options.ranges && (k.yylloc.range = this.yylloc.range.slice(0))), $ = H[0].match(/(?:\r\n?|\n).*/g), $ && (this.yylineno += $.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: $ ? $[$.length - 1].length - $[$.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + H[0].length }, this.yytext += H[0], this.match += H[0], this.matches = H, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(H[0].length), this.matched += H[0], S = this.performAction.call(this, this.yy, this, te, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), S) return S; if (this._backtrack) { for (var q in k) this[q] = k[q]; return !1; } return !1; }, // return next match in input next: function() { if (this.done) return this.EOF; this._input || (this.done = !0); var H, te, S, $; this._more || (this.yytext = "", this.match = ""); for (var k = this._currentRules(), q = 0; q < k.length; q++) if (S = this._input.match(this.rules[k[q]]), S && (!te || S[0].length > te[0].length)) { if (te = S, $ = q, this.options.backtrack_lexer) { if (H = this.test_match(S, k[q]), H !== !1) return H; if (this._backtrack) { te = !1; continue; } else return !1; } else if (!this.options.flex) break; } return te ? (H = this.test_match(te, k[$]), H !== !1 ? H : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. ` + this.showPosition(), { text: "", token: null, line: this.yylineno }); }, // return next match that has a token lex: function() { var te = this.next(); return te || this.lex(); }, // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) begin: function(te) { this.conditionStack.push(te); }, // pop the previously active lexer condition state off the condition stack popState: function() { var te = this.conditionStack.length - 1; return te > 0 ? this.conditionStack.pop() : this.conditionStack[0]; }, // produce the lexer rule set which is active for the currently active lexer condition state _currentRules: function() { return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; }, // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available topState: function(te) { return te = this.conditionStack.length - 1 - Math.abs(te || 0), te >= 0 ? this.conditionStack[te] : "INITIAL"; }, // alias for begin(condition) pushState: function(te) { this.begin(te); }, // return the number of states currently on the stack stateStackSize: function() { return this.conditionStack.length; }, options: { "case-insensitive": !0 }, performAction: function(te, S, $, k) { switch ($) { case 0: te.getLogger().trace("Found comment", S.yytext); break; case 1: return 8; case 2: this.begin("CLASS"); break; case 3: return this.popState(), 16; case 4: this.popState(); break; case 5: te.getLogger().trace("Begin icon"), this.begin("ICON"); break; case 6: return te.getLogger().trace("SPACELINE"), 6; case 7: return 7; case 8: return 15; case 9: te.getLogger().trace("end icon"), this.popState(); break; case 10: return te.getLogger().trace("Exploding node"), this.begin("NODE"), 19; case 11: return te.getLogger().trace("Cloud"), this.begin("NODE"), 19; case 12: return te.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19; case 13: return te.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19; case 14: return this.begin("NODE"), 19; case 15: return this.begin("NODE"), 19; case 16: return this.begin("NODE"), 19; case 17: return this.begin("NODE"), 19; case 18: return 13; case 19: return 22; case 20: return 11; case 21: te.getLogger().trace("Starting NSTR"), this.begin("NSTR"); break; case 22: return te.getLogger().trace("description:", S.yytext), "NODE_DESCR"; case 23: this.popState(); break; case 24: return this.popState(), te.getLogger().trace("node end ))"), "NODE_DEND"; case 25: return this.popState(), te.getLogger().trace("node end )"), "NODE_DEND"; case 26: return this.popState(), te.getLogger().trace("node end ...", S.yytext), "NODE_DEND"; case 27: return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; case 28: return this.popState(), te.getLogger().trace("node end (-"), "NODE_DEND"; case 29: return this.popState(), te.getLogger().trace("node end (-"), "NODE_DEND"; case 30: return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; case 31: return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; case 32: return te.getLogger().trace("Long description:", S.yytext), 20; case 33: return te.getLogger().trace("Long description:", S.yytext), 20; } }, rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\-\)\{\}]+)/i, /^(?:$)/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR: { rules: [22, 23], inclusive: !1 }, NODE: { rules: [21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } } }; return ee; }(); ne.lexer = ue; function j() { this.yy = {}; } return j.prototype = ne, ne.Parser = j, new j(); }(); Ki.parser = Ki; const Tp = Ki, on = (fe) => yp(fe, sn()); let Jt = [], Uu = 0, Ji = {}; const Cp = () => { Jt = [], Uu = 0, Ji = {}; }, Dp = function(fe) { for (let he = Jt.length - 1; he >= 0; he--) if (Jt[he].level < fe) return Jt[he]; return null; }, Sp = () => Jt.length > 0 ? Jt[0] : null, Lp = (fe, he, Q, ce) => { qr.info("addNode", fe, he, Q, ce); const Y = sn(), A = { id: Uu++, nodeId: on(he), level: fe, descr: on(Q), type: ce, children: [], width: sn().mindmap.maxNodeWidth }; switch (A.type) { case yt.ROUNDED_RECT: A.padding = 2 * Y.mindmap.padding; break; case yt.RECT: A.padding = 2 * Y.mindmap.padding; break; case yt.HEXAGON: A.padding = 2 * Y.mindmap.padding; break; default: A.padding = Y.mindmap.padding; } const T = Dp(fe); if (T) T.children.push(A), Jt.push(A); else if (Jt.length === 0) Jt.push(A); else { let w = new Error( 'There can be only one root. No parent could be found for ("' + A.descr + '")' ); throw w.hash = { text: "branch " + name, token: "branch " + name, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ['"checkout ' + name + '"'] }, w; } }, yt = { DEFAULT: 0, NO_BORDER: 0, ROUNDED_RECT: 1, RECT: 2, CIRCLE: 3, CLOUD: 4, BANG: 5, HEXAGON: 6 }, Ap = (fe, he) => { switch (qr.debug("In get type", fe, he), fe) { case "[": return yt.RECT; case "(": return he === ")" ? yt.ROUNDED_RECT : yt.CLOUD; case "((": return yt.CIRCLE; case ")": return yt.CLOUD; case "))": return yt.BANG; case "{{": return yt.HEXAGON; default: return yt.DEFAULT; } }, Yu = (fe, he) => { Ji[fe] = he; }, Op = (fe) => { const he = Jt[Jt.length - 1]; fe && fe.icon && (he.icon = on(fe.icon)), fe && fe.class && (he.class = on(fe.class)); }, Wr = (fe) => { switch (fe) { case yt.DEFAULT: return "no-border"; case yt.RECT: return "rect"; case yt.ROUNDED_RECT: return "rounded-rect"; case yt.CIRCLE: return "circle"; case yt.CLOUD: return "cloud"; case yt.BANG: return "bang"; case yt.HEXAGON: return "hexgon"; default: return "no-border"; } }; let Hu; const Np = (fe) => { Hu = fe; }, Mp = () => qr, Ip = (fe) => Jt[fe], ji = (fe) => Ji[fe], Rp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, addNode: Lp, clear: Cp, decorateNode: Op, getElementById: ji, getLogger: Mp, getMindmap: Sp, getNodeById: Ip, getType: Ap, nodeType: yt, get parseError() { return Hu; }, sanitizeText: on, setElementForId: Yu, setErrorHandler: Np, type2Str: Wr }, Symbol.toStringTag, { value: "Module" })), Xu = 12; function kp(fe, he) { fe.each(function() { var Q = nn(this), ce = Q.text().split(/(\s+|<br>)/).reverse(), Y, A = [], T = 1.1, w = Q.attr("y"), L = parseFloat(Q.attr("dy")), G = Q.text(null).append("tspan").attr("x", 0).attr("y", w).attr("dy", L + "em"); for (let U = 0; U < ce.length; U++) Y = ce[ce.length - 1 - U], A.push(Y), G.text(A.join(" ").trim()), (G.node().getComputedTextLength() > he || Y === "<br>") && (A.pop(), G.text(A.join(" ").trim()), Y === "<br>" ? A = [""] : A = [Y], G = Q.append("tspan").attr("x", 0).attr("y", w).attr("dy", T + "em").text(Y)); }); } const Pp = function(fe, he, Q) { fe.append("path").attr("id", "node-" + he.id).attr("class", "node-bkg node-" + Wr(he.type)).attr( "d", `M0 ${he.height - 5} v${-he.height + 2 * 5} q0,-5 5,-5 h${he.width - 2 * 5} q5,0 5,5 v${he.height - 5} H0 Z` ), fe.append("line").attr("class", "node-line-" + Q).attr("x1", 0).attr("y1", he.height).attr("x2", he.width).attr("y2", he.height); }, Bp = function(fe, he) { fe.append("rect").attr("id", "node-" + he.id).attr("class", "node-bkg node-" + Wr(he.type)).attr("height", he.height).attr("width", he.width); }, Fp = function(fe, he) { const Q = he.width, ce = he.height, Y = 0.15 * Q, A = 0.25 * Q, T = 0.35 * Q, w = 0.2 * Q; fe.append("path").attr("id", "node-" + he.id).attr("class", "node-bkg node-" + Wr(he.type)).attr( "d", `M0 0 a${Y},${Y} 0 0,1 ${Q * 0.25},${-1 * Q * 0.1} a${T},${T} 1 0,1 ${Q * 0.4},${-1 * Q * 0.1} a${A},${A} 1 0,1 ${Q * 0.35},${1 * Q * 0.2} a${Y},${Y} 1 0,1 ${Q * 0.15},${1 * ce * 0.35} a${w},${w} 1 0,1 ${-1 * Q * 0.15},${1 * ce * 0.65} a${A},${Y} 1 0,1 ${-1 * Q * 0.25},${Q * 0.15} a${T},${T} 1 0,1 ${-1 * Q * 0.5},${0} a${Y},${Y} 1 0,1 ${-1 * Q * 0.25},${-1 * Q * 0.15} a${Y},${Y} 1 0,1 ${-1 * Q * 0.1},${-1 * ce * 0.35} a${w},${w} 1 0,1 ${Q * 0.1},${-1 * ce * 0.65} H0 V0 Z` ); }, zp = function(fe, he) { const Q = he.width, ce = he.height, Y = 0.15 * Q; fe.append("path").attr("id", "node-" + he.id).attr("class", "node-bkg node-" + Wr(he.type)).attr( "d", `M0 0 a${Y},${Y} 1 0,0 ${Q * 0.25},${-1 * ce * 0.1} a${Y},${Y} 1 0,0 ${Q * 0.25},${0} a${Y},${Y} 1 0,0 ${Q * 0.25},${0} a${Y},${Y} 1 0,0 ${Q * 0.25},${1 * ce * 0.1} a${Y},${Y} 1 0,0 ${Q * 0.15},${1 * ce * 0.33} a${Y * 0.8},${Y * 0.8} 1 0,0 ${0},${1 * ce * 0.34} a${Y},${Y} 1 0,0 ${-1 * Q * 0.15},${1 * ce * 0.33} a${Y},${Y} 1 0,0 ${-1 * Q * 0.25},${ce * 0.15} a${Y},${Y} 1 0,0 ${-1 * Q * 0.25},${0} a${Y},${Y} 1 0,0 ${-1 * Q * 0.25},${0} a${Y},${Y} 1 0,0 ${-1 * Q * 0.25},${-1 * ce * 0.15} a${Y},${Y} 1 0,0 ${-1 * Q * 0.1},${-1 * ce * 0.33} a${Y * 0.8},${Y * 0.8} 1 0,0 ${0},${-1 * ce * 0.34} a${Y},${Y} 1 0,0 ${Q * 0.1},${-1 * ce * 0.33} H0 V0 Z` ); }, Gp = function(fe, he) { fe.append("circle").attr("id", "node-" + he.id).attr("class", "node-bkg node-" + Wr(he.type)).attr("r", he.width / 2); }; function $p(fe, he, Q, ce, Y) { return fe.insert("polygon", ":first-child").attr( "points", ce.map(function(A) { return A.x + "," + A.y; }).join(" ") ).attr("transform", "translate(" + (Y.width - he) / 2 + ", " + Q + ")"); } const Vp = function(fe, he) { const Q = he.height, Y = Q / 4, A = he.width - he.padding + 2 * Y, T = [ { x: Y, y: 0 }, { x: A - Y, y: 0 }, { x: A, y: -Q / 2 }, { x: A - Y, y: -Q }, { x: Y, y: -Q }, { x: 0, y: -Q / 2 } ]; $p(fe, A, Q, T, he); }, _p = function(fe, he) { fe.append("rect").attr("id", "node-" + he.id).attr("class", "node-bkg node-" + Wr(he.type)).attr("height", he.height).attr("rx", he.padding).attr("ry", he.padding).attr("width", he.width); }, Up = function(fe, he, Q, ce) { const Y = Q % (Xu - 1), A = fe.append("g"); he.section = Y; let T = "section-" + Y; Y < 0 && (T += " section-root"), A.attr("class", (he.class ? he.class + " " : "") + "mindmap-node " + T); const w = A.append("g"), L = A.append("g"), U = L.append("text").text(he.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(kp, he.width).node().getBBox(), P = ce.fontSize.replace ? ce.fontSize.replace("px", "") : ce.fontSize; if (he.height = U.height + P * 1.1 * 0.5 + he.padding, he.width = U.width + 2 * he.padding, he.icon) if (he.type === yt.CIRCLE) he.height += 50, he.width += 50, A.append("foreignObject").attr("height", "50px").attr("width", he.width).attr("style", "text-align: center;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + Y + " " + he.icon), L.attr( "transform", "translate(" + he.width / 2 + ", " + (he.height / 2 - 1.5 * he.padding) + ")" ); else { he.width += 50; const K = he.height; he.height = Math.max(K, 60); const D = Math.abs(he.height - K); A.append("foreignObject").attr("width", "60px").attr("height", he.height).attr("style", "text-align: center;margin-top:" + D / 2 + "px;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + Y + " " + he.icon), L.attr( "transform", "translate(" + (25 + he.width / 2) + ", " + (D / 2 + he.padding / 2) + ")" ); } else L.attr("transform", "translate(" + he.width / 2 + ", " + he.padding / 2 + ")"); switch (he.type) { case yt.DEFAULT: Pp(w, he, Y); break; case yt.ROUNDED_RECT: _p(w, he); break; case yt.RECT: Bp(w, he); break; case yt.CIRCLE: w.attr("transform", "translate(" + he.width / 2 + ", " + +he.height / 2 + ")"), Gp(w, he); break; case yt.CLOUD: Fp(w, he); break; case yt.BANG: zp(w, he); break; case yt.HEXAGON: Vp(w, he); break; } return Yu(he.id, A), he.height; }, Yp = function(he, Q, ce, Y, A) { const T = A % (Xu - 1), w = ce.x + ce.width / 2, L = ce.y + ce.height / 2, G = Q.x + Q.width / 2, U = Q.y + Q.height / 2, P = G > w ? w + Math.abs(w - G) / 2 : w - Math.abs(w - G) / 2, K = U > L ? L + Math.abs(L - U) / 2 : L - Math.abs(L - U) / 2, D = G > w ? Math.abs(w - P) / 2 + w : -Math.abs(w - P) / 2 + w, V = U > L ? Math.abs(L - K) / 2 + L : -Math.abs(L - K) / 2 + L; he.append("path").attr( "d", ce.direction === "TB" || ce.direction === "BT" ? `M${w},${L} Q${w},${V} ${P},${K} T${G},${U}` : `M${w},${L} Q${D},${L} ${P},${K} T${G},${U}` ).attr("class", "edge section-edge-" + T + " edge-depth-" + Y); }, Hp = function(fe) { const he = ji(fe.id), Q = fe.x || 0, ce = fe.y || 0; he.attr("transform", "translate(" + Q + "," + ce + ")"); }, qu = { drawNode: Up, positionNode: Hp, drawEdge: Yp }; var Zi = {}, Xp = { get exports() { return Zi; }, set exports(fe) { Zi = fe; } }; (function(fe, he) { (function(Q, ce) { fe.exports = ce(); })(Ca, function() { function Q(t) { return Q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Q(t); } function ce(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Y(t, e) { for (var r = 0; r < e.length; r++) { var a = e[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(t, a.key, a); } } function A(t, e, r) { return e && Y(t.prototype, e), r && Y(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t; } function T(t, e, r) { return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } function w(t, e) { return L(t) || G(t, e) || U(t, e) || K(); } function L(t) { if (Array.isArray(t)) return t; } function G(t, e) { var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; if (r != null) { var a = [], n = !0, i = !1, s, o; try { for (r = r.call(t); !(n = (s = r.next()).done) && (a.push(s.value), !(e && a.length === e)); n = !0) ; } catch (l) { i = !0, o = l; } finally { try { !n && r.return != null && r.return(); } finally { if (i) throw o; } } return a; } } function U(t, e) { if (t) { if (typeof t == "string") return P(t, e); var r = Object.prototype.toString.call(t).slice(8, -1); if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t); if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return P(t, e); } } function P(t, e) { (e == null || e > t.length) && (e = t.length); for (var r = 0, a = new Array(e); r < e; r++) a[r] = t[r]; return a; } function K() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var D = typeof window > "u" ? null : window, V = D ? D.navigator : null; D && D.document; var _ = Q(""), J = Q({}), ne = Q(function() { }), ue = typeof HTMLElement > "u" ? "undefined" : Q(HTMLElement), j = function(e) { return e && e.instanceString && H(e.instanceString) ? e.instanceString() : null; }, ee = function(e) { return e != null && Q(e) == _; }, H = function(e) { return e != null && Q(e) === ne; }, te = function(e) { return !pe(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, S = function(e) { return e != null && Q(e) === J && !te(e) && e.constructor === Object; }, $ = function(e) { return e != null && Q(e) === J; }, k = function(e) { return e != null && Q(e) === Q(1) && !isNaN(e); }, q = function(e) { return k(e) && Math.floor(e) === e; }, ve = function(e) { if (ue !== "undefined") return e != null && e instanceof HTMLElement; }, pe = function(e) { return Ae(e) || Ne(e); }, Ae = function(e) { return j(e) === "collection" && e._private.single; }, Ne = function(e) { return j(e) === "collection" && !e._private.single; }, _e = function(e) { return j(e) === "core"; }, tt = function(e) { return j(e) === "stylesheet"; }, ct = function(e) { return j(e) === "event"; }, Pe = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); }, $e = function(e) { return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, Xe = function(e) { return S(e) && k(e.x1) && k(e.x2) && k(e.y1) && k(e.y2); }, rt = function(e) { return $(e) && H(e.then); }, lt = function() { return V && V.userAgent.match(/msie|trident|edge/i); }, nt = function(e, r) { r || (r = function() { if (arguments.length === 1) return arguments[0]; if (arguments.length === 0) return "undefined"; for (var i = [], s = 0; s < arguments.length; s++) i.push(arguments[s]); return i.join("$"); }); var a = function n() { var i = this, s = arguments, o, l = r.apply(i, s), u = n.cache; return (o = u[l]) || (o = u[l] = e.apply(i, s)), o; }; return a.cache = {}, a; }, je = nt(function(t) { return t.replace(/([A-Z])/g, function(e) { return "-" + e.toLowerCase(); }); }), pt = nt(function(t) { return t.replace(/(-\w)/g, function(e) { return e[1].toUpperCase(); }); }), Et = nt(function(t, e) { return t + e[0].toUpperCase() + e.substring(1); }, function(t, e) { return t + "$" + e; }), kt = function(e) { return Pe(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, vt = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", vr = "rgb[a]?\\((" + vt + "[%]?)\\s*,\\s*(" + vt + "[%]?)\\s*,\\s*(" + vt + "[%]?)(?:\\s*,\\s*(" + vt + "))?\\)", qt = "rgb[a]?\\((?:" + vt + "[%]?)\\s*,\\s*(?:" + vt + "[%]?)\\s*,\\s*(?:" + vt + "[%]?)(?:\\s*,\\s*(?:" + vt + "))?\\)", un = "hsl[a]?\\((" + vt + ")\\s*,\\s*(" + vt + "[%])\\s*,\\s*(" + vt + "[%])(?:\\s*,\\s*(" + vt + "))?\\)", Kr = "hsl[a]?\\((?:" + vt + ")\\s*,\\s*(?:" + vt + "[%])\\s*,\\s*(?:" + vt + "[%])(?:\\s*,\\s*(?:" + vt + "))?\\)", Da = "\\#[0-9a-fA-F]{3}", jt = "\\#[0-9a-fA-F]{6}", es = function(e, r) { return e < r ? -1 : e > r ? 1 : 0; }, Qu = function(e, r) { return -1 * es(e, r); }, Ue = Object.assign != null ? Object.assign.bind(Object) : function(t) { for (var e = arguments, r = 1; r < e.length; r++) { var a = e[r]; if (a != null) for (var n = Object.keys(a), i = 0; i < n.length; i++) { var s = n[i]; t[s] = a[s]; } } return t; }, Ju = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var r = e.length === 4, a, n, i, s = 16; return r ? (a = parseInt(e[1] + e[1], s), n = parseInt(e[2] + e[2], s), i = parseInt(e[3] + e[3], s)) : (a = parseInt(e[1] + e[2], s), n = parseInt(e[3] + e[4], s), i = parseInt(e[5] + e[6], s)), [a, n, i]; } }, ju = function(e) { var r, a, n, i, s, o, l, u; function f(d, g, y) { return y < 0 && (y += 1), y > 1 && (y -= 1), y < 1 / 6 ? d + (g - d) * 6 * y : y < 1 / 2 ? g : y < 2 / 3 ? d + (g - d) * (2 / 3 - y) * 6 : d; } var h = new RegExp("^" + un + "$").exec(e); if (h) { if (a = parseInt(h[1]), a < 0 ? a = (360 - -1 * a % 360) % 360 : a > 360 && (a = a % 360), a /= 360, n = parseFloat(h[2]), n < 0 || n > 100 || (n = n / 100, i = parseFloat(h[3]), i < 0 || i > 100) || (i = i / 100, s = h[4], s !== void 0 && (s = parseFloat(s), s < 0 || s > 1))) return; if (n === 0) o = l = u = Math.round(i * 255); else { var c = i < 0.5 ? i * (1 + n) : i + n - i * n, v = 2 * i - c; o = Math.round(255 * f(v, c, a + 1 / 3)), l = Math.round(255 * f(v, c, a)), u = Math.round(255 * f(v, c, a - 1 / 3)); } r = [o, l, u, s]; } return r; }, el = function(e) { var r, a = new RegExp("^" + vr + "$").exec(e); if (a) { r = []; for (var n = [], i = 1; i <= 3; i++) { var s = a[i]; if (s[s.length - 1] === "%" && (n[i] = !0), s = parseFloat(s), n[i] && (s = s / 100 * 255), s < 0 || s > 255) return; r.push(Math.floor(s)); } var o = n[1] || n[2] || n[3], l = n[1] && n[2] && n[3]; if (o && !l) return; var u = a[4]; if (u !== void 0) { if (u = parseFloat(u), u < 0 || u > 1) return; r.push(u); } } return r; }, tl = function(e) { return al[e.toLowerCase()]; }, rl = function(e) { return (te(e) ? e : null) || tl(e) || Ju(e) || el(e) || ju(e); }, al = { // special colour names transparent: [0, 0, 0, 0], // NB alpha === 0 // regular colours aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], grey: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] }, ts = function(e) { for (var r = e.map, a = e.keys, n = a.length, i = 0; i < n; i++) { var s = a[i]; if (S(s)) throw Error("Tried to set map with object key"); i < a.length - 1 ? (r[s] == null && (r[s] = {}), r = r[s]) : r[s] = e.value; } }, rs = function(e) { for (var r = e.map, a = e.keys, n = a.length, i = 0; i < n; i++) { var s = a[i]; if (S(s)) throw Error("Tried to get map with object key"); if (r = r[s], r == null) return r; } return r; }; function nl(t) { var e = typeof t; return t != null && (e == "object" || e == "function"); } var Rr = nl, Sa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof Ca < "u" ? Ca : typeof self < "u" ? self : {}; function il(t, e) { return e = { exports: {} }, t(e, e.exports), e.exports; } var sl = typeof Sa == "object" && Sa && Sa.Object === Object && Sa, ol = sl, ul = typeof self == "object" && self && self.Object === Object && self, ll = ol || ul || Function("return this")(), ln = ll, fl = function() { return ln.Date.now(); }, ai = fl, hl = /\s/; function cl(t) { for (var e = t.length; e-- && hl.test(t.charAt(e)); ) ; return e; } var vl = cl, dl = /^\s+/; function gl(t) { return t && t.slice(0, vl(t) + 1).replace(dl, ""); } var pl = gl, yl = ln.Symbol, Zr = yl, as = Object.prototype, ml = as.hasOwnProperty, bl = as.toString, La = Zr ? Zr.toStringTag : void 0; function El(t) { var e = ml.call(t, La), r = t[La]; try { t[La] = void 0; var a = !0; } catch { } var n = bl.call(t); return a && (e ? t[La] = r : delete t[La]), n; } var wl = El, xl = Object.prototype, Tl = xl.toString; function Cl(t) { return Tl.call(t); } var Dl = Cl, Sl = "[object Null]", Ll = "[object Undefined]", ns = Zr ? Zr.toStringTag : void 0; function Al(t) { return t == null ? t === void 0 ? Ll : Sl : ns && ns in Object(t) ? wl(t) : Dl(t); } var is = Al; function Ol(t) { return t != null && typeof t == "object"; } var Nl = Ol, Ml = "[object Symbol]"; function Il(t) { return typeof t == "symbol" || Nl(t) && is(t) == Ml; } var Aa = Il, ss = 0 / 0, Rl = /^[-+]0x[0-9a-f]+$/i, kl = /^0b[01]+$/i, Pl = /^0o[0-7]+$/i, Bl = parseInt; function Fl(t) { if (typeof t == "number") return t; if (Aa(t)) return ss; if (Rr(t)) { var e = typeof t.valueOf == "function" ? t.valueOf() : t; t = Rr(e) ? e + "" : e; } if (typeof t != "string") return t === 0 ? t : +t; t = pl(t); var r = kl.test(t); return r || Pl.test(t) ? Bl(t.slice(2), r ? 2 : 8) : Rl.test(t) ? ss : +t; } var os = Fl, zl = "Expected a function", Gl = Math.max, $l = Math.min; function Vl(t, e, r) { var a, n, i, s, o, l, u = 0, f = !1, h = !1, c = !0; if (typeof t != "function") throw new TypeError(zl); e = os(e) || 0, Rr(r) && (f = !!r.leading, h = "maxWait" in r, i = h ? Gl(os(r.maxWait) || 0, e) : i, c = "trailing" in r ? !!r.trailing : c); function v(O) { var x = a, I = n; return a = n = void 0, u = O, s = t.apply(I, x), s; } function d(O) { return u = O, o = setTimeout(p, e), f ? v(O) : s; } function g(O) { var x = O - l, I = O - u, C = e - x; return h ? $l(C, i - I) : C; } function y(O) { var x = O - l, I = O - u; return l === void 0 || x >= e || x < 0 || h && I >= i; } function p() { var O = ai(); if (y(O)) return m(O); o = setTimeout(p, g(O)); } function m(O) { return o = void 0, c && a ? v(O) : (a = n = void 0, s); } function b() { o !== void 0 && clearTimeout(o), u = 0, a = l = n = o = void 0; } function E() { return o === void 0 ? s : m(ai()); } function M() { var O = ai(), x = y(O); if (a = arguments, n = this, l = O, x) { if (o === void 0) return d(l); if (h) return clearTimeout(o), o = setTimeout(p, e), v(l); } return o === void 0 && (o = setTimeout(p, e)), s; } return M.cancel = b, M.flush = E, M; } var fn = Vl, ni = D ? D.performance : null, us = ni && ni.now ? function() { return ni.now(); } : function() { return Date.now(); }, _l = function() { if (D) { if (D.requestAnimationFrame) return function(t) { D.requestAnimationFrame(t); }; if (D.mozRequestAnimationFrame) return function(t) { D.mozRequestAnimationFrame(t); }; if (D.webkitRequestAnimationFrame) return function(t) { D.webkitRequestAnimationFrame(t); }; if (D.msRequestAnimationFrame) return function(t) { D.msRequestAnimationFrame(t); }; } return function(t) { t && setTimeout(function() { t(us()); }, 1e3 / 60); }; }(), hn = function(e) { return _l(e); }, dr = us, Qr = 9261, ls = 65599, Oa = 5381, fs = function(e) { for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Qr, a = r, n; n = e.next(), !n.done; ) a = a * ls + n.value | 0; return a; }, Na = function(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Qr; return r * ls + e | 0; }, Ma = function(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Oa; return (r << 5) + r + e | 0; }, Ul = function(e, r) { return e * 2097152 + r; }, Er = function(e) { return e[0] * 2097152 + e[1]; }, cn = function(e, r) { return [Na(e[0], r[0]), Ma(e[1], r[1])]; }, Yl = function(e, r) { var a = { value: 0, done: !1 }, n = 0, i = e.length, s = { next: function() { return n < i ? a.value = e[n++] : a.done = !0, a; } }; return fs(s, r); }, kr = function(e, r) { var a = { value: 0, done: !1 }, n = 0, i = e.length, s = { next: function() { return n < i ? a.value = e.charCodeAt(n++) : a.done = !0, a; } }; return fs(s, r); }, hs = function() { return Hl(arguments); }, Hl = function(e) { for (var r, a = 0; a < e.length; a++) { var n = e[a]; a === 0 ? r = kr(n) : r = kr(n, r); } return r; }, cs = !0, Xl = console.warn != null, ql = console.trace != null, ii = Number.MAX_SAFE_INTEGER || 9007199254740991, vs = function() { return !0; }, vn = function() { return !1; }, ds = function() {