@kong-ui-public/entities-redis-configurations 1.8.20-pr.2790.95b70759b.0 → 1.8.20-pr.2792.f8a60c5d8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1321,7 +1321,7 @@ const ni = {
|
|
|
1321
1321
|
for (const [o, r] of t)
|
|
1322
1322
|
n[o] = r;
|
|
1323
1323
|
return n;
|
|
1324
|
-
}, li = /* @__PURE__ */ te(Ms, [["__scopeId", "data-v-
|
|
1324
|
+
}, li = /* @__PURE__ */ te(Ms, [["__scopeId", "data-v-a0b2e4fb"]]), js = {
|
|
1325
1325
|
create: "New Redis Configuration",
|
|
1326
1326
|
copy_id: "Copy ID",
|
|
1327
1327
|
copy_json: "Copy JSON",
|
|
@@ -1726,7 +1726,7 @@ const ye = {
|
|
|
1726
1726
|
]);
|
|
1727
1727
|
};
|
|
1728
1728
|
}
|
|
1729
|
-
}), Gs = /* @__PURE__ */ te(qs, [["__scopeId", "data-v-
|
|
1729
|
+
}), Gs = /* @__PURE__ */ te(qs, [["__scopeId", "data-v-776a626d"]]), si = () => {
|
|
1730
1730
|
const e = x(), t = x();
|
|
1731
1731
|
return {
|
|
1732
1732
|
vaultSecretPickerSetup: e,
|
|
@@ -1820,7 +1820,7 @@ const ye = {
|
|
|
1820
1820
|
]);
|
|
1821
1821
|
};
|
|
1822
1822
|
}
|
|
1823
|
-
}), Qs = /* @__PURE__ */ te(Zs, [["__scopeId", "data-v-
|
|
1823
|
+
}), Qs = /* @__PURE__ */ te(Zs, [["__scopeId", "data-v-cd1c07e2"]]), Ys = /* @__PURE__ */ Y({
|
|
1824
1824
|
__name: "CloudAuthFields",
|
|
1825
1825
|
props: /* @__PURE__ */ Et({
|
|
1826
1826
|
config: {},
|
|
@@ -1977,7 +1977,7 @@ const ye = {
|
|
|
1977
1977
|
], 64);
|
|
1978
1978
|
};
|
|
1979
1979
|
}
|
|
1980
|
-
}), Xs = /* @__PURE__ */ te(Ys, [["__scopeId", "data-v-
|
|
1980
|
+
}), Xs = /* @__PURE__ */ te(Ys, [["__scopeId", "data-v-150a04c2"]]);
|
|
1981
1981
|
var mt = /* @__PURE__ */ new WeakMap(), fn = 0;
|
|
1982
1982
|
function ed(e) {
|
|
1983
1983
|
if (!e.length)
|
|
@@ -3060,7 +3060,7 @@ const Fe = (e) => {
|
|
|
3060
3060
|
], 64);
|
|
3061
3061
|
};
|
|
3062
3062
|
}
|
|
3063
|
-
}), pd = /* @__PURE__ */ te(fd, [["__scopeId", "data-v-
|
|
3063
|
+
}), pd = /* @__PURE__ */ te(fd, [["__scopeId", "data-v-d1ab730f"]]), md = {
|
|
3064
3064
|
class: "linked-plugins",
|
|
3065
3065
|
"data-testid": "linked-plugins-inline"
|
|
3066
3066
|
}, bt = 7, _d = /* @__PURE__ */ Y({
|
|
@@ -3101,7 +3101,7 @@ const Fe = (e) => {
|
|
|
3101
3101
|
]);
|
|
3102
3102
|
};
|
|
3103
3103
|
}
|
|
3104
|
-
}), gd = /* @__PURE__ */ te(_d, [["__scopeId", "data-v-
|
|
3104
|
+
}), gd = /* @__PURE__ */ te(_d, [["__scopeId", "data-v-c39556bc"]]), bd = { class: "plugin-item" }, yd = /* @__PURE__ */ Y({
|
|
3105
3105
|
__name: "PluginItem",
|
|
3106
3106
|
props: {
|
|
3107
3107
|
pluginName: {}
|
|
@@ -3115,7 +3115,7 @@ const Fe = (e) => {
|
|
|
3115
3115
|
K("span", null, B(e.pluginName), 1)
|
|
3116
3116
|
]));
|
|
3117
3117
|
}
|
|
3118
|
-
}), vd = /* @__PURE__ */ te(yd, [["__scopeId", "data-v-
|
|
3118
|
+
}), vd = /* @__PURE__ */ te(yd, [["__scopeId", "data-v-de964dc4"]]), hd = { class: "toolbar-container" }, wd = /* @__PURE__ */ Y({
|
|
3119
3119
|
__name: "LinkedPluginList",
|
|
3120
3120
|
props: {
|
|
3121
3121
|
config: {
|
|
@@ -4093,7 +4093,7 @@ const Pd = ["id"], $d = /* @__PURE__ */ Y({
|
|
|
4093
4093
|
}, 8, ["title", "visible"]);
|
|
4094
4094
|
};
|
|
4095
4095
|
}
|
|
4096
|
-
}), Vd = /* @__PURE__ */ te($d, [["__scopeId", "data-v-
|
|
4096
|
+
}), Vd = /* @__PURE__ */ te($d, [["__scopeId", "data-v-280b73f4"]]), Md = { class: "selected-redis-config" }, jd = ["data-testid"], Dd = {
|
|
4097
4097
|
class: "select-item-name",
|
|
4098
4098
|
"data-testid": "selected-redis-config"
|
|
4099
4099
|
}, Ld = {
|
|
@@ -4201,7 +4201,7 @@ const Pd = ["id"], $d = /* @__PURE__ */ Y({
|
|
|
4201
4201
|
], 64);
|
|
4202
4202
|
};
|
|
4203
4203
|
}
|
|
4204
|
-
}), tu = /* @__PURE__ */ te(Ud, [["__scopeId", "data-v-
|
|
4204
|
+
}), tu = /* @__PURE__ */ te(Ud, [["__scopeId", "data-v-3c6e44d3"]]), nu = {
|
|
4205
4205
|
useLinkedPlugins: fi,
|
|
4206
4206
|
useLinkedPluginsFetcher: Fe,
|
|
4207
4207
|
useRedisConfigurationSelector: pi
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(V,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/entities-shared/dist/style.css"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/entities-vaults"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins-icon"),require("@kong-ui-public/forms")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared/dist/style.css","@kong-ui-public/entities-vaults/dist/style.css","@kong-ui-public/entities-shared","@kong-ui-public/entities-vaults","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-plugins-icon","@kong-ui-public/forms"],t):(V=typeof globalThis<"u"?globalThis:V||self,t(V["kong-ui-public-entities-redis-configurations"]={},V.Vue,null,null,V["kong-ui-public-entities-shared"],V["kong-ui-public-entities-vaults"],V.VueRouter,V.KongIcons,V["kong-ui-public-i18n"],V["kong-ui-public-entities-plugins-icon"],V.forms))})(this,function(V,t,Cs,Ts,_,J,mt,Q,gt,_t,yt){"use strict";var C=(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))(C||{}),L=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(L||{}),D=(e=>(e.AWS="aws",e.GCP="gcp",e.AZURE="azure",e))(D||{}),bt=typeof global=="object"&&global&&global.Object===Object&&global,Un=typeof self=="object"&&self&&self.Object===Object&&self,Z=bt||Un||Function("return this")(),F=Z.Symbol,ht=Object.prototype,Fn=ht.hasOwnProperty,zn=ht.toString,Ce=F?F.toStringTag:void 0;function Kn(e){var n=Fn.call(e,Ce),r=e[Ce];try{e[Ce]=void 0;var i=!0}catch{}var o=zn.call(e);return i&&(n?e[Ce]=r:delete e[Ce]),o}var Hn=Object.prototype,Wn=Hn.toString;function qn(e){return Wn.call(e)}var Gn="[object Null]",Jn="[object Undefined]",wt=F?F.toStringTag:void 0;function le(e){return e==null?e===void 0?Jn:Gn:wt&&wt in Object(e)?Kn(e):qn(e)}function Y(e){return e!=null&&typeof e=="object"}var Zn="[object Symbol]";function ze(e){return typeof e=="symbol"||Y(e)&&le(e)==Zn}function Ct(e,n){for(var r=-1,i=e==null?0:e.length,o=Array(i);++r<i;)o[r]=n(e[r],r,e);return o}var X=Array.isArray,Tt=F?F.prototype:void 0,St=Tt?Tt.toString:void 0;function kt(e){if(typeof e=="string")return e;if(X(e))return Ct(e,kt)+"";if(ze(e))return St?St.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function Ie(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function Qn(e){return e}var Yn="[object AsyncFunction]",Xn="[object Function]",er="[object GeneratorFunction]",tr="[object Proxy]";function Et(e){if(!Ie(e))return!1;var n=le(e);return n==Xn||n==er||n==Yn||n==tr}var Ke=Z["__core-js_shared__"],Vt=function(){var e=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function nr(e){return!!Vt&&Vt in e}var rr=Function.prototype,or=rr.toString;function se(e){if(e!=null){try{return or.call(e)}catch{}try{return e+""}catch{}}return""}var ir=/[\\^$.*+?()[\]{}|]/g,ar=/^\[object .+?Constructor\]$/,lr=Function.prototype,sr=Object.prototype,cr=lr.toString,dr=sr.hasOwnProperty,ur=RegExp("^"+cr.call(dr).replace(ir,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fr(e){if(!Ie(e)||nr(e))return!1;var n=Et(e)?ur:ar;return n.test(se(e))}function pr(e,n){return e==null?void 0:e[n]}function ce(e,n){var r=pr(e,n);return fr(r)?r:void 0}var He=ce(Z,"WeakMap");function mr(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}var gr=800,_r=16,yr=Date.now;function br(e){var n=0,r=0;return function(){var i=yr(),o=_r-(i-r);if(r=i,o>0){if(++n>=gr)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function hr(e){return function(){return e}}var Oe=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch{}}(),wr=Oe?function(e,n){return Oe(e,"toString",{configurable:!0,enumerable:!1,value:hr(n),writable:!0})}:Qn,Cr=br(wr);function Tr(e,n){for(var r=-1,i=e==null?0:e.length;++r<i&&n(e[r],r,e)!==!1;);return e}var Sr=9007199254740991,kr=/^(?:0|[1-9]\d*)$/;function Er(e,n){var r=typeof e;return n=n??Sr,!!n&&(r=="number"||r!="symbol"&&kr.test(e))&&e>-1&&e%1==0&&e<n}function xt(e,n,r){n=="__proto__"&&Oe?Oe(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}function We(e,n){return e===n||e!==e&&n!==n}var Vr=Object.prototype,xr=Vr.hasOwnProperty;function It(e,n,r){var i=e[n];(!(xr.call(e,n)&&We(i,r))||r===void 0&&!(n in e))&&xt(e,n,r)}function Ir(e,n,r,i){var o=!r;r||(r={});for(var a=-1,u=n.length;++a<u;){var p=n[a],l=void 0;l===void 0&&(l=e[p]),o?xt(r,p,l):It(r,p,l)}return r}var Ot=Math.max;function Or(e,n,r){return n=Ot(n===void 0?e.length-1:n,0),function(){for(var i=arguments,o=-1,a=Ot(i.length-n,0),u=Array(a);++o<a;)u[o]=i[n+o];o=-1;for(var p=Array(n+1);++o<n;)p[o]=i[o];return p[n]=r(u),mr(e,this,p)}}var Rr=9007199254740991;function Rt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Rr}function Pt(e){return e!=null&&Rt(e.length)&&!Et(e)}var Pr=Object.prototype;function At(e){var n=e&&e.constructor,r=typeof n=="function"&&n.prototype||Pr;return e===r}function Ar(e,n){for(var r=-1,i=Array(e);++r<e;)i[r]=n(r);return i}var Nr="[object Arguments]";function Nt(e){return Y(e)&&le(e)==Nr}var $t=Object.prototype,$r=$t.hasOwnProperty,Br=$t.propertyIsEnumerable,Bt=Nt(function(){return arguments}())?Nt:function(e){return Y(e)&&$r.call(e,"callee")&&!Br.call(e,"callee")};function Dr(){return!1}var Dt=typeof V=="object"&&V&&!V.nodeType&&V,vt=Dt&&typeof module=="object"&&module&&!module.nodeType&&module,vr=vt&&vt.exports===Dt,Mt=vr?Z.Buffer:void 0,Mr=Mt?Mt.isBuffer:void 0,Re=Mr||Dr,jr="[object Arguments]",Lr="[object Array]",Ur="[object Boolean]",Fr="[object Date]",zr="[object Error]",Kr="[object Function]",Hr="[object Map]",Wr="[object Number]",qr="[object Object]",Gr="[object RegExp]",Jr="[object Set]",Zr="[object String]",Qr="[object WeakMap]",Yr="[object ArrayBuffer]",Xr="[object DataView]",eo="[object Float32Array]",to="[object Float64Array]",no="[object Int8Array]",ro="[object Int16Array]",oo="[object Int32Array]",io="[object Uint8Array]",ao="[object Uint8ClampedArray]",lo="[object Uint16Array]",so="[object Uint32Array]",A={};A[eo]=A[to]=A[no]=A[ro]=A[oo]=A[io]=A[ao]=A[lo]=A[so]=!0,A[jr]=A[Lr]=A[Yr]=A[Ur]=A[Xr]=A[Fr]=A[zr]=A[Kr]=A[Hr]=A[Wr]=A[qr]=A[Gr]=A[Jr]=A[Zr]=A[Qr]=!1;function co(e){return Y(e)&&Rt(e.length)&&!!A[le(e)]}function qe(e){return function(n){return e(n)}}var jt=typeof V=="object"&&V&&!V.nodeType&&V,Te=jt&&typeof module=="object"&&module&&!module.nodeType&&module,uo=Te&&Te.exports===jt,Ge=uo&&bt.process,ge=function(){try{var e=Te&&Te.require&&Te.require("util").types;return e||Ge&&Ge.binding&&Ge.binding("util")}catch{}}(),Lt=ge&&ge.isTypedArray,Ut=Lt?qe(Lt):co,fo=Object.prototype,po=fo.hasOwnProperty;function Ft(e,n){var r=X(e),i=!r&&Bt(e),o=!r&&!i&&Re(e),a=!r&&!i&&!o&&Ut(e),u=r||i||o||a,p=u?Ar(e.length,String):[],l=p.length;for(var d in e)(n||po.call(e,d))&&!(u&&(d=="length"||o&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Er(d,l)))&&p.push(d);return p}function zt(e,n){return function(r){return e(n(r))}}var mo=zt(Object.keys,Object),go=Object.prototype,_o=go.hasOwnProperty;function yo(e){if(!At(e))return mo(e);var n=[];for(var r in Object(e))_o.call(e,r)&&r!="constructor"&&n.push(r);return n}function bo(e){return Pt(e)?Ft(e):yo(e)}function ho(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var wo=Object.prototype,Co=wo.hasOwnProperty;function To(e){if(!Ie(e))return ho(e);var n=At(e),r=[];for(var i in e)i=="constructor"&&(n||!Co.call(e,i))||r.push(i);return r}function So(e){return Pt(e)?Ft(e,!0):To(e)}var ko=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eo=/^\w*$/;function Vo(e,n){if(X(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ze(e)?!0:Eo.test(e)||!ko.test(e)||n!=null&&e in Object(n)}var Se=ce(Object,"create");function xo(){this.__data__=Se?Se(null):{},this.size=0}function Io(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Oo="__lodash_hash_undefined__",Ro=Object.prototype,Po=Ro.hasOwnProperty;function Ao(e){var n=this.__data__;if(Se){var r=n[e];return r===Oo?void 0:r}return Po.call(n,e)?n[e]:void 0}var No=Object.prototype,$o=No.hasOwnProperty;function Bo(e){var n=this.__data__;return Se?n[e]!==void 0:$o.call(n,e)}var Do="__lodash_hash_undefined__";function vo(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Se&&n===void 0?Do:n,this}function de(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}de.prototype.clear=xo,de.prototype.delete=Io,de.prototype.get=Ao,de.prototype.has=Bo,de.prototype.set=vo;function Mo(){this.__data__=[],this.size=0}function Pe(e,n){for(var r=e.length;r--;)if(We(e[r][0],n))return r;return-1}var jo=Array.prototype,Lo=jo.splice;function Uo(e){var n=this.__data__,r=Pe(n,e);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Lo.call(n,r,1),--this.size,!0}function Fo(e){var n=this.__data__,r=Pe(n,e);return r<0?void 0:n[r][1]}function zo(e){return Pe(this.__data__,e)>-1}function Ko(e,n){var r=this.__data__,i=Pe(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this}function ee(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}ee.prototype.clear=Mo,ee.prototype.delete=Uo,ee.prototype.get=Fo,ee.prototype.has=zo,ee.prototype.set=Ko;var ke=ce(Z,"Map");function Ho(){this.size=0,this.__data__={hash:new de,map:new(ke||ee),string:new de}}function Wo(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Ae(e,n){var r=e.__data__;return Wo(n)?r[typeof n=="string"?"string":"hash"]:r.map}function qo(e){var n=Ae(this,e).delete(e);return this.size-=n?1:0,n}function Go(e){return Ae(this,e).get(e)}function Jo(e){return Ae(this,e).has(e)}function Zo(e,n){var r=Ae(this,e),i=r.size;return r.set(e,n),this.size+=r.size==i?0:1,this}function te(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}te.prototype.clear=Ho,te.prototype.delete=qo,te.prototype.get=Go,te.prototype.has=Jo,te.prototype.set=Zo;var Qo="Expected a function";function Je(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(Qo);var r=function(){var i=arguments,o=n?n.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);var u=e.apply(this,i);return r.cache=a.set(o,u)||a,u};return r.cache=new(Je.Cache||te),r}Je.Cache=te;var Yo=500;function Xo(e){var n=Je(e,function(i){return r.size===Yo&&r.clear(),i}),r=n.cache;return n}var ei=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ti=/\\(\\)?/g,ni=Xo(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(ei,function(r,i,o,a){n.push(o?a.replace(ti,"$1"):i||r)}),n});function ri(e){return e==null?"":kt(e)}function Ze(e,n){return X(e)?e:Vo(e,n)?[e]:ni(ri(e))}function Kt(e){if(typeof e=="string"||ze(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function oi(e,n){n=Ze(n,e);for(var r=0,i=n.length;e!=null&&r<i;)e=e[Kt(n[r++])];return r&&r==i?e:void 0}function Qe(e,n){for(var r=-1,i=n.length,o=e.length;++r<i;)e[o+r]=n[r];return e}var Ht=F?F.isConcatSpreadable:void 0;function ii(e){return X(e)||Bt(e)||!!(Ht&&e&&e[Ht])}function ai(e,n,r,i,o){var a=-1,u=e.length;for(r||(r=ii),o||(o=[]);++a<u;){var p=e[a];r(p)?Qe(o,p):o[o.length]=p}return o}function li(e){var n=e==null?0:e.length;return n?ai(e):[]}function si(e){return Cr(Or(e,void 0,li),e+"")}var Wt=zt(Object.getPrototypeOf,Object),ci="[object Object]",di=Function.prototype,ui=Object.prototype,qt=di.toString,fi=ui.hasOwnProperty,pi=qt.call(Object);function mi(e){if(!Y(e)||le(e)!=ci)return!1;var n=Wt(e);if(n===null)return!0;var r=fi.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&qt.call(r)==pi}function gi(e,n,r){var i=-1,o=e.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(o);++i<o;)a[i]=e[i+n];return a}function _i(){this.__data__=new ee,this.size=0}function yi(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}function bi(e){return this.__data__.get(e)}function hi(e){return this.__data__.has(e)}var wi=200;function Ci(e,n){var r=this.__data__;if(r instanceof ee){var i=r.__data__;if(!ke||i.length<wi-1)return i.push([e,n]),this.size=++r.size,this;r=this.__data__=new te(i)}return r.set(e,n),this.size=r.size,this}function ne(e){var n=this.__data__=new ee(e);this.size=n.size}ne.prototype.clear=_i,ne.prototype.delete=yi,ne.prototype.get=bi,ne.prototype.has=hi,ne.prototype.set=Ci;var Gt=typeof V=="object"&&V&&!V.nodeType&&V,Jt=Gt&&typeof module=="object"&&module&&!module.nodeType&&module,Ti=Jt&&Jt.exports===Gt,Zt=Ti?Z.Buffer:void 0;Zt&&Zt.allocUnsafe;function Si(e,n){return e.slice()}function ki(e,n){for(var r=-1,i=e==null?0:e.length,o=0,a=[];++r<i;){var u=e[r];n(u,r,e)&&(a[o++]=u)}return a}function Qt(){return[]}var Ei=Object.prototype,Vi=Ei.propertyIsEnumerable,Yt=Object.getOwnPropertySymbols,Xt=Yt?function(e){return e==null?[]:(e=Object(e),ki(Yt(e),function(n){return Vi.call(e,n)}))}:Qt,xi=Object.getOwnPropertySymbols,Ii=xi?function(e){for(var n=[];e;)Qe(n,Xt(e)),e=Wt(e);return n}:Qt;function en(e,n,r){var i=n(e);return X(e)?i:Qe(i,r(e))}function tn(e){return en(e,bo,Xt)}function nn(e){return en(e,So,Ii)}var Ye=ce(Z,"DataView"),Xe=ce(Z,"Promise"),et=ce(Z,"Set"),rn="[object Map]",Oi="[object Object]",on="[object Promise]",an="[object Set]",ln="[object WeakMap]",sn="[object DataView]",Ri=se(Ye),Pi=se(ke),Ai=se(Xe),Ni=se(et),$i=se(He),K=le;(Ye&&K(new Ye(new ArrayBuffer(1)))!=sn||ke&&K(new ke)!=rn||Xe&&K(Xe.resolve())!=on||et&&K(new et)!=an||He&&K(new He)!=ln)&&(K=function(e){var n=le(e),r=n==Oi?e.constructor:void 0,i=r?se(r):"";if(i)switch(i){case Ri:return sn;case Pi:return rn;case Ai:return on;case Ni:return an;case $i:return ln}return n});var Bi=Object.prototype,Di=Bi.hasOwnProperty;function vi(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Di.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Ne=Z.Uint8Array;function tt(e){var n=new e.constructor(e.byteLength);return new Ne(n).set(new Ne(e)),n}function Mi(e,n){var r=tt(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var ji=/\w*$/;function Li(e){var n=new e.constructor(e.source,ji.exec(e));return n.lastIndex=e.lastIndex,n}var cn=F?F.prototype:void 0,dn=cn?cn.valueOf:void 0;function Ui(e){return dn?Object(dn.call(e)):{}}function Fi(e,n){var r=tt(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var zi="[object Boolean]",Ki="[object Date]",Hi="[object Map]",Wi="[object Number]",qi="[object RegExp]",Gi="[object Set]",Ji="[object String]",Zi="[object Symbol]",Qi="[object ArrayBuffer]",Yi="[object DataView]",Xi="[object Float32Array]",ea="[object Float64Array]",ta="[object Int8Array]",na="[object Int16Array]",ra="[object Int32Array]",oa="[object Uint8Array]",ia="[object Uint8ClampedArray]",aa="[object Uint16Array]",la="[object Uint32Array]";function sa(e,n,r){var i=e.constructor;switch(n){case Qi:return tt(e);case zi:case Ki:return new i(+e);case Yi:return Mi(e);case Xi:case ea:case ta:case na:case ra:case oa:case ia:case aa:case la:return Fi(e);case Hi:return new i;case Wi:case Ji:return new i(e);case qi:return Li(e);case Gi:return new i;case Zi:return Ui(e)}}var ca="[object Map]";function da(e){return Y(e)&&K(e)==ca}var un=ge&&ge.isMap,ua=un?qe(un):da,fa="[object Set]";function pa(e){return Y(e)&&K(e)==fa}var fn=ge&&ge.isSet,ma=fn?qe(fn):pa,pn="[object Arguments]",ga="[object Array]",_a="[object Boolean]",ya="[object Date]",ba="[object Error]",mn="[object Function]",ha="[object GeneratorFunction]",wa="[object Map]",Ca="[object Number]",gn="[object Object]",Ta="[object RegExp]",Sa="[object Set]",ka="[object String]",Ea="[object Symbol]",Va="[object WeakMap]",xa="[object ArrayBuffer]",Ia="[object DataView]",Oa="[object Float32Array]",Ra="[object Float64Array]",Pa="[object Int8Array]",Aa="[object Int16Array]",Na="[object Int32Array]",$a="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",va="[object Uint32Array]",P={};P[pn]=P[ga]=P[xa]=P[Ia]=P[_a]=P[ya]=P[Oa]=P[Ra]=P[Pa]=P[Aa]=P[Na]=P[wa]=P[Ca]=P[gn]=P[Ta]=P[Sa]=P[ka]=P[Ea]=P[$a]=P[Ba]=P[Da]=P[va]=!0,P[ba]=P[mn]=P[Va]=!1;function $e(e,n,r,i,o,a){var u;if(r&&(u=o?r(e,i,o,a):r(e)),u!==void 0)return u;if(!Ie(e))return e;var p=X(e);if(p)u=vi(e);else{var l=K(e),d=l==mn||l==ha;if(Re(e))return Si(e);if(l==gn||l==pn||d&&!o)u={};else{if(!P[l])return o?e:{};u=sa(e,l)}}a||(a=new ne);var h=a.get(e);if(h)return h;a.set(e,u),ma(e)?e.forEach(function(y){u.add($e(y,n,r,y,e,a))}):ua(e)&&e.forEach(function(y,g){u.set(g,$e(y,n,r,g,e,a))});var T=nn,m=p?void 0:T(e);return Tr(m||e,function(y,g){m&&(g=y,y=e[g]),It(u,g,$e(y,n,r,g,e,a))}),u}var Ma="__lodash_hash_undefined__";function ja(e){return this.__data__.set(e,Ma),this}function La(e){return this.__data__.has(e)}function Be(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new te;++n<r;)this.add(e[n])}Be.prototype.add=Be.prototype.push=ja,Be.prototype.has=La;function Ua(e,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(e[r],r,e))return!0;return!1}function Fa(e,n){return e.has(n)}var za=1,Ka=2;function _n(e,n,r,i,o,a){var u=r&za,p=e.length,l=n.length;if(p!=l&&!(u&&l>p))return!1;var d=a.get(e),h=a.get(n);if(d&&h)return d==n&&h==e;var T=-1,m=!0,y=r&Ka?new Be:void 0;for(a.set(e,n),a.set(n,e);++T<p;){var g=e[T],S=n[T];if(i)var s=u?i(S,g,T,n,e,a):i(g,S,T,e,n,a);if(s!==void 0){if(s)continue;m=!1;break}if(y){if(!Ua(n,function(O,E){if(!Fa(y,E)&&(g===O||o(g,O,r,i,a)))return y.push(E)})){m=!1;break}}else if(!(g===S||o(g,S,r,i,a))){m=!1;break}}return a.delete(e),a.delete(n),m}function Ha(e){var n=-1,r=Array(e.size);return e.forEach(function(i,o){r[++n]=[o,i]}),r}function Wa(e){var n=-1,r=Array(e.size);return e.forEach(function(i){r[++n]=i}),r}var qa=1,Ga=2,Ja="[object Boolean]",Za="[object Date]",Qa="[object Error]",Ya="[object Map]",Xa="[object Number]",el="[object RegExp]",tl="[object Set]",nl="[object String]",rl="[object Symbol]",ol="[object ArrayBuffer]",il="[object DataView]",yn=F?F.prototype:void 0,nt=yn?yn.valueOf:void 0;function al(e,n,r,i,o,a,u){switch(r){case il:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case ol:return!(e.byteLength!=n.byteLength||!a(new Ne(e),new Ne(n)));case Ja:case Za:case Xa:return We(+e,+n);case Qa:return e.name==n.name&&e.message==n.message;case el:case nl:return e==n+"";case Ya:var p=Ha;case tl:var l=i&qa;if(p||(p=Wa),e.size!=n.size&&!l)return!1;var d=u.get(e);if(d)return d==n;i|=Ga,u.set(e,n);var h=_n(p(e),p(n),i,o,a,u);return u.delete(e),h;case rl:if(nt)return nt.call(e)==nt.call(n)}return!1}var ll=1,sl=Object.prototype,cl=sl.hasOwnProperty;function dl(e,n,r,i,o,a){var u=r&ll,p=tn(e),l=p.length,d=tn(n),h=d.length;if(l!=h&&!u)return!1;for(var T=l;T--;){var m=p[T];if(!(u?m in n:cl.call(n,m)))return!1}var y=a.get(e),g=a.get(n);if(y&&g)return y==n&&g==e;var S=!0;a.set(e,n),a.set(n,e);for(var s=u;++T<l;){m=p[T];var O=e[m],E=n[m];if(i)var c=u?i(E,O,m,n,e,a):i(O,E,m,e,n,a);if(!(c===void 0?O===E||o(O,E,r,i,a):c)){S=!1;break}s||(s=m=="constructor")}if(S&&!s){var x=e.constructor,R=n.constructor;x!=R&&"constructor"in e&&"constructor"in n&&!(typeof x=="function"&&x instanceof x&&typeof R=="function"&&R instanceof R)&&(S=!1)}return a.delete(e),a.delete(n),S}var ul=1,bn="[object Arguments]",hn="[object Array]",De="[object Object]",fl=Object.prototype,wn=fl.hasOwnProperty;function pl(e,n,r,i,o,a){var u=X(e),p=X(n),l=u?hn:K(e),d=p?hn:K(n);l=l==bn?De:l,d=d==bn?De:d;var h=l==De,T=d==De,m=l==d;if(m&&Re(e)){if(!Re(n))return!1;u=!0,h=!1}if(m&&!h)return a||(a=new ne),u||Ut(e)?_n(e,n,r,i,o,a):al(e,n,l,r,i,o,a);if(!(r&ul)){var y=h&&wn.call(e,"__wrapped__"),g=T&&wn.call(n,"__wrapped__");if(y||g){var S=y?e.value():e,s=g?n.value():n;return a||(a=new ne),o(S,s,r,i,a)}}return m?(a||(a=new ne),dl(e,n,r,i,o,a)):!1}function Cn(e,n,r,i,o){return e===n?!0:e==null||n==null||!Y(e)&&!Y(n)?e!==e&&n!==n:pl(e,n,r,i,Cn,o)}function ml(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function gl(e,n){return n.length<2?e:oi(e,gi(n,0,-1))}function _l(e,n){return Cn(e,n)}var yl=Object.prototype,bl=yl.hasOwnProperty;function hl(e,n){n=Ze(n,e);var r=-1,i=n.length;if(!i)return!0;for(var o=e==null||typeof e!="object"&&typeof e!="function";++r<i;){var a=n[r];if(typeof a=="string"){if(a==="__proto__"&&!bl.call(e,"__proto__"))return!1;if(a==="constructor"&&r+1<i&&typeof n[r+1]=="string"&&n[r+1]==="prototype"){if(o&&r===0)continue;return!1}}}var u=gl(e,n);return u==null||delete u[Kt(ml(n))]}function wl(e){return mi(e)?void 0:e}var Cl=1,Tl=2,Sl=4,kl=si(function(e,n){var r={};if(e==null)return r;var i=!1;n=Ct(n,function(a){return a=Ze(a,e),i||(i=a.length>1),a}),Ir(e,nn(e),r),i&&(r=$e(r,Cl|Tl|Sl,wl));for(var o=n.length;o--;)hl(r,n[o]);return r});const j=[];for(let e=0;e<256;++e)j.push((e+256).toString(16).slice(1));function El(e,n=0){return(j[e[n+0]]+j[e[n+1]]+j[e[n+2]]+j[e[n+3]]+"-"+j[e[n+4]]+j[e[n+5]]+"-"+j[e[n+6]]+j[e[n+7]]+"-"+j[e[n+8]]+j[e[n+9]]+"-"+j[e[n+10]]+j[e[n+11]]+j[e[n+12]]+j[e[n+13]]+j[e[n+14]]+j[e[n+15]]).toLowerCase()}let rt;const Vl=new Uint8Array(16);function xl(){if(!rt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");rt=crypto.getRandomValues.bind(crypto)}return rt(Vl)}const Tn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Il(e,n,r){var o;if(Tn.randomUUID&&!e)return Tn.randomUUID();e=e||{};const i=e.random??((o=e.rng)==null?void 0:o.call(e))??xl();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,El(i)}const Sn={ip:"127.0.0.1",port:6379},kn={host:"127.0.0.1",port:6379},_e=C.HOST_PORT_EE,En={port:6379,host:"127.0.0.1",database:0,username:"",password:"",ssl:!1,ssl_verify:!1,server_name:"",connect_timeout:2e3,send_timeout:2e3,read_timeout:2e3,sentinel_username:"",sentinel_password:"",keepalive_pool_size:256,keepalive_backlog:0,sentinel_master:"",sentinel_nodes:[],cluster_nodes:[],cluster_max_redirections:0,connection_is_proxied:!1,timeout:2e3,cloud_authentication:{aws_is_serverless:!0}},Ol=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_CLUSTER_NODE:Sn,DEFAULT_FIELDS:En,DEFAULT_REDIS_TYPE:_e,DEFAULT_SENTINEL_NODE:kn},Symbol.toStringTag,{value:"Module"})),Ee=e=>({...e,id:Il()}),ot=e=>{const{id:n,...r}=e;return r},Vn=()=>Ee(kn),xn=()=>Ee(Sn),Ve=e=>{var n,r;return e.type===L.REDIS_CE?C.HOST_PORT_CE:(n=e.config.sentinel_nodes)!=null&&n.length?C.SENTINEL:(r=e.config.cluster_nodes)!=null&&r.length?C.CLUSTER:C.HOST_PORT_EE},ve=e=>e===C.HOST_PORT_CE?L.REDIS_CE:L.REDIS_EE,w={int(e,n){return e==null?n:parseInt(e.toString(),10)},str(e,n){return e==null||e===""?n:e.toString()},removeIdClusterNodes(e){return e.map(n=>({...ot(n),port:w.int(n.port)}))},removeIdFromSentinelNodes(e){return e.map(n=>({...ot(n),port:w.int(n.port)}))},addIdToClusterNodes(e){return e.map(Ee)},addIdToSentinelNodes(e){return e.map(Ee)},removeNullValues(e){const n={...e};for(const r in n)n[r]===null&&delete n[r];return n},stringToArray(e,n=","){return e?e.split(n).map(r=>String(r||"").trim()).filter(r=>r!==""):[]},arrayToString(e,n=", "){return e?e.join(n):""}},it=e=>{switch(e==null?void 0:e.auth_provider){case D.AWS:return{auth_provider:e.auth_provider,aws_cache_name:e.aws_cache_name,aws_region:e.aws_region,aws_is_serverless:e.aws_is_serverless,aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key,aws_assume_role_arn:e.aws_assume_role_arn,aws_role_session_name:e.aws_role_session_name};case D.GCP:return{auth_provider:e.auth_provider,gcp_service_account_json:e.gcp_service_account_json};case D.AZURE:return{auth_provider:e.auth_provider,azure_client_id:e.azure_client_id,azure_client_secret:e.azure_client_secret,azure_tenant_id:e.azure_tenant_id};default:return null}},Rl=Object.freeze(Object.defineProperty({__proto__:null,genDefaultClusterNode:xn,genDefaultSentinelNode:Vn,getRedisType:Ve,mapRedisTypeToPartialType:ve,pickCloudAuthFields:it,shallowCopyWithId:Ee,shallowCopyWithoutId:ot,standardize:w},Symbol.toStringTag,{value:"Module"})),Me="/v2/control-planes/{controlPlaneId}/core-entities",je="/{workspace}",ye={list:{konnect:`${Me}/partials`,kongManager:`${je}/partials`},form:{konnect:{create:`${Me}/partials`,edit:`${Me}/partials/{id}`},kongManager:{create:`${je}/partials`,edit:`${je}/partials/{id}`}},links:{konnect:`${Me}/partials/{id}/links`,kongManager:`${je}/partials/{id}/links`}},Pl=e=>{if(e==null||e==="")return!1;if(typeof e=="string"){const n=parseInt(e,10);return Number.isNaN(n)?!0:n>=0&&n<=65535}return typeof e=="number"?e>=0&&e<=65535:!1},Al=e=>{const{partialId:n,config:r,defaultRedisType:i=_e}=e,o=!!n,{axiosInstance:a}=_.useAxios(r.axiosRequestConfig),{getMessageFromError:u}=_.useErrors(),p=t.computed(()=>n?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),l=t.reactive({fields:{name:"",tags:"",type:ve(i),config:JSON.parse(JSON.stringify(En))},readonly:!1,errorMessage:""}),d=t.ref(),h=t.ref(i),T=t.computed(()=>h.value===C.HOST_PORT_EE||h.value===C.CLUSTER||h.value===C.SENTINEL);t.watch(h,c=>{l.fields.type=ve(c)});const m=t.computed(()=>{var x,R,M,U;if(o&&_l(d.value,g.value)||!((x=l.fields.name)!=null&&x.length))return!1;const{config:c}=l.fields;switch(h.value){case C.HOST_PORT_CE:case C.HOST_PORT_EE:return!!c.host&&c.host.length>0&&Pl(c.port)&&(((R=c.cloud_authentication)==null?void 0:R.auth_provider)!=="aws"||!!c.cloud_authentication.aws_cache_name);case C.CLUSTER:return!!c.cluster_nodes.length&&c.cluster_nodes.every(H=>H.ip.length>0)&&(((M=c.cloud_authentication)==null?void 0:M.auth_provider)!=="aws"||!!c.cloud_authentication.aws_cache_name);case C.SENTINEL:return!!c.sentinel_nodes.length&&c.sentinel_nodes.every(H=>H.host.length>0)&&!!((U=c.sentinel_master)!=null&&U.length)&&c.sentinel_role&&!!c.sentinel_role.length;default:throw new Error("Invalid redis type")}}),y=()=>{if(!e.cloudAuthAvailable)return;const c=it(l.fields.config.cloud_authentication);return c!=null&&c.auth_provider?{auth_provider:c.auth_provider,aws_cache_name:w.str(c.aws_cache_name,null),aws_region:w.str(c.aws_region,null),aws_is_serverless:c.aws_is_serverless,aws_access_key_id:w.str(c.aws_access_key_id,null),aws_secret_access_key:w.str(c.aws_secret_access_key,null),aws_assume_role_arn:w.str(c.aws_assume_role_arn,null),aws_role_session_name:w.str(c.aws_role_session_name,null),gcp_service_account_json:w.str(c.gcp_service_account_json,null),azure_client_id:w.str(c.azure_client_id,null),azure_client_secret:w.str(c.azure_client_secret,null),azure_tenant_id:w.str(c.azure_tenant_id,null)}:null},g=t.computed(()=>{switch(h.value){case C.HOST_PORT_CE:return{name:l.fields.name,type:l.fields.type,tags:w.stringToArray(l.fields.tags),config:{cloud_authentication:y(),host:l.fields.config.host,port:w.int(l.fields.config.port),timeout:w.int(l.fields.config.timeout),username:w.str(l.fields.config.username,null),database:w.int(l.fields.config.database),password:w.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:w.str(l.fields.config.server_name,null)}};case C.HOST_PORT_EE:return{name:l.fields.name,type:l.fields.type,tags:w.stringToArray(l.fields.tags),config:{cloud_authentication:y(),connect_timeout:w.int(l.fields.config.connect_timeout),connection_is_proxied:l.fields.config.connection_is_proxied,database:w.int(l.fields.config.database),host:l.fields.config.host,keepalive_backlog:w.int(l.fields.config.keepalive_backlog),keepalive_pool_size:w.int(l.fields.config.keepalive_pool_size),password:w.str(l.fields.config.password,null),port:Number.isNaN(Number(l.fields.config.port))?l.fields.config.port:w.int(l.fields.config.port),read_timeout:w.int(l.fields.config.read_timeout),send_timeout:w.int(l.fields.config.send_timeout),server_name:w.str(l.fields.config.server_name,null),ssl_verify:l.fields.config.ssl_verify,ssl:l.fields.config.ssl,username:w.str(l.fields.config.username,null),cluster_nodes:null,cluster_max_redirections:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null}};case C.CLUSTER:return{name:l.fields.name,type:l.fields.type,tags:w.stringToArray(l.fields.tags),config:{cloud_authentication:y(),cluster_nodes:w.removeIdClusterNodes(l.fields.config.cluster_nodes),cluster_max_redirections:w.int(l.fields.config.cluster_max_redirections),username:w.str(l.fields.config.username,null),password:w.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:w.str(l.fields.config.server_name,null),connect_timeout:w.int(l.fields.config.connect_timeout),database:w.int(l.fields.config.database),send_timeout:w.int(l.fields.config.send_timeout),read_timeout:w.int(l.fields.config.read_timeout),keepalive_pool_size:w.int(l.fields.config.keepalive_pool_size),keepalive_backlog:w.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null,host:null,port:null}};case C.SENTINEL:return{name:l.fields.name,type:l.fields.type,tags:w.stringToArray(l.fields.tags),config:{sentinel_master:w.str(l.fields.config.sentinel_master,null),sentinel_nodes:w.removeIdFromSentinelNodes(l.fields.config.sentinel_nodes),sentinel_role:w.str(l.fields.config.sentinel_role,null),sentinel_username:w.str(l.fields.config.sentinel_username,null),sentinel_password:w.str(l.fields.config.sentinel_password,null),username:w.str(l.fields.config.username,null),password:w.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:w.str(l.fields.config.server_name,null),database:w.int(l.fields.config.database),connect_timeout:w.int(l.fields.config.connect_timeout),send_timeout:w.int(l.fields.config.send_timeout),read_timeout:w.int(l.fields.config.read_timeout),keepalive_pool_size:w.int(l.fields.config.keepalive_pool_size),keepalive_backlog:w.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,cluster_nodes:null,cluster_max_redirections:null,host:null,port:null}};default:throw new Error("Invalid redis type")}}),S=t.computed(()=>{let c=`${r.apiBaseUrl}${ye.form[r.app][p.value]}`;return r.app==="konnect"?c=c.replace(/{controlPlaneId}/gi,(r==null?void 0:r.controlPlaneId)||""):r.app==="kongManager"&&(c=c.replace(/\/{workspace}/gi,r!=null&&r.workspace?`/${r.workspace}`:"")),c=c.replace(/{id}/gi,n||""),c}),s=t.computed(()=>{var c;return(c=ye.form[r==null?void 0:r.app])==null?void 0:c.edit});return{form:l,canSubmit:m,payload:g,isEdit:o,redisType:h,redisTypeIsEnterprise:T,formType:p,fetchUrl:s,submit:async()=>{try{l.readonly=!0,l.errorMessage="";let c=g.value;return r.app==="konnect"&&(c={...c,config:w.removeNullValues(c.config)}),p.value===_.EntityBaseFormType.Create?await a.post(S.value,c):r.app==="konnect"?await a.put(S.value,c):await a.patch(S.value,c)}catch(c){throw l.errorMessage=u(c),l.readonly=!1,c}},setInitialFormValues:c=>{l.fields.config=Object.assign({},l.fields.config,w.removeNullValues(c.config)),l.fields.config.sentinel_nodes=w.addIdToSentinelNodes(c.config.sentinel_nodes??[]),l.fields.config.cluster_nodes=w.addIdToClusterNodes(c.config.cluster_nodes??[]),l.fields.name=c.name,l.fields.type=c.type,l.fields.tags=w.arrayToString(c.tags),h.value=Ve(c),d.value=JSON.parse(JSON.stringify(g.value))}}},Nl={class:"array-card-container"},$l=t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0},disabled:{type:Boolean,default:!1}},emits:["remove-item"],setup(e){return(n,r)=>{const i=t.resolveComponent("KCard"),o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Nl,[t.createVNode(i,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",disabled:e.disabled,onClick:r[0]||(r[0]=a=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Q.TrashIcon))]),_:1},8,["disabled"])])}}}),z=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},In=z($l,[["__scopeId","data-v-1ba1e50d"]]),Bl={actions:{create:"New Redis Configuration",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",done:"Done",view:"View Details",loading:"Loading...",view_plugin:"View Plugin",close:"Close"},search:{placeholder:"Filter by name",placeholder_for_exact_match:"Filter by exact ID",no_results:"No results found"},selector:{placeholder:"Select a Redis configuration",empty_state:"No Redis configurations available",create_new:"Create new Redis configuration"},delete:{title:"Delete Redis configuration",description:"You’re about to delete this item. Are you sure you want to proceed?",warning:"To delete this configuration, first remove it from all associated plugins."},errors:{copy:"Failed to copy to clipboard",general:"Redis configuration could not be retrieved",delete:"The redis configuration could not be deleted at this time."},copy:{success:"Copied {val} to clipboard"},form:{redis_partial_modal_title:"Create Redis Configuration",partial_created_success_message:"Redis configuration created successfully",sections:{type:{title:"Redis type",description:"Both Enterprise and Open Source plugins support Redis. Enterprise plugins can connect to a standalone Redis instance (host/port), Cluster, or Sentinel, while Open Source plugins support only a simplified host/port configuration."},general:{title:"General information",description:"Name your Redis configuration."},connection:{title:"Connection settings",description:"Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."},cloud_auth:{title:"Cloud authentication settings",description:"Configure authentication settings for connecting to cloud-hosted Redis services."},cluster:{title:"Cluster configuration",description:"Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."},tls:{title:"TLS settings",description:"Configure secure connections to Redis, including SSL and verification options."},keepalive:{title:"Keepalive configuration",description:"Keepalive reuses active connections to Redis, improving performance and efficiency."},read_write_configuration:{title:"Read/Write configuration",description:"Set timeouts for reading from and writing to the Redis server to control data transmission reliability."},sentinel_configuration:{title:"Sentinel configuration",description:"Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."}},fields:{cloud_authentication:{auth_provider:{label:"Authentication provider",tooltip:"Auth provider to be used to authenticate to a Cloud Provider's Redis instance."},aws_cache_name:{label:"AWS cache name",tooltip:"The name of the AWS Elasticache cluster when `auth_provider` is set to `aws`."},aws_region:{label:"AWS region",tooltip:"The region of the AWS ElastiCache cluster when `auth_provider` is set to `aws`."},aws_is_serverless:{label:"Serverless ElastiCache",tooltip:"This flag specifies whether the cluster is serverless when auth_provider is set to `aws`."},aws_access_key_id:{label:"AWS access key ID",tooltip:"AWS Access Key ID to be used for authentication when `auth_provider` is set to `aws`."},aws_secret_access_key:{label:"AWS secret access key",tooltip:"AWS Secret Access Key to be used for authentication when `auth_provider` is set to `aws`."},aws_assume_role_arn:{label:"AWS assume role ARN",tooltip:"The ARN of the IAM role to assume for generating ElastiCache IAM authentication tokens."},aws_role_session_name:{label:"AWS role session name",tooltip:"The session name for the temporary credentials when assuming the IAM role."},gcp_service_account_json:{label:"GCP service account JSON",tooltip:"GCP Service Account JSON to be used for authentication when `auth_provider` is set to `gcp`."},azure_client_id:{label:"Azure client ID",tooltip:"Azure Client ID to be used for authentication when `auth_provider` is set to `azure`."},azure_client_secret:{label:"Azure client secret",tooltip:"Azure Client Secret to be used for authentication when `auth_provider` is set to `azure`."},azure_tenant_id:{label:"Azure tenant ID",tooltip:"Azure Tenant ID to be used for authentication when `auth_provider` is set to `azure`."}},type:{label:"Redis type"},name:{label:"Name",placeholder:"Enter unique name"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Route for grouping and filtering."},host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},database:{label:"Database",tooltip:"Database to use for the Redis connection."},password:{label:"Password",tooltip:"Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."},username:{label:"Username",tooltip:"Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`."},ssl:{label:"SSL",description:"If set to true, uses SSL to connect to Redis.",tooltip:"If set to true, uses SSL to connect to Redis."},ssl_verify:{label:"SSL Verify",description:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong. conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ss1_verify_depth accordingly.",tooltip:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong.conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly."},server_name:{label:"Server name",tooltip:"A string representing an SNI (server name indication) value for TLS."},keepalive_backlog:{label:"Keepalive backlog",tooltip:"Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`."},keepalive_pool_size:{label:"Keepalive pool size",tooltip:"The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low."},read_timeout:{label:"Read timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},send_timeout:{label:"Send timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},connect_timeout:{label:"Connect timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},sentinel_master:{label:"Sentinel master",tooltip:"Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."},sentinel_role:{label:"Sentinel role",tooltip:"Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."},sentinel_username:{label:"Sentinel username",tooltip:"Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."},sentinel_password:{label:"Sentinel password",tooltip:"Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."},cluster_node_ip:{label:"IP",tooltip:"A string representing a host name, such as example.com."},cluster_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},cluster_max_redirections:{label:"Cluster max redirections",tooltip:"Maximum retry attempts for redirection."},timeout:{label:"Timeout",tooltip:"redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"},connection_is_proxied:{label:"Connection is proxied",tooltip:"If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address."},cluster_nodes:{title:"Cluster nodes",tooltip:"Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_nodes:{title:"Sentinel nodes",tooltip:"Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_node_host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},sentinel_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."}},options:{auth_provider:{aws:"AWS",azure:"Azure",gcp:"GCP"},type:{host_port:"Host/Port",cluster:"Cluster",sentinel:"Sentinel",open_source:"Open Source",enterprise:"Enterprise",suffix_open_source:" (Open Source)",suffix_enterprise:" (Enterprise)"},sentinel_role:{master:"master",slave:"slave",any:"any"}},edit_warning_modal:{title:"Edit Redis configuration",description:"This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",plugin_count:"{count} plugin(s)",confirm:"Confirm"}},linked_plugins_modal:{title:"Associated plugins ({count})",headers:{plugin:"Plugin",instance_name:"Name"}},redis:{title:"Redis Configurations",empty_state:{title:"Configure a Redis Configuration",description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."}},list:{action:"New configuration",table_headers:{name:"Name",type:"Type",plugins:"Plugins",tags:"Tags"},empty_state:{description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",feature_1:{title:"Store your Redis configurations",description:"Define a Redis configuration once and use it across multiple plugins."},feature_2:{title:"Sync across plugins",description:"Edits to your configuration will be cascaded automatically to all associated plugins."}}}};function Le(){const e=gt.createI18n("en-us",Bl);return{i18n:e,i18nT:gt.i18nTComponent(e)}}const re={useI18n:Le},Dl={class:"cluster-node-items"},vl=z(t.defineComponent({__name:"ClusterNodes",props:t.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),{i18n:{t:r}}=re.useI18n(),i=()=>{n.value.push(xn())},o=a=>{n.value.splice(a,1)};return(a,u)=>{const p=t.resolveComponent("KLabel"),l=t.resolveComponent("KInput"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(p,{class:"required",info:t.unref(r)("form.fields.cluster_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("form.fields.cluster_nodes.title")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(h,T)=>(t.openBlock(),t.createBlock(In,{key:`${T}`,"data-testid":"redis-cluster-nodes",disabled:e.readonly,onRemoveItem:m=>o(T)},{default:t.withCtx(()=>[t.createElementVNode("div",Dl,[t.createVNode(l,{modelValue:h.ip,"onUpdate:modelValue":m=>h.ip=m,modelModifiers:{trim:!0},label:t.unref(r)("form.fields.cluster_node_ip.label"),"label-attributes":{info:t.unref(r)("form.fields.cluster_node_ip.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"ip",readonly:e.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),t.createVNode(l,{modelValue:h.port,"onUpdate:modelValue":m=>h.port=m,label:t.unref(r)("form.fields.cluster_node_port.label"),"label-attributes":{info:t.unref(r)("form.fields.cluster_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:e.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),t.createVNode(d,{appearance:"tertiary","data-testid":"redis-add-cluster-node-button",disabled:e.readonly,onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(Q.AddCircleIcon)),t.createElementVNode("span",null,t.toDisplayString(t.unref(r)("form.fields.cluster_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-0445479a"]]),On=()=>{const e=t.ref(),n=t.ref();return{vaultSecretPickerSetup:e,setUpVaultSecretPicker:(o,a)=>{e.value=o??"",n.value=a},handleVaultSecretPickerAutofill:o=>{var a;(a=n.value)==null||a.call(n,o),e.value=!1}}},Ml={class:"sentinel-node-items"},jl=z(t.defineComponent({__name:"SentinelNodes",props:t.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),{i18n:{t:r}}=re.useI18n(),i=()=>{n.value.push(Vn())},o=a=>{n.value.splice(a,1)};return(a,u)=>{const p=t.resolveComponent("KLabel"),l=t.resolveComponent("KInput"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(p,{class:"required",info:t.unref(r)("form.fields.sentinel_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("form.fields.sentinel_nodes.title")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(h,T)=>(t.openBlock(),t.createBlock(In,{key:h.id,"data-testid":"redis-sentinel-nodes",disabled:e.readonly,onRemoveItem:m=>o(T)},{default:t.withCtx(()=>[t.createElementVNode("div",Ml,[t.createVNode(l,{modelValue:h.host,"onUpdate:modelValue":m=>h.host=m,modelModifiers:{trim:!0},label:t.unref(r)("form.fields.sentinel_node_host.label"),"label-attributes":{info:t.unref(r)("form.fields.sentinel_node_host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",readonly:e.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),t.createVNode(l,{modelValue:h.port,"onUpdate:modelValue":m=>h.port=m,label:t.unref(r)("form.fields.sentinel_node_port.label"),"label-attributes":{info:t.unref(r)("form.fields.sentinel_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:e.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),t.createVNode(d,{appearance:"tertiary","data-testid":"redis-add-sentinel-node-button",disabled:e.readonly,onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(Q.AddCircleIcon)),t.createElementVNode("span",null,t.toDisplayString(t.unref(r)("form.fields.sentinel_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-ede40f84"]]),Ll=z(t.defineComponent({__name:"CloudAuthFields",props:t.mergeModels({config:{},readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),{i18n:{t:r}}=re.useI18n(),{vaultSecretPickerSetup:i,setUpVaultSecretPicker:o,handleVaultSecretPickerAutofill:a}=On(),u=[{key:"aws_cache_name",group:D.AWS,label:r("form.fields.cloud_authentication.aws_cache_name.label"),tooltip:r("form.fields.cloud_authentication.aws_cache_name.tooltip"),required:!0,referenceable:!0},{key:"aws_region",group:D.AWS,label:r("form.fields.cloud_authentication.aws_region.label"),tooltip:r("form.fields.cloud_authentication.aws_region.tooltip"),referenceable:!0},{key:"aws_is_serverless",group:D.AWS,label:r("form.fields.cloud_authentication.aws_is_serverless.label"),tooltip:r("form.fields.cloud_authentication.aws_is_serverless.tooltip"),type:"boolean"},{key:"aws_access_key_id",group:D.AWS,label:r("form.fields.cloud_authentication.aws_access_key_id.label"),tooltip:r("form.fields.cloud_authentication.aws_access_key_id.tooltip"),referenceable:!0,encrypted:!0},{key:"aws_secret_access_key",group:D.AWS,label:r("form.fields.cloud_authentication.aws_secret_access_key.label"),tooltip:r("form.fields.cloud_authentication.aws_secret_access_key.tooltip"),referenceable:!0,encrypted:!0},{key:"aws_assume_role_arn",group:D.AWS,label:r("form.fields.cloud_authentication.aws_assume_role_arn.label"),tooltip:r("form.fields.cloud_authentication.aws_assume_role_arn.tooltip"),referenceable:!0,encrypted:!0},{key:"aws_role_session_name",group:D.AWS,label:r("form.fields.cloud_authentication.aws_role_session_name.label"),tooltip:r("form.fields.cloud_authentication.aws_role_session_name.tooltip"),referenceable:!0,encrypted:!0},{key:"gcp_service_account_json",group:D.GCP,label:r("form.fields.cloud_authentication.gcp_service_account_json.label"),tooltip:r("form.fields.cloud_authentication.gcp_service_account_json.tooltip"),referenceable:!0,encrypted:!0},{key:"azure_client_id",group:D.AZURE,label:r("form.fields.cloud_authentication.azure_client_id.label"),tooltip:r("form.fields.cloud_authentication.azure_client_id.tooltip"),referenceable:!0,encrypted:!0},{key:"azure_client_secret",group:D.AZURE,label:r("form.fields.cloud_authentication.azure_client_secret.label"),tooltip:r("form.fields.cloud_authentication.azure_client_secret.tooltip"),referenceable:!0,encrypted:!0},{key:"azure_tenant_id",group:D.AZURE,label:r("form.fields.cloud_authentication.azure_tenant_id.label"),tooltip:r("form.fields.cloud_authentication.azure_tenant_id.tooltip"),referenceable:!0,encrypted:!0}],p=t.computed(()=>u.filter(l=>{var d;return l.group===((d=n.value)==null?void 0:d.auth_provider)}));return(l,d)=>{const h=t.resolveComponent("KInput"),T=t.resolveComponent("KCheckbox");return t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,m=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m.key},[m.type!=="boolean"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(h,{modelValue:n.value[m.key],"onUpdate:modelValue":y=>n.value[m.key]=y,"data-testid":`redis-${m.key}-input`,label:m.label,"label-attributes":{info:m.tooltip,tooltipAttributes:{maxWidth:"400"}},readonly:e.readonly,required:m.required??!1,"show-password-mask-toggle":m.encrypted,type:m.encrypted?"password":"text"},null,8,["modelValue","onUpdate:modelValue","data-testid","label","label-attributes","readonly","required","show-password-mask-toggle","type"]),m.referenceable?(t.openBlock(),t.createBlock(t.unref(J.VaultSecretPickerProvider),{key:0,class:"secret-picker-provider",disabled:e.readonly,update:y=>n.value[m.key]=y,value:n.value[m.key]??"",onOpen:d[0]||(d[0]=(y,g)=>t.unref(o)(y,g))},null,8,["disabled","update","value"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(T,{key:1,modelValue:n.value[m.key],"onUpdate:modelValue":y=>n.value[m.key]=y,"data-testid":`redis-${m.key}-checkbox`,label:m.label,"label-attributes":{info:m.tooltip,tooltipAttributes:{maxWidth:"400"}},readonly:e.readonly},null,8,["modelValue","onUpdate:modelValue","data-testid","label","label-attributes","readonly"]))],64))),128)),t.createVNode(t.unref(J.VaultSecretPicker),{config:e.config,setup:t.unref(i),onCancel:d[1]||(d[1]=()=>i.value=!1),onProceed:t.unref(a)},null,8,["config","setup","onProceed"])],64)}}}),[["__scopeId","data-v-160fdcb4"]]);var at=new WeakMap,Rn=0;function Ul(e){if(!e.length)return"";for(var n="arg",r=0;r<e.length;++r){var i=void 0;e[r]===null||typeof e[r]!="object"&&typeof e[r]!="function"?typeof e[r]=="string"?i='"'+e[r]+'"':i=String(e[r]):at.has(e[r])?i=at.get(e[r]):(i=Rn,at.set(e[r],Rn++)),n+="@"+i}return n}function Fl(e){if(typeof e=="function")try{e=e()}catch{e=""}return Array.isArray(e)?e=Ul(e):e=String(e||""),e}var lt=function(){function e(n){n===void 0&&(n=0),this.items=new Map,this.ttl=n}return e.prototype.serializeKey=function(n){return Fl(n)},e.prototype.get=function(n){var r=this.serializeKey(n);return this.items.get(r)},e.prototype.set=function(n,r,i){var o=this.serializeKey(n),a=i||this.ttl,u=Date.now(),p={data:r,createdAt:u,expiresAt:a?u+a:1/0};this.dispatchExpire(a,p,o),this.items.set(o,p)},e.prototype.dispatchExpire=function(n,r,i){var o=this;n&&setTimeout(function(){var a=Date.now(),u=a>=r.expiresAt;u&&o.delete(i)},n)},e.prototype.delete=function(n){this.items.delete(n)},e}();function zl(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function Kl(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var Hl=function(e){return fetch(e).then(function(n){return n.json()})};const st={isOnline:zl,isDocumentVisible:Kl,fetcher:Hl};var oe=function(){return oe=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},oe.apply(this,arguments)},be=function(e,n,r,i){function o(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function p(h){try{d(i.next(h))}catch(T){u(T)}}function l(h){try{d(i.throw(h))}catch(T){u(T)}}function d(h){h.done?a(h.value):o(h.value).then(p,l)}d((i=i.apply(e,n||[])).next())})},he=function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,u;return u={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function p(d){return function(h){return l([d,h])}}function l(d){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=n.call(e,r)}catch(h){d=[6,h],o=0}finally{i=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},Wl=function(e,n){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),o,a=[],u;try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(p){u={error:p}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(u)throw u.error}}return a},ql=function(e,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,a;i<o;i++)(a||!(i in n))&&(a||(a=Array.prototype.slice.call(n,0,i)),a[i]=n[i]);return e.concat(a||Array.prototype.slice.call(n))},Pn=new lt,Ue=new lt,ct=new lt,An={cache:Pn,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:st.fetcher,isOnline:st.isOnline,isDocumentVisible:st.isDocumentVisible};function Gl(e,n,r){var i=Ue.get(e);if(i)i.data.push(n);else{var o=5e3;Ue.set(e,[n],r>0?r+o:r)}}function Jl(e,n,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&n>r.errorRetryCount)){var i=Math.min(n||0,r.errorRetryCount),o=i*r.errorRetryInterval;setTimeout(function(){e(null,{errorRetryCount:i+1,shouldRetryOnError:!0})},o)}}var Nn=function(e,n,r,i){return r===void 0&&(r=Pn),i===void 0&&(i=An.ttl),be(void 0,void 0,void 0,function(){var o,a,u,p,l,d,h;return he(this,function(T){switch(T.label){case 0:if(!Ql(n))return[3,5];T.label=1;case 1:return T.trys.push([1,3,,4]),[4,n];case 2:return o=T.sent(),[3,4];case 3:return p=T.sent(),a=p,[3,4];case 4:return[3,6];case 5:o=n,T.label=6;case 6:if(u=!1,l={data:o,error:a,isValidating:u},typeof o<"u")try{r.set(e,l,i)}catch(m){console.error("swrv(mutate): failed to set cache",m)}return d=Ue.get(e),d&&d.data.length&&(h=d.data.filter(function(m){return m.key===e}),h.forEach(function(m,y){typeof l.data<"u"&&(m.data=l.data),m.error=l.error,m.isValidating=l.isValidating,m.isLoading=l.isValidating;var g=y===h.length-1;g||delete h[y]}),h=h.filter(Boolean)),[2,l]}})})};function Zl(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o,a=oe({},An),u=!1,p=!1,l=t.getCurrentInstance(),d=(l==null?void 0:l.proxy)||l;if(!d)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var h=(d==null?void 0:d.$isServer)||!1;n.length>=1&&(i=n[0]),n.length>=2&&(o=n[1]),n.length>2&&(a=oe(oe({},a),n[2]));var T=h?a.serverTTL:a.ttl,m=typeof i=="function"?i:t.ref(i);typeof o>"u"&&(o=a.fetcher);var y=null;y||(y=t.reactive({data:void 0,error:void 0,isValidating:!0,isLoading:!0,key:null}));var g=function(E,c){return be(e,void 0,void 0,function(){var x,R,M,U,H,ie,W,ue=this;return he(this,function(q){switch(q.label){case 0:return x=y.data===void 0,R=m.value,R?(M=a.cache.get(R),U=M&&M.data,y.isValidating=!0,y.isLoading=!U,U&&(y.data=U.data,y.error=U.error),H=E||o,!H||!a.isDocumentVisible()&&!x||(c==null?void 0:c.forceRevalidate)!==void 0&&!(c!=null&&c.forceRevalidate)?(y.isValidating=!1,y.isLoading=!1,[2]):M&&(ie=!!(Date.now()-M.createdAt>=a.dedupingInterval||c!=null&&c.forceRevalidate),!ie)?(y.isValidating=!1,y.isLoading=!1,[2]):(W=function(){return be(ue,void 0,void 0,function(){var G,fe,pe,we;return he(this,function(ae){switch(ae.label){case 0:return G=ct.get(R),G?[3,2]:(fe=Array.isArray(R)?R:[R],pe=H.apply(void 0,ql([],Wl(fe),!1)),ct.set(R,pe,a.dedupingInterval),[4,Nn(R,pe,a.cache,T)]);case 1:return ae.sent(),[3,4];case 2:return[4,Nn(R,G.data,a.cache,T)];case 3:ae.sent(),ae.label=4;case 4:return y.isValidating=!1,y.isLoading=!1,ct.delete(R),y.error!==void 0&&(we=!u&&a.shouldRetryOnError&&(c?c.shouldRetryOnError:!0),we&&Jl(g,c?c.errorRetryCount:1,a)),[2]}})})},U&&a.revalidateDebounce?(setTimeout(function(){return be(ue,void 0,void 0,function(){return he(this,function(G){switch(G.label){case 0:return u?[3,2]:[4,W()];case 1:G.sent(),G.label=2;case 2:return[2]}})})},a.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,W()];case 2:q.sent(),q.label=3;case 3:return[2]}})})},S=function(){return be(e,void 0,void 0,function(){return he(this,function(E){return[2,g(null,{shouldRetryOnError:!1})]})})},s=null;t.onMounted(function(){var E=function(){return be(e,void 0,void 0,function(){return he(this,function(c){switch(c.label){case 0:return!y.error&&a.isOnline()?[4,g()]:[3,2];case 1:return c.sent(),[3,3];case 2:s&&clearTimeout(s),c.label=3;case 3:return a.refreshInterval&&!u&&(s=setTimeout(E,a.refreshInterval)),[2]}})})};a.refreshInterval&&(s=setTimeout(E,a.refreshInterval)),a.revalidateOnFocus&&(document.addEventListener("visibilitychange",S,!1),window.addEventListener("focus",S,!1))}),t.onUnmounted(function(){u=!0,s&&clearTimeout(s),a.revalidateOnFocus&&(document.removeEventListener("visibilitychange",S,!1),window.removeEventListener("focus",S,!1));var E=Ue.get(m.value);E&&(E.data=E.data.filter(function(c){return c!==y}))});try{t.watch(m,function(E){t.isReadonly(m)||(m.value=E),y.key=E,y.isValidating=!!E,Gl(m.value,y,T),!h&&!p&&m.value&&g(),p=!1},{immediate:!0})}catch{}var O=oe(oe({},t.toRefs(y)),{mutate:function(E,c){return g(E,oe(oe({},c),{forceRevalidate:!0}))}});return O}function Ql(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}function $n(e){return`redis-partial-links-${e}`}const xe=e=>{const{axiosInstance:n}=_.useAxios(e.axiosRequestConfig);return{fetcher:async r=>{const{partialId:i,size:o,offset:a,query:u}=r;let p=`${e.apiBaseUrl}${ye.links[e.app]}`;e.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:"")),p=p.replace(/{id}/gi,i||""),u&&(p=`${p}?${u}`);const{data:l}=await n.get(p,{params:{size:o,offset:a}});return l}}},Bn=e=>{const{partialId:n,config:r}=e,{fetcher:i}=xe(r),o=t.ref([]),{data:a}=Zl($n(n),()=>i({partialId:n}),{revalidateOnFocus:!1});return t.watch(a,()=>{var u;o.value=((u=a.value)==null?void 0:u.data)??[]}),o},Yl={class:"kong-ui-entities-redis-configurations-form"},Dn=z(t.defineComponent({__name:"RedisConfigurationForm",props:{config:{type:Object,required:!0,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")},partialId:{type:String,required:!1,default:""},actionTeleportTarget:{type:String,default:null},slidoutTopOffset:{type:Number,default:60},disabledPartialType:{type:String,default:""}},emits:["update","error","loading","cancel"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o},i18nT:a}=re.useI18n(),{vaultSecretPickerSetup:u,setUpVaultSecretPicker:p,handleVaultSecretPickerAutofill:l}=On(),d=mt.useRouter(),h=t.ref("json"),T=t.computed(()=>[{label:o("form.options.type.host_port"),group:o("form.options.type.enterprise"),value:C.HOST_PORT_EE,selected:x.value===C.HOST_PORT_EE,disabled:!c&&r.disabledPartialType===L.REDIS_EE},{label:o("form.options.type.cluster"),group:o("form.options.type.enterprise"),value:C.CLUSTER,selected:x.value===C.CLUSTER,disabled:!c&&r.disabledPartialType===L.REDIS_EE},{label:o("form.options.type.sentinel"),group:o("form.options.type.enterprise"),value:C.SENTINEL,selected:x.value===C.SENTINEL,disabled:!c&&r.disabledPartialType===L.REDIS_EE},{label:o("form.options.type.host_port"),group:o("form.options.type.open_source"),value:C.HOST_PORT_CE,selected:x.value===C.HOST_PORT_CE,disabled:c&&R.value||!c&&r.disabledPartialType===L.REDIS_CE}]),m=t.computed(()=>[{label:o("form.options.auth_provider.aws"),value:D.AWS},{label:o("form.options.auth_provider.gcp"),value:D.GCP},{label:o("form.options.auth_provider.azure"),value:D.AZURE}]),y=[{label:o("form.options.sentinel_role.master"),value:"master"},{label:o("form.options.sentinel_role.slave"),value:"slave"},{label:o("form.options.sentinel_role.any"),value:"any"}],g=v=>{const b=v.value===C.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");return`${v.label}${b}`},S=()=>r.disabledPartialType&&ve(_e)===r.disabledPartialType?r.disabledPartialType===L.REDIS_CE?C.HOST_PORT_EE:C.HOST_PORT_CE:_e,{form:s,canSubmit:O,payload:E,isEdit:c,redisType:x,redisTypeIsEnterprise:R,fetchUrl:M,submit:U,setInitialFormValues:H}=Al({partialId:r.partialId,defaultRedisType:S(),config:r.config,cloudAuthAvailable:r.config.cloudAuthAvailable}),{fetcher:ie}=xe(r.config),W=t.ref(!1),ue=t.ref(!1),q=t.ref(0),G=t.computed(()=>h.value==="terraform"?{[E.value.type.replaceAll("-","_")]:kl(E.value,["type"])}:E.value),fe=async()=>{try{if(c&&!ue.value){const{count:b}=await ie({partialId:r.partialId});if(q.value=b,b>0){W.value=!0;return}}const{data:v}=await U();i("update",v)}catch(v){i("error",v)}},pe=()=>{W.value=!1,ue.value=!0,fe()},we=()=>{r.config.cancelRoute&&d.push(r.config.cancelRoute),i("cancel")},ae=v=>{i("loading",v)},ut=v=>{i("error",v)},Fe=v=>{H(v)};return t.onBeforeMount(async()=>{if(c){const{count:v}=await ie({partialId:r.partialId});q.value=v}}),(v,b)=>{const ft=t.resolveComponent("KAlert"),me=t.resolveComponent("KSelect"),B=t.resolveComponent("KInput"),k=t.resolveComponent("KCheckbox"),I=t.resolveComponent("KModal");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Yl,[t.createVNode(t.unref(_.EntityBaseForm),{"action-teleport-target":e.actionTeleportTarget,"can-submit":t.unref(O),config:e.config,"edit-id":e.partialId,"entity-type":t.unref(_.SupportedEntityType).Partial,"error-message":t.unref(s).errorMessage,"fetch-url":t.unref(M),"form-fields":G.value,"is-readonly":t.unref(s).readonly,"slidout-top-offset":e.slidoutTopOffset,onCancel:we,onCodeBlockTabChange:b[34]||(b[34]=f=>h.value=f),"onFetch:error":ut,"onFetch:success":Fe,onLoading:ae,onSubmit:fe},{default:t.withCtx(()=>[q.value>0&&t.unref(c)?(t.openBlock(),t.createBlock(ft,{key:0,appearance:"warning",class:"warning-alert","data-testid":"redis-update-warning-alert"},{default:t.withCtx(()=>[t.createVNode(t.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:t.withCtx(()=>[t.createElementVNode("b",null,t.toDisplayString(t.unref(o)("form.edit_warning_modal.plugin_count",{count:q.value})),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(_.EntityFormSection),{"data-testid":"redis-type-section",description:t.unref(o)("form.sections.type.description"),title:t.unref(o)("form.sections.type.title")},{default:t.withCtx(()=>[t.createVNode(me,{modelValue:t.unref(x),"onUpdate:modelValue":b[0]||(b[0]=f=>t.isRef(x)?x.value=f:null),"data-testid":"redis-type-select",disabled:t.unref(c)&&t.unref(x)===t.unref(C).HOST_PORT_CE,items:T.value,"kpop-attributes":{"data-testid":"redis-type-select-popover"},label:t.unref(o)("form.fields.type.label"),readonly:t.unref(s).readonly,required:""},{"selected-item-template":t.withCtx(({item:f})=>[t.createTextVNode(t.toDisplayString(g(f)),1)]),_:1},8,["modelValue","disabled","items","label","readonly"])]),_:1},8,["description","title"]),t.createVNode(t.unref(_.EntityFormSection),{"data-testid":"redis-general-section",description:t.unref(o)("form.sections.general.description"),title:t.unref(o)("form.sections.general.title")},{default:t.withCtx(()=>[t.createVNode(B,{modelValue:t.unref(s).fields.name,"onUpdate:modelValue":b[1]||(b[1]=f=>t.unref(s).fields.name=f),modelModifiers:{trim:!0},"data-testid":"redis-name-input",disabled:t.unref(c),label:t.unref(o)("form.fields.name.label"),placeholder:t.unref(o)("form.fields.name.placeholder"),readonly:t.unref(s).readonly,required:""},null,8,["modelValue","disabled","label","placeholder","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.tags,"onUpdate:modelValue":b[2]||(b[2]=f=>t.unref(s).fields.tags=f),modelModifiers:{trim:!0},"data-testid":"redis-tags-input",help:t.unref(o)("form.fields.tags.help"),label:t.unref(o)("form.fields.tags.label"),"label-attributes":{info:t.unref(o)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:t.unref(o)("form.fields.tags.placeholder"),readonly:t.unref(s).readonly},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.config.cloudAuthAvailable&&t.unref(x)!==t.unref(C).SENTINEL?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:1,"data-testid":"redis-cloud-auth-section",description:t.unref(o)("form.sections.cloud_auth.description"),title:t.unref(o)("form.sections.cloud_auth.title")},{default:t.withCtx(()=>[t.createVNode(me,{modelValue:t.unref(s).fields.config.cloud_authentication.auth_provider,"onUpdate:modelValue":b[3]||(b[3]=f=>t.unref(s).fields.config.cloud_authentication.auth_provider=f),clearable:"","data-testid":"redis-auth-provider-select",items:m.value,"kpop-attributes":{"data-testid":"redis-auth-provider-select-popover"},label:t.unref(o)("form.fields.cloud_authentication.auth_provider.label"),"label-attributes":{info:t.unref(o)("form.fields.cloud_authentication.auth_provider.tooltip")},readonly:t.unref(s).readonly},null,8,["modelValue","items","label","label-attributes","readonly"]),t.createVNode(Ll,{modelValue:t.unref(s).fields.config.cloud_authentication,"onUpdate:modelValue":b[4]||(b[4]=f=>t.unref(s).fields.config.cloud_authentication=f),config:r.config,readonly:t.unref(s).readonly},null,8,["modelValue","config","readonly"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).SENTINEL?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:2,"data-testid":"redis-sentinel-configuration-section",description:t.unref(o)("form.sections.sentinel_configuration.description"),title:t.unref(o)("form.sections.sentinel_configuration.title")},{default:t.withCtx(()=>[t.createVNode(B,{modelValue:t.unref(s).fields.config.sentinel_master,"onUpdate:modelValue":b[5]||(b[5]=f=>t.unref(s).fields.config.sentinel_master=f),"data-testid":"redis-sentinel-master-input",label:t.unref(o)("form.fields.sentinel_master.label"),"label-attributes":{info:t.unref(o)("form.fields.sentinel_master.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(me,{modelValue:t.unref(s).fields.config.sentinel_role,"onUpdate:modelValue":b[6]||(b[6]=f=>t.unref(s).fields.config.sentinel_role=f),"data-testid":"redis-sentinel-role-select",items:y,"kpop-attributes":{"data-testid":"redis-sentinel-role-select-popover"},label:t.unref(o)("form.fields.sentinel_role.label"),"label-attributes":{info:t.unref(o)("form.fields.sentinel_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(jl,{modelValue:t.unref(s).fields.config.sentinel_nodes,"onUpdate:modelValue":b[7]||(b[7]=f=>t.unref(s).fields.config.sentinel_nodes=f),readonly:t.unref(s).readonly},null,8,["modelValue","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.sentinel_username,"onUpdate:modelValue":b[8]||(b[8]=f=>t.unref(s).fields.config.sentinel_username=f),modelModifiers:{trim:!0},label:t.unref(o)("form.fields.sentinel_username.label"),"label-attributes":{info:t.unref(o)("form.fields.sentinel_username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(t.unref(J.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.sentinel_username=f,value:t.unref(s).fields.config.sentinel_username,onOpen:b[9]||(b[9]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.sentinel_password,"onUpdate:modelValue":b[10]||(b[10]=f=>t.unref(s).fields.config.sentinel_password=f),modelModifiers:{trim:!0},label:t.unref(o)("form.fields.sentinel_password.label"),"label-attributes":{info:t.unref(o)("form.fields.sentinel_password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(t.unref(J.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.sentinel_password=f,value:t.unref(s).fields.config.sentinel_password,onOpen:b[11]||(b[11]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).CLUSTER?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:3,"data-testid":"redis-cluster-configuration-section",description:t.unref(o)("form.sections.cluster.description"),title:t.unref(o)("form.sections.cluster.title")},{default:t.withCtx(()=>[t.createVNode(vl,{modelValue:t.unref(s).fields.config.cluster_nodes,"onUpdate:modelValue":b[12]||(b[12]=f=>t.unref(s).fields.config.cluster_nodes=f),readonly:t.unref(s).readonly},null,8,["modelValue","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.cluster_max_redirections,"onUpdate:modelValue":b[13]||(b[13]=f=>t.unref(s).fields.config.cluster_max_redirections=f),"data-testid":"redis-cluster-max-redirections-input",label:t.unref(o)("form.fields.cluster_max_redirections.label"),"label-attributes":{info:t.unref(o)("form.fields.cluster_max_redirections.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0),t.createVNode(t.unref(_.EntityFormSection),{"data-testid":"redis-connection-configuration-section",description:t.unref(o)("form.sections.connection.description"),title:t.unref(o)("form.sections.connection.title")},{default:t.withCtx(()=>[t.unref(x)===t.unref(C).HOST_PORT_CE||t.unref(x)===t.unref(C).HOST_PORT_EE?(t.openBlock(),t.createBlock(B,{key:0,modelValue:t.unref(s).fields.config.host,"onUpdate:modelValue":b[14]||(b[14]=f=>t.unref(s).fields.config.host=f),modelModifiers:{trim:!0},"data-testid":"redis-host-input",label:t.unref(o)("form.fields.host.label"),"label-attributes":{info:t.unref(o)("form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_EE&&e.config.isHostReferenceable?(t.openBlock(),t.createBlock(t.unref(J.VaultSecretPickerProvider),{key:1,class:"secret-picker-provider","data-testid":"secret-picker-provider-for-host",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.host=f,value:t.unref(s).fields.config.host??"",onOpen:b[15]||(b[15]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_CE||t.unref(x)===t.unref(C).HOST_PORT_EE?(t.openBlock(),t.createBlock(B,{key:2,modelValue:t.unref(s).fields.config.port,"onUpdate:modelValue":b[16]||(b[16]=f=>t.unref(s).fields.config.port=f),modelModifiers:{trim:!0},"data-testid":"redis-port-input",label:t.unref(o)("form.fields.port.label"),"label-attributes":{info:t.unref(o)("form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_EE&&e.config.isPortReferenceable?(t.openBlock(),t.createBlock(t.unref(J.VaultSecretPickerProvider),{key:3,class:"secret-picker-provider","data-testid":"secret-picker-provider-for-port",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.port=f,value:String(t.unref(s).fields.config.port??""),onOpen:b[17]||(b[17]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_EE?(t.openBlock(),t.createBlock(k,{key:4,modelValue:t.unref(s).fields.config.connection_is_proxied,"onUpdate:modelValue":b[18]||(b[18]=f=>t.unref(s).fields.config.connection_is_proxied=f),"data-testid":"redis-connection-is-proxied-checkbox",disabled:t.unref(s).readonly,label:t.unref(o)("form.fields.connection_is_proxied.label"),"label-attributes":{info:t.unref(o)("form.fields.connection_is_proxied.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","disabled","label","label-attributes"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_CE?(t.openBlock(),t.createBlock(B,{key:5,modelValue:t.unref(s).fields.config.timeout,"onUpdate:modelValue":b[19]||(b[19]=f=>t.unref(s).fields.config.timeout=f),modelModifiers:{trim:!0},"data-testid":"redis-timeout-input",label:t.unref(o)("form.fields.timeout.label"),"label-attributes":{info:t.unref(o)("form.fields.timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):t.createCommentVNode("",!0),t.createVNode(B,{modelValue:t.unref(s).fields.config.database,"onUpdate:modelValue":b[20]||(b[20]=f=>t.unref(s).fields.config.database=f),modelModifiers:{trim:!0},"data-testid":"redis-database-input",label:t.unref(o)("form.fields.database.label"),"label-attributes":{info:t.unref(o)("form.fields.database.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.username,"onUpdate:modelValue":b[21]||(b[21]=f=>t.unref(s).fields.config.username=f),modelModifiers:{trim:!0},"data-testid":"redis-username-input",label:t.unref(o)("form.fields.username.label"),"label-attributes":{info:t.unref(o)("form.fields.username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(t.unref(J.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.username=f,value:t.unref(s).fields.config.username,onOpen:b[22]||(b[22]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.password,"onUpdate:modelValue":b[23]||(b[23]=f=>t.unref(s).fields.config.password=f),modelModifiers:{trim:!0},"data-testid":"redis-password-input",label:t.unref(o)("form.fields.password.label"),"label-attributes":{info:t.unref(o)("form.fields.password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(t.unref(J.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.password=f,value:t.unref(s).fields.config.password,onOpen:b[24]||(b[24]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])]),_:1},8,["description","title"]),t.createVNode(t.unref(_.EntityFormSection),{"data-testid":"redis-tls-configuration-section",description:t.unref(o)("form.sections.tls.description"),title:t.unref(o)("form.sections.tls.title")},{default:t.withCtx(()=>[t.createVNode(k,{modelValue:t.unref(s).fields.config.ssl,"onUpdate:modelValue":b[25]||(b[25]=f=>t.unref(s).fields.config.ssl=f),"data-testid":"redis-ssl-checkbox",description:t.unref(o)("form.fields.ssl.description"),disabled:t.unref(s).readonly,label:t.unref(o)("form.fields.ssl.label"),"label-attributes":{info:t.unref(o)("form.fields.ssl.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),t.createVNode(k,{modelValue:t.unref(s).fields.config.ssl_verify,"onUpdate:modelValue":b[26]||(b[26]=f=>t.unref(s).fields.config.ssl_verify=f),"data-testid":"redis-ssl-verify-checkbox",description:t.unref(o)("form.fields.ssl_verify.description"),disabled:t.unref(s).readonly,label:t.unref(o)("form.fields.ssl_verify.label"),"label-attributes":{info:t.unref(o)("form.fields.ssl_verify.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.server_name,"onUpdate:modelValue":b[27]||(b[27]=f=>t.unref(s).fields.config.server_name=f),modelModifiers:{trim:!0},"data-testid":"redis-server_name-input",label:t.unref(o)("form.fields.server_name.label"),"label-attributes":{info:t.unref(o)("form.fields.server_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),t.unref(x)===t.unref(C).HOST_PORT_EE&&e.config.isServerNameReferenceable?(t.openBlock(),t.createBlock(t.unref(J.VaultSecretPickerProvider),{key:0,class:"secret-picker-provider","data-testid":"secret-picker-provider-for-server_name",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.server_name=f,value:t.unref(s).fields.config.server_name??"",onOpen:b[28]||(b[28]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])):t.createCommentVNode("",!0)]),_:1},8,["description","title"]),t.unref(x)!==t.unref(C).HOST_PORT_CE?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:4,"data-testid":"redis-keepalive-section",description:t.unref(o)("form.sections.keepalive.description"),title:t.unref(o)("form.sections.keepalive.title")},{default:t.withCtx(()=>[t.createVNode(B,{modelValue:t.unref(s).fields.config.keepalive_backlog,"onUpdate:modelValue":b[29]||(b[29]=f=>t.unref(s).fields.config.keepalive_backlog=f),"data-testid":"redis-keepalive-backlog-input",label:t.unref(o)("form.fields.keepalive_backlog.label"),"label-attributes":{info:t.unref(o)("form.fields.keepalive_backlog.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.keepalive_pool_size,"onUpdate:modelValue":b[30]||(b[30]=f=>t.unref(s).fields.config.keepalive_pool_size=f),"data-testid":"redis-keepalive-pool-size-input",label:t.unref(o)("form.fields.keepalive_pool_size.label"),"label-attributes":{info:t.unref(o)("form.fields.keepalive_pool_size.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0),t.unref(x)!==t.unref(C).HOST_PORT_CE?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:5,"data-testid":"redis-read-write-configuration-section",description:t.unref(o)("form.sections.read_write_configuration.description"),title:t.unref(o)("form.sections.read_write_configuration.title")},{default:t.withCtx(()=>[t.createVNode(B,{modelValue:t.unref(s).fields.config.read_timeout,"onUpdate:modelValue":b[31]||(b[31]=f=>t.unref(s).fields.config.read_timeout=f),"data-testid":"redis-read-timeout-input",label:t.unref(o)("form.fields.read_timeout.label"),"label-attributes":{info:t.unref(o)("form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.send_timeout,"onUpdate:modelValue":b[32]||(b[32]=f=>t.unref(s).fields.config.send_timeout=f),"data-testid":"redis-send-timeout-input",label:t.unref(o)("form.fields.send_timeout.label"),"label-attributes":{info:t.unref(o)("form.fields.send_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.connect_timeout,"onUpdate:modelValue":b[33]||(b[33]=f=>t.unref(s).fields.config.connect_timeout=f),"data-testid":"redis-connect-timeout-input",label:t.unref(o)("form.fields.connect_timeout.label"),"label-attributes":{info:t.unref(o)("form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0)]),_:1},8,["action-teleport-target","can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","slidout-top-offset"])]),t.createVNode(t.unref(J.VaultSecretPicker),{config:r.config,setup:t.unref(u),onCancel:b[35]||(b[35]=()=>u.value=!1),onProceed:t.unref(l)},null,8,["config","setup","onProceed"]),t.createVNode(I,{"action-button-text":t.unref(o)("form.edit_warning_modal.confirm"),"data-testid":"redis-update-warning-modal","hide-cancel-button":"","max-width":"640",title:t.unref(o)("form.edit_warning_modal.title"),visible:W.value,onCancel:b[36]||(b[36]=f=>W.value=!1),onProceed:pe},{default:t.withCtx(()=>[t.createVNode(t.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:t.withCtx(()=>[t.createElementVNode("b",null,t.toDisplayString(t.unref(o)("form.edit_warning_modal.plugin_count",{count:q.value})),1)]),_:1})]),_:1},8,["action-button-text","title","visible"])],64)}}}),[["__scopeId","data-v-87b9293a"]]),Xl={class:"linked-plugins","data-testid":"linked-plugins-inline"},dt=7,es=z(t.defineComponent({__name:"LinkedPluginsInline",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},partialId:{type:String,required:!0}},setup(e){const n=e,r=Bn({config:n.config,partialId:n.partialId});return(i,o)=>{const a=t.resolveComponent("KBadge");return t.openBlock(),t.createElementBlock("div",Xl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(r).slice(0,dt),u=>(t.openBlock(),t.createBlock(t.unref(_t.PluginIcon),{key:u.id,name:u.name,size:24},null,8,["name"]))),128)),t.unref(r).length-dt>0?(t.openBlock(),t.createBlock(a,{key:0,appearance:"info"},{default:t.withCtx(()=>[t.createTextVNode(" +"+t.toDisplayString(t.unref(r).length-dt),1)]),_:1})):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-a1215a8a"]]),ts={class:"plugin-item"},ns=z(t.defineComponent({__name:"PluginItem",props:{pluginName:{}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",ts,[t.createVNode(t.unref(_t.PluginIcon),{name:e.pluginName,size:24},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(e.pluginName),1)]))}}),[["__scopeId","data-v-e1bb6c4c"]]),rs={class:"toolbar-container"},vn=z(t.defineComponent({__name:"LinkedPluginList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},isExactMatch:{type:Boolean,default:!1},filterBarEnabled:{type:Boolean,default:!1},partialId:{type:String,required:!0}},emits:["view-plugin","load"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=re.useI18n(),a=[{key:"name",label:o("linked_plugins_modal.headers.plugin")},{key:"instance_name",label:o("linked_plugins_modal.headers.instance_name")},{key:"actions",hideLabel:!0}],{fetcher:u}=xe(r.config),p=t.ref(0),l=async m=>{const{data:y,count:g}=await u({partialId:r.partialId,size:m.pageSize,offset:m.offset,query:m.query});p.value=g;const S={total:g,data:y};return i("load",S),S},d=t.ref(""),h=t.computed(()=>r.config.app==="konnect"||r.isExactMatch?{isExactMatch:!0}:{isExactMatch:!1,fields:{name:{searchable:!0}},schema:{name:{type:"text"}}}),T=m=>{i("view-plugin",{id:m.id,plugin:m.name})};return(m,y)=>{const g=t.resolveComponent("KDropdownItem"),S=t.resolveComponent("KTableData");return t.openBlock(),t.createBlock(S,{"cache-identifier":t.unref($n)(e.partialId),fetcher:l,headers:a,"hide-pagination-when-optional":"","pagination-attributes":{totalCount:p.value,disablePageJump:!0},"search-input":d.value},t.createSlots({name:t.withCtx(({rowValue:s})=>[t.createVNode(ns,{"plugin-name":s},null,8,["plugin-name"])]),"action-items":t.withCtx(({row:s})=>[t.createVNode(g,{onClick:O=>T(s)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("actions.view_plugin")),1)]),_:1},8,["onClick"])]),_:2},[e.filterBarEnabled?{name:"toolbar",fn:t.withCtx(()=>[t.createElementVNode("div",rs,[t.createVNode(t.unref(_.EntityFilter),{modelValue:d.value,"onUpdate:modelValue":y[0]||(y[0]=s=>d.value=s),config:h.value},null,8,["modelValue","config"])])]),key:"0"}:void 0]),1032,["cache-identifier","pagination-attributes","search-input"])}}}),[["__scopeId","data-v-50856d03"]]),os={class:"linked-plugins-modal","data-testid":"linked-plugins-modal"},is=z(t.defineComponent({__name:"LinkedPluginListModal",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},redisConfigurationId:{type:String,required:!0},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","proceed","view-plugin"],setup(e,{emit:n}){const r=n,{i18n:{t:i}}=re.useI18n(),o=t.ref(0),a=t.computed(()=>i("linked_plugins_modal.title",{count:o.value})),u=()=>{r("cancel")},p=()=>{r("proceed")};return(l,d)=>{const h=t.resolveComponent("KModal");return t.openBlock(),t.createElementBlock("div",os,[t.createVNode(h,{"action-button-text":t.unref(i)("actions.done"),"hide-cancel-button":"",title:a.value,visible:e.visible,onCancel:u,onProceed:p},{default:t.withCtx(()=>[t.createVNode(vn,{config:e.config,"partial-id":e.redisConfigurationId,onLoad:d[0]||(d[0]=({total:T})=>o.value=T),onViewPlugin:d[1]||(d[1]=T=>r("view-plugin",T))},null,8,["config","partial-id"])]),_:1},8,["action-button-text","title","visible"])])}}}),[["__scopeId","data-v-6148b8bd"]]),Mn=t.defineComponent({__name:"DeleteWarningModal",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(e,{emit:n}){const{i18n:{t:r}}=re.useI18n(),i=n,o=()=>{i("close")};return(a,u)=>{const p=t.resolveComponent("KModal");return t.openBlock(),t.createBlock(p,{"action-button-text":t.unref(r)("actions.close"),"data-testid":"remove-links-modal","hide-cancel-button":"","max-width":"640",title:t.unref(r)("delete.title"),visible:e.visible,onCancel:o,onProceed:o},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("delete.warning")),1)]),_:1},8,["action-button-text","title","visible"])}}}),as={class:"kong-ui-entities-partials-list"},ls=1e3,ss=z(t.defineComponent({__name:"RedisConfigurationList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["click:learn-more","click:plugin","copy:error","copy:success","delete:success","error"],setup(e,{emit:n}){var B;const r=n,i=e,o=t.computed(()=>{var I,f;let k=`${i.config.apiBaseUrl}${ye.list[i.config.app]}`;return i.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((I=i.config)==null?void 0:I.controlPlaneId)||""):i.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(f=i.config)!=null&&f.workspace?`/${i.config.workspace}`:"")),k}),a=t.ref(!1),u=t.ref(""),p=t.ref(null),l=t.ref(void 0),d=t.ref(!1),h=t.ref(!1),T=t.ref(""),m=t.ref(!1),y=_.useDeleteUrlBuilder(i.config,o.value),g=t.ref(1),S=t.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),{fetcher:s,fetcherState:O}=_.useFetcher(i.config,o);async function E(k){const I=await s({...k,pageSize:ls});return I.data=I.data.filter(f=>f.type===L.REDIS_CE||f.type===L.REDIS_EE),I}const{i18n:{t:c}}=re.useI18n(),{axiosInstance:x}=_.useAxios((B=i.config)==null?void 0:B.axiosRequestConfig),R=mt.useRouter(),M=t.ref(""),U=t.computed(()=>{const k=i.config.app==="konnect"||i.config.isExactMatch;if(k)return{isExactMatch:!0,placeholder:c("search.placeholder_for_exact_match")};const{name:I}=W;return{isExactMatch:k,fields:{name:I},schema:i.config.filterSchema}}),{fetcher:H}=xe(i.config),ie=t.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${c("redis.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:c("redis.title")}),W={name:{label:c("list.table_headers.name"),searchable:!0,hidable:!1,sortable:!0},type:{label:c("list.table_headers.type")},tags:{label:c("list.table_headers.tags")},plugins:{label:c("list.table_headers.plugins")}},ue=k=>({label:c("actions.view"),to:i.config.getViewRoute(k)}),q=k=>({label:c("actions.edit"),to:i.config.getEditRoute(k)}),G=async k=>{const{count:I}=await H({partialId:k.id});I>0?m.value=!0:(l.value=k,d.value=!0)},fe=()=>{M.value=""},pe=async k=>{var f;await((f=i.canRetrieve)==null?void 0:f.call(i,k))&&R.push(i.config.getViewRoute(k.id))},we=()=>{d.value=!1},ae=k=>{u.value=k,a.value=!0},ut=async()=>{var k,I,f;if((k=l.value)!=null&&k.id){h.value=!0;try{await x.delete(y(l.value.id)),h.value=!1,d.value=!1,Fe(),r("delete:success",l.value)}catch(N){T.value=((f=(I=N.response)==null?void 0:I.data)==null?void 0:f.message)||N.message||c("errors.delete"),r("error",N)}finally{h.value=!1}}},Fe=()=>{g.value++},v=k=>{switch(Ve(k)){case C.HOST_PORT_CE:return`${c("form.options.type.host_port")}${c("form.options.type.suffix_open_source")}`;case C.HOST_PORT_EE:return`${c("form.options.type.host_port")}${c("form.options.type.suffix_enterprise")}`;case C.SENTINEL:return`${c("form.options.type.sentinel")}${c("form.options.type.suffix_enterprise")}`;case C.CLUSTER:return`${c("form.options.type.cluster")}${c("form.options.type.suffix_enterprise")}`}},b=()=>{R.push(i.config.createRoute)},ft=async(k,I)=>{const f=k.id;if(!await I(f)){r("copy:error",{entity:k,field:"id",message:c("errors.copy")});return}r("copy:success",{entity:k,field:"id",message:c("copy.success",{val:f})})};t.watch(O,k=>{var I,f,N;if(k.status===_.FetcherStatus.Error){p.value={title:c("errors.general")},(N=(f=(I=k.error)==null?void 0:I.response)==null?void 0:f.data)!=null&&N.message&&(p.value.message=k.error.response.data.message),r("error",k.error);return}p.value=null});const me=t.ref(!1);return t.watch(i.canCreate,async k=>{me.value=await k,me.value?ie.value.ctaText=c("actions.create"):ie.value.ctaText=void 0},{immediate:!0}),(k,I)=>{const f=t.resolveComponent("KButton"),N=t.resolveComponent("KDropdownItem"),hs=t.resolveComponent("KClipboardProvider"),ws=t.resolveComponent("KEmptyState");return t.openBlock(),t.createElementBlock("div",as,[t.createVNode(t.unref(_.EntityBaseTable),{"cache-identifier":e.cacheIdentifier,"disable-sorting":S.value,"empty-state-options":ie.value,"enable-entity-actions":"","error-message":p.value,fetcher:E,"fetcher-cache-key":g.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-redis-configuration-list",query:M.value,"table-headers":W,onClearSearchInput:fe,"onClick:row":I[1]||(I[1]=$=>pe($)),onSort:Fe},{"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(_.EntityFilter),{modelValue:M.value,"onUpdate:modelValue":I[0]||(I[0]=$=>M.value=$),config:U.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[t.createVNode(t.unref(_.PermissionsWrapper),{"auth-function":e.canCreate},{default:t.withCtx(()=>[t.createVNode(f,{appearance:"primary","data-testid":"toolbar-add-redis-configuration",size:"large",to:e.config.createRoute},{default:t.withCtx(()=>[t.createVNode(t.unref(Q.AddIcon)),t.createTextVNode(" "+t.toDisplayString(t.unref(c)("actions.create")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:t.withCtx(({rowValue:$})=>[t.createElementVNode("b",null,t.toDisplayString($??"-"),1)]),type:t.withCtx(({row:$})=>[t.createTextVNode(t.toDisplayString(v($)),1)]),tags:t.withCtx(({rowValue:$})=>[t.createVNode(t.unref(_.TableTags),{tags:$},null,8,["tags"])]),plugins:t.withCtx(({row:$})=>[t.createVNode(es,{config:e.config,"partial-id":$.id,onClick:t.withModifiers(pt=>ae($.id),["stop"])},null,8,["config","partial-id","onClick"])]),actions:t.withCtx(({row:$})=>[t.createVNode(hs,null,{default:t.withCtx(({copyToClipboard:pt})=>[t.createVNode(N,{"data-testid":"action-entity-copy-id",onClick:Ks=>ft($,pt)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(c)("actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),t.createVNode(t.unref(_.PermissionsWrapper),{"auth-function":()=>e.canRetrieve($)},{default:t.withCtx(()=>[t.createVNode(N,{"data-testid":"action-entity-view","has-divider":"",item:ue($.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(_.PermissionsWrapper),{"auth-function":()=>e.canEdit($)},{default:t.withCtx(()=>[t.createVNode(N,{"data-testid":"action-entity-edit",item:q($.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(_.PermissionsWrapper),{"auth-function":()=>e.canDelete($)},{default:t.withCtx(()=>[t.createVNode(N,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:pt=>G($)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(c)("actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),"empty-state":t.withCtx(()=>[t.createVNode(ws,{"action-button-text":t.unref(c)("list.action"),"action-button-visible":me.value,"data-testid":"redis-entity-empty-state",features:[{key:"feature-1",title:t.unref(c)("list.empty_state.feature_1.title"),description:t.unref(c)("list.empty_state.feature_1.description")},{key:"feature-2",title:t.unref(c)("list.empty_state.feature_2.title"),description:t.unref(c)("list.empty_state.feature_2.description")}],"icon-background":"",message:t.unref(c)("list.empty_state.description"),title:t.unref(c)("redis.title"),onClickAction:b},{icon:t.withCtx(()=>[t.createVNode(t.unref(Q.DeployIcon),{decorative:""})]),"feature-icon-feature-1":t.withCtx(()=>[t.createVNode(t.unref(Q.ClipboardIcon))]),"feature-icon-feature-2":t.withCtx(()=>[t.createVNode(t.unref(Q.RefreshIcon))]),"action-button-icon":t.withCtx(()=>[t.createVNode(t.unref(Q.AddIcon),{decorative:""})]),_:1},8,["action-button-text","action-button-visible","features","message","title"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher-cache-key","query"]),t.createVNode(Mn,{visible:m.value,onClose:I[2]||(I[2]=$=>m.value=!1)},null,8,["visible"]),t.createVNode(t.unref(_.EntityDeleteModal),{"action-pending":h.value,description:t.unref(c)("delete.description"),"entity-name":l.value&&(l.value.name||l.value.id),"entity-type":t.unref(_.EntityTypes).RedisConfiguration,error:T.value,"need-confirmation":!0,title:t.unref(c)("delete.title"),visible:d.value,onCancel:we,onProceed:ut},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),t.createVNode(is,{config:e.config,"redis-configuration-id":u.value,visible:a.value,onCancel:I[3]||(I[3]=$=>a.value=!1),onProceed:I[4]||(I[4]=$=>a.value=!1),onViewPlugin:I[5]||(I[5]=$=>r("click:plugin",$))},null,8,["config","redis-configuration-id","visible"])])}}}),[["__scopeId","data-v-4e5be541"]]),cs={class:"kong-ui-consumer-group-entity-config-card"},ds=t.defineComponent({__name:"RedisConfigurationConfigCard",props:{config:{type:Object,required:!0,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)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!0}},emits:["loading","fetch:error","fetch:success"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=re.useI18n(),a=t.computed(()=>ye.form[r.config.app].edit),u=t.ref(_e),p=g=>{u.value=Ve(g),i("fetch:success",g)},l=t.computed(()=>{const g=u.value===C.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");let S="";switch(u.value){case C.HOST_PORT_CE:S=o("form.options.type.host_port");break;case C.HOST_PORT_EE:S=o("form.options.type.host_port");break;case C.CLUSTER:S=o("form.options.type.cluster");break;case C.SENTINEL:S=o("form.options.type.sentinel");break}return`${S}${g}`}),d=g=>({id:g.id,name:g.name,tags:g.tags,created_at:g.created_at,updated_at:g.updated_at,type:g.type,...g.config,...r.config.cloudAuthAvailable?{cloud_authentication:it(g.config.cloud_authentication)}:null}),h=(g,S)=>{if(!g||Object.keys(g).length===0)return{};const{id:s,name:O,created_at:E,updated_at:c,type:x,tags:R,...M}=g;return S==="terraform"?{[x.replaceAll("-","_")]:{id:s,name:O,tags:R,created_at:E,updated_at:c,config:M}}:{id:s,name:O,tags:R,created_at:E,updated_at:c,type:x,config:M}},T={id:{},name:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.name.label")},tags:{type:_.ConfigurationSchemaType.BadgeTag,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.tags.label"),tooltip:o("form.fields.tags.tooltip")},updated_at:{},created_at:{},type:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.type.label")},cluster_max_redirections:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.cluster_max_redirections.tooltip"),label:o("form.fields.cluster_max_redirections.label")},cluster_nodes:{type:_.ConfigurationSchemaType.JsonArray,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.cluster_nodes.title"),tooltip:o("form.fields.cluster_nodes.tooltip")},connect_timeout:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.connect_timeout.label"),tooltip:o("form.fields.connect_timeout.tooltip")},connection_is_proxied:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.connection_is_proxied.label"),tooltip:o("form.fields.connection_is_proxied.tooltip")},database:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.database.label"),tooltip:o("form.fields.database.tooltip")},host:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.host.label"),tooltip:o("form.fields.host.tooltip")},keepalive_backlog:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_backlog.label"),tooltip:o("form.fields.keepalive_backlog.tooltip")},keepalive_pool_size:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_pool_size.label"),tooltip:o("form.fields.keepalive_pool_size.tooltip")},password:{type:_.ConfigurationSchemaType.Redacted,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.password.label"),tooltip:o("form.fields.password.tooltip")},port:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.port.label"),tooltip:o("form.fields.port.tooltip")},read_timeout:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.read_timeout.label"),tooltip:o("form.fields.read_timeout.tooltip")},send_timeout:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.send_timeout.label"),tooltip:o("form.fields.send_timeout.tooltip")},sentinel_master:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_master.label"),tooltip:o("form.fields.sentinel_master.tooltip")},sentinel_nodes:{type:_.ConfigurationSchemaType.JsonArray,section:_.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.sentinel_nodes.tooltip")},sentinel_password:{type:_.ConfigurationSchemaType.Redacted,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_password.label"),tooltip:o("form.fields.sentinel_password.tooltip")},sentinel_role:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_role.label"),tooltip:o("form.fields.sentinel_role.tooltip")},sentinel_username:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_username.label"),tooltip:o("form.fields.sentinel_username.tooltip")},server_name:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.server_name.label"),tooltip:o("form.fields.server_name.tooltip")},ssl_verify:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl_verify.label"),tooltip:o("form.fields.ssl_verify.tooltip")},ssl:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl.label"),tooltip:o("form.fields.ssl.tooltip")},timeout:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.timeout.label"),tooltip:o("form.fields.timeout.tooltip")},username:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.username.label"),tooltip:o("form.fields.username.tooltip")},cloud_authentication:{type:_.ConfigurationSchemaType.Json,section:_.ConfigurationSchemaSection.Basic,label:o("form.sections.cloud_auth.title")}},m=g=>{const S={},s=Object.keys(T);for(const O of s)g.includes(O)?S[O]={...T[O],order:g.indexOf(O)+1}:S[O]={...T[O],hidden:!0};return S},y=t.computed(()=>{const g=["id","name","tags","type","updated_at","created_at"];switch(u.value){case C.HOST_PORT_CE:return m([...g,"host","port","timeout","database","username","password","ssl","ssl_verify","server_name","cloud_authentication"]);case C.HOST_PORT_EE:return m([...g,"host","port","connection_is_proxied","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout","cloud_authentication"]);case C.CLUSTER:return m([...g,"cluster_nodes","cluster_max_redirections","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout","cloud_authentication"]);case C.SENTINEL:return m([...g,"sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);default:throw new Error("Invalid Redis type")}});return(g,S)=>(t.openBlock(),t.createElementBlock("div",cs,[t.createVNode(t.unref(_.EntityBaseConfigCard),{"code-block-record-formatter":h,config:e.config,"config-card-doc":e.configCardDoc,"config-schema":y.value,"entity-type":t.unref(_.SupportedEntityType).Partial,"fetch-url":a.value,"hide-title":e.hideTitle,"record-resolver":d,"onFetch:error":S[0]||(S[0]=s=>g.$emit("fetch:error",s)),"onFetch:success":p,onLoading:S[1]||(S[1]=s=>g.$emit("loading",s))},{type:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(l.value),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),us="12px";function jn(e){const{redisType:n="redis-ce"}=e,r="1000",i=t.inject(yt.FORMS_CONFIG),{i18n:{t:o}}=Le();if(!i)throw new Error("FORMS_CONFIG must be provided");const{debouncedQueryChange:a,loading:u,error:p,loadItems:l,results:d}=_.useDebouncedFilter(i,ye.list[i.app],r,{fetchedItemsKey:"data",searchKeys:["id","name"]}),h=m=>{switch(m){case C.CLUSTER:return o("form.options.type.cluster");case C.HOST_PORT_CE:return o("form.options.type.host_port");case C.SENTINEL:return o("form.options.type.sentinel");case C.HOST_PORT_EE:return`${o("form.options.type.host_port")} (${o("form.options.type.enterprise")})`}},T=t.computed(()=>(d.value||[]).filter(y=>y.type==="redis-ce"||y.type==="redis-ee").map(y=>({label:y.id,name:y.name,value:y.id,type:y.type,tag:h(Ve(y))})).filter(y=>y.type===n));return t.onBeforeMount(()=>{l()}),{items:T,loading:u,onQueryChange:a,error:p,loadItems:l}}const fs=["id"],Ln=z(t.defineComponent({__name:"RedisConfigurationFormModal",props:{visible:{type:Boolean},partialType:{default:"redis-ee"}},emits:["toast","modal-close","created"],setup(e,{emit:n}){const r=n,{i18n:{t:i}}=Le(),o=t.inject(yt.FORMS_CONFIG),a=t.computed(()=>({...o,cancelRoute:void 0})),{getMessageFromError:u}=_.useErrors(),p=t.useId(),l=t.computed(()=>{switch(e.partialType){case L.REDIS_CE:return L.REDIS_EE;case L.REDIS_EE:return L.REDIS_CE;default:return}}),d=t.ref(!1),h=t.ref(),T=g=>{r("toast",{message:u(g),appearance:"danger"})},m=g=>{r("toast",{message:i("form.partial_created_success_message"),appearance:"success"}),y(),r("created",g)},y=()=>{h.value=void 0,r("modal-close"),t.nextTick(()=>{d.value=!1})};return t.watch(()=>e.visible,g=>{g&&(d.value=!0,t.nextTick(()=>{h.value=`#redis-modal-footer-${p}`}))}),(g,S)=>{const s=t.resolveComponent("KModal");return t.openBlock(),t.createBlock(s,{class:"plugin-redis-partial-form","data-testid":"redis-partial-form-modal","full-screen":"",title:t.unref(i)("form.redis_partial_modal_title"),visible:d.value,onCancel:y},{footer:t.withCtx(()=>[t.createElementVNode("div",{id:`redis-modal-footer-${t.unref(p)}`,class:"redis-modal-footer"},null,8,fs)]),default:t.withCtx(()=>[t.createVNode(Dn,{"action-teleport-target":h.value,config:a.value,"disabled-partial-type":l.value,"slidout-top-offset":0,onCancel:y,onError:T,onUpdate:m},null,8,["action-teleport-target","config","disabled-partial-type"])]),_:1},8,["title","visible"])}}}),[["__scopeId","data-v-2d4dd952"]]),ps={class:"selected-redis-config"},ms=["data-testid"],gs={class:"select-item-name","data-testid":"selected-redis-config"},_s={class:"empty-redis-config","data-testid":"empty-redis-config"},ys=z(t.defineComponent({inheritAttrs:!1,__name:"RedisConfigurationSelector",props:{modelValue:{},redisType:{default:"redis-ee"},placeholder:{},emptyStateText:{},showCreateButton:{type:Boolean,default:!0},createButtonText:{}},emits:["update:modelValue","change","create-new","error-change","modal-close","toast"],setup(e,{emit:n}){const r=n,{i18n:{t:i}}=Le(),{items:o,loading:a,onQueryChange:u,error:p,loadItems:l}=jn({redisType:e.redisType}),d=t.ref(!1),h=g=>{const S=g==null?void 0:g.value;r("update:modelValue",S),r("change",g)},T=()=>{d.value=!0},m=()=>{d.value=!1,r("modal-close")},y=g=>{d.value=!1,l(),h({name:g.name,value:g.id,label:g.name})};return t.watch(p,g=>{r("error-change",g?new Error(String(g)):null)}),(g,S)=>{const s=t.resolveComponent("KBadge"),O=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(O,t.mergeProps({class:"redis-config-select-trigger","enable-filtering":"","filter-function":()=>!0,items:t.unref(o),loading:t.unref(a),"model-value":e.modelValue,placeholder:e.placeholder||t.unref(i)("selector.placeholder")},g.$attrs,{onChange:h,onQueryChange:t.unref(u)}),t.createSlots({"selected-item-template":t.withCtx(({item:E})=>[t.createElementVNode("div",ps,t.toDisplayString(E.name),1)]),"item-template":t.withCtx(({item:E})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${E.name}`},[t.createElementVNode("span",gs,t.toDisplayString(E.name),1),t.createVNode(s,{appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(E.tag),1)]),_:2},1024)],8,ms)]),empty:t.withCtx(()=>[t.createElementVNode("div",_s,t.toDisplayString(e.emptyStateText||t.unref(i)("selector.empty_state")),1)]),_:2},[e.showCreateButton?{name:"dropdown-footer-text",fn:t.withCtx(()=>[t.createElementVNode("div",{class:"new-redis-config-area","data-testid":"new-redis-config-area",onClick:T},[t.createVNode(t.unref(Q.AddIcon),{size:t.unref(us)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(e.createButtonText||t.unref(i)("selector.create_new")),1)])]),key:"0"}:void 0]),1040,["items","loading","model-value","placeholder","onQueryChange"]),t.createVNode(Ln,{"partial-type":e.redisType,visible:d.value,onCreated:y,onModalClose:m,onToast:S[0]||(S[0]=E=>r("toast",E))},null,8,["partial-type","visible"])],64)}}}),[["__scopeId","data-v-b5ce060c"]]),bs={useLinkedPlugins:Bn,useLinkedPluginsFetcher:xe,useRedisConfigurationSelector:jn};V.AuthProvider=D,V.DeleteWarningModal=Mn,V.LinkedPlugins=vn,V.PartialType=L,V.RedisConfigurationConfigCard=ds,V.RedisConfigurationForm=Dn,V.RedisConfigurationFormModal=Ln,V.RedisConfigurationList=ss,V.RedisConfigurationSelector=ys,V.RedisType=C,V.composables=bs,V.constants=Ol,V.helpers=Rl,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(V,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/entities-shared/dist/style.css"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/entities-vaults"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins-icon"),require("@kong-ui-public/forms")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared/dist/style.css","@kong-ui-public/entities-vaults/dist/style.css","@kong-ui-public/entities-shared","@kong-ui-public/entities-vaults","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-plugins-icon","@kong-ui-public/forms"],t):(V=typeof globalThis<"u"?globalThis:V||self,t(V["kong-ui-public-entities-redis-configurations"]={},V.Vue,null,null,V["kong-ui-public-entities-shared"],V["kong-ui-public-entities-vaults"],V.VueRouter,V.KongIcons,V["kong-ui-public-i18n"],V["kong-ui-public-entities-plugins-icon"],V.forms))})(this,function(V,t,Cs,Ts,_,J,mt,Q,gt,_t,yt){"use strict";var C=(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))(C||{}),L=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(L||{}),D=(e=>(e.AWS="aws",e.GCP="gcp",e.AZURE="azure",e))(D||{}),bt=typeof global=="object"&&global&&global.Object===Object&&global,Un=typeof self=="object"&&self&&self.Object===Object&&self,Z=bt||Un||Function("return this")(),F=Z.Symbol,ht=Object.prototype,Fn=ht.hasOwnProperty,zn=ht.toString,Ce=F?F.toStringTag:void 0;function Kn(e){var n=Fn.call(e,Ce),r=e[Ce];try{e[Ce]=void 0;var i=!0}catch{}var o=zn.call(e);return i&&(n?e[Ce]=r:delete e[Ce]),o}var Hn=Object.prototype,Wn=Hn.toString;function qn(e){return Wn.call(e)}var Gn="[object Null]",Jn="[object Undefined]",wt=F?F.toStringTag:void 0;function le(e){return e==null?e===void 0?Jn:Gn:wt&&wt in Object(e)?Kn(e):qn(e)}function Y(e){return e!=null&&typeof e=="object"}var Zn="[object Symbol]";function ze(e){return typeof e=="symbol"||Y(e)&&le(e)==Zn}function Ct(e,n){for(var r=-1,i=e==null?0:e.length,o=Array(i);++r<i;)o[r]=n(e[r],r,e);return o}var X=Array.isArray,Tt=F?F.prototype:void 0,St=Tt?Tt.toString:void 0;function kt(e){if(typeof e=="string")return e;if(X(e))return Ct(e,kt)+"";if(ze(e))return St?St.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function Ie(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function Qn(e){return e}var Yn="[object AsyncFunction]",Xn="[object Function]",er="[object GeneratorFunction]",tr="[object Proxy]";function Et(e){if(!Ie(e))return!1;var n=le(e);return n==Xn||n==er||n==Yn||n==tr}var Ke=Z["__core-js_shared__"],Vt=function(){var e=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function nr(e){return!!Vt&&Vt in e}var rr=Function.prototype,or=rr.toString;function se(e){if(e!=null){try{return or.call(e)}catch{}try{return e+""}catch{}}return""}var ir=/[\\^$.*+?()[\]{}|]/g,ar=/^\[object .+?Constructor\]$/,lr=Function.prototype,sr=Object.prototype,cr=lr.toString,dr=sr.hasOwnProperty,ur=RegExp("^"+cr.call(dr).replace(ir,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fr(e){if(!Ie(e)||nr(e))return!1;var n=Et(e)?ur:ar;return n.test(se(e))}function pr(e,n){return e==null?void 0:e[n]}function ce(e,n){var r=pr(e,n);return fr(r)?r:void 0}var He=ce(Z,"WeakMap");function mr(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}var gr=800,_r=16,yr=Date.now;function br(e){var n=0,r=0;return function(){var i=yr(),o=_r-(i-r);if(r=i,o>0){if(++n>=gr)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function hr(e){return function(){return e}}var Oe=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch{}}(),wr=Oe?function(e,n){return Oe(e,"toString",{configurable:!0,enumerable:!1,value:hr(n),writable:!0})}:Qn,Cr=br(wr);function Tr(e,n){for(var r=-1,i=e==null?0:e.length;++r<i&&n(e[r],r,e)!==!1;);return e}var Sr=9007199254740991,kr=/^(?:0|[1-9]\d*)$/;function Er(e,n){var r=typeof e;return n=n??Sr,!!n&&(r=="number"||r!="symbol"&&kr.test(e))&&e>-1&&e%1==0&&e<n}function xt(e,n,r){n=="__proto__"&&Oe?Oe(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}function We(e,n){return e===n||e!==e&&n!==n}var Vr=Object.prototype,xr=Vr.hasOwnProperty;function It(e,n,r){var i=e[n];(!(xr.call(e,n)&&We(i,r))||r===void 0&&!(n in e))&&xt(e,n,r)}function Ir(e,n,r,i){var o=!r;r||(r={});for(var a=-1,u=n.length;++a<u;){var p=n[a],l=void 0;l===void 0&&(l=e[p]),o?xt(r,p,l):It(r,p,l)}return r}var Ot=Math.max;function Or(e,n,r){return n=Ot(n===void 0?e.length-1:n,0),function(){for(var i=arguments,o=-1,a=Ot(i.length-n,0),u=Array(a);++o<a;)u[o]=i[n+o];o=-1;for(var p=Array(n+1);++o<n;)p[o]=i[o];return p[n]=r(u),mr(e,this,p)}}var Rr=9007199254740991;function Rt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Rr}function Pt(e){return e!=null&&Rt(e.length)&&!Et(e)}var Pr=Object.prototype;function At(e){var n=e&&e.constructor,r=typeof n=="function"&&n.prototype||Pr;return e===r}function Ar(e,n){for(var r=-1,i=Array(e);++r<e;)i[r]=n(r);return i}var Nr="[object Arguments]";function Nt(e){return Y(e)&&le(e)==Nr}var $t=Object.prototype,$r=$t.hasOwnProperty,Br=$t.propertyIsEnumerable,Bt=Nt(function(){return arguments}())?Nt:function(e){return Y(e)&&$r.call(e,"callee")&&!Br.call(e,"callee")};function Dr(){return!1}var Dt=typeof V=="object"&&V&&!V.nodeType&&V,vt=Dt&&typeof module=="object"&&module&&!module.nodeType&&module,vr=vt&&vt.exports===Dt,Mt=vr?Z.Buffer:void 0,Mr=Mt?Mt.isBuffer:void 0,Re=Mr||Dr,jr="[object Arguments]",Lr="[object Array]",Ur="[object Boolean]",Fr="[object Date]",zr="[object Error]",Kr="[object Function]",Hr="[object Map]",Wr="[object Number]",qr="[object Object]",Gr="[object RegExp]",Jr="[object Set]",Zr="[object String]",Qr="[object WeakMap]",Yr="[object ArrayBuffer]",Xr="[object DataView]",eo="[object Float32Array]",to="[object Float64Array]",no="[object Int8Array]",ro="[object Int16Array]",oo="[object Int32Array]",io="[object Uint8Array]",ao="[object Uint8ClampedArray]",lo="[object Uint16Array]",so="[object Uint32Array]",A={};A[eo]=A[to]=A[no]=A[ro]=A[oo]=A[io]=A[ao]=A[lo]=A[so]=!0,A[jr]=A[Lr]=A[Yr]=A[Ur]=A[Xr]=A[Fr]=A[zr]=A[Kr]=A[Hr]=A[Wr]=A[qr]=A[Gr]=A[Jr]=A[Zr]=A[Qr]=!1;function co(e){return Y(e)&&Rt(e.length)&&!!A[le(e)]}function qe(e){return function(n){return e(n)}}var jt=typeof V=="object"&&V&&!V.nodeType&&V,Te=jt&&typeof module=="object"&&module&&!module.nodeType&&module,uo=Te&&Te.exports===jt,Ge=uo&&bt.process,ge=function(){try{var e=Te&&Te.require&&Te.require("util").types;return e||Ge&&Ge.binding&&Ge.binding("util")}catch{}}(),Lt=ge&&ge.isTypedArray,Ut=Lt?qe(Lt):co,fo=Object.prototype,po=fo.hasOwnProperty;function Ft(e,n){var r=X(e),i=!r&&Bt(e),o=!r&&!i&&Re(e),a=!r&&!i&&!o&&Ut(e),u=r||i||o||a,p=u?Ar(e.length,String):[],l=p.length;for(var d in e)(n||po.call(e,d))&&!(u&&(d=="length"||o&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Er(d,l)))&&p.push(d);return p}function zt(e,n){return function(r){return e(n(r))}}var mo=zt(Object.keys,Object),go=Object.prototype,_o=go.hasOwnProperty;function yo(e){if(!At(e))return mo(e);var n=[];for(var r in Object(e))_o.call(e,r)&&r!="constructor"&&n.push(r);return n}function bo(e){return Pt(e)?Ft(e):yo(e)}function ho(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var wo=Object.prototype,Co=wo.hasOwnProperty;function To(e){if(!Ie(e))return ho(e);var n=At(e),r=[];for(var i in e)i=="constructor"&&(n||!Co.call(e,i))||r.push(i);return r}function So(e){return Pt(e)?Ft(e,!0):To(e)}var ko=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eo=/^\w*$/;function Vo(e,n){if(X(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ze(e)?!0:Eo.test(e)||!ko.test(e)||n!=null&&e in Object(n)}var Se=ce(Object,"create");function xo(){this.__data__=Se?Se(null):{},this.size=0}function Io(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Oo="__lodash_hash_undefined__",Ro=Object.prototype,Po=Ro.hasOwnProperty;function Ao(e){var n=this.__data__;if(Se){var r=n[e];return r===Oo?void 0:r}return Po.call(n,e)?n[e]:void 0}var No=Object.prototype,$o=No.hasOwnProperty;function Bo(e){var n=this.__data__;return Se?n[e]!==void 0:$o.call(n,e)}var Do="__lodash_hash_undefined__";function vo(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Se&&n===void 0?Do:n,this}function de(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}de.prototype.clear=xo,de.prototype.delete=Io,de.prototype.get=Ao,de.prototype.has=Bo,de.prototype.set=vo;function Mo(){this.__data__=[],this.size=0}function Pe(e,n){for(var r=e.length;r--;)if(We(e[r][0],n))return r;return-1}var jo=Array.prototype,Lo=jo.splice;function Uo(e){var n=this.__data__,r=Pe(n,e);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Lo.call(n,r,1),--this.size,!0}function Fo(e){var n=this.__data__,r=Pe(n,e);return r<0?void 0:n[r][1]}function zo(e){return Pe(this.__data__,e)>-1}function Ko(e,n){var r=this.__data__,i=Pe(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this}function ee(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}ee.prototype.clear=Mo,ee.prototype.delete=Uo,ee.prototype.get=Fo,ee.prototype.has=zo,ee.prototype.set=Ko;var ke=ce(Z,"Map");function Ho(){this.size=0,this.__data__={hash:new de,map:new(ke||ee),string:new de}}function Wo(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Ae(e,n){var r=e.__data__;return Wo(n)?r[typeof n=="string"?"string":"hash"]:r.map}function qo(e){var n=Ae(this,e).delete(e);return this.size-=n?1:0,n}function Go(e){return Ae(this,e).get(e)}function Jo(e){return Ae(this,e).has(e)}function Zo(e,n){var r=Ae(this,e),i=r.size;return r.set(e,n),this.size+=r.size==i?0:1,this}function te(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}te.prototype.clear=Ho,te.prototype.delete=qo,te.prototype.get=Go,te.prototype.has=Jo,te.prototype.set=Zo;var Qo="Expected a function";function Je(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(Qo);var r=function(){var i=arguments,o=n?n.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);var u=e.apply(this,i);return r.cache=a.set(o,u)||a,u};return r.cache=new(Je.Cache||te),r}Je.Cache=te;var Yo=500;function Xo(e){var n=Je(e,function(i){return r.size===Yo&&r.clear(),i}),r=n.cache;return n}var ei=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ti=/\\(\\)?/g,ni=Xo(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(ei,function(r,i,o,a){n.push(o?a.replace(ti,"$1"):i||r)}),n});function ri(e){return e==null?"":kt(e)}function Ze(e,n){return X(e)?e:Vo(e,n)?[e]:ni(ri(e))}function Kt(e){if(typeof e=="string"||ze(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function oi(e,n){n=Ze(n,e);for(var r=0,i=n.length;e!=null&&r<i;)e=e[Kt(n[r++])];return r&&r==i?e:void 0}function Qe(e,n){for(var r=-1,i=n.length,o=e.length;++r<i;)e[o+r]=n[r];return e}var Ht=F?F.isConcatSpreadable:void 0;function ii(e){return X(e)||Bt(e)||!!(Ht&&e&&e[Ht])}function ai(e,n,r,i,o){var a=-1,u=e.length;for(r||(r=ii),o||(o=[]);++a<u;){var p=e[a];r(p)?Qe(o,p):o[o.length]=p}return o}function li(e){var n=e==null?0:e.length;return n?ai(e):[]}function si(e){return Cr(Or(e,void 0,li),e+"")}var Wt=zt(Object.getPrototypeOf,Object),ci="[object Object]",di=Function.prototype,ui=Object.prototype,qt=di.toString,fi=ui.hasOwnProperty,pi=qt.call(Object);function mi(e){if(!Y(e)||le(e)!=ci)return!1;var n=Wt(e);if(n===null)return!0;var r=fi.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&qt.call(r)==pi}function gi(e,n,r){var i=-1,o=e.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(o);++i<o;)a[i]=e[i+n];return a}function _i(){this.__data__=new ee,this.size=0}function yi(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}function bi(e){return this.__data__.get(e)}function hi(e){return this.__data__.has(e)}var wi=200;function Ci(e,n){var r=this.__data__;if(r instanceof ee){var i=r.__data__;if(!ke||i.length<wi-1)return i.push([e,n]),this.size=++r.size,this;r=this.__data__=new te(i)}return r.set(e,n),this.size=r.size,this}function ne(e){var n=this.__data__=new ee(e);this.size=n.size}ne.prototype.clear=_i,ne.prototype.delete=yi,ne.prototype.get=bi,ne.prototype.has=hi,ne.prototype.set=Ci;var Gt=typeof V=="object"&&V&&!V.nodeType&&V,Jt=Gt&&typeof module=="object"&&module&&!module.nodeType&&module,Ti=Jt&&Jt.exports===Gt,Zt=Ti?Z.Buffer:void 0;Zt&&Zt.allocUnsafe;function Si(e,n){return e.slice()}function ki(e,n){for(var r=-1,i=e==null?0:e.length,o=0,a=[];++r<i;){var u=e[r];n(u,r,e)&&(a[o++]=u)}return a}function Qt(){return[]}var Ei=Object.prototype,Vi=Ei.propertyIsEnumerable,Yt=Object.getOwnPropertySymbols,Xt=Yt?function(e){return e==null?[]:(e=Object(e),ki(Yt(e),function(n){return Vi.call(e,n)}))}:Qt,xi=Object.getOwnPropertySymbols,Ii=xi?function(e){for(var n=[];e;)Qe(n,Xt(e)),e=Wt(e);return n}:Qt;function en(e,n,r){var i=n(e);return X(e)?i:Qe(i,r(e))}function tn(e){return en(e,bo,Xt)}function nn(e){return en(e,So,Ii)}var Ye=ce(Z,"DataView"),Xe=ce(Z,"Promise"),et=ce(Z,"Set"),rn="[object Map]",Oi="[object Object]",on="[object Promise]",an="[object Set]",ln="[object WeakMap]",sn="[object DataView]",Ri=se(Ye),Pi=se(ke),Ai=se(Xe),Ni=se(et),$i=se(He),K=le;(Ye&&K(new Ye(new ArrayBuffer(1)))!=sn||ke&&K(new ke)!=rn||Xe&&K(Xe.resolve())!=on||et&&K(new et)!=an||He&&K(new He)!=ln)&&(K=function(e){var n=le(e),r=n==Oi?e.constructor:void 0,i=r?se(r):"";if(i)switch(i){case Ri:return sn;case Pi:return rn;case Ai:return on;case Ni:return an;case $i:return ln}return n});var Bi=Object.prototype,Di=Bi.hasOwnProperty;function vi(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Di.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Ne=Z.Uint8Array;function tt(e){var n=new e.constructor(e.byteLength);return new Ne(n).set(new Ne(e)),n}function Mi(e,n){var r=tt(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var ji=/\w*$/;function Li(e){var n=new e.constructor(e.source,ji.exec(e));return n.lastIndex=e.lastIndex,n}var cn=F?F.prototype:void 0,dn=cn?cn.valueOf:void 0;function Ui(e){return dn?Object(dn.call(e)):{}}function Fi(e,n){var r=tt(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var zi="[object Boolean]",Ki="[object Date]",Hi="[object Map]",Wi="[object Number]",qi="[object RegExp]",Gi="[object Set]",Ji="[object String]",Zi="[object Symbol]",Qi="[object ArrayBuffer]",Yi="[object DataView]",Xi="[object Float32Array]",ea="[object Float64Array]",ta="[object Int8Array]",na="[object Int16Array]",ra="[object Int32Array]",oa="[object Uint8Array]",ia="[object Uint8ClampedArray]",aa="[object Uint16Array]",la="[object Uint32Array]";function sa(e,n,r){var i=e.constructor;switch(n){case Qi:return tt(e);case zi:case Ki:return new i(+e);case Yi:return Mi(e);case Xi:case ea:case ta:case na:case ra:case oa:case ia:case aa:case la:return Fi(e);case Hi:return new i;case Wi:case Ji:return new i(e);case qi:return Li(e);case Gi:return new i;case Zi:return Ui(e)}}var ca="[object Map]";function da(e){return Y(e)&&K(e)==ca}var un=ge&&ge.isMap,ua=un?qe(un):da,fa="[object Set]";function pa(e){return Y(e)&&K(e)==fa}var fn=ge&&ge.isSet,ma=fn?qe(fn):pa,pn="[object Arguments]",ga="[object Array]",_a="[object Boolean]",ya="[object Date]",ba="[object Error]",mn="[object Function]",ha="[object GeneratorFunction]",wa="[object Map]",Ca="[object Number]",gn="[object Object]",Ta="[object RegExp]",Sa="[object Set]",ka="[object String]",Ea="[object Symbol]",Va="[object WeakMap]",xa="[object ArrayBuffer]",Ia="[object DataView]",Oa="[object Float32Array]",Ra="[object Float64Array]",Pa="[object Int8Array]",Aa="[object Int16Array]",Na="[object Int32Array]",$a="[object Uint8Array]",Ba="[object Uint8ClampedArray]",Da="[object Uint16Array]",va="[object Uint32Array]",P={};P[pn]=P[ga]=P[xa]=P[Ia]=P[_a]=P[ya]=P[Oa]=P[Ra]=P[Pa]=P[Aa]=P[Na]=P[wa]=P[Ca]=P[gn]=P[Ta]=P[Sa]=P[ka]=P[Ea]=P[$a]=P[Ba]=P[Da]=P[va]=!0,P[ba]=P[mn]=P[Va]=!1;function $e(e,n,r,i,o,a){var u;if(r&&(u=o?r(e,i,o,a):r(e)),u!==void 0)return u;if(!Ie(e))return e;var p=X(e);if(p)u=vi(e);else{var l=K(e),d=l==mn||l==ha;if(Re(e))return Si(e);if(l==gn||l==pn||d&&!o)u={};else{if(!P[l])return o?e:{};u=sa(e,l)}}a||(a=new ne);var h=a.get(e);if(h)return h;a.set(e,u),ma(e)?e.forEach(function(y){u.add($e(y,n,r,y,e,a))}):ua(e)&&e.forEach(function(y,g){u.set(g,$e(y,n,r,g,e,a))});var T=nn,m=p?void 0:T(e);return Tr(m||e,function(y,g){m&&(g=y,y=e[g]),It(u,g,$e(y,n,r,g,e,a))}),u}var Ma="__lodash_hash_undefined__";function ja(e){return this.__data__.set(e,Ma),this}function La(e){return this.__data__.has(e)}function Be(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new te;++n<r;)this.add(e[n])}Be.prototype.add=Be.prototype.push=ja,Be.prototype.has=La;function Ua(e,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(e[r],r,e))return!0;return!1}function Fa(e,n){return e.has(n)}var za=1,Ka=2;function _n(e,n,r,i,o,a){var u=r&za,p=e.length,l=n.length;if(p!=l&&!(u&&l>p))return!1;var d=a.get(e),h=a.get(n);if(d&&h)return d==n&&h==e;var T=-1,m=!0,y=r&Ka?new Be:void 0;for(a.set(e,n),a.set(n,e);++T<p;){var g=e[T],S=n[T];if(i)var s=u?i(S,g,T,n,e,a):i(g,S,T,e,n,a);if(s!==void 0){if(s)continue;m=!1;break}if(y){if(!Ua(n,function(O,E){if(!Fa(y,E)&&(g===O||o(g,O,r,i,a)))return y.push(E)})){m=!1;break}}else if(!(g===S||o(g,S,r,i,a))){m=!1;break}}return a.delete(e),a.delete(n),m}function Ha(e){var n=-1,r=Array(e.size);return e.forEach(function(i,o){r[++n]=[o,i]}),r}function Wa(e){var n=-1,r=Array(e.size);return e.forEach(function(i){r[++n]=i}),r}var qa=1,Ga=2,Ja="[object Boolean]",Za="[object Date]",Qa="[object Error]",Ya="[object Map]",Xa="[object Number]",el="[object RegExp]",tl="[object Set]",nl="[object String]",rl="[object Symbol]",ol="[object ArrayBuffer]",il="[object DataView]",yn=F?F.prototype:void 0,nt=yn?yn.valueOf:void 0;function al(e,n,r,i,o,a,u){switch(r){case il:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case ol:return!(e.byteLength!=n.byteLength||!a(new Ne(e),new Ne(n)));case Ja:case Za:case Xa:return We(+e,+n);case Qa:return e.name==n.name&&e.message==n.message;case el:case nl:return e==n+"";case Ya:var p=Ha;case tl:var l=i&qa;if(p||(p=Wa),e.size!=n.size&&!l)return!1;var d=u.get(e);if(d)return d==n;i|=Ga,u.set(e,n);var h=_n(p(e),p(n),i,o,a,u);return u.delete(e),h;case rl:if(nt)return nt.call(e)==nt.call(n)}return!1}var ll=1,sl=Object.prototype,cl=sl.hasOwnProperty;function dl(e,n,r,i,o,a){var u=r&ll,p=tn(e),l=p.length,d=tn(n),h=d.length;if(l!=h&&!u)return!1;for(var T=l;T--;){var m=p[T];if(!(u?m in n:cl.call(n,m)))return!1}var y=a.get(e),g=a.get(n);if(y&&g)return y==n&&g==e;var S=!0;a.set(e,n),a.set(n,e);for(var s=u;++T<l;){m=p[T];var O=e[m],E=n[m];if(i)var c=u?i(E,O,m,n,e,a):i(O,E,m,e,n,a);if(!(c===void 0?O===E||o(O,E,r,i,a):c)){S=!1;break}s||(s=m=="constructor")}if(S&&!s){var x=e.constructor,R=n.constructor;x!=R&&"constructor"in e&&"constructor"in n&&!(typeof x=="function"&&x instanceof x&&typeof R=="function"&&R instanceof R)&&(S=!1)}return a.delete(e),a.delete(n),S}var ul=1,bn="[object Arguments]",hn="[object Array]",De="[object Object]",fl=Object.prototype,wn=fl.hasOwnProperty;function pl(e,n,r,i,o,a){var u=X(e),p=X(n),l=u?hn:K(e),d=p?hn:K(n);l=l==bn?De:l,d=d==bn?De:d;var h=l==De,T=d==De,m=l==d;if(m&&Re(e)){if(!Re(n))return!1;u=!0,h=!1}if(m&&!h)return a||(a=new ne),u||Ut(e)?_n(e,n,r,i,o,a):al(e,n,l,r,i,o,a);if(!(r&ul)){var y=h&&wn.call(e,"__wrapped__"),g=T&&wn.call(n,"__wrapped__");if(y||g){var S=y?e.value():e,s=g?n.value():n;return a||(a=new ne),o(S,s,r,i,a)}}return m?(a||(a=new ne),dl(e,n,r,i,o,a)):!1}function Cn(e,n,r,i,o){return e===n?!0:e==null||n==null||!Y(e)&&!Y(n)?e!==e&&n!==n:pl(e,n,r,i,Cn,o)}function ml(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function gl(e,n){return n.length<2?e:oi(e,gi(n,0,-1))}function _l(e,n){return Cn(e,n)}var yl=Object.prototype,bl=yl.hasOwnProperty;function hl(e,n){n=Ze(n,e);var r=-1,i=n.length;if(!i)return!0;for(var o=e==null||typeof e!="object"&&typeof e!="function";++r<i;){var a=n[r];if(typeof a=="string"){if(a==="__proto__"&&!bl.call(e,"__proto__"))return!1;if(a==="constructor"&&r+1<i&&typeof n[r+1]=="string"&&n[r+1]==="prototype"){if(o&&r===0)continue;return!1}}}var u=gl(e,n);return u==null||delete u[Kt(ml(n))]}function wl(e){return mi(e)?void 0:e}var Cl=1,Tl=2,Sl=4,kl=si(function(e,n){var r={};if(e==null)return r;var i=!1;n=Ct(n,function(a){return a=Ze(a,e),i||(i=a.length>1),a}),Ir(e,nn(e),r),i&&(r=$e(r,Cl|Tl|Sl,wl));for(var o=n.length;o--;)hl(r,n[o]);return r});const j=[];for(let e=0;e<256;++e)j.push((e+256).toString(16).slice(1));function El(e,n=0){return(j[e[n+0]]+j[e[n+1]]+j[e[n+2]]+j[e[n+3]]+"-"+j[e[n+4]]+j[e[n+5]]+"-"+j[e[n+6]]+j[e[n+7]]+"-"+j[e[n+8]]+j[e[n+9]]+"-"+j[e[n+10]]+j[e[n+11]]+j[e[n+12]]+j[e[n+13]]+j[e[n+14]]+j[e[n+15]]).toLowerCase()}let rt;const Vl=new Uint8Array(16);function xl(){if(!rt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");rt=crypto.getRandomValues.bind(crypto)}return rt(Vl)}const Tn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Il(e,n,r){var o;if(Tn.randomUUID&&!e)return Tn.randomUUID();e=e||{};const i=e.random??((o=e.rng)==null?void 0:o.call(e))??xl();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,El(i)}const Sn={ip:"127.0.0.1",port:6379},kn={host:"127.0.0.1",port:6379},_e=C.HOST_PORT_EE,En={port:6379,host:"127.0.0.1",database:0,username:"",password:"",ssl:!1,ssl_verify:!1,server_name:"",connect_timeout:2e3,send_timeout:2e3,read_timeout:2e3,sentinel_username:"",sentinel_password:"",keepalive_pool_size:256,keepalive_backlog:0,sentinel_master:"",sentinel_nodes:[],cluster_nodes:[],cluster_max_redirections:0,connection_is_proxied:!1,timeout:2e3,cloud_authentication:{aws_is_serverless:!0}},Ol=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_CLUSTER_NODE:Sn,DEFAULT_FIELDS:En,DEFAULT_REDIS_TYPE:_e,DEFAULT_SENTINEL_NODE:kn},Symbol.toStringTag,{value:"Module"})),Ee=e=>({...e,id:Il()}),ot=e=>{const{id:n,...r}=e;return r},Vn=()=>Ee(kn),xn=()=>Ee(Sn),Ve=e=>{var n,r;return e.type===L.REDIS_CE?C.HOST_PORT_CE:(n=e.config.sentinel_nodes)!=null&&n.length?C.SENTINEL:(r=e.config.cluster_nodes)!=null&&r.length?C.CLUSTER:C.HOST_PORT_EE},ve=e=>e===C.HOST_PORT_CE?L.REDIS_CE:L.REDIS_EE,w={int(e,n){return e==null?n:parseInt(e.toString(),10)},str(e,n){return e==null||e===""?n:e.toString()},removeIdClusterNodes(e){return e.map(n=>({...ot(n),port:w.int(n.port)}))},removeIdFromSentinelNodes(e){return e.map(n=>({...ot(n),port:w.int(n.port)}))},addIdToClusterNodes(e){return e.map(Ee)},addIdToSentinelNodes(e){return e.map(Ee)},removeNullValues(e){const n={...e};for(const r in n)n[r]===null&&delete n[r];return n},stringToArray(e,n=","){return e?e.split(n).map(r=>String(r||"").trim()).filter(r=>r!==""):[]},arrayToString(e,n=", "){return e?e.join(n):""}},it=e=>{switch(e==null?void 0:e.auth_provider){case D.AWS:return{auth_provider:e.auth_provider,aws_cache_name:e.aws_cache_name,aws_region:e.aws_region,aws_is_serverless:e.aws_is_serverless,aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key,aws_assume_role_arn:e.aws_assume_role_arn,aws_role_session_name:e.aws_role_session_name};case D.GCP:return{auth_provider:e.auth_provider,gcp_service_account_json:e.gcp_service_account_json};case D.AZURE:return{auth_provider:e.auth_provider,azure_client_id:e.azure_client_id,azure_client_secret:e.azure_client_secret,azure_tenant_id:e.azure_tenant_id};default:return null}},Rl=Object.freeze(Object.defineProperty({__proto__:null,genDefaultClusterNode:xn,genDefaultSentinelNode:Vn,getRedisType:Ve,mapRedisTypeToPartialType:ve,pickCloudAuthFields:it,shallowCopyWithId:Ee,shallowCopyWithoutId:ot,standardize:w},Symbol.toStringTag,{value:"Module"})),Me="/v2/control-planes/{controlPlaneId}/core-entities",je="/{workspace}",ye={list:{konnect:`${Me}/partials`,kongManager:`${je}/partials`},form:{konnect:{create:`${Me}/partials`,edit:`${Me}/partials/{id}`},kongManager:{create:`${je}/partials`,edit:`${je}/partials/{id}`}},links:{konnect:`${Me}/partials/{id}/links`,kongManager:`${je}/partials/{id}/links`}},Pl=e=>{if(e==null||e==="")return!1;if(typeof e=="string"){const n=parseInt(e,10);return Number.isNaN(n)?!0:n>=0&&n<=65535}return typeof e=="number"?e>=0&&e<=65535:!1},Al=e=>{const{partialId:n,config:r,defaultRedisType:i=_e}=e,o=!!n,{axiosInstance:a}=_.useAxios(r.axiosRequestConfig),{getMessageFromError:u}=_.useErrors(),p=t.computed(()=>n?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),l=t.reactive({fields:{name:"",tags:"",type:ve(i),config:JSON.parse(JSON.stringify(En))},readonly:!1,errorMessage:""}),d=t.ref(),h=t.ref(i),T=t.computed(()=>h.value===C.HOST_PORT_EE||h.value===C.CLUSTER||h.value===C.SENTINEL);t.watch(h,c=>{l.fields.type=ve(c)});const m=t.computed(()=>{var x,R,M,U;if(o&&_l(d.value,g.value)||!((x=l.fields.name)!=null&&x.length))return!1;const{config:c}=l.fields;switch(h.value){case C.HOST_PORT_CE:case C.HOST_PORT_EE:return!!c.host&&c.host.length>0&&Pl(c.port)&&(((R=c.cloud_authentication)==null?void 0:R.auth_provider)!=="aws"||!!c.cloud_authentication.aws_cache_name);case C.CLUSTER:return!!c.cluster_nodes.length&&c.cluster_nodes.every(H=>H.ip.length>0)&&(((M=c.cloud_authentication)==null?void 0:M.auth_provider)!=="aws"||!!c.cloud_authentication.aws_cache_name);case C.SENTINEL:return!!c.sentinel_nodes.length&&c.sentinel_nodes.every(H=>H.host.length>0)&&!!((U=c.sentinel_master)!=null&&U.length)&&c.sentinel_role&&!!c.sentinel_role.length;default:throw new Error("Invalid redis type")}}),y=()=>{if(!e.cloudAuthAvailable)return;const c=it(l.fields.config.cloud_authentication);return c!=null&&c.auth_provider?{auth_provider:c.auth_provider,aws_cache_name:w.str(c.aws_cache_name,null),aws_region:w.str(c.aws_region,null),aws_is_serverless:c.aws_is_serverless,aws_access_key_id:w.str(c.aws_access_key_id,null),aws_secret_access_key:w.str(c.aws_secret_access_key,null),aws_assume_role_arn:w.str(c.aws_assume_role_arn,null),aws_role_session_name:w.str(c.aws_role_session_name,null),gcp_service_account_json:w.str(c.gcp_service_account_json,null),azure_client_id:w.str(c.azure_client_id,null),azure_client_secret:w.str(c.azure_client_secret,null),azure_tenant_id:w.str(c.azure_tenant_id,null)}:null},g=t.computed(()=>{switch(h.value){case C.HOST_PORT_CE:return{name:l.fields.name,type:l.fields.type,tags:w.stringToArray(l.fields.tags),config:{cloud_authentication:y(),host:l.fields.config.host,port:w.int(l.fields.config.port),timeout:w.int(l.fields.config.timeout),username:w.str(l.fields.config.username,null),database:w.int(l.fields.config.database),password:w.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:w.str(l.fields.config.server_name,null)}};case C.HOST_PORT_EE:return{name:l.fields.name,type:l.fields.type,tags:w.stringToArray(l.fields.tags),config:{cloud_authentication:y(),connect_timeout:w.int(l.fields.config.connect_timeout),connection_is_proxied:l.fields.config.connection_is_proxied,database:w.int(l.fields.config.database),host:l.fields.config.host,keepalive_backlog:w.int(l.fields.config.keepalive_backlog),keepalive_pool_size:w.int(l.fields.config.keepalive_pool_size),password:w.str(l.fields.config.password,null),port:Number.isNaN(Number(l.fields.config.port))?l.fields.config.port:w.int(l.fields.config.port),read_timeout:w.int(l.fields.config.read_timeout),send_timeout:w.int(l.fields.config.send_timeout),server_name:w.str(l.fields.config.server_name,null),ssl_verify:l.fields.config.ssl_verify,ssl:l.fields.config.ssl,username:w.str(l.fields.config.username,null),cluster_nodes:null,cluster_max_redirections:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null}};case C.CLUSTER:return{name:l.fields.name,type:l.fields.type,tags:w.stringToArray(l.fields.tags),config:{cloud_authentication:y(),cluster_nodes:w.removeIdClusterNodes(l.fields.config.cluster_nodes),cluster_max_redirections:w.int(l.fields.config.cluster_max_redirections),username:w.str(l.fields.config.username,null),password:w.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:w.str(l.fields.config.server_name,null),connect_timeout:w.int(l.fields.config.connect_timeout),database:w.int(l.fields.config.database),send_timeout:w.int(l.fields.config.send_timeout),read_timeout:w.int(l.fields.config.read_timeout),keepalive_pool_size:w.int(l.fields.config.keepalive_pool_size),keepalive_backlog:w.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null,host:null,port:null}};case C.SENTINEL:return{name:l.fields.name,type:l.fields.type,tags:w.stringToArray(l.fields.tags),config:{sentinel_master:w.str(l.fields.config.sentinel_master,null),sentinel_nodes:w.removeIdFromSentinelNodes(l.fields.config.sentinel_nodes),sentinel_role:w.str(l.fields.config.sentinel_role,null),sentinel_username:w.str(l.fields.config.sentinel_username,null),sentinel_password:w.str(l.fields.config.sentinel_password,null),username:w.str(l.fields.config.username,null),password:w.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:w.str(l.fields.config.server_name,null),database:w.int(l.fields.config.database),connect_timeout:w.int(l.fields.config.connect_timeout),send_timeout:w.int(l.fields.config.send_timeout),read_timeout:w.int(l.fields.config.read_timeout),keepalive_pool_size:w.int(l.fields.config.keepalive_pool_size),keepalive_backlog:w.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,cluster_nodes:null,cluster_max_redirections:null,host:null,port:null}};default:throw new Error("Invalid redis type")}}),S=t.computed(()=>{let c=`${r.apiBaseUrl}${ye.form[r.app][p.value]}`;return r.app==="konnect"?c=c.replace(/{controlPlaneId}/gi,(r==null?void 0:r.controlPlaneId)||""):r.app==="kongManager"&&(c=c.replace(/\/{workspace}/gi,r!=null&&r.workspace?`/${r.workspace}`:"")),c=c.replace(/{id}/gi,n||""),c}),s=t.computed(()=>{var c;return(c=ye.form[r==null?void 0:r.app])==null?void 0:c.edit});return{form:l,canSubmit:m,payload:g,isEdit:o,redisType:h,redisTypeIsEnterprise:T,formType:p,fetchUrl:s,submit:async()=>{try{l.readonly=!0,l.errorMessage="";let c=g.value;return r.app==="konnect"&&(c={...c,config:w.removeNullValues(c.config)}),p.value===_.EntityBaseFormType.Create?await a.post(S.value,c):r.app==="konnect"?await a.put(S.value,c):await a.patch(S.value,c)}catch(c){throw l.errorMessage=u(c),l.readonly=!1,c}},setInitialFormValues:c=>{l.fields.config=Object.assign({},l.fields.config,w.removeNullValues(c.config)),l.fields.config.sentinel_nodes=w.addIdToSentinelNodes(c.config.sentinel_nodes??[]),l.fields.config.cluster_nodes=w.addIdToClusterNodes(c.config.cluster_nodes??[]),l.fields.name=c.name,l.fields.type=c.type,l.fields.tags=w.arrayToString(c.tags),h.value=Ve(c),d.value=JSON.parse(JSON.stringify(g.value))}}},Nl={class:"array-card-container"},$l=t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0},disabled:{type:Boolean,default:!1}},emits:["remove-item"],setup(e){return(n,r)=>{const i=t.resolveComponent("KCard"),o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Nl,[t.createVNode(i,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",disabled:e.disabled,onClick:r[0]||(r[0]=a=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Q.TrashIcon))]),_:1},8,["disabled"])])}}}),z=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},In=z($l,[["__scopeId","data-v-a0b2e4fb"]]),Bl={actions:{create:"New Redis Configuration",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",done:"Done",view:"View Details",loading:"Loading...",view_plugin:"View Plugin",close:"Close"},search:{placeholder:"Filter by name",placeholder_for_exact_match:"Filter by exact ID",no_results:"No results found"},selector:{placeholder:"Select a Redis configuration",empty_state:"No Redis configurations available",create_new:"Create new Redis configuration"},delete:{title:"Delete Redis configuration",description:"You’re about to delete this item. Are you sure you want to proceed?",warning:"To delete this configuration, first remove it from all associated plugins."},errors:{copy:"Failed to copy to clipboard",general:"Redis configuration could not be retrieved",delete:"The redis configuration could not be deleted at this time."},copy:{success:"Copied {val} to clipboard"},form:{redis_partial_modal_title:"Create Redis Configuration",partial_created_success_message:"Redis configuration created successfully",sections:{type:{title:"Redis type",description:"Both Enterprise and Open Source plugins support Redis. Enterprise plugins can connect to a standalone Redis instance (host/port), Cluster, or Sentinel, while Open Source plugins support only a simplified host/port configuration."},general:{title:"General information",description:"Name your Redis configuration."},connection:{title:"Connection settings",description:"Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."},cloud_auth:{title:"Cloud authentication settings",description:"Configure authentication settings for connecting to cloud-hosted Redis services."},cluster:{title:"Cluster configuration",description:"Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."},tls:{title:"TLS settings",description:"Configure secure connections to Redis, including SSL and verification options."},keepalive:{title:"Keepalive configuration",description:"Keepalive reuses active connections to Redis, improving performance and efficiency."},read_write_configuration:{title:"Read/Write configuration",description:"Set timeouts for reading from and writing to the Redis server to control data transmission reliability."},sentinel_configuration:{title:"Sentinel configuration",description:"Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."}},fields:{cloud_authentication:{auth_provider:{label:"Authentication provider",tooltip:"Auth provider to be used to authenticate to a Cloud Provider's Redis instance."},aws_cache_name:{label:"AWS cache name",tooltip:"The name of the AWS Elasticache cluster when `auth_provider` is set to `aws`."},aws_region:{label:"AWS region",tooltip:"The region of the AWS ElastiCache cluster when `auth_provider` is set to `aws`."},aws_is_serverless:{label:"Serverless ElastiCache",tooltip:"This flag specifies whether the cluster is serverless when auth_provider is set to `aws`."},aws_access_key_id:{label:"AWS access key ID",tooltip:"AWS Access Key ID to be used for authentication when `auth_provider` is set to `aws`."},aws_secret_access_key:{label:"AWS secret access key",tooltip:"AWS Secret Access Key to be used for authentication when `auth_provider` is set to `aws`."},aws_assume_role_arn:{label:"AWS assume role ARN",tooltip:"The ARN of the IAM role to assume for generating ElastiCache IAM authentication tokens."},aws_role_session_name:{label:"AWS role session name",tooltip:"The session name for the temporary credentials when assuming the IAM role."},gcp_service_account_json:{label:"GCP service account JSON",tooltip:"GCP Service Account JSON to be used for authentication when `auth_provider` is set to `gcp`."},azure_client_id:{label:"Azure client ID",tooltip:"Azure Client ID to be used for authentication when `auth_provider` is set to `azure`."},azure_client_secret:{label:"Azure client secret",tooltip:"Azure Client Secret to be used for authentication when `auth_provider` is set to `azure`."},azure_tenant_id:{label:"Azure tenant ID",tooltip:"Azure Tenant ID to be used for authentication when `auth_provider` is set to `azure`."}},type:{label:"Redis type"},name:{label:"Name",placeholder:"Enter unique name"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Route for grouping and filtering."},host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},database:{label:"Database",tooltip:"Database to use for the Redis connection."},password:{label:"Password",tooltip:"Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."},username:{label:"Username",tooltip:"Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`."},ssl:{label:"SSL",description:"If set to true, uses SSL to connect to Redis.",tooltip:"If set to true, uses SSL to connect to Redis."},ssl_verify:{label:"SSL Verify",description:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong. conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ss1_verify_depth accordingly.",tooltip:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong.conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly."},server_name:{label:"Server name",tooltip:"A string representing an SNI (server name indication) value for TLS."},keepalive_backlog:{label:"Keepalive backlog",tooltip:"Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`."},keepalive_pool_size:{label:"Keepalive pool size",tooltip:"The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low."},read_timeout:{label:"Read timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},send_timeout:{label:"Send timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},connect_timeout:{label:"Connect timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},sentinel_master:{label:"Sentinel master",tooltip:"Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."},sentinel_role:{label:"Sentinel role",tooltip:"Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."},sentinel_username:{label:"Sentinel username",tooltip:"Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."},sentinel_password:{label:"Sentinel password",tooltip:"Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."},cluster_node_ip:{label:"IP",tooltip:"A string representing a host name, such as example.com."},cluster_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},cluster_max_redirections:{label:"Cluster max redirections",tooltip:"Maximum retry attempts for redirection."},timeout:{label:"Timeout",tooltip:"redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"},connection_is_proxied:{label:"Connection is proxied",tooltip:"If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address."},cluster_nodes:{title:"Cluster nodes",tooltip:"Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_nodes:{title:"Sentinel nodes",tooltip:"Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_node_host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},sentinel_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."}},options:{auth_provider:{aws:"AWS",azure:"Azure",gcp:"GCP"},type:{host_port:"Host/Port",cluster:"Cluster",sentinel:"Sentinel",open_source:"Open Source",enterprise:"Enterprise",suffix_open_source:" (Open Source)",suffix_enterprise:" (Enterprise)"},sentinel_role:{master:"master",slave:"slave",any:"any"}},edit_warning_modal:{title:"Edit Redis configuration",description:"This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",plugin_count:"{count} plugin(s)",confirm:"Confirm"}},linked_plugins_modal:{title:"Associated plugins ({count})",headers:{plugin:"Plugin",instance_name:"Name"}},redis:{title:"Redis Configurations",empty_state:{title:"Configure a Redis Configuration",description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."}},list:{action:"New configuration",table_headers:{name:"Name",type:"Type",plugins:"Plugins",tags:"Tags"},empty_state:{description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",feature_1:{title:"Store your Redis configurations",description:"Define a Redis configuration once and use it across multiple plugins."},feature_2:{title:"Sync across plugins",description:"Edits to your configuration will be cascaded automatically to all associated plugins."}}}};function Le(){const e=gt.createI18n("en-us",Bl);return{i18n:e,i18nT:gt.i18nTComponent(e)}}const re={useI18n:Le},Dl={class:"cluster-node-items"},vl=z(t.defineComponent({__name:"ClusterNodes",props:t.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),{i18n:{t:r}}=re.useI18n(),i=()=>{n.value.push(xn())},o=a=>{n.value.splice(a,1)};return(a,u)=>{const p=t.resolveComponent("KLabel"),l=t.resolveComponent("KInput"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(p,{class:"required",info:t.unref(r)("form.fields.cluster_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("form.fields.cluster_nodes.title")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(h,T)=>(t.openBlock(),t.createBlock(In,{key:`${T}`,"data-testid":"redis-cluster-nodes",disabled:e.readonly,onRemoveItem:m=>o(T)},{default:t.withCtx(()=>[t.createElementVNode("div",Dl,[t.createVNode(l,{modelValue:h.ip,"onUpdate:modelValue":m=>h.ip=m,modelModifiers:{trim:!0},label:t.unref(r)("form.fields.cluster_node_ip.label"),"label-attributes":{info:t.unref(r)("form.fields.cluster_node_ip.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"ip",readonly:e.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),t.createVNode(l,{modelValue:h.port,"onUpdate:modelValue":m=>h.port=m,label:t.unref(r)("form.fields.cluster_node_port.label"),"label-attributes":{info:t.unref(r)("form.fields.cluster_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:e.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),t.createVNode(d,{appearance:"tertiary","data-testid":"redis-add-cluster-node-button",disabled:e.readonly,onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(Q.AddCircleIcon)),t.createElementVNode("span",null,t.toDisplayString(t.unref(r)("form.fields.cluster_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-776a626d"]]),On=()=>{const e=t.ref(),n=t.ref();return{vaultSecretPickerSetup:e,setUpVaultSecretPicker:(o,a)=>{e.value=o??"",n.value=a},handleVaultSecretPickerAutofill:o=>{var a;(a=n.value)==null||a.call(n,o),e.value=!1}}},Ml={class:"sentinel-node-items"},jl=z(t.defineComponent({__name:"SentinelNodes",props:t.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),{i18n:{t:r}}=re.useI18n(),i=()=>{n.value.push(Vn())},o=a=>{n.value.splice(a,1)};return(a,u)=>{const p=t.resolveComponent("KLabel"),l=t.resolveComponent("KInput"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(p,{class:"required",info:t.unref(r)("form.fields.sentinel_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("form.fields.sentinel_nodes.title")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(h,T)=>(t.openBlock(),t.createBlock(In,{key:h.id,"data-testid":"redis-sentinel-nodes",disabled:e.readonly,onRemoveItem:m=>o(T)},{default:t.withCtx(()=>[t.createElementVNode("div",Ml,[t.createVNode(l,{modelValue:h.host,"onUpdate:modelValue":m=>h.host=m,modelModifiers:{trim:!0},label:t.unref(r)("form.fields.sentinel_node_host.label"),"label-attributes":{info:t.unref(r)("form.fields.sentinel_node_host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",readonly:e.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),t.createVNode(l,{modelValue:h.port,"onUpdate:modelValue":m=>h.port=m,label:t.unref(r)("form.fields.sentinel_node_port.label"),"label-attributes":{info:t.unref(r)("form.fields.sentinel_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:e.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),t.createVNode(d,{appearance:"tertiary","data-testid":"redis-add-sentinel-node-button",disabled:e.readonly,onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(Q.AddCircleIcon)),t.createElementVNode("span",null,t.toDisplayString(t.unref(r)("form.fields.sentinel_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-cd1c07e2"]]),Ll=z(t.defineComponent({__name:"CloudAuthFields",props:t.mergeModels({config:{},readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=t.useModel(e,"modelValue"),{i18n:{t:r}}=re.useI18n(),{vaultSecretPickerSetup:i,setUpVaultSecretPicker:o,handleVaultSecretPickerAutofill:a}=On(),u=[{key:"aws_cache_name",group:D.AWS,label:r("form.fields.cloud_authentication.aws_cache_name.label"),tooltip:r("form.fields.cloud_authentication.aws_cache_name.tooltip"),required:!0,referenceable:!0},{key:"aws_region",group:D.AWS,label:r("form.fields.cloud_authentication.aws_region.label"),tooltip:r("form.fields.cloud_authentication.aws_region.tooltip"),referenceable:!0},{key:"aws_is_serverless",group:D.AWS,label:r("form.fields.cloud_authentication.aws_is_serverless.label"),tooltip:r("form.fields.cloud_authentication.aws_is_serverless.tooltip"),type:"boolean"},{key:"aws_access_key_id",group:D.AWS,label:r("form.fields.cloud_authentication.aws_access_key_id.label"),tooltip:r("form.fields.cloud_authentication.aws_access_key_id.tooltip"),referenceable:!0,encrypted:!0},{key:"aws_secret_access_key",group:D.AWS,label:r("form.fields.cloud_authentication.aws_secret_access_key.label"),tooltip:r("form.fields.cloud_authentication.aws_secret_access_key.tooltip"),referenceable:!0,encrypted:!0},{key:"aws_assume_role_arn",group:D.AWS,label:r("form.fields.cloud_authentication.aws_assume_role_arn.label"),tooltip:r("form.fields.cloud_authentication.aws_assume_role_arn.tooltip"),referenceable:!0,encrypted:!0},{key:"aws_role_session_name",group:D.AWS,label:r("form.fields.cloud_authentication.aws_role_session_name.label"),tooltip:r("form.fields.cloud_authentication.aws_role_session_name.tooltip"),referenceable:!0,encrypted:!0},{key:"gcp_service_account_json",group:D.GCP,label:r("form.fields.cloud_authentication.gcp_service_account_json.label"),tooltip:r("form.fields.cloud_authentication.gcp_service_account_json.tooltip"),referenceable:!0,encrypted:!0},{key:"azure_client_id",group:D.AZURE,label:r("form.fields.cloud_authentication.azure_client_id.label"),tooltip:r("form.fields.cloud_authentication.azure_client_id.tooltip"),referenceable:!0,encrypted:!0},{key:"azure_client_secret",group:D.AZURE,label:r("form.fields.cloud_authentication.azure_client_secret.label"),tooltip:r("form.fields.cloud_authentication.azure_client_secret.tooltip"),referenceable:!0,encrypted:!0},{key:"azure_tenant_id",group:D.AZURE,label:r("form.fields.cloud_authentication.azure_tenant_id.label"),tooltip:r("form.fields.cloud_authentication.azure_tenant_id.tooltip"),referenceable:!0,encrypted:!0}],p=t.computed(()=>u.filter(l=>{var d;return l.group===((d=n.value)==null?void 0:d.auth_provider)}));return(l,d)=>{const h=t.resolveComponent("KInput"),T=t.resolveComponent("KCheckbox");return t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,m=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m.key},[m.type!=="boolean"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(h,{modelValue:n.value[m.key],"onUpdate:modelValue":y=>n.value[m.key]=y,"data-testid":`redis-${m.key}-input`,label:m.label,"label-attributes":{info:m.tooltip,tooltipAttributes:{maxWidth:"400"}},readonly:e.readonly,required:m.required??!1,"show-password-mask-toggle":m.encrypted,type:m.encrypted?"password":"text"},null,8,["modelValue","onUpdate:modelValue","data-testid","label","label-attributes","readonly","required","show-password-mask-toggle","type"]),m.referenceable?(t.openBlock(),t.createBlock(t.unref(J.VaultSecretPickerProvider),{key:0,class:"secret-picker-provider",disabled:e.readonly,update:y=>n.value[m.key]=y,value:n.value[m.key]??"",onOpen:d[0]||(d[0]=(y,g)=>t.unref(o)(y,g))},null,8,["disabled","update","value"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(T,{key:1,modelValue:n.value[m.key],"onUpdate:modelValue":y=>n.value[m.key]=y,"data-testid":`redis-${m.key}-checkbox`,label:m.label,"label-attributes":{info:m.tooltip,tooltipAttributes:{maxWidth:"400"}},readonly:e.readonly},null,8,["modelValue","onUpdate:modelValue","data-testid","label","label-attributes","readonly"]))],64))),128)),t.createVNode(t.unref(J.VaultSecretPicker),{config:e.config,setup:t.unref(i),onCancel:d[1]||(d[1]=()=>i.value=!1),onProceed:t.unref(a)},null,8,["config","setup","onProceed"])],64)}}}),[["__scopeId","data-v-150a04c2"]]);var at=new WeakMap,Rn=0;function Ul(e){if(!e.length)return"";for(var n="arg",r=0;r<e.length;++r){var i=void 0;e[r]===null||typeof e[r]!="object"&&typeof e[r]!="function"?typeof e[r]=="string"?i='"'+e[r]+'"':i=String(e[r]):at.has(e[r])?i=at.get(e[r]):(i=Rn,at.set(e[r],Rn++)),n+="@"+i}return n}function Fl(e){if(typeof e=="function")try{e=e()}catch{e=""}return Array.isArray(e)?e=Ul(e):e=String(e||""),e}var lt=function(){function e(n){n===void 0&&(n=0),this.items=new Map,this.ttl=n}return e.prototype.serializeKey=function(n){return Fl(n)},e.prototype.get=function(n){var r=this.serializeKey(n);return this.items.get(r)},e.prototype.set=function(n,r,i){var o=this.serializeKey(n),a=i||this.ttl,u=Date.now(),p={data:r,createdAt:u,expiresAt:a?u+a:1/0};this.dispatchExpire(a,p,o),this.items.set(o,p)},e.prototype.dispatchExpire=function(n,r,i){var o=this;n&&setTimeout(function(){var a=Date.now(),u=a>=r.expiresAt;u&&o.delete(i)},n)},e.prototype.delete=function(n){this.items.delete(n)},e}();function zl(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function Kl(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var Hl=function(e){return fetch(e).then(function(n){return n.json()})};const st={isOnline:zl,isDocumentVisible:Kl,fetcher:Hl};var oe=function(){return oe=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},oe.apply(this,arguments)},be=function(e,n,r,i){function o(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function p(h){try{d(i.next(h))}catch(T){u(T)}}function l(h){try{d(i.throw(h))}catch(T){u(T)}}function d(h){h.done?a(h.value):o(h.value).then(p,l)}d((i=i.apply(e,n||[])).next())})},he=function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,u;return u={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function p(d){return function(h){return l([d,h])}}function l(d){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=n.call(e,r)}catch(h){d=[6,h],o=0}finally{i=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},Wl=function(e,n){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),o,a=[],u;try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(p){u={error:p}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(u)throw u.error}}return a},ql=function(e,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,a;i<o;i++)(a||!(i in n))&&(a||(a=Array.prototype.slice.call(n,0,i)),a[i]=n[i]);return e.concat(a||Array.prototype.slice.call(n))},Pn=new lt,Ue=new lt,ct=new lt,An={cache:Pn,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:st.fetcher,isOnline:st.isOnline,isDocumentVisible:st.isDocumentVisible};function Gl(e,n,r){var i=Ue.get(e);if(i)i.data.push(n);else{var o=5e3;Ue.set(e,[n],r>0?r+o:r)}}function Jl(e,n,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&n>r.errorRetryCount)){var i=Math.min(n||0,r.errorRetryCount),o=i*r.errorRetryInterval;setTimeout(function(){e(null,{errorRetryCount:i+1,shouldRetryOnError:!0})},o)}}var Nn=function(e,n,r,i){return r===void 0&&(r=Pn),i===void 0&&(i=An.ttl),be(void 0,void 0,void 0,function(){var o,a,u,p,l,d,h;return he(this,function(T){switch(T.label){case 0:if(!Ql(n))return[3,5];T.label=1;case 1:return T.trys.push([1,3,,4]),[4,n];case 2:return o=T.sent(),[3,4];case 3:return p=T.sent(),a=p,[3,4];case 4:return[3,6];case 5:o=n,T.label=6;case 6:if(u=!1,l={data:o,error:a,isValidating:u},typeof o<"u")try{r.set(e,l,i)}catch(m){console.error("swrv(mutate): failed to set cache",m)}return d=Ue.get(e),d&&d.data.length&&(h=d.data.filter(function(m){return m.key===e}),h.forEach(function(m,y){typeof l.data<"u"&&(m.data=l.data),m.error=l.error,m.isValidating=l.isValidating,m.isLoading=l.isValidating;var g=y===h.length-1;g||delete h[y]}),h=h.filter(Boolean)),[2,l]}})})};function Zl(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o,a=oe({},An),u=!1,p=!1,l=t.getCurrentInstance(),d=(l==null?void 0:l.proxy)||l;if(!d)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var h=(d==null?void 0:d.$isServer)||!1;n.length>=1&&(i=n[0]),n.length>=2&&(o=n[1]),n.length>2&&(a=oe(oe({},a),n[2]));var T=h?a.serverTTL:a.ttl,m=typeof i=="function"?i:t.ref(i);typeof o>"u"&&(o=a.fetcher);var y=null;y||(y=t.reactive({data:void 0,error:void 0,isValidating:!0,isLoading:!0,key:null}));var g=function(E,c){return be(e,void 0,void 0,function(){var x,R,M,U,H,ie,W,ue=this;return he(this,function(q){switch(q.label){case 0:return x=y.data===void 0,R=m.value,R?(M=a.cache.get(R),U=M&&M.data,y.isValidating=!0,y.isLoading=!U,U&&(y.data=U.data,y.error=U.error),H=E||o,!H||!a.isDocumentVisible()&&!x||(c==null?void 0:c.forceRevalidate)!==void 0&&!(c!=null&&c.forceRevalidate)?(y.isValidating=!1,y.isLoading=!1,[2]):M&&(ie=!!(Date.now()-M.createdAt>=a.dedupingInterval||c!=null&&c.forceRevalidate),!ie)?(y.isValidating=!1,y.isLoading=!1,[2]):(W=function(){return be(ue,void 0,void 0,function(){var G,fe,pe,we;return he(this,function(ae){switch(ae.label){case 0:return G=ct.get(R),G?[3,2]:(fe=Array.isArray(R)?R:[R],pe=H.apply(void 0,ql([],Wl(fe),!1)),ct.set(R,pe,a.dedupingInterval),[4,Nn(R,pe,a.cache,T)]);case 1:return ae.sent(),[3,4];case 2:return[4,Nn(R,G.data,a.cache,T)];case 3:ae.sent(),ae.label=4;case 4:return y.isValidating=!1,y.isLoading=!1,ct.delete(R),y.error!==void 0&&(we=!u&&a.shouldRetryOnError&&(c?c.shouldRetryOnError:!0),we&&Jl(g,c?c.errorRetryCount:1,a)),[2]}})})},U&&a.revalidateDebounce?(setTimeout(function(){return be(ue,void 0,void 0,function(){return he(this,function(G){switch(G.label){case 0:return u?[3,2]:[4,W()];case 1:G.sent(),G.label=2;case 2:return[2]}})})},a.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,W()];case 2:q.sent(),q.label=3;case 3:return[2]}})})},S=function(){return be(e,void 0,void 0,function(){return he(this,function(E){return[2,g(null,{shouldRetryOnError:!1})]})})},s=null;t.onMounted(function(){var E=function(){return be(e,void 0,void 0,function(){return he(this,function(c){switch(c.label){case 0:return!y.error&&a.isOnline()?[4,g()]:[3,2];case 1:return c.sent(),[3,3];case 2:s&&clearTimeout(s),c.label=3;case 3:return a.refreshInterval&&!u&&(s=setTimeout(E,a.refreshInterval)),[2]}})})};a.refreshInterval&&(s=setTimeout(E,a.refreshInterval)),a.revalidateOnFocus&&(document.addEventListener("visibilitychange",S,!1),window.addEventListener("focus",S,!1))}),t.onUnmounted(function(){u=!0,s&&clearTimeout(s),a.revalidateOnFocus&&(document.removeEventListener("visibilitychange",S,!1),window.removeEventListener("focus",S,!1));var E=Ue.get(m.value);E&&(E.data=E.data.filter(function(c){return c!==y}))});try{t.watch(m,function(E){t.isReadonly(m)||(m.value=E),y.key=E,y.isValidating=!!E,Gl(m.value,y,T),!h&&!p&&m.value&&g(),p=!1},{immediate:!0})}catch{}var O=oe(oe({},t.toRefs(y)),{mutate:function(E,c){return g(E,oe(oe({},c),{forceRevalidate:!0}))}});return O}function Ql(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}function $n(e){return`redis-partial-links-${e}`}const xe=e=>{const{axiosInstance:n}=_.useAxios(e.axiosRequestConfig);return{fetcher:async r=>{const{partialId:i,size:o,offset:a,query:u}=r;let p=`${e.apiBaseUrl}${ye.links[e.app]}`;e.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:"")),p=p.replace(/{id}/gi,i||""),u&&(p=`${p}?${u}`);const{data:l}=await n.get(p,{params:{size:o,offset:a}});return l}}},Bn=e=>{const{partialId:n,config:r}=e,{fetcher:i}=xe(r),o=t.ref([]),{data:a}=Zl($n(n),()=>i({partialId:n}),{revalidateOnFocus:!1});return t.watch(a,()=>{var u;o.value=((u=a.value)==null?void 0:u.data)??[]}),o},Yl={class:"kong-ui-entities-redis-configurations-form"},Dn=z(t.defineComponent({__name:"RedisConfigurationForm",props:{config:{type:Object,required:!0,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")},partialId:{type:String,required:!1,default:""},actionTeleportTarget:{type:String,default:null},slidoutTopOffset:{type:Number,default:60},disabledPartialType:{type:String,default:""}},emits:["update","error","loading","cancel"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o},i18nT:a}=re.useI18n(),{vaultSecretPickerSetup:u,setUpVaultSecretPicker:p,handleVaultSecretPickerAutofill:l}=On(),d=mt.useRouter(),h=t.ref("json"),T=t.computed(()=>[{label:o("form.options.type.host_port"),group:o("form.options.type.enterprise"),value:C.HOST_PORT_EE,selected:x.value===C.HOST_PORT_EE,disabled:!c&&r.disabledPartialType===L.REDIS_EE},{label:o("form.options.type.cluster"),group:o("form.options.type.enterprise"),value:C.CLUSTER,selected:x.value===C.CLUSTER,disabled:!c&&r.disabledPartialType===L.REDIS_EE},{label:o("form.options.type.sentinel"),group:o("form.options.type.enterprise"),value:C.SENTINEL,selected:x.value===C.SENTINEL,disabled:!c&&r.disabledPartialType===L.REDIS_EE},{label:o("form.options.type.host_port"),group:o("form.options.type.open_source"),value:C.HOST_PORT_CE,selected:x.value===C.HOST_PORT_CE,disabled:c&&R.value||!c&&r.disabledPartialType===L.REDIS_CE}]),m=t.computed(()=>[{label:o("form.options.auth_provider.aws"),value:D.AWS},{label:o("form.options.auth_provider.gcp"),value:D.GCP},{label:o("form.options.auth_provider.azure"),value:D.AZURE}]),y=[{label:o("form.options.sentinel_role.master"),value:"master"},{label:o("form.options.sentinel_role.slave"),value:"slave"},{label:o("form.options.sentinel_role.any"),value:"any"}],g=v=>{const b=v.value===C.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");return`${v.label}${b}`},S=()=>r.disabledPartialType&&ve(_e)===r.disabledPartialType?r.disabledPartialType===L.REDIS_CE?C.HOST_PORT_EE:C.HOST_PORT_CE:_e,{form:s,canSubmit:O,payload:E,isEdit:c,redisType:x,redisTypeIsEnterprise:R,fetchUrl:M,submit:U,setInitialFormValues:H}=Al({partialId:r.partialId,defaultRedisType:S(),config:r.config,cloudAuthAvailable:r.config.cloudAuthAvailable}),{fetcher:ie}=xe(r.config),W=t.ref(!1),ue=t.ref(!1),q=t.ref(0),G=t.computed(()=>h.value==="terraform"?{[E.value.type.replaceAll("-","_")]:kl(E.value,["type"])}:E.value),fe=async()=>{try{if(c&&!ue.value){const{count:b}=await ie({partialId:r.partialId});if(q.value=b,b>0){W.value=!0;return}}const{data:v}=await U();i("update",v)}catch(v){i("error",v)}},pe=()=>{W.value=!1,ue.value=!0,fe()},we=()=>{r.config.cancelRoute&&d.push(r.config.cancelRoute),i("cancel")},ae=v=>{i("loading",v)},ut=v=>{i("error",v)},Fe=v=>{H(v)};return t.onBeforeMount(async()=>{if(c){const{count:v}=await ie({partialId:r.partialId});q.value=v}}),(v,b)=>{const ft=t.resolveComponent("KAlert"),me=t.resolveComponent("KSelect"),B=t.resolveComponent("KInput"),k=t.resolveComponent("KCheckbox"),I=t.resolveComponent("KModal");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Yl,[t.createVNode(t.unref(_.EntityBaseForm),{"action-teleport-target":e.actionTeleportTarget,"can-submit":t.unref(O),config:e.config,"edit-id":e.partialId,"entity-type":t.unref(_.SupportedEntityType).Partial,"error-message":t.unref(s).errorMessage,"fetch-url":t.unref(M),"form-fields":G.value,"is-readonly":t.unref(s).readonly,"slidout-top-offset":e.slidoutTopOffset,onCancel:we,onCodeBlockTabChange:b[34]||(b[34]=f=>h.value=f),"onFetch:error":ut,"onFetch:success":Fe,onLoading:ae,onSubmit:fe},{default:t.withCtx(()=>[q.value>0&&t.unref(c)?(t.openBlock(),t.createBlock(ft,{key:0,appearance:"warning",class:"warning-alert","data-testid":"redis-update-warning-alert"},{default:t.withCtx(()=>[t.createVNode(t.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:t.withCtx(()=>[t.createElementVNode("b",null,t.toDisplayString(t.unref(o)("form.edit_warning_modal.plugin_count",{count:q.value})),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(_.EntityFormSection),{"data-testid":"redis-type-section",description:t.unref(o)("form.sections.type.description"),title:t.unref(o)("form.sections.type.title")},{default:t.withCtx(()=>[t.createVNode(me,{modelValue:t.unref(x),"onUpdate:modelValue":b[0]||(b[0]=f=>t.isRef(x)?x.value=f:null),"data-testid":"redis-type-select",disabled:t.unref(c)&&t.unref(x)===t.unref(C).HOST_PORT_CE,items:T.value,"kpop-attributes":{"data-testid":"redis-type-select-popover"},label:t.unref(o)("form.fields.type.label"),readonly:t.unref(s).readonly,required:""},{"selected-item-template":t.withCtx(({item:f})=>[t.createTextVNode(t.toDisplayString(g(f)),1)]),_:1},8,["modelValue","disabled","items","label","readonly"])]),_:1},8,["description","title"]),t.createVNode(t.unref(_.EntityFormSection),{"data-testid":"redis-general-section",description:t.unref(o)("form.sections.general.description"),title:t.unref(o)("form.sections.general.title")},{default:t.withCtx(()=>[t.createVNode(B,{modelValue:t.unref(s).fields.name,"onUpdate:modelValue":b[1]||(b[1]=f=>t.unref(s).fields.name=f),modelModifiers:{trim:!0},"data-testid":"redis-name-input",disabled:t.unref(c),label:t.unref(o)("form.fields.name.label"),placeholder:t.unref(o)("form.fields.name.placeholder"),readonly:t.unref(s).readonly,required:""},null,8,["modelValue","disabled","label","placeholder","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.tags,"onUpdate:modelValue":b[2]||(b[2]=f=>t.unref(s).fields.tags=f),modelModifiers:{trim:!0},"data-testid":"redis-tags-input",help:t.unref(o)("form.fields.tags.help"),label:t.unref(o)("form.fields.tags.label"),"label-attributes":{info:t.unref(o)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:t.unref(o)("form.fields.tags.placeholder"),readonly:t.unref(s).readonly},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.config.cloudAuthAvailable&&t.unref(x)!==t.unref(C).SENTINEL?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:1,"data-testid":"redis-cloud-auth-section",description:t.unref(o)("form.sections.cloud_auth.description"),title:t.unref(o)("form.sections.cloud_auth.title")},{default:t.withCtx(()=>[t.createVNode(me,{modelValue:t.unref(s).fields.config.cloud_authentication.auth_provider,"onUpdate:modelValue":b[3]||(b[3]=f=>t.unref(s).fields.config.cloud_authentication.auth_provider=f),clearable:"","data-testid":"redis-auth-provider-select",items:m.value,"kpop-attributes":{"data-testid":"redis-auth-provider-select-popover"},label:t.unref(o)("form.fields.cloud_authentication.auth_provider.label"),"label-attributes":{info:t.unref(o)("form.fields.cloud_authentication.auth_provider.tooltip")},readonly:t.unref(s).readonly},null,8,["modelValue","items","label","label-attributes","readonly"]),t.createVNode(Ll,{modelValue:t.unref(s).fields.config.cloud_authentication,"onUpdate:modelValue":b[4]||(b[4]=f=>t.unref(s).fields.config.cloud_authentication=f),config:r.config,readonly:t.unref(s).readonly},null,8,["modelValue","config","readonly"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).SENTINEL?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:2,"data-testid":"redis-sentinel-configuration-section",description:t.unref(o)("form.sections.sentinel_configuration.description"),title:t.unref(o)("form.sections.sentinel_configuration.title")},{default:t.withCtx(()=>[t.createVNode(B,{modelValue:t.unref(s).fields.config.sentinel_master,"onUpdate:modelValue":b[5]||(b[5]=f=>t.unref(s).fields.config.sentinel_master=f),"data-testid":"redis-sentinel-master-input",label:t.unref(o)("form.fields.sentinel_master.label"),"label-attributes":{info:t.unref(o)("form.fields.sentinel_master.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(me,{modelValue:t.unref(s).fields.config.sentinel_role,"onUpdate:modelValue":b[6]||(b[6]=f=>t.unref(s).fields.config.sentinel_role=f),"data-testid":"redis-sentinel-role-select",items:y,"kpop-attributes":{"data-testid":"redis-sentinel-role-select-popover"},label:t.unref(o)("form.fields.sentinel_role.label"),"label-attributes":{info:t.unref(o)("form.fields.sentinel_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(jl,{modelValue:t.unref(s).fields.config.sentinel_nodes,"onUpdate:modelValue":b[7]||(b[7]=f=>t.unref(s).fields.config.sentinel_nodes=f),readonly:t.unref(s).readonly},null,8,["modelValue","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.sentinel_username,"onUpdate:modelValue":b[8]||(b[8]=f=>t.unref(s).fields.config.sentinel_username=f),modelModifiers:{trim:!0},label:t.unref(o)("form.fields.sentinel_username.label"),"label-attributes":{info:t.unref(o)("form.fields.sentinel_username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(t.unref(J.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.sentinel_username=f,value:t.unref(s).fields.config.sentinel_username,onOpen:b[9]||(b[9]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.sentinel_password,"onUpdate:modelValue":b[10]||(b[10]=f=>t.unref(s).fields.config.sentinel_password=f),modelModifiers:{trim:!0},label:t.unref(o)("form.fields.sentinel_password.label"),"label-attributes":{info:t.unref(o)("form.fields.sentinel_password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(t.unref(J.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.sentinel_password=f,value:t.unref(s).fields.config.sentinel_password,onOpen:b[11]||(b[11]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).CLUSTER?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:3,"data-testid":"redis-cluster-configuration-section",description:t.unref(o)("form.sections.cluster.description"),title:t.unref(o)("form.sections.cluster.title")},{default:t.withCtx(()=>[t.createVNode(vl,{modelValue:t.unref(s).fields.config.cluster_nodes,"onUpdate:modelValue":b[12]||(b[12]=f=>t.unref(s).fields.config.cluster_nodes=f),readonly:t.unref(s).readonly},null,8,["modelValue","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.cluster_max_redirections,"onUpdate:modelValue":b[13]||(b[13]=f=>t.unref(s).fields.config.cluster_max_redirections=f),"data-testid":"redis-cluster-max-redirections-input",label:t.unref(o)("form.fields.cluster_max_redirections.label"),"label-attributes":{info:t.unref(o)("form.fields.cluster_max_redirections.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0),t.createVNode(t.unref(_.EntityFormSection),{"data-testid":"redis-connection-configuration-section",description:t.unref(o)("form.sections.connection.description"),title:t.unref(o)("form.sections.connection.title")},{default:t.withCtx(()=>[t.unref(x)===t.unref(C).HOST_PORT_CE||t.unref(x)===t.unref(C).HOST_PORT_EE?(t.openBlock(),t.createBlock(B,{key:0,modelValue:t.unref(s).fields.config.host,"onUpdate:modelValue":b[14]||(b[14]=f=>t.unref(s).fields.config.host=f),modelModifiers:{trim:!0},"data-testid":"redis-host-input",label:t.unref(o)("form.fields.host.label"),"label-attributes":{info:t.unref(o)("form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_EE&&e.config.isHostReferenceable?(t.openBlock(),t.createBlock(t.unref(J.VaultSecretPickerProvider),{key:1,class:"secret-picker-provider","data-testid":"secret-picker-provider-for-host",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.host=f,value:t.unref(s).fields.config.host??"",onOpen:b[15]||(b[15]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_CE||t.unref(x)===t.unref(C).HOST_PORT_EE?(t.openBlock(),t.createBlock(B,{key:2,modelValue:t.unref(s).fields.config.port,"onUpdate:modelValue":b[16]||(b[16]=f=>t.unref(s).fields.config.port=f),modelModifiers:{trim:!0},"data-testid":"redis-port-input",label:t.unref(o)("form.fields.port.label"),"label-attributes":{info:t.unref(o)("form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_EE&&e.config.isPortReferenceable?(t.openBlock(),t.createBlock(t.unref(J.VaultSecretPickerProvider),{key:3,class:"secret-picker-provider","data-testid":"secret-picker-provider-for-port",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.port=f,value:String(t.unref(s).fields.config.port??""),onOpen:b[17]||(b[17]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_EE?(t.openBlock(),t.createBlock(k,{key:4,modelValue:t.unref(s).fields.config.connection_is_proxied,"onUpdate:modelValue":b[18]||(b[18]=f=>t.unref(s).fields.config.connection_is_proxied=f),"data-testid":"redis-connection-is-proxied-checkbox",disabled:t.unref(s).readonly,label:t.unref(o)("form.fields.connection_is_proxied.label"),"label-attributes":{info:t.unref(o)("form.fields.connection_is_proxied.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","disabled","label","label-attributes"])):t.createCommentVNode("",!0),t.unref(x)===t.unref(C).HOST_PORT_CE?(t.openBlock(),t.createBlock(B,{key:5,modelValue:t.unref(s).fields.config.timeout,"onUpdate:modelValue":b[19]||(b[19]=f=>t.unref(s).fields.config.timeout=f),modelModifiers:{trim:!0},"data-testid":"redis-timeout-input",label:t.unref(o)("form.fields.timeout.label"),"label-attributes":{info:t.unref(o)("form.fields.timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):t.createCommentVNode("",!0),t.createVNode(B,{modelValue:t.unref(s).fields.config.database,"onUpdate:modelValue":b[20]||(b[20]=f=>t.unref(s).fields.config.database=f),modelModifiers:{trim:!0},"data-testid":"redis-database-input",label:t.unref(o)("form.fields.database.label"),"label-attributes":{info:t.unref(o)("form.fields.database.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.username,"onUpdate:modelValue":b[21]||(b[21]=f=>t.unref(s).fields.config.username=f),modelModifiers:{trim:!0},"data-testid":"redis-username-input",label:t.unref(o)("form.fields.username.label"),"label-attributes":{info:t.unref(o)("form.fields.username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(t.unref(J.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.username=f,value:t.unref(s).fields.config.username,onOpen:b[22]||(b[22]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.password,"onUpdate:modelValue":b[23]||(b[23]=f=>t.unref(s).fields.config.password=f),modelModifiers:{trim:!0},"data-testid":"redis-password-input",label:t.unref(o)("form.fields.password.label"),"label-attributes":{info:t.unref(o)("form.fields.password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(t.unref(J.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.password=f,value:t.unref(s).fields.config.password,onOpen:b[24]||(b[24]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])]),_:1},8,["description","title"]),t.createVNode(t.unref(_.EntityFormSection),{"data-testid":"redis-tls-configuration-section",description:t.unref(o)("form.sections.tls.description"),title:t.unref(o)("form.sections.tls.title")},{default:t.withCtx(()=>[t.createVNode(k,{modelValue:t.unref(s).fields.config.ssl,"onUpdate:modelValue":b[25]||(b[25]=f=>t.unref(s).fields.config.ssl=f),"data-testid":"redis-ssl-checkbox",description:t.unref(o)("form.fields.ssl.description"),disabled:t.unref(s).readonly,label:t.unref(o)("form.fields.ssl.label"),"label-attributes":{info:t.unref(o)("form.fields.ssl.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),t.createVNode(k,{modelValue:t.unref(s).fields.config.ssl_verify,"onUpdate:modelValue":b[26]||(b[26]=f=>t.unref(s).fields.config.ssl_verify=f),"data-testid":"redis-ssl-verify-checkbox",description:t.unref(o)("form.fields.ssl_verify.description"),disabled:t.unref(s).readonly,label:t.unref(o)("form.fields.ssl_verify.label"),"label-attributes":{info:t.unref(o)("form.fields.ssl_verify.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.server_name,"onUpdate:modelValue":b[27]||(b[27]=f=>t.unref(s).fields.config.server_name=f),modelModifiers:{trim:!0},"data-testid":"redis-server_name-input",label:t.unref(o)("form.fields.server_name.label"),"label-attributes":{info:t.unref(o)("form.fields.server_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),t.unref(x)===t.unref(C).HOST_PORT_EE&&e.config.isServerNameReferenceable?(t.openBlock(),t.createBlock(t.unref(J.VaultSecretPickerProvider),{key:0,class:"secret-picker-provider","data-testid":"secret-picker-provider-for-server_name",disabled:t.unref(s).readonly,update:f=>t.unref(s).fields.config.server_name=f,value:t.unref(s).fields.config.server_name??"",onOpen:b[28]||(b[28]=(f,N)=>t.unref(p)(f,N))},null,8,["disabled","update","value"])):t.createCommentVNode("",!0)]),_:1},8,["description","title"]),t.unref(x)!==t.unref(C).HOST_PORT_CE?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:4,"data-testid":"redis-keepalive-section",description:t.unref(o)("form.sections.keepalive.description"),title:t.unref(o)("form.sections.keepalive.title")},{default:t.withCtx(()=>[t.createVNode(B,{modelValue:t.unref(s).fields.config.keepalive_backlog,"onUpdate:modelValue":b[29]||(b[29]=f=>t.unref(s).fields.config.keepalive_backlog=f),"data-testid":"redis-keepalive-backlog-input",label:t.unref(o)("form.fields.keepalive_backlog.label"),"label-attributes":{info:t.unref(o)("form.fields.keepalive_backlog.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.keepalive_pool_size,"onUpdate:modelValue":b[30]||(b[30]=f=>t.unref(s).fields.config.keepalive_pool_size=f),"data-testid":"redis-keepalive-pool-size-input",label:t.unref(o)("form.fields.keepalive_pool_size.label"),"label-attributes":{info:t.unref(o)("form.fields.keepalive_pool_size.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0),t.unref(x)!==t.unref(C).HOST_PORT_CE?(t.openBlock(),t.createBlock(t.unref(_.EntityFormSection),{key:5,"data-testid":"redis-read-write-configuration-section",description:t.unref(o)("form.sections.read_write_configuration.description"),title:t.unref(o)("form.sections.read_write_configuration.title")},{default:t.withCtx(()=>[t.createVNode(B,{modelValue:t.unref(s).fields.config.read_timeout,"onUpdate:modelValue":b[31]||(b[31]=f=>t.unref(s).fields.config.read_timeout=f),"data-testid":"redis-read-timeout-input",label:t.unref(o)("form.fields.read_timeout.label"),"label-attributes":{info:t.unref(o)("form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.send_timeout,"onUpdate:modelValue":b[32]||(b[32]=f=>t.unref(s).fields.config.send_timeout=f),"data-testid":"redis-send-timeout-input",label:t.unref(o)("form.fields.send_timeout.label"),"label-attributes":{info:t.unref(o)("form.fields.send_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),t.createVNode(B,{modelValue:t.unref(s).fields.config.connect_timeout,"onUpdate:modelValue":b[33]||(b[33]=f=>t.unref(s).fields.config.connect_timeout=f),"data-testid":"redis-connect-timeout-input",label:t.unref(o)("form.fields.connect_timeout.label"),"label-attributes":{info:t.unref(o)("form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):t.createCommentVNode("",!0)]),_:1},8,["action-teleport-target","can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","slidout-top-offset"])]),t.createVNode(t.unref(J.VaultSecretPicker),{config:r.config,setup:t.unref(u),onCancel:b[35]||(b[35]=()=>u.value=!1),onProceed:t.unref(l)},null,8,["config","setup","onProceed"]),t.createVNode(I,{"action-button-text":t.unref(o)("form.edit_warning_modal.confirm"),"data-testid":"redis-update-warning-modal","hide-cancel-button":"","max-width":"640",title:t.unref(o)("form.edit_warning_modal.title"),visible:W.value,onCancel:b[36]||(b[36]=f=>W.value=!1),onProceed:pe},{default:t.withCtx(()=>[t.createVNode(t.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:t.withCtx(()=>[t.createElementVNode("b",null,t.toDisplayString(t.unref(o)("form.edit_warning_modal.plugin_count",{count:q.value})),1)]),_:1})]),_:1},8,["action-button-text","title","visible"])],64)}}}),[["__scopeId","data-v-d1ab730f"]]),Xl={class:"linked-plugins","data-testid":"linked-plugins-inline"},dt=7,es=z(t.defineComponent({__name:"LinkedPluginsInline",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},partialId:{type:String,required:!0}},setup(e){const n=e,r=Bn({config:n.config,partialId:n.partialId});return(i,o)=>{const a=t.resolveComponent("KBadge");return t.openBlock(),t.createElementBlock("div",Xl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(r).slice(0,dt),u=>(t.openBlock(),t.createBlock(t.unref(_t.PluginIcon),{key:u.id,name:u.name,size:24},null,8,["name"]))),128)),t.unref(r).length-dt>0?(t.openBlock(),t.createBlock(a,{key:0,appearance:"info"},{default:t.withCtx(()=>[t.createTextVNode(" +"+t.toDisplayString(t.unref(r).length-dt),1)]),_:1})):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-c39556bc"]]),ts={class:"plugin-item"},ns=z(t.defineComponent({__name:"PluginItem",props:{pluginName:{}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",ts,[t.createVNode(t.unref(_t.PluginIcon),{name:e.pluginName,size:24},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(e.pluginName),1)]))}}),[["__scopeId","data-v-de964dc4"]]),rs={class:"toolbar-container"},vn=z(t.defineComponent({__name:"LinkedPluginList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},isExactMatch:{type:Boolean,default:!1},filterBarEnabled:{type:Boolean,default:!1},partialId:{type:String,required:!0}},emits:["view-plugin","load"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=re.useI18n(),a=[{key:"name",label:o("linked_plugins_modal.headers.plugin")},{key:"instance_name",label:o("linked_plugins_modal.headers.instance_name")},{key:"actions",hideLabel:!0}],{fetcher:u}=xe(r.config),p=t.ref(0),l=async m=>{const{data:y,count:g}=await u({partialId:r.partialId,size:m.pageSize,offset:m.offset,query:m.query});p.value=g;const S={total:g,data:y};return i("load",S),S},d=t.ref(""),h=t.computed(()=>r.config.app==="konnect"||r.isExactMatch?{isExactMatch:!0}:{isExactMatch:!1,fields:{name:{searchable:!0}},schema:{name:{type:"text"}}}),T=m=>{i("view-plugin",{id:m.id,plugin:m.name})};return(m,y)=>{const g=t.resolveComponent("KDropdownItem"),S=t.resolveComponent("KTableData");return t.openBlock(),t.createBlock(S,{"cache-identifier":t.unref($n)(e.partialId),fetcher:l,headers:a,"hide-pagination-when-optional":"","pagination-attributes":{totalCount:p.value,disablePageJump:!0},"search-input":d.value},t.createSlots({name:t.withCtx(({rowValue:s})=>[t.createVNode(ns,{"plugin-name":s},null,8,["plugin-name"])]),"action-items":t.withCtx(({row:s})=>[t.createVNode(g,{onClick:O=>T(s)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("actions.view_plugin")),1)]),_:1},8,["onClick"])]),_:2},[e.filterBarEnabled?{name:"toolbar",fn:t.withCtx(()=>[t.createElementVNode("div",rs,[t.createVNode(t.unref(_.EntityFilter),{modelValue:d.value,"onUpdate:modelValue":y[0]||(y[0]=s=>d.value=s),config:h.value},null,8,["modelValue","config"])])]),key:"0"}:void 0]),1032,["cache-identifier","pagination-attributes","search-input"])}}}),[["__scopeId","data-v-50856d03"]]),os={class:"linked-plugins-modal","data-testid":"linked-plugins-modal"},is=z(t.defineComponent({__name:"LinkedPluginListModal",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},redisConfigurationId:{type:String,required:!0},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","proceed","view-plugin"],setup(e,{emit:n}){const r=n,{i18n:{t:i}}=re.useI18n(),o=t.ref(0),a=t.computed(()=>i("linked_plugins_modal.title",{count:o.value})),u=()=>{r("cancel")},p=()=>{r("proceed")};return(l,d)=>{const h=t.resolveComponent("KModal");return t.openBlock(),t.createElementBlock("div",os,[t.createVNode(h,{"action-button-text":t.unref(i)("actions.done"),"hide-cancel-button":"",title:a.value,visible:e.visible,onCancel:u,onProceed:p},{default:t.withCtx(()=>[t.createVNode(vn,{config:e.config,"partial-id":e.redisConfigurationId,onLoad:d[0]||(d[0]=({total:T})=>o.value=T),onViewPlugin:d[1]||(d[1]=T=>r("view-plugin",T))},null,8,["config","partial-id"])]),_:1},8,["action-button-text","title","visible"])])}}}),[["__scopeId","data-v-6148b8bd"]]),Mn=t.defineComponent({__name:"DeleteWarningModal",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(e,{emit:n}){const{i18n:{t:r}}=re.useI18n(),i=n,o=()=>{i("close")};return(a,u)=>{const p=t.resolveComponent("KModal");return t.openBlock(),t.createBlock(p,{"action-button-text":t.unref(r)("actions.close"),"data-testid":"remove-links-modal","hide-cancel-button":"","max-width":"640",title:t.unref(r)("delete.title"),visible:e.visible,onCancel:o,onProceed:o},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("delete.warning")),1)]),_:1},8,["action-button-text","title","visible"])}}}),as={class:"kong-ui-entities-partials-list"},ls=1e3,ss=z(t.defineComponent({__name:"RedisConfigurationList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["click:learn-more","click:plugin","copy:error","copy:success","delete:success","error"],setup(e,{emit:n}){var B;const r=n,i=e,o=t.computed(()=>{var I,f;let k=`${i.config.apiBaseUrl}${ye.list[i.config.app]}`;return i.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((I=i.config)==null?void 0:I.controlPlaneId)||""):i.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(f=i.config)!=null&&f.workspace?`/${i.config.workspace}`:"")),k}),a=t.ref(!1),u=t.ref(""),p=t.ref(null),l=t.ref(void 0),d=t.ref(!1),h=t.ref(!1),T=t.ref(""),m=t.ref(!1),y=_.useDeleteUrlBuilder(i.config,o.value),g=t.ref(1),S=t.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),{fetcher:s,fetcherState:O}=_.useFetcher(i.config,o);async function E(k){const I=await s({...k,pageSize:ls});return I.data=I.data.filter(f=>f.type===L.REDIS_CE||f.type===L.REDIS_EE),I}const{i18n:{t:c}}=re.useI18n(),{axiosInstance:x}=_.useAxios((B=i.config)==null?void 0:B.axiosRequestConfig),R=mt.useRouter(),M=t.ref(""),U=t.computed(()=>{const k=i.config.app==="konnect"||i.config.isExactMatch;if(k)return{isExactMatch:!0,placeholder:c("search.placeholder_for_exact_match")};const{name:I}=W;return{isExactMatch:k,fields:{name:I},schema:i.config.filterSchema}}),{fetcher:H}=xe(i.config),ie=t.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${c("redis.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:c("redis.title")}),W={name:{label:c("list.table_headers.name"),searchable:!0,hidable:!1,sortable:!0},type:{label:c("list.table_headers.type")},tags:{label:c("list.table_headers.tags")},plugins:{label:c("list.table_headers.plugins")}},ue=k=>({label:c("actions.view"),to:i.config.getViewRoute(k)}),q=k=>({label:c("actions.edit"),to:i.config.getEditRoute(k)}),G=async k=>{const{count:I}=await H({partialId:k.id});I>0?m.value=!0:(l.value=k,d.value=!0)},fe=()=>{M.value=""},pe=async k=>{var f;await((f=i.canRetrieve)==null?void 0:f.call(i,k))&&R.push(i.config.getViewRoute(k.id))},we=()=>{d.value=!1},ae=k=>{u.value=k,a.value=!0},ut=async()=>{var k,I,f;if((k=l.value)!=null&&k.id){h.value=!0;try{await x.delete(y(l.value.id)),h.value=!1,d.value=!1,Fe(),r("delete:success",l.value)}catch(N){T.value=((f=(I=N.response)==null?void 0:I.data)==null?void 0:f.message)||N.message||c("errors.delete"),r("error",N)}finally{h.value=!1}}},Fe=()=>{g.value++},v=k=>{switch(Ve(k)){case C.HOST_PORT_CE:return`${c("form.options.type.host_port")}${c("form.options.type.suffix_open_source")}`;case C.HOST_PORT_EE:return`${c("form.options.type.host_port")}${c("form.options.type.suffix_enterprise")}`;case C.SENTINEL:return`${c("form.options.type.sentinel")}${c("form.options.type.suffix_enterprise")}`;case C.CLUSTER:return`${c("form.options.type.cluster")}${c("form.options.type.suffix_enterprise")}`}},b=()=>{R.push(i.config.createRoute)},ft=async(k,I)=>{const f=k.id;if(!await I(f)){r("copy:error",{entity:k,field:"id",message:c("errors.copy")});return}r("copy:success",{entity:k,field:"id",message:c("copy.success",{val:f})})};t.watch(O,k=>{var I,f,N;if(k.status===_.FetcherStatus.Error){p.value={title:c("errors.general")},(N=(f=(I=k.error)==null?void 0:I.response)==null?void 0:f.data)!=null&&N.message&&(p.value.message=k.error.response.data.message),r("error",k.error);return}p.value=null});const me=t.ref(!1);return t.watch(i.canCreate,async k=>{me.value=await k,me.value?ie.value.ctaText=c("actions.create"):ie.value.ctaText=void 0},{immediate:!0}),(k,I)=>{const f=t.resolveComponent("KButton"),N=t.resolveComponent("KDropdownItem"),hs=t.resolveComponent("KClipboardProvider"),ws=t.resolveComponent("KEmptyState");return t.openBlock(),t.createElementBlock("div",as,[t.createVNode(t.unref(_.EntityBaseTable),{"cache-identifier":e.cacheIdentifier,"disable-sorting":S.value,"empty-state-options":ie.value,"enable-entity-actions":"","error-message":p.value,fetcher:E,"fetcher-cache-key":g.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-redis-configuration-list",query:M.value,"table-headers":W,onClearSearchInput:fe,"onClick:row":I[1]||(I[1]=$=>pe($)),onSort:Fe},{"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(_.EntityFilter),{modelValue:M.value,"onUpdate:modelValue":I[0]||(I[0]=$=>M.value=$),config:U.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[t.createVNode(t.unref(_.PermissionsWrapper),{"auth-function":e.canCreate},{default:t.withCtx(()=>[t.createVNode(f,{appearance:"primary","data-testid":"toolbar-add-redis-configuration",size:"large",to:e.config.createRoute},{default:t.withCtx(()=>[t.createVNode(t.unref(Q.AddIcon)),t.createTextVNode(" "+t.toDisplayString(t.unref(c)("actions.create")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:t.withCtx(({rowValue:$})=>[t.createElementVNode("b",null,t.toDisplayString($??"-"),1)]),type:t.withCtx(({row:$})=>[t.createTextVNode(t.toDisplayString(v($)),1)]),tags:t.withCtx(({rowValue:$})=>[t.createVNode(t.unref(_.TableTags),{tags:$},null,8,["tags"])]),plugins:t.withCtx(({row:$})=>[t.createVNode(es,{config:e.config,"partial-id":$.id,onClick:t.withModifiers(pt=>ae($.id),["stop"])},null,8,["config","partial-id","onClick"])]),actions:t.withCtx(({row:$})=>[t.createVNode(hs,null,{default:t.withCtx(({copyToClipboard:pt})=>[t.createVNode(N,{"data-testid":"action-entity-copy-id",onClick:Ks=>ft($,pt)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(c)("actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),t.createVNode(t.unref(_.PermissionsWrapper),{"auth-function":()=>e.canRetrieve($)},{default:t.withCtx(()=>[t.createVNode(N,{"data-testid":"action-entity-view","has-divider":"",item:ue($.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(_.PermissionsWrapper),{"auth-function":()=>e.canEdit($)},{default:t.withCtx(()=>[t.createVNode(N,{"data-testid":"action-entity-edit",item:q($.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(_.PermissionsWrapper),{"auth-function":()=>e.canDelete($)},{default:t.withCtx(()=>[t.createVNode(N,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:pt=>G($)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(c)("actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),"empty-state":t.withCtx(()=>[t.createVNode(ws,{"action-button-text":t.unref(c)("list.action"),"action-button-visible":me.value,"data-testid":"redis-entity-empty-state",features:[{key:"feature-1",title:t.unref(c)("list.empty_state.feature_1.title"),description:t.unref(c)("list.empty_state.feature_1.description")},{key:"feature-2",title:t.unref(c)("list.empty_state.feature_2.title"),description:t.unref(c)("list.empty_state.feature_2.description")}],"icon-background":"",message:t.unref(c)("list.empty_state.description"),title:t.unref(c)("redis.title"),onClickAction:b},{icon:t.withCtx(()=>[t.createVNode(t.unref(Q.DeployIcon),{decorative:""})]),"feature-icon-feature-1":t.withCtx(()=>[t.createVNode(t.unref(Q.ClipboardIcon))]),"feature-icon-feature-2":t.withCtx(()=>[t.createVNode(t.unref(Q.RefreshIcon))]),"action-button-icon":t.withCtx(()=>[t.createVNode(t.unref(Q.AddIcon),{decorative:""})]),_:1},8,["action-button-text","action-button-visible","features","message","title"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher-cache-key","query"]),t.createVNode(Mn,{visible:m.value,onClose:I[2]||(I[2]=$=>m.value=!1)},null,8,["visible"]),t.createVNode(t.unref(_.EntityDeleteModal),{"action-pending":h.value,description:t.unref(c)("delete.description"),"entity-name":l.value&&(l.value.name||l.value.id),"entity-type":t.unref(_.EntityTypes).RedisConfiguration,error:T.value,"need-confirmation":!0,title:t.unref(c)("delete.title"),visible:d.value,onCancel:we,onProceed:ut},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),t.createVNode(is,{config:e.config,"redis-configuration-id":u.value,visible:a.value,onCancel:I[3]||(I[3]=$=>a.value=!1),onProceed:I[4]||(I[4]=$=>a.value=!1),onViewPlugin:I[5]||(I[5]=$=>r("click:plugin",$))},null,8,["config","redis-configuration-id","visible"])])}}}),[["__scopeId","data-v-4e5be541"]]),cs={class:"kong-ui-consumer-group-entity-config-card"},ds=t.defineComponent({__name:"RedisConfigurationConfigCard",props:{config:{type:Object,required:!0,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)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!0}},emits:["loading","fetch:error","fetch:success"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=re.useI18n(),a=t.computed(()=>ye.form[r.config.app].edit),u=t.ref(_e),p=g=>{u.value=Ve(g),i("fetch:success",g)},l=t.computed(()=>{const g=u.value===C.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");let S="";switch(u.value){case C.HOST_PORT_CE:S=o("form.options.type.host_port");break;case C.HOST_PORT_EE:S=o("form.options.type.host_port");break;case C.CLUSTER:S=o("form.options.type.cluster");break;case C.SENTINEL:S=o("form.options.type.sentinel");break}return`${S}${g}`}),d=g=>({id:g.id,name:g.name,tags:g.tags,created_at:g.created_at,updated_at:g.updated_at,type:g.type,...g.config,...r.config.cloudAuthAvailable?{cloud_authentication:it(g.config.cloud_authentication)}:null}),h=(g,S)=>{if(!g||Object.keys(g).length===0)return{};const{id:s,name:O,created_at:E,updated_at:c,type:x,tags:R,...M}=g;return S==="terraform"?{[x.replaceAll("-","_")]:{id:s,name:O,tags:R,created_at:E,updated_at:c,config:M}}:{id:s,name:O,tags:R,created_at:E,updated_at:c,type:x,config:M}},T={id:{},name:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.name.label")},tags:{type:_.ConfigurationSchemaType.BadgeTag,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.tags.label"),tooltip:o("form.fields.tags.tooltip")},updated_at:{},created_at:{},type:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.type.label")},cluster_max_redirections:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.cluster_max_redirections.tooltip"),label:o("form.fields.cluster_max_redirections.label")},cluster_nodes:{type:_.ConfigurationSchemaType.JsonArray,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.cluster_nodes.title"),tooltip:o("form.fields.cluster_nodes.tooltip")},connect_timeout:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.connect_timeout.label"),tooltip:o("form.fields.connect_timeout.tooltip")},connection_is_proxied:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.connection_is_proxied.label"),tooltip:o("form.fields.connection_is_proxied.tooltip")},database:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.database.label"),tooltip:o("form.fields.database.tooltip")},host:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.host.label"),tooltip:o("form.fields.host.tooltip")},keepalive_backlog:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_backlog.label"),tooltip:o("form.fields.keepalive_backlog.tooltip")},keepalive_pool_size:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_pool_size.label"),tooltip:o("form.fields.keepalive_pool_size.tooltip")},password:{type:_.ConfigurationSchemaType.Redacted,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.password.label"),tooltip:o("form.fields.password.tooltip")},port:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.port.label"),tooltip:o("form.fields.port.tooltip")},read_timeout:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.read_timeout.label"),tooltip:o("form.fields.read_timeout.tooltip")},send_timeout:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.send_timeout.label"),tooltip:o("form.fields.send_timeout.tooltip")},sentinel_master:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_master.label"),tooltip:o("form.fields.sentinel_master.tooltip")},sentinel_nodes:{type:_.ConfigurationSchemaType.JsonArray,section:_.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.sentinel_nodes.tooltip")},sentinel_password:{type:_.ConfigurationSchemaType.Redacted,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_password.label"),tooltip:o("form.fields.sentinel_password.tooltip")},sentinel_role:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_role.label"),tooltip:o("form.fields.sentinel_role.tooltip")},sentinel_username:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_username.label"),tooltip:o("form.fields.sentinel_username.tooltip")},server_name:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.server_name.label"),tooltip:o("form.fields.server_name.tooltip")},ssl_verify:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl_verify.label"),tooltip:o("form.fields.ssl_verify.tooltip")},ssl:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl.label"),tooltip:o("form.fields.ssl.tooltip")},timeout:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.timeout.label"),tooltip:o("form.fields.timeout.tooltip")},username:{type:_.ConfigurationSchemaType.Text,section:_.ConfigurationSchemaSection.Basic,label:o("form.fields.username.label"),tooltip:o("form.fields.username.tooltip")},cloud_authentication:{type:_.ConfigurationSchemaType.Json,section:_.ConfigurationSchemaSection.Basic,label:o("form.sections.cloud_auth.title")}},m=g=>{const S={},s=Object.keys(T);for(const O of s)g.includes(O)?S[O]={...T[O],order:g.indexOf(O)+1}:S[O]={...T[O],hidden:!0};return S},y=t.computed(()=>{const g=["id","name","tags","type","updated_at","created_at"];switch(u.value){case C.HOST_PORT_CE:return m([...g,"host","port","timeout","database","username","password","ssl","ssl_verify","server_name","cloud_authentication"]);case C.HOST_PORT_EE:return m([...g,"host","port","connection_is_proxied","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout","cloud_authentication"]);case C.CLUSTER:return m([...g,"cluster_nodes","cluster_max_redirections","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout","cloud_authentication"]);case C.SENTINEL:return m([...g,"sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);default:throw new Error("Invalid Redis type")}});return(g,S)=>(t.openBlock(),t.createElementBlock("div",cs,[t.createVNode(t.unref(_.EntityBaseConfigCard),{"code-block-record-formatter":h,config:e.config,"config-card-doc":e.configCardDoc,"config-schema":y.value,"entity-type":t.unref(_.SupportedEntityType).Partial,"fetch-url":a.value,"hide-title":e.hideTitle,"record-resolver":d,"onFetch:error":S[0]||(S[0]=s=>g.$emit("fetch:error",s)),"onFetch:success":p,onLoading:S[1]||(S[1]=s=>g.$emit("loading",s))},{type:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(l.value),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),us="12px";function jn(e){const{redisType:n="redis-ce"}=e,r="1000",i=t.inject(yt.FORMS_CONFIG),{i18n:{t:o}}=Le();if(!i)throw new Error("FORMS_CONFIG must be provided");const{debouncedQueryChange:a,loading:u,error:p,loadItems:l,results:d}=_.useDebouncedFilter(i,ye.list[i.app],r,{fetchedItemsKey:"data",searchKeys:["id","name"]}),h=m=>{switch(m){case C.CLUSTER:return o("form.options.type.cluster");case C.HOST_PORT_CE:return o("form.options.type.host_port");case C.SENTINEL:return o("form.options.type.sentinel");case C.HOST_PORT_EE:return`${o("form.options.type.host_port")} (${o("form.options.type.enterprise")})`}},T=t.computed(()=>(d.value||[]).filter(y=>y.type==="redis-ce"||y.type==="redis-ee").map(y=>({label:y.id,name:y.name,value:y.id,type:y.type,tag:h(Ve(y))})).filter(y=>y.type===n));return t.onBeforeMount(()=>{l()}),{items:T,loading:u,onQueryChange:a,error:p,loadItems:l}}const fs=["id"],Ln=z(t.defineComponent({__name:"RedisConfigurationFormModal",props:{visible:{type:Boolean},partialType:{default:"redis-ee"}},emits:["toast","modal-close","created"],setup(e,{emit:n}){const r=n,{i18n:{t:i}}=Le(),o=t.inject(yt.FORMS_CONFIG),a=t.computed(()=>({...o,cancelRoute:void 0})),{getMessageFromError:u}=_.useErrors(),p=t.useId(),l=t.computed(()=>{switch(e.partialType){case L.REDIS_CE:return L.REDIS_EE;case L.REDIS_EE:return L.REDIS_CE;default:return}}),d=t.ref(!1),h=t.ref(),T=g=>{r("toast",{message:u(g),appearance:"danger"})},m=g=>{r("toast",{message:i("form.partial_created_success_message"),appearance:"success"}),y(),r("created",g)},y=()=>{h.value=void 0,r("modal-close"),t.nextTick(()=>{d.value=!1})};return t.watch(()=>e.visible,g=>{g&&(d.value=!0,t.nextTick(()=>{h.value=`#redis-modal-footer-${p}`}))}),(g,S)=>{const s=t.resolveComponent("KModal");return t.openBlock(),t.createBlock(s,{class:"plugin-redis-partial-form","data-testid":"redis-partial-form-modal","full-screen":"",title:t.unref(i)("form.redis_partial_modal_title"),visible:d.value,onCancel:y},{footer:t.withCtx(()=>[t.createElementVNode("div",{id:`redis-modal-footer-${t.unref(p)}`,class:"redis-modal-footer"},null,8,fs)]),default:t.withCtx(()=>[t.createVNode(Dn,{"action-teleport-target":h.value,config:a.value,"disabled-partial-type":l.value,"slidout-top-offset":0,onCancel:y,onError:T,onUpdate:m},null,8,["action-teleport-target","config","disabled-partial-type"])]),_:1},8,["title","visible"])}}}),[["__scopeId","data-v-280b73f4"]]),ps={class:"selected-redis-config"},ms=["data-testid"],gs={class:"select-item-name","data-testid":"selected-redis-config"},_s={class:"empty-redis-config","data-testid":"empty-redis-config"},ys=z(t.defineComponent({inheritAttrs:!1,__name:"RedisConfigurationSelector",props:{modelValue:{},redisType:{default:"redis-ee"},placeholder:{},emptyStateText:{},showCreateButton:{type:Boolean,default:!0},createButtonText:{}},emits:["update:modelValue","change","create-new","error-change","modal-close","toast"],setup(e,{emit:n}){const r=n,{i18n:{t:i}}=Le(),{items:o,loading:a,onQueryChange:u,error:p,loadItems:l}=jn({redisType:e.redisType}),d=t.ref(!1),h=g=>{const S=g==null?void 0:g.value;r("update:modelValue",S),r("change",g)},T=()=>{d.value=!0},m=()=>{d.value=!1,r("modal-close")},y=g=>{d.value=!1,l(),h({name:g.name,value:g.id,label:g.name})};return t.watch(p,g=>{r("error-change",g?new Error(String(g)):null)}),(g,S)=>{const s=t.resolveComponent("KBadge"),O=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(O,t.mergeProps({class:"redis-config-select-trigger","enable-filtering":"","filter-function":()=>!0,items:t.unref(o),loading:t.unref(a),"model-value":e.modelValue,placeholder:e.placeholder||t.unref(i)("selector.placeholder")},g.$attrs,{onChange:h,onQueryChange:t.unref(u)}),t.createSlots({"selected-item-template":t.withCtx(({item:E})=>[t.createElementVNode("div",ps,t.toDisplayString(E.name),1)]),"item-template":t.withCtx(({item:E})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${E.name}`},[t.createElementVNode("span",gs,t.toDisplayString(E.name),1),t.createVNode(s,{appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(E.tag),1)]),_:2},1024)],8,ms)]),empty:t.withCtx(()=>[t.createElementVNode("div",_s,t.toDisplayString(e.emptyStateText||t.unref(i)("selector.empty_state")),1)]),_:2},[e.showCreateButton?{name:"dropdown-footer-text",fn:t.withCtx(()=>[t.createElementVNode("div",{class:"new-redis-config-area","data-testid":"new-redis-config-area",onClick:T},[t.createVNode(t.unref(Q.AddIcon),{size:t.unref(us)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(e.createButtonText||t.unref(i)("selector.create_new")),1)])]),key:"0"}:void 0]),1040,["items","loading","model-value","placeholder","onQueryChange"]),t.createVNode(Ln,{"partial-type":e.redisType,visible:d.value,onCreated:y,onModalClose:m,onToast:S[0]||(S[0]=E=>r("toast",E))},null,8,["partial-type","visible"])],64)}}}),[["__scopeId","data-v-3c6e44d3"]]),bs={useLinkedPlugins:Bn,useLinkedPluginsFetcher:xe,useRedisConfigurationSelector:jn};V.AuthProvider=D,V.DeleteWarningModal=Mn,V.LinkedPlugins=vn,V.PartialType=L,V.RedisConfigurationConfigCard=ds,V.RedisConfigurationForm=Dn,V.RedisConfigurationFormModal=Ln,V.RedisConfigurationList=ss,V.RedisConfigurationSelector=ys,V.RedisType=C,V.composables=bs,V.constants=Ol,V.helpers=Rl,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.array-card-container-wrapper{width:100%}.array-card-container[data-v-
|
|
1
|
+
.array-card-container-wrapper{width:100%}.array-card-container[data-v-a0b2e4fb]{align-items:center;display:flex}.array-card-container .card[data-v-a0b2e4fb]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-a0b2e4fb]{margin-left:12px}.cluster-node-items[data-v-776a626d],.sentinel-node-items[data-v-cd1c07e2]{display:flex;flex-direction:column;gap:24px}.secret-picker-provider[data-v-150a04c2]{margin-top:8px!important}.warning-alert[data-v-d1ab730f]{margin-bottom:32px}.kong-ui-entities-redis-configurations-form[data-v-d1ab730f]{width:100%}.secret-picker-provider[data-v-d1ab730f]{margin-top:8px!important}.linked-plugins[data-v-c39556bc]{display:flex;gap:8px}.plugin-item[data-v-de964dc4]{align-items:center;display:flex;gap:8px}.toolbar-container[data-v-50856d03]{align-items:center;display:flex;width:100%}.linked-plugins-modal[data-v-6148b8bd] .k-table-view{background-color:transparent}.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:640px}@media (max-width: 640px){.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:100%}}.kong-ui-entities-partials-list[data-v-4e5be541]{width:100%}.plugin-redis-partial-form[data-v-280b73f4] .modal-full-screen .modal-container:not(.vault-secret-picker .modal-container){max-width:1477px}.plugin-redis-partial-form[data-v-280b73f4] .modal-container .modal-content{padding:0}.plugin-redis-partial-form[data-v-280b73f4] .vault-secret-picker .modal-container .modal-content{padding:24px}.plugin-redis-partial-form[data-v-280b73f4] .k-card{border:none;border-radius:0}.redis-modal-footer[data-v-280b73f4]{width:100%}.redis-modal-footer[data-v-280b73f4] .form-actions{margin:0}.redis-config-select-trigger[data-v-3c6e44d3] .k-label{margin-top:0}.redis-config-select-trigger .empty-redis-config[data-v-3c6e44d3]{color:#6c7489}.redis-config-select-trigger .new-redis-config-area[data-v-3c6e44d3]{align-items:center;color:#0044f4;cursor:pointer;display:flex;gap:2px;pointer-events:auto}.redis-config-select-trigger .plugin-form-redis-configuration-dropdown-item[data-v-3c6e44d3]{align-items:center;display:flex;gap:16px}.redis-config-select-trigger .plugin-form-redis-configuration-dropdown-item .select-item-name[data-v-3c6e44d3]{color:#3a3f51;line-height:24px}.redis-config-select-trigger .selected-redis-config[data-v-3c6e44d3]{font-weight:700;line-height:24px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-redis-configurations",
|
|
3
|
-
"version": "1.8.20-pr.
|
|
3
|
+
"version": "1.8.20-pr.2792.f8a60c5d8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-redis-configurations.umd.js",
|
|
6
6
|
"module": "./dist/entities-redis-configurations.es.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@kong/design-tokens": "1.18.
|
|
24
|
+
"@kong/design-tokens": "1.18.2",
|
|
25
25
|
"@kong/icons": "^1.41.0",
|
|
26
26
|
"@kong/kongponents": "9.48.8",
|
|
27
27
|
"@types/uuid": "^11.0.0",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"swrv": "^1.1.0",
|
|
30
30
|
"vue": "^3.5.26",
|
|
31
31
|
"vue-router": "^4.6.4",
|
|
32
|
-
"@kong-ui-public/entities-shared": "^3.36.13-pr.
|
|
33
|
-
"@kong-ui-public/
|
|
34
|
-
"@kong-ui-public/forms": "^4.20.20-pr.
|
|
35
|
-
"@kong-ui-public/
|
|
32
|
+
"@kong-ui-public/entities-shared": "^3.36.13-pr.2792.f8a60c5d8.0",
|
|
33
|
+
"@kong-ui-public/entities-vaults": "^4.0.16-pr.2792.f8a60c5d8.0",
|
|
34
|
+
"@kong-ui-public/forms": "^4.20.20-pr.2792.f8a60c5d8.0",
|
|
35
|
+
"@kong-ui-public/i18n": "^2.4.5"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"swrv": "^1.1.0",
|
|
59
59
|
"vue": ">= 3.3.13 < 4",
|
|
60
60
|
"vue-router": "^4.6.4",
|
|
61
|
-
"@kong-ui-public/entities-shared": "^3.36.13-pr.
|
|
62
|
-
"@kong-ui-public/entities-vaults": "^4.0.16-pr.
|
|
63
|
-
"@kong-ui-public/
|
|
64
|
-
"@kong-ui-public/
|
|
61
|
+
"@kong-ui-public/entities-shared": "^3.36.13-pr.2792.f8a60c5d8.0",
|
|
62
|
+
"@kong-ui-public/entities-vaults": "^4.0.16-pr.2792.f8a60c5d8.0",
|
|
63
|
+
"@kong-ui-public/forms": "^4.20.20-pr.2792.f8a60c5d8.0",
|
|
64
|
+
"@kong-ui-public/i18n": "^2.4.5"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"uuid": "^11.1.0",
|