@kong-ui-public/entities-redis-configurations 0.0.1

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.
Files changed (56) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +52 -0
  3. package/dist/entities-redis-configurations.es.js +3182 -0
  4. package/dist/entities-redis-configurations.umd.js +1 -0
  5. package/dist/style.css +1 -0
  6. package/dist/types/components/ClusterNodes.vue.d.ts +14 -0
  7. package/dist/types/components/ClusterNodes.vue.d.ts.map +1 -0
  8. package/dist/types/components/DeleteWarningModal.vue.d.ts +17 -0
  9. package/dist/types/components/DeleteWarningModal.vue.d.ts.map +1 -0
  10. package/dist/types/components/FieldArrayCardContainer.vue.d.ts +60 -0
  11. package/dist/types/components/FieldArrayCardContainer.vue.d.ts.map +1 -0
  12. package/dist/types/components/LinkedPluginList.vue.d.ts +69 -0
  13. package/dist/types/components/LinkedPluginList.vue.d.ts.map +1 -0
  14. package/dist/types/components/LinkedPluginListModal.vue.d.ts +49 -0
  15. package/dist/types/components/LinkedPluginListModal.vue.d.ts.map +1 -0
  16. package/dist/types/components/LinkedPluginsInline.vue.d.ts +25 -0
  17. package/dist/types/components/LinkedPluginsInline.vue.d.ts.map +1 -0
  18. package/dist/types/components/PluginItem.vue.d.ts +13 -0
  19. package/dist/types/components/PluginItem.vue.d.ts.map +1 -0
  20. package/dist/types/components/RedisConfigurationConfigCard.vue.d.ts +62 -0
  21. package/dist/types/components/RedisConfigurationConfigCard.vue.d.ts.map +1 -0
  22. package/dist/types/components/RedisConfigurationForm.vue.d.ts +87 -0
  23. package/dist/types/components/RedisConfigurationForm.vue.d.ts.map +1 -0
  24. package/dist/types/components/RedisConfigurationList.vue.d.ts +119 -0
  25. package/dist/types/components/RedisConfigurationList.vue.d.ts.map +1 -0
  26. package/dist/types/components/SentinelNodes.vue.d.ts +14 -0
  27. package/dist/types/components/SentinelNodes.vue.d.ts.map +1 -0
  28. package/dist/types/composables/index.d.ts +6 -0
  29. package/dist/types/composables/index.d.ts.map +1 -0
  30. package/dist/types/composables/useI18n.d.ts +9 -0
  31. package/dist/types/composables/useI18n.d.ts.map +1 -0
  32. package/dist/types/composables/useLinkedPlugins.d.ts +27 -0
  33. package/dist/types/composables/useLinkedPlugins.d.ts.map +1 -0
  34. package/dist/types/composables/useRedisConfigurationForm.d.ts +168 -0
  35. package/dist/types/composables/useRedisConfigurationForm.d.ts.map +1 -0
  36. package/dist/types/constants.d.ts +7 -0
  37. package/dist/types/constants.d.ts.map +1 -0
  38. package/dist/types/helpers.d.ts +20 -0
  39. package/dist/types/helpers.d.ts.map +1 -0
  40. package/dist/types/index.d.ts +40 -0
  41. package/dist/types/index.d.ts.map +1 -0
  42. package/dist/types/partials-endpoints.d.ts +22 -0
  43. package/dist/types/partials-endpoints.d.ts.map +1 -0
  44. package/dist/types/types/index.d.ts +6 -0
  45. package/dist/types/types/index.d.ts.map +1 -0
  46. package/dist/types/types/redis-configuration-config.d.ts +8 -0
  47. package/dist/types/types/redis-configuration-config.d.ts.map +1 -0
  48. package/dist/types/types/redis-configuration-form.d.ts +40 -0
  49. package/dist/types/types/redis-configuration-form.d.ts.map +1 -0
  50. package/dist/types/types/redis-configuration-linked-plugins.d.ts +11 -0
  51. package/dist/types/types/redis-configuration-linked-plugins.d.ts.map +1 -0
  52. package/dist/types/types/redis-configuration-list.d.ts +31 -0
  53. package/dist/types/types/redis-configuration-list.d.ts.map +1 -0
  54. package/dist/types/types/redis-configuration.d.ts +56 -0
  55. package/dist/types/types/redis-configuration.d.ts.map +1 -0
  56. package/package.json +85 -0
