@kong-ui-public/entities-consumer-groups 3.3.16 → 3.3.17
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as X, computed as w, openBlock as m, createBlock as G, resolveDynamicComponent as Se, normalizeStyle as He, withCtx as h, createElementBlock as $, toDisplayString as q, createCommentVNode as W, pushScopeId as Je, popScopeId as We, createElementVNode as U, ref as O, watch as $e, renderSlot as ne, unref as g, onBeforeMount as gt, resolveComponent as z, createSlots as Ke, createVNode as N, createTextVNode as Z, renderList as ve, withModifiers as St, withDirectives as Ne, vShow as je, Fragment as be, normalizeClass as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as X, computed as w, openBlock as m, createBlock as G, resolveDynamicComponent as Se, normalizeStyle as He, withCtx as h, createElementBlock as $, toDisplayString as q, createCommentVNode as W, pushScopeId as Je, popScopeId as We, createElementVNode as U, ref as O, watch as $e, renderSlot as ne, unref as g, onBeforeMount as gt, resolveComponent as z, createSlots as Ke, createVNode as N, createTextVNode as Z, renderList as ve, withModifiers as St, withDirectives as Ne, vShow as je, Fragment as be, normalizeClass as qe, withKeys as wr, useSlots as jt, useCssVars as bn, inject as _r, onMounted as xr, onUnmounted as Sr, normalizeProps as Ir, guardReactiveProps as Ar, mergeProps as $r, Teleport as Tr, reactive as zt } from "vue";
|
|
2
|
+
import { useRouter as Ot } from "vue-router";
|
|
3
3
|
import { createI18n as Cn, i18nTComponent as kn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Gt from "axios";
|
|
5
5
|
import { BadgeMethodAppearances as Nr } from "@kong/kongponents";
|
|
@@ -8,13 +8,13 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
8
8
|
for (const [r, a] of t)
|
|
9
9
|
n[r] = a;
|
|
10
10
|
return n;
|
|
11
|
-
},
|
|
11
|
+
}, Or = (e) => (Je("data-v-c1f7c39c"), e = e(), We(), e), Mr = ["aria-hidden"], qr = {
|
|
12
12
|
key: 0,
|
|
13
13
|
"data-testid": "kui-icon-svg-title"
|
|
14
|
-
},
|
|
14
|
+
}, Er = /* @__PURE__ */ Or(() => /* @__PURE__ */ U("path", {
|
|
15
15
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
16
16
|
fill: "currentColor"
|
|
17
|
-
}, null, -1)),
|
|
17
|
+
}, null, -1)), Fr = /* @__PURE__ */ X({
|
|
18
18
|
__name: "AddIcon",
|
|
19
19
|
props: {
|
|
20
20
|
/** The accessibility text provided to screen readers */
|
|
@@ -101,14 +101,14 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
101
101
|
width: "100%",
|
|
102
102
|
xmlns: "http://www.w3.org/2000/svg"
|
|
103
103
|
}, [
|
|
104
|
-
e.title ? (m(), $("title",
|
|
105
|
-
|
|
106
|
-
], 8,
|
|
104
|
+
e.title ? (m(), $("title", qr, q(e.title), 1)) : W("", !0),
|
|
105
|
+
Er
|
|
106
|
+
], 8, Mr))
|
|
107
107
|
]),
|
|
108
108
|
_: 1
|
|
109
109
|
}, 8, ["aria-hidden", "style"]));
|
|
110
110
|
}
|
|
111
|
-
}), Br = /* @__PURE__ */ jr(
|
|
111
|
+
}), Br = /* @__PURE__ */ jr(Fr, [["__scopeId", "data-v-c1f7c39c"]]), Kr = {
|
|
112
112
|
list: {
|
|
113
113
|
table_headers: {
|
|
114
114
|
name: "Name",
|
|
@@ -210,7 +210,7 @@ function Ur() {
|
|
|
210
210
|
}
|
|
211
211
|
const yt = {
|
|
212
212
|
useI18n: Ur
|
|
213
|
-
}, Ie = "/v2/control-planes/{controlPlaneId}/core-entities", Ae = "/{workspace}",
|
|
213
|
+
}, Ie = "/v2/control-planes/{controlPlaneId}/core-entities", Ae = "/{workspace}", Oe = {
|
|
214
214
|
list: {
|
|
215
215
|
konnect: {
|
|
216
216
|
all: `${Ie}/consumer_groups`,
|
|
@@ -242,7 +242,7 @@ const yt = {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
};
|
|
245
|
-
var wn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e))(wn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}),
|
|
245
|
+
var wn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e))(wn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), Fe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Fe || {}), ee = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(ee || {}), he = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(he || {});
|
|
246
246
|
function Rr() {
|
|
247
247
|
return {
|
|
248
248
|
getAxiosInstance: (e = {}) => {
|
|
@@ -317,7 +317,7 @@ function Dr() {
|
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Mt(e = {}) {
|
|
321
321
|
const { getAxiosInstance: t } = Rr();
|
|
322
322
|
return {
|
|
323
323
|
axiosInstance: t(e)
|
|
@@ -486,44 +486,41 @@ function na(e, t, n, r = {
|
|
|
486
486
|
searchKeys: ["id"]
|
|
487
487
|
}) {
|
|
488
488
|
n || (n = "1000");
|
|
489
|
-
const { axiosInstance: a } =
|
|
490
|
-
await T(
|
|
489
|
+
const { axiosInstance: a } = Mt(e.axiosRequestConfig), { i18n: { t: i } } = ht(), { debounce: o } = Pr(), l = o(async (E) => {
|
|
490
|
+
await T(E);
|
|
491
491
|
}, 200), s = O(!1), u = O(""), p = O(""), c = O([]), y = O([]), f = O(void 0), _ = w(() => {
|
|
492
|
-
const
|
|
493
|
-
return e.app === "konnect" ?
|
|
494
|
-
}), { isValidUuid:
|
|
492
|
+
const E = `${e.apiBaseUrl}${g(t)}`;
|
|
493
|
+
return e.app === "konnect" ? E.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? E.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : E;
|
|
494
|
+
}), { isValidUuid: F } = _n(), k = async () => {
|
|
495
495
|
try {
|
|
496
496
|
s.value = !0;
|
|
497
|
-
const { data:
|
|
498
|
-
|
|
497
|
+
const { data: E } = await a.get(`${_.value}?size=${n}`);
|
|
498
|
+
E != null && E.next || (f.value = r.fetchedItemsKey in E ? E[r.fetchedItemsKey] : []), y.value = r.fetchedItemsKey in E ? E[r.fetchedItemsKey] : [], c.value = y.value;
|
|
499
499
|
} catch {
|
|
500
500
|
c.value = [], u.value = i("debouncedFilter.errors.fetch");
|
|
501
501
|
} finally {
|
|
502
502
|
s.value = !1;
|
|
503
503
|
}
|
|
504
|
-
}, L = O(""), T = async (
|
|
504
|
+
}, L = O(""), T = async (E) => {
|
|
505
505
|
var x, S, d;
|
|
506
|
-
if (L.value !==
|
|
507
|
-
if (
|
|
506
|
+
if (L.value !== E) {
|
|
507
|
+
if (L.value = E ?? "", !E) {
|
|
508
508
|
c.value = y.value;
|
|
509
509
|
return;
|
|
510
|
-
}
|
|
511
|
-
L.value = j || "";
|
|
510
|
+
}
|
|
512
511
|
if (f.value === void 0)
|
|
513
512
|
try {
|
|
514
513
|
if (s.value = !0, u.value = "", p.value = "", e.app === "konnect") {
|
|
515
|
-
|
|
516
|
-
j && (v += `/${j}`);
|
|
517
|
-
const { data: B } = await a.get(`${v}?size=${n}`);
|
|
514
|
+
const v = `${_.value}/${E}`, { data: B } = await a.get(`${v}?size=${n}`);
|
|
518
515
|
r.fetchedItemsKey in B ? c.value = B[r.fetchedItemsKey] : B != null && B[r.exactMatchKey ?? "id"] ? c.value = [B] : c.value = [];
|
|
519
|
-
} else
|
|
516
|
+
} else {
|
|
520
517
|
const v = [];
|
|
521
|
-
E
|
|
522
|
-
const { data: V } = await a.get(`${_.value}/${
|
|
518
|
+
F(E) && r.searchKeys.includes("id") ? v.push((async () => {
|
|
519
|
+
const { data: V } = await a.get(`${_.value}/${E}`);
|
|
523
520
|
return [V[r.fetchedItemsKey] ?? V];
|
|
524
521
|
})()) : v.push(
|
|
525
522
|
...r.searchKeys.filter((V) => V !== "id").map(async (V) => {
|
|
526
|
-
const { data: R } = await a.get(`${_.value}?${V}=${
|
|
523
|
+
const { data: R } = await a.get(`${_.value}?${V}=${E}`);
|
|
527
524
|
return R[r.fetchedItemsKey];
|
|
528
525
|
})
|
|
529
526
|
);
|
|
@@ -534,23 +531,22 @@ function na(e, t, n, r = {
|
|
|
534
531
|
I.has(C.id) || (I.add(C.id), c.value.push(C));
|
|
535
532
|
});
|
|
536
533
|
});
|
|
537
|
-
}
|
|
538
|
-
c.value = y.value;
|
|
534
|
+
}
|
|
539
535
|
} catch (v) {
|
|
540
536
|
((S = v == null ? void 0 : v.response) == null ? void 0 : S.status) === 404 ? p.value = i("debouncedFilter.errors.invalid") : (c.value = [], u.value = i("debouncedFilter.errors.fetch"));
|
|
541
537
|
} finally {
|
|
542
538
|
s.value = !1;
|
|
543
539
|
}
|
|
544
540
|
else
|
|
545
|
-
s.value = !0, p.value = "",
|
|
541
|
+
s.value = !0, p.value = "", c.value = (d = f.value) == null ? void 0 : d.filter((v) => {
|
|
546
542
|
var B;
|
|
547
543
|
let I = !1;
|
|
548
544
|
for (const V of r.searchKeys) {
|
|
549
545
|
const R = typeof v[V] == "string" ? (B = v[V]) == null ? void 0 : B.toLowerCase() : v[V];
|
|
550
|
-
R != null && R.includes(
|
|
546
|
+
R != null && R.includes(E.toLowerCase()) && (I = !0);
|
|
551
547
|
}
|
|
552
548
|
return I;
|
|
553
|
-
}), (!c.value || !c.value.length) && (p.value = i("debouncedFilter.errors.invalid"))
|
|
549
|
+
}), (!c.value || !c.value.length) && (p.value = i("debouncedFilter.errors.invalid")), s.value = !1;
|
|
554
550
|
}
|
|
555
551
|
};
|
|
556
552
|
return {
|
|
@@ -620,8 +616,8 @@ function xn(e, t) {
|
|
|
620
616
|
const { page: l, pageSize: s, offset: u, sortColumnKey: p, sortColumnOrder: c, query: y } = o;
|
|
621
617
|
try {
|
|
622
618
|
let f = new URL(i.value.href);
|
|
623
|
-
return a.value && y ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${y}/`) : new URL(`${f.href}?filter[name][contains]=${y}`)) : (a.value || new URLSearchParams(y).forEach((_,
|
|
624
|
-
f.searchParams.append(
|
|
619
|
+
return a.value && y ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${y}/`) : new URL(`${f.href}?filter[name][contains]=${y}`)) : (a.value || new URLSearchParams(y).forEach((_, F) => {
|
|
620
|
+
f.searchParams.append(F, _);
|
|
625
621
|
}), p && f.searchParams.append("sort_by", p), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), u && l !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
626
622
|
} catch (f) {
|
|
627
623
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -629,13 +625,13 @@ function xn(e, t) {
|
|
|
629
625
|
};
|
|
630
626
|
}
|
|
631
627
|
function ia(e, t, n = "data") {
|
|
632
|
-
const r = g(t), { axiosInstance: a } =
|
|
633
|
-
status:
|
|
628
|
+
const r = g(t), { axiosInstance: a } = Mt(e.axiosRequestConfig), i = xn(e, r), o = O({
|
|
629
|
+
status: Fe.Idle
|
|
634
630
|
});
|
|
635
631
|
return { fetcher: async (l) => {
|
|
636
632
|
var s;
|
|
637
633
|
try {
|
|
638
|
-
o.value = { status:
|
|
634
|
+
o.value = { status: Fe.Loading };
|
|
639
635
|
let u = i(l);
|
|
640
636
|
u.includes("filter[name]") && (u = `${u}&page[size]=${l.pageSize}&page[number]=${l.page}`);
|
|
641
637
|
const p = await a.get(u);
|
|
@@ -654,7 +650,7 @@ function ia(e, t, n = "data") {
|
|
|
654
650
|
} : null
|
|
655
651
|
};
|
|
656
652
|
return o.value = {
|
|
657
|
-
status:
|
|
653
|
+
status: Fe.Idle,
|
|
658
654
|
response: _
|
|
659
655
|
}, _;
|
|
660
656
|
} catch (u) {
|
|
@@ -663,11 +659,11 @@ function ia(e, t, n = "data") {
|
|
|
663
659
|
total: 0
|
|
664
660
|
};
|
|
665
661
|
return l.query && (((s = u.response) == null ? void 0 : s.status) === 404 || u.status === 404) ? (o.value = {
|
|
666
|
-
status:
|
|
662
|
+
status: Fe.NoResults,
|
|
667
663
|
response: p,
|
|
668
664
|
error: u.response ? u : { response: u }
|
|
669
665
|
}, p) : (o.value = {
|
|
670
|
-
status:
|
|
666
|
+
status: Fe.Error,
|
|
671
667
|
response: p,
|
|
672
668
|
error: u.response ? u : { response: u }
|
|
673
669
|
}, p);
|
|
@@ -751,7 +747,7 @@ function ga() {
|
|
|
751
747
|
};
|
|
752
748
|
}
|
|
753
749
|
const le = {
|
|
754
|
-
useAxios:
|
|
750
|
+
useAxios: Mt,
|
|
755
751
|
useDebouncedFilter: na,
|
|
756
752
|
useDeleteUrlBuilder: ra,
|
|
757
753
|
useErrors: aa,
|
|
@@ -792,7 +788,7 @@ const le = {
|
|
|
792
788
|
return t.isArrayItem ? (s = i.value) != null && s.name ? r(i.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
793
789
|
});
|
|
794
790
|
return (s, u) => (m(), G(Se(e.isArrayItem ? "fieldset" : "div"), {
|
|
795
|
-
class:
|
|
791
|
+
class: qe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
796
792
|
}, {
|
|
797
793
|
default: h(() => [
|
|
798
794
|
e.isArrayItem ? (m(), $("legend", ya, [
|
|
@@ -864,11 +860,11 @@ const le = {
|
|
|
864
860
|
}, 8, ["appearance"]);
|
|
865
861
|
};
|
|
866
862
|
}
|
|
867
|
-
}), ka = "#0044f4", wa = "#e0e4ea", _a = "#afb7c5", xa = "1px", Sa = "20px", Ia = { class: "config-card-details-row" }, Aa = ["data-testid"], $a = ["data-testid"], Ta = ["data-testid"], Na = ["data-testid"], ja = { key: 1 },
|
|
863
|
+
}), ka = "#0044f4", wa = "#e0e4ea", _a = "#afb7c5", xa = "1px", Sa = "20px", Ia = { class: "config-card-details-row" }, Aa = ["data-testid"], $a = ["data-testid"], Ta = ["data-testid"], Na = ["data-testid"], ja = { key: 1 }, Oa = ["data-testid"], Ma = ["data-testid"], qa = ["data-testid"], Ea = ["data-testid"], Fa = {
|
|
868
864
|
name: "ConfigCardItem",
|
|
869
865
|
components: { JsonCardItem: An, StatusBadge: Ca, InternalLinkItem: ba }
|
|
870
866
|
}, Ba = /* @__PURE__ */ X({
|
|
871
|
-
...
|
|
867
|
+
...Fa,
|
|
872
868
|
props: {
|
|
873
869
|
item: {
|
|
874
870
|
type: Object,
|
|
@@ -1015,8 +1011,8 @@ const le = {
|
|
|
1015
1011
|
};
|
|
1016
1012
|
}
|
|
1017
1013
|
}), y = O(), { isTruncated: f } = le.useTruncationDetector(y);
|
|
1018
|
-
return (_,
|
|
1019
|
-
const k = z("KLabel"), L = z("KBadge"), T = z("KCopy"),
|
|
1014
|
+
return (_, F) => {
|
|
1015
|
+
const k = z("KLabel"), L = z("KBadge"), T = z("KCopy"), E = z("KTooltip");
|
|
1020
1016
|
return m(), $("div", Ia, [
|
|
1021
1017
|
U("div", {
|
|
1022
1018
|
class: "config-card-details-label",
|
|
@@ -1071,7 +1067,7 @@ const le = {
|
|
|
1071
1067
|
]),
|
|
1072
1068
|
_: 2
|
|
1073
1069
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1074
|
-
], 8,
|
|
1070
|
+
], 8, Oa)) : W("", !0),
|
|
1075
1071
|
c.value.additionalComponent === "KCopy" ? (m(), $("div", {
|
|
1076
1072
|
key: 1,
|
|
1077
1073
|
class: "copy-uuid-array",
|
|
@@ -1082,7 +1078,7 @@ const le = {
|
|
|
1082
1078
|
"data-testid": `${e.item.key}-copy-uuid-${S}`,
|
|
1083
1079
|
text: x
|
|
1084
1080
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
1085
|
-
], 8,
|
|
1081
|
+
], 8, Ma)) : c.value.additionalComponent === "KMethodBadge" ? (m(), $("div", {
|
|
1086
1082
|
key: 2,
|
|
1087
1083
|
class: "method-badge-array",
|
|
1088
1084
|
"data-testid": `${e.item.key}-badge-methods`
|
|
@@ -1098,7 +1094,7 @@ const le = {
|
|
|
1098
1094
|
]),
|
|
1099
1095
|
_: 2
|
|
1100
1096
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1101
|
-
], 8,
|
|
1097
|
+
], 8, qa)) : W("", !0),
|
|
1102
1098
|
c.value.additionalComponent === "JsonCardItem" ? (m(), $("div", {
|
|
1103
1099
|
key: 3,
|
|
1104
1100
|
"data-testid": `${n.item.key}-json-array-content`
|
|
@@ -1109,7 +1105,7 @@ const le = {
|
|
|
1109
1105
|
"is-array-item": "",
|
|
1110
1106
|
item: x
|
|
1111
1107
|
}, null, 8, ["index", "item"]))), 128))
|
|
1112
|
-
], 8,
|
|
1108
|
+
], 8, Ea)) : (m(), G(E, {
|
|
1113
1109
|
key: 4,
|
|
1114
1110
|
text: g(f) ? e.item.value : ""
|
|
1115
1111
|
}, {
|
|
@@ -1117,7 +1113,7 @@ const le = {
|
|
|
1117
1113
|
U("span", {
|
|
1118
1114
|
ref_key: "textContent",
|
|
1119
1115
|
ref: y,
|
|
1120
|
-
class:
|
|
1116
|
+
class: qe(["attrs-data-text", { truncated: e.truncated }])
|
|
1121
1117
|
}, q(c.value.text), 3)
|
|
1122
1118
|
]),
|
|
1123
1119
|
_: 1
|
|
@@ -1198,7 +1194,7 @@ const le = {
|
|
|
1198
1194
|
t.jsonRecord ? (m(), G(l, {
|
|
1199
1195
|
key: 1,
|
|
1200
1196
|
id: "json-codeblock",
|
|
1201
|
-
class:
|
|
1197
|
+
class: qe({ "json-content": t.fetcherUrl }),
|
|
1202
1198
|
code: JSON.stringify(n.value, null, 2),
|
|
1203
1199
|
language: "json",
|
|
1204
1200
|
theme: "dark"
|
|
@@ -1388,26 +1384,26 @@ It.prototype.extend = function(e) {
|
|
|
1388
1384
|
var r = Object.create(It.prototype);
|
|
1389
1385
|
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = en(r, "implicit"), r.compiledExplicit = en(r, "explicit"), r.compiledTypeMap = ro(r.compiledImplicit, r.compiledExplicit), r;
|
|
1390
1386
|
};
|
|
1391
|
-
var
|
|
1387
|
+
var On = It, Mn = new ce("tag:yaml.org,2002:str", {
|
|
1392
1388
|
kind: "scalar",
|
|
1393
1389
|
construct: function(e) {
|
|
1394
1390
|
return e !== null ? e : "";
|
|
1395
1391
|
}
|
|
1396
|
-
}),
|
|
1392
|
+
}), qn = new ce("tag:yaml.org,2002:seq", {
|
|
1397
1393
|
kind: "sequence",
|
|
1398
1394
|
construct: function(e) {
|
|
1399
1395
|
return e !== null ? e : [];
|
|
1400
1396
|
}
|
|
1401
|
-
}),
|
|
1397
|
+
}), En = new ce("tag:yaml.org,2002:map", {
|
|
1402
1398
|
kind: "mapping",
|
|
1403
1399
|
construct: function(e) {
|
|
1404
1400
|
return e !== null ? e : {};
|
|
1405
1401
|
}
|
|
1406
|
-
}),
|
|
1402
|
+
}), Fn = new On({
|
|
1407
1403
|
explicit: [
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1404
|
+
Mn,
|
|
1405
|
+
qn,
|
|
1406
|
+
En
|
|
1411
1407
|
]
|
|
1412
1408
|
});
|
|
1413
1409
|
function ao(e) {
|
|
@@ -1620,7 +1616,7 @@ var Un = new ce("tag:yaml.org,2002:float", {
|
|
|
1620
1616
|
predicate: wo,
|
|
1621
1617
|
represent: ko,
|
|
1622
1618
|
defaultStyle: "lowercase"
|
|
1623
|
-
}), Rn =
|
|
1619
|
+
}), Rn = Fn.extend({
|
|
1624
1620
|
implicit: [
|
|
1625
1621
|
Bn,
|
|
1626
1622
|
Kn,
|
|
@@ -1663,11 +1659,11 @@ function Io(e) {
|
|
|
1663
1659
|
var Gn = new ce("tag:yaml.org,2002:merge", {
|
|
1664
1660
|
kind: "scalar",
|
|
1665
1661
|
resolve: Io
|
|
1666
|
-
}),
|
|
1662
|
+
}), qt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1667
1663
|
\r`;
|
|
1668
1664
|
function Ao(e) {
|
|
1669
1665
|
if (e === null) return !1;
|
|
1670
|
-
var t, n, r = 0, a = e.length, i =
|
|
1666
|
+
var t, n, r = 0, a = e.length, i = qt;
|
|
1671
1667
|
for (n = 0; n < a; n++)
|
|
1672
1668
|
if (t = i.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1673
1669
|
if (t < 0) return !1;
|
|
@@ -1676,13 +1672,13 @@ function Ao(e) {
|
|
|
1676
1672
|
return r % 8 === 0;
|
|
1677
1673
|
}
|
|
1678
1674
|
function $o(e) {
|
|
1679
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i =
|
|
1675
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i = qt, o = 0, l = [];
|
|
1680
1676
|
for (t = 0; t < a; t++)
|
|
1681
1677
|
t % 4 === 0 && t && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | i.indexOf(r.charAt(t));
|
|
1682
1678
|
return n = a % 4 * 6, n === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : n === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : n === 12 && l.push(o >> 4 & 255), new Uint8Array(l);
|
|
1683
1679
|
}
|
|
1684
1680
|
function To(e) {
|
|
1685
|
-
var t = "", n = 0, r, a, i = e.length, o =
|
|
1681
|
+
var t = "", n = 0, r, a, i = e.length, o = qt;
|
|
1686
1682
|
for (r = 0; r < i; r++)
|
|
1687
1683
|
r % 3 === 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1688
1684
|
return a = i % 3, a === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : a === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : a === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
@@ -1696,12 +1692,12 @@ var Hn = new ce("tag:yaml.org,2002:binary", {
|
|
|
1696
1692
|
construct: $o,
|
|
1697
1693
|
predicate: No,
|
|
1698
1694
|
represent: To
|
|
1699
|
-
}), jo = Object.prototype.hasOwnProperty,
|
|
1700
|
-
function
|
|
1695
|
+
}), jo = Object.prototype.hasOwnProperty, Oo = Object.prototype.toString;
|
|
1696
|
+
function Mo(e) {
|
|
1701
1697
|
if (e === null) return !0;
|
|
1702
1698
|
var t = [], n, r, a, i, o, l = e;
|
|
1703
1699
|
for (n = 0, r = l.length; n < r; n += 1) {
|
|
1704
|
-
if (a = l[n], o = !1,
|
|
1700
|
+
if (a = l[n], o = !1, Oo.call(a) !== "[object Object]") return !1;
|
|
1705
1701
|
for (i in a)
|
|
1706
1702
|
if (jo.call(a, i))
|
|
1707
1703
|
if (!o) o = !0;
|
|
@@ -1712,19 +1708,19 @@ function Oo(e) {
|
|
|
1712
1708
|
}
|
|
1713
1709
|
return !0;
|
|
1714
1710
|
}
|
|
1715
|
-
function
|
|
1711
|
+
function qo(e) {
|
|
1716
1712
|
return e !== null ? e : [];
|
|
1717
1713
|
}
|
|
1718
1714
|
var Jn = new ce("tag:yaml.org,2002:omap", {
|
|
1719
1715
|
kind: "sequence",
|
|
1720
|
-
resolve:
|
|
1721
|
-
construct:
|
|
1722
|
-
}),
|
|
1723
|
-
function
|
|
1716
|
+
resolve: Mo,
|
|
1717
|
+
construct: qo
|
|
1718
|
+
}), Eo = Object.prototype.toString;
|
|
1719
|
+
function Fo(e) {
|
|
1724
1720
|
if (e === null) return !0;
|
|
1725
1721
|
var t, n, r, a, i, o = e;
|
|
1726
1722
|
for (i = new Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1727
|
-
if (r = o[t],
|
|
1723
|
+
if (r = o[t], Eo.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1)) return !1;
|
|
1728
1724
|
i[t] = [a[0], r[a[0]]];
|
|
1729
1725
|
}
|
|
1730
1726
|
return !0;
|
|
@@ -1738,7 +1734,7 @@ function Bo(e) {
|
|
|
1738
1734
|
}
|
|
1739
1735
|
var Wn = new ce("tag:yaml.org,2002:pairs", {
|
|
1740
1736
|
kind: "sequence",
|
|
1741
|
-
resolve:
|
|
1737
|
+
resolve: Fo,
|
|
1742
1738
|
construct: Bo
|
|
1743
1739
|
}), Ko = Object.prototype.hasOwnProperty;
|
|
1744
1740
|
function Lo(e) {
|
|
@@ -1756,7 +1752,7 @@ var Yn = new ce("tag:yaml.org,2002:set", {
|
|
|
1756
1752
|
kind: "mapping",
|
|
1757
1753
|
resolve: Lo,
|
|
1758
1754
|
construct: Uo
|
|
1759
|
-
}),
|
|
1755
|
+
}), Et = Pn.extend({
|
|
1760
1756
|
implicit: [
|
|
1761
1757
|
zn,
|
|
1762
1758
|
Gn
|
|
@@ -1767,7 +1763,7 @@ var Yn = new ce("tag:yaml.org,2002:set", {
|
|
|
1767
1763
|
Wn,
|
|
1768
1764
|
Yn
|
|
1769
1765
|
]
|
|
1770
|
-
}),
|
|
1766
|
+
}), Ee = Object.prototype.hasOwnProperty, ct = 1, Zn = 2, Qn = 3, dt = 4, xt = 1, Ro = 2, tn = 3, Po = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Vo = /[\x85\u2028\u2029]/, Do = /[,\[\]\{\}]/, Xn = /^(?:!|!!|![a-z\-]+!)$/i, er = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1771
1767
|
function nn(e) {
|
|
1772
1768
|
return Object.prototype.toString.call(e);
|
|
1773
1769
|
}
|
|
@@ -1807,7 +1803,7 @@ var tr = new Array(256), nr = new Array(256);
|
|
|
1807
1803
|
for (var Pe = 0; Pe < 256; Pe++)
|
|
1808
1804
|
tr[Pe] = rn(Pe) ? 1 : 0, nr[Pe] = rn(Pe);
|
|
1809
1805
|
function Wo(e, t) {
|
|
1810
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1806
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || Et, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1811
1807
|
}
|
|
1812
1808
|
function rr(e, t) {
|
|
1813
1809
|
var n = {
|
|
@@ -1820,7 +1816,7 @@ function rr(e, t) {
|
|
|
1820
1816
|
};
|
|
1821
1817
|
return n.snippet = Qa(n), new fe(t, n);
|
|
1822
1818
|
}
|
|
1823
|
-
function
|
|
1819
|
+
function j(e, t) {
|
|
1824
1820
|
throw rr(e, t);
|
|
1825
1821
|
}
|
|
1826
1822
|
function pt(e, t) {
|
|
@@ -1829,39 +1825,39 @@ function pt(e, t) {
|
|
|
1829
1825
|
var an = {
|
|
1830
1826
|
YAML: function(e, t, n) {
|
|
1831
1827
|
var r, a, i;
|
|
1832
|
-
e.version !== null &&
|
|
1828
|
+
e.version !== null && j(e, "duplication of %YAML directive"), n.length !== 1 && j(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && j(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), i = parseInt(r[2], 10), a !== 1 && j(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && pt(e, "unsupported YAML version of the document");
|
|
1833
1829
|
},
|
|
1834
1830
|
TAG: function(e, t, n) {
|
|
1835
1831
|
var r, a;
|
|
1836
|
-
n.length !== 2 &&
|
|
1832
|
+
n.length !== 2 && j(e, "TAG directive accepts exactly two arguments"), r = n[0], a = n[1], Xn.test(r) || j(e, "ill-formed tag handle (first argument) of the TAG directive"), Ee.call(e.tagMap, r) && j(e, 'there is a previously declared suffix for "' + r + '" tag handle'), er.test(a) || j(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1837
1833
|
try {
|
|
1838
1834
|
a = decodeURIComponent(a);
|
|
1839
1835
|
} catch {
|
|
1840
|
-
|
|
1836
|
+
j(e, "tag prefix is malformed: " + a);
|
|
1841
1837
|
}
|
|
1842
1838
|
e.tagMap[r] = a;
|
|
1843
1839
|
}
|
|
1844
1840
|
};
|
|
1845
|
-
function
|
|
1841
|
+
function Me(e, t, n, r) {
|
|
1846
1842
|
var a, i, o, l;
|
|
1847
1843
|
if (t < n) {
|
|
1848
1844
|
if (l = e.input.slice(t, n), r)
|
|
1849
1845
|
for (a = 0, i = l.length; a < i; a += 1)
|
|
1850
|
-
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1851
|
-
else Po.test(l) &&
|
|
1846
|
+
o = l.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 || j(e, "expected valid JSON character");
|
|
1847
|
+
else Po.test(l) && j(e, "the stream contains non-printable characters");
|
|
1852
1848
|
e.result += l;
|
|
1853
1849
|
}
|
|
1854
1850
|
}
|
|
1855
1851
|
function on(e, t, n, r) {
|
|
1856
1852
|
var a, i, o, l;
|
|
1857
|
-
for (ie.isObject(n) ||
|
|
1858
|
-
i = a[o],
|
|
1853
|
+
for (ie.isObject(n) || j(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(n), o = 0, l = a.length; o < l; o += 1)
|
|
1854
|
+
i = a[o], Ee.call(t, i) || (t[i] = n[i], r[i] = !0);
|
|
1859
1855
|
}
|
|
1860
1856
|
function ze(e, t, n, r, a, i, o, l, s) {
|
|
1861
1857
|
var u, p;
|
|
1862
1858
|
if (Array.isArray(a))
|
|
1863
1859
|
for (a = Array.prototype.slice.call(a), u = 0, p = a.length; u < p; u += 1)
|
|
1864
|
-
Array.isArray(a[u]) &&
|
|
1860
|
+
Array.isArray(a[u]) && j(e, "nested arrays are not supported inside keys"), typeof a == "object" && nn(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1865
1861
|
if (typeof a == "object" && nn(a) === "[object Object]" && (a = "[object Object]"), a = String(a), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1866
1862
|
if (Array.isArray(i))
|
|
1867
1863
|
for (u = 0, p = i.length; u < p; u += 1)
|
|
@@ -1869,7 +1865,7 @@ function ze(e, t, n, r, a, i, o, l, s) {
|
|
|
1869
1865
|
else
|
|
1870
1866
|
on(e, t, i, n);
|
|
1871
1867
|
else
|
|
1872
|
-
!e.json && !
|
|
1868
|
+
!e.json && !Ee.call(n, a) && Ee.call(t, a) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, j(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(t, a, {
|
|
1873
1869
|
configurable: !0,
|
|
1874
1870
|
enumerable: !0,
|
|
1875
1871
|
writable: !0,
|
|
@@ -1877,9 +1873,9 @@ function ze(e, t, n, r, a, i, o, l, s) {
|
|
|
1877
1873
|
}) : t[a] = i, delete n[a];
|
|
1878
1874
|
return t;
|
|
1879
1875
|
}
|
|
1880
|
-
function
|
|
1876
|
+
function Ft(e) {
|
|
1881
1877
|
var t;
|
|
1882
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1878
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : j(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1883
1879
|
}
|
|
1884
1880
|
function oe(e, t, n) {
|
|
1885
1881
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
@@ -1890,7 +1886,7 @@ function oe(e, t, n) {
|
|
|
1890
1886
|
a = e.input.charCodeAt(++e.position);
|
|
1891
1887
|
while (a !== 10 && a !== 13 && a !== 0);
|
|
1892
1888
|
if (_e(a))
|
|
1893
|
-
for (
|
|
1889
|
+
for (Ft(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
1894
1890
|
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
1895
1891
|
else
|
|
1896
1892
|
break;
|
|
@@ -1928,9 +1924,9 @@ function Yo(e, t, n) {
|
|
|
1928
1924
|
break;
|
|
1929
1925
|
}
|
|
1930
1926
|
}
|
|
1931
|
-
l && (
|
|
1927
|
+
l && (Me(e, i, o, !1), Bt(e, e.line - s), i = o = e.position, l = !1), Be(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1932
1928
|
}
|
|
1933
|
-
return
|
|
1929
|
+
return Me(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
1934
1930
|
}
|
|
1935
1931
|
function Zo(e, t) {
|
|
1936
1932
|
var n, r, a;
|
|
@@ -1938,12 +1934,12 @@ function Zo(e, t) {
|
|
|
1938
1934
|
return !1;
|
|
1939
1935
|
for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1940
1936
|
if (n === 39)
|
|
1941
|
-
if (
|
|
1937
|
+
if (Me(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1942
1938
|
r = e.position, e.position++, a = e.position;
|
|
1943
1939
|
else
|
|
1944
1940
|
return !0;
|
|
1945
|
-
else _e(n) ? (
|
|
1946
|
-
|
|
1941
|
+
else _e(n) ? (Me(e, r, a, !0), Bt(e, oe(e, !1, t)), r = a = e.position) : e.position === e.lineStart && vt(e) ? j(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1942
|
+
j(e, "unexpected end of the stream within a single quoted scalar");
|
|
1947
1943
|
}
|
|
1948
1944
|
function Qo(e, t) {
|
|
1949
1945
|
var n, r, a, i, o, l;
|
|
@@ -1951,25 +1947,25 @@ function Qo(e, t) {
|
|
|
1951
1947
|
return !1;
|
|
1952
1948
|
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1953
1949
|
if (l === 34)
|
|
1954
|
-
return
|
|
1950
|
+
return Me(e, n, e.position, !0), e.position++, !0;
|
|
1955
1951
|
if (l === 92) {
|
|
1956
|
-
if (
|
|
1952
|
+
if (Me(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), _e(l))
|
|
1957
1953
|
oe(e, !1, t);
|
|
1958
1954
|
else if (l < 256 && tr[l])
|
|
1959
1955
|
e.result += nr[l], e.position++;
|
|
1960
1956
|
else if ((o = Go(l)) > 0) {
|
|
1961
1957
|
for (a = o, i = 0; a > 0; a--)
|
|
1962
|
-
l = e.input.charCodeAt(++e.position), (o = zo(l)) >= 0 ? i = (i << 4) + o :
|
|
1958
|
+
l = e.input.charCodeAt(++e.position), (o = zo(l)) >= 0 ? i = (i << 4) + o : j(e, "expected hexadecimal character");
|
|
1963
1959
|
e.result += Jo(i), e.position++;
|
|
1964
1960
|
} else
|
|
1965
|
-
|
|
1961
|
+
j(e, "unknown escape sequence");
|
|
1966
1962
|
n = r = e.position;
|
|
1967
|
-
} else _e(l) ? (
|
|
1963
|
+
} else _e(l) ? (Me(e, n, r, !0), Bt(e, oe(e, !1, t)), n = r = e.position) : e.position === e.lineStart && vt(e) ? j(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1968
1964
|
}
|
|
1969
|
-
|
|
1965
|
+
j(e, "unexpected end of the stream within a double quoted scalar");
|
|
1970
1966
|
}
|
|
1971
1967
|
function Xo(e, t) {
|
|
1972
|
-
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, p, c, y, f, _ = /* @__PURE__ */ Object.create(null),
|
|
1968
|
+
var n = !0, r, a, i, o = e.tag, l, s = e.anchor, u, p, c, y, f, _ = /* @__PURE__ */ Object.create(null), F, k, L, T;
|
|
1973
1969
|
if (T = e.input.charCodeAt(e.position), T === 91)
|
|
1974
1970
|
p = 93, f = !1, l = [];
|
|
1975
1971
|
else if (T === 123)
|
|
@@ -1979,9 +1975,9 @@ function Xo(e, t) {
|
|
|
1979
1975
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), T = e.input.charCodeAt(++e.position); T !== 0; ) {
|
|
1980
1976
|
if (oe(e, !0, t), T = e.input.charCodeAt(e.position), T === p)
|
|
1981
1977
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1982
|
-
n ? T === 44 &&
|
|
1978
|
+
n ? T === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), k = F = L = null, c = y = !1, T === 63 && (u = e.input.charCodeAt(e.position + 1), ye(u) && (c = y = !0, e.position++, oe(e, !0, t))), r = e.line, a = e.lineStart, i = e.position, Ge(e, t, ct, !1, !0), k = e.tag, F = e.result, oe(e, !0, t), T = e.input.charCodeAt(e.position), (y || e.line === r) && T === 58 && (c = !0, T = e.input.charCodeAt(++e.position), oe(e, !0, t), Ge(e, t, ct, !1, !0), L = e.result), f ? ze(e, l, _, k, F, L, r, a, i) : c ? l.push(ze(e, null, _, k, F, L, r, a, i)) : l.push(F), oe(e, !0, t), T = e.input.charCodeAt(e.position), T === 44 ? (n = !0, T = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1983
1979
|
}
|
|
1984
|
-
|
|
1980
|
+
j(e, "unexpected end of the stream within a flow collection");
|
|
1985
1981
|
}
|
|
1986
1982
|
function ei(e, t) {
|
|
1987
1983
|
var n, r, a = xt, i = !1, o = !1, l = t, s = 0, u = !1, p, c;
|
|
@@ -1993,9 +1989,9 @@ function ei(e, t) {
|
|
|
1993
1989
|
return !1;
|
|
1994
1990
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1995
1991
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1996
|
-
xt === a ? a = c === 43 ? tn : Ro :
|
|
1992
|
+
xt === a ? a = c === 43 ? tn : Ro : j(e, "repeat of a chomping mode identifier");
|
|
1997
1993
|
else if ((p = Ho(c)) >= 0)
|
|
1998
|
-
p === 0 ?
|
|
1994
|
+
p === 0 ? j(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? j(e, "repeat of an indentation width identifier") : (l = t + p - 1, o = !0);
|
|
1999
1995
|
else
|
|
2000
1996
|
break;
|
|
2001
1997
|
if (Be(c)) {
|
|
@@ -2008,7 +2004,7 @@ function ei(e, t) {
|
|
|
2008
2004
|
while (!_e(c) && c !== 0);
|
|
2009
2005
|
}
|
|
2010
2006
|
for (; c !== 0; ) {
|
|
2011
|
-
for (
|
|
2007
|
+
for (Ft(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && c === 32; )
|
|
2012
2008
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
2013
2009
|
if (!o && e.lineIndent > l && (l = e.lineIndent), _e(c)) {
|
|
2014
2010
|
s++;
|
|
@@ -2026,31 +2022,31 @@ function ei(e, t) {
|
|
|
2026
2022
|
`, s) : e.result += ie.repeat(`
|
|
2027
2023
|
`, i ? 1 + s : s), i = !0, o = !0, s = 0, n = e.position; !_e(c) && c !== 0; )
|
|
2028
2024
|
c = e.input.charCodeAt(++e.position);
|
|
2029
|
-
|
|
2025
|
+
Me(e, n, e.position, !1);
|
|
2030
2026
|
}
|
|
2031
2027
|
return !0;
|
|
2032
2028
|
}
|
|
2033
2029
|
function ln(e, t) {
|
|
2034
2030
|
var n, r = e.tag, a = e.anchor, i = [], o, l = !1, s;
|
|
2035
2031
|
if (e.firstTabInLine !== -1) return !1;
|
|
2036
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2032
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !ye(o)))); ) {
|
|
2037
2033
|
if (l = !0, e.position++, oe(e, !0, -1) && e.lineIndent <= t) {
|
|
2038
2034
|
i.push(null), s = e.input.charCodeAt(e.position);
|
|
2039
2035
|
continue;
|
|
2040
2036
|
}
|
|
2041
2037
|
if (n = e.line, Ge(e, t, Qn, !1, !0), i.push(e.result), oe(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
2042
|
-
|
|
2038
|
+
j(e, "bad indentation of a sequence entry");
|
|
2043
2039
|
else if (e.lineIndent < t)
|
|
2044
2040
|
break;
|
|
2045
2041
|
}
|
|
2046
2042
|
return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2047
2043
|
}
|
|
2048
2044
|
function ti(e, t, n) {
|
|
2049
|
-
var r, a, i, o, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null, _ = null,
|
|
2045
|
+
var r, a, i, o, l, s, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null, _ = null, F = null, k = !1, L = !1, T;
|
|
2050
2046
|
if (e.firstTabInLine !== -1) return !1;
|
|
2051
2047
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), T = e.input.charCodeAt(e.position); T !== 0; ) {
|
|
2052
|
-
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2053
|
-
T === 63 ? (k && (ze(e, c, y, f, _, null, o, l, s), f = _ =
|
|
2048
|
+
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, j(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (T === 63 || T === 58) && ye(r))
|
|
2049
|
+
T === 63 ? (k && (ze(e, c, y, f, _, null, o, l, s), f = _ = F = null), L = !0, k = !0, a = !0) : k ? (k = !1, a = !0) : j(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, T = r;
|
|
2054
2050
|
else {
|
|
2055
2051
|
if (o = e.line, l = e.lineStart, s = e.position, !Ge(e, n, Zn, !1, !0))
|
|
2056
2052
|
break;
|
|
@@ -2058,18 +2054,18 @@ function ti(e, t, n) {
|
|
|
2058
2054
|
for (T = e.input.charCodeAt(e.position); Be(T); )
|
|
2059
2055
|
T = e.input.charCodeAt(++e.position);
|
|
2060
2056
|
if (T === 58)
|
|
2061
|
-
T = e.input.charCodeAt(++e.position), ye(T) ||
|
|
2057
|
+
T = e.input.charCodeAt(++e.position), ye(T) || j(e, "a whitespace character is expected after the key-value separator within a block mapping"), k && (ze(e, c, y, f, _, null, o, l, s), f = _ = F = null), L = !0, k = !1, a = !1, f = e.tag, _ = e.result;
|
|
2062
2058
|
else if (L)
|
|
2063
|
-
|
|
2059
|
+
j(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2064
2060
|
else
|
|
2065
2061
|
return e.tag = u, e.anchor = p, !0;
|
|
2066
2062
|
} else if (L)
|
|
2067
|
-
|
|
2063
|
+
j(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2068
2064
|
else
|
|
2069
2065
|
return e.tag = u, e.anchor = p, !0;
|
|
2070
2066
|
}
|
|
2071
|
-
if ((e.line === i || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), Ge(e, t, dt, !0, a) && (k ? _ = e.result :
|
|
2072
|
-
|
|
2067
|
+
if ((e.line === i || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), Ge(e, t, dt, !0, a) && (k ? _ = e.result : F = e.result), k || (ze(e, c, y, f, _, F, o, l, s), f = _ = F = null), oe(e, !0, -1), T = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > t) && T !== 0)
|
|
2068
|
+
j(e, "bad indentation of a mapping entry");
|
|
2073
2069
|
else if (e.lineIndent < t)
|
|
2074
2070
|
break;
|
|
2075
2071
|
}
|
|
@@ -2078,53 +2074,53 @@ function ti(e, t, n) {
|
|
|
2078
2074
|
function ni(e) {
|
|
2079
2075
|
var t, n = !1, r = !1, a, i, o;
|
|
2080
2076
|
if (o = e.input.charCodeAt(e.position), o !== 33) return !1;
|
|
2081
|
-
if (e.tag !== null &&
|
|
2077
|
+
if (e.tag !== null && j(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, a = "!!", o = e.input.charCodeAt(++e.position)) : a = "!", t = e.position, n) {
|
|
2082
2078
|
do
|
|
2083
2079
|
o = e.input.charCodeAt(++e.position);
|
|
2084
2080
|
while (o !== 0 && o !== 62);
|
|
2085
|
-
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
2081
|
+
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : j(e, "unexpected end of the stream within a verbatim tag");
|
|
2086
2082
|
} else {
|
|
2087
2083
|
for (; o !== 0 && !ye(o); )
|
|
2088
|
-
o === 33 && (r ?
|
|
2089
|
-
i = e.input.slice(t, e.position), Do.test(i) &&
|
|
2084
|
+
o === 33 && (r ? j(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(t - 1, e.position + 1), Xn.test(a) || j(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2085
|
+
i = e.input.slice(t, e.position), Do.test(i) && j(e, "tag suffix cannot contain flow indicator characters");
|
|
2090
2086
|
}
|
|
2091
|
-
i && !er.test(i) &&
|
|
2087
|
+
i && !er.test(i) && j(e, "tag name cannot contain such characters: " + i);
|
|
2092
2088
|
try {
|
|
2093
2089
|
i = decodeURIComponent(i);
|
|
2094
2090
|
} catch {
|
|
2095
|
-
|
|
2091
|
+
j(e, "tag name is malformed: " + i);
|
|
2096
2092
|
}
|
|
2097
|
-
return n ? e.tag = i :
|
|
2093
|
+
return n ? e.tag = i : Ee.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i : j(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2098
2094
|
}
|
|
2099
2095
|
function ri(e) {
|
|
2100
2096
|
var t, n;
|
|
2101
2097
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
2102
|
-
for (e.anchor !== null &&
|
|
2098
|
+
for (e.anchor !== null && j(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !ye(n) && !De(n); )
|
|
2103
2099
|
n = e.input.charCodeAt(++e.position);
|
|
2104
|
-
return e.position === t &&
|
|
2100
|
+
return e.position === t && j(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2105
2101
|
}
|
|
2106
2102
|
function ai(e) {
|
|
2107
2103
|
var t, n, r;
|
|
2108
2104
|
if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
|
|
2109
2105
|
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !ye(r) && !De(r); )
|
|
2110
2106
|
r = e.input.charCodeAt(++e.position);
|
|
2111
|
-
return e.position === t &&
|
|
2107
|
+
return e.position === t && j(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), Ee.call(e.anchorMap, n) || j(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], oe(e, !0, -1), !0;
|
|
2112
2108
|
}
|
|
2113
2109
|
function Ge(e, t, n, r, a) {
|
|
2114
|
-
var i, o, l, s = 1, u = !1, p = !1, c, y, f, _,
|
|
2110
|
+
var i, o, l, s = 1, u = !1, p = !1, c, y, f, _, F, k;
|
|
2115
2111
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = l = dt === n || Qn === n, r && oe(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
2116
2112
|
for (; ni(e) || ri(e); )
|
|
2117
2113
|
oe(e, !0, -1) ? (u = !0, l = i, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
2118
|
-
if (l && (l = u || a), (s === 1 || dt === n) && (ct === n || Zn === n ?
|
|
2114
|
+
if (l && (l = u || a), (s === 1 || dt === n) && (ct === n || Zn === n ? F = t : F = t + 1, k = e.position - e.lineStart, s === 1 ? l && (ln(e, k) || ti(e, k, F)) || Xo(e, F) ? p = !0 : (o && ei(e, F) || Zo(e, F) || Qo(e, F) ? p = !0 : ai(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && j(e, "alias node should not have any properties")) : Yo(e, F, ct === n) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (p = l && ln(e, k))), e.tag === null)
|
|
2119
2115
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2120
2116
|
else if (e.tag === "?") {
|
|
2121
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2117
|
+
for (e.result !== null && e.kind !== "scalar" && j(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, y = e.implicitTypes.length; c < y; c += 1)
|
|
2122
2118
|
if (_ = e.implicitTypes[c], _.resolve(e.result)) {
|
|
2123
2119
|
e.result = _.construct(e.result), e.tag = _.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2124
2120
|
break;
|
|
2125
2121
|
}
|
|
2126
2122
|
} else if (e.tag !== "!") {
|
|
2127
|
-
if (
|
|
2123
|
+
if (Ee.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2128
2124
|
_ = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2129
2125
|
else
|
|
2130
2126
|
for (_ = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, y = f.length; c < y; c += 1)
|
|
@@ -2132,7 +2128,7 @@ function Ge(e, t, n, r, a) {
|
|
|
2132
2128
|
_ = f[c];
|
|
2133
2129
|
break;
|
|
2134
2130
|
}
|
|
2135
|
-
_ ||
|
|
2131
|
+
_ || j(e, "unknown tag !<" + e.tag + ">"), e.result !== null && _.kind !== e.kind && j(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + _.kind + '", not "' + e.kind + '"'), _.resolve(e.result, e.tag) ? (e.result = _.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : j(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2136
2132
|
}
|
|
2137
2133
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || p;
|
|
2138
2134
|
}
|
|
@@ -2141,7 +2137,7 @@ function oi(e) {
|
|
|
2141
2137
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2142
2138
|
for (i = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !ye(o); )
|
|
2143
2139
|
o = e.input.charCodeAt(++e.position);
|
|
2144
|
-
for (r = e.input.slice(n, e.position), a = [], r.length < 1 &&
|
|
2140
|
+
for (r = e.input.slice(n, e.position), a = [], r.length < 1 && j(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2145
2141
|
for (; Be(o); )
|
|
2146
2142
|
o = e.input.charCodeAt(++e.position);
|
|
2147
2143
|
if (o === 35) {
|
|
@@ -2155,14 +2151,14 @@ function oi(e) {
|
|
|
2155
2151
|
o = e.input.charCodeAt(++e.position);
|
|
2156
2152
|
a.push(e.input.slice(n, e.position));
|
|
2157
2153
|
}
|
|
2158
|
-
o !== 0 &&
|
|
2154
|
+
o !== 0 && Ft(e), Ee.call(an, r) ? an[r](e, r, a) : pt(e, 'unknown document directive "' + r + '"');
|
|
2159
2155
|
}
|
|
2160
|
-
if (oe(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, oe(e, !0, -1)) : i &&
|
|
2156
|
+
if (oe(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, oe(e, !0, -1)) : i && j(e, "directives end mark is expected"), Ge(e, e.lineIndent - 1, dt, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Vo.test(e.input.slice(t, e.position)) && pt(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && vt(e)) {
|
|
2161
2157
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
2162
2158
|
return;
|
|
2163
2159
|
}
|
|
2164
2160
|
if (e.position < e.length - 1)
|
|
2165
|
-
|
|
2161
|
+
j(e, "end of the stream or a document separator is expected");
|
|
2166
2162
|
else
|
|
2167
2163
|
return;
|
|
2168
2164
|
}
|
|
@@ -2170,7 +2166,7 @@ function ar(e, t) {
|
|
|
2170
2166
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2171
2167
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2172
2168
|
var n = new Wo(e, t), r = e.indexOf("\0");
|
|
2173
|
-
for (r !== -1 && (n.position = r,
|
|
2169
|
+
for (r !== -1 && (n.position = r, j(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2174
2170
|
n.lineIndent += 1, n.position += 1;
|
|
2175
2171
|
for (; n.position < n.length - 1; )
|
|
2176
2172
|
oi(n);
|
|
@@ -2250,7 +2246,7 @@ function Ti(e) {
|
|
|
2250
2246
|
}
|
|
2251
2247
|
var Ni = 1, rt = 2;
|
|
2252
2248
|
function ji(e) {
|
|
2253
|
-
this.schema = e.schema ||
|
|
2249
|
+
this.schema = e.schema || Et, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ie.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = $i(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? rt : Ni, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2254
2250
|
}
|
|
2255
2251
|
function sn(e, t) {
|
|
2256
2252
|
for (var n = ie.repeat(" ", t), r = 0, a = -1, i = "", o, l = e.length; r < l; )
|
|
@@ -2263,7 +2259,7 @@ function $t(e, t) {
|
|
|
2263
2259
|
return `
|
|
2264
2260
|
` + ie.repeat(" ", e.indent * t);
|
|
2265
2261
|
}
|
|
2266
|
-
function
|
|
2262
|
+
function Oi(e, t) {
|
|
2267
2263
|
var n, r, a;
|
|
2268
2264
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2269
2265
|
if (a = e.implicitTypes[n], a.resolve(t))
|
|
@@ -2289,10 +2285,10 @@ function cn(e, t, n) {
|
|
|
2289
2285
|
) : r && e !== sr && e !== ur && e !== cr && e !== dr && e !== pr) && e !== At && !(t === ft && !a) || un(t) && !mt(t) && e === At || t === ft && a
|
|
2290
2286
|
);
|
|
2291
2287
|
}
|
|
2292
|
-
function
|
|
2288
|
+
function Mi(e) {
|
|
2293
2289
|
return at(e) && e !== Kt && !mt(e) && e !== bi && e !== wi && e !== ft && e !== sr && e !== ur && e !== cr && e !== dr && e !== pr && e !== At && e !== yi && e !== vi && e !== fi && e !== Si && e !== Ci && e !== ki && e !== hi && e !== mi && e !== gi && e !== _i && e !== xi;
|
|
2294
2290
|
}
|
|
2295
|
-
function
|
|
2291
|
+
function qi(e) {
|
|
2296
2292
|
return !mt(e) && e !== ft;
|
|
2297
2293
|
}
|
|
2298
2294
|
function et(e, t) {
|
|
@@ -2304,13 +2300,13 @@ function fr(e) {
|
|
|
2304
2300
|
return t.test(e);
|
|
2305
2301
|
}
|
|
2306
2302
|
var mr = 1, Tt = 2, gr = 3, yr = 4, Ve = 5;
|
|
2307
|
-
function
|
|
2308
|
-
var s, u = 0, p = null, c = !1, y = !1, f = r !== -1, _ = -1,
|
|
2303
|
+
function Ei(e, t, n, r, a, i, o, l) {
|
|
2304
|
+
var s, u = 0, p = null, c = !1, y = !1, f = r !== -1, _ = -1, F = Mi(et(e, 0)) && qi(et(e, e.length - 1));
|
|
2309
2305
|
if (t || o)
|
|
2310
2306
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
2311
2307
|
if (u = et(e, s), !at(u))
|
|
2312
2308
|
return Ve;
|
|
2313
|
-
|
|
2309
|
+
F = F && cn(u, p, l), p = u;
|
|
2314
2310
|
}
|
|
2315
2311
|
else {
|
|
2316
2312
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
@@ -2319,13 +2315,13 @@ function qi(e, t, n, r, a, i, o, l) {
|
|
|
2319
2315
|
s - _ - 1 > r && e[_ + 1] !== " ", _ = s);
|
|
2320
2316
|
else if (!at(u))
|
|
2321
2317
|
return Ve;
|
|
2322
|
-
|
|
2318
|
+
F = F && cn(u, p, l), p = u;
|
|
2323
2319
|
}
|
|
2324
2320
|
y = y || f && s - _ - 1 > r && e[_ + 1] !== " ";
|
|
2325
2321
|
}
|
|
2326
|
-
return !c && !y ?
|
|
2322
|
+
return !c && !y ? F && !o && !a(e) ? mr : i === rt ? Ve : Tt : n > 9 && fr(e) ? Ve : o ? i === rt ? Ve : Tt : y ? yr : gr;
|
|
2327
2323
|
}
|
|
2328
|
-
function
|
|
2324
|
+
function Fi(e, t, n, r, a) {
|
|
2329
2325
|
e.dump = function() {
|
|
2330
2326
|
if (t.length === 0)
|
|
2331
2327
|
return e.quotingType === rt ? '""' : "''";
|
|
@@ -2333,9 +2329,9 @@ function Ei(e, t, n, r, a) {
|
|
|
2333
2329
|
return e.quotingType === rt ? '"' + t + '"' : "'" + t + "'";
|
|
2334
2330
|
var i = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - i), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2335
2331
|
function s(u) {
|
|
2336
|
-
return
|
|
2332
|
+
return Oi(e, u);
|
|
2337
2333
|
}
|
|
2338
|
-
switch (
|
|
2334
|
+
switch (Ei(
|
|
2339
2335
|
t,
|
|
2340
2336
|
l,
|
|
2341
2337
|
e.indent,
|
|
@@ -2459,7 +2455,7 @@ function Te(e, t, n, r, a, i, o) {
|
|
|
2459
2455
|
else if (l === "[object Array]")
|
|
2460
2456
|
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? mn(e, t - 1, e.dump, a) : mn(e, t, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (Li(e, t, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2461
2457
|
else if (l === "[object String]")
|
|
2462
|
-
e.tag !== "?" &&
|
|
2458
|
+
e.tag !== "?" && Fi(e, e.dump, t, i, s);
|
|
2463
2459
|
else {
|
|
2464
2460
|
if (l === "[object Undefined]" || e.skipInvalid) return !1;
|
|
2465
2461
|
throw new fe("unacceptable kind of an object to dump " + l);
|
|
@@ -2504,10 +2500,10 @@ function Lt(e, t) {
|
|
|
2504
2500
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2505
2501
|
};
|
|
2506
2502
|
}
|
|
2507
|
-
var Gi = ce, Hi =
|
|
2503
|
+
var Gi = ce, Hi = On, Ji = Fn, Wi = Rn, Yi = Pn, Zi = Et, Qi = or.load, Xi = or.loadAll, el = zi.dump, tl = fe, nl = {
|
|
2508
2504
|
binary: Hn,
|
|
2509
2505
|
float: Un,
|
|
2510
|
-
map:
|
|
2506
|
+
map: En,
|
|
2511
2507
|
null: Bn,
|
|
2512
2508
|
pairs: Wn,
|
|
2513
2509
|
set: Yn,
|
|
@@ -2516,8 +2512,8 @@ var Gi = ce, Hi = Mn, Ji = En, Wi = Rn, Yi = Pn, Zi = qt, Qi = or.load, Xi = or.
|
|
|
2516
2512
|
int: Ln,
|
|
2517
2513
|
merge: Gn,
|
|
2518
2514
|
omap: Jn,
|
|
2519
|
-
seq:
|
|
2520
|
-
str:
|
|
2515
|
+
seq: qn,
|
|
2516
|
+
str: Mn
|
|
2521
2517
|
}, rl = Lt("safeLoad", "load"), al = Lt("safeLoadAll", "loadAll"), ol = Lt("safeDump", "dump"), il = {
|
|
2522
2518
|
Type: Gi,
|
|
2523
2519
|
Schema: Hi,
|
|
@@ -2616,7 +2612,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2616
2612
|
e.format === "structured" ? (m(), $("div", sl, [
|
|
2617
2613
|
(m(!0), $(be, null, ve(e.propListTypes, (s) => (m(), $("div", {
|
|
2618
2614
|
key: `config-card-details-${s}-props`,
|
|
2619
|
-
class:
|
|
2615
|
+
class: qe(`config-card-details-${s}-props`),
|
|
2620
2616
|
"data-testid": `config-card-details-${s}-props`
|
|
2621
2617
|
}, [
|
|
2622
2618
|
s !== "basic" ? (m(), $("div", cl, q(s === "advanced" ? g(r)("baseConfigCard.sections.advanced") : g(r)("baseConfigCard.sections.plugin")), 1)) : W("", !0),
|
|
@@ -2963,13 +2959,13 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2963
2959
|
_: 1
|
|
2964
2960
|
}, 8, ["aria-hidden", "style"]));
|
|
2965
2961
|
}
|
|
2966
|
-
}), Nl = /* @__PURE__ */ ot(Tl, [["__scopeId", "data-v-745761f6"]]), jl = (e) => (Je("data-v-863d10eb"), e = e(), We(), e),
|
|
2962
|
+
}), Nl = /* @__PURE__ */ ot(Tl, [["__scopeId", "data-v-745761f6"]]), jl = (e) => (Je("data-v-863d10eb"), e = e(), We(), e), Ol = ["aria-hidden"], Ml = {
|
|
2967
2963
|
key: 0,
|
|
2968
2964
|
"data-testid": "kui-icon-svg-title"
|
|
2969
|
-
},
|
|
2965
|
+
}, ql = /* @__PURE__ */ jl(() => /* @__PURE__ */ U("path", {
|
|
2970
2966
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2971
2967
|
fill: "currentColor"
|
|
2972
|
-
}, null, -1)),
|
|
2968
|
+
}, null, -1)), El = /* @__PURE__ */ X({
|
|
2973
2969
|
__name: "CloseIcon",
|
|
2974
2970
|
props: {
|
|
2975
2971
|
/** The accessibility text provided to screen readers */
|
|
@@ -3056,14 +3052,14 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3056
3052
|
width: "100%",
|
|
3057
3053
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3058
3054
|
}, [
|
|
3059
|
-
e.title ? (m(), $("title",
|
|
3060
|
-
|
|
3061
|
-
], 8,
|
|
3055
|
+
e.title ? (m(), $("title", Ml, q(e.title), 1)) : W("", !0),
|
|
3056
|
+
ql
|
|
3057
|
+
], 8, Ol))
|
|
3062
3058
|
]),
|
|
3063
3059
|
_: 1
|
|
3064
3060
|
}, 8, ["aria-hidden", "style"]));
|
|
3065
3061
|
}
|
|
3066
|
-
}),
|
|
3062
|
+
}), Fl = /* @__PURE__ */ ot(El, [["__scopeId", "data-v-863d10eb"]]), Bl = (e) => (Je("data-v-d9894a05"), e = e(), We(), e), Kl = ["aria-hidden"], Ll = {
|
|
3067
3063
|
key: 0,
|
|
3068
3064
|
"data-testid": "kui-icon-svg-title"
|
|
3069
3065
|
}, Ul = /* @__PURE__ */ Bl(() => /* @__PURE__ */ U("path", {
|
|
@@ -3295,27 +3291,27 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3295
3291
|
// the last property displayed
|
|
3296
3292
|
section: he.Basic
|
|
3297
3293
|
}
|
|
3298
|
-
}, f = O(!1), _ = O(!1),
|
|
3294
|
+
}, f = O(!1), _ = O(!1), F = O(""), k = O({}), L = w(() => {
|
|
3299
3295
|
var d, v, B;
|
|
3300
3296
|
if (!k.value)
|
|
3301
3297
|
return [];
|
|
3302
3298
|
const I = [], V = Object.keys(k.value).length;
|
|
3303
3299
|
for (const R in k.value) {
|
|
3304
3300
|
const C = (v = (d = a.configSchema) == null ? void 0 : d[R]) == null ? void 0 : v.order, K = (B = y[R]) == null ? void 0 : B.order;
|
|
3305
|
-
let
|
|
3306
|
-
(K || K === 0) && (
|
|
3301
|
+
let M = V;
|
|
3302
|
+
(K || K === 0) && (M = K === -1 ? V + 1 : K), C && (M = C === -1 ? V + 1 : C), I.push([R, M]);
|
|
3307
3303
|
}
|
|
3308
3304
|
return I.sort(function(R, C) {
|
|
3309
3305
|
return R[1] - C[1];
|
|
3310
3306
|
}), I.map((R) => {
|
|
3311
3307
|
var C, K;
|
|
3312
|
-
const
|
|
3308
|
+
const M = R[0], J = (C = k.value) == null ? void 0 : C[M], te = ((K = a.configSchema) == null ? void 0 : K[M]) || {}, de = y[M];
|
|
3313
3309
|
return {
|
|
3314
|
-
key:
|
|
3310
|
+
key: M,
|
|
3315
3311
|
value: J,
|
|
3316
3312
|
hidden: te.hidden || !1,
|
|
3317
3313
|
type: te.type ?? ((de == null ? void 0 : de.type) || ee.Text),
|
|
3318
|
-
label: te.label ?? ((de == null ? void 0 : de.label) || l(
|
|
3314
|
+
label: te.label ?? ((de == null ? void 0 : de.label) || l(M)),
|
|
3319
3315
|
tooltip: te.tooltip ?? ((de == null ? void 0 : de.tooltip) || void 0),
|
|
3320
3316
|
section: te.section ?? ((de == null ? void 0 : de.section) || he.Advanced)
|
|
3321
3317
|
};
|
|
@@ -3327,17 +3323,17 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3327
3323
|
const B = k.value[a.pluginConfigKey] || {}, I = Object.keys(B).length, V = [];
|
|
3328
3324
|
for (const R in B) {
|
|
3329
3325
|
const C = (v = (d = a.pluginConfigSchema) == null ? void 0 : d[R]) == null ? void 0 : v.order, K = B[R];
|
|
3330
|
-
let
|
|
3331
|
-
C && (
|
|
3326
|
+
let M = K != null && K !== "" ? I - 1 : I;
|
|
3327
|
+
C && (M = C === -1 ? I + 1 : C), V.push([R, M]);
|
|
3332
3328
|
}
|
|
3333
3329
|
return V.sort(function(R, C) {
|
|
3334
3330
|
return R[1] - C[1];
|
|
3335
3331
|
}), V.map((R) => {
|
|
3336
3332
|
var C;
|
|
3337
|
-
const K = R[0],
|
|
3333
|
+
const K = R[0], M = B[K], J = ((C = a.pluginConfigSchema) == null ? void 0 : C[K]) || {};
|
|
3338
3334
|
return {
|
|
3339
3335
|
key: K,
|
|
3340
|
-
value:
|
|
3336
|
+
value: M,
|
|
3341
3337
|
hidden: J.hidden || !1,
|
|
3342
3338
|
type: J.type ?? ee.Text,
|
|
3343
3339
|
label: J.label ?? l(K),
|
|
@@ -3345,7 +3341,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3345
3341
|
section: he.Plugin
|
|
3346
3342
|
};
|
|
3347
3343
|
}).filter((R) => !R.hidden);
|
|
3348
|
-
}),
|
|
3344
|
+
}), E = w(() => {
|
|
3349
3345
|
var d, v, B, I;
|
|
3350
3346
|
return {
|
|
3351
3347
|
basic: (d = L.value) == null ? void 0 : d.filter((V) => V.section === he.Basic),
|
|
@@ -3354,7 +3350,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3354
3350
|
};
|
|
3355
3351
|
}), x = w(() => {
|
|
3356
3352
|
const d = [];
|
|
3357
|
-
return
|
|
3353
|
+
return E.value.basic.length && d.push("basic"), E.value.advanced.length && d.push("advanced"), E.value.plugin.length && d.push("plugin"), d;
|
|
3358
3354
|
}), S = w(() => {
|
|
3359
3355
|
var d, v;
|
|
3360
3356
|
let B = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
@@ -3378,7 +3374,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3378
3374
|
}), r("fetch:success", d);
|
|
3379
3375
|
} catch (d) {
|
|
3380
3376
|
const v = o(d);
|
|
3381
|
-
|
|
3377
|
+
F.value = v.startsWith("code") ? i("baseConfigCard.errors.load") : v, _.value = !0, r("fetch:error", d);
|
|
3382
3378
|
} finally {
|
|
3383
3379
|
f.value = !1;
|
|
3384
3380
|
}
|
|
@@ -3436,7 +3432,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3436
3432
|
"icon-variant": "error"
|
|
3437
3433
|
}, {
|
|
3438
3434
|
default: h(() => [
|
|
3439
|
-
U("h3", null, q(
|
|
3435
|
+
U("h3", null, q(F.value), 1)
|
|
3440
3436
|
]),
|
|
3441
3437
|
_: 1
|
|
3442
3438
|
})) : W("", !0),
|
|
@@ -3446,13 +3442,13 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3446
3442
|
"fetcher-url": S.value,
|
|
3447
3443
|
format: p.value,
|
|
3448
3444
|
"prop-list-types": x.value,
|
|
3449
|
-
"property-collections":
|
|
3445
|
+
"property-collections": E.value,
|
|
3450
3446
|
record: k.value
|
|
3451
3447
|
}, Ke({ _: 2 }, [
|
|
3452
|
-
ve(Object.keys(d.$slots), (
|
|
3453
|
-
name:
|
|
3448
|
+
ve(Object.keys(d.$slots), (M) => ({
|
|
3449
|
+
name: M,
|
|
3454
3450
|
fn: h(({ row: J, rowValue: te }) => [
|
|
3455
|
-
ne(d.$slots,
|
|
3451
|
+
ne(d.$slots, M, {
|
|
3456
3452
|
row: J,
|
|
3457
3453
|
rowValue: te
|
|
3458
3454
|
}, void 0, !0)
|
|
@@ -3549,11 +3545,11 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3549
3545
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3550
3546
|
setup(e, { emit: t }) {
|
|
3551
3547
|
var n;
|
|
3552
|
-
const r = t, a = e, i =
|
|
3548
|
+
const r = t, a = e, i = Ot(), { i18n: { t: o } } = le.useI18n(), { getMessageFromError: l } = le.useErrors(), { axiosInstance: s } = le.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u = O(!1), p = O(!1), c = O(""), y = w(() => a.canSubmit === !1 || a.isReadonly), f = O(!1), _ = w(() => {
|
|
3553
3549
|
var x, S;
|
|
3554
3550
|
let d = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3555
3551
|
return a.config.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, ((x = a.config) == null ? void 0 : x.controlPlaneId) || "") : a.config.app === "kongManager" && (d = d.replace(/\/{workspace}/gi, (S = a.config) != null && S.workspace ? `/${a.config.workspace}` : "")), a.editId ? (d = d.replace(/{id}/gi, a.editId), d) : (d = d.replace(/\/{id}/gi, ""), d);
|
|
3556
|
-
}),
|
|
3552
|
+
}), F = () => {
|
|
3557
3553
|
f.value = !f.value;
|
|
3558
3554
|
}, k = () => {
|
|
3559
3555
|
a.config.cancelRoute ? i.push(a.config.cancelRoute) : L();
|
|
@@ -3561,7 +3557,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3561
3557
|
r("cancel");
|
|
3562
3558
|
}, T = () => {
|
|
3563
3559
|
y.value || r("submit");
|
|
3564
|
-
},
|
|
3560
|
+
}, E = O([
|
|
3565
3561
|
{
|
|
3566
3562
|
title: o("baseForm.configuration.yaml"),
|
|
3567
3563
|
hash: "#yaml"
|
|
@@ -3622,7 +3618,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3622
3618
|
N(I, {
|
|
3623
3619
|
appearance: "tertiary",
|
|
3624
3620
|
"data-testid": "form-view-configuration",
|
|
3625
|
-
onClick: S[0] || (S[0] = (C) =>
|
|
3621
|
+
onClick: S[0] || (S[0] = (C) => F())
|
|
3626
3622
|
}, {
|
|
3627
3623
|
default: h(() => [
|
|
3628
3624
|
Z(q(g(o)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3661,13 +3657,13 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3661
3657
|
"offset-top": 60,
|
|
3662
3658
|
title: g(o)("baseForm.configuration.title"),
|
|
3663
3659
|
visible: f.value,
|
|
3664
|
-
onClose: S[1] || (S[1] = (C) =>
|
|
3660
|
+
onClose: S[1] || (S[1] = (C) => F())
|
|
3665
3661
|
}, {
|
|
3666
3662
|
default: h(() => [
|
|
3667
3663
|
U("div", null, q(g(o)("baseForm.configuration.message")), 1),
|
|
3668
3664
|
N(V, {
|
|
3669
3665
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3670
|
-
tabs:
|
|
3666
|
+
tabs: E.value
|
|
3671
3667
|
}, {
|
|
3672
3668
|
json: h(() => [
|
|
3673
3669
|
N(Tn, {
|
|
@@ -3725,12 +3721,12 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3725
3721
|
o && (o.disconnect(), o = void 0);
|
|
3726
3722
|
}, s = () => {
|
|
3727
3723
|
var k, L, T;
|
|
3728
|
-
let
|
|
3724
|
+
let E = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3729
3725
|
if (n.value && "getComputedStyle" in window) {
|
|
3730
3726
|
const x = window.getComputedStyle(n.value);
|
|
3731
|
-
|
|
3727
|
+
E -= (parseFloat(x.paddingLeft) || 0) + (parseFloat(x.paddingRight) || 0);
|
|
3732
3728
|
}
|
|
3733
|
-
p.value = ((L = r.value) == null ? void 0 : L.getBoundingClientRect().width) || 0, c.value =
|
|
3729
|
+
p.value = ((L = r.value) == null ? void 0 : L.getBoundingClientRect().width) || 0, c.value = E, y.value = ((T = u.value) == null ? void 0 : T.innerText) || "";
|
|
3734
3730
|
}, u = O({}), p = O(0), c = O(0), y = O(""), f = w(() => [r.value, n.value]), _ = $e(
|
|
3735
3731
|
f,
|
|
3736
3732
|
(k) => {
|
|
@@ -3745,7 +3741,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3745
3741
|
}
|
|
3746
3742
|
},
|
|
3747
3743
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3748
|
-
),
|
|
3744
|
+
), F = w(() => i.value ? p.value > c.value : !1);
|
|
3749
3745
|
return xr(() => {
|
|
3750
3746
|
s();
|
|
3751
3747
|
}), Sr(() => {
|
|
@@ -3764,7 +3760,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3764
3760
|
N(T, {
|
|
3765
3761
|
"max-width": "300",
|
|
3766
3762
|
placement: "bottom-start",
|
|
3767
|
-
text:
|
|
3763
|
+
text: F.value ? y.value : ""
|
|
3768
3764
|
}, {
|
|
3769
3765
|
default: h(() => [
|
|
3770
3766
|
ne(k.$slots, "default", {}, void 0, !0)
|
|
@@ -3942,19 +3938,19 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3942
3938
|
r("empty-state-cta-clicked"), _();
|
|
3943
3939
|
}, _ = () => {
|
|
3944
3940
|
r("clear-search-input");
|
|
3945
|
-
},
|
|
3941
|
+
}, F = w(() => n.disableRowClick ? void 0 : (d, v) => {
|
|
3946
3942
|
r("click:row", v);
|
|
3947
3943
|
}), k = (d) => {
|
|
3948
3944
|
r("sort", d);
|
|
3949
|
-
}, { setTablePreferences: L, getTablePreferences: T } = Dr(),
|
|
3945
|
+
}, { setTablePreferences: L, getTablePreferences: T } = Dr(), E = O(T(o.value)), x = w(() => {
|
|
3950
3946
|
const d = T(o.value);
|
|
3951
3947
|
return {
|
|
3952
3948
|
...n.initialFetcherParams,
|
|
3953
3949
|
...d
|
|
3954
3950
|
};
|
|
3955
3951
|
}), S = (d) => {
|
|
3956
|
-
|
|
3957
|
-
!("hidable" in v) || !
|
|
3952
|
+
E.value = d, s.value.forEach((v) => {
|
|
3953
|
+
!("hidable" in v) || !E.value.columnVisibility || v.hidable === !1 && (E.value.columnVisibility[v.key] = !0);
|
|
3958
3954
|
}), o.value && L(o.value, d);
|
|
3959
3955
|
};
|
|
3960
3956
|
return (d, v) => {
|
|
@@ -3992,9 +3988,9 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3992
3988
|
"search-input": e.query,
|
|
3993
3989
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3994
3990
|
sortable: !e.disableSorting,
|
|
3995
|
-
"table-preferences":
|
|
3991
|
+
"table-preferences": E.value,
|
|
3996
3992
|
onEmptyStateActionClick: f,
|
|
3997
|
-
"onRow:click":
|
|
3993
|
+
"onRow:click": F.value,
|
|
3998
3994
|
onSort: v[0] || (v[0] = (C) => k(C)),
|
|
3999
3995
|
"onUpdate:tablePreferences": S
|
|
4000
3996
|
}, Ke({
|
|
@@ -4008,7 +4004,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4008
4004
|
[je, l(C)]
|
|
4009
4005
|
])
|
|
4010
4006
|
]),
|
|
4011
|
-
actions: h(({ row: C, rowKey: K, rowValue:
|
|
4007
|
+
actions: h(({ row: C, rowKey: K, rowValue: M }) => [
|
|
4012
4008
|
U("div", {
|
|
4013
4009
|
class: "actions-container",
|
|
4014
4010
|
"data-testid": C.name
|
|
@@ -4021,7 +4017,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4021
4017
|
ne(d.$slots, "actions", {
|
|
4022
4018
|
row: C,
|
|
4023
4019
|
rowKey: K,
|
|
4024
|
-
rowValue:
|
|
4020
|
+
rowValue: M
|
|
4025
4021
|
}, void 0, !0)
|
|
4026
4022
|
]),
|
|
4027
4023
|
default: h(() => [
|
|
@@ -4046,15 +4042,15 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4046
4042
|
}, [
|
|
4047
4043
|
ve(e.tableHeaders, (C, K) => ({
|
|
4048
4044
|
name: K,
|
|
4049
|
-
fn: h(({ row:
|
|
4045
|
+
fn: h(({ row: M, rowKey: J, rowValue: te }) => [
|
|
4050
4046
|
N(ts, {
|
|
4051
4047
|
"key-name": String(K),
|
|
4052
|
-
"row-el": c(
|
|
4048
|
+
"row-el": c(M),
|
|
4053
4049
|
tooltip: C.tooltip
|
|
4054
4050
|
}, {
|
|
4055
4051
|
default: h(() => [
|
|
4056
4052
|
ne(d.$slots, K, {
|
|
4057
|
-
row:
|
|
4053
|
+
row: M,
|
|
4058
4054
|
rowKey: J,
|
|
4059
4055
|
rowValue: te
|
|
4060
4056
|
}, () => [
|
|
@@ -4269,7 +4265,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4269
4265
|
a("update:modelValue", x);
|
|
4270
4266
|
}, f = () => {
|
|
4271
4267
|
y("");
|
|
4272
|
-
}, _ = (x) => `filter-${x}`,
|
|
4268
|
+
}, _ = (x) => `filter-${x}`, F = (x) => {
|
|
4273
4269
|
var S, d;
|
|
4274
4270
|
return (((d = (S = r.config.schema) == null ? void 0 : S[x]) == null ? void 0 : d.values) ?? []).map((v) => ({
|
|
4275
4271
|
value: v,
|
|
@@ -4282,10 +4278,10 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4282
4278
|
o.value = {
|
|
4283
4279
|
...o.value,
|
|
4284
4280
|
[x]: ""
|
|
4285
|
-
},
|
|
4281
|
+
}, E();
|
|
4286
4282
|
}, T = () => {
|
|
4287
|
-
o.value = {},
|
|
4288
|
-
},
|
|
4283
|
+
o.value = {}, E(!0);
|
|
4284
|
+
}, E = (x = !1) => {
|
|
4289
4285
|
const S = Object.keys(o.value).reduce((d, v) => (o.value[v] && (d[v] = `${o.value[v]}`), d), {});
|
|
4290
4286
|
x && (i.value = !1), a("update:modelValue", new URLSearchParams(S).toString());
|
|
4291
4287
|
};
|
|
@@ -4304,7 +4300,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4304
4300
|
N(yn)
|
|
4305
4301
|
]),
|
|
4306
4302
|
after: h(() => [
|
|
4307
|
-
Ne(N(g(
|
|
4303
|
+
Ne(N(g(Fl), {
|
|
4308
4304
|
class: "kong-ui-entity-filter-clear",
|
|
4309
4305
|
onClick: f
|
|
4310
4306
|
}, null, 512), [
|
|
@@ -4339,7 +4335,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4339
4335
|
"data-testid": I.value
|
|
4340
4336
|
}, [
|
|
4341
4337
|
U("span", {
|
|
4342
|
-
class:
|
|
4338
|
+
class: qe(["menu-item-title", { expanded: l.value.has(I.value) }]),
|
|
4343
4339
|
role: "button",
|
|
4344
4340
|
tabindex: "0",
|
|
4345
4341
|
onClick: (C) => c(I.value),
|
|
@@ -4350,7 +4346,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4350
4346
|
[je, s.value.includes(I.value)]
|
|
4351
4347
|
]),
|
|
4352
4348
|
N(g(Nl), {
|
|
4353
|
-
class:
|
|
4349
|
+
class: qe(["menu-item-expand-icon", { expanded: l.value.has(I.value) }]),
|
|
4354
4350
|
color: g(_a)
|
|
4355
4351
|
}, null, 8, ["class", "color"])
|
|
4356
4352
|
], 42, bs),
|
|
@@ -4364,7 +4360,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4364
4360
|
id: _(I.value),
|
|
4365
4361
|
modelValue: o.value[I.value],
|
|
4366
4362
|
"onUpdate:modelValue": (C) => o.value[I.value] = C,
|
|
4367
|
-
items:
|
|
4363
|
+
items: F(I.value),
|
|
4368
4364
|
placeholder: g(n)("filter.selectPlaceholder")
|
|
4369
4365
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), G(d, {
|
|
4370
4366
|
key: 1,
|
|
@@ -4383,7 +4379,7 @@ const ll = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4383
4379
|
appearance: "tertiary",
|
|
4384
4380
|
"data-testid": "apply-filter",
|
|
4385
4381
|
size: "small",
|
|
4386
|
-
onClick: S[0] || (S[0] = (C) =>
|
|
4382
|
+
onClick: S[0] || (S[0] = (C) => E(!0))
|
|
4387
4383
|
}, {
|
|
4388
4384
|
default: h(() => [
|
|
4389
4385
|
Z(q(g(n)("filter.applyButtonText")), 1)
|
|
@@ -4484,13 +4480,13 @@ function js(e, t, n) {
|
|
|
4484
4480
|
}
|
|
4485
4481
|
return Ts(r);
|
|
4486
4482
|
}
|
|
4487
|
-
const
|
|
4483
|
+
const Os = ["aria-labelledby"], Ms = { class: "form-section-wrapper" }, qs = {
|
|
4488
4484
|
key: 1,
|
|
4489
4485
|
class: "form-section-description"
|
|
4490
|
-
},
|
|
4486
|
+
}, Es = {
|
|
4491
4487
|
key: 2,
|
|
4492
4488
|
class: "form-section-footer"
|
|
4493
|
-
},
|
|
4489
|
+
}, Fs = { class: "form-section-content" }, Bs = /* @__PURE__ */ X({
|
|
4494
4490
|
__name: "EntityFormSection",
|
|
4495
4491
|
props: {
|
|
4496
4492
|
title: {
|
|
@@ -4522,13 +4518,13 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4522
4518
|
const t = jt(), n = js();
|
|
4523
4519
|
return (r, a) => (m(), $("div", {
|
|
4524
4520
|
"aria-labelledby": e.title ? g(n) : void 0,
|
|
4525
|
-
class:
|
|
4521
|
+
class: qe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4526
4522
|
role: "group"
|
|
4527
4523
|
}, [
|
|
4528
|
-
U("div",
|
|
4524
|
+
U("div", Ms, [
|
|
4529
4525
|
e.hideInfoHeader ? W("", !0) : (m(), $("div", {
|
|
4530
4526
|
key: 0,
|
|
4531
|
-
class:
|
|
4527
|
+
class: qe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4532
4528
|
}, [
|
|
4533
4529
|
e.title ? (m(), G(Se(e.titleTag), {
|
|
4534
4530
|
key: 0,
|
|
@@ -4540,20 +4536,20 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4540
4536
|
]),
|
|
4541
4537
|
_: 1
|
|
4542
4538
|
}, 8, ["id"])) : W("", !0),
|
|
4543
|
-
e.description || g(t).description ? (m(), $("div",
|
|
4539
|
+
e.description || g(t).description ? (m(), $("div", qs, [
|
|
4544
4540
|
ne(r.$slots, "description", {}, () => [
|
|
4545
4541
|
U("p", null, q(e.description), 1)
|
|
4546
4542
|
], !0)
|
|
4547
4543
|
])) : W("", !0),
|
|
4548
|
-
g(t).footer ? (m(), $("div",
|
|
4544
|
+
g(t).footer ? (m(), $("div", Es, [
|
|
4549
4545
|
ne(r.$slots, "footer", {}, void 0, !0)
|
|
4550
4546
|
])) : W("", !0)
|
|
4551
4547
|
], 2)),
|
|
4552
|
-
U("div",
|
|
4548
|
+
U("div", Fs, [
|
|
4553
4549
|
ne(r.$slots, "default", {}, void 0, !0)
|
|
4554
4550
|
])
|
|
4555
4551
|
])
|
|
4556
|
-
], 10,
|
|
4552
|
+
], 10, Os));
|
|
4557
4553
|
}
|
|
4558
4554
|
}), vn = /* @__PURE__ */ Ce(Bs, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ut, useDeleteUrlBuilder: Ks, useErrors: Ls, useExternalLinkCreator: su, useFetchUrlBuilder: uu, useFetcher: Us, useDebouncedFilter: vr, useStringHelpers: cu, useHelpers: du, useGatewayFeatureSupported: pu, useTruncationDetector: fu, useValidators: Rs } = le, Ps = { class: "add-to-group-form-container" }, Vs = { class: "add-to-group-cta-text" }, Ds = {
|
|
4559
4555
|
key: 0,
|
|
@@ -4585,60 +4581,60 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4585
4581
|
results: y
|
|
4586
4582
|
} = vr(
|
|
4587
4583
|
r.config,
|
|
4588
|
-
|
|
4584
|
+
Oe.list[r.config.app].all,
|
|
4589
4585
|
"",
|
|
4590
4586
|
{
|
|
4591
4587
|
fetchedItemsKey: "data",
|
|
4592
4588
|
searchKeys: ["name", "id"]
|
|
4593
4589
|
}
|
|
4594
|
-
), f = w(() => p.value ? n("consumer_groups.errors.general") : ""), _ = O(0),
|
|
4590
|
+
), f = w(() => p.value ? n("consumer_groups.errors.general") : ""), _ = O(0), F = w(() => u.value === void 0), k = w(() => y.value.map((C) => ({
|
|
4595
4591
|
label: C.name,
|
|
4596
4592
|
value: C.id,
|
|
4597
4593
|
selected: o.value.includes(C.id),
|
|
4598
4594
|
data: C
|
|
4599
4595
|
// we need this to determine whether or not to show the description text
|
|
4600
4596
|
}))), L = (C) => {
|
|
4601
|
-
var
|
|
4602
|
-
const K =
|
|
4597
|
+
var M;
|
|
4598
|
+
const K = F.value ? y.value.find((J) => J.id === C) : (M = u.value) == null ? void 0 : M.find((J) => J.id === C);
|
|
4603
4599
|
return K ? K.name : C;
|
|
4604
4600
|
}, T = () => {
|
|
4605
|
-
S.value = "",
|
|
4606
|
-
},
|
|
4601
|
+
S.value = "", E.value = [], I.value = [], a("cancel");
|
|
4602
|
+
}, E = O([]), x = O(!1), S = O(""), d = async () => {
|
|
4607
4603
|
if (!o.value.length) {
|
|
4608
4604
|
S.value = "", I.value = [], a("cancel");
|
|
4609
4605
|
return;
|
|
4610
4606
|
}
|
|
4611
|
-
x.value = !0, S.value = "",
|
|
4607
|
+
x.value = !0, S.value = "", E.value = [], I.value = [];
|
|
4612
4608
|
try {
|
|
4613
4609
|
const C = o.value.map((J) => B(J)), K = await Promise.allSettled(C);
|
|
4614
|
-
let
|
|
4610
|
+
let M = !0;
|
|
4615
4611
|
K.forEach((J) => {
|
|
4616
|
-
J.status !== "fulfilled" && (
|
|
4617
|
-
}),
|
|
4612
|
+
J.status !== "fulfilled" && (M = !1);
|
|
4613
|
+
}), M ? (E.value = [], I.value = [], a("add:success", o.value), o.value = []) : (E.value.length && a("add:partial-success", E.value), o.value = [], V(K));
|
|
4618
4614
|
} catch {
|
|
4619
4615
|
S.value = n("consumer_groups.errors.add"), a("error", S.value);
|
|
4620
4616
|
} finally {
|
|
4621
4617
|
x.value = !1;
|
|
4622
4618
|
}
|
|
4623
4619
|
}, v = w(() => {
|
|
4624
|
-
var K,
|
|
4625
|
-
let C = `${r.config.apiBaseUrl}${
|
|
4626
|
-
return r.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((K = r.config) == null ? void 0 : K.controlPlaneId) || "").replace(/{consumerId}/gi, ((
|
|
4620
|
+
var K, M, J, te;
|
|
4621
|
+
let C = `${r.config.apiBaseUrl}${Oe.list[r.config.app].forConsumer}`;
|
|
4622
|
+
return r.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((K = r.config) == null ? void 0 : K.controlPlaneId) || "").replace(/{consumerId}/gi, ((M = r.config) == null ? void 0 : M.consumerId) || "") : r.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (J = r.config) != null && J.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((te = r.config) == null ? void 0 : te.consumerId) || "")), C;
|
|
4627
4623
|
}), B = async (C) => {
|
|
4628
4624
|
const K = {
|
|
4629
4625
|
group: C
|
|
4630
4626
|
};
|
|
4631
4627
|
try {
|
|
4632
|
-
const
|
|
4633
|
-
return
|
|
4634
|
-
} catch (
|
|
4635
|
-
let J = `${L(C)} - ${
|
|
4636
|
-
return
|
|
4628
|
+
const M = await i.post(v.value, K);
|
|
4629
|
+
return E.value.push(C), M;
|
|
4630
|
+
} catch (M) {
|
|
4631
|
+
let J = `${L(C)} - ${M.message}`;
|
|
4632
|
+
return M.response.status === 409 && (J = `${L(C)} - ${n("consumer_groups.errors.already_added")}`), Promise.reject(Error(J));
|
|
4637
4633
|
}
|
|
4638
4634
|
}, I = O([]), V = (C) => {
|
|
4639
4635
|
I.value = C.map((K) => {
|
|
4640
|
-
var
|
|
4641
|
-
return (
|
|
4636
|
+
var M;
|
|
4637
|
+
return (M = K.reason) == null ? void 0 : M.message;
|
|
4642
4638
|
}).filter(Boolean);
|
|
4643
4639
|
};
|
|
4644
4640
|
return $e(k, () => {
|
|
@@ -4646,7 +4642,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4646
4642
|
}, { immediate: !0, deep: !0 }), $e(() => r.visible, () => {
|
|
4647
4643
|
r.visible && c();
|
|
4648
4644
|
}, { immediate: !0 }), (C, K) => {
|
|
4649
|
-
const
|
|
4645
|
+
const M = z("KMultiselect"), J = z("KAlert"), te = z("KPrompt");
|
|
4650
4646
|
return m(), G(te, {
|
|
4651
4647
|
"action-button-disabled": x.value,
|
|
4652
4648
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
@@ -4659,12 +4655,12 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4659
4655
|
default: h(() => [
|
|
4660
4656
|
U("div", Ps, [
|
|
4661
4657
|
U("p", Vs, q(g(n)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4662
|
-
N(
|
|
4658
|
+
N(M, {
|
|
4663
4659
|
modelValue: o.value,
|
|
4664
4660
|
"onUpdate:modelValue": K[0] || (K[0] = (de) => o.value = de),
|
|
4665
4661
|
autosuggest: "",
|
|
4666
4662
|
"data-testid": "add-to-groups-multiselect",
|
|
4667
|
-
"dropdown-footer-text":
|
|
4663
|
+
"dropdown-footer-text": F.value ? g(n)("consumer_groups.consumers.add.footer") : void 0,
|
|
4668
4664
|
items: k.value,
|
|
4669
4665
|
label: g(n)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4670
4666
|
loading: g(s),
|
|
@@ -4744,7 +4740,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4744
4740
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4745
4741
|
setup(e, { emit: t }) {
|
|
4746
4742
|
var Vt;
|
|
4747
|
-
const n = t, r = e, { i18nT: a, i18n: { t: i } } = yt.useI18n(), o =
|
|
4743
|
+
const n = t, r = e, { i18nT: a, i18n: { t: i } } = yt.useI18n(), o = Ot(), { axiosInstance: l } = Ut((Vt = r.config) == null ? void 0 : Vt.axiosRequestConfig), s = O(1), u = w(() => !!r.config.consumerId), p = w(
|
|
4748
4744
|
() => u.value ? "kong-ui-entities-consumer-groups-list-in-consumer-page" : "kong-ui-entities-consumer-groups-list"
|
|
4749
4745
|
), c = w(() => r.config.app !== "kongManager" || !!r.config.disableSorting), y = {
|
|
4750
4746
|
// the Name column is non-hidable
|
|
@@ -4753,9 +4749,9 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4753
4749
|
r.config.app === "kongManager" && (y.consumers_count = { label: i("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), y.tags = { label: i("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4754
4750
|
const f = y, _ = (A) => ({
|
|
4755
4751
|
"data-testid": A.username ?? A.custom_id ?? A.id
|
|
4756
|
-
}),
|
|
4752
|
+
}), F = w(() => {
|
|
4757
4753
|
var Y, re, ge, we;
|
|
4758
|
-
let A = `${r.config.apiBaseUrl}${
|
|
4754
|
+
let A = `${r.config.apiBaseUrl}${Oe.list[r.config.app][u.value ? "forConsumer" : "all"]}`;
|
|
4759
4755
|
return r.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (ge = r.config) != null && ge.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((we = r.config) == null ? void 0 : we.consumerId) || "")), A;
|
|
4760
4756
|
}), k = O(""), L = w(() => {
|
|
4761
4757
|
const A = r.config.app === "konnect" || r.config.isExactMatch;
|
|
@@ -4773,7 +4769,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4773
4769
|
},
|
|
4774
4770
|
schema: r.config.filterSchema
|
|
4775
4771
|
};
|
|
4776
|
-
}), T = w(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher:
|
|
4772
|
+
}), T = w(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: E, fetcherState: x } = Us(r.config, F.value, T.value), S = () => {
|
|
4777
4773
|
k.value = "";
|
|
4778
4774
|
}, d = () => {
|
|
4779
4775
|
s.value++;
|
|
@@ -4814,16 +4810,16 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4814
4810
|
}), C = (A) => ({
|
|
4815
4811
|
label: i("consumer_groups.actions.edit"),
|
|
4816
4812
|
to: r.config.getEditRoute(A)
|
|
4817
|
-
}), K = O(void 0),
|
|
4818
|
-
K.value = A,
|
|
4813
|
+
}), K = O(void 0), M = O(!1), J = O(!1), te = O(""), de = Ks(r.config, F.value), Ye = (A) => {
|
|
4814
|
+
K.value = A, M.value = !0;
|
|
4819
4815
|
}, bt = () => {
|
|
4820
|
-
|
|
4816
|
+
M.value = !1;
|
|
4821
4817
|
}, it = async () => {
|
|
4822
4818
|
var A, Y, re;
|
|
4823
4819
|
if ((A = K.value) != null && A.id) {
|
|
4824
4820
|
J.value = !0;
|
|
4825
4821
|
try {
|
|
4826
|
-
await l.delete(de(K.value.id)), J.value = !1,
|
|
4822
|
+
await l.delete(de(K.value.id)), J.value = !1, M.value = !1, s.value++, n("delete:success", K.value);
|
|
4827
4823
|
} catch (ge) {
|
|
4828
4824
|
te.value = ((re = (Y = ge.response) == null ? void 0 : Y.data) == null ? void 0 : re.message) || ge.message || i("consumer_groups.errors.delete"), n("error", ge);
|
|
4829
4825
|
} finally {
|
|
@@ -4844,7 +4840,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4844
4840
|
H.value = !1, D.value = void 0;
|
|
4845
4841
|
}, Ue = w(() => {
|
|
4846
4842
|
var Y, re, ge, we;
|
|
4847
|
-
let A = `${r.config.apiBaseUrl}${
|
|
4843
|
+
let A = `${r.config.apiBaseUrl}${Oe.list[r.config.app].oneForConsumer}`;
|
|
4848
4844
|
return r.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (ge = r.config) != null && ge.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((we = r.config) == null ? void 0 : we.consumerId) || "")), A;
|
|
4849
4845
|
}), Qe = O(!1), br = async () => {
|
|
4850
4846
|
if (D.value) {
|
|
@@ -4861,7 +4857,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4861
4857
|
}, Pt = O(!1);
|
|
4862
4858
|
$e(x, (A) => {
|
|
4863
4859
|
var Y, re, ge, we;
|
|
4864
|
-
if (Array.isArray((Y = A == null ? void 0 : A.response) == null ? void 0 : Y.data) && (Pt.value = A.response.data.length > 0), A.status ===
|
|
4860
|
+
if (Array.isArray((Y = A == null ? void 0 : A.response) == null ? void 0 : Y.data) && (Pt.value = A.response.data.length > 0), A.status === Fe.Error) {
|
|
4865
4861
|
v.value = {
|
|
4866
4862
|
title: i("consumer_groups.errors.general")
|
|
4867
4863
|
}, (we = (ge = (re = A.error) == null ? void 0 : re.response) == null ? void 0 : ge.data) != null && we.message && (v.value.message = A.error.response.data.message), n("error", A.error);
|
|
@@ -4888,7 +4884,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
4888
4884
|
"empty-state-options": Ct.value,
|
|
4889
4885
|
"enable-entity-actions": "",
|
|
4890
4886
|
"error-message": v.value,
|
|
4891
|
-
fetcher: g(
|
|
4887
|
+
fetcher: g(E),
|
|
4892
4888
|
"fetcher-cache-key": s.value,
|
|
4893
4889
|
"pagination-type": "offset",
|
|
4894
4890
|
"preferences-storage-key": p.value,
|
|
@@ -5042,7 +5038,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5042
5038
|
"entity-type": g(wn).ConsumerGroup,
|
|
5043
5039
|
error: te.value,
|
|
5044
5040
|
title: g(i)("consumer_groups.delete.title"),
|
|
5045
|
-
visible:
|
|
5041
|
+
visible: M.value,
|
|
5046
5042
|
onCancel: bt,
|
|
5047
5043
|
onProceed: it
|
|
5048
5044
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
@@ -5112,7 +5108,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5112
5108
|
emits: ["update", "error", "loading"],
|
|
5113
5109
|
setup(e, { emit: t }) {
|
|
5114
5110
|
var it, Le, Ze;
|
|
5115
|
-
const n = e, r = t, { i18n: { t: a } } = yt.useI18n(), i =
|
|
5111
|
+
const n = e, r = t, { i18n: { t: a } } = yt.useI18n(), i = Ot(), o = zt({
|
|
5116
5112
|
fields: {
|
|
5117
5113
|
name: "",
|
|
5118
5114
|
tags: "",
|
|
@@ -5130,10 +5126,10 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5130
5126
|
error: p,
|
|
5131
5127
|
loadItems: c,
|
|
5132
5128
|
results: y
|
|
5133
|
-
} = vr(n.config, (Le =
|
|
5129
|
+
} = vr(n.config, (Le = Oe.form[(it = n.config) == null ? void 0 : it.app]) == null ? void 0 : Le.consumersList, "", {
|
|
5134
5130
|
fetchedItemsKey: "data",
|
|
5135
5131
|
searchKeys: ["username", "custom_id", "id"]
|
|
5136
|
-
}), { axiosInstance: f } = Ut((Ze = n.config) == null ? void 0 : Ze.axiosRequestConfig), { getMessageFromError: _ } = Ls(),
|
|
5132
|
+
}), { axiosInstance: f } = Ut((Ze = n.config) == null ? void 0 : Ze.axiosRequestConfig), { getMessageFromError: _ } = Ls(), F = Rs(), k = w(() => y.value.map((b) => ({
|
|
5137
5133
|
label: b.username || b.custom_id,
|
|
5138
5134
|
value: b.id,
|
|
5139
5135
|
selected: o.fields.consumers.includes(b.id),
|
|
@@ -5141,10 +5137,10 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5141
5137
|
// we need this to determine whether or not to show the description text
|
|
5142
5138
|
}))), L = w(() => {
|
|
5143
5139
|
var b, P;
|
|
5144
|
-
return (P =
|
|
5145
|
-
}), T = w(() => n.consumerGroupId ? ut.Edit : ut.Create),
|
|
5140
|
+
return (P = Oe.form[(b = n.config) == null ? void 0 : b.app]) == null ? void 0 : P.edit;
|
|
5141
|
+
}), T = w(() => n.consumerGroupId ? ut.Edit : ut.Create), E = w(() => !!o.fields.name && !V.value), x = w(() => JSON.stringify(o.fields) !== JSON.stringify(l)), S = (b, P = "", ae = "") => {
|
|
5146
5142
|
var H, me, ke, se, Ue, Qe;
|
|
5147
|
-
let D = `${(H = n.config) == null ? void 0 : H.apiBaseUrl}${
|
|
5143
|
+
let D = `${(H = n.config) == null ? void 0 : H.apiBaseUrl}${Oe.form[(me = n.config) == null ? void 0 : me.app][b]}`;
|
|
5148
5144
|
return ((ke = n.config) == null ? void 0 : ke.app) === "konnect" ? D = D.replace(/{controlPlaneId}/gi, ((se = n.config) == null ? void 0 : se.controlPlaneId) || "") : ((Ue = n.config) == null ? void 0 : Ue.app) === "kongManager" && (D = D.replace(/\/{workspace}/gi, (Qe = n.config) != null && Qe.workspace ? `/${n.config.workspace}` : "")), D = D.replace(/{id}/gi, P || n.consumerGroupId), (b === "addConsumer" || b === "removeConsumer") && (D = D.replace(/{consumerId}/gi, ae)), D;
|
|
5149
5145
|
}, d = () => {
|
|
5150
5146
|
var b;
|
|
@@ -5164,22 +5160,22 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5164
5160
|
const { data: se } = await f.get(S("getConsumers"));
|
|
5165
5161
|
o.fields.consumers = "consumers" in se ? (ke = se == null ? void 0 : se.consumers) == null ? void 0 : ke.map((Ue) => Ue.id) : [];
|
|
5166
5162
|
} catch (se) {
|
|
5167
|
-
|
|
5163
|
+
M(se);
|
|
5168
5164
|
}
|
|
5169
5165
|
Object.assign(l, o.fields);
|
|
5170
|
-
}, V = w(() =>
|
|
5166
|
+
}, V = w(() => F.utf8Name(o.fields.name)), R = w(() => {
|
|
5171
5167
|
var b, P;
|
|
5172
5168
|
return {
|
|
5173
5169
|
name: o.fields.name,
|
|
5174
5170
|
tags: (P = (b = o.fields.tags.split(",")) == null ? void 0 : b.map((ae) => String(ae || "").trim())) == null ? void 0 : P.filter((ae) => ae !== "")
|
|
5175
5171
|
};
|
|
5176
|
-
}), C = async (b, P = "") => await f.post(S("addConsumer", P, b), { consumer: b }), K = async (b, P = "") => await f.delete(S("removeConsumer", P, b)),
|
|
5172
|
+
}), C = async (b, P = "") => await f.post(S("addConsumer", P, b), { consumer: b }), K = async (b, P = "") => await f.delete(S("removeConsumer", P, b)), M = (b) => {
|
|
5177
5173
|
o.errorMessage = _(b), r("error", b);
|
|
5178
5174
|
}, J = (b = n.consumerGroupId) => {
|
|
5179
5175
|
Object.assign(l, o.fields), r("update", { ...o.fields, id: b });
|
|
5180
5176
|
}, te = (b, P, ae = n.consumerGroupId) => {
|
|
5181
5177
|
const D = b == null ? void 0 : b.find((H) => H.status !== "fulfilled");
|
|
5182
|
-
D ?
|
|
5178
|
+
D ? M({
|
|
5183
5179
|
code: D.status,
|
|
5184
5180
|
message: P
|
|
5185
5181
|
}) : J(ae);
|
|
@@ -5189,14 +5185,14 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5189
5185
|
const { data: P } = await f.post(S("create"), R.value);
|
|
5190
5186
|
b = "item" in P ? P.item.id : P.id;
|
|
5191
5187
|
} catch (P) {
|
|
5192
|
-
|
|
5188
|
+
M(P);
|
|
5193
5189
|
}
|
|
5194
5190
|
if (o.fields.consumers.length > 0 && b)
|
|
5195
5191
|
try {
|
|
5196
5192
|
const P = o.fields.consumers.map((D) => C(D, b)), ae = await Promise.allSettled(P);
|
|
5197
5193
|
te(ae, a("consumer_groups.errors.add_consumer"), b);
|
|
5198
5194
|
} catch (P) {
|
|
5199
|
-
|
|
5195
|
+
M(P);
|
|
5200
5196
|
}
|
|
5201
5197
|
else o.fields.consumers.length === 0 && b && J(b);
|
|
5202
5198
|
}, Ye = async () => {
|
|
@@ -5204,7 +5200,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5204
5200
|
try {
|
|
5205
5201
|
((ae = n.config) == null ? void 0 : ae.app) === "konnect" ? await f.put(S("edit"), R.value) : await f.patch(S("edit"), R.value);
|
|
5206
5202
|
} catch (D) {
|
|
5207
|
-
|
|
5203
|
+
M(D);
|
|
5208
5204
|
}
|
|
5209
5205
|
const b = o.fields.consumers.filter((D) => !l.consumers.includes(D)), P = l.consumers.filter((D) => !o.fields.consumers.includes(D));
|
|
5210
5206
|
if (P.length === 0 && b.length === 0)
|
|
@@ -5215,14 +5211,14 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5215
5211
|
const D = P.map((me) => K(me)), H = await Promise.allSettled(D);
|
|
5216
5212
|
te(H, a("consumer_groups.errors.remove_consumer"));
|
|
5217
5213
|
} catch (D) {
|
|
5218
|
-
|
|
5214
|
+
M(D);
|
|
5219
5215
|
}
|
|
5220
5216
|
if (b.length > 0)
|
|
5221
5217
|
try {
|
|
5222
5218
|
const D = b.map((me) => C(me)), H = await Promise.allSettled(D);
|
|
5223
5219
|
te(H, a("consumer_groups.errors.add_consumer"));
|
|
5224
5220
|
} catch (D) {
|
|
5225
|
-
|
|
5221
|
+
M(D);
|
|
5226
5222
|
}
|
|
5227
5223
|
}
|
|
5228
5224
|
}, bt = async () => {
|
|
@@ -5238,7 +5234,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5238
5234
|
const ae = z("KInput"), D = z("KMultiselect");
|
|
5239
5235
|
return m(), $("div", Zs, [
|
|
5240
5236
|
N(g(Ql), {
|
|
5241
|
-
"can-submit":
|
|
5237
|
+
"can-submit": E.value && x.value,
|
|
5242
5238
|
config: e.config,
|
|
5243
5239
|
"edit-id": e.consumerGroupId,
|
|
5244
5240
|
"error-message": o.errorMessage || g(p) || V.value,
|
|
@@ -5351,7 +5347,7 @@ const Ms = ["aria-labelledby"], Os = { class: "form-section-wrapper" }, Fs = {
|
|
|
5351
5347
|
},
|
|
5352
5348
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
5353
5349
|
setup(e) {
|
|
5354
|
-
const t = e, { i18n: { t: n } } = yt.useI18n(), r = w(() =>
|
|
5350
|
+
const t = e, { i18n: { t: n } } = yt.useI18n(), r = w(() => Oe.form[t.config.app].edit), a = O({
|
|
5355
5351
|
id: {},
|
|
5356
5352
|
name: {},
|
|
5357
5353
|
created_at: {},
|