apiuikit 1.1.0 → 1.3.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 (89) hide show
  1. package/README.md +1 -0
  2. package/dist/CodeSamples-6zm8Tjnl.js +4280 -0
  3. package/dist/CodeSamples-OTh-LQZJ.cjs +50 -0
  4. package/dist/apiuikit.cjs.js +1 -1
  5. package/dist/apiuikit.css +1 -1
  6. package/dist/apiuikit.es.js +30 -22
  7. package/dist/config/config.d.ts +48 -0
  8. package/dist/contexts/useSpec.d.ts +3 -0
  9. package/dist/helpers/jsonPointer.d.ts +5 -0
  10. package/dist/helpers/llmsTxt.d.ts +51 -0
  11. package/dist/helpers/specAdapters.d.ts +32 -0
  12. package/dist/helpers/toMarkdown.d.ts +5 -6
  13. package/dist/hooks/useDocumentProviderValue.d.ts +3 -1
  14. package/dist/{index-EeGvEXPN.cjs → index-B-1zJx9W.cjs} +1 -1
  15. package/dist/{index-B5IBIM-V.cjs → index-BlUAYvlu.cjs} +1 -1
  16. package/dist/{index-DM2MTkYV.js → index-CdicOrT3.js} +1 -1
  17. package/dist/index-DCDYBZcY.js +1461 -0
  18. package/dist/{index-iXpNcBcP.js → index-DNLwvW38.js} +1 -1
  19. package/dist/index-D_7O8w46.cjs +133 -0
  20. package/dist/index-DxCSxdSs.js +13615 -0
  21. package/dist/index-d8kJa7YD.cjs +4 -0
  22. package/dist/index.d.ts +4 -1
  23. package/dist/markdown-assets/protoToJsonSchema-CBPWaboT.js +6193 -0
  24. package/dist/markdown-assets/protoToJsonSchema-CgkcluFJ.js +83 -0
  25. package/dist/markdown.cjs +91 -0
  26. package/dist/markdown.d.ts +8 -0
  27. package/dist/markdown.es.js +2101 -0
  28. package/dist/{protoToJsonSchema-CcEvAEt4.js → protoToJsonSchema-BiGedOci.js} +112 -108
  29. package/dist/{protoToJsonSchema-BNZrP3Fa.cjs → protoToJsonSchema-CXmX3vNq.cjs} +10 -10
  30. package/dist/{protobufSchemaParser-BaWs_7UI.js → protobufSchemaParser-Bq5Fy-MT.js} +2 -2
  31. package/dist/{protobufSchemaParser-7sU6XBEb.cjs → protobufSchemaParser-CsPesPSp.cjs} +1 -1
  32. package/dist/shims/utilInspect.d.ts +2 -0
  33. package/package.json +8 -3
  34. package/dist/components/Navigation/tests/spineTicks.test.d.ts +0 -1
  35. package/dist/components/schema/tests/SchemaTab.test.d.ts +0 -1
  36. package/dist/components/schema/tests/schemaUtils.test.d.ts +0 -1
  37. package/dist/components/tests/Authorization.test.d.ts +0 -1
  38. package/dist/components/tests/Bindings.test.d.ts +0 -1
  39. package/dist/components/tests/ChannelAddress.test.d.ts +0 -1
  40. package/dist/components/tests/CodeBlock.test.d.ts +0 -1
  41. package/dist/components/tests/CodeSamples.test.d.ts +0 -1
  42. package/dist/components/tests/CopyMarkdownButton.test.d.ts +0 -1
  43. package/dist/components/tests/ErrorBoundary.test.d.ts +0 -1
  44. package/dist/components/tests/MarkdownExportMenu.test.d.ts +0 -1
  45. package/dist/components/tests/RenderExtensions.test.d.ts +0 -1
  46. package/dist/containers/AsyncAPI/tests/AsyncAPI.test.d.ts +0 -1
  47. package/dist/containers/AsyncAPI/tests/AsyncAPIErrorBoundary.test.d.ts +0 -1
  48. package/dist/containers/AsyncAPI/tests/AsyncAPIRenderer.test.d.ts +0 -1
  49. package/dist/containers/AsyncAPI/tests/searchHighlight.test.d.ts +0 -1
  50. package/dist/containers/OpenAPI/tests/OpenAPI.test.d.ts +0 -1
  51. package/dist/containers/OpenAPI/tests/OpenAPIErrorBoundary.test.d.ts +0 -1
  52. package/dist/containers/OpenAPI/tests/OpenAPIRenderer.test.d.ts +0 -1
  53. package/dist/containers/Path/tests/PathOperation.test.d.ts +0 -1
  54. package/dist/containers/Path/tests/Paths.test.d.ts +0 -1
  55. package/dist/helpers/avro/tests/avroToJsonSchema.test.d.ts +0 -1
  56. package/dist/helpers/protobuf/tests/protoToJsonSchema.test.d.ts +0 -1
  57. package/dist/helpers/protobuf/tests/protobufSchemaParser.test.d.ts +0 -1
  58. package/dist/helpers/tests/codeSamples.test.d.ts +0 -1
  59. package/dist/helpers/tests/exampleSchema.test.d.ts +0 -1
  60. package/dist/helpers/tests/openapiSearchIndex.test.d.ts +0 -1
  61. package/dist/helpers/tests/resolveDocument.test.d.ts +0 -1
  62. package/dist/helpers/tests/schemaFormat.test.d.ts +0 -1
  63. package/dist/helpers/tests/toMarkdown.test.d.ts +0 -1
  64. package/dist/index-BqogUhNO.js +0 -19011
  65. package/dist/index-mYBY1Eu8.cjs +0 -177
  66. package/dist/public/tests/sections.test.d.ts +0 -1
  67. package/dist/stories/AsyncAPI.stories.d.ts +0 -14
  68. package/dist/stories/AsyncAPIRenderer.stories.d.ts +0 -17
  69. package/dist/stories/Authorization.stories.d.ts +0 -13
  70. package/dist/stories/Bindings.stories.d.ts +0 -12
  71. package/dist/stories/ChannelAddress.stories.d.ts +0 -13
  72. package/dist/stories/CodeBlock.stories.d.ts +0 -11
  73. package/dist/stories/Examples.stories.d.ts +0 -11
  74. package/dist/stories/Information.stories.d.ts +0 -9
  75. package/dist/stories/Message.stories.d.ts +0 -11
  76. package/dist/stories/Messages.stories.d.ts +0 -11
  77. package/dist/stories/Operation.stories.d.ts +0 -10
  78. package/dist/stories/Operations.stories.d.ts +0 -16
  79. package/dist/stories/SchemaTab.stories.d.ts +0 -12
  80. package/dist/stories/SchemaTree.stories.d.ts +0 -24
  81. package/dist/stories/SearchPanel.stories.d.ts +0 -16
  82. package/dist/stories/Server.stories.d.ts +0 -12
  83. package/dist/stories/TabToggle.stories.d.ts +0 -10
  84. package/dist/stories/Tabs.stories.d.ts +0 -11
  85. package/dist/stories/documentContextDecorator.d.ts +0 -25
  86. package/dist/stories/noCanvasDocsPage.d.ts +0 -9
  87. package/dist/utils/tests/hasRef.test.d.ts +0 -1
  88. package/dist/utils/tests/theme.test.d.ts +0 -1
  89. package/dist/utils/tests/useElementRect.test.d.ts +0 -1
@@ -0,0 +1,2101 @@
1
+ const ut = [
2
+ "get",
3
+ "put",
4
+ "post",
5
+ "delete",
6
+ "options",
7
+ "head",
8
+ "patch",
9
+ "trace"
10
+ ], vt = (t, n) => `${t} ${n}`;
11
+ function it(t) {
12
+ return Object.keys(t).sort().flatMap((n) => {
13
+ const r = t[n];
14
+ return r ? ut.filter((i) => r[i]).map((i) => ({
15
+ key: vt(i, n),
16
+ method: i,
17
+ path: n
18
+ })) : [];
19
+ });
20
+ }
21
+ const Z = (t) => typeof t == "object" && t !== null && !Array.isArray(t), V = (t) => Z(t) ? t : null, Ze = "^[\0-ÿ]*$", _t = Math.pow(-2, 31), Et = Math.pow(2, 31) - 1, wt = Math.pow(-2, 63), Tt = Math.pow(2, 63) - 1, At = {
22
+ null: "null",
23
+ boolean: "boolean",
24
+ int: "integer",
25
+ long: "integer",
26
+ float: "number",
27
+ double: "number",
28
+ bytes: "string",
29
+ string: "string",
30
+ fixed: "string",
31
+ map: "object",
32
+ array: "array",
33
+ enum: "string",
34
+ record: "object",
35
+ uuid: "string"
36
+ }, Ne = (t) => typeof t == "object" && t !== null && !Array.isArray(t) ? t : {};
37
+ function ye(t) {
38
+ const n = Ne(t);
39
+ if (typeof n.name == "string")
40
+ return typeof n.namespace == "string" ? `${n.namespace}.${n.name}` : n.name;
41
+ }
42
+ function je(t, n, r) {
43
+ t.doc && (n.description = t.doc), t.default !== void 0 && (n.default = t.default);
44
+ const i = ye(t);
45
+ i !== void 0 && r[i] && (n["x-parser-schema-id"] = i);
46
+ }
47
+ function Je(t, n, r) {
48
+ !(Array.isArray(t.type) && t.type.includes("null")) && !r && (n.required = n.required || [], n.required.push(t.name));
49
+ }
50
+ function bt(t, n) {
51
+ let r = t, i = n;
52
+ if (Array.isArray(t) && t.length > 0) {
53
+ const u = t.length > 1 && t[0] === "null";
54
+ r = t[+u], i.oneOf !== void 0 && (i = i.oneOf[0]);
55
+ }
56
+ return { type: r, jsonSchema: i };
57
+ }
58
+ function Rt(t, n, r) {
59
+ if (!(n === void 0 || r.examples || Array.isArray(t)))
60
+ switch (t) {
61
+ case "boolean":
62
+ r.examples = [
63
+ typeof n == "boolean" ? n : n === "true"
64
+ ];
65
+ break;
66
+ case "int":
67
+ r.examples = [parseInt(n, 10)];
68
+ break;
69
+ default:
70
+ r.examples = [n];
71
+ }
72
+ }
73
+ function Ce(t) {
74
+ return Object.keys(t).some(
75
+ (n) => n !== "type" && n !== "name" && n !== "namespace"
76
+ );
77
+ }
78
+ function Me(t, n, r) {
79
+ const { type: i, jsonSchema: u } = bt(
80
+ t,
81
+ r
82
+ );
83
+ Rt(i, n.example, u);
84
+ function a(...l) {
85
+ l.forEach((m) => {
86
+ let y = !0;
87
+ m === "minLength" || m === "maxLength" ? y = n[m] > -1 : m === "multipleOf" && (y = n[m] > 0), n[m] !== void 0 && y && (u[m] = n[m]);
88
+ });
89
+ }
90
+ switch (i) {
91
+ case "int":
92
+ // int, long, float, and double must support the attributes below
93
+ case "long":
94
+ case "float":
95
+ case "double":
96
+ a(
97
+ "minimum",
98
+ "maximum",
99
+ "exclusiveMinimum",
100
+ "exclusiveMaximum",
101
+ "multipleOf"
102
+ );
103
+ break;
104
+ case "string":
105
+ n.logicalType && (u.format = n.logicalType), a("pattern", "minLength", "maxLength");
106
+ break;
107
+ case "array":
108
+ a("minItems", "maxItems", "uniqueItems");
109
+ break;
110
+ }
111
+ }
112
+ function Le(t, n, r) {
113
+ n !== void 0 && (t[n] = r);
114
+ }
115
+ function he(t, n) {
116
+ let r = {};
117
+ if (Array.isArray(t))
118
+ return St(r, t, n);
119
+ const i = Ne(t), u = typeof t == "string" ? t : i.type;
120
+ switch (r.type = At[u], u) {
121
+ case "int": {
122
+ r.minimum = _t, r.maximum = Et;
123
+ break;
124
+ }
125
+ case "long": {
126
+ r.minimum = wt, r.maximum = Tt;
127
+ break;
128
+ }
129
+ case "bytes": {
130
+ r.pattern = Ze;
131
+ break;
132
+ }
133
+ case "fixed": {
134
+ r.pattern = Ze, r.minLength = i.size, r.maxLength = i.size;
135
+ break;
136
+ }
137
+ case "map": {
138
+ r.additionalProperties = he(
139
+ i.values,
140
+ n
141
+ );
142
+ break;
143
+ }
144
+ case "array": {
145
+ r.items = he(
146
+ i.items,
147
+ n
148
+ );
149
+ break;
150
+ }
151
+ case "enum": {
152
+ r.enum = i.symbols;
153
+ break;
154
+ }
155
+ case "float":
156
+ // float and double carry their Avro type as JSON Schema format
157
+ case "double": {
158
+ r.format = u;
159
+ break;
160
+ }
161
+ case "record": {
162
+ const a = $t(i, n, r);
163
+ Le(
164
+ n,
165
+ ye(t),
166
+ r
167
+ ), r.properties = Object.fromEntries(a.entries());
168
+ break;
169
+ }
170
+ default: {
171
+ const a = n[ye(t)] ?? (typeof u == "string" ? n[u] : void 0);
172
+ a && (r = Ce(i) ? { ...a } : a);
173
+ break;
174
+ }
175
+ }
176
+ return je(i, r, n), Me(u, i, r), r;
177
+ }
178
+ function $t(t, n, r) {
179
+ const i = /* @__PURE__ */ new Map();
180
+ for (const u of t.fields ?? []) {
181
+ const a = typeof u.type == "string" ? n[u.type] : void 0;
182
+ if (a) {
183
+ const l = Ce(u) ? { ...a } : a;
184
+ Je(u, r, u.default !== void 0), Ce(u) && (je(u, l, n), Me(u.type, u, l)), i.set(u.name, l);
185
+ } else {
186
+ const l = he(u.type, n);
187
+ Je(u, r, u.default !== void 0), je(u, l, n), Me(u.type, u, l), i.set(u.name, l), Le(n, ye(u.type), l);
188
+ }
189
+ }
190
+ return i;
191
+ }
192
+ function St(t, n, r) {
193
+ const i = [];
194
+ let u = null;
195
+ for (const a of n) {
196
+ const l = he(a, r);
197
+ (typeof a == "string" ? a : Ne(a).type) === "null" ? u = l : (i.push(l), Le(r, ye(a), l));
198
+ }
199
+ return u && i.push(u), t.oneOf = i, t;
200
+ }
201
+ function Ot(t) {
202
+ return he(t, {});
203
+ }
204
+ const et = /* @__PURE__ */ new Set([
205
+ "null",
206
+ "boolean",
207
+ "int",
208
+ "long",
209
+ "float",
210
+ "double",
211
+ "bytes",
212
+ "string",
213
+ "uuid"
214
+ ]), kt = /* @__PURE__ */ new Set(["record", "enum", "array", "map", "fixed"]), tt = /^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;
215
+ function jt(t) {
216
+ const n = [];
217
+ return oe(t, "schema", n, /* @__PURE__ */ new Set()), n;
218
+ }
219
+ function oe(t, n, r, i) {
220
+ if (typeof t == "string") {
221
+ !et.has(t) && !tt.test(t) && r.push(`${n}: "${t}" is not a valid Avro type name`);
222
+ return;
223
+ }
224
+ if (Array.isArray(t)) {
225
+ t.length === 0 && r.push(`${n}: union must have at least one alternative`), t.forEach(
226
+ (a, l) => oe(a, `${n}[${l}]`, r, i)
227
+ );
228
+ return;
229
+ }
230
+ if (!Z(t)) {
231
+ r.push(`${n}: expected an Avro type string, object, or union`);
232
+ return;
233
+ }
234
+ if (i.has(t)) return;
235
+ i.add(t);
236
+ const u = t.type;
237
+ if (typeof u != "string") {
238
+ Array.isArray(u) || Z(u) ? oe(u, `${n}.type`, r, i) : r.push(`${n}: missing "type"`);
239
+ return;
240
+ }
241
+ if (!et.has(u) && !kt.has(u) && !tt.test(u)) {
242
+ r.push(`${n}: unknown Avro type "${u}"`);
243
+ return;
244
+ }
245
+ switch (u) {
246
+ case "record": {
247
+ if (!Array.isArray(t.fields)) {
248
+ r.push(`${n}: record must have a "fields" array`);
249
+ return;
250
+ }
251
+ t.fields.forEach((a, l) => {
252
+ const m = `${n}.fields[${l}]`;
253
+ if (!Z(a) || typeof a.name != "string") {
254
+ r.push(`${m}: field must have a string "name"`);
255
+ return;
256
+ }
257
+ oe(a.type, `${m}.type`, r, i);
258
+ });
259
+ break;
260
+ }
261
+ case "enum": {
262
+ const a = t.symbols;
263
+ (!Array.isArray(a) || a.some((l) => typeof l != "string")) && r.push(`${n}: enum must have a "symbols" array of strings`);
264
+ break;
265
+ }
266
+ case "array": {
267
+ t.items === void 0 ? r.push(`${n}: array must have "items"`) : oe(t.items, `${n}.items`, r, i);
268
+ break;
269
+ }
270
+ case "map": {
271
+ t.values === void 0 ? r.push(`${n}: map must have "values"`) : oe(t.values, `${n}.values`, r, i);
272
+ break;
273
+ }
274
+ case "fixed": {
275
+ typeof t.size != "number" && r.push(`${n}: fixed must have a numeric "size"`);
276
+ break;
277
+ }
278
+ }
279
+ }
280
+ var Ae = { exports: {} }, E = {};
281
+ /**
282
+ * @license React
283
+ * react.production.js
284
+ *
285
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
286
+ *
287
+ * This source code is licensed under the MIT license found in the
288
+ * LICENSE file in the root directory of this source tree.
289
+ */
290
+ var nt;
291
+ function Ct() {
292
+ if (nt) return E;
293
+ nt = 1;
294
+ var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), l = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), A = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), S = Symbol.for("react.activity"), w = Symbol.iterator;
295
+ function N(o) {
296
+ return o === null || typeof o != "object" ? null : (o = w && o[w] || o["@@iterator"], typeof o == "function" ? o : null);
297
+ }
298
+ var U = {
299
+ isMounted: function() {
300
+ return !1;
301
+ },
302
+ enqueueForceUpdate: function() {
303
+ },
304
+ enqueueReplaceState: function() {
305
+ },
306
+ enqueueSetState: function() {
307
+ }
308
+ }, Y = Object.assign, z = {};
309
+ function B(o, f, _) {
310
+ this.props = o, this.context = f, this.refs = z, this.updater = _ || U;
311
+ }
312
+ B.prototype.isReactComponent = {}, B.prototype.setState = function(o, f) {
313
+ if (typeof o != "object" && typeof o != "function" && o != null)
314
+ throw Error(
315
+ "takes an object of state variables to update or a function which returns an object of state variables."
316
+ );
317
+ this.updater.enqueueSetState(this, o, f, "setState");
318
+ }, B.prototype.forceUpdate = function(o) {
319
+ this.updater.enqueueForceUpdate(this, o, "forceUpdate");
320
+ };
321
+ function J() {
322
+ }
323
+ J.prototype = B.prototype;
324
+ function ue(o, f, _) {
325
+ this.props = o, this.context = f, this.refs = z, this.updater = _ || U;
326
+ }
327
+ var ee = ue.prototype = new J();
328
+ ee.constructor = ue, Y(ee, B.prototype), ee.isPureReactComponent = !0;
329
+ var x = Array.isArray;
330
+ function ie() {
331
+ }
332
+ var j = { H: null, A: null, T: null, S: null }, ge = Object.prototype.hasOwnProperty;
333
+ function W(o, f, _) {
334
+ var v = _.ref;
335
+ return {
336
+ $$typeof: t,
337
+ type: o,
338
+ key: f,
339
+ ref: v !== void 0 ? v : null,
340
+ props: _
341
+ };
342
+ }
343
+ function te(o, f) {
344
+ return W(o.type, f, o.props);
345
+ }
346
+ function ae(o) {
347
+ return typeof o == "object" && o !== null && o.$$typeof === t;
348
+ }
349
+ function P(o) {
350
+ var f = { "=": "=0", ":": "=2" };
351
+ return "$" + o.replace(/[=:]/g, function(_) {
352
+ return f[_];
353
+ });
354
+ }
355
+ var ce = /\/+/g;
356
+ function G(o, f) {
357
+ return typeof o == "object" && o !== null && o.key != null ? P("" + o.key) : f.toString(36);
358
+ }
359
+ function Q(o) {
360
+ switch (o.status) {
361
+ case "fulfilled":
362
+ return o.value;
363
+ case "rejected":
364
+ throw o.reason;
365
+ default:
366
+ switch (typeof o.status == "string" ? o.then(ie, ie) : (o.status = "pending", o.then(
367
+ function(f) {
368
+ o.status === "pending" && (o.status = "fulfilled", o.value = f);
369
+ },
370
+ function(f) {
371
+ o.status === "pending" && (o.status = "rejected", o.reason = f);
372
+ }
373
+ )), o.status) {
374
+ case "fulfilled":
375
+ return o.value;
376
+ case "rejected":
377
+ throw o.reason;
378
+ }
379
+ }
380
+ throw o;
381
+ }
382
+ function q(o, f, _, v, O) {
383
+ var k = typeof o;
384
+ (k === "undefined" || k === "boolean") && (o = null);
385
+ var C = !1;
386
+ if (o === null) C = !0;
387
+ else
388
+ switch (k) {
389
+ case "bigint":
390
+ case "string":
391
+ case "number":
392
+ C = !0;
393
+ break;
394
+ case "object":
395
+ switch (o.$$typeof) {
396
+ case t:
397
+ case n:
398
+ C = !0;
399
+ break;
400
+ case g:
401
+ return C = o._init, q(
402
+ C(o._payload),
403
+ f,
404
+ _,
405
+ v,
406
+ O
407
+ );
408
+ }
409
+ }
410
+ if (C)
411
+ return O = O(o), C = v === "" ? "." + G(o, 0) : v, x(O) ? (_ = "", C != null && (_ = C.replace(ce, "$&/") + "/"), q(O, f, _, "", function(X) {
412
+ return X;
413
+ })) : O != null && (ae(O) && (O = te(
414
+ O,
415
+ _ + (O.key == null || o && o.key === O.key ? "" : ("" + O.key).replace(
416
+ ce,
417
+ "$&/"
418
+ ) + "/") + C
419
+ )), f.push(O)), 1;
420
+ C = 0;
421
+ var H = v === "" ? "." : v + ":";
422
+ if (x(o))
423
+ for (var I = 0; I < o.length; I++)
424
+ v = o[I], k = H + G(v, I), C += q(
425
+ v,
426
+ f,
427
+ _,
428
+ k,
429
+ O
430
+ );
431
+ else if (I = N(o), typeof I == "function")
432
+ for (o = I.call(o), I = 0; !(v = o.next()).done; )
433
+ v = v.value, k = H + G(v, I++), C += q(
434
+ v,
435
+ f,
436
+ _,
437
+ k,
438
+ O
439
+ );
440
+ else if (k === "object") {
441
+ if (typeof o.then == "function")
442
+ return q(
443
+ Q(o),
444
+ f,
445
+ _,
446
+ v,
447
+ O
448
+ );
449
+ throw f = String(o), Error(
450
+ "Objects are not valid as a React child (found: " + (f === "[object Object]" ? "object with keys {" + Object.keys(o).join(", ") + "}" : f) + "). If you meant to render a collection of children, use an array instead."
451
+ );
452
+ }
453
+ return C;
454
+ }
455
+ function F(o, f, _) {
456
+ if (o == null) return o;
457
+ var v = [], O = 0;
458
+ return q(o, v, "", "", function(k) {
459
+ return f.call(_, k, O++);
460
+ }), v;
461
+ }
462
+ function fe(o) {
463
+ if (o._status === -1) {
464
+ var f = o._result;
465
+ f = f(), f.then(
466
+ function(_) {
467
+ (o._status === 0 || o._status === -1) && (o._status = 1, o._result = _);
468
+ },
469
+ function(_) {
470
+ (o._status === 0 || o._status === -1) && (o._status = 2, o._result = _);
471
+ }
472
+ ), o._status === -1 && (o._status = 0, o._result = f);
473
+ }
474
+ if (o._status === 1) return o._result.default;
475
+ throw o._result;
476
+ }
477
+ var ne = typeof reportError == "function" ? reportError : function(o) {
478
+ if (typeof window == "object" && typeof window.ErrorEvent == "function") {
479
+ var f = new window.ErrorEvent("error", {
480
+ bubbles: !0,
481
+ cancelable: !0,
482
+ message: typeof o == "object" && o !== null && typeof o.message == "string" ? String(o.message) : String(o),
483
+ error: o
484
+ });
485
+ if (!window.dispatchEvent(f)) return;
486
+ } else if (typeof process == "object" && typeof process.emit == "function") {
487
+ process.emit("uncaughtException", o);
488
+ return;
489
+ }
490
+ console.error(o);
491
+ }, ve = {
492
+ map: F,
493
+ forEach: function(o, f, _) {
494
+ F(
495
+ o,
496
+ function() {
497
+ f.apply(this, arguments);
498
+ },
499
+ _
500
+ );
501
+ },
502
+ count: function(o) {
503
+ var f = 0;
504
+ return F(o, function() {
505
+ f++;
506
+ }), f;
507
+ },
508
+ toArray: function(o) {
509
+ return F(o, function(f) {
510
+ return f;
511
+ }) || [];
512
+ },
513
+ only: function(o) {
514
+ if (!ae(o))
515
+ throw Error(
516
+ "React.Children.only expected to receive a single React element child."
517
+ );
518
+ return o;
519
+ }
520
+ };
521
+ return E.Activity = S, E.Children = ve, E.Component = B, E.Fragment = r, E.Profiler = u, E.PureComponent = ue, E.StrictMode = i, E.Suspense = y, E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = j, E.__COMPILER_RUNTIME = {
522
+ __proto__: null,
523
+ c: function(o) {
524
+ return j.H.useMemoCache(o);
525
+ }
526
+ }, E.cache = function(o) {
527
+ return function() {
528
+ return o.apply(null, arguments);
529
+ };
530
+ }, E.cacheSignal = function() {
531
+ return null;
532
+ }, E.cloneElement = function(o, f, _) {
533
+ if (o == null)
534
+ throw Error(
535
+ "The argument must be a React element, but you passed " + o + "."
536
+ );
537
+ var v = Y({}, o.props), O = o.key;
538
+ if (f != null)
539
+ for (k in f.key !== void 0 && (O = "" + f.key), f)
540
+ !ge.call(f, k) || k === "key" || k === "__self" || k === "__source" || k === "ref" && f.ref === void 0 || (v[k] = f[k]);
541
+ var k = arguments.length - 2;
542
+ if (k === 1) v.children = _;
543
+ else if (1 < k) {
544
+ for (var C = Array(k), H = 0; H < k; H++)
545
+ C[H] = arguments[H + 2];
546
+ v.children = C;
547
+ }
548
+ return W(o.type, O, v);
549
+ }, E.createContext = function(o) {
550
+ return o = {
551
+ $$typeof: l,
552
+ _currentValue: o,
553
+ _currentValue2: o,
554
+ _threadCount: 0,
555
+ Provider: null,
556
+ Consumer: null
557
+ }, o.Provider = o, o.Consumer = {
558
+ $$typeof: a,
559
+ _context: o
560
+ }, o;
561
+ }, E.createElement = function(o, f, _) {
562
+ var v, O = {}, k = null;
563
+ if (f != null)
564
+ for (v in f.key !== void 0 && (k = "" + f.key), f)
565
+ ge.call(f, v) && v !== "key" && v !== "__self" && v !== "__source" && (O[v] = f[v]);
566
+ var C = arguments.length - 2;
567
+ if (C === 1) O.children = _;
568
+ else if (1 < C) {
569
+ for (var H = Array(C), I = 0; I < C; I++)
570
+ H[I] = arguments[I + 2];
571
+ O.children = H;
572
+ }
573
+ if (o && o.defaultProps)
574
+ for (v in C = o.defaultProps, C)
575
+ O[v] === void 0 && (O[v] = C[v]);
576
+ return W(o, k, O);
577
+ }, E.createRef = function() {
578
+ return { current: null };
579
+ }, E.forwardRef = function(o) {
580
+ return { $$typeof: m, render: o };
581
+ }, E.isValidElement = ae, E.lazy = function(o) {
582
+ return {
583
+ $$typeof: g,
584
+ _payload: { _status: -1, _result: o },
585
+ _init: fe
586
+ };
587
+ }, E.memo = function(o, f) {
588
+ return {
589
+ $$typeof: A,
590
+ type: o,
591
+ compare: f === void 0 ? null : f
592
+ };
593
+ }, E.startTransition = function(o) {
594
+ var f = j.T, _ = {};
595
+ j.T = _;
596
+ try {
597
+ var v = o(), O = j.S;
598
+ O !== null && O(_, v), typeof v == "object" && v !== null && typeof v.then == "function" && v.then(ie, ne);
599
+ } catch (k) {
600
+ ne(k);
601
+ } finally {
602
+ f !== null && _.types !== null && (f.types = _.types), j.T = f;
603
+ }
604
+ }, E.unstable_useCacheRefresh = function() {
605
+ return j.H.useCacheRefresh();
606
+ }, E.use = function(o) {
607
+ return j.H.use(o);
608
+ }, E.useActionState = function(o, f, _) {
609
+ return j.H.useActionState(o, f, _);
610
+ }, E.useCallback = function(o, f) {
611
+ return j.H.useCallback(o, f);
612
+ }, E.useContext = function(o) {
613
+ return j.H.useContext(o);
614
+ }, E.useDebugValue = function() {
615
+ }, E.useDeferredValue = function(o, f) {
616
+ return j.H.useDeferredValue(o, f);
617
+ }, E.useEffect = function(o, f) {
618
+ return j.H.useEffect(o, f);
619
+ }, E.useEffectEvent = function(o) {
620
+ return j.H.useEffectEvent(o);
621
+ }, E.useId = function() {
622
+ return j.H.useId();
623
+ }, E.useImperativeHandle = function(o, f, _) {
624
+ return j.H.useImperativeHandle(o, f, _);
625
+ }, E.useInsertionEffect = function(o, f) {
626
+ return j.H.useInsertionEffect(o, f);
627
+ }, E.useLayoutEffect = function(o, f) {
628
+ return j.H.useLayoutEffect(o, f);
629
+ }, E.useMemo = function(o, f) {
630
+ return j.H.useMemo(o, f);
631
+ }, E.useOptimistic = function(o, f) {
632
+ return j.H.useOptimistic(o, f);
633
+ }, E.useReducer = function(o, f, _) {
634
+ return j.H.useReducer(o, f, _);
635
+ }, E.useRef = function(o) {
636
+ return j.H.useRef(o);
637
+ }, E.useState = function(o) {
638
+ return j.H.useState(o);
639
+ }, E.useSyncExternalStore = function(o, f, _) {
640
+ return j.H.useSyncExternalStore(
641
+ o,
642
+ f,
643
+ _
644
+ );
645
+ }, E.useTransition = function() {
646
+ return j.H.useTransition();
647
+ }, E.version = "19.2.7", E;
648
+ }
649
+ var de = { exports: {} };
650
+ /**
651
+ * @license React
652
+ * react.development.js
653
+ *
654
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
655
+ *
656
+ * This source code is licensed under the MIT license found in the
657
+ * LICENSE file in the root directory of this source tree.
658
+ */
659
+ de.exports;
660
+ var rt;
661
+ function Mt() {
662
+ return rt || (rt = 1, (function(t, n) {
663
+ process.env.NODE_ENV !== "production" && (function() {
664
+ function r(e, s) {
665
+ Object.defineProperty(a.prototype, e, {
666
+ get: function() {
667
+ console.warn(
668
+ "%s(...) is deprecated in plain JavaScript React classes. %s",
669
+ s[0],
670
+ s[1]
671
+ );
672
+ }
673
+ });
674
+ }
675
+ function i(e) {
676
+ return e === null || typeof e != "object" ? null : (e = Ye && e[Ye] || e["@@iterator"], typeof e == "function" ? e : null);
677
+ }
678
+ function u(e, s) {
679
+ e = (e = e.constructor) && (e.displayName || e.name) || "ReactClass";
680
+ var c = e + "." + s;
681
+ He[c] || (console.error(
682
+ "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
683
+ s,
684
+ e
685
+ ), He[c] = !0);
686
+ }
687
+ function a(e, s, c) {
688
+ this.props = e, this.context = s, this.refs = Se, this.updater = c || De;
689
+ }
690
+ function l() {
691
+ }
692
+ function m(e, s, c) {
693
+ this.props = e, this.context = s, this.refs = Se, this.updater = c || De;
694
+ }
695
+ function y() {
696
+ }
697
+ function A(e) {
698
+ return "" + e;
699
+ }
700
+ function g(e) {
701
+ try {
702
+ A(e);
703
+ var s = !1;
704
+ } catch {
705
+ s = !0;
706
+ }
707
+ if (s) {
708
+ s = console;
709
+ var c = s.error, p = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
710
+ return c.call(
711
+ s,
712
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
713
+ p
714
+ ), A(e);
715
+ }
716
+ }
717
+ function S(e) {
718
+ if (e == null) return null;
719
+ if (typeof e == "function")
720
+ return e.$$typeof === dt ? null : e.displayName || e.name || null;
721
+ if (typeof e == "string") return e;
722
+ switch (e) {
723
+ case o:
724
+ return "Fragment";
725
+ case _:
726
+ return "Profiler";
727
+ case f:
728
+ return "StrictMode";
729
+ case C:
730
+ return "Suspense";
731
+ case H:
732
+ return "SuspenseList";
733
+ case Ie:
734
+ return "Activity";
735
+ }
736
+ if (typeof e == "object")
737
+ switch (typeof e.tag == "number" && console.error(
738
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
739
+ ), e.$$typeof) {
740
+ case ve:
741
+ return "Portal";
742
+ case O:
743
+ return e.displayName || "Context";
744
+ case v:
745
+ return (e._context.displayName || "Context") + ".Consumer";
746
+ case k:
747
+ var s = e.render;
748
+ return e = e.displayName, e || (e = s.displayName || s.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
749
+ case I:
750
+ return s = e.displayName || null, s !== null ? s : S(e.type) || "Memo";
751
+ case X:
752
+ s = e._payload, e = e._init;
753
+ try {
754
+ return S(e(s));
755
+ } catch {
756
+ }
757
+ }
758
+ return null;
759
+ }
760
+ function w(e) {
761
+ if (e === o) return "<>";
762
+ if (typeof e == "object" && e !== null && e.$$typeof === X)
763
+ return "<...>";
764
+ try {
765
+ var s = S(e);
766
+ return s ? "<" + s + ">" : "<...>";
767
+ } catch {
768
+ return "<...>";
769
+ }
770
+ }
771
+ function N() {
772
+ var e = b.A;
773
+ return e === null ? null : e.getOwner();
774
+ }
775
+ function U() {
776
+ return Error("react-stack-top-frame");
777
+ }
778
+ function Y(e) {
779
+ if (_e.call(e, "key")) {
780
+ var s = Object.getOwnPropertyDescriptor(e, "key").get;
781
+ if (s && s.isReactWarning) return !1;
782
+ }
783
+ return e.key !== void 0;
784
+ }
785
+ function z(e, s) {
786
+ function c() {
787
+ We || (We = !0, console.error(
788
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
789
+ s
790
+ ));
791
+ }
792
+ c.isReactWarning = !0, Object.defineProperty(e, "key", {
793
+ get: c,
794
+ configurable: !0
795
+ });
796
+ }
797
+ function B() {
798
+ var e = S(this.type);
799
+ return Ge[e] || (Ge[e] = !0, console.error(
800
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
801
+ )), e = this.props.ref, e !== void 0 ? e : null;
802
+ }
803
+ function J(e, s, c, p, h, R) {
804
+ var T = c.ref;
805
+ return e = {
806
+ $$typeof: ne,
807
+ type: e,
808
+ key: s,
809
+ props: c,
810
+ _owner: p
811
+ }, (T !== void 0 ? T : null) !== null ? Object.defineProperty(e, "ref", {
812
+ enumerable: !1,
813
+ get: B
814
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
815
+ configurable: !1,
816
+ enumerable: !1,
817
+ writable: !0,
818
+ value: 0
819
+ }), Object.defineProperty(e, "_debugInfo", {
820
+ configurable: !1,
821
+ enumerable: !1,
822
+ writable: !0,
823
+ value: null
824
+ }), Object.defineProperty(e, "_debugStack", {
825
+ configurable: !1,
826
+ enumerable: !1,
827
+ writable: !0,
828
+ value: h
829
+ }), Object.defineProperty(e, "_debugTask", {
830
+ configurable: !1,
831
+ enumerable: !1,
832
+ writable: !0,
833
+ value: R
834
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
835
+ }
836
+ function ue(e, s) {
837
+ return s = J(
838
+ e.type,
839
+ s,
840
+ e.props,
841
+ e._owner,
842
+ e._debugStack,
843
+ e._debugTask
844
+ ), e._store && (s._store.validated = e._store.validated), s;
845
+ }
846
+ function ee(e) {
847
+ x(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === X && (e._payload.status === "fulfilled" ? x(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
848
+ }
849
+ function x(e) {
850
+ return typeof e == "object" && e !== null && e.$$typeof === ne;
851
+ }
852
+ function ie(e) {
853
+ var s = { "=": "=0", ":": "=2" };
854
+ return "$" + e.replace(/[=:]/g, function(c) {
855
+ return s[c];
856
+ });
857
+ }
858
+ function j(e, s) {
859
+ return typeof e == "object" && e !== null && e.key != null ? (g(e.key), ie("" + e.key)) : s.toString(36);
860
+ }
861
+ function ge(e) {
862
+ switch (e.status) {
863
+ case "fulfilled":
864
+ return e.value;
865
+ case "rejected":
866
+ throw e.reason;
867
+ default:
868
+ switch (typeof e.status == "string" ? e.then(y, y) : (e.status = "pending", e.then(
869
+ function(s) {
870
+ e.status === "pending" && (e.status = "fulfilled", e.value = s);
871
+ },
872
+ function(s) {
873
+ e.status === "pending" && (e.status = "rejected", e.reason = s);
874
+ }
875
+ )), e.status) {
876
+ case "fulfilled":
877
+ return e.value;
878
+ case "rejected":
879
+ throw e.reason;
880
+ }
881
+ }
882
+ throw e;
883
+ }
884
+ function W(e, s, c, p, h) {
885
+ var R = typeof e;
886
+ (R === "undefined" || R === "boolean") && (e = null);
887
+ var T = !1;
888
+ if (e === null) T = !0;
889
+ else
890
+ switch (R) {
891
+ case "bigint":
892
+ case "string":
893
+ case "number":
894
+ T = !0;
895
+ break;
896
+ case "object":
897
+ switch (e.$$typeof) {
898
+ case ne:
899
+ case ve:
900
+ T = !0;
901
+ break;
902
+ case X:
903
+ return T = e._init, W(
904
+ T(e._payload),
905
+ s,
906
+ c,
907
+ p,
908
+ h
909
+ );
910
+ }
911
+ }
912
+ if (T) {
913
+ T = e, h = h(T);
914
+ var M = p === "" ? "." + j(T, 0) : p;
915
+ return qe(h) ? (c = "", M != null && (c = M.replace(Ke, "$&/") + "/"), W(h, s, c, "", function(K) {
916
+ return K;
917
+ })) : h != null && (x(h) && (h.key != null && (T && T.key === h.key || g(h.key)), c = ue(
918
+ h,
919
+ c + (h.key == null || T && T.key === h.key ? "" : ("" + h.key).replace(
920
+ Ke,
921
+ "$&/"
922
+ ) + "/") + M
923
+ ), p !== "" && T != null && x(T) && T.key == null && T._store && !T._store.validated && (c._store.validated = 2), h = c), s.push(h)), 1;
924
+ }
925
+ if (T = 0, M = p === "" ? "." : p + ":", qe(e))
926
+ for (var $ = 0; $ < e.length; $++)
927
+ p = e[$], R = M + j(p, $), T += W(
928
+ p,
929
+ s,
930
+ c,
931
+ R,
932
+ h
933
+ );
934
+ else if ($ = i(e), typeof $ == "function")
935
+ for ($ === e.entries && (Fe || console.warn(
936
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
937
+ ), Fe = !0), e = $.call(e), $ = 0; !(p = e.next()).done; )
938
+ p = p.value, R = M + j(p, $++), T += W(
939
+ p,
940
+ s,
941
+ c,
942
+ R,
943
+ h
944
+ );
945
+ else if (R === "object") {
946
+ if (typeof e.then == "function")
947
+ return W(
948
+ ge(e),
949
+ s,
950
+ c,
951
+ p,
952
+ h
953
+ );
954
+ throw s = String(e), Error(
955
+ "Objects are not valid as a React child (found: " + (s === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : s) + "). If you meant to render a collection of children, use an array instead."
956
+ );
957
+ }
958
+ return T;
959
+ }
960
+ function te(e, s, c) {
961
+ if (e == null) return e;
962
+ var p = [], h = 0;
963
+ return W(e, p, "", "", function(R) {
964
+ return s.call(c, R, h++);
965
+ }), p;
966
+ }
967
+ function ae(e) {
968
+ if (e._status === -1) {
969
+ var s = e._ioInfo;
970
+ s != null && (s.start = s.end = performance.now()), s = e._result;
971
+ var c = s();
972
+ if (c.then(
973
+ function(h) {
974
+ if (e._status === 0 || e._status === -1) {
975
+ e._status = 1, e._result = h;
976
+ var R = e._ioInfo;
977
+ R != null && (R.end = performance.now()), c.status === void 0 && (c.status = "fulfilled", c.value = h);
978
+ }
979
+ },
980
+ function(h) {
981
+ if (e._status === 0 || e._status === -1) {
982
+ e._status = 2, e._result = h;
983
+ var R = e._ioInfo;
984
+ R != null && (R.end = performance.now()), c.status === void 0 && (c.status = "rejected", c.reason = h);
985
+ }
986
+ }
987
+ ), s = e._ioInfo, s != null) {
988
+ s.value = c;
989
+ var p = c.displayName;
990
+ typeof p == "string" && (s.name = p);
991
+ }
992
+ e._status === -1 && (e._status = 0, e._result = c);
993
+ }
994
+ if (e._status === 1)
995
+ return s = e._result, s === void 0 && console.error(
996
+ `lazy: Expected the result of a dynamic import() call. Instead received: %s
997
+
998
+ Your code should look like:
999
+ const MyComponent = lazy(() => import('./MyComponent'))
1000
+
1001
+ Did you accidentally put curly braces around the import?`,
1002
+ s
1003
+ ), "default" in s || console.error(
1004
+ `lazy: Expected the result of a dynamic import() call. Instead received: %s
1005
+
1006
+ Your code should look like:
1007
+ const MyComponent = lazy(() => import('./MyComponent'))`,
1008
+ s
1009
+ ), s.default;
1010
+ throw e._result;
1011
+ }
1012
+ function P() {
1013
+ var e = b.H;
1014
+ return e === null && console.error(
1015
+ `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1016
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
1017
+ 2. You might be breaking the Rules of Hooks
1018
+ 3. You might have more than one copy of React in the same app
1019
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
1020
+ ), e;
1021
+ }
1022
+ function ce() {
1023
+ b.asyncTransitions--;
1024
+ }
1025
+ function G(e) {
1026
+ if (Ee === null)
1027
+ try {
1028
+ var s = ("require" + Math.random()).slice(0, 7);
1029
+ Ee = (t && t[s]).call(
1030
+ t,
1031
+ "timers"
1032
+ ).setImmediate;
1033
+ } catch {
1034
+ Ee = function(p) {
1035
+ Xe === !1 && (Xe = !0, typeof MessageChannel > "u" && console.error(
1036
+ "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
1037
+ ));
1038
+ var h = new MessageChannel();
1039
+ h.port1.onmessage = p, h.port2.postMessage(void 0);
1040
+ };
1041
+ }
1042
+ return Ee(e);
1043
+ }
1044
+ function Q(e) {
1045
+ return 1 < e.length && typeof AggregateError == "function" ? new AggregateError(e) : e[0];
1046
+ }
1047
+ function q(e, s) {
1048
+ s !== we - 1 && console.error(
1049
+ "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
1050
+ ), we = s;
1051
+ }
1052
+ function F(e, s, c) {
1053
+ var p = b.actQueue;
1054
+ if (p !== null)
1055
+ if (p.length !== 0)
1056
+ try {
1057
+ fe(p), G(function() {
1058
+ return F(e, s, c);
1059
+ });
1060
+ return;
1061
+ } catch (h) {
1062
+ b.thrownErrors.push(h);
1063
+ }
1064
+ else b.actQueue = null;
1065
+ 0 < b.thrownErrors.length ? (p = Q(b.thrownErrors), b.thrownErrors.length = 0, c(p)) : s(e);
1066
+ }
1067
+ function fe(e) {
1068
+ if (!Oe) {
1069
+ Oe = !0;
1070
+ var s = 0;
1071
+ try {
1072
+ for (; s < e.length; s++) {
1073
+ var c = e[s];
1074
+ do {
1075
+ b.didUsePromise = !1;
1076
+ var p = c(!1);
1077
+ if (p !== null) {
1078
+ if (b.didUsePromise) {
1079
+ e[s] = c, e.splice(0, s);
1080
+ return;
1081
+ }
1082
+ c = p;
1083
+ } else break;
1084
+ } while (!0);
1085
+ }
1086
+ e.length = 0;
1087
+ } catch (h) {
1088
+ e.splice(0, s + 1), b.thrownErrors.push(h);
1089
+ } finally {
1090
+ Oe = !1;
1091
+ }
1092
+ }
1093
+ }
1094
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1095
+ var ne = Symbol.for("react.transitional.element"), ve = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), O = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), H = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), X = Symbol.for("react.lazy"), Ie = Symbol.for("react.activity"), Ye = Symbol.iterator, He = {}, De = {
1096
+ isMounted: function() {
1097
+ return !1;
1098
+ },
1099
+ enqueueForceUpdate: function(e) {
1100
+ u(e, "forceUpdate");
1101
+ },
1102
+ enqueueReplaceState: function(e) {
1103
+ u(e, "replaceState");
1104
+ },
1105
+ enqueueSetState: function(e) {
1106
+ u(e, "setState");
1107
+ }
1108
+ }, ze = Object.assign, Se = {};
1109
+ Object.freeze(Se), a.prototype.isReactComponent = {}, a.prototype.setState = function(e, s) {
1110
+ if (typeof e != "object" && typeof e != "function" && e != null)
1111
+ throw Error(
1112
+ "takes an object of state variables to update or a function which returns an object of state variables."
1113
+ );
1114
+ this.updater.enqueueSetState(this, e, s, "setState");
1115
+ }, a.prototype.forceUpdate = function(e) {
1116
+ this.updater.enqueueForceUpdate(this, e, "forceUpdate");
1117
+ };
1118
+ var D = {
1119
+ isMounted: [
1120
+ "isMounted",
1121
+ "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
1122
+ ],
1123
+ replaceState: [
1124
+ "replaceState",
1125
+ "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
1126
+ ]
1127
+ };
1128
+ for (le in D)
1129
+ D.hasOwnProperty(le) && r(le, D[le]);
1130
+ l.prototype = a.prototype, D = m.prototype = new l(), D.constructor = m, ze(D, a.prototype), D.isPureReactComponent = !0;
1131
+ var qe = Array.isArray, dt = Symbol.for("react.client.reference"), b = {
1132
+ H: null,
1133
+ A: null,
1134
+ T: null,
1135
+ S: null,
1136
+ actQueue: null,
1137
+ asyncTransitions: 0,
1138
+ isBatchingLegacy: !1,
1139
+ didScheduleLegacyUpdate: !1,
1140
+ didUsePromise: !1,
1141
+ thrownErrors: [],
1142
+ getCurrentStack: null,
1143
+ recentlyCreatedOwnerStacks: 0
1144
+ }, _e = Object.prototype.hasOwnProperty, Be = console.createTask ? console.createTask : function() {
1145
+ return null;
1146
+ };
1147
+ D = {
1148
+ react_stack_bottom_frame: function(e) {
1149
+ return e();
1150
+ }
1151
+ };
1152
+ var We, xe, Ge = {}, mt = D.react_stack_bottom_frame.bind(
1153
+ D,
1154
+ U
1155
+ )(), yt = Be(w(U)), Fe = !1, Ke = /\/+/g, Qe = typeof reportError == "function" ? reportError : function(e) {
1156
+ if (typeof window == "object" && typeof window.ErrorEvent == "function") {
1157
+ var s = new window.ErrorEvent("error", {
1158
+ bubbles: !0,
1159
+ cancelable: !0,
1160
+ message: typeof e == "object" && e !== null && typeof e.message == "string" ? String(e.message) : String(e),
1161
+ error: e
1162
+ });
1163
+ if (!window.dispatchEvent(s)) return;
1164
+ } else if (typeof process == "object" && typeof process.emit == "function") {
1165
+ process.emit("uncaughtException", e);
1166
+ return;
1167
+ }
1168
+ console.error(e);
1169
+ }, Xe = !1, Ee = null, we = 0, Te = !1, Oe = !1, Ve = typeof queueMicrotask == "function" ? function(e) {
1170
+ queueMicrotask(function() {
1171
+ return queueMicrotask(e);
1172
+ });
1173
+ } : G;
1174
+ D = Object.freeze({
1175
+ __proto__: null,
1176
+ c: function(e) {
1177
+ return P().useMemoCache(e);
1178
+ }
1179
+ });
1180
+ var le = {
1181
+ map: te,
1182
+ forEach: function(e, s, c) {
1183
+ te(
1184
+ e,
1185
+ function() {
1186
+ s.apply(this, arguments);
1187
+ },
1188
+ c
1189
+ );
1190
+ },
1191
+ count: function(e) {
1192
+ var s = 0;
1193
+ return te(e, function() {
1194
+ s++;
1195
+ }), s;
1196
+ },
1197
+ toArray: function(e) {
1198
+ return te(e, function(s) {
1199
+ return s;
1200
+ }) || [];
1201
+ },
1202
+ only: function(e) {
1203
+ if (!x(e))
1204
+ throw Error(
1205
+ "React.Children.only expected to receive a single React element child."
1206
+ );
1207
+ return e;
1208
+ }
1209
+ };
1210
+ n.Activity = Ie, n.Children = le, n.Component = a, n.Fragment = o, n.Profiler = _, n.PureComponent = m, n.StrictMode = f, n.Suspense = C, n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = b, n.__COMPILER_RUNTIME = D, n.act = function(e) {
1211
+ var s = b.actQueue, c = we;
1212
+ we++;
1213
+ var p = b.actQueue = s !== null ? s : [], h = !1;
1214
+ try {
1215
+ var R = e();
1216
+ } catch ($) {
1217
+ b.thrownErrors.push($);
1218
+ }
1219
+ if (0 < b.thrownErrors.length)
1220
+ throw q(s, c), e = Q(b.thrownErrors), b.thrownErrors.length = 0, e;
1221
+ if (R !== null && typeof R == "object" && typeof R.then == "function") {
1222
+ var T = R;
1223
+ return Ve(function() {
1224
+ h || Te || (Te = !0, console.error(
1225
+ "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
1226
+ ));
1227
+ }), {
1228
+ then: function($, K) {
1229
+ h = !0, T.then(
1230
+ function(re) {
1231
+ if (q(s, c), c === 0) {
1232
+ try {
1233
+ fe(p), G(function() {
1234
+ return F(
1235
+ re,
1236
+ $,
1237
+ K
1238
+ );
1239
+ });
1240
+ } catch (gt) {
1241
+ b.thrownErrors.push(gt);
1242
+ }
1243
+ if (0 < b.thrownErrors.length) {
1244
+ var ht = Q(
1245
+ b.thrownErrors
1246
+ );
1247
+ b.thrownErrors.length = 0, K(ht);
1248
+ }
1249
+ } else $(re);
1250
+ },
1251
+ function(re) {
1252
+ q(s, c), 0 < b.thrownErrors.length && (re = Q(
1253
+ b.thrownErrors
1254
+ ), b.thrownErrors.length = 0), K(re);
1255
+ }
1256
+ );
1257
+ }
1258
+ };
1259
+ }
1260
+ var M = R;
1261
+ if (q(s, c), c === 0 && (fe(p), p.length !== 0 && Ve(function() {
1262
+ h || Te || (Te = !0, console.error(
1263
+ "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
1264
+ ));
1265
+ }), b.actQueue = null), 0 < b.thrownErrors.length)
1266
+ throw e = Q(b.thrownErrors), b.thrownErrors.length = 0, e;
1267
+ return {
1268
+ then: function($, K) {
1269
+ h = !0, c === 0 ? (b.actQueue = p, G(function() {
1270
+ return F(
1271
+ M,
1272
+ $,
1273
+ K
1274
+ );
1275
+ })) : $(M);
1276
+ }
1277
+ };
1278
+ }, n.cache = function(e) {
1279
+ return function() {
1280
+ return e.apply(null, arguments);
1281
+ };
1282
+ }, n.cacheSignal = function() {
1283
+ return null;
1284
+ }, n.captureOwnerStack = function() {
1285
+ var e = b.getCurrentStack;
1286
+ return e === null ? null : e();
1287
+ }, n.cloneElement = function(e, s, c) {
1288
+ if (e == null)
1289
+ throw Error(
1290
+ "The argument must be a React element, but you passed " + e + "."
1291
+ );
1292
+ var p = ze({}, e.props), h = e.key, R = e._owner;
1293
+ if (s != null) {
1294
+ var T;
1295
+ e: {
1296
+ if (_e.call(s, "ref") && (T = Object.getOwnPropertyDescriptor(
1297
+ s,
1298
+ "ref"
1299
+ ).get) && T.isReactWarning) {
1300
+ T = !1;
1301
+ break e;
1302
+ }
1303
+ T = s.ref !== void 0;
1304
+ }
1305
+ T && (R = N()), Y(s) && (g(s.key), h = "" + s.key);
1306
+ for (M in s)
1307
+ !_e.call(s, M) || M === "key" || M === "__self" || M === "__source" || M === "ref" && s.ref === void 0 || (p[M] = s[M]);
1308
+ }
1309
+ var M = arguments.length - 2;
1310
+ if (M === 1) p.children = c;
1311
+ else if (1 < M) {
1312
+ T = Array(M);
1313
+ for (var $ = 0; $ < M; $++)
1314
+ T[$] = arguments[$ + 2];
1315
+ p.children = T;
1316
+ }
1317
+ for (p = J(
1318
+ e.type,
1319
+ h,
1320
+ p,
1321
+ R,
1322
+ e._debugStack,
1323
+ e._debugTask
1324
+ ), h = 2; h < arguments.length; h++)
1325
+ ee(arguments[h]);
1326
+ return p;
1327
+ }, n.createContext = function(e) {
1328
+ return e = {
1329
+ $$typeof: O,
1330
+ _currentValue: e,
1331
+ _currentValue2: e,
1332
+ _threadCount: 0,
1333
+ Provider: null,
1334
+ Consumer: null
1335
+ }, e.Provider = e, e.Consumer = {
1336
+ $$typeof: v,
1337
+ _context: e
1338
+ }, e._currentRenderer = null, e._currentRenderer2 = null, e;
1339
+ }, n.createElement = function(e, s, c) {
1340
+ for (var p = 2; p < arguments.length; p++)
1341
+ ee(arguments[p]);
1342
+ p = {};
1343
+ var h = null;
1344
+ if (s != null)
1345
+ for ($ in xe || !("__self" in s) || "key" in s || (xe = !0, console.warn(
1346
+ "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
1347
+ )), Y(s) && (g(s.key), h = "" + s.key), s)
1348
+ _e.call(s, $) && $ !== "key" && $ !== "__self" && $ !== "__source" && (p[$] = s[$]);
1349
+ var R = arguments.length - 2;
1350
+ if (R === 1) p.children = c;
1351
+ else if (1 < R) {
1352
+ for (var T = Array(R), M = 0; M < R; M++)
1353
+ T[M] = arguments[M + 2];
1354
+ Object.freeze && Object.freeze(T), p.children = T;
1355
+ }
1356
+ if (e && e.defaultProps)
1357
+ for ($ in R = e.defaultProps, R)
1358
+ p[$] === void 0 && (p[$] = R[$]);
1359
+ h && z(
1360
+ p,
1361
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
1362
+ );
1363
+ var $ = 1e4 > b.recentlyCreatedOwnerStacks++;
1364
+ return J(
1365
+ e,
1366
+ h,
1367
+ p,
1368
+ N(),
1369
+ $ ? Error("react-stack-top-frame") : mt,
1370
+ $ ? Be(w(e)) : yt
1371
+ );
1372
+ }, n.createRef = function() {
1373
+ var e = { current: null };
1374
+ return Object.seal(e), e;
1375
+ }, n.forwardRef = function(e) {
1376
+ e != null && e.$$typeof === I ? console.error(
1377
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1378
+ ) : typeof e != "function" ? console.error(
1379
+ "forwardRef requires a render function but was given %s.",
1380
+ e === null ? "null" : typeof e
1381
+ ) : e.length !== 0 && e.length !== 2 && console.error(
1382
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
1383
+ e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
1384
+ ), e != null && e.defaultProps != null && console.error(
1385
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1386
+ );
1387
+ var s = { $$typeof: k, render: e }, c;
1388
+ return Object.defineProperty(s, "displayName", {
1389
+ enumerable: !1,
1390
+ configurable: !0,
1391
+ get: function() {
1392
+ return c;
1393
+ },
1394
+ set: function(p) {
1395
+ c = p, e.name || e.displayName || (Object.defineProperty(e, "name", { value: p }), e.displayName = p);
1396
+ }
1397
+ }), s;
1398
+ }, n.isValidElement = x, n.lazy = function(e) {
1399
+ e = { _status: -1, _result: e };
1400
+ var s = {
1401
+ $$typeof: X,
1402
+ _payload: e,
1403
+ _init: ae
1404
+ }, c = {
1405
+ name: "lazy",
1406
+ start: -1,
1407
+ end: -1,
1408
+ value: null,
1409
+ owner: null,
1410
+ debugStack: Error("react-stack-top-frame"),
1411
+ debugTask: console.createTask ? console.createTask("lazy()") : null
1412
+ };
1413
+ return e._ioInfo = c, s._debugInfo = [{ awaited: c }], s;
1414
+ }, n.memo = function(e, s) {
1415
+ e == null && console.error(
1416
+ "memo: The first argument must be a component. Instead received: %s",
1417
+ e === null ? "null" : typeof e
1418
+ ), s = {
1419
+ $$typeof: I,
1420
+ type: e,
1421
+ compare: s === void 0 ? null : s
1422
+ };
1423
+ var c;
1424
+ return Object.defineProperty(s, "displayName", {
1425
+ enumerable: !1,
1426
+ configurable: !0,
1427
+ get: function() {
1428
+ return c;
1429
+ },
1430
+ set: function(p) {
1431
+ c = p, e.name || e.displayName || (Object.defineProperty(e, "name", { value: p }), e.displayName = p);
1432
+ }
1433
+ }), s;
1434
+ }, n.startTransition = function(e) {
1435
+ var s = b.T, c = {};
1436
+ c._updatedFibers = /* @__PURE__ */ new Set(), b.T = c;
1437
+ try {
1438
+ var p = e(), h = b.S;
1439
+ h !== null && h(c, p), typeof p == "object" && p !== null && typeof p.then == "function" && (b.asyncTransitions++, p.then(ce, ce), p.then(y, Qe));
1440
+ } catch (R) {
1441
+ Qe(R);
1442
+ } finally {
1443
+ s === null && c._updatedFibers && (e = c._updatedFibers.size, c._updatedFibers.clear(), 10 < e && console.warn(
1444
+ "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
1445
+ )), s !== null && c.types !== null && (s.types !== null && s.types !== c.types && console.error(
1446
+ "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
1447
+ ), s.types = c.types), b.T = s;
1448
+ }
1449
+ }, n.unstable_useCacheRefresh = function() {
1450
+ return P().useCacheRefresh();
1451
+ }, n.use = function(e) {
1452
+ return P().use(e);
1453
+ }, n.useActionState = function(e, s, c) {
1454
+ return P().useActionState(
1455
+ e,
1456
+ s,
1457
+ c
1458
+ );
1459
+ }, n.useCallback = function(e, s) {
1460
+ return P().useCallback(e, s);
1461
+ }, n.useContext = function(e) {
1462
+ var s = P();
1463
+ return e.$$typeof === v && console.error(
1464
+ "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1465
+ ), s.useContext(e);
1466
+ }, n.useDebugValue = function(e, s) {
1467
+ return P().useDebugValue(e, s);
1468
+ }, n.useDeferredValue = function(e, s) {
1469
+ return P().useDeferredValue(e, s);
1470
+ }, n.useEffect = function(e, s) {
1471
+ return e == null && console.warn(
1472
+ "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1473
+ ), P().useEffect(e, s);
1474
+ }, n.useEffectEvent = function(e) {
1475
+ return P().useEffectEvent(e);
1476
+ }, n.useId = function() {
1477
+ return P().useId();
1478
+ }, n.useImperativeHandle = function(e, s, c) {
1479
+ return P().useImperativeHandle(e, s, c);
1480
+ }, n.useInsertionEffect = function(e, s) {
1481
+ return e == null && console.warn(
1482
+ "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1483
+ ), P().useInsertionEffect(e, s);
1484
+ }, n.useLayoutEffect = function(e, s) {
1485
+ return e == null && console.warn(
1486
+ "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1487
+ ), P().useLayoutEffect(e, s);
1488
+ }, n.useMemo = function(e, s) {
1489
+ return P().useMemo(e, s);
1490
+ }, n.useOptimistic = function(e, s) {
1491
+ return P().useOptimistic(e, s);
1492
+ }, n.useReducer = function(e, s, c) {
1493
+ return P().useReducer(e, s, c);
1494
+ }, n.useRef = function(e) {
1495
+ return P().useRef(e);
1496
+ }, n.useState = function(e) {
1497
+ return P().useState(e);
1498
+ }, n.useSyncExternalStore = function(e, s, c) {
1499
+ return P().useSyncExternalStore(
1500
+ e,
1501
+ s,
1502
+ c
1503
+ );
1504
+ }, n.useTransition = function() {
1505
+ return P().useTransition();
1506
+ }, n.version = "19.2.7", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1507
+ })();
1508
+ })(de, de.exports)), de.exports;
1509
+ }
1510
+ var ot;
1511
+ function Pt() {
1512
+ return ot || (ot = 1, process.env.NODE_ENV === "production" ? Ae.exports = Ct() : Ae.exports = Mt()), Ae.exports;
1513
+ }
1514
+ Pt();
1515
+ let Pe = null, ke = null;
1516
+ const Nt = /* @__PURE__ */ new Set();
1517
+ function Lt() {
1518
+ return ke || (ke = import("./markdown-assets/protoToJsonSchema-CBPWaboT.js").then((t) => {
1519
+ Pe = t.protoToJsonSchema, Nt.forEach((n) => n());
1520
+ })), ke;
1521
+ }
1522
+ function Ut() {
1523
+ return Pe || Lt(), Pe;
1524
+ }
1525
+ const It = "x-parser-original-payload", Yt = "x-lib-conversion-error", Ht = /^application\/vnd\.apache\.avro(\+(json|yaml))?(\s*;\s*version=.+)?$/i, Dt = /^application\/vnd\.google\.protobuf(\s*;\s*version=.+)?$/i;
1526
+ function zt(t) {
1527
+ return typeof t == "string" && Ht.test(t);
1528
+ }
1529
+ function qt(t) {
1530
+ return typeof t == "string" && Dt.test(t);
1531
+ }
1532
+ function at(t) {
1533
+ return Z(t) && typeof t.schemaFormat == "string" && "schema" in t;
1534
+ }
1535
+ const Bt = [
1536
+ "properties",
1537
+ "oneOf",
1538
+ "anyOf",
1539
+ "allOf",
1540
+ "not",
1541
+ "$ref",
1542
+ "additionalProperties",
1543
+ "patternProperties",
1544
+ "x-parser-schema-id"
1545
+ ], Wt = /* @__PURE__ */ new Set([
1546
+ "record",
1547
+ "enum",
1548
+ "fixed",
1549
+ "map",
1550
+ "int",
1551
+ "long",
1552
+ "float",
1553
+ "double",
1554
+ "bytes",
1555
+ "uuid"
1556
+ ]);
1557
+ function xt(t) {
1558
+ return typeof t == "string" || Array.isArray(t) ? !0 : Z(t) ? typeof t.type == "string" && Wt.has(t.type) || Array.isArray(t.fields) || Array.isArray(t.symbols) ? !0 : !Bt.some((n) => n in t) : !1;
1559
+ }
1560
+ function Gt(t, n) {
1561
+ let r = t;
1562
+ if (n && Z(r) && typeof r.$ref == "string") {
1563
+ const l = n(r.$ref);
1564
+ l !== void 0 && (r = l);
1565
+ }
1566
+ const i = Ft(r), u = i.schema.description;
1567
+ if (typeof u == "string")
1568
+ return { ...i, description: u };
1569
+ const a = at(r) ? r.description : void 0;
1570
+ return typeof a == "string" ? { ...i, description: a } : i;
1571
+ }
1572
+ function Ft(t) {
1573
+ var l;
1574
+ if (!at(t))
1575
+ return { schema: V(t) ?? t };
1576
+ const { schemaFormat: n } = t, r = t.schema, i = t[It], u = (l = V(r)) == null ? void 0 : l[Yt];
1577
+ if (typeof u == "string")
1578
+ return {
1579
+ schema: V(i) ?? {},
1580
+ schemaFormat: n,
1581
+ originalSchema: i,
1582
+ conversionError: u
1583
+ };
1584
+ if (i !== void 0)
1585
+ return {
1586
+ schema: V(r) ?? {},
1587
+ schemaFormat: n,
1588
+ originalSchema: i
1589
+ };
1590
+ if (zt(n) && xt(r)) {
1591
+ const m = jt(r);
1592
+ if (m.length > 0)
1593
+ return {
1594
+ schema: V(r) ?? {},
1595
+ schemaFormat: n,
1596
+ originalSchema: r,
1597
+ conversionError: m[0]
1598
+ };
1599
+ try {
1600
+ return {
1601
+ schema: Ot(r),
1602
+ schemaFormat: n,
1603
+ originalSchema: r
1604
+ };
1605
+ } catch (y) {
1606
+ return {
1607
+ schema: V(r) ?? {},
1608
+ schemaFormat: n,
1609
+ originalSchema: r,
1610
+ conversionError: y instanceof Error ? y.message : "Failed to convert Avro schema"
1611
+ };
1612
+ }
1613
+ }
1614
+ if (qt(n) && typeof r == "string") {
1615
+ const m = Ut();
1616
+ if (!m)
1617
+ return {
1618
+ schema: {},
1619
+ schemaFormat: n,
1620
+ originalSchema: r,
1621
+ pendingConversion: !0
1622
+ };
1623
+ try {
1624
+ return {
1625
+ schema: m(r),
1626
+ schemaFormat: n,
1627
+ originalSchema: r
1628
+ };
1629
+ } catch (y) {
1630
+ return {
1631
+ // Raw proto text is not tree-renderable; the JSON tab shows
1632
+ // originalSchema instead.
1633
+ schema: {},
1634
+ schemaFormat: n,
1635
+ originalSchema: r,
1636
+ conversionError: y instanceof Error ? y.message : "Failed to convert Protobuf schema"
1637
+ };
1638
+ }
1639
+ }
1640
+ const a = V(r);
1641
+ return a ? { schema: a, schemaFormat: n } : { schema: {}, schemaFormat: n, originalSchema: r };
1642
+ }
1643
+ const Kt = (t) => typeof t == "object" && t !== null;
1644
+ function Qt(t) {
1645
+ try {
1646
+ return decodeURIComponent(t).replace(/~1/g, "/").replace(/~0/g, "~");
1647
+ } catch {
1648
+ return;
1649
+ }
1650
+ }
1651
+ function Xt(t, n) {
1652
+ if (n === "#") return t;
1653
+ if (!n.startsWith("#/")) return;
1654
+ let r = t;
1655
+ for (const i of n.slice(2).split("/")) {
1656
+ if (!Kt(r)) return;
1657
+ const u = Qt(i);
1658
+ if (u === void 0 || (r = r[u], r === void 0)) return;
1659
+ }
1660
+ return r;
1661
+ }
1662
+ function $e(t) {
1663
+ const n = /* @__PURE__ */ new Map();
1664
+ return (r) => {
1665
+ if (n.has(r)) return n.get(r);
1666
+ const i = Xt(t, r);
1667
+ return n.set(r, i), i;
1668
+ };
1669
+ }
1670
+ const L = (t, n) => `${"#".repeat(t)} ${n}`, d = (t) => typeof t == "string" ? t.replace(/`/g, "'") : String(t ?? ""), pe = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Vt = { objects: /* @__PURE__ */ new Set(), refs: /* @__PURE__ */ new Set() };
1671
+ function be(t, n, r = Vt) {
1672
+ if (t === null || typeof t != "object") return t;
1673
+ if (r.objects.has(t) || pe(t) && typeof t.$ref == "string" && r.refs.has(t.$ref)) {
1674
+ const a = pe(t) ? t["x-parser-schema-id"] : void 0;
1675
+ return typeof a == "string" ? { $ref: `#/components/schemas/${a} (circular)` } : "[circular reference]";
1676
+ }
1677
+ const i = {
1678
+ objects: new Set(r.objects).add(t),
1679
+ refs: pe(t) && typeof t.$ref == "string" ? new Set(r.refs).add(t.$ref) : r.refs
1680
+ };
1681
+ if (Array.isArray(t))
1682
+ return t.map((a) => be(a, n, i));
1683
+ if (pe(t) && typeof t.$ref == "string") {
1684
+ const a = n == null ? void 0 : n(t.$ref);
1685
+ return pe(a) || Array.isArray(a) ? be(a, n, i) : { $ref: t.$ref };
1686
+ }
1687
+ const u = {};
1688
+ for (const [a, l] of Object.entries(t))
1689
+ u[a] = be(l, n, i);
1690
+ return u;
1691
+ }
1692
+ function Re(t, n, r) {
1693
+ if (!n) return "";
1694
+ const i = be(n, r);
1695
+ return `${L(4, `\`${d(t)}\``)}
1696
+
1697
+ \`\`\`json
1698
+ ${JSON.stringify(i, null, 2)}
1699
+ \`\`\``;
1700
+ }
1701
+ function me(t, n, r) {
1702
+ if (!n || typeof n == "boolean") return "";
1703
+ const { schema: i, description: u, conversionError: a, pendingConversion: l } = Gt(n, r);
1704
+ if (l) return `${L(4, `\`${d(t)}\``)}
1705
+
1706
+ _(schema conversion still in progress)_`;
1707
+ if (a) return `${L(4, `\`${d(t)}\``)}
1708
+
1709
+ _(could not convert schema: ${d(a)})_`;
1710
+ const m = u && !i.description ? { ...i, description: u } : i;
1711
+ return Re(t, m, r);
1712
+ }
1713
+ function ct(t) {
1714
+ var n;
1715
+ switch (t.type) {
1716
+ case "apiKey":
1717
+ case "httpApiKey":
1718
+ return `API Key (${d(t.in)}${t.name ? `: \`${d(t.name)}\`` : ""})`;
1719
+ case "http":
1720
+ return ((n = t.scheme) == null ? void 0 : n.toLowerCase()) === "basic" ? "HTTP Basic" : `HTTP Bearer${t.bearerFormat ? ` (format: ${d(t.bearerFormat)})` : ""}`;
1721
+ case "openIdConnect":
1722
+ return "OpenID Connect";
1723
+ case "oauth2":
1724
+ return "OAuth2";
1725
+ case "mutualTLS":
1726
+ return "Mutual TLS";
1727
+ case "X509":
1728
+ return "X.509 Certificate";
1729
+ case "userPassword":
1730
+ return "User / Password";
1731
+ case "plain":
1732
+ case "scramSha256":
1733
+ case "scramSha512":
1734
+ return "SASL";
1735
+ case "gssapi":
1736
+ return "SASL (GSSAPI)";
1737
+ case "symmetricEncryption":
1738
+ return "Symmetric Encryption";
1739
+ case "asymmetricEncryption":
1740
+ return "Asymmetric Encryption";
1741
+ default:
1742
+ return d(t.type);
1743
+ }
1744
+ }
1745
+ function Zt(t) {
1746
+ if (!(t != null && t.length)) return "";
1747
+ const n = [];
1748
+ for (const r of t)
1749
+ if (r != null && r.type && (n.push(`- **${ct(r)}**`), r.description && n.push(` ${d(r.description)}`), r.type === "openIdConnect" && r.openIdConnectUrl && n.push(` - OpenID Connect URL: \`${d(r.openIdConnectUrl)}\``), r.type === "oauth2"))
1750
+ for (const [i, u] of Object.entries(r.flows ?? {})) {
1751
+ n.push(` - Flow \`${d(i)}\`:`), u.authorizationUrl && n.push(` - Authorization URL: \`${d(u.authorizationUrl)}\``), u.tokenUrl && n.push(` - Token URL: \`${d(u.tokenUrl)}\``), u.refreshUrl && n.push(` - Refresh URL: \`${d(u.refreshUrl)}\``);
1752
+ const a = Object.keys(u.availableScopes ?? u.scopes ?? {});
1753
+ a.length && n.push(` - Available scopes: ${a.map((l) => `\`${d(l)}\``).join(", ")}`);
1754
+ }
1755
+ return n.length ? ["**Authorization:**", n.join(`
1756
+ `)].join(`
1757
+
1758
+ `) : "";
1759
+ }
1760
+ function ft(t) {
1761
+ const n = [], { info: r } = t;
1762
+ n.push(L(1, d(r.title)));
1763
+ const i = [`**Version:** ${d(r.version)}`];
1764
+ if (r.license && i.push(`**License:** ${d(r.license.name)}${r.license.url ? ` (${d(r.license.url)})` : ""}`), r.contact) {
1765
+ const u = [r.contact.name, r.contact.email].filter(Boolean).map(d).join(" ");
1766
+ u && i.push(`**Contact:** ${u}`);
1767
+ }
1768
+ if (n.push(i.join(`
1769
+ `)), r.description && n.push(d(r.description)), t.servers && Object.keys(t.servers).length) {
1770
+ const u = [L(2, "Servers")];
1771
+ for (const [a, l] of Object.entries(t.servers)) {
1772
+ u.push(L(3, d(a)));
1773
+ const m = [`**Host:** \`${d(l.host)}${l.pathname ? d(l.pathname) : ""}\``];
1774
+ m.push(`**Protocol:** ${d(l.protocol)}${l.protocolVersion ? ` ${d(l.protocolVersion)}` : ""}`), l.description && m.push(d(l.description)), u.push(m.join(`
1775
+ `));
1776
+ const y = Zt(l.security);
1777
+ y && u.push(y);
1778
+ }
1779
+ n.push(u.join(`
1780
+
1781
+ `));
1782
+ }
1783
+ return n;
1784
+ }
1785
+ function Jt(t, n = $e(t)) {
1786
+ var a, l, m;
1787
+ const r = ft(t);
1788
+ if (t.operations && Object.keys(t.operations).length) {
1789
+ const y = [L(2, "Operations")];
1790
+ for (const [A, g] of Object.entries(t.operations)) {
1791
+ const S = g.channel;
1792
+ y.push(L(3, `${d((a = g.action) == null ? void 0 : a.toUpperCase())} \`${d(A)}\``));
1793
+ const w = [];
1794
+ S != null && S.address && w.push(`**Channel:** \`${d(S.address)}\``), g.summary && w.push(d(g.summary)), g.description && w.push(d(g.description));
1795
+ const N = g.messages ?? [];
1796
+ N.length && w.push(`**Messages:** ${N.map((U) => `\`${d(U.name ?? U.title ?? "message")}\``).join(", ")}`), y.push(w.join(`
1797
+
1798
+ `));
1799
+ }
1800
+ r.push(y.join(`
1801
+
1802
+ `));
1803
+ }
1804
+ const i = (l = t.components) == null ? void 0 : l.messages;
1805
+ if (i && Object.keys(i).length) {
1806
+ const y = [L(2, "Messages")];
1807
+ for (const [A, g] of Object.entries(i)) {
1808
+ y.push(L(3, d(g.title ?? g.name ?? A)));
1809
+ const S = [];
1810
+ g.summary && S.push(d(g.summary)), g.description && S.push(d(g.description)), g.contentType && S.push(`**Content-Type:** \`${d(g.contentType)}\``), y.push(S.join(`
1811
+
1812
+ `)), g.payload && y.push(me("payload", g.payload, n)), g.headers && y.push(me("headers", g.headers, n));
1813
+ }
1814
+ r.push(y.join(`
1815
+
1816
+ `));
1817
+ }
1818
+ const u = (m = t.components) == null ? void 0 : m.schemas;
1819
+ if (u && Object.keys(u).length) {
1820
+ const y = [L(2, "Schemas")];
1821
+ for (const [A, g] of Object.entries(u))
1822
+ y.push(me(A, g, n));
1823
+ r.push(y.join(`
1824
+
1825
+ `));
1826
+ }
1827
+ return r.filter(Boolean).join(`
1828
+
1829
+ `);
1830
+ }
1831
+ function en(t, n, r) {
1832
+ var m;
1833
+ const i = n.channel, u = [L(3, `${d((m = n.action) == null ? void 0 : m.toUpperCase())} \`${d(t)}\``)], a = [];
1834
+ i != null && i.address && a.push(`**Channel:** \`${d(i.address)}\``), n.summary && a.push(d(n.summary)), n.description && a.push(d(n.description)), u.push(a.join(`
1835
+
1836
+ `));
1837
+ const l = n.messages ?? [];
1838
+ for (const y of l) {
1839
+ const A = [L(4, d(y.title ?? y.name ?? "Message"))], g = [];
1840
+ y.summary && g.push(d(y.summary)), y.description && g.push(d(y.description)), y.contentType && g.push(`**Content-Type:** \`${d(y.contentType)}\``), g.length && A.push(g.join(`
1841
+
1842
+ `)), u.push(A.join(`
1843
+
1844
+ `)), y.payload && u.push(me("payload", y.payload, r)), y.headers && u.push(me("headers", y.headers, r));
1845
+ }
1846
+ return u.filter(Boolean).join(`
1847
+
1848
+ `);
1849
+ }
1850
+ function tn(t, n, r = $e(t)) {
1851
+ var a;
1852
+ const i = (a = t.operations) == null ? void 0 : a[n];
1853
+ if (!i) return "";
1854
+ const u = ft(t);
1855
+ return u.push(en(n, i, r)), u.filter(Boolean).join(`
1856
+
1857
+ `);
1858
+ }
1859
+ function nn(t, n) {
1860
+ if (!t.length || !n) return "";
1861
+ const r = /* @__PURE__ */ new Map();
1862
+ for (const a of t)
1863
+ for (const [l, m] of Object.entries(a)) {
1864
+ if (!m.length) continue;
1865
+ const y = r.get(l) ?? [];
1866
+ r.set(l, Array.from(/* @__PURE__ */ new Set([...y, ...m])));
1867
+ }
1868
+ const i = Array.from(new Set(t.flatMap((a) => Object.keys(a)))), u = [];
1869
+ for (const a of i) {
1870
+ const l = n[a];
1871
+ if (!l) continue;
1872
+ const m = r.get(a);
1873
+ if (u.push(`- **${ct(l)}** (\`${d(a)}\`)`), l.description && u.push(` ${d(l.description)}`), l.type === "openIdConnect" && l.openIdConnectUrl && u.push(` - OpenID Connect URL: \`${d(l.openIdConnectUrl)}\``), l.type === "oauth2")
1874
+ for (const [y, A] of Object.entries(l.flows ?? {})) {
1875
+ u.push(` - Flow \`${d(y)}\`:`), A.authorizationUrl && u.push(` - Authorization URL: \`${d(A.authorizationUrl)}\``), A.tokenUrl && u.push(` - Token URL: \`${d(A.tokenUrl)}\``), A.refreshUrl && u.push(` - Refresh URL: \`${d(A.refreshUrl)}\``);
1876
+ const g = m != null && m.length ? m : Object.keys(A.scopes ?? {});
1877
+ g.length && u.push(
1878
+ ` - ${m != null && m.length ? "Required scopes" : "Scopes"}: ${g.map((S) => `\`${d(S)}\``).join(", ")}`
1879
+ );
1880
+ }
1881
+ else m != null && m.length && u.push(` - Required scopes: ${m.map((y) => `\`${d(y)}\``).join(", ")}`);
1882
+ }
1883
+ return u.length ? ["**Authorization:**", u.join(`
1884
+ `)].join(`
1885
+
1886
+ `) : "";
1887
+ }
1888
+ function lt(t, n, r, i, u, a) {
1889
+ var w;
1890
+ const l = [L(3, `${t.toUpperCase()} \`${d(n)}\``)], m = [];
1891
+ r.summary && m.push(d(r.summary)), r.description && m.push(d(r.description)), r.deprecated && m.push("**Deprecated**");
1892
+ const y = r.security ?? a ?? [], A = nn(y, u);
1893
+ A && m.push(A);
1894
+ for (const N of ["path", "query", "header", "cookie"]) {
1895
+ const U = (r.parameters ?? []).filter((Y) => Y.in === N);
1896
+ if (U.length) {
1897
+ m.push(`**${N[0].toUpperCase()}${N.slice(1)} Parameters:**`);
1898
+ for (const Y of U) {
1899
+ const z = Y.schema;
1900
+ m.push(
1901
+ `- \`${d(Y.name)}\`${Y.required ? " (required)" : ""}${z != null && z.type ? ` — ${d(z.type)}` : ""}${Y.description ? `: ${d(Y.description)}` : ""}`
1902
+ );
1903
+ }
1904
+ }
1905
+ }
1906
+ l.push(m.join(`
1907
+
1908
+ `));
1909
+ const g = ((w = r.requestBody) == null ? void 0 : w.content) ?? {};
1910
+ for (const [N, U] of Object.entries(g))
1911
+ l.push(
1912
+ [`**Request Body** (\`${d(N)}\`)`, Re("body", U.schema, i)].join(
1913
+ `
1914
+
1915
+ `
1916
+ )
1917
+ );
1918
+ const S = r.responses ?? {};
1919
+ for (const [N, U] of Object.entries(S)) {
1920
+ const Y = [L(4, `${N}${U.description ? `: ${d(U.description)}` : ""}`)];
1921
+ for (const [z, B] of Object.entries(U.content ?? {}))
1922
+ Y.push(
1923
+ [`**Body** (\`${d(z)}\`)`, Re("body", B.schema, i)].join(
1924
+ `
1925
+
1926
+ `
1927
+ )
1928
+ );
1929
+ l.push(Y.join(`
1930
+
1931
+ `));
1932
+ }
1933
+ return l.join(`
1934
+
1935
+ `);
1936
+ }
1937
+ function rn(t, n = $e(t)) {
1938
+ var l, m, y, A, g;
1939
+ const r = [], { info: i } = t;
1940
+ if (r.push(L(1, d(i.title))), r.push(`**Version:** ${d(i.version)}`), i.description && r.push(d(i.description)), (l = t.servers) != null && l.length) {
1941
+ const S = [L(2, "Servers")];
1942
+ for (const w of t.servers)
1943
+ S.push(`- \`${d(w.url)}\`${w.description ? ` — ${d(w.description)}` : ""}`);
1944
+ r.push(S.join(`
1945
+ `));
1946
+ }
1947
+ const u = t.paths ? it(t.paths) : [];
1948
+ if (u.length) {
1949
+ const S = [L(2, "Endpoints")];
1950
+ for (const { method: w, path: N } of u) {
1951
+ const U = (y = (m = t.paths) == null ? void 0 : m[N]) == null ? void 0 : y[w];
1952
+ U && S.push(
1953
+ lt(w, N, U, n, (A = t.components) == null ? void 0 : A.securitySchemes, t.security)
1954
+ );
1955
+ }
1956
+ r.push(S.join(`
1957
+
1958
+ `));
1959
+ }
1960
+ const a = (g = t.components) == null ? void 0 : g.schemas;
1961
+ if (a && Object.keys(a).length) {
1962
+ const S = [L(2, "Schemas")];
1963
+ for (const [w, N] of Object.entries(a))
1964
+ S.push(Re(w, N, n));
1965
+ r.push(S.join(`
1966
+
1967
+ `));
1968
+ }
1969
+ return r.filter(Boolean).join(`
1970
+
1971
+ `);
1972
+ }
1973
+ function on(t, n, r, i = $e(t)) {
1974
+ var m, y, A, g;
1975
+ const u = (y = (m = t.paths) == null ? void 0 : m[r]) == null ? void 0 : y[n];
1976
+ if (!u) return "";
1977
+ const a = [], { info: l } = t;
1978
+ if (a.push(L(1, d(l.title))), a.push(`**Version:** ${d(l.version)}`), l.description && a.push(d(l.description)), (A = t.servers) != null && A.length) {
1979
+ const S = [L(2, "Servers")];
1980
+ for (const w of t.servers)
1981
+ S.push(`- \`${d(w.url)}\`${w.description ? ` — ${d(w.description)}` : ""}`);
1982
+ a.push(S.join(`
1983
+ `));
1984
+ }
1985
+ return a.push(lt(n, r, u, i, (g = t.components) == null ? void 0 : g.securitySchemes, t.security)), a.filter(Boolean).join(`
1986
+
1987
+ `);
1988
+ }
1989
+ function pt(t) {
1990
+ return {
1991
+ ...t,
1992
+ title: (n) => t.title(n),
1993
+ summary: (n) => t.summary(n),
1994
+ targets: (n) => t.targets(n),
1995
+ toMarkdown: (n, r) => t.toMarkdown(n, r)
1996
+ };
1997
+ }
1998
+ const se = (t) => {
1999
+ var r;
2000
+ return typeof t != "string" ? void 0 : ((r = t.trim().split(`
2001
+ `)[0]) == null ? void 0 : r.trim()) || void 0;
2002
+ }, sn = (t) => ut.some((n) => n === t), un = pt({
2003
+ name: "OpenAPI",
2004
+ matches: (t) => typeof t.openapi == "string" || typeof t.swagger == "string",
2005
+ sectionTitle: "Endpoints",
2006
+ title: (t) => {
2007
+ var n;
2008
+ return ((n = t.info) == null ? void 0 : n.title) ?? "API";
2009
+ },
2010
+ summary: (t) => {
2011
+ var n;
2012
+ return se((n = t.info) == null ? void 0 : n.description);
2013
+ },
2014
+ targets: (t) => it(t.paths ?? {}).map(({ key: n, method: r, path: i }) => {
2015
+ var a, l;
2016
+ const u = (l = (a = t.paths) == null ? void 0 : a[i]) == null ? void 0 : l[r];
2017
+ return {
2018
+ key: n,
2019
+ label: `${r.toUpperCase()} ${i}`,
2020
+ summary: se(u == null ? void 0 : u.summary) ?? se(u == null ? void 0 : u.description),
2021
+ target: { kind: "operation", document: t, method: r, path: i }
2022
+ };
2023
+ }),
2024
+ toMarkdown: (t, n) => {
2025
+ if (!n || n.kind === "document") return rn(t);
2026
+ if (typeof n.path != "string" || !sn(n.method))
2027
+ throw new Error("[apiuikit] An OpenAPI operation target requires a valid method and path.");
2028
+ return on(t, n.method, n.path);
2029
+ }
2030
+ }), an = pt({
2031
+ name: "AsyncAPI",
2032
+ matches: (t) => typeof t.asyncapi == "string",
2033
+ sectionTitle: "Operations",
2034
+ title: (t) => {
2035
+ var n;
2036
+ return ((n = t.info) == null ? void 0 : n.title) ?? "API";
2037
+ },
2038
+ summary: (t) => {
2039
+ var n;
2040
+ return se((n = t.info) == null ? void 0 : n.description);
2041
+ },
2042
+ targets: (t) => Object.entries(t.operations ?? {}).map(([n, r]) => ({
2043
+ key: n,
2044
+ label: r != null && r.action ? `${r.action.toUpperCase()} ${n}` : n,
2045
+ summary: se(r == null ? void 0 : r.summary) ?? se(r == null ? void 0 : r.description),
2046
+ target: { kind: "operation", document: t, id: n }
2047
+ })),
2048
+ toMarkdown: (t, n) => {
2049
+ if (!n || n.kind === "document") return Jt(t);
2050
+ if (typeof n.id != "string" || !n.id)
2051
+ throw new Error("[apiuikit] An AsyncAPI operation target requires an operation id.");
2052
+ return tn(t, n.id);
2053
+ }
2054
+ }), st = [un, an];
2055
+ function Ue(t) {
2056
+ const n = typeof t == "object" && t !== null ? t : {}, r = st.find((i) => i.matches(n));
2057
+ if (!r)
2058
+ throw new Error(
2059
+ `[apiuikit] Unrecognized document: expected a top-level "openapi", "swagger", or "asyncapi" version key. Supported specs: ${st.map((i) => i.name).join(", ")}.`
2060
+ );
2061
+ return r;
2062
+ }
2063
+ function cn(t) {
2064
+ return t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
2065
+ }
2066
+ function fn(t) {
2067
+ return Ue(t).targets(t);
2068
+ }
2069
+ function ln(t, n) {
2070
+ const r = Ue(t);
2071
+ if (n && n.document !== t)
2072
+ throw new Error("[apiuikit] Markdown target belongs to a different document.");
2073
+ return r.toMarkdown(t, n);
2074
+ }
2075
+ function pn(t, n = {}) {
2076
+ const r = Ue(t), { baseUrl: i, url: u, optional: a } = n, l = (i == null ? void 0 : i.replace(/\/+$/, "")) ?? "", y = u ?? ((w) => `${l}/${cn(w.key)}.md`), A = [`# ${n.title ?? r.title(t)}`], g = n.summary ?? r.summary(t);
2077
+ g && A.push("", `> ${g}`);
2078
+ const S = r.targets(t).map((w) => ({ entry: w, href: y(w) })).filter((w) => !!w.href);
2079
+ if (S.length) {
2080
+ A.push("", `## ${r.sectionTitle}`, "");
2081
+ for (const { entry: w, href: N } of S)
2082
+ A.push(`- [${w.label}](${N})${w.summary ? `: ${w.summary}` : ""}`);
2083
+ }
2084
+ if (a != null && a.length) {
2085
+ A.push("", "## Optional", "");
2086
+ for (const w of a)
2087
+ A.push(`- [${w.label}](${w.url})${w.description ? `: ${w.description}` : ""}`);
2088
+ }
2089
+ return A.push(""), A.join(`
2090
+ `);
2091
+ }
2092
+ export {
2093
+ tn as asyncApiOperationToMarkdown,
2094
+ Jt as asyncApiToMarkdown,
2095
+ pn as documentToLlmsTxt,
2096
+ ln as documentToMarkdown,
2097
+ fn as listDocumentTargets,
2098
+ on as openApiEndpointToMarkdown,
2099
+ rn as openApiToMarkdown,
2100
+ cn as targetSlug
2101
+ };