@kong-ui-public/entities-gateway-services 2.3.7 → 2.3.8-pr.1069.84ba7772.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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as re, ref as U, computed as j, resolveComponent as L, openBlock as v, createBlock as P, Teleport as lr, createVNode as C, withCtx as y, unref as f, createTextVNode as G, toDisplayString as O, createElementVNode as N, watch as _e, renderSlot as Q, createCommentVNode as D, useSlots as
|
|
1
|
+
import { defineComponent as re, ref as U, computed as j, resolveComponent as L, openBlock as v, createBlock as P, Teleport as lr, createVNode as C, withCtx as y, unref as f, createTextVNode as G, toDisplayString as O, createElementVNode as N, watch as _e, renderSlot as Q, createCommentVNode as D, useSlots as ot, onBeforeMount as bt, createSlots as je, createElementBlock as M, renderList as ye, Fragment as ve, normalizeClass as Se, withModifiers as qe, withDirectives as Re, vShow as De, useCssVars as ri, reactive as Ze, resolveDynamicComponent as $e, normalizeProps as sr, guardReactiveProps as cr, mergeProps as pt, onMounted as oi, onUnmounted as ur, normalizeStyle as ai, inject as dr, pushScopeId as ni, popScopeId as li } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
3
|
import { createI18n as _t, i18nTComponent as si } from "@kong-ui-public/i18n";
|
|
4
4
|
import pr from "axios";
|
|
@@ -193,8 +193,8 @@ function _r() {
|
|
|
193
193
|
function kr() {
|
|
194
194
|
return {
|
|
195
195
|
getPortFromProtocol: (i, t) => {
|
|
196
|
-
const
|
|
197
|
-
if ((r || r === 0) && !
|
|
196
|
+
const o = [80, 443], r = Number(t);
|
|
197
|
+
if ((r || r === 0) && !o.includes(r))
|
|
198
198
|
return r;
|
|
199
199
|
switch (i) {
|
|
200
200
|
case "grpcs":
|
|
@@ -251,9 +251,9 @@ function Cr() {
|
|
|
251
251
|
return {
|
|
252
252
|
debounce: (e, i) => {
|
|
253
253
|
let t;
|
|
254
|
-
return (...
|
|
254
|
+
return (...o) => {
|
|
255
255
|
clearTimeout(t), t = window == null ? void 0 : window.setTimeout(() => {
|
|
256
|
-
e(...
|
|
256
|
+
e(...o);
|
|
257
257
|
}, i);
|
|
258
258
|
};
|
|
259
259
|
}
|
|
@@ -269,8 +269,8 @@ function Ir() {
|
|
|
269
269
|
if (typeof t == "string")
|
|
270
270
|
try {
|
|
271
271
|
return JSON.parse(t);
|
|
272
|
-
} catch (
|
|
273
|
-
console.error("useTablePreferences(tryParseJson)",
|
|
272
|
+
} catch (o) {
|
|
273
|
+
console.error("useTablePreferences(tryParseJson)", o);
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
}, i = () => {
|
|
@@ -278,17 +278,17 @@ function Ir() {
|
|
|
278
278
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
279
279
|
};
|
|
280
280
|
return {
|
|
281
|
-
setTablePreferences: (t,
|
|
281
|
+
setTablePreferences: (t, o) => {
|
|
282
282
|
try {
|
|
283
283
|
const r = i();
|
|
284
|
-
r.set(t,
|
|
284
|
+
r.set(t, o), localStorage.setItem(st, JSON.stringify(Object.fromEntries(r.entries())));
|
|
285
285
|
} catch (r) {
|
|
286
286
|
console.error("useTablePreferences(setTablePreferences)", r);
|
|
287
287
|
}
|
|
288
288
|
},
|
|
289
289
|
getTablePreferences: (t) => {
|
|
290
|
-
const
|
|
291
|
-
return (
|
|
290
|
+
const o = i();
|
|
291
|
+
return (o == null ? void 0 : o.get(t)) || void 0 || Sr;
|
|
292
292
|
},
|
|
293
293
|
deleteAllTablePreferences: () => {
|
|
294
294
|
localStorage.removeItem(st);
|
|
@@ -409,29 +409,29 @@ function Ct() {
|
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
function ui() {
|
|
412
|
-
const e = (t,
|
|
413
|
-
if (t.length !==
|
|
412
|
+
const e = (t, o) => (o == null ? void 0 : o[t]) ?? void 0, i = (t, o) => {
|
|
413
|
+
if (t.length !== o.length)
|
|
414
414
|
return !1;
|
|
415
|
-
const r = /* @__PURE__ */ new Set([...t, ...
|
|
415
|
+
const r = /* @__PURE__ */ new Set([...t, ...o]);
|
|
416
416
|
for (const n of r) {
|
|
417
|
-
const
|
|
418
|
-
if (
|
|
417
|
+
const a = t.filter((l) => l === n).length, s = o.filter((l) => l === n).length;
|
|
418
|
+
if (a !== s)
|
|
419
419
|
return !1;
|
|
420
420
|
}
|
|
421
421
|
return !0;
|
|
422
422
|
};
|
|
423
423
|
return {
|
|
424
424
|
getPropValue: e,
|
|
425
|
-
objectsAreEqual: (t,
|
|
425
|
+
objectsAreEqual: (t, o, r) => {
|
|
426
426
|
if (r) {
|
|
427
|
-
if (Object.keys(t).length === Object.keys(
|
|
427
|
+
if (Object.keys(t).length === Object.keys(o).length)
|
|
428
428
|
for (const n in t)
|
|
429
|
-
if (Array.isArray(t[n]) && Array.isArray(
|
|
430
|
-
if (i(t[n],
|
|
429
|
+
if (Array.isArray(t[n]) && Array.isArray(o[n])) {
|
|
430
|
+
if (i(t[n], o[n]))
|
|
431
431
|
continue;
|
|
432
432
|
return !1;
|
|
433
433
|
} else {
|
|
434
|
-
if (t[n] ===
|
|
434
|
+
if (t[n] === o[n])
|
|
435
435
|
continue;
|
|
436
436
|
return !1;
|
|
437
437
|
}
|
|
@@ -440,26 +440,26 @@ function ui() {
|
|
|
440
440
|
return !0;
|
|
441
441
|
}
|
|
442
442
|
try {
|
|
443
|
-
return JSON.stringify(t) === JSON.stringify(
|
|
443
|
+
return JSON.stringify(t) === JSON.stringify(o);
|
|
444
444
|
} catch {
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
447
|
},
|
|
448
|
-
sortAlpha: (t) => (
|
|
449
|
-
let n =
|
|
450
|
-
return Array.isArray(
|
|
448
|
+
sortAlpha: (t) => (o, r) => {
|
|
449
|
+
let n = o[t] === void 0 || o[t] === null ? "" : o[t], a = r[t] === void 0 || r[t] === null ? "" : r[t];
|
|
450
|
+
return Array.isArray(o[t]) && (n = o[t][0]), Array.isArray(r[t]) && (a = r[t][0]), n.localeCompare(a);
|
|
451
451
|
},
|
|
452
452
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
function Nr(e, i, t,
|
|
455
|
+
function Nr(e, i, t, o = {
|
|
456
456
|
fetchedItemsKey: "data",
|
|
457
457
|
searchKeys: ["id"]
|
|
458
458
|
}) {
|
|
459
459
|
t || (t = "100");
|
|
460
460
|
const { axiosInstance: r } = kt({
|
|
461
461
|
headers: e.requestHeaders
|
|
462
|
-
}), { i18n: { t: n } } = Ct(), { debounce:
|
|
462
|
+
}), { i18n: { t: n } } = Ct(), { debounce: a } = Cr(), s = a(async (k) => {
|
|
463
463
|
await u(k);
|
|
464
464
|
}, 200), l = U(!1), d = U(""), m = U(""), p = U([]), _ = U([]), h = U(void 0), x = f(i);
|
|
465
465
|
let b = `${e.apiBaseUrl}${x}`;
|
|
@@ -468,14 +468,14 @@ function Nr(e, i, t, a = {
|
|
|
468
468
|
try {
|
|
469
469
|
l.value = !0;
|
|
470
470
|
const { data: k } = await r.get(`${b}?size=${t}`);
|
|
471
|
-
k != null && k.next || (h.value =
|
|
471
|
+
k != null && k.next || (h.value = o.fetchedItemsKey in k ? k[o.fetchedItemsKey] : []), _.value = o.fetchedItemsKey in k ? k[o.fetchedItemsKey] : [], p.value = _.value;
|
|
472
472
|
} catch {
|
|
473
473
|
p.value = [], d.value = n("debouncedFilter.errors.fetch");
|
|
474
474
|
} finally {
|
|
475
475
|
l.value = !1;
|
|
476
476
|
}
|
|
477
477
|
}, T = U(""), u = async (k) => {
|
|
478
|
-
var E, q,
|
|
478
|
+
var E, q, ae;
|
|
479
479
|
if (T.value !== k)
|
|
480
480
|
if (T.value = k || "", h.value === void 0)
|
|
481
481
|
try {
|
|
@@ -483,16 +483,16 @@ function Nr(e, i, t, a = {
|
|
|
483
483
|
let R = b + "";
|
|
484
484
|
k && (R += `/${k}`);
|
|
485
485
|
const { data: I } = await r.get(`${R}?size=${t}`);
|
|
486
|
-
|
|
486
|
+
o.fetchedItemsKey in I ? p.value = I[o.fetchedItemsKey] : I != null && I.id ? p.value = [I] : p.value = [];
|
|
487
487
|
} else if (k) {
|
|
488
488
|
const R = [];
|
|
489
|
-
$(k) &&
|
|
489
|
+
$(k) && o.searchKeys.includes("id") ? R.push((async () => {
|
|
490
490
|
const { data: K } = await r.get(`${b}/${k}`);
|
|
491
|
-
return [K[
|
|
491
|
+
return [K[o.fetchedItemsKey] ?? K];
|
|
492
492
|
})()) : R.push(
|
|
493
|
-
...
|
|
493
|
+
...o.searchKeys.filter((K) => K !== "id").map(async (K) => {
|
|
494
494
|
const { data: B } = await r.get(`${b}?${K}=${k}`);
|
|
495
|
-
return B[
|
|
495
|
+
return B[o.fetchedItemsKey];
|
|
496
496
|
})
|
|
497
497
|
);
|
|
498
498
|
const I = await Promise.all(R), H = /* @__PURE__ */ new Set();
|
|
@@ -510,10 +510,10 @@ function Nr(e, i, t, a = {
|
|
|
510
510
|
l.value = !1;
|
|
511
511
|
}
|
|
512
512
|
else
|
|
513
|
-
l.value = !0, m.value = "", k ? (p.value = (
|
|
513
|
+
l.value = !0, m.value = "", k ? (p.value = (ae = h.value) == null ? void 0 : ae.filter((R) => {
|
|
514
514
|
var I;
|
|
515
515
|
let H = !1;
|
|
516
|
-
for (const K of
|
|
516
|
+
for (const K of o.searchKeys) {
|
|
517
517
|
const B = typeof R[K] == "string" ? (I = R[K]) == null ? void 0 : I.toLowerCase() : R[K];
|
|
518
518
|
B != null && B.includes(k.toLowerCase()) && (H = !0);
|
|
519
519
|
}
|
|
@@ -531,36 +531,36 @@ function Nr(e, i, t, a = {
|
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
533
|
function qr(e, i) {
|
|
534
|
-
const t = f(i),
|
|
534
|
+
const t = f(i), o = j(
|
|
535
535
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
536
536
|
);
|
|
537
|
-
return
|
|
537
|
+
return o.value.search = "", (r) => `${o.value.href}/${r}`;
|
|
538
538
|
}
|
|
539
539
|
function Ur() {
|
|
540
540
|
const { i18n: { t: e } } = Ct();
|
|
541
541
|
return {
|
|
542
542
|
getMessageFromError: (i) => {
|
|
543
|
-
var t,
|
|
543
|
+
var t, o, r, n;
|
|
544
544
|
if (!i)
|
|
545
545
|
return e("errors.unexpected");
|
|
546
546
|
if (((t = i == null ? void 0 : i.response) == null ? void 0 : t.status) === 401)
|
|
547
547
|
return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."), "";
|
|
548
|
-
if ((
|
|
548
|
+
if ((o = i == null ? void 0 : i.response) != null && o.data) {
|
|
549
549
|
if (i.response.data.detail)
|
|
550
550
|
return i.response.data.detail;
|
|
551
551
|
if ((r = i.response.data.details) != null && r.length)
|
|
552
|
-
return i.response.data.details.map((
|
|
552
|
+
return i.response.data.details.map((a) => {
|
|
553
553
|
let s = e("errors.unexpected");
|
|
554
|
-
return
|
|
554
|
+
return a.messages && typeof a.messages == "object" && a.messages.length && (s = a.messages.join(", ")), a.field ? `${a.field} - ${s}` : s;
|
|
555
555
|
}).join("; ");
|
|
556
556
|
if (i.response.data.message) {
|
|
557
|
-
const { message:
|
|
558
|
-
return Array.isArray(
|
|
557
|
+
const { message: a } = i.response.data;
|
|
558
|
+
return Array.isArray(a) ? (n = a[0]) != null && n.constraints ? Object.values(a[0].constraints)[0] : a[0] : a;
|
|
559
559
|
}
|
|
560
560
|
if (typeof i.response.data == "string")
|
|
561
561
|
return i.response.data;
|
|
562
562
|
if (typeof i.response.data == "object")
|
|
563
|
-
return Object.keys(i.response.data).map((
|
|
563
|
+
return Object.keys(i.response.data).map((a) => `${a} ${i.response.data[a]}`).join(", ");
|
|
564
564
|
}
|
|
565
565
|
return i.message || e("errors.unexpected");
|
|
566
566
|
}
|
|
@@ -569,41 +569,41 @@ function Ur() {
|
|
|
569
569
|
function Lr(e) {
|
|
570
570
|
const i = window.location.origin, t = i.endsWith("/") ? i : `${i}/`;
|
|
571
571
|
try {
|
|
572
|
-
const
|
|
572
|
+
const o = e.join("/"), r = `${t}${o}`, n = e.some((a) => a.trim() === "");
|
|
573
573
|
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(r) && !n && new URL(r))
|
|
574
|
-
return `${t}${
|
|
574
|
+
return `${t}${o}`;
|
|
575
575
|
throw new Error("Invalid url");
|
|
576
|
-
} catch (
|
|
577
|
-
return console.warn("Failed to build valid URL:",
|
|
576
|
+
} catch (o) {
|
|
577
|
+
return console.warn("Failed to build valid URL:", o), "";
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
function di(e, i) {
|
|
581
|
-
const t = U(f(e)),
|
|
581
|
+
const t = U(f(e)), o = U(f(i)), r = j(
|
|
582
582
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
583
583
|
), n = j(
|
|
584
|
-
() =>
|
|
584
|
+
() => o.value.startsWith("/") ? new URL(`${window.location.origin}${o.value}`) : new URL(o.value)
|
|
585
585
|
);
|
|
586
|
-
return (
|
|
587
|
-
const { page: s, pageSize: l, offset: d, sortColumnKey: m, sortColumnOrder: p, query: _ } =
|
|
586
|
+
return (a) => {
|
|
587
|
+
const { page: s, pageSize: l, offset: d, sortColumnKey: m, sortColumnOrder: p, query: _ } = a;
|
|
588
588
|
try {
|
|
589
589
|
let h = new URL(n.value.href);
|
|
590
590
|
return r.value && _ ? (h.search = "", h = t.value.app === "konnect" ? new URL(`${h.href}?filter[name][contains]=${_}`) : new URL(`${h.href}/${_}/`)) : (r.value || new URLSearchParams(_).forEach((x, b) => {
|
|
591
591
|
h.searchParams.append(b, x);
|
|
592
592
|
}), m && h.searchParams.append("sort_by", m), p === "desc" && h.searchParams.append("sort_desc", "1"), h.searchParams.append("size", String(l))), d && s !== 1 && h.searchParams.append("offset", String(d)), h.href;
|
|
593
593
|
} catch (h) {
|
|
594
|
-
return console.error("RouteList(fetcher)", h),
|
|
594
|
+
return console.error("RouteList(fetcher)", h), o.value;
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
598
|
function Kr(e, i, t = "data") {
|
|
599
|
-
const
|
|
599
|
+
const o = f(i), { axiosInstance: r } = kt({
|
|
600
600
|
headers: e.requestHeaders
|
|
601
|
-
}), n = di(e,
|
|
601
|
+
}), n = di(e, o), a = U({
|
|
602
602
|
status: Te.Idle
|
|
603
603
|
});
|
|
604
604
|
return { fetcher: async (s) => {
|
|
605
605
|
try {
|
|
606
|
-
|
|
606
|
+
a.value = { status: Te.Loading };
|
|
607
607
|
let l = n(s);
|
|
608
608
|
l.includes("filter[name]") && (l = `${l}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
609
609
|
const { data: d } = await r.get(l), m = t && t.replace(/[^\w-_]/gi, "");
|
|
@@ -618,7 +618,7 @@ function Kr(e, i, t = "data") {
|
|
|
618
618
|
}
|
|
619
619
|
} : null
|
|
620
620
|
};
|
|
621
|
-
return
|
|
621
|
+
return a.value = {
|
|
622
622
|
status: Te.Idle,
|
|
623
623
|
response: _
|
|
624
624
|
}, _;
|
|
@@ -627,22 +627,22 @@ function Kr(e, i, t = "data") {
|
|
|
627
627
|
data: [],
|
|
628
628
|
total: 0
|
|
629
629
|
};
|
|
630
|
-
return s.query && l.response.status === 404 ? (
|
|
630
|
+
return s.query && l.response.status === 404 ? (a.value = {
|
|
631
631
|
status: Te.NoResults,
|
|
632
632
|
response: d,
|
|
633
633
|
error: l
|
|
634
|
-
}, d) : (
|
|
634
|
+
}, d) : (a.value = {
|
|
635
635
|
status: Te.Error,
|
|
636
636
|
response: d,
|
|
637
637
|
error: l
|
|
638
638
|
}, d);
|
|
639
639
|
}
|
|
640
|
-
}, fetcherState:
|
|
640
|
+
}, fetcherState: a };
|
|
641
641
|
}
|
|
642
642
|
function Br() {
|
|
643
|
-
const e = (t,
|
|
643
|
+
const e = (t, o = "_") => t ? t.split(o).map((r) => r.toLowerCase() === "id" ? r.toUpperCase() : r.charAt(0).toUpperCase() + r.substring(1)).join(" ") : "", i = /(?:^|[\s-:'"])\w/g;
|
|
644
644
|
return {
|
|
645
|
-
capitalize: (t) => t ? t.replace(i, (
|
|
645
|
+
capitalize: (t) => t ? t.replace(i, (o) => o.toUpperCase()) : "",
|
|
646
646
|
convertKeyToTitle: e
|
|
647
647
|
};
|
|
648
648
|
}
|
|
@@ -659,22 +659,22 @@ const pi = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
659
659
|
}, Pr = (e, i) => typeof e != typeof i ? [String(e), String(i)] : [e, i], Rr = (e, i) => {
|
|
660
660
|
if (Ot(e) || Ot(i))
|
|
661
661
|
return 0;
|
|
662
|
-
const [t,
|
|
663
|
-
return t >
|
|
662
|
+
const [t, o] = Pr(Et(e), Et(i));
|
|
663
|
+
return t > o ? 1 : t < o ? -1 : 0;
|
|
664
664
|
}, Ft = (e, i) => {
|
|
665
665
|
for (let t = 0; t < Math.max(e.length, i.length); t++) {
|
|
666
|
-
const
|
|
667
|
-
if (
|
|
668
|
-
return
|
|
666
|
+
const o = Rr(e[t] || "0", i[t] || "0");
|
|
667
|
+
if (o !== 0)
|
|
668
|
+
return o;
|
|
669
669
|
}
|
|
670
670
|
return 0;
|
|
671
671
|
}, Dr = (e, i) => {
|
|
672
|
-
const t = $t(e),
|
|
673
|
-
return
|
|
672
|
+
const t = $t(e), o = $t(i), r = t.pop(), n = o.pop(), a = Ft(t, o);
|
|
673
|
+
return a !== 0 ? a : r && n ? Ft(r.split("."), n.split(".")) : r || n ? r ? -1 : 1 : 0;
|
|
674
674
|
}, Vt = (e, i, t) => {
|
|
675
675
|
Hr(t);
|
|
676
|
-
const
|
|
677
|
-
return fi[t].includes(
|
|
676
|
+
const o = Dr(e, i);
|
|
677
|
+
return fi[t].includes(o);
|
|
678
678
|
}, fi = {
|
|
679
679
|
">": [1],
|
|
680
680
|
">=": [0, 1],
|
|
@@ -692,19 +692,19 @@ function Gr(e) {
|
|
|
692
692
|
const { gatewayInfo: i, supportedRange: t } = e;
|
|
693
693
|
if (!i)
|
|
694
694
|
return !0;
|
|
695
|
-
const { edition:
|
|
695
|
+
const { edition: o, version: r } = i;
|
|
696
696
|
if (!zr(r))
|
|
697
697
|
return console.error("Invalid version"), !1;
|
|
698
|
-
const n = t[
|
|
698
|
+
const n = t[o];
|
|
699
699
|
if (!n)
|
|
700
700
|
return !1;
|
|
701
|
-
const [
|
|
702
|
-
return !(
|
|
701
|
+
const [a, s] = n;
|
|
702
|
+
return !(a && Vt(r, a, "<") || s && Vt(r, s, ">"));
|
|
703
703
|
}
|
|
704
704
|
function Jr(e) {
|
|
705
|
-
const i = U(0), t = U(0),
|
|
705
|
+
const i = U(0), t = U(0), o = U(!1);
|
|
706
706
|
return _e(e, (r) => {
|
|
707
|
-
r && !
|
|
707
|
+
r && !o.value && (i.value = r.offsetWidth, t.value = r.scrollWidth, o.value = !0);
|
|
708
708
|
}), {
|
|
709
709
|
isTruncated: j(() => i.value < t.value)
|
|
710
710
|
};
|
|
@@ -733,16 +733,16 @@ const se = {
|
|
|
733
733
|
iconTitle: Wr
|
|
734
734
|
}, Qr = "kong-ui-copy-uuid-notify", qt = "24px", Xr = (e, i) => {
|
|
735
735
|
const t = e.__vccOpts || e;
|
|
736
|
-
for (const [
|
|
737
|
-
t[
|
|
736
|
+
for (const [o, r] of i)
|
|
737
|
+
t[o] = r;
|
|
738
738
|
return t;
|
|
739
|
-
},
|
|
739
|
+
}, eo = (e) => (ni("data-v-e7863582"), e = e(), li(), e), to = ["aria-hidden"], io = {
|
|
740
740
|
key: 0,
|
|
741
741
|
"data-testid": "kui-icon-svg-title"
|
|
742
|
-
},
|
|
742
|
+
}, ro = /* @__PURE__ */ eo(() => /* @__PURE__ */ N("path", {
|
|
743
743
|
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",
|
|
744
744
|
fill: "currentColor"
|
|
745
|
-
}, null, -1)),
|
|
745
|
+
}, null, -1)), oo = /* @__PURE__ */ re({
|
|
746
746
|
__name: "CopyIcon",
|
|
747
747
|
props: {
|
|
748
748
|
/** The accessibility text provided to screen readers */
|
|
@@ -803,7 +803,7 @@ const se = {
|
|
|
803
803
|
return `${n}px`;
|
|
804
804
|
}
|
|
805
805
|
return qt;
|
|
806
|
-
}),
|
|
806
|
+
}), o = j(() => ({
|
|
807
807
|
boxSizing: "border-box",
|
|
808
808
|
color: i.color,
|
|
809
809
|
display: i.display,
|
|
@@ -815,7 +815,7 @@ const se = {
|
|
|
815
815
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
816
816
|
class: "kui-icon copy-icon",
|
|
817
817
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
818
|
-
style:
|
|
818
|
+
style: ai(o.value)
|
|
819
819
|
}, {
|
|
820
820
|
default: y(() => [
|
|
821
821
|
(v(), M("svg", {
|
|
@@ -828,14 +828,14 @@ const se = {
|
|
|
828
828
|
width: "100%",
|
|
829
829
|
xmlns: "http://www.w3.org/2000/svg"
|
|
830
830
|
}, [
|
|
831
|
-
e.title ? (v(), M("title",
|
|
832
|
-
|
|
833
|
-
], 8,
|
|
831
|
+
e.title ? (v(), M("title", io, O(e.title), 1)) : D("", !0),
|
|
832
|
+
ro
|
|
833
|
+
], 8, to))
|
|
834
834
|
]),
|
|
835
835
|
_: 1
|
|
836
836
|
}, 8, ["aria-hidden", "style"]));
|
|
837
837
|
}
|
|
838
|
-
}),
|
|
838
|
+
}), ao = /* @__PURE__ */ Xr(oo, [["__scopeId", "data-v-e7863582"]]), no = "16px", lo = { class: "kong-ui-copy-uuid" }, so = ["onClick"], Ut = 15, co = /* @__PURE__ */ re({
|
|
839
839
|
__name: "CopyUuid",
|
|
840
840
|
props: {
|
|
841
841
|
uuid: {
|
|
@@ -879,44 +879,44 @@ const se = {
|
|
|
879
879
|
},
|
|
880
880
|
emits: ["success", "error"],
|
|
881
881
|
setup(e, { emit: i }) {
|
|
882
|
-
const { t } = _t("en-us", Zr),
|
|
883
|
-
}),
|
|
884
|
-
label:
|
|
882
|
+
const { t } = _t("en-us", Zr), o = e, r = i, n = o.notify || dr(Qr, () => {
|
|
883
|
+
}), a = j(() => o.idTooltip ? {
|
|
884
|
+
label: o.idTooltip,
|
|
885
885
|
positionFixed: !0,
|
|
886
886
|
placement: "bottomStart"
|
|
887
887
|
} : {
|
|
888
|
-
title:
|
|
889
|
-
}), s = j(() => !!(
|
|
888
|
+
title: o.uuid
|
|
889
|
+
}), s = j(() => !!(o.tooltip && o.successTooltip)), l = U(o.tooltip), d = j(() => o.tooltip ? {
|
|
890
890
|
label: l.value,
|
|
891
891
|
positionFixed: !0,
|
|
892
892
|
maxWidth: "500px",
|
|
893
893
|
placement: "bottomStart"
|
|
894
894
|
} : {}), m = j(() => {
|
|
895
895
|
var h;
|
|
896
|
-
return
|
|
896
|
+
return o.format === "redacted" ? "*****" : o.format === "deleted" ? `*${(h = o.uuid) == null ? void 0 : h.substring(0, 5)}` : o.uuid;
|
|
897
897
|
}), p = (h) => {
|
|
898
898
|
l.value = h, setTimeout(() => {
|
|
899
|
-
l.value =
|
|
899
|
+
l.value = o.tooltip;
|
|
900
900
|
}, 1800);
|
|
901
901
|
}, _ = (h) => {
|
|
902
902
|
var x, b;
|
|
903
|
-
if (!h(
|
|
903
|
+
if (!h(o.uuid)) {
|
|
904
904
|
typeof n == "function" && n({
|
|
905
905
|
type: "error",
|
|
906
906
|
message: t("message.fail")
|
|
907
|
-
}), s.value ? p(t("message.fail")) : r("error",
|
|
907
|
+
}), s.value ? p(t("message.fail")) : r("error", o.uuid);
|
|
908
908
|
return;
|
|
909
909
|
}
|
|
910
|
-
const $ = ((x =
|
|
910
|
+
const $ = ((x = o.uuid) == null ? void 0 : x.length) > Ut, S = o.format === "hidden" || o.format === "redacted" ? t("message.success.prefix") : `"${((b = o.uuid) == null ? void 0 : b.substring(0, Ut)) + ($ ? "..." : "")}"`;
|
|
911
911
|
typeof n == "function" && n({
|
|
912
912
|
type: "success",
|
|
913
913
|
message: `${S}${t("message.success.content")}`
|
|
914
|
-
}), s.value ? p(
|
|
914
|
+
}), s.value ? p(o.successTooltip) : r("success", o.uuid);
|
|
915
915
|
};
|
|
916
916
|
return (h, x) => {
|
|
917
917
|
const b = L("KClipboardProvider");
|
|
918
|
-
return v(), M("div",
|
|
919
|
-
e.format !== "hidden" ? (v(), P($e(e.idTooltip ? "KTooltip" : "div"), pt({ key: 0 },
|
|
918
|
+
return v(), M("div", lo, [
|
|
919
|
+
e.format !== "hidden" ? (v(), P($e(e.idTooltip ? "KTooltip" : "div"), pt({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
920
920
|
default: y(() => [
|
|
921
921
|
N("div", {
|
|
922
922
|
class: Se([
|
|
@@ -938,14 +938,14 @@ const se = {
|
|
|
938
938
|
tabindex: "0",
|
|
939
939
|
onClick: qe((S) => _($), ["stop"])
|
|
940
940
|
}, [
|
|
941
|
-
C(f(
|
|
941
|
+
C(f(ao), {
|
|
942
942
|
class: "uuid-icon",
|
|
943
943
|
color: e.iconColor,
|
|
944
944
|
decorative: !!e.tooltip,
|
|
945
|
-
size: f(
|
|
945
|
+
size: f(no),
|
|
946
946
|
title: f(t)("iconTitle")
|
|
947
947
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
948
|
-
], 8,
|
|
948
|
+
], 8, so)
|
|
949
949
|
]),
|
|
950
950
|
_: 1
|
|
951
951
|
})
|
|
@@ -955,15 +955,15 @@ const se = {
|
|
|
955
955
|
]);
|
|
956
956
|
};
|
|
957
957
|
}
|
|
958
|
-
}),
|
|
958
|
+
}), uo = (e, i) => {
|
|
959
959
|
const t = e.__vccOpts || e;
|
|
960
|
-
for (const [
|
|
961
|
-
t[
|
|
960
|
+
for (const [o, r] of i)
|
|
961
|
+
t[o] = r;
|
|
962
962
|
return t;
|
|
963
|
-
}, mi = /* @__PURE__ */
|
|
963
|
+
}, mi = /* @__PURE__ */ uo(co, [["__scopeId", "data-v-0c07874b"]]), po = {
|
|
964
964
|
key: 0,
|
|
965
965
|
class: "config-card-fieldset-title"
|
|
966
|
-
},
|
|
966
|
+
}, fo = /* @__PURE__ */ re({
|
|
967
967
|
__name: "JsonCardItem",
|
|
968
968
|
props: {
|
|
969
969
|
item: {
|
|
@@ -980,26 +980,26 @@ const se = {
|
|
|
980
980
|
}
|
|
981
981
|
},
|
|
982
982
|
setup(e) {
|
|
983
|
-
const i = e, { i18n: { t } } = se.useI18n(), { convertKeyToTitle:
|
|
983
|
+
const i = e, { i18n: { t } } = se.useI18n(), { convertKeyToTitle: o } = se.useStringHelpers(), r = j(() => i.item.key ?? "json-array-item"), n = j(() => i.item.value ?? i.item), a = j(() => {
|
|
984
984
|
const l = JSON.parse(JSON.stringify(n.value));
|
|
985
985
|
return i.isArrayItem && delete l.name, l;
|
|
986
986
|
}), s = j(() => {
|
|
987
987
|
var l;
|
|
988
|
-
return i.isArrayItem ? (l = n.value) != null && l.name ?
|
|
988
|
+
return i.isArrayItem ? (l = n.value) != null && l.name ? o(n.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: i.index }) : "";
|
|
989
989
|
});
|
|
990
990
|
return (l, d) => (v(), P($e(e.isArrayItem ? "fieldset" : "div"), {
|
|
991
991
|
class: Se(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
992
992
|
}, {
|
|
993
993
|
default: y(() => [
|
|
994
|
-
e.isArrayItem ? (v(), M("legend",
|
|
994
|
+
e.isArrayItem ? (v(), M("legend", po, [
|
|
995
995
|
N("b", null, O(s.value), 1)
|
|
996
996
|
])) : D("", !0),
|
|
997
|
-
(v(!0), M(ve, null, ye(Object.keys(
|
|
997
|
+
(v(!0), M(ve, null, ye(Object.keys(a.value), (m, p) => (v(), P(St, {
|
|
998
998
|
key: `${r.value}-property-${p}`,
|
|
999
999
|
item: {
|
|
1000
1000
|
key: m,
|
|
1001
|
-
label: f(
|
|
1002
|
-
value:
|
|
1001
|
+
label: f(o)(m),
|
|
1002
|
+
value: a.value[m]
|
|
1003
1003
|
}
|
|
1004
1004
|
}, null, 8, ["item"]))), 128))
|
|
1005
1005
|
]),
|
|
@@ -1008,10 +1008,10 @@ const se = {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
}), he = (e, i) => {
|
|
1010
1010
|
const t = e.__vccOpts || e;
|
|
1011
|
-
for (const [
|
|
1012
|
-
t[
|
|
1011
|
+
for (const [o, r] of i)
|
|
1012
|
+
t[o] = r;
|
|
1013
1013
|
return t;
|
|
1014
|
-
}, gi = /* @__PURE__ */ he(
|
|
1014
|
+
}, gi = /* @__PURE__ */ he(fo, [["__scopeId", "data-v-68ca83ec"]]), mo = /* @__PURE__ */ re({
|
|
1015
1015
|
__name: "InternalLinkItem",
|
|
1016
1016
|
props: {
|
|
1017
1017
|
item: {
|
|
@@ -1022,13 +1022,13 @@ const se = {
|
|
|
1022
1022
|
emits: ["navigation-click"],
|
|
1023
1023
|
setup(e) {
|
|
1024
1024
|
const { i18n: { t: i } } = se.useI18n();
|
|
1025
|
-
return (t,
|
|
1025
|
+
return (t, o) => {
|
|
1026
1026
|
const r = L("KButton");
|
|
1027
1027
|
return v(), M("div", null, [
|
|
1028
1028
|
C(r, {
|
|
1029
1029
|
appearance: "tertiary",
|
|
1030
1030
|
class: "navigation-button",
|
|
1031
|
-
onClick:
|
|
1031
|
+
onClick: o[0] || (o[0] = (n) => t.$emit("navigation-click", e.item))
|
|
1032
1032
|
}, {
|
|
1033
1033
|
default: y(() => [
|
|
1034
1034
|
G(O(e.item.value || f(i)("baseConfigCard.commonFields.link")), 1)
|
|
@@ -1038,7 +1038,7 @@ const se = {
|
|
|
1038
1038
|
]);
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
}),
|
|
1041
|
+
}), go = /* @__PURE__ */ he(mo, [["__scopeId", "data-v-c96811e5"]]), yo = /* @__PURE__ */ re({
|
|
1042
1042
|
__name: "StatusBadge",
|
|
1043
1043
|
props: {
|
|
1044
1044
|
status: {
|
|
@@ -1048,7 +1048,7 @@ const se = {
|
|
|
1048
1048
|
},
|
|
1049
1049
|
setup(e) {
|
|
1050
1050
|
const { i18n: { t: i } } = se.useI18n();
|
|
1051
|
-
return (t,
|
|
1051
|
+
return (t, o) => {
|
|
1052
1052
|
const r = L("KBadge");
|
|
1053
1053
|
return v(), P(r, {
|
|
1054
1054
|
appearance: e.status ? "success" : "neutral"
|
|
@@ -1060,11 +1060,11 @@ const se = {
|
|
|
1060
1060
|
}, 8, ["appearance"]);
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
|
-
}),
|
|
1063
|
+
}), vo = "#0044f4", ho = "#e0e4ea", bo = "#3a3f51", wo = "1px", _o = "20px", ko = { class: "config-card-details-row" }, Co = ["data-testid"], So = ["data-testid"], Io = ["data-testid"], Ao = ["data-testid"], xo = { key: 1 }, To = ["data-testid"], jo = ["data-testid"], Mo = ["data-testid"], $o = ["data-testid"], Oo = {
|
|
1064
1064
|
name: "ConfigCardItem",
|
|
1065
|
-
components: { CopyUuid: mi, JsonCardItem: gi, StatusBadge:
|
|
1066
|
-
},
|
|
1067
|
-
|
|
1065
|
+
components: { CopyUuid: mi, JsonCardItem: gi, StatusBadge: yo, InternalLinkItem: go }
|
|
1066
|
+
}, Eo = /* @__PURE__ */ re({
|
|
1067
|
+
...Oo,
|
|
1068
1068
|
props: {
|
|
1069
1069
|
item: {
|
|
1070
1070
|
type: Object,
|
|
@@ -1084,12 +1084,12 @@ const se = {
|
|
|
1084
1084
|
emits: ["navigation-click"],
|
|
1085
1085
|
setup(e, { emit: i }) {
|
|
1086
1086
|
ri((x) => ({
|
|
1087
|
-
"0da74440": m.value ? "none" : `solid ${f(
|
|
1087
|
+
"0da74440": m.value ? "none" : `solid ${f(wo)} ${f(ho)}`,
|
|
1088
1088
|
"02a039da": d.value && s.value ? "block" : "flex",
|
|
1089
1089
|
"690f3ced": d.value && s.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1090
1090
|
"691182c8": d.value && s.value ? "100%" : t.slim ? "50%" : "75%"
|
|
1091
1091
|
}));
|
|
1092
|
-
const t = e,
|
|
1092
|
+
const t = e, o = i, r = ot(), { i18n: { t: n, formatUnixTimeStamp: a } } = se.useI18n(), s = j(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), l = j(() => !!(t.item.tooltip || r["label-tooltip"])), d = j(() => t.item.type === te.Json || t.item.type === te.JsonArray), m = j(() => t.item.type === te.JsonArray), p = j(() => {
|
|
1093
1093
|
switch (t.item.type) {
|
|
1094
1094
|
case te.ID:
|
|
1095
1095
|
return {
|
|
@@ -1149,7 +1149,7 @@ const se = {
|
|
|
1149
1149
|
attrs: {
|
|
1150
1150
|
"data-testid": `${t.item.key}-date`
|
|
1151
1151
|
},
|
|
1152
|
-
text:
|
|
1152
|
+
text: a(t.item.value)
|
|
1153
1153
|
};
|
|
1154
1154
|
case te.BadgeStatus:
|
|
1155
1155
|
return {
|
|
@@ -1176,7 +1176,7 @@ const se = {
|
|
|
1176
1176
|
"data-testid": `${t.item.key}-internal-link`,
|
|
1177
1177
|
item: t.item,
|
|
1178
1178
|
onNavigationClick: (x) => {
|
|
1179
|
-
|
|
1179
|
+
o("navigation-click", x);
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
};
|
|
@@ -1218,7 +1218,7 @@ const se = {
|
|
|
1218
1218
|
}), _ = U(), { isTruncated: h } = se.useTruncationDetector(_);
|
|
1219
1219
|
return (x, b) => {
|
|
1220
1220
|
const $ = L("KLabel"), S = L("KBadge"), T = L("KTooltip");
|
|
1221
|
-
return v(), M("div",
|
|
1221
|
+
return v(), M("div", ko, [
|
|
1222
1222
|
N("div", {
|
|
1223
1223
|
class: "config-card-details-label",
|
|
1224
1224
|
"data-testid": `${e.item.key}-label`
|
|
@@ -1239,13 +1239,13 @@ const se = {
|
|
|
1239
1239
|
Q(x.$slots, "label-tooltip", {}, () => [
|
|
1240
1240
|
G(O(e.item.tooltip), 1)
|
|
1241
1241
|
], !0)
|
|
1242
|
-
], 8,
|
|
1242
|
+
], 8, So)
|
|
1243
1243
|
]),
|
|
1244
1244
|
key: "0"
|
|
1245
1245
|
} : void 0
|
|
1246
1246
|
]), 1024)
|
|
1247
1247
|
], !0)
|
|
1248
|
-
], 8,
|
|
1248
|
+
], 8, Co),
|
|
1249
1249
|
N("div", {
|
|
1250
1250
|
class: "config-card-details-value",
|
|
1251
1251
|
"data-testid": `${e.item.key}-property-value`
|
|
@@ -1253,7 +1253,7 @@ const se = {
|
|
|
1253
1253
|
Q(x.$slots, e.item.key, {
|
|
1254
1254
|
rowValue: e.item.value
|
|
1255
1255
|
}, () => [
|
|
1256
|
-
s.value ? (v(), M("div",
|
|
1256
|
+
s.value ? (v(), M("div", xo, [
|
|
1257
1257
|
(v(), P($e(p.value.tag), sr(cr(p.value.attrs)), {
|
|
1258
1258
|
default: y(() => [
|
|
1259
1259
|
p.value.additionalComponent === "KBadge" ? (v(), M("div", {
|
|
@@ -1272,7 +1272,7 @@ const se = {
|
|
|
1272
1272
|
]),
|
|
1273
1273
|
_: 2
|
|
1274
1274
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
1275
|
-
], 8,
|
|
1275
|
+
], 8, To)) : D("", !0),
|
|
1276
1276
|
p.value.additionalComponent === "CopyUuid" ? (v(), M("div", {
|
|
1277
1277
|
key: 1,
|
|
1278
1278
|
class: "copy-uuid-array",
|
|
@@ -1283,7 +1283,7 @@ const se = {
|
|
|
1283
1283
|
"data-testid": `${e.item.key}-copy-uuid-${k}`,
|
|
1284
1284
|
uuid: u
|
|
1285
1285
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1286
|
-
], 8,
|
|
1286
|
+
], 8, jo)) : p.value.additionalComponent === "KMethodBadge" ? (v(), M("div", {
|
|
1287
1287
|
key: 2,
|
|
1288
1288
|
class: "method-badge-array",
|
|
1289
1289
|
"data-testid": `${e.item.key}-badge-methods`
|
|
@@ -1299,7 +1299,7 @@ const se = {
|
|
|
1299
1299
|
]),
|
|
1300
1300
|
_: 2
|
|
1301
1301
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1302
|
-
], 8,
|
|
1302
|
+
], 8, Mo)) : D("", !0),
|
|
1303
1303
|
p.value.additionalComponent === "JsonCardItem" ? (v(), M("div", {
|
|
1304
1304
|
key: 3,
|
|
1305
1305
|
"data-testid": `${t.item.key}-json-array-content`
|
|
@@ -1310,7 +1310,7 @@ const se = {
|
|
|
1310
1310
|
"is-array-item": "",
|
|
1311
1311
|
item: u
|
|
1312
1312
|
}, null, 8, ["index", "item"]))), 128))
|
|
1313
|
-
], 8,
|
|
1313
|
+
], 8, $o)) : (v(), P(T, {
|
|
1314
1314
|
key: 4,
|
|
1315
1315
|
label: f(h) ? e.item.value : ""
|
|
1316
1316
|
}, {
|
|
@@ -1329,13 +1329,13 @@ const se = {
|
|
|
1329
1329
|
])) : (v(), M("div", {
|
|
1330
1330
|
key: 0,
|
|
1331
1331
|
"data-testid": `${e.item.key}-no-value`
|
|
1332
|
-
}, " – ", 8,
|
|
1332
|
+
}, " – ", 8, Ao))
|
|
1333
1333
|
], !0)
|
|
1334
|
-
], 8,
|
|
1334
|
+
], 8, Io)
|
|
1335
1335
|
]);
|
|
1336
1336
|
};
|
|
1337
1337
|
}
|
|
1338
|
-
}), St = /* @__PURE__ */ he(
|
|
1338
|
+
}), St = /* @__PURE__ */ he(Eo, [["__scopeId", "data-v-9c87856b"]]), Fo = { class: "json-config" }, Vo = {
|
|
1339
1339
|
key: 0,
|
|
1340
1340
|
class: "json-endpoint"
|
|
1341
1341
|
}, yi = /* @__PURE__ */ re({
|
|
@@ -1367,9 +1367,9 @@ const se = {
|
|
|
1367
1367
|
},
|
|
1368
1368
|
setup(e) {
|
|
1369
1369
|
ri((r) => ({
|
|
1370
|
-
50594668: `${
|
|
1370
|
+
50594668: `${o.value}ch`
|
|
1371
1371
|
}));
|
|
1372
|
-
const i = e, t = Ze(i.jsonRecord),
|
|
1372
|
+
const i = e, t = Ze(i.jsonRecord), o = j(() => {
|
|
1373
1373
|
var r;
|
|
1374
1374
|
if (!i.fetcherUrl)
|
|
1375
1375
|
return 0;
|
|
@@ -1377,10 +1377,10 @@ const se = {
|
|
|
1377
1377
|
return n.length < 2 ? 0 : 41 + (i.requestMethod === "post" ? n[n.length - 1] : n[n.length - 2]).length;
|
|
1378
1378
|
});
|
|
1379
1379
|
return (r, n) => {
|
|
1380
|
-
var
|
|
1380
|
+
var a;
|
|
1381
1381
|
const s = L("KBadge"), l = L("KCodeBlock");
|
|
1382
|
-
return v(), M("div",
|
|
1383
|
-
i.fetcherUrl && (
|
|
1382
|
+
return v(), M("div", Fo, [
|
|
1383
|
+
i.fetcherUrl && (a = i.config) != null && a.jsonYamlFormsEnabled ? (v(), M("div", Vo, [
|
|
1384
1384
|
C(s, {
|
|
1385
1385
|
appearance: i.requestMethod
|
|
1386
1386
|
}, {
|
|
@@ -1413,41 +1413,41 @@ const se = {
|
|
|
1413
1413
|
function vi(e) {
|
|
1414
1414
|
return typeof e > "u" || e === null;
|
|
1415
1415
|
}
|
|
1416
|
-
function
|
|
1416
|
+
function No(e) {
|
|
1417
1417
|
return typeof e == "object" && e !== null;
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function qo(e) {
|
|
1420
1420
|
return Array.isArray(e) ? e : vi(e) ? [] : [e];
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1423
|
-
var t,
|
|
1422
|
+
function Uo(e, i) {
|
|
1423
|
+
var t, o, r, n;
|
|
1424
1424
|
if (i)
|
|
1425
|
-
for (n = Object.keys(i), t = 0,
|
|
1425
|
+
for (n = Object.keys(i), t = 0, o = n.length; t < o; t += 1)
|
|
1426
1426
|
r = n[t], e[r] = i[r];
|
|
1427
1427
|
return e;
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1430
|
-
var t = "",
|
|
1431
|
-
for (
|
|
1429
|
+
function Lo(e, i) {
|
|
1430
|
+
var t = "", o;
|
|
1431
|
+
for (o = 0; o < i; o += 1)
|
|
1432
1432
|
t += e;
|
|
1433
1433
|
return t;
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1435
|
+
function Ko(e) {
|
|
1436
1436
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1437
1437
|
}
|
|
1438
|
-
var
|
|
1439
|
-
isNothing:
|
|
1440
|
-
isObject:
|
|
1441
|
-
toArray:
|
|
1442
|
-
repeat:
|
|
1443
|
-
isNegativeZero:
|
|
1444
|
-
extend:
|
|
1438
|
+
var Bo = vi, Po = No, Ro = qo, Do = Lo, Ho = Ko, zo = Uo, le = {
|
|
1439
|
+
isNothing: Bo,
|
|
1440
|
+
isObject: Po,
|
|
1441
|
+
toArray: Ro,
|
|
1442
|
+
repeat: Do,
|
|
1443
|
+
isNegativeZero: Ho,
|
|
1444
|
+
extend: zo
|
|
1445
1445
|
};
|
|
1446
1446
|
function hi(e, i) {
|
|
1447
|
-
var t = "",
|
|
1447
|
+
var t = "", o = e.reason || "(unknown reason)";
|
|
1448
1448
|
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !i && e.mark.snippet && (t += `
|
|
1449
1449
|
|
|
1450
|
-
` + e.mark.snippet),
|
|
1450
|
+
` + e.mark.snippet), o + " " + t) : o;
|
|
1451
1451
|
}
|
|
1452
1452
|
function ze(e, i) {
|
|
1453
1453
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = i, this.message = hi(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
@@ -1458,48 +1458,48 @@ ze.prototype.toString = function(e) {
|
|
|
1458
1458
|
return this.name + ": " + hi(this, e);
|
|
1459
1459
|
};
|
|
1460
1460
|
var me = ze;
|
|
1461
|
-
function ct(e, i, t,
|
|
1462
|
-
var n = "",
|
|
1463
|
-
return
|
|
1464
|
-
str: n + e.slice(i, t).replace(/\t/g, "→") +
|
|
1465
|
-
pos:
|
|
1461
|
+
function ct(e, i, t, o, r) {
|
|
1462
|
+
var n = "", a = "", s = Math.floor(r / 2) - 1;
|
|
1463
|
+
return o - i > s && (n = " ... ", i = o - s + n.length), t - o > s && (a = " ...", t = o + s - a.length), {
|
|
1464
|
+
str: n + e.slice(i, t).replace(/\t/g, "→") + a,
|
|
1465
|
+
pos: o - i + n.length
|
|
1466
1466
|
// relative position
|
|
1467
1467
|
};
|
|
1468
1468
|
}
|
|
1469
1469
|
function ut(e, i) {
|
|
1470
1470
|
return le.repeat(" ", i - e.length) + e;
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function Go(e, i) {
|
|
1473
1473
|
if (i = Object.create(i || null), !e.buffer)
|
|
1474
1474
|
return null;
|
|
1475
1475
|
i.maxLength || (i.maxLength = 79), typeof i.indent != "number" && (i.indent = 1), typeof i.linesBefore != "number" && (i.linesBefore = 3), typeof i.linesAfter != "number" && (i.linesAfter = 2);
|
|
1476
|
-
for (var t = /\r?\n|\r|\0/g,
|
|
1477
|
-
r.push(n.index),
|
|
1478
|
-
|
|
1476
|
+
for (var t = /\r?\n|\r|\0/g, o = [0], r = [], n, a = -1; n = t.exec(e.buffer); )
|
|
1477
|
+
r.push(n.index), o.push(n.index + n[0].length), e.position <= n.index && a < 0 && (a = o.length - 2);
|
|
1478
|
+
a < 0 && (a = o.length - 1);
|
|
1479
1479
|
var s = "", l, d, m = Math.min(e.line + i.linesAfter, r.length).toString().length, p = i.maxLength - (i.indent + m + 3);
|
|
1480
|
-
for (l = 1; l <= i.linesBefore && !(
|
|
1480
|
+
for (l = 1; l <= i.linesBefore && !(a - l < 0); l++)
|
|
1481
1481
|
d = ct(
|
|
1482
1482
|
e.buffer,
|
|
1483
|
-
a
|
|
1484
|
-
r[
|
|
1485
|
-
e.position - (a
|
|
1483
|
+
o[a - l],
|
|
1484
|
+
r[a - l],
|
|
1485
|
+
e.position - (o[a] - o[a - l]),
|
|
1486
1486
|
p
|
|
1487
1487
|
), s = le.repeat(" ", i.indent) + ut((e.line - l + 1).toString(), m) + " | " + d.str + `
|
|
1488
1488
|
` + s;
|
|
1489
|
-
for (d = ct(e.buffer, a
|
|
1489
|
+
for (d = ct(e.buffer, o[a], r[a], e.position, p), s += le.repeat(" ", i.indent) + ut((e.line + 1).toString(), m) + " | " + d.str + `
|
|
1490
1490
|
`, s += le.repeat("-", i.indent + m + 3 + d.pos) + `^
|
|
1491
|
-
`, l = 1; l <= i.linesAfter && !(
|
|
1491
|
+
`, l = 1; l <= i.linesAfter && !(a + l >= r.length); l++)
|
|
1492
1492
|
d = ct(
|
|
1493
1493
|
e.buffer,
|
|
1494
|
-
a
|
|
1495
|
-
r[
|
|
1496
|
-
e.position - (a
|
|
1494
|
+
o[a + l],
|
|
1495
|
+
r[a + l],
|
|
1496
|
+
e.position - (o[a] - o[a + l]),
|
|
1497
1497
|
p
|
|
1498
1498
|
), s += le.repeat(" ", i.indent) + ut((e.line + l + 1).toString(), m) + " | " + d.str + `
|
|
1499
1499
|
`;
|
|
1500
1500
|
return s.replace(/\n$/, "");
|
|
1501
1501
|
}
|
|
1502
|
-
var
|
|
1502
|
+
var Jo = Go, Yo = [
|
|
1503
1503
|
"kind",
|
|
1504
1504
|
"multi",
|
|
1505
1505
|
"resolve",
|
|
@@ -1510,41 +1510,41 @@ var Ga = za, Ja = [
|
|
|
1510
1510
|
"representName",
|
|
1511
1511
|
"defaultStyle",
|
|
1512
1512
|
"styleAliases"
|
|
1513
|
-
],
|
|
1513
|
+
], Wo = [
|
|
1514
1514
|
"scalar",
|
|
1515
1515
|
"sequence",
|
|
1516
1516
|
"mapping"
|
|
1517
1517
|
];
|
|
1518
|
-
function
|
|
1518
|
+
function Zo(e) {
|
|
1519
1519
|
var i = {};
|
|
1520
1520
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1521
|
-
e[t].forEach(function(
|
|
1522
|
-
i[String(
|
|
1521
|
+
e[t].forEach(function(o) {
|
|
1522
|
+
i[String(o)] = t;
|
|
1523
1523
|
});
|
|
1524
1524
|
}), i;
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function Qo(e, i) {
|
|
1527
1527
|
if (i = i || {}, Object.keys(i).forEach(function(t) {
|
|
1528
|
-
if (
|
|
1528
|
+
if (Yo.indexOf(t) === -1)
|
|
1529
1529
|
throw new me('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1530
1530
|
}), this.options = i, this.tag = e, this.kind = i.kind || null, this.resolve = i.resolve || function() {
|
|
1531
1531
|
return !0;
|
|
1532
1532
|
}, this.construct = i.construct || function(t) {
|
|
1533
1533
|
return t;
|
|
1534
|
-
}, this.instanceOf = i.instanceOf || null, this.predicate = i.predicate || null, this.represent = i.represent || null, this.representName = i.representName || null, this.defaultStyle = i.defaultStyle || null, this.multi = i.multi || !1, this.styleAliases =
|
|
1534
|
+
}, this.instanceOf = i.instanceOf || null, this.predicate = i.predicate || null, this.represent = i.represent || null, this.representName = i.representName || null, this.defaultStyle = i.defaultStyle || null, this.multi = i.multi || !1, this.styleAliases = Zo(i.styleAliases || null), Wo.indexOf(this.kind) === -1)
|
|
1535
1535
|
throw new me('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1536
1536
|
}
|
|
1537
|
-
var de =
|
|
1537
|
+
var de = Qo;
|
|
1538
1538
|
function Lt(e, i) {
|
|
1539
1539
|
var t = [];
|
|
1540
|
-
return e[i].forEach(function(
|
|
1540
|
+
return e[i].forEach(function(o) {
|
|
1541
1541
|
var r = t.length;
|
|
1542
|
-
t.forEach(function(n,
|
|
1543
|
-
n.tag ===
|
|
1544
|
-
}), t[r] =
|
|
1542
|
+
t.forEach(function(n, a) {
|
|
1543
|
+
n.tag === o.tag && n.kind === o.kind && n.multi === o.multi && (r = a);
|
|
1544
|
+
}), t[r] = o;
|
|
1545
1545
|
}), t;
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function Xo() {
|
|
1548
1548
|
var e = {
|
|
1549
1549
|
scalar: {},
|
|
1550
1550
|
sequence: {},
|
|
@@ -1557,11 +1557,11 @@ function Qa() {
|
|
|
1557
1557
|
fallback: []
|
|
1558
1558
|
}
|
|
1559
1559
|
}, i, t;
|
|
1560
|
-
function
|
|
1560
|
+
function o(r) {
|
|
1561
1561
|
r.multi ? (e.multi[r.kind].push(r), e.multi.fallback.push(r)) : e[r.kind][r.tag] = e.fallback[r.tag] = r;
|
|
1562
1562
|
}
|
|
1563
1563
|
for (i = 0, t = arguments.length; i < t; i += 1)
|
|
1564
|
-
arguments[i].forEach(
|
|
1564
|
+
arguments[i].forEach(o);
|
|
1565
1565
|
return e;
|
|
1566
1566
|
}
|
|
1567
1567
|
function mt(e) {
|
|
@@ -1588,8 +1588,8 @@ mt.prototype.extend = function(e) {
|
|
|
1588
1588
|
if (!(r instanceof de))
|
|
1589
1589
|
throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1590
1590
|
});
|
|
1591
|
-
var
|
|
1592
|
-
return
|
|
1591
|
+
var o = Object.create(mt.prototype);
|
|
1592
|
+
return o.implicit = (this.implicit || []).concat(i), o.explicit = (this.explicit || []).concat(t), o.compiledImplicit = Lt(o, "implicit"), o.compiledExplicit = Lt(o, "explicit"), o.compiledTypeMap = Xo(o.compiledImplicit, o.compiledExplicit), o;
|
|
1593
1593
|
};
|
|
1594
1594
|
var bi = mt, wi = new de("tag:yaml.org,2002:str", {
|
|
1595
1595
|
kind: "scalar",
|
|
@@ -1613,23 +1613,23 @@ var bi = mt, wi = new de("tag:yaml.org,2002:str", {
|
|
|
1613
1613
|
ki
|
|
1614
1614
|
]
|
|
1615
1615
|
});
|
|
1616
|
-
function
|
|
1616
|
+
function ea(e) {
|
|
1617
1617
|
if (e === null)
|
|
1618
1618
|
return !0;
|
|
1619
1619
|
var i = e.length;
|
|
1620
1620
|
return i === 1 && e === "~" || i === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1621
1621
|
}
|
|
1622
|
-
function
|
|
1622
|
+
function ta() {
|
|
1623
1623
|
return null;
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function ia(e) {
|
|
1626
1626
|
return e === null;
|
|
1627
1627
|
}
|
|
1628
1628
|
var Si = new de("tag:yaml.org,2002:null", {
|
|
1629
1629
|
kind: "scalar",
|
|
1630
|
-
resolve:
|
|
1631
|
-
construct:
|
|
1632
|
-
predicate:
|
|
1630
|
+
resolve: ea,
|
|
1631
|
+
construct: ta,
|
|
1632
|
+
predicate: ia,
|
|
1633
1633
|
represent: {
|
|
1634
1634
|
canonical: function() {
|
|
1635
1635
|
return "~";
|
|
@@ -1649,23 +1649,23 @@ var Si = new de("tag:yaml.org,2002:null", {
|
|
|
1649
1649
|
},
|
|
1650
1650
|
defaultStyle: "lowercase"
|
|
1651
1651
|
});
|
|
1652
|
-
function
|
|
1652
|
+
function ra(e) {
|
|
1653
1653
|
if (e === null)
|
|
1654
1654
|
return !1;
|
|
1655
1655
|
var i = e.length;
|
|
1656
1656
|
return i === 4 && (e === "true" || e === "True" || e === "TRUE") || i === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function oa(e) {
|
|
1659
1659
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1661
|
+
function aa(e) {
|
|
1662
1662
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1663
1663
|
}
|
|
1664
1664
|
var Ii = new de("tag:yaml.org,2002:bool", {
|
|
1665
1665
|
kind: "scalar",
|
|
1666
|
-
resolve:
|
|
1667
|
-
construct:
|
|
1668
|
-
predicate:
|
|
1666
|
+
resolve: ra,
|
|
1667
|
+
construct: oa,
|
|
1668
|
+
predicate: aa,
|
|
1669
1669
|
represent: {
|
|
1670
1670
|
lowercase: function(e) {
|
|
1671
1671
|
return e ? "true" : "false";
|
|
@@ -1679,19 +1679,19 @@ var Ii = new de("tag:yaml.org,2002:bool", {
|
|
|
1679
1679
|
},
|
|
1680
1680
|
defaultStyle: "lowercase"
|
|
1681
1681
|
});
|
|
1682
|
-
function
|
|
1682
|
+
function na(e) {
|
|
1683
1683
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1685
|
+
function la(e) {
|
|
1686
1686
|
return 48 <= e && e <= 55;
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1688
|
+
function sa(e) {
|
|
1689
1689
|
return 48 <= e && e <= 57;
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function ca(e) {
|
|
1692
1692
|
if (e === null)
|
|
1693
1693
|
return !1;
|
|
1694
|
-
var i = e.length, t = 0,
|
|
1694
|
+
var i = e.length, t = 0, o = !1, r;
|
|
1695
1695
|
if (!i)
|
|
1696
1696
|
return !1;
|
|
1697
1697
|
if (r = e[t], (r === "-" || r === "+") && (r = e[++t]), r === "0") {
|
|
@@ -1702,44 +1702,44 @@ function so(e) {
|
|
|
1702
1702
|
if (r = e[t], r !== "_") {
|
|
1703
1703
|
if (r !== "0" && r !== "1")
|
|
1704
1704
|
return !1;
|
|
1705
|
-
|
|
1705
|
+
o = !0;
|
|
1706
1706
|
}
|
|
1707
|
-
return
|
|
1707
|
+
return o && r !== "_";
|
|
1708
1708
|
}
|
|
1709
1709
|
if (r === "x") {
|
|
1710
1710
|
for (t++; t < i; t++)
|
|
1711
1711
|
if (r = e[t], r !== "_") {
|
|
1712
|
-
if (!
|
|
1712
|
+
if (!na(e.charCodeAt(t)))
|
|
1713
1713
|
return !1;
|
|
1714
|
-
|
|
1714
|
+
o = !0;
|
|
1715
1715
|
}
|
|
1716
|
-
return
|
|
1716
|
+
return o && r !== "_";
|
|
1717
1717
|
}
|
|
1718
1718
|
if (r === "o") {
|
|
1719
1719
|
for (t++; t < i; t++)
|
|
1720
1720
|
if (r = e[t], r !== "_") {
|
|
1721
|
-
if (!
|
|
1721
|
+
if (!la(e.charCodeAt(t)))
|
|
1722
1722
|
return !1;
|
|
1723
|
-
|
|
1723
|
+
o = !0;
|
|
1724
1724
|
}
|
|
1725
|
-
return
|
|
1725
|
+
return o && r !== "_";
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
if (r === "_")
|
|
1729
1729
|
return !1;
|
|
1730
1730
|
for (; t < i; t++)
|
|
1731
1731
|
if (r = e[t], r !== "_") {
|
|
1732
|
-
if (!
|
|
1732
|
+
if (!sa(e.charCodeAt(t)))
|
|
1733
1733
|
return !1;
|
|
1734
|
-
|
|
1734
|
+
o = !0;
|
|
1735
1735
|
}
|
|
1736
|
-
return !(!
|
|
1736
|
+
return !(!o || r === "_");
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1739
|
-
var i = e, t = 1,
|
|
1740
|
-
if (i.indexOf("_") !== -1 && (i = i.replace(/_/g, "")),
|
|
1738
|
+
function ua(e) {
|
|
1739
|
+
var i = e, t = 1, o;
|
|
1740
|
+
if (i.indexOf("_") !== -1 && (i = i.replace(/_/g, "")), o = i[0], (o === "-" || o === "+") && (o === "-" && (t = -1), i = i.slice(1), o = i[0]), i === "0")
|
|
1741
1741
|
return 0;
|
|
1742
|
-
if (
|
|
1742
|
+
if (o === "0") {
|
|
1743
1743
|
if (i[1] === "b")
|
|
1744
1744
|
return t * parseInt(i.slice(2), 2);
|
|
1745
1745
|
if (i[1] === "x")
|
|
@@ -1749,14 +1749,14 @@ function co(e) {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
return t * parseInt(i, 10);
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function da(e) {
|
|
1753
1753
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !le.isNegativeZero(e);
|
|
1754
1754
|
}
|
|
1755
1755
|
var Ai = new de("tag:yaml.org,2002:int", {
|
|
1756
1756
|
kind: "scalar",
|
|
1757
|
-
resolve:
|
|
1758
|
-
construct:
|
|
1759
|
-
predicate:
|
|
1757
|
+
resolve: ca,
|
|
1758
|
+
construct: ua,
|
|
1759
|
+
predicate: da,
|
|
1760
1760
|
represent: {
|
|
1761
1761
|
binary: function(e) {
|
|
1762
1762
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1779,21 +1779,21 @@ var Ai = new de("tag:yaml.org,2002:int", {
|
|
|
1779
1779
|
decimal: [10, "dec"],
|
|
1780
1780
|
hexadecimal: [16, "hex"]
|
|
1781
1781
|
}
|
|
1782
|
-
}),
|
|
1782
|
+
}), pa = new RegExp(
|
|
1783
1783
|
// 2.5e4, 2.5 and integers
|
|
1784
1784
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1785
1785
|
);
|
|
1786
|
-
function
|
|
1787
|
-
return !(e === null || !
|
|
1786
|
+
function fa(e) {
|
|
1787
|
+
return !(e === null || !pa.test(e) || // Quick hack to not allow integers end with `_`
|
|
1788
1788
|
// Probably should update regexp & check speed
|
|
1789
1789
|
e[e.length - 1] === "_");
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1791
|
+
function ma(e) {
|
|
1792
1792
|
var i, t;
|
|
1793
1793
|
return i = e.replace(/_/g, "").toLowerCase(), t = i[0] === "-" ? -1 : 1, "+-".indexOf(i[0]) >= 0 && (i = i.slice(1)), i === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : i === ".nan" ? NaN : t * parseFloat(i, 10);
|
|
1794
1794
|
}
|
|
1795
|
-
var
|
|
1796
|
-
function
|
|
1795
|
+
var ga = /^[-+]?[0-9]+e/;
|
|
1796
|
+
function ya(e, i) {
|
|
1797
1797
|
var t;
|
|
1798
1798
|
if (isNaN(e))
|
|
1799
1799
|
switch (i) {
|
|
@@ -1824,17 +1824,17 @@ function yo(e, i) {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
else if (le.isNegativeZero(e))
|
|
1826
1826
|
return "-0.0";
|
|
1827
|
-
return t = e.toString(10),
|
|
1827
|
+
return t = e.toString(10), ga.test(t) ? t.replace("e", ".e") : t;
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1829
|
+
function va(e) {
|
|
1830
1830
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || le.isNegativeZero(e));
|
|
1831
1831
|
}
|
|
1832
1832
|
var xi = new de("tag:yaml.org,2002:float", {
|
|
1833
1833
|
kind: "scalar",
|
|
1834
|
-
resolve:
|
|
1835
|
-
construct:
|
|
1836
|
-
predicate:
|
|
1837
|
-
represent:
|
|
1834
|
+
resolve: fa,
|
|
1835
|
+
construct: ma,
|
|
1836
|
+
predicate: va,
|
|
1837
|
+
represent: ya,
|
|
1838
1838
|
defaultStyle: "lowercase"
|
|
1839
1839
|
}), Ti = Ci.extend({
|
|
1840
1840
|
implicit: [
|
|
@@ -1848,88 +1848,88 @@ var xi = new de("tag:yaml.org,2002:float", {
|
|
|
1848
1848
|
), $i = new RegExp(
|
|
1849
1849
|
"^([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]))?))?$"
|
|
1850
1850
|
);
|
|
1851
|
-
function
|
|
1851
|
+
function ha(e) {
|
|
1852
1852
|
return e === null ? !1 : Mi.exec(e) !== null || $i.exec(e) !== null;
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1855
|
-
var i, t,
|
|
1854
|
+
function ba(e) {
|
|
1855
|
+
var i, t, o, r, n, a, s, l = 0, d = null, m, p, _;
|
|
1856
1856
|
if (i = Mi.exec(e), i === null && (i = $i.exec(e)), i === null)
|
|
1857
1857
|
throw new Error("Date resolve error");
|
|
1858
|
-
if (t = +i[1],
|
|
1859
|
-
return new Date(Date.UTC(t,
|
|
1860
|
-
if (n = +i[4],
|
|
1858
|
+
if (t = +i[1], o = +i[2] - 1, r = +i[3], !i[4])
|
|
1859
|
+
return new Date(Date.UTC(t, o, r));
|
|
1860
|
+
if (n = +i[4], a = +i[5], s = +i[6], i[7]) {
|
|
1861
1861
|
for (l = i[7].slice(0, 3); l.length < 3; )
|
|
1862
1862
|
l += "0";
|
|
1863
1863
|
l = +l;
|
|
1864
1864
|
}
|
|
1865
|
-
return i[9] && (m = +i[10], p = +(i[11] || 0), d = (m * 60 + p) * 6e4, i[9] === "-" && (d = -d)), _ = new Date(Date.UTC(t,
|
|
1865
|
+
return i[9] && (m = +i[10], p = +(i[11] || 0), d = (m * 60 + p) * 6e4, i[9] === "-" && (d = -d)), _ = new Date(Date.UTC(t, o, r, n, a, s, l)), d && _.setTime(_.getTime() - d), _;
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function wa(e) {
|
|
1868
1868
|
return e.toISOString();
|
|
1869
1869
|
}
|
|
1870
1870
|
var Oi = new de("tag:yaml.org,2002:timestamp", {
|
|
1871
1871
|
kind: "scalar",
|
|
1872
|
-
resolve:
|
|
1873
|
-
construct:
|
|
1872
|
+
resolve: ha,
|
|
1873
|
+
construct: ba,
|
|
1874
1874
|
instanceOf: Date,
|
|
1875
|
-
represent:
|
|
1875
|
+
represent: wa
|
|
1876
1876
|
});
|
|
1877
|
-
function
|
|
1877
|
+
function _a(e) {
|
|
1878
1878
|
return e === "<<" || e === null;
|
|
1879
1879
|
}
|
|
1880
1880
|
var Ei = new de("tag:yaml.org,2002:merge", {
|
|
1881
1881
|
kind: "scalar",
|
|
1882
|
-
resolve:
|
|
1882
|
+
resolve: _a
|
|
1883
1883
|
}), It = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1884
1884
|
\r`;
|
|
1885
|
-
function
|
|
1885
|
+
function ka(e) {
|
|
1886
1886
|
if (e === null)
|
|
1887
1887
|
return !1;
|
|
1888
|
-
var i, t,
|
|
1888
|
+
var i, t, o = 0, r = e.length, n = It;
|
|
1889
1889
|
for (t = 0; t < r; t++)
|
|
1890
1890
|
if (i = n.indexOf(e.charAt(t)), !(i > 64)) {
|
|
1891
1891
|
if (i < 0)
|
|
1892
1892
|
return !1;
|
|
1893
|
-
|
|
1893
|
+
o += 6;
|
|
1894
1894
|
}
|
|
1895
|
-
return
|
|
1895
|
+
return o % 8 === 0;
|
|
1896
1896
|
}
|
|
1897
|
-
function
|
|
1898
|
-
var i, t,
|
|
1897
|
+
function Ca(e) {
|
|
1898
|
+
var i, t, o = e.replace(/[\r\n=]/g, ""), r = o.length, n = It, a = 0, s = [];
|
|
1899
1899
|
for (i = 0; i < r; i++)
|
|
1900
|
-
i % 4 === 0 && i && (s.push(
|
|
1901
|
-
return t = r % 4 * 6, t === 0 ? (s.push(
|
|
1900
|
+
i % 4 === 0 && i && (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)), a = a << 6 | n.indexOf(o.charAt(i));
|
|
1901
|
+
return t = r % 4 * 6, t === 0 ? (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)) : t === 18 ? (s.push(a >> 10 & 255), s.push(a >> 2 & 255)) : t === 12 && s.push(a >> 4 & 255), new Uint8Array(s);
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1904
|
-
var i = "", t = 0,
|
|
1905
|
-
for (
|
|
1906
|
-
|
|
1907
|
-
return r = n % 3, r === 0 ? (i +=
|
|
1903
|
+
function Sa(e) {
|
|
1904
|
+
var i = "", t = 0, o, r, n = e.length, a = It;
|
|
1905
|
+
for (o = 0; o < n; o++)
|
|
1906
|
+
o % 3 === 0 && o && (i += a[t >> 18 & 63], i += a[t >> 12 & 63], i += a[t >> 6 & 63], i += a[t & 63]), t = (t << 8) + e[o];
|
|
1907
|
+
return r = n % 3, r === 0 ? (i += a[t >> 18 & 63], i += a[t >> 12 & 63], i += a[t >> 6 & 63], i += a[t & 63]) : r === 2 ? (i += a[t >> 10 & 63], i += a[t >> 4 & 63], i += a[t << 2 & 63], i += a[64]) : r === 1 && (i += a[t >> 2 & 63], i += a[t << 4 & 63], i += a[64], i += a[64]), i;
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1909
|
+
function Ia(e) {
|
|
1910
1910
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1911
1911
|
}
|
|
1912
1912
|
var Fi = new de("tag:yaml.org,2002:binary", {
|
|
1913
1913
|
kind: "scalar",
|
|
1914
|
-
resolve:
|
|
1915
|
-
construct:
|
|
1916
|
-
predicate:
|
|
1917
|
-
represent:
|
|
1918
|
-
}),
|
|
1919
|
-
function
|
|
1914
|
+
resolve: ka,
|
|
1915
|
+
construct: Ca,
|
|
1916
|
+
predicate: Ia,
|
|
1917
|
+
represent: Sa
|
|
1918
|
+
}), Aa = Object.prototype.hasOwnProperty, xa = Object.prototype.toString;
|
|
1919
|
+
function Ta(e) {
|
|
1920
1920
|
if (e === null)
|
|
1921
1921
|
return !0;
|
|
1922
|
-
var i = [], t,
|
|
1923
|
-
for (t = 0,
|
|
1924
|
-
if (r = s[t],
|
|
1922
|
+
var i = [], t, o, r, n, a, s = e;
|
|
1923
|
+
for (t = 0, o = s.length; t < o; t += 1) {
|
|
1924
|
+
if (r = s[t], a = !1, xa.call(r) !== "[object Object]")
|
|
1925
1925
|
return !1;
|
|
1926
1926
|
for (n in r)
|
|
1927
|
-
if (
|
|
1928
|
-
if (!
|
|
1929
|
-
|
|
1927
|
+
if (Aa.call(r, n))
|
|
1928
|
+
if (!a)
|
|
1929
|
+
a = !0;
|
|
1930
1930
|
else
|
|
1931
1931
|
return !1;
|
|
1932
|
-
if (!
|
|
1932
|
+
if (!a)
|
|
1933
1933
|
return !1;
|
|
1934
1934
|
if (i.indexOf(n) === -1)
|
|
1935
1935
|
i.push(n);
|
|
@@ -1938,54 +1938,54 @@ function To(e) {
|
|
|
1938
1938
|
}
|
|
1939
1939
|
return !0;
|
|
1940
1940
|
}
|
|
1941
|
-
function
|
|
1941
|
+
function ja(e) {
|
|
1942
1942
|
return e !== null ? e : [];
|
|
1943
1943
|
}
|
|
1944
1944
|
var Vi = new de("tag:yaml.org,2002:omap", {
|
|
1945
1945
|
kind: "sequence",
|
|
1946
|
-
resolve:
|
|
1947
|
-
construct:
|
|
1948
|
-
}),
|
|
1949
|
-
function $
|
|
1946
|
+
resolve: Ta,
|
|
1947
|
+
construct: ja
|
|
1948
|
+
}), Ma = Object.prototype.toString;
|
|
1949
|
+
function $a(e) {
|
|
1950
1950
|
if (e === null)
|
|
1951
1951
|
return !0;
|
|
1952
|
-
var i, t,
|
|
1953
|
-
for (n = new Array(
|
|
1954
|
-
if (
|
|
1952
|
+
var i, t, o, r, n, a = e;
|
|
1953
|
+
for (n = new Array(a.length), i = 0, t = a.length; i < t; i += 1) {
|
|
1954
|
+
if (o = a[i], Ma.call(o) !== "[object Object]" || (r = Object.keys(o), r.length !== 1))
|
|
1955
1955
|
return !1;
|
|
1956
|
-
n[i] = [r[0],
|
|
1956
|
+
n[i] = [r[0], o[r[0]]];
|
|
1957
1957
|
}
|
|
1958
1958
|
return !0;
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1960
|
+
function Oa(e) {
|
|
1961
1961
|
if (e === null)
|
|
1962
1962
|
return [];
|
|
1963
|
-
var i, t,
|
|
1964
|
-
for (n = new Array(
|
|
1965
|
-
|
|
1963
|
+
var i, t, o, r, n, a = e;
|
|
1964
|
+
for (n = new Array(a.length), i = 0, t = a.length; i < t; i += 1)
|
|
1965
|
+
o = a[i], r = Object.keys(o), n[i] = [r[0], o[r[0]]];
|
|
1966
1966
|
return n;
|
|
1967
1967
|
}
|
|
1968
1968
|
var Ni = new de("tag:yaml.org,2002:pairs", {
|
|
1969
1969
|
kind: "sequence",
|
|
1970
|
-
resolve: $
|
|
1971
|
-
construct:
|
|
1972
|
-
}),
|
|
1973
|
-
function
|
|
1970
|
+
resolve: $a,
|
|
1971
|
+
construct: Oa
|
|
1972
|
+
}), Ea = Object.prototype.hasOwnProperty;
|
|
1973
|
+
function Fa(e) {
|
|
1974
1974
|
if (e === null)
|
|
1975
1975
|
return !0;
|
|
1976
1976
|
var i, t = e;
|
|
1977
1977
|
for (i in t)
|
|
1978
|
-
if (
|
|
1978
|
+
if (Ea.call(t, i) && t[i] !== null)
|
|
1979
1979
|
return !1;
|
|
1980
1980
|
return !0;
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1982
|
+
function Va(e) {
|
|
1983
1983
|
return e !== null ? e : {};
|
|
1984
1984
|
}
|
|
1985
1985
|
var qi = new de("tag:yaml.org,2002:set", {
|
|
1986
1986
|
kind: "mapping",
|
|
1987
|
-
resolve:
|
|
1988
|
-
construct:
|
|
1987
|
+
resolve: Fa,
|
|
1988
|
+
construct: Va
|
|
1989
1989
|
}), At = ji.extend({
|
|
1990
1990
|
implicit: [
|
|
1991
1991
|
Oi,
|
|
@@ -1997,7 +1997,7 @@ var qi = new de("tag:yaml.org,2002:set", {
|
|
|
1997
1997
|
Ni,
|
|
1998
1998
|
qi
|
|
1999
1999
|
]
|
|
2000
|
-
}), Ie = Object.prototype.hasOwnProperty, Xe = 1, Ui = 2, Li = 3, et = 4, dt = 1,
|
|
2000
|
+
}), Ie = Object.prototype.hasOwnProperty, Xe = 1, Ui = 2, Li = 3, et = 4, dt = 1, Na = 2, Kt = 3, qa = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ua = /[\x85\u2028\u2029]/, La = /[,\[\]\{\}]/, Ki = /^(?:!|!!|![a-z\-]+!)$/i, Bi = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
2001
2001
|
function Bt(e) {
|
|
2002
2002
|
return Object.prototype.toString.call(e);
|
|
2003
2003
|
}
|
|
@@ -2013,21 +2013,21 @@ function ge(e) {
|
|
|
2013
2013
|
function Ve(e) {
|
|
2014
2014
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function Ka(e) {
|
|
2017
2017
|
var i;
|
|
2018
2018
|
return 48 <= e && e <= 57 ? e - 48 : (i = e | 32, 97 <= i && i <= 102 ? i - 97 + 10 : -1);
|
|
2019
2019
|
}
|
|
2020
|
-
function
|
|
2020
|
+
function Ba(e) {
|
|
2021
2021
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function Pa(e) {
|
|
2024
2024
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
2025
2025
|
}
|
|
2026
2026
|
function Pt(e) {
|
|
2027
2027
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
2028
2028
|
` : 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" : "";
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function Ra(e) {
|
|
2031
2031
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
2032
2032
|
(e - 65536 >> 10) + 55296,
|
|
2033
2033
|
(e - 65536 & 1023) + 56320
|
|
@@ -2036,7 +2036,7 @@ function Ro(e) {
|
|
|
2036
2036
|
var Pi = new Array(256), Ri = new Array(256);
|
|
2037
2037
|
for (var Ee = 0; Ee < 256; Ee++)
|
|
2038
2038
|
Pi[Ee] = Pt(Ee) ? 1 : 0, Ri[Ee] = Pt(Ee);
|
|
2039
|
-
function
|
|
2039
|
+
function Da(e, i) {
|
|
2040
2040
|
this.input = e, this.filename = i.filename || null, this.schema = i.schema || At, this.onWarning = i.onWarning || null, this.legacy = i.legacy || !1, this.json = i.json || !1, this.listener = i.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 = [];
|
|
2041
2041
|
}
|
|
2042
2042
|
function Di(e, i) {
|
|
@@ -2048,7 +2048,7 @@ function Di(e, i) {
|
|
|
2048
2048
|
line: e.line,
|
|
2049
2049
|
column: e.position - e.lineStart
|
|
2050
2050
|
};
|
|
2051
|
-
return t.snippet =
|
|
2051
|
+
return t.snippet = Jo(t), new me(i, t);
|
|
2052
2052
|
}
|
|
2053
2053
|
function F(e, i) {
|
|
2054
2054
|
throw Di(e, i);
|
|
@@ -2058,49 +2058,49 @@ function tt(e, i) {
|
|
|
2058
2058
|
}
|
|
2059
2059
|
var Rt = {
|
|
2060
2060
|
YAML: function(e, i, t) {
|
|
2061
|
-
var
|
|
2062
|
-
e.version !== null && F(e, "duplication of %YAML directive"), t.length !== 1 && F(e, "YAML directive accepts exactly one argument"),
|
|
2061
|
+
var o, r, n;
|
|
2062
|
+
e.version !== null && F(e, "duplication of %YAML directive"), t.length !== 1 && F(e, "YAML directive accepts exactly one argument"), o = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), o === null && F(e, "ill-formed argument of the YAML directive"), r = parseInt(o[1], 10), n = parseInt(o[2], 10), r !== 1 && F(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = n < 2, n !== 1 && n !== 2 && tt(e, "unsupported YAML version of the document");
|
|
2063
2063
|
},
|
|
2064
2064
|
TAG: function(e, i, t) {
|
|
2065
|
-
var
|
|
2066
|
-
t.length !== 2 && F(e, "TAG directive accepts exactly two arguments"),
|
|
2065
|
+
var o, r;
|
|
2066
|
+
t.length !== 2 && F(e, "TAG directive accepts exactly two arguments"), o = t[0], r = t[1], Ki.test(o) || F(e, "ill-formed tag handle (first argument) of the TAG directive"), Ie.call(e.tagMap, o) && F(e, 'there is a previously declared suffix for "' + o + '" tag handle'), Bi.test(r) || F(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
2067
2067
|
try {
|
|
2068
2068
|
r = decodeURIComponent(r);
|
|
2069
2069
|
} catch {
|
|
2070
2070
|
F(e, "tag prefix is malformed: " + r);
|
|
2071
2071
|
}
|
|
2072
|
-
e.tagMap[
|
|
2072
|
+
e.tagMap[o] = r;
|
|
2073
2073
|
}
|
|
2074
2074
|
};
|
|
2075
|
-
function Ce(e, i, t,
|
|
2076
|
-
var r, n,
|
|
2075
|
+
function Ce(e, i, t, o) {
|
|
2076
|
+
var r, n, a, s;
|
|
2077
2077
|
if (i < t) {
|
|
2078
|
-
if (s = e.input.slice(i, t),
|
|
2078
|
+
if (s = e.input.slice(i, t), o)
|
|
2079
2079
|
for (r = 0, n = s.length; r < n; r += 1)
|
|
2080
|
-
|
|
2080
|
+
a = s.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || F(e, "expected valid JSON character");
|
|
2081
2081
|
else
|
|
2082
|
-
|
|
2082
|
+
qa.test(s) && F(e, "the stream contains non-printable characters");
|
|
2083
2083
|
e.result += s;
|
|
2084
2084
|
}
|
|
2085
2085
|
}
|
|
2086
|
-
function Dt(e, i, t,
|
|
2087
|
-
var r, n,
|
|
2088
|
-
for (le.isObject(t) || F(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(t),
|
|
2089
|
-
n = r[
|
|
2086
|
+
function Dt(e, i, t, o) {
|
|
2087
|
+
var r, n, a, s;
|
|
2088
|
+
for (le.isObject(t) || F(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(t), a = 0, s = r.length; a < s; a += 1)
|
|
2089
|
+
n = r[a], Ie.call(i, n) || (i[n] = t[n], o[n] = !0);
|
|
2090
2090
|
}
|
|
2091
|
-
function Ne(e, i, t,
|
|
2091
|
+
function Ne(e, i, t, o, r, n, a, s, l) {
|
|
2092
2092
|
var d, m;
|
|
2093
2093
|
if (Array.isArray(r))
|
|
2094
2094
|
for (r = Array.prototype.slice.call(r), d = 0, m = r.length; d < m; d += 1)
|
|
2095
2095
|
Array.isArray(r[d]) && F(e, "nested arrays are not supported inside keys"), typeof r == "object" && Bt(r[d]) === "[object Object]" && (r[d] = "[object Object]");
|
|
2096
|
-
if (typeof r == "object" && Bt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), i === null && (i = {}),
|
|
2096
|
+
if (typeof r == "object" && Bt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), i === null && (i = {}), o === "tag:yaml.org,2002:merge")
|
|
2097
2097
|
if (Array.isArray(n))
|
|
2098
2098
|
for (d = 0, m = n.length; d < m; d += 1)
|
|
2099
2099
|
Dt(e, i, n[d], t);
|
|
2100
2100
|
else
|
|
2101
2101
|
Dt(e, i, n, t);
|
|
2102
2102
|
else
|
|
2103
|
-
!e.json && !Ie.call(t, r) && Ie.call(i, r) && (e.line =
|
|
2103
|
+
!e.json && !Ie.call(t, r) && Ie.call(i, r) && (e.line = a || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, F(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(i, r, {
|
|
2104
2104
|
configurable: !0,
|
|
2105
2105
|
enumerable: !0,
|
|
2106
2106
|
writable: !0,
|
|
@@ -2113,7 +2113,7 @@ function xt(e) {
|
|
|
2113
2113
|
i = e.input.charCodeAt(e.position), i === 10 ? e.position++ : i === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : F(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
2114
2114
|
}
|
|
2115
2115
|
function ne(e, i, t) {
|
|
2116
|
-
for (var
|
|
2116
|
+
for (var o = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
2117
2117
|
for (; Me(r); )
|
|
2118
2118
|
r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
2119
2119
|
if (i && r === 35)
|
|
@@ -2121,14 +2121,14 @@ function ne(e, i, t) {
|
|
|
2121
2121
|
r = e.input.charCodeAt(++e.position);
|
|
2122
2122
|
while (r !== 10 && r !== 13 && r !== 0);
|
|
2123
2123
|
if (be(r))
|
|
2124
|
-
for (xt(e), r = e.input.charCodeAt(e.position),
|
|
2124
|
+
for (xt(e), r = e.input.charCodeAt(e.position), o++, e.lineIndent = 0; r === 32; )
|
|
2125
2125
|
e.lineIndent++, r = e.input.charCodeAt(++e.position);
|
|
2126
2126
|
else
|
|
2127
2127
|
break;
|
|
2128
2128
|
}
|
|
2129
|
-
return t !== -1 &&
|
|
2129
|
+
return t !== -1 && o !== 0 && e.lineIndent < t && tt(e, "deficient indentation"), o;
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2131
|
+
function at(e) {
|
|
2132
2132
|
var i = e.position, t;
|
|
2133
2133
|
return t = e.input.charCodeAt(i), !!((t === 45 || t === 46) && t === e.input.charCodeAt(i + 1) && t === e.input.charCodeAt(i + 2) && (i += 3, t = e.input.charCodeAt(i), t === 0 || ge(t)));
|
|
2134
2134
|
}
|
|
@@ -2136,52 +2136,52 @@ function Tt(e, i) {
|
|
|
2136
2136
|
i === 1 ? e.result += " " : i > 1 && (e.result += le.repeat(`
|
|
2137
2137
|
`, i - 1));
|
|
2138
2138
|
}
|
|
2139
|
-
function
|
|
2140
|
-
var
|
|
2139
|
+
function Ha(e, i, t) {
|
|
2140
|
+
var o, r, n, a, s, l, d, m, p = e.kind, _ = e.result, h;
|
|
2141
2141
|
if (h = e.input.charCodeAt(e.position), ge(h) || Ve(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96 || (h === 63 || h === 45) && (r = e.input.charCodeAt(e.position + 1), ge(r) || t && Ve(r)))
|
|
2142
2142
|
return !1;
|
|
2143
|
-
for (e.kind = "scalar", e.result = "", n =
|
|
2143
|
+
for (e.kind = "scalar", e.result = "", n = a = e.position, s = !1; h !== 0; ) {
|
|
2144
2144
|
if (h === 58) {
|
|
2145
2145
|
if (r = e.input.charCodeAt(e.position + 1), ge(r) || t && Ve(r))
|
|
2146
2146
|
break;
|
|
2147
2147
|
} else if (h === 35) {
|
|
2148
|
-
if (
|
|
2148
|
+
if (o = e.input.charCodeAt(e.position - 1), ge(o))
|
|
2149
2149
|
break;
|
|
2150
2150
|
} else {
|
|
2151
|
-
if (e.position === e.lineStart &&
|
|
2151
|
+
if (e.position === e.lineStart && at(e) || t && Ve(h))
|
|
2152
2152
|
break;
|
|
2153
2153
|
if (be(h))
|
|
2154
2154
|
if (l = e.line, d = e.lineStart, m = e.lineIndent, ne(e, !1, -1), e.lineIndent >= i) {
|
|
2155
2155
|
s = !0, h = e.input.charCodeAt(e.position);
|
|
2156
2156
|
continue;
|
|
2157
2157
|
} else {
|
|
2158
|
-
e.position =
|
|
2158
|
+
e.position = a, e.line = l, e.lineStart = d, e.lineIndent = m;
|
|
2159
2159
|
break;
|
|
2160
2160
|
}
|
|
2161
2161
|
}
|
|
2162
|
-
s && (Ce(e, n,
|
|
2162
|
+
s && (Ce(e, n, a, !1), Tt(e, e.line - l), n = a = e.position, s = !1), Me(h) || (a = e.position + 1), h = e.input.charCodeAt(++e.position);
|
|
2163
2163
|
}
|
|
2164
|
-
return Ce(e, n,
|
|
2164
|
+
return Ce(e, n, a, !1), e.result ? !0 : (e.kind = p, e.result = _, !1);
|
|
2165
2165
|
}
|
|
2166
|
-
function
|
|
2167
|
-
var t,
|
|
2166
|
+
function za(e, i) {
|
|
2167
|
+
var t, o, r;
|
|
2168
2168
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
2169
2169
|
return !1;
|
|
2170
|
-
for (e.kind = "scalar", e.result = "", e.position++,
|
|
2170
|
+
for (e.kind = "scalar", e.result = "", e.position++, o = r = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
2171
2171
|
if (t === 39)
|
|
2172
|
-
if (Ce(e,
|
|
2173
|
-
|
|
2172
|
+
if (Ce(e, o, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
2173
|
+
o = e.position, e.position++, r = e.position;
|
|
2174
2174
|
else
|
|
2175
2175
|
return !0;
|
|
2176
2176
|
else
|
|
2177
|
-
be(t) ? (Ce(e,
|
|
2177
|
+
be(t) ? (Ce(e, o, r, !0), Tt(e, ne(e, !1, i)), o = r = e.position) : e.position === e.lineStart && at(e) ? F(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
2178
2178
|
F(e, "unexpected end of the stream within a single quoted scalar");
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2181
|
-
var t,
|
|
2180
|
+
function Ga(e, i) {
|
|
2181
|
+
var t, o, r, n, a, s;
|
|
2182
2182
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
2183
2183
|
return !1;
|
|
2184
|
-
for (e.kind = "scalar", e.result = "", e.position++, t =
|
|
2184
|
+
for (e.kind = "scalar", e.result = "", e.position++, t = o = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2185
2185
|
if (s === 34)
|
|
2186
2186
|
return Ce(e, t, e.position, !0), e.position++, !0;
|
|
2187
2187
|
if (s === 92) {
|
|
@@ -2189,20 +2189,20 @@ function Go(e, i) {
|
|
|
2189
2189
|
ne(e, !1, i);
|
|
2190
2190
|
else if (s < 256 && Pi[s])
|
|
2191
2191
|
e.result += Ri[s], e.position++;
|
|
2192
|
-
else if ((
|
|
2193
|
-
for (r =
|
|
2194
|
-
s = e.input.charCodeAt(++e.position), (
|
|
2195
|
-
e.result +=
|
|
2192
|
+
else if ((a = Ba(s)) > 0) {
|
|
2193
|
+
for (r = a, n = 0; r > 0; r--)
|
|
2194
|
+
s = e.input.charCodeAt(++e.position), (a = Ka(s)) >= 0 ? n = (n << 4) + a : F(e, "expected hexadecimal character");
|
|
2195
|
+
e.result += Ra(n), e.position++;
|
|
2196
2196
|
} else
|
|
2197
2197
|
F(e, "unknown escape sequence");
|
|
2198
|
-
t =
|
|
2198
|
+
t = o = e.position;
|
|
2199
2199
|
} else
|
|
2200
|
-
be(s) ? (Ce(e, t,
|
|
2200
|
+
be(s) ? (Ce(e, t, o, !0), Tt(e, ne(e, !1, i)), t = o = e.position) : e.position === e.lineStart && at(e) ? F(e, "unexpected end of the document within a double quoted scalar") : (e.position++, o = e.position);
|
|
2201
2201
|
}
|
|
2202
2202
|
F(e, "unexpected end of the stream within a double quoted scalar");
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2205
|
-
var t = !0,
|
|
2204
|
+
function Ja(e, i) {
|
|
2205
|
+
var t = !0, o, r, n, a = e.tag, s, l = e.anchor, d, m, p, _, h, x = /* @__PURE__ */ Object.create(null), b, $, S, T;
|
|
2206
2206
|
if (T = e.input.charCodeAt(e.position), T === 91)
|
|
2207
2207
|
m = 93, h = !1, s = [];
|
|
2208
2208
|
else if (T === 123)
|
|
@@ -2211,24 +2211,24 @@ function Jo(e, i) {
|
|
|
2211
2211
|
return !1;
|
|
2212
2212
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), T = e.input.charCodeAt(++e.position); T !== 0; ) {
|
|
2213
2213
|
if (ne(e, !0, i), T = e.input.charCodeAt(e.position), T === m)
|
|
2214
|
-
return e.position++, e.tag =
|
|
2215
|
-
t ? T === 44 && F(e, "expected the node content, but found ','") : F(e, "missed comma between flow collection entries"), $ = b = S = null, p = _ = !1, T === 63 && (d = e.input.charCodeAt(e.position + 1), ge(d) && (p = _ = !0, e.position++, ne(e, !0, i))),
|
|
2214
|
+
return e.position++, e.tag = a, e.anchor = l, e.kind = h ? "mapping" : "sequence", e.result = s, !0;
|
|
2215
|
+
t ? T === 44 && F(e, "expected the node content, but found ','") : F(e, "missed comma between flow collection entries"), $ = b = S = null, p = _ = !1, T === 63 && (d = e.input.charCodeAt(e.position + 1), ge(d) && (p = _ = !0, e.position++, ne(e, !0, i))), o = e.line, r = e.lineStart, n = e.position, Ue(e, i, Xe, !1, !0), $ = e.tag, b = e.result, ne(e, !0, i), T = e.input.charCodeAt(e.position), (_ || e.line === o) && T === 58 && (p = !0, T = e.input.charCodeAt(++e.position), ne(e, !0, i), Ue(e, i, Xe, !1, !0), S = e.result), h ? Ne(e, s, x, $, b, S, o, r, n) : p ? s.push(Ne(e, null, x, $, b, S, o, r, n)) : s.push(b), ne(e, !0, i), T = e.input.charCodeAt(e.position), T === 44 ? (t = !0, T = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2216
2216
|
}
|
|
2217
2217
|
F(e, "unexpected end of the stream within a flow collection");
|
|
2218
2218
|
}
|
|
2219
|
-
function
|
|
2220
|
-
var t,
|
|
2219
|
+
function Ya(e, i) {
|
|
2220
|
+
var t, o, r = dt, n = !1, a = !1, s = i, l = 0, d = !1, m, p;
|
|
2221
2221
|
if (p = e.input.charCodeAt(e.position), p === 124)
|
|
2222
|
-
|
|
2222
|
+
o = !1;
|
|
2223
2223
|
else if (p === 62)
|
|
2224
|
-
|
|
2224
|
+
o = !0;
|
|
2225
2225
|
else
|
|
2226
2226
|
return !1;
|
|
2227
2227
|
for (e.kind = "scalar", e.result = ""; p !== 0; )
|
|
2228
2228
|
if (p = e.input.charCodeAt(++e.position), p === 43 || p === 45)
|
|
2229
|
-
dt === r ? r = p === 43 ? Kt :
|
|
2230
|
-
else if ((m =
|
|
2231
|
-
m === 0 ? F(e, "bad explicit indentation width of a block scalar; it cannot be less than one") :
|
|
2229
|
+
dt === r ? r = p === 43 ? Kt : Na : F(e, "repeat of a chomping mode identifier");
|
|
2230
|
+
else if ((m = Pa(p)) >= 0)
|
|
2231
|
+
m === 0 ? F(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? F(e, "repeat of an indentation width identifier") : (s = i + m - 1, a = !0);
|
|
2232
2232
|
else
|
|
2233
2233
|
break;
|
|
2234
2234
|
if (Me(p)) {
|
|
@@ -2241,9 +2241,9 @@ function Yo(e, i) {
|
|
|
2241
2241
|
while (!be(p) && p !== 0);
|
|
2242
2242
|
}
|
|
2243
2243
|
for (; p !== 0; ) {
|
|
2244
|
-
for (xt(e), e.lineIndent = 0, p = e.input.charCodeAt(e.position); (!
|
|
2244
|
+
for (xt(e), e.lineIndent = 0, p = e.input.charCodeAt(e.position); (!a || e.lineIndent < s) && p === 32; )
|
|
2245
2245
|
e.lineIndent++, p = e.input.charCodeAt(++e.position);
|
|
2246
|
-
if (!
|
|
2246
|
+
if (!a && e.lineIndent > s && (s = e.lineIndent), be(p)) {
|
|
2247
2247
|
l++;
|
|
2248
2248
|
continue;
|
|
2249
2249
|
}
|
|
@@ -2253,21 +2253,21 @@ function Yo(e, i) {
|
|
|
2253
2253
|
`);
|
|
2254
2254
|
break;
|
|
2255
2255
|
}
|
|
2256
|
-
for (
|
|
2256
|
+
for (o ? Me(p) ? (d = !0, e.result += le.repeat(`
|
|
2257
2257
|
`, n ? 1 + l : l)) : d ? (d = !1, e.result += le.repeat(`
|
|
2258
2258
|
`, l + 1)) : l === 0 ? n && (e.result += " ") : e.result += le.repeat(`
|
|
2259
2259
|
`, l) : e.result += le.repeat(`
|
|
2260
|
-
`, n ? 1 + l : l), n = !0,
|
|
2260
|
+
`, n ? 1 + l : l), n = !0, a = !0, l = 0, t = e.position; !be(p) && p !== 0; )
|
|
2261
2261
|
p = e.input.charCodeAt(++e.position);
|
|
2262
2262
|
Ce(e, t, e.position, !1);
|
|
2263
2263
|
}
|
|
2264
2264
|
return !0;
|
|
2265
2265
|
}
|
|
2266
2266
|
function Ht(e, i) {
|
|
2267
|
-
var t,
|
|
2267
|
+
var t, o = e.tag, r = e.anchor, n = [], a, s = !1, l;
|
|
2268
2268
|
if (e.firstTabInLine !== -1)
|
|
2269
2269
|
return !1;
|
|
2270
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = n), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), !(l !== 45 || (
|
|
2270
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = n), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), !(l !== 45 || (a = e.input.charCodeAt(e.position + 1), !ge(a)))); ) {
|
|
2271
2271
|
if (s = !0, e.position++, ne(e, !0, -1) && e.lineIndent <= i) {
|
|
2272
2272
|
n.push(null), l = e.input.charCodeAt(e.position);
|
|
2273
2273
|
continue;
|
|
@@ -2277,23 +2277,23 @@ function Ht(e, i) {
|
|
|
2277
2277
|
else if (e.lineIndent < i)
|
|
2278
2278
|
break;
|
|
2279
2279
|
}
|
|
2280
|
-
return s ? (e.tag =
|
|
2280
|
+
return s ? (e.tag = o, e.anchor = r, e.kind = "sequence", e.result = n, !0) : !1;
|
|
2281
2281
|
}
|
|
2282
|
-
function
|
|
2283
|
-
var
|
|
2282
|
+
function Wa(e, i, t) {
|
|
2283
|
+
var o, r, n, a, s, l, d = e.tag, m = e.anchor, p = {}, _ = /* @__PURE__ */ Object.create(null), h = null, x = null, b = null, $ = !1, S = !1, T;
|
|
2284
2284
|
if (e.firstTabInLine !== -1)
|
|
2285
2285
|
return !1;
|
|
2286
2286
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = p), T = e.input.charCodeAt(e.position); T !== 0; ) {
|
|
2287
|
-
if (!$ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")),
|
|
2288
|
-
T === 63 ? ($ && (Ne(e, p, _, h, x, null,
|
|
2287
|
+
if (!$ && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), o = e.input.charCodeAt(e.position + 1), n = e.line, (T === 63 || T === 58) && ge(o))
|
|
2288
|
+
T === 63 ? ($ && (Ne(e, p, _, h, x, null, a, s, l), h = x = b = null), S = !0, $ = !0, r = !0) : $ ? ($ = !1, r = !0) : F(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, T = o;
|
|
2289
2289
|
else {
|
|
2290
|
-
if (
|
|
2290
|
+
if (a = e.line, s = e.lineStart, l = e.position, !Ue(e, t, Ui, !1, !0))
|
|
2291
2291
|
break;
|
|
2292
2292
|
if (e.line === n) {
|
|
2293
2293
|
for (T = e.input.charCodeAt(e.position); Me(T); )
|
|
2294
2294
|
T = e.input.charCodeAt(++e.position);
|
|
2295
2295
|
if (T === 58)
|
|
2296
|
-
T = e.input.charCodeAt(++e.position), ge(T) || F(e, "a whitespace character is expected after the key-value separator within a block mapping"), $ && (Ne(e, p, _, h, x, null,
|
|
2296
|
+
T = e.input.charCodeAt(++e.position), ge(T) || F(e, "a whitespace character is expected after the key-value separator within a block mapping"), $ && (Ne(e, p, _, h, x, null, a, s, l), h = x = b = null), S = !0, $ = !1, r = !1, h = e.tag, x = e.result;
|
|
2297
2297
|
else if (S)
|
|
2298
2298
|
F(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2299
2299
|
else
|
|
@@ -2303,26 +2303,26 @@ function Wo(e, i, t) {
|
|
|
2303
2303
|
else
|
|
2304
2304
|
return e.tag = d, e.anchor = m, !0;
|
|
2305
2305
|
}
|
|
2306
|
-
if ((e.line === n || e.lineIndent > i) && ($ && (
|
|
2306
|
+
if ((e.line === n || e.lineIndent > i) && ($ && (a = e.line, s = e.lineStart, l = e.position), Ue(e, i, et, !0, r) && ($ ? x = e.result : b = e.result), $ || (Ne(e, p, _, h, x, b, a, s, l), h = x = b = null), ne(e, !0, -1), T = e.input.charCodeAt(e.position)), (e.line === n || e.lineIndent > i) && T !== 0)
|
|
2307
2307
|
F(e, "bad indentation of a mapping entry");
|
|
2308
2308
|
else if (e.lineIndent < i)
|
|
2309
2309
|
break;
|
|
2310
2310
|
}
|
|
2311
|
-
return $ && Ne(e, p, _, h, x, null,
|
|
2311
|
+
return $ && Ne(e, p, _, h, x, null, a, s, l), S && (e.tag = d, e.anchor = m, e.kind = "mapping", e.result = p), S;
|
|
2312
2312
|
}
|
|
2313
|
-
function
|
|
2314
|
-
var i, t = !1,
|
|
2315
|
-
if (
|
|
2313
|
+
function Za(e) {
|
|
2314
|
+
var i, t = !1, o = !1, r, n, a;
|
|
2315
|
+
if (a = e.input.charCodeAt(e.position), a !== 33)
|
|
2316
2316
|
return !1;
|
|
2317
|
-
if (e.tag !== null && F(e, "duplication of a tag property"),
|
|
2317
|
+
if (e.tag !== null && F(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (t = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (o = !0, r = "!!", a = e.input.charCodeAt(++e.position)) : r = "!", i = e.position, t) {
|
|
2318
2318
|
do
|
|
2319
|
-
|
|
2320
|
-
while (
|
|
2321
|
-
e.position < e.length ? (n = e.input.slice(i, e.position),
|
|
2319
|
+
a = e.input.charCodeAt(++e.position);
|
|
2320
|
+
while (a !== 0 && a !== 62);
|
|
2321
|
+
e.position < e.length ? (n = e.input.slice(i, e.position), a = e.input.charCodeAt(++e.position)) : F(e, "unexpected end of the stream within a verbatim tag");
|
|
2322
2322
|
} else {
|
|
2323
|
-
for (;
|
|
2324
|
-
|
|
2325
|
-
n = e.input.slice(i, e.position),
|
|
2323
|
+
for (; a !== 0 && !ge(a); )
|
|
2324
|
+
a === 33 && (o ? F(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(i - 1, e.position + 1), Ki.test(r) || F(e, "named tag handle cannot contain such characters"), o = !0, i = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
2325
|
+
n = e.input.slice(i, e.position), La.test(n) && F(e, "tag suffix cannot contain flow indicator characters");
|
|
2326
2326
|
}
|
|
2327
2327
|
n && !Bi.test(n) && F(e, "tag name cannot contain such characters: " + n);
|
|
2328
2328
|
try {
|
|
@@ -2332,7 +2332,7 @@ function Zo(e) {
|
|
|
2332
2332
|
}
|
|
2333
2333
|
return t ? e.tag = n : Ie.call(e.tagMap, r) ? e.tag = e.tagMap[r] + n : r === "!" ? e.tag = "!" + n : r === "!!" ? e.tag = "tag:yaml.org,2002:" + n : F(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
2334
2334
|
}
|
|
2335
|
-
function
|
|
2335
|
+
function Qa(e) {
|
|
2336
2336
|
var i, t;
|
|
2337
2337
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
2338
2338
|
return !1;
|
|
@@ -2340,20 +2340,20 @@ function Qo(e) {
|
|
|
2340
2340
|
t = e.input.charCodeAt(++e.position);
|
|
2341
2341
|
return e.position === i && F(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(i, e.position), !0;
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2344
|
-
var i, t,
|
|
2345
|
-
if (
|
|
2343
|
+
function Xa(e) {
|
|
2344
|
+
var i, t, o;
|
|
2345
|
+
if (o = e.input.charCodeAt(e.position), o !== 42)
|
|
2346
2346
|
return !1;
|
|
2347
|
-
for (
|
|
2348
|
-
|
|
2347
|
+
for (o = e.input.charCodeAt(++e.position), i = e.position; o !== 0 && !ge(o) && !Ve(o); )
|
|
2348
|
+
o = e.input.charCodeAt(++e.position);
|
|
2349
2349
|
return e.position === i && F(e, "name of an alias node must contain at least one character"), t = e.input.slice(i, e.position), Ie.call(e.anchorMap, t) || F(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ne(e, !0, -1), !0;
|
|
2350
2350
|
}
|
|
2351
|
-
function Ue(e, i, t,
|
|
2352
|
-
var n,
|
|
2353
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, n =
|
|
2354
|
-
for (;
|
|
2351
|
+
function Ue(e, i, t, o, r) {
|
|
2352
|
+
var n, a, s, l = 1, d = !1, m = !1, p, _, h, x, b, $;
|
|
2353
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, n = a = s = et === t || Li === t, o && ne(e, !0, -1) && (d = !0, e.lineIndent > i ? l = 1 : e.lineIndent === i ? l = 0 : e.lineIndent < i && (l = -1)), l === 1)
|
|
2354
|
+
for (; Za(e) || Qa(e); )
|
|
2355
2355
|
ne(e, !0, -1) ? (d = !0, s = n, e.lineIndent > i ? l = 1 : e.lineIndent === i ? l = 0 : e.lineIndent < i && (l = -1)) : s = !1;
|
|
2356
|
-
if (s && (s = d || r), (l === 1 || et === t) && (Xe === t || Ui === t ? b = i : b = i + 1, $ = e.position - e.lineStart, l === 1 ? s && (Ht(e, $) ||
|
|
2356
|
+
if (s && (s = d || r), (l === 1 || et === t) && (Xe === t || Ui === t ? b = i : b = i + 1, $ = e.position - e.lineStart, l === 1 ? s && (Ht(e, $) || Wa(e, $, b)) || Ja(e, b) ? m = !0 : (a && Ya(e, b) || za(e, b) || Ga(e, b) ? m = !0 : Xa(e) ? (m = !0, (e.tag !== null || e.anchor !== null) && F(e, "alias node should not have any properties")) : Ha(e, b, Xe === t) && (m = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (m = s && Ht(e, $))), e.tag === null)
|
|
2357
2357
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2358
2358
|
else if (e.tag === "?") {
|
|
2359
2359
|
for (e.result !== null && e.kind !== "scalar" && F(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), p = 0, _ = e.implicitTypes.length; p < _; p += 1)
|
|
@@ -2375,28 +2375,28 @@ function Ue(e, i, t, a, r) {
|
|
|
2375
2375
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || m;
|
|
2376
2376
|
}
|
|
2377
2377
|
function en(e) {
|
|
2378
|
-
var i = e.position, t,
|
|
2379
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (
|
|
2380
|
-
for (n = !0,
|
|
2381
|
-
|
|
2382
|
-
for (
|
|
2383
|
-
for (; Me(
|
|
2384
|
-
|
|
2385
|
-
if (
|
|
2378
|
+
var i = e.position, t, o, r, n = !1, a;
|
|
2379
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (ne(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2380
|
+
for (n = !0, a = e.input.charCodeAt(++e.position), t = e.position; a !== 0 && !ge(a); )
|
|
2381
|
+
a = e.input.charCodeAt(++e.position);
|
|
2382
|
+
for (o = e.input.slice(t, e.position), r = [], o.length < 1 && F(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
2383
|
+
for (; Me(a); )
|
|
2384
|
+
a = e.input.charCodeAt(++e.position);
|
|
2385
|
+
if (a === 35) {
|
|
2386
2386
|
do
|
|
2387
|
-
|
|
2388
|
-
while (
|
|
2387
|
+
a = e.input.charCodeAt(++e.position);
|
|
2388
|
+
while (a !== 0 && !be(a));
|
|
2389
2389
|
break;
|
|
2390
2390
|
}
|
|
2391
|
-
if (be(
|
|
2391
|
+
if (be(a))
|
|
2392
2392
|
break;
|
|
2393
|
-
for (t = e.position;
|
|
2394
|
-
|
|
2393
|
+
for (t = e.position; a !== 0 && !ge(a); )
|
|
2394
|
+
a = e.input.charCodeAt(++e.position);
|
|
2395
2395
|
r.push(e.input.slice(t, e.position));
|
|
2396
2396
|
}
|
|
2397
|
-
|
|
2397
|
+
a !== 0 && xt(e), Ie.call(Rt, o) ? Rt[o](e, o, r) : tt(e, 'unknown document directive "' + o + '"');
|
|
2398
2398
|
}
|
|
2399
|
-
if (ne(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, ne(e, !0, -1)) : n && F(e, "directives end mark is expected"), Ue(e, e.lineIndent - 1, et, !1, !0), ne(e, !0, -1), e.checkLineBreaks &&
|
|
2399
|
+
if (ne(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, ne(e, !0, -1)) : n && F(e, "directives end mark is expected"), Ue(e, e.lineIndent - 1, et, !1, !0), ne(e, !0, -1), e.checkLineBreaks && Ua.test(e.input.slice(i, e.position)) && tt(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && at(e)) {
|
|
2400
2400
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ne(e, !0, -1));
|
|
2401
2401
|
return;
|
|
2402
2402
|
}
|
|
@@ -2408,8 +2408,8 @@ function en(e) {
|
|
|
2408
2408
|
function Hi(e, i) {
|
|
2409
2409
|
e = String(e), i = i || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2410
2410
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2411
|
-
var t = new
|
|
2412
|
-
for (
|
|
2411
|
+
var t = new Da(e, i), o = e.indexOf("\0");
|
|
2412
|
+
for (o !== -1 && (t.position = o, F(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2413
2413
|
t.lineIndent += 1, t.position += 1;
|
|
2414
2414
|
for (; t.position < t.length - 1; )
|
|
2415
2415
|
en(t);
|
|
@@ -2417,11 +2417,11 @@ function Hi(e, i) {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
function tn(e, i, t) {
|
|
2419
2419
|
i !== null && typeof i == "object" && typeof t > "u" && (t = i, i = null);
|
|
2420
|
-
var
|
|
2420
|
+
var o = Hi(e, t);
|
|
2421
2421
|
if (typeof i != "function")
|
|
2422
|
-
return
|
|
2423
|
-
for (var r = 0, n =
|
|
2424
|
-
i(
|
|
2422
|
+
return o;
|
|
2423
|
+
for (var r = 0, n = o.length; r < n; r += 1)
|
|
2424
|
+
i(o[r]);
|
|
2425
2425
|
}
|
|
2426
2426
|
function rn(e, i) {
|
|
2427
2427
|
var t = Hi(e, i);
|
|
@@ -2431,9 +2431,9 @@ function rn(e, i) {
|
|
|
2431
2431
|
throw new me("expected a single document in the stream, but found more");
|
|
2432
2432
|
}
|
|
2433
2433
|
}
|
|
2434
|
-
var
|
|
2435
|
-
loadAll:
|
|
2436
|
-
load:
|
|
2434
|
+
var on = tn, an = rn, zi = {
|
|
2435
|
+
loadAll: on,
|
|
2436
|
+
load: an
|
|
2437
2437
|
}, Gi = Object.prototype.toString, Ji = Object.prototype.hasOwnProperty, jt = 65279, nn = 9, Ge = 10, ln = 13, sn = 32, cn = 33, un = 34, gt = 35, dn = 37, pn = 38, fn = 39, mn = 42, Yi = 44, gn = 45, it = 58, yn = 61, vn = 62, hn = 63, bn = 64, Wi = 91, Zi = 93, wn = 96, Qi = 123, _n = 124, Xi = 125, fe = {};
|
|
2438
2438
|
fe[0] = "\\0";
|
|
2439
2439
|
fe[7] = "\\a";
|
|
@@ -2469,34 +2469,34 @@ var kn = [
|
|
|
2469
2469
|
"OFF"
|
|
2470
2470
|
], Cn = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2471
2471
|
function Sn(e, i) {
|
|
2472
|
-
var t,
|
|
2472
|
+
var t, o, r, n, a, s, l;
|
|
2473
2473
|
if (i === null)
|
|
2474
2474
|
return {};
|
|
2475
|
-
for (t = {},
|
|
2476
|
-
|
|
2475
|
+
for (t = {}, o = Object.keys(i), r = 0, n = o.length; r < n; r += 1)
|
|
2476
|
+
a = o[r], s = String(i[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = e.compiledTypeMap.fallback[a], l && Ji.call(l.styleAliases, s) && (s = l.styleAliases[s]), t[a] = s;
|
|
2477
2477
|
return t;
|
|
2478
2478
|
}
|
|
2479
2479
|
function In(e) {
|
|
2480
|
-
var i, t,
|
|
2480
|
+
var i, t, o;
|
|
2481
2481
|
if (i = e.toString(16).toUpperCase(), e <= 255)
|
|
2482
|
-
t = "x",
|
|
2482
|
+
t = "x", o = 2;
|
|
2483
2483
|
else if (e <= 65535)
|
|
2484
|
-
t = "u",
|
|
2484
|
+
t = "u", o = 4;
|
|
2485
2485
|
else if (e <= 4294967295)
|
|
2486
|
-
t = "U",
|
|
2486
|
+
t = "U", o = 8;
|
|
2487
2487
|
else
|
|
2488
2488
|
throw new me("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2489
|
-
return "\\" + t + le.repeat("0",
|
|
2489
|
+
return "\\" + t + le.repeat("0", o - i.length) + i;
|
|
2490
2490
|
}
|
|
2491
2491
|
var An = 1, Je = 2;
|
|
2492
2492
|
function xn(e) {
|
|
2493
2493
|
this.schema = e.schema || At, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = le.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Sn(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 === '"' ? Je : An, 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;
|
|
2494
2494
|
}
|
|
2495
2495
|
function zt(e, i) {
|
|
2496
|
-
for (var t = le.repeat(" ", i),
|
|
2496
|
+
for (var t = le.repeat(" ", i), o = 0, r = -1, n = "", a, s = e.length; o < s; )
|
|
2497
2497
|
r = e.indexOf(`
|
|
2498
|
-
`,
|
|
2499
|
-
` && (n += t), n +=
|
|
2498
|
+
`, o), r === -1 ? (a = e.slice(o), o = s) : (a = e.slice(o, r + 1), o = r + 1), a.length && a !== `
|
|
2499
|
+
` && (n += t), n += a;
|
|
2500
2500
|
return n;
|
|
2501
2501
|
}
|
|
2502
2502
|
function yt(e, i) {
|
|
@@ -2504,8 +2504,8 @@ function yt(e, i) {
|
|
|
2504
2504
|
` + le.repeat(" ", e.indent * i);
|
|
2505
2505
|
}
|
|
2506
2506
|
function Tn(e, i) {
|
|
2507
|
-
var t,
|
|
2508
|
-
for (t = 0,
|
|
2507
|
+
var t, o, r;
|
|
2508
|
+
for (t = 0, o = e.implicitTypes.length; t < o; t += 1)
|
|
2509
2509
|
if (r = e.implicitTypes[t], r.resolve(i))
|
|
2510
2510
|
return !0;
|
|
2511
2511
|
return !1;
|
|
@@ -2520,13 +2520,13 @@ function Gt(e) {
|
|
|
2520
2520
|
return Ye(e) && e !== jt && e !== ln && e !== Ge;
|
|
2521
2521
|
}
|
|
2522
2522
|
function Jt(e, i, t) {
|
|
2523
|
-
var
|
|
2523
|
+
var o = Gt(e), r = o && !rt(e);
|
|
2524
2524
|
return (
|
|
2525
2525
|
// ns-plain-safe
|
|
2526
2526
|
(t ? (
|
|
2527
2527
|
// c = flow-in
|
|
2528
|
-
|
|
2529
|
-
) :
|
|
2528
|
+
o
|
|
2529
|
+
) : o && e !== Yi && e !== Wi && e !== Zi && e !== Qi && e !== Xi) && e !== gt && !(i === it && !r) || Gt(i) && !rt(i) && e === gt || i === it && r
|
|
2530
2530
|
);
|
|
2531
2531
|
}
|
|
2532
2532
|
function jn(e) {
|
|
@@ -2536,17 +2536,17 @@ function Mn(e) {
|
|
|
2536
2536
|
return !rt(e) && e !== it;
|
|
2537
2537
|
}
|
|
2538
2538
|
function Pe(e, i) {
|
|
2539
|
-
var t = e.charCodeAt(i),
|
|
2540
|
-
return t >= 55296 && t <= 56319 && i + 1 < e.length && (
|
|
2539
|
+
var t = e.charCodeAt(i), o;
|
|
2540
|
+
return t >= 55296 && t <= 56319 && i + 1 < e.length && (o = e.charCodeAt(i + 1), o >= 56320 && o <= 57343) ? (t - 55296) * 1024 + o - 56320 + 65536 : t;
|
|
2541
2541
|
}
|
|
2542
2542
|
function er(e) {
|
|
2543
2543
|
var i = /^\n* /;
|
|
2544
2544
|
return i.test(e);
|
|
2545
2545
|
}
|
|
2546
2546
|
var tr = 1, vt = 2, ir = 3, rr = 4, Fe = 5;
|
|
2547
|
-
function $n(e, i, t,
|
|
2548
|
-
var l, d = 0, m = null, p = !1, _ = !1, h =
|
|
2549
|
-
if (i ||
|
|
2547
|
+
function $n(e, i, t, o, r, n, a, s) {
|
|
2548
|
+
var l, d = 0, m = null, p = !1, _ = !1, h = o !== -1, x = -1, b = jn(Pe(e, 0)) && Mn(Pe(e, e.length - 1));
|
|
2549
|
+
if (i || a)
|
|
2550
2550
|
for (l = 0; l < e.length; d >= 65536 ? l += 2 : l++) {
|
|
2551
2551
|
if (d = Pe(e, l), !Ye(d))
|
|
2552
2552
|
return Fe;
|
|
@@ -2556,22 +2556,22 @@ function $n(e, i, t, a, r, n, o, s) {
|
|
|
2556
2556
|
for (l = 0; l < e.length; d >= 65536 ? l += 2 : l++) {
|
|
2557
2557
|
if (d = Pe(e, l), d === Ge)
|
|
2558
2558
|
p = !0, h && (_ = _ || // Foldable line = too long, and not more-indented.
|
|
2559
|
-
l - x - 1 >
|
|
2559
|
+
l - x - 1 > o && e[x + 1] !== " ", x = l);
|
|
2560
2560
|
else if (!Ye(d))
|
|
2561
2561
|
return Fe;
|
|
2562
2562
|
b = b && Jt(d, m, s), m = d;
|
|
2563
2563
|
}
|
|
2564
|
-
_ = _ || h && l - x - 1 >
|
|
2564
|
+
_ = _ || h && l - x - 1 > o && e[x + 1] !== " ";
|
|
2565
2565
|
}
|
|
2566
|
-
return !p && !_ ? b && !
|
|
2566
|
+
return !p && !_ ? b && !a && !r(e) ? tr : n === Je ? Fe : vt : t > 9 && er(e) ? Fe : a ? n === Je ? Fe : vt : _ ? rr : ir;
|
|
2567
2567
|
}
|
|
2568
|
-
function On(e, i, t,
|
|
2568
|
+
function On(e, i, t, o, r) {
|
|
2569
2569
|
e.dump = function() {
|
|
2570
2570
|
if (i.length === 0)
|
|
2571
2571
|
return e.quotingType === Je ? '""' : "''";
|
|
2572
2572
|
if (!e.noCompatMode && (kn.indexOf(i) !== -1 || Cn.test(i)))
|
|
2573
2573
|
return e.quotingType === Je ? '"' + i + '"' : "'" + i + "'";
|
|
2574
|
-
var n = e.indent * Math.max(1, t),
|
|
2574
|
+
var n = e.indent * Math.max(1, t), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - n), s = o || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2575
2575
|
function l(d) {
|
|
2576
2576
|
return Tn(e, d);
|
|
2577
2577
|
}
|
|
@@ -2579,10 +2579,10 @@ function On(e, i, t, a, r) {
|
|
|
2579
2579
|
i,
|
|
2580
2580
|
s,
|
|
2581
2581
|
e.indent,
|
|
2582
|
-
|
|
2582
|
+
a,
|
|
2583
2583
|
l,
|
|
2584
2584
|
e.quotingType,
|
|
2585
|
-
e.forceQuotes && !
|
|
2585
|
+
e.forceQuotes && !o,
|
|
2586
2586
|
r
|
|
2587
2587
|
)) {
|
|
2588
2588
|
case tr:
|
|
@@ -2592,7 +2592,7 @@ function On(e, i, t, a, r) {
|
|
|
2592
2592
|
case ir:
|
|
2593
2593
|
return "|" + Yt(i, e.indent) + Wt(zt(i, n));
|
|
2594
2594
|
case rr:
|
|
2595
|
-
return ">" + Yt(i, e.indent) + Wt(zt(En(i,
|
|
2595
|
+
return ">" + Yt(i, e.indent) + Wt(zt(En(i, a), n));
|
|
2596
2596
|
case Fe:
|
|
2597
2597
|
return '"' + Fn(i) + '"';
|
|
2598
2598
|
default:
|
|
@@ -2601,10 +2601,10 @@ function On(e, i, t, a, r) {
|
|
|
2601
2601
|
}();
|
|
2602
2602
|
}
|
|
2603
2603
|
function Yt(e, i) {
|
|
2604
|
-
var t = er(e) ? String(i) : "",
|
|
2605
|
-
`, r =
|
|
2604
|
+
var t = er(e) ? String(i) : "", o = e[e.length - 1] === `
|
|
2605
|
+
`, r = o && (e[e.length - 2] === `
|
|
2606
2606
|
` || e === `
|
|
2607
|
-
`), n = r ? "+" :
|
|
2607
|
+
`), n = r ? "+" : o ? "" : "-";
|
|
2608
2608
|
return t + n + `
|
|
2609
2609
|
`;
|
|
2610
2610
|
}
|
|
@@ -2613,92 +2613,92 @@ function Wt(e) {
|
|
|
2613
2613
|
` ? e.slice(0, -1) : e;
|
|
2614
2614
|
}
|
|
2615
2615
|
function En(e, i) {
|
|
2616
|
-
for (var t = /(\n+)([^\n]*)/g,
|
|
2616
|
+
for (var t = /(\n+)([^\n]*)/g, o = function() {
|
|
2617
2617
|
var d = e.indexOf(`
|
|
2618
2618
|
`);
|
|
2619
2619
|
return d = d !== -1 ? d : e.length, t.lastIndex = d, Zt(e.slice(0, d), i);
|
|
2620
2620
|
}(), r = e[0] === `
|
|
2621
|
-
` || e[0] === " ", n,
|
|
2622
|
-
var s =
|
|
2623
|
-
n = l[0] === " ",
|
|
2621
|
+
` || e[0] === " ", n, a; a = t.exec(e); ) {
|
|
2622
|
+
var s = a[1], l = a[2];
|
|
2623
|
+
n = l[0] === " ", o += s + (!r && !n && l !== "" ? `
|
|
2624
2624
|
` : "") + Zt(l, i), r = n;
|
|
2625
2625
|
}
|
|
2626
|
-
return
|
|
2626
|
+
return o;
|
|
2627
2627
|
}
|
|
2628
2628
|
function Zt(e, i) {
|
|
2629
2629
|
if (e === "" || e[0] === " ")
|
|
2630
2630
|
return e;
|
|
2631
|
-
for (var t = / [^ ]/g,
|
|
2632
|
-
s =
|
|
2633
|
-
` + e.slice(r, n), r = n + 1),
|
|
2631
|
+
for (var t = / [^ ]/g, o, r = 0, n, a = 0, s = 0, l = ""; o = t.exec(e); )
|
|
2632
|
+
s = o.index, s - r > i && (n = a > r ? a : s, l += `
|
|
2633
|
+
` + e.slice(r, n), r = n + 1), a = s;
|
|
2634
2634
|
return l += `
|
|
2635
|
-
`, e.length - r > i &&
|
|
2636
|
-
` + e.slice(
|
|
2635
|
+
`, e.length - r > i && a > r ? l += e.slice(r, a) + `
|
|
2636
|
+
` + e.slice(a + 1) : l += e.slice(r), l.slice(1);
|
|
2637
2637
|
}
|
|
2638
2638
|
function Fn(e) {
|
|
2639
|
-
for (var i = "", t = 0,
|
|
2640
|
-
t = Pe(e, r),
|
|
2639
|
+
for (var i = "", t = 0, o, r = 0; r < e.length; t >= 65536 ? r += 2 : r++)
|
|
2640
|
+
t = Pe(e, r), o = fe[t], !o && Ye(t) ? (i += e[r], t >= 65536 && (i += e[r + 1])) : i += o || In(t);
|
|
2641
2641
|
return i;
|
|
2642
2642
|
}
|
|
2643
2643
|
function Vn(e, i, t) {
|
|
2644
|
-
var
|
|
2645
|
-
for (n = 0,
|
|
2646
|
-
s = t[n], e.replacer && (s = e.replacer.call(t, String(n), s)), (ke(e, i, s, !1, !1) || typeof s > "u" && ke(e, i, null, !1, !1)) && (
|
|
2647
|
-
e.tag = r, e.dump = "[" +
|
|
2648
|
-
}
|
|
2649
|
-
function Qt(e, i, t,
|
|
2650
|
-
var r = "", n = e.tag,
|
|
2651
|
-
for (
|
|
2652
|
-
l = t[
|
|
2644
|
+
var o = "", r = e.tag, n, a, s;
|
|
2645
|
+
for (n = 0, a = t.length; n < a; n += 1)
|
|
2646
|
+
s = t[n], e.replacer && (s = e.replacer.call(t, String(n), s)), (ke(e, i, s, !1, !1) || typeof s > "u" && ke(e, i, null, !1, !1)) && (o !== "" && (o += "," + (e.condenseFlow ? "" : " ")), o += e.dump);
|
|
2647
|
+
e.tag = r, e.dump = "[" + o + "]";
|
|
2648
|
+
}
|
|
2649
|
+
function Qt(e, i, t, o) {
|
|
2650
|
+
var r = "", n = e.tag, a, s, l;
|
|
2651
|
+
for (a = 0, s = t.length; a < s; a += 1)
|
|
2652
|
+
l = t[a], e.replacer && (l = e.replacer.call(t, String(a), l)), (ke(e, i + 1, l, !0, !0, !1, !0) || typeof l > "u" && ke(e, i + 1, null, !0, !0, !1, !0)) && ((!o || r !== "") && (r += yt(e, i)), e.dump && Ge === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2653
2653
|
e.tag = n, e.dump = r || "[]";
|
|
2654
2654
|
}
|
|
2655
2655
|
function Nn(e, i, t) {
|
|
2656
|
-
var
|
|
2657
|
-
for (
|
|
2658
|
-
m = "",
|
|
2659
|
-
e.tag = r, e.dump = "{" +
|
|
2656
|
+
var o = "", r = e.tag, n = Object.keys(t), a, s, l, d, m;
|
|
2657
|
+
for (a = 0, s = n.length; a < s; a += 1)
|
|
2658
|
+
m = "", o !== "" && (m += ", "), e.condenseFlow && (m += '"'), l = n[a], d = t[l], e.replacer && (d = e.replacer.call(t, l, d)), ke(e, i, l, !1, !1) && (e.dump.length > 1024 && (m += "? "), m += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ke(e, i, d, !1, !1) && (m += e.dump, o += m));
|
|
2659
|
+
e.tag = r, e.dump = "{" + o + "}";
|
|
2660
2660
|
}
|
|
2661
|
-
function qn(e, i, t,
|
|
2662
|
-
var r = "", n = e.tag,
|
|
2661
|
+
function qn(e, i, t, o) {
|
|
2662
|
+
var r = "", n = e.tag, a = Object.keys(t), s, l, d, m, p, _;
|
|
2663
2663
|
if (e.sortKeys === !0)
|
|
2664
|
-
|
|
2664
|
+
a.sort();
|
|
2665
2665
|
else if (typeof e.sortKeys == "function")
|
|
2666
|
-
|
|
2666
|
+
a.sort(e.sortKeys);
|
|
2667
2667
|
else if (e.sortKeys)
|
|
2668
2668
|
throw new me("sortKeys must be a boolean or a function");
|
|
2669
|
-
for (s = 0, l =
|
|
2670
|
-
_ = "", (!
|
|
2669
|
+
for (s = 0, l = a.length; s < l; s += 1)
|
|
2670
|
+
_ = "", (!o || r !== "") && (_ += yt(e, i)), d = a[s], m = t[d], e.replacer && (m = e.replacer.call(t, d, m)), ke(e, i + 1, d, !0, !0, !0) && (p = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, p && (e.dump && Ge === e.dump.charCodeAt(0) ? _ += "?" : _ += "? "), _ += e.dump, p && (_ += yt(e, i)), ke(e, i + 1, m, !0, p) && (e.dump && Ge === e.dump.charCodeAt(0) ? _ += ":" : _ += ": ", _ += e.dump, r += _));
|
|
2671
2671
|
e.tag = n, e.dump = r || "{}";
|
|
2672
2672
|
}
|
|
2673
2673
|
function Xt(e, i, t) {
|
|
2674
|
-
var
|
|
2675
|
-
for (r = t ? e.explicitTypes : e.implicitTypes, n = 0,
|
|
2674
|
+
var o, r, n, a, s, l;
|
|
2675
|
+
for (r = t ? e.explicitTypes : e.implicitTypes, n = 0, a = r.length; n < a; n += 1)
|
|
2676
2676
|
if (s = r[n], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof i == "object" && i instanceof s.instanceOf) && (!s.predicate || s.predicate(i))) {
|
|
2677
2677
|
if (t ? s.multi && s.representName ? e.tag = s.representName(i) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2678
2678
|
if (l = e.styleMap[s.tag] || s.defaultStyle, Gi.call(s.represent) === "[object Function]")
|
|
2679
|
-
|
|
2679
|
+
o = s.represent(i, l);
|
|
2680
2680
|
else if (Ji.call(s.represent, l))
|
|
2681
|
-
|
|
2681
|
+
o = s.represent[l](i, l);
|
|
2682
2682
|
else
|
|
2683
2683
|
throw new me("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
2684
|
-
e.dump =
|
|
2684
|
+
e.dump = o;
|
|
2685
2685
|
}
|
|
2686
2686
|
return !0;
|
|
2687
2687
|
}
|
|
2688
2688
|
return !1;
|
|
2689
2689
|
}
|
|
2690
|
-
function ke(e, i, t,
|
|
2690
|
+
function ke(e, i, t, o, r, n, a) {
|
|
2691
2691
|
e.tag = null, e.dump = t, Xt(e, t, !1) || Xt(e, t, !0);
|
|
2692
|
-
var s = Gi.call(e.dump), l =
|
|
2693
|
-
|
|
2692
|
+
var s = Gi.call(e.dump), l = o, d;
|
|
2693
|
+
o && (o = e.flowLevel < 0 || e.flowLevel > i);
|
|
2694
2694
|
var m = s === "[object Object]" || s === "[object Array]", p, _;
|
|
2695
2695
|
if (m && (p = e.duplicates.indexOf(t), _ = p !== -1), (e.tag !== null && e.tag !== "?" || _ || e.indent !== 2 && i > 0) && (r = !1), _ && e.usedDuplicates[p])
|
|
2696
2696
|
e.dump = "*ref_" + p;
|
|
2697
2697
|
else {
|
|
2698
2698
|
if (m && _ && !e.usedDuplicates[p] && (e.usedDuplicates[p] = !0), s === "[object Object]")
|
|
2699
|
-
|
|
2699
|
+
o && Object.keys(e.dump).length !== 0 ? (qn(e, i, e.dump, r), _ && (e.dump = "&ref_" + p + e.dump)) : (Nn(e, i, e.dump), _ && (e.dump = "&ref_" + p + " " + e.dump));
|
|
2700
2700
|
else if (s === "[object Array]")
|
|
2701
|
-
|
|
2701
|
+
o && e.dump.length !== 0 ? (e.noArrayIndent && !a && i > 0 ? Qt(e, i - 1, e.dump, r) : Qt(e, i, e.dump, r), _ && (e.dump = "&ref_" + p + e.dump)) : (Vn(e, i, e.dump), _ && (e.dump = "&ref_" + p + " " + e.dump));
|
|
2702
2702
|
else if (s === "[object String]")
|
|
2703
2703
|
e.tag !== "?" && On(e, e.dump, i, n, l);
|
|
2704
2704
|
else {
|
|
@@ -2713,13 +2713,13 @@ function ke(e, i, t, a, r, n, o) {
|
|
|
2713
2713
|
return !0;
|
|
2714
2714
|
}
|
|
2715
2715
|
function Un(e, i) {
|
|
2716
|
-
var t = [],
|
|
2717
|
-
for (ht(e, t,
|
|
2718
|
-
i.duplicates.push(t[
|
|
2716
|
+
var t = [], o = [], r, n;
|
|
2717
|
+
for (ht(e, t, o), r = 0, n = o.length; r < n; r += 1)
|
|
2718
|
+
i.duplicates.push(t[o[r]]);
|
|
2719
2719
|
i.usedDuplicates = new Array(n);
|
|
2720
2720
|
}
|
|
2721
2721
|
function ht(e, i, t) {
|
|
2722
|
-
var
|
|
2722
|
+
var o, r, n;
|
|
2723
2723
|
if (e !== null && typeof e == "object")
|
|
2724
2724
|
if (r = i.indexOf(e), r !== -1)
|
|
2725
2725
|
t.indexOf(r) === -1 && t.push(r);
|
|
@@ -2727,15 +2727,15 @@ function ht(e, i, t) {
|
|
|
2727
2727
|
for (r = 0, n = e.length; r < n; r += 1)
|
|
2728
2728
|
ht(e[r], i, t);
|
|
2729
2729
|
else
|
|
2730
|
-
for (
|
|
2731
|
-
ht(e[
|
|
2730
|
+
for (o = Object.keys(e), r = 0, n = o.length; r < n; r += 1)
|
|
2731
|
+
ht(e[o[r]], i, t);
|
|
2732
2732
|
}
|
|
2733
2733
|
function Ln(e, i) {
|
|
2734
2734
|
i = i || {};
|
|
2735
2735
|
var t = new xn(i);
|
|
2736
2736
|
t.noRefs || Un(e, t);
|
|
2737
|
-
var
|
|
2738
|
-
return t.replacer && (
|
|
2737
|
+
var o = e;
|
|
2738
|
+
return t.replacer && (o = t.replacer.call({ "": o }, "", o)), ke(t, 0, o, !0, !0) ? t.dump + `
|
|
2739
2739
|
` : "";
|
|
2740
2740
|
}
|
|
2741
2741
|
var Kn = Ln, Bn = {
|
|
@@ -2776,7 +2776,7 @@ var Pn = de, Rn = bi, Dn = Ci, Hn = Ti, zn = ji, Gn = At, Jn = zi.load, Yn = zi.
|
|
|
2776
2776
|
safeLoadAll: el,
|
|
2777
2777
|
safeDump: tl
|
|
2778
2778
|
};
|
|
2779
|
-
const rl = { class: "yaml-config" },
|
|
2779
|
+
const rl = { class: "yaml-config" }, or = /* @__PURE__ */ re({
|
|
2780
2780
|
__name: "YamlCodeBlock",
|
|
2781
2781
|
props: {
|
|
2782
2782
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2787,7 +2787,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2787
2787
|
},
|
|
2788
2788
|
setup(e) {
|
|
2789
2789
|
const i = e, t = Ze(i.yamlRecord);
|
|
2790
|
-
return (
|
|
2790
|
+
return (o, r) => {
|
|
2791
2791
|
const n = L("KCodeBlock");
|
|
2792
2792
|
return v(), M("div", rl, [
|
|
2793
2793
|
i.yamlRecord ? (v(), P(n, {
|
|
@@ -2800,10 +2800,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2800
2800
|
]);
|
|
2801
2801
|
};
|
|
2802
2802
|
}
|
|
2803
|
-
}),
|
|
2803
|
+
}), ol = {
|
|
2804
2804
|
key: 0,
|
|
2805
2805
|
class: "config-card-display-form"
|
|
2806
|
-
},
|
|
2806
|
+
}, al = ["data-testid"], nl = {
|
|
2807
2807
|
key: 0,
|
|
2808
2808
|
class: "config-card-prop-section-title"
|
|
2809
2809
|
}, ll = /* @__PURE__ */ re({
|
|
@@ -2845,29 +2845,29 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2845
2845
|
}
|
|
2846
2846
|
},
|
|
2847
2847
|
setup(e) {
|
|
2848
|
-
const i = e, t =
|
|
2848
|
+
const i = e, t = ot(), { i18n: { t: o } } = se.useI18n(), r = (a) => !!(a.tooltip || t[`${a.key}-label-tooltip`]), n = j(() => {
|
|
2849
2849
|
if (!i.record)
|
|
2850
2850
|
return i.record;
|
|
2851
|
-
const
|
|
2852
|
-
return delete
|
|
2851
|
+
const a = JSON.parse(JSON.stringify(i.record));
|
|
2852
|
+
return delete a.created_at, delete a.updated_at, a;
|
|
2853
2853
|
});
|
|
2854
|
-
return (
|
|
2855
|
-
e.format === "structured" ? (v(), M("div",
|
|
2854
|
+
return (a, s) => (v(), M(ve, null, [
|
|
2855
|
+
e.format === "structured" ? (v(), M("div", ol, [
|
|
2856
2856
|
(v(!0), M(ve, null, ye(e.propListTypes, (l) => (v(), M("div", {
|
|
2857
2857
|
key: `config-card-details-${l}-props`,
|
|
2858
2858
|
class: Se(`config-card-details-${l}-props`),
|
|
2859
2859
|
"data-testid": `config-card-details-${l}-props`
|
|
2860
2860
|
}, [
|
|
2861
|
-
l !== "basic" ? (v(), M("div", nl, O(l === "advanced" ? f(
|
|
2861
|
+
l !== "basic" ? (v(), M("div", nl, O(l === "advanced" ? f(o)("baseConfigCard.sections.advanced") : f(o)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
2862
2862
|
(v(!0), M(ve, null, ye(e.propertyCollections[l], (d) => (v(), P(St, {
|
|
2863
2863
|
key: d.key,
|
|
2864
2864
|
item: d
|
|
2865
2865
|
}, je({
|
|
2866
2866
|
label: y(() => [
|
|
2867
|
-
Q(
|
|
2867
|
+
Q(a.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2868
2868
|
]),
|
|
2869
2869
|
[d.key]: y(({ rowValue: m }) => [
|
|
2870
|
-
Q(
|
|
2870
|
+
Q(a.$slots, d.key, {
|
|
2871
2871
|
row: d,
|
|
2872
2872
|
rowValue: m
|
|
2873
2873
|
}, void 0, !0)
|
|
@@ -2877,12 +2877,12 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2877
2877
|
r(d) ? {
|
|
2878
2878
|
name: "label-tooltip",
|
|
2879
2879
|
fn: y(() => [
|
|
2880
|
-
Q(
|
|
2880
|
+
Q(a.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2881
2881
|
]),
|
|
2882
2882
|
key: "0"
|
|
2883
2883
|
} : void 0
|
|
2884
2884
|
]), 1032, ["item"]))), 128))
|
|
2885
|
-
], 10,
|
|
2885
|
+
], 10, al))), 128))
|
|
2886
2886
|
])) : D("", !0),
|
|
2887
2887
|
e.format === "json" && i.record ? (v(), P(yi, {
|
|
2888
2888
|
key: 1,
|
|
@@ -2891,7 +2891,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2891
2891
|
"json-record": n.value,
|
|
2892
2892
|
"request-method": "get"
|
|
2893
2893
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : D("", !0),
|
|
2894
|
-
e.format === "yaml" && i.record ? (v(), P(
|
|
2894
|
+
e.format === "yaml" && i.record ? (v(), P(or, {
|
|
2895
2895
|
key: 2,
|
|
2896
2896
|
"yaml-record": n.value
|
|
2897
2897
|
}, null, 8, ["yaml-record"])) : D("", !0)
|
|
@@ -2899,8 +2899,8 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2899
2899
|
}
|
|
2900
2900
|
}), sl = /* @__PURE__ */ he(ll, [["__scopeId", "data-v-2b74ac63"]]), ei = "24px", cl = (e, i) => {
|
|
2901
2901
|
const t = e.__vccOpts || e;
|
|
2902
|
-
for (const [
|
|
2903
|
-
t[
|
|
2902
|
+
for (const [o, r] of i)
|
|
2903
|
+
t[o] = r;
|
|
2904
2904
|
return t;
|
|
2905
2905
|
}, ul = (e) => (ni("data-v-44d910d6"), e = e(), li(), e), dl = ["aria-hidden"], pl = {
|
|
2906
2906
|
key: 0,
|
|
@@ -2969,7 +2969,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2969
2969
|
return `${n}px`;
|
|
2970
2970
|
}
|
|
2971
2971
|
return ei;
|
|
2972
|
-
}),
|
|
2972
|
+
}), o = j(() => ({
|
|
2973
2973
|
boxSizing: "border-box",
|
|
2974
2974
|
color: i.color,
|
|
2975
2975
|
display: i.display,
|
|
@@ -2981,7 +2981,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
2981
2981
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2982
2982
|
class: "kui-icon book-icon",
|
|
2983
2983
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2984
|
-
style:
|
|
2984
|
+
style: ai(o.value)
|
|
2985
2985
|
}, {
|
|
2986
2986
|
default: y(() => [
|
|
2987
2987
|
(v(), M("svg", {
|
|
@@ -3085,11 +3085,11 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3085
3085
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
3086
3086
|
setup(e, { emit: i }) {
|
|
3087
3087
|
var t;
|
|
3088
|
-
const
|
|
3088
|
+
const o = i, r = e, n = ot(), { i18n: { t: a } } = se.useI18n(), { getMessageFromError: s } = se.useErrors(), { convertKeyToTitle: l } = se.useStringHelpers(), { axiosInstance: d } = se.useAxios({
|
|
3089
3089
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3090
3090
|
}), m = [
|
|
3091
3091
|
{
|
|
3092
|
-
label:
|
|
3092
|
+
label: a("baseConfigCard.general.structuredFormat"),
|
|
3093
3093
|
value: "structured",
|
|
3094
3094
|
selected: !0
|
|
3095
3095
|
},
|
|
@@ -3106,7 +3106,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3106
3106
|
}, h = {
|
|
3107
3107
|
id: {
|
|
3108
3108
|
type: te.ID,
|
|
3109
|
-
label:
|
|
3109
|
+
label: a("baseConfigCard.commonFields.id_label"),
|
|
3110
3110
|
order: 0,
|
|
3111
3111
|
section: pe.Basic
|
|
3112
3112
|
},
|
|
@@ -3121,13 +3121,13 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3121
3121
|
},
|
|
3122
3122
|
updated_at: {
|
|
3123
3123
|
type: te.Date,
|
|
3124
|
-
label:
|
|
3124
|
+
label: a("baseConfigCard.commonFields.updated_at_label"),
|
|
3125
3125
|
order: 3,
|
|
3126
3126
|
section: pe.Basic
|
|
3127
3127
|
},
|
|
3128
3128
|
created_at: {
|
|
3129
3129
|
type: te.Date,
|
|
3130
|
-
label:
|
|
3130
|
+
label: a("baseConfigCard.commonFields.created_at_label"),
|
|
3131
3131
|
order: 4,
|
|
3132
3132
|
section: pe.Basic
|
|
3133
3133
|
},
|
|
@@ -3144,20 +3144,20 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3144
3144
|
const B = [], z = Object.keys(S.value).length;
|
|
3145
3145
|
for (const J in S.value) {
|
|
3146
3146
|
const X = (H = (I = r.configSchema) == null ? void 0 : I[J]) == null ? void 0 : H.order, Y = (K = h[J]) == null ? void 0 : K.order;
|
|
3147
|
-
let
|
|
3148
|
-
(Y || Y === 0) && (
|
|
3147
|
+
let oe = z;
|
|
3148
|
+
(Y || Y === 0) && (oe = Y === -1 ? z + 1 : Y), X && (oe = X === -1 ? z + 1 : X), B.push([J, oe]);
|
|
3149
3149
|
}
|
|
3150
3150
|
return B.sort(function(J, X) {
|
|
3151
3151
|
return J[1] - X[1];
|
|
3152
3152
|
}), B.map((J) => {
|
|
3153
3153
|
var X, Y;
|
|
3154
|
-
const
|
|
3154
|
+
const oe = J[0], Z = (X = S.value) == null ? void 0 : X[oe], ee = ((Y = r.configSchema) == null ? void 0 : Y[oe]) || {}, ue = h[oe];
|
|
3155
3155
|
return {
|
|
3156
|
-
key:
|
|
3156
|
+
key: oe,
|
|
3157
3157
|
value: Z,
|
|
3158
3158
|
hidden: ee.hidden || !1,
|
|
3159
3159
|
type: ee.type ?? ((ue == null ? void 0 : ue.type) || te.Text),
|
|
3160
|
-
label: ee.label ?? ((ue == null ? void 0 : ue.label) || l(
|
|
3160
|
+
label: ee.label ?? ((ue == null ? void 0 : ue.label) || l(oe)),
|
|
3161
3161
|
tooltip: ee.tooltip ?? ((ue == null ? void 0 : ue.tooltip) || void 0),
|
|
3162
3162
|
section: ee.section ?? ((ue == null ? void 0 : ue.section) || pe.Advanced)
|
|
3163
3163
|
};
|
|
@@ -3169,17 +3169,17 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3169
3169
|
const K = S.value[r.pluginConfigKey] || {}, B = Object.keys(K).length, z = [];
|
|
3170
3170
|
for (const J in K) {
|
|
3171
3171
|
const X = (H = (I = r.pluginConfigSchema) == null ? void 0 : I[J]) == null ? void 0 : H.order, Y = K[J];
|
|
3172
|
-
let
|
|
3173
|
-
X && (
|
|
3172
|
+
let oe = Y != null && Y !== "" ? B - 1 : B;
|
|
3173
|
+
X && (oe = X === -1 ? B + 1 : X), z.push([J, oe]);
|
|
3174
3174
|
}
|
|
3175
3175
|
return z.sort(function(J, X) {
|
|
3176
3176
|
return J[1] - X[1];
|
|
3177
3177
|
}), z.map((J) => {
|
|
3178
3178
|
var X;
|
|
3179
|
-
const Y = J[0],
|
|
3179
|
+
const Y = J[0], oe = K[Y], Z = ((X = r.pluginConfigSchema) == null ? void 0 : X[Y]) || {};
|
|
3180
3180
|
return {
|
|
3181
3181
|
key: Y,
|
|
3182
|
-
value:
|
|
3182
|
+
value: oe,
|
|
3183
3183
|
hidden: Z.hidden || !1,
|
|
3184
3184
|
type: Z.type ?? te.Text,
|
|
3185
3185
|
label: Z.label ?? l(Y),
|
|
@@ -3197,38 +3197,38 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3197
3197
|
}), E = j(() => {
|
|
3198
3198
|
const I = [];
|
|
3199
3199
|
return k.value.basic.length && I.push("basic"), k.value.advanced.length && I.push("advanced"), k.value.plugin.length && I.push("plugin"), I;
|
|
3200
|
-
}), q = (I) => !!(I.tooltip || n[`${I.key}-label-tooltip`]),
|
|
3200
|
+
}), q = (I) => !!(I.tooltip || n[`${I.key}-label-tooltip`]), ae = j(() => {
|
|
3201
3201
|
var I, H;
|
|
3202
3202
|
let K = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3203
3203
|
return r.config.app === "konnect" ? K = K.replace(/{controlPlaneId}/gi, ((I = r.config) == null ? void 0 : I.controlPlaneId) || "") : r.config.app === "kongManager" && (K = K.replace(/\/{workspace}/gi, (H = r.config) != null && H.workspace ? `/${r.config.workspace}` : "")), K = K.replace(/{id}/gi, r.config.entityId), K;
|
|
3204
3204
|
}), R = (I) => {
|
|
3205
|
-
S.value && I(JSON.stringify(S.value)) ?
|
|
3205
|
+
S.value && I(JSON.stringify(S.value)) ? o("copy:success", S.value) : o("copy:error");
|
|
3206
3206
|
};
|
|
3207
3207
|
return _e(x, (I) => {
|
|
3208
|
-
|
|
3208
|
+
o("loading", I);
|
|
3209
3209
|
}, { immediate: !0 }), bt(async () => {
|
|
3210
3210
|
b.value = !1, x.value = !0;
|
|
3211
3211
|
try {
|
|
3212
|
-
const { data: I } = await d.get(
|
|
3212
|
+
const { data: I } = await d.get(ae.value);
|
|
3213
3213
|
if (r.dataKey)
|
|
3214
3214
|
if (typeof I[r.dataKey] < "u")
|
|
3215
3215
|
S.value = { ...I[r.dataKey] };
|
|
3216
3216
|
else
|
|
3217
|
-
throw new Error(
|
|
3217
|
+
throw new Error(a("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3218
3218
|
else
|
|
3219
3219
|
S.value = { ...I };
|
|
3220
3220
|
Object.keys(r.configSchema).filter((H) => r.configSchema[H].forceShow).forEach((H) => {
|
|
3221
3221
|
S.value && typeof S.value[H] > "u" && (S.value[H] = null);
|
|
3222
|
-
}),
|
|
3222
|
+
}), o("fetch:success", I);
|
|
3223
3223
|
} catch (I) {
|
|
3224
3224
|
const H = s(I);
|
|
3225
|
-
$.value = H.startsWith("code") ?
|
|
3225
|
+
$.value = H.startsWith("code") ? a("baseConfigCard.errors.load") : H, b.value = !0, o("fetch:error", I);
|
|
3226
3226
|
} finally {
|
|
3227
3227
|
x.value = !1;
|
|
3228
3228
|
}
|
|
3229
3229
|
}), (I, H) => {
|
|
3230
|
-
const K = L("KLabel"), B = L("KSelect"), z = L("KButton"), J = L("KClipboardProvider"), X = L("KSkeleton"), Y = L("KEmptyState"),
|
|
3231
|
-
return v(), P(
|
|
3230
|
+
const K = L("KLabel"), B = L("KSelect"), z = L("KButton"), J = L("KClipboardProvider"), X = L("KSkeleton"), Y = L("KEmptyState"), oe = L("KCard");
|
|
3231
|
+
return v(), P(oe, { class: "kong-ui-entity-base-config-card" }, je({
|
|
3232
3232
|
actions: y(() => [
|
|
3233
3233
|
N("div", vl, [
|
|
3234
3234
|
Q(I.$slots, "actions", {}, void 0, !0),
|
|
@@ -3244,7 +3244,6 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3244
3244
|
})) : D("", !0),
|
|
3245
3245
|
e.config.jsonYamlEnabled ? (v(), P(B, {
|
|
3246
3246
|
key: 1,
|
|
3247
|
-
appearance: "select",
|
|
3248
3247
|
"data-testid": "select-config-format",
|
|
3249
3248
|
items: m,
|
|
3250
3249
|
onChange: _
|
|
@@ -3261,7 +3260,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3261
3260
|
rel: "noopener",
|
|
3262
3261
|
target: "_blank"
|
|
3263
3262
|
}, [
|
|
3264
|
-
C(f(gl), { size: f(
|
|
3263
|
+
C(f(gl), { size: f(_o) }, null, 8, ["size"])
|
|
3265
3264
|
], 8, hl)
|
|
3266
3265
|
]),
|
|
3267
3266
|
_: 1
|
|
@@ -3275,7 +3274,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3275
3274
|
onClick: (ee) => R(Z)
|
|
3276
3275
|
}, {
|
|
3277
3276
|
default: y(() => [
|
|
3278
|
-
G(O(f(
|
|
3277
|
+
G(O(f(a)("baseConfigCard.actions.copy")), 1)
|
|
3279
3278
|
]),
|
|
3280
3279
|
_: 2
|
|
3281
3280
|
}, 1032, ["onClick"])) : D("", !0)
|
|
@@ -3303,7 +3302,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3303
3302
|
e.config.jsonYamlEnabled ? (v(), M("div", bl, [
|
|
3304
3303
|
C(sl, {
|
|
3305
3304
|
config: e.config,
|
|
3306
|
-
"fetcher-url":
|
|
3305
|
+
"fetcher-url": ae.value,
|
|
3307
3306
|
format: p.value,
|
|
3308
3307
|
"prop-list-types": E.value,
|
|
3309
3308
|
"property-collections": k.value,
|
|
@@ -3325,7 +3324,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3325
3324
|
class: Se(`config-card-details-${Z}-props`),
|
|
3326
3325
|
"data-testid": `config-card-details-${Z}-props`
|
|
3327
3326
|
}, [
|
|
3328
|
-
Z !== "basic" ? (v(), M("div", kl, O(Z === "advanced" ? f(
|
|
3327
|
+
Z !== "basic" ? (v(), M("div", kl, O(Z === "advanced" ? f(a)("baseConfigCard.sections.advanced") : f(a)("baseConfigCard.sections.plugin")), 1)) : D("", !0),
|
|
3329
3328
|
(v(!0), M(ve, null, ye(k.value[Z], (ee) => (v(), P(St, {
|
|
3330
3329
|
key: ee.key,
|
|
3331
3330
|
item: ee
|
|
@@ -3359,7 +3358,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3359
3358
|
fn: y(() => [
|
|
3360
3359
|
N("div", yl, [
|
|
3361
3360
|
Q(I.$slots, "title", {}, () => [
|
|
3362
|
-
G(O(f(
|
|
3361
|
+
G(O(f(a)("baseConfigCard.title")), 1)
|
|
3363
3362
|
], !0)
|
|
3364
3363
|
])
|
|
3365
3364
|
]),
|
|
@@ -3368,7 +3367,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3368
3367
|
]), 1024);
|
|
3369
3368
|
};
|
|
3370
3369
|
}
|
|
3371
|
-
}), Sl = /* @__PURE__ */ he(Cl, [["__scopeId", "data-v-
|
|
3370
|
+
}), Sl = /* @__PURE__ */ he(Cl, [["__scopeId", "data-v-3fd4a3a4"]]), Il = {
|
|
3372
3371
|
class: "form-actions",
|
|
3373
3372
|
"data-testid": "form-actions"
|
|
3374
3373
|
}, Al = { key: 0 }, xl = /* @__PURE__ */ re({
|
|
@@ -3426,7 +3425,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3426
3425
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3427
3426
|
setup(e, { emit: i }) {
|
|
3428
3427
|
var t;
|
|
3429
|
-
const
|
|
3428
|
+
const o = i, r = e, n = wt(), { i18n: { t: a } } = se.useI18n(), { getMessageFromError: s } = se.useErrors(), { axiosInstance: l } = se.useAxios({
|
|
3430
3429
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3431
3430
|
}), d = U(!1), m = U(!1), p = U(""), _ = j(() => r.canSubmit === !1 || r.isReadonly), h = U(!1), x = j(() => {
|
|
3432
3431
|
var k, E;
|
|
@@ -3437,43 +3436,43 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3437
3436
|
}, $ = () => {
|
|
3438
3437
|
r.config.cancelRoute ? n.push(r.config.cancelRoute) : S();
|
|
3439
3438
|
}, S = () => {
|
|
3440
|
-
|
|
3439
|
+
o("cancel");
|
|
3441
3440
|
}, T = () => {
|
|
3442
|
-
_.value ||
|
|
3441
|
+
_.value || o("submit");
|
|
3443
3442
|
}, u = U([
|
|
3444
3443
|
{
|
|
3445
|
-
title:
|
|
3444
|
+
title: a("baseForm.configuration.yaml"),
|
|
3446
3445
|
hash: "#yaml"
|
|
3447
3446
|
},
|
|
3448
3447
|
{
|
|
3449
|
-
title:
|
|
3448
|
+
title: a("baseForm.configuration.json"),
|
|
3450
3449
|
hash: "#json"
|
|
3451
3450
|
}
|
|
3452
3451
|
]);
|
|
3453
3452
|
return _e(() => d.value, (k) => {
|
|
3454
|
-
|
|
3453
|
+
o("loading", k);
|
|
3455
3454
|
}, { immediate: !0 }), bt(async () => {
|
|
3456
3455
|
if (r.editId)
|
|
3457
3456
|
try {
|
|
3458
3457
|
m.value = !1, d.value = !0;
|
|
3459
3458
|
const { data: k } = await l.get(x.value);
|
|
3460
|
-
|
|
3459
|
+
o("fetch:success", k);
|
|
3461
3460
|
} catch (k) {
|
|
3462
3461
|
const E = s(k);
|
|
3463
|
-
p.value = E.startsWith("code") ?
|
|
3462
|
+
p.value = E.startsWith("code") ? a("baseForm.errors.edit") : E, m.value = !0, o("fetch:error", k);
|
|
3464
3463
|
} finally {
|
|
3465
3464
|
d.value = !1;
|
|
3466
3465
|
}
|
|
3467
3466
|
}), (k, E) => {
|
|
3468
|
-
const q = L("KSkeleton"),
|
|
3467
|
+
const q = L("KSkeleton"), ae = L("KEmptyState"), R = L("KAlert"), I = L("KButton"), H = L("KTabs"), K = L("KSlideout"), B = L("KCard");
|
|
3469
3468
|
return v(), P(B, { class: "kong-ui-entity-base-form" }, {
|
|
3470
3469
|
default: y(() => [
|
|
3471
3470
|
d.value ? (v(), P(q, {
|
|
3472
3471
|
key: 0,
|
|
3473
3472
|
type: "form"
|
|
3474
|
-
})) : m.value ? (v(), P(
|
|
3473
|
+
})) : m.value ? (v(), P(ae, {
|
|
3475
3474
|
key: 1,
|
|
3476
|
-
"cta-text": f(
|
|
3475
|
+
"cta-text": f(a)("baseForm.actions.back"),
|
|
3477
3476
|
"data-testid": "form-fetch-error",
|
|
3478
3477
|
"handle-click": $,
|
|
3479
3478
|
"is-error": !0
|
|
@@ -3504,7 +3503,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3504
3503
|
onClick: E[0] || (E[0] = (z) => b())
|
|
3505
3504
|
}, {
|
|
3506
3505
|
default: y(() => [
|
|
3507
|
-
G(O(f(
|
|
3506
|
+
G(O(f(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3508
3507
|
]),
|
|
3509
3508
|
_: 1
|
|
3510
3509
|
})
|
|
@@ -3516,7 +3515,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3516
3515
|
type: "reset"
|
|
3517
3516
|
}, {
|
|
3518
3517
|
default: y(() => [
|
|
3519
|
-
G(O(f(
|
|
3518
|
+
G(O(f(a)("baseForm.actions.cancel")), 1)
|
|
3520
3519
|
]),
|
|
3521
3520
|
_: 1
|
|
3522
3521
|
}, 8, ["disabled"]),
|
|
@@ -3527,7 +3526,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3527
3526
|
type: "submit"
|
|
3528
3527
|
}, {
|
|
3529
3528
|
default: y(() => [
|
|
3530
|
-
G(O(f(
|
|
3529
|
+
G(O(f(a)("baseForm.actions.save")), 1)
|
|
3531
3530
|
]),
|
|
3532
3531
|
_: 1
|
|
3533
3532
|
}, 8, ["disabled"])
|
|
@@ -3540,11 +3539,11 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3540
3539
|
"has-overlay": !1,
|
|
3541
3540
|
"is-visible": h.value,
|
|
3542
3541
|
"prevent-close-on-blur": "",
|
|
3543
|
-
title: f(
|
|
3542
|
+
title: f(a)("baseForm.configuration.title"),
|
|
3544
3543
|
onClose: E[1] || (E[1] = (z) => b())
|
|
3545
3544
|
}, {
|
|
3546
3545
|
default: y(() => [
|
|
3547
|
-
N("div", null, O(f(
|
|
3546
|
+
N("div", null, O(f(a)("baseForm.configuration.message")), 1),
|
|
3548
3547
|
C(H, {
|
|
3549
3548
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3550
3549
|
tabs: u.value
|
|
@@ -3558,7 +3557,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3558
3557
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3559
3558
|
]),
|
|
3560
3559
|
yaml: y(() => [
|
|
3561
|
-
C(
|
|
3560
|
+
C(or, {
|
|
3562
3561
|
"yaml-record": r.formFields
|
|
3563
3562
|
}, null, 8, ["yaml-record"])
|
|
3564
3563
|
]),
|
|
@@ -3591,7 +3590,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3591
3590
|
const i = e, t = j(() => {
|
|
3592
3591
|
var b;
|
|
3593
3592
|
return ((b = i.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${i.keyName}"]`)) || null;
|
|
3594
|
-
}),
|
|
3593
|
+
}), o = j(() => {
|
|
3595
3594
|
var b;
|
|
3596
3595
|
return ((b = t.value) == null ? void 0 : b.querySelector('[data-testid="first-col"]')) || null;
|
|
3597
3596
|
}), r = j(() => {
|
|
@@ -3600,15 +3599,15 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3600
3599
|
return S ? (($ = S[0]) == null ? void 0 : $.getAttribute("data-testid")) === i.keyName : !1;
|
|
3601
3600
|
});
|
|
3602
3601
|
let n;
|
|
3603
|
-
const
|
|
3602
|
+
const a = () => {
|
|
3604
3603
|
n && (n.disconnect(), n = void 0);
|
|
3605
3604
|
}, s = () => {
|
|
3606
3605
|
var b, $, S;
|
|
3607
|
-
d.value = ((b =
|
|
3608
|
-
}, l = U({}), d = U(0), m = U(0), p = U(""), _ = j(() => [
|
|
3606
|
+
d.value = ((b = o.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, m.value = (($ = t.value) == null ? void 0 : $.clientWidth) || 0, p.value = ((S = l.value) == null ? void 0 : S.innerText) || "";
|
|
3607
|
+
}, l = U({}), d = U(0), m = U(0), p = U(""), _ = j(() => [o.value, t.value]), h = _e(
|
|
3609
3608
|
_,
|
|
3610
3609
|
(b) => {
|
|
3611
|
-
if (r.value && (
|
|
3610
|
+
if (r.value && (a(), "ResizeObserver" in window && window)) {
|
|
3612
3611
|
n = new ResizeObserver(($) => {
|
|
3613
3612
|
window.requestAnimationFrame(() => {
|
|
3614
3613
|
!Array.isArray($) || !$.length || s();
|
|
@@ -3620,7 +3619,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3620
3619
|
},
|
|
3621
3620
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3622
3621
|
), x = j(() => r.value ? d.value > m.value : !1);
|
|
3623
|
-
return
|
|
3622
|
+
return oi(() => {
|
|
3624
3623
|
s();
|
|
3625
3624
|
}), ur(() => {
|
|
3626
3625
|
h();
|
|
@@ -3759,7 +3758,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3759
3758
|
},
|
|
3760
3759
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3761
3760
|
setup(e, { emit: i }) {
|
|
3762
|
-
const t = e,
|
|
3761
|
+
const t = e, o = i, { i18n: { t: r } } = se.useI18n(), n = j(() => {
|
|
3763
3762
|
var E, q;
|
|
3764
3763
|
return typeof t.errorMessage == "string" ? {
|
|
3765
3764
|
hasError: !!t.errorMessage,
|
|
@@ -3770,14 +3769,14 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3770
3769
|
title: (E = t.errorMessage) == null ? void 0 : E.title,
|
|
3771
3770
|
message: (q = t.errorMessage) == null ? void 0 : q.message
|
|
3772
3771
|
};
|
|
3773
|
-
}),
|
|
3772
|
+
}), a = j(() => t.cacheIdentifier || t.preferencesStorageKey), s = (E) => E.hasData || !!t.query, l = j(() => {
|
|
3774
3773
|
const E = [];
|
|
3775
3774
|
return Object.keys(t.tableHeaders).forEach((q) => {
|
|
3776
|
-
const
|
|
3775
|
+
const ae = t.tableHeaders[q];
|
|
3777
3776
|
E.push({
|
|
3778
|
-
label:
|
|
3777
|
+
label: ae.label ?? q,
|
|
3779
3778
|
key: q,
|
|
3780
|
-
sortable:
|
|
3779
|
+
sortable: ae.sortable ?? !1
|
|
3781
3780
|
});
|
|
3782
3781
|
}), t.enableEntityActions && E.push({
|
|
3783
3782
|
key: "actions",
|
|
@@ -3801,13 +3800,13 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3801
3800
|
textOverflow: "ellipsis"
|
|
3802
3801
|
}), q;
|
|
3803
3802
|
}, h = () => {
|
|
3804
|
-
|
|
3803
|
+
o("empty-state-cta-clicked"), x();
|
|
3805
3804
|
}, x = () => {
|
|
3806
|
-
|
|
3805
|
+
o("clear-search-input");
|
|
3807
3806
|
}, b = j(() => t.disableRowClick ? void 0 : (E, q) => {
|
|
3808
|
-
|
|
3807
|
+
o("click:row", q);
|
|
3809
3808
|
}), $ = (E) => {
|
|
3810
|
-
|
|
3809
|
+
o("sort", E);
|
|
3811
3810
|
}, { setTablePreferences: S, getTablePreferences: T } = Ir(), u = j(() => {
|
|
3812
3811
|
const E = T(t.preferencesStorageKey);
|
|
3813
3812
|
return {
|
|
@@ -3818,7 +3817,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3818
3817
|
t.preferencesStorageKey && S(t.preferencesStorageKey, E);
|
|
3819
3818
|
};
|
|
3820
3819
|
return (E, q) => {
|
|
3821
|
-
const
|
|
3820
|
+
const ae = L("KIcon"), R = L("KButton"), I = L("KDropdown"), H = L("KTable"), K = L("KCard");
|
|
3822
3821
|
return v(), P(K, {
|
|
3823
3822
|
class: "kong-ui-entity-base-table",
|
|
3824
3823
|
title: e.title
|
|
@@ -3827,7 +3826,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3827
3826
|
C(H, {
|
|
3828
3827
|
ref_key: "tableRefs",
|
|
3829
3828
|
ref: m,
|
|
3830
|
-
"cache-identifier":
|
|
3829
|
+
"cache-identifier": a.value,
|
|
3831
3830
|
"cell-attrs": _,
|
|
3832
3831
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3833
3832
|
"disable-sorting": e.disableSorting,
|
|
@@ -3889,8 +3888,8 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3889
3888
|
size: "small"
|
|
3890
3889
|
}, {
|
|
3891
3890
|
icon: y(() => [
|
|
3892
|
-
C(
|
|
3893
|
-
color: f(
|
|
3891
|
+
C(ae, {
|
|
3892
|
+
color: f(bo),
|
|
3894
3893
|
icon: "more",
|
|
3895
3894
|
size: "16"
|
|
3896
3895
|
}, null, 8, ["color"])
|
|
@@ -3930,7 +3929,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3930
3929
|
}, 8, ["title"]);
|
|
3931
3930
|
};
|
|
3932
3931
|
}
|
|
3933
|
-
}), Nl = /* @__PURE__ */ he(Vl, [["__scopeId", "data-v-
|
|
3932
|
+
}), Nl = /* @__PURE__ */ he(Vl, [["__scopeId", "data-v-2b9bf3dd"]]), ql = {
|
|
3934
3933
|
key: 0,
|
|
3935
3934
|
class: "kong-ui-entity-delete-error"
|
|
3936
3935
|
}, Ul = {
|
|
@@ -3975,7 +3974,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3975
3974
|
},
|
|
3976
3975
|
emits: ["cancel", "proceed"],
|
|
3977
3976
|
setup(e, { emit: i }) {
|
|
3978
|
-
const { i18nT: t } = se.useI18n(),
|
|
3977
|
+
const { i18nT: t } = se.useI18n(), o = e, r = i, n = j(() => o.needConfirm ? o.entityName : ""), a = () => {
|
|
3979
3978
|
r("cancel");
|
|
3980
3979
|
}, s = () => {
|
|
3981
3980
|
r("proceed");
|
|
@@ -3990,7 +3989,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
3990
3989
|
"is-visible": e.visible,
|
|
3991
3990
|
title: e.title,
|
|
3992
3991
|
type: "danger",
|
|
3993
|
-
onCanceled:
|
|
3992
|
+
onCanceled: a,
|
|
3994
3993
|
onProceed: s
|
|
3995
3994
|
}, {
|
|
3996
3995
|
"body-content": y(() => [
|
|
@@ -4004,25 +4003,25 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4004
4003
|
])) : D("", !0),
|
|
4005
4004
|
C(f(t), {
|
|
4006
4005
|
class: "message",
|
|
4007
|
-
keypath:
|
|
4006
|
+
keypath: o.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
4008
4007
|
tag: "p"
|
|
4009
4008
|
}, je({
|
|
4010
4009
|
entityType: y(() => [
|
|
4011
|
-
G(O(
|
|
4010
|
+
G(O(o.entityType), 1)
|
|
4012
4011
|
]),
|
|
4013
4012
|
_: 2
|
|
4014
4013
|
}, [
|
|
4015
|
-
|
|
4014
|
+
o.entityName ? {
|
|
4016
4015
|
name: "entityName",
|
|
4017
4016
|
fn: y(() => [
|
|
4018
|
-
N("strong", null, O(
|
|
4017
|
+
N("strong", null, O(o.entityName), 1)
|
|
4019
4018
|
]),
|
|
4020
4019
|
key: "0"
|
|
4021
4020
|
} : void 0
|
|
4022
4021
|
]), 1032, ["keypath"]),
|
|
4023
|
-
|
|
4022
|
+
o.description || l.$slots.description ? (v(), M("div", Ul, [
|
|
4024
4023
|
Q(l.$slots, "description", {}, () => [
|
|
4025
|
-
N("p", null, O(
|
|
4024
|
+
N("p", null, O(o.description), 1)
|
|
4026
4025
|
], !0)
|
|
4027
4026
|
])) : D("", !0)
|
|
4028
4027
|
]),
|
|
@@ -4049,7 +4048,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4049
4048
|
props: {
|
|
4050
4049
|
color: {
|
|
4051
4050
|
type: String,
|
|
4052
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
4051
|
+
default: `var(--kong-ui-entity-filter-color, ${vo})`
|
|
4053
4052
|
}
|
|
4054
4053
|
},
|
|
4055
4054
|
setup(e) {
|
|
@@ -4092,21 +4091,21 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4092
4091
|
},
|
|
4093
4092
|
emits: ["update:modelValue"],
|
|
4094
4093
|
setup(e, { emit: i }) {
|
|
4095
|
-
const { i18n: { t } } = se.useI18n(),
|
|
4094
|
+
const { i18n: { t } } = se.useI18n(), o = e, r = i, n = U(!1), a = U({}), s = j(() => {
|
|
4096
4095
|
const S = [];
|
|
4097
|
-
return new URLSearchParams(
|
|
4096
|
+
return new URLSearchParams(o.modelValue).forEach((T, u) => {
|
|
4098
4097
|
T !== "" && S.push(u);
|
|
4099
4098
|
}), S;
|
|
4100
4099
|
}), l = j(() => {
|
|
4101
|
-
const S =
|
|
4100
|
+
const S = o.config.fields;
|
|
4102
4101
|
return Object.keys(S).filter((T) => S[T].searchable).map((T) => ({
|
|
4103
4102
|
label: S[T].label || T,
|
|
4104
4103
|
value: T
|
|
4105
4104
|
}));
|
|
4106
4105
|
});
|
|
4107
|
-
_e(() =>
|
|
4108
|
-
|
|
4109
|
-
|
|
4106
|
+
_e(() => o.modelValue, (S) => {
|
|
4107
|
+
a.value = {}, new URLSearchParams(S).forEach((T, u) => {
|
|
4108
|
+
a.value[u] = T;
|
|
4110
4109
|
});
|
|
4111
4110
|
});
|
|
4112
4111
|
const d = () => {
|
|
@@ -4115,26 +4114,26 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4115
4114
|
r("update:modelValue", S);
|
|
4116
4115
|
}, p = (S) => `filter-${S}`, _ = (S) => {
|
|
4117
4116
|
var T, u;
|
|
4118
|
-
return (((u = (T =
|
|
4117
|
+
return (((u = (T = o.config.schema) == null ? void 0 : T[S]) == null ? void 0 : u.values) ?? []).map((k) => ({
|
|
4119
4118
|
value: k,
|
|
4120
4119
|
label: k
|
|
4121
4120
|
}));
|
|
4122
4121
|
}, h = (S) => {
|
|
4123
4122
|
var T, u;
|
|
4124
|
-
return ((u = (T =
|
|
4123
|
+
return ((u = (T = o.config.schema) == null ? void 0 : T[S]) == null ? void 0 : u.type) ?? "text";
|
|
4125
4124
|
}, x = (S) => {
|
|
4126
|
-
|
|
4127
|
-
...
|
|
4125
|
+
a.value = {
|
|
4126
|
+
...a.value,
|
|
4128
4127
|
[S]: ""
|
|
4129
4128
|
}, $();
|
|
4130
4129
|
}, b = () => {
|
|
4131
|
-
|
|
4130
|
+
a.value = {}, $(!0);
|
|
4132
4131
|
}, $ = (S = !1) => {
|
|
4133
|
-
const T = Object.keys(
|
|
4132
|
+
const T = Object.keys(a.value).reduce((u, k) => (a.value[k] && (u[k] = `${a.value[k]}`), u), {});
|
|
4134
4133
|
S && (n.value = !1), r("update:modelValue", new URLSearchParams(T).toString());
|
|
4135
4134
|
};
|
|
4136
4135
|
return (S, T) => {
|
|
4137
|
-
const u = L("KInput"), k = L("KButton"), E = L("KSelect"), q = L("KMenuItem"),
|
|
4136
|
+
const u = L("KInput"), k = L("KButton"), E = L("KSelect"), q = L("KMenuItem"), ae = L("KMenu");
|
|
4138
4137
|
return e.config.isExactMatch ? (v(), P(u, {
|
|
4139
4138
|
key: 0,
|
|
4140
4139
|
autocomplete: "off",
|
|
@@ -4166,7 +4165,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4166
4165
|
}, null, 512), [
|
|
4167
4166
|
[De, n.value]
|
|
4168
4167
|
]),
|
|
4169
|
-
Re(C(
|
|
4168
|
+
Re(C(ae, { class: "kong-ui-entity-filter-menu" }, {
|
|
4170
4169
|
body: y(() => [
|
|
4171
4170
|
(v(!0), M(ve, null, ye(l.value, (R, I) => (v(), P(q, {
|
|
4172
4171
|
key: R.value,
|
|
@@ -4193,16 +4192,15 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4193
4192
|
((K = (H = e.config.schema) == null ? void 0 : H[R.value]) == null ? void 0 : K.type) === "select" ? (v(), P(E, {
|
|
4194
4193
|
key: 0,
|
|
4195
4194
|
id: p(R.value),
|
|
4196
|
-
modelValue:
|
|
4197
|
-
"onUpdate:modelValue": (B) =>
|
|
4198
|
-
appearance: "select",
|
|
4195
|
+
modelValue: a.value[R.value],
|
|
4196
|
+
"onUpdate:modelValue": (B) => a.value[R.value] = B,
|
|
4199
4197
|
items: _(R.value),
|
|
4200
4198
|
placeholder: f(t)("filter.selectPlaceholder")
|
|
4201
4199
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (v(), P(u, {
|
|
4202
4200
|
key: 1,
|
|
4203
4201
|
id: p(R.value),
|
|
4204
|
-
modelValue:
|
|
4205
|
-
"onUpdate:modelValue": (B) =>
|
|
4202
|
+
modelValue: a.value[R.value],
|
|
4203
|
+
"onUpdate:modelValue": (B) => a.value[R.value] = B,
|
|
4206
4204
|
autocomplete: "off",
|
|
4207
4205
|
placeholder: f(t)("filter.inputPlaceholder"),
|
|
4208
4206
|
type: h(R.value)
|
|
@@ -4258,7 +4256,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4258
4256
|
]));
|
|
4259
4257
|
};
|
|
4260
4258
|
}
|
|
4261
|
-
}), es = /* @__PURE__ */ he(Xl, [["__scopeId", "data-v-
|
|
4259
|
+
}), es = /* @__PURE__ */ he(Xl, [["__scopeId", "data-v-e9512e8f"]]), ts = /* @__PURE__ */ re({
|
|
4262
4260
|
__name: "EntityToggleModal",
|
|
4263
4261
|
props: {
|
|
4264
4262
|
visible: {
|
|
@@ -4290,19 +4288,19 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4290
4288
|
},
|
|
4291
4289
|
emits: ["canceled", "proceed"],
|
|
4292
4290
|
setup(e, { emit: i }) {
|
|
4293
|
-
const { i18n: { t }, i18nT:
|
|
4291
|
+
const { i18n: { t }, i18nT: o } = se.useI18n(), r = e, n = i, a = U(!1), s = j(
|
|
4294
4292
|
() => r.action === "enable" ? t("toggleModal.enable.title", { entityType: r.entityType }) : t("toggleModal.disable.title", { entityType: r.entityType })
|
|
4295
4293
|
), l = j(
|
|
4296
4294
|
() => r.action === "enable" ? t("toggleModal.enable.confirmText") : t("toggleModal.disable.confirmText")
|
|
4297
4295
|
), d = () => n("canceled"), m = async () => {
|
|
4298
4296
|
if (r.onConfirm) {
|
|
4299
|
-
|
|
4297
|
+
a.value = !0;
|
|
4300
4298
|
try {
|
|
4301
4299
|
await r.onConfirm(), n("proceed");
|
|
4302
4300
|
} catch (p) {
|
|
4303
4301
|
console.error(p);
|
|
4304
4302
|
} finally {
|
|
4305
|
-
|
|
4303
|
+
a.value = !1;
|
|
4306
4304
|
}
|
|
4307
4305
|
}
|
|
4308
4306
|
};
|
|
@@ -4311,7 +4309,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4311
4309
|
return v(), P(lr, { to: "body" }, [
|
|
4312
4310
|
C(h, {
|
|
4313
4311
|
"action-button-text": l.value,
|
|
4314
|
-
"action-pending":
|
|
4312
|
+
"action-pending": a.value,
|
|
4315
4313
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
4316
4314
|
"is-visible": e.visible,
|
|
4317
4315
|
title: s.value,
|
|
@@ -4320,7 +4318,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4320
4318
|
onProceed: m
|
|
4321
4319
|
}, {
|
|
4322
4320
|
"body-content": y(() => [
|
|
4323
|
-
C(f(
|
|
4321
|
+
C(f(o), {
|
|
4324
4322
|
keypath: `toggleModal.${r.action}.message`,
|
|
4325
4323
|
scope: "global"
|
|
4326
4324
|
}, {
|
|
@@ -4360,10 +4358,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4360
4358
|
}
|
|
4361
4359
|
},
|
|
4362
4360
|
setup(e) {
|
|
4363
|
-
const i = e, t = U(void 0),
|
|
4361
|
+
const i = e, t = U(void 0), o = j(() => t.value === !0 || t.value !== void 0 && i.forceShow === !0);
|
|
4364
4362
|
return _e(() => i.authFunction, async () => {
|
|
4365
4363
|
t.value = await i.authFunction();
|
|
4366
|
-
}, { immediate: !0 }), (r, n) =>
|
|
4364
|
+
}, { immediate: !0 }), (r, n) => o.value ? Q(r.$slots, "default", {
|
|
4367
4365
|
key: 0,
|
|
4368
4366
|
isAllowed: t.value
|
|
4369
4367
|
}) : D("", !0);
|
|
@@ -4371,10 +4369,10 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4371
4369
|
}), is = { class: "form-section-wrapper" }, rs = {
|
|
4372
4370
|
key: 0,
|
|
4373
4371
|
class: "form-section-title"
|
|
4374
|
-
},
|
|
4372
|
+
}, os = {
|
|
4375
4373
|
key: 1,
|
|
4376
4374
|
class: "form-section-description"
|
|
4377
|
-
},
|
|
4375
|
+
}, as = {
|
|
4378
4376
|
key: 2,
|
|
4379
4377
|
class: "form-section-footer"
|
|
4380
4378
|
}, ns = { class: "form-section-content" }, ls = /* @__PURE__ */ re({
|
|
@@ -4402,8 +4400,8 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4402
4400
|
}
|
|
4403
4401
|
},
|
|
4404
4402
|
setup(e) {
|
|
4405
|
-
const i =
|
|
4406
|
-
return (t,
|
|
4403
|
+
const i = ot();
|
|
4404
|
+
return (t, o) => (v(), M("fieldset", {
|
|
4407
4405
|
class: Se(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4408
4406
|
}, [
|
|
4409
4407
|
N("div", is, [
|
|
@@ -4412,12 +4410,12 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4412
4410
|
class: Se(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4413
4411
|
}, [
|
|
4414
4412
|
e.title ? (v(), M("h4", rs, O(e.title), 1)) : D("", !0),
|
|
4415
|
-
e.description || f(i).description ? (v(), M("div",
|
|
4413
|
+
e.description || f(i).description ? (v(), M("div", os, [
|
|
4416
4414
|
Q(t.$slots, "description", {}, () => [
|
|
4417
4415
|
N("p", null, O(e.description), 1)
|
|
4418
4416
|
], !0)
|
|
4419
4417
|
])) : D("", !0),
|
|
4420
|
-
f(i).footer ? (v(), M("div",
|
|
4418
|
+
f(i).footer ? (v(), M("div", as, [
|
|
4421
4419
|
Q(t.$slots, "footer", {}, void 0, !0)
|
|
4422
4420
|
])) : D("", !0)
|
|
4423
4421
|
], 2)),
|
|
@@ -4427,7 +4425,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4427
4425
|
])
|
|
4428
4426
|
], 2));
|
|
4429
4427
|
}
|
|
4430
|
-
}), ii = /* @__PURE__ */ he(ls, [["__scopeId", "data-v-3565daa7"]]), { useAxios:
|
|
4428
|
+
}), ii = /* @__PURE__ */ he(ls, [["__scopeId", "data-v-3565daa7"]]), { useAxios: ar, useDeleteUrlBuilder: ss, useErrors: cs, useExternalLinkCreator: Ks, useFetchUrlBuilder: Bs, useFetcher: us, useDebouncedFilter: Ps, useStringHelpers: Rs, useHelpers: ds, useGatewayFeatureSupported: ps, useTruncationDetector: Ds } = se, fs = { class: "kong-ui-entities-gateway-services-list" }, ms = { key: 1 }, gs = /* @__PURE__ */ re({
|
|
4431
4429
|
__name: "GatewayServiceList",
|
|
4432
4430
|
props: {
|
|
4433
4431
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4474,9 +4472,9 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4474
4472
|
emits: ["error", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
4475
4473
|
setup(e, { emit: i }) {
|
|
4476
4474
|
var Le;
|
|
4477
|
-
const t = i,
|
|
4478
|
-
headers: (Le =
|
|
4479
|
-
}), s = U(1), l = j(() =>
|
|
4475
|
+
const t = i, o = e, { i18n: { t: r } } = Qe.useI18n(), n = wt(), { axiosInstance: a } = ar({
|
|
4476
|
+
headers: (Le = o.config) == null ? void 0 : Le.requestHeaders
|
|
4477
|
+
}), s = U(1), l = j(() => o.config.app !== "kongManager" || !!o.config.disableSorting), d = {
|
|
4480
4478
|
name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4481
4479
|
protocol: { label: r("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
4482
4480
|
host: { label: r("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
@@ -4486,31 +4484,31 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4486
4484
|
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 }
|
|
4487
4485
|
}, m = d, p = j(() => {
|
|
4488
4486
|
var g, V;
|
|
4489
|
-
let c = `${
|
|
4490
|
-
return
|
|
4491
|
-
}), _ = j(() =>
|
|
4492
|
-
const c =
|
|
4487
|
+
let c = `${o.config.apiBaseUrl}${He.list[o.config.app].all}`;
|
|
4488
|
+
return o.config.app === "konnect" ? c = c.replace(/{controlPlaneId}/gi, ((g = o.config) == null ? void 0 : g.controlPlaneId) || "") : o.config.app === "kongManager" && (c = c.replace(/\/{workspace}/gi, (V = o.config) != null && V.workspace ? `/${o.config.workspace}` : "")), c;
|
|
4489
|
+
}), _ = j(() => o.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${p.value}`) : new URL(p.value)), h = U(""), x = j(() => {
|
|
4490
|
+
const c = o.config.app === "konnect" || o.config.isExactMatch;
|
|
4493
4491
|
if (c)
|
|
4494
4492
|
return {
|
|
4495
4493
|
isExactMatch: c,
|
|
4496
|
-
placeholder: r(`search.placeholder.${
|
|
4494
|
+
placeholder: r(`search.placeholder.${o.config.app}`)
|
|
4497
4495
|
};
|
|
4498
4496
|
const { name: g, enabled: V, protocol: W, host: ie, port: ce, path: w } = d;
|
|
4499
4497
|
return {
|
|
4500
4498
|
isExactMatch: c,
|
|
4501
4499
|
fields: { name: g, enabled: V, protocol: W, host: ie, port: ce, path: w },
|
|
4502
|
-
schema:
|
|
4500
|
+
schema: o.config.filterSchema
|
|
4503
4501
|
};
|
|
4504
|
-
}), { fetcher: b, fetcherState: $ } = us(
|
|
4502
|
+
}), { fetcher: b, fetcherState: $ } = us(o.config, p.value), S = () => {
|
|
4505
4503
|
h.value = "";
|
|
4506
4504
|
}, T = () => {
|
|
4507
4505
|
s.value++;
|
|
4508
4506
|
}, u = U(null), k = j(() => ({
|
|
4509
|
-
ctaPath:
|
|
4507
|
+
ctaPath: o.config.createRoute,
|
|
4510
4508
|
ctaText: xe.value ? r("actions.create") : void 0,
|
|
4511
4509
|
message: r("gateway_services.list.empty_state.description"),
|
|
4512
4510
|
title: xe.value ? r("gateway_services.list.empty_state.title") : r("gateway_services.title")
|
|
4513
|
-
})), E = U(!1), q = U(null),
|
|
4511
|
+
})), E = U(!1), q = U(null), ae = j(() => {
|
|
4514
4512
|
const c = {
|
|
4515
4513
|
action: "disable",
|
|
4516
4514
|
id: "",
|
|
@@ -4527,11 +4525,11 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4527
4525
|
E.value = !1, q.value = null;
|
|
4528
4526
|
}, H = async () => {
|
|
4529
4527
|
var W, ie;
|
|
4530
|
-
if (!await ((W =
|
|
4528
|
+
if (!await ((W = o.canEdit) == null ? void 0 : W.call(o, q.value)) || !q.value)
|
|
4531
4529
|
return;
|
|
4532
4530
|
const g = `${_.value.href}/${q.value.id}`, V = !q.value.enabled;
|
|
4533
4531
|
try {
|
|
4534
|
-
const { data: ce } = ((ie =
|
|
4532
|
+
const { data: ce } = ((ie = o.config) == null ? void 0 : ie.app) === "konnect" ? await a.put(g, { ...q.value, enabled: V }) : await a.patch(g, { ...q.value, enabled: V });
|
|
4535
4533
|
t("toggle:success", ce);
|
|
4536
4534
|
} catch (ce) {
|
|
4537
4535
|
t("error", ce);
|
|
@@ -4567,23 +4565,23 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4567
4565
|
});
|
|
4568
4566
|
}, z = async (c) => {
|
|
4569
4567
|
var V;
|
|
4570
|
-
await ((V =
|
|
4568
|
+
await ((V = o.canRetrieve) == null ? void 0 : V.call(o, c)) && n.push(o.config.getViewRoute(c.id));
|
|
4571
4569
|
}, J = (c) => ({
|
|
4572
4570
|
label: r("actions.view"),
|
|
4573
|
-
to:
|
|
4571
|
+
to: o.config.getViewRoute(c)
|
|
4574
4572
|
}), X = (c) => ({
|
|
4575
4573
|
label: r("actions.edit"),
|
|
4576
|
-
to:
|
|
4577
|
-
}), Y = U(void 0),
|
|
4578
|
-
Y.value = c,
|
|
4574
|
+
to: o.config.getEditRoute(c)
|
|
4575
|
+
}), Y = U(void 0), oe = U(!1), Z = U(!1), ee = U(""), ue = ss(o.config, p.value), nt = (c) => {
|
|
4576
|
+
Y.value = c, oe.value = !0;
|
|
4579
4577
|
}, Oe = () => {
|
|
4580
|
-
|
|
4578
|
+
oe.value = !1, Y.value = void 0;
|
|
4581
4579
|
}, lt = async () => {
|
|
4582
4580
|
var c, g, V;
|
|
4583
4581
|
if ((c = Y.value) != null && c.id) {
|
|
4584
4582
|
Z.value = !0;
|
|
4585
4583
|
try {
|
|
4586
|
-
await
|
|
4584
|
+
await a.delete(ue(Y.value.id)), t("delete:success", Y.value), Oe(), s.value++;
|
|
4587
4585
|
} catch (W) {
|
|
4588
4586
|
ee.value = ((V = (g = W.response) == null ? void 0 : g.data) == null ? void 0 : V.message) || W.message || r("errors.delete"), t("error", W);
|
|
4589
4587
|
} finally {
|
|
@@ -4603,7 +4601,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4603
4601
|
});
|
|
4604
4602
|
const xe = U(!1);
|
|
4605
4603
|
return bt(async () => {
|
|
4606
|
-
xe.value = await
|
|
4604
|
+
xe.value = await o.canCreate();
|
|
4607
4605
|
}), (c, g) => {
|
|
4608
4606
|
const V = L("KButton"), W = L("KInputSwitch"), ie = L("KBadge"), ce = L("KTruncate"), w = L("KDropdownItem"), Ke = L("KClipboardProvider");
|
|
4609
4607
|
return v(), M("div", fs, [
|
|
@@ -4778,9 +4776,9 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4778
4776
|
_: 1
|
|
4779
4777
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
4780
4778
|
C(f(ts), {
|
|
4781
|
-
action:
|
|
4782
|
-
"entity-id":
|
|
4783
|
-
"entity-name":
|
|
4779
|
+
action: ae.value.action,
|
|
4780
|
+
"entity-id": ae.value.id,
|
|
4781
|
+
"entity-name": ae.value.name,
|
|
4784
4782
|
"entity-type": f(r)("glossary.gateway_services"),
|
|
4785
4783
|
"on-confirm": H,
|
|
4786
4784
|
visible: E.value,
|
|
@@ -4794,7 +4792,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4794
4792
|
"entity-type": f(ci).GatewayService,
|
|
4795
4793
|
error: ee.value,
|
|
4796
4794
|
title: f(r)("actions.delete.title"),
|
|
4797
|
-
visible:
|
|
4795
|
+
visible: oe.value,
|
|
4798
4796
|
onCancel: Oe,
|
|
4799
4797
|
onProceed: lt
|
|
4800
4798
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
@@ -4803,8 +4801,8 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4803
4801
|
}
|
|
4804
4802
|
}), nr = (e, i) => {
|
|
4805
4803
|
const t = e.__vccOpts || e;
|
|
4806
|
-
for (const [
|
|
4807
|
-
t[
|
|
4804
|
+
for (const [o, r] of i)
|
|
4805
|
+
t[o] = r;
|
|
4808
4806
|
return t;
|
|
4809
4807
|
}, Hs = /* @__PURE__ */ nr(gs, [["__scopeId", "data-v-0ac10e4c"]]), ys = { class: "kong-ui-entities-gateway-service-form" }, vs = { key: 0 }, hs = { class: "gateway-service-form-traffic-label" }, bs = { class: "gateway-service-form-margin-bottom" }, ws = {
|
|
4810
4808
|
key: 0,
|
|
@@ -4852,7 +4850,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4852
4850
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
4853
4851
|
setup(e, { expose: i, emit: t }) {
|
|
4854
4852
|
var Le;
|
|
4855
|
-
const
|
|
4853
|
+
const o = t, r = e, n = U(!0), a = wt(), { i18nT: s, i18n: { t: l } } = Qe.useI18n(), { getMessageFromError: d } = cs(), { axiosInstance: m } = ar({
|
|
4856
4854
|
headers: (Le = r.config) == null ? void 0 : Le.requestHeaders
|
|
4857
4855
|
}), p = j(() => He.form[r.config.app].edit), _ = j(() => r.gatewayServiceId ? ft.Edit : ft.Create), h = U(!1), x = j(() => !!r.gatewayServiceId), b = U(x.value ? "protocol" : "url"), $ = Qe.usePortFromProtocol(), S = U(""), T = j(() => !!S.value), u = Ze({
|
|
4858
4856
|
fields: {
|
|
@@ -4949,7 +4947,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4949
4947
|
value: "udp",
|
|
4950
4948
|
group: "udp"
|
|
4951
4949
|
}
|
|
4952
|
-
],
|
|
4950
|
+
], ae = { url: "url", protocol: "protocol" }, R = (c, g) => {
|
|
4953
4951
|
g.value;
|
|
4954
4952
|
}, I = (c) => c ? parseFloat(c) : 0, H = () => {
|
|
4955
4953
|
n.value = !0, u.errorMessage = "", u.fields.host = k.host, u.fields.path = k.path, u.fields.port = k.port, u.fields.protocol = k.protocol, u.fields.url = k.url, u.fields.retries = k.retries, u.fields.connect_timeout = k.connect_timeout, u.fields.write_timeout = k.write_timeout, u.fields.read_timeout = k.read_timeout, u.fields.client_certificate = k.client_certificate, u.fields.ca_certificates = k.ca_certificates, u.fields.tls_verify_enabled = k.tls_verify_enabled, u.fields.tls_verify_value = k.tls_verify_value;
|
|
@@ -4959,12 +4957,12 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4959
4957
|
const c = new URL(u.fields.url);
|
|
4960
4958
|
u.errorMessage = "", u.fields.protocol = c.protocol.slice(0, -1), u.fields.host = c.hostname, u.fields.path = c.pathname;
|
|
4961
4959
|
const g = Number(c.port);
|
|
4962
|
-
h.value = !!g, u.fields.port = g || $.getPortFromProtocol(u.fields.protocol), u.errorMessage = "",
|
|
4960
|
+
h.value = !!g, u.fields.port = g || $.getPortFromProtocol(u.fields.protocol), u.errorMessage = "", o("url-valid:success");
|
|
4963
4961
|
} catch (c) {
|
|
4964
|
-
u.errorMessage = l("errors.urlErrorMessage"),
|
|
4962
|
+
u.errorMessage = l("errors.urlErrorMessage"), o("url-valid:error", d(c));
|
|
4965
4963
|
}
|
|
4966
4964
|
else
|
|
4967
|
-
|
|
4965
|
+
o("url-valid:success"), u.errorMessage = "";
|
|
4968
4966
|
}, B = j(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(u.fields.protocol)), z = j(() => {
|
|
4969
4967
|
if (b.value === "url")
|
|
4970
4968
|
return !0;
|
|
@@ -4980,13 +4978,13 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
4980
4978
|
return !0;
|
|
4981
4979
|
const c = ["https", "wss", "tls"].includes(u.fields.protocol);
|
|
4982
4980
|
return b.value === "protocol" && c;
|
|
4983
|
-
}), Y = (c) => new RegExp("^[0-9a-zA-Z.\\-_~]*$").test(c) ? "" : l("errors.validationNameError"),
|
|
4981
|
+
}), Y = (c) => new RegExp("^[0-9a-zA-Z.\\-_~]*$").test(c) ? "" : l("errors.validationNameError"), oe = (c) => {
|
|
4984
4982
|
S.value = Y(c);
|
|
4985
4983
|
}, Z = j(() => x.value && JSON.stringify(u.fields) !== JSON.stringify(k) || b.value === "url" && !!u.fields.url || b.value === "protocol" && !!u.fields.host), ee = (c) => {
|
|
4986
4984
|
var g, V, W;
|
|
4987
4985
|
u.fields.name = (c == null ? void 0 : c.name) || "", u.fields.tags = ((g = c == null ? void 0 : c.tags) == null ? void 0 : g.join(",")) || "", u.fields.protocol = (c == null ? void 0 : c.protocol) || "http", u.fields.path = (c == null ? void 0 : c.path) || "", u.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, u.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, u.fields.host = (c == null ? void 0 : c.host) || "", u.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, u.fields.tls_verify_enabled = (c == null ? void 0 : c.tls_verify) !== "" && (c == null ? void 0 : c.tls_verify) !== null && (c == null ? void 0 : c.tls_verify) !== void 0, u.fields.tls_verify_value = c != null && c.tls_verify ? c == null ? void 0 : c.tls_verify : !1, u.fields.ca_certificates = ((V = c == null ? void 0 : c.ca_certificates) == null ? void 0 : V.join(",")) || "", u.fields.client_certificate = ((W = c == null ? void 0 : c.client_certificate) == null ? void 0 : W.id) || "", u.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, u.fields.port = c != null && c.port || (c == null ? void 0 : c.port) === 0 ? c == null ? void 0 : c.port : 80, Object.assign(k, u.fields);
|
|
4988
4986
|
}, ue = () => {
|
|
4989
|
-
|
|
4987
|
+
a.push(r.config.cancelRoute);
|
|
4990
4988
|
}, nt = j(() => {
|
|
4991
4989
|
var g, V;
|
|
4992
4990
|
let c = `${r.config.apiBaseUrl}${He.form[r.config.app].validate}`;
|
|
@@ -5026,11 +5024,11 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5026
5024
|
let ce;
|
|
5027
5025
|
if (lt(ie), await m.post(nt.value, ie), _.value === "create" ? ce = await m.post(Oe.value, ie) : _.value === "edit" && (ce = ((c = r.config) == null ? void 0 : c.app) === "konnect" ? await m.put(Oe.value, ie) : await m.patch(Oe.value, ie)), ce) {
|
|
5028
5026
|
const { data: w } = ce;
|
|
5029
|
-
u.fields.name = (w == null ? void 0 : w.name) || "", u.fields.port = w.port || $.getPortFromProtocol(w.protocol), u.fields.protocol = (w == null ? void 0 : w.protocol) || "http", u.fields.host = (w == null ? void 0 : w.host) || "", u.fields.path = (w == null ? void 0 : w.path) || "", u.fields.url = (w == null ? void 0 : w.url) || "", u.fields.retries = w != null && w.retries || (w == null ? void 0 : w.retries) === 0 ? w == null ? void 0 : w.retries : 5, u.fields.connect_timeout = w != null && w.connect_timeout || (w == null ? void 0 : w.connect_timeout) === 0 ? w == null ? void 0 : w.connect_timeout : 6e4, u.fields.write_timeout = w != null && w.write_timeout || (w == null ? void 0 : w.write_timeout) === 0 ? w == null ? void 0 : w.write_timeout : 6e4, u.fields.read_timeout = w != null && w.read_timeout || (w == null ? void 0 : w.read_timeout) === 0 ? w == null ? void 0 : w.read_timeout : 6e4, u.fields.client_certificate = ((g = w == null ? void 0 : w.client_certificate) == null ? void 0 : g.id) || "", u.fields.ca_certificates = (V = w == null ? void 0 : w.ca_certificates) != null && V.length ? w == null ? void 0 : w.ca_certificates.join(",") : "", u.fields.tls_verify_enabled = (w == null ? void 0 : w.tls_verify) !== "" && (w == null ? void 0 : w.tls_verify) !== null && (w == null ? void 0 : w.tls_verify) !== void 0, u.fields.tls_verify_value = u.fields.tls_verify_enabled && (w == null ? void 0 : w.tls_verify), u.fields.tags = (W = w == null ? void 0 : w.tags) != null && W.length ? w == null ? void 0 : w.tags.join(",") : "", Object.assign(k, u.fields),
|
|
5027
|
+
u.fields.name = (w == null ? void 0 : w.name) || "", u.fields.port = w.port || $.getPortFromProtocol(w.protocol), u.fields.protocol = (w == null ? void 0 : w.protocol) || "http", u.fields.host = (w == null ? void 0 : w.host) || "", u.fields.path = (w == null ? void 0 : w.path) || "", u.fields.url = (w == null ? void 0 : w.url) || "", u.fields.retries = w != null && w.retries || (w == null ? void 0 : w.retries) === 0 ? w == null ? void 0 : w.retries : 5, u.fields.connect_timeout = w != null && w.connect_timeout || (w == null ? void 0 : w.connect_timeout) === 0 ? w == null ? void 0 : w.connect_timeout : 6e4, u.fields.write_timeout = w != null && w.write_timeout || (w == null ? void 0 : w.write_timeout) === 0 ? w == null ? void 0 : w.write_timeout : 6e4, u.fields.read_timeout = w != null && w.read_timeout || (w == null ? void 0 : w.read_timeout) === 0 ? w == null ? void 0 : w.read_timeout : 6e4, u.fields.client_certificate = ((g = w == null ? void 0 : w.client_certificate) == null ? void 0 : g.id) || "", u.fields.ca_certificates = (V = w == null ? void 0 : w.ca_certificates) != null && V.length ? w == null ? void 0 : w.ca_certificates.join(",") : "", u.fields.tls_verify_enabled = (w == null ? void 0 : w.tls_verify) !== "" && (w == null ? void 0 : w.tls_verify) !== null && (w == null ? void 0 : w.tls_verify) !== void 0, u.fields.tls_verify_value = u.fields.tls_verify_enabled && (w == null ? void 0 : w.tls_verify), u.fields.tags = (W = w == null ? void 0 : w.tags) != null && W.length ? w == null ? void 0 : w.tags.join(",") : "", Object.assign(k, u.fields), o("update", ce == null ? void 0 : ce.data);
|
|
5030
5028
|
}
|
|
5031
5029
|
return ce;
|
|
5032
5030
|
} catch (ie) {
|
|
5033
|
-
u.errorMessage = d(ie),
|
|
5031
|
+
u.errorMessage = d(ie), o("error", ie);
|
|
5034
5032
|
} finally {
|
|
5035
5033
|
u.isReadonly = !1;
|
|
5036
5034
|
}
|
|
@@ -5038,9 +5036,9 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5038
5036
|
return _e(() => r.gatewayServiceId, () => {
|
|
5039
5037
|
Object.assign(u.fields, k);
|
|
5040
5038
|
}), _e(u.fields, (c) => {
|
|
5041
|
-
u.fields.port = $.getPortFromProtocol(c.protocol, String(c.port)),
|
|
5042
|
-
}),
|
|
5043
|
-
|
|
5039
|
+
u.fields.port = $.getPortFromProtocol(c.protocol, String(c.port)), o("model-updated", Ae());
|
|
5040
|
+
}), oi(() => {
|
|
5041
|
+
o("model-updated", Ae());
|
|
5044
5042
|
}), i({
|
|
5045
5043
|
validateUrl: K,
|
|
5046
5044
|
getPayload: Ae,
|
|
@@ -5091,7 +5089,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5091
5089
|
placeholder: f(l)("gateway_services.form.fields.name.placeholder"),
|
|
5092
5090
|
readonly: u.isReadonly,
|
|
5093
5091
|
type: "text",
|
|
5094
|
-
onInput:
|
|
5092
|
+
onInput: oe
|
|
5095
5093
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
5096
5094
|
C(V, {
|
|
5097
5095
|
modelValue: u.fields.tags,
|
|
@@ -5130,7 +5128,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5130
5128
|
modelValue: b.value,
|
|
5131
5129
|
"onUpdate:modelValue": g[2] || (g[2] = (A) => b.value = A),
|
|
5132
5130
|
"data-testid": "gateway-service-url-radio",
|
|
5133
|
-
"selected-value":
|
|
5131
|
+
"selected-value": ae.url,
|
|
5134
5132
|
onChange: H
|
|
5135
5133
|
}, {
|
|
5136
5134
|
default: y(() => [
|
|
@@ -5160,7 +5158,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5160
5158
|
"onUpdate:modelValue": g[4] || (g[4] = (A) => b.value = A),
|
|
5161
5159
|
"checked-group": "protocol",
|
|
5162
5160
|
"data-testid": "gateway-service-protocol-radio",
|
|
5163
|
-
"selected-value":
|
|
5161
|
+
"selected-value": ae.protocol,
|
|
5164
5162
|
onChange: H
|
|
5165
5163
|
}, {
|
|
5166
5164
|
default: y(() => [
|
|
@@ -5173,7 +5171,6 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5173
5171
|
C(ce, {
|
|
5174
5172
|
modelValue: u.fields.protocol,
|
|
5175
5173
|
"onUpdate:modelValue": g[5] || (g[5] = (A) => u.fields.protocol = A),
|
|
5176
|
-
appearance: "select",
|
|
5177
5174
|
"data-testid": "gateway-service-protocol-select",
|
|
5178
5175
|
items: q,
|
|
5179
5176
|
label: f(l)("gateway_services.form.fields.protocol.label"),
|
|
@@ -5410,7 +5407,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5410
5407
|
]);
|
|
5411
5408
|
};
|
|
5412
5409
|
}
|
|
5413
|
-
}), zs = /* @__PURE__ */ nr(Es, [["__scopeId", "data-v-
|
|
5410
|
+
}), zs = /* @__PURE__ */ nr(Es, [["__scopeId", "data-v-21c91e78"]]), Fs = { class: "kong-ui-gateway-service-entity-config-card" }, Gs = /* @__PURE__ */ re({
|
|
5414
5411
|
__name: "GatewayServiceConfigCard",
|
|
5415
5412
|
props: {
|
|
5416
5413
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5437,7 +5434,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5437
5434
|
},
|
|
5438
5435
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5439
5436
|
setup(e) {
|
|
5440
|
-
const i = e, { i18n: { t }, i18nT:
|
|
5437
|
+
const i = e, { i18n: { t }, i18nT: o } = Qe.useI18n(), r = j(() => He.form[i.config.app].edit), { getPropValue: n } = ds(), a = (l, d) => n(l, d) === !0 ? t("gateway_services.form.fields.tls_verify_option.true.display") : t("gateway_services.form.fields.tls_verify_option.false.display"), s = U({
|
|
5441
5438
|
id: {},
|
|
5442
5439
|
name: {
|
|
5443
5440
|
tooltip: t("gateway_services.form.fields.name.tooltip")
|
|
@@ -5510,7 +5507,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5510
5507
|
onLoading: d[3] || (d[3] = (m) => l.$emit("loading", m))
|
|
5511
5508
|
}, {
|
|
5512
5509
|
"enabled-label-tooltip": y(() => [
|
|
5513
|
-
C(f(
|
|
5510
|
+
C(f(o), {
|
|
5514
5511
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
5515
5512
|
scope: "global"
|
|
5516
5513
|
}, {
|
|
@@ -5524,7 +5521,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5524
5521
|
})
|
|
5525
5522
|
]),
|
|
5526
5523
|
"ca_certificates-label-tooltip": y(() => [
|
|
5527
|
-
C(f(
|
|
5524
|
+
C(f(o), {
|
|
5528
5525
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
5529
5526
|
scope: "global"
|
|
5530
5527
|
}, {
|
|
@@ -5538,7 +5535,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5538
5535
|
})
|
|
5539
5536
|
]),
|
|
5540
5537
|
"tls_verify-label-tooltip": y(() => [
|
|
5541
|
-
C(f(
|
|
5538
|
+
C(f(o), {
|
|
5542
5539
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
5543
5540
|
scope: "global"
|
|
5544
5541
|
}, {
|
|
@@ -5549,7 +5546,7 @@ const rl = { class: "yaml-config" }, ar = /* @__PURE__ */ re({
|
|
|
5549
5546
|
})
|
|
5550
5547
|
]),
|
|
5551
5548
|
tls_verify: y((m) => [
|
|
5552
|
-
G(O(typeof f(n)("rowValue", m) == "boolean" ?
|
|
5549
|
+
G(O(typeof f(n)("rowValue", m) == "boolean" ? a("rowValue", m) : f(t)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
5553
5550
|
]),
|
|
5554
5551
|
client_certificate: y((m) => [
|
|
5555
5552
|
G(O(f(n)("rowValue", m) ? f(n)("rowValue", m).id : "–"), 1)
|