@@ -0,0 +1,3182 @@
1
+ import { computed as H, reactive as Nt, ref as $, watch as Ie, defineComponent as Y, resolveComponent as D, openBlock as k, createElementBlock as q, createVNode as p, withCtx as h, renderSlot as yn, unref as i, mergeModels as jt, useModel as Bt, createTextVNode as Z, toDisplayString as B, createElementVNode as K, Fragment as Ke, renderList as ft, createBlock as F, getCurrentInstance as vn, onMounted as hn, onUnmounted as Tn, isReadonly as wn, toRefs as Sn, onBeforeMount as En, createCommentVNode as X, isRef as Cn, createSlots as Ft, withModifiers as In } from "vue";
2
+ import "@kong-ui-public/entities-shared/dist/style.css";
3
+ import "@kong-ui-public/entities-vaults/dist/style.css";
4
+ import { useAxios as pt, useErrors as Rn, EntityBaseFormType as Ye, EntityBaseForm as kn, SupportedEntityType as Ht, EntityFormSection as le, EntityFilter as Kt, useDeleteUrlBuilder as On, useFetcher as xn, FetcherStatus as Pn, EntityBaseTable as An, PermissionsWrapper as Le, EntityEmptyState as Vn, EntityDeleteModal as $n, EntityTypes as Ln, ConfigurationSchemaType as A, ConfigurationSchemaSection as V, EntityBaseConfigCard as Mn } from "@kong-ui-public/entities-shared";
5
+ import { VaultSecretPickerProvider as Me, VaultSecretPicker as Dn } from "@kong-ui-public/entities-vaults";
6
+ import { useRouter as zt } from "vue-router";
7
+ import { TrashIcon as Un, AddCircleIcon as qt, AddIcon as Nn, DeployIcon as gt, RuntimesIcon as jn } from "@kong/icons";
8
+ import { createI18n as Bn, i18nTComponent as Fn } from "@kong-ui-public/i18n";
9
+ import { PluginIcon as Wt } from "@kong-ui-public/entities-plugins";
10
+ var y = /* @__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))(y || {}), ne = /* @__PURE__ */ ((e) => (e.REDIS_CE = "redis-ce", e.REDIS_EE = "redis-ee", e))(ne || {}), Gt = typeof global == "object" && global && global.Object === Object && global, Hn = typeof self == "object" && self && self.Object === Object && self, ie = Gt || Hn || Function("return this")(), we = ie.Symbol, Jt = Object.prototype, Kn = Jt.hasOwnProperty, zn = Jt.toString, Ee = we ? we.toStringTag : void 0;
11
+ function qn(e) {
12
+ var t = Kn.call(e, Ee), n = e[Ee];
13
+ try {
14
+ e[Ee] = void 0;
15
+ var o = !0;
16
+ } catch {
17
+ }
18
+ var r = zn.call(e);
19
+ return o && (t ? e[Ee] = n : delete e[Ee]), r;
20
+ }
21
+ var Wn = Object.prototype, Gn = Wn.toString;
22
+ function Jn(e) {
23
+ return Gn.call(e);
24
+ }
25
+ var Yn = "[object Null]", Qn = "[object Undefined]", bt = we ? we.toStringTag : void 0;
26
+ function Ae(e) {
27
+ return e == null ? e === void 0 ? Qn : Yn : bt && bt in Object(e) ? qn(e) : Jn(e);
28
+ }
29
+ function Re(e) {
30
+ return e != null && typeof e == "object";
31
+ }
32
+ var Be = Array.isArray;
33
+ function Yt(e) {
34
+ var t = typeof e;
35
+ return e != null && (t == "object" || t == "function");
36
+ }
37
+ var Xn = "[object AsyncFunction]", Zn = "[object Function]", ei = "[object GeneratorFunction]", ti = "[object Proxy]";
38
+ function Qt(e) {
39
+ if (!Yt(e))
40
+ return !1;
41
+ var t = Ae(e);
42
+ return t == Zn || t == ei || t == Xn || t == ti;
43
+ }
44
+ var Qe = ie["__core-js_shared__"], yt = function() {
45
+ var e = /[^.]+$/.exec(Qe && Qe.keys && Qe.keys.IE_PROTO || "");
46
+ return e ? "Symbol(src)_1." + e : "";
47
+ }();
48
+ function ni(e) {
49
+ return !!yt && yt in e;
50
+ }
51
+ var ii = Function.prototype, ri = ii.toString;
52
+ function _e(e) {
53
+ if (e != null) {
54
+ try {
55
+ return ri.call(e);
56
+ } catch {
57
+ }
58
+ try {
59
+ return e + "";
60
+ } catch {
61
+ }
62
+ }
63
+ return "";
64
+ }
65
+ var oi = /[\\^$.*+?()[\]{}|]/g, ai = /^\[object .+?Constructor\]$/, li = Function.prototype, si = Object.prototype, di = li.toString, ui = si.hasOwnProperty, ci = RegExp(
66
+ "^" + di.call(ui).replace(oi, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
67
+ );
68
+ function fi(e) {
69
+ if (!Yt(e) || ni(e))
70
+ return !1;
71
+ var t = Qt(e) ? ci : ai;
72
+ return t.test(_e(e));
73
+ }
74
+ function pi(e, t) {
75
+ return e == null ? void 0 : e[t];
76
+ }
77
+ function Se(e, t) {
78
+ var n = pi(e, t);
79
+ return fi(n) ? n : void 0;
80
+ }
81
+ var ot = Se(ie, "WeakMap"), mi = 9007199254740991, _i = /^(?:0|[1-9]\d*)$/;
82
+ function gi(e, t) {
83
+ var n = typeof e;
84
+ return t = t ?? mi, !!t && (n == "number" || n != "symbol" && _i.test(e)) && e > -1 && e % 1 == 0 && e < t;
85
+ }
86
+ function Xt(e, t) {
87
+ return e === t || e !== e && t !== t;
88
+ }
89
+ var bi = 9007199254740991;
90
+ function Zt(e) {
91
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= bi;
92
+ }
93
+ function yi(e) {
94
+ return e != null && Zt(e.length) && !Qt(e);
95
+ }
96
+ var vi = Object.prototype;
97
+ function hi(e) {
98
+ var t = e && e.constructor, n = typeof t == "function" && t.prototype || vi;
99
+ return e === n;
100
+ }
101
+ function Ti(e, t) {
102
+ for (var n = -1, o = Array(e); ++n < e; )
103
+ o[n] = t(n);
104
+ return o;
105
+ }
106
+ var wi = "[object Arguments]";
107
+ function vt(e) {
108
+ return Re(e) && Ae(e) == wi;
109
+ }
110
+ var en = Object.prototype, Si = en.hasOwnProperty, Ei = en.propertyIsEnumerable, Ci = vt(/* @__PURE__ */ function() {
111
+ return arguments;
112
+ }()) ? vt : function(e) {
113
+ return Re(e) && Si.call(e, "callee") && !Ei.call(e, "callee");
114
+ };
115
+ function Ii() {
116
+ return !1;
117
+ }
118
+ var tn = typeof exports == "object" && exports && !exports.nodeType && exports, ht = tn && typeof module == "object" && module && !module.nodeType && module, Ri = ht && ht.exports === tn, Tt = Ri ? ie.Buffer : void 0, ki = Tt ? Tt.isBuffer : void 0, at = ki || Ii, Oi = "[object Arguments]", xi = "[object Array]", Pi = "[object Boolean]", Ai = "[object Date]", Vi = "[object Error]", $i = "[object Function]", Li = "[object Map]", Mi = "[object Number]", Di = "[object Object]", Ui = "[object RegExp]", Ni = "[object Set]", ji = "[object String]", Bi = "[object WeakMap]", Fi = "[object ArrayBuffer]", Hi = "[object DataView]", Ki = "[object Float32Array]", zi = "[object Float64Array]", qi = "[object Int8Array]", Wi = "[object Int16Array]", Gi = "[object Int32Array]", Ji = "[object Uint8Array]", Yi = "[object Uint8ClampedArray]", Qi = "[object Uint16Array]", Xi = "[object Uint32Array]", P = {};
119
+ P[Ki] = P[zi] = P[qi] = P[Wi] = P[Gi] = P[Ji] = P[Yi] = P[Qi] = P[Xi] = !0;
120
+ P[Oi] = P[xi] = P[Fi] = P[Pi] = P[Hi] = P[Ai] = P[Vi] = P[$i] = P[Li] = P[Mi] = P[Di] = P[Ui] = P[Ni] = P[ji] = P[Bi] = !1;
121
+ function Zi(e) {
122
+ return Re(e) && Zt(e.length) && !!P[Ae(e)];
123
+ }
124
+ function er(e) {
125
+ return function(t) {
126
+ return e(t);
127
+ };
128
+ }
129
+ var nn = typeof exports == "object" && exports && !exports.nodeType && exports, Ce = nn && typeof module == "object" && module && !module.nodeType && module, tr = Ce && Ce.exports === nn, Xe = tr && Gt.process, wt = function() {
130
+ try {
131
+ var e = Ce && Ce.require && Ce.require("util").types;
132
+ return e || Xe && Xe.binding && Xe.binding("util");
133
+ } catch {
134
+ }
135
+ }(), St = wt && wt.isTypedArray, rn = St ? er(St) : Zi, nr = Object.prototype, ir = nr.hasOwnProperty;
136
+ function rr(e, t) {
137
+ var n = Be(e), o = !n && Ci(e), r = !n && !o && at(e), a = !n && !o && !r && rn(e), f = n || o || r || a, _ = f ? Ti(e.length, String) : [], s = _.length;
138
+ for (var c in e)
139
+ ir.call(e, c) && !(f && // Safari 9 has enumerable `arguments.length` in strict mode.
140
+ (c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
141
+ r && (c == "offset" || c == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
142
+ a && (c == "buffer" || c == "byteLength" || c == "byteOffset") || // Skip index properties.
143
+ gi(c, s))) && _.push(c);
144
+ return _;
145
+ }
146
+ function or(e, t) {
147
+ return function(n) {
148
+ return e(t(n));
149
+ };
150
+ }
151
+ var ar = or(Object.keys, Object), lr = Object.prototype, sr = lr.hasOwnProperty;
152
+ function dr(e) {
153
+ if (!hi(e))
154
+ return ar(e);
155
+ var t = [];
156
+ for (var n in Object(e))
157
+ sr.call(e, n) && n != "constructor" && t.push(n);
158
+ return t;
159
+ }
160
+ function ur(e) {
161
+ return yi(e) ? rr(e) : dr(e);
162
+ }
163
+ var ke = Se(Object, "create");
164
+ function cr() {
165
+ this.__data__ = ke ? ke(null) : {}, this.size = 0;
166
+ }
167
+ function fr(e) {
168
+ var t = this.has(e) && delete this.__data__[e];
169
+ return this.size -= t ? 1 : 0, t;
170
+ }
171
+ var pr = "__lodash_hash_undefined__", mr = Object.prototype, _r = mr.hasOwnProperty;
172
+ function gr(e) {
173
+ var t = this.__data__;
174
+ if (ke) {
175
+ var n = t[e];
176
+ return n === pr ? void 0 : n;
177
+ }
178
+ return _r.call(t, e) ? t[e] : void 0;
179
+ }
180
+ var br = Object.prototype, yr = br.hasOwnProperty;
181
+ function vr(e) {
182
+ var t = this.__data__;
183
+ return ke ? t[e] !== void 0 : yr.call(t, e);
184
+ }
185
+ var hr = "__lodash_hash_undefined__";
186
+ function Tr(e, t) {
187
+ var n = this.__data__;
188
+ return this.size += this.has(e) ? 0 : 1, n[e] = ke && t === void 0 ? hr : t, this;
189
+ }
190
+ function me(e) {
191
+ var t = -1, n = e == null ? 0 : e.length;
192
+ for (this.clear(); ++t < n; ) {
193
+ var o = e[t];
194
+ this.set(o[0], o[1]);
195
+ }
196
+ }
197
+ me.prototype.clear = cr;
198
+ me.prototype.delete = fr;
199
+ me.prototype.get = gr;
200
+ me.prototype.has = vr;
201
+ me.prototype.set = Tr;
202
+ function wr() {
203
+ this.__data__ = [], this.size = 0;
204
+ }
205
+ function ze(e, t) {
206
+ for (var n = e.length; n--; )
207
+ if (Xt(e[n][0], t))
208
+ return n;
209
+ return -1;
210
+ }
211
+ var Sr = Array.prototype, Er = Sr.splice;
212
+ function Cr(e) {
213
+ var t = this.__data__, n = ze(t, e);
214
+ if (n < 0)
215
+ return !1;
216
+ var o = t.length - 1;
217
+ return n == o ? t.pop() : Er.call(t, n, 1), --this.size, !0;
218
+ }
219
+ function Ir(e) {
220
+ var t = this.__data__, n = ze(t, e);
221
+ return n < 0 ? void 0 : t[n][1];
222
+ }
223
+ function Rr(e) {
224
+ return ze(this.__data__, e) > -1;
225
+ }
226
+ function kr(e, t) {
227
+ var n = this.__data__, o = ze(n, e);
228
+ return o < 0 ? (++this.size, n.push([e, t])) : n[o][1] = t, this;
229
+ }
230
+ function re(e) {
231
+ var t = -1, n = e == null ? 0 : e.length;
232
+ for (this.clear(); ++t < n; ) {
233
+ var o = e[t];
234
+ this.set(o[0], o[1]);
235
+ }
236
+ }
237
+ re.prototype.clear = wr;
238
+ re.prototype.delete = Cr;
239
+ re.prototype.get = Ir;
240
+ re.prototype.has = Rr;
241
+ re.prototype.set = kr;
242
+ var Oe = Se(ie, "Map");
243
+ function Or() {
244
+ this.size = 0, this.__data__ = {
245
+ hash: new me(),
246
+ map: new (Oe || re)(),
247
+ string: new me()
248
+ };
249
+ }
250
+ function xr(e) {
251
+ var t = typeof e;
252
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
253
+ }
254
+ function qe(e, t) {
255
+ var n = e.__data__;
256
+ return xr(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
257
+ }
258
+ function Pr(e) {
259
+ var t = qe(this, e).delete(e);
260
+ return this.size -= t ? 1 : 0, t;
261
+ }
262
+ function Ar(e) {
263
+ return qe(this, e).get(e);
264
+ }
265
+ function Vr(e) {
266
+ return qe(this, e).has(e);
267
+ }
268
+ function $r(e, t) {
269
+ var n = qe(this, e), o = n.size;
270
+ return n.set(e, t), this.size += n.size == o ? 0 : 1, this;
271
+ }
272
+ function ge(e) {
273
+ var t = -1, n = e == null ? 0 : e.length;
274
+ for (this.clear(); ++t < n; ) {
275
+ var o = e[t];
276
+ this.set(o[0], o[1]);
277
+ }
278
+ }
279
+ ge.prototype.clear = Or;
280
+ ge.prototype.delete = Pr;
281
+ ge.prototype.get = Ar;
282
+ ge.prototype.has = Vr;
283
+ ge.prototype.set = $r;
284
+ function Lr(e, t) {
285
+ for (var n = -1, o = t.length, r = e.length; ++n < o; )
286
+ e[r + n] = t[n];
287
+ return e;
288
+ }
289
+ function Mr() {
290
+ this.__data__ = new re(), this.size = 0;
291
+ }
292
+ function Dr(e) {
293
+ var t = this.__data__, n = t.delete(e);
294
+ return this.size = t.size, n;
295
+ }
296
+ function Ur(e) {
297
+ return this.__data__.get(e);
298
+ }
299
+ function Nr(e) {
300
+ return this.__data__.has(e);
301
+ }
302
+ var jr = 200;
303
+ function Br(e, t) {
304
+ var n = this.__data__;
305
+ if (n instanceof re) {
306
+ var o = n.__data__;
307
+ if (!Oe || o.length < jr - 1)
308
+ return o.push([e, t]), this.size = ++n.size, this;
309
+ n = this.__data__ = new ge(o);
310
+ }
311
+ return n.set(e, t), this.size = n.size, this;
312
+ }
313
+ function de(e) {
314
+ var t = this.__data__ = new re(e);
315
+ this.size = t.size;
316
+ }
317
+ de.prototype.clear = Mr;
318
+ de.prototype.delete = Dr;
319
+ de.prototype.get = Ur;
320
+ de.prototype.has = Nr;
321
+ de.prototype.set = Br;
322
+ function Fr(e, t) {
323
+ for (var n = -1, o = e == null ? 0 : e.length, r = 0, a = []; ++n < o; ) {
324
+ var f = e[n];
325
+ t(f, n, e) && (a[r++] = f);
326
+ }
327
+ return a;
328
+ }
329
+ function Hr() {
330
+ return [];
331
+ }
332
+ var Kr = Object.prototype, zr = Kr.propertyIsEnumerable, Et = Object.getOwnPropertySymbols, qr = Et ? function(e) {
333
+ return e == null ? [] : (e = Object(e), Fr(Et(e), function(t) {
334
+ return zr.call(e, t);
335
+ }));
336
+ } : Hr;
337
+ function Wr(e, t, n) {
338
+ var o = t(e);
339
+ return Be(e) ? o : Lr(o, n(e));
340
+ }
341
+ function Ct(e) {
342
+ return Wr(e, ur, qr);
343
+ }
344
+ var lt = Se(ie, "DataView"), st = Se(ie, "Promise"), dt = Se(ie, "Set"), It = "[object Map]", Gr = "[object Object]", Rt = "[object Promise]", kt = "[object Set]", Ot = "[object WeakMap]", xt = "[object DataView]", Jr = _e(lt), Yr = _e(Oe), Qr = _e(st), Xr = _e(dt), Zr = _e(ot), se = Ae;
345
+ (lt && se(new lt(new ArrayBuffer(1))) != xt || Oe && se(new Oe()) != It || st && se(st.resolve()) != Rt || dt && se(new dt()) != kt || ot && se(new ot()) != Ot) && (se = function(e) {
346
+ var t = Ae(e), n = t == Gr ? e.constructor : void 0, o = n ? _e(n) : "";
347
+ if (o)
348
+ switch (o) {
349
+ case Jr:
350
+ return xt;
351
+ case Yr:
352
+ return It;
353
+ case Qr:
354
+ return Rt;
355
+ case Xr:
356
+ return kt;
357
+ case Zr:
358
+ return Ot;
359
+ }
360
+ return t;
361
+ });
362
+ var Pt = ie.Uint8Array, eo = "__lodash_hash_undefined__";
363
+ function to(e) {
364
+ return this.__data__.set(e, eo), this;
365
+ }
366
+ function no(e) {
367
+ return this.__data__.has(e);
368
+ }
369
+ function Fe(e) {
370
+ var t = -1, n = e == null ? 0 : e.length;
371
+ for (this.__data__ = new ge(); ++t < n; )
372
+ this.add(e[t]);
373
+ }
374
+ Fe.prototype.add = Fe.prototype.push = to;
375
+ Fe.prototype.has = no;
376
+ function io(e, t) {
377
+ for (var n = -1, o = e == null ? 0 : e.length; ++n < o; )
378
+ if (t(e[n], n, e))
379
+ return !0;
380
+ return !1;
381
+ }
382
+ function ro(e, t) {
383
+ return e.has(t);
384
+ }
385
+ var oo = 1, ao = 2;
386
+ function on(e, t, n, o, r, a) {
387
+ var f = n & oo, _ = e.length, s = t.length;
388
+ if (_ != s && !(f && s > _))
389
+ return !1;
390
+ var c = a.get(e), g = a.get(t);
391
+ if (c && g)
392
+ return c == t && g == e;
393
+ var v = -1, b = !0, w = n & ao ? new Fe() : void 0;
394
+ for (a.set(e, t), a.set(t, e); ++v < _; ) {
395
+ var l = e[v], S = t[v];
396
+ if (o)
397
+ var C = f ? o(S, l, v, t, e, a) : o(l, S, v, e, t, a);
398
+ if (C !== void 0) {
399
+ if (C)
400
+ continue;
401
+ b = !1;
402
+ break;
403
+ }
404
+ if (w) {
405
+ if (!io(t, function(R, d) {
406
+ if (!ro(w, d) && (l === R || r(l, R, n, o, a)))
407
+ return w.push(d);
408
+ })) {
409
+ b = !1;
410
+ break;
411
+ }
412
+ } else if (!(l === S || r(l, S, n, o, a))) {
413
+ b = !1;
414
+ break;
415
+ }
416
+ }
417
+ return a.delete(e), a.delete(t), b;
418
+ }
419
+ function lo(e) {
420
+ var t = -1, n = Array(e.size);
421
+ return e.forEach(function(o, r) {
422
+ n[++t] = [r, o];
423
+ }), n;
424
+ }
425
+ function so(e) {
426
+ var t = -1, n = Array(e.size);
427
+ return e.forEach(function(o) {
428
+ n[++t] = o;
429
+ }), n;
430
+ }
431
+ var uo = 1, co = 2, fo = "[object Boolean]", po = "[object Date]", mo = "[object Error]", _o = "[object Map]", go = "[object Number]", bo = "[object RegExp]", yo = "[object Set]", vo = "[object String]", ho = "[object Symbol]", To = "[object ArrayBuffer]", wo = "[object DataView]", At = we ? we.prototype : void 0, Ze = At ? At.valueOf : void 0;
432
+ function So(e, t, n, o, r, a, f) {
433
+ switch (n) {
434
+ case wo:
435
+ if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
436
+ return !1;
437
+ e = e.buffer, t = t.buffer;
438
+ case To:
439
+ return !(e.byteLength != t.byteLength || !a(new Pt(e), new Pt(t)));
440
+ case fo:
441
+ case po:
442
+ case go:
443
+ return Xt(+e, +t);
444
+ case mo:
445
+ return e.name == t.name && e.message == t.message;
446
+ case bo:
447
+ case vo:
448
+ return e == t + "";
449
+ case _o:
450
+ var _ = lo;
451
+ case yo:
452
+ var s = o & uo;
453
+ if (_ || (_ = so), e.size != t.size && !s)
454
+ return !1;
455
+ var c = f.get(e);
456
+ if (c)
457
+ return c == t;
458
+ o |= co, f.set(e, t);
459
+ var g = on(_(e), _(t), o, r, a, f);
460
+ return f.delete(e), g;
461
+ case ho:
462
+ if (Ze)
463
+ return Ze.call(e) == Ze.call(t);
464
+ }
465
+ return !1;
466
+ }
467
+ var Eo = 1, Co = Object.prototype, Io = Co.hasOwnProperty;
468
+ function Ro(e, t, n, o, r, a) {
469
+ var f = n & Eo, _ = Ct(e), s = _.length, c = Ct(t), g = c.length;
470
+ if (s != g && !f)
471
+ return !1;
472
+ for (var v = s; v--; ) {
473
+ var b = _[v];
474
+ if (!(f ? b in t : Io.call(t, b)))
475
+ return !1;
476
+ }
477
+ var w = a.get(e), l = a.get(t);
478
+ if (w && l)
479
+ return w == t && l == e;
480
+ var S = !0;
481
+ a.set(e, t), a.set(t, e);
482
+ for (var C = f; ++v < s; ) {
483
+ b = _[v];
484
+ var R = e[b], d = t[b];
485
+ if (o)
486
+ var I = f ? o(d, R, b, t, e, a) : o(R, d, b, e, t, a);
487
+ if (!(I === void 0 ? R === d || r(R, d, n, o, a) : I)) {
488
+ S = !1;
489
+ break;
490
+ }
491
+ C || (C = b == "constructor");
492
+ }
493
+ if (S && !C) {
494
+ var N = e.constructor, L = t.constructor;
495
+ N != L && "constructor" in e && "constructor" in t && !(typeof N == "function" && N instanceof N && typeof L == "function" && L instanceof L) && (S = !1);
496
+ }
497
+ return a.delete(e), a.delete(t), S;
498
+ }
499
+ var ko = 1, Vt = "[object Arguments]", $t = "[object Array]", De = "[object Object]", Oo = Object.prototype, Lt = Oo.hasOwnProperty;
500
+ function xo(e, t, n, o, r, a) {
501
+ var f = Be(e), _ = Be(t), s = f ? $t : se(e), c = _ ? $t : se(t);
502
+ s = s == Vt ? De : s, c = c == Vt ? De : c;
503
+ var g = s == De, v = c == De, b = s == c;
504
+ if (b && at(e)) {
505
+ if (!at(t))
506
+ return !1;
507
+ f = !0, g = !1;
508
+ }
509
+ if (b && !g)
510
+ return a || (a = new de()), f || rn(e) ? on(e, t, n, o, r, a) : So(e, t, s, n, o, r, a);
511
+ if (!(n & ko)) {
512
+ var w = g && Lt.call(e, "__wrapped__"), l = v && Lt.call(t, "__wrapped__");
513
+ if (w || l) {
514
+ var S = w ? e.value() : e, C = l ? t.value() : t;
515
+ return a || (a = new de()), r(S, C, n, o, a);
516
+ }
517
+ }
518
+ return b ? (a || (a = new de()), Ro(e, t, n, o, r, a)) : !1;
519
+ }
520
+ function an(e, t, n, o, r) {
521
+ return e === t ? !0 : e == null || t == null || !Re(e) && !Re(t) ? e !== e && t !== t : xo(e, t, n, o, an, r);
522
+ }
523
+ function Po(e, t) {
524
+ return an(e, t);
525
+ }
526
+ var j = [];
527
+ for (var et = 0; et < 256; ++et)
528
+ j.push((et + 256).toString(16).slice(1));
529
+ function Ao(e, t = 0) {
530
+ return (j[e[t + 0]] + j[e[t + 1]] + j[e[t + 2]] + j[e[t + 3]] + "-" + j[e[t + 4]] + j[e[t + 5]] + "-" + j[e[t + 6]] + j[e[t + 7]] + "-" + j[e[t + 8]] + j[e[t + 9]] + "-" + j[e[t + 10]] + j[e[t + 11]] + j[e[t + 12]] + j[e[t + 13]] + j[e[t + 14]] + j[e[t + 15]]).toLowerCase();
531
+ }
532
+ var Ue, Vo = new Uint8Array(16);
533
+ function $o() {
534
+ if (!Ue && (Ue = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ue))
535
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
536
+ return Ue(Vo);
537
+ }
538
+ var Lo = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
539
+ const Mt = {
540
+ randomUUID: Lo
541
+ };
542
+ function Mo(e, t, n) {
543
+ if (Mt.randomUUID && !t && !e)
544
+ return Mt.randomUUID();
545
+ e = e || {};
546
+ var o = e.random || (e.rng || $o)();
547
+ return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Ao(o);
548
+ }
549
+ const ln = {
550
+ ip: "127.0.0.1",
551
+ port: 6379
552
+ }, sn = {
553
+ host: "127.0.0.1",
554
+ port: 6379
555
+ }, mt = y.HOST_PORT_CE, dn = {
556
+ port: 6379,
557
+ host: "127.0.0.1",
558
+ database: 0,
559
+ username: "",
560
+ password: "",
561
+ ssl: !1,
562
+ ssl_verify: !1,
563
+ server_name: "",
564
+ connect_timeout: 2e3,
565
+ send_timeout: 2e3,
566
+ read_timeout: 2e3,
567
+ sentinel_username: "",
568
+ sentinel_password: "",
569
+ keepalive_pool_size: 256,
570
+ keepalive_backlog: 0,
571
+ sentinel_master: "",
572
+ sentinel_nodes: [],
573
+ cluster_nodes: [],
574
+ cluster_max_redirections: 0,
575
+ connection_is_proxied: !1,
576
+ timeout: 2e3
577
+ }, Ka = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
578
+ __proto__: null,
579
+ DEFAULT_CLUSTER_NODE: ln,
580
+ DEFAULT_FIELDS: dn,
581
+ DEFAULT_REDIS_TYPE: mt,
582
+ DEFAULT_SENTINEL_NODE: sn
583
+ }, Symbol.toStringTag, { value: "Module" })), xe = (e) => ({ ...e, id: Mo() }), ut = (e) => {
584
+ const { id: t, ...n } = e;
585
+ return n;
586
+ }, un = () => xe(sn), cn = () => xe(ln), We = (e) => {
587
+ var t, n;
588
+ return e.type === ne.REDIS_CE ? y.HOST_PORT_CE : (t = e.config.sentinel_nodes) != null && t.length ? y.SENTINEL : (n = e.config.cluster_nodes) != null && n.length ? y.CLUSTER : y.HOST_PORT_EE;
589
+ }, ct = (e) => e === y.HOST_PORT_CE ? ne.REDIS_CE : ne.REDIS_EE, T = {
590
+ int(e, t) {
591
+ return e == null ? t : parseInt(e.toString(), 10);
592
+ },
593
+ str(e, t) {
594
+ return e == null || e === "" ? t : e.toString();
595
+ },
596
+ removeIdClusterNodes(e) {
597
+ return e.map((t) => ({
598
+ ...ut(t),
599
+ port: T.int(t.port)
600
+ }));
601
+ },
602
+ removeIdFromSentinelNodes(e) {
603
+ return e.map((t) => ({
604
+ ...ut(t),
605
+ port: T.int(t.port)
606
+ }));
607
+ },
608
+ addIdToClusterNodes(e) {
609
+ return e.map(xe);
610
+ },
611
+ addIdToSentinelNodes(e) {
612
+ return e.map(xe);
613
+ },
614
+ removeNullValues(e) {
615
+ const t = { ...e };
616
+ for (const n in t)
617
+ t[n] === null && delete t[n];
618
+ return t;
619
+ }
620
+ }, za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
621
+ __proto__: null,
622
+ genDefaultClusterNode: cn,
623
+ genDefaultSentinelNode: un,
624
+ getRedisType: We,
625
+ mapRedisTypeToPartialType: ct,
626
+ shallowCopyWithId: xe,
627
+ shallowCopyWithoutId: ut,
628
+ standardize: T
629
+ }, Symbol.toStringTag, { value: "Module" })), Ne = "/v2/control-planes/{controlPlaneId}/core-entities", je = "/{workspace}", Pe = {
630
+ list: {
631
+ konnect: `${Ne}/partials`,
632
+ kongManager: `${je}/partials`
633
+ },
634
+ form: {
635
+ konnect: {
636
+ create: `${Ne}/partials`,
637
+ edit: `${Ne}/partials/{id}`
638
+ },
639
+ kongManager: {
640
+ create: `${je}/partials`,
641
+ edit: `${je}/partials/{id}`
642
+ }
643
+ },
644
+ links: {
645
+ konnect: `${Ne}/partials/{id}/links`,
646
+ kongManager: `${je}/partials/{id}/links`
647
+ }
648
+ }, Do = (e) => {
649
+ const { partialId: t, config: n, defaultRedisType: o = mt } = e, r = !!t, { axiosInstance: a } = pt(n.axiosRequestConfig), { getMessageFromError: f } = Rn(), _ = H(() => t ? Ye.Edit : Ye.Create), s = Nt({
650
+ fields: {
651
+ name: "",
652
+ type: ct(o),
653
+ config: JSON.parse(JSON.stringify(dn))
654
+ },
655
+ readonly: !1,
656
+ errorMessage: ""
657
+ }), c = $(), g = $(o), v = H(() => g.value === y.HOST_PORT_EE || g.value === y.CLUSTER || g.value === y.SENTINEL);
658
+ Ie(g, (d) => {
659
+ s.fields.type = ct(d);
660
+ });
661
+ const b = H(() => {
662
+ var I;
663
+ if (r && Po(c.value, w.value) || !s.fields.name.length)
664
+ return !1;
665
+ const { config: d } = s.fields;
666
+ switch (g.value) {
667
+ case y.HOST_PORT_CE:
668
+ case y.HOST_PORT_EE:
669
+ return !!d.host && d.host.length > 0 && !!d.port && d.port > 0;
670
+ case y.CLUSTER:
671
+ return !!d.cluster_nodes.length && d.cluster_nodes.every((N) => N.ip.length > 0);
672
+ case y.SENTINEL:
673
+ return !!d.sentinel_nodes.length && d.sentinel_nodes.every((N) => N.host.length > 0) && !!((I = d.sentinel_master) != null && I.length) && d.sentinel_role && !!d.sentinel_role.length;
674
+ default:
675
+ throw new Error("Invalid redis type");
676
+ }
677
+ }), w = H(() => {
678
+ switch (g.value) {
679
+ case y.HOST_PORT_CE:
680
+ return {
681
+ name: s.fields.name,
682
+ type: s.fields.type,
683
+ config: {
684
+ host: s.fields.config.host,
685
+ port: T.int(s.fields.config.port),
686
+ timeout: T.int(s.fields.config.timeout),
687
+ username: T.str(s.fields.config.username, null),
688
+ database: T.int(s.fields.config.database),
689
+ password: T.str(s.fields.config.password, null),
690
+ ssl: s.fields.config.ssl,
691
+ ssl_verify: s.fields.config.ssl_verify,
692
+ server_name: T.str(s.fields.config.server_name, null)
693
+ }
694
+ };
695
+ case y.HOST_PORT_EE:
696
+ return {
697
+ name: s.fields.name,
698
+ type: s.fields.type,
699
+ config: {
700
+ connect_timeout: T.int(s.fields.config.connect_timeout),
701
+ connection_is_proxied: s.fields.config.connection_is_proxied,
702
+ database: T.int(s.fields.config.database),
703
+ host: s.fields.config.host,
704
+ keepalive_backlog: T.int(s.fields.config.keepalive_backlog),
705
+ keepalive_pool_size: T.int(s.fields.config.keepalive_pool_size),
706
+ password: T.str(s.fields.config.password, null),
707
+ port: T.int(s.fields.config.port),
708
+ read_timeout: T.int(s.fields.config.read_timeout),
709
+ send_timeout: T.int(s.fields.config.send_timeout),
710
+ server_name: T.str(s.fields.config.server_name, null),
711
+ ssl_verify: s.fields.config.ssl_verify,
712
+ ssl: s.fields.config.ssl,
713
+ username: T.str(s.fields.config.username, null),
714
+ // reset other EE fields
715
+ cluster_nodes: null,
716
+ cluster_max_redirections: null,
717
+ sentinel_master: null,
718
+ sentinel_role: null,
719
+ sentinel_nodes: null,
720
+ sentinel_username: null,
721
+ sentinel_password: null
722
+ }
723
+ };
724
+ case y.CLUSTER:
725
+ return {
726
+ name: s.fields.name,
727
+ type: s.fields.type,
728
+ config: {
729
+ cluster_nodes: T.removeIdClusterNodes(s.fields.config.cluster_nodes),
730
+ cluster_max_redirections: T.int(s.fields.config.cluster_max_redirections),
731
+ username: T.str(s.fields.config.username, null),
732
+ password: T.str(s.fields.config.password, null),
733
+ ssl: s.fields.config.ssl,
734
+ ssl_verify: s.fields.config.ssl_verify,
735
+ server_name: T.str(s.fields.config.server_name, null),
736
+ connect_timeout: T.int(s.fields.config.connect_timeout),
737
+ database: T.int(s.fields.config.database),
738
+ send_timeout: T.int(s.fields.config.send_timeout),
739
+ read_timeout: T.int(s.fields.config.read_timeout),
740
+ keepalive_pool_size: T.int(s.fields.config.keepalive_pool_size),
741
+ keepalive_backlog: T.int(s.fields.config.keepalive_backlog),
742
+ // reset other EE fields
743
+ connection_is_proxied: null,
744
+ sentinel_master: null,
745
+ sentinel_role: null,
746
+ sentinel_nodes: null,
747
+ sentinel_username: null,
748
+ sentinel_password: null,
749
+ host: null,
750
+ port: null
751
+ }
752
+ };
753
+ case y.SENTINEL:
754
+ return {
755
+ name: s.fields.name,
756
+ type: s.fields.type,
757
+ config: {
758
+ sentinel_master: T.str(s.fields.config.sentinel_master, null),
759
+ sentinel_nodes: T.removeIdFromSentinelNodes(s.fields.config.sentinel_nodes),
760
+ sentinel_role: T.str(s.fields.config.sentinel_role, null),
761
+ sentinel_username: T.str(s.fields.config.sentinel_username, null),
762
+ sentinel_password: T.str(s.fields.config.sentinel_password, null),
763
+ username: T.str(s.fields.config.username, null),
764
+ password: T.str(s.fields.config.password, null),
765
+ ssl: s.fields.config.ssl,
766
+ ssl_verify: s.fields.config.ssl_verify,
767
+ server_name: T.str(s.fields.config.server_name, null),
768
+ database: T.int(s.fields.config.database),
769
+ connect_timeout: T.int(s.fields.config.connect_timeout),
770
+ send_timeout: T.int(s.fields.config.send_timeout),
771
+ read_timeout: T.int(s.fields.config.read_timeout),
772
+ keepalive_pool_size: T.int(s.fields.config.keepalive_pool_size),
773
+ keepalive_backlog: T.int(s.fields.config.keepalive_backlog),
774
+ // reset other EE fields
775
+ connection_is_proxied: null,
776
+ cluster_nodes: null,
777
+ cluster_max_redirections: null,
778
+ host: null,
779
+ port: null
780
+ }
781
+ };
782
+ default:
783
+ throw new Error("Invalid redis type");
784
+ }
785
+ }), l = H(() => {
786
+ let d = `${n.apiBaseUrl}${Pe.form[n.app][_.value]}`;
787
+ return n.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, (n == null ? void 0 : n.controlPlaneId) || "") : n.app === "kongManager" && (d = d.replace(/\/{workspace}/gi, n != null && n.workspace ? `/${n.workspace}` : "")), d = d.replace(/{id}/gi, t || ""), d;
788
+ }), S = H(() => {
789
+ var d;
790
+ return (d = Pe.form[n == null ? void 0 : n.app]) == null ? void 0 : d.edit;
791
+ });
792
+ return {
793
+ form: s,
794
+ canSubmit: b,
795
+ payload: w,
796
+ isEdit: r,
797
+ redisType: g,
798
+ redisTypeIsEnterprise: v,
799
+ formType: _,
800
+ fetchUrl: S,
801
+ submit: async () => {
802
+ try {
803
+ return s.readonly = !0, s.errorMessage = "", _.value === Ye.Create ? await a.post(l.value, w.value) : await a.patch(l.value, w.value);
804
+ } catch (d) {
805
+ throw s.errorMessage = f(d), s.readonly = !1, d;
806
+ }
807
+ },
808
+ setInitialFormValues: (d) => {
809
+ s.fields.config = Object.assign(
810
+ {},
811
+ s.fields.config,
812
+ T.removeNullValues(d.config)
813
+ // remove null values if data, so they can be replaced with default values
814
+ ), s.fields.config.sentinel_nodes = T.addIdToSentinelNodes(d.config.sentinel_nodes ?? []), s.fields.config.cluster_nodes = T.addIdToClusterNodes(d.config.cluster_nodes ?? []), s.fields.name = d.name, s.fields.type = d.type, g.value = We(d), c.value = JSON.parse(JSON.stringify(w.value));
815
+ }
816
+ };
817
+ }, Uo = { class: "array-card-container" }, No = /* @__PURE__ */ Y({
818
+ __name: "FieldArrayCardContainer",
819
+ props: {
820
+ model: {
821
+ type: Object,
822
+ default: () => null
823
+ },
824
+ schema: {
825
+ type: Object,
826
+ default: () => null
827
+ },
828
+ index: {
829
+ type: Number,
830
+ default: void 0
831
+ },
832
+ disabled: {
833
+ type: Boolean,
834
+ default: !1
835
+ }
836
+ },
837
+ emits: ["remove-item"],
838
+ setup(e) {
839
+ return (t, n) => {
840
+ const o = D("KCard"), r = D("KButton");
841
+ return k(), q("div", Uo, [
842
+ p(o, { class: "card" }, {
843
+ default: h(() => [
844
+ yn(t.$slots, "default", {}, void 0, !0)
845
+ ]),
846
+ _: 3
847
+ }),
848
+ p(r, {
849
+ appearance: "tertiary",
850
+ class: "array-card-remove-button",
851
+ disabled: e.disabled,
852
+ onClick: n[0] || (n[0] = (a) => t.$emit("remove-item"))
853
+ }, {
854
+ default: h(() => [
855
+ p(i(Un))
856
+ ]),
857
+ _: 1
858
+ }, 8, ["disabled"])
859
+ ]);
860
+ };
861
+ }
862
+ }), oe = (e, t) => {
863
+ const n = e.__vccOpts || e;
864
+ for (const [o, r] of t)
865
+ n[o] = r;
866
+ return n;
867
+ }, fn = /* @__PURE__ */ oe(No, [["__scopeId", "data-v-a2c96337"]]), jo = {
868
+ create: "New Redis Configuration",
869
+ copy_id: "Copy ID",
870
+ copy_json: "Copy JSON",
871
+ edit: "Edit",
872
+ delete: "Delete",
873
+ done: "Done",
874
+ view: "View Details",
875
+ loading: "Loading...",
876
+ view_plugin: "View Plugin",
877
+ close: "Close"
878
+ }, Bo = {
879
+ placeholder: "Filter by name",
880
+ no_results: "No results found"
881
+ }, Fo = {
882
+ copy: "Failed to copy to clipboard",
883
+ general: "Redis configuration could not be retrieved",
884
+ delete: "The redis configuration could not be deleted at this time."
885
+ }, Ho = {
886
+ success: "Copied {val} to clipboard"
887
+ }, Ko = {
888
+ sections: {
889
+ type: {
890
+ title: "Redis type",
891
+ 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."
892
+ },
893
+ general: {
894
+ title: "General information",
895
+ description: "Name your Redis configuration."
896
+ },
897
+ connection: {
898
+ title: "Connection settings",
899
+ description: "Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."
900
+ },
901
+ cluster: {
902
+ title: "Cluster configuration",
903
+ description: "Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."
904
+ },
905
+ tls: {
906
+ title: "TLS settings",
907
+ description: "Configure secure connections to Redis, including SSL and verification options."
908
+ },
909
+ keepalive: {
910
+ title: "Keepalive configuration",
911
+ description: "Keepalive reuses active connections to Redis, improving performance and efficiency."
912
+ },
913
+ read_write_configuration: {
914
+ title: "Read/Write configuration",
915
+ description: "Set timeouts for reading from and writing to the Redis server to control data transmission reliability."
916
+ },
917
+ sentinel_configuration: {
918
+ title: "Sentinel configuration",
919
+ description: "Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."
920
+ }
921
+ },
922
+ fields: {
923
+ type: {
924
+ label: "Redis type"
925
+ },
926
+ name: {
927
+ label: "Name",
928
+ placeholder: "Enter unique name"
929
+ },
930
+ host: {
931
+ label: "Host",
932
+ tooltip: "A string representing a host name, such as example.com."
933
+ },
934
+ port: {
935
+ label: "Port",
936
+ tooltip: "An integer representing a port number between 0 and 65535, inclusive."
937
+ },
938
+ database: {
939
+ label: "Database",
940
+ tooltip: "Database to use for the Redis connection."
941
+ },
942
+ password: {
943
+ label: "Password",
944
+ tooltip: "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."
945
+ },
946
+ username: {
947
+ label: "Username",
948
+ 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`."
949
+ },
950
+ ssl: {
951
+ label: "SSL",
952
+ description: "If set to true, uses SSL to connect to Redis.",
953
+ tooltip: "If set to true, uses SSL to connect to Redis."
954
+ },
955
+ ssl_verify: {
956
+ label: "SSL Verify",
957
+ 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.",
958
+ 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."
959
+ },
960
+ server_name: {
961
+ label: "Server name",
962
+ tooltip: "A string representing an SNI (server name indication) value for TLS."
963
+ },
964
+ keepalive_backlog: {
965
+ label: "Keepalive backlog",
966
+ 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`."
967
+ },
968
+ keepalive_pool_size: {
969
+ label: "Keepalive pool size",
970
+ 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."
971
+ },
972
+ read_timeout: {
973
+ label: "Read timeout",
974
+ tooltip: "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."
975
+ },
976
+ send_timeout: {
977
+ label: "Send timeout",
978
+ tooltip: "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."
979
+ },
980
+ connect_timeout: {
981
+ label: "Connect timeout",
982
+ tooltip: "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."
983
+ },
984
+ sentinel_master: {
985
+ label: "Sentinel master",
986
+ tooltip: "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."
987
+ },
988
+ sentinel_role: {
989
+ label: "Sentinel role",
990
+ tooltip: "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."
991
+ },
992
+ sentinel_username: {
993
+ label: "Sentinel username",
994
+ tooltip: "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."
995
+ },
996
+ sentinel_password: {
997
+ label: "Sentinel password",
998
+ tooltip: "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."
999
+ },
1000
+ cluster_node_ip: {
1001
+ label: "IP",
1002
+ tooltip: "A string representing a host name, such as example.com."
1003
+ },
1004
+ cluster_node_port: {
1005
+ label: "Port",
1006
+ tooltip: "An integer representing a port number between 0 and 65535, inclusive."
1007
+ },
1008
+ cluster_max_redirections: {
1009
+ label: "Cluster max redirections",
1010
+ tooltip: "Maximum retry attempts for redirection."
1011
+ },
1012
+ timeout: {
1013
+ label: "Timeout",
1014
+ tooltip: "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"
1015
+ },
1016
+ connection_is_proxied: {
1017
+ label: "Connection is proxied",
1018
+ 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."
1019
+ },
1020
+ cluster_nodes: {
1021
+ title: "Cluster nodes",
1022
+ 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.",
1023
+ add_button: "New item"
1024
+ },
1025
+ sentinel_nodes: {
1026
+ title: "Sentinel nodes",
1027
+ 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.",
1028
+ add_button: "New item"
1029
+ },
1030
+ sentinel_node_host: {
1031
+ label: "Host",
1032
+ tooltip: "A string representing a host name, such as example.com."
1033
+ },
1034
+ sentinel_node_port: {
1035
+ label: "Port",
1036
+ tooltip: "An integer representing a port number between 0 and 65535, inclusive."
1037
+ }
1038
+ },
1039
+ options: {
1040
+ type: {
1041
+ host_port: "Host/Port",
1042
+ cluster: "Cluster",
1043
+ sentinel: "Sentinel",
1044
+ open_source: "Open Source",
1045
+ enterprise: "Enterprise",
1046
+ suffix_open_source: " (Open Source)",
1047
+ suffix_enterprise: " (Enterprise)"
1048
+ },
1049
+ sentinel_role: {
1050
+ master: "master",
1051
+ slave: "slave",
1052
+ any: "any"
1053
+ }
1054
+ },
1055
+ edit_warning_modal: {
1056
+ title: "Edit Redis configuration",
1057
+ description: "This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",
1058
+ plugin_count: "{count} plugin(s)",
1059
+ confirm: "Confirm"
1060
+ }
1061
+ }, zo = {
1062
+ title: "Associated plugins ({count})",
1063
+ headers: {
1064
+ plugin: "Plugin",
1065
+ instance_name: "Name"
1066
+ }
1067
+ }, qo = {
1068
+ title: "Redis Configurations",
1069
+ empty_state: {
1070
+ title: "Configure a Redis Configuration",
1071
+ description: "Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."
1072
+ }
1073
+ }, Wo = {
1074
+ action: "New configuration",
1075
+ table_headers: {
1076
+ name: "Name",
1077
+ type: "Type",
1078
+ plugins: "Plugins"
1079
+ },
1080
+ empty_state: {
1081
+ description: "Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",
1082
+ feature_1: {
1083
+ title: "Store your Redis configurations",
1084
+ description: "Define a Redis configuration once and use it across multiple plugins."
1085
+ },
1086
+ feature_2: {
1087
+ title: "Sync across plugins",
1088
+ description: "Edits to your configuration will be cascaded automatically to all associated plugins."
1089
+ }
1090
+ }
1091
+ }, Go = {
1092
+ actions: jo,
1093
+ search: Bo,
1094
+ delete: {
1095
+ title: "Delete Redis configuration",
1096
+ description: "You’re about to delete this item. Are you sure you want to proceed?",
1097
+ warning: "To delete this configuration, first remove it from all associated plugins."
1098
+ },
1099
+ errors: Fo,
1100
+ copy: Ho,
1101
+ form: Ko,
1102
+ linked_plugins_modal: zo,
1103
+ redis: qo,
1104
+ list: Wo
1105
+ };
1106
+ function Jo() {
1107
+ const e = Bn("en-us", Go);
1108
+ return {
1109
+ i18n: e,
1110
+ i18nT: Fn(e)
1111
+ // Translation component <i18n-t>
1112
+ };
1113
+ }
1114
+ const ue = {
1115
+ useI18n: Jo
1116
+ }, Yo = { class: "cluster-node-items" }, Qo = /* @__PURE__ */ Y({
1117
+ __name: "ClusterNodes",
1118
+ props: /* @__PURE__ */ jt({
1119
+ readonly: { type: Boolean }
1120
+ }, {
1121
+ modelValue: { required: !0 },
1122
+ modelModifiers: {}
1123
+ }),
1124
+ emits: ["update:modelValue"],
1125
+ setup(e) {
1126
+ const t = Bt(e, "modelValue"), { i18n: { t: n } } = ue.useI18n(), o = () => {
1127
+ t.value.push(cn());
1128
+ }, r = (a) => {
1129
+ t.value.splice(a, 1);
1130
+ };
1131
+ return (a, f) => {
1132
+ const _ = D("KLabel"), s = D("KInput"), c = D("KButton");
1133
+ return k(), q("div", null, [
1134
+ p(_, {
1135
+ class: "required",
1136
+ info: i(n)("form.fields.cluster_nodes.tooltip"),
1137
+ "tooltip-attributes": { maxWidth: "400" }
1138
+ }, {
1139
+ default: h(() => [
1140
+ Z(B(i(n)("form.fields.cluster_nodes.title")), 1)
1141
+ ]),
1142
+ _: 1
1143
+ }, 8, ["info"]),
1144
+ K("div", null, [
1145
+ (k(!0), q(Ke, null, ft(t.value, (g, v) => (k(), F(fn, {
1146
+ key: `${v}`,
1147
+ "data-testid": "redis-cluster-nodes",
1148
+ disabled: a.readonly,
1149
+ onRemoveItem: (b) => r(v)
1150
+ }, {
1151
+ default: h(() => [
1152
+ K("div", Yo, [
1153
+ p(s, {
1154
+ modelValue: g.ip,
1155
+ "onUpdate:modelValue": (b) => g.ip = b,
1156
+ modelModifiers: { trim: !0 },
1157
+ label: i(n)("form.fields.cluster_node_ip.label"),
1158
+ "label-attributes": {
1159
+ info: i(n)("form.fields.cluster_node_ip.tooltip"),
1160
+ tooltipAttributes: { maxWidth: "400" }
1161
+ },
1162
+ name: "ip",
1163
+ readonly: a.readonly,
1164
+ required: ""
1165
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "label-attributes", "readonly"]),
1166
+ p(s, {
1167
+ modelValue: g.port,
1168
+ "onUpdate:modelValue": (b) => g.port = b,
1169
+ label: i(n)("form.fields.cluster_node_port.label"),
1170
+ "label-attributes": {
1171
+ info: i(n)("form.fields.cluster_node_port.tooltip"),
1172
+ tooltipAttributes: { maxWidth: "400" }
1173
+ },
1174
+ name: "port",
1175
+ readonly: a.readonly,
1176
+ type: "number"
1177
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "label-attributes", "readonly"])
1178
+ ])
1179
+ ]),
1180
+ _: 2
1181
+ }, 1032, ["disabled", "onRemoveItem"]))), 128)),
1182
+ p(c, {
1183
+ appearance: "tertiary",
1184
+ "data-testid": "redis-add-cluster-node-button",
1185
+ disabled: a.readonly,
1186
+ onClick: o
1187
+ }, {
1188
+ default: h(() => [
1189
+ p(i(qt)),
1190
+ K("span", null, B(i(n)("form.fields.cluster_nodes.add_button")), 1)
1191
+ ]),
1192
+ _: 1
1193
+ }, 8, ["disabled"])
1194
+ ])
1195
+ ]);
1196
+ };
1197
+ }
1198
+ }), Xo = /* @__PURE__ */ oe(Qo, [["__scopeId", "data-v-7c2d61b0"]]), Zo = { class: "sentinel-node-items" }, ea = /* @__PURE__ */ Y({
1199
+ __name: "SentinelNodes",
1200
+ props: /* @__PURE__ */ jt({
1201
+ readonly: { type: Boolean }
1202
+ }, {
1203
+ modelValue: { required: !0 },
1204
+ modelModifiers: {}
1205
+ }),
1206
+ emits: ["update:modelValue"],
1207
+ setup(e) {
1208
+ const t = Bt(e, "modelValue"), { i18n: { t: n } } = ue.useI18n(), o = () => {
1209
+ t.value.push(un());
1210
+ }, r = (a) => {
1211
+ t.value.splice(a, 1);
1212
+ };
1213
+ return (a, f) => {
1214
+ const _ = D("KLabel"), s = D("KInput"), c = D("KButton");
1215
+ return k(), q("div", null, [
1216
+ p(_, {
1217
+ class: "required",
1218
+ info: i(n)("form.fields.sentinel_nodes.tooltip"),
1219
+ "tooltip-attributes": { maxWidth: "400" }
1220
+ }, {
1221
+ default: h(() => [
1222
+ Z(B(i(n)("form.fields.sentinel_nodes.title")), 1)
1223
+ ]),
1224
+ _: 1
1225
+ }, 8, ["info"]),
1226
+ K("div", null, [
1227
+ (k(!0), q(Ke, null, ft(t.value, (g, v) => (k(), F(fn, {
1228
+ key: g.id,
1229
+ "data-testid": "redis-sentinel-nodes",
1230
+ disabled: a.readonly,
1231
+ onRemoveItem: (b) => r(v)
1232
+ }, {
1233
+ default: h(() => [
1234
+ K("div", Zo, [
1235
+ p(s, {
1236
+ modelValue: g.host,
1237
+ "onUpdate:modelValue": (b) => g.host = b,
1238
+ modelModifiers: { trim: !0 },
1239
+ label: i(n)("form.fields.sentinel_node_host.label"),
1240
+ "label-attributes": {
1241
+ info: i(n)("form.fields.sentinel_node_host.tooltip"),
1242
+ tooltipAttributes: { maxWidth: "400" }
1243
+ },
1244
+ name: "host",
1245
+ readonly: a.readonly,
1246
+ required: ""
1247
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "label-attributes", "readonly"]),
1248
+ p(s, {
1249
+ modelValue: g.port,
1250
+ "onUpdate:modelValue": (b) => g.port = b,
1251
+ label: i(n)("form.fields.sentinel_node_port.label"),
1252
+ "label-attributes": {
1253
+ info: i(n)("form.fields.sentinel_node_port.tooltip"),
1254
+ tooltipAttributes: { maxWidth: "400" }
1255
+ },
1256
+ name: "port",
1257
+ readonly: a.readonly,
1258
+ type: "number"
1259
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "label-attributes", "readonly"])
1260
+ ])
1261
+ ]),
1262
+ _: 2
1263
+ }, 1032, ["disabled", "onRemoveItem"]))), 128)),
1264
+ p(c, {
1265
+ appearance: "tertiary",
1266
+ "data-testid": "redis-add-sentinel-node-button",
1267
+ disabled: a.readonly,
1268
+ onClick: o
1269
+ }, {
1270
+ default: h(() => [
1271
+ p(i(qt)),
1272
+ K("span", null, B(i(n)("form.fields.sentinel_nodes.add_button")), 1)
1273
+ ]),
1274
+ _: 1
1275
+ }, 8, ["disabled"])
1276
+ ])
1277
+ ]);
1278
+ };
1279
+ }
1280
+ }), ta = /* @__PURE__ */ oe(ea, [["__scopeId", "data-v-c7c67147"]]);
1281
+ var tt = /* @__PURE__ */ new WeakMap(), Dt = 0;
1282
+ function na(e) {
1283
+ if (!e.length)
1284
+ return "";
1285
+ for (var t = "arg", n = 0; n < e.length; ++n) {
1286
+ var o = void 0;
1287
+ e[n] === null || typeof e[n] != "object" && typeof e[n] != "function" ? typeof e[n] == "string" ? o = '"' + e[n] + '"' : o = String(e[n]) : tt.has(e[n]) ? o = tt.get(e[n]) : (o = Dt, tt.set(e[n], Dt++)), t += "@" + o;
1288
+ }
1289
+ return t;
1290
+ }
1291
+ function ia(e) {
1292
+ if (typeof e == "function")
1293
+ try {
1294
+ e = e();
1295
+ } catch {
1296
+ e = "";
1297
+ }
1298
+ return Array.isArray(e) ? e = na(e) : e = String(e || ""), e;
1299
+ }
1300
+ var _t = (
1301
+ /** @class */
1302
+ function() {
1303
+ function e(t) {
1304
+ t === void 0 && (t = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = t;
1305
+ }
1306
+ return e.prototype.serializeKey = function(t) {
1307
+ return ia(t);
1308
+ }, e.prototype.get = function(t) {
1309
+ var n = this.serializeKey(t);
1310
+ return this.items.get(n);
1311
+ }, e.prototype.set = function(t, n, o) {
1312
+ var r = this.serializeKey(t), a = o || this.ttl, f = Date.now(), _ = {
1313
+ data: n,
1314
+ createdAt: f,
1315
+ expiresAt: a ? f + a : 1 / 0
1316
+ };
1317
+ this.dispatchExpire(a, _, r), this.items.set(r, _);
1318
+ }, e.prototype.dispatchExpire = function(t, n, o) {
1319
+ var r = this;
1320
+ t && setTimeout(function() {
1321
+ var a = Date.now(), f = a >= n.expiresAt;
1322
+ f && r.delete(o);
1323
+ }, t);
1324
+ }, e.prototype.delete = function(t) {
1325
+ this.items.delete(t);
1326
+ }, e;
1327
+ }()
1328
+ );
1329
+ function ra() {
1330
+ return typeof navigator.onLine < "u" ? navigator.onLine : !0;
1331
+ }
1332
+ function oa() {
1333
+ return typeof document < "u" && typeof document.visibilityState < "u" ? document.visibilityState !== "hidden" : !0;
1334
+ }
1335
+ var aa = function(e) {
1336
+ return fetch(e).then(function(t) {
1337
+ return t.json();
1338
+ });
1339
+ };
1340
+ const nt = {
1341
+ isOnline: ra,
1342
+ isDocumentVisible: oa,
1343
+ fetcher: aa
1344
+ };
1345
+ var te = function() {
1346
+ return te = Object.assign || function(e) {
1347
+ for (var t, n = 1, o = arguments.length; n < o; n++) {
1348
+ t = arguments[n];
1349
+ for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
1350
+ }
1351
+ return e;
1352
+ }, te.apply(this, arguments);
1353
+ }, he = function(e, t, n, o) {
1354
+ function r(a) {
1355
+ return a instanceof n ? a : new n(function(f) {
1356
+ f(a);
1357
+ });
1358
+ }
1359
+ return new (n || (n = Promise))(function(a, f) {
1360
+ function _(g) {
1361
+ try {
1362
+ c(o.next(g));
1363
+ } catch (v) {
1364
+ f(v);
1365
+ }
1366
+ }
1367
+ function s(g) {
1368
+ try {
1369
+ c(o.throw(g));
1370
+ } catch (v) {
1371
+ f(v);
1372
+ }
1373
+ }
1374
+ function c(g) {
1375
+ g.done ? a(g.value) : r(g.value).then(_, s);
1376
+ }
1377
+ c((o = o.apply(e, t || [])).next());
1378
+ });
1379
+ }, Te = function(e, t) {
1380
+ var n = { label: 0, sent: function() {
1381
+ if (a[0] & 1) throw a[1];
1382
+ return a[1];
1383
+ }, trys: [], ops: [] }, o, r, a, f;
1384
+ return f = { next: _(0), throw: _(1), return: _(2) }, typeof Symbol == "function" && (f[Symbol.iterator] = function() {
1385
+ return this;
1386
+ }), f;
1387
+ function _(c) {
1388
+ return function(g) {
1389
+ return s([c, g]);
1390
+ };
1391
+ }
1392
+ function s(c) {
1393
+ if (o) throw new TypeError("Generator is already executing.");
1394
+ for (; n; ) try {
1395
+ if (o = 1, r && (a = c[0] & 2 ? r.return : c[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, c[1])).done) return a;
1396
+ switch (r = 0, a && (c = [c[0] & 2, a.value]), c[0]) {
1397
+ case 0:
1398
+ case 1:
1399
+ a = c;
1400
+ break;
1401
+ case 4:
1402
+ return n.label++, { value: c[1], done: !1 };
1403
+ case 5:
1404
+ n.label++, r = c[1], c = [0];
1405
+ continue;
1406
+ case 7:
1407
+ c = n.ops.pop(), n.trys.pop();
1408
+ continue;
1409
+ default:
1410
+ if (a = n.trys, !(a = a.length > 0 && a[a.length - 1]) && (c[0] === 6 || c[0] === 2)) {
1411
+ n = 0;
1412
+ continue;
1413
+ }
1414
+ if (c[0] === 3 && (!a || c[1] > a[0] && c[1] < a[3])) {
1415
+ n.label = c[1];
1416
+ break;
1417
+ }
1418
+ if (c[0] === 6 && n.label < a[1]) {
1419
+ n.label = a[1], a = c;
1420
+ break;
1421
+ }
1422
+ if (a && n.label < a[2]) {
1423
+ n.label = a[2], n.ops.push(c);
1424
+ break;
1425
+ }
1426
+ a[2] && n.ops.pop(), n.trys.pop();
1427
+ continue;
1428
+ }
1429
+ c = t.call(e, n);
1430
+ } catch (g) {
1431
+ c = [6, g], r = 0;
1432
+ } finally {
1433
+ o = a = 0;
1434
+ }
1435
+ if (c[0] & 5) throw c[1];
1436
+ return { value: c[0] ? c[1] : void 0, done: !0 };
1437
+ }
1438
+ }, la = function(e, t) {
1439
+ var n = typeof Symbol == "function" && e[Symbol.iterator];
1440
+ if (!n) return e;
1441
+ var o = n.call(e), r, a = [], f;
1442
+ try {
1443
+ for (; (t === void 0 || t-- > 0) && !(r = o.next()).done; ) a.push(r.value);
1444
+ } catch (_) {
1445
+ f = { error: _ };
1446
+ } finally {
1447
+ try {
1448
+ r && !r.done && (n = o.return) && n.call(o);
1449
+ } finally {
1450
+ if (f) throw f.error;
1451
+ }
1452
+ }
1453
+ return a;
1454
+ }, sa = function(e, t, n) {
1455
+ if (n || arguments.length === 2) for (var o = 0, r = t.length, a; o < r; o++)
1456
+ (a || !(o in t)) && (a || (a = Array.prototype.slice.call(t, 0, o)), a[o] = t[o]);
1457
+ return e.concat(a || Array.prototype.slice.call(t));
1458
+ }, pn = new _t(), He = new _t(), it = new _t(), mn = {
1459
+ cache: pn,
1460
+ refreshInterval: 0,
1461
+ ttl: 0,
1462
+ serverTTL: 1e3,
1463
+ dedupingInterval: 2e3,
1464
+ revalidateOnFocus: !0,
1465
+ revalidateDebounce: 0,
1466
+ shouldRetryOnError: !0,
1467
+ errorRetryInterval: 5e3,
1468
+ errorRetryCount: 5,
1469
+ fetcher: nt.fetcher,
1470
+ isOnline: nt.isOnline,
1471
+ isDocumentVisible: nt.isDocumentVisible
1472
+ };
1473
+ function da(e, t, n) {
1474
+ var o = He.get(e);
1475
+ if (o)
1476
+ o.data.push(t);
1477
+ else {
1478
+ var r = 5e3;
1479
+ He.set(e, [t], n > 0 ? n + r : n);
1480
+ }
1481
+ }
1482
+ function ua(e, t, n) {
1483
+ if (n.isDocumentVisible() && !(n.errorRetryCount !== void 0 && t > n.errorRetryCount)) {
1484
+ var o = Math.min(t || 0, n.errorRetryCount), r = o * n.errorRetryInterval;
1485
+ setTimeout(function() {
1486
+ e(null, { errorRetryCount: o + 1, shouldRetryOnError: !0 });
1487
+ }, r);
1488
+ }
1489
+ }
1490
+ var Ut = function(e, t, n, o) {
1491
+ return n === void 0 && (n = pn), o === void 0 && (o = mn.ttl), he(void 0, void 0, void 0, function() {
1492
+ var r, a, f, _, s, c, g;
1493
+ return Te(this, function(v) {
1494
+ switch (v.label) {
1495
+ case 0:
1496
+ if (!fa(t)) return [3, 5];
1497
+ v.label = 1;
1498
+ case 1:
1499
+ return v.trys.push([1, 3, , 4]), [4, t];
1500
+ case 2:
1501
+ return r = v.sent(), [3, 4];
1502
+ case 3:
1503
+ return _ = v.sent(), a = _, [3, 4];
1504
+ case 4:
1505
+ return [3, 6];
1506
+ case 5:
1507
+ r = t, v.label = 6;
1508
+ case 6:
1509
+ if (f = !1, s = { data: r, error: a, isValidating: f }, typeof r < "u")
1510
+ try {
1511
+ n.set(e, s, o);
1512
+ } catch (b) {
1513
+ console.error("swrv(mutate): failed to set cache", b);
1514
+ }
1515
+ return c = He.get(e), c && c.data.length && (g = c.data.filter(function(b) {
1516
+ return b.key === e;
1517
+ }), g.forEach(function(b, w) {
1518
+ typeof s.data < "u" && (b.data = s.data), b.error = s.error, b.isValidating = s.isValidating;
1519
+ var l = w === g.length - 1;
1520
+ l || delete g[w];
1521
+ }), g = g.filter(Boolean)), [2, s];
1522
+ }
1523
+ });
1524
+ });
1525
+ };
1526
+ function ca() {
1527
+ for (var e = this, t = [], n = 0; n < arguments.length; n++)
1528
+ t[n] = arguments[n];
1529
+ var o, r, a = te({}, mn), f = !1, _ = !1, s = vn(), c = (s == null ? void 0 : s.proxy) || s;
1530
+ if (!c)
1531
+ 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;
1532
+ var g = (c == null ? void 0 : c.$isServer) || !1;
1533
+ t.length >= 1 && (o = t[0]), t.length >= 2 && (r = t[1]), t.length > 2 && (a = te(te({}, a), t[2]));
1534
+ var v = g ? a.serverTTL : a.ttl, b = typeof o == "function" ? o : $(o);
1535
+ typeof r > "u" && (r = a.fetcher);
1536
+ var w = null;
1537
+ w || (w = Nt({
1538
+ data: void 0,
1539
+ error: void 0,
1540
+ isValidating: !0,
1541
+ key: null
1542
+ }));
1543
+ var l = function(d, I) {
1544
+ return he(e, void 0, void 0, function() {
1545
+ var N, L, ee, Q, z, ae, W, ce = this;
1546
+ return Te(this, function(fe) {
1547
+ switch (fe.label) {
1548
+ case 0:
1549
+ return N = w.data === void 0, L = b.value, L ? (ee = a.cache.get(L), Q = ee && ee.data, w.isValidating = !0, Q && (w.data = Q.data, w.error = Q.error), z = d || r, !z || !a.isDocumentVisible() && !N || (I == null ? void 0 : I.forceRevalidate) !== void 0 && !(I != null && I.forceRevalidate) ? (w.isValidating = !1, [
1550
+ 2
1551
+ /*return*/
1552
+ ]) : ee && (ae = !!(Date.now() - ee.createdAt >= a.dedupingInterval || I != null && I.forceRevalidate), !ae) ? (w.isValidating = !1, [
1553
+ 2
1554
+ /*return*/
1555
+ ]) : (W = function() {
1556
+ return he(ce, void 0, void 0, function() {
1557
+ var G, be, pe, ye;
1558
+ return Te(this, function(O) {
1559
+ switch (O.label) {
1560
+ case 0:
1561
+ return G = it.get(L), G ? [3, 2] : (be = Array.isArray(L) ? L : [L], pe = z.apply(void 0, sa([], la(be), !1)), it.set(L, pe, a.dedupingInterval), [4, Ut(L, pe, a.cache, v)]);
1562
+ case 1:
1563
+ return O.sent(), [3, 4];
1564
+ case 2:
1565
+ return [4, Ut(L, G.data, a.cache, v)];
1566
+ case 3:
1567
+ O.sent(), O.label = 4;
1568
+ case 4:
1569
+ return w.isValidating = !1, it.delete(L), w.error !== void 0 && (ye = !f && a.shouldRetryOnError && (I ? I.shouldRetryOnError : !0), ye && ua(l, I ? I.errorRetryCount : 1, a)), [
1570
+ 2
1571
+ /*return*/
1572
+ ];
1573
+ }
1574
+ });
1575
+ });
1576
+ }, Q && a.revalidateDebounce ? (setTimeout(function() {
1577
+ return he(ce, void 0, void 0, function() {
1578
+ return Te(this, function(G) {
1579
+ switch (G.label) {
1580
+ case 0:
1581
+ return f ? [3, 2] : [4, W()];
1582
+ case 1:
1583
+ G.sent(), G.label = 2;
1584
+ case 2:
1585
+ return [
1586
+ 2
1587
+ /*return*/
1588
+ ];
1589
+ }
1590
+ });
1591
+ });
1592
+ }, a.revalidateDebounce), [3, 3]) : [3, 1])) : [
1593
+ 2
1594
+ /*return*/
1595
+ ];
1596
+ case 1:
1597
+ return [4, W()];
1598
+ case 2:
1599
+ fe.sent(), fe.label = 3;
1600
+ case 3:
1601
+ return [
1602
+ 2
1603
+ /*return*/
1604
+ ];
1605
+ }
1606
+ });
1607
+ });
1608
+ }, S = function() {
1609
+ return he(e, void 0, void 0, function() {
1610
+ return Te(this, function(d) {
1611
+ return [2, l(null, { shouldRetryOnError: !1 })];
1612
+ });
1613
+ });
1614
+ }, C = null;
1615
+ hn(function() {
1616
+ var d = function() {
1617
+ return he(e, void 0, void 0, function() {
1618
+ return Te(this, function(I) {
1619
+ switch (I.label) {
1620
+ case 0:
1621
+ return !w.error && a.isOnline() ? [4, l()] : [3, 2];
1622
+ case 1:
1623
+ return I.sent(), [3, 3];
1624
+ case 2:
1625
+ C && clearTimeout(C), I.label = 3;
1626
+ case 3:
1627
+ return a.refreshInterval && !f && (C = setTimeout(d, a.refreshInterval)), [
1628
+ 2
1629
+ /*return*/
1630
+ ];
1631
+ }
1632
+ });
1633
+ });
1634
+ };
1635
+ a.refreshInterval && (C = setTimeout(d, a.refreshInterval)), a.revalidateOnFocus && (document.addEventListener("visibilitychange", S, !1), window.addEventListener("focus", S, !1));
1636
+ }), Tn(function() {
1637
+ f = !0, C && clearTimeout(C), a.revalidateOnFocus && (document.removeEventListener("visibilitychange", S, !1), window.removeEventListener("focus", S, !1));
1638
+ var d = He.get(b.value);
1639
+ d && (d.data = d.data.filter(function(I) {
1640
+ return I !== w;
1641
+ }));
1642
+ });
1643
+ try {
1644
+ Ie(b, function(d) {
1645
+ wn(b) || (b.value = d), w.key = d, w.isValidating = !!d, da(b.value, w, v), !g && !_ && b.value && l(), _ = !1;
1646
+ }, {
1647
+ immediate: !0
1648
+ });
1649
+ } catch {
1650
+ }
1651
+ var R = te(te({}, Sn(w)), { mutate: function(d, I) {
1652
+ return l(d, te(te({}, I), { forceRevalidate: !0 }));
1653
+ } });
1654
+ return R;
1655
+ }
1656
+ function fa(e) {
1657
+ return e !== null && typeof e == "object" && typeof e.then == "function";
1658
+ }
1659
+ function _n(e) {
1660
+ return `redis-partial-links-${e}`;
1661
+ }
1662
+ const Ve = (e) => {
1663
+ const { axiosInstance: t } = pt(e.axiosRequestConfig);
1664
+ return {
1665
+ fetcher: async (n) => {
1666
+ const { partialId: o, size: r, offset: a, query: f } = n;
1667
+ let _ = `${e.apiBaseUrl}${Pe.links[e.app]}`;
1668
+ e.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "")), _ = _.replace(/{id}/gi, o || ""), f && (_ = `${_}?${f}`);
1669
+ const { data: s } = await t.get(
1670
+ _,
1671
+ { params: { size: r, offset: a } }
1672
+ );
1673
+ return s;
1674
+ }
1675
+ };
1676
+ }, gn = (e) => {
1677
+ const { partialId: t, config: n } = e, { fetcher: o } = Ve(n), r = $([]), { data: a } = ca(
1678
+ _n(t),
1679
+ () => o({ partialId: t }),
1680
+ {
1681
+ revalidateOnFocus: !1
1682
+ }
1683
+ );
1684
+ return Ie(a, () => {
1685
+ var f;
1686
+ r.value = ((f = a.value) == null ? void 0 : f.data) ?? [];
1687
+ }), r;
1688
+ }, pa = { class: "kong-ui-entities-redis-configurations-form" }, ma = /* @__PURE__ */ Y({
1689
+ __name: "RedisConfigurationForm",
1690
+ props: {
1691
+ config: {
1692
+ type: Object,
1693
+ required: !0,
1694
+ validator: (e) => !(!e || !["konnect", "kongManager"].includes(e == null ? void 0 : e.app) || (e == null ? void 0 : e.app) === "konnect" && !(e != null && e.controlPlaneId) || (e == null ? void 0 : e.app) === "kongManager" && typeof (e == null ? void 0 : e.workspace) != "string")
1695
+ },
1696
+ /** If a valid partialId is provided, it will put the form in Edit mode instead of Create */
1697
+ partialId: {
1698
+ type: String,
1699
+ required: !1,
1700
+ default: ""
1701
+ },
1702
+ /**
1703
+ * Teleport target for the actions
1704
+ */
1705
+ actionTeleportTarget: {
1706
+ type: String
1707
+ },
1708
+ /**
1709
+ * Top offset for the slideout
1710
+ */
1711
+ slidoutTopOffset: {
1712
+ type: Number,
1713
+ default: 60
1714
+ },
1715
+ /**
1716
+ * Set disabled partial type, only for create mode
1717
+ */
1718
+ disabledPartialType: {
1719
+ type: String,
1720
+ default: ""
1721
+ }
1722
+ },
1723
+ emits: ["update", "error", "loading", "cancel"],
1724
+ setup(e, { emit: t }) {
1725
+ const n = e, o = t, { i18n: { t: r }, i18nT: a } = ue.useI18n(), f = zt(), _ = $(), s = $(), c = (O, m) => {
1726
+ _.value = O ?? "", s.value = m;
1727
+ }, g = (O) => {
1728
+ var m;
1729
+ (m = s.value) == null || m.call(s, O), _.value = !1;
1730
+ }, v = H(() => [
1731
+ {
1732
+ label: r("form.options.type.host_port"),
1733
+ group: ` ${r("form.options.type.open_source")}`,
1734
+ // the space before the group name is intentional, it makes the group to be the first one
1735
+ value: y.HOST_PORT_CE,
1736
+ selected: d.value === y.HOST_PORT_CE,
1737
+ disabled: R && I.value || !R && n.disabledPartialType === ne.REDIS_CE
1738
+ },
1739
+ {
1740
+ label: r("form.options.type.host_port"),
1741
+ group: r("form.options.type.enterprise"),
1742
+ value: y.HOST_PORT_EE,
1743
+ selected: d.value === y.HOST_PORT_EE,
1744
+ disabled: !R && n.disabledPartialType === ne.REDIS_EE
1745
+ },
1746
+ {
1747
+ label: r("form.options.type.cluster"),
1748
+ group: r("form.options.type.enterprise"),
1749
+ value: y.CLUSTER,
1750
+ selected: d.value === y.CLUSTER,
1751
+ disabled: !R && n.disabledPartialType === ne.REDIS_EE
1752
+ },
1753
+ {
1754
+ label: r("form.options.type.sentinel"),
1755
+ group: r("form.options.type.enterprise"),
1756
+ value: y.SENTINEL,
1757
+ selected: d.value === y.SENTINEL,
1758
+ disabled: !R && n.disabledPartialType === ne.REDIS_EE
1759
+ }
1760
+ ]), b = [
1761
+ { label: r("form.options.sentinel_role.master"), value: "master" },
1762
+ { label: r("form.options.sentinel_role.slave"), value: "slave" },
1763
+ { label: r("form.options.sentinel_role.any"), value: "any" }
1764
+ ], w = (O) => {
1765
+ const m = O.value === y.HOST_PORT_CE ? r("form.options.type.suffix_open_source") : r("form.options.type.suffix_enterprise");
1766
+ return `${O.label}${m}`;
1767
+ }, {
1768
+ form: l,
1769
+ canSubmit: S,
1770
+ payload: C,
1771
+ isEdit: R,
1772
+ redisType: d,
1773
+ redisTypeIsEnterprise: I,
1774
+ fetchUrl: N,
1775
+ submit: L,
1776
+ setInitialFormValues: ee
1777
+ } = Do({
1778
+ partialId: n.partialId,
1779
+ defaultRedisType: n.disabledPartialType === ne.REDIS_CE ? y.HOST_PORT_EE : y.HOST_PORT_CE,
1780
+ config: n.config
1781
+ }), { fetcher: Q } = Ve(n.config), z = $(!1), ae = $(!1), W = $(0), ce = async () => {
1782
+ try {
1783
+ if (R && !ae.value) {
1784
+ const { count: m } = await Q({ partialId: n.partialId });
1785
+ if (W.value = m, m > 0) {
1786
+ z.value = !0;
1787
+ return;
1788
+ }
1789
+ }
1790
+ const { data: O } = await L();
1791
+ o("update", O);
1792
+ } catch (O) {
1793
+ o("error", O);
1794
+ }
1795
+ }, fe = () => {
1796
+ z.value = !1, ae.value = !0, ce();
1797
+ }, G = () => {
1798
+ n.config.cancelRoute && f.push(n.config.cancelRoute), o("cancel");
1799
+ }, be = (O) => {
1800
+ o("loading", O);
1801
+ }, pe = (O) => {
1802
+ o("error", O);
1803
+ }, ye = (O) => {
1804
+ ee(O);
1805
+ };
1806
+ return En(async () => {
1807
+ if (R) {
1808
+ const { count: O } = await Q({ partialId: n.partialId });
1809
+ W.value = O;
1810
+ }
1811
+ }), (O, m) => {
1812
+ const Ge = D("KAlert"), $e = D("KSelect"), U = D("KInput"), ve = D("KCheckbox"), E = D("KModal");
1813
+ return k(), q(Ke, null, [
1814
+ K("div", pa, [
1815
+ p(i(kn), {
1816
+ "action-teleport-target": e.actionTeleportTarget,
1817
+ "can-submit": i(S),
1818
+ config: e.config,
1819
+ "edit-id": e.partialId,
1820
+ "entity-type": i(Ht).RedisConfiguration,
1821
+ "error-message": i(l).errorMessage,
1822
+ "fetch-url": i(N),
1823
+ "form-fields": i(C),
1824
+ "is-readonly": i(l).readonly,
1825
+ "slidout-top-offset": e.slidoutTopOffset,
1826
+ onCancel: G,
1827
+ "onFetch:error": pe,
1828
+ "onFetch:success": ye,
1829
+ onLoading: be,
1830
+ onSubmit: ce
1831
+ }, {
1832
+ default: h(() => [
1833
+ W.value > 0 && i(R) ? (k(), F(Ge, {
1834
+ key: 0,
1835
+ appearance: "warning",
1836
+ class: "warning-alert",
1837
+ "data-testid": "redis-update-warning-alert"
1838
+ }, {
1839
+ default: h(() => [
1840
+ p(i(a), {
1841
+ keypath: "form.edit_warning_modal.description",
1842
+ tag: "div"
1843
+ }, {
1844
+ pluginCount: h(() => [
1845
+ K("b", null, B(i(r)("form.edit_warning_modal.plugin_count", { count: W.value })), 1)
1846
+ ]),
1847
+ _: 1
1848
+ })
1849
+ ]),
1850
+ _: 1
1851
+ })) : X("", !0),
1852
+ p(i(le), {
1853
+ "data-testid": "redis-type-section",
1854
+ description: i(r)("form.sections.type.description"),
1855
+ title: i(r)("form.sections.type.title")
1856
+ }, {
1857
+ default: h(() => [
1858
+ p($e, {
1859
+ modelValue: i(d),
1860
+ "onUpdate:modelValue": m[0] || (m[0] = (u) => Cn(d) ? d.value = u : null),
1861
+ "data-testid": "redis-type-select",
1862
+ disabled: i(R) && i(d) === i(y).HOST_PORT_CE,
1863
+ items: v.value,
1864
+ "kpop-attributes": { "data-testid": "redis-type-select-popover" },
1865
+ label: i(r)("form.fields.type.label"),
1866
+ readonly: i(l).readonly,
1867
+ required: ""
1868
+ }, {
1869
+ "selected-item-template": h(({ item: u }) => [
1870
+ Z(B(w(u)), 1)
1871
+ ]),
1872
+ _: 1
1873
+ }, 8, ["modelValue", "disabled", "items", "label", "readonly"])
1874
+ ]),
1875
+ _: 1
1876
+ }, 8, ["description", "title"]),
1877
+ p(i(le), {
1878
+ "data-testid": "redis-general-section",
1879
+ description: i(r)("form.sections.general.description"),
1880
+ title: i(r)("form.sections.general.title")
1881
+ }, {
1882
+ default: h(() => [
1883
+ p(U, {
1884
+ modelValue: i(l).fields.name,
1885
+ "onUpdate:modelValue": m[1] || (m[1] = (u) => i(l).fields.name = u),
1886
+ modelModifiers: { trim: !0 },
1887
+ "data-testid": "redis-name-input",
1888
+ label: i(r)("form.fields.name.label"),
1889
+ placeholder: i(r)("form.fields.name.placeholder"),
1890
+ readonly: i(l).readonly,
1891
+ required: ""
1892
+ }, null, 8, ["modelValue", "label", "placeholder", "readonly"])
1893
+ ]),
1894
+ _: 1
1895
+ }, 8, ["description", "title"]),
1896
+ i(d) === i(y).SENTINEL ? (k(), F(i(le), {
1897
+ key: 1,
1898
+ "data-testid": "redis-sentinel-configuration-section",
1899
+ description: i(r)("form.sections.sentinel_configuration.description"),
1900
+ title: i(r)("form.sections.sentinel_configuration.title")
1901
+ }, {
1902
+ default: h(() => [
1903
+ p(U, {
1904
+ modelValue: i(l).fields.config.sentinel_master,
1905
+ "onUpdate:modelValue": m[2] || (m[2] = (u) => i(l).fields.config.sentinel_master = u),
1906
+ "data-testid": "redis-sentinel-master-input",
1907
+ label: i(r)("form.fields.sentinel_master.label"),
1908
+ "label-attributes": {
1909
+ info: i(r)("form.fields.sentinel_master.tooltip"),
1910
+ tooltipAttributes: { maxWidth: "400" }
1911
+ },
1912
+ readonly: i(l).readonly,
1913
+ required: ""
1914
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1915
+ p($e, {
1916
+ modelValue: i(l).fields.config.sentinel_role,
1917
+ "onUpdate:modelValue": m[3] || (m[3] = (u) => i(l).fields.config.sentinel_role = u),
1918
+ "data-testid": "redis-sentinel-role-select",
1919
+ items: b,
1920
+ "kpop-attributes": { "data-testid": "redis-sentinel-role-select-popover" },
1921
+ label: i(r)("form.fields.sentinel_role.label"),
1922
+ "label-attributes": {
1923
+ info: i(r)("form.fields.sentinel_role.tooltip"),
1924
+ tooltipAttributes: { maxWidth: "400" }
1925
+ },
1926
+ readonly: i(l).readonly,
1927
+ required: ""
1928
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1929
+ p(ta, {
1930
+ modelValue: i(l).fields.config.sentinel_nodes,
1931
+ "onUpdate:modelValue": m[4] || (m[4] = (u) => i(l).fields.config.sentinel_nodes = u),
1932
+ readonly: i(l).readonly
1933
+ }, null, 8, ["modelValue", "readonly"]),
1934
+ p(U, {
1935
+ modelValue: i(l).fields.config.sentinel_username,
1936
+ "onUpdate:modelValue": m[5] || (m[5] = (u) => i(l).fields.config.sentinel_username = u),
1937
+ modelModifiers: { trim: !0 },
1938
+ label: i(r)("form.fields.sentinel_username.label"),
1939
+ "label-attributes": {
1940
+ info: i(r)("form.fields.sentinel_username.tooltip"),
1941
+ tooltipAttributes: { maxWidth: "400" }
1942
+ },
1943
+ readonly: i(l).readonly
1944
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1945
+ p(i(Me), {
1946
+ class: "secret-picker-provider",
1947
+ disabled: i(l).readonly,
1948
+ update: (u) => i(l).fields.config.sentinel_username = u,
1949
+ value: i(l).fields.config.sentinel_username,
1950
+ onOpen: m[6] || (m[6] = (u, x) => c(u, x))
1951
+ }, null, 8, ["disabled", "update", "value"]),
1952
+ p(U, {
1953
+ modelValue: i(l).fields.config.sentinel_password,
1954
+ "onUpdate:modelValue": m[7] || (m[7] = (u) => i(l).fields.config.sentinel_password = u),
1955
+ modelModifiers: { trim: !0 },
1956
+ label: i(r)("form.fields.sentinel_password.label"),
1957
+ "label-attributes": {
1958
+ info: i(r)("form.fields.sentinel_password.tooltip"),
1959
+ tooltipAttributes: { maxWidth: "400" }
1960
+ },
1961
+ readonly: i(l).readonly,
1962
+ type: "password"
1963
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1964
+ p(i(Me), {
1965
+ class: "secret-picker-provider",
1966
+ disabled: i(l).readonly,
1967
+ update: (u) => i(l).fields.config.sentinel_password = u,
1968
+ value: i(l).fields.config.sentinel_password,
1969
+ onOpen: m[8] || (m[8] = (u, x) => c(u, x))
1970
+ }, null, 8, ["disabled", "update", "value"])
1971
+ ]),
1972
+ _: 1
1973
+ }, 8, ["description", "title"])) : X("", !0),
1974
+ i(d) === i(y).CLUSTER ? (k(), F(i(le), {
1975
+ key: 2,
1976
+ "data-testid": "redis-cluster-configuration-section",
1977
+ description: i(r)("form.sections.cluster.description"),
1978
+ title: i(r)("form.sections.cluster.title")
1979
+ }, {
1980
+ default: h(() => [
1981
+ p(Xo, {
1982
+ modelValue: i(l).fields.config.cluster_nodes,
1983
+ "onUpdate:modelValue": m[9] || (m[9] = (u) => i(l).fields.config.cluster_nodes = u),
1984
+ readonly: i(l).readonly
1985
+ }, null, 8, ["modelValue", "readonly"]),
1986
+ p(U, {
1987
+ modelValue: i(l).fields.config.cluster_max_redirections,
1988
+ "onUpdate:modelValue": m[10] || (m[10] = (u) => i(l).fields.config.cluster_max_redirections = u),
1989
+ "data-testid": "redis-cluster-max-redirections-input",
1990
+ label: i(r)("form.fields.cluster_max_redirections.label"),
1991
+ "label-attributes": {
1992
+ info: i(r)("form.fields.cluster_max_redirections.tooltip"),
1993
+ tooltipAttributes: { maxWidth: "400" }
1994
+ },
1995
+ readonly: i(l).readonly,
1996
+ type: "number"
1997
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1998
+ ]),
1999
+ _: 1
2000
+ }, 8, ["description", "title"])) : X("", !0),
2001
+ p(i(le), {
2002
+ "data-testid": "redis-connection-configuration-section",
2003
+ description: i(r)("form.sections.connection.description"),
2004
+ title: i(r)("form.sections.connection.title")
2005
+ }, {
2006
+ default: h(() => [
2007
+ i(d) === i(y).HOST_PORT_CE || i(d) === i(y).HOST_PORT_EE ? (k(), F(U, {
2008
+ key: 0,
2009
+ modelValue: i(l).fields.config.host,
2010
+ "onUpdate:modelValue": m[11] || (m[11] = (u) => i(l).fields.config.host = u),
2011
+ modelModifiers: { trim: !0 },
2012
+ "data-testid": "redis-host-input",
2013
+ label: i(r)("form.fields.host.label"),
2014
+ "label-attributes": {
2015
+ info: i(r)("form.fields.host.tooltip"),
2016
+ tooltipAttributes: { maxWidth: "400" }
2017
+ },
2018
+ readonly: i(l).readonly
2019
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : X("", !0),
2020
+ i(d) === i(y).HOST_PORT_CE || i(d) === i(y).HOST_PORT_EE ? (k(), F(U, {
2021
+ key: 1,
2022
+ modelValue: i(l).fields.config.port,
2023
+ "onUpdate:modelValue": m[12] || (m[12] = (u) => i(l).fields.config.port = u),
2024
+ modelModifiers: { trim: !0 },
2025
+ "data-testid": "redis-port-input",
2026
+ label: i(r)("form.fields.port.label"),
2027
+ "label-attributes": {
2028
+ info: i(r)("form.fields.port.tooltip"),
2029
+ tooltipAttributes: { maxWidth: "400" }
2030
+ },
2031
+ readonly: i(l).readonly,
2032
+ type: "number"
2033
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : X("", !0),
2034
+ i(d) === i(y).HOST_PORT_EE ? (k(), F(ve, {
2035
+ key: 2,
2036
+ modelValue: i(l).fields.config.connection_is_proxied,
2037
+ "onUpdate:modelValue": m[13] || (m[13] = (u) => i(l).fields.config.connection_is_proxied = u),
2038
+ "data-testid": "redis-connection-is-proxied-checkbox",
2039
+ disabled: i(l).readonly,
2040
+ label: i(r)("form.fields.connection_is_proxied.label"),
2041
+ "label-attributes": {
2042
+ info: i(r)("form.fields.connection_is_proxied.tooltip"),
2043
+ tooltipAttributes: { maxWidth: "400" }
2044
+ }
2045
+ }, null, 8, ["modelValue", "disabled", "label", "label-attributes"])) : X("", !0),
2046
+ i(d) === i(y).HOST_PORT_CE ? (k(), F(U, {
2047
+ key: 3,
2048
+ modelValue: i(l).fields.config.timeout,
2049
+ "onUpdate:modelValue": m[14] || (m[14] = (u) => i(l).fields.config.timeout = u),
2050
+ modelModifiers: { trim: !0 },
2051
+ "data-testid": "redis-timeout-input",
2052
+ label: i(r)("form.fields.timeout.label"),
2053
+ "label-attributes": {
2054
+ info: i(r)("form.fields.timeout.tooltip"),
2055
+ tooltipAttributes: { maxWidth: "400" }
2056
+ },
2057
+ readonly: i(l).readonly,
2058
+ type: "number"
2059
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : X("", !0),
2060
+ p(U, {
2061
+ modelValue: i(l).fields.config.database,
2062
+ "onUpdate:modelValue": m[15] || (m[15] = (u) => i(l).fields.config.database = u),
2063
+ modelModifiers: { trim: !0 },
2064
+ "data-testid": "redis-database-input",
2065
+ label: i(r)("form.fields.database.label"),
2066
+ "label-attributes": {
2067
+ info: i(r)("form.fields.database.tooltip"),
2068
+ tooltipAttributes: { maxWidth: "400" }
2069
+ },
2070
+ readonly: i(l).readonly,
2071
+ type: "number"
2072
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
2073
+ p(U, {
2074
+ modelValue: i(l).fields.config.username,
2075
+ "onUpdate:modelValue": m[16] || (m[16] = (u) => i(l).fields.config.username = u),
2076
+ modelModifiers: { trim: !0 },
2077
+ "data-testid": "redis-username-input",
2078
+ label: i(r)("form.fields.username.label"),
2079
+ "label-attributes": {
2080
+ info: i(r)("form.fields.username.tooltip"),
2081
+ tooltipAttributes: { maxWidth: "400" }
2082
+ },
2083
+ readonly: i(l).readonly
2084
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
2085
+ p(i(Me), {
2086
+ class: "secret-picker-provider",
2087
+ disabled: i(l).readonly,
2088
+ update: (u) => i(l).fields.config.username = u,
2089
+ value: i(l).fields.config.username,
2090
+ onOpen: m[17] || (m[17] = (u, x) => c(u, x))
2091
+ }, null, 8, ["disabled", "update", "value"]),
2092
+ p(U, {
2093
+ modelValue: i(l).fields.config.password,
2094
+ "onUpdate:modelValue": m[18] || (m[18] = (u) => i(l).fields.config.password = u),
2095
+ modelModifiers: { trim: !0 },
2096
+ "data-testid": "redis-password-input",
2097
+ label: i(r)("form.fields.password.label"),
2098
+ "label-attributes": {
2099
+ info: i(r)("form.fields.password.tooltip"),
2100
+ tooltipAttributes: { maxWidth: "400" }
2101
+ },
2102
+ readonly: i(l).readonly,
2103
+ type: "password"
2104
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
2105
+ p(i(Me), {
2106
+ class: "secret-picker-provider",
2107
+ disabled: i(l).readonly,
2108
+ update: (u) => i(l).fields.config.password = u,
2109
+ value: i(l).fields.config.password,
2110
+ onOpen: m[19] || (m[19] = (u, x) => c(u, x))
2111
+ }, null, 8, ["disabled", "update", "value"])
2112
+ ]),
2113
+ _: 1
2114
+ }, 8, ["description", "title"]),
2115
+ p(i(le), {
2116
+ "data-testid": "redis-tls-configuration-section",
2117
+ description: i(r)("form.sections.tls.description"),
2118
+ title: i(r)("form.sections.tls.title")
2119
+ }, {
2120
+ default: h(() => [
2121
+ p(ve, {
2122
+ modelValue: i(l).fields.config.ssl,
2123
+ "onUpdate:modelValue": m[20] || (m[20] = (u) => i(l).fields.config.ssl = u),
2124
+ "data-testid": "redis-ssl-checkbox",
2125
+ description: i(r)("form.fields.ssl.description"),
2126
+ disabled: i(l).readonly,
2127
+ label: i(r)("form.fields.ssl.label"),
2128
+ "label-attributes": {
2129
+ info: i(r)("form.fields.ssl.tooltip"),
2130
+ tooltipAttributes: { maxWidth: "400" }
2131
+ }
2132
+ }, null, 8, ["modelValue", "description", "disabled", "label", "label-attributes"]),
2133
+ p(ve, {
2134
+ modelValue: i(l).fields.config.ssl_verify,
2135
+ "onUpdate:modelValue": m[21] || (m[21] = (u) => i(l).fields.config.ssl_verify = u),
2136
+ "data-testid": "redis-ssl-verify-checkbox",
2137
+ description: i(r)("form.fields.ssl_verify.description"),
2138
+ disabled: i(l).readonly,
2139
+ label: i(r)("form.fields.ssl_verify.label"),
2140
+ "label-attributes": {
2141
+ info: i(r)("form.fields.ssl_verify.tooltip"),
2142
+ tooltipAttributes: { maxWidth: "400" }
2143
+ }
2144
+ }, null, 8, ["modelValue", "description", "disabled", "label", "label-attributes"]),
2145
+ p(U, {
2146
+ modelValue: i(l).fields.config.server_name,
2147
+ "onUpdate:modelValue": m[22] || (m[22] = (u) => i(l).fields.config.server_name = u),
2148
+ modelModifiers: { trim: !0 },
2149
+ label: i(r)("form.fields.server_name.label"),
2150
+ "label-attributes": {
2151
+ info: i(r)("form.fields.server_name.tooltip"),
2152
+ tooltipAttributes: { maxWidth: "400" }
2153
+ },
2154
+ readonly: i(l).readonly
2155
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
2156
+ ]),
2157
+ _: 1
2158
+ }, 8, ["description", "title"]),
2159
+ i(d) !== i(y).HOST_PORT_CE ? (k(), F(i(le), {
2160
+ key: 3,
2161
+ "data-testid": "redis-keepalive-section",
2162
+ description: i(r)("form.sections.keepalive.description"),
2163
+ title: i(r)("form.sections.keepalive.title")
2164
+ }, {
2165
+ default: h(() => [
2166
+ p(U, {
2167
+ modelValue: i(l).fields.config.keepalive_backlog,
2168
+ "onUpdate:modelValue": m[23] || (m[23] = (u) => i(l).fields.config.keepalive_backlog = u),
2169
+ "data-testid": "redis-keepalive-backlog-input",
2170
+ label: i(r)("form.fields.keepalive_backlog.label"),
2171
+ "label-attributes": {
2172
+ info: i(r)("form.fields.keepalive_backlog.tooltip"),
2173
+ tooltipAttributes: { maxWidth: "400" }
2174
+ },
2175
+ readonly: i(l).readonly,
2176
+ type: "number"
2177
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
2178
+ p(U, {
2179
+ modelValue: i(l).fields.config.keepalive_pool_size,
2180
+ "onUpdate:modelValue": m[24] || (m[24] = (u) => i(l).fields.config.keepalive_pool_size = u),
2181
+ "data-testid": "redis-keepalive-pool-size-input",
2182
+ label: i(r)("form.fields.keepalive_pool_size.label"),
2183
+ "label-attributes": {
2184
+ info: i(r)("form.fields.keepalive_pool_size.tooltip"),
2185
+ tooltipAttributes: { maxWidth: "400" }
2186
+ },
2187
+ readonly: i(l).readonly,
2188
+ type: "number"
2189
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
2190
+ ]),
2191
+ _: 1
2192
+ }, 8, ["description", "title"])) : X("", !0),
2193
+ i(d) !== i(y).HOST_PORT_CE ? (k(), F(i(le), {
2194
+ key: 4,
2195
+ "data-testid": "redis-read-write-configuration-section",
2196
+ description: i(r)("form.sections.read_write_configuration.description"),
2197
+ title: i(r)("form.sections.read_write_configuration.title")
2198
+ }, {
2199
+ default: h(() => [
2200
+ p(U, {
2201
+ modelValue: i(l).fields.config.read_timeout,
2202
+ "onUpdate:modelValue": m[25] || (m[25] = (u) => i(l).fields.config.read_timeout = u),
2203
+ "data-testid": "redis-read-timeout-input",
2204
+ label: i(r)("form.fields.read_timeout.label"),
2205
+ "label-attributes": {
2206
+ info: i(r)("form.fields.read_timeout.tooltip"),
2207
+ tooltipAttributes: { maxWidth: "400" }
2208
+ },
2209
+ readonly: i(l).readonly,
2210
+ type: "number"
2211
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
2212
+ p(U, {
2213
+ modelValue: i(l).fields.config.send_timeout,
2214
+ "onUpdate:modelValue": m[26] || (m[26] = (u) => i(l).fields.config.send_timeout = u),
2215
+ "data-testid": "redis-send-timeout-input",
2216
+ label: i(r)("form.fields.send_timeout.label"),
2217
+ "label-attributes": {
2218
+ info: i(r)("form.fields.send_timeout.tooltip"),
2219
+ tooltipAttributes: { maxWidth: "400" }
2220
+ },
2221
+ readonly: i(l).readonly,
2222
+ type: "number"
2223
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
2224
+ p(U, {
2225
+ modelValue: i(l).fields.config.connect_timeout,
2226
+ "onUpdate:modelValue": m[27] || (m[27] = (u) => i(l).fields.config.connect_timeout = u),
2227
+ "data-testid": "redis-connect-timeout-input",
2228
+ label: i(r)("form.fields.connect_timeout.label"),
2229
+ "label-attributes": {
2230
+ info: i(r)("form.fields.connect_timeout.tooltip"),
2231
+ tooltipAttributes: { maxWidth: "400" }
2232
+ },
2233
+ readonly: i(l).readonly,
2234
+ type: "number"
2235
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
2236
+ ]),
2237
+ _: 1
2238
+ }, 8, ["description", "title"])) : X("", !0)
2239
+ ]),
2240
+ _: 1
2241
+ }, 8, ["action-teleport-target", "can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly", "slidout-top-offset"])
2242
+ ]),
2243
+ p(i(Dn), {
2244
+ config: n.config,
2245
+ setup: _.value,
2246
+ onCancel: m[28] || (m[28] = () => _.value = !1),
2247
+ onProceed: g
2248
+ }, null, 8, ["config", "setup"]),
2249
+ p(E, {
2250
+ "action-button-text": i(r)("form.edit_warning_modal.confirm"),
2251
+ "data-testid": "redis-update-warning-modal",
2252
+ "hide-cancel-button": "",
2253
+ "max-width": "640",
2254
+ title: i(r)("form.edit_warning_modal.title"),
2255
+ visible: z.value,
2256
+ onCancel: m[29] || (m[29] = (u) => z.value = !1),
2257
+ onProceed: fe
2258
+ }, {
2259
+ default: h(() => [
2260
+ p(i(a), {
2261
+ keypath: "form.edit_warning_modal.description",
2262
+ tag: "div"
2263
+ }, {
2264
+ pluginCount: h(() => [
2265
+ K("b", null, B(i(r)("form.edit_warning_modal.plugin_count", { count: W.value })), 1)
2266
+ ]),
2267
+ _: 1
2268
+ })
2269
+ ]),
2270
+ _: 1
2271
+ }, 8, ["action-button-text", "title", "visible"])
2272
+ ], 64);
2273
+ };
2274
+ }
2275
+ }), qa = /* @__PURE__ */ oe(ma, [["__scopeId", "data-v-96adad0c"]]), _a = "#00abd2", ga = "24px", ba = {
2276
+ class: "linked-plugins",
2277
+ "data-testid": "linked-plugins-inline"
2278
+ }, rt = 7, ya = /* @__PURE__ */ Y({
2279
+ __name: "LinkedPluginsInline",
2280
+ props: {
2281
+ config: {
2282
+ type: Object,
2283
+ required: !0,
2284
+ validator: (e) => !(!e || !["konnect", "kongManager"].includes(e == null ? void 0 : e.app) || e.app === "konnect" && !e.controlPlaneId || e.app === "kongManager" && typeof e.workspace != "string")
2285
+ },
2286
+ partialId: {
2287
+ type: String,
2288
+ required: !0
2289
+ }
2290
+ },
2291
+ setup(e) {
2292
+ const t = e, n = gn({
2293
+ config: t.config,
2294
+ partialId: t.partialId
2295
+ });
2296
+ return (o, r) => {
2297
+ const a = D("KBadge");
2298
+ return k(), q("div", ba, [
2299
+ (k(!0), q(Ke, null, ft(i(n).slice(0, rt), (f) => (k(), F(i(Wt), {
2300
+ key: f.id,
2301
+ name: f.name,
2302
+ size: 24
2303
+ }, null, 8, ["name"]))), 128)),
2304
+ i(n).length - rt > 0 ? (k(), F(a, {
2305
+ key: 0,
2306
+ appearance: "info"
2307
+ }, {
2308
+ default: h(() => [
2309
+ Z(" +" + B(i(n).length - rt), 1)
2310
+ ]),
2311
+ _: 1
2312
+ })) : X("", !0)
2313
+ ]);
2314
+ };
2315
+ }
2316
+ }), va = /* @__PURE__ */ oe(ya, [["__scopeId", "data-v-6fbbce03"]]), ha = { class: "plugin-item" }, Ta = /* @__PURE__ */ Y({
2317
+ __name: "PluginItem",
2318
+ props: {
2319
+ pluginName: {
2320
+ type: String,
2321
+ required: !0
2322
+ }
2323
+ },
2324
+ setup(e) {
2325
+ return (t, n) => (k(), q("div", ha, [
2326
+ p(i(Wt), {
2327
+ name: e.pluginName,
2328
+ size: 24
2329
+ }, null, 8, ["name"]),
2330
+ K("span", null, B(e.pluginName), 1)
2331
+ ]));
2332
+ }
2333
+ }), wa = /* @__PURE__ */ oe(Ta, [["__scopeId", "data-v-d3c7b010"]]), Sa = { class: "toolbar-container" }, Ea = /* @__PURE__ */ Y({
2334
+ __name: "LinkedPluginList",
2335
+ props: {
2336
+ config: {
2337
+ type: Object,
2338
+ required: !0,
2339
+ validator: (e) => !(!e || !["konnect", "kongManager"].includes(e == null ? void 0 : e.app) || e.app === "konnect" && !e.controlPlaneId || e.app === "kongManager" && typeof e.workspace != "string")
2340
+ },
2341
+ /**
2342
+ * Only works when filterBarEnabled is true
2343
+ */
2344
+ isExactMatch: {
2345
+ type: Boolean,
2346
+ default: !1
2347
+ },
2348
+ filterBarEnabled: {
2349
+ type: Boolean,
2350
+ default: !1
2351
+ },
2352
+ partialId: {
2353
+ type: String,
2354
+ required: !0
2355
+ }
2356
+ },
2357
+ emits: ["view-plugin", "load"],
2358
+ setup(e, { emit: t }) {
2359
+ const n = e, o = t, { i18n: { t: r } } = ue.useI18n(), a = [
2360
+ { key: "name", label: r("linked_plugins_modal.headers.plugin") },
2361
+ { key: "instance_name", label: r("linked_plugins_modal.headers.instance_name") },
2362
+ { key: "actions", hideLabel: !0 }
2363
+ ], { fetcher: f } = Ve(n.config), _ = $(0), s = async (b) => {
2364
+ const { data: w, count: l } = await f({
2365
+ partialId: n.partialId,
2366
+ size: b.pageSize,
2367
+ offset: b.offset,
2368
+ query: b.query
2369
+ });
2370
+ _.value = l;
2371
+ const S = {
2372
+ total: l,
2373
+ data: w
2374
+ };
2375
+ return o("load", S), S;
2376
+ }, c = $(""), g = H(() => n.config.app === "konnect" || n.isExactMatch ? {
2377
+ isExactMatch: !0
2378
+ } : {
2379
+ isExactMatch: !1,
2380
+ fields: { name: { searchable: !0 } },
2381
+ schema: { name: { type: "text" } }
2382
+ }), v = (b) => {
2383
+ o("view-plugin", { id: b.id, plugin: b.name });
2384
+ };
2385
+ return (b, w) => {
2386
+ const l = D("KDropdownItem"), S = D("KTableData");
2387
+ return k(), F(S, {
2388
+ "cache-identifier": i(_n)(e.partialId),
2389
+ fetcher: s,
2390
+ headers: a,
2391
+ "pagination-attributes": { totalCount: _.value, disablePageJump: !0 },
2392
+ "search-input": c.value
2393
+ }, Ft({
2394
+ name: h(({ rowValue: C }) => [
2395
+ p(wa, { "plugin-name": C }, null, 8, ["plugin-name"])
2396
+ ]),
2397
+ "action-items": h(({ row: C }) => [
2398
+ p(l, {
2399
+ onClick: (R) => v(C)
2400
+ }, {
2401
+ default: h(() => [
2402
+ Z(B(i(r)("actions.view_plugin")), 1)
2403
+ ]),
2404
+ _: 2
2405
+ }, 1032, ["onClick"])
2406
+ ]),
2407
+ _: 2
2408
+ }, [
2409
+ e.filterBarEnabled ? {
2410
+ name: "toolbar",
2411
+ fn: h(() => [
2412
+ K("div", Sa, [
2413
+ p(i(Kt), {
2414
+ modelValue: c.value,
2415
+ "onUpdate:modelValue": w[0] || (w[0] = (C) => c.value = C),
2416
+ config: g.value
2417
+ }, null, 8, ["modelValue", "config"])
2418
+ ])
2419
+ ]),
2420
+ key: "0"
2421
+ } : void 0
2422
+ ]), 1032, ["cache-identifier", "pagination-attributes", "search-input"]);
2423
+ };
2424
+ }
2425
+ }), Ca = /* @__PURE__ */ oe(Ea, [["__scopeId", "data-v-d6a2e2f4"]]), Ia = {
2426
+ class: "linked-plugins-modal",
2427
+ "data-testid": "linked-plugins-modal"
2428
+ }, Ra = /* @__PURE__ */ Y({
2429
+ __name: "LinkedPluginListModal",
2430
+ props: {
2431
+ config: {
2432
+ type: Object,
2433
+ required: !0,
2434
+ validator: (e) => !(!e || !["konnect", "kongManager"].includes(e == null ? void 0 : e.app) || e.app === "konnect" && !e.controlPlaneId || e.app === "kongManager" && typeof e.workspace != "string")
2435
+ },
2436
+ redisConfigurationId: {
2437
+ type: String,
2438
+ required: !0
2439
+ },
2440
+ visible: {
2441
+ type: Boolean,
2442
+ required: !0,
2443
+ default: !1
2444
+ }
2445
+ },
2446
+ emits: ["cancel", "proceed", "view-plugin"],
2447
+ setup(e, { emit: t }) {
2448
+ const n = t, { i18n: { t: o } } = ue.useI18n(), r = $(0), a = H(() => o("linked_plugins_modal.title", { count: r.value })), f = () => {
2449
+ n("cancel");
2450
+ }, _ = () => {
2451
+ n("proceed");
2452
+ };
2453
+ return (s, c) => {
2454
+ const g = D("KModal");
2455
+ return k(), q("div", Ia, [
2456
+ p(g, {
2457
+ "action-button-text": i(o)("actions.done"),
2458
+ "hide-cancel-button": "",
2459
+ title: a.value,
2460
+ visible: e.visible,
2461
+ onCancel: f,
2462
+ onProceed: _
2463
+ }, {
2464
+ default: h(() => [
2465
+ p(Ca, {
2466
+ config: e.config,
2467
+ "partial-id": e.redisConfigurationId,
2468
+ onLoad: c[0] || (c[0] = ({ total: v }) => r.value = v),
2469
+ onViewPlugin: c[1] || (c[1] = (v) => n("view-plugin", v))
2470
+ }, null, 8, ["config", "partial-id"])
2471
+ ]),
2472
+ _: 1
2473
+ }, 8, ["action-button-text", "title", "visible"])
2474
+ ]);
2475
+ };
2476
+ }
2477
+ }), ka = /* @__PURE__ */ oe(Ra, [["__scopeId", "data-v-6148b8bd"]]), Oa = /* @__PURE__ */ Y({
2478
+ __name: "DeleteWarningModal",
2479
+ props: {
2480
+ visible: {
2481
+ type: Boolean,
2482
+ required: !0
2483
+ }
2484
+ },
2485
+ emits: ["close"],
2486
+ setup(e, { emit: t }) {
2487
+ const { i18n: { t: n } } = ue.useI18n(), o = t, r = () => {
2488
+ o("close");
2489
+ };
2490
+ return (a, f) => {
2491
+ const _ = D("KModal");
2492
+ return k(), F(_, {
2493
+ "action-button-text": i(n)("actions.close"),
2494
+ "data-testid": "remove-links-modal",
2495
+ "hide-cancel-button": "",
2496
+ "max-width": "640",
2497
+ title: i(n)("delete.title"),
2498
+ visible: e.visible,
2499
+ onCancel: r,
2500
+ onProceed: r
2501
+ }, {
2502
+ default: h(() => [
2503
+ Z(B(i(n)("delete.warning")), 1)
2504
+ ]),
2505
+ _: 1
2506
+ }, 8, ["action-button-text", "title", "visible"]);
2507
+ };
2508
+ }
2509
+ }), xa = { class: "kong-ui-entities-partials-list" }, Pa = { class: "empty-state-icon-gateway" }, Aa = /* @__PURE__ */ Y({
2510
+ __name: "RedisConfigurationList",
2511
+ props: {
2512
+ /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
2513
+ config: {
2514
+ type: Object,
2515
+ required: !0,
2516
+ validator: (e) => !(!e || !["konnect", "kongManager"].includes(e == null ? void 0 : e.app) || !e.createRoute || !e.getViewRoute || !e.getEditRoute)
2517
+ },
2518
+ // used to override the default identifier for the cache entry
2519
+ cacheIdentifier: {
2520
+ type: String,
2521
+ default: ""
2522
+ },
2523
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
2524
+ canCreate: {
2525
+ type: Function,
2526
+ required: !1,
2527
+ default: async () => !0
2528
+ },
2529
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
2530
+ canDelete: {
2531
+ type: Function,
2532
+ required: !1,
2533
+ default: async () => !0
2534
+ },
2535
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
2536
+ canEdit: {
2537
+ type: Function,
2538
+ required: !1,
2539
+ default: async () => !0
2540
+ },
2541
+ /** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can retrieve (view details) a given entity */
2542
+ canRetrieve: {
2543
+ type: Function,
2544
+ required: !1,
2545
+ default: async () => !0
2546
+ },
2547
+ /**
2548
+ * Enables the new empty state design, this prop can be removed when
2549
+ * the khcp-14756-empty-states-m2 FF is removed.
2550
+ */
2551
+ enableV2EmptyStates: {
2552
+ type: Boolean,
2553
+ default: !1
2554
+ }
2555
+ },
2556
+ emits: ["click:learn-more", "click:plugin", "copy:error", "copy:success", "delete:success", "error"],
2557
+ setup(e, { emit: t }) {
2558
+ var ve;
2559
+ const n = t, o = e, r = H(() => {
2560
+ var u, x;
2561
+ let E = `${o.config.apiBaseUrl}${Pe.list[o.config.app]}`;
2562
+ return o.config.app === "konnect" ? E = E.replace(/{controlPlaneId}/gi, ((u = o.config) == null ? void 0 : u.controlPlaneId) || "") : o.config.app === "kongManager" && (E = E.replace(/\/{workspace}/gi, (x = o.config) != null && x.workspace ? `/${o.config.workspace}` : "")), E;
2563
+ }), a = $(!1), f = $(""), _ = $(null), s = $(void 0), c = $(!1), g = $(!1), v = $(""), b = $(!1), w = On(o.config, r.value), l = $(1), S = H(() => o.config.app !== "kongManager" || !!o.config.disableSorting), { fetcher: C, fetcherState: R } = xn(o.config, r.value), { i18n: { t: d } } = ue.useI18n(), { axiosInstance: I } = pt((ve = o.config) == null ? void 0 : ve.axiosRequestConfig), N = zt(), L = $(""), ee = H(() => {
2564
+ const E = o.config.app === "konnect" || o.config.isExactMatch;
2565
+ if (E)
2566
+ return {
2567
+ isExactMatch: !0,
2568
+ placeholder: d("search.placeholder")
2569
+ };
2570
+ const { name: u } = ae;
2571
+ return {
2572
+ isExactMatch: E,
2573
+ fields: {
2574
+ name: u
2575
+ },
2576
+ schema: o.config.filterSchema
2577
+ };
2578
+ }), { fetcher: Q } = Ve(o.config), z = $({
2579
+ ctaPath: o.config.createRoute,
2580
+ ctaText: void 0,
2581
+ message: `${d("redis.empty_state.description")}${o.config.additionMessageForEmptyState ? ` ${o.config.additionMessageForEmptyState}` : ""}`,
2582
+ title: d("redis.title")
2583
+ }), ae = {
2584
+ name: { label: d("list.table_headers.name"), searchable: !0, hidable: !1, sortable: !0 },
2585
+ type: { label: d("list.table_headers.type") },
2586
+ plugins: { label: d("list.table_headers.plugins") }
2587
+ }, W = (E) => ({
2588
+ label: d("actions.view"),
2589
+ to: o.config.getViewRoute(E)
2590
+ }), ce = (E) => ({
2591
+ label: d("actions.edit"),
2592
+ to: o.config.getEditRoute(E)
2593
+ }), fe = async (E) => {
2594
+ const { count: u } = await Q({ partialId: E.id });
2595
+ u > 0 ? b.value = !0 : (s.value = E, c.value = !0);
2596
+ }, G = () => {
2597
+ L.value = "";
2598
+ }, be = async (E) => {
2599
+ var x;
2600
+ await ((x = o.canRetrieve) == null ? void 0 : x.call(o, E)) && N.push(o.config.getViewRoute(E.id));
2601
+ }, pe = () => {
2602
+ c.value = !1;
2603
+ }, ye = (E) => {
2604
+ f.value = E, a.value = !0;
2605
+ }, O = async () => {
2606
+ var E, u, x;
2607
+ if ((E = s.value) != null && E.id) {
2608
+ g.value = !0;
2609
+ try {
2610
+ await I.delete(w(s.value.id)), g.value = !1, c.value = !1, m(), n("delete:success", s.value);
2611
+ } catch (J) {
2612
+ v.value = ((x = (u = J.response) == null ? void 0 : u.data) == null ? void 0 : x.message) || J.message || d("errors.delete"), n("error", J);
2613
+ } finally {
2614
+ g.value = !1;
2615
+ }
2616
+ }
2617
+ }, m = () => {
2618
+ l.value++;
2619
+ }, Ge = (E) => {
2620
+ switch (We(E)) {
2621
+ case y.HOST_PORT_CE:
2622
+ return `${d("form.options.type.host_port")}${d("form.options.type.suffix_open_source")}`;
2623
+ case y.HOST_PORT_EE:
2624
+ return `${d("form.options.type.host_port")}${d("form.options.type.suffix_enterprise")}`;
2625
+ case y.SENTINEL:
2626
+ return `${d("form.options.type.sentinel")}${d("form.options.type.suffix_enterprise")}`;
2627
+ case y.CLUSTER:
2628
+ return `${d("form.options.type.cluster")}${d("form.options.type.suffix_enterprise")}`;
2629
+ }
2630
+ }, $e = () => {
2631
+ N.push(o.config.createRoute);
2632
+ }, U = (E, u) => {
2633
+ const x = E.id;
2634
+ if (!u(x)) {
2635
+ n("copy:error", {
2636
+ entity: E,
2637
+ field: "id",
2638
+ message: d("errors.copy")
2639
+ });
2640
+ return;
2641
+ }
2642
+ n("copy:success", {
2643
+ entity: E,
2644
+ field: "id",
2645
+ message: d("copy.success", { val: x })
2646
+ });
2647
+ };
2648
+ return Ie(R, (E) => {
2649
+ var u, x, J;
2650
+ if (E.status === Pn.Error) {
2651
+ _.value = {
2652
+ title: d("errors.general")
2653
+ }, (J = (x = (u = E.error) == null ? void 0 : u.response) == null ? void 0 : x.data) != null && J.message && (_.value.message = E.error.response.data.message), n("error", E.error);
2654
+ return;
2655
+ }
2656
+ _.value = null;
2657
+ }), Ie(o.canCreate, async (E) => {
2658
+ await E ? z.value.ctaText = d("actions.create") : z.value.ctaText = void 0;
2659
+ }, {
2660
+ immediate: !0
2661
+ }), (E, u) => {
2662
+ const x = D("KButton"), J = D("KDropdownItem"), bn = D("KClipboardProvider");
2663
+ return k(), q("div", xa, [
2664
+ p(i(An), {
2665
+ "cache-identifier": e.cacheIdentifier,
2666
+ "disable-sorting": S.value,
2667
+ "empty-state-options": z.value,
2668
+ "enable-entity-actions": "",
2669
+ "error-message": _.value,
2670
+ fetcher: i(C),
2671
+ "fetcher-cache-key": l.value,
2672
+ "pagination-type": "offset",
2673
+ "preferences-storage-key": "kong-ui-entities-redis-configuration-list",
2674
+ query: L.value,
2675
+ "table-headers": ae,
2676
+ onClearSearchInput: G,
2677
+ "onClick:row": u[2] || (u[2] = (M) => be(M)),
2678
+ onSort: m
2679
+ }, Ft({
2680
+ "toolbar-filter": h(() => [
2681
+ p(i(Kt), {
2682
+ modelValue: L.value,
2683
+ "onUpdate:modelValue": u[0] || (u[0] = (M) => L.value = M),
2684
+ config: ee.value
2685
+ }, null, 8, ["modelValue", "config"])
2686
+ ]),
2687
+ "toolbar-button": h(() => [
2688
+ p(i(Le), {
2689
+ "auth-function": () => e.canCreate()
2690
+ }, {
2691
+ default: h(() => [
2692
+ p(x, {
2693
+ appearance: "primary",
2694
+ "data-testid": "toolbar-add-redis-configuration",
2695
+ size: "large",
2696
+ to: e.config.createRoute
2697
+ }, {
2698
+ default: h(() => [
2699
+ p(i(Nn)),
2700
+ Z(" " + B(i(d)("actions.create")), 1)
2701
+ ]),
2702
+ _: 1
2703
+ }, 8, ["to"])
2704
+ ]),
2705
+ _: 1
2706
+ }, 8, ["auth-function"])
2707
+ ]),
2708
+ name: h(({ rowValue: M }) => [
2709
+ K("b", null, B(M ?? "-"), 1)
2710
+ ]),
2711
+ type: h(({ row: M }) => [
2712
+ Z(B(Ge(M)), 1)
2713
+ ]),
2714
+ plugins: h(({ row: M }) => [
2715
+ p(va, {
2716
+ config: e.config,
2717
+ "partial-id": M.id,
2718
+ onClick: In((Je) => ye(M.id), ["stop"])
2719
+ }, null, 8, ["config", "partial-id", "onClick"])
2720
+ ]),
2721
+ actions: h(({ row: M }) => [
2722
+ p(bn, null, {
2723
+ default: h(({ copyToClipboard: Je }) => [
2724
+ p(J, {
2725
+ "data-testid": "action-entity-copy-id",
2726
+ onClick: ($a) => U(M, Je)
2727
+ }, {
2728
+ default: h(() => [
2729
+ Z(B(i(d)("actions.copy_id")), 1)
2730
+ ]),
2731
+ _: 2
2732
+ }, 1032, ["onClick"])
2733
+ ]),
2734
+ _: 2
2735
+ }, 1024),
2736
+ p(i(Le), {
2737
+ "auth-function": () => e.canRetrieve(M)
2738
+ }, {
2739
+ default: h(() => [
2740
+ p(J, {
2741
+ "data-testid": "action-entity-view",
2742
+ "has-divider": "",
2743
+ item: W(M.id)
2744
+ }, null, 8, ["item"])
2745
+ ]),
2746
+ _: 2
2747
+ }, 1032, ["auth-function"]),
2748
+ p(i(Le), {
2749
+ "auth-function": () => e.canEdit(M)
2750
+ }, {
2751
+ default: h(() => [
2752
+ p(J, {
2753
+ "data-testid": "action-entity-edit",
2754
+ item: ce(M.id)
2755
+ }, null, 8, ["item"])
2756
+ ]),
2757
+ _: 2
2758
+ }, 1032, ["auth-function"]),
2759
+ p(i(Le), {
2760
+ "auth-function": () => e.canDelete(M)
2761
+ }, {
2762
+ default: h(() => [
2763
+ p(J, {
2764
+ danger: "",
2765
+ "data-testid": "action-entity-delete",
2766
+ "has-divider": "",
2767
+ onClick: (Je) => fe(M)
2768
+ }, {
2769
+ default: h(() => [
2770
+ Z(B(i(d)("actions.delete")), 1)
2771
+ ]),
2772
+ _: 2
2773
+ }, 1032, ["onClick"])
2774
+ ]),
2775
+ _: 2
2776
+ }, 1032, ["auth-function"])
2777
+ ]),
2778
+ _: 2
2779
+ }, [
2780
+ e.enableV2EmptyStates && e.config.app === "konnect" ? {
2781
+ name: "empty-state",
2782
+ fn: h(() => [
2783
+ p(i(Vn), {
2784
+ "action-button-text": i(d)("list.action"),
2785
+ appearance: "secondary",
2786
+ "can-create": () => e.canCreate(),
2787
+ "data-testid": "redis-entity-empty-state",
2788
+ description: i(d)("list.empty_state.description"),
2789
+ features: [
2790
+ {
2791
+ title: i(d)("list.empty_state.feature_1.title"),
2792
+ description: i(d)("list.empty_state.feature_1.description")
2793
+ },
2794
+ {
2795
+ title: i(d)("list.empty_state.feature_2.title"),
2796
+ description: i(d)("list.empty_state.feature_2.description")
2797
+ }
2798
+ ],
2799
+ "learn-more": e.config.app === "konnect",
2800
+ title: i(d)("redis.title"),
2801
+ "onClick:create": $e,
2802
+ "onClick:learnMore": u[1] || (u[1] = () => n("click:learn-more"))
2803
+ }, {
2804
+ image: h(() => [
2805
+ K("div", Pa, [
2806
+ p(i(gt), {
2807
+ color: i(_a),
2808
+ size: i(ga)
2809
+ }, null, 8, ["color", "size"])
2810
+ ])
2811
+ ]),
2812
+ "feature-0-icon": h(() => [
2813
+ p(i(gt))
2814
+ ]),
2815
+ "feature-1-icon": h(() => [
2816
+ p(i(jn))
2817
+ ]),
2818
+ _: 1
2819
+ }, 8, ["action-button-text", "can-create", "description", "features", "learn-more", "title"])
2820
+ ]),
2821
+ key: "0"
2822
+ } : void 0
2823
+ ]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query"]),
2824
+ p(Oa, {
2825
+ visible: b.value,
2826
+ onClose: u[3] || (u[3] = (M) => b.value = !1)
2827
+ }, null, 8, ["visible"]),
2828
+ p(i($n), {
2829
+ "action-pending": g.value,
2830
+ description: i(d)("delete.description"),
2831
+ "entity-name": s.value && (s.value.name || s.value.id),
2832
+ "entity-type": i(Ln).RedisConfiguration,
2833
+ error: v.value,
2834
+ "need-confirmation": !0,
2835
+ title: i(d)("delete.title"),
2836
+ visible: c.value,
2837
+ onCancel: pe,
2838
+ onProceed: O
2839
+ }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
2840
+ p(ka, {
2841
+ config: e.config,
2842
+ "redis-configuration-id": f.value,
2843
+ visible: a.value,
2844
+ onCancel: u[4] || (u[4] = (M) => a.value = !1),
2845
+ onProceed: u[5] || (u[5] = (M) => a.value = !1),
2846
+ onViewPlugin: u[6] || (u[6] = (M) => n("click:plugin", M))
2847
+ }, null, 8, ["config", "redis-configuration-id", "visible"])
2848
+ ]);
2849
+ };
2850
+ }
2851
+ }), Wa = /* @__PURE__ */ oe(Aa, [["__scopeId", "data-v-cc7bdee7"]]), Va = { class: "kong-ui-consumer-group-entity-config-card" }, Ga = /* @__PURE__ */ Y({
2852
+ __name: "RedisConfigurationConfigCard",
2853
+ props: {
2854
+ /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
2855
+ config: {
2856
+ type: Object,
2857
+ required: !0,
2858
+ validator: (e) => !(!e || !["konnect", "kongManager"].includes(e == null ? void 0 : e.app) || e.app === "konnect" && !e.controlPlaneId || e.app === "kongManager" && typeof e.workspace != "string" || !e.entityId)
2859
+ },
2860
+ /**
2861
+ * External link for documentation that determines visibility of Documentation button
2862
+ */
2863
+ configCardDoc: {
2864
+ type: String,
2865
+ default: "",
2866
+ required: !1
2867
+ },
2868
+ /**
2869
+ * Control visibility of card title content
2870
+ */
2871
+ hideTitle: {
2872
+ type: Boolean,
2873
+ default: !0
2874
+ }
2875
+ },
2876
+ emits: ["loading", "fetch:error", "fetch:success"],
2877
+ setup(e, { emit: t }) {
2878
+ const n = e, o = t, { i18n: { t: r } } = ue.useI18n(), a = H(() => Pe.form[n.config.app].edit), f = $(mt), _ = (l) => {
2879
+ f.value = We(l), o("fetch:success", l);
2880
+ }, s = H(() => {
2881
+ const l = f.value === y.HOST_PORT_CE ? r("form.options.type.suffix_open_source") : r("form.options.type.suffix_enterprise");
2882
+ let S = "";
2883
+ switch (f.value) {
2884
+ case y.HOST_PORT_CE:
2885
+ S = r("form.options.type.host_port");
2886
+ break;
2887
+ case y.HOST_PORT_EE:
2888
+ S = r("form.options.type.host_port");
2889
+ break;
2890
+ case y.CLUSTER:
2891
+ S = r("form.options.type.cluster");
2892
+ break;
2893
+ case y.SENTINEL:
2894
+ S = r("form.options.type.sentinel");
2895
+ break;
2896
+ }
2897
+ return `${S}${l}`;
2898
+ }), c = (l) => ({
2899
+ id: l.id,
2900
+ name: l.name,
2901
+ created_at: l.created_at,
2902
+ updated_at: l.updated_at,
2903
+ type: l.type,
2904
+ ...l.config
2905
+ }), g = (l) => {
2906
+ const { id: S, name: C, created_at: R, updated_at: d, type: I, ...N } = l;
2907
+ return {
2908
+ id: S,
2909
+ name: C,
2910
+ created_at: R,
2911
+ updated_at: d,
2912
+ type: I,
2913
+ config: N
2914
+ };
2915
+ }, v = {
2916
+ id: {},
2917
+ name: {
2918
+ type: A.Text,
2919
+ section: V.Basic,
2920
+ label: r("form.fields.name.label")
2921
+ },
2922
+ updated_at: {},
2923
+ created_at: {},
2924
+ type: {
2925
+ type: A.Text,
2926
+ section: V.Basic,
2927
+ label: r("form.fields.type.label")
2928
+ },
2929
+ cluster_max_redirections: {
2930
+ type: A.Text,
2931
+ section: V.Basic,
2932
+ tooltip: r("form.fields.cluster_max_redirections.tooltip"),
2933
+ label: r("form.fields.cluster_max_redirections.label")
2934
+ },
2935
+ cluster_nodes: {
2936
+ type: A.JsonArray,
2937
+ section: V.Basic,
2938
+ label: r("form.fields.cluster_nodes.title"),
2939
+ tooltip: r("form.fields.cluster_nodes.tooltip")
2940
+ },
2941
+ connect_timeout: {
2942
+ type: A.Text,
2943
+ section: V.Basic,
2944
+ label: r("form.fields.connect_timeout.label"),
2945
+ tooltip: r("form.fields.connect_timeout.tooltip")
2946
+ },
2947
+ connection_is_proxied: {
2948
+ type: A.Text,
2949
+ section: V.Basic,
2950
+ label: r("form.fields.connection_is_proxied.label"),
2951
+ tooltip: r("form.fields.connection_is_proxied.tooltip")
2952
+ },
2953
+ database: {
2954
+ type: A.Text,
2955
+ section: V.Basic,
2956
+ label: r("form.fields.database.label"),
2957
+ tooltip: r("form.fields.database.tooltip")
2958
+ },
2959
+ host: {
2960
+ type: A.Text,
2961
+ section: V.Basic,
2962
+ label: r("form.fields.host.label"),
2963
+ tooltip: r("form.fields.host.tooltip")
2964
+ },
2965
+ keepalive_backlog: {
2966
+ type: A.Text,
2967
+ section: V.Basic,
2968
+ label: r("form.fields.keepalive_backlog.label"),
2969
+ tooltip: r("form.fields.keepalive_backlog.tooltip")
2970
+ },
2971
+ keepalive_pool_size: {
2972
+ type: A.Text,
2973
+ section: V.Basic,
2974
+ label: r("form.fields.keepalive_pool_size.label"),
2975
+ tooltip: r("form.fields.keepalive_pool_size.tooltip")
2976
+ },
2977
+ password: {
2978
+ type: A.Redacted,
2979
+ section: V.Basic,
2980
+ label: r("form.fields.password.label"),
2981
+ tooltip: r("form.fields.password.tooltip")
2982
+ },
2983
+ port: {
2984
+ type: A.Text,
2985
+ section: V.Basic,
2986
+ label: r("form.fields.port.label"),
2987
+ tooltip: r("form.fields.port.tooltip")
2988
+ },
2989
+ read_timeout: {
2990
+ type: A.Text,
2991
+ section: V.Basic,
2992
+ label: r("form.fields.read_timeout.label"),
2993
+ tooltip: r("form.fields.read_timeout.tooltip")
2994
+ },
2995
+ send_timeout: {
2996
+ type: A.Text,
2997
+ section: V.Basic,
2998
+ label: r("form.fields.send_timeout.label"),
2999
+ tooltip: r("form.fields.send_timeout.tooltip")
3000
+ },
3001
+ sentinel_master: {
3002
+ type: A.Text,
3003
+ section: V.Basic,
3004
+ label: r("form.fields.sentinel_master.label"),
3005
+ tooltip: r("form.fields.sentinel_master.tooltip")
3006
+ },
3007
+ sentinel_nodes: {
3008
+ type: A.JsonArray,
3009
+ section: V.Basic,
3010
+ tooltip: r("form.fields.sentinel_nodes.tooltip")
3011
+ },
3012
+ sentinel_password: {
3013
+ type: A.Redacted,
3014
+ section: V.Basic,
3015
+ label: r("form.fields.sentinel_password.label"),
3016
+ tooltip: r("form.fields.sentinel_password.tooltip")
3017
+ },
3018
+ sentinel_role: {
3019
+ type: A.Text,
3020
+ section: V.Basic,
3021
+ label: r("form.fields.sentinel_role.label"),
3022
+ tooltip: r("form.fields.sentinel_role.tooltip")
3023
+ },
3024
+ sentinel_username: {
3025
+ type: A.Text,
3026
+ section: V.Basic,
3027
+ label: r("form.fields.sentinel_username.label"),
3028
+ tooltip: r("form.fields.sentinel_username.tooltip")
3029
+ },
3030
+ server_name: {
3031
+ type: A.Text,
3032
+ section: V.Basic,
3033
+ label: r("form.fields.server_name.label"),
3034
+ tooltip: r("form.fields.server_name.tooltip")
3035
+ },
3036
+ ssl_verify: {
3037
+ type: A.Text,
3038
+ section: V.Basic,
3039
+ label: r("form.fields.ssl_verify.label"),
3040
+ tooltip: r("form.fields.ssl_verify.tooltip")
3041
+ },
3042
+ ssl: {
3043
+ type: A.Text,
3044
+ section: V.Basic,
3045
+ label: r("form.fields.ssl.label"),
3046
+ tooltip: r("form.fields.ssl.tooltip")
3047
+ },
3048
+ timeout: {
3049
+ type: A.Text,
3050
+ section: V.Basic,
3051
+ label: r("form.fields.timeout.label"),
3052
+ tooltip: r("form.fields.timeout.tooltip")
3053
+ },
3054
+ username: {
3055
+ type: A.Text,
3056
+ section: V.Basic,
3057
+ label: r("form.fields.username.label"),
3058
+ tooltip: r("form.fields.username.tooltip")
3059
+ }
3060
+ }, b = (l) => {
3061
+ const S = {}, C = Object.keys(v);
3062
+ for (const R of C)
3063
+ l.includes(R) ? S[R] = {
3064
+ ...v[R],
3065
+ order: l.indexOf(R) + 1
3066
+ } : S[R] = {
3067
+ ...v[R],
3068
+ hidden: !0
3069
+ };
3070
+ return S;
3071
+ }, w = H(() => {
3072
+ const l = ["id", "name", "type", "updated_at", "created_at"];
3073
+ switch (f.value) {
3074
+ case y.HOST_PORT_CE:
3075
+ return b([
3076
+ ...l,
3077
+ "host",
3078
+ "port",
3079
+ "timeout",
3080
+ "database",
3081
+ "username",
3082
+ "password",
3083
+ "ssl",
3084
+ "ssl_verify",
3085
+ "server_name"
3086
+ ]);
3087
+ case y.HOST_PORT_EE:
3088
+ return b([
3089
+ ...l,
3090
+ "host",
3091
+ "port",
3092
+ "connection_is_proxied",
3093
+ "database",
3094
+ "username",
3095
+ "password",
3096
+ "ssl",
3097
+ "ssl_verify",
3098
+ "server_name",
3099
+ "keepalive_backlog",
3100
+ "keepalive_pool_size",
3101
+ "read_timeout",
3102
+ "send_timeout",
3103
+ "connect_timeout"
3104
+ ]);
3105
+ case y.CLUSTER:
3106
+ return b([
3107
+ ...l,
3108
+ "cluster_nodes",
3109
+ "cluster_max_redirections",
3110
+ "database",
3111
+ "username",
3112
+ "password",
3113
+ "ssl",
3114
+ "ssl_verify",
3115
+ "server_name",
3116
+ "keepalive_backlog",
3117
+ "keepalive_pool_size",
3118
+ "read_timeout",
3119
+ "send_timeout",
3120
+ "connect_timeout"
3121
+ ]);
3122
+ case y.SENTINEL:
3123
+ return b([
3124
+ ...l,
3125
+ "sentinel_master",
3126
+ "sentinel_role",
3127
+ "sentinel_nodes",
3128
+ "sentinel_username",
3129
+ "sentinel_password",
3130
+ "database",
3131
+ "username",
3132
+ "password",
3133
+ "ssl",
3134
+ "ssl_verify",
3135
+ "server_name",
3136
+ "keepalive_backlog",
3137
+ "keepalive_pool_size",
3138
+ "read_timeout",
3139
+ "send_timeout",
3140
+ "connect_timeout"
3141
+ ]);
3142
+ default:
3143
+ throw new Error("Invalid Redis type");
3144
+ }
3145
+ });
3146
+ return (l, S) => (k(), q("div", Va, [
3147
+ p(i(Mn), {
3148
+ "code-block-record-formatter": g,
3149
+ config: e.config,
3150
+ "config-card-doc": e.configCardDoc,
3151
+ "config-schema": w.value,
3152
+ "entity-type": i(Ht).RedisConfiguration,
3153
+ "fetch-url": a.value,
3154
+ "hide-title": e.hideTitle,
3155
+ "record-resolver": c,
3156
+ "onFetch:error": S[0] || (S[0] = (C) => l.$emit("fetch:error", C)),
3157
+ "onFetch:success": _,
3158
+ onLoading: S[1] || (S[1] = (C) => l.$emit("loading", C))
3159
+ }, {
3160
+ type: h(() => [
3161
+ K("div", null, B(s.value), 1)
3162
+ ]),
3163
+ _: 1
3164
+ }, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
3165
+ ]));
3166
+ }
3167
+ }), Ja = {
3168
+ useLinkedPlugins: gn,
3169
+ useLinkedPluginsFetcher: Ve
3170
+ };
3171
+ export {
3172
+ Oa as DeleteWarningModal,
3173
+ Ca as LinkedPlugins,
3174
+ ne as PartialType,
3175
+ Ga as RedisConfigurationConfigCard,
3176
+ qa as RedisConfigurationForm,
3177
+ Wa as RedisConfigurationList,
3178
+ y as RedisType,
3179
+ Ja as composables,
3180
+ Ka as constants,
3181
+ za as helpers
3182
+ };