apiuikit 1.9.0 → 1.10.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.
- package/dist/{CodeSamples-D2iaaOjz.cjs → CodeSamples-DvDFW1NK.cjs} +1 -1
- package/dist/{CodeSamples-BotKIQ6C.js → CodeSamples-JH-wvAxg.js} +1 -1
- package/dist/{LogoExtension-CmDeWrqV.js → LogoExtension-Cs6937hf.js} +1 -1
- package/dist/{LogoExtension-Dc_SUJhG.cjs → LogoExtension-DEGE5d80.cjs} +1 -1
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.es.js +1 -1
- package/dist/contexts/useSpec.d.ts +11 -0
- package/dist/hooks/useDocumentProviderValue.d.ts +1 -0
- package/dist/{index-BW_gDunt.js → index-BKChiodv.js} +311 -309
- package/dist/{index-D7aNsAD6.cjs → index-BotdQSm5.cjs} +1 -1
- package/dist/{index-BaryvbmB.cjs → index-BxJoqAOy.cjs} +16 -16
- package/dist/{index-BuZVtHPG.cjs → index-CCB7-dIs.cjs} +1 -1
- package/dist/{index-B5IqdQwF.js → index-CM_5UKZl.js} +1 -1
- package/dist/{index-BnwQArUz.js → index-DXD-1U_v.js} +1 -1
- package/dist/{protoToJsonSchema-DAbk8Ysk.cjs → protoToJsonSchema-Bn_xitCt.cjs} +1 -1
- package/dist/{protoToJsonSchema-DUOthusN.js → protoToJsonSchema-DRXbMJXQ.js} +1 -1
- package/dist/{protobufSchemaParser-BJ8lDMuw.cjs → protobufSchemaParser-D9djilqr.cjs} +1 -1
- package/dist/{protobufSchemaParser-kcEjdu3A.js → protobufSchemaParser-DzoN_YrA.js} +2 -2
- package/package.json +1 -1
|
@@ -378,11 +378,18 @@ function Rl(e) {
|
|
|
378
378
|
}
|
|
379
379
|
const Ll = [];
|
|
380
380
|
function Ro(e, t, r = Ht, n = Ll) {
|
|
381
|
-
var b, C, I, T, P, H, Z, N,
|
|
381
|
+
var b, C, I, T, P, H, Z, N, A;
|
|
382
382
|
const [s, o] = D(null), [i, a] = D(null), c = Y(() => Ut(t), [t]), d = ((b = r.expand) == null ? void 0 : b.schemas) === !0, u = (I = (C = r.theme) == null ? void 0 : C.depthColors) != null && I.length ? r.theme.depthColors : jr, f = ((T = r.show) == null ? void 0 : T.extensions) !== !1, p = ((P = r.show) == null ? void 0 : P.codeSamples) !== !1, h = r.topOffset, m = typeof h == "number" && Number.isFinite(h) ? Math.max(0, h) : 0, x = ((H = r.sidePanel) == null ? void 0 : H.containment) ?? "viewport", y = (Z = r.sidePanel) == null ? void 0 : Z.topOffset, v = typeof y == "number" && Number.isFinite(y) ? Math.max(0, y) : m, S = (N = r.markdown) == null ? void 0 : N.url, w = Y(() => {
|
|
383
383
|
if (typeof S == "function") return S;
|
|
384
384
|
if (typeof S == "string") return () => S;
|
|
385
|
-
}, [S]), _ = Y(() => Mo(n), [n]), j = Y(
|
|
385
|
+
}, [S]), _ = Y(() => Mo(n), [n]), j = Rl(((A = r.theme) == null ? void 0 : A.mode) === "system"), F = Y(
|
|
386
|
+
() => Cl(r.theme, j),
|
|
387
|
+
[r.theme, j]
|
|
388
|
+
), $ = Y(
|
|
389
|
+
() => r.theme ? Tl(r.theme, F) : {},
|
|
390
|
+
[r.theme, F]
|
|
391
|
+
);
|
|
392
|
+
return { contextValue: Y(
|
|
386
393
|
() => ({
|
|
387
394
|
specType: e,
|
|
388
395
|
document: t,
|
|
@@ -399,7 +406,8 @@ function Ro(e, t, r = Ht, n = Ll) {
|
|
|
399
406
|
markdownUrl: w,
|
|
400
407
|
plugins: n,
|
|
401
408
|
pluginSlotRegistry: _,
|
|
402
|
-
config: r
|
|
409
|
+
config: r,
|
|
410
|
+
resolvedMode: F
|
|
403
411
|
}),
|
|
404
412
|
[
|
|
405
413
|
e,
|
|
@@ -417,16 +425,10 @@ function Ro(e, t, r = Ht, n = Ll) {
|
|
|
417
425
|
w,
|
|
418
426
|
n,
|
|
419
427
|
_,
|
|
420
|
-
r
|
|
428
|
+
r,
|
|
429
|
+
F
|
|
421
430
|
]
|
|
422
|
-
),
|
|
423
|
-
() => Cl(r.theme, z),
|
|
424
|
-
[r.theme, z]
|
|
425
|
-
), k = Y(
|
|
426
|
-
() => r.theme ? Tl(r.theme, A) : {},
|
|
427
|
-
[r.theme, A]
|
|
428
|
-
);
|
|
429
|
-
return { contextValue: j, themeVars: k, resolvedMode: A, setPortalHost: o, setRootElement: a };
|
|
431
|
+
), themeVars: $, resolvedMode: F, setPortalHost: o, setRootElement: a };
|
|
430
432
|
}
|
|
431
433
|
function Mn({
|
|
432
434
|
document: e,
|
|
@@ -836,14 +838,14 @@ function qe({ address: e, parameters: t, className: r = "text-xs", truncate: n =
|
|
|
836
838
|
}, [n, e]);
|
|
837
839
|
const w = (b, C) => {
|
|
838
840
|
u(dr(C)), c(b);
|
|
839
|
-
}, _ = () => c(null), j = (b) => m(dr(b, { align: "end", width: Ts })),
|
|
841
|
+
}, _ = () => c(null), j = (b) => m(dr(b, { align: "end", width: Ts })), F = () => m(null), $ = v.map((b, C) => {
|
|
840
842
|
if (b.type === "text") return /* @__PURE__ */ l("span", { children: b.value }, C);
|
|
841
843
|
const I = t == null ? void 0 : t[b.value], T = kn[S++ % kn.length], P = a === C, H = !!I && (I.description || I.type || I.default || I.enum && I.enum.length > 0 || I.examples && I.examples.length > 0), Z = `channel-address-tooltip-${C}`, N = H && P ? Z : void 0;
|
|
842
844
|
return /* @__PURE__ */ g(
|
|
843
845
|
"span",
|
|
844
846
|
{
|
|
845
847
|
className: "inline-block",
|
|
846
|
-
onMouseEnter: (
|
|
848
|
+
onMouseEnter: (A) => H && w(C, A.currentTarget),
|
|
847
849
|
onMouseLeave: _,
|
|
848
850
|
children: [
|
|
849
851
|
/* @__PURE__ */ l(
|
|
@@ -854,10 +856,10 @@ function qe({ address: e, parameters: t, className: r = "text-xs", truncate: n =
|
|
|
854
856
|
tabIndex: H ? 0 : void 0,
|
|
855
857
|
"aria-expanded": H ? P : void 0,
|
|
856
858
|
"aria-describedby": N,
|
|
857
|
-
onFocus: (
|
|
859
|
+
onFocus: (A) => H && w(C, A.currentTarget),
|
|
858
860
|
onBlur: _,
|
|
859
|
-
onKeyDown: (
|
|
860
|
-
H && ((
|
|
861
|
+
onKeyDown: (A) => {
|
|
862
|
+
H && ((A.key === "Enter" || A.key === " ") && (A.preventDefault(), w(C, A.currentTarget)), A.key === "Escape" && (A.preventDefault(), _(), A.currentTarget.blur()));
|
|
861
863
|
},
|
|
862
864
|
children: `{${b.value}}`
|
|
863
865
|
}
|
|
@@ -894,7 +896,7 @@ function qe({ address: e, parameters: t, className: r = "text-xs", truncate: n =
|
|
|
894
896
|
);
|
|
895
897
|
}), k = o ? "px-2 py-1 " : "";
|
|
896
898
|
return n ? /* @__PURE__ */ g("code", { className: `${k}rounded text-foreground-secondary flex items-center min-w-0 ${r}`, children: [
|
|
897
|
-
/* @__PURE__ */ l("span", { ref: x, className: "overflow-hidden whitespace-nowrap min-w-0", children:
|
|
899
|
+
/* @__PURE__ */ l("span", { ref: x, className: "overflow-hidden whitespace-nowrap min-w-0", children: $ }),
|
|
898
900
|
f && (s ? /* @__PURE__ */ l(
|
|
899
901
|
"span",
|
|
900
902
|
{
|
|
@@ -905,11 +907,11 @@ function qe({ address: e, parameters: t, className: r = "text-xs", truncate: n =
|
|
|
905
907
|
"aria-describedby": h ? y : void 0,
|
|
906
908
|
className: "shrink-0 cursor-help px-0.5 text-foreground-muted hover:text-foreground-secondary focus:outline-none focus-visible:ring-1 focus-visible:ring-neutral-300 rounded",
|
|
907
909
|
onMouseEnter: (b) => j(b.currentTarget),
|
|
908
|
-
onMouseLeave:
|
|
910
|
+
onMouseLeave: F,
|
|
909
911
|
onFocus: (b) => j(b.currentTarget),
|
|
910
|
-
onBlur:
|
|
912
|
+
onBlur: F,
|
|
911
913
|
onKeyDown: (b) => {
|
|
912
|
-
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), b.stopPropagation(), j(b.currentTarget)), b.key === "Escape" && (b.preventDefault(),
|
|
914
|
+
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), b.stopPropagation(), j(b.currentTarget)), b.key === "Escape" && (b.preventDefault(), F(), b.currentTarget.blur());
|
|
913
915
|
},
|
|
914
916
|
children: "…"
|
|
915
917
|
}
|
|
@@ -927,7 +929,7 @@ function qe({ address: e, parameters: t, className: r = "text-xs", truncate: n =
|
|
|
927
929
|
),
|
|
928
930
|
i
|
|
929
931
|
)
|
|
930
|
-
] }) : /* @__PURE__ */ l("code", { className: `${k}rounded text-foreground-secondary break-all ${r}`, children:
|
|
932
|
+
] }) : /* @__PURE__ */ l("code", { className: `${k}rounded text-foreground-secondary break-all ${r}`, children: $ });
|
|
931
933
|
}
|
|
932
934
|
const Gl = {
|
|
933
935
|
sm: "px-2.5 py-1 rounded-md text-xs",
|
|
@@ -984,22 +986,22 @@ function Ql({
|
|
|
984
986
|
selectedItem: s
|
|
985
987
|
}) {
|
|
986
988
|
const [o, i] = D(!1), [a, c] = D(!1), d = o || a, { rootElement: u, portalHost: f, topOffset: p = 0 } = Ae(), h = fe(null), m = fe(null), [x, y] = D(null), v = Y(
|
|
987
|
-
() => e.filter((
|
|
989
|
+
() => e.filter((E) => E.items.length > 0),
|
|
988
990
|
[e]
|
|
989
991
|
), S = Y(
|
|
990
|
-
() => v.filter((
|
|
992
|
+
() => v.filter((E) => E.isTab === !1 || E.id === t),
|
|
991
993
|
[v, t]
|
|
992
994
|
), w = Y(
|
|
993
|
-
() => v.filter((
|
|
995
|
+
() => v.filter((E) => E.showInPopover !== !1),
|
|
994
996
|
[v]
|
|
995
|
-
), [_, j] = D(null),
|
|
996
|
-
j({ section:
|
|
997
|
-
|
|
997
|
+
), [_, j] = D(null), F = fe(null), $ = fe(null), k = Ss((E, B) => {
|
|
998
|
+
j({ section: E, key: B }), F.current = { section: E, key: B }, $.current && clearTimeout($.current), $.current = setTimeout(() => {
|
|
999
|
+
F.current = null;
|
|
998
1000
|
}, 600);
|
|
999
1001
|
}, []);
|
|
1000
1002
|
G(
|
|
1001
1003
|
() => () => {
|
|
1002
|
-
|
|
1004
|
+
$.current && clearTimeout($.current);
|
|
1003
1005
|
},
|
|
1004
1006
|
[]
|
|
1005
1007
|
), G(() => {
|
|
@@ -1017,14 +1019,14 @@ function Ql({
|
|
|
1017
1019
|
be.isIntersecting ? q.set(be.target, be.boundingClientRect.top) : q.delete(be.target);
|
|
1018
1020
|
if (q.size === 0) return;
|
|
1019
1021
|
let ne = null, xe = -1 / 0;
|
|
1020
|
-
for (const [be,
|
|
1021
|
-
|
|
1022
|
+
for (const [be, z] of q)
|
|
1023
|
+
z > xe && (ne = be, xe = z);
|
|
1022
1024
|
const re = ne && Q.get(ne);
|
|
1023
1025
|
if (!re) return;
|
|
1024
|
-
const Me =
|
|
1026
|
+
const Me = F.current;
|
|
1025
1027
|
if (Me) {
|
|
1026
1028
|
if (re.section !== Me.section || re.key !== Me.key) return;
|
|
1027
|
-
|
|
1029
|
+
F.current = null;
|
|
1028
1030
|
}
|
|
1029
1031
|
j({ section: re.section, key: re.key });
|
|
1030
1032
|
},
|
|
@@ -1032,7 +1034,7 @@ function Ql({
|
|
|
1032
1034
|
);
|
|
1033
1035
|
return B.forEach((W) => ce.observe(W.el)), () => ce.disconnect();
|
|
1034
1036
|
}, [e]);
|
|
1035
|
-
const b = (_ == null ? void 0 : _.section) ?? t, C = _ ?? s, I = ur(u, !0), T = typeof window > "u" ? 0 : window.innerWidth, P = typeof window > "u" ? 0 : window.innerHeight, H = !!I && I.bottom > p && I.top < P, Z = Math.max(0, P - p), N = p + Z / 2,
|
|
1037
|
+
const b = (_ == null ? void 0 : _.section) ?? t, C = _ ?? s, I = ur(u, !0), T = typeof window > "u" ? 0 : window.innerWidth, P = typeof window > "u" ? 0 : window.innerHeight, H = !!I && I.bottom > p && I.top < P, Z = Math.max(0, P - p), N = p + Z / 2, A = !!I && I.width < 1024, R = {
|
|
1036
1038
|
opacity: H ? 1 : 0,
|
|
1037
1039
|
pointerEvents: H ? "auto" : "none",
|
|
1038
1040
|
transition: "opacity 0.2s ease"
|
|
@@ -1049,7 +1051,7 @@ function Ql({
|
|
|
1049
1051
|
height: 0,
|
|
1050
1052
|
zIndex: 51,
|
|
1051
1053
|
pointerEvents: "none"
|
|
1052
|
-
}, oe = ur(x,
|
|
1054
|
+
}, oe = ur(x, A), me = A ? {
|
|
1053
1055
|
// Anchored just above the compact button, right edges aligned — read
|
|
1054
1056
|
// from the button's own measured rect (already correctly bounded to
|
|
1055
1057
|
// the widget's pane) rather than recomputed from viewport math, so
|
|
@@ -1068,33 +1070,33 @@ function Ql({
|
|
|
1068
1070
|
};
|
|
1069
1071
|
G(() => {
|
|
1070
1072
|
if (!o) return;
|
|
1071
|
-
const
|
|
1073
|
+
const E = (Q) => {
|
|
1072
1074
|
Q.key === "Escape" && i(!1);
|
|
1073
1075
|
}, B = (Q) => {
|
|
1074
1076
|
var ce, W;
|
|
1075
1077
|
const q = Q.target;
|
|
1076
1078
|
(ce = h.current) != null && ce.contains(q) || (W = m.current) != null && W.contains(q) || i(!1);
|
|
1077
1079
|
};
|
|
1078
|
-
return document.addEventListener("keydown",
|
|
1079
|
-
document.removeEventListener("keydown",
|
|
1080
|
+
return document.addEventListener("keydown", E), document.addEventListener("mousedown", B), () => {
|
|
1081
|
+
document.removeEventListener("keydown", E), document.removeEventListener("mousedown", B);
|
|
1080
1082
|
};
|
|
1081
1083
|
}, [o]);
|
|
1082
1084
|
const ge = Ss(
|
|
1083
|
-
(
|
|
1084
|
-
|
|
1085
|
+
(E, B) => {
|
|
1086
|
+
E.isTab !== !1 && r(E.id), B && setTimeout(() => {
|
|
1085
1087
|
var Q;
|
|
1086
1088
|
(Q = document.getElementById(B)) == null || Q.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1087
1089
|
}, 50);
|
|
1088
1090
|
},
|
|
1089
1091
|
[r]
|
|
1090
|
-
), pe = Y(() => w.map((
|
|
1091
|
-
const B = b ===
|
|
1092
|
+
), pe = Y(() => w.map((E) => {
|
|
1093
|
+
const B = b === E.id, Q = (C == null ? void 0 : C.section) === E.id, q = E.icon;
|
|
1092
1094
|
return /* @__PURE__ */ g("div", { className: "pb-1", children: [
|
|
1093
1095
|
/* @__PURE__ */ g(
|
|
1094
1096
|
"button",
|
|
1095
1097
|
{
|
|
1096
1098
|
onClick: () => {
|
|
1097
|
-
ge(
|
|
1099
|
+
ge(E), k(E.id, ""), A && i(!1);
|
|
1098
1100
|
},
|
|
1099
1101
|
className: `group flex w-full items-center gap-2 rounded-md px-2 py-2 text-left transition-colors ${B ? "bg-primary-50" : "hover:bg-neutral-50"}`,
|
|
1100
1102
|
children: [
|
|
@@ -1108,40 +1110,40 @@ function Ql({
|
|
|
1108
1110
|
"span",
|
|
1109
1111
|
{
|
|
1110
1112
|
className: `text-xs font-semibold uppercase tracking-wider transition-colors ${B ? "text-primary-600" : "text-foreground-muted group-hover:text-foreground-secondary"}`,
|
|
1111
|
-
children:
|
|
1113
|
+
children: E.label
|
|
1112
1114
|
}
|
|
1113
1115
|
),
|
|
1114
1116
|
/* @__PURE__ */ l(
|
|
1115
1117
|
"span",
|
|
1116
1118
|
{
|
|
1117
1119
|
className: `ml-auto inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1 font-mono text-[10px] transition-colors ${B ? "border border-primary-200 bg-primary-100 text-primary-500" : "bg-neutral-100 text-foreground-muted"}`,
|
|
1118
|
-
children:
|
|
1120
|
+
children: E.items.length
|
|
1119
1121
|
}
|
|
1120
1122
|
)
|
|
1121
1123
|
]
|
|
1122
1124
|
}
|
|
1123
1125
|
),
|
|
1124
|
-
|
|
1125
|
-
const W =
|
|
1126
|
+
E.items.length > 0 && /* @__PURE__ */ l("ul", { className: "ml-4 mt-0.5 border-l border-border pl-3", children: E.items.map((ce) => {
|
|
1127
|
+
const W = E.itemKey(ce), ne = Q && (C == null ? void 0 : C.key) === W;
|
|
1126
1128
|
return /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
|
|
1127
1129
|
"button",
|
|
1128
1130
|
{
|
|
1129
1131
|
onClick: () => {
|
|
1130
|
-
ge(
|
|
1132
|
+
ge(E, E.targetId(ce)), n(E.id, W), k(E.id, W), A && i(!1);
|
|
1131
1133
|
},
|
|
1132
1134
|
className: `flex w-full items-center gap-2 rounded-md px-2 py-0.5 text-left text-xs transition-colors ${ne ? "bg-primary-50 font-medium text-primary-500" : B ? "text-foreground-secondary hover:bg-primary-50 hover:text-foreground" : "text-foreground-muted hover:bg-neutral-50 hover:text-foreground-secondary"}`,
|
|
1133
|
-
children:
|
|
1135
|
+
children: E.renderItem(ce, { isSelected: ne, isSectionActive: B })
|
|
1134
1136
|
}
|
|
1135
1137
|
) }, W);
|
|
1136
1138
|
}) })
|
|
1137
|
-
] },
|
|
1138
|
-
}), [w, b, C,
|
|
1139
|
-
const
|
|
1139
|
+
] }, E.id);
|
|
1140
|
+
}), [w, b, C, A, ge, n, k]), ue = Xl(Z, S.length), le = Y(() => {
|
|
1141
|
+
const E = Yl(
|
|
1140
1142
|
S.map((B) => B.items.length),
|
|
1141
1143
|
ue
|
|
1142
1144
|
);
|
|
1143
1145
|
return S.map((B, Q) => {
|
|
1144
|
-
const q = b === B.id, ce = B.items.length, W =
|
|
1146
|
+
const q = b === B.id, ce = B.items.length, W = E[Q];
|
|
1145
1147
|
let ne = -1;
|
|
1146
1148
|
if ((C == null ? void 0 : C.section) === B.id) {
|
|
1147
1149
|
const xe = B.items.findIndex(
|
|
@@ -1167,11 +1169,11 @@ function Ql({
|
|
|
1167
1169
|
});
|
|
1168
1170
|
}, [S, b, C, ue]);
|
|
1169
1171
|
return /* @__PURE__ */ g(U, { children: [
|
|
1170
|
-
!
|
|
1172
|
+
!A && /* @__PURE__ */ l(
|
|
1171
1173
|
"button",
|
|
1172
1174
|
{
|
|
1173
1175
|
ref: h,
|
|
1174
|
-
onClick: () => i((
|
|
1176
|
+
onClick: () => i((E) => !E),
|
|
1175
1177
|
onMouseEnter: () => c(!0),
|
|
1176
1178
|
onMouseLeave: () => c(!1),
|
|
1177
1179
|
title: d ? "Close navigation" : "Open navigation",
|
|
@@ -1181,13 +1183,13 @@ function Ql({
|
|
|
1181
1183
|
children: le
|
|
1182
1184
|
}
|
|
1183
1185
|
),
|
|
1184
|
-
|
|
1186
|
+
A && /* @__PURE__ */ l("div", { style: te, children: /* @__PURE__ */ l(
|
|
1185
1187
|
"button",
|
|
1186
1188
|
{
|
|
1187
|
-
ref: (
|
|
1188
|
-
h.current =
|
|
1189
|
+
ref: (E) => {
|
|
1190
|
+
h.current = E, y(E);
|
|
1189
1191
|
},
|
|
1190
|
-
onClick: () => i((
|
|
1192
|
+
onClick: () => i((E) => !E),
|
|
1191
1193
|
title: o ? "Close navigation" : "Open navigation",
|
|
1192
1194
|
"aria-label": o ? "Close navigation" : "Open navigation",
|
|
1193
1195
|
className: "absolute bottom-4 right-4 flex h-11 w-11 items-center justify-center rounded-full border border-border bg-background shadow-lg",
|
|
@@ -1206,7 +1208,7 @@ function Ql({
|
|
|
1206
1208
|
ref: m,
|
|
1207
1209
|
onMouseEnter: () => c(!0),
|
|
1208
1210
|
onMouseLeave: () => c(!1),
|
|
1209
|
-
className: `max-h-[70vh] w-96 max-w-[calc(100vw-2rem)] overflow-y-auto rounded-xl border border-border bg-background p-2 shadow-xl transition-all duration-150 ${
|
|
1211
|
+
className: `max-h-[70vh] w-96 max-w-[calc(100vw-2rem)] overflow-y-auto rounded-xl border border-border bg-background p-2 shadow-xl transition-all duration-150 ${A ? "origin-bottom-right" : ""} ${d ? "opacity-100 scale-100 pointer-events-auto" : "opacity-0 scale-95 pointer-events-none"}`,
|
|
1210
1212
|
style: me,
|
|
1211
1213
|
children: pe
|
|
1212
1214
|
}
|
|
@@ -1684,7 +1686,7 @@ function Go({
|
|
|
1684
1686
|
return;
|
|
1685
1687
|
}
|
|
1686
1688
|
}
|
|
1687
|
-
},
|
|
1689
|
+
}, F = w ? `${r.length} result${r.length === 1 ? "" : "s"} found` : "", $ = typeof navigator < "u" && /Mac|iPod|iPhone|iPad/.test(navigator.userAgent);
|
|
1688
1690
|
return /* @__PURE__ */ g(U, { children: [
|
|
1689
1691
|
/* @__PURE__ */ l(
|
|
1690
1692
|
"button",
|
|
@@ -1733,7 +1735,7 @@ function Go({
|
|
|
1733
1735
|
className: "w-full rounded-md bg-surface px-4 py-3 text-sm text-foreground placeholder:text-foreground-muted focus:outline-none"
|
|
1734
1736
|
}
|
|
1735
1737
|
) }),
|
|
1736
|
-
/* @__PURE__ */ l("div", { "aria-live": "polite", className: "sr-only", children:
|
|
1738
|
+
/* @__PURE__ */ l("div", { "aria-live": "polite", className: "sr-only", children: F }),
|
|
1737
1739
|
w && /* @__PURE__ */ l(
|
|
1738
1740
|
"div",
|
|
1739
1741
|
{
|
|
@@ -1775,7 +1777,7 @@ function Go({
|
|
|
1775
1777
|
] }),
|
|
1776
1778
|
/* @__PURE__ */ g("span", { className: "flex items-center gap-1", children: [
|
|
1777
1779
|
"Press",
|
|
1778
|
-
/* @__PURE__ */ l("kbd", { className: "rounded border border-border bg-neutral-50 px-1 font-mono text-[10px]", children:
|
|
1780
|
+
/* @__PURE__ */ l("kbd", { className: "rounded border border-border bg-neutral-50 px-1 font-mono text-[10px]", children: $ ? "⌘ Cmd" : "Ctrl" }),
|
|
1779
1781
|
/* @__PURE__ */ l("kbd", { className: "rounded border border-border bg-neutral-50 px-1 font-mono text-[10px]", children: "K" }),
|
|
1780
1782
|
"to search"
|
|
1781
1783
|
] })
|
|
@@ -2531,19 +2533,19 @@ function _c(e, t, r, { location: n = K.location, distance: s = K.distance, thres
|
|
|
2531
2533
|
}
|
|
2532
2534
|
}
|
|
2533
2535
|
m = -1;
|
|
2534
|
-
let w = [], _ = 1, j = 0,
|
|
2535
|
-
const
|
|
2536
|
+
let w = [], _ = 1, j = 0, F = u + f;
|
|
2537
|
+
const $ = 1 << u - 1;
|
|
2536
2538
|
for (let b = 0; b < u; b += 1) {
|
|
2537
|
-
let C = 0, I =
|
|
2539
|
+
let C = 0, I = F;
|
|
2538
2540
|
for (; C < I; )
|
|
2539
|
-
x(b, p + I) <= h ? C = I :
|
|
2540
|
-
|
|
2541
|
+
x(b, p + I) <= h ? C = I : F = I, I = Math.floor((F - C) / 2 + C);
|
|
2542
|
+
F = I;
|
|
2541
2543
|
let T = Math.max(1, p - I + 1);
|
|
2542
2544
|
const P = i ? f : Math.min(p + I, f) + u, H = Array(P + 2);
|
|
2543
2545
|
H[P + 1] = (1 << b) - 1;
|
|
2544
2546
|
for (let Z = P; Z >= T; Z -= 1) {
|
|
2545
|
-
const N = Z - 1,
|
|
2546
|
-
if (H[Z] = (H[Z + 1] << 1 | 1) &
|
|
2547
|
+
const N = Z - 1, A = r[e[N]];
|
|
2548
|
+
if (H[Z] = (H[Z + 1] << 1 | 1) & A, b && (H[Z] |= (w[Z + 1] | w[Z]) << 1 | 1 | w[Z + 1]), H[Z] & $ && (_ = x(b, N), _ <= h)) {
|
|
2547
2549
|
if (h = _, m = N, j = b, m <= p) break;
|
|
2548
2550
|
T = Math.max(1, 2 * p - m);
|
|
2549
2551
|
}
|
|
@@ -3551,7 +3553,7 @@ function ii({
|
|
|
3551
3553
|
}, [f, p] = D({}), h = e.some((T) => T.id === i) ? i : o, m = {};
|
|
3552
3554
|
for (const T of n)
|
|
3553
3555
|
m[T.id] = T.visible ? f[T.id] ?? null : null;
|
|
3554
|
-
const x = (T, P) => p((H) => ({ ...H, [T]: P })), [y, v] = D(null), [S, w] = D(null), [_, j] = D(null),
|
|
3556
|
+
const x = (T, P) => p((H) => ({ ...H, [T]: P })), [y, v] = D(null), [S, w] = D(null), [_, j] = D(null), F = (T) => {
|
|
3555
3557
|
r(T.tab) ? u(T.tab) : T.tab === "servers" && d("servers");
|
|
3556
3558
|
const P = {};
|
|
3557
3559
|
for (const H of n)
|
|
@@ -3559,7 +3561,7 @@ function ii({
|
|
|
3559
3561
|
p(P), v(T.focusSection ?? null), w(
|
|
3560
3562
|
T.tab === "schemas" && T.schemaFocusTokens ? { tokens: T.schemaFocusTokens, id: T.targetId } : null
|
|
3561
3563
|
), T.tab === "schemas" && Xn(), j({ targetId: T.targetId, query: s, highlight: T.tab !== "schemas" });
|
|
3562
|
-
},
|
|
3564
|
+
}, $ = (T, P) => {
|
|
3563
3565
|
u(T), p((H) => {
|
|
3564
3566
|
const Z = { ...H };
|
|
3565
3567
|
for (const N of n)
|
|
@@ -3597,8 +3599,8 @@ function ii({
|
|
|
3597
3599
|
selected: m,
|
|
3598
3600
|
setSelectedKey: x,
|
|
3599
3601
|
selectedNavItem: C,
|
|
3600
|
-
handleSearchSelect:
|
|
3601
|
-
handleNavItemSelect:
|
|
3602
|
+
handleSearchSelect: F,
|
|
3603
|
+
handleNavItemSelect: $,
|
|
3602
3604
|
handleNavServerSelect: k,
|
|
3603
3605
|
handleContentTabChange: b,
|
|
3604
3606
|
focusSection: y,
|
|
@@ -3867,7 +3869,7 @@ function mt(e, t, r, n) {
|
|
|
3867
3869
|
let Nn = null, Yn = null;
|
|
3868
3870
|
const Ar = /* @__PURE__ */ new Set();
|
|
3869
3871
|
function md() {
|
|
3870
|
-
return Yn || (Yn = import("./protoToJsonSchema-
|
|
3872
|
+
return Yn || (Yn = import("./protoToJsonSchema-DRXbMJXQ.js").then((e) => {
|
|
3871
3873
|
Nn = e.protoToJsonSchema, Ar.forEach((t) => t());
|
|
3872
3874
|
})), Yn;
|
|
3873
3875
|
}
|
|
@@ -4353,7 +4355,7 @@ function mi(e) {
|
|
|
4353
4355
|
const gi = {
|
|
4354
4356
|
"x-x": () => import("./XExtension-GyRtdHLL.js"),
|
|
4355
4357
|
"x-linkedin": () => import("./LinkedInExtension-BL-4T9tt.js")
|
|
4356
|
-
}, Md = () => import("./LogoExtension-
|
|
4358
|
+
}, Md = () => import("./LogoExtension-Cs6937hf.js");
|
|
4357
4359
|
function ns() {
|
|
4358
4360
|
return {
|
|
4359
4361
|
async: !1,
|
|
@@ -4767,22 +4769,22 @@ ${u}` : u;
|
|
|
4767
4769
|
`, e = e.substring(p.length + 1), c = !0), !c) {
|
|
4768
4770
|
const v = this.rules.other.nextBulletRegex(m), S = this.rules.other.hrRegex(m), w = this.rules.other.fencesBeginRegex(m), _ = this.rules.other.headingBeginRegex(m), j = this.rules.other.htmlBeginRegex(m);
|
|
4769
4771
|
for (; e; ) {
|
|
4770
|
-
const
|
|
4772
|
+
const F = e.split(`
|
|
4771
4773
|
`, 1)[0];
|
|
4772
|
-
let
|
|
4773
|
-
if (p =
|
|
4774
|
+
let $;
|
|
4775
|
+
if (p = F, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), $ = p) : $ = p.replace(this.rules.other.tabCharGlobal, " "), w.test(p) || _.test(p) || j.test(p) || v.test(p) || S.test(p))
|
|
4774
4776
|
break;
|
|
4775
|
-
if (
|
|
4777
|
+
if ($.search(this.rules.other.nonSpaceChar) >= m || !p.trim())
|
|
4776
4778
|
u += `
|
|
4777
|
-
` +
|
|
4779
|
+
` + $.slice(m);
|
|
4778
4780
|
else {
|
|
4779
4781
|
if (h || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || w.test(f) || _.test(f) || S.test(f))
|
|
4780
4782
|
break;
|
|
4781
4783
|
u += `
|
|
4782
4784
|
` + p;
|
|
4783
4785
|
}
|
|
4784
|
-
!h && !p.trim() && (h = !0), d +=
|
|
4785
|
-
`, e = e.substring(
|
|
4786
|
+
!h && !p.trim() && (h = !0), d += F + `
|
|
4787
|
+
`, e = e.substring(F.length + 1), f = $.slice(m);
|
|
4786
4788
|
}
|
|
4787
4789
|
}
|
|
4788
4790
|
s.loose || (i ? s.loose = !0 : this.rules.other.doubleBlankLine.test(d) && (i = !0));
|
|
@@ -6653,19 +6655,19 @@ const Qn = Oi, io = Qe, ao = Symbol("nomatch"), ff = 7, Hi = function(e) {
|
|
|
6653
6655
|
return a.noHighlightRe.test(N);
|
|
6654
6656
|
}
|
|
6655
6657
|
function d(N) {
|
|
6656
|
-
let
|
|
6657
|
-
|
|
6658
|
-
const R = a.languageDetectRe.exec(
|
|
6658
|
+
let A = N.className + " ";
|
|
6659
|
+
A += N.parentNode ? N.parentNode.className : "";
|
|
6660
|
+
const R = a.languageDetectRe.exec(A);
|
|
6659
6661
|
if (R) {
|
|
6660
6662
|
const X = k(R[1]);
|
|
6661
6663
|
return X || (oo(o.replace("{}", R[1])), oo("Falling back to no-highlight mode for this block.", N)), X ? R[1] : "no-highlight";
|
|
6662
6664
|
}
|
|
6663
|
-
return
|
|
6665
|
+
return A.split(/\s+/).find((X) => c(X) || k(X));
|
|
6664
6666
|
}
|
|
6665
|
-
function u(N,
|
|
6667
|
+
function u(N, A, R) {
|
|
6666
6668
|
let X = "", te = "";
|
|
6667
|
-
typeof
|
|
6668
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X =
|
|
6669
|
+
typeof A == "object" ? (X = N, R = A.ignoreIllegals, te = A.language) : (ht("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ht("10.7.0", `Please use highlight(code, options) instead.
|
|
6670
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = A), R === void 0 && (R = !0);
|
|
6669
6671
|
const oe = {
|
|
6670
6672
|
code: X,
|
|
6671
6673
|
language: te
|
|
@@ -6674,22 +6676,22 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6674
6676
|
const me = oe.result ? oe.result : f(oe.language, oe.code, R);
|
|
6675
6677
|
return me.code = oe.code, H("after:highlight", me), me;
|
|
6676
6678
|
}
|
|
6677
|
-
function f(N,
|
|
6679
|
+
function f(N, A, R, X) {
|
|
6678
6680
|
const te = /* @__PURE__ */ Object.create(null);
|
|
6679
6681
|
function oe(O, L) {
|
|
6680
6682
|
return O.keywords[L];
|
|
6681
6683
|
}
|
|
6682
6684
|
function me() {
|
|
6683
|
-
if (!
|
|
6685
|
+
if (!z.keywords) {
|
|
6684
6686
|
ye.addText(ie);
|
|
6685
6687
|
return;
|
|
6686
6688
|
}
|
|
6687
6689
|
let O = 0;
|
|
6688
|
-
|
|
6689
|
-
let L =
|
|
6690
|
+
z.keywordPatternRe.lastIndex = 0;
|
|
6691
|
+
let L = z.keywordPatternRe.exec(ie), V = "";
|
|
6690
6692
|
for (; L; ) {
|
|
6691
6693
|
V += ie.substring(O, L.index);
|
|
6692
|
-
const ee = re.case_insensitive ? L[0].toLowerCase() : L[0], ke = oe(
|
|
6694
|
+
const ee = re.case_insensitive ? L[0].toLowerCase() : L[0], ke = oe(z, ee);
|
|
6693
6695
|
if (ke) {
|
|
6694
6696
|
const [Ue, Ja] = ke;
|
|
6695
6697
|
if (ye.addText(V), V = "", te[ee] = (te[ee] || 0) + 1, te[ee] <= ff && (ot += Ja), Ue.startsWith("_"))
|
|
@@ -6700,26 +6702,26 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6700
6702
|
}
|
|
6701
6703
|
} else
|
|
6702
6704
|
V += L[0];
|
|
6703
|
-
O =
|
|
6705
|
+
O = z.keywordPatternRe.lastIndex, L = z.keywordPatternRe.exec(ie);
|
|
6704
6706
|
}
|
|
6705
6707
|
V += ie.substring(O), ye.addText(V);
|
|
6706
6708
|
}
|
|
6707
6709
|
function ge() {
|
|
6708
6710
|
if (ie === "") return;
|
|
6709
6711
|
let O = null;
|
|
6710
|
-
if (typeof
|
|
6711
|
-
if (!t[
|
|
6712
|
+
if (typeof z.subLanguage == "string") {
|
|
6713
|
+
if (!t[z.subLanguage]) {
|
|
6712
6714
|
ye.addText(ie);
|
|
6713
6715
|
return;
|
|
6714
6716
|
}
|
|
6715
|
-
O = f(
|
|
6717
|
+
O = f(z.subLanguage, ie, !0, we[z.subLanguage]), we[z.subLanguage] = /** @type {CompiledMode} */
|
|
6716
6718
|
O._top;
|
|
6717
6719
|
} else
|
|
6718
|
-
O = h(ie,
|
|
6719
|
-
|
|
6720
|
+
O = h(ie, z.subLanguage.length ? z.subLanguage : null);
|
|
6721
|
+
z.relevance > 0 && (ot += O.relevance), ye.__addSublanguage(O._emitter, O.language);
|
|
6720
6722
|
}
|
|
6721
6723
|
function pe() {
|
|
6722
|
-
|
|
6724
|
+
z.subLanguage != null ? ge() : me(), ie = "";
|
|
6723
6725
|
}
|
|
6724
6726
|
function ue(O, L) {
|
|
6725
6727
|
O !== "" && (ye.startScope(L), ye.addText(O), ye.endScope());
|
|
@@ -6736,8 +6738,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6736
6738
|
ke ? ue(Ue, ke) : (ie = Ue, me(), ie = ""), V++;
|
|
6737
6739
|
}
|
|
6738
6740
|
}
|
|
6739
|
-
function
|
|
6740
|
-
return O.scope && typeof O.scope == "string" && ye.openNode(re.classNameAliases[O.scope] || O.scope), O.beginScope && (O.beginScope._wrap ? (ue(ie, re.classNameAliases[O.beginScope._wrap] || O.beginScope._wrap), ie = "") : O.beginScope._multi && (le(O.beginScope, L), ie = "")),
|
|
6741
|
+
function E(O, L) {
|
|
6742
|
+
return O.scope && typeof O.scope == "string" && ye.openNode(re.classNameAliases[O.scope] || O.scope), O.beginScope && (O.beginScope._wrap ? (ue(ie, re.classNameAliases[O.beginScope._wrap] || O.beginScope._wrap), ie = "") : O.beginScope._multi && (le(O.beginScope, L), ie = "")), z = Object.create(O, { parent: { value: z } }), z;
|
|
6741
6743
|
}
|
|
6742
6744
|
function B(O, L, V) {
|
|
6743
6745
|
let ee = $u(O.endRe, V);
|
|
@@ -6756,29 +6758,29 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6756
6758
|
return B(O.parent, L, V);
|
|
6757
6759
|
}
|
|
6758
6760
|
function Q(O) {
|
|
6759
|
-
return
|
|
6761
|
+
return z.matcher.regexIndex === 0 ? (ie += O[0], 1) : (He = !0, 0);
|
|
6760
6762
|
}
|
|
6761
6763
|
function q(O) {
|
|
6762
6764
|
const L = O[0], V = O.rule, ee = new to(V), ke = [V.__beforeBegin, V["on:begin"]];
|
|
6763
6765
|
for (const Ue of ke)
|
|
6764
6766
|
if (Ue && (Ue(O, ee), ee.isMatchIgnored))
|
|
6765
6767
|
return Q(L);
|
|
6766
|
-
return V.skip ? ie += L : (V.excludeBegin && (ie += L), pe(), !V.returnBegin && !V.excludeBegin && (ie = L)),
|
|
6768
|
+
return V.skip ? ie += L : (V.excludeBegin && (ie += L), pe(), !V.returnBegin && !V.excludeBegin && (ie = L)), E(V, O), V.returnBegin ? 0 : L.length;
|
|
6767
6769
|
}
|
|
6768
6770
|
function ce(O) {
|
|
6769
|
-
const L = O[0], V =
|
|
6771
|
+
const L = O[0], V = A.substring(O.index), ee = B(z, O, V);
|
|
6770
6772
|
if (!ee)
|
|
6771
6773
|
return ao;
|
|
6772
|
-
const ke =
|
|
6773
|
-
|
|
6774
|
+
const ke = z;
|
|
6775
|
+
z.endScope && z.endScope._wrap ? (pe(), ue(L, z.endScope._wrap)) : z.endScope && z.endScope._multi ? (pe(), le(z.endScope, O)) : ke.skip ? ie += L : (ke.returnEnd || ke.excludeEnd || (ie += L), pe(), ke.excludeEnd && (ie = L));
|
|
6774
6776
|
do
|
|
6775
|
-
|
|
6776
|
-
while (
|
|
6777
|
-
return ee.starts &&
|
|
6777
|
+
z.scope && ye.closeNode(), !z.skip && !z.subLanguage && (ot += z.relevance), z = z.parent;
|
|
6778
|
+
while (z !== ee.parent);
|
|
6779
|
+
return ee.starts && E(ee.starts, O), ke.returnEnd ? 0 : L.length;
|
|
6778
6780
|
}
|
|
6779
6781
|
function W() {
|
|
6780
6782
|
const O = [];
|
|
6781
|
-
for (let L =
|
|
6783
|
+
for (let L = z; L !== re; L = L.parent)
|
|
6782
6784
|
L.scope && O.unshift(L.scope);
|
|
6783
6785
|
O.forEach((L) => ye.openNode(L));
|
|
6784
6786
|
}
|
|
@@ -6788,7 +6790,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6788
6790
|
if (ie += O, V == null)
|
|
6789
6791
|
return pe(), 0;
|
|
6790
6792
|
if (ne.type === "begin" && L.type === "end" && ne.index === L.index && V === "") {
|
|
6791
|
-
if (ie +=
|
|
6793
|
+
if (ie += A.slice(L.index, L.index + 1), !s) {
|
|
6792
6794
|
const ee = new Error(`0 width match regex (${N})`);
|
|
6793
6795
|
throw ee.languageName = N, ee.badRule = ne.rule, ee;
|
|
6794
6796
|
}
|
|
@@ -6797,8 +6799,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6797
6799
|
if (ne = L, L.type === "begin")
|
|
6798
6800
|
return q(L);
|
|
6799
6801
|
if (L.type === "illegal" && !R) {
|
|
6800
|
-
const ee = new Error('Illegal lexeme "' + V + '" for mode "' + (
|
|
6801
|
-
throw ee.mode =
|
|
6802
|
+
const ee = new Error('Illegal lexeme "' + V + '" for mode "' + (z.scope || "<unnamed>") + '"');
|
|
6803
|
+
throw ee.mode = z, ee;
|
|
6802
6804
|
} else if (L.type === "end") {
|
|
6803
6805
|
const ee = ce(L);
|
|
6804
6806
|
if (ee !== ao)
|
|
@@ -6815,22 +6817,22 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6815
6817
|
if (!re)
|
|
6816
6818
|
throw lt(o.replace("{}", N)), new Error('Unknown language: "' + N + '"');
|
|
6817
6819
|
const Me = lf(re);
|
|
6818
|
-
let be = "",
|
|
6820
|
+
let be = "", z = X || Me;
|
|
6819
6821
|
const we = {}, ye = new a.__emitter(a);
|
|
6820
6822
|
W();
|
|
6821
6823
|
let ie = "", ot = 0, je = 0, Et = 0, He = !1;
|
|
6822
6824
|
try {
|
|
6823
6825
|
if (re.__emitTokens)
|
|
6824
|
-
re.__emitTokens(
|
|
6826
|
+
re.__emitTokens(A, ye);
|
|
6825
6827
|
else {
|
|
6826
|
-
for (
|
|
6827
|
-
Et++, He ? He = !1 :
|
|
6828
|
-
const O =
|
|
6828
|
+
for (z.matcher.considerAll(); ; ) {
|
|
6829
|
+
Et++, He ? He = !1 : z.matcher.considerAll(), z.matcher.lastIndex = je;
|
|
6830
|
+
const O = z.matcher.exec(A);
|
|
6829
6831
|
if (!O) break;
|
|
6830
|
-
const L =
|
|
6832
|
+
const L = A.substring(je, O.index), V = xe(L, O);
|
|
6831
6833
|
je = O.index + V;
|
|
6832
6834
|
}
|
|
6833
|
-
xe(
|
|
6835
|
+
xe(A.substring(je));
|
|
6834
6836
|
}
|
|
6835
6837
|
return ye.finalize(), be = ye.toHTML(), {
|
|
6836
6838
|
language: N,
|
|
@@ -6838,19 +6840,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6838
6840
|
relevance: ot,
|
|
6839
6841
|
illegal: !1,
|
|
6840
6842
|
_emitter: ye,
|
|
6841
|
-
_top:
|
|
6843
|
+
_top: z
|
|
6842
6844
|
};
|
|
6843
6845
|
} catch (O) {
|
|
6844
6846
|
if (O.message && O.message.includes("Illegal"))
|
|
6845
6847
|
return {
|
|
6846
6848
|
language: N,
|
|
6847
|
-
value: Qn(
|
|
6849
|
+
value: Qn(A),
|
|
6848
6850
|
illegal: !0,
|
|
6849
6851
|
relevance: 0,
|
|
6850
6852
|
_illegalBy: {
|
|
6851
6853
|
message: O.message,
|
|
6852
6854
|
index: je,
|
|
6853
|
-
context:
|
|
6855
|
+
context: A.slice(je - 100, je + 100),
|
|
6854
6856
|
mode: O.mode,
|
|
6855
6857
|
resultSoFar: be
|
|
6856
6858
|
},
|
|
@@ -6859,29 +6861,29 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6859
6861
|
if (s)
|
|
6860
6862
|
return {
|
|
6861
6863
|
language: N,
|
|
6862
|
-
value: Qn(
|
|
6864
|
+
value: Qn(A),
|
|
6863
6865
|
illegal: !1,
|
|
6864
6866
|
relevance: 0,
|
|
6865
6867
|
errorRaised: O,
|
|
6866
6868
|
_emitter: ye,
|
|
6867
|
-
_top:
|
|
6869
|
+
_top: z
|
|
6868
6870
|
};
|
|
6869
6871
|
throw O;
|
|
6870
6872
|
}
|
|
6871
6873
|
}
|
|
6872
6874
|
function p(N) {
|
|
6873
|
-
const
|
|
6875
|
+
const A = {
|
|
6874
6876
|
value: Qn(N),
|
|
6875
6877
|
illegal: !1,
|
|
6876
6878
|
relevance: 0,
|
|
6877
6879
|
_top: i,
|
|
6878
6880
|
_emitter: new a.__emitter(a)
|
|
6879
6881
|
};
|
|
6880
|
-
return
|
|
6882
|
+
return A._emitter.addText(N), A;
|
|
6881
6883
|
}
|
|
6882
|
-
function h(N,
|
|
6883
|
-
|
|
6884
|
-
const R = p(N), X =
|
|
6884
|
+
function h(N, A) {
|
|
6885
|
+
A = A || a.languages || Object.keys(t);
|
|
6886
|
+
const R = p(N), X = A.filter(k).filter(C).map(
|
|
6885
6887
|
(pe) => f(pe, N, !1)
|
|
6886
6888
|
);
|
|
6887
6889
|
X.unshift(R);
|
|
@@ -6897,12 +6899,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6897
6899
|
}), [oe, me] = te, ge = oe;
|
|
6898
6900
|
return ge.secondBest = me, ge;
|
|
6899
6901
|
}
|
|
6900
|
-
function m(N,
|
|
6901
|
-
const X =
|
|
6902
|
+
function m(N, A, R) {
|
|
6903
|
+
const X = A && r[A] || R;
|
|
6902
6904
|
N.classList.add("hljs"), N.classList.add(`language-${X}`);
|
|
6903
6905
|
}
|
|
6904
6906
|
function x(N) {
|
|
6905
|
-
let
|
|
6907
|
+
let A = null;
|
|
6906
6908
|
const R = d(N);
|
|
6907
6909
|
if (c(R)) return;
|
|
6908
6910
|
if (H(
|
|
@@ -6917,8 +6919,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6917
6919
|
"One of your code blocks includes unescaped HTML.",
|
|
6918
6920
|
N.innerHTML
|
|
6919
6921
|
);
|
|
6920
|
-
|
|
6921
|
-
const X =
|
|
6922
|
+
A = N;
|
|
6923
|
+
const X = A.textContent, te = R ? u(X, { language: R, ignoreIllegals: !0 }) : h(X);
|
|
6922
6924
|
N.innerHTML = te.value, N.dataset.highlighted = "yes", m(N, R, te.language), N.result = {
|
|
6923
6925
|
language: te.language,
|
|
6924
6926
|
// TODO: remove with version 11.0
|
|
@@ -6949,10 +6951,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6949
6951
|
}
|
|
6950
6952
|
document.querySelectorAll(a.cssSelector).forEach(x);
|
|
6951
6953
|
}
|
|
6952
|
-
function j(N,
|
|
6954
|
+
function j(N, A) {
|
|
6953
6955
|
let R = null;
|
|
6954
6956
|
try {
|
|
6955
|
-
R =
|
|
6957
|
+
R = A(e);
|
|
6956
6958
|
} catch (X) {
|
|
6957
6959
|
if (lt("Language definition for '{}' could not be registered.".replace("{}", N)), s)
|
|
6958
6960
|
lt(X);
|
|
@@ -6960,36 +6962,36 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6960
6962
|
throw X;
|
|
6961
6963
|
R = i;
|
|
6962
6964
|
}
|
|
6963
|
-
R.name || (R.name = N), t[N] = R, R.rawDefinition =
|
|
6965
|
+
R.name || (R.name = N), t[N] = R, R.rawDefinition = A.bind(null, e), R.aliases && b(R.aliases, { languageName: N });
|
|
6964
6966
|
}
|
|
6965
|
-
function
|
|
6967
|
+
function F(N) {
|
|
6966
6968
|
delete t[N];
|
|
6967
|
-
for (const
|
|
6968
|
-
r[
|
|
6969
|
+
for (const A of Object.keys(r))
|
|
6970
|
+
r[A] === N && delete r[A];
|
|
6969
6971
|
}
|
|
6970
|
-
function
|
|
6972
|
+
function $() {
|
|
6971
6973
|
return Object.keys(t);
|
|
6972
6974
|
}
|
|
6973
6975
|
function k(N) {
|
|
6974
6976
|
return N = (N || "").toLowerCase(), t[N] || t[r[N]];
|
|
6975
6977
|
}
|
|
6976
|
-
function b(N, { languageName:
|
|
6978
|
+
function b(N, { languageName: A }) {
|
|
6977
6979
|
typeof N == "string" && (N = [N]), N.forEach((R) => {
|
|
6978
|
-
r[R.toLowerCase()] =
|
|
6980
|
+
r[R.toLowerCase()] = A;
|
|
6979
6981
|
});
|
|
6980
6982
|
}
|
|
6981
6983
|
function C(N) {
|
|
6982
|
-
const
|
|
6983
|
-
return
|
|
6984
|
+
const A = k(N);
|
|
6985
|
+
return A && !A.disableAutodetect;
|
|
6984
6986
|
}
|
|
6985
6987
|
function I(N) {
|
|
6986
|
-
N["before:highlightBlock"] && !N["before:highlightElement"] && (N["before:highlightElement"] = (
|
|
6988
|
+
N["before:highlightBlock"] && !N["before:highlightElement"] && (N["before:highlightElement"] = (A) => {
|
|
6987
6989
|
N["before:highlightBlock"](
|
|
6988
|
-
Object.assign({ block:
|
|
6990
|
+
Object.assign({ block: A.el }, A)
|
|
6989
6991
|
);
|
|
6990
|
-
}), N["after:highlightBlock"] && !N["after:highlightElement"] && (N["after:highlightElement"] = (
|
|
6992
|
+
}), N["after:highlightBlock"] && !N["after:highlightElement"] && (N["after:highlightElement"] = (A) => {
|
|
6991
6993
|
N["after:highlightBlock"](
|
|
6992
|
-
Object.assign({ block:
|
|
6994
|
+
Object.assign({ block: A.el }, A)
|
|
6993
6995
|
);
|
|
6994
6996
|
});
|
|
6995
6997
|
}
|
|
@@ -6997,13 +6999,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
6997
6999
|
I(N), n.push(N);
|
|
6998
7000
|
}
|
|
6999
7001
|
function P(N) {
|
|
7000
|
-
const
|
|
7001
|
-
|
|
7002
|
+
const A = n.indexOf(N);
|
|
7003
|
+
A !== -1 && n.splice(A, 1);
|
|
7002
7004
|
}
|
|
7003
|
-
function H(N,
|
|
7005
|
+
function H(N, A) {
|
|
7004
7006
|
const R = N;
|
|
7005
7007
|
n.forEach(function(X) {
|
|
7006
|
-
X[R] && X[R](
|
|
7008
|
+
X[R] && X[R](A);
|
|
7007
7009
|
});
|
|
7008
7010
|
}
|
|
7009
7011
|
function Z(N) {
|
|
@@ -7020,8 +7022,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), te = N, X = E), R ===
|
|
|
7020
7022
|
initHighlighting: v,
|
|
7021
7023
|
initHighlightingOnLoad: S,
|
|
7022
7024
|
registerLanguage: j,
|
|
7023
|
-
unregisterLanguage:
|
|
7024
|
-
listLanguages:
|
|
7025
|
+
unregisterLanguage: F,
|
|
7026
|
+
listLanguages: $,
|
|
7025
7027
|
getLanguage: k,
|
|
7026
7028
|
registerAliases: b,
|
|
7027
7029
|
autoDetection: C,
|
|
@@ -7973,7 +7975,7 @@ function wf(e) {
|
|
|
7973
7975
|
keywords: a,
|
|
7974
7976
|
contains: ["self"].concat(_)
|
|
7975
7977
|
}
|
|
7976
|
-
]),
|
|
7978
|
+
]), F = {
|
|
7977
7979
|
className: "params",
|
|
7978
7980
|
// convert this to negative lookbehind in v12
|
|
7979
7981
|
begin: /(\s*)\(/,
|
|
@@ -7983,7 +7985,7 @@ function wf(e) {
|
|
|
7983
7985
|
excludeEnd: !0,
|
|
7984
7986
|
keywords: a,
|
|
7985
7987
|
contains: j
|
|
7986
|
-
},
|
|
7988
|
+
}, $ = {
|
|
7987
7989
|
variants: [
|
|
7988
7990
|
// class Car extends vehicle
|
|
7989
7991
|
{
|
|
@@ -8068,7 +8070,7 @@ function wf(e) {
|
|
|
8068
8070
|
3: "title.function"
|
|
8069
8071
|
},
|
|
8070
8072
|
label: "func.def",
|
|
8071
|
-
contains: [
|
|
8073
|
+
contains: [F],
|
|
8072
8074
|
illegal: /%/
|
|
8073
8075
|
}, I = {
|
|
8074
8076
|
relevance: 0,
|
|
@@ -8116,9 +8118,9 @@ function wf(e) {
|
|
|
8116
8118
|
// eat to avoid empty params
|
|
8117
8119
|
begin: /\(\)/
|
|
8118
8120
|
},
|
|
8119
|
-
|
|
8121
|
+
F
|
|
8120
8122
|
]
|
|
8121
|
-
}, N = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>",
|
|
8123
|
+
}, N = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", A = {
|
|
8122
8124
|
match: [
|
|
8123
8125
|
/const|var|let/,
|
|
8124
8126
|
/\s+/,
|
|
@@ -8135,7 +8137,7 @@ function wf(e) {
|
|
|
8135
8137
|
3: "title.function"
|
|
8136
8138
|
},
|
|
8137
8139
|
contains: [
|
|
8138
|
-
|
|
8140
|
+
F
|
|
8139
8141
|
]
|
|
8140
8142
|
};
|
|
8141
8143
|
return {
|
|
@@ -8168,7 +8170,7 @@ function wf(e) {
|
|
|
8168
8170
|
match: n + t.lookahead(":"),
|
|
8169
8171
|
relevance: 0
|
|
8170
8172
|
},
|
|
8171
|
-
|
|
8173
|
+
A,
|
|
8172
8174
|
{
|
|
8173
8175
|
// "value" container
|
|
8174
8176
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
@@ -8259,7 +8261,7 @@ function wf(e) {
|
|
|
8259
8261
|
returnBegin: !0,
|
|
8260
8262
|
label: "func.def",
|
|
8261
8263
|
contains: [
|
|
8262
|
-
|
|
8264
|
+
F,
|
|
8263
8265
|
e.inherit(e.TITLE_MODE, { begin: n, className: "title.function" })
|
|
8264
8266
|
]
|
|
8265
8267
|
},
|
|
@@ -8279,11 +8281,11 @@ function wf(e) {
|
|
|
8279
8281
|
{
|
|
8280
8282
|
match: [/\bconstructor(?=\s*\()/],
|
|
8281
8283
|
className: { 1: "title.function" },
|
|
8282
|
-
contains: [
|
|
8284
|
+
contains: [F]
|
|
8283
8285
|
},
|
|
8284
8286
|
P,
|
|
8285
8287
|
I,
|
|
8286
|
-
|
|
8288
|
+
$,
|
|
8287
8289
|
Z,
|
|
8288
8290
|
{
|
|
8289
8291
|
match: /\$[(.]/
|
|
@@ -8986,23 +8988,23 @@ function ys({
|
|
|
8986
8988
|
}) {
|
|
8987
8989
|
const [s, o] = D("idle"), i = fe(void 0), [a, c] = D(!1), [d, u] = D(!1), [f, p] = D(0), h = fe(null), m = fe(null), x = Xe();
|
|
8988
8990
|
G(() => () => clearTimeout(i.current), []), G(() => {
|
|
8989
|
-
const
|
|
8990
|
-
if (
|
|
8991
|
+
const $ = m.current;
|
|
8992
|
+
if (!$) return;
|
|
8991
8993
|
const k = () => {
|
|
8992
|
-
p(
|
|
8994
|
+
p($.scrollHeight), u($.scrollHeight > n + Df);
|
|
8993
8995
|
};
|
|
8994
8996
|
k();
|
|
8995
8997
|
const b = new ResizeObserver(k);
|
|
8996
|
-
return b.observe(
|
|
8998
|
+
return b.observe($), () => b.disconnect();
|
|
8997
8999
|
}, [e, r, n]);
|
|
8998
9000
|
const y = () => {
|
|
8999
|
-
zf(e).then((
|
|
9000
|
-
o(
|
|
9001
|
+
zf(e).then(($) => {
|
|
9002
|
+
o($ ? "copied" : "error"), clearTimeout(i.current), i.current = setTimeout(() => o("idle"), Pf);
|
|
9001
9003
|
});
|
|
9002
9004
|
}, S = Pe.getLanguage(r) ? Pe.highlight(e, { language: r }).value : null, w = s === "copied" ? "Copied" : s === "error" ? "Copy failed" : "Copy to clipboard", _ = d && !a, j = e.replace(/\n+$/, "").split(`
|
|
9003
|
-
`).length,
|
|
9004
|
-
var
|
|
9005
|
-
a && (((
|
|
9005
|
+
`).length, F = () => {
|
|
9006
|
+
var $, k;
|
|
9007
|
+
a && ((($ = h.current) == null ? void 0 : $.getBoundingClientRect().top) ?? 0) < 0 && ((k = h.current) == null || k.scrollIntoView({ block: "nearest" })), c((b) => !b);
|
|
9006
9008
|
};
|
|
9007
9009
|
return /* @__PURE__ */ g("div", { ref: h, className: `relative ${t ?? ""}`, children: [
|
|
9008
9010
|
/* @__PURE__ */ l(
|
|
@@ -9046,7 +9048,7 @@ function ys({
|
|
|
9046
9048
|
"button",
|
|
9047
9049
|
{
|
|
9048
9050
|
type: "button",
|
|
9049
|
-
onClick:
|
|
9051
|
+
onClick: F,
|
|
9050
9052
|
"aria-expanded": a,
|
|
9051
9053
|
"aria-controls": x,
|
|
9052
9054
|
className: "flex items-center gap-1 mt-1 px-1 py-0.5 rounded text-xs text-foreground-muted hover:text-foreground-secondary transition-colors",
|
|
@@ -9821,10 +9823,10 @@ function Re({
|
|
|
9821
9823
|
S !== c && (w(c), v(c || h)), G(() => {
|
|
9822
9824
|
h && v(!0);
|
|
9823
9825
|
}, [h]);
|
|
9824
|
-
const [_, j] = D(0),
|
|
9826
|
+
const [_, j] = D(0), F = (le = u == null ? void 0 : u[0]) == null ? void 0 : le.match(/^(?:oneOf|anyOf)\[(\d+)\]$/), $ = F ? Number(F[1]) : -1;
|
|
9825
9827
|
G(() => {
|
|
9826
|
-
|
|
9827
|
-
}, [
|
|
9828
|
+
$ >= 0 && j($);
|
|
9829
|
+
}, [$]);
|
|
9828
9830
|
const k = ts(), { schema: b, refLabel: C, circular: I } = Y(() => {
|
|
9829
9831
|
if (d.objects.has(e) || typeof e.$ref == "string" && d.refs.has(e.$ref))
|
|
9830
9832
|
return {
|
|
@@ -9832,10 +9834,10 @@ function Re({
|
|
|
9832
9834
|
refLabel: _r(e),
|
|
9833
9835
|
circular: !0
|
|
9834
9836
|
};
|
|
9835
|
-
const
|
|
9836
|
-
return
|
|
9837
|
-
|
|
9838
|
-
schema: Ne(
|
|
9837
|
+
const E = Ke(e, o, s);
|
|
9838
|
+
return E.circular ? E : {
|
|
9839
|
+
...E,
|
|
9840
|
+
schema: Ne(E.schema, o, s)
|
|
9839
9841
|
};
|
|
9840
9842
|
}, [e, o, s, d, k]), T = Y(
|
|
9841
9843
|
() => ({
|
|
@@ -9844,18 +9846,18 @@ function Re({
|
|
|
9844
9846
|
}),
|
|
9845
9847
|
[d, e]
|
|
9846
9848
|
), P = ea(Vf(b)), H = !na(P) && ($e(b) || Te(b) || Ie(b)), Z = () => {
|
|
9847
|
-
const
|
|
9848
|
-
if (
|
|
9849
|
-
if (typeof
|
|
9850
|
-
return /* @__PURE__ */ l(er, { children: /* @__PURE__ */ l(sp, { value:
|
|
9851
|
-
const B = Ke(
|
|
9849
|
+
const E = qi(b);
|
|
9850
|
+
if (E === null) return null;
|
|
9851
|
+
if (typeof E == "boolean")
|
|
9852
|
+
return /* @__PURE__ */ l(er, { children: /* @__PURE__ */ l(sp, { value: E }) });
|
|
9853
|
+
const B = Ke(E, o, s);
|
|
9852
9854
|
if (B.circular)
|
|
9853
9855
|
return /* @__PURE__ */ l(er, { children: /* @__PURE__ */ l(
|
|
9854
9856
|
Ee,
|
|
9855
9857
|
{
|
|
9856
9858
|
path: t,
|
|
9857
9859
|
depth: r + 1,
|
|
9858
|
-
typeLabelOverride: `↩ ${
|
|
9860
|
+
typeLabelOverride: `↩ ${E.$ref}`,
|
|
9859
9861
|
expandable: !1,
|
|
9860
9862
|
expanded: !1,
|
|
9861
9863
|
onToggle: () => {
|
|
@@ -9867,7 +9869,7 @@ function Re({
|
|
|
9867
9869
|
return /* @__PURE__ */ l(er, { children: q ? /* @__PURE__ */ l(on, { schema: Q, showBorder: !1 }) : /* @__PURE__ */ l(
|
|
9868
9870
|
Re,
|
|
9869
9871
|
{
|
|
9870
|
-
schema:
|
|
9872
|
+
schema: E,
|
|
9871
9873
|
path: t,
|
|
9872
9874
|
depth: r + 1,
|
|
9873
9875
|
refStack: s,
|
|
@@ -9878,17 +9880,17 @@ function Re({
|
|
|
9878
9880
|
defaultExpanded: c
|
|
9879
9881
|
}
|
|
9880
9882
|
) });
|
|
9881
|
-
}, N = (
|
|
9882
|
-
if (typeof
|
|
9883
|
-
return /* @__PURE__ */ l("span", { className: "inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary", children:
|
|
9884
|
-
const Q = Ke(
|
|
9883
|
+
}, N = (E, B) => {
|
|
9884
|
+
if (typeof E == "boolean")
|
|
9885
|
+
return /* @__PURE__ */ l("span", { className: "inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary", children: E ? "any value" : "false schema" });
|
|
9886
|
+
const Q = Ke(E, o, s);
|
|
9885
9887
|
if (Q.circular)
|
|
9886
9888
|
return /* @__PURE__ */ l(
|
|
9887
9889
|
Ee,
|
|
9888
9890
|
{
|
|
9889
9891
|
path: B,
|
|
9890
9892
|
depth: r + 1,
|
|
9891
|
-
typeLabelOverride: `↩ ${
|
|
9893
|
+
typeLabelOverride: `↩ ${E.$ref}`,
|
|
9892
9894
|
expandable: !1,
|
|
9893
9895
|
expanded: !1,
|
|
9894
9896
|
onToggle: () => {
|
|
@@ -9900,7 +9902,7 @@ function Re({
|
|
|
9900
9902
|
return Le(q) ? /* @__PURE__ */ l(on, { schema: q, showBorder: !1 }) : /* @__PURE__ */ l(
|
|
9901
9903
|
Re,
|
|
9902
9904
|
{
|
|
9903
|
-
schema:
|
|
9905
|
+
schema: E,
|
|
9904
9906
|
path: B,
|
|
9905
9907
|
depth: r + 1,
|
|
9906
9908
|
refStack: s,
|
|
@@ -9911,10 +9913,10 @@ function Re({
|
|
|
9911
9913
|
defaultExpanded: c
|
|
9912
9914
|
}
|
|
9913
9915
|
);
|
|
9914
|
-
},
|
|
9915
|
-
const B = qn(
|
|
9916
|
+
}, A = (E) => {
|
|
9917
|
+
const B = qn(E.if);
|
|
9916
9918
|
if (B === null) return null;
|
|
9917
|
-
const Q = qn(
|
|
9919
|
+
const Q = qn(E.then), q = qn(E.else);
|
|
9918
9920
|
return /* @__PURE__ */ l(
|
|
9919
9921
|
cp,
|
|
9920
9922
|
{
|
|
@@ -9924,8 +9926,8 @@ function Re({
|
|
|
9924
9926
|
}
|
|
9925
9927
|
);
|
|
9926
9928
|
}, R = () => {
|
|
9927
|
-
const
|
|
9928
|
-
return
|
|
9929
|
+
const E = ta(b);
|
|
9930
|
+
return E.length === 0 ? null : /* @__PURE__ */ l(U, { children: E.map((B, Q) => /* @__PURE__ */ l("div", { children: A(B) }, Q)) });
|
|
9929
9931
|
};
|
|
9930
9932
|
if (I)
|
|
9931
9933
|
return /* @__PURE__ */ l(
|
|
@@ -9942,12 +9944,12 @@ function Re({
|
|
|
9942
9944
|
}
|
|
9943
9945
|
);
|
|
9944
9946
|
if (H) {
|
|
9945
|
-
const
|
|
9947
|
+
const E = /* @__PURE__ */ g(U, { children: [
|
|
9946
9948
|
$e(b) && Z(),
|
|
9947
|
-
Te(b) &&
|
|
9949
|
+
Te(b) && A(b),
|
|
9948
9950
|
Ie(b) && R()
|
|
9949
9951
|
] });
|
|
9950
|
-
return i ?
|
|
9952
|
+
return i ? E : /* @__PURE__ */ g(U, { children: [
|
|
9951
9953
|
/* @__PURE__ */ l(
|
|
9952
9954
|
Ee,
|
|
9953
9955
|
{
|
|
@@ -9963,14 +9965,14 @@ function Re({
|
|
|
9963
9965
|
onToggle: () => v((B) => !B)
|
|
9964
9966
|
}
|
|
9965
9967
|
),
|
|
9966
|
-
y && /* @__PURE__ */ l(at, { depth: r, lineVariant: a, children:
|
|
9968
|
+
y && /* @__PURE__ */ l(at, { depth: r, lineVariant: a, children: E })
|
|
9967
9969
|
] });
|
|
9968
9970
|
}
|
|
9969
9971
|
const X = Gt(P), te = Vt(P), oe = X ?? te, me = X ? "oneOf" : "anyOf";
|
|
9970
9972
|
if (oe) {
|
|
9971
|
-
const
|
|
9972
|
-
(be,
|
|
9973
|
-
), B = i ? 1 : r + 1, Q = oe[_], q = Ke(Q, o, s), ce = q.circular ? q.schema : Ne(q.schema, o, s), W = !q.circular && Le(ce), ne = u &&
|
|
9973
|
+
const E = oe.map(
|
|
9974
|
+
(be, z) => typeof be.title == "string" ? be.title : `case ${z + 1}`
|
|
9975
|
+
), B = i ? 1 : r + 1, Q = oe[_], q = Ke(Q, o, s), ce = q.circular ? q.schema : Ne(q.schema, o, s), W = !q.circular && Le(ce), ne = u && $ === _ ? u.slice(1) : null, xe = W ? /* @__PURE__ */ l(on, { schema: ce, showBorder: !1 }) : /* @__PURE__ */ l(
|
|
9974
9976
|
Re,
|
|
9975
9977
|
{
|
|
9976
9978
|
schema: Q,
|
|
@@ -9991,7 +9993,7 @@ function Re({
|
|
|
9991
9993
|
{
|
|
9992
9994
|
variant: me,
|
|
9993
9995
|
caseCount: oe.length,
|
|
9994
|
-
caseLabels:
|
|
9996
|
+
caseLabels: E,
|
|
9995
9997
|
selectedCase: _,
|
|
9996
9998
|
onSelectCase: j,
|
|
9997
9999
|
children: xe
|
|
@@ -9999,7 +10001,7 @@ function Re({
|
|
|
9999
10001
|
), Me = /* @__PURE__ */ g(U, { children: [
|
|
10000
10002
|
re,
|
|
10001
10003
|
$e(b) && Z(),
|
|
10002
|
-
Te(b) &&
|
|
10004
|
+
Te(b) && A(b),
|
|
10003
10005
|
Ie(b) && R()
|
|
10004
10006
|
] });
|
|
10005
10007
|
return i ? Me : /* @__PURE__ */ g(U, { children: [
|
|
@@ -10021,15 +10023,15 @@ function Re({
|
|
|
10021
10023
|
y && /* @__PURE__ */ l(at, { depth: r, lineVariant: a, children: Me })
|
|
10022
10024
|
] });
|
|
10023
10025
|
}
|
|
10024
|
-
const ge = (
|
|
10025
|
-
const q = Ke(
|
|
10026
|
+
const ge = (E, B, Q) => {
|
|
10027
|
+
const q = Ke(E, o, s);
|
|
10026
10028
|
if (q.circular)
|
|
10027
10029
|
return /* @__PURE__ */ l(
|
|
10028
10030
|
Ee,
|
|
10029
10031
|
{
|
|
10030
10032
|
path: B,
|
|
10031
10033
|
depth: Q,
|
|
10032
|
-
typeLabelOverride: `↩ ${
|
|
10034
|
+
typeLabelOverride: `↩ ${E.$ref}`,
|
|
10033
10035
|
expandable: !1,
|
|
10034
10036
|
expanded: !1,
|
|
10035
10037
|
onToggle: () => {
|
|
@@ -10041,7 +10043,7 @@ function Re({
|
|
|
10041
10043
|
return Le(ce) ? /* @__PURE__ */ l(on, { schema: ce, showBorder: !1 }) : /* @__PURE__ */ l(
|
|
10042
10044
|
Re,
|
|
10043
10045
|
{
|
|
10044
|
-
schema:
|
|
10046
|
+
schema: E,
|
|
10045
10047
|
path: B,
|
|
10046
10048
|
depth: Q,
|
|
10047
10049
|
refStack: s,
|
|
@@ -10051,7 +10053,7 @@ function Re({
|
|
|
10051
10053
|
defaultExpanded: c
|
|
10052
10054
|
}
|
|
10053
10055
|
);
|
|
10054
|
-
}, pe = (
|
|
10056
|
+
}, pe = (E) => {
|
|
10055
10057
|
const B = P.properties ?? {}, Q = new Set(P.required ?? []), q = Jt(P), ce = At(P), W = ks(P);
|
|
10056
10058
|
return /* @__PURE__ */ g(U, { children: [
|
|
10057
10059
|
Object.entries(B).map(([ne, xe]) => {
|
|
@@ -10062,7 +10064,7 @@ function Re({
|
|
|
10062
10064
|
{
|
|
10063
10065
|
schema: xe,
|
|
10064
10066
|
path: `${t}.${ne}`,
|
|
10065
|
-
depth:
|
|
10067
|
+
depth: E,
|
|
10066
10068
|
required: Q.has(ne),
|
|
10067
10069
|
refStack: s,
|
|
10068
10070
|
deref: o,
|
|
@@ -10078,14 +10080,14 @@ function Re({
|
|
|
10078
10080
|
q !== null && J(q) && /* @__PURE__ */ l(an, { label: "Property names must adhere to:", children: ge(
|
|
10079
10081
|
q,
|
|
10080
10082
|
`${t}.[propertyName]`,
|
|
10081
|
-
|
|
10083
|
+
E
|
|
10082
10084
|
) }),
|
|
10083
10085
|
W.map(([ne, xe]) => /* @__PURE__ */ l(
|
|
10084
10086
|
Re,
|
|
10085
10087
|
{
|
|
10086
10088
|
schema: xe,
|
|
10087
10089
|
path: Jf(t, ne),
|
|
10088
|
-
depth:
|
|
10090
|
+
depth: E,
|
|
10089
10091
|
refStack: s,
|
|
10090
10092
|
deref: o,
|
|
10091
10093
|
ancestors: T,
|
|
@@ -10097,10 +10099,10 @@ function Re({
|
|
|
10097
10099
|
ce !== null && J(ce) && /* @__PURE__ */ l(an, { label: "Additional properties must adhere to:", children: ge(
|
|
10098
10100
|
ce,
|
|
10099
10101
|
`${t}.[additionalProperty]`,
|
|
10100
|
-
|
|
10102
|
+
E
|
|
10101
10103
|
) }),
|
|
10102
10104
|
$e(b) && Z(),
|
|
10103
|
-
Te(b) &&
|
|
10105
|
+
Te(b) && A(b),
|
|
10104
10106
|
Ie(b) && R()
|
|
10105
10107
|
] });
|
|
10106
10108
|
};
|
|
@@ -10118,14 +10120,14 @@ function Re({
|
|
|
10118
10120
|
description: b.description,
|
|
10119
10121
|
expandable: !0,
|
|
10120
10122
|
expanded: y,
|
|
10121
|
-
onToggle: () => v((
|
|
10123
|
+
onToggle: () => v((E) => !E)
|
|
10122
10124
|
}
|
|
10123
10125
|
),
|
|
10124
10126
|
y && /* @__PURE__ */ l(at, { depth: r, lineVariant: a, children: pe(r + 1) })
|
|
10125
10127
|
] });
|
|
10126
10128
|
if (P.type === "array" || P.items) {
|
|
10127
|
-
const
|
|
10128
|
-
objects: new Set(T.objects).add(
|
|
10129
|
+
const E = Yi(P), B = E !== null, Q = B ? Wf(P) : null, q = Kf(P), ce = q !== null, W = B ? null : dt(P), ne = W !== null, xe = B || ne || ce || $e(b) || Te(b) || Ie(b), re = `${t}[]`, Me = i ? t : re, be = ne ? Ke(W, o, s) : null, z = (be == null ? void 0 : be.schema) ?? null, we = z ? Ne(z, o, s) : null, ye = z !== null && (T.objects.has(z) || typeof (W == null ? void 0 : W.$ref) == "string" && T.refs.has(W.$ref)), ie = z !== null ? {
|
|
10130
|
+
objects: new Set(T.objects).add(z),
|
|
10129
10131
|
refs: typeof (W == null ? void 0 : W.$ref) == "string" ? new Set(T.refs).add(W.$ref) : T.refs
|
|
10130
10132
|
} : T, ot = !B && !ce && we !== null && Le(we), je = we != null && we.properties ? Object.entries(we.properties).filter(
|
|
10131
10133
|
([, L]) => J(L)
|
|
@@ -10133,7 +10135,7 @@ function Re({
|
|
|
10133
10135
|
we && Array.isArray(we.required) ? we.required : []
|
|
10134
10136
|
), He = !B && u && u[0] === "items" ? u.slice(1) : null, O = (L) => /* @__PURE__ */ g(U, { children: [
|
|
10135
10137
|
B ? /* @__PURE__ */ g(U, { children: [
|
|
10136
|
-
|
|
10138
|
+
E.map((V, ee) => /* @__PURE__ */ l(
|
|
10137
10139
|
Re,
|
|
10138
10140
|
{
|
|
10139
10141
|
schema: V,
|
|
@@ -10158,7 +10160,7 @@ function Re({
|
|
|
10158
10160
|
{
|
|
10159
10161
|
path: Me,
|
|
10160
10162
|
depth: L,
|
|
10161
|
-
typeLabelOverride: `↩ ${W.$ref ?? _r(
|
|
10163
|
+
typeLabelOverride: `↩ ${W.$ref ?? _r(z) ?? "circular"}`,
|
|
10162
10164
|
expandable: !1,
|
|
10163
10165
|
expanded: !1,
|
|
10164
10166
|
onToggle: () => {
|
|
@@ -10201,7 +10203,7 @@ function Re({
|
|
|
10201
10203
|
)),
|
|
10202
10204
|
ce && /* @__PURE__ */ l(an, { label: "Contains at least one:", children: typeof q == "boolean" ? /* @__PURE__ */ l("span", { className: "inline-flex items-center rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-foreground-secondary", children: q ? "any item" : "impossible constraint" }) : ge(q, `${t}[contains]`, L) }),
|
|
10203
10205
|
$e(b) && Z(),
|
|
10204
|
-
Te(b) &&
|
|
10206
|
+
Te(b) && A(b),
|
|
10205
10207
|
Ie(b) && R()
|
|
10206
10208
|
] });
|
|
10207
10209
|
return ot && !$e(b) && !Te(b) && !Ie(b) ? /* @__PURE__ */ l(
|
|
@@ -10245,7 +10247,7 @@ function Re({
|
|
|
10245
10247
|
),
|
|
10246
10248
|
y && /* @__PURE__ */ g(at, { depth: r, lineVariant: a, children: [
|
|
10247
10249
|
$e(b) && Z(),
|
|
10248
|
-
Te(b) &&
|
|
10250
|
+
Te(b) && A(b),
|
|
10249
10251
|
Ie(b) && R()
|
|
10250
10252
|
] })
|
|
10251
10253
|
] }) : i ? xe ? O(r + 1) : null : /* @__PURE__ */ g(U, { children: [
|
|
@@ -10269,12 +10271,12 @@ function Re({
|
|
|
10269
10271
|
] });
|
|
10270
10272
|
}
|
|
10271
10273
|
if ($e(b) || Te(b) || Ie(b)) {
|
|
10272
|
-
const
|
|
10274
|
+
const E = /* @__PURE__ */ g(U, { children: [
|
|
10273
10275
|
$e(b) && Z(),
|
|
10274
|
-
Te(b) &&
|
|
10276
|
+
Te(b) && A(b),
|
|
10275
10277
|
Ie(b) && R()
|
|
10276
10278
|
] });
|
|
10277
|
-
return i ?
|
|
10279
|
+
return i ? E : /* @__PURE__ */ g(U, { children: [
|
|
10278
10280
|
/* @__PURE__ */ l(
|
|
10279
10281
|
Ee,
|
|
10280
10282
|
{
|
|
@@ -10290,7 +10292,7 @@ function Re({
|
|
|
10290
10292
|
onToggle: () => v((B) => !B)
|
|
10291
10293
|
}
|
|
10292
10294
|
),
|
|
10293
|
-
y && /* @__PURE__ */ l(at, { depth: r, lineVariant: a, children:
|
|
10295
|
+
y && /* @__PURE__ */ l(at, { depth: r, lineVariant: a, children: E })
|
|
10294
10296
|
] });
|
|
10295
10297
|
}
|
|
10296
10298
|
return i ? null : /* @__PURE__ */ l(
|
|
@@ -11496,23 +11498,23 @@ function Hp(e, t, r) {
|
|
|
11496
11498
|
}
|
|
11497
11499
|
}
|
|
11498
11500
|
function Up(e, t, r) {
|
|
11499
|
-
var I, T, P, H, Z, N,
|
|
11501
|
+
var I, T, P, H, Z, N, A, R, X, te, oe, me, ge, pe;
|
|
11500
11502
|
const { operation: n, channel: s } = Sa(e, t), { servers: o, matchedServer: i, eligible: a } = Aa(e, s, n, r);
|
|
11501
11503
|
if (!a) throw new Tp(t, r);
|
|
11502
11504
|
const c = [];
|
|
11503
11505
|
let d = {}, u = {}, f;
|
|
11504
11506
|
if (r === "ws") {
|
|
11505
11507
|
const ue = wo((T = (I = s.bindings) == null ? void 0 : I.ws) == null ? void 0 : T.query), le = wo((H = (P = s.bindings) == null ? void 0 : P.ws) == null ? void 0 : H.headers);
|
|
11506
|
-
d = ue.values, u = le.values, c.push(...ue.placeholders.map((
|
|
11508
|
+
d = ue.values, u = le.values, c.push(...ue.placeholders.map((E) => `query param "${E}"`)), c.push(...le.placeholders.map((E) => `header "${E}"`));
|
|
11507
11509
|
} else r === "kafka" && (f = (N = (Z = s.bindings) == null ? void 0 : Z.kafka) == null ? void 0 : N.topic);
|
|
11508
11510
|
const p = s.address ?? "";
|
|
11509
11511
|
let h = p;
|
|
11510
11512
|
for (const [ue, le] of Object.entries(s.parameters ?? {})) {
|
|
11511
|
-
const
|
|
11512
|
-
h = h.replace(`{${ue}}`,
|
|
11513
|
+
const E = dn(le, ue);
|
|
11514
|
+
h = h.replace(`{${ue}}`, E.value), E.isPlaceholder && c.push(`channel parameter "${ue}"`);
|
|
11513
11515
|
}
|
|
11514
11516
|
r === "kafka" && f && (h = f);
|
|
11515
|
-
const m = (
|
|
11517
|
+
const m = (A = i ?? o[0]) == null ? void 0 : A.server, x = m ? `${m.protocol}://${m.host}${m.pathname ?? ""}` : "", y = (m == null ? void 0 : m.host) ?? "", v = vo(e, m == null ? void 0 : m.security), S = o.map(({ name: ue, server: le }) => ({
|
|
11516
11518
|
name: ue,
|
|
11517
11519
|
host: le.host,
|
|
11518
11520
|
protocol: le.protocol,
|
|
@@ -11521,25 +11523,25 @@ function Up(e, t, r) {
|
|
|
11521
11523
|
description: le.description,
|
|
11522
11524
|
security: vo(e, le.security)
|
|
11523
11525
|
})), w = n.messages !== void 0 ? Ze(e, n.messages[0]) : Ze(e, Object.values(s.messages ?? {})[0]), _ = (R = w == null ? void 0 : w.examples) == null ? void 0 : R[0];
|
|
11524
|
-
let j,
|
|
11526
|
+
let j, F;
|
|
11525
11527
|
if (_)
|
|
11526
|
-
j = _.name,
|
|
11528
|
+
j = _.name, F = _.payload;
|
|
11527
11529
|
else if ((w == null ? void 0 : w.payload) !== void 0) {
|
|
11528
|
-
if (
|
|
11530
|
+
if (F = Or(e, w.payload), F === void 0) throw new xo(t);
|
|
11529
11531
|
c.push("message payload (no explicit example — generated from its schema)");
|
|
11530
11532
|
} else throw new xo(t);
|
|
11531
|
-
const
|
|
11533
|
+
const $ = (w == null ? void 0 : w.payload) !== void 0 ? Rt(e, w.payload) : void 0, k = (w == null ? void 0 : w.headers) !== void 0 ? Rt(e, w.headers) : void 0, b = n.action === "send" ? "send" : "receive";
|
|
11532
11534
|
let C;
|
|
11533
11535
|
if (r === "kafka") {
|
|
11534
11536
|
const ue = (te = (X = w == null ? void 0 : w.bindings) == null ? void 0 : X.kafka) == null ? void 0 : te.key, le = ue ? dn(ue, "kafka message key") : void 0;
|
|
11535
11537
|
le != null && le.isPlaceholder && c.push("kafka message key");
|
|
11536
|
-
const
|
|
11537
|
-
|
|
11538
|
+
const E = dn((me = (oe = n.bindings) == null ? void 0 : oe.kafka) == null ? void 0 : me.clientId, "kafka clientId");
|
|
11539
|
+
E.isPlaceholder && c.push("kafka clientId");
|
|
11538
11540
|
let B;
|
|
11539
11541
|
b === "receive" && (B = dn((pe = (ge = n.bindings) == null ? void 0 : ge.kafka) == null ? void 0 : pe.groupId, "kafka consumer group id"), B.isPlaceholder && c.push("kafka consumer group id")), C = {
|
|
11540
11542
|
key: le == null ? void 0 : le.value,
|
|
11541
11543
|
groupId: B == null ? void 0 : B.value,
|
|
11542
|
-
clientId:
|
|
11544
|
+
clientId: E.value
|
|
11543
11545
|
};
|
|
11544
11546
|
}
|
|
11545
11547
|
return {
|
|
@@ -11557,12 +11559,12 @@ function Up(e, t, r) {
|
|
|
11557
11559
|
operationDescription: n.description,
|
|
11558
11560
|
message: {
|
|
11559
11561
|
name: j,
|
|
11560
|
-
payload:
|
|
11562
|
+
payload: F,
|
|
11561
11563
|
title: (w == null ? void 0 : w.title) ?? (w == null ? void 0 : w.name),
|
|
11562
11564
|
summary: w == null ? void 0 : w.summary,
|
|
11563
11565
|
description: w == null ? void 0 : w.description,
|
|
11564
11566
|
contentType: w == null ? void 0 : w.contentType,
|
|
11565
|
-
payloadSchema:
|
|
11567
|
+
payloadSchema: $,
|
|
11566
11568
|
headersSchema: k
|
|
11567
11569
|
},
|
|
11568
11570
|
placeholders: c,
|
|
@@ -12640,8 +12642,8 @@ function kh({ asyncapi: e, config: t, plugins: r }) {
|
|
|
12640
12642
|
setSelectedKey: w,
|
|
12641
12643
|
selectedNavItem: _,
|
|
12642
12644
|
handleSearchSelect: j,
|
|
12643
|
-
handleNavItemSelect:
|
|
12644
|
-
handleNavServerSelect:
|
|
12645
|
+
handleNavItemSelect: F,
|
|
12646
|
+
handleNavServerSelect: $,
|
|
12645
12647
|
handleContentTabChange: k,
|
|
12646
12648
|
focusSection: b,
|
|
12647
12649
|
schemaFocusTarget: C
|
|
@@ -12661,7 +12663,7 @@ function kh({ asyncapi: e, config: t, plugins: r }) {
|
|
|
12661
12663
|
{
|
|
12662
12664
|
operations: e.operations ?? {},
|
|
12663
12665
|
selectedKey: S.operations,
|
|
12664
|
-
onSelectKey: (
|
|
12666
|
+
onSelectKey: (A) => w("operations", A),
|
|
12665
12667
|
focusSection: b
|
|
12666
12668
|
}
|
|
12667
12669
|
) : x === "messages" ? /* @__PURE__ */ l(
|
|
@@ -12699,7 +12701,7 @@ function kh({ asyncapi: e, config: t, plugins: r }) {
|
|
|
12699
12701
|
n.copyMarkdown !== !1 && /* @__PURE__ */ l(
|
|
12700
12702
|
Zo,
|
|
12701
12703
|
{
|
|
12702
|
-
serialize: (
|
|
12704
|
+
serialize: (A) => fi(e, A),
|
|
12703
12705
|
onOpenChange: a
|
|
12704
12706
|
}
|
|
12705
12707
|
)
|
|
@@ -12712,7 +12714,7 @@ function kh({ asyncapi: e, config: t, plugins: r }) {
|
|
|
12712
12714
|
{
|
|
12713
12715
|
servers: e.servers,
|
|
12714
12716
|
selectedServer: S.servers,
|
|
12715
|
-
onSelectServer: (
|
|
12717
|
+
onSelectServer: (A) => w("servers", A),
|
|
12716
12718
|
focusSection: b
|
|
12717
12719
|
}
|
|
12718
12720
|
) }),
|
|
@@ -12727,8 +12729,8 @@ function kh({ asyncapi: e, config: t, plugins: r }) {
|
|
|
12727
12729
|
sidebarConfig: t.sidebar,
|
|
12728
12730
|
activeTab: v,
|
|
12729
12731
|
onTabChange: y,
|
|
12730
|
-
onItemSelect:
|
|
12731
|
-
onSelectServer:
|
|
12732
|
+
onItemSelect: F,
|
|
12733
|
+
onSelectServer: $,
|
|
12732
12734
|
selectedItem: _
|
|
12733
12735
|
}
|
|
12734
12736
|
),
|
|
@@ -13133,7 +13135,7 @@ function Oh({
|
|
|
13133
13135
|
] });
|
|
13134
13136
|
}
|
|
13135
13137
|
const Mh = Dr(
|
|
13136
|
-
() => import("./CodeSamples-
|
|
13138
|
+
() => import("./CodeSamples-JH-wvAxg.js").then(({ CodeSamples: e }) => ({ default: e }))
|
|
13137
13139
|
);
|
|
13138
13140
|
function Rh(e) {
|
|
13139
13141
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
|
|
@@ -13174,11 +13176,11 @@ function Ph({
|
|
|
13174
13176
|
onFollowOperation: t,
|
|
13175
13177
|
isOperationKnown: r
|
|
13176
13178
|
}) {
|
|
13177
|
-
var
|
|
13178
|
-
const n = Object.keys(e), [s, o] = D(n[0]), i = e[s], a = Object.keys((i == null ? void 0 : i.content) ?? {}), [c, d] = D(a[0]), u = c ? (
|
|
13179
|
+
var F, $;
|
|
13180
|
+
const n = Object.keys(e), [s, o] = D(n[0]), i = e[s], a = Object.keys((i == null ? void 0 : i.content) ?? {}), [c, d] = D(a[0]), u = c ? (F = i == null ? void 0 : i.content) == null ? void 0 : F[c] : void 0, f = (i == null ? void 0 : i.headers) ?? {}, p = (i == null ? void 0 : i.links) ?? {}, [h, m] = D("body"), x = a.length > 0 && !!u, y = Object.keys(f).length > 0, v = Object.keys(p).length > 0, S = [
|
|
13179
13181
|
...x ? [{ id: "body", name: "Body" }] : [],
|
|
13180
13182
|
...y ? [{ id: "headers", name: "Headers" }] : []
|
|
13181
|
-
], w = S.length > 1, _ = S.some((k) => k.id === h) ? h : (
|
|
13183
|
+
], w = S.length > 1, _ = S.some((k) => k.id === h) ? h : ($ = S[0]) == null ? void 0 : $.id, j = S.length > 0;
|
|
13182
13184
|
return G(() => {
|
|
13183
13185
|
d(Object.keys((i == null ? void 0 : i.content) ?? {})[0]), m("body");
|
|
13184
13186
|
}, [s]), /* @__PURE__ */ g("div", { children: [
|
|
@@ -13417,20 +13419,20 @@ function Fa({
|
|
|
13417
13419
|
isOperationKnown: c,
|
|
13418
13420
|
depth: d = 0
|
|
13419
13421
|
}) {
|
|
13420
|
-
var w, _, j,
|
|
13421
|
-
const { document: u } = cl(), f = (r.parameters ?? []).filter((
|
|
13422
|
-
for (const
|
|
13423
|
-
for (const [k, b] of Object.entries(
|
|
13422
|
+
var w, _, j, F;
|
|
13423
|
+
const { document: u } = cl(), f = (r.parameters ?? []).filter(($) => $.in !== "query" && $.in !== "path"), p = r.security ?? o ?? [], h = r.responses ?? {}, m = ((w = r.requestBody) == null ? void 0 : w.content) ?? {}, x = r.operationId ? Rh(r.operationId) : `${e.toUpperCase()} ${t}`, y = /* @__PURE__ */ new Map();
|
|
13424
|
+
for (const $ of p)
|
|
13425
|
+
for (const [k, b] of Object.entries($)) {
|
|
13424
13426
|
if (b.length === 0) continue;
|
|
13425
13427
|
const C = y.get(k) ?? [];
|
|
13426
13428
|
y.set(k, Array.from(/* @__PURE__ */ new Set([...C, ...b])));
|
|
13427
13429
|
}
|
|
13428
|
-
const v = Array.from(new Set(p.flatMap((
|
|
13429
|
-
const k = i == null ? void 0 : i[
|
|
13430
|
+
const v = Array.from(new Set(p.flatMap(($) => Object.keys($)))).map(($) => {
|
|
13431
|
+
const k = i == null ? void 0 : i[$];
|
|
13430
13432
|
if (!k) return null;
|
|
13431
|
-
const b = y.get(
|
|
13433
|
+
const b = y.get($);
|
|
13432
13434
|
return b ? { ...k, requiredScopes: b } : k;
|
|
13433
|
-
}).filter((
|
|
13435
|
+
}).filter(($) => !!$), S = d === 0;
|
|
13434
13436
|
return /* @__PURE__ */ l(
|
|
13435
13437
|
"div",
|
|
13436
13438
|
{
|
|
@@ -13494,7 +13496,7 @@ function Fa({
|
|
|
13494
13496
|
label: x,
|
|
13495
13497
|
parameters: f,
|
|
13496
13498
|
requestBodyContent: m,
|
|
13497
|
-
requestBodyDescription: (
|
|
13499
|
+
requestBodyDescription: (F = r.requestBody) == null ? void 0 : F.description,
|
|
13498
13500
|
responses: h,
|
|
13499
13501
|
callbacks: r.callbacks,
|
|
13500
13502
|
id: n,
|
|
@@ -13540,51 +13542,51 @@ function In({
|
|
|
13540
13542
|
idPrefix: i = "endpoint",
|
|
13541
13543
|
layout: a
|
|
13542
13544
|
}) {
|
|
13543
|
-
var
|
|
13544
|
-
const c = (
|
|
13545
|
+
var F;
|
|
13546
|
+
const c = ($) => s == null ? void 0 : s($), d = Y(() => Lt(e), [e]), u = Y(() => {
|
|
13545
13547
|
var k, b, C;
|
|
13546
|
-
const
|
|
13548
|
+
const $ = /* @__PURE__ */ new Map();
|
|
13547
13549
|
for (const I of d) {
|
|
13548
|
-
const T = ((C = (b = (k = e[I.path]) == null ? void 0 : k[I.method]) == null ? void 0 : b.tags) == null ? void 0 : C[0]) || "Other", P =
|
|
13549
|
-
P.push(I),
|
|
13550
|
+
const T = ((C = (b = (k = e[I.path]) == null ? void 0 : k[I.method]) == null ? void 0 : b.tags) == null ? void 0 : C[0]) || "Other", P = $.get(T) ?? [];
|
|
13551
|
+
P.push(I), $.set(T, P);
|
|
13550
13552
|
}
|
|
13551
|
-
return Array.from(
|
|
13553
|
+
return Array.from($, ([I, T]) => ({ label: I, items: T }));
|
|
13552
13554
|
}, [d, e]), [f, p] = D(() => /* @__PURE__ */ new Set()), h = f.size === 0;
|
|
13553
13555
|
G(() => {
|
|
13554
13556
|
if (!n) return;
|
|
13555
|
-
const
|
|
13556
|
-
|
|
13557
|
-
if (!k.has(
|
|
13557
|
+
const $ = u.find(({ items: k }) => k.some(({ key: b }) => b === n));
|
|
13558
|
+
$ && p((k) => {
|
|
13559
|
+
if (!k.has($.label)) return k;
|
|
13558
13560
|
const b = new Set(k);
|
|
13559
|
-
return b.delete(
|
|
13561
|
+
return b.delete($.label), b;
|
|
13560
13562
|
});
|
|
13561
13563
|
}, [u, n]);
|
|
13562
13564
|
const m = Y(() => {
|
|
13563
13565
|
var k, b;
|
|
13564
|
-
const
|
|
13566
|
+
const $ = /* @__PURE__ */ new Map();
|
|
13565
13567
|
for (const { key: C, method: I, path: T } of d) {
|
|
13566
13568
|
const P = (b = (k = e[T]) == null ? void 0 : k[I]) == null ? void 0 : b.operationId;
|
|
13567
|
-
P &&
|
|
13569
|
+
P && $.set(P, C);
|
|
13568
13570
|
}
|
|
13569
|
-
return
|
|
13571
|
+
return $;
|
|
13570
13572
|
}, [d, e]);
|
|
13571
13573
|
if (d.length === 0)
|
|
13572
13574
|
return null;
|
|
13573
|
-
const x = n ? d.find((
|
|
13575
|
+
const x = n ? d.find(($) => $.key === n) : null, y = x ? (F = e[x.path]) == null ? void 0 : F[x.method] : null, v = ({ key: $, method: k, path: b }, C) => {
|
|
13574
13576
|
var P;
|
|
13575
|
-
const I = n ===
|
|
13577
|
+
const I = n === $, T = Os(e[b], (P = e[b]) == null ? void 0 : P[k]);
|
|
13576
13578
|
return /* @__PURE__ */ g(
|
|
13577
13579
|
"tr",
|
|
13578
13580
|
{
|
|
13579
|
-
id: `${i}-${
|
|
13580
|
-
onClick: () => c(
|
|
13581
|
+
id: `${i}-${$}`,
|
|
13582
|
+
onClick: () => c($),
|
|
13581
13583
|
role: "button",
|
|
13582
13584
|
tabIndex: C ? 0 : -1,
|
|
13583
13585
|
"aria-hidden": !C,
|
|
13584
13586
|
"aria-label": `${k.toUpperCase()} ${b}`,
|
|
13585
13587
|
"aria-current": I ? "true" : void 0,
|
|
13586
13588
|
onKeyDown: (H) => {
|
|
13587
|
-
H.key !== "Enter" && H.key !== " " || (H.preventDefault(), c(
|
|
13589
|
+
H.key !== "Enter" && H.key !== " " || (H.preventDefault(), c($));
|
|
13588
13590
|
},
|
|
13589
13591
|
className: `group transition-[opacity,visibility] duration-300 ease-in-out ${C ? `cursor-pointer opacity-100 visible ${I ? "bg-neutral-50" : ""}` : "pointer-events-none invisible opacity-0"}`,
|
|
13590
13592
|
children: [
|
|
@@ -13600,26 +13602,26 @@ function In({
|
|
|
13600
13602
|
/* @__PURE__ */ l("td", { className: `px-6 w-28 group-hover:bg-neutral-50 transition-[padding] duration-300 ease-in-out ${C ? "py-2" : "py-0"}`, children: /* @__PURE__ */ l("div", { className: `overflow-hidden transition-[max-height] duration-300 ease-in-out ${C ? "max-h-12" : "max-h-0"}`, children: /* @__PURE__ */ l(et, { method: k, className: "w-20" }) }) })
|
|
13601
13603
|
]
|
|
13602
13604
|
},
|
|
13603
|
-
|
|
13605
|
+
$
|
|
13604
13606
|
);
|
|
13605
|
-
}, S = u.map(({ label:
|
|
13606
|
-
const C = !f.has(
|
|
13607
|
+
}, S = u.map(({ label: $, items: k }, b) => {
|
|
13608
|
+
const C = !f.has($), I = `${i}-group-${b}-${$.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`;
|
|
13607
13609
|
return /* @__PURE__ */ g($o, { children: [
|
|
13608
13610
|
/* @__PURE__ */ l("tbody", { className: "border-y border-border first:border-t-0", children: /* @__PURE__ */ l("tr", { className: "bg-neutral-50/70", children: /* @__PURE__ */ l("th", { colSpan: 2, scope: "rowgroup", className: "p-0 text-left", children: /* @__PURE__ */ g(
|
|
13609
13611
|
"button",
|
|
13610
13612
|
{
|
|
13611
13613
|
type: "button",
|
|
13612
|
-
"aria-label": `${
|
|
13614
|
+
"aria-label": `${$} endpoints (${k.length})`,
|
|
13613
13615
|
"aria-expanded": C,
|
|
13614
13616
|
"aria-controls": I,
|
|
13615
13617
|
onClick: () => p((T) => {
|
|
13616
13618
|
const P = new Set(T);
|
|
13617
|
-
return C ? P.add(
|
|
13619
|
+
return C ? P.add($) : P.delete($), P;
|
|
13618
13620
|
}),
|
|
13619
13621
|
className: "group/header flex w-full items-center gap-3 px-6 py-3.5 text-left hover:bg-neutral-100/80 transition-colors",
|
|
13620
13622
|
children: [
|
|
13621
13623
|
/* @__PURE__ */ l("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-md border border-border bg-surface text-foreground-muted shadow-sm transition-colors group-hover/header:border-neutral-300 group-hover/header:text-foreground-secondary", children: C ? /* @__PURE__ */ l(St, { className: "h-2.5 w-2.5" }) : /* @__PURE__ */ l(ga, { className: "h-2.5 w-2.5" }) }),
|
|
13622
|
-
/* @__PURE__ */ l("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold tracking-wide text-foreground-secondary", children:
|
|
13624
|
+
/* @__PURE__ */ l("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold tracking-wide text-foreground-secondary", children: $ }),
|
|
13623
13625
|
/* @__PURE__ */ l("span", { className: "inline-flex min-w-6 items-center justify-center rounded-full bg-neutral-200/70 px-2 py-0.5 text-xs font-medium tabular-nums text-foreground-muted", children: k.length })
|
|
13624
13626
|
]
|
|
13625
13627
|
}
|
|
@@ -13633,7 +13635,7 @@ function In({
|
|
|
13633
13635
|
children: k.map((T) => v(T, C))
|
|
13634
13636
|
}
|
|
13635
13637
|
)
|
|
13636
|
-
] },
|
|
13638
|
+
] }, $);
|
|
13637
13639
|
}), w = Os(x ? e[x.path] : void 0, y), _ = x ? /* @__PURE__ */ g("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
13638
13640
|
/* @__PURE__ */ l(et, { method: x.method }),
|
|
13639
13641
|
/* @__PURE__ */ l("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ l(
|
|
@@ -13656,11 +13658,11 @@ function In({
|
|
|
13656
13658
|
{
|
|
13657
13659
|
type: "checkbox",
|
|
13658
13660
|
checked: h,
|
|
13659
|
-
onChange: (
|
|
13660
|
-
|
|
13661
|
+
onChange: ($) => p(
|
|
13662
|
+
$.target.checked ? /* @__PURE__ */ new Set() : new Set(u.map(({ label: k }) => k))
|
|
13661
13663
|
),
|
|
13662
|
-
onKeyDown: (
|
|
13663
|
-
|
|
13664
|
+
onKeyDown: ($) => {
|
|
13665
|
+
$.key === "Enter" && ($.preventDefault(), p(
|
|
13664
13666
|
h ? new Set(u.map(({ label: k }) => k)) : /* @__PURE__ */ new Set()
|
|
13665
13667
|
));
|
|
13666
13668
|
},
|
|
@@ -13694,9 +13696,9 @@ function In({
|
|
|
13694
13696
|
idPrefix: i,
|
|
13695
13697
|
globalSecurity: t,
|
|
13696
13698
|
securitySchemes: r,
|
|
13697
|
-
isOperationKnown: (
|
|
13698
|
-
onFollowOperation: (
|
|
13699
|
-
const k = m.get(
|
|
13699
|
+
isOperationKnown: ($) => m.has($),
|
|
13700
|
+
onFollowOperation: ($) => {
|
|
13701
|
+
const k = m.get($);
|
|
13700
13702
|
k && c(k);
|
|
13701
13703
|
}
|
|
13702
13704
|
},
|
|
@@ -13708,7 +13710,7 @@ function In({
|
|
|
13708
13710
|
}
|
|
13709
13711
|
const Kh = (e) => e === "endpoints" || e === "webhooks" || e === "schemas";
|
|
13710
13712
|
function Gh({ openapi: e, config: t, plugins: r }) {
|
|
13711
|
-
var H, Z, N,
|
|
13713
|
+
var H, Z, N, A;
|
|
13712
13714
|
const n = t.show ?? {}, [s, o] = D(!1), [i, a] = D(!1), c = n.search !== !1 || n.copyMarkdown !== !1, d = n.info !== !1 && Vi(e.info), u = c || d, f = e.webhooks ?? {}, p = Object.keys(f).length > 0, h = [
|
|
13713
13715
|
...n.endpoints !== !1 ? [{ id: "endpoints", name: "Endpoints", icon: Rn }] : [],
|
|
13714
13716
|
...p && n.webhooks !== !1 ? [{ id: "webhooks", name: "Webhooks", icon: Vr }] : [],
|
|
@@ -13719,8 +13721,8 @@ function Gh({ openapi: e, config: t, plugins: r }) {
|
|
|
13719
13721
|
navActiveSection: w,
|
|
13720
13722
|
selected: _,
|
|
13721
13723
|
setSelectedKey: j,
|
|
13722
|
-
selectedNavItem:
|
|
13723
|
-
handleSearchSelect:
|
|
13724
|
+
selectedNavItem: F,
|
|
13725
|
+
handleSearchSelect: $,
|
|
13724
13726
|
handleNavItemSelect: k,
|
|
13725
13727
|
handleNavServerSelect: b,
|
|
13726
13728
|
handleContentTabChange: C,
|
|
@@ -13777,7 +13779,7 @@ function Gh({ openapi: e, config: t, plugins: r }) {
|
|
|
13777
13779
|
query: m,
|
|
13778
13780
|
onQueryChange: x,
|
|
13779
13781
|
results: y,
|
|
13780
|
-
onSelectResult:
|
|
13782
|
+
onSelectResult: $,
|
|
13781
13783
|
onOpenChange: o
|
|
13782
13784
|
}
|
|
13783
13785
|
),
|
|
@@ -13813,14 +13815,14 @@ function Gh({ openapi: e, config: t, plugins: r }) {
|
|
|
13813
13815
|
{
|
|
13814
13816
|
paths: n.endpoints !== !1 ? e.paths : void 0,
|
|
13815
13817
|
webhooks: p && n.webhooks !== !1 ? f : void 0,
|
|
13816
|
-
schemas: n.schemas !== !1 ? (
|
|
13818
|
+
schemas: n.schemas !== !1 ? (A = e.components) == null ? void 0 : A.schemas : void 0,
|
|
13817
13819
|
servers: n.servers !== !1 ? T : void 0,
|
|
13818
13820
|
hasInfo: n.info !== !1,
|
|
13819
13821
|
activeTab: w,
|
|
13820
13822
|
onTabChange: S,
|
|
13821
13823
|
onItemSelect: k,
|
|
13822
13824
|
onSelectServer: b,
|
|
13823
|
-
selectedItem:
|
|
13825
|
+
selectedItem: F
|
|
13824
13826
|
}
|
|
13825
13827
|
),
|
|
13826
13828
|
/* @__PURE__ */ l(Do, { tabs: h, current: v, onChange: C }),
|
|
@@ -13997,7 +13999,7 @@ function rm(e) {
|
|
|
13997
13999
|
}
|
|
13998
14000
|
async function sm() {
|
|
13999
14001
|
try {
|
|
14000
|
-
const e = await import("./index-
|
|
14002
|
+
const e = await import("./index-DXD-1U_v.js").then((r) => r.i), t = e.default ?? e;
|
|
14001
14003
|
if (typeof t != "function")
|
|
14002
14004
|
throw new Error("Unexpected export shape from '@asyncapi/parser/browser'.");
|
|
14003
14005
|
return t;
|
|
@@ -14011,7 +14013,7 @@ async function Wa(e) {
|
|
|
14011
14013
|
try {
|
|
14012
14014
|
const t = await sm(), r = new t();
|
|
14013
14015
|
tm(r);
|
|
14014
|
-
const { registerProtobufSchemaParser: n } = await import("./protobufSchemaParser-
|
|
14016
|
+
const { registerProtobufSchemaParser: n } = await import("./protobufSchemaParser-DzoN_YrA.js");
|
|
14015
14017
|
n(r);
|
|
14016
14018
|
const { document: s, diagnostics: o } = await r.parse(e);
|
|
14017
14019
|
return {
|
|
@@ -14065,7 +14067,7 @@ function $m({ raw: e, config: t, plugins: r, onDiagnostics: n, errorFallback: s,
|
|
|
14065
14067
|
}
|
|
14066
14068
|
async function im() {
|
|
14067
14069
|
try {
|
|
14068
|
-
return await import("./index-
|
|
14070
|
+
return await import("./index-CM_5UKZl.js");
|
|
14069
14071
|
} catch (e) {
|
|
14070
14072
|
throw console.error("[apiuikit] Failed to load '@scalar/openapi-parser':", e), new Error(
|
|
14071
14073
|
"[apiuikit] The parsed entry requires '@scalar/openapi-parser'. Install it (`npm i @scalar/openapi-parser`), or use the `OpenAPI` component with a pre-resolved document instead."
|