@kong-ui-public/entities-shared 3.20.4 → 3.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-shared.es.js +1263 -1250
- package/dist/entities-shared.umd.js +13 -13
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts +23 -1
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { inject as Nt, ref as
|
|
1
|
+
import { inject as Nt, ref as R, computed as $, unref as w, toValue as Ve, watch as Ae, provide as Mt, toRef as Un, defineComponent as W, openBlock as p, createBlock as N, resolveDynamicComponent as Ne, normalizeClass as ce, withCtx as A, createElementBlock as S, createElementVNode as B, toDisplayString as I, createCommentVNode as M, Fragment as le, renderList as oe, resolveComponent as U, createVNode as j, createTextVNode as H, useCssVars as jt, useSlots as Xe, renderSlot as P, createSlots as Ce, normalizeProps as Pn, guardReactiveProps as qn, mergeProps as Hn, onBeforeMount as et, withModifiers as Fe, Teleport as Dt, onMounted as Yn, onUnmounted as Vn, withDirectives as he, vShow as ge, withKeys as Wn } from "vue";
|
|
2
2
|
import ut from "axios";
|
|
3
3
|
import { createI18n as Jn, i18nTComponent as Gn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as zn, KButton as dt, KTruncate as Qn, KBadge as Zn } from "@kong/kongponents";
|
|
5
|
-
import { BookIcon as Ut, AddIcon as Pt, CloseIcon as Xn, ChevronDownIcon as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
var
|
|
5
|
+
import { BookIcon as Ut, AddIcon as Pt, CloseIcon as Xn, ChevronDownIcon as ei, CopyIcon as ti } from "@kong/icons";
|
|
6
|
+
import { useRouter as ni } from "vue-router";
|
|
7
|
+
var ii = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e.Secret = "secret", e.RedisConfiguration = "redis configuration", e))(ii || {}), ri = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ri || {}), de = /* @__PURE__ */ ((e) => (e[e.InitialLoad = 0] = "InitialLoad", e[e.Loading = 1] = "Loading", e[e.Idle = 2] = "Idle", e[e.NoResults = 3] = "NoResults", e[e.NoRecords = 4] = "NoRecords", e[e.Error = 5] = "Error", e))(de || {}), tt = /* @__PURE__ */ ((e) => (e.CaCertificate = "ca_certificate", e.Certificate = "certificate", e.Consumer = "consumer", e.ConsumerGroup = "consumer_group", e.GatewayService = "service", e.Key = "key", e.KeySet = "set", e.Plugin = "plugin", e.Route = "route", e.SNI = "sni", e.Upstream = "upstream", e.Target = "target", e.Vault = "vault", e.RedisConfiguration = "redis_configuration", e.Other = "other", e))(tt || {});
|
|
8
8
|
const Me = Object.values(tt);
|
|
9
|
-
var
|
|
9
|
+
var Y = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(Y || {}), re = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(re || {});
|
|
10
10
|
const ft = [
|
|
11
11
|
"primary",
|
|
12
12
|
"secondary"
|
|
13
13
|
];
|
|
14
|
-
function
|
|
14
|
+
function ai() {
|
|
15
15
|
return {
|
|
16
16
|
getAxiosInstance: (e = {}) => {
|
|
17
17
|
try {
|
|
@@ -35,31 +35,31 @@ function ar() {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function oi() {
|
|
39
39
|
return {
|
|
40
40
|
debounce: (e, t) => {
|
|
41
41
|
let n;
|
|
42
|
-
return (...
|
|
42
|
+
return (...i) => {
|
|
43
43
|
clearTimeout(n), n = window == null ? void 0 : window.setTimeout(() => {
|
|
44
|
-
e(...
|
|
44
|
+
e(...i);
|
|
45
45
|
}, t);
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
const Ue = "khcp-user-table-preferences",
|
|
50
|
+
const Ue = "khcp-user-table-preferences", li = {
|
|
51
51
|
pageSize: 30,
|
|
52
52
|
sortColumnKey: void 0,
|
|
53
53
|
sortColumnOrder: void 0,
|
|
54
54
|
columnVisibility: {}
|
|
55
55
|
};
|
|
56
|
-
function
|
|
56
|
+
function si() {
|
|
57
57
|
const e = (n) => {
|
|
58
58
|
if (typeof n == "string")
|
|
59
59
|
try {
|
|
60
60
|
return JSON.parse(n);
|
|
61
|
-
} catch (
|
|
62
|
-
console.error("useTablePreferences(tryParseJson)",
|
|
61
|
+
} catch (i) {
|
|
62
|
+
console.error("useTablePreferences(tryParseJson)", i);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
}, t = () => {
|
|
@@ -67,17 +67,17 @@ function sr() {
|
|
|
67
67
|
return !n || !Object.keys(n).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(n));
|
|
68
68
|
};
|
|
69
69
|
return {
|
|
70
|
-
setTablePreferences: (n,
|
|
70
|
+
setTablePreferences: (n, i) => {
|
|
71
71
|
try {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
} catch (
|
|
75
|
-
console.error("useTablePreferences(setTablePreferences)",
|
|
72
|
+
const r = t();
|
|
73
|
+
r.set(n, i), localStorage.setItem(Ue, JSON.stringify(Object.fromEntries(r.entries())));
|
|
74
|
+
} catch (r) {
|
|
75
|
+
console.error("useTablePreferences(setTablePreferences)", r);
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
getTablePreferences: (n,
|
|
79
|
-
const
|
|
80
|
-
return (
|
|
78
|
+
getTablePreferences: (n, i) => {
|
|
79
|
+
const r = t();
|
|
80
|
+
return (r == null ? void 0 : r.get(n)) || void 0 || i || li;
|
|
81
81
|
},
|
|
82
82
|
deleteAllTablePreferences: () => {
|
|
83
83
|
localStorage.removeItem(Ue);
|
|
@@ -85,22 +85,22 @@ function sr() {
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
function nt(e = {}) {
|
|
88
|
-
const { getAxiosInstance: t } =
|
|
88
|
+
const { getAxiosInstance: t } = ai();
|
|
89
89
|
return {
|
|
90
90
|
axiosInstance: t(e)
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const ci = {
|
|
94
94
|
actions: {
|
|
95
95
|
copyId: "Copy ID",
|
|
96
96
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
97
97
|
copyToClipboard: "Copied successfully!",
|
|
98
98
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, ui = {
|
|
101
101
|
message: "Are you sure you want to delete this {entityType}?",
|
|
102
102
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
103
|
-
},
|
|
103
|
+
}, di = {
|
|
104
104
|
actions: {
|
|
105
105
|
viewConfiguration: "View Configuration",
|
|
106
106
|
save: "Save",
|
|
@@ -117,13 +117,13 @@ const cr = {
|
|
|
117
117
|
errors: {
|
|
118
118
|
edit: "The entity could not be edited at this time."
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, fi = {
|
|
121
121
|
emptyState: {
|
|
122
122
|
noSearchResultsTitle: "No results found",
|
|
123
123
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
124
124
|
noSearchResultsCtaText: "Clear"
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, pi = {
|
|
127
127
|
title: "Configuration",
|
|
128
128
|
actions: {
|
|
129
129
|
copy: "Copy JSON"
|
|
@@ -159,10 +159,10 @@ const cr = {
|
|
|
159
159
|
entryTitle: "Entry {index}",
|
|
160
160
|
structuredFormat: "Structured"
|
|
161
161
|
}
|
|
162
|
-
},
|
|
162
|
+
}, mi = {
|
|
163
163
|
learnMore: "Learn more",
|
|
164
164
|
pricingTitle: "Pricing: "
|
|
165
|
-
},
|
|
165
|
+
}, hi = {
|
|
166
166
|
filterButtonText: "Filter",
|
|
167
167
|
fieldLabel: "Filter by:",
|
|
168
168
|
inputPlaceholder: "Enter a value",
|
|
@@ -170,17 +170,17 @@ const cr = {
|
|
|
170
170
|
applyButtonText: "Apply",
|
|
171
171
|
clearButtonText: "Clear",
|
|
172
172
|
clearAllButtonText: "Clear all filters"
|
|
173
|
-
},
|
|
173
|
+
}, gi = {
|
|
174
174
|
errors: {
|
|
175
175
|
fetch: "Could not fetch available items",
|
|
176
176
|
invalid: "Please select a valid value"
|
|
177
177
|
}
|
|
178
|
-
},
|
|
178
|
+
}, yi = {
|
|
179
179
|
unexpected: "An unexpected error has occurred",
|
|
180
180
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
181
|
-
},
|
|
181
|
+
}, vi = {
|
|
182
182
|
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
183
|
-
},
|
|
183
|
+
}, bi = {
|
|
184
184
|
enable: {
|
|
185
185
|
title: "Enable {entityType}",
|
|
186
186
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -191,21 +191,21 @@ const cr = {
|
|
|
191
191
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
192
192
|
confirmText: "Yes, disable"
|
|
193
193
|
}
|
|
194
|
-
},
|
|
195
|
-
global:
|
|
196
|
-
deleteModal:
|
|
197
|
-
baseForm:
|
|
198
|
-
baseTable:
|
|
199
|
-
baseConfigCard:
|
|
200
|
-
emptyState:
|
|
201
|
-
filter:
|
|
202
|
-
debouncedFilter:
|
|
203
|
-
errors:
|
|
204
|
-
validationErrors:
|
|
205
|
-
toggleModal:
|
|
194
|
+
}, xi = {
|
|
195
|
+
global: ci,
|
|
196
|
+
deleteModal: ui,
|
|
197
|
+
baseForm: di,
|
|
198
|
+
baseTable: fi,
|
|
199
|
+
baseConfigCard: pi,
|
|
200
|
+
emptyState: mi,
|
|
201
|
+
filter: hi,
|
|
202
|
+
debouncedFilter: gi,
|
|
203
|
+
errors: yi,
|
|
204
|
+
validationErrors: vi,
|
|
205
|
+
toggleModal: bi
|
|
206
206
|
};
|
|
207
207
|
function je() {
|
|
208
|
-
const e = Jn("en-us",
|
|
208
|
+
const e = Jn("en-us", xi);
|
|
209
209
|
return {
|
|
210
210
|
i18n: e,
|
|
211
211
|
i18nT: Gn(e)
|
|
@@ -254,69 +254,69 @@ function qt() {
|
|
|
254
254
|
isValidUuid: (o) => o ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(o) : !1
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Ci(e, t, n, i = {
|
|
258
258
|
fetchedItemsKey: "data",
|
|
259
259
|
searchKeys: ["id"]
|
|
260
260
|
}) {
|
|
261
261
|
n || (n = "1000");
|
|
262
|
-
const { axiosInstance:
|
|
263
|
-
await b(
|
|
264
|
-
}, 200), s =
|
|
265
|
-
const
|
|
266
|
-
return e.app === "konnect" ?
|
|
262
|
+
const { axiosInstance: r } = nt(e.axiosRequestConfig), { i18n: { t: o } } = je(), { debounce: a } = oi(), l = a(async (F) => {
|
|
263
|
+
await b(F);
|
|
264
|
+
}, 200), s = R(!1), c = R(""), d = R(""), u = R([]), g = R([]), f = R(void 0), v = $(() => {
|
|
265
|
+
const F = `${e.apiBaseUrl}${w(t)}`;
|
|
266
|
+
return e.app === "konnect" ? F.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? F.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : F;
|
|
267
267
|
}), { isValidUuid: y } = qt(), C = async () => {
|
|
268
268
|
try {
|
|
269
269
|
s.value = !0;
|
|
270
|
-
const { data:
|
|
271
|
-
|
|
270
|
+
const { data: F } = await r.get(`${v.value}?size=${n}`);
|
|
271
|
+
F != null && F.next || (f.value = i.fetchedItemsKey in F ? F[i.fetchedItemsKey] : []), g.value = i.fetchedItemsKey in F ? F[i.fetchedItemsKey] : [], u.value = g.value;
|
|
272
272
|
} catch {
|
|
273
273
|
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
274
274
|
} finally {
|
|
275
275
|
s.value = !1;
|
|
276
276
|
}
|
|
277
|
-
},
|
|
278
|
-
var
|
|
279
|
-
if (
|
|
280
|
-
if (
|
|
281
|
-
u.value =
|
|
277
|
+
}, T = R(""), b = async (F) => {
|
|
278
|
+
var E, D, m;
|
|
279
|
+
if (T.value !== F) {
|
|
280
|
+
if (T.value = F ?? "", !F) {
|
|
281
|
+
u.value = g.value;
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
284
|
if (f.value === void 0)
|
|
285
285
|
try {
|
|
286
286
|
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
287
|
-
const
|
|
288
|
-
|
|
287
|
+
const k = `${v.value}/${F}`, { data: h } = await r.get(`${k}?size=${n}`);
|
|
288
|
+
i.fetchedItemsKey in h ? u.value = h[i.fetchedItemsKey] : h != null && h[i.exactMatchKey ?? "id"] ? u.value = [h] : u.value = [];
|
|
289
289
|
} else {
|
|
290
|
-
const
|
|
291
|
-
y(
|
|
292
|
-
const { data:
|
|
293
|
-
return [
|
|
294
|
-
})()) :
|
|
295
|
-
...
|
|
296
|
-
const { data:
|
|
297
|
-
return
|
|
290
|
+
const k = [];
|
|
291
|
+
y(F) && i.searchKeys.includes("id") ? k.push((async () => {
|
|
292
|
+
const { data: K } = await r.get(`${v.value}/${F}`);
|
|
293
|
+
return [K[i.fetchedItemsKey] ?? K];
|
|
294
|
+
})()) : k.push(
|
|
295
|
+
...i.searchKeys.filter((K) => K !== "id").map(async (K) => {
|
|
296
|
+
const { data: O } = await r.get(`${v.value}?${K}=${F}`);
|
|
297
|
+
return O[i.fetchedItemsKey];
|
|
298
298
|
})
|
|
299
299
|
);
|
|
300
|
-
const h = await Promise.all(
|
|
301
|
-
u.value = [], (
|
|
302
|
-
var
|
|
303
|
-
(
|
|
304
|
-
x.has(
|
|
300
|
+
const h = await Promise.all(k), x = /* @__PURE__ */ new Set();
|
|
301
|
+
u.value = [], (E = h == null ? void 0 : h.forEach) == null || E.call(h, (K) => {
|
|
302
|
+
var O;
|
|
303
|
+
(O = K == null ? void 0 : K.forEach) == null || O.call(K, (L) => {
|
|
304
|
+
x.has(L.id) || (x.add(L.id), u.value.push(L));
|
|
305
305
|
});
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
} catch (
|
|
309
|
-
((
|
|
308
|
+
} catch (k) {
|
|
309
|
+
((D = k == null ? void 0 : k.response) == null ? void 0 : D.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
310
310
|
} finally {
|
|
311
311
|
s.value = !1;
|
|
312
312
|
}
|
|
313
313
|
else
|
|
314
|
-
s.value = !0, d.value = "", u.value = (
|
|
314
|
+
s.value = !0, d.value = "", u.value = (m = f.value) == null ? void 0 : m.filter((k) => {
|
|
315
315
|
var x;
|
|
316
316
|
let h = !1;
|
|
317
|
-
for (const
|
|
318
|
-
const
|
|
319
|
-
|
|
317
|
+
for (const K of i.searchKeys) {
|
|
318
|
+
const O = typeof k[K] == "string" ? (x = k[K]) == null ? void 0 : x.toLowerCase() : k[K];
|
|
319
|
+
O != null && O.includes(F.toLowerCase()) && (h = !0);
|
|
320
320
|
}
|
|
321
321
|
return h;
|
|
322
322
|
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")), s.value = !1;
|
|
@@ -332,131 +332,131 @@ function Cr(e, t, n, r = {
|
|
|
332
332
|
debouncedQueryChange: l
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
const n =
|
|
335
|
+
function ki(e, t) {
|
|
336
|
+
const n = w(t), i = $(
|
|
337
337
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
338
338
|
);
|
|
339
|
-
return
|
|
339
|
+
return i.value.search = "", (r) => `${i.value.href}/${r}`;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Ai() {
|
|
342
342
|
const { i18n: { t: e } } = je();
|
|
343
343
|
return {
|
|
344
|
-
getErrorFieldsFromError: (
|
|
344
|
+
getErrorFieldsFromError: (i) => {
|
|
345
345
|
var a, l, s;
|
|
346
|
-
if (!
|
|
346
|
+
if (!i)
|
|
347
347
|
return {
|
|
348
348
|
messages: [e("errors.unexpected")],
|
|
349
349
|
fields: []
|
|
350
350
|
};
|
|
351
|
-
if (((a =
|
|
351
|
+
if (((a = i == null ? void 0 : i.response) == null ? void 0 : a.status) === 401)
|
|
352
352
|
return {
|
|
353
353
|
messages: [],
|
|
354
354
|
fields: []
|
|
355
355
|
};
|
|
356
|
-
let
|
|
356
|
+
let r = [e("errors.unexpected")];
|
|
357
357
|
const o = [];
|
|
358
|
-
if ((l =
|
|
359
|
-
if ((s =
|
|
360
|
-
return
|
|
358
|
+
if ((l = i == null ? void 0 : i.response) != null && l.data) {
|
|
359
|
+
if ((s = i.response.data.details) != null && s.length)
|
|
360
|
+
return r = [], i.response.data.details.forEach((c) => {
|
|
361
361
|
let d = e("errors.unexpected");
|
|
362
|
-
c.messages && Array.isArray(c.messages) && c.messages.length && (d = c.messages.join(", ")), c.field && o.push({ field: c.field, message: d }),
|
|
363
|
-
}), { messages:
|
|
364
|
-
if (
|
|
365
|
-
return
|
|
362
|
+
c.messages && Array.isArray(c.messages) && c.messages.length && (d = c.messages.join(", ")), c.field && o.push({ field: c.field, message: d }), r.push(`${c.field ?? ""} ${d}`);
|
|
363
|
+
}), { messages: r, fields: o };
|
|
364
|
+
if (i.response.data.message && Array.isArray(i.response.data.message))
|
|
365
|
+
return r = [], i.response.data.message.forEach((c) => {
|
|
366
366
|
if (c != null && c.constraints) {
|
|
367
367
|
const d = Object.values(c.constraints).join(", ");
|
|
368
|
-
|
|
369
|
-
} else c != null && c.property && (c != null && c.message) ? (o.push({ field: c.property, message: c.message }),
|
|
370
|
-
}), { messages:
|
|
371
|
-
if (typeof
|
|
368
|
+
r.push(d), c.property && o.push({ field: c.property, message: d });
|
|
369
|
+
} else c != null && c.property && (c != null && c.message) ? (o.push({ field: c.property, message: c.message }), r.push(c.message)) : r.push(c);
|
|
370
|
+
}), { messages: r, fields: o };
|
|
371
|
+
if (typeof i.response.data.message == "string" || typeof i.response.data == "string")
|
|
372
372
|
return {
|
|
373
|
-
messages: [
|
|
373
|
+
messages: [i.response.data.message],
|
|
374
374
|
fields: []
|
|
375
375
|
};
|
|
376
|
-
if (typeof
|
|
377
|
-
return
|
|
378
|
-
o.push({ field: c, message:
|
|
379
|
-
}), { messages:
|
|
376
|
+
if (typeof i.response.data == "object")
|
|
377
|
+
return r = [], Object.keys(i.response.data).forEach((c) => {
|
|
378
|
+
o.push({ field: c, message: i.response.data[c] }), r.push(i.response.data[c]);
|
|
379
|
+
}), { messages: r, fields: o };
|
|
380
380
|
}
|
|
381
381
|
return {
|
|
382
|
-
messages: [
|
|
382
|
+
messages: [i.message || e("errors.unexpected")],
|
|
383
383
|
fields: []
|
|
384
384
|
};
|
|
385
385
|
},
|
|
386
|
-
getMessageFromError: (
|
|
387
|
-
var
|
|
388
|
-
if (!
|
|
386
|
+
getMessageFromError: (i) => {
|
|
387
|
+
var r, o, a, l;
|
|
388
|
+
if (!i)
|
|
389
389
|
return e("errors.unexpected");
|
|
390
|
-
if (((
|
|
390
|
+
if (((r = i == null ? void 0 : i.response) == null ? void 0 : r.status) === 401)
|
|
391
391
|
return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."), "";
|
|
392
|
-
if ((o =
|
|
393
|
-
if (
|
|
394
|
-
return
|
|
395
|
-
if ((a =
|
|
396
|
-
return
|
|
392
|
+
if ((o = i == null ? void 0 : i.response) != null && o.data) {
|
|
393
|
+
if (i.response.data.detail)
|
|
394
|
+
return i.response.data.detail;
|
|
395
|
+
if ((a = i.response.data.details) != null && a.length)
|
|
396
|
+
return i.response.data.details.map((s) => {
|
|
397
397
|
let c = e("errors.unexpected");
|
|
398
398
|
return s.messages && typeof s.messages == "object" && s.messages.length && (c = s.messages.join(", ")), s.field ? `${s.field} - ${c}` : c;
|
|
399
399
|
}).join("; ");
|
|
400
|
-
if (
|
|
401
|
-
const { message: s } =
|
|
400
|
+
if (i.response.data.message) {
|
|
401
|
+
const { message: s } = i.response.data;
|
|
402
402
|
return Array.isArray(s) ? (l = s[0]) != null && l.constraints ? Object.values(s[0].constraints)[0] : s[0] : s;
|
|
403
403
|
}
|
|
404
|
-
if (typeof
|
|
405
|
-
return
|
|
406
|
-
if (typeof
|
|
407
|
-
return Object.keys(
|
|
404
|
+
if (typeof i.response.data == "string")
|
|
405
|
+
return i.response.data;
|
|
406
|
+
if (typeof i.response.data == "object")
|
|
407
|
+
return Object.keys(i.response.data).map((s) => `${s} ${i.response.data[s]}`).join(", ");
|
|
408
408
|
}
|
|
409
|
-
return
|
|
409
|
+
return i.message || e("errors.unexpected");
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function wi(e) {
|
|
414
414
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
415
415
|
try {
|
|
416
|
-
const
|
|
417
|
-
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(
|
|
418
|
-
return `${n}${
|
|
416
|
+
const i = e.join("/"), r = `${n}${i}`, o = e.some((l) => l.trim() === "");
|
|
417
|
+
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(r) && !o && new URL(r))
|
|
418
|
+
return `${n}${i}`;
|
|
419
419
|
throw new Error("Invalid url");
|
|
420
|
-
} catch (
|
|
421
|
-
return console.warn("Failed to build valid URL:",
|
|
420
|
+
} catch (i) {
|
|
421
|
+
return console.warn("Failed to build valid URL:", i), "";
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
function Ht(e, t) {
|
|
425
|
-
const n =
|
|
425
|
+
const n = R(w(e)), i = R(w(t)), r = $(
|
|
426
426
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
427
|
-
), o =
|
|
428
|
-
() =>
|
|
427
|
+
), o = $(
|
|
428
|
+
() => i.value.startsWith("/") ? new URL(`${window.location.origin}${i.value}`) : new URL(i.value)
|
|
429
429
|
);
|
|
430
430
|
return (a) => {
|
|
431
|
-
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query:
|
|
431
|
+
const { page: l, pageSize: s, offset: c, sortColumnKey: d, sortColumnOrder: u, query: g } = a;
|
|
432
432
|
try {
|
|
433
433
|
let f = new URL(o.value.href);
|
|
434
|
-
return
|
|
434
|
+
return r.value && g ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${g}`) : new URL(`${f.href}?filter[name][contains]=${g}`)) : (r.value || new URLSearchParams(g).forEach((v, y) => {
|
|
435
435
|
f.searchParams.append(y, v);
|
|
436
436
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(s))), c && l !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
437
437
|
} catch (f) {
|
|
438
|
-
return console.error("RouteList(fetcher)", f),
|
|
438
|
+
return console.error("RouteList(fetcher)", f), i.value;
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
const pt = /* @__PURE__ */ new Map();
|
|
443
|
-
function
|
|
444
|
-
const
|
|
443
|
+
function _i(e, t, n) {
|
|
444
|
+
const i = R(!0), r = w(t), { axiosInstance: o } = nt(e.axiosRequestConfig), a = Ht(e, r), l = R({
|
|
445
445
|
status: de.Idle
|
|
446
446
|
}), s = async (u) => {
|
|
447
447
|
var f;
|
|
448
|
-
const
|
|
448
|
+
const g = Ve(n) || "data";
|
|
449
449
|
try {
|
|
450
|
-
l.value =
|
|
450
|
+
l.value = i.value ? { status: de.InitialLoad } : { status: de.Loading }, i.value = !1;
|
|
451
451
|
let v = a(u);
|
|
452
452
|
v.includes("filter[name]") && (v = `${v}&page[size]=${u.pageSize}&page[number]=${u.page}`);
|
|
453
453
|
const y = await o.get(v);
|
|
454
454
|
if (y.status >= 400)
|
|
455
455
|
throw y;
|
|
456
|
-
const C = y.data,
|
|
456
|
+
const C = y.data, T = g && g.replace(/[^\w-_]/gi, "");
|
|
457
457
|
let b;
|
|
458
|
-
C[
|
|
459
|
-
const
|
|
458
|
+
C[T] ? b = Array.isArray(C[T]) ? C[T] : [C[T]] : Array.isArray(C) ? b = C : b = Object.keys(C).length ? [C] : [];
|
|
459
|
+
const F = {
|
|
460
460
|
data: b,
|
|
461
461
|
total: b.length,
|
|
462
462
|
...C.offset ? {
|
|
@@ -465,13 +465,13 @@ function _r(e, t, n) {
|
|
|
465
465
|
}
|
|
466
466
|
} : null
|
|
467
467
|
};
|
|
468
|
-
return
|
|
468
|
+
return F.data.length === 0 && !u.query ? l.value = {
|
|
469
469
|
status: de.NoRecords,
|
|
470
|
-
response:
|
|
470
|
+
response: F
|
|
471
471
|
} : l.value = {
|
|
472
472
|
status: de.Idle,
|
|
473
|
-
response:
|
|
474
|
-
},
|
|
473
|
+
response: F
|
|
474
|
+
}, F;
|
|
475
475
|
} catch (v) {
|
|
476
476
|
const y = {
|
|
477
477
|
data: [],
|
|
@@ -493,14 +493,14 @@ function _r(e, t, n) {
|
|
|
493
493
|
function Yt(e) {
|
|
494
494
|
if (e) {
|
|
495
495
|
let t = pt.get(e);
|
|
496
|
-
return t || (t =
|
|
496
|
+
return t || (t = R(1), pt.set(e, t)), t;
|
|
497
497
|
}
|
|
498
|
-
return
|
|
498
|
+
return R(1);
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
const e = (
|
|
500
|
+
function Si() {
|
|
501
|
+
const e = (i, r = "_") => i ? i.split(r).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
502
502
|
return {
|
|
503
|
-
capitalize: (
|
|
503
|
+
capitalize: (i) => i ? i.replace(t, (r) => r.toUpperCase()) : "",
|
|
504
504
|
convertKeyToTitle: e
|
|
505
505
|
};
|
|
506
506
|
}
|
|
@@ -514,25 +514,25 @@ const Vt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
514
514
|
}, ht = (e) => e === "*" || e === "x" || e === "X", gt = (e) => {
|
|
515
515
|
const t = parseInt(e, 10);
|
|
516
516
|
return isNaN(t) ? e : t;
|
|
517
|
-
}, $
|
|
517
|
+
}, $i = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Ti = (e, t) => {
|
|
518
518
|
if (ht(e) || ht(t))
|
|
519
519
|
return 0;
|
|
520
|
-
const [n,
|
|
521
|
-
return n >
|
|
520
|
+
const [n, i] = $i(gt(e), gt(t));
|
|
521
|
+
return n > i ? 1 : n < i ? -1 : 0;
|
|
522
522
|
}, yt = (e, t) => {
|
|
523
523
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
524
|
-
const
|
|
525
|
-
if (
|
|
526
|
-
return
|
|
524
|
+
const i = Ti(e[n] || "0", t[n] || "0");
|
|
525
|
+
if (i !== 0)
|
|
526
|
+
return i;
|
|
527
527
|
}
|
|
528
528
|
return 0;
|
|
529
|
-
},
|
|
530
|
-
const n = mt(e),
|
|
531
|
-
return a !== 0 ? a :
|
|
529
|
+
}, Ii = (e, t) => {
|
|
530
|
+
const n = mt(e), i = mt(t), r = n.pop(), o = i.pop(), a = yt(n, i);
|
|
531
|
+
return a !== 0 ? a : r && o ? yt(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
532
532
|
}, vt = (e, t, n) => {
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
return Wt[n].includes(
|
|
533
|
+
Ei(n);
|
|
534
|
+
const i = Ii(e, t);
|
|
535
|
+
return Wt[n].includes(i);
|
|
536
536
|
}, Wt = {
|
|
537
537
|
">": [1],
|
|
538
538
|
">=": [0, 1],
|
|
@@ -540,83 +540,83 @@ const Vt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
540
540
|
"<=": [-1, 0],
|
|
541
541
|
"<": [-1],
|
|
542
542
|
"!=": [-1, 1]
|
|
543
|
-
}, bt = Object.keys(Wt),
|
|
543
|
+
}, bt = Object.keys(Wt), Ei = (e) => {
|
|
544
544
|
if (typeof e != "string")
|
|
545
545
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
546
546
|
if (bt.indexOf(e) === -1)
|
|
547
547
|
throw new Error(`Invalid operator, expected one of ${bt.join("|")}`);
|
|
548
|
-
},
|
|
549
|
-
function
|
|
548
|
+
}, Fi = (e) => typeof e == "string" && /^[v\d]/.test(e) && Vt.test(e);
|
|
549
|
+
function Oi(e) {
|
|
550
550
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
551
551
|
if (!t)
|
|
552
552
|
return !0;
|
|
553
|
-
const { edition:
|
|
554
|
-
if (!
|
|
553
|
+
const { edition: i, version: r } = t;
|
|
554
|
+
if (!Fi(r))
|
|
555
555
|
return console.error("Invalid version"), !1;
|
|
556
|
-
const o = n[
|
|
556
|
+
const o = n[i];
|
|
557
557
|
if (!o)
|
|
558
558
|
return !1;
|
|
559
559
|
const [a, l] = o;
|
|
560
|
-
return !(a && vt(
|
|
560
|
+
return !(a && vt(r, a, "<") || l && vt(r, l, ">"));
|
|
561
561
|
}
|
|
562
|
-
function
|
|
563
|
-
const t =
|
|
562
|
+
function Li(e) {
|
|
563
|
+
const t = R(0), n = R(0), i = R(!1);
|
|
564
564
|
return Ae(e, (o) => {
|
|
565
|
-
o && !
|
|
565
|
+
o && !i.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, i.value = !0);
|
|
566
566
|
}), {
|
|
567
|
-
isTruncated:
|
|
567
|
+
isTruncated: $(() => t.value < n.value)
|
|
568
568
|
};
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function Ri() {
|
|
571
571
|
const { i18n: { t: e } } = je();
|
|
572
572
|
return {
|
|
573
573
|
utf8Name: (n) => /^[\p{N}\p{L}.\-_~]*$/u.test(n) ? "" : e("validationErrors.utf8Name")
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
const We = Symbol("schema"),
|
|
576
|
+
const We = Symbol("schema"), Bi = (e) => {
|
|
577
577
|
Mt(We, e);
|
|
578
|
-
},
|
|
579
|
-
var
|
|
580
|
-
const t = Nt(We, void 0), n = (o = (
|
|
581
|
-
return Mt(We,
|
|
578
|
+
}, Ki = (e) => {
|
|
579
|
+
var r, o;
|
|
580
|
+
const t = Nt(We, void 0), n = (o = (r = t == null ? void 0 : t.value) == null ? void 0 : r.fields) == null ? void 0 : o.find((a) => Object.keys(a)[0] === e), i = Un(n == null ? void 0 : n[e]);
|
|
581
|
+
return Mt(We, i), i;
|
|
582
582
|
};
|
|
583
|
-
function
|
|
583
|
+
function Ni(e) {
|
|
584
584
|
let t = "";
|
|
585
|
-
const n =
|
|
585
|
+
const n = R(!1), i = R(null), r = $(() => {
|
|
586
586
|
let a;
|
|
587
|
-
return n.value ? a = !0 :
|
|
587
|
+
return n.value ? a = !0 : i.value ? a = i.value.hasData || e && Ve(e) : a = !1, !a;
|
|
588
588
|
});
|
|
589
589
|
return {
|
|
590
|
-
tableState:
|
|
590
|
+
tableState: i,
|
|
591
591
|
hasRecords: n,
|
|
592
|
-
hideTableToolbar:
|
|
592
|
+
hideTableToolbar: r,
|
|
593
593
|
handleStateChange: (a) => {
|
|
594
|
-
a.hasData ? n.value = !0 : a.state === "success" && !a.hasData && (!e || !t) && (n.value = !1), e && (t = Ve(e)),
|
|
594
|
+
a.hasData ? n.value = !0 : a.state === "success" && !a.hasData && (!e || !t) && (n.value = !1), e && (t = Ve(e)), i.value = { ...a };
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
const
|
|
598
|
+
const V = {
|
|
599
599
|
useAxios: nt,
|
|
600
|
-
useDebouncedFilter:
|
|
601
|
-
useDeleteUrlBuilder:
|
|
602
|
-
useErrors:
|
|
603
|
-
useExternalLinkCreator:
|
|
604
|
-
useFetcher:
|
|
600
|
+
useDebouncedFilter: Ci,
|
|
601
|
+
useDeleteUrlBuilder: ki,
|
|
602
|
+
useErrors: Ai,
|
|
603
|
+
useExternalLinkCreator: wi,
|
|
604
|
+
useFetcher: _i,
|
|
605
605
|
useFetcherCacheKey: Yt,
|
|
606
606
|
useFetchUrlBuilder: Ht,
|
|
607
607
|
useHelpers: qt,
|
|
608
|
-
useStringHelpers:
|
|
608
|
+
useStringHelpers: Si,
|
|
609
609
|
useI18n: je,
|
|
610
|
-
useGatewayFeatureSupported:
|
|
611
|
-
useTruncationDetector:
|
|
612
|
-
useValidators:
|
|
613
|
-
useSchemaProvider:
|
|
614
|
-
useSubSchema:
|
|
615
|
-
useTableState:
|
|
616
|
-
},
|
|
610
|
+
useGatewayFeatureSupported: Oi,
|
|
611
|
+
useTruncationDetector: Li,
|
|
612
|
+
useValidators: Ri,
|
|
613
|
+
useSchemaProvider: Bi,
|
|
614
|
+
useSubSchema: Ki,
|
|
615
|
+
useTableState: Ni
|
|
616
|
+
}, Mi = {
|
|
617
617
|
key: 0,
|
|
618
618
|
class: "config-card-fieldset-title"
|
|
619
|
-
},
|
|
619
|
+
}, ji = /* @__PURE__ */ W({
|
|
620
620
|
__name: "JsonCardItem",
|
|
621
621
|
props: {
|
|
622
622
|
item: {
|
|
@@ -633,25 +633,25 @@ const Y = {
|
|
|
633
633
|
}
|
|
634
634
|
},
|
|
635
635
|
setup(e) {
|
|
636
|
-
const t = e, { i18n: { t: n } } =
|
|
636
|
+
const t = e, { i18n: { t: n } } = V.useI18n(), { convertKeyToTitle: i } = V.useStringHelpers(), r = $(() => t.item.key ?? "json-array-item"), o = $(() => t.item.value ?? t.item), a = $(() => {
|
|
637
637
|
const s = JSON.parse(JSON.stringify(o.value));
|
|
638
638
|
return t.isArrayItem && delete s.name, s;
|
|
639
|
-
}), l =
|
|
639
|
+
}), l = $(() => {
|
|
640
640
|
var s;
|
|
641
|
-
return t.isArrayItem ? (s = o.value) != null && s.name ?
|
|
641
|
+
return t.isArrayItem ? (s = o.value) != null && s.name ? i(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
642
642
|
});
|
|
643
|
-
return (s, c) => (p(),
|
|
643
|
+
return (s, c) => (p(), N(Ne(e.isArrayItem ? "fieldset" : "div"), {
|
|
644
644
|
class: ce(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
645
645
|
}, {
|
|
646
|
-
default:
|
|
647
|
-
e.isArrayItem ? (p(),
|
|
648
|
-
|
|
649
|
-
])) :
|
|
650
|
-
(p(!0),
|
|
651
|
-
key: `${
|
|
646
|
+
default: A(() => [
|
|
647
|
+
e.isArrayItem ? (p(), S("legend", Mi, [
|
|
648
|
+
B("b", null, I(l.value), 1)
|
|
649
|
+
])) : M("", !0),
|
|
650
|
+
(p(!0), S(le, null, oe(Object.keys(a.value), (d, u) => (p(), N(Gt, {
|
|
651
|
+
key: `${r.value}-property-${u}`,
|
|
652
652
|
item: {
|
|
653
653
|
key: d,
|
|
654
|
-
label:
|
|
654
|
+
label: w(i)(d),
|
|
655
655
|
value: a.value[d]
|
|
656
656
|
}
|
|
657
657
|
}, null, 8, ["item"]))), 128))
|
|
@@ -661,10 +661,10 @@ const Y = {
|
|
|
661
661
|
}
|
|
662
662
|
}), ae = (e, t) => {
|
|
663
663
|
const n = e.__vccOpts || e;
|
|
664
|
-
for (const [
|
|
665
|
-
n[
|
|
664
|
+
for (const [i, r] of t)
|
|
665
|
+
n[i] = r;
|
|
666
666
|
return n;
|
|
667
|
-
}, Jt = /* @__PURE__ */ ae(
|
|
667
|
+
}, Jt = /* @__PURE__ */ ae(ji, [["__scopeId", "data-v-f7096c33"]]), Di = /* @__PURE__ */ W({
|
|
668
668
|
__name: "InternalLinkItem",
|
|
669
669
|
props: {
|
|
670
670
|
item: {
|
|
@@ -674,24 +674,24 @@ const Y = {
|
|
|
674
674
|
},
|
|
675
675
|
emits: ["navigation-click"],
|
|
676
676
|
setup(e) {
|
|
677
|
-
const { i18n: { t } } =
|
|
678
|
-
return (n,
|
|
679
|
-
const
|
|
680
|
-
return p(),
|
|
681
|
-
j(
|
|
677
|
+
const { i18n: { t } } = V.useI18n();
|
|
678
|
+
return (n, i) => {
|
|
679
|
+
const r = U("KButton");
|
|
680
|
+
return p(), S("div", null, [
|
|
681
|
+
j(r, {
|
|
682
682
|
appearance: "tertiary",
|
|
683
683
|
class: "navigation-button",
|
|
684
|
-
onClick:
|
|
684
|
+
onClick: i[0] || (i[0] = (o) => n.$emit("navigation-click", e.item))
|
|
685
685
|
}, {
|
|
686
|
-
default:
|
|
687
|
-
|
|
686
|
+
default: A(() => [
|
|
687
|
+
H(I(e.item.value || w(t)("baseConfigCard.commonFields.link")), 1)
|
|
688
688
|
]),
|
|
689
689
|
_: 1
|
|
690
690
|
})
|
|
691
691
|
]);
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
|
-
}),
|
|
694
|
+
}), Ui = /* @__PURE__ */ ae(Di, [["__scopeId", "data-v-c96811e5"]]), Pi = /* @__PURE__ */ W({
|
|
695
695
|
__name: "StatusBadge",
|
|
696
696
|
props: {
|
|
697
697
|
status: {
|
|
@@ -700,24 +700,24 @@ const Y = {
|
|
|
700
700
|
}
|
|
701
701
|
},
|
|
702
702
|
setup(e) {
|
|
703
|
-
const { i18n: { t } } =
|
|
704
|
-
return (n,
|
|
705
|
-
const
|
|
706
|
-
return p(),
|
|
703
|
+
const { i18n: { t } } = V.useI18n();
|
|
704
|
+
return (n, i) => {
|
|
705
|
+
const r = U("KBadge");
|
|
706
|
+
return p(), N(r, {
|
|
707
707
|
appearance: e.status ? "success" : "neutral"
|
|
708
708
|
}, {
|
|
709
|
-
default:
|
|
710
|
-
|
|
709
|
+
default: A(() => [
|
|
710
|
+
H(I(e.status ? w(t)("baseConfigCard.statusBadge.enabledLabel") : w(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
711
711
|
]),
|
|
712
712
|
_: 1
|
|
713
713
|
}, 8, ["appearance"]);
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
|
-
}),
|
|
716
|
+
}), qi = "#0044f4", Hi = "#e0e4ea", Yi = "#afb7c5", Vi = "#0044f4", Wi = "1px", Ji = "16px", Gi = "20px", zi = { class: "config-card-details-row" }, Qi = ["data-testid"], Zi = ["data-testid"], Xi = ["data-testid"], er = ["data-testid"], tr = { key: 1 }, nr = ["data-testid"], ir = ["data-testid"], rr = ["data-testid"], ar = ["data-testid"], or = {
|
|
717
717
|
name: "ConfigCardItem",
|
|
718
|
-
components: { JsonCardItem: Jt, StatusBadge:
|
|
719
|
-
},
|
|
720
|
-
...
|
|
718
|
+
components: { JsonCardItem: Jt, StatusBadge: Pi, InternalLinkItem: Ui }
|
|
719
|
+
}, lr = /* @__PURE__ */ W({
|
|
720
|
+
...or,
|
|
721
721
|
props: {
|
|
722
722
|
item: {
|
|
723
723
|
type: Object,
|
|
@@ -737,17 +737,17 @@ const Y = {
|
|
|
737
737
|
emits: ["navigation-click"],
|
|
738
738
|
setup(e, { emit: t }) {
|
|
739
739
|
jt((b) => ({
|
|
740
|
-
"3ccdd5d2": d.value ? "none" : `solid ${
|
|
740
|
+
"3ccdd5d2": d.value ? "none" : `solid ${w(Wi)} ${w(Hi)}`,
|
|
741
741
|
"4b1da305": c.value && l.value ? "block" : "flex",
|
|
742
742
|
cd20788a: c.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
743
743
|
cd1becd4: c.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
744
744
|
}));
|
|
745
|
-
const n = e,
|
|
745
|
+
const n = e, i = t, r = Xe(), { i18n: { t: o, formatUnixTimeStamp: a } } = V.useI18n(), l = $(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), s = $(() => !!(n.item.tooltip || r["label-tooltip"])), c = $(() => n.item.type === Y.Json || n.item.type === Y.JsonArray), d = $(() => n.item.type === Y.JsonArray), u = V.useSubSchema(n.item.key), g = $(() => {
|
|
746
746
|
var b;
|
|
747
|
-
return n.item.type ? n.item.type : (b = u == null ? void 0 : u.value) != null && b.encrypted ?
|
|
748
|
-
}), f =
|
|
749
|
-
switch (
|
|
750
|
-
case
|
|
747
|
+
return n.item.type ? n.item.type : (b = u == null ? void 0 : u.value) != null && b.encrypted ? Y.Redacted : void 0;
|
|
748
|
+
}), f = $(() => {
|
|
749
|
+
switch (g.value) {
|
|
750
|
+
case Y.ID:
|
|
751
751
|
return {
|
|
752
752
|
tag: "KCopy",
|
|
753
753
|
attrs: {
|
|
@@ -756,7 +756,7 @@ const Y = {
|
|
|
756
756
|
text: n.item.value
|
|
757
757
|
}
|
|
758
758
|
};
|
|
759
|
-
case
|
|
759
|
+
case Y.IdArray:
|
|
760
760
|
return {
|
|
761
761
|
tag: "div",
|
|
762
762
|
additionalComponent: "KCopy",
|
|
@@ -764,7 +764,7 @@ const Y = {
|
|
|
764
764
|
"copy-tooltip": o("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
765
765
|
}
|
|
766
766
|
};
|
|
767
|
-
case
|
|
767
|
+
case Y.Redacted:
|
|
768
768
|
return {
|
|
769
769
|
tag: "KCopy",
|
|
770
770
|
attrs: {
|
|
@@ -774,7 +774,7 @@ const Y = {
|
|
|
774
774
|
text: n.item.value
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
|
-
case
|
|
777
|
+
case Y.RedactedArray:
|
|
778
778
|
return {
|
|
779
779
|
tag: "div",
|
|
780
780
|
additionalComponent: "KCopy",
|
|
@@ -783,7 +783,7 @@ const Y = {
|
|
|
783
783
|
"copy-tooltip": o("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
784
784
|
}
|
|
785
785
|
};
|
|
786
|
-
case
|
|
786
|
+
case Y.Date:
|
|
787
787
|
return {
|
|
788
788
|
tag: "div",
|
|
789
789
|
attrs: {
|
|
@@ -791,7 +791,7 @@ const Y = {
|
|
|
791
791
|
},
|
|
792
792
|
text: a(n.item.value)
|
|
793
793
|
};
|
|
794
|
-
case
|
|
794
|
+
case Y.BadgeStatus:
|
|
795
795
|
return {
|
|
796
796
|
tag: "StatusBadge",
|
|
797
797
|
attrs: {
|
|
@@ -799,12 +799,12 @@ const Y = {
|
|
|
799
799
|
status: n.item.value
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
|
-
case
|
|
802
|
+
case Y.BadgeTag:
|
|
803
803
|
return {
|
|
804
804
|
tag: "div",
|
|
805
805
|
additionalComponent: "KBadge"
|
|
806
806
|
};
|
|
807
|
-
case
|
|
807
|
+
case Y.CopyBadge:
|
|
808
808
|
return {
|
|
809
809
|
tag: "div",
|
|
810
810
|
additionalComponent: "KCopy",
|
|
@@ -815,23 +815,23 @@ const Y = {
|
|
|
815
815
|
text: n.item.value
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
|
-
case
|
|
818
|
+
case Y.BadgeMethod:
|
|
819
819
|
return {
|
|
820
820
|
tag: "div",
|
|
821
821
|
additionalComponent: "KMethodBadge"
|
|
822
822
|
};
|
|
823
|
-
case
|
|
823
|
+
case Y.LinkInternal:
|
|
824
824
|
return {
|
|
825
825
|
tag: "InternalLinkItem",
|
|
826
826
|
attrs: {
|
|
827
827
|
"data-testid": `${n.item.key}-internal-link`,
|
|
828
828
|
item: n.item,
|
|
829
829
|
onNavigationClick: (b) => {
|
|
830
|
-
|
|
830
|
+
i("navigation-click", b);
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
833
|
};
|
|
834
|
-
case
|
|
834
|
+
case Y.LinkExternal:
|
|
835
835
|
return {
|
|
836
836
|
tag: "KExternalLink",
|
|
837
837
|
attrs: {
|
|
@@ -840,7 +840,7 @@ const Y = {
|
|
|
840
840
|
},
|
|
841
841
|
text: n.item.value
|
|
842
842
|
};
|
|
843
|
-
case
|
|
843
|
+
case Y.Json:
|
|
844
844
|
return {
|
|
845
845
|
tag: "JsonCardItem",
|
|
846
846
|
attrs: {
|
|
@@ -848,7 +848,7 @@ const Y = {
|
|
|
848
848
|
item: n.item
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
|
-
case
|
|
851
|
+
case Y.JsonArray:
|
|
852
852
|
return {
|
|
853
853
|
tag: "div",
|
|
854
854
|
additionalComponent: "JsonCardItem",
|
|
@@ -866,26 +866,26 @@ const Y = {
|
|
|
866
866
|
text: n.item.value
|
|
867
867
|
};
|
|
868
868
|
}
|
|
869
|
-
}), v =
|
|
870
|
-
return (b,
|
|
871
|
-
const
|
|
872
|
-
return p(),
|
|
873
|
-
|
|
869
|
+
}), v = R(), y = R(), { isTruncated: C } = V.useTruncationDetector(v), { isTruncated: T } = V.useTruncationDetector(y);
|
|
870
|
+
return (b, F) => {
|
|
871
|
+
const E = U("KTooltip"), D = U("KLabel"), m = U("KBadge"), k = U("KCopy");
|
|
872
|
+
return p(), S("div", zi, [
|
|
873
|
+
B("div", {
|
|
874
874
|
class: "config-card-details-label",
|
|
875
875
|
"data-testid": `${e.item.key}-label`
|
|
876
876
|
}, [
|
|
877
877
|
P(b.$slots, "label", { item: e.item }, () => [
|
|
878
|
-
j(
|
|
879
|
-
default:
|
|
880
|
-
j(
|
|
881
|
-
text:
|
|
878
|
+
j(D, { "tooltip-attributes": { maxWidth: "500px" } }, Ce({
|
|
879
|
+
default: A(() => [
|
|
880
|
+
j(E, {
|
|
881
|
+
text: w(C) ? e.item.label : ""
|
|
882
882
|
}, {
|
|
883
|
-
default:
|
|
884
|
-
|
|
883
|
+
default: A(() => [
|
|
884
|
+
B("span", {
|
|
885
885
|
ref_key: "labelContent",
|
|
886
886
|
ref: v,
|
|
887
887
|
class: "label-content"
|
|
888
|
-
},
|
|
888
|
+
}, I(e.item.label), 513)
|
|
889
889
|
]),
|
|
890
890
|
_: 1
|
|
891
891
|
}, 8, ["text"])
|
|
@@ -894,113 +894,113 @@ const Y = {
|
|
|
894
894
|
}, [
|
|
895
895
|
s.value ? {
|
|
896
896
|
name: "tooltip",
|
|
897
|
-
fn:
|
|
898
|
-
|
|
897
|
+
fn: A(() => [
|
|
898
|
+
B("div", {
|
|
899
899
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
900
900
|
}, [
|
|
901
901
|
P(b.$slots, "label-tooltip", {}, () => [
|
|
902
|
-
|
|
902
|
+
H(I(e.item.tooltip), 1)
|
|
903
903
|
], !0)
|
|
904
|
-
], 8,
|
|
904
|
+
], 8, Zi)
|
|
905
905
|
]),
|
|
906
906
|
key: "0"
|
|
907
907
|
} : void 0
|
|
908
908
|
]), 1024)
|
|
909
909
|
], !0)
|
|
910
|
-
], 8,
|
|
911
|
-
|
|
910
|
+
], 8, Qi),
|
|
911
|
+
B("div", {
|
|
912
912
|
class: "config-card-details-value",
|
|
913
913
|
"data-testid": `${e.item.key}-property-value`
|
|
914
914
|
}, [
|
|
915
915
|
P(b.$slots, e.item.key, {
|
|
916
916
|
rowValue: e.item.value
|
|
917
917
|
}, () => [
|
|
918
|
-
l.value ? (p(),
|
|
919
|
-
(p(),
|
|
920
|
-
default:
|
|
921
|
-
f.value.additionalComponent === "KBadge" ? (p(),
|
|
918
|
+
l.value ? (p(), S("div", tr, [
|
|
919
|
+
(p(), N(Ne(f.value.tag), Pn(qn(f.value.attrs)), {
|
|
920
|
+
default: A(() => [
|
|
921
|
+
f.value.additionalComponent === "KBadge" ? (p(), S("div", {
|
|
922
922
|
key: 0,
|
|
923
923
|
"data-testid": `${e.item.key}-badge-tags`
|
|
924
924
|
}, [
|
|
925
|
-
(p(!0),
|
|
925
|
+
(p(!0), S(le, null, oe(e.item.value, (h, x) => (p(), N(m, {
|
|
926
926
|
key: `${e.item.key}-badge-tag-${x}`,
|
|
927
927
|
class: "config-badge",
|
|
928
928
|
"data-testid": `${e.item.key}-badge-tag-${x}`,
|
|
929
929
|
tooltip: h,
|
|
930
930
|
"truncation-tooltip": ""
|
|
931
931
|
}, {
|
|
932
|
-
default:
|
|
933
|
-
|
|
932
|
+
default: A(() => [
|
|
933
|
+
H(I(h), 1)
|
|
934
934
|
]),
|
|
935
935
|
_: 2
|
|
936
936
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
937
|
-
], 8,
|
|
938
|
-
f.value.additionalComponent === "KCopy" ? (p(),
|
|
937
|
+
], 8, nr)) : M("", !0),
|
|
938
|
+
f.value.additionalComponent === "KCopy" ? (p(), S("div", {
|
|
939
939
|
key: 1,
|
|
940
940
|
class: "copy-uuid-array",
|
|
941
941
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
942
942
|
}, [
|
|
943
|
-
(p(!0),
|
|
943
|
+
(p(!0), S(le, null, oe(e.item.value, (h, x) => (p(), N(k, Hn({ ref_for: !0 }, f.value.childAttrs, {
|
|
944
944
|
key: `${e.item.key}-copy-uuid-${x}`,
|
|
945
945
|
"data-testid": `${e.item.key}-copy-uuid-${x}`,
|
|
946
946
|
text: h
|
|
947
947
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
948
|
-
], 8,
|
|
948
|
+
], 8, ir)) : f.value.additionalComponent === "KMethodBadge" ? (p(), S("div", {
|
|
949
949
|
key: 2,
|
|
950
950
|
class: "method-badge-array",
|
|
951
951
|
"data-testid": `${e.item.key}-badge-methods`
|
|
952
952
|
}, [
|
|
953
|
-
(p(!0),
|
|
953
|
+
(p(!0), S(le, null, oe(e.item.value, (h, x) => (p(), N(m, {
|
|
954
954
|
key: `${e.item.key}-badge-method-${x}`,
|
|
955
|
-
appearance: Object.values(
|
|
955
|
+
appearance: Object.values(w(zn)).includes(h.toLowerCase()) ? h.toLowerCase() : "custom",
|
|
956
956
|
class: "config-badge",
|
|
957
957
|
"data-testid": `${e.item.key}-badge-method-${x}`
|
|
958
958
|
}, {
|
|
959
|
-
default:
|
|
960
|
-
|
|
959
|
+
default: A(() => [
|
|
960
|
+
H(I(h), 1)
|
|
961
961
|
]),
|
|
962
962
|
_: 2
|
|
963
963
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
964
|
-
], 8,
|
|
965
|
-
f.value.additionalComponent === "JsonCardItem" ? (p(),
|
|
964
|
+
], 8, rr)) : M("", !0),
|
|
965
|
+
f.value.additionalComponent === "JsonCardItem" ? (p(), S("div", {
|
|
966
966
|
key: 3,
|
|
967
967
|
"data-testid": `${n.item.key}-json-array-content`
|
|
968
968
|
}, [
|
|
969
|
-
(p(!0),
|
|
969
|
+
(p(!0), S(le, null, oe(e.item.value, (h, x) => (p(), N(Jt, {
|
|
970
970
|
key: `json-array-item-${x}`,
|
|
971
971
|
index: x,
|
|
972
972
|
"is-array-item": "",
|
|
973
973
|
item: h
|
|
974
974
|
}, null, 8, ["index", "item"]))), 128))
|
|
975
|
-
], 8,
|
|
975
|
+
], 8, ar)) : (p(), N(E, {
|
|
976
976
|
key: 4,
|
|
977
|
-
text:
|
|
977
|
+
text: w(T) ? e.item.value : ""
|
|
978
978
|
}, {
|
|
979
|
-
default:
|
|
980
|
-
|
|
979
|
+
default: A(() => [
|
|
980
|
+
B("span", {
|
|
981
981
|
ref_key: "textContent",
|
|
982
982
|
ref: y,
|
|
983
983
|
class: ce(["attrs-data-text", { truncated: e.truncated }])
|
|
984
|
-
},
|
|
984
|
+
}, I(f.value.text), 3)
|
|
985
985
|
]),
|
|
986
986
|
_: 1
|
|
987
987
|
}, 8, ["text"]))
|
|
988
988
|
]),
|
|
989
989
|
_: 1
|
|
990
990
|
}, 16))
|
|
991
|
-
])) : (p(),
|
|
991
|
+
])) : (p(), S("div", {
|
|
992
992
|
key: 0,
|
|
993
993
|
"data-testid": `${e.item.key}-no-value`
|
|
994
|
-
}, " – ", 8,
|
|
994
|
+
}, " – ", 8, er))
|
|
995
995
|
], !0)
|
|
996
|
-
], 8,
|
|
996
|
+
], 8, Xi)
|
|
997
997
|
]);
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
|
-
}), Gt = /* @__PURE__ */ ae(
|
|
1000
|
+
}), Gt = /* @__PURE__ */ ae(lr, [["__scopeId", "data-v-761f7e64"]]), sr = { class: "json-config config-card-code-block" }, cr = {
|
|
1001
1001
|
key: 0,
|
|
1002
1002
|
class: "json-endpoint"
|
|
1003
|
-
}, zt = /* @__PURE__ */
|
|
1003
|
+
}, zt = /* @__PURE__ */ W({
|
|
1004
1004
|
__name: "JsonCodeBlock",
|
|
1005
1005
|
props: {
|
|
1006
1006
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1028,25 +1028,25 @@ const Y = {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
},
|
|
1030
1030
|
setup(e) {
|
|
1031
|
-
jt((
|
|
1032
|
-
"54aebfa2": `${
|
|
1031
|
+
jt((r) => ({
|
|
1032
|
+
"54aebfa2": `${i.value}ch`
|
|
1033
1033
|
}));
|
|
1034
|
-
const t = e, n =
|
|
1034
|
+
const t = e, n = $(() => t.entityRecord), i = $(() => {
|
|
1035
1035
|
var a;
|
|
1036
1036
|
if (!t.fetcherUrl)
|
|
1037
1037
|
return 0;
|
|
1038
|
-
const
|
|
1039
|
-
return
|
|
1038
|
+
const r = (a = t.fetcherUrl) == null ? void 0 : a.split("/");
|
|
1039
|
+
return r.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? r[r.length - 1] : r[r.length - 2]).length;
|
|
1040
1040
|
});
|
|
1041
|
-
return (
|
|
1041
|
+
return (r, o) => {
|
|
1042
1042
|
const a = U("KBadge"), l = U("KCodeBlock");
|
|
1043
|
-
return p(),
|
|
1044
|
-
t.fetcherUrl ? (p(),
|
|
1043
|
+
return p(), S("div", sr, [
|
|
1044
|
+
t.fetcherUrl ? (p(), S("div", cr, [
|
|
1045
1045
|
j(a, {
|
|
1046
1046
|
appearance: t.requestMethod
|
|
1047
1047
|
}, {
|
|
1048
|
-
default:
|
|
1049
|
-
|
|
1048
|
+
default: A(() => [
|
|
1049
|
+
H(I(t.requestMethod), 1)
|
|
1050
1050
|
]),
|
|
1051
1051
|
_: 1
|
|
1052
1052
|
}, 8, ["appearance"]),
|
|
@@ -1057,15 +1057,15 @@ const Y = {
|
|
|
1057
1057
|
"single-line": "",
|
|
1058
1058
|
theme: "dark"
|
|
1059
1059
|
}, null, 8, ["code"])
|
|
1060
|
-
])) :
|
|
1061
|
-
t.entityRecord ? (p(),
|
|
1060
|
+
])) : M("", !0),
|
|
1061
|
+
t.entityRecord ? (p(), N(l, {
|
|
1062
1062
|
key: 1,
|
|
1063
1063
|
id: "json-codeblock",
|
|
1064
1064
|
class: ce({ "json-content": t.fetcherUrl }),
|
|
1065
1065
|
code: JSON.stringify(n.value, null, 2),
|
|
1066
1066
|
language: "json",
|
|
1067
1067
|
theme: "dark"
|
|
1068
|
-
}, null, 8, ["class", "code"])) :
|
|
1068
|
+
}, null, 8, ["class", "code"])) : M("", !0)
|
|
1069
1069
|
]);
|
|
1070
1070
|
};
|
|
1071
1071
|
}
|
|
@@ -1074,41 +1074,41 @@ const Y = {
|
|
|
1074
1074
|
function Qt(e) {
|
|
1075
1075
|
return typeof e > "u" || e === null;
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1077
|
+
function ur(e) {
|
|
1078
1078
|
return typeof e == "object" && e !== null;
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function dr(e) {
|
|
1081
1081
|
return Array.isArray(e) ? e : Qt(e) ? [] : [e];
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1084
|
-
var n,
|
|
1083
|
+
function fr(e, t) {
|
|
1084
|
+
var n, i, r, o;
|
|
1085
1085
|
if (t)
|
|
1086
|
-
for (o = Object.keys(t), n = 0,
|
|
1087
|
-
|
|
1086
|
+
for (o = Object.keys(t), n = 0, i = o.length; n < i; n += 1)
|
|
1087
|
+
r = o[n], e[r] = t[r];
|
|
1088
1088
|
return e;
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1091
|
-
var n = "",
|
|
1092
|
-
for (
|
|
1090
|
+
function pr(e, t) {
|
|
1091
|
+
var n = "", i;
|
|
1092
|
+
for (i = 0; i < t; i += 1)
|
|
1093
1093
|
n += e;
|
|
1094
1094
|
return n;
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function mr(e) {
|
|
1097
1097
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1098
1098
|
}
|
|
1099
|
-
var
|
|
1100
|
-
isNothing:
|
|
1101
|
-
isObject:
|
|
1102
|
-
toArray:
|
|
1103
|
-
repeat:
|
|
1104
|
-
isNegativeZero:
|
|
1105
|
-
extend:
|
|
1099
|
+
var hr = Qt, gr = ur, yr = dr, vr = pr, br = mr, xr = fr, Q = {
|
|
1100
|
+
isNothing: hr,
|
|
1101
|
+
isObject: gr,
|
|
1102
|
+
toArray: yr,
|
|
1103
|
+
repeat: vr,
|
|
1104
|
+
isNegativeZero: br,
|
|
1105
|
+
extend: xr
|
|
1106
1106
|
};
|
|
1107
1107
|
function Zt(e, t) {
|
|
1108
|
-
var n = "",
|
|
1108
|
+
var n = "", i = e.reason || "(unknown reason)";
|
|
1109
1109
|
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += `
|
|
1110
1110
|
|
|
1111
|
-
` + e.mark.snippet),
|
|
1111
|
+
` + e.mark.snippet), i + " " + n) : i;
|
|
1112
1112
|
}
|
|
1113
1113
|
function _e(e, t) {
|
|
1114
1114
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Zt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
@@ -1119,47 +1119,47 @@ _e.prototype.toString = function(t) {
|
|
|
1119
1119
|
return this.name + ": " + Zt(this, t);
|
|
1120
1120
|
};
|
|
1121
1121
|
var ne = _e;
|
|
1122
|
-
function Pe(e, t, n,
|
|
1123
|
-
var o = "", a = "", l = Math.floor(
|
|
1124
|
-
return
|
|
1122
|
+
function Pe(e, t, n, i, r) {
|
|
1123
|
+
var o = "", a = "", l = Math.floor(r / 2) - 1;
|
|
1124
|
+
return i - t > l && (o = " ... ", t = i - l + o.length), n - i > l && (a = " ...", n = i + l - a.length), {
|
|
1125
1125
|
str: o + e.slice(t, n).replace(/\t/g, "→") + a,
|
|
1126
|
-
pos:
|
|
1126
|
+
pos: i - t + o.length
|
|
1127
1127
|
// relative position
|
|
1128
1128
|
};
|
|
1129
1129
|
}
|
|
1130
1130
|
function qe(e, t) {
|
|
1131
1131
|
return Q.repeat(" ", t - e.length) + e;
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function Cr(e, t) {
|
|
1134
1134
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1135
1135
|
t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1136
|
-
for (var n = /\r?\n|\r|\0/g,
|
|
1137
|
-
|
|
1138
|
-
a < 0 && (a =
|
|
1139
|
-
var l = "", s, c, d = Math.min(e.line + t.linesAfter,
|
|
1136
|
+
for (var n = /\r?\n|\r|\0/g, i = [0], r = [], o, a = -1; o = n.exec(e.buffer); )
|
|
1137
|
+
r.push(o.index), i.push(o.index + o[0].length), e.position <= o.index && a < 0 && (a = i.length - 2);
|
|
1138
|
+
a < 0 && (a = i.length - 1);
|
|
1139
|
+
var l = "", s, c, d = Math.min(e.line + t.linesAfter, r.length).toString().length, u = t.maxLength - (t.indent + d + 3);
|
|
1140
1140
|
for (s = 1; s <= t.linesBefore && !(a - s < 0); s++)
|
|
1141
1141
|
c = Pe(
|
|
1142
1142
|
e.buffer,
|
|
1143
|
-
r[a - s],
|
|
1144
1143
|
i[a - s],
|
|
1145
|
-
|
|
1144
|
+
r[a - s],
|
|
1145
|
+
e.position - (i[a] - i[a - s]),
|
|
1146
1146
|
u
|
|
1147
1147
|
), l = Q.repeat(" ", t.indent) + qe((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1148
1148
|
` + l;
|
|
1149
|
-
for (c = Pe(e.buffer,
|
|
1149
|
+
for (c = Pe(e.buffer, i[a], r[a], e.position, u), l += Q.repeat(" ", t.indent) + qe((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1150
1150
|
`, l += Q.repeat("-", t.indent + d + 3 + c.pos) + `^
|
|
1151
|
-
`, s = 1; s <= t.linesAfter && !(a + s >=
|
|
1151
|
+
`, s = 1; s <= t.linesAfter && !(a + s >= r.length); s++)
|
|
1152
1152
|
c = Pe(
|
|
1153
1153
|
e.buffer,
|
|
1154
|
-
r[a + s],
|
|
1155
1154
|
i[a + s],
|
|
1156
|
-
|
|
1155
|
+
r[a + s],
|
|
1156
|
+
e.position - (i[a] - i[a + s]),
|
|
1157
1157
|
u
|
|
1158
1158
|
), l += Q.repeat(" ", t.indent) + qe((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1159
1159
|
`;
|
|
1160
1160
|
return l.replace(/\n$/, "");
|
|
1161
1161
|
}
|
|
1162
|
-
var
|
|
1162
|
+
var kr = Cr, Ar = [
|
|
1163
1163
|
"kind",
|
|
1164
1164
|
"multi",
|
|
1165
1165
|
"resolve",
|
|
@@ -1170,41 +1170,41 @@ var ki = Ci, Ai = [
|
|
|
1170
1170
|
"representName",
|
|
1171
1171
|
"defaultStyle",
|
|
1172
1172
|
"styleAliases"
|
|
1173
|
-
],
|
|
1173
|
+
], wr = [
|
|
1174
1174
|
"scalar",
|
|
1175
1175
|
"sequence",
|
|
1176
1176
|
"mapping"
|
|
1177
1177
|
];
|
|
1178
|
-
function
|
|
1178
|
+
function _r(e) {
|
|
1179
1179
|
var t = {};
|
|
1180
1180
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1181
|
-
e[n].forEach(function(
|
|
1182
|
-
t[String(
|
|
1181
|
+
e[n].forEach(function(i) {
|
|
1182
|
+
t[String(i)] = n;
|
|
1183
1183
|
});
|
|
1184
1184
|
}), t;
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1186
|
+
function Sr(e, t) {
|
|
1187
1187
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1188
|
-
if (
|
|
1188
|
+
if (Ar.indexOf(n) === -1)
|
|
1189
1189
|
throw new ne('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1190
1190
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1191
1191
|
return !0;
|
|
1192
1192
|
}, this.construct = t.construct || function(n) {
|
|
1193
1193
|
return n;
|
|
1194
|
-
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases =
|
|
1194
|
+
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = _r(t.styleAliases || null), wr.indexOf(this.kind) === -1)
|
|
1195
1195
|
throw new ne('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1196
1196
|
}
|
|
1197
|
-
var X =
|
|
1197
|
+
var X = Sr;
|
|
1198
1198
|
function xt(e, t) {
|
|
1199
1199
|
var n = [];
|
|
1200
|
-
return e[t].forEach(function(
|
|
1201
|
-
var
|
|
1200
|
+
return e[t].forEach(function(i) {
|
|
1201
|
+
var r = n.length;
|
|
1202
1202
|
n.forEach(function(o, a) {
|
|
1203
|
-
o.tag ===
|
|
1204
|
-
}), n[
|
|
1203
|
+
o.tag === i.tag && o.kind === i.kind && o.multi === i.multi && (r = a);
|
|
1204
|
+
}), n[r] = i;
|
|
1205
1205
|
}), n;
|
|
1206
1206
|
}
|
|
1207
|
-
function $
|
|
1207
|
+
function $r() {
|
|
1208
1208
|
var e = {
|
|
1209
1209
|
scalar: {},
|
|
1210
1210
|
sequence: {},
|
|
@@ -1217,24 +1217,24 @@ function $i() {
|
|
|
1217
1217
|
fallback: []
|
|
1218
1218
|
}
|
|
1219
1219
|
}, t, n;
|
|
1220
|
-
function r
|
|
1221
|
-
|
|
1220
|
+
function i(r) {
|
|
1221
|
+
r.multi ? (e.multi[r.kind].push(r), e.multi.fallback.push(r)) : e[r.kind][r.tag] = e.fallback[r.tag] = r;
|
|
1222
1222
|
}
|
|
1223
1223
|
for (t = 0, n = arguments.length; t < n; t += 1)
|
|
1224
|
-
arguments[t].forEach(
|
|
1224
|
+
arguments[t].forEach(i);
|
|
1225
1225
|
return e;
|
|
1226
1226
|
}
|
|
1227
1227
|
function Je(e) {
|
|
1228
1228
|
return this.extend(e);
|
|
1229
1229
|
}
|
|
1230
1230
|
Je.prototype.extend = function(t) {
|
|
1231
|
-
var n = [],
|
|
1231
|
+
var n = [], i = [];
|
|
1232
1232
|
if (t instanceof X)
|
|
1233
|
-
|
|
1233
|
+
i.push(t);
|
|
1234
1234
|
else if (Array.isArray(t))
|
|
1235
|
-
|
|
1235
|
+
i = i.concat(t);
|
|
1236
1236
|
else if (t && (Array.isArray(t.implicit) || Array.isArray(t.explicit)))
|
|
1237
|
-
t.implicit && (n = n.concat(t.implicit)), t.explicit && (
|
|
1237
|
+
t.implicit && (n = n.concat(t.implicit)), t.explicit && (i = i.concat(t.explicit));
|
|
1238
1238
|
else
|
|
1239
1239
|
throw new ne("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1240
1240
|
n.forEach(function(o) {
|
|
@@ -1244,12 +1244,12 @@ Je.prototype.extend = function(t) {
|
|
|
1244
1244
|
throw new ne("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1245
1245
|
if (o.multi)
|
|
1246
1246
|
throw new ne("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1247
|
-
}),
|
|
1247
|
+
}), i.forEach(function(o) {
|
|
1248
1248
|
if (!(o instanceof X))
|
|
1249
1249
|
throw new ne("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1250
1250
|
});
|
|
1251
|
-
var
|
|
1252
|
-
return
|
|
1251
|
+
var r = Object.create(Je.prototype);
|
|
1252
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit = xt(r, "implicit"), r.compiledExplicit = xt(r, "explicit"), r.compiledTypeMap = $r(r.compiledImplicit, r.compiledExplicit), r;
|
|
1253
1253
|
};
|
|
1254
1254
|
var Xt = Je, en = new X("tag:yaml.org,2002:str", {
|
|
1255
1255
|
kind: "scalar",
|
|
@@ -1273,22 +1273,22 @@ var Xt = Je, en = new X("tag:yaml.org,2002:str", {
|
|
|
1273
1273
|
nn
|
|
1274
1274
|
]
|
|
1275
1275
|
});
|
|
1276
|
-
function
|
|
1276
|
+
function Tr(e) {
|
|
1277
1277
|
if (e === null) return !0;
|
|
1278
1278
|
var t = e.length;
|
|
1279
1279
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function Ir() {
|
|
1282
1282
|
return null;
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function Er(e) {
|
|
1285
1285
|
return e === null;
|
|
1286
1286
|
}
|
|
1287
1287
|
var an = new X("tag:yaml.org,2002:null", {
|
|
1288
1288
|
kind: "scalar",
|
|
1289
|
-
resolve:
|
|
1290
|
-
construct:
|
|
1291
|
-
predicate:
|
|
1289
|
+
resolve: Tr,
|
|
1290
|
+
construct: Ir,
|
|
1291
|
+
predicate: Er,
|
|
1292
1292
|
represent: {
|
|
1293
1293
|
canonical: function() {
|
|
1294
1294
|
return "~";
|
|
@@ -1308,22 +1308,22 @@ var an = new X("tag:yaml.org,2002:null", {
|
|
|
1308
1308
|
},
|
|
1309
1309
|
defaultStyle: "lowercase"
|
|
1310
1310
|
});
|
|
1311
|
-
function
|
|
1311
|
+
function Fr(e) {
|
|
1312
1312
|
if (e === null) return !1;
|
|
1313
1313
|
var t = e.length;
|
|
1314
1314
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function Or(e) {
|
|
1317
1317
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Lr(e) {
|
|
1320
1320
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1321
1321
|
}
|
|
1322
1322
|
var on = new X("tag:yaml.org,2002:bool", {
|
|
1323
1323
|
kind: "scalar",
|
|
1324
|
-
resolve:
|
|
1325
|
-
construct:
|
|
1326
|
-
predicate:
|
|
1324
|
+
resolve: Fr,
|
|
1325
|
+
construct: Or,
|
|
1326
|
+
predicate: Lr,
|
|
1327
1327
|
represent: {
|
|
1328
1328
|
lowercase: function(e) {
|
|
1329
1329
|
return e ? "true" : "false";
|
|
@@ -1337,73 +1337,73 @@ var on = new X("tag:yaml.org,2002:bool", {
|
|
|
1337
1337
|
},
|
|
1338
1338
|
defaultStyle: "lowercase"
|
|
1339
1339
|
});
|
|
1340
|
-
function
|
|
1340
|
+
function Rr(e) {
|
|
1341
1341
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function Br(e) {
|
|
1344
1344
|
return 48 <= e && e <= 55;
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1346
|
+
function Kr(e) {
|
|
1347
1347
|
return 48 <= e && e <= 57;
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function Nr(e) {
|
|
1350
1350
|
if (e === null) return !1;
|
|
1351
|
-
var t = e.length, n = 0,
|
|
1351
|
+
var t = e.length, n = 0, i = !1, r;
|
|
1352
1352
|
if (!t) return !1;
|
|
1353
|
-
if (
|
|
1353
|
+
if (r = e[n], (r === "-" || r === "+") && (r = e[++n]), r === "0") {
|
|
1354
1354
|
if (n + 1 === t) return !0;
|
|
1355
|
-
if (
|
|
1355
|
+
if (r = e[++n], r === "b") {
|
|
1356
1356
|
for (n++; n < t; n++)
|
|
1357
|
-
if (
|
|
1358
|
-
if (
|
|
1359
|
-
|
|
1357
|
+
if (r = e[n], r !== "_") {
|
|
1358
|
+
if (r !== "0" && r !== "1") return !1;
|
|
1359
|
+
i = !0;
|
|
1360
1360
|
}
|
|
1361
|
-
return
|
|
1361
|
+
return i && r !== "_";
|
|
1362
1362
|
}
|
|
1363
|
-
if (
|
|
1363
|
+
if (r === "x") {
|
|
1364
1364
|
for (n++; n < t; n++)
|
|
1365
|
-
if (
|
|
1366
|
-
if (!
|
|
1367
|
-
|
|
1365
|
+
if (r = e[n], r !== "_") {
|
|
1366
|
+
if (!Rr(e.charCodeAt(n))) return !1;
|
|
1367
|
+
i = !0;
|
|
1368
1368
|
}
|
|
1369
|
-
return
|
|
1369
|
+
return i && r !== "_";
|
|
1370
1370
|
}
|
|
1371
|
-
if (
|
|
1371
|
+
if (r === "o") {
|
|
1372
1372
|
for (n++; n < t; n++)
|
|
1373
|
-
if (
|
|
1374
|
-
if (!
|
|
1375
|
-
|
|
1373
|
+
if (r = e[n], r !== "_") {
|
|
1374
|
+
if (!Br(e.charCodeAt(n))) return !1;
|
|
1375
|
+
i = !0;
|
|
1376
1376
|
}
|
|
1377
|
-
return
|
|
1377
|
+
return i && r !== "_";
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
if (
|
|
1380
|
+
if (r === "_") return !1;
|
|
1381
1381
|
for (; n < t; n++)
|
|
1382
|
-
if (
|
|
1383
|
-
if (!
|
|
1382
|
+
if (r = e[n], r !== "_") {
|
|
1383
|
+
if (!Kr(e.charCodeAt(n)))
|
|
1384
1384
|
return !1;
|
|
1385
|
-
|
|
1385
|
+
i = !0;
|
|
1386
1386
|
}
|
|
1387
|
-
return !(!
|
|
1387
|
+
return !(!i || r === "_");
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1390
|
-
var t = e, n = 1,
|
|
1391
|
-
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")),
|
|
1392
|
-
if (
|
|
1389
|
+
function Mr(e) {
|
|
1390
|
+
var t = e, n = 1, i;
|
|
1391
|
+
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), i = t[0], (i === "-" || i === "+") && (i === "-" && (n = -1), t = t.slice(1), i = t[0]), t === "0") return 0;
|
|
1392
|
+
if (i === "0") {
|
|
1393
1393
|
if (t[1] === "b") return n * parseInt(t.slice(2), 2);
|
|
1394
1394
|
if (t[1] === "x") return n * parseInt(t.slice(2), 16);
|
|
1395
1395
|
if (t[1] === "o") return n * parseInt(t.slice(2), 8);
|
|
1396
1396
|
}
|
|
1397
1397
|
return n * parseInt(t, 10);
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function jr(e) {
|
|
1400
1400
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !Q.isNegativeZero(e);
|
|
1401
1401
|
}
|
|
1402
1402
|
var ln = new X("tag:yaml.org,2002:int", {
|
|
1403
1403
|
kind: "scalar",
|
|
1404
|
-
resolve:
|
|
1405
|
-
construct:
|
|
1406
|
-
predicate:
|
|
1404
|
+
resolve: Nr,
|
|
1405
|
+
construct: Mr,
|
|
1406
|
+
predicate: jr,
|
|
1407
1407
|
represent: {
|
|
1408
1408
|
binary: function(e) {
|
|
1409
1409
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1426,21 +1426,21 @@ var ln = new X("tag:yaml.org,2002:int", {
|
|
|
1426
1426
|
decimal: [10, "dec"],
|
|
1427
1427
|
hexadecimal: [16, "hex"]
|
|
1428
1428
|
}
|
|
1429
|
-
}),
|
|
1429
|
+
}), Dr = new RegExp(
|
|
1430
1430
|
// 2.5e4, 2.5 and integers
|
|
1431
1431
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1432
1432
|
);
|
|
1433
|
-
function
|
|
1434
|
-
return !(e === null || !
|
|
1433
|
+
function Ur(e) {
|
|
1434
|
+
return !(e === null || !Dr.test(e) || // Quick hack to not allow integers end with `_`
|
|
1435
1435
|
// Probably should update regexp & check speed
|
|
1436
1436
|
e[e.length - 1] === "_");
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1438
|
+
function Pr(e) {
|
|
1439
1439
|
var t, n;
|
|
1440
1440
|
return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1441
1441
|
}
|
|
1442
|
-
var
|
|
1443
|
-
function
|
|
1442
|
+
var qr = /^[-+]?[0-9]+e/;
|
|
1443
|
+
function Hr(e, t) {
|
|
1444
1444
|
var n;
|
|
1445
1445
|
if (isNaN(e))
|
|
1446
1446
|
switch (t) {
|
|
@@ -1471,17 +1471,17 @@ function Hi(e, t) {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
else if (Q.isNegativeZero(e))
|
|
1473
1473
|
return "-0.0";
|
|
1474
|
-
return n = e.toString(10),
|
|
1474
|
+
return n = e.toString(10), qr.test(n) ? n.replace("e", ".e") : n;
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1476
|
+
function Yr(e) {
|
|
1477
1477
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || Q.isNegativeZero(e));
|
|
1478
1478
|
}
|
|
1479
1479
|
var sn = new X("tag:yaml.org,2002:float", {
|
|
1480
1480
|
kind: "scalar",
|
|
1481
|
-
resolve:
|
|
1482
|
-
construct:
|
|
1483
|
-
predicate:
|
|
1484
|
-
represent:
|
|
1481
|
+
resolve: Ur,
|
|
1482
|
+
construct: Pr,
|
|
1483
|
+
predicate: Yr,
|
|
1484
|
+
represent: Hr,
|
|
1485
1485
|
defaultStyle: "lowercase"
|
|
1486
1486
|
}), cn = rn.extend({
|
|
1487
1487
|
implicit: [
|
|
@@ -1495,78 +1495,78 @@ var sn = new X("tag:yaml.org,2002:float", {
|
|
|
1495
1495
|
), fn = new RegExp(
|
|
1496
1496
|
"^([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]))?))?$"
|
|
1497
1497
|
);
|
|
1498
|
-
function
|
|
1498
|
+
function Vr(e) {
|
|
1499
1499
|
return e === null ? !1 : dn.exec(e) !== null || fn.exec(e) !== null;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1502
|
-
var t, n,
|
|
1501
|
+
function Wr(e) {
|
|
1502
|
+
var t, n, i, r, o, a, l, s = 0, c = null, d, u, g;
|
|
1503
1503
|
if (t = dn.exec(e), t === null && (t = fn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1504
|
-
if (n = +t[1],
|
|
1505
|
-
return new Date(Date.UTC(n,
|
|
1504
|
+
if (n = +t[1], i = +t[2] - 1, r = +t[3], !t[4])
|
|
1505
|
+
return new Date(Date.UTC(n, i, r));
|
|
1506
1506
|
if (o = +t[4], a = +t[5], l = +t[6], t[7]) {
|
|
1507
1507
|
for (s = t[7].slice(0, 3); s.length < 3; )
|
|
1508
1508
|
s += "0";
|
|
1509
1509
|
s = +s;
|
|
1510
1510
|
}
|
|
1511
|
-
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)),
|
|
1511
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), g = new Date(Date.UTC(n, i, r, o, a, l, s)), c && g.setTime(g.getTime() - c), g;
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function Jr(e) {
|
|
1514
1514
|
return e.toISOString();
|
|
1515
1515
|
}
|
|
1516
1516
|
var pn = new X("tag:yaml.org,2002:timestamp", {
|
|
1517
1517
|
kind: "scalar",
|
|
1518
|
-
resolve:
|
|
1519
|
-
construct:
|
|
1518
|
+
resolve: Vr,
|
|
1519
|
+
construct: Wr,
|
|
1520
1520
|
instanceOf: Date,
|
|
1521
|
-
represent:
|
|
1521
|
+
represent: Jr
|
|
1522
1522
|
});
|
|
1523
|
-
function
|
|
1523
|
+
function Gr(e) {
|
|
1524
1524
|
return e === "<<" || e === null;
|
|
1525
1525
|
}
|
|
1526
1526
|
var mn = new X("tag:yaml.org,2002:merge", {
|
|
1527
1527
|
kind: "scalar",
|
|
1528
|
-
resolve:
|
|
1529
|
-
}),
|
|
1528
|
+
resolve: Gr
|
|
1529
|
+
}), it = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1530
1530
|
\r`;
|
|
1531
|
-
function
|
|
1531
|
+
function zr(e) {
|
|
1532
1532
|
if (e === null) return !1;
|
|
1533
|
-
var t, n,
|
|
1534
|
-
for (n = 0; n <
|
|
1533
|
+
var t, n, i = 0, r = e.length, o = it;
|
|
1534
|
+
for (n = 0; n < r; n++)
|
|
1535
1535
|
if (t = o.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1536
1536
|
if (t < 0) return !1;
|
|
1537
|
-
|
|
1537
|
+
i += 6;
|
|
1538
1538
|
}
|
|
1539
|
-
return
|
|
1539
|
+
return i % 8 === 0;
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1542
|
-
var t, n,
|
|
1543
|
-
for (t = 0; t <
|
|
1544
|
-
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(
|
|
1545
|
-
return n =
|
|
1541
|
+
function Qr(e) {
|
|
1542
|
+
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = it, a = 0, l = [];
|
|
1543
|
+
for (t = 0; t < r; t++)
|
|
1544
|
+
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
|
|
1545
|
+
return n = r % 4 * 6, n === 0 ? (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)) : n === 18 ? (l.push(a >> 10 & 255), l.push(a >> 2 & 255)) : n === 12 && l.push(a >> 4 & 255), new Uint8Array(l);
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1548
|
-
var t = "", n = 0,
|
|
1549
|
-
for (
|
|
1550
|
-
|
|
1551
|
-
return
|
|
1547
|
+
function Zr(e) {
|
|
1548
|
+
var t = "", n = 0, i, r, o = e.length, a = it;
|
|
1549
|
+
for (i = 0; i < o; i++)
|
|
1550
|
+
i % 3 === 0 && i && (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]), n = (n << 8) + e[i];
|
|
1551
|
+
return r = o % 3, r === 0 ? (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]) : r === 2 ? (t += a[n >> 10 & 63], t += a[n >> 4 & 63], t += a[n << 2 & 63], t += a[64]) : r === 1 && (t += a[n >> 2 & 63], t += a[n << 4 & 63], t += a[64], t += a[64]), t;
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function Xr(e) {
|
|
1554
1554
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1555
1555
|
}
|
|
1556
1556
|
var hn = new X("tag:yaml.org,2002:binary", {
|
|
1557
1557
|
kind: "scalar",
|
|
1558
|
-
resolve:
|
|
1559
|
-
construct:
|
|
1560
|
-
predicate:
|
|
1561
|
-
represent:
|
|
1558
|
+
resolve: zr,
|
|
1559
|
+
construct: Qr,
|
|
1560
|
+
predicate: Xr,
|
|
1561
|
+
represent: Zr
|
|
1562
1562
|
}), ea = Object.prototype.hasOwnProperty, ta = Object.prototype.toString;
|
|
1563
1563
|
function na(e) {
|
|
1564
1564
|
if (e === null) return !0;
|
|
1565
|
-
var t = [], n,
|
|
1566
|
-
for (n = 0,
|
|
1567
|
-
if (
|
|
1568
|
-
for (o in
|
|
1569
|
-
if (ea.call(
|
|
1565
|
+
var t = [], n, i, r, o, a, l = e;
|
|
1566
|
+
for (n = 0, i = l.length; n < i; n += 1) {
|
|
1567
|
+
if (r = l[n], a = !1, ta.call(r) !== "[object Object]") return !1;
|
|
1568
|
+
for (o in r)
|
|
1569
|
+
if (ea.call(r, o))
|
|
1570
1570
|
if (!a) a = !0;
|
|
1571
1571
|
else return !1;
|
|
1572
1572
|
if (!a) return !1;
|
|
@@ -1575,28 +1575,28 @@ function na(e) {
|
|
|
1575
1575
|
}
|
|
1576
1576
|
return !0;
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function ia(e) {
|
|
1579
1579
|
return e !== null ? e : [];
|
|
1580
1580
|
}
|
|
1581
1581
|
var gn = new X("tag:yaml.org,2002:omap", {
|
|
1582
1582
|
kind: "sequence",
|
|
1583
1583
|
resolve: na,
|
|
1584
|
-
construct:
|
|
1585
|
-
}),
|
|
1584
|
+
construct: ia
|
|
1585
|
+
}), ra = Object.prototype.toString;
|
|
1586
1586
|
function aa(e) {
|
|
1587
1587
|
if (e === null) return !0;
|
|
1588
|
-
var t, n,
|
|
1588
|
+
var t, n, i, r, o, a = e;
|
|
1589
1589
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1590
|
-
if (
|
|
1591
|
-
o[t] = [
|
|
1590
|
+
if (i = a[t], ra.call(i) !== "[object Object]" || (r = Object.keys(i), r.length !== 1)) return !1;
|
|
1591
|
+
o[t] = [r[0], i[r[0]]];
|
|
1592
1592
|
}
|
|
1593
1593
|
return !0;
|
|
1594
1594
|
}
|
|
1595
1595
|
function oa(e) {
|
|
1596
1596
|
if (e === null) return [];
|
|
1597
|
-
var t, n,
|
|
1597
|
+
var t, n, i, r, o, a = e;
|
|
1598
1598
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1)
|
|
1599
|
-
|
|
1599
|
+
i = a[t], r = Object.keys(i), o[t] = [r[0], i[r[0]]];
|
|
1600
1600
|
return o;
|
|
1601
1601
|
}
|
|
1602
1602
|
var yn = new X("tag:yaml.org,2002:pairs", {
|
|
@@ -1619,7 +1619,7 @@ var vn = new X("tag:yaml.org,2002:set", {
|
|
|
1619
1619
|
kind: "mapping",
|
|
1620
1620
|
resolve: sa,
|
|
1621
1621
|
construct: ca
|
|
1622
|
-
}),
|
|
1622
|
+
}), rt = un.extend({
|
|
1623
1623
|
implicit: [
|
|
1624
1624
|
pn,
|
|
1625
1625
|
mn
|
|
@@ -1640,7 +1640,7 @@ function se(e) {
|
|
|
1640
1640
|
function me(e) {
|
|
1641
1641
|
return e === 9 || e === 32;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function ie(e) {
|
|
1644
1644
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1645
1645
|
}
|
|
1646
1646
|
function be(e) {
|
|
@@ -1670,7 +1670,7 @@ var An = new Array(256), wn = new Array(256);
|
|
|
1670
1670
|
for (var ye = 0; ye < 256; ye++)
|
|
1671
1671
|
An[ye] = At(ye) ? 1 : 0, wn[ye] = At(ye);
|
|
1672
1672
|
function va(e, t) {
|
|
1673
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1673
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || rt, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1674
1674
|
}
|
|
1675
1675
|
function _n(e, t) {
|
|
1676
1676
|
var n = {
|
|
@@ -1681,103 +1681,103 @@ function _n(e, t) {
|
|
|
1681
1681
|
line: e.line,
|
|
1682
1682
|
column: e.position - e.lineStart
|
|
1683
1683
|
};
|
|
1684
|
-
return n.snippet =
|
|
1684
|
+
return n.snippet = kr(n), new ne(t, n);
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function _(e, t) {
|
|
1687
1687
|
throw _n(e, t);
|
|
1688
1688
|
}
|
|
1689
1689
|
function Re(e, t) {
|
|
1690
1690
|
e.onWarning && e.onWarning.call(null, _n(e, t));
|
|
1691
1691
|
}
|
|
1692
1692
|
var wt = {
|
|
1693
|
-
YAML: function(t, n,
|
|
1694
|
-
var
|
|
1695
|
-
t.version !== null &&
|
|
1693
|
+
YAML: function(t, n, i) {
|
|
1694
|
+
var r, o, a;
|
|
1695
|
+
t.version !== null && _(t, "duplication of %YAML directive"), i.length !== 1 && _(t, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), r === null && _(t, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && _(t, "unacceptable YAML version of the document"), t.version = i[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Re(t, "unsupported YAML version of the document");
|
|
1696
1696
|
},
|
|
1697
|
-
TAG: function(t, n,
|
|
1698
|
-
var
|
|
1699
|
-
|
|
1697
|
+
TAG: function(t, n, i) {
|
|
1698
|
+
var r, o;
|
|
1699
|
+
i.length !== 2 && _(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], Cn.test(r) || _(t, "ill-formed tag handle (first argument) of the TAG directive"), pe.call(t.tagMap, r) && _(t, 'there is a previously declared suffix for "' + r + '" tag handle'), kn.test(o) || _(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1700
1700
|
try {
|
|
1701
1701
|
o = decodeURIComponent(o);
|
|
1702
1702
|
} catch {
|
|
1703
|
-
|
|
1703
|
+
_(t, "tag prefix is malformed: " + o);
|
|
1704
1704
|
}
|
|
1705
|
-
t.tagMap[
|
|
1705
|
+
t.tagMap[r] = o;
|
|
1706
1706
|
}
|
|
1707
1707
|
};
|
|
1708
|
-
function fe(e, t, n,
|
|
1709
|
-
var
|
|
1708
|
+
function fe(e, t, n, i) {
|
|
1709
|
+
var r, o, a, l;
|
|
1710
1710
|
if (t < n) {
|
|
1711
|
-
if (l = e.input.slice(t, n),
|
|
1712
|
-
for (
|
|
1713
|
-
a = l.charCodeAt(
|
|
1714
|
-
else da.test(l) &&
|
|
1711
|
+
if (l = e.input.slice(t, n), i)
|
|
1712
|
+
for (r = 0, o = l.length; r < o; r += 1)
|
|
1713
|
+
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || _(e, "expected valid JSON character");
|
|
1714
|
+
else da.test(l) && _(e, "the stream contains non-printable characters");
|
|
1715
1715
|
e.result += l;
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
function _t(e, t, n,
|
|
1719
|
-
var
|
|
1720
|
-
for (Q.isObject(n) ||
|
|
1721
|
-
o =
|
|
1718
|
+
function _t(e, t, n, i) {
|
|
1719
|
+
var r, o, a, l;
|
|
1720
|
+
for (Q.isObject(n) || _(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, l = r.length; a < l; a += 1)
|
|
1721
|
+
o = r[a], pe.call(t, o) || (t[o] = n[o], i[o] = !0);
|
|
1722
1722
|
}
|
|
1723
|
-
function xe(e, t, n,
|
|
1723
|
+
function xe(e, t, n, i, r, o, a, l, s) {
|
|
1724
1724
|
var c, d;
|
|
1725
|
-
if (Array.isArray(
|
|
1726
|
-
for (
|
|
1727
|
-
Array.isArray(
|
|
1728
|
-
if (typeof
|
|
1725
|
+
if (Array.isArray(r))
|
|
1726
|
+
for (r = Array.prototype.slice.call(r), c = 0, d = r.length; c < d; c += 1)
|
|
1727
|
+
Array.isArray(r[c]) && _(e, "nested arrays are not supported inside keys"), typeof r == "object" && kt(r[c]) === "[object Object]" && (r[c] = "[object Object]");
|
|
1728
|
+
if (typeof r == "object" && kt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1729
1729
|
if (Array.isArray(o))
|
|
1730
1730
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
1731
1731
|
_t(e, t, o[c], n);
|
|
1732
1732
|
else
|
|
1733
1733
|
_t(e, t, o, n);
|
|
1734
1734
|
else
|
|
1735
|
-
!e.json && !pe.call(n,
|
|
1735
|
+
!e.json && !pe.call(n, r) && pe.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, _(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(t, r, {
|
|
1736
1736
|
configurable: !0,
|
|
1737
1737
|
enumerable: !0,
|
|
1738
1738
|
writable: !0,
|
|
1739
1739
|
value: o
|
|
1740
|
-
}) : t[
|
|
1740
|
+
}) : t[r] = o, delete n[r];
|
|
1741
1741
|
return t;
|
|
1742
1742
|
}
|
|
1743
1743
|
function at(e) {
|
|
1744
1744
|
var t;
|
|
1745
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1745
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : _(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1746
1746
|
}
|
|
1747
1747
|
function z(e, t, n) {
|
|
1748
|
-
for (var
|
|
1749
|
-
for (; me(
|
|
1750
|
-
|
|
1751
|
-
if (t &&
|
|
1748
|
+
for (var i = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
1749
|
+
for (; me(r); )
|
|
1750
|
+
r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
1751
|
+
if (t && r === 35)
|
|
1752
1752
|
do
|
|
1753
|
-
|
|
1754
|
-
while (
|
|
1755
|
-
if (se(
|
|
1756
|
-
for (at(e),
|
|
1757
|
-
e.lineIndent++,
|
|
1753
|
+
r = e.input.charCodeAt(++e.position);
|
|
1754
|
+
while (r !== 10 && r !== 13 && r !== 0);
|
|
1755
|
+
if (se(r))
|
|
1756
|
+
for (at(e), r = e.input.charCodeAt(e.position), i++, e.lineIndent = 0; r === 32; )
|
|
1757
|
+
e.lineIndent++, r = e.input.charCodeAt(++e.position);
|
|
1758
1758
|
else
|
|
1759
1759
|
break;
|
|
1760
1760
|
}
|
|
1761
|
-
return n !== -1 &&
|
|
1761
|
+
return n !== -1 && i !== 0 && e.lineIndent < n && Re(e, "deficient indentation"), i;
|
|
1762
1762
|
}
|
|
1763
1763
|
function De(e) {
|
|
1764
1764
|
var t = e.position, n;
|
|
1765
|
-
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 ||
|
|
1765
|
+
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || ie(n)));
|
|
1766
1766
|
}
|
|
1767
1767
|
function ot(e, t) {
|
|
1768
1768
|
t === 1 ? e.result += " " : t > 1 && (e.result += Q.repeat(`
|
|
1769
1769
|
`, t - 1));
|
|
1770
1770
|
}
|
|
1771
1771
|
function ba(e, t, n) {
|
|
1772
|
-
var
|
|
1773
|
-
if (f = e.input.charCodeAt(e.position),
|
|
1772
|
+
var i, r, o, a, l, s, c, d, u = e.kind, g = e.result, f;
|
|
1773
|
+
if (f = e.input.charCodeAt(e.position), ie(f) || be(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (r = e.input.charCodeAt(e.position + 1), ie(r) || n && be(r)))
|
|
1774
1774
|
return !1;
|
|
1775
1775
|
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; f !== 0; ) {
|
|
1776
1776
|
if (f === 58) {
|
|
1777
|
-
if (
|
|
1777
|
+
if (r = e.input.charCodeAt(e.position + 1), ie(r) || n && be(r))
|
|
1778
1778
|
break;
|
|
1779
1779
|
} else if (f === 35) {
|
|
1780
|
-
if (
|
|
1780
|
+
if (i = e.input.charCodeAt(e.position - 1), ie(i))
|
|
1781
1781
|
break;
|
|
1782
1782
|
} else {
|
|
1783
1783
|
if (e.position === e.lineStart && De(e) || n && be(f))
|
|
@@ -1793,26 +1793,26 @@ function ba(e, t, n) {
|
|
|
1793
1793
|
}
|
|
1794
1794
|
l && (fe(e, o, a, !1), ot(e, e.line - s), o = a = e.position, l = !1), me(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1795
1795
|
}
|
|
1796
|
-
return fe(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
1796
|
+
return fe(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = g, !1);
|
|
1797
1797
|
}
|
|
1798
1798
|
function xa(e, t) {
|
|
1799
|
-
var n,
|
|
1799
|
+
var n, i, r;
|
|
1800
1800
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1801
1801
|
return !1;
|
|
1802
|
-
for (e.kind = "scalar", e.result = "", e.position++,
|
|
1802
|
+
for (e.kind = "scalar", e.result = "", e.position++, i = r = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1803
1803
|
if (n === 39)
|
|
1804
|
-
if (fe(e,
|
|
1805
|
-
|
|
1804
|
+
if (fe(e, i, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1805
|
+
i = e.position, e.position++, r = e.position;
|
|
1806
1806
|
else
|
|
1807
1807
|
return !0;
|
|
1808
|
-
else se(n) ? (fe(e,
|
|
1809
|
-
|
|
1808
|
+
else se(n) ? (fe(e, i, r, !0), ot(e, z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && De(e) ? _(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1809
|
+
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
1810
1810
|
}
|
|
1811
1811
|
function Ca(e, t) {
|
|
1812
|
-
var n,
|
|
1812
|
+
var n, i, r, o, a, l;
|
|
1813
1813
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1814
1814
|
return !1;
|
|
1815
|
-
for (e.kind = "scalar", e.result = "", e.position++, n =
|
|
1815
|
+
for (e.kind = "scalar", e.result = "", e.position++, n = i = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1816
1816
|
if (l === 34)
|
|
1817
1817
|
return fe(e, n, e.position, !0), e.position++, !0;
|
|
1818
1818
|
if (l === 92) {
|
|
@@ -1821,18 +1821,18 @@ function Ca(e, t) {
|
|
|
1821
1821
|
else if (l < 256 && An[l])
|
|
1822
1822
|
e.result += wn[l], e.position++;
|
|
1823
1823
|
else if ((a = ha(l)) > 0) {
|
|
1824
|
-
for (
|
|
1825
|
-
l = e.input.charCodeAt(++e.position), (a = ma(l)) >= 0 ? o = (o << 4) + a :
|
|
1824
|
+
for (r = a, o = 0; r > 0; r--)
|
|
1825
|
+
l = e.input.charCodeAt(++e.position), (a = ma(l)) >= 0 ? o = (o << 4) + a : _(e, "expected hexadecimal character");
|
|
1826
1826
|
e.result += ya(o), e.position++;
|
|
1827
1827
|
} else
|
|
1828
|
-
|
|
1829
|
-
n =
|
|
1830
|
-
} else se(l) ? (fe(e, n,
|
|
1828
|
+
_(e, "unknown escape sequence");
|
|
1829
|
+
n = i = e.position;
|
|
1830
|
+
} else se(l) ? (fe(e, n, i, !0), ot(e, z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && De(e) ? _(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1831
1831
|
}
|
|
1832
|
-
|
|
1832
|
+
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
1833
1833
|
}
|
|
1834
1834
|
function ka(e, t) {
|
|
1835
|
-
var n = !0,
|
|
1835
|
+
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, c, d, u, g, f, v = /* @__PURE__ */ Object.create(null), y, C, T, b;
|
|
1836
1836
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
1837
1837
|
d = 93, f = !1, l = [];
|
|
1838
1838
|
else if (b === 123)
|
|
@@ -1842,23 +1842,23 @@ function ka(e, t) {
|
|
|
1842
1842
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
1843
1843
|
if (z(e, !0, t), b = e.input.charCodeAt(e.position), b === d)
|
|
1844
1844
|
return e.position++, e.tag = a, e.anchor = s, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1845
|
-
n ? b === 44 &&
|
|
1845
|
+
n ? b === 44 && _(e, "expected the node content, but found ','") : _(e, "missed comma between flow collection entries"), C = y = T = null, u = g = !1, b === 63 && (c = e.input.charCodeAt(e.position + 1), ie(c) && (u = g = !0, e.position++, z(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, ke(e, t, Oe, !1, !0), C = e.tag, y = e.result, z(e, !0, t), b = e.input.charCodeAt(e.position), (g || e.line === i) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), z(e, !0, t), ke(e, t, Oe, !1, !0), T = e.result), f ? xe(e, l, v, C, y, T, i, r, o) : u ? l.push(xe(e, null, v, C, y, T, i, r, o)) : l.push(y), z(e, !0, t), b = e.input.charCodeAt(e.position), b === 44 ? (n = !0, b = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1846
1846
|
}
|
|
1847
|
-
|
|
1847
|
+
_(e, "unexpected end of the stream within a flow collection");
|
|
1848
1848
|
}
|
|
1849
1849
|
function Aa(e, t) {
|
|
1850
|
-
var n,
|
|
1850
|
+
var n, i, r = He, o = !1, a = !1, l = t, s = 0, c = !1, d, u;
|
|
1851
1851
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1852
|
-
|
|
1852
|
+
i = !1;
|
|
1853
1853
|
else if (u === 62)
|
|
1854
|
-
|
|
1854
|
+
i = !0;
|
|
1855
1855
|
else
|
|
1856
1856
|
return !1;
|
|
1857
1857
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1858
1858
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1859
|
-
He ===
|
|
1859
|
+
He === r ? r = u === 43 ? Ct : ua : _(e, "repeat of a chomping mode identifier");
|
|
1860
1860
|
else if ((d = ga(u)) >= 0)
|
|
1861
|
-
d === 0 ?
|
|
1861
|
+
d === 0 ? _(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? _(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1862
1862
|
else
|
|
1863
1863
|
break;
|
|
1864
1864
|
if (me(u)) {
|
|
@@ -1878,12 +1878,12 @@ function Aa(e, t) {
|
|
|
1878
1878
|
continue;
|
|
1879
1879
|
}
|
|
1880
1880
|
if (e.lineIndent < l) {
|
|
1881
|
-
|
|
1882
|
-
`, o ? 1 + s : s) :
|
|
1881
|
+
r === Ct ? e.result += Q.repeat(`
|
|
1882
|
+
`, o ? 1 + s : s) : r === He && o && (e.result += `
|
|
1883
1883
|
`);
|
|
1884
1884
|
break;
|
|
1885
1885
|
}
|
|
1886
|
-
for (
|
|
1886
|
+
for (i ? me(u) ? (c = !0, e.result += Q.repeat(`
|
|
1887
1887
|
`, o ? 1 + s : s)) : c ? (c = !1, e.result += Q.repeat(`
|
|
1888
1888
|
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += Q.repeat(`
|
|
1889
1889
|
`, s) : e.result += Q.repeat(`
|
|
@@ -1894,26 +1894,26 @@ function Aa(e, t) {
|
|
|
1894
1894
|
return !0;
|
|
1895
1895
|
}
|
|
1896
1896
|
function St(e, t) {
|
|
1897
|
-
var n,
|
|
1897
|
+
var n, i = e.tag, r = e.anchor, o = [], a, l = !1, s;
|
|
1898
1898
|
if (e.firstTabInLine !== -1) return !1;
|
|
1899
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1899
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !ie(a)))); ) {
|
|
1900
1900
|
if (l = !0, e.position++, z(e, !0, -1) && e.lineIndent <= t) {
|
|
1901
1901
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1902
1902
|
continue;
|
|
1903
1903
|
}
|
|
1904
1904
|
if (n = e.line, ke(e, t, xn, !1, !0), o.push(e.result), z(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1905
|
-
|
|
1905
|
+
_(e, "bad indentation of a sequence entry");
|
|
1906
1906
|
else if (e.lineIndent < t)
|
|
1907
1907
|
break;
|
|
1908
1908
|
}
|
|
1909
|
-
return l ? (e.tag =
|
|
1909
|
+
return l ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1910
1910
|
}
|
|
1911
1911
|
function wa(e, t, n) {
|
|
1912
|
-
var
|
|
1912
|
+
var i, r, o, a, l, s, c = e.tag, d = e.anchor, u = {}, g = /* @__PURE__ */ Object.create(null), f = null, v = null, y = null, C = !1, T = !1, b;
|
|
1913
1913
|
if (e.firstTabInLine !== -1) return !1;
|
|
1914
1914
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
1915
|
-
if (!C && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1916
|
-
b === 63 ? (C && (xe(e, u,
|
|
1915
|
+
if (!C && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (b === 63 || b === 58) && ie(i))
|
|
1916
|
+
b === 63 ? (C && (xe(e, u, g, f, v, null, a, l, s), f = v = y = null), T = !0, C = !0, r = !0) : C ? (C = !1, r = !0) : _(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = i;
|
|
1917
1917
|
else {
|
|
1918
1918
|
if (a = e.line, l = e.lineStart, s = e.position, !ke(e, n, bn, !1, !0))
|
|
1919
1919
|
break;
|
|
@@ -1921,67 +1921,67 @@ function wa(e, t, n) {
|
|
|
1921
1921
|
for (b = e.input.charCodeAt(e.position); me(b); )
|
|
1922
1922
|
b = e.input.charCodeAt(++e.position);
|
|
1923
1923
|
if (b === 58)
|
|
1924
|
-
b = e.input.charCodeAt(++e.position),
|
|
1925
|
-
else if (
|
|
1926
|
-
|
|
1924
|
+
b = e.input.charCodeAt(++e.position), ie(b) || _(e, "a whitespace character is expected after the key-value separator within a block mapping"), C && (xe(e, u, g, f, v, null, a, l, s), f = v = y = null), T = !0, C = !1, r = !1, f = e.tag, v = e.result;
|
|
1925
|
+
else if (T)
|
|
1926
|
+
_(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1927
1927
|
else
|
|
1928
1928
|
return e.tag = c, e.anchor = d, !0;
|
|
1929
|
-
} else if (
|
|
1930
|
-
|
|
1929
|
+
} else if (T)
|
|
1930
|
+
_(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1931
1931
|
else
|
|
1932
1932
|
return e.tag = c, e.anchor = d, !0;
|
|
1933
1933
|
}
|
|
1934
|
-
if ((e.line === o || e.lineIndent > t) && (C && (a = e.line, l = e.lineStart, s = e.position), ke(e, t, Le, !0,
|
|
1935
|
-
|
|
1934
|
+
if ((e.line === o || e.lineIndent > t) && (C && (a = e.line, l = e.lineStart, s = e.position), ke(e, t, Le, !0, r) && (C ? v = e.result : y = e.result), C || (xe(e, u, g, f, v, y, a, l, s), f = v = y = null), z(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && b !== 0)
|
|
1935
|
+
_(e, "bad indentation of a mapping entry");
|
|
1936
1936
|
else if (e.lineIndent < t)
|
|
1937
1937
|
break;
|
|
1938
1938
|
}
|
|
1939
|
-
return C && xe(e, u,
|
|
1939
|
+
return C && xe(e, u, g, f, v, null, a, l, s), T && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), T;
|
|
1940
1940
|
}
|
|
1941
1941
|
function _a(e) {
|
|
1942
|
-
var t, n = !1,
|
|
1942
|
+
var t, n = !1, i = !1, r, o, a;
|
|
1943
1943
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1944
|
-
if (e.tag !== null &&
|
|
1944
|
+
if (e.tag !== null && _(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (i = !0, r = "!!", a = e.input.charCodeAt(++e.position)) : r = "!", t = e.position, n) {
|
|
1945
1945
|
do
|
|
1946
1946
|
a = e.input.charCodeAt(++e.position);
|
|
1947
1947
|
while (a !== 0 && a !== 62);
|
|
1948
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
1948
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : _(e, "unexpected end of the stream within a verbatim tag");
|
|
1949
1949
|
} else {
|
|
1950
|
-
for (; a !== 0 && !
|
|
1951
|
-
a === 33 && (
|
|
1952
|
-
o = e.input.slice(t, e.position), pa.test(o) &&
|
|
1950
|
+
for (; a !== 0 && !ie(a); )
|
|
1951
|
+
a === 33 && (i ? _(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), Cn.test(r) || _(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1952
|
+
o = e.input.slice(t, e.position), pa.test(o) && _(e, "tag suffix cannot contain flow indicator characters");
|
|
1953
1953
|
}
|
|
1954
|
-
o && !kn.test(o) &&
|
|
1954
|
+
o && !kn.test(o) && _(e, "tag name cannot contain such characters: " + o);
|
|
1955
1955
|
try {
|
|
1956
1956
|
o = decodeURIComponent(o);
|
|
1957
1957
|
} catch {
|
|
1958
|
-
|
|
1958
|
+
_(e, "tag name is malformed: " + o);
|
|
1959
1959
|
}
|
|
1960
|
-
return n ? e.tag = o : pe.call(e.tagMap,
|
|
1960
|
+
return n ? e.tag = o : pe.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : _(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
1961
1961
|
}
|
|
1962
1962
|
function Sa(e) {
|
|
1963
1963
|
var t, n;
|
|
1964
1964
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1965
|
-
for (e.anchor !== null &&
|
|
1965
|
+
for (e.anchor !== null && _(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !ie(n) && !be(n); )
|
|
1966
1966
|
n = e.input.charCodeAt(++e.position);
|
|
1967
|
-
return e.position === t &&
|
|
1967
|
+
return e.position === t && _(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1968
1968
|
}
|
|
1969
1969
|
function $a(e) {
|
|
1970
|
-
var t, n,
|
|
1971
|
-
if (
|
|
1972
|
-
for (
|
|
1973
|
-
|
|
1974
|
-
return e.position === t &&
|
|
1975
|
-
}
|
|
1976
|
-
function ke(e, t, n,
|
|
1977
|
-
var o, a, l, s = 1, c = !1, d = !1, u,
|
|
1978
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Le === n || xn === n,
|
|
1970
|
+
var t, n, i;
|
|
1971
|
+
if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
|
|
1972
|
+
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !ie(i) && !be(i); )
|
|
1973
|
+
i = e.input.charCodeAt(++e.position);
|
|
1974
|
+
return e.position === t && _(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), pe.call(e.anchorMap, n) || _(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], z(e, !0, -1), !0;
|
|
1975
|
+
}
|
|
1976
|
+
function ke(e, t, n, i, r) {
|
|
1977
|
+
var o, a, l, s = 1, c = !1, d = !1, u, g, f, v, y, C;
|
|
1978
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Le === n || xn === n, i && z(e, !0, -1) && (c = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1979
1979
|
for (; _a(e) || Sa(e); )
|
|
1980
1980
|
z(e, !0, -1) ? (c = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1981
|
-
if (l && (l = c ||
|
|
1981
|
+
if (l && (l = c || r), (s === 1 || Le === n) && (Oe === n || bn === n ? y = t : y = t + 1, C = e.position - e.lineStart, s === 1 ? l && (St(e, C) || wa(e, C, y)) || ka(e, y) ? d = !0 : (a && Aa(e, y) || xa(e, y) || Ca(e, y) ? d = !0 : $a(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && _(e, "alias node should not have any properties")) : ba(e, y, Oe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && St(e, C))), e.tag === null)
|
|
1982
1982
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1983
1983
|
else if (e.tag === "?") {
|
|
1984
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1984
|
+
for (e.result !== null && e.kind !== "scalar" && _(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, g = e.implicitTypes.length; u < g; u += 1)
|
|
1985
1985
|
if (v = e.implicitTypes[u], v.resolve(e.result)) {
|
|
1986
1986
|
e.result = v.construct(e.result), e.tag = v.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1987
1987
|
break;
|
|
@@ -1990,21 +1990,21 @@ function ke(e, t, n, r, i) {
|
|
|
1990
1990
|
if (pe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1991
1991
|
v = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1992
1992
|
else
|
|
1993
|
-
for (v = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0,
|
|
1993
|
+
for (v = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, g = f.length; u < g; u += 1)
|
|
1994
1994
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
1995
1995
|
v = f[u];
|
|
1996
1996
|
break;
|
|
1997
1997
|
}
|
|
1998
|
-
v ||
|
|
1998
|
+
v || _(e, "unknown tag !<" + e.tag + ">"), e.result !== null && v.kind !== e.kind && _(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + v.kind + '", not "' + e.kind + '"'), v.resolve(e.result, e.tag) ? (e.result = v.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : _(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1999
1999
|
}
|
|
2000
2000
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2001
2001
|
}
|
|
2002
2002
|
function Ta(e) {
|
|
2003
|
-
var t = e.position, n,
|
|
2003
|
+
var t = e.position, n, i, r, o = !1, a;
|
|
2004
2004
|
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 && (z(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2005
|
-
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !
|
|
2005
|
+
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !ie(a); )
|
|
2006
2006
|
a = e.input.charCodeAt(++e.position);
|
|
2007
|
-
for (
|
|
2007
|
+
for (i = e.input.slice(n, e.position), r = [], i.length < 1 && _(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
2008
2008
|
for (; me(a); )
|
|
2009
2009
|
a = e.input.charCodeAt(++e.position);
|
|
2010
2010
|
if (a === 35) {
|
|
@@ -2014,26 +2014,26 @@ function Ta(e) {
|
|
|
2014
2014
|
break;
|
|
2015
2015
|
}
|
|
2016
2016
|
if (se(a)) break;
|
|
2017
|
-
for (n = e.position; a !== 0 && !
|
|
2017
|
+
for (n = e.position; a !== 0 && !ie(a); )
|
|
2018
2018
|
a = e.input.charCodeAt(++e.position);
|
|
2019
|
-
|
|
2019
|
+
r.push(e.input.slice(n, e.position));
|
|
2020
2020
|
}
|
|
2021
|
-
a !== 0 && at(e), pe.call(wt,
|
|
2021
|
+
a !== 0 && at(e), pe.call(wt, i) ? wt[i](e, i, r) : Re(e, 'unknown document directive "' + i + '"');
|
|
2022
2022
|
}
|
|
2023
|
-
if (z(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, z(e, !0, -1)) : o &&
|
|
2023
|
+
if (z(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, z(e, !0, -1)) : o && _(e, "directives end mark is expected"), ke(e, e.lineIndent - 1, Le, !1, !0), z(e, !0, -1), e.checkLineBreaks && fa.test(e.input.slice(t, e.position)) && Re(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && De(e)) {
|
|
2024
2024
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, z(e, !0, -1));
|
|
2025
2025
|
return;
|
|
2026
2026
|
}
|
|
2027
2027
|
if (e.position < e.length - 1)
|
|
2028
|
-
|
|
2028
|
+
_(e, "end of the stream or a document separator is expected");
|
|
2029
2029
|
else
|
|
2030
2030
|
return;
|
|
2031
2031
|
}
|
|
2032
2032
|
function Sn(e, t) {
|
|
2033
2033
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2034
2034
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2035
|
-
var n = new va(e, t),
|
|
2036
|
-
for (
|
|
2035
|
+
var n = new va(e, t), i = e.indexOf("\0");
|
|
2036
|
+
for (i !== -1 && (n.position = i, _(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2037
2037
|
n.lineIndent += 1, n.position += 1;
|
|
2038
2038
|
for (; n.position < n.length - 1; )
|
|
2039
2039
|
Ta(n);
|
|
@@ -2041,11 +2041,11 @@ function Sn(e, t) {
|
|
|
2041
2041
|
}
|
|
2042
2042
|
function Ia(e, t, n) {
|
|
2043
2043
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
2044
|
-
var
|
|
2044
|
+
var i = Sn(e, n);
|
|
2045
2045
|
if (typeof t != "function")
|
|
2046
|
-
return
|
|
2047
|
-
for (var
|
|
2048
|
-
t(r
|
|
2046
|
+
return i;
|
|
2047
|
+
for (var r = 0, o = i.length; r < o; r += 1)
|
|
2048
|
+
t(i[r]);
|
|
2049
2049
|
}
|
|
2050
2050
|
function Ea(e, t) {
|
|
2051
2051
|
var n = Sn(e, t);
|
|
@@ -2093,32 +2093,32 @@ var Ga = [
|
|
|
2093
2093
|
"OFF"
|
|
2094
2094
|
], za = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2095
2095
|
function Qa(e, t) {
|
|
2096
|
-
var n,
|
|
2096
|
+
var n, i, r, o, a, l, s;
|
|
2097
2097
|
if (t === null) return {};
|
|
2098
|
-
for (n = {},
|
|
2099
|
-
a = r
|
|
2098
|
+
for (n = {}, i = Object.keys(t), r = 0, o = i.length; r < o; r += 1)
|
|
2099
|
+
a = i[r], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), s = e.compiledTypeMap.fallback[a], s && In.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[a] = l;
|
|
2100
2100
|
return n;
|
|
2101
2101
|
}
|
|
2102
2102
|
function Za(e) {
|
|
2103
|
-
var t, n,
|
|
2103
|
+
var t, n, i;
|
|
2104
2104
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2105
|
-
n = "x",
|
|
2105
|
+
n = "x", i = 2;
|
|
2106
2106
|
else if (e <= 65535)
|
|
2107
|
-
n = "u",
|
|
2107
|
+
n = "u", i = 4;
|
|
2108
2108
|
else if (e <= 4294967295)
|
|
2109
|
-
n = "U",
|
|
2109
|
+
n = "U", i = 8;
|
|
2110
2110
|
else
|
|
2111
2111
|
throw new ne("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2112
|
-
return "\\" + n + Q.repeat("0",
|
|
2112
|
+
return "\\" + n + Q.repeat("0", i - t.length) + t;
|
|
2113
2113
|
}
|
|
2114
2114
|
var Xa = 1, $e = 2;
|
|
2115
2115
|
function eo(e) {
|
|
2116
|
-
this.schema = e.schema ||
|
|
2116
|
+
this.schema = e.schema || rt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = Q.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Qa(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? $e : Xa, 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;
|
|
2117
2117
|
}
|
|
2118
2118
|
function $t(e, t) {
|
|
2119
|
-
for (var n = Q.repeat(" ", t),
|
|
2120
|
-
|
|
2121
|
-
`,
|
|
2119
|
+
for (var n = Q.repeat(" ", t), i = 0, r = -1, o = "", a, l = e.length; i < l; )
|
|
2120
|
+
r = e.indexOf(`
|
|
2121
|
+
`, i), r === -1 ? (a = e.slice(i), i = l) : (a = e.slice(i, r + 1), i = r + 1), a.length && a !== `
|
|
2122
2122
|
` && (o += n), o += a;
|
|
2123
2123
|
return o;
|
|
2124
2124
|
}
|
|
@@ -2127,9 +2127,9 @@ function ze(e, t) {
|
|
|
2127
2127
|
` + Q.repeat(" ", e.indent * t);
|
|
2128
2128
|
}
|
|
2129
2129
|
function to(e, t) {
|
|
2130
|
-
var n,
|
|
2131
|
-
for (n = 0,
|
|
2132
|
-
if (
|
|
2130
|
+
var n, i, r;
|
|
2131
|
+
for (n = 0, i = e.implicitTypes.length; n < i; n += 1)
|
|
2132
|
+
if (r = e.implicitTypes[n], r.resolve(t))
|
|
2133
2133
|
return !0;
|
|
2134
2134
|
return !1;
|
|
2135
2135
|
}
|
|
@@ -2143,32 +2143,32 @@ function Tt(e) {
|
|
|
2143
2143
|
return Te(e) && e !== lt && e !== Ra && e !== Se;
|
|
2144
2144
|
}
|
|
2145
2145
|
function It(e, t, n) {
|
|
2146
|
-
var
|
|
2146
|
+
var i = Tt(e), r = i && !Ke(e);
|
|
2147
2147
|
return (
|
|
2148
2148
|
// ns-plain-safe
|
|
2149
2149
|
(n ? (
|
|
2150
2150
|
// c = flow-in
|
|
2151
|
-
|
|
2152
|
-
) :
|
|
2151
|
+
i
|
|
2152
|
+
) : i && e !== En && e !== Fn && e !== On && e !== Ln && e !== Rn) && e !== Ge && !(t === Be && !r) || Tt(t) && !Ke(t) && e === Ge || t === Be && r
|
|
2153
2153
|
);
|
|
2154
2154
|
}
|
|
2155
2155
|
function no(e) {
|
|
2156
2156
|
return Te(e) && e !== lt && !Ke(e) && e !== Pa && e !== Ya && e !== Be && e !== En && e !== Fn && e !== On && e !== Ln && e !== Rn && e !== Ge && e !== ja && e !== Ua && e !== Ka && e !== Ja && e !== qa && e !== Ha && e !== Da && e !== Na && e !== Ma && e !== Va && e !== Wa;
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2158
|
+
function io(e) {
|
|
2159
2159
|
return !Ke(e) && e !== Be;
|
|
2160
2160
|
}
|
|
2161
2161
|
function we(e, t) {
|
|
2162
|
-
var n = e.charCodeAt(t),
|
|
2163
|
-
return n >= 55296 && n <= 56319 && t + 1 < e.length && (
|
|
2162
|
+
var n = e.charCodeAt(t), i;
|
|
2163
|
+
return n >= 55296 && n <= 56319 && t + 1 < e.length && (i = e.charCodeAt(t + 1), i >= 56320 && i <= 57343) ? (n - 55296) * 1024 + i - 56320 + 65536 : n;
|
|
2164
2164
|
}
|
|
2165
2165
|
function Bn(e) {
|
|
2166
2166
|
var t = /^\n* /;
|
|
2167
2167
|
return t.test(e);
|
|
2168
2168
|
}
|
|
2169
2169
|
var Kn = 1, Qe = 2, Nn = 3, Mn = 4, ve = 5;
|
|
2170
|
-
function
|
|
2171
|
-
var s, c = 0, d = null, u = !1,
|
|
2170
|
+
function ro(e, t, n, i, r, o, a, l) {
|
|
2171
|
+
var s, c = 0, d = null, u = !1, g = !1, f = i !== -1, v = -1, y = no(we(e, 0)) && io(we(e, e.length - 1));
|
|
2172
2172
|
if (t || a)
|
|
2173
2173
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2174
2174
|
if (c = we(e, s), !Te(c))
|
|
@@ -2178,35 +2178,35 @@ function io(e, t, n, r, i, o, a, l) {
|
|
|
2178
2178
|
else {
|
|
2179
2179
|
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2180
2180
|
if (c = we(e, s), c === Se)
|
|
2181
|
-
u = !0, f && (
|
|
2182
|
-
s - v - 1 >
|
|
2181
|
+
u = !0, f && (g = g || // Foldable line = too long, and not more-indented.
|
|
2182
|
+
s - v - 1 > i && e[v + 1] !== " ", v = s);
|
|
2183
2183
|
else if (!Te(c))
|
|
2184
2184
|
return ve;
|
|
2185
2185
|
y = y && It(c, d, l), d = c;
|
|
2186
2186
|
}
|
|
2187
|
-
|
|
2187
|
+
g = g || f && s - v - 1 > i && e[v + 1] !== " ";
|
|
2188
2188
|
}
|
|
2189
|
-
return !u && !
|
|
2189
|
+
return !u && !g ? y && !a && !r(e) ? Kn : o === $e ? ve : Qe : n > 9 && Bn(e) ? ve : a ? o === $e ? ve : Qe : g ? Mn : Nn;
|
|
2190
2190
|
}
|
|
2191
|
-
function ao(e, t, n,
|
|
2191
|
+
function ao(e, t, n, i, r) {
|
|
2192
2192
|
e.dump = function() {
|
|
2193
2193
|
if (t.length === 0)
|
|
2194
2194
|
return e.quotingType === $e ? '""' : "''";
|
|
2195
2195
|
if (!e.noCompatMode && (Ga.indexOf(t) !== -1 || za.test(t)))
|
|
2196
2196
|
return e.quotingType === $e ? '"' + t + '"' : "'" + t + "'";
|
|
2197
|
-
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l =
|
|
2197
|
+
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2198
2198
|
function s(c) {
|
|
2199
2199
|
return to(e, c);
|
|
2200
2200
|
}
|
|
2201
|
-
switch (
|
|
2201
|
+
switch (ro(
|
|
2202
2202
|
t,
|
|
2203
2203
|
l,
|
|
2204
2204
|
e.indent,
|
|
2205
2205
|
a,
|
|
2206
2206
|
s,
|
|
2207
2207
|
e.quotingType,
|
|
2208
|
-
e.forceQuotes && !
|
|
2209
|
-
|
|
2208
|
+
e.forceQuotes && !i,
|
|
2209
|
+
r
|
|
2210
2210
|
)) {
|
|
2211
2211
|
case Kn:
|
|
2212
2212
|
return t;
|
|
@@ -2224,10 +2224,10 @@ function ao(e, t, n, r, i) {
|
|
|
2224
2224
|
}();
|
|
2225
2225
|
}
|
|
2226
2226
|
function Et(e, t) {
|
|
2227
|
-
var n = Bn(e) ? String(t) : "",
|
|
2228
|
-
`,
|
|
2227
|
+
var n = Bn(e) ? String(t) : "", i = e[e.length - 1] === `
|
|
2228
|
+
`, r = i && (e[e.length - 2] === `
|
|
2229
2229
|
` || e === `
|
|
2230
|
-
`), o =
|
|
2230
|
+
`), o = r ? "+" : i ? "" : "-";
|
|
2231
2231
|
return n + o + `
|
|
2232
2232
|
`;
|
|
2233
2233
|
}
|
|
@@ -2236,52 +2236,52 @@ function Ft(e) {
|
|
|
2236
2236
|
` ? e.slice(0, -1) : e;
|
|
2237
2237
|
}
|
|
2238
2238
|
function oo(e, t) {
|
|
2239
|
-
for (var n = /(\n+)([^\n]*)/g,
|
|
2239
|
+
for (var n = /(\n+)([^\n]*)/g, i = function() {
|
|
2240
2240
|
var c = e.indexOf(`
|
|
2241
2241
|
`);
|
|
2242
2242
|
return c = c !== -1 ? c : e.length, n.lastIndex = c, Ot(e.slice(0, c), t);
|
|
2243
|
-
}(),
|
|
2243
|
+
}(), r = e[0] === `
|
|
2244
2244
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
2245
2245
|
var l = a[1], s = a[2];
|
|
2246
|
-
o = s[0] === " ",
|
|
2247
|
-
` : "") + Ot(s, t),
|
|
2246
|
+
o = s[0] === " ", i += l + (!r && !o && s !== "" ? `
|
|
2247
|
+
` : "") + Ot(s, t), r = o;
|
|
2248
2248
|
}
|
|
2249
|
-
return
|
|
2249
|
+
return i;
|
|
2250
2250
|
}
|
|
2251
2251
|
function Ot(e, t) {
|
|
2252
2252
|
if (e === "" || e[0] === " ") return e;
|
|
2253
|
-
for (var n = / [^ ]/g,
|
|
2254
|
-
l =
|
|
2255
|
-
` + e.slice(
|
|
2253
|
+
for (var n = / [^ ]/g, i, r = 0, o, a = 0, l = 0, s = ""; i = n.exec(e); )
|
|
2254
|
+
l = i.index, l - r > t && (o = a > r ? a : l, s += `
|
|
2255
|
+
` + e.slice(r, o), r = o + 1), a = l;
|
|
2256
2256
|
return s += `
|
|
2257
|
-
`, e.length -
|
|
2258
|
-
` + e.slice(a + 1) : s += e.slice(
|
|
2257
|
+
`, e.length - r > t && a > r ? s += e.slice(r, a) + `
|
|
2258
|
+
` + e.slice(a + 1) : s += e.slice(r), s.slice(1);
|
|
2259
2259
|
}
|
|
2260
2260
|
function lo(e) {
|
|
2261
|
-
for (var t = "", n = 0,
|
|
2262
|
-
n = we(e,
|
|
2261
|
+
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
2262
|
+
n = we(e, r), i = ee[n], !i && Te(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || Za(n);
|
|
2263
2263
|
return t;
|
|
2264
2264
|
}
|
|
2265
2265
|
function so(e, t, n) {
|
|
2266
|
-
var
|
|
2266
|
+
var i = "", r = e.tag, o, a, l;
|
|
2267
2267
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2268
|
-
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (ue(e, t, l, !1, !1) || typeof l > "u" && ue(e, t, null, !1, !1)) && (
|
|
2269
|
-
e.tag =
|
|
2268
|
+
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (ue(e, t, l, !1, !1) || typeof l > "u" && ue(e, t, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
|
|
2269
|
+
e.tag = r, e.dump = "[" + i + "]";
|
|
2270
2270
|
}
|
|
2271
|
-
function Lt(e, t, n,
|
|
2272
|
-
var
|
|
2271
|
+
function Lt(e, t, n, i) {
|
|
2272
|
+
var r = "", o = e.tag, a, l, s;
|
|
2273
2273
|
for (a = 0, l = n.length; a < l; a += 1)
|
|
2274
|
-
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (ue(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && ue(e, t + 1, null, !0, !0, !1, !0)) && ((!
|
|
2275
|
-
e.tag = o, e.dump =
|
|
2274
|
+
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (ue(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && ue(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += ze(e, t)), e.dump && Se === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2275
|
+
e.tag = o, e.dump = r || "[]";
|
|
2276
2276
|
}
|
|
2277
2277
|
function co(e, t, n) {
|
|
2278
|
-
var
|
|
2278
|
+
var i = "", r = e.tag, o = Object.keys(n), a, l, s, c, d;
|
|
2279
2279
|
for (a = 0, l = o.length; a < l; a += 1)
|
|
2280
|
-
d = "",
|
|
2281
|
-
e.tag =
|
|
2280
|
+
d = "", i !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = o[a], c = n[s], e.replacer && (c = e.replacer.call(n, s, c)), ue(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ue(e, t, c, !1, !1) && (d += e.dump, i += d));
|
|
2281
|
+
e.tag = r, e.dump = "{" + i + "}";
|
|
2282
2282
|
}
|
|
2283
|
-
function uo(e, t, n,
|
|
2284
|
-
var
|
|
2283
|
+
function uo(e, t, n, i) {
|
|
2284
|
+
var r = "", o = e.tag, a = Object.keys(n), l, s, c, d, u, g;
|
|
2285
2285
|
if (e.sortKeys === !0)
|
|
2286
2286
|
a.sort();
|
|
2287
2287
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2289,38 +2289,38 @@ function uo(e, t, n, r) {
|
|
|
2289
2289
|
else if (e.sortKeys)
|
|
2290
2290
|
throw new ne("sortKeys must be a boolean or a function");
|
|
2291
2291
|
for (l = 0, s = a.length; l < s; l += 1)
|
|
2292
|
-
|
|
2293
|
-
e.tag = o, e.dump =
|
|
2292
|
+
g = "", (!i || r !== "") && (g += ze(e, t)), c = a[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), ue(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Se === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, u && (g += ze(e, t)), ue(e, t + 1, d, !0, u) && (e.dump && Se === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, r += g));
|
|
2293
|
+
e.tag = o, e.dump = r || "{}";
|
|
2294
2294
|
}
|
|
2295
2295
|
function Rt(e, t, n) {
|
|
2296
|
-
var
|
|
2297
|
-
for (
|
|
2298
|
-
if (l =
|
|
2296
|
+
var i, r, o, a, l, s;
|
|
2297
|
+
for (r = n ? e.explicitTypes : e.implicitTypes, o = 0, a = r.length; o < a; o += 1)
|
|
2298
|
+
if (l = r[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
2299
2299
|
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2300
2300
|
if (s = e.styleMap[l.tag] || l.defaultStyle, Tn.call(l.represent) === "[object Function]")
|
|
2301
|
-
|
|
2301
|
+
i = l.represent(t, s);
|
|
2302
2302
|
else if (In.call(l.represent, s))
|
|
2303
|
-
|
|
2303
|
+
i = l.represent[s](t, s);
|
|
2304
2304
|
else
|
|
2305
2305
|
throw new ne("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2306
|
-
e.dump =
|
|
2306
|
+
e.dump = i;
|
|
2307
2307
|
}
|
|
2308
2308
|
return !0;
|
|
2309
2309
|
}
|
|
2310
2310
|
return !1;
|
|
2311
2311
|
}
|
|
2312
|
-
function ue(e, t, n,
|
|
2312
|
+
function ue(e, t, n, i, r, o, a) {
|
|
2313
2313
|
e.tag = null, e.dump = n, Rt(e, n, !1) || Rt(e, n, !0);
|
|
2314
|
-
var l = Tn.call(e.dump), s =
|
|
2315
|
-
|
|
2316
|
-
var d = l === "[object Object]" || l === "[object Array]", u,
|
|
2317
|
-
if (d && (u = e.duplicates.indexOf(n),
|
|
2314
|
+
var l = Tn.call(e.dump), s = i, c;
|
|
2315
|
+
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
2316
|
+
var d = l === "[object Object]" || l === "[object Array]", u, g;
|
|
2317
|
+
if (d && (u = e.duplicates.indexOf(n), g = u !== -1), (e.tag !== null && e.tag !== "?" || g || e.indent !== 2 && t > 0) && (r = !1), g && e.usedDuplicates[u])
|
|
2318
2318
|
e.dump = "*ref_" + u;
|
|
2319
2319
|
else {
|
|
2320
|
-
if (d &&
|
|
2321
|
-
|
|
2320
|
+
if (d && g && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2321
|
+
i && Object.keys(e.dump).length !== 0 ? (uo(e, t, e.dump, r), g && (e.dump = "&ref_" + u + e.dump)) : (co(e, t, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2322
2322
|
else if (l === "[object Array]")
|
|
2323
|
-
|
|
2323
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Lt(e, t - 1, e.dump, r) : Lt(e, t, e.dump, r), g && (e.dump = "&ref_" + u + e.dump)) : (so(e, t, e.dump), g && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2324
2324
|
else if (l === "[object String]")
|
|
2325
2325
|
e.tag !== "?" && ao(e, e.dump, t, o, s);
|
|
2326
2326
|
else {
|
|
@@ -2336,29 +2336,29 @@ function ue(e, t, n, r, i, o, a) {
|
|
|
2336
2336
|
return !0;
|
|
2337
2337
|
}
|
|
2338
2338
|
function fo(e, t) {
|
|
2339
|
-
var n = [],
|
|
2340
|
-
for (Ze(e, n,
|
|
2341
|
-
t.duplicates.push(n[r
|
|
2339
|
+
var n = [], i = [], r, o;
|
|
2340
|
+
for (Ze(e, n, i), r = 0, o = i.length; r < o; r += 1)
|
|
2341
|
+
t.duplicates.push(n[i[r]]);
|
|
2342
2342
|
t.usedDuplicates = new Array(o);
|
|
2343
2343
|
}
|
|
2344
2344
|
function Ze(e, t, n) {
|
|
2345
|
-
var
|
|
2345
|
+
var i, r, o;
|
|
2346
2346
|
if (e !== null && typeof e == "object")
|
|
2347
|
-
if (
|
|
2348
|
-
n.indexOf(
|
|
2347
|
+
if (r = t.indexOf(e), r !== -1)
|
|
2348
|
+
n.indexOf(r) === -1 && n.push(r);
|
|
2349
2349
|
else if (t.push(e), Array.isArray(e))
|
|
2350
|
-
for (
|
|
2351
|
-
Ze(e[
|
|
2350
|
+
for (r = 0, o = e.length; r < o; r += 1)
|
|
2351
|
+
Ze(e[r], t, n);
|
|
2352
2352
|
else
|
|
2353
|
-
for (
|
|
2354
|
-
Ze(e[r
|
|
2353
|
+
for (i = Object.keys(e), r = 0, o = i.length; r < o; r += 1)
|
|
2354
|
+
Ze(e[i[r]], t, n);
|
|
2355
2355
|
}
|
|
2356
2356
|
function po(e, t) {
|
|
2357
2357
|
t = t || {};
|
|
2358
2358
|
var n = new eo(t);
|
|
2359
2359
|
n.noRefs || fo(e, n);
|
|
2360
|
-
var
|
|
2361
|
-
return n.replacer && (
|
|
2360
|
+
var i = e;
|
|
2361
|
+
return n.replacer && (i = n.replacer.call({ "": i }, "", i)), ue(n, 0, i, !0, !0) ? n.dump + `
|
|
2362
2362
|
` : "";
|
|
2363
2363
|
}
|
|
2364
2364
|
var mo = po, ho = {
|
|
@@ -2369,7 +2369,7 @@ function st(e, t) {
|
|
|
2369
2369
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2370
2370
|
};
|
|
2371
2371
|
}
|
|
2372
|
-
var go = X, yo = Xt, vo = rn, bo = cn, xo = un, Co =
|
|
2372
|
+
var go = X, yo = Xt, vo = rn, bo = cn, xo = un, Co = rt, ko = $n.load, Ao = $n.loadAll, wo = ho.dump, _o = ne, So = {
|
|
2373
2373
|
binary: hn,
|
|
2374
2374
|
float: sn,
|
|
2375
2375
|
map: nn,
|
|
@@ -2399,7 +2399,7 @@ var go = X, yo = Xt, vo = rn, bo = cn, xo = un, Co = it, ko = $n.load, Ao = $n.l
|
|
|
2399
2399
|
safeLoadAll: To,
|
|
2400
2400
|
safeDump: Io
|
|
2401
2401
|
};
|
|
2402
|
-
const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
2402
|
+
const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */ W({
|
|
2403
2403
|
__name: "YamlCodeBlock",
|
|
2404
2404
|
props: {
|
|
2405
2405
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2409,24 +2409,24 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2409
2409
|
}
|
|
2410
2410
|
},
|
|
2411
2411
|
setup(e) {
|
|
2412
|
-
const t = e, n =
|
|
2413
|
-
const
|
|
2414
|
-
return Object.keys(
|
|
2412
|
+
const t = e, n = $(() => {
|
|
2413
|
+
const i = Object.fromEntries(Object.entries(t.entityRecord).filter(([, r]) => r !== null && r !== "" && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2414
|
+
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Eo.dump(i).trim();
|
|
2415
2415
|
});
|
|
2416
|
-
return (
|
|
2416
|
+
return (i, r) => {
|
|
2417
2417
|
const o = U("KCodeBlock");
|
|
2418
|
-
return p(),
|
|
2419
|
-
t.entityRecord ? (p(),
|
|
2418
|
+
return p(), S("div", Fo, [
|
|
2419
|
+
t.entityRecord ? (p(), N(o, {
|
|
2420
2420
|
key: 0,
|
|
2421
2421
|
id: "yaml-codeblock",
|
|
2422
2422
|
code: n.value,
|
|
2423
2423
|
language: "yaml",
|
|
2424
2424
|
theme: "dark"
|
|
2425
|
-
}, null, 8, ["code"])) :
|
|
2425
|
+
}, null, 8, ["code"])) : M("", !0)
|
|
2426
2426
|
]);
|
|
2427
2427
|
};
|
|
2428
2428
|
}
|
|
2429
|
-
}), Oo = { class: "terraform-config config-card-code-block" }, te = " ", Dn = /* @__PURE__ */
|
|
2429
|
+
}), Oo = { class: "terraform-config config-card-code-block" }, te = " ", Dn = /* @__PURE__ */ W({
|
|
2430
2430
|
__name: "TerraformCodeBlock",
|
|
2431
2431
|
props: {
|
|
2432
2432
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2451,7 +2451,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2451
2451
|
return typeof l == "string" ? d += `${c}${s} = "${l}"
|
|
2452
2452
|
` : d += `${c}${s} = ${String(l ?? "")}
|
|
2453
2453
|
`, d;
|
|
2454
|
-
},
|
|
2454
|
+
}, i = (l, s, c = "") => {
|
|
2455
2455
|
if (typeof l != "object")
|
|
2456
2456
|
return "Invalid object";
|
|
2457
2457
|
const d = te + c;
|
|
@@ -2459,26 +2459,26 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2459
2459
|
if (s && (u += `${d}${s} = {
|
|
2460
2460
|
`), l === null)
|
|
2461
2461
|
return s ? u += `${d}}` : u = "{}", u;
|
|
2462
|
-
const
|
|
2462
|
+
const g = Object.fromEntries(Object.entries(l).filter(([, v]) => v !== null));
|
|
2463
2463
|
let f = "";
|
|
2464
|
-
for (const [v, y] of Object.entries(
|
|
2464
|
+
for (const [v, y] of Object.entries(g))
|
|
2465
2465
|
Array.isArray(y) ? y.length === 0 ? f = "[]" : (f = `[
|
|
2466
|
-
`, f +=
|
|
2467
|
-
`, f +=
|
|
2466
|
+
`, f += r(y, void 0, d), f += `${d}${te}]`) : y && typeof y == "object" ? (f = `{
|
|
2467
|
+
`, f += i(y, void 0, d), f += `${d}${te}}`) : f = String(y ?? ""), typeof y == "string" && (f = `"${f}"`), u += `${d}${te}${v} = ${f}
|
|
2468
2468
|
`;
|
|
2469
2469
|
return s ? u += `${d}}
|
|
2470
2470
|
` : u;
|
|
2471
|
-
},
|
|
2471
|
+
}, r = (l, s, c = "") => {
|
|
2472
2472
|
if (!Array.isArray(l))
|
|
2473
2473
|
return "Invalid array";
|
|
2474
2474
|
const d = te + c;
|
|
2475
2475
|
let u = "";
|
|
2476
2476
|
s && (l.length === 0 ? u += `${d}${s} = [` : u += `${d}${s} = [
|
|
2477
2477
|
`);
|
|
2478
|
-
for (let
|
|
2479
|
-
const f = l[
|
|
2478
|
+
for (let g = 0; g < l.length; g++) {
|
|
2479
|
+
const f = l[g];
|
|
2480
2480
|
typeof f == "object" ? (u += `${d}${te}{
|
|
2481
|
-
`, u +=
|
|
2481
|
+
`, u += i(f, void 0, d), u += `${d}${te}}`) : typeof f == "string" ? u += `${d}${te}"${f}"` : u += `${d}${te}${String(f ?? "")}`, g < l.length - 1 && (u += ","), u += `
|
|
2482
2482
|
`;
|
|
2483
2483
|
}
|
|
2484
2484
|
return s && (l.length === 0 ? u += `]
|
|
@@ -2487,16 +2487,16 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2487
2487
|
}, o = (l) => {
|
|
2488
2488
|
let s = "";
|
|
2489
2489
|
for (const [c, d] of Object.entries(l))
|
|
2490
|
-
Array.isArray(d) ? s +=
|
|
2490
|
+
Array.isArray(d) ? s += r(d, c) : typeof d == "object" ? s += i(d, c) : s += n(d, c);
|
|
2491
2491
|
return s;
|
|
2492
|
-
}, a =
|
|
2493
|
-
var u,
|
|
2492
|
+
}, a = $(() => {
|
|
2493
|
+
var u, g, f, v, y, C, T;
|
|
2494
2494
|
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, b]) => b != null)), s = t.entityRecord.config ? Object.fromEntries(Object.entries((u = t.entityRecord) == null ? void 0 : u.config).filter(([, b]) => b != null)) : void 0;
|
|
2495
2495
|
if (s && (l.config = s), Object.keys(l).length === 0)
|
|
2496
2496
|
return "";
|
|
2497
2497
|
delete l.id;
|
|
2498
2498
|
let c = "", d = "";
|
|
2499
|
-
if ((
|
|
2499
|
+
if ((g = l.service) != null && g.id ? (d = "service", delete l.service) : (f = l.route) != null && f.id ? (d = "route", delete l.route) : (v = l.consumer) != null && v.id ? (d = "consumer", delete l.consumer) : (y = l.consumer_group) != null && y.id ? (d = "consumer_group", delete l.consumer_group) : (C = l.certificate) != null && C.id ? (d = "certificate", delete l.certificate) : (T = l.set) != null && T.id && (d = "set", delete l.set), t.entityType === "plugin") {
|
|
2500
2500
|
const b = t.credentialType.replace(/-/g, "_") || (l.name + "").replace(/-/g, "_");
|
|
2501
2501
|
delete l.name, c += `resource "konnect_gateway_plugin_${b}" "my_${b}" {
|
|
2502
2502
|
`;
|
|
@@ -2512,14 +2512,14 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2512
2512
|
});
|
|
2513
2513
|
return (l, s) => {
|
|
2514
2514
|
const c = U("KCodeBlock");
|
|
2515
|
-
return p(),
|
|
2516
|
-
t.entityRecord ? (p(),
|
|
2515
|
+
return p(), S("div", Oo, [
|
|
2516
|
+
t.entityRecord ? (p(), N(c, {
|
|
2517
2517
|
key: 0,
|
|
2518
2518
|
id: "terraform-codeblock",
|
|
2519
2519
|
code: a.value,
|
|
2520
2520
|
language: "terraform",
|
|
2521
2521
|
theme: "dark"
|
|
2522
|
-
}, null, 8, ["code"])) :
|
|
2522
|
+
}, null, 8, ["code"])) : M("", !0)
|
|
2523
2523
|
]);
|
|
2524
2524
|
};
|
|
2525
2525
|
}
|
|
@@ -2529,7 +2529,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2529
2529
|
}, Ro = ["data-testid"], Bo = {
|
|
2530
2530
|
key: 0,
|
|
2531
2531
|
class: "config-card-prop-section-title"
|
|
2532
|
-
}, Ko = /* @__PURE__ */
|
|
2532
|
+
}, Ko = /* @__PURE__ */ W({
|
|
2533
2533
|
__name: "ConfigCardDisplay",
|
|
2534
2534
|
props: {
|
|
2535
2535
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2581,7 +2581,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2581
2581
|
}
|
|
2582
2582
|
},
|
|
2583
2583
|
setup(e) {
|
|
2584
|
-
const t = e, n = Xe(), { i18n: { t:
|
|
2584
|
+
const t = e, n = Xe(), { i18n: { t: i } } = V.useI18n(), r = (a) => !!(a.tooltip || n[`${a.key}-label-tooltip`]), o = $(() => {
|
|
2585
2585
|
if (!t.record)
|
|
2586
2586
|
return t.record;
|
|
2587
2587
|
let a = t.record;
|
|
@@ -2589,22 +2589,22 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2589
2589
|
const l = JSON.parse(JSON.stringify(a));
|
|
2590
2590
|
return delete l.created_at, delete l.updated_at, l;
|
|
2591
2591
|
});
|
|
2592
|
-
return (a, l) => (p(),
|
|
2593
|
-
e.format === "structured" ? (p(),
|
|
2594
|
-
(p(!0),
|
|
2592
|
+
return (a, l) => (p(), S(le, null, [
|
|
2593
|
+
e.format === "structured" ? (p(), S("div", Lo, [
|
|
2594
|
+
(p(!0), S(le, null, oe(e.propListTypes, (s) => (p(), S("div", {
|
|
2595
2595
|
key: `config-card-details-${s}-props`,
|
|
2596
2596
|
class: ce(`config-card-details-${s}-props`),
|
|
2597
2597
|
"data-testid": `config-card-details-${s}-props`
|
|
2598
2598
|
}, [
|
|
2599
|
-
s !== "basic" ? (p(),
|
|
2600
|
-
(p(!0),
|
|
2599
|
+
s !== "basic" ? (p(), S("div", Bo, I(s === "advanced" ? w(i)("baseConfigCard.sections.advanced") : w(i)("baseConfigCard.sections.plugin")), 1)) : M("", !0),
|
|
2600
|
+
(p(!0), S(le, null, oe(e.propertyCollections[s], (c) => (p(), N(Gt, {
|
|
2601
2601
|
key: c.key,
|
|
2602
2602
|
item: c
|
|
2603
2603
|
}, Ce({
|
|
2604
|
-
label:
|
|
2604
|
+
label: A(() => [
|
|
2605
2605
|
P(a.$slots, `${c.key}-label`, { row: c }, void 0, !0)
|
|
2606
2606
|
]),
|
|
2607
|
-
[c.key]:
|
|
2607
|
+
[c.key]: A(({ rowValue: d }) => [
|
|
2608
2608
|
P(a.$slots, c.key, {
|
|
2609
2609
|
row: c,
|
|
2610
2610
|
rowValue: d
|
|
@@ -2612,38 +2612,38 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2612
2612
|
]),
|
|
2613
2613
|
_: 2
|
|
2614
2614
|
}, [
|
|
2615
|
-
|
|
2615
|
+
r(c) ? {
|
|
2616
2616
|
name: "label-tooltip",
|
|
2617
|
-
fn:
|
|
2617
|
+
fn: A(() => [
|
|
2618
2618
|
P(a.$slots, `${c.key}-label-tooltip`, { row: c }, void 0, !0)
|
|
2619
2619
|
]),
|
|
2620
2620
|
key: "0"
|
|
2621
2621
|
} : void 0
|
|
2622
2622
|
]), 1032, ["item"]))), 128))
|
|
2623
2623
|
], 10, Ro))), 128))
|
|
2624
|
-
])) :
|
|
2625
|
-
e.format === "json" && o.value ? (p(),
|
|
2624
|
+
])) : M("", !0),
|
|
2625
|
+
e.format === "json" && o.value ? (p(), N(zt, {
|
|
2626
2626
|
key: 1,
|
|
2627
2627
|
config: t.config,
|
|
2628
2628
|
"entity-record": o.value,
|
|
2629
2629
|
"fetcher-url": t.fetcherUrl,
|
|
2630
2630
|
"request-method": "get"
|
|
2631
|
-
}, null, 8, ["config", "entity-record", "fetcher-url"])) :
|
|
2632
|
-
e.format === "yaml" && o.value ? (p(),
|
|
2631
|
+
}, null, 8, ["config", "entity-record", "fetcher-url"])) : M("", !0),
|
|
2632
|
+
e.format === "yaml" && o.value ? (p(), N(jn, {
|
|
2633
2633
|
key: 2,
|
|
2634
2634
|
"entity-record": o.value
|
|
2635
|
-
}, null, 8, ["entity-record"])) :
|
|
2636
|
-
e.format === "terraform" && o.value ? (p(),
|
|
2635
|
+
}, null, 8, ["entity-record"])) : M("", !0),
|
|
2636
|
+
e.format === "terraform" && o.value ? (p(), N(Dn, {
|
|
2637
2637
|
key: 3,
|
|
2638
2638
|
"entity-record": o.value,
|
|
2639
2639
|
"entity-type": t.entityType
|
|
2640
|
-
}, null, 8, ["entity-record", "entity-type"])) :
|
|
2640
|
+
}, null, 8, ["entity-record", "entity-type"])) : M("", !0)
|
|
2641
2641
|
], 64));
|
|
2642
2642
|
}
|
|
2643
2643
|
}), No = /* @__PURE__ */ ae(Ko, [["__scopeId", "data-v-d67757a9"]]), Mo = {
|
|
2644
2644
|
class: "config-card-title",
|
|
2645
2645
|
"data-testid": "config-card-title"
|
|
2646
|
-
}, jo = { class: "config-card-actions" }, Do = ["href"], Uo = { class: "config-card-details-section" }, Po = /* @__PURE__ */
|
|
2646
|
+
}, jo = { class: "config-card-actions" }, Do = ["href"], Uo = { class: "config-card-details-section" }, Po = /* @__PURE__ */ W({
|
|
2647
2647
|
__name: "EntityBaseConfigCard",
|
|
2648
2648
|
props: {
|
|
2649
2649
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2746,172 +2746,172 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2746
2746
|
},
|
|
2747
2747
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
2748
2748
|
setup(e, { emit: t }) {
|
|
2749
|
-
var
|
|
2750
|
-
const n = t,
|
|
2751
|
-
|
|
2752
|
-
const { axiosInstance: l } =
|
|
2749
|
+
var D;
|
|
2750
|
+
const n = t, i = e, { i18n: { t: r } } = V.useI18n(), { getMessageFromError: o } = V.useErrors(), { convertKeyToTitle: a } = V.useStringHelpers();
|
|
2751
|
+
V.useSubSchema(i.pluginConfigKey);
|
|
2752
|
+
const { axiosInstance: l } = V.useAxios((D = i.config) == null ? void 0 : D.axiosRequestConfig), s = [
|
|
2753
2753
|
{
|
|
2754
|
-
label:
|
|
2754
|
+
label: r("baseConfigCard.general.structuredFormat"),
|
|
2755
2755
|
value: "structured",
|
|
2756
2756
|
selected: !0
|
|
2757
2757
|
},
|
|
2758
2758
|
{
|
|
2759
|
-
label:
|
|
2759
|
+
label: r("baseForm.configuration.json"),
|
|
2760
2760
|
value: "json"
|
|
2761
2761
|
},
|
|
2762
2762
|
{
|
|
2763
|
-
label:
|
|
2763
|
+
label: r("baseForm.configuration.yaml"),
|
|
2764
2764
|
value: "yaml"
|
|
2765
2765
|
}
|
|
2766
2766
|
];
|
|
2767
|
-
|
|
2768
|
-
label:
|
|
2767
|
+
i.config.app === "konnect" && s.splice(2, 0, {
|
|
2768
|
+
label: r("baseForm.configuration.terraform"),
|
|
2769
2769
|
value: "terraform"
|
|
2770
2770
|
});
|
|
2771
|
-
const c =
|
|
2772
|
-
c.value =
|
|
2771
|
+
const c = R("structured"), d = (m) => {
|
|
2772
|
+
c.value = m == null ? void 0 : m.value;
|
|
2773
2773
|
}, u = {
|
|
2774
2774
|
id: {
|
|
2775
|
-
type:
|
|
2776
|
-
label:
|
|
2775
|
+
type: Y.ID,
|
|
2776
|
+
label: r("baseConfigCard.commonFields.id_label"),
|
|
2777
2777
|
order: 0,
|
|
2778
|
-
section:
|
|
2778
|
+
section: re.Basic
|
|
2779
2779
|
},
|
|
2780
2780
|
name: {
|
|
2781
2781
|
order: 1,
|
|
2782
|
-
section:
|
|
2782
|
+
section: re.Basic
|
|
2783
2783
|
},
|
|
2784
2784
|
enabled: {
|
|
2785
|
-
type:
|
|
2785
|
+
type: Y.BadgeStatus,
|
|
2786
2786
|
order: 2,
|
|
2787
|
-
section:
|
|
2787
|
+
section: re.Basic
|
|
2788
2788
|
},
|
|
2789
2789
|
updated_at: {
|
|
2790
|
-
type:
|
|
2791
|
-
label:
|
|
2790
|
+
type: Y.Date,
|
|
2791
|
+
label: r("baseConfigCard.commonFields.updated_at_label"),
|
|
2792
2792
|
order: 3,
|
|
2793
|
-
section:
|
|
2793
|
+
section: re.Basic
|
|
2794
2794
|
},
|
|
2795
2795
|
created_at: {
|
|
2796
|
-
type:
|
|
2797
|
-
label:
|
|
2796
|
+
type: Y.Date,
|
|
2797
|
+
label: r("baseConfigCard.commonFields.created_at_label"),
|
|
2798
2798
|
order: 4,
|
|
2799
|
-
section:
|
|
2799
|
+
section: re.Basic
|
|
2800
2800
|
},
|
|
2801
2801
|
tags: {
|
|
2802
|
-
type:
|
|
2802
|
+
type: Y.BadgeTag,
|
|
2803
2803
|
order: -1,
|
|
2804
2804
|
// the last property displayed
|
|
2805
|
-
section:
|
|
2805
|
+
section: re.Basic
|
|
2806
2806
|
},
|
|
2807
2807
|
partials: {
|
|
2808
|
-
type:
|
|
2809
|
-
label:
|
|
2808
|
+
type: Y.LinkInternal,
|
|
2809
|
+
label: r("baseConfigCard.commonFields.partial_label"),
|
|
2810
2810
|
order: -1,
|
|
2811
2811
|
// the last property displayed
|
|
2812
|
-
section:
|
|
2812
|
+
section: re.Basic
|
|
2813
2813
|
}
|
|
2814
|
-
},
|
|
2815
|
-
var h, x,
|
|
2814
|
+
}, g = R(!1), f = R(!1), v = R(""), y = R({}), C = $(() => {
|
|
2815
|
+
var h, x, K;
|
|
2816
2816
|
if (!y.value)
|
|
2817
2817
|
return [];
|
|
2818
|
-
const
|
|
2819
|
-
for (const
|
|
2820
|
-
const
|
|
2821
|
-
let
|
|
2822
|
-
(
|
|
2818
|
+
const m = [], k = Object.keys(y.value).length;
|
|
2819
|
+
for (const O in y.value) {
|
|
2820
|
+
const L = (x = (h = i.configSchema) == null ? void 0 : h[O]) == null ? void 0 : x.order, J = (K = u[O]) == null ? void 0 : K.order;
|
|
2821
|
+
let q = k;
|
|
2822
|
+
(J || J === 0) && (q = J === -1 ? k + 1 : J), L && (q = L === -1 ? k + 1 : L), m.push([O, q]);
|
|
2823
2823
|
}
|
|
2824
|
-
return
|
|
2825
|
-
return
|
|
2826
|
-
}),
|
|
2824
|
+
return m.sort(function(O, L) {
|
|
2825
|
+
return O[1] - L[1];
|
|
2826
|
+
}), m.map((O) => {
|
|
2827
2827
|
var Ie, ct;
|
|
2828
|
-
const
|
|
2828
|
+
const L = O[0], J = (Ie = y.value) == null ? void 0 : Ie[L], q = ((ct = i.configSchema) == null ? void 0 : ct[L]) || {}, G = u[L];
|
|
2829
2829
|
return {
|
|
2830
|
-
key:
|
|
2831
|
-
value:
|
|
2832
|
-
hidden:
|
|
2833
|
-
type:
|
|
2834
|
-
label:
|
|
2835
|
-
tooltip:
|
|
2836
|
-
section:
|
|
2830
|
+
key: L,
|
|
2831
|
+
value: J,
|
|
2832
|
+
hidden: q.hidden || !1,
|
|
2833
|
+
type: q.type ?? ((G == null ? void 0 : G.type) || Y.Text),
|
|
2834
|
+
label: q.label ?? ((G == null ? void 0 : G.label) || a(L)),
|
|
2835
|
+
tooltip: q.tooltip ?? ((G == null ? void 0 : G.tooltip) || void 0),
|
|
2836
|
+
section: q.section ?? ((G == null ? void 0 : G.section) || re.Advanced)
|
|
2837
2837
|
};
|
|
2838
|
-
}).filter((
|
|
2839
|
-
}),
|
|
2840
|
-
var x,
|
|
2841
|
-
if (!y.value || !
|
|
2838
|
+
}).filter((O) => !O.hidden && O.key !== i.pluginConfigKey);
|
|
2839
|
+
}), T = $(() => {
|
|
2840
|
+
var x, K;
|
|
2841
|
+
if (!y.value || !i.pluginConfigKey)
|
|
2842
2842
|
return [];
|
|
2843
|
-
const
|
|
2844
|
-
for (const
|
|
2845
|
-
const
|
|
2846
|
-
let
|
|
2847
|
-
|
|
2843
|
+
const m = y.value[i.pluginConfigKey] || {}, k = Object.keys(m).length, h = [];
|
|
2844
|
+
for (const O in m) {
|
|
2845
|
+
const L = (K = (x = i.pluginConfigSchema) == null ? void 0 : x[O]) == null ? void 0 : K.order, J = m[O];
|
|
2846
|
+
let q = J != null && J !== "" ? k - 1 : k;
|
|
2847
|
+
L && (q = L === -1 ? k + 1 : L), h.push([O, q]);
|
|
2848
2848
|
}
|
|
2849
|
-
return h.sort(function(
|
|
2850
|
-
return
|
|
2851
|
-
}), h.map((
|
|
2849
|
+
return h.sort(function(O, L) {
|
|
2850
|
+
return O[1] - L[1];
|
|
2851
|
+
}), h.map((O) => {
|
|
2852
2852
|
var G;
|
|
2853
|
-
const
|
|
2853
|
+
const L = O[0], J = m[L], q = ((G = i.pluginConfigSchema) == null ? void 0 : G[L]) || {};
|
|
2854
2854
|
return {
|
|
2855
|
-
key:
|
|
2856
|
-
value:
|
|
2857
|
-
hidden:
|
|
2858
|
-
type:
|
|
2859
|
-
label:
|
|
2860
|
-
tooltip:
|
|
2861
|
-
section:
|
|
2855
|
+
key: L,
|
|
2856
|
+
value: J,
|
|
2857
|
+
hidden: q.hidden || !1,
|
|
2858
|
+
type: q.type ?? Y.Text,
|
|
2859
|
+
label: q.label ?? a(L),
|
|
2860
|
+
tooltip: q.tooltip ?? void 0,
|
|
2861
|
+
section: re.Plugin
|
|
2862
2862
|
};
|
|
2863
|
-
}).filter((
|
|
2864
|
-
}), b =
|
|
2865
|
-
var
|
|
2863
|
+
}).filter((O) => !O.hidden);
|
|
2864
|
+
}), b = $(() => {
|
|
2865
|
+
var m, k, h, x;
|
|
2866
2866
|
return {
|
|
2867
|
-
basic: (
|
|
2868
|
-
advanced: (
|
|
2869
|
-
plugin: (x =
|
|
2867
|
+
basic: (m = C.value) == null ? void 0 : m.filter((K) => K.section === re.Basic),
|
|
2868
|
+
advanced: (k = C.value) == null ? void 0 : k.filter((K) => K.section === re.Advanced),
|
|
2869
|
+
plugin: (x = T.value) == null ? void 0 : x.concat((h = C.value) == null ? void 0 : h.filter((K) => K.section === re.Plugin))
|
|
2870
2870
|
};
|
|
2871
|
-
}),
|
|
2872
|
-
const
|
|
2873
|
-
return b.value.basic.length &&
|
|
2874
|
-
}),
|
|
2875
|
-
var
|
|
2876
|
-
let
|
|
2877
|
-
return
|
|
2871
|
+
}), F = $(() => {
|
|
2872
|
+
const m = [];
|
|
2873
|
+
return b.value.basic.length && m.push("basic"), b.value.advanced.length && m.push("advanced"), b.value.plugin.length && m.push("plugin"), m;
|
|
2874
|
+
}), E = $(() => {
|
|
2875
|
+
var k, h;
|
|
2876
|
+
let m = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
2877
|
+
return i.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((k = i.config) == null ? void 0 : k.controlPlaneId) || "") : i.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (h = i.config) != null && h.workspace ? `/${i.config.workspace}` : "")), m = m.replace(/{id}/gi, i.config.entityId), m;
|
|
2878
2878
|
});
|
|
2879
|
-
return Ae(
|
|
2880
|
-
n("loading",
|
|
2879
|
+
return Ae(g, (m) => {
|
|
2880
|
+
n("loading", m);
|
|
2881
2881
|
}, { immediate: !0 }), et(async () => {
|
|
2882
|
-
f.value = !1,
|
|
2882
|
+
f.value = !1, g.value = !0;
|
|
2883
2883
|
try {
|
|
2884
|
-
const { data:
|
|
2885
|
-
if (
|
|
2886
|
-
if (typeof
|
|
2887
|
-
y.value = { ...
|
|
2884
|
+
const { data: m } = await l.get(E.value);
|
|
2885
|
+
if (i.dataKey)
|
|
2886
|
+
if (typeof m[i.dataKey] < "u")
|
|
2887
|
+
y.value = { ...m[i.dataKey] };
|
|
2888
2888
|
else
|
|
2889
|
-
throw new Error(
|
|
2890
|
-
else
|
|
2891
|
-
Object.keys(
|
|
2889
|
+
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
2890
|
+
else i.recordResolver ? y.value = { ...i.recordResolver(m) } : y.value = { ...m };
|
|
2891
|
+
Object.keys(i.configSchema).filter((h) => i.configSchema[h].forceShow).forEach((h) => {
|
|
2892
2892
|
y.value && typeof y.value[h] > "u" && (y.value[h] = null);
|
|
2893
|
-
}), n("fetch:success",
|
|
2894
|
-
} catch (
|
|
2895
|
-
const
|
|
2896
|
-
v.value =
|
|
2893
|
+
}), n("fetch:success", m);
|
|
2894
|
+
} catch (m) {
|
|
2895
|
+
const k = o(m);
|
|
2896
|
+
v.value = k.startsWith("code") ? r("baseConfigCard.errors.load") : k, f.value = !0, n("fetch:error", m);
|
|
2897
2897
|
} finally {
|
|
2898
|
-
|
|
2898
|
+
g.value = !1;
|
|
2899
2899
|
}
|
|
2900
|
-
}), (
|
|
2901
|
-
const h = U("KLabel"), x = U("KSelect"),
|
|
2902
|
-
return p(),
|
|
2900
|
+
}), (m, k) => {
|
|
2901
|
+
const h = U("KLabel"), x = U("KSelect"), K = U("KButton"), O = U("KSkeleton"), L = U("KEmptyState"), J = U("KCard");
|
|
2902
|
+
return p(), N(J, {
|
|
2903
2903
|
class: "kong-ui-entity-base-config-card",
|
|
2904
2904
|
"title-tag": e.titleTag
|
|
2905
2905
|
}, Ce({
|
|
2906
|
-
actions:
|
|
2907
|
-
|
|
2908
|
-
P(
|
|
2906
|
+
actions: A(() => [
|
|
2907
|
+
B("div", jo, [
|
|
2908
|
+
P(m.$slots, "actions", {}, void 0, !0),
|
|
2909
2909
|
j(h, {
|
|
2910
2910
|
class: "config-format-select-label",
|
|
2911
2911
|
"data-testid": "config-format-select-label"
|
|
2912
2912
|
}, {
|
|
2913
|
-
default:
|
|
2914
|
-
|
|
2913
|
+
default: A(() => [
|
|
2914
|
+
H(I(e.label), 1)
|
|
2915
2915
|
]),
|
|
2916
2916
|
_: 1
|
|
2917
2917
|
}),
|
|
@@ -2920,56 +2920,56 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2920
2920
|
items: s,
|
|
2921
2921
|
onChange: d
|
|
2922
2922
|
}),
|
|
2923
|
-
e.configCardDoc ? (p(),
|
|
2923
|
+
e.configCardDoc ? (p(), N(K, {
|
|
2924
2924
|
key: 0,
|
|
2925
2925
|
appearance: "tertiary",
|
|
2926
2926
|
class: "book-icon",
|
|
2927
2927
|
"data-testid": "book-icon"
|
|
2928
2928
|
}, {
|
|
2929
|
-
default:
|
|
2930
|
-
|
|
2929
|
+
default: A(() => [
|
|
2930
|
+
B("a", {
|
|
2931
2931
|
href: e.configCardDoc,
|
|
2932
2932
|
rel: "noopener",
|
|
2933
2933
|
target: "_blank"
|
|
2934
2934
|
}, [
|
|
2935
|
-
j(
|
|
2935
|
+
j(w(Ut), { size: w(Gi) }, null, 8, ["size"])
|
|
2936
2936
|
], 8, Do)
|
|
2937
2937
|
]),
|
|
2938
2938
|
_: 1
|
|
2939
|
-
})) :
|
|
2939
|
+
})) : M("", !0)
|
|
2940
2940
|
])
|
|
2941
2941
|
]),
|
|
2942
|
-
default:
|
|
2943
|
-
|
|
2942
|
+
default: A(() => [
|
|
2943
|
+
g.value ? (p(), N(O, {
|
|
2944
2944
|
key: 0,
|
|
2945
2945
|
"data-testid": "config-card-loader",
|
|
2946
2946
|
"table-columns": 2,
|
|
2947
2947
|
type: "table"
|
|
2948
|
-
})) : f.value ? (p(),
|
|
2948
|
+
})) : f.value ? (p(), N(L, {
|
|
2949
2949
|
key: 1,
|
|
2950
2950
|
"data-testid": "config-card-fetch-error",
|
|
2951
2951
|
"icon-variant": "error"
|
|
2952
2952
|
}, {
|
|
2953
|
-
default:
|
|
2954
|
-
|
|
2953
|
+
default: A(() => [
|
|
2954
|
+
B("h3", null, I(v.value), 1)
|
|
2955
2955
|
]),
|
|
2956
2956
|
_: 1
|
|
2957
|
-
})) :
|
|
2958
|
-
|
|
2957
|
+
})) : M("", !0),
|
|
2958
|
+
B("div", Uo, [
|
|
2959
2959
|
j(No, {
|
|
2960
2960
|
"code-block-record-formatter": e.codeBlockRecordFormatter,
|
|
2961
2961
|
config: e.config,
|
|
2962
2962
|
"entity-type": e.entityType,
|
|
2963
|
-
"fetcher-url":
|
|
2963
|
+
"fetcher-url": E.value,
|
|
2964
2964
|
format: c.value,
|
|
2965
|
-
"prop-list-types":
|
|
2965
|
+
"prop-list-types": F.value,
|
|
2966
2966
|
"property-collections": b.value,
|
|
2967
2967
|
record: y.value
|
|
2968
2968
|
}, Ce({ _: 2 }, [
|
|
2969
|
-
oe(Object.keys(
|
|
2970
|
-
name:
|
|
2971
|
-
fn:
|
|
2972
|
-
P(
|
|
2969
|
+
oe(Object.keys(m.$slots), (q) => ({
|
|
2970
|
+
name: q,
|
|
2971
|
+
fn: A(({ row: G, rowValue: Ie }) => [
|
|
2972
|
+
P(m.$slots, q, {
|
|
2973
2973
|
row: G,
|
|
2974
2974
|
rowValue: Ie
|
|
2975
2975
|
}, void 0, !0)
|
|
@@ -2982,10 +2982,10 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2982
2982
|
}, [
|
|
2983
2983
|
e.hideTitle ? void 0 : {
|
|
2984
2984
|
name: "title",
|
|
2985
|
-
fn:
|
|
2986
|
-
|
|
2987
|
-
P(
|
|
2988
|
-
|
|
2985
|
+
fn: A(() => [
|
|
2986
|
+
B("span", Mo, [
|
|
2987
|
+
P(m.$slots, "title", {}, () => [
|
|
2988
|
+
H(I(w(r)("baseConfigCard.title")), 1)
|
|
2989
2989
|
], !0)
|
|
2990
2990
|
])
|
|
2991
2991
|
]),
|
|
@@ -2997,7 +2997,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
2997
2997
|
}), es = /* @__PURE__ */ ae(Po, [["__scopeId", "data-v-be491a0e"]]), qo = ["novalidate"], Ho = {
|
|
2998
2998
|
class: "form-actions",
|
|
2999
2999
|
"data-testid": "form-actions"
|
|
3000
|
-
}, Yo = /* @__PURE__ */
|
|
3000
|
+
}, Yo = /* @__PURE__ */ W({
|
|
3001
3001
|
__name: "EntityBaseForm",
|
|
3002
3002
|
props: {
|
|
3003
3003
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3074,7 +3074,15 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3074
3074
|
* Teleport target for the actions
|
|
3075
3075
|
*/
|
|
3076
3076
|
actionTeleportTarget: {
|
|
3077
|
-
type: String
|
|
3077
|
+
type: String,
|
|
3078
|
+
default: void 0
|
|
3079
|
+
},
|
|
3080
|
+
/**
|
|
3081
|
+
* Hide the actions
|
|
3082
|
+
*/
|
|
3083
|
+
hideActions: {
|
|
3084
|
+
type: Boolean,
|
|
3085
|
+
default: !1
|
|
3078
3086
|
},
|
|
3079
3087
|
/**
|
|
3080
3088
|
* Top offset for the slideout
|
|
@@ -3085,116 +3093,121 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3085
3093
|
}
|
|
3086
3094
|
},
|
|
3087
3095
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3088
|
-
setup(e, {
|
|
3089
|
-
var
|
|
3090
|
-
const
|
|
3091
|
-
var
|
|
3092
|
-
let
|
|
3093
|
-
return r.config.app === "konnect" ?
|
|
3094
|
-
}),
|
|
3095
|
-
|
|
3096
|
-
},
|
|
3097
|
-
r.config.cancelRoute ?
|
|
3098
|
-
}, I = () => {
|
|
3099
|
-
n("cancel");
|
|
3096
|
+
setup(e, { expose: t, emit: n }) {
|
|
3097
|
+
var D;
|
|
3098
|
+
const i = n, r = e, o = ni(), { i18n: { t: a } } = V.useI18n(), { getMessageFromError: l } = V.useErrors(), { axiosInstance: s } = V.useAxios((D = r.config) == null ? void 0 : D.axiosRequestConfig), c = R(!1), d = $(() => !!r.editId), u = R(!1), g = R(""), f = $(() => r.canSubmit === !1 || r.isReadonly), v = R(!1), y = $(() => {
|
|
3099
|
+
var k, h;
|
|
3100
|
+
let m = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3101
|
+
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((k = r.config) == null ? void 0 : k.controlPlaneId) || "") : r.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (h = r.config) != null && h.workspace ? `/${r.config.workspace}` : "")), r.editId ? (m = m.replace(/{id}/gi, r.editId), m) : (m = m.replace(/\/{id}/gi, ""), m);
|
|
3102
|
+
}), C = () => {
|
|
3103
|
+
v.value = !v.value;
|
|
3104
|
+
}, T = () => {
|
|
3105
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : b();
|
|
3100
3106
|
}, b = () => {
|
|
3101
|
-
|
|
3102
|
-
},
|
|
3107
|
+
i("cancel");
|
|
3108
|
+
}, F = () => {
|
|
3109
|
+
f.value || i("submit");
|
|
3110
|
+
}, E = R([
|
|
3103
3111
|
{
|
|
3104
|
-
title:
|
|
3112
|
+
title: a("baseForm.configuration.json"),
|
|
3105
3113
|
hash: "#json"
|
|
3106
3114
|
},
|
|
3107
3115
|
{
|
|
3108
|
-
title:
|
|
3116
|
+
title: a("baseForm.configuration.yaml"),
|
|
3109
3117
|
hash: "#yaml"
|
|
3110
3118
|
}
|
|
3111
3119
|
]);
|
|
3112
|
-
return r.config.app === "konnect" && r.entityType !== tt.Other &&
|
|
3113
|
-
title:
|
|
3120
|
+
return r.config.app === "konnect" && r.entityType !== tt.Other && E.value.splice(1, 0, {
|
|
3121
|
+
title: a("baseForm.configuration.terraform"),
|
|
3114
3122
|
hash: "#terraform"
|
|
3115
|
-
}), Ae(() =>
|
|
3116
|
-
|
|
3123
|
+
}), Ae(() => c.value, (m) => {
|
|
3124
|
+
i("loading", m);
|
|
3117
3125
|
}, { immediate: !0 }), et(async () => {
|
|
3118
3126
|
if (r.editId)
|
|
3119
3127
|
try {
|
|
3120
|
-
|
|
3121
|
-
const { data:
|
|
3122
|
-
|
|
3123
|
-
} catch (
|
|
3124
|
-
const
|
|
3125
|
-
|
|
3128
|
+
u.value = !1, c.value = !0;
|
|
3129
|
+
const { data: m } = await s.get(y.value);
|
|
3130
|
+
i("fetch:success", m);
|
|
3131
|
+
} catch (m) {
|
|
3132
|
+
const k = l(m);
|
|
3133
|
+
g.value = k.startsWith("code") ? a("baseForm.errors.edit") : k, u.value = !0, i("fetch:error", m);
|
|
3126
3134
|
} finally {
|
|
3127
|
-
|
|
3135
|
+
c.value = !1;
|
|
3128
3136
|
}
|
|
3129
|
-
}), (
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3137
|
+
}), t({
|
|
3138
|
+
viewConfig: C,
|
|
3139
|
+
formCancel: b,
|
|
3140
|
+
formSubmit: F
|
|
3141
|
+
}), (m, k) => {
|
|
3142
|
+
const h = U("KSkeleton"), x = U("KEmptyState"), K = U("KAlert"), O = U("KButton"), L = U("KTabs"), J = U("KSlideout");
|
|
3143
|
+
return p(), N(Ne(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3144
|
+
default: A(() => [
|
|
3145
|
+
c.value ? (p(), N(h, {
|
|
3134
3146
|
key: 0,
|
|
3135
3147
|
type: "form"
|
|
3136
|
-
})) :
|
|
3148
|
+
})) : u.value ? (p(), N(x, {
|
|
3137
3149
|
key: 1,
|
|
3138
|
-
"action-button-text":
|
|
3150
|
+
"action-button-text": w(a)("baseForm.actions.back"),
|
|
3139
3151
|
"data-testid": "form-fetch-error",
|
|
3140
3152
|
"icon-variant": "error",
|
|
3141
|
-
onClickAction:
|
|
3153
|
+
onClickAction: T
|
|
3142
3154
|
}, {
|
|
3143
|
-
default:
|
|
3144
|
-
|
|
3155
|
+
default: A(() => [
|
|
3156
|
+
B("h3", null, I(g.value), 1)
|
|
3145
3157
|
]),
|
|
3146
3158
|
_: 1
|
|
3147
|
-
}, 8, ["action-button-text"])) : (p(),
|
|
3159
|
+
}, 8, ["action-button-text"])) : (p(), S("form", {
|
|
3148
3160
|
key: 2,
|
|
3149
3161
|
"data-testid": "form-content",
|
|
3150
3162
|
novalidate: r.noValidate,
|
|
3151
|
-
onReset: Fe(
|
|
3152
|
-
onSubmit: Fe(
|
|
3163
|
+
onReset: Fe(b, ["prevent"]),
|
|
3164
|
+
onSubmit: Fe(F, ["prevent"])
|
|
3153
3165
|
}, [
|
|
3154
|
-
P(
|
|
3155
|
-
e.errorMessage ? (p(),
|
|
3166
|
+
P(m.$slots, "default", {}, void 0, !0),
|
|
3167
|
+
e.errorMessage ? (p(), N(K, {
|
|
3156
3168
|
key: 0,
|
|
3157
3169
|
appearance: "danger",
|
|
3158
3170
|
"data-testid": "form-error",
|
|
3159
3171
|
message: e.errorMessage
|
|
3160
|
-
}, null, 8, ["message"])) :
|
|
3161
|
-
(p(),
|
|
3172
|
+
}, null, 8, ["message"])) : M("", !0),
|
|
3173
|
+
e.hideActions ? M("", !0) : (p(), N(Dt, {
|
|
3174
|
+
key: 1,
|
|
3162
3175
|
disabled: !e.actionTeleportTarget,
|
|
3163
3176
|
to: e.actionTeleportTarget
|
|
3164
3177
|
}, [
|
|
3165
|
-
|
|
3166
|
-
P(
|
|
3167
|
-
j(
|
|
3178
|
+
B("div", Ho, [
|
|
3179
|
+
P(m.$slots, "form-actions", {}, () => [
|
|
3180
|
+
j(O, {
|
|
3168
3181
|
appearance: "tertiary",
|
|
3169
|
-
"data-testid": `${e.entityType}-${
|
|
3170
|
-
onClick:
|
|
3182
|
+
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3183
|
+
onClick: k[0] || (k[0] = (q) => C())
|
|
3171
3184
|
}, {
|
|
3172
|
-
default:
|
|
3173
|
-
|
|
3185
|
+
default: A(() => [
|
|
3186
|
+
H(I(w(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3174
3187
|
]),
|
|
3175
3188
|
_: 1
|
|
3176
3189
|
}, 8, ["data-testid"]),
|
|
3177
|
-
j(
|
|
3190
|
+
j(O, {
|
|
3178
3191
|
appearance: "secondary",
|
|
3179
|
-
"data-testid": `${e.entityType}-${
|
|
3192
|
+
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-cancel`,
|
|
3180
3193
|
disabled: e.isReadonly,
|
|
3181
3194
|
type: "reset",
|
|
3182
|
-
onClick:
|
|
3195
|
+
onClick: k[1] || (k[1] = (q) => !!e.actionTeleportTarget && b())
|
|
3183
3196
|
}, {
|
|
3184
|
-
default:
|
|
3185
|
-
|
|
3197
|
+
default: A(() => [
|
|
3198
|
+
H(I(w(a)("baseForm.actions.cancel")), 1)
|
|
3186
3199
|
]),
|
|
3187
3200
|
_: 1
|
|
3188
3201
|
}, 8, ["data-testid", "disabled"]),
|
|
3189
|
-
j(
|
|
3202
|
+
j(O, {
|
|
3190
3203
|
appearance: "primary",
|
|
3191
|
-
"data-testid": `${e.entityType}-${
|
|
3192
|
-
disabled:
|
|
3204
|
+
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3205
|
+
disabled: f.value,
|
|
3193
3206
|
type: "submit",
|
|
3194
|
-
onClick:
|
|
3207
|
+
onClick: k[2] || (k[2] = (q) => !!e.actionTeleportTarget && F())
|
|
3195
3208
|
}, {
|
|
3196
|
-
default:
|
|
3197
|
-
|
|
3209
|
+
default: A(() => [
|
|
3210
|
+
H(I(w(a)("baseForm.actions.save")), 1)
|
|
3198
3211
|
]),
|
|
3199
3212
|
_: 1
|
|
3200
3213
|
}, 8, ["data-testid", "disabled"])
|
|
@@ -3202,35 +3215,35 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3202
3215
|
])
|
|
3203
3216
|
], 8, ["disabled", "to"]))
|
|
3204
3217
|
], 40, qo)),
|
|
3205
|
-
j(
|
|
3218
|
+
j(J, {
|
|
3206
3219
|
"close-on-blur": !1,
|
|
3207
3220
|
"data-testid": "form-view-configuration-slideout",
|
|
3208
3221
|
"has-overlay": !1,
|
|
3209
3222
|
"offset-top": e.slidoutTopOffset,
|
|
3210
|
-
title:
|
|
3211
|
-
visible:
|
|
3212
|
-
onClose:
|
|
3223
|
+
title: w(a)("baseForm.configuration.title"),
|
|
3224
|
+
visible: v.value,
|
|
3225
|
+
onClose: k[3] || (k[3] = (q) => C())
|
|
3213
3226
|
}, {
|
|
3214
|
-
default:
|
|
3215
|
-
|
|
3216
|
-
j(
|
|
3227
|
+
default: A(() => [
|
|
3228
|
+
B("div", null, I(w(a)("baseForm.configuration.message")), 1),
|
|
3229
|
+
j(L, {
|
|
3217
3230
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3218
|
-
tabs:
|
|
3231
|
+
tabs: E.value
|
|
3219
3232
|
}, {
|
|
3220
|
-
json:
|
|
3233
|
+
json: A(() => [
|
|
3221
3234
|
j(zt, {
|
|
3222
3235
|
config: e.config,
|
|
3223
3236
|
"entity-record": r.formFields,
|
|
3224
|
-
"fetcher-url":
|
|
3237
|
+
"fetcher-url": y.value,
|
|
3225
3238
|
"request-method": r.editId ? "put" : "post"
|
|
3226
3239
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3227
3240
|
]),
|
|
3228
|
-
yaml:
|
|
3241
|
+
yaml: A(() => [
|
|
3229
3242
|
j(jn, {
|
|
3230
3243
|
"entity-record": r.formFields
|
|
3231
3244
|
}, null, 8, ["entity-record"])
|
|
3232
3245
|
]),
|
|
3233
|
-
terraform:
|
|
3246
|
+
terraform: A(() => [
|
|
3234
3247
|
j(Dn, {
|
|
3235
3248
|
"entity-record": r.formFields,
|
|
3236
3249
|
"entity-type": e.entityType
|
|
@@ -3246,7 +3259,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3246
3259
|
});
|
|
3247
3260
|
};
|
|
3248
3261
|
}
|
|
3249
|
-
}), ts = /* @__PURE__ */ ae(Yo, [["__scopeId", "data-v-
|
|
3262
|
+
}), ts = /* @__PURE__ */ ae(Yo, [["__scopeId", "data-v-e8247cfa"]]), Vo = ["data-truncate"], Wo = /* @__PURE__ */ W({
|
|
3250
3263
|
__name: "EntityBaseTableCell",
|
|
3251
3264
|
props: {
|
|
3252
3265
|
keyName: {
|
|
@@ -3263,64 +3276,64 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3263
3276
|
}
|
|
3264
3277
|
},
|
|
3265
3278
|
setup(e) {
|
|
3266
|
-
const t = e, n =
|
|
3279
|
+
const t = e, n = $(() => {
|
|
3267
3280
|
var C;
|
|
3268
3281
|
return ((C = t.rowEl) == null ? void 0 : C.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3269
|
-
}),
|
|
3282
|
+
}), i = $(() => {
|
|
3270
3283
|
var C;
|
|
3271
3284
|
return ((C = n.value) == null ? void 0 : C.querySelector('[data-truncate="true"]')) || null;
|
|
3272
|
-
}),
|
|
3273
|
-
var
|
|
3274
|
-
const C = (
|
|
3285
|
+
}), r = $(() => {
|
|
3286
|
+
var T, b;
|
|
3287
|
+
const C = (T = t.rowEl) == null ? void 0 : T.querySelectorAll("td");
|
|
3275
3288
|
return C ? ((b = C[0]) == null ? void 0 : b.getAttribute("data-testid")) === t.keyName : !0;
|
|
3276
|
-
}), o =
|
|
3289
|
+
}), o = $(() => r.value || t.tooltip);
|
|
3277
3290
|
let a;
|
|
3278
3291
|
const l = () => {
|
|
3279
3292
|
a && (a.disconnect(), a = void 0);
|
|
3280
3293
|
}, s = () => {
|
|
3281
|
-
var
|
|
3282
|
-
let C = ((
|
|
3294
|
+
var T, b, F;
|
|
3295
|
+
let C = ((T = n.value) == null ? void 0 : T.clientWidth) || 0;
|
|
3283
3296
|
if (n.value && "getComputedStyle" in window) {
|
|
3284
|
-
const
|
|
3285
|
-
C -= (parseFloat(
|
|
3297
|
+
const E = window.getComputedStyle(n.value);
|
|
3298
|
+
C -= (parseFloat(E.paddingLeft) || 0) + (parseFloat(E.paddingRight) || 0);
|
|
3286
3299
|
}
|
|
3287
|
-
d.value = ((b =
|
|
3288
|
-
}, c =
|
|
3300
|
+
d.value = ((b = i.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, u.value = C, g.value = ((F = c.value) == null ? void 0 : F.innerText) || "";
|
|
3301
|
+
}, c = R({}), d = R(0), u = R(0), g = R(""), f = $(() => [i.value, n.value]), v = Ae(
|
|
3289
3302
|
f,
|
|
3290
3303
|
(C) => {
|
|
3291
3304
|
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
3292
|
-
a = new ResizeObserver((
|
|
3305
|
+
a = new ResizeObserver((T) => {
|
|
3293
3306
|
window.requestAnimationFrame(() => {
|
|
3294
|
-
!Array.isArray(
|
|
3307
|
+
!Array.isArray(T) || !T.length || s();
|
|
3295
3308
|
});
|
|
3296
3309
|
});
|
|
3297
|
-
for (const
|
|
3298
|
-
|
|
3310
|
+
for (const T of C)
|
|
3311
|
+
T && a.observe(T);
|
|
3299
3312
|
}
|
|
3300
3313
|
},
|
|
3301
3314
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3302
|
-
), y =
|
|
3315
|
+
), y = $(() => o.value ? d.value > u.value : !1);
|
|
3303
3316
|
return Yn(() => {
|
|
3304
3317
|
s();
|
|
3305
3318
|
}), Vn(() => {
|
|
3306
3319
|
v();
|
|
3307
|
-
}), (C,
|
|
3320
|
+
}), (C, T) => {
|
|
3308
3321
|
const b = U("KTooltip");
|
|
3309
|
-
return p(),
|
|
3322
|
+
return p(), S("span", {
|
|
3310
3323
|
ref_key: "contentRef",
|
|
3311
3324
|
ref: c,
|
|
3312
3325
|
class: "content-wrapper"
|
|
3313
3326
|
}, [
|
|
3314
|
-
o.value ? (p(),
|
|
3327
|
+
o.value ? (p(), S("span", {
|
|
3315
3328
|
key: 0,
|
|
3316
3329
|
"data-truncate": o.value || void 0
|
|
3317
3330
|
}, [
|
|
3318
3331
|
j(b, {
|
|
3319
3332
|
"max-width": "300",
|
|
3320
3333
|
placement: "bottom-start",
|
|
3321
|
-
text: y.value ?
|
|
3334
|
+
text: y.value ? g.value : ""
|
|
3322
3335
|
}, {
|
|
3323
|
-
default:
|
|
3336
|
+
default: A(() => [
|
|
3324
3337
|
P(C.$slots, "default", {}, void 0, !0)
|
|
3325
3338
|
]),
|
|
3326
3339
|
_: 3
|
|
@@ -3335,7 +3348,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3335
3348
|
}, Qo = {
|
|
3336
3349
|
key: 0,
|
|
3337
3350
|
class: "hidden"
|
|
3338
|
-
}, Zo = /* @__PURE__ */
|
|
3351
|
+
}, Zo = /* @__PURE__ */ W({
|
|
3339
3352
|
__name: "EntityBaseTable",
|
|
3340
3353
|
props: {
|
|
3341
3354
|
// table header configuration
|
|
@@ -3464,7 +3477,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3464
3477
|
},
|
|
3465
3478
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3466
3479
|
setup(e, { emit: t }) {
|
|
3467
|
-
const n = e,
|
|
3480
|
+
const n = e, i = t, { i18n: { t: r } } = V.useI18n(), o = $(() => {
|
|
3468
3481
|
var h, x;
|
|
3469
3482
|
return typeof n.errorMessage == "string" ? {
|
|
3470
3483
|
hasError: !!n.errorMessage,
|
|
@@ -3475,15 +3488,15 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3475
3488
|
title: (h = n.errorMessage) == null ? void 0 : h.title,
|
|
3476
3489
|
message: (x = n.errorMessage) == null ? void 0 : x.message
|
|
3477
3490
|
};
|
|
3478
|
-
}), a =
|
|
3491
|
+
}), a = $(() => n.cacheIdentifier || n.preferencesStorageKey), l = $(() => {
|
|
3479
3492
|
const h = [];
|
|
3480
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3481
|
-
const
|
|
3493
|
+
return Object.keys(n.tableHeaders).forEach((K) => {
|
|
3494
|
+
const O = n.tableHeaders[K];
|
|
3482
3495
|
h.push({
|
|
3483
|
-
label:
|
|
3484
|
-
key:
|
|
3485
|
-
sortable:
|
|
3486
|
-
hidable:
|
|
3496
|
+
label: O.label ?? K,
|
|
3497
|
+
key: K,
|
|
3498
|
+
sortable: O.sortable ?? !1,
|
|
3499
|
+
hidable: O.hidable ?? !0
|
|
3487
3500
|
});
|
|
3488
3501
|
}), n.enableEntityActions && h.push({
|
|
3489
3502
|
key: "actions",
|
|
@@ -3493,7 +3506,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3493
3506
|
"data-rowid": h.id,
|
|
3494
3507
|
"data-testid": h.name,
|
|
3495
3508
|
...n.rowAttributes(h)
|
|
3496
|
-
}), c =
|
|
3509
|
+
}), c = R({}), d = (h) => {
|
|
3497
3510
|
var x;
|
|
3498
3511
|
return (x = c.value) == null ? void 0 : x.$el.querySelector(`[data-rowid="${h.id}"]`);
|
|
3499
3512
|
}, u = (h) => {
|
|
@@ -3506,46 +3519,46 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3506
3519
|
overflowX: "hidden",
|
|
3507
3520
|
textOverflow: "ellipsis"
|
|
3508
3521
|
}), x;
|
|
3509
|
-
},
|
|
3510
|
-
b(h),
|
|
3522
|
+
}, g = (h) => {
|
|
3523
|
+
b(h), i("state", h);
|
|
3511
3524
|
}, f = () => {
|
|
3512
|
-
|
|
3525
|
+
i("empty-state-cta-clicked"), v();
|
|
3513
3526
|
}, v = () => {
|
|
3514
|
-
|
|
3515
|
-
}, y =
|
|
3516
|
-
|
|
3527
|
+
i("clear-search-input");
|
|
3528
|
+
}, y = $(() => n.disableRowClick ? void 0 : (h, x) => {
|
|
3529
|
+
i("click:row", x);
|
|
3517
3530
|
}), C = (h) => {
|
|
3518
|
-
|
|
3519
|
-
}, { hideTableToolbar:
|
|
3520
|
-
const h =
|
|
3531
|
+
i("sort", h);
|
|
3532
|
+
}, { hideTableToolbar: T, handleStateChange: b } = V.useTableState(() => n.query), { setTablePreferences: F, getTablePreferences: E } = si(), D = R(E(a.value, n.defaultTablePreferences)), m = $(() => {
|
|
3533
|
+
const h = E(a.value);
|
|
3521
3534
|
return {
|
|
3522
3535
|
...n.initialFetcherParams,
|
|
3523
3536
|
...h
|
|
3524
3537
|
};
|
|
3525
|
-
}),
|
|
3526
|
-
|
|
3527
|
-
!("hidable" in x) || !
|
|
3528
|
-
}), a.value &&
|
|
3538
|
+
}), k = (h) => {
|
|
3539
|
+
D.value = h, l.value.forEach((x) => {
|
|
3540
|
+
!("hidable" in x) || !D.value.columnVisibility || x.hidable === !1 && (D.value.columnVisibility[x.key] = !0);
|
|
3541
|
+
}), a.value && F(a.value, h);
|
|
3529
3542
|
};
|
|
3530
3543
|
return (h, x) => {
|
|
3531
|
-
const
|
|
3532
|
-
return p(),
|
|
3544
|
+
const K = U("KTableData"), O = U("KCard");
|
|
3545
|
+
return p(), N(O, {
|
|
3533
3546
|
class: "kong-ui-entity-base-table",
|
|
3534
3547
|
title: e.title,
|
|
3535
3548
|
"title-tag": e.titleTag
|
|
3536
3549
|
}, {
|
|
3537
|
-
default:
|
|
3538
|
-
j(
|
|
3550
|
+
default: A(() => [
|
|
3551
|
+
j(K, {
|
|
3539
3552
|
ref_key: "tableRefs",
|
|
3540
3553
|
ref: c,
|
|
3541
3554
|
"cache-identifier": a.value,
|
|
3542
3555
|
"cell-attrs": u,
|
|
3543
3556
|
"client-sort": e.enableClientSort,
|
|
3544
|
-
"empty-state-action-message": e.query ?
|
|
3557
|
+
"empty-state-action-message": e.query ? w(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3545
3558
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3546
3559
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3547
|
-
"empty-state-message": e.query ?
|
|
3548
|
-
"empty-state-title": e.query ?
|
|
3560
|
+
"empty-state-message": e.query ? w(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3561
|
+
"empty-state-title": e.query ? w(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3549
3562
|
error: o.value.hasError,
|
|
3550
3563
|
"error-state-message": o.value.message,
|
|
3551
3564
|
"error-state-title": o.value.title,
|
|
@@ -3554,8 +3567,8 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3554
3567
|
headers: l.value,
|
|
3555
3568
|
"hide-pagination": e.hidePagination,
|
|
3556
3569
|
"hide-pagination-when-optional": "",
|
|
3557
|
-
"hide-toolbar": e.hideToolbar ??
|
|
3558
|
-
"initial-fetcher-params":
|
|
3570
|
+
"hide-toolbar": e.hideToolbar ?? w(T),
|
|
3571
|
+
"initial-fetcher-params": m.value,
|
|
3559
3572
|
loading: e.isLoading,
|
|
3560
3573
|
"pagination-attributes": { disablePageJump: e.disablePaginationPageJump, offset: e.paginationType === "offset" },
|
|
3561
3574
|
"resize-columns": "",
|
|
@@ -3564,48 +3577,48 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3564
3577
|
"search-input": e.query,
|
|
3565
3578
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3566
3579
|
sortable: !e.disableSorting,
|
|
3567
|
-
"table-preferences":
|
|
3580
|
+
"table-preferences": D.value,
|
|
3568
3581
|
onEmptyStateActionClick: f,
|
|
3569
3582
|
"onRow:click": y.value,
|
|
3570
|
-
onSort: x[0] || (x[0] = (
|
|
3571
|
-
onState:
|
|
3572
|
-
"onUpdate:tablePreferences":
|
|
3583
|
+
onSort: x[0] || (x[0] = (L) => C(L)),
|
|
3584
|
+
onState: g,
|
|
3585
|
+
"onUpdate:tablePreferences": k
|
|
3573
3586
|
}, Ce({
|
|
3574
|
-
toolbar:
|
|
3575
|
-
|
|
3587
|
+
toolbar: A(() => [
|
|
3588
|
+
B("div", Go, [
|
|
3576
3589
|
P(h.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3577
|
-
h.$slots["toolbar-button"] ? (p(),
|
|
3590
|
+
h.$slots["toolbar-button"] ? (p(), S("div", zo, [
|
|
3578
3591
|
P(h.$slots, "toolbar-button", {}, void 0, !0)
|
|
3579
|
-
])) :
|
|
3592
|
+
])) : M("", !0)
|
|
3580
3593
|
])
|
|
3581
3594
|
]),
|
|
3582
|
-
"action-items":
|
|
3583
|
-
P(h.$slots, "actions", { row:
|
|
3595
|
+
"action-items": A(({ row: L }) => [
|
|
3596
|
+
P(h.$slots, "actions", { row: L }, void 0, !0)
|
|
3584
3597
|
]),
|
|
3585
3598
|
_: 2
|
|
3586
3599
|
}, [
|
|
3587
3600
|
h.$slots["empty-state"] ? {
|
|
3588
3601
|
name: "empty-state",
|
|
3589
|
-
fn:
|
|
3602
|
+
fn: A(() => [
|
|
3590
3603
|
P(h.$slots, "empty-state", {}, void 0, !0)
|
|
3591
3604
|
]),
|
|
3592
3605
|
key: "0"
|
|
3593
3606
|
} : void 0,
|
|
3594
|
-
oe(e.tableHeaders, (
|
|
3595
|
-
name:
|
|
3596
|
-
fn:
|
|
3607
|
+
oe(e.tableHeaders, (L, J) => ({
|
|
3608
|
+
name: J,
|
|
3609
|
+
fn: A(({ row: q, rowValue: G }) => [
|
|
3597
3610
|
j(Jo, {
|
|
3598
|
-
"key-name": String(
|
|
3599
|
-
"row-el": d(
|
|
3600
|
-
tooltip:
|
|
3611
|
+
"key-name": String(J),
|
|
3612
|
+
"row-el": d(q),
|
|
3613
|
+
tooltip: L.tooltip
|
|
3601
3614
|
}, {
|
|
3602
|
-
default:
|
|
3603
|
-
P(h.$slots,
|
|
3604
|
-
row:
|
|
3615
|
+
default: A(() => [
|
|
3616
|
+
P(h.$slots, J, {
|
|
3617
|
+
row: q,
|
|
3605
3618
|
rowKey: e.rowKey,
|
|
3606
3619
|
rowValue: G
|
|
3607
3620
|
}, () => [
|
|
3608
|
-
|
|
3621
|
+
H(I(G), 1)
|
|
3609
3622
|
], !0)
|
|
3610
3623
|
]),
|
|
3611
3624
|
_: 2
|
|
@@ -3614,15 +3627,15 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3614
3627
|
})),
|
|
3615
3628
|
e.query ? void 0 : {
|
|
3616
3629
|
name: "empty-state-action-icon",
|
|
3617
|
-
fn:
|
|
3618
|
-
j(
|
|
3630
|
+
fn: A(() => [
|
|
3631
|
+
j(w(Pt))
|
|
3619
3632
|
]),
|
|
3620
3633
|
key: "1"
|
|
3621
3634
|
}
|
|
3622
3635
|
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"]),
|
|
3623
|
-
h.$slots["outside-actions"] &&
|
|
3636
|
+
h.$slots["outside-actions"] && w(T) ? (p(), S("div", Qo, [
|
|
3624
3637
|
P(h.$slots, "outside-actions", {}, void 0, !0)
|
|
3625
|
-
])) :
|
|
3638
|
+
])) : M("", !0)
|
|
3626
3639
|
]),
|
|
3627
3640
|
_: 3
|
|
3628
3641
|
}, 8, ["title", "title-tag"]);
|
|
@@ -3634,7 +3647,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3634
3647
|
}, el = {
|
|
3635
3648
|
key: 1,
|
|
3636
3649
|
class: "description"
|
|
3637
|
-
}, tl = /* @__PURE__ */
|
|
3650
|
+
}, tl = /* @__PURE__ */ W({
|
|
3638
3651
|
__name: "EntityDeleteModal",
|
|
3639
3652
|
props: {
|
|
3640
3653
|
visible: {
|
|
@@ -3673,14 +3686,14 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3673
3686
|
},
|
|
3674
3687
|
emits: ["cancel", "proceed"],
|
|
3675
3688
|
setup(e, { emit: t }) {
|
|
3676
|
-
const { i18nT: n } =
|
|
3677
|
-
|
|
3689
|
+
const { i18nT: n } = V.useI18n(), i = e, r = t, o = $(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
3690
|
+
r("cancel");
|
|
3678
3691
|
}, l = () => {
|
|
3679
|
-
|
|
3692
|
+
r("proceed");
|
|
3680
3693
|
};
|
|
3681
3694
|
return (s, c) => {
|
|
3682
3695
|
const d = U("KAlert"), u = U("KPrompt");
|
|
3683
|
-
return p(),
|
|
3696
|
+
return p(), N(u, {
|
|
3684
3697
|
"action-button-appearance": "danger",
|
|
3685
3698
|
"action-button-disabled": e.actionPending,
|
|
3686
3699
|
"action-button-text": "Yes, delete",
|
|
@@ -3691,50 +3704,50 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3691
3704
|
onCancel: a,
|
|
3692
3705
|
onProceed: l
|
|
3693
3706
|
}, {
|
|
3694
|
-
default:
|
|
3695
|
-
e.error ? (p(),
|
|
3707
|
+
default: A(() => [
|
|
3708
|
+
e.error ? (p(), S("div", Xo, [
|
|
3696
3709
|
j(d, { appearance: "danger" }, {
|
|
3697
|
-
default:
|
|
3698
|
-
|
|
3710
|
+
default: A(() => [
|
|
3711
|
+
H(I(e.error), 1)
|
|
3699
3712
|
]),
|
|
3700
3713
|
_: 1
|
|
3701
3714
|
})
|
|
3702
|
-
])) :
|
|
3703
|
-
j(
|
|
3715
|
+
])) : M("", !0),
|
|
3716
|
+
j(w(n), {
|
|
3704
3717
|
class: "message",
|
|
3705
|
-
keypath:
|
|
3718
|
+
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3706
3719
|
tag: "p"
|
|
3707
3720
|
}, Ce({
|
|
3708
|
-
entityType:
|
|
3709
|
-
|
|
3721
|
+
entityType: A(() => [
|
|
3722
|
+
H(I(i.entityType), 1)
|
|
3710
3723
|
]),
|
|
3711
3724
|
_: 2
|
|
3712
3725
|
}, [
|
|
3713
|
-
|
|
3726
|
+
i.entityName ? {
|
|
3714
3727
|
name: "entityName",
|
|
3715
|
-
fn:
|
|
3716
|
-
|
|
3728
|
+
fn: A(() => [
|
|
3729
|
+
B("strong", null, I(i.entityName), 1)
|
|
3717
3730
|
]),
|
|
3718
3731
|
key: "0"
|
|
3719
3732
|
} : void 0
|
|
3720
3733
|
]), 1032, ["keypath"]),
|
|
3721
|
-
|
|
3734
|
+
i.description || s.$slots.description ? (p(), S("div", el, [
|
|
3722
3735
|
P(s.$slots, "description", {}, () => [
|
|
3723
|
-
|
|
3736
|
+
B("p", null, I(i.description), 1)
|
|
3724
3737
|
], !0)
|
|
3725
|
-
])) :
|
|
3738
|
+
])) : M("", !0)
|
|
3726
3739
|
]),
|
|
3727
3740
|
_: 3
|
|
3728
3741
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3729
3742
|
};
|
|
3730
3743
|
}
|
|
3731
|
-
}),
|
|
3744
|
+
}), is = /* @__PURE__ */ ae(tl, [["__scopeId", "data-v-4361d622"]]), nl = {
|
|
3732
3745
|
fill: "none",
|
|
3733
3746
|
height: "20",
|
|
3734
3747
|
viewBox: "0 0 20 20",
|
|
3735
3748
|
width: "20",
|
|
3736
3749
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3737
|
-
},
|
|
3750
|
+
}, il = {
|
|
3738
3751
|
id: "mask0_180_20349",
|
|
3739
3752
|
height: "20",
|
|
3740
3753
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3742,25 +3755,25 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3742
3755
|
width: "20",
|
|
3743
3756
|
x: "0",
|
|
3744
3757
|
y: "0"
|
|
3745
|
-
},
|
|
3758
|
+
}, rl = ["fill"], al = { mask: "url(#mask0_180_20349)" }, ol = ["fill"], Bt = /* @__PURE__ */ W({
|
|
3746
3759
|
__name: "IconFilter",
|
|
3747
3760
|
props: {
|
|
3748
3761
|
color: {
|
|
3749
3762
|
type: String,
|
|
3750
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3763
|
+
default: `var(--kong-ui-entity-filter-color, ${qi})`
|
|
3751
3764
|
}
|
|
3752
3765
|
},
|
|
3753
3766
|
setup(e) {
|
|
3754
|
-
return (t, n) => (p(),
|
|
3755
|
-
|
|
3756
|
-
|
|
3767
|
+
return (t, n) => (p(), S("svg", nl, [
|
|
3768
|
+
B("mask", il, [
|
|
3769
|
+
B("rect", {
|
|
3757
3770
|
fill: e.color,
|
|
3758
3771
|
height: "20",
|
|
3759
3772
|
width: "20"
|
|
3760
|
-
}, null, 8,
|
|
3773
|
+
}, null, 8, rl)
|
|
3761
3774
|
]),
|
|
3762
|
-
|
|
3763
|
-
|
|
3775
|
+
B("g", al, [
|
|
3776
|
+
B("path", {
|
|
3764
3777
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3765
3778
|
fill: e.color
|
|
3766
3779
|
}, null, 8, ol)
|
|
@@ -3770,7 +3783,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3770
3783
|
}), ll = {
|
|
3771
3784
|
key: 1,
|
|
3772
3785
|
class: "kong-ui-entity-filter"
|
|
3773
|
-
}, sl = { class: "kong-ui-entity-filter-menu" }, cl = ["data-testid"], ul = ["onClick", "onKeydown"], dl = { class: "menu-item-indicator" }, fl = { class: "menu-item-body" }, pl = ["for"], ml = { class: "menu-item-buttons" }, hl = { class: "filter-clear-button-container" }, gl = /* @__PURE__ */
|
|
3786
|
+
}, sl = { class: "kong-ui-entity-filter-menu" }, cl = ["data-testid"], ul = ["onClick", "onKeydown"], dl = { class: "menu-item-indicator" }, fl = { class: "menu-item-body" }, pl = ["for"], ml = { class: "menu-item-buttons" }, hl = { class: "filter-clear-button-container" }, gl = /* @__PURE__ */ W({
|
|
3774
3787
|
__name: "EntityFilter",
|
|
3775
3788
|
props: {
|
|
3776
3789
|
// filter config, either exact match or fuzzy match
|
|
@@ -3790,71 +3803,71 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3790
3803
|
},
|
|
3791
3804
|
emits: ["update:modelValue"],
|
|
3792
3805
|
setup(e, { emit: t }) {
|
|
3793
|
-
const { i18n: { t: n } } =
|
|
3794
|
-
const
|
|
3795
|
-
return new URLSearchParams(
|
|
3796
|
-
|
|
3797
|
-
}),
|
|
3798
|
-
}), c =
|
|
3799
|
-
const
|
|
3800
|
-
return Object.keys(
|
|
3801
|
-
var
|
|
3802
|
-
return (
|
|
3803
|
-
}).map((
|
|
3804
|
-
label:
|
|
3805
|
-
value:
|
|
3806
|
+
const { i18n: { t: n } } = V.useI18n(), i = e, r = t, o = R(!1), a = R({}), l = R(/* @__PURE__ */ new Set()), s = $(() => {
|
|
3807
|
+
const E = [];
|
|
3808
|
+
return new URLSearchParams(i.modelValue).forEach((D, m) => {
|
|
3809
|
+
D !== "" && E.push(m);
|
|
3810
|
+
}), E;
|
|
3811
|
+
}), c = $(() => {
|
|
3812
|
+
const E = i.config.fields;
|
|
3813
|
+
return Object.keys(E).filter((D) => {
|
|
3814
|
+
var m;
|
|
3815
|
+
return (m = E == null ? void 0 : E[D]) == null ? void 0 : m.searchable;
|
|
3816
|
+
}).map((D) => ({
|
|
3817
|
+
label: E[D].label || D,
|
|
3818
|
+
value: D,
|
|
3806
3819
|
expanded: !1
|
|
3807
3820
|
}));
|
|
3808
3821
|
});
|
|
3809
|
-
Ae(() =>
|
|
3810
|
-
a.value = {}, new URLSearchParams(
|
|
3811
|
-
a.value[
|
|
3822
|
+
Ae(() => i.modelValue, (E) => {
|
|
3823
|
+
a.value = {}, new URLSearchParams(E).forEach((D, m) => {
|
|
3824
|
+
a.value[m] = D;
|
|
3812
3825
|
});
|
|
3813
3826
|
});
|
|
3814
3827
|
const d = () => {
|
|
3815
3828
|
o.value = !o.value;
|
|
3816
|
-
}, u = (
|
|
3817
|
-
l.value.has(
|
|
3818
|
-
},
|
|
3819
|
-
|
|
3829
|
+
}, u = (E) => {
|
|
3830
|
+
l.value.has(E) ? l.value.delete(E) : l.value.add(E);
|
|
3831
|
+
}, g = (E) => {
|
|
3832
|
+
r("update:modelValue", E);
|
|
3820
3833
|
}, f = () => {
|
|
3821
|
-
|
|
3822
|
-
}, v = (
|
|
3823
|
-
var
|
|
3824
|
-
return (((
|
|
3825
|
-
value:
|
|
3826
|
-
label:
|
|
3834
|
+
g("");
|
|
3835
|
+
}, v = (E) => `filter-${E}`, y = (E) => {
|
|
3836
|
+
var D, m;
|
|
3837
|
+
return (((m = (D = i.config.schema) == null ? void 0 : D[E]) == null ? void 0 : m.values) ?? []).map((k) => ({
|
|
3838
|
+
value: k,
|
|
3839
|
+
label: k
|
|
3827
3840
|
}));
|
|
3828
|
-
}, C = (
|
|
3829
|
-
var
|
|
3830
|
-
return ((
|
|
3831
|
-
},
|
|
3841
|
+
}, C = (E) => {
|
|
3842
|
+
var D, m;
|
|
3843
|
+
return ((m = (D = i.config.schema) == null ? void 0 : D[E]) == null ? void 0 : m.type) ?? "text";
|
|
3844
|
+
}, T = (E) => {
|
|
3832
3845
|
a.value = {
|
|
3833
3846
|
...a.value,
|
|
3834
|
-
[
|
|
3835
|
-
},
|
|
3847
|
+
[E]: ""
|
|
3848
|
+
}, F();
|
|
3836
3849
|
}, b = () => {
|
|
3837
|
-
a.value = {},
|
|
3838
|
-
},
|
|
3839
|
-
const
|
|
3840
|
-
|
|
3850
|
+
a.value = {}, F(!0);
|
|
3851
|
+
}, F = (E = !1) => {
|
|
3852
|
+
const D = Object.keys(a.value).reduce((m, k) => (a.value[k] && (m[k] = `${a.value[k]}`), m), {});
|
|
3853
|
+
E && (o.value = !1), r("update:modelValue", new URLSearchParams(D).toString());
|
|
3841
3854
|
};
|
|
3842
|
-
return (
|
|
3843
|
-
const
|
|
3844
|
-
return e.config.isExactMatch ? (p(),
|
|
3855
|
+
return (E, D) => {
|
|
3856
|
+
const m = U("KInput"), k = U("KButton"), h = U("KSelect");
|
|
3857
|
+
return e.config.isExactMatch ? (p(), N(m, {
|
|
3845
3858
|
key: 0,
|
|
3846
3859
|
autocomplete: "off",
|
|
3847
3860
|
class: "kong-ui-entity-filter-input",
|
|
3848
3861
|
"data-testid": "search-input",
|
|
3849
3862
|
"model-value": e.modelValue,
|
|
3850
3863
|
placeholder: e.config.placeholder,
|
|
3851
|
-
"onUpdate:modelValue":
|
|
3864
|
+
"onUpdate:modelValue": g
|
|
3852
3865
|
}, {
|
|
3853
|
-
before:
|
|
3866
|
+
before: A(() => [
|
|
3854
3867
|
j(Bt)
|
|
3855
3868
|
]),
|
|
3856
|
-
after:
|
|
3857
|
-
he(j(
|
|
3869
|
+
after: A(() => [
|
|
3870
|
+
he(j(w(Xn), {
|
|
3858
3871
|
class: "kong-ui-entity-filter-clear",
|
|
3859
3872
|
role: "button",
|
|
3860
3873
|
tabindex: "0",
|
|
@@ -3864,92 +3877,92 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3864
3877
|
])
|
|
3865
3878
|
]),
|
|
3866
3879
|
_: 1
|
|
3867
|
-
}, 8, ["model-value", "placeholder"])) : (p(),
|
|
3868
|
-
j(
|
|
3880
|
+
}, 8, ["model-value", "placeholder"])) : (p(), S("div", ll, [
|
|
3881
|
+
j(k, {
|
|
3869
3882
|
appearance: "tertiary",
|
|
3870
3883
|
"data-testid": "filter-button",
|
|
3871
3884
|
onClick: d
|
|
3872
3885
|
}, {
|
|
3873
|
-
default:
|
|
3886
|
+
default: A(() => [
|
|
3874
3887
|
j(Bt),
|
|
3875
|
-
|
|
3888
|
+
H(" " + I(w(n)("filter.filterButtonText")) + " " + I(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
3876
3889
|
]),
|
|
3877
3890
|
_: 1
|
|
3878
3891
|
}),
|
|
3879
|
-
he(
|
|
3892
|
+
he(B("div", {
|
|
3880
3893
|
class: "kong-ui-entity-filter-backdrop",
|
|
3881
3894
|
onClick: d
|
|
3882
3895
|
}, null, 512), [
|
|
3883
3896
|
[ge, o.value]
|
|
3884
3897
|
]),
|
|
3885
|
-
he(
|
|
3886
|
-
(p(!0),
|
|
3887
|
-
var
|
|
3888
|
-
return p(),
|
|
3898
|
+
he(B("div", sl, [
|
|
3899
|
+
(p(!0), S(le, null, oe(c.value, (x) => {
|
|
3900
|
+
var K, O;
|
|
3901
|
+
return p(), S("div", {
|
|
3889
3902
|
key: x.value,
|
|
3890
3903
|
class: "kong-ui-entity-filter-menu-item",
|
|
3891
3904
|
"data-testid": x.value
|
|
3892
3905
|
}, [
|
|
3893
|
-
|
|
3906
|
+
B("span", {
|
|
3894
3907
|
class: ce(["menu-item-title", { expanded: l.value.has(x.value) }]),
|
|
3895
3908
|
role: "button",
|
|
3896
3909
|
tabindex: "0",
|
|
3897
|
-
onClick: (
|
|
3898
|
-
onKeydown: Wn((
|
|
3910
|
+
onClick: (L) => u(x.value),
|
|
3911
|
+
onKeydown: Wn((L) => u(x.value), ["enter"])
|
|
3899
3912
|
}, [
|
|
3900
|
-
|
|
3901
|
-
he(
|
|
3913
|
+
H(I(x.label) + " ", 1),
|
|
3914
|
+
he(B("span", dl, null, 512), [
|
|
3902
3915
|
[ge, s.value.includes(x.value)]
|
|
3903
3916
|
]),
|
|
3904
|
-
j(
|
|
3917
|
+
j(w(ei), {
|
|
3905
3918
|
class: ce(["menu-item-expand-icon", { expanded: l.value.has(x.value) }]),
|
|
3906
|
-
color:
|
|
3919
|
+
color: w(Yi)
|
|
3907
3920
|
}, null, 8, ["class", "color"])
|
|
3908
3921
|
], 42, ul),
|
|
3909
|
-
he(
|
|
3910
|
-
|
|
3922
|
+
he(B("div", fl, [
|
|
3923
|
+
B("label", {
|
|
3911
3924
|
class: "menu-item-label",
|
|
3912
3925
|
for: v(x.value)
|
|
3913
|
-
},
|
|
3914
|
-
((
|
|
3926
|
+
}, I(w(n)("filter.fieldLabel")), 9, pl),
|
|
3927
|
+
((O = (K = e.config.schema) == null ? void 0 : K[x.value]) == null ? void 0 : O.type) === "select" ? (p(), N(h, {
|
|
3915
3928
|
key: 0,
|
|
3916
3929
|
id: v(x.value),
|
|
3917
3930
|
modelValue: a.value[x.value],
|
|
3918
|
-
"onUpdate:modelValue": (
|
|
3931
|
+
"onUpdate:modelValue": (L) => a.value[x.value] = L,
|
|
3919
3932
|
items: y(x.value),
|
|
3920
|
-
placeholder:
|
|
3921
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (p(),
|
|
3933
|
+
placeholder: w(n)("filter.selectPlaceholder")
|
|
3934
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (p(), N(m, {
|
|
3922
3935
|
key: 1,
|
|
3923
3936
|
id: v(x.value),
|
|
3924
3937
|
modelValue: a.value[x.value],
|
|
3925
|
-
"onUpdate:modelValue": (
|
|
3938
|
+
"onUpdate:modelValue": (L) => a.value[x.value] = L,
|
|
3926
3939
|
autocomplete: "off",
|
|
3927
|
-
placeholder:
|
|
3940
|
+
placeholder: w(n)("filter.inputPlaceholder"),
|
|
3928
3941
|
type: C(x.value)
|
|
3929
3942
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3930
3943
|
], 512), [
|
|
3931
3944
|
[ge, l.value.has(x.value)]
|
|
3932
3945
|
]),
|
|
3933
|
-
he(
|
|
3934
|
-
j(
|
|
3946
|
+
he(B("div", ml, [
|
|
3947
|
+
j(k, {
|
|
3935
3948
|
appearance: "tertiary",
|
|
3936
3949
|
"data-testid": "apply-filter",
|
|
3937
3950
|
size: "small",
|
|
3938
|
-
onClick:
|
|
3951
|
+
onClick: D[0] || (D[0] = (L) => F(!0))
|
|
3939
3952
|
}, {
|
|
3940
|
-
default:
|
|
3941
|
-
|
|
3953
|
+
default: A(() => [
|
|
3954
|
+
H(I(w(n)("filter.applyButtonText")), 1)
|
|
3942
3955
|
]),
|
|
3943
3956
|
_: 1
|
|
3944
3957
|
}),
|
|
3945
|
-
j(
|
|
3958
|
+
j(k, {
|
|
3946
3959
|
appearance: "tertiary",
|
|
3947
3960
|
"data-testid": "clear-filter",
|
|
3948
3961
|
size: "small",
|
|
3949
|
-
onClick: (
|
|
3962
|
+
onClick: (L) => T(x.value)
|
|
3950
3963
|
}, {
|
|
3951
|
-
default:
|
|
3952
|
-
|
|
3964
|
+
default: A(() => [
|
|
3965
|
+
H(I(w(n)("filter.clearButtonText")), 1)
|
|
3953
3966
|
]),
|
|
3954
3967
|
_: 2
|
|
3955
3968
|
}, 1032, ["onClick"])
|
|
@@ -3958,14 +3971,14 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3958
3971
|
])
|
|
3959
3972
|
], 8, cl);
|
|
3960
3973
|
}), 128)),
|
|
3961
|
-
|
|
3962
|
-
j(
|
|
3974
|
+
B("div", hl, [
|
|
3975
|
+
j(k, {
|
|
3963
3976
|
appearance: "tertiary",
|
|
3964
3977
|
size: "small",
|
|
3965
3978
|
onClick: b
|
|
3966
3979
|
}, {
|
|
3967
|
-
default:
|
|
3968
|
-
|
|
3980
|
+
default: A(() => [
|
|
3981
|
+
H(I(w(n)("filter.clearAllButtonText")), 1)
|
|
3969
3982
|
]),
|
|
3970
3983
|
_: 1
|
|
3971
3984
|
})
|
|
@@ -3976,7 +3989,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
3976
3989
|
]));
|
|
3977
3990
|
};
|
|
3978
3991
|
}
|
|
3979
|
-
}),
|
|
3992
|
+
}), rs = /* @__PURE__ */ ae(gl, [["__scopeId", "data-v-10fa27a5"]]), as = /* @__PURE__ */ W({
|
|
3980
3993
|
__name: "EntityToggleModal",
|
|
3981
3994
|
props: {
|
|
3982
3995
|
visible: {
|
|
@@ -4008,15 +4021,15 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
4008
4021
|
},
|
|
4009
4022
|
emits: ["cancel", "proceed"],
|
|
4010
4023
|
setup(e, { emit: t }) {
|
|
4011
|
-
const { i18n: { t: n }, i18nT:
|
|
4012
|
-
() =>
|
|
4013
|
-
), s =
|
|
4014
|
-
() =>
|
|
4024
|
+
const { i18n: { t: n }, i18nT: i } = V.useI18n(), r = e, o = t, a = R(!1), l = $(
|
|
4025
|
+
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4026
|
+
), s = $(
|
|
4027
|
+
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4015
4028
|
), c = () => o("cancel"), d = async () => {
|
|
4016
|
-
if (
|
|
4029
|
+
if (r.onConfirm) {
|
|
4017
4030
|
a.value = !0;
|
|
4018
4031
|
try {
|
|
4019
|
-
await
|
|
4032
|
+
await r.onConfirm(), o("proceed");
|
|
4020
4033
|
} catch (u) {
|
|
4021
4034
|
console.error(u);
|
|
4022
4035
|
} finally {
|
|
@@ -4024,9 +4037,9 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
4024
4037
|
}
|
|
4025
4038
|
}
|
|
4026
4039
|
};
|
|
4027
|
-
return (u,
|
|
4040
|
+
return (u, g) => {
|
|
4028
4041
|
const f = U("KPrompt");
|
|
4029
|
-
return p(),
|
|
4042
|
+
return p(), N(Dt, { to: "body" }, [
|
|
4030
4043
|
j(f, {
|
|
4031
4044
|
"action-button-disabled": a.value,
|
|
4032
4045
|
"action-button-text": s.value,
|
|
@@ -4036,16 +4049,16 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
4036
4049
|
onCancel: c,
|
|
4037
4050
|
onProceed: d
|
|
4038
4051
|
}, {
|
|
4039
|
-
default:
|
|
4040
|
-
j(
|
|
4041
|
-
keypath: `toggleModal.${
|
|
4052
|
+
default: A(() => [
|
|
4053
|
+
j(w(i), {
|
|
4054
|
+
keypath: `toggleModal.${r.action}.message`,
|
|
4042
4055
|
scope: "global"
|
|
4043
4056
|
}, {
|
|
4044
|
-
entityType:
|
|
4045
|
-
|
|
4057
|
+
entityType: A(() => [
|
|
4058
|
+
H(I(e.entityType), 1)
|
|
4046
4059
|
]),
|
|
4047
|
-
entityName:
|
|
4048
|
-
|
|
4060
|
+
entityName: A(() => [
|
|
4061
|
+
B("strong", null, I(e.entityName), 1)
|
|
4049
4062
|
]),
|
|
4050
4063
|
_: 1
|
|
4051
4064
|
}, 8, ["keypath"])
|
|
@@ -4055,7 +4068,7 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
4055
4068
|
]);
|
|
4056
4069
|
};
|
|
4057
4070
|
}
|
|
4058
|
-
}), os = /* @__PURE__ */
|
|
4071
|
+
}), os = /* @__PURE__ */ W({
|
|
4059
4072
|
__name: "PermissionsWrapper",
|
|
4060
4073
|
props: {
|
|
4061
4074
|
/**
|
|
@@ -4077,13 +4090,13 @@ const Fo = { class: "yaml-config config-card-code-block" }, jn = /* @__PURE__ */
|
|
|
4077
4090
|
}
|
|
4078
4091
|
},
|
|
4079
4092
|
setup(e) {
|
|
4080
|
-
const t = e, n =
|
|
4093
|
+
const t = e, n = R(void 0), i = $(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4081
4094
|
return Ae(() => t.authFunction, async () => {
|
|
4082
4095
|
n.value = await t.authFunction();
|
|
4083
|
-
}, { immediate: !0 }), (
|
|
4096
|
+
}, { immediate: !0 }), (r, o) => i.value ? P(r.$slots, "default", {
|
|
4084
4097
|
key: 0,
|
|
4085
4098
|
isAllowed: n.value
|
|
4086
|
-
}) :
|
|
4099
|
+
}) : M("", !0);
|
|
4087
4100
|
}
|
|
4088
4101
|
});
|
|
4089
4102
|
var Z = [];
|
|
@@ -4106,8 +4119,8 @@ function Cl(e, t, n) {
|
|
|
4106
4119
|
if (Kt.randomUUID && !t && !e)
|
|
4107
4120
|
return Kt.randomUUID();
|
|
4108
4121
|
e = e || {};
|
|
4109
|
-
var
|
|
4110
|
-
return
|
|
4122
|
+
var i = e.random || (e.rng || bl)();
|
|
4123
|
+
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, yl(i);
|
|
4111
4124
|
}
|
|
4112
4125
|
const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
4113
4126
|
key: 1,
|
|
@@ -4115,7 +4128,7 @@ const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
|
4115
4128
|
}, _l = {
|
|
4116
4129
|
key: 2,
|
|
4117
4130
|
class: "form-section-footer"
|
|
4118
|
-
}, Sl = { class: "form-section-content" }, $l = /* @__PURE__ */
|
|
4131
|
+
}, Sl = { class: "form-section-content" }, $l = /* @__PURE__ */ W({
|
|
4119
4132
|
__name: "EntityFormSection",
|
|
4120
4133
|
props: {
|
|
4121
4134
|
title: {
|
|
@@ -4145,37 +4158,37 @@ const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
|
4145
4158
|
},
|
|
4146
4159
|
setup(e) {
|
|
4147
4160
|
const t = Xe(), n = Cl();
|
|
4148
|
-
return (
|
|
4149
|
-
"aria-labelledby": e.title ?
|
|
4161
|
+
return (i, r) => (p(), S("div", {
|
|
4162
|
+
"aria-labelledby": e.title ? w(n) : void 0,
|
|
4150
4163
|
class: ce(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4151
4164
|
role: "group"
|
|
4152
4165
|
}, [
|
|
4153
|
-
|
|
4154
|
-
e.hideInfoHeader ?
|
|
4166
|
+
B("div", Al, [
|
|
4167
|
+
e.hideInfoHeader ? M("", !0) : (p(), S("div", {
|
|
4155
4168
|
key: 0,
|
|
4156
4169
|
class: ce(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4157
4170
|
}, [
|
|
4158
|
-
e.title ? (p(),
|
|
4171
|
+
e.title ? (p(), N(Ne(e.titleTag), {
|
|
4159
4172
|
key: 0,
|
|
4160
|
-
id:
|
|
4173
|
+
id: w(n),
|
|
4161
4174
|
class: "form-section-title"
|
|
4162
4175
|
}, {
|
|
4163
|
-
default:
|
|
4164
|
-
|
|
4176
|
+
default: A(() => [
|
|
4177
|
+
H(I(e.title), 1)
|
|
4165
4178
|
]),
|
|
4166
4179
|
_: 1
|
|
4167
|
-
}, 8, ["id"])) :
|
|
4168
|
-
e.description ||
|
|
4169
|
-
P(
|
|
4170
|
-
|
|
4180
|
+
}, 8, ["id"])) : M("", !0),
|
|
4181
|
+
e.description || w(t).description ? (p(), S("div", wl, [
|
|
4182
|
+
P(i.$slots, "description", {}, () => [
|
|
4183
|
+
B("p", null, I(e.description), 1)
|
|
4171
4184
|
], !0)
|
|
4172
|
-
])) :
|
|
4173
|
-
|
|
4174
|
-
P(
|
|
4175
|
-
])) :
|
|
4185
|
+
])) : M("", !0),
|
|
4186
|
+
w(t).footer ? (p(), S("div", _l, [
|
|
4187
|
+
P(i.$slots, "footer", {}, void 0, !0)
|
|
4188
|
+
])) : M("", !0)
|
|
4176
4189
|
], 2)),
|
|
4177
|
-
|
|
4178
|
-
P(
|
|
4190
|
+
B("div", Sl, [
|
|
4191
|
+
P(i.$slots, "default", {}, void 0, !0)
|
|
4179
4192
|
])
|
|
4180
4193
|
])
|
|
4181
4194
|
], 10, kl));
|
|
@@ -4186,7 +4199,7 @@ const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
|
4186
4199
|
}, Il = {
|
|
4187
4200
|
key: 0,
|
|
4188
4201
|
class: "deleted-entity"
|
|
4189
|
-
}, El = { key: 1 }, Fl = ["onClick"], Ol = /* @__PURE__ */
|
|
4202
|
+
}, El = { key: 1 }, Fl = ["onClick"], Ol = /* @__PURE__ */ W({
|
|
4190
4203
|
__name: "EntityLink",
|
|
4191
4204
|
props: {
|
|
4192
4205
|
entityLinkData: {
|
|
@@ -4210,62 +4223,62 @@ const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
|
4210
4223
|
}
|
|
4211
4224
|
},
|
|
4212
4225
|
setup(e) {
|
|
4213
|
-
const t = e, n =
|
|
4226
|
+
const t = e, n = R(), { isTruncated: i } = V.useTruncationDetector(n), { i18n: { t: r } } = V.useI18n(), o = r("global.actions.copyId"), a = R(o), l = $(() => t.entityLinkData.deleted ?? !1), s = $(() => {
|
|
4214
4227
|
var u;
|
|
4215
4228
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4216
|
-
}), c =
|
|
4229
|
+
}), c = $(() => {
|
|
4217
4230
|
var u;
|
|
4218
4231
|
return `${(u = s.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4219
4232
|
}), d = async (u) => {
|
|
4220
|
-
await u(s.value || "") && (a.value =
|
|
4233
|
+
await u(s.value || "") && (a.value = r("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4221
4234
|
a.value = o;
|
|
4222
4235
|
}, 1800));
|
|
4223
4236
|
};
|
|
4224
|
-
return (u,
|
|
4237
|
+
return (u, g) => {
|
|
4225
4238
|
const f = U("KTooltip"), v = U("KExternalLink"), y = U("KClipboardProvider");
|
|
4226
|
-
return p(),
|
|
4227
|
-
l.value ? (p(),
|
|
4239
|
+
return p(), S("div", Tl, [
|
|
4240
|
+
l.value ? (p(), S("div", Il, I(c.value), 1)) : s.value ? s.value ? (p(), N(v, {
|
|
4228
4241
|
key: 2,
|
|
4229
4242
|
class: "entity-link",
|
|
4230
4243
|
"hide-icon": !e.newWindow,
|
|
4231
4244
|
href: e.externalLink,
|
|
4232
4245
|
target: e.newWindow ? "_blank" : "_self"
|
|
4233
4246
|
}, {
|
|
4234
|
-
default:
|
|
4247
|
+
default: A(() => [
|
|
4235
4248
|
j(f, {
|
|
4236
|
-
text:
|
|
4249
|
+
text: w(i) && e.entityLinkData.label || ""
|
|
4237
4250
|
}, {
|
|
4238
|
-
default:
|
|
4239
|
-
|
|
4251
|
+
default: A(() => [
|
|
4252
|
+
B("span", {
|
|
4240
4253
|
ref_key: "textContent",
|
|
4241
4254
|
ref: n,
|
|
4242
4255
|
class: "entity-link-label"
|
|
4243
|
-
},
|
|
4256
|
+
}, I(e.entityLinkData.label), 513)
|
|
4244
4257
|
]),
|
|
4245
4258
|
_: 1
|
|
4246
4259
|
}, 8, ["text"])
|
|
4247
4260
|
]),
|
|
4248
4261
|
_: 1
|
|
4249
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4250
|
-
s.value && e.allowCopy ? (p(),
|
|
4262
|
+
}, 8, ["hide-icon", "href", "target"])) : M("", !0) : (p(), S("div", El, I(" – "))),
|
|
4263
|
+
s.value && e.allowCopy ? (p(), N(f, {
|
|
4251
4264
|
key: a.value,
|
|
4252
4265
|
class: "copy-uuid-tooltip",
|
|
4253
4266
|
"max-width": "160",
|
|
4254
4267
|
placement: "bottom-end",
|
|
4255
4268
|
text: a.value
|
|
4256
4269
|
}, {
|
|
4257
|
-
default:
|
|
4270
|
+
default: A(() => [
|
|
4258
4271
|
j(y, null, {
|
|
4259
|
-
default:
|
|
4260
|
-
|
|
4272
|
+
default: A(({ copyToClipboard: C }) => [
|
|
4273
|
+
B("span", {
|
|
4261
4274
|
class: "entity-link-copy-id",
|
|
4262
|
-
onClick: Fe((
|
|
4275
|
+
onClick: Fe((T) => d(C), ["stop"])
|
|
4263
4276
|
}, [
|
|
4264
|
-
j(
|
|
4277
|
+
j(w(ti), {
|
|
4265
4278
|
class: "copy-icon",
|
|
4266
|
-
color:
|
|
4279
|
+
color: w(Vi),
|
|
4267
4280
|
"data-testid": "copy-id",
|
|
4268
|
-
size:
|
|
4281
|
+
size: w(Ji)
|
|
4269
4282
|
}, null, 8, ["color", "size"])
|
|
4270
4283
|
], 8, Fl)
|
|
4271
4284
|
]),
|
|
@@ -4273,7 +4286,7 @@ const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
|
4273
4286
|
})
|
|
4274
4287
|
]),
|
|
4275
4288
|
_: 1
|
|
4276
|
-
}, 8, ["text"])) :
|
|
4289
|
+
}, 8, ["text"])) : M("", !0)
|
|
4277
4290
|
]);
|
|
4278
4291
|
};
|
|
4279
4292
|
}
|
|
@@ -4304,7 +4317,7 @@ const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
|
4304
4317
|
}, ql = { class: "card-header" }, Hl = ["title"], Yl = {
|
|
4305
4318
|
key: 3,
|
|
4306
4319
|
class: "entity-empty-state-bottom-container"
|
|
4307
|
-
}, Vl = /* @__PURE__ */
|
|
4320
|
+
}, Vl = /* @__PURE__ */ W({
|
|
4308
4321
|
__name: "EntityEmptyState",
|
|
4309
4322
|
props: {
|
|
4310
4323
|
appearance: {
|
|
@@ -4345,99 +4358,99 @@ const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
|
4345
4358
|
},
|
|
4346
4359
|
emits: ["click:create", "click:learn-more"],
|
|
4347
4360
|
setup(e) {
|
|
4348
|
-
const t = e, { i18n: { t: n } } =
|
|
4361
|
+
const t = e, { i18n: { t: n } } = V.useI18n(), i = R(!1), r = $(() => i.value && !!t.actionButtonText), o = $(() => ft.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4349
4362
|
return et(async () => {
|
|
4350
|
-
|
|
4363
|
+
i.value = await t.canCreate();
|
|
4351
4364
|
}), (a, l) => {
|
|
4352
4365
|
const s = U("KCard");
|
|
4353
|
-
return p(),
|
|
4354
|
-
|
|
4355
|
-
a.$slots.image ? (p(),
|
|
4366
|
+
return p(), S("div", Ll, [
|
|
4367
|
+
B("div", Rl, [
|
|
4368
|
+
a.$slots.image ? (p(), S("div", Bl, [
|
|
4356
4369
|
P(a.$slots, "image", {}, void 0, !0)
|
|
4357
|
-
])) :
|
|
4358
|
-
e.title || a.$slots.title ? (p(),
|
|
4359
|
-
|
|
4370
|
+
])) : M("", !0),
|
|
4371
|
+
e.title || a.$slots.title ? (p(), S("div", Kl, [
|
|
4372
|
+
B("h1", {
|
|
4360
4373
|
class: ce(o.value)
|
|
4361
4374
|
}, [
|
|
4362
4375
|
P(a.$slots, "title", {}, () => [
|
|
4363
|
-
|
|
4376
|
+
H(I(e.title), 1)
|
|
4364
4377
|
], !0)
|
|
4365
4378
|
], 2)
|
|
4366
|
-
])) :
|
|
4367
|
-
e.description || a.$slots.default ? (p(),
|
|
4379
|
+
])) : M("", !0),
|
|
4380
|
+
e.description || a.$slots.default ? (p(), S("div", Nl, [
|
|
4368
4381
|
P(a.$slots, "default", {}, () => [
|
|
4369
|
-
|
|
4382
|
+
B("p", null, I(e.description), 1)
|
|
4370
4383
|
], !0)
|
|
4371
|
-
])) :
|
|
4372
|
-
e.pricing || a.$slots.pricing ? (p(),
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
l[2] || (l[2] =
|
|
4384
|
+
])) : M("", !0),
|
|
4385
|
+
e.pricing || a.$slots.pricing ? (p(), S("div", Ml, [
|
|
4386
|
+
B("p", null, [
|
|
4387
|
+
B("b", null, I(w(n)("emptyState.pricingTitle")), 1),
|
|
4388
|
+
l[2] || (l[2] = H()),
|
|
4376
4389
|
P(a.$slots, "pricing", {}, () => [
|
|
4377
|
-
|
|
4390
|
+
H(I(e.pricing), 1)
|
|
4378
4391
|
], !0)
|
|
4379
4392
|
])
|
|
4380
|
-
])) :
|
|
4393
|
+
])) : M("", !0)
|
|
4381
4394
|
]),
|
|
4382
|
-
a.$slots.message ? (p(),
|
|
4395
|
+
a.$slots.message ? (p(), S("div", jl, [
|
|
4383
4396
|
P(a.$slots, "message", {}, void 0, !0)
|
|
4384
|
-
])) :
|
|
4385
|
-
|
|
4397
|
+
])) : M("", !0),
|
|
4398
|
+
r.value || e.learnMore || a.$slots.actions ? (p(), S("div", Dl, [
|
|
4386
4399
|
P(a.$slots, "actions", {}, () => [
|
|
4387
|
-
|
|
4400
|
+
r.value ? (p(), N(w(dt), {
|
|
4388
4401
|
key: 0,
|
|
4389
4402
|
appearance: "primary",
|
|
4390
4403
|
"data-testid": "entity-create-button",
|
|
4391
4404
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4392
4405
|
onClick: l[0] || (l[0] = (c) => a.$emit("click:create"))
|
|
4393
4406
|
}, {
|
|
4394
|
-
default:
|
|
4395
|
-
j(
|
|
4396
|
-
|
|
4407
|
+
default: A(() => [
|
|
4408
|
+
j(w(Pt)),
|
|
4409
|
+
H(" " + I(e.actionButtonText), 1)
|
|
4397
4410
|
]),
|
|
4398
4411
|
_: 1
|
|
4399
|
-
}, 8, ["size"])) :
|
|
4400
|
-
e.learnMore ? (p(),
|
|
4412
|
+
}, 8, ["size"])) : M("", !0),
|
|
4413
|
+
e.learnMore ? (p(), N(w(dt), {
|
|
4401
4414
|
key: 1,
|
|
4402
4415
|
appearance: "secondary",
|
|
4403
4416
|
"data-testid": "entity-learn-more-button",
|
|
4404
4417
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4405
4418
|
onClick: l[1] || (l[1] = (c) => a.$emit("click:learn-more"))
|
|
4406
4419
|
}, {
|
|
4407
|
-
default:
|
|
4408
|
-
j(
|
|
4409
|
-
|
|
4420
|
+
default: A(() => [
|
|
4421
|
+
j(w(Ut), { decorative: "" }),
|
|
4422
|
+
H(" " + I(w(n)("emptyState.learnMore")), 1)
|
|
4410
4423
|
]),
|
|
4411
4424
|
_: 1
|
|
4412
|
-
}, 8, ["size"])) :
|
|
4425
|
+
}, 8, ["size"])) : M("", !0)
|
|
4413
4426
|
], !0)
|
|
4414
|
-
])) :
|
|
4415
|
-
e.features.length ? (p(),
|
|
4416
|
-
(p(!0),
|
|
4427
|
+
])) : M("", !0),
|
|
4428
|
+
e.features.length ? (p(), S("div", Ul, [
|
|
4429
|
+
(p(!0), S(le, null, oe(e.features, (c, d) => (p(), N(s, {
|
|
4417
4430
|
key: c,
|
|
4418
4431
|
class: "entity-empty-state-card"
|
|
4419
4432
|
}, {
|
|
4420
|
-
title:
|
|
4421
|
-
a.$slots[`feature-${d}-icon`] ? (p(),
|
|
4433
|
+
title: A(() => [
|
|
4434
|
+
a.$slots[`feature-${d}-icon`] ? (p(), S("div", Pl, [
|
|
4422
4435
|
P(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4423
|
-
])) :
|
|
4424
|
-
|
|
4436
|
+
])) : M("", !0),
|
|
4437
|
+
B("div", ql, I(c.title), 1)
|
|
4425
4438
|
]),
|
|
4426
|
-
default:
|
|
4427
|
-
|
|
4439
|
+
default: A(() => [
|
|
4440
|
+
B("div", {
|
|
4428
4441
|
title: c.description
|
|
4429
|
-
},
|
|
4442
|
+
}, I(c.description), 9, Hl)
|
|
4430
4443
|
]),
|
|
4431
4444
|
_: 2
|
|
4432
4445
|
}, 1024))), 128))
|
|
4433
|
-
])) :
|
|
4434
|
-
a.$slots.bottom ? (p(),
|
|
4446
|
+
])) : M("", !0),
|
|
4447
|
+
a.$slots.bottom ? (p(), S("div", Yl, [
|
|
4435
4448
|
P(a.$slots, "bottom", {}, void 0, !0)
|
|
4436
|
-
])) :
|
|
4449
|
+
])) : M("", !0)
|
|
4437
4450
|
]);
|
|
4438
4451
|
};
|
|
4439
4452
|
}
|
|
4440
|
-
}), cs = /* @__PURE__ */ ae(Vl, [["__scopeId", "data-v-48ae9c8c"]]), Wl = { key: 1 }, us = /* @__PURE__ */
|
|
4453
|
+
}), cs = /* @__PURE__ */ ae(Vl, [["__scopeId", "data-v-48ae9c8c"]]), Wl = { key: 1 }, us = /* @__PURE__ */ W({
|
|
4441
4454
|
__name: "TableTags",
|
|
4442
4455
|
props: {
|
|
4443
4456
|
/** The tags to display in the table */
|
|
@@ -4451,58 +4464,58 @@ const kl = ["aria-labelledby"], Al = { class: "form-section-wrapper" }, wl = {
|
|
|
4451
4464
|
}
|
|
4452
4465
|
},
|
|
4453
4466
|
setup(e) {
|
|
4454
|
-
const t = e, n =
|
|
4467
|
+
const t = e, n = $(() => {
|
|
4455
4468
|
if (Array.isArray(t.tags))
|
|
4456
4469
|
return t.tags;
|
|
4457
4470
|
if (typeof t.tags == "string")
|
|
4458
4471
|
try {
|
|
4459
|
-
const
|
|
4460
|
-
return Array.isArray(
|
|
4472
|
+
const i = JSON.parse(t.tags);
|
|
4473
|
+
return Array.isArray(i) ? i : [];
|
|
4461
4474
|
} catch {
|
|
4462
4475
|
return [];
|
|
4463
4476
|
}
|
|
4464
4477
|
return [];
|
|
4465
4478
|
});
|
|
4466
|
-
return (
|
|
4479
|
+
return (i, r) => {
|
|
4467
4480
|
var o;
|
|
4468
|
-
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (p(),
|
|
4469
|
-
default:
|
|
4470
|
-
(p(!0),
|
|
4481
|
+
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (p(), N(w(Qn), { key: 0 }, {
|
|
4482
|
+
default: A(() => [
|
|
4483
|
+
(p(!0), S(le, null, oe(n.value, (a) => (p(), N(w(Zn), {
|
|
4471
4484
|
key: a,
|
|
4472
4485
|
"max-width": e.tagMaxWidth,
|
|
4473
|
-
onClick:
|
|
4486
|
+
onClick: r[0] || (r[0] = Fe(() => {
|
|
4474
4487
|
}, ["stop"]))
|
|
4475
4488
|
}, {
|
|
4476
|
-
default:
|
|
4477
|
-
|
|
4489
|
+
default: A(() => [
|
|
4490
|
+
H(I(a), 1)
|
|
4478
4491
|
]),
|
|
4479
4492
|
_: 2
|
|
4480
4493
|
}, 1032, ["max-width"]))), 128))
|
|
4481
4494
|
]),
|
|
4482
4495
|
_: 1
|
|
4483
|
-
})) : (p(),
|
|
4496
|
+
})) : (p(), S("span", Wl, "-"));
|
|
4484
4497
|
};
|
|
4485
4498
|
}
|
|
4486
|
-
}), { useAxios: ds, useDeleteUrlBuilder: fs, useErrors: ps, useExternalLinkCreator: ms, useFetchUrlBuilder: hs, useFetcher: gs, useFetcherCacheKey: ys, useDebouncedFilter: vs, useStringHelpers: bs, useHelpers: xs, useGatewayFeatureSupported: Cs, useTruncationDetector: ks, useValidators: As, useSchemaProvider: ws, useTableState: _s } =
|
|
4499
|
+
}), { useAxios: ds, useDeleteUrlBuilder: fs, useErrors: ps, useExternalLinkCreator: ms, useFetchUrlBuilder: hs, useFetcher: gs, useFetcherCacheKey: ys, useDebouncedFilter: vs, useStringHelpers: bs, useHelpers: xs, useGatewayFeatureSupported: Cs, useTruncationDetector: ks, useValidators: As, useSchemaProvider: ws, useTableState: _s } = V;
|
|
4487
4500
|
export {
|
|
4488
4501
|
ft as Appearances,
|
|
4489
4502
|
No as ConfigCardDisplay,
|
|
4490
4503
|
Gt as ConfigCardItem,
|
|
4491
|
-
|
|
4492
|
-
|
|
4504
|
+
re as ConfigurationSchemaSection,
|
|
4505
|
+
Y as ConfigurationSchemaType,
|
|
4493
4506
|
es as EntityBaseConfigCard,
|
|
4494
4507
|
ts as EntityBaseForm,
|
|
4495
|
-
|
|
4508
|
+
ri as EntityBaseFormType,
|
|
4496
4509
|
ns as EntityBaseTable,
|
|
4497
|
-
|
|
4510
|
+
is as EntityDeleteModal,
|
|
4498
4511
|
cs as EntityEmptyState,
|
|
4499
|
-
|
|
4512
|
+
rs as EntityFilter,
|
|
4500
4513
|
ls as EntityFormSection,
|
|
4501
4514
|
ss as EntityLink,
|
|
4502
4515
|
as as EntityToggleModal,
|
|
4503
|
-
|
|
4516
|
+
ii as EntityTypes,
|
|
4504
4517
|
de as FetcherStatus,
|
|
4505
|
-
|
|
4518
|
+
Ui as InternalLinkItem,
|
|
4506
4519
|
zt as JsonCodeBlock,
|
|
4507
4520
|
os as PermissionsWrapper,
|
|
4508
4521
|
tt as SupportedEntityType,
|