@kong-ui-public/entities-shared 2.9.4 → 2.9.5-pr.1222.a5d27ffc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { inject as In, ref as R, unref as T, computed as A, watch as
|
|
1
|
+
import { inject as In, ref as R, unref as T, computed as A, watch as ke, defineComponent as Y, openBlock as h, createBlock as K, resolveDynamicComponent as Ae, normalizeClass as ce, withCtx as x, createElementBlock as S, createElementVNode as $, toDisplayString as L, createCommentVNode as D, Fragment as oe, renderList as ie, resolveComponent as N, createVNode as B, createTextVNode as V, useCssVars as Tt, useSlots as Ge, renderSlot as H, createSlots as Ce, normalizeProps as En, guardReactiveProps as Tn, mergeProps as Fn, normalizeStyle as Be, pushScopeId as Re, popScopeId as Ke, onBeforeMount as Ft, withModifiers as He, onMounted as On, onUnmounted as Ln, withDirectives as pe, vShow as he, Teleport as $n } from "vue";
|
|
2
2
|
import ot from "axios";
|
|
3
3
|
import { createI18n as Nn, i18nTComponent as Bn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Rn } from "@kong/kongponents";
|
|
5
|
-
import { useRouter as
|
|
6
|
-
var
|
|
5
|
+
import { useRouter as Kn } from "vue-router";
|
|
6
|
+
var Mn = /* @__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))(Mn || {}), Dn = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Dn || {}), ye = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(ye || {}), q = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(q || {}), ne = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ne || {});
|
|
7
7
|
function jn() {
|
|
8
8
|
return {
|
|
9
9
|
getAxiosInstance: (e = {}) => {
|
|
@@ -40,7 +40,7 @@ function Un() {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const je = "khcp-user-table-preferences", Pn = {
|
|
44
44
|
pageSize: 30,
|
|
45
45
|
sortColumnKey: void 0,
|
|
46
46
|
sortColumnOrder: void 0
|
|
@@ -55,14 +55,14 @@ function qn() {
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
}, t = () => {
|
|
58
|
-
const n = e(localStorage.getItem(
|
|
58
|
+
const n = e(localStorage.getItem(je));
|
|
59
59
|
return !n || !Object.keys(n).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(n));
|
|
60
60
|
};
|
|
61
61
|
return {
|
|
62
62
|
setTablePreferences: (n, r) => {
|
|
63
63
|
try {
|
|
64
64
|
const i = t();
|
|
65
|
-
i.set(n, r), localStorage.setItem(
|
|
65
|
+
i.set(n, r), localStorage.setItem(je, JSON.stringify(Object.fromEntries(i.entries())));
|
|
66
66
|
} catch (i) {
|
|
67
67
|
console.error("useTablePreferences(setTablePreferences)", i);
|
|
68
68
|
}
|
|
@@ -72,11 +72,11 @@ function qn() {
|
|
|
72
72
|
return (r == null ? void 0 : r.get(n)) || void 0 || Pn;
|
|
73
73
|
},
|
|
74
74
|
deleteAllTablePreferences: () => {
|
|
75
|
-
localStorage.removeItem(
|
|
75
|
+
localStorage.removeItem(je);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Ze(e = {}) {
|
|
80
80
|
const { getAxiosInstance: t } = jn();
|
|
81
81
|
return {
|
|
82
82
|
axiosInstance: t(e)
|
|
@@ -187,7 +187,7 @@ const Hn = {
|
|
|
187
187
|
errors: Zn,
|
|
188
188
|
toggleModal: Qn
|
|
189
189
|
};
|
|
190
|
-
function
|
|
190
|
+
function Qe() {
|
|
191
191
|
const e = Nn("en-us", Xn);
|
|
192
192
|
return {
|
|
193
193
|
i18n: e,
|
|
@@ -244,67 +244,67 @@ function er(e, t, n, r = {
|
|
|
244
244
|
searchKeys: ["id"]
|
|
245
245
|
}) {
|
|
246
246
|
n || (n = "100");
|
|
247
|
-
const { axiosInstance: i } =
|
|
247
|
+
const { axiosInstance: i } = Ze({
|
|
248
248
|
headers: e.requestHeaders
|
|
249
|
-
}), { i18n: { t: a } } =
|
|
250
|
-
await
|
|
251
|
-
}, 200), s = R(!1), c = R(""), d = R(""), u = R([]),
|
|
252
|
-
let
|
|
253
|
-
e.app === "konnect" ?
|
|
254
|
-
const { isValidUuid: k } = Ot(),
|
|
249
|
+
}), { i18n: { t: a } } = Qe(), { debounce: o } = Un(), l = o(async (p) => {
|
|
250
|
+
await ee(p);
|
|
251
|
+
}, 200), s = R(!1), c = R(""), d = R(""), u = R([]), m = R([]), f = R(void 0), b = T(t);
|
|
252
|
+
let v = `${e.apiBaseUrl}${b}`;
|
|
253
|
+
e.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
254
|
+
const { isValidUuid: k } = Ot(), M = async () => {
|
|
255
255
|
try {
|
|
256
256
|
s.value = !0;
|
|
257
|
-
const { data:
|
|
258
|
-
|
|
257
|
+
const { data: p } = await i.get(`${v}?size=${n}`);
|
|
258
|
+
p != null && p.next || (f.value = r.fetchedItemsKey in p ? p[r.fetchedItemsKey] : []), m.value = r.fetchedItemsKey in p ? p[r.fetchedItemsKey] : [], u.value = m.value;
|
|
259
259
|
} catch {
|
|
260
260
|
u.value = [], c.value = a("debouncedFilter.errors.fetch");
|
|
261
261
|
} finally {
|
|
262
262
|
s.value = !1;
|
|
263
263
|
}
|
|
264
|
-
},
|
|
265
|
-
var y,
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
264
|
+
}, I = R(""), ee = async (p) => {
|
|
265
|
+
var y, g, O;
|
|
266
|
+
if (I.value !== p)
|
|
267
|
+
if (I.value = p || "", f.value === void 0)
|
|
268
268
|
try {
|
|
269
269
|
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
270
|
-
let F =
|
|
271
|
-
|
|
272
|
-
const { data:
|
|
273
|
-
r.fetchedItemsKey in
|
|
274
|
-
} else if (
|
|
270
|
+
let F = v + "";
|
|
271
|
+
p && (F += `/${p}`);
|
|
272
|
+
const { data: _ } = await i.get(`${F}?size=${n}`);
|
|
273
|
+
r.fetchedItemsKey in _ ? u.value = _[r.fetchedItemsKey] : _ != null && _.id ? u.value = [_] : u.value = [];
|
|
274
|
+
} else if (p) {
|
|
275
275
|
const F = [];
|
|
276
|
-
k(
|
|
277
|
-
const { data:
|
|
278
|
-
return [
|
|
276
|
+
k(p) && r.searchKeys.includes("id") ? F.push((async () => {
|
|
277
|
+
const { data: E } = await i.get(`${v}/${p}`);
|
|
278
|
+
return [E[r.fetchedItemsKey] ?? E];
|
|
279
279
|
})()) : F.push(
|
|
280
|
-
...r.searchKeys.filter((
|
|
281
|
-
const { data:
|
|
282
|
-
return
|
|
280
|
+
...r.searchKeys.filter((E) => E !== "id").map(async (E) => {
|
|
281
|
+
const { data: w } = await i.get(`${v}?${E}=${p}`);
|
|
282
|
+
return w[r.fetchedItemsKey];
|
|
283
283
|
})
|
|
284
284
|
);
|
|
285
|
-
const
|
|
286
|
-
u.value = [], (y =
|
|
287
|
-
var
|
|
288
|
-
(
|
|
289
|
-
|
|
285
|
+
const _ = await Promise.all(F), j = /* @__PURE__ */ new Set();
|
|
286
|
+
u.value = [], (y = _ == null ? void 0 : _.forEach) == null || y.call(_, (E) => {
|
|
287
|
+
var w;
|
|
288
|
+
(w = E == null ? void 0 : E.forEach) == null || w.call(E, (U) => {
|
|
289
|
+
j.has(U.id) || (j.add(U.id), u.value.push(U));
|
|
290
290
|
});
|
|
291
291
|
});
|
|
292
292
|
} else
|
|
293
|
-
u.value =
|
|
293
|
+
u.value = m.value;
|
|
294
294
|
} catch (F) {
|
|
295
|
-
((
|
|
295
|
+
((g = F == null ? void 0 : F.response) == null ? void 0 : g.status) === 404 ? d.value = a("debouncedFilter.errors.invalid") : (u.value = [], c.value = a("debouncedFilter.errors.fetch"));
|
|
296
296
|
} finally {
|
|
297
297
|
s.value = !1;
|
|
298
298
|
}
|
|
299
299
|
else
|
|
300
|
-
s.value = !0, d.value = "",
|
|
301
|
-
var
|
|
302
|
-
let
|
|
303
|
-
for (const
|
|
304
|
-
const
|
|
305
|
-
|
|
300
|
+
s.value = !0, d.value = "", p ? (u.value = (O = f.value) == null ? void 0 : O.filter((F) => {
|
|
301
|
+
var j;
|
|
302
|
+
let _ = !1;
|
|
303
|
+
for (const E of r.searchKeys) {
|
|
304
|
+
const w = typeof F[E] == "string" ? (j = F[E]) == null ? void 0 : j.toLowerCase() : F[E];
|
|
305
|
+
w != null && w.includes(p.toLowerCase()) && (_ = !0);
|
|
306
306
|
}
|
|
307
|
-
return
|
|
307
|
+
return _;
|
|
308
308
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, s.value = !1;
|
|
309
309
|
};
|
|
310
310
|
return {
|
|
@@ -313,7 +313,7 @@ function er(e, t, n, r = {
|
|
|
313
313
|
validationError: d,
|
|
314
314
|
results: u,
|
|
315
315
|
allRecords: f,
|
|
316
|
-
loadItems:
|
|
316
|
+
loadItems: M,
|
|
317
317
|
debouncedQueryChange: l
|
|
318
318
|
};
|
|
319
319
|
}
|
|
@@ -324,7 +324,7 @@ function tr(e, t) {
|
|
|
324
324
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
325
325
|
}
|
|
326
326
|
function nr() {
|
|
327
|
-
const { i18n: { t: e } } =
|
|
327
|
+
const { i18n: { t: e } } = Qe();
|
|
328
328
|
return {
|
|
329
329
|
getMessageFromError: (n) => {
|
|
330
330
|
var r, i, a, o;
|
|
@@ -364,18 +364,18 @@ function rr(e) {
|
|
|
364
364
|
return console.warn("Failed to build valid URL:", r), "";
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Lt(e, t) {
|
|
368
368
|
const n = R(T(e)), r = R(T(t)), i = A(
|
|
369
369
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
370
370
|
), a = A(
|
|
371
371
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
372
372
|
);
|
|
373
373
|
return (o) => {
|
|
374
|
-
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query:
|
|
374
|
+
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query: m } = o;
|
|
375
375
|
try {
|
|
376
376
|
let f = new URL(a.value.href);
|
|
377
|
-
return i.value &&
|
|
378
|
-
f.searchParams.append(
|
|
377
|
+
return i.value && m ? (f.search = "", f = n.value.app === "konnect" ? new URL(`${f.href}?filter[name][contains]=${m}`) : new URL(`${f.href}/${m}/`)) : (i.value || new URLSearchParams(m).forEach((b, v) => {
|
|
378
|
+
f.searchParams.append(v, b);
|
|
379
379
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), c && l !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
380
380
|
} catch (f) {
|
|
381
381
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -383,22 +383,22 @@ function $t(e, t) {
|
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
385
|
function ir(e, t, n = "data") {
|
|
386
|
-
const r = T(t), { axiosInstance: i } =
|
|
386
|
+
const r = T(t), { axiosInstance: i } = Ze({
|
|
387
387
|
headers: e.requestHeaders
|
|
388
|
-
}), a =
|
|
389
|
-
status:
|
|
388
|
+
}), a = Lt(e, r), o = R({
|
|
389
|
+
status: ye.Idle
|
|
390
390
|
});
|
|
391
391
|
return { fetcher: async (s) => {
|
|
392
392
|
try {
|
|
393
|
-
o.value = { status:
|
|
393
|
+
o.value = { status: ye.Loading };
|
|
394
394
|
let c = a(s);
|
|
395
395
|
c.includes("filter[name]") && (c = `${c}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
396
396
|
const { data: d } = await i.get(c), u = n && n.replace(/[^\w-_]/gi, "");
|
|
397
|
-
let
|
|
398
|
-
d[u] && Array.isArray(d[u]) ?
|
|
397
|
+
let m;
|
|
398
|
+
d[u] && Array.isArray(d[u]) ? m = d[u] : Array.isArray(d) ? m = d : m = Object.keys(d).length ? [d] : [];
|
|
399
399
|
const f = {
|
|
400
|
-
data:
|
|
401
|
-
total:
|
|
400
|
+
data: m,
|
|
401
|
+
total: m.length,
|
|
402
402
|
...d.offset ? {
|
|
403
403
|
pagination: {
|
|
404
404
|
offset: d.offset
|
|
@@ -406,7 +406,7 @@ function ir(e, t, n = "data") {
|
|
|
406
406
|
} : null
|
|
407
407
|
};
|
|
408
408
|
return o.value = {
|
|
409
|
-
status:
|
|
409
|
+
status: ye.Idle,
|
|
410
410
|
response: f
|
|
411
411
|
}, f;
|
|
412
412
|
} catch (c) {
|
|
@@ -415,11 +415,11 @@ function ir(e, t, n = "data") {
|
|
|
415
415
|
total: 0
|
|
416
416
|
};
|
|
417
417
|
return s.query && c.response.status === 404 ? (o.value = {
|
|
418
|
-
status:
|
|
418
|
+
status: ye.NoResults,
|
|
419
419
|
response: d,
|
|
420
420
|
error: c
|
|
421
421
|
}, d) : (o.value = {
|
|
422
|
-
status:
|
|
422
|
+
status: ye.Error,
|
|
423
423
|
response: d,
|
|
424
424
|
error: c
|
|
425
425
|
}, d);
|
|
@@ -433,10 +433,10 @@ function ar() {
|
|
|
433
433
|
convertKeyToTitle: e
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
const
|
|
436
|
+
const $t = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, lt = (e) => {
|
|
437
437
|
if (typeof e != "string")
|
|
438
438
|
throw new TypeError("Invalid argument expected string");
|
|
439
|
-
const t = e.match(
|
|
439
|
+
const t = e.match($t);
|
|
440
440
|
if (!t)
|
|
441
441
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
442
442
|
return t.shift(), t;
|
|
@@ -474,7 +474,7 @@ const Lt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
474
474
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
475
475
|
if (ft.indexOf(e) === -1)
|
|
476
476
|
throw new Error(`Invalid operator, expected one of ${ft.join("|")}`);
|
|
477
|
-
}, ur = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
477
|
+
}, ur = (e) => typeof e == "string" && /^[v\d]/.test(e) && $t.test(e);
|
|
478
478
|
function dr(e) {
|
|
479
479
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
480
480
|
if (!t)
|
|
@@ -490,29 +490,29 @@ function dr(e) {
|
|
|
490
490
|
}
|
|
491
491
|
function fr(e) {
|
|
492
492
|
const t = R(0), n = R(0), r = R(!1);
|
|
493
|
-
return
|
|
493
|
+
return ke(e, (a) => {
|
|
494
494
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
495
495
|
}), {
|
|
496
496
|
isTruncated: A(() => t.value < n.value)
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
499
|
const z = {
|
|
500
|
-
useAxios:
|
|
500
|
+
useAxios: Ze,
|
|
501
501
|
useDebouncedFilter: er,
|
|
502
502
|
useDeleteUrlBuilder: tr,
|
|
503
503
|
useErrors: nr,
|
|
504
504
|
useExternalLinkCreator: rr,
|
|
505
505
|
useFetcher: ir,
|
|
506
|
-
useFetchUrlBuilder:
|
|
506
|
+
useFetchUrlBuilder: Lt,
|
|
507
507
|
useHelpers: Ot,
|
|
508
508
|
useStringHelpers: ar,
|
|
509
|
-
useI18n:
|
|
509
|
+
useI18n: Qe,
|
|
510
510
|
useGatewayFeatureSupported: dr,
|
|
511
511
|
useTruncationDetector: fr
|
|
512
512
|
}, pr = {
|
|
513
513
|
key: 0,
|
|
514
514
|
class: "config-card-fieldset-title"
|
|
515
|
-
}, hr = /* @__PURE__ */
|
|
515
|
+
}, hr = /* @__PURE__ */ Y({
|
|
516
516
|
__name: "JsonCardItem",
|
|
517
517
|
props: {
|
|
518
518
|
item: {
|
|
@@ -536,14 +536,14 @@ const z = {
|
|
|
536
536
|
var s;
|
|
537
537
|
return t.isArrayItem ? (s = a.value) != null && s.name ? r(a.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
538
538
|
});
|
|
539
|
-
return (s, c) => (h(),
|
|
540
|
-
class:
|
|
539
|
+
return (s, c) => (h(), K(Ae(e.isArrayItem ? "fieldset" : "div"), {
|
|
540
|
+
class: ce(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
541
541
|
}, {
|
|
542
542
|
default: x(() => [
|
|
543
543
|
e.isArrayItem ? (h(), S("legend", pr, [
|
|
544
|
-
|
|
545
|
-
])) :
|
|
546
|
-
(h(!0), S(oe, null, ie(Object.keys(o.value), (d, u) => (h(),
|
|
544
|
+
$("b", null, L(l.value), 1)
|
|
545
|
+
])) : D("", !0),
|
|
546
|
+
(h(!0), S(oe, null, ie(Object.keys(o.value), (d, u) => (h(), K(Rt, {
|
|
547
547
|
key: `${i.value}-property-${u}`,
|
|
548
548
|
item: {
|
|
549
549
|
key: d,
|
|
@@ -560,7 +560,7 @@ const z = {
|
|
|
560
560
|
for (const [r, i] of t)
|
|
561
561
|
n[r] = i;
|
|
562
562
|
return n;
|
|
563
|
-
}, Bt = /* @__PURE__ */ re(hr, [["__scopeId", "data-v-68ca83ec"]]), mr = /* @__PURE__ */
|
|
563
|
+
}, Bt = /* @__PURE__ */ re(hr, [["__scopeId", "data-v-68ca83ec"]]), mr = /* @__PURE__ */ Y({
|
|
564
564
|
__name: "InternalLinkItem",
|
|
565
565
|
props: {
|
|
566
566
|
item: {
|
|
@@ -572,22 +572,22 @@ const z = {
|
|
|
572
572
|
setup(e) {
|
|
573
573
|
const { i18n: { t } } = z.useI18n();
|
|
574
574
|
return (n, r) => {
|
|
575
|
-
const i =
|
|
575
|
+
const i = N("KButton");
|
|
576
576
|
return h(), S("div", null, [
|
|
577
|
-
|
|
577
|
+
B(i, {
|
|
578
578
|
appearance: "tertiary",
|
|
579
579
|
class: "navigation-button",
|
|
580
580
|
onClick: r[0] || (r[0] = (a) => n.$emit("navigation-click", e.item))
|
|
581
581
|
}, {
|
|
582
582
|
default: x(() => [
|
|
583
|
-
V(
|
|
583
|
+
V(L(e.item.value || T(t)("baseConfigCard.commonFields.link")), 1)
|
|
584
584
|
]),
|
|
585
585
|
_: 1
|
|
586
586
|
})
|
|
587
587
|
]);
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
|
-
}), gr = /* @__PURE__ */ re(mr, [["__scopeId", "data-v-c96811e5"]]), yr = /* @__PURE__ */
|
|
590
|
+
}), gr = /* @__PURE__ */ re(mr, [["__scopeId", "data-v-c96811e5"]]), yr = /* @__PURE__ */ Y({
|
|
591
591
|
__name: "StatusBadge",
|
|
592
592
|
props: {
|
|
593
593
|
status: {
|
|
@@ -598,22 +598,22 @@ const z = {
|
|
|
598
598
|
setup(e) {
|
|
599
599
|
const { i18n: { t } } = z.useI18n();
|
|
600
600
|
return (n, r) => {
|
|
601
|
-
const i =
|
|
602
|
-
return h(),
|
|
601
|
+
const i = N("KBadge");
|
|
602
|
+
return h(), K(i, {
|
|
603
603
|
appearance: e.status ? "success" : "neutral"
|
|
604
604
|
}, {
|
|
605
605
|
default: x(() => [
|
|
606
|
-
V(
|
|
606
|
+
V(L(e.status ? T(t)("baseConfigCard.statusBadge.enabledLabel") : T(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
607
607
|
]),
|
|
608
608
|
_: 1
|
|
609
609
|
}, 8, ["appearance"]);
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
|
-
}), vr = "#0044f4", br = "#e0e4ea", xr = "#3a3f51", Cr = "#
|
|
612
|
+
}), vr = "#0044f4", br = "#e0e4ea", xr = "#3a3f51", Cr = "#afb7c5", _r = "#0044f4", kr = "1px", Ar = "16px", wr = "20px", Sr = { class: "config-card-details-row" }, Ir = ["data-testid"], Er = ["data-testid"], Tr = ["data-testid"], Fr = ["data-testid"], Or = { key: 1 }, Lr = ["data-testid"], $r = ["data-testid"], Nr = ["data-testid"], Br = ["data-testid"], Rr = {
|
|
613
613
|
name: "ConfigCardItem",
|
|
614
614
|
components: { JsonCardItem: Bt, StatusBadge: yr, InternalLinkItem: gr }
|
|
615
|
-
},
|
|
616
|
-
...
|
|
615
|
+
}, Kr = /* @__PURE__ */ Y({
|
|
616
|
+
...Rr,
|
|
617
617
|
props: {
|
|
618
618
|
item: {
|
|
619
619
|
type: Object,
|
|
@@ -632,15 +632,15 @@ const z = {
|
|
|
632
632
|
},
|
|
633
633
|
emits: ["navigation-click"],
|
|
634
634
|
setup(e, { emit: t }) {
|
|
635
|
-
Tt((
|
|
636
|
-
"07753575": d.value ? "none" : `solid ${T(
|
|
635
|
+
Tt((b) => ({
|
|
636
|
+
"07753575": d.value ? "none" : `solid ${T(kr)} ${T(br)}`,
|
|
637
637
|
"32d44ea8": c.value && l.value ? "block" : "flex",
|
|
638
638
|
"5036b738": c.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
639
639
|
"5038fd13": c.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
640
640
|
}));
|
|
641
|
-
const n = e, r = t, i =
|
|
641
|
+
const n = e, r = t, i = Ge(), { i18n: { t: a, formatUnixTimeStamp: o } } = z.useI18n(), l = A(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = A(() => !!(n.item.tooltip || i["label-tooltip"])), c = A(() => n.item.type === q.Json || n.item.type === q.JsonArray), d = A(() => n.item.type === q.JsonArray), u = A(() => {
|
|
642
642
|
switch (n.item.type) {
|
|
643
|
-
case
|
|
643
|
+
case q.ID:
|
|
644
644
|
return {
|
|
645
645
|
tag: "KCopy",
|
|
646
646
|
attrs: {
|
|
@@ -649,7 +649,7 @@ const z = {
|
|
|
649
649
|
text: n.item.value
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
|
-
case
|
|
652
|
+
case q.IdArray:
|
|
653
653
|
return {
|
|
654
654
|
tag: "div",
|
|
655
655
|
additionalComponent: "KCopy",
|
|
@@ -657,7 +657,7 @@ const z = {
|
|
|
657
657
|
"copy-tooltip": a("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
658
658
|
}
|
|
659
659
|
};
|
|
660
|
-
case
|
|
660
|
+
case q.Redacted:
|
|
661
661
|
return {
|
|
662
662
|
tag: "KCopy",
|
|
663
663
|
attrs: {
|
|
@@ -667,7 +667,7 @@ const z = {
|
|
|
667
667
|
text: n.item.value
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
|
-
case
|
|
670
|
+
case q.RedactedArray:
|
|
671
671
|
return {
|
|
672
672
|
tag: "div",
|
|
673
673
|
additionalComponent: "KCopy",
|
|
@@ -676,7 +676,7 @@ const z = {
|
|
|
676
676
|
"copy-tooltip": a("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
677
677
|
}
|
|
678
678
|
};
|
|
679
|
-
case
|
|
679
|
+
case q.Date:
|
|
680
680
|
return {
|
|
681
681
|
tag: "div",
|
|
682
682
|
attrs: {
|
|
@@ -684,7 +684,7 @@ const z = {
|
|
|
684
684
|
},
|
|
685
685
|
text: o(n.item.value)
|
|
686
686
|
};
|
|
687
|
-
case
|
|
687
|
+
case q.BadgeStatus:
|
|
688
688
|
return {
|
|
689
689
|
tag: "StatusBadge",
|
|
690
690
|
attrs: {
|
|
@@ -692,28 +692,28 @@ const z = {
|
|
|
692
692
|
status: n.item.value
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
|
-
case
|
|
695
|
+
case q.BadgeTag:
|
|
696
696
|
return {
|
|
697
697
|
tag: "div",
|
|
698
698
|
additionalComponent: "KBadge"
|
|
699
699
|
};
|
|
700
|
-
case
|
|
700
|
+
case q.BadgeMethod:
|
|
701
701
|
return {
|
|
702
702
|
tag: "div",
|
|
703
703
|
additionalComponent: "KMethodBadge"
|
|
704
704
|
};
|
|
705
|
-
case
|
|
705
|
+
case q.LinkInternal:
|
|
706
706
|
return {
|
|
707
707
|
tag: "InternalLinkItem",
|
|
708
708
|
attrs: {
|
|
709
709
|
"data-testid": `${n.item.key}-internal-link`,
|
|
710
710
|
item: n.item,
|
|
711
|
-
onNavigationClick: (
|
|
712
|
-
r("navigation-click",
|
|
711
|
+
onNavigationClick: (b) => {
|
|
712
|
+
r("navigation-click", b);
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
|
-
case
|
|
716
|
+
case q.LinkExternal:
|
|
717
717
|
return {
|
|
718
718
|
tag: "KExternalLink",
|
|
719
719
|
attrs: {
|
|
@@ -722,7 +722,7 @@ const z = {
|
|
|
722
722
|
},
|
|
723
723
|
text: n.item.value
|
|
724
724
|
};
|
|
725
|
-
case
|
|
725
|
+
case q.Json:
|
|
726
726
|
return {
|
|
727
727
|
tag: "JsonCardItem",
|
|
728
728
|
attrs: {
|
|
@@ -730,7 +730,7 @@ const z = {
|
|
|
730
730
|
item: n.item
|
|
731
731
|
}
|
|
732
732
|
};
|
|
733
|
-
case
|
|
733
|
+
case q.JsonArray:
|
|
734
734
|
return {
|
|
735
735
|
tag: "div",
|
|
736
736
|
additionalComponent: "JsonCardItem",
|
|
@@ -748,111 +748,111 @@ const z = {
|
|
|
748
748
|
text: n.item.value
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
|
-
}),
|
|
752
|
-
return (
|
|
753
|
-
const k =
|
|
754
|
-
return h(), S("div",
|
|
755
|
-
|
|
751
|
+
}), m = R(), { isTruncated: f } = z.useTruncationDetector(m);
|
|
752
|
+
return (b, v) => {
|
|
753
|
+
const k = N("KLabel"), M = N("KBadge"), I = N("KCopy"), ee = N("KTooltip");
|
|
754
|
+
return h(), S("div", Sr, [
|
|
755
|
+
$("div", {
|
|
756
756
|
class: "config-card-details-label",
|
|
757
757
|
"data-testid": `${e.item.key}-label`
|
|
758
758
|
}, [
|
|
759
|
-
|
|
760
|
-
|
|
759
|
+
H(b.$slots, "label", { item: e.item }, () => [
|
|
760
|
+
B(k, { "tooltip-attributes": { maxWidth: "500px" } }, Ce({
|
|
761
761
|
default: x(() => [
|
|
762
|
-
V(
|
|
762
|
+
V(L(e.item.label) + " ", 1)
|
|
763
763
|
]),
|
|
764
764
|
_: 2
|
|
765
765
|
}, [
|
|
766
766
|
s.value ? {
|
|
767
767
|
name: "tooltip",
|
|
768
768
|
fn: x(() => [
|
|
769
|
-
|
|
769
|
+
$("div", {
|
|
770
770
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
771
771
|
}, [
|
|
772
|
-
|
|
773
|
-
V(
|
|
772
|
+
H(b.$slots, "label-tooltip", {}, () => [
|
|
773
|
+
V(L(e.item.tooltip), 1)
|
|
774
774
|
], !0)
|
|
775
|
-
], 8,
|
|
775
|
+
], 8, Er)
|
|
776
776
|
]),
|
|
777
777
|
key: "0"
|
|
778
778
|
} : void 0
|
|
779
779
|
]), 1024)
|
|
780
780
|
], !0)
|
|
781
|
-
], 8,
|
|
782
|
-
|
|
781
|
+
], 8, Ir),
|
|
782
|
+
$("div", {
|
|
783
783
|
class: "config-card-details-value",
|
|
784
784
|
"data-testid": `${e.item.key}-property-value`
|
|
785
785
|
}, [
|
|
786
|
-
|
|
786
|
+
H(b.$slots, e.item.key, {
|
|
787
787
|
rowValue: e.item.value
|
|
788
788
|
}, () => [
|
|
789
|
-
l.value ? (h(), S("div",
|
|
790
|
-
(h(),
|
|
789
|
+
l.value ? (h(), S("div", Or, [
|
|
790
|
+
(h(), K(Ae(u.value.tag), En(Tn(u.value.attrs)), {
|
|
791
791
|
default: x(() => [
|
|
792
792
|
u.value.additionalComponent === "KBadge" ? (h(), S("div", {
|
|
793
793
|
key: 0,
|
|
794
794
|
"data-testid": `${e.item.key}-badge-tags`
|
|
795
795
|
}, [
|
|
796
|
-
(h(!0), S(oe, null, ie(e.item.value, (
|
|
796
|
+
(h(!0), S(oe, null, ie(e.item.value, (p, y) => (h(), K(M, {
|
|
797
797
|
key: `${e.item.key}-badge-tag-${y}`,
|
|
798
798
|
class: "config-badge",
|
|
799
799
|
"data-testid": `${e.item.key}-badge-tag-${y}`,
|
|
800
|
-
tooltip:
|
|
800
|
+
tooltip: p,
|
|
801
801
|
"truncation-tooltip": ""
|
|
802
802
|
}, {
|
|
803
803
|
default: x(() => [
|
|
804
|
-
V(
|
|
804
|
+
V(L(p), 1)
|
|
805
805
|
]),
|
|
806
806
|
_: 2
|
|
807
807
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
808
|
-
], 8,
|
|
808
|
+
], 8, Lr)) : D("", !0),
|
|
809
809
|
u.value.additionalComponent === "KCopy" ? (h(), S("div", {
|
|
810
810
|
key: 1,
|
|
811
811
|
class: "copy-uuid-array",
|
|
812
812
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
813
813
|
}, [
|
|
814
|
-
(h(!0), S(oe, null, ie(e.item.value, (
|
|
814
|
+
(h(!0), S(oe, null, ie(e.item.value, (p, y) => (h(), K(I, Fn(u.value.childAttrs, {
|
|
815
815
|
key: `${e.item.key}-copy-uuid-${y}`,
|
|
816
816
|
"data-testid": `${e.item.key}-copy-uuid-${y}`,
|
|
817
|
-
text:
|
|
817
|
+
text: p
|
|
818
818
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
819
819
|
], 8, $r)) : u.value.additionalComponent === "KMethodBadge" ? (h(), S("div", {
|
|
820
820
|
key: 2,
|
|
821
821
|
class: "method-badge-array",
|
|
822
822
|
"data-testid": `${e.item.key}-badge-methods`
|
|
823
823
|
}, [
|
|
824
|
-
(h(!0), S(oe, null, ie(e.item.value, (
|
|
824
|
+
(h(!0), S(oe, null, ie(e.item.value, (p, y) => (h(), K(M, {
|
|
825
825
|
key: `${e.item.key}-badge-method-${y}`,
|
|
826
|
-
appearance: Object.values(T(Rn)).includes(
|
|
826
|
+
appearance: Object.values(T(Rn)).includes(p.toLowerCase()) ? p.toLowerCase() : "custom",
|
|
827
827
|
class: "config-badge",
|
|
828
828
|
"data-testid": `${e.item.key}-badge-method-${y}`
|
|
829
829
|
}, {
|
|
830
830
|
default: x(() => [
|
|
831
|
-
V(
|
|
831
|
+
V(L(p), 1)
|
|
832
832
|
]),
|
|
833
833
|
_: 2
|
|
834
834
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
835
|
-
], 8,
|
|
835
|
+
], 8, Nr)) : D("", !0),
|
|
836
836
|
u.value.additionalComponent === "JsonCardItem" ? (h(), S("div", {
|
|
837
837
|
key: 3,
|
|
838
838
|
"data-testid": `${n.item.key}-json-array-content`
|
|
839
839
|
}, [
|
|
840
|
-
(h(!0), S(oe, null, ie(e.item.value, (
|
|
840
|
+
(h(!0), S(oe, null, ie(e.item.value, (p, y) => (h(), K(Bt, {
|
|
841
841
|
key: `json-array-item-${y}`,
|
|
842
842
|
index: y,
|
|
843
843
|
"is-array-item": "",
|
|
844
|
-
item:
|
|
844
|
+
item: p
|
|
845
845
|
}, null, 8, ["index", "item"]))), 128))
|
|
846
|
-
], 8,
|
|
846
|
+
], 8, Br)) : (h(), K(ee, {
|
|
847
847
|
key: 4,
|
|
848
848
|
text: T(f) ? e.item.value : ""
|
|
849
849
|
}, {
|
|
850
850
|
default: x(() => [
|
|
851
|
-
|
|
851
|
+
$("span", {
|
|
852
852
|
ref_key: "textContent",
|
|
853
|
-
ref:
|
|
854
|
-
class:
|
|
855
|
-
},
|
|
853
|
+
ref: m,
|
|
854
|
+
class: ce(["attrs-data-text", { truncated: e.truncated }])
|
|
855
|
+
}, L(u.value.text), 3)
|
|
856
856
|
]),
|
|
857
857
|
_: 1
|
|
858
858
|
}, 8, ["text"]))
|
|
@@ -862,16 +862,16 @@ const z = {
|
|
|
862
862
|
])) : (h(), S("div", {
|
|
863
863
|
key: 0,
|
|
864
864
|
"data-testid": `${e.item.key}-no-value`
|
|
865
|
-
}, " – ", 8,
|
|
865
|
+
}, " – ", 8, Fr))
|
|
866
866
|
], !0)
|
|
867
|
-
], 8,
|
|
867
|
+
], 8, Tr)
|
|
868
868
|
]);
|
|
869
869
|
};
|
|
870
870
|
}
|
|
871
|
-
}), Rt = /* @__PURE__ */ re(
|
|
871
|
+
}), Rt = /* @__PURE__ */ re(Kr, [["__scopeId", "data-v-d056663c"]]), Mr = { class: "json-config" }, Dr = {
|
|
872
872
|
key: 0,
|
|
873
873
|
class: "json-endpoint"
|
|
874
|
-
},
|
|
874
|
+
}, Kt = /* @__PURE__ */ Y({
|
|
875
875
|
__name: "JsonCodeBlock",
|
|
876
876
|
props: {
|
|
877
877
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -911,70 +911,70 @@ const z = {
|
|
|
911
911
|
});
|
|
912
912
|
return (i, a) => {
|
|
913
913
|
var s;
|
|
914
|
-
const o =
|
|
914
|
+
const o = N("KBadge"), l = N("KCodeBlock");
|
|
915
915
|
return h(), S("div", Mr, [
|
|
916
|
-
t.fetcherUrl && ((s = t.config) != null && s.jsonYamlFormsEnabled) ? (h(), S("div",
|
|
917
|
-
|
|
916
|
+
t.fetcherUrl && ((s = t.config) != null && s.jsonYamlFormsEnabled) ? (h(), S("div", Dr, [
|
|
917
|
+
B(o, {
|
|
918
918
|
appearance: t.requestMethod
|
|
919
919
|
}, {
|
|
920
920
|
default: x(() => [
|
|
921
|
-
V(
|
|
921
|
+
V(L(t.requestMethod), 1)
|
|
922
922
|
]),
|
|
923
923
|
_: 1
|
|
924
924
|
}, 8, ["appearance"]),
|
|
925
|
-
|
|
925
|
+
B(l, {
|
|
926
926
|
id: "json-endpoint-codeblock",
|
|
927
927
|
code: t.fetcherUrl,
|
|
928
928
|
"is-single-line": "",
|
|
929
929
|
language: "json",
|
|
930
930
|
theme: "dark"
|
|
931
931
|
}, null, 8, ["code"])
|
|
932
|
-
])) :
|
|
933
|
-
t.jsonRecord ? (h(),
|
|
932
|
+
])) : D("", !0),
|
|
933
|
+
t.jsonRecord ? (h(), K(l, {
|
|
934
934
|
key: 1,
|
|
935
935
|
id: "json-codeblock",
|
|
936
|
-
class:
|
|
936
|
+
class: ce({ "json-content": t.fetcherUrl }),
|
|
937
937
|
code: JSON.stringify(n.value, null, 2),
|
|
938
938
|
language: "json",
|
|
939
939
|
theme: "dark"
|
|
940
|
-
}, null, 8, ["class", "code"])) :
|
|
940
|
+
}, null, 8, ["class", "code"])) : D("", !0)
|
|
941
941
|
]);
|
|
942
942
|
};
|
|
943
943
|
}
|
|
944
944
|
});
|
|
945
945
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
946
|
-
function
|
|
946
|
+
function Mt(e) {
|
|
947
947
|
return typeof e > "u" || e === null;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function jr(e) {
|
|
950
950
|
return typeof e == "object" && e !== null;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
return Array.isArray(e) ? e :
|
|
952
|
+
function Ur(e) {
|
|
953
|
+
return Array.isArray(e) ? e : Mt(e) ? [] : [e];
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function Pr(e, t) {
|
|
956
956
|
var n, r, i, a;
|
|
957
957
|
if (t)
|
|
958
958
|
for (a = Object.keys(t), n = 0, r = a.length; n < r; n += 1)
|
|
959
959
|
i = a[n], e[i] = t[i];
|
|
960
960
|
return e;
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function qr(e, t) {
|
|
963
963
|
var n = "", r;
|
|
964
964
|
for (r = 0; r < t; r += 1)
|
|
965
965
|
n += e;
|
|
966
966
|
return n;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function Hr(e) {
|
|
969
969
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
970
970
|
}
|
|
971
|
-
var
|
|
972
|
-
isNothing:
|
|
973
|
-
isObject:
|
|
974
|
-
toArray:
|
|
975
|
-
repeat:
|
|
976
|
-
isNegativeZero:
|
|
977
|
-
extend:
|
|
971
|
+
var Yr = Mt, Vr = jr, zr = Ur, Wr = qr, Jr = Hr, Gr = Pr, G = {
|
|
972
|
+
isNothing: Yr,
|
|
973
|
+
isObject: Vr,
|
|
974
|
+
toArray: zr,
|
|
975
|
+
repeat: Wr,
|
|
976
|
+
isNegativeZero: Jr,
|
|
977
|
+
extend: Gr
|
|
978
978
|
};
|
|
979
979
|
function Dt(e, t) {
|
|
980
980
|
var n = "", r = e.reason || "(unknown reason)";
|
|
@@ -982,16 +982,16 @@ function Dt(e, t) {
|
|
|
982
982
|
|
|
983
983
|
` + e.mark.snippet), r + " " + n) : r;
|
|
984
984
|
}
|
|
985
|
-
function
|
|
985
|
+
function Se(e, t) {
|
|
986
986
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Dt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
987
987
|
}
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
988
|
+
Se.prototype = Object.create(Error.prototype);
|
|
989
|
+
Se.prototype.constructor = Se;
|
|
990
|
+
Se.prototype.toString = function(t) {
|
|
991
991
|
return this.name + ": " + Dt(this, t);
|
|
992
992
|
};
|
|
993
|
-
var
|
|
994
|
-
function
|
|
993
|
+
var X = Se;
|
|
994
|
+
function Ue(e, t, n, r, i) {
|
|
995
995
|
var a = "", o = "", l = Math.floor(i / 2) - 1;
|
|
996
996
|
return r - t > l && (a = " ... ", t = r - l + a.length), n - r > l && (o = " ...", n = r + l - o.length), {
|
|
997
997
|
str: a + e.slice(t, n).replace(/\t/g, "→") + o,
|
|
@@ -999,10 +999,10 @@ function Me(e, t, n, r, i) {
|
|
|
999
999
|
// relative position
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
return
|
|
1002
|
+
function Pe(e, t) {
|
|
1003
|
+
return G.repeat(" ", t - e.length) + e;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Zr(e, t) {
|
|
1006
1006
|
if (t = Object.create(t || null), !e.buffer)
|
|
1007
1007
|
return null;
|
|
1008
1008
|
t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
@@ -1011,28 +1011,28 @@ function Gr(e, t) {
|
|
|
1011
1011
|
o < 0 && (o = r.length - 1);
|
|
1012
1012
|
var l = "", s, c, d = Math.min(e.line + t.linesAfter, i.length).toString().length, u = t.maxLength - (t.indent + d + 3);
|
|
1013
1013
|
for (s = 1; s <= t.linesBefore && !(o - s < 0); s++)
|
|
1014
|
-
c =
|
|
1014
|
+
c = Ue(
|
|
1015
1015
|
e.buffer,
|
|
1016
1016
|
r[o - s],
|
|
1017
1017
|
i[o - s],
|
|
1018
1018
|
e.position - (r[o] - r[o - s]),
|
|
1019
1019
|
u
|
|
1020
|
-
), l =
|
|
1020
|
+
), l = G.repeat(" ", t.indent) + Pe((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1021
1021
|
` + l;
|
|
1022
|
-
for (c =
|
|
1023
|
-
`, l +=
|
|
1022
|
+
for (c = Ue(e.buffer, r[o], i[o], e.position, u), l += G.repeat(" ", t.indent) + Pe((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1023
|
+
`, l += G.repeat("-", t.indent + d + 3 + c.pos) + `^
|
|
1024
1024
|
`, s = 1; s <= t.linesAfter && !(o + s >= i.length); s++)
|
|
1025
|
-
c =
|
|
1025
|
+
c = Ue(
|
|
1026
1026
|
e.buffer,
|
|
1027
1027
|
r[o + s],
|
|
1028
1028
|
i[o + s],
|
|
1029
1029
|
e.position - (r[o] - r[o + s]),
|
|
1030
1030
|
u
|
|
1031
|
-
), l +=
|
|
1031
|
+
), l += G.repeat(" ", t.indent) + Pe((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1032
1032
|
`;
|
|
1033
1033
|
return l.replace(/\n$/, "");
|
|
1034
1034
|
}
|
|
1035
|
-
var
|
|
1035
|
+
var Qr = Zr, Xr = [
|
|
1036
1036
|
"kind",
|
|
1037
1037
|
"multi",
|
|
1038
1038
|
"resolve",
|
|
@@ -1043,12 +1043,12 @@ var Zr = Gr, Qr = [
|
|
|
1043
1043
|
"representName",
|
|
1044
1044
|
"defaultStyle",
|
|
1045
1045
|
"styleAliases"
|
|
1046
|
-
],
|
|
1046
|
+
], ei = [
|
|
1047
1047
|
"scalar",
|
|
1048
1048
|
"sequence",
|
|
1049
1049
|
"mapping"
|
|
1050
1050
|
];
|
|
1051
|
-
function
|
|
1051
|
+
function ti(e) {
|
|
1052
1052
|
var t = {};
|
|
1053
1053
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1054
1054
|
e[n].forEach(function(r) {
|
|
@@ -1056,18 +1056,18 @@ function ei(e) {
|
|
|
1056
1056
|
});
|
|
1057
1057
|
}), t;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function ni(e, t) {
|
|
1060
1060
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1061
|
-
if (
|
|
1062
|
-
throw new
|
|
1061
|
+
if (Xr.indexOf(n) === -1)
|
|
1062
|
+
throw new X('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1063
1063
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1064
1064
|
return !0;
|
|
1065
1065
|
}, this.construct = t.construct || function(n) {
|
|
1066
1066
|
return n;
|
|
1067
|
-
}, 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 =
|
|
1068
|
-
throw new
|
|
1067
|
+
}, 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 = ti(t.styleAliases || null), ei.indexOf(this.kind) === -1)
|
|
1068
|
+
throw new X('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1069
1069
|
}
|
|
1070
|
-
var
|
|
1070
|
+
var Z = ni;
|
|
1071
1071
|
function pt(e, t) {
|
|
1072
1072
|
var n = [];
|
|
1073
1073
|
return e[t].forEach(function(r) {
|
|
@@ -1077,7 +1077,7 @@ function pt(e, t) {
|
|
|
1077
1077
|
}), n[i] = r;
|
|
1078
1078
|
}), n;
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function ri() {
|
|
1081
1081
|
var e = {
|
|
1082
1082
|
scalar: {},
|
|
1083
1083
|
sequence: {},
|
|
@@ -1097,44 +1097,44 @@ function ni() {
|
|
|
1097
1097
|
arguments[t].forEach(r);
|
|
1098
1098
|
return e;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Ye(e) {
|
|
1101
1101
|
return this.extend(e);
|
|
1102
1102
|
}
|
|
1103
|
-
|
|
1103
|
+
Ye.prototype.extend = function(t) {
|
|
1104
1104
|
var n = [], r = [];
|
|
1105
|
-
if (t instanceof
|
|
1105
|
+
if (t instanceof Z)
|
|
1106
1106
|
r.push(t);
|
|
1107
1107
|
else if (Array.isArray(t))
|
|
1108
1108
|
r = r.concat(t);
|
|
1109
1109
|
else if (t && (Array.isArray(t.implicit) || Array.isArray(t.explicit)))
|
|
1110
1110
|
t.implicit && (n = n.concat(t.implicit)), t.explicit && (r = r.concat(t.explicit));
|
|
1111
1111
|
else
|
|
1112
|
-
throw new
|
|
1112
|
+
throw new X("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1113
1113
|
n.forEach(function(a) {
|
|
1114
|
-
if (!(a instanceof
|
|
1115
|
-
throw new
|
|
1114
|
+
if (!(a instanceof Z))
|
|
1115
|
+
throw new X("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1116
1116
|
if (a.loadKind && a.loadKind !== "scalar")
|
|
1117
|
-
throw new
|
|
1117
|
+
throw new X("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1118
1118
|
if (a.multi)
|
|
1119
|
-
throw new
|
|
1119
|
+
throw new X("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1120
1120
|
}), r.forEach(function(a) {
|
|
1121
|
-
if (!(a instanceof
|
|
1122
|
-
throw new
|
|
1121
|
+
if (!(a instanceof Z))
|
|
1122
|
+
throw new X("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1123
1123
|
});
|
|
1124
|
-
var i = Object.create(
|
|
1125
|
-
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit = pt(i, "implicit"), i.compiledExplicit = pt(i, "explicit"), i.compiledTypeMap =
|
|
1124
|
+
var i = Object.create(Ye.prototype);
|
|
1125
|
+
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit = pt(i, "implicit"), i.compiledExplicit = pt(i, "explicit"), i.compiledTypeMap = ri(i.compiledImplicit, i.compiledExplicit), i;
|
|
1126
1126
|
};
|
|
1127
|
-
var jt =
|
|
1127
|
+
var jt = Ye, Ut = new Z("tag:yaml.org,2002:str", {
|
|
1128
1128
|
kind: "scalar",
|
|
1129
1129
|
construct: function(e) {
|
|
1130
1130
|
return e !== null ? e : "";
|
|
1131
1131
|
}
|
|
1132
|
-
}), Pt = new
|
|
1132
|
+
}), Pt = new Z("tag:yaml.org,2002:seq", {
|
|
1133
1133
|
kind: "sequence",
|
|
1134
1134
|
construct: function(e) {
|
|
1135
1135
|
return e !== null ? e : [];
|
|
1136
1136
|
}
|
|
1137
|
-
}), qt = new
|
|
1137
|
+
}), qt = new Z("tag:yaml.org,2002:map", {
|
|
1138
1138
|
kind: "mapping",
|
|
1139
1139
|
construct: function(e) {
|
|
1140
1140
|
return e !== null ? e : {};
|
|
@@ -1146,23 +1146,23 @@ var jt = Ue, Ut = new Q("tag:yaml.org,2002:str", {
|
|
|
1146
1146
|
qt
|
|
1147
1147
|
]
|
|
1148
1148
|
});
|
|
1149
|
-
function
|
|
1149
|
+
function ii(e) {
|
|
1150
1150
|
if (e === null)
|
|
1151
1151
|
return !0;
|
|
1152
1152
|
var t = e.length;
|
|
1153
1153
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function ai() {
|
|
1156
1156
|
return null;
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function oi(e) {
|
|
1159
1159
|
return e === null;
|
|
1160
1160
|
}
|
|
1161
|
-
var Yt = new
|
|
1161
|
+
var Yt = new Z("tag:yaml.org,2002:null", {
|
|
1162
1162
|
kind: "scalar",
|
|
1163
|
-
resolve:
|
|
1164
|
-
construct:
|
|
1165
|
-
predicate:
|
|
1163
|
+
resolve: ii,
|
|
1164
|
+
construct: ai,
|
|
1165
|
+
predicate: oi,
|
|
1166
1166
|
represent: {
|
|
1167
1167
|
canonical: function() {
|
|
1168
1168
|
return "~";
|
|
@@ -1182,23 +1182,23 @@ var Yt = new Q("tag:yaml.org,2002:null", {
|
|
|
1182
1182
|
},
|
|
1183
1183
|
defaultStyle: "lowercase"
|
|
1184
1184
|
});
|
|
1185
|
-
function
|
|
1185
|
+
function li(e) {
|
|
1186
1186
|
if (e === null)
|
|
1187
1187
|
return !1;
|
|
1188
1188
|
var t = e.length;
|
|
1189
1189
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function si(e) {
|
|
1192
1192
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function ci(e) {
|
|
1195
1195
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1196
1196
|
}
|
|
1197
|
-
var Vt = new
|
|
1197
|
+
var Vt = new Z("tag:yaml.org,2002:bool", {
|
|
1198
1198
|
kind: "scalar",
|
|
1199
|
-
resolve:
|
|
1200
|
-
construct:
|
|
1201
|
-
predicate:
|
|
1199
|
+
resolve: li,
|
|
1200
|
+
construct: si,
|
|
1201
|
+
predicate: ci,
|
|
1202
1202
|
represent: {
|
|
1203
1203
|
lowercase: function(e) {
|
|
1204
1204
|
return e ? "true" : "false";
|
|
@@ -1212,16 +1212,16 @@ var Vt = new Q("tag:yaml.org,2002:bool", {
|
|
|
1212
1212
|
},
|
|
1213
1213
|
defaultStyle: "lowercase"
|
|
1214
1214
|
});
|
|
1215
|
-
function
|
|
1215
|
+
function ui(e) {
|
|
1216
1216
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function di(e) {
|
|
1219
1219
|
return 48 <= e && e <= 55;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function fi(e) {
|
|
1222
1222
|
return 48 <= e && e <= 57;
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function pi(e) {
|
|
1225
1225
|
if (e === null)
|
|
1226
1226
|
return !1;
|
|
1227
1227
|
var t = e.length, n = 0, r = !1, i;
|
|
@@ -1242,7 +1242,7 @@ function fi(e) {
|
|
|
1242
1242
|
if (i === "x") {
|
|
1243
1243
|
for (n++; n < t; n++)
|
|
1244
1244
|
if (i = e[n], i !== "_") {
|
|
1245
|
-
if (!
|
|
1245
|
+
if (!ui(e.charCodeAt(n)))
|
|
1246
1246
|
return !1;
|
|
1247
1247
|
r = !0;
|
|
1248
1248
|
}
|
|
@@ -1251,7 +1251,7 @@ function fi(e) {
|
|
|
1251
1251
|
if (i === "o") {
|
|
1252
1252
|
for (n++; n < t; n++)
|
|
1253
1253
|
if (i = e[n], i !== "_") {
|
|
1254
|
-
if (!
|
|
1254
|
+
if (!di(e.charCodeAt(n)))
|
|
1255
1255
|
return !1;
|
|
1256
1256
|
r = !0;
|
|
1257
1257
|
}
|
|
@@ -1262,13 +1262,13 @@ function fi(e) {
|
|
|
1262
1262
|
return !1;
|
|
1263
1263
|
for (; n < t; n++)
|
|
1264
1264
|
if (i = e[n], i !== "_") {
|
|
1265
|
-
if (!
|
|
1265
|
+
if (!fi(e.charCodeAt(n)))
|
|
1266
1266
|
return !1;
|
|
1267
1267
|
r = !0;
|
|
1268
1268
|
}
|
|
1269
1269
|
return !(!r || i === "_");
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function hi(e) {
|
|
1272
1272
|
var t = e, n = 1, r;
|
|
1273
1273
|
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), r = t[0], (r === "-" || r === "+") && (r === "-" && (n = -1), t = t.slice(1), r = t[0]), t === "0")
|
|
1274
1274
|
return 0;
|
|
@@ -1282,14 +1282,14 @@ function pi(e) {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
return n * parseInt(t, 10);
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1286
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1285
|
+
function mi(e) {
|
|
1286
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !G.isNegativeZero(e);
|
|
1287
1287
|
}
|
|
1288
|
-
var zt = new
|
|
1288
|
+
var zt = new Z("tag:yaml.org,2002:int", {
|
|
1289
1289
|
kind: "scalar",
|
|
1290
|
-
resolve:
|
|
1291
|
-
construct:
|
|
1292
|
-
predicate:
|
|
1290
|
+
resolve: pi,
|
|
1291
|
+
construct: hi,
|
|
1292
|
+
predicate: mi,
|
|
1293
1293
|
represent: {
|
|
1294
1294
|
binary: function(e) {
|
|
1295
1295
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1312,21 +1312,21 @@ var zt = new Q("tag:yaml.org,2002:int", {
|
|
|
1312
1312
|
decimal: [10, "dec"],
|
|
1313
1313
|
hexadecimal: [16, "hex"]
|
|
1314
1314
|
}
|
|
1315
|
-
}),
|
|
1315
|
+
}), gi = new RegExp(
|
|
1316
1316
|
// 2.5e4, 2.5 and integers
|
|
1317
1317
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1318
1318
|
);
|
|
1319
|
-
function
|
|
1320
|
-
return !(e === null || !
|
|
1319
|
+
function yi(e) {
|
|
1320
|
+
return !(e === null || !gi.test(e) || // Quick hack to not allow integers end with `_`
|
|
1321
1321
|
// Probably should update regexp & check speed
|
|
1322
1322
|
e[e.length - 1] === "_");
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function vi(e) {
|
|
1325
1325
|
var t, n;
|
|
1326
1326
|
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);
|
|
1327
1327
|
}
|
|
1328
|
-
var
|
|
1329
|
-
function
|
|
1328
|
+
var bi = /^[-+]?[0-9]+e/;
|
|
1329
|
+
function xi(e, t) {
|
|
1330
1330
|
var n;
|
|
1331
1331
|
if (isNaN(e))
|
|
1332
1332
|
switch (t) {
|
|
@@ -1355,19 +1355,19 @@ function bi(e, t) {
|
|
|
1355
1355
|
case "camelcase":
|
|
1356
1356
|
return "-.Inf";
|
|
1357
1357
|
}
|
|
1358
|
-
else if (
|
|
1358
|
+
else if (G.isNegativeZero(e))
|
|
1359
1359
|
return "-0.0";
|
|
1360
|
-
return n = e.toString(10),
|
|
1360
|
+
return n = e.toString(10), bi.test(n) ? n.replace("e", ".e") : n;
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1363
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1362
|
+
function Ci(e) {
|
|
1363
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || G.isNegativeZero(e));
|
|
1364
1364
|
}
|
|
1365
|
-
var Wt = new
|
|
1365
|
+
var Wt = new Z("tag:yaml.org,2002:float", {
|
|
1366
1366
|
kind: "scalar",
|
|
1367
|
-
resolve:
|
|
1368
|
-
construct:
|
|
1369
|
-
predicate:
|
|
1370
|
-
represent:
|
|
1367
|
+
resolve: yi,
|
|
1368
|
+
construct: vi,
|
|
1369
|
+
predicate: Ci,
|
|
1370
|
+
represent: xi,
|
|
1371
1371
|
defaultStyle: "lowercase"
|
|
1372
1372
|
}), Jt = Ht.extend({
|
|
1373
1373
|
implicit: [
|
|
@@ -1381,11 +1381,11 @@ var Wt = new Q("tag:yaml.org,2002:float", {
|
|
|
1381
1381
|
), Qt = new RegExp(
|
|
1382
1382
|
"^([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]))?))?$"
|
|
1383
1383
|
);
|
|
1384
|
-
function
|
|
1384
|
+
function _i(e) {
|
|
1385
1385
|
return e === null ? !1 : Zt.exec(e) !== null || Qt.exec(e) !== null;
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1388
|
-
var t, n, r, i, a, o, l, s = 0, c = null, d, u,
|
|
1387
|
+
function ki(e) {
|
|
1388
|
+
var t, n, r, i, a, o, l, s = 0, c = null, d, u, m;
|
|
1389
1389
|
if (t = Zt.exec(e), t === null && (t = Qt.exec(e)), t === null)
|
|
1390
1390
|
throw new Error("Date resolve error");
|
|
1391
1391
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
@@ -1395,30 +1395,30 @@ function _i(e) {
|
|
|
1395
1395
|
s += "0";
|
|
1396
1396
|
s = +s;
|
|
1397
1397
|
}
|
|
1398
|
-
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)),
|
|
1398
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), m = new Date(Date.UTC(n, r, i, a, o, l, s)), c && m.setTime(m.getTime() - c), m;
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Ai(e) {
|
|
1401
1401
|
return e.toISOString();
|
|
1402
1402
|
}
|
|
1403
|
-
var Xt = new
|
|
1403
|
+
var Xt = new Z("tag:yaml.org,2002:timestamp", {
|
|
1404
1404
|
kind: "scalar",
|
|
1405
|
-
resolve:
|
|
1406
|
-
construct:
|
|
1405
|
+
resolve: _i,
|
|
1406
|
+
construct: ki,
|
|
1407
1407
|
instanceOf: Date,
|
|
1408
|
-
represent:
|
|
1408
|
+
represent: Ai
|
|
1409
1409
|
});
|
|
1410
|
-
function
|
|
1410
|
+
function wi(e) {
|
|
1411
1411
|
return e === "<<" || e === null;
|
|
1412
1412
|
}
|
|
1413
|
-
var en = new
|
|
1413
|
+
var en = new Z("tag:yaml.org,2002:merge", {
|
|
1414
1414
|
kind: "scalar",
|
|
1415
|
-
resolve:
|
|
1416
|
-
}),
|
|
1415
|
+
resolve: wi
|
|
1416
|
+
}), Xe = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1417
1417
|
\r`;
|
|
1418
|
-
function
|
|
1418
|
+
function Si(e) {
|
|
1419
1419
|
if (e === null)
|
|
1420
1420
|
return !1;
|
|
1421
|
-
var t, n, r = 0, i = e.length, a =
|
|
1421
|
+
var t, n, r = 0, i = e.length, a = Xe;
|
|
1422
1422
|
for (n = 0; n < i; n++)
|
|
1423
1423
|
if (t = a.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1424
1424
|
if (t < 0)
|
|
@@ -1427,37 +1427,37 @@ function wi(e) {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
return r % 8 === 0;
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1431
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a =
|
|
1430
|
+
function Ii(e) {
|
|
1431
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a = Xe, o = 0, l = [];
|
|
1432
1432
|
for (t = 0; t < i; t++)
|
|
1433
1433
|
t % 4 === 0 && t && (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)), o = o << 6 | a.indexOf(r.charAt(t));
|
|
1434
1434
|
return n = i % 4 * 6, n === 0 ? (l.push(o >> 16 & 255), l.push(o >> 8 & 255), l.push(o & 255)) : n === 18 ? (l.push(o >> 10 & 255), l.push(o >> 2 & 255)) : n === 12 && l.push(o >> 4 & 255), new Uint8Array(l);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
var t = "", n = 0, r, i, a = e.length, o =
|
|
1436
|
+
function Ei(e) {
|
|
1437
|
+
var t = "", n = 0, r, i, a = e.length, o = Xe;
|
|
1438
1438
|
for (r = 0; r < a; r++)
|
|
1439
1439
|
r % 3 === 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1440
1440
|
return i = a % 3, i === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : i === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : i === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function Ti(e) {
|
|
1443
1443
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1444
1444
|
}
|
|
1445
|
-
var tn = new
|
|
1445
|
+
var tn = new Z("tag:yaml.org,2002:binary", {
|
|
1446
1446
|
kind: "scalar",
|
|
1447
|
-
resolve:
|
|
1448
|
-
construct:
|
|
1449
|
-
predicate:
|
|
1450
|
-
represent:
|
|
1451
|
-
}),
|
|
1452
|
-
function
|
|
1447
|
+
resolve: Si,
|
|
1448
|
+
construct: Ii,
|
|
1449
|
+
predicate: Ti,
|
|
1450
|
+
represent: Ei
|
|
1451
|
+
}), Fi = Object.prototype.hasOwnProperty, Oi = Object.prototype.toString;
|
|
1452
|
+
function Li(e) {
|
|
1453
1453
|
if (e === null)
|
|
1454
1454
|
return !0;
|
|
1455
1455
|
var t = [], n, r, i, a, o, l = e;
|
|
1456
1456
|
for (n = 0, r = l.length; n < r; n += 1) {
|
|
1457
|
-
if (i = l[n], o = !1,
|
|
1457
|
+
if (i = l[n], o = !1, Oi.call(i) !== "[object Object]")
|
|
1458
1458
|
return !1;
|
|
1459
1459
|
for (a in i)
|
|
1460
|
-
if (
|
|
1460
|
+
if (Fi.call(i, a))
|
|
1461
1461
|
if (!o)
|
|
1462
1462
|
o = !0;
|
|
1463
1463
|
else
|
|
@@ -1474,23 +1474,23 @@ function Oi(e) {
|
|
|
1474
1474
|
function $i(e) {
|
|
1475
1475
|
return e !== null ? e : [];
|
|
1476
1476
|
}
|
|
1477
|
-
var nn = new
|
|
1477
|
+
var nn = new Z("tag:yaml.org,2002:omap", {
|
|
1478
1478
|
kind: "sequence",
|
|
1479
|
-
resolve:
|
|
1479
|
+
resolve: Li,
|
|
1480
1480
|
construct: $i
|
|
1481
|
-
}),
|
|
1482
|
-
function
|
|
1481
|
+
}), Ni = Object.prototype.toString;
|
|
1482
|
+
function Bi(e) {
|
|
1483
1483
|
if (e === null)
|
|
1484
1484
|
return !0;
|
|
1485
1485
|
var t, n, r, i, a, o = e;
|
|
1486
1486
|
for (a = new Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1487
|
-
if (r = o[t],
|
|
1487
|
+
if (r = o[t], Ni.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1))
|
|
1488
1488
|
return !1;
|
|
1489
1489
|
a[t] = [i[0], r[i[0]]];
|
|
1490
1490
|
}
|
|
1491
1491
|
return !0;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function Ri(e) {
|
|
1494
1494
|
if (e === null)
|
|
1495
1495
|
return [];
|
|
1496
1496
|
var t, n, r, i, a, o = e;
|
|
@@ -1498,28 +1498,28 @@ function Bi(e) {
|
|
|
1498
1498
|
r = o[t], i = Object.keys(r), a[t] = [i[0], r[i[0]]];
|
|
1499
1499
|
return a;
|
|
1500
1500
|
}
|
|
1501
|
-
var rn = new
|
|
1501
|
+
var rn = new Z("tag:yaml.org,2002:pairs", {
|
|
1502
1502
|
kind: "sequence",
|
|
1503
|
-
resolve:
|
|
1504
|
-
construct:
|
|
1505
|
-
}),
|
|
1503
|
+
resolve: Bi,
|
|
1504
|
+
construct: Ri
|
|
1505
|
+
}), Ki = Object.prototype.hasOwnProperty;
|
|
1506
1506
|
function Mi(e) {
|
|
1507
1507
|
if (e === null)
|
|
1508
1508
|
return !0;
|
|
1509
1509
|
var t, n = e;
|
|
1510
1510
|
for (t in n)
|
|
1511
|
-
if (
|
|
1511
|
+
if (Ki.call(n, t) && n[t] !== null)
|
|
1512
1512
|
return !1;
|
|
1513
1513
|
return !0;
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1515
|
+
function Di(e) {
|
|
1516
1516
|
return e !== null ? e : {};
|
|
1517
1517
|
}
|
|
1518
|
-
var an = new
|
|
1518
|
+
var an = new Z("tag:yaml.org,2002:set", {
|
|
1519
1519
|
kind: "mapping",
|
|
1520
1520
|
resolve: Mi,
|
|
1521
|
-
construct:
|
|
1522
|
-
}),
|
|
1521
|
+
construct: Di
|
|
1522
|
+
}), et = Gt.extend({
|
|
1523
1523
|
implicit: [
|
|
1524
1524
|
Xt,
|
|
1525
1525
|
en
|
|
@@ -1530,47 +1530,47 @@ var an = new Q("tag:yaml.org,2002:set", {
|
|
|
1530
1530
|
rn,
|
|
1531
1531
|
an
|
|
1532
1532
|
]
|
|
1533
|
-
}),
|
|
1533
|
+
}), ue = Object.prototype.hasOwnProperty, Fe = 1, on = 2, ln = 3, Oe = 4, qe = 1, ji = 2, ht = 3, Ui = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Pi = /[\x85\u2028\u2029]/, qi = /[,\[\]\{\}]/, sn = /^(?:!|!!|![a-z\-]+!)$/i, cn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1534
1534
|
function mt(e) {
|
|
1535
1535
|
return Object.prototype.toString.call(e);
|
|
1536
1536
|
}
|
|
1537
1537
|
function ae(e) {
|
|
1538
1538
|
return e === 10 || e === 13;
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function me(e) {
|
|
1541
1541
|
return e === 9 || e === 32;
|
|
1542
1542
|
}
|
|
1543
1543
|
function te(e) {
|
|
1544
1544
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function be(e) {
|
|
1547
1547
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function Hi(e) {
|
|
1550
1550
|
var t;
|
|
1551
1551
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function Yi(e) {
|
|
1554
1554
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1556
|
+
function Vi(e) {
|
|
1557
1557
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1558
1558
|
}
|
|
1559
1559
|
function gt(e) {
|
|
1560
1560
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1561
1561
|
` : 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" : "";
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function zi(e) {
|
|
1564
1564
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1565
1565
|
(e - 65536 >> 10) + 55296,
|
|
1566
1566
|
(e - 65536 & 1023) + 56320
|
|
1567
1567
|
);
|
|
1568
1568
|
}
|
|
1569
1569
|
var un = new Array(256), dn = new Array(256);
|
|
1570
|
-
for (var
|
|
1571
|
-
un[
|
|
1572
|
-
function
|
|
1573
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1570
|
+
for (var ge = 0; ge < 256; ge++)
|
|
1571
|
+
un[ge] = gt(ge) ? 1 : 0, dn[ge] = gt(ge);
|
|
1572
|
+
function Wi(e, t) {
|
|
1573
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || et, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1574
1574
|
}
|
|
1575
1575
|
function fn(e, t) {
|
|
1576
1576
|
var n = {
|
|
@@ -1581,26 +1581,26 @@ function fn(e, t) {
|
|
|
1581
1581
|
line: e.line,
|
|
1582
1582
|
column: e.position - e.lineStart
|
|
1583
1583
|
};
|
|
1584
|
-
return n.snippet =
|
|
1584
|
+
return n.snippet = Qr(n), new X(t, n);
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function C(e, t) {
|
|
1587
1587
|
throw fn(e, t);
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function Le(e, t) {
|
|
1590
1590
|
e.onWarning && e.onWarning.call(null, fn(e, t));
|
|
1591
1591
|
}
|
|
1592
1592
|
var yt = {
|
|
1593
1593
|
YAML: function(t, n, r) {
|
|
1594
1594
|
var i, a, o;
|
|
1595
|
-
t.version !== null &&
|
|
1595
|
+
t.version !== null && C(t, "duplication of %YAML directive"), r.length !== 1 && C(t, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), i === null && C(t, "ill-formed argument of the YAML directive"), a = parseInt(i[1], 10), o = parseInt(i[2], 10), a !== 1 && C(t, "unacceptable YAML version of the document"), t.version = r[0], t.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Le(t, "unsupported YAML version of the document");
|
|
1596
1596
|
},
|
|
1597
1597
|
TAG: function(t, n, r) {
|
|
1598
1598
|
var i, a;
|
|
1599
|
-
r.length !== 2 &&
|
|
1599
|
+
r.length !== 2 && C(t, "TAG directive accepts exactly two arguments"), i = r[0], a = r[1], sn.test(i) || C(t, "ill-formed tag handle (first argument) of the TAG directive"), ue.call(t.tagMap, i) && C(t, 'there is a previously declared suffix for "' + i + '" tag handle'), cn.test(a) || C(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1600
1600
|
try {
|
|
1601
1601
|
a = decodeURIComponent(a);
|
|
1602
1602
|
} catch {
|
|
1603
|
-
|
|
1603
|
+
C(t, "tag prefix is malformed: " + a);
|
|
1604
1604
|
}
|
|
1605
1605
|
t.tagMap[i] = a;
|
|
1606
1606
|
}
|
|
@@ -1610,22 +1610,22 @@ function se(e, t, n, r) {
|
|
|
1610
1610
|
if (t < n) {
|
|
1611
1611
|
if (l = e.input.slice(t, n), r)
|
|
1612
1612
|
for (i = 0, a = l.length; i < a; i += 1)
|
|
1613
|
-
o = l.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1613
|
+
o = l.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || C(e, "expected valid JSON character");
|
|
1614
1614
|
else
|
|
1615
|
-
|
|
1615
|
+
Ui.test(l) && C(e, "the stream contains non-printable characters");
|
|
1616
1616
|
e.result += l;
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
1619
|
function vt(e, t, n, r) {
|
|
1620
1620
|
var i, a, o, l;
|
|
1621
|
-
for (
|
|
1622
|
-
a = i[o],
|
|
1621
|
+
for (G.isObject(n) || C(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, l = i.length; o < l; o += 1)
|
|
1622
|
+
a = i[o], ue.call(t, a) || (t[a] = n[a], r[a] = !0);
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1624
|
+
function xe(e, t, n, r, i, a, o, l, s) {
|
|
1625
1625
|
var c, d;
|
|
1626
1626
|
if (Array.isArray(i))
|
|
1627
1627
|
for (i = Array.prototype.slice.call(i), c = 0, d = i.length; c < d; c += 1)
|
|
1628
|
-
Array.isArray(i[c]) &&
|
|
1628
|
+
Array.isArray(i[c]) && C(e, "nested arrays are not supported inside keys"), typeof i == "object" && mt(i[c]) === "[object Object]" && (i[c] = "[object Object]");
|
|
1629
1629
|
if (typeof i == "object" && mt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1630
1630
|
if (Array.isArray(a))
|
|
1631
1631
|
for (c = 0, d = a.length; c < d; c += 1)
|
|
@@ -1633,7 +1633,7 @@ function ge(e, t, n, r, i, a, o, l, s) {
|
|
|
1633
1633
|
else
|
|
1634
1634
|
vt(e, t, a, n);
|
|
1635
1635
|
else
|
|
1636
|
-
!e.json && !
|
|
1636
|
+
!e.json && !ue.call(n, i) && ue.call(t, i) && (e.line = o || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, C(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(t, i, {
|
|
1637
1637
|
configurable: !0,
|
|
1638
1638
|
enumerable: !0,
|
|
1639
1639
|
writable: !0,
|
|
@@ -1641,50 +1641,50 @@ function ge(e, t, n, r, i, a, o, l, s) {
|
|
|
1641
1641
|
}) : t[i] = a, delete n[i];
|
|
1642
1642
|
return t;
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function tt(e) {
|
|
1645
1645
|
var t;
|
|
1646
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1646
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : C(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1648
|
+
function W(e, t, n) {
|
|
1649
1649
|
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1650
|
-
for (;
|
|
1650
|
+
for (; me(i); )
|
|
1651
1651
|
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1652
1652
|
if (t && i === 35)
|
|
1653
1653
|
do
|
|
1654
1654
|
i = e.input.charCodeAt(++e.position);
|
|
1655
1655
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1656
1656
|
if (ae(i))
|
|
1657
|
-
for (
|
|
1657
|
+
for (tt(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32; )
|
|
1658
1658
|
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1659
1659
|
else
|
|
1660
1660
|
break;
|
|
1661
1661
|
}
|
|
1662
|
-
return n !== -1 && r !== 0 && e.lineIndent < n &&
|
|
1662
|
+
return n !== -1 && r !== 0 && e.lineIndent < n && Le(e, "deficient indentation"), r;
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1664
|
+
function Me(e) {
|
|
1665
1665
|
var t = e.position, n;
|
|
1666
1666
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || te(n)));
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1669
|
-
t === 1 ? e.result += " " : t > 1 && (e.result +=
|
|
1668
|
+
function nt(e, t) {
|
|
1669
|
+
t === 1 ? e.result += " " : t > 1 && (e.result += G.repeat(`
|
|
1670
1670
|
`, t - 1));
|
|
1671
1671
|
}
|
|
1672
|
-
function
|
|
1673
|
-
var r, i, a, o, l, s, c, d, u = e.kind,
|
|
1674
|
-
if (f = e.input.charCodeAt(e.position), te(f) ||
|
|
1672
|
+
function Ji(e, t, n) {
|
|
1673
|
+
var r, i, a, o, l, s, c, d, u = e.kind, m = e.result, f;
|
|
1674
|
+
if (f = e.input.charCodeAt(e.position), te(f) || be(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), te(i) || n && be(i)))
|
|
1675
1675
|
return !1;
|
|
1676
1676
|
for (e.kind = "scalar", e.result = "", a = o = e.position, l = !1; f !== 0; ) {
|
|
1677
1677
|
if (f === 58) {
|
|
1678
|
-
if (i = e.input.charCodeAt(e.position + 1), te(i) || n &&
|
|
1678
|
+
if (i = e.input.charCodeAt(e.position + 1), te(i) || n && be(i))
|
|
1679
1679
|
break;
|
|
1680
1680
|
} else if (f === 35) {
|
|
1681
1681
|
if (r = e.input.charCodeAt(e.position - 1), te(r))
|
|
1682
1682
|
break;
|
|
1683
1683
|
} else {
|
|
1684
|
-
if (e.position === e.lineStart &&
|
|
1684
|
+
if (e.position === e.lineStart && Me(e) || n && be(f))
|
|
1685
1685
|
break;
|
|
1686
1686
|
if (ae(f))
|
|
1687
|
-
if (s = e.line, c = e.lineStart, d = e.lineIndent,
|
|
1687
|
+
if (s = e.line, c = e.lineStart, d = e.lineIndent, W(e, !1, -1), e.lineIndent >= t) {
|
|
1688
1688
|
l = !0, f = e.input.charCodeAt(e.position);
|
|
1689
1689
|
continue;
|
|
1690
1690
|
} else {
|
|
@@ -1692,11 +1692,11 @@ function Wi(e, t, n) {
|
|
|
1692
1692
|
break;
|
|
1693
1693
|
}
|
|
1694
1694
|
}
|
|
1695
|
-
l && (se(e, a, o, !1),
|
|
1695
|
+
l && (se(e, a, o, !1), nt(e, e.line - s), a = o = e.position, l = !1), me(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1696
1696
|
}
|
|
1697
|
-
return se(e, a, o, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
1697
|
+
return se(e, a, o, !1), e.result ? !0 : (e.kind = u, e.result = m, !1);
|
|
1698
1698
|
}
|
|
1699
|
-
function
|
|
1699
|
+
function Gi(e, t) {
|
|
1700
1700
|
var n, r, i;
|
|
1701
1701
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1702
1702
|
return !1;
|
|
@@ -1707,10 +1707,10 @@ function Ji(e, t) {
|
|
|
1707
1707
|
else
|
|
1708
1708
|
return !0;
|
|
1709
1709
|
else
|
|
1710
|
-
ae(n) ? (se(e, r, i, !0),
|
|
1711
|
-
|
|
1710
|
+
ae(n) ? (se(e, r, i, !0), nt(e, W(e, !1, t)), r = i = e.position) : e.position === e.lineStart && Me(e) ? C(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1711
|
+
C(e, "unexpected end of the stream within a single quoted scalar");
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1713
|
+
function Zi(e, t) {
|
|
1714
1714
|
var n, r, i, a, o, l;
|
|
1715
1715
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1716
1716
|
return !1;
|
|
@@ -1719,38 +1719,38 @@ function Gi(e, t) {
|
|
|
1719
1719
|
return se(e, n, e.position, !0), e.position++, !0;
|
|
1720
1720
|
if (l === 92) {
|
|
1721
1721
|
if (se(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), ae(l))
|
|
1722
|
-
|
|
1722
|
+
W(e, !1, t);
|
|
1723
1723
|
else if (l < 256 && un[l])
|
|
1724
1724
|
e.result += dn[l], e.position++;
|
|
1725
|
-
else if ((o =
|
|
1725
|
+
else if ((o = Yi(l)) > 0) {
|
|
1726
1726
|
for (i = o, a = 0; i > 0; i--)
|
|
1727
|
-
l = e.input.charCodeAt(++e.position), (o =
|
|
1728
|
-
e.result +=
|
|
1727
|
+
l = e.input.charCodeAt(++e.position), (o = Hi(l)) >= 0 ? a = (a << 4) + o : C(e, "expected hexadecimal character");
|
|
1728
|
+
e.result += zi(a), e.position++;
|
|
1729
1729
|
} else
|
|
1730
|
-
|
|
1730
|
+
C(e, "unknown escape sequence");
|
|
1731
1731
|
n = r = e.position;
|
|
1732
1732
|
} else
|
|
1733
|
-
ae(l) ? (se(e, n, r, !0),
|
|
1733
|
+
ae(l) ? (se(e, n, r, !0), nt(e, W(e, !1, t)), n = r = e.position) : e.position === e.lineStart && Me(e) ? C(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1734
1734
|
}
|
|
1735
|
-
|
|
1735
|
+
C(e, "unexpected end of the stream within a double quoted scalar");
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1738
|
-
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, c, d, u,
|
|
1739
|
-
if (
|
|
1737
|
+
function Qi(e, t) {
|
|
1738
|
+
var n = !0, r, i, a, o = e.tag, l, s = e.anchor, c, d, u, m, f, b = /* @__PURE__ */ Object.create(null), v, k, M, I;
|
|
1739
|
+
if (I = e.input.charCodeAt(e.position), I === 91)
|
|
1740
1740
|
d = 93, f = !1, l = [];
|
|
1741
|
-
else if (
|
|
1741
|
+
else if (I === 123)
|
|
1742
1742
|
d = 125, f = !0, l = {};
|
|
1743
1743
|
else
|
|
1744
1744
|
return !1;
|
|
1745
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1746
|
-
if (
|
|
1745
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), I = e.input.charCodeAt(++e.position); I !== 0; ) {
|
|
1746
|
+
if (W(e, !0, t), I = e.input.charCodeAt(e.position), I === d)
|
|
1747
1747
|
return e.position++, e.tag = o, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1748
|
-
n ?
|
|
1748
|
+
n ? I === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"), k = v = M = null, u = m = !1, I === 63 && (c = e.input.charCodeAt(e.position + 1), te(c) && (u = m = !0, e.position++, W(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, _e(e, t, Fe, !1, !0), k = e.tag, v = e.result, W(e, !0, t), I = e.input.charCodeAt(e.position), (m || e.line === r) && I === 58 && (u = !0, I = e.input.charCodeAt(++e.position), W(e, !0, t), _e(e, t, Fe, !1, !0), M = e.result), f ? xe(e, l, b, k, v, M, r, i, a) : u ? l.push(xe(e, null, b, k, v, M, r, i, a)) : l.push(v), W(e, !0, t), I = e.input.charCodeAt(e.position), I === 44 ? (n = !0, I = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1749
1749
|
}
|
|
1750
|
-
|
|
1750
|
+
C(e, "unexpected end of the stream within a flow collection");
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1753
|
-
var n, r, i =
|
|
1752
|
+
function Xi(e, t) {
|
|
1753
|
+
var n, r, i = qe, a = !1, o = !1, l = t, s = 0, c = !1, d, u;
|
|
1754
1754
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1755
1755
|
r = !1;
|
|
1756
1756
|
else if (u === 62)
|
|
@@ -1759,37 +1759,37 @@ function Qi(e, t) {
|
|
|
1759
1759
|
return !1;
|
|
1760
1760
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1761
1761
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1762
|
-
|
|
1763
|
-
else if ((d =
|
|
1764
|
-
d === 0 ?
|
|
1762
|
+
qe === i ? i = u === 43 ? ht : ji : C(e, "repeat of a chomping mode identifier");
|
|
1763
|
+
else if ((d = Vi(u)) >= 0)
|
|
1764
|
+
d === 0 ? C(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? C(e, "repeat of an indentation width identifier") : (l = t + d - 1, o = !0);
|
|
1765
1765
|
else
|
|
1766
1766
|
break;
|
|
1767
|
-
if (
|
|
1767
|
+
if (me(u)) {
|
|
1768
1768
|
do
|
|
1769
1769
|
u = e.input.charCodeAt(++e.position);
|
|
1770
|
-
while (
|
|
1770
|
+
while (me(u));
|
|
1771
1771
|
if (u === 35)
|
|
1772
1772
|
do
|
|
1773
1773
|
u = e.input.charCodeAt(++e.position);
|
|
1774
1774
|
while (!ae(u) && u !== 0);
|
|
1775
1775
|
}
|
|
1776
1776
|
for (; u !== 0; ) {
|
|
1777
|
-
for (
|
|
1777
|
+
for (tt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!o || e.lineIndent < l) && u === 32; )
|
|
1778
1778
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
1779
1779
|
if (!o && e.lineIndent > l && (l = e.lineIndent), ae(u)) {
|
|
1780
1780
|
s++;
|
|
1781
1781
|
continue;
|
|
1782
1782
|
}
|
|
1783
1783
|
if (e.lineIndent < l) {
|
|
1784
|
-
i === ht ? e.result +=
|
|
1785
|
-
`, a ? 1 + s : s) : i ===
|
|
1784
|
+
i === ht ? e.result += G.repeat(`
|
|
1785
|
+
`, a ? 1 + s : s) : i === qe && a && (e.result += `
|
|
1786
1786
|
`);
|
|
1787
1787
|
break;
|
|
1788
1788
|
}
|
|
1789
|
-
for (r ?
|
|
1790
|
-
`, a ? 1 + s : s)) : c ? (c = !1, e.result +=
|
|
1791
|
-
`, s + 1)) : s === 0 ? a && (e.result += " ") : e.result +=
|
|
1792
|
-
`, s) : e.result +=
|
|
1789
|
+
for (r ? me(u) ? (c = !0, e.result += G.repeat(`
|
|
1790
|
+
`, a ? 1 + s : s)) : c ? (c = !1, e.result += G.repeat(`
|
|
1791
|
+
`, s + 1)) : s === 0 ? a && (e.result += " ") : e.result += G.repeat(`
|
|
1792
|
+
`, s) : e.result += G.repeat(`
|
|
1793
1793
|
`, a ? 1 + s : s), a = !0, o = !0, s = 0, n = e.position; !ae(u) && u !== 0; )
|
|
1794
1794
|
u = e.input.charCodeAt(++e.position);
|
|
1795
1795
|
se(e, n, e.position, !1);
|
|
@@ -1800,120 +1800,120 @@ function bt(e, t) {
|
|
|
1800
1800
|
var n, r = e.tag, i = e.anchor, a = [], o, l = !1, s;
|
|
1801
1801
|
if (e.firstTabInLine !== -1)
|
|
1802
1802
|
return !1;
|
|
1803
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1804
|
-
if (l = !0, e.position++,
|
|
1803
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, C(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !te(o)))); ) {
|
|
1804
|
+
if (l = !0, e.position++, W(e, !0, -1) && e.lineIndent <= t) {
|
|
1805
1805
|
a.push(null), s = e.input.charCodeAt(e.position);
|
|
1806
1806
|
continue;
|
|
1807
1807
|
}
|
|
1808
|
-
if (n = e.line,
|
|
1809
|
-
|
|
1808
|
+
if (n = e.line, _e(e, t, ln, !1, !0), a.push(e.result), W(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1809
|
+
C(e, "bad indentation of a sequence entry");
|
|
1810
1810
|
else if (e.lineIndent < t)
|
|
1811
1811
|
break;
|
|
1812
1812
|
}
|
|
1813
1813
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1816
|
-
var r, i, a, o, l, s, c = e.tag, d = e.anchor, u = {},
|
|
1815
|
+
function ea(e, t, n) {
|
|
1816
|
+
var r, i, a, o, l, s, c = e.tag, d = e.anchor, u = {}, m = /* @__PURE__ */ Object.create(null), f = null, b = null, v = null, k = !1, M = !1, I;
|
|
1817
1817
|
if (e.firstTabInLine !== -1)
|
|
1818
1818
|
return !1;
|
|
1819
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
1820
|
-
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1821
|
-
|
|
1819
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), I = e.input.charCodeAt(e.position); I !== 0; ) {
|
|
1820
|
+
if (!k && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, C(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (I === 63 || I === 58) && te(r))
|
|
1821
|
+
I === 63 ? (k && (xe(e, u, m, f, b, null, o, l, s), f = b = v = null), M = !0, k = !0, i = !0) : k ? (k = !1, i = !0) : C(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, I = r;
|
|
1822
1822
|
else {
|
|
1823
|
-
if (o = e.line, l = e.lineStart, s = e.position, !
|
|
1823
|
+
if (o = e.line, l = e.lineStart, s = e.position, !_e(e, n, on, !1, !0))
|
|
1824
1824
|
break;
|
|
1825
1825
|
if (e.line === a) {
|
|
1826
|
-
for (
|
|
1827
|
-
|
|
1828
|
-
if (
|
|
1829
|
-
|
|
1830
|
-
else if (
|
|
1831
|
-
|
|
1826
|
+
for (I = e.input.charCodeAt(e.position); me(I); )
|
|
1827
|
+
I = e.input.charCodeAt(++e.position);
|
|
1828
|
+
if (I === 58)
|
|
1829
|
+
I = e.input.charCodeAt(++e.position), te(I) || C(e, "a whitespace character is expected after the key-value separator within a block mapping"), k && (xe(e, u, m, f, b, null, o, l, s), f = b = v = null), M = !0, k = !1, i = !1, f = e.tag, b = e.result;
|
|
1830
|
+
else if (M)
|
|
1831
|
+
C(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1832
1832
|
else
|
|
1833
1833
|
return e.tag = c, e.anchor = d, !0;
|
|
1834
|
-
} else if (
|
|
1835
|
-
|
|
1834
|
+
} else if (M)
|
|
1835
|
+
C(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1836
1836
|
else
|
|
1837
1837
|
return e.tag = c, e.anchor = d, !0;
|
|
1838
1838
|
}
|
|
1839
|
-
if ((e.line === a || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position),
|
|
1840
|
-
|
|
1839
|
+
if ((e.line === a || e.lineIndent > t) && (k && (o = e.line, l = e.lineStart, s = e.position), _e(e, t, Oe, !0, i) && (k ? b = e.result : v = e.result), k || (xe(e, u, m, f, b, v, o, l, s), f = b = v = null), W(e, !0, -1), I = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && I !== 0)
|
|
1840
|
+
C(e, "bad indentation of a mapping entry");
|
|
1841
1841
|
else if (e.lineIndent < t)
|
|
1842
1842
|
break;
|
|
1843
1843
|
}
|
|
1844
|
-
return k &&
|
|
1844
|
+
return k && xe(e, u, m, f, b, null, o, l, s), M && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), M;
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function ta(e) {
|
|
1847
1847
|
var t, n = !1, r = !1, i, a, o;
|
|
1848
1848
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
1849
1849
|
return !1;
|
|
1850
|
-
if (e.tag !== null &&
|
|
1850
|
+
if (e.tag !== null && C(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
1851
1851
|
do
|
|
1852
1852
|
o = e.input.charCodeAt(++e.position);
|
|
1853
1853
|
while (o !== 0 && o !== 62);
|
|
1854
|
-
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
1854
|
+
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : C(e, "unexpected end of the stream within a verbatim tag");
|
|
1855
1855
|
} else {
|
|
1856
1856
|
for (; o !== 0 && !te(o); )
|
|
1857
|
-
o === 33 && (r ?
|
|
1858
|
-
a = e.input.slice(t, e.position),
|
|
1857
|
+
o === 33 && (r ? C(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), sn.test(i) || C(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
1858
|
+
a = e.input.slice(t, e.position), qi.test(a) && C(e, "tag suffix cannot contain flow indicator characters");
|
|
1859
1859
|
}
|
|
1860
|
-
a && !cn.test(a) &&
|
|
1860
|
+
a && !cn.test(a) && C(e, "tag name cannot contain such characters: " + a);
|
|
1861
1861
|
try {
|
|
1862
1862
|
a = decodeURIComponent(a);
|
|
1863
1863
|
} catch {
|
|
1864
|
-
|
|
1864
|
+
C(e, "tag name is malformed: " + a);
|
|
1865
1865
|
}
|
|
1866
|
-
return n ? e.tag = a :
|
|
1866
|
+
return n ? e.tag = a : ue.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === "!" ? e.tag = "!" + a : i === "!!" ? e.tag = "tag:yaml.org,2002:" + a : C(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
1867
1867
|
}
|
|
1868
|
-
function
|
|
1868
|
+
function na(e) {
|
|
1869
1869
|
var t, n;
|
|
1870
1870
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
1871
1871
|
return !1;
|
|
1872
|
-
for (e.anchor !== null &&
|
|
1872
|
+
for (e.anchor !== null && C(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !te(n) && !be(n); )
|
|
1873
1873
|
n = e.input.charCodeAt(++e.position);
|
|
1874
|
-
return e.position === t &&
|
|
1874
|
+
return e.position === t && C(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1876
|
+
function ra(e) {
|
|
1877
1877
|
var t, n, r;
|
|
1878
1878
|
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
1879
1879
|
return !1;
|
|
1880
|
-
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !te(r) && !
|
|
1880
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !te(r) && !be(r); )
|
|
1881
1881
|
r = e.input.charCodeAt(++e.position);
|
|
1882
|
-
return e.position === t &&
|
|
1883
|
-
}
|
|
1884
|
-
function
|
|
1885
|
-
var a, o, l, s = 1, c = !1, d = !1, u,
|
|
1886
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Oe === n || ln === n, r &&
|
|
1887
|
-
for (;
|
|
1888
|
-
|
|
1889
|
-
if (l && (l = c || i), (s === 1 || Oe === n) && (Fe === n || on === n ?
|
|
1882
|
+
return e.position === t && C(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ue.call(e.anchorMap, n) || C(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], W(e, !0, -1), !0;
|
|
1883
|
+
}
|
|
1884
|
+
function _e(e, t, n, r, i) {
|
|
1885
|
+
var a, o, l, s = 1, c = !1, d = !1, u, m, f, b, v, k;
|
|
1886
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = l = Oe === n || ln === n, r && W(e, !0, -1) && (c = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1887
|
+
for (; ta(e) || na(e); )
|
|
1888
|
+
W(e, !0, -1) ? (c = !0, l = a, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1889
|
+
if (l && (l = c || i), (s === 1 || Oe === n) && (Fe === n || on === n ? v = t : v = t + 1, k = e.position - e.lineStart, s === 1 ? l && (bt(e, k) || ea(e, k, v)) || Qi(e, v) ? d = !0 : (o && Xi(e, v) || Gi(e, v) || Zi(e, v) ? d = !0 : ra(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && C(e, "alias node should not have any properties")) : Ji(e, v, Fe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && bt(e, k))), e.tag === null)
|
|
1890
1890
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1891
1891
|
else if (e.tag === "?") {
|
|
1892
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1893
|
-
if (
|
|
1894
|
-
e.result =
|
|
1892
|
+
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, m = e.implicitTypes.length; u < m; u += 1)
|
|
1893
|
+
if (b = e.implicitTypes[u], b.resolve(e.result)) {
|
|
1894
|
+
e.result = b.construct(e.result), e.tag = b.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1895
1895
|
break;
|
|
1896
1896
|
}
|
|
1897
1897
|
} else if (e.tag !== "!") {
|
|
1898
|
-
if (
|
|
1899
|
-
|
|
1898
|
+
if (ue.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1899
|
+
b = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1900
1900
|
else
|
|
1901
|
-
for (
|
|
1901
|
+
for (b = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, m = f.length; u < m; u += 1)
|
|
1902
1902
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
1903
|
-
|
|
1903
|
+
b = f[u];
|
|
1904
1904
|
break;
|
|
1905
1905
|
}
|
|
1906
|
-
|
|
1906
|
+
b || C(e, "unknown tag !<" + e.tag + ">"), e.result !== null && b.kind !== e.kind && C(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + b.kind + '", not "' + e.kind + '"'), b.resolve(e.result, e.tag) ? (e.result = b.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : C(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1907
1907
|
}
|
|
1908
1908
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function ia(e) {
|
|
1911
1911
|
var t = e.position, n, r, i, a = !1, o;
|
|
1912
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (
|
|
1912
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (W(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
1913
1913
|
for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !te(o); )
|
|
1914
1914
|
o = e.input.charCodeAt(++e.position);
|
|
1915
|
-
for (r = e.input.slice(n, e.position), i = [], r.length < 1 &&
|
|
1916
|
-
for (;
|
|
1915
|
+
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && C(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
1916
|
+
for (; me(o); )
|
|
1917
1917
|
o = e.input.charCodeAt(++e.position);
|
|
1918
1918
|
if (o === 35) {
|
|
1919
1919
|
do
|
|
@@ -1927,28 +1927,28 @@ function ra(e) {
|
|
|
1927
1927
|
o = e.input.charCodeAt(++e.position);
|
|
1928
1928
|
i.push(e.input.slice(n, e.position));
|
|
1929
1929
|
}
|
|
1930
|
-
o !== 0 &&
|
|
1930
|
+
o !== 0 && tt(e), ue.call(yt, r) ? yt[r](e, r, i) : Le(e, 'unknown document directive "' + r + '"');
|
|
1931
1931
|
}
|
|
1932
|
-
if (
|
|
1933
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
1932
|
+
if (W(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, W(e, !0, -1)) : a && C(e, "directives end mark is expected"), _e(e, e.lineIndent - 1, Oe, !1, !0), W(e, !0, -1), e.checkLineBreaks && Pi.test(e.input.slice(t, e.position)) && Le(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Me(e)) {
|
|
1933
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, W(e, !0, -1));
|
|
1934
1934
|
return;
|
|
1935
1935
|
}
|
|
1936
1936
|
if (e.position < e.length - 1)
|
|
1937
|
-
|
|
1937
|
+
C(e, "end of the stream or a document separator is expected");
|
|
1938
1938
|
else
|
|
1939
1939
|
return;
|
|
1940
1940
|
}
|
|
1941
1941
|
function pn(e, t) {
|
|
1942
1942
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1943
1943
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1944
|
-
var n = new
|
|
1945
|
-
for (r !== -1 && (n.position = r,
|
|
1944
|
+
var n = new Wi(e, t), r = e.indexOf("\0");
|
|
1945
|
+
for (r !== -1 && (n.position = r, C(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1946
1946
|
n.lineIndent += 1, n.position += 1;
|
|
1947
1947
|
for (; n.position < n.length - 1; )
|
|
1948
|
-
|
|
1948
|
+
ia(n);
|
|
1949
1949
|
return n.documents;
|
|
1950
1950
|
}
|
|
1951
|
-
function
|
|
1951
|
+
function aa(e, t, n) {
|
|
1952
1952
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
1953
1953
|
var r = pn(e, n);
|
|
1954
1954
|
if (typeof t != "function")
|
|
@@ -1956,34 +1956,34 @@ function ia(e, t, n) {
|
|
|
1956
1956
|
for (var i = 0, a = r.length; i < a; i += 1)
|
|
1957
1957
|
t(r[i]);
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function oa(e, t) {
|
|
1960
1960
|
var n = pn(e, t);
|
|
1961
1961
|
if (n.length !== 0) {
|
|
1962
1962
|
if (n.length === 1)
|
|
1963
1963
|
return n[0];
|
|
1964
|
-
throw new
|
|
1964
|
+
throw new X("expected a single document in the stream, but found more");
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
|
-
var
|
|
1968
|
-
loadAll:
|
|
1969
|
-
load:
|
|
1970
|
-
}, mn = Object.prototype.toString, gn = Object.prototype.hasOwnProperty,
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
var
|
|
1967
|
+
var la = aa, sa = oa, hn = {
|
|
1968
|
+
loadAll: la,
|
|
1969
|
+
load: sa
|
|
1970
|
+
}, mn = Object.prototype.toString, gn = Object.prototype.hasOwnProperty, rt = 65279, ca = 9, Ie = 10, ua = 13, da = 32, fa = 33, pa = 34, Ve = 35, ha = 37, ma = 38, ga = 39, ya = 42, yn = 44, va = 45, $e = 58, ba = 61, xa = 62, Ca = 63, _a = 64, vn = 91, bn = 93, ka = 96, xn = 123, Aa = 124, Cn = 125, Q = {};
|
|
1971
|
+
Q[0] = "\\0";
|
|
1972
|
+
Q[7] = "\\a";
|
|
1973
|
+
Q[8] = "\\b";
|
|
1974
|
+
Q[9] = "\\t";
|
|
1975
|
+
Q[10] = "\\n";
|
|
1976
|
+
Q[11] = "\\v";
|
|
1977
|
+
Q[12] = "\\f";
|
|
1978
|
+
Q[13] = "\\r";
|
|
1979
|
+
Q[27] = "\\e";
|
|
1980
|
+
Q[34] = '\\"';
|
|
1981
|
+
Q[92] = "\\\\";
|
|
1982
|
+
Q[133] = "\\N";
|
|
1983
|
+
Q[160] = "\\_";
|
|
1984
|
+
Q[8232] = "\\L";
|
|
1985
|
+
Q[8233] = "\\P";
|
|
1986
|
+
var wa = [
|
|
1987
1987
|
"y",
|
|
1988
1988
|
"Y",
|
|
1989
1989
|
"yes",
|
|
@@ -2000,8 +2000,8 @@ var Aa = [
|
|
|
2000
2000
|
"off",
|
|
2001
2001
|
"Off",
|
|
2002
2002
|
"OFF"
|
|
2003
|
-
],
|
|
2004
|
-
function
|
|
2003
|
+
], Sa = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2004
|
+
function Ia(e, t) {
|
|
2005
2005
|
var n, r, i, a, o, l, s;
|
|
2006
2006
|
if (t === null)
|
|
2007
2007
|
return {};
|
|
@@ -2009,7 +2009,7 @@ function Sa(e, t) {
|
|
|
2009
2009
|
o = r[i], l = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), s = e.compiledTypeMap.fallback[o], s && gn.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[o] = l;
|
|
2010
2010
|
return n;
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function Ea(e) {
|
|
2013
2013
|
var t, n, r;
|
|
2014
2014
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2015
2015
|
n = "x", r = 2;
|
|
@@ -2018,25 +2018,25 @@ function Ia(e) {
|
|
|
2018
2018
|
else if (e <= 4294967295)
|
|
2019
2019
|
n = "U", r = 8;
|
|
2020
2020
|
else
|
|
2021
|
-
throw new
|
|
2022
|
-
return "\\" + n +
|
|
2021
|
+
throw new X("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2022
|
+
return "\\" + n + G.repeat("0", r - t.length) + t;
|
|
2023
2023
|
}
|
|
2024
|
-
var
|
|
2025
|
-
function
|
|
2026
|
-
this.schema = e.schema ||
|
|
2024
|
+
var Ta = 1, Ee = 2;
|
|
2025
|
+
function Fa(e) {
|
|
2026
|
+
this.schema = e.schema || et, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = G.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Ia(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 === '"' ? Ee : Ta, 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;
|
|
2027
2027
|
}
|
|
2028
2028
|
function xt(e, t) {
|
|
2029
|
-
for (var n =
|
|
2029
|
+
for (var n = G.repeat(" ", t), r = 0, i = -1, a = "", o, l = e.length; r < l; )
|
|
2030
2030
|
i = e.indexOf(`
|
|
2031
2031
|
`, r), i === -1 ? (o = e.slice(r), r = l) : (o = e.slice(r, i + 1), r = i + 1), o.length && o !== `
|
|
2032
2032
|
` && (a += n), a += o;
|
|
2033
2033
|
return a;
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function ze(e, t) {
|
|
2036
2036
|
return `
|
|
2037
|
-
` +
|
|
2037
|
+
` + G.repeat(" ", e.indent * t);
|
|
2038
2038
|
}
|
|
2039
|
-
function
|
|
2039
|
+
function Oa(e, t) {
|
|
2040
2040
|
var n, r, i;
|
|
2041
2041
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2042
2042
|
if (i = e.implicitTypes[n], i.resolve(t))
|
|
@@ -2044,13 +2044,13 @@ function Fa(e, t) {
|
|
|
2044
2044
|
return !1;
|
|
2045
2045
|
}
|
|
2046
2046
|
function Ne(e) {
|
|
2047
|
-
return e ===
|
|
2047
|
+
return e === da || e === ca;
|
|
2048
2048
|
}
|
|
2049
|
-
function
|
|
2050
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2049
|
+
function Te(e) {
|
|
2050
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== rt || 65536 <= e && e <= 1114111;
|
|
2051
2051
|
}
|
|
2052
2052
|
function Ct(e) {
|
|
2053
|
-
return
|
|
2053
|
+
return Te(e) && e !== rt && e !== ua && e !== Ie;
|
|
2054
2054
|
}
|
|
2055
2055
|
function _t(e, t, n) {
|
|
2056
2056
|
var r = Ct(e), i = r && !Ne(e);
|
|
@@ -2059,16 +2059,16 @@ function _t(e, t, n) {
|
|
|
2059
2059
|
(n ? (
|
|
2060
2060
|
// c = flow-in
|
|
2061
2061
|
r
|
|
2062
|
-
) : r && e !== yn && e !== vn && e !== bn && e !== xn && e !== Cn) && e !==
|
|
2062
|
+
) : r && e !== yn && e !== vn && e !== bn && e !== xn && e !== Cn) && e !== Ve && !(t === $e && !i) || Ct(t) && !Ne(t) && e === Ve || t === $e && i
|
|
2063
2063
|
);
|
|
2064
2064
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return
|
|
2065
|
+
function La(e) {
|
|
2066
|
+
return Te(e) && e !== rt && !Ne(e) && e !== va && e !== Ca && e !== $e && e !== yn && e !== vn && e !== bn && e !== xn && e !== Cn && e !== Ve && e !== ma && e !== ya && e !== fa && e !== Aa && e !== ba && e !== xa && e !== ga && e !== pa && e !== ha && e !== _a && e !== ka;
|
|
2067
2067
|
}
|
|
2068
2068
|
function $a(e) {
|
|
2069
|
-
return !Ne(e) && e !==
|
|
2069
|
+
return !Ne(e) && e !== $e;
|
|
2070
2070
|
}
|
|
2071
|
-
function
|
|
2071
|
+
function we(e, t) {
|
|
2072
2072
|
var n = e.charCodeAt(t), r;
|
|
2073
2073
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
|
|
2074
2074
|
}
|
|
@@ -2076,39 +2076,39 @@ function _n(e) {
|
|
|
2076
2076
|
var t = /^\n* /;
|
|
2077
2077
|
return t.test(e);
|
|
2078
2078
|
}
|
|
2079
|
-
var kn = 1,
|
|
2080
|
-
function
|
|
2081
|
-
var s, c = 0, d = null, u = !1,
|
|
2079
|
+
var kn = 1, We = 2, An = 3, wn = 4, ve = 5;
|
|
2080
|
+
function Na(e, t, n, r, i, a, o, l) {
|
|
2081
|
+
var s, c = 0, d = null, u = !1, m = !1, f = r !== -1, b = -1, v = La(we(e, 0)) && $a(we(e, e.length - 1));
|
|
2082
2082
|
if (t || o)
|
|
2083
2083
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2084
|
-
if (c =
|
|
2085
|
-
return
|
|
2086
|
-
|
|
2084
|
+
if (c = we(e, s), !Te(c))
|
|
2085
|
+
return ve;
|
|
2086
|
+
v = v && _t(c, d, l), d = c;
|
|
2087
2087
|
}
|
|
2088
2088
|
else {
|
|
2089
2089
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2090
|
-
if (c =
|
|
2091
|
-
u = !0, f && (
|
|
2092
|
-
s -
|
|
2093
|
-
else if (!
|
|
2094
|
-
return
|
|
2095
|
-
|
|
2090
|
+
if (c = we(e, s), c === Ie)
|
|
2091
|
+
u = !0, f && (m = m || // Foldable line = too long, and not more-indented.
|
|
2092
|
+
s - b - 1 > r && e[b + 1] !== " ", b = s);
|
|
2093
|
+
else if (!Te(c))
|
|
2094
|
+
return ve;
|
|
2095
|
+
v = v && _t(c, d, l), d = c;
|
|
2096
2096
|
}
|
|
2097
|
-
|
|
2097
|
+
m = m || f && s - b - 1 > r && e[b + 1] !== " ";
|
|
2098
2098
|
}
|
|
2099
|
-
return !u && !
|
|
2099
|
+
return !u && !m ? v && !o && !i(e) ? kn : a === Ee ? ve : We : n > 9 && _n(e) ? ve : o ? a === Ee ? ve : We : m ? wn : An;
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function Ba(e, t, n, r, i) {
|
|
2102
2102
|
e.dump = function() {
|
|
2103
2103
|
if (t.length === 0)
|
|
2104
|
-
return e.quotingType ===
|
|
2105
|
-
if (!e.noCompatMode && (
|
|
2106
|
-
return e.quotingType ===
|
|
2104
|
+
return e.quotingType === Ee ? '""' : "''";
|
|
2105
|
+
if (!e.noCompatMode && (wa.indexOf(t) !== -1 || Sa.test(t)))
|
|
2106
|
+
return e.quotingType === Ee ? '"' + t + '"' : "'" + t + "'";
|
|
2107
2107
|
var a = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2108
2108
|
function s(c) {
|
|
2109
|
-
return
|
|
2109
|
+
return Oa(e, c);
|
|
2110
2110
|
}
|
|
2111
|
-
switch (
|
|
2111
|
+
switch (Na(
|
|
2112
2112
|
t,
|
|
2113
2113
|
l,
|
|
2114
2114
|
e.indent,
|
|
@@ -2120,16 +2120,16 @@ function Na(e, t, n, r, i) {
|
|
|
2120
2120
|
)) {
|
|
2121
2121
|
case kn:
|
|
2122
2122
|
return t;
|
|
2123
|
-
case
|
|
2123
|
+
case We:
|
|
2124
2124
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2125
2125
|
case An:
|
|
2126
2126
|
return "|" + kt(t, e.indent) + At(xt(t, a));
|
|
2127
2127
|
case wn:
|
|
2128
|
-
return ">" + kt(t, e.indent) + At(xt(
|
|
2129
|
-
case
|
|
2130
|
-
return '"' +
|
|
2128
|
+
return ">" + kt(t, e.indent) + At(xt(Ra(t, o), a));
|
|
2129
|
+
case ve:
|
|
2130
|
+
return '"' + Ka(t) + '"';
|
|
2131
2131
|
default:
|
|
2132
|
-
throw new
|
|
2132
|
+
throw new X("impossible error: invalid scalar style");
|
|
2133
2133
|
}
|
|
2134
2134
|
}();
|
|
2135
2135
|
}
|
|
@@ -2145,7 +2145,7 @@ function At(e) {
|
|
|
2145
2145
|
return e[e.length - 1] === `
|
|
2146
2146
|
` ? e.slice(0, -1) : e;
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2148
|
+
function Ra(e, t) {
|
|
2149
2149
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2150
2150
|
var c = e.indexOf(`
|
|
2151
2151
|
`);
|
|
@@ -2168,9 +2168,9 @@ function wt(e, t) {
|
|
|
2168
2168
|
`, e.length - i > t && o > i ? s += e.slice(i, o) + `
|
|
2169
2169
|
` + e.slice(o + 1) : s += e.slice(i), s.slice(1);
|
|
2170
2170
|
}
|
|
2171
|
-
function
|
|
2171
|
+
function Ka(e) {
|
|
2172
2172
|
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2173
|
-
n =
|
|
2173
|
+
n = we(e, i), r = Q[n], !r && Te(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Ea(n);
|
|
2174
2174
|
return t;
|
|
2175
2175
|
}
|
|
2176
2176
|
function Ma(e, t, n) {
|
|
@@ -2182,25 +2182,25 @@ function Ma(e, t, n) {
|
|
|
2182
2182
|
function St(e, t, n, r) {
|
|
2183
2183
|
var i = "", a = e.tag, o, l, s;
|
|
2184
2184
|
for (o = 0, l = n.length; o < l; o += 1)
|
|
2185
|
-
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (le(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && le(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i +=
|
|
2185
|
+
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (le(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && le(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += ze(e, t)), e.dump && Ie === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2186
2186
|
e.tag = a, e.dump = i || "[]";
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2188
|
+
function Da(e, t, n) {
|
|
2189
2189
|
var r = "", i = e.tag, a = Object.keys(n), o, l, s, c, d;
|
|
2190
2190
|
for (o = 0, l = a.length; o < l; o += 1)
|
|
2191
2191
|
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = a[o], c = n[s], e.replacer && (c = e.replacer.call(n, s, c)), le(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), le(e, t, c, !1, !1) && (d += e.dump, r += d));
|
|
2192
2192
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2195
|
-
var i = "", a = e.tag, o = Object.keys(n), l, s, c, d, u,
|
|
2194
|
+
function ja(e, t, n, r) {
|
|
2195
|
+
var i = "", a = e.tag, o = Object.keys(n), l, s, c, d, u, m;
|
|
2196
2196
|
if (e.sortKeys === !0)
|
|
2197
2197
|
o.sort();
|
|
2198
2198
|
else if (typeof e.sortKeys == "function")
|
|
2199
2199
|
o.sort(e.sortKeys);
|
|
2200
2200
|
else if (e.sortKeys)
|
|
2201
|
-
throw new
|
|
2201
|
+
throw new X("sortKeys must be a boolean or a function");
|
|
2202
2202
|
for (l = 0, s = o.length; l < s; l += 1)
|
|
2203
|
-
|
|
2203
|
+
m = "", (!r || i !== "") && (m += ze(e, t)), c = o[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), le(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ie === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, u && (m += ze(e, t)), le(e, t + 1, d, !0, u) && (e.dump && Ie === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, i += m));
|
|
2204
2204
|
e.tag = a, e.dump = i || "{}";
|
|
2205
2205
|
}
|
|
2206
2206
|
function It(e, t, n) {
|
|
@@ -2213,7 +2213,7 @@ function It(e, t, n) {
|
|
|
2213
2213
|
else if (gn.call(l.represent, s))
|
|
2214
2214
|
r = l.represent[s](t, s);
|
|
2215
2215
|
else
|
|
2216
|
-
throw new
|
|
2216
|
+
throw new X("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2217
2217
|
e.dump = r;
|
|
2218
2218
|
}
|
|
2219
2219
|
return !0;
|
|
@@ -2224,22 +2224,22 @@ function le(e, t, n, r, i, a, o) {
|
|
|
2224
2224
|
e.tag = null, e.dump = n, It(e, n, !1) || It(e, n, !0);
|
|
2225
2225
|
var l = mn.call(e.dump), s = r, c;
|
|
2226
2226
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2227
|
-
var d = l === "[object Object]" || l === "[object Array]", u,
|
|
2228
|
-
if (d && (u = e.duplicates.indexOf(n),
|
|
2227
|
+
var d = l === "[object Object]" || l === "[object Array]", u, m;
|
|
2228
|
+
if (d && (u = e.duplicates.indexOf(n), m = u !== -1), (e.tag !== null && e.tag !== "?" || m || e.indent !== 2 && t > 0) && (i = !1), m && e.usedDuplicates[u])
|
|
2229
2229
|
e.dump = "*ref_" + u;
|
|
2230
2230
|
else {
|
|
2231
|
-
if (d &&
|
|
2232
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2231
|
+
if (d && m && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2232
|
+
r && Object.keys(e.dump).length !== 0 ? (ja(e, t, e.dump, i), m && (e.dump = "&ref_" + u + e.dump)) : (Da(e, t, e.dump), m && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2233
2233
|
else if (l === "[object Array]")
|
|
2234
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? St(e, t - 1, e.dump, i) : St(e, t, e.dump, i),
|
|
2234
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? St(e, t - 1, e.dump, i) : St(e, t, e.dump, i), m && (e.dump = "&ref_" + u + e.dump)) : (Ma(e, t, e.dump), m && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2235
2235
|
else if (l === "[object String]")
|
|
2236
|
-
e.tag !== "?" &&
|
|
2236
|
+
e.tag !== "?" && Ba(e, e.dump, t, a, s);
|
|
2237
2237
|
else {
|
|
2238
2238
|
if (l === "[object Undefined]")
|
|
2239
2239
|
return !1;
|
|
2240
2240
|
if (e.skipInvalid)
|
|
2241
2241
|
return !1;
|
|
2242
|
-
throw new
|
|
2242
|
+
throw new X("unacceptable kind of an object to dump " + l);
|
|
2243
2243
|
}
|
|
2244
2244
|
e.tag !== null && e.tag !== "?" && (c = encodeURI(
|
|
2245
2245
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2247,41 +2247,41 @@ function le(e, t, n, r, i, a, o) {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
return !0;
|
|
2249
2249
|
}
|
|
2250
|
-
function
|
|
2250
|
+
function Ua(e, t) {
|
|
2251
2251
|
var n = [], r = [], i, a;
|
|
2252
|
-
for (
|
|
2252
|
+
for (Je(e, n, r), i = 0, a = r.length; i < a; i += 1)
|
|
2253
2253
|
t.duplicates.push(n[r[i]]);
|
|
2254
2254
|
t.usedDuplicates = new Array(a);
|
|
2255
2255
|
}
|
|
2256
|
-
function
|
|
2256
|
+
function Je(e, t, n) {
|
|
2257
2257
|
var r, i, a;
|
|
2258
2258
|
if (e !== null && typeof e == "object")
|
|
2259
2259
|
if (i = t.indexOf(e), i !== -1)
|
|
2260
2260
|
n.indexOf(i) === -1 && n.push(i);
|
|
2261
2261
|
else if (t.push(e), Array.isArray(e))
|
|
2262
2262
|
for (i = 0, a = e.length; i < a; i += 1)
|
|
2263
|
-
|
|
2263
|
+
Je(e[i], t, n);
|
|
2264
2264
|
else
|
|
2265
2265
|
for (r = Object.keys(e), i = 0, a = r.length; i < a; i += 1)
|
|
2266
|
-
|
|
2266
|
+
Je(e[r[i]], t, n);
|
|
2267
2267
|
}
|
|
2268
|
-
function
|
|
2268
|
+
function Pa(e, t) {
|
|
2269
2269
|
t = t || {};
|
|
2270
|
-
var n = new
|
|
2271
|
-
n.noRefs ||
|
|
2270
|
+
var n = new Fa(t);
|
|
2271
|
+
n.noRefs || Ua(e, n);
|
|
2272
2272
|
var r = e;
|
|
2273
2273
|
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), le(n, 0, r, !0, !0) ? n.dump + `
|
|
2274
2274
|
` : "";
|
|
2275
2275
|
}
|
|
2276
|
-
var
|
|
2277
|
-
dump:
|
|
2276
|
+
var qa = Pa, Ha = {
|
|
2277
|
+
dump: qa
|
|
2278
2278
|
};
|
|
2279
|
-
function
|
|
2279
|
+
function it(e, t) {
|
|
2280
2280
|
return function() {
|
|
2281
2281
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2282
2282
|
};
|
|
2283
2283
|
}
|
|
2284
|
-
var
|
|
2284
|
+
var Ya = Z, Va = jt, za = Ht, Wa = Jt, Ja = Gt, Ga = et, Za = hn.load, Qa = hn.loadAll, Xa = Ha.dump, eo = X, to = {
|
|
2285
2285
|
binary: tn,
|
|
2286
2286
|
float: Wt,
|
|
2287
2287
|
map: qt,
|
|
@@ -2295,23 +2295,23 @@ var Ha = Q, Ya = jt, Va = Ht, za = Jt, Wa = Gt, Ja = Xe, Ga = hn.load, Za = hn.l
|
|
|
2295
2295
|
omap: nn,
|
|
2296
2296
|
seq: Pt,
|
|
2297
2297
|
str: Ut
|
|
2298
|
-
},
|
|
2299
|
-
Type:
|
|
2300
|
-
Schema:
|
|
2301
|
-
FAILSAFE_SCHEMA:
|
|
2302
|
-
JSON_SCHEMA:
|
|
2303
|
-
CORE_SCHEMA:
|
|
2304
|
-
DEFAULT_SCHEMA:
|
|
2305
|
-
load:
|
|
2306
|
-
loadAll:
|
|
2307
|
-
dump:
|
|
2308
|
-
YAMLException:
|
|
2309
|
-
types:
|
|
2310
|
-
safeLoad:
|
|
2311
|
-
safeLoadAll:
|
|
2312
|
-
safeDump:
|
|
2298
|
+
}, no = it("safeLoad", "load"), ro = it("safeLoadAll", "loadAll"), io = it("safeDump", "dump"), ao = {
|
|
2299
|
+
Type: Ya,
|
|
2300
|
+
Schema: Va,
|
|
2301
|
+
FAILSAFE_SCHEMA: za,
|
|
2302
|
+
JSON_SCHEMA: Wa,
|
|
2303
|
+
CORE_SCHEMA: Ja,
|
|
2304
|
+
DEFAULT_SCHEMA: Ga,
|
|
2305
|
+
load: Za,
|
|
2306
|
+
loadAll: Qa,
|
|
2307
|
+
dump: Xa,
|
|
2308
|
+
YAMLException: eo,
|
|
2309
|
+
types: to,
|
|
2310
|
+
safeLoad: no,
|
|
2311
|
+
safeLoadAll: ro,
|
|
2312
|
+
safeDump: io
|
|
2313
2313
|
};
|
|
2314
|
-
const
|
|
2314
|
+
const oo = { class: "yaml-config" }, Sn = /* @__PURE__ */ Y({
|
|
2315
2315
|
__name: "YamlCodeBlock",
|
|
2316
2316
|
props: {
|
|
2317
2317
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2323,28 +2323,28 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2323
2323
|
setup(e) {
|
|
2324
2324
|
const t = e, n = A(() => {
|
|
2325
2325
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, i]) => i && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2326
|
-
return Object.keys(r).length === 0 && r.constructor === Object ? "" :
|
|
2326
|
+
return Object.keys(r).length === 0 && r.constructor === Object ? "" : ao.dump(r).trim();
|
|
2327
2327
|
});
|
|
2328
2328
|
return (r, i) => {
|
|
2329
|
-
const a =
|
|
2330
|
-
return h(), S("div",
|
|
2331
|
-
t.yamlRecord ? (h(),
|
|
2329
|
+
const a = N("KCodeBlock");
|
|
2330
|
+
return h(), S("div", oo, [
|
|
2331
|
+
t.yamlRecord ? (h(), K(a, {
|
|
2332
2332
|
key: 0,
|
|
2333
2333
|
id: "yaml-codeblock",
|
|
2334
2334
|
code: n.value,
|
|
2335
2335
|
language: "yaml",
|
|
2336
2336
|
theme: "dark"
|
|
2337
|
-
}, null, 8, ["code"])) :
|
|
2337
|
+
}, null, 8, ["code"])) : D("", !0)
|
|
2338
2338
|
]);
|
|
2339
2339
|
};
|
|
2340
2340
|
}
|
|
2341
|
-
}),
|
|
2341
|
+
}), lo = {
|
|
2342
2342
|
key: 0,
|
|
2343
2343
|
class: "config-card-display-form"
|
|
2344
|
-
},
|
|
2344
|
+
}, so = ["data-testid"], co = {
|
|
2345
2345
|
key: 0,
|
|
2346
2346
|
class: "config-card-prop-section-title"
|
|
2347
|
-
},
|
|
2347
|
+
}, uo = /* @__PURE__ */ Y({
|
|
2348
2348
|
__name: "ConfigCardDisplay",
|
|
2349
2349
|
props: {
|
|
2350
2350
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2383,29 +2383,29 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2383
2383
|
}
|
|
2384
2384
|
},
|
|
2385
2385
|
setup(e) {
|
|
2386
|
-
const t = e, n =
|
|
2386
|
+
const t = e, n = Ge(), { i18n: { t: r } } = z.useI18n(), i = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), a = A(() => {
|
|
2387
2387
|
if (!t.record)
|
|
2388
2388
|
return t.record;
|
|
2389
2389
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
2390
2390
|
return delete o.created_at, delete o.updated_at, o;
|
|
2391
2391
|
});
|
|
2392
2392
|
return (o, l) => (h(), S(oe, null, [
|
|
2393
|
-
e.format === "structured" ? (h(), S("div",
|
|
2393
|
+
e.format === "structured" ? (h(), S("div", lo, [
|
|
2394
2394
|
(h(!0), S(oe, null, ie(e.propListTypes, (s) => (h(), S("div", {
|
|
2395
2395
|
key: `config-card-details-${s}-props`,
|
|
2396
|
-
class:
|
|
2396
|
+
class: ce(`config-card-details-${s}-props`),
|
|
2397
2397
|
"data-testid": `config-card-details-${s}-props`
|
|
2398
2398
|
}, [
|
|
2399
|
-
s !== "basic" ? (h(), S("div",
|
|
2400
|
-
(h(!0), S(oe, null, ie(e.propertyCollections[s], (c) => (h(),
|
|
2399
|
+
s !== "basic" ? (h(), S("div", co, L(s === "advanced" ? T(r)("baseConfigCard.sections.advanced") : T(r)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
2400
|
+
(h(!0), S(oe, null, ie(e.propertyCollections[s], (c) => (h(), K(Rt, {
|
|
2401
2401
|
key: c.key,
|
|
2402
2402
|
item: c
|
|
2403
|
-
},
|
|
2403
|
+
}, Ce({
|
|
2404
2404
|
label: x(() => [
|
|
2405
|
-
|
|
2405
|
+
H(o.$slots, `${c.key}-label`, { row: c }, void 0, !0)
|
|
2406
2406
|
]),
|
|
2407
2407
|
[c.key]: x(({ rowValue: d }) => [
|
|
2408
|
-
|
|
2408
|
+
H(o.$slots, c.key, {
|
|
2409
2409
|
row: c,
|
|
2410
2410
|
rowValue: d
|
|
2411
2411
|
}, void 0, !0)
|
|
@@ -2415,38 +2415,38 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2415
2415
|
i(c) ? {
|
|
2416
2416
|
name: "label-tooltip",
|
|
2417
2417
|
fn: x(() => [
|
|
2418
|
-
|
|
2418
|
+
H(o.$slots, `${c.key}-label-tooltip`, { row: c }, void 0, !0)
|
|
2419
2419
|
]),
|
|
2420
2420
|
key: "0"
|
|
2421
2421
|
} : void 0
|
|
2422
2422
|
]), 1032, ["item"]))), 128))
|
|
2423
|
-
], 10,
|
|
2424
|
-
])) :
|
|
2425
|
-
e.format === "json" && t.record ? (h(),
|
|
2423
|
+
], 10, so))), 128))
|
|
2424
|
+
])) : D("", !0),
|
|
2425
|
+
e.format === "json" && t.record ? (h(), K(Kt, {
|
|
2426
2426
|
key: 1,
|
|
2427
2427
|
config: t.config,
|
|
2428
2428
|
"fetcher-url": t.fetcherUrl,
|
|
2429
2429
|
"json-record": a.value,
|
|
2430
2430
|
"request-method": "get"
|
|
2431
|
-
}, null, 8, ["config", "fetcher-url", "json-record"])) :
|
|
2432
|
-
e.format === "yaml" && t.record ? (h(),
|
|
2431
|
+
}, null, 8, ["config", "fetcher-url", "json-record"])) : D("", !0),
|
|
2432
|
+
e.format === "yaml" && t.record ? (h(), K(Sn, {
|
|
2433
2433
|
key: 2,
|
|
2434
2434
|
"yaml-record": a.value
|
|
2435
|
-
}, null, 8, ["yaml-record"])) :
|
|
2435
|
+
}, null, 8, ["yaml-record"])) : D("", !0)
|
|
2436
2436
|
], 64));
|
|
2437
2437
|
}
|
|
2438
|
-
}),
|
|
2438
|
+
}), fo = /* @__PURE__ */ re(uo, [["__scopeId", "data-v-147a2f70"]]), de = "24px", De = (e, t) => {
|
|
2439
2439
|
const n = e.__vccOpts || e;
|
|
2440
2440
|
for (const [r, i] of t)
|
|
2441
2441
|
n[r] = i;
|
|
2442
2442
|
return n;
|
|
2443
|
-
},
|
|
2443
|
+
}, po = (e) => (Re("data-v-40a7f387"), e = e(), Ke(), e), ho = ["aria-hidden"], mo = {
|
|
2444
2444
|
key: 0,
|
|
2445
2445
|
"data-testid": "kui-icon-svg-title"
|
|
2446
|
-
},
|
|
2446
|
+
}, go = /* @__PURE__ */ po(() => /* @__PURE__ */ $("path", {
|
|
2447
2447
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2448
2448
|
fill: "currentColor"
|
|
2449
|
-
}, null, -1)),
|
|
2449
|
+
}, null, -1)), yo = /* @__PURE__ */ Y({
|
|
2450
2450
|
__name: "BookIcon",
|
|
2451
2451
|
props: {
|
|
2452
2452
|
/** The accessibility text provided to screen readers */
|
|
@@ -2477,7 +2477,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2477
2477
|
size: {
|
|
2478
2478
|
type: [Number, String],
|
|
2479
2479
|
required: !1,
|
|
2480
|
-
default:
|
|
2480
|
+
default: de,
|
|
2481
2481
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2482
2482
|
validator: (e) => {
|
|
2483
2483
|
if (typeof e == "number" && e > 0)
|
|
@@ -2506,7 +2506,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2506
2506
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2507
2507
|
return `${a}px`;
|
|
2508
2508
|
}
|
|
2509
|
-
return
|
|
2509
|
+
return de;
|
|
2510
2510
|
}), r = A(() => ({
|
|
2511
2511
|
boxSizing: "border-box",
|
|
2512
2512
|
color: t.color,
|
|
@@ -2515,11 +2515,11 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2515
2515
|
lineHeight: "0",
|
|
2516
2516
|
width: n.value
|
|
2517
2517
|
}));
|
|
2518
|
-
return (i, a) => (h(),
|
|
2518
|
+
return (i, a) => (h(), K(Ae(e.as), {
|
|
2519
2519
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2520
2520
|
class: "kui-icon book-icon",
|
|
2521
2521
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2522
|
-
style:
|
|
2522
|
+
style: Be(r.value)
|
|
2523
2523
|
}, {
|
|
2524
2524
|
default: x(() => [
|
|
2525
2525
|
(h(), S("svg", {
|
|
@@ -2532,20 +2532,119 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2532
2532
|
width: "100%",
|
|
2533
2533
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2534
2534
|
}, [
|
|
2535
|
-
e.title ? (h(), S("title",
|
|
2536
|
-
|
|
2537
|
-
], 8,
|
|
2535
|
+
e.title ? (h(), S("title", mo, L(e.title), 1)) : D("", !0),
|
|
2536
|
+
go
|
|
2537
|
+
], 8, ho))
|
|
2538
2538
|
]),
|
|
2539
2539
|
_: 1
|
|
2540
2540
|
}, 8, ["aria-hidden", "style"]));
|
|
2541
2541
|
}
|
|
2542
|
-
}),
|
|
2542
|
+
}), vo = /* @__PURE__ */ De(yo, [["__scopeId", "data-v-40a7f387"]]), bo = (e) => (Re("data-v-98c34919"), e = e(), Ke(), e), xo = ["aria-hidden"], Co = {
|
|
2543
2543
|
key: 0,
|
|
2544
2544
|
"data-testid": "kui-icon-svg-title"
|
|
2545
|
-
},
|
|
2545
|
+
}, _o = /* @__PURE__ */ bo(() => /* @__PURE__ */ $("path", {
|
|
2546
|
+
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2547
|
+
fill: "currentColor"
|
|
2548
|
+
}, null, -1)), ko = /* @__PURE__ */ Y({
|
|
2549
|
+
__name: "ChevronDownIcon",
|
|
2550
|
+
props: {
|
|
2551
|
+
/** The accessibility text provided to screen readers */
|
|
2552
|
+
title: {
|
|
2553
|
+
type: String,
|
|
2554
|
+
required: !1,
|
|
2555
|
+
default: ""
|
|
2556
|
+
},
|
|
2557
|
+
/** The icon color. Defaults to `currentColor` which inherits text color from the parent element */
|
|
2558
|
+
color: {
|
|
2559
|
+
type: String,
|
|
2560
|
+
required: !1,
|
|
2561
|
+
default: "currentColor"
|
|
2562
|
+
},
|
|
2563
|
+
/** The CSS display property for the icon. Defaults to `block` */
|
|
2564
|
+
display: {
|
|
2565
|
+
type: String,
|
|
2566
|
+
required: !1,
|
|
2567
|
+
default: "block"
|
|
2568
|
+
},
|
|
2569
|
+
/** Whether the icon is just eye-candy or is meaningful to the page (should screen-readers ignore the icon?) */
|
|
2570
|
+
decorative: {
|
|
2571
|
+
type: Boolean,
|
|
2572
|
+
required: !1,
|
|
2573
|
+
default: !1
|
|
2574
|
+
},
|
|
2575
|
+
/** The icon size */
|
|
2576
|
+
size: {
|
|
2577
|
+
type: [Number, String],
|
|
2578
|
+
required: !1,
|
|
2579
|
+
default: de,
|
|
2580
|
+
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2581
|
+
validator: (e) => {
|
|
2582
|
+
if (typeof e == "number" && e > 0)
|
|
2583
|
+
return !0;
|
|
2584
|
+
if (typeof e == "string") {
|
|
2585
|
+
const t = String(e).replace(/px/gi, ""), n = Number(t);
|
|
2586
|
+
if (n && !isNaN(n) && Number.isInteger(n) && n > 0)
|
|
2587
|
+
return !0;
|
|
2588
|
+
}
|
|
2589
|
+
return !1;
|
|
2590
|
+
}
|
|
2591
|
+
},
|
|
2592
|
+
/** The HTML tag to utilize for the icon's wrapper element. Defaults to `span` */
|
|
2593
|
+
as: {
|
|
2594
|
+
type: String,
|
|
2595
|
+
required: !1,
|
|
2596
|
+
default: "span"
|
|
2597
|
+
}
|
|
2598
|
+
},
|
|
2599
|
+
setup(e) {
|
|
2600
|
+
const t = e, n = A(() => {
|
|
2601
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
2602
|
+
return `${t.size}px`;
|
|
2603
|
+
if (typeof t.size == "string") {
|
|
2604
|
+
const i = String(t.size).replace(/px/gi, ""), a = Number(i);
|
|
2605
|
+
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2606
|
+
return `${a}px`;
|
|
2607
|
+
}
|
|
2608
|
+
return de;
|
|
2609
|
+
}), r = A(() => ({
|
|
2610
|
+
boxSizing: "border-box",
|
|
2611
|
+
color: t.color,
|
|
2612
|
+
display: t.display,
|
|
2613
|
+
height: n.value,
|
|
2614
|
+
lineHeight: "0",
|
|
2615
|
+
width: n.value
|
|
2616
|
+
}));
|
|
2617
|
+
return (i, a) => (h(), K(Ae(e.as), {
|
|
2618
|
+
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2619
|
+
class: "kui-icon chevron-down-icon",
|
|
2620
|
+
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
2621
|
+
style: Be(r.value)
|
|
2622
|
+
}, {
|
|
2623
|
+
default: x(() => [
|
|
2624
|
+
(h(), S("svg", {
|
|
2625
|
+
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2626
|
+
"data-testid": "kui-icon-svg-chevron-down-icon",
|
|
2627
|
+
fill: "none",
|
|
2628
|
+
height: "100%",
|
|
2629
|
+
role: "img",
|
|
2630
|
+
viewBox: "0 0 24 24",
|
|
2631
|
+
width: "100%",
|
|
2632
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2633
|
+
}, [
|
|
2634
|
+
e.title ? (h(), S("title", Co, L(e.title), 1)) : D("", !0),
|
|
2635
|
+
_o
|
|
2636
|
+
], 8, xo))
|
|
2637
|
+
]),
|
|
2638
|
+
_: 1
|
|
2639
|
+
}, 8, ["aria-hidden", "style"]));
|
|
2640
|
+
}
|
|
2641
|
+
}), Ao = /* @__PURE__ */ De(ko, [["__scopeId", "data-v-98c34919"]]), wo = (e) => (Re("data-v-19f4cbbe"), e = e(), Ke(), e), So = ["aria-hidden"], Io = {
|
|
2642
|
+
key: 0,
|
|
2643
|
+
"data-testid": "kui-icon-svg-title"
|
|
2644
|
+
}, Eo = /* @__PURE__ */ wo(() => /* @__PURE__ */ $("path", {
|
|
2546
2645
|
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",
|
|
2547
2646
|
fill: "currentColor"
|
|
2548
|
-
}, null, -1)),
|
|
2647
|
+
}, null, -1)), To = /* @__PURE__ */ Y({
|
|
2549
2648
|
__name: "CloseIcon",
|
|
2550
2649
|
props: {
|
|
2551
2650
|
/** The accessibility text provided to screen readers */
|
|
@@ -2576,7 +2675,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2576
2675
|
size: {
|
|
2577
2676
|
type: [Number, String],
|
|
2578
2677
|
required: !1,
|
|
2579
|
-
default:
|
|
2678
|
+
default: de,
|
|
2580
2679
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2581
2680
|
validator: (e) => {
|
|
2582
2681
|
if (typeof e == "number" && e > 0)
|
|
@@ -2605,7 +2704,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2605
2704
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2606
2705
|
return `${a}px`;
|
|
2607
2706
|
}
|
|
2608
|
-
return
|
|
2707
|
+
return de;
|
|
2609
2708
|
}), r = A(() => ({
|
|
2610
2709
|
boxSizing: "border-box",
|
|
2611
2710
|
color: t.color,
|
|
@@ -2614,11 +2713,11 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2614
2713
|
lineHeight: "0",
|
|
2615
2714
|
width: n.value
|
|
2616
2715
|
}));
|
|
2617
|
-
return (i, a) => (h(),
|
|
2716
|
+
return (i, a) => (h(), K(Ae(e.as), {
|
|
2618
2717
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2619
2718
|
class: "kui-icon close-icon",
|
|
2620
2719
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2621
|
-
style:
|
|
2720
|
+
style: Be(r.value)
|
|
2622
2721
|
}, {
|
|
2623
2722
|
default: x(() => [
|
|
2624
2723
|
(h(), S("svg", {
|
|
@@ -2631,20 +2730,20 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2631
2730
|
width: "100%",
|
|
2632
2731
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2633
2732
|
}, [
|
|
2634
|
-
e.title ? (h(), S("title",
|
|
2635
|
-
|
|
2636
|
-
], 8,
|
|
2733
|
+
e.title ? (h(), S("title", Io, L(e.title), 1)) : D("", !0),
|
|
2734
|
+
Eo
|
|
2735
|
+
], 8, So))
|
|
2637
2736
|
]),
|
|
2638
2737
|
_: 1
|
|
2639
2738
|
}, 8, ["aria-hidden", "style"]));
|
|
2640
2739
|
}
|
|
2641
|
-
}),
|
|
2740
|
+
}), Fo = /* @__PURE__ */ De(To, [["__scopeId", "data-v-19f4cbbe"]]), Oo = (e) => (Re("data-v-13f41aa3"), e = e(), Ke(), e), Lo = ["aria-hidden"], $o = {
|
|
2642
2741
|
key: 0,
|
|
2643
2742
|
"data-testid": "kui-icon-svg-title"
|
|
2644
|
-
},
|
|
2743
|
+
}, No = /* @__PURE__ */ Oo(() => /* @__PURE__ */ $("path", {
|
|
2645
2744
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
2646
2745
|
fill: "currentColor"
|
|
2647
|
-
}, null, -1)),
|
|
2746
|
+
}, null, -1)), Bo = /* @__PURE__ */ Y({
|
|
2648
2747
|
__name: "CopyIcon",
|
|
2649
2748
|
props: {
|
|
2650
2749
|
/** The accessibility text provided to screen readers */
|
|
@@ -2675,7 +2774,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2675
2774
|
size: {
|
|
2676
2775
|
type: [Number, String],
|
|
2677
2776
|
required: !1,
|
|
2678
|
-
default:
|
|
2777
|
+
default: de,
|
|
2679
2778
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2680
2779
|
validator: (e) => {
|
|
2681
2780
|
if (typeof e == "number" && e > 0)
|
|
@@ -2704,7 +2803,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2704
2803
|
if (a && !isNaN(a) && Number.isInteger(a) && a > 0)
|
|
2705
2804
|
return `${a}px`;
|
|
2706
2805
|
}
|
|
2707
|
-
return
|
|
2806
|
+
return de;
|
|
2708
2807
|
}), r = A(() => ({
|
|
2709
2808
|
boxSizing: "border-box",
|
|
2710
2809
|
color: t.color,
|
|
@@ -2713,11 +2812,11 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2713
2812
|
lineHeight: "0",
|
|
2714
2813
|
width: n.value
|
|
2715
2814
|
}));
|
|
2716
|
-
return (i, a) => (h(),
|
|
2815
|
+
return (i, a) => (h(), K(Ae(e.as), {
|
|
2717
2816
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2718
2817
|
class: "kui-icon copy-icon",
|
|
2719
2818
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
2720
|
-
style:
|
|
2819
|
+
style: Be(r.value)
|
|
2721
2820
|
}, {
|
|
2722
2821
|
default: x(() => [
|
|
2723
2822
|
(h(), S("svg", {
|
|
@@ -2730,14 +2829,14 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2730
2829
|
width: "100%",
|
|
2731
2830
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2732
2831
|
}, [
|
|
2733
|
-
e.title ? (h(), S("title",
|
|
2734
|
-
|
|
2735
|
-
], 8,
|
|
2832
|
+
e.title ? (h(), S("title", $o, L(e.title), 1)) : D("", !0),
|
|
2833
|
+
No
|
|
2834
|
+
], 8, Lo))
|
|
2736
2835
|
]),
|
|
2737
2836
|
_: 1
|
|
2738
2837
|
}, 8, ["aria-hidden", "style"]));
|
|
2739
2838
|
}
|
|
2740
|
-
}),
|
|
2839
|
+
}), Ro = /* @__PURE__ */ De(Bo, [["__scopeId", "data-v-13f41aa3"]]), Ko = { "data-testid": "config-card-title" }, Mo = { class: "config-card-actions" }, Do = ["href"], jo = { class: "config-card-details-section" }, Uo = /* @__PURE__ */ Y({
|
|
2741
2840
|
__name: "EntityBaseConfigCard",
|
|
2742
2841
|
props: {
|
|
2743
2842
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2828,11 +2927,11 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2828
2927
|
label: "YAML",
|
|
2829
2928
|
value: "yaml"
|
|
2830
2929
|
}
|
|
2831
|
-
], c = R("structured"), d = (
|
|
2832
|
-
c.value =
|
|
2930
|
+
], c = R("structured"), d = (g) => {
|
|
2931
|
+
c.value = g == null ? void 0 : g.value;
|
|
2833
2932
|
}, u = {
|
|
2834
2933
|
id: {
|
|
2835
|
-
type:
|
|
2934
|
+
type: q.ID,
|
|
2836
2935
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
2837
2936
|
order: 0,
|
|
2838
2937
|
section: ne.Basic
|
|
@@ -2842,185 +2941,185 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
2842
2941
|
section: ne.Basic
|
|
2843
2942
|
},
|
|
2844
2943
|
enabled: {
|
|
2845
|
-
type:
|
|
2944
|
+
type: q.BadgeStatus,
|
|
2846
2945
|
order: 2,
|
|
2847
2946
|
section: ne.Basic
|
|
2848
2947
|
},
|
|
2849
2948
|
updated_at: {
|
|
2850
|
-
type:
|
|
2949
|
+
type: q.Date,
|
|
2851
2950
|
label: i("baseConfigCard.commonFields.updated_at_label"),
|
|
2852
2951
|
order: 3,
|
|
2853
2952
|
section: ne.Basic
|
|
2854
2953
|
},
|
|
2855
2954
|
created_at: {
|
|
2856
|
-
type:
|
|
2955
|
+
type: q.Date,
|
|
2857
2956
|
label: i("baseConfigCard.commonFields.created_at_label"),
|
|
2858
2957
|
order: 4,
|
|
2859
2958
|
section: ne.Basic
|
|
2860
2959
|
},
|
|
2861
2960
|
tags: {
|
|
2862
|
-
type:
|
|
2961
|
+
type: q.BadgeTag,
|
|
2863
2962
|
order: -1,
|
|
2864
2963
|
// the last property displayed
|
|
2865
2964
|
section: ne.Basic
|
|
2866
2965
|
}
|
|
2867
|
-
},
|
|
2868
|
-
var F,
|
|
2869
|
-
if (!
|
|
2966
|
+
}, m = R(!1), f = R(!1), b = R(""), v = R({}), k = A(() => {
|
|
2967
|
+
var F, _, j;
|
|
2968
|
+
if (!v.value)
|
|
2870
2969
|
return [];
|
|
2871
|
-
const
|
|
2872
|
-
for (const
|
|
2873
|
-
const
|
|
2874
|
-
let
|
|
2875
|
-
(
|
|
2970
|
+
const g = [], O = Object.keys(v.value).length;
|
|
2971
|
+
for (const E in v.value) {
|
|
2972
|
+
const w = (_ = (F = r.configSchema) == null ? void 0 : F[E]) == null ? void 0 : _.order, U = (j = u[E]) == null ? void 0 : j.order;
|
|
2973
|
+
let P = O;
|
|
2974
|
+
(U || U === 0) && (P = U === -1 ? O + 1 : U), w && (P = w === -1 ? O + 1 : w), g.push([E, P]);
|
|
2876
2975
|
}
|
|
2877
|
-
return
|
|
2878
|
-
return
|
|
2879
|
-
}),
|
|
2880
|
-
var
|
|
2881
|
-
const
|
|
2976
|
+
return g.sort(function(E, w) {
|
|
2977
|
+
return E[1] - w[1];
|
|
2978
|
+
}), g.map((E) => {
|
|
2979
|
+
var fe, at;
|
|
2980
|
+
const w = E[0], U = (fe = v.value) == null ? void 0 : fe[w], P = ((at = r.configSchema) == null ? void 0 : at[w]) || {}, J = u[w];
|
|
2882
2981
|
return {
|
|
2883
|
-
key:
|
|
2884
|
-
value:
|
|
2885
|
-
hidden:
|
|
2886
|
-
type:
|
|
2887
|
-
label:
|
|
2888
|
-
tooltip:
|
|
2889
|
-
section:
|
|
2982
|
+
key: w,
|
|
2983
|
+
value: U,
|
|
2984
|
+
hidden: P.hidden || !1,
|
|
2985
|
+
type: P.type ?? ((J == null ? void 0 : J.type) || q.Text),
|
|
2986
|
+
label: P.label ?? ((J == null ? void 0 : J.label) || o(w)),
|
|
2987
|
+
tooltip: P.tooltip ?? ((J == null ? void 0 : J.tooltip) || void 0),
|
|
2988
|
+
section: P.section ?? ((J == null ? void 0 : J.section) || ne.Advanced)
|
|
2890
2989
|
};
|
|
2891
|
-
}).filter((
|
|
2892
|
-
}),
|
|
2893
|
-
var
|
|
2894
|
-
if (!
|
|
2990
|
+
}).filter((E) => !E.hidden && E.key !== r.pluginConfigKey);
|
|
2991
|
+
}), M = A(() => {
|
|
2992
|
+
var _, j;
|
|
2993
|
+
if (!v.value || !r.pluginConfigKey)
|
|
2895
2994
|
return [];
|
|
2896
|
-
const
|
|
2897
|
-
for (const
|
|
2898
|
-
const
|
|
2899
|
-
let
|
|
2900
|
-
|
|
2995
|
+
const g = v.value[r.pluginConfigKey] || {}, O = Object.keys(g).length, F = [];
|
|
2996
|
+
for (const E in g) {
|
|
2997
|
+
const w = (j = (_ = r.pluginConfigSchema) == null ? void 0 : _[E]) == null ? void 0 : j.order, U = g[E];
|
|
2998
|
+
let P = U != null && U !== "" ? O - 1 : O;
|
|
2999
|
+
w && (P = w === -1 ? O + 1 : w), F.push([E, P]);
|
|
2901
3000
|
}
|
|
2902
|
-
return F.sort(function(
|
|
2903
|
-
return
|
|
2904
|
-
}), F.map((
|
|
2905
|
-
var
|
|
2906
|
-
const
|
|
3001
|
+
return F.sort(function(E, w) {
|
|
3002
|
+
return E[1] - w[1];
|
|
3003
|
+
}), F.map((E) => {
|
|
3004
|
+
var J;
|
|
3005
|
+
const w = E[0], U = g[w], P = ((J = r.pluginConfigSchema) == null ? void 0 : J[w]) || {};
|
|
2907
3006
|
return {
|
|
2908
|
-
key:
|
|
2909
|
-
value:
|
|
2910
|
-
hidden:
|
|
2911
|
-
type:
|
|
2912
|
-
label:
|
|
2913
|
-
tooltip:
|
|
3007
|
+
key: w,
|
|
3008
|
+
value: U,
|
|
3009
|
+
hidden: P.hidden || !1,
|
|
3010
|
+
type: P.type ?? q.Text,
|
|
3011
|
+
label: P.label ?? o(w),
|
|
3012
|
+
tooltip: P.tooltip ?? void 0,
|
|
2914
3013
|
section: ne.Plugin
|
|
2915
3014
|
};
|
|
2916
|
-
}).filter((
|
|
2917
|
-
}),
|
|
2918
|
-
var
|
|
3015
|
+
}).filter((E) => !E.hidden);
|
|
3016
|
+
}), I = A(() => {
|
|
3017
|
+
var g, O, F, _;
|
|
2919
3018
|
return {
|
|
2920
|
-
basic: (
|
|
2921
|
-
advanced: (
|
|
2922
|
-
plugin: (
|
|
3019
|
+
basic: (g = k.value) == null ? void 0 : g.filter((j) => j.section === ne.Basic),
|
|
3020
|
+
advanced: (O = k.value) == null ? void 0 : O.filter((j) => j.section === ne.Advanced),
|
|
3021
|
+
plugin: (_ = M.value) == null ? void 0 : _.concat((F = k.value) == null ? void 0 : F.filter((j) => j.section === ne.Plugin))
|
|
2923
3022
|
};
|
|
2924
|
-
}),
|
|
2925
|
-
const
|
|
2926
|
-
return
|
|
2927
|
-
}),
|
|
2928
|
-
var
|
|
2929
|
-
let
|
|
2930
|
-
return r.config.app === "konnect" ?
|
|
3023
|
+
}), ee = A(() => {
|
|
3024
|
+
const g = [];
|
|
3025
|
+
return I.value.basic.length && g.push("basic"), I.value.advanced.length && g.push("advanced"), I.value.plugin.length && g.push("plugin"), g;
|
|
3026
|
+
}), p = A(() => {
|
|
3027
|
+
var O, F;
|
|
3028
|
+
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3029
|
+
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((O = r.config) == null ? void 0 : O.controlPlaneId) || "") : r.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (F = r.config) != null && F.workspace ? `/${r.config.workspace}` : "")), g = g.replace(/{id}/gi, r.config.entityId), g;
|
|
2931
3030
|
});
|
|
2932
|
-
return
|
|
2933
|
-
n("loading",
|
|
3031
|
+
return ke(m, (g) => {
|
|
3032
|
+
n("loading", g);
|
|
2934
3033
|
}, { immediate: !0 }), Ft(async () => {
|
|
2935
|
-
f.value = !1,
|
|
3034
|
+
f.value = !1, m.value = !0;
|
|
2936
3035
|
try {
|
|
2937
|
-
const { data:
|
|
3036
|
+
const { data: g } = await l.get(p.value);
|
|
2938
3037
|
if (r.dataKey)
|
|
2939
|
-
if (typeof
|
|
2940
|
-
|
|
3038
|
+
if (typeof g[r.dataKey] < "u")
|
|
3039
|
+
v.value = { ...g[r.dataKey] };
|
|
2941
3040
|
else
|
|
2942
3041
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2943
3042
|
else
|
|
2944
|
-
|
|
3043
|
+
v.value = { ...g };
|
|
2945
3044
|
Object.keys(r.configSchema).filter((F) => r.configSchema[F].forceShow).forEach((F) => {
|
|
2946
|
-
|
|
2947
|
-
}), n("fetch:success",
|
|
2948
|
-
} catch (
|
|
2949
|
-
const
|
|
2950
|
-
|
|
3045
|
+
v.value && typeof v.value[F] > "u" && (v.value[F] = null);
|
|
3046
|
+
}), n("fetch:success", g);
|
|
3047
|
+
} catch (g) {
|
|
3048
|
+
const O = a(g);
|
|
3049
|
+
b.value = O.startsWith("code") ? i("baseConfigCard.errors.load") : O, f.value = !0, n("fetch:error", g);
|
|
2951
3050
|
} finally {
|
|
2952
|
-
|
|
3051
|
+
m.value = !1;
|
|
2953
3052
|
}
|
|
2954
|
-
}), (
|
|
2955
|
-
const F =
|
|
2956
|
-
return h(),
|
|
3053
|
+
}), (g, O) => {
|
|
3054
|
+
const F = N("KLabel"), _ = N("KSelect"), j = N("KButton"), E = N("KSkeleton"), w = N("KEmptyState"), U = N("KCard");
|
|
3055
|
+
return h(), K(U, { class: "kong-ui-entity-base-config-card" }, Ce({
|
|
2957
3056
|
actions: x(() => [
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
3057
|
+
$("div", Mo, [
|
|
3058
|
+
H(g.$slots, "actions", {}, void 0, !0),
|
|
3059
|
+
B(F, {
|
|
2961
3060
|
class: "config-format-select-label",
|
|
2962
3061
|
"data-testid": "config-format-select-label"
|
|
2963
3062
|
}, {
|
|
2964
3063
|
default: x(() => [
|
|
2965
|
-
V(
|
|
3064
|
+
V(L(e.label), 1)
|
|
2966
3065
|
]),
|
|
2967
3066
|
_: 1
|
|
2968
3067
|
}),
|
|
2969
|
-
|
|
3068
|
+
B(_, {
|
|
2970
3069
|
"data-testid": "select-config-format",
|
|
2971
3070
|
items: s,
|
|
2972
3071
|
onChange: d
|
|
2973
3072
|
}),
|
|
2974
|
-
e.configCardDoc ? (h(),
|
|
3073
|
+
e.configCardDoc ? (h(), K(j, {
|
|
2975
3074
|
key: 0,
|
|
2976
3075
|
appearance: "tertiary",
|
|
2977
3076
|
class: "book-icon",
|
|
2978
3077
|
"data-testid": "book-icon"
|
|
2979
3078
|
}, {
|
|
2980
3079
|
default: x(() => [
|
|
2981
|
-
|
|
3080
|
+
$("a", {
|
|
2982
3081
|
href: e.configCardDoc,
|
|
2983
3082
|
rel: "noopener",
|
|
2984
3083
|
target: "_blank"
|
|
2985
3084
|
}, [
|
|
2986
|
-
|
|
2987
|
-
], 8,
|
|
3085
|
+
B(T(vo), { size: T(wr) }, null, 8, ["size"])
|
|
3086
|
+
], 8, Do)
|
|
2988
3087
|
]),
|
|
2989
3088
|
_: 1
|
|
2990
|
-
})) :
|
|
3089
|
+
})) : D("", !0)
|
|
2991
3090
|
])
|
|
2992
3091
|
]),
|
|
2993
3092
|
default: x(() => [
|
|
2994
|
-
|
|
3093
|
+
m.value ? (h(), K(E, {
|
|
2995
3094
|
key: 0,
|
|
2996
3095
|
"data-testid": "config-card-loader",
|
|
2997
3096
|
"table-columns": 2,
|
|
2998
3097
|
type: "table"
|
|
2999
|
-
})) : f.value ? (h(),
|
|
3098
|
+
})) : f.value ? (h(), K(w, {
|
|
3000
3099
|
key: 1,
|
|
3001
3100
|
"data-testid": "config-card-fetch-error",
|
|
3002
3101
|
"is-error": ""
|
|
3003
3102
|
}, {
|
|
3004
3103
|
message: x(() => [
|
|
3005
|
-
|
|
3104
|
+
$("h3", null, L(b.value), 1)
|
|
3006
3105
|
]),
|
|
3007
3106
|
_: 1
|
|
3008
|
-
})) :
|
|
3009
|
-
|
|
3010
|
-
|
|
3107
|
+
})) : D("", !0),
|
|
3108
|
+
$("div", jo, [
|
|
3109
|
+
B(fo, {
|
|
3011
3110
|
config: e.config,
|
|
3012
|
-
"fetcher-url":
|
|
3111
|
+
"fetcher-url": p.value,
|
|
3013
3112
|
format: c.value,
|
|
3014
|
-
"prop-list-types":
|
|
3015
|
-
"property-collections":
|
|
3016
|
-
record:
|
|
3017
|
-
},
|
|
3018
|
-
ie(Object.keys(
|
|
3019
|
-
name:
|
|
3020
|
-
fn: x(({ row:
|
|
3021
|
-
|
|
3022
|
-
row:
|
|
3023
|
-
rowValue:
|
|
3113
|
+
"prop-list-types": ee.value,
|
|
3114
|
+
"property-collections": I.value,
|
|
3115
|
+
record: v.value
|
|
3116
|
+
}, Ce({ _: 2 }, [
|
|
3117
|
+
ie(Object.keys(g.$slots), (P) => ({
|
|
3118
|
+
name: P,
|
|
3119
|
+
fn: x(({ row: J, rowValue: fe }) => [
|
|
3120
|
+
H(g.$slots, P, {
|
|
3121
|
+
row: J,
|
|
3122
|
+
rowValue: fe
|
|
3024
3123
|
}, void 0, !0)
|
|
3025
3124
|
])
|
|
3026
3125
|
}))
|
|
@@ -3032,9 +3131,9 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3032
3131
|
e.hideTitle ? void 0 : {
|
|
3033
3132
|
name: "title",
|
|
3034
3133
|
fn: x(() => [
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
V(
|
|
3134
|
+
$("div", Ko, [
|
|
3135
|
+
H(g.$slots, "title", {}, () => [
|
|
3136
|
+
V(L(T(i)("baseConfigCard.title")), 1)
|
|
3038
3137
|
], !0)
|
|
3039
3138
|
])
|
|
3040
3139
|
]),
|
|
@@ -3043,10 +3142,10 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3043
3142
|
]), 1024);
|
|
3044
3143
|
};
|
|
3045
3144
|
}
|
|
3046
|
-
}),
|
|
3145
|
+
}), Ll = /* @__PURE__ */ re(Uo, [["__scopeId", "data-v-090c7580"]]), Po = {
|
|
3047
3146
|
class: "form-actions",
|
|
3048
3147
|
"data-testid": "form-actions"
|
|
3049
|
-
},
|
|
3148
|
+
}, qo = { key: 0 }, Ho = /* @__PURE__ */ Y({
|
|
3050
3149
|
__name: "EntityBaseForm",
|
|
3051
3150
|
props: {
|
|
3052
3151
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3100,22 +3199,22 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3100
3199
|
},
|
|
3101
3200
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3102
3201
|
setup(e, { emit: t }) {
|
|
3103
|
-
var
|
|
3104
|
-
const n = t, r = e, i =
|
|
3105
|
-
headers: (
|
|
3106
|
-
}), s = R(!1), c = R(!1), d = R(""), u = A(() => r.canSubmit === !1 || r.isReadonly),
|
|
3107
|
-
var y,
|
|
3108
|
-
let
|
|
3109
|
-
return r.config.app === "konnect" ?
|
|
3110
|
-
}),
|
|
3111
|
-
|
|
3112
|
-
},
|
|
3202
|
+
var ee;
|
|
3203
|
+
const n = t, r = e, i = Kn(), { i18n: { t: a } } = z.useI18n(), { getMessageFromError: o } = z.useErrors(), { axiosInstance: l } = z.useAxios({
|
|
3204
|
+
headers: (ee = r.config) == null ? void 0 : ee.requestHeaders
|
|
3205
|
+
}), s = R(!1), c = R(!1), d = R(""), u = A(() => r.canSubmit === !1 || r.isReadonly), m = R(!1), f = A(() => {
|
|
3206
|
+
var y, g;
|
|
3207
|
+
let p = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3208
|
+
return r.config.app === "konnect" ? p = p.replace(/{controlPlaneId}/gi, ((y = r.config) == null ? void 0 : y.controlPlaneId) || "") : r.config.app === "kongManager" && (p = p.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), r.editId ? (p = p.replace(/{id}/gi, r.editId), p) : (p = p.replace(/\/{id}/gi, ""), p);
|
|
3209
|
+
}), b = () => {
|
|
3210
|
+
m.value = !m.value;
|
|
3211
|
+
}, v = () => {
|
|
3113
3212
|
r.config.cancelRoute ? i.push(r.config.cancelRoute) : k();
|
|
3114
3213
|
}, k = () => {
|
|
3115
3214
|
n("cancel");
|
|
3116
|
-
},
|
|
3215
|
+
}, M = () => {
|
|
3117
3216
|
u.value || n("submit");
|
|
3118
|
-
},
|
|
3217
|
+
}, I = R([
|
|
3119
3218
|
{
|
|
3120
3219
|
title: a("baseForm.configuration.yaml"),
|
|
3121
3220
|
hash: "#yaml"
|
|
@@ -3125,107 +3224,107 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3125
3224
|
hash: "#json"
|
|
3126
3225
|
}
|
|
3127
3226
|
]);
|
|
3128
|
-
return
|
|
3129
|
-
n("loading",
|
|
3227
|
+
return ke(() => s.value, (p) => {
|
|
3228
|
+
n("loading", p);
|
|
3130
3229
|
}, { immediate: !0 }), Ft(async () => {
|
|
3131
3230
|
if (r.editId)
|
|
3132
3231
|
try {
|
|
3133
3232
|
c.value = !1, s.value = !0;
|
|
3134
|
-
const { data:
|
|
3135
|
-
n("fetch:success",
|
|
3136
|
-
} catch (
|
|
3137
|
-
const y = o(
|
|
3138
|
-
d.value = y.startsWith("code") ? a("baseForm.errors.edit") : y, c.value = !0, n("fetch:error",
|
|
3233
|
+
const { data: p } = await l.get(f.value);
|
|
3234
|
+
n("fetch:success", p);
|
|
3235
|
+
} catch (p) {
|
|
3236
|
+
const y = o(p);
|
|
3237
|
+
d.value = y.startsWith("code") ? a("baseForm.errors.edit") : y, c.value = !0, n("fetch:error", p);
|
|
3139
3238
|
} finally {
|
|
3140
3239
|
s.value = !1;
|
|
3141
3240
|
}
|
|
3142
|
-
}), (
|
|
3143
|
-
const
|
|
3144
|
-
return h(),
|
|
3241
|
+
}), (p, y) => {
|
|
3242
|
+
const g = N("KSkeleton"), O = N("KEmptyState"), F = N("KAlert"), _ = N("KButton"), j = N("KTabs"), E = N("KSlideout"), w = N("KCard");
|
|
3243
|
+
return h(), K(w, { class: "kong-ui-entity-base-form" }, {
|
|
3145
3244
|
default: x(() => [
|
|
3146
|
-
s.value ? (h(),
|
|
3245
|
+
s.value ? (h(), K(g, {
|
|
3147
3246
|
key: 0,
|
|
3148
3247
|
type: "form"
|
|
3149
|
-
})) : c.value ? (h(),
|
|
3248
|
+
})) : c.value ? (h(), K(O, {
|
|
3150
3249
|
key: 1,
|
|
3151
3250
|
"cta-text": T(a)("baseForm.actions.back"),
|
|
3152
3251
|
"data-testid": "form-fetch-error",
|
|
3153
|
-
"handle-click":
|
|
3252
|
+
"handle-click": v,
|
|
3154
3253
|
"is-error": !0
|
|
3155
3254
|
}, {
|
|
3156
3255
|
message: x(() => [
|
|
3157
|
-
|
|
3256
|
+
$("h3", null, L(d.value), 1)
|
|
3158
3257
|
]),
|
|
3159
3258
|
_: 1
|
|
3160
3259
|
}, 8, ["cta-text"])) : (h(), S("form", {
|
|
3161
3260
|
key: 2,
|
|
3162
3261
|
"data-testid": "form-content",
|
|
3163
|
-
onReset:
|
|
3164
|
-
onSubmit:
|
|
3262
|
+
onReset: He(k, ["prevent"]),
|
|
3263
|
+
onSubmit: He(M, ["prevent"])
|
|
3165
3264
|
}, [
|
|
3166
|
-
|
|
3167
|
-
e.errorMessage ? (h(),
|
|
3265
|
+
H(p.$slots, "default", {}, void 0, !0),
|
|
3266
|
+
e.errorMessage ? (h(), K(F, {
|
|
3168
3267
|
key: 0,
|
|
3169
3268
|
"alert-message": e.errorMessage,
|
|
3170
3269
|
appearance: "danger",
|
|
3171
3270
|
"data-testid": "form-error"
|
|
3172
|
-
}, null, 8, ["alert-message"])) :
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
e.config.jsonYamlFormsEnabled ? (h(), S("div",
|
|
3176
|
-
|
|
3271
|
+
}, null, 8, ["alert-message"])) : D("", !0),
|
|
3272
|
+
$("div", Po, [
|
|
3273
|
+
H(p.$slots, "form-actions", {}, () => [
|
|
3274
|
+
e.config.jsonYamlFormsEnabled ? (h(), S("div", qo, [
|
|
3275
|
+
B(_, {
|
|
3177
3276
|
appearance: "tertiary",
|
|
3178
3277
|
"data-testid": "form-view-configuration",
|
|
3179
|
-
onClick: y[0] || (y[0] = (
|
|
3278
|
+
onClick: y[0] || (y[0] = (U) => b())
|
|
3180
3279
|
}, {
|
|
3181
3280
|
default: x(() => [
|
|
3182
|
-
V(
|
|
3281
|
+
V(L(T(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3183
3282
|
]),
|
|
3184
3283
|
_: 1
|
|
3185
3284
|
})
|
|
3186
|
-
])) :
|
|
3187
|
-
|
|
3285
|
+
])) : D("", !0),
|
|
3286
|
+
B(_, {
|
|
3188
3287
|
appearance: "secondary",
|
|
3189
3288
|
"data-testid": "form-cancel",
|
|
3190
3289
|
disabled: e.isReadonly,
|
|
3191
3290
|
type: "reset"
|
|
3192
3291
|
}, {
|
|
3193
3292
|
default: x(() => [
|
|
3194
|
-
V(
|
|
3293
|
+
V(L(T(a)("baseForm.actions.cancel")), 1)
|
|
3195
3294
|
]),
|
|
3196
3295
|
_: 1
|
|
3197
3296
|
}, 8, ["disabled"]),
|
|
3198
|
-
|
|
3297
|
+
B(_, {
|
|
3199
3298
|
appearance: "primary",
|
|
3200
3299
|
"data-testid": "form-submit",
|
|
3201
3300
|
disabled: u.value,
|
|
3202
3301
|
type: "submit"
|
|
3203
3302
|
}, {
|
|
3204
3303
|
default: x(() => [
|
|
3205
|
-
V(
|
|
3304
|
+
V(L(T(a)("baseForm.actions.save")), 1)
|
|
3206
3305
|
]),
|
|
3207
3306
|
_: 1
|
|
3208
3307
|
}, 8, ["disabled"])
|
|
3209
3308
|
], !0)
|
|
3210
3309
|
])
|
|
3211
3310
|
], 32)),
|
|
3212
|
-
|
|
3311
|
+
B(E, {
|
|
3213
3312
|
"close-on-blur": !1,
|
|
3214
3313
|
"data-testid": "form-view-configuration-slideout",
|
|
3215
3314
|
"has-overlay": !1,
|
|
3216
3315
|
"offset-top": 60,
|
|
3217
3316
|
title: T(a)("baseForm.configuration.title"),
|
|
3218
|
-
visible:
|
|
3219
|
-
onClose: y[1] || (y[1] = (
|
|
3317
|
+
visible: m.value,
|
|
3318
|
+
onClose: y[1] || (y[1] = (U) => b())
|
|
3220
3319
|
}, {
|
|
3221
3320
|
default: x(() => [
|
|
3222
|
-
|
|
3223
|
-
|
|
3321
|
+
$("div", null, L(T(a)("baseForm.configuration.message")), 1),
|
|
3322
|
+
B(j, {
|
|
3224
3323
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3225
|
-
tabs:
|
|
3324
|
+
tabs: I.value
|
|
3226
3325
|
}, {
|
|
3227
3326
|
json: x(() => [
|
|
3228
|
-
|
|
3327
|
+
B(Kt, {
|
|
3229
3328
|
config: e.config,
|
|
3230
3329
|
"fetcher-url": f.value,
|
|
3231
3330
|
"json-record": r.formFields,
|
|
@@ -3233,7 +3332,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3233
3332
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3234
3333
|
]),
|
|
3235
3334
|
yaml: x(() => [
|
|
3236
|
-
|
|
3335
|
+
B(Sn, {
|
|
3237
3336
|
"yaml-record": r.formFields
|
|
3238
3337
|
}, null, 8, ["yaml-record"])
|
|
3239
3338
|
]),
|
|
@@ -3247,10 +3346,10 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3247
3346
|
});
|
|
3248
3347
|
};
|
|
3249
3348
|
}
|
|
3250
|
-
}),
|
|
3349
|
+
}), $l = /* @__PURE__ */ re(Ho, [["__scopeId", "data-v-2e2d1350"]]), Yo = {
|
|
3251
3350
|
key: 0,
|
|
3252
3351
|
"data-testid": "first-col"
|
|
3253
|
-
},
|
|
3352
|
+
}, Vo = /* @__PURE__ */ Y({
|
|
3254
3353
|
__name: "EntityBaseTableCell",
|
|
3255
3354
|
props: {
|
|
3256
3355
|
keyName: {
|
|
@@ -3264,67 +3363,67 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3264
3363
|
},
|
|
3265
3364
|
setup(e) {
|
|
3266
3365
|
const t = e, n = A(() => {
|
|
3267
|
-
var
|
|
3268
|
-
return ((
|
|
3366
|
+
var v;
|
|
3367
|
+
return ((v = t.rowEl) == null ? void 0 : v.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3269
3368
|
}), r = A(() => {
|
|
3270
|
-
var
|
|
3271
|
-
return ((
|
|
3369
|
+
var v;
|
|
3370
|
+
return ((v = n.value) == null ? void 0 : v.querySelector('[data-testid="first-col"]')) || null;
|
|
3272
3371
|
}), i = A(() => {
|
|
3273
|
-
var k,
|
|
3274
|
-
const
|
|
3275
|
-
return
|
|
3372
|
+
var k, M;
|
|
3373
|
+
const v = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3374
|
+
return v ? ((M = v[0]) == null ? void 0 : M.getAttribute("data-testid")) === t.keyName : !1;
|
|
3276
3375
|
});
|
|
3277
3376
|
let a;
|
|
3278
3377
|
const o = () => {
|
|
3279
3378
|
a && (a.disconnect(), a = void 0);
|
|
3280
3379
|
}, l = () => {
|
|
3281
|
-
var
|
|
3282
|
-
c.value = ((
|
|
3283
|
-
}, s = R({}), c = R(0), d = R(0), u = R(""),
|
|
3284
|
-
|
|
3285
|
-
(
|
|
3380
|
+
var v, k, M;
|
|
3381
|
+
c.value = ((v = r.value) == null ? void 0 : v.getBoundingClientRect().width) || 0, d.value = ((k = n.value) == null ? void 0 : k.clientWidth) || 0, u.value = ((M = s.value) == null ? void 0 : M.innerText) || "";
|
|
3382
|
+
}, s = R({}), c = R(0), d = R(0), u = R(""), m = A(() => [r.value, n.value]), f = ke(
|
|
3383
|
+
m,
|
|
3384
|
+
(v) => {
|
|
3286
3385
|
if (i.value && (o(), "ResizeObserver" in window && window)) {
|
|
3287
3386
|
a = new ResizeObserver((k) => {
|
|
3288
3387
|
window.requestAnimationFrame(() => {
|
|
3289
3388
|
!Array.isArray(k) || !k.length || l();
|
|
3290
3389
|
});
|
|
3291
3390
|
});
|
|
3292
|
-
for (const k of
|
|
3391
|
+
for (const k of v)
|
|
3293
3392
|
k && a.observe(k);
|
|
3294
3393
|
}
|
|
3295
3394
|
},
|
|
3296
3395
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3297
|
-
),
|
|
3396
|
+
), b = A(() => i.value ? c.value > d.value : !1);
|
|
3298
3397
|
return On(() => {
|
|
3299
3398
|
l();
|
|
3300
|
-
}),
|
|
3399
|
+
}), Ln(() => {
|
|
3301
3400
|
f();
|
|
3302
|
-
}), (
|
|
3303
|
-
const
|
|
3401
|
+
}), (v, k) => {
|
|
3402
|
+
const M = N("KTooltip");
|
|
3304
3403
|
return h(), S("span", {
|
|
3305
3404
|
ref_key: "contentRef",
|
|
3306
3405
|
ref: s,
|
|
3307
3406
|
class: "content-wrapper"
|
|
3308
3407
|
}, [
|
|
3309
|
-
i.value ? (h(), S("span",
|
|
3310
|
-
|
|
3408
|
+
i.value ? (h(), S("span", Yo, [
|
|
3409
|
+
B(M, {
|
|
3311
3410
|
"max-width": "300",
|
|
3312
3411
|
placement: "bottomStart",
|
|
3313
|
-
text:
|
|
3412
|
+
text: b.value ? u.value : ""
|
|
3314
3413
|
}, {
|
|
3315
3414
|
default: x(() => [
|
|
3316
|
-
|
|
3415
|
+
H(v.$slots, "default", {}, void 0, !0)
|
|
3317
3416
|
]),
|
|
3318
3417
|
_: 3
|
|
3319
3418
|
}, 8, ["text"])
|
|
3320
|
-
])) :
|
|
3419
|
+
])) : H(v.$slots, "default", { key: 1 }, void 0, !0)
|
|
3321
3420
|
], 512);
|
|
3322
3421
|
};
|
|
3323
3422
|
}
|
|
3324
|
-
}),
|
|
3423
|
+
}), zo = /* @__PURE__ */ re(Vo, [["__scopeId", "data-v-c4379fd4"]]), Wo = { class: "toolbar-container" }, Jo = {
|
|
3325
3424
|
key: 0,
|
|
3326
3425
|
class: "toolbar-button-container"
|
|
3327
|
-
},
|
|
3426
|
+
}, Go = ["data-testid"], Zo = /* @__PURE__ */ Y({
|
|
3328
3427
|
__name: "EntityBaseTable",
|
|
3329
3428
|
props: {
|
|
3330
3429
|
// table header configuration
|
|
@@ -3435,7 +3534,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3435
3534
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3436
3535
|
setup(e, { emit: t }) {
|
|
3437
3536
|
const n = e, r = t, { i18n: { t: i } } = z.useI18n(), a = A(() => {
|
|
3438
|
-
var y,
|
|
3537
|
+
var y, g;
|
|
3439
3538
|
return typeof n.errorMessage == "string" ? {
|
|
3440
3539
|
hasError: !!n.errorMessage,
|
|
3441
3540
|
title: n.errorMessage,
|
|
@@ -3443,15 +3542,15 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3443
3542
|
} : {
|
|
3444
3543
|
hasError: !!n.errorMessage,
|
|
3445
3544
|
title: (y = n.errorMessage) == null ? void 0 : y.title,
|
|
3446
|
-
message: (
|
|
3545
|
+
message: (g = n.errorMessage) == null ? void 0 : g.message
|
|
3447
3546
|
};
|
|
3448
3547
|
}), o = A(() => n.cacheIdentifier || n.preferencesStorageKey), l = (y) => y.hasData || !!n.query, s = A(() => {
|
|
3449
3548
|
const y = [];
|
|
3450
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3451
|
-
const F = n.tableHeaders[
|
|
3549
|
+
return Object.keys(n.tableHeaders).forEach((O) => {
|
|
3550
|
+
const F = n.tableHeaders[O];
|
|
3452
3551
|
y.push({
|
|
3453
|
-
label: F.label ??
|
|
3454
|
-
key:
|
|
3552
|
+
label: F.label ?? O,
|
|
3553
|
+
key: O,
|
|
3455
3554
|
sortable: F.sortable ?? !1
|
|
3456
3555
|
});
|
|
3457
3556
|
}), n.enableEntityActions && y.push({
|
|
@@ -3463,47 +3562,47 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3463
3562
|
"data-testid": y.name,
|
|
3464
3563
|
...n.rowAttributes(y)
|
|
3465
3564
|
}), d = R({}), u = (y) => {
|
|
3466
|
-
var
|
|
3467
|
-
return (
|
|
3468
|
-
},
|
|
3469
|
-
const
|
|
3565
|
+
var g;
|
|
3566
|
+
return (g = d.value) == null ? void 0 : g.$el.querySelector(`[data-rowid="${y.id}"]`);
|
|
3567
|
+
}, m = (y) => {
|
|
3568
|
+
const g = {
|
|
3470
3569
|
"data-testid": y.headerKey,
|
|
3471
3570
|
...n.cellAttributes(y)
|
|
3472
3571
|
};
|
|
3473
|
-
return y.colIndex === 0 && (
|
|
3572
|
+
return y.colIndex === 0 && (g.style = {
|
|
3474
3573
|
maxWidth: "250px",
|
|
3475
3574
|
overflowX: "hidden",
|
|
3476
3575
|
textOverflow: "ellipsis"
|
|
3477
|
-
}),
|
|
3576
|
+
}), g;
|
|
3478
3577
|
}, f = () => {
|
|
3479
|
-
r("empty-state-cta-clicked"),
|
|
3480
|
-
},
|
|
3578
|
+
r("empty-state-cta-clicked"), b();
|
|
3579
|
+
}, b = () => {
|
|
3481
3580
|
r("clear-search-input");
|
|
3482
|
-
},
|
|
3483
|
-
r("click:row",
|
|
3581
|
+
}, v = A(() => n.disableRowClick ? void 0 : (y, g) => {
|
|
3582
|
+
r("click:row", g);
|
|
3484
3583
|
}), k = (y) => {
|
|
3485
3584
|
r("sort", y);
|
|
3486
|
-
}, { setTablePreferences:
|
|
3487
|
-
const y =
|
|
3585
|
+
}, { setTablePreferences: M, getTablePreferences: I } = qn(), ee = A(() => {
|
|
3586
|
+
const y = I(n.preferencesStorageKey);
|
|
3488
3587
|
return {
|
|
3489
3588
|
...n.initialFetcherParams,
|
|
3490
3589
|
...y
|
|
3491
3590
|
};
|
|
3492
|
-
}),
|
|
3493
|
-
n.preferencesStorageKey &&
|
|
3591
|
+
}), p = (y) => {
|
|
3592
|
+
n.preferencesStorageKey && M(n.preferencesStorageKey, y);
|
|
3494
3593
|
};
|
|
3495
|
-
return (y,
|
|
3496
|
-
const
|
|
3497
|
-
return h(),
|
|
3594
|
+
return (y, g) => {
|
|
3595
|
+
const O = N("KIcon"), F = N("KButton"), _ = N("KDropdown"), j = N("KTable"), E = N("KCard");
|
|
3596
|
+
return h(), K(E, {
|
|
3498
3597
|
class: "kong-ui-entity-base-table",
|
|
3499
3598
|
title: e.title
|
|
3500
3599
|
}, {
|
|
3501
3600
|
default: x(() => [
|
|
3502
|
-
|
|
3601
|
+
B(j, {
|
|
3503
3602
|
ref_key: "tableRefs",
|
|
3504
3603
|
ref: d,
|
|
3505
3604
|
"cache-identifier": o.value,
|
|
3506
|
-
"cell-attrs":
|
|
3605
|
+
"cell-attrs": m,
|
|
3507
3606
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3508
3607
|
"disable-sorting": e.disableSorting,
|
|
3509
3608
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
@@ -3521,50 +3620,50 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3521
3620
|
"has-error": a.value.hasError,
|
|
3522
3621
|
headers: s.value,
|
|
3523
3622
|
"hide-pagination-when-optional": "",
|
|
3524
|
-
"initial-fetcher-params":
|
|
3623
|
+
"initial-fetcher-params": ee.value,
|
|
3525
3624
|
"is-loading": e.isLoading,
|
|
3526
3625
|
"pagination-type": e.paginationType,
|
|
3527
3626
|
"row-attrs": c,
|
|
3528
3627
|
"search-input": e.query,
|
|
3529
3628
|
onKtableEmptyStateCtaClicked: f,
|
|
3530
|
-
"onRow:click":
|
|
3531
|
-
onSort:
|
|
3532
|
-
"onUpdate:tablePreferences":
|
|
3533
|
-
},
|
|
3534
|
-
toolbar: x(({ state:
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
y.$slots["toolbar-button"] ? (h(), S("div",
|
|
3538
|
-
|
|
3539
|
-
])) :
|
|
3629
|
+
"onRow:click": v.value,
|
|
3630
|
+
onSort: g[0] || (g[0] = (w) => k(w)),
|
|
3631
|
+
"onUpdate:tablePreferences": p
|
|
3632
|
+
}, Ce({
|
|
3633
|
+
toolbar: x(({ state: w }) => [
|
|
3634
|
+
pe($("div", Wo, [
|
|
3635
|
+
H(y.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3636
|
+
y.$slots["toolbar-button"] ? (h(), S("div", Jo, [
|
|
3637
|
+
H(y.$slots, "toolbar-button", {}, void 0, !0)
|
|
3638
|
+
])) : D("", !0)
|
|
3540
3639
|
], 512), [
|
|
3541
|
-
[
|
|
3640
|
+
[he, l(w)]
|
|
3542
3641
|
])
|
|
3543
3642
|
]),
|
|
3544
|
-
actions: x(({ row:
|
|
3545
|
-
|
|
3643
|
+
actions: x(({ row: w, rowKey: U, rowValue: P }) => [
|
|
3644
|
+
$("div", {
|
|
3546
3645
|
class: "actions-container",
|
|
3547
|
-
"data-testid":
|
|
3646
|
+
"data-testid": w.name
|
|
3548
3647
|
}, [
|
|
3549
|
-
|
|
3648
|
+
B(_, {
|
|
3550
3649
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3551
3650
|
width: e.dropdownMenuWidth
|
|
3552
3651
|
}, {
|
|
3553
3652
|
items: x(() => [
|
|
3554
|
-
|
|
3555
|
-
row:
|
|
3556
|
-
rowKey:
|
|
3557
|
-
rowValue:
|
|
3653
|
+
H(y.$slots, "actions", {
|
|
3654
|
+
row: w,
|
|
3655
|
+
rowKey: U,
|
|
3656
|
+
rowValue: P
|
|
3558
3657
|
}, void 0, !0)
|
|
3559
3658
|
]),
|
|
3560
3659
|
default: x(() => [
|
|
3561
|
-
|
|
3660
|
+
B(F, {
|
|
3562
3661
|
class: "actions-trigger",
|
|
3563
3662
|
"data-testid": "overflow-actions-button",
|
|
3564
3663
|
size: "small"
|
|
3565
3664
|
}, {
|
|
3566
3665
|
icon: x(() => [
|
|
3567
|
-
|
|
3666
|
+
B(O, {
|
|
3568
3667
|
color: T(xr),
|
|
3569
3668
|
icon: "more",
|
|
3570
3669
|
size: "16"
|
|
@@ -3575,24 +3674,24 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3575
3674
|
]),
|
|
3576
3675
|
_: 2
|
|
3577
3676
|
}, 1032, ["width"])
|
|
3578
|
-
], 8,
|
|
3677
|
+
], 8, Go)
|
|
3579
3678
|
]),
|
|
3580
3679
|
_: 2
|
|
3581
3680
|
}, [
|
|
3582
|
-
ie(e.tableHeaders, (
|
|
3583
|
-
name:
|
|
3584
|
-
fn: x(({ row:
|
|
3585
|
-
|
|
3586
|
-
"key-name": String(
|
|
3587
|
-
"row-el": u(
|
|
3681
|
+
ie(e.tableHeaders, (w, U) => ({
|
|
3682
|
+
name: U,
|
|
3683
|
+
fn: x(({ row: P, rowKey: J, rowValue: fe }) => [
|
|
3684
|
+
B(zo, {
|
|
3685
|
+
"key-name": String(U),
|
|
3686
|
+
"row-el": u(P)
|
|
3588
3687
|
}, {
|
|
3589
3688
|
default: x(() => [
|
|
3590
|
-
|
|
3591
|
-
row:
|
|
3592
|
-
rowKey:
|
|
3593
|
-
rowValue:
|
|
3689
|
+
H(y.$slots, U, {
|
|
3690
|
+
row: P,
|
|
3691
|
+
rowKey: J,
|
|
3692
|
+
rowValue: fe
|
|
3594
3693
|
}, () => [
|
|
3595
|
-
V(
|
|
3694
|
+
V(L(fe), 1)
|
|
3596
3695
|
], !0)
|
|
3597
3696
|
]),
|
|
3598
3697
|
_: 2
|
|
@@ -3605,13 +3704,13 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3605
3704
|
}, 8, ["title"]);
|
|
3606
3705
|
};
|
|
3607
3706
|
}
|
|
3608
|
-
}),
|
|
3707
|
+
}), Nl = /* @__PURE__ */ re(Zo, [["__scopeId", "data-v-ecfaa7cf"]]), Qo = {
|
|
3609
3708
|
key: 0,
|
|
3610
3709
|
class: "kong-ui-entity-delete-error"
|
|
3611
|
-
},
|
|
3710
|
+
}, Xo = {
|
|
3612
3711
|
key: 1,
|
|
3613
3712
|
class: "description"
|
|
3614
|
-
},
|
|
3713
|
+
}, el = /* @__PURE__ */ Y({
|
|
3615
3714
|
__name: "EntityDeleteModal",
|
|
3616
3715
|
props: {
|
|
3617
3716
|
visible: {
|
|
@@ -3656,8 +3755,8 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3656
3755
|
i("proceed");
|
|
3657
3756
|
};
|
|
3658
3757
|
return (s, c) => {
|
|
3659
|
-
const d =
|
|
3660
|
-
return h(),
|
|
3758
|
+
const d = N("KAlert"), u = N("KPrompt");
|
|
3759
|
+
return h(), K(u, {
|
|
3661
3760
|
"action-button-appearance": "danger",
|
|
3662
3761
|
"action-button-disabled": e.actionPending,
|
|
3663
3762
|
"action-button-text": "Yes, delete",
|
|
@@ -3669,49 +3768,49 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3669
3768
|
onProceed: l
|
|
3670
3769
|
}, {
|
|
3671
3770
|
default: x(() => [
|
|
3672
|
-
e.error ? (h(), S("div",
|
|
3673
|
-
|
|
3771
|
+
e.error ? (h(), S("div", Qo, [
|
|
3772
|
+
B(d, { appearance: "danger" }, {
|
|
3674
3773
|
alertMessage: x(() => [
|
|
3675
|
-
V(
|
|
3774
|
+
V(L(e.error), 1)
|
|
3676
3775
|
]),
|
|
3677
3776
|
_: 1
|
|
3678
3777
|
})
|
|
3679
|
-
])) :
|
|
3680
|
-
|
|
3778
|
+
])) : D("", !0),
|
|
3779
|
+
B(T(n), {
|
|
3681
3780
|
class: "message",
|
|
3682
3781
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3683
3782
|
tag: "p"
|
|
3684
|
-
},
|
|
3783
|
+
}, Ce({
|
|
3685
3784
|
entityType: x(() => [
|
|
3686
|
-
V(
|
|
3785
|
+
V(L(r.entityType), 1)
|
|
3687
3786
|
]),
|
|
3688
3787
|
_: 2
|
|
3689
3788
|
}, [
|
|
3690
3789
|
r.entityName ? {
|
|
3691
3790
|
name: "entityName",
|
|
3692
3791
|
fn: x(() => [
|
|
3693
|
-
|
|
3792
|
+
$("strong", null, L(r.entityName), 1)
|
|
3694
3793
|
]),
|
|
3695
3794
|
key: "0"
|
|
3696
3795
|
} : void 0
|
|
3697
3796
|
]), 1032, ["keypath"]),
|
|
3698
|
-
r.description || s.$slots.description ? (h(), S("div",
|
|
3699
|
-
|
|
3700
|
-
|
|
3797
|
+
r.description || s.$slots.description ? (h(), S("div", Xo, [
|
|
3798
|
+
H(s.$slots, "description", {}, () => [
|
|
3799
|
+
$("p", null, L(r.description), 1)
|
|
3701
3800
|
], !0)
|
|
3702
|
-
])) :
|
|
3801
|
+
])) : D("", !0)
|
|
3703
3802
|
]),
|
|
3704
3803
|
_: 3
|
|
3705
3804
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3706
3805
|
};
|
|
3707
3806
|
}
|
|
3708
|
-
}),
|
|
3807
|
+
}), Bl = /* @__PURE__ */ re(el, [["__scopeId", "data-v-efe8f34b"]]), tl = {
|
|
3709
3808
|
fill: "none",
|
|
3710
3809
|
height: "20",
|
|
3711
3810
|
viewBox: "0 0 20 20",
|
|
3712
3811
|
width: "20",
|
|
3713
3812
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3714
|
-
},
|
|
3813
|
+
}, nl = {
|
|
3715
3814
|
id: "mask0_180_20349",
|
|
3716
3815
|
height: "20",
|
|
3717
3816
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3719,7 +3818,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3719
3818
|
width: "20",
|
|
3720
3819
|
x: "0",
|
|
3721
3820
|
y: "0"
|
|
3722
|
-
},
|
|
3821
|
+
}, rl = ["fill"], il = { mask: "url(#mask0_180_20349)" }, al = ["fill"], Et = /* @__PURE__ */ Y({
|
|
3723
3822
|
__name: "IconFilter",
|
|
3724
3823
|
props: {
|
|
3725
3824
|
color: {
|
|
@@ -3728,26 +3827,26 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3728
3827
|
}
|
|
3729
3828
|
},
|
|
3730
3829
|
setup(e) {
|
|
3731
|
-
return (t, n) => (h(), S("svg",
|
|
3732
|
-
|
|
3733
|
-
|
|
3830
|
+
return (t, n) => (h(), S("svg", tl, [
|
|
3831
|
+
$("mask", nl, [
|
|
3832
|
+
$("rect", {
|
|
3734
3833
|
fill: e.color,
|
|
3735
3834
|
height: "20",
|
|
3736
3835
|
width: "20"
|
|
3737
|
-
}, null, 8,
|
|
3836
|
+
}, null, 8, rl)
|
|
3738
3837
|
]),
|
|
3739
|
-
|
|
3740
|
-
|
|
3838
|
+
$("g", il, [
|
|
3839
|
+
$("path", {
|
|
3741
3840
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3742
3841
|
fill: e.color
|
|
3743
|
-
}, null, 8,
|
|
3842
|
+
}, null, 8, al)
|
|
3744
3843
|
])
|
|
3745
3844
|
]));
|
|
3746
3845
|
}
|
|
3747
|
-
}),
|
|
3846
|
+
}), ol = {
|
|
3748
3847
|
key: 1,
|
|
3749
3848
|
class: "kong-ui-entity-filter"
|
|
3750
|
-
},
|
|
3849
|
+
}, ll = { class: "kong-ui-entity-filter-menu" }, sl = ["data-testid"], cl = ["onClick"], ul = { class: "menu-item-indicator" }, dl = { class: "menu-item-body" }, fl = ["for"], pl = { class: "menu-item-buttons" }, hl = { class: "filter-clear-button-container" }, ml = /* @__PURE__ */ Y({
|
|
3751
3850
|
__name: "EntityFilter",
|
|
3752
3851
|
props: {
|
|
3753
3852
|
// filter config, either exact match or fuzzy match
|
|
@@ -3767,182 +3866,185 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3767
3866
|
},
|
|
3768
3867
|
emits: ["update:modelValue"],
|
|
3769
3868
|
setup(e, { emit: t }) {
|
|
3770
|
-
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = A(() => {
|
|
3771
|
-
const
|
|
3772
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
3773
|
-
|
|
3774
|
-
}),
|
|
3775
|
-
}),
|
|
3776
|
-
const
|
|
3777
|
-
return Object.keys(
|
|
3778
|
-
label:
|
|
3779
|
-
value:
|
|
3869
|
+
const { i18n: { t: n } } = z.useI18n(), r = e, i = t, a = R(!1), o = R({}), l = R(/* @__PURE__ */ new Set()), s = A(() => {
|
|
3870
|
+
const p = [];
|
|
3871
|
+
return new URLSearchParams(r.modelValue).forEach((y, g) => {
|
|
3872
|
+
y !== "" && p.push(g);
|
|
3873
|
+
}), p;
|
|
3874
|
+
}), c = A(() => {
|
|
3875
|
+
const p = r.config.fields;
|
|
3876
|
+
return Object.keys(p).filter((y) => p[y].searchable).map((y) => ({
|
|
3877
|
+
label: p[y].label || y,
|
|
3878
|
+
value: y,
|
|
3879
|
+
expanded: !1
|
|
3780
3880
|
}));
|
|
3781
3881
|
});
|
|
3782
|
-
|
|
3783
|
-
o.value = {}, new URLSearchParams(
|
|
3784
|
-
o.value[g] =
|
|
3882
|
+
ke(() => r.modelValue, (p) => {
|
|
3883
|
+
o.value = {}, new URLSearchParams(p).forEach((y, g) => {
|
|
3884
|
+
o.value[g] = y;
|
|
3785
3885
|
});
|
|
3786
3886
|
});
|
|
3787
|
-
const
|
|
3887
|
+
const d = () => {
|
|
3788
3888
|
a.value = !a.value;
|
|
3789
|
-
},
|
|
3790
|
-
|
|
3791
|
-
},
|
|
3792
|
-
|
|
3793
|
-
},
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3889
|
+
}, u = (p) => {
|
|
3890
|
+
l.value.has(p) ? l.value.delete(p) : l.value.add(p);
|
|
3891
|
+
}, m = (p) => {
|
|
3892
|
+
i("update:modelValue", p);
|
|
3893
|
+
}, f = () => {
|
|
3894
|
+
m("");
|
|
3895
|
+
}, b = (p) => `filter-${p}`, v = (p) => {
|
|
3896
|
+
var y, g;
|
|
3897
|
+
return (((g = (y = r.config.schema) == null ? void 0 : y[p]) == null ? void 0 : g.values) ?? []).map((O) => ({
|
|
3898
|
+
value: O,
|
|
3899
|
+
label: O
|
|
3798
3900
|
}));
|
|
3799
|
-
},
|
|
3800
|
-
var
|
|
3801
|
-
return ((g = (
|
|
3802
|
-
},
|
|
3901
|
+
}, k = (p) => {
|
|
3902
|
+
var y, g;
|
|
3903
|
+
return ((g = (y = r.config.schema) == null ? void 0 : y[p]) == null ? void 0 : g.type) ?? "text";
|
|
3904
|
+
}, M = (p) => {
|
|
3803
3905
|
o.value = {
|
|
3804
3906
|
...o.value,
|
|
3805
|
-
[
|
|
3806
|
-
},
|
|
3807
|
-
},
|
|
3808
|
-
o.value = {},
|
|
3809
|
-
},
|
|
3810
|
-
const
|
|
3811
|
-
|
|
3907
|
+
[p]: ""
|
|
3908
|
+
}, ee();
|
|
3909
|
+
}, I = () => {
|
|
3910
|
+
o.value = {}, ee(!0);
|
|
3911
|
+
}, ee = (p = !1) => {
|
|
3912
|
+
const y = Object.keys(o.value).reduce((g, O) => (o.value[O] && (g[O] = `${o.value[O]}`), g), {});
|
|
3913
|
+
p && (a.value = !1), i("update:modelValue", new URLSearchParams(y).toString());
|
|
3812
3914
|
};
|
|
3813
|
-
return (
|
|
3814
|
-
const g =
|
|
3815
|
-
return e.config.isExactMatch ? (h(),
|
|
3915
|
+
return (p, y) => {
|
|
3916
|
+
const g = N("KInput"), O = N("KButton"), F = N("KSelect");
|
|
3917
|
+
return e.config.isExactMatch ? (h(), K(g, {
|
|
3816
3918
|
key: 0,
|
|
3817
3919
|
autocomplete: "off",
|
|
3818
3920
|
class: "kong-ui-entity-filter-input",
|
|
3819
3921
|
"data-testid": "search-input",
|
|
3820
3922
|
"model-value": e.modelValue,
|
|
3821
3923
|
placeholder: e.config.placeholder,
|
|
3822
|
-
"onUpdate:modelValue":
|
|
3924
|
+
"onUpdate:modelValue": m
|
|
3823
3925
|
}, {
|
|
3824
3926
|
before: x(() => [
|
|
3825
|
-
|
|
3927
|
+
B(Et)
|
|
3826
3928
|
]),
|
|
3827
3929
|
after: x(() => [
|
|
3828
|
-
|
|
3930
|
+
pe(B(T(Fo), {
|
|
3829
3931
|
class: "kong-ui-entity-filter-clear",
|
|
3830
|
-
onClick:
|
|
3932
|
+
onClick: f
|
|
3831
3933
|
}, null, 512), [
|
|
3832
|
-
[
|
|
3934
|
+
[he, e.modelValue !== ""]
|
|
3833
3935
|
])
|
|
3834
3936
|
]),
|
|
3835
3937
|
_: 1
|
|
3836
|
-
}, 8, ["model-value", "placeholder"])) : (h(), S("div",
|
|
3837
|
-
|
|
3938
|
+
}, 8, ["model-value", "placeholder"])) : (h(), S("div", ol, [
|
|
3939
|
+
B(O, {
|
|
3838
3940
|
appearance: "tertiary",
|
|
3839
3941
|
"data-testid": "filter-button",
|
|
3840
|
-
onClick:
|
|
3942
|
+
onClick: d
|
|
3841
3943
|
}, {
|
|
3842
3944
|
default: x(() => [
|
|
3843
|
-
|
|
3844
|
-
V(" " +
|
|
3945
|
+
B(Et),
|
|
3946
|
+
V(" " + L(T(n)("filter.filterButtonText")) + " " + L(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
3845
3947
|
]),
|
|
3846
3948
|
_: 1
|
|
3847
3949
|
}),
|
|
3848
|
-
|
|
3950
|
+
pe($("div", {
|
|
3849
3951
|
class: "kong-ui-entity-filter-backdrop",
|
|
3850
|
-
onClick:
|
|
3952
|
+
onClick: d
|
|
3851
3953
|
}, null, 512), [
|
|
3852
|
-
[
|
|
3954
|
+
[he, a.value]
|
|
3853
3955
|
]),
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
"
|
|
3861
|
-
},
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3956
|
+
pe($("div", ll, [
|
|
3957
|
+
(h(!0), S(oe, null, ie(c.value, (_) => {
|
|
3958
|
+
var j, E;
|
|
3959
|
+
return h(), S("div", {
|
|
3960
|
+
key: _.value,
|
|
3961
|
+
class: "kong-ui-entity-filter-menu-item",
|
|
3962
|
+
"data-testid": _.value
|
|
3963
|
+
}, [
|
|
3964
|
+
$("span", {
|
|
3965
|
+
class: ce(["menu-item-title", { expanded: l.value.has(_.value) }]),
|
|
3966
|
+
onClick: (w) => u(_.value)
|
|
3967
|
+
}, [
|
|
3968
|
+
V(L(_.label) + " ", 1),
|
|
3969
|
+
pe($("span", ul, null, 512), [
|
|
3970
|
+
[he, s.value.includes(_.value)]
|
|
3971
|
+
]),
|
|
3972
|
+
B(T(Ao), {
|
|
3973
|
+
class: ce(["menu-item-expand-icon", { expanded: l.value.has(_.value) }]),
|
|
3974
|
+
color: T(Cr)
|
|
3975
|
+
}, null, 8, ["class", "color"])
|
|
3976
|
+
], 10, cl),
|
|
3977
|
+
pe($("div", dl, [
|
|
3978
|
+
$("label", {
|
|
3979
|
+
class: "menu-item-label",
|
|
3980
|
+
for: b(_.value)
|
|
3981
|
+
}, L(T(n)("filter.fieldLabel")), 9, fl),
|
|
3982
|
+
((E = (j = e.config.schema) == null ? void 0 : j[_.value]) == null ? void 0 : E.type) === "select" ? (h(), K(F, {
|
|
3983
|
+
key: 0,
|
|
3984
|
+
id: b(_.value),
|
|
3985
|
+
modelValue: o.value[_.value],
|
|
3986
|
+
"onUpdate:modelValue": (w) => o.value[_.value] = w,
|
|
3987
|
+
items: v(_.value),
|
|
3988
|
+
placeholder: T(n)("filter.selectPlaceholder")
|
|
3989
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), K(g, {
|
|
3990
|
+
key: 1,
|
|
3991
|
+
id: b(_.value),
|
|
3992
|
+
modelValue: o.value[_.value],
|
|
3993
|
+
"onUpdate:modelValue": (w) => o.value[_.value] = w,
|
|
3994
|
+
autocomplete: "off",
|
|
3995
|
+
placeholder: T(n)("filter.inputPlaceholder"),
|
|
3996
|
+
type: k(_.value)
|
|
3997
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3998
|
+
], 512), [
|
|
3999
|
+
[he, l.value.has(_.value)]
|
|
3869
4000
|
]),
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
((
|
|
3879
|
-
key: 0,
|
|
3880
|
-
id: p(w.value),
|
|
3881
|
-
modelValue: o.value[w.value],
|
|
3882
|
-
"onUpdate:modelValue": (K) => o.value[w.value] = K,
|
|
3883
|
-
items: f(w.value),
|
|
3884
|
-
placeholder: T(n)("filter.selectPlaceholder")
|
|
3885
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), M(g, {
|
|
3886
|
-
key: 1,
|
|
3887
|
-
id: p(w.value),
|
|
3888
|
-
modelValue: o.value[w.value],
|
|
3889
|
-
"onUpdate:modelValue": (K) => o.value[w.value] = K,
|
|
3890
|
-
autocomplete: "off",
|
|
3891
|
-
placeholder: T(n)("filter.inputPlaceholder"),
|
|
3892
|
-
type: C(w.value)
|
|
3893
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4001
|
+
pe($("div", pl, [
|
|
4002
|
+
B(O, {
|
|
4003
|
+
appearance: "tertiary",
|
|
4004
|
+
"data-testid": "apply-filter",
|
|
4005
|
+
size: "small",
|
|
4006
|
+
onClick: y[0] || (y[0] = (w) => ee(!0))
|
|
4007
|
+
}, {
|
|
4008
|
+
default: x(() => [
|
|
4009
|
+
V(L(T(n)("filter.applyButtonText")), 1)
|
|
3894
4010
|
]),
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
appearance: "tertiary",
|
|
3928
|
-
size: "small",
|
|
3929
|
-
onClick: k
|
|
3930
|
-
}, {
|
|
3931
|
-
default: x(() => [
|
|
3932
|
-
V(O(T(n)("filter.clearAllButtonText")), 1)
|
|
3933
|
-
]),
|
|
3934
|
-
_: 1
|
|
3935
|
-
})
|
|
3936
|
-
])
|
|
3937
|
-
]),
|
|
3938
|
-
_: 1
|
|
3939
|
-
}, 512), [
|
|
3940
|
-
[ke, a.value]
|
|
4011
|
+
_: 1
|
|
4012
|
+
}),
|
|
4013
|
+
B(O, {
|
|
4014
|
+
appearance: "tertiary",
|
|
4015
|
+
"data-testid": "clear-filter",
|
|
4016
|
+
size: "small",
|
|
4017
|
+
onClick: (w) => M(_.value)
|
|
4018
|
+
}, {
|
|
4019
|
+
default: x(() => [
|
|
4020
|
+
V(L(T(n)("filter.clearButtonText")), 1)
|
|
4021
|
+
]),
|
|
4022
|
+
_: 2
|
|
4023
|
+
}, 1032, ["onClick"])
|
|
4024
|
+
], 512), [
|
|
4025
|
+
[he, l.value.has(_.value)]
|
|
4026
|
+
])
|
|
4027
|
+
], 8, sl);
|
|
4028
|
+
}), 128)),
|
|
4029
|
+
$("div", hl, [
|
|
4030
|
+
B(O, {
|
|
4031
|
+
appearance: "tertiary",
|
|
4032
|
+
size: "small",
|
|
4033
|
+
onClick: I
|
|
4034
|
+
}, {
|
|
4035
|
+
default: x(() => [
|
|
4036
|
+
V(L(T(n)("filter.clearAllButtonText")), 1)
|
|
4037
|
+
]),
|
|
4038
|
+
_: 1
|
|
4039
|
+
})
|
|
4040
|
+
])
|
|
4041
|
+
], 512), [
|
|
4042
|
+
[he, a.value]
|
|
3941
4043
|
])
|
|
3942
4044
|
]));
|
|
3943
4045
|
};
|
|
3944
4046
|
}
|
|
3945
|
-
}),
|
|
4047
|
+
}), Rl = /* @__PURE__ */ re(ml, [["__scopeId", "data-v-fa0bfbad"]]), Kl = /* @__PURE__ */ Y({
|
|
3946
4048
|
__name: "EntityToggleModal",
|
|
3947
4049
|
props: {
|
|
3948
4050
|
visible: {
|
|
@@ -3990,10 +4092,10 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
3990
4092
|
}
|
|
3991
4093
|
}
|
|
3992
4094
|
};
|
|
3993
|
-
return (u,
|
|
3994
|
-
const f =
|
|
3995
|
-
return h(),
|
|
3996
|
-
|
|
4095
|
+
return (u, m) => {
|
|
4096
|
+
const f = N("KPrompt");
|
|
4097
|
+
return h(), K($n, { to: "body" }, [
|
|
4098
|
+
B(f, {
|
|
3997
4099
|
"action-button-disabled": o.value,
|
|
3998
4100
|
"action-button-text": s.value,
|
|
3999
4101
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4003,15 +4105,15 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
4003
4105
|
onProceed: d
|
|
4004
4106
|
}, {
|
|
4005
4107
|
default: x(() => [
|
|
4006
|
-
|
|
4108
|
+
B(T(r), {
|
|
4007
4109
|
keypath: `toggleModal.${i.action}.message`,
|
|
4008
4110
|
scope: "global"
|
|
4009
4111
|
}, {
|
|
4010
4112
|
entityType: x(() => [
|
|
4011
|
-
V(
|
|
4113
|
+
V(L(e.entityType), 1)
|
|
4012
4114
|
]),
|
|
4013
4115
|
entityName: x(() => [
|
|
4014
|
-
|
|
4116
|
+
$("strong", null, L(e.entityName), 1)
|
|
4015
4117
|
]),
|
|
4016
4118
|
_: 1
|
|
4017
4119
|
}, 8, ["keypath"])
|
|
@@ -4021,7 +4123,7 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
4021
4123
|
]);
|
|
4022
4124
|
};
|
|
4023
4125
|
}
|
|
4024
|
-
}),
|
|
4126
|
+
}), Ml = /* @__PURE__ */ Y({
|
|
4025
4127
|
__name: "PermissionsWrapper",
|
|
4026
4128
|
props: {
|
|
4027
4129
|
/**
|
|
@@ -4044,23 +4146,23 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
4044
4146
|
},
|
|
4045
4147
|
setup(e) {
|
|
4046
4148
|
const t = e, n = R(void 0), r = A(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4047
|
-
return
|
|
4149
|
+
return ke(() => t.authFunction, async () => {
|
|
4048
4150
|
n.value = await t.authFunction();
|
|
4049
|
-
}, { immediate: !0 }), (i, a) => r.value ?
|
|
4151
|
+
}, { immediate: !0 }), (i, a) => r.value ? H(i.$slots, "default", {
|
|
4050
4152
|
key: 0,
|
|
4051
4153
|
isAllowed: n.value
|
|
4052
|
-
}) :
|
|
4154
|
+
}) : D("", !0);
|
|
4053
4155
|
}
|
|
4054
|
-
}),
|
|
4156
|
+
}), gl = { class: "form-section-wrapper" }, yl = {
|
|
4055
4157
|
key: 0,
|
|
4056
4158
|
class: "form-section-title"
|
|
4057
|
-
},
|
|
4159
|
+
}, vl = {
|
|
4058
4160
|
key: 1,
|
|
4059
4161
|
class: "form-section-description"
|
|
4060
|
-
},
|
|
4162
|
+
}, bl = {
|
|
4061
4163
|
key: 2,
|
|
4062
4164
|
class: "form-section-footer"
|
|
4063
|
-
},
|
|
4165
|
+
}, xl = { class: "form-section-content" }, Cl = /* @__PURE__ */ Y({
|
|
4064
4166
|
__name: "EntityFormSection",
|
|
4065
4167
|
props: {
|
|
4066
4168
|
title: {
|
|
@@ -4085,38 +4187,38 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
4085
4187
|
}
|
|
4086
4188
|
},
|
|
4087
4189
|
setup(e) {
|
|
4088
|
-
const t =
|
|
4190
|
+
const t = Ge();
|
|
4089
4191
|
return (n, r) => (h(), S("fieldset", {
|
|
4090
|
-
class:
|
|
4192
|
+
class: ce(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4091
4193
|
}, [
|
|
4092
|
-
|
|
4093
|
-
e.hideInfoHeader ?
|
|
4194
|
+
$("div", gl, [
|
|
4195
|
+
e.hideInfoHeader ? D("", !0) : (h(), S("div", {
|
|
4094
4196
|
key: 0,
|
|
4095
|
-
class:
|
|
4197
|
+
class: ce(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4096
4198
|
}, [
|
|
4097
|
-
e.title ? (h(), S("h4",
|
|
4098
|
-
e.description || T(t).description ? (h(), S("div",
|
|
4099
|
-
|
|
4100
|
-
|
|
4199
|
+
e.title ? (h(), S("h4", yl, L(e.title), 1)) : D("", !0),
|
|
4200
|
+
e.description || T(t).description ? (h(), S("div", vl, [
|
|
4201
|
+
H(n.$slots, "description", {}, () => [
|
|
4202
|
+
$("p", null, L(e.description), 1)
|
|
4101
4203
|
], !0)
|
|
4102
|
-
])) :
|
|
4103
|
-
T(t).footer ? (h(), S("div",
|
|
4104
|
-
|
|
4105
|
-
])) :
|
|
4204
|
+
])) : D("", !0),
|
|
4205
|
+
T(t).footer ? (h(), S("div", bl, [
|
|
4206
|
+
H(n.$slots, "footer", {}, void 0, !0)
|
|
4207
|
+
])) : D("", !0)
|
|
4106
4208
|
], 2)),
|
|
4107
|
-
|
|
4108
|
-
|
|
4209
|
+
$("div", xl, [
|
|
4210
|
+
H(n.$slots, "default", {}, void 0, !0)
|
|
4109
4211
|
])
|
|
4110
4212
|
])
|
|
4111
4213
|
], 2));
|
|
4112
4214
|
}
|
|
4113
|
-
}),
|
|
4215
|
+
}), Dl = /* @__PURE__ */ re(Cl, [["__scopeId", "data-v-3565daa7"]]), _l = {
|
|
4114
4216
|
class: "kong-ui-public-entity-link",
|
|
4115
4217
|
"data-testid": "entity-link-parent"
|
|
4116
|
-
},
|
|
4218
|
+
}, kl = {
|
|
4117
4219
|
key: 0,
|
|
4118
4220
|
class: "deleted-entity"
|
|
4119
|
-
},
|
|
4221
|
+
}, Al = { key: 1 }, wl = ["onClick"], Sl = /* @__PURE__ */ Y({
|
|
4120
4222
|
__name: "EntityLink",
|
|
4121
4223
|
props: {
|
|
4122
4224
|
entityLinkData: {
|
|
@@ -4145,10 +4247,10 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
4145
4247
|
o.value = a;
|
|
4146
4248
|
}, 1800));
|
|
4147
4249
|
};
|
|
4148
|
-
return (u,
|
|
4149
|
-
const f =
|
|
4150
|
-
return h(), S("div",
|
|
4151
|
-
l.value ? (h(), S("div",
|
|
4250
|
+
return (u, m) => {
|
|
4251
|
+
const f = N("KTooltip"), b = N("KExternalLink"), v = N("KClipboardProvider");
|
|
4252
|
+
return h(), S("div", _l, [
|
|
4253
|
+
l.value ? (h(), S("div", kl, L(c.value), 1)) : s.value ? s.value ? (h(), K(b, {
|
|
4152
4254
|
key: 2,
|
|
4153
4255
|
class: "entity-link",
|
|
4154
4256
|
"hide-icon": !e.newWindow,
|
|
@@ -4156,22 +4258,22 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
4156
4258
|
target: e.newWindow ? "_blank" : "_self"
|
|
4157
4259
|
}, {
|
|
4158
4260
|
default: x(() => [
|
|
4159
|
-
|
|
4261
|
+
B(f, {
|
|
4160
4262
|
text: T(r) && e.entityLinkData.label || ""
|
|
4161
4263
|
}, {
|
|
4162
4264
|
default: x(() => [
|
|
4163
|
-
|
|
4265
|
+
$("span", {
|
|
4164
4266
|
ref_key: "textContent",
|
|
4165
4267
|
ref: n,
|
|
4166
4268
|
class: "entity-link-label"
|
|
4167
|
-
},
|
|
4269
|
+
}, L(e.entityLinkData.label), 513)
|
|
4168
4270
|
]),
|
|
4169
4271
|
_: 1
|
|
4170
4272
|
}, 8, ["text"])
|
|
4171
4273
|
]),
|
|
4172
4274
|
_: 1
|
|
4173
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4174
|
-
s.value && e.allowCopy ? (h(),
|
|
4275
|
+
}, 8, ["hide-icon", "href", "target"])) : D("", !0) : (h(), S("div", Al, L(" – "))),
|
|
4276
|
+
s.value && e.allowCopy ? (h(), K(f, {
|
|
4175
4277
|
key: o.value,
|
|
4176
4278
|
class: "copy-uuid-tooltip",
|
|
4177
4279
|
"max-width": "160",
|
|
@@ -4179,58 +4281,58 @@ const ao = { class: "yaml-config" }, Sn = /* @__PURE__ */ W({
|
|
|
4179
4281
|
text: o.value
|
|
4180
4282
|
}, {
|
|
4181
4283
|
default: x(() => [
|
|
4182
|
-
|
|
4284
|
+
B(v, null, {
|
|
4183
4285
|
default: x(({ copyToClipboard: k }) => [
|
|
4184
|
-
|
|
4286
|
+
$("span", {
|
|
4185
4287
|
class: "entity-link-copy-id",
|
|
4186
|
-
onClick:
|
|
4288
|
+
onClick: He((M) => d(k), ["stop"])
|
|
4187
4289
|
}, [
|
|
4188
|
-
|
|
4290
|
+
B(T(Ro), {
|
|
4189
4291
|
class: "copy-icon",
|
|
4190
|
-
color: T(
|
|
4292
|
+
color: T(_r),
|
|
4191
4293
|
"data-testid": "copy-id",
|
|
4192
|
-
size: T(
|
|
4294
|
+
size: T(Ar)
|
|
4193
4295
|
}, null, 8, ["color", "size"])
|
|
4194
|
-
], 8,
|
|
4296
|
+
], 8, wl)
|
|
4195
4297
|
]),
|
|
4196
4298
|
_: 1
|
|
4197
4299
|
})
|
|
4198
4300
|
]),
|
|
4199
4301
|
_: 1
|
|
4200
|
-
}, 8, ["text"])) :
|
|
4302
|
+
}, 8, ["text"])) : D("", !0)
|
|
4201
4303
|
]);
|
|
4202
4304
|
};
|
|
4203
4305
|
}
|
|
4204
|
-
}),
|
|
4306
|
+
}), jl = /* @__PURE__ */ re(Sl, [["__scopeId", "data-v-ff8e5179"]]), { useAxios: Ul, useDeleteUrlBuilder: Pl, useErrors: ql, useExternalLinkCreator: Hl, useFetchUrlBuilder: Yl, useFetcher: Vl, useDebouncedFilter: zl, useStringHelpers: Wl, useHelpers: Jl, useGatewayFeatureSupported: Gl, useTruncationDetector: Zl } = z;
|
|
4205
4307
|
export {
|
|
4206
|
-
|
|
4308
|
+
fo as ConfigCardDisplay,
|
|
4207
4309
|
Rt as ConfigCardItem,
|
|
4208
4310
|
ne as ConfigurationSchemaSection,
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4311
|
+
q as ConfigurationSchemaType,
|
|
4312
|
+
Ll as EntityBaseConfigCard,
|
|
4313
|
+
$l as EntityBaseForm,
|
|
4212
4314
|
Dn as EntityBaseFormType,
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4315
|
+
Nl as EntityBaseTable,
|
|
4316
|
+
Bl as EntityDeleteModal,
|
|
4317
|
+
Rl as EntityFilter,
|
|
4318
|
+
Dl as EntityFormSection,
|
|
4319
|
+
jl as EntityLink,
|
|
4320
|
+
Kl as EntityToggleModal,
|
|
4321
|
+
Mn as EntityTypes,
|
|
4322
|
+
ye as FetcherStatus,
|
|
4221
4323
|
gr as InternalLinkItem,
|
|
4222
|
-
|
|
4223
|
-
|
|
4324
|
+
Kt as JsonCodeBlock,
|
|
4325
|
+
Ml as PermissionsWrapper,
|
|
4224
4326
|
Sn as YamlCodeBlock,
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4327
|
+
Ul as useAxios,
|
|
4328
|
+
zl as useDebouncedFilter,
|
|
4329
|
+
Pl as useDeleteUrlBuilder,
|
|
4330
|
+
ql as useErrors,
|
|
4331
|
+
Hl as useExternalLinkCreator,
|
|
4332
|
+
Yl as useFetchUrlBuilder,
|
|
4333
|
+
Vl as useFetcher,
|
|
4334
|
+
Gl as useGatewayFeatureSupported,
|
|
4335
|
+
Jl as useHelpers,
|
|
4336
|
+
Wl as useStringHelpers,
|
|
4337
|
+
Zl as useTruncationDetector
|
|
4236
4338
|
};
|