@kong-ui-public/entities-consumers 2.0.2-pr.933.d9547822.0 → 2.0.2
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.
|
@@ -458,7 +458,7 @@ function Pr(e) {
|
|
|
458
458
|
const n = window.location.origin, t = n.endsWith("/") ? n : `${n}/`;
|
|
459
459
|
try {
|
|
460
460
|
const r = e.join("/"), a = `${t}${r}`, o = e.some((i) => i.trim() === "");
|
|
461
|
-
if (
|
|
461
|
+
if (!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(a) && !o && new URL(a))
|
|
462
462
|
return `${t}${r}`;
|
|
463
463
|
throw new Error("Invalid url");
|
|
464
464
|
} catch (r) {
|
|
@@ -558,7 +558,7 @@ const gn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
558
558
|
const t = Kt(e), r = Kt(n), a = t.pop(), o = r.pop(), i = Lt(t, r);
|
|
559
559
|
return i !== 0 ? i : a && o ? Lt(a.split("."), o.split(".")) : a || o ? a ? -1 : 1 : 0;
|
|
560
560
|
}, Pt = (e, n, t) => {
|
|
561
|
-
|
|
561
|
+
zr(t);
|
|
562
562
|
const r = Gr(e, n);
|
|
563
563
|
return yn[t].includes(r);
|
|
564
564
|
}, yn = {
|
|
@@ -568,18 +568,18 @@ const gn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
568
568
|
"<=": [-1, 0],
|
|
569
569
|
"<": [-1],
|
|
570
570
|
"!=": [-1, 1]
|
|
571
|
-
}, Vt = Object.keys(yn),
|
|
571
|
+
}, Vt = Object.keys(yn), zr = (e) => {
|
|
572
572
|
if (typeof e != "string")
|
|
573
573
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
574
574
|
if (Vt.indexOf(e) === -1)
|
|
575
575
|
throw new Error(`Invalid operator, expected one of ${Vt.join("|")}`);
|
|
576
|
-
},
|
|
576
|
+
}, Hr = (e) => typeof e == "string" && /^[v\d]/.test(e) && gn.test(e);
|
|
577
577
|
function Jr(e) {
|
|
578
578
|
const { gatewayInfo: n, supportedRange: t } = e;
|
|
579
579
|
if (!n)
|
|
580
580
|
return !0;
|
|
581
581
|
const { edition: r, version: a } = n;
|
|
582
|
-
if (!
|
|
582
|
+
if (!Hr(a))
|
|
583
583
|
return console.error("Invalid version"), !1;
|
|
584
584
|
const o = t[r];
|
|
585
585
|
if (!o)
|
|
@@ -1314,7 +1314,7 @@ function Ga(e, n) {
|
|
|
1314
1314
|
`;
|
|
1315
1315
|
return s.replace(/\n$/, "");
|
|
1316
1316
|
}
|
|
1317
|
-
var
|
|
1317
|
+
var za = Ga, Ha = [
|
|
1318
1318
|
"kind",
|
|
1319
1319
|
"multi",
|
|
1320
1320
|
"resolve",
|
|
@@ -1340,7 +1340,7 @@ function Ya(e) {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
function Wa(e, n) {
|
|
1342
1342
|
if (n = n || {}, Object.keys(n).forEach(function(t) {
|
|
1343
|
-
if (
|
|
1343
|
+
if (Ha.indexOf(t) === -1)
|
|
1344
1344
|
throw new se('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1345
1345
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1346
1346
|
return !0;
|
|
@@ -1812,8 +1812,8 @@ var Ln = new oe("tag:yaml.org,2002:set", {
|
|
|
1812
1812
|
qn,
|
|
1813
1813
|
Ln
|
|
1814
1814
|
]
|
|
1815
|
-
}), ke = Object.prototype.hasOwnProperty,
|
|
1816
|
-
function
|
|
1815
|
+
}), ke = Object.prototype.hasOwnProperty, ze = 1, Pn = 2, Vn = 3, He = 4, st = 1, Fo = 2, Gt = 3, Ko = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Bo = /[\x85\u2028\u2029]/, qo = /[,\[\]\{\}]/, Rn = /^(?:!|!!|![a-z\-]+!)$/i, Un = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1816
|
+
function zt(e) {
|
|
1817
1817
|
return Object.prototype.toString.call(e);
|
|
1818
1818
|
}
|
|
1819
1819
|
function ge(e) {
|
|
@@ -1838,7 +1838,7 @@ function Po(e) {
|
|
|
1838
1838
|
function Vo(e) {
|
|
1839
1839
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Ht(e) {
|
|
1842
1842
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1843
1843
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1844
1844
|
}
|
|
@@ -1850,11 +1850,11 @@ function Ro(e) {
|
|
|
1850
1850
|
}
|
|
1851
1851
|
var Dn = new Array(256), Gn = new Array(256);
|
|
1852
1852
|
for (var je = 0; je < 256; je++)
|
|
1853
|
-
Dn[je] =
|
|
1853
|
+
Dn[je] = Ht(je) ? 1 : 0, Gn[je] = Ht(je);
|
|
1854
1854
|
function Uo(e, n) {
|
|
1855
1855
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || kt, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.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 = [];
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function zn(e, n) {
|
|
1858
1858
|
var t = {
|
|
1859
1859
|
name: e.filename,
|
|
1860
1860
|
buffer: e.input.slice(0, -1),
|
|
@@ -1863,13 +1863,13 @@ function Hn(e, n) {
|
|
|
1863
1863
|
line: e.line,
|
|
1864
1864
|
column: e.position - e.lineStart
|
|
1865
1865
|
};
|
|
1866
|
-
return t.snippet =
|
|
1866
|
+
return t.snippet = za(t), new se(n, t);
|
|
1867
1867
|
}
|
|
1868
1868
|
function j(e, n) {
|
|
1869
|
-
throw
|
|
1869
|
+
throw zn(e, n);
|
|
1870
1870
|
}
|
|
1871
1871
|
function Je(e, n) {
|
|
1872
|
-
e.onWarning && e.onWarning.call(null,
|
|
1872
|
+
e.onWarning && e.onWarning.call(null, zn(e, n));
|
|
1873
1873
|
}
|
|
1874
1874
|
var Jt = {
|
|
1875
1875
|
YAML: function(e, n, t) {
|
|
@@ -1907,8 +1907,8 @@ function Ee(e, n, t, r, a, o, i, s, l) {
|
|
|
1907
1907
|
var c, d;
|
|
1908
1908
|
if (Array.isArray(a))
|
|
1909
1909
|
for (a = Array.prototype.slice.call(a), c = 0, d = a.length; c < d; c += 1)
|
|
1910
|
-
Array.isArray(a[c]) && j(e, "nested arrays are not supported inside keys"), typeof a == "object" &&
|
|
1911
|
-
if (typeof a == "object" &&
|
|
1910
|
+
Array.isArray(a[c]) && j(e, "nested arrays are not supported inside keys"), typeof a == "object" && zt(a[c]) === "[object Object]" && (a[c] = "[object Object]");
|
|
1911
|
+
if (typeof a == "object" && zt(a) === "[object Object]" && (a = "[object Object]"), a = String(a), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
|
|
1912
1912
|
if (Array.isArray(o))
|
|
1913
1913
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
1914
1914
|
Yt(e, n, o[c], t);
|
|
@@ -1992,7 +1992,7 @@ function Go(e, n) {
|
|
|
1992
1992
|
ge(t) ? (Ce(e, r, a, !0), _t(e, te(e, !1, n)), r = a = e.position) : e.position === e.lineStart && et(e) ? j(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1993
1993
|
j(e, "unexpected end of the stream within a single quoted scalar");
|
|
1994
1994
|
}
|
|
1995
|
-
function
|
|
1995
|
+
function zo(e, n) {
|
|
1996
1996
|
var t, r, a, o, i, s;
|
|
1997
1997
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1998
1998
|
return !1;
|
|
@@ -2016,7 +2016,7 @@ function Ho(e, n) {
|
|
|
2016
2016
|
}
|
|
2017
2017
|
j(e, "unexpected end of the stream within a double quoted scalar");
|
|
2018
2018
|
}
|
|
2019
|
-
function
|
|
2019
|
+
function Ho(e, n) {
|
|
2020
2020
|
var t = !0, r, a, o, i = e.tag, s, l = e.anchor, c, d, u, h, f, I = /* @__PURE__ */ Object.create(null), b, p, A, w;
|
|
2021
2021
|
if (w = e.input.charCodeAt(e.position), w === 91)
|
|
2022
2022
|
d = 93, f = !1, s = [];
|
|
@@ -2027,7 +2027,7 @@ function zo(e, n) {
|
|
|
2027
2027
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), w = e.input.charCodeAt(++e.position); w !== 0; ) {
|
|
2028
2028
|
if (te(e, !0, n), w = e.input.charCodeAt(e.position), w === d)
|
|
2029
2029
|
return e.position++, e.tag = i, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2030
|
-
t ? w === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), p = b = A = null, u = h = !1, w === 63 && (c = e.input.charCodeAt(e.position + 1), de(c) && (u = h = !0, e.position++, te(e, !0, n))), r = e.line, a = e.lineStart, o = e.position, Fe(e, n,
|
|
2030
|
+
t ? w === 44 && j(e, "expected the node content, but found ','") : j(e, "missed comma between flow collection entries"), p = b = A = null, u = h = !1, w === 63 && (c = e.input.charCodeAt(e.position + 1), de(c) && (u = h = !0, e.position++, te(e, !0, n))), r = e.line, a = e.lineStart, o = e.position, Fe(e, n, ze, !1, !0), p = e.tag, b = e.result, te(e, !0, n), w = e.input.charCodeAt(e.position), (h || e.line === r) && w === 58 && (u = !0, w = e.input.charCodeAt(++e.position), te(e, !0, n), Fe(e, n, ze, !1, !0), A = e.result), f ? Ee(e, s, I, p, b, A, r, a, o) : u ? s.push(Ee(e, null, I, p, b, A, r, a, o)) : s.push(b), te(e, !0, n), w = e.input.charCodeAt(e.position), w === 44 ? (t = !0, w = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2031
2031
|
}
|
|
2032
2032
|
j(e, "unexpected end of the stream within a flow collection");
|
|
2033
2033
|
}
|
|
@@ -2118,7 +2118,7 @@ function Yo(e, n, t) {
|
|
|
2118
2118
|
else
|
|
2119
2119
|
return e.tag = c, e.anchor = d, !0;
|
|
2120
2120
|
}
|
|
2121
|
-
if ((e.line === o || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Fe(e, n,
|
|
2121
|
+
if ((e.line === o || e.lineIndent > n) && (p && (i = e.line, s = e.lineStart, l = e.position), Fe(e, n, He, !0, a) && (p ? I = e.result : b = e.result), p || (Ee(e, u, h, f, I, b, i, s, l), f = I = b = null), te(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && w !== 0)
|
|
2122
2122
|
j(e, "bad indentation of a mapping entry");
|
|
2123
2123
|
else if (e.lineIndent < n)
|
|
2124
2124
|
break;
|
|
@@ -2165,10 +2165,10 @@ function Xo(e) {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
function Fe(e, n, t, r, a) {
|
|
2167
2167
|
var o, i, s, l = 1, c = !1, d = !1, u, h, f, I, b, p;
|
|
2168
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = s =
|
|
2168
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = s = He === t || Vn === t, r && te(e, !0, -1) && (c = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2169
2169
|
for (; Wo(e) || Zo(e); )
|
|
2170
2170
|
te(e, !0, -1) ? (c = !0, s = o, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2171
|
-
if (s && (s = c || a), (l === 1 ||
|
|
2171
|
+
if (s && (s = c || a), (l === 1 || He === t) && (ze === t || Pn === t ? b = n : b = n + 1, p = e.position - e.lineStart, l === 1 ? s && (Wt(e, p) || Yo(e, p, b)) || Ho(e, b) ? d = !0 : (i && Jo(e, b) || Go(e, b) || zo(e, b) ? d = !0 : Xo(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && j(e, "alias node should not have any properties")) : Do(e, b, ze === t) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Wt(e, p))), e.tag === null)
|
|
2172
2172
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2173
2173
|
else if (e.tag === "?") {
|
|
2174
2174
|
for (e.result !== null && e.kind !== "scalar" && j(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, h = e.implicitTypes.length; u < h; u += 1)
|
|
@@ -2211,7 +2211,7 @@ function Qo(e) {
|
|
|
2211
2211
|
}
|
|
2212
2212
|
i !== 0 && wt(e), ke.call(Jt, r) ? Jt[r](e, r, a) : Je(e, 'unknown document directive "' + r + '"');
|
|
2213
2213
|
}
|
|
2214
|
-
if (te(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, te(e, !0, -1)) : o && j(e, "directives end mark is expected"), Fe(e, e.lineIndent - 1,
|
|
2214
|
+
if (te(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, te(e, !0, -1)) : o && j(e, "directives end mark is expected"), Fe(e, e.lineIndent - 1, He, !1, !0), te(e, !0, -1), e.checkLineBreaks && Bo.test(e.input.slice(n, e.position)) && Je(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && et(e)) {
|
|
2215
2215
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, te(e, !0, -1));
|
|
2216
2216
|
return;
|
|
2217
2217
|
}
|
|
@@ -2220,7 +2220,7 @@ function Qo(e) {
|
|
|
2220
2220
|
else
|
|
2221
2221
|
return;
|
|
2222
2222
|
}
|
|
2223
|
-
function
|
|
2223
|
+
function Hn(e, n) {
|
|
2224
2224
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2225
2225
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2226
2226
|
var t = new Uo(e, n), r = e.indexOf("\0");
|
|
@@ -2232,14 +2232,14 @@ function zn(e, n) {
|
|
|
2232
2232
|
}
|
|
2233
2233
|
function ei(e, n, t) {
|
|
2234
2234
|
n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
|
|
2235
|
-
var r =
|
|
2235
|
+
var r = Hn(e, t);
|
|
2236
2236
|
if (typeof n != "function")
|
|
2237
2237
|
return r;
|
|
2238
2238
|
for (var a = 0, o = r.length; a < o; a += 1)
|
|
2239
2239
|
n(r[a]);
|
|
2240
2240
|
}
|
|
2241
2241
|
function ti(e, n) {
|
|
2242
|
-
var t =
|
|
2242
|
+
var t = Hn(e, n);
|
|
2243
2243
|
if (t.length !== 0) {
|
|
2244
2244
|
if (t.length === 1)
|
|
2245
2245
|
return t[0];
|
|
@@ -2561,7 +2561,7 @@ function At(e, n) {
|
|
|
2561
2561
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2562
2562
|
};
|
|
2563
2563
|
}
|
|
2564
|
-
var Pi = oe, Vi = kn, Ri = An, Ui = jn, Di = Mn, Gi = kt,
|
|
2564
|
+
var Pi = oe, Vi = kn, Ri = An, Ui = jn, Di = Mn, Gi = kt, zi = Jn.load, Hi = Jn.loadAll, Ji = Li.dump, Yi = se, Wi = {
|
|
2565
2565
|
binary: Kn,
|
|
2566
2566
|
float: $n,
|
|
2567
2567
|
map: In,
|
|
@@ -2582,8 +2582,8 @@ var Pi = oe, Vi = kn, Ri = An, Ui = jn, Di = Mn, Gi = kt, Hi = Jn.load, zi = Jn.
|
|
|
2582
2582
|
JSON_SCHEMA: Ui,
|
|
2583
2583
|
CORE_SCHEMA: Di,
|
|
2584
2584
|
DEFAULT_SCHEMA: Gi,
|
|
2585
|
-
load:
|
|
2586
|
-
loadAll:
|
|
2585
|
+
load: zi,
|
|
2586
|
+
loadAll: Hi,
|
|
2587
2587
|
dump: Ji,
|
|
2588
2588
|
YAMLException: Yi,
|
|
2589
2589
|
types: Wi,
|
|
@@ -2940,10 +2940,10 @@ const ts = {
|
|
|
2940
2940
|
return F[1] - L[1];
|
|
2941
2941
|
}), q.map((F) => {
|
|
2942
2942
|
var L, D;
|
|
2943
|
-
const Z = F[0],
|
|
2943
|
+
const Z = F[0], z = (L = p.value) == null ? void 0 : L[Z], X = ((D = r.configSchema) == null ? void 0 : D[Z]) || {}, le = h[Z];
|
|
2944
2944
|
return {
|
|
2945
2945
|
key: Z,
|
|
2946
|
-
value:
|
|
2946
|
+
value: z,
|
|
2947
2947
|
hidden: X.hidden || !1,
|
|
2948
2948
|
type: X.type ?? ((le == null ? void 0 : le.type) || Q.Text),
|
|
2949
2949
|
label: X.label ?? ((le == null ? void 0 : le.label) || s(Z)),
|
|
@@ -2965,14 +2965,14 @@ const ts = {
|
|
|
2965
2965
|
return F[1] - L[1];
|
|
2966
2966
|
}), _.map((F) => {
|
|
2967
2967
|
var L;
|
|
2968
|
-
const D = F[0], Z = B[D],
|
|
2968
|
+
const D = F[0], Z = B[D], z = ((L = r.pluginConfigSchema) == null ? void 0 : L[D]) || {};
|
|
2969
2969
|
return {
|
|
2970
2970
|
key: D,
|
|
2971
2971
|
value: Z,
|
|
2972
|
-
hidden:
|
|
2973
|
-
type:
|
|
2974
|
-
label:
|
|
2975
|
-
tooltip:
|
|
2972
|
+
hidden: z.hidden || !1,
|
|
2973
|
+
type: z.type ?? Q.Text,
|
|
2974
|
+
label: z.label ?? s(D),
|
|
2975
|
+
tooltip: z.tooltip ?? void 0,
|
|
2976
2976
|
section: ue.Plugin
|
|
2977
2977
|
};
|
|
2978
2978
|
}).filter((F) => !F.hidden);
|
|
@@ -3056,12 +3056,12 @@ const ts = {
|
|
|
3056
3056
|
_: 1
|
|
3057
3057
|
})) : G("", !0),
|
|
3058
3058
|
e.config.jsonYamlEnabled ? G("", !0) : (m(), U(F, { key: 3 }, {
|
|
3059
|
-
default: y(({ copyToClipboard:
|
|
3059
|
+
default: y(({ copyToClipboard: z }) => [
|
|
3060
3060
|
!f.value && !I.value ? (m(), U(_, {
|
|
3061
3061
|
key: 0,
|
|
3062
3062
|
appearance: "tertiary",
|
|
3063
3063
|
"data-testid": "json-copy-button",
|
|
3064
|
-
onClick: (X) => R(
|
|
3064
|
+
onClick: (X) => R(z)
|
|
3065
3065
|
}, {
|
|
3066
3066
|
default: y(() => [
|
|
3067
3067
|
W($(g(o)("baseConfigCard.actions.copy")), 1)
|
|
@@ -3096,10 +3096,10 @@ const ts = {
|
|
|
3096
3096
|
"property-collections": k.value,
|
|
3097
3097
|
record: p.value
|
|
3098
3098
|
}, be({ _: 2 }, [
|
|
3099
|
-
ce(Object.keys(v.$slots), (
|
|
3100
|
-
name:
|
|
3099
|
+
ce(Object.keys(v.$slots), (z) => ({
|
|
3100
|
+
name: z,
|
|
3101
3101
|
fn: y(({ row: X, rowValue: le }) => [
|
|
3102
|
-
Y(v.$slots,
|
|
3102
|
+
Y(v.$slots, z, {
|
|
3103
3103
|
row: X,
|
|
3104
3104
|
rowValue: le
|
|
3105
3105
|
}, void 0, !0)
|
|
@@ -3107,13 +3107,13 @@ const ts = {
|
|
|
3107
3107
|
}))
|
|
3108
3108
|
]), 1032, ["format", "prop-list-types", "property-collections", "record"])
|
|
3109
3109
|
])) : (m(), T("div", bs, [
|
|
3110
|
-
(m(!0), T(pe, null, ce(S.value, (
|
|
3111
|
-
key: `config-card-details-${
|
|
3112
|
-
class: Ae(`config-card-details-${
|
|
3113
|
-
"data-testid": `config-card-details-${
|
|
3110
|
+
(m(!0), T(pe, null, ce(S.value, (z) => (m(), T("div", {
|
|
3111
|
+
key: `config-card-details-${z}-props`,
|
|
3112
|
+
class: Ae(`config-card-details-${z}-props`),
|
|
3113
|
+
"data-testid": `config-card-details-${z}-props`
|
|
3114
3114
|
}, [
|
|
3115
|
-
|
|
3116
|
-
(m(!0), T(pe, null, ce(k.value[
|
|
3115
|
+
z !== "basic" ? (m(), T("div", ks, $(z === "advanced" ? g(o)("baseConfigCard.sections.advanced") : g(o)("baseConfigCard.sections.plugin")), 1)) : G("", !0),
|
|
3116
|
+
(m(!0), T(pe, null, ce(k.value[z], (X) => (m(), U(bt, {
|
|
3117
3117
|
key: X.key,
|
|
3118
3118
|
item: X
|
|
3119
3119
|
}, be({
|
|
@@ -3787,7 +3787,7 @@ const ts = {
|
|
|
3787
3787
|
}), Gs = {
|
|
3788
3788
|
key: 1,
|
|
3789
3789
|
class: "kong-ui-entity-filter"
|
|
3790
|
-
},
|
|
3790
|
+
}, zs = { class: "menu-item-title" }, Hs = { class: "menu-item-indicator" }, Js = { class: "menu-item-body" }, Ys = ["for"], Ws = { class: "menu-item-buttons" }, Zs = { class: "filter-clear-button-container" }, Xs = /* @__PURE__ */ ee({
|
|
3791
3791
|
__name: "EntityFilter",
|
|
3792
3792
|
props: {
|
|
3793
3793
|
// filter config, either exact match or fuzzy match
|
|
@@ -3890,9 +3890,9 @@ const ts = {
|
|
|
3890
3890
|
"last-menu-item": v === s.value.length - 1
|
|
3891
3891
|
}, {
|
|
3892
3892
|
itemTitle: y(() => [
|
|
3893
|
-
K("span",
|
|
3893
|
+
K("span", zs, [
|
|
3894
3894
|
W($(R.label) + " ", 1),
|
|
3895
|
-
Ue(K("span",
|
|
3895
|
+
Ue(K("span", Hs, null, 512), [
|
|
3896
3896
|
[De, i.value.includes(R.value)]
|
|
3897
3897
|
])
|
|
3898
3898
|
])
|
|
@@ -4173,7 +4173,7 @@ const dl = { class: "add-consumer-form-container" }, pl = { class: "add-consumer
|
|
|
4173
4173
|
K("p", pl, $(g(r)("consumers.consumer_groups.add.ctaText")), 1),
|
|
4174
4174
|
E(L, {
|
|
4175
4175
|
modelValue: o.value,
|
|
4176
|
-
"onUpdate:modelValue": F[0] || (F[0] = (
|
|
4176
|
+
"onUpdate:modelValue": F[0] || (F[0] = (z) => o.value = z),
|
|
4177
4177
|
autosuggest: "",
|
|
4178
4178
|
"data-testid": "add-consumers-multiselect",
|
|
4179
4179
|
"dropdown-footer-text": b.value ? g(r)("consumers.consumer_groups.add.footer") : void 0,
|
|
@@ -4186,9 +4186,9 @@ const dl = { class: "add-consumer-form-container" }, pl = { class: "add-consumer
|
|
|
4186
4186
|
width: "100%",
|
|
4187
4187
|
onQueryChange: g(i)
|
|
4188
4188
|
}, {
|
|
4189
|
-
"item-template": y(({ item:
|
|
4190
|
-
K("div", fl, $(
|
|
4191
|
-
h(
|
|
4189
|
+
"item-template": y(({ item: z }) => [
|
|
4190
|
+
K("div", fl, $(z.label), 1),
|
|
4191
|
+
h(z).data.username && h(z).data.custom_id ? (m(), T("div", ml, $(h(z).data.custom_id), 1)) : G("", !0)
|
|
4192
4192
|
]),
|
|
4193
4193
|
_: 1
|
|
4194
4194
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
@@ -4197,7 +4197,7 @@ const dl = { class: "add-consumer-form-container" }, pl = { class: "add-consumer
|
|
|
4197
4197
|
alertMessage: y(() => [
|
|
4198
4198
|
K("p", null, $(g(r)("consumers.errors.add")), 1),
|
|
4199
4199
|
C.value.length ? (m(), T("ul", yl, [
|
|
4200
|
-
(m(!0), T(pe, null, ce(C.value, (
|
|
4200
|
+
(m(!0), T(pe, null, ce(C.value, (z, X) => (m(), T("li", { key: X }, $(z), 1))), 128))
|
|
4201
4201
|
])) : G("", !0),
|
|
4202
4202
|
K("div", null, $(x.value || f.value), 1)
|
|
4203
4203
|
]),
|
|
@@ -4267,9 +4267,9 @@ const xt = (e, n) => {
|
|
|
4267
4267
|
}, u = d, h = (O) => ({
|
|
4268
4268
|
"data-testid": O.username ?? O.custom_id ?? O.id
|
|
4269
4269
|
}), f = M(() => {
|
|
4270
|
-
var
|
|
4270
|
+
var H, re, fe, we;
|
|
4271
4271
|
let O = `${t.config.apiBaseUrl}${Se.list[t.config.app][l.value ? "forConsumerGroup" : "all"]}`;
|
|
4272
|
-
return t.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((
|
|
4272
|
+
return t.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((re = t.config) == null ? void 0 : re.consumerGroupId) || "") : t.config.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, (fe = t.config) != null && fe.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((we = t.config) == null ? void 0 : we.consumerGroupId) || "")), O;
|
|
4273
4273
|
}), I = N(""), b = M(() => {
|
|
4274
4274
|
const O = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4275
4275
|
return O ? {
|
|
@@ -4287,9 +4287,9 @@ const xt = (e, n) => {
|
|
|
4287
4287
|
I.value = "";
|
|
4288
4288
|
}, S = () => {
|
|
4289
4289
|
s.value++;
|
|
4290
|
-
}, x = (O) => O ?? "-", P = N(""), R = (O,
|
|
4290
|
+
}, x = (O) => O ?? "-", P = N(""), R = (O, H) => {
|
|
4291
4291
|
const re = O.id;
|
|
4292
|
-
if (!
|
|
4292
|
+
if (!H(re)) {
|
|
4293
4293
|
n("copy:error", {
|
|
4294
4294
|
entity: O,
|
|
4295
4295
|
field: "id",
|
|
@@ -4302,9 +4302,9 @@ const xt = (e, n) => {
|
|
|
4302
4302
|
field: "id",
|
|
4303
4303
|
message: a("consumers.copy.success", { val: re })
|
|
4304
4304
|
});
|
|
4305
|
-
}, v = (O,
|
|
4305
|
+
}, v = (O, H) => {
|
|
4306
4306
|
const re = JSON.stringify(O);
|
|
4307
|
-
if (!
|
|
4307
|
+
if (!H(re)) {
|
|
4308
4308
|
n("copy:error", {
|
|
4309
4309
|
entity: O,
|
|
4310
4310
|
message: a("consumers.errors.copy")
|
|
@@ -4324,18 +4324,18 @@ const xt = (e, n) => {
|
|
|
4324
4324
|
}), q = (O) => ({
|
|
4325
4325
|
label: a("consumers.actions.edit"),
|
|
4326
4326
|
to: t.config.getEditRoute(O)
|
|
4327
|
-
}), _ = N(void 0), F = N(!1), L = N(!1), D = N(""), Z = sl(t.config, f.value),
|
|
4327
|
+
}), _ = N(void 0), F = N(!1), L = N(!1), D = N(""), Z = sl(t.config, f.value), z = (O) => {
|
|
4328
4328
|
_.value = O, F.value = !0;
|
|
4329
4329
|
}, X = () => {
|
|
4330
4330
|
F.value = !1;
|
|
4331
4331
|
}, le = async () => {
|
|
4332
|
-
var O,
|
|
4332
|
+
var O, H, re;
|
|
4333
4333
|
if ((O = _.value) != null && O.id) {
|
|
4334
4334
|
L.value = !0;
|
|
4335
4335
|
try {
|
|
4336
4336
|
await i.delete(Z(_.value.id)), L.value = !1, F.value = !1, s.value++, n("delete:success", _.value);
|
|
4337
4337
|
} catch (fe) {
|
|
4338
|
-
D.value = ((re = (
|
|
4338
|
+
D.value = ((re = (H = fe.response) == null ? void 0 : H.data) == null ? void 0 : re.message) || fe.message || a("consumers.errors.delete"), n("error", fe);
|
|
4339
4339
|
} finally {
|
|
4340
4340
|
L.value = !1;
|
|
4341
4341
|
}
|
|
@@ -4344,8 +4344,8 @@ const xt = (e, n) => {
|
|
|
4344
4344
|
tt.value = !0;
|
|
4345
4345
|
}, $t = () => {
|
|
4346
4346
|
tt.value = !1;
|
|
4347
|
-
}, jt = (O,
|
|
4348
|
-
|
|
4347
|
+
}, jt = (O, H) => {
|
|
4348
|
+
H || $t(), s.value++, n("add:success", O);
|
|
4349
4349
|
}, ir = () => {
|
|
4350
4350
|
l.value && Tt();
|
|
4351
4351
|
}, ye = N(void 0), nt = N(!1), sr = N(""), lr = (O) => {
|
|
@@ -4353,9 +4353,9 @@ const xt = (e, n) => {
|
|
|
4353
4353
|
}, Mt = () => {
|
|
4354
4354
|
nt.value = !1, ye.value = void 0;
|
|
4355
4355
|
}, ur = M(() => {
|
|
4356
|
-
var
|
|
4356
|
+
var H, re, fe, we;
|
|
4357
4357
|
let O = `${t.config.apiBaseUrl}${Se.list[t.config.app].oneForConsumerGroup}`;
|
|
4358
|
-
return t.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((
|
|
4358
|
+
return t.config.app === "konnect" ? O = O.replace(/{controlPlaneId}/gi, ((H = t.config) == null ? void 0 : H.controlPlaneId) || "").replace(/{consumerGroupId}/gi, ((re = t.config) == null ? void 0 : re.consumerGroupId) || "") : t.config.app === "kongManager" && (O = O.replace(/\/{workspace}/gi, (fe = t.config) != null && fe.workspace ? `/${t.config.workspace}` : "").replace(/{consumerGroupId}/gi, ((we = t.config) == null ? void 0 : we.consumerGroupId) || "")), O;
|
|
4359
4359
|
}), Ot = N(!1), cr = async () => {
|
|
4360
4360
|
if (ye.value) {
|
|
4361
4361
|
Ot.value = !0;
|
|
@@ -4384,7 +4384,7 @@ const xt = (e, n) => {
|
|
|
4384
4384
|
});
|
|
4385
4385
|
return Xe(async () => {
|
|
4386
4386
|
await t.canCreate() && (rt.value.title = l.value ? a("consumers.list.empty_state.title_for_consumer_group") : a("consumers.list.empty_state.title"), rt.value.ctaText = l.value ? a("consumers.actions.add_consumer") : a("consumers.actions.create"));
|
|
4387
|
-
}), (O,
|
|
4387
|
+
}), (O, H) => {
|
|
4388
4388
|
const re = V("KButton"), fe = V("KBadge"), we = V("KTruncate"), Ke = V("KDropdownItem"), Nt = V("KClipboardProvider"), dr = V("KPrompt");
|
|
4389
4389
|
return m(), T("div", bl, [
|
|
4390
4390
|
E(g(Fs), {
|
|
@@ -4403,7 +4403,7 @@ const xt = (e, n) => {
|
|
|
4403
4403
|
"row-attributes": h,
|
|
4404
4404
|
"table-headers": g(u),
|
|
4405
4405
|
onClearSearchInput: k,
|
|
4406
|
-
"onClick:row":
|
|
4406
|
+
"onClick:row": H[3] || (H[3] = (J) => C(J)),
|
|
4407
4407
|
onEmptyStateCtaClicked: ir,
|
|
4408
4408
|
onSort: S
|
|
4409
4409
|
}, {
|
|
@@ -4411,7 +4411,7 @@ const xt = (e, n) => {
|
|
|
4411
4411
|
l.value ? G("", !0) : (m(), U(g(Qs), {
|
|
4412
4412
|
key: 0,
|
|
4413
4413
|
modelValue: I.value,
|
|
4414
|
-
"onUpdate:modelValue":
|
|
4414
|
+
"onUpdate:modelValue": H[0] || (H[0] = (J) => I.value = J),
|
|
4415
4415
|
config: b.value
|
|
4416
4416
|
}, null, 8, ["modelValue", "config"]))
|
|
4417
4417
|
]),
|
|
@@ -4425,7 +4425,7 @@ const xt = (e, n) => {
|
|
|
4425
4425
|
"data-testid": "toolbar-add-consumer",
|
|
4426
4426
|
icon: "plus",
|
|
4427
4427
|
to: e.config.consumerGroupId ? void 0 : e.config.createRoute,
|
|
4428
|
-
onClick:
|
|
4428
|
+
onClick: H[1] || (H[1] = () => e.config.consumerGroupId ? Tt() : void 0)
|
|
4429
4429
|
}, {
|
|
4430
4430
|
default: y(() => [
|
|
4431
4431
|
W($(e.config.consumerGroupId ? g(a)("consumers.actions.add_consumer") : g(a)("consumers.list.toolbar_actions.new_consumer")), 1)
|
|
@@ -4447,7 +4447,7 @@ const xt = (e, n) => {
|
|
|
4447
4447
|
default: y(() => [
|
|
4448
4448
|
(m(!0), T(pe, null, ce(J, (xe) => (m(), U(fe, {
|
|
4449
4449
|
key: xe,
|
|
4450
|
-
onClick:
|
|
4450
|
+
onClick: H[2] || (H[2] = Ge(() => {
|
|
4451
4451
|
}, ["stop"]))
|
|
4452
4452
|
}, {
|
|
4453
4453
|
default: y(() => [
|
|
@@ -4519,7 +4519,7 @@ const xt = (e, n) => {
|
|
|
4519
4519
|
danger: "",
|
|
4520
4520
|
"data-testid": "action-entity-delete",
|
|
4521
4521
|
"has-divider": "",
|
|
4522
|
-
onClick: () => e.config.consumerGroupId ? lr(J) :
|
|
4522
|
+
onClick: () => e.config.consumerGroupId ? lr(J) : z(J)
|
|
4523
4523
|
}, {
|
|
4524
4524
|
default: y(() => [
|
|
4525
4525
|
W($(e.config.consumerGroupId ? g(a)("consumers.actions.remove") : g(a)("consumers.actions.delete")), 1)
|
|
@@ -4549,8 +4549,8 @@ const xt = (e, n) => {
|
|
|
4549
4549
|
config: e.config,
|
|
4550
4550
|
"data-testid": "add-consumer-modal",
|
|
4551
4551
|
visible: tt.value,
|
|
4552
|
-
"onAdd:partialSuccess":
|
|
4553
|
-
"onAdd:success":
|
|
4552
|
+
"onAdd:partialSuccess": H[4] || (H[4] = (J) => jt(J, !0)),
|
|
4553
|
+
"onAdd:success": H[5] || (H[5] = (J) => jt(J)),
|
|
4554
4554
|
onCancel: $t
|
|
4555
4555
|
}, null, 8, ["config", "visible"])) : G("", !0),
|
|
4556
4556
|
e.config.consumerGroupId && ye.value ? (m(), U(dr, {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
(function(Z,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],t):(Z=typeof globalThis<"u"?globalThis:Z||self,t(Z["kong-ui-public-entities-consumers"]={},Z.Vue,Z.VueRouter,Z["kong-ui-public-i18n"],Z.axios,Z.Kongponents))})(this,function(Z,t,$e,he,Eo,To){"use strict";const $o={consumers:{list:{table_headers:{username:"Username",custom_id:"Custom ID",tags:"Tags",id:"ID"},empty_state:{title:"Configure a New Consumer",description:"Consumers are the end users of a service.",title_for_consumer_group:"Configure a New Consumer"},toolbar_actions:{new_consumer:"New Consumer"}},title:"Consumers",search:{placeholder:"Filter by exact username or ID"},actions:{add_consumer:"Add Consumer",create:"New Consumer",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",remove:"Remove",view:"View Details"},delete:{title:"Delete a Consumer",description:"Deleting this consumer will also remove this consumer from any associated consumer group. This action cannot be reversed."},consumer_groups:{add:{title:"Add Consumers",ctaText:"Add consumers to this group",consumers_label:"Consumers",consumer_placeholder:"Add consumer",footer:"Search by exact name or ID to find consumers not included in the list"},remove:{title:"Remove a Consumer",confirmation:"Are you sure you want to remove this consumer {consumer} from consumer group {consumerGroup}?",confirmationNoCG:"Are you sure you want to remove this consumer {consumer} from this consumer group?",description:"Removing this consumer from the group could change the rate limit policy applied to this consumer."}},errors:{general:"Consumers could not be retrieved",delete:"The consumer could not be deleted at this time.",copy:"Failed to copy to clipboard",add:"Some consumers could not be added at this time.",already_added:"This consumer has already been added to the consumer group"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{title:"Consumer Identification",info:{title:"General Information",description:"General information will help identify and manage added consumer."},consumer_identification:{title:"Consumer Identification",description:"A consumer can have both unique username and unique custom ID or one of them."}},fields:{username:{label:"Username",placeholder:"Enter a unique username",tooltip:"The unique username of the Consumer. You must send either this field or {custom_id} with the request.",custom_id:"custom_id"},custom_id:{label:"Custom ID",placeholder:"Enter a unique custom ID",tooltip:"Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or {username} with the request.",username:"username"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Consumer for grouping and filtering."}}}};function Mo(){const e=he.createI18n("en-us",$o);return{i18n:e,i18nT:he.i18nTComponent(e)}}const Be={useI18n:Mo},ce="/api/runtime_groups/{controlPlaneId}",de="/{workspace}",ae={list:{konnect:{all:`${ce}/consumers`,forConsumerGroup:`${ce}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${ce}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`},kongManager:{all:`${de}/consumers`,forConsumerGroup:`${de}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${de}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{validate:`${ce}/v1/schemas/json/consumer/validate`,create:`${ce}/consumers`,edit:`${ce}/consumers/{id}`},kongManager:{validate:`${de}/schemas/consumers/validate`,create:`${de}/consumers`,edit:`${de}/consumers/{id}`}}};var nt=(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))(nt||{}),Me=(e=>(e.Edit="edit",e.Create="create",e))(Me||{}),ie=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(ie||{}),K=(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.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(K||{}),J=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(J||{});function je(e={}){return{axiosInstance:Eo.create({withCredentials:!0,timeout:3e4,...e})}}function jo(){return{debounce:(e,n)=>{let o;return(...r)=>{clearTimeout(o),o=window==null?void 0:window.setTimeout(()=>{e(...r)},n)}}}}const Fe="khcp-user-table-preferences",Fo={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function Oo(){const e=o=>{if(typeof o=="string")try{return JSON.parse(o)}catch(r){console.error("useTablePreferences(tryParseJson)",r);return}},n=()=>{const o=e(localStorage.getItem(Fe));return!o||!Object.keys(o).length?new Map:new Map(Object.entries(o))};return{setTablePreferences:(o,r)=>{try{const a=n();a.set(o,r),localStorage.setItem(Fe,JSON.stringify(Object.fromEntries(a.entries())))}catch(a){console.error("useTablePreferences(setTablePreferences)",a)}},getTablePreferences:o=>{const r=n();return(r==null?void 0:r.get(o))||void 0||Fo},deleteAllTablePreferences:()=>{localStorage.removeItem(Fe)}}}const Do={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},Ko={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},Lo={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},qo={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},vo={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},Po={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Ro={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Uo={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Go={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},zo={global:Do,deleteModal:Ko,baseForm:Lo,baseTable:qo,baseConfigCard:vo,filter:Po,debouncedFilter:Ro,errors:Uo,toggleModal:Go};function Oe(){const e=he.createI18n("en-us",zo);return{i18n:e,i18nT:he.i18nTComponent(e)}}function rt(){const e=(o,r)=>(r==null?void 0:r[o])??void 0,n=(o,r)=>{if(o.length!==r.length)return!1;const a=new Set([...o,...r]);for(const i of a){const l=o.filter(c=>c===i).length,s=r.filter(c=>c===i).length;if(l!==s)return!1}return!0};return{getPropValue:e,objectsAreEqual:(o,r,a)=>{if(a){if(Object.keys(o).length===Object.keys(r).length)for(const i in o)if(Array.isArray(o[i])&&Array.isArray(r[i])){if(n(o[i],r[i]))continue;return!1}else{if(o[i]===r[i])continue;return!1}else return!1;return!0}try{return JSON.stringify(o)===JSON.stringify(r)}catch{return!1}},sortAlpha:o=>(r,a)=>{let i=r[o]===void 0||r[o]===null?"":r[o],l=a[o]===void 0||a[o]===null?"":a[o];return Array.isArray(r[o])&&(i=r[o][0]),Array.isArray(a[o])&&(l=a[o][0]),i.localeCompare(l)},isValidUuid:o=>o?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(o):!1}}function Ho(e,n,o,r={fetchedItemsKey:"data",searchKeys:["id"]}){o||(o="100");const{axiosInstance:a}=je({headers:e.requestHeaders}),{i18n:{t:i}}=Oe(),{debounce:l}=jo(),s=l(async B=>{await k(B)},200),c=t.ref(!1),u=t.ref(""),p=t.ref(""),d=t.ref([]),g=t.ref([]),m=t.ref(void 0),x=t.unref(n);let h=`${e.apiBaseUrl}${x}`;e.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:f}=rt(),S=async()=>{try{c.value=!0;const{data:B}=await a.get(`${h}?size=${o}`);B!=null&&B.next||(m.value=r.fetchedItemsKey in B?B[r.fetchedItemsKey]:[]),g.value=r.fetchedItemsKey in B?B[r.fetchedItemsKey]:[],d.value=g.value}catch{d.value=[],u.value=i("debouncedFilter.errors.fetch")}finally{c.value=!1}},b=t.ref(""),k=async B=>{var _,$,M;if(b.value!==B)if(b.value=B||"",m.value===void 0)try{if(c.value=!0,u.value="",p.value="",e.app==="konnect"){let y=h+"";B&&(y+=`/${B}`);const{data:C}=await a.get(`${y}?size=${o}`);r.fetchedItemsKey in C?d.value=C[r.fetchedItemsKey]:C!=null&&C.id?d.value=[C]:d.value=[]}else if(B){const y=[];f(B)&&r.searchKeys.includes("id")?y.push((async()=>{const{data:E}=await a.get(`${h}/${B}`);return[E[r.fetchedItemsKey]??E]})()):y.push(...r.searchKeys.filter(E=>E!=="id").map(async E=>{const{data:w}=await a.get(`${h}?${E}=${B}`);return w[r.fetchedItemsKey]}));const C=await Promise.all(y),V=new Set;d.value=[],(_=C==null?void 0:C.forEach)==null||_.call(C,E=>{var w;(w=E==null?void 0:E.forEach)==null||w.call(E,A=>{V.has(A.id)||(V.add(A.id),d.value.push(A))})})}else d.value=g.value}catch(y){(($=y==null?void 0:y.response)==null?void 0:$.status)===404?p.value=i("debouncedFilter.errors.invalid"):(d.value=[],u.value=i("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,p.value="",B?(d.value=(M=m.value)==null?void 0:M.filter(y=>{var C;let V=!1;for(const E of r.searchKeys){const w=typeof y[E]=="string"?(C=y[E])==null?void 0:C.toLowerCase():y[E];w!=null&&w.includes(B.toLowerCase())&&(V=!0)}return V}),(!d.value||!d.value.length)&&(p.value=i("debouncedFilter.errors.invalid"))):d.value=m.value,c.value=!1};return{loading:c,error:u,validationError:p,results:d,allRecords:m,loadItems:S,debouncedQueryChange:s}}function Jo(e,n){const o=t.unref(n),r=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${o}`):new URL(o));return r.value.search="",a=>`${r.value.href}/${a}`}function Yo(){const{i18n:{t:e}}=Oe();return{getMessageFromError:n=>{var o,r,a;if(!n)return e("errors.unexpected");if((o=n==null?void 0:n.response)!=null&&o.data){if(n.response.data.detail)return n.response.data.detail;if((r=n.response.data.details)!=null&&r.length)return n.response.data.details.map(i=>{let l=e("errors.unexpected");return i.messages&&typeof i.messages=="object"&&i.messages.length&&(l=i.messages.join(", ")),i.field?`${i.field} - ${l}`:l}).join("; ");if(n.response.data.message){const{message:i}=n.response.data;return Array.isArray(i)?(a=i[0])!=null&&a.constraints?Object.values(i[0].constraints)[0]:i[0]:i}if(typeof n.response.data=="string")return n.response.data;if(typeof n.response.data=="object")return Object.keys(n.response.data).map(i=>`${i} ${n.response.data[i]}`).join(", ")}return n.message||e("errors.unexpected")}}}function Wo(e){const n=window.location.origin,o=n.endsWith("/")?n:`${n}/`;try{const r=e.join("/"),a=`${o}${r}`,i=e.some(l=>l.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!i&&new URL(a))return`${o}${r}`;throw new Error("Invalid url")}catch(r){return console.warn("Failed to build valid URL:",r),""}}function at(e,n){const o=t.ref(t.unref(e)),r=t.ref(t.unref(n)),a=t.computed(()=>!!(o.value.app==="konnect"||o.value.isExactMatch)),i=t.computed(()=>r.value.startsWith("/")?new URL(`${window.location.origin}${r.value}`):new URL(r.value));return l=>{const{page:s,pageSize:c,offset:u,sortColumnKey:p,sortColumnOrder:d,query:g}=l;try{let m=new URL(i.value.href);return a.value&&g?(m.search="",m=new URL(`${m.href}/${g}/`)):(a.value||new URLSearchParams(g).forEach((x,h)=>{m.searchParams.append(h,x)}),p&&m.searchParams.append("sort_by",p),d==="desc"&&m.searchParams.append("sort_desc","1"),m.searchParams.append("size",String(c))),u&&s!==1&&m.searchParams.append("offset",String(u)),m.href}catch(m){return console.error("RouteList(fetcher)",m),r.value}}}function Zo(e,n,o="data"){const r=t.unref(n),{axiosInstance:a}=je({headers:e.requestHeaders}),i=at(e,r),l=t.ref({status:ie.Idle});return{fetcher:async s=>{try{l.value={status:ie.Loading};const c=i(s),{data:u}=await a.get(c),p=o&&o.replace(/[^\w-_]/gi,"");let d;u[p]&&Array.isArray(u[p])?d=u[p]:d=Object.keys(u).length?[u]:[];const g={data:d,total:d.length,...u.offset?{pagination:{offset:u.offset}}:null};return l.value={status:ie.Idle,response:g},g}catch(c){const u={data:[],total:0};return s.query&&c.response.status===404?(l.value={status:ie.NoResults,response:u,error:c},u):(l.value={status:ie.Error,response:u,error:c},u)}},fetcherState:l}}function Xo(){const e=(o,r="_")=>o?o.split(r).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:o=>o?o.replace(n,r=>r.toUpperCase()):"",convertKeyToTitle:e}}const it=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,lt=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(it);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},st=e=>e==="*"||e==="x"||e==="X",ct=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},Qo=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],en=(e,n)=>{if(st(e)||st(n))return 0;const[o,r]=Qo(ct(e),ct(n));return o>r?1:o<r?-1:0},dt=(e,n)=>{for(let o=0;o<Math.max(e.length,n.length);o++){const r=en(e[o]||"0",n[o]||"0");if(r!==0)return r}return 0},tn=(e,n)=>{const o=lt(e),r=lt(n),a=o.pop(),i=r.pop(),l=dt(o,r);return l!==0?l:a&&i?dt(a.split("."),i.split(".")):a||i?a?-1:1:0},ut=(e,n,o)=>{on(o);const r=tn(e,n);return pt[o].includes(r)},pt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ft=Object.keys(pt),on=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(ft.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${ft.join("|")}`)},nn=e=>typeof e=="string"&&/^[v\d]/.test(e)&&it.test(e);function rn(e){const{gatewayInfo:n,supportedRange:o}=e;if(!n)return!0;const{edition:r,version:a}=n;if(!nn(a))return console.error("Invalid version"),!1;const i=o[r];if(!i)return!1;const[l,s]=i;return!(l&&ut(a,l,"<")||s&&ut(a,s,">"))}function an(e){const n=t.ref(0),o=t.ref(0),r=t.ref(!1);return t.watch(e,a=>{a&&!r.value&&(n.value=a.offsetWidth,o.value=a.scrollWidth,r.value=!0)}),{isTruncated:t.computed(()=>n.value<o.value)}}const R={useAxios:je,useDebouncedFilter:Ho,useDeleteUrlBuilder:Jo,useErrors:Yo,useExternalLinkCreator:Wo,useFetcher:Zo,useFetchUrlBuilder:at,useHelpers:rt,useStringHelpers:Xo,useI18n:Oe,useGatewayFeatureSupported:rn,useTruncationDetector:an},ln={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},sn="Copy to clipboard",cn={message:ln,iconTitle:sn},dn="kong-ui-copy-uuid-notify",mt="24px",un=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},pn=e=>(t.pushScopeId("data-v-9971cc79"),e=e(),t.popScopeId(),e),fn=["aria-hidden"],mn={key:0,"data-testid":"kui-icon-svg-title"},gn=pn(()=>t.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),yn=t.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:mt,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return mt}),r=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",mn,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),gn],8,fn))]),_:1},8,["aria-hidden","style"]))}}),hn=un(yn,[["__scopeId","data-v-9971cc79"]]),Cn="16px",kn={class:"kong-ui-copy-uuid"},bn=["onClick"],gt=15,wn=t.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:e=>["uuid","hidden","redacted","deleted"].includes(e)}},emits:["success","error"],setup(e,{emit:n}){const o=e,{t:r}=he.createI18n("en-us",cn),a=o.notify||t.inject(dn,()=>{}),i=t.computed(()=>o.idTooltip?{label:o.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:o.uuid}),l=t.computed(()=>!!(o.tooltip&&o.successTooltip)),s=t.ref(o.tooltip),c=t.computed(()=>o.tooltip?{label:s.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),u=t.computed(()=>{var g;return o.format==="redacted"?"*****":o.format==="deleted"?`*${(g=o.uuid)==null?void 0:g.substring(0,5)}`:o.uuid}),p=g=>{s.value=g,setTimeout(()=>{s.value=o.tooltip},1800)},d=g=>{var m,x;if(!g(o.uuid)){typeof a=="function"&&a({type:"error",message:r("message.fail")}),l.value?p(r("message.fail")):n("error",o.uuid);return}const h=((m=o.uuid)==null?void 0:m.length)>gt,f=o.format==="hidden"||o.format==="redacted"?r("message.success.prefix"):`"${((x=o.uuid)==null?void 0:x.substring(0,gt))+(h?"...":"")}"`;typeof a=="function"&&a({type:"success",message:`${f}${r("message.success.content")}`}),l.value?p(o.successTooltip):n("success",o.uuid)};return(g,m)=>{const x=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",kn,[e.format!=="hidden"?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.idTooltip?"KTooltip":"div"),t.mergeProps({key:0},i.value,{"data-testid":"copy-id"}),{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["uuid-container",e.truncated?"truncated-uuid":null,e.useMono?"mono":null])},t.toDisplayString(u.value),3)]),_:1},16)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tooltip?"KTooltip":"div"),t.mergeProps(c.value,{class:"uuid-icon-wrapper"}),{default:t.withCtx(()=>[t.createVNode(x,null,{default:t.withCtx(({copyToClipboard:h})=>[t.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:t.withModifiers(f=>d(h),["stop"])},[t.createVNode(t.unref(hn),{class:"uuid-icon",color:e.iconColor,decorative:!!e.tooltip,size:t.unref(Cn),title:t.unref(r)("iconTitle")},null,8,["color","decorative","size","title"])],8,bn)]),_:1})]),_:1},16))])}}}),xn=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},yt=xn(wn,[["__scopeId","data-v-0c07874b"]]),Sn={key:0,class:"config-card-fieldset-title"},Bn=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const n=e,{i18n:{t:o}}=R.useI18n(),{convertKeyToTitle:r}=R.useStringHelpers(),a=t.computed(()=>n.item.key??"json-array-item"),i=t.computed(()=>n.item.value??n.item),l=t.computed(()=>{const c=JSON.parse(JSON.stringify(i.value));return n.isArrayItem&&delete c.name,c}),s=t.computed(()=>{var c;return n.isArrayItem?(c=i.value)!=null&&c.name?r(i.value.name,"_"):o("baseConfigCard.general.entryTitle",{index:n.index}):""});return(c,u)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",Sn,[t.createElementVNode("b",null,t.toDisplayString(s.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(l.value),(p,d)=>(t.openBlock(),t.createBlock(De,{key:`${a.value}-property-${d}`,item:{key:p,label:t.unref(r)(p),value:l.value[p]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),X=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},ht=X(Bn,[["__scopeId","data-v-68ca83ec"]]),_n=X(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:n}}=R.useI18n();return(o,r)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(a,{appearance:"tertiary",class:"navigation-button",onClick:r[0]||(r[0]=i=>o.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),In=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:n}}=R.useI18n();return(o,r)=>{const a=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(a,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(n)("baseConfigCard.statusBadge.enabledLabel"):t.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Nn="#0044f4",An="#e0e4ea",Vn="#3a3f51",En="1px",Tn="20px",$n={class:"config-card-details-row"},Mn=["data-testid"],jn=["data-testid"],Fn=["data-testid"],On=["data-testid"],Dn={key:1},Kn=["data-testid"],Ln=["data-testid"],qn=["data-testid"],vn=["data-testid"],Pn={name:"ConfigCardItem",components:{CopyUuid:yt,JsonCardItem:ht,StatusBadge:In,InternalLinkItem:_n}},Rn=t.defineComponent({...Pn,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:n}){const o=e;t.useCssVars(m=>({"1df60db4":u.value?"none":`solid ${t.unref(En)} ${t.unref(An)}`,"21d1d34e":c.value&&l.value?"block":"flex","4d3dc7e7":c.value&&l.value?"100%":o.slim?"50%":"25%","4d400dc2":c.value&&l.value?"100%":o.slim?"50%":"75%"}));const r=t.useSlots(),{i18n:{t:a,formatUnixTimeStamp:i}}=R.useI18n(),l=t.computed(()=>o.item.value!==void 0&&o.item.value!==null&&o.item.value!==""),s=t.computed(()=>!!(o.item.tooltip||r["label-tooltip"])),c=t.computed(()=>o.item.type===K.Json||o.item.type===K.JsonArray),u=t.computed(()=>o.item.type===K.JsonArray),p=t.computed(()=>{switch(o.item.type){case K.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${o.item.key}-copy-uuid`,"success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:o.item.label}),truncated:!1,uuid:o.item.value,notify:()=>{}}};case K.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:o.item.label}),truncated:!1,notify:()=>{}}};case K.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${o.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:o.item.label}),truncated:!1,uuid:o.item.value,notify:()=>{}}};case K.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:o.item.label}),truncated:!1,notify:()=>{}}};case K.Date:return{tag:"div",attrs:{"data-testid":`${o.item.key}-date`},text:i(o.item.value)};case K.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${o.item.key}-badge-status`,status:o.item.value}};case K.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case K.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case K.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${o.item.key}-internal-link`,item:o.item,onNavigationClick:m=>{n("navigation-click",m)}}};case K.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${o.item.key}-external-link`,href:o.item.value},text:o.item.value};case K.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${o.item.key}-json-content`,item:o.item}};case K.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${o.item.key}-json-array-content`,item:o.item}};default:return{tag:"div",attrs:{"data-testid":`${o.item.key}-plain-text`},text:o.item.value}}}),d=t.ref(),{isTruncated:g}=R.useTruncationDetector(d);return(m,x)=>{const h=t.resolveComponent("KLabel"),f=t.resolveComponent("KBadge"),S=t.resolveComponent("KMethodBadge"),b=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",$n,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(m.$slots,"label",{item:e.item},()=>[t.createVNode(h,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.label)+" ",1)]),_:2},[s.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(m.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,jn)]),key:"0"}:void 0]),1024)],!0)],8,Mn),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(m.$slots,e.item.key,{rowValue:e.item.value},()=>[l.value?(t.openBlock(),t.createElementBlock("div",Dn,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(p.value.tag),t.normalizeProps(t.guardReactiveProps(p.value.attrs)),{default:t.withCtx(()=>[p.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,B)=>(t.openBlock(),t.createBlock(f,{key:`${e.item.key}-badge-tag-${B}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${B}`,"truncation-tooltip":k},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,Kn)):t.createCommentVNode("",!0),p.value.additionalComponent==="CopyUuid"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,B)=>(t.openBlock(),t.createBlock(t.unref(yt),t.mergeProps(p.value.childAttrs,{key:`${e.item.key}-copy-uuid-${B}`,"data-testid":`${e.item.key}-copy-uuid-${B}`,uuid:k}),null,16,["data-testid","uuid"]))),128))],8,Ln)):p.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,B)=>(t.openBlock(),t.createBlock(S,{key:`${e.item.key}-badge-method-${B}`,class:"config-badge","data-testid":`${e.item.key}-badge-method-${B}`,"is-rounded":"",label:k,method:t.unref(To.MethodsArray).includes(k.toLowerCase())?k.toLowerCase():"custom"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,qn)):t.createCommentVNode("",!0),p.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${o.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,B)=>(t.openBlock(),t.createBlock(ht,{key:`json-array-item-${B}`,index:B,"is-array-item":"",item:k},null,8,["index","item"]))),128))],8,vn)):(t.openBlock(),t.createBlock(b,{key:4,label:t.unref(g)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:d,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(p.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,On))],!0)],8,Fn)])}}}),De=X(Rn,[["__scopeId","data-v-307ab96d"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ct(e){return typeof e>"u"||e===null}function Un(e){return typeof e=="object"&&e!==null}function Gn(e){return Array.isArray(e)?e:Ct(e)?[]:[e]}function zn(e,n){var o,r,a,i;if(n)for(i=Object.keys(n),o=0,r=i.length;o<r;o+=1)a=i[o],e[a]=n[a];return e}function Hn(e,n){var o="",r;for(r=0;r<n;r+=1)o+=e;return o}function Jn(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Yn=Ct,Wn=Un,Zn=Gn,Xn=Hn,Qn=Jn,er=zn,P={isNothing:Yn,isObject:Wn,toArray:Zn,repeat:Xn,isNegativeZero:Qn,extend:er};function kt(e,n){var o="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(o+='in "'+e.mark.name+'" '),o+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(o+=`
|
|
1
|
+
(function(Z,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],t):(Z=typeof globalThis<"u"?globalThis:Z||self,t(Z["kong-ui-public-entities-consumers"]={},Z.Vue,Z.VueRouter,Z["kong-ui-public-i18n"],Z.axios,Z.Kongponents))})(this,function(Z,t,$e,he,Eo,To){"use strict";const $o={consumers:{list:{table_headers:{username:"Username",custom_id:"Custom ID",tags:"Tags",id:"ID"},empty_state:{title:"Configure a New Consumer",description:"Consumers are the end users of a service.",title_for_consumer_group:"Configure a New Consumer"},toolbar_actions:{new_consumer:"New Consumer"}},title:"Consumers",search:{placeholder:"Filter by exact username or ID"},actions:{add_consumer:"Add Consumer",create:"New Consumer",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",remove:"Remove",view:"View Details"},delete:{title:"Delete a Consumer",description:"Deleting this consumer will also remove this consumer from any associated consumer group. This action cannot be reversed."},consumer_groups:{add:{title:"Add Consumers",ctaText:"Add consumers to this group",consumers_label:"Consumers",consumer_placeholder:"Add consumer",footer:"Search by exact name or ID to find consumers not included in the list"},remove:{title:"Remove a Consumer",confirmation:"Are you sure you want to remove this consumer {consumer} from consumer group {consumerGroup}?",confirmationNoCG:"Are you sure you want to remove this consumer {consumer} from this consumer group?",description:"Removing this consumer from the group could change the rate limit policy applied to this consumer."}},errors:{general:"Consumers could not be retrieved",delete:"The consumer could not be deleted at this time.",copy:"Failed to copy to clipboard",add:"Some consumers could not be added at this time.",already_added:"This consumer has already been added to the consumer group"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{title:"Consumer Identification",info:{title:"General Information",description:"General information will help identify and manage added consumer."},consumer_identification:{title:"Consumer Identification",description:"A consumer can have both unique username and unique custom ID or one of them."}},fields:{username:{label:"Username",placeholder:"Enter a unique username",tooltip:"The unique username of the Consumer. You must send either this field or {custom_id} with the request.",custom_id:"custom_id"},custom_id:{label:"Custom ID",placeholder:"Enter a unique custom ID",tooltip:"Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or {username} with the request.",username:"username"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Consumer for grouping and filtering."}}}};function Mo(){const e=he.createI18n("en-us",$o);return{i18n:e,i18nT:he.i18nTComponent(e)}}const _e={useI18n:Mo},ce="/api/runtime_groups/{controlPlaneId}",de="/{workspace}",ae={list:{konnect:{all:`${ce}/consumers`,forConsumerGroup:`${ce}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${ce}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`},kongManager:{all:`${de}/consumers`,forConsumerGroup:`${de}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${de}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{validate:`${ce}/v1/schemas/json/consumer/validate`,create:`${ce}/consumers`,edit:`${ce}/consumers/{id}`},kongManager:{validate:`${de}/schemas/consumers/validate`,create:`${de}/consumers`,edit:`${de}/consumers/{id}`}}};var nt=(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))(nt||{}),Me=(e=>(e.Edit="edit",e.Create="create",e))(Me||{}),ie=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(ie||{}),K=(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.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(K||{}),J=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(J||{});function je(e={}){return{axiosInstance:Eo.create({withCredentials:!0,timeout:3e4,...e})}}function jo(){return{debounce:(e,n)=>{let o;return(...r)=>{clearTimeout(o),o=window==null?void 0:window.setTimeout(()=>{e(...r)},n)}}}}const Fe="khcp-user-table-preferences",Fo={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function Oo(){const e=o=>{if(typeof o=="string")try{return JSON.parse(o)}catch(r){console.error("useTablePreferences(tryParseJson)",r);return}},n=()=>{const o=e(localStorage.getItem(Fe));return!o||!Object.keys(o).length?new Map:new Map(Object.entries(o))};return{setTablePreferences:(o,r)=>{try{const a=n();a.set(o,r),localStorage.setItem(Fe,JSON.stringify(Object.fromEntries(a.entries())))}catch(a){console.error("useTablePreferences(setTablePreferences)",a)}},getTablePreferences:o=>{const r=n();return(r==null?void 0:r.get(o))||void 0||Fo},deleteAllTablePreferences:()=>{localStorage.removeItem(Fe)}}}const Do={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},Ko={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},Lo={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},qo={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},vo={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},Po={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Ro={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Uo={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Go={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},zo={global:Do,deleteModal:Ko,baseForm:Lo,baseTable:qo,baseConfigCard:vo,filter:Po,debouncedFilter:Ro,errors:Uo,toggleModal:Go};function Oe(){const e=he.createI18n("en-us",zo);return{i18n:e,i18nT:he.i18nTComponent(e)}}function rt(){const e=(o,r)=>(r==null?void 0:r[o])??void 0,n=(o,r)=>{if(o.length!==r.length)return!1;const a=new Set([...o,...r]);for(const i of a){const l=o.filter(c=>c===i).length,s=r.filter(c=>c===i).length;if(l!==s)return!1}return!0};return{getPropValue:e,objectsAreEqual:(o,r,a)=>{if(a){if(Object.keys(o).length===Object.keys(r).length)for(const i in o)if(Array.isArray(o[i])&&Array.isArray(r[i])){if(n(o[i],r[i]))continue;return!1}else{if(o[i]===r[i])continue;return!1}else return!1;return!0}try{return JSON.stringify(o)===JSON.stringify(r)}catch{return!1}},sortAlpha:o=>(r,a)=>{let i=r[o]===void 0||r[o]===null?"":r[o],l=a[o]===void 0||a[o]===null?"":a[o];return Array.isArray(r[o])&&(i=r[o][0]),Array.isArray(a[o])&&(l=a[o][0]),i.localeCompare(l)},isValidUuid:o=>o?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(o):!1}}function Ho(e,n,o,r={fetchedItemsKey:"data",searchKeys:["id"]}){o||(o="100");const{axiosInstance:a}=je({headers:e.requestHeaders}),{i18n:{t:i}}=Oe(),{debounce:l}=jo(),s=l(async _=>{await k(_)},200),c=t.ref(!1),u=t.ref(""),p=t.ref(""),d=t.ref([]),g=t.ref([]),m=t.ref(void 0),x=t.unref(n);let h=`${e.apiBaseUrl}${x}`;e.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:f}=rt(),S=async()=>{try{c.value=!0;const{data:_}=await a.get(`${h}?size=${o}`);_!=null&&_.next||(m.value=r.fetchedItemsKey in _?_[r.fetchedItemsKey]:[]),g.value=r.fetchedItemsKey in _?_[r.fetchedItemsKey]:[],d.value=g.value}catch{d.value=[],u.value=i("debouncedFilter.errors.fetch")}finally{c.value=!1}},b=t.ref(""),k=async _=>{var B,$,M;if(b.value!==_)if(b.value=_||"",m.value===void 0)try{if(c.value=!0,u.value="",p.value="",e.app==="konnect"){let y=h+"";_&&(y+=`/${_}`);const{data:C}=await a.get(`${y}?size=${o}`);r.fetchedItemsKey in C?d.value=C[r.fetchedItemsKey]:C!=null&&C.id?d.value=[C]:d.value=[]}else if(_){const y=[];f(_)&&r.searchKeys.includes("id")?y.push((async()=>{const{data:E}=await a.get(`${h}/${_}`);return[E[r.fetchedItemsKey]??E]})()):y.push(...r.searchKeys.filter(E=>E!=="id").map(async E=>{const{data:w}=await a.get(`${h}?${E}=${_}`);return w[r.fetchedItemsKey]}));const C=await Promise.all(y),V=new Set;d.value=[],(B=C==null?void 0:C.forEach)==null||B.call(C,E=>{var w;(w=E==null?void 0:E.forEach)==null||w.call(E,A=>{V.has(A.id)||(V.add(A.id),d.value.push(A))})})}else d.value=g.value}catch(y){(($=y==null?void 0:y.response)==null?void 0:$.status)===404?p.value=i("debouncedFilter.errors.invalid"):(d.value=[],u.value=i("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,p.value="",_?(d.value=(M=m.value)==null?void 0:M.filter(y=>{var C;let V=!1;for(const E of r.searchKeys){const w=typeof y[E]=="string"?(C=y[E])==null?void 0:C.toLowerCase():y[E];w!=null&&w.includes(_.toLowerCase())&&(V=!0)}return V}),(!d.value||!d.value.length)&&(p.value=i("debouncedFilter.errors.invalid"))):d.value=m.value,c.value=!1};return{loading:c,error:u,validationError:p,results:d,allRecords:m,loadItems:S,debouncedQueryChange:s}}function Jo(e,n){const o=t.unref(n),r=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${o}`):new URL(o));return r.value.search="",a=>`${r.value.href}/${a}`}function Yo(){const{i18n:{t:e}}=Oe();return{getMessageFromError:n=>{var o,r,a;if(!n)return e("errors.unexpected");if((o=n==null?void 0:n.response)!=null&&o.data){if(n.response.data.detail)return n.response.data.detail;if((r=n.response.data.details)!=null&&r.length)return n.response.data.details.map(i=>{let l=e("errors.unexpected");return i.messages&&typeof i.messages=="object"&&i.messages.length&&(l=i.messages.join(", ")),i.field?`${i.field} - ${l}`:l}).join("; ");if(n.response.data.message){const{message:i}=n.response.data;return Array.isArray(i)?(a=i[0])!=null&&a.constraints?Object.values(i[0].constraints)[0]:i[0]:i}if(typeof n.response.data=="string")return n.response.data;if(typeof n.response.data=="object")return Object.keys(n.response.data).map(i=>`${i} ${n.response.data[i]}`).join(", ")}return n.message||e("errors.unexpected")}}}function Wo(e){const n=window.location.origin,o=n.endsWith("/")?n:`${n}/`;try{const r=e.join("/"),a=`${o}${r}`,i=e.some(l=>l.trim()==="");if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(a)&&!i&&new URL(a))return`${o}${r}`;throw new Error("Invalid url")}catch(r){return console.warn("Failed to build valid URL:",r),""}}function at(e,n){const o=t.ref(t.unref(e)),r=t.ref(t.unref(n)),a=t.computed(()=>!!(o.value.app==="konnect"||o.value.isExactMatch)),i=t.computed(()=>r.value.startsWith("/")?new URL(`${window.location.origin}${r.value}`):new URL(r.value));return l=>{const{page:s,pageSize:c,offset:u,sortColumnKey:p,sortColumnOrder:d,query:g}=l;try{let m=new URL(i.value.href);return a.value&&g?(m.search="",m=new URL(`${m.href}/${g}/`)):(a.value||new URLSearchParams(g).forEach((x,h)=>{m.searchParams.append(h,x)}),p&&m.searchParams.append("sort_by",p),d==="desc"&&m.searchParams.append("sort_desc","1"),m.searchParams.append("size",String(c))),u&&s!==1&&m.searchParams.append("offset",String(u)),m.href}catch(m){return console.error("RouteList(fetcher)",m),r.value}}}function Zo(e,n,o="data"){const r=t.unref(n),{axiosInstance:a}=je({headers:e.requestHeaders}),i=at(e,r),l=t.ref({status:ie.Idle});return{fetcher:async s=>{try{l.value={status:ie.Loading};const c=i(s),{data:u}=await a.get(c),p=o&&o.replace(/[^\w-_]/gi,"");let d;u[p]&&Array.isArray(u[p])?d=u[p]:d=Object.keys(u).length?[u]:[];const g={data:d,total:d.length,...u.offset?{pagination:{offset:u.offset}}:null};return l.value={status:ie.Idle,response:g},g}catch(c){const u={data:[],total:0};return s.query&&c.response.status===404?(l.value={status:ie.NoResults,response:u,error:c},u):(l.value={status:ie.Error,response:u,error:c},u)}},fetcherState:l}}function Xo(){const e=(o,r="_")=>o?o.split(r).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:o=>o?o.replace(n,r=>r.toUpperCase()):"",convertKeyToTitle:e}}const it=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,lt=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(it);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},st=e=>e==="*"||e==="x"||e==="X",ct=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},Qo=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],en=(e,n)=>{if(st(e)||st(n))return 0;const[o,r]=Qo(ct(e),ct(n));return o>r?1:o<r?-1:0},dt=(e,n)=>{for(let o=0;o<Math.max(e.length,n.length);o++){const r=en(e[o]||"0",n[o]||"0");if(r!==0)return r}return 0},tn=(e,n)=>{const o=lt(e),r=lt(n),a=o.pop(),i=r.pop(),l=dt(o,r);return l!==0?l:a&&i?dt(a.split("."),i.split(".")):a||i?a?-1:1:0},ut=(e,n,o)=>{on(o);const r=tn(e,n);return pt[o].includes(r)},pt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ft=Object.keys(pt),on=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(ft.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${ft.join("|")}`)},nn=e=>typeof e=="string"&&/^[v\d]/.test(e)&&it.test(e);function rn(e){const{gatewayInfo:n,supportedRange:o}=e;if(!n)return!0;const{edition:r,version:a}=n;if(!nn(a))return console.error("Invalid version"),!1;const i=o[r];if(!i)return!1;const[l,s]=i;return!(l&&ut(a,l,"<")||s&&ut(a,s,">"))}function an(e){const n=t.ref(0),o=t.ref(0),r=t.ref(!1);return t.watch(e,a=>{a&&!r.value&&(n.value=a.offsetWidth,o.value=a.scrollWidth,r.value=!0)}),{isTruncated:t.computed(()=>n.value<o.value)}}const R={useAxios:je,useDebouncedFilter:Ho,useDeleteUrlBuilder:Jo,useErrors:Yo,useExternalLinkCreator:Wo,useFetcher:Zo,useFetchUrlBuilder:at,useHelpers:rt,useStringHelpers:Xo,useI18n:Oe,useGatewayFeatureSupported:rn,useTruncationDetector:an},ln={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},sn="Copy to clipboard",cn={message:ln,iconTitle:sn},dn="kong-ui-copy-uuid-notify",mt="24px",un=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},pn=e=>(t.pushScopeId("data-v-9971cc79"),e=e(),t.popScopeId(),e),fn=["aria-hidden"],mn={key:0,"data-testid":"kui-icon-svg-title"},gn=pn(()=>t.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),yn=t.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:mt,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return mt}),r=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",mn,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),gn],8,fn))]),_:1},8,["aria-hidden","style"]))}}),hn=un(yn,[["__scopeId","data-v-9971cc79"]]),Cn="16px",kn={class:"kong-ui-copy-uuid"},bn=["onClick"],gt=15,wn=t.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:e=>["uuid","hidden","redacted","deleted"].includes(e)}},emits:["success","error"],setup(e,{emit:n}){const o=e,{t:r}=he.createI18n("en-us",cn),a=o.notify||t.inject(dn,()=>{}),i=t.computed(()=>o.idTooltip?{label:o.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:o.uuid}),l=t.computed(()=>!!(o.tooltip&&o.successTooltip)),s=t.ref(o.tooltip),c=t.computed(()=>o.tooltip?{label:s.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),u=t.computed(()=>{var g;return o.format==="redacted"?"*****":o.format==="deleted"?`*${(g=o.uuid)==null?void 0:g.substring(0,5)}`:o.uuid}),p=g=>{s.value=g,setTimeout(()=>{s.value=o.tooltip},1800)},d=g=>{var m,x;if(!g(o.uuid)){typeof a=="function"&&a({type:"error",message:r("message.fail")}),l.value?p(r("message.fail")):n("error",o.uuid);return}const h=((m=o.uuid)==null?void 0:m.length)>gt,f=o.format==="hidden"||o.format==="redacted"?r("message.success.prefix"):`"${((x=o.uuid)==null?void 0:x.substring(0,gt))+(h?"...":"")}"`;typeof a=="function"&&a({type:"success",message:`${f}${r("message.success.content")}`}),l.value?p(o.successTooltip):n("success",o.uuid)};return(g,m)=>{const x=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",kn,[e.format!=="hidden"?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.idTooltip?"KTooltip":"div"),t.mergeProps({key:0},i.value,{"data-testid":"copy-id"}),{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["uuid-container",e.truncated?"truncated-uuid":null,e.useMono?"mono":null])},t.toDisplayString(u.value),3)]),_:1},16)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tooltip?"KTooltip":"div"),t.mergeProps(c.value,{class:"uuid-icon-wrapper"}),{default:t.withCtx(()=>[t.createVNode(x,null,{default:t.withCtx(({copyToClipboard:h})=>[t.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:t.withModifiers(f=>d(h),["stop"])},[t.createVNode(t.unref(hn),{class:"uuid-icon",color:e.iconColor,decorative:!!e.tooltip,size:t.unref(Cn),title:t.unref(r)("iconTitle")},null,8,["color","decorative","size","title"])],8,bn)]),_:1})]),_:1},16))])}}}),xn=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},yt=xn(wn,[["__scopeId","data-v-0c07874b"]]),Sn={key:0,class:"config-card-fieldset-title"},_n=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const n=e,{i18n:{t:o}}=R.useI18n(),{convertKeyToTitle:r}=R.useStringHelpers(),a=t.computed(()=>n.item.key??"json-array-item"),i=t.computed(()=>n.item.value??n.item),l=t.computed(()=>{const c=JSON.parse(JSON.stringify(i.value));return n.isArrayItem&&delete c.name,c}),s=t.computed(()=>{var c;return n.isArrayItem?(c=i.value)!=null&&c.name?r(i.value.name,"_"):o("baseConfigCard.general.entryTitle",{index:n.index}):""});return(c,u)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",Sn,[t.createElementVNode("b",null,t.toDisplayString(s.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(l.value),(p,d)=>(t.openBlock(),t.createBlock(De,{key:`${a.value}-property-${d}`,item:{key:p,label:t.unref(r)(p),value:l.value[p]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),X=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},ht=X(_n,[["__scopeId","data-v-68ca83ec"]]),Bn=X(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:n}}=R.useI18n();return(o,r)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(a,{appearance:"tertiary",class:"navigation-button",onClick:r[0]||(r[0]=i=>o.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),In=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:n}}=R.useI18n();return(o,r)=>{const a=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(a,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(n)("baseConfigCard.statusBadge.enabledLabel"):t.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Nn="#0044f4",An="#e0e4ea",Vn="#3a3f51",En="1px",Tn="20px",$n={class:"config-card-details-row"},Mn=["data-testid"],jn=["data-testid"],Fn=["data-testid"],On=["data-testid"],Dn={key:1},Kn=["data-testid"],Ln=["data-testid"],qn=["data-testid"],vn=["data-testid"],Pn={name:"ConfigCardItem",components:{CopyUuid:yt,JsonCardItem:ht,StatusBadge:In,InternalLinkItem:Bn}},Rn=t.defineComponent({...Pn,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:n}){const o=e;t.useCssVars(m=>({"1df60db4":u.value?"none":`solid ${t.unref(En)} ${t.unref(An)}`,"21d1d34e":c.value&&l.value?"block":"flex","4d3dc7e7":c.value&&l.value?"100%":o.slim?"50%":"25%","4d400dc2":c.value&&l.value?"100%":o.slim?"50%":"75%"}));const r=t.useSlots(),{i18n:{t:a,formatUnixTimeStamp:i}}=R.useI18n(),l=t.computed(()=>o.item.value!==void 0&&o.item.value!==null&&o.item.value!==""),s=t.computed(()=>!!(o.item.tooltip||r["label-tooltip"])),c=t.computed(()=>o.item.type===K.Json||o.item.type===K.JsonArray),u=t.computed(()=>o.item.type===K.JsonArray),p=t.computed(()=>{switch(o.item.type){case K.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${o.item.key}-copy-uuid`,"success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:o.item.label}),truncated:!1,uuid:o.item.value,notify:()=>{}}};case K.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:o.item.label}),truncated:!1,notify:()=>{}}};case K.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${o.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:o.item.label}),truncated:!1,uuid:o.item.value,notify:()=>{}}};case K.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:o.item.label}),truncated:!1,notify:()=>{}}};case K.Date:return{tag:"div",attrs:{"data-testid":`${o.item.key}-date`},text:i(o.item.value)};case K.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${o.item.key}-badge-status`,status:o.item.value}};case K.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case K.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case K.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${o.item.key}-internal-link`,item:o.item,onNavigationClick:m=>{n("navigation-click",m)}}};case K.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${o.item.key}-external-link`,href:o.item.value},text:o.item.value};case K.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${o.item.key}-json-content`,item:o.item}};case K.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${o.item.key}-json-array-content`,item:o.item}};default:return{tag:"div",attrs:{"data-testid":`${o.item.key}-plain-text`},text:o.item.value}}}),d=t.ref(),{isTruncated:g}=R.useTruncationDetector(d);return(m,x)=>{const h=t.resolveComponent("KLabel"),f=t.resolveComponent("KBadge"),S=t.resolveComponent("KMethodBadge"),b=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",$n,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(m.$slots,"label",{item:e.item},()=>[t.createVNode(h,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.label)+" ",1)]),_:2},[s.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(m.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,jn)]),key:"0"}:void 0]),1024)],!0)],8,Mn),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(m.$slots,e.item.key,{rowValue:e.item.value},()=>[l.value?(t.openBlock(),t.createElementBlock("div",Dn,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(p.value.tag),t.normalizeProps(t.guardReactiveProps(p.value.attrs)),{default:t.withCtx(()=>[p.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,_)=>(t.openBlock(),t.createBlock(f,{key:`${e.item.key}-badge-tag-${_}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${_}`,"truncation-tooltip":k},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,Kn)):t.createCommentVNode("",!0),p.value.additionalComponent==="CopyUuid"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,_)=>(t.openBlock(),t.createBlock(t.unref(yt),t.mergeProps(p.value.childAttrs,{key:`${e.item.key}-copy-uuid-${_}`,"data-testid":`${e.item.key}-copy-uuid-${_}`,uuid:k}),null,16,["data-testid","uuid"]))),128))],8,Ln)):p.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,_)=>(t.openBlock(),t.createBlock(S,{key:`${e.item.key}-badge-method-${_}`,class:"config-badge","data-testid":`${e.item.key}-badge-method-${_}`,"is-rounded":"",label:k,method:t.unref(To.MethodsArray).includes(k.toLowerCase())?k.toLowerCase():"custom"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,qn)):t.createCommentVNode("",!0),p.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${o.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,_)=>(t.openBlock(),t.createBlock(ht,{key:`json-array-item-${_}`,index:_,"is-array-item":"",item:k},null,8,["index","item"]))),128))],8,vn)):(t.openBlock(),t.createBlock(b,{key:4,label:t.unref(g)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:d,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(p.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,On))],!0)],8,Fn)])}}}),De=X(Rn,[["__scopeId","data-v-307ab96d"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ct(e){return typeof e>"u"||e===null}function Un(e){return typeof e=="object"&&e!==null}function Gn(e){return Array.isArray(e)?e:Ct(e)?[]:[e]}function zn(e,n){var o,r,a,i;if(n)for(i=Object.keys(n),o=0,r=i.length;o<r;o+=1)a=i[o],e[a]=n[a];return e}function Hn(e,n){var o="",r;for(r=0;r<n;r+=1)o+=e;return o}function Jn(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Yn=Ct,Wn=Un,Zn=Gn,Xn=Hn,Qn=Jn,er=zn,P={isNothing:Yn,isObject:Wn,toArray:Zn,repeat:Xn,isNegativeZero:Qn,extend:er};function kt(e,n){var o="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(o+='in "'+e.mark.name+'" '),o+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(o+=`
|
|
2
2
|
|
|
3
3
|
`+e.mark.snippet),r+" "+o):r}function Ce(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=kt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ce.prototype=Object.create(Error.prototype),Ce.prototype.constructor=Ce,Ce.prototype.toString=function(e){return this.name+": "+kt(this,e)};var H=Ce;function Ke(e,n,o,r,a){var i="",l="",s=Math.floor(a/2)-1;return r-n>s&&(i=" ... ",n=r-s+i.length),o-r>s&&(l=" ...",o=r+s-l.length),{str:i+e.slice(n,o).replace(/\t/g,"→")+l,pos:r-n+i.length}}function Le(e,n){return P.repeat(" ",n-e.length)+e}function tr(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var o=/\r?\n|\r|\0/g,r=[0],a=[],i,l=-1;i=o.exec(e.buffer);)a.push(i.index),r.push(i.index+i[0].length),e.position<=i.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var s="",c,u,p=Math.min(e.line+n.linesAfter,a.length).toString().length,d=n.maxLength-(n.indent+p+3);for(c=1;c<=n.linesBefore&&!(l-c<0);c++)u=Ke(e.buffer,r[l-c],a[l-c],e.position-(r[l]-r[l-c]),d),s=P.repeat(" ",n.indent)+Le((e.line-c+1).toString(),p)+" | "+u.str+`
|
|
4
4
|
`+s;for(u=Ke(e.buffer,r[l],a[l],e.position,d),s+=P.repeat(" ",n.indent)+Le((e.line+1).toString(),p)+" | "+u.str+`
|
|
5
5
|
`,s+=P.repeat("-",n.indent+p+3+u.pos)+`^
|
|
6
6
|
`,c=1;c<=n.linesAfter&&!(l+c>=a.length);c++)u=Ke(e.buffer,r[l+c],a[l+c],e.position-(r[l]-r[l+c]),d),s+=P.repeat(" ",n.indent)+Le((e.line+c+1).toString(),p)+" | "+u.str+`
|
|
7
|
-
`;return s.replace(/\n$/,"")}var or=tr,nr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],rr=["scalar","sequence","mapping"];function ar(e){var n={};return e!==null&&Object.keys(e).forEach(function(o){e[o].forEach(function(r){n[String(r)]=o})}),n}function ir(e,n){if(n=n||{},Object.keys(n).forEach(function(o){if(nr.indexOf(o)===-1)throw new H('Unknown option "'+o+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(o){return o},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=ar(n.styleAliases||null),rr.indexOf(this.kind)===-1)throw new H('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var G=ir;function bt(e,n){var o=[];return e[n].forEach(function(r){var a=o.length;o.forEach(function(i,l){i.tag===r.tag&&i.kind===r.kind&&i.multi===r.multi&&(a=l)}),o[a]=r}),o}function lr(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,o;function r(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(n=0,o=arguments.length;n<o;n+=1)arguments[n].forEach(r);return e}function qe(e){return this.extend(e)}qe.prototype.extend=function(e){var n=[],o=[];if(e instanceof G)o.push(e);else if(Array.isArray(e))o=o.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(n=n.concat(e.implicit)),e.explicit&&(o=o.concat(e.explicit));else throw new H("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(a){if(!(a instanceof G))throw new H("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new H("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new H("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(a){if(!(a instanceof G))throw new H("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(qe.prototype);return r.implicit=(this.implicit||[]).concat(n),r.explicit=(this.explicit||[]).concat(o),r.compiledImplicit=bt(r,"implicit"),r.compiledExplicit=bt(r,"explicit"),r.compiledTypeMap=lr(r.compiledImplicit,r.compiledExplicit),r};var wt=qe,xt=new G("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),St=new G("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),
|
|
8
|
-
\r`;function Er(e){if(e===null)return!1;var n,o,r=0,a=e.length,i=ve;for(o=0;o<a;o++)if(n=i.indexOf(e.charAt(o)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Tr(e){var n,o,r=e.replace(/[\r\n=]/g,""),a=r.length,i=ve,l=0,s=[];for(n=0;n<a;n++)n%4===0&&n&&(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)),l=l<<6|i.indexOf(r.charAt(n));return o=a%4*6,o===0?(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)):o===18?(s.push(l>>10&255),s.push(l>>2&255)):o===12&&s.push(l>>4&255),new Uint8Array(s)}function $r(e){var n="",o=0,r,a,i=e.length,l=ve;for(r=0;r<i;r++)r%3===0&&r&&(n+=l[o>>18&63],n+=l[o>>12&63],n+=l[o>>6&63],n+=l[o&63]),o=(o<<8)+e[r];return a=i%3,a===0?(n+=l[o>>18&63],n+=l[o>>12&63],n+=l[o>>6&63],n+=l[o&63]):a===2?(n+=l[o>>10&63],n+=l[o>>4&63],n+=l[o<<2&63],n+=l[64]):a===1&&(n+=l[o>>2&63],n+=l[o<<4&63],n+=l[64],n+=l[64]),n}function Mr(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ot=new G("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Er,construct:Tr,predicate:Mr,represent:$r}),jr=Object.prototype.hasOwnProperty,Fr=Object.prototype.toString;function Or(e){if(e===null)return!0;var n=[],o,r,a,i,l,s=e;for(o=0,r=s.length;o<r;o+=1){if(a=s[o],l=!1,Fr.call(a)!=="[object Object]")return!1;for(i in a)if(jr.call(a,i))if(!l)l=!0;else return!1;if(!l)return!1;if(n.indexOf(i)===-1)n.push(i);else return!1}return!0}function Dr(e){return e!==null?e:[]}var Dt=new G("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Or,construct:Dr}),Kr=Object.prototype.toString;function Lr(e){if(e===null)return!0;var n,o,r,a,i,l=e;for(i=new Array(l.length),n=0,o=l.length;n<o;n+=1){if(r=l[n],Kr.call(r)!=="[object Object]"||(a=Object.keys(r),a.length!==1))return!1;i[n]=[a[0],r[a[0]]]}return!0}function qr(e){if(e===null)return[];var n,o,r,a,i,l=e;for(i=new Array(l.length),n=0,o=l.length;n<o;n+=1)r=l[n],a=Object.keys(r),i[n]=[a[0],r[a[0]]];return i}var Kt=new G("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Lr,construct:qr}),vr=Object.prototype.hasOwnProperty;function Pr(e){if(e===null)return!0;var n,o=e;for(n in o)if(vr.call(o,n)&&o[n]!==null)return!1;return!0}function Rr(e){return e!==null?e:{}}var Lt=new G("tag:yaml.org,2002:set",{kind:"mapping",resolve:Pr,construct:Rr}),Pe=Tt.extend({implicit:[jt,Ft],explicit:[Ot,Dt,Kt,Lt]}),ne=Object.prototype.hasOwnProperty,
|
|
7
|
+
`;return s.replace(/\n$/,"")}var or=tr,nr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],rr=["scalar","sequence","mapping"];function ar(e){var n={};return e!==null&&Object.keys(e).forEach(function(o){e[o].forEach(function(r){n[String(r)]=o})}),n}function ir(e,n){if(n=n||{},Object.keys(n).forEach(function(o){if(nr.indexOf(o)===-1)throw new H('Unknown option "'+o+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(o){return o},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=ar(n.styleAliases||null),rr.indexOf(this.kind)===-1)throw new H('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var G=ir;function bt(e,n){var o=[];return e[n].forEach(function(r){var a=o.length;o.forEach(function(i,l){i.tag===r.tag&&i.kind===r.kind&&i.multi===r.multi&&(a=l)}),o[a]=r}),o}function lr(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,o;function r(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(n=0,o=arguments.length;n<o;n+=1)arguments[n].forEach(r);return e}function qe(e){return this.extend(e)}qe.prototype.extend=function(e){var n=[],o=[];if(e instanceof G)o.push(e);else if(Array.isArray(e))o=o.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(n=n.concat(e.implicit)),e.explicit&&(o=o.concat(e.explicit));else throw new H("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(a){if(!(a instanceof G))throw new H("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new H("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new H("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(a){if(!(a instanceof G))throw new H("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(qe.prototype);return r.implicit=(this.implicit||[]).concat(n),r.explicit=(this.explicit||[]).concat(o),r.compiledImplicit=bt(r,"implicit"),r.compiledExplicit=bt(r,"explicit"),r.compiledTypeMap=lr(r.compiledImplicit,r.compiledExplicit),r};var wt=qe,xt=new G("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),St=new G("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),_t=new G("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Bt=new wt({explicit:[xt,St,_t]});function sr(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function cr(){return null}function dr(e){return e===null}var It=new G("tag:yaml.org,2002:null",{kind:"scalar",resolve:sr,construct:cr,predicate:dr,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function ur(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function pr(e){return e==="true"||e==="True"||e==="TRUE"}function fr(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Nt=new G("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ur,construct:pr,predicate:fr,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function mr(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function gr(e){return 48<=e&&e<=55}function yr(e){return 48<=e&&e<=57}function hr(e){if(e===null)return!1;var n=e.length,o=0,r=!1,a;if(!n)return!1;if(a=e[o],(a==="-"||a==="+")&&(a=e[++o]),a==="0"){if(o+1===n)return!0;if(a=e[++o],a==="b"){for(o++;o<n;o++)if(a=e[o],a!=="_"){if(a!=="0"&&a!=="1")return!1;r=!0}return r&&a!=="_"}if(a==="x"){for(o++;o<n;o++)if(a=e[o],a!=="_"){if(!mr(e.charCodeAt(o)))return!1;r=!0}return r&&a!=="_"}if(a==="o"){for(o++;o<n;o++)if(a=e[o],a!=="_"){if(!gr(e.charCodeAt(o)))return!1;r=!0}return r&&a!=="_"}}if(a==="_")return!1;for(;o<n;o++)if(a=e[o],a!=="_"){if(!yr(e.charCodeAt(o)))return!1;r=!0}return!(!r||a==="_")}function Cr(e){var n=e,o=1,r;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),r=n[0],(r==="-"||r==="+")&&(r==="-"&&(o=-1),n=n.slice(1),r=n[0]),n==="0")return 0;if(r==="0"){if(n[1]==="b")return o*parseInt(n.slice(2),2);if(n[1]==="x")return o*parseInt(n.slice(2),16);if(n[1]==="o")return o*parseInt(n.slice(2),8)}return o*parseInt(n,10)}function kr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!P.isNegativeZero(e)}var At=new G("tag:yaml.org,2002:int",{kind:"scalar",resolve:hr,construct:Cr,predicate:kr,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),br=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function wr(e){return!(e===null||!br.test(e)||e[e.length-1]==="_")}function xr(e){var n,o;return n=e.replace(/_/g,"").toLowerCase(),o=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:o*parseFloat(n,10)}var Sr=/^[-+]?[0-9]+e/;function _r(e,n){var o;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(P.isNegativeZero(e))return"-0.0";return o=e.toString(10),Sr.test(o)?o.replace("e",".e"):o}function Br(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||P.isNegativeZero(e))}var Vt=new G("tag:yaml.org,2002:float",{kind:"scalar",resolve:wr,construct:xr,predicate:Br,represent:_r,defaultStyle:"lowercase"}),Et=Bt.extend({implicit:[It,Nt,At,Vt]}),Tt=Et,$t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Mt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ir(e){return e===null?!1:$t.exec(e)!==null||Mt.exec(e)!==null}function Nr(e){var n,o,r,a,i,l,s,c=0,u=null,p,d,g;if(n=$t.exec(e),n===null&&(n=Mt.exec(e)),n===null)throw new Error("Date resolve error");if(o=+n[1],r=+n[2]-1,a=+n[3],!n[4])return new Date(Date.UTC(o,r,a));if(i=+n[4],l=+n[5],s=+n[6],n[7]){for(c=n[7].slice(0,3);c.length<3;)c+="0";c=+c}return n[9]&&(p=+n[10],d=+(n[11]||0),u=(p*60+d)*6e4,n[9]==="-"&&(u=-u)),g=new Date(Date.UTC(o,r,a,i,l,s,c)),u&&g.setTime(g.getTime()-u),g}function Ar(e){return e.toISOString()}var jt=new G("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ir,construct:Nr,instanceOf:Date,represent:Ar});function Vr(e){return e==="<<"||e===null}var Ft=new G("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Vr}),ve=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
8
|
+
\r`;function Er(e){if(e===null)return!1;var n,o,r=0,a=e.length,i=ve;for(o=0;o<a;o++)if(n=i.indexOf(e.charAt(o)),!(n>64)){if(n<0)return!1;r+=6}return r%8===0}function Tr(e){var n,o,r=e.replace(/[\r\n=]/g,""),a=r.length,i=ve,l=0,s=[];for(n=0;n<a;n++)n%4===0&&n&&(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)),l=l<<6|i.indexOf(r.charAt(n));return o=a%4*6,o===0?(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)):o===18?(s.push(l>>10&255),s.push(l>>2&255)):o===12&&s.push(l>>4&255),new Uint8Array(s)}function $r(e){var n="",o=0,r,a,i=e.length,l=ve;for(r=0;r<i;r++)r%3===0&&r&&(n+=l[o>>18&63],n+=l[o>>12&63],n+=l[o>>6&63],n+=l[o&63]),o=(o<<8)+e[r];return a=i%3,a===0?(n+=l[o>>18&63],n+=l[o>>12&63],n+=l[o>>6&63],n+=l[o&63]):a===2?(n+=l[o>>10&63],n+=l[o>>4&63],n+=l[o<<2&63],n+=l[64]):a===1&&(n+=l[o>>2&63],n+=l[o<<4&63],n+=l[64],n+=l[64]),n}function Mr(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ot=new G("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Er,construct:Tr,predicate:Mr,represent:$r}),jr=Object.prototype.hasOwnProperty,Fr=Object.prototype.toString;function Or(e){if(e===null)return!0;var n=[],o,r,a,i,l,s=e;for(o=0,r=s.length;o<r;o+=1){if(a=s[o],l=!1,Fr.call(a)!=="[object Object]")return!1;for(i in a)if(jr.call(a,i))if(!l)l=!0;else return!1;if(!l)return!1;if(n.indexOf(i)===-1)n.push(i);else return!1}return!0}function Dr(e){return e!==null?e:[]}var Dt=new G("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Or,construct:Dr}),Kr=Object.prototype.toString;function Lr(e){if(e===null)return!0;var n,o,r,a,i,l=e;for(i=new Array(l.length),n=0,o=l.length;n<o;n+=1){if(r=l[n],Kr.call(r)!=="[object Object]"||(a=Object.keys(r),a.length!==1))return!1;i[n]=[a[0],r[a[0]]]}return!0}function qr(e){if(e===null)return[];var n,o,r,a,i,l=e;for(i=new Array(l.length),n=0,o=l.length;n<o;n+=1)r=l[n],a=Object.keys(r),i[n]=[a[0],r[a[0]]];return i}var Kt=new G("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Lr,construct:qr}),vr=Object.prototype.hasOwnProperty;function Pr(e){if(e===null)return!0;var n,o=e;for(n in o)if(vr.call(o,n)&&o[n]!==null)return!1;return!0}function Rr(e){return e!==null?e:{}}var Lt=new G("tag:yaml.org,2002:set",{kind:"mapping",resolve:Pr,construct:Rr}),Pe=Tt.extend({implicit:[jt,Ft],explicit:[Ot,Dt,Kt,Lt]}),ne=Object.prototype.hasOwnProperty,Be=1,qt=2,vt=3,Ie=4,Re=1,Ur=2,Pt=3,Gr=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,zr=/[\x85\u2028\u2029]/,Hr=/[,\[\]\{\}]/,Rt=/^(?:!|!!|![a-z\-]+!)$/i,Ut=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Gt(e){return Object.prototype.toString.call(e)}function ee(e){return e===10||e===13}function le(e){return e===9||e===32}function Y(e){return e===9||e===32||e===10||e===13}function ue(e){return e===44||e===91||e===93||e===123||e===125}function Jr(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function Yr(e){return e===120?2:e===117?4:e===85?8:0}function Wr(e){return 48<=e&&e<=57?e-48:-1}function zt(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
9
9
|
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function Zr(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var Ht=new Array(256),Jt=new Array(256),pe=0;pe<256;pe++)Ht[pe]=zt(pe)?1:0,Jt[pe]=zt(pe);function Xr(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Pe,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.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=[]}function Yt(e,n){var o={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return o.snippet=or(o),new H(n,o)}function I(e,n){throw Yt(e,n)}function Ne(e,n){e.onWarning&&e.onWarning.call(null,Yt(e,n))}var Wt={YAML:function(e,n,o){var r,a,i;e.version!==null&&I(e,"duplication of %YAML directive"),o.length!==1&&I(e,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),r===null&&I(e,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),i=parseInt(r[2],10),a!==1&&I(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=i<2,i!==1&&i!==2&&Ne(e,"unsupported YAML version of the document")},TAG:function(e,n,o){var r,a;o.length!==2&&I(e,"TAG directive accepts exactly two arguments"),r=o[0],a=o[1],Rt.test(r)||I(e,"ill-formed tag handle (first argument) of the TAG directive"),ne.call(e.tagMap,r)&&I(e,'there is a previously declared suffix for "'+r+'" tag handle'),Ut.test(a)||I(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{I(e,"tag prefix is malformed: "+a)}e.tagMap[r]=a}};function re(e,n,o,r){var a,i,l,s;if(n<o){if(s=e.input.slice(n,o),r)for(a=0,i=s.length;a<i;a+=1)l=s.charCodeAt(a),l===9||32<=l&&l<=1114111||I(e,"expected valid JSON character");else Gr.test(s)&&I(e,"the stream contains non-printable characters");e.result+=s}}function Zt(e,n,o,r){var a,i,l,s;for(P.isObject(o)||I(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(o),l=0,s=a.length;l<s;l+=1)i=a[l],ne.call(n,i)||(n[i]=o[i],r[i]=!0)}function fe(e,n,o,r,a,i,l,s,c){var u,p;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),u=0,p=a.length;u<p;u+=1)Array.isArray(a[u])&&I(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Gt(a[u])==="[object Object]"&&(a[u]="[object Object]");if(typeof a=="object"&&Gt(a)==="[object Object]"&&(a="[object Object]"),a=String(a),n===null&&(n={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(u=0,p=i.length;u<p;u+=1)Zt(e,n,i[u],o);else Zt(e,n,i,o);else!e.json&&!ne.call(o,a)&&ne.call(n,a)&&(e.line=l||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,I(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(n,a,{configurable:!0,enumerable:!0,writable:!0,value:i}):n[a]=i,delete o[a];return n}function Ue(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):I(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function v(e,n,o){for(var r=0,a=e.input.charCodeAt(e.position);a!==0;){for(;le(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(n&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(ee(a))for(Ue(e),a=e.input.charCodeAt(e.position),r++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return o!==-1&&r!==0&&e.lineIndent<o&&Ne(e,"deficient indentation"),r}function Ae(e){var n=e.position,o;return o=e.input.charCodeAt(n),!!((o===45||o===46)&&o===e.input.charCodeAt(n+1)&&o===e.input.charCodeAt(n+2)&&(n+=3,o=e.input.charCodeAt(n),o===0||Y(o)))}function Ge(e,n){n===1?e.result+=" ":n>1&&(e.result+=P.repeat(`
|
|
10
|
-
`,n-1))}function Qr(e,n,o){var r,a,i,l,s,c,u,p,d=e.kind,g=e.result,m;if(m=e.input.charCodeAt(e.position),Y(m)||ue(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(a=e.input.charCodeAt(e.position+1),Y(a)||o&&ue(a)))return!1;for(e.kind="scalar",e.result="",i=l=e.position,s=!1;m!==0;){if(m===58){if(a=e.input.charCodeAt(e.position+1),Y(a)||o&&ue(a))break}else if(m===35){if(r=e.input.charCodeAt(e.position-1),Y(r))break}else{if(e.position===e.lineStart&&Ae(e)||o&&ue(m))break;if(ee(m))if(c=e.line,u=e.lineStart,p=e.lineIndent,v(e,!1,-1),e.lineIndent>=n){s=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=c,e.lineStart=u,e.lineIndent=p;break}}s&&(re(e,i,l,!1),Ge(e,e.line-c),i=l=e.position,s=!1),le(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return re(e,i,l,!1),e.result?!0:(e.kind=d,e.result=g,!1)}function ea(e,n){var o,r,a;if(o=e.input.charCodeAt(e.position),o!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;(o=e.input.charCodeAt(e.position))!==0;)if(o===39)if(re(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),o===39)r=e.position,e.position++,a=e.position;else return!0;else ee(o)?(re(e,r,a,!0),Ge(e,v(e,!1,n)),r=a=e.position):e.position===e.lineStart&&Ae(e)?I(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);I(e,"unexpected end of the stream within a single quoted scalar")}function ta(e,n){var o,r,a,i,l,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,o=r=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return re(e,o,e.position,!0),e.position++,!0;if(s===92){if(re(e,o,e.position,!0),s=e.input.charCodeAt(++e.position),ee(s))v(e,!1,n);else if(s<256&&Ht[s])e.result+=Jt[s],e.position++;else if((l=Yr(s))>0){for(a=l,i=0;a>0;a--)s=e.input.charCodeAt(++e.position),(l=Jr(s))>=0?i=(i<<4)+l:I(e,"expected hexadecimal character");e.result+=Zr(i),e.position++}else I(e,"unknown escape sequence");o=r=e.position}else ee(s)?(re(e,o,r,!0),Ge(e,v(e,!1,n)),o=r=e.position):e.position===e.lineStart&&Ae(e)?I(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}I(e,"unexpected end of the stream within a double quoted scalar")}function oa(e,n){var o=!0,r,a,i,l=e.tag,s,c=e.anchor,u,p,d,g,m,x=Object.create(null),h,f,S,b;if(b=e.input.charCodeAt(e.position),b===91)p=93,m=!1,s=[];else if(b===123)p=125,m=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(v(e,!0,n),b=e.input.charCodeAt(e.position),b===p)return e.position++,e.tag=l,e.anchor=c,e.kind=m?"mapping":"sequence",e.result=s,!0;o?b===44&&I(e,"expected the node content, but found ','"):I(e,"missed comma between flow collection entries"),f=h=S=null,d=g=!1,b===63&&(u=e.input.charCodeAt(e.position+1),Y(u)&&(d=g=!0,e.position++,v(e,!0,n))),r=e.line,a=e.lineStart,i=e.position,me(e,n,
|
|
10
|
+
`,n-1))}function Qr(e,n,o){var r,a,i,l,s,c,u,p,d=e.kind,g=e.result,m;if(m=e.input.charCodeAt(e.position),Y(m)||ue(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(a=e.input.charCodeAt(e.position+1),Y(a)||o&&ue(a)))return!1;for(e.kind="scalar",e.result="",i=l=e.position,s=!1;m!==0;){if(m===58){if(a=e.input.charCodeAt(e.position+1),Y(a)||o&&ue(a))break}else if(m===35){if(r=e.input.charCodeAt(e.position-1),Y(r))break}else{if(e.position===e.lineStart&&Ae(e)||o&&ue(m))break;if(ee(m))if(c=e.line,u=e.lineStart,p=e.lineIndent,v(e,!1,-1),e.lineIndent>=n){s=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=c,e.lineStart=u,e.lineIndent=p;break}}s&&(re(e,i,l,!1),Ge(e,e.line-c),i=l=e.position,s=!1),le(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return re(e,i,l,!1),e.result?!0:(e.kind=d,e.result=g,!1)}function ea(e,n){var o,r,a;if(o=e.input.charCodeAt(e.position),o!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;(o=e.input.charCodeAt(e.position))!==0;)if(o===39)if(re(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),o===39)r=e.position,e.position++,a=e.position;else return!0;else ee(o)?(re(e,r,a,!0),Ge(e,v(e,!1,n)),r=a=e.position):e.position===e.lineStart&&Ae(e)?I(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);I(e,"unexpected end of the stream within a single quoted scalar")}function ta(e,n){var o,r,a,i,l,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,o=r=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return re(e,o,e.position,!0),e.position++,!0;if(s===92){if(re(e,o,e.position,!0),s=e.input.charCodeAt(++e.position),ee(s))v(e,!1,n);else if(s<256&&Ht[s])e.result+=Jt[s],e.position++;else if((l=Yr(s))>0){for(a=l,i=0;a>0;a--)s=e.input.charCodeAt(++e.position),(l=Jr(s))>=0?i=(i<<4)+l:I(e,"expected hexadecimal character");e.result+=Zr(i),e.position++}else I(e,"unknown escape sequence");o=r=e.position}else ee(s)?(re(e,o,r,!0),Ge(e,v(e,!1,n)),o=r=e.position):e.position===e.lineStart&&Ae(e)?I(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}I(e,"unexpected end of the stream within a double quoted scalar")}function oa(e,n){var o=!0,r,a,i,l=e.tag,s,c=e.anchor,u,p,d,g,m,x=Object.create(null),h,f,S,b;if(b=e.input.charCodeAt(e.position),b===91)p=93,m=!1,s=[];else if(b===123)p=125,m=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(v(e,!0,n),b=e.input.charCodeAt(e.position),b===p)return e.position++,e.tag=l,e.anchor=c,e.kind=m?"mapping":"sequence",e.result=s,!0;o?b===44&&I(e,"expected the node content, but found ','"):I(e,"missed comma between flow collection entries"),f=h=S=null,d=g=!1,b===63&&(u=e.input.charCodeAt(e.position+1),Y(u)&&(d=g=!0,e.position++,v(e,!0,n))),r=e.line,a=e.lineStart,i=e.position,me(e,n,Be,!1,!0),f=e.tag,h=e.result,v(e,!0,n),b=e.input.charCodeAt(e.position),(g||e.line===r)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),v(e,!0,n),me(e,n,Be,!1,!0),S=e.result),m?fe(e,s,x,f,h,S,r,a,i):d?s.push(fe(e,null,x,f,h,S,r,a,i)):s.push(h),v(e,!0,n),b=e.input.charCodeAt(e.position),b===44?(o=!0,b=e.input.charCodeAt(++e.position)):o=!1}I(e,"unexpected end of the stream within a flow collection")}function na(e,n){var o,r,a=Re,i=!1,l=!1,s=n,c=0,u=!1,p,d;if(d=e.input.charCodeAt(e.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Re===a?a=d===43?Pt:Ur:I(e,"repeat of a chomping mode identifier");else if((p=Wr(d))>=0)p===0?I(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?I(e,"repeat of an indentation width identifier"):(s=n+p-1,l=!0);else break;if(le(d)){do d=e.input.charCodeAt(++e.position);while(le(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!ee(d)&&d!==0)}for(;d!==0;){for(Ue(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!l||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>s&&(s=e.lineIndent),ee(d)){c++;continue}if(e.lineIndent<s){a===Pt?e.result+=P.repeat(`
|
|
11
11
|
`,i?1+c:c):a===Re&&i&&(e.result+=`
|
|
12
12
|
`);break}for(r?le(d)?(u=!0,e.result+=P.repeat(`
|
|
13
13
|
`,i?1+c:c)):u?(u=!1,e.result+=P.repeat(`
|
|
14
14
|
`,c+1)):c===0?i&&(e.result+=" "):e.result+=P.repeat(`
|
|
15
15
|
`,c):e.result+=P.repeat(`
|
|
16
|
-
`,i?1+c:c),i=!0,l=!0,c=0,o=e.position;!ee(d)&&d!==0;)d=e.input.charCodeAt(++e.position);re(e,o,e.position,!1)}return!0}function Xt(e,n){var o,r=e.tag,a=e.anchor,i=[],l,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation")),!(c!==45||(l=e.input.charCodeAt(e.position+1),!Y(l))));){if(s=!0,e.position++,v(e,!0,-1)&&e.lineIndent<=n){i.push(null),c=e.input.charCodeAt(e.position);continue}if(o=e.line,me(e,n,vt,!1,!0),i.push(e.result),v(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===o||e.lineIndent>n)&&c!==0)I(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return s?(e.tag=r,e.anchor=a,e.kind="sequence",e.result=i,!0):!1}function ra(e,n,o){var r,a,i,l,s,c,u=e.tag,p=e.anchor,d={},g=Object.create(null),m=null,x=null,h=null,f=!1,S=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!f&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),i=e.line,(b===63||b===58)&&Y(r))b===63?(f&&(fe(e,d,g,m,x,null,l,s,c),m=x=h=null),S=!0,f=!0,a=!0):f?(f=!1,a=!0):I(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=r;else{if(l=e.line,s=e.lineStart,c=e.position,!me(e,o,qt,!1,!0))break;if(e.line===i){for(b=e.input.charCodeAt(e.position);le(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Y(b)||I(e,"a whitespace character is expected after the key-value separator within a block mapping"),f&&(fe(e,d,g,m,x,null,l,s,c),m=x=h=null),S=!0,f=!1,a=!1,m=e.tag,x=e.result;else if(S)I(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(S)I(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=p,!0}if((e.line===i||e.lineIndent>n)&&(f&&(l=e.line,s=e.lineStart,c=e.position),me(e,n,Ie,!0,a)&&(f?x=e.result:h=e.result),f||(fe(e,d,g,m,x,h,l,s,c),m=x=h=null),v(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>n)&&b!==0)I(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return f&&fe(e,d,g,m,x,null,l,s,c),S&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=d),S}function aa(e){var n,o=!1,r=!1,a,i,l;if(l=e.input.charCodeAt(e.position),l!==33)return!1;if(e.tag!==null&&I(e,"duplication of a tag property"),l=e.input.charCodeAt(++e.position),l===60?(o=!0,l=e.input.charCodeAt(++e.position)):l===33?(r=!0,a="!!",l=e.input.charCodeAt(++e.position)):a="!",n=e.position,o){do l=e.input.charCodeAt(++e.position);while(l!==0&&l!==62);e.position<e.length?(i=e.input.slice(n,e.position),l=e.input.charCodeAt(++e.position)):I(e,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!Y(l);)l===33&&(r?I(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(n-1,e.position+1),Rt.test(a)||I(e,"named tag handle cannot contain such characters"),r=!0,n=e.position+1)),l=e.input.charCodeAt(++e.position);i=e.input.slice(n,e.position),Hr.test(i)&&I(e,"tag suffix cannot contain flow indicator characters")}i&&!Ut.test(i)&&I(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{I(e,"tag name is malformed: "+i)}return o?e.tag=i:ne.call(e.tagMap,a)?e.tag=e.tagMap[a]+i:a==="!"?e.tag="!"+i:a==="!!"?e.tag="tag:yaml.org,2002:"+i:I(e,'undeclared tag handle "'+a+'"'),!0}function ia(e){var n,o;if(o=e.input.charCodeAt(e.position),o!==38)return!1;for(e.anchor!==null&&I(e,"duplication of an anchor property"),o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!Y(o)&&!ue(o);)o=e.input.charCodeAt(++e.position);return e.position===n&&I(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function la(e){var n,o,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!Y(r)&&!ue(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&I(e,"name of an alias node must contain at least one character"),o=e.input.slice(n,e.position),ne.call(e.anchorMap,o)||I(e,'unidentified alias "'+o+'"'),e.result=e.anchorMap[o],v(e,!0,-1),!0}function me(e,n,o,r,a){var i,l,s,c=1,u=!1,p=!1,d,g,m,x,h,f;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=l=s=Ie===o||vt===o,r&&v(e,!0,-1)&&(u=!0,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)),c===1)for(;aa(e)||ia(e);)v(e,!0,-1)?(u=!0,s=i,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)):s=!1;if(s&&(s=u||a),(c===1||Ie===o)&&(
|
|
17
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var o=new Xr(e,n),r=e.indexOf("\0");for(r!==-1&&(o.position=r,I(o,"null byte is not allowed in input")),o.input+="\0";o.input.charCodeAt(o.position)===32;)o.lineIndent+=1,o.position+=1;for(;o.position<o.length-1;)sa(o);return o.documents}function ca(e,n,o){n!==null&&typeof n=="object"&&typeof o>"u"&&(o=n,n=null);var r=Qt(e,o);if(typeof n!="function")return r;for(var a=0,i=r.length;a<i;a+=1)n(r[a])}function da(e,n){var o=Qt(e,n);if(o.length!==0){if(o.length===1)return o[0];throw new H("expected a single document in the stream, but found more")}}var ua=ca,pa=da,eo={loadAll:ua,load:pa},to=Object.prototype.toString,oo=Object.prototype.hasOwnProperty,ze=65279,fa=9,ke=10,ma=13,ga=32,ya=33,ha=34,He=35,Ca=37,ka=38,ba=39,wa=42,no=44,xa=45,Ve=58,Sa=61,
|
|
16
|
+
`,i?1+c:c),i=!0,l=!0,c=0,o=e.position;!ee(d)&&d!==0;)d=e.input.charCodeAt(++e.position);re(e,o,e.position,!1)}return!0}function Xt(e,n){var o,r=e.tag,a=e.anchor,i=[],l,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation")),!(c!==45||(l=e.input.charCodeAt(e.position+1),!Y(l))));){if(s=!0,e.position++,v(e,!0,-1)&&e.lineIndent<=n){i.push(null),c=e.input.charCodeAt(e.position);continue}if(o=e.line,me(e,n,vt,!1,!0),i.push(e.result),v(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===o||e.lineIndent>n)&&c!==0)I(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return s?(e.tag=r,e.anchor=a,e.kind="sequence",e.result=i,!0):!1}function ra(e,n,o){var r,a,i,l,s,c,u=e.tag,p=e.anchor,d={},g=Object.create(null),m=null,x=null,h=null,f=!1,S=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!f&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),i=e.line,(b===63||b===58)&&Y(r))b===63?(f&&(fe(e,d,g,m,x,null,l,s,c),m=x=h=null),S=!0,f=!0,a=!0):f?(f=!1,a=!0):I(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=r;else{if(l=e.line,s=e.lineStart,c=e.position,!me(e,o,qt,!1,!0))break;if(e.line===i){for(b=e.input.charCodeAt(e.position);le(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Y(b)||I(e,"a whitespace character is expected after the key-value separator within a block mapping"),f&&(fe(e,d,g,m,x,null,l,s,c),m=x=h=null),S=!0,f=!1,a=!1,m=e.tag,x=e.result;else if(S)I(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(S)I(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=p,!0}if((e.line===i||e.lineIndent>n)&&(f&&(l=e.line,s=e.lineStart,c=e.position),me(e,n,Ie,!0,a)&&(f?x=e.result:h=e.result),f||(fe(e,d,g,m,x,h,l,s,c),m=x=h=null),v(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>n)&&b!==0)I(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return f&&fe(e,d,g,m,x,null,l,s,c),S&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=d),S}function aa(e){var n,o=!1,r=!1,a,i,l;if(l=e.input.charCodeAt(e.position),l!==33)return!1;if(e.tag!==null&&I(e,"duplication of a tag property"),l=e.input.charCodeAt(++e.position),l===60?(o=!0,l=e.input.charCodeAt(++e.position)):l===33?(r=!0,a="!!",l=e.input.charCodeAt(++e.position)):a="!",n=e.position,o){do l=e.input.charCodeAt(++e.position);while(l!==0&&l!==62);e.position<e.length?(i=e.input.slice(n,e.position),l=e.input.charCodeAt(++e.position)):I(e,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!Y(l);)l===33&&(r?I(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(n-1,e.position+1),Rt.test(a)||I(e,"named tag handle cannot contain such characters"),r=!0,n=e.position+1)),l=e.input.charCodeAt(++e.position);i=e.input.slice(n,e.position),Hr.test(i)&&I(e,"tag suffix cannot contain flow indicator characters")}i&&!Ut.test(i)&&I(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{I(e,"tag name is malformed: "+i)}return o?e.tag=i:ne.call(e.tagMap,a)?e.tag=e.tagMap[a]+i:a==="!"?e.tag="!"+i:a==="!!"?e.tag="tag:yaml.org,2002:"+i:I(e,'undeclared tag handle "'+a+'"'),!0}function ia(e){var n,o;if(o=e.input.charCodeAt(e.position),o!==38)return!1;for(e.anchor!==null&&I(e,"duplication of an anchor property"),o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!Y(o)&&!ue(o);)o=e.input.charCodeAt(++e.position);return e.position===n&&I(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function la(e){var n,o,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!Y(r)&&!ue(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&I(e,"name of an alias node must contain at least one character"),o=e.input.slice(n,e.position),ne.call(e.anchorMap,o)||I(e,'unidentified alias "'+o+'"'),e.result=e.anchorMap[o],v(e,!0,-1),!0}function me(e,n,o,r,a){var i,l,s,c=1,u=!1,p=!1,d,g,m,x,h,f;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=l=s=Ie===o||vt===o,r&&v(e,!0,-1)&&(u=!0,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)),c===1)for(;aa(e)||ia(e);)v(e,!0,-1)?(u=!0,s=i,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)):s=!1;if(s&&(s=u||a),(c===1||Ie===o)&&(Be===o||qt===o?h=n:h=n+1,f=e.position-e.lineStart,c===1?s&&(Xt(e,f)||ra(e,f,h))||oa(e,h)?p=!0:(l&&na(e,h)||ea(e,h)||ta(e,h)?p=!0:la(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&I(e,"alias node should not have any properties")):Qr(e,h,Be===o)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=s&&Xt(e,f))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&I(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,g=e.implicitTypes.length;d<g;d+=1)if(x=e.implicitTypes[d],x.resolve(e.result)){e.result=x.construct(e.result),e.tag=x.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ne.call(e.typeMap[e.kind||"fallback"],e.tag))x=e.typeMap[e.kind||"fallback"][e.tag];else for(x=null,m=e.typeMap.multi[e.kind||"fallback"],d=0,g=m.length;d<g;d+=1)if(e.tag.slice(0,m[d].tag.length)===m[d].tag){x=m[d];break}x||I(e,"unknown tag !<"+e.tag+">"),e.result!==null&&x.kind!==e.kind&&I(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):I(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function sa(e){var n=e.position,o,r,a,i=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(v(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(i=!0,l=e.input.charCodeAt(++e.position),o=e.position;l!==0&&!Y(l);)l=e.input.charCodeAt(++e.position);for(r=e.input.slice(o,e.position),a=[],r.length<1&&I(e,"directive name must not be less than one character in length");l!==0;){for(;le(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!ee(l));break}if(ee(l))break;for(o=e.position;l!==0&&!Y(l);)l=e.input.charCodeAt(++e.position);a.push(e.input.slice(o,e.position))}l!==0&&Ue(e),ne.call(Wt,r)?Wt[r](e,r,a):Ne(e,'unknown document directive "'+r+'"')}if(v(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,v(e,!0,-1)):i&&I(e,"directives end mark is expected"),me(e,e.lineIndent-1,Ie,!1,!0),v(e,!0,-1),e.checkLineBreaks&&zr.test(e.input.slice(n,e.position))&&Ne(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ae(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,v(e,!0,-1));return}if(e.position<e.length-1)I(e,"end of the stream or a document separator is expected");else return}function Qt(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
17
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var o=new Xr(e,n),r=e.indexOf("\0");for(r!==-1&&(o.position=r,I(o,"null byte is not allowed in input")),o.input+="\0";o.input.charCodeAt(o.position)===32;)o.lineIndent+=1,o.position+=1;for(;o.position<o.length-1;)sa(o);return o.documents}function ca(e,n,o){n!==null&&typeof n=="object"&&typeof o>"u"&&(o=n,n=null);var r=Qt(e,o);if(typeof n!="function")return r;for(var a=0,i=r.length;a<i;a+=1)n(r[a])}function da(e,n){var o=Qt(e,n);if(o.length!==0){if(o.length===1)return o[0];throw new H("expected a single document in the stream, but found more")}}var ua=ca,pa=da,eo={loadAll:ua,load:pa},to=Object.prototype.toString,oo=Object.prototype.hasOwnProperty,ze=65279,fa=9,ke=10,ma=13,ga=32,ya=33,ha=34,He=35,Ca=37,ka=38,ba=39,wa=42,no=44,xa=45,Ve=58,Sa=61,_a=62,Ba=63,Ia=64,ro=91,ao=93,Na=96,io=123,Aa=124,lo=125,z={};z[0]="\\0",z[7]="\\a",z[8]="\\b",z[9]="\\t",z[10]="\\n",z[11]="\\v",z[12]="\\f",z[13]="\\r",z[27]="\\e",z[34]='\\"',z[92]="\\\\",z[133]="\\N",z[160]="\\_",z[8232]="\\L",z[8233]="\\P";var Va=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ea=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ta(e,n){var o,r,a,i,l,s,c;if(n===null)return{};for(o={},r=Object.keys(n),a=0,i=r.length;a<i;a+=1)l=r[a],s=String(n[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),c=e.compiledTypeMap.fallback[l],c&&oo.call(c.styleAliases,s)&&(s=c.styleAliases[s]),o[l]=s;return o}function $a(e){var n,o,r;if(n=e.toString(16).toUpperCase(),e<=255)o="x",r=2;else if(e<=65535)o="u",r=4;else if(e<=4294967295)o="U",r=8;else throw new H("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+o+P.repeat("0",r-n.length)+n}var Ma=1,be=2;function ja(e){this.schema=e.schema||Pe,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=P.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ta(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==='"'?be:Ma,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}function so(e,n){for(var o=P.repeat(" ",n),r=0,a=-1,i="",l,s=e.length;r<s;)a=e.indexOf(`
|
|
18
18
|
`,r),a===-1?(l=e.slice(r),r=s):(l=e.slice(r,a+1),r=a+1),l.length&&l!==`
|
|
19
19
|
`&&(i+=o),i+=l;return i}function Je(e,n){return`
|
|
20
|
-
`+P.repeat(" ",e.indent*n)}function Fa(e,n){var o,r,a;for(o=0,r=e.implicitTypes.length;o<r;o+=1)if(a=e.implicitTypes[o],a.resolve(n))return!0;return!1}function Ee(e){return e===ga||e===fa}function we(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ze||65536<=e&&e<=1114111}function co(e){return we(e)&&e!==ze&&e!==ma&&e!==ke}function uo(e,n,o){var r=co(e),a=r&&!Ee(e);return(o?r:r&&e!==no&&e!==ro&&e!==ao&&e!==io&&e!==lo)&&e!==He&&!(n===Ve&&!a)||co(n)&&!Ee(n)&&e===He||n===Ve&&a}function Oa(e){return we(e)&&e!==ze&&!Ee(e)&&e!==xa&&e!==
|
|
20
|
+
`+P.repeat(" ",e.indent*n)}function Fa(e,n){var o,r,a;for(o=0,r=e.implicitTypes.length;o<r;o+=1)if(a=e.implicitTypes[o],a.resolve(n))return!0;return!1}function Ee(e){return e===ga||e===fa}function we(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ze||65536<=e&&e<=1114111}function co(e){return we(e)&&e!==ze&&e!==ma&&e!==ke}function uo(e,n,o){var r=co(e),a=r&&!Ee(e);return(o?r:r&&e!==no&&e!==ro&&e!==ao&&e!==io&&e!==lo)&&e!==He&&!(n===Ve&&!a)||co(n)&&!Ee(n)&&e===He||n===Ve&&a}function Oa(e){return we(e)&&e!==ze&&!Ee(e)&&e!==xa&&e!==Ba&&e!==Ve&&e!==no&&e!==ro&&e!==ao&&e!==io&&e!==lo&&e!==He&&e!==ka&&e!==wa&&e!==ya&&e!==Aa&&e!==Sa&&e!==_a&&e!==ba&&e!==ha&&e!==Ca&&e!==Ia&&e!==Na}function Da(e){return!Ee(e)&&e!==Ve}function xe(e,n){var o=e.charCodeAt(n),r;return o>=55296&&o<=56319&&n+1<e.length&&(r=e.charCodeAt(n+1),r>=56320&&r<=57343)?(o-55296)*1024+r-56320+65536:o}function po(e){var n=/^\n* /;return n.test(e)}var fo=1,Ye=2,mo=3,go=4,ge=5;function Ka(e,n,o,r,a,i,l,s){var c,u=0,p=null,d=!1,g=!1,m=r!==-1,x=-1,h=Oa(xe(e,0))&&Da(xe(e,e.length-1));if(n||l)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=xe(e,c),!we(u))return ge;h=h&&uo(u,p,s),p=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=xe(e,c),u===ke)d=!0,m&&(g=g||c-x-1>r&&e[x+1]!==" ",x=c);else if(!we(u))return ge;h=h&&uo(u,p,s),p=u}g=g||m&&c-x-1>r&&e[x+1]!==" "}return!d&&!g?h&&!l&&!a(e)?fo:i===be?ge:Ye:o>9&&po(e)?ge:l?i===be?ge:Ye:g?go:mo}function La(e,n,o,r,a){e.dump=function(){if(n.length===0)return e.quotingType===be?'""':"''";if(!e.noCompatMode&&(Va.indexOf(n)!==-1||Ea.test(n)))return e.quotingType===be?'"'+n+'"':"'"+n+"'";var i=e.indent*Math.max(1,o),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=r||e.flowLevel>-1&&o>=e.flowLevel;function c(u){return Fa(e,u)}switch(Ka(n,s,e.indent,l,c,e.quotingType,e.forceQuotes&&!r,a)){case fo:return n;case Ye:return"'"+n.replace(/'/g,"''")+"'";case mo:return"|"+yo(n,e.indent)+ho(so(n,i));case go:return">"+yo(n,e.indent)+ho(so(qa(n,l),i));case ge:return'"'+va(n)+'"';default:throw new H("impossible error: invalid scalar style")}}()}function yo(e,n){var o=po(e)?String(n):"",r=e[e.length-1]===`
|
|
21
21
|
`,a=r&&(e[e.length-2]===`
|
|
22
22
|
`||e===`
|
|
23
23
|
`),i=a?"+":r?"":"-";return o+i+`
|
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
`+e.slice(a,i),a=i+1),l=s;return c+=`
|
|
30
30
|
`,e.length-a>n&&l>a?c+=e.slice(a,l)+`
|
|
31
31
|
`+e.slice(l+1):c+=e.slice(a),c.slice(1)}function va(e){for(var n="",o=0,r,a=0;a<e.length;o>=65536?a+=2:a++)o=xe(e,a),r=z[o],!r&&we(o)?(n+=e[a],o>=65536&&(n+=e[a+1])):n+=r||$a(o);return n}function Pa(e,n,o){var r="",a=e.tag,i,l,s;for(i=0,l=o.length;i<l;i+=1)s=o[i],e.replacer&&(s=e.replacer.call(o,String(i),s)),(te(e,n,s,!1,!1)||typeof s>"u"&&te(e,n,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=a,e.dump="["+r+"]"}function ko(e,n,o,r){var a="",i=e.tag,l,s,c;for(l=0,s=o.length;l<s;l+=1)c=o[l],e.replacer&&(c=e.replacer.call(o,String(l),c)),(te(e,n+1,c,!0,!0,!1,!0)||typeof c>"u"&&te(e,n+1,null,!0,!0,!1,!0))&&((!r||a!=="")&&(a+=Je(e,n)),e.dump&&ke===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=i,e.dump=a||"[]"}function Ra(e,n,o){var r="",a=e.tag,i=Object.keys(o),l,s,c,u,p;for(l=0,s=i.length;l<s;l+=1)p="",r!==""&&(p+=", "),e.condenseFlow&&(p+='"'),c=i[l],u=o[c],e.replacer&&(u=e.replacer.call(o,c,u)),te(e,n,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),te(e,n,u,!1,!1)&&(p+=e.dump,r+=p));e.tag=a,e.dump="{"+r+"}"}function Ua(e,n,o,r){var a="",i=e.tag,l=Object.keys(o),s,c,u,p,d,g;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new H("sortKeys must be a boolean or a function");for(s=0,c=l.length;s<c;s+=1)g="",(!r||a!=="")&&(g+=Je(e,n)),u=l[s],p=o[u],e.replacer&&(p=e.replacer.call(o,u,p)),te(e,n+1,u,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&ke===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,d&&(g+=Je(e,n)),te(e,n+1,p,!0,d)&&(e.dump&&ke===e.dump.charCodeAt(0)?g+=":":g+=": ",g+=e.dump,a+=g));e.tag=i,e.dump=a||"{}"}function bo(e,n,o){var r,a,i,l,s,c;for(a=o?e.explicitTypes:e.implicitTypes,i=0,l=a.length;i<l;i+=1)if(s=a[i],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof n=="object"&&n instanceof s.instanceOf)&&(!s.predicate||s.predicate(n))){if(o?s.multi&&s.representName?e.tag=s.representName(n):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,to.call(s.represent)==="[object Function]")r=s.represent(n,c);else if(oo.call(s.represent,c))r=s.represent[c](n,c);else throw new H("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function te(e,n,o,r,a,i,l){e.tag=null,e.dump=o,bo(e,o,!1)||bo(e,o,!0);var s=to.call(e.dump),c=r,u;r&&(r=e.flowLevel<0||e.flowLevel>n);var p=s==="[object Object]"||s==="[object Array]",d,g;if(p&&(d=e.duplicates.indexOf(o),g=d!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&n>0)&&(a=!1),g&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(p&&g&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s==="[object Object]")r&&Object.keys(e.dump).length!==0?(Ua(e,n,e.dump,a),g&&(e.dump="&ref_"+d+e.dump)):(Ra(e,n,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!l&&n>0?ko(e,n-1,e.dump,a):ko(e,n,e.dump,a),g&&(e.dump="&ref_"+d+e.dump)):(Pa(e,n,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&La(e,e.dump,n,i,c);else{if(s==="[object Undefined]"||e.skipInvalid)return!1;throw new H("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function Ga(e,n){var o=[],r=[],a,i;for(We(e,o,r),a=0,i=r.length;a<i;a+=1)n.duplicates.push(o[r[a]]);n.usedDuplicates=new Array(i)}function We(e,n,o){var r,a,i;if(e!==null&&typeof e=="object")if(a=n.indexOf(e),a!==-1)o.indexOf(a)===-1&&o.push(a);else if(n.push(e),Array.isArray(e))for(a=0,i=e.length;a<i;a+=1)We(e[a],n,o);else for(r=Object.keys(e),a=0,i=r.length;a<i;a+=1)We(e[r[a]],n,o)}function za(e,n){n=n||{};var o=new ja(n);o.noRefs||Ga(e,o);var r=e;return o.replacer&&(r=o.replacer.call({"":r},"",r)),te(o,0,r,!0,!0)?o.dump+`
|
|
32
|
-
`:""}var Ha=za,Ja={dump:Ha};function Ze(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var Ya=G,Wa=wt,Za=_t,Xa=Et,Qa=Tt,ei=Pe,ti=eo.load,oi=eo.loadAll,ni=Ja.dump,ri=H,ai={binary:Ot,float:Vt,map:Bt,null:It,pairs:Kt,set:Lt,timestamp:jt,bool:Nt,int:At,merge:Ft,omap:Dt,seq:St,str:xt},ii=Ze("safeLoad","load"),li=Ze("safeLoadAll","loadAll"),si=Ze("safeDump","dump"),ci={Type:Ya,Schema:Wa,FAILSAFE_SCHEMA:Za,JSON_SCHEMA:Xa,CORE_SCHEMA:Qa,DEFAULT_SCHEMA:ei,load:ti,loadAll:oi,dump:ni,YAMLException:ri,types:ai,safeLoad:ii,safeLoadAll:li,safeDump:si};const di={key:0,class:"config-card-display-form"},ui=["data-testid"],pi={key:0,class:"config-card-prop-section-title"},fi={key:1,class:"config-card-display-json"},mi={key:2,class:"config-card-display-yaml"},gi=X(t.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const n=e,o=t.useSlots(),{i18n:{t:r}}=R.useI18n(),a=s=>!!(s.tooltip||o[`${s.key}-label-tooltip`]),i=t.ref(""),l=t.ref("");return t.watch(()=>n.format,s=>{s==="json"?i.value=JSON.stringify(n.record,null,2):s==="yaml"&&(l.value=ci.dump(n.record))},{immediate:!0}),(s,c)=>{const u=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",di,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,p=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${p}-props`,class:t.normalizeClass(`config-card-details-${p}-props`),"data-testid":`config-card-details-${p}-props`},[p!=="basic"?(t.openBlock(),t.createElementBlock("div",pi,t.toDisplayString(p==="advanced"?t.unref(r)("baseConfigCard.sections.advanced"):t.unref(r)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[p],d=>(t.openBlock(),t.createBlock(De,{key:d.key,item:d},t.createSlots({label:t.withCtx(()=>[t.renderSlot(s.$slots,`${d.key}-label`,{row:d},void 0,!0)]),[d.key]:t.withCtx(({rowValue:g})=>[t.renderSlot(s.$slots,d.key,{row:d,rowValue:g},void 0,!0)]),_:2},[a(d)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(s.$slots,`${d.key}-label-tooltip`,{row:d},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,ui))),128))])):t.createCommentVNode("",!0),e.format==="json"?(t.openBlock(),t.createElementBlock("div",fi,[t.createVNode(u,{id:"config-card-codeblock",code:i.value,language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),e.format==="yaml"?(t.openBlock(),t.createElementBlock("div",mi,[t.createVNode(u,{id:"config-card-codeblock",code:l.value,language:"yaml",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c45e9e4"]]),wo="24px",yi=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},hi=e=>(t.pushScopeId("data-v-dd88a2bb"),e=e(),t.popScopeId(),e),Ci=["aria-hidden"],ki={key:0,"data-testid":"kui-icon-svg-title"},bi=hi(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),wi=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:wo,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return wo}),r=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",ki,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),bi],8,Ci))]),_:1},8,["aria-hidden","style"]))}}),xi=yi(wi,[["__scopeId","data-v-dd88a2bb"]]),Si={"data-testid":"config-card-title"},Bi={class:"config-card-actions"},_i=["href"],Ii={key:2,class:"config-card-details-section"},Ni={key:3,class:"config-card-details-section"},Ai=["data-testid"],Vi={key:0,class:"config-card-prop-section-title"},Ei=X(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:n}){var o;const r=e,a=t.useSlots(),{i18n:{t:i}}=R.useI18n(),{getMessageFromError:l}=R.useErrors(),{convertKeyToTitle:s}=R.useStringHelpers(),{axiosInstance:c}=R.useAxios({headers:(o=r.config)==null?void 0:o.requestHeaders}),u=[{label:i("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],p=t.ref("structured"),d=y=>{p.value=y==null?void 0:y.value},g={id:{type:K.ID,label:i("baseConfigCard.commonFields.id_label"),order:0,section:J.Basic},name:{order:1,section:J.Basic},enabled:{type:K.BadgeStatus,order:2,section:J.Basic},updated_at:{type:K.Date,label:i("baseConfigCard.commonFields.updated_at_label"),order:3,section:J.Basic},created_at:{type:K.Date,label:i("baseConfigCard.commonFields.created_at_label"),order:4,section:J.Basic},tags:{type:K.BadgeTag,order:-1,section:J.Basic}},m=t.ref(!1),x=t.ref(!1),h=t.ref(""),f=t.ref(),S=t.computed(()=>{var y,C,V;if(!f.value)return[];const E=[],w=Object.keys(f.value).length;for(const A in f.value){const T=(C=(y=r.configSchema)==null?void 0:y[A])==null?void 0:C.order,j=(V=g[A])==null?void 0:V.order;let L=w;(j||j===0)&&(L=j===-1?w+1:j),T&&(L=T===-1?w+1:T),E.push([A,L])}return E.sort(function(A,T){return A[1]-T[1]}),E.map(A=>{var T,j;const L=A[0],F=(T=f.value)==null?void 0:T[L],q=((j=r.configSchema)==null?void 0:j[L])||{},W=g[L];return{key:L,value:F,hidden:q.hidden||!1,type:q.type??((W==null?void 0:W.type)||K.Text),label:q.label??((W==null?void 0:W.label)||s(L)),tooltip:q.tooltip??((W==null?void 0:W.tooltip)||void 0),section:q.section??((W==null?void 0:W.section)||J.Advanced)}}).filter(A=>!A.hidden&&A.key!==r.pluginConfigKey)}),b=t.computed(()=>{var y,C;if(!f.value||!r.pluginConfigKey)return[];const V=f.value[r.pluginConfigKey]||{},E=Object.keys(V).length,w=[];for(const A in V){const T=(C=(y=r.pluginConfigSchema)==null?void 0:y[A])==null?void 0:C.order,j=V[A];let L=j!=null&&j!==""?E-1:E;T&&(L=T===-1?E+1:T),w.push([A,L])}return w.sort(function(A,T){return A[1]-T[1]}),w.map(A=>{var T;const j=A[0],L=V[j],F=((T=r.pluginConfigSchema)==null?void 0:T[j])||{};return{key:j,value:L,hidden:F.hidden||!1,type:F.type??K.Text,label:F.label??s(j),tooltip:F.tooltip??void 0,section:J.Plugin}}).filter(A=>!A.hidden)}),k=t.computed(()=>{var y,C,V,E;return{basic:(y=S.value)==null?void 0:y.filter(w=>w.section===J.Basic),advanced:(C=S.value)==null?void 0:C.filter(w=>w.section===J.Advanced),plugin:(E=b.value)==null?void 0:E.concat((V=S.value)==null?void 0:V.filter(w=>w.section===J.Plugin))}}),B=t.computed(()=>{const y=[];return k.value.basic.length&&y.push("basic"),k.value.advanced.length&&y.push("advanced"),k.value.plugin.length&&y.push("plugin"),y}),_=y=>!!(y.tooltip||a[`${y.key}-label-tooltip`]),$=t.computed(()=>{var y,C;let V=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?V=V.replace(/{controlPlaneId}/gi,((y=r.config)==null?void 0:y.controlPlaneId)||""):r.config.app==="kongManager"&&(V=V.replace(/\/{workspace}/gi,(C=r.config)!=null&&C.workspace?`/${r.config.workspace}`:"")),V=V.replace(/{id}/gi,r.config.entityId),V}),M=y=>{f.value&&y(JSON.stringify(f.value))?n("copy:success",f.value):n("copy:error")};return t.watch(m,y=>{n("loading",y)},{immediate:!0}),t.onBeforeMount(async()=>{x.value=!1,m.value=!0;try{const{data:y}=await c.get($.value);if(r.dataKey)if(typeof y[r.dataKey]<"u")f.value={...y[r.dataKey]};else throw new Error(i("errors.dataKeyUndefined",{dataKey:r.dataKey}));else f.value={...y};Object.keys(r.configSchema).filter(C=>r.configSchema[C].forceShow).forEach(C=>{f.value&&typeof f.value[C]>"u"&&(f.value[C]=null)}),n("fetch:success",y)}catch(y){const C=l(y);h.value=C.startsWith("code")?i("baseConfigCard.errors.load"):C,x.value=!0,n("fetch:error",y)}finally{m.value=!1}}),(y,C)=>{const V=t.resolveComponent("KLabel"),E=t.resolveComponent("KSelect"),w=t.resolveComponent("KButton"),A=t.resolveComponent("KClipboardProvider"),T=t.resolveComponent("KSkeleton"),j=t.resolveComponent("KEmptyState"),L=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(L,{class:"kong-ui-entity-base-config-card"},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",Bi,[t.renderSlot(y.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(V,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(E,{key:1,appearance:"select","data-testid":"select-config-format",items:u,onChange:d})):t.createCommentVNode("",!0),r.config.jsonYamlEnabled&&e.configCardDoc?(t.openBlock(),t.createBlock(w,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(xi),{size:t.unref(Tn)},null,8,["size"])],8,_i)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(A,{key:3},{default:t.withCtx(({copyToClipboard:F})=>[!m.value&&!x.value?(t.openBlock(),t.createBlock(w,{key:0,appearance:"tertiary","data-testid":"json-copy-button",onClick:q=>M(F)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:1}))])]),body:t.withCtx(()=>[m.value?(t.openBlock(),t.createBlock(T,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):x.value?(t.openBlock(),t.createBlock(j,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(h.value),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createElementBlock("div",Ii,[t.createVNode(gi,{format:p.value,"prop-list-types":B.value,"property-collections":k.value,record:f.value},t.createSlots({_:2},[t.renderList(Object.keys(y.$slots),F=>({name:F,fn:t.withCtx(({row:q,rowValue:W})=>[t.renderSlot(y.$slots,F,{row:q,rowValue:W},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(t.openBlock(),t.createElementBlock("div",Ni,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B.value,F=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${F}-props`,class:t.normalizeClass(`config-card-details-${F}-props`),"data-testid":`config-card-details-${F}-props`},[F!=="basic"?(t.openBlock(),t.createElementBlock("div",Vi,t.toDisplayString(F==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value[F],q=>(t.openBlock(),t.createBlock(De,{key:q.key,item:q},t.createSlots({label:t.withCtx(()=>[t.renderSlot(y.$slots,`${q.key}-label`,{row:q},void 0,!0)]),[q.key]:t.withCtx(({rowValue:W})=>[t.renderSlot(y.$slots,q.key,{row:q,rowValue:W},void 0,!0)]),_:2},[_(q)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(y.$slots,`${q.key}-label-tooltip`,{row:q},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Ai))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("div",Si,[t.renderSlot(y.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-24515123"]]),Ti=["onReset","onSubmit"],$i={class:"form-actions","data-testid":"form-actions"},Mi=X(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:n}){var o;const r=e,a=$e.useRouter(),{i18n:{t:i}}=R.useI18n(),{getMessageFromError:l}=R.useErrors(),{axiosInstance:s}=R.useAxios({headers:(o=r.config)==null?void 0:o.requestHeaders}),c=t.ref(!1),u=t.ref(!1),p=t.ref(""),d=t.computed(()=>r.canSubmit===!1||r.isReadonly),g=t.computed(()=>{var f,S;if(!r.editId)return"";let b=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((f=r.config)==null?void 0:f.controlPlaneId)||""):r.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(S=r.config)!=null&&S.workspace?`/${r.config.workspace}`:"")),b=b.replace(/{id}/gi,r.editId),b}),m=()=>{r.config.cancelRoute?a.push(r.config.cancelRoute):x()},x=()=>{n("cancel")},h=()=>{d.value||n("submit")};return t.watch(()=>c.value,f=>{n("loading",f)},{immediate:!0}),t.onBeforeMount(async()=>{if(r.editId)try{u.value=!1,c.value=!0;const{data:f}=await s.get(g.value);n("fetch:success",f)}catch(f){const S=l(f);p.value=S.startsWith("code")?i("baseForm.errors.edit"):S,u.value=!0,n("fetch:error",f)}finally{c.value=!1}}),(f,S)=>{const b=t.resolveComponent("KSkeleton"),k=t.resolveComponent("KEmptyState"),B=t.resolveComponent("KAlert"),_=t.resolveComponent("KButton"),$=t.resolveComponent("KCard");return t.openBlock(),t.createBlock($,{class:"kong-ui-entity-base-form"},{body:t.withCtx(()=>[c.value?(t.openBlock(),t.createBlock(b,{key:0,type:"form"})):u.value?(t.openBlock(),t.createBlock(k,{key:1,"cta-text":t.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":m,"is-error":!0},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(p.value),1)]),_:1},8,["cta-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:t.withModifiers(x,["prevent"]),onSubmit:t.withModifiers(h,["prevent"])},[t.renderSlot(f.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(B,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createElementVNode("div",$i,[t.renderSlot(f.$slots,"form-actions",{},()=>[t.createVNode(_,{appearance:"secondary","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(_,{appearance:"primary","data-testid":"form-submit",disabled:d.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,Ti))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),ji={key:0,"data-testid":"first-col"},Fi=X(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const n=e,o=t.computed(()=>{var h;return((h=n.rowEl)==null?void 0:h.querySelector(`[data-testid="${n.keyName}"]`))||null}),r=t.computed(()=>{var h;return((h=o.value)==null?void 0:h.querySelector('[data-testid="first-col"]'))||null}),a=t.computed(()=>{var h,f;const S=(h=n.rowEl)==null?void 0:h.querySelectorAll("td");return S?((f=S[0])==null?void 0:f.getAttribute("data-testid"))===n.keyName:!1});let i;const l=()=>{i&&(i.disconnect(),i=void 0)},s=()=>{var h,f,S;u.value=((h=r.value)==null?void 0:h.getBoundingClientRect().width)||0,p.value=((f=o.value)==null?void 0:f.clientWidth)||0,d.value=((S=c.value)==null?void 0:S.innerText)||""},c=t.ref({}),u=t.ref(0),p=t.ref(0),d=t.ref(""),g=t.computed(()=>[r.value,o.value]),m=t.watch(g,h=>{if(a.value&&(l(),"ResizeObserver"in window&&window)){i=new ResizeObserver(f=>{window.requestAnimationFrame(()=>{!Array.isArray(f)||!f.length||s()})});for(const f of h)f&&i.observe(f)}},{immediate:!0,flush:"post",deep:!0}),x=t.computed(()=>a.value?u.value>p.value:!1);return t.onMounted(()=>{s()}),t.onUnmounted(()=>{m()}),(h,f)=>{const S=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:c,class:"content-wrapper"},[a.value?(t.openBlock(),t.createElementBlock("span",ji,[t.createVNode(S,{label:x.value?d.value:"","max-width":"300",placement:"bottomStart"},{default:t.withCtx(()=>[t.renderSlot(h.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):t.renderSlot(h.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),Oi={class:"toolbar-container"},Di={key:0,class:"toolbar-button-container"},Ki=["data-testid"],Li=X(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:n}){const o=e,{i18n:{t:r}}=R.useI18n(),a=t.computed(()=>o.cacheIdentifier||o.preferencesStorageKey),i=k=>k.hasData||!!o.query,l=t.computed(()=>{const k=[];return Object.keys(o.tableHeaders).forEach(B=>{const _=o.tableHeaders[B];k.push({label:_.label??B,key:B,sortable:_.sortable??!1})}),o.enableEntityActions&&k.push({key:"actions",hideLabel:!0}),k}),s=k=>({"data-rowid":k.id,"data-testid":k.name,...o.rowAttributes(k)}),c=t.ref({}),u=k=>{var B;return(B=c.value)==null?void 0:B.$el.querySelector(`[data-rowid="${k.id}"]`)},p=k=>{const B={"data-testid":k.headerKey,...o.cellAttributes(k)};return k.colIndex===0&&(B.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),B},d=()=>{n("empty-state-cta-clicked"),g()},g=()=>{n("clear-search-input")},m=t.computed(()=>o.disableRowClick?void 0:(k,B)=>{n("click:row",B)}),x=k=>{n("sort",k)},{setTablePreferences:h,getTablePreferences:f}=Oo(),S=t.computed(()=>{const k=f(o.preferencesStorageKey);return{...o.initialFetcherParams,...k}}),b=k=>{o.preferencesStorageKey&&h(o.preferencesStorageKey,k)};return(k,B)=>{const _=t.resolveComponent("KIcon"),$=t.resolveComponent("KButton"),M=t.resolveComponent("KDropdown"),y=t.resolveComponent("KTable"),C=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(C,{class:"kong-ui-entity-base-table",title:e.title},{body:t.withCtx(()=>[t.createVNode(y,{ref_key:"tableRefs",ref:c,"cache-identifier":a.value,"cell-attrs":p,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-title":e.errorMessage,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":!!e.errorMessage,headers:l.value,"hide-pagination-when-optional":"","initial-fetcher-params":S.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":s,"search-input":e.query,onKtableEmptyStateCtaClicked:d,"onRow:click":m.value,onSort:B[0]||(B[0]=V=>x(V)),"onUpdate:tablePreferences":b},t.createSlots({toolbar:t.withCtx(({state:V})=>[t.withDirectives(t.createElementVNode("div",Oi,[t.renderSlot(k.$slots,"toolbar-filter",{},void 0,!0),k.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",Di,[t.renderSlot(k.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,i(V)]])]),actions:t.withCtx(({row:V,rowKey:E,rowValue:w})=>[t.createElementVNode("div",{class:"actions-container","data-testid":V.name},[t.createVNode(M,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(k.$slots,"actions",{row:V,rowKey:E,rowValue:w},void 0,!0)]),default:t.withCtx(()=>[t.createVNode($,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:t.withCtx(()=>[t.createVNode(_,{color:t.unref(Vn),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,Ki)]),_:2},[t.renderList(e.tableHeaders,(V,E)=>({name:E,fn:t.withCtx(({row:w,rowKey:A,rowValue:T})=>[t.createVNode(Fi,{"key-name":String(E),"row-el":u(w)},{default:t.withCtx(()=>[t.renderSlot(k.$slots,E,{row:w,rowKey:A,rowValue:T},()=>[t.createTextVNode(t.toDisplayString(T),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-86d2d2a3"]]),qi={key:0,class:"kong-ui-entity-delete-error"},vi={key:1,class:"description"},Pi=X(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:n}){const o=e,{i18nT:r}=R.useI18n(),a=t.computed(()=>o.needConfirm?o.entityName:""),i=()=>{n("cancel")},l=()=>{n("proceed")};return(s,c)=>{const u=t.resolveComponent("KAlert"),p=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(p,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":a.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:i,onProceed:l},{"body-content":t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",qi,[t.createVNode(u,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:o.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.entityType),1)]),_:2},[o.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(o.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),o.description||s.$slots.description?(t.openBlock(),t.createElementBlock("div",vi,[t.renderSlot(s.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(o.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),Ri={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Ui={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Gi=["fill"],zi={mask:"url(#mask0_180_20349)"},Hi=["fill"],xo=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Nn})`}},setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("svg",Ri,[t.createElementVNode("mask",Ui,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,Gi)]),t.createElementVNode("g",zi,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,Hi)])]))}}),Ji={key:1,class:"kong-ui-entity-filter"},Yi={class:"menu-item-title"},Wi={class:"menu-item-indicator"},Zi={class:"menu-item-body"},Xi=["for"],Qi={class:"menu-item-buttons"},el={class:"filter-clear-button-container"},tl=X(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const o=e,{i18n:{t:r}}=R.useI18n(),a=t.ref(!1),i=t.ref({}),l=t.computed(()=>{const f=[];return new URLSearchParams(o.modelValue).forEach((S,b)=>{S!==""&&f.push(b)}),f}),s=t.computed(()=>{const f=o.config.fields;return Object.keys(f).filter(S=>f[S].searchable).map(S=>({label:f[S].label||S,value:S}))});t.watch(()=>o.modelValue,f=>{i.value={},new URLSearchParams(f).forEach((S,b)=>{i.value[b]=S})});const c=()=>{a.value=!a.value},u=f=>{n("update:modelValue",f)},p=f=>`filter-${f}`,d=f=>{var S,b;return(((b=(S=o.config.schema)==null?void 0:S[f])==null?void 0:b.values)??[]).map(k=>({value:k,label:k}))},g=f=>{var S,b;return((b=(S=o.config.schema)==null?void 0:S[f])==null?void 0:b.type)??"text"},m=f=>{i.value={...i.value,[f]:""},h()},x=()=>{i.value={},h(!0)},h=(f=!1)=>{const S=Object.keys(i.value).reduce((b,k)=>(i.value[k]&&(b[k]=`${i.value[k]}`),b),{});f&&(a.value=!1),n("update:modelValue",new URLSearchParams(S).toString())};return(f,S)=>{const b=t.resolveComponent("KInput"),k=t.resolveComponent("KButton"),B=t.resolveComponent("KSelect"),_=t.resolveComponent("KMenuItem"),$=t.resolveComponent("KMenu");return e.config.isExactMatch?(t.openBlock(),t.createBlock(b,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":u},{before:t.withCtx(()=>[t.createVNode(xo)]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",Ji,[t.createVNode(k,{appearance:"tertiary","data-testid":"filter-button",onClick:c},{default:t.withCtx(()=>[t.createVNode(xo),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(l.value.length>0?`(${l.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:c},null,512),[[t.vShow,a.value]]),t.withDirectives(t.createVNode($,{class:"kong-ui-entity-filter-menu"},{body:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(M,y)=>(t.openBlock(),t.createBlock(_,{key:M.value,"data-testid":M.value,expandable:"","last-menu-item":y===s.value.length-1},{itemTitle:t.withCtx(()=>[t.createElementVNode("span",Yi,[t.createTextVNode(t.toDisplayString(M.label)+" ",1),t.withDirectives(t.createElementVNode("span",Wi,null,512),[[t.vShow,l.value.includes(M.value)]])])]),itemBody:t.withCtx(()=>{var C,V;return[t.createElementVNode("div",Zi,[t.createElementVNode("label",{class:"menu-item-label",for:p(M.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,Xi),((V=(C=e.config.schema)==null?void 0:C[M.value])==null?void 0:V.type)==="select"?(t.openBlock(),t.createBlock(B,{key:0,id:p(M.value),modelValue:i.value[M.value],"onUpdate:modelValue":E=>i.value[M.value]=E,appearance:"select",items:d(M.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(b,{key:1,id:p(M.value),modelValue:i.value[M.value],"onUpdate:modelValue":E=>i.value[M.value]=E,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:g(M.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),t.createElementVNode("div",Qi,[t.createVNode(k,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:S[0]||(S[0]=E=>h(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(k,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:E=>m(M.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:t.withCtx(()=>[t.createElementVNode("div",el,[t.createVNode(k,{size:"small",onClick:x},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[t.vShow,a.value]])]))}}}),[["__scopeId","data-v-4ea260f0"]]),Te=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const n=e,o=t.ref(void 0),r=t.computed(()=>o.value===!0||o.value!==void 0&&n.forceShow===!0);return t.watch(()=>n.authFunction,async()=>{o.value=await n.authFunction()},{immediate:!0}),(a,i)=>r.value?t.renderSlot(a.$slots,"default",{key:0,isAllowed:o.value}):t.createCommentVNode("",!0)}}),ol={class:"form-section-wrapper"},nl={key:0,class:"form-section-title"},rl={key:1,class:"form-section-description"},al={key:2,class:"form-section-footer"},il={class:"form-section-content"},ll=X(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const n=t.useSlots();return(o,r)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[t.createElementVNode("div",ol,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createElementBlock("h4",nl,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.description||t.unref(n).description?(t.openBlock(),t.createElementBlock("div",rl,[t.renderSlot(o.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(n).footer?(t.openBlock(),t.createElementBlock("div",al,[t.renderSlot(o.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",il,[t.renderSlot(o.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:Xe,useDeleteUrlBuilder:sl,useErrors:cl,useExternalLinkCreator:Jl,useFetchUrlBuilder:Yl,useFetcher:dl,useDebouncedFilter:ul,useStringHelpers:Wl,useHelpers:Zl,useGatewayFeatureSupported:Xl,useTruncationDetector:Ql}=R,es="",pl={class:"add-consumer-form-container"},fl={class:"add-consumer-form-cta"},ml={class:"select-item-label"},gl={key:0,class:"select-item-desc"},yl={key:0,class:"kong-ui-entity-add-consumers-error"},hl={key:0},Cl=t.defineComponent({__name:"AddConsumerModal",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.consumerGroupId)},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","add:success","add:partial-success","error"],setup(e,{emit:n}){var E;const o=e,{i18n:{t:r}}=Be.useI18n(),{axiosInstance:a}=Xe({headers:(E=o.config)==null?void 0:E.requestHeaders}),i=t.ref([]),{debouncedQueryChange:l,loading:s,allRecords:c,error:u,loadItems:p,results:d}=ul(o.config,ae.list[o.config.app].all,"",{fetchedItemsKey:"data",searchKeys:["username","id"]}),g=w=>w,m=t.computed(()=>u.value?r("consumers.errors.general"):""),x=t.ref(0),h=t.computed(()=>c.value===void 0),f=t.computed(()=>d.value.map(w=>({label:w.username||w.customId,value:w.id,selected:i.value.includes(w.id),data:w}))),S=w=>{var T;const A=h.value?d.value.find(j=>j.id===w):(T=c.value)==null?void 0:T.find(j=>j.id===w);return A?A.username||A.custom_id:w},b=()=>{_.value="",k.value=[],C.value=[],n("cancel")},k=t.ref([]),B=t.ref(!1),_=t.ref(""),$=async()=>{if(!i.value.length){_.value="",C.value=[],n("cancel");return}B.value=!0,_.value="",k.value=[],C.value=[];try{const w=i.value.map(j=>y(j)),A=await Promise.allSettled(w);let T=!0;A.forEach(j=>{j.status!=="fulfilled"&&(T=!1)}),T?(k.value=[],C.value=[],n("add:success",i.value),i.value=[]):(k.value.length&&n("add:partial-success",k.value),i.value=[],V(A))}catch{_.value=r("consumers.errors.add"),n("error",_.value)}finally{B.value=!1}},M=t.computed(()=>{var A,T,j,L;let w=`${o.config.apiBaseUrl}${ae.list[o.config.app].forConsumerGroup}`;return o.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((A=o.config)==null?void 0:A.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((T=o.config)==null?void 0:T.consumerGroupId)||""):o.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(j=o.config)!=null&&j.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((L=o.config)==null?void 0:L.consumerGroupId)||"")),w}),y=async w=>{const A={consumer:w};try{const T=await a.post(M.value,A);return k.value.push(w),T}catch(T){let j=`${S(w)} - ${T.message}`;return T.response.status===409&&(j=`${S(w)} - ${r("consumers.errors.already_added")}`),Promise.reject(Error(j))}},C=t.ref([]),V=w=>{C.value=w.map(A=>{var T;return(T=A.reason)==null?void 0:T.message}).filter(Boolean)};return t.watch(f,()=>{x.value++},{immediate:!0,deep:!0}),t.onBeforeMount(async()=>{await p()}),(w,A)=>{const T=t.resolveComponent("KMultiselect"),j=t.resolveComponent("KAlert"),L=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(L,{"action-pending":B.value,class:"kong-ui-entities-add-consumers-modal","data-testid":"add-consumer-modal","is-visible":e.visible,title:t.unref(r)("consumers.consumer_groups.add.title"),onCanceled:b,onProceed:$},{"body-content":t.withCtx(()=>[t.createElementVNode("div",pl,[t.createElementVNode("p",fl,t.toDisplayString(t.unref(r)("consumers.consumer_groups.add.ctaText")),1),t.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=F=>i.value=F),autosuggest:"","data-testid":"add-consumers-multiselect","dropdown-footer-text":h.value?t.unref(r)("consumers.consumer_groups.add.footer"):void 0,items:f.value,label:t.unref(r)("consumers.consumer_groups.add.consumers_label"),loading:t.unref(s),placeholder:t.unref(r)("consumers.consumer_groups.add.consumer_placeholder"),readonly:B.value,required:"",width:"100%",onQueryChange:t.unref(l)},{"item-template":t.withCtx(({item:F})=>[t.createElementVNode("div",ml,t.toDisplayString(F.label),1),g(F).data.username&&g(F).data.custom_id?(t.openBlock(),t.createElementBlock("div",gl,t.toDisplayString(g(F).data.custom_id),1)):t.createCommentVNode("",!0)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),_.value||m.value||C.value.length?(t.openBlock(),t.createElementBlock("div",yl,[t.createVNode(j,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createElementVNode("p",null,t.toDisplayString(t.unref(r)("consumers.errors.add")),1),C.value.length?(t.openBlock(),t.createElementBlock("ul",hl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,(F,q)=>(t.openBlock(),t.createElementBlock("li",{key:q},t.toDisplayString(F),1))),128))])):t.createCommentVNode("",!0),t.createElementVNode("div",null,t.toDisplayString(_.value||m.value),1)]),_:1})])):t.createCommentVNode("",!0)])]),_:1},8,["action-pending","is-visible","title"])}}}),ts="",Qe=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},kl=Qe(Cl,[["__scopeId","data-v-86f09821"]]),bl={class:"kong-ui-entities-consumers-list"},wl={key:1},xl=t.defineComponent({__name:"ConsumerList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success","add:success","remove:success"],setup(e,{emit:n}){var Ao;const o=e,{i18nT:r,i18n:{t:a}}=Be.useI18n(),i=$e.useRouter(),{axiosInstance:l}=Xe({headers:(Ao=o.config)==null?void 0:Ao.requestHeaders}),s=t.ref(1),c=t.computed(()=>!!o.config.consumerGroupId),u=t.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),p={username:{label:a("consumers.list.table_headers.username"),searchable:!0,sortable:!0},custom_id:{label:a("consumers.list.table_headers.custom_id"),searchable:!0,sortable:!0},tags:{label:a("consumers.list.table_headers.tags"),sortable:!1}},d=p,g=N=>({"data-testid":N.username??N.custom_id??N.id}),m=t.computed(()=>{var O,U,Q,se;let N=`${o.config.apiBaseUrl}${ae.list[o.config.app][c.value?"forConsumerGroup":"all"]}`;return o.config.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,((O=o.config)==null?void 0:O.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((U=o.config)==null?void 0:U.consumerGroupId)||""):o.config.app==="kongManager"&&(N=N.replace(/\/{workspace}/gi,(Q=o.config)!=null&&Q.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((se=o.config)==null?void 0:se.consumerGroupId)||"")),N}),x=t.ref(""),h=t.computed(()=>{const N=o.config.app==="konnect"||o.config.isExactMatch;return N?{isExactMatch:N,placeholder:a("consumers.search.placeholder")}:{isExactMatch:N,fields:{username:p.username,custom_id:p.custom_id},schema:o.config.filterSchema}}),f=t.computed(()=>c.value?"consumers":void 0),{fetcher:S,fetcherState:b}=dl(o.config,m.value,f.value),k=()=>{x.value=""},B=()=>{s.value++},_=N=>N??"-",$=t.ref(""),M=(N,O)=>{const U=N.id;if(!O(U)){n("copy:error",{entity:N,field:"id",message:a("consumers.errors.copy")});return}n("copy:success",{entity:N,field:"id",message:a("consumers.copy.success",{val:U})})},y=(N,O)=>{const U=JSON.stringify(N);if(!O(U)){n("copy:error",{entity:N,message:a("consumers.errors.copy")});return}n("copy:success",{entity:N,message:a("consumers.copy.success_brief")})},C=async N=>{var U;await((U=o.canRetrieve)==null?void 0:U.call(o,N))&&i.push(o.config.getViewRoute(N.id))},V=N=>({label:a("consumers.actions.view"),to:o.config.getViewRoute(N)}),E=N=>({label:a("consumers.actions.edit"),to:o.config.getEditRoute(N)}),w=t.ref(void 0),A=t.ref(!1),T=t.ref(!1),j=t.ref(""),L=sl(o.config,m.value),F=N=>{w.value=N,A.value=!0},q=()=>{A.value=!1},W=async()=>{var N,O,U;if((N=w.value)!=null&&N.id){T.value=!0;try{await l.delete(L(w.value.id)),T.value=!1,A.value=!1,s.value++,n("delete:success",w.value)}catch(Q){j.value=((U=(O=Q.response)==null?void 0:O.data)==null?void 0:U.message)||Q.message||a("consumers.errors.delete"),n("error",Q)}finally{T.value=!1}}},et=t.ref(!1),So=()=>{et.value=!0},Bo=()=>{et.value=!1},_o=(N,O)=>{O||Bo(),s.value++,n("add:success",N)},Tl=()=>{c.value&&So()},oe=t.ref(void 0),tt=t.ref(!1),$l=t.ref(""),Ml=N=>{oe.value=N,tt.value=!0},Io=()=>{tt.value=!1,oe.value=void 0},jl=t.computed(()=>{var O,U,Q,se;let N=`${o.config.apiBaseUrl}${ae.list[o.config.app].oneForConsumerGroup}`;return o.config.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,((O=o.config)==null?void 0:O.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((U=o.config)==null?void 0:U.consumerGroupId)||""):o.config.app==="kongManager"&&(N=N.replace(/\/{workspace}/gi,(Q=o.config)!=null&&Q.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((se=o.config)==null?void 0:se.consumerGroupId)||"")),N}),No=t.ref(!1),Fl=async()=>{if(oe.value){No.value=!0;try{const N=jl.value.replace(/{consumerId}/gi,oe.value.id);await l.delete(N),n("remove:success",oe.value),Io(),s.value++}catch(N){$l.value=N.message||a("consumers.errors.delete"),n("error",N)}finally{No.value=!1}}};t.watch(b,N=>{if(N.status===ie.Error){$.value=a("consumers.errors.general"),n("error",N.error);return}$.value=""});const ot=t.ref({ctaPath:c.value?void 0:o.config.createRoute,ctaText:void 0,message:a("consumers.list.empty_state.description"),title:a("consumers.title")});return t.onBeforeMount(async()=>{await o.canCreate()&&(ot.value.title=c.value?a("consumers.list.empty_state.title_for_consumer_group"):a("consumers.list.empty_state.title"),ot.value.ctaText=c.value?a("consumers.actions.add_consumer"):a("consumers.actions.create"))}),(N,O)=>{const U=t.resolveComponent("KButton"),Q=t.resolveComponent("KBadge"),se=t.resolveComponent("KTruncate"),Se=t.resolveComponent("KDropdownItem"),Vo=t.resolveComponent("KClipboardProvider"),Ol=t.resolveComponent("KPrompt");return t.openBlock(),t.createElementBlock("div",bl,[t.createVNode(t.unref(Li),{"cache-identifier":e.cacheIdentifier,"disable-pagination":c.value,"disable-pagination-page-jump":"","disable-sorting":u.value,"empty-state-options":ot.value,"enable-entity-actions":"","error-message":$.value,fetcher:t.unref(S),"fetcher-cache-key":s.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-consumers-list",query:x.value,"row-attributes":g,"table-headers":t.unref(d),onClearSearchInput:k,"onClick:row":O[3]||(O[3]=D=>C(D)),onEmptyStateCtaClicked:Tl,onSort:B},{"toolbar-filter":t.withCtx(()=>[c.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(tl),{key:0,modelValue:x.value,"onUpdate:modelValue":O[0]||(O[0]=D=>x.value=D),config:h.value},null,8,["modelValue","config"]))]),"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(Te),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(U,{appearance:"primary","data-testid":"toolbar-add-consumer",icon:"plus",to:e.config.consumerGroupId?void 0:e.config.createRoute,onClick:O[1]||(O[1]=()=>e.config.consumerGroupId?So():void 0)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.config.consumerGroupId?t.unref(a)("consumers.actions.add_consumer"):t.unref(a)("consumers.list.toolbar_actions.new_consumer")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),username:t.withCtx(({rowValue:D})=>[t.createElementVNode("b",null,t.toDisplayString(_(D)),1)]),custom_id:t.withCtx(({rowValue:D})=>[t.createTextVNode(t.toDisplayString(_(D)),1)]),tags:t.withCtx(({rowValue:D})=>[D&&D.length>0?(t.openBlock(),t.createBlock(se,{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D,ye=>(t.openBlock(),t.createBlock(Q,{key:ye,onClick:O[2]||(O[2]=t.withModifiers(()=>{},["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(ye),1)]),_:2},1024))),128))]),_:2},1024)):(t.openBlock(),t.createElementBlock("span",wl,"-"))]),actions:t.withCtx(({row:D})=>[t.createVNode(Vo,null,{default:t.withCtx(({copyToClipboard:ye})=>[t.createVNode(Se,{"data-testid":"action-entity-copy-id",onClick:Dl=>M(D,ye)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("consumers.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(Vo,null,{default:t.withCtx(({copyToClipboard:ye})=>[t.createVNode(Se,{"data-testid":"action-entity-copy-json",onClick:Dl=>y(D,ye)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("consumers.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(Te),{"auth-function":()=>e.canRetrieve(D)},{default:t.withCtx(()=>[t.createVNode(Se,{"data-testid":"action-entity-view","has-divider":"",item:V(D.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(Te),{"auth-function":()=>e.canEdit(D)},{default:t.withCtx(()=>[t.createVNode(Se,{"data-testid":"action-entity-edit",item:E(D.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(Te),{"auth-function":()=>e.canDelete(D)},{default:t.withCtx(()=>[t.createVNode(Se,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>e.config.consumerGroupId?Ml(D):F(D)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.config.consumerGroupId?t.unref(a)("consumers.actions.remove"):t.unref(a)("consumers.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-pagination","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),t.createVNode(t.unref(Pi),{"action-pending":T.value,"data-testid":"delete-consumer-modal",description:t.unref(a)("consumers.delete.description"),"entity-name":w.value&&(w.value.username||w.value.custom_id||w.value.id),"entity-type":t.unref(nt).Consumer,error:j.value,title:t.unref(a)("consumers.delete.title"),visible:A.value,onCancel:q,onProceed:W},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),e.config.consumerGroupId?(t.openBlock(),t.createBlock(kl,{key:0,config:e.config,"data-testid":"add-consumer-modal",visible:et.value,"onAdd:partialSuccess":O[4]||(O[4]=D=>_o(D,!0)),"onAdd:success":O[5]||(O[5]=D=>_o(D)),onCancel:Bo},null,8,["config","visible"])):t.createCommentVNode("",!0),e.config.consumerGroupId&&oe.value?(t.openBlock(),t.createBlock(Ol,{key:1,"data-testid":"remove-consumer-modal","is-visible":tt.value,title:t.unref(a)("consumers.consumer_groups.remove.title"),type:"danger",onCanceled:Io,onProceed:Fl},{"body-content":t.withCtx(()=>[t.createVNode(t.unref(r),{class:"message",keypath:e.config.consumerGroupName?"consumers.consumer_groups.remove.confirmation":"consumers.consumer_groups.remove.confirmationNoCG",tag:"p"},t.createSlots({consumer:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(oe.value.username||oe.value.custom_id||oe.value.id),1)]),_:2},[e.config.consumerGroupName?{name:"consumerGroup",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.config.consumerGroupName),1)]),key:"0"}:void 0]),1032,["keypath"]),t.createElementVNode("p",null,t.toDisplayString(t.unref(a)("consumers.consumer_groups.remove.description")),1)]),_:1},8,["is-visible","title"])):t.createCommentVNode("",!0)])}}}),os="",Sl=Qe(xl,[["__scopeId","data-v-b084add6"]]),Bl={class:"kong-ui-entities-consumer-form"},_l={class:"fields-group-title"},Il={class:"fields-group-text"},Nl=t.defineComponent({__name:"ConsumerForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||(e==null?void 0:e.app)==="konnect"&&!(e!=null&&e.controlPlaneId)||(e==null?void 0:e.app)==="kongManager"&&typeof(e==null?void 0:e.workspace)!="string"||!(e!=null&&e.cancelRoute))},consumerId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:n}){var B;const o=e,{i18nT:r,i18n:{t:a}}=Be.useI18n(),i=$e.useRouter(),{axiosInstance:l}=Xe({headers:(B=o.config)==null?void 0:B.requestHeaders}),{getMessageFromError:s}=cl(),c=t.reactive({fields:{username:"",customId:"",tags:""},readonly:!1,errorMessage:""}),u=t.reactive({username:"",customId:"",tags:""}),p=t.computed(()=>{var _,$;return($=ae.form[(_=o.config)==null?void 0:_.app])==null?void 0:$.edit}),d=()=>{var _;i.push(((_=o.config)==null?void 0:_.cancelRoute)||{name:"consumer-list"})},g=_=>{n("loading",_)},m=_=>{n("error",_)},x=_=>{var M,y,C;c.fields.username=((M=_==null?void 0:_.item)==null?void 0:M.username)||(_==null?void 0:_.username)||"",c.fields.customId=((y=_==null?void 0:_.item)==null?void 0:y.custom_id)||(_==null?void 0:_.custom_id)||"";const $=((C=_==null?void 0:_.item)==null?void 0:C.tags)||(_==null?void 0:_.tags)||[];c.fields.tags=($==null?void 0:$.join(", "))||"",Object.assign(u,c.fields)},h=t.computed(()=>o.consumerId?Me.Edit:Me.Create),f=_=>{var M,y,C,V,E,w;let $=`${(M=o.config)==null?void 0:M.apiBaseUrl}${ae.form[(y=o.config)==null?void 0:y.app][_]}`;return((C=o.config)==null?void 0:C.app)==="konnect"?$=$.replace(/{controlPlaneId}/gi,((V=o.config)==null?void 0:V.controlPlaneId)||""):((E=o.config)==null?void 0:E.app)==="kongManager"&&($=$.replace(/\/{workspace}/gi,(w=o.config)!=null&&w.workspace?`/${o.config.workspace}`:"")),$=$.replace(/{id}/gi,o.consumerId),$},S=t.computed(()=>!!c.fields.username||!!c.fields.customId),b=t.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(u)),k=async()=>{var _,$,M;try{c.readonly=!0;const y={username:c.fields.username||null,custom_id:c.fields.customId||null,tags:($=(_=c.fields.tags.split(","))==null?void 0:_.map(V=>String(V||"").trim()))==null?void 0:$.filter(V=>V!=="")};let C;await l.post(f("validate"),y),h.value==="create"?C=await l.post(f("create"),y):h.value==="edit"&&(C=((M=o.config)==null?void 0:M.app)==="konnect"?await l.put(f("edit"),y):await l.patch(f("edit"),y)),x(C==null?void 0:C.data),n("update",C==null?void 0:C.data)}catch(y){c.errorMessage=s(y),n("error",y)}finally{c.readonly=!1}};return(_,$)=>{const M=t.resolveComponent("KInput"),y=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",Bl,[t.createVNode(t.unref(Mi),{"can-submit":S.value&&b.value,config:e.config,"edit-id":e.consumerId,"error-message":c.errorMessage,"fetch-url":p.value,"is-readonly":c.readonly,onCancel:d,"onFetch:error":$[3]||($[3]=C=>m(C)),"onFetch:success":x,onLoading:$[4]||($[4]=C=>g(C)),onSubmit:k},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(ll),{description:t.unref(a)("consumers.form.info.description"),"has-divider":"",title:t.unref(a)("consumers.form.info.title")},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("h5",_l,t.toDisplayString(t.unref(a)("consumers.form.consumer_identification.title"))+"* ",1),t.createElementVNode("p",Il,t.toDisplayString(t.unref(a)("consumers.form.consumer_identification.description")),1)]),t.createVNode(y,null,{body:t.withCtx(()=>[t.createVNode(M,{modelValue:c.fields.username,"onUpdate:modelValue":$[0]||($[0]=C=>c.fields.username=C),modelModifiers:{trim:!0},autocomplete:"off",class:"username-field","data-testid":"consumer-form-username",label:t.unref(a)("consumers.fields.username.label"),"label-attributes":{tooltipAttributes:{maxWidth:"250"}},placeholder:t.unref(a)("consumers.fields.username.placeholder"),readonly:c.readonly,type:"text"},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"consumers.fields.username.tooltip",scope:"global"},{custom_id:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("consumers.fields.username.custom_id")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),t.createVNode(M,{modelValue:c.fields.customId,"onUpdate:modelValue":$[1]||($[1]=C=>c.fields.customId=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-custom-id",label:t.unref(a)("consumers.fields.custom_id.label"),"label-attributes":{tooltipAttributes:{maxWidth:"250"}},placeholder:t.unref(a)("consumers.fields.custom_id.placeholder"),readonly:c.readonly,type:"text"},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"consumers.fields.custom_id.tooltip",scope:"global"},{username:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])]),_:1}),t.createVNode(M,{modelValue:c.fields.tags,"onUpdate:modelValue":$[2]||($[2]=C=>c.fields.tags=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-tags",help:t.unref(a)("consumers.fields.tags.help"),label:t.unref(a)("consumers.fields.tags.label"),"label-attributes":{info:t.unref(a)("consumers.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250"}},placeholder:t.unref(a)("consumers.fields.tags.placeholder"),readonly:c.readonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),ns="",Al=Qe(Nl,[["__scopeId","data-v-335659fc"]]),Vl={class:"kong-ui-consumer-entity-config-card"},El=t.defineComponent({__name:"ConsumerConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e){const n=e,{i18n:{t:o},i18nT:r}=Be.useI18n(),a=t.computed(()=>ae.form[n.config.app].edit),i=t.ref({id:{},username:{section:J.Basic,tooltip:o("consumers.fields.username.tooltip"),order:1},custom_id:{section:J.Basic,tooltip:o("consumers.fields.custom_id.tooltip"),label:o("consumers.fields.custom_id.label"),order:2},updated_at:{},created_at:{},tags:{tooltip:o("consumers.fields.tags.tooltip")},username_lower:{hidden:!0},type:{hidden:!0}});return(l,s)=>(t.openBlock(),t.createElementBlock("div",Vl,[t.createVNode(t.unref(Ei),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":i.value,"fetch-url":a.value,"hide-title":e.hideTitle,"onCopy:success":s[0]||(s[0]=c=>l.$emit("copy:success",c)),"onFetch:error":s[1]||(s[1]=c=>l.$emit("fetch:error",c)),"onFetch:success":s[2]||(s[2]=c=>l.$emit("fetch:success",c)),onLoading:s[3]||(s[3]=c=>l.$emit("loading",c))},{"username-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"consumers.fields.username.tooltip",scope:"global"},{custom_id:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("consumers.fields.username.custom_id")),1)]),_:1})]),"custom_id-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"consumers.fields.custom_id.tooltip",scope:"global"},{username:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});Z.ConsumerConfigCard=El,Z.ConsumerForm=Al,Z.ConsumerList=Sl,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|
|
32
|
+
`:""}var Ha=za,Ja={dump:Ha};function Ze(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var Ya=G,Wa=wt,Za=Bt,Xa=Et,Qa=Tt,ei=Pe,ti=eo.load,oi=eo.loadAll,ni=Ja.dump,ri=H,ai={binary:Ot,float:Vt,map:_t,null:It,pairs:Kt,set:Lt,timestamp:jt,bool:Nt,int:At,merge:Ft,omap:Dt,seq:St,str:xt},ii=Ze("safeLoad","load"),li=Ze("safeLoadAll","loadAll"),si=Ze("safeDump","dump"),ci={Type:Ya,Schema:Wa,FAILSAFE_SCHEMA:Za,JSON_SCHEMA:Xa,CORE_SCHEMA:Qa,DEFAULT_SCHEMA:ei,load:ti,loadAll:oi,dump:ni,YAMLException:ri,types:ai,safeLoad:ii,safeLoadAll:li,safeDump:si};const di={key:0,class:"config-card-display-form"},ui=["data-testid"],pi={key:0,class:"config-card-prop-section-title"},fi={key:1,class:"config-card-display-json"},mi={key:2,class:"config-card-display-yaml"},gi=X(t.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const n=e,o=t.useSlots(),{i18n:{t:r}}=R.useI18n(),a=s=>!!(s.tooltip||o[`${s.key}-label-tooltip`]),i=t.ref(""),l=t.ref("");return t.watch(()=>n.format,s=>{s==="json"?i.value=JSON.stringify(n.record,null,2):s==="yaml"&&(l.value=ci.dump(n.record))},{immediate:!0}),(s,c)=>{const u=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",di,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,p=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${p}-props`,class:t.normalizeClass(`config-card-details-${p}-props`),"data-testid":`config-card-details-${p}-props`},[p!=="basic"?(t.openBlock(),t.createElementBlock("div",pi,t.toDisplayString(p==="advanced"?t.unref(r)("baseConfigCard.sections.advanced"):t.unref(r)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[p],d=>(t.openBlock(),t.createBlock(De,{key:d.key,item:d},t.createSlots({label:t.withCtx(()=>[t.renderSlot(s.$slots,`${d.key}-label`,{row:d},void 0,!0)]),[d.key]:t.withCtx(({rowValue:g})=>[t.renderSlot(s.$slots,d.key,{row:d,rowValue:g},void 0,!0)]),_:2},[a(d)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(s.$slots,`${d.key}-label-tooltip`,{row:d},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,ui))),128))])):t.createCommentVNode("",!0),e.format==="json"?(t.openBlock(),t.createElementBlock("div",fi,[t.createVNode(u,{id:"config-card-codeblock",code:i.value,language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),e.format==="yaml"?(t.openBlock(),t.createElementBlock("div",mi,[t.createVNode(u,{id:"config-card-codeblock",code:l.value,language:"yaml",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c45e9e4"]]),wo="24px",yi=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},hi=e=>(t.pushScopeId("data-v-dd88a2bb"),e=e(),t.popScopeId(),e),Ci=["aria-hidden"],ki={key:0,"data-testid":"kui-icon-svg-title"},bi=hi(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),wi=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:wo,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return wo}),r=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",ki,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),bi],8,Ci))]),_:1},8,["aria-hidden","style"]))}}),xi=yi(wi,[["__scopeId","data-v-dd88a2bb"]]),Si={"data-testid":"config-card-title"},_i={class:"config-card-actions"},Bi=["href"],Ii={key:2,class:"config-card-details-section"},Ni={key:3,class:"config-card-details-section"},Ai=["data-testid"],Vi={key:0,class:"config-card-prop-section-title"},Ei=X(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:n}){var o;const r=e,a=t.useSlots(),{i18n:{t:i}}=R.useI18n(),{getMessageFromError:l}=R.useErrors(),{convertKeyToTitle:s}=R.useStringHelpers(),{axiosInstance:c}=R.useAxios({headers:(o=r.config)==null?void 0:o.requestHeaders}),u=[{label:i("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],p=t.ref("structured"),d=y=>{p.value=y==null?void 0:y.value},g={id:{type:K.ID,label:i("baseConfigCard.commonFields.id_label"),order:0,section:J.Basic},name:{order:1,section:J.Basic},enabled:{type:K.BadgeStatus,order:2,section:J.Basic},updated_at:{type:K.Date,label:i("baseConfigCard.commonFields.updated_at_label"),order:3,section:J.Basic},created_at:{type:K.Date,label:i("baseConfigCard.commonFields.created_at_label"),order:4,section:J.Basic},tags:{type:K.BadgeTag,order:-1,section:J.Basic}},m=t.ref(!1),x=t.ref(!1),h=t.ref(""),f=t.ref(),S=t.computed(()=>{var y,C,V;if(!f.value)return[];const E=[],w=Object.keys(f.value).length;for(const A in f.value){const T=(C=(y=r.configSchema)==null?void 0:y[A])==null?void 0:C.order,j=(V=g[A])==null?void 0:V.order;let L=w;(j||j===0)&&(L=j===-1?w+1:j),T&&(L=T===-1?w+1:T),E.push([A,L])}return E.sort(function(A,T){return A[1]-T[1]}),E.map(A=>{var T,j;const L=A[0],F=(T=f.value)==null?void 0:T[L],q=((j=r.configSchema)==null?void 0:j[L])||{},W=g[L];return{key:L,value:F,hidden:q.hidden||!1,type:q.type??((W==null?void 0:W.type)||K.Text),label:q.label??((W==null?void 0:W.label)||s(L)),tooltip:q.tooltip??((W==null?void 0:W.tooltip)||void 0),section:q.section??((W==null?void 0:W.section)||J.Advanced)}}).filter(A=>!A.hidden&&A.key!==r.pluginConfigKey)}),b=t.computed(()=>{var y,C;if(!f.value||!r.pluginConfigKey)return[];const V=f.value[r.pluginConfigKey]||{},E=Object.keys(V).length,w=[];for(const A in V){const T=(C=(y=r.pluginConfigSchema)==null?void 0:y[A])==null?void 0:C.order,j=V[A];let L=j!=null&&j!==""?E-1:E;T&&(L=T===-1?E+1:T),w.push([A,L])}return w.sort(function(A,T){return A[1]-T[1]}),w.map(A=>{var T;const j=A[0],L=V[j],F=((T=r.pluginConfigSchema)==null?void 0:T[j])||{};return{key:j,value:L,hidden:F.hidden||!1,type:F.type??K.Text,label:F.label??s(j),tooltip:F.tooltip??void 0,section:J.Plugin}}).filter(A=>!A.hidden)}),k=t.computed(()=>{var y,C,V,E;return{basic:(y=S.value)==null?void 0:y.filter(w=>w.section===J.Basic),advanced:(C=S.value)==null?void 0:C.filter(w=>w.section===J.Advanced),plugin:(E=b.value)==null?void 0:E.concat((V=S.value)==null?void 0:V.filter(w=>w.section===J.Plugin))}}),_=t.computed(()=>{const y=[];return k.value.basic.length&&y.push("basic"),k.value.advanced.length&&y.push("advanced"),k.value.plugin.length&&y.push("plugin"),y}),B=y=>!!(y.tooltip||a[`${y.key}-label-tooltip`]),$=t.computed(()=>{var y,C;let V=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?V=V.replace(/{controlPlaneId}/gi,((y=r.config)==null?void 0:y.controlPlaneId)||""):r.config.app==="kongManager"&&(V=V.replace(/\/{workspace}/gi,(C=r.config)!=null&&C.workspace?`/${r.config.workspace}`:"")),V=V.replace(/{id}/gi,r.config.entityId),V}),M=y=>{f.value&&y(JSON.stringify(f.value))?n("copy:success",f.value):n("copy:error")};return t.watch(m,y=>{n("loading",y)},{immediate:!0}),t.onBeforeMount(async()=>{x.value=!1,m.value=!0;try{const{data:y}=await c.get($.value);if(r.dataKey)if(typeof y[r.dataKey]<"u")f.value={...y[r.dataKey]};else throw new Error(i("errors.dataKeyUndefined",{dataKey:r.dataKey}));else f.value={...y};Object.keys(r.configSchema).filter(C=>r.configSchema[C].forceShow).forEach(C=>{f.value&&typeof f.value[C]>"u"&&(f.value[C]=null)}),n("fetch:success",y)}catch(y){const C=l(y);h.value=C.startsWith("code")?i("baseConfigCard.errors.load"):C,x.value=!0,n("fetch:error",y)}finally{m.value=!1}}),(y,C)=>{const V=t.resolveComponent("KLabel"),E=t.resolveComponent("KSelect"),w=t.resolveComponent("KButton"),A=t.resolveComponent("KClipboardProvider"),T=t.resolveComponent("KSkeleton"),j=t.resolveComponent("KEmptyState"),L=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(L,{class:"kong-ui-entity-base-config-card"},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",_i,[t.renderSlot(y.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(V,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(E,{key:1,appearance:"select","data-testid":"select-config-format",items:u,onChange:d})):t.createCommentVNode("",!0),r.config.jsonYamlEnabled&&e.configCardDoc?(t.openBlock(),t.createBlock(w,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(xi),{size:t.unref(Tn)},null,8,["size"])],8,Bi)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(A,{key:3},{default:t.withCtx(({copyToClipboard:F})=>[!m.value&&!x.value?(t.openBlock(),t.createBlock(w,{key:0,appearance:"tertiary","data-testid":"json-copy-button",onClick:q=>M(F)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:1}))])]),body:t.withCtx(()=>[m.value?(t.openBlock(),t.createBlock(T,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):x.value?(t.openBlock(),t.createBlock(j,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(h.value),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createElementBlock("div",Ii,[t.createVNode(gi,{format:p.value,"prop-list-types":_.value,"property-collections":k.value,record:f.value},t.createSlots({_:2},[t.renderList(Object.keys(y.$slots),F=>({name:F,fn:t.withCtx(({row:q,rowValue:W})=>[t.renderSlot(y.$slots,F,{row:q,rowValue:W},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(t.openBlock(),t.createElementBlock("div",Ni,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,F=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${F}-props`,class:t.normalizeClass(`config-card-details-${F}-props`),"data-testid":`config-card-details-${F}-props`},[F!=="basic"?(t.openBlock(),t.createElementBlock("div",Vi,t.toDisplayString(F==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value[F],q=>(t.openBlock(),t.createBlock(De,{key:q.key,item:q},t.createSlots({label:t.withCtx(()=>[t.renderSlot(y.$slots,`${q.key}-label`,{row:q},void 0,!0)]),[q.key]:t.withCtx(({rowValue:W})=>[t.renderSlot(y.$slots,q.key,{row:q,rowValue:W},void 0,!0)]),_:2},[B(q)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(y.$slots,`${q.key}-label-tooltip`,{row:q},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Ai))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("div",Si,[t.renderSlot(y.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-24515123"]]),Ti=["onReset","onSubmit"],$i={class:"form-actions","data-testid":"form-actions"},Mi=X(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:n}){var o;const r=e,a=$e.useRouter(),{i18n:{t:i}}=R.useI18n(),{getMessageFromError:l}=R.useErrors(),{axiosInstance:s}=R.useAxios({headers:(o=r.config)==null?void 0:o.requestHeaders}),c=t.ref(!1),u=t.ref(!1),p=t.ref(""),d=t.computed(()=>r.canSubmit===!1||r.isReadonly),g=t.computed(()=>{var f,S;if(!r.editId)return"";let b=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((f=r.config)==null?void 0:f.controlPlaneId)||""):r.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(S=r.config)!=null&&S.workspace?`/${r.config.workspace}`:"")),b=b.replace(/{id}/gi,r.editId),b}),m=()=>{r.config.cancelRoute?a.push(r.config.cancelRoute):x()},x=()=>{n("cancel")},h=()=>{d.value||n("submit")};return t.watch(()=>c.value,f=>{n("loading",f)},{immediate:!0}),t.onBeforeMount(async()=>{if(r.editId)try{u.value=!1,c.value=!0;const{data:f}=await s.get(g.value);n("fetch:success",f)}catch(f){const S=l(f);p.value=S.startsWith("code")?i("baseForm.errors.edit"):S,u.value=!0,n("fetch:error",f)}finally{c.value=!1}}),(f,S)=>{const b=t.resolveComponent("KSkeleton"),k=t.resolveComponent("KEmptyState"),_=t.resolveComponent("KAlert"),B=t.resolveComponent("KButton"),$=t.resolveComponent("KCard");return t.openBlock(),t.createBlock($,{class:"kong-ui-entity-base-form"},{body:t.withCtx(()=>[c.value?(t.openBlock(),t.createBlock(b,{key:0,type:"form"})):u.value?(t.openBlock(),t.createBlock(k,{key:1,"cta-text":t.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":m,"is-error":!0},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(p.value),1)]),_:1},8,["cta-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:t.withModifiers(x,["prevent"]),onSubmit:t.withModifiers(h,["prevent"])},[t.renderSlot(f.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(_,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createElementVNode("div",$i,[t.renderSlot(f.$slots,"form-actions",{},()=>[t.createVNode(B,{appearance:"secondary","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(B,{appearance:"primary","data-testid":"form-submit",disabled:d.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,Ti))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),ji={key:0,"data-testid":"first-col"},Fi=X(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const n=e,o=t.computed(()=>{var h;return((h=n.rowEl)==null?void 0:h.querySelector(`[data-testid="${n.keyName}"]`))||null}),r=t.computed(()=>{var h;return((h=o.value)==null?void 0:h.querySelector('[data-testid="first-col"]'))||null}),a=t.computed(()=>{var h,f;const S=(h=n.rowEl)==null?void 0:h.querySelectorAll("td");return S?((f=S[0])==null?void 0:f.getAttribute("data-testid"))===n.keyName:!1});let i;const l=()=>{i&&(i.disconnect(),i=void 0)},s=()=>{var h,f,S;u.value=((h=r.value)==null?void 0:h.getBoundingClientRect().width)||0,p.value=((f=o.value)==null?void 0:f.clientWidth)||0,d.value=((S=c.value)==null?void 0:S.innerText)||""},c=t.ref({}),u=t.ref(0),p=t.ref(0),d=t.ref(""),g=t.computed(()=>[r.value,o.value]),m=t.watch(g,h=>{if(a.value&&(l(),"ResizeObserver"in window&&window)){i=new ResizeObserver(f=>{window.requestAnimationFrame(()=>{!Array.isArray(f)||!f.length||s()})});for(const f of h)f&&i.observe(f)}},{immediate:!0,flush:"post",deep:!0}),x=t.computed(()=>a.value?u.value>p.value:!1);return t.onMounted(()=>{s()}),t.onUnmounted(()=>{m()}),(h,f)=>{const S=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:c,class:"content-wrapper"},[a.value?(t.openBlock(),t.createElementBlock("span",ji,[t.createVNode(S,{label:x.value?d.value:"","max-width":"300",placement:"bottomStart"},{default:t.withCtx(()=>[t.renderSlot(h.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):t.renderSlot(h.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),Oi={class:"toolbar-container"},Di={key:0,class:"toolbar-button-container"},Ki=["data-testid"],Li=X(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:n}){const o=e,{i18n:{t:r}}=R.useI18n(),a=t.computed(()=>o.cacheIdentifier||o.preferencesStorageKey),i=k=>k.hasData||!!o.query,l=t.computed(()=>{const k=[];return Object.keys(o.tableHeaders).forEach(_=>{const B=o.tableHeaders[_];k.push({label:B.label??_,key:_,sortable:B.sortable??!1})}),o.enableEntityActions&&k.push({key:"actions",hideLabel:!0}),k}),s=k=>({"data-rowid":k.id,"data-testid":k.name,...o.rowAttributes(k)}),c=t.ref({}),u=k=>{var _;return(_=c.value)==null?void 0:_.$el.querySelector(`[data-rowid="${k.id}"]`)},p=k=>{const _={"data-testid":k.headerKey,...o.cellAttributes(k)};return k.colIndex===0&&(_.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),_},d=()=>{n("empty-state-cta-clicked"),g()},g=()=>{n("clear-search-input")},m=t.computed(()=>o.disableRowClick?void 0:(k,_)=>{n("click:row",_)}),x=k=>{n("sort",k)},{setTablePreferences:h,getTablePreferences:f}=Oo(),S=t.computed(()=>{const k=f(o.preferencesStorageKey);return{...o.initialFetcherParams,...k}}),b=k=>{o.preferencesStorageKey&&h(o.preferencesStorageKey,k)};return(k,_)=>{const B=t.resolveComponent("KIcon"),$=t.resolveComponent("KButton"),M=t.resolveComponent("KDropdown"),y=t.resolveComponent("KTable"),C=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(C,{class:"kong-ui-entity-base-table",title:e.title},{body:t.withCtx(()=>[t.createVNode(y,{ref_key:"tableRefs",ref:c,"cache-identifier":a.value,"cell-attrs":p,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-title":e.errorMessage,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":!!e.errorMessage,headers:l.value,"hide-pagination-when-optional":"","initial-fetcher-params":S.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":s,"search-input":e.query,onKtableEmptyStateCtaClicked:d,"onRow:click":m.value,onSort:_[0]||(_[0]=V=>x(V)),"onUpdate:tablePreferences":b},t.createSlots({toolbar:t.withCtx(({state:V})=>[t.withDirectives(t.createElementVNode("div",Oi,[t.renderSlot(k.$slots,"toolbar-filter",{},void 0,!0),k.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",Di,[t.renderSlot(k.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,i(V)]])]),actions:t.withCtx(({row:V,rowKey:E,rowValue:w})=>[t.createElementVNode("div",{class:"actions-container","data-testid":V.name},[t.createVNode(M,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(k.$slots,"actions",{row:V,rowKey:E,rowValue:w},void 0,!0)]),default:t.withCtx(()=>[t.createVNode($,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:t.withCtx(()=>[t.createVNode(B,{color:t.unref(Vn),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,Ki)]),_:2},[t.renderList(e.tableHeaders,(V,E)=>({name:E,fn:t.withCtx(({row:w,rowKey:A,rowValue:T})=>[t.createVNode(Fi,{"key-name":String(E),"row-el":u(w)},{default:t.withCtx(()=>[t.renderSlot(k.$slots,E,{row:w,rowKey:A,rowValue:T},()=>[t.createTextVNode(t.toDisplayString(T),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-86d2d2a3"]]),qi={key:0,class:"kong-ui-entity-delete-error"},vi={key:1,class:"description"},Pi=X(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:n}){const o=e,{i18nT:r}=R.useI18n(),a=t.computed(()=>o.needConfirm?o.entityName:""),i=()=>{n("cancel")},l=()=>{n("proceed")};return(s,c)=>{const u=t.resolveComponent("KAlert"),p=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(p,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":a.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:i,onProceed:l},{"body-content":t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",qi,[t.createVNode(u,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:o.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.entityType),1)]),_:2},[o.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(o.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),o.description||s.$slots.description?(t.openBlock(),t.createElementBlock("div",vi,[t.renderSlot(s.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(o.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),Ri={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Ui={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Gi=["fill"],zi={mask:"url(#mask0_180_20349)"},Hi=["fill"],xo=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Nn})`}},setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("svg",Ri,[t.createElementVNode("mask",Ui,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,Gi)]),t.createElementVNode("g",zi,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,Hi)])]))}}),Ji={key:1,class:"kong-ui-entity-filter"},Yi={class:"menu-item-title"},Wi={class:"menu-item-indicator"},Zi={class:"menu-item-body"},Xi=["for"],Qi={class:"menu-item-buttons"},el={class:"filter-clear-button-container"},tl=X(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const o=e,{i18n:{t:r}}=R.useI18n(),a=t.ref(!1),i=t.ref({}),l=t.computed(()=>{const f=[];return new URLSearchParams(o.modelValue).forEach((S,b)=>{S!==""&&f.push(b)}),f}),s=t.computed(()=>{const f=o.config.fields;return Object.keys(f).filter(S=>f[S].searchable).map(S=>({label:f[S].label||S,value:S}))});t.watch(()=>o.modelValue,f=>{i.value={},new URLSearchParams(f).forEach((S,b)=>{i.value[b]=S})});const c=()=>{a.value=!a.value},u=f=>{n("update:modelValue",f)},p=f=>`filter-${f}`,d=f=>{var S,b;return(((b=(S=o.config.schema)==null?void 0:S[f])==null?void 0:b.values)??[]).map(k=>({value:k,label:k}))},g=f=>{var S,b;return((b=(S=o.config.schema)==null?void 0:S[f])==null?void 0:b.type)??"text"},m=f=>{i.value={...i.value,[f]:""},h()},x=()=>{i.value={},h(!0)},h=(f=!1)=>{const S=Object.keys(i.value).reduce((b,k)=>(i.value[k]&&(b[k]=`${i.value[k]}`),b),{});f&&(a.value=!1),n("update:modelValue",new URLSearchParams(S).toString())};return(f,S)=>{const b=t.resolveComponent("KInput"),k=t.resolveComponent("KButton"),_=t.resolveComponent("KSelect"),B=t.resolveComponent("KMenuItem"),$=t.resolveComponent("KMenu");return e.config.isExactMatch?(t.openBlock(),t.createBlock(b,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":u},{before:t.withCtx(()=>[t.createVNode(xo)]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",Ji,[t.createVNode(k,{appearance:"tertiary","data-testid":"filter-button",onClick:c},{default:t.withCtx(()=>[t.createVNode(xo),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(l.value.length>0?`(${l.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:c},null,512),[[t.vShow,a.value]]),t.withDirectives(t.createVNode($,{class:"kong-ui-entity-filter-menu"},{body:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(M,y)=>(t.openBlock(),t.createBlock(B,{key:M.value,"data-testid":M.value,expandable:"","last-menu-item":y===s.value.length-1},{itemTitle:t.withCtx(()=>[t.createElementVNode("span",Yi,[t.createTextVNode(t.toDisplayString(M.label)+" ",1),t.withDirectives(t.createElementVNode("span",Wi,null,512),[[t.vShow,l.value.includes(M.value)]])])]),itemBody:t.withCtx(()=>{var C,V;return[t.createElementVNode("div",Zi,[t.createElementVNode("label",{class:"menu-item-label",for:p(M.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,Xi),((V=(C=e.config.schema)==null?void 0:C[M.value])==null?void 0:V.type)==="select"?(t.openBlock(),t.createBlock(_,{key:0,id:p(M.value),modelValue:i.value[M.value],"onUpdate:modelValue":E=>i.value[M.value]=E,appearance:"select",items:d(M.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(b,{key:1,id:p(M.value),modelValue:i.value[M.value],"onUpdate:modelValue":E=>i.value[M.value]=E,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:g(M.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),t.createElementVNode("div",Qi,[t.createVNode(k,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:S[0]||(S[0]=E=>h(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(k,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:E=>m(M.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:t.withCtx(()=>[t.createElementVNode("div",el,[t.createVNode(k,{size:"small",onClick:x},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[t.vShow,a.value]])]))}}}),[["__scopeId","data-v-4ea260f0"]]),Te=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const n=e,o=t.ref(void 0),r=t.computed(()=>o.value===!0||o.value!==void 0&&n.forceShow===!0);return t.watch(()=>n.authFunction,async()=>{o.value=await n.authFunction()},{immediate:!0}),(a,i)=>r.value?t.renderSlot(a.$slots,"default",{key:0,isAllowed:o.value}):t.createCommentVNode("",!0)}}),ol={class:"form-section-wrapper"},nl={key:0,class:"form-section-title"},rl={key:1,class:"form-section-description"},al={key:2,class:"form-section-footer"},il={class:"form-section-content"},ll=X(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const n=t.useSlots();return(o,r)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[t.createElementVNode("div",ol,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createElementBlock("h4",nl,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.description||t.unref(n).description?(t.openBlock(),t.createElementBlock("div",rl,[t.renderSlot(o.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(n).footer?(t.openBlock(),t.createElementBlock("div",al,[t.renderSlot(o.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",il,[t.renderSlot(o.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:Xe,useDeleteUrlBuilder:sl,useErrors:cl,useExternalLinkCreator:Jl,useFetchUrlBuilder:Yl,useFetcher:dl,useDebouncedFilter:ul,useStringHelpers:Wl,useHelpers:Zl,useGatewayFeatureSupported:Xl,useTruncationDetector:Ql}=R,es="",pl={class:"add-consumer-form-container"},fl={class:"add-consumer-form-cta"},ml={class:"select-item-label"},gl={key:0,class:"select-item-desc"},yl={key:0,class:"kong-ui-entity-add-consumers-error"},hl={key:0},Cl=t.defineComponent({__name:"AddConsumerModal",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.consumerGroupId)},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","add:success","add:partial-success","error"],setup(e,{emit:n}){var E;const o=e,{i18n:{t:r}}=_e.useI18n(),{axiosInstance:a}=Xe({headers:(E=o.config)==null?void 0:E.requestHeaders}),i=t.ref([]),{debouncedQueryChange:l,loading:s,allRecords:c,error:u,loadItems:p,results:d}=ul(o.config,ae.list[o.config.app].all,"",{fetchedItemsKey:"data",searchKeys:["username","id"]}),g=w=>w,m=t.computed(()=>u.value?r("consumers.errors.general"):""),x=t.ref(0),h=t.computed(()=>c.value===void 0),f=t.computed(()=>d.value.map(w=>({label:w.username||w.customId,value:w.id,selected:i.value.includes(w.id),data:w}))),S=w=>{var T;const A=h.value?d.value.find(j=>j.id===w):(T=c.value)==null?void 0:T.find(j=>j.id===w);return A?A.username||A.custom_id:w},b=()=>{B.value="",k.value=[],C.value=[],n("cancel")},k=t.ref([]),_=t.ref(!1),B=t.ref(""),$=async()=>{if(!i.value.length){B.value="",C.value=[],n("cancel");return}_.value=!0,B.value="",k.value=[],C.value=[];try{const w=i.value.map(j=>y(j)),A=await Promise.allSettled(w);let T=!0;A.forEach(j=>{j.status!=="fulfilled"&&(T=!1)}),T?(k.value=[],C.value=[],n("add:success",i.value),i.value=[]):(k.value.length&&n("add:partial-success",k.value),i.value=[],V(A))}catch{B.value=r("consumers.errors.add"),n("error",B.value)}finally{_.value=!1}},M=t.computed(()=>{var A,T,j,L;let w=`${o.config.apiBaseUrl}${ae.list[o.config.app].forConsumerGroup}`;return o.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((A=o.config)==null?void 0:A.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((T=o.config)==null?void 0:T.consumerGroupId)||""):o.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(j=o.config)!=null&&j.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((L=o.config)==null?void 0:L.consumerGroupId)||"")),w}),y=async w=>{const A={consumer:w};try{const T=await a.post(M.value,A);return k.value.push(w),T}catch(T){let j=`${S(w)} - ${T.message}`;return T.response.status===409&&(j=`${S(w)} - ${r("consumers.errors.already_added")}`),Promise.reject(Error(j))}},C=t.ref([]),V=w=>{C.value=w.map(A=>{var T;return(T=A.reason)==null?void 0:T.message}).filter(Boolean)};return t.watch(f,()=>{x.value++},{immediate:!0,deep:!0}),t.onBeforeMount(async()=>{await p()}),(w,A)=>{const T=t.resolveComponent("KMultiselect"),j=t.resolveComponent("KAlert"),L=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(L,{"action-pending":_.value,class:"kong-ui-entities-add-consumers-modal","data-testid":"add-consumer-modal","is-visible":e.visible,title:t.unref(r)("consumers.consumer_groups.add.title"),onCanceled:b,onProceed:$},{"body-content":t.withCtx(()=>[t.createElementVNode("div",pl,[t.createElementVNode("p",fl,t.toDisplayString(t.unref(r)("consumers.consumer_groups.add.ctaText")),1),t.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=F=>i.value=F),autosuggest:"","data-testid":"add-consumers-multiselect","dropdown-footer-text":h.value?t.unref(r)("consumers.consumer_groups.add.footer"):void 0,items:f.value,label:t.unref(r)("consumers.consumer_groups.add.consumers_label"),loading:t.unref(s),placeholder:t.unref(r)("consumers.consumer_groups.add.consumer_placeholder"),readonly:_.value,required:"",width:"100%",onQueryChange:t.unref(l)},{"item-template":t.withCtx(({item:F})=>[t.createElementVNode("div",ml,t.toDisplayString(F.label),1),g(F).data.username&&g(F).data.custom_id?(t.openBlock(),t.createElementBlock("div",gl,t.toDisplayString(g(F).data.custom_id),1)):t.createCommentVNode("",!0)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),B.value||m.value||C.value.length?(t.openBlock(),t.createElementBlock("div",yl,[t.createVNode(j,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createElementVNode("p",null,t.toDisplayString(t.unref(r)("consumers.errors.add")),1),C.value.length?(t.openBlock(),t.createElementBlock("ul",hl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,(F,q)=>(t.openBlock(),t.createElementBlock("li",{key:q},t.toDisplayString(F),1))),128))])):t.createCommentVNode("",!0),t.createElementVNode("div",null,t.toDisplayString(B.value||m.value),1)]),_:1})])):t.createCommentVNode("",!0)])]),_:1},8,["action-pending","is-visible","title"])}}}),ts="",Qe=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},kl=Qe(Cl,[["__scopeId","data-v-86f09821"]]),bl={class:"kong-ui-entities-consumers-list"},wl={key:1},xl=t.defineComponent({__name:"ConsumerList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success","add:success","remove:success"],setup(e,{emit:n}){var Ao;const o=e,{i18nT:r,i18n:{t:a}}=_e.useI18n(),i=$e.useRouter(),{axiosInstance:l}=Xe({headers:(Ao=o.config)==null?void 0:Ao.requestHeaders}),s=t.ref(1),c=t.computed(()=>!!o.config.consumerGroupId),u=t.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),p={username:{label:a("consumers.list.table_headers.username"),searchable:!0,sortable:!0},custom_id:{label:a("consumers.list.table_headers.custom_id"),searchable:!0,sortable:!0},tags:{label:a("consumers.list.table_headers.tags"),sortable:!1}},d=p,g=N=>({"data-testid":N.username??N.custom_id??N.id}),m=t.computed(()=>{var O,U,Q,se;let N=`${o.config.apiBaseUrl}${ae.list[o.config.app][c.value?"forConsumerGroup":"all"]}`;return o.config.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,((O=o.config)==null?void 0:O.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((U=o.config)==null?void 0:U.consumerGroupId)||""):o.config.app==="kongManager"&&(N=N.replace(/\/{workspace}/gi,(Q=o.config)!=null&&Q.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((se=o.config)==null?void 0:se.consumerGroupId)||"")),N}),x=t.ref(""),h=t.computed(()=>{const N=o.config.app==="konnect"||o.config.isExactMatch;return N?{isExactMatch:N,placeholder:a("consumers.search.placeholder")}:{isExactMatch:N,fields:{username:p.username,custom_id:p.custom_id},schema:o.config.filterSchema}}),f=t.computed(()=>c.value?"consumers":void 0),{fetcher:S,fetcherState:b}=dl(o.config,m.value,f.value),k=()=>{x.value=""},_=()=>{s.value++},B=N=>N??"-",$=t.ref(""),M=(N,O)=>{const U=N.id;if(!O(U)){n("copy:error",{entity:N,field:"id",message:a("consumers.errors.copy")});return}n("copy:success",{entity:N,field:"id",message:a("consumers.copy.success",{val:U})})},y=(N,O)=>{const U=JSON.stringify(N);if(!O(U)){n("copy:error",{entity:N,message:a("consumers.errors.copy")});return}n("copy:success",{entity:N,message:a("consumers.copy.success_brief")})},C=async N=>{var U;await((U=o.canRetrieve)==null?void 0:U.call(o,N))&&i.push(o.config.getViewRoute(N.id))},V=N=>({label:a("consumers.actions.view"),to:o.config.getViewRoute(N)}),E=N=>({label:a("consumers.actions.edit"),to:o.config.getEditRoute(N)}),w=t.ref(void 0),A=t.ref(!1),T=t.ref(!1),j=t.ref(""),L=sl(o.config,m.value),F=N=>{w.value=N,A.value=!0},q=()=>{A.value=!1},W=async()=>{var N,O,U;if((N=w.value)!=null&&N.id){T.value=!0;try{await l.delete(L(w.value.id)),T.value=!1,A.value=!1,s.value++,n("delete:success",w.value)}catch(Q){j.value=((U=(O=Q.response)==null?void 0:O.data)==null?void 0:U.message)||Q.message||a("consumers.errors.delete"),n("error",Q)}finally{T.value=!1}}},et=t.ref(!1),So=()=>{et.value=!0},_o=()=>{et.value=!1},Bo=(N,O)=>{O||_o(),s.value++,n("add:success",N)},Tl=()=>{c.value&&So()},oe=t.ref(void 0),tt=t.ref(!1),$l=t.ref(""),Ml=N=>{oe.value=N,tt.value=!0},Io=()=>{tt.value=!1,oe.value=void 0},jl=t.computed(()=>{var O,U,Q,se;let N=`${o.config.apiBaseUrl}${ae.list[o.config.app].oneForConsumerGroup}`;return o.config.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,((O=o.config)==null?void 0:O.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((U=o.config)==null?void 0:U.consumerGroupId)||""):o.config.app==="kongManager"&&(N=N.replace(/\/{workspace}/gi,(Q=o.config)!=null&&Q.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((se=o.config)==null?void 0:se.consumerGroupId)||"")),N}),No=t.ref(!1),Fl=async()=>{if(oe.value){No.value=!0;try{const N=jl.value.replace(/{consumerId}/gi,oe.value.id);await l.delete(N),n("remove:success",oe.value),Io(),s.value++}catch(N){$l.value=N.message||a("consumers.errors.delete"),n("error",N)}finally{No.value=!1}}};t.watch(b,N=>{if(N.status===ie.Error){$.value=a("consumers.errors.general"),n("error",N.error);return}$.value=""});const ot=t.ref({ctaPath:c.value?void 0:o.config.createRoute,ctaText:void 0,message:a("consumers.list.empty_state.description"),title:a("consumers.title")});return t.onBeforeMount(async()=>{await o.canCreate()&&(ot.value.title=c.value?a("consumers.list.empty_state.title_for_consumer_group"):a("consumers.list.empty_state.title"),ot.value.ctaText=c.value?a("consumers.actions.add_consumer"):a("consumers.actions.create"))}),(N,O)=>{const U=t.resolveComponent("KButton"),Q=t.resolveComponent("KBadge"),se=t.resolveComponent("KTruncate"),Se=t.resolveComponent("KDropdownItem"),Vo=t.resolveComponent("KClipboardProvider"),Ol=t.resolveComponent("KPrompt");return t.openBlock(),t.createElementBlock("div",bl,[t.createVNode(t.unref(Li),{"cache-identifier":e.cacheIdentifier,"disable-pagination":c.value,"disable-pagination-page-jump":"","disable-sorting":u.value,"empty-state-options":ot.value,"enable-entity-actions":"","error-message":$.value,fetcher:t.unref(S),"fetcher-cache-key":s.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-consumers-list",query:x.value,"row-attributes":g,"table-headers":t.unref(d),onClearSearchInput:k,"onClick:row":O[3]||(O[3]=D=>C(D)),onEmptyStateCtaClicked:Tl,onSort:_},{"toolbar-filter":t.withCtx(()=>[c.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(tl),{key:0,modelValue:x.value,"onUpdate:modelValue":O[0]||(O[0]=D=>x.value=D),config:h.value},null,8,["modelValue","config"]))]),"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(Te),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(U,{appearance:"primary","data-testid":"toolbar-add-consumer",icon:"plus",to:e.config.consumerGroupId?void 0:e.config.createRoute,onClick:O[1]||(O[1]=()=>e.config.consumerGroupId?So():void 0)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.config.consumerGroupId?t.unref(a)("consumers.actions.add_consumer"):t.unref(a)("consumers.list.toolbar_actions.new_consumer")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),username:t.withCtx(({rowValue:D})=>[t.createElementVNode("b",null,t.toDisplayString(B(D)),1)]),custom_id:t.withCtx(({rowValue:D})=>[t.createTextVNode(t.toDisplayString(B(D)),1)]),tags:t.withCtx(({rowValue:D})=>[D&&D.length>0?(t.openBlock(),t.createBlock(se,{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D,ye=>(t.openBlock(),t.createBlock(Q,{key:ye,onClick:O[2]||(O[2]=t.withModifiers(()=>{},["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(ye),1)]),_:2},1024))),128))]),_:2},1024)):(t.openBlock(),t.createElementBlock("span",wl,"-"))]),actions:t.withCtx(({row:D})=>[t.createVNode(Vo,null,{default:t.withCtx(({copyToClipboard:ye})=>[t.createVNode(Se,{"data-testid":"action-entity-copy-id",onClick:Dl=>M(D,ye)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("consumers.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(Vo,null,{default:t.withCtx(({copyToClipboard:ye})=>[t.createVNode(Se,{"data-testid":"action-entity-copy-json",onClick:Dl=>y(D,ye)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("consumers.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(Te),{"auth-function":()=>e.canRetrieve(D)},{default:t.withCtx(()=>[t.createVNode(Se,{"data-testid":"action-entity-view","has-divider":"",item:V(D.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(Te),{"auth-function":()=>e.canEdit(D)},{default:t.withCtx(()=>[t.createVNode(Se,{"data-testid":"action-entity-edit",item:E(D.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(Te),{"auth-function":()=>e.canDelete(D)},{default:t.withCtx(()=>[t.createVNode(Se,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>e.config.consumerGroupId?Ml(D):F(D)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.config.consumerGroupId?t.unref(a)("consumers.actions.remove"):t.unref(a)("consumers.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-pagination","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),t.createVNode(t.unref(Pi),{"action-pending":T.value,"data-testid":"delete-consumer-modal",description:t.unref(a)("consumers.delete.description"),"entity-name":w.value&&(w.value.username||w.value.custom_id||w.value.id),"entity-type":t.unref(nt).Consumer,error:j.value,title:t.unref(a)("consumers.delete.title"),visible:A.value,onCancel:q,onProceed:W},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),e.config.consumerGroupId?(t.openBlock(),t.createBlock(kl,{key:0,config:e.config,"data-testid":"add-consumer-modal",visible:et.value,"onAdd:partialSuccess":O[4]||(O[4]=D=>Bo(D,!0)),"onAdd:success":O[5]||(O[5]=D=>Bo(D)),onCancel:_o},null,8,["config","visible"])):t.createCommentVNode("",!0),e.config.consumerGroupId&&oe.value?(t.openBlock(),t.createBlock(Ol,{key:1,"data-testid":"remove-consumer-modal","is-visible":tt.value,title:t.unref(a)("consumers.consumer_groups.remove.title"),type:"danger",onCanceled:Io,onProceed:Fl},{"body-content":t.withCtx(()=>[t.createVNode(t.unref(r),{class:"message",keypath:e.config.consumerGroupName?"consumers.consumer_groups.remove.confirmation":"consumers.consumer_groups.remove.confirmationNoCG",tag:"p"},t.createSlots({consumer:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(oe.value.username||oe.value.custom_id||oe.value.id),1)]),_:2},[e.config.consumerGroupName?{name:"consumerGroup",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.config.consumerGroupName),1)]),key:"0"}:void 0]),1032,["keypath"]),t.createElementVNode("p",null,t.toDisplayString(t.unref(a)("consumers.consumer_groups.remove.description")),1)]),_:1},8,["is-visible","title"])):t.createCommentVNode("",!0)])}}}),os="",Sl=Qe(xl,[["__scopeId","data-v-b084add6"]]),_l={class:"kong-ui-entities-consumer-form"},Bl={class:"fields-group-title"},Il={class:"fields-group-text"},Nl=t.defineComponent({__name:"ConsumerForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||(e==null?void 0:e.app)==="konnect"&&!(e!=null&&e.controlPlaneId)||(e==null?void 0:e.app)==="kongManager"&&typeof(e==null?void 0:e.workspace)!="string"||!(e!=null&&e.cancelRoute))},consumerId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:n}){var _;const o=e,{i18nT:r,i18n:{t:a}}=_e.useI18n(),i=$e.useRouter(),{axiosInstance:l}=Xe({headers:(_=o.config)==null?void 0:_.requestHeaders}),{getMessageFromError:s}=cl(),c=t.reactive({fields:{username:"",customId:"",tags:""},readonly:!1,errorMessage:""}),u=t.reactive({username:"",customId:"",tags:""}),p=t.computed(()=>{var B,$;return($=ae.form[(B=o.config)==null?void 0:B.app])==null?void 0:$.edit}),d=()=>{var B;i.push(((B=o.config)==null?void 0:B.cancelRoute)||{name:"consumer-list"})},g=B=>{n("loading",B)},m=B=>{n("error",B)},x=B=>{var M,y,C;c.fields.username=((M=B==null?void 0:B.item)==null?void 0:M.username)||(B==null?void 0:B.username)||"",c.fields.customId=((y=B==null?void 0:B.item)==null?void 0:y.custom_id)||(B==null?void 0:B.custom_id)||"";const $=((C=B==null?void 0:B.item)==null?void 0:C.tags)||(B==null?void 0:B.tags)||[];c.fields.tags=($==null?void 0:$.join(", "))||"",Object.assign(u,c.fields)},h=t.computed(()=>o.consumerId?Me.Edit:Me.Create),f=B=>{var M,y,C,V,E,w;let $=`${(M=o.config)==null?void 0:M.apiBaseUrl}${ae.form[(y=o.config)==null?void 0:y.app][B]}`;return((C=o.config)==null?void 0:C.app)==="konnect"?$=$.replace(/{controlPlaneId}/gi,((V=o.config)==null?void 0:V.controlPlaneId)||""):((E=o.config)==null?void 0:E.app)==="kongManager"&&($=$.replace(/\/{workspace}/gi,(w=o.config)!=null&&w.workspace?`/${o.config.workspace}`:"")),$=$.replace(/{id}/gi,o.consumerId),$},S=t.computed(()=>!!c.fields.username||!!c.fields.customId),b=t.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(u)),k=async()=>{var B,$,M;try{c.readonly=!0;const y={username:c.fields.username||null,custom_id:c.fields.customId||null,tags:($=(B=c.fields.tags.split(","))==null?void 0:B.map(V=>String(V||"").trim()))==null?void 0:$.filter(V=>V!=="")};let C;await l.post(f("validate"),y),h.value==="create"?C=await l.post(f("create"),y):h.value==="edit"&&(C=((M=o.config)==null?void 0:M.app)==="konnect"?await l.put(f("edit"),y):await l.patch(f("edit"),y)),x(C==null?void 0:C.data),n("update",C==null?void 0:C.data)}catch(y){c.errorMessage=s(y),n("error",y)}finally{c.readonly=!1}};return(B,$)=>{const M=t.resolveComponent("KInput"),y=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",_l,[t.createVNode(t.unref(Mi),{"can-submit":S.value&&b.value,config:e.config,"edit-id":e.consumerId,"error-message":c.errorMessage,"fetch-url":p.value,"is-readonly":c.readonly,onCancel:d,"onFetch:error":$[3]||($[3]=C=>m(C)),"onFetch:success":x,onLoading:$[4]||($[4]=C=>g(C)),onSubmit:k},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(ll),{description:t.unref(a)("consumers.form.info.description"),"has-divider":"",title:t.unref(a)("consumers.form.info.title")},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("h5",Bl,t.toDisplayString(t.unref(a)("consumers.form.consumer_identification.title"))+"* ",1),t.createElementVNode("p",Il,t.toDisplayString(t.unref(a)("consumers.form.consumer_identification.description")),1)]),t.createVNode(y,null,{body:t.withCtx(()=>[t.createVNode(M,{modelValue:c.fields.username,"onUpdate:modelValue":$[0]||($[0]=C=>c.fields.username=C),modelModifiers:{trim:!0},autocomplete:"off",class:"username-field","data-testid":"consumer-form-username",label:t.unref(a)("consumers.fields.username.label"),"label-attributes":{tooltipAttributes:{maxWidth:"250"}},placeholder:t.unref(a)("consumers.fields.username.placeholder"),readonly:c.readonly,type:"text"},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"consumers.fields.username.tooltip",scope:"global"},{custom_id:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("consumers.fields.username.custom_id")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),t.createVNode(M,{modelValue:c.fields.customId,"onUpdate:modelValue":$[1]||($[1]=C=>c.fields.customId=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-custom-id",label:t.unref(a)("consumers.fields.custom_id.label"),"label-attributes":{tooltipAttributes:{maxWidth:"250"}},placeholder:t.unref(a)("consumers.fields.custom_id.placeholder"),readonly:c.readonly,type:"text"},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"consumers.fields.custom_id.tooltip",scope:"global"},{username:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])]),_:1}),t.createVNode(M,{modelValue:c.fields.tags,"onUpdate:modelValue":$[2]||($[2]=C=>c.fields.tags=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-tags",help:t.unref(a)("consumers.fields.tags.help"),label:t.unref(a)("consumers.fields.tags.label"),"label-attributes":{info:t.unref(a)("consumers.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250"}},placeholder:t.unref(a)("consumers.fields.tags.placeholder"),readonly:c.readonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),ns="",Al=Qe(Nl,[["__scopeId","data-v-335659fc"]]),Vl={class:"kong-ui-consumer-entity-config-card"},El=t.defineComponent({__name:"ConsumerConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e){const n=e,{i18n:{t:o},i18nT:r}=_e.useI18n(),a=t.computed(()=>ae.form[n.config.app].edit),i=t.ref({id:{},username:{section:J.Basic,tooltip:o("consumers.fields.username.tooltip"),order:1},custom_id:{section:J.Basic,tooltip:o("consumers.fields.custom_id.tooltip"),label:o("consumers.fields.custom_id.label"),order:2},updated_at:{},created_at:{},tags:{tooltip:o("consumers.fields.tags.tooltip")},username_lower:{hidden:!0},type:{hidden:!0}});return(l,s)=>(t.openBlock(),t.createElementBlock("div",Vl,[t.createVNode(t.unref(Ei),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":i.value,"fetch-url":a.value,"hide-title":e.hideTitle,"onCopy:success":s[0]||(s[0]=c=>l.$emit("copy:success",c)),"onFetch:error":s[1]||(s[1]=c=>l.$emit("fetch:error",c)),"onFetch:success":s[2]||(s[2]=c=>l.$emit("fetch:success",c)),onLoading:s[3]||(s[3]=c=>l.$emit("loading",c))},{"username-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"consumers.fields.username.tooltip",scope:"global"},{custom_id:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("consumers.fields.username.custom_id")),1)]),_:1})]),"custom_id-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"consumers.fields.custom_id.tooltip",scope:"global"},{username:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});Z.ConsumerConfigCard=El,Z.ConsumerForm=Al,Z.ConsumerList=Sl,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-consumers",
|
|
3
|
-
"version": "2.0.2
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-consumers.umd.js",
|
|
6
6
|
"module": "./dist/entities-consumers.es.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"errorLimit": "500KB"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@kong-ui-public/entities-shared": "^2.0.2
|
|
52
|
+
"@kong-ui-public/entities-shared": "^2.0.2"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"dev": "cross-env USE_SANDBOX=true vite",
|