@fibery/custom-app-text-editor 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/LICENSE +214 -0
  2. package/README.md +33 -0
  3. package/lib/abnfDiagram-VRR7QNED-BgjOQqEh.js +89 -0
  4. package/lib/arc-Dp0rqagO.js +82 -0
  5. package/lib/architecture-TIHT7OUA-DDwCCw0y.js +3 -0
  6. package/lib/architectureDiagram-ZJ3FMSHR-BucIluTN.js +4129 -0
  7. package/lib/array-CApNbSU9.js +6 -0
  8. package/lib/blockDiagram-677ZJIJ3-CWYuHThP.js +3157 -0
  9. package/lib/c4Diagram-LMCZKHZV-Cr3_W-xe.js +2982 -0
  10. package/lib/channel-Bb7a6w5c.js +5 -0
  11. package/lib/chunk-2Q5K7J3B-CINvUK-A.js +15 -0
  12. package/lib/chunk-32BRIVSS-b-BvyGz0.js +61 -0
  13. package/lib/chunk-52WLFC77-Cf8zEoqs.js +593 -0
  14. package/lib/chunk-5VM5RSS4-Dnx15xMv.js +5 -0
  15. package/lib/chunk-7BUUIJ7U-B018BbRy.js +82 -0
  16. package/lib/chunk-C7G6YPKG-CmOuVFlJ.js +67 -0
  17. package/lib/chunk-EX3LRPZG-LynZw14I.js +2042 -0
  18. package/lib/chunk-HOUHSVGY-Br7ZSMKe.js +275 -0
  19. package/lib/chunk-ICXQ74PX-VqT5WUTt.js +1330 -0
  20. package/lib/chunk-JWPE2WC7-Ch0jmUXM.js +8 -0
  21. package/lib/chunk-KEIR6QF5-RwFi50en.js +21456 -0
  22. package/lib/chunk-MOJQB5TN-rQ4AfTd9.js +490 -0
  23. package/lib/chunk-OGEWGWER-BvF6eV9Q.js +32 -0
  24. package/lib/chunk-PUDLZKDR-BW7SZvCB.js +4135 -0
  25. package/lib/chunk-Q4XR5HBZ-CRgGP3ez.js +1635 -0
  26. package/lib/chunk-RYQCIY6F-CHlASUpG.js +241 -0
  27. package/lib/chunk-V7JOEXUC-OY39ml6X.js +3357 -0
  28. package/lib/chunk-VR4S4FIN-Bk7IFdYB.js +26 -0
  29. package/lib/chunk-WYO6CB5R-MV-yOaop.js +3769 -0
  30. package/lib/chunk-XXDRQBXY-Djd1ChwJ.js +9 -0
  31. package/lib/chunk-Y2CYZVJY-QdJ4V9rh.js +12 -0
  32. package/lib/chunk-ZGVPDNZ5-l81xl1BI.js +3738 -0
  33. package/lib/classDiagram-OUVF2IWQ--wRzSvLt.js +30 -0
  34. package/lib/classDiagram-v2-EOCWNBFH-ChMCdPO-.js +30 -0
  35. package/lib/cose-bilkent-JH36ORCC-CyVZn5M3.js +2254 -0
  36. package/lib/custom-app-text-editor.css +2 -0
  37. package/lib/custom-app-text-editor.js +81102 -0
  38. package/lib/cynefin-VYW2F7L2-CMgnLl46.js +3 -0
  39. package/lib/cynefinDiagram-TSTJHNR4-988Y73wV.js +355 -0
  40. package/lib/cytoscape.esm-DMXbtFI-.js +18145 -0
  41. package/lib/dagre-Dmarb1s8.js +1699 -0
  42. package/lib/dagre-VKFMJZFB-Bf-pz2Lx.js +328 -0
  43. package/lib/defaultLocale-A87O3snN.js +198 -0
  44. package/lib/diagram-FQU43EPY-BT8WeVzc.js +432 -0
  45. package/lib/diagram-G47NLZAW-vZ2XG37l.js +527 -0
  46. package/lib/diagram-NH7WQ7WH-CH0IfHB0.js +134 -0
  47. package/lib/diagram-OA4YK3LP-BgwQcJfp.js +300 -0
  48. package/lib/diagram-WEI45ONY-Cd3sVPil.js +214 -0
  49. package/lib/dist-PGS6ynRO.js +59 -0
  50. package/lib/ebnfDiagram-CCIWWBDH-CwBFb2Fm.js +100 -0
  51. package/lib/erDiagram-Q63AITRT-BshRACvj.js +1727 -0
  52. package/lib/eventmodeling-45OFAUF4-BDhzj03B.js +3 -0
  53. package/lib/flowDiagram-23GEKE2U-C3zDgFvZ.js +16 -0
  54. package/lib/ganttDiagram-NO4QXBWP-BD5PiE8x.js +3073 -0
  55. package/lib/gitGraph-TEB2WS4Q-DJA_hE4G.js +3 -0
  56. package/lib/gitGraphDiagram-IHSO6WYX-BAhccBh3.js +733 -0
  57. package/lib/graphlib-DglfpsVp.js +1267 -0
  58. package/lib/index.browser-Dv9K8IAp.js +26 -0
  59. package/lib/info-DKCQHKI2-BD_vOCz6.js +3 -0
  60. package/lib/infoDiagram-FWYZ7A6U-CGZnf03G.js +20 -0
  61. package/lib/init-sjaVZO3f.js +13 -0
  62. package/lib/ishikawaDiagram-FXEZZL3T-PFfVM0NO.js +719 -0
  63. package/lib/journeyDiagram-5HDEW3XC-CRGz7dcx.js +884 -0
  64. package/lib/kanban-definition-HUTT4EX6-BBH4Yn5e.js +974 -0
  65. package/lib/line-CJQicKfr.js +34 -0
  66. package/lib/linear-B9Cv96-J.js +288 -0
  67. package/lib/map-C7KALUOH.js +241 -0
  68. package/lib/mermaid-parser.core-BupC9XGF.js +638 -0
  69. package/lib/mermaid-renderer-Cp0xusfR.js +2425 -0
  70. package/lib/mindmap-definition-LN4V7U3C-CWL1sg0K.js +978 -0
  71. package/lib/ordinal-CNQzPcrr.js +65 -0
  72. package/lib/packet-7NZHBO7P-CgBlALV1.js +3 -0
  73. package/lib/path-DVvH25eQ.js +84 -0
  74. package/lib/pegDiagram-2B236MQR-BKv8dTtv.js +94 -0
  75. package/lib/pie-RZYD4A2V-CryPC-P_.js +3 -0
  76. package/lib/pieDiagram-ENE6RG2P-CXeFg_cL.js +203 -0
  77. package/lib/quadrantDiagram-ABIIQ3AL-v_u3aC8Y.js +2001 -0
  78. package/lib/radar-I7S5WNFK-DgzJDRy3.js +3 -0
  79. package/lib/railroad-3IZDKUUU-DFp3mbpB.js +3 -0
  80. package/lib/railroad-abnf-AHOZXSZD-BRjidKH0.js +3 -0
  81. package/lib/railroad-ebnf-EBAXGLYW-PgrDWact.js +3 -0
  82. package/lib/railroad-peg-LSFZ7HO6-CMKir81Y.js +3 -0
  83. package/lib/railroadDiagram-RFXS5EU6-mEC9tVS-.js +76 -0
  84. package/lib/requirementDiagram-TGXJPOKE-BAEzI7V4.js +2223 -0
  85. package/lib/rolldown-runtime-DArdT4gl.js +23 -0
  86. package/lib/rough.esm-B2w_aYoc.js +1361 -0
  87. package/lib/sankeyDiagram-HTMAVEWB-Dbu-sl2E.js +972 -0
  88. package/lib/sequenceDiagram-DBY2YBRQ-DCuWmWHX.js +4156 -0
  89. package/lib/sizeCapture-X5ZJPWSS-BEIM84He.js +46 -0
  90. package/lib/src-DQbL46sB.js +2139 -0
  91. package/lib/src-DuuHKEe6.js +704 -0
  92. package/lib/stateDiagram-2N3HPSRC-fs9QmDMR.js +220 -0
  93. package/lib/stateDiagram-v2-6OUMAXLB-wWxYbttN.js +30 -0
  94. package/lib/swimlanes-5IMT3BWC-QaXUd9db.js +5069 -0
  95. package/lib/swimlanesDiagram-G3AALYLV-BtGToCzH.js +30 -0
  96. package/lib/timeline-definition-FHXFAJF6-CAsyJrsw.js +1069 -0
  97. package/lib/treeView-QDETBFTQ-DVp4aTZQ.js +3 -0
  98. package/lib/treemap-6X3UGDF4-BbBnHMHJ.js +3 -0
  99. package/lib/types.d.ts +44 -0
  100. package/lib/v4-CZv9Hsqq.js +33 -0
  101. package/lib/vennDiagram-L72KCM5P-C87u0gjr.js +1880 -0
  102. package/lib/wardley-OPB4EBWU-B-RXhnoN.js +3 -0
  103. package/lib/wardleyDiagram-EHGQE667-BxviBDl_.js +645 -0
  104. package/lib/xychartDiagram-FW5EYKEG-BQQhanuH.js +2098 -0
  105. package/package.json +29 -0
@@ -0,0 +1,2425 @@
1
+ import { r as e, t } from "./index.browser-Dv9K8IAp.js";
2
+ import { n } from "./chunk-Y2CYZVJY-QdJ4V9rh.js";
3
+ import { h as r, m as i, p as a } from "./src-DQbL46sB.js";
4
+ import { $ as o, C as s, E as c, I as l, L as u, N as d, P as f, Q as p, S as m, T as h, V as g, W as _, X as v, Z as y, _ as b, b as x, c as S, g as C, l as ee, m as te, n as ne, p as re, q as ie, r as ae, s as oe, t as se, u as ce, x as w } from "./chunk-WYO6CB5R-MV-yOaop.js";
5
+ import { S as le, a as ue, d as de, f as fe, g as pe, h as me, i as he, o as ge, v as _e, x as ve, y as ye } from "./chunk-ICXQ74PX-VqT5WUTt.js";
6
+ import { r as be } from "./chunk-HOUHSVGY-Br7ZSMKe.js";
7
+ import { r as xe } from "./chunk-Q4XR5HBZ-CRgGP3ez.js";
8
+ import "./chunk-7BUUIJ7U-B018BbRy.js";
9
+ import "./chunk-OGEWGWER-BvF6eV9Q.js";
10
+ import "./chunk-C7G6YPKG-CmOuVFlJ.js";
11
+ import { a as Se, i as Ce, s as we } from "./chunk-ZGVPDNZ5-l81xl1BI.js";
12
+ import { a as Te, i as Ee, o as De, r as Oe } from "./chunk-52WLFC77-Cf8zEoqs.js";
13
+ import { useCallback as ke, useEffect as Ae, useRef as je, useState as Me } from "react";
14
+ import { jsx as Ne } from "react/jsx-runtime";
15
+ import { fontFamilyCode as Pe } from "@fibery/ui-kit/src/design-system";
16
+ import { useTheme as Fe, useThemeMode as Ie } from "@fibery/ui-kit/src/theme";
17
+ import { useToast as Le } from "@fibery/ui-kit/src/toast/toast-provider";
18
+ import { createPhotoSwipeLightbox as Re, galleryMainClass as ze } from "@fibery/ui-kit/src/images-gallery/images-gallery";
19
+ //#region ../../node_modules/.pnpm/mermaid@11.16.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-VAUOI2AC.mjs
20
+ var Be = /* @__PURE__ */ n((e) => {
21
+ let { securityLevel: t } = w(), n = a("body");
22
+ if (t === "sandbox") {
23
+ let t = a(`#i${e}`).node()?.contentDocument ?? document;
24
+ n = a(t.body);
25
+ }
26
+ return n.select(`#${e}`);
27
+ }, "selectSvgElement");
28
+ //#endregion
29
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/compat/_internal/isPrototype.mjs
30
+ function Ve(e) {
31
+ let t = e?.constructor;
32
+ return e === (typeof t == "function" ? t.prototype : Object.prototype);
33
+ }
34
+ //#endregion
35
+ //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/compat/predicate/isEmpty.mjs
36
+ function He(e) {
37
+ if (e == null) return !0;
38
+ if (ve(e)) return typeof e.splice != "function" && typeof e != "string" && !le(e) && !_e(e) && !ye(e) ? !1 : e.length === 0;
39
+ if (typeof e == "object" || typeof e == "function") {
40
+ if (e instanceof Map || e instanceof Set) return e.size === 0;
41
+ let t = Object.keys(e);
42
+ return Ve(e) ? t.filter((e) => e !== "constructor").length === 0 : t.length === 0;
43
+ }
44
+ return !0;
45
+ }
46
+ //#endregion
47
+ //#region ../../node_modules/.pnpm/mermaid@11.16.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FWX5IMBZ.mjs
48
+ var Ue = {
49
+ common: oe,
50
+ getConfig: x,
51
+ insertCluster: Ce,
52
+ insertEdge: Oe,
53
+ insertEdgeLabel: Ee,
54
+ insertMarkers: Te,
55
+ insertNode: Se,
56
+ interpolateToCurve: de,
57
+ labelHelper: we,
58
+ log: i,
59
+ positionEdgeLabel: De
60
+ }, We = {}, Ge = /* @__PURE__ */ n((e) => {
61
+ for (let t of e) We[t.name] = t;
62
+ }, "registerLayoutLoaders");
63
+ (/* @__PURE__ */ n(() => {
64
+ Ge([
65
+ {
66
+ name: "dagre",
67
+ loader: /* @__PURE__ */ n(async () => await import("./dagre-VKFMJZFB-Bf-pz2Lx.js"), "loader")
68
+ },
69
+ {
70
+ name: "swimlane",
71
+ loader: /* @__PURE__ */ n(async () => await import("./swimlanes-5IMT3BWC-QaXUd9db.js"), "loader")
72
+ },
73
+ {
74
+ name: "cose-bilkent",
75
+ loader: /* @__PURE__ */ n(async () => await import("./cose-bilkent-JH36ORCC-CyVZn5M3.js"), "loader")
76
+ }
77
+ ]);
78
+ }, "registerDefaultLayoutLoaders"))();
79
+ var Ke = /* @__PURE__ */ n(async (e, t, n) => {
80
+ if (!(e.layoutAlgorithm in We)) throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);
81
+ if (e.diagramId) for (let t of e.nodes) {
82
+ let n = t.domId || t.id;
83
+ t.domId = `${e.diagramId}-${n}`;
84
+ }
85
+ let r = We[e.layoutAlgorithm], i = await r.loader(), { theme: a, themeVariables: o } = e.config, { useGradient: s, gradientStart: c, gradientStop: l } = o, u = t.attr("id");
86
+ if (t.append("defs").append("filter").attr("id", `${u}-drop-shadow`).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", "0.06").attr("flood-color", `${a?.includes("dark") ? "#FFFFFF" : "#000000"}`), t.append("defs").append("filter").attr("id", `${u}-drop-shadow-small`).attr("height", "150%").attr("width", "150%").append("feDropShadow").attr("dx", "2").attr("dy", "2").attr("stdDeviation", 0).attr("flood-opacity", "0.06").attr("flood-color", `${a?.includes("dark") ? "#FFFFFF" : "#000000"}`), s) {
87
+ let e = t.append("linearGradient").attr("id", t.attr("id") + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
88
+ e.append("svg:stop").attr("offset", "0%").attr("stop-color", c).attr("stop-opacity", 1), e.append("svg:stop").attr("offset", "100%").attr("stop-color", l).attr("stop-opacity", 1);
89
+ }
90
+ return i.render(e, t, Ue, { algorithm: r.algorithm }, n);
91
+ }, "render"), qe = /* @__PURE__ */ n((e = "", { fallback: t = "dagre" } = {}) => {
92
+ if (e in We) return e;
93
+ if (t in We) return i.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`), t;
94
+ throw Error(`Both layout algorithms ${e} and ${t} are not registered.`);
95
+ }, "getRegisteredLayoutAlgorithm");
96
+ //#endregion
97
+ //#region ../../node_modules/.pnpm/mermaid@11.16.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZIRB5QZD.mjs
98
+ function Je(e) {
99
+ return e == null;
100
+ }
101
+ n(Je, "isNothing");
102
+ function Ye(e) {
103
+ return typeof e == "object" && !!e;
104
+ }
105
+ n(Ye, "isObject");
106
+ function Xe(e) {
107
+ return Array.isArray(e) ? e : Je(e) ? [] : [e];
108
+ }
109
+ n(Xe, "toArray");
110
+ function Ze(e, t) {
111
+ var n, r, i, a;
112
+ if (t) for (a = Object.keys(t), n = 0, r = a.length; n < r; n += 1) i = a[n], e[i] = t[i];
113
+ return e;
114
+ }
115
+ n(Ze, "extend");
116
+ function Qe(e, t) {
117
+ var n = "", r;
118
+ for (r = 0; r < t; r += 1) n += e;
119
+ return n;
120
+ }
121
+ n(Qe, "repeat");
122
+ function $e(e) {
123
+ return e === 0 && 1 / e == -Infinity;
124
+ }
125
+ n($e, "isNegativeZero");
126
+ var T = {
127
+ isNothing: Je,
128
+ isObject: Ye,
129
+ toArray: Xe,
130
+ repeat: Qe,
131
+ isNegativeZero: $e,
132
+ extend: Ze
133
+ };
134
+ function et(e, t) {
135
+ var n = "", r = e.reason || "(unknown reason)";
136
+ return e.mark ? (e.mark.name && (n += "in \"" + e.mark.name + "\" "), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += "\n\n" + e.mark.snippet), r + " " + n) : r;
137
+ }
138
+ n(et, "formatError");
139
+ function E(e, t) {
140
+ Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = et(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ Error()).stack || "";
141
+ }
142
+ n(E, "YAMLException$1"), E.prototype = Object.create(Error.prototype), E.prototype.constructor = E, E.prototype.toString = /* @__PURE__ */ n(function(e) {
143
+ return this.name + ": " + et(this, e);
144
+ }, "toString");
145
+ var D = E;
146
+ function tt(e, t, n, r, i) {
147
+ var a = "", o = "", s = Math.floor(i / 2) - 1;
148
+ return r - t > s && (a = " ... ", t = r - s + a.length), n - r > s && (o = " ...", n = r + s - o.length), {
149
+ str: a + e.slice(t, n).replace(/\t/g, "→") + o,
150
+ pos: r - t + a.length
151
+ };
152
+ }
153
+ n(tt, "getLine");
154
+ function nt(e, t) {
155
+ return T.repeat(" ", t - e.length) + e;
156
+ }
157
+ n(nt, "padStart");
158
+ function rt(e, t) {
159
+ if (t = Object.create(t || null), !e.buffer) return null;
160
+ t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
161
+ for (var n = /\r?\n|\r|\0/g, r = [0], i = [], a, o = -1; a = n.exec(e.buffer);) i.push(a.index), r.push(a.index + a[0].length), e.position <= a.index && o < 0 && (o = r.length - 2);
162
+ o < 0 && (o = r.length - 1);
163
+ var s = "", c, l, u = Math.min(e.line + t.linesAfter, i.length).toString().length, d = t.maxLength - (t.indent + u + 3);
164
+ for (c = 1; c <= t.linesBefore && !(o - c < 0); c++) l = tt(e.buffer, r[o - c], i[o - c], e.position - (r[o] - r[o - c]), d), s = T.repeat(" ", t.indent) + nt((e.line - c + 1).toString(), u) + " | " + l.str + "\n" + s;
165
+ for (l = tt(e.buffer, r[o], i[o], e.position, d), s += T.repeat(" ", t.indent) + nt((e.line + 1).toString(), u) + " | " + l.str + "\n", s += T.repeat("-", t.indent + u + 3 + l.pos) + "^\n", c = 1; c <= t.linesAfter && !(o + c >= i.length); c++) l = tt(e.buffer, r[o + c], i[o + c], e.position - (r[o] - r[o + c]), d), s += T.repeat(" ", t.indent) + nt((e.line + c + 1).toString(), u) + " | " + l.str + "\n";
166
+ return s.replace(/\n$/, "");
167
+ }
168
+ n(rt, "makeSnippet");
169
+ var it = rt, at = [
170
+ "kind",
171
+ "multi",
172
+ "resolve",
173
+ "construct",
174
+ "instanceOf",
175
+ "predicate",
176
+ "represent",
177
+ "representName",
178
+ "defaultStyle",
179
+ "styleAliases"
180
+ ], ot = [
181
+ "scalar",
182
+ "sequence",
183
+ "mapping"
184
+ ];
185
+ function st(e) {
186
+ var t = {};
187
+ return e !== null && Object.keys(e).forEach(function(n) {
188
+ e[n].forEach(function(e) {
189
+ t[String(e)] = n;
190
+ });
191
+ }), t;
192
+ }
193
+ n(st, "compileStyleAliases");
194
+ function ct(e, t) {
195
+ if (t ||= {}, Object.keys(t).forEach(function(t) {
196
+ if (at.indexOf(t) === -1) throw new D("Unknown option \"" + t + "\" is met in definition of \"" + e + "\" YAML type.");
197
+ }), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
198
+ return !0;
199
+ }, this.construct = t.construct || function(e) {
200
+ return e;
201
+ }, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = st(t.styleAliases || null), ot.indexOf(this.kind) === -1) throw new D("Unknown kind \"" + this.kind + "\" is specified for \"" + e + "\" YAML type.");
202
+ }
203
+ n(ct, "Type$1");
204
+ var O = ct;
205
+ function lt(e, t) {
206
+ var n = [];
207
+ return e[t].forEach(function(e) {
208
+ var t = n.length;
209
+ n.forEach(function(n, r) {
210
+ n.tag === e.tag && n.kind === e.kind && n.multi === e.multi && (t = r);
211
+ }), n[t] = e;
212
+ }), n;
213
+ }
214
+ n(lt, "compileList");
215
+ function ut() {
216
+ var e = {
217
+ scalar: {},
218
+ sequence: {},
219
+ mapping: {},
220
+ fallback: {},
221
+ multi: {
222
+ scalar: [],
223
+ sequence: [],
224
+ mapping: [],
225
+ fallback: []
226
+ }
227
+ }, t, r;
228
+ function i(t) {
229
+ t.multi ? (e.multi[t.kind].push(t), e.multi.fallback.push(t)) : e[t.kind][t.tag] = e.fallback[t.tag] = t;
230
+ }
231
+ for (n(i, "collectType"), t = 0, r = arguments.length; t < r; t += 1) arguments[t].forEach(i);
232
+ return e;
233
+ }
234
+ n(ut, "compileMap");
235
+ function dt(e) {
236
+ return this.extend(e);
237
+ }
238
+ n(dt, "Schema$1"), dt.prototype.extend = /* @__PURE__ */ n(function(e) {
239
+ var t = [], n = [];
240
+ if (e instanceof O) n.push(e);
241
+ else if (Array.isArray(e)) n = n.concat(e);
242
+ else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit))) e.implicit && (t = t.concat(e.implicit)), e.explicit && (n = n.concat(e.explicit));
243
+ else throw new D("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
244
+ t.forEach(function(e) {
245
+ if (!(e instanceof O)) throw new D("Specified list of YAML types (or a single Type object) contains a non-Type object.");
246
+ if (e.loadKind && e.loadKind !== "scalar") throw new D("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
247
+ if (e.multi) throw new D("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
248
+ }), n.forEach(function(e) {
249
+ if (!(e instanceof O)) throw new D("Specified list of YAML types (or a single Type object) contains a non-Type object.");
250
+ });
251
+ var r = Object.create(dt.prototype);
252
+ return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = lt(r, "implicit"), r.compiledExplicit = lt(r, "explicit"), r.compiledTypeMap = ut(r.compiledImplicit, r.compiledExplicit), r;
253
+ }, "extend");
254
+ var ft = new dt({ explicit: [
255
+ new O("tag:yaml.org,2002:str", {
256
+ kind: "scalar",
257
+ construct: /* @__PURE__ */ n(function(e) {
258
+ return e === null ? "" : e;
259
+ }, "construct")
260
+ }),
261
+ new O("tag:yaml.org,2002:seq", {
262
+ kind: "sequence",
263
+ construct: /* @__PURE__ */ n(function(e) {
264
+ return e === null ? [] : e;
265
+ }, "construct")
266
+ }),
267
+ new O("tag:yaml.org,2002:map", {
268
+ kind: "mapping",
269
+ construct: /* @__PURE__ */ n(function(e) {
270
+ return e === null ? {} : e;
271
+ }, "construct")
272
+ })
273
+ ] });
274
+ function pt(e) {
275
+ if (e === null) return !0;
276
+ var t = e.length;
277
+ return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
278
+ }
279
+ n(pt, "resolveYamlNull");
280
+ function mt() {
281
+ return null;
282
+ }
283
+ n(mt, "constructYamlNull");
284
+ function ht(e) {
285
+ return e === null;
286
+ }
287
+ n(ht, "isNull");
288
+ var gt = new O("tag:yaml.org,2002:null", {
289
+ kind: "scalar",
290
+ resolve: pt,
291
+ construct: mt,
292
+ predicate: ht,
293
+ represent: {
294
+ canonical: /* @__PURE__ */ n(function() {
295
+ return "~";
296
+ }, "canonical"),
297
+ lowercase: /* @__PURE__ */ n(function() {
298
+ return "null";
299
+ }, "lowercase"),
300
+ uppercase: /* @__PURE__ */ n(function() {
301
+ return "NULL";
302
+ }, "uppercase"),
303
+ camelcase: /* @__PURE__ */ n(function() {
304
+ return "Null";
305
+ }, "camelcase"),
306
+ empty: /* @__PURE__ */ n(function() {
307
+ return "";
308
+ }, "empty")
309
+ },
310
+ defaultStyle: "lowercase"
311
+ });
312
+ function _t(e) {
313
+ if (e === null) return !1;
314
+ var t = e.length;
315
+ return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
316
+ }
317
+ n(_t, "resolveYamlBoolean");
318
+ function vt(e) {
319
+ return e === "true" || e === "True" || e === "TRUE";
320
+ }
321
+ n(vt, "constructYamlBoolean");
322
+ function yt(e) {
323
+ return Object.prototype.toString.call(e) === "[object Boolean]";
324
+ }
325
+ n(yt, "isBoolean");
326
+ var bt = new O("tag:yaml.org,2002:bool", {
327
+ kind: "scalar",
328
+ resolve: _t,
329
+ construct: vt,
330
+ predicate: yt,
331
+ represent: {
332
+ lowercase: /* @__PURE__ */ n(function(e) {
333
+ return e ? "true" : "false";
334
+ }, "lowercase"),
335
+ uppercase: /* @__PURE__ */ n(function(e) {
336
+ return e ? "TRUE" : "FALSE";
337
+ }, "uppercase"),
338
+ camelcase: /* @__PURE__ */ n(function(e) {
339
+ return e ? "True" : "False";
340
+ }, "camelcase")
341
+ },
342
+ defaultStyle: "lowercase"
343
+ });
344
+ function xt(e) {
345
+ return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
346
+ }
347
+ n(xt, "isHexCode");
348
+ function St(e) {
349
+ return 48 <= e && e <= 55;
350
+ }
351
+ n(St, "isOctCode");
352
+ function Ct(e) {
353
+ return 48 <= e && e <= 57;
354
+ }
355
+ n(Ct, "isDecCode");
356
+ function wt(e) {
357
+ if (e === null) return !1;
358
+ var t = e.length, n = 0, r = !1, i;
359
+ if (!t) return !1;
360
+ if (i = e[n], (i === "-" || i === "+") && (i = e[++n]), i === "0") {
361
+ if (n + 1 === t) return !0;
362
+ if (i = e[++n], i === "b") {
363
+ for (n++; n < t; n++) if (i = e[n], i !== "_") {
364
+ if (i !== "0" && i !== "1") return !1;
365
+ r = !0;
366
+ }
367
+ return r && i !== "_";
368
+ }
369
+ if (i === "x") {
370
+ for (n++; n < t; n++) if (i = e[n], i !== "_") {
371
+ if (!xt(e.charCodeAt(n))) return !1;
372
+ r = !0;
373
+ }
374
+ return r && i !== "_";
375
+ }
376
+ if (i === "o") {
377
+ for (n++; n < t; n++) if (i = e[n], i !== "_") {
378
+ if (!St(e.charCodeAt(n))) return !1;
379
+ r = !0;
380
+ }
381
+ return r && i !== "_";
382
+ }
383
+ }
384
+ if (i === "_") return !1;
385
+ for (; n < t; n++) if (i = e[n], i !== "_") {
386
+ if (!Ct(e.charCodeAt(n))) return !1;
387
+ r = !0;
388
+ }
389
+ return !(!r || i === "_");
390
+ }
391
+ n(wt, "resolveYamlInteger");
392
+ function Tt(e) {
393
+ var t = e, n = 1, r;
394
+ if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), r = t[0], (r === "-" || r === "+") && (r === "-" && (n = -1), t = t.slice(1), r = t[0]), t === "0") return 0;
395
+ if (r === "0") {
396
+ if (t[1] === "b") return n * parseInt(t.slice(2), 2);
397
+ if (t[1] === "x") return n * parseInt(t.slice(2), 16);
398
+ if (t[1] === "o") return n * parseInt(t.slice(2), 8);
399
+ }
400
+ return n * parseInt(t, 10);
401
+ }
402
+ n(Tt, "constructYamlInteger");
403
+ function Et(e) {
404
+ return Object.prototype.toString.call(e) === "[object Number]" && e % 1 == 0 && !T.isNegativeZero(e);
405
+ }
406
+ n(Et, "isInteger");
407
+ var Dt = new O("tag:yaml.org,2002:int", {
408
+ kind: "scalar",
409
+ resolve: wt,
410
+ construct: Tt,
411
+ predicate: Et,
412
+ represent: {
413
+ binary: /* @__PURE__ */ n(function(e) {
414
+ return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
415
+ }, "binary"),
416
+ octal: /* @__PURE__ */ n(function(e) {
417
+ return e >= 0 ? "0o" + e.toString(8) : "-0o" + e.toString(8).slice(1);
418
+ }, "octal"),
419
+ decimal: /* @__PURE__ */ n(function(e) {
420
+ return e.toString(10);
421
+ }, "decimal"),
422
+ hexadecimal: /* @__PURE__ */ n(function(e) {
423
+ return e >= 0 ? "0x" + e.toString(16).toUpperCase() : "-0x" + e.toString(16).toUpperCase().slice(1);
424
+ }, "hexadecimal")
425
+ },
426
+ defaultStyle: "decimal",
427
+ styleAliases: {
428
+ binary: [2, "bin"],
429
+ octal: [8, "oct"],
430
+ decimal: [10, "dec"],
431
+ hexadecimal: [16, "hex"]
432
+ }
433
+ }), Ot = /* @__PURE__ */ RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
434
+ function kt(e) {
435
+ return !(e === null || !Ot.test(e) || e[e.length - 1] === "_");
436
+ }
437
+ n(kt, "resolveYamlFloat");
438
+ function At(e) {
439
+ var t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1;
440
+ return "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Infinity : -Infinity : t === ".nan" ? NaN : n * parseFloat(t, 10);
441
+ }
442
+ n(At, "constructYamlFloat");
443
+ var jt = /^[-+]?[0-9]+e/;
444
+ function Mt(e, t) {
445
+ var n;
446
+ if (isNaN(e)) switch (t) {
447
+ case "lowercase": return ".nan";
448
+ case "uppercase": return ".NAN";
449
+ case "camelcase": return ".NaN";
450
+ }
451
+ else if (e === Infinity) switch (t) {
452
+ case "lowercase": return ".inf";
453
+ case "uppercase": return ".INF";
454
+ case "camelcase": return ".Inf";
455
+ }
456
+ else if (e === -Infinity) switch (t) {
457
+ case "lowercase": return "-.inf";
458
+ case "uppercase": return "-.INF";
459
+ case "camelcase": return "-.Inf";
460
+ }
461
+ else if (T.isNegativeZero(e)) return "-0.0";
462
+ return n = e.toString(10), jt.test(n) ? n.replace("e", ".e") : n;
463
+ }
464
+ n(Mt, "representYamlFloat");
465
+ function Nt(e) {
466
+ return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 != 0 || T.isNegativeZero(e));
467
+ }
468
+ n(Nt, "isFloat");
469
+ var Pt = new O("tag:yaml.org,2002:float", {
470
+ kind: "scalar",
471
+ resolve: kt,
472
+ construct: At,
473
+ predicate: Nt,
474
+ represent: Mt,
475
+ defaultStyle: "lowercase"
476
+ }), Ft = ft.extend({ implicit: [
477
+ gt,
478
+ bt,
479
+ Dt,
480
+ Pt
481
+ ] }), It = Ft, Lt = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), Rt = /* @__PURE__ */ 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]))?))?$");
482
+ function zt(e) {
483
+ return e === null ? !1 : Lt.exec(e) !== null || Rt.exec(e) !== null;
484
+ }
485
+ n(zt, "resolveYamlTimestamp");
486
+ function Bt(e) {
487
+ var t, n, r, i, a, o, s, c = 0, l = null, u, d, f;
488
+ if (t = Lt.exec(e), t === null && (t = Rt.exec(e)), t === null) throw Error("Date resolve error");
489
+ if (n = +t[1], r = t[2] - 1, i = +t[3], !t[4]) return new Date(Date.UTC(n, r, i));
490
+ if (a = +t[4], o = +t[5], s = +t[6], t[7]) {
491
+ for (c = t[7].slice(0, 3); c.length < 3;) c += "0";
492
+ c = +c;
493
+ }
494
+ return t[9] && (u = +t[10], d = +(t[11] || 0), l = (u * 60 + d) * 6e4, t[9] === "-" && (l = -l)), f = new Date(Date.UTC(n, r, i, a, o, s, c)), l && f.setTime(f.getTime() - l), f;
495
+ }
496
+ n(Bt, "constructYamlTimestamp");
497
+ function Vt(e) {
498
+ return e.toISOString();
499
+ }
500
+ n(Vt, "representYamlTimestamp");
501
+ var Ht = new O("tag:yaml.org,2002:timestamp", {
502
+ kind: "scalar",
503
+ resolve: zt,
504
+ construct: Bt,
505
+ instanceOf: Date,
506
+ represent: Vt
507
+ });
508
+ function Ut(e) {
509
+ return e === "<<" || e === null;
510
+ }
511
+ n(Ut, "resolveYamlMerge");
512
+ var Wt = new O("tag:yaml.org,2002:merge", {
513
+ kind: "scalar",
514
+ resolve: Ut
515
+ }), Gt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
516
+ function Kt(e) {
517
+ if (e === null) return !1;
518
+ var t, n, r = 0, i = e.length, a = Gt;
519
+ for (n = 0; n < i; n++) if (t = a.indexOf(e.charAt(n)), !(t > 64)) {
520
+ if (t < 0) return !1;
521
+ r += 6;
522
+ }
523
+ return r % 8 == 0;
524
+ }
525
+ n(Kt, "resolveYamlBinary");
526
+ function qt(e) {
527
+ var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a = Gt, o = 0, s = [];
528
+ for (t = 0; t < i; t++) t % 4 == 0 && t && (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)), o = o << 6 | a.indexOf(r.charAt(t));
529
+ return n = i % 4 * 6, n === 0 ? (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)) : n === 18 ? (s.push(o >> 10 & 255), s.push(o >> 2 & 255)) : n === 12 && s.push(o >> 4 & 255), new Uint8Array(s);
530
+ }
531
+ n(qt, "constructYamlBinary");
532
+ function Jt(e) {
533
+ var t = "", n = 0, r, i, a = e.length, o = Gt;
534
+ for (r = 0; r < a; r++) r % 3 == 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
535
+ return i = a % 3, i === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : i === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : i === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
536
+ }
537
+ n(Jt, "representYamlBinary");
538
+ function Yt(e) {
539
+ return Object.prototype.toString.call(e) === "[object Uint8Array]";
540
+ }
541
+ n(Yt, "isBinary");
542
+ var Xt = new O("tag:yaml.org,2002:binary", {
543
+ kind: "scalar",
544
+ resolve: Kt,
545
+ construct: qt,
546
+ predicate: Yt,
547
+ represent: Jt
548
+ }), Zt = Object.prototype.hasOwnProperty, Qt = Object.prototype.toString;
549
+ function $t(e) {
550
+ if (e === null) return !0;
551
+ var t = [], n, r, i, a, o, s = e;
552
+ for (n = 0, r = s.length; n < r; n += 1) {
553
+ if (i = s[n], o = !1, Qt.call(i) !== "[object Object]") return !1;
554
+ for (a in i) if (Zt.call(i, a)) {
555
+ if (!o) o = !0;
556
+ else return !1;
557
+ }
558
+ if (!o) return !1;
559
+ if (t.indexOf(a) === -1) t.push(a);
560
+ else return !1;
561
+ }
562
+ return !0;
563
+ }
564
+ n($t, "resolveYamlOmap");
565
+ function en(e) {
566
+ return e === null ? [] : e;
567
+ }
568
+ n(en, "constructYamlOmap");
569
+ var tn = new O("tag:yaml.org,2002:omap", {
570
+ kind: "sequence",
571
+ resolve: $t,
572
+ construct: en
573
+ }), nn = Object.prototype.toString;
574
+ function rn(e) {
575
+ if (e === null) return !0;
576
+ var t, n, r, i, a, o = e;
577
+ for (a = Array(o.length), t = 0, n = o.length; t < n; t += 1) {
578
+ if (r = o[t], nn.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1)) return !1;
579
+ a[t] = [i[0], r[i[0]]];
580
+ }
581
+ return !0;
582
+ }
583
+ n(rn, "resolveYamlPairs");
584
+ function an(e) {
585
+ if (e === null) return [];
586
+ var t, n, r, i, a, o = e;
587
+ for (a = Array(o.length), t = 0, n = o.length; t < n; t += 1) r = o[t], i = Object.keys(r), a[t] = [i[0], r[i[0]]];
588
+ return a;
589
+ }
590
+ n(an, "constructYamlPairs");
591
+ var on = new O("tag:yaml.org,2002:pairs", {
592
+ kind: "sequence",
593
+ resolve: rn,
594
+ construct: an
595
+ }), sn = Object.prototype.hasOwnProperty;
596
+ function cn(e) {
597
+ if (e === null) return !0;
598
+ var t, n = e;
599
+ for (t in n) if (sn.call(n, t) && n[t] !== null) return !1;
600
+ return !0;
601
+ }
602
+ n(cn, "resolveYamlSet");
603
+ function ln(e) {
604
+ return e === null ? {} : e;
605
+ }
606
+ n(ln, "constructYamlSet");
607
+ var un = new O("tag:yaml.org,2002:set", {
608
+ kind: "mapping",
609
+ resolve: cn,
610
+ construct: ln
611
+ }), dn = It.extend({
612
+ implicit: [Ht, Wt],
613
+ explicit: [
614
+ Xt,
615
+ tn,
616
+ on,
617
+ un
618
+ ]
619
+ }), k = Object.prototype.hasOwnProperty, fn = 1, pn = 2, mn = 3, hn = 4, gn = 1, _n = 2, vn = 3, yn = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, bn = /[\x85\u2028\u2029]/, xn = /[,\[\]\{\}]/, Sn = /^(?:!|!!|![a-z\-]+!)$/i, Cn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
620
+ function wn(e) {
621
+ return Object.prototype.toString.call(e);
622
+ }
623
+ n(wn, "_class");
624
+ function A(e) {
625
+ return e === 10 || e === 13;
626
+ }
627
+ n(A, "is_EOL");
628
+ function j(e) {
629
+ return e === 9 || e === 32;
630
+ }
631
+ n(j, "is_WHITE_SPACE");
632
+ function M(e) {
633
+ return e === 9 || e === 32 || e === 10 || e === 13;
634
+ }
635
+ n(M, "is_WS_OR_EOL");
636
+ function N(e) {
637
+ return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
638
+ }
639
+ n(N, "is_FLOW_INDICATOR");
640
+ function Tn(e) {
641
+ var t;
642
+ return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
643
+ }
644
+ n(Tn, "fromHexCode");
645
+ function En(e) {
646
+ return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
647
+ }
648
+ n(En, "escapedHexLen");
649
+ function Dn(e) {
650
+ return 48 <= e && e <= 57 ? e - 48 : -1;
651
+ }
652
+ n(Dn, "fromDecimalCode");
653
+ function On(e) {
654
+ return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? "\n" : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? "\"" : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "…" : e === 95 ? "\xA0" : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
655
+ }
656
+ n(On, "simpleEscapeSequence");
657
+ function kn(e) {
658
+ return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
659
+ }
660
+ n(kn, "charFromCodepoint");
661
+ function An(e, t, n) {
662
+ t === "__proto__" ? Object.defineProperty(e, t, {
663
+ configurable: !0,
664
+ enumerable: !0,
665
+ writable: !0,
666
+ value: n
667
+ }) : e[t] = n;
668
+ }
669
+ n(An, "setProperty");
670
+ var jn = Array(256), Mn = Array(256);
671
+ for (P = 0; P < 256; P++) jn[P] = +!!On(P), Mn[P] = On(P);
672
+ var P;
673
+ function Nn(e, t) {
674
+ this.input = e, this.filename = t.filename || null, this.schema = t.schema || dn, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
675
+ }
676
+ n(Nn, "State$1");
677
+ function Pn(e, t) {
678
+ var n = {
679
+ name: e.filename,
680
+ buffer: e.input.slice(0, -1),
681
+ position: e.position,
682
+ line: e.line,
683
+ column: e.position - e.lineStart
684
+ };
685
+ return n.snippet = it(n), new D(t, n);
686
+ }
687
+ n(Pn, "generateError");
688
+ function F(e, t) {
689
+ throw Pn(e, t);
690
+ }
691
+ n(F, "throwError");
692
+ function Fn(e, t) {
693
+ e.onWarning && e.onWarning.call(null, Pn(e, t));
694
+ }
695
+ n(Fn, "throwWarning");
696
+ var In = {
697
+ YAML: /* @__PURE__ */ n(function(e, t, n) {
698
+ var r, i, a;
699
+ e.version !== null && F(e, "duplication of %YAML directive"), n.length !== 1 && F(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && F(e, "ill-formed argument of the YAML directive"), i = parseInt(r[1], 10), a = parseInt(r[2], 10), i !== 1 && F(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Fn(e, "unsupported YAML version of the document");
700
+ }, "handleYamlDirective"),
701
+ TAG: /* @__PURE__ */ n(function(e, t, n) {
702
+ var r, i;
703
+ n.length !== 2 && F(e, "TAG directive accepts exactly two arguments"), r = n[0], i = n[1], Sn.test(r) || F(e, "ill-formed tag handle (first argument) of the TAG directive"), k.call(e.tagMap, r) && F(e, "there is a previously declared suffix for \"" + r + "\" tag handle"), Cn.test(i) || F(e, "ill-formed tag prefix (second argument) of the TAG directive");
704
+ try {
705
+ i = decodeURIComponent(i);
706
+ } catch {
707
+ F(e, "tag prefix is malformed: " + i);
708
+ }
709
+ e.tagMap[r] = i;
710
+ }, "handleTagDirective")
711
+ };
712
+ function I(e, t, n, r) {
713
+ var i, a, o, s;
714
+ if (t < n) {
715
+ if (s = e.input.slice(t, n), r) for (i = 0, a = s.length; i < a; i += 1) o = s.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || F(e, "expected valid JSON character");
716
+ else yn.test(s) && F(e, "the stream contains non-printable characters");
717
+ e.result += s;
718
+ }
719
+ }
720
+ n(I, "captureSegment");
721
+ function Ln(e, t, n, r) {
722
+ var i, a, o, s;
723
+ for (T.isObject(n) || F(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, s = i.length; o < s; o += 1) a = i[o], k.call(t, a) || (An(t, a, n[a]), r[a] = !0);
724
+ }
725
+ n(Ln, "mergeMappings");
726
+ function L(e, t, n, r, i, a, o, s, c) {
727
+ var l, u;
728
+ if (Array.isArray(i)) for (i = Array.prototype.slice.call(i), l = 0, u = i.length; l < u; l += 1) Array.isArray(i[l]) && F(e, "nested arrays are not supported inside keys"), typeof i == "object" && wn(i[l]) === "[object Object]" && (i[l] = "[object Object]");
729
+ if (typeof i == "object" && wn(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge") {
730
+ if (Array.isArray(a)) for (l = 0, u = a.length; l < u; l += 1) Ln(e, t, a[l], n);
731
+ else Ln(e, t, a, n);
732
+ } else !e.json && !k.call(n, i) && k.call(t, i) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = c || e.position, F(e, "duplicated mapping key")), An(t, i, a), delete n[i];
733
+ return t;
734
+ }
735
+ n(L, "storeMappingPair");
736
+ function Rn(e) {
737
+ var t = e.input.charCodeAt(e.position);
738
+ t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : F(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
739
+ }
740
+ n(Rn, "readLineBreak");
741
+ function R(e, t, n) {
742
+ for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0;) {
743
+ for (; j(i);) i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
744
+ if (t && i === 35) do
745
+ i = e.input.charCodeAt(++e.position);
746
+ while (i !== 10 && i !== 13 && i !== 0);
747
+ if (A(i)) for (Rn(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32;) e.lineIndent++, i = e.input.charCodeAt(++e.position);
748
+ else break;
749
+ }
750
+ return n !== -1 && r !== 0 && e.lineIndent < n && Fn(e, "deficient indentation"), r;
751
+ }
752
+ n(R, "skipSeparationSpace");
753
+ function zn(e) {
754
+ var t = e.position, n = e.input.charCodeAt(t);
755
+ return !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || M(n)));
756
+ }
757
+ n(zn, "testDocumentSeparator");
758
+ function Bn(e, t) {
759
+ t === 1 ? e.result += " " : t > 1 && (e.result += T.repeat("\n", t - 1));
760
+ }
761
+ n(Bn, "writeFoldedLines");
762
+ function Vn(e, t, n) {
763
+ var r, i, a, o, s, c, l, u, d = e.kind, f = e.result, p = e.input.charCodeAt(e.position);
764
+ if (M(p) || N(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = e.input.charCodeAt(e.position + 1), M(i) || n && N(i))) return !1;
765
+ for (e.kind = "scalar", e.result = "", a = o = e.position, s = !1; p !== 0;) {
766
+ if (p === 58) {
767
+ if (i = e.input.charCodeAt(e.position + 1), M(i) || n && N(i)) break;
768
+ } else if (p === 35) {
769
+ if (r = e.input.charCodeAt(e.position - 1), M(r)) break;
770
+ } else if (e.position === e.lineStart && zn(e) || n && N(p)) break;
771
+ else if (A(p)) {
772
+ if (c = e.line, l = e.lineStart, u = e.lineIndent, R(e, !1, -1), e.lineIndent >= t) {
773
+ s = !0, p = e.input.charCodeAt(e.position);
774
+ continue;
775
+ }
776
+ e.position = o, e.line = c, e.lineStart = l, e.lineIndent = u;
777
+ break;
778
+ }
779
+ s &&= (I(e, a, o, !1), Bn(e, e.line - c), a = o = e.position, !1), j(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position);
780
+ }
781
+ return I(e, a, o, !1), e.result ? !0 : (e.kind = d, e.result = f, !1);
782
+ }
783
+ n(Vn, "readPlainScalar");
784
+ function Hn(e, t) {
785
+ var n = e.input.charCodeAt(e.position), r, i;
786
+ if (n !== 39) return !1;
787
+ for (e.kind = "scalar", e.result = "", e.position++, r = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0;) if (n === 39) {
788
+ if (I(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39) r = e.position, e.position++, i = e.position;
789
+ else return !0;
790
+ } else A(n) ? (I(e, r, i, !0), Bn(e, R(e, !1, t)), r = i = e.position) : e.position === e.lineStart && zn(e) ? F(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
791
+ F(e, "unexpected end of the stream within a single quoted scalar");
792
+ }
793
+ n(Hn, "readSingleQuotedScalar");
794
+ function Un(e, t) {
795
+ var n, r, i, a, o, s = e.input.charCodeAt(e.position);
796
+ if (s !== 34) return !1;
797
+ for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0;) if (s === 34) return I(e, n, e.position, !0), e.position++, !0;
798
+ else if (s === 92) {
799
+ if (I(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), A(s)) R(e, !1, t);
800
+ else if (s < 256 && jn[s]) e.result += Mn[s], e.position++;
801
+ else if ((o = En(s)) > 0) {
802
+ for (i = o, a = 0; i > 0; i--) s = e.input.charCodeAt(++e.position), (o = Tn(s)) >= 0 ? a = (a << 4) + o : F(e, "expected hexadecimal character");
803
+ e.result += kn(a), e.position++;
804
+ } else F(e, "unknown escape sequence");
805
+ n = r = e.position;
806
+ } else A(s) ? (I(e, n, r, !0), Bn(e, R(e, !1, t)), n = r = e.position) : e.position === e.lineStart && zn(e) ? F(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
807
+ F(e, "unexpected end of the stream within a double quoted scalar");
808
+ }
809
+ n(Un, "readDoubleQuotedScalar");
810
+ function Wn(e, t) {
811
+ var n = !0, r, i, a, o = e.tag, s, c = e.anchor, l, u, d, f, p, m = /* @__PURE__ */ Object.create(null), h, g, _, v = e.input.charCodeAt(e.position);
812
+ if (v === 91) u = 93, p = !1, s = [];
813
+ else if (v === 123) u = 125, p = !0, s = {};
814
+ else return !1;
815
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = s), v = e.input.charCodeAt(++e.position); v !== 0;) {
816
+ if (R(e, !0, t), v = e.input.charCodeAt(e.position), v === u) return e.position++, e.tag = o, e.anchor = c, e.kind = p ? "mapping" : "sequence", e.result = s, !0;
817
+ n ? v === 44 && F(e, "expected the node content, but found ','") : F(e, "missed comma between flow collection entries"), g = h = _ = null, d = f = !1, v === 63 && (l = e.input.charCodeAt(e.position + 1), M(l) && (d = f = !0, e.position++, R(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, z(e, t, fn, !1, !0), g = e.tag, h = e.result, R(e, !0, t), v = e.input.charCodeAt(e.position), (f || e.line === r) && v === 58 && (d = !0, v = e.input.charCodeAt(++e.position), R(e, !0, t), z(e, t, fn, !1, !0), _ = e.result), p ? L(e, s, m, g, h, _, r, i, a) : d ? s.push(L(e, null, m, g, h, _, r, i, a)) : s.push(h), R(e, !0, t), v = e.input.charCodeAt(e.position), v === 44 ? (n = !0, v = e.input.charCodeAt(++e.position)) : n = !1;
818
+ }
819
+ F(e, "unexpected end of the stream within a flow collection");
820
+ }
821
+ n(Wn, "readFlowCollection");
822
+ function Gn(e, t) {
823
+ var n, r, i = gn, a = !1, o = !1, s = t, c = 0, l = !1, u, d = e.input.charCodeAt(e.position);
824
+ if (d === 124) r = !1;
825
+ else if (d === 62) r = !0;
826
+ else return !1;
827
+ for (e.kind = "scalar", e.result = ""; d !== 0;) if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45) gn === i ? i = d === 43 ? vn : _n : F(e, "repeat of a chomping mode identifier");
828
+ else if ((u = Dn(d)) >= 0) u === 0 ? F(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? F(e, "repeat of an indentation width identifier") : (s = t + u - 1, o = !0);
829
+ else break;
830
+ if (j(d)) {
831
+ do
832
+ d = e.input.charCodeAt(++e.position);
833
+ while (j(d));
834
+ if (d === 35) do
835
+ d = e.input.charCodeAt(++e.position);
836
+ while (!A(d) && d !== 0);
837
+ }
838
+ for (; d !== 0;) {
839
+ for (Rn(e), e.lineIndent = 0, d = e.input.charCodeAt(e.position); (!o || e.lineIndent < s) && d === 32;) e.lineIndent++, d = e.input.charCodeAt(++e.position);
840
+ if (!o && e.lineIndent > s && (s = e.lineIndent), A(d)) {
841
+ c++;
842
+ continue;
843
+ }
844
+ if (e.lineIndent < s) {
845
+ i === vn ? e.result += T.repeat("\n", a ? 1 + c : c) : i === gn && a && (e.result += "\n");
846
+ break;
847
+ }
848
+ for (r ? j(d) ? (l = !0, e.result += T.repeat("\n", a ? 1 + c : c)) : l ? (l = !1, e.result += T.repeat("\n", c + 1)) : c === 0 ? a && (e.result += " ") : e.result += T.repeat("\n", c) : e.result += T.repeat("\n", a ? 1 + c : c), a = !0, o = !0, c = 0, n = e.position; !A(d) && d !== 0;) d = e.input.charCodeAt(++e.position);
849
+ I(e, n, e.position, !1);
850
+ }
851
+ return !0;
852
+ }
853
+ n(Gn, "readBlockScalar");
854
+ function Kn(e, t) {
855
+ var n, r = e.tag, i = e.anchor, a = [], o, s = !1, c;
856
+ if (e.firstTabInLine !== -1) return !1;
857
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = a), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), !(c !== 45 || (o = e.input.charCodeAt(e.position + 1), !M(o))));) {
858
+ if (s = !0, e.position++, R(e, !0, -1) && e.lineIndent <= t) {
859
+ a.push(null), c = e.input.charCodeAt(e.position);
860
+ continue;
861
+ }
862
+ if (n = e.line, z(e, t, mn, !1, !0), a.push(e.result), R(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0) F(e, "bad indentation of a sequence entry");
863
+ else if (e.lineIndent < t) break;
864
+ }
865
+ return s ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
866
+ }
867
+ n(Kn, "readBlockSequence");
868
+ function qn(e, t, n) {
869
+ var r, i, a, o, s, c, l = e.tag, u = e.anchor, d = {}, f = /* @__PURE__ */ Object.create(null), p = null, m = null, h = null, g = !1, _ = !1, v;
870
+ if (e.firstTabInLine !== -1) return !1;
871
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = d), v = e.input.charCodeAt(e.position); v !== 0;) {
872
+ if (!g && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (v === 63 || v === 58) && M(r)) v === 63 ? (g && (L(e, d, f, p, m, null, o, s, c), p = m = h = null), _ = !0, g = !0, i = !0) : g ? (g = !1, i = !0) : F(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = r;
873
+ else {
874
+ if (o = e.line, s = e.lineStart, c = e.position, !z(e, n, pn, !1, !0)) break;
875
+ if (e.line === a) {
876
+ for (v = e.input.charCodeAt(e.position); j(v);) v = e.input.charCodeAt(++e.position);
877
+ if (v === 58) v = e.input.charCodeAt(++e.position), M(v) || F(e, "a whitespace character is expected after the key-value separator within a block mapping"), g && (L(e, d, f, p, m, null, o, s, c), p = m = h = null), _ = !0, g = !1, i = !1, p = e.tag, m = e.result;
878
+ else if (_) F(e, "can not read an implicit mapping pair; a colon is missed");
879
+ else return e.tag = l, e.anchor = u, !0;
880
+ } else if (_) F(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
881
+ else return e.tag = l, e.anchor = u, !0;
882
+ }
883
+ if ((e.line === a || e.lineIndent > t) && (g && (o = e.line, s = e.lineStart, c = e.position), z(e, t, hn, !0, i) && (g ? m = e.result : h = e.result), g || (L(e, d, f, p, m, h, o, s, c), p = m = h = null), R(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && v !== 0) F(e, "bad indentation of a mapping entry");
884
+ else if (e.lineIndent < t) break;
885
+ }
886
+ return g && L(e, d, f, p, m, null, o, s, c), _ && (e.tag = l, e.anchor = u, e.kind = "mapping", e.result = d), _;
887
+ }
888
+ n(qn, "readBlockMapping");
889
+ function Jn(e) {
890
+ var t, n = !1, r = !1, i, a, o = e.input.charCodeAt(e.position);
891
+ if (o !== 33) return !1;
892
+ if (e.tag !== null && F(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
893
+ do
894
+ o = e.input.charCodeAt(++e.position);
895
+ while (o !== 0 && o !== 62);
896
+ e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : F(e, "unexpected end of the stream within a verbatim tag");
897
+ } else {
898
+ for (; o !== 0 && !M(o);) o === 33 && (r ? F(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), Sn.test(i) || F(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
899
+ a = e.input.slice(t, e.position), xn.test(a) && F(e, "tag suffix cannot contain flow indicator characters");
900
+ }
901
+ a && !Cn.test(a) && F(e, "tag name cannot contain such characters: " + a);
902
+ try {
903
+ a = decodeURIComponent(a);
904
+ } catch {
905
+ F(e, "tag name is malformed: " + a);
906
+ }
907
+ return n ? e.tag = a : k.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === "!" ? e.tag = "!" + a : i === "!!" ? e.tag = "tag:yaml.org,2002:" + a : F(e, "undeclared tag handle \"" + i + "\""), !0;
908
+ }
909
+ n(Jn, "readTagProperty");
910
+ function Yn(e) {
911
+ var t, n = e.input.charCodeAt(e.position);
912
+ if (n !== 38) return !1;
913
+ for (e.anchor !== null && F(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !M(n) && !N(n);) n = e.input.charCodeAt(++e.position);
914
+ return e.position === t && F(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
915
+ }
916
+ n(Yn, "readAnchorProperty");
917
+ function Xn(e) {
918
+ var t, n, r = e.input.charCodeAt(e.position);
919
+ if (r !== 42) return !1;
920
+ for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !M(r) && !N(r);) r = e.input.charCodeAt(++e.position);
921
+ return e.position === t && F(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), k.call(e.anchorMap, n) || F(e, "unidentified alias \"" + n + "\""), e.result = e.anchorMap[n], R(e, !0, -1), !0;
922
+ }
923
+ n(Xn, "readAlias");
924
+ function z(e, t, n, r, i) {
925
+ var a, o, s, c = 1, l = !1, u = !1, d, f, p, m, h, g;
926
+ if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = s = hn === n || mn === n, r && R(e, !0, -1) && (l = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1) for (; Jn(e) || Yn(e);) R(e, !0, -1) ? (l = !0, s = a, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : s = !1;
927
+ if (s &&= l || i, (c === 1 || hn === n) && (h = fn === n || pn === n ? t : t + 1, g = e.position - e.lineStart, c === 1 ? s && (Kn(e, g) || qn(e, g, h)) || Wn(e, h) ? u = !0 : (o && Gn(e, h) || Hn(e, h) || Un(e, h) ? u = !0 : Xn(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && F(e, "alias node should not have any properties")) : Vn(e, h, fn === n) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (u = s && Kn(e, g))), e.tag === null) e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
928
+ else if (e.tag === "?") {
929
+ for (e.result !== null && e.kind !== "scalar" && F(e, "unacceptable node kind for !<?> tag; it should be \"scalar\", not \"" + e.kind + "\""), d = 0, f = e.implicitTypes.length; d < f; d += 1) if (m = e.implicitTypes[d], m.resolve(e.result)) {
930
+ e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
931
+ break;
932
+ }
933
+ } else if (e.tag !== "!") {
934
+ if (k.call(e.typeMap[e.kind || "fallback"], e.tag)) m = e.typeMap[e.kind || "fallback"][e.tag];
935
+ else for (m = null, p = e.typeMap.multi[e.kind || "fallback"], d = 0, f = p.length; d < f; d += 1) if (e.tag.slice(0, p[d].tag.length) === p[d].tag) {
936
+ m = p[d];
937
+ break;
938
+ }
939
+ m || F(e, "unknown tag !<" + e.tag + ">"), e.result !== null && m.kind !== e.kind && F(e, "unacceptable node kind for !<" + e.tag + "> tag; it should be \"" + m.kind + "\", not \"" + e.kind + "\""), m.resolve(e.result, e.tag) ? (e.result = m.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : F(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
940
+ }
941
+ return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
942
+ }
943
+ n(z, "composeNode");
944
+ function Zn(e) {
945
+ var t = e.position, n, r, i, a = !1, o;
946
+ for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (R(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37));) {
947
+ for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !M(o);) o = e.input.charCodeAt(++e.position);
948
+ for (r = e.input.slice(n, e.position), i = [], r.length < 1 && F(e, "directive name must not be less than one character in length"); o !== 0;) {
949
+ for (; j(o);) o = e.input.charCodeAt(++e.position);
950
+ if (o === 35) {
951
+ do
952
+ o = e.input.charCodeAt(++e.position);
953
+ while (o !== 0 && !A(o));
954
+ break;
955
+ }
956
+ if (A(o)) break;
957
+ for (n = e.position; o !== 0 && !M(o);) o = e.input.charCodeAt(++e.position);
958
+ i.push(e.input.slice(n, e.position));
959
+ }
960
+ o !== 0 && Rn(e), k.call(In, r) ? In[r](e, r, i) : Fn(e, "unknown document directive \"" + r + "\"");
961
+ }
962
+ if (R(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, R(e, !0, -1)) : a && F(e, "directives end mark is expected"), z(e, e.lineIndent - 1, hn, !1, !0), R(e, !0, -1), e.checkLineBreaks && bn.test(e.input.slice(t, e.position)) && Fn(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && zn(e)) {
963
+ e.input.charCodeAt(e.position) === 46 && (e.position += 3, R(e, !0, -1));
964
+ return;
965
+ }
966
+ if (e.position < e.length - 1) F(e, "end of the stream or a document separator is expected");
967
+ else return;
968
+ }
969
+ n(Zn, "readDocument");
970
+ function Qn(e, t) {
971
+ e = String(e), t ||= {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += "\n"), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
972
+ var n = new Nn(e, t), r = e.indexOf("\0");
973
+ for (r !== -1 && (n.position = r, F(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32;) n.lineIndent += 1, n.position += 1;
974
+ for (; n.position < n.length - 1;) Zn(n);
975
+ return n.documents;
976
+ }
977
+ n(Qn, "loadDocuments");
978
+ function $n(e, t, n) {
979
+ typeof t == "object" && t && n === void 0 && (n = t, t = null);
980
+ var r = Qn(e, n);
981
+ if (typeof t != "function") return r;
982
+ for (var i = 0, a = r.length; i < a; i += 1) t(r[i]);
983
+ }
984
+ n($n, "loadAll$1");
985
+ function er(e, t) {
986
+ var n = Qn(e, t);
987
+ if (n.length !== 0) {
988
+ if (n.length === 1) return n[0];
989
+ throw new D("expected a single document in the stream, but found more");
990
+ }
991
+ }
992
+ n(er, "load$1");
993
+ var tr = {
994
+ loadAll: $n,
995
+ load: er
996
+ }, nr = Object.prototype.toString, rr = Object.prototype.hasOwnProperty, ir = 65279, ar = 9, or = 10, sr = 13, cr = 32, lr = 33, ur = 34, dr = 35, fr = 37, pr = 38, mr = 39, hr = 42, gr = 44, _r = 45, vr = 58, yr = 61, br = 62, xr = 63, Sr = 64, Cr = 91, wr = 93, Tr = 96, Er = 123, Dr = 124, Or = 125, B = {};
997
+ B[0] = "\\0", B[7] = "\\a", B[8] = "\\b", B[9] = "\\t", B[10] = "\\n", B[11] = "\\v", B[12] = "\\f", B[13] = "\\r", B[27] = "\\e", B[34] = "\\\"", B[92] = "\\\\", B[133] = "\\N", B[160] = "\\_", B[8232] = "\\L", B[8233] = "\\P";
998
+ var kr = [
999
+ "y",
1000
+ "Y",
1001
+ "yes",
1002
+ "Yes",
1003
+ "YES",
1004
+ "on",
1005
+ "On",
1006
+ "ON",
1007
+ "n",
1008
+ "N",
1009
+ "no",
1010
+ "No",
1011
+ "NO",
1012
+ "off",
1013
+ "Off",
1014
+ "OFF"
1015
+ ], Ar = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1016
+ function jr(e, t) {
1017
+ var n, r, i, a, o, s, c;
1018
+ if (t === null) return {};
1019
+ for (n = {}, r = Object.keys(t), i = 0, a = r.length; i < a; i += 1) o = r[i], s = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c && rr.call(c.styleAliases, s) && (s = c.styleAliases[s]), n[o] = s;
1020
+ return n;
1021
+ }
1022
+ n(jr, "compileStyleMap");
1023
+ function Mr(e) {
1024
+ var t = e.toString(16).toUpperCase(), n, r;
1025
+ if (e <= 255) n = "x", r = 2;
1026
+ else if (e <= 65535) n = "u", r = 4;
1027
+ else if (e <= 4294967295) n = "U", r = 8;
1028
+ else throw new D("code point within a string may not be greater than 0xFFFFFFFF");
1029
+ return "\\" + n + T.repeat("0", r - t.length) + t;
1030
+ }
1031
+ n(Mr, "encodeHex");
1032
+ var Nr = 1, Pr = 2;
1033
+ function Fr(e) {
1034
+ this.schema = e.schema || dn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = T.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = jr(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === "\"" ? Pr : Nr, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1035
+ }
1036
+ n(Fr, "State");
1037
+ function Ir(e, t) {
1038
+ for (var n = T.repeat(" ", t), r = 0, i = -1, a = "", o, s = e.length; r < s;) i = e.indexOf("\n", r), i === -1 ? (o = e.slice(r), r = s) : (o = e.slice(r, i + 1), r = i + 1), o.length && o !== "\n" && (a += n), a += o;
1039
+ return a;
1040
+ }
1041
+ n(Ir, "indentString");
1042
+ function Lr(e, t) {
1043
+ return "\n" + T.repeat(" ", e.indent * t);
1044
+ }
1045
+ n(Lr, "generateNextLine");
1046
+ function Rr(e, t) {
1047
+ var n, r, i;
1048
+ for (n = 0, r = e.implicitTypes.length; n < r; n += 1) if (i = e.implicitTypes[n], i.resolve(t)) return !0;
1049
+ return !1;
1050
+ }
1051
+ n(Rr, "testImplicitResolving");
1052
+ function zr(e) {
1053
+ return e === cr || e === ar;
1054
+ }
1055
+ n(zr, "isWhitespace");
1056
+ function V(e) {
1057
+ return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== ir || 65536 <= e && e <= 1114111;
1058
+ }
1059
+ n(V, "isPrintable");
1060
+ function Br(e) {
1061
+ return V(e) && e !== ir && e !== sr && e !== or;
1062
+ }
1063
+ n(Br, "isNsCharOrWhitespace");
1064
+ function Vr(e, t, n) {
1065
+ var r = Br(e), i = r && !zr(e);
1066
+ return (n ? r : r && e !== gr && e !== Cr && e !== wr && e !== Er && e !== Or) && e !== dr && !(t === vr && !i) || Br(t) && !zr(t) && e === dr || t === vr && i;
1067
+ }
1068
+ n(Vr, "isPlainSafe");
1069
+ function Hr(e) {
1070
+ return V(e) && e !== ir && !zr(e) && e !== _r && e !== xr && e !== vr && e !== gr && e !== Cr && e !== wr && e !== Er && e !== Or && e !== dr && e !== pr && e !== hr && e !== lr && e !== Dr && e !== yr && e !== br && e !== mr && e !== ur && e !== fr && e !== Sr && e !== Tr;
1071
+ }
1072
+ n(Hr, "isPlainSafeFirst");
1073
+ function Ur(e) {
1074
+ return !zr(e) && e !== vr;
1075
+ }
1076
+ n(Ur, "isPlainSafeLast");
1077
+ function H(e, t) {
1078
+ var n = e.charCodeAt(t), r;
1079
+ return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
1080
+ }
1081
+ n(H, "codePointAt");
1082
+ function Wr(e) {
1083
+ return /^\n* /.test(e);
1084
+ }
1085
+ n(Wr, "needIndentIndicator");
1086
+ var Gr = 1, Kr = 2, qr = 3, Jr = 4, U = 5;
1087
+ function Yr(e, t, n, r, i, a, o, s) {
1088
+ var c, l = 0, u = null, d = !1, f = !1, p = r !== -1, m = -1, h = Hr(H(e, 0)) && Ur(H(e, e.length - 1));
1089
+ if (t || o) for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
1090
+ if (l = H(e, c), !V(l)) return U;
1091
+ h &&= Vr(l, u, s), u = l;
1092
+ }
1093
+ else {
1094
+ for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
1095
+ if (l = H(e, c), l === or) d = !0, p && (f ||= c - m - 1 > r && e[m + 1] !== " ", m = c);
1096
+ else if (!V(l)) return U;
1097
+ h &&= Vr(l, u, s), u = l;
1098
+ }
1099
+ f ||= p && c - m - 1 > r && e[m + 1] !== " ";
1100
+ }
1101
+ return !d && !f ? h && !o && !i(e) ? Gr : a === Pr ? U : Kr : n > 9 && Wr(e) ? U : o ? a === Pr ? U : Kr : f ? Jr : qr;
1102
+ }
1103
+ n(Yr, "chooseScalarStyle");
1104
+ function Xr(e, t, r, i, a) {
1105
+ e.dump = (function() {
1106
+ if (t.length === 0) return e.quotingType === Pr ? "\"\"" : "''";
1107
+ if (!e.noCompatMode && (kr.indexOf(t) !== -1 || Ar.test(t))) return e.quotingType === Pr ? "\"" + t + "\"" : "'" + t + "'";
1108
+ var o = e.indent * Math.max(1, r), s = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), c = i || e.flowLevel > -1 && r >= e.flowLevel;
1109
+ function l(t) {
1110
+ return Rr(e, t);
1111
+ }
1112
+ switch (n(l, "testAmbiguity"), Yr(t, c, e.indent, s, l, e.quotingType, e.forceQuotes && !i, a)) {
1113
+ case Gr: return t;
1114
+ case Kr: return "'" + t.replace(/'/g, "''") + "'";
1115
+ case qr: return "|" + Zr(t, e.indent) + Qr(Ir(t, o));
1116
+ case Jr: return ">" + Zr(t, e.indent) + Qr(Ir($r(t, s), o));
1117
+ case U: return "\"" + ti(t) + "\"";
1118
+ default: throw new D("impossible error: invalid scalar style");
1119
+ }
1120
+ })();
1121
+ }
1122
+ n(Xr, "writeScalar");
1123
+ function Zr(e, t) {
1124
+ var n = Wr(e) ? String(t) : "", r = e[e.length - 1] === "\n";
1125
+ return n + (r && (e[e.length - 2] === "\n" || e === "\n") ? "+" : r ? "" : "-") + "\n";
1126
+ }
1127
+ n(Zr, "blockHeader");
1128
+ function Qr(e) {
1129
+ return e[e.length - 1] === "\n" ? e.slice(0, -1) : e;
1130
+ }
1131
+ n(Qr, "dropEndingNewline");
1132
+ function $r(e, t) {
1133
+ for (var n = /(\n+)([^\n]*)/g, r = (function() {
1134
+ var r = e.indexOf("\n");
1135
+ return r = r === -1 ? e.length : r, n.lastIndex = r, ei(e.slice(0, r), t);
1136
+ })(), i = e[0] === "\n" || e[0] === " ", a, o; o = n.exec(e);) {
1137
+ var s = o[1], c = o[2];
1138
+ a = c[0] === " ", r += s + (!i && !a && c !== "" ? "\n" : "") + ei(c, t), i = a;
1139
+ }
1140
+ return r;
1141
+ }
1142
+ n($r, "foldString");
1143
+ function ei(e, t) {
1144
+ if (e === "" || e[0] === " ") return e;
1145
+ for (var n = / [^ ]/g, r, i = 0, a, o = 0, s = 0, c = ""; r = n.exec(e);) s = r.index, s - i > t && (a = o > i ? o : s, c += "\n" + e.slice(i, a), i = a + 1), o = s;
1146
+ return c += "\n", e.length - i > t && o > i ? c += e.slice(i, o) + "\n" + e.slice(o + 1) : c += e.slice(i), c.slice(1);
1147
+ }
1148
+ n(ei, "foldLine");
1149
+ function ti(e) {
1150
+ for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++) n = H(e, i), r = B[n], !r && V(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Mr(n);
1151
+ return t;
1152
+ }
1153
+ n(ti, "escapeString");
1154
+ function ni(e, t, n) {
1155
+ var r = "", i = e.tag, a, o, s;
1156
+ for (a = 0, o = n.length; a < o; a += 1) s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (W(e, t, s, !1, !1) || s === void 0 && W(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
1157
+ e.tag = i, e.dump = "[" + r + "]";
1158
+ }
1159
+ n(ni, "writeFlowSequence");
1160
+ function ri(e, t, n, r) {
1161
+ var i = "", a = e.tag, o, s, c;
1162
+ for (o = 0, s = n.length; o < s; o += 1) c = n[o], e.replacer && (c = e.replacer.call(n, String(o), c)), (W(e, t + 1, c, !0, !0, !1, !0) || c === void 0 && W(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += Lr(e, t)), e.dump && or === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
1163
+ e.tag = a, e.dump = i || "[]";
1164
+ }
1165
+ n(ri, "writeBlockSequence");
1166
+ function ii(e, t, n) {
1167
+ var r = "", i = e.tag, a = Object.keys(n), o, s, c, l, u;
1168
+ for (o = 0, s = a.length; o < s; o += 1) u = "", r !== "" && (u += ", "), e.condenseFlow && (u += "\""), c = a[o], l = n[c], e.replacer && (l = e.replacer.call(n, c, l)), W(e, t, c, !1, !1) && (e.dump.length > 1024 && (u += "? "), u += e.dump + (e.condenseFlow ? "\"" : "") + ":" + (e.condenseFlow ? "" : " "), W(e, t, l, !1, !1) && (u += e.dump, r += u));
1169
+ e.tag = i, e.dump = "{" + r + "}";
1170
+ }
1171
+ n(ii, "writeFlowMapping");
1172
+ function ai(e, t, n, r) {
1173
+ var i = "", a = e.tag, o = Object.keys(n), s, c, l, u, d, f;
1174
+ if (e.sortKeys === !0) o.sort();
1175
+ else if (typeof e.sortKeys == "function") o.sort(e.sortKeys);
1176
+ else if (e.sortKeys) throw new D("sortKeys must be a boolean or a function");
1177
+ for (s = 0, c = o.length; s < c; s += 1) f = "", (!r || i !== "") && (f += Lr(e, t)), l = o[s], u = n[l], e.replacer && (u = e.replacer.call(n, l, u)), W(e, t + 1, l, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump && or === e.dump.charCodeAt(0) ? f += "?" : f += "? "), f += e.dump, d && (f += Lr(e, t)), W(e, t + 1, u, !0, d) && (e.dump && or === e.dump.charCodeAt(0) ? f += ":" : f += ": ", f += e.dump, i += f));
1178
+ e.tag = a, e.dump = i || "{}";
1179
+ }
1180
+ n(ai, "writeBlockMapping");
1181
+ function oi(e, t, n) {
1182
+ var r, i = n ? e.explicitTypes : e.implicitTypes, a, o, s, c;
1183
+ for (a = 0, o = i.length; a < o; a += 1) if (s = i[a], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof t == "object" && t instanceof s.instanceOf) && (!s.predicate || s.predicate(t))) {
1184
+ if (e.tag = n ? s.multi && s.representName ? s.representName(t) : s.tag : "?", s.represent) {
1185
+ if (c = e.styleMap[s.tag] || s.defaultStyle, nr.call(s.represent) === "[object Function]") r = s.represent(t, c);
1186
+ else if (rr.call(s.represent, c)) r = s.represent[c](t, c);
1187
+ else throw new D("!<" + s.tag + "> tag resolver accepts not \"" + c + "\" style");
1188
+ e.dump = r;
1189
+ }
1190
+ return !0;
1191
+ }
1192
+ return !1;
1193
+ }
1194
+ n(oi, "detectType");
1195
+ function W(e, t, n, r, i, a, o) {
1196
+ e.tag = null, e.dump = n, oi(e, n, !1) || oi(e, n, !0);
1197
+ var s = nr.call(e.dump), c = r, l;
1198
+ r &&= e.flowLevel < 0 || e.flowLevel > t;
1199
+ var u = s === "[object Object]" || s === "[object Array]", d, f;
1200
+ if (u && (d = e.duplicates.indexOf(n), f = d !== -1), (e.tag !== null && e.tag !== "?" || f || e.indent !== 2 && t > 0) && (i = !1), f && e.usedDuplicates[d]) e.dump = "*ref_" + d;
1201
+ else {
1202
+ if (u && f && !e.usedDuplicates[d] && (e.usedDuplicates[d] = !0), s === "[object Object]") r && Object.keys(e.dump).length !== 0 ? (ai(e, t, e.dump, i), f && (e.dump = "&ref_" + d + e.dump)) : (ii(e, t, e.dump), f && (e.dump = "&ref_" + d + " " + e.dump));
1203
+ else if (s === "[object Array]") r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? ri(e, t - 1, e.dump, i) : ri(e, t, e.dump, i), f && (e.dump = "&ref_" + d + e.dump)) : (ni(e, t, e.dump), f && (e.dump = "&ref_" + d + " " + e.dump));
1204
+ else if (s === "[object String]") e.tag !== "?" && Xr(e, e.dump, t, a, c);
1205
+ else if (s === "[object Undefined]") return !1;
1206
+ else {
1207
+ if (e.skipInvalid) return !1;
1208
+ throw new D("unacceptable kind of an object to dump " + s);
1209
+ }
1210
+ e.tag !== null && e.tag !== "?" && (l = encodeURI(e.tag[0] === "!" ? e.tag.slice(1) : e.tag).replace(/!/g, "%21"), l = e.tag[0] === "!" ? "!" + l : l.slice(0, 18) === "tag:yaml.org,2002:" ? "!!" + l.slice(18) : "!<" + l + ">", e.dump = l + " " + e.dump);
1211
+ }
1212
+ return !0;
1213
+ }
1214
+ n(W, "writeNode");
1215
+ function si(e, t) {
1216
+ var n = [], r = [], i, a;
1217
+ for (ci(e, n, r), i = 0, a = r.length; i < a; i += 1) t.duplicates.push(n[r[i]]);
1218
+ t.usedDuplicates = Array(a);
1219
+ }
1220
+ n(si, "getDuplicateReferences");
1221
+ function ci(e, t, n) {
1222
+ var r, i, a;
1223
+ if (typeof e == "object" && e) {
1224
+ if (i = t.indexOf(e), i !== -1) n.indexOf(i) === -1 && n.push(i);
1225
+ else if (t.push(e), Array.isArray(e)) for (i = 0, a = e.length; i < a; i += 1) ci(e[i], t, n);
1226
+ else for (r = Object.keys(e), i = 0, a = r.length; i < a; i += 1) ci(e[r[i]], t, n);
1227
+ }
1228
+ }
1229
+ n(ci, "inspectNode");
1230
+ function li(e, t) {
1231
+ t ||= {};
1232
+ var n = new Fr(t);
1233
+ n.noRefs || si(e, n);
1234
+ var r = e;
1235
+ return n.replacer && (r = n.replacer.call({ "": r }, "", r)), W(n, 0, r, !0, !0) ? n.dump + "\n" : "";
1236
+ }
1237
+ n(li, "dump$1");
1238
+ var ui = { dump: li };
1239
+ function di(e, t) {
1240
+ return function() {
1241
+ throw Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
1242
+ };
1243
+ }
1244
+ n(di, "renamed");
1245
+ var fi = Ft, pi = tr.load;
1246
+ tr.loadAll, ui.dump;
1247
+ //#endregion
1248
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Enum.js
1249
+ var mi = "comm", hi = "rule", gi = "decl", _i = "@import", vi = "@namespace", yi = "@keyframes", bi = "@layer", xi = Math.abs, Si = String.fromCharCode;
1250
+ function Ci(e) {
1251
+ return e.trim();
1252
+ }
1253
+ function wi(e, t, n) {
1254
+ return e.replace(t, n);
1255
+ }
1256
+ function Ti(e, t, n) {
1257
+ return e.indexOf(t, n);
1258
+ }
1259
+ function G(e, t) {
1260
+ return e.charCodeAt(t) | 0;
1261
+ }
1262
+ function Ei(e, t, n) {
1263
+ return e.slice(t, n);
1264
+ }
1265
+ function K(e) {
1266
+ return e.length;
1267
+ }
1268
+ function Di(e) {
1269
+ return e.length;
1270
+ }
1271
+ function Oi(e, t) {
1272
+ return t.push(e), e;
1273
+ }
1274
+ //#endregion
1275
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Tokenizer.js
1276
+ var ki = 1, Ai = 1, ji = 0, q = 0, J = 0, Y = "";
1277
+ function Mi(e, t, n, r, i, a, o, s) {
1278
+ return {
1279
+ value: e,
1280
+ root: t,
1281
+ parent: n,
1282
+ type: r,
1283
+ props: i,
1284
+ children: a,
1285
+ line: ki,
1286
+ column: Ai,
1287
+ length: o,
1288
+ return: "",
1289
+ siblings: s
1290
+ };
1291
+ }
1292
+ function Ni() {
1293
+ return J;
1294
+ }
1295
+ function Pi() {
1296
+ return J = q > 0 ? G(Y, --q) : 0, Ai--, J === 10 && (Ai = 1, ki--), J;
1297
+ }
1298
+ function X() {
1299
+ return J = q < ji ? G(Y, q++) : 0, Ai++, J === 10 && (Ai = 1, ki++), J;
1300
+ }
1301
+ function Z() {
1302
+ return G(Y, q);
1303
+ }
1304
+ function Fi() {
1305
+ return q;
1306
+ }
1307
+ function Ii(e, t) {
1308
+ return Ei(Y, e, t);
1309
+ }
1310
+ function Li(e) {
1311
+ switch (e) {
1312
+ case 0:
1313
+ case 9:
1314
+ case 10:
1315
+ case 13:
1316
+ case 32: return 5;
1317
+ case 33:
1318
+ case 43:
1319
+ case 44:
1320
+ case 47:
1321
+ case 62:
1322
+ case 64:
1323
+ case 126:
1324
+ case 59:
1325
+ case 123:
1326
+ case 125: return 4;
1327
+ case 58: return 3;
1328
+ case 34:
1329
+ case 39:
1330
+ case 40:
1331
+ case 91: return 2;
1332
+ case 41:
1333
+ case 93: return 1;
1334
+ }
1335
+ return 0;
1336
+ }
1337
+ function Ri(e) {
1338
+ return ki = Ai = 1, ji = K(Y = e), q = 0, [];
1339
+ }
1340
+ function zi(e) {
1341
+ return Y = "", e;
1342
+ }
1343
+ function Bi(e) {
1344
+ return Ci(Ii(q - 1, Ui(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
1345
+ }
1346
+ function Vi(e) {
1347
+ for (; (J = Z()) && J < 33;) X();
1348
+ return Li(e) > 2 || Li(J) > 3 ? "" : " ";
1349
+ }
1350
+ function Hi(e, t) {
1351
+ for (; --t && X() && !(J < 48 || J > 102 || J > 57 && J < 65 || J > 70 && J < 97););
1352
+ return Ii(e, Fi() + (t < 6 && Z() == 32 && X() == 32));
1353
+ }
1354
+ function Ui(e) {
1355
+ for (; X();) switch (J) {
1356
+ case e: return q;
1357
+ case 34:
1358
+ case 39:
1359
+ e !== 34 && e !== 39 && Ui(J);
1360
+ break;
1361
+ case 40:
1362
+ e === 41 && Ui(e);
1363
+ break;
1364
+ case 92:
1365
+ X();
1366
+ break;
1367
+ }
1368
+ return q;
1369
+ }
1370
+ function Wi(e, t) {
1371
+ for (; X() && e + J !== 57 && (e + J !== 84 || Z() !== 47););
1372
+ return "/*" + Ii(t, q - 1) + "*" + Si(e === 47 ? e : X());
1373
+ }
1374
+ function Gi(e) {
1375
+ for (; !Li(Z());) X();
1376
+ return Ii(e, q);
1377
+ }
1378
+ //#endregion
1379
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Parser.js
1380
+ function Ki(e) {
1381
+ return zi(qi("", null, null, null, [""], e = Ri(e), 0, [0], e));
1382
+ }
1383
+ function qi(e, t, n, r, i, a, o, s, c) {
1384
+ for (var l = 0, u = 0, d = o, f = 0, p = 0, m = 0, h = 1, g = 1, _ = 1, v = 0, y = "", b = i, x = a, S = r, C = y; g;) switch (m = v, v = X()) {
1385
+ case 40: if (m != 108 && G(C, d - 1) == 58) {
1386
+ Ti(C += wi(Bi(v), "&", "&\f"), "&\f", xi(l ? s[l - 1] : 0)) != -1 && (_ = -1);
1387
+ break;
1388
+ }
1389
+ case 34:
1390
+ case 39:
1391
+ case 91:
1392
+ C += Bi(v);
1393
+ break;
1394
+ case 9:
1395
+ case 10:
1396
+ case 13:
1397
+ case 32:
1398
+ C += Vi(m);
1399
+ break;
1400
+ case 92:
1401
+ C += Hi(Fi() - 1, 7);
1402
+ continue;
1403
+ case 47:
1404
+ switch (Z()) {
1405
+ case 42:
1406
+ case 47:
1407
+ Oi(Yi(Wi(X(), Fi()), t, n, c), c), (Li(m || 1) == 5 || Li(Z() || 1) == 5) && K(C) && Ei(C, -1, void 0) !== " " && (C += " ");
1408
+ break;
1409
+ default: C += "/";
1410
+ }
1411
+ break;
1412
+ case 123 * h: s[l++] = K(C) * _;
1413
+ case 125 * h:
1414
+ case 59:
1415
+ case 0:
1416
+ switch (v) {
1417
+ case 0:
1418
+ case 125: g = 0;
1419
+ case 59 + u:
1420
+ _ == -1 && (C = wi(C, /\f/g, "")), p > 0 && (K(C) - d || h === 0 && m === 47) && Oi(p > 32 ? Xi(C + ";", r, n, d - 1, c) : Xi(wi(C, " ", "") + ";", r, n, d - 2, c), c);
1421
+ break;
1422
+ case 59: C += ";";
1423
+ default: if (Oi(S = Ji(C, t, n, l, u, i, s, y, b = [], x = [], d, a), a), v === 123) {
1424
+ if (u === 0) qi(C, t, S, S, b, a, d, s, x);
1425
+ else {
1426
+ switch (f) {
1427
+ case 99: if (G(C, 3) === 110) break;
1428
+ case 108: if (G(C, 2) === 97) break;
1429
+ default: u = 0;
1430
+ case 100:
1431
+ case 109:
1432
+ case 115:
1433
+ }
1434
+ u ? qi(e, S, S, r && Oi(Ji(e, S, S, 0, 0, i, s, y, i, b = [], d, x), x), i, x, d, s, r ? b : x) : qi(C, S, S, S, [""], x, 0, s, x);
1435
+ }
1436
+ }
1437
+ }
1438
+ l = u = p = 0, h = _ = 1, y = C = "", d = o;
1439
+ break;
1440
+ case 58: d = 1 + K(C), p = m;
1441
+ default:
1442
+ if (h < 1) {
1443
+ if (v == 123) --h;
1444
+ else if (v == 125 && h++ == 0 && Pi() == 125) continue;
1445
+ }
1446
+ switch (C += Si(v), v * h) {
1447
+ case 38:
1448
+ _ = u > 0 ? 1 : (C += "\f", -1);
1449
+ break;
1450
+ case 44:
1451
+ s[l++] = (K(C) - 1) * _, _ = 1;
1452
+ break;
1453
+ case 64:
1454
+ Z() === 45 && (C += Bi(X())), f = Z(), u = d = K(y = C += Gi(Fi())), v++;
1455
+ break;
1456
+ case 45: m === 45 && K(C) == 2 && (h = 0);
1457
+ }
1458
+ }
1459
+ return a;
1460
+ }
1461
+ function Ji(e, t, n, r, i, a, o, s, c, l, u, d) {
1462
+ for (var f = i - 1, p = i === 0 ? a : [""], m = Di(p), h = 0, g = 0, _ = 0; h < r; ++h) for (var v = 0, y = Ei(e, f + 1, f = xi(g = o[h])), b = e; v < m; ++v) (b = Ci(g > 0 ? p[v] + " " + y : wi(y, /&\f/g, p[v]))) && (c[_++] = b);
1463
+ return Mi(e, t, n, i === 0 ? hi : s, c, l, u, d);
1464
+ }
1465
+ function Yi(e, t, n, r) {
1466
+ return Mi(e, t, n, mi, Si(Ni()), Ei(e, 2, -2), 0, r);
1467
+ }
1468
+ function Xi(e, t, n, r, i) {
1469
+ return Mi(e, t, n, gi, Ei(e, 0, r), Ei(e, r + 1, -1), r, i);
1470
+ }
1471
+ //#endregion
1472
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Serializer.js
1473
+ function Zi(e, t) {
1474
+ for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
1475
+ return n;
1476
+ }
1477
+ function Qi(e, t, n, r) {
1478
+ switch (e.type) {
1479
+ case bi: if (e.children.length) break;
1480
+ case _i:
1481
+ case vi:
1482
+ case gi: return e.return = e.return || e.value;
1483
+ case mi: return "";
1484
+ case yi: return e.return = e.value + "{" + Zi(e.children, r) + "}";
1485
+ case hi: if (!K(e.value = e.props.join(","))) return "";
1486
+ }
1487
+ return K(n = Zi(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
1488
+ }
1489
+ //#endregion
1490
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Middleware.js
1491
+ function $i(e) {
1492
+ var t = Di(e);
1493
+ return function(n, r, i, a) {
1494
+ for (var o = "", s = 0; s < t; s++) o += e[s](n, r, i, a) || "";
1495
+ return o;
1496
+ };
1497
+ }
1498
+ //#endregion
1499
+ //#region ../../node_modules/.pnpm/mermaid@11.16.0/node_modules/mermaid/dist/mermaid.core.mjs
1500
+ var ea = "c4", ta = {
1501
+ id: ea,
1502
+ detector: /* @__PURE__ */ n((e) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e), "detector"),
1503
+ loader: /* @__PURE__ */ n(async () => {
1504
+ let { diagram: e } = await import("./c4Diagram-LMCZKHZV-Cr3_W-xe.js");
1505
+ return {
1506
+ id: ea,
1507
+ diagram: e
1508
+ };
1509
+ }, "loader")
1510
+ }, na = "flowchart", ra = {
1511
+ id: na,
1512
+ detector: /* @__PURE__ */ n((e, t) => t?.flowchart?.defaultRenderer === "dagre-wrapper" || t?.flowchart?.defaultRenderer === "elk" ? !1 : /^\s*graph/.test(e), "detector"),
1513
+ loader: /* @__PURE__ */ n(async () => {
1514
+ let { diagram: e } = await import("./flowDiagram-23GEKE2U-C3zDgFvZ.js");
1515
+ return {
1516
+ id: na,
1517
+ diagram: e
1518
+ };
1519
+ }, "loader")
1520
+ }, ia = "flowchart-v2", aa = {
1521
+ id: ia,
1522
+ detector: /* @__PURE__ */ n((e, t) => t?.flowchart?.defaultRenderer !== "dagre-d3" && (t?.flowchart?.defaultRenderer === "elk" && (t.layout = "elk"), /^\s*graph/.test(e) && t?.flowchart?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(e)), "detector"),
1523
+ loader: /* @__PURE__ */ n(async () => {
1524
+ let { diagram: e } = await import("./flowDiagram-23GEKE2U-C3zDgFvZ.js");
1525
+ return {
1526
+ id: ia,
1527
+ diagram: e
1528
+ };
1529
+ }, "loader")
1530
+ }, oa = "swimlane", sa = {
1531
+ id: oa,
1532
+ detector: /* @__PURE__ */ n((e) => /^\s*swimlane-beta\b/.test(e), "detector"),
1533
+ loader: /* @__PURE__ */ n(async () => {
1534
+ let { diagram: e } = await import("./swimlanesDiagram-G3AALYLV-BtGToCzH.js");
1535
+ return {
1536
+ id: oa,
1537
+ diagram: e
1538
+ };
1539
+ }, "loader")
1540
+ }, ca = "er", la = {
1541
+ id: ca,
1542
+ detector: /* @__PURE__ */ n((e) => /^\s*erDiagram/.test(e), "detector"),
1543
+ loader: /* @__PURE__ */ n(async () => {
1544
+ let { diagram: e } = await import("./erDiagram-Q63AITRT-BshRACvj.js");
1545
+ return {
1546
+ id: ca,
1547
+ diagram: e
1548
+ };
1549
+ }, "loader")
1550
+ }, ua = "gitGraph", da = {
1551
+ id: ua,
1552
+ detector: /* @__PURE__ */ n((e) => /^\s*gitGraph/.test(e), "detector"),
1553
+ loader: /* @__PURE__ */ n(async () => {
1554
+ let { diagram: e } = await import("./gitGraphDiagram-IHSO6WYX-BAhccBh3.js");
1555
+ return {
1556
+ id: ua,
1557
+ diagram: e
1558
+ };
1559
+ }, "loader")
1560
+ }, fa = "gantt", pa = {
1561
+ id: fa,
1562
+ detector: /* @__PURE__ */ n((e) => /^\s*gantt/.test(e), "detector"),
1563
+ loader: /* @__PURE__ */ n(async () => {
1564
+ let { diagram: e } = await import("./ganttDiagram-NO4QXBWP-BD5PiE8x.js");
1565
+ return {
1566
+ id: fa,
1567
+ diagram: e
1568
+ };
1569
+ }, "loader")
1570
+ }, ma = "info", ha = {
1571
+ id: ma,
1572
+ detector: /* @__PURE__ */ n((e) => /^\s*info/.test(e), "detector"),
1573
+ loader: /* @__PURE__ */ n(async () => {
1574
+ let { diagram: e } = await import("./infoDiagram-FWYZ7A6U-CGZnf03G.js");
1575
+ return {
1576
+ id: ma,
1577
+ diagram: e
1578
+ };
1579
+ }, "loader")
1580
+ }, ga = "pie", _a = {
1581
+ id: ga,
1582
+ detector: /* @__PURE__ */ n((e) => /^\s*pie/.test(e), "detector"),
1583
+ loader: /* @__PURE__ */ n(async () => {
1584
+ let { diagram: e } = await import("./pieDiagram-ENE6RG2P-CXeFg_cL.js");
1585
+ return {
1586
+ id: ga,
1587
+ diagram: e
1588
+ };
1589
+ }, "loader")
1590
+ }, va = "quadrantChart", ya = {
1591
+ id: va,
1592
+ detector: /* @__PURE__ */ n((e) => /^\s*quadrantChart/.test(e), "detector"),
1593
+ loader: /* @__PURE__ */ n(async () => {
1594
+ let { diagram: e } = await import("./quadrantDiagram-ABIIQ3AL-v_u3aC8Y.js");
1595
+ return {
1596
+ id: va,
1597
+ diagram: e
1598
+ };
1599
+ }, "loader")
1600
+ }, ba = "xychart", xa = {
1601
+ id: ba,
1602
+ detector: /* @__PURE__ */ n((e) => /^\s*xychart(-beta)?/.test(e), "detector"),
1603
+ loader: /* @__PURE__ */ n(async () => {
1604
+ let { diagram: e } = await import("./xychartDiagram-FW5EYKEG-BQQhanuH.js");
1605
+ return {
1606
+ id: ba,
1607
+ diagram: e
1608
+ };
1609
+ }, "loader")
1610
+ }, Sa = "requirement", Ca = {
1611
+ id: Sa,
1612
+ detector: /* @__PURE__ */ n((e) => /^\s*requirement(Diagram)?/.test(e), "detector"),
1613
+ loader: /* @__PURE__ */ n(async () => {
1614
+ let { diagram: e } = await import("./requirementDiagram-TGXJPOKE-BAEzI7V4.js");
1615
+ return {
1616
+ id: Sa,
1617
+ diagram: e
1618
+ };
1619
+ }, "loader")
1620
+ }, wa = "sequence", Ta = {
1621
+ id: wa,
1622
+ detector: /* @__PURE__ */ n((e) => /^\s*sequenceDiagram/.test(e), "detector"),
1623
+ loader: /* @__PURE__ */ n(async () => {
1624
+ let { diagram: e } = await import("./sequenceDiagram-DBY2YBRQ-DCuWmWHX.js");
1625
+ return {
1626
+ id: wa,
1627
+ diagram: e
1628
+ };
1629
+ }, "loader")
1630
+ }, Ea = "class", Da = {
1631
+ id: Ea,
1632
+ detector: /* @__PURE__ */ n((e, t) => t?.class?.defaultRenderer !== "dagre-wrapper" && /^\s*classDiagram/.test(e), "detector"),
1633
+ loader: /* @__PURE__ */ n(async () => {
1634
+ let { diagram: e } = await import("./classDiagram-OUVF2IWQ--wRzSvLt.js");
1635
+ return {
1636
+ id: Ea,
1637
+ diagram: e
1638
+ };
1639
+ }, "loader")
1640
+ }, Oa = "classDiagram", ka = {
1641
+ id: Oa,
1642
+ detector: /* @__PURE__ */ n((e, t) => /^\s*classDiagram/.test(e) && t?.class?.defaultRenderer === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(e), "detector"),
1643
+ loader: /* @__PURE__ */ n(async () => {
1644
+ let { diagram: e } = await import("./classDiagram-v2-EOCWNBFH-ChMCdPO-.js");
1645
+ return {
1646
+ id: Oa,
1647
+ diagram: e
1648
+ };
1649
+ }, "loader")
1650
+ }, Aa = "state", ja = {
1651
+ id: Aa,
1652
+ detector: /* @__PURE__ */ n((e, t) => t?.state?.defaultRenderer !== "dagre-wrapper" && /^\s*stateDiagram/.test(e), "detector"),
1653
+ loader: /* @__PURE__ */ n(async () => {
1654
+ let { diagram: e } = await import("./stateDiagram-2N3HPSRC-fs9QmDMR.js");
1655
+ return {
1656
+ id: Aa,
1657
+ diagram: e
1658
+ };
1659
+ }, "loader")
1660
+ }, Ma = "stateDiagram", Na = {
1661
+ id: Ma,
1662
+ detector: /* @__PURE__ */ n((e, t) => !!(/^\s*stateDiagram-v2/.test(e) || /^\s*stateDiagram/.test(e) && t?.state?.defaultRenderer === "dagre-wrapper"), "detector"),
1663
+ loader: /* @__PURE__ */ n(async () => {
1664
+ let { diagram: e } = await import("./stateDiagram-v2-6OUMAXLB-wWxYbttN.js");
1665
+ return {
1666
+ id: Ma,
1667
+ diagram: e
1668
+ };
1669
+ }, "loader")
1670
+ }, Pa = "journey", Fa = {
1671
+ id: Pa,
1672
+ detector: /* @__PURE__ */ n((e) => /^\s*journey/.test(e), "detector"),
1673
+ loader: /* @__PURE__ */ n(async () => {
1674
+ let { diagram: e } = await import("./journeyDiagram-5HDEW3XC-CRGz7dcx.js");
1675
+ return {
1676
+ id: Pa,
1677
+ diagram: e
1678
+ };
1679
+ }, "loader")
1680
+ }, Ia = { draw: /* @__PURE__ */ n((e, t, n) => {
1681
+ i.debug("rendering svg for syntax error\n");
1682
+ let r = Be(t), a = r.append("g");
1683
+ r.attr("viewBox", "0 0 2412 512"), S(r, 100, 512, !0), a.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"), a.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"), a.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"), a.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"), a.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"), a.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"), a.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"), a.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${n}`);
1684
+ }, "draw") }, La = Ia, Ra = {
1685
+ db: {},
1686
+ renderer: Ia,
1687
+ parser: { parse: /* @__PURE__ */ n(() => {}, "parse") }
1688
+ }, za = "flowchart-elk", Ba = {
1689
+ id: za,
1690
+ detector: /* @__PURE__ */ n((e, t = {}) => /^\s*flowchart-elk/.test(e) || /^\s*(flowchart|graph)/.test(e) && t?.flowchart?.defaultRenderer === "elk" ? (t.layout = "elk", !0) : !1, "detector"),
1691
+ loader: /* @__PURE__ */ n(async () => {
1692
+ let { diagram: e } = await import("./flowDiagram-23GEKE2U-C3zDgFvZ.js");
1693
+ return {
1694
+ id: za,
1695
+ diagram: e
1696
+ };
1697
+ }, "loader")
1698
+ }, Va = "timeline", Ha = {
1699
+ id: Va,
1700
+ detector: /* @__PURE__ */ n((e) => /^\s*timeline/.test(e), "detector"),
1701
+ loader: /* @__PURE__ */ n(async () => {
1702
+ let { diagram: e } = await import("./timeline-definition-FHXFAJF6-CAsyJrsw.js");
1703
+ return {
1704
+ id: Va,
1705
+ diagram: e
1706
+ };
1707
+ }, "loader")
1708
+ }, Ua = "mindmap", Wa = {
1709
+ id: Ua,
1710
+ detector: /* @__PURE__ */ n((e) => /^\s*mindmap/.test(e), "detector"),
1711
+ loader: /* @__PURE__ */ n(async () => {
1712
+ let { diagram: e } = await import("./mindmap-definition-LN4V7U3C-CWL1sg0K.js");
1713
+ return {
1714
+ id: Ua,
1715
+ diagram: e
1716
+ };
1717
+ }, "loader")
1718
+ }, Ga = "kanban", Ka = {
1719
+ id: Ga,
1720
+ detector: /* @__PURE__ */ n((e) => /^\s*kanban/.test(e), "detector"),
1721
+ loader: /* @__PURE__ */ n(async () => {
1722
+ let { diagram: e } = await import("./kanban-definition-HUTT4EX6-BBH4Yn5e.js");
1723
+ return {
1724
+ id: Ga,
1725
+ diagram: e
1726
+ };
1727
+ }, "loader")
1728
+ }, qa = "sankey", Ja = {
1729
+ id: qa,
1730
+ detector: /* @__PURE__ */ n((e) => /^\s*sankey(-beta)?/.test(e), "detector"),
1731
+ loader: /* @__PURE__ */ n(async () => {
1732
+ let { diagram: e } = await import("./sankeyDiagram-HTMAVEWB-Dbu-sl2E.js");
1733
+ return {
1734
+ id: qa,
1735
+ diagram: e
1736
+ };
1737
+ }, "loader")
1738
+ }, Ya = "packet", Xa = {
1739
+ id: Ya,
1740
+ detector: /* @__PURE__ */ n((e) => /^\s*packet(-beta)?/.test(e), "detector"),
1741
+ loader: /* @__PURE__ */ n(async () => {
1742
+ let { diagram: e } = await import("./diagram-NH7WQ7WH-CH0IfHB0.js");
1743
+ return {
1744
+ id: Ya,
1745
+ diagram: e
1746
+ };
1747
+ }, "loader")
1748
+ }, Za = "radar", Qa = {
1749
+ id: Za,
1750
+ detector: /* @__PURE__ */ n((e) => /^\s*radar-beta/.test(e), "detector"),
1751
+ loader: /* @__PURE__ */ n(async () => {
1752
+ let { diagram: e } = await import("./diagram-WEI45ONY-Cd3sVPil.js");
1753
+ return {
1754
+ id: Za,
1755
+ diagram: e
1756
+ };
1757
+ }, "loader")
1758
+ }, $a = "block", eo = {
1759
+ id: $a,
1760
+ detector: /* @__PURE__ */ n((e) => /^\s*block(-beta)?/.test(e), "detector"),
1761
+ loader: /* @__PURE__ */ n(async () => {
1762
+ let { diagram: e } = await import("./blockDiagram-677ZJIJ3-CWYuHThP.js");
1763
+ return {
1764
+ id: $a,
1765
+ diagram: e
1766
+ };
1767
+ }, "loader")
1768
+ }, to = "treeView", no = {
1769
+ id: to,
1770
+ detector: /* @__PURE__ */ n((e) => /^\s*treeView-beta/.test(e), "detector"),
1771
+ loader: /* @__PURE__ */ n(async () => {
1772
+ let { diagram: e } = await import("./diagram-OA4YK3LP-BgwQcJfp.js");
1773
+ return {
1774
+ id: to,
1775
+ diagram: e
1776
+ };
1777
+ }, "loader")
1778
+ }, ro = "architecture", io = {
1779
+ id: ro,
1780
+ detector: /* @__PURE__ */ n((e) => /^\s*architecture/.test(e), "detector"),
1781
+ loader: /* @__PURE__ */ n(async () => {
1782
+ let { diagram: e } = await import("./architectureDiagram-ZJ3FMSHR-BucIluTN.js");
1783
+ return {
1784
+ id: ro,
1785
+ diagram: e
1786
+ };
1787
+ }, "loader")
1788
+ }, ao = "eventmodeling", oo = {
1789
+ id: ao,
1790
+ detector: /* @__PURE__ */ n((e) => /^\s*eventmodeling/.test(e), "detector"),
1791
+ loader: /* @__PURE__ */ n(async () => {
1792
+ let { diagram: e } = await import("./diagram-FQU43EPY-BT8WeVzc.js");
1793
+ return {
1794
+ id: ao,
1795
+ diagram: e
1796
+ };
1797
+ }, "loader")
1798
+ }, so = "ishikawa", co = {
1799
+ id: so,
1800
+ detector: /* @__PURE__ */ n((e) => /^\s*ishikawa(-beta)?\b/i.test(e), "detector"),
1801
+ loader: /* @__PURE__ */ n(async () => {
1802
+ let { diagram: e } = await import("./ishikawaDiagram-FXEZZL3T-PFfVM0NO.js");
1803
+ return {
1804
+ id: so,
1805
+ diagram: e
1806
+ };
1807
+ }, "loader")
1808
+ }, lo = "venn", uo = {
1809
+ id: lo,
1810
+ detector: /* @__PURE__ */ n((e) => /^\s*venn-beta/.test(e), "detector"),
1811
+ loader: /* @__PURE__ */ n(async () => {
1812
+ let { diagram: e } = await import("./vennDiagram-L72KCM5P-C87u0gjr.js");
1813
+ return {
1814
+ id: lo,
1815
+ diagram: e
1816
+ };
1817
+ }, "loader")
1818
+ }, fo = "treemap", po = {
1819
+ id: fo,
1820
+ detector: /* @__PURE__ */ n((e) => /^\s*treemap/.test(e), "detector"),
1821
+ loader: /* @__PURE__ */ n(async () => {
1822
+ let { diagram: e } = await import("./diagram-G47NLZAW-vZ2XG37l.js");
1823
+ return {
1824
+ id: fo,
1825
+ diagram: e
1826
+ };
1827
+ }, "loader")
1828
+ }, mo = "wardley", ho = {
1829
+ id: mo,
1830
+ detector: /* @__PURE__ */ n((e) => /^\s*wardley-beta/i.test(e), "detector"),
1831
+ loader: /* @__PURE__ */ n(async () => {
1832
+ let { diagram: e } = await import("./wardleyDiagram-EHGQE667-BxviBDl_.js");
1833
+ return {
1834
+ id: mo,
1835
+ diagram: e
1836
+ };
1837
+ }, "loader")
1838
+ }, go = "cynefin", _o = {
1839
+ id: go,
1840
+ detector: /* @__PURE__ */ n((e) => /^\s*cynefin-beta(?:[\s:]|$)/.test(e), "detector"),
1841
+ loader: /* @__PURE__ */ n(async () => {
1842
+ let { diagram: e } = await import("./cynefinDiagram-TSTJHNR4-988Y73wV.js");
1843
+ return {
1844
+ id: go,
1845
+ diagram: e
1846
+ };
1847
+ }, "loader")
1848
+ }, vo = "railroad", yo = {
1849
+ id: vo,
1850
+ detector: /* @__PURE__ */ n((e) => /^\s*railroad-beta/i.test(e), "detector"),
1851
+ loader: /* @__PURE__ */ n(async () => {
1852
+ let { diagram: e } = await import("./railroadDiagram-RFXS5EU6-mEC9tVS-.js");
1853
+ return {
1854
+ id: vo,
1855
+ diagram: e
1856
+ };
1857
+ }, "loader")
1858
+ }, bo = "railroadEbnf", xo = {
1859
+ id: bo,
1860
+ detector: /* @__PURE__ */ n((e) => /^\s*railroad-ebnf-beta/i.test(e), "detector"),
1861
+ loader: /* @__PURE__ */ n(async () => {
1862
+ let { diagram: e } = await import("./ebnfDiagram-CCIWWBDH-CwBFb2Fm.js");
1863
+ return {
1864
+ id: bo,
1865
+ diagram: e
1866
+ };
1867
+ }, "loader")
1868
+ }, So = "railroadAbnf", Co = {
1869
+ id: So,
1870
+ detector: /* @__PURE__ */ n((e) => /^\s*railroad-abnf-beta/i.test(e), "detector"),
1871
+ loader: /* @__PURE__ */ n(async () => {
1872
+ let { diagram: e } = await import("./abnfDiagram-VRR7QNED-BgjOQqEh.js");
1873
+ return {
1874
+ id: So,
1875
+ diagram: e
1876
+ };
1877
+ }, "loader")
1878
+ }, wo = "railroadPeg", To = {
1879
+ id: wo,
1880
+ detector: /* @__PURE__ */ n((e) => /^\s*railroad-peg-beta/i.test(e), "detector"),
1881
+ loader: /* @__PURE__ */ n(async () => {
1882
+ let { diagram: e } = await import("./pegDiagram-2B236MQR-BKv8dTtv.js");
1883
+ return {
1884
+ id: wo,
1885
+ diagram: e
1886
+ };
1887
+ }, "loader")
1888
+ }, Eo = !1, Do = /* @__PURE__ */ n(() => {
1889
+ Eo || (Eo = !0, d("error", Ra, (e) => e.toLowerCase().trim() === "error"), d("---", {
1890
+ db: { clear: /* @__PURE__ */ n(() => {}, "clear") },
1891
+ styles: {},
1892
+ renderer: { draw: /* @__PURE__ */ n(() => {}, "draw") },
1893
+ parser: { parse: /* @__PURE__ */ n(() => {
1894
+ throw 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");
1895
+ }, "parse") },
1896
+ init: /* @__PURE__ */ n(() => null, "init")
1897
+ }, (e) => e.toLowerCase().trimStart().startsWith("---")), f(Ba, Wa, io), f(ta, Ka, ka, Da, la, pa, ha, _a, Ca, Ta, sa, aa, ra, Ha, da, Na, ja, Fa, ya, Ja, Xa, xa, eo, oo, no, Qa, co, po, yo, xo, Co, To, uo, ho, _o));
1898
+ }, "addDiagrams"), Oo = /* @__PURE__ */ n(async () => {
1899
+ i.debug("Loading registered diagrams");
1900
+ let e = (await Promise.allSettled(Object.entries(te).map(async ([e, { detector: t, loader: n }]) => {
1901
+ if (n) try {
1902
+ m(e);
1903
+ } catch {
1904
+ try {
1905
+ let { diagram: e, id: r } = await n();
1906
+ d(r, e, t);
1907
+ } catch (t) {
1908
+ throw i.error(`Failed to load external diagram with key ${e}. Removing from detectors.`), delete te[e], t;
1909
+ }
1910
+ }
1911
+ }))).filter((e) => e.status === "rejected");
1912
+ if (e.length > 0) {
1913
+ i.error(`Failed to load ${e.length} external diagrams`);
1914
+ for (let t of e) i.error(t);
1915
+ throw Error(`Failed to load ${e.length} external diagrams`);
1916
+ }
1917
+ }, "loadRegisteredDiagrams"), ko = "graphics-document document";
1918
+ function Ao(e, t) {
1919
+ e.attr("role", ko), t !== "" && e.attr("aria-roledescription", t);
1920
+ }
1921
+ n(Ao, "setA11yDiagramInfo");
1922
+ function jo(e, t, n, r) {
1923
+ if (e.insert !== void 0) {
1924
+ if (n) {
1925
+ let t = `chart-desc-${r}`;
1926
+ e.attr("aria-describedby", t), e.insert("desc", ":first-child").attr("id", t).text(n);
1927
+ }
1928
+ if (t) {
1929
+ let n = `chart-title-${r}`;
1930
+ e.attr("aria-labelledby", n), e.insert("title", ":first-child").attr("id", n).text(t);
1931
+ }
1932
+ }
1933
+ }
1934
+ n(jo, "addSVGa11yTitleDescription");
1935
+ var Mo = class e {
1936
+ constructor(e, t, n, r, i) {
1937
+ this.type = e, this.text = t, this.db = n, this.parser = r, this.renderer = i;
1938
+ }
1939
+ static {
1940
+ n(this, "Diagram");
1941
+ }
1942
+ static async fromText(t, n = {}) {
1943
+ let r = x(), i = re(t, r);
1944
+ t = ge(t) + "\n";
1945
+ try {
1946
+ m(i);
1947
+ } catch {
1948
+ let e = s(i);
1949
+ if (!e) throw new se(`Diagram ${i} not found.`);
1950
+ let { id: t, diagram: n } = await e();
1951
+ d(t, n);
1952
+ }
1953
+ let { db: a, parser: o, renderer: c, init: l } = m(i);
1954
+ return o.parser && (o.parser.yy = a), a.clear?.(), l?.(r), n.title && a.setDiagramTitle?.(n.title), await o.parse(t), new e(i, t, a, o, c);
1955
+ }
1956
+ async render(e, t) {
1957
+ await this.renderer.draw(this.text, e, t, this);
1958
+ }
1959
+ getParser() {
1960
+ return this.parser;
1961
+ }
1962
+ getType() {
1963
+ return this.type;
1964
+ }
1965
+ }, No = [], Po = /* @__PURE__ */ n(() => {
1966
+ No.forEach((e) => {
1967
+ e();
1968
+ }), No = [];
1969
+ }, "attachFunctions"), Fo = /* @__PURE__ */ n((e) => e.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(), "cleanupComments");
1970
+ function Io(e) {
1971
+ let t = e.match(b);
1972
+ if (!t) return {
1973
+ text: e,
1974
+ metadata: {}
1975
+ };
1976
+ let n = t[1], r = pi(n ? t[2].split("\n").map((e) => e.startsWith(n) ? e.slice(n.length) : e).join("\n") : t[2], { schema: fi }) ?? {};
1977
+ r = typeof r == "object" && !Array.isArray(r) ? r : {};
1978
+ let i = {};
1979
+ return r.displayMode && (i.displayMode = r.displayMode.toString()), r.title && (i.title = r.title.toString()), r.config && (i.config = r.config), {
1980
+ text: e.slice(t[0].length),
1981
+ metadata: i
1982
+ };
1983
+ }
1984
+ n(Io, "extractFrontMatter");
1985
+ var Lo = /* @__PURE__ */ n((e) => e.replace(/\r\n?/g, "\n").replace(/<(\w+)([^>]*)>/g, (e, t, n) => "<" + t + n.replace(/="([^"]*)"/g, "='$1'") + ">"), "cleanupText"), Ro = /* @__PURE__ */ n((e) => {
1986
+ let { text: t, metadata: n } = Io(e), { displayMode: r, title: i, config: a = {} } = n;
1987
+ return r && (a.gantt ||= {}, a.gantt.displayMode = r), {
1988
+ title: i,
1989
+ config: a,
1990
+ text: t
1991
+ };
1992
+ }, "processFrontmatter"), zo = /* @__PURE__ */ n((e) => {
1993
+ let t = pe.detectInit(e) ?? {}, n = pe.detectDirective(e, "wrap");
1994
+ return Array.isArray(n) ? t.wrap = n.some(({ type: e }) => e === "wrap") : n?.type === "wrap" && (t.wrap = !0), {
1995
+ text: me(e),
1996
+ directive: t
1997
+ };
1998
+ }, "processDirectives");
1999
+ function Bo(e) {
2000
+ let t = Ro(Lo(e)), n = zo(t.text), r = he(t.config, n.directive);
2001
+ return e = Fo(n.text), {
2002
+ code: e,
2003
+ title: t.title,
2004
+ config: r
2005
+ };
2006
+ }
2007
+ n(Bo, "preprocessDiagram");
2008
+ function Vo(e) {
2009
+ let t = new TextEncoder().encode(e), n = Array.from(t, (e) => String.fromCodePoint(e)).join("");
2010
+ return btoa(n);
2011
+ }
2012
+ n(Vo, "toBase64");
2013
+ var Ho = 5e4, Uo = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", Wo = "sandbox", Go = "loose", Ko = "http://www.w3.org/2000/svg", qo = "http://www.w3.org/1999/xlink", Jo = "http://www.w3.org/1999/xhtml", Yo = "100%", Xo = "100%", Zo = "border:0;margin:0;", Qo = "margin:0", $o = "allow-top-navigation-by-user-activation allow-popups", es = "The \"iframe\" tag is not supported by your browser.", ts = ["foreignobject"], ns = ["dominant-baseline"];
2014
+ function rs(e) {
2015
+ let t = Bo(e);
2016
+ return l(), ne(t.config ?? {}), t;
2017
+ }
2018
+ n(rs, "processAndSetConfigs");
2019
+ async function is(e, t) {
2020
+ Do();
2021
+ try {
2022
+ let { code: t, config: n } = rs(e);
2023
+ return {
2024
+ diagramType: (await gs(t)).type,
2025
+ config: n
2026
+ };
2027
+ } catch (e) {
2028
+ if (t?.suppressErrors) return !1;
2029
+ throw e;
2030
+ }
2031
+ }
2032
+ n(is, "parse");
2033
+ var as = /* @__PURE__ */ n((e, t, n = []) => `.${e} ${t} ${u(`{ ${n.join(" !important; ")} !important; }`)}`, "cssImportantStyles"), os = /* @__PURE__ */ n((e, t = /* @__PURE__ */ new Map()) => {
2034
+ let n = new CSSStyleSheet();
2035
+ if (e.fontFamily !== void 0 && n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`, n.cssRules.length), e.altFontFamily !== void 0 && n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`, n.cssRules.length), t instanceof Map) {
2036
+ let r = h(e) ? ["> *", "span"] : [
2037
+ "rect",
2038
+ "polygon",
2039
+ "ellipse",
2040
+ "circle",
2041
+ "path"
2042
+ ];
2043
+ t.forEach((e) => {
2044
+ He(e.styles) || r.forEach((t) => {
2045
+ n.insertRule(as(e.id, t, e.styles), n.cssRules.length);
2046
+ }), He(e.textStyles) || n.insertRule(as(e.id, "tspan", (e?.textStyles || []).map((e) => e.replace("color", "fill"))), n.cssRules.length);
2047
+ });
2048
+ }
2049
+ let r = "";
2050
+ if (e.themeCSS !== void 0) {
2051
+ if (typeof n.replaceSync == "function") {
2052
+ let t = new CSSStyleSheet();
2053
+ t.replaceSync(e.themeCSS), r = ee(t) + "\n";
2054
+ } else r += `${e.themeCSS}
2055
+ `;
2056
+ }
2057
+ return r + ee(n);
2058
+ }, "createCssStyles"), ss = /* @__PURE__ */ n((e, t) => Zi(Ki(`${e}{${t}}`), $i([/* @__PURE__ */ n(function(t, n, r, a) {
2059
+ if (t.type === "rule" && Array.isArray(t.props)) {
2060
+ if (t.parent && t.parent.type === "@keyframes") return;
2061
+ t.props = t.props.map((t) => t.startsWith(e) ? t : `${e} ${t}`);
2062
+ } else t.type.startsWith("@") && ([
2063
+ "@media",
2064
+ "@supports",
2065
+ "@layer",
2066
+ "@scope",
2067
+ "@container",
2068
+ "@starting-style",
2069
+ "@keyframes"
2070
+ ].includes(t.type) || (i.warn(`Removing unsupported at-rule ${t.type} from CSS`), t.type = mi));
2071
+ }, "addNamespace"), Qi])), "compileCSS"), cs = /* @__PURE__ */ n((e, t, n, r) => {
2072
+ let i = os(e, n);
2073
+ return ss(r, v(t, i, {
2074
+ ...e.themeVariables,
2075
+ theme: e.theme,
2076
+ look: e.look
2077
+ }, r));
2078
+ }, "createUserStyles"), ls = /* @__PURE__ */ n((e = "", t, n) => {
2079
+ let r = e;
2080
+ return !n && !t && (r = r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g, "marker-end=\"url(#")), r = ue(r), r = r.replace(/<br>/g, "<br/>"), r;
2081
+ }, "cleanUpSvgCode"), us = /* @__PURE__ */ n((e = "", t) => `<iframe style="width:${Yo};height:${t?.viewBox?.baseVal?.height ? t.viewBox.baseVal.height + "px" : Xo};${Zo}" src="data:text/html;charset=UTF-8;base64,${Vo(`<body style="${Qo}">${e}</body>`)}" sandbox="${$o}">
2082
+ ${es}
2083
+ </iframe>`, "putIntoIFrame"), ds = /* @__PURE__ */ n((e, t, n, r, i) => {
2084
+ let a = e.append("div");
2085
+ a.attr("id", n), r && a.attr("style", r);
2086
+ let o = a.append("svg").attr("id", t).attr("width", "100%").attr("xmlns", Ko);
2087
+ return i && o.attr("xmlns:xlink", i), o.append("g"), e;
2088
+ }, "appendDivSvgG");
2089
+ function fs(e, t) {
2090
+ return e.append("iframe").attr("id", t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
2091
+ }
2092
+ n(fs, "sandboxedIframe");
2093
+ var ps = /* @__PURE__ */ n((e, t, n, r) => {
2094
+ e.getElementById(t)?.remove(), e.getElementById(n)?.remove(), e.getElementById(r)?.remove();
2095
+ }, "removeExistingElements"), ms = /* @__PURE__ */ n(async function(e, t, r) {
2096
+ Do();
2097
+ let s = rs(t);
2098
+ t = s.code;
2099
+ let c = x();
2100
+ i.debug(c), t.length > (c?.maxTextSize ?? Ho) && (t = Uo);
2101
+ let l = `#${e}`, u = "i" + e, d = "#" + u, f = "d" + e, p = "#" + f, m = /* @__PURE__ */ n(() => {
2102
+ let e = a(g ? d : p).node();
2103
+ e && "remove" in e && e.remove();
2104
+ }, "removeTempElements"), h = a(document.body), g = c.securityLevel === Wo, _ = c.securityLevel === Go, v = c.fontFamily;
2105
+ if (r !== void 0) {
2106
+ if (r && (r.innerHTML = ""), g) {
2107
+ let e = fs(a(r), u);
2108
+ h = a(e.nodes()[0].contentDocument.body), h.node().style.margin = "0";
2109
+ } else h = a(r);
2110
+ ds(h, e, f, `font-family: ${v}`, qo);
2111
+ } else {
2112
+ if (ps(document, e, f, u), g) {
2113
+ let e = fs(a(document.body), u);
2114
+ h = a(e.nodes()[0].contentDocument.body), h.node().style.margin = "0";
2115
+ } else h = a("body");
2116
+ ds(h, e, f);
2117
+ }
2118
+ let y, b;
2119
+ try {
2120
+ y = await Mo.fromText(t, { title: s.title });
2121
+ } catch (e) {
2122
+ if (c.suppressErrorRendering) throw m(), e;
2123
+ y = await Mo.fromText("error"), b = e;
2124
+ }
2125
+ let S = h.select(p).node(), ee = y.type, te = S.firstChild, ne = te.firstChild, re = y.renderer.getClasses?.(t, y), ie = cs(c, ee, re, l), ae = document.createElement("style");
2126
+ ae.innerHTML = ie, te.insertBefore(ae, ne);
2127
+ try {
2128
+ await y.renderer.draw(t, e, "11.16.0", y);
2129
+ } catch (n) {
2130
+ throw c.suppressErrorRendering ? m() : La.draw(t, e, "11.16.0"), n;
2131
+ }
2132
+ let oe = h.select(`${p} svg`), se = y.db.getAccTitle?.(), ce = y.db.getAccDescription?.();
2133
+ _s(ee, oe, se, ce), h.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns", Jo);
2134
+ let w = h.select(p).node().innerHTML;
2135
+ if (i.debug("config.arrowMarkerAbsolute", c.arrowMarkerAbsolute), w = ls(w, g, C(c.arrowMarkerAbsolute)), g) {
2136
+ let e = h.select(p + " svg").node();
2137
+ w = us(w, e);
2138
+ } else _ || (w = o.sanitize(w, {
2139
+ ADD_TAGS: ts,
2140
+ ADD_ATTR: ns,
2141
+ HTML_INTEGRATION_POINTS: { foreignobject: !0 }
2142
+ }));
2143
+ if (Po(), b) throw b;
2144
+ return m(), {
2145
+ diagramType: ee,
2146
+ svg: w,
2147
+ bindFunctions: y.db.bindFunctions
2148
+ };
2149
+ }, "render");
2150
+ function hs(e = {}) {
2151
+ let t = ae({}, e);
2152
+ t?.fontFamily && !t.themeVariables?.fontFamily && (t.themeVariables ||= {}, t.themeVariables.fontFamily = t.fontFamily), g(t), t?.theme && t.theme in y ? t.themeVariables = y[t.theme].getThemeVariables(t.themeVariables) : t && (t.themeVariables = y.default.getThemeVariables(t.themeVariables));
2153
+ let n = typeof t == "object" ? ie(t) : c();
2154
+ r(n.logLevel), Do();
2155
+ }
2156
+ n(hs, "initialize");
2157
+ var gs = /* @__PURE__ */ n((e, t = {}) => {
2158
+ let { code: n } = Bo(e);
2159
+ return Mo.fromText(n, t);
2160
+ }, "getDiagramFromText");
2161
+ function _s(e, t, n, r) {
2162
+ Ao(t, e), jo(t, n, r, t.attr("id"));
2163
+ }
2164
+ n(_s, "addA11yInfo");
2165
+ var Q = Object.freeze({
2166
+ render: ms,
2167
+ parse: is,
2168
+ getDiagramFromText: gs,
2169
+ initialize: hs,
2170
+ getConfig: x,
2171
+ setConfig: _,
2172
+ getSiteConfig: c,
2173
+ updateSiteConfig: p,
2174
+ reset: /* @__PURE__ */ n(() => {
2175
+ l();
2176
+ }, "reset"),
2177
+ globalReset: /* @__PURE__ */ n(() => {
2178
+ l(ce);
2179
+ }, "globalReset"),
2180
+ defaultConfig: ce
2181
+ });
2182
+ r(x().logLevel), l(x());
2183
+ var vs = /* @__PURE__ */ n((e, t, n) => {
2184
+ i.warn(e), fe(e) ? (n && n(e.str, e.hash), t.push({
2185
+ ...e,
2186
+ message: e.str,
2187
+ error: e
2188
+ })) : (n && n(e), e instanceof Error && t.push({
2189
+ str: e.message,
2190
+ message: e.message,
2191
+ hash: e.name,
2192
+ error: e
2193
+ }));
2194
+ }, "handleError"), ys = /* @__PURE__ */ n(async function(e = { querySelector: ".mermaid" }) {
2195
+ try {
2196
+ await bs(e);
2197
+ } catch (t) {
2198
+ if (fe(t) && i.error(t.str), $.parseError && $.parseError(t), !e.suppressErrors) throw i.error("Use the suppressErrors option to suppress these errors"), t;
2199
+ }
2200
+ }, "run"), bs = /* @__PURE__ */ n(async function({ postRenderCallback: e, querySelector: t, nodes: n } = { querySelector: ".mermaid" }) {
2201
+ let r = Q.getConfig();
2202
+ i.debug(`${e ? "" : "No "}Callback function found`);
2203
+ let a;
2204
+ if (n) a = n;
2205
+ else if (t) a = document.querySelectorAll(t);
2206
+ else throw Error("Nodes and querySelector are both undefined");
2207
+ i.debug(`Found ${a.length} diagrams`), r?.startOnLoad !== void 0 && (i.debug("Start On Load: " + r?.startOnLoad), Q.updateSiteConfig({ startOnLoad: r?.startOnLoad }));
2208
+ let o = new pe.InitIDGenerator(r.deterministicIds, r.deterministicIDSeed), s, c = [];
2209
+ for (let t of Array.from(a)) {
2210
+ if (i.info("Rendering diagram: " + t.id), t.getAttribute("data-processed")) continue;
2211
+ t.setAttribute("data-processed", "true");
2212
+ let n = `mermaid-${o.next()}`;
2213
+ s = t.innerHTML, s = xe(pe.entityDecode(s)).trim().replace(/<br\s*\/?>/gi, "<br/>");
2214
+ let r = pe.detectInit(s);
2215
+ r && i.debug("Detected early reinit: ", r);
2216
+ try {
2217
+ let { svg: r, bindFunctions: i } = await As(n, s, t);
2218
+ t.innerHTML = r, e && await e(n), i && i(t);
2219
+ } catch (e) {
2220
+ vs(e, c, $.parseError);
2221
+ }
2222
+ }
2223
+ if (c.length > 0) throw c[0];
2224
+ }, "runThrowsErrors"), xs = /* @__PURE__ */ n(function(e) {
2225
+ Q.initialize(e);
2226
+ }, "initialize"), Ss = /* @__PURE__ */ n(async function(e, t, n) {
2227
+ i.warn("mermaid.init is deprecated. Please use run instead."), e && xs(e);
2228
+ let r = {
2229
+ postRenderCallback: n,
2230
+ querySelector: ".mermaid"
2231
+ };
2232
+ typeof t == "string" ? r.querySelector = t : t && (r.nodes = t instanceof HTMLElement ? [t] : t), await ys(r);
2233
+ }, "init"), Cs = /* @__PURE__ */ n(async (e, { lazyLoad: t = !0 } = {}) => {
2234
+ Do(), f(...e), t === !1 && await Oo();
2235
+ }, "registerExternalDiagrams"), ws = /* @__PURE__ */ n(function() {
2236
+ if ($.startOnLoad) {
2237
+ let { startOnLoad: e } = Q.getConfig();
2238
+ e && $.run().catch((e) => i.error("Mermaid failed to initialize", e));
2239
+ }
2240
+ }, "contentLoaded");
2241
+ typeof document < "u" && window.addEventListener("load", ws, !1);
2242
+ var Ts = /* @__PURE__ */ n(function(e) {
2243
+ $.parseError = e;
2244
+ }, "setParseErrorHandler"), Es = [], Ds = !1, Os = /* @__PURE__ */ n(async () => {
2245
+ if (!Ds) {
2246
+ for (Ds = !0; Es.length > 0;) {
2247
+ let e = Es.shift();
2248
+ if (e) try {
2249
+ await e();
2250
+ } catch (e) {
2251
+ i.error("Error executing queue", e);
2252
+ }
2253
+ }
2254
+ Ds = !1;
2255
+ }
2256
+ }, "executeQueue"), ks = /* @__PURE__ */ n(async (e, t) => new Promise((r, a) => {
2257
+ let o = /* @__PURE__ */ n(() => new Promise((n, o) => {
2258
+ Q.parse(e, t).then((e) => {
2259
+ n(e), r(e);
2260
+ }, (e) => {
2261
+ i.error("Error parsing", e), $.parseError?.(e), o(e), a(e);
2262
+ });
2263
+ }), "performCall");
2264
+ Es.push(o), Os().catch(a);
2265
+ }), "parse"), As = /* @__PURE__ */ n((e, t, r) => new Promise((a, o) => {
2266
+ let s = /* @__PURE__ */ n(() => new Promise((n, s) => {
2267
+ Q.render(e, t, r).then((e) => {
2268
+ n(e), a(e);
2269
+ }, (e) => {
2270
+ i.error("Error parsing", e), $.parseError?.(e), s(e), o(e);
2271
+ });
2272
+ }), "performCall");
2273
+ Es.push(s), Os().catch(o);
2274
+ }), "render"), $ = {
2275
+ startOnLoad: !0,
2276
+ mermaidAPI: Q,
2277
+ parse: ks,
2278
+ render: As,
2279
+ init: Ss,
2280
+ run: ys,
2281
+ registerExternalDiagrams: Cs,
2282
+ registerLayoutLoaders: Ge,
2283
+ initialize: xs,
2284
+ parseError: void 0,
2285
+ contentLoaded: ws,
2286
+ setParseErrorHandler: Ts,
2287
+ detectType: re,
2288
+ registerIconPacks: be,
2289
+ getRegisteredDiagramsMetadata: /* @__PURE__ */ n(() => Object.keys(te).map((e) => ({ id: e })), "getRegisteredDiagramsMetadata")
2290
+ }, js = $, Ms = t("abcedfghicklmn", 10), Ns = "m1m0jzgx", Ps = "ewtu9zr", Fs = 800, Is = 600;
2291
+ function Ls({ code: t }) {
2292
+ let n = je(null), [r, i] = Me(null), a = Ie(), o = Le(), s = a === "dark" ? "dark" : "base", c = Fe();
2293
+ Ae(() => {
2294
+ js.initialize({
2295
+ startOnLoad: !1,
2296
+ theme: s,
2297
+ securityLevel: "loose",
2298
+ themeVariables: {
2299
+ fontFamily: Pe,
2300
+ fontSize: "14px",
2301
+ primaryTextColor: c.colors.textColor,
2302
+ primaryColor: c.colors.colorMermaidPrimaryColor,
2303
+ primaryBorderColor: c.colors.colorMermaidPrimaryBorderColor,
2304
+ lineColor: c.colors.colorMermaidLineColor,
2305
+ edgeLabelBackground: c.colors.codeBgColor,
2306
+ pieStrokeColor: c.colors.whiteColor,
2307
+ pieOuterStrokeColor: c.colors.transparent,
2308
+ pieStrokeWidth: "1px",
2309
+ pieTitleTextSize: "14px",
2310
+ pieSectionTextSize: "14px",
2311
+ pieLegendTextSize: "14px",
2312
+ pie1: "#72b3eb",
2313
+ pie2: "#74b077",
2314
+ pie3: "#6a76bd",
2315
+ pie4: "#d9825d",
2316
+ pie5: "#cb6666",
2317
+ pie6: "#6eb2bd",
2318
+ pie7: "#d9b85c",
2319
+ pie8: "#999999",
2320
+ pie9: "#58d68d",
2321
+ pie10: "#af7ac5",
2322
+ pie11: "#eb984e",
2323
+ pie12: "#52be80",
2324
+ fillType0: "#72b3eb",
2325
+ fillType1: "#74b077",
2326
+ fillType2: "#6a76bd",
2327
+ fillType3: "#999999",
2328
+ fillType4: "#d9825d",
2329
+ fillType5: "#cb6666",
2330
+ fillType6: "#6eb2bd",
2331
+ fillType7: "#d9b85c",
2332
+ git0: "#72b3eb",
2333
+ git1: "#74b077",
2334
+ git2: "#6a76bd",
2335
+ git3: "#999999",
2336
+ git4: "#d9825d",
2337
+ git5: "#cb6666",
2338
+ git6: "#6eb2bd",
2339
+ git7: "#d9b85c"
2340
+ }
2341
+ });
2342
+ }, [
2343
+ s,
2344
+ c.colors.textColor,
2345
+ c.colors.whiteColor,
2346
+ c.colors.transparent,
2347
+ c.colors.colorMermaidLineColor,
2348
+ c.colors.colorMermaidPrimaryColor,
2349
+ c.colors.colorMermaidPrimaryBorderColor,
2350
+ c.colors.codeBgColor
2351
+ ]);
2352
+ let l = ke(async () => {
2353
+ if (!n.current) return;
2354
+ let t = n.current.querySelector("svg");
2355
+ if (!t) return;
2356
+ let r = Fs, i = Is, s = t.getAttribute("viewBox");
2357
+ if (s) {
2358
+ let [, , e, t] = s.split(/\s+/).map(Number);
2359
+ e && t && (r = e, i = t);
2360
+ }
2361
+ if (r === Fs && i === Is) {
2362
+ let e = t.getAttribute("width"), n = t.getAttribute("height");
2363
+ e && n && (r = parseFloat(e) || r, i = parseFloat(n) || i);
2364
+ }
2365
+ if (r === Fs && i === Is) try {
2366
+ let e = t.getBBox();
2367
+ e.width && e.height && (r = e.width, i = e.height);
2368
+ } catch {}
2369
+ if (r < 375 && i < 375) {
2370
+ let e = 375 / Math.max(r, i);
2371
+ r *= e, i *= e;
2372
+ }
2373
+ let c = t.cloneNode(!0);
2374
+ c.removeAttribute("style"), c.setAttribute("width", String(r)), c.setAttribute("height", String(i));
2375
+ let l = new XMLSerializer().serializeToString(c), u = new Blob([l], { type: "image/svg+xml;charset=utf-8" }), d = URL.createObjectURL(u), f = 96, p = window.innerWidth, m = window.innerHeight;
2376
+ p < 600 || m < 600 ? f = 18 : (p < 1024 || m < 768) && (f = 48);
2377
+ let h = Math.max(r, window.innerWidth - f), g = Math.max(i, window.innerHeight - f), _ = Math.max(h / r, g / i, 1), v = Math.round(r * _), y = Math.round(i * _), b = Re({
2378
+ dataSource: [{
2379
+ src: d,
2380
+ width: v,
2381
+ height: y,
2382
+ alt: "Mermaid Diagram"
2383
+ }],
2384
+ mainClass: e(ze, "m1k5um6p"),
2385
+ preloaderDelay: 1,
2386
+ initialZoomLevel: "fit",
2387
+ padding: {
2388
+ top: f,
2389
+ bottom: f,
2390
+ left: f,
2391
+ right: f
2392
+ }
2393
+ }, {
2394
+ toastQueue: o,
2395
+ themeMode: a
2396
+ });
2397
+ b.on("close", () => {
2398
+ URL.revokeObjectURL(d), b.destroy();
2399
+ }), b.init(), b.loadAndOpen(0);
2400
+ }, [a, o]);
2401
+ return Ae(() => {
2402
+ (async () => {
2403
+ if (!n.current || !t.trim()) {
2404
+ i(null), n.current && (n.current.innerHTML = "");
2405
+ return;
2406
+ }
2407
+ try {
2408
+ i(null);
2409
+ let e = `mermaid-${Ms()}`, { svg: r } = await js.render(e, t);
2410
+ n.current && (n.current.innerHTML = r);
2411
+ } catch (e) {
2412
+ i(e instanceof Error ? e.message : "Failed to render Mermaid diagram"), n.current && (n.current.innerHTML = "");
2413
+ }
2414
+ })();
2415
+ }, [t, s]), r ? /* @__PURE__ */ Ne("div", {
2416
+ className: Ps,
2417
+ children: r
2418
+ }) : /* @__PURE__ */ Ne("div", {
2419
+ ref: n,
2420
+ className: Ns,
2421
+ onClick: l
2422
+ });
2423
+ }
2424
+ //#endregion
2425
+ export { Ls as MermaidRenderer, Be as a, Ke as i, pi as n, qe as r, fi as t };