@kong-ui-public/entities-shared 3.10.13 → 3.10.14
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 +1288 -1284
- package/dist/entities-shared.umd.js +29 -29
- package/dist/style.css +1 -1
- package/dist/types/components/common/TableTags.vue.d.ts +3 -0
- package/dist/types/components/common/TableTags.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts +2 -2
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts +5 -5
- package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts.map +1 -1
- package/dist/types/components/entity-delete-modal/EntityDeleteModal.vue.d.ts +1 -1
- package/dist/types/types/entity-base-table.d.ts +8 -0
- package/dist/types/types/entity-base-table.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { BadgeMethodAppearances as
|
|
5
|
-
import { BookIcon as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
var
|
|
10
|
-
function
|
|
1
|
+
import { inject as Lt, ref as R, computed as $, unref as I, toValue as Rn, watch as _e, provide as Rt, toRef as Bn, defineComponent as z, openBlock as h, createBlock as D, resolveDynamicComponent as Me, normalizeClass as fe, withCtx as C, createElementBlock as L, createElementVNode as M, toDisplayString as N, createCommentVNode as q, Fragment as le, renderList as oe, resolveComponent as j, createVNode as K, createTextVNode as V, useCssVars as Bt, useSlots as Xe, renderSlot as W, createSlots as Ae, normalizeProps as Nn, guardReactiveProps as Kn, mergeProps as Mn, onBeforeMount as Nt, withModifiers as Fe, onMounted as Dn, onUnmounted as jn, withDirectives as ge, vShow as ye, withKeys as Un, Teleport as Pn } from "vue";
|
|
2
|
+
import st from "axios";
|
|
3
|
+
import { createI18n as qn, i18nTComponent as Hn } from "@kong-ui-public/i18n";
|
|
4
|
+
import { BadgeMethodAppearances as Yn, KTruncate as Vn, KBadge as Wn } from "@kong/kongponents";
|
|
5
|
+
import { BookIcon as Jn, AddIcon as Gn, CloseIcon as zn, ChevronDownIcon as Qn, CopyIcon as Zn } from "@kong/icons";
|
|
6
|
+
import { useRouter as Xn } from "vue-router";
|
|
7
|
+
var er = /* @__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))(er || {}), tr = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(tr || {}), ue = /* @__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))(ue || {}), et = /* @__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.Other = "other", e))(et || {});
|
|
8
|
+
const De = Object.values(et);
|
|
9
|
+
var P = /* @__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))(P || {}), ie = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ie || {});
|
|
10
|
+
function nr() {
|
|
11
11
|
return {
|
|
12
12
|
getAxiosInstance: (e = {}) => {
|
|
13
13
|
try {
|
|
14
|
-
const t =
|
|
15
|
-
return typeof t == "function" ? t(e) :
|
|
14
|
+
const t = Lt("get-axios-instance", void 0);
|
|
15
|
+
return typeof t == "function" ? t(e) : st.create({
|
|
16
16
|
withCredentials: !0,
|
|
17
17
|
timeout: 3e4,
|
|
18
18
|
...e
|
|
19
19
|
});
|
|
20
20
|
} catch (t) {
|
|
21
|
-
return console.warn("getAxiosInstance:", t.message || t),
|
|
21
|
+
return console.warn("getAxiosInstance:", t.message || t), st.create({
|
|
22
22
|
withCredentials: !0,
|
|
23
23
|
timeout: 3e4,
|
|
24
24
|
...e
|
|
@@ -31,7 +31,7 @@ function tr() {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function rr() {
|
|
35
35
|
return {
|
|
36
36
|
debounce: (e, t) => {
|
|
37
37
|
let n;
|
|
@@ -43,13 +43,13 @@ function nr() {
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const Pe = "khcp-user-table-preferences", ir = {
|
|
47
47
|
pageSize: 30,
|
|
48
48
|
sortColumnKey: void 0,
|
|
49
49
|
sortColumnOrder: void 0,
|
|
50
50
|
columnVisibility: {}
|
|
51
51
|
};
|
|
52
|
-
function
|
|
52
|
+
function ar() {
|
|
53
53
|
const e = (n) => {
|
|
54
54
|
if (typeof n == "string")
|
|
55
55
|
try {
|
|
@@ -59,44 +59,44 @@ function ir() {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
}, t = () => {
|
|
62
|
-
const n = e(localStorage.getItem(
|
|
62
|
+
const n = e(localStorage.getItem(Pe));
|
|
63
63
|
return !n || !Object.keys(n).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(n));
|
|
64
64
|
};
|
|
65
65
|
return {
|
|
66
66
|
setTablePreferences: (n, r) => {
|
|
67
67
|
try {
|
|
68
68
|
const i = t();
|
|
69
|
-
i.set(n, r), localStorage.setItem(
|
|
69
|
+
i.set(n, r), localStorage.setItem(Pe, JSON.stringify(Object.fromEntries(i.entries())));
|
|
70
70
|
} catch (i) {
|
|
71
71
|
console.error("useTablePreferences(setTablePreferences)", i);
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
getTablePreferences: (n, r) => {
|
|
75
75
|
const i = t();
|
|
76
|
-
return (i == null ? void 0 : i.get(n)) || void 0 || r ||
|
|
76
|
+
return (i == null ? void 0 : i.get(n)) || void 0 || r || ir;
|
|
77
77
|
},
|
|
78
78
|
deleteAllTablePreferences: () => {
|
|
79
|
-
localStorage.removeItem(
|
|
79
|
+
localStorage.removeItem(Pe);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
const { getAxiosInstance: t } =
|
|
83
|
+
function tt(e = {}) {
|
|
84
|
+
const { getAxiosInstance: t } = nr();
|
|
85
85
|
return {
|
|
86
86
|
axiosInstance: t(e)
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
const
|
|
89
|
+
const or = {
|
|
90
90
|
actions: {
|
|
91
91
|
copyId: "Copy ID",
|
|
92
92
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
93
93
|
copyToClipboard: "Copied successfully!",
|
|
94
94
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, lr = {
|
|
97
97
|
message: "Are you sure you want to delete this {entityType}?",
|
|
98
98
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
99
|
-
},
|
|
99
|
+
}, cr = {
|
|
100
100
|
actions: {
|
|
101
101
|
viewConfiguration: "View Configuration",
|
|
102
102
|
save: "Save",
|
|
@@ -113,13 +113,13 @@ const ar = {
|
|
|
113
113
|
errors: {
|
|
114
114
|
edit: "The entity could not be edited at this time."
|
|
115
115
|
}
|
|
116
|
-
},
|
|
116
|
+
}, sr = {
|
|
117
117
|
emptyState: {
|
|
118
118
|
noSearchResultsTitle: "No results found",
|
|
119
119
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
120
120
|
noSearchResultsCtaText: "Clear"
|
|
121
121
|
}
|
|
122
|
-
},
|
|
122
|
+
}, ur = {
|
|
123
123
|
title: "Configuration",
|
|
124
124
|
actions: {
|
|
125
125
|
copy: "Copy JSON"
|
|
@@ -154,7 +154,7 @@ const ar = {
|
|
|
154
154
|
entryTitle: "Entry {index}",
|
|
155
155
|
structuredFormat: "Structured"
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, dr = {
|
|
158
158
|
filterButtonText: "Filter",
|
|
159
159
|
fieldLabel: "Filter by:",
|
|
160
160
|
inputPlaceholder: "Enter a value",
|
|
@@ -162,17 +162,17 @@ const ar = {
|
|
|
162
162
|
applyButtonText: "Apply",
|
|
163
163
|
clearButtonText: "Clear",
|
|
164
164
|
clearAllButtonText: "Clear all filters"
|
|
165
|
-
},
|
|
165
|
+
}, fr = {
|
|
166
166
|
errors: {
|
|
167
167
|
fetch: "Could not fetch available items",
|
|
168
168
|
invalid: "Please select a valid value"
|
|
169
169
|
}
|
|
170
|
-
},
|
|
170
|
+
}, pr = {
|
|
171
171
|
unexpected: "An unexpected error has occurred",
|
|
172
172
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
173
|
-
}, pr = {
|
|
174
|
-
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
175
173
|
}, mr = {
|
|
174
|
+
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
175
|
+
}, hr = {
|
|
176
176
|
enable: {
|
|
177
177
|
title: "Enable {entityType}",
|
|
178
178
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -183,27 +183,27 @@ const ar = {
|
|
|
183
183
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
184
184
|
confirmText: "Yes, disable"
|
|
185
185
|
}
|
|
186
|
-
},
|
|
187
|
-
global:
|
|
188
|
-
deleteModal:
|
|
189
|
-
baseForm:
|
|
190
|
-
baseTable:
|
|
191
|
-
baseConfigCard:
|
|
192
|
-
filter:
|
|
193
|
-
debouncedFilter:
|
|
194
|
-
errors:
|
|
195
|
-
validationErrors:
|
|
196
|
-
toggleModal:
|
|
186
|
+
}, gr = {
|
|
187
|
+
global: or,
|
|
188
|
+
deleteModal: lr,
|
|
189
|
+
baseForm: cr,
|
|
190
|
+
baseTable: sr,
|
|
191
|
+
baseConfigCard: ur,
|
|
192
|
+
filter: dr,
|
|
193
|
+
debouncedFilter: fr,
|
|
194
|
+
errors: pr,
|
|
195
|
+
validationErrors: mr,
|
|
196
|
+
toggleModal: hr
|
|
197
197
|
};
|
|
198
|
-
function
|
|
199
|
-
const e =
|
|
198
|
+
function je() {
|
|
199
|
+
const e = qn("en-us", gr);
|
|
200
200
|
return {
|
|
201
201
|
i18n: e,
|
|
202
|
-
i18nT:
|
|
202
|
+
i18nT: Hn(e)
|
|
203
203
|
// Translation component <i18n-t>
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Kt() {
|
|
207
207
|
const e = (o, a) => (a == null ? void 0 : a[o]) ?? void 0, t = (o, a) => {
|
|
208
208
|
if (o.length !== a.length) return !1;
|
|
209
209
|
const l = /* @__PURE__ */ new Set([...o, ...a]);
|
|
@@ -245,71 +245,71 @@ function Nt() {
|
|
|
245
245
|
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
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function yr(e, t, n, r = {
|
|
249
249
|
fetchedItemsKey: "data",
|
|
250
250
|
searchKeys: ["id"]
|
|
251
251
|
}) {
|
|
252
252
|
n || (n = "1000");
|
|
253
|
-
const { axiosInstance: i } =
|
|
254
|
-
await
|
|
255
|
-
}, 200), c =
|
|
256
|
-
const
|
|
257
|
-
return e.app === "konnect" ?
|
|
258
|
-
}), { isValidUuid: g } =
|
|
253
|
+
const { axiosInstance: i } = tt(e.axiosRequestConfig), { i18n: { t: o } } = je(), { debounce: a } = rr(), l = a(async (B) => {
|
|
254
|
+
await b(B);
|
|
255
|
+
}, 200), c = R(!1), s = R(""), d = R(""), u = R([]), p = R([]), f = R(void 0), y = $(() => {
|
|
256
|
+
const B = `${e.apiBaseUrl}${I(t)}`;
|
|
257
|
+
return e.app === "konnect" ? B.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? B.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : B;
|
|
258
|
+
}), { isValidUuid: g } = Kt(), x = async () => {
|
|
259
259
|
try {
|
|
260
260
|
c.value = !0;
|
|
261
|
-
const { data:
|
|
262
|
-
|
|
261
|
+
const { data: B } = await i.get(`${y.value}?size=${n}`);
|
|
262
|
+
B != null && B.next || (f.value = r.fetchedItemsKey in B ? B[r.fetchedItemsKey] : []), p.value = r.fetchedItemsKey in B ? B[r.fetchedItemsKey] : [], u.value = p.value;
|
|
263
263
|
} catch {
|
|
264
264
|
u.value = [], s.value = o("debouncedFilter.errors.fetch");
|
|
265
265
|
} finally {
|
|
266
266
|
c.value = !1;
|
|
267
267
|
}
|
|
268
|
-
},
|
|
269
|
-
var
|
|
270
|
-
if (
|
|
271
|
-
if (
|
|
272
|
-
u.value =
|
|
268
|
+
}, E = R(""), b = async (B) => {
|
|
269
|
+
var O, T, m;
|
|
270
|
+
if (E.value !== B) {
|
|
271
|
+
if (E.value = B ?? "", !B) {
|
|
272
|
+
u.value = p.value;
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
275
|
if (f.value === void 0)
|
|
276
276
|
try {
|
|
277
277
|
if (c.value = !0, s.value = "", d.value = "", e.app === "konnect") {
|
|
278
|
-
const
|
|
279
|
-
r.fetchedItemsKey in
|
|
278
|
+
const A = `${y.value}/${B}`, { data: S } = await i.get(`${A}?size=${n}`);
|
|
279
|
+
r.fetchedItemsKey in S ? u.value = S[r.fetchedItemsKey] : S != null && S[r.exactMatchKey ?? "id"] ? u.value = [S] : u.value = [];
|
|
280
280
|
} else {
|
|
281
|
-
const
|
|
282
|
-
g(
|
|
283
|
-
const { data:
|
|
284
|
-
return [
|
|
285
|
-
})()) :
|
|
286
|
-
...r.searchKeys.filter((
|
|
287
|
-
const { data:
|
|
288
|
-
return
|
|
281
|
+
const A = [];
|
|
282
|
+
g(B) && r.searchKeys.includes("id") ? A.push((async () => {
|
|
283
|
+
const { data: v } = await i.get(`${y.value}/${B}`);
|
|
284
|
+
return [v[r.fetchedItemsKey] ?? v];
|
|
285
|
+
})()) : A.push(
|
|
286
|
+
...r.searchKeys.filter((v) => v !== "id").map(async (v) => {
|
|
287
|
+
const { data: _ } = await i.get(`${y.value}?${v}=${B}`);
|
|
288
|
+
return _[r.fetchedItemsKey];
|
|
289
289
|
})
|
|
290
290
|
);
|
|
291
|
-
const
|
|
292
|
-
u.value = [], (
|
|
293
|
-
var
|
|
294
|
-
(
|
|
295
|
-
|
|
291
|
+
const S = await Promise.all(A), w = /* @__PURE__ */ new Set();
|
|
292
|
+
u.value = [], (O = S == null ? void 0 : S.forEach) == null || O.call(S, (v) => {
|
|
293
|
+
var _;
|
|
294
|
+
(_ = v == null ? void 0 : v.forEach) == null || _.call(v, (F) => {
|
|
295
|
+
w.has(F.id) || (w.add(F.id), u.value.push(F));
|
|
296
296
|
});
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
|
-
} catch (
|
|
300
|
-
((
|
|
299
|
+
} catch (A) {
|
|
300
|
+
((T = A == null ? void 0 : A.response) == null ? void 0 : T.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], s.value = o("debouncedFilter.errors.fetch"));
|
|
301
301
|
} finally {
|
|
302
302
|
c.value = !1;
|
|
303
303
|
}
|
|
304
304
|
else
|
|
305
|
-
c.value = !0, d.value = "", u.value = (
|
|
306
|
-
var
|
|
307
|
-
let
|
|
308
|
-
for (const
|
|
309
|
-
const
|
|
310
|
-
|
|
305
|
+
c.value = !0, d.value = "", u.value = (m = f.value) == null ? void 0 : m.filter((A) => {
|
|
306
|
+
var w;
|
|
307
|
+
let S = !1;
|
|
308
|
+
for (const v of r.searchKeys) {
|
|
309
|
+
const _ = typeof A[v] == "string" ? (w = A[v]) == null ? void 0 : w.toLowerCase() : A[v];
|
|
310
|
+
_ != null && _.includes(B.toLowerCase()) && (S = !0);
|
|
311
311
|
}
|
|
312
|
-
return
|
|
312
|
+
return S;
|
|
313
313
|
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")), c.value = !1;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
@@ -323,14 +323,14 @@ function gr(e, t, n, r = {
|
|
|
323
323
|
debouncedQueryChange: l
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
const n =
|
|
326
|
+
function vr(e, t) {
|
|
327
|
+
const n = I(t), r = $(
|
|
328
328
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
329
329
|
);
|
|
330
330
|
return r.value.search = "", (i) => `${r.value.href}/${i}`;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
const { i18n: { t: e } } =
|
|
332
|
+
function br() {
|
|
333
|
+
const { i18n: { t: e } } = je();
|
|
334
334
|
return {
|
|
335
335
|
getMessageFromError: (n) => {
|
|
336
336
|
var r, i, o, a;
|
|
@@ -359,7 +359,7 @@ function vr() {
|
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function xr(e) {
|
|
363
363
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
364
364
|
try {
|
|
365
365
|
const r = e.join("/"), i = `${n}${r}`, o = e.some((l) => l.trim() === "");
|
|
@@ -370,17 +370,17 @@ function br(e) {
|
|
|
370
370
|
return console.warn("Failed to build valid URL:", r), "";
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
const n =
|
|
373
|
+
function Mt(e, t) {
|
|
374
|
+
const n = R(I(e)), r = R(I(t)), i = $(
|
|
375
375
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
376
|
-
), o =
|
|
376
|
+
), o = $(
|
|
377
377
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
378
378
|
);
|
|
379
379
|
return (a) => {
|
|
380
|
-
const { page: l, pageSize: c, offset: s, sortColumnKey: d, sortColumnOrder: u, query:
|
|
380
|
+
const { page: l, pageSize: c, offset: s, sortColumnKey: d, sortColumnOrder: u, query: p } = a;
|
|
381
381
|
try {
|
|
382
382
|
let f = new URL(o.value.href);
|
|
383
|
-
return i.value &&
|
|
383
|
+
return i.value && p ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${p}`) : new URL(`${f.href}?filter[name][contains]=${p}`)) : (i.value || new URLSearchParams(p).forEach((y, g) => {
|
|
384
384
|
f.searchParams.append(g, y);
|
|
385
385
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(c))), s && l !== 1 && f.searchParams.append("offset", String(s)), f.href;
|
|
386
386
|
} catch (f) {
|
|
@@ -388,24 +388,24 @@ function Kt(e, t) {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
const r =
|
|
391
|
+
function Cr(e, t, n) {
|
|
392
|
+
const r = R(!0), i = I(t), { axiosInstance: o } = tt(e.axiosRequestConfig), a = Mt(e, i), l = R({
|
|
393
393
|
status: ue.Idle
|
|
394
394
|
});
|
|
395
395
|
return { fetcher: async (s) => {
|
|
396
396
|
var u;
|
|
397
|
-
const d =
|
|
397
|
+
const d = Rn(n) || "data";
|
|
398
398
|
try {
|
|
399
399
|
l.value = r.value ? { status: ue.InitialLoad } : { status: ue.Loading }, r.value = !1;
|
|
400
|
-
let
|
|
401
|
-
|
|
402
|
-
const f = await o.get(
|
|
400
|
+
let p = a(s);
|
|
401
|
+
p.includes("filter[name]") && (p = `${p}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
402
|
+
const f = await o.get(p);
|
|
403
403
|
if (f.status >= 400)
|
|
404
404
|
throw f;
|
|
405
405
|
const y = f.data, g = d && d.replace(/[^\w-_]/gi, "");
|
|
406
406
|
let x;
|
|
407
407
|
y[g] ? x = Array.isArray(y[g]) ? y[g] : [y[g]] : Array.isArray(y) ? x = y : x = Object.keys(y).length ? [y] : [];
|
|
408
|
-
const
|
|
408
|
+
const E = {
|
|
409
409
|
data: x,
|
|
410
410
|
total: x.length,
|
|
411
411
|
...y.offset ? {
|
|
@@ -414,132 +414,132 @@ function xr(e, t, n) {
|
|
|
414
414
|
}
|
|
415
415
|
} : null
|
|
416
416
|
};
|
|
417
|
-
return
|
|
417
|
+
return E.data.length === 0 && !s.query ? l.value = {
|
|
418
418
|
status: ue.NoRecords,
|
|
419
|
-
response:
|
|
419
|
+
response: E
|
|
420
420
|
} : l.value = {
|
|
421
421
|
status: ue.Idle,
|
|
422
|
-
response:
|
|
423
|
-
},
|
|
424
|
-
} catch (
|
|
422
|
+
response: E
|
|
423
|
+
}, E;
|
|
424
|
+
} catch (p) {
|
|
425
425
|
const f = {
|
|
426
426
|
data: [],
|
|
427
427
|
total: 0
|
|
428
428
|
};
|
|
429
|
-
return s.query && (((u =
|
|
429
|
+
return s.query && (((u = p.response) == null ? void 0 : u.status) === 404 || p.status === 404) ? (l.value = {
|
|
430
430
|
status: ue.NoResults,
|
|
431
431
|
response: f,
|
|
432
|
-
error:
|
|
432
|
+
error: p.response ? p : { response: p }
|
|
433
433
|
}, f) : (l.value = {
|
|
434
434
|
status: ue.Error,
|
|
435
435
|
response: f,
|
|
436
|
-
error:
|
|
436
|
+
error: p.response ? p : { response: p }
|
|
437
437
|
}, f);
|
|
438
438
|
}
|
|
439
439
|
}, fetcherState: l };
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function Ar() {
|
|
442
442
|
const e = (r, i = "_") => r ? r.split(i).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
443
443
|
return {
|
|
444
444
|
capitalize: (r) => r ? r.replace(t, (i) => i.toUpperCase()) : "",
|
|
445
445
|
convertKeyToTitle: e
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
|
-
const
|
|
448
|
+
const Dt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, ut = (e) => {
|
|
449
449
|
if (typeof e != "string")
|
|
450
450
|
throw new TypeError("Invalid argument expected string");
|
|
451
|
-
const t = e.match(
|
|
451
|
+
const t = e.match(Dt);
|
|
452
452
|
if (!t)
|
|
453
453
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
454
454
|
return t.shift(), t;
|
|
455
|
-
},
|
|
455
|
+
}, dt = (e) => e === "*" || e === "x" || e === "X", ft = (e) => {
|
|
456
456
|
const t = parseInt(e, 10);
|
|
457
457
|
return isNaN(t) ? e : t;
|
|
458
|
-
},
|
|
459
|
-
if (
|
|
458
|
+
}, kr = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], _r = (e, t) => {
|
|
459
|
+
if (dt(e) || dt(t))
|
|
460
460
|
return 0;
|
|
461
|
-
const [n, r] =
|
|
461
|
+
const [n, r] = kr(ft(e), ft(t));
|
|
462
462
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
463
|
-
},
|
|
463
|
+
}, pt = (e, t) => {
|
|
464
464
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
465
|
-
const r =
|
|
465
|
+
const r = _r(e[n] || "0", t[n] || "0");
|
|
466
466
|
if (r !== 0)
|
|
467
467
|
return r;
|
|
468
468
|
}
|
|
469
469
|
return 0;
|
|
470
|
-
},
|
|
471
|
-
const n =
|
|
472
|
-
return a !== 0 ? a : i && o ?
|
|
473
|
-
},
|
|
474
|
-
|
|
475
|
-
const r =
|
|
476
|
-
return
|
|
477
|
-
},
|
|
470
|
+
}, wr = (e, t) => {
|
|
471
|
+
const n = ut(e), r = ut(t), i = n.pop(), o = r.pop(), a = pt(n, r);
|
|
472
|
+
return a !== 0 ? a : i && o ? pt(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
473
|
+
}, mt = (e, t, n) => {
|
|
474
|
+
Sr(n);
|
|
475
|
+
const r = wr(e, t);
|
|
476
|
+
return jt[n].includes(r);
|
|
477
|
+
}, jt = {
|
|
478
478
|
">": [1],
|
|
479
479
|
">=": [0, 1],
|
|
480
480
|
"=": [0],
|
|
481
481
|
"<=": [-1, 0],
|
|
482
482
|
"<": [-1],
|
|
483
483
|
"!=": [-1, 1]
|
|
484
|
-
},
|
|
484
|
+
}, ht = Object.keys(jt), Sr = (e) => {
|
|
485
485
|
if (typeof e != "string")
|
|
486
486
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
487
|
-
if (
|
|
488
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
489
|
-
},
|
|
490
|
-
function
|
|
487
|
+
if (ht.indexOf(e) === -1)
|
|
488
|
+
throw new Error(`Invalid operator, expected one of ${ht.join("|")}`);
|
|
489
|
+
}, Tr = (e) => typeof e == "string" && /^[v\d]/.test(e) && Dt.test(e);
|
|
490
|
+
function Ir(e) {
|
|
491
491
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
492
492
|
if (!t)
|
|
493
493
|
return !0;
|
|
494
494
|
const { edition: r, version: i } = t;
|
|
495
|
-
if (!
|
|
495
|
+
if (!Tr(i))
|
|
496
496
|
return console.error("Invalid version"), !1;
|
|
497
497
|
const o = n[r];
|
|
498
498
|
if (!o)
|
|
499
499
|
return !1;
|
|
500
500
|
const [a, l] = o;
|
|
501
|
-
return !(a &&
|
|
501
|
+
return !(a && mt(i, a, "<") || l && mt(i, l, ">"));
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
const t =
|
|
505
|
-
return
|
|
503
|
+
function $r(e) {
|
|
504
|
+
const t = R(0), n = R(0), r = R(!1);
|
|
505
|
+
return _e(e, (o) => {
|
|
506
506
|
o && !r.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, r.value = !0);
|
|
507
507
|
}), {
|
|
508
|
-
isTruncated:
|
|
508
|
+
isTruncated: $(() => t.value < n.value)
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
const { i18n: { t: e } } =
|
|
511
|
+
function Er() {
|
|
512
|
+
const { i18n: { t: e } } = je();
|
|
513
513
|
return {
|
|
514
514
|
utf8Name: (n) => /^[\p{N}\p{L}.\-_~]*$/u.test(n) ? "" : e("validationErrors.utf8Name")
|
|
515
515
|
};
|
|
516
516
|
}
|
|
517
|
-
const
|
|
518
|
-
|
|
519
|
-
},
|
|
517
|
+
const We = Symbol("schema"), Or = (e) => {
|
|
518
|
+
Rt(We, e);
|
|
519
|
+
}, Fr = (e) => {
|
|
520
520
|
var i, o;
|
|
521
|
-
const t =
|
|
522
|
-
return
|
|
523
|
-
},
|
|
524
|
-
useAxios:
|
|
525
|
-
useDebouncedFilter:
|
|
526
|
-
useDeleteUrlBuilder:
|
|
527
|
-
useErrors:
|
|
528
|
-
useExternalLinkCreator:
|
|
529
|
-
useFetcher:
|
|
530
|
-
useFetchUrlBuilder:
|
|
531
|
-
useHelpers:
|
|
532
|
-
useStringHelpers:
|
|
533
|
-
useI18n:
|
|
534
|
-
useGatewayFeatureSupported:
|
|
535
|
-
useTruncationDetector:
|
|
536
|
-
useValidators:
|
|
537
|
-
useSchemaProvider:
|
|
538
|
-
useSubSchema:
|
|
539
|
-
},
|
|
521
|
+
const t = Lt(We, void 0), n = (o = (i = t == null ? void 0 : t.value) == null ? void 0 : i.fields) == null ? void 0 : o.find((a) => Object.keys(a)[0] === e), r = Bn(n == null ? void 0 : n[e]);
|
|
522
|
+
return Rt(We, r), r;
|
|
523
|
+
}, H = {
|
|
524
|
+
useAxios: tt,
|
|
525
|
+
useDebouncedFilter: yr,
|
|
526
|
+
useDeleteUrlBuilder: vr,
|
|
527
|
+
useErrors: br,
|
|
528
|
+
useExternalLinkCreator: xr,
|
|
529
|
+
useFetcher: Cr,
|
|
530
|
+
useFetchUrlBuilder: Mt,
|
|
531
|
+
useHelpers: Kt,
|
|
532
|
+
useStringHelpers: Ar,
|
|
533
|
+
useI18n: je,
|
|
534
|
+
useGatewayFeatureSupported: Ir,
|
|
535
|
+
useTruncationDetector: $r,
|
|
536
|
+
useValidators: Er,
|
|
537
|
+
useSchemaProvider: Or,
|
|
538
|
+
useSubSchema: Fr
|
|
539
|
+
}, Lr = {
|
|
540
540
|
key: 0,
|
|
541
541
|
class: "config-card-fieldset-title"
|
|
542
|
-
},
|
|
542
|
+
}, Rr = /* @__PURE__ */ z({
|
|
543
543
|
__name: "JsonCardItem",
|
|
544
544
|
props: {
|
|
545
545
|
item: {
|
|
@@ -556,25 +556,25 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
556
556
|
}
|
|
557
557
|
},
|
|
558
558
|
setup(e) {
|
|
559
|
-
const t = e, { i18n: { t: n } } =
|
|
559
|
+
const t = e, { i18n: { t: n } } = H.useI18n(), { convertKeyToTitle: r } = H.useStringHelpers(), i = $(() => t.item.key ?? "json-array-item"), o = $(() => t.item.value ?? t.item), a = $(() => {
|
|
560
560
|
const c = JSON.parse(JSON.stringify(o.value));
|
|
561
561
|
return t.isArrayItem && delete c.name, c;
|
|
562
|
-
}), l =
|
|
562
|
+
}), l = $(() => {
|
|
563
563
|
var c;
|
|
564
564
|
return t.isArrayItem ? (c = o.value) != null && c.name ? r(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
565
565
|
});
|
|
566
|
-
return (c, s) => (h(), D(
|
|
566
|
+
return (c, s) => (h(), D(Me(e.isArrayItem ? "fieldset" : "div"), {
|
|
567
567
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
568
568
|
}, {
|
|
569
|
-
default:
|
|
570
|
-
e.isArrayItem ? (h(),
|
|
569
|
+
default: C(() => [
|
|
570
|
+
e.isArrayItem ? (h(), L("legend", Lr, [
|
|
571
571
|
M("b", null, N(l.value), 1)
|
|
572
|
-
])) :
|
|
573
|
-
(h(!0),
|
|
572
|
+
])) : q("", !0),
|
|
573
|
+
(h(!0), L(le, null, oe(Object.keys(a.value), (d, u) => (h(), D(Pt, {
|
|
574
574
|
key: `${i.value}-property-${u}`,
|
|
575
575
|
item: {
|
|
576
576
|
key: d,
|
|
577
|
-
label:
|
|
577
|
+
label: I(r)(d),
|
|
578
578
|
value: a.value[d]
|
|
579
579
|
}
|
|
580
580
|
}, null, 8, ["item"]))), 128))
|
|
@@ -587,7 +587,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
587
587
|
for (const [r, i] of t)
|
|
588
588
|
n[r] = i;
|
|
589
589
|
return n;
|
|
590
|
-
},
|
|
590
|
+
}, Ut = /* @__PURE__ */ ae(Rr, [["__scopeId", "data-v-68ca83ec"]]), Br = /* @__PURE__ */ z({
|
|
591
591
|
__name: "InternalLinkItem",
|
|
592
592
|
props: {
|
|
593
593
|
item: {
|
|
@@ -597,24 +597,24 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
597
597
|
},
|
|
598
598
|
emits: ["navigation-click"],
|
|
599
599
|
setup(e) {
|
|
600
|
-
const { i18n: { t } } =
|
|
600
|
+
const { i18n: { t } } = H.useI18n();
|
|
601
601
|
return (n, r) => {
|
|
602
602
|
const i = j("KButton");
|
|
603
|
-
return h(),
|
|
603
|
+
return h(), L("div", null, [
|
|
604
604
|
K(i, {
|
|
605
605
|
appearance: "tertiary",
|
|
606
606
|
class: "navigation-button",
|
|
607
607
|
onClick: r[0] || (r[0] = (o) => n.$emit("navigation-click", e.item))
|
|
608
608
|
}, {
|
|
609
|
-
default:
|
|
610
|
-
|
|
609
|
+
default: C(() => [
|
|
610
|
+
V(N(e.item.value || I(t)("baseConfigCard.commonFields.link")), 1)
|
|
611
611
|
]),
|
|
612
612
|
_: 1
|
|
613
613
|
})
|
|
614
614
|
]);
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
|
-
}),
|
|
617
|
+
}), Nr = /* @__PURE__ */ ae(Br, [["__scopeId", "data-v-c96811e5"]]), Kr = /* @__PURE__ */ z({
|
|
618
618
|
__name: "StatusBadge",
|
|
619
619
|
props: {
|
|
620
620
|
status: {
|
|
@@ -623,24 +623,24 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
623
623
|
}
|
|
624
624
|
},
|
|
625
625
|
setup(e) {
|
|
626
|
-
const { i18n: { t } } =
|
|
626
|
+
const { i18n: { t } } = H.useI18n();
|
|
627
627
|
return (n, r) => {
|
|
628
628
|
const i = j("KBadge");
|
|
629
629
|
return h(), D(i, {
|
|
630
630
|
appearance: e.status ? "success" : "neutral"
|
|
631
631
|
}, {
|
|
632
|
-
default:
|
|
633
|
-
|
|
632
|
+
default: C(() => [
|
|
633
|
+
V(N(e.status ? I(t)("baseConfigCard.statusBadge.enabledLabel") : I(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
634
634
|
]),
|
|
635
635
|
_: 1
|
|
636
636
|
}, 8, ["appearance"]);
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
}),
|
|
639
|
+
}), Mr = "#0044f4", Dr = "#e0e4ea", jr = "#afb7c5", Ur = "#0044f4", Pr = "1px", qr = "16px", Hr = "20px", Yr = { class: "config-card-details-row" }, Vr = ["data-testid"], Wr = ["data-testid"], Jr = ["data-testid"], Gr = ["data-testid"], zr = { key: 1 }, Qr = ["data-testid"], Zr = ["data-testid"], Xr = ["data-testid"], ei = ["data-testid"], ti = {
|
|
640
640
|
name: "ConfigCardItem",
|
|
641
|
-
components: { JsonCardItem:
|
|
642
|
-
},
|
|
643
|
-
...
|
|
641
|
+
components: { JsonCardItem: Ut, StatusBadge: Kr, InternalLinkItem: Nr }
|
|
642
|
+
}, ni = /* @__PURE__ */ z({
|
|
643
|
+
...ti,
|
|
644
644
|
props: {
|
|
645
645
|
item: {
|
|
646
646
|
type: Object,
|
|
@@ -659,18 +659,18 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
659
659
|
},
|
|
660
660
|
emits: ["navigation-click"],
|
|
661
661
|
setup(e, { emit: t }) {
|
|
662
|
-
|
|
663
|
-
"3ccdd5d2": d.value ? "none" : `solid ${
|
|
662
|
+
Bt((b) => ({
|
|
663
|
+
"3ccdd5d2": d.value ? "none" : `solid ${I(Pr)} ${I(Dr)}`,
|
|
664
664
|
"4b1da305": s.value && l.value ? "block" : "flex",
|
|
665
665
|
cd20788a: s.value && l.value ? "100%" : n.slim ? "50%" : "25%",
|
|
666
666
|
cd1becd4: s.value && l.value ? "100%" : n.slim ? "50%" : "75%"
|
|
667
667
|
}));
|
|
668
|
-
const n = e, r = t, i =
|
|
669
|
-
var
|
|
670
|
-
return n.item.type ? n.item.type : (
|
|
671
|
-
}), f =
|
|
672
|
-
switch (
|
|
673
|
-
case
|
|
668
|
+
const n = e, r = t, i = Xe(), { i18n: { t: o, formatUnixTimeStamp: a } } = H.useI18n(), l = $(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), c = $(() => !!(n.item.tooltip || i["label-tooltip"])), s = $(() => n.item.type === P.Json || n.item.type === P.JsonArray), d = $(() => n.item.type === P.JsonArray), u = H.useSubSchema(n.item.key), p = $(() => {
|
|
669
|
+
var b;
|
|
670
|
+
return n.item.type ? n.item.type : (b = u == null ? void 0 : u.value) != null && b.encrypted ? P.Redacted : void 0;
|
|
671
|
+
}), f = $(() => {
|
|
672
|
+
switch (p.value) {
|
|
673
|
+
case P.ID:
|
|
674
674
|
return {
|
|
675
675
|
tag: "KCopy",
|
|
676
676
|
attrs: {
|
|
@@ -679,7 +679,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
679
679
|
text: n.item.value
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
|
-
case
|
|
682
|
+
case P.IdArray:
|
|
683
683
|
return {
|
|
684
684
|
tag: "div",
|
|
685
685
|
additionalComponent: "KCopy",
|
|
@@ -687,7 +687,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
687
687
|
"copy-tooltip": o("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
688
688
|
}
|
|
689
689
|
};
|
|
690
|
-
case
|
|
690
|
+
case P.Redacted:
|
|
691
691
|
return {
|
|
692
692
|
tag: "KCopy",
|
|
693
693
|
attrs: {
|
|
@@ -697,7 +697,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
697
697
|
text: n.item.value
|
|
698
698
|
}
|
|
699
699
|
};
|
|
700
|
-
case
|
|
700
|
+
case P.RedactedArray:
|
|
701
701
|
return {
|
|
702
702
|
tag: "div",
|
|
703
703
|
additionalComponent: "KCopy",
|
|
@@ -706,7 +706,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
706
706
|
"copy-tooltip": o("baseConfigCard.copy.tooltip", { label: n.item.label })
|
|
707
707
|
}
|
|
708
708
|
};
|
|
709
|
-
case
|
|
709
|
+
case P.Date:
|
|
710
710
|
return {
|
|
711
711
|
tag: "div",
|
|
712
712
|
attrs: {
|
|
@@ -714,7 +714,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
714
714
|
},
|
|
715
715
|
text: a(n.item.value)
|
|
716
716
|
};
|
|
717
|
-
case
|
|
717
|
+
case P.BadgeStatus:
|
|
718
718
|
return {
|
|
719
719
|
tag: "StatusBadge",
|
|
720
720
|
attrs: {
|
|
@@ -722,12 +722,12 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
722
722
|
status: n.item.value
|
|
723
723
|
}
|
|
724
724
|
};
|
|
725
|
-
case
|
|
725
|
+
case P.BadgeTag:
|
|
726
726
|
return {
|
|
727
727
|
tag: "div",
|
|
728
728
|
additionalComponent: "KBadge"
|
|
729
729
|
};
|
|
730
|
-
case
|
|
730
|
+
case P.CopyBadge:
|
|
731
731
|
return {
|
|
732
732
|
tag: "div",
|
|
733
733
|
additionalComponent: "KCopy",
|
|
@@ -738,23 +738,23 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
738
738
|
text: n.item.value
|
|
739
739
|
}
|
|
740
740
|
};
|
|
741
|
-
case
|
|
741
|
+
case P.BadgeMethod:
|
|
742
742
|
return {
|
|
743
743
|
tag: "div",
|
|
744
744
|
additionalComponent: "KMethodBadge"
|
|
745
745
|
};
|
|
746
|
-
case
|
|
746
|
+
case P.LinkInternal:
|
|
747
747
|
return {
|
|
748
748
|
tag: "InternalLinkItem",
|
|
749
749
|
attrs: {
|
|
750
750
|
"data-testid": `${n.item.key}-internal-link`,
|
|
751
751
|
item: n.item,
|
|
752
|
-
onNavigationClick: (
|
|
753
|
-
r("navigation-click",
|
|
752
|
+
onNavigationClick: (b) => {
|
|
753
|
+
r("navigation-click", b);
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
};
|
|
757
|
-
case
|
|
757
|
+
case P.LinkExternal:
|
|
758
758
|
return {
|
|
759
759
|
tag: "KExternalLink",
|
|
760
760
|
attrs: {
|
|
@@ -763,7 +763,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
763
763
|
},
|
|
764
764
|
text: n.item.value
|
|
765
765
|
};
|
|
766
|
-
case
|
|
766
|
+
case P.Json:
|
|
767
767
|
return {
|
|
768
768
|
tag: "JsonCardItem",
|
|
769
769
|
attrs: {
|
|
@@ -771,7 +771,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
771
771
|
item: n.item
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
|
-
case
|
|
774
|
+
case P.JsonArray:
|
|
775
775
|
return {
|
|
776
776
|
tag: "div",
|
|
777
777
|
additionalComponent: "JsonCardItem",
|
|
@@ -789,21 +789,21 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
789
789
|
text: n.item.value
|
|
790
790
|
};
|
|
791
791
|
}
|
|
792
|
-
}), y =
|
|
793
|
-
return (
|
|
794
|
-
const
|
|
795
|
-
return h(),
|
|
792
|
+
}), y = R(), g = R(), { isTruncated: x } = H.useTruncationDetector(y), { isTruncated: E } = H.useTruncationDetector(g);
|
|
793
|
+
return (b, B) => {
|
|
794
|
+
const O = j("KTooltip"), T = j("KLabel"), m = j("KBadge"), A = j("KCopy");
|
|
795
|
+
return h(), L("div", Yr, [
|
|
796
796
|
M("div", {
|
|
797
797
|
class: "config-card-details-label",
|
|
798
798
|
"data-testid": `${e.item.key}-label`
|
|
799
799
|
}, [
|
|
800
|
-
|
|
801
|
-
K(
|
|
802
|
-
default:
|
|
803
|
-
K(
|
|
804
|
-
text:
|
|
800
|
+
W(b.$slots, "label", { item: e.item }, () => [
|
|
801
|
+
K(T, { "tooltip-attributes": { maxWidth: "500px" } }, Ae({
|
|
802
|
+
default: C(() => [
|
|
803
|
+
K(O, {
|
|
804
|
+
text: I(x) ? e.item.label : ""
|
|
805
805
|
}, {
|
|
806
|
-
default:
|
|
806
|
+
default: C(() => [
|
|
807
807
|
M("span", {
|
|
808
808
|
ref_key: "labelContent",
|
|
809
809
|
ref: y,
|
|
@@ -817,89 +817,89 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
817
817
|
}, [
|
|
818
818
|
c.value ? {
|
|
819
819
|
name: "tooltip",
|
|
820
|
-
fn:
|
|
820
|
+
fn: C(() => [
|
|
821
821
|
M("div", {
|
|
822
822
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
823
823
|
}, [
|
|
824
|
-
|
|
825
|
-
|
|
824
|
+
W(b.$slots, "label-tooltip", {}, () => [
|
|
825
|
+
V(N(e.item.tooltip), 1)
|
|
826
826
|
], !0)
|
|
827
|
-
], 8,
|
|
827
|
+
], 8, Wr)
|
|
828
828
|
]),
|
|
829
829
|
key: "0"
|
|
830
830
|
} : void 0
|
|
831
831
|
]), 1024)
|
|
832
832
|
], !0)
|
|
833
|
-
], 8,
|
|
833
|
+
], 8, Vr),
|
|
834
834
|
M("div", {
|
|
835
835
|
class: "config-card-details-value",
|
|
836
836
|
"data-testid": `${e.item.key}-property-value`
|
|
837
837
|
}, [
|
|
838
|
-
|
|
838
|
+
W(b.$slots, e.item.key, {
|
|
839
839
|
rowValue: e.item.value
|
|
840
840
|
}, () => [
|
|
841
|
-
l.value ? (h(),
|
|
842
|
-
(h(), D(
|
|
843
|
-
default:
|
|
844
|
-
f.value.additionalComponent === "KBadge" ? (h(),
|
|
841
|
+
l.value ? (h(), L("div", zr, [
|
|
842
|
+
(h(), D(Me(f.value.tag), Nn(Kn(f.value.attrs)), {
|
|
843
|
+
default: C(() => [
|
|
844
|
+
f.value.additionalComponent === "KBadge" ? (h(), L("div", {
|
|
845
845
|
key: 0,
|
|
846
846
|
"data-testid": `${e.item.key}-badge-tags`
|
|
847
847
|
}, [
|
|
848
|
-
(h(!0),
|
|
849
|
-
key: `${e.item.key}-badge-tag-${
|
|
848
|
+
(h(!0), L(le, null, oe(e.item.value, (S, w) => (h(), D(m, {
|
|
849
|
+
key: `${e.item.key}-badge-tag-${w}`,
|
|
850
850
|
class: "config-badge",
|
|
851
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
852
|
-
tooltip:
|
|
851
|
+
"data-testid": `${e.item.key}-badge-tag-${w}`,
|
|
852
|
+
tooltip: S,
|
|
853
853
|
"truncation-tooltip": ""
|
|
854
854
|
}, {
|
|
855
|
-
default:
|
|
856
|
-
|
|
855
|
+
default: C(() => [
|
|
856
|
+
V(N(S), 1)
|
|
857
857
|
]),
|
|
858
858
|
_: 2
|
|
859
859
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
860
|
-
], 8,
|
|
861
|
-
f.value.additionalComponent === "KCopy" ? (h(),
|
|
860
|
+
], 8, Qr)) : q("", !0),
|
|
861
|
+
f.value.additionalComponent === "KCopy" ? (h(), L("div", {
|
|
862
862
|
key: 1,
|
|
863
863
|
class: "copy-uuid-array",
|
|
864
864
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
865
865
|
}, [
|
|
866
|
-
(h(!0),
|
|
867
|
-
key: `${e.item.key}-copy-uuid-${
|
|
868
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
869
|
-
text:
|
|
866
|
+
(h(!0), L(le, null, oe(e.item.value, (S, w) => (h(), D(A, Mn({ ref_for: !0 }, f.value.childAttrs, {
|
|
867
|
+
key: `${e.item.key}-copy-uuid-${w}`,
|
|
868
|
+
"data-testid": `${e.item.key}-copy-uuid-${w}`,
|
|
869
|
+
text: S
|
|
870
870
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
871
|
-
], 8,
|
|
871
|
+
], 8, Zr)) : f.value.additionalComponent === "KMethodBadge" ? (h(), L("div", {
|
|
872
872
|
key: 2,
|
|
873
873
|
class: "method-badge-array",
|
|
874
874
|
"data-testid": `${e.item.key}-badge-methods`
|
|
875
875
|
}, [
|
|
876
|
-
(h(!0),
|
|
877
|
-
key: `${e.item.key}-badge-method-${
|
|
878
|
-
appearance: Object.values(
|
|
876
|
+
(h(!0), L(le, null, oe(e.item.value, (S, w) => (h(), D(m, {
|
|
877
|
+
key: `${e.item.key}-badge-method-${w}`,
|
|
878
|
+
appearance: Object.values(I(Yn)).includes(S.toLowerCase()) ? S.toLowerCase() : "custom",
|
|
879
879
|
class: "config-badge",
|
|
880
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
880
|
+
"data-testid": `${e.item.key}-badge-method-${w}`
|
|
881
881
|
}, {
|
|
882
|
-
default:
|
|
883
|
-
|
|
882
|
+
default: C(() => [
|
|
883
|
+
V(N(S), 1)
|
|
884
884
|
]),
|
|
885
885
|
_: 2
|
|
886
886
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
887
|
-
], 8,
|
|
888
|
-
f.value.additionalComponent === "JsonCardItem" ? (h(),
|
|
887
|
+
], 8, Xr)) : q("", !0),
|
|
888
|
+
f.value.additionalComponent === "JsonCardItem" ? (h(), L("div", {
|
|
889
889
|
key: 3,
|
|
890
890
|
"data-testid": `${n.item.key}-json-array-content`
|
|
891
891
|
}, [
|
|
892
|
-
(h(!0),
|
|
893
|
-
key: `json-array-item-${
|
|
894
|
-
index:
|
|
892
|
+
(h(!0), L(le, null, oe(e.item.value, (S, w) => (h(), D(Ut, {
|
|
893
|
+
key: `json-array-item-${w}`,
|
|
894
|
+
index: w,
|
|
895
895
|
"is-array-item": "",
|
|
896
|
-
item:
|
|
896
|
+
item: S
|
|
897
897
|
}, null, 8, ["index", "item"]))), 128))
|
|
898
|
-
], 8,
|
|
898
|
+
], 8, ei)) : (h(), D(O, {
|
|
899
899
|
key: 4,
|
|
900
|
-
text:
|
|
900
|
+
text: I(E) ? e.item.value : ""
|
|
901
901
|
}, {
|
|
902
|
-
default:
|
|
902
|
+
default: C(() => [
|
|
903
903
|
M("span", {
|
|
904
904
|
ref_key: "textContent",
|
|
905
905
|
ref: g,
|
|
@@ -911,19 +911,19 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
911
911
|
]),
|
|
912
912
|
_: 1
|
|
913
913
|
}, 16))
|
|
914
|
-
])) : (h(),
|
|
914
|
+
])) : (h(), L("div", {
|
|
915
915
|
key: 0,
|
|
916
916
|
"data-testid": `${e.item.key}-no-value`
|
|
917
|
-
}, " – ", 8,
|
|
917
|
+
}, " – ", 8, Gr))
|
|
918
918
|
], !0)
|
|
919
|
-
], 8,
|
|
919
|
+
], 8, Jr)
|
|
920
920
|
]);
|
|
921
921
|
};
|
|
922
922
|
}
|
|
923
|
-
}),
|
|
923
|
+
}), Pt = /* @__PURE__ */ ae(ni, [["__scopeId", "data-v-761f7e64"]]), ri = { class: "json-config" }, ii = {
|
|
924
924
|
key: 0,
|
|
925
925
|
class: "json-endpoint"
|
|
926
|
-
},
|
|
926
|
+
}, qt = /* @__PURE__ */ z({
|
|
927
927
|
__name: "JsonCodeBlock",
|
|
928
928
|
props: {
|
|
929
929
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -951,10 +951,10 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
951
951
|
}
|
|
952
952
|
},
|
|
953
953
|
setup(e) {
|
|
954
|
-
|
|
954
|
+
Bt((i) => ({
|
|
955
955
|
"454fa8c4": `${r.value}ch`
|
|
956
956
|
}));
|
|
957
|
-
const t = e, n =
|
|
957
|
+
const t = e, n = $(() => t.entityRecord), r = $(() => {
|
|
958
958
|
var a;
|
|
959
959
|
if (!t.fetcherUrl)
|
|
960
960
|
return 0;
|
|
@@ -963,13 +963,13 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
963
963
|
});
|
|
964
964
|
return (i, o) => {
|
|
965
965
|
const a = j("KBadge"), l = j("KCodeBlock");
|
|
966
|
-
return h(),
|
|
967
|
-
t.fetcherUrl ? (h(),
|
|
966
|
+
return h(), L("div", ri, [
|
|
967
|
+
t.fetcherUrl ? (h(), L("div", ii, [
|
|
968
968
|
K(a, {
|
|
969
969
|
appearance: t.requestMethod
|
|
970
970
|
}, {
|
|
971
|
-
default:
|
|
972
|
-
|
|
971
|
+
default: C(() => [
|
|
972
|
+
V(N(t.requestMethod), 1)
|
|
973
973
|
]),
|
|
974
974
|
_: 1
|
|
975
975
|
}, 8, ["appearance"]),
|
|
@@ -980,7 +980,7 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
980
980
|
"single-line": "",
|
|
981
981
|
theme: "dark"
|
|
982
982
|
}, null, 8, ["code"])
|
|
983
|
-
])) :
|
|
983
|
+
])) : q("", !0),
|
|
984
984
|
t.entityRecord ? (h(), D(l, {
|
|
985
985
|
key: 1,
|
|
986
986
|
id: "json-codeblock",
|
|
@@ -988,61 +988,61 @@ const Ve = Symbol("schema"), Er = (e) => {
|
|
|
988
988
|
code: JSON.stringify(n.value, null, 2),
|
|
989
989
|
language: "json",
|
|
990
990
|
theme: "dark"
|
|
991
|
-
}, null, 8, ["class", "code"])) :
|
|
991
|
+
}, null, 8, ["class", "code"])) : q("", !0)
|
|
992
992
|
]);
|
|
993
993
|
};
|
|
994
994
|
}
|
|
995
995
|
});
|
|
996
996
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
997
|
-
function
|
|
997
|
+
function Ht(e) {
|
|
998
998
|
return typeof e > "u" || e === null;
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1000
|
+
function ai(e) {
|
|
1001
1001
|
return typeof e == "object" && e !== null;
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1004
|
-
return Array.isArray(e) ? e :
|
|
1003
|
+
function oi(e) {
|
|
1004
|
+
return Array.isArray(e) ? e : Ht(e) ? [] : [e];
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function li(e, t) {
|
|
1007
1007
|
var n, r, i, o;
|
|
1008
1008
|
if (t)
|
|
1009
1009
|
for (o = Object.keys(t), n = 0, r = o.length; n < r; n += 1)
|
|
1010
1010
|
i = o[n], e[i] = t[i];
|
|
1011
1011
|
return e;
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function ci(e, t) {
|
|
1014
1014
|
var n = "", r;
|
|
1015
1015
|
for (r = 0; r < t; r += 1)
|
|
1016
1016
|
n += e;
|
|
1017
1017
|
return n;
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function si(e) {
|
|
1020
1020
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1021
1021
|
}
|
|
1022
|
-
var
|
|
1023
|
-
isNothing:
|
|
1024
|
-
isObject:
|
|
1025
|
-
toArray:
|
|
1026
|
-
repeat:
|
|
1027
|
-
isNegativeZero:
|
|
1028
|
-
extend:
|
|
1022
|
+
var ui = Ht, di = ai, fi = oi, pi = ci, mi = si, hi = li, Q = {
|
|
1023
|
+
isNothing: ui,
|
|
1024
|
+
isObject: di,
|
|
1025
|
+
toArray: fi,
|
|
1026
|
+
repeat: pi,
|
|
1027
|
+
isNegativeZero: mi,
|
|
1028
|
+
extend: hi
|
|
1029
1029
|
};
|
|
1030
|
-
function
|
|
1030
|
+
function Yt(e, t) {
|
|
1031
1031
|
var n = "", r = e.reason || "(unknown reason)";
|
|
1032
1032
|
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 += `
|
|
1033
1033
|
|
|
1034
1034
|
` + e.mark.snippet), r + " " + n) : r;
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1037
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1036
|
+
function Se(e, t) {
|
|
1037
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Yt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1038
1038
|
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
return this.name + ": " +
|
|
1039
|
+
Se.prototype = Object.create(Error.prototype);
|
|
1040
|
+
Se.prototype.constructor = Se;
|
|
1041
|
+
Se.prototype.toString = function(t) {
|
|
1042
|
+
return this.name + ": " + Yt(this, t);
|
|
1043
1043
|
};
|
|
1044
|
-
var ne =
|
|
1045
|
-
function
|
|
1044
|
+
var ne = Se;
|
|
1045
|
+
function qe(e, t, n, r, i) {
|
|
1046
1046
|
var o = "", a = "", l = Math.floor(i / 2) - 1;
|
|
1047
1047
|
return r - t > l && (o = " ... ", t = r - l + o.length), n - r > l && (a = " ...", n = r + l - a.length), {
|
|
1048
1048
|
str: o + e.slice(t, n).replace(/\t/g, "→") + a,
|
|
@@ -1050,10 +1050,10 @@ function Pe(e, t, n, r, i) {
|
|
|
1050
1050
|
// relative position
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return
|
|
1053
|
+
function He(e, t) {
|
|
1054
|
+
return Q.repeat(" ", t - e.length) + e;
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function gi(e, t) {
|
|
1057
1057
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1058
1058
|
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);
|
|
1059
1059
|
for (var n = /\r?\n|\r|\0/g, r = [0], i = [], o, a = -1; o = n.exec(e.buffer); )
|
|
@@ -1061,28 +1061,28 @@ function hi(e, t) {
|
|
|
1061
1061
|
a < 0 && (a = r.length - 1);
|
|
1062
1062
|
var l = "", c, s, d = Math.min(e.line + t.linesAfter, i.length).toString().length, u = t.maxLength - (t.indent + d + 3);
|
|
1063
1063
|
for (c = 1; c <= t.linesBefore && !(a - c < 0); c++)
|
|
1064
|
-
s =
|
|
1064
|
+
s = qe(
|
|
1065
1065
|
e.buffer,
|
|
1066
1066
|
r[a - c],
|
|
1067
1067
|
i[a - c],
|
|
1068
1068
|
e.position - (r[a] - r[a - c]),
|
|
1069
1069
|
u
|
|
1070
|
-
), l =
|
|
1070
|
+
), l = Q.repeat(" ", t.indent) + He((e.line - c + 1).toString(), d) + " | " + s.str + `
|
|
1071
1071
|
` + l;
|
|
1072
|
-
for (s =
|
|
1073
|
-
`, l +=
|
|
1072
|
+
for (s = qe(e.buffer, r[a], i[a], e.position, u), l += Q.repeat(" ", t.indent) + He((e.line + 1).toString(), d) + " | " + s.str + `
|
|
1073
|
+
`, l += Q.repeat("-", t.indent + d + 3 + s.pos) + `^
|
|
1074
1074
|
`, c = 1; c <= t.linesAfter && !(a + c >= i.length); c++)
|
|
1075
|
-
s =
|
|
1075
|
+
s = qe(
|
|
1076
1076
|
e.buffer,
|
|
1077
1077
|
r[a + c],
|
|
1078
1078
|
i[a + c],
|
|
1079
1079
|
e.position - (r[a] - r[a + c]),
|
|
1080
1080
|
u
|
|
1081
|
-
), l +=
|
|
1081
|
+
), l += Q.repeat(" ", t.indent) + He((e.line + c + 1).toString(), d) + " | " + s.str + `
|
|
1082
1082
|
`;
|
|
1083
1083
|
return l.replace(/\n$/, "");
|
|
1084
1084
|
}
|
|
1085
|
-
var
|
|
1085
|
+
var yi = gi, vi = [
|
|
1086
1086
|
"kind",
|
|
1087
1087
|
"multi",
|
|
1088
1088
|
"resolve",
|
|
@@ -1093,12 +1093,12 @@ var gi = hi, yi = [
|
|
|
1093
1093
|
"representName",
|
|
1094
1094
|
"defaultStyle",
|
|
1095
1095
|
"styleAliases"
|
|
1096
|
-
],
|
|
1096
|
+
], bi = [
|
|
1097
1097
|
"scalar",
|
|
1098
1098
|
"sequence",
|
|
1099
1099
|
"mapping"
|
|
1100
1100
|
];
|
|
1101
|
-
function
|
|
1101
|
+
function xi(e) {
|
|
1102
1102
|
var t = {};
|
|
1103
1103
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1104
1104
|
e[n].forEach(function(r) {
|
|
@@ -1106,19 +1106,19 @@ function bi(e) {
|
|
|
1106
1106
|
});
|
|
1107
1107
|
}), t;
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function Ci(e, t) {
|
|
1110
1110
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1111
|
-
if (
|
|
1111
|
+
if (vi.indexOf(n) === -1)
|
|
1112
1112
|
throw new ne('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1113
1113
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1114
1114
|
return !0;
|
|
1115
1115
|
}, this.construct = t.construct || function(n) {
|
|
1116
1116
|
return n;
|
|
1117
|
-
}, 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 =
|
|
1117
|
+
}, 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 = xi(t.styleAliases || null), bi.indexOf(this.kind) === -1)
|
|
1118
1118
|
throw new ne('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1119
1119
|
}
|
|
1120
|
-
var X =
|
|
1121
|
-
function
|
|
1120
|
+
var X = Ci;
|
|
1121
|
+
function gt(e, t) {
|
|
1122
1122
|
var n = [];
|
|
1123
1123
|
return e[t].forEach(function(r) {
|
|
1124
1124
|
var i = n.length;
|
|
@@ -1127,7 +1127,7 @@ function ht(e, t) {
|
|
|
1127
1127
|
}), n[i] = r;
|
|
1128
1128
|
}), n;
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function Ai() {
|
|
1131
1131
|
var e = {
|
|
1132
1132
|
scalar: {},
|
|
1133
1133
|
sequence: {},
|
|
@@ -1147,10 +1147,10 @@ function Ci() {
|
|
|
1147
1147
|
arguments[t].forEach(r);
|
|
1148
1148
|
return e;
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function Je(e) {
|
|
1151
1151
|
return this.extend(e);
|
|
1152
1152
|
}
|
|
1153
|
-
|
|
1153
|
+
Je.prototype.extend = function(t) {
|
|
1154
1154
|
var n = [], r = [];
|
|
1155
1155
|
if (t instanceof X)
|
|
1156
1156
|
r.push(t);
|
|
@@ -1171,47 +1171,47 @@ We.prototype.extend = function(t) {
|
|
|
1171
1171
|
if (!(o instanceof X))
|
|
1172
1172
|
throw new ne("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1173
1173
|
});
|
|
1174
|
-
var i = Object.create(
|
|
1175
|
-
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit =
|
|
1174
|
+
var i = Object.create(Je.prototype);
|
|
1175
|
+
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(r), i.compiledImplicit = gt(i, "implicit"), i.compiledExplicit = gt(i, "explicit"), i.compiledTypeMap = Ai(i.compiledImplicit, i.compiledExplicit), i;
|
|
1176
1176
|
};
|
|
1177
|
-
var
|
|
1177
|
+
var Vt = Je, Wt = new X("tag:yaml.org,2002:str", {
|
|
1178
1178
|
kind: "scalar",
|
|
1179
1179
|
construct: function(e) {
|
|
1180
1180
|
return e !== null ? e : "";
|
|
1181
1181
|
}
|
|
1182
|
-
}),
|
|
1182
|
+
}), Jt = new X("tag:yaml.org,2002:seq", {
|
|
1183
1183
|
kind: "sequence",
|
|
1184
1184
|
construct: function(e) {
|
|
1185
1185
|
return e !== null ? e : [];
|
|
1186
1186
|
}
|
|
1187
|
-
}),
|
|
1187
|
+
}), Gt = new X("tag:yaml.org,2002:map", {
|
|
1188
1188
|
kind: "mapping",
|
|
1189
1189
|
construct: function(e) {
|
|
1190
1190
|
return e !== null ? e : {};
|
|
1191
1191
|
}
|
|
1192
|
-
}),
|
|
1192
|
+
}), zt = new Vt({
|
|
1193
1193
|
explicit: [
|
|
1194
|
-
Vt,
|
|
1195
1194
|
Wt,
|
|
1196
|
-
Jt
|
|
1195
|
+
Jt,
|
|
1196
|
+
Gt
|
|
1197
1197
|
]
|
|
1198
1198
|
});
|
|
1199
|
-
function
|
|
1199
|
+
function ki(e) {
|
|
1200
1200
|
if (e === null) return !0;
|
|
1201
1201
|
var t = e.length;
|
|
1202
1202
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function _i() {
|
|
1205
1205
|
return null;
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function wi(e) {
|
|
1208
1208
|
return e === null;
|
|
1209
1209
|
}
|
|
1210
|
-
var
|
|
1210
|
+
var Qt = new X("tag:yaml.org,2002:null", {
|
|
1211
1211
|
kind: "scalar",
|
|
1212
|
-
resolve:
|
|
1213
|
-
construct:
|
|
1214
|
-
predicate:
|
|
1212
|
+
resolve: ki,
|
|
1213
|
+
construct: _i,
|
|
1214
|
+
predicate: wi,
|
|
1215
1215
|
represent: {
|
|
1216
1216
|
canonical: function() {
|
|
1217
1217
|
return "~";
|
|
@@ -1231,22 +1231,22 @@ var zt = new X("tag:yaml.org,2002:null", {
|
|
|
1231
1231
|
},
|
|
1232
1232
|
defaultStyle: "lowercase"
|
|
1233
1233
|
});
|
|
1234
|
-
function
|
|
1234
|
+
function Si(e) {
|
|
1235
1235
|
if (e === null) return !1;
|
|
1236
1236
|
var t = e.length;
|
|
1237
1237
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function Ti(e) {
|
|
1240
1240
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1242
|
+
function Ii(e) {
|
|
1243
1243
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1244
1244
|
}
|
|
1245
|
-
var
|
|
1245
|
+
var Zt = new X("tag:yaml.org,2002:bool", {
|
|
1246
1246
|
kind: "scalar",
|
|
1247
|
-
resolve:
|
|
1248
|
-
construct:
|
|
1249
|
-
predicate:
|
|
1247
|
+
resolve: Si,
|
|
1248
|
+
construct: Ti,
|
|
1249
|
+
predicate: Ii,
|
|
1250
1250
|
represent: {
|
|
1251
1251
|
lowercase: function(e) {
|
|
1252
1252
|
return e ? "true" : "false";
|
|
@@ -1260,16 +1260,16 @@ var Qt = new X("tag:yaml.org,2002:bool", {
|
|
|
1260
1260
|
},
|
|
1261
1261
|
defaultStyle: "lowercase"
|
|
1262
1262
|
});
|
|
1263
|
-
function
|
|
1263
|
+
function $i(e) {
|
|
1264
1264
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function Ei(e) {
|
|
1267
1267
|
return 48 <= e && e <= 55;
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1269
|
+
function Oi(e) {
|
|
1270
1270
|
return 48 <= e && e <= 57;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function Fi(e) {
|
|
1273
1273
|
if (e === null) return !1;
|
|
1274
1274
|
var t = e.length, n = 0, r = !1, i;
|
|
1275
1275
|
if (!t) return !1;
|
|
@@ -1286,7 +1286,7 @@ function Oi(e) {
|
|
|
1286
1286
|
if (i === "x") {
|
|
1287
1287
|
for (n++; n < t; n++)
|
|
1288
1288
|
if (i = e[n], i !== "_") {
|
|
1289
|
-
if (
|
|
1289
|
+
if (!$i(e.charCodeAt(n))) return !1;
|
|
1290
1290
|
r = !0;
|
|
1291
1291
|
}
|
|
1292
1292
|
return r && i !== "_";
|
|
@@ -1294,7 +1294,7 @@ function Oi(e) {
|
|
|
1294
1294
|
if (i === "o") {
|
|
1295
1295
|
for (n++; n < t; n++)
|
|
1296
1296
|
if (i = e[n], i !== "_") {
|
|
1297
|
-
if (
|
|
1297
|
+
if (!Ei(e.charCodeAt(n))) return !1;
|
|
1298
1298
|
r = !0;
|
|
1299
1299
|
}
|
|
1300
1300
|
return r && i !== "_";
|
|
@@ -1303,13 +1303,13 @@ function Oi(e) {
|
|
|
1303
1303
|
if (i === "_") return !1;
|
|
1304
1304
|
for (; n < t; n++)
|
|
1305
1305
|
if (i = e[n], i !== "_") {
|
|
1306
|
-
if (!
|
|
1306
|
+
if (!Oi(e.charCodeAt(n)))
|
|
1307
1307
|
return !1;
|
|
1308
1308
|
r = !0;
|
|
1309
1309
|
}
|
|
1310
1310
|
return !(!r || i === "_");
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function Li(e) {
|
|
1313
1313
|
var t = e, n = 1, r;
|
|
1314
1314
|
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), r = t[0], (r === "-" || r === "+") && (r === "-" && (n = -1), t = t.slice(1), r = t[0]), t === "0") return 0;
|
|
1315
1315
|
if (r === "0") {
|
|
@@ -1319,14 +1319,14 @@ function Fi(e) {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
return n * parseInt(t, 10);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1323
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1322
|
+
function Ri(e) {
|
|
1323
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !Q.isNegativeZero(e);
|
|
1324
1324
|
}
|
|
1325
|
-
var
|
|
1325
|
+
var Xt = new X("tag:yaml.org,2002:int", {
|
|
1326
1326
|
kind: "scalar",
|
|
1327
|
-
resolve:
|
|
1328
|
-
construct:
|
|
1329
|
-
predicate:
|
|
1327
|
+
resolve: Fi,
|
|
1328
|
+
construct: Li,
|
|
1329
|
+
predicate: Ri,
|
|
1330
1330
|
represent: {
|
|
1331
1331
|
binary: function(e) {
|
|
1332
1332
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1349,21 +1349,21 @@ var Zt = new X("tag:yaml.org,2002:int", {
|
|
|
1349
1349
|
decimal: [10, "dec"],
|
|
1350
1350
|
hexadecimal: [16, "hex"]
|
|
1351
1351
|
}
|
|
1352
|
-
}),
|
|
1352
|
+
}), Bi = new RegExp(
|
|
1353
1353
|
// 2.5e4, 2.5 and integers
|
|
1354
1354
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1355
1355
|
);
|
|
1356
|
-
function
|
|
1357
|
-
return !(e === null || !
|
|
1356
|
+
function Ni(e) {
|
|
1357
|
+
return !(e === null || !Bi.test(e) || // Quick hack to not allow integers end with `_`
|
|
1358
1358
|
// Probably should update regexp & check speed
|
|
1359
1359
|
e[e.length - 1] === "_");
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Ki(e) {
|
|
1362
1362
|
var t, n;
|
|
1363
1363
|
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);
|
|
1364
1364
|
}
|
|
1365
|
-
var
|
|
1366
|
-
function
|
|
1365
|
+
var Mi = /^[-+]?[0-9]+e/;
|
|
1366
|
+
function Di(e, t) {
|
|
1367
1367
|
var n;
|
|
1368
1368
|
if (isNaN(e))
|
|
1369
1369
|
switch (t) {
|
|
@@ -1392,38 +1392,38 @@ function Mi(e, t) {
|
|
|
1392
1392
|
case "camelcase":
|
|
1393
1393
|
return "-.Inf";
|
|
1394
1394
|
}
|
|
1395
|
-
else if (
|
|
1395
|
+
else if (Q.isNegativeZero(e))
|
|
1396
1396
|
return "-0.0";
|
|
1397
|
-
return n = e.toString(10),
|
|
1397
|
+
return n = e.toString(10), Mi.test(n) ? n.replace("e", ".e") : n;
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1400
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1399
|
+
function ji(e) {
|
|
1400
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || Q.isNegativeZero(e));
|
|
1401
1401
|
}
|
|
1402
|
-
var
|
|
1402
|
+
var en = new X("tag:yaml.org,2002:float", {
|
|
1403
1403
|
kind: "scalar",
|
|
1404
|
-
resolve:
|
|
1405
|
-
construct:
|
|
1406
|
-
predicate:
|
|
1407
|
-
represent:
|
|
1404
|
+
resolve: Ni,
|
|
1405
|
+
construct: Ki,
|
|
1406
|
+
predicate: ji,
|
|
1407
|
+
represent: Di,
|
|
1408
1408
|
defaultStyle: "lowercase"
|
|
1409
|
-
}),
|
|
1409
|
+
}), tn = zt.extend({
|
|
1410
1410
|
implicit: [
|
|
1411
|
-
zt,
|
|
1412
1411
|
Qt,
|
|
1413
1412
|
Zt,
|
|
1414
|
-
Xt
|
|
1413
|
+
Xt,
|
|
1414
|
+
en
|
|
1415
1415
|
]
|
|
1416
|
-
}),
|
|
1416
|
+
}), nn = tn, rn = new RegExp(
|
|
1417
1417
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1418
|
-
),
|
|
1418
|
+
), an = new RegExp(
|
|
1419
1419
|
"^([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]))?))?$"
|
|
1420
1420
|
);
|
|
1421
|
-
function ji(e) {
|
|
1422
|
-
return e === null ? !1 : nn.exec(e) !== null || rn.exec(e) !== null;
|
|
1423
|
-
}
|
|
1424
1421
|
function Ui(e) {
|
|
1425
|
-
|
|
1426
|
-
|
|
1422
|
+
return e === null ? !1 : rn.exec(e) !== null || an.exec(e) !== null;
|
|
1423
|
+
}
|
|
1424
|
+
function Pi(e) {
|
|
1425
|
+
var t, n, r, i, o, a, l, c = 0, s = null, d, u, p;
|
|
1426
|
+
if (t = rn.exec(e), t === null && (t = an.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1427
1427
|
if (n = +t[1], r = +t[2] - 1, i = +t[3], !t[4])
|
|
1428
1428
|
return new Date(Date.UTC(n, r, i));
|
|
1429
1429
|
if (o = +t[4], a = +t[5], l = +t[6], t[7]) {
|
|
@@ -1431,29 +1431,29 @@ function Ui(e) {
|
|
|
1431
1431
|
c += "0";
|
|
1432
1432
|
c = +c;
|
|
1433
1433
|
}
|
|
1434
|
-
return t[9] && (d = +t[10], u = +(t[11] || 0), s = (d * 60 + u) * 6e4, t[9] === "-" && (s = -s)),
|
|
1434
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), s = (d * 60 + u) * 6e4, t[9] === "-" && (s = -s)), p = new Date(Date.UTC(n, r, i, o, a, l, c)), s && p.setTime(p.getTime() - s), p;
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function qi(e) {
|
|
1437
1437
|
return e.toISOString();
|
|
1438
1438
|
}
|
|
1439
|
-
var
|
|
1439
|
+
var on = new X("tag:yaml.org,2002:timestamp", {
|
|
1440
1440
|
kind: "scalar",
|
|
1441
|
-
resolve:
|
|
1442
|
-
construct:
|
|
1441
|
+
resolve: Ui,
|
|
1442
|
+
construct: Pi,
|
|
1443
1443
|
instanceOf: Date,
|
|
1444
|
-
represent:
|
|
1444
|
+
represent: qi
|
|
1445
1445
|
});
|
|
1446
|
-
function
|
|
1446
|
+
function Hi(e) {
|
|
1447
1447
|
return e === "<<" || e === null;
|
|
1448
1448
|
}
|
|
1449
|
-
var
|
|
1449
|
+
var ln = new X("tag:yaml.org,2002:merge", {
|
|
1450
1450
|
kind: "scalar",
|
|
1451
|
-
resolve:
|
|
1452
|
-
}),
|
|
1451
|
+
resolve: Hi
|
|
1452
|
+
}), nt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1453
1453
|
\r`;
|
|
1454
|
-
function
|
|
1454
|
+
function Yi(e) {
|
|
1455
1455
|
if (e === null) return !1;
|
|
1456
|
-
var t, n, r = 0, i = e.length, o =
|
|
1456
|
+
var t, n, r = 0, i = e.length, o = nt;
|
|
1457
1457
|
for (n = 0; n < i; n++)
|
|
1458
1458
|
if (t = o.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1459
1459
|
if (t < 0) return !1;
|
|
@@ -1461,35 +1461,35 @@ function Hi(e) {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
return r % 8 === 0;
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1465
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, o =
|
|
1464
|
+
function Vi(e) {
|
|
1465
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, o = nt, a = 0, l = [];
|
|
1466
1466
|
for (t = 0; t < i; t++)
|
|
1467
1467
|
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(r.charAt(t));
|
|
1468
1468
|
return n = i % 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);
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1471
|
-
var t = "", n = 0, r, i, o = e.length, a =
|
|
1470
|
+
function Wi(e) {
|
|
1471
|
+
var t = "", n = 0, r, i, o = e.length, a = nt;
|
|
1472
1472
|
for (r = 0; r < o; r++)
|
|
1473
1473
|
r % 3 === 0 && r && (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]), n = (n << 8) + e[r];
|
|
1474
1474
|
return i = o % 3, i === 0 ? (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]) : i === 2 ? (t += a[n >> 10 & 63], t += a[n >> 4 & 63], t += a[n << 2 & 63], t += a[64]) : i === 1 && (t += a[n >> 2 & 63], t += a[n << 4 & 63], t += a[64], t += a[64]), t;
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1476
|
+
function Ji(e) {
|
|
1477
1477
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1478
1478
|
}
|
|
1479
|
-
var
|
|
1479
|
+
var cn = new X("tag:yaml.org,2002:binary", {
|
|
1480
1480
|
kind: "scalar",
|
|
1481
|
-
resolve:
|
|
1482
|
-
construct:
|
|
1483
|
-
predicate:
|
|
1484
|
-
represent:
|
|
1485
|
-
}),
|
|
1486
|
-
function
|
|
1481
|
+
resolve: Yi,
|
|
1482
|
+
construct: Vi,
|
|
1483
|
+
predicate: Ji,
|
|
1484
|
+
represent: Wi
|
|
1485
|
+
}), Gi = Object.prototype.hasOwnProperty, zi = Object.prototype.toString;
|
|
1486
|
+
function Qi(e) {
|
|
1487
1487
|
if (e === null) return !0;
|
|
1488
1488
|
var t = [], n, r, i, o, a, l = e;
|
|
1489
1489
|
for (n = 0, r = l.length; n < r; n += 1) {
|
|
1490
|
-
if (i = l[n], a = !1,
|
|
1490
|
+
if (i = l[n], a = !1, zi.call(i) !== "[object Object]") return !1;
|
|
1491
1491
|
for (o in i)
|
|
1492
|
-
if (
|
|
1492
|
+
if (Gi.call(i, o))
|
|
1493
1493
|
if (!a) a = !0;
|
|
1494
1494
|
else return !1;
|
|
1495
1495
|
if (!a) return !1;
|
|
@@ -1498,104 +1498,104 @@ function zi(e) {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
return !0;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function Zi(e) {
|
|
1502
1502
|
return e !== null ? e : [];
|
|
1503
1503
|
}
|
|
1504
|
-
var
|
|
1504
|
+
var sn = new X("tag:yaml.org,2002:omap", {
|
|
1505
1505
|
kind: "sequence",
|
|
1506
|
-
resolve:
|
|
1507
|
-
construct:
|
|
1508
|
-
}),
|
|
1509
|
-
function
|
|
1506
|
+
resolve: Qi,
|
|
1507
|
+
construct: Zi
|
|
1508
|
+
}), Xi = Object.prototype.toString;
|
|
1509
|
+
function ea(e) {
|
|
1510
1510
|
if (e === null) return !0;
|
|
1511
1511
|
var t, n, r, i, o, a = e;
|
|
1512
1512
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1513
|
-
if (r = a[t],
|
|
1513
|
+
if (r = a[t], Xi.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1)) return !1;
|
|
1514
1514
|
o[t] = [i[0], r[i[0]]];
|
|
1515
1515
|
}
|
|
1516
1516
|
return !0;
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function ta(e) {
|
|
1519
1519
|
if (e === null) return [];
|
|
1520
1520
|
var t, n, r, i, o, a = e;
|
|
1521
1521
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1)
|
|
1522
1522
|
r = a[t], i = Object.keys(r), o[t] = [i[0], r[i[0]]];
|
|
1523
1523
|
return o;
|
|
1524
1524
|
}
|
|
1525
|
-
var
|
|
1525
|
+
var un = new X("tag:yaml.org,2002:pairs", {
|
|
1526
1526
|
kind: "sequence",
|
|
1527
|
-
resolve:
|
|
1528
|
-
construct:
|
|
1529
|
-
}),
|
|
1530
|
-
function
|
|
1527
|
+
resolve: ea,
|
|
1528
|
+
construct: ta
|
|
1529
|
+
}), na = Object.prototype.hasOwnProperty;
|
|
1530
|
+
function ra(e) {
|
|
1531
1531
|
if (e === null) return !0;
|
|
1532
1532
|
var t, n = e;
|
|
1533
1533
|
for (t in n)
|
|
1534
|
-
if (
|
|
1534
|
+
if (na.call(n, t) && n[t] !== null)
|
|
1535
1535
|
return !1;
|
|
1536
1536
|
return !0;
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function ia(e) {
|
|
1539
1539
|
return e !== null ? e : {};
|
|
1540
1540
|
}
|
|
1541
|
-
var
|
|
1541
|
+
var dn = new X("tag:yaml.org,2002:set", {
|
|
1542
1542
|
kind: "mapping",
|
|
1543
|
-
resolve:
|
|
1544
|
-
construct:
|
|
1545
|
-
}),
|
|
1543
|
+
resolve: ra,
|
|
1544
|
+
construct: ia
|
|
1545
|
+
}), rt = nn.extend({
|
|
1546
1546
|
implicit: [
|
|
1547
|
-
|
|
1548
|
-
|
|
1547
|
+
on,
|
|
1548
|
+
ln
|
|
1549
1549
|
],
|
|
1550
1550
|
explicit: [
|
|
1551
|
-
ln,
|
|
1552
1551
|
cn,
|
|
1553
1552
|
sn,
|
|
1554
|
-
un
|
|
1553
|
+
un,
|
|
1554
|
+
dn
|
|
1555
1555
|
]
|
|
1556
|
-
}), pe = Object.prototype.hasOwnProperty,
|
|
1557
|
-
function
|
|
1556
|
+
}), pe = Object.prototype.hasOwnProperty, Le = 1, fn = 2, pn = 3, Re = 4, Ye = 1, aa = 2, yt = 3, oa = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, la = /[\x85\u2028\u2029]/, ca = /[,\[\]\{\}]/, mn = /^(?:!|!!|![a-z\-]+!)$/i, hn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1557
|
+
function vt(e) {
|
|
1558
1558
|
return Object.prototype.toString.call(e);
|
|
1559
1559
|
}
|
|
1560
1560
|
function ce(e) {
|
|
1561
1561
|
return e === 10 || e === 13;
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function he(e) {
|
|
1564
1564
|
return e === 9 || e === 32;
|
|
1565
1565
|
}
|
|
1566
1566
|
function re(e) {
|
|
1567
1567
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function xe(e) {
|
|
1570
1570
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function sa(e) {
|
|
1573
1573
|
var t;
|
|
1574
1574
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1576
|
+
function ua(e) {
|
|
1577
1577
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function da(e) {
|
|
1580
1580
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function bt(e) {
|
|
1583
1583
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1584
1584
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function fa(e) {
|
|
1587
1587
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1588
1588
|
(e - 65536 >> 10) + 55296,
|
|
1589
1589
|
(e - 65536 & 1023) + 56320
|
|
1590
1590
|
);
|
|
1591
1591
|
}
|
|
1592
|
-
var
|
|
1593
|
-
for (var
|
|
1594
|
-
|
|
1595
|
-
function
|
|
1596
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1592
|
+
var gn = new Array(256), yn = new Array(256);
|
|
1593
|
+
for (var ve = 0; ve < 256; ve++)
|
|
1594
|
+
gn[ve] = bt(ve) ? 1 : 0, yn[ve] = bt(ve);
|
|
1595
|
+
function pa(e, t) {
|
|
1596
|
+
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 = [];
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1598
|
+
function vn(e, t) {
|
|
1599
1599
|
var n = {
|
|
1600
1600
|
name: e.filename,
|
|
1601
1601
|
buffer: e.input.slice(0, -1),
|
|
@@ -1604,26 +1604,26 @@ function yn(e, t) {
|
|
|
1604
1604
|
line: e.line,
|
|
1605
1605
|
column: e.position - e.lineStart
|
|
1606
1606
|
};
|
|
1607
|
-
return n.snippet =
|
|
1607
|
+
return n.snippet = yi(n), new ne(t, n);
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1610
|
-
throw
|
|
1609
|
+
function k(e, t) {
|
|
1610
|
+
throw vn(e, t);
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1613
|
-
e.onWarning && e.onWarning.call(null,
|
|
1612
|
+
function Be(e, t) {
|
|
1613
|
+
e.onWarning && e.onWarning.call(null, vn(e, t));
|
|
1614
1614
|
}
|
|
1615
|
-
var
|
|
1615
|
+
var xt = {
|
|
1616
1616
|
YAML: function(t, n, r) {
|
|
1617
1617
|
var i, o, a;
|
|
1618
|
-
t.version !== null &&
|
|
1618
|
+
t.version !== null && k(t, "duplication of %YAML directive"), r.length !== 1 && k(t, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), i === null && k(t, "ill-formed argument of the YAML directive"), o = parseInt(i[1], 10), a = parseInt(i[2], 10), o !== 1 && k(t, "unacceptable YAML version of the document"), t.version = r[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Be(t, "unsupported YAML version of the document");
|
|
1619
1619
|
},
|
|
1620
1620
|
TAG: function(t, n, r) {
|
|
1621
1621
|
var i, o;
|
|
1622
|
-
r.length !== 2 &&
|
|
1622
|
+
r.length !== 2 && k(t, "TAG directive accepts exactly two arguments"), i = r[0], o = r[1], mn.test(i) || k(t, "ill-formed tag handle (first argument) of the TAG directive"), pe.call(t.tagMap, i) && k(t, 'there is a previously declared suffix for "' + i + '" tag handle'), hn.test(o) || k(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1623
1623
|
try {
|
|
1624
1624
|
o = decodeURIComponent(o);
|
|
1625
1625
|
} catch {
|
|
1626
|
-
|
|
1626
|
+
k(t, "tag prefix is malformed: " + o);
|
|
1627
1627
|
}
|
|
1628
1628
|
t.tagMap[i] = o;
|
|
1629
1629
|
}
|
|
@@ -1633,29 +1633,29 @@ function de(e, t, n, r) {
|
|
|
1633
1633
|
if (t < n) {
|
|
1634
1634
|
if (l = e.input.slice(t, n), r)
|
|
1635
1635
|
for (i = 0, o = l.length; i < o; i += 1)
|
|
1636
|
-
a = l.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1637
|
-
else
|
|
1636
|
+
a = l.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 || k(e, "expected valid JSON character");
|
|
1637
|
+
else oa.test(l) && k(e, "the stream contains non-printable characters");
|
|
1638
1638
|
e.result += l;
|
|
1639
1639
|
}
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1641
|
+
function Ct(e, t, n, r) {
|
|
1642
1642
|
var i, o, a, l;
|
|
1643
|
-
for (
|
|
1643
|
+
for (Q.isObject(n) || k(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), a = 0, l = i.length; a < l; a += 1)
|
|
1644
1644
|
o = i[a], pe.call(t, o) || (t[o] = n[o], r[o] = !0);
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1646
|
+
function Ce(e, t, n, r, i, o, a, l, c) {
|
|
1647
1647
|
var s, d;
|
|
1648
1648
|
if (Array.isArray(i))
|
|
1649
1649
|
for (i = Array.prototype.slice.call(i), s = 0, d = i.length; s < d; s += 1)
|
|
1650
|
-
Array.isArray(i[s]) &&
|
|
1651
|
-
if (typeof i == "object" &&
|
|
1650
|
+
Array.isArray(i[s]) && k(e, "nested arrays are not supported inside keys"), typeof i == "object" && vt(i[s]) === "[object Object]" && (i[s] = "[object Object]");
|
|
1651
|
+
if (typeof i == "object" && vt(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1652
1652
|
if (Array.isArray(o))
|
|
1653
1653
|
for (s = 0, d = o.length; s < d; s += 1)
|
|
1654
|
-
|
|
1654
|
+
Ct(e, t, o[s], n);
|
|
1655
1655
|
else
|
|
1656
|
-
|
|
1656
|
+
Ct(e, t, o, n);
|
|
1657
1657
|
else
|
|
1658
|
-
!e.json && !pe.call(n, i) && pe.call(t, i) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = c || e.position,
|
|
1658
|
+
!e.json && !pe.call(n, i) && pe.call(t, i) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = c || e.position, k(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(t, i, {
|
|
1659
1659
|
configurable: !0,
|
|
1660
1660
|
enumerable: !0,
|
|
1661
1661
|
writable: !0,
|
|
@@ -1663,50 +1663,50 @@ function xe(e, t, n, r, i, o, a, l, c) {
|
|
|
1663
1663
|
}) : t[i] = o, delete n[i];
|
|
1664
1664
|
return t;
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1666
|
+
function it(e) {
|
|
1667
1667
|
var t;
|
|
1668
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1668
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : k(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function G(e, t, n) {
|
|
1671
1671
|
for (var r = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1672
|
-
for (;
|
|
1672
|
+
for (; he(i); )
|
|
1673
1673
|
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1674
1674
|
if (t && i === 35)
|
|
1675
1675
|
do
|
|
1676
1676
|
i = e.input.charCodeAt(++e.position);
|
|
1677
1677
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1678
1678
|
if (ce(i))
|
|
1679
|
-
for (
|
|
1679
|
+
for (it(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32; )
|
|
1680
1680
|
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1681
1681
|
else
|
|
1682
1682
|
break;
|
|
1683
1683
|
}
|
|
1684
|
-
return n !== -1 && r !== 0 && e.lineIndent < n &&
|
|
1684
|
+
return n !== -1 && r !== 0 && e.lineIndent < n && Be(e, "deficient indentation"), r;
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function Ue(e) {
|
|
1687
1687
|
var t = e.position, n;
|
|
1688
1688
|
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 || re(n)));
|
|
1689
1689
|
}
|
|
1690
|
-
function
|
|
1691
|
-
t === 1 ? e.result += " " : t > 1 && (e.result +=
|
|
1690
|
+
function at(e, t) {
|
|
1691
|
+
t === 1 ? e.result += " " : t > 1 && (e.result += Q.repeat(`
|
|
1692
1692
|
`, t - 1));
|
|
1693
1693
|
}
|
|
1694
|
-
function
|
|
1695
|
-
var r, i, o, a, l, c, s, d, u = e.kind,
|
|
1696
|
-
if (f = e.input.charCodeAt(e.position), re(f) ||
|
|
1694
|
+
function ma(e, t, n) {
|
|
1695
|
+
var r, i, o, a, l, c, s, d, u = e.kind, p = e.result, f;
|
|
1696
|
+
if (f = e.input.charCodeAt(e.position), re(f) || xe(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), re(i) || n && xe(i)))
|
|
1697
1697
|
return !1;
|
|
1698
1698
|
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; f !== 0; ) {
|
|
1699
1699
|
if (f === 58) {
|
|
1700
|
-
if (i = e.input.charCodeAt(e.position + 1), re(i) || n &&
|
|
1700
|
+
if (i = e.input.charCodeAt(e.position + 1), re(i) || n && xe(i))
|
|
1701
1701
|
break;
|
|
1702
1702
|
} else if (f === 35) {
|
|
1703
1703
|
if (r = e.input.charCodeAt(e.position - 1), re(r))
|
|
1704
1704
|
break;
|
|
1705
1705
|
} else {
|
|
1706
|
-
if (e.position === e.lineStart &&
|
|
1706
|
+
if (e.position === e.lineStart && Ue(e) || n && xe(f))
|
|
1707
1707
|
break;
|
|
1708
1708
|
if (ce(f))
|
|
1709
|
-
if (c = e.line, s = e.lineStart, d = e.lineIndent,
|
|
1709
|
+
if (c = e.line, s = e.lineStart, d = e.lineIndent, G(e, !1, -1), e.lineIndent >= t) {
|
|
1710
1710
|
l = !0, f = e.input.charCodeAt(e.position);
|
|
1711
1711
|
continue;
|
|
1712
1712
|
} else {
|
|
@@ -1714,11 +1714,11 @@ function pa(e, t, n) {
|
|
|
1714
1714
|
break;
|
|
1715
1715
|
}
|
|
1716
1716
|
}
|
|
1717
|
-
l && (de(e, o, a, !1),
|
|
1717
|
+
l && (de(e, o, a, !1), at(e, e.line - c), o = a = e.position, l = !1), he(f) || (a = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1718
1718
|
}
|
|
1719
|
-
return de(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
1719
|
+
return de(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = p, !1);
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function ha(e, t) {
|
|
1722
1722
|
var n, r, i;
|
|
1723
1723
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1724
1724
|
return !1;
|
|
@@ -1728,10 +1728,10 @@ function ma(e, t) {
|
|
|
1728
1728
|
r = e.position, e.position++, i = e.position;
|
|
1729
1729
|
else
|
|
1730
1730
|
return !0;
|
|
1731
|
-
else ce(n) ? (de(e, r, i, !0),
|
|
1732
|
-
|
|
1731
|
+
else ce(n) ? (de(e, r, i, !0), at(e, G(e, !1, t)), r = i = e.position) : e.position === e.lineStart && Ue(e) ? k(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1732
|
+
k(e, "unexpected end of the stream within a single quoted scalar");
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function ga(e, t) {
|
|
1735
1735
|
var n, r, i, o, a, l;
|
|
1736
1736
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1737
1737
|
return !1;
|
|
@@ -1740,37 +1740,37 @@ function ha(e, t) {
|
|
|
1740
1740
|
return de(e, n, e.position, !0), e.position++, !0;
|
|
1741
1741
|
if (l === 92) {
|
|
1742
1742
|
if (de(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), ce(l))
|
|
1743
|
-
|
|
1744
|
-
else if (l < 256 &&
|
|
1745
|
-
e.result +=
|
|
1746
|
-
else if ((a =
|
|
1743
|
+
G(e, !1, t);
|
|
1744
|
+
else if (l < 256 && gn[l])
|
|
1745
|
+
e.result += yn[l], e.position++;
|
|
1746
|
+
else if ((a = ua(l)) > 0) {
|
|
1747
1747
|
for (i = a, o = 0; i > 0; i--)
|
|
1748
|
-
l = e.input.charCodeAt(++e.position), (a =
|
|
1749
|
-
e.result +=
|
|
1748
|
+
l = e.input.charCodeAt(++e.position), (a = sa(l)) >= 0 ? o = (o << 4) + a : k(e, "expected hexadecimal character");
|
|
1749
|
+
e.result += fa(o), e.position++;
|
|
1750
1750
|
} else
|
|
1751
|
-
|
|
1751
|
+
k(e, "unknown escape sequence");
|
|
1752
1752
|
n = r = e.position;
|
|
1753
|
-
} else ce(l) ? (de(e, n, r, !0),
|
|
1753
|
+
} else ce(l) ? (de(e, n, r, !0), at(e, G(e, !1, t)), n = r = e.position) : e.position === e.lineStart && Ue(e) ? k(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1754
1754
|
}
|
|
1755
|
-
|
|
1755
|
+
k(e, "unexpected end of the stream within a double quoted scalar");
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1758
|
-
var n = !0, r, i, o, a = e.tag, l, c = e.anchor, s, d, u,
|
|
1759
|
-
if (
|
|
1757
|
+
function ya(e, t) {
|
|
1758
|
+
var n = !0, r, i, o, a = e.tag, l, c = e.anchor, s, d, u, p, f, y = /* @__PURE__ */ Object.create(null), g, x, E, b;
|
|
1759
|
+
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
1760
1760
|
d = 93, f = !1, l = [];
|
|
1761
|
-
else if (
|
|
1761
|
+
else if (b === 123)
|
|
1762
1762
|
d = 125, f = !0, l = {};
|
|
1763
1763
|
else
|
|
1764
1764
|
return !1;
|
|
1765
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1766
|
-
if (
|
|
1765
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
1766
|
+
if (G(e, !0, t), b = e.input.charCodeAt(e.position), b === d)
|
|
1767
1767
|
return e.position++, e.tag = a, e.anchor = c, e.kind = f ? "mapping" : "sequence", e.result = l, !0;
|
|
1768
|
-
n ?
|
|
1768
|
+
n ? b === 44 && k(e, "expected the node content, but found ','") : k(e, "missed comma between flow collection entries"), x = g = E = null, u = p = !1, b === 63 && (s = e.input.charCodeAt(e.position + 1), re(s) && (u = p = !0, e.position++, G(e, !0, t))), r = e.line, i = e.lineStart, o = e.position, ke(e, t, Le, !1, !0), x = e.tag, g = e.result, G(e, !0, t), b = e.input.charCodeAt(e.position), (p || e.line === r) && b === 58 && (u = !0, b = e.input.charCodeAt(++e.position), G(e, !0, t), ke(e, t, Le, !1, !0), E = e.result), f ? Ce(e, l, y, x, g, E, r, i, o) : u ? l.push(Ce(e, null, y, x, g, E, r, i, o)) : l.push(g), G(e, !0, t), b = e.input.charCodeAt(e.position), b === 44 ? (n = !0, b = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1769
1769
|
}
|
|
1770
|
-
|
|
1770
|
+
k(e, "unexpected end of the stream within a flow collection");
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1773
|
-
var n, r, i =
|
|
1772
|
+
function va(e, t) {
|
|
1773
|
+
var n, r, i = Ye, o = !1, a = !1, l = t, c = 0, s = !1, d, u;
|
|
1774
1774
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1775
1775
|
r = !1;
|
|
1776
1776
|
else if (u === 62)
|
|
@@ -1779,132 +1779,132 @@ function ya(e, t) {
|
|
|
1779
1779
|
return !1;
|
|
1780
1780
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1781
1781
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1782
|
-
|
|
1783
|
-
else if ((d =
|
|
1784
|
-
d === 0 ?
|
|
1782
|
+
Ye === i ? i = u === 43 ? yt : aa : k(e, "repeat of a chomping mode identifier");
|
|
1783
|
+
else if ((d = da(u)) >= 0)
|
|
1784
|
+
d === 0 ? k(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? k(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1785
1785
|
else
|
|
1786
1786
|
break;
|
|
1787
|
-
if (
|
|
1787
|
+
if (he(u)) {
|
|
1788
1788
|
do
|
|
1789
1789
|
u = e.input.charCodeAt(++e.position);
|
|
1790
|
-
while (
|
|
1790
|
+
while (he(u));
|
|
1791
1791
|
if (u === 35)
|
|
1792
1792
|
do
|
|
1793
1793
|
u = e.input.charCodeAt(++e.position);
|
|
1794
1794
|
while (!ce(u) && u !== 0);
|
|
1795
1795
|
}
|
|
1796
1796
|
for (; u !== 0; ) {
|
|
1797
|
-
for (
|
|
1797
|
+
for (it(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!a || e.lineIndent < l) && u === 32; )
|
|
1798
1798
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
1799
1799
|
if (!a && e.lineIndent > l && (l = e.lineIndent), ce(u)) {
|
|
1800
1800
|
c++;
|
|
1801
1801
|
continue;
|
|
1802
1802
|
}
|
|
1803
1803
|
if (e.lineIndent < l) {
|
|
1804
|
-
i ===
|
|
1805
|
-
`, o ? 1 + c : c) : i ===
|
|
1804
|
+
i === yt ? e.result += Q.repeat(`
|
|
1805
|
+
`, o ? 1 + c : c) : i === Ye && o && (e.result += `
|
|
1806
1806
|
`);
|
|
1807
1807
|
break;
|
|
1808
1808
|
}
|
|
1809
|
-
for (r ?
|
|
1810
|
-
`, o ? 1 + c : c)) : s ? (s = !1, e.result +=
|
|
1811
|
-
`, c + 1)) : c === 0 ? o && (e.result += " ") : e.result +=
|
|
1812
|
-
`, c) : e.result +=
|
|
1809
|
+
for (r ? he(u) ? (s = !0, e.result += Q.repeat(`
|
|
1810
|
+
`, o ? 1 + c : c)) : s ? (s = !1, e.result += Q.repeat(`
|
|
1811
|
+
`, c + 1)) : c === 0 ? o && (e.result += " ") : e.result += Q.repeat(`
|
|
1812
|
+
`, c) : e.result += Q.repeat(`
|
|
1813
1813
|
`, o ? 1 + c : c), o = !0, a = !0, c = 0, n = e.position; !ce(u) && u !== 0; )
|
|
1814
1814
|
u = e.input.charCodeAt(++e.position);
|
|
1815
1815
|
de(e, n, e.position, !1);
|
|
1816
1816
|
}
|
|
1817
1817
|
return !0;
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function At(e, t) {
|
|
1820
1820
|
var n, r = e.tag, i = e.anchor, o = [], a, l = !1, c;
|
|
1821
1821
|
if (e.firstTabInLine !== -1) return !1;
|
|
1822
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1823
|
-
if (l = !0, e.position++,
|
|
1822
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), !(c !== 45 || (a = e.input.charCodeAt(e.position + 1), !re(a)))); ) {
|
|
1823
|
+
if (l = !0, e.position++, G(e, !0, -1) && e.lineIndent <= t) {
|
|
1824
1824
|
o.push(null), c = e.input.charCodeAt(e.position);
|
|
1825
1825
|
continue;
|
|
1826
1826
|
}
|
|
1827
|
-
if (n = e.line,
|
|
1828
|
-
|
|
1827
|
+
if (n = e.line, ke(e, t, pn, !1, !0), o.push(e.result), G(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0)
|
|
1828
|
+
k(e, "bad indentation of a sequence entry");
|
|
1829
1829
|
else if (e.lineIndent < t)
|
|
1830
1830
|
break;
|
|
1831
1831
|
}
|
|
1832
1832
|
return l ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1835
|
-
var r, i, o, a, l, c, s = e.tag, d = e.anchor, u = {},
|
|
1834
|
+
function ba(e, t, n) {
|
|
1835
|
+
var r, i, o, a, l, c, s = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), f = null, y = null, g = null, x = !1, E = !1, b;
|
|
1836
1836
|
if (e.firstTabInLine !== -1) return !1;
|
|
1837
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
1838
|
-
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1839
|
-
|
|
1837
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
1838
|
+
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, k(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (b === 63 || b === 58) && re(r))
|
|
1839
|
+
b === 63 ? (x && (Ce(e, u, p, f, y, null, a, l, c), f = y = g = null), E = !0, x = !0, i = !0) : x ? (x = !1, i = !0) : k(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = r;
|
|
1840
1840
|
else {
|
|
1841
|
-
if (a = e.line, l = e.lineStart, c = e.position, !
|
|
1841
|
+
if (a = e.line, l = e.lineStart, c = e.position, !ke(e, n, fn, !1, !0))
|
|
1842
1842
|
break;
|
|
1843
1843
|
if (e.line === o) {
|
|
1844
|
-
for (
|
|
1845
|
-
|
|
1846
|
-
if (
|
|
1847
|
-
|
|
1848
|
-
else if (
|
|
1849
|
-
|
|
1844
|
+
for (b = e.input.charCodeAt(e.position); he(b); )
|
|
1845
|
+
b = e.input.charCodeAt(++e.position);
|
|
1846
|
+
if (b === 58)
|
|
1847
|
+
b = e.input.charCodeAt(++e.position), re(b) || k(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Ce(e, u, p, f, y, null, a, l, c), f = y = g = null), E = !0, x = !1, i = !1, f = e.tag, y = e.result;
|
|
1848
|
+
else if (E)
|
|
1849
|
+
k(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1850
1850
|
else
|
|
1851
1851
|
return e.tag = s, e.anchor = d, !0;
|
|
1852
|
-
} else if (
|
|
1853
|
-
|
|
1852
|
+
} else if (E)
|
|
1853
|
+
k(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1854
1854
|
else
|
|
1855
1855
|
return e.tag = s, e.anchor = d, !0;
|
|
1856
1856
|
}
|
|
1857
|
-
if ((e.line === o || e.lineIndent > t) && (x && (a = e.line, l = e.lineStart, c = e.position),
|
|
1858
|
-
|
|
1857
|
+
if ((e.line === o || e.lineIndent > t) && (x && (a = e.line, l = e.lineStart, c = e.position), ke(e, t, Re, !0, i) && (x ? y = e.result : g = e.result), x || (Ce(e, u, p, f, y, g, a, l, c), f = y = g = null), G(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && b !== 0)
|
|
1858
|
+
k(e, "bad indentation of a mapping entry");
|
|
1859
1859
|
else if (e.lineIndent < t)
|
|
1860
1860
|
break;
|
|
1861
1861
|
}
|
|
1862
|
-
return x &&
|
|
1862
|
+
return x && Ce(e, u, p, f, y, null, a, l, c), E && (e.tag = s, e.anchor = d, e.kind = "mapping", e.result = u), E;
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1864
|
+
function xa(e) {
|
|
1865
1865
|
var t, n = !1, r = !1, i, o, a;
|
|
1866
1866
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1867
|
-
if (e.tag !== null &&
|
|
1867
|
+
if (e.tag !== null && k(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (r = !0, i = "!!", a = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
1868
1868
|
do
|
|
1869
1869
|
a = e.input.charCodeAt(++e.position);
|
|
1870
1870
|
while (a !== 0 && a !== 62);
|
|
1871
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
1871
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : k(e, "unexpected end of the stream within a verbatim tag");
|
|
1872
1872
|
} else {
|
|
1873
1873
|
for (; a !== 0 && !re(a); )
|
|
1874
|
-
a === 33 && (r ?
|
|
1875
|
-
o = e.input.slice(t, e.position),
|
|
1874
|
+
a === 33 && (r ? k(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), mn.test(i) || k(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1875
|
+
o = e.input.slice(t, e.position), ca.test(o) && k(e, "tag suffix cannot contain flow indicator characters");
|
|
1876
1876
|
}
|
|
1877
|
-
o && !
|
|
1877
|
+
o && !hn.test(o) && k(e, "tag name cannot contain such characters: " + o);
|
|
1878
1878
|
try {
|
|
1879
1879
|
o = decodeURIComponent(o);
|
|
1880
1880
|
} catch {
|
|
1881
|
-
|
|
1881
|
+
k(e, "tag name is malformed: " + o);
|
|
1882
1882
|
}
|
|
1883
|
-
return n ? e.tag = o : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + o : i === "!" ? e.tag = "!" + o : i === "!!" ? e.tag = "tag:yaml.org,2002:" + o :
|
|
1883
|
+
return n ? e.tag = o : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + o : i === "!" ? e.tag = "!" + o : i === "!!" ? e.tag = "tag:yaml.org,2002:" + o : k(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Ca(e) {
|
|
1886
1886
|
var t, n;
|
|
1887
1887
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1888
|
-
for (e.anchor !== null &&
|
|
1888
|
+
for (e.anchor !== null && k(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !re(n) && !xe(n); )
|
|
1889
1889
|
n = e.input.charCodeAt(++e.position);
|
|
1890
|
-
return e.position === t &&
|
|
1890
|
+
return e.position === t && k(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function Aa(e) {
|
|
1893
1893
|
var t, n, r;
|
|
1894
1894
|
if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
|
|
1895
|
-
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !re(r) && !
|
|
1895
|
+
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !re(r) && !xe(r); )
|
|
1896
1896
|
r = e.input.charCodeAt(++e.position);
|
|
1897
|
-
return e.position === t &&
|
|
1898
|
-
}
|
|
1899
|
-
function
|
|
1900
|
-
var o, a, l, c = 1, s = !1, d = !1, u,
|
|
1901
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l =
|
|
1902
|
-
for (;
|
|
1903
|
-
|
|
1904
|
-
if (l && (l = s || i), (c === 1 ||
|
|
1897
|
+
return e.position === t && k(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), pe.call(e.anchorMap, n) || k(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], G(e, !0, -1), !0;
|
|
1898
|
+
}
|
|
1899
|
+
function ke(e, t, n, r, i) {
|
|
1900
|
+
var o, a, l, c = 1, s = !1, d = !1, u, p, f, y, g, x;
|
|
1901
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Re === n || pn === n, r && G(e, !0, -1) && (s = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1)
|
|
1902
|
+
for (; xa(e) || Ca(e); )
|
|
1903
|
+
G(e, !0, -1) ? (s = !0, l = o, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : l = !1;
|
|
1904
|
+
if (l && (l = s || i), (c === 1 || Re === n) && (Le === n || fn === n ? g = t : g = t + 1, x = e.position - e.lineStart, c === 1 ? l && (At(e, x) || ba(e, x, g)) || ya(e, g) ? d = !0 : (a && va(e, g) || ha(e, g) || ga(e, g) ? d = !0 : Aa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && k(e, "alias node should not have any properties")) : ma(e, g, Le === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (d = l && At(e, x))), e.tag === null)
|
|
1905
1905
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1906
1906
|
else if (e.tag === "?") {
|
|
1907
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1907
|
+
for (e.result !== null && e.kind !== "scalar" && k(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, p = e.implicitTypes.length; u < p; u += 1)
|
|
1908
1908
|
if (y = e.implicitTypes[u], y.resolve(e.result)) {
|
|
1909
1909
|
e.result = y.construct(e.result), e.tag = y.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1910
1910
|
break;
|
|
@@ -1913,22 +1913,22 @@ function Ae(e, t, n, r, i) {
|
|
|
1913
1913
|
if (pe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1914
1914
|
y = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1915
1915
|
else
|
|
1916
|
-
for (y = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0,
|
|
1916
|
+
for (y = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, p = f.length; u < p; u += 1)
|
|
1917
1917
|
if (e.tag.slice(0, f[u].tag.length) === f[u].tag) {
|
|
1918
1918
|
y = f[u];
|
|
1919
1919
|
break;
|
|
1920
1920
|
}
|
|
1921
|
-
y ||
|
|
1921
|
+
y || k(e, "unknown tag !<" + e.tag + ">"), e.result !== null && y.kind !== e.kind && k(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + y.kind + '", not "' + e.kind + '"'), y.resolve(e.result, e.tag) ? (e.result = y.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : k(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1922
1922
|
}
|
|
1923
1923
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1925
|
+
function ka(e) {
|
|
1926
1926
|
var t = e.position, n, r, i, o = !1, a;
|
|
1927
|
-
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 && (
|
|
1927
|
+
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 && (G(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
1928
1928
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !re(a); )
|
|
1929
1929
|
a = e.input.charCodeAt(++e.position);
|
|
1930
|
-
for (r = e.input.slice(n, e.position), i = [], r.length < 1 &&
|
|
1931
|
-
for (;
|
|
1930
|
+
for (r = e.input.slice(n, e.position), i = [], r.length < 1 && k(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
1931
|
+
for (; he(a); )
|
|
1932
1932
|
a = e.input.charCodeAt(++e.position);
|
|
1933
1933
|
if (a === 35) {
|
|
1934
1934
|
do
|
|
@@ -1941,47 +1941,47 @@ function Aa(e) {
|
|
|
1941
1941
|
a = e.input.charCodeAt(++e.position);
|
|
1942
1942
|
i.push(e.input.slice(n, e.position));
|
|
1943
1943
|
}
|
|
1944
|
-
a !== 0 &&
|
|
1944
|
+
a !== 0 && it(e), pe.call(xt, r) ? xt[r](e, r, i) : Be(e, 'unknown document directive "' + r + '"');
|
|
1945
1945
|
}
|
|
1946
|
-
if (
|
|
1947
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
1946
|
+
if (G(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, G(e, !0, -1)) : o && k(e, "directives end mark is expected"), ke(e, e.lineIndent - 1, Re, !1, !0), G(e, !0, -1), e.checkLineBreaks && la.test(e.input.slice(t, e.position)) && Be(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ue(e)) {
|
|
1947
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, G(e, !0, -1));
|
|
1948
1948
|
return;
|
|
1949
1949
|
}
|
|
1950
1950
|
if (e.position < e.length - 1)
|
|
1951
|
-
|
|
1951
|
+
k(e, "end of the stream or a document separator is expected");
|
|
1952
1952
|
else
|
|
1953
1953
|
return;
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1955
|
+
function bn(e, t) {
|
|
1956
1956
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1957
1957
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1958
|
-
var n = new
|
|
1959
|
-
for (r !== -1 && (n.position = r,
|
|
1958
|
+
var n = new pa(e, t), r = e.indexOf("\0");
|
|
1959
|
+
for (r !== -1 && (n.position = r, k(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1960
1960
|
n.lineIndent += 1, n.position += 1;
|
|
1961
1961
|
for (; n.position < n.length - 1; )
|
|
1962
|
-
|
|
1962
|
+
ka(n);
|
|
1963
1963
|
return n.documents;
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function _a(e, t, n) {
|
|
1966
1966
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
1967
|
-
var r =
|
|
1967
|
+
var r = bn(e, n);
|
|
1968
1968
|
if (typeof t != "function")
|
|
1969
1969
|
return r;
|
|
1970
1970
|
for (var i = 0, o = r.length; i < o; i += 1)
|
|
1971
1971
|
t(r[i]);
|
|
1972
1972
|
}
|
|
1973
|
-
function
|
|
1974
|
-
var n =
|
|
1973
|
+
function wa(e, t) {
|
|
1974
|
+
var n = bn(e, t);
|
|
1975
1975
|
if (n.length !== 0) {
|
|
1976
1976
|
if (n.length === 1)
|
|
1977
1977
|
return n[0];
|
|
1978
1978
|
throw new ne("expected a single document in the stream, but found more");
|
|
1979
1979
|
}
|
|
1980
1980
|
}
|
|
1981
|
-
var
|
|
1982
|
-
loadAll:
|
|
1983
|
-
load:
|
|
1984
|
-
},
|
|
1981
|
+
var Sa = _a, Ta = wa, xn = {
|
|
1982
|
+
loadAll: Sa,
|
|
1983
|
+
load: Ta
|
|
1984
|
+
}, Cn = Object.prototype.toString, An = Object.prototype.hasOwnProperty, ot = 65279, Ia = 9, Te = 10, $a = 13, Ea = 32, Oa = 33, Fa = 34, Ge = 35, La = 37, Ra = 38, Ba = 39, Na = 42, kn = 44, Ka = 45, Ne = 58, Ma = 61, Da = 62, ja = 63, Ua = 64, _n = 91, wn = 93, Pa = 96, Sn = 123, qa = 124, Tn = 125, ee = {};
|
|
1985
1985
|
ee[0] = "\\0";
|
|
1986
1986
|
ee[7] = "\\a";
|
|
1987
1987
|
ee[8] = "\\b";
|
|
@@ -1997,7 +1997,7 @@ ee[133] = "\\N";
|
|
|
1997
1997
|
ee[160] = "\\_";
|
|
1998
1998
|
ee[8232] = "\\L";
|
|
1999
1999
|
ee[8233] = "\\P";
|
|
2000
|
-
var
|
|
2000
|
+
var Ha = [
|
|
2001
2001
|
"y",
|
|
2002
2002
|
"Y",
|
|
2003
2003
|
"yes",
|
|
@@ -2014,15 +2014,15 @@ var qa = [
|
|
|
2014
2014
|
"off",
|
|
2015
2015
|
"Off",
|
|
2016
2016
|
"OFF"
|
|
2017
|
-
],
|
|
2018
|
-
function
|
|
2017
|
+
], Ya = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2018
|
+
function Va(e, t) {
|
|
2019
2019
|
var n, r, i, o, a, l, c;
|
|
2020
2020
|
if (t === null) return {};
|
|
2021
2021
|
for (n = {}, r = Object.keys(t), i = 0, o = r.length; i < o; i += 1)
|
|
2022
|
-
a = r[i], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), c = e.compiledTypeMap.fallback[a], c &&
|
|
2022
|
+
a = r[i], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), c = e.compiledTypeMap.fallback[a], c && An.call(c.styleAliases, l) && (l = c.styleAliases[l]), n[a] = l;
|
|
2023
2023
|
return n;
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2025
|
+
function Wa(e) {
|
|
2026
2026
|
var t, n, r;
|
|
2027
2027
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2028
2028
|
n = "x", r = 2;
|
|
@@ -2032,96 +2032,96 @@ function Va(e) {
|
|
|
2032
2032
|
n = "U", r = 8;
|
|
2033
2033
|
else
|
|
2034
2034
|
throw new ne("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2035
|
-
return "\\" + n +
|
|
2035
|
+
return "\\" + n + Q.repeat("0", r - t.length) + t;
|
|
2036
2036
|
}
|
|
2037
|
-
var
|
|
2038
|
-
function
|
|
2039
|
-
this.schema = e.schema ||
|
|
2037
|
+
var Ja = 1, Ie = 2;
|
|
2038
|
+
function Ga(e) {
|
|
2039
|
+
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 = Va(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 === '"' ? Ie : Ja, 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;
|
|
2040
2040
|
}
|
|
2041
|
-
function
|
|
2042
|
-
for (var n =
|
|
2041
|
+
function kt(e, t) {
|
|
2042
|
+
for (var n = Q.repeat(" ", t), r = 0, i = -1, o = "", a, l = e.length; r < l; )
|
|
2043
2043
|
i = e.indexOf(`
|
|
2044
2044
|
`, r), i === -1 ? (a = e.slice(r), r = l) : (a = e.slice(r, i + 1), r = i + 1), a.length && a !== `
|
|
2045
2045
|
` && (o += n), o += a;
|
|
2046
2046
|
return o;
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2048
|
+
function ze(e, t) {
|
|
2049
2049
|
return `
|
|
2050
|
-
` +
|
|
2050
|
+
` + Q.repeat(" ", e.indent * t);
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function za(e, t) {
|
|
2053
2053
|
var n, r, i;
|
|
2054
2054
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1)
|
|
2055
2055
|
if (i = e.implicitTypes[n], i.resolve(t))
|
|
2056
2056
|
return !0;
|
|
2057
2057
|
return !1;
|
|
2058
2058
|
}
|
|
2059
|
-
function
|
|
2060
|
-
return e ===
|
|
2059
|
+
function Ke(e) {
|
|
2060
|
+
return e === Ea || e === Ia;
|
|
2061
2061
|
}
|
|
2062
|
-
function
|
|
2063
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2062
|
+
function $e(e) {
|
|
2063
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== ot || 65536 <= e && e <= 1114111;
|
|
2064
2064
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return
|
|
2065
|
+
function _t(e) {
|
|
2066
|
+
return $e(e) && e !== ot && e !== $a && e !== Te;
|
|
2067
2067
|
}
|
|
2068
|
-
function
|
|
2069
|
-
var r =
|
|
2068
|
+
function wt(e, t, n) {
|
|
2069
|
+
var r = _t(e), i = r && !Ke(e);
|
|
2070
2070
|
return (
|
|
2071
2071
|
// ns-plain-safe
|
|
2072
2072
|
(n ? (
|
|
2073
2073
|
// c = flow-in
|
|
2074
2074
|
r
|
|
2075
|
-
) : r && e !==
|
|
2075
|
+
) : r && e !== kn && e !== _n && e !== wn && e !== Sn && e !== Tn) && e !== Ge && !(t === Ne && !i) || _t(t) && !Ke(t) && e === Ge || t === Ne && i
|
|
2076
2076
|
);
|
|
2077
2077
|
}
|
|
2078
|
-
function za(e) {
|
|
2079
|
-
return Ie(e) && e !== at && !Ne(e) && e !== Na && e !== Da && e !== Be && e !== An && e !== kn && e !== _n && e !== wn && e !== Sn && e !== Je && e !== La && e !== Ba && e !== Ea && e !== Pa && e !== Ka && e !== Ma && e !== Ra && e !== Oa && e !== Fa && e !== ja && e !== Ua;
|
|
2080
|
-
}
|
|
2081
2078
|
function Qa(e) {
|
|
2082
|
-
return !
|
|
2079
|
+
return $e(e) && e !== ot && !Ke(e) && e !== Ka && e !== ja && e !== Ne && e !== kn && e !== _n && e !== wn && e !== Sn && e !== Tn && e !== Ge && e !== Ra && e !== Na && e !== Oa && e !== qa && e !== Ma && e !== Da && e !== Ba && e !== Fa && e !== La && e !== Ua && e !== Pa;
|
|
2080
|
+
}
|
|
2081
|
+
function Za(e) {
|
|
2082
|
+
return !Ke(e) && e !== Ne;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function we(e, t) {
|
|
2085
2085
|
var n = e.charCodeAt(t), r;
|
|
2086
2086
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
|
|
2087
2087
|
}
|
|
2088
|
-
function
|
|
2088
|
+
function In(e) {
|
|
2089
2089
|
var t = /^\n* /;
|
|
2090
2090
|
return t.test(e);
|
|
2091
2091
|
}
|
|
2092
|
-
var
|
|
2093
|
-
function
|
|
2094
|
-
var c, s = 0, d = null, u = !1,
|
|
2092
|
+
var $n = 1, Qe = 2, En = 3, On = 4, be = 5;
|
|
2093
|
+
function Xa(e, t, n, r, i, o, a, l) {
|
|
2094
|
+
var c, s = 0, d = null, u = !1, p = !1, f = r !== -1, y = -1, g = Qa(we(e, 0)) && Za(we(e, e.length - 1));
|
|
2095
2095
|
if (t || a)
|
|
2096
2096
|
for (c = 0; c < e.length; s >= 65536 ? c += 2 : c++) {
|
|
2097
|
-
if (s =
|
|
2098
|
-
return
|
|
2099
|
-
g = g &&
|
|
2097
|
+
if (s = we(e, c), !$e(s))
|
|
2098
|
+
return be;
|
|
2099
|
+
g = g && wt(s, d, l), d = s;
|
|
2100
2100
|
}
|
|
2101
2101
|
else {
|
|
2102
2102
|
for (c = 0; c < e.length; s >= 65536 ? c += 2 : c++) {
|
|
2103
|
-
if (s =
|
|
2104
|
-
u = !0, f && (
|
|
2103
|
+
if (s = we(e, c), s === Te)
|
|
2104
|
+
u = !0, f && (p = p || // Foldable line = too long, and not more-indented.
|
|
2105
2105
|
c - y - 1 > r && e[y + 1] !== " ", y = c);
|
|
2106
|
-
else if (
|
|
2107
|
-
return
|
|
2108
|
-
g = g &&
|
|
2106
|
+
else if (!$e(s))
|
|
2107
|
+
return be;
|
|
2108
|
+
g = g && wt(s, d, l), d = s;
|
|
2109
2109
|
}
|
|
2110
|
-
|
|
2110
|
+
p = p || f && c - y - 1 > r && e[y + 1] !== " ";
|
|
2111
2111
|
}
|
|
2112
|
-
return !u && !
|
|
2112
|
+
return !u && !p ? g && !a && !i(e) ? $n : o === Ie ? be : Qe : n > 9 && In(e) ? be : a ? o === Ie ? be : Qe : p ? On : En;
|
|
2113
2113
|
}
|
|
2114
|
-
function
|
|
2114
|
+
function eo(e, t, n, r, i) {
|
|
2115
2115
|
e.dump = function() {
|
|
2116
2116
|
if (t.length === 0)
|
|
2117
|
-
return e.quotingType ===
|
|
2118
|
-
if (!e.noCompatMode && (
|
|
2119
|
-
return e.quotingType ===
|
|
2117
|
+
return e.quotingType === Ie ? '""' : "''";
|
|
2118
|
+
if (!e.noCompatMode && (Ha.indexOf(t) !== -1 || Ya.test(t)))
|
|
2119
|
+
return e.quotingType === Ie ? '"' + t + '"' : "'" + t + "'";
|
|
2120
2120
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2121
2121
|
function c(s) {
|
|
2122
|
-
return
|
|
2122
|
+
return za(e, s);
|
|
2123
2123
|
}
|
|
2124
|
-
switch (
|
|
2124
|
+
switch (Xa(
|
|
2125
2125
|
t,
|
|
2126
2126
|
l,
|
|
2127
2127
|
e.indent,
|
|
@@ -2131,47 +2131,47 @@ function Xa(e, t, n, r, i) {
|
|
|
2131
2131
|
e.forceQuotes && !r,
|
|
2132
2132
|
i
|
|
2133
2133
|
)) {
|
|
2134
|
-
case
|
|
2134
|
+
case $n:
|
|
2135
2135
|
return t;
|
|
2136
|
-
case
|
|
2136
|
+
case Qe:
|
|
2137
2137
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2138
|
-
case $n:
|
|
2139
|
-
return "|" + wt(t, e.indent) + St(At(t, o));
|
|
2140
2138
|
case En:
|
|
2141
|
-
return "
|
|
2142
|
-
case
|
|
2143
|
-
return
|
|
2139
|
+
return "|" + St(t, e.indent) + Tt(kt(t, o));
|
|
2140
|
+
case On:
|
|
2141
|
+
return ">" + St(t, e.indent) + Tt(kt(to(t, a), o));
|
|
2142
|
+
case be:
|
|
2143
|
+
return '"' + no(t) + '"';
|
|
2144
2144
|
default:
|
|
2145
2145
|
throw new ne("impossible error: invalid scalar style");
|
|
2146
2146
|
}
|
|
2147
2147
|
}();
|
|
2148
2148
|
}
|
|
2149
|
-
function
|
|
2150
|
-
var n =
|
|
2149
|
+
function St(e, t) {
|
|
2150
|
+
var n = In(e) ? String(t) : "", r = e[e.length - 1] === `
|
|
2151
2151
|
`, i = r && (e[e.length - 2] === `
|
|
2152
2152
|
` || e === `
|
|
2153
2153
|
`), o = i ? "+" : r ? "" : "-";
|
|
2154
2154
|
return n + o + `
|
|
2155
2155
|
`;
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2157
|
+
function Tt(e) {
|
|
2158
2158
|
return e[e.length - 1] === `
|
|
2159
2159
|
` ? e.slice(0, -1) : e;
|
|
2160
2160
|
}
|
|
2161
|
-
function
|
|
2161
|
+
function to(e, t) {
|
|
2162
2162
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2163
2163
|
var s = e.indexOf(`
|
|
2164
2164
|
`);
|
|
2165
|
-
return s = s !== -1 ? s : e.length, n.lastIndex = s,
|
|
2165
|
+
return s = s !== -1 ? s : e.length, n.lastIndex = s, It(e.slice(0, s), t);
|
|
2166
2166
|
}(), i = e[0] === `
|
|
2167
2167
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
2168
2168
|
var l = a[1], c = a[2];
|
|
2169
2169
|
o = c[0] === " ", r += l + (!i && !o && c !== "" ? `
|
|
2170
|
-
` : "") +
|
|
2170
|
+
` : "") + It(c, t), i = o;
|
|
2171
2171
|
}
|
|
2172
2172
|
return r;
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2174
|
+
function It(e, t) {
|
|
2175
2175
|
if (e === "" || e[0] === " ") return e;
|
|
2176
2176
|
for (var n = / [^ ]/g, r, i = 0, o, a = 0, l = 0, c = ""; r = n.exec(e); )
|
|
2177
2177
|
l = r.index, l - i > t && (o = a > i ? a : l, c += `
|
|
@@ -2180,31 +2180,31 @@ function Tt(e, t) {
|
|
|
2180
2180
|
`, e.length - i > t && a > i ? c += e.slice(i, a) + `
|
|
2181
2181
|
` + e.slice(a + 1) : c += e.slice(i), c.slice(1);
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function no(e) {
|
|
2184
2184
|
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2185
|
-
n =
|
|
2185
|
+
n = we(e, i), r = ee[n], !r && $e(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Wa(n);
|
|
2186
2186
|
return t;
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2188
|
+
function ro(e, t, n) {
|
|
2189
2189
|
var r = "", i = e.tag, o, a, l;
|
|
2190
2190
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2191
2191
|
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (se(e, t, l, !1, !1) || typeof l > "u" && se(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2192
2192
|
e.tag = i, e.dump = "[" + r + "]";
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2194
|
+
function $t(e, t, n, r) {
|
|
2195
2195
|
var i = "", o = e.tag, a, l, c;
|
|
2196
2196
|
for (a = 0, l = n.length; a < l; a += 1)
|
|
2197
|
-
c = n[a], e.replacer && (c = e.replacer.call(n, String(a), c)), (se(e, t + 1, c, !0, !0, !1, !0) || typeof c > "u" && se(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i +=
|
|
2197
|
+
c = n[a], e.replacer && (c = e.replacer.call(n, String(a), c)), (se(e, t + 1, c, !0, !0, !1, !0) || typeof c > "u" && se(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += ze(e, t)), e.dump && Te === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2198
2198
|
e.tag = o, e.dump = i || "[]";
|
|
2199
2199
|
}
|
|
2200
|
-
function
|
|
2200
|
+
function io(e, t, n) {
|
|
2201
2201
|
var r = "", i = e.tag, o = Object.keys(n), a, l, c, s, d;
|
|
2202
2202
|
for (a = 0, l = o.length; a < l; a += 1)
|
|
2203
2203
|
d = "", r !== "" && (d += ", "), e.condenseFlow && (d += '"'), c = o[a], s = n[c], e.replacer && (s = e.replacer.call(n, c, s)), se(e, t, c, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), se(e, t, s, !1, !1) && (d += e.dump, r += d));
|
|
2204
2204
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2205
2205
|
}
|
|
2206
|
-
function
|
|
2207
|
-
var i = "", o = e.tag, a = Object.keys(n), l, c, s, d, u,
|
|
2206
|
+
function ao(e, t, n, r) {
|
|
2207
|
+
var i = "", o = e.tag, a = Object.keys(n), l, c, s, d, u, p;
|
|
2208
2208
|
if (e.sortKeys === !0)
|
|
2209
2209
|
a.sort();
|
|
2210
2210
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2212,17 +2212,17 @@ function io(e, t, n, r) {
|
|
|
2212
2212
|
else if (e.sortKeys)
|
|
2213
2213
|
throw new ne("sortKeys must be a boolean or a function");
|
|
2214
2214
|
for (l = 0, c = a.length; l < c; l += 1)
|
|
2215
|
-
|
|
2215
|
+
p = "", (!r || i !== "") && (p += ze(e, t)), s = a[l], d = n[s], e.replacer && (d = e.replacer.call(n, s, d)), se(e, t + 1, s, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Te === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, u && (p += ze(e, t)), se(e, t + 1, d, !0, u) && (e.dump && Te === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, i += p));
|
|
2216
2216
|
e.tag = o, e.dump = i || "{}";
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2218
|
+
function Et(e, t, n) {
|
|
2219
2219
|
var r, i, o, a, l, c;
|
|
2220
2220
|
for (i = n ? e.explicitTypes : e.implicitTypes, o = 0, a = i.length; o < a; o += 1)
|
|
2221
2221
|
if (l = i[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
2222
2222
|
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2223
|
-
if (c = e.styleMap[l.tag] || l.defaultStyle,
|
|
2223
|
+
if (c = e.styleMap[l.tag] || l.defaultStyle, Cn.call(l.represent) === "[object Function]")
|
|
2224
2224
|
r = l.represent(t, c);
|
|
2225
|
-
else if (
|
|
2225
|
+
else if (An.call(l.represent, c))
|
|
2226
2226
|
r = l.represent[c](t, c);
|
|
2227
2227
|
else
|
|
2228
2228
|
throw new ne("!<" + l.tag + '> tag resolver accepts not "' + c + '" style');
|
|
@@ -2233,19 +2233,19 @@ function $t(e, t, n) {
|
|
|
2233
2233
|
return !1;
|
|
2234
2234
|
}
|
|
2235
2235
|
function se(e, t, n, r, i, o, a) {
|
|
2236
|
-
e.tag = null, e.dump = n,
|
|
2237
|
-
var l =
|
|
2236
|
+
e.tag = null, e.dump = n, Et(e, n, !1) || Et(e, n, !0);
|
|
2237
|
+
var l = Cn.call(e.dump), c = r, s;
|
|
2238
2238
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
2239
|
-
var d = l === "[object Object]" || l === "[object Array]", u,
|
|
2240
|
-
if (d && (u = e.duplicates.indexOf(n),
|
|
2239
|
+
var d = l === "[object Object]" || l === "[object Array]", u, p;
|
|
2240
|
+
if (d && (u = e.duplicates.indexOf(n), p = u !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && t > 0) && (i = !1), p && e.usedDuplicates[u])
|
|
2241
2241
|
e.dump = "*ref_" + u;
|
|
2242
2242
|
else {
|
|
2243
|
-
if (d &&
|
|
2244
|
-
r && Object.keys(e.dump).length !== 0 ? (
|
|
2243
|
+
if (d && p && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2244
|
+
r && Object.keys(e.dump).length !== 0 ? (ao(e, t, e.dump, i), p && (e.dump = "&ref_" + u + e.dump)) : (io(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2245
2245
|
else if (l === "[object Array]")
|
|
2246
|
-
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ?
|
|
2246
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? $t(e, t - 1, e.dump, i) : $t(e, t, e.dump, i), p && (e.dump = "&ref_" + u + e.dump)) : (ro(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2247
2247
|
else if (l === "[object String]")
|
|
2248
|
-
e.tag !== "?" &&
|
|
2248
|
+
e.tag !== "?" && eo(e, e.dump, t, o, c);
|
|
2249
2249
|
else {
|
|
2250
2250
|
if (l === "[object Undefined]")
|
|
2251
2251
|
return !1;
|
|
@@ -2258,71 +2258,71 @@ function se(e, t, n, r, i, o, a) {
|
|
|
2258
2258
|
}
|
|
2259
2259
|
return !0;
|
|
2260
2260
|
}
|
|
2261
|
-
function
|
|
2261
|
+
function oo(e, t) {
|
|
2262
2262
|
var n = [], r = [], i, o;
|
|
2263
|
-
for (
|
|
2263
|
+
for (Ze(e, n, r), i = 0, o = r.length; i < o; i += 1)
|
|
2264
2264
|
t.duplicates.push(n[r[i]]);
|
|
2265
2265
|
t.usedDuplicates = new Array(o);
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2267
|
+
function Ze(e, t, n) {
|
|
2268
2268
|
var r, i, o;
|
|
2269
2269
|
if (e !== null && typeof e == "object")
|
|
2270
2270
|
if (i = t.indexOf(e), i !== -1)
|
|
2271
2271
|
n.indexOf(i) === -1 && n.push(i);
|
|
2272
2272
|
else if (t.push(e), Array.isArray(e))
|
|
2273
2273
|
for (i = 0, o = e.length; i < o; i += 1)
|
|
2274
|
-
|
|
2274
|
+
Ze(e[i], t, n);
|
|
2275
2275
|
else
|
|
2276
2276
|
for (r = Object.keys(e), i = 0, o = r.length; i < o; i += 1)
|
|
2277
|
-
|
|
2277
|
+
Ze(e[r[i]], t, n);
|
|
2278
2278
|
}
|
|
2279
|
-
function
|
|
2279
|
+
function lo(e, t) {
|
|
2280
2280
|
t = t || {};
|
|
2281
|
-
var n = new
|
|
2282
|
-
n.noRefs ||
|
|
2281
|
+
var n = new Ga(t);
|
|
2282
|
+
n.noRefs || oo(e, n);
|
|
2283
2283
|
var r = e;
|
|
2284
2284
|
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), se(n, 0, r, !0, !0) ? n.dump + `
|
|
2285
2285
|
` : "";
|
|
2286
2286
|
}
|
|
2287
|
-
var
|
|
2288
|
-
dump:
|
|
2287
|
+
var co = lo, so = {
|
|
2288
|
+
dump: co
|
|
2289
2289
|
};
|
|
2290
|
-
function
|
|
2290
|
+
function lt(e, t) {
|
|
2291
2291
|
return function() {
|
|
2292
2292
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2293
2293
|
};
|
|
2294
2294
|
}
|
|
2295
|
-
var
|
|
2296
|
-
binary:
|
|
2297
|
-
float:
|
|
2298
|
-
map:
|
|
2299
|
-
null:
|
|
2300
|
-
pairs:
|
|
2301
|
-
set:
|
|
2302
|
-
timestamp:
|
|
2303
|
-
bool:
|
|
2304
|
-
int:
|
|
2305
|
-
merge:
|
|
2306
|
-
omap:
|
|
2307
|
-
seq:
|
|
2308
|
-
str:
|
|
2309
|
-
},
|
|
2310
|
-
Type:
|
|
2311
|
-
Schema:
|
|
2312
|
-
FAILSAFE_SCHEMA:
|
|
2313
|
-
JSON_SCHEMA:
|
|
2314
|
-
CORE_SCHEMA:
|
|
2315
|
-
DEFAULT_SCHEMA:
|
|
2316
|
-
load:
|
|
2317
|
-
loadAll:
|
|
2318
|
-
dump:
|
|
2319
|
-
YAMLException:
|
|
2320
|
-
types:
|
|
2321
|
-
safeLoad:
|
|
2322
|
-
safeLoadAll:
|
|
2323
|
-
safeDump:
|
|
2295
|
+
var uo = X, fo = Vt, po = zt, mo = tn, ho = nn, go = rt, yo = xn.load, vo = xn.loadAll, bo = so.dump, xo = ne, Co = {
|
|
2296
|
+
binary: cn,
|
|
2297
|
+
float: en,
|
|
2298
|
+
map: Gt,
|
|
2299
|
+
null: Qt,
|
|
2300
|
+
pairs: un,
|
|
2301
|
+
set: dn,
|
|
2302
|
+
timestamp: on,
|
|
2303
|
+
bool: Zt,
|
|
2304
|
+
int: Xt,
|
|
2305
|
+
merge: ln,
|
|
2306
|
+
omap: sn,
|
|
2307
|
+
seq: Jt,
|
|
2308
|
+
str: Wt
|
|
2309
|
+
}, Ao = lt("safeLoad", "load"), ko = lt("safeLoadAll", "loadAll"), _o = lt("safeDump", "dump"), wo = {
|
|
2310
|
+
Type: uo,
|
|
2311
|
+
Schema: fo,
|
|
2312
|
+
FAILSAFE_SCHEMA: po,
|
|
2313
|
+
JSON_SCHEMA: mo,
|
|
2314
|
+
CORE_SCHEMA: ho,
|
|
2315
|
+
DEFAULT_SCHEMA: go,
|
|
2316
|
+
load: yo,
|
|
2317
|
+
loadAll: vo,
|
|
2318
|
+
dump: bo,
|
|
2319
|
+
YAMLException: xo,
|
|
2320
|
+
types: Co,
|
|
2321
|
+
safeLoad: Ao,
|
|
2322
|
+
safeLoadAll: ko,
|
|
2323
|
+
safeDump: _o
|
|
2324
2324
|
};
|
|
2325
|
-
const
|
|
2325
|
+
const So = { class: "yaml-config" }, Fn = /* @__PURE__ */ z({
|
|
2326
2326
|
__name: "YamlCodeBlock",
|
|
2327
2327
|
props: {
|
|
2328
2328
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2332,24 +2332,24 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2332
2332
|
}
|
|
2333
2333
|
},
|
|
2334
2334
|
setup(e) {
|
|
2335
|
-
const t = e, n =
|
|
2335
|
+
const t = e, n = $(() => {
|
|
2336
2336
|
const r = Object.fromEntries(Object.entries(t.entityRecord).filter(([, i]) => i !== null && i !== "" && (Array.isArray(i) ? i.length !== 0 : !0)));
|
|
2337
|
-
return Object.keys(r).length === 0 && r.constructor === Object ? "" :
|
|
2337
|
+
return Object.keys(r).length === 0 && r.constructor === Object ? "" : wo.dump(r).trim();
|
|
2338
2338
|
});
|
|
2339
2339
|
return (r, i) => {
|
|
2340
2340
|
const o = j("KCodeBlock");
|
|
2341
|
-
return h(),
|
|
2341
|
+
return h(), L("div", So, [
|
|
2342
2342
|
t.entityRecord ? (h(), D(o, {
|
|
2343
2343
|
key: 0,
|
|
2344
2344
|
id: "yaml-codeblock",
|
|
2345
2345
|
code: n.value,
|
|
2346
2346
|
language: "yaml",
|
|
2347
2347
|
theme: "dark"
|
|
2348
|
-
}, null, 8, ["code"])) :
|
|
2348
|
+
}, null, 8, ["code"])) : q("", !0)
|
|
2349
2349
|
]);
|
|
2350
2350
|
};
|
|
2351
2351
|
}
|
|
2352
|
-
}),
|
|
2352
|
+
}), To = { class: "terraform-config" }, te = " ", Ln = /* @__PURE__ */ z({
|
|
2353
2353
|
__name: "TerraformCodeBlock",
|
|
2354
2354
|
props: {
|
|
2355
2355
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2360,7 +2360,7 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2360
2360
|
entityType: {
|
|
2361
2361
|
type: String,
|
|
2362
2362
|
required: !0,
|
|
2363
|
-
validator: (e) =>
|
|
2363
|
+
validator: (e) => De.includes(e)
|
|
2364
2364
|
},
|
|
2365
2365
|
credentialType: {
|
|
2366
2366
|
type: String,
|
|
@@ -2382,9 +2382,9 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2382
2382
|
if (c && (u += `${d}${c} = {
|
|
2383
2383
|
`), l === null)
|
|
2384
2384
|
return c ? u += `${d}}` : u = "{}", u;
|
|
2385
|
-
const
|
|
2385
|
+
const p = Object.fromEntries(Object.entries(l).filter(([, y]) => y !== null));
|
|
2386
2386
|
let f = "";
|
|
2387
|
-
for (const [y, g] of Object.entries(
|
|
2387
|
+
for (const [y, g] of Object.entries(p))
|
|
2388
2388
|
Array.isArray(g) ? g.length === 0 ? f = "[]" : (f = `[
|
|
2389
2389
|
`, f += i(g, void 0, d), f += `${d}${te}]`) : g && typeof g == "object" ? (f = `{
|
|
2390
2390
|
`, f += r(g, void 0, d), f += `${d}${te}}`) : f = String(g ?? ""), typeof g == "string" && (f = `"${f}"`), u += `${d}${te}${y} = ${f}
|
|
@@ -2398,10 +2398,10 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2398
2398
|
let u = "";
|
|
2399
2399
|
c && (l.length === 0 ? u += `${d}${c} = [` : u += `${d}${c} = [
|
|
2400
2400
|
`);
|
|
2401
|
-
for (let
|
|
2402
|
-
const f = l[
|
|
2401
|
+
for (let p = 0; p < l.length; p++) {
|
|
2402
|
+
const f = l[p];
|
|
2403
2403
|
typeof f == "object" ? (u += `${d}${te}{
|
|
2404
|
-
`, u += r(f, void 0, d), u += `${d}${te}}`) : typeof f == "string" ? u += `${d}${te}"${f}"` : u += `${d}${te}${String(f ?? "")}`,
|
|
2404
|
+
`, u += r(f, void 0, d), u += `${d}${te}}`) : typeof f == "string" ? u += `${d}${te}"${f}"` : u += `${d}${te}${String(f ?? "")}`, p < l.length - 1 && (u += ","), u += `
|
|
2405
2405
|
`;
|
|
2406
2406
|
}
|
|
2407
2407
|
return c && (l.length === 0 ? u += `]
|
|
@@ -2412,16 +2412,16 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2412
2412
|
for (const [s, d] of Object.entries(l))
|
|
2413
2413
|
Array.isArray(d) ? c += i(d, s) : typeof d == "object" ? c += r(d, s) : c += n(d, s);
|
|
2414
2414
|
return c;
|
|
2415
|
-
}, a =
|
|
2416
|
-
var u,
|
|
2417
|
-
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([,
|
|
2415
|
+
}, a = $(() => {
|
|
2416
|
+
var u, p, f, y, g, x, E;
|
|
2417
|
+
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, b]) => b != null)), c = t.entityRecord.config ? Object.fromEntries(Object.entries((u = t.entityRecord) == null ? void 0 : u.config).filter(([, b]) => b != null)) : void 0;
|
|
2418
2418
|
if (c && (l.config = c), Object.keys(l).length === 0)
|
|
2419
2419
|
return "";
|
|
2420
2420
|
delete l.id;
|
|
2421
2421
|
let s = "", d = "";
|
|
2422
|
-
if ((
|
|
2423
|
-
const
|
|
2424
|
-
delete l.name, s += `resource "konnect_gateway_plugin_${
|
|
2422
|
+
if ((p = l.service) != null && p.id ? (d = "service", delete l.service) : (f = l.route) != null && f.id ? (d = "route", delete l.route) : (y = l.consumer) != null && y.id ? (d = "consumer", delete l.consumer) : (g = l.consumer_group) != null && g.id ? (d = "consumer_group", delete l.consumer_group) : (x = l.certificate) != null && x.id ? (d = "certificate", delete l.certificate) : (E = l.set) != null && E.id && (d = "set", delete l.set), t.entityType === "plugin") {
|
|
2423
|
+
const b = t.credentialType.replace(/-/g, "_") || (l.name + "").replace(/-/g, "_");
|
|
2424
|
+
delete l.name, s += `resource "konnect_gateway_plugin_${b}" "my_${b}" {
|
|
2425
2425
|
`;
|
|
2426
2426
|
} else
|
|
2427
2427
|
s += `resource "konnect_gateway_${t.entityType}" "my_${t.entityType}" {
|
|
@@ -2435,24 +2435,24 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2435
2435
|
});
|
|
2436
2436
|
return (l, c) => {
|
|
2437
2437
|
const s = j("KCodeBlock");
|
|
2438
|
-
return h(),
|
|
2438
|
+
return h(), L("div", To, [
|
|
2439
2439
|
t.entityRecord ? (h(), D(s, {
|
|
2440
2440
|
key: 0,
|
|
2441
2441
|
id: "terraform-codeblock",
|
|
2442
2442
|
code: a.value,
|
|
2443
2443
|
language: "terraform",
|
|
2444
2444
|
theme: "dark"
|
|
2445
|
-
}, null, 8, ["code"])) :
|
|
2445
|
+
}, null, 8, ["code"])) : q("", !0)
|
|
2446
2446
|
]);
|
|
2447
2447
|
};
|
|
2448
2448
|
}
|
|
2449
|
-
}),
|
|
2449
|
+
}), Io = {
|
|
2450
2450
|
key: 0,
|
|
2451
2451
|
class: "config-card-display-form"
|
|
2452
|
-
},
|
|
2452
|
+
}, $o = ["data-testid"], Eo = {
|
|
2453
2453
|
key: 0,
|
|
2454
2454
|
class: "config-card-prop-section-title"
|
|
2455
|
-
},
|
|
2455
|
+
}, Oo = /* @__PURE__ */ z({
|
|
2456
2456
|
__name: "ConfigCardDisplay",
|
|
2457
2457
|
props: {
|
|
2458
2458
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2464,7 +2464,7 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2464
2464
|
entityType: {
|
|
2465
2465
|
type: String,
|
|
2466
2466
|
required: !0,
|
|
2467
|
-
validator: (e) =>
|
|
2467
|
+
validator: (e) => De.includes(e)
|
|
2468
2468
|
},
|
|
2469
2469
|
propertyCollections: {
|
|
2470
2470
|
type: Object,
|
|
@@ -2496,29 +2496,29 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2496
2496
|
}
|
|
2497
2497
|
},
|
|
2498
2498
|
setup(e) {
|
|
2499
|
-
const t = e, n =
|
|
2499
|
+
const t = e, n = Xe(), { i18n: { t: r } } = H.useI18n(), i = (a) => !!(a.tooltip || n[`${a.key}-label-tooltip`]), o = $(() => {
|
|
2500
2500
|
if (!t.record)
|
|
2501
2501
|
return t.record;
|
|
2502
2502
|
const a = JSON.parse(JSON.stringify(t.record));
|
|
2503
2503
|
return delete a.created_at, delete a.updated_at, a;
|
|
2504
2504
|
});
|
|
2505
|
-
return (a, l) => (h(),
|
|
2506
|
-
e.format === "structured" ? (h(),
|
|
2507
|
-
(h(!0),
|
|
2505
|
+
return (a, l) => (h(), L(le, null, [
|
|
2506
|
+
e.format === "structured" ? (h(), L("div", Io, [
|
|
2507
|
+
(h(!0), L(le, null, oe(e.propListTypes, (c) => (h(), L("div", {
|
|
2508
2508
|
key: `config-card-details-${c}-props`,
|
|
2509
2509
|
class: fe(`config-card-details-${c}-props`),
|
|
2510
2510
|
"data-testid": `config-card-details-${c}-props`
|
|
2511
2511
|
}, [
|
|
2512
|
-
c !== "basic" ? (h(),
|
|
2513
|
-
(h(!0),
|
|
2512
|
+
c !== "basic" ? (h(), L("div", Eo, N(c === "advanced" ? I(r)("baseConfigCard.sections.advanced") : I(r)("baseConfigCard.sections.plugin")), 1)) : q("", !0),
|
|
2513
|
+
(h(!0), L(le, null, oe(e.propertyCollections[c], (s) => (h(), D(Pt, {
|
|
2514
2514
|
key: s.key,
|
|
2515
2515
|
item: s
|
|
2516
|
-
},
|
|
2517
|
-
label:
|
|
2518
|
-
|
|
2516
|
+
}, Ae({
|
|
2517
|
+
label: C(() => [
|
|
2518
|
+
W(a.$slots, `${s.key}-label`, { row: s }, void 0, !0)
|
|
2519
2519
|
]),
|
|
2520
|
-
[s.key]:
|
|
2521
|
-
|
|
2520
|
+
[s.key]: C(({ rowValue: d }) => [
|
|
2521
|
+
W(a.$slots, s.key, {
|
|
2522
2522
|
row: s,
|
|
2523
2523
|
rowValue: d
|
|
2524
2524
|
}, void 0, !0)
|
|
@@ -2527,36 +2527,36 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2527
2527
|
}, [
|
|
2528
2528
|
i(s) ? {
|
|
2529
2529
|
name: "label-tooltip",
|
|
2530
|
-
fn:
|
|
2531
|
-
|
|
2530
|
+
fn: C(() => [
|
|
2531
|
+
W(a.$slots, `${s.key}-label-tooltip`, { row: s }, void 0, !0)
|
|
2532
2532
|
]),
|
|
2533
2533
|
key: "0"
|
|
2534
2534
|
} : void 0
|
|
2535
2535
|
]), 1032, ["item"]))), 128))
|
|
2536
|
-
], 10,
|
|
2537
|
-
])) :
|
|
2538
|
-
e.format === "json" && o.value ? (h(), D(
|
|
2536
|
+
], 10, $o))), 128))
|
|
2537
|
+
])) : q("", !0),
|
|
2538
|
+
e.format === "json" && o.value ? (h(), D(qt, {
|
|
2539
2539
|
key: 1,
|
|
2540
2540
|
config: t.config,
|
|
2541
2541
|
"entity-record": o.value,
|
|
2542
2542
|
"fetcher-url": t.fetcherUrl,
|
|
2543
2543
|
"request-method": "get"
|
|
2544
|
-
}, null, 8, ["config", "entity-record", "fetcher-url"])) :
|
|
2545
|
-
e.format === "yaml" && o.value ? (h(), D(
|
|
2544
|
+
}, null, 8, ["config", "entity-record", "fetcher-url"])) : q("", !0),
|
|
2545
|
+
e.format === "yaml" && o.value ? (h(), D(Fn, {
|
|
2546
2546
|
key: 2,
|
|
2547
2547
|
"entity-record": o.value
|
|
2548
|
-
}, null, 8, ["entity-record"])) :
|
|
2549
|
-
e.format === "terraform" && o.value ? (h(), D(
|
|
2548
|
+
}, null, 8, ["entity-record"])) : q("", !0),
|
|
2549
|
+
e.format === "terraform" && o.value ? (h(), D(Ln, {
|
|
2550
2550
|
key: 3,
|
|
2551
2551
|
"entity-record": o.value,
|
|
2552
2552
|
"entity-type": t.entityType
|
|
2553
|
-
}, null, 8, ["entity-record", "entity-type"])) :
|
|
2553
|
+
}, null, 8, ["entity-record", "entity-type"])) : q("", !0)
|
|
2554
2554
|
], 64));
|
|
2555
2555
|
}
|
|
2556
|
-
}),
|
|
2556
|
+
}), Fo = /* @__PURE__ */ ae(Oo, [["__scopeId", "data-v-d15be7fe"]]), Lo = {
|
|
2557
2557
|
class: "config-card-title",
|
|
2558
2558
|
"data-testid": "config-card-title"
|
|
2559
|
-
},
|
|
2559
|
+
}, Ro = { class: "config-card-actions" }, Bo = ["href"], No = { class: "config-card-details-section" }, Ko = /* @__PURE__ */ z({
|
|
2560
2560
|
__name: "EntityBaseConfigCard",
|
|
2561
2561
|
props: {
|
|
2562
2562
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2577,7 +2577,7 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2577
2577
|
entityType: {
|
|
2578
2578
|
type: String,
|
|
2579
2579
|
required: !0,
|
|
2580
|
-
validator: (e) =>
|
|
2580
|
+
validator: (e) => De.includes(e)
|
|
2581
2581
|
},
|
|
2582
2582
|
/** Record key that contains the plugin configuration */
|
|
2583
2583
|
pluginConfigKey: {
|
|
@@ -2642,10 +2642,10 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2642
2642
|
},
|
|
2643
2643
|
emits: ["loading", "fetch:success", "fetch:error"],
|
|
2644
2644
|
setup(e, { emit: t }) {
|
|
2645
|
-
var
|
|
2646
|
-
const n = t, r = e, { i18n: { t: i } } =
|
|
2647
|
-
|
|
2648
|
-
const { axiosInstance: l } =
|
|
2645
|
+
var T;
|
|
2646
|
+
const n = t, r = e, { i18n: { t: i } } = H.useI18n(), { getMessageFromError: o } = H.useErrors(), { convertKeyToTitle: a } = H.useStringHelpers();
|
|
2647
|
+
H.useSubSchema(r.pluginConfigKey);
|
|
2648
|
+
const { axiosInstance: l } = H.useAxios((T = r.config) == null ? void 0 : T.axiosRequestConfig), c = [
|
|
2649
2649
|
{
|
|
2650
2650
|
label: i("baseConfigCard.general.structuredFormat"),
|
|
2651
2651
|
value: "structured",
|
|
@@ -2664,11 +2664,11 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2664
2664
|
label: i("baseForm.configuration.terraform"),
|
|
2665
2665
|
value: "terraform"
|
|
2666
2666
|
});
|
|
2667
|
-
const s =
|
|
2668
|
-
s.value =
|
|
2667
|
+
const s = R("structured"), d = (m) => {
|
|
2668
|
+
s.value = m == null ? void 0 : m.value;
|
|
2669
2669
|
}, u = {
|
|
2670
2670
|
id: {
|
|
2671
|
-
type:
|
|
2671
|
+
type: P.ID,
|
|
2672
2672
|
label: i("baseConfigCard.commonFields.id_label"),
|
|
2673
2673
|
order: 0,
|
|
2674
2674
|
section: ie.Basic
|
|
@@ -2678,189 +2678,189 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2678
2678
|
section: ie.Basic
|
|
2679
2679
|
},
|
|
2680
2680
|
enabled: {
|
|
2681
|
-
type:
|
|
2681
|
+
type: P.BadgeStatus,
|
|
2682
2682
|
order: 2,
|
|
2683
2683
|
section: ie.Basic
|
|
2684
2684
|
},
|
|
2685
2685
|
updated_at: {
|
|
2686
|
-
type:
|
|
2686
|
+
type: P.Date,
|
|
2687
2687
|
label: i("baseConfigCard.commonFields.updated_at_label"),
|
|
2688
2688
|
order: 3,
|
|
2689
2689
|
section: ie.Basic
|
|
2690
2690
|
},
|
|
2691
2691
|
created_at: {
|
|
2692
|
-
type:
|
|
2692
|
+
type: P.Date,
|
|
2693
2693
|
label: i("baseConfigCard.commonFields.created_at_label"),
|
|
2694
2694
|
order: 4,
|
|
2695
2695
|
section: ie.Basic
|
|
2696
2696
|
},
|
|
2697
2697
|
tags: {
|
|
2698
|
-
type:
|
|
2698
|
+
type: P.BadgeTag,
|
|
2699
2699
|
order: -1,
|
|
2700
2700
|
// the last property displayed
|
|
2701
2701
|
section: ie.Basic
|
|
2702
2702
|
}
|
|
2703
|
-
},
|
|
2704
|
-
var
|
|
2703
|
+
}, p = R(!1), f = R(!1), y = R(""), g = R({}), x = $(() => {
|
|
2704
|
+
var S, w, v;
|
|
2705
2705
|
if (!g.value)
|
|
2706
2706
|
return [];
|
|
2707
|
-
const
|
|
2708
|
-
for (const
|
|
2709
|
-
const
|
|
2710
|
-
let
|
|
2711
|
-
(
|
|
2707
|
+
const m = [], A = Object.keys(g.value).length;
|
|
2708
|
+
for (const _ in g.value) {
|
|
2709
|
+
const F = (w = (S = r.configSchema) == null ? void 0 : S[_]) == null ? void 0 : w.order, Y = (v = u[_]) == null ? void 0 : v.order;
|
|
2710
|
+
let U = A;
|
|
2711
|
+
(Y || Y === 0) && (U = Y === -1 ? A + 1 : Y), F && (U = F === -1 ? A + 1 : F), m.push([_, U]);
|
|
2712
2712
|
}
|
|
2713
|
-
return
|
|
2714
|
-
return
|
|
2715
|
-
}),
|
|
2716
|
-
var
|
|
2717
|
-
const
|
|
2713
|
+
return m.sort(function(_, F) {
|
|
2714
|
+
return _[1] - F[1];
|
|
2715
|
+
}), m.map((_) => {
|
|
2716
|
+
var me, Ee;
|
|
2717
|
+
const F = _[0], Y = (me = g.value) == null ? void 0 : me[F], U = ((Ee = r.configSchema) == null ? void 0 : Ee[F]) || {}, J = u[F];
|
|
2718
2718
|
return {
|
|
2719
|
-
key:
|
|
2720
|
-
value:
|
|
2721
|
-
hidden:
|
|
2722
|
-
type:
|
|
2723
|
-
label:
|
|
2724
|
-
tooltip:
|
|
2725
|
-
section:
|
|
2719
|
+
key: F,
|
|
2720
|
+
value: Y,
|
|
2721
|
+
hidden: U.hidden || !1,
|
|
2722
|
+
type: U.type ?? ((J == null ? void 0 : J.type) || P.Text),
|
|
2723
|
+
label: U.label ?? ((J == null ? void 0 : J.label) || a(F)),
|
|
2724
|
+
tooltip: U.tooltip ?? ((J == null ? void 0 : J.tooltip) || void 0),
|
|
2725
|
+
section: U.section ?? ((J == null ? void 0 : J.section) || ie.Advanced)
|
|
2726
2726
|
};
|
|
2727
|
-
}).filter((
|
|
2728
|
-
}),
|
|
2729
|
-
var
|
|
2727
|
+
}).filter((_) => !_.hidden && _.key !== r.pluginConfigKey);
|
|
2728
|
+
}), E = $(() => {
|
|
2729
|
+
var w, v;
|
|
2730
2730
|
if (!g.value || !r.pluginConfigKey)
|
|
2731
2731
|
return [];
|
|
2732
|
-
const
|
|
2733
|
-
for (const
|
|
2734
|
-
const
|
|
2735
|
-
let
|
|
2736
|
-
|
|
2732
|
+
const m = g.value[r.pluginConfigKey] || {}, A = Object.keys(m).length, S = [];
|
|
2733
|
+
for (const _ in m) {
|
|
2734
|
+
const F = (v = (w = r.pluginConfigSchema) == null ? void 0 : w[_]) == null ? void 0 : v.order, Y = m[_];
|
|
2735
|
+
let U = Y != null && Y !== "" ? A - 1 : A;
|
|
2736
|
+
F && (U = F === -1 ? A + 1 : F), S.push([_, U]);
|
|
2737
2737
|
}
|
|
2738
|
-
return
|
|
2739
|
-
return
|
|
2740
|
-
}),
|
|
2741
|
-
var
|
|
2742
|
-
const
|
|
2738
|
+
return S.sort(function(_, F) {
|
|
2739
|
+
return _[1] - F[1];
|
|
2740
|
+
}), S.map((_) => {
|
|
2741
|
+
var J;
|
|
2742
|
+
const F = _[0], Y = m[F], U = ((J = r.pluginConfigSchema) == null ? void 0 : J[F]) || {};
|
|
2743
2743
|
return {
|
|
2744
|
-
key:
|
|
2745
|
-
value:
|
|
2746
|
-
hidden:
|
|
2747
|
-
type:
|
|
2748
|
-
label:
|
|
2749
|
-
tooltip:
|
|
2744
|
+
key: F,
|
|
2745
|
+
value: Y,
|
|
2746
|
+
hidden: U.hidden || !1,
|
|
2747
|
+
type: U.type ?? P.Text,
|
|
2748
|
+
label: U.label ?? a(F),
|
|
2749
|
+
tooltip: U.tooltip ?? void 0,
|
|
2750
2750
|
section: ie.Plugin
|
|
2751
2751
|
};
|
|
2752
|
-
}).filter((
|
|
2753
|
-
}),
|
|
2754
|
-
var
|
|
2752
|
+
}).filter((_) => !_.hidden);
|
|
2753
|
+
}), b = $(() => {
|
|
2754
|
+
var m, A, S, w;
|
|
2755
2755
|
return {
|
|
2756
|
-
basic: (
|
|
2757
|
-
advanced: (
|
|
2758
|
-
plugin: (
|
|
2756
|
+
basic: (m = x.value) == null ? void 0 : m.filter((v) => v.section === ie.Basic),
|
|
2757
|
+
advanced: (A = x.value) == null ? void 0 : A.filter((v) => v.section === ie.Advanced),
|
|
2758
|
+
plugin: (w = E.value) == null ? void 0 : w.concat((S = x.value) == null ? void 0 : S.filter((v) => v.section === ie.Plugin))
|
|
2759
2759
|
};
|
|
2760
|
-
}),
|
|
2761
|
-
const
|
|
2762
|
-
return
|
|
2763
|
-
}),
|
|
2764
|
-
var
|
|
2765
|
-
let
|
|
2766
|
-
return r.config.app === "konnect" ?
|
|
2760
|
+
}), B = $(() => {
|
|
2761
|
+
const m = [];
|
|
2762
|
+
return b.value.basic.length && m.push("basic"), b.value.advanced.length && m.push("advanced"), b.value.plugin.length && m.push("plugin"), m;
|
|
2763
|
+
}), O = $(() => {
|
|
2764
|
+
var A, S;
|
|
2765
|
+
let m = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2766
|
+
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (S = r.config) != null && S.workspace ? `/${r.config.workspace}` : "")), m = m.replace(/{id}/gi, r.config.entityId), m;
|
|
2767
2767
|
});
|
|
2768
|
-
return
|
|
2769
|
-
n("loading",
|
|
2770
|
-
}, { immediate: !0 }),
|
|
2771
|
-
f.value = !1,
|
|
2768
|
+
return _e(p, (m) => {
|
|
2769
|
+
n("loading", m);
|
|
2770
|
+
}, { immediate: !0 }), Nt(async () => {
|
|
2771
|
+
f.value = !1, p.value = !0;
|
|
2772
2772
|
try {
|
|
2773
|
-
const { data:
|
|
2773
|
+
const { data: m } = await l.get(O.value);
|
|
2774
2774
|
if (r.dataKey)
|
|
2775
|
-
if (typeof
|
|
2776
|
-
g.value = { ...
|
|
2775
|
+
if (typeof m[r.dataKey] < "u")
|
|
2776
|
+
g.value = { ...m[r.dataKey] };
|
|
2777
2777
|
else
|
|
2778
2778
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
2779
2779
|
else
|
|
2780
|
-
g.value = { ...
|
|
2781
|
-
Object.keys(r.configSchema).filter((
|
|
2782
|
-
g.value && typeof g.value[
|
|
2783
|
-
}), n("fetch:success",
|
|
2784
|
-
} catch (
|
|
2785
|
-
const
|
|
2786
|
-
y.value =
|
|
2780
|
+
g.value = { ...m };
|
|
2781
|
+
Object.keys(r.configSchema).filter((S) => r.configSchema[S].forceShow).forEach((S) => {
|
|
2782
|
+
g.value && typeof g.value[S] > "u" && (g.value[S] = null);
|
|
2783
|
+
}), n("fetch:success", m);
|
|
2784
|
+
} catch (m) {
|
|
2785
|
+
const A = o(m);
|
|
2786
|
+
y.value = A.startsWith("code") ? i("baseConfigCard.errors.load") : A, f.value = !0, n("fetch:error", m);
|
|
2787
2787
|
} finally {
|
|
2788
|
-
|
|
2788
|
+
p.value = !1;
|
|
2789
2789
|
}
|
|
2790
|
-
}), (
|
|
2791
|
-
const
|
|
2792
|
-
return h(), D(
|
|
2790
|
+
}), (m, A) => {
|
|
2791
|
+
const S = j("KLabel"), w = j("KSelect"), v = j("KButton"), _ = j("KSkeleton"), F = j("KEmptyState"), Y = j("KCard");
|
|
2792
|
+
return h(), D(Y, {
|
|
2793
2793
|
class: "kong-ui-entity-base-config-card",
|
|
2794
2794
|
"title-tag": e.titleTag
|
|
2795
|
-
},
|
|
2796
|
-
actions:
|
|
2797
|
-
M("div",
|
|
2798
|
-
|
|
2799
|
-
K(
|
|
2795
|
+
}, Ae({
|
|
2796
|
+
actions: C(() => [
|
|
2797
|
+
M("div", Ro, [
|
|
2798
|
+
W(m.$slots, "actions", {}, void 0, !0),
|
|
2799
|
+
K(S, {
|
|
2800
2800
|
class: "config-format-select-label",
|
|
2801
2801
|
"data-testid": "config-format-select-label"
|
|
2802
2802
|
}, {
|
|
2803
|
-
default:
|
|
2804
|
-
|
|
2803
|
+
default: C(() => [
|
|
2804
|
+
V(N(e.label), 1)
|
|
2805
2805
|
]),
|
|
2806
2806
|
_: 1
|
|
2807
2807
|
}),
|
|
2808
|
-
K(
|
|
2808
|
+
K(w, {
|
|
2809
2809
|
"data-testid": "select-config-format",
|
|
2810
2810
|
items: c,
|
|
2811
2811
|
onChange: d
|
|
2812
2812
|
}),
|
|
2813
|
-
e.configCardDoc ? (h(), D(
|
|
2813
|
+
e.configCardDoc ? (h(), D(v, {
|
|
2814
2814
|
key: 0,
|
|
2815
2815
|
appearance: "tertiary",
|
|
2816
2816
|
class: "book-icon",
|
|
2817
2817
|
"data-testid": "book-icon"
|
|
2818
2818
|
}, {
|
|
2819
|
-
default:
|
|
2819
|
+
default: C(() => [
|
|
2820
2820
|
M("a", {
|
|
2821
2821
|
href: e.configCardDoc,
|
|
2822
2822
|
rel: "noopener",
|
|
2823
2823
|
target: "_blank"
|
|
2824
2824
|
}, [
|
|
2825
|
-
K(
|
|
2826
|
-
], 8,
|
|
2825
|
+
K(I(Jn), { size: I(Hr) }, null, 8, ["size"])
|
|
2826
|
+
], 8, Bo)
|
|
2827
2827
|
]),
|
|
2828
2828
|
_: 1
|
|
2829
|
-
})) :
|
|
2829
|
+
})) : q("", !0)
|
|
2830
2830
|
])
|
|
2831
2831
|
]),
|
|
2832
|
-
default:
|
|
2833
|
-
|
|
2832
|
+
default: C(() => [
|
|
2833
|
+
p.value ? (h(), D(_, {
|
|
2834
2834
|
key: 0,
|
|
2835
2835
|
"data-testid": "config-card-loader",
|
|
2836
2836
|
"table-columns": 2,
|
|
2837
2837
|
type: "table"
|
|
2838
|
-
})) : f.value ? (h(), D(
|
|
2838
|
+
})) : f.value ? (h(), D(F, {
|
|
2839
2839
|
key: 1,
|
|
2840
2840
|
"data-testid": "config-card-fetch-error",
|
|
2841
2841
|
"icon-variant": "error"
|
|
2842
2842
|
}, {
|
|
2843
|
-
default:
|
|
2843
|
+
default: C(() => [
|
|
2844
2844
|
M("h3", null, N(y.value), 1)
|
|
2845
2845
|
]),
|
|
2846
2846
|
_: 1
|
|
2847
|
-
})) :
|
|
2848
|
-
M("div",
|
|
2849
|
-
K(
|
|
2847
|
+
})) : q("", !0),
|
|
2848
|
+
M("div", No, [
|
|
2849
|
+
K(Fo, {
|
|
2850
2850
|
config: e.config,
|
|
2851
2851
|
"entity-type": e.entityType,
|
|
2852
|
-
"fetcher-url":
|
|
2852
|
+
"fetcher-url": O.value,
|
|
2853
2853
|
format: s.value,
|
|
2854
|
-
"prop-list-types":
|
|
2855
|
-
"property-collections":
|
|
2854
|
+
"prop-list-types": B.value,
|
|
2855
|
+
"property-collections": b.value,
|
|
2856
2856
|
record: g.value
|
|
2857
|
-
},
|
|
2858
|
-
oe(Object.keys(
|
|
2859
|
-
name:
|
|
2860
|
-
fn:
|
|
2861
|
-
|
|
2862
|
-
row:
|
|
2863
|
-
rowValue:
|
|
2857
|
+
}, Ae({ _: 2 }, [
|
|
2858
|
+
oe(Object.keys(m.$slots), (U) => ({
|
|
2859
|
+
name: U,
|
|
2860
|
+
fn: C(({ row: J, rowValue: me }) => [
|
|
2861
|
+
W(m.$slots, U, {
|
|
2862
|
+
row: J,
|
|
2863
|
+
rowValue: me
|
|
2864
2864
|
}, void 0, !0)
|
|
2865
2865
|
])
|
|
2866
2866
|
}))
|
|
@@ -2871,10 +2871,10 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2871
2871
|
}, [
|
|
2872
2872
|
e.hideTitle ? void 0 : {
|
|
2873
2873
|
name: "title",
|
|
2874
|
-
fn:
|
|
2875
|
-
M("span",
|
|
2876
|
-
|
|
2877
|
-
|
|
2874
|
+
fn: C(() => [
|
|
2875
|
+
M("span", Lo, [
|
|
2876
|
+
W(m.$slots, "title", {}, () => [
|
|
2877
|
+
V(N(I(i)("baseConfigCard.title")), 1)
|
|
2878
2878
|
], !0)
|
|
2879
2879
|
])
|
|
2880
2880
|
]),
|
|
@@ -2883,10 +2883,10 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2883
2883
|
]), 1032, ["title-tag"]);
|
|
2884
2884
|
};
|
|
2885
2885
|
}
|
|
2886
|
-
}),
|
|
2886
|
+
}), Rl = /* @__PURE__ */ ae(Ko, [["__scopeId", "data-v-7ef5c755"]]), Mo = ["novalidate"], Do = {
|
|
2887
2887
|
class: "form-actions",
|
|
2888
2888
|
"data-testid": "form-actions"
|
|
2889
|
-
},
|
|
2889
|
+
}, jo = /* @__PURE__ */ z({
|
|
2890
2890
|
__name: "EntityBaseForm",
|
|
2891
2891
|
props: {
|
|
2892
2892
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2907,7 +2907,7 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2907
2907
|
entityType: {
|
|
2908
2908
|
type: String,
|
|
2909
2909
|
required: !0,
|
|
2910
|
-
validator: (e) =>
|
|
2910
|
+
validator: (e) => De.includes(e)
|
|
2911
2911
|
},
|
|
2912
2912
|
/**
|
|
2913
2913
|
* Fetch url for the item to edit. We will handle the replacement of {controlPlaneId}, {workspace}, and {id}.
|
|
@@ -2962,20 +2962,20 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2962
2962
|
},
|
|
2963
2963
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
2964
2964
|
setup(e, { emit: t }) {
|
|
2965
|
-
var
|
|
2966
|
-
const n = t, r = e, i =
|
|
2967
|
-
var
|
|
2968
|
-
let
|
|
2969
|
-
return r.config.app === "konnect" ?
|
|
2965
|
+
var O;
|
|
2966
|
+
const n = t, r = e, i = Xn(), { i18n: { t: o } } = H.useI18n(), { getMessageFromError: a } = H.useErrors(), { axiosInstance: l } = H.useAxios((O = r.config) == null ? void 0 : O.axiosRequestConfig), c = R(!1), s = $(() => !!r.editId), d = R(!1), u = R(""), p = $(() => r.canSubmit === !1 || r.isReadonly), f = R(!1), y = $(() => {
|
|
2967
|
+
var m, A;
|
|
2968
|
+
let T = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2969
|
+
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((m = r.config) == null ? void 0 : m.controlPlaneId) || "") : r.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (A = r.config) != null && A.workspace ? `/${r.config.workspace}` : "")), r.editId ? (T = T.replace(/{id}/gi, r.editId), T) : (T = T.replace(/\/{id}/gi, ""), T);
|
|
2970
2970
|
}), g = () => {
|
|
2971
2971
|
f.value = !f.value;
|
|
2972
2972
|
}, x = () => {
|
|
2973
|
-
r.config.cancelRoute ? i.push(r.config.cancelRoute) :
|
|
2974
|
-
},
|
|
2973
|
+
r.config.cancelRoute ? i.push(r.config.cancelRoute) : E();
|
|
2974
|
+
}, E = () => {
|
|
2975
2975
|
n("cancel");
|
|
2976
|
-
},
|
|
2977
|
-
|
|
2978
|
-
},
|
|
2976
|
+
}, b = () => {
|
|
2977
|
+
p.value || n("submit");
|
|
2978
|
+
}, B = R([
|
|
2979
2979
|
{
|
|
2980
2980
|
title: o("baseForm.configuration.json"),
|
|
2981
2981
|
hash: "#json"
|
|
@@ -2985,122 +2985,122 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
2985
2985
|
hash: "#yaml"
|
|
2986
2986
|
}
|
|
2987
2987
|
]);
|
|
2988
|
-
return r.config.app === "konnect" && r.entityType !==
|
|
2988
|
+
return r.config.app === "konnect" && r.entityType !== et.Other && B.value.splice(1, 0, {
|
|
2989
2989
|
title: o("baseForm.configuration.terraform"),
|
|
2990
2990
|
hash: "#terraform"
|
|
2991
|
-
}),
|
|
2992
|
-
n("loading",
|
|
2993
|
-
}, { immediate: !0 }),
|
|
2991
|
+
}), _e(() => c.value, (T) => {
|
|
2992
|
+
n("loading", T);
|
|
2993
|
+
}, { immediate: !0 }), Nt(async () => {
|
|
2994
2994
|
if (r.editId)
|
|
2995
2995
|
try {
|
|
2996
2996
|
d.value = !1, c.value = !0;
|
|
2997
|
-
const { data:
|
|
2998
|
-
n("fetch:success",
|
|
2999
|
-
} catch (
|
|
3000
|
-
const
|
|
3001
|
-
u.value =
|
|
2997
|
+
const { data: T } = await l.get(y.value);
|
|
2998
|
+
n("fetch:success", T);
|
|
2999
|
+
} catch (T) {
|
|
3000
|
+
const m = a(T);
|
|
3001
|
+
u.value = m.startsWith("code") ? o("baseForm.errors.edit") : m, d.value = !0, n("fetch:error", T);
|
|
3002
3002
|
} finally {
|
|
3003
3003
|
c.value = !1;
|
|
3004
3004
|
}
|
|
3005
|
-
}), (
|
|
3006
|
-
const
|
|
3007
|
-
return h(), D(
|
|
3008
|
-
default:
|
|
3009
|
-
c.value ? (h(), D(
|
|
3005
|
+
}), (T, m) => {
|
|
3006
|
+
const A = j("KSkeleton"), S = j("KEmptyState"), w = j("KAlert"), v = j("KButton"), _ = j("KTabs"), F = j("KSlideout");
|
|
3007
|
+
return h(), D(Me(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3008
|
+
default: C(() => [
|
|
3009
|
+
c.value ? (h(), D(A, {
|
|
3010
3010
|
key: 0,
|
|
3011
3011
|
type: "form"
|
|
3012
|
-
})) : d.value ? (h(), D(
|
|
3012
|
+
})) : d.value ? (h(), D(S, {
|
|
3013
3013
|
key: 1,
|
|
3014
|
-
"action-button-text":
|
|
3014
|
+
"action-button-text": I(o)("baseForm.actions.back"),
|
|
3015
3015
|
"data-testid": "form-fetch-error",
|
|
3016
3016
|
"icon-variant": "error",
|
|
3017
3017
|
onClickAction: x
|
|
3018
3018
|
}, {
|
|
3019
|
-
default:
|
|
3019
|
+
default: C(() => [
|
|
3020
3020
|
M("h3", null, N(u.value), 1)
|
|
3021
3021
|
]),
|
|
3022
3022
|
_: 1
|
|
3023
|
-
}, 8, ["action-button-text"])) : (h(),
|
|
3023
|
+
}, 8, ["action-button-text"])) : (h(), L("form", {
|
|
3024
3024
|
key: 2,
|
|
3025
3025
|
"data-testid": "form-content",
|
|
3026
3026
|
novalidate: r.noValidate,
|
|
3027
|
-
onReset:
|
|
3028
|
-
onSubmit:
|
|
3027
|
+
onReset: Fe(E, ["prevent"]),
|
|
3028
|
+
onSubmit: Fe(b, ["prevent"])
|
|
3029
3029
|
}, [
|
|
3030
|
-
|
|
3031
|
-
e.errorMessage ? (h(), D(
|
|
3030
|
+
W(T.$slots, "default", {}, void 0, !0),
|
|
3031
|
+
e.errorMessage ? (h(), D(w, {
|
|
3032
3032
|
key: 0,
|
|
3033
3033
|
appearance: "danger",
|
|
3034
3034
|
"data-testid": "form-error",
|
|
3035
3035
|
message: e.errorMessage
|
|
3036
|
-
}, null, 8, ["message"])) :
|
|
3037
|
-
M("div",
|
|
3038
|
-
|
|
3039
|
-
K(
|
|
3036
|
+
}, null, 8, ["message"])) : q("", !0),
|
|
3037
|
+
M("div", Do, [
|
|
3038
|
+
W(T.$slots, "form-actions", {}, () => [
|
|
3039
|
+
K(v, {
|
|
3040
3040
|
appearance: "tertiary",
|
|
3041
3041
|
"data-testid": `${e.entityType}-${s.value ? "edit" : "create"}-form-view-configuration`,
|
|
3042
|
-
onClick:
|
|
3042
|
+
onClick: m[0] || (m[0] = (Y) => g())
|
|
3043
3043
|
}, {
|
|
3044
|
-
default:
|
|
3045
|
-
|
|
3044
|
+
default: C(() => [
|
|
3045
|
+
V(N(I(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3046
3046
|
]),
|
|
3047
3047
|
_: 1
|
|
3048
3048
|
}, 8, ["data-testid"]),
|
|
3049
|
-
K(
|
|
3049
|
+
K(v, {
|
|
3050
3050
|
appearance: "secondary",
|
|
3051
3051
|
"data-testid": `${e.entityType}-${s.value ? "edit" : "create"}-form-cancel`,
|
|
3052
3052
|
disabled: e.isReadonly,
|
|
3053
3053
|
type: "reset"
|
|
3054
3054
|
}, {
|
|
3055
|
-
default:
|
|
3056
|
-
|
|
3055
|
+
default: C(() => [
|
|
3056
|
+
V(N(I(o)("baseForm.actions.cancel")), 1)
|
|
3057
3057
|
]),
|
|
3058
3058
|
_: 1
|
|
3059
3059
|
}, 8, ["data-testid", "disabled"]),
|
|
3060
|
-
K(
|
|
3060
|
+
K(v, {
|
|
3061
3061
|
appearance: "primary",
|
|
3062
3062
|
"data-testid": `${e.entityType}-${s.value ? "edit" : "create"}-form-submit`,
|
|
3063
|
-
disabled:
|
|
3063
|
+
disabled: p.value,
|
|
3064
3064
|
type: "submit"
|
|
3065
3065
|
}, {
|
|
3066
|
-
default:
|
|
3067
|
-
|
|
3066
|
+
default: C(() => [
|
|
3067
|
+
V(N(I(o)("baseForm.actions.save")), 1)
|
|
3068
3068
|
]),
|
|
3069
3069
|
_: 1
|
|
3070
3070
|
}, 8, ["data-testid", "disabled"])
|
|
3071
3071
|
], !0)
|
|
3072
3072
|
])
|
|
3073
|
-
], 40,
|
|
3074
|
-
K(
|
|
3073
|
+
], 40, Mo)),
|
|
3074
|
+
K(F, {
|
|
3075
3075
|
"close-on-blur": !1,
|
|
3076
3076
|
"data-testid": "form-view-configuration-slideout",
|
|
3077
3077
|
"has-overlay": !1,
|
|
3078
3078
|
"offset-top": 60,
|
|
3079
|
-
title:
|
|
3079
|
+
title: I(o)("baseForm.configuration.title"),
|
|
3080
3080
|
visible: f.value,
|
|
3081
|
-
onClose:
|
|
3081
|
+
onClose: m[1] || (m[1] = (Y) => g())
|
|
3082
3082
|
}, {
|
|
3083
|
-
default:
|
|
3084
|
-
M("div", null, N(
|
|
3085
|
-
K(
|
|
3083
|
+
default: C(() => [
|
|
3084
|
+
M("div", null, N(I(o)("baseForm.configuration.message")), 1),
|
|
3085
|
+
K(_, {
|
|
3086
3086
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3087
|
-
tabs:
|
|
3087
|
+
tabs: B.value
|
|
3088
3088
|
}, {
|
|
3089
|
-
json:
|
|
3090
|
-
K(
|
|
3089
|
+
json: C(() => [
|
|
3090
|
+
K(qt, {
|
|
3091
3091
|
config: e.config,
|
|
3092
3092
|
"entity-record": r.formFields,
|
|
3093
3093
|
"fetcher-url": y.value,
|
|
3094
3094
|
"request-method": r.editId ? "put" : "post"
|
|
3095
3095
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3096
3096
|
]),
|
|
3097
|
-
yaml:
|
|
3098
|
-
K(
|
|
3097
|
+
yaml: C(() => [
|
|
3098
|
+
K(Fn, {
|
|
3099
3099
|
"entity-record": r.formFields
|
|
3100
3100
|
}, null, 8, ["entity-record"])
|
|
3101
3101
|
]),
|
|
3102
|
-
terraform:
|
|
3103
|
-
K(
|
|
3102
|
+
terraform: C(() => [
|
|
3103
|
+
K(Ln, {
|
|
3104
3104
|
"entity-record": r.formFields,
|
|
3105
3105
|
"entity-type": e.entityType
|
|
3106
3106
|
}, null, 8, ["entity-record", "entity-type"])
|
|
@@ -3115,7 +3115,7 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3115
3115
|
});
|
|
3116
3116
|
};
|
|
3117
3117
|
}
|
|
3118
|
-
}),
|
|
3118
|
+
}), Bl = /* @__PURE__ */ ae(jo, [["__scopeId", "data-v-6210a67a"]]), Uo = ["data-truncate"], Po = /* @__PURE__ */ z({
|
|
3119
3119
|
__name: "EntityBaseTableCell",
|
|
3120
3120
|
props: {
|
|
3121
3121
|
keyName: {
|
|
@@ -3132,76 +3132,76 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3132
3132
|
}
|
|
3133
3133
|
},
|
|
3134
3134
|
setup(e) {
|
|
3135
|
-
const t = e, n =
|
|
3135
|
+
const t = e, n = $(() => {
|
|
3136
3136
|
var x;
|
|
3137
3137
|
return ((x = t.rowEl) == null ? void 0 : x.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3138
|
-
}), r =
|
|
3138
|
+
}), r = $(() => {
|
|
3139
3139
|
var x;
|
|
3140
3140
|
return ((x = n.value) == null ? void 0 : x.querySelector('[data-truncate="true"]')) || null;
|
|
3141
|
-
}), i =
|
|
3142
|
-
var
|
|
3143
|
-
const x = (
|
|
3144
|
-
return x ? ((
|
|
3145
|
-
}), o =
|
|
3141
|
+
}), i = $(() => {
|
|
3142
|
+
var E, b;
|
|
3143
|
+
const x = (E = t.rowEl) == null ? void 0 : E.querySelectorAll("td");
|
|
3144
|
+
return x ? ((b = x[0]) == null ? void 0 : b.getAttribute("data-testid")) === t.keyName : !0;
|
|
3145
|
+
}), o = $(() => i.value || t.tooltip);
|
|
3146
3146
|
let a;
|
|
3147
3147
|
const l = () => {
|
|
3148
3148
|
a && (a.disconnect(), a = void 0);
|
|
3149
3149
|
}, c = () => {
|
|
3150
|
-
var
|
|
3151
|
-
let x = ((
|
|
3150
|
+
var E, b, B;
|
|
3151
|
+
let x = ((E = n.value) == null ? void 0 : E.clientWidth) || 0;
|
|
3152
3152
|
if (n.value && "getComputedStyle" in window) {
|
|
3153
|
-
const
|
|
3154
|
-
x -= (parseFloat(
|
|
3153
|
+
const O = window.getComputedStyle(n.value);
|
|
3154
|
+
x -= (parseFloat(O.paddingLeft) || 0) + (parseFloat(O.paddingRight) || 0);
|
|
3155
3155
|
}
|
|
3156
|
-
d.value = ((
|
|
3157
|
-
}, s =
|
|
3156
|
+
d.value = ((b = r.value) == null ? void 0 : b.getBoundingClientRect().width) || 0, u.value = x, p.value = ((B = s.value) == null ? void 0 : B.innerText) || "";
|
|
3157
|
+
}, s = R({}), d = R(0), u = R(0), p = R(""), f = $(() => [r.value, n.value]), y = _e(
|
|
3158
3158
|
f,
|
|
3159
3159
|
(x) => {
|
|
3160
3160
|
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
3161
|
-
a = new ResizeObserver((
|
|
3161
|
+
a = new ResizeObserver((E) => {
|
|
3162
3162
|
window.requestAnimationFrame(() => {
|
|
3163
|
-
!Array.isArray(
|
|
3163
|
+
!Array.isArray(E) || !E.length || c();
|
|
3164
3164
|
});
|
|
3165
3165
|
});
|
|
3166
|
-
for (const
|
|
3167
|
-
|
|
3166
|
+
for (const E of x)
|
|
3167
|
+
E && a.observe(E);
|
|
3168
3168
|
}
|
|
3169
3169
|
},
|
|
3170
3170
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3171
|
-
), g =
|
|
3172
|
-
return
|
|
3171
|
+
), g = $(() => o.value ? d.value > u.value : !1);
|
|
3172
|
+
return Dn(() => {
|
|
3173
3173
|
c();
|
|
3174
|
-
}),
|
|
3174
|
+
}), jn(() => {
|
|
3175
3175
|
y();
|
|
3176
|
-
}), (x,
|
|
3177
|
-
const
|
|
3178
|
-
return h(),
|
|
3176
|
+
}), (x, E) => {
|
|
3177
|
+
const b = j("KTooltip");
|
|
3178
|
+
return h(), L("span", {
|
|
3179
3179
|
ref_key: "contentRef",
|
|
3180
3180
|
ref: s,
|
|
3181
3181
|
class: "content-wrapper"
|
|
3182
3182
|
}, [
|
|
3183
|
-
o.value ? (h(),
|
|
3183
|
+
o.value ? (h(), L("span", {
|
|
3184
3184
|
key: 0,
|
|
3185
3185
|
"data-truncate": o.value || void 0
|
|
3186
3186
|
}, [
|
|
3187
|
-
K(
|
|
3187
|
+
K(b, {
|
|
3188
3188
|
"max-width": "300",
|
|
3189
3189
|
placement: "bottom-start",
|
|
3190
|
-
text: g.value ?
|
|
3190
|
+
text: g.value ? p.value : ""
|
|
3191
3191
|
}, {
|
|
3192
|
-
default:
|
|
3193
|
-
|
|
3192
|
+
default: C(() => [
|
|
3193
|
+
W(x.$slots, "default", {}, void 0, !0)
|
|
3194
3194
|
]),
|
|
3195
3195
|
_: 3
|
|
3196
3196
|
}, 8, ["text"])
|
|
3197
|
-
], 8,
|
|
3197
|
+
], 8, Uo)) : W(x.$slots, "default", { key: 1 }, void 0, !0)
|
|
3198
3198
|
], 512);
|
|
3199
3199
|
};
|
|
3200
3200
|
}
|
|
3201
|
-
}),
|
|
3201
|
+
}), qo = /* @__PURE__ */ ae(Po, [["__scopeId", "data-v-b252463e"]]), Ho = { class: "toolbar-container" }, Yo = {
|
|
3202
3202
|
key: 0,
|
|
3203
3203
|
class: "toolbar-button-container"
|
|
3204
|
-
},
|
|
3204
|
+
}, Vo = /* @__PURE__ */ z({
|
|
3205
3205
|
__name: "EntityBaseTable",
|
|
3206
3206
|
props: {
|
|
3207
3207
|
// table header configuration
|
|
@@ -3322,144 +3322,147 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3322
3322
|
},
|
|
3323
3323
|
hideToolbar: {
|
|
3324
3324
|
type: Boolean,
|
|
3325
|
-
default:
|
|
3325
|
+
default: void 0
|
|
3326
3326
|
}
|
|
3327
3327
|
},
|
|
3328
3328
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3329
3329
|
setup(e, { emit: t }) {
|
|
3330
|
-
const n = e, r = t, { i18n: { t: i } } =
|
|
3331
|
-
var
|
|
3330
|
+
const n = e, r = t, { i18n: { t: i } } = H.useI18n(), o = $(() => {
|
|
3331
|
+
var v, _;
|
|
3332
3332
|
return typeof n.errorMessage == "string" ? {
|
|
3333
3333
|
hasError: !!n.errorMessage,
|
|
3334
3334
|
title: n.errorMessage,
|
|
3335
3335
|
message: void 0
|
|
3336
3336
|
} : {
|
|
3337
3337
|
hasError: !!n.errorMessage,
|
|
3338
|
-
title: (
|
|
3339
|
-
message: (
|
|
3338
|
+
title: (v = n.errorMessage) == null ? void 0 : v.title,
|
|
3339
|
+
message: (_ = n.errorMessage) == null ? void 0 : _.message
|
|
3340
3340
|
};
|
|
3341
|
-
}), a =
|
|
3342
|
-
const
|
|
3343
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3344
|
-
const
|
|
3345
|
-
|
|
3346
|
-
label:
|
|
3347
|
-
key:
|
|
3348
|
-
sortable:
|
|
3349
|
-
hidable:
|
|
3341
|
+
}), a = $(() => n.cacheIdentifier || n.preferencesStorageKey), l = $(() => {
|
|
3342
|
+
const v = [];
|
|
3343
|
+
return Object.keys(n.tableHeaders).forEach((F) => {
|
|
3344
|
+
const Y = n.tableHeaders[F];
|
|
3345
|
+
v.push({
|
|
3346
|
+
label: Y.label ?? F,
|
|
3347
|
+
key: F,
|
|
3348
|
+
sortable: Y.sortable ?? !1,
|
|
3349
|
+
hidable: Y.hidable ?? !0
|
|
3350
3350
|
});
|
|
3351
|
-
}), n.enableEntityActions &&
|
|
3351
|
+
}), n.enableEntityActions && v.push({
|
|
3352
3352
|
key: "actions",
|
|
3353
3353
|
hideLabel: !0
|
|
3354
|
-
}),
|
|
3355
|
-
}),
|
|
3356
|
-
"data-rowid":
|
|
3357
|
-
"data-testid":
|
|
3358
|
-
...n.rowAttributes(
|
|
3359
|
-
}),
|
|
3360
|
-
var
|
|
3361
|
-
return (
|
|
3362
|
-
},
|
|
3363
|
-
const
|
|
3364
|
-
"data-testid":
|
|
3365
|
-
...n.cellAttributes(
|
|
3354
|
+
}), v;
|
|
3355
|
+
}), c = (v) => ({
|
|
3356
|
+
"data-rowid": v.id,
|
|
3357
|
+
"data-testid": v.name,
|
|
3358
|
+
...n.rowAttributes(v)
|
|
3359
|
+
}), s = R({}), d = (v) => {
|
|
3360
|
+
var _;
|
|
3361
|
+
return (_ = s.value) == null ? void 0 : _.$el.querySelector(`[data-rowid="${v.id}"]`);
|
|
3362
|
+
}, u = (v) => {
|
|
3363
|
+
const _ = {
|
|
3364
|
+
"data-testid": v.headerKey,
|
|
3365
|
+
...n.cellAttributes(v)
|
|
3366
3366
|
};
|
|
3367
|
-
return
|
|
3367
|
+
return v.colIndex === 0 && (_.style = {
|
|
3368
3368
|
maxWidth: "250px",
|
|
3369
3369
|
overflowX: "hidden",
|
|
3370
3370
|
textOverflow: "ellipsis"
|
|
3371
|
-
}),
|
|
3371
|
+
}), _;
|
|
3372
|
+
}, p = () => {
|
|
3373
|
+
r("empty-state-cta-clicked"), f();
|
|
3372
3374
|
}, f = () => {
|
|
3373
|
-
r("empty-state-cta-clicked"), y();
|
|
3374
|
-
}, y = () => {
|
|
3375
3375
|
r("clear-search-input");
|
|
3376
|
-
},
|
|
3377
|
-
r("click:row",
|
|
3378
|
-
}),
|
|
3379
|
-
r("sort",
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3376
|
+
}, y = $(() => n.disableRowClick ? void 0 : (v, _) => {
|
|
3377
|
+
r("click:row", _);
|
|
3378
|
+
}), g = (v) => {
|
|
3379
|
+
r("sort", v);
|
|
3380
|
+
};
|
|
3381
|
+
let x = "";
|
|
3382
|
+
const E = R(!1), b = R(null), B = $(() => E.value ? !1 : b.value ? !b.value.hasData && !n.query : !0), O = (v) => {
|
|
3383
|
+
v.hasData ? E.value = !0 : v.state === "success" && !v.hasData && !x && (E.value = !1), x = n.query, b.value = { ...v };
|
|
3384
|
+
}, { setTablePreferences: T, getTablePreferences: m } = ar(), A = R(m(a.value, n.defaultTablePreferences)), S = $(() => {
|
|
3385
|
+
const v = m(a.value);
|
|
3382
3386
|
return {
|
|
3383
3387
|
...n.initialFetcherParams,
|
|
3384
|
-
...
|
|
3388
|
+
...v
|
|
3385
3389
|
};
|
|
3386
|
-
}), w = (
|
|
3387
|
-
|
|
3388
|
-
!("hidable" in
|
|
3389
|
-
}), a.value &&
|
|
3390
|
+
}), w = (v) => {
|
|
3391
|
+
A.value = v, l.value.forEach((_) => {
|
|
3392
|
+
!("hidable" in _) || !A.value.columnVisibility || _.hidable === !1 && (A.value.columnVisibility[_.key] = !0);
|
|
3393
|
+
}), a.value && T(a.value, v);
|
|
3390
3394
|
};
|
|
3391
|
-
return (
|
|
3392
|
-
const
|
|
3393
|
-
return h(), D(
|
|
3395
|
+
return (v, _) => {
|
|
3396
|
+
const F = j("KTableData"), Y = j("KCard");
|
|
3397
|
+
return h(), D(Y, {
|
|
3394
3398
|
class: "kong-ui-entity-base-table",
|
|
3395
3399
|
title: e.title,
|
|
3396
3400
|
"title-tag": e.titleTag
|
|
3397
3401
|
}, {
|
|
3398
|
-
default:
|
|
3399
|
-
K(
|
|
3402
|
+
default: C(() => [
|
|
3403
|
+
K(F, {
|
|
3400
3404
|
ref_key: "tableRefs",
|
|
3401
|
-
ref:
|
|
3405
|
+
ref: s,
|
|
3402
3406
|
"cache-identifier": a.value,
|
|
3403
|
-
"cell-attrs":
|
|
3407
|
+
"cell-attrs": u,
|
|
3404
3408
|
"client-sort": e.enableClientSort,
|
|
3405
|
-
"empty-state-action-message": e.query ?
|
|
3409
|
+
"empty-state-action-message": e.query ? I(i)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3406
3410
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3407
3411
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3408
|
-
"empty-state-message": e.query ?
|
|
3409
|
-
"empty-state-title": e.query ?
|
|
3412
|
+
"empty-state-message": e.query ? I(i)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3413
|
+
"empty-state-title": e.query ? I(i)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3410
3414
|
error: o.value.hasError,
|
|
3411
3415
|
"error-state-message": o.value.message,
|
|
3412
3416
|
"error-state-title": o.value.title,
|
|
3413
3417
|
fetcher: e.fetcher,
|
|
3414
3418
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3415
|
-
headers:
|
|
3419
|
+
headers: l.value,
|
|
3416
3420
|
"hide-pagination": e.hidePagination,
|
|
3417
3421
|
"hide-pagination-when-optional": "",
|
|
3418
|
-
"hide-toolbar": e.hideToolbar,
|
|
3419
|
-
"initial-fetcher-params":
|
|
3422
|
+
"hide-toolbar": e.hideToolbar ?? B.value,
|
|
3423
|
+
"initial-fetcher-params": S.value,
|
|
3420
3424
|
loading: e.isLoading,
|
|
3421
3425
|
"pagination-attributes": { disablePageJump: e.disablePaginationPageJump, offset: e.paginationType === "offset" },
|
|
3422
3426
|
"resize-columns": "",
|
|
3423
|
-
"row-attrs":
|
|
3427
|
+
"row-attrs": c,
|
|
3424
3428
|
"search-input": e.query,
|
|
3425
3429
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3426
3430
|
sortable: !e.disableSorting,
|
|
3427
|
-
"table-preferences":
|
|
3428
|
-
onEmptyStateActionClick:
|
|
3429
|
-
"onRow:click":
|
|
3430
|
-
onSort:
|
|
3431
|
+
"table-preferences": A.value,
|
|
3432
|
+
onEmptyStateActionClick: p,
|
|
3433
|
+
"onRow:click": y.value,
|
|
3434
|
+
onSort: _[0] || (_[0] = (U) => g(U)),
|
|
3435
|
+
onState: O,
|
|
3431
3436
|
"onUpdate:tablePreferences": w
|
|
3432
|
-
},
|
|
3433
|
-
toolbar:
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
])) :
|
|
3439
|
-
], 512), [
|
|
3440
|
-
[he, l($)]
|
|
3437
|
+
}, Ae({
|
|
3438
|
+
toolbar: C(() => [
|
|
3439
|
+
M("div", Ho, [
|
|
3440
|
+
W(v.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3441
|
+
v.$slots["toolbar-button"] ? (h(), L("div", Yo, [
|
|
3442
|
+
W(v.$slots, "toolbar-button", {}, void 0, !0)
|
|
3443
|
+
])) : q("", !0)
|
|
3441
3444
|
])
|
|
3442
3445
|
]),
|
|
3443
|
-
"action-items":
|
|
3444
|
-
|
|
3446
|
+
"action-items": C(({ row: U }) => [
|
|
3447
|
+
W(v.$slots, "actions", { row: U }, void 0, !0)
|
|
3445
3448
|
]),
|
|
3446
3449
|
_: 2
|
|
3447
3450
|
}, [
|
|
3448
|
-
oe(e.tableHeaders, (
|
|
3449
|
-
name:
|
|
3450
|
-
fn:
|
|
3451
|
-
K(
|
|
3452
|
-
"key-name": String(
|
|
3453
|
-
"row-el":
|
|
3454
|
-
tooltip:
|
|
3451
|
+
oe(e.tableHeaders, (U, J) => ({
|
|
3452
|
+
name: J,
|
|
3453
|
+
fn: C(({ row: me, rowKey: Ee, rowValue: ct }) => [
|
|
3454
|
+
K(qo, {
|
|
3455
|
+
"key-name": String(J),
|
|
3456
|
+
"row-el": d(me),
|
|
3457
|
+
tooltip: U.tooltip
|
|
3455
3458
|
}, {
|
|
3456
|
-
default:
|
|
3457
|
-
|
|
3458
|
-
row:
|
|
3459
|
-
rowKey:
|
|
3460
|
-
rowValue:
|
|
3459
|
+
default: C(() => [
|
|
3460
|
+
W(v.$slots, J, {
|
|
3461
|
+
row: me,
|
|
3462
|
+
rowKey: Ee,
|
|
3463
|
+
rowValue: ct
|
|
3461
3464
|
}, () => [
|
|
3462
|
-
|
|
3465
|
+
V(N(ct), 1)
|
|
3463
3466
|
], !0)
|
|
3464
3467
|
]),
|
|
3465
3468
|
_: 2
|
|
@@ -3468,8 +3471,8 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3468
3471
|
})),
|
|
3469
3472
|
e.query ? void 0 : {
|
|
3470
3473
|
name: "empty-state-action-icon",
|
|
3471
|
-
fn:
|
|
3472
|
-
K(
|
|
3474
|
+
fn: C(() => [
|
|
3475
|
+
K(I(Gn))
|
|
3473
3476
|
]),
|
|
3474
3477
|
key: "0"
|
|
3475
3478
|
}
|
|
@@ -3479,13 +3482,13 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3479
3482
|
}, 8, ["title", "title-tag"]);
|
|
3480
3483
|
};
|
|
3481
3484
|
}
|
|
3482
|
-
}),
|
|
3485
|
+
}), Nl = /* @__PURE__ */ ae(Vo, [["__scopeId", "data-v-499e74da"]]), Wo = {
|
|
3483
3486
|
key: 0,
|
|
3484
3487
|
class: "kong-ui-entity-delete-error"
|
|
3485
|
-
},
|
|
3488
|
+
}, Jo = {
|
|
3486
3489
|
key: 1,
|
|
3487
3490
|
class: "description"
|
|
3488
|
-
},
|
|
3491
|
+
}, Go = /* @__PURE__ */ z({
|
|
3489
3492
|
__name: "EntityDeleteModal",
|
|
3490
3493
|
props: {
|
|
3491
3494
|
visible: {
|
|
@@ -3524,7 +3527,7 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3524
3527
|
},
|
|
3525
3528
|
emits: ["cancel", "proceed"],
|
|
3526
3529
|
setup(e, { emit: t }) {
|
|
3527
|
-
const { i18nT: n } =
|
|
3530
|
+
const { i18nT: n } = H.useI18n(), r = e, i = t, o = $(() => r.needConfirm ? r.entityName : ""), a = () => {
|
|
3528
3531
|
i("cancel");
|
|
3529
3532
|
}, l = () => {
|
|
3530
3533
|
i("proceed");
|
|
@@ -3542,50 +3545,50 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3542
3545
|
onCancel: a,
|
|
3543
3546
|
onProceed: l
|
|
3544
3547
|
}, {
|
|
3545
|
-
default:
|
|
3546
|
-
e.error ? (h(),
|
|
3548
|
+
default: C(() => [
|
|
3549
|
+
e.error ? (h(), L("div", Wo, [
|
|
3547
3550
|
K(d, { appearance: "danger" }, {
|
|
3548
|
-
default:
|
|
3549
|
-
|
|
3551
|
+
default: C(() => [
|
|
3552
|
+
V(N(e.error), 1)
|
|
3550
3553
|
]),
|
|
3551
3554
|
_: 1
|
|
3552
3555
|
})
|
|
3553
|
-
])) :
|
|
3554
|
-
K(
|
|
3556
|
+
])) : q("", !0),
|
|
3557
|
+
K(I(n), {
|
|
3555
3558
|
class: "message",
|
|
3556
3559
|
keypath: r.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3557
3560
|
tag: "p"
|
|
3558
|
-
},
|
|
3559
|
-
entityType:
|
|
3560
|
-
|
|
3561
|
+
}, Ae({
|
|
3562
|
+
entityType: C(() => [
|
|
3563
|
+
V(N(r.entityType), 1)
|
|
3561
3564
|
]),
|
|
3562
3565
|
_: 2
|
|
3563
3566
|
}, [
|
|
3564
3567
|
r.entityName ? {
|
|
3565
3568
|
name: "entityName",
|
|
3566
|
-
fn:
|
|
3569
|
+
fn: C(() => [
|
|
3567
3570
|
M("strong", null, N(r.entityName), 1)
|
|
3568
3571
|
]),
|
|
3569
3572
|
key: "0"
|
|
3570
3573
|
} : void 0
|
|
3571
3574
|
]), 1032, ["keypath"]),
|
|
3572
|
-
r.description || c.$slots.description ? (h(),
|
|
3573
|
-
|
|
3575
|
+
r.description || c.$slots.description ? (h(), L("div", Jo, [
|
|
3576
|
+
W(c.$slots, "description", {}, () => [
|
|
3574
3577
|
M("p", null, N(r.description), 1)
|
|
3575
3578
|
], !0)
|
|
3576
|
-
])) :
|
|
3579
|
+
])) : q("", !0)
|
|
3577
3580
|
]),
|
|
3578
3581
|
_: 3
|
|
3579
3582
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3580
3583
|
};
|
|
3581
3584
|
}
|
|
3582
|
-
}),
|
|
3585
|
+
}), Kl = /* @__PURE__ */ ae(Go, [["__scopeId", "data-v-4361d622"]]), zo = {
|
|
3583
3586
|
fill: "none",
|
|
3584
3587
|
height: "20",
|
|
3585
3588
|
viewBox: "0 0 20 20",
|
|
3586
3589
|
width: "20",
|
|
3587
3590
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3588
|
-
},
|
|
3591
|
+
}, Qo = {
|
|
3589
3592
|
id: "mask0_180_20349",
|
|
3590
3593
|
height: "20",
|
|
3591
3594
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3593,35 +3596,35 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3593
3596
|
width: "20",
|
|
3594
3597
|
x: "0",
|
|
3595
3598
|
y: "0"
|
|
3596
|
-
},
|
|
3599
|
+
}, Zo = ["fill"], Xo = { mask: "url(#mask0_180_20349)" }, el = ["fill"], Ot = /* @__PURE__ */ z({
|
|
3597
3600
|
__name: "IconFilter",
|
|
3598
3601
|
props: {
|
|
3599
3602
|
color: {
|
|
3600
3603
|
type: String,
|
|
3601
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3604
|
+
default: `var(--kong-ui-entity-filter-color, ${Mr})`
|
|
3602
3605
|
}
|
|
3603
3606
|
},
|
|
3604
3607
|
setup(e) {
|
|
3605
|
-
return (t, n) => (h(),
|
|
3606
|
-
M("mask",
|
|
3608
|
+
return (t, n) => (h(), L("svg", zo, [
|
|
3609
|
+
M("mask", Qo, [
|
|
3607
3610
|
M("rect", {
|
|
3608
3611
|
fill: e.color,
|
|
3609
3612
|
height: "20",
|
|
3610
3613
|
width: "20"
|
|
3611
|
-
}, null, 8,
|
|
3614
|
+
}, null, 8, Zo)
|
|
3612
3615
|
]),
|
|
3613
|
-
M("g",
|
|
3616
|
+
M("g", Xo, [
|
|
3614
3617
|
M("path", {
|
|
3615
3618
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3616
3619
|
fill: e.color
|
|
3617
|
-
}, null, 8,
|
|
3620
|
+
}, null, 8, el)
|
|
3618
3621
|
])
|
|
3619
3622
|
]));
|
|
3620
3623
|
}
|
|
3621
|
-
}),
|
|
3624
|
+
}), tl = {
|
|
3622
3625
|
key: 1,
|
|
3623
3626
|
class: "kong-ui-entity-filter"
|
|
3624
|
-
},
|
|
3627
|
+
}, nl = { class: "kong-ui-entity-filter-menu" }, rl = ["data-testid"], il = ["onClick", "onKeydown"], al = { class: "menu-item-indicator" }, ol = { class: "menu-item-body" }, ll = ["for"], cl = { class: "menu-item-buttons" }, sl = { class: "filter-clear-button-container" }, ul = /* @__PURE__ */ z({
|
|
3625
3628
|
__name: "EntityFilter",
|
|
3626
3629
|
props: {
|
|
3627
3630
|
// filter config, either exact match or fuzzy match
|
|
@@ -3641,193 +3644,193 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3641
3644
|
},
|
|
3642
3645
|
emits: ["update:modelValue"],
|
|
3643
3646
|
setup(e, { emit: t }) {
|
|
3644
|
-
const { i18n: { t: n } } =
|
|
3645
|
-
const
|
|
3646
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
3647
|
-
|
|
3648
|
-
}),
|
|
3649
|
-
}), s =
|
|
3650
|
-
const
|
|
3651
|
-
return Object.keys(
|
|
3652
|
-
var
|
|
3653
|
-
return (
|
|
3654
|
-
}).map((
|
|
3655
|
-
label:
|
|
3656
|
-
value:
|
|
3647
|
+
const { i18n: { t: n } } = H.useI18n(), r = e, i = t, o = R(!1), a = R({}), l = R(/* @__PURE__ */ new Set()), c = $(() => {
|
|
3648
|
+
const O = [];
|
|
3649
|
+
return new URLSearchParams(r.modelValue).forEach((T, m) => {
|
|
3650
|
+
T !== "" && O.push(m);
|
|
3651
|
+
}), O;
|
|
3652
|
+
}), s = $(() => {
|
|
3653
|
+
const O = r.config.fields;
|
|
3654
|
+
return Object.keys(O).filter((T) => {
|
|
3655
|
+
var m;
|
|
3656
|
+
return (m = O == null ? void 0 : O[T]) == null ? void 0 : m.searchable;
|
|
3657
|
+
}).map((T) => ({
|
|
3658
|
+
label: O[T].label || T,
|
|
3659
|
+
value: T,
|
|
3657
3660
|
expanded: !1
|
|
3658
3661
|
}));
|
|
3659
3662
|
});
|
|
3660
|
-
|
|
3661
|
-
a.value = {}, new URLSearchParams(
|
|
3662
|
-
a.value[
|
|
3663
|
+
_e(() => r.modelValue, (O) => {
|
|
3664
|
+
a.value = {}, new URLSearchParams(O).forEach((T, m) => {
|
|
3665
|
+
a.value[m] = T;
|
|
3663
3666
|
});
|
|
3664
3667
|
});
|
|
3665
3668
|
const d = () => {
|
|
3666
3669
|
o.value = !o.value;
|
|
3667
|
-
}, u = (
|
|
3668
|
-
l.value.has(
|
|
3669
|
-
},
|
|
3670
|
-
i("update:modelValue",
|
|
3670
|
+
}, u = (O) => {
|
|
3671
|
+
l.value.has(O) ? l.value.delete(O) : l.value.add(O);
|
|
3672
|
+
}, p = (O) => {
|
|
3673
|
+
i("update:modelValue", O);
|
|
3671
3674
|
}, f = () => {
|
|
3672
|
-
|
|
3673
|
-
}, y = (
|
|
3674
|
-
var
|
|
3675
|
-
return (((
|
|
3676
|
-
value:
|
|
3677
|
-
label:
|
|
3675
|
+
p("");
|
|
3676
|
+
}, y = (O) => `filter-${O}`, g = (O) => {
|
|
3677
|
+
var T, m;
|
|
3678
|
+
return (((m = (T = r.config.schema) == null ? void 0 : T[O]) == null ? void 0 : m.values) ?? []).map((A) => ({
|
|
3679
|
+
value: A,
|
|
3680
|
+
label: A
|
|
3678
3681
|
}));
|
|
3679
|
-
}, x = (
|
|
3680
|
-
var
|
|
3681
|
-
return ((
|
|
3682
|
-
},
|
|
3682
|
+
}, x = (O) => {
|
|
3683
|
+
var T, m;
|
|
3684
|
+
return ((m = (T = r.config.schema) == null ? void 0 : T[O]) == null ? void 0 : m.type) ?? "text";
|
|
3685
|
+
}, E = (O) => {
|
|
3683
3686
|
a.value = {
|
|
3684
3687
|
...a.value,
|
|
3685
|
-
[
|
|
3686
|
-
},
|
|
3687
|
-
},
|
|
3688
|
-
a.value = {},
|
|
3689
|
-
},
|
|
3690
|
-
const
|
|
3691
|
-
|
|
3688
|
+
[O]: ""
|
|
3689
|
+
}, B();
|
|
3690
|
+
}, b = () => {
|
|
3691
|
+
a.value = {}, B(!0);
|
|
3692
|
+
}, B = (O = !1) => {
|
|
3693
|
+
const T = Object.keys(a.value).reduce((m, A) => (a.value[A] && (m[A] = `${a.value[A]}`), m), {});
|
|
3694
|
+
O && (o.value = !1), i("update:modelValue", new URLSearchParams(T).toString());
|
|
3692
3695
|
};
|
|
3693
|
-
return (
|
|
3694
|
-
const
|
|
3695
|
-
return e.config.isExactMatch ? (h(), D(
|
|
3696
|
+
return (O, T) => {
|
|
3697
|
+
const m = j("KInput"), A = j("KButton"), S = j("KSelect");
|
|
3698
|
+
return e.config.isExactMatch ? (h(), D(m, {
|
|
3696
3699
|
key: 0,
|
|
3697
3700
|
autocomplete: "off",
|
|
3698
3701
|
class: "kong-ui-entity-filter-input",
|
|
3699
3702
|
"data-testid": "search-input",
|
|
3700
3703
|
"model-value": e.modelValue,
|
|
3701
3704
|
placeholder: e.config.placeholder,
|
|
3702
|
-
"onUpdate:modelValue":
|
|
3705
|
+
"onUpdate:modelValue": p
|
|
3703
3706
|
}, {
|
|
3704
|
-
before:
|
|
3705
|
-
K(
|
|
3707
|
+
before: C(() => [
|
|
3708
|
+
K(Ot)
|
|
3706
3709
|
]),
|
|
3707
|
-
after:
|
|
3708
|
-
|
|
3710
|
+
after: C(() => [
|
|
3711
|
+
ge(K(I(zn), {
|
|
3709
3712
|
class: "kong-ui-entity-filter-clear",
|
|
3710
3713
|
role: "button",
|
|
3711
3714
|
tabindex: "0",
|
|
3712
3715
|
onClick: f
|
|
3713
3716
|
}, null, 512), [
|
|
3714
|
-
[
|
|
3717
|
+
[ye, e.modelValue !== ""]
|
|
3715
3718
|
])
|
|
3716
3719
|
]),
|
|
3717
3720
|
_: 1
|
|
3718
|
-
}, 8, ["model-value", "placeholder"])) : (h(),
|
|
3719
|
-
K(
|
|
3721
|
+
}, 8, ["model-value", "placeholder"])) : (h(), L("div", tl, [
|
|
3722
|
+
K(A, {
|
|
3720
3723
|
appearance: "tertiary",
|
|
3721
3724
|
"data-testid": "filter-button",
|
|
3722
3725
|
onClick: d
|
|
3723
3726
|
}, {
|
|
3724
|
-
default:
|
|
3725
|
-
K(
|
|
3726
|
-
|
|
3727
|
+
default: C(() => [
|
|
3728
|
+
K(Ot),
|
|
3729
|
+
V(" " + N(I(n)("filter.filterButtonText")) + " " + N(c.value.length > 0 ? `(${c.value.length})` : ""), 1)
|
|
3727
3730
|
]),
|
|
3728
3731
|
_: 1
|
|
3729
3732
|
}),
|
|
3730
|
-
|
|
3733
|
+
ge(M("div", {
|
|
3731
3734
|
class: "kong-ui-entity-filter-backdrop",
|
|
3732
3735
|
onClick: d
|
|
3733
3736
|
}, null, 512), [
|
|
3734
|
-
[
|
|
3737
|
+
[ye, o.value]
|
|
3735
3738
|
]),
|
|
3736
|
-
|
|
3737
|
-
(h(!0),
|
|
3738
|
-
var
|
|
3739
|
-
return h(),
|
|
3740
|
-
key:
|
|
3739
|
+
ge(M("div", nl, [
|
|
3740
|
+
(h(!0), L(le, null, oe(s.value, (w) => {
|
|
3741
|
+
var v, _;
|
|
3742
|
+
return h(), L("div", {
|
|
3743
|
+
key: w.value,
|
|
3741
3744
|
class: "kong-ui-entity-filter-menu-item",
|
|
3742
|
-
"data-testid":
|
|
3745
|
+
"data-testid": w.value
|
|
3743
3746
|
}, [
|
|
3744
3747
|
M("span", {
|
|
3745
|
-
class: fe(["menu-item-title", { expanded: l.value.has(
|
|
3748
|
+
class: fe(["menu-item-title", { expanded: l.value.has(w.value) }]),
|
|
3746
3749
|
role: "button",
|
|
3747
3750
|
tabindex: "0",
|
|
3748
|
-
onClick: (
|
|
3749
|
-
onKeydown:
|
|
3751
|
+
onClick: (F) => u(w.value),
|
|
3752
|
+
onKeydown: Un((F) => u(w.value), ["enter"])
|
|
3750
3753
|
}, [
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
[
|
|
3754
|
+
V(N(w.label) + " ", 1),
|
|
3755
|
+
ge(M("span", al, null, 512), [
|
|
3756
|
+
[ye, c.value.includes(w.value)]
|
|
3754
3757
|
]),
|
|
3755
|
-
K(
|
|
3756
|
-
class: fe(["menu-item-expand-icon", { expanded: l.value.has(
|
|
3757
|
-
color:
|
|
3758
|
+
K(I(Qn), {
|
|
3759
|
+
class: fe(["menu-item-expand-icon", { expanded: l.value.has(w.value) }]),
|
|
3760
|
+
color: I(jr)
|
|
3758
3761
|
}, null, 8, ["class", "color"])
|
|
3759
|
-
], 42,
|
|
3760
|
-
|
|
3762
|
+
], 42, il),
|
|
3763
|
+
ge(M("div", ol, [
|
|
3761
3764
|
M("label", {
|
|
3762
3765
|
class: "menu-item-label",
|
|
3763
|
-
for: y(
|
|
3764
|
-
}, N(
|
|
3765
|
-
((
|
|
3766
|
+
for: y(w.value)
|
|
3767
|
+
}, N(I(n)("filter.fieldLabel")), 9, ll),
|
|
3768
|
+
((_ = (v = e.config.schema) == null ? void 0 : v[w.value]) == null ? void 0 : _.type) === "select" ? (h(), D(S, {
|
|
3766
3769
|
key: 0,
|
|
3767
|
-
id: y(
|
|
3768
|
-
modelValue: a.value[
|
|
3769
|
-
"onUpdate:modelValue": (
|
|
3770
|
-
items: g(
|
|
3771
|
-
placeholder:
|
|
3772
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), D(
|
|
3770
|
+
id: y(w.value),
|
|
3771
|
+
modelValue: a.value[w.value],
|
|
3772
|
+
"onUpdate:modelValue": (F) => a.value[w.value] = F,
|
|
3773
|
+
items: g(w.value),
|
|
3774
|
+
placeholder: I(n)("filter.selectPlaceholder")
|
|
3775
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (h(), D(m, {
|
|
3773
3776
|
key: 1,
|
|
3774
|
-
id: y(
|
|
3775
|
-
modelValue: a.value[
|
|
3776
|
-
"onUpdate:modelValue": (
|
|
3777
|
+
id: y(w.value),
|
|
3778
|
+
modelValue: a.value[w.value],
|
|
3779
|
+
"onUpdate:modelValue": (F) => a.value[w.value] = F,
|
|
3777
3780
|
autocomplete: "off",
|
|
3778
|
-
placeholder:
|
|
3779
|
-
type: x(
|
|
3781
|
+
placeholder: I(n)("filter.inputPlaceholder"),
|
|
3782
|
+
type: x(w.value)
|
|
3780
3783
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3781
3784
|
], 512), [
|
|
3782
|
-
[
|
|
3785
|
+
[ye, l.value.has(w.value)]
|
|
3783
3786
|
]),
|
|
3784
|
-
|
|
3785
|
-
K(
|
|
3787
|
+
ge(M("div", cl, [
|
|
3788
|
+
K(A, {
|
|
3786
3789
|
appearance: "tertiary",
|
|
3787
3790
|
"data-testid": "apply-filter",
|
|
3788
3791
|
size: "small",
|
|
3789
|
-
onClick:
|
|
3792
|
+
onClick: T[0] || (T[0] = (F) => B(!0))
|
|
3790
3793
|
}, {
|
|
3791
|
-
default:
|
|
3792
|
-
|
|
3794
|
+
default: C(() => [
|
|
3795
|
+
V(N(I(n)("filter.applyButtonText")), 1)
|
|
3793
3796
|
]),
|
|
3794
3797
|
_: 1
|
|
3795
3798
|
}),
|
|
3796
|
-
K(
|
|
3799
|
+
K(A, {
|
|
3797
3800
|
appearance: "tertiary",
|
|
3798
3801
|
"data-testid": "clear-filter",
|
|
3799
3802
|
size: "small",
|
|
3800
|
-
onClick: (
|
|
3803
|
+
onClick: (F) => E(w.value)
|
|
3801
3804
|
}, {
|
|
3802
|
-
default:
|
|
3803
|
-
|
|
3805
|
+
default: C(() => [
|
|
3806
|
+
V(N(I(n)("filter.clearButtonText")), 1)
|
|
3804
3807
|
]),
|
|
3805
3808
|
_: 2
|
|
3806
3809
|
}, 1032, ["onClick"])
|
|
3807
3810
|
], 512), [
|
|
3808
|
-
[
|
|
3811
|
+
[ye, l.value.has(w.value)]
|
|
3809
3812
|
])
|
|
3810
|
-
], 8,
|
|
3813
|
+
], 8, rl);
|
|
3811
3814
|
}), 128)),
|
|
3812
|
-
M("div",
|
|
3813
|
-
K(
|
|
3815
|
+
M("div", sl, [
|
|
3816
|
+
K(A, {
|
|
3814
3817
|
appearance: "tertiary",
|
|
3815
3818
|
size: "small",
|
|
3816
|
-
onClick:
|
|
3819
|
+
onClick: b
|
|
3817
3820
|
}, {
|
|
3818
|
-
default:
|
|
3819
|
-
|
|
3821
|
+
default: C(() => [
|
|
3822
|
+
V(N(I(n)("filter.clearAllButtonText")), 1)
|
|
3820
3823
|
]),
|
|
3821
3824
|
_: 1
|
|
3822
3825
|
})
|
|
3823
3826
|
])
|
|
3824
3827
|
], 512), [
|
|
3825
|
-
[
|
|
3828
|
+
[ye, o.value]
|
|
3826
3829
|
])
|
|
3827
3830
|
]));
|
|
3828
3831
|
};
|
|
3829
3832
|
}
|
|
3830
|
-
}),
|
|
3833
|
+
}), Ml = /* @__PURE__ */ ae(ul, [["__scopeId", "data-v-10fa27a5"]]), Dl = /* @__PURE__ */ z({
|
|
3831
3834
|
__name: "EntityToggleModal",
|
|
3832
3835
|
props: {
|
|
3833
3836
|
visible: {
|
|
@@ -3859,9 +3862,9 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3859
3862
|
},
|
|
3860
3863
|
emits: ["cancel", "proceed"],
|
|
3861
3864
|
setup(e, { emit: t }) {
|
|
3862
|
-
const { i18n: { t: n }, i18nT: r } =
|
|
3865
|
+
const { i18n: { t: n }, i18nT: r } = H.useI18n(), i = e, o = t, a = R(!1), l = $(
|
|
3863
3866
|
() => i.action === "enable" ? n("toggleModal.enable.title", { entityType: i.entityType }) : n("toggleModal.disable.title", { entityType: i.entityType })
|
|
3864
|
-
), c =
|
|
3867
|
+
), c = $(
|
|
3865
3868
|
() => i.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
3866
3869
|
), s = () => o("cancel"), d = async () => {
|
|
3867
3870
|
if (i.onConfirm) {
|
|
@@ -3875,9 +3878,9 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3875
3878
|
}
|
|
3876
3879
|
}
|
|
3877
3880
|
};
|
|
3878
|
-
return (u,
|
|
3881
|
+
return (u, p) => {
|
|
3879
3882
|
const f = j("KPrompt");
|
|
3880
|
-
return h(), D(
|
|
3883
|
+
return h(), D(Pn, { to: "body" }, [
|
|
3881
3884
|
K(f, {
|
|
3882
3885
|
"action-button-disabled": a.value,
|
|
3883
3886
|
"action-button-text": c.value,
|
|
@@ -3887,15 +3890,15 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3887
3890
|
onCancel: s,
|
|
3888
3891
|
onProceed: d
|
|
3889
3892
|
}, {
|
|
3890
|
-
default:
|
|
3891
|
-
K(
|
|
3893
|
+
default: C(() => [
|
|
3894
|
+
K(I(r), {
|
|
3892
3895
|
keypath: `toggleModal.${i.action}.message`,
|
|
3893
3896
|
scope: "global"
|
|
3894
3897
|
}, {
|
|
3895
|
-
entityType:
|
|
3896
|
-
|
|
3898
|
+
entityType: C(() => [
|
|
3899
|
+
V(N(e.entityType), 1)
|
|
3897
3900
|
]),
|
|
3898
|
-
entityName:
|
|
3901
|
+
entityName: C(() => [
|
|
3899
3902
|
M("strong", null, N(e.entityName), 1)
|
|
3900
3903
|
]),
|
|
3901
3904
|
_: 1
|
|
@@ -3906,7 +3909,7 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3906
3909
|
]);
|
|
3907
3910
|
};
|
|
3908
3911
|
}
|
|
3909
|
-
}),
|
|
3912
|
+
}), jl = /* @__PURE__ */ z({
|
|
3910
3913
|
__name: "PermissionsWrapper",
|
|
3911
3914
|
props: {
|
|
3912
3915
|
/**
|
|
@@ -3928,45 +3931,45 @@ const wo = { class: "yaml-config" }, On = /* @__PURE__ */ J({
|
|
|
3928
3931
|
}
|
|
3929
3932
|
},
|
|
3930
3933
|
setup(e) {
|
|
3931
|
-
const t = e, n =
|
|
3932
|
-
return
|
|
3934
|
+
const t = e, n = R(void 0), r = $(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
3935
|
+
return _e(() => t.authFunction, async () => {
|
|
3933
3936
|
n.value = await t.authFunction();
|
|
3934
|
-
}, { immediate: !0 }), (i, o) => r.value ?
|
|
3937
|
+
}, { immediate: !0 }), (i, o) => r.value ? W(i.$slots, "default", {
|
|
3935
3938
|
key: 0,
|
|
3936
3939
|
isAllowed: n.value
|
|
3937
|
-
}) :
|
|
3940
|
+
}) : q("", !0);
|
|
3938
3941
|
}
|
|
3939
3942
|
});
|
|
3940
3943
|
var Z = [];
|
|
3941
|
-
for (var
|
|
3942
|
-
Z.push((
|
|
3943
|
-
function
|
|
3944
|
+
for (var Ve = 0; Ve < 256; ++Ve)
|
|
3945
|
+
Z.push((Ve + 256).toString(16).slice(1));
|
|
3946
|
+
function dl(e, t = 0) {
|
|
3944
3947
|
return (Z[e[t + 0]] + Z[e[t + 1]] + Z[e[t + 2]] + Z[e[t + 3]] + "-" + Z[e[t + 4]] + Z[e[t + 5]] + "-" + Z[e[t + 6]] + Z[e[t + 7]] + "-" + Z[e[t + 8]] + Z[e[t + 9]] + "-" + Z[e[t + 10]] + Z[e[t + 11]] + Z[e[t + 12]] + Z[e[t + 13]] + Z[e[t + 14]] + Z[e[t + 15]]).toLowerCase();
|
|
3945
3948
|
}
|
|
3946
|
-
var
|
|
3947
|
-
function
|
|
3948
|
-
if (!
|
|
3949
|
+
var Oe, fl = new Uint8Array(16);
|
|
3950
|
+
function pl() {
|
|
3951
|
+
if (!Oe && (Oe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Oe))
|
|
3949
3952
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3950
|
-
return
|
|
3953
|
+
return Oe(fl);
|
|
3951
3954
|
}
|
|
3952
|
-
var
|
|
3953
|
-
const
|
|
3954
|
-
randomUUID:
|
|
3955
|
+
var ml = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
3956
|
+
const Ft = {
|
|
3957
|
+
randomUUID: ml
|
|
3955
3958
|
};
|
|
3956
|
-
function
|
|
3957
|
-
if (
|
|
3958
|
-
return
|
|
3959
|
+
function hl(e, t, n) {
|
|
3960
|
+
if (Ft.randomUUID && !t && !e)
|
|
3961
|
+
return Ft.randomUUID();
|
|
3959
3962
|
e = e || {};
|
|
3960
|
-
var r = e.random || (e.rng ||
|
|
3961
|
-
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128,
|
|
3963
|
+
var r = e.random || (e.rng || pl)();
|
|
3964
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, dl(r);
|
|
3962
3965
|
}
|
|
3963
|
-
const
|
|
3966
|
+
const gl = ["aria-labelledby"], yl = { class: "form-section-wrapper" }, vl = {
|
|
3964
3967
|
key: 1,
|
|
3965
3968
|
class: "form-section-description"
|
|
3966
|
-
},
|
|
3969
|
+
}, bl = {
|
|
3967
3970
|
key: 2,
|
|
3968
3971
|
class: "form-section-footer"
|
|
3969
|
-
},
|
|
3972
|
+
}, xl = { class: "form-section-content" }, Cl = /* @__PURE__ */ z({
|
|
3970
3973
|
__name: "EntityFormSection",
|
|
3971
3974
|
props: {
|
|
3972
3975
|
title: {
|
|
@@ -3995,49 +3998,49 @@ const hl = ["aria-labelledby"], gl = { class: "form-section-wrapper" }, yl = {
|
|
|
3995
3998
|
}
|
|
3996
3999
|
},
|
|
3997
4000
|
setup(e) {
|
|
3998
|
-
const t =
|
|
3999
|
-
return (r, i) => (h(),
|
|
4000
|
-
"aria-labelledby": e.title ?
|
|
4001
|
+
const t = Xe(), n = hl();
|
|
4002
|
+
return (r, i) => (h(), L("div", {
|
|
4003
|
+
"aria-labelledby": e.title ? I(n) : void 0,
|
|
4001
4004
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4002
4005
|
role: "group"
|
|
4003
4006
|
}, [
|
|
4004
|
-
M("div",
|
|
4005
|
-
e.hideInfoHeader ?
|
|
4007
|
+
M("div", yl, [
|
|
4008
|
+
e.hideInfoHeader ? q("", !0) : (h(), L("div", {
|
|
4006
4009
|
key: 0,
|
|
4007
4010
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4008
4011
|
}, [
|
|
4009
|
-
e.title ? (h(), D(
|
|
4012
|
+
e.title ? (h(), D(Me(e.titleTag), {
|
|
4010
4013
|
key: 0,
|
|
4011
|
-
id:
|
|
4014
|
+
id: I(n),
|
|
4012
4015
|
class: "form-section-title"
|
|
4013
4016
|
}, {
|
|
4014
|
-
default:
|
|
4015
|
-
|
|
4017
|
+
default: C(() => [
|
|
4018
|
+
V(N(e.title), 1)
|
|
4016
4019
|
]),
|
|
4017
4020
|
_: 1
|
|
4018
|
-
}, 8, ["id"])) :
|
|
4019
|
-
e.description ||
|
|
4020
|
-
|
|
4021
|
+
}, 8, ["id"])) : q("", !0),
|
|
4022
|
+
e.description || I(t).description ? (h(), L("div", vl, [
|
|
4023
|
+
W(r.$slots, "description", {}, () => [
|
|
4021
4024
|
M("p", null, N(e.description), 1)
|
|
4022
4025
|
], !0)
|
|
4023
|
-
])) :
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
])) :
|
|
4026
|
+
])) : q("", !0),
|
|
4027
|
+
I(t).footer ? (h(), L("div", bl, [
|
|
4028
|
+
W(r.$slots, "footer", {}, void 0, !0)
|
|
4029
|
+
])) : q("", !0)
|
|
4027
4030
|
], 2)),
|
|
4028
|
-
M("div",
|
|
4029
|
-
|
|
4031
|
+
M("div", xl, [
|
|
4032
|
+
W(r.$slots, "default", {}, void 0, !0)
|
|
4030
4033
|
])
|
|
4031
4034
|
])
|
|
4032
|
-
], 10,
|
|
4035
|
+
], 10, gl));
|
|
4033
4036
|
}
|
|
4034
|
-
}),
|
|
4037
|
+
}), Ul = /* @__PURE__ */ ae(Cl, [["__scopeId", "data-v-b1f74200"]]), Al = {
|
|
4035
4038
|
class: "kong-ui-public-entity-link",
|
|
4036
4039
|
"data-testid": "entity-link-parent"
|
|
4037
|
-
},
|
|
4040
|
+
}, kl = {
|
|
4038
4041
|
key: 0,
|
|
4039
4042
|
class: "deleted-entity"
|
|
4040
|
-
},
|
|
4043
|
+
}, _l = { key: 1 }, wl = ["onClick"], Sl = /* @__PURE__ */ z({
|
|
4041
4044
|
__name: "EntityLink",
|
|
4042
4045
|
props: {
|
|
4043
4046
|
entityLinkData: {
|
|
@@ -4061,10 +4064,10 @@ const hl = ["aria-labelledby"], gl = { class: "form-section-wrapper" }, yl = {
|
|
|
4061
4064
|
}
|
|
4062
4065
|
},
|
|
4063
4066
|
setup(e) {
|
|
4064
|
-
const t = e, n =
|
|
4067
|
+
const t = e, n = R(), { isTruncated: r } = H.useTruncationDetector(n), { i18n: { t: i } } = H.useI18n(), o = i("global.actions.copyId"), a = R(o), l = $(() => t.entityLinkData.deleted ?? !1), c = $(() => {
|
|
4065
4068
|
var u;
|
|
4066
4069
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4067
|
-
}), s =
|
|
4070
|
+
}), s = $(() => {
|
|
4068
4071
|
var u;
|
|
4069
4072
|
return `${(u = c.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4070
4073
|
}), d = async (u) => {
|
|
@@ -4072,21 +4075,21 @@ const hl = ["aria-labelledby"], gl = { class: "form-section-wrapper" }, yl = {
|
|
|
4072
4075
|
a.value = o;
|
|
4073
4076
|
}, 1800));
|
|
4074
4077
|
};
|
|
4075
|
-
return (u,
|
|
4078
|
+
return (u, p) => {
|
|
4076
4079
|
const f = j("KTooltip"), y = j("KExternalLink"), g = j("KClipboardProvider");
|
|
4077
|
-
return h(),
|
|
4078
|
-
l.value ? (h(),
|
|
4080
|
+
return h(), L("div", Al, [
|
|
4081
|
+
l.value ? (h(), L("div", kl, N(s.value), 1)) : c.value ? c.value ? (h(), D(y, {
|
|
4079
4082
|
key: 2,
|
|
4080
4083
|
class: "entity-link",
|
|
4081
4084
|
"hide-icon": !e.newWindow,
|
|
4082
4085
|
href: e.externalLink,
|
|
4083
4086
|
target: e.newWindow ? "_blank" : "_self"
|
|
4084
4087
|
}, {
|
|
4085
|
-
default:
|
|
4088
|
+
default: C(() => [
|
|
4086
4089
|
K(f, {
|
|
4087
|
-
text:
|
|
4090
|
+
text: I(r) && e.entityLinkData.label || ""
|
|
4088
4091
|
}, {
|
|
4089
|
-
default:
|
|
4092
|
+
default: C(() => [
|
|
4090
4093
|
M("span", {
|
|
4091
4094
|
ref_key: "textContent",
|
|
4092
4095
|
ref: n,
|
|
@@ -4097,7 +4100,7 @@ const hl = ["aria-labelledby"], gl = { class: "form-section-wrapper" }, yl = {
|
|
|
4097
4100
|
}, 8, ["text"])
|
|
4098
4101
|
]),
|
|
4099
4102
|
_: 1
|
|
4100
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4103
|
+
}, 8, ["hide-icon", "href", "target"])) : q("", !0) : (h(), L("div", _l, N(" – "))),
|
|
4101
4104
|
c.value && e.allowCopy ? (h(), D(f, {
|
|
4102
4105
|
key: a.value,
|
|
4103
4106
|
class: "copy-uuid-tooltip",
|
|
@@ -4105,35 +4108,36 @@ const hl = ["aria-labelledby"], gl = { class: "form-section-wrapper" }, yl = {
|
|
|
4105
4108
|
placement: "bottom-end",
|
|
4106
4109
|
text: a.value
|
|
4107
4110
|
}, {
|
|
4108
|
-
default:
|
|
4111
|
+
default: C(() => [
|
|
4109
4112
|
K(g, null, {
|
|
4110
|
-
default:
|
|
4113
|
+
default: C(({ copyToClipboard: x }) => [
|
|
4111
4114
|
M("span", {
|
|
4112
4115
|
class: "entity-link-copy-id",
|
|
4113
|
-
onClick:
|
|
4116
|
+
onClick: Fe((E) => d(x), ["stop"])
|
|
4114
4117
|
}, [
|
|
4115
|
-
K(
|
|
4118
|
+
K(I(Zn), {
|
|
4116
4119
|
class: "copy-icon",
|
|
4117
|
-
color:
|
|
4120
|
+
color: I(Ur),
|
|
4118
4121
|
"data-testid": "copy-id",
|
|
4119
|
-
size:
|
|
4122
|
+
size: I(qr)
|
|
4120
4123
|
}, null, 8, ["color", "size"])
|
|
4121
|
-
], 8,
|
|
4124
|
+
], 8, wl)
|
|
4122
4125
|
]),
|
|
4123
4126
|
_: 1
|
|
4124
4127
|
})
|
|
4125
4128
|
]),
|
|
4126
4129
|
_: 1
|
|
4127
|
-
}, 8, ["text"])) :
|
|
4130
|
+
}, 8, ["text"])) : q("", !0)
|
|
4128
4131
|
]);
|
|
4129
4132
|
};
|
|
4130
4133
|
}
|
|
4131
|
-
}),
|
|
4134
|
+
}), Pl = /* @__PURE__ */ ae(Sl, [["__scopeId", "data-v-60e3ef7c"]]), Tl = { key: 1 }, ql = /* @__PURE__ */ z({
|
|
4132
4135
|
__name: "TableTags",
|
|
4133
4136
|
props: {
|
|
4134
4137
|
/** The tags to display in the table */
|
|
4135
4138
|
tags: {
|
|
4136
|
-
type: [Array, String]
|
|
4139
|
+
type: [Array, String],
|
|
4140
|
+
default: () => []
|
|
4137
4141
|
},
|
|
4138
4142
|
tagMaxWidth: {
|
|
4139
4143
|
type: String,
|
|
@@ -4141,7 +4145,7 @@ const hl = ["aria-labelledby"], gl = { class: "form-section-wrapper" }, yl = {
|
|
|
4141
4145
|
}
|
|
4142
4146
|
},
|
|
4143
4147
|
setup(e) {
|
|
4144
|
-
const t = e, n =
|
|
4148
|
+
const t = e, n = $(() => {
|
|
4145
4149
|
if (Array.isArray(t.tags))
|
|
4146
4150
|
return t.tags;
|
|
4147
4151
|
if (typeof t.tags == "string")
|
|
@@ -4155,60 +4159,60 @@ const hl = ["aria-labelledby"], gl = { class: "form-section-wrapper" }, yl = {
|
|
|
4155
4159
|
});
|
|
4156
4160
|
return (r, i) => {
|
|
4157
4161
|
var o;
|
|
4158
|
-
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (h(), D(
|
|
4159
|
-
default:
|
|
4160
|
-
(h(!0),
|
|
4162
|
+
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (h(), D(I(Vn), { key: 0 }, {
|
|
4163
|
+
default: C(() => [
|
|
4164
|
+
(h(!0), L(le, null, oe(n.value, (a) => (h(), D(I(Wn), {
|
|
4161
4165
|
key: a,
|
|
4162
4166
|
"max-width": e.tagMaxWidth,
|
|
4163
|
-
onClick: i[0] || (i[0] =
|
|
4167
|
+
onClick: i[0] || (i[0] = Fe(() => {
|
|
4164
4168
|
}, ["stop"]))
|
|
4165
4169
|
}, {
|
|
4166
|
-
default:
|
|
4167
|
-
|
|
4170
|
+
default: C(() => [
|
|
4171
|
+
V(N(a), 1)
|
|
4168
4172
|
]),
|
|
4169
4173
|
_: 2
|
|
4170
4174
|
}, 1032, ["max-width"]))), 128))
|
|
4171
4175
|
]),
|
|
4172
4176
|
_: 1
|
|
4173
|
-
})) : (h(),
|
|
4177
|
+
})) : (h(), L("span", Tl, "-"));
|
|
4174
4178
|
};
|
|
4175
4179
|
}
|
|
4176
|
-
}), { useAxios:
|
|
4180
|
+
}), { useAxios: Hl, useDeleteUrlBuilder: Yl, useErrors: Vl, useExternalLinkCreator: Wl, useFetchUrlBuilder: Jl, useFetcher: Gl, useDebouncedFilter: zl, useStringHelpers: Ql, useHelpers: Zl, useGatewayFeatureSupported: Xl, useTruncationDetector: ec, useValidators: tc, useSchemaProvider: nc } = H;
|
|
4177
4181
|
export {
|
|
4178
|
-
|
|
4179
|
-
|
|
4182
|
+
Fo as ConfigCardDisplay,
|
|
4183
|
+
Pt as ConfigCardItem,
|
|
4180
4184
|
ie as ConfigurationSchemaSection,
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4185
|
+
P as ConfigurationSchemaType,
|
|
4186
|
+
Rl as EntityBaseConfigCard,
|
|
4187
|
+
Bl as EntityBaseForm,
|
|
4188
|
+
tr as EntityBaseFormType,
|
|
4189
|
+
Nl as EntityBaseTable,
|
|
4190
|
+
Kl as EntityDeleteModal,
|
|
4191
|
+
Ml as EntityFilter,
|
|
4192
|
+
Ul as EntityFormSection,
|
|
4193
|
+
Pl as EntityLink,
|
|
4194
|
+
Dl as EntityToggleModal,
|
|
4195
|
+
er as EntityTypes,
|
|
4192
4196
|
ue as FetcherStatus,
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4197
|
+
Nr as InternalLinkItem,
|
|
4198
|
+
qt as JsonCodeBlock,
|
|
4199
|
+
jl as PermissionsWrapper,
|
|
4200
|
+
et as SupportedEntityType,
|
|
4201
|
+
De as SupportedEntityTypesArray,
|
|
4202
|
+
ql as TableTags,
|
|
4203
|
+
Ln as TerraformCodeBlock,
|
|
4204
|
+
Fn as YamlCodeBlock,
|
|
4205
|
+
Hl as useAxios,
|
|
4206
|
+
zl as useDebouncedFilter,
|
|
4207
|
+
Yl as useDeleteUrlBuilder,
|
|
4208
|
+
Vl as useErrors,
|
|
4209
|
+
Wl as useExternalLinkCreator,
|
|
4210
|
+
Jl as useFetchUrlBuilder,
|
|
4211
|
+
Gl as useFetcher,
|
|
4212
|
+
Xl as useGatewayFeatureSupported,
|
|
4213
|
+
Zl as useHelpers,
|
|
4214
|
+
nc as useSchemaProvider,
|
|
4215
|
+
Ql as useStringHelpers,
|
|
4216
|
+
ec as useTruncationDetector,
|
|
4217
|
+
tc as useValidators
|
|
4214
4218
|
};
|