@kong-ui-public/entities-snis 3.0.9 → 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-snis.es.js +793 -780
- package/dist/entities-snis.umd.js +20 -20
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/entities-snis.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as
|
|
1
|
+
import { defineComponent as ae, ref as j, computed as N, watch as me, renderSlot as le, createCommentVNode as te, unref as m, onBeforeMount as at, resolveComponent as $, openBlock as I, createBlock as z, withCtx as b, createElementVNode as U, toDisplayString as M, createElementBlock as q, withModifiers as Xe, createVNode as _, createTextVNode as Z, createSlots as Vt, withDirectives as fe, vShow as ge, renderList as ot, Fragment as zt, normalizeClass as Ee, withKeys as Hn, useSlots as Yn, resolveDynamicComponent as Ue, useCssVars as Wn, inject as Jn, onMounted as Zn, onUnmounted as Gn, normalizeStyle as lt, pushScopeId as st, popScopeId as ct, reactive as vt } from "vue";
|
|
2
2
|
import { createI18n as Ht, i18nTComponent as Yt } from "@kong-ui-public/i18n";
|
|
3
3
|
import bt from "axios";
|
|
4
4
|
import "@kong/kongponents";
|
|
@@ -92,10 +92,10 @@ function ai() {
|
|
|
92
92
|
}
|
|
93
93
|
const Jt = {
|
|
94
94
|
useI18n: ai
|
|
95
|
-
},
|
|
95
|
+
}, Te = "/v2/control-planes/{controlPlaneId}/core-entities", Oe = "/{workspace}", je = {
|
|
96
96
|
list: {
|
|
97
97
|
konnect: {
|
|
98
|
-
all: `${
|
|
98
|
+
all: `${Te}/snis`
|
|
99
99
|
},
|
|
100
100
|
kongManager: {
|
|
101
101
|
all: `${Oe}/snis`
|
|
@@ -103,10 +103,10 @@ const Jt = {
|
|
|
103
103
|
},
|
|
104
104
|
form: {
|
|
105
105
|
konnect: {
|
|
106
|
-
create: `${
|
|
107
|
-
edit: `${
|
|
108
|
-
validate: `${
|
|
109
|
-
certificates: `${
|
|
106
|
+
create: `${Te}/snis`,
|
|
107
|
+
edit: `${Te}/snis/{id}`,
|
|
108
|
+
validate: `${Te}/v1/schemas/json/sni/validate`,
|
|
109
|
+
certificates: `${Te}/certificates`
|
|
110
110
|
},
|
|
111
111
|
kongManager: {
|
|
112
112
|
create: `${Oe}/snis`,
|
|
@@ -116,7 +116,7 @@ const Jt = {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
var
|
|
119
|
+
var Zt = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(Zt || {}), Re = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Re || {}), ve = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(ve || {});
|
|
120
120
|
function oi() {
|
|
121
121
|
return {
|
|
122
122
|
getAxiosInstance: (e = {}) => {
|
|
@@ -291,7 +291,7 @@ const ui = {
|
|
|
291
291
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
292
292
|
confirmText: "Yes, disable"
|
|
293
293
|
}
|
|
294
|
-
},
|
|
294
|
+
}, ki = {
|
|
295
295
|
global: ui,
|
|
296
296
|
deleteModal: di,
|
|
297
297
|
baseForm: pi,
|
|
@@ -304,14 +304,14 @@ const ui = {
|
|
|
304
304
|
toggleModal: bi
|
|
305
305
|
};
|
|
306
306
|
function He() {
|
|
307
|
-
const e = Ht("en-us",
|
|
307
|
+
const e = Ht("en-us", ki);
|
|
308
308
|
return {
|
|
309
309
|
i18n: e,
|
|
310
310
|
i18nT: Yt(e)
|
|
311
311
|
// Translation component <i18n-t>
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Gt() {
|
|
315
315
|
const e = (n, i) => (i == null ? void 0 : i[n]) ?? void 0, t = (n, i) => {
|
|
316
316
|
if (n.length !== i.length)
|
|
317
317
|
return !1;
|
|
@@ -355,68 +355,68 @@ function Zt() {
|
|
|
355
355
|
isValidUuid: (n) => n ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(n) : !1
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function wi(e, t, n, i = {
|
|
359
359
|
fetchedItemsKey: "data",
|
|
360
360
|
searchKeys: ["id"]
|
|
361
361
|
}) {
|
|
362
362
|
n || (n = "1000");
|
|
363
|
-
const { axiosInstance: r } = ut(e.axiosRequestConfig), { i18n: { t: o } } = He(), { debounce: a } = li(), l = a(async (
|
|
364
|
-
await
|
|
365
|
-
}, 200), s =
|
|
366
|
-
let
|
|
367
|
-
e.app === "konnect" ?
|
|
368
|
-
const { isValidUuid:
|
|
363
|
+
const { axiosInstance: r } = ut(e.axiosRequestConfig), { i18n: { t: o } } = He(), { debounce: a } = li(), l = a(async (h) => {
|
|
364
|
+
await J(h);
|
|
365
|
+
}, 200), s = j(!1), u = j(""), d = j(""), c = j([]), f = j([]), p = j(void 0), w = m(t);
|
|
366
|
+
let S = `${e.apiBaseUrl}${w}`;
|
|
367
|
+
e.app === "konnect" ? S = S.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (S = S.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
368
|
+
const { isValidUuid: C } = Gt(), O = async () => {
|
|
369
369
|
try {
|
|
370
370
|
s.value = !0;
|
|
371
|
-
const { data:
|
|
372
|
-
|
|
371
|
+
const { data: h } = await r.get(`${S}?size=${n}`);
|
|
372
|
+
h != null && h.next || (p.value = i.fetchedItemsKey in h ? h[i.fetchedItemsKey] : []), f.value = i.fetchedItemsKey in h ? h[i.fetchedItemsKey] : [], c.value = f.value;
|
|
373
373
|
} catch {
|
|
374
374
|
c.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
375
375
|
} finally {
|
|
376
376
|
s.value = !1;
|
|
377
377
|
}
|
|
378
|
-
},
|
|
379
|
-
var g,
|
|
380
|
-
if (
|
|
381
|
-
if (
|
|
378
|
+
}, y = j(""), J = async (h) => {
|
|
379
|
+
var g, v, E;
|
|
380
|
+
if (y.value !== h)
|
|
381
|
+
if (y.value = h || "", p.value === void 0)
|
|
382
382
|
try {
|
|
383
383
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
384
|
-
let K =
|
|
385
|
-
|
|
386
|
-
const { data:
|
|
387
|
-
i.fetchedItemsKey in
|
|
388
|
-
} else if (
|
|
384
|
+
let K = S + "";
|
|
385
|
+
h && (K += `/${h}`);
|
|
386
|
+
const { data: x } = await r.get(`${K}?size=${n}`);
|
|
387
|
+
i.fetchedItemsKey in x ? c.value = x[i.fetchedItemsKey] : x != null && x.id ? c.value = [x] : c.value = [];
|
|
388
|
+
} else if (h) {
|
|
389
389
|
const K = [];
|
|
390
|
-
|
|
391
|
-
const { data: R } = await r.get(`${
|
|
390
|
+
C(h) && i.searchKeys.includes("id") ? K.push((async () => {
|
|
391
|
+
const { data: R } = await r.get(`${S}/${h}`);
|
|
392
392
|
return [R[i.fetchedItemsKey] ?? R];
|
|
393
393
|
})()) : K.push(
|
|
394
394
|
...i.searchKeys.filter((R) => R !== "id").map(async (R) => {
|
|
395
|
-
const { data:
|
|
396
|
-
return
|
|
395
|
+
const { data: L } = await r.get(`${S}?${R}=${h}`);
|
|
396
|
+
return L[i.fetchedItemsKey];
|
|
397
397
|
})
|
|
398
398
|
);
|
|
399
|
-
const
|
|
400
|
-
c.value = [], (g =
|
|
401
|
-
var
|
|
402
|
-
(
|
|
403
|
-
G.has(
|
|
399
|
+
const x = await Promise.all(K), G = /* @__PURE__ */ new Set();
|
|
400
|
+
c.value = [], (g = x == null ? void 0 : x.forEach) == null || g.call(x, (R) => {
|
|
401
|
+
var L;
|
|
402
|
+
(L = R == null ? void 0 : R.forEach) == null || L.call(R, (Q) => {
|
|
403
|
+
G.has(Q.id) || (G.add(Q.id), c.value.push(Q));
|
|
404
404
|
});
|
|
405
405
|
});
|
|
406
406
|
} else
|
|
407
407
|
c.value = f.value;
|
|
408
408
|
} catch (K) {
|
|
409
|
-
((
|
|
409
|
+
((v = K == null ? void 0 : K.response) == null ? void 0 : v.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (c.value = [], u.value = o("debouncedFilter.errors.fetch"));
|
|
410
410
|
} finally {
|
|
411
411
|
s.value = !1;
|
|
412
412
|
}
|
|
413
413
|
else
|
|
414
|
-
s.value = !0, d.value = "",
|
|
415
|
-
var
|
|
414
|
+
s.value = !0, d.value = "", h ? (c.value = (E = p.value) == null ? void 0 : E.filter((K) => {
|
|
415
|
+
var x;
|
|
416
416
|
let G = !1;
|
|
417
417
|
for (const R of i.searchKeys) {
|
|
418
|
-
const
|
|
419
|
-
|
|
418
|
+
const L = typeof K[R] == "string" ? (x = K[R]) == null ? void 0 : x.toLowerCase() : K[R];
|
|
419
|
+
L != null && L.includes(h.toLowerCase()) && (G = !0);
|
|
420
420
|
}
|
|
421
421
|
return G;
|
|
422
422
|
}), (!c.value || !c.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : c.value = p.value, s.value = !1;
|
|
@@ -427,17 +427,17 @@ function ki(e, t, n, i = {
|
|
|
427
427
|
validationError: d,
|
|
428
428
|
results: c,
|
|
429
429
|
allRecords: p,
|
|
430
|
-
loadItems:
|
|
430
|
+
loadItems: O,
|
|
431
431
|
debouncedQueryChange: l
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
const n =
|
|
434
|
+
function Si(e, t) {
|
|
435
|
+
const n = m(t), i = N(
|
|
436
436
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
437
437
|
);
|
|
438
438
|
return i.value.search = "", (r) => `${i.value.href}/${r}`;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Ci() {
|
|
441
441
|
const { i18n: { t: e } } = He();
|
|
442
442
|
return {
|
|
443
443
|
getMessageFromError: (t) => {
|
|
@@ -479,17 +479,17 @@ function Ai(e) {
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
function Qt(e, t) {
|
|
482
|
-
const n =
|
|
482
|
+
const n = j(m(e)), i = j(m(t)), r = N(
|
|
483
483
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
484
|
-
), o =
|
|
484
|
+
), o = N(
|
|
485
485
|
() => i.value.startsWith("/") ? new URL(`${window.location.origin}${i.value}`) : new URL(i.value)
|
|
486
486
|
);
|
|
487
487
|
return (a) => {
|
|
488
488
|
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: f } = a;
|
|
489
489
|
try {
|
|
490
490
|
let p = new URL(o.value.href);
|
|
491
|
-
return r.value && f ? (p.search = "", p = n.value.isExactMatch ? new URL(`${p.href}/${f}/`) : new URL(`${p.href}?filter[name][contains]=${f}`)) : (r.value || new URLSearchParams(f).forEach((w,
|
|
492
|
-
p.searchParams.append(
|
|
491
|
+
return r.value && f ? (p.search = "", p = n.value.isExactMatch ? new URL(`${p.href}/${f}/`) : new URL(`${p.href}?filter[name][contains]=${f}`)) : (r.value || new URLSearchParams(f).forEach((w, S) => {
|
|
492
|
+
p.searchParams.append(S, w);
|
|
493
493
|
}), d && p.searchParams.append("sort_by", d), c === "desc" && p.searchParams.append("sort_desc", "1"), p.searchParams.append("size", String(s))), u && l !== 1 && p.searchParams.append("offset", String(u)), p.href;
|
|
494
494
|
} catch (p) {
|
|
495
495
|
return console.error("RouteList(fetcher)", p), i.value;
|
|
@@ -497,7 +497,7 @@ function Qt(e, t) {
|
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
499
|
function Ii(e, t, n = "data") {
|
|
500
|
-
const i =
|
|
500
|
+
const i = m(t), { axiosInstance: r } = ut(e.axiosRequestConfig), o = Qt(e, i), a = j({
|
|
501
501
|
status: ve.Idle
|
|
502
502
|
});
|
|
503
503
|
return { fetcher: async (l) => {
|
|
@@ -549,34 +549,34 @@ function xi() {
|
|
|
549
549
|
convertKeyToTitle: e
|
|
550
550
|
};
|
|
551
551
|
}
|
|
552
|
-
const Xt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,
|
|
552
|
+
const Xt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, kt = (e) => {
|
|
553
553
|
if (typeof e != "string")
|
|
554
554
|
throw new TypeError("Invalid argument expected string");
|
|
555
555
|
const t = e.match(Xt);
|
|
556
556
|
if (!t)
|
|
557
557
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
558
558
|
return t.shift(), t;
|
|
559
|
-
},
|
|
559
|
+
}, wt = (e) => e === "*" || e === "x" || e === "X", St = (e) => {
|
|
560
560
|
const t = parseInt(e, 10);
|
|
561
561
|
return isNaN(t) ? e : t;
|
|
562
|
-
}, _i = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t],
|
|
563
|
-
if (
|
|
562
|
+
}, _i = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Ni = (e, t) => {
|
|
563
|
+
if (wt(e) || wt(t))
|
|
564
564
|
return 0;
|
|
565
|
-
const [n, i] = _i(
|
|
565
|
+
const [n, i] = _i(St(e), St(t));
|
|
566
566
|
return n > i ? 1 : n < i ? -1 : 0;
|
|
567
|
-
},
|
|
567
|
+
}, Ct = (e, t) => {
|
|
568
568
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
569
|
-
const i =
|
|
569
|
+
const i = Ni(e[n] || "0", t[n] || "0");
|
|
570
570
|
if (i !== 0)
|
|
571
571
|
return i;
|
|
572
572
|
}
|
|
573
573
|
return 0;
|
|
574
|
-
},
|
|
575
|
-
const n =
|
|
576
|
-
return a !== 0 ? a : r && o ?
|
|
574
|
+
}, Ti = (e, t) => {
|
|
575
|
+
const n = kt(e), i = kt(t), r = n.pop(), o = i.pop(), a = Ct(n, i);
|
|
576
|
+
return a !== 0 ? a : r && o ? Ct(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
577
577
|
}, At = (e, t, n) => {
|
|
578
578
|
Oi(n);
|
|
579
|
-
const i =
|
|
579
|
+
const i = Ti(e, t);
|
|
580
580
|
return en[n].includes(i);
|
|
581
581
|
}, en = {
|
|
582
582
|
">": [1],
|
|
@@ -591,7 +591,7 @@ const Xt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
591
591
|
if (It.indexOf(e) === -1)
|
|
592
592
|
throw new Error(`Invalid operator, expected one of ${It.join("|")}`);
|
|
593
593
|
}, ji = (e) => typeof e == "string" && /^[v\d]/.test(e) && Xt.test(e);
|
|
594
|
-
function
|
|
594
|
+
function Fi(e) {
|
|
595
595
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
596
596
|
if (!t)
|
|
597
597
|
return !0;
|
|
@@ -604,15 +604,15 @@ function Ei(e) {
|
|
|
604
604
|
const [a, l] = o;
|
|
605
605
|
return !(a && At(r, a, "<") || l && At(r, l, ">"));
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
const t =
|
|
607
|
+
function Ei(e) {
|
|
608
|
+
const t = j(0), n = j(0), i = j(!1);
|
|
609
609
|
return me(e, (r) => {
|
|
610
610
|
r && !i.value && (t.value = r.offsetWidth, n.value = r.scrollWidth, i.value = !0);
|
|
611
611
|
}), {
|
|
612
|
-
isTruncated:
|
|
612
|
+
isTruncated: N(() => t.value < n.value)
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function Mi() {
|
|
616
616
|
const { i18n: { t: e } } = He();
|
|
617
617
|
return {
|
|
618
618
|
utf8Name: (t) => /^[\p{N}\p{L}.\-_~]*$/u.test(t) ? "" : e("validationErrors.utf8Name")
|
|
@@ -620,24 +620,24 @@ function Fi() {
|
|
|
620
620
|
}
|
|
621
621
|
const be = {
|
|
622
622
|
useAxios: ut,
|
|
623
|
-
useDebouncedFilter:
|
|
624
|
-
useDeleteUrlBuilder:
|
|
625
|
-
useErrors:
|
|
623
|
+
useDebouncedFilter: wi,
|
|
624
|
+
useDeleteUrlBuilder: Si,
|
|
625
|
+
useErrors: Ci,
|
|
626
626
|
useExternalLinkCreator: Ai,
|
|
627
627
|
useFetcher: Ii,
|
|
628
628
|
useFetchUrlBuilder: Qt,
|
|
629
|
-
useHelpers:
|
|
629
|
+
useHelpers: Gt,
|
|
630
630
|
useStringHelpers: xi,
|
|
631
631
|
useI18n: He,
|
|
632
|
-
useGatewayFeatureSupported:
|
|
633
|
-
useTruncationDetector:
|
|
634
|
-
useValidators:
|
|
635
|
-
},
|
|
632
|
+
useGatewayFeatureSupported: Fi,
|
|
633
|
+
useTruncationDetector: Ei,
|
|
634
|
+
useValidators: Mi
|
|
635
|
+
}, Ne = (e, t) => {
|
|
636
636
|
const n = e.__vccOpts || e;
|
|
637
637
|
for (const [i, r] of t)
|
|
638
638
|
n[i] = r;
|
|
639
639
|
return n;
|
|
640
|
-
},
|
|
640
|
+
}, Li = "#0044f4", $i = "#3a3f51", qi = "#afb7c5", Ui = { class: "json-config" }, Ki = {
|
|
641
641
|
key: 0,
|
|
642
642
|
class: "json-endpoint"
|
|
643
643
|
}, Ri = /* @__PURE__ */ ae({
|
|
@@ -671,7 +671,7 @@ const be = {
|
|
|
671
671
|
Wn((r) => ({
|
|
672
672
|
"4520e3ec": `${i.value}ch`
|
|
673
673
|
}));
|
|
674
|
-
const t = e, n =
|
|
674
|
+
const t = e, n = N(() => t.jsonRecord), i = N(() => {
|
|
675
675
|
var r;
|
|
676
676
|
if (!t.fetcherUrl)
|
|
677
677
|
return 0;
|
|
@@ -679,14 +679,14 @@ const be = {
|
|
|
679
679
|
return o.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? o[o.length - 1] : o[o.length - 2]).length;
|
|
680
680
|
});
|
|
681
681
|
return (r, o) => {
|
|
682
|
-
const a =
|
|
683
|
-
return
|
|
684
|
-
t.fetcherUrl ? (
|
|
682
|
+
const a = $("KBadge"), l = $("KCodeBlock");
|
|
683
|
+
return I(), q("div", Ui, [
|
|
684
|
+
t.fetcherUrl ? (I(), q("div", Ki, [
|
|
685
685
|
_(a, {
|
|
686
686
|
appearance: t.requestMethod
|
|
687
687
|
}, {
|
|
688
|
-
default:
|
|
689
|
-
|
|
688
|
+
default: b(() => [
|
|
689
|
+
Z(M(t.requestMethod), 1)
|
|
690
690
|
]),
|
|
691
691
|
_: 1
|
|
692
692
|
}, 8, ["appearance"]),
|
|
@@ -697,15 +697,15 @@ const be = {
|
|
|
697
697
|
"single-line": "",
|
|
698
698
|
theme: "dark"
|
|
699
699
|
}, null, 8, ["code"])
|
|
700
|
-
])) :
|
|
701
|
-
t.jsonRecord ? (
|
|
700
|
+
])) : te("", !0),
|
|
701
|
+
t.jsonRecord ? (I(), z(l, {
|
|
702
702
|
key: 1,
|
|
703
703
|
id: "json-codeblock",
|
|
704
|
-
class:
|
|
704
|
+
class: Ee({ "json-content": t.fetcherUrl }),
|
|
705
705
|
code: JSON.stringify(n.value, null, 2),
|
|
706
706
|
language: "json",
|
|
707
707
|
theme: "dark"
|
|
708
|
-
}, null, 8, ["class", "code"])) :
|
|
708
|
+
}, null, 8, ["class", "code"])) : te("", !0)
|
|
709
709
|
]);
|
|
710
710
|
};
|
|
711
711
|
}
|
|
@@ -736,13 +736,13 @@ function Vi(e, t) {
|
|
|
736
736
|
function zi(e) {
|
|
737
737
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
738
738
|
}
|
|
739
|
-
var Hi = tn, Yi = Bi, Wi = Di, Ji = Vi,
|
|
739
|
+
var Hi = tn, Yi = Bi, Wi = Di, Ji = Vi, Zi = zi, Gi = Pi, W = {
|
|
740
740
|
isNothing: Hi,
|
|
741
741
|
isObject: Yi,
|
|
742
742
|
toArray: Wi,
|
|
743
743
|
repeat: Ji,
|
|
744
|
-
isNegativeZero:
|
|
745
|
-
extend:
|
|
744
|
+
isNegativeZero: Zi,
|
|
745
|
+
extend: Gi
|
|
746
746
|
};
|
|
747
747
|
function nn(e, t) {
|
|
748
748
|
var n = "", i = e.reason || "(unknown reason)";
|
|
@@ -750,15 +750,15 @@ function nn(e, t) {
|
|
|
750
750
|
|
|
751
751
|
` + e.mark.snippet), i + " " + n) : i;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function Me(e, t) {
|
|
754
754
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = nn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
755
755
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
756
|
+
Me.prototype = Object.create(Error.prototype);
|
|
757
|
+
Me.prototype.constructor = Me;
|
|
758
|
+
Me.prototype.toString = function(e) {
|
|
759
759
|
return this.name + ": " + nn(this, e);
|
|
760
760
|
};
|
|
761
|
-
var re =
|
|
761
|
+
var re = Me;
|
|
762
762
|
function Je(e, t, n, i, r) {
|
|
763
763
|
var o = "", a = "", l = Math.floor(r / 2) - 1;
|
|
764
764
|
return i - t > l && (o = " ... ", t = i - l + o.length), n - i > l && (a = " ...", n = i + l - a.length), {
|
|
@@ -767,7 +767,7 @@ function Je(e, t, n, i, r) {
|
|
|
767
767
|
// relative position
|
|
768
768
|
};
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function Ze(e, t) {
|
|
771
771
|
return W.repeat(" ", t - e.length) + e;
|
|
772
772
|
}
|
|
773
773
|
function Qi(e, t) {
|
|
@@ -785,9 +785,9 @@ function Qi(e, t) {
|
|
|
785
785
|
r[a - s],
|
|
786
786
|
e.position - (i[a] - i[a - s]),
|
|
787
787
|
c
|
|
788
|
-
), l = W.repeat(" ", t.indent) +
|
|
788
|
+
), l = W.repeat(" ", t.indent) + Ze((e.line - s + 1).toString(), d) + " | " + u.str + `
|
|
789
789
|
` + l;
|
|
790
|
-
for (u = Je(e.buffer, i[a], r[a], e.position, c), l += W.repeat(" ", t.indent) +
|
|
790
|
+
for (u = Je(e.buffer, i[a], r[a], e.position, c), l += W.repeat(" ", t.indent) + Ze((e.line + 1).toString(), d) + " | " + u.str + `
|
|
791
791
|
`, l += W.repeat("-", t.indent + d + 3 + u.pos) + `^
|
|
792
792
|
`, s = 1; s <= t.linesAfter && !(a + s >= r.length); s++)
|
|
793
793
|
u = Je(
|
|
@@ -796,7 +796,7 @@ function Qi(e, t) {
|
|
|
796
796
|
r[a + s],
|
|
797
797
|
e.position - (i[a] - i[a + s]),
|
|
798
798
|
c
|
|
799
|
-
), l += W.repeat(" ", t.indent) +
|
|
799
|
+
), l += W.repeat(" ", t.indent) + Ze((e.line + s + 1).toString(), d) + " | " + u.str + `
|
|
800
800
|
`;
|
|
801
801
|
return l.replace(/\n$/, "");
|
|
802
802
|
}
|
|
@@ -835,7 +835,7 @@ function ir(e, t) {
|
|
|
835
835
|
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = nr(t.styleAliases || null), tr.indexOf(this.kind) === -1)
|
|
836
836
|
throw new re('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
837
837
|
}
|
|
838
|
-
var
|
|
838
|
+
var ee = ir;
|
|
839
839
|
function xt(e, t) {
|
|
840
840
|
var n = [];
|
|
841
841
|
return e[t].forEach(function(i) {
|
|
@@ -870,7 +870,7 @@ function et(e) {
|
|
|
870
870
|
}
|
|
871
871
|
et.prototype.extend = function(e) {
|
|
872
872
|
var t = [], n = [];
|
|
873
|
-
if (e instanceof
|
|
873
|
+
if (e instanceof ee)
|
|
874
874
|
n.push(e);
|
|
875
875
|
else if (Array.isArray(e))
|
|
876
876
|
n = n.concat(e);
|
|
@@ -879,30 +879,30 @@ et.prototype.extend = function(e) {
|
|
|
879
879
|
else
|
|
880
880
|
throw new re("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
881
881
|
t.forEach(function(r) {
|
|
882
|
-
if (!(r instanceof
|
|
882
|
+
if (!(r instanceof ee))
|
|
883
883
|
throw new re("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
884
884
|
if (r.loadKind && r.loadKind !== "scalar")
|
|
885
885
|
throw new re("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
886
886
|
if (r.multi)
|
|
887
887
|
throw new re("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
888
888
|
}), n.forEach(function(r) {
|
|
889
|
-
if (!(r instanceof
|
|
889
|
+
if (!(r instanceof ee))
|
|
890
890
|
throw new re("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
891
891
|
});
|
|
892
892
|
var i = Object.create(et.prototype);
|
|
893
893
|
return i.implicit = (this.implicit || []).concat(t), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = xt(i, "implicit"), i.compiledExplicit = xt(i, "explicit"), i.compiledTypeMap = rr(i.compiledImplicit, i.compiledExplicit), i;
|
|
894
894
|
};
|
|
895
|
-
var rn = et, an = new
|
|
895
|
+
var rn = et, an = new ee("tag:yaml.org,2002:str", {
|
|
896
896
|
kind: "scalar",
|
|
897
897
|
construct: function(e) {
|
|
898
898
|
return e !== null ? e : "";
|
|
899
899
|
}
|
|
900
|
-
}), on = new
|
|
900
|
+
}), on = new ee("tag:yaml.org,2002:seq", {
|
|
901
901
|
kind: "sequence",
|
|
902
902
|
construct: function(e) {
|
|
903
903
|
return e !== null ? e : [];
|
|
904
904
|
}
|
|
905
|
-
}), ln = new
|
|
905
|
+
}), ln = new ee("tag:yaml.org,2002:map", {
|
|
906
906
|
kind: "mapping",
|
|
907
907
|
construct: function(e) {
|
|
908
908
|
return e !== null ? e : {};
|
|
@@ -926,7 +926,7 @@ function or() {
|
|
|
926
926
|
function lr(e) {
|
|
927
927
|
return e === null;
|
|
928
928
|
}
|
|
929
|
-
var cn = new
|
|
929
|
+
var cn = new ee("tag:yaml.org,2002:null", {
|
|
930
930
|
kind: "scalar",
|
|
931
931
|
resolve: ar,
|
|
932
932
|
construct: or,
|
|
@@ -962,7 +962,7 @@ function cr(e) {
|
|
|
962
962
|
function ur(e) {
|
|
963
963
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
964
964
|
}
|
|
965
|
-
var un = new
|
|
965
|
+
var un = new ee("tag:yaml.org,2002:bool", {
|
|
966
966
|
kind: "scalar",
|
|
967
967
|
resolve: sr,
|
|
968
968
|
construct: cr,
|
|
@@ -1053,7 +1053,7 @@ function hr(e) {
|
|
|
1053
1053
|
function mr(e) {
|
|
1054
1054
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !W.isNegativeZero(e);
|
|
1055
1055
|
}
|
|
1056
|
-
var dn = new
|
|
1056
|
+
var dn = new ee("tag:yaml.org,2002:int", {
|
|
1057
1057
|
kind: "scalar",
|
|
1058
1058
|
resolve: gr,
|
|
1059
1059
|
construct: hr,
|
|
@@ -1093,8 +1093,8 @@ function br(e) {
|
|
|
1093
1093
|
var t, n;
|
|
1094
1094
|
return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1095
1095
|
}
|
|
1096
|
-
var
|
|
1097
|
-
function
|
|
1096
|
+
var kr = /^[-+]?[0-9]+e/;
|
|
1097
|
+
function wr(e, t) {
|
|
1098
1098
|
var n;
|
|
1099
1099
|
if (isNaN(e))
|
|
1100
1100
|
switch (t) {
|
|
@@ -1125,17 +1125,17 @@ function kr(e, t) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
else if (W.isNegativeZero(e))
|
|
1127
1127
|
return "-0.0";
|
|
1128
|
-
return n = e.toString(10),
|
|
1128
|
+
return n = e.toString(10), kr.test(n) ? n.replace("e", ".e") : n;
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function Sr(e) {
|
|
1131
1131
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || W.isNegativeZero(e));
|
|
1132
1132
|
}
|
|
1133
|
-
var pn = new
|
|
1133
|
+
var pn = new ee("tag:yaml.org,2002:float", {
|
|
1134
1134
|
kind: "scalar",
|
|
1135
1135
|
resolve: vr,
|
|
1136
1136
|
construct: br,
|
|
1137
|
-
predicate:
|
|
1138
|
-
represent:
|
|
1137
|
+
predicate: Sr,
|
|
1138
|
+
represent: wr,
|
|
1139
1139
|
defaultStyle: "lowercase"
|
|
1140
1140
|
}), fn = sn.extend({
|
|
1141
1141
|
implicit: [
|
|
@@ -1149,7 +1149,7 @@ var pn = new X("tag:yaml.org,2002:float", {
|
|
|
1149
1149
|
), mn = new RegExp(
|
|
1150
1150
|
"^([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]))?))?$"
|
|
1151
1151
|
);
|
|
1152
|
-
function
|
|
1152
|
+
function Cr(e) {
|
|
1153
1153
|
return e === null ? !1 : hn.exec(e) !== null || mn.exec(e) !== null;
|
|
1154
1154
|
}
|
|
1155
1155
|
function Ar(e) {
|
|
@@ -1168,9 +1168,9 @@ function Ar(e) {
|
|
|
1168
1168
|
function Ir(e) {
|
|
1169
1169
|
return e.toISOString();
|
|
1170
1170
|
}
|
|
1171
|
-
var yn = new
|
|
1171
|
+
var yn = new ee("tag:yaml.org,2002:timestamp", {
|
|
1172
1172
|
kind: "scalar",
|
|
1173
|
-
resolve:
|
|
1173
|
+
resolve: Cr,
|
|
1174
1174
|
construct: Ar,
|
|
1175
1175
|
instanceOf: Date,
|
|
1176
1176
|
represent: Ir
|
|
@@ -1178,7 +1178,7 @@ var yn = new X("tag:yaml.org,2002:timestamp", {
|
|
|
1178
1178
|
function xr(e) {
|
|
1179
1179
|
return e === "<<" || e === null;
|
|
1180
1180
|
}
|
|
1181
|
-
var vn = new
|
|
1181
|
+
var vn = new ee("tag:yaml.org,2002:merge", {
|
|
1182
1182
|
kind: "scalar",
|
|
1183
1183
|
resolve: xr
|
|
1184
1184
|
}), dt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
@@ -1195,13 +1195,13 @@ function _r(e) {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
return i % 8 === 0;
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function Nr(e) {
|
|
1199
1199
|
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = dt, a = 0, l = [];
|
|
1200
1200
|
for (t = 0; t < r; t++)
|
|
1201
1201
|
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
|
|
1202
1202
|
return n = r % 4 * 6, n === 0 ? (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)) : n === 18 ? (l.push(a >> 10 & 255), l.push(a >> 2 & 255)) : n === 12 && l.push(a >> 4 & 255), new Uint8Array(l);
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function Tr(e) {
|
|
1205
1205
|
var t = "", n = 0, i, r, o = e.length, a = dt;
|
|
1206
1206
|
for (i = 0; i < o; i++)
|
|
1207
1207
|
i % 3 === 0 && i && (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]), n = (n << 8) + e[i];
|
|
@@ -1210,19 +1210,19 @@ function Nr(e) {
|
|
|
1210
1210
|
function Or(e) {
|
|
1211
1211
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1212
1212
|
}
|
|
1213
|
-
var bn = new
|
|
1213
|
+
var bn = new ee("tag:yaml.org,2002:binary", {
|
|
1214
1214
|
kind: "scalar",
|
|
1215
1215
|
resolve: _r,
|
|
1216
|
-
construct:
|
|
1216
|
+
construct: Nr,
|
|
1217
1217
|
predicate: Or,
|
|
1218
|
-
represent:
|
|
1219
|
-
}), jr = Object.prototype.hasOwnProperty,
|
|
1220
|
-
function
|
|
1218
|
+
represent: Tr
|
|
1219
|
+
}), jr = Object.prototype.hasOwnProperty, Fr = Object.prototype.toString;
|
|
1220
|
+
function Er(e) {
|
|
1221
1221
|
if (e === null)
|
|
1222
1222
|
return !0;
|
|
1223
1223
|
var t = [], n, i, r, o, a, l = e;
|
|
1224
1224
|
for (n = 0, i = l.length; n < i; n += 1) {
|
|
1225
|
-
if (r = l[n], a = !1,
|
|
1225
|
+
if (r = l[n], a = !1, Fr.call(r) !== "[object Object]")
|
|
1226
1226
|
return !1;
|
|
1227
1227
|
for (o in r)
|
|
1228
1228
|
if (jr.call(r, o))
|
|
@@ -1239,20 +1239,20 @@ function Mr(e) {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
return !0;
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1242
|
+
function Mr(e) {
|
|
1243
1243
|
return e !== null ? e : [];
|
|
1244
1244
|
}
|
|
1245
|
-
var
|
|
1245
|
+
var kn = new ee("tag:yaml.org,2002:omap", {
|
|
1246
1246
|
kind: "sequence",
|
|
1247
|
-
resolve:
|
|
1248
|
-
construct:
|
|
1249
|
-
}),
|
|
1250
|
-
function
|
|
1247
|
+
resolve: Er,
|
|
1248
|
+
construct: Mr
|
|
1249
|
+
}), Lr = Object.prototype.toString;
|
|
1250
|
+
function $r(e) {
|
|
1251
1251
|
if (e === null)
|
|
1252
1252
|
return !0;
|
|
1253
1253
|
var t, n, i, r, o, a = e;
|
|
1254
1254
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1255
|
-
if (i = a[t],
|
|
1255
|
+
if (i = a[t], Lr.call(i) !== "[object Object]" || (r = Object.keys(i), r.length !== 1))
|
|
1256
1256
|
return !1;
|
|
1257
1257
|
o[t] = [r[0], i[r[0]]];
|
|
1258
1258
|
}
|
|
@@ -1266,9 +1266,9 @@ function qr(e) {
|
|
|
1266
1266
|
i = a[t], r = Object.keys(i), o[t] = [r[0], i[r[0]]];
|
|
1267
1267
|
return o;
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1269
|
+
var wn = new ee("tag:yaml.org,2002:pairs", {
|
|
1270
1270
|
kind: "sequence",
|
|
1271
|
-
resolve:
|
|
1271
|
+
resolve: $r,
|
|
1272
1272
|
construct: qr
|
|
1273
1273
|
}), Ur = Object.prototype.hasOwnProperty;
|
|
1274
1274
|
function Kr(e) {
|
|
@@ -1283,7 +1283,7 @@ function Kr(e) {
|
|
|
1283
1283
|
function Rr(e) {
|
|
1284
1284
|
return e !== null ? e : {};
|
|
1285
1285
|
}
|
|
1286
|
-
var
|
|
1286
|
+
var Sn = new ee("tag:yaml.org,2002:set", {
|
|
1287
1287
|
kind: "mapping",
|
|
1288
1288
|
resolve: Kr,
|
|
1289
1289
|
construct: Rr
|
|
@@ -1294,18 +1294,18 @@ var Cn = new X("tag:yaml.org,2002:set", {
|
|
|
1294
1294
|
],
|
|
1295
1295
|
explicit: [
|
|
1296
1296
|
bn,
|
|
1297
|
-
wn,
|
|
1298
1297
|
kn,
|
|
1299
|
-
|
|
1298
|
+
wn,
|
|
1299
|
+
Sn
|
|
1300
1300
|
]
|
|
1301
|
-
}), ye = Object.prototype.hasOwnProperty, Be = 1,
|
|
1302
|
-
function
|
|
1301
|
+
}), ye = Object.prototype.hasOwnProperty, Be = 1, Cn = 2, An = 3, De = 4, Ge = 1, Br = 2, _t = 3, Dr = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Pr = /[\x85\u2028\u2029]/, Vr = /[,\[\]\{\}]/, In = /^(?:!|!!|![a-z\-]+!)$/i, xn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1302
|
+
function Nt(e) {
|
|
1303
1303
|
return Object.prototype.toString.call(e);
|
|
1304
1304
|
}
|
|
1305
1305
|
function se(e) {
|
|
1306
1306
|
return e === 10 || e === 13;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function ke(e) {
|
|
1309
1309
|
return e === 9 || e === 32;
|
|
1310
1310
|
}
|
|
1311
1311
|
function oe(e) {
|
|
@@ -1324,7 +1324,7 @@ function Hr(e) {
|
|
|
1324
1324
|
function Yr(e) {
|
|
1325
1325
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function Tt(e) {
|
|
1328
1328
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1329
1329
|
` : 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" : "";
|
|
1330
1330
|
}
|
|
@@ -1334,13 +1334,13 @@ function Wr(e) {
|
|
|
1334
1334
|
(e - 65536 & 1023) + 56320
|
|
1335
1335
|
);
|
|
1336
1336
|
}
|
|
1337
|
-
var _n = new Array(256),
|
|
1338
|
-
for (var
|
|
1339
|
-
_n[
|
|
1337
|
+
var _n = new Array(256), Nn = new Array(256);
|
|
1338
|
+
for (var Se = 0; Se < 256; Se++)
|
|
1339
|
+
_n[Se] = Tt(Se) ? 1 : 0, Nn[Se] = Tt(Se);
|
|
1340
1340
|
function Jr(e, t) {
|
|
1341
1341
|
this.input = e, this.filename = t.filename || null, this.schema = t.schema || pt, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function Tn(e, t) {
|
|
1344
1344
|
var n = {
|
|
1345
1345
|
name: e.filename,
|
|
1346
1346
|
buffer: e.input.slice(0, -1),
|
|
@@ -1351,24 +1351,24 @@ function Nn(e, t) {
|
|
|
1351
1351
|
};
|
|
1352
1352
|
return n.snippet = Xi(n), new re(t, n);
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1355
|
-
throw
|
|
1354
|
+
function k(e, t) {
|
|
1355
|
+
throw Tn(e, t);
|
|
1356
1356
|
}
|
|
1357
1357
|
function Pe(e, t) {
|
|
1358
|
-
e.onWarning && e.onWarning.call(null,
|
|
1358
|
+
e.onWarning && e.onWarning.call(null, Tn(e, t));
|
|
1359
1359
|
}
|
|
1360
1360
|
var Ot = {
|
|
1361
1361
|
YAML: function(e, t, n) {
|
|
1362
1362
|
var i, r, o;
|
|
1363
|
-
e.version !== null &&
|
|
1363
|
+
e.version !== null && k(e, "duplication of %YAML directive"), n.length !== 1 && k(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), i === null && k(e, "ill-formed argument of the YAML directive"), r = parseInt(i[1], 10), o = parseInt(i[2], 10), r !== 1 && k(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Pe(e, "unsupported YAML version of the document");
|
|
1364
1364
|
},
|
|
1365
1365
|
TAG: function(e, t, n) {
|
|
1366
1366
|
var i, r;
|
|
1367
|
-
n.length !== 2 &&
|
|
1367
|
+
n.length !== 2 && k(e, "TAG directive accepts exactly two arguments"), i = n[0], r = n[1], In.test(i) || k(e, "ill-formed tag handle (first argument) of the TAG directive"), ye.call(e.tagMap, i) && k(e, 'there is a previously declared suffix for "' + i + '" tag handle'), xn.test(r) || k(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1368
1368
|
try {
|
|
1369
1369
|
r = decodeURIComponent(r);
|
|
1370
1370
|
} catch {
|
|
1371
|
-
|
|
1371
|
+
k(e, "tag prefix is malformed: " + r);
|
|
1372
1372
|
}
|
|
1373
1373
|
e.tagMap[i] = r;
|
|
1374
1374
|
}
|
|
@@ -1378,30 +1378,30 @@ function he(e, t, n, i) {
|
|
|
1378
1378
|
if (t < n) {
|
|
1379
1379
|
if (l = e.input.slice(t, n), i)
|
|
1380
1380
|
for (r = 0, o = l.length; r < o; r += 1)
|
|
1381
|
-
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1381
|
+
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || k(e, "expected valid JSON character");
|
|
1382
1382
|
else
|
|
1383
|
-
Dr.test(l) &&
|
|
1383
|
+
Dr.test(l) && k(e, "the stream contains non-printable characters");
|
|
1384
1384
|
e.result += l;
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
function jt(e, t, n, i) {
|
|
1388
1388
|
var r, o, a, l;
|
|
1389
|
-
for (W.isObject(n) ||
|
|
1389
|
+
for (W.isObject(n) || k(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, l = r.length; a < l; a += 1)
|
|
1390
1390
|
o = r[a], ye.call(t, o) || (t[o] = n[o], i[o] = !0);
|
|
1391
1391
|
}
|
|
1392
1392
|
function Ie(e, t, n, i, r, o, a, l, s) {
|
|
1393
1393
|
var u, d;
|
|
1394
1394
|
if (Array.isArray(r))
|
|
1395
1395
|
for (r = Array.prototype.slice.call(r), u = 0, d = r.length; u < d; u += 1)
|
|
1396
|
-
Array.isArray(r[u]) &&
|
|
1397
|
-
if (typeof r == "object" &&
|
|
1396
|
+
Array.isArray(r[u]) && k(e, "nested arrays are not supported inside keys"), typeof r == "object" && Nt(r[u]) === "[object Object]" && (r[u] = "[object Object]");
|
|
1397
|
+
if (typeof r == "object" && Nt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1398
1398
|
if (Array.isArray(o))
|
|
1399
1399
|
for (u = 0, d = o.length; u < d; u += 1)
|
|
1400
1400
|
jt(e, t, o[u], n);
|
|
1401
1401
|
else
|
|
1402
1402
|
jt(e, t, o, n);
|
|
1403
1403
|
else
|
|
1404
|
-
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position,
|
|
1404
|
+
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, k(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(t, r, {
|
|
1405
1405
|
configurable: !0,
|
|
1406
1406
|
enumerable: !0,
|
|
1407
1407
|
writable: !0,
|
|
@@ -1411,11 +1411,11 @@ function Ie(e, t, n, i, r, o, a, l, s) {
|
|
|
1411
1411
|
}
|
|
1412
1412
|
function ft(e) {
|
|
1413
1413
|
var t;
|
|
1414
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1414
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : k(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1415
1415
|
}
|
|
1416
1416
|
function H(e, t, n) {
|
|
1417
1417
|
for (var i = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
1418
|
-
for (;
|
|
1418
|
+
for (; ke(r); )
|
|
1419
1419
|
r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
1420
1420
|
if (t && r === 35)
|
|
1421
1421
|
do
|
|
@@ -1437,7 +1437,7 @@ function gt(e, t) {
|
|
|
1437
1437
|
t === 1 ? e.result += " " : t > 1 && (e.result += W.repeat(`
|
|
1438
1438
|
`, t - 1));
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1440
|
+
function Zr(e, t, n) {
|
|
1441
1441
|
var i, r, o, a, l, s, u, d, c = e.kind, f = e.result, p;
|
|
1442
1442
|
if (p = e.input.charCodeAt(e.position), oe(p) || Ae(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (r = e.input.charCodeAt(e.position + 1), oe(r) || n && Ae(r)))
|
|
1443
1443
|
return !1;
|
|
@@ -1460,11 +1460,11 @@ function Gr(e, t, n) {
|
|
|
1460
1460
|
break;
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
l && (he(e, o, a, !1), gt(e, e.line - s), o = a = e.position, l = !1),
|
|
1463
|
+
l && (he(e, o, a, !1), gt(e, e.line - s), o = a = e.position, l = !1), ke(p) || (a = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1464
1464
|
}
|
|
1465
1465
|
return he(e, o, a, !1), e.result ? !0 : (e.kind = c, e.result = f, !1);
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function Gr(e, t) {
|
|
1468
1468
|
var n, i, r;
|
|
1469
1469
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1470
1470
|
return !1;
|
|
@@ -1475,8 +1475,8 @@ function Zr(e, t) {
|
|
|
1475
1475
|
else
|
|
1476
1476
|
return !0;
|
|
1477
1477
|
else
|
|
1478
|
-
se(n) ? (he(e, i, r, !0), gt(e, H(e, !1, t)), i = r = e.position) : e.position === e.lineStart && Ye(e) ?
|
|
1479
|
-
|
|
1478
|
+
se(n) ? (he(e, i, r, !0), gt(e, H(e, !1, t)), i = r = e.position) : e.position === e.lineStart && Ye(e) ? k(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1479
|
+
k(e, "unexpected end of the stream within a single quoted scalar");
|
|
1480
1480
|
}
|
|
1481
1481
|
function Qr(e, t) {
|
|
1482
1482
|
var n, i, r, o, a, l;
|
|
@@ -1489,36 +1489,36 @@ function Qr(e, t) {
|
|
|
1489
1489
|
if (he(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), se(l))
|
|
1490
1490
|
H(e, !1, t);
|
|
1491
1491
|
else if (l < 256 && _n[l])
|
|
1492
|
-
e.result +=
|
|
1492
|
+
e.result += Nn[l], e.position++;
|
|
1493
1493
|
else if ((a = Hr(l)) > 0) {
|
|
1494
1494
|
for (r = a, o = 0; r > 0; r--)
|
|
1495
|
-
l = e.input.charCodeAt(++e.position), (a = zr(l)) >= 0 ? o = (o << 4) + a :
|
|
1495
|
+
l = e.input.charCodeAt(++e.position), (a = zr(l)) >= 0 ? o = (o << 4) + a : k(e, "expected hexadecimal character");
|
|
1496
1496
|
e.result += Wr(o), e.position++;
|
|
1497
1497
|
} else
|
|
1498
|
-
|
|
1498
|
+
k(e, "unknown escape sequence");
|
|
1499
1499
|
n = i = e.position;
|
|
1500
1500
|
} else
|
|
1501
|
-
se(l) ? (he(e, n, i, !0), gt(e, H(e, !1, t)), n = i = e.position) : e.position === e.lineStart && Ye(e) ?
|
|
1501
|
+
se(l) ? (he(e, n, i, !0), gt(e, H(e, !1, t)), n = i = e.position) : e.position === e.lineStart && Ye(e) ? k(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1502
1502
|
}
|
|
1503
|
-
|
|
1503
|
+
k(e, "unexpected end of the stream within a double quoted scalar");
|
|
1504
1504
|
}
|
|
1505
1505
|
function Xr(e, t) {
|
|
1506
|
-
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, u, d, c, f, p, w = /* @__PURE__ */ Object.create(null),
|
|
1507
|
-
if (
|
|
1506
|
+
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, u, d, c, f, p, w = /* @__PURE__ */ Object.create(null), S, C, O, y;
|
|
1507
|
+
if (y = e.input.charCodeAt(e.position), y === 91)
|
|
1508
1508
|
d = 93, p = !1, l = [];
|
|
1509
|
-
else if (
|
|
1509
|
+
else if (y === 123)
|
|
1510
1510
|
d = 125, p = !0, l = {};
|
|
1511
1511
|
else
|
|
1512
1512
|
return !1;
|
|
1513
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1514
|
-
if (H(e, !0, t),
|
|
1513
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), y = e.input.charCodeAt(++e.position); y !== 0; ) {
|
|
1514
|
+
if (H(e, !0, t), y = e.input.charCodeAt(e.position), y === d)
|
|
1515
1515
|
return e.position++, e.tag = a, e.anchor = s, e.kind = p ? "mapping" : "sequence", e.result = l, !0;
|
|
1516
|
-
n ?
|
|
1516
|
+
n ? y === 44 && k(e, "expected the node content, but found ','") : k(e, "missed comma between flow collection entries"), C = S = O = null, c = f = !1, y === 63 && (u = e.input.charCodeAt(e.position + 1), oe(u) && (c = f = !0, e.position++, H(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, xe(e, t, Be, !1, !0), C = e.tag, S = e.result, H(e, !0, t), y = e.input.charCodeAt(e.position), (f || e.line === i) && y === 58 && (c = !0, y = e.input.charCodeAt(++e.position), H(e, !0, t), xe(e, t, Be, !1, !0), O = e.result), p ? Ie(e, l, w, C, S, O, i, r, o) : c ? l.push(Ie(e, null, w, C, S, O, i, r, o)) : l.push(S), H(e, !0, t), y = e.input.charCodeAt(e.position), y === 44 ? (n = !0, y = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1517
1517
|
}
|
|
1518
|
-
|
|
1518
|
+
k(e, "unexpected end of the stream within a flow collection");
|
|
1519
1519
|
}
|
|
1520
1520
|
function ea(e, t) {
|
|
1521
|
-
var n, i, r =
|
|
1521
|
+
var n, i, r = Ge, o = !1, a = !1, l = t, s = 0, u = !1, d, c;
|
|
1522
1522
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1523
1523
|
i = !1;
|
|
1524
1524
|
else if (c === 62)
|
|
@@ -1527,15 +1527,15 @@ function ea(e, t) {
|
|
|
1527
1527
|
return !1;
|
|
1528
1528
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1529
1529
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1530
|
-
|
|
1530
|
+
Ge === r ? r = c === 43 ? _t : Br : k(e, "repeat of a chomping mode identifier");
|
|
1531
1531
|
else if ((d = Yr(c)) >= 0)
|
|
1532
|
-
d === 0 ?
|
|
1532
|
+
d === 0 ? k(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? k(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1533
1533
|
else
|
|
1534
1534
|
break;
|
|
1535
|
-
if (
|
|
1535
|
+
if (ke(c)) {
|
|
1536
1536
|
do
|
|
1537
1537
|
c = e.input.charCodeAt(++e.position);
|
|
1538
|
-
while (
|
|
1538
|
+
while (ke(c));
|
|
1539
1539
|
if (c === 35)
|
|
1540
1540
|
do
|
|
1541
1541
|
c = e.input.charCodeAt(++e.position);
|
|
@@ -1550,11 +1550,11 @@ function ea(e, t) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
if (e.lineIndent < l) {
|
|
1552
1552
|
r === _t ? e.result += W.repeat(`
|
|
1553
|
-
`, o ? 1 + s : s) : r ===
|
|
1553
|
+
`, o ? 1 + s : s) : r === Ge && o && (e.result += `
|
|
1554
1554
|
`);
|
|
1555
1555
|
break;
|
|
1556
1556
|
}
|
|
1557
|
-
for (i ?
|
|
1557
|
+
for (i ? ke(c) ? (u = !0, e.result += W.repeat(`
|
|
1558
1558
|
`, o ? 1 + s : s)) : u ? (u = !1, e.result += W.repeat(`
|
|
1559
1559
|
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += W.repeat(`
|
|
1560
1560
|
`, s) : e.result += W.repeat(`
|
|
@@ -1564,82 +1564,82 @@ function ea(e, t) {
|
|
|
1564
1564
|
}
|
|
1565
1565
|
return !0;
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function Ft(e, t) {
|
|
1568
1568
|
var n, i = e.tag, r = e.anchor, o = [], a, l = !1, s;
|
|
1569
1569
|
if (e.firstTabInLine !== -1)
|
|
1570
1570
|
return !1;
|
|
1571
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1571
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !oe(a)))); ) {
|
|
1572
1572
|
if (l = !0, e.position++, H(e, !0, -1) && e.lineIndent <= t) {
|
|
1573
1573
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1574
1574
|
continue;
|
|
1575
1575
|
}
|
|
1576
1576
|
if (n = e.line, xe(e, t, An, !1, !0), o.push(e.result), H(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1577
|
-
|
|
1577
|
+
k(e, "bad indentation of a sequence entry");
|
|
1578
1578
|
else if (e.lineIndent < t)
|
|
1579
1579
|
break;
|
|
1580
1580
|
}
|
|
1581
1581
|
return l ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1582
1582
|
}
|
|
1583
1583
|
function ta(e, t, n) {
|
|
1584
|
-
var i, r, o, a, l, s, u = e.tag, d = e.anchor, c = {}, f = /* @__PURE__ */ Object.create(null), p = null, w = null,
|
|
1584
|
+
var i, r, o, a, l, s, u = e.tag, d = e.anchor, c = {}, f = /* @__PURE__ */ Object.create(null), p = null, w = null, S = null, C = !1, O = !1, y;
|
|
1585
1585
|
if (e.firstTabInLine !== -1)
|
|
1586
1586
|
return !1;
|
|
1587
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
1588
|
-
if (!
|
|
1589
|
-
|
|
1587
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), y = e.input.charCodeAt(e.position); y !== 0; ) {
|
|
1588
|
+
if (!C && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (y === 63 || y === 58) && oe(i))
|
|
1589
|
+
y === 63 ? (C && (Ie(e, c, f, p, w, null, a, l, s), p = w = S = null), O = !0, C = !0, r = !0) : C ? (C = !1, r = !0) : k(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, y = i;
|
|
1590
1590
|
else {
|
|
1591
|
-
if (a = e.line, l = e.lineStart, s = e.position, !xe(e, n,
|
|
1591
|
+
if (a = e.line, l = e.lineStart, s = e.position, !xe(e, n, Cn, !1, !0))
|
|
1592
1592
|
break;
|
|
1593
1593
|
if (e.line === o) {
|
|
1594
|
-
for (
|
|
1595
|
-
|
|
1596
|
-
if (
|
|
1597
|
-
|
|
1598
|
-
else if (
|
|
1599
|
-
|
|
1594
|
+
for (y = e.input.charCodeAt(e.position); ke(y); )
|
|
1595
|
+
y = e.input.charCodeAt(++e.position);
|
|
1596
|
+
if (y === 58)
|
|
1597
|
+
y = e.input.charCodeAt(++e.position), oe(y) || k(e, "a whitespace character is expected after the key-value separator within a block mapping"), C && (Ie(e, c, f, p, w, null, a, l, s), p = w = S = null), O = !0, C = !1, r = !1, p = e.tag, w = e.result;
|
|
1598
|
+
else if (O)
|
|
1599
|
+
k(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1600
1600
|
else
|
|
1601
1601
|
return e.tag = u, e.anchor = d, !0;
|
|
1602
|
-
} else if (
|
|
1603
|
-
|
|
1602
|
+
} else if (O)
|
|
1603
|
+
k(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1604
1604
|
else
|
|
1605
1605
|
return e.tag = u, e.anchor = d, !0;
|
|
1606
1606
|
}
|
|
1607
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1608
|
-
|
|
1607
|
+
if ((e.line === o || e.lineIndent > t) && (C && (a = e.line, l = e.lineStart, s = e.position), xe(e, t, De, !0, r) && (C ? w = e.result : S = e.result), C || (Ie(e, c, f, p, w, S, a, l, s), p = w = S = null), H(e, !0, -1), y = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && y !== 0)
|
|
1608
|
+
k(e, "bad indentation of a mapping entry");
|
|
1609
1609
|
else if (e.lineIndent < t)
|
|
1610
1610
|
break;
|
|
1611
1611
|
}
|
|
1612
|
-
return
|
|
1612
|
+
return C && Ie(e, c, f, p, w, null, a, l, s), O && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), O;
|
|
1613
1613
|
}
|
|
1614
1614
|
function na(e) {
|
|
1615
1615
|
var t, n = !1, i = !1, r, o, a;
|
|
1616
1616
|
if (a = e.input.charCodeAt(e.position), a !== 33)
|
|
1617
1617
|
return !1;
|
|
1618
|
-
if (e.tag !== null &&
|
|
1618
|
+
if (e.tag !== null && k(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (i = !0, r = "!!", a = e.input.charCodeAt(++e.position)) : r = "!", t = e.position, n) {
|
|
1619
1619
|
do
|
|
1620
1620
|
a = e.input.charCodeAt(++e.position);
|
|
1621
1621
|
while (a !== 0 && a !== 62);
|
|
1622
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
1622
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : k(e, "unexpected end of the stream within a verbatim tag");
|
|
1623
1623
|
} else {
|
|
1624
1624
|
for (; a !== 0 && !oe(a); )
|
|
1625
|
-
a === 33 && (i ?
|
|
1626
|
-
o = e.input.slice(t, e.position), Vr.test(o) &&
|
|
1625
|
+
a === 33 && (i ? k(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), In.test(r) || k(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1626
|
+
o = e.input.slice(t, e.position), Vr.test(o) && k(e, "tag suffix cannot contain flow indicator characters");
|
|
1627
1627
|
}
|
|
1628
|
-
o && !xn.test(o) &&
|
|
1628
|
+
o && !xn.test(o) && k(e, "tag name cannot contain such characters: " + o);
|
|
1629
1629
|
try {
|
|
1630
1630
|
o = decodeURIComponent(o);
|
|
1631
1631
|
} catch {
|
|
1632
|
-
|
|
1632
|
+
k(e, "tag name is malformed: " + o);
|
|
1633
1633
|
}
|
|
1634
|
-
return n ? e.tag = o : ye.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o :
|
|
1634
|
+
return n ? e.tag = o : ye.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : k(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
1635
1635
|
}
|
|
1636
1636
|
function ia(e) {
|
|
1637
1637
|
var t, n;
|
|
1638
1638
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
1639
1639
|
return !1;
|
|
1640
|
-
for (e.anchor !== null &&
|
|
1640
|
+
for (e.anchor !== null && k(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !oe(n) && !Ae(n); )
|
|
1641
1641
|
n = e.input.charCodeAt(++e.position);
|
|
1642
|
-
return e.position === t &&
|
|
1642
|
+
return e.position === t && k(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1643
1643
|
}
|
|
1644
1644
|
function ra(e) {
|
|
1645
1645
|
var t, n, i;
|
|
@@ -1647,17 +1647,17 @@ function ra(e) {
|
|
|
1647
1647
|
return !1;
|
|
1648
1648
|
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !oe(i) && !Ae(i); )
|
|
1649
1649
|
i = e.input.charCodeAt(++e.position);
|
|
1650
|
-
return e.position === t &&
|
|
1650
|
+
return e.position === t && k(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ye.call(e.anchorMap, n) || k(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], H(e, !0, -1), !0;
|
|
1651
1651
|
}
|
|
1652
1652
|
function xe(e, t, n, i, r) {
|
|
1653
|
-
var o, a, l, s = 1, u = !1, d = !1, c, f, p, w,
|
|
1653
|
+
var o, a, l, s = 1, u = !1, d = !1, c, f, p, w, S, C;
|
|
1654
1654
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = De === n || An === n, i && H(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1655
1655
|
for (; na(e) || ia(e); )
|
|
1656
1656
|
H(e, !0, -1) ? (u = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1657
|
-
if (l && (l = u || r), (s === 1 || De === n) && (Be === n ||
|
|
1657
|
+
if (l && (l = u || r), (s === 1 || De === n) && (Be === n || Cn === n ? S = t : S = t + 1, C = e.position - e.lineStart, s === 1 ? l && (Ft(e, C) || ta(e, C, S)) || Xr(e, S) ? d = !0 : (a && ea(e, S) || Gr(e, S) || Qr(e, S) ? d = !0 : ra(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && k(e, "alias node should not have any properties")) : Zr(e, S, Be === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && Ft(e, C))), e.tag === null)
|
|
1658
1658
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1659
1659
|
else if (e.tag === "?") {
|
|
1660
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1660
|
+
for (e.result !== null && e.kind !== "scalar" && k(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, f = e.implicitTypes.length; c < f; c += 1)
|
|
1661
1661
|
if (w = e.implicitTypes[c], w.resolve(e.result)) {
|
|
1662
1662
|
e.result = w.construct(e.result), e.tag = w.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1663
1663
|
break;
|
|
@@ -1671,7 +1671,7 @@ function xe(e, t, n, i, r) {
|
|
|
1671
1671
|
w = p[c];
|
|
1672
1672
|
break;
|
|
1673
1673
|
}
|
|
1674
|
-
w ||
|
|
1674
|
+
w || k(e, "unknown tag !<" + e.tag + ">"), e.result !== null && w.kind !== e.kind && k(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + w.kind + '", not "' + e.kind + '"'), w.resolve(e.result, e.tag) ? (e.result = w.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : k(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1675
1675
|
}
|
|
1676
1676
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1677
1677
|
}
|
|
@@ -1680,8 +1680,8 @@ function aa(e) {
|
|
|
1680
1680
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (H(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
1681
1681
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !oe(a); )
|
|
1682
1682
|
a = e.input.charCodeAt(++e.position);
|
|
1683
|
-
for (i = e.input.slice(n, e.position), r = [], i.length < 1 &&
|
|
1684
|
-
for (;
|
|
1683
|
+
for (i = e.input.slice(n, e.position), r = [], i.length < 1 && k(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
1684
|
+
for (; ke(a); )
|
|
1685
1685
|
a = e.input.charCodeAt(++e.position);
|
|
1686
1686
|
if (a === 35) {
|
|
1687
1687
|
do
|
|
@@ -1697,12 +1697,12 @@ function aa(e) {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
a !== 0 && ft(e), ye.call(Ot, i) ? Ot[i](e, i, r) : Pe(e, 'unknown document directive "' + i + '"');
|
|
1699
1699
|
}
|
|
1700
|
-
if (H(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, H(e, !0, -1)) : o &&
|
|
1700
|
+
if (H(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, H(e, !0, -1)) : o && k(e, "directives end mark is expected"), xe(e, e.lineIndent - 1, De, !1, !0), H(e, !0, -1), e.checkLineBreaks && Pr.test(e.input.slice(t, e.position)) && Pe(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ye(e)) {
|
|
1701
1701
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, H(e, !0, -1));
|
|
1702
1702
|
return;
|
|
1703
1703
|
}
|
|
1704
1704
|
if (e.position < e.length - 1)
|
|
1705
|
-
|
|
1705
|
+
k(e, "end of the stream or a document separator is expected");
|
|
1706
1706
|
else
|
|
1707
1707
|
return;
|
|
1708
1708
|
}
|
|
@@ -1710,7 +1710,7 @@ function On(e, t) {
|
|
|
1710
1710
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1711
1711
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1712
1712
|
var n = new Jr(e, t), i = e.indexOf("\0");
|
|
1713
|
-
for (i !== -1 && (n.position = i,
|
|
1713
|
+
for (i !== -1 && (n.position = i, k(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1714
1714
|
n.lineIndent += 1, n.position += 1;
|
|
1715
1715
|
for (; n.position < n.length - 1; )
|
|
1716
1716
|
aa(n);
|
|
@@ -1735,22 +1735,22 @@ function la(e, t) {
|
|
|
1735
1735
|
var sa = oa, ca = la, jn = {
|
|
1736
1736
|
loadAll: sa,
|
|
1737
1737
|
load: ca
|
|
1738
|
-
},
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1738
|
+
}, Fn = Object.prototype.toString, En = Object.prototype.hasOwnProperty, ht = 65279, ua = 9, Le = 10, da = 13, pa = 32, fa = 33, ga = 34, tt = 35, ha = 37, ma = 38, ya = 39, va = 42, Mn = 44, ba = 45, Ve = 58, ka = 61, wa = 62, Sa = 63, Ca = 64, Ln = 91, $n = 93, Aa = 96, qn = 123, Ia = 124, Un = 125, ne = {};
|
|
1739
|
+
ne[0] = "\\0";
|
|
1740
|
+
ne[7] = "\\a";
|
|
1741
|
+
ne[8] = "\\b";
|
|
1742
|
+
ne[9] = "\\t";
|
|
1743
|
+
ne[10] = "\\n";
|
|
1744
|
+
ne[11] = "\\v";
|
|
1745
|
+
ne[12] = "\\f";
|
|
1746
|
+
ne[13] = "\\r";
|
|
1747
|
+
ne[27] = "\\e";
|
|
1748
|
+
ne[34] = '\\"';
|
|
1749
|
+
ne[92] = "\\\\";
|
|
1750
|
+
ne[133] = "\\N";
|
|
1751
|
+
ne[160] = "\\_";
|
|
1752
|
+
ne[8232] = "\\L";
|
|
1753
|
+
ne[8233] = "\\P";
|
|
1754
1754
|
var xa = [
|
|
1755
1755
|
"y",
|
|
1756
1756
|
"Y",
|
|
@@ -1769,15 +1769,15 @@ var xa = [
|
|
|
1769
1769
|
"Off",
|
|
1770
1770
|
"OFF"
|
|
1771
1771
|
], _a = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
1772
|
-
function
|
|
1772
|
+
function Na(e, t) {
|
|
1773
1773
|
var n, i, r, o, a, l, s;
|
|
1774
1774
|
if (t === null)
|
|
1775
1775
|
return {};
|
|
1776
1776
|
for (n = {}, i = Object.keys(t), r = 0, o = i.length; r < o; r += 1)
|
|
1777
|
-
a = i[r], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), s = e.compiledTypeMap.fallback[a], s &&
|
|
1777
|
+
a = i[r], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), s = e.compiledTypeMap.fallback[a], s && En.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[a] = l;
|
|
1778
1778
|
return n;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function Ta(e) {
|
|
1781
1781
|
var t, n, i;
|
|
1782
1782
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
1783
1783
|
n = "x", i = 2;
|
|
@@ -1789,11 +1789,11 @@ function Na(e) {
|
|
|
1789
1789
|
throw new re("code point within a string may not be greater than 0xFFFFFFFF");
|
|
1790
1790
|
return "\\" + n + W.repeat("0", i - t.length) + t;
|
|
1791
1791
|
}
|
|
1792
|
-
var Oa = 1,
|
|
1792
|
+
var Oa = 1, $e = 2;
|
|
1793
1793
|
function ja(e) {
|
|
1794
|
-
this.schema = e.schema || pt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = W.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
1794
|
+
this.schema = e.schema || pt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = W.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Na(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 === '"' ? $e : Oa, 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;
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function Et(e, t) {
|
|
1797
1797
|
for (var n = W.repeat(" ", t), i = 0, r = -1, o = "", a, l = e.length; i < l; )
|
|
1798
1798
|
r = e.indexOf(`
|
|
1799
1799
|
`, i), r === -1 ? (a = e.slice(i), i = l) : (a = e.slice(i, r + 1), i = r + 1), a.length && a !== `
|
|
@@ -1804,7 +1804,7 @@ function nt(e, t) {
|
|
|
1804
1804
|
return `
|
|
1805
1805
|
` + W.repeat(" ", e.indent * t);
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function Fa(e, t) {
|
|
1808
1808
|
var n, i, r;
|
|
1809
1809
|
for (n = 0, i = e.implicitTypes.length; n < i; n += 1)
|
|
1810
1810
|
if (r = e.implicitTypes[n], r.resolve(t))
|
|
@@ -1817,26 +1817,26 @@ function ze(e) {
|
|
|
1817
1817
|
function qe(e) {
|
|
1818
1818
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== ht || 65536 <= e && e <= 1114111;
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1821
|
-
return qe(e) && e !== ht && e !== da && e !==
|
|
1820
|
+
function Mt(e) {
|
|
1821
|
+
return qe(e) && e !== ht && e !== da && e !== Le;
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1824
|
-
var i =
|
|
1823
|
+
function Lt(e, t, n) {
|
|
1824
|
+
var i = Mt(e), r = i && !ze(e);
|
|
1825
1825
|
return (
|
|
1826
1826
|
// ns-plain-safe
|
|
1827
1827
|
(n ? (
|
|
1828
1828
|
// c = flow-in
|
|
1829
1829
|
i
|
|
1830
|
-
) : i && e !==
|
|
1830
|
+
) : i && e !== Mn && e !== Ln && e !== $n && e !== qn && e !== Un) && e !== tt && !(t === Ve && !r) || Mt(t) && !ze(t) && e === tt || t === Ve && r
|
|
1831
1831
|
);
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1834
|
-
return qe(e) && e !== ht && !ze(e) && e !== ba && e !==
|
|
1833
|
+
function Ea(e) {
|
|
1834
|
+
return qe(e) && e !== ht && !ze(e) && e !== ba && e !== Sa && e !== Ve && e !== Mn && e !== Ln && e !== $n && e !== qn && e !== Un && e !== tt && e !== ma && e !== va && e !== fa && e !== Ia && e !== ka && e !== wa && e !== ya && e !== ga && e !== ha && e !== Ca && e !== Aa;
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function Ma(e) {
|
|
1837
1837
|
return !ze(e) && e !== Ve;
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1839
|
+
function Fe(e, t) {
|
|
1840
1840
|
var n = e.charCodeAt(t), i;
|
|
1841
1841
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (i = e.charCodeAt(t + 1), i >= 56320 && i <= 57343) ? (n - 55296) * 1024 + i - 56320 + 65536 : n;
|
|
1842
1842
|
}
|
|
@@ -1844,39 +1844,39 @@ function Kn(e) {
|
|
|
1844
1844
|
var t = /^\n* /;
|
|
1845
1845
|
return t.test(e);
|
|
1846
1846
|
}
|
|
1847
|
-
var Rn = 1, it = 2, Bn = 3, Dn = 4,
|
|
1848
|
-
function
|
|
1849
|
-
var s, u = 0, d = null, c = !1, f = !1, p = i !== -1, w = -1,
|
|
1847
|
+
var Rn = 1, it = 2, Bn = 3, Dn = 4, Ce = 5;
|
|
1848
|
+
function La(e, t, n, i, r, o, a, l) {
|
|
1849
|
+
var s, u = 0, d = null, c = !1, f = !1, p = i !== -1, w = -1, S = Ea(Fe(e, 0)) && Ma(Fe(e, e.length - 1));
|
|
1850
1850
|
if (t || a)
|
|
1851
1851
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
1852
|
-
if (u =
|
|
1853
|
-
return
|
|
1854
|
-
|
|
1852
|
+
if (u = Fe(e, s), !qe(u))
|
|
1853
|
+
return Ce;
|
|
1854
|
+
S = S && Lt(u, d, l), d = u;
|
|
1855
1855
|
}
|
|
1856
1856
|
else {
|
|
1857
1857
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
1858
|
-
if (u =
|
|
1858
|
+
if (u = Fe(e, s), u === Le)
|
|
1859
1859
|
c = !0, p && (f = f || // Foldable line = too long, and not more-indented.
|
|
1860
1860
|
s - w - 1 > i && e[w + 1] !== " ", w = s);
|
|
1861
1861
|
else if (!qe(u))
|
|
1862
|
-
return
|
|
1863
|
-
|
|
1862
|
+
return Ce;
|
|
1863
|
+
S = S && Lt(u, d, l), d = u;
|
|
1864
1864
|
}
|
|
1865
1865
|
f = f || p && s - w - 1 > i && e[w + 1] !== " ";
|
|
1866
1866
|
}
|
|
1867
|
-
return !c && !f ?
|
|
1867
|
+
return !c && !f ? S && !a && !r(e) ? Rn : o === $e ? Ce : it : n > 9 && Kn(e) ? Ce : a ? o === $e ? Ce : it : f ? Dn : Bn;
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1869
|
+
function $a(e, t, n, i, r) {
|
|
1870
1870
|
e.dump = function() {
|
|
1871
1871
|
if (t.length === 0)
|
|
1872
|
-
return e.quotingType ===
|
|
1872
|
+
return e.quotingType === $e ? '""' : "''";
|
|
1873
1873
|
if (!e.noCompatMode && (xa.indexOf(t) !== -1 || _a.test(t)))
|
|
1874
|
-
return e.quotingType ===
|
|
1874
|
+
return e.quotingType === $e ? '"' + t + '"' : "'" + t + "'";
|
|
1875
1875
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
1876
1876
|
function s(u) {
|
|
1877
|
-
return
|
|
1877
|
+
return Fa(e, u);
|
|
1878
1878
|
}
|
|
1879
|
-
switch (
|
|
1879
|
+
switch (La(
|
|
1880
1880
|
t,
|
|
1881
1881
|
l,
|
|
1882
1882
|
e.indent,
|
|
@@ -1891,17 +1891,17 @@ function La(e, t, n, i, r) {
|
|
|
1891
1891
|
case it:
|
|
1892
1892
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
1893
1893
|
case Bn:
|
|
1894
|
-
return "|" +
|
|
1894
|
+
return "|" + $t(t, e.indent) + qt(Et(t, o));
|
|
1895
1895
|
case Dn:
|
|
1896
|
-
return ">" +
|
|
1897
|
-
case
|
|
1896
|
+
return ">" + $t(t, e.indent) + qt(Et(qa(t, a), o));
|
|
1897
|
+
case Ce:
|
|
1898
1898
|
return '"' + Ua(t) + '"';
|
|
1899
1899
|
default:
|
|
1900
1900
|
throw new re("impossible error: invalid scalar style");
|
|
1901
1901
|
}
|
|
1902
1902
|
}();
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1904
|
+
function $t(e, t) {
|
|
1905
1905
|
var n = Kn(e) ? String(t) : "", i = e[e.length - 1] === `
|
|
1906
1906
|
`, r = i && (e[e.length - 2] === `
|
|
1907
1907
|
` || e === `
|
|
@@ -1938,7 +1938,7 @@ function Ut(e, t) {
|
|
|
1938
1938
|
}
|
|
1939
1939
|
function Ua(e) {
|
|
1940
1940
|
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
1941
|
-
n =
|
|
1941
|
+
n = Fe(e, r), i = ne[n], !i && qe(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || Ta(n);
|
|
1942
1942
|
return t;
|
|
1943
1943
|
}
|
|
1944
1944
|
function Ka(e, t, n) {
|
|
@@ -1950,7 +1950,7 @@ function Ka(e, t, n) {
|
|
|
1950
1950
|
function Kt(e, t, n, i) {
|
|
1951
1951
|
var r = "", o = e.tag, a, l, s;
|
|
1952
1952
|
for (a = 0, l = n.length; a < l; a += 1)
|
|
1953
|
-
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (de(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && de(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += nt(e, t)), e.dump &&
|
|
1953
|
+
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (de(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && de(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += nt(e, t)), e.dump && Le === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
1954
1954
|
e.tag = o, e.dump = r || "[]";
|
|
1955
1955
|
}
|
|
1956
1956
|
function Ra(e, t, n) {
|
|
@@ -1968,7 +1968,7 @@ function Ba(e, t, n, i) {
|
|
|
1968
1968
|
else if (e.sortKeys)
|
|
1969
1969
|
throw new re("sortKeys must be a boolean or a function");
|
|
1970
1970
|
for (l = 0, s = a.length; l < s; l += 1)
|
|
1971
|
-
f = "", (!i || r !== "") && (f += nt(e, t)), u = a[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), de(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump &&
|
|
1971
|
+
f = "", (!i || r !== "") && (f += nt(e, t)), u = a[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), de(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Le === e.dump.charCodeAt(0) ? f += "?" : f += "? "), f += e.dump, c && (f += nt(e, t)), de(e, t + 1, d, !0, c) && (e.dump && Le === e.dump.charCodeAt(0) ? f += ":" : f += ": ", f += e.dump, r += f));
|
|
1972
1972
|
e.tag = o, e.dump = r || "{}";
|
|
1973
1973
|
}
|
|
1974
1974
|
function Rt(e, t, n) {
|
|
@@ -1976,9 +1976,9 @@ function Rt(e, t, n) {
|
|
|
1976
1976
|
for (r = n ? e.explicitTypes : e.implicitTypes, o = 0, a = r.length; o < a; o += 1)
|
|
1977
1977
|
if (l = r[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
1978
1978
|
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
1979
|
-
if (s = e.styleMap[l.tag] || l.defaultStyle,
|
|
1979
|
+
if (s = e.styleMap[l.tag] || l.defaultStyle, Fn.call(l.represent) === "[object Function]")
|
|
1980
1980
|
i = l.represent(t, s);
|
|
1981
|
-
else if (
|
|
1981
|
+
else if (En.call(l.represent, s))
|
|
1982
1982
|
i = l.represent[s](t, s);
|
|
1983
1983
|
else
|
|
1984
1984
|
throw new re("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
@@ -1990,7 +1990,7 @@ function Rt(e, t, n) {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
function de(e, t, n, i, r, o, a) {
|
|
1992
1992
|
e.tag = null, e.dump = n, Rt(e, n, !1) || Rt(e, n, !0);
|
|
1993
|
-
var l =
|
|
1993
|
+
var l = Fn.call(e.dump), s = i, u;
|
|
1994
1994
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
1995
1995
|
var d = l === "[object Object]" || l === "[object Array]", c, f;
|
|
1996
1996
|
if (d && (c = e.duplicates.indexOf(n), f = c !== -1), (e.tag !== null && e.tag !== "?" || f || e.indent !== 2 && t > 0) && (r = !1), f && e.usedDuplicates[c])
|
|
@@ -2001,7 +2001,7 @@ function de(e, t, n, i, r, o, a) {
|
|
|
2001
2001
|
else if (l === "[object Array]")
|
|
2002
2002
|
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Kt(e, t - 1, e.dump, r) : Kt(e, t, e.dump, r), f && (e.dump = "&ref_" + c + e.dump)) : (Ka(e, t, e.dump), f && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2003
2003
|
else if (l === "[object String]")
|
|
2004
|
-
e.tag !== "?" &&
|
|
2004
|
+
e.tag !== "?" && $a(e, e.dump, t, o, s);
|
|
2005
2005
|
else {
|
|
2006
2006
|
if (l === "[object Undefined]" || e.skipInvalid)
|
|
2007
2007
|
return !1;
|
|
@@ -2047,18 +2047,18 @@ function mt(e, t) {
|
|
|
2047
2047
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2048
2048
|
};
|
|
2049
2049
|
}
|
|
2050
|
-
var Ha =
|
|
2050
|
+
var Ha = ee, Ya = rn, Wa = sn, Ja = fn, Za = gn, Ga = pt, Qa = jn.load, Xa = jn.loadAll, eo = za.dump, to = re, no = {
|
|
2051
2051
|
binary: bn,
|
|
2052
2052
|
float: pn,
|
|
2053
2053
|
map: ln,
|
|
2054
2054
|
null: cn,
|
|
2055
|
-
pairs:
|
|
2056
|
-
set:
|
|
2055
|
+
pairs: wn,
|
|
2056
|
+
set: Sn,
|
|
2057
2057
|
timestamp: yn,
|
|
2058
2058
|
bool: un,
|
|
2059
2059
|
int: dn,
|
|
2060
2060
|
merge: vn,
|
|
2061
|
-
omap:
|
|
2061
|
+
omap: kn,
|
|
2062
2062
|
seq: on,
|
|
2063
2063
|
str: an
|
|
2064
2064
|
}, io = mt("safeLoad", "load"), ro = mt("safeLoadAll", "loadAll"), ao = mt("safeDump", "dump"), oo = {
|
|
@@ -2066,8 +2066,8 @@ var Ha = X, Ya = rn, Wa = sn, Ja = fn, Ga = gn, Za = pt, Qa = jn.load, Xa = jn.l
|
|
|
2066
2066
|
Schema: Ya,
|
|
2067
2067
|
FAILSAFE_SCHEMA: Wa,
|
|
2068
2068
|
JSON_SCHEMA: Ja,
|
|
2069
|
-
CORE_SCHEMA:
|
|
2070
|
-
DEFAULT_SCHEMA:
|
|
2069
|
+
CORE_SCHEMA: Za,
|
|
2070
|
+
DEFAULT_SCHEMA: Ga,
|
|
2071
2071
|
load: Qa,
|
|
2072
2072
|
loadAll: Xa,
|
|
2073
2073
|
dump: eo,
|
|
@@ -2087,20 +2087,20 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2087
2087
|
}
|
|
2088
2088
|
},
|
|
2089
2089
|
setup(e) {
|
|
2090
|
-
const t = e, n =
|
|
2090
|
+
const t = e, n = N(() => {
|
|
2091
2091
|
const i = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, r]) => r !== null && r !== "" && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2092
2092
|
return Object.keys(i).length === 0 && i.constructor === Object ? "" : oo.dump(i).trim();
|
|
2093
2093
|
});
|
|
2094
2094
|
return (i, r) => {
|
|
2095
|
-
const o =
|
|
2096
|
-
return
|
|
2097
|
-
t.yamlRecord ? (
|
|
2095
|
+
const o = $("KCodeBlock");
|
|
2096
|
+
return I(), q("div", lo, [
|
|
2097
|
+
t.yamlRecord ? (I(), z(o, {
|
|
2098
2098
|
key: 0,
|
|
2099
2099
|
id: "yaml-codeblock",
|
|
2100
2100
|
code: n.value,
|
|
2101
2101
|
language: "yaml",
|
|
2102
2102
|
theme: "dark"
|
|
2103
|
-
}, null, 8, ["code"])) :
|
|
2103
|
+
}, null, 8, ["code"])) : te("", !0)
|
|
2104
2104
|
]);
|
|
2105
2105
|
};
|
|
2106
2106
|
}
|
|
@@ -2167,7 +2167,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2167
2167
|
}
|
|
2168
2168
|
},
|
|
2169
2169
|
setup(e) {
|
|
2170
|
-
const t = e, n =
|
|
2170
|
+
const t = e, n = N(() => {
|
|
2171
2171
|
if (typeof t.size == "number" && t.size > 0)
|
|
2172
2172
|
return `${t.size}px`;
|
|
2173
2173
|
if (typeof t.size == "string") {
|
|
@@ -2176,7 +2176,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2176
2176
|
return `${o}px`;
|
|
2177
2177
|
}
|
|
2178
2178
|
return _e;
|
|
2179
|
-
}), i =
|
|
2179
|
+
}), i = N(() => ({
|
|
2180
2180
|
boxSizing: "border-box",
|
|
2181
2181
|
color: t.color,
|
|
2182
2182
|
display: t.display,
|
|
@@ -2184,14 +2184,14 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2184
2184
|
lineHeight: "0",
|
|
2185
2185
|
width: n.value
|
|
2186
2186
|
}));
|
|
2187
|
-
return (r, o) => (
|
|
2187
|
+
return (r, o) => (I(), z(Ue(e.as), {
|
|
2188
2188
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2189
2189
|
class: "kui-icon add-icon",
|
|
2190
2190
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
2191
2191
|
style: lt(i.value)
|
|
2192
2192
|
}, {
|
|
2193
|
-
default:
|
|
2194
|
-
(
|
|
2193
|
+
default: b(() => [
|
|
2194
|
+
(I(), q("svg", {
|
|
2195
2195
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2196
2196
|
"data-testid": "kui-icon-svg-add-icon",
|
|
2197
2197
|
fill: "none",
|
|
@@ -2201,7 +2201,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2201
2201
|
width: "100%",
|
|
2202
2202
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2203
2203
|
}, [
|
|
2204
|
-
e.title ? (
|
|
2204
|
+
e.title ? (I(), q("title", po, M(e.title), 1)) : te("", !0),
|
|
2205
2205
|
fo
|
|
2206
2206
|
], 8, uo))
|
|
2207
2207
|
]),
|
|
@@ -2214,7 +2214,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2214
2214
|
}, bo = /* @__PURE__ */ mo(() => /* @__PURE__ */ U("path", {
|
|
2215
2215
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2216
2216
|
fill: "currentColor"
|
|
2217
|
-
}, null, -1)),
|
|
2217
|
+
}, null, -1)), ko = /* @__PURE__ */ ae({
|
|
2218
2218
|
__name: "ChevronDownIcon",
|
|
2219
2219
|
props: {
|
|
2220
2220
|
/** The accessibility text provided to screen readers */
|
|
@@ -2266,7 +2266,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2266
2266
|
}
|
|
2267
2267
|
},
|
|
2268
2268
|
setup(e) {
|
|
2269
|
-
const t = e, n =
|
|
2269
|
+
const t = e, n = N(() => {
|
|
2270
2270
|
if (typeof t.size == "number" && t.size > 0)
|
|
2271
2271
|
return `${t.size}px`;
|
|
2272
2272
|
if (typeof t.size == "string") {
|
|
@@ -2275,7 +2275,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2275
2275
|
return `${o}px`;
|
|
2276
2276
|
}
|
|
2277
2277
|
return _e;
|
|
2278
|
-
}), i =
|
|
2278
|
+
}), i = N(() => ({
|
|
2279
2279
|
boxSizing: "border-box",
|
|
2280
2280
|
color: t.color,
|
|
2281
2281
|
display: t.display,
|
|
@@ -2283,14 +2283,14 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2283
2283
|
lineHeight: "0",
|
|
2284
2284
|
width: n.value
|
|
2285
2285
|
}));
|
|
2286
|
-
return (r, o) => (
|
|
2286
|
+
return (r, o) => (I(), z(Ue(e.as), {
|
|
2287
2287
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2288
2288
|
class: "kui-icon chevron-down-icon",
|
|
2289
2289
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2290
2290
|
style: lt(i.value)
|
|
2291
2291
|
}, {
|
|
2292
|
-
default:
|
|
2293
|
-
(
|
|
2292
|
+
default: b(() => [
|
|
2293
|
+
(I(), q("svg", {
|
|
2294
2294
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2295
2295
|
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2296
2296
|
fill: "none",
|
|
@@ -2300,17 +2300,17 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2300
2300
|
width: "100%",
|
|
2301
2301
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2302
2302
|
}, [
|
|
2303
|
-
e.title ? (
|
|
2303
|
+
e.title ? (I(), q("title", vo, M(e.title), 1)) : te("", !0),
|
|
2304
2304
|
bo
|
|
2305
2305
|
], 8, yo))
|
|
2306
2306
|
]),
|
|
2307
2307
|
_: 1
|
|
2308
2308
|
}, 8, ["aria-hidden", "style"]));
|
|
2309
2309
|
}
|
|
2310
|
-
}),
|
|
2310
|
+
}), wo = /* @__PURE__ */ yt(ko, [["__scopeId", "data-v-f1d0332e"]]), So = (e) => (st("data-v-288b6455"), e = e(), ct(), e), Co = ["aria-hidden"], Ao = {
|
|
2311
2311
|
key: 0,
|
|
2312
2312
|
"data-testid": "kui-icon-svg-title"
|
|
2313
|
-
}, Io = /* @__PURE__ */
|
|
2313
|
+
}, Io = /* @__PURE__ */ So(() => /* @__PURE__ */ U("path", {
|
|
2314
2314
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2315
2315
|
fill: "currentColor"
|
|
2316
2316
|
}, null, -1)), xo = /* @__PURE__ */ ae({
|
|
@@ -2365,7 +2365,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2365
2365
|
}
|
|
2366
2366
|
},
|
|
2367
2367
|
setup(e) {
|
|
2368
|
-
const t = e, n =
|
|
2368
|
+
const t = e, n = N(() => {
|
|
2369
2369
|
if (typeof t.size == "number" && t.size > 0)
|
|
2370
2370
|
return `${t.size}px`;
|
|
2371
2371
|
if (typeof t.size == "string") {
|
|
@@ -2374,7 +2374,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2374
2374
|
return `${o}px`;
|
|
2375
2375
|
}
|
|
2376
2376
|
return _e;
|
|
2377
|
-
}), i =
|
|
2377
|
+
}), i = N(() => ({
|
|
2378
2378
|
boxSizing: "border-box",
|
|
2379
2379
|
color: t.color,
|
|
2380
2380
|
display: t.display,
|
|
@@ -2382,14 +2382,14 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2382
2382
|
lineHeight: "0",
|
|
2383
2383
|
width: n.value
|
|
2384
2384
|
}));
|
|
2385
|
-
return (r, o) => (
|
|
2385
|
+
return (r, o) => (I(), z(Ue(e.as), {
|
|
2386
2386
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2387
2387
|
class: "kui-icon close-icon",
|
|
2388
2388
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2389
2389
|
style: lt(i.value)
|
|
2390
2390
|
}, {
|
|
2391
|
-
default:
|
|
2392
|
-
(
|
|
2391
|
+
default: b(() => [
|
|
2392
|
+
(I(), q("svg", {
|
|
2393
2393
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2394
2394
|
"data-testid": "kui-icon-svg-close-icon",
|
|
2395
2395
|
fill: "none",
|
|
@@ -2399,14 +2399,14 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2399
2399
|
width: "100%",
|
|
2400
2400
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2401
2401
|
}, [
|
|
2402
|
-
e.title ? (
|
|
2402
|
+
e.title ? (I(), q("title", Ao, M(e.title), 1)) : te("", !0),
|
|
2403
2403
|
Io
|
|
2404
|
-
], 8,
|
|
2404
|
+
], 8, Co))
|
|
2405
2405
|
]),
|
|
2406
2406
|
_: 1
|
|
2407
2407
|
}, 8, ["aria-hidden", "style"]));
|
|
2408
2408
|
}
|
|
2409
|
-
}), _o = /* @__PURE__ */ yt(xo, [["__scopeId", "data-v-288b6455"]]),
|
|
2409
|
+
}), _o = /* @__PURE__ */ yt(xo, [["__scopeId", "data-v-288b6455"]]), No = ["novalidate"], To = {
|
|
2410
2410
|
class: "form-actions",
|
|
2411
2411
|
"data-testid": "form-actions"
|
|
2412
2412
|
}, Oo = /* @__PURE__ */ ae({
|
|
@@ -2471,19 +2471,19 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2471
2471
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
2472
2472
|
setup(e, { emit: t }) {
|
|
2473
2473
|
var n;
|
|
2474
|
-
const i = t, r = e, o = Wt(), { i18n: { t: a } } = be.useI18n(), { getMessageFromError: l } = be.useErrors(), { axiosInstance: s } = be.useAxios((n = r.config) == null ? void 0 : n.axiosRequestConfig), u =
|
|
2475
|
-
var
|
|
2476
|
-
let
|
|
2477
|
-
return r.config.app === "konnect" ?
|
|
2478
|
-
}),
|
|
2474
|
+
const i = t, r = e, o = Wt(), { i18n: { t: a } } = be.useI18n(), { getMessageFromError: l } = be.useErrors(), { axiosInstance: s } = be.useAxios((n = r.config) == null ? void 0 : n.axiosRequestConfig), u = j(!1), d = j(!1), c = j(""), f = N(() => r.canSubmit === !1 || r.isReadonly), p = j(!1), w = N(() => {
|
|
2475
|
+
var h, g;
|
|
2476
|
+
let v = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2477
|
+
return r.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((h = r.config) == null ? void 0 : h.controlPlaneId) || "") : r.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), r.editId ? (v = v.replace(/{id}/gi, r.editId), v) : (v = v.replace(/\/{id}/gi, ""), v);
|
|
2478
|
+
}), S = () => {
|
|
2479
2479
|
p.value = !p.value;
|
|
2480
|
-
}, x = () => {
|
|
2481
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) : E();
|
|
2482
|
-
}, E = () => {
|
|
2483
|
-
i("cancel");
|
|
2484
2480
|
}, C = () => {
|
|
2481
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : O();
|
|
2482
|
+
}, O = () => {
|
|
2483
|
+
i("cancel");
|
|
2484
|
+
}, y = () => {
|
|
2485
2485
|
f.value || i("submit");
|
|
2486
|
-
},
|
|
2486
|
+
}, J = j([
|
|
2487
2487
|
{
|
|
2488
2488
|
title: a("baseForm.configuration.yaml"),
|
|
2489
2489
|
hash: "#yaml"
|
|
@@ -2493,105 +2493,105 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2493
2493
|
hash: "#json"
|
|
2494
2494
|
}
|
|
2495
2495
|
]);
|
|
2496
|
-
return me(() => u.value, (
|
|
2497
|
-
i("loading",
|
|
2496
|
+
return me(() => u.value, (h) => {
|
|
2497
|
+
i("loading", h);
|
|
2498
2498
|
}, { immediate: !0 }), at(async () => {
|
|
2499
2499
|
if (r.editId)
|
|
2500
2500
|
try {
|
|
2501
2501
|
d.value = !1, u.value = !0;
|
|
2502
|
-
const { data:
|
|
2503
|
-
i("fetch:success",
|
|
2504
|
-
} catch (
|
|
2505
|
-
const g = l(
|
|
2506
|
-
c.value = g.startsWith("code") ? a("baseForm.errors.edit") : g, d.value = !0, i("fetch:error",
|
|
2502
|
+
const { data: h } = await s.get(w.value);
|
|
2503
|
+
i("fetch:success", h);
|
|
2504
|
+
} catch (h) {
|
|
2505
|
+
const g = l(h);
|
|
2506
|
+
c.value = g.startsWith("code") ? a("baseForm.errors.edit") : g, d.value = !0, i("fetch:error", h);
|
|
2507
2507
|
} finally {
|
|
2508
2508
|
u.value = !1;
|
|
2509
2509
|
}
|
|
2510
|
-
}), (
|
|
2511
|
-
const
|
|
2512
|
-
return
|
|
2513
|
-
default:
|
|
2514
|
-
u.value ? (
|
|
2510
|
+
}), (h, g) => {
|
|
2511
|
+
const v = $("KSkeleton"), E = $("KEmptyState"), K = $("KAlert"), x = $("KButton"), G = $("KTabs"), R = $("KSlideout"), L = $("KCard");
|
|
2512
|
+
return I(), z(L, { class: "kong-ui-entity-base-form" }, {
|
|
2513
|
+
default: b(() => [
|
|
2514
|
+
u.value ? (I(), z(v, {
|
|
2515
2515
|
key: 0,
|
|
2516
2516
|
type: "form"
|
|
2517
|
-
})) : d.value ? (
|
|
2517
|
+
})) : d.value ? (I(), z(E, {
|
|
2518
2518
|
key: 1,
|
|
2519
|
-
"action-button-text":
|
|
2519
|
+
"action-button-text": m(a)("baseForm.actions.back"),
|
|
2520
2520
|
"data-testid": "form-fetch-error",
|
|
2521
2521
|
"icon-variant": "error",
|
|
2522
|
-
onClickAction:
|
|
2522
|
+
onClickAction: C
|
|
2523
2523
|
}, {
|
|
2524
|
-
default:
|
|
2525
|
-
U("h3", null,
|
|
2524
|
+
default: b(() => [
|
|
2525
|
+
U("h3", null, M(c.value), 1)
|
|
2526
2526
|
]),
|
|
2527
2527
|
_: 1
|
|
2528
|
-
}, 8, ["action-button-text"])) : (
|
|
2528
|
+
}, 8, ["action-button-text"])) : (I(), q("form", {
|
|
2529
2529
|
key: 2,
|
|
2530
2530
|
"data-testid": "form-content",
|
|
2531
2531
|
novalidate: r.noValidate,
|
|
2532
|
-
onReset: Xe(
|
|
2533
|
-
onSubmit: Xe(
|
|
2532
|
+
onReset: Xe(O, ["prevent"]),
|
|
2533
|
+
onSubmit: Xe(y, ["prevent"])
|
|
2534
2534
|
}, [
|
|
2535
|
-
le(
|
|
2536
|
-
e.errorMessage ? (
|
|
2535
|
+
le(h.$slots, "default", {}, void 0, !0),
|
|
2536
|
+
e.errorMessage ? (I(), z(K, {
|
|
2537
2537
|
key: 0,
|
|
2538
2538
|
appearance: "danger",
|
|
2539
2539
|
"data-testid": "form-error",
|
|
2540
2540
|
message: e.errorMessage
|
|
2541
|
-
}, null, 8, ["message"])) :
|
|
2542
|
-
U("div",
|
|
2543
|
-
le(
|
|
2544
|
-
_(
|
|
2541
|
+
}, null, 8, ["message"])) : te("", !0),
|
|
2542
|
+
U("div", To, [
|
|
2543
|
+
le(h.$slots, "form-actions", {}, () => [
|
|
2544
|
+
_(x, {
|
|
2545
2545
|
appearance: "tertiary",
|
|
2546
2546
|
"data-testid": "form-view-configuration",
|
|
2547
|
-
onClick: g[0] || (g[0] = (
|
|
2547
|
+
onClick: g[0] || (g[0] = (Q) => S())
|
|
2548
2548
|
}, {
|
|
2549
|
-
default:
|
|
2550
|
-
|
|
2549
|
+
default: b(() => [
|
|
2550
|
+
Z(M(m(a)("baseForm.actions.viewConfiguration")), 1)
|
|
2551
2551
|
]),
|
|
2552
2552
|
_: 1
|
|
2553
2553
|
}),
|
|
2554
|
-
_(
|
|
2554
|
+
_(x, {
|
|
2555
2555
|
appearance: "secondary",
|
|
2556
2556
|
"data-testid": "form-cancel",
|
|
2557
2557
|
disabled: e.isReadonly,
|
|
2558
2558
|
type: "reset"
|
|
2559
2559
|
}, {
|
|
2560
|
-
default:
|
|
2561
|
-
|
|
2560
|
+
default: b(() => [
|
|
2561
|
+
Z(M(m(a)("baseForm.actions.cancel")), 1)
|
|
2562
2562
|
]),
|
|
2563
2563
|
_: 1
|
|
2564
2564
|
}, 8, ["disabled"]),
|
|
2565
|
-
_(
|
|
2565
|
+
_(x, {
|
|
2566
2566
|
appearance: "primary",
|
|
2567
2567
|
"data-testid": "form-submit",
|
|
2568
2568
|
disabled: f.value,
|
|
2569
2569
|
type: "submit"
|
|
2570
2570
|
}, {
|
|
2571
|
-
default:
|
|
2572
|
-
|
|
2571
|
+
default: b(() => [
|
|
2572
|
+
Z(M(m(a)("baseForm.actions.save")), 1)
|
|
2573
2573
|
]),
|
|
2574
2574
|
_: 1
|
|
2575
2575
|
}, 8, ["disabled"])
|
|
2576
2576
|
], !0)
|
|
2577
2577
|
])
|
|
2578
|
-
], 40,
|
|
2578
|
+
], 40, No)),
|
|
2579
2579
|
_(R, {
|
|
2580
2580
|
"close-on-blur": !1,
|
|
2581
2581
|
"data-testid": "form-view-configuration-slideout",
|
|
2582
2582
|
"has-overlay": !1,
|
|
2583
2583
|
"offset-top": 60,
|
|
2584
|
-
title:
|
|
2584
|
+
title: m(a)("baseForm.configuration.title"),
|
|
2585
2585
|
visible: p.value,
|
|
2586
|
-
onClose: g[1] || (g[1] = (
|
|
2586
|
+
onClose: g[1] || (g[1] = (Q) => S())
|
|
2587
2587
|
}, {
|
|
2588
|
-
default:
|
|
2589
|
-
U("div", null,
|
|
2588
|
+
default: b(() => [
|
|
2589
|
+
U("div", null, M(m(a)("baseForm.configuration.message")), 1),
|
|
2590
2590
|
_(G, {
|
|
2591
2591
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
2592
|
-
tabs:
|
|
2592
|
+
tabs: J.value
|
|
2593
2593
|
}, {
|
|
2594
|
-
json:
|
|
2594
|
+
json: b(() => [
|
|
2595
2595
|
_(Ri, {
|
|
2596
2596
|
config: e.config,
|
|
2597
2597
|
"fetcher-url": w.value,
|
|
@@ -2599,7 +2599,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2599
2599
|
"request-method": r.editId ? "put" : "post"
|
|
2600
2600
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
2601
2601
|
]),
|
|
2602
|
-
yaml:
|
|
2602
|
+
yaml: b(() => [
|
|
2603
2603
|
_(so, {
|
|
2604
2604
|
"yaml-record": r.formFields
|
|
2605
2605
|
}, null, 8, ["yaml-record"])
|
|
@@ -2614,10 +2614,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2614
2614
|
});
|
|
2615
2615
|
};
|
|
2616
2616
|
}
|
|
2617
|
-
}), jo = /* @__PURE__ */
|
|
2618
|
-
key: 0,
|
|
2619
|
-
"data-testid": "first-col"
|
|
2620
|
-
}, Mo = /* @__PURE__ */ ae({
|
|
2617
|
+
}), jo = /* @__PURE__ */ Ne(Oo, [["__scopeId", "data-v-3def74fe"]]), Fo = ["data-truncate"], Eo = /* @__PURE__ */ ae({
|
|
2621
2618
|
__name: "EntityBaseTableCell",
|
|
2622
2619
|
props: {
|
|
2623
2620
|
keyName: {
|
|
@@ -2627,68 +2624,80 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2627
2624
|
rowEl: {
|
|
2628
2625
|
type: [Object, null],
|
|
2629
2626
|
required: !0
|
|
2627
|
+
},
|
|
2628
|
+
tooltip: {
|
|
2629
|
+
type: Boolean,
|
|
2630
|
+
default: !1
|
|
2630
2631
|
}
|
|
2631
2632
|
},
|
|
2632
2633
|
setup(e) {
|
|
2633
|
-
const t = e, n =
|
|
2634
|
-
var
|
|
2635
|
-
return ((
|
|
2636
|
-
}), i =
|
|
2637
|
-
var
|
|
2638
|
-
return ((
|
|
2639
|
-
}), r =
|
|
2640
|
-
var
|
|
2641
|
-
const
|
|
2642
|
-
return
|
|
2643
|
-
});
|
|
2644
|
-
let
|
|
2645
|
-
const
|
|
2646
|
-
|
|
2647
|
-
},
|
|
2648
|
-
var
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2634
|
+
const t = e, n = N(() => {
|
|
2635
|
+
var C;
|
|
2636
|
+
return ((C = t.rowEl) == null ? void 0 : C.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
2637
|
+
}), i = N(() => {
|
|
2638
|
+
var C;
|
|
2639
|
+
return ((C = n.value) == null ? void 0 : C.querySelector('[data-truncate="true"]')) || null;
|
|
2640
|
+
}), r = N(() => {
|
|
2641
|
+
var C, O;
|
|
2642
|
+
const y = (C = t.rowEl) == null ? void 0 : C.querySelectorAll("td");
|
|
2643
|
+
return y ? ((O = y[0]) == null ? void 0 : O.getAttribute("data-testid")) === t.keyName : !1;
|
|
2644
|
+
}), o = N(() => r.value || t.tooltip);
|
|
2645
|
+
let a;
|
|
2646
|
+
const l = () => {
|
|
2647
|
+
a && (a.disconnect(), a = void 0);
|
|
2648
|
+
}, s = () => {
|
|
2649
|
+
var C, O, y;
|
|
2650
|
+
let J = ((C = n.value) == null ? void 0 : C.clientWidth) || 0;
|
|
2651
|
+
if (n.value && "getComputedStyle" in window) {
|
|
2652
|
+
const h = window.getComputedStyle(n.value);
|
|
2653
|
+
J -= (parseFloat(h.paddingLeft) || 0) + (parseFloat(h.paddingRight) || 0);
|
|
2654
|
+
}
|
|
2655
|
+
d.value = ((O = i.value) == null ? void 0 : O.getBoundingClientRect().width) || 0, c.value = J, f.value = ((y = u.value) == null ? void 0 : y.innerText) || "";
|
|
2656
|
+
}, u = j({}), d = j(0), c = j(0), f = j(""), p = N(() => [i.value, n.value]), w = me(
|
|
2657
|
+
p,
|
|
2658
|
+
(C) => {
|
|
2659
|
+
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
2660
|
+
a = new ResizeObserver((O) => {
|
|
2655
2661
|
window.requestAnimationFrame(() => {
|
|
2656
|
-
!Array.isArray(
|
|
2662
|
+
!Array.isArray(O) || !O.length || s();
|
|
2657
2663
|
});
|
|
2658
2664
|
});
|
|
2659
|
-
for (const
|
|
2660
|
-
|
|
2665
|
+
for (const O of C)
|
|
2666
|
+
O && a.observe(O);
|
|
2661
2667
|
}
|
|
2662
2668
|
},
|
|
2663
2669
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
2664
|
-
),
|
|
2665
|
-
return
|
|
2666
|
-
|
|
2667
|
-
}),
|
|
2668
|
-
|
|
2669
|
-
}), (
|
|
2670
|
-
const
|
|
2671
|
-
return
|
|
2670
|
+
), S = N(() => o.value ? d.value > c.value : !1);
|
|
2671
|
+
return Zn(() => {
|
|
2672
|
+
s();
|
|
2673
|
+
}), Gn(() => {
|
|
2674
|
+
w();
|
|
2675
|
+
}), (C, O) => {
|
|
2676
|
+
const y = $("KTooltip");
|
|
2677
|
+
return I(), q("span", {
|
|
2672
2678
|
ref_key: "contentRef",
|
|
2673
|
-
ref:
|
|
2679
|
+
ref: u,
|
|
2674
2680
|
class: "content-wrapper"
|
|
2675
2681
|
}, [
|
|
2676
|
-
|
|
2677
|
-
|
|
2682
|
+
o.value ? (I(), q("span", {
|
|
2683
|
+
key: 0,
|
|
2684
|
+
"data-truncate": o.value || void 0
|
|
2685
|
+
}, [
|
|
2686
|
+
_(y, {
|
|
2678
2687
|
"max-width": "300",
|
|
2679
2688
|
placement: "bottomStart",
|
|
2680
|
-
text:
|
|
2689
|
+
text: S.value ? f.value : ""
|
|
2681
2690
|
}, {
|
|
2682
|
-
default:
|
|
2683
|
-
le(
|
|
2691
|
+
default: b(() => [
|
|
2692
|
+
le(C.$slots, "default", {}, void 0, !0)
|
|
2684
2693
|
]),
|
|
2685
2694
|
_: 3
|
|
2686
2695
|
}, 8, ["text"])
|
|
2687
|
-
])) : le(
|
|
2696
|
+
], 8, Fo)) : le(C.$slots, "default", { key: 1 }, void 0, !0)
|
|
2688
2697
|
], 512);
|
|
2689
2698
|
};
|
|
2690
2699
|
}
|
|
2691
|
-
}),
|
|
2700
|
+
}), Mo = /* @__PURE__ */ Ne(Eo, [["__scopeId", "data-v-6019026f"]]), Lo = { class: "toolbar-container" }, $o = {
|
|
2692
2701
|
key: 0,
|
|
2693
2702
|
class: "toolbar-button-container"
|
|
2694
2703
|
}, qo = ["data-testid"], Uo = /* @__PURE__ */ ae({
|
|
@@ -2805,8 +2814,8 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2805
2814
|
},
|
|
2806
2815
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
2807
2816
|
setup(e, { emit: t }) {
|
|
2808
|
-
const n = e, i = t, { i18n: { t: r } } = be.useI18n(), o =
|
|
2809
|
-
var g,
|
|
2817
|
+
const n = e, i = t, { i18n: { t: r } } = be.useI18n(), o = N(() => {
|
|
2818
|
+
var g, v;
|
|
2810
2819
|
return typeof n.errorMessage == "string" ? {
|
|
2811
2820
|
hasError: !!n.errorMessage,
|
|
2812
2821
|
title: n.errorMessage,
|
|
@@ -2814,16 +2823,16 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2814
2823
|
} : {
|
|
2815
2824
|
hasError: !!n.errorMessage,
|
|
2816
2825
|
title: (g = n.errorMessage) == null ? void 0 : g.title,
|
|
2817
|
-
message: (
|
|
2826
|
+
message: (v = n.errorMessage) == null ? void 0 : v.message
|
|
2818
2827
|
};
|
|
2819
|
-
}), a =
|
|
2828
|
+
}), a = N(() => n.cacheIdentifier || n.preferencesStorageKey), l = (g) => g.hasData || !!n.query, s = N(() => {
|
|
2820
2829
|
const g = [];
|
|
2821
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
2822
|
-
const
|
|
2830
|
+
return Object.keys(n.tableHeaders).forEach((v) => {
|
|
2831
|
+
const E = n.tableHeaders[v];
|
|
2823
2832
|
g.push({
|
|
2824
|
-
label:
|
|
2825
|
-
key:
|
|
2826
|
-
sortable:
|
|
2833
|
+
label: E.label ?? v,
|
|
2834
|
+
key: v,
|
|
2835
|
+
sortable: E.sortable ?? !1
|
|
2827
2836
|
});
|
|
2828
2837
|
}), n.enableEntityActions && g.push({
|
|
2829
2838
|
key: "actions",
|
|
@@ -2833,44 +2842,44 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2833
2842
|
"data-rowid": g.id,
|
|
2834
2843
|
"data-testid": g.name,
|
|
2835
2844
|
...n.rowAttributes(g)
|
|
2836
|
-
}), d =
|
|
2837
|
-
var
|
|
2838
|
-
return (
|
|
2845
|
+
}), d = j({}), c = (g) => {
|
|
2846
|
+
var v;
|
|
2847
|
+
return (v = d.value) == null ? void 0 : v.$el.querySelector(`[data-rowid="${g.id}"]`);
|
|
2839
2848
|
}, f = (g) => {
|
|
2840
|
-
const
|
|
2849
|
+
const v = {
|
|
2841
2850
|
"data-testid": g.headerKey,
|
|
2842
2851
|
...n.cellAttributes(g)
|
|
2843
2852
|
};
|
|
2844
|
-
return g.colIndex === 0 && (
|
|
2853
|
+
return g.colIndex === 0 && (v.style = {
|
|
2845
2854
|
maxWidth: "250px",
|
|
2846
2855
|
overflowX: "hidden",
|
|
2847
2856
|
textOverflow: "ellipsis"
|
|
2848
|
-
}),
|
|
2857
|
+
}), v;
|
|
2849
2858
|
}, p = () => {
|
|
2850
2859
|
i("empty-state-cta-clicked"), w();
|
|
2851
2860
|
}, w = () => {
|
|
2852
2861
|
i("clear-search-input");
|
|
2853
|
-
},
|
|
2854
|
-
i("click:row",
|
|
2855
|
-
}),
|
|
2862
|
+
}, S = N(() => n.disableRowClick ? void 0 : (g, v) => {
|
|
2863
|
+
i("click:row", v);
|
|
2864
|
+
}), C = (g) => {
|
|
2856
2865
|
i("sort", g);
|
|
2857
|
-
}, { setTablePreferences:
|
|
2858
|
-
const g =
|
|
2866
|
+
}, { setTablePreferences: O, getTablePreferences: y } = ci(), J = N(() => {
|
|
2867
|
+
const g = y(n.preferencesStorageKey);
|
|
2859
2868
|
return {
|
|
2860
2869
|
...n.initialFetcherParams,
|
|
2861
2870
|
...g
|
|
2862
2871
|
};
|
|
2863
|
-
}),
|
|
2864
|
-
n.preferencesStorageKey &&
|
|
2872
|
+
}), h = (g) => {
|
|
2873
|
+
n.preferencesStorageKey && O(n.preferencesStorageKey, g);
|
|
2865
2874
|
};
|
|
2866
|
-
return (g,
|
|
2867
|
-
const
|
|
2868
|
-
return
|
|
2875
|
+
return (g, v) => {
|
|
2876
|
+
const E = $("KIcon"), K = $("KButton"), x = $("KDropdown"), G = $("KTable"), R = $("KCard");
|
|
2877
|
+
return I(), z(R, {
|
|
2869
2878
|
class: "kong-ui-entity-base-table",
|
|
2870
2879
|
title: e.title,
|
|
2871
2880
|
"title-tag": e.titleTag
|
|
2872
2881
|
}, {
|
|
2873
|
-
default:
|
|
2882
|
+
default: b(() => [
|
|
2874
2883
|
_(G, {
|
|
2875
2884
|
ref_key: "tableRefs",
|
|
2876
2885
|
ref: d,
|
|
@@ -2878,11 +2887,11 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2878
2887
|
"cell-attrs": f,
|
|
2879
2888
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
2880
2889
|
"disable-sorting": e.disableSorting,
|
|
2881
|
-
"empty-state-action-message": e.query ?
|
|
2890
|
+
"empty-state-action-message": e.query ? m(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
2882
2891
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
2883
2892
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
2884
|
-
"empty-state-message": e.query ?
|
|
2885
|
-
"empty-state-title": e.query ?
|
|
2893
|
+
"empty-state-message": e.query ? m(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
2894
|
+
"empty-state-title": e.query ? m(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
2886
2895
|
"enable-client-sort": e.enableClientSort,
|
|
2887
2896
|
"error-state-message": o.value.message,
|
|
2888
2897
|
"error-state-title": o.value.title,
|
|
@@ -2891,51 +2900,51 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2891
2900
|
"has-error": o.value.hasError,
|
|
2892
2901
|
headers: s.value,
|
|
2893
2902
|
"hide-pagination-when-optional": "",
|
|
2894
|
-
"initial-fetcher-params":
|
|
2903
|
+
"initial-fetcher-params": J.value,
|
|
2895
2904
|
"is-loading": e.isLoading,
|
|
2896
2905
|
"pagination-type": e.paginationType,
|
|
2897
2906
|
"row-attrs": u,
|
|
2898
2907
|
"search-input": e.query,
|
|
2899
2908
|
onKtableEmptyStateCtaClicked: p,
|
|
2900
|
-
"onRow:click":
|
|
2901
|
-
onSort:
|
|
2902
|
-
"onUpdate:tablePreferences":
|
|
2909
|
+
"onRow:click": S.value,
|
|
2910
|
+
onSort: v[0] || (v[0] = (L) => C(L)),
|
|
2911
|
+
"onUpdate:tablePreferences": h
|
|
2903
2912
|
}, Vt({
|
|
2904
|
-
toolbar:
|
|
2905
|
-
fe(U("div",
|
|
2913
|
+
toolbar: b(({ state: L }) => [
|
|
2914
|
+
fe(U("div", Lo, [
|
|
2906
2915
|
le(g.$slots, "toolbar-filter", {}, void 0, !0),
|
|
2907
|
-
g.$slots["toolbar-button"] ? (
|
|
2916
|
+
g.$slots["toolbar-button"] ? (I(), q("div", $o, [
|
|
2908
2917
|
le(g.$slots, "toolbar-button", {}, void 0, !0)
|
|
2909
|
-
])) :
|
|
2918
|
+
])) : te("", !0)
|
|
2910
2919
|
], 512), [
|
|
2911
|
-
[ge, l(
|
|
2920
|
+
[ge, l(L)]
|
|
2912
2921
|
])
|
|
2913
2922
|
]),
|
|
2914
|
-
actions:
|
|
2923
|
+
actions: b(({ row: L, rowKey: Q, rowValue: pe }) => [
|
|
2915
2924
|
U("div", {
|
|
2916
2925
|
class: "actions-container",
|
|
2917
|
-
"data-testid":
|
|
2926
|
+
"data-testid": L.name
|
|
2918
2927
|
}, [
|
|
2919
|
-
_(
|
|
2928
|
+
_(x, {
|
|
2920
2929
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
2921
2930
|
width: e.dropdownMenuWidth
|
|
2922
2931
|
}, {
|
|
2923
|
-
items:
|
|
2932
|
+
items: b(() => [
|
|
2924
2933
|
le(g.$slots, "actions", {
|
|
2925
|
-
row:
|
|
2926
|
-
rowKey:
|
|
2934
|
+
row: L,
|
|
2935
|
+
rowKey: Q,
|
|
2927
2936
|
rowValue: pe
|
|
2928
2937
|
}, void 0, !0)
|
|
2929
2938
|
]),
|
|
2930
|
-
default:
|
|
2939
|
+
default: b(() => [
|
|
2931
2940
|
_(K, {
|
|
2932
2941
|
class: "actions-trigger",
|
|
2933
2942
|
"data-testid": "overflow-actions-button",
|
|
2934
2943
|
size: "small"
|
|
2935
2944
|
}, {
|
|
2936
|
-
icon:
|
|
2937
|
-
_(
|
|
2938
|
-
color:
|
|
2945
|
+
icon: b(() => [
|
|
2946
|
+
_(E, {
|
|
2947
|
+
color: m($i),
|
|
2939
2948
|
icon: "more",
|
|
2940
2949
|
size: "16"
|
|
2941
2950
|
}, null, 8, ["color"])
|
|
@@ -2949,30 +2958,31 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2949
2958
|
]),
|
|
2950
2959
|
_: 2
|
|
2951
2960
|
}, [
|
|
2952
|
-
ot(e.tableHeaders, (
|
|
2953
|
-
name:
|
|
2954
|
-
fn:
|
|
2955
|
-
_(
|
|
2956
|
-
"key-name": String(
|
|
2957
|
-
"row-el": c(pe)
|
|
2961
|
+
ot(e.tableHeaders, (L, Q) => ({
|
|
2962
|
+
name: Q,
|
|
2963
|
+
fn: b(({ row: pe, rowKey: we, rowValue: ce }) => [
|
|
2964
|
+
_(Mo, {
|
|
2965
|
+
"key-name": String(Q),
|
|
2966
|
+
"row-el": c(pe),
|
|
2967
|
+
tooltip: L.tooltip
|
|
2958
2968
|
}, {
|
|
2959
|
-
default:
|
|
2960
|
-
le(g.$slots,
|
|
2969
|
+
default: b(() => [
|
|
2970
|
+
le(g.$slots, Q, {
|
|
2961
2971
|
row: pe,
|
|
2962
|
-
rowKey:
|
|
2972
|
+
rowKey: we,
|
|
2963
2973
|
rowValue: ce
|
|
2964
2974
|
}, () => [
|
|
2965
|
-
|
|
2975
|
+
Z(M(ce), 1)
|
|
2966
2976
|
], !0)
|
|
2967
2977
|
]),
|
|
2968
2978
|
_: 2
|
|
2969
|
-
}, 1032, ["key-name", "row-el"])
|
|
2979
|
+
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
2970
2980
|
])
|
|
2971
2981
|
})),
|
|
2972
2982
|
e.query ? void 0 : {
|
|
2973
2983
|
name: "empty-state-action-icon",
|
|
2974
|
-
fn:
|
|
2975
|
-
_(
|
|
2984
|
+
fn: b(() => [
|
|
2985
|
+
_(m(ho))
|
|
2976
2986
|
]),
|
|
2977
2987
|
key: "0"
|
|
2978
2988
|
}
|
|
@@ -2982,7 +2992,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
2982
2992
|
}, 8, ["title", "title-tag"]);
|
|
2983
2993
|
};
|
|
2984
2994
|
}
|
|
2985
|
-
}), Ko = /* @__PURE__ */
|
|
2995
|
+
}), Ko = /* @__PURE__ */ Ne(Uo, [["__scopeId", "data-v-adb02213"]]), Ro = {
|
|
2986
2996
|
key: 0,
|
|
2987
2997
|
class: "kong-ui-entity-delete-error"
|
|
2988
2998
|
}, Bo = {
|
|
@@ -3027,14 +3037,14 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3027
3037
|
},
|
|
3028
3038
|
emits: ["cancel", "proceed"],
|
|
3029
3039
|
setup(e, { emit: t }) {
|
|
3030
|
-
const { i18nT: n } = be.useI18n(), i = e, r = t, o =
|
|
3040
|
+
const { i18nT: n } = be.useI18n(), i = e, r = t, o = N(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
3031
3041
|
r("cancel");
|
|
3032
3042
|
}, l = () => {
|
|
3033
3043
|
r("proceed");
|
|
3034
3044
|
};
|
|
3035
3045
|
return (s, u) => {
|
|
3036
|
-
const d =
|
|
3037
|
-
return
|
|
3046
|
+
const d = $("KAlert"), c = $("KPrompt");
|
|
3047
|
+
return I(), z(c, {
|
|
3038
3048
|
"action-button-appearance": "danger",
|
|
3039
3049
|
"action-button-disabled": e.actionPending,
|
|
3040
3050
|
"action-button-text": "Yes, delete",
|
|
@@ -3045,44 +3055,44 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3045
3055
|
onCancel: a,
|
|
3046
3056
|
onProceed: l
|
|
3047
3057
|
}, {
|
|
3048
|
-
default:
|
|
3049
|
-
e.error ? (
|
|
3058
|
+
default: b(() => [
|
|
3059
|
+
e.error ? (I(), q("div", Ro, [
|
|
3050
3060
|
_(d, { appearance: "danger" }, {
|
|
3051
|
-
default:
|
|
3052
|
-
|
|
3061
|
+
default: b(() => [
|
|
3062
|
+
Z(M(e.error), 1)
|
|
3053
3063
|
]),
|
|
3054
3064
|
_: 1
|
|
3055
3065
|
})
|
|
3056
|
-
])) :
|
|
3057
|
-
_(
|
|
3066
|
+
])) : te("", !0),
|
|
3067
|
+
_(m(n), {
|
|
3058
3068
|
class: "message",
|
|
3059
3069
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3060
3070
|
tag: "p"
|
|
3061
3071
|
}, Vt({
|
|
3062
|
-
entityType:
|
|
3063
|
-
|
|
3072
|
+
entityType: b(() => [
|
|
3073
|
+
Z(M(i.entityType), 1)
|
|
3064
3074
|
]),
|
|
3065
3075
|
_: 2
|
|
3066
3076
|
}, [
|
|
3067
3077
|
i.entityName ? {
|
|
3068
3078
|
name: "entityName",
|
|
3069
|
-
fn:
|
|
3070
|
-
U("strong", null,
|
|
3079
|
+
fn: b(() => [
|
|
3080
|
+
U("strong", null, M(i.entityName), 1)
|
|
3071
3081
|
]),
|
|
3072
3082
|
key: "0"
|
|
3073
3083
|
} : void 0
|
|
3074
3084
|
]), 1032, ["keypath"]),
|
|
3075
|
-
i.description || s.$slots.description ? (
|
|
3085
|
+
i.description || s.$slots.description ? (I(), q("div", Bo, [
|
|
3076
3086
|
le(s.$slots, "description", {}, () => [
|
|
3077
|
-
U("p", null,
|
|
3087
|
+
U("p", null, M(i.description), 1)
|
|
3078
3088
|
], !0)
|
|
3079
|
-
])) :
|
|
3089
|
+
])) : te("", !0)
|
|
3080
3090
|
]),
|
|
3081
3091
|
_: 3
|
|
3082
3092
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3083
3093
|
};
|
|
3084
3094
|
}
|
|
3085
|
-
}), Po = /* @__PURE__ */
|
|
3095
|
+
}), Po = /* @__PURE__ */ Ne(Do, [["__scopeId", "data-v-4361d622"]]), Vo = {
|
|
3086
3096
|
fill: "none",
|
|
3087
3097
|
height: "20",
|
|
3088
3098
|
viewBox: "0 0 20 20",
|
|
@@ -3101,11 +3111,11 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3101
3111
|
props: {
|
|
3102
3112
|
color: {
|
|
3103
3113
|
type: String,
|
|
3104
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3114
|
+
default: `var(--kong-ui-entity-filter-color, ${Li})`
|
|
3105
3115
|
}
|
|
3106
3116
|
},
|
|
3107
3117
|
setup(e) {
|
|
3108
|
-
return (t, n) => (
|
|
3118
|
+
return (t, n) => (I(), q("svg", Vo, [
|
|
3109
3119
|
U("mask", zo, [
|
|
3110
3120
|
U("rect", {
|
|
3111
3121
|
fill: e.color,
|
|
@@ -3124,7 +3134,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3124
3134
|
}), Jo = {
|
|
3125
3135
|
key: 1,
|
|
3126
3136
|
class: "kong-ui-entity-filter"
|
|
3127
|
-
},
|
|
3137
|
+
}, Zo = { class: "kong-ui-entity-filter-menu" }, Go = ["data-testid"], Qo = ["onClick", "onKeydown"], Xo = { class: "menu-item-indicator" }, el = { class: "menu-item-body" }, tl = ["for"], nl = { class: "menu-item-buttons" }, il = { class: "filter-clear-button-container" }, rl = /* @__PURE__ */ ae({
|
|
3128
3138
|
__name: "EntityFilter",
|
|
3129
3139
|
props: {
|
|
3130
3140
|
// filter config, either exact match or fuzzy match
|
|
@@ -3144,55 +3154,58 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3144
3154
|
},
|
|
3145
3155
|
emits: ["update:modelValue"],
|
|
3146
3156
|
setup(e, { emit: t }) {
|
|
3147
|
-
const { i18n: { t: n } } = be.useI18n(), i = e, r = t, o =
|
|
3148
|
-
const
|
|
3149
|
-
return new URLSearchParams(i.modelValue).forEach((g,
|
|
3150
|
-
g !== "" &&
|
|
3151
|
-
}),
|
|
3152
|
-
}), u =
|
|
3153
|
-
const
|
|
3154
|
-
return Object.keys(
|
|
3155
|
-
|
|
3157
|
+
const { i18n: { t: n } } = be.useI18n(), i = e, r = t, o = j(!1), a = j({}), l = j(/* @__PURE__ */ new Set()), s = N(() => {
|
|
3158
|
+
const h = [];
|
|
3159
|
+
return new URLSearchParams(i.modelValue).forEach((g, v) => {
|
|
3160
|
+
g !== "" && h.push(v);
|
|
3161
|
+
}), h;
|
|
3162
|
+
}), u = N(() => {
|
|
3163
|
+
const h = i.config.fields;
|
|
3164
|
+
return Object.keys(h).filter((g) => {
|
|
3165
|
+
var v;
|
|
3166
|
+
return (v = h == null ? void 0 : h[g]) == null ? void 0 : v.searchable;
|
|
3167
|
+
}).map((g) => ({
|
|
3168
|
+
label: h[g].label || g,
|
|
3156
3169
|
value: g,
|
|
3157
3170
|
expanded: !1
|
|
3158
3171
|
}));
|
|
3159
3172
|
});
|
|
3160
|
-
me(() => i.modelValue, (
|
|
3161
|
-
a.value = {}, new URLSearchParams(
|
|
3162
|
-
a.value[
|
|
3173
|
+
me(() => i.modelValue, (h) => {
|
|
3174
|
+
a.value = {}, new URLSearchParams(h).forEach((g, v) => {
|
|
3175
|
+
a.value[v] = g;
|
|
3163
3176
|
});
|
|
3164
3177
|
});
|
|
3165
3178
|
const d = () => {
|
|
3166
3179
|
o.value = !o.value;
|
|
3167
|
-
}, c = (
|
|
3168
|
-
l.value.has(
|
|
3169
|
-
}, f = (
|
|
3170
|
-
r("update:modelValue",
|
|
3180
|
+
}, c = (h) => {
|
|
3181
|
+
l.value.has(h) ? l.value.delete(h) : l.value.add(h);
|
|
3182
|
+
}, f = (h) => {
|
|
3183
|
+
r("update:modelValue", h);
|
|
3171
3184
|
}, p = () => {
|
|
3172
3185
|
f("");
|
|
3173
|
-
}, w = (
|
|
3174
|
-
var g,
|
|
3175
|
-
return (((
|
|
3176
|
-
value:
|
|
3177
|
-
label:
|
|
3186
|
+
}, w = (h) => `filter-${h}`, S = (h) => {
|
|
3187
|
+
var g, v;
|
|
3188
|
+
return (((v = (g = i.config.schema) == null ? void 0 : g[h]) == null ? void 0 : v.values) ?? []).map((E) => ({
|
|
3189
|
+
value: E,
|
|
3190
|
+
label: E
|
|
3178
3191
|
}));
|
|
3179
|
-
},
|
|
3180
|
-
var g,
|
|
3181
|
-
return ((
|
|
3182
|
-
},
|
|
3192
|
+
}, C = (h) => {
|
|
3193
|
+
var g, v;
|
|
3194
|
+
return ((v = (g = i.config.schema) == null ? void 0 : g[h]) == null ? void 0 : v.type) ?? "text";
|
|
3195
|
+
}, O = (h) => {
|
|
3183
3196
|
a.value = {
|
|
3184
3197
|
...a.value,
|
|
3185
|
-
[
|
|
3186
|
-
},
|
|
3187
|
-
},
|
|
3188
|
-
a.value = {},
|
|
3189
|
-
},
|
|
3190
|
-
const g = Object.keys(a.value).reduce((
|
|
3191
|
-
|
|
3198
|
+
[h]: ""
|
|
3199
|
+
}, J();
|
|
3200
|
+
}, y = () => {
|
|
3201
|
+
a.value = {}, J(!0);
|
|
3202
|
+
}, J = (h = !1) => {
|
|
3203
|
+
const g = Object.keys(a.value).reduce((v, E) => (a.value[E] && (v[E] = `${a.value[E]}`), v), {});
|
|
3204
|
+
h && (o.value = !1), r("update:modelValue", new URLSearchParams(g).toString());
|
|
3192
3205
|
};
|
|
3193
|
-
return (
|
|
3194
|
-
const
|
|
3195
|
-
return e.config.isExactMatch ? (
|
|
3206
|
+
return (h, g) => {
|
|
3207
|
+
const v = $("KInput"), E = $("KButton"), K = $("KSelect");
|
|
3208
|
+
return e.config.isExactMatch ? (I(), z(v, {
|
|
3196
3209
|
key: 0,
|
|
3197
3210
|
autocomplete: "off",
|
|
3198
3211
|
class: "kong-ui-entity-filter-input",
|
|
@@ -3201,11 +3214,11 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3201
3214
|
placeholder: e.config.placeholder,
|
|
3202
3215
|
"onUpdate:modelValue": f
|
|
3203
3216
|
}, {
|
|
3204
|
-
before:
|
|
3217
|
+
before: b(() => [
|
|
3205
3218
|
_(Bt)
|
|
3206
3219
|
]),
|
|
3207
|
-
after:
|
|
3208
|
-
fe(_(
|
|
3220
|
+
after: b(() => [
|
|
3221
|
+
fe(_(m(_o), {
|
|
3209
3222
|
class: "kong-ui-entity-filter-clear",
|
|
3210
3223
|
onClick: p
|
|
3211
3224
|
}, null, 512), [
|
|
@@ -3213,15 +3226,15 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3213
3226
|
])
|
|
3214
3227
|
]),
|
|
3215
3228
|
_: 1
|
|
3216
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
3217
|
-
_(
|
|
3229
|
+
}, 8, ["model-value", "placeholder"])) : (I(), q("div", Jo, [
|
|
3230
|
+
_(E, {
|
|
3218
3231
|
appearance: "tertiary",
|
|
3219
3232
|
"data-testid": "filter-button",
|
|
3220
3233
|
onClick: d
|
|
3221
3234
|
}, {
|
|
3222
|
-
default:
|
|
3235
|
+
default: b(() => [
|
|
3223
3236
|
_(Bt),
|
|
3224
|
-
|
|
3237
|
+
Z(" " + M(m(n)("filter.filterButtonText")) + " " + M(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
3225
3238
|
]),
|
|
3226
3239
|
_: 1
|
|
3227
3240
|
}),
|
|
@@ -3231,90 +3244,90 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3231
3244
|
}, null, 512), [
|
|
3232
3245
|
[ge, o.value]
|
|
3233
3246
|
]),
|
|
3234
|
-
fe(U("div",
|
|
3235
|
-
(
|
|
3247
|
+
fe(U("div", Zo, [
|
|
3248
|
+
(I(!0), q(zt, null, ot(u.value, (x) => {
|
|
3236
3249
|
var G, R;
|
|
3237
|
-
return
|
|
3238
|
-
key:
|
|
3250
|
+
return I(), q("div", {
|
|
3251
|
+
key: x.value,
|
|
3239
3252
|
class: "kong-ui-entity-filter-menu-item",
|
|
3240
|
-
"data-testid":
|
|
3253
|
+
"data-testid": x.value
|
|
3241
3254
|
}, [
|
|
3242
3255
|
U("span", {
|
|
3243
|
-
class:
|
|
3256
|
+
class: Ee(["menu-item-title", { expanded: l.value.has(x.value) }]),
|
|
3244
3257
|
role: "button",
|
|
3245
3258
|
tabindex: "0",
|
|
3246
|
-
onClick: (
|
|
3247
|
-
onKeydown: Hn((
|
|
3259
|
+
onClick: (L) => c(x.value),
|
|
3260
|
+
onKeydown: Hn((L) => c(x.value), ["enter"])
|
|
3248
3261
|
}, [
|
|
3249
|
-
|
|
3262
|
+
Z(M(x.label) + " ", 1),
|
|
3250
3263
|
fe(U("span", Xo, null, 512), [
|
|
3251
|
-
[ge, s.value.includes(
|
|
3264
|
+
[ge, s.value.includes(x.value)]
|
|
3252
3265
|
]),
|
|
3253
|
-
_(
|
|
3254
|
-
class:
|
|
3255
|
-
color:
|
|
3266
|
+
_(m(wo), {
|
|
3267
|
+
class: Ee(["menu-item-expand-icon", { expanded: l.value.has(x.value) }]),
|
|
3268
|
+
color: m(qi)
|
|
3256
3269
|
}, null, 8, ["class", "color"])
|
|
3257
3270
|
], 42, Qo),
|
|
3258
3271
|
fe(U("div", el, [
|
|
3259
3272
|
U("label", {
|
|
3260
3273
|
class: "menu-item-label",
|
|
3261
|
-
for: w(
|
|
3262
|
-
},
|
|
3263
|
-
((R = (G = e.config.schema) == null ? void 0 : G[
|
|
3274
|
+
for: w(x.value)
|
|
3275
|
+
}, M(m(n)("filter.fieldLabel")), 9, tl),
|
|
3276
|
+
((R = (G = e.config.schema) == null ? void 0 : G[x.value]) == null ? void 0 : R.type) === "select" ? (I(), z(K, {
|
|
3264
3277
|
key: 0,
|
|
3265
|
-
id: w(
|
|
3266
|
-
modelValue: a.value[
|
|
3267
|
-
"onUpdate:modelValue": (
|
|
3268
|
-
items:
|
|
3269
|
-
placeholder:
|
|
3270
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
3278
|
+
id: w(x.value),
|
|
3279
|
+
modelValue: a.value[x.value],
|
|
3280
|
+
"onUpdate:modelValue": (L) => a.value[x.value] = L,
|
|
3281
|
+
items: S(x.value),
|
|
3282
|
+
placeholder: m(n)("filter.selectPlaceholder")
|
|
3283
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (I(), z(v, {
|
|
3271
3284
|
key: 1,
|
|
3272
|
-
id: w(
|
|
3273
|
-
modelValue: a.value[
|
|
3274
|
-
"onUpdate:modelValue": (
|
|
3285
|
+
id: w(x.value),
|
|
3286
|
+
modelValue: a.value[x.value],
|
|
3287
|
+
"onUpdate:modelValue": (L) => a.value[x.value] = L,
|
|
3275
3288
|
autocomplete: "off",
|
|
3276
|
-
placeholder:
|
|
3277
|
-
type: x
|
|
3289
|
+
placeholder: m(n)("filter.inputPlaceholder"),
|
|
3290
|
+
type: C(x.value)
|
|
3278
3291
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3279
3292
|
], 512), [
|
|
3280
|
-
[ge, l.value.has(
|
|
3293
|
+
[ge, l.value.has(x.value)]
|
|
3281
3294
|
]),
|
|
3282
3295
|
fe(U("div", nl, [
|
|
3283
|
-
_(
|
|
3296
|
+
_(E, {
|
|
3284
3297
|
appearance: "tertiary",
|
|
3285
3298
|
"data-testid": "apply-filter",
|
|
3286
3299
|
size: "small",
|
|
3287
|
-
onClick: g[0] || (g[0] = (
|
|
3300
|
+
onClick: g[0] || (g[0] = (L) => J(!0))
|
|
3288
3301
|
}, {
|
|
3289
|
-
default:
|
|
3290
|
-
|
|
3302
|
+
default: b(() => [
|
|
3303
|
+
Z(M(m(n)("filter.applyButtonText")), 1)
|
|
3291
3304
|
]),
|
|
3292
3305
|
_: 1
|
|
3293
3306
|
}),
|
|
3294
|
-
_(
|
|
3307
|
+
_(E, {
|
|
3295
3308
|
appearance: "tertiary",
|
|
3296
3309
|
"data-testid": "clear-filter",
|
|
3297
3310
|
size: "small",
|
|
3298
|
-
onClick: (
|
|
3311
|
+
onClick: (L) => O(x.value)
|
|
3299
3312
|
}, {
|
|
3300
|
-
default:
|
|
3301
|
-
|
|
3313
|
+
default: b(() => [
|
|
3314
|
+
Z(M(m(n)("filter.clearButtonText")), 1)
|
|
3302
3315
|
]),
|
|
3303
3316
|
_: 2
|
|
3304
3317
|
}, 1032, ["onClick"])
|
|
3305
3318
|
], 512), [
|
|
3306
|
-
[ge, l.value.has(
|
|
3319
|
+
[ge, l.value.has(x.value)]
|
|
3307
3320
|
])
|
|
3308
|
-
], 8,
|
|
3321
|
+
], 8, Go);
|
|
3309
3322
|
}), 128)),
|
|
3310
3323
|
U("div", il, [
|
|
3311
|
-
_(
|
|
3324
|
+
_(E, {
|
|
3312
3325
|
appearance: "tertiary",
|
|
3313
3326
|
size: "small",
|
|
3314
|
-
onClick:
|
|
3327
|
+
onClick: y
|
|
3315
3328
|
}, {
|
|
3316
|
-
default:
|
|
3317
|
-
|
|
3329
|
+
default: b(() => [
|
|
3330
|
+
Z(M(m(n)("filter.clearAllButtonText")), 1)
|
|
3318
3331
|
]),
|
|
3319
3332
|
_: 1
|
|
3320
3333
|
})
|
|
@@ -3325,7 +3338,7 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3325
3338
|
]));
|
|
3326
3339
|
};
|
|
3327
3340
|
}
|
|
3328
|
-
}), al = /* @__PURE__ */
|
|
3341
|
+
}), al = /* @__PURE__ */ Ne(rl, [["__scopeId", "data-v-9a370e3a"]]), Qe = /* @__PURE__ */ ae({
|
|
3329
3342
|
__name: "PermissionsWrapper",
|
|
3330
3343
|
props: {
|
|
3331
3344
|
/**
|
|
@@ -3347,13 +3360,13 @@ const lo = { class: "yaml-config" }, so = /* @__PURE__ */ ae({
|
|
|
3347
3360
|
}
|
|
3348
3361
|
},
|
|
3349
3362
|
setup(e) {
|
|
3350
|
-
const t = e, n =
|
|
3363
|
+
const t = e, n = j(void 0), i = N(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
3351
3364
|
return me(() => t.authFunction, async () => {
|
|
3352
3365
|
n.value = await t.authFunction();
|
|
3353
3366
|
}, { immediate: !0 }), (r, o) => i.value ? le(r.$slots, "default", {
|
|
3354
3367
|
key: 0,
|
|
3355
3368
|
isAllowed: n.value
|
|
3356
|
-
}) :
|
|
3369
|
+
}) : te("", !0);
|
|
3357
3370
|
}
|
|
3358
3371
|
});
|
|
3359
3372
|
let Ke;
|
|
@@ -3363,11 +3376,11 @@ function ll() {
|
|
|
3363
3376
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3364
3377
|
return Ke(ol);
|
|
3365
3378
|
}
|
|
3366
|
-
const
|
|
3379
|
+
const X = [];
|
|
3367
3380
|
for (let e = 0; e < 256; ++e)
|
|
3368
|
-
|
|
3381
|
+
X.push((e + 256).toString(16).slice(1));
|
|
3369
3382
|
function sl(e, t = 0) {
|
|
3370
|
-
return
|
|
3383
|
+
return X[e[t + 0]] + X[e[t + 1]] + X[e[t + 2]] + X[e[t + 3]] + "-" + X[e[t + 4]] + X[e[t + 5]] + "-" + X[e[t + 6]] + X[e[t + 7]] + "-" + X[e[t + 8]] + X[e[t + 9]] + "-" + X[e[t + 10]] + X[e[t + 11]] + X[e[t + 12]] + X[e[t + 13]] + X[e[t + 14]] + X[e[t + 15]];
|
|
3371
3384
|
}
|
|
3372
3385
|
const cl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Dt = {
|
|
3373
3386
|
randomUUID: cl
|
|
@@ -3421,34 +3434,34 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3421
3434
|
},
|
|
3422
3435
|
setup(e) {
|
|
3423
3436
|
const t = Yn(), n = ul();
|
|
3424
|
-
return (i, r) => (
|
|
3425
|
-
"aria-labelledby": e.title ?
|
|
3426
|
-
class:
|
|
3437
|
+
return (i, r) => (I(), q("div", {
|
|
3438
|
+
"aria-labelledby": e.title ? m(n) : void 0,
|
|
3439
|
+
class: Ee(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
3427
3440
|
role: "group"
|
|
3428
3441
|
}, [
|
|
3429
3442
|
U("div", pl, [
|
|
3430
|
-
e.hideInfoHeader ?
|
|
3443
|
+
e.hideInfoHeader ? te("", !0) : (I(), q("div", {
|
|
3431
3444
|
key: 0,
|
|
3432
|
-
class:
|
|
3445
|
+
class: Ee(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3433
3446
|
}, [
|
|
3434
|
-
e.title ? (
|
|
3447
|
+
e.title ? (I(), z(Ue(e.titleTag), {
|
|
3435
3448
|
key: 0,
|
|
3436
|
-
id:
|
|
3449
|
+
id: m(n),
|
|
3437
3450
|
class: "form-section-title"
|
|
3438
3451
|
}, {
|
|
3439
|
-
default:
|
|
3440
|
-
|
|
3452
|
+
default: b(() => [
|
|
3453
|
+
Z(M(e.title), 1)
|
|
3441
3454
|
]),
|
|
3442
3455
|
_: 1
|
|
3443
|
-
}, 8, ["id"])) :
|
|
3444
|
-
e.description ||
|
|
3456
|
+
}, 8, ["id"])) : te("", !0),
|
|
3457
|
+
e.description || m(t).description ? (I(), q("div", fl, [
|
|
3445
3458
|
le(i.$slots, "description", {}, () => [
|
|
3446
|
-
U("p", null,
|
|
3459
|
+
U("p", null, M(e.description), 1)
|
|
3447
3460
|
], !0)
|
|
3448
|
-
])) :
|
|
3449
|
-
|
|
3461
|
+
])) : te("", !0),
|
|
3462
|
+
m(t).footer ? (I(), q("div", gl, [
|
|
3450
3463
|
le(i.$slots, "footer", {}, void 0, !0)
|
|
3451
|
-
])) :
|
|
3464
|
+
])) : te("", !0)
|
|
3452
3465
|
], 2)),
|
|
3453
3466
|
U("div", hl, [
|
|
3454
3467
|
le(i.$slots, "default", {}, void 0, !0)
|
|
@@ -3456,7 +3469,7 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3456
3469
|
])
|
|
3457
3470
|
], 10, dl));
|
|
3458
3471
|
}
|
|
3459
|
-
}), Pt = /* @__PURE__ */
|
|
3472
|
+
}), Pt = /* @__PURE__ */ Ne(ml, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Pn, useDeleteUrlBuilder: yl, useErrors: vl, useExternalLinkCreator: Ml, useFetchUrlBuilder: Ll, useFetcher: bl, useDebouncedFilter: kl, useStringHelpers: $l, useHelpers: ql, useGatewayFeatureSupported: Ul, useTruncationDetector: Kl, useValidators: Rl } = be, wl = { class: "kong-ui-entities-snis-list" }, Sl = { key: 1 }, Cl = { key: 1 }, Al = /* @__PURE__ */ ae({
|
|
3460
3473
|
__name: "SniList",
|
|
3461
3474
|
props: {
|
|
3462
3475
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3503,137 +3516,137 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3503
3516
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
3504
3517
|
setup(e, { emit: t }) {
|
|
3505
3518
|
var ce;
|
|
3506
|
-
const n = t, i = e, { i18n: { t: r } } = Jt.useI18n(), { axiosInstance: o } = Pn((ce = i.config) == null ? void 0 : ce.axiosRequestConfig), a =
|
|
3519
|
+
const n = t, i = e, { i18n: { t: r } } = Jt.useI18n(), { axiosInstance: o } = Pn((ce = i.config) == null ? void 0 : ce.axiosRequestConfig), a = j(1), l = N(() => i.config.app !== "kongManager" || !!i.config.disableSorting), s = {
|
|
3507
3520
|
name: { label: r("snis.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
3508
3521
|
certificate: { label: r("snis.list.table_headers.certificate_id"), sortable: !1 },
|
|
3509
3522
|
tags: { label: r("snis.list.table_headers.tags"), sortable: !1 }
|
|
3510
|
-
}, u = s, d = (
|
|
3523
|
+
}, u = s, d = (T) => ({
|
|
3511
3524
|
style: {
|
|
3512
|
-
maxWidth:
|
|
3525
|
+
maxWidth: T.headerKey === "name" ? "250px" : T.headerKey === "certificate" ? "350px" : null
|
|
3513
3526
|
}
|
|
3514
|
-
}), c =
|
|
3527
|
+
}), c = N(() => {
|
|
3515
3528
|
var P, Y;
|
|
3516
|
-
let
|
|
3517
|
-
return i.config.app === "konnect" ?
|
|
3518
|
-
}), f =
|
|
3519
|
-
const
|
|
3520
|
-
if (
|
|
3529
|
+
let T = `${i.config.apiBaseUrl}${je.list[i.config.app].all}`;
|
|
3530
|
+
return i.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((P = i.config) == null ? void 0 : P.controlPlaneId) || "") : i.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (Y = i.config) != null && Y.workspace ? `/${i.config.workspace}` : "")), T;
|
|
3531
|
+
}), f = j(""), p = N(() => {
|
|
3532
|
+
const T = i.config.app === "konnect" || i.config.isExactMatch;
|
|
3533
|
+
if (T)
|
|
3521
3534
|
return {
|
|
3522
|
-
isExactMatch:
|
|
3535
|
+
isExactMatch: T,
|
|
3523
3536
|
placeholder: r("search.placeholder")
|
|
3524
3537
|
};
|
|
3525
3538
|
const { name: P } = s;
|
|
3526
3539
|
return {
|
|
3527
|
-
isExactMatch:
|
|
3540
|
+
isExactMatch: T,
|
|
3528
3541
|
fields: { name: P },
|
|
3529
3542
|
schema: i.config.filterSchema
|
|
3530
3543
|
};
|
|
3531
|
-
}), { fetcher: w, fetcherState:
|
|
3544
|
+
}), { fetcher: w, fetcherState: S } = bl(i.config, c.value), C = () => {
|
|
3532
3545
|
f.value = "";
|
|
3533
|
-
},
|
|
3546
|
+
}, O = () => {
|
|
3534
3547
|
a.value++;
|
|
3535
|
-
},
|
|
3548
|
+
}, y = j(null), J = j({
|
|
3536
3549
|
ctaPath: i.config.createRoute,
|
|
3537
3550
|
ctaText: void 0,
|
|
3538
3551
|
message: `${r("snis.list.empty_state.description")}${i.config.additionMessageForEmptyState ? ` ${i.config.additionMessageForEmptyState}` : ""}`,
|
|
3539
3552
|
title: r("snis.title")
|
|
3540
|
-
}),
|
|
3541
|
-
const Y =
|
|
3553
|
+
}), h = (T, P) => {
|
|
3554
|
+
const Y = T.id;
|
|
3542
3555
|
if (!P(Y)) {
|
|
3543
3556
|
n("copy:error", {
|
|
3544
|
-
entity:
|
|
3557
|
+
entity: T,
|
|
3545
3558
|
field: "id",
|
|
3546
3559
|
message: r("errors.copy")
|
|
3547
3560
|
});
|
|
3548
3561
|
return;
|
|
3549
3562
|
}
|
|
3550
3563
|
n("copy:success", {
|
|
3551
|
-
entity:
|
|
3564
|
+
entity: T,
|
|
3552
3565
|
field: "id",
|
|
3553
3566
|
message: r("copy.success", { val: Y })
|
|
3554
3567
|
});
|
|
3555
|
-
}, g = (
|
|
3556
|
-
const Y = JSON.stringify(
|
|
3568
|
+
}, g = (T, P) => {
|
|
3569
|
+
const Y = JSON.stringify(T);
|
|
3557
3570
|
if (!P(Y)) {
|
|
3558
3571
|
n("copy:error", {
|
|
3559
|
-
entity:
|
|
3572
|
+
entity: T,
|
|
3560
3573
|
message: r("errors.copy")
|
|
3561
3574
|
});
|
|
3562
3575
|
return;
|
|
3563
3576
|
}
|
|
3564
3577
|
n("copy:success", {
|
|
3565
|
-
entity:
|
|
3578
|
+
entity: T,
|
|
3566
3579
|
message: r("copy.success_brief")
|
|
3567
3580
|
});
|
|
3568
|
-
},
|
|
3581
|
+
}, v = (T) => ({
|
|
3569
3582
|
label: r("actions.edit"),
|
|
3570
|
-
to: i.config.getEditRoute(
|
|
3571
|
-
}),
|
|
3572
|
-
|
|
3573
|
-
},
|
|
3574
|
-
K.value = !1,
|
|
3583
|
+
to: i.config.getEditRoute(T)
|
|
3584
|
+
}), E = j(void 0), K = j(!1), x = j(!1), G = j(""), R = yl(i.config, c.value), L = (T) => {
|
|
3585
|
+
E.value = T, K.value = !0;
|
|
3586
|
+
}, Q = () => {
|
|
3587
|
+
K.value = !1, E.value = void 0;
|
|
3575
3588
|
}, pe = async () => {
|
|
3576
|
-
var
|
|
3577
|
-
if ((
|
|
3578
|
-
|
|
3589
|
+
var T, P, Y;
|
|
3590
|
+
if ((T = E.value) != null && T.id) {
|
|
3591
|
+
x.value = !0;
|
|
3579
3592
|
try {
|
|
3580
|
-
await o.delete(R(
|
|
3581
|
-
} catch (
|
|
3582
|
-
G.value = ((Y = (P =
|
|
3593
|
+
await o.delete(R(E.value.id)), n("delete:success", E.value), x.value = !1, Q(), a.value++;
|
|
3594
|
+
} catch (A) {
|
|
3595
|
+
G.value = ((Y = (P = A.response) == null ? void 0 : P.data) == null ? void 0 : Y.message) || A.message || r("errors.delete"), n("error", A);
|
|
3583
3596
|
} finally {
|
|
3584
|
-
|
|
3597
|
+
x.value = !1;
|
|
3585
3598
|
}
|
|
3586
3599
|
}
|
|
3587
|
-
},
|
|
3588
|
-
return me(
|
|
3589
|
-
var P, Y,
|
|
3590
|
-
if (Array.isArray((P =
|
|
3591
|
-
|
|
3600
|
+
}, we = j(!0);
|
|
3601
|
+
return me(S, (T) => {
|
|
3602
|
+
var P, Y, A, F;
|
|
3603
|
+
if (Array.isArray((P = T == null ? void 0 : T.response) == null ? void 0 : P.data) && (we.value = T.response.data.length > 0), T.status === ve.Error) {
|
|
3604
|
+
y.value = {
|
|
3592
3605
|
title: r("errors.general")
|
|
3593
|
-
}, (
|
|
3606
|
+
}, (F = (A = (Y = T.error) == null ? void 0 : Y.response) == null ? void 0 : A.data) != null && F.message && (y.value.message = T.error.response.data.message), n("error", T.error);
|
|
3594
3607
|
return;
|
|
3595
3608
|
}
|
|
3596
|
-
|
|
3609
|
+
y.value = null;
|
|
3597
3610
|
}), at(async () => {
|
|
3598
|
-
await i.canCreate() && (
|
|
3599
|
-
}), (
|
|
3600
|
-
const Y =
|
|
3601
|
-
return
|
|
3602
|
-
_(
|
|
3611
|
+
await i.canCreate() && (J.value.title = r("snis.list.empty_state.title"), J.value.ctaText = r("actions.create"));
|
|
3612
|
+
}), (T, P) => {
|
|
3613
|
+
const Y = $("KButton"), A = $("KCopy"), F = $("KBadge"), V = $("KTruncate"), ue = $("KDropdownItem"), ie = $("KClipboardProvider");
|
|
3614
|
+
return I(), q("div", wl, [
|
|
3615
|
+
_(m(Ko), {
|
|
3603
3616
|
"cache-identifier": e.cacheIdentifier,
|
|
3604
3617
|
"cell-attributes": d,
|
|
3605
3618
|
"disable-pagination-page-jump": "",
|
|
3606
3619
|
"disable-row-click": !0,
|
|
3607
3620
|
"disable-sorting": l.value,
|
|
3608
|
-
"empty-state-options":
|
|
3621
|
+
"empty-state-options": J.value,
|
|
3609
3622
|
"enable-entity-actions": "",
|
|
3610
|
-
"error-message":
|
|
3611
|
-
fetcher:
|
|
3623
|
+
"error-message": y.value,
|
|
3624
|
+
fetcher: m(w),
|
|
3612
3625
|
"fetcher-cache-key": a.value,
|
|
3613
3626
|
"pagination-type": "offset",
|
|
3614
3627
|
"preferences-storage-key": "kong-ui-entities-snis-list",
|
|
3615
3628
|
query: f.value,
|
|
3616
|
-
"table-headers":
|
|
3629
|
+
"table-headers": m(u),
|
|
3617
3630
|
"use-action-outside": e.useActionOutside,
|
|
3618
|
-
onClearSearchInput:
|
|
3619
|
-
onSort:
|
|
3631
|
+
onClearSearchInput: C,
|
|
3632
|
+
onSort: O
|
|
3620
3633
|
}, {
|
|
3621
|
-
"toolbar-filter":
|
|
3622
|
-
_(
|
|
3634
|
+
"toolbar-filter": b(() => [
|
|
3635
|
+
_(m(al), {
|
|
3623
3636
|
modelValue: f.value,
|
|
3624
3637
|
"onUpdate:modelValue": P[0] || (P[0] = (D) => f.value = D),
|
|
3625
3638
|
config: p.value
|
|
3626
3639
|
}, null, 8, ["modelValue", "config"])
|
|
3627
3640
|
]),
|
|
3628
|
-
"toolbar-button":
|
|
3629
|
-
(
|
|
3641
|
+
"toolbar-button": b(() => [
|
|
3642
|
+
(I(), z(Ue(e.useActionOutside ? "Teleport" : "div"), {
|
|
3630
3643
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
3631
3644
|
}, {
|
|
3632
|
-
default:
|
|
3633
|
-
_(
|
|
3645
|
+
default: b(() => [
|
|
3646
|
+
_(m(Qe), {
|
|
3634
3647
|
"auth-function": () => e.canCreate()
|
|
3635
3648
|
}, {
|
|
3636
|
-
default:
|
|
3649
|
+
default: b(() => [
|
|
3637
3650
|
fe(_(Y, {
|
|
3638
3651
|
appearance: "primary",
|
|
3639
3652
|
"data-testid": "toolbar-add-sni",
|
|
@@ -3641,12 +3654,12 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3641
3654
|
size: "large",
|
|
3642
3655
|
to: e.config.createRoute
|
|
3643
3656
|
}, {
|
|
3644
|
-
default:
|
|
3645
|
-
|
|
3657
|
+
default: b(() => [
|
|
3658
|
+
Z(M(m(r)("snis.list.toolbar_actions.new")), 1)
|
|
3646
3659
|
]),
|
|
3647
3660
|
_: 1
|
|
3648
3661
|
}, 8, ["to"]), [
|
|
3649
|
-
[ge,
|
|
3662
|
+
[ge, we.value]
|
|
3650
3663
|
])
|
|
3651
3664
|
]),
|
|
3652
3665
|
_: 1
|
|
@@ -3655,44 +3668,44 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3655
3668
|
_: 1
|
|
3656
3669
|
}, 8, ["to"]))
|
|
3657
3670
|
]),
|
|
3658
|
-
name:
|
|
3659
|
-
U("b", null,
|
|
3671
|
+
name: b(({ rowValue: D }) => [
|
|
3672
|
+
U("b", null, M(D ?? "-"), 1)
|
|
3660
3673
|
]),
|
|
3661
|
-
certificate:
|
|
3662
|
-
D.certificate && D.certificate.id ? (
|
|
3674
|
+
certificate: b(({ row: D }) => [
|
|
3675
|
+
D.certificate && D.certificate.id ? (I(), z(A, {
|
|
3663
3676
|
key: 0,
|
|
3664
3677
|
class: "copy-certificate-uuid",
|
|
3665
3678
|
"data-testid": "copy-certificate-uuid",
|
|
3666
3679
|
text: D.certificate.id,
|
|
3667
3680
|
truncate: ""
|
|
3668
|
-
}, null, 8, ["text"])) : (
|
|
3681
|
+
}, null, 8, ["text"])) : (I(), q("span", Sl, "-"))
|
|
3669
3682
|
]),
|
|
3670
|
-
tags:
|
|
3671
|
-
D != null && D.length ? (
|
|
3672
|
-
default:
|
|
3673
|
-
(
|
|
3683
|
+
tags: b(({ rowValue: D }) => [
|
|
3684
|
+
D != null && D.length ? (I(), z(V, { key: 0 }, {
|
|
3685
|
+
default: b(() => [
|
|
3686
|
+
(I(!0), q(zt, null, ot(D, (B) => (I(), z(F, {
|
|
3674
3687
|
key: B,
|
|
3675
3688
|
onClick: P[1] || (P[1] = Xe(() => {
|
|
3676
3689
|
}, ["stop"]))
|
|
3677
3690
|
}, {
|
|
3678
|
-
default:
|
|
3679
|
-
|
|
3691
|
+
default: b(() => [
|
|
3692
|
+
Z(M(B), 1)
|
|
3680
3693
|
]),
|
|
3681
3694
|
_: 2
|
|
3682
3695
|
}, 1024))), 128))
|
|
3683
3696
|
]),
|
|
3684
3697
|
_: 2
|
|
3685
|
-
}, 1024)) : (
|
|
3698
|
+
}, 1024)) : (I(), q("span", Cl, "-"))
|
|
3686
3699
|
]),
|
|
3687
|
-
actions:
|
|
3700
|
+
actions: b(({ row: D }) => [
|
|
3688
3701
|
_(ie, null, {
|
|
3689
|
-
default:
|
|
3702
|
+
default: b(({ copyToClipboard: B }) => [
|
|
3690
3703
|
_(ue, {
|
|
3691
3704
|
"data-testid": "action-entity-copy-id",
|
|
3692
|
-
onClick: (zn) =>
|
|
3705
|
+
onClick: (zn) => h(D, B)
|
|
3693
3706
|
}, {
|
|
3694
|
-
default:
|
|
3695
|
-
|
|
3707
|
+
default: b(() => [
|
|
3708
|
+
Z(M(m(r)("actions.copy_id")), 1)
|
|
3696
3709
|
]),
|
|
3697
3710
|
_: 2
|
|
3698
3711
|
}, 1032, ["onClick"])
|
|
@@ -3700,42 +3713,42 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3700
3713
|
_: 2
|
|
3701
3714
|
}, 1024),
|
|
3702
3715
|
_(ie, null, {
|
|
3703
|
-
default:
|
|
3716
|
+
default: b(({ copyToClipboard: B }) => [
|
|
3704
3717
|
_(ue, {
|
|
3705
3718
|
"data-testid": "action-entity-copy-json",
|
|
3706
3719
|
onClick: (zn) => g(D, B)
|
|
3707
3720
|
}, {
|
|
3708
|
-
default:
|
|
3709
|
-
|
|
3721
|
+
default: b(() => [
|
|
3722
|
+
Z(M(m(r)("actions.copy_json")), 1)
|
|
3710
3723
|
]),
|
|
3711
3724
|
_: 2
|
|
3712
3725
|
}, 1032, ["onClick"])
|
|
3713
3726
|
]),
|
|
3714
3727
|
_: 2
|
|
3715
3728
|
}, 1024),
|
|
3716
|
-
_(
|
|
3729
|
+
_(m(Qe), {
|
|
3717
3730
|
"auth-function": () => e.canEdit(D)
|
|
3718
3731
|
}, {
|
|
3719
|
-
default:
|
|
3732
|
+
default: b(() => [
|
|
3720
3733
|
_(ue, {
|
|
3721
3734
|
"data-testid": "action-entity-edit",
|
|
3722
|
-
item:
|
|
3735
|
+
item: v(D.id)
|
|
3723
3736
|
}, null, 8, ["item"])
|
|
3724
3737
|
]),
|
|
3725
3738
|
_: 2
|
|
3726
3739
|
}, 1032, ["auth-function"]),
|
|
3727
|
-
_(
|
|
3740
|
+
_(m(Qe), {
|
|
3728
3741
|
"auth-function": () => e.canDelete(D)
|
|
3729
3742
|
}, {
|
|
3730
|
-
default:
|
|
3743
|
+
default: b(() => [
|
|
3731
3744
|
_(ue, {
|
|
3732
3745
|
danger: "",
|
|
3733
3746
|
"data-testid": "action-entity-delete",
|
|
3734
3747
|
"has-divider": "",
|
|
3735
|
-
onClick: (B) =>
|
|
3748
|
+
onClick: (B) => L(D)
|
|
3736
3749
|
}, {
|
|
3737
|
-
default:
|
|
3738
|
-
|
|
3750
|
+
default: b(() => [
|
|
3751
|
+
Z(M(m(r)("actions.delete")), 1)
|
|
3739
3752
|
]),
|
|
3740
3753
|
_: 2
|
|
3741
3754
|
}, 1032, ["onClick"])
|
|
@@ -3745,16 +3758,16 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3745
3758
|
]),
|
|
3746
3759
|
_: 1
|
|
3747
3760
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
3748
|
-
_(
|
|
3749
|
-
"action-pending":
|
|
3750
|
-
description:
|
|
3751
|
-
"entity-name":
|
|
3752
|
-
"entity-type":
|
|
3761
|
+
_(m(Po), {
|
|
3762
|
+
"action-pending": x.value,
|
|
3763
|
+
description: m(r)("delete.description"),
|
|
3764
|
+
"entity-name": E.value && (E.value.name || E.value.id),
|
|
3765
|
+
"entity-type": m(Zt).SNI,
|
|
3753
3766
|
error: G.value,
|
|
3754
3767
|
"need-confirm": !1,
|
|
3755
|
-
title:
|
|
3768
|
+
title: m(r)("delete.title"),
|
|
3756
3769
|
visible: K.value,
|
|
3757
|
-
onCancel:
|
|
3770
|
+
onCancel: Q,
|
|
3758
3771
|
onProceed: pe
|
|
3759
3772
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
3760
3773
|
]);
|
|
@@ -3769,7 +3782,7 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3769
3782
|
key: 2,
|
|
3770
3783
|
class: "invalid-certificate-message",
|
|
3771
3784
|
"data-testid": "invalid-certificate-message"
|
|
3772
|
-
},
|
|
3785
|
+
}, Nl = /* @__PURE__ */ ae({
|
|
3773
3786
|
__name: "SniForm",
|
|
3774
3787
|
props: {
|
|
3775
3788
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3788,7 +3801,7 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3788
3801
|
emits: ["update", "error", "loading"],
|
|
3789
3802
|
setup(e, { emit: t }) {
|
|
3790
3803
|
var Y;
|
|
3791
|
-
const n = t, i = e, r = Wt(), { i18n: { t: o } } = Jt.useI18n(), { getMessageFromError: a } = vl(), { axiosInstance: l } = Pn((Y = i.config) == null ? void 0 : Y.axiosRequestConfig), s =
|
|
3804
|
+
const n = t, i = e, r = Wt(), { i18n: { t: o } } = Jt.useI18n(), { getMessageFromError: a } = vl(), { axiosInstance: l } = Pn((Y = i.config) == null ? void 0 : Y.axiosRequestConfig), s = N(() => je.form[i.config.app].edit), u = N(() => i.sniId ? Re.Edit : Re.Create), d = N(() => i.config.certificateId && u.value === Re.Create ? i.config.certificateId : ""), c = vt({
|
|
3792
3805
|
fields: {
|
|
3793
3806
|
name: "",
|
|
3794
3807
|
tags: "",
|
|
@@ -3800,155 +3813,155 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3800
3813
|
name: "",
|
|
3801
3814
|
tags: "",
|
|
3802
3815
|
certificate_id: ""
|
|
3803
|
-
}), p =
|
|
3804
|
-
var
|
|
3805
|
-
c.fields.name = (
|
|
3806
|
-
},
|
|
3816
|
+
}), p = N(() => JSON.stringify(c.fields) !== JSON.stringify(f) && !!c.fields.name && !!(c.fields.certificate_id || d.value)), w = (A) => {
|
|
3817
|
+
var F, V;
|
|
3818
|
+
c.fields.name = (A == null ? void 0 : A.name) || "", c.fields.tags = ((F = A == null ? void 0 : A.tags) == null ? void 0 : F.join(", ")) || "", c.fields.certificate_id = ((V = A == null ? void 0 : A.certificate) == null ? void 0 : V.id) || "", Object.assign(f, c.fields);
|
|
3819
|
+
}, S = () => {
|
|
3807
3820
|
r.push(i.config.cancelRoute);
|
|
3808
|
-
},
|
|
3809
|
-
var
|
|
3810
|
-
let
|
|
3811
|
-
return i.config.app === "konnect" ?
|
|
3812
|
-
}),
|
|
3813
|
-
var
|
|
3814
|
-
let
|
|
3815
|
-
return i.config.app === "konnect" ?
|
|
3816
|
-
}),
|
|
3817
|
-
var
|
|
3821
|
+
}, C = N(() => {
|
|
3822
|
+
var F, V;
|
|
3823
|
+
let A = `${i.config.apiBaseUrl}${je.form[i.config.app].validate}`;
|
|
3824
|
+
return i.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((F = i.config) == null ? void 0 : F.controlPlaneId) || "") : i.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (V = i.config) != null && V.workspace ? `/${i.config.workspace}` : "")), A = A.replace(/{id}/gi, i.sniId), A;
|
|
3825
|
+
}), O = N(() => {
|
|
3826
|
+
var F, V;
|
|
3827
|
+
let A = `${i.config.apiBaseUrl}${je.form[i.config.app][u.value]}`;
|
|
3828
|
+
return i.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((F = i.config) == null ? void 0 : F.controlPlaneId) || "") : i.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (V = i.config) != null && V.workspace ? `/${i.config.workspace}` : "")), A = A.replace(/{id}/gi, i.sniId), A;
|
|
3829
|
+
}), y = N(() => {
|
|
3830
|
+
var A, F;
|
|
3818
3831
|
return {
|
|
3819
3832
|
name: c.fields.name,
|
|
3820
|
-
tags: (
|
|
3833
|
+
tags: (F = (A = c.fields.tags.split(",")) == null ? void 0 : A.map((V) => String(V || "").trim())) == null ? void 0 : F.filter((V) => V !== ""),
|
|
3821
3834
|
certificate: { id: d.value || c.fields.certificate_id }
|
|
3822
3835
|
};
|
|
3823
|
-
}),
|
|
3824
|
-
var
|
|
3836
|
+
}), J = async () => {
|
|
3837
|
+
var A, F, V, ue, ie, D;
|
|
3825
3838
|
try {
|
|
3826
3839
|
c.isReadonly = !0;
|
|
3827
3840
|
let B;
|
|
3828
|
-
await l.post(
|
|
3841
|
+
await l.post(C.value, y.value), u.value === "create" ? B = await l.post(O.value, y.value) : u.value === "edit" && (B = ((A = i.config) == null ? void 0 : A.app) === "konnect" ? await l.put(O.value, y.value) : await l.patch(O.value, y.value)), c.fields.name = ((F = B == null ? void 0 : B.data) == null ? void 0 : F.name) || "", c.fields.tags = ((ue = (V = B == null ? void 0 : B.data) == null ? void 0 : V.tags) == null ? void 0 : ue.join(", ")) || "", c.fields.certificate_id = ((D = (ie = B == null ? void 0 : B.data) == null ? void 0 : ie.certificate) == null ? void 0 : D.id) || "", Object.assign(f, c.fields), n("update", B == null ? void 0 : B.data);
|
|
3829
3842
|
} catch (B) {
|
|
3830
3843
|
c.errorMessage = a(B), n("error", B);
|
|
3831
3844
|
} finally {
|
|
3832
3845
|
c.isReadonly = !1;
|
|
3833
3846
|
}
|
|
3834
3847
|
}, {
|
|
3835
|
-
debouncedQueryChange:
|
|
3848
|
+
debouncedQueryChange: h,
|
|
3836
3849
|
loading: g,
|
|
3837
|
-
allRecords:
|
|
3838
|
-
error:
|
|
3850
|
+
allRecords: v,
|
|
3851
|
+
error: E,
|
|
3839
3852
|
validationError: K,
|
|
3840
|
-
loadItems:
|
|
3853
|
+
loadItems: x,
|
|
3841
3854
|
results: G
|
|
3842
|
-
} =
|
|
3843
|
-
|
|
3844
|
-
},
|
|
3845
|
-
label:
|
|
3846
|
-
value:
|
|
3847
|
-
selected: c.fields.certificate_id ===
|
|
3848
|
-
}))), P = (
|
|
3855
|
+
} = kl(i.config, je.form[i.config.app].certificates), R = (A) => {
|
|
3856
|
+
h(A);
|
|
3857
|
+
}, L = N(() => E.value ? o("errors.certificates.fetch") : ""), Q = N(() => K.value ? o("errors.certificates.invalid") : ""), pe = j(0), we = N(() => v.value === void 0), ce = j(/* @__PURE__ */ new Set()), T = N(() => Array.from(ce.value).map((F) => ({
|
|
3858
|
+
label: F,
|
|
3859
|
+
value: F,
|
|
3860
|
+
selected: c.fields.certificate_id === F
|
|
3861
|
+
}))), P = (A) => {
|
|
3849
3862
|
ce.value.clear();
|
|
3850
|
-
let
|
|
3851
|
-
for (
|
|
3852
|
-
ce.value.add(
|
|
3863
|
+
let F;
|
|
3864
|
+
for (F of A)
|
|
3865
|
+
ce.value.add(F.id);
|
|
3853
3866
|
};
|
|
3854
|
-
return me(G, (
|
|
3855
|
-
P(
|
|
3856
|
-
}, { immediate: !0, deep: !0 }), me(
|
|
3867
|
+
return me(G, (A) => {
|
|
3868
|
+
P(A);
|
|
3869
|
+
}, { immediate: !0, deep: !0 }), me(T, () => {
|
|
3857
3870
|
pe.value++;
|
|
3858
3871
|
}, { immediate: !0, deep: !0 }), at(async () => {
|
|
3859
|
-
await
|
|
3860
|
-
}), (
|
|
3861
|
-
const V =
|
|
3862
|
-
return
|
|
3863
|
-
_(
|
|
3872
|
+
await x();
|
|
3873
|
+
}), (A, F) => {
|
|
3874
|
+
const V = $("KInput"), ue = $("KSelect");
|
|
3875
|
+
return I(), q("div", Il, [
|
|
3876
|
+
_(m(jo), {
|
|
3864
3877
|
"can-submit": p.value,
|
|
3865
3878
|
config: e.config,
|
|
3866
3879
|
"edit-id": e.sniId,
|
|
3867
|
-
"error-message": c.errorMessage ||
|
|
3880
|
+
"error-message": c.errorMessage || L.value,
|
|
3868
3881
|
"fetch-url": s.value,
|
|
3869
|
-
"form-fields":
|
|
3882
|
+
"form-fields": y.value,
|
|
3870
3883
|
"is-readonly": c.isReadonly,
|
|
3871
|
-
onCancel:
|
|
3872
|
-
"onFetch:error":
|
|
3884
|
+
onCancel: S,
|
|
3885
|
+
"onFetch:error": F[3] || (F[3] = (ie) => A.$emit("error", ie)),
|
|
3873
3886
|
"onFetch:success": w,
|
|
3874
|
-
onLoading:
|
|
3875
|
-
onSubmit:
|
|
3887
|
+
onLoading: F[4] || (F[4] = (ie) => A.$emit("loading", ie)),
|
|
3888
|
+
onSubmit: J
|
|
3876
3889
|
}, {
|
|
3877
|
-
default:
|
|
3878
|
-
_(
|
|
3879
|
-
description:
|
|
3880
|
-
title:
|
|
3890
|
+
default: b(() => [
|
|
3891
|
+
_(m(Pt), {
|
|
3892
|
+
description: m(o)("form.sections.general.description"),
|
|
3893
|
+
title: m(o)("form.sections.general.title")
|
|
3881
3894
|
}, {
|
|
3882
|
-
default:
|
|
3895
|
+
default: b(() => [
|
|
3883
3896
|
_(V, {
|
|
3884
3897
|
modelValue: c.fields.name,
|
|
3885
|
-
"onUpdate:modelValue":
|
|
3898
|
+
"onUpdate:modelValue": F[0] || (F[0] = (ie) => c.fields.name = ie),
|
|
3886
3899
|
modelModifiers: { trim: !0 },
|
|
3887
3900
|
autocomplete: "off",
|
|
3888
3901
|
"data-testid": "sni-form-name",
|
|
3889
|
-
label:
|
|
3890
|
-
placeholder:
|
|
3902
|
+
label: m(o)("form.fields.name.label"),
|
|
3903
|
+
placeholder: m(o)("form.fields.name.placeholder"),
|
|
3891
3904
|
readonly: c.isReadonly,
|
|
3892
3905
|
required: "",
|
|
3893
3906
|
type: "text"
|
|
3894
3907
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
3895
3908
|
_(V, {
|
|
3896
3909
|
modelValue: c.fields.tags,
|
|
3897
|
-
"onUpdate:modelValue":
|
|
3910
|
+
"onUpdate:modelValue": F[1] || (F[1] = (ie) => c.fields.tags = ie),
|
|
3898
3911
|
modelModifiers: { trim: !0 },
|
|
3899
3912
|
autocomplete: "off",
|
|
3900
3913
|
"data-testid": "sni-form-tags",
|
|
3901
|
-
help:
|
|
3902
|
-
label:
|
|
3903
|
-
"label-attributes": { info:
|
|
3904
|
-
placeholder:
|
|
3914
|
+
help: m(o)("form.fields.tags.help"),
|
|
3915
|
+
label: m(o)("form.fields.tags.label"),
|
|
3916
|
+
"label-attributes": { info: m(o)("form.fields.tags.tooltip") },
|
|
3917
|
+
placeholder: m(o)("form.fields.tags.placeholder"),
|
|
3905
3918
|
readonly: c.isReadonly,
|
|
3906
3919
|
type: "text"
|
|
3907
3920
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
3908
3921
|
]),
|
|
3909
3922
|
_: 1
|
|
3910
3923
|
}, 8, ["description", "title"]),
|
|
3911
|
-
_(
|
|
3912
|
-
description:
|
|
3924
|
+
_(m(Pt), {
|
|
3925
|
+
description: m(o)("form.sections.certificate.description"),
|
|
3913
3926
|
"has-divider": "",
|
|
3914
|
-
title:
|
|
3927
|
+
title: m(o)("form.sections.certificate.title")
|
|
3915
3928
|
}, {
|
|
3916
|
-
default:
|
|
3917
|
-
d.value ? (
|
|
3929
|
+
default: b(() => [
|
|
3930
|
+
d.value ? (I(), z(V, {
|
|
3918
3931
|
key: 0,
|
|
3919
3932
|
"data-testid": "sni-form-certificate-id",
|
|
3920
|
-
label:
|
|
3933
|
+
label: m(o)("form.fields.certificate_id.label"),
|
|
3921
3934
|
"model-value": d.value,
|
|
3922
3935
|
readonly: "",
|
|
3923
3936
|
required: "",
|
|
3924
3937
|
width: "100%"
|
|
3925
|
-
}, null, 8, ["label", "model-value"])) : (
|
|
3938
|
+
}, null, 8, ["label", "model-value"])) : (I(), z(ue, {
|
|
3926
3939
|
key: 1,
|
|
3927
3940
|
modelValue: c.fields.certificate_id,
|
|
3928
|
-
"onUpdate:modelValue":
|
|
3941
|
+
"onUpdate:modelValue": F[2] || (F[2] = (ie) => c.fields.certificate_id = ie),
|
|
3929
3942
|
clearable: "",
|
|
3930
3943
|
"data-testid": "sni-form-certificate-id",
|
|
3931
|
-
"dropdown-footer-text":
|
|
3944
|
+
"dropdown-footer-text": we.value ? m(o)("form.fields.certificate_id.footer") : void 0,
|
|
3932
3945
|
"enable-filtering": "",
|
|
3933
3946
|
"filter-function": () => !0,
|
|
3934
|
-
items:
|
|
3935
|
-
label:
|
|
3936
|
-
loading:
|
|
3937
|
-
placeholder:
|
|
3947
|
+
items: T.value,
|
|
3948
|
+
label: m(o)("form.fields.certificate_id.label"),
|
|
3949
|
+
loading: m(g),
|
|
3950
|
+
placeholder: m(o)("form.fields.certificate_id.placeholder"),
|
|
3938
3951
|
readonly: c.isReadonly,
|
|
3939
3952
|
required: "",
|
|
3940
3953
|
width: "100%",
|
|
3941
3954
|
onQueryChange: R
|
|
3942
3955
|
}, {
|
|
3943
|
-
loading:
|
|
3944
|
-
U("div", null,
|
|
3956
|
+
loading: b(() => [
|
|
3957
|
+
U("div", null, M(m(o)("actions.loading")), 1)
|
|
3945
3958
|
]),
|
|
3946
|
-
empty:
|
|
3947
|
-
U("div", xl,
|
|
3959
|
+
empty: b(() => [
|
|
3960
|
+
U("div", xl, M(m(o)("search.no_results")), 1)
|
|
3948
3961
|
]),
|
|
3949
3962
|
_: 1
|
|
3950
3963
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"])),
|
|
3951
|
-
|
|
3964
|
+
Q.value ? (I(), q("p", _l, M(Q.value), 1)) : te("", !0)
|
|
3952
3965
|
]),
|
|
3953
3966
|
_: 1
|
|
3954
3967
|
}, 8, ["description", "title"])
|
|
@@ -3958,7 +3971,7 @@ const dl = ["aria-labelledby"], pl = { class: "form-section-wrapper" }, fl = {
|
|
|
3958
3971
|
]);
|
|
3959
3972
|
};
|
|
3960
3973
|
}
|
|
3961
|
-
}), Dl = /* @__PURE__ */ Vn(
|
|
3974
|
+
}), Dl = /* @__PURE__ */ Vn(Nl, [["__scopeId", "data-v-6997a861"]]);
|
|
3962
3975
|
export {
|
|
3963
3976
|
Dl as SniForm,
|
|
3964
3977
|
Bl as SniList
|