@kong-ui-public/entities-redis-configurations 1.3.3 → 1.3.4
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-redis-configurations.es.js +117 -130
- package/dist/entities-redis-configurations.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/RedisConfigurationList.vue.d.ts +0 -17
- package/dist/types/components/RedisConfigurationList.vue.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { computed as H, reactive as Nt, ref as $, watch as ke, defineComponent as Q, resolveComponent as D, createElementBlock as q, openBlock as k, createVNode as m, withCtx as E, renderSlot as
|
|
1
|
+
import { computed as H, reactive as Nt, ref as $, watch as ke, defineComponent as Q, resolveComponent as D, createElementBlock as q, openBlock as k, createVNode as m, withCtx as E, renderSlot as bn, unref as i, mergeModels as jt, useModel as Bt, createElementVNode as K, createTextVNode as te, toDisplayString as B, Fragment as We, renderList as mt, createBlock as F, getCurrentInstance as yn, onMounted as vn, onUnmounted as hn, isReadonly as Tn, toRefs as wn, onBeforeMount as Sn, createCommentVNode as ee, isRef as En, createSlots as Cn, withModifiers as In, Teleport as Rn } from "vue";
|
|
2
2
|
import "@kong-ui-public/entities-shared/dist/style.css";
|
|
3
3
|
import "@kong-ui-public/entities-vaults/dist/style.css";
|
|
4
|
-
import { useAxios as gt, useErrors as kn, EntityBaseFormType as Ze, EntityBaseForm as On, SupportedEntityType as
|
|
4
|
+
import { useAxios as gt, useErrors as kn, EntityBaseFormType as Ze, EntityBaseForm as On, SupportedEntityType as Ft, EntityFormSection as ue, EntityFilter as Ht, useDeleteUrlBuilder as xn, useFetcher as Pn, FetcherStatus as An, EntityBaseTable as Vn, EntityEmptyState as $n, PermissionsWrapper as De, TableTags as Ln, EntityDeleteModal as Mn, EntityTypes as Dn, ConfigurationSchemaSection as x, ConfigurationSchemaType as P, EntityBaseConfigCard as Un } from "@kong-ui-public/entities-shared";
|
|
5
5
|
import { VaultSecretPickerProvider as Ue, VaultSecretPicker as Nn } from "@kong-ui-public/entities-vaults";
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import { TrashIcon as jn, AddCircleIcon as
|
|
6
|
+
import { useRouter as Kt } from "vue-router";
|
|
7
|
+
import { TrashIcon as jn, AddCircleIcon as zt, RefreshIcon as Bn, ClipboardIcon as Fn, DeployIcon as Hn, AddIcon as Kn } from "@kong/icons";
|
|
8
8
|
import { createI18n as zn, i18nTComponent as qn } from "@kong-ui-public/i18n";
|
|
9
|
-
import { PluginIcon as
|
|
10
|
-
var T = /* @__PURE__ */ ((e) => (e[e.HOST_PORT_CE = 0] = "HOST_PORT_CE", e[e.HOST_PORT_EE = 1] = "HOST_PORT_EE", e[e.SENTINEL = 2] = "SENTINEL", e[e.CLUSTER = 3] = "CLUSTER", e))(T || {}), Y = /* @__PURE__ */ ((e) => (e.REDIS_CE = "redis-ce", e.REDIS_EE = "redis-ee", e))(Y || {}),
|
|
9
|
+
import { PluginIcon as qt } from "@kong-ui-public/entities-plugins-icon";
|
|
10
|
+
var T = /* @__PURE__ */ ((e) => (e[e.HOST_PORT_CE = 0] = "HOST_PORT_CE", e[e.HOST_PORT_EE = 1] = "HOST_PORT_EE", e[e.SENTINEL = 2] = "SENTINEL", e[e.CLUSTER = 3] = "CLUSTER", e))(T || {}), Y = /* @__PURE__ */ ((e) => (e.REDIS_CE = "redis-ce", e.REDIS_EE = "redis-ee", e))(Y || {}), Wt = typeof global == "object" && global && global.Object === Object && global, Wn = typeof self == "object" && self && self.Object === Object && self, re = Wt || Wn || Function("return this")(), Ee = re.Symbol, Gt = Object.prototype, Gn = Gt.hasOwnProperty, Jn = Gt.toString, Ie = Ee ? Ee.toStringTag : void 0;
|
|
11
11
|
function Yn(e) {
|
|
12
12
|
var t = Gn.call(e, Ie), n = e[Ie];
|
|
13
13
|
try {
|
|
@@ -30,13 +30,13 @@ function Oe(e) {
|
|
|
30
30
|
return e != null && typeof e == "object";
|
|
31
31
|
}
|
|
32
32
|
var He = Array.isArray;
|
|
33
|
-
function
|
|
33
|
+
function Jt(e) {
|
|
34
34
|
var t = typeof e;
|
|
35
35
|
return e != null && (t == "object" || t == "function");
|
|
36
36
|
}
|
|
37
37
|
var ni = "[object AsyncFunction]", ii = "[object Function]", ri = "[object GeneratorFunction]", oi = "[object Proxy]";
|
|
38
|
-
function
|
|
39
|
-
if (!
|
|
38
|
+
function Yt(e) {
|
|
39
|
+
if (!Jt(e))
|
|
40
40
|
return !1;
|
|
41
41
|
var t = $e(e);
|
|
42
42
|
return t == ii || t == ri || t == ni || t == oi;
|
|
@@ -66,9 +66,9 @@ var di = /[\\^$.*+?()[\]{}|]/g, ui = /^\[object .+?Constructor\]$/, ci = Functio
|
|
|
66
66
|
"^" + pi.call(mi).replace(di, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
67
67
|
);
|
|
68
68
|
function _i(e) {
|
|
69
|
-
if (!
|
|
69
|
+
if (!Jt(e) || ai(e))
|
|
70
70
|
return !1;
|
|
71
|
-
var t =
|
|
71
|
+
var t = Yt(e) ? gi : ui;
|
|
72
72
|
return t.test(_e(e));
|
|
73
73
|
}
|
|
74
74
|
function bi(e, t) {
|
|
@@ -83,15 +83,15 @@ function hi(e, t) {
|
|
|
83
83
|
var n = typeof e;
|
|
84
84
|
return t = t ?? yi, !!t && (n == "number" || n != "symbol" && vi.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Qt(e, t) {
|
|
87
87
|
return e === t || e !== e && t !== t;
|
|
88
88
|
}
|
|
89
89
|
var Ti = 9007199254740991;
|
|
90
|
-
function
|
|
90
|
+
function Xt(e) {
|
|
91
91
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Ti;
|
|
92
92
|
}
|
|
93
93
|
function wi(e) {
|
|
94
|
-
return e != null &&
|
|
94
|
+
return e != null && Xt(e.length) && !Yt(e);
|
|
95
95
|
}
|
|
96
96
|
var Si = Object.prototype;
|
|
97
97
|
function Ei(e) {
|
|
@@ -107,7 +107,7 @@ var Ii = "[object Arguments]";
|
|
|
107
107
|
function vt(e) {
|
|
108
108
|
return Oe(e) && $e(e) == Ii;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
110
|
+
var Zt = Object.prototype, Ri = Zt.hasOwnProperty, ki = Zt.propertyIsEnumerable, Oi = vt(/* @__PURE__ */ function() {
|
|
111
111
|
return arguments;
|
|
112
112
|
}()) ? vt : function(e) {
|
|
113
113
|
return Oe(e) && Ri.call(e, "callee") && !ki.call(e, "callee");
|
|
@@ -115,26 +115,26 @@ var en = Object.prototype, Ri = en.hasOwnProperty, ki = en.propertyIsEnumerable,
|
|
|
115
115
|
function xi() {
|
|
116
116
|
return !1;
|
|
117
117
|
}
|
|
118
|
-
var
|
|
118
|
+
var en = typeof exports == "object" && exports && !exports.nodeType && exports, ht = en && typeof module == "object" && module && !module.nodeType && module, Pi = ht && ht.exports === en, Tt = Pi ? re.Buffer : void 0, Ai = Tt ? Tt.isBuffer : void 0, dt = Ai || xi, Vi = "[object Arguments]", $i = "[object Array]", Li = "[object Boolean]", Mi = "[object Date]", Di = "[object Error]", Ui = "[object Function]", Ni = "[object Map]", ji = "[object Number]", Bi = "[object Object]", Fi = "[object RegExp]", Hi = "[object Set]", Ki = "[object String]", zi = "[object WeakMap]", qi = "[object ArrayBuffer]", Wi = "[object DataView]", Gi = "[object Float32Array]", Ji = "[object Float64Array]", Yi = "[object Int8Array]", Qi = "[object Int16Array]", Xi = "[object Int32Array]", Zi = "[object Uint8Array]", er = "[object Uint8ClampedArray]", tr = "[object Uint16Array]", nr = "[object Uint32Array]", A = {};
|
|
119
119
|
A[Gi] = A[Ji] = A[Yi] = A[Qi] = A[Xi] = A[Zi] = A[er] = A[tr] = A[nr] = !0;
|
|
120
120
|
A[Vi] = A[$i] = A[qi] = A[Li] = A[Wi] = A[Mi] = A[Di] = A[Ui] = A[Ni] = A[ji] = A[Bi] = A[Fi] = A[Hi] = A[Ki] = A[zi] = !1;
|
|
121
121
|
function ir(e) {
|
|
122
|
-
return Oe(e) &&
|
|
122
|
+
return Oe(e) && Xt(e.length) && !!A[$e(e)];
|
|
123
123
|
}
|
|
124
124
|
function rr(e) {
|
|
125
125
|
return function(t) {
|
|
126
126
|
return e(t);
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
var
|
|
129
|
+
var tn = typeof exports == "object" && exports && !exports.nodeType && exports, Re = tn && typeof module == "object" && module && !module.nodeType && module, or = Re && Re.exports === tn, tt = or && Wt.process, wt = function() {
|
|
130
130
|
try {
|
|
131
131
|
var e = Re && Re.require && Re.require("util").types;
|
|
132
132
|
return e || tt && tt.binding && tt.binding("util");
|
|
133
133
|
} catch {
|
|
134
134
|
}
|
|
135
|
-
}(), St = wt && wt.isTypedArray,
|
|
135
|
+
}(), St = wt && wt.isTypedArray, nn = St ? rr(St) : ir, ar = Object.prototype, lr = ar.hasOwnProperty;
|
|
136
136
|
function sr(e, t) {
|
|
137
|
-
var n = He(e), o = !n && Oi(e), r = !n && !o && dt(e), a = !n && !o && !r &&
|
|
137
|
+
var n = He(e), o = !n && Oi(e), r = !n && !o && dt(e), a = !n && !o && !r && nn(e), p = n || o || r || a, _ = p ? Ci(e.length, String) : [], l = _.length;
|
|
138
138
|
for (var u in e)
|
|
139
139
|
lr.call(e, u) && !(p && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
140
140
|
(u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
@@ -204,7 +204,7 @@ function Ir() {
|
|
|
204
204
|
}
|
|
205
205
|
function Ge(e, t) {
|
|
206
206
|
for (var n = e.length; n--; )
|
|
207
|
-
if (
|
|
207
|
+
if (Qt(e[n][0], t))
|
|
208
208
|
return n;
|
|
209
209
|
return -1;
|
|
210
210
|
}
|
|
@@ -383,7 +383,7 @@ function so(e, t) {
|
|
|
383
383
|
return e.has(t);
|
|
384
384
|
}
|
|
385
385
|
var uo = 1, co = 2;
|
|
386
|
-
function
|
|
386
|
+
function rn(e, t, n, o, r, a) {
|
|
387
387
|
var p = n & uo, _ = e.length, l = t.length;
|
|
388
388
|
if (_ != l && !(p && l > _))
|
|
389
389
|
return !1;
|
|
@@ -440,7 +440,7 @@ function Ro(e, t, n, o, r, a, p) {
|
|
|
440
440
|
case _o:
|
|
441
441
|
case bo:
|
|
442
442
|
case ho:
|
|
443
|
-
return
|
|
443
|
+
return Qt(+e, +t);
|
|
444
444
|
case yo:
|
|
445
445
|
return e.name == t.name && e.message == t.message;
|
|
446
446
|
case To:
|
|
@@ -456,7 +456,7 @@ function Ro(e, t, n, o, r, a, p) {
|
|
|
456
456
|
if (u)
|
|
457
457
|
return u == t;
|
|
458
458
|
o |= go, p.set(e, t);
|
|
459
|
-
var y =
|
|
459
|
+
var y = rn(_(e), _(t), o, r, a, p);
|
|
460
460
|
return p.delete(e), y;
|
|
461
461
|
case Eo:
|
|
462
462
|
if (nt)
|
|
@@ -507,7 +507,7 @@ function $o(e, t, n, o, r, a) {
|
|
|
507
507
|
p = !0, y = !1;
|
|
508
508
|
}
|
|
509
509
|
if (b && !y)
|
|
510
|
-
return a || (a = new fe()), p ||
|
|
510
|
+
return a || (a = new fe()), p || nn(e) ? rn(e, t, n, o, r, a) : Ro(e, t, l, n, o, r, a);
|
|
511
511
|
if (!(n & Ao)) {
|
|
512
512
|
var S = y && Lt.call(e, "__wrapped__"), v = w && Lt.call(t, "__wrapped__");
|
|
513
513
|
if (S || v) {
|
|
@@ -517,11 +517,11 @@ function $o(e, t, n, o, r, a) {
|
|
|
517
517
|
}
|
|
518
518
|
return b ? (a || (a = new fe()), Po(e, t, n, o, r, a)) : !1;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
521
|
-
return e === t ? !0 : e == null || t == null || !Oe(e) && !Oe(t) ? e !== e && t !== t : $o(e, t, n, o,
|
|
520
|
+
function on(e, t, n, o, r) {
|
|
521
|
+
return e === t ? !0 : e == null || t == null || !Oe(e) && !Oe(t) ? e !== e && t !== t : $o(e, t, n, o, on, r);
|
|
522
522
|
}
|
|
523
523
|
function Lo(e, t) {
|
|
524
|
-
return
|
|
524
|
+
return on(e, t);
|
|
525
525
|
}
|
|
526
526
|
var j = [];
|
|
527
527
|
for (var it = 0; it < 256; ++it)
|
|
@@ -546,13 +546,13 @@ function jo(e, t, n) {
|
|
|
546
546
|
var o = e.random || (e.rng || Uo)();
|
|
547
547
|
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Mo(o);
|
|
548
548
|
}
|
|
549
|
-
const
|
|
549
|
+
const an = {
|
|
550
550
|
ip: "127.0.0.1",
|
|
551
551
|
port: 6379
|
|
552
|
-
},
|
|
552
|
+
}, ln = {
|
|
553
553
|
host: "127.0.0.1",
|
|
554
554
|
port: 6379
|
|
555
|
-
}, Se = T.HOST_PORT_EE,
|
|
555
|
+
}, Se = T.HOST_PORT_EE, sn = {
|
|
556
556
|
port: 6379,
|
|
557
557
|
host: "127.0.0.1",
|
|
558
558
|
database: 0,
|
|
@@ -576,14 +576,14 @@ const ln = {
|
|
|
576
576
|
timeout: 2e3
|
|
577
577
|
}, Ja = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
578
578
|
__proto__: null,
|
|
579
|
-
DEFAULT_CLUSTER_NODE:
|
|
580
|
-
DEFAULT_FIELDS:
|
|
579
|
+
DEFAULT_CLUSTER_NODE: an,
|
|
580
|
+
DEFAULT_FIELDS: sn,
|
|
581
581
|
DEFAULT_REDIS_TYPE: Se,
|
|
582
|
-
DEFAULT_SENTINEL_NODE:
|
|
582
|
+
DEFAULT_SENTINEL_NODE: ln
|
|
583
583
|
}, Symbol.toStringTag, { value: "Module" })), Ae = (e) => ({ ...e, id: jo() }), pt = (e) => {
|
|
584
584
|
const { id: t, ...n } = e;
|
|
585
585
|
return n;
|
|
586
|
-
},
|
|
586
|
+
}, dn = () => Ae(ln), un = () => Ae(an), Ye = (e) => {
|
|
587
587
|
var t, n;
|
|
588
588
|
return e.type === Y.REDIS_CE ? T.HOST_PORT_CE : (t = e.config.sentinel_nodes) != null && t.length ? T.SENTINEL : (n = e.config.cluster_nodes) != null && n.length ? T.CLUSTER : T.HOST_PORT_EE;
|
|
589
589
|
}, ze = (e) => e === T.HOST_PORT_CE ? Y.REDIS_CE : Y.REDIS_EE, h = {
|
|
@@ -625,8 +625,8 @@ const ln = {
|
|
|
625
625
|
}
|
|
626
626
|
}, Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
627
627
|
__proto__: null,
|
|
628
|
-
genDefaultClusterNode:
|
|
629
|
-
genDefaultSentinelNode:
|
|
628
|
+
genDefaultClusterNode: un,
|
|
629
|
+
genDefaultSentinelNode: dn,
|
|
630
630
|
getRedisType: Ye,
|
|
631
631
|
mapRedisTypeToPartialType: ze,
|
|
632
632
|
shallowCopyWithId: Ae,
|
|
@@ -657,7 +657,7 @@ const ln = {
|
|
|
657
657
|
name: "",
|
|
658
658
|
tags: "",
|
|
659
659
|
type: ze(o),
|
|
660
|
-
config: JSON.parse(JSON.stringify(
|
|
660
|
+
config: JSON.parse(JSON.stringify(sn))
|
|
661
661
|
},
|
|
662
662
|
readonly: !1,
|
|
663
663
|
errorMessage: ""
|
|
@@ -857,7 +857,7 @@ const ln = {
|
|
|
857
857
|
return k(), q("div", Fo, [
|
|
858
858
|
m(o, { class: "card" }, {
|
|
859
859
|
default: E(() => [
|
|
860
|
-
|
|
860
|
+
bn(t.$slots, "default", {}, void 0, !0)
|
|
861
861
|
]),
|
|
862
862
|
_: 3
|
|
863
863
|
}),
|
|
@@ -880,7 +880,7 @@ const ln = {
|
|
|
880
880
|
for (const [o, r] of t)
|
|
881
881
|
n[o] = r;
|
|
882
882
|
return n;
|
|
883
|
-
},
|
|
883
|
+
}, cn = /* @__PURE__ */ ae(Ho, [["__scopeId", "data-v-a0b2e4fb"]]), Ko = {
|
|
884
884
|
create: "New Redis Configuration",
|
|
885
885
|
copy_id: "Copy ID",
|
|
886
886
|
copy_json: "Copy JSON",
|
|
@@ -1148,7 +1148,7 @@ const pe = {
|
|
|
1148
1148
|
emits: ["update:modelValue"],
|
|
1149
1149
|
setup(e) {
|
|
1150
1150
|
const t = Bt(e, "modelValue"), { i18n: { t: n } } = pe.useI18n(), o = () => {
|
|
1151
|
-
t.value.push(
|
|
1151
|
+
t.value.push(un());
|
|
1152
1152
|
}, r = (a) => {
|
|
1153
1153
|
t.value.splice(a, 1);
|
|
1154
1154
|
};
|
|
@@ -1166,7 +1166,7 @@ const pe = {
|
|
|
1166
1166
|
_: 1
|
|
1167
1167
|
}, 8, ["info"]),
|
|
1168
1168
|
K("div", null, [
|
|
1169
|
-
(k(!0), q(We, null, mt(t.value, (y, w) => (k(), F(
|
|
1169
|
+
(k(!0), q(We, null, mt(t.value, (y, w) => (k(), F(cn, {
|
|
1170
1170
|
key: `${w}`,
|
|
1171
1171
|
"data-testid": "redis-cluster-nodes",
|
|
1172
1172
|
disabled: a.readonly,
|
|
@@ -1210,7 +1210,7 @@ const pe = {
|
|
|
1210
1210
|
onClick: o
|
|
1211
1211
|
}, {
|
|
1212
1212
|
default: E(() => [
|
|
1213
|
-
m(i(
|
|
1213
|
+
m(i(zt)),
|
|
1214
1214
|
K("span", null, B(i(n)("form.fields.cluster_nodes.add_button")), 1)
|
|
1215
1215
|
]),
|
|
1216
1216
|
_: 1
|
|
@@ -1230,7 +1230,7 @@ const pe = {
|
|
|
1230
1230
|
emits: ["update:modelValue"],
|
|
1231
1231
|
setup(e) {
|
|
1232
1232
|
const t = Bt(e, "modelValue"), { i18n: { t: n } } = pe.useI18n(), o = () => {
|
|
1233
|
-
t.value.push(
|
|
1233
|
+
t.value.push(dn());
|
|
1234
1234
|
}, r = (a) => {
|
|
1235
1235
|
t.value.splice(a, 1);
|
|
1236
1236
|
};
|
|
@@ -1248,7 +1248,7 @@ const pe = {
|
|
|
1248
1248
|
_: 1
|
|
1249
1249
|
}, 8, ["info"]),
|
|
1250
1250
|
K("div", null, [
|
|
1251
|
-
(k(!0), q(We, null, mt(t.value, (y, w) => (k(), F(
|
|
1251
|
+
(k(!0), q(We, null, mt(t.value, (y, w) => (k(), F(cn, {
|
|
1252
1252
|
key: y.id,
|
|
1253
1253
|
"data-testid": "redis-sentinel-nodes",
|
|
1254
1254
|
disabled: a.readonly,
|
|
@@ -1292,7 +1292,7 @@ const pe = {
|
|
|
1292
1292
|
onClick: o
|
|
1293
1293
|
}, {
|
|
1294
1294
|
default: E(() => [
|
|
1295
|
-
m(i(
|
|
1295
|
+
m(i(zt)),
|
|
1296
1296
|
K("span", null, B(i(n)("form.fields.sentinel_nodes.add_button")), 1)
|
|
1297
1297
|
]),
|
|
1298
1298
|
_: 1
|
|
@@ -1479,8 +1479,8 @@ var ie = function() {
|
|
|
1479
1479
|
if (n || arguments.length === 2) for (var o = 0, r = t.length, a; o < r; o++)
|
|
1480
1480
|
(a || !(o in t)) && (a || (a = Array.prototype.slice.call(t, 0, o)), a[o] = t[o]);
|
|
1481
1481
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
1482
|
-
},
|
|
1483
|
-
cache:
|
|
1482
|
+
}, fn = new _t(), qe = new _t(), at = new _t(), pn = {
|
|
1483
|
+
cache: fn,
|
|
1484
1484
|
refreshInterval: 0,
|
|
1485
1485
|
ttl: 0,
|
|
1486
1486
|
serverTTL: 1e3,
|
|
@@ -1512,7 +1512,7 @@ function ma(e, t, n) {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
var Ut = function(e, t, n, o) {
|
|
1515
|
-
return n === void 0 && (n =
|
|
1515
|
+
return n === void 0 && (n = fn), o === void 0 && (o = pn.ttl), Te(void 0, void 0, void 0, function() {
|
|
1516
1516
|
var r, a, p, _, l, u, y;
|
|
1517
1517
|
return we(this, function(w) {
|
|
1518
1518
|
switch (w.label) {
|
|
@@ -1550,7 +1550,7 @@ var Ut = function(e, t, n, o) {
|
|
|
1550
1550
|
function ga() {
|
|
1551
1551
|
for (var e = this, t = [], n = 0; n < arguments.length; n++)
|
|
1552
1552
|
t[n] = arguments[n];
|
|
1553
|
-
var o, r, a = ie({},
|
|
1553
|
+
var o, r, a = ie({}, pn), p = !1, _ = !1, l = yn(), u = (l == null ? void 0 : l.proxy) || l;
|
|
1554
1554
|
if (!u)
|
|
1555
1555
|
return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."), null;
|
|
1556
1556
|
var y = (u == null ? void 0 : u.$isServer) || !1;
|
|
@@ -1637,7 +1637,7 @@ function ga() {
|
|
|
1637
1637
|
});
|
|
1638
1638
|
});
|
|
1639
1639
|
}, I = null;
|
|
1640
|
-
|
|
1640
|
+
vn(function() {
|
|
1641
1641
|
var f = function() {
|
|
1642
1642
|
return Te(e, void 0, void 0, function() {
|
|
1643
1643
|
return we(this, function(c) {
|
|
@@ -1658,7 +1658,7 @@ function ga() {
|
|
|
1658
1658
|
});
|
|
1659
1659
|
};
|
|
1660
1660
|
a.refreshInterval && (I = setTimeout(f, a.refreshInterval)), a.revalidateOnFocus && (document.addEventListener("visibilitychange", s, !1), window.addEventListener("focus", s, !1));
|
|
1661
|
-
}),
|
|
1661
|
+
}), hn(function() {
|
|
1662
1662
|
p = !0, I && clearTimeout(I), a.revalidateOnFocus && (document.removeEventListener("visibilitychange", s, !1), window.removeEventListener("focus", s, !1));
|
|
1663
1663
|
var f = qe.get(b.value);
|
|
1664
1664
|
f && (f.data = f.data.filter(function(c) {
|
|
@@ -1667,13 +1667,13 @@ function ga() {
|
|
|
1667
1667
|
});
|
|
1668
1668
|
try {
|
|
1669
1669
|
ke(b, function(f) {
|
|
1670
|
-
|
|
1670
|
+
Tn(b) || (b.value = f), S.key = f, S.isValidating = !!f, pa(b.value, S, w), !y && !_ && b.value && v(), _ = !1;
|
|
1671
1671
|
}, {
|
|
1672
1672
|
immediate: !0
|
|
1673
1673
|
});
|
|
1674
1674
|
} catch {
|
|
1675
1675
|
}
|
|
1676
|
-
var V = ie(ie({},
|
|
1676
|
+
var V = ie(ie({}, wn(S)), { mutate: function(f, c) {
|
|
1677
1677
|
return v(f, ie(ie({}, c), { forceRevalidate: !0 }));
|
|
1678
1678
|
} });
|
|
1679
1679
|
return V;
|
|
@@ -1681,7 +1681,7 @@ function ga() {
|
|
|
1681
1681
|
function _a(e) {
|
|
1682
1682
|
return e !== null && typeof e == "object" && typeof e.then == "function";
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1684
|
+
function mn(e) {
|
|
1685
1685
|
return `redis-partial-links-${e}`;
|
|
1686
1686
|
}
|
|
1687
1687
|
const Le = (e) => {
|
|
@@ -1698,9 +1698,9 @@ const Le = (e) => {
|
|
|
1698
1698
|
return l;
|
|
1699
1699
|
}
|
|
1700
1700
|
};
|
|
1701
|
-
},
|
|
1701
|
+
}, gn = (e) => {
|
|
1702
1702
|
const { partialId: t, config: n } = e, { fetcher: o } = Le(n), r = $([]), { data: a } = ga(
|
|
1703
|
-
|
|
1703
|
+
mn(t),
|
|
1704
1704
|
() => o({ partialId: t }),
|
|
1705
1705
|
{
|
|
1706
1706
|
revalidateOnFocus: !1
|
|
@@ -1747,7 +1747,7 @@ const Le = (e) => {
|
|
|
1747
1747
|
},
|
|
1748
1748
|
emits: ["update", "error", "loading", "cancel"],
|
|
1749
1749
|
setup(e, { emit: t }) {
|
|
1750
|
-
const n = e, o = t, { i18n: { t: r }, i18nT: a } = pe.useI18n(), p =
|
|
1750
|
+
const n = e, o = t, { i18n: { t: r }, i18nT: a } = pe.useI18n(), p = Kt(), _ = $(), l = $(), u = (M, g) => {
|
|
1751
1751
|
_.value = M ?? "", l.value = g;
|
|
1752
1752
|
}, y = (M) => {
|
|
1753
1753
|
var g;
|
|
@@ -1827,7 +1827,7 @@ const Le = (e) => {
|
|
|
1827
1827
|
}, de = (M) => {
|
|
1828
1828
|
X(M);
|
|
1829
1829
|
};
|
|
1830
|
-
return
|
|
1830
|
+
return Sn(async () => {
|
|
1831
1831
|
if (f) {
|
|
1832
1832
|
const { count: M } = await le({ partialId: n.partialId });
|
|
1833
1833
|
Z.value = M;
|
|
@@ -1841,7 +1841,7 @@ const Le = (e) => {
|
|
|
1841
1841
|
"can-submit": i(I),
|
|
1842
1842
|
config: e.config,
|
|
1843
1843
|
"edit-id": e.partialId,
|
|
1844
|
-
"entity-type": i(
|
|
1844
|
+
"entity-type": i(Ft).RedisConfiguration,
|
|
1845
1845
|
"error-message": i(s).errorMessage,
|
|
1846
1846
|
"fetch-url": i(L),
|
|
1847
1847
|
"form-fields": i(V),
|
|
@@ -1881,7 +1881,7 @@ const Le = (e) => {
|
|
|
1881
1881
|
default: E(() => [
|
|
1882
1882
|
m(Me, {
|
|
1883
1883
|
modelValue: i(c),
|
|
1884
|
-
"onUpdate:modelValue": g[0] || (g[0] = (d) =>
|
|
1884
|
+
"onUpdate:modelValue": g[0] || (g[0] = (d) => En(c) ? c.value = d : null),
|
|
1885
1885
|
"data-testid": "redis-type-select",
|
|
1886
1886
|
disabled: i(f) && i(c) === i(T).HOST_PORT_CE,
|
|
1887
1887
|
items: w.value,
|
|
@@ -2330,14 +2330,14 @@ const Le = (e) => {
|
|
|
2330
2330
|
}
|
|
2331
2331
|
},
|
|
2332
2332
|
setup(e) {
|
|
2333
|
-
const t = e, n =
|
|
2333
|
+
const t = e, n = gn({
|
|
2334
2334
|
config: t.config,
|
|
2335
2335
|
partialId: t.partialId
|
|
2336
2336
|
});
|
|
2337
2337
|
return (o, r) => {
|
|
2338
2338
|
const a = D("KBadge");
|
|
2339
2339
|
return k(), q("div", Ta, [
|
|
2340
|
-
(k(!0), q(We, null, mt(i(n).slice(0, lt), (p) => (k(), F(i(
|
|
2340
|
+
(k(!0), q(We, null, mt(i(n).slice(0, lt), (p) => (k(), F(i(qt), {
|
|
2341
2341
|
key: p.id,
|
|
2342
2342
|
name: p.name,
|
|
2343
2343
|
size: 24
|
|
@@ -2361,7 +2361,7 @@ const Le = (e) => {
|
|
|
2361
2361
|
},
|
|
2362
2362
|
setup(e) {
|
|
2363
2363
|
return (t, n) => (k(), q("div", Ea, [
|
|
2364
|
-
m(i(
|
|
2364
|
+
m(i(qt), {
|
|
2365
2365
|
name: t.pluginName,
|
|
2366
2366
|
size: 24
|
|
2367
2367
|
}, null, 8, ["name"]),
|
|
@@ -2423,13 +2423,13 @@ const Le = (e) => {
|
|
|
2423
2423
|
return (b, S) => {
|
|
2424
2424
|
const v = D("KDropdownItem"), s = D("KTableData");
|
|
2425
2425
|
return k(), F(s, {
|
|
2426
|
-
"cache-identifier": i(
|
|
2426
|
+
"cache-identifier": i(mn)(e.partialId),
|
|
2427
2427
|
fetcher: l,
|
|
2428
2428
|
headers: a,
|
|
2429
2429
|
"hide-pagination-when-optional": "",
|
|
2430
2430
|
"pagination-attributes": { totalCount: _.value, disablePageJump: !0 },
|
|
2431
2431
|
"search-input": u.value
|
|
2432
|
-
},
|
|
2432
|
+
}, Cn({
|
|
2433
2433
|
name: E(({ rowValue: I }) => [
|
|
2434
2434
|
m(Ia, { "plugin-name": I }, null, 8, ["plugin-name"])
|
|
2435
2435
|
]),
|
|
@@ -2449,7 +2449,7 @@ const Le = (e) => {
|
|
|
2449
2449
|
name: "toolbar",
|
|
2450
2450
|
fn: E(() => [
|
|
2451
2451
|
K("div", Ra, [
|
|
2452
|
-
m(i(
|
|
2452
|
+
m(i(Ht), {
|
|
2453
2453
|
modelValue: u.value,
|
|
2454
2454
|
"onUpdate:modelValue": S[0] || (S[0] = (I) => u.value = I),
|
|
2455
2455
|
config: y.value
|
|
@@ -2587,14 +2587,6 @@ const Le = (e) => {
|
|
|
2587
2587
|
useActionOutside: {
|
|
2588
2588
|
type: Boolean,
|
|
2589
2589
|
default: !1
|
|
2590
|
-
},
|
|
2591
|
-
/**
|
|
2592
|
-
* Enables the new empty state design, this prop can be removed when
|
|
2593
|
-
* the khcp-14756-empty-states-m2 FF is removed.
|
|
2594
|
-
*/
|
|
2595
|
-
enableV2EmptyStates: {
|
|
2596
|
-
type: Boolean,
|
|
2597
|
-
default: !1
|
|
2598
2590
|
}
|
|
2599
2591
|
},
|
|
2600
2592
|
emits: ["click:learn-more", "click:plugin", "copy:error", "copy:success", "delete:success", "error"],
|
|
@@ -2609,7 +2601,7 @@ const Le = (e) => {
|
|
|
2609
2601
|
const d = await I({ ...C, pageSize: Ma });
|
|
2610
2602
|
return d.data = d.data.filter((R) => R.type === Y.REDIS_CE || R.type === Y.REDIS_EE), d;
|
|
2611
2603
|
}
|
|
2612
|
-
const { i18n: { t: c } } = pe.useI18n(), { axiosInstance: N } = gt((he = o.config) == null ? void 0 : he.axiosRequestConfig), L =
|
|
2604
|
+
const { i18n: { t: c } } = pe.useI18n(), { axiosInstance: N } = gt((he = o.config) == null ? void 0 : he.axiosRequestConfig), L = Kt(), z = $(""), X = H(() => {
|
|
2613
2605
|
const C = o.config.app === "konnect" || o.config.isExactMatch;
|
|
2614
2606
|
if (C)
|
|
2615
2607
|
return {
|
|
@@ -2709,7 +2701,7 @@ const Le = (e) => {
|
|
|
2709
2701
|
}, {
|
|
2710
2702
|
immediate: !0
|
|
2711
2703
|
}), (C, d) => {
|
|
2712
|
-
const R = D("KButton"), J = D("KDropdownItem"),
|
|
2704
|
+
const R = D("KButton"), J = D("KDropdownItem"), _n = D("KClipboardProvider");
|
|
2713
2705
|
return k(), q("div", $a, [
|
|
2714
2706
|
m(i(Vn), {
|
|
2715
2707
|
"cache-identifier": e.cacheIdentifier,
|
|
@@ -2726,9 +2718,9 @@ const Le = (e) => {
|
|
|
2726
2718
|
onClearSearchInput: ye,
|
|
2727
2719
|
"onClick:row": d[2] || (d[2] = (O) => me(O)),
|
|
2728
2720
|
onSort: g
|
|
2729
|
-
},
|
|
2721
|
+
}, {
|
|
2730
2722
|
"toolbar-filter": E(() => [
|
|
2731
|
-
m(i(
|
|
2723
|
+
m(i(Ht), {
|
|
2732
2724
|
modelValue: z.value,
|
|
2733
2725
|
"onUpdate:modelValue": d[0] || (d[0] = (O) => z.value = O),
|
|
2734
2726
|
config: X.value
|
|
@@ -2748,7 +2740,7 @@ const Le = (e) => {
|
|
|
2748
2740
|
to: e.config.createRoute
|
|
2749
2741
|
}, {
|
|
2750
2742
|
default: E(() => [
|
|
2751
|
-
m(i(
|
|
2743
|
+
m(i(Kn)),
|
|
2752
2744
|
te(" " + B(i(c)("actions.create")), 1)
|
|
2753
2745
|
]),
|
|
2754
2746
|
_: 1
|
|
@@ -2765,7 +2757,7 @@ const Le = (e) => {
|
|
|
2765
2757
|
te(B(Qe(O)), 1)
|
|
2766
2758
|
]),
|
|
2767
2759
|
tags: E(({ rowValue: O }) => [
|
|
2768
|
-
m(i(
|
|
2760
|
+
m(i(Ln), { tags: O }, null, 8, ["tags"])
|
|
2769
2761
|
]),
|
|
2770
2762
|
plugins: E(({ row: O }) => [
|
|
2771
2763
|
m(Sa, {
|
|
@@ -2775,7 +2767,7 @@ const Le = (e) => {
|
|
|
2775
2767
|
}, null, 8, ["config", "partial-id", "onClick"])
|
|
2776
2768
|
]),
|
|
2777
2769
|
actions: E(({ row: O }) => [
|
|
2778
|
-
m(
|
|
2770
|
+
m(_n, null, {
|
|
2779
2771
|
default: E(({ copyToClipboard: Xe }) => [
|
|
2780
2772
|
m(J, {
|
|
2781
2773
|
"data-testid": "action-entity-copy-id",
|
|
@@ -2831,51 +2823,46 @@ const Le = (e) => {
|
|
|
2831
2823
|
_: 2
|
|
2832
2824
|
}, 1032, ["auth-function"])
|
|
2833
2825
|
]),
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
"
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
}, 8, ["action-button-text", "can-create", "description", "features", "title"])
|
|
2875
|
-
]),
|
|
2876
|
-
key: "0"
|
|
2877
|
-
} : void 0
|
|
2878
|
-
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher-cache-key", "query"]),
|
|
2826
|
+
"empty-state": E(() => [
|
|
2827
|
+
m(i($n), {
|
|
2828
|
+
"action-button-text": i(c)("list.action"),
|
|
2829
|
+
appearance: "secondary",
|
|
2830
|
+
"can-create": () => e.canCreate(),
|
|
2831
|
+
"data-testid": "redis-entity-empty-state",
|
|
2832
|
+
description: i(c)("list.empty_state.description"),
|
|
2833
|
+
features: [
|
|
2834
|
+
{
|
|
2835
|
+
title: i(c)("list.empty_state.feature_1.title"),
|
|
2836
|
+
description: i(c)("list.empty_state.feature_1.description")
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
title: i(c)("list.empty_state.feature_2.title"),
|
|
2840
|
+
description: i(c)("list.empty_state.feature_2.description")
|
|
2841
|
+
}
|
|
2842
|
+
],
|
|
2843
|
+
title: i(c)("redis.title"),
|
|
2844
|
+
"onClick:create": Me,
|
|
2845
|
+
"onClick:learnMore": d[1] || (d[1] = () => n("click:learn-more"))
|
|
2846
|
+
}, {
|
|
2847
|
+
image: E(() => [
|
|
2848
|
+
K("div", La, [
|
|
2849
|
+
m(i(Hn), {
|
|
2850
|
+
color: i(va),
|
|
2851
|
+
size: i(ha)
|
|
2852
|
+
}, null, 8, ["color", "size"])
|
|
2853
|
+
])
|
|
2854
|
+
]),
|
|
2855
|
+
"feature-0-icon": E(() => [
|
|
2856
|
+
m(i(Fn))
|
|
2857
|
+
]),
|
|
2858
|
+
"feature-1-icon": E(() => [
|
|
2859
|
+
m(i(Bn))
|
|
2860
|
+
]),
|
|
2861
|
+
_: 1
|
|
2862
|
+
}, 8, ["action-button-text", "can-create", "description", "features", "title"])
|
|
2863
|
+
]),
|
|
2864
|
+
_: 1
|
|
2865
|
+
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher-cache-key", "query"]),
|
|
2879
2866
|
m(Va, {
|
|
2880
2867
|
visible: b.value,
|
|
2881
2868
|
onClose: d[3] || (d[3] = (O) => b.value = !1)
|
|
@@ -2903,7 +2890,7 @@ const Le = (e) => {
|
|
|
2903
2890
|
]);
|
|
2904
2891
|
};
|
|
2905
2892
|
}
|
|
2906
|
-
}), Xa = /* @__PURE__ */ ae(Da, [["__scopeId", "data-v-
|
|
2893
|
+
}), Xa = /* @__PURE__ */ ae(Da, [["__scopeId", "data-v-7d07fb48"]]), Ua = { class: "kong-ui-consumer-group-entity-config-card" }, Za = /* @__PURE__ */ Q({
|
|
2907
2894
|
__name: "RedisConfigurationConfigCard",
|
|
2908
2895
|
props: {
|
|
2909
2896
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3212,7 +3199,7 @@ const Le = (e) => {
|
|
|
3212
3199
|
config: e.config,
|
|
3213
3200
|
"config-card-doc": e.configCardDoc,
|
|
3214
3201
|
"config-schema": S.value,
|
|
3215
|
-
"entity-type": i(
|
|
3202
|
+
"entity-type": i(Ft).RedisConfiguration,
|
|
3216
3203
|
"fetch-url": a.value,
|
|
3217
3204
|
"hide-title": e.hideTitle,
|
|
3218
3205
|
"record-resolver": u,
|
|
@@ -3228,7 +3215,7 @@ const Le = (e) => {
|
|
|
3228
3215
|
]));
|
|
3229
3216
|
}
|
|
3230
3217
|
}), el = {
|
|
3231
|
-
useLinkedPlugins:
|
|
3218
|
+
useLinkedPlugins: gn,
|
|
3232
3219
|
useLinkedPluginsFetcher: Le
|
|
3233
3220
|
};
|
|
3234
3221
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared/dist/style.css"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/entities-vaults"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins-icon")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared/dist/style.css","@kong-ui-public/entities-vaults/dist/style.css","@kong-ui-public/entities-shared","@kong-ui-public/entities-vaults","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-plugins-icon"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V["kong-ui-public-entities-redis-configurations"]={},V.Vue,null,null,V["kong-ui-public-entities-shared"],V["kong-ui-public-entities-vaults"],V.VueRouter,V.KongIcons,V["kong-ui-public-i18n"],V["kong-ui-public-entities-plugins-icon"]))})(this,function(V,e,Ri,Oi,f,pe,Xe,ee,Ze,et){"use strict";var C=(t=>(t[t.HOST_PORT_CE=0]="HOST_PORT_CE",t[t.HOST_PORT_EE=1]="HOST_PORT_EE",t[t.SENTINEL=2]="SENTINEL",t[t.CLUSTER=3]="CLUSTER",t))(C||{}),D=(t=>(t.REDIS_CE="redis-ce",t.REDIS_EE="redis-ee",t))(D||{}),tt=typeof global=="object"&&global&&global.Object===Object&&global,Wt=typeof self=="object"&&self&&self.Object===Object&&self,H=tt||Wt||Function("return this")(),ie=H.Symbol,nt=Object.prototype,Gt=nt.hasOwnProperty,Jt=nt.toString,me=ie?ie.toStringTag:void 0;function Yt(t){var n=Gt.call(t,me),r=t[me];try{t[me]=void 0;var i=!0}catch{}var o=Jt.call(t);return i&&(n?t[me]=r:delete t[me]),o}var Qt=Object.prototype,Xt=Qt.toString;function Zt(t){return Xt.call(t)}var en="[object Null]",tn="[object Undefined]",rt=ie?ie.toStringTag:void 0;function ge(t){return t==null?t===void 0?tn:en:rt&&rt in Object(t)?Yt(t):Zt(t)}function _e(t){return t!=null&&typeof t=="object"}var Ee=Array.isArray;function ot(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var nn="[object AsyncFunction]",rn="[object Function]",on="[object GeneratorFunction]",an="[object Proxy]";function it(t){if(!ot(t))return!1;var n=ge(t);return n==rn||n==on||n==nn||n==an}var Be=H["__core-js_shared__"],at=function(){var t=/[^.]+$/.exec(Be&&Be.keys&&Be.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ln(t){return!!at&&at in t}var sn=Function.prototype,dn=sn.toString;function te(t){if(t!=null){try{return dn.call(t)}catch{}try{return t+""}catch{}}return""}var cn=/[\\^$.*+?()[\]{}|]/g,fn=/^\[object .+?Constructor\]$/,un=Function.prototype,pn=Object.prototype,mn=un.toString,gn=pn.hasOwnProperty,_n=RegExp("^"+mn.call(gn).replace(cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yn(t){if(!ot(t)||ln(t))return!1;var n=it(t)?_n:fn;return n.test(te(t))}function bn(t,n){return t==null?void 0:t[n]}function ae(t,n){var r=bn(t,n);return yn(r)?r:void 0}var De=ae(H,"WeakMap"),hn=9007199254740991,Cn=/^(?:0|[1-9]\d*)$/;function Tn(t,n){var r=typeof t;return n=n??hn,!!n&&(r=="number"||r!="symbol"&&Cn.test(t))&&t>-1&&t%1==0&&t<n}function lt(t,n){return t===n||t!==t&&n!==n}var wn=9007199254740991;function st(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=wn}function En(t){return t!=null&&st(t.length)&&!it(t)}var kn=Object.prototype;function Sn(t){var n=t&&t.constructor,r=typeof n=="function"&&n.prototype||kn;return t===r}function Vn(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}var xn="[object Arguments]";function dt(t){return _e(t)&&ge(t)==xn}var ct=Object.prototype,In=ct.hasOwnProperty,Rn=ct.propertyIsEnumerable,On=dt(function(){return arguments}())?dt:function(t){return _e(t)&&In.call(t,"callee")&&!Rn.call(t,"callee")};function Nn(){return!1}var ft=typeof V=="object"&&V&&!V.nodeType&&V,ut=ft&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=ut&&ut.exports===ft,pt=Pn?H.Buffer:void 0,An=pt?pt.isBuffer:void 0,Le=An||Nn,$n="[object Arguments]",Bn="[object Array]",Dn="[object Boolean]",Ln="[object Date]",Mn="[object Error]",vn="[object Function]",Un="[object Map]",jn="[object Number]",Fn="[object Object]",Hn="[object RegExp]",Kn="[object Set]",qn="[object String]",zn="[object WeakMap]",Wn="[object ArrayBuffer]",Gn="[object DataView]",Jn="[object Float32Array]",Yn="[object Float64Array]",Qn="[object Int8Array]",Xn="[object Int16Array]",Zn="[object Int32Array]",er="[object Uint8Array]",tr="[object Uint8ClampedArray]",nr="[object Uint16Array]",rr="[object Uint32Array]",I={};I[Jn]=I[Yn]=I[Qn]=I[Xn]=I[Zn]=I[er]=I[tr]=I[nr]=I[rr]=!0,I[$n]=I[Bn]=I[Wn]=I[Dn]=I[Gn]=I[Ln]=I[Mn]=I[vn]=I[Un]=I[jn]=I[Fn]=I[Hn]=I[Kn]=I[qn]=I[zn]=!1;function or(t){return _e(t)&&st(t.length)&&!!I[ge(t)]}function ir(t){return function(n){return t(n)}}var mt=typeof V=="object"&&V&&!V.nodeType&&V,ye=mt&&typeof module=="object"&&module&&!module.nodeType&&module,ar=ye&&ye.exports===mt,Me=ar&&tt.process,gt=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||Me&&Me.binding&&Me.binding("util")}catch{}}(),_t=gt&>.isTypedArray,yt=_t?ir(_t):or,lr=Object.prototype,sr=lr.hasOwnProperty;function dr(t,n){var r=Ee(t),i=!r&&On(t),o=!r&&!i&&Le(t),a=!r&&!i&&!o&&yt(t),m=r||i||o||a,_=m?Vn(t.length,String):[],l=_.length;for(var c in t)sr.call(t,c)&&!(m&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Tn(c,l)))&&_.push(c);return _}function cr(t,n){return function(r){return t(n(r))}}var fr=cr(Object.keys,Object),ur=Object.prototype,pr=ur.hasOwnProperty;function mr(t){if(!Sn(t))return fr(t);var n=[];for(var r in Object(t))pr.call(t,r)&&r!="constructor"&&n.push(r);return n}function gr(t){return En(t)?dr(t):mr(t)}var be=ae(Object,"create");function _r(){this.__data__=be?be(null):{},this.size=0}function yr(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var br="__lodash_hash_undefined__",hr=Object.prototype,Cr=hr.hasOwnProperty;function Tr(t){var n=this.__data__;if(be){var r=n[t];return r===br?void 0:r}return Cr.call(n,t)?n[t]:void 0}var wr=Object.prototype,Er=wr.hasOwnProperty;function kr(t){var n=this.__data__;return be?n[t]!==void 0:Er.call(n,t)}var Sr="__lodash_hash_undefined__";function Vr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=be&&n===void 0?Sr:n,this}function ne(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}ne.prototype.clear=_r,ne.prototype.delete=yr,ne.prototype.get=Tr,ne.prototype.has=kr,ne.prototype.set=Vr;function xr(){this.__data__=[],this.size=0}function ke(t,n){for(var r=t.length;r--;)if(lt(t[r][0],n))return r;return-1}var Ir=Array.prototype,Rr=Ir.splice;function Or(t){var n=this.__data__,r=ke(n,t);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Rr.call(n,r,1),--this.size,!0}function Nr(t){var n=this.__data__,r=ke(n,t);return r<0?void 0:n[r][1]}function Pr(t){return ke(this.__data__,t)>-1}function Ar(t,n){var r=this.__data__,i=ke(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}function K(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}K.prototype.clear=xr,K.prototype.delete=Or,K.prototype.get=Nr,K.prototype.has=Pr,K.prototype.set=Ar;var he=ae(H,"Map");function $r(){this.size=0,this.__data__={hash:new ne,map:new(he||K),string:new ne}}function Br(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function Se(t,n){var r=t.__data__;return Br(n)?r[typeof n=="string"?"string":"hash"]:r.map}function Dr(t){var n=Se(this,t).delete(t);return this.size-=n?1:0,n}function Lr(t){return Se(this,t).get(t)}function Mr(t){return Se(this,t).has(t)}function vr(t,n){var r=Se(this,t),i=r.size;return r.set(t,n),this.size+=r.size==i?0:1,this}function re(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}re.prototype.clear=$r,re.prototype.delete=Dr,re.prototype.get=Lr,re.prototype.has=Mr,re.prototype.set=vr;function Ur(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}function jr(){this.__data__=new K,this.size=0}function Fr(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}function Hr(t){return this.__data__.get(t)}function Kr(t){return this.__data__.has(t)}var qr=200;function zr(t,n){var r=this.__data__;if(r instanceof K){var i=r.__data__;if(!he||i.length<qr-1)return i.push([t,n]),this.size=++r.size,this;r=this.__data__=new re(i)}return r.set(t,n),this.size=r.size,this}function G(t){var n=this.__data__=new K(t);this.size=n.size}G.prototype.clear=jr,G.prototype.delete=Fr,G.prototype.get=Hr,G.prototype.has=Kr,G.prototype.set=zr;function Wr(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var m=t[r];n(m,r,t)&&(a[o++]=m)}return a}function Gr(){return[]}var Jr=Object.prototype,Yr=Jr.propertyIsEnumerable,bt=Object.getOwnPropertySymbols,Qr=bt?function(t){return t==null?[]:(t=Object(t),Wr(bt(t),function(n){return Yr.call(t,n)}))}:Gr;function Xr(t,n,r){var i=n(t);return Ee(t)?i:Ur(i,r(t))}function ht(t){return Xr(t,gr,Qr)}var ve=ae(H,"DataView"),Ue=ae(H,"Promise"),je=ae(H,"Set"),Ct="[object Map]",Zr="[object Object]",Tt="[object Promise]",wt="[object Set]",Et="[object WeakMap]",kt="[object DataView]",eo=te(ve),to=te(he),no=te(Ue),ro=te(je),oo=te(De),J=ge;(ve&&J(new ve(new ArrayBuffer(1)))!=kt||he&&J(new he)!=Ct||Ue&&J(Ue.resolve())!=Tt||je&&J(new je)!=wt||De&&J(new De)!=Et)&&(J=function(t){var n=ge(t),r=n==Zr?t.constructor:void 0,i=r?te(r):"";if(i)switch(i){case eo:return kt;case to:return Ct;case no:return Tt;case ro:return wt;case oo:return Et}return n});var St=H.Uint8Array,io="__lodash_hash_undefined__";function ao(t){return this.__data__.set(t,io),this}function lo(t){return this.__data__.has(t)}function Ve(t){var n=-1,r=t==null?0:t.length;for(this.__data__=new re;++n<r;)this.add(t[n])}Ve.prototype.add=Ve.prototype.push=ao,Ve.prototype.has=lo;function so(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}function co(t,n){return t.has(n)}var fo=1,uo=2;function Vt(t,n,r,i,o,a){var m=r&fo,_=t.length,l=n.length;if(_!=l&&!(m&&l>_))return!1;var c=a.get(t),b=a.get(n);if(c&&b)return c==n&&b==t;var w=-1,y=!0,E=r&uo?new Ve:void 0;for(a.set(t,n),a.set(n,t);++w<_;){var h=t[w],s=n[w];if(i)var S=m?i(s,h,w,n,t,a):i(h,s,w,t,n,a);if(S!==void 0){if(S)continue;y=!1;break}if(E){if(!so(n,function(O,p){if(!co(E,p)&&(h===O||o(h,O,r,i,a)))return E.push(p)})){y=!1;break}}else if(!(h===s||o(h,s,r,i,a))){y=!1;break}}return a.delete(t),a.delete(n),y}function po(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}function mo(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}var go=1,_o=2,yo="[object Boolean]",bo="[object Date]",ho="[object Error]",Co="[object Map]",To="[object Number]",wo="[object RegExp]",Eo="[object Set]",ko="[object String]",So="[object Symbol]",Vo="[object ArrayBuffer]",xo="[object DataView]",xt=ie?ie.prototype:void 0,Fe=xt?xt.valueOf:void 0;function Io(t,n,r,i,o,a,m){switch(r){case xo:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case Vo:return!(t.byteLength!=n.byteLength||!a(new St(t),new St(n)));case yo:case bo:case To:return lt(+t,+n);case ho:return t.name==n.name&&t.message==n.message;case wo:case ko:return t==n+"";case Co:var _=po;case Eo:var l=i&go;if(_||(_=mo),t.size!=n.size&&!l)return!1;var c=m.get(t);if(c)return c==n;i|=_o,m.set(t,n);var b=Vt(_(t),_(n),i,o,a,m);return m.delete(t),b;case So:if(Fe)return Fe.call(t)==Fe.call(n)}return!1}var Ro=1,Oo=Object.prototype,No=Oo.hasOwnProperty;function Po(t,n,r,i,o,a){var m=r&Ro,_=ht(t),l=_.length,c=ht(n),b=c.length;if(l!=b&&!m)return!1;for(var w=l;w--;){var y=_[w];if(!(m?y in n:No.call(n,y)))return!1}var E=a.get(t),h=a.get(n);if(E&&h)return E==n&&h==t;var s=!0;a.set(t,n),a.set(n,t);for(var S=m;++w<l;){y=_[w];var O=t[y],p=n[y];if(i)var u=m?i(p,O,y,n,t,a):i(O,p,y,t,n,a);if(!(u===void 0?O===p||o(O,p,r,i,a):u)){s=!1;break}S||(S=y=="constructor")}if(s&&!S){var B=t.constructor,N=n.constructor;B!=N&&"constructor"in t&&"constructor"in n&&!(typeof B=="function"&&B instanceof B&&typeof N=="function"&&N instanceof N)&&(s=!1)}return a.delete(t),a.delete(n),s}var Ao=1,It="[object Arguments]",Rt="[object Array]",xe="[object Object]",$o=Object.prototype,Ot=$o.hasOwnProperty;function Bo(t,n,r,i,o,a){var m=Ee(t),_=Ee(n),l=m?Rt:J(t),c=_?Rt:J(n);l=l==It?xe:l,c=c==It?xe:c;var b=l==xe,w=c==xe,y=l==c;if(y&&Le(t)){if(!Le(n))return!1;m=!0,b=!1}if(y&&!b)return a||(a=new G),m||yt(t)?Vt(t,n,r,i,o,a):Io(t,n,l,r,i,o,a);if(!(r&Ao)){var E=b&&Ot.call(t,"__wrapped__"),h=w&&Ot.call(n,"__wrapped__");if(E||h){var s=E?t.value():t,S=h?n.value():n;return a||(a=new G),o(s,S,r,i,a)}}return y?(a||(a=new G),Po(t,n,r,i,o,a)):!1}function Nt(t,n,r,i,o){return t===n?!0:t==null||n==null||!_e(t)&&!_e(n)?t!==t&&n!==n:Bo(t,n,r,i,Nt,o)}function Do(t,n){return Nt(t,n)}for(var $=[],He=0;He<256;++He)$.push((He+256).toString(16).slice(1));function Lo(t,n=0){return($[t[n+0]]+$[t[n+1]]+$[t[n+2]]+$[t[n+3]]+"-"+$[t[n+4]]+$[t[n+5]]+"-"+$[t[n+6]]+$[t[n+7]]+"-"+$[t[n+8]]+$[t[n+9]]+"-"+$[t[n+10]]+$[t[n+11]]+$[t[n+12]]+$[t[n+13]]+$[t[n+14]]+$[t[n+15]]).toLowerCase()}var Ie,Mo=new Uint8Array(16);function vo(){if(!Ie&&(Ie=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ie))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ie(Mo)}var Uo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Pt={randomUUID:Uo};function jo(t,n,r){if(Pt.randomUUID&&!t)return Pt.randomUUID();t=t||{};var i=t.random||(t.rng||vo)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Lo(i)}const At={ip:"127.0.0.1",port:6379},$t={host:"127.0.0.1",port:6379},le=C.HOST_PORT_EE,Bt={port:6379,host:"127.0.0.1",database:0,username:"",password:"",ssl:!1,ssl_verify:!1,server_name:"",connect_timeout:2e3,send_timeout:2e3,read_timeout:2e3,sentinel_username:"",sentinel_password:"",keepalive_pool_size:256,keepalive_backlog:0,sentinel_master:"",sentinel_nodes:[],cluster_nodes:[],cluster_max_redirections:0,connection_is_proxied:!1,timeout:2e3},Fo=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_CLUSTER_NODE:At,DEFAULT_FIELDS:Bt,DEFAULT_REDIS_TYPE:le,DEFAULT_SENTINEL_NODE:$t},Symbol.toStringTag,{value:"Module"})),Ce=t=>({...t,id:jo()}),Ke=t=>{const{id:n,...r}=t;return r},Dt=()=>Ce($t),Lt=()=>Ce(At),Re=t=>{var n,r;return t.type===D.REDIS_CE?C.HOST_PORT_CE:(n=t.config.sentinel_nodes)!=null&&n.length?C.SENTINEL:(r=t.config.cluster_nodes)!=null&&r.length?C.CLUSTER:C.HOST_PORT_EE},Oe=t=>t===C.HOST_PORT_CE?D.REDIS_CE:D.REDIS_EE,T={int(t,n){return t==null?n:parseInt(t.toString(),10)},str(t,n){return t==null||t===""?n:t.toString()},removeIdClusterNodes(t){return t.map(n=>({...Ke(n),port:T.int(n.port)}))},removeIdFromSentinelNodes(t){return t.map(n=>({...Ke(n),port:T.int(n.port)}))},addIdToClusterNodes(t){return t.map(Ce)},addIdToSentinelNodes(t){return t.map(Ce)},removeNullValues(t){const n={...t};for(const r in n)n[r]===null&&delete n[r];return n},stringToArray(t,n=","){return t?t.split(n).map(r=>String(r||"").trim()).filter(r=>r!==""):[]},arrayToString(t,n=", "){return t?t.join(n):""}},Ho=Object.freeze(Object.defineProperty({__proto__:null,genDefaultClusterNode:Lt,genDefaultSentinelNode:Dt,getRedisType:Re,mapRedisTypeToPartialType:Oe,shallowCopyWithId:Ce,shallowCopyWithoutId:Ke,standardize:T},Symbol.toStringTag,{value:"Module"})),Ne="/v2/control-planes/{controlPlaneId}/core-entities",Pe="/{workspace}",Te={list:{konnect:`${Ne}/partials`,kongManager:`${Pe}/partials`},form:{konnect:{create:`${Ne}/partials`,edit:`${Ne}/partials/{id}`},kongManager:{create:`${Pe}/partials`,edit:`${Pe}/partials/{id}`}},links:{konnect:`${Ne}/partials/{id}/links`,kongManager:`${Pe}/partials/{id}/links`}},Ko=t=>{const{partialId:n,config:r,defaultRedisType:i=le}=t,o=!!n,{axiosInstance:a}=f.useAxios(r.axiosRequestConfig),{getMessageFromError:m}=f.useErrors(),_=e.computed(()=>n?f.EntityBaseFormType.Edit:f.EntityBaseFormType.Create),l=e.reactive({fields:{name:"",tags:"",type:Oe(i),config:JSON.parse(JSON.stringify(Bt))},readonly:!1,errorMessage:""}),c=e.ref(),b=e.ref(i),w=e.computed(()=>b.value===C.HOST_PORT_EE||b.value===C.CLUSTER||b.value===C.SENTINEL);e.watch(b,p=>{l.fields.type=Oe(p)});const y=e.computed(()=>{var u;if(o&&Do(c.value,E.value)||!l.fields.name.length)return!1;const{config:p}=l.fields;switch(b.value){case C.HOST_PORT_CE:case C.HOST_PORT_EE:return!!p.host&&p.host.length>0&&!!p.port&&p.port>0;case C.CLUSTER:return!!p.cluster_nodes.length&&p.cluster_nodes.every(B=>B.ip.length>0);case C.SENTINEL:return!!p.sentinel_nodes.length&&p.sentinel_nodes.every(B=>B.host.length>0)&&!!((u=p.sentinel_master)!=null&&u.length)&&p.sentinel_role&&!!p.sentinel_role.length;default:throw new Error("Invalid redis type")}}),E=e.computed(()=>{switch(b.value){case C.HOST_PORT_CE:return{name:l.fields.name,type:l.fields.type,tags:T.stringToArray(l.fields.tags),config:{host:l.fields.config.host,port:T.int(l.fields.config.port),timeout:T.int(l.fields.config.timeout),username:T.str(l.fields.config.username,null),database:T.int(l.fields.config.database),password:T.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:T.str(l.fields.config.server_name,null)}};case C.HOST_PORT_EE:return{name:l.fields.name,type:l.fields.type,tags:T.stringToArray(l.fields.tags),config:{connect_timeout:T.int(l.fields.config.connect_timeout),connection_is_proxied:l.fields.config.connection_is_proxied,database:T.int(l.fields.config.database),host:l.fields.config.host,keepalive_backlog:T.int(l.fields.config.keepalive_backlog),keepalive_pool_size:T.int(l.fields.config.keepalive_pool_size),password:T.str(l.fields.config.password,null),port:T.int(l.fields.config.port),read_timeout:T.int(l.fields.config.read_timeout),send_timeout:T.int(l.fields.config.send_timeout),server_name:T.str(l.fields.config.server_name,null),ssl_verify:l.fields.config.ssl_verify,ssl:l.fields.config.ssl,username:T.str(l.fields.config.username,null),cluster_nodes:null,cluster_max_redirections:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null}};case C.CLUSTER:return{name:l.fields.name,type:l.fields.type,tags:T.stringToArray(l.fields.tags),config:{cluster_nodes:T.removeIdClusterNodes(l.fields.config.cluster_nodes),cluster_max_redirections:T.int(l.fields.config.cluster_max_redirections),username:T.str(l.fields.config.username,null),password:T.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:T.str(l.fields.config.server_name,null),connect_timeout:T.int(l.fields.config.connect_timeout),database:T.int(l.fields.config.database),send_timeout:T.int(l.fields.config.send_timeout),read_timeout:T.int(l.fields.config.read_timeout),keepalive_pool_size:T.int(l.fields.config.keepalive_pool_size),keepalive_backlog:T.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null,host:null,port:null}};case C.SENTINEL:return{name:l.fields.name,type:l.fields.type,tags:T.stringToArray(l.fields.tags),config:{sentinel_master:T.str(l.fields.config.sentinel_master,null),sentinel_nodes:T.removeIdFromSentinelNodes(l.fields.config.sentinel_nodes),sentinel_role:T.str(l.fields.config.sentinel_role,null),sentinel_username:T.str(l.fields.config.sentinel_username,null),sentinel_password:T.str(l.fields.config.sentinel_password,null),username:T.str(l.fields.config.username,null),password:T.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:T.str(l.fields.config.server_name,null),database:T.int(l.fields.config.database),connect_timeout:T.int(l.fields.config.connect_timeout),send_timeout:T.int(l.fields.config.send_timeout),read_timeout:T.int(l.fields.config.read_timeout),keepalive_pool_size:T.int(l.fields.config.keepalive_pool_size),keepalive_backlog:T.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,cluster_nodes:null,cluster_max_redirections:null,host:null,port:null}};default:throw new Error("Invalid redis type")}}),h=e.computed(()=>{let p=`${r.apiBaseUrl}${Te.form[r.app][_.value]}`;return r.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,(r==null?void 0:r.controlPlaneId)||""):r.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,r!=null&&r.workspace?`/${r.workspace}`:"")),p=p.replace(/{id}/gi,n||""),p}),s=e.computed(()=>{var p;return(p=Te.form[r==null?void 0:r.app])==null?void 0:p.edit});return{form:l,canSubmit:y,payload:E,isEdit:o,redisType:b,redisTypeIsEnterprise:w,formType:_,fetchUrl:s,submit:async()=>{try{l.readonly=!0,l.errorMessage="";let p=E.value;return r.app==="konnect"&&(p={...p,config:T.removeNullValues(p.config)}),_.value===f.EntityBaseFormType.Create?await a.post(h.value,p):r.app==="konnect"?await a.put(h.value,p):await a.patch(h.value,p)}catch(p){throw l.errorMessage=m(p),l.readonly=!1,p}},setInitialFormValues:p=>{l.fields.config=Object.assign({},l.fields.config,T.removeNullValues(p.config)),l.fields.config.sentinel_nodes=T.addIdToSentinelNodes(p.config.sentinel_nodes??[]),l.fields.config.cluster_nodes=T.addIdToClusterNodes(p.config.cluster_nodes??[]),l.fields.name=p.name,l.fields.type=p.type,l.fields.tags=T.arrayToString(p.tags),b.value=Re(p),c.value=JSON.parse(JSON.stringify(E.value))}}},qo={class:"array-card-container"},zo=e.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0},disabled:{type:Boolean,default:!1}},emits:["remove-item"],setup(t){return(n,r)=>{const i=e.resolveComponent("KCard"),o=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",qo,[e.createVNode(i,{class:"card"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),e.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",disabled:t.disabled,onClick:r[0]||(r[0]=a=>n.$emit("remove-item"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.TrashIcon))]),_:1},8,["disabled"])])}}}),q=(t,n)=>{const r=t.__vccOpts||t;for(const[i,o]of n)r[i]=o;return r},Mt=q(zo,[["__scopeId","data-v-a0b2e4fb"]]),Wo={actions:{create:"New Redis Configuration",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",done:"Done",view:"View Details",loading:"Loading...",view_plugin:"View Plugin",close:"Close"},search:{placeholder:"Filter by name",placeholder_for_exact_match:"Filter by exact ID",no_results:"No results found"},delete:{title:"Delete Redis configuration",description:"You’re about to delete this item. Are you sure you want to proceed?",warning:"To delete this configuration, first remove it from all associated plugins."},errors:{copy:"Failed to copy to clipboard",general:"Redis configuration could not be retrieved",delete:"The redis configuration could not be deleted at this time."},copy:{success:"Copied {val} to clipboard"},form:{sections:{type:{title:"Redis type",description:"Both Enterprise and Open Source plugins support Redis. Enterprise plugins can connect to a standalone Redis instance (host/port), Cluster, or Sentinel, while Open Source plugins support only a simplified host/port configuration."},general:{title:"General information",description:"Name your Redis configuration."},connection:{title:"Connection settings",description:"Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."},cluster:{title:"Cluster configuration",description:"Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."},tls:{title:"TLS settings",description:"Configure secure connections to Redis, including SSL and verification options."},keepalive:{title:"Keepalive configuration",description:"Keepalive reuses active connections to Redis, improving performance and efficiency."},read_write_configuration:{title:"Read/Write configuration",description:"Set timeouts for reading from and writing to the Redis server to control data transmission reliability."},sentinel_configuration:{title:"Sentinel configuration",description:"Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."}},fields:{type:{label:"Redis type"},name:{label:"Name",placeholder:"Enter unique name"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Route for grouping and filtering."},host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},database:{label:"Database",tooltip:"Database to use for the Redis connection."},password:{label:"Password",tooltip:"Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."},username:{label:"Username",tooltip:"Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`."},ssl:{label:"SSL",description:"If set to true, uses SSL to connect to Redis.",tooltip:"If set to true, uses SSL to connect to Redis."},ssl_verify:{label:"SSL Verify",description:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong. conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ss1_verify_depth accordingly.",tooltip:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong.conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly."},server_name:{label:"Server name",tooltip:"A string representing an SNI (server name indication) value for TLS."},keepalive_backlog:{label:"Keepalive backlog",tooltip:"Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`."},keepalive_pool_size:{label:"Keepalive pool size",tooltip:"The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low."},read_timeout:{label:"Read timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},send_timeout:{label:"Send timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},connect_timeout:{label:"Connect timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},sentinel_master:{label:"Sentinel master",tooltip:"Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."},sentinel_role:{label:"Sentinel role",tooltip:"Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."},sentinel_username:{label:"Sentinel username",tooltip:"Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."},sentinel_password:{label:"Sentinel password",tooltip:"Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."},cluster_node_ip:{label:"IP",tooltip:"A string representing a host name, such as example.com."},cluster_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},cluster_max_redirections:{label:"Cluster max redirections",tooltip:"Maximum retry attempts for redirection."},timeout:{label:"Timeout",tooltip:"redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"},connection_is_proxied:{label:"Connection is proxied",tooltip:"If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address."},cluster_nodes:{title:"Cluster nodes",tooltip:"Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_nodes:{title:"Sentinel nodes",tooltip:"Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_node_host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},sentinel_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."}},options:{type:{host_port:"Host/Port",cluster:"Cluster",sentinel:"Sentinel",open_source:"Open Source",enterprise:"Enterprise",suffix_open_source:" (Open Source)",suffix_enterprise:" (Enterprise)"},sentinel_role:{master:"master",slave:"slave",any:"any"}},edit_warning_modal:{title:"Edit Redis configuration",description:"This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",plugin_count:"{count} plugin(s)",confirm:"Confirm"}},linked_plugins_modal:{title:"Associated plugins ({count})",headers:{plugin:"Plugin",instance_name:"Name"}},redis:{title:"Redis Configurations",empty_state:{title:"Configure a Redis Configuration",description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."}},list:{action:"New configuration",table_headers:{name:"Name",type:"Type",plugins:"Plugins",tags:"Tags"},empty_state:{description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",feature_1:{title:"Store your Redis configurations",description:"Define a Redis configuration once and use it across multiple plugins."},feature_2:{title:"Sync across plugins",description:"Edits to your configuration will be cascaded automatically to all associated plugins."}}}};function Go(){const t=Ze.createI18n("en-us",Wo);return{i18n:t,i18nT:Ze.i18nTComponent(t)}}const Y={useI18n:Go},Jo={class:"cluster-node-items"},Yo=q(e.defineComponent({__name:"ClusterNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=Y.useI18n(),i=()=>{n.value.push(Lt())},o=a=>{n.value.splice(a,1)};return(a,m)=>{const _=e.resolveComponent("KLabel"),l=e.resolveComponent("KInput"),c=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(_,{class:"required",info:e.unref(r)("form.fields.cluster_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(b,w)=>(e.openBlock(),e.createBlock(Mt,{key:`${w}`,"data-testid":"redis-cluster-nodes",disabled:a.readonly,onRemoveItem:y=>o(w)},{default:e.withCtx(()=>[e.createElementVNode("div",Jo,[e.createVNode(l,{modelValue:b.ip,"onUpdate:modelValue":y=>b.ip=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.cluster_node_ip.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_ip.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"ip",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(l,{modelValue:b.port,"onUpdate:modelValue":y=>b.port=y,label:e.unref(r)("form.fields.cluster_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(c,{appearance:"tertiary","data-testid":"redis-add-cluster-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-776a626d"]]),Qo={class:"sentinel-node-items"},Xo=q(e.defineComponent({__name:"SentinelNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=Y.useI18n(),i=()=>{n.value.push(Dt())},o=a=>{n.value.splice(a,1)};return(a,m)=>{const _=e.resolveComponent("KLabel"),l=e.resolveComponent("KInput"),c=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(_,{class:"required",info:e.unref(r)("form.fields.sentinel_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(b,w)=>(e.openBlock(),e.createBlock(Mt,{key:b.id,"data-testid":"redis-sentinel-nodes",disabled:a.readonly,onRemoveItem:y=>o(w)},{default:e.withCtx(()=>[e.createElementVNode("div",Qo,[e.createVNode(l,{modelValue:b.host,"onUpdate:modelValue":y=>b.host=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.sentinel_node_host.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(l,{modelValue:b.port,"onUpdate:modelValue":y=>b.port=y,label:e.unref(r)("form.fields.sentinel_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(c,{appearance:"tertiary","data-testid":"redis-add-sentinel-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-cd1c07e2"]]);var qe=new WeakMap,vt=0;function Zo(t){if(!t.length)return"";for(var n="arg",r=0;r<t.length;++r){var i=void 0;t[r]===null||typeof t[r]!="object"&&typeof t[r]!="function"?typeof t[r]=="string"?i='"'+t[r]+'"':i=String(t[r]):qe.has(t[r])?i=qe.get(t[r]):(i=vt,qe.set(t[r],vt++)),n+="@"+i}return n}function ei(t){if(typeof t=="function")try{t=t()}catch{t=""}return Array.isArray(t)?t=Zo(t):t=String(t||""),t}var ze=function(){function t(n){n===void 0&&(n=0),this.items=new Map,this.ttl=n}return t.prototype.serializeKey=function(n){return ei(n)},t.prototype.get=function(n){var r=this.serializeKey(n);return this.items.get(r)},t.prototype.set=function(n,r,i){var o=this.serializeKey(n),a=i||this.ttl,m=Date.now(),_={data:r,createdAt:m,expiresAt:a?m+a:1/0};this.dispatchExpire(a,_,o),this.items.set(o,_)},t.prototype.dispatchExpire=function(n,r,i){var o=this;n&&setTimeout(function(){var a=Date.now(),m=a>=r.expiresAt;m&&o.delete(i)},n)},t.prototype.delete=function(n){this.items.delete(n)},t}();function ti(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function ni(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var ri=function(t){return fetch(t).then(function(n){return n.json()})};const We={isOnline:ti,isDocumentVisible:ni,fetcher:ri};var z=function(){return z=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},z.apply(this,arguments)},se=function(t,n,r,i){function o(a){return a instanceof r?a:new r(function(m){m(a)})}return new(r||(r=Promise))(function(a,m){function _(b){try{c(i.next(b))}catch(w){m(w)}}function l(b){try{c(i.throw(b))}catch(w){m(w)}}function c(b){b.done?a(b.value):o(b.value).then(_,l)}c((i=i.apply(t,n||[])).next())})},de=function(t,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,m;return m={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function _(c){return function(b){return l([c,b])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=n.call(t,r)}catch(b){c=[6,b],o=0}finally{i=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},oi=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),o,a=[],m;try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(_){m={error:_}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(m)throw m.error}}return a},ii=function(t,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,a;i<o;i++)(a||!(i in n))&&(a||(a=Array.prototype.slice.call(n,0,i)),a[i]=n[i]);return t.concat(a||Array.prototype.slice.call(n))},Ut=new ze,Ae=new ze,Ge=new ze,jt={cache:Ut,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:We.fetcher,isOnline:We.isOnline,isDocumentVisible:We.isDocumentVisible};function ai(t,n,r){var i=Ae.get(t);if(i)i.data.push(n);else{var o=5e3;Ae.set(t,[n],r>0?r+o:r)}}function li(t,n,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&n>r.errorRetryCount)){var i=Math.min(n||0,r.errorRetryCount),o=i*r.errorRetryInterval;setTimeout(function(){t(null,{errorRetryCount:i+1,shouldRetryOnError:!0})},o)}}var Ft=function(t,n,r,i){return r===void 0&&(r=Ut),i===void 0&&(i=jt.ttl),se(void 0,void 0,void 0,function(){var o,a,m,_,l,c,b;return de(this,function(w){switch(w.label){case 0:if(!di(n))return[3,5];w.label=1;case 1:return w.trys.push([1,3,,4]),[4,n];case 2:return o=w.sent(),[3,4];case 3:return _=w.sent(),a=_,[3,4];case 4:return[3,6];case 5:o=n,w.label=6;case 6:if(m=!1,l={data:o,error:a,isValidating:m},typeof o<"u")try{r.set(t,l,i)}catch(y){console.error("swrv(mutate): failed to set cache",y)}return c=Ae.get(t),c&&c.data.length&&(b=c.data.filter(function(y){return y.key===t}),b.forEach(function(y,E){typeof l.data<"u"&&(y.data=l.data),y.error=l.error,y.isValidating=l.isValidating,y.isLoading=l.isValidating;var h=E===b.length-1;h||delete b[E]}),b=b.filter(Boolean)),[2,l]}})})};function si(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o,a=z({},jt),m=!1,_=!1,l=e.getCurrentInstance(),c=(l==null?void 0:l.proxy)||l;if(!c)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var b=(c==null?void 0:c.$isServer)||!1;n.length>=1&&(i=n[0]),n.length>=2&&(o=n[1]),n.length>2&&(a=z(z({},a),n[2]));var w=b?a.serverTTL:a.ttl,y=typeof i=="function"?i:e.ref(i);typeof o>"u"&&(o=a.fetcher);var E=null;E||(E=e.reactive({data:void 0,error:void 0,isValidating:!0,isLoading:!0,key:null}));var h=function(p,u){return se(t,void 0,void 0,function(){var B,N,L,j,Q,M,W,F=this;return de(this,function(X){switch(X.label){case 0:return B=E.data===void 0,N=y.value,N?(L=a.cache.get(N),j=L&&L.data,E.isValidating=!0,E.isLoading=!j,j&&(E.data=j.data,E.error=j.error),Q=p||o,!Q||!a.isDocumentVisible()&&!B||(u==null?void 0:u.forceRevalidate)!==void 0&&!(u!=null&&u.forceRevalidate)?(E.isValidating=!1,E.isLoading=!1,[2]):L&&(M=!!(Date.now()-L.createdAt>=a.dedupingInterval||u!=null&&u.forceRevalidate),!M)?(E.isValidating=!1,E.isLoading=!1,[2]):(W=function(){return se(F,void 0,void 0,function(){var v,ce,oe,fe;return de(this,function(Z){switch(Z.label){case 0:return v=Ge.get(N),v?[3,2]:(ce=Array.isArray(N)?N:[N],oe=Q.apply(void 0,ii([],oi(ce),!1)),Ge.set(N,oe,a.dedupingInterval),[4,Ft(N,oe,a.cache,w)]);case 1:return Z.sent(),[3,4];case 2:return[4,Ft(N,v.data,a.cache,w)];case 3:Z.sent(),Z.label=4;case 4:return E.isValidating=!1,E.isLoading=!1,Ge.delete(N),E.error!==void 0&&(fe=!m&&a.shouldRetryOnError&&(u?u.shouldRetryOnError:!0),fe&&li(h,u?u.errorRetryCount:1,a)),[2]}})})},j&&a.revalidateDebounce?(setTimeout(function(){return se(F,void 0,void 0,function(){return de(this,function(v){switch(v.label){case 0:return m?[3,2]:[4,W()];case 1:v.sent(),v.label=2;case 2:return[2]}})})},a.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,W()];case 2:X.sent(),X.label=3;case 3:return[2]}})})},s=function(){return se(t,void 0,void 0,function(){return de(this,function(p){return[2,h(null,{shouldRetryOnError:!1})]})})},S=null;e.onMounted(function(){var p=function(){return se(t,void 0,void 0,function(){return de(this,function(u){switch(u.label){case 0:return!E.error&&a.isOnline()?[4,h()]:[3,2];case 1:return u.sent(),[3,3];case 2:S&&clearTimeout(S),u.label=3;case 3:return a.refreshInterval&&!m&&(S=setTimeout(p,a.refreshInterval)),[2]}})})};a.refreshInterval&&(S=setTimeout(p,a.refreshInterval)),a.revalidateOnFocus&&(document.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1))}),e.onUnmounted(function(){m=!0,S&&clearTimeout(S),a.revalidateOnFocus&&(document.removeEventListener("visibilitychange",s,!1),window.removeEventListener("focus",s,!1));var p=Ae.get(y.value);p&&(p.data=p.data.filter(function(u){return u!==E}))});try{e.watch(y,function(p){e.isReadonly(y)||(y.value=p),E.key=p,E.isValidating=!!p,ai(y.value,E,w),!b&&!_&&y.value&&h(),_=!1},{immediate:!0})}catch{}var O=z(z({},e.toRefs(E)),{mutate:function(p,u){return h(p,z(z({},u),{forceRevalidate:!0}))}});return O}function di(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}function Ht(t){return`redis-partial-links-${t}`}const we=t=>{const{axiosInstance:n}=f.useAxios(t.axiosRequestConfig);return{fetcher:async r=>{const{partialId:i,size:o,offset:a,query:m}=r;let _=`${t.apiBaseUrl}${Te.links[t.app]}`;t.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:"")),_=_.replace(/{id}/gi,i||""),m&&(_=`${_}?${m}`);const{data:l}=await n.get(_,{params:{size:o,offset:a}});return l}}},Kt=t=>{const{partialId:n,config:r}=t,{fetcher:i}=we(r),o=e.ref([]),{data:a}=si(Ht(n),()=>i({partialId:n}),{revalidateOnFocus:!1});return e.watch(a,()=>{var m;o.value=((m=a.value)==null?void 0:m.data)??[]}),o},ci={class:"kong-ui-entities-redis-configurations-form"},fi=q(e.defineComponent({__name:"RedisConfigurationForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string")},partialId:{type:String,required:!1,default:""},actionTeleportTarget:{type:String},slidoutTopOffset:{type:Number,default:60},disabledPartialType:{type:String,default:""}},emits:["update","error","loading","cancel"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o},i18nT:a}=Y.useI18n(),m=Xe.useRouter(),_=e.ref(),l=e.ref(),c=(P,g)=>{_.value=P??"",l.value=g},b=P=>{var g;(g=l.value)==null||g.call(l,P),_.value=!1},w=e.computed(()=>[{label:o("form.options.type.host_port"),group:o("form.options.type.enterprise"),value:C.HOST_PORT_EE,selected:u.value===C.HOST_PORT_EE,disabled:!p&&r.disabledPartialType===D.REDIS_EE},{label:o("form.options.type.cluster"),group:o("form.options.type.enterprise"),value:C.CLUSTER,selected:u.value===C.CLUSTER,disabled:!p&&r.disabledPartialType===D.REDIS_EE},{label:o("form.options.type.sentinel"),group:o("form.options.type.enterprise"),value:C.SENTINEL,selected:u.value===C.SENTINEL,disabled:!p&&r.disabledPartialType===D.REDIS_EE},{label:o("form.options.type.host_port"),group:o("form.options.type.open_source"),value:C.HOST_PORT_CE,selected:u.value===C.HOST_PORT_CE,disabled:p&&B.value||!p&&r.disabledPartialType===D.REDIS_CE}]),y=[{label:o("form.options.sentinel_role.master"),value:"master"},{label:o("form.options.sentinel_role.slave"),value:"slave"},{label:o("form.options.sentinel_role.any"),value:"any"}],E=P=>{const g=P.value===C.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");return`${P.label}${g}`},h=()=>r.disabledPartialType&&Oe(le)===r.disabledPartialType?r.disabledPartialType===D.REDIS_CE?C.HOST_PORT_EE:C.HOST_PORT_CE:le,{form:s,canSubmit:S,payload:O,isEdit:p,redisType:u,redisTypeIsEnterprise:B,fetchUrl:N,submit:L,setInitialFormValues:j}=Ko({partialId:r.partialId,defaultRedisType:h(),config:r.config}),{fetcher:Q}=we(r.config),M=e.ref(!1),W=e.ref(!1),F=e.ref(0),X=async()=>{try{if(p&&!W.value){const{count:g}=await Q({partialId:r.partialId});if(F.value=g,g>0){M.value=!0;return}}const{data:P}=await L();i("update",P)}catch(P){i("error",P)}},v=()=>{M.value=!1,W.value=!0,X()},ce=()=>{r.config.cancelRoute&&m.push(r.config.cancelRoute),i("cancel")},oe=P=>{i("loading",P)},fe=P=>{i("error",P)},Z=P=>{j(P)};return e.onBeforeMount(async()=>{if(p){const{count:P}=await Q({partialId:r.partialId});F.value=P}}),(P,g)=>{const Ye=e.resolveComponent("KAlert"),$e=e.resolveComponent("KSelect"),A=e.resolveComponent("KInput"),ue=e.resolveComponent("KCheckbox"),k=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ci,[e.createVNode(e.unref(f.EntityBaseForm),{"action-teleport-target":t.actionTeleportTarget,"can-submit":e.unref(S),config:t.config,"edit-id":t.partialId,"entity-type":e.unref(f.SupportedEntityType).RedisConfiguration,"error-message":e.unref(s).errorMessage,"fetch-url":e.unref(N),"form-fields":e.unref(O),"is-readonly":e.unref(s).readonly,"slidout-top-offset":t.slidoutTopOffset,onCancel:ce,"onFetch:error":fe,"onFetch:success":Z,onLoading:oe,onSubmit:X},{default:e.withCtx(()=>[F.value>0&&e.unref(p)?(e.openBlock(),e.createBlock(Ye,{key:0,appearance:"warning",class:"warning-alert","data-testid":"redis-update-warning-alert"},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:F.value})),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(f.EntityFormSection),{"data-testid":"redis-type-section",description:e.unref(o)("form.sections.type.description"),title:e.unref(o)("form.sections.type.title")},{default:e.withCtx(()=>[e.createVNode($e,{modelValue:e.unref(u),"onUpdate:modelValue":g[0]||(g[0]=d=>e.isRef(u)?u.value=d:null),"data-testid":"redis-type-select",disabled:e.unref(p)&&e.unref(u)===e.unref(C).HOST_PORT_CE,items:w.value,"kpop-attributes":{"data-testid":"redis-type-select-popover"},label:e.unref(o)("form.fields.type.label"),readonly:e.unref(s).readonly,required:""},{"selected-item-template":e.withCtx(({item:d})=>[e.createTextVNode(e.toDisplayString(E(d)),1)]),_:1},8,["modelValue","disabled","items","label","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(f.EntityFormSection),{"data-testid":"redis-general-section",description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.name,"onUpdate:modelValue":g[1]||(g[1]=d=>e.unref(s).fields.name=d),modelModifiers:{trim:!0},"data-testid":"redis-name-input",disabled:e.unref(p),label:e.unref(o)("form.fields.name.label"),placeholder:e.unref(o)("form.fields.name.placeholder"),readonly:e.unref(s).readonly,required:""},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.tags,"onUpdate:modelValue":g[2]||(g[2]=d=>e.unref(s).fields.tags=d),modelModifiers:{trim:!0},"data-testid":"redis-tags-input",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),"label-attributes":{info:e.unref(o)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:e.unref(s).readonly},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.unref(u)===e.unref(C).SENTINEL?(e.openBlock(),e.createBlock(e.unref(f.EntityFormSection),{key:1,"data-testid":"redis-sentinel-configuration-section",description:e.unref(o)("form.sections.sentinel_configuration.description"),title:e.unref(o)("form.sections.sentinel_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_master,"onUpdate:modelValue":g[3]||(g[3]=d=>e.unref(s).fields.config.sentinel_master=d),"data-testid":"redis-sentinel-master-input",label:e.unref(o)("form.fields.sentinel_master.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_master.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode($e,{modelValue:e.unref(s).fields.config.sentinel_role,"onUpdate:modelValue":g[4]||(g[4]=d=>e.unref(s).fields.config.sentinel_role=d),"data-testid":"redis-sentinel-role-select",items:y,"kpop-attributes":{"data-testid":"redis-sentinel-role-select-popover"},label:e.unref(o)("form.fields.sentinel_role.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Xo,{modelValue:e.unref(s).fields.config.sentinel_nodes,"onUpdate:modelValue":g[5]||(g[5]=d=>e.unref(s).fields.config.sentinel_nodes=d),readonly:e.unref(s).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_username,"onUpdate:modelValue":g[6]||(g[6]=d=>e.unref(s).fields.config.sentinel_username=d),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_username.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(pe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:d=>e.unref(s).fields.config.sentinel_username=d,value:e.unref(s).fields.config.sentinel_username,onOpen:g[7]||(g[7]=(d,x)=>c(d,x))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_password,"onUpdate:modelValue":g[8]||(g[8]=d=>e.unref(s).fields.config.sentinel_password=d),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_password.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(pe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:d=>e.unref(s).fields.config.sentinel_password=d,value:e.unref(s).fields.config.sentinel_password,onOpen:g[9]||(g[9]=(d,x)=>c(d,x))},null,8,["disabled","update","value"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(u)===e.unref(C).CLUSTER?(e.openBlock(),e.createBlock(e.unref(f.EntityFormSection),{key:2,"data-testid":"redis-cluster-configuration-section",description:e.unref(o)("form.sections.cluster.description"),title:e.unref(o)("form.sections.cluster.title")},{default:e.withCtx(()=>[e.createVNode(Yo,{modelValue:e.unref(s).fields.config.cluster_nodes,"onUpdate:modelValue":g[10]||(g[10]=d=>e.unref(s).fields.config.cluster_nodes=d),readonly:e.unref(s).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.cluster_max_redirections,"onUpdate:modelValue":g[11]||(g[11]=d=>e.unref(s).fields.config.cluster_max_redirections=d),"data-testid":"redis-cluster-max-redirections-input",label:e.unref(o)("form.fields.cluster_max_redirections.label"),"label-attributes":{info:e.unref(o)("form.fields.cluster_max_redirections.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(f.EntityFormSection),{"data-testid":"redis-connection-configuration-section",description:e.unref(o)("form.sections.connection.description"),title:e.unref(o)("form.sections.connection.title")},{default:e.withCtx(()=>[e.unref(u)===e.unref(C).HOST_PORT_CE||e.unref(u)===e.unref(C).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:0,modelValue:e.unref(s).fields.config.host,"onUpdate:modelValue":g[12]||(g[12]=d=>e.unref(s).fields.config.host=d),modelModifiers:{trim:!0},"data-testid":"redis-host-input",label:e.unref(o)("form.fields.host.label"),"label-attributes":{info:e.unref(o)("form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(u)===e.unref(C).HOST_PORT_CE||e.unref(u)===e.unref(C).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:1,modelValue:e.unref(s).fields.config.port,"onUpdate:modelValue":g[13]||(g[13]=d=>e.unref(s).fields.config.port=d),modelModifiers:{trim:!0},"data-testid":"redis-port-input",label:e.unref(o)("form.fields.port.label"),"label-attributes":{info:e.unref(o)("form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(u)===e.unref(C).HOST_PORT_EE?(e.openBlock(),e.createBlock(ue,{key:2,modelValue:e.unref(s).fields.config.connection_is_proxied,"onUpdate:modelValue":g[14]||(g[14]=d=>e.unref(s).fields.config.connection_is_proxied=d),"data-testid":"redis-connection-is-proxied-checkbox",disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.connection_is_proxied.label"),"label-attributes":{info:e.unref(o)("form.fields.connection_is_proxied.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","disabled","label","label-attributes"])):e.createCommentVNode("",!0),e.unref(u)===e.unref(C).HOST_PORT_CE?(e.openBlock(),e.createBlock(A,{key:3,modelValue:e.unref(s).fields.config.timeout,"onUpdate:modelValue":g[15]||(g[15]=d=>e.unref(s).fields.config.timeout=d),modelModifiers:{trim:!0},"data-testid":"redis-timeout-input",label:e.unref(o)("form.fields.timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.createVNode(A,{modelValue:e.unref(s).fields.config.database,"onUpdate:modelValue":g[16]||(g[16]=d=>e.unref(s).fields.config.database=d),modelModifiers:{trim:!0},"data-testid":"redis-database-input",label:e.unref(o)("form.fields.database.label"),"label-attributes":{info:e.unref(o)("form.fields.database.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.username,"onUpdate:modelValue":g[17]||(g[17]=d=>e.unref(s).fields.config.username=d),modelModifiers:{trim:!0},"data-testid":"redis-username-input",label:e.unref(o)("form.fields.username.label"),"label-attributes":{info:e.unref(o)("form.fields.username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(pe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:d=>e.unref(s).fields.config.username=d,value:e.unref(s).fields.config.username,onOpen:g[18]||(g[18]=(d,x)=>c(d,x))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.password,"onUpdate:modelValue":g[19]||(g[19]=d=>e.unref(s).fields.config.password=d),modelModifiers:{trim:!0},"data-testid":"redis-password-input",label:e.unref(o)("form.fields.password.label"),"label-attributes":{info:e.unref(o)("form.fields.password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(pe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:d=>e.unref(s).fields.config.password=d,value:e.unref(s).fields.config.password,onOpen:g[20]||(g[20]=(d,x)=>c(d,x))},null,8,["disabled","update","value"])]),_:1},8,["description","title"]),e.createVNode(e.unref(f.EntityFormSection),{"data-testid":"redis-tls-configuration-section",description:e.unref(o)("form.sections.tls.description"),title:e.unref(o)("form.sections.tls.title")},{default:e.withCtx(()=>[e.createVNode(ue,{modelValue:e.unref(s).fields.config.ssl,"onUpdate:modelValue":g[21]||(g[21]=d=>e.unref(s).fields.config.ssl=d),"data-testid":"redis-ssl-checkbox",description:e.unref(o)("form.fields.ssl.description"),disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.ssl.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(ue,{modelValue:e.unref(s).fields.config.ssl_verify,"onUpdate:modelValue":g[22]||(g[22]=d=>e.unref(s).fields.config.ssl_verify=d),"data-testid":"redis-ssl-verify-checkbox",description:e.unref(o)("form.fields.ssl_verify.description"),disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.ssl_verify.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl_verify.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.server_name,"onUpdate:modelValue":g[23]||(g[23]=d=>e.unref(s).fields.config.server_name=d),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.server_name.label"),"label-attributes":{info:e.unref(o)("form.fields.server_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"]),e.unref(u)!==e.unref(C).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(f.EntityFormSection),{key:3,"data-testid":"redis-keepalive-section",description:e.unref(o)("form.sections.keepalive.description"),title:e.unref(o)("form.sections.keepalive.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.keepalive_backlog,"onUpdate:modelValue":g[24]||(g[24]=d=>e.unref(s).fields.config.keepalive_backlog=d),"data-testid":"redis-keepalive-backlog-input",label:e.unref(o)("form.fields.keepalive_backlog.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_backlog.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.keepalive_pool_size,"onUpdate:modelValue":g[25]||(g[25]=d=>e.unref(s).fields.config.keepalive_pool_size=d),"data-testid":"redis-keepalive-pool-size-input",label:e.unref(o)("form.fields.keepalive_pool_size.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_pool_size.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(u)!==e.unref(C).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(f.EntityFormSection),{key:4,"data-testid":"redis-read-write-configuration-section",description:e.unref(o)("form.sections.read_write_configuration.description"),title:e.unref(o)("form.sections.read_write_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.read_timeout,"onUpdate:modelValue":g[26]||(g[26]=d=>e.unref(s).fields.config.read_timeout=d),"data-testid":"redis-read-timeout-input",label:e.unref(o)("form.fields.read_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.send_timeout,"onUpdate:modelValue":g[27]||(g[27]=d=>e.unref(s).fields.config.send_timeout=d),"data-testid":"redis-send-timeout-input",label:e.unref(o)("form.fields.send_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.send_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.connect_timeout,"onUpdate:modelValue":g[28]||(g[28]=d=>e.unref(s).fields.config.connect_timeout=d),"data-testid":"redis-connect-timeout-input",label:e.unref(o)("form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0)]),_:1},8,["action-teleport-target","can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","slidout-top-offset"])]),e.createVNode(e.unref(pe.VaultSecretPicker),{config:r.config,setup:_.value,onCancel:g[29]||(g[29]=()=>_.value=!1),onProceed:b},null,8,["config","setup"]),e.createVNode(k,{"action-button-text":e.unref(o)("form.edit_warning_modal.confirm"),"data-testid":"redis-update-warning-modal","hide-cancel-button":"","max-width":"640",title:e.unref(o)("form.edit_warning_modal.title"),visible:M.value,onCancel:g[30]||(g[30]=d=>M.value=!1),onProceed:v},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:F.value})),1)]),_:1})]),_:1},8,["action-button-text","title","visible"])],64)}}}),[["__scopeId","data-v-6f2877e0"]]),ui="#00abd2",pi="24px",mi={class:"linked-plugins","data-testid":"linked-plugins-inline"},Je=7,gi=q(e.defineComponent({__name:"LinkedPluginsInline",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},partialId:{type:String,required:!0}},setup(t){const n=t,r=Kt({config:n.config,partialId:n.partialId});return(i,o)=>{const a=e.resolveComponent("KBadge");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).slice(0,Je),m=>(e.openBlock(),e.createBlock(e.unref(et.PluginIcon),{key:m.id,name:m.name,size:24},null,8,["name"]))),128)),e.unref(r).length-Je>0?(e.openBlock(),e.createBlock(a,{key:0,appearance:"info"},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(e.unref(r).length-Je),1)]),_:1})):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-c39556bc"]]),_i={class:"plugin-item"},yi=q(e.defineComponent({__name:"PluginItem",props:{pluginName:{}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",_i,[e.createVNode(e.unref(et.PluginIcon),{name:n.pluginName,size:24},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(n.pluginName),1)]))}}),[["__scopeId","data-v-de964dc4"]]),bi={class:"toolbar-container"},qt=q(e.defineComponent({__name:"LinkedPluginList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},isExactMatch:{type:Boolean,default:!1},filterBarEnabled:{type:Boolean,default:!1},partialId:{type:String,required:!0}},emits:["view-plugin","load"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=Y.useI18n(),a=[{key:"name",label:o("linked_plugins_modal.headers.plugin")},{key:"instance_name",label:o("linked_plugins_modal.headers.instance_name")},{key:"actions",hideLabel:!0}],{fetcher:m}=we(r.config),_=e.ref(0),l=async y=>{const{data:E,count:h}=await m({partialId:r.partialId,size:y.pageSize,offset:y.offset,query:y.query});_.value=h;const s={total:h,data:E};return i("load",s),s},c=e.ref(""),b=e.computed(()=>r.config.app==="konnect"||r.isExactMatch?{isExactMatch:!0}:{isExactMatch:!1,fields:{name:{searchable:!0}},schema:{name:{type:"text"}}}),w=y=>{i("view-plugin",{id:y.id,plugin:y.name})};return(y,E)=>{const h=e.resolveComponent("KDropdownItem"),s=e.resolveComponent("KTableData");return e.openBlock(),e.createBlock(s,{"cache-identifier":e.unref(Ht)(t.partialId),fetcher:l,headers:a,"hide-pagination-when-optional":"","pagination-attributes":{totalCount:_.value,disablePageJump:!0},"search-input":c.value},e.createSlots({name:e.withCtx(({rowValue:S})=>[e.createVNode(yi,{"plugin-name":S},null,8,["plugin-name"])]),"action-items":e.withCtx(({row:S})=>[e.createVNode(h,{onClick:O=>w(S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("actions.view_plugin")),1)]),_:2},1032,["onClick"])]),_:2},[t.filterBarEnabled?{name:"toolbar",fn:e.withCtx(()=>[e.createElementVNode("div",bi,[e.createVNode(e.unref(f.EntityFilter),{modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=S=>c.value=S),config:b.value},null,8,["modelValue","config"])])]),key:"0"}:void 0]),1032,["cache-identifier","pagination-attributes","search-input"])}}}),[["__scopeId","data-v-50856d03"]]),hi={class:"linked-plugins-modal","data-testid":"linked-plugins-modal"},Ci=q(e.defineComponent({__name:"LinkedPluginListModal",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},redisConfigurationId:{type:String,required:!0},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","proceed","view-plugin"],setup(t,{emit:n}){const r=n,{i18n:{t:i}}=Y.useI18n(),o=e.ref(0),a=e.computed(()=>i("linked_plugins_modal.title",{count:o.value})),m=()=>{r("cancel")},_=()=>{r("proceed")};return(l,c)=>{const b=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(b,{"action-button-text":e.unref(i)("actions.done"),"hide-cancel-button":"",title:a.value,visible:t.visible,onCancel:m,onProceed:_},{default:e.withCtx(()=>[e.createVNode(qt,{config:t.config,"partial-id":t.redisConfigurationId,onLoad:c[0]||(c[0]=({total:w})=>o.value=w),onViewPlugin:c[1]||(c[1]=w=>r("view-plugin",w))},null,8,["config","partial-id"])]),_:1},8,["action-button-text","title","visible"])])}}}),[["__scopeId","data-v-6148b8bd"]]),zt=e.defineComponent({__name:"DeleteWarningModal",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(t,{emit:n}){const{i18n:{t:r}}=Y.useI18n(),i=n,o=()=>{i("close")};return(a,m)=>{const _=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(_,{"action-button-text":e.unref(r)("actions.close"),"data-testid":"remove-links-modal","hide-cancel-button":"","max-width":"640",title:e.unref(r)("delete.title"),visible:t.visible,onCancel:o,onProceed:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("delete.warning")),1)]),_:1},8,["action-button-text","title","visible"])}}}),Ti={class:"kong-ui-entities-partials-list"},wi={class:"empty-state-icon-gateway"},Ei=1e3,ki=q(e.defineComponent({__name:"RedisConfigurationList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["click:learn-more","click:plugin","copy:error","copy:success","delete:success","error"],setup(t,{emit:n}){var ue;const r=n,i=t,o=e.computed(()=>{var d,x;let k=`${i.config.apiBaseUrl}${Te.list[i.config.app]}`;return i.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((d=i.config)==null?void 0:d.controlPlaneId)||""):i.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(x=i.config)!=null&&x.workspace?`/${i.config.workspace}`:"")),k}),a=e.ref(!1),m=e.ref(""),_=e.ref(null),l=e.ref(void 0),c=e.ref(!1),b=e.ref(!1),w=e.ref(""),y=e.ref(!1),E=f.useDeleteUrlBuilder(i.config,o.value),h=e.ref(1),s=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),{fetcher:S,fetcherState:O}=f.useFetcher(i.config,o);async function p(k){const d=await S({...k,pageSize:Ei});return d.data=d.data.filter(x=>x.type===D.REDIS_CE||x.type===D.REDIS_EE),d}const{i18n:{t:u}}=Y.useI18n(),{axiosInstance:B}=f.useAxios((ue=i.config)==null?void 0:ue.axiosRequestConfig),N=Xe.useRouter(),L=e.ref(""),j=e.computed(()=>{const k=i.config.app==="konnect"||i.config.isExactMatch;if(k)return{isExactMatch:!0,placeholder:u("search.placeholder_for_exact_match")};const{name:d}=W;return{isExactMatch:k,fields:{name:d},schema:i.config.filterSchema}}),{fetcher:Q}=we(i.config),M=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${u("redis.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:u("redis.title")}),W={name:{label:u("list.table_headers.name"),searchable:!0,hidable:!1,sortable:!0},type:{label:u("list.table_headers.type")},tags:{label:u("list.table_headers.tags")},plugins:{label:u("list.table_headers.plugins")}},F=k=>({label:u("actions.view"),to:i.config.getViewRoute(k)}),X=k=>({label:u("actions.edit"),to:i.config.getEditRoute(k)}),v=async k=>{const{count:d}=await Q({partialId:k.id});d>0?y.value=!0:(l.value=k,c.value=!0)},ce=()=>{L.value=""},oe=async k=>{var x;await((x=i.canRetrieve)==null?void 0:x.call(i,k))&&N.push(i.config.getViewRoute(k.id))},fe=()=>{c.value=!1},Z=k=>{m.value=k,a.value=!0},P=async()=>{var k,d,x;if((k=l.value)!=null&&k.id){b.value=!0;try{await B.delete(E(l.value.id)),b.value=!1,c.value=!1,g(),r("delete:success",l.value)}catch(U){w.value=((x=(d=U.response)==null?void 0:d.data)==null?void 0:x.message)||U.message||u("errors.delete"),r("error",U)}finally{b.value=!1}}},g=()=>{h.value++},Ye=k=>{switch(Re(k)){case C.HOST_PORT_CE:return`${u("form.options.type.host_port")}${u("form.options.type.suffix_open_source")}`;case C.HOST_PORT_EE:return`${u("form.options.type.host_port")}${u("form.options.type.suffix_enterprise")}`;case C.SENTINEL:return`${u("form.options.type.sentinel")}${u("form.options.type.suffix_enterprise")}`;case C.CLUSTER:return`${u("form.options.type.cluster")}${u("form.options.type.suffix_enterprise")}`}},$e=()=>{N.push(i.config.createRoute)},A=async(k,d)=>{const x=k.id;if(!await d(x)){r("copy:error",{entity:k,field:"id",message:u("errors.copy")});return}r("copy:success",{entity:k,field:"id",message:u("copy.success",{val:x})})};return e.watch(O,k=>{var d,x,U;if(k.status===f.FetcherStatus.Error){_.value={title:u("errors.general")},(U=(x=(d=k.error)==null?void 0:d.response)==null?void 0:x.data)!=null&&U.message&&(_.value.message=k.error.response.data.message),r("error",k.error);return}_.value=null}),e.watch(i.canCreate,async k=>{await k?M.value.ctaText=u("actions.create"):M.value.ctaText=void 0},{immediate:!0}),(k,d)=>{const x=e.resolveComponent("KButton"),U=e.resolveComponent("KDropdownItem"),Ii=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ti,[e.createVNode(e.unref(f.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":s.value,"empty-state-options":M.value,"enable-entity-actions":"","error-message":_.value,fetcher:p,"fetcher-cache-key":h.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-redis-configuration-list",query:L.value,"table-headers":W,onClearSearchInput:ce,"onClick:row":d[2]||(d[2]=R=>oe(R)),onSort:g},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(f.EntityFilter),{modelValue:L.value,"onUpdate:modelValue":d[0]||(d[0]=R=>L.value=R),config:j.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":t.canCreate},{default:e.withCtx(()=>[e.createVNode(x,{appearance:"primary","data-testid":"toolbar-add-redis-configuration",size:"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("actions.create")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:R})=>[e.createElementVNode("b",null,e.toDisplayString(R??"-"),1)]),type:e.withCtx(({row:R})=>[e.createTextVNode(e.toDisplayString(Ye(R)),1)]),tags:e.withCtx(({rowValue:R})=>[e.createVNode(e.unref(f.TableTags),{tags:R},null,8,["tags"])]),plugins:e.withCtx(({row:R})=>[e.createVNode(gi,{config:t.config,"partial-id":R.id,onClick:e.withModifiers(Qe=>Z(R.id),["stop"])},null,8,["config","partial-id","onClick"])]),actions:e.withCtx(({row:R})=>[e.createVNode(Ii,null,{default:e.withCtx(({copyToClipboard:Qe})=>[e.createVNode(U,{"data-testid":"action-entity-copy-id",onClick:Wi=>A(R,Qe)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(R)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-view","has-divider":"",item:F(R.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canEdit(R)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-edit",item:X(R.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canDelete(R)},{default:e.withCtx(()=>[e.createVNode(U,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Qe=>v(R)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[t.enableV2EmptyStates?{name:"empty-state",fn:e.withCtx(()=>[e.createVNode(e.unref(f.EntityEmptyState),{"action-button-text":e.unref(u)("list.action"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"redis-entity-empty-state",description:e.unref(u)("list.empty_state.description"),features:[{title:e.unref(u)("list.empty_state.feature_1.title"),description:e.unref(u)("list.empty_state.feature_1.description")},{title:e.unref(u)("list.empty_state.feature_2.title"),description:e.unref(u)("list.empty_state.feature_2.description")}],title:e.unref(u)("redis.title"),"onClick:create":$e,"onClick:learnMore":d[1]||(d[1]=()=>r("click:learn-more"))},{image:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(e.unref(ee.DeployIcon),{color:e.unref(ui),size:e.unref(pi)},null,8,["color","size"])])]),"feature-0-icon":e.withCtx(()=>[e.createVNode(e.unref(ee.ClipboardIcon))]),"feature-1-icon":e.withCtx(()=>[e.createVNode(e.unref(ee.RefreshIcon))]),_:1},8,["action-button-text","can-create","description","features","title"])]),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher-cache-key","query"]),e.createVNode(zt,{visible:y.value,onClose:d[3]||(d[3]=R=>y.value=!1)},null,8,["visible"]),e.createVNode(e.unref(f.EntityDeleteModal),{"action-pending":b.value,description:e.unref(u)("delete.description"),"entity-name":l.value&&(l.value.name||l.value.id),"entity-type":e.unref(f.EntityTypes).RedisConfiguration,error:w.value,"need-confirmation":!0,title:e.unref(u)("delete.title"),visible:c.value,onCancel:fe,onProceed:P},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),e.createVNode(Ci,{config:t.config,"redis-configuration-id":m.value,visible:a.value,onCancel:d[4]||(d[4]=R=>a.value=!1),onProceed:d[5]||(d[5]=R=>a.value=!1),onViewPlugin:d[6]||(d[6]=R=>r("click:plugin",R))},null,8,["config","redis-configuration-id","visible"])])}}}),[["__scopeId","data-v-0cc55bd3"]]),Si={class:"kong-ui-consumer-group-entity-config-card"},Vi=e.defineComponent({__name:"RedisConfigurationConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!0}},emits:["loading","fetch:error","fetch:success"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=Y.useI18n(),a=e.computed(()=>Te.form[r.config.app].edit),m=e.ref(le),_=h=>{m.value=Re(h),i("fetch:success",h)},l=e.computed(()=>{const h=m.value===C.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");let s="";switch(m.value){case C.HOST_PORT_CE:s=o("form.options.type.host_port");break;case C.HOST_PORT_EE:s=o("form.options.type.host_port");break;case C.CLUSTER:s=o("form.options.type.cluster");break;case C.SENTINEL:s=o("form.options.type.sentinel");break}return`${s}${h}`}),c=h=>({id:h.id,name:h.name,tags:h.tags,created_at:h.created_at,updated_at:h.updated_at,type:h.type,...h.config}),b=h=>{const{id:s,name:S,created_at:O,updated_at:p,type:u,tags:B,...N}=h;return{id:s,name:S,tags:B,created_at:O,updated_at:p,type:u,config:N}},w={id:{},name:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.name.label")},tags:{type:f.ConfigurationSchemaType.BadgeTag,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.tags.label"),tooltip:o("form.fields.tags.tooltip")},updated_at:{},created_at:{},type:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.type.label")},cluster_max_redirections:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.cluster_max_redirections.tooltip"),label:o("form.fields.cluster_max_redirections.label")},cluster_nodes:{type:f.ConfigurationSchemaType.JsonArray,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.cluster_nodes.title"),tooltip:o("form.fields.cluster_nodes.tooltip")},connect_timeout:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.connect_timeout.label"),tooltip:o("form.fields.connect_timeout.tooltip")},connection_is_proxied:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.connection_is_proxied.label"),tooltip:o("form.fields.connection_is_proxied.tooltip")},database:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.database.label"),tooltip:o("form.fields.database.tooltip")},host:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.host.label"),tooltip:o("form.fields.host.tooltip")},keepalive_backlog:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_backlog.label"),tooltip:o("form.fields.keepalive_backlog.tooltip")},keepalive_pool_size:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_pool_size.label"),tooltip:o("form.fields.keepalive_pool_size.tooltip")},password:{type:f.ConfigurationSchemaType.Redacted,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.password.label"),tooltip:o("form.fields.password.tooltip")},port:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.port.label"),tooltip:o("form.fields.port.tooltip")},read_timeout:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.read_timeout.label"),tooltip:o("form.fields.read_timeout.tooltip")},send_timeout:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.send_timeout.label"),tooltip:o("form.fields.send_timeout.tooltip")},sentinel_master:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_master.label"),tooltip:o("form.fields.sentinel_master.tooltip")},sentinel_nodes:{type:f.ConfigurationSchemaType.JsonArray,section:f.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.sentinel_nodes.tooltip")},sentinel_password:{type:f.ConfigurationSchemaType.Redacted,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_password.label"),tooltip:o("form.fields.sentinel_password.tooltip")},sentinel_role:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_role.label"),tooltip:o("form.fields.sentinel_role.tooltip")},sentinel_username:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_username.label"),tooltip:o("form.fields.sentinel_username.tooltip")},server_name:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.server_name.label"),tooltip:o("form.fields.server_name.tooltip")},ssl_verify:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl_verify.label"),tooltip:o("form.fields.ssl_verify.tooltip")},ssl:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl.label"),tooltip:o("form.fields.ssl.tooltip")},timeout:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.timeout.label"),tooltip:o("form.fields.timeout.tooltip")},username:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.username.label"),tooltip:o("form.fields.username.tooltip")}},y=h=>{const s={},S=Object.keys(w);for(const O of S)h.includes(O)?s[O]={...w[O],order:h.indexOf(O)+1}:s[O]={...w[O],hidden:!0};return s},E=e.computed(()=>{const h=["id","name","tags","type","updated_at","created_at"];switch(m.value){case C.HOST_PORT_CE:return y([...h,"host","port","timeout","database","username","password","ssl","ssl_verify","server_name"]);case C.HOST_PORT_EE:return y([...h,"host","port","connection_is_proxied","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case C.CLUSTER:return y([...h,"cluster_nodes","cluster_max_redirections","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case C.SENTINEL:return y([...h,"sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);default:throw new Error("Invalid Redis type")}});return(h,s)=>(e.openBlock(),e.createElementBlock("div",Si,[e.createVNode(e.unref(f.EntityBaseConfigCard),{"code-block-record-formatter":b,config:t.config,"config-card-doc":t.configCardDoc,"config-schema":E.value,"entity-type":e.unref(f.SupportedEntityType).RedisConfiguration,"fetch-url":a.value,"hide-title":t.hideTitle,"record-resolver":c,"onFetch:error":s[0]||(s[0]=S=>h.$emit("fetch:error",S)),"onFetch:success":_,onLoading:s[1]||(s[1]=S=>h.$emit("loading",S))},{type:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(l.value),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),xi={useLinkedPlugins:Kt,useLinkedPluginsFetcher:we};V.DeleteWarningModal=zt,V.LinkedPlugins=qt,V.PartialType=D,V.RedisConfigurationConfigCard=Vi,V.RedisConfigurationForm=fi,V.RedisConfigurationList=ki,V.RedisType=C,V.composables=xi,V.constants=Fo,V.helpers=Ho,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared/dist/style.css"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/entities-vaults"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins-icon")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared/dist/style.css","@kong-ui-public/entities-vaults/dist/style.css","@kong-ui-public/entities-shared","@kong-ui-public/entities-vaults","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-plugins-icon"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V["kong-ui-public-entities-redis-configurations"]={},V.Vue,null,null,V["kong-ui-public-entities-shared"],V["kong-ui-public-entities-vaults"],V.VueRouter,V.KongIcons,V["kong-ui-public-i18n"],V["kong-ui-public-entities-plugins-icon"]))})(this,function(V,e,Ri,Oi,f,pe,Xe,ee,Ze,et){"use strict";var C=(t=>(t[t.HOST_PORT_CE=0]="HOST_PORT_CE",t[t.HOST_PORT_EE=1]="HOST_PORT_EE",t[t.SENTINEL=2]="SENTINEL",t[t.CLUSTER=3]="CLUSTER",t))(C||{}),D=(t=>(t.REDIS_CE="redis-ce",t.REDIS_EE="redis-ee",t))(D||{}),tt=typeof global=="object"&&global&&global.Object===Object&&global,Wt=typeof self=="object"&&self&&self.Object===Object&&self,H=tt||Wt||Function("return this")(),ie=H.Symbol,nt=Object.prototype,Gt=nt.hasOwnProperty,Jt=nt.toString,me=ie?ie.toStringTag:void 0;function Yt(t){var n=Gt.call(t,me),r=t[me];try{t[me]=void 0;var i=!0}catch{}var o=Jt.call(t);return i&&(n?t[me]=r:delete t[me]),o}var Qt=Object.prototype,Xt=Qt.toString;function Zt(t){return Xt.call(t)}var en="[object Null]",tn="[object Undefined]",rt=ie?ie.toStringTag:void 0;function ge(t){return t==null?t===void 0?tn:en:rt&&rt in Object(t)?Yt(t):Zt(t)}function _e(t){return t!=null&&typeof t=="object"}var Ee=Array.isArray;function ot(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var nn="[object AsyncFunction]",rn="[object Function]",on="[object GeneratorFunction]",an="[object Proxy]";function it(t){if(!ot(t))return!1;var n=ge(t);return n==rn||n==on||n==nn||n==an}var Be=H["__core-js_shared__"],at=function(){var t=/[^.]+$/.exec(Be&&Be.keys&&Be.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ln(t){return!!at&&at in t}var sn=Function.prototype,dn=sn.toString;function te(t){if(t!=null){try{return dn.call(t)}catch{}try{return t+""}catch{}}return""}var cn=/[\\^$.*+?()[\]{}|]/g,fn=/^\[object .+?Constructor\]$/,un=Function.prototype,pn=Object.prototype,mn=un.toString,gn=pn.hasOwnProperty,_n=RegExp("^"+mn.call(gn).replace(cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yn(t){if(!ot(t)||ln(t))return!1;var n=it(t)?_n:fn;return n.test(te(t))}function bn(t,n){return t==null?void 0:t[n]}function ae(t,n){var r=bn(t,n);return yn(r)?r:void 0}var De=ae(H,"WeakMap"),hn=9007199254740991,Cn=/^(?:0|[1-9]\d*)$/;function Tn(t,n){var r=typeof t;return n=n??hn,!!n&&(r=="number"||r!="symbol"&&Cn.test(t))&&t>-1&&t%1==0&&t<n}function lt(t,n){return t===n||t!==t&&n!==n}var wn=9007199254740991;function st(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=wn}function En(t){return t!=null&&st(t.length)&&!it(t)}var kn=Object.prototype;function Sn(t){var n=t&&t.constructor,r=typeof n=="function"&&n.prototype||kn;return t===r}function Vn(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}var xn="[object Arguments]";function dt(t){return _e(t)&&ge(t)==xn}var ct=Object.prototype,In=ct.hasOwnProperty,Rn=ct.propertyIsEnumerable,On=dt(function(){return arguments}())?dt:function(t){return _e(t)&&In.call(t,"callee")&&!Rn.call(t,"callee")};function Nn(){return!1}var ft=typeof V=="object"&&V&&!V.nodeType&&V,ut=ft&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=ut&&ut.exports===ft,pt=Pn?H.Buffer:void 0,An=pt?pt.isBuffer:void 0,Le=An||Nn,$n="[object Arguments]",Bn="[object Array]",Dn="[object Boolean]",Ln="[object Date]",Mn="[object Error]",vn="[object Function]",Un="[object Map]",jn="[object Number]",Fn="[object Object]",Hn="[object RegExp]",Kn="[object Set]",qn="[object String]",zn="[object WeakMap]",Wn="[object ArrayBuffer]",Gn="[object DataView]",Jn="[object Float32Array]",Yn="[object Float64Array]",Qn="[object Int8Array]",Xn="[object Int16Array]",Zn="[object Int32Array]",er="[object Uint8Array]",tr="[object Uint8ClampedArray]",nr="[object Uint16Array]",rr="[object Uint32Array]",I={};I[Jn]=I[Yn]=I[Qn]=I[Xn]=I[Zn]=I[er]=I[tr]=I[nr]=I[rr]=!0,I[$n]=I[Bn]=I[Wn]=I[Dn]=I[Gn]=I[Ln]=I[Mn]=I[vn]=I[Un]=I[jn]=I[Fn]=I[Hn]=I[Kn]=I[qn]=I[zn]=!1;function or(t){return _e(t)&&st(t.length)&&!!I[ge(t)]}function ir(t){return function(n){return t(n)}}var mt=typeof V=="object"&&V&&!V.nodeType&&V,ye=mt&&typeof module=="object"&&module&&!module.nodeType&&module,ar=ye&&ye.exports===mt,Me=ar&&tt.process,gt=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||Me&&Me.binding&&Me.binding("util")}catch{}}(),_t=gt&>.isTypedArray,yt=_t?ir(_t):or,lr=Object.prototype,sr=lr.hasOwnProperty;function dr(t,n){var r=Ee(t),i=!r&&On(t),o=!r&&!i&&Le(t),a=!r&&!i&&!o&&yt(t),m=r||i||o||a,_=m?Vn(t.length,String):[],l=_.length;for(var c in t)sr.call(t,c)&&!(m&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Tn(c,l)))&&_.push(c);return _}function cr(t,n){return function(r){return t(n(r))}}var fr=cr(Object.keys,Object),ur=Object.prototype,pr=ur.hasOwnProperty;function mr(t){if(!Sn(t))return fr(t);var n=[];for(var r in Object(t))pr.call(t,r)&&r!="constructor"&&n.push(r);return n}function gr(t){return En(t)?dr(t):mr(t)}var be=ae(Object,"create");function _r(){this.__data__=be?be(null):{},this.size=0}function yr(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var br="__lodash_hash_undefined__",hr=Object.prototype,Cr=hr.hasOwnProperty;function Tr(t){var n=this.__data__;if(be){var r=n[t];return r===br?void 0:r}return Cr.call(n,t)?n[t]:void 0}var wr=Object.prototype,Er=wr.hasOwnProperty;function kr(t){var n=this.__data__;return be?n[t]!==void 0:Er.call(n,t)}var Sr="__lodash_hash_undefined__";function Vr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=be&&n===void 0?Sr:n,this}function ne(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}ne.prototype.clear=_r,ne.prototype.delete=yr,ne.prototype.get=Tr,ne.prototype.has=kr,ne.prototype.set=Vr;function xr(){this.__data__=[],this.size=0}function ke(t,n){for(var r=t.length;r--;)if(lt(t[r][0],n))return r;return-1}var Ir=Array.prototype,Rr=Ir.splice;function Or(t){var n=this.__data__,r=ke(n,t);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Rr.call(n,r,1),--this.size,!0}function Nr(t){var n=this.__data__,r=ke(n,t);return r<0?void 0:n[r][1]}function Pr(t){return ke(this.__data__,t)>-1}function Ar(t,n){var r=this.__data__,i=ke(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}function K(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}K.prototype.clear=xr,K.prototype.delete=Or,K.prototype.get=Nr,K.prototype.has=Pr,K.prototype.set=Ar;var he=ae(H,"Map");function $r(){this.size=0,this.__data__={hash:new ne,map:new(he||K),string:new ne}}function Br(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function Se(t,n){var r=t.__data__;return Br(n)?r[typeof n=="string"?"string":"hash"]:r.map}function Dr(t){var n=Se(this,t).delete(t);return this.size-=n?1:0,n}function Lr(t){return Se(this,t).get(t)}function Mr(t){return Se(this,t).has(t)}function vr(t,n){var r=Se(this,t),i=r.size;return r.set(t,n),this.size+=r.size==i?0:1,this}function re(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}re.prototype.clear=$r,re.prototype.delete=Dr,re.prototype.get=Lr,re.prototype.has=Mr,re.prototype.set=vr;function Ur(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}function jr(){this.__data__=new K,this.size=0}function Fr(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}function Hr(t){return this.__data__.get(t)}function Kr(t){return this.__data__.has(t)}var qr=200;function zr(t,n){var r=this.__data__;if(r instanceof K){var i=r.__data__;if(!he||i.length<qr-1)return i.push([t,n]),this.size=++r.size,this;r=this.__data__=new re(i)}return r.set(t,n),this.size=r.size,this}function G(t){var n=this.__data__=new K(t);this.size=n.size}G.prototype.clear=jr,G.prototype.delete=Fr,G.prototype.get=Hr,G.prototype.has=Kr,G.prototype.set=zr;function Wr(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var m=t[r];n(m,r,t)&&(a[o++]=m)}return a}function Gr(){return[]}var Jr=Object.prototype,Yr=Jr.propertyIsEnumerable,bt=Object.getOwnPropertySymbols,Qr=bt?function(t){return t==null?[]:(t=Object(t),Wr(bt(t),function(n){return Yr.call(t,n)}))}:Gr;function Xr(t,n,r){var i=n(t);return Ee(t)?i:Ur(i,r(t))}function ht(t){return Xr(t,gr,Qr)}var ve=ae(H,"DataView"),Ue=ae(H,"Promise"),je=ae(H,"Set"),Ct="[object Map]",Zr="[object Object]",Tt="[object Promise]",wt="[object Set]",Et="[object WeakMap]",kt="[object DataView]",eo=te(ve),to=te(he),no=te(Ue),ro=te(je),oo=te(De),J=ge;(ve&&J(new ve(new ArrayBuffer(1)))!=kt||he&&J(new he)!=Ct||Ue&&J(Ue.resolve())!=Tt||je&&J(new je)!=wt||De&&J(new De)!=Et)&&(J=function(t){var n=ge(t),r=n==Zr?t.constructor:void 0,i=r?te(r):"";if(i)switch(i){case eo:return kt;case to:return Ct;case no:return Tt;case ro:return wt;case oo:return Et}return n});var St=H.Uint8Array,io="__lodash_hash_undefined__";function ao(t){return this.__data__.set(t,io),this}function lo(t){return this.__data__.has(t)}function Ve(t){var n=-1,r=t==null?0:t.length;for(this.__data__=new re;++n<r;)this.add(t[n])}Ve.prototype.add=Ve.prototype.push=ao,Ve.prototype.has=lo;function so(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}function co(t,n){return t.has(n)}var fo=1,uo=2;function Vt(t,n,r,i,o,a){var m=r&fo,_=t.length,l=n.length;if(_!=l&&!(m&&l>_))return!1;var c=a.get(t),b=a.get(n);if(c&&b)return c==n&&b==t;var w=-1,y=!0,E=r&uo?new Ve:void 0;for(a.set(t,n),a.set(n,t);++w<_;){var h=t[w],s=n[w];if(i)var S=m?i(s,h,w,n,t,a):i(h,s,w,t,n,a);if(S!==void 0){if(S)continue;y=!1;break}if(E){if(!so(n,function(O,p){if(!co(E,p)&&(h===O||o(h,O,r,i,a)))return E.push(p)})){y=!1;break}}else if(!(h===s||o(h,s,r,i,a))){y=!1;break}}return a.delete(t),a.delete(n),y}function po(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}function mo(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}var go=1,_o=2,yo="[object Boolean]",bo="[object Date]",ho="[object Error]",Co="[object Map]",To="[object Number]",wo="[object RegExp]",Eo="[object Set]",ko="[object String]",So="[object Symbol]",Vo="[object ArrayBuffer]",xo="[object DataView]",xt=ie?ie.prototype:void 0,Fe=xt?xt.valueOf:void 0;function Io(t,n,r,i,o,a,m){switch(r){case xo:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case Vo:return!(t.byteLength!=n.byteLength||!a(new St(t),new St(n)));case yo:case bo:case To:return lt(+t,+n);case ho:return t.name==n.name&&t.message==n.message;case wo:case ko:return t==n+"";case Co:var _=po;case Eo:var l=i&go;if(_||(_=mo),t.size!=n.size&&!l)return!1;var c=m.get(t);if(c)return c==n;i|=_o,m.set(t,n);var b=Vt(_(t),_(n),i,o,a,m);return m.delete(t),b;case So:if(Fe)return Fe.call(t)==Fe.call(n)}return!1}var Ro=1,Oo=Object.prototype,No=Oo.hasOwnProperty;function Po(t,n,r,i,o,a){var m=r&Ro,_=ht(t),l=_.length,c=ht(n),b=c.length;if(l!=b&&!m)return!1;for(var w=l;w--;){var y=_[w];if(!(m?y in n:No.call(n,y)))return!1}var E=a.get(t),h=a.get(n);if(E&&h)return E==n&&h==t;var s=!0;a.set(t,n),a.set(n,t);for(var S=m;++w<l;){y=_[w];var O=t[y],p=n[y];if(i)var u=m?i(p,O,y,n,t,a):i(O,p,y,t,n,a);if(!(u===void 0?O===p||o(O,p,r,i,a):u)){s=!1;break}S||(S=y=="constructor")}if(s&&!S){var B=t.constructor,N=n.constructor;B!=N&&"constructor"in t&&"constructor"in n&&!(typeof B=="function"&&B instanceof B&&typeof N=="function"&&N instanceof N)&&(s=!1)}return a.delete(t),a.delete(n),s}var Ao=1,It="[object Arguments]",Rt="[object Array]",xe="[object Object]",$o=Object.prototype,Ot=$o.hasOwnProperty;function Bo(t,n,r,i,o,a){var m=Ee(t),_=Ee(n),l=m?Rt:J(t),c=_?Rt:J(n);l=l==It?xe:l,c=c==It?xe:c;var b=l==xe,w=c==xe,y=l==c;if(y&&Le(t)){if(!Le(n))return!1;m=!0,b=!1}if(y&&!b)return a||(a=new G),m||yt(t)?Vt(t,n,r,i,o,a):Io(t,n,l,r,i,o,a);if(!(r&Ao)){var E=b&&Ot.call(t,"__wrapped__"),h=w&&Ot.call(n,"__wrapped__");if(E||h){var s=E?t.value():t,S=h?n.value():n;return a||(a=new G),o(s,S,r,i,a)}}return y?(a||(a=new G),Po(t,n,r,i,o,a)):!1}function Nt(t,n,r,i,o){return t===n?!0:t==null||n==null||!_e(t)&&!_e(n)?t!==t&&n!==n:Bo(t,n,r,i,Nt,o)}function Do(t,n){return Nt(t,n)}for(var $=[],He=0;He<256;++He)$.push((He+256).toString(16).slice(1));function Lo(t,n=0){return($[t[n+0]]+$[t[n+1]]+$[t[n+2]]+$[t[n+3]]+"-"+$[t[n+4]]+$[t[n+5]]+"-"+$[t[n+6]]+$[t[n+7]]+"-"+$[t[n+8]]+$[t[n+9]]+"-"+$[t[n+10]]+$[t[n+11]]+$[t[n+12]]+$[t[n+13]]+$[t[n+14]]+$[t[n+15]]).toLowerCase()}var Ie,Mo=new Uint8Array(16);function vo(){if(!Ie&&(Ie=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ie))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ie(Mo)}var Uo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Pt={randomUUID:Uo};function jo(t,n,r){if(Pt.randomUUID&&!t)return Pt.randomUUID();t=t||{};var i=t.random||(t.rng||vo)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Lo(i)}const At={ip:"127.0.0.1",port:6379},$t={host:"127.0.0.1",port:6379},le=C.HOST_PORT_EE,Bt={port:6379,host:"127.0.0.1",database:0,username:"",password:"",ssl:!1,ssl_verify:!1,server_name:"",connect_timeout:2e3,send_timeout:2e3,read_timeout:2e3,sentinel_username:"",sentinel_password:"",keepalive_pool_size:256,keepalive_backlog:0,sentinel_master:"",sentinel_nodes:[],cluster_nodes:[],cluster_max_redirections:0,connection_is_proxied:!1,timeout:2e3},Fo=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_CLUSTER_NODE:At,DEFAULT_FIELDS:Bt,DEFAULT_REDIS_TYPE:le,DEFAULT_SENTINEL_NODE:$t},Symbol.toStringTag,{value:"Module"})),Ce=t=>({...t,id:jo()}),Ke=t=>{const{id:n,...r}=t;return r},Dt=()=>Ce($t),Lt=()=>Ce(At),Re=t=>{var n,r;return t.type===D.REDIS_CE?C.HOST_PORT_CE:(n=t.config.sentinel_nodes)!=null&&n.length?C.SENTINEL:(r=t.config.cluster_nodes)!=null&&r.length?C.CLUSTER:C.HOST_PORT_EE},Oe=t=>t===C.HOST_PORT_CE?D.REDIS_CE:D.REDIS_EE,T={int(t,n){return t==null?n:parseInt(t.toString(),10)},str(t,n){return t==null||t===""?n:t.toString()},removeIdClusterNodes(t){return t.map(n=>({...Ke(n),port:T.int(n.port)}))},removeIdFromSentinelNodes(t){return t.map(n=>({...Ke(n),port:T.int(n.port)}))},addIdToClusterNodes(t){return t.map(Ce)},addIdToSentinelNodes(t){return t.map(Ce)},removeNullValues(t){const n={...t};for(const r in n)n[r]===null&&delete n[r];return n},stringToArray(t,n=","){return t?t.split(n).map(r=>String(r||"").trim()).filter(r=>r!==""):[]},arrayToString(t,n=", "){return t?t.join(n):""}},Ho=Object.freeze(Object.defineProperty({__proto__:null,genDefaultClusterNode:Lt,genDefaultSentinelNode:Dt,getRedisType:Re,mapRedisTypeToPartialType:Oe,shallowCopyWithId:Ce,shallowCopyWithoutId:Ke,standardize:T},Symbol.toStringTag,{value:"Module"})),Ne="/v2/control-planes/{controlPlaneId}/core-entities",Pe="/{workspace}",Te={list:{konnect:`${Ne}/partials`,kongManager:`${Pe}/partials`},form:{konnect:{create:`${Ne}/partials`,edit:`${Ne}/partials/{id}`},kongManager:{create:`${Pe}/partials`,edit:`${Pe}/partials/{id}`}},links:{konnect:`${Ne}/partials/{id}/links`,kongManager:`${Pe}/partials/{id}/links`}},Ko=t=>{const{partialId:n,config:r,defaultRedisType:i=le}=t,o=!!n,{axiosInstance:a}=f.useAxios(r.axiosRequestConfig),{getMessageFromError:m}=f.useErrors(),_=e.computed(()=>n?f.EntityBaseFormType.Edit:f.EntityBaseFormType.Create),l=e.reactive({fields:{name:"",tags:"",type:Oe(i),config:JSON.parse(JSON.stringify(Bt))},readonly:!1,errorMessage:""}),c=e.ref(),b=e.ref(i),w=e.computed(()=>b.value===C.HOST_PORT_EE||b.value===C.CLUSTER||b.value===C.SENTINEL);e.watch(b,p=>{l.fields.type=Oe(p)});const y=e.computed(()=>{var u;if(o&&Do(c.value,E.value)||!l.fields.name.length)return!1;const{config:p}=l.fields;switch(b.value){case C.HOST_PORT_CE:case C.HOST_PORT_EE:return!!p.host&&p.host.length>0&&!!p.port&&p.port>0;case C.CLUSTER:return!!p.cluster_nodes.length&&p.cluster_nodes.every(B=>B.ip.length>0);case C.SENTINEL:return!!p.sentinel_nodes.length&&p.sentinel_nodes.every(B=>B.host.length>0)&&!!((u=p.sentinel_master)!=null&&u.length)&&p.sentinel_role&&!!p.sentinel_role.length;default:throw new Error("Invalid redis type")}}),E=e.computed(()=>{switch(b.value){case C.HOST_PORT_CE:return{name:l.fields.name,type:l.fields.type,tags:T.stringToArray(l.fields.tags),config:{host:l.fields.config.host,port:T.int(l.fields.config.port),timeout:T.int(l.fields.config.timeout),username:T.str(l.fields.config.username,null),database:T.int(l.fields.config.database),password:T.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:T.str(l.fields.config.server_name,null)}};case C.HOST_PORT_EE:return{name:l.fields.name,type:l.fields.type,tags:T.stringToArray(l.fields.tags),config:{connect_timeout:T.int(l.fields.config.connect_timeout),connection_is_proxied:l.fields.config.connection_is_proxied,database:T.int(l.fields.config.database),host:l.fields.config.host,keepalive_backlog:T.int(l.fields.config.keepalive_backlog),keepalive_pool_size:T.int(l.fields.config.keepalive_pool_size),password:T.str(l.fields.config.password,null),port:T.int(l.fields.config.port),read_timeout:T.int(l.fields.config.read_timeout),send_timeout:T.int(l.fields.config.send_timeout),server_name:T.str(l.fields.config.server_name,null),ssl_verify:l.fields.config.ssl_verify,ssl:l.fields.config.ssl,username:T.str(l.fields.config.username,null),cluster_nodes:null,cluster_max_redirections:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null}};case C.CLUSTER:return{name:l.fields.name,type:l.fields.type,tags:T.stringToArray(l.fields.tags),config:{cluster_nodes:T.removeIdClusterNodes(l.fields.config.cluster_nodes),cluster_max_redirections:T.int(l.fields.config.cluster_max_redirections),username:T.str(l.fields.config.username,null),password:T.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:T.str(l.fields.config.server_name,null),connect_timeout:T.int(l.fields.config.connect_timeout),database:T.int(l.fields.config.database),send_timeout:T.int(l.fields.config.send_timeout),read_timeout:T.int(l.fields.config.read_timeout),keepalive_pool_size:T.int(l.fields.config.keepalive_pool_size),keepalive_backlog:T.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null,host:null,port:null}};case C.SENTINEL:return{name:l.fields.name,type:l.fields.type,tags:T.stringToArray(l.fields.tags),config:{sentinel_master:T.str(l.fields.config.sentinel_master,null),sentinel_nodes:T.removeIdFromSentinelNodes(l.fields.config.sentinel_nodes),sentinel_role:T.str(l.fields.config.sentinel_role,null),sentinel_username:T.str(l.fields.config.sentinel_username,null),sentinel_password:T.str(l.fields.config.sentinel_password,null),username:T.str(l.fields.config.username,null),password:T.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:T.str(l.fields.config.server_name,null),database:T.int(l.fields.config.database),connect_timeout:T.int(l.fields.config.connect_timeout),send_timeout:T.int(l.fields.config.send_timeout),read_timeout:T.int(l.fields.config.read_timeout),keepalive_pool_size:T.int(l.fields.config.keepalive_pool_size),keepalive_backlog:T.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,cluster_nodes:null,cluster_max_redirections:null,host:null,port:null}};default:throw new Error("Invalid redis type")}}),h=e.computed(()=>{let p=`${r.apiBaseUrl}${Te.form[r.app][_.value]}`;return r.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,(r==null?void 0:r.controlPlaneId)||""):r.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,r!=null&&r.workspace?`/${r.workspace}`:"")),p=p.replace(/{id}/gi,n||""),p}),s=e.computed(()=>{var p;return(p=Te.form[r==null?void 0:r.app])==null?void 0:p.edit});return{form:l,canSubmit:y,payload:E,isEdit:o,redisType:b,redisTypeIsEnterprise:w,formType:_,fetchUrl:s,submit:async()=>{try{l.readonly=!0,l.errorMessage="";let p=E.value;return r.app==="konnect"&&(p={...p,config:T.removeNullValues(p.config)}),_.value===f.EntityBaseFormType.Create?await a.post(h.value,p):r.app==="konnect"?await a.put(h.value,p):await a.patch(h.value,p)}catch(p){throw l.errorMessage=m(p),l.readonly=!1,p}},setInitialFormValues:p=>{l.fields.config=Object.assign({},l.fields.config,T.removeNullValues(p.config)),l.fields.config.sentinel_nodes=T.addIdToSentinelNodes(p.config.sentinel_nodes??[]),l.fields.config.cluster_nodes=T.addIdToClusterNodes(p.config.cluster_nodes??[]),l.fields.name=p.name,l.fields.type=p.type,l.fields.tags=T.arrayToString(p.tags),b.value=Re(p),c.value=JSON.parse(JSON.stringify(E.value))}}},qo={class:"array-card-container"},zo=e.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0},disabled:{type:Boolean,default:!1}},emits:["remove-item"],setup(t){return(n,r)=>{const i=e.resolveComponent("KCard"),o=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",qo,[e.createVNode(i,{class:"card"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),e.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",disabled:t.disabled,onClick:r[0]||(r[0]=a=>n.$emit("remove-item"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.TrashIcon))]),_:1},8,["disabled"])])}}}),q=(t,n)=>{const r=t.__vccOpts||t;for(const[i,o]of n)r[i]=o;return r},Mt=q(zo,[["__scopeId","data-v-a0b2e4fb"]]),Wo={actions:{create:"New Redis Configuration",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",done:"Done",view:"View Details",loading:"Loading...",view_plugin:"View Plugin",close:"Close"},search:{placeholder:"Filter by name",placeholder_for_exact_match:"Filter by exact ID",no_results:"No results found"},delete:{title:"Delete Redis configuration",description:"You’re about to delete this item. Are you sure you want to proceed?",warning:"To delete this configuration, first remove it from all associated plugins."},errors:{copy:"Failed to copy to clipboard",general:"Redis configuration could not be retrieved",delete:"The redis configuration could not be deleted at this time."},copy:{success:"Copied {val} to clipboard"},form:{sections:{type:{title:"Redis type",description:"Both Enterprise and Open Source plugins support Redis. Enterprise plugins can connect to a standalone Redis instance (host/port), Cluster, or Sentinel, while Open Source plugins support only a simplified host/port configuration."},general:{title:"General information",description:"Name your Redis configuration."},connection:{title:"Connection settings",description:"Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."},cluster:{title:"Cluster configuration",description:"Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."},tls:{title:"TLS settings",description:"Configure secure connections to Redis, including SSL and verification options."},keepalive:{title:"Keepalive configuration",description:"Keepalive reuses active connections to Redis, improving performance and efficiency."},read_write_configuration:{title:"Read/Write configuration",description:"Set timeouts for reading from and writing to the Redis server to control data transmission reliability."},sentinel_configuration:{title:"Sentinel configuration",description:"Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."}},fields:{type:{label:"Redis type"},name:{label:"Name",placeholder:"Enter unique name"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Route for grouping and filtering."},host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},database:{label:"Database",tooltip:"Database to use for the Redis connection."},password:{label:"Password",tooltip:"Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."},username:{label:"Username",tooltip:"Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`."},ssl:{label:"SSL",description:"If set to true, uses SSL to connect to Redis.",tooltip:"If set to true, uses SSL to connect to Redis."},ssl_verify:{label:"SSL Verify",description:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong. conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ss1_verify_depth accordingly.",tooltip:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong.conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly."},server_name:{label:"Server name",tooltip:"A string representing an SNI (server name indication) value for TLS."},keepalive_backlog:{label:"Keepalive backlog",tooltip:"Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`."},keepalive_pool_size:{label:"Keepalive pool size",tooltip:"The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low."},read_timeout:{label:"Read timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},send_timeout:{label:"Send timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},connect_timeout:{label:"Connect timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},sentinel_master:{label:"Sentinel master",tooltip:"Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."},sentinel_role:{label:"Sentinel role",tooltip:"Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."},sentinel_username:{label:"Sentinel username",tooltip:"Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."},sentinel_password:{label:"Sentinel password",tooltip:"Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."},cluster_node_ip:{label:"IP",tooltip:"A string representing a host name, such as example.com."},cluster_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},cluster_max_redirections:{label:"Cluster max redirections",tooltip:"Maximum retry attempts for redirection."},timeout:{label:"Timeout",tooltip:"redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"},connection_is_proxied:{label:"Connection is proxied",tooltip:"If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address."},cluster_nodes:{title:"Cluster nodes",tooltip:"Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_nodes:{title:"Sentinel nodes",tooltip:"Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_node_host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},sentinel_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."}},options:{type:{host_port:"Host/Port",cluster:"Cluster",sentinel:"Sentinel",open_source:"Open Source",enterprise:"Enterprise",suffix_open_source:" (Open Source)",suffix_enterprise:" (Enterprise)"},sentinel_role:{master:"master",slave:"slave",any:"any"}},edit_warning_modal:{title:"Edit Redis configuration",description:"This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",plugin_count:"{count} plugin(s)",confirm:"Confirm"}},linked_plugins_modal:{title:"Associated plugins ({count})",headers:{plugin:"Plugin",instance_name:"Name"}},redis:{title:"Redis Configurations",empty_state:{title:"Configure a Redis Configuration",description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."}},list:{action:"New configuration",table_headers:{name:"Name",type:"Type",plugins:"Plugins",tags:"Tags"},empty_state:{description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",feature_1:{title:"Store your Redis configurations",description:"Define a Redis configuration once and use it across multiple plugins."},feature_2:{title:"Sync across plugins",description:"Edits to your configuration will be cascaded automatically to all associated plugins."}}}};function Go(){const t=Ze.createI18n("en-us",Wo);return{i18n:t,i18nT:Ze.i18nTComponent(t)}}const Y={useI18n:Go},Jo={class:"cluster-node-items"},Yo=q(e.defineComponent({__name:"ClusterNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=Y.useI18n(),i=()=>{n.value.push(Lt())},o=a=>{n.value.splice(a,1)};return(a,m)=>{const _=e.resolveComponent("KLabel"),l=e.resolveComponent("KInput"),c=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(_,{class:"required",info:e.unref(r)("form.fields.cluster_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(b,w)=>(e.openBlock(),e.createBlock(Mt,{key:`${w}`,"data-testid":"redis-cluster-nodes",disabled:a.readonly,onRemoveItem:y=>o(w)},{default:e.withCtx(()=>[e.createElementVNode("div",Jo,[e.createVNode(l,{modelValue:b.ip,"onUpdate:modelValue":y=>b.ip=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.cluster_node_ip.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_ip.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"ip",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(l,{modelValue:b.port,"onUpdate:modelValue":y=>b.port=y,label:e.unref(r)("form.fields.cluster_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(c,{appearance:"tertiary","data-testid":"redis-add-cluster-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-776a626d"]]),Qo={class:"sentinel-node-items"},Xo=q(e.defineComponent({__name:"SentinelNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=Y.useI18n(),i=()=>{n.value.push(Dt())},o=a=>{n.value.splice(a,1)};return(a,m)=>{const _=e.resolveComponent("KLabel"),l=e.resolveComponent("KInput"),c=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(_,{class:"required",info:e.unref(r)("form.fields.sentinel_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(b,w)=>(e.openBlock(),e.createBlock(Mt,{key:b.id,"data-testid":"redis-sentinel-nodes",disabled:a.readonly,onRemoveItem:y=>o(w)},{default:e.withCtx(()=>[e.createElementVNode("div",Qo,[e.createVNode(l,{modelValue:b.host,"onUpdate:modelValue":y=>b.host=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.sentinel_node_host.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(l,{modelValue:b.port,"onUpdate:modelValue":y=>b.port=y,label:e.unref(r)("form.fields.sentinel_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(c,{appearance:"tertiary","data-testid":"redis-add-sentinel-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-cd1c07e2"]]);var qe=new WeakMap,vt=0;function Zo(t){if(!t.length)return"";for(var n="arg",r=0;r<t.length;++r){var i=void 0;t[r]===null||typeof t[r]!="object"&&typeof t[r]!="function"?typeof t[r]=="string"?i='"'+t[r]+'"':i=String(t[r]):qe.has(t[r])?i=qe.get(t[r]):(i=vt,qe.set(t[r],vt++)),n+="@"+i}return n}function ei(t){if(typeof t=="function")try{t=t()}catch{t=""}return Array.isArray(t)?t=Zo(t):t=String(t||""),t}var ze=function(){function t(n){n===void 0&&(n=0),this.items=new Map,this.ttl=n}return t.prototype.serializeKey=function(n){return ei(n)},t.prototype.get=function(n){var r=this.serializeKey(n);return this.items.get(r)},t.prototype.set=function(n,r,i){var o=this.serializeKey(n),a=i||this.ttl,m=Date.now(),_={data:r,createdAt:m,expiresAt:a?m+a:1/0};this.dispatchExpire(a,_,o),this.items.set(o,_)},t.prototype.dispatchExpire=function(n,r,i){var o=this;n&&setTimeout(function(){var a=Date.now(),m=a>=r.expiresAt;m&&o.delete(i)},n)},t.prototype.delete=function(n){this.items.delete(n)},t}();function ti(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function ni(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var ri=function(t){return fetch(t).then(function(n){return n.json()})};const We={isOnline:ti,isDocumentVisible:ni,fetcher:ri};var z=function(){return z=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},z.apply(this,arguments)},se=function(t,n,r,i){function o(a){return a instanceof r?a:new r(function(m){m(a)})}return new(r||(r=Promise))(function(a,m){function _(b){try{c(i.next(b))}catch(w){m(w)}}function l(b){try{c(i.throw(b))}catch(w){m(w)}}function c(b){b.done?a(b.value):o(b.value).then(_,l)}c((i=i.apply(t,n||[])).next())})},de=function(t,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,m;return m={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function _(c){return function(b){return l([c,b])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=n.call(t,r)}catch(b){c=[6,b],o=0}finally{i=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},oi=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),o,a=[],m;try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(_){m={error:_}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(m)throw m.error}}return a},ii=function(t,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,a;i<o;i++)(a||!(i in n))&&(a||(a=Array.prototype.slice.call(n,0,i)),a[i]=n[i]);return t.concat(a||Array.prototype.slice.call(n))},Ut=new ze,Ae=new ze,Ge=new ze,jt={cache:Ut,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:We.fetcher,isOnline:We.isOnline,isDocumentVisible:We.isDocumentVisible};function ai(t,n,r){var i=Ae.get(t);if(i)i.data.push(n);else{var o=5e3;Ae.set(t,[n],r>0?r+o:r)}}function li(t,n,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&n>r.errorRetryCount)){var i=Math.min(n||0,r.errorRetryCount),o=i*r.errorRetryInterval;setTimeout(function(){t(null,{errorRetryCount:i+1,shouldRetryOnError:!0})},o)}}var Ft=function(t,n,r,i){return r===void 0&&(r=Ut),i===void 0&&(i=jt.ttl),se(void 0,void 0,void 0,function(){var o,a,m,_,l,c,b;return de(this,function(w){switch(w.label){case 0:if(!di(n))return[3,5];w.label=1;case 1:return w.trys.push([1,3,,4]),[4,n];case 2:return o=w.sent(),[3,4];case 3:return _=w.sent(),a=_,[3,4];case 4:return[3,6];case 5:o=n,w.label=6;case 6:if(m=!1,l={data:o,error:a,isValidating:m},typeof o<"u")try{r.set(t,l,i)}catch(y){console.error("swrv(mutate): failed to set cache",y)}return c=Ae.get(t),c&&c.data.length&&(b=c.data.filter(function(y){return y.key===t}),b.forEach(function(y,E){typeof l.data<"u"&&(y.data=l.data),y.error=l.error,y.isValidating=l.isValidating,y.isLoading=l.isValidating;var h=E===b.length-1;h||delete b[E]}),b=b.filter(Boolean)),[2,l]}})})};function si(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o,a=z({},jt),m=!1,_=!1,l=e.getCurrentInstance(),c=(l==null?void 0:l.proxy)||l;if(!c)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var b=(c==null?void 0:c.$isServer)||!1;n.length>=1&&(i=n[0]),n.length>=2&&(o=n[1]),n.length>2&&(a=z(z({},a),n[2]));var w=b?a.serverTTL:a.ttl,y=typeof i=="function"?i:e.ref(i);typeof o>"u"&&(o=a.fetcher);var E=null;E||(E=e.reactive({data:void 0,error:void 0,isValidating:!0,isLoading:!0,key:null}));var h=function(p,u){return se(t,void 0,void 0,function(){var B,N,L,j,Q,M,W,F=this;return de(this,function(X){switch(X.label){case 0:return B=E.data===void 0,N=y.value,N?(L=a.cache.get(N),j=L&&L.data,E.isValidating=!0,E.isLoading=!j,j&&(E.data=j.data,E.error=j.error),Q=p||o,!Q||!a.isDocumentVisible()&&!B||(u==null?void 0:u.forceRevalidate)!==void 0&&!(u!=null&&u.forceRevalidate)?(E.isValidating=!1,E.isLoading=!1,[2]):L&&(M=!!(Date.now()-L.createdAt>=a.dedupingInterval||u!=null&&u.forceRevalidate),!M)?(E.isValidating=!1,E.isLoading=!1,[2]):(W=function(){return se(F,void 0,void 0,function(){var v,ce,oe,fe;return de(this,function(Z){switch(Z.label){case 0:return v=Ge.get(N),v?[3,2]:(ce=Array.isArray(N)?N:[N],oe=Q.apply(void 0,ii([],oi(ce),!1)),Ge.set(N,oe,a.dedupingInterval),[4,Ft(N,oe,a.cache,w)]);case 1:return Z.sent(),[3,4];case 2:return[4,Ft(N,v.data,a.cache,w)];case 3:Z.sent(),Z.label=4;case 4:return E.isValidating=!1,E.isLoading=!1,Ge.delete(N),E.error!==void 0&&(fe=!m&&a.shouldRetryOnError&&(u?u.shouldRetryOnError:!0),fe&&li(h,u?u.errorRetryCount:1,a)),[2]}})})},j&&a.revalidateDebounce?(setTimeout(function(){return se(F,void 0,void 0,function(){return de(this,function(v){switch(v.label){case 0:return m?[3,2]:[4,W()];case 1:v.sent(),v.label=2;case 2:return[2]}})})},a.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,W()];case 2:X.sent(),X.label=3;case 3:return[2]}})})},s=function(){return se(t,void 0,void 0,function(){return de(this,function(p){return[2,h(null,{shouldRetryOnError:!1})]})})},S=null;e.onMounted(function(){var p=function(){return se(t,void 0,void 0,function(){return de(this,function(u){switch(u.label){case 0:return!E.error&&a.isOnline()?[4,h()]:[3,2];case 1:return u.sent(),[3,3];case 2:S&&clearTimeout(S),u.label=3;case 3:return a.refreshInterval&&!m&&(S=setTimeout(p,a.refreshInterval)),[2]}})})};a.refreshInterval&&(S=setTimeout(p,a.refreshInterval)),a.revalidateOnFocus&&(document.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1))}),e.onUnmounted(function(){m=!0,S&&clearTimeout(S),a.revalidateOnFocus&&(document.removeEventListener("visibilitychange",s,!1),window.removeEventListener("focus",s,!1));var p=Ae.get(y.value);p&&(p.data=p.data.filter(function(u){return u!==E}))});try{e.watch(y,function(p){e.isReadonly(y)||(y.value=p),E.key=p,E.isValidating=!!p,ai(y.value,E,w),!b&&!_&&y.value&&h(),_=!1},{immediate:!0})}catch{}var O=z(z({},e.toRefs(E)),{mutate:function(p,u){return h(p,z(z({},u),{forceRevalidate:!0}))}});return O}function di(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}function Ht(t){return`redis-partial-links-${t}`}const we=t=>{const{axiosInstance:n}=f.useAxios(t.axiosRequestConfig);return{fetcher:async r=>{const{partialId:i,size:o,offset:a,query:m}=r;let _=`${t.apiBaseUrl}${Te.links[t.app]}`;t.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:"")),_=_.replace(/{id}/gi,i||""),m&&(_=`${_}?${m}`);const{data:l}=await n.get(_,{params:{size:o,offset:a}});return l}}},Kt=t=>{const{partialId:n,config:r}=t,{fetcher:i}=we(r),o=e.ref([]),{data:a}=si(Ht(n),()=>i({partialId:n}),{revalidateOnFocus:!1});return e.watch(a,()=>{var m;o.value=((m=a.value)==null?void 0:m.data)??[]}),o},ci={class:"kong-ui-entities-redis-configurations-form"},fi=q(e.defineComponent({__name:"RedisConfigurationForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string")},partialId:{type:String,required:!1,default:""},actionTeleportTarget:{type:String},slidoutTopOffset:{type:Number,default:60},disabledPartialType:{type:String,default:""}},emits:["update","error","loading","cancel"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o},i18nT:a}=Y.useI18n(),m=Xe.useRouter(),_=e.ref(),l=e.ref(),c=(P,g)=>{_.value=P??"",l.value=g},b=P=>{var g;(g=l.value)==null||g.call(l,P),_.value=!1},w=e.computed(()=>[{label:o("form.options.type.host_port"),group:o("form.options.type.enterprise"),value:C.HOST_PORT_EE,selected:u.value===C.HOST_PORT_EE,disabled:!p&&r.disabledPartialType===D.REDIS_EE},{label:o("form.options.type.cluster"),group:o("form.options.type.enterprise"),value:C.CLUSTER,selected:u.value===C.CLUSTER,disabled:!p&&r.disabledPartialType===D.REDIS_EE},{label:o("form.options.type.sentinel"),group:o("form.options.type.enterprise"),value:C.SENTINEL,selected:u.value===C.SENTINEL,disabled:!p&&r.disabledPartialType===D.REDIS_EE},{label:o("form.options.type.host_port"),group:o("form.options.type.open_source"),value:C.HOST_PORT_CE,selected:u.value===C.HOST_PORT_CE,disabled:p&&B.value||!p&&r.disabledPartialType===D.REDIS_CE}]),y=[{label:o("form.options.sentinel_role.master"),value:"master"},{label:o("form.options.sentinel_role.slave"),value:"slave"},{label:o("form.options.sentinel_role.any"),value:"any"}],E=P=>{const g=P.value===C.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");return`${P.label}${g}`},h=()=>r.disabledPartialType&&Oe(le)===r.disabledPartialType?r.disabledPartialType===D.REDIS_CE?C.HOST_PORT_EE:C.HOST_PORT_CE:le,{form:s,canSubmit:S,payload:O,isEdit:p,redisType:u,redisTypeIsEnterprise:B,fetchUrl:N,submit:L,setInitialFormValues:j}=Ko({partialId:r.partialId,defaultRedisType:h(),config:r.config}),{fetcher:Q}=we(r.config),M=e.ref(!1),W=e.ref(!1),F=e.ref(0),X=async()=>{try{if(p&&!W.value){const{count:g}=await Q({partialId:r.partialId});if(F.value=g,g>0){M.value=!0;return}}const{data:P}=await L();i("update",P)}catch(P){i("error",P)}},v=()=>{M.value=!1,W.value=!0,X()},ce=()=>{r.config.cancelRoute&&m.push(r.config.cancelRoute),i("cancel")},oe=P=>{i("loading",P)},fe=P=>{i("error",P)},Z=P=>{j(P)};return e.onBeforeMount(async()=>{if(p){const{count:P}=await Q({partialId:r.partialId});F.value=P}}),(P,g)=>{const Ye=e.resolveComponent("KAlert"),$e=e.resolveComponent("KSelect"),A=e.resolveComponent("KInput"),ue=e.resolveComponent("KCheckbox"),k=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ci,[e.createVNode(e.unref(f.EntityBaseForm),{"action-teleport-target":t.actionTeleportTarget,"can-submit":e.unref(S),config:t.config,"edit-id":t.partialId,"entity-type":e.unref(f.SupportedEntityType).RedisConfiguration,"error-message":e.unref(s).errorMessage,"fetch-url":e.unref(N),"form-fields":e.unref(O),"is-readonly":e.unref(s).readonly,"slidout-top-offset":t.slidoutTopOffset,onCancel:ce,"onFetch:error":fe,"onFetch:success":Z,onLoading:oe,onSubmit:X},{default:e.withCtx(()=>[F.value>0&&e.unref(p)?(e.openBlock(),e.createBlock(Ye,{key:0,appearance:"warning",class:"warning-alert","data-testid":"redis-update-warning-alert"},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:F.value})),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(f.EntityFormSection),{"data-testid":"redis-type-section",description:e.unref(o)("form.sections.type.description"),title:e.unref(o)("form.sections.type.title")},{default:e.withCtx(()=>[e.createVNode($e,{modelValue:e.unref(u),"onUpdate:modelValue":g[0]||(g[0]=d=>e.isRef(u)?u.value=d:null),"data-testid":"redis-type-select",disabled:e.unref(p)&&e.unref(u)===e.unref(C).HOST_PORT_CE,items:w.value,"kpop-attributes":{"data-testid":"redis-type-select-popover"},label:e.unref(o)("form.fields.type.label"),readonly:e.unref(s).readonly,required:""},{"selected-item-template":e.withCtx(({item:d})=>[e.createTextVNode(e.toDisplayString(E(d)),1)]),_:1},8,["modelValue","disabled","items","label","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(f.EntityFormSection),{"data-testid":"redis-general-section",description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.name,"onUpdate:modelValue":g[1]||(g[1]=d=>e.unref(s).fields.name=d),modelModifiers:{trim:!0},"data-testid":"redis-name-input",disabled:e.unref(p),label:e.unref(o)("form.fields.name.label"),placeholder:e.unref(o)("form.fields.name.placeholder"),readonly:e.unref(s).readonly,required:""},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.tags,"onUpdate:modelValue":g[2]||(g[2]=d=>e.unref(s).fields.tags=d),modelModifiers:{trim:!0},"data-testid":"redis-tags-input",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),"label-attributes":{info:e.unref(o)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:e.unref(s).readonly},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.unref(u)===e.unref(C).SENTINEL?(e.openBlock(),e.createBlock(e.unref(f.EntityFormSection),{key:1,"data-testid":"redis-sentinel-configuration-section",description:e.unref(o)("form.sections.sentinel_configuration.description"),title:e.unref(o)("form.sections.sentinel_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_master,"onUpdate:modelValue":g[3]||(g[3]=d=>e.unref(s).fields.config.sentinel_master=d),"data-testid":"redis-sentinel-master-input",label:e.unref(o)("form.fields.sentinel_master.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_master.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode($e,{modelValue:e.unref(s).fields.config.sentinel_role,"onUpdate:modelValue":g[4]||(g[4]=d=>e.unref(s).fields.config.sentinel_role=d),"data-testid":"redis-sentinel-role-select",items:y,"kpop-attributes":{"data-testid":"redis-sentinel-role-select-popover"},label:e.unref(o)("form.fields.sentinel_role.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Xo,{modelValue:e.unref(s).fields.config.sentinel_nodes,"onUpdate:modelValue":g[5]||(g[5]=d=>e.unref(s).fields.config.sentinel_nodes=d),readonly:e.unref(s).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_username,"onUpdate:modelValue":g[6]||(g[6]=d=>e.unref(s).fields.config.sentinel_username=d),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_username.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(pe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:d=>e.unref(s).fields.config.sentinel_username=d,value:e.unref(s).fields.config.sentinel_username,onOpen:g[7]||(g[7]=(d,x)=>c(d,x))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_password,"onUpdate:modelValue":g[8]||(g[8]=d=>e.unref(s).fields.config.sentinel_password=d),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_password.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(pe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:d=>e.unref(s).fields.config.sentinel_password=d,value:e.unref(s).fields.config.sentinel_password,onOpen:g[9]||(g[9]=(d,x)=>c(d,x))},null,8,["disabled","update","value"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(u)===e.unref(C).CLUSTER?(e.openBlock(),e.createBlock(e.unref(f.EntityFormSection),{key:2,"data-testid":"redis-cluster-configuration-section",description:e.unref(o)("form.sections.cluster.description"),title:e.unref(o)("form.sections.cluster.title")},{default:e.withCtx(()=>[e.createVNode(Yo,{modelValue:e.unref(s).fields.config.cluster_nodes,"onUpdate:modelValue":g[10]||(g[10]=d=>e.unref(s).fields.config.cluster_nodes=d),readonly:e.unref(s).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.cluster_max_redirections,"onUpdate:modelValue":g[11]||(g[11]=d=>e.unref(s).fields.config.cluster_max_redirections=d),"data-testid":"redis-cluster-max-redirections-input",label:e.unref(o)("form.fields.cluster_max_redirections.label"),"label-attributes":{info:e.unref(o)("form.fields.cluster_max_redirections.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(f.EntityFormSection),{"data-testid":"redis-connection-configuration-section",description:e.unref(o)("form.sections.connection.description"),title:e.unref(o)("form.sections.connection.title")},{default:e.withCtx(()=>[e.unref(u)===e.unref(C).HOST_PORT_CE||e.unref(u)===e.unref(C).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:0,modelValue:e.unref(s).fields.config.host,"onUpdate:modelValue":g[12]||(g[12]=d=>e.unref(s).fields.config.host=d),modelModifiers:{trim:!0},"data-testid":"redis-host-input",label:e.unref(o)("form.fields.host.label"),"label-attributes":{info:e.unref(o)("form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(u)===e.unref(C).HOST_PORT_CE||e.unref(u)===e.unref(C).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:1,modelValue:e.unref(s).fields.config.port,"onUpdate:modelValue":g[13]||(g[13]=d=>e.unref(s).fields.config.port=d),modelModifiers:{trim:!0},"data-testid":"redis-port-input",label:e.unref(o)("form.fields.port.label"),"label-attributes":{info:e.unref(o)("form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(u)===e.unref(C).HOST_PORT_EE?(e.openBlock(),e.createBlock(ue,{key:2,modelValue:e.unref(s).fields.config.connection_is_proxied,"onUpdate:modelValue":g[14]||(g[14]=d=>e.unref(s).fields.config.connection_is_proxied=d),"data-testid":"redis-connection-is-proxied-checkbox",disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.connection_is_proxied.label"),"label-attributes":{info:e.unref(o)("form.fields.connection_is_proxied.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","disabled","label","label-attributes"])):e.createCommentVNode("",!0),e.unref(u)===e.unref(C).HOST_PORT_CE?(e.openBlock(),e.createBlock(A,{key:3,modelValue:e.unref(s).fields.config.timeout,"onUpdate:modelValue":g[15]||(g[15]=d=>e.unref(s).fields.config.timeout=d),modelModifiers:{trim:!0},"data-testid":"redis-timeout-input",label:e.unref(o)("form.fields.timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.createVNode(A,{modelValue:e.unref(s).fields.config.database,"onUpdate:modelValue":g[16]||(g[16]=d=>e.unref(s).fields.config.database=d),modelModifiers:{trim:!0},"data-testid":"redis-database-input",label:e.unref(o)("form.fields.database.label"),"label-attributes":{info:e.unref(o)("form.fields.database.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.username,"onUpdate:modelValue":g[17]||(g[17]=d=>e.unref(s).fields.config.username=d),modelModifiers:{trim:!0},"data-testid":"redis-username-input",label:e.unref(o)("form.fields.username.label"),"label-attributes":{info:e.unref(o)("form.fields.username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(pe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:d=>e.unref(s).fields.config.username=d,value:e.unref(s).fields.config.username,onOpen:g[18]||(g[18]=(d,x)=>c(d,x))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.password,"onUpdate:modelValue":g[19]||(g[19]=d=>e.unref(s).fields.config.password=d),modelModifiers:{trim:!0},"data-testid":"redis-password-input",label:e.unref(o)("form.fields.password.label"),"label-attributes":{info:e.unref(o)("form.fields.password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(pe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:d=>e.unref(s).fields.config.password=d,value:e.unref(s).fields.config.password,onOpen:g[20]||(g[20]=(d,x)=>c(d,x))},null,8,["disabled","update","value"])]),_:1},8,["description","title"]),e.createVNode(e.unref(f.EntityFormSection),{"data-testid":"redis-tls-configuration-section",description:e.unref(o)("form.sections.tls.description"),title:e.unref(o)("form.sections.tls.title")},{default:e.withCtx(()=>[e.createVNode(ue,{modelValue:e.unref(s).fields.config.ssl,"onUpdate:modelValue":g[21]||(g[21]=d=>e.unref(s).fields.config.ssl=d),"data-testid":"redis-ssl-checkbox",description:e.unref(o)("form.fields.ssl.description"),disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.ssl.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(ue,{modelValue:e.unref(s).fields.config.ssl_verify,"onUpdate:modelValue":g[22]||(g[22]=d=>e.unref(s).fields.config.ssl_verify=d),"data-testid":"redis-ssl-verify-checkbox",description:e.unref(o)("form.fields.ssl_verify.description"),disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.ssl_verify.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl_verify.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.server_name,"onUpdate:modelValue":g[23]||(g[23]=d=>e.unref(s).fields.config.server_name=d),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.server_name.label"),"label-attributes":{info:e.unref(o)("form.fields.server_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"]),e.unref(u)!==e.unref(C).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(f.EntityFormSection),{key:3,"data-testid":"redis-keepalive-section",description:e.unref(o)("form.sections.keepalive.description"),title:e.unref(o)("form.sections.keepalive.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.keepalive_backlog,"onUpdate:modelValue":g[24]||(g[24]=d=>e.unref(s).fields.config.keepalive_backlog=d),"data-testid":"redis-keepalive-backlog-input",label:e.unref(o)("form.fields.keepalive_backlog.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_backlog.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.keepalive_pool_size,"onUpdate:modelValue":g[25]||(g[25]=d=>e.unref(s).fields.config.keepalive_pool_size=d),"data-testid":"redis-keepalive-pool-size-input",label:e.unref(o)("form.fields.keepalive_pool_size.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_pool_size.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(u)!==e.unref(C).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(f.EntityFormSection),{key:4,"data-testid":"redis-read-write-configuration-section",description:e.unref(o)("form.sections.read_write_configuration.description"),title:e.unref(o)("form.sections.read_write_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.read_timeout,"onUpdate:modelValue":g[26]||(g[26]=d=>e.unref(s).fields.config.read_timeout=d),"data-testid":"redis-read-timeout-input",label:e.unref(o)("form.fields.read_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.send_timeout,"onUpdate:modelValue":g[27]||(g[27]=d=>e.unref(s).fields.config.send_timeout=d),"data-testid":"redis-send-timeout-input",label:e.unref(o)("form.fields.send_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.send_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.connect_timeout,"onUpdate:modelValue":g[28]||(g[28]=d=>e.unref(s).fields.config.connect_timeout=d),"data-testid":"redis-connect-timeout-input",label:e.unref(o)("form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0)]),_:1},8,["action-teleport-target","can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","slidout-top-offset"])]),e.createVNode(e.unref(pe.VaultSecretPicker),{config:r.config,setup:_.value,onCancel:g[29]||(g[29]=()=>_.value=!1),onProceed:b},null,8,["config","setup"]),e.createVNode(k,{"action-button-text":e.unref(o)("form.edit_warning_modal.confirm"),"data-testid":"redis-update-warning-modal","hide-cancel-button":"","max-width":"640",title:e.unref(o)("form.edit_warning_modal.title"),visible:M.value,onCancel:g[30]||(g[30]=d=>M.value=!1),onProceed:v},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:F.value})),1)]),_:1})]),_:1},8,["action-button-text","title","visible"])],64)}}}),[["__scopeId","data-v-6f2877e0"]]),ui="#00abd2",pi="24px",mi={class:"linked-plugins","data-testid":"linked-plugins-inline"},Je=7,gi=q(e.defineComponent({__name:"LinkedPluginsInline",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},partialId:{type:String,required:!0}},setup(t){const n=t,r=Kt({config:n.config,partialId:n.partialId});return(i,o)=>{const a=e.resolveComponent("KBadge");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).slice(0,Je),m=>(e.openBlock(),e.createBlock(e.unref(et.PluginIcon),{key:m.id,name:m.name,size:24},null,8,["name"]))),128)),e.unref(r).length-Je>0?(e.openBlock(),e.createBlock(a,{key:0,appearance:"info"},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(e.unref(r).length-Je),1)]),_:1})):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-c39556bc"]]),_i={class:"plugin-item"},yi=q(e.defineComponent({__name:"PluginItem",props:{pluginName:{}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",_i,[e.createVNode(e.unref(et.PluginIcon),{name:n.pluginName,size:24},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(n.pluginName),1)]))}}),[["__scopeId","data-v-de964dc4"]]),bi={class:"toolbar-container"},qt=q(e.defineComponent({__name:"LinkedPluginList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},isExactMatch:{type:Boolean,default:!1},filterBarEnabled:{type:Boolean,default:!1},partialId:{type:String,required:!0}},emits:["view-plugin","load"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=Y.useI18n(),a=[{key:"name",label:o("linked_plugins_modal.headers.plugin")},{key:"instance_name",label:o("linked_plugins_modal.headers.instance_name")},{key:"actions",hideLabel:!0}],{fetcher:m}=we(r.config),_=e.ref(0),l=async y=>{const{data:E,count:h}=await m({partialId:r.partialId,size:y.pageSize,offset:y.offset,query:y.query});_.value=h;const s={total:h,data:E};return i("load",s),s},c=e.ref(""),b=e.computed(()=>r.config.app==="konnect"||r.isExactMatch?{isExactMatch:!0}:{isExactMatch:!1,fields:{name:{searchable:!0}},schema:{name:{type:"text"}}}),w=y=>{i("view-plugin",{id:y.id,plugin:y.name})};return(y,E)=>{const h=e.resolveComponent("KDropdownItem"),s=e.resolveComponent("KTableData");return e.openBlock(),e.createBlock(s,{"cache-identifier":e.unref(Ht)(t.partialId),fetcher:l,headers:a,"hide-pagination-when-optional":"","pagination-attributes":{totalCount:_.value,disablePageJump:!0},"search-input":c.value},e.createSlots({name:e.withCtx(({rowValue:S})=>[e.createVNode(yi,{"plugin-name":S},null,8,["plugin-name"])]),"action-items":e.withCtx(({row:S})=>[e.createVNode(h,{onClick:O=>w(S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("actions.view_plugin")),1)]),_:2},1032,["onClick"])]),_:2},[t.filterBarEnabled?{name:"toolbar",fn:e.withCtx(()=>[e.createElementVNode("div",bi,[e.createVNode(e.unref(f.EntityFilter),{modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=S=>c.value=S),config:b.value},null,8,["modelValue","config"])])]),key:"0"}:void 0]),1032,["cache-identifier","pagination-attributes","search-input"])}}}),[["__scopeId","data-v-50856d03"]]),hi={class:"linked-plugins-modal","data-testid":"linked-plugins-modal"},Ci=q(e.defineComponent({__name:"LinkedPluginListModal",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},redisConfigurationId:{type:String,required:!0},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","proceed","view-plugin"],setup(t,{emit:n}){const r=n,{i18n:{t:i}}=Y.useI18n(),o=e.ref(0),a=e.computed(()=>i("linked_plugins_modal.title",{count:o.value})),m=()=>{r("cancel")},_=()=>{r("proceed")};return(l,c)=>{const b=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(b,{"action-button-text":e.unref(i)("actions.done"),"hide-cancel-button":"",title:a.value,visible:t.visible,onCancel:m,onProceed:_},{default:e.withCtx(()=>[e.createVNode(qt,{config:t.config,"partial-id":t.redisConfigurationId,onLoad:c[0]||(c[0]=({total:w})=>o.value=w),onViewPlugin:c[1]||(c[1]=w=>r("view-plugin",w))},null,8,["config","partial-id"])]),_:1},8,["action-button-text","title","visible"])])}}}),[["__scopeId","data-v-6148b8bd"]]),zt=e.defineComponent({__name:"DeleteWarningModal",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(t,{emit:n}){const{i18n:{t:r}}=Y.useI18n(),i=n,o=()=>{i("close")};return(a,m)=>{const _=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(_,{"action-button-text":e.unref(r)("actions.close"),"data-testid":"remove-links-modal","hide-cancel-button":"","max-width":"640",title:e.unref(r)("delete.title"),visible:t.visible,onCancel:o,onProceed:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("delete.warning")),1)]),_:1},8,["action-button-text","title","visible"])}}}),Ti={class:"kong-ui-entities-partials-list"},wi={class:"empty-state-icon-gateway"},Ei=1e3,ki=q(e.defineComponent({__name:"RedisConfigurationList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["click:learn-more","click:plugin","copy:error","copy:success","delete:success","error"],setup(t,{emit:n}){var ue;const r=n,i=t,o=e.computed(()=>{var d,x;let k=`${i.config.apiBaseUrl}${Te.list[i.config.app]}`;return i.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((d=i.config)==null?void 0:d.controlPlaneId)||""):i.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(x=i.config)!=null&&x.workspace?`/${i.config.workspace}`:"")),k}),a=e.ref(!1),m=e.ref(""),_=e.ref(null),l=e.ref(void 0),c=e.ref(!1),b=e.ref(!1),w=e.ref(""),y=e.ref(!1),E=f.useDeleteUrlBuilder(i.config,o.value),h=e.ref(1),s=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),{fetcher:S,fetcherState:O}=f.useFetcher(i.config,o);async function p(k){const d=await S({...k,pageSize:Ei});return d.data=d.data.filter(x=>x.type===D.REDIS_CE||x.type===D.REDIS_EE),d}const{i18n:{t:u}}=Y.useI18n(),{axiosInstance:B}=f.useAxios((ue=i.config)==null?void 0:ue.axiosRequestConfig),N=Xe.useRouter(),L=e.ref(""),j=e.computed(()=>{const k=i.config.app==="konnect"||i.config.isExactMatch;if(k)return{isExactMatch:!0,placeholder:u("search.placeholder_for_exact_match")};const{name:d}=W;return{isExactMatch:k,fields:{name:d},schema:i.config.filterSchema}}),{fetcher:Q}=we(i.config),M=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${u("redis.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:u("redis.title")}),W={name:{label:u("list.table_headers.name"),searchable:!0,hidable:!1,sortable:!0},type:{label:u("list.table_headers.type")},tags:{label:u("list.table_headers.tags")},plugins:{label:u("list.table_headers.plugins")}},F=k=>({label:u("actions.view"),to:i.config.getViewRoute(k)}),X=k=>({label:u("actions.edit"),to:i.config.getEditRoute(k)}),v=async k=>{const{count:d}=await Q({partialId:k.id});d>0?y.value=!0:(l.value=k,c.value=!0)},ce=()=>{L.value=""},oe=async k=>{var x;await((x=i.canRetrieve)==null?void 0:x.call(i,k))&&N.push(i.config.getViewRoute(k.id))},fe=()=>{c.value=!1},Z=k=>{m.value=k,a.value=!0},P=async()=>{var k,d,x;if((k=l.value)!=null&&k.id){b.value=!0;try{await B.delete(E(l.value.id)),b.value=!1,c.value=!1,g(),r("delete:success",l.value)}catch(U){w.value=((x=(d=U.response)==null?void 0:d.data)==null?void 0:x.message)||U.message||u("errors.delete"),r("error",U)}finally{b.value=!1}}},g=()=>{h.value++},Ye=k=>{switch(Re(k)){case C.HOST_PORT_CE:return`${u("form.options.type.host_port")}${u("form.options.type.suffix_open_source")}`;case C.HOST_PORT_EE:return`${u("form.options.type.host_port")}${u("form.options.type.suffix_enterprise")}`;case C.SENTINEL:return`${u("form.options.type.sentinel")}${u("form.options.type.suffix_enterprise")}`;case C.CLUSTER:return`${u("form.options.type.cluster")}${u("form.options.type.suffix_enterprise")}`}},$e=()=>{N.push(i.config.createRoute)},A=async(k,d)=>{const x=k.id;if(!await d(x)){r("copy:error",{entity:k,field:"id",message:u("errors.copy")});return}r("copy:success",{entity:k,field:"id",message:u("copy.success",{val:x})})};return e.watch(O,k=>{var d,x,U;if(k.status===f.FetcherStatus.Error){_.value={title:u("errors.general")},(U=(x=(d=k.error)==null?void 0:d.response)==null?void 0:x.data)!=null&&U.message&&(_.value.message=k.error.response.data.message),r("error",k.error);return}_.value=null}),e.watch(i.canCreate,async k=>{await k?M.value.ctaText=u("actions.create"):M.value.ctaText=void 0},{immediate:!0}),(k,d)=>{const x=e.resolveComponent("KButton"),U=e.resolveComponent("KDropdownItem"),Ii=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ti,[e.createVNode(e.unref(f.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":s.value,"empty-state-options":M.value,"enable-entity-actions":"","error-message":_.value,fetcher:p,"fetcher-cache-key":h.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-redis-configuration-list",query:L.value,"table-headers":W,onClearSearchInput:ce,"onClick:row":d[2]||(d[2]=R=>oe(R)),onSort:g},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(f.EntityFilter),{modelValue:L.value,"onUpdate:modelValue":d[0]||(d[0]=R=>L.value=R),config:j.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":t.canCreate},{default:e.withCtx(()=>[e.createVNode(x,{appearance:"primary","data-testid":"toolbar-add-redis-configuration",size:"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("actions.create")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:R})=>[e.createElementVNode("b",null,e.toDisplayString(R??"-"),1)]),type:e.withCtx(({row:R})=>[e.createTextVNode(e.toDisplayString(Ye(R)),1)]),tags:e.withCtx(({rowValue:R})=>[e.createVNode(e.unref(f.TableTags),{tags:R},null,8,["tags"])]),plugins:e.withCtx(({row:R})=>[e.createVNode(gi,{config:t.config,"partial-id":R.id,onClick:e.withModifiers(Qe=>Z(R.id),["stop"])},null,8,["config","partial-id","onClick"])]),actions:e.withCtx(({row:R})=>[e.createVNode(Ii,null,{default:e.withCtx(({copyToClipboard:Qe})=>[e.createVNode(U,{"data-testid":"action-entity-copy-id",onClick:Wi=>A(R,Qe)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(R)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-view","has-divider":"",item:F(R.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canEdit(R)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-edit",item:X(R.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canDelete(R)},{default:e.withCtx(()=>[e.createVNode(U,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Qe=>v(R)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),"empty-state":e.withCtx(()=>[e.createVNode(e.unref(f.EntityEmptyState),{"action-button-text":e.unref(u)("list.action"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"redis-entity-empty-state",description:e.unref(u)("list.empty_state.description"),features:[{title:e.unref(u)("list.empty_state.feature_1.title"),description:e.unref(u)("list.empty_state.feature_1.description")},{title:e.unref(u)("list.empty_state.feature_2.title"),description:e.unref(u)("list.empty_state.feature_2.description")}],title:e.unref(u)("redis.title"),"onClick:create":$e,"onClick:learnMore":d[1]||(d[1]=()=>r("click:learn-more"))},{image:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(e.unref(ee.DeployIcon),{color:e.unref(ui),size:e.unref(pi)},null,8,["color","size"])])]),"feature-0-icon":e.withCtx(()=>[e.createVNode(e.unref(ee.ClipboardIcon))]),"feature-1-icon":e.withCtx(()=>[e.createVNode(e.unref(ee.RefreshIcon))]),_:1},8,["action-button-text","can-create","description","features","title"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher-cache-key","query"]),e.createVNode(zt,{visible:y.value,onClose:d[3]||(d[3]=R=>y.value=!1)},null,8,["visible"]),e.createVNode(e.unref(f.EntityDeleteModal),{"action-pending":b.value,description:e.unref(u)("delete.description"),"entity-name":l.value&&(l.value.name||l.value.id),"entity-type":e.unref(f.EntityTypes).RedisConfiguration,error:w.value,"need-confirmation":!0,title:e.unref(u)("delete.title"),visible:c.value,onCancel:fe,onProceed:P},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),e.createVNode(Ci,{config:t.config,"redis-configuration-id":m.value,visible:a.value,onCancel:d[4]||(d[4]=R=>a.value=!1),onProceed:d[5]||(d[5]=R=>a.value=!1),onViewPlugin:d[6]||(d[6]=R=>r("click:plugin",R))},null,8,["config","redis-configuration-id","visible"])])}}}),[["__scopeId","data-v-7d07fb48"]]),Si={class:"kong-ui-consumer-group-entity-config-card"},Vi=e.defineComponent({__name:"RedisConfigurationConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!0}},emits:["loading","fetch:error","fetch:success"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=Y.useI18n(),a=e.computed(()=>Te.form[r.config.app].edit),m=e.ref(le),_=h=>{m.value=Re(h),i("fetch:success",h)},l=e.computed(()=>{const h=m.value===C.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");let s="";switch(m.value){case C.HOST_PORT_CE:s=o("form.options.type.host_port");break;case C.HOST_PORT_EE:s=o("form.options.type.host_port");break;case C.CLUSTER:s=o("form.options.type.cluster");break;case C.SENTINEL:s=o("form.options.type.sentinel");break}return`${s}${h}`}),c=h=>({id:h.id,name:h.name,tags:h.tags,created_at:h.created_at,updated_at:h.updated_at,type:h.type,...h.config}),b=h=>{const{id:s,name:S,created_at:O,updated_at:p,type:u,tags:B,...N}=h;return{id:s,name:S,tags:B,created_at:O,updated_at:p,type:u,config:N}},w={id:{},name:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.name.label")},tags:{type:f.ConfigurationSchemaType.BadgeTag,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.tags.label"),tooltip:o("form.fields.tags.tooltip")},updated_at:{},created_at:{},type:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.type.label")},cluster_max_redirections:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.cluster_max_redirections.tooltip"),label:o("form.fields.cluster_max_redirections.label")},cluster_nodes:{type:f.ConfigurationSchemaType.JsonArray,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.cluster_nodes.title"),tooltip:o("form.fields.cluster_nodes.tooltip")},connect_timeout:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.connect_timeout.label"),tooltip:o("form.fields.connect_timeout.tooltip")},connection_is_proxied:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.connection_is_proxied.label"),tooltip:o("form.fields.connection_is_proxied.tooltip")},database:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.database.label"),tooltip:o("form.fields.database.tooltip")},host:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.host.label"),tooltip:o("form.fields.host.tooltip")},keepalive_backlog:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_backlog.label"),tooltip:o("form.fields.keepalive_backlog.tooltip")},keepalive_pool_size:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_pool_size.label"),tooltip:o("form.fields.keepalive_pool_size.tooltip")},password:{type:f.ConfigurationSchemaType.Redacted,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.password.label"),tooltip:o("form.fields.password.tooltip")},port:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.port.label"),tooltip:o("form.fields.port.tooltip")},read_timeout:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.read_timeout.label"),tooltip:o("form.fields.read_timeout.tooltip")},send_timeout:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.send_timeout.label"),tooltip:o("form.fields.send_timeout.tooltip")},sentinel_master:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_master.label"),tooltip:o("form.fields.sentinel_master.tooltip")},sentinel_nodes:{type:f.ConfigurationSchemaType.JsonArray,section:f.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.sentinel_nodes.tooltip")},sentinel_password:{type:f.ConfigurationSchemaType.Redacted,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_password.label"),tooltip:o("form.fields.sentinel_password.tooltip")},sentinel_role:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_role.label"),tooltip:o("form.fields.sentinel_role.tooltip")},sentinel_username:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_username.label"),tooltip:o("form.fields.sentinel_username.tooltip")},server_name:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.server_name.label"),tooltip:o("form.fields.server_name.tooltip")},ssl_verify:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl_verify.label"),tooltip:o("form.fields.ssl_verify.tooltip")},ssl:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl.label"),tooltip:o("form.fields.ssl.tooltip")},timeout:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.timeout.label"),tooltip:o("form.fields.timeout.tooltip")},username:{type:f.ConfigurationSchemaType.Text,section:f.ConfigurationSchemaSection.Basic,label:o("form.fields.username.label"),tooltip:o("form.fields.username.tooltip")}},y=h=>{const s={},S=Object.keys(w);for(const O of S)h.includes(O)?s[O]={...w[O],order:h.indexOf(O)+1}:s[O]={...w[O],hidden:!0};return s},E=e.computed(()=>{const h=["id","name","tags","type","updated_at","created_at"];switch(m.value){case C.HOST_PORT_CE:return y([...h,"host","port","timeout","database","username","password","ssl","ssl_verify","server_name"]);case C.HOST_PORT_EE:return y([...h,"host","port","connection_is_proxied","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case C.CLUSTER:return y([...h,"cluster_nodes","cluster_max_redirections","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case C.SENTINEL:return y([...h,"sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);default:throw new Error("Invalid Redis type")}});return(h,s)=>(e.openBlock(),e.createElementBlock("div",Si,[e.createVNode(e.unref(f.EntityBaseConfigCard),{"code-block-record-formatter":b,config:t.config,"config-card-doc":t.configCardDoc,"config-schema":E.value,"entity-type":e.unref(f.SupportedEntityType).RedisConfiguration,"fetch-url":a.value,"hide-title":t.hideTitle,"record-resolver":c,"onFetch:error":s[0]||(s[0]=S=>h.$emit("fetch:error",S)),"onFetch:success":_,onLoading:s[1]||(s[1]=S=>h.$emit("loading",S))},{type:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(l.value),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),xi={useLinkedPlugins:Kt,useLinkedPluginsFetcher:we};V.DeleteWarningModal=zt,V.LinkedPlugins=qt,V.PartialType=D,V.RedisConfigurationConfigCard=Vi,V.RedisConfigurationForm=fi,V.RedisConfigurationList=ki,V.RedisType=C,V.composables=xi,V.constants=Fo,V.helpers=Ho,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.array-card-container-wrapper{width:100%}.array-card-container[data-v-a0b2e4fb]{align-items:center;display:flex}.array-card-container .card[data-v-a0b2e4fb]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-a0b2e4fb]{margin-left:12px}.cluster-node-items[data-v-776a626d],.sentinel-node-items[data-v-cd1c07e2]{display:flex;flex-direction:column;gap:24px}.warning-alert[data-v-6f2877e0]{margin-bottom:32px}.kong-ui-entities-redis-configurations-form[data-v-6f2877e0]{width:100%}.secret-picker-provider[data-v-6f2877e0]{margin-top:8px!important}.linked-plugins[data-v-c39556bc]{display:flex;gap:8px}.plugin-item[data-v-de964dc4]{align-items:center;display:flex;gap:8px}.toolbar-container[data-v-50856d03]{align-items:center;display:flex;width:100%}.linked-plugins-modal[data-v-6148b8bd] .k-table-view{background-color:transparent}.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:640px}@media (max-width: 640px){.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:100%}}.kong-ui-entities-partials-list[data-v-
|
|
1
|
+
.array-card-container-wrapper{width:100%}.array-card-container[data-v-a0b2e4fb]{align-items:center;display:flex}.array-card-container .card[data-v-a0b2e4fb]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-a0b2e4fb]{margin-left:12px}.cluster-node-items[data-v-776a626d],.sentinel-node-items[data-v-cd1c07e2]{display:flex;flex-direction:column;gap:24px}.warning-alert[data-v-6f2877e0]{margin-bottom:32px}.kong-ui-entities-redis-configurations-form[data-v-6f2877e0]{width:100%}.secret-picker-provider[data-v-6f2877e0]{margin-top:8px!important}.linked-plugins[data-v-c39556bc]{display:flex;gap:8px}.plugin-item[data-v-de964dc4]{align-items:center;display:flex;gap:8px}.toolbar-container[data-v-50856d03]{align-items:center;display:flex;width:100%}.linked-plugins-modal[data-v-6148b8bd] .k-table-view{background-color:transparent}.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:640px}@media (max-width: 640px){.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:100%}}.kong-ui-entities-partials-list[data-v-7d07fb48]{width:100%}
|
|
@@ -41,14 +41,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
41
41
|
type: BooleanConstructor;
|
|
42
42
|
default: boolean;
|
|
43
43
|
};
|
|
44
|
-
/**
|
|
45
|
-
* Enables the new empty state design, this prop can be removed when
|
|
46
|
-
* the khcp-14756-empty-states-m2 FF is removed.
|
|
47
|
-
*/
|
|
48
|
-
enableV2EmptyStates: {
|
|
49
|
-
type: BooleanConstructor;
|
|
50
|
-
default: boolean;
|
|
51
|
-
};
|
|
52
44
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
53
45
|
error: (error: AxiosError<unknown, any>) => any;
|
|
54
46
|
"click:learn-more": () => any;
|
|
@@ -99,14 +91,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
99
91
|
type: BooleanConstructor;
|
|
100
92
|
default: boolean;
|
|
101
93
|
};
|
|
102
|
-
/**
|
|
103
|
-
* Enables the new empty state design, this prop can be removed when
|
|
104
|
-
* the khcp-14756-empty-states-m2 FF is removed.
|
|
105
|
-
*/
|
|
106
|
-
enableV2EmptyStates: {
|
|
107
|
-
type: BooleanConstructor;
|
|
108
|
-
default: boolean;
|
|
109
|
-
};
|
|
110
94
|
}>> & Readonly<{
|
|
111
95
|
onError?: ((error: AxiosError<unknown, any>) => any) | undefined;
|
|
112
96
|
"onClick:learn-more"?: (() => any) | undefined;
|
|
@@ -124,7 +108,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
124
108
|
canEdit: (row: EntityRow) => boolean | Promise<boolean>;
|
|
125
109
|
canRetrieve: (row: EntityRow) => boolean | Promise<boolean>;
|
|
126
110
|
useActionOutside: boolean;
|
|
127
|
-
enableV2EmptyStates: boolean;
|
|
128
111
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
129
112
|
export default _default;
|
|
130
113
|
//# sourceMappingURL=RedisConfigurationList.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisConfigurationList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RedisConfigurationList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RedisConfigurationList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RedisConfigurationList.vue"],"names":[],"mappings":"AAgjBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EACV,mCAAmC,EACnC,uCAAuC,EACvC,SAAS,EAET,gBAAgB,EAEjB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;;IA88BrC,oHAAoH;;cAElG,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC,KAAG,OAAO;;;;;;IAW7G,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;YA9ChF,MAAM;gBAAU,MAAM;;;;;;IAOvD,oHAAoH;;cAElG,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC,KAAG,OAAO;;;;;;IAW7G,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;YA9ChF,MAAM;gBAAU,MAAM;;;;;;;qBAwBpB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;;AAjD7E,wBA2DG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-redis-configurations",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-redis-configurations.umd.js",
|
|
6
6
|
"module": "./dist/entities-redis-configurations.es.js",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"axios": "^1.11.0",
|
|
29
29
|
"vue": "^3.5.13",
|
|
30
30
|
"vue-router": "^4.4.5",
|
|
31
|
-
"@kong-ui-public/entities-plugins-icon": "^1.2.0",
|
|
32
31
|
"@kong-ui-public/entities-shared": "^3.27.2",
|
|
33
|
-
"@kong-ui-public/
|
|
34
|
-
"@kong-ui-public/entities-vaults": "^3.23.3"
|
|
32
|
+
"@kong-ui-public/entities-plugins-icon": "^1.2.0",
|
|
33
|
+
"@kong-ui-public/entities-vaults": "^3.23.3",
|
|
34
|
+
"@kong-ui-public/i18n": "^2.4.0"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"vue": "^3.5.13",
|
|
58
58
|
"vue-router": "^4.4.5",
|
|
59
59
|
"@kong-ui-public/entities-plugins-icon": "^1.2.0",
|
|
60
|
-
"@kong-ui-public/entities-shared": "^3.27.2",
|
|
61
60
|
"@kong-ui-public/entities-vaults": "^3.23.3",
|
|
62
|
-
"@kong-ui-public/i18n": "^2.4.0"
|
|
61
|
+
"@kong-ui-public/i18n": "^2.4.0",
|
|
62
|
+
"@kong-ui-public/entities-shared": "^3.27.2"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"uuid": "^10.0.0"
|