@oxide/design-system 1.7.7--canary.c74e439.0 → 1.7.7--canary.2a63c1e.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 (131) hide show
  1. package/components/dist/asciidoc.css +42 -0
  2. package/components/dist/index.d.ts +0 -3
  3. package/components/dist/index.js +145 -1807
  4. package/components/dist/index.js.map +1 -1
  5. package/package.json +5 -3
  6. package/components/dist/architecture-I3QFYML2-YZWO3N3B.js +0 -14
  7. package/components/dist/architecture-I3QFYML2-YZWO3N3B.js.map +0 -1
  8. package/components/dist/architectureDiagram-UYN6MBPD-HXPGIDN7.js +0 -8846
  9. package/components/dist/architectureDiagram-UYN6MBPD-HXPGIDN7.js.map +0 -1
  10. package/components/dist/blockDiagram-ZHA2E4KO-OAYYKCLF.js +0 -3721
  11. package/components/dist/blockDiagram-ZHA2E4KO-OAYYKCLF.js.map +0 -1
  12. package/components/dist/c4Diagram-6F5ED5ID-TBHFK2XY.js +0 -2599
  13. package/components/dist/c4Diagram-6F5ED5ID-TBHFK2XY.js.map +0 -1
  14. package/components/dist/chunk-2DDKDUUO.js +0 -439
  15. package/components/dist/chunk-2DDKDUUO.js.map +0 -1
  16. package/components/dist/chunk-2NHDMTP7.js +0 -26905
  17. package/components/dist/chunk-2NHDMTP7.js.map +0 -1
  18. package/components/dist/chunk-4IJS44L3.js +0 -22
  19. package/components/dist/chunk-4IJS44L3.js.map +0 -1
  20. package/components/dist/chunk-562WOS3Z.js +0 -1109
  21. package/components/dist/chunk-562WOS3Z.js.map +0 -1
  22. package/components/dist/chunk-6UD2HOKB.js +0 -17082
  23. package/components/dist/chunk-6UD2HOKB.js.map +0 -1
  24. package/components/dist/chunk-76BOQ7BT.js +0 -63
  25. package/components/dist/chunk-76BOQ7BT.js.map +0 -1
  26. package/components/dist/chunk-7I5DT373.js +0 -97
  27. package/components/dist/chunk-7I5DT373.js.map +0 -1
  28. package/components/dist/chunk-BPREMNVP.js +0 -1875
  29. package/components/dist/chunk-BPREMNVP.js.map +0 -1
  30. package/components/dist/chunk-BVYAEHG3.js +0 -122
  31. package/components/dist/chunk-BVYAEHG3.js.map +0 -1
  32. package/components/dist/chunk-BW7DFBOS.js +0 -152
  33. package/components/dist/chunk-BW7DFBOS.js.map +0 -1
  34. package/components/dist/chunk-EZG2MNHW.js +0 -59
  35. package/components/dist/chunk-EZG2MNHW.js.map +0 -1
  36. package/components/dist/chunk-G6QWNAHJ.js +0 -43
  37. package/components/dist/chunk-G6QWNAHJ.js.map +0 -1
  38. package/components/dist/chunk-H72D3HRR.js +0 -1244
  39. package/components/dist/chunk-H72D3HRR.js.map +0 -1
  40. package/components/dist/chunk-K532NZMW.js +0 -46
  41. package/components/dist/chunk-K532NZMW.js.map +0 -1
  42. package/components/dist/chunk-LC3BX2KL.js +0 -25
  43. package/components/dist/chunk-LC3BX2KL.js.map +0 -1
  44. package/components/dist/chunk-LQ2ABR7F.js +0 -5665
  45. package/components/dist/chunk-LQ2ABR7F.js.map +0 -1
  46. package/components/dist/chunk-M6L3MM6K.js +0 -22
  47. package/components/dist/chunk-M6L3MM6K.js.map +0 -1
  48. package/components/dist/chunk-MWA4PRRW.js +0 -122
  49. package/components/dist/chunk-MWA4PRRW.js.map +0 -1
  50. package/components/dist/chunk-ND3FLKHU.js +0 -570
  51. package/components/dist/chunk-ND3FLKHU.js.map +0 -1
  52. package/components/dist/chunk-NIVHLOPB.js +0 -2621
  53. package/components/dist/chunk-NIVHLOPB.js.map +0 -1
  54. package/components/dist/chunk-R6F6FFK7.js +0 -65
  55. package/components/dist/chunk-R6F6FFK7.js.map +0 -1
  56. package/components/dist/chunk-RN5R3L7O.js +0 -2041
  57. package/components/dist/chunk-RN5R3L7O.js.map +0 -1
  58. package/components/dist/chunk-RWDBBMDN.js +0 -10910
  59. package/components/dist/chunk-RWDBBMDN.js.map +0 -1
  60. package/components/dist/chunk-T7HPDS4Z.js +0 -573
  61. package/components/dist/chunk-T7HPDS4Z.js.map +0 -1
  62. package/components/dist/chunk-TG4YEU4Q.js +0 -23
  63. package/components/dist/chunk-TG4YEU4Q.js.map +0 -1
  64. package/components/dist/chunk-U5WCXBW2.js +0 -48
  65. package/components/dist/chunk-U5WCXBW2.js.map +0 -1
  66. package/components/dist/chunk-V6PWN6OH.js +0 -1875
  67. package/components/dist/chunk-V6PWN6OH.js.map +0 -1
  68. package/components/dist/chunk-VLTHNCSD.js +0 -48
  69. package/components/dist/chunk-VLTHNCSD.js.map +0 -1
  70. package/components/dist/chunk-WDK4G4UR.js +0 -2791
  71. package/components/dist/chunk-WDK4G4UR.js.map +0 -1
  72. package/components/dist/chunk-WLVQWTC6.js +0 -77
  73. package/components/dist/chunk-WLVQWTC6.js.map +0 -1
  74. package/components/dist/chunk-YDLS5R4M.js +0 -48
  75. package/components/dist/chunk-YDLS5R4M.js.map +0 -1
  76. package/components/dist/chunk-YGFBWU2Q.js +0 -7
  77. package/components/dist/chunk-YGFBWU2Q.js.map +0 -1
  78. package/components/dist/chunk-ZBL4CWCH.js +0 -2120
  79. package/components/dist/chunk-ZBL4CWCH.js.map +0 -1
  80. package/components/dist/classDiagram-LNE6IOMH-VRQHEQWM.js +0 -40
  81. package/components/dist/classDiagram-LNE6IOMH-VRQHEQWM.js.map +0 -1
  82. package/components/dist/classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js +0 -40
  83. package/components/dist/classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js.map +0 -1
  84. package/components/dist/dagre-4EVJKHTY-XW45LMKR.js +0 -734
  85. package/components/dist/dagre-4EVJKHTY-XW45LMKR.js.map +0 -1
  86. package/components/dist/diagram-QW4FP2JN-J2YMUPB5.js +0 -226
  87. package/components/dist/diagram-QW4FP2JN-J2YMUPB5.js.map +0 -1
  88. package/components/dist/erDiagram-6RL3IURR-HQULDVJI.js +0 -1381
  89. package/components/dist/erDiagram-6RL3IURR-HQULDVJI.js.map +0 -1
  90. package/components/dist/flowDiagram-7ASYPVHJ-2542732I.js +0 -2349
  91. package/components/dist/flowDiagram-7ASYPVHJ-2542732I.js.map +0 -1
  92. package/components/dist/ganttDiagram-NTVNEXSI-V66YQQB3.js +0 -2413
  93. package/components/dist/ganttDiagram-NTVNEXSI-V66YQQB3.js.map +0 -1
  94. package/components/dist/gitGraph-YCYPL57B-AAXPWQN7.js +0 -14
  95. package/components/dist/gitGraph-YCYPL57B-AAXPWQN7.js.map +0 -1
  96. package/components/dist/gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js +0 -1763
  97. package/components/dist/gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js.map +0 -1
  98. package/components/dist/info-46DW6VJ7-43TTIEYF.js +0 -14
  99. package/components/dist/info-46DW6VJ7-43TTIEYF.js.map +0 -1
  100. package/components/dist/infoDiagram-A4XQUW5V-UZERSQDI.js +0 -54
  101. package/components/dist/infoDiagram-A4XQUW5V-UZERSQDI.js.map +0 -1
  102. package/components/dist/journeyDiagram-G5WM74LC-RVKMRGRW.js +0 -1244
  103. package/components/dist/journeyDiagram-G5WM74LC-RVKMRGRW.js.map +0 -1
  104. package/components/dist/kanban-definition-QRCXZQQD-NWU5I3TK.js +0 -1119
  105. package/components/dist/kanban-definition-QRCXZQQD-NWU5I3TK.js.map +0 -1
  106. package/components/dist/katex-WNZY3CE5.js +0 -14484
  107. package/components/dist/katex-WNZY3CE5.js.map +0 -1
  108. package/components/dist/mindmap-definition-GWI6TPTV-MISEH6LG.js +0 -6013
  109. package/components/dist/mindmap-definition-GWI6TPTV-MISEH6LG.js.map +0 -1
  110. package/components/dist/packet-W2GHVCYJ-FBZCFIPR.js +0 -14
  111. package/components/dist/packet-W2GHVCYJ-FBZCFIPR.js.map +0 -1
  112. package/components/dist/pie-BEWT4RHE-UFFBBCXM.js +0 -14
  113. package/components/dist/pie-BEWT4RHE-UFFBBCXM.js.map +0 -1
  114. package/components/dist/pieDiagram-YF2LJOPJ-IXEVHPCM.js +0 -223
  115. package/components/dist/pieDiagram-YF2LJOPJ-IXEVHPCM.js.map +0 -1
  116. package/components/dist/quadrantDiagram-OS5C2QUG-MW26UCZV.js +0 -1408
  117. package/components/dist/quadrantDiagram-OS5C2QUG-MW26UCZV.js.map +0 -1
  118. package/components/dist/requirementDiagram-MIRIMTAZ-BX24AAHL.js +0 -1175
  119. package/components/dist/requirementDiagram-MIRIMTAZ-BX24AAHL.js.map +0 -1
  120. package/components/dist/sankeyDiagram-Y46BX6SQ-5RKUGG63.js +0 -1278
  121. package/components/dist/sankeyDiagram-Y46BX6SQ-5RKUGG63.js.map +0 -1
  122. package/components/dist/sequenceDiagram-G6AWOVSC-2T3JBUZ2.js +0 -3529
  123. package/components/dist/sequenceDiagram-G6AWOVSC-2T3JBUZ2.js.map +0 -1
  124. package/components/dist/stateDiagram-MAYHULR4-HZ5EGLPA.js +0 -505
  125. package/components/dist/stateDiagram-MAYHULR4-HZ5EGLPA.js.map +0 -1
  126. package/components/dist/stateDiagram-v2-4JROLMXI-DN2FEZV3.js +0 -40
  127. package/components/dist/stateDiagram-v2-4JROLMXI-DN2FEZV3.js.map +0 -1
  128. package/components/dist/timeline-definition-U7ZMHBDA-GB6AKKW4.js +0 -1260
  129. package/components/dist/timeline-definition-U7ZMHBDA-GB6AKKW4.js.map +0 -1
  130. package/components/dist/xychartDiagram-6QU3TZC5-BFFLEHUP.js +0 -1877
  131. package/components/dist/xychartDiagram-6QU3TZC5-BFFLEHUP.js.map +0 -1
@@ -1,70 +1,3 @@
1
- import {
2
- version
3
- } from "./chunk-YGFBWU2Q.js";
4
- import {
5
- selectSvgElement
6
- } from "./chunk-TG4YEU4Q.js";
7
- import {
8
- JSON_SCHEMA,
9
- load
10
- } from "./chunk-WDK4G4UR.js";
11
- import {
12
- registerLayoutLoaders
13
- } from "./chunk-WLVQWTC6.js";
14
- import "./chunk-ND3FLKHU.js";
15
- import "./chunk-LQ2ABR7F.js";
16
- import "./chunk-BW7DFBOS.js";
17
- import "./chunk-M6L3MM6K.js";
18
- import {
19
- registerIconPacks
20
- } from "./chunk-H72D3HRR.js";
21
- import {
22
- dedent
23
- } from "./chunk-NIVHLOPB.js";
24
- import {
25
- cleanAndMerge,
26
- decodeEntities,
27
- encodeEntities,
28
- isDetailedError,
29
- removeDirectives,
30
- utils_default
31
- } from "./chunk-T7HPDS4Z.js";
32
- import "./chunk-7I5DT373.js";
33
- import {
34
- UnknownDiagramError,
35
- __name,
36
- addDirective,
37
- assignWithDepth_default,
38
- configureSvgSize,
39
- defaultConfig,
40
- detectType,
41
- detectors,
42
- evaluate,
43
- frontMatterRegex,
44
- getConfig,
45
- getDiagram,
46
- getDiagramLoader,
47
- getSiteConfig,
48
- log,
49
- purify,
50
- registerDiagram,
51
- registerLazyLoadedDiagrams,
52
- reset,
53
- saveConfigFromInitialize,
54
- select_default,
55
- setConfig,
56
- setLogLevel,
57
- setSiteConfig,
58
- styles_default,
59
- themes_default,
60
- updateSiteConfig
61
- } from "./chunk-RWDBBMDN.js";
62
- import {
63
- isEmpty_default
64
- } from "./chunk-BVYAEHG3.js";
65
- import "./chunk-562WOS3Z.js";
66
- import "./chunk-K532NZMW.js";
67
-
68
1
  // components/src/asciidoc/index.tsx
69
2
  import asciidoctor2 from "@asciidoctor/core";
70
3
  import { Content as Content4 } from "@oxide/react-asciidoc";
@@ -114,8 +47,8 @@ var classed = {
114
47
 
115
48
  // components/src/asciidoc/Admonition.tsx
116
49
  import { jsx, jsxs } from "react/jsx-runtime";
117
- var Admonition = ({ node: node2 }) => {
118
- const attrs2 = node2.attributes;
50
+ var Admonition = ({ node }) => {
51
+ const attrs2 = node.attributes;
119
52
  let icon;
120
53
  if (attrs2.name === "caution") {
121
54
  icon = /* @__PURE__ */ jsx(Error12, {});
@@ -127,12 +60,12 @@ var Admonition = ({ node: node2 }) => {
127
60
  return /* @__PURE__ */ jsxs("div", { className: `admonitionblock ${attrs2.name}`, children: [
128
61
  /* @__PURE__ */ jsx("div", { className: "admonition-icon", children: icon }),
129
62
  /* @__PURE__ */ jsxs("div", { className: "admonition-content content", children: [
130
- /* @__PURE__ */ jsx(Title, { text: node2.title }),
63
+ /* @__PURE__ */ jsx(Title, { text: node.title }),
131
64
  /* @__PURE__ */ jsx("div", { children: titleCase(attrs2.name.toString()) }),
132
65
  /* @__PURE__ */ jsxs("div", { children: [
133
- /* @__PURE__ */ jsx(Title, { text: node2.title }),
134
- node2.content && parse(node2.content),
135
- /* @__PURE__ */ jsx(Content, { blocks: node2.blocks })
66
+ /* @__PURE__ */ jsx(Title, { text: node.title }),
67
+ node.content && parse(node.content),
68
+ /* @__PURE__ */ jsx(Content, { blocks: node.blocks })
136
69
  ] })
137
70
  ] })
138
71
  ] });
@@ -177,1592 +110,9 @@ var Warning12 = ({ className }) => /* @__PURE__ */ jsx(
177
110
  );
178
111
  var Admonition_default = Admonition;
179
112
 
180
- // components/src/asciidoc/Listing.tsx
181
- import { Title as Title2, useConverterContext } from "@oxide/react-asciidoc";
182
- import cn2 from "classnames";
183
-
184
- // node_modules/stylis/src/Enum.js
185
- var COMMENT = "comm";
186
- var RULESET = "rule";
187
- var DECLARATION = "decl";
188
- var IMPORT = "@import";
189
- var KEYFRAMES = "@keyframes";
190
- var LAYER = "@layer";
191
-
192
- // node_modules/stylis/src/Utility.js
193
- var abs = Math.abs;
194
- var from = String.fromCharCode;
195
- function trim(value) {
196
- return value.trim();
197
- }
198
- function replace(value, pattern, replacement) {
199
- return value.replace(pattern, replacement);
200
- }
201
- function indexof(value, search, position2) {
202
- return value.indexOf(search, position2);
203
- }
204
- function charat(value, index) {
205
- return value.charCodeAt(index) | 0;
206
- }
207
- function substr(value, begin, end) {
208
- return value.slice(begin, end);
209
- }
210
- function strlen(value) {
211
- return value.length;
212
- }
213
- function sizeof(value) {
214
- return value.length;
215
- }
216
- function append(value, array) {
217
- return array.push(value), value;
218
- }
219
-
220
- // node_modules/stylis/src/Tokenizer.js
221
- var line = 1;
222
- var column = 1;
223
- var length = 0;
224
- var position = 0;
225
- var character = 0;
226
- var characters = "";
227
- function node(value, root, parent, type, props, children, length2, siblings) {
228
- return { value, root, parent, type, props, children, line, column, length: length2, return: "", siblings };
229
- }
230
- function char() {
231
- return character;
232
- }
233
- function prev() {
234
- character = position > 0 ? charat(characters, --position) : 0;
235
- if (column--, character === 10)
236
- column = 1, line--;
237
- return character;
238
- }
239
- function next() {
240
- character = position < length ? charat(characters, position++) : 0;
241
- if (column++, character === 10)
242
- column = 1, line++;
243
- return character;
244
- }
245
- function peek() {
246
- return charat(characters, position);
247
- }
248
- function caret() {
249
- return position;
250
- }
251
- function slice(begin, end) {
252
- return substr(characters, begin, end);
253
- }
254
- function token(type) {
255
- switch (type) {
256
- case 0:
257
- case 9:
258
- case 10:
259
- case 13:
260
- case 32:
261
- return 5;
262
- case 33:
263
- case 43:
264
- case 44:
265
- case 47:
266
- case 62:
267
- case 64:
268
- case 126:
269
- case 59:
270
- case 123:
271
- case 125:
272
- return 4;
273
- case 58:
274
- return 3;
275
- case 34:
276
- case 39:
277
- case 40:
278
- case 91:
279
- return 2;
280
- case 41:
281
- case 93:
282
- return 1;
283
- }
284
- return 0;
285
- }
286
- function alloc(value) {
287
- return line = column = 1, length = strlen(characters = value), position = 0, [];
288
- }
289
- function dealloc(value) {
290
- return characters = "", value;
291
- }
292
- function delimit(type) {
293
- return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
294
- }
295
- function whitespace(type) {
296
- while (character = peek())
297
- if (character < 33)
298
- next();
299
- else
300
- break;
301
- return token(type) > 2 || token(character) > 3 ? "" : " ";
302
- }
303
- function escaping(index, count) {
304
- while (--count && next())
305
- if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
306
- break;
307
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
308
- }
309
- function delimiter(type) {
310
- while (next())
311
- switch (character) {
312
- case type:
313
- return position;
314
- case 34:
315
- case 39:
316
- if (type !== 34 && type !== 39)
317
- delimiter(character);
318
- break;
319
- case 40:
320
- if (type === 41)
321
- delimiter(type);
322
- break;
323
- case 92:
324
- next();
325
- break;
326
- }
327
- return position;
328
- }
329
- function commenter(type, index) {
330
- while (next())
331
- if (type + character === 47 + 10)
332
- break;
333
- else if (type + character === 42 + 42 && peek() === 47)
334
- break;
335
- return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
336
- }
337
- function identifier(index) {
338
- while (!token(peek()))
339
- next();
340
- return slice(index, position);
341
- }
342
-
343
- // node_modules/stylis/src/Parser.js
344
- function compile(value) {
345
- return dealloc(parse2("", null, null, null, [""], value = alloc(value), 0, [0], value));
346
- }
347
- function parse2(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
348
- var index = 0;
349
- var offset2 = 0;
350
- var length2 = pseudo;
351
- var atrule = 0;
352
- var property = 0;
353
- var previous = 0;
354
- var variable = 1;
355
- var scanning = 1;
356
- var ampersand = 1;
357
- var character2 = 0;
358
- var type = "";
359
- var props = rules;
360
- var children = rulesets;
361
- var reference = rule;
362
- var characters2 = type;
363
- while (scanning)
364
- switch (previous = character2, character2 = next()) {
365
- case 40:
366
- if (previous != 108 && charat(characters2, length2 - 1) == 58) {
367
- if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1)
368
- ampersand = -1;
369
- break;
370
- }
371
- case 34:
372
- case 39:
373
- case 91:
374
- characters2 += delimit(character2);
375
- break;
376
- case 9:
377
- case 10:
378
- case 13:
379
- case 32:
380
- characters2 += whitespace(previous);
381
- break;
382
- case 92:
383
- characters2 += escaping(caret() - 1, 7);
384
- continue;
385
- case 47:
386
- switch (peek()) {
387
- case 42:
388
- case 47:
389
- append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
390
- if ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters2) && substr(characters2, -1, void 0) !== " ")
391
- characters2 += " ";
392
- break;
393
- default:
394
- characters2 += "/";
395
- }
396
- break;
397
- case 123 * variable:
398
- points[index++] = strlen(characters2) * ampersand;
399
- case 125 * variable:
400
- case 59:
401
- case 0:
402
- switch (character2) {
403
- case 0:
404
- case 125:
405
- scanning = 0;
406
- case 59 + offset2:
407
- if (ampersand == -1)
408
- characters2 = replace(characters2, /\f/g, "");
409
- if (property > 0 && (strlen(characters2) - length2 || variable === 0 && previous === 47))
410
- append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
411
- break;
412
- case 59:
413
- characters2 += ";";
414
- default:
415
- append(reference = ruleset(characters2, root, parent, index, offset2, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
416
- if (character2 === 123)
417
- if (offset2 === 0)
418
- parse2(characters2, root, reference, reference, props, rulesets, length2, points, children);
419
- else
420
- switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
421
- case 100:
422
- case 108:
423
- case 109:
424
- case 115:
425
- parse2(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children);
426
- break;
427
- default:
428
- parse2(characters2, reference, reference, reference, [""], children, 0, points, children);
429
- }
430
- }
431
- index = offset2 = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
432
- break;
433
- case 58:
434
- length2 = 1 + strlen(characters2), property = previous;
435
- default:
436
- if (variable < 1) {
437
- if (character2 == 123)
438
- --variable;
439
- else if (character2 == 125 && variable++ == 0 && prev() == 125)
440
- continue;
441
- }
442
- switch (characters2 += from(character2), character2 * variable) {
443
- case 38:
444
- ampersand = offset2 > 0 ? 1 : (characters2 += "\f", -1);
445
- break;
446
- case 44:
447
- points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
448
- break;
449
- case 64:
450
- if (peek() === 45)
451
- characters2 += delimit(next());
452
- atrule = peek(), offset2 = length2 = strlen(type = characters2 += identifier(caret())), character2++;
453
- break;
454
- case 45:
455
- if (previous === 45 && strlen(characters2) == 2)
456
- variable = 0;
457
- }
458
- }
459
- return rulesets;
460
- }
461
- function ruleset(value, root, parent, index, offset2, rules, points, type, props, children, length2, siblings) {
462
- var post = offset2 - 1;
463
- var rule = offset2 === 0 ? rules : [""];
464
- var size2 = sizeof(rule);
465
- for (var i = 0, j = 0, k = 0; i < index; ++i)
466
- for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size2; ++x)
467
- if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
468
- props[k++] = z;
469
- return node(value, root, parent, offset2 === 0 ? RULESET : type, props, children, length2, siblings);
470
- }
471
- function comment(value, root, parent, siblings) {
472
- return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
473
- }
474
- function declaration(value, root, parent, length2, siblings) {
475
- return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
476
- }
477
-
478
- // node_modules/stylis/src/Serializer.js
479
- function serialize(children, callback) {
480
- var output = "";
481
- for (var i = 0; i < children.length; i++)
482
- output += callback(children[i], i, children, callback) || "";
483
- return output;
484
- }
485
- function stringify(element, index, children, callback) {
486
- switch (element.type) {
487
- case LAYER:
488
- if (element.children.length)
489
- break;
490
- case IMPORT:
491
- case DECLARATION:
492
- return element.return = element.return || element.value;
493
- case COMMENT:
494
- return "";
495
- case KEYFRAMES:
496
- return element.return = element.value + "{" + serialize(element.children, callback) + "}";
497
- case RULESET:
498
- if (!strlen(element.value = element.props.join(",")))
499
- return "";
500
- }
501
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
502
- }
503
-
504
- // node_modules/mermaid/dist/mermaid.core.mjs
505
- var id = "c4";
506
- var detector = /* @__PURE__ */ __name((txt) => {
507
- return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);
508
- }, "detector");
509
- var loader = /* @__PURE__ */ __name(async () => {
510
- const { diagram: diagram2 } = await import("./c4Diagram-6F5ED5ID-TBHFK2XY.js");
511
- return { id, diagram: diagram2 };
512
- }, "loader");
513
- var plugin = {
514
- id,
515
- detector,
516
- loader
517
- };
518
- var c4Detector_default = plugin;
519
- var id2 = "flowchart";
520
- var detector2 = /* @__PURE__ */ __name((txt, config) => {
521
- if (config?.flowchart?.defaultRenderer === "dagre-wrapper" || config?.flowchart?.defaultRenderer === "elk") {
522
- return false;
523
- }
524
- return /^\s*graph/.test(txt);
525
- }, "detector");
526
- var loader2 = /* @__PURE__ */ __name(async () => {
527
- const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
528
- return { id: id2, diagram: diagram2 };
529
- }, "loader");
530
- var plugin2 = {
531
- id: id2,
532
- detector: detector2,
533
- loader: loader2
534
- };
535
- var flowDetector_default = plugin2;
536
- var id3 = "flowchart-v2";
537
- var detector3 = /* @__PURE__ */ __name((txt, config) => {
538
- if (config?.flowchart?.defaultRenderer === "dagre-d3") {
539
- return false;
540
- }
541
- if (config?.flowchart?.defaultRenderer === "elk") {
542
- config.layout = "elk";
543
- }
544
- if (/^\s*graph/.test(txt) && config?.flowchart?.defaultRenderer === "dagre-wrapper") {
545
- return true;
546
- }
547
- return /^\s*flowchart/.test(txt);
548
- }, "detector");
549
- var loader3 = /* @__PURE__ */ __name(async () => {
550
- const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
551
- return { id: id3, diagram: diagram2 };
552
- }, "loader");
553
- var plugin3 = {
554
- id: id3,
555
- detector: detector3,
556
- loader: loader3
557
- };
558
- var flowDetector_v2_default = plugin3;
559
- var id4 = "er";
560
- var detector4 = /* @__PURE__ */ __name((txt) => {
561
- return /^\s*erDiagram/.test(txt);
562
- }, "detector");
563
- var loader4 = /* @__PURE__ */ __name(async () => {
564
- const { diagram: diagram2 } = await import("./erDiagram-6RL3IURR-HQULDVJI.js");
565
- return { id: id4, diagram: diagram2 };
566
- }, "loader");
567
- var plugin4 = {
568
- id: id4,
569
- detector: detector4,
570
- loader: loader4
571
- };
572
- var erDetector_default = plugin4;
573
- var id5 = "gitGraph";
574
- var detector5 = /* @__PURE__ */ __name((txt) => {
575
- return /^\s*gitGraph/.test(txt);
576
- }, "detector");
577
- var loader5 = /* @__PURE__ */ __name(async () => {
578
- const { diagram: diagram2 } = await import("./gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js");
579
- return { id: id5, diagram: diagram2 };
580
- }, "loader");
581
- var plugin5 = {
582
- id: id5,
583
- detector: detector5,
584
- loader: loader5
585
- };
586
- var gitGraphDetector_default = plugin5;
587
- var id6 = "gantt";
588
- var detector6 = /* @__PURE__ */ __name((txt) => {
589
- return /^\s*gantt/.test(txt);
590
- }, "detector");
591
- var loader6 = /* @__PURE__ */ __name(async () => {
592
- const { diagram: diagram2 } = await import("./ganttDiagram-NTVNEXSI-V66YQQB3.js");
593
- return { id: id6, diagram: diagram2 };
594
- }, "loader");
595
- var plugin6 = {
596
- id: id6,
597
- detector: detector6,
598
- loader: loader6
599
- };
600
- var ganttDetector_default = plugin6;
601
- var id7 = "info";
602
- var detector7 = /* @__PURE__ */ __name((txt) => {
603
- return /^\s*info/.test(txt);
604
- }, "detector");
605
- var loader7 = /* @__PURE__ */ __name(async () => {
606
- const { diagram: diagram2 } = await import("./infoDiagram-A4XQUW5V-UZERSQDI.js");
607
- return { id: id7, diagram: diagram2 };
608
- }, "loader");
609
- var info = {
610
- id: id7,
611
- detector: detector7,
612
- loader: loader7
613
- };
614
- var id8 = "pie";
615
- var detector8 = /* @__PURE__ */ __name((txt) => {
616
- return /^\s*pie/.test(txt);
617
- }, "detector");
618
- var loader8 = /* @__PURE__ */ __name(async () => {
619
- const { diagram: diagram2 } = await import("./pieDiagram-YF2LJOPJ-IXEVHPCM.js");
620
- return { id: id8, diagram: diagram2 };
621
- }, "loader");
622
- var pie = {
623
- id: id8,
624
- detector: detector8,
625
- loader: loader8
626
- };
627
- var id9 = "quadrantChart";
628
- var detector9 = /* @__PURE__ */ __name((txt) => {
629
- return /^\s*quadrantChart/.test(txt);
630
- }, "detector");
631
- var loader9 = /* @__PURE__ */ __name(async () => {
632
- const { diagram: diagram2 } = await import("./quadrantDiagram-OS5C2QUG-MW26UCZV.js");
633
- return { id: id9, diagram: diagram2 };
634
- }, "loader");
635
- var plugin7 = {
636
- id: id9,
637
- detector: detector9,
638
- loader: loader9
639
- };
640
- var quadrantDetector_default = plugin7;
641
- var id10 = "xychart";
642
- var detector10 = /* @__PURE__ */ __name((txt) => {
643
- return /^\s*xychart-beta/.test(txt);
644
- }, "detector");
645
- var loader10 = /* @__PURE__ */ __name(async () => {
646
- const { diagram: diagram2 } = await import("./xychartDiagram-6QU3TZC5-BFFLEHUP.js");
647
- return { id: id10, diagram: diagram2 };
648
- }, "loader");
649
- var plugin8 = {
650
- id: id10,
651
- detector: detector10,
652
- loader: loader10
653
- };
654
- var xychartDetector_default = plugin8;
655
- var id11 = "requirement";
656
- var detector11 = /* @__PURE__ */ __name((txt) => {
657
- return /^\s*requirement(Diagram)?/.test(txt);
658
- }, "detector");
659
- var loader11 = /* @__PURE__ */ __name(async () => {
660
- const { diagram: diagram2 } = await import("./requirementDiagram-MIRIMTAZ-BX24AAHL.js");
661
- return { id: id11, diagram: diagram2 };
662
- }, "loader");
663
- var plugin9 = {
664
- id: id11,
665
- detector: detector11,
666
- loader: loader11
667
- };
668
- var requirementDetector_default = plugin9;
669
- var id12 = "sequence";
670
- var detector12 = /* @__PURE__ */ __name((txt) => {
671
- return /^\s*sequenceDiagram/.test(txt);
672
- }, "detector");
673
- var loader12 = /* @__PURE__ */ __name(async () => {
674
- const { diagram: diagram2 } = await import("./sequenceDiagram-G6AWOVSC-2T3JBUZ2.js");
675
- return { id: id12, diagram: diagram2 };
676
- }, "loader");
677
- var plugin10 = {
678
- id: id12,
679
- detector: detector12,
680
- loader: loader12
681
- };
682
- var sequenceDetector_default = plugin10;
683
- var id13 = "class";
684
- var detector13 = /* @__PURE__ */ __name((txt, config) => {
685
- if (config?.class?.defaultRenderer === "dagre-wrapper") {
686
- return false;
687
- }
688
- return /^\s*classDiagram/.test(txt);
689
- }, "detector");
690
- var loader13 = /* @__PURE__ */ __name(async () => {
691
- const { diagram: diagram2 } = await import("./classDiagram-LNE6IOMH-VRQHEQWM.js");
692
- return { id: id13, diagram: diagram2 };
693
- }, "loader");
694
- var plugin11 = {
695
- id: id13,
696
- detector: detector13,
697
- loader: loader13
698
- };
699
- var classDetector_default = plugin11;
700
- var id14 = "classDiagram";
701
- var detector14 = /* @__PURE__ */ __name((txt, config) => {
702
- if (/^\s*classDiagram/.test(txt) && config?.class?.defaultRenderer === "dagre-wrapper") {
703
- return true;
704
- }
705
- return /^\s*classDiagram-v2/.test(txt);
706
- }, "detector");
707
- var loader14 = /* @__PURE__ */ __name(async () => {
708
- const { diagram: diagram2 } = await import("./classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js");
709
- return { id: id14, diagram: diagram2 };
710
- }, "loader");
711
- var plugin12 = {
712
- id: id14,
713
- detector: detector14,
714
- loader: loader14
715
- };
716
- var classDetector_V2_default = plugin12;
717
- var id15 = "state";
718
- var detector15 = /* @__PURE__ */ __name((txt, config) => {
719
- if (config?.state?.defaultRenderer === "dagre-wrapper") {
720
- return false;
721
- }
722
- return /^\s*stateDiagram/.test(txt);
723
- }, "detector");
724
- var loader15 = /* @__PURE__ */ __name(async () => {
725
- const { diagram: diagram2 } = await import("./stateDiagram-MAYHULR4-HZ5EGLPA.js");
726
- return { id: id15, diagram: diagram2 };
727
- }, "loader");
728
- var plugin13 = {
729
- id: id15,
730
- detector: detector15,
731
- loader: loader15
732
- };
733
- var stateDetector_default = plugin13;
734
- var id16 = "stateDiagram";
735
- var detector16 = /* @__PURE__ */ __name((txt, config) => {
736
- if (/^\s*stateDiagram-v2/.test(txt)) {
737
- return true;
738
- }
739
- if (/^\s*stateDiagram/.test(txt) && config?.state?.defaultRenderer === "dagre-wrapper") {
740
- return true;
741
- }
742
- return false;
743
- }, "detector");
744
- var loader16 = /* @__PURE__ */ __name(async () => {
745
- const { diagram: diagram2 } = await import("./stateDiagram-v2-4JROLMXI-DN2FEZV3.js");
746
- return { id: id16, diagram: diagram2 };
747
- }, "loader");
748
- var plugin14 = {
749
- id: id16,
750
- detector: detector16,
751
- loader: loader16
752
- };
753
- var stateDetector_V2_default = plugin14;
754
- var id17 = "journey";
755
- var detector17 = /* @__PURE__ */ __name((txt) => {
756
- return /^\s*journey/.test(txt);
757
- }, "detector");
758
- var loader17 = /* @__PURE__ */ __name(async () => {
759
- const { diagram: diagram2 } = await import("./journeyDiagram-G5WM74LC-RVKMRGRW.js");
760
- return { id: id17, diagram: diagram2 };
761
- }, "loader");
762
- var plugin15 = {
763
- id: id17,
764
- detector: detector17,
765
- loader: loader17
766
- };
767
- var journeyDetector_default = plugin15;
768
- var draw = /* @__PURE__ */ __name((_text, id26, version2) => {
769
- log.debug("rendering svg for syntax error\n");
770
- const svg = selectSvgElement(id26);
771
- const g = svg.append("g");
772
- svg.attr("viewBox", "0 0 2412 512");
773
- configureSvgSize(svg, 100, 512, true);
774
- g.append("path").attr("class", "error-icon").attr(
775
- "d",
776
- "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"
777
- );
778
- g.append("path").attr("class", "error-icon").attr(
779
- "d",
780
- "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"
781
- );
782
- g.append("path").attr("class", "error-icon").attr(
783
- "d",
784
- "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"
785
- );
786
- g.append("path").attr("class", "error-icon").attr(
787
- "d",
788
- "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"
789
- );
790
- g.append("path").attr("class", "error-icon").attr(
791
- "d",
792
- "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"
793
- );
794
- g.append("path").attr("class", "error-icon").attr(
795
- "d",
796
- "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"
797
- );
798
- g.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text");
799
- g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${version2}`);
800
- }, "draw");
801
- var renderer = { draw };
802
- var errorRenderer_default = renderer;
803
- var diagram = {
804
- db: {},
805
- renderer,
806
- parser: {
807
- parse: /* @__PURE__ */ __name(() => {
808
- return;
809
- }, "parse")
810
- }
811
- };
812
- var errorDiagram_default = diagram;
813
- var id18 = "flowchart-elk";
814
- var detector18 = /* @__PURE__ */ __name((txt, config = {}) => {
815
- if (
816
- // If diagram explicitly states flowchart-elk
817
- /^\s*flowchart-elk/.test(txt) || // If a flowchart/graph diagram has their default renderer set to elk
818
- /^\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === "elk"
819
- ) {
820
- config.layout = "elk";
821
- return true;
822
- }
823
- return false;
824
- }, "detector");
825
- var loader18 = /* @__PURE__ */ __name(async () => {
826
- const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
827
- return { id: id18, diagram: diagram2 };
828
- }, "loader");
829
- var plugin16 = {
830
- id: id18,
831
- detector: detector18,
832
- loader: loader18
833
- };
834
- var detector_default = plugin16;
835
- var id19 = "timeline";
836
- var detector19 = /* @__PURE__ */ __name((txt) => {
837
- return /^\s*timeline/.test(txt);
838
- }, "detector");
839
- var loader19 = /* @__PURE__ */ __name(async () => {
840
- const { diagram: diagram2 } = await import("./timeline-definition-U7ZMHBDA-GB6AKKW4.js");
841
- return { id: id19, diagram: diagram2 };
842
- }, "loader");
843
- var plugin17 = {
844
- id: id19,
845
- detector: detector19,
846
- loader: loader19
847
- };
848
- var detector_default2 = plugin17;
849
- var id20 = "mindmap";
850
- var detector20 = /* @__PURE__ */ __name((txt) => {
851
- return /^\s*mindmap/.test(txt);
852
- }, "detector");
853
- var loader20 = /* @__PURE__ */ __name(async () => {
854
- const { diagram: diagram2 } = await import("./mindmap-definition-GWI6TPTV-MISEH6LG.js");
855
- return { id: id20, diagram: diagram2 };
856
- }, "loader");
857
- var plugin18 = {
858
- id: id20,
859
- detector: detector20,
860
- loader: loader20
861
- };
862
- var detector_default3 = plugin18;
863
- var id21 = "kanban";
864
- var detector21 = /* @__PURE__ */ __name((txt) => {
865
- return /^\s*kanban/.test(txt);
866
- }, "detector");
867
- var loader21 = /* @__PURE__ */ __name(async () => {
868
- const { diagram: diagram2 } = await import("./kanban-definition-QRCXZQQD-NWU5I3TK.js");
869
- return { id: id21, diagram: diagram2 };
870
- }, "loader");
871
- var plugin19 = {
872
- id: id21,
873
- detector: detector21,
874
- loader: loader21
875
- };
876
- var detector_default4 = plugin19;
877
- var id22 = "sankey";
878
- var detector22 = /* @__PURE__ */ __name((txt) => {
879
- return /^\s*sankey-beta/.test(txt);
880
- }, "detector");
881
- var loader22 = /* @__PURE__ */ __name(async () => {
882
- const { diagram: diagram2 } = await import("./sankeyDiagram-Y46BX6SQ-5RKUGG63.js");
883
- return { id: id22, diagram: diagram2 };
884
- }, "loader");
885
- var plugin20 = {
886
- id: id22,
887
- detector: detector22,
888
- loader: loader22
889
- };
890
- var sankeyDetector_default = plugin20;
891
- var id23 = "packet";
892
- var detector23 = /* @__PURE__ */ __name((txt) => {
893
- return /^\s*packet-beta/.test(txt);
894
- }, "detector");
895
- var loader23 = /* @__PURE__ */ __name(async () => {
896
- const { diagram: diagram2 } = await import("./diagram-QW4FP2JN-J2YMUPB5.js");
897
- return { id: id23, diagram: diagram2 };
898
- }, "loader");
899
- var packet = {
900
- id: id23,
901
- detector: detector23,
902
- loader: loader23
903
- };
904
- var id24 = "block";
905
- var detector24 = /* @__PURE__ */ __name((txt) => {
906
- return /^\s*block-beta/.test(txt);
907
- }, "detector");
908
- var loader24 = /* @__PURE__ */ __name(async () => {
909
- const { diagram: diagram2 } = await import("./blockDiagram-ZHA2E4KO-OAYYKCLF.js");
910
- return { id: id24, diagram: diagram2 };
911
- }, "loader");
912
- var plugin21 = {
913
- id: id24,
914
- detector: detector24,
915
- loader: loader24
916
- };
917
- var blockDetector_default = plugin21;
918
- var id25 = "architecture";
919
- var detector25 = /* @__PURE__ */ __name((txt) => {
920
- return /^\s*architecture/.test(txt);
921
- }, "detector");
922
- var loader25 = /* @__PURE__ */ __name(async () => {
923
- const { diagram: diagram2 } = await import("./architectureDiagram-UYN6MBPD-HXPGIDN7.js");
924
- return { id: id25, diagram: diagram2 };
925
- }, "loader");
926
- var architecture = {
927
- id: id25,
928
- detector: detector25,
929
- loader: loader25
930
- };
931
- var architectureDetector_default = architecture;
932
- var hasLoadedDiagrams = false;
933
- var addDiagrams = /* @__PURE__ */ __name(() => {
934
- if (hasLoadedDiagrams) {
935
- return;
936
- }
937
- hasLoadedDiagrams = true;
938
- registerDiagram("error", errorDiagram_default, (text) => {
939
- return text.toLowerCase().trim() === "error";
940
- });
941
- registerDiagram(
942
- "---",
943
- // --- diagram type may appear if YAML front-matter is not parsed correctly
944
- {
945
- db: {
946
- clear: /* @__PURE__ */ __name(() => {
947
- }, "clear")
948
- },
949
- styles: {},
950
- // should never be used
951
- renderer: {
952
- draw: /* @__PURE__ */ __name(() => {
953
- }, "draw")
954
- },
955
- parser: {
956
- parse: /* @__PURE__ */ __name(() => {
957
- throw new Error(
958
- "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"
959
- );
960
- }, "parse")
961
- },
962
- init: /* @__PURE__ */ __name(() => null, "init")
963
- // no op
964
- },
965
- (text) => {
966
- return text.toLowerCase().trimStart().startsWith("---");
967
- }
968
- );
969
- registerLazyLoadedDiagrams(
970
- c4Detector_default,
971
- detector_default4,
972
- classDetector_V2_default,
973
- classDetector_default,
974
- erDetector_default,
975
- ganttDetector_default,
976
- info,
977
- pie,
978
- requirementDetector_default,
979
- sequenceDetector_default,
980
- detector_default,
981
- flowDetector_v2_default,
982
- flowDetector_default,
983
- detector_default3,
984
- detector_default2,
985
- gitGraphDetector_default,
986
- stateDetector_V2_default,
987
- stateDetector_default,
988
- journeyDetector_default,
989
- quadrantDetector_default,
990
- sankeyDetector_default,
991
- packet,
992
- xychartDetector_default,
993
- blockDetector_default,
994
- architectureDetector_default
995
- );
996
- }, "addDiagrams");
997
- var loadRegisteredDiagrams = /* @__PURE__ */ __name(async () => {
998
- log.debug(`Loading registered diagrams`);
999
- const results = await Promise.allSettled(
1000
- Object.entries(detectors).map(async ([key, { detector: detector26, loader: loader26 }]) => {
1001
- if (loader26) {
1002
- try {
1003
- getDiagram(key);
1004
- } catch {
1005
- try {
1006
- const { diagram: diagram2, id: id26 } = await loader26();
1007
- registerDiagram(id26, diagram2, detector26);
1008
- } catch (err) {
1009
- log.error(`Failed to load external diagram with key ${key}. Removing from detectors.`);
1010
- delete detectors[key];
1011
- throw err;
1012
- }
1013
- }
1014
- }
1015
- })
1016
- );
1017
- const failed = results.filter((result) => result.status === "rejected");
1018
- if (failed.length > 0) {
1019
- log.error(`Failed to load ${failed.length} external diagrams`);
1020
- for (const res of failed) {
1021
- log.error(res);
1022
- }
1023
- throw new Error(`Failed to load ${failed.length} external diagrams`);
1024
- }
1025
- }, "loadRegisteredDiagrams");
1026
- var SVG_ROLE = "graphics-document document";
1027
- function setA11yDiagramInfo(svg, diagramType) {
1028
- svg.attr("role", SVG_ROLE);
1029
- if (diagramType !== "") {
1030
- svg.attr("aria-roledescription", diagramType);
1031
- }
1032
- }
1033
- __name(setA11yDiagramInfo, "setA11yDiagramInfo");
1034
- function addSVGa11yTitleDescription(svg, a11yTitle, a11yDesc, baseId) {
1035
- if (svg.insert === void 0) {
1036
- return;
1037
- }
1038
- if (a11yDesc) {
1039
- const descId = `chart-desc-${baseId}`;
1040
- svg.attr("aria-describedby", descId);
1041
- svg.insert("desc", ":first-child").attr("id", descId).text(a11yDesc);
1042
- }
1043
- if (a11yTitle) {
1044
- const titleId = `chart-title-${baseId}`;
1045
- svg.attr("aria-labelledby", titleId);
1046
- svg.insert("title", ":first-child").attr("id", titleId).text(a11yTitle);
1047
- }
1048
- }
1049
- __name(addSVGa11yTitleDescription, "addSVGa11yTitleDescription");
1050
- var Diagram = class _Diagram {
1051
- constructor(type, text, db, parser, renderer2) {
1052
- this.type = type;
1053
- this.text = text;
1054
- this.db = db;
1055
- this.parser = parser;
1056
- this.renderer = renderer2;
1057
- }
1058
- static {
1059
- __name(this, "Diagram");
1060
- }
1061
- static async fromText(text, metadata = {}) {
1062
- const config = getConfig();
1063
- const type = detectType(text, config);
1064
- text = encodeEntities(text) + "\n";
1065
- try {
1066
- getDiagram(type);
1067
- } catch {
1068
- const loader26 = getDiagramLoader(type);
1069
- if (!loader26) {
1070
- throw new UnknownDiagramError(`Diagram ${type} not found.`);
1071
- }
1072
- const { id: id26, diagram: diagram2 } = await loader26();
1073
- registerDiagram(id26, diagram2);
1074
- }
1075
- const { db, parser, renderer: renderer2, init: init2 } = getDiagram(type);
1076
- if (parser.parser) {
1077
- parser.parser.yy = db;
1078
- }
1079
- db.clear?.();
1080
- init2?.(config);
1081
- if (metadata.title) {
1082
- db.setDiagramTitle?.(metadata.title);
1083
- }
1084
- await parser.parse(text);
1085
- return new _Diagram(type, text, db, parser, renderer2);
1086
- }
1087
- async render(id26, version2) {
1088
- await this.renderer.draw(this.text, id26, version2, this);
1089
- }
1090
- getParser() {
1091
- return this.parser;
1092
- }
1093
- getType() {
1094
- return this.type;
1095
- }
1096
- };
1097
- var interactionFunctions = [];
1098
- var attachFunctions = /* @__PURE__ */ __name(() => {
1099
- interactionFunctions.forEach((f) => {
1100
- f();
1101
- });
1102
- interactionFunctions = [];
1103
- }, "attachFunctions");
1104
- var cleanupComments = /* @__PURE__ */ __name((text) => {
1105
- return text.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart();
1106
- }, "cleanupComments");
1107
- function extractFrontMatter(text) {
1108
- const matches = text.match(frontMatterRegex);
1109
- if (!matches) {
1110
- return {
1111
- text,
1112
- metadata: {}
1113
- };
1114
- }
1115
- let parsed = load(matches[1], {
1116
- // To support config, we need JSON schema.
1117
- // https://www.yaml.org/spec/1.2/spec.html#id2803231
1118
- schema: JSON_SCHEMA
1119
- }) ?? {};
1120
- parsed = typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
1121
- const metadata = {};
1122
- if (parsed.displayMode) {
1123
- metadata.displayMode = parsed.displayMode.toString();
1124
- }
1125
- if (parsed.title) {
1126
- metadata.title = parsed.title.toString();
1127
- }
1128
- if (parsed.config) {
1129
- metadata.config = parsed.config;
1130
- }
1131
- return {
1132
- text: text.slice(matches[0].length),
1133
- metadata
1134
- };
1135
- }
1136
- __name(extractFrontMatter, "extractFrontMatter");
1137
- var cleanupText = /* @__PURE__ */ __name((code) => {
1138
- return code.replace(/\r\n?/g, "\n").replace(
1139
- /<(\w+)([^>]*)>/g,
1140
- (match, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">"
1141
- );
1142
- }, "cleanupText");
1143
- var processFrontmatter = /* @__PURE__ */ __name((code) => {
1144
- const { text, metadata } = extractFrontMatter(code);
1145
- const { displayMode, title, config = {} } = metadata;
1146
- if (displayMode) {
1147
- if (!config.gantt) {
1148
- config.gantt = {};
1149
- }
1150
- config.gantt.displayMode = displayMode;
1151
- }
1152
- return { title, config, text };
1153
- }, "processFrontmatter");
1154
- var processDirectives = /* @__PURE__ */ __name((code) => {
1155
- const initDirective = utils_default.detectInit(code) ?? {};
1156
- const wrapDirectives = utils_default.detectDirective(code, "wrap");
1157
- if (Array.isArray(wrapDirectives)) {
1158
- initDirective.wrap = wrapDirectives.some(({ type }) => type === "wrap");
1159
- } else if (wrapDirectives?.type === "wrap") {
1160
- initDirective.wrap = true;
1161
- }
1162
- return {
1163
- text: removeDirectives(code),
1164
- directive: initDirective
1165
- };
1166
- }, "processDirectives");
1167
- function preprocessDiagram(code) {
1168
- const cleanedCode = cleanupText(code);
1169
- const frontMatterResult = processFrontmatter(cleanedCode);
1170
- const directiveResult = processDirectives(frontMatterResult.text);
1171
- const config = cleanAndMerge(frontMatterResult.config, directiveResult.directive);
1172
- code = cleanupComments(directiveResult.text);
1173
- return {
1174
- code,
1175
- title: frontMatterResult.title,
1176
- config
1177
- };
1178
- }
1179
- __name(preprocessDiagram, "preprocessDiagram");
1180
- function toBase64(str) {
1181
- const utf8Bytes = new TextEncoder().encode(str);
1182
- const utf8Str = Array.from(utf8Bytes, (byte) => String.fromCodePoint(byte)).join("");
1183
- return btoa(utf8Str);
1184
- }
1185
- __name(toBase64, "toBase64");
1186
- var MAX_TEXTLENGTH = 5e4;
1187
- var MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa";
1188
- var SECURITY_LVL_SANDBOX = "sandbox";
1189
- var SECURITY_LVL_LOOSE = "loose";
1190
- var XMLNS_SVG_STD = "http://www.w3.org/2000/svg";
1191
- var XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink";
1192
- var XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml";
1193
- var IFRAME_WIDTH = "100%";
1194
- var IFRAME_HEIGHT = "100%";
1195
- var IFRAME_STYLES = "border:0;margin:0;";
1196
- var IFRAME_BODY_STYLE = "margin:0";
1197
- var IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups";
1198
- var IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.';
1199
- var DOMPURIFY_TAGS = ["foreignobject"];
1200
- var DOMPURIFY_ATTR = ["dominant-baseline"];
1201
- function processAndSetConfigs(text) {
1202
- const processed = preprocessDiagram(text);
1203
- reset();
1204
- addDirective(processed.config ?? {});
1205
- return processed;
1206
- }
1207
- __name(processAndSetConfigs, "processAndSetConfigs");
1208
- async function parse3(text, parseOptions) {
1209
- addDiagrams();
1210
- try {
1211
- const { code, config } = processAndSetConfigs(text);
1212
- const diagram2 = await getDiagramFromText(code);
1213
- return { diagramType: diagram2.type, config };
1214
- } catch (error) {
1215
- if (parseOptions?.suppressErrors) {
1216
- return false;
1217
- }
1218
- throw error;
1219
- }
1220
- }
1221
- __name(parse3, "parse");
1222
- var cssImportantStyles = /* @__PURE__ */ __name((cssClass, element, cssClasses = []) => {
1223
- return `
1224
- .${cssClass} ${element} { ${cssClasses.join(" !important; ")} !important; }`;
1225
- }, "cssImportantStyles");
1226
- var createCssStyles = /* @__PURE__ */ __name((config, classDefs = /* @__PURE__ */ new Map()) => {
1227
- let cssStyles = "";
1228
- if (config.themeCSS !== void 0) {
1229
- cssStyles += `
1230
- ${config.themeCSS}`;
1231
- }
1232
- if (config.fontFamily !== void 0) {
1233
- cssStyles += `
1234
- :root { --mermaid-font-family: ${config.fontFamily}}`;
1235
- }
1236
- if (config.altFontFamily !== void 0) {
1237
- cssStyles += `
1238
- :root { --mermaid-alt-font-family: ${config.altFontFamily}}`;
1239
- }
1240
- if (classDefs instanceof Map) {
1241
- const htmlLabels = config.htmlLabels ?? config.flowchart?.htmlLabels;
1242
- const cssHtmlElements = ["> *", "span"];
1243
- const cssShapeElements = ["rect", "polygon", "ellipse", "circle", "path"];
1244
- const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements;
1245
- classDefs.forEach((styleClassDef) => {
1246
- if (!isEmpty_default(styleClassDef.styles)) {
1247
- cssElements.forEach((cssElement) => {
1248
- cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles);
1249
- });
1250
- }
1251
- if (!isEmpty_default(styleClassDef.textStyles)) {
1252
- cssStyles += cssImportantStyles(
1253
- styleClassDef.id,
1254
- "tspan",
1255
- (styleClassDef?.textStyles || []).map((s) => s.replace("color", "fill"))
1256
- );
1257
- }
1258
- });
1259
- }
1260
- return cssStyles;
1261
- }, "createCssStyles");
1262
- var createUserStyles = /* @__PURE__ */ __name((config, graphType, classDefs, svgId) => {
1263
- const userCSSstyles = createCssStyles(config, classDefs);
1264
- const allStyles = styles_default(graphType, userCSSstyles, config.themeVariables);
1265
- return serialize(compile(`${svgId}{${allStyles}}`), stringify);
1266
- }, "createUserStyles");
1267
- var cleanUpSvgCode = /* @__PURE__ */ __name((svgCode = "", inSandboxMode, useArrowMarkerUrls) => {
1268
- let cleanedUpSvg = svgCode;
1269
- if (!useArrowMarkerUrls && !inSandboxMode) {
1270
- cleanedUpSvg = cleanedUpSvg.replace(
1271
- /marker-end="url\([\d+./:=?A-Za-z-]*?#/g,
1272
- 'marker-end="url(#'
1273
- );
1274
- }
1275
- cleanedUpSvg = decodeEntities(cleanedUpSvg);
1276
- cleanedUpSvg = cleanedUpSvg.replace(/<br>/g, "<br/>");
1277
- return cleanedUpSvg;
1278
- }, "cleanUpSvgCode");
1279
- var putIntoIFrame = /* @__PURE__ */ __name((svgCode = "", svgElement) => {
1280
- const height = svgElement?.viewBox?.baseVal?.height ? svgElement.viewBox.baseVal.height + "px" : IFRAME_HEIGHT;
1281
- const base64encodedSrc = toBase64(`<body style="${IFRAME_BODY_STYLE}">${svgCode}</body>`);
1282
- return `<iframe style="width:${IFRAME_WIDTH};height:${height};${IFRAME_STYLES}" src="data:text/html;charset=UTF-8;base64,${base64encodedSrc}" sandbox="${IFRAME_SANDBOX_OPTS}">
1283
- ${IFRAME_NOT_SUPPORTED_MSG}
1284
- </iframe>`;
1285
- }, "putIntoIFrame");
1286
- var appendDivSvgG = /* @__PURE__ */ __name((parentRoot, id26, enclosingDivId, divStyle, svgXlink) => {
1287
- const enclosingDiv = parentRoot.append("div");
1288
- enclosingDiv.attr("id", enclosingDivId);
1289
- if (divStyle) {
1290
- enclosingDiv.attr("style", divStyle);
1291
- }
1292
- const svgNode = enclosingDiv.append("svg").attr("id", id26).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD);
1293
- if (svgXlink) {
1294
- svgNode.attr("xmlns:xlink", svgXlink);
1295
- }
1296
- svgNode.append("g");
1297
- return parentRoot;
1298
- }, "appendDivSvgG");
1299
- function sandboxedIframe(parentNode, iFrameId) {
1300
- return parentNode.append("iframe").attr("id", iFrameId).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
1301
- }
1302
- __name(sandboxedIframe, "sandboxedIframe");
1303
- var removeExistingElements = /* @__PURE__ */ __name((doc, id26, divId, iFrameId) => {
1304
- doc.getElementById(id26)?.remove();
1305
- doc.getElementById(divId)?.remove();
1306
- doc.getElementById(iFrameId)?.remove();
1307
- }, "removeExistingElements");
1308
- var render = /* @__PURE__ */ __name(async function(id26, text, svgContainingElement) {
1309
- addDiagrams();
1310
- const processed = processAndSetConfigs(text);
1311
- text = processed.code;
1312
- const config = getConfig();
1313
- log.debug(config);
1314
- if (text.length > (config?.maxTextSize ?? MAX_TEXTLENGTH)) {
1315
- text = MAX_TEXTLENGTH_EXCEEDED_MSG;
1316
- }
1317
- const idSelector = "#" + id26;
1318
- const iFrameID = "i" + id26;
1319
- const iFrameID_selector = "#" + iFrameID;
1320
- const enclosingDivID = "d" + id26;
1321
- const enclosingDivID_selector = "#" + enclosingDivID;
1322
- const removeTempElements = /* @__PURE__ */ __name(() => {
1323
- const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector;
1324
- const node2 = select_default(tmpElementSelector).node();
1325
- if (node2 && "remove" in node2) {
1326
- node2.remove();
1327
- }
1328
- }, "removeTempElements");
1329
- let root = select_default("body");
1330
- const isSandboxed = config.securityLevel === SECURITY_LVL_SANDBOX;
1331
- const isLooseSecurityLevel = config.securityLevel === SECURITY_LVL_LOOSE;
1332
- const fontFamily = config.fontFamily;
1333
- if (svgContainingElement !== void 0) {
1334
- if (svgContainingElement) {
1335
- svgContainingElement.innerHTML = "";
1336
- }
1337
- if (isSandboxed) {
1338
- const iframe = sandboxedIframe(select_default(svgContainingElement), iFrameID);
1339
- root = select_default(iframe.nodes()[0].contentDocument.body);
1340
- root.node().style.margin = 0;
1341
- } else {
1342
- root = select_default(svgContainingElement);
1343
- }
1344
- appendDivSvgG(root, id26, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD);
1345
- } else {
1346
- removeExistingElements(document, id26, enclosingDivID, iFrameID);
1347
- if (isSandboxed) {
1348
- const iframe = sandboxedIframe(select_default("body"), iFrameID);
1349
- root = select_default(iframe.nodes()[0].contentDocument.body);
1350
- root.node().style.margin = 0;
1351
- } else {
1352
- root = select_default("body");
1353
- }
1354
- appendDivSvgG(root, id26, enclosingDivID);
1355
- }
1356
- let diag;
1357
- let parseEncounteredException;
1358
- try {
1359
- diag = await Diagram.fromText(text, { title: processed.title });
1360
- } catch (error) {
1361
- if (config.suppressErrorRendering) {
1362
- removeTempElements();
1363
- throw error;
1364
- }
1365
- diag = await Diagram.fromText("error");
1366
- parseEncounteredException = error;
1367
- }
1368
- const element = root.select(enclosingDivID_selector).node();
1369
- const diagramType = diag.type;
1370
- const svg = element.firstChild;
1371
- const firstChild = svg.firstChild;
1372
- const diagramClassDefs = diag.renderer.getClasses?.(text, diag);
1373
- const rules = createUserStyles(config, diagramType, diagramClassDefs, idSelector);
1374
- const style1 = document.createElement("style");
1375
- style1.innerHTML = rules;
1376
- svg.insertBefore(style1, firstChild);
1377
- try {
1378
- await diag.renderer.draw(text, id26, version, diag);
1379
- } catch (e) {
1380
- if (config.suppressErrorRendering) {
1381
- removeTempElements();
1382
- } else {
1383
- errorRenderer_default.draw(text, id26, version);
1384
- }
1385
- throw e;
1386
- }
1387
- const svgNode = root.select(`${enclosingDivID_selector} svg`);
1388
- const a11yTitle = diag.db.getAccTitle?.();
1389
- const a11yDescr = diag.db.getAccDescription?.();
1390
- addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr);
1391
- root.select(`[id="${id26}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD);
1392
- let svgCode = root.select(enclosingDivID_selector).node().innerHTML;
1393
- log.debug("config.arrowMarkerAbsolute", config.arrowMarkerAbsolute);
1394
- svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config.arrowMarkerAbsolute));
1395
- if (isSandboxed) {
1396
- const svgEl = root.select(enclosingDivID_selector + " svg").node();
1397
- svgCode = putIntoIFrame(svgCode, svgEl);
1398
- } else if (!isLooseSecurityLevel) {
1399
- svgCode = purify.sanitize(svgCode, {
1400
- ADD_TAGS: DOMPURIFY_TAGS,
1401
- ADD_ATTR: DOMPURIFY_ATTR,
1402
- HTML_INTEGRATION_POINTS: { foreignobject: true }
1403
- });
1404
- }
1405
- attachFunctions();
1406
- if (parseEncounteredException) {
1407
- throw parseEncounteredException;
1408
- }
1409
- removeTempElements();
1410
- return {
1411
- diagramType,
1412
- svg: svgCode,
1413
- bindFunctions: diag.db.bindFunctions
1414
- };
1415
- }, "render");
1416
- function initialize(userOptions = {}) {
1417
- const options = assignWithDepth_default({}, userOptions);
1418
- if (options?.fontFamily && !options.themeVariables?.fontFamily) {
1419
- if (!options.themeVariables) {
1420
- options.themeVariables = {};
1421
- }
1422
- options.themeVariables.fontFamily = options.fontFamily;
1423
- }
1424
- saveConfigFromInitialize(options);
1425
- if (options?.theme && options.theme in themes_default) {
1426
- options.themeVariables = themes_default[options.theme].getThemeVariables(
1427
- options.themeVariables
1428
- );
1429
- } else if (options) {
1430
- options.themeVariables = themes_default.default.getThemeVariables(options.themeVariables);
1431
- }
1432
- const config = typeof options === "object" ? setSiteConfig(options) : getSiteConfig();
1433
- setLogLevel(config.logLevel);
1434
- addDiagrams();
1435
- }
1436
- __name(initialize, "initialize");
1437
- var getDiagramFromText = /* @__PURE__ */ __name((text, metadata = {}) => {
1438
- const { code } = preprocessDiagram(text);
1439
- return Diagram.fromText(code, metadata);
1440
- }, "getDiagramFromText");
1441
- function addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr) {
1442
- setA11yDiagramInfo(svgNode, diagramType);
1443
- addSVGa11yTitleDescription(svgNode, a11yTitle, a11yDescr, svgNode.attr("id"));
1444
- }
1445
- __name(addA11yInfo, "addA11yInfo");
1446
- var mermaidAPI = Object.freeze({
1447
- render,
1448
- parse: parse3,
1449
- getDiagramFromText,
1450
- initialize,
1451
- getConfig,
1452
- setConfig,
1453
- getSiteConfig,
1454
- updateSiteConfig,
1455
- reset: /* @__PURE__ */ __name(() => {
1456
- reset();
1457
- }, "reset"),
1458
- globalReset: /* @__PURE__ */ __name(() => {
1459
- reset(defaultConfig);
1460
- }, "globalReset"),
1461
- defaultConfig
1462
- });
1463
- setLogLevel(getConfig().logLevel);
1464
- reset(getConfig());
1465
- var handleError = /* @__PURE__ */ __name((error, errors, parseError) => {
1466
- log.warn(error);
1467
- if (isDetailedError(error)) {
1468
- if (parseError) {
1469
- parseError(error.str, error.hash);
1470
- }
1471
- errors.push({ ...error, message: error.str, error });
1472
- } else {
1473
- if (parseError) {
1474
- parseError(error);
1475
- }
1476
- if (error instanceof Error) {
1477
- errors.push({
1478
- str: error.message,
1479
- message: error.message,
1480
- hash: error.name,
1481
- error
1482
- });
1483
- }
1484
- }
1485
- }, "handleError");
1486
- var run = /* @__PURE__ */ __name(async function(options = {
1487
- querySelector: ".mermaid"
1488
- }) {
1489
- try {
1490
- await runThrowsErrors(options);
1491
- } catch (e) {
1492
- if (isDetailedError(e)) {
1493
- log.error(e.str);
1494
- }
1495
- if (mermaid.parseError) {
1496
- mermaid.parseError(e);
1497
- }
1498
- if (!options.suppressErrors) {
1499
- log.error("Use the suppressErrors option to suppress these errors");
1500
- throw e;
1501
- }
1502
- }
1503
- }, "run");
1504
- var runThrowsErrors = /* @__PURE__ */ __name(async function({ postRenderCallback, querySelector, nodes } = {
1505
- querySelector: ".mermaid"
1506
- }) {
1507
- const conf = mermaidAPI.getConfig();
1508
- log.debug(`${!postRenderCallback ? "No " : ""}Callback function found`);
1509
- let nodesToProcess;
1510
- if (nodes) {
1511
- nodesToProcess = nodes;
1512
- } else if (querySelector) {
1513
- nodesToProcess = document.querySelectorAll(querySelector);
1514
- } else {
1515
- throw new Error("Nodes and querySelector are both undefined");
1516
- }
1517
- log.debug(`Found ${nodesToProcess.length} diagrams`);
1518
- if (conf?.startOnLoad !== void 0) {
1519
- log.debug("Start On Load: " + conf?.startOnLoad);
1520
- mermaidAPI.updateSiteConfig({ startOnLoad: conf?.startOnLoad });
1521
- }
1522
- const idGenerator = new utils_default.InitIDGenerator(conf.deterministicIds, conf.deterministicIDSeed);
1523
- let txt;
1524
- const errors = [];
1525
- for (const element of Array.from(nodesToProcess)) {
1526
- log.info("Rendering diagram: " + element.id);
1527
- if (element.getAttribute("data-processed")) {
1528
- continue;
1529
- }
1530
- element.setAttribute("data-processed", "true");
1531
- const id26 = `mermaid-${idGenerator.next()}`;
1532
- txt = element.innerHTML;
1533
- txt = dedent(utils_default.entityDecode(txt)).trim().replace(/<br\s*\/?>/gi, "<br/>");
1534
- const init2 = utils_default.detectInit(txt);
1535
- if (init2) {
1536
- log.debug("Detected early reinit: ", init2);
1537
- }
1538
- try {
1539
- const { svg, bindFunctions } = await render2(id26, txt, element);
1540
- element.innerHTML = svg;
1541
- if (postRenderCallback) {
1542
- await postRenderCallback(id26);
1543
- }
1544
- if (bindFunctions) {
1545
- bindFunctions(element);
1546
- }
1547
- } catch (error) {
1548
- handleError(error, errors, mermaid.parseError);
1549
- }
1550
- }
1551
- if (errors.length > 0) {
1552
- throw errors[0];
1553
- }
1554
- }, "runThrowsErrors");
1555
- var initialize2 = /* @__PURE__ */ __name(function(config) {
1556
- mermaidAPI.initialize(config);
1557
- }, "initialize");
1558
- var init = /* @__PURE__ */ __name(async function(config, nodes, callback) {
1559
- log.warn("mermaid.init is deprecated. Please use run instead.");
1560
- if (config) {
1561
- initialize2(config);
1562
- }
1563
- const runOptions = { postRenderCallback: callback, querySelector: ".mermaid" };
1564
- if (typeof nodes === "string") {
1565
- runOptions.querySelector = nodes;
1566
- } else if (nodes) {
1567
- if (nodes instanceof HTMLElement) {
1568
- runOptions.nodes = [nodes];
1569
- } else {
1570
- runOptions.nodes = nodes;
1571
- }
1572
- }
1573
- await run(runOptions);
1574
- }, "init");
1575
- var registerExternalDiagrams = /* @__PURE__ */ __name(async (diagrams, {
1576
- lazyLoad = true
1577
- } = {}) => {
1578
- addDiagrams();
1579
- registerLazyLoadedDiagrams(...diagrams);
1580
- if (lazyLoad === false) {
1581
- await loadRegisteredDiagrams();
1582
- }
1583
- }, "registerExternalDiagrams");
1584
- var contentLoaded = /* @__PURE__ */ __name(function() {
1585
- if (mermaid.startOnLoad) {
1586
- const { startOnLoad } = mermaidAPI.getConfig();
1587
- if (startOnLoad) {
1588
- mermaid.run().catch((err) => log.error("Mermaid failed to initialize", err));
1589
- }
1590
- }
1591
- }, "contentLoaded");
1592
- if (typeof document !== "undefined") {
1593
- window.addEventListener("load", contentLoaded, false);
1594
- }
1595
- var setParseErrorHandler = /* @__PURE__ */ __name(function(parseErrorHandler) {
1596
- mermaid.parseError = parseErrorHandler;
1597
- }, "setParseErrorHandler");
1598
- var executionQueue = [];
1599
- var executionQueueRunning = false;
1600
- var executeQueue = /* @__PURE__ */ __name(async () => {
1601
- if (executionQueueRunning) {
1602
- return;
1603
- }
1604
- executionQueueRunning = true;
1605
- while (executionQueue.length > 0) {
1606
- const f = executionQueue.shift();
1607
- if (f) {
1608
- try {
1609
- await f();
1610
- } catch (e) {
1611
- log.error("Error executing queue", e);
1612
- }
1613
- }
1614
- }
1615
- executionQueueRunning = false;
1616
- }, "executeQueue");
1617
- var parse22 = /* @__PURE__ */ __name(async (text, parseOptions) => {
1618
- return new Promise((resolve, reject) => {
1619
- const performCall = /* @__PURE__ */ __name(() => new Promise((res, rej) => {
1620
- mermaidAPI.parse(text, parseOptions).then(
1621
- (r) => {
1622
- res(r);
1623
- resolve(r);
1624
- },
1625
- (e) => {
1626
- log.error("Error parsing", e);
1627
- mermaid.parseError?.(e);
1628
- rej(e);
1629
- reject(e);
1630
- }
1631
- );
1632
- }), "performCall");
1633
- executionQueue.push(performCall);
1634
- executeQueue().catch(reject);
1635
- });
1636
- }, "parse");
1637
- var render2 = /* @__PURE__ */ __name((id26, text, container) => {
1638
- return new Promise((resolve, reject) => {
1639
- const performCall = /* @__PURE__ */ __name(() => new Promise((res, rej) => {
1640
- mermaidAPI.render(id26, text, container).then(
1641
- (r) => {
1642
- res(r);
1643
- resolve(r);
1644
- },
1645
- (e) => {
1646
- log.error("Error parsing", e);
1647
- mermaid.parseError?.(e);
1648
- rej(e);
1649
- reject(e);
1650
- }
1651
- );
1652
- }), "performCall");
1653
- executionQueue.push(performCall);
1654
- executeQueue().catch(reject);
1655
- });
1656
- }, "render");
1657
- var mermaid = {
1658
- startOnLoad: true,
1659
- mermaidAPI,
1660
- parse: parse22,
1661
- render: render2,
1662
- init,
1663
- run,
1664
- registerExternalDiagrams,
1665
- registerLayoutLoaders,
1666
- initialize: initialize2,
1667
- parseError: void 0,
1668
- contentLoaded,
1669
- setParseErrorHandler,
1670
- detectType,
1671
- registerIconPacks
1672
- };
1673
- var mermaid_default = mermaid;
1674
-
1675
- // components/src/asciidoc/Mermaid.tsx
1676
- import { memo, useId, useState } from "react";
1677
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1678
- mermaid_default.initialize({
1679
- startOnLoad: false,
1680
- theme: "dark"
1681
- });
1682
- var Mermaid = memo(function Mermaid2({ content }) {
1683
- const [showSource, setShowSource] = useState(false);
1684
- const id26 = `mermaid-diagram-${useId().replace(/:/g, "_")}`;
1685
- const mermaidRef = async (node2) => {
1686
- if (node2) {
1687
- const { svg } = await mermaid_default.render(id26, content);
1688
- node2.innerHTML = svg;
1689
- }
1690
- };
1691
- return /* @__PURE__ */ jsxs2(Fragment, { children: [
1692
- /* @__PURE__ */ jsxs2(
1693
- "button",
1694
- {
1695
- className: "absolute right-2 top-2 text-mono-xs text-tertiary",
1696
- onClick: () => setShowSource(!showSource),
1697
- children: [
1698
- showSource ? "Hide" : "Show",
1699
- " Source ",
1700
- /* @__PURE__ */ jsx2("span", { className: "text-quinary", children: "|" }),
1701
- " ",
1702
- "Mermaid"
1703
- ]
1704
- }
1705
- ),
1706
- !showSource ? /* @__PURE__ */ jsx2("code", { ref: mermaidRef, className: "w-full" }) : /* @__PURE__ */ jsx2("code", { children: content })
1707
- ] });
1708
- });
1709
- var Mermaid_default = Mermaid;
1710
-
1711
- // components/src/asciidoc/Listing.tsx
1712
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1713
- var Listing = ({ node: node2 }) => {
1714
- const { document: document2 } = useConverterContext();
1715
- const docAttrs = document2.attributes || {};
1716
- const nowrap = node2.attributes.nowrap || docAttrs["prewrap"] === void 0;
1717
- if (node2.style === "source") {
1718
- const lang = node2.language;
1719
- return /* @__PURE__ */ jsxs3(
1720
- "div",
1721
- {
1722
- className: "listingblock",
1723
- ...node2.lineNumber ? { "data-lineno": node2.lineNumber } : {},
1724
- children: [
1725
- /* @__PURE__ */ jsx3(Title2, { text: node2.title }),
1726
- /* @__PURE__ */ jsx3("div", { className: "content", children: /* @__PURE__ */ jsx3("pre", { className: cn2("highlight", nowrap ? " nowrap" : ""), children: lang && lang === "mermaid" ? /* @__PURE__ */ jsx3(Mermaid_default, { content: node2.content || "" }) : /* @__PURE__ */ jsx3(
1727
- "code",
1728
- {
1729
- className: lang && `language-${lang}`,
1730
- "data-lang": lang || void 0,
1731
- dangerouslySetInnerHTML: {
1732
- __html: node2.content || ""
1733
- }
1734
- }
1735
- ) }) })
1736
- ]
1737
- }
1738
- );
1739
- } else {
1740
- return /* @__PURE__ */ jsxs3(
1741
- "div",
1742
- {
1743
- className: "listingblock",
1744
- ...node2.lineNumber ? { "data-lineno": node2.lineNumber } : {},
1745
- children: [
1746
- /* @__PURE__ */ jsx3(Title2, { text: node2.title }),
1747
- /* @__PURE__ */ jsx3("div", { className: "content", children: /* @__PURE__ */ jsx3(
1748
- "pre",
1749
- {
1750
- className: cn2("highlight !block", nowrap ? "nowrap" : ""),
1751
- dangerouslySetInnerHTML: {
1752
- __html: node2.content || ""
1753
- }
1754
- }
1755
- ) })
1756
- ]
1757
- }
1758
- );
1759
- }
1760
- };
1761
- var Listing_default = Listing;
1762
-
1763
113
  // icons/react/Link16Icon.tsx
1764
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1765
- var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs4(
114
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
115
+ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs2(
1766
116
  "svg",
1767
117
  {
1768
118
  width: 16,
@@ -1773,10 +123,10 @@ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs4(
1773
123
  "aria-labelledby": titleId,
1774
124
  ...props,
1775
125
  children: [
1776
- title ? /* @__PURE__ */ jsx4("title", { id: titleId, children: title }) : null,
1777
- /* @__PURE__ */ jsxs4("g", { fill: "currentColor", children: [
1778
- /* @__PURE__ */ jsx4("path", { d: "m6.586 12.243 1.59-1.591a.75.75 0 0 1 1.061 0l.354.353a.75.75 0 0 1 0 1.06L8 13.658A4 4 0 0 1 2.343 8l1.591-1.591a.75.75 0 0 1 1.06 0l.354.354a.75.75 0 0 1 0 1.06l-1.59 1.591a2 2 0 1 0 2.828 2.829ZM12.066 9.591a.75.75 0 0 1-1.06 0l-.354-.354a.75.75 0 0 1 0-1.06l1.59-1.591a2 2 0 1 0-2.828-2.829l-1.59 1.591a.75.75 0 0 1-1.061 0l-.354-.353a.75.75 0 0 1 0-1.06L8 2.342A4 4 0 0 1 13.657 8l-1.591 1.591Z" }),
1779
- /* @__PURE__ */ jsx4("path", { d: "M9.945 5.702a.75.75 0 0 0-1.061 0L5.702 8.884a.75.75 0 0 0 0 1.06l.353.354a.75.75 0 0 0 1.061 0l3.182-3.182a.75.75 0 0 0 0-1.06l-.353-.354Z" })
126
+ title ? /* @__PURE__ */ jsx2("title", { id: titleId, children: title }) : null,
127
+ /* @__PURE__ */ jsxs2("g", { fill: "currentColor", children: [
128
+ /* @__PURE__ */ jsx2("path", { d: "m6.586 12.243 1.59-1.591a.75.75 0 0 1 1.061 0l.354.353a.75.75 0 0 1 0 1.06L8 13.658A4 4 0 0 1 2.343 8l1.591-1.591a.75.75 0 0 1 1.06 0l.354.354a.75.75 0 0 1 0 1.06l-1.59 1.591a2 2 0 1 0 2.828 2.829ZM12.066 9.591a.75.75 0 0 1-1.06 0l-.354-.354a.75.75 0 0 1 0-1.06l1.59-1.591a2 2 0 1 0-2.828-2.829l-1.59 1.591a.75.75 0 0 1-1.061 0l-.354-.353a.75.75 0 0 1 0-1.06L8 2.342A4 4 0 0 1 13.657 8l-1.591 1.591Z" }),
129
+ /* @__PURE__ */ jsx2("path", { d: "M9.945 5.702a.75.75 0 0 0-1.061 0L5.702 8.884a.75.75 0 0 0 0 1.06l.353.354a.75.75 0 0 0 1.061 0l3.182-3.182a.75.75 0 0 0 0-1.06l-.353-.354Z" })
1780
130
  ] })
1781
131
  ]
1782
132
  }
@@ -1784,12 +134,12 @@ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs4(
1784
134
  var Link16Icon_default = Link16Icon;
1785
135
 
1786
136
  // icons/react/Checkmark12Icon.tsx
1787
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
137
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1788
138
  var Checkmark12Icon = ({
1789
139
  title,
1790
140
  titleId,
1791
141
  ...props
1792
- }) => /* @__PURE__ */ jsxs5(
142
+ }) => /* @__PURE__ */ jsxs3(
1793
143
  "svg",
1794
144
  {
1795
145
  width: 12,
@@ -1800,8 +150,8 @@ var Checkmark12Icon = ({
1800
150
  "aria-labelledby": titleId,
1801
151
  ...props,
1802
152
  children: [
1803
- title ? /* @__PURE__ */ jsx5("title", { id: titleId, children: title }) : null,
1804
- /* @__PURE__ */ jsx5(
153
+ title ? /* @__PURE__ */ jsx3("title", { id: titleId, children: title }) : null,
154
+ /* @__PURE__ */ jsx3(
1805
155
  "path",
1806
156
  {
1807
157
  fillRule: "evenodd",
@@ -1816,12 +166,12 @@ var Checkmark12Icon = ({
1816
166
  var Checkmark12Icon_default = Checkmark12Icon;
1817
167
 
1818
168
  // icons/react/DirectionRightIcon.tsx
1819
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
169
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1820
170
  var DirectionRightIcon = ({
1821
171
  title,
1822
172
  titleId,
1823
173
  ...props
1824
- }) => /* @__PURE__ */ jsxs6(
174
+ }) => /* @__PURE__ */ jsxs4(
1825
175
  "svg",
1826
176
  {
1827
177
  width: 12,
@@ -1832,8 +182,8 @@ var DirectionRightIcon = ({
1832
182
  "aria-labelledby": titleId,
1833
183
  ...props,
1834
184
  children: [
1835
- title ? /* @__PURE__ */ jsx6("title", { id: titleId, children: title }) : null,
1836
- /* @__PURE__ */ jsx6(
185
+ title ? /* @__PURE__ */ jsx4("title", { id: titleId, children: title }) : null,
186
+ /* @__PURE__ */ jsx4(
1837
187
  "path",
1838
188
  {
1839
189
  d: "M8.807 6.597a.667.667 0 0 0 0-1.194l-5.842-2.92A.667.667 0 0 0 2 3.079v5.842c0 .496.522.818.965.596l5.842-2.92Z",
@@ -1846,12 +196,12 @@ var DirectionRightIcon = ({
1846
196
  var DirectionRightIcon_default = DirectionRightIcon;
1847
197
 
1848
198
  // icons/react/SelectArrows6Icon.tsx
1849
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
199
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1850
200
  var SelectArrows6Icon = ({
1851
201
  title,
1852
202
  titleId,
1853
203
  ...props
1854
- }) => /* @__PURE__ */ jsxs7(
204
+ }) => /* @__PURE__ */ jsxs5(
1855
205
  "svg",
1856
206
  {
1857
207
  width: 6,
@@ -1862,8 +212,8 @@ var SelectArrows6Icon = ({
1862
212
  "aria-labelledby": titleId,
1863
213
  ...props,
1864
214
  children: [
1865
- title ? /* @__PURE__ */ jsx7("title", { id: titleId, children: title }) : null,
1866
- /* @__PURE__ */ jsx7(
215
+ title ? /* @__PURE__ */ jsx5("title", { id: titleId, children: title }) : null,
216
+ /* @__PURE__ */ jsx5(
1867
217
  "path",
1868
218
  {
1869
219
  fillRule: "evenodd",
@@ -1878,32 +228,32 @@ var SelectArrows6Icon = ({
1878
228
  var SelectArrows6Icon_default = SelectArrows6Icon;
1879
229
 
1880
230
  // components/src/asciidoc/Section.tsx
1881
- import { Content as Content2, parse as parse4 } from "@oxide/react-asciidoc";
1882
- import cn3 from "classnames";
231
+ import { Content as Content2, parse as parse2 } from "@oxide/react-asciidoc";
232
+ import cn2 from "classnames";
1883
233
  import { createElement as createElement2 } from "react";
1884
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
234
+ import { Fragment, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1885
235
  var stripAnchors = (str) => str.replace(/<a[^>]*>(.*?)<\/a>/gi, "$1");
1886
- var Section = ({ node: node2 }) => {
1887
- const level = node2.level;
236
+ var Section = ({ node }) => {
237
+ const level = node.level;
1888
238
  let title = "";
1889
- let sectNum = node2.num;
239
+ let sectNum = node.num;
1890
240
  sectNum = sectNum === "." ? "" : sectNum;
1891
- title = /* @__PURE__ */ jsxs8(Fragment2, { children: [
1892
- /* @__PURE__ */ jsx8("span", { className: "anchor", id: node2.id || "", "aria-hidden": "true" }),
1893
- /* @__PURE__ */ jsxs8("a", { className: "link group", href: `#${node2.id}`, children: [
1894
- parse4(stripAnchors(node2.title)),
1895
- /* @__PURE__ */ jsx8(Link16Icon_default, { className: "ml-2 hidden text-accent-secondary group-hover:inline-block" })
241
+ title = /* @__PURE__ */ jsxs6(Fragment, { children: [
242
+ /* @__PURE__ */ jsx6("span", { className: "anchor", id: node.id || "", "aria-hidden": "true" }),
243
+ /* @__PURE__ */ jsxs6("a", { className: "link group", href: `#${node.id}`, children: [
244
+ parse2(stripAnchors(node.title)),
245
+ /* @__PURE__ */ jsx6(Link16Icon_default, { className: "ml-2 hidden text-accent-secondary group-hover:inline-block" })
1896
246
  ] })
1897
247
  ] });
1898
248
  if (level === 0) {
1899
- return /* @__PURE__ */ jsxs8(Fragment2, { children: [
1900
- /* @__PURE__ */ jsx8("h1", { className: cn3("sect0", node2.role), "data-sectnum": sectNum, children: title }),
1901
- /* @__PURE__ */ jsx8(Content2, { blocks: node2.blocks })
249
+ return /* @__PURE__ */ jsxs6(Fragment, { children: [
250
+ /* @__PURE__ */ jsx6("h1", { className: cn2("sect0", node.role), "data-sectnum": sectNum, children: title }),
251
+ /* @__PURE__ */ jsx6(Content2, { blocks: node.blocks })
1902
252
  ] });
1903
253
  } else {
1904
- return /* @__PURE__ */ jsxs8("div", { className: cn3(`sect${level}`, node2.role), children: [
254
+ return /* @__PURE__ */ jsxs6("div", { className: cn2(`sect${level}`, node.role), children: [
1905
255
  createElement2(`h${level + 1}`, { "data-sectnum": sectNum }, title),
1906
- /* @__PURE__ */ jsx8("div", { className: "sectionbody", children: /* @__PURE__ */ jsx8(Content2, { blocks: node2.blocks }) })
256
+ /* @__PURE__ */ jsx6("div", { className: "sectionbody", children: /* @__PURE__ */ jsx6(Content2, { blocks: node.blocks }) })
1907
257
  ] });
1908
258
  }
1909
259
  };
@@ -1911,18 +261,18 @@ var Section_default = Section;
1911
261
 
1912
262
  // components/src/asciidoc/Table.tsx
1913
263
  import { Table as InnerTable } from "@oxide/react-asciidoc";
1914
- import { jsx as jsx9 } from "react/jsx-runtime";
1915
- var Table = ({ node: node2 }) => /* @__PURE__ */ jsx9("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx9(InnerTable, { node: node2 }) });
264
+ import { jsx as jsx7 } from "react/jsx-runtime";
265
+ var Table = ({ node }) => /* @__PURE__ */ jsx7("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx7(InnerTable, { node }) });
1916
266
  var Table_default = Table;
1917
267
 
1918
268
  // components/src/asciidoc/TableOfContents.tsx
1919
269
  import * as Accordion from "@radix-ui/react-accordion";
1920
270
  import { Link } from "@remix-run/react";
1921
- import cn4 from "classnames";
1922
- import { Fragment as Fragment3, useCallback, useEffect, useMemo, useRef, useState as useState2 } from "react";
1923
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
271
+ import cn3 from "classnames";
272
+ import { Fragment as Fragment2, useCallback, useEffect, useMemo, useRef, useState } from "react";
273
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1924
274
  function useIntersectionObserver(elements, callback, options) {
1925
- const [observer, setObserver] = useState2(null);
275
+ const [observer, setObserver] = useState(null);
1926
276
  useEffect(() => {
1927
277
  const observer2 = new IntersectionObserver(callback, options);
1928
278
  setObserver(observer2);
@@ -1954,9 +304,9 @@ function findParentSection(element) {
1954
304
  const sect2Wrapper = element.closest(".sect2");
1955
305
  return sect2Wrapper ? sect2Wrapper : element.closest(".sect1");
1956
306
  }
1957
- function newSection(node2, element, wrapper, parent) {
307
+ function newSection(node, element, wrapper, parent) {
1958
308
  return {
1959
- node: node2,
309
+ node,
1960
310
  element,
1961
311
  wrapper,
1962
312
  parent,
@@ -1996,7 +346,7 @@ function maxIndex(nums) {
1996
346
  }, void 0);
1997
347
  }
1998
348
  function useActiveSectionTracking(initialSections, onSectionChange, debug = false) {
1999
- const [sectionWrappers, setSectionWrappers] = useState2(
349
+ const [sectionWrappers, setSectionWrappers] = useState(
2000
350
  buildSectionTree(initialSections)
2001
351
  );
2002
352
  const sectionMeasurements = useRef([]);
@@ -2010,7 +360,7 @@ function useActiveSectionTracking(initialSections, onSectionChange, debug = fals
2010
360
  const wrapperActivator = useCallback(
2011
361
  (entries) => {
2012
362
  for (const entry of entries) {
2013
- const index = sectionWrappers.findIndex((node2) => node2.wrapper === entry.target);
363
+ const index = sectionWrappers.findIndex((node) => node.wrapper === entry.target);
2014
364
  const covered = entry.intersectionRect.height / (entry.rootBounds?.height || 1);
2015
365
  sectionMeasurements.current[index] = covered;
2016
366
  }
@@ -2049,7 +399,7 @@ function useActiveSectionTracking(initialSections, onSectionChange, debug = fals
2049
399
  return "0px";
2050
400
  }
2051
401
  });
2052
- debugNode = /* @__PURE__ */ jsx10(
402
+ debugNode = /* @__PURE__ */ jsx8(
2053
403
  "div",
2054
404
  {
2055
405
  style: {
@@ -2076,24 +426,24 @@ var DesktopOutline = ({
2076
426
  activeItem
2077
427
  }) => {
2078
428
  const renderToc = (sections) => {
2079
- return sections.map((item) => /* @__PURE__ */ jsxs9(Fragment3, { children: [
2080
- /* @__PURE__ */ jsx10(
429
+ return sections.map((item) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
430
+ /* @__PURE__ */ jsx8(
2081
431
  "li",
2082
432
  {
2083
433
  "data-level": item.level,
2084
- className: cn4("mb-0 list-none text-sans-sm", item.level > 2 && "hidden"),
2085
- children: /* @__PURE__ */ jsx10(
434
+ className: cn3("mb-0 list-none text-sans-sm", item.level > 2 && "hidden"),
435
+ children: /* @__PURE__ */ jsx8(
2086
436
  Link,
2087
437
  {
2088
438
  to: `#${item.id}`,
2089
- className: cn4(
439
+ className: cn3(
2090
440
  "block border-l py-[4px] pr-4",
2091
441
  activeItem === item.id ? "active text-accent-secondary border-accent-secondary hover:text-accent" : "text-tertiary border-secondary hover:text-secondary"
2092
442
  ),
2093
443
  style: {
2094
444
  paddingLeft: `${0.5 + item.level * 0.5}rem`
2095
445
  },
2096
- children: /* @__PURE__ */ jsx10("span", { dangerouslySetInnerHTML: { __html: item.title } })
446
+ children: /* @__PURE__ */ jsx8("span", { dangerouslySetInnerHTML: { __html: item.title } })
2097
447
  }
2098
448
  )
2099
449
  }
@@ -2102,7 +452,7 @@ var DesktopOutline = ({
2102
452
  ] }, item.id));
2103
453
  };
2104
454
  if (toc && toc.length > 0) {
2105
- return /* @__PURE__ */ jsx10("ul", { className: "toc", children: renderToc(toc) });
455
+ return /* @__PURE__ */ jsx8("ul", { className: "toc", children: renderToc(toc) });
2106
456
  }
2107
457
  return null;
2108
458
  };
@@ -2112,27 +462,24 @@ var SmallScreenOutline = ({
2112
462
  title
2113
463
  }) => {
2114
464
  const renderToc = (sections) => {
2115
- return sections.map((item) => /* @__PURE__ */ jsxs9(Fragment3, { children: [
2116
- /* @__PURE__ */ jsx10(
465
+ return sections.map((item) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
466
+ /* @__PURE__ */ jsx8(
2117
467
  "li",
2118
468
  {
2119
469
  "data-level": item.level,
2120
- className: cn4(
2121
- "AccordionContent hydrated list-none text-sans-sm",
2122
- item.level > 2 && "hidden"
2123
- ),
2124
- children: /* @__PURE__ */ jsx10(
470
+ className: cn3("list-none text-sans-sm", item.level > 2 && "hidden"),
471
+ children: /* @__PURE__ */ jsx8(
2125
472
  Link,
2126
473
  {
2127
474
  to: `#${item.id}`,
2128
- className: cn4(
475
+ className: cn3(
2129
476
  "block border-l py-[4px]",
2130
477
  activeItem === item.id ? "active text-accent-secondary border-accent-secondary hover:text-accent" : "text-tertiary border-secondary hover:text-secondary"
2131
478
  ),
2132
479
  style: {
2133
480
  paddingLeft: `${0.5 + item.level * 0.5}rem`
2134
481
  },
2135
- children: /* @__PURE__ */ jsx10("span", { dangerouslySetInnerHTML: { __html: item.title } })
482
+ children: /* @__PURE__ */ jsx8("span", { dangerouslySetInnerHTML: { __html: item.title } })
2136
483
  }
2137
484
  )
2138
485
  }
@@ -2141,19 +488,19 @@ var SmallScreenOutline = ({
2141
488
  ] }, item.id));
2142
489
  };
2143
490
  if (toc && toc.length > 0) {
2144
- return /* @__PURE__ */ jsx10(
491
+ return /* @__PURE__ */ jsx8(
2145
492
  Accordion.Root,
2146
493
  {
2147
494
  type: "single",
2148
495
  className: "sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block max-h-[calc(100vh-var(--header-height)+1px)] w-full overflow-y-scroll border-b border-t bg-default border-secondary 1200:hidden print:hidden",
2149
496
  collapsible: true,
2150
- children: /* @__PURE__ */ jsxs9(Accordion.Item, { value: `small-toc-${title}`, children: [
2151
- /* @__PURE__ */ jsx10(Accordion.Header, { children: /* @__PURE__ */ jsxs9(Accordion.Trigger, { className: "flex h-[--toc-header-height] w-full items-center justify-between px-4 text-sans-md text-default hover:bg-hover 400:px-6 600:px-8 [&>svg]:data-[state=open]:rotate-90", children: [
497
+ children: /* @__PURE__ */ jsxs7(Accordion.Item, { value: `small-toc-${title}`, children: [
498
+ /* @__PURE__ */ jsx8(Accordion.Header, { children: /* @__PURE__ */ jsxs7(Accordion.Trigger, { className: "flex h-[--toc-header-height] w-full items-center justify-between px-4 text-sans-md text-default hover:bg-hover 400:px-6 600:px-8 [&>svg]:data-[state=open]:rotate-90", children: [
2152
499
  "Table of Contents",
2153
500
  " ",
2154
- /* @__PURE__ */ jsx10(DirectionRightIcon_default, { className: "transition-all text-tertiary" })
501
+ /* @__PURE__ */ jsx8(DirectionRightIcon_default, { className: "transition-all text-tertiary" })
2155
502
  ] }) }),
2156
- /* @__PURE__ */ jsx10(Accordion.Content, { className: "AccordionContent hydrated w-full border-t px-4 border-secondary 400:px-6 600:px-8", children: /* @__PURE__ */ jsx10("div", { className: "py-4", children: renderToc(toc) }) })
503
+ /* @__PURE__ */ jsx8(Accordion.Content, { className: "animated-accordion hydrated w-full border-t px-4 border-secondary 400:px-6 600:px-8", children: /* @__PURE__ */ jsx8("div", { className: "py-4", children: renderToc(toc) }) })
2157
504
  ] })
2158
505
  }
2159
506
  );
@@ -3689,36 +2036,35 @@ var loadAsciidoctor = ({
3689
2036
  constructor() {
3690
2037
  this.baseConverter = new ad2.Html5Converter();
3691
2038
  }
3692
- convert(node2, transform) {
3693
- switch (node2.getNodeName()) {
2039
+ convert(node, transform) {
2040
+ switch (node.getNodeName()) {
3694
2041
  case "inline_callout":
3695
- return convertInlineCallout(node2);
2042
+ return convertInlineCallout(node);
3696
2043
  default:
3697
2044
  break;
3698
2045
  }
3699
- return this.baseConverter.convert(node2, transform);
2046
+ return this.baseConverter.convert(node, transform);
3700
2047
  }
3701
2048
  }
3702
2049
  extensions.forEach((extension) => ad2.Extensions.register(extension));
3703
2050
  ad2.ConverterFactory.register(new InlineConverter2(), ["html5"]);
3704
2051
  return ad2;
3705
2052
  };
3706
- function convertInlineCallout(node2) {
3707
- return `<i class="conum" data-value="${node2.getText()}"></i>`;
2053
+ function convertInlineCallout(node) {
2054
+ return `<i class="conum" data-value="${node.getText()}"></i>`;
3708
2055
  }
3709
- var handleDocument = async (document2) => {
3710
- const doc = prepareDocument(document2);
2056
+ var handleDocument = async (document) => {
2057
+ const doc = prepareDocument(document);
3711
2058
  return await processDocument(doc, highlight);
3712
2059
  };
3713
2060
 
3714
2061
  // components/src/asciidoc/index.tsx
3715
- import { jsx as jsx11 } from "react/jsx-runtime";
3716
- var MinimalDocument = ({ document: document2 }) => /* @__PURE__ */ jsx11("div", { id: "content", className: "asciidoc-body w-full", children: /* @__PURE__ */ jsx11(Content4, { blocks: document2.blocks }) });
2062
+ import { jsx as jsx9 } from "react/jsx-runtime";
2063
+ var MinimalDocument = ({ document }) => /* @__PURE__ */ jsx9("div", { id: "content", className: "asciidoc-body w-full", children: /* @__PURE__ */ jsx9(Content4, { blocks: document.blocks }) });
3717
2064
  var AsciiDocBlocks = {
3718
2065
  Admonition: Admonition_default,
3719
2066
  Table: Table_default,
3720
2067
  Section: Section_default,
3721
- Listing: Listing_default,
3722
2068
  MinimalDocument
3723
2069
  };
3724
2070
  var renderWithBreaks = (text) => {
@@ -3743,20 +2089,20 @@ var QUOTE_TAGS = {
3743
2089
  "latexmath": ["\\(", "\\)"]
3744
2090
  };
3745
2091
  var chop = (str) => str.substring(0, str.length - 1);
3746
- var convertInlineQuoted = (node2) => {
3747
- const type = node2.getType();
2092
+ var convertInlineQuoted = (node) => {
2093
+ const type = node.getType();
3748
2094
  const quoteTag = QUOTE_TAGS[type];
3749
2095
  const [open, close, tag] = quoteTag || ["", ""];
3750
- let text = node2.getText();
2096
+ let text = node.getText();
3751
2097
  if (type === "monospaced") {
3752
2098
  text = renderWithBreaks(text);
3753
2099
  }
3754
- const id26 = node2.getId();
3755
- const role = node2.getRole();
3756
- const idAttr = id26 ? `id="${id26}"` : "";
2100
+ const id = node.getId();
2101
+ const role = node.getRole();
2102
+ const idAttr = id ? `id="${id}"` : "";
3757
2103
  const classAttr = role ? `class="${role}"` : "";
3758
2104
  const attrs2 = `${idAttr} ${classAttr}`;
3759
- if (id26 || role) {
2105
+ if (id || role) {
3760
2106
  if (tag) {
3761
2107
  return `${chop(open)} ${attrs2}>${text}${close}`;
3762
2108
  } else {
@@ -3766,8 +2112,8 @@ var convertInlineQuoted = (node2) => {
3766
2112
  return `${open}${text}${close}`;
3767
2113
  }
3768
2114
  };
3769
- function convertInlineCallout2(node2) {
3770
- return `<i class="conum" data-value="${node2.getText()}"></i>`;
2115
+ function convertInlineCallout2(node) {
2116
+ return `<i class="conum" data-value="${node.getText()}"></i>`;
3771
2117
  }
3772
2118
  var ad = asciidoctor2();
3773
2119
  var InlineConverter = class {
@@ -3775,22 +2121,22 @@ var InlineConverter = class {
3775
2121
  constructor() {
3776
2122
  this.baseConverter = new ad.Html5Converter();
3777
2123
  }
3778
- convert(node2, transform) {
3779
- switch (node2.getNodeName()) {
2124
+ convert(node, transform) {
2125
+ switch (node.getNodeName()) {
3780
2126
  case "inline_quoted":
3781
- return convertInlineQuoted(node2);
2127
+ return convertInlineQuoted(node);
3782
2128
  case "inline_callout":
3783
- return convertInlineCallout2(node2);
2129
+ return convertInlineCallout2(node);
3784
2130
  default:
3785
2131
  break;
3786
2132
  }
3787
- return this.baseConverter.convert(node2, transform);
2133
+ return this.baseConverter.convert(node, transform);
3788
2134
  }
3789
2135
  };
3790
2136
 
3791
2137
  // components/src/ui/badge/Badge.tsx
3792
- import cn5 from "classnames";
3793
- import { jsx as jsx12 } from "react/jsx-runtime";
2138
+ import cn4 from "classnames";
2139
+ import { jsx as jsx10 } from "react/jsx-runtime";
3794
2140
  var badgeColors = {
3795
2141
  default: {
3796
2142
  default: `ring-1 ring-inset bg-accent-secondary text-accent ring-[rgba(var(--base-green-800-rgb),0.15)]`,
@@ -3815,25 +2161,25 @@ var Badge = ({
3815
2161
  color = "default",
3816
2162
  variant = "default"
3817
2163
  }) => {
3818
- return /* @__PURE__ */ jsx12(
2164
+ return /* @__PURE__ */ jsx10(
3819
2165
  "span",
3820
2166
  {
3821
- className: cn5(
2167
+ className: cn4(
3822
2168
  "ox-badge",
3823
2169
  `variant-${variant}`,
3824
2170
  "inline-flex h-4 items-center whitespace-nowrap rounded-sm px-[3px] py-[1px] uppercase text-mono-sm",
3825
2171
  badgeColors[variant][color],
3826
2172
  className
3827
2173
  ),
3828
- children: /* @__PURE__ */ jsx12("span", { children })
2174
+ children: /* @__PURE__ */ jsx10("span", { children })
3829
2175
  }
3830
2176
  );
3831
2177
  };
3832
2178
 
3833
2179
  // components/src/ui/button/Button.tsx
3834
- import cn6 from "classnames";
2180
+ import cn5 from "classnames";
3835
2181
  import { forwardRef } from "react";
3836
- import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
2182
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
3837
2183
  var buttonSizes = ["sm", "icon", "base"];
3838
2184
  var variants = ["primary", "secondary", "ghost", "danger"];
3839
2185
  var sizeStyle = {
@@ -3846,7 +2192,7 @@ var buttonStyle = ({
3846
2192
  size: size2 = "base",
3847
2193
  variant = "primary"
3848
2194
  } = {}) => {
3849
- return cn6(
2195
+ return cn5(
3850
2196
  "ox-button inline-flex items-center justify-center rounded align-top elevation-1 disabled:cursor-not-allowed",
3851
2197
  `btn-${variant}`,
3852
2198
  sizeStyle[size2],
@@ -3873,10 +2219,10 @@ var Button = forwardRef(
3873
2219
  ...rest
3874
2220
  }, ref) => {
3875
2221
  const isDisabled = disabled || loading;
3876
- return /* @__PURE__ */ jsxs10(
2222
+ return /* @__PURE__ */ jsxs8(
3877
2223
  "button",
3878
2224
  {
3879
- className: cn6(buttonStyle({ size: size2, variant }), className, {
2225
+ className: cn5(buttonStyle({ size: size2, variant }), className, {
3880
2226
  "visually-disabled": isDisabled
3881
2227
  }),
3882
2228
  ref,
@@ -3886,8 +2232,8 @@ var Button = forwardRef(
3886
2232
  "aria-disabled": isDisabled,
3887
2233
  ...rest,
3888
2234
  children: [
3889
- loading && /* @__PURE__ */ jsx13(Spinner, { className: "absolute", variant }),
3890
- /* @__PURE__ */ jsx13("span", { className: cn6("flex items-center", innerClassName, { invisible: loading }), children })
2235
+ loading && /* @__PURE__ */ jsx11(Spinner, { className: "absolute", variant }),
2236
+ /* @__PURE__ */ jsx11("span", { className: cn5("flex items-center", innerClassName, { invisible: loading }), children })
3891
2237
  ]
3892
2238
  }
3893
2239
  );
@@ -3895,9 +2241,9 @@ var Button = forwardRef(
3895
2241
  );
3896
2242
 
3897
2243
  // components/src/ui/spinner/Spinner.tsx
3898
- import cn7 from "classnames";
3899
- import { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
3900
- import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
2244
+ import cn6 from "classnames";
2245
+ import { useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
2246
+ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
3901
2247
  var spinnerSizes = ["base", "lg"];
3902
2248
  var spinnerVariants = ["primary", "secondary", "ghost", "danger"];
3903
2249
  var Spinner = ({
@@ -3909,7 +2255,7 @@ var Spinner = ({
3909
2255
  const center = size2 === "lg" ? 18 : 6;
3910
2256
  const radius = size2 === "lg" ? 16 : 5;
3911
2257
  const strokeWidth = size2 === "lg" ? 3 : 2;
3912
- return /* @__PURE__ */ jsxs11(
2258
+ return /* @__PURE__ */ jsxs9(
3913
2259
  "svg",
3914
2260
  {
3915
2261
  width: frameSize,
@@ -3918,9 +2264,9 @@ var Spinner = ({
3918
2264
  fill: "none",
3919
2265
  xmlns: "http://www.w3.org/2000/svg",
3920
2266
  "aria-labelledby": "Spinner",
3921
- className: cn7("spinner", `spinner-${variant}`, `spinner-${size2}`, className),
2267
+ className: cn6("spinner", `spinner-${variant}`, `spinner-${size2}`, className),
3922
2268
  children: [
3923
- /* @__PURE__ */ jsx14(
2269
+ /* @__PURE__ */ jsx12(
3924
2270
  "circle",
3925
2271
  {
3926
2272
  fill: "none",
@@ -3933,7 +2279,7 @@ var Spinner = ({
3933
2279
  strokeOpacity: 0.2
3934
2280
  }
3935
2281
  ),
3936
- /* @__PURE__ */ jsx14(
2282
+ /* @__PURE__ */ jsx12(
3937
2283
  "circle",
3938
2284
  {
3939
2285
  className: "path",
@@ -3951,7 +2297,7 @@ var Spinner = ({
3951
2297
  );
3952
2298
  };
3953
2299
  var SpinnerLoader = ({ isLoading, children = null, minTime = 500 }) => {
3954
- const [isVisible, setIsVisible] = useState3(isLoading);
2300
+ const [isVisible, setIsVisible] = useState2(isLoading);
3955
2301
  const hideTimeout = useRef2(null);
3956
2302
  const loadingStartTime = useRef2(0);
3957
2303
  useEffect2(() => {
@@ -3974,24 +2320,24 @@ var SpinnerLoader = ({ isLoading, children = null, minTime = 500 }) => {
3974
2320
  clearTimeout(hideTimeout.current);
3975
2321
  };
3976
2322
  }, [isLoading, minTime]);
3977
- return isVisible ? /* @__PURE__ */ jsx14(Spinner, {}) : /* @__PURE__ */ jsx14(Fragment4, { children });
2323
+ return isVisible ? /* @__PURE__ */ jsx12(Spinner, {}) : /* @__PURE__ */ jsx12(Fragment3, { children });
3978
2324
  };
3979
2325
 
3980
2326
  // components/src/ui/tabs/Tabs.tsx
3981
2327
  import { Content as Content5, List, Root as Root2, Trigger as Trigger2 } from "@radix-ui/react-tabs";
3982
- import cn8 from "classnames";
3983
- import { jsx as jsx15 } from "react/jsx-runtime";
2328
+ import cn7 from "classnames";
2329
+ import { jsx as jsx13 } from "react/jsx-runtime";
3984
2330
  var Tabs = {
3985
- Root: ({ className, ...props }) => /* @__PURE__ */ jsx15(Root2, { ...props, className: cn8("ox-tabs", className) }),
3986
- Trigger: ({ children, className, ...props }) => /* @__PURE__ */ jsx15(Trigger2, { ...props, className: cn8("ox-tab", className), children: /* @__PURE__ */ jsx15("div", { children }) }),
3987
- List: ({ className, ...props }) => /* @__PURE__ */ jsx15(List, { ...props, className: cn8("ox-tabs-list", className) }),
3988
- Content: ({ className, ...props }) => /* @__PURE__ */ jsx15(Content5, { ...props, className: cn8("ox-tabs-panel", className) })
2331
+ Root: ({ className, ...props }) => /* @__PURE__ */ jsx13(Root2, { ...props, className: cn7("ox-tabs", className) }),
2332
+ Trigger: ({ children, className, ...props }) => /* @__PURE__ */ jsx13(Trigger2, { ...props, className: cn7("ox-tab", className), children: /* @__PURE__ */ jsx13("div", { children }) }),
2333
+ List: ({ className, ...props }) => /* @__PURE__ */ jsx13(List, { ...props, className: cn7("ox-tabs-list", className) }),
2334
+ Content: ({ className, ...props }) => /* @__PURE__ */ jsx13(Content5, { ...props, className: cn7("ox-tabs-panel", className) })
3989
2335
  };
3990
2336
 
3991
2337
  // components/src/ui/checkbox/Checkbox.tsx
3992
- import cn9 from "classnames";
3993
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
3994
- var Check = () => /* @__PURE__ */ jsx16(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
2338
+ import cn8 from "classnames";
2339
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
2340
+ var Check = () => /* @__PURE__ */ jsx14(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
3995
2341
  var Indeterminate = classed.div`absolute w-2 h-0.5 left-1 top-[7px] bg-accent pointer-events-none`;
3996
2342
  var inputStyle = `
3997
2343
  appearance-none border border-default bg-default h-4 w-4 rounded-sm absolute left-0 outline-none
@@ -4005,28 +2351,28 @@ var Checkbox = ({
4005
2351
  children,
4006
2352
  className,
4007
2353
  ...inputProps
4008
- }) => /* @__PURE__ */ jsxs12("label", { className: "inline-flex items-center", children: [
4009
- /* @__PURE__ */ jsxs12("span", { className: "relative h-4 w-4", children: [
4010
- /* @__PURE__ */ jsx16(
2354
+ }) => /* @__PURE__ */ jsxs10("label", { className: "inline-flex items-center", children: [
2355
+ /* @__PURE__ */ jsxs10("span", { className: "relative h-4 w-4", children: [
2356
+ /* @__PURE__ */ jsx14(
4011
2357
  "input",
4012
2358
  {
4013
- className: cn9(inputStyle, className),
2359
+ className: cn8(inputStyle, className),
4014
2360
  type: "checkbox",
4015
2361
  ref: (el) => el && (el.indeterminate = !!indeterminate),
4016
2362
  ...inputProps
4017
2363
  }
4018
2364
  ),
4019
- inputProps.checked && !indeterminate && /* @__PURE__ */ jsx16(Check, {}),
4020
- indeterminate && /* @__PURE__ */ jsx16(Indeterminate, {})
2365
+ inputProps.checked && !indeterminate && /* @__PURE__ */ jsx14(Check, {}),
2366
+ indeterminate && /* @__PURE__ */ jsx14(Indeterminate, {})
4021
2367
  ] }),
4022
- children && /* @__PURE__ */ jsx16("span", { className: "ml-2.5 text-sans-md text-secondary", children })
2368
+ children && /* @__PURE__ */ jsx14("span", { className: "ml-2.5 text-sans-md text-secondary", children })
4023
2369
  ] });
4024
2370
 
4025
2371
  // components/src/ui/listbox/Listbox.tsx
4026
2372
  import { FloatingPortal, flip, offset, size, useFloating } from "@floating-ui/react";
4027
2373
  import { Listbox as Select } from "@headlessui/react";
4028
- import cn10 from "classnames";
4029
- import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
2374
+ import cn9 from "classnames";
2375
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
4030
2376
  var Listbox = ({
4031
2377
  name,
4032
2378
  selected,
@@ -4055,19 +2401,19 @@ var Listbox = ({
4055
2401
  const selectedItem = selected && items.find((i) => i.value === selected);
4056
2402
  const noItems = !isLoading && items.length === 0;
4057
2403
  const isDisabled = disabled || noItems;
4058
- return /* @__PURE__ */ jsx17("div", { className: cn10("relative", className), children: /* @__PURE__ */ jsx17(
2404
+ return /* @__PURE__ */ jsx15("div", { className: cn9("relative", className), children: /* @__PURE__ */ jsx15(
4059
2405
  Select,
4060
2406
  {
4061
2407
  value: selected,
4062
2408
  onChange: (val) => val !== null && onChange(val),
4063
2409
  disabled: isDisabled || isLoading,
4064
- children: ({ open }) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
4065
- /* @__PURE__ */ jsxs13(
2410
+ children: ({ open }) => /* @__PURE__ */ jsxs11(Fragment4, { children: [
2411
+ /* @__PURE__ */ jsxs11(
4066
2412
  Select.Button,
4067
2413
  {
4068
2414
  name,
4069
2415
  ref: refs.setReference,
4070
- className: cn10(
2416
+ className: cn9(
4071
2417
  `flex h-10 w-full items-center justify-between
4072
2418
  rounded border text-sans-md`,
4073
2419
  hasError ? "focus-error border-error-secondary hover:border-error" : "border-default hover:border-hover",
@@ -4078,37 +2424,37 @@ var Listbox = ({
4078
2424
  ),
4079
2425
  ...props,
4080
2426
  children: [
4081
- /* @__PURE__ */ jsx17("div", { className: "w-full px-3 text-left", children: selectedItem ? (
2427
+ /* @__PURE__ */ jsx15("div", { className: "w-full px-3 text-left", children: selectedItem ? (
4082
2428
  // labelString is one line, which is what we need when label is a ReactNode
4083
2429
  selectedItem.labelString || selectedItem.label
4084
- ) : /* @__PURE__ */ jsx17("span", { className: "text-quaternary", children: noItems ? "No items" : placeholder }) }),
4085
- !isDisabled && /* @__PURE__ */ jsx17(SpinnerLoader, { isLoading }),
4086
- /* @__PURE__ */ jsx17(
2430
+ ) : /* @__PURE__ */ jsx15("span", { className: "text-quaternary", children: noItems ? "No items" : placeholder }) }),
2431
+ !isDisabled && /* @__PURE__ */ jsx15(SpinnerLoader, { isLoading }),
2432
+ /* @__PURE__ */ jsx15(
4087
2433
  "div",
4088
2434
  {
4089
2435
  className: "ml-3 flex h-[calc(100%-12px)] items-center border-l px-3 border-secondary",
4090
2436
  "aria-hidden": true,
4091
- children: /* @__PURE__ */ jsx17(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
2437
+ children: /* @__PURE__ */ jsx15(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
4092
2438
  }
4093
2439
  )
4094
2440
  ]
4095
2441
  }
4096
2442
  ),
4097
- /* @__PURE__ */ jsx17(FloatingPortal, { children: /* @__PURE__ */ jsx17(
2443
+ /* @__PURE__ */ jsx15(FloatingPortal, { children: /* @__PURE__ */ jsx15(
4098
2444
  Select.Options,
4099
2445
  {
4100
2446
  ref: refs.setFloating,
4101
2447
  style: floatingStyles,
4102
2448
  className: "ox-menu pointer-events-auto z-50 overflow-y-auto !outline-none",
4103
- children: items.map((item) => /* @__PURE__ */ jsx17(
2449
+ children: items.map((item) => /* @__PURE__ */ jsx15(
4104
2450
  Select.Option,
4105
2451
  {
4106
2452
  value: item.value,
4107
2453
  className: "relative border-b border-secondary last:border-0",
4108
- children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx17(
2454
+ children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx15(
4109
2455
  "div",
4110
2456
  {
4111
- className: cn10(
2457
+ className: cn9(
4112
2458
  "ox-menu-item text-secondary",
4113
2459
  selected2 && "is-selected",
4114
2460
  active && "is-highlighted"
@@ -4151,12 +2497,4 @@ export {
4151
2497
  useIntersectionObserver,
4152
2498
  variants
4153
2499
  };
4154
- /*! Bundled license information:
4155
-
4156
- mermaid/dist/mermaid.core.mjs:
4157
- (*! Check if previously processed *)
4158
- (*!
4159
- * Wait for document loaded before starting the execution
4160
- *)
4161
- */
4162
2500
  //# sourceMappingURL=index.js.map