@kong-ui-public/entities-upstreams-targets 1.3.20 → 1.3.21
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.
|
@@ -2383,7 +2383,7 @@ const go = {
|
|
|
2383
2383
|
for (const [l, s] of a)
|
|
2384
2384
|
t[l] = s;
|
|
2385
2385
|
return t;
|
|
2386
|
-
}, So = (e) => (Vs("data-v-
|
|
2386
|
+
}, So = (e) => (Vs("data-v-dd88a2bb"), e = e(), Rs(), e), Io = ["aria-hidden"], xo = {
|
|
2387
2387
|
key: 0,
|
|
2388
2388
|
"data-testid": "kui-icon-svg-title"
|
|
2389
2389
|
}, Ho = /* @__PURE__ */ So(() => /* @__PURE__ */ x("path", {
|
|
@@ -2482,7 +2482,7 @@ const go = {
|
|
|
2482
2482
|
_: 1
|
|
2483
2483
|
}, 8, ["aria-hidden", "style"]));
|
|
2484
2484
|
}
|
|
2485
|
-
}), Ao = /* @__PURE__ */ wo(To, [["__scopeId", "data-v-
|
|
2485
|
+
}), Ao = /* @__PURE__ */ wo(To, [["__scopeId", "data-v-dd88a2bb"]]), Fo = { "data-testid": "config-card-title" }, Oo = { class: "config-card-actions" }, qo = ["href"], Uo = {
|
|
2486
2486
|
key: 2,
|
|
2487
2487
|
class: "config-card-details-section"
|
|
2488
2488
|
}, $o = {
|
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
`+e.slice(o,i),o=i+1),c=h;return s+=`
|
|
30
30
|
`,e.length-o>l&&c>o?s+=e.slice(o,c)+`
|
|
31
31
|
`+e.slice(c+1):s+=e.slice(o),s.slice(1)}function ds(e){for(var l="",a=0,r,o=0;o<e.length;a>=65536?o+=2:o++)a=Ee(e,o),r=Z[a],!r&&He(a)?(l+=e[o],a>=65536&&(l+=e[o+1])):l+=r||ts(a);return l}function hs(e,l,a){var r="",o=e.tag,i,c,h;for(i=0,c=a.length;i<c;i+=1)h=a[i],e.replacer&&(h=e.replacer.call(a,String(i),h)),(ne(e,l,h,!1,!1)||typeof h>"u"&&ne(e,l,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=o,e.dump="["+r+"]"}function Ea(e,l,a,r){var o="",i=e.tag,c,h,s;for(c=0,h=a.length;c<h;c+=1)s=a[c],e.replacer&&(s=e.replacer.call(a,String(c),s)),(ne(e,l+1,s,!0,!0,!1,!0)||typeof s>"u"&&ne(e,l+1,null,!0,!0,!1,!0))&&((!r||o!=="")&&(o+=it(e,l)),e.dump&&Ie===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=i,e.dump=o||"[]"}function ps(e,l,a){var r="",o=e.tag,i=Object.keys(a),c,h,s,d,u;for(c=0,h=i.length;c<h;c+=1)u="",r!==""&&(u+=", "),e.condenseFlow&&(u+='"'),s=i[c],d=a[s],e.replacer&&(d=e.replacer.call(a,s,d)),ne(e,l,s,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ne(e,l,d,!1,!1)&&(u+=e.dump,r+=u));e.tag=o,e.dump="{"+r+"}"}function us(e,l,a,r){var o="",i=e.tag,c=Object.keys(a),h,s,d,u,p,n;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new ee("sortKeys must be a boolean or a function");for(h=0,s=c.length;h<s;h+=1)n="",(!r||o!=="")&&(n+=it(e,l)),d=c[h],u=a[d],e.replacer&&(u=e.replacer.call(a,d,u)),ne(e,l+1,d,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&Ie===e.dump.charCodeAt(0)?n+="?":n+="? "),n+=e.dump,p&&(n+=it(e,l)),ne(e,l+1,u,!0,p)&&(e.dump&&Ie===e.dump.charCodeAt(0)?n+=":":n+=": ",n+=e.dump,o+=n));e.tag=i,e.dump=o||"{}"}function Aa(e,l,a){var r,o,i,c,h,s;for(o=a?e.explicitTypes:e.implicitTypes,i=0,c=o.length;i<c;i+=1)if(h=o[i],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof l=="object"&&l instanceof h.instanceOf)&&(!h.predicate||h.predicate(l))){if(a?h.multi&&h.representName?e.tag=h.representName(l):e.tag=h.tag:e.tag="?",h.represent){if(s=e.styleMap[h.tag]||h.defaultStyle,fa.call(h.represent)==="[object Function]")r=h.represent(l,s);else if(ma.call(h.represent,s))r=h.represent[s](l,s);else throw new ee("!<"+h.tag+'> tag resolver accepts not "'+s+'" style');e.dump=r}return!0}return!1}function ne(e,l,a,r,o,i,c){e.tag=null,e.dump=a,Aa(e,a,!1)||Aa(e,a,!0);var h=fa.call(e.dump),s=r,d;r&&(r=e.flowLevel<0||e.flowLevel>l);var u=h==="[object Object]"||h==="[object Array]",p,n;if(u&&(p=e.duplicates.indexOf(a),n=p!==-1),(e.tag!==null&&e.tag!=="?"||n||e.indent!==2&&l>0)&&(o=!1),n&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(u&&n&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),h==="[object Object]")r&&Object.keys(e.dump).length!==0?(us(e,l,e.dump,o),n&&(e.dump="&ref_"+p+e.dump)):(ps(e,l,e.dump),n&&(e.dump="&ref_"+p+" "+e.dump));else if(h==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!c&&l>0?Ea(e,l-1,e.dump,o):Ea(e,l,e.dump,o),n&&(e.dump="&ref_"+p+e.dump)):(hs(e,l,e.dump),n&&(e.dump="&ref_"+p+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&is(e,e.dump,l,i,s);else{if(h==="[object Undefined]"||e.skipInvalid)return!1;throw new ee("unacceptable kind of an object to dump "+h)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function fs(e,l){var a=[],r=[],o,i;for(dt(e,a,r),o=0,i=r.length;o<i;o+=1)l.duplicates.push(a[r[o]]);l.usedDuplicates=new Array(i)}function dt(e,l,a){var r,o,i;if(e!==null&&typeof e=="object")if(o=l.indexOf(e),o!==-1)a.indexOf(o)===-1&&a.push(o);else if(l.push(e),Array.isArray(e))for(o=0,i=e.length;o<i;o+=1)dt(e[o],l,a);else for(r=Object.keys(e),o=0,i=r.length;o<i;o+=1)dt(e[r[o]],l,a)}function ms(e,l){l=l||{};var a=new ls(l);a.noRefs||fs(e,a);var r=e;return a.replacer&&(r=a.replacer.call({"":r},"",r)),ne(a,0,r,!0,!0)?a.dump+`
|
|
32
|
-
`:""}var gs=ms,ys={dump:gs};function ht(e,l){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}var ks=G,bs=Ot,Cs=vt,_s=Pt,ws=Lt,Ss=at,xs=ua.load,Ns=ua.loadAll,Vs=ys.dump,Bs=ee,Is={binary:Qt,float:jt,map:$t,null:Dt,pairs:Gt,set:Zt,timestamp:zt,bool:Mt,int:Kt,merge:Wt,omap:Yt,seq:Ut,str:qt},Ts=ht("safeLoad","load"),Hs=ht("safeLoadAll","loadAll"),Es=ht("safeDump","dump"),As={Type:ks,Schema:bs,FAILSAFE_SCHEMA:Cs,JSON_SCHEMA:_s,CORE_SCHEMA:ws,DEFAULT_SCHEMA:Ss,load:xs,loadAll:Ns,dump:Vs,YAMLException:Bs,types:Is,safeLoad:Ts,safeLoadAll:Hs,safeDump:Es};const Fs={key:0,class:"config-card-display-form"},Os=["data-testid"],qs={key:0,class:"config-card-prop-section-title"},Us={key:1,class:"config-card-display-json"},$s={key:2,class:"config-card-display-yaml"},vs=le(t.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const l=e,a=t.useSlots(),{i18n:{t:r}}=Y.useI18n(),o=h=>!!(h.tooltip||a[`${h.key}-label-tooltip`]),i=t.ref(""),c=t.ref("");return t.watch(()=>l.format,h=>{h==="json"?i.value=JSON.stringify(l.record,null,2):h==="yaml"&&(c.value=As.dump(l.record))},{immediate:!0}),(h,s)=>{const d=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Fs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,u=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${u}-props`,class:t.normalizeClass(`config-card-details-${u}-props`),"data-testid":`config-card-details-${u}-props`},[u!=="basic"?(t.openBlock(),t.createElementBlock("div",qs,t.toDisplayString(u==="advanced"?t.unref(r)("baseConfigCard.sections.advanced"):t.unref(r)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[u],p=>(t.openBlock(),t.createBlock(Ge,{key:p.key,item:p},t.createSlots({label:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label`,{row:p},void 0,!0)]),[p.key]:t.withCtx(({rowValue:n})=>[t.renderSlot(h.$slots,p.key,{row:p,rowValue:n},void 0,!0)]),_:2},[o(p)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label-tooltip`,{row:p},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Os))),128))])):t.createCommentVNode("",!0),e.format==="json"?(t.openBlock(),t.createElementBlock("div",Us,[t.createVNode(d,{id:"config-card-codeblock",code:i.value,language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),e.format==="yaml"?(t.openBlock(),t.createElementBlock("div",$s,[t.createVNode(d,{id:"config-card-codeblock",code:c.value,language:"yaml",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c45e9e4"]]),Fa="24px",Ds=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Ms=e=>(t.pushScopeId("data-v-37e959c8"),e=e(),t.popScopeId(),e),Ks=["aria-hidden"],js={key:0,"data-testid":"kui-icon-svg-title"},Ps=Ms(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),Ls=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Fa,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const l=String(e).replace(/px/gi,""),a=Number(l);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const l=e,a=t.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const o=String(l.size).replace(/px/gi,""),i=Number(o);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return Fa}),r=t.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:a.value,lineHeight:"0",width:a.value}));return(o,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",js,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Ps],8,Ks))]),_:1},8,["aria-hidden","style"]))}}),Rs=Ds(Ls,[["__scopeId","data-v-37e959c8"]]),Js={"data-testid":"config-card-title"},zs={class:"config-card-actions"},Ws=["href"],Qs={key:2,class:"config-card-details-section"},Ys={key:3,class:"config-card-details-section"},Gs=["data-testid"],Zs={key:0,class:"config-card-prop-section-title"},Xs=le(t.defineComponent({__name:"EntityBaseConfigCard",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)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:l}){var a;const r=e,o=t.useSlots(),{i18n:{t:i}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{convertKeyToTitle:h}=Y.useStringHelpers(),{axiosInstance:s}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),d=[{label:i("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=t.ref("structured"),p=V=>{u.value=V==null?void 0:V.value},n={id:{type:L.ID,label:i("baseConfigCard.commonFields.id_label"),order:0,section:J.Basic},name:{order:1,section:J.Basic},enabled:{type:L.BadgeStatus,order:2,section:J.Basic},updated_at:{type:L.Date,label:i("baseConfigCard.commonFields.updated_at_label"),order:3,section:J.Basic},created_at:{type:L.Date,label:i("baseConfigCard.commonFields.created_at_label"),order:4,section:J.Basic},tags:{type:L.BadgeTag,order:-1,section:J.Basic}},y=t.ref(!1),C=t.ref(!1),f=t.ref(""),m=t.ref(),N=t.computed(()=>{var V,I,_;if(!m.value)return[];const O=[],q=Object.keys(m.value).length;for(const M in m.value){const A=(I=(V=r.configSchema)==null?void 0:V[M])==null?void 0:I.order,$=(_=n[M])==null?void 0:_.order;let K=q;($||$===0)&&(K=$===-1?q+1:$),A&&(K=A===-1?q+1:A),O.push([M,K])}return O.sort(function(M,A){return M[1]-A[1]}),O.map(M=>{var A,$;const K=M[0],B=(A=m.value)==null?void 0:A[K],U=(($=r.configSchema)==null?void 0:$[K])||{},D=n[K];return{key:K,value:B,hidden:U.hidden||!1,type:U.type??((D==null?void 0:D.type)||L.Text),label:U.label??((D==null?void 0:D.label)||h(K)),tooltip:U.tooltip??((D==null?void 0:D.tooltip)||void 0),section:U.section??((D==null?void 0:D.section)||J.Advanced)}}).filter(M=>!M.hidden&&M.key!==r.pluginConfigKey)}),k=t.computed(()=>{var V,I;if(!m.value||!r.pluginConfigKey)return[];const _=m.value[r.pluginConfigKey]||{},O=Object.keys(_).length,q=[];for(const M in _){const A=(I=(V=r.pluginConfigSchema)==null?void 0:V[M])==null?void 0:I.order,$=_[M];let K=$!=null&&$!==""?O-1:O;A&&(K=A===-1?O+1:A),q.push([M,K])}return q.sort(function(M,A){return M[1]-A[1]}),q.map(M=>{var A;const $=M[0],K=_[$],B=((A=r.pluginConfigSchema)==null?void 0:A[$])||{};return{key:$,value:K,hidden:B.hidden||!1,type:B.type??L.Text,label:B.label??h($),tooltip:B.tooltip??void 0,section:J.Plugin}}).filter(M=>!M.hidden)}),S=t.computed(()=>{var V,I,_,O;return{basic:(V=N.value)==null?void 0:V.filter(q=>q.section===J.Basic),advanced:(I=N.value)==null?void 0:I.filter(q=>q.section===J.Advanced),plugin:(O=k.value)==null?void 0:O.concat((_=N.value)==null?void 0:_.filter(q=>q.section===J.Plugin))}}),F=t.computed(()=>{const V=[];return S.value.basic.length&&V.push("basic"),S.value.advanced.length&&V.push("advanced"),S.value.plugin.length&&V.push("plugin"),V}),x=V=>!!(V.tooltip||o[`${V.key}-label-tooltip`]),H=t.computed(()=>{var V,I;let _=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((V=r.config)==null?void 0:V.controlPlaneId)||""):r.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(I=r.config)!=null&&I.workspace?`/${r.config.workspace}`:"")),_=_.replace(/{id}/gi,r.config.entityId),_}),E=V=>{m.value&&V(JSON.stringify(m.value))?l("copy:success",m.value):l("copy:error")};return t.watch(y,V=>{l("loading",V)},{immediate:!0}),t.onBeforeMount(async()=>{C.value=!1,y.value=!0;try{const{data:V}=await s.get(H.value);if(r.dataKey)if(typeof V[r.dataKey]<"u")m.value={...V[r.dataKey]};else throw new Error(i("errors.dataKeyUndefined",{dataKey:r.dataKey}));else m.value={...V};Object.keys(r.configSchema).filter(I=>r.configSchema[I].forceShow).forEach(I=>{m.value&&typeof m.value[I]>"u"&&(m.value[I]=null)}),l("fetch:success",V)}catch(V){const I=c(V);f.value=I.startsWith("code")?i("baseConfigCard.errors.load"):I,C.value=!0,l("fetch:error",V)}finally{y.value=!1}}),(V,I)=>{const _=t.resolveComponent("KLabel"),O=t.resolveComponent("KSelect"),q=t.resolveComponent("KButton"),M=t.resolveComponent("KClipboardProvider"),A=t.resolveComponent("KSkeleton"),$=t.resolveComponent("KEmptyState"),K=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(K,{class:"kong-ui-entity-base-config-card"},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",zs,[t.renderSlot(V.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(_,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(O,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:p})):t.createCommentVNode("",!0),r.config.jsonYamlEnabled&&e.configCardDoc?(t.openBlock(),t.createBlock(q,{key:2,appearance:"btn-link",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(Rs),{size:t.unref(Zr)},null,8,["size"])],8,Ws)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(M,{key:3},{default:t.withCtx(({copyToClipboard:B})=>[!y.value&&!C.value?(t.openBlock(),t.createBlock(q,{key:0,appearance:"btn-link","data-testid":"json-copy-button",onClick:U=>E(B)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:1}))])]),body:t.withCtx(()=>[y.value?(t.openBlock(),t.createBlock(A,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):C.value?(t.openBlock(),t.createBlock($,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(f.value),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createElementBlock("div",Qs,[t.createVNode(vs,{format:u.value,"prop-list-types":F.value,"property-collections":S.value,record:m.value},t.createSlots({_:2},[t.renderList(Object.keys(V.$slots),B=>({name:B,fn:t.withCtx(({row:U,rowValue:D})=>[t.renderSlot(V.$slots,B,{row:U,rowValue:D},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(t.openBlock(),t.createElementBlock("div",Ys,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(F.value,B=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${B}-props`,class:t.normalizeClass(`config-card-details-${B}-props`),"data-testid":`config-card-details-${B}-props`},[B!=="basic"?(t.openBlock(),t.createElementBlock("div",Zs,t.toDisplayString(B==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.value[B],U=>(t.openBlock(),t.createBlock(Ge,{key:U.key,item:U},t.createSlots({label:t.withCtx(()=>[t.renderSlot(V.$slots,`${U.key}-label`,{row:U},void 0,!0)]),[U.key]:t.withCtx(({rowValue:D})=>[t.renderSlot(V.$slots,U.key,{row:U,rowValue:D},void 0,!0)]),_:2},[x(U)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(V.$slots,`${U.key}-label-tooltip`,{row:U},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Gs))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("div",Js,[t.renderSlot(V.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-64349aa2"]]),ei=["onReset","onSubmit"],ti={class:"form-actions","data-testid":"form-actions"},Oa=le(t.defineComponent({__name:"EntityBaseForm",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")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:l}){var a;const r=e,o=Je.useRouter(),{i18n:{t:i}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{axiosInstance:h}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),s=t.ref(!1),d=t.ref(!1),u=t.ref(""),p=t.computed(()=>r.canSubmit===!1||r.isReadonly),n=t.computed(()=>{var m,N;if(!r.editId)return"";let k=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((m=r.config)==null?void 0:m.controlPlaneId)||""):r.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(N=r.config)!=null&&N.workspace?`/${r.config.workspace}`:"")),k=k.replace(/{id}/gi,r.editId),k}),y=()=>{r.config.cancelRoute?o.push(r.config.cancelRoute):C()},C=()=>{l("cancel")},f=()=>{p.value||l("submit")};return t.watch(()=>s.value,m=>{l("loading",m)},{immediate:!0}),t.onBeforeMount(async()=>{if(r.editId)try{d.value=!1,s.value=!0;const{data:m}=await h.get(n.value);l("fetch:success",m)}catch(m){const N=c(m);u.value=N.startsWith("code")?i("baseForm.errors.edit"):N,d.value=!0,l("fetch:error",m)}finally{s.value=!1}}),(m,N)=>{const k=t.resolveComponent("KSkeleton"),S=t.resolveComponent("KEmptyState"),F=t.resolveComponent("KAlert"),x=t.resolveComponent("KButton"),H=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(H,{class:"kong-ui-entity-base-form"},{body:t.withCtx(()=>[s.value?(t.openBlock(),t.createBlock(k,{key:0,type:"form"})):d.value?(t.openBlock(),t.createBlock(S,{key:1,"cta-text":t.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":y,"is-error":!0},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(u.value),1)]),_:1},8,["cta-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:t.withModifiers(C,["prevent"]),onSubmit:t.withModifiers(f,["prevent"])},[t.renderSlot(m.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(F,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createElementVNode("div",ti,[t.renderSlot(m.$slots,"form-actions",{},()=>[t.createVNode(x,{appearance:"outline","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(x,{appearance:"primary","data-testid":"form-submit",disabled:p.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,ei))]),_:3})}}}),[["__scopeId","data-v-44a90aae"]]),ai={key:0,"data-testid":"first-col"},li=le(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const l=e,a=t.computed(()=>{var f;return((f=l.rowEl)==null?void 0:f.querySelector(`[data-testid="${l.keyName}"]`))||null}),r=t.computed(()=>{var f;return((f=a.value)==null?void 0:f.querySelector('[data-testid="first-col"]'))||null}),o=t.computed(()=>{var f,m;const N=(f=l.rowEl)==null?void 0:f.querySelectorAll("td");return N?((m=N[0])==null?void 0:m.getAttribute("data-testid"))===l.keyName:!1});let i;const c=()=>{i&&(i.disconnect(),i=void 0)},h=()=>{var f,m,N;d.value=((f=r.value)==null?void 0:f.getBoundingClientRect().width)||0,u.value=((m=a.value)==null?void 0:m.clientWidth)||0,p.value=((N=s.value)==null?void 0:N.innerText)||""},s=t.ref({}),d=t.ref(0),u=t.ref(0),p=t.ref(""),n=t.computed(()=>[r.value,a.value]),y=t.watch(n,f=>{if(o.value&&(c(),"ResizeObserver"in window&&window)){i=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{!Array.isArray(m)||!m.length||h()})});for(const m of f)m&&i.observe(m)}},{immediate:!0,flush:"post",deep:!0}),C=t.computed(()=>o.value?d.value>u.value:!1);return t.onMounted(()=>{h()}),t.onUnmounted(()=>{y()}),(f,m)=>{const N=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:s,class:"content-wrapper"},[o.value?(t.openBlock(),t.createElementBlock("span",ai,[t.createVNode(N,{label:C.value?p.value:"","max-width":"300",placement:"bottomStart"},{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):t.renderSlot(f.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),ri={class:"toolbar-container"},oi={key:0,class:"toolbar-button-container"},ni=["data-testid"],qa=le(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),o=t.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),i=S=>S.hasData||!!a.query,c=t.computed(()=>{const S=[];return Object.keys(a.tableHeaders).forEach(F=>{const x=a.tableHeaders[F];S.push({label:x.label??F,key:F,sortable:x.sortable??!1})}),a.enableEntityActions&&S.push({key:"actions",hideLabel:!0}),S}),h=S=>({"data-rowid":S.id,"data-testid":S.name,...a.rowAttributes(S)}),s=t.ref({}),d=S=>{var F;return(F=s.value)==null?void 0:F.$el.querySelector(`[data-rowid="${S.id}"]`)},u=S=>{const F={"data-testid":S.headerKey,...a.cellAttributes(S)};return S.colIndex===0&&(F.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),F},p=()=>{l("empty-state-cta-clicked"),n()},n=()=>{l("clear-search-input")},y=t.computed(()=>a.disableRowClick?void 0:(S,F)=>{l("click:row",F)}),C=S=>{l("sort",S)},{setTablePreferences:f,getTablePreferences:m}=ur(),N=t.computed(()=>{const S=m(a.preferencesStorageKey);return{...a.initialFetcherParams,...S}}),k=S=>{a.preferencesStorageKey&&f(a.preferencesStorageKey,S)};return(S,F)=>{const x=t.resolveComponent("KIcon"),H=t.resolveComponent("KButton"),E=t.resolveComponent("KDropdownMenu"),V=t.resolveComponent("KTable"),I=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(I,{class:"kong-ui-entity-base-table",title:e.title},{body:t.withCtx(()=>[t.createVNode(V,{ref_key:"tableRefs",ref:s,"cache-identifier":o.value,"cell-attrs":u,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-title":e.errorMessage,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":!!e.errorMessage,headers:c.value,"hide-pagination-when-optional":"","initial-fetcher-params":N.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":h,"search-input":e.query,onKtableEmptyStateCtaClicked:p,"onRow:click":y.value,onSort:F[0]||(F[0]=_=>C(_)),"onUpdate:tablePreferences":k},t.createSlots({toolbar:t.withCtx(({state:_})=>[t.withDirectives(t.createElementVNode("div",ri,[t.renderSlot(S.$slots,"toolbar-filter",{},void 0,!0),S.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",oi,[t.renderSlot(S.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,i(_)]])]),actions:t.withCtx(({row:_,rowKey:O,rowValue:q})=>[t.createElementVNode("div",{class:"actions-container","data-testid":_.name},[t.createVNode(E,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(S.$slots,"actions",{row:_,rowKey:O,rowValue:q},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(H,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:t.withCtx(()=>[t.createVNode(x,{color:t.unref(Yr),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,ni)]),_:2},[t.renderList(e.tableHeaders,(_,O)=>({name:O,fn:t.withCtx(({row:q,rowKey:M,rowValue:A})=>[t.createVNode(li,{"key-name":String(O),"row-el":d(q)},{default:t.withCtx(()=>[t.renderSlot(S.$slots,O,{row:q,rowKey:M,rowValue:A},()=>[t.createTextVNode(t.toDisplayString(A),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-6bf92df6"]]),si={key:0,class:"kong-ui-entity-delete-error"},ii={key:1,class:"description"},Ua=le(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:l}){const a=e,{i18nT:r}=Y.useI18n(),o=t.computed(()=>a.needConfirm?a.entityName:""),i=()=>{l("cancel")},c=()=>{l("proceed")};return(h,s)=>{const d=t.resolveComponent("KAlert"),u=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(u,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":o.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:i,onProceed:c},{"body-content":t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",si,[t.createVNode(d,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||h.$slots.description?(t.openBlock(),t.createElementBlock("div",ii,[t.renderSlot(h.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(a.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),ci={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},di={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},hi=["fill"],pi={mask:"url(#mask0_180_20349)"},ui=["fill"],fi=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Wr})`}},setup(e){return(l,a)=>(t.openBlock(),t.createElementBlock("svg",ci,[t.createElementVNode("mask",di,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,hi)]),t.createElementVNode("g",pi,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,ui)])]))}}),mi={key:1,class:"kong-ui-entity-filter"},gi={class:"menu-item-title"},yi={class:"menu-item-indicator"},ki={class:"menu-item-body"},bi=["for"],Ci={class:"menu-item-buttons"},_i=le(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),o=t.ref(!1),i=t.ref({}),c=t.computed(()=>{const m=[];return new URLSearchParams(a.modelValue).forEach((N,k)=>{N!==""&&m.push(k)}),m}),h=t.computed(()=>{const m=a.config.fields;return Object.keys(m).filter(N=>m[N].searchable).map(N=>({label:m[N].label||N,value:N}))});t.watch(()=>a.modelValue,m=>{i.value={},new URLSearchParams(m).forEach((N,k)=>{i.value[k]=N})});const s=()=>{o.value=!o.value},d=m=>{l("update:modelValue",m)},u=m=>`filter-${m}`,p=m=>{var N,k;return(((k=(N=a.config.schema)==null?void 0:N[m])==null?void 0:k.values)??[]).map(S=>({value:S,label:S}))},n=m=>{var N,k;return((k=(N=a.config.schema)==null?void 0:N[m])==null?void 0:k.type)??"text"},y=m=>{i.value={...i.value,[m]:""},f()},C=()=>{i.value={},f(!0)},f=(m=!1)=>{const N=Object.keys(i.value).reduce((k,S)=>(i.value[S]&&(k[S]=`${i.value[S]}`),k),{});m&&(o.value=!1),l("update:modelValue",new URLSearchParams(N).toString())};return(m,N)=>{const k=t.resolveComponent("KInput"),S=t.resolveComponent("KButton"),F=t.resolveComponent("KSelect"),x=t.resolveComponent("KMenuItem"),H=t.resolveComponent("KMenu");return e.config.isExactMatch?(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":d},{icon:t.withCtx(()=>[t.createVNode(fi)]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",mi,[t.createVNode(S,{appearance:"btn-link","data-testid":"filter-button",icon:"filter",onClick:s},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(c.value.length>0?`(${c.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:s},null,512),[[t.vShow,o.value]]),t.withDirectives(t.createVNode(H,{class:"kong-ui-entity-filter-menu"},{body:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(E,V)=>(t.openBlock(),t.createBlock(x,{key:E.value,"data-testid":E.value,expandable:"","last-menu-item":V===h.value.length-1},{itemTitle:t.withCtx(()=>[t.createElementVNode("span",gi,[t.createTextVNode(t.toDisplayString(E.label)+" ",1),t.withDirectives(t.createElementVNode("span",yi,null,512),[[t.vShow,c.value.includes(E.value)]])])]),itemBody:t.withCtx(()=>{var I,_;return[t.createElementVNode("div",ki,[t.createElementVNode("label",{class:"menu-item-label",for:u(E.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,bi),((_=(I=e.config.schema)==null?void 0:I[E.value])==null?void 0:_.type)==="select"?(t.openBlock(),t.createBlock(F,{key:0,id:u(E.value),modelValue:i.value[E.value],"onUpdate:modelValue":O=>i.value[E.value]=O,appearance:"select",items:p(E.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(k,{key:1,id:u(E.value),modelValue:i.value[E.value],"onUpdate:modelValue":O=>i.value[E.value]=O,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),size:"small",type:n(E.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),t.createElementVNode("div",Ci,[t.createVNode(S,{appearance:"btn-link","data-testid":"apply-filter",size:"small",onClick:N[0]||(N[0]=O=>f(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(S,{appearance:"btn-link","data-testid":"clear-filter",size:"small",onClick:O=>y(E.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:t.withCtx(()=>[t.createVNode(S,{onClick:C},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})]),_:1},512),[[t.vShow,o.value]])]))}}}),[["__scopeId","data-v-745f38c0"]]),se=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const l=e,a=t.ref(void 0),r=t.computed(()=>a.value===!0||a.value!==void 0&&l.forceShow===!0);return t.watch(()=>l.authFunction,async()=>{a.value=await l.authFunction()},{immediate:!0}),(o,i)=>r.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:a.value}):t.createCommentVNode("",!0)}}),wi={class:"form-section-wrapper"},Si={key:0,class:"form-section-title"},xi={key:1,class:"form-section-description"},Ni={key:2,class:"form-section-footer"},Vi={class:"form-section-content"},Ae=le(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const l=t.useSlots();return(a,r)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[t.createElementVNode("div",wi,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createElementBlock("h4",Si,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.description||t.unref(l).description?(t.openBlock(),t.createElementBlock("div",xi,[t.renderSlot(a.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(l).footer?(t.openBlock(),t.createElementBlock("div",Ni,[t.renderSlot(a.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Vi,[t.renderSlot(a.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:Ke,useDeleteUrlBuilder:$a,useErrors:va,useFetchUrlBuilder:Dc,useFetcher:Da,useDebouncedFilter:Ma,useStringHelpers:Mc,useHelpers:Bi,useGatewayFeatureSupported:Kc,useTruncationDetector:jc}=Y,Ii={upstreams:{list:{table_headers:{id:"ID",name:"Name",slots:"Slots",tags:"Tags"},empty_state:{title:"Configure a New Upstream",description:"Upstreams are used to load balance incoming requests."},toolbar_actions:{new_upstream:"New Upstream"}},title:"Upstreams",search:{placeholder:"Filter by exact name or ID"},actions:{create:"New Upstream",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View Details"},delete:{title:"Delete an Upstream",description:"This action cannot be reversed so make sure to check upstream usage before deleting."},errors:{general:"Upstreams could not be retrieved",delete:"The upstream could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{errors:{name_required:"Name is required",should_be_integer:"Field should contain an integer",in_range:"Accepts an integer in the range of 10 - 65536"},general_info:{title:"General Information",help:"General information will help identify and manage this Upstream."},load_balancing:{title:"Load Balancing",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},health_check:{title:"Health Checks & Circuit Breakers",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},active_health_check:{title:"Active Health Checks",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},passive_health_check:{title:"Passive Health Checks",help:"Passive health checks, also known as circuit breakers, are checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},buttons:{view_documentation:"View documentation"},algorithms:{round_robin_label:"Round Robin",least_connections_label:"Least Connections",consistent_hashing_label:"Consistent Hashing",latency_label:"Latency"},hash_labels:{none:"None",consumer:"Consumer",ip:"IP",header:"Header",cookie:"Cookie",path:"Path",query_argument:"Query Argument",uri_capture:"URI Capture"},hash_tooltips:{hash_on_header:{text:"The header name to take the value from as hash input. Only required when {hash_on} is set to {header}",hash_on:"hash_on",header:"header"},hash_on_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_on} is set to {uri_capture}",hash_on:"hash_on",uri_capture:"uri_capture"},hash_on_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_on} is set to {query_arg}",hash_on:"hash_on",query_arg:"query_arg"},hash_on_cookie:{text:"The cookie name to take the value from as hash input. Only required when {hash_on} or {hash_fallback} is set to {cookie}. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},hash_on_cookie_path:{text:"The cookie path to set in the response headers. Only required when {hash_on} or {hash_fallback} is set to {cookie}.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},slots:{text:"The number of slots in the load balancer algorithm. If {algorithm} is set to {round_robin}, this setting determines the maximum number of slots. If {algorithm} is set to {consistent_hashing}, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range {min}-{max}",algorithm:"algorithm",round_robin:"round-robin",consistent_hashing:"consistent-hashing"},tags:"An optional set of strings associated with the Upstream for grouping and filtering.",hash_fallback:{text:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}",hash_on:"hash_on",cookie:"cookie"},hash_fallback_header:{text:"The header name to take the value from as hash input. Only required when {hash_fallback} is set to {header}",hash_fallback:"hash_fallback",header:"header"},hash_fallback_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_fallback} is set to {query_arg}",hash_fallback:"hash_fallback",query_arg:"query_arg"},hash_fallback_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_fallback} is set to {uri_capture}",hash_fallback:"hash_fallback",uri_capture:"uri_capture"},host_header:{text:"The hostname to be used as {host} header when proxying requests through Kong.",host:"Host"},client_certificate:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},healthcheck_type_labels:{http:"HTTP",https:"HTTPS",tcp:"TCP",grsp:"gRPC",grsps:"gRPCs"},healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},passive_healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},passive_unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},fields:{name:{label:"Name",placeholder:"Enter or select a host",tooltip:"This is a hostname, which must be equal to the {host} of a Service.",host:"host"},host_header:{label:"Host Header"},client_certificate:{label:"Client Certificate",placeholder:"Select or enter a Certificate ID",tooltip:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},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 Upstream for grouping and filtering."},algorithm:{label:"Algorithm",tooltip:"Which load balancing algorithm to use."},slots:{label:"Slots",help:"Accepts an integer in the range of 10 - 65536"},hash_on:{label:"Hash on",help:"What to use as hashing input.",tooltip:"What to use as hashing input. Using {result} results in a weighted-round-robin scheme with no hashing."},hash_fallback:{label:"Hash Fallback",help:"What to use as hashing input if the primary hash_on does not return a hash",tooltip:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}.",hash_on:"hash_on",cookie:"cookie"},active_health_checks:{label:"Active Health Checks",help:"Actively probe the targets for their health."},passive_health_checks:{label:"Passive Health Checks / Circuit Breakers",help:"Checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},healthchecks_threshold:{label:"Healthchecks Threshold"},header:{label:"Header"},headers:{label:"Headers",tooltip_active:"Header values can be separated by commas (value1, value2, value3)."},cookie:{label:"Cookie"},cookie_path:{label:"Cookie Path"},query_argument:{label:"Query Argument"},uri_capture:{label:"URI Capture"},active_healthcheck_type:{label:"Active Health Check Type"},http_path:{label:"HTTP Path"},timeout:{label:"Timeout"},concurrency:{label:"Concurrency"},https_sni:{label:"HTTPS SNI"},verify_ssl:{label:"Verify the SSL certificate when performing active health checks using HTTPS"},interval:{label:"Interval",help:"A value of zero indicates that active probes for healthy targets are disabled."},successes:{label:"Successes"},http_statuses:{label:"HTTP Statuses"},http_failures:{label:"HTTP Failures"},tcp_failures:{label:"TCP Failures"},timeouts:{label:"Timeouts"},passive_health_check_type:{label:"Passive Health Check Type"}}},labels:{created_at:"Created at"}},targets:{list:{table_headers:{id:"ID",target_address:"Target Address",weight:"Weight",tags:"Tags"},empty_state:{title:"Configure a New Target",description:"A target is an IP address/hostname with a port that identifies an instance of a backend service."},toolbar_actions:{new_target:"New Target"}},title:"Targets",actions:{create:"New Target",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",mark_healthy:"Mark Healthy",mark_unhealthy:"Mark Unhealthy"},delete:{title:"Delete a Target",description:"This action cannot be reversed so make sure to check target usage before deleting."},errors:{general:"Targets could not be retrieved",delete:"The target could not be deleted at this time.",copy:"Failed to copy to clipboard",weight:"Value must be in range 0 to 65535"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{create:{title:"New Target"},edit:{title:"Edit Target"},buttons:{save:"Save",cancel:"Cancel"},fields:{target:{label:"Target Address",placeholder:"Enter IP/hostname and port",tooltip:"The target address (IP or hostname) and port. If omitted the port defaults to 8000."},weight:{label:"Weight",tooltip:"The weight of this target in relation to other targets in the upstream. Value must be in range 0 to 65535, defaults to 100."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}}}}};function Ti(){const e=Ve.createI18n("en-us",Ii);return{i18n:e,i18nT:Ve.i18nTComponent(e)}}function Fe(e){const{replaceId:l=!1}=e,a=t.ref([]);return{addedItems:a,trackNewItems:(o,i)=>{if(i){const c={...o};l&&(c.value=o.label),a.value.push(c)}else a.value=a.value.filter(c=>c.value!==o.value)}}}const je=[{label:"100",value:"100"},{label:"101",value:"101"},{label:"102",value:"102"},{label:"103",value:"103"},{label:"200",value:"200"},{label:"201",value:"201"},{label:"202",value:"202"},{label:"203",value:"203"},{label:"204",value:"204"},{label:"205",value:"205"},{label:"206",value:"206"},{label:"207",value:"207"},{label:"208",value:"208"},{label:"226",value:"226"},{label:"300",value:"300"},{label:"301",value:"301"},{label:"302",value:"302"},{label:"303",value:"303"},{label:"304",value:"304"},{label:"305",value:"305"},{label:"306",value:"306"},{label:"307",value:"307"},{label:"308",value:"308"},{label:"400",value:"400"},{label:"401",value:"401"},{label:"402",value:"402"},{label:"403",value:"403"},{label:"404",value:"404"},{label:"405",value:"405"},{label:"406",value:"406"},{label:"407",value:"407"},{label:"408",value:"408"},{label:"409",value:"409"},{label:"410",value:"410"},{label:"411",value:"411"},{label:"412",value:"412"},{label:"413",value:"413"},{label:"414",value:"414"},{label:"415",value:"415"},{label:"416",value:"416"},{label:"417",value:"417"},{label:"418",value:"418"},{label:"419",value:"419"},{label:"420",value:"420"},{label:"421",value:"421"},{label:"422",value:"422"},{label:"423",value:"423"},{label:"424",value:"424"},{label:"425",value:"425"},{label:"426",value:"426"},{label:"428",value:"428"},{label:"429",value:"429"},{label:"430",value:"430"},{label:"431",value:"431"},{label:"440",value:"440"},{label:"444",value:"444"},{label:"449",value:"449"},{label:"450",value:"450"},{label:"451",value:"451"},{label:"460",value:"460"},{label:"463",value:"463"},{label:"494",value:"494"},{label:"495",value:"495"},{label:"496",value:"496"},{label:"497",value:"497"},{label:"498",value:"498"},{label:"499",value:"499"},{label:"500",value:"500"},{label:"501",value:"501"},{label:"502",value:"502"},{label:"503",value:"503"},{label:"504",value:"504"},{label:"505",value:"505"},{label:"506",value:"506"},{label:"507",value:"507"},{label:"508",value:"508"},{label:"509",value:"509"},{label:"510",value:"510"},{label:"511",value:"511"},{label:"520",value:"520"},{label:"521",value:"521"},{label:"522",value:"522"},{label:"523",value:"523"},{label:"524",value:"524"},{label:"525",value:"525"},{label:"526",value:"526"},{label:"527",value:"527"},{label:"529",value:"529"},{label:"530",value:"530"},{label:"561",value:"561"},{label:"598",value:"598"},{label:"599",value:"599"}],pt=10,ut=65536,Hi=0,Ei=65535,Ce=0,_e=255,Ka=0,ja=255,Ai=0,Fi=65535,Pa=0,La=65535,Oi=0,qi=2**31,ft=["200","302"],mt=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],gt=["429","404","500","501","502","503","504","505"],yt=["429","500","503"];function Pe(){const e=s=>/^\d+$/.test(s),l=(s,d,u)=>{if(e(s)){const p=Number(s);return p>=d&&p<=u}else return!1},a=s=>s.map(d=>Number(d)),r=s=>s.map(d=>d.toString()),o=()=>({name:"",hostHeader:"",clientCertificate:"",tags:"",algorithm:"round-robin",slots:"10000",hashOn:"none",hashFallback:"none",hashOnHeader:"",hashOnCookie:"",hashOnCookiePath:"/",hashOnQueryArgument:"",hashOnUriCapture:"",hashFallbackHeader:"",hashFallbackQueryArgument:"",hashFallbackUriCapture:"",activeHealthSwitch:!1,passiveHealthSwitch:!1,healthchecksThreshold:"0",activeHealthCheck:{type:"http",httpPath:"/",timeout:"1",concurrency:"10",httpsSni:"",verifySsl:!1,headers:[{key:"",values:""}],interval:"0",successes:"5",httpStatuses:ft,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:gt,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:mt,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:yt,tcpFailures:"5"}});return{isInteger:e,inRange:l,stringToNumberArray:a,numberToStringArray:r,upstreamsResponseToFields:s=>{var u,p,n,y,C,f,m,N,k,S,F,x,H,E,V,I,_,O,q,M,A,$,K,B,U,D,v,w,g,b,j,R,ae,P,W,fe,Oe,Ne,Ja,za,Wa,Qa,Ya,Ga,Za,Xa,el,tl,al,ll,rl,ol,nl,sl,il,cl,dl,hl,pl,ul,fl,ml,gl,yl,kl,bl,Cl,_l,wl,Sl,xl,Nl,Vl,Bl,Il,Tl,Hl,El,Al,Fl,Ol,ql,Ul,$l,vl,Dl,Ml,Kl,jl,Pl,Ll,Rl,Jl,zl,Wl,Ql,Yl,Gl,Zl,Xl,er,tr,ar,lr,rr,or,nr,sr,ir;const d=o();return d.name=s.name||"",d.algorithm=s.algorithm||"round-robin",d.hostHeader=s.host_header||"",d.clientCertificate=s.client_certificate?(u=s.client_certificate)==null?void 0:u.id:"",d.tags=((p=s.tags)==null?void 0:p.join(", "))||"",d.slots=s.slots!==null&&s.slots!==void 0?s.slots.toString():"10000",d.hashOn=s.hash_on||"none",d.hashFallback=s.hash_fallback||"none",d.hashOnHeader=s.hash_on_header||"",d.hashOnCookie=s.hash_on_cookie||"",d.hashOnCookiePath=s.hash_on_cookie_path||"/",d.hashOnQueryArgument=s.hash_on_query_arg||"",d.hashOnUriCapture=s.hash_on_uri_capture||"",d.hashFallbackHeader=s.hash_fallback_header||"",d.hashFallbackQueryArgument=s.hash_fallback_query_arg||"",d.hashFallbackUriCapture=s.hash_fallback_uri_capture||"",d.healthchecksThreshold=s.healthchecks.threshold!==null&&s.healthchecks.threshold!==void 0?s.healthchecks.threshold.toString():"",d.activeHealthSwitch=((y=(n=s.healthchecks.active)==null?void 0:n.healthy)==null?void 0:y.interval)!==0||((f=(C=s.healthchecks.active)==null?void 0:C.unhealthy)==null?void 0:f.interval)!==0,d.activeHealthCheck.type=((m=s.healthchecks.active)==null?void 0:m.type)||"http",d.activeHealthCheck.httpPath=((N=s.healthchecks.active)==null?void 0:N.http_path)||"/",d.activeHealthCheck.timeout=((k=s.healthchecks.active)==null?void 0:k.timeout)!==null&&((S=s.healthchecks.active)==null?void 0:S.timeout)!==void 0?(x=(F=s.healthchecks.active)==null?void 0:F.timeout)==null?void 0:x.toString():"",d.activeHealthCheck.concurrency=((H=s.healthchecks.active)==null?void 0:H.concurrency)!==null&&((E=s.healthchecks.active)==null?void 0:E.concurrency)!==void 0?(I=(V=s.healthchecks.active)==null?void 0:V.concurrency)==null?void 0:I.toString():"",d.activeHealthCheck.httpsSni=((_=s.healthchecks.active)==null?void 0:_.https_sni)||"",d.activeHealthCheck.verifySsl=((O=s.healthchecks.active)==null?void 0:O.https_verify_certificate)||!1,d.activeHealthCheck.headers=(q=s.healthchecks.active)!=null&&q.headers&&Object.entries((M=s.healthchecks.active)==null?void 0:M.headers).length>0?Object.entries((A=s.healthchecks.active)==null?void 0:A.headers).map(([Tc,kt])=>({key:Tc,values:kt==null?void 0:kt.join(", ")})):[{key:"",values:""}],d.activeHealthCheck.interval=((K=($=s.healthchecks.active)==null?void 0:$.healthy)==null?void 0:K.interval)!==null&&((U=(B=s.healthchecks.active)==null?void 0:B.healthy)==null?void 0:U.interval)!==void 0?(w=(v=(D=s.healthchecks.active)==null?void 0:D.healthy)==null?void 0:v.interval)==null?void 0:w.toString():"0",d.activeHealthCheck.interval=((b=(g=s.healthchecks.active)==null?void 0:g.healthy)==null?void 0:b.interval)!==null&&((R=(j=s.healthchecks.active)==null?void 0:j.healthy)==null?void 0:R.interval)!==void 0?(W=(P=(ae=s.healthchecks.active)==null?void 0:ae.healthy)==null?void 0:P.interval)==null?void 0:W.toString():"0",d.activeHealthCheck.successes=((Oe=(fe=s.healthchecks.active)==null?void 0:fe.healthy)==null?void 0:Oe.successes)!==null&&((Ja=(Ne=s.healthchecks.active)==null?void 0:Ne.healthy)==null?void 0:Ja.successes)!==void 0?(Qa=(Wa=(za=s.healthchecks.active)==null?void 0:za.healthy)==null?void 0:Wa.successes)==null?void 0:Qa.toString():"0",d.activeHealthCheck.httpStatuses=(Ga=(Ya=s.healthchecks.active)==null?void 0:Ya.healthy)!=null&&Ga.http_statuses?r(((Xa=(Za=s.healthchecks.active)==null?void 0:Za.healthy)==null?void 0:Xa.http_statuses)||[]):ft,d.activeHealthCheck.unhealthyInterval=((tl=(el=s.healthchecks.active)==null?void 0:el.unhealthy)==null?void 0:tl.interval)!==null&&((ll=(al=s.healthchecks.active)==null?void 0:al.unhealthy)==null?void 0:ll.interval)!==void 0?(nl=(ol=(rl=s.healthchecks.active)==null?void 0:rl.unhealthy)==null?void 0:ol.interval)==null?void 0:nl.toString():"0",d.activeHealthCheck.httpFailures=((il=(sl=s.healthchecks.active)==null?void 0:sl.unhealthy)==null?void 0:il.http_failures)!==null&&((dl=(cl=s.healthchecks.active)==null?void 0:cl.unhealthy)==null?void 0:dl.http_failures)!==void 0?(ul=(pl=(hl=s.healthchecks.active)==null?void 0:hl.unhealthy)==null?void 0:pl.http_failures)==null?void 0:ul.toString():"0",d.activeHealthCheck.unhealthyTimeouts=((ml=(fl=s.healthchecks.active)==null?void 0:fl.unhealthy)==null?void 0:ml.timeouts)!==null&&((yl=(gl=s.healthchecks.active)==null?void 0:gl.unhealthy)==null?void 0:yl.timeouts)!==void 0?(Cl=(bl=(kl=s.healthchecks.active)==null?void 0:kl.unhealthy)==null?void 0:bl.timeouts)==null?void 0:Cl.toString():"0",d.activeHealthCheck.unhealthyHttpStatuses=(wl=(_l=s.healthchecks.active)==null?void 0:_l.unhealthy)!=null&&wl.http_statuses?r(((xl=(Sl=s.healthchecks.active)==null?void 0:Sl.unhealthy)==null?void 0:xl.http_statuses)||[]):gt,d.passiveHealthSwitch=((Vl=(Nl=s.healthchecks.passive)==null?void 0:Nl.healthy)==null?void 0:Vl.successes)!==0||((Il=(Bl=s.healthchecks.passive)==null?void 0:Bl.unhealthy)==null?void 0:Il.timeouts)!==0||((Hl=(Tl=s.healthchecks.passive)==null?void 0:Tl.unhealthy)==null?void 0:Hl.tcp_failures)!==0||((Al=(El=s.healthchecks.passive)==null?void 0:El.unhealthy)==null?void 0:Al.http_failures)!==0,d.passiveHealthCheck.type=((Fl=s.healthchecks.passive)==null?void 0:Fl.type)||"http",d.passiveHealthCheck.successes=((ql=(Ol=s.healthchecks.passive)==null?void 0:Ol.healthy)==null?void 0:ql.successes)!==null&&(($l=(Ul=s.healthchecks.passive)==null?void 0:Ul.healthy)==null?void 0:$l.successes)!==void 0?(Ml=(Dl=(vl=s.healthchecks.passive)==null?void 0:vl.healthy)==null?void 0:Dl.successes)==null?void 0:Ml.toString():"0",d.passiveHealthCheck.httpStatuses=(jl=(Kl=s.healthchecks.passive)==null?void 0:Kl.healthy)!=null&&jl.http_statuses?r(((Ll=(Pl=s.healthchecks.passive)==null?void 0:Pl.healthy)==null?void 0:Ll.http_statuses)||[]):mt,d.passiveHealthCheck.timeouts=((Jl=(Rl=s.healthchecks.passive)==null?void 0:Rl.unhealthy)==null?void 0:Jl.timeouts)!==null&&((Wl=(zl=s.healthchecks.passive)==null?void 0:zl.unhealthy)==null?void 0:Wl.timeouts)!==void 0?(Gl=(Yl=(Ql=s.healthchecks.passive)==null?void 0:Ql.unhealthy)==null?void 0:Yl.timeouts)==null?void 0:Gl.toString():"0",d.passiveHealthCheck.tcpFailures=((Xl=(Zl=s.healthchecks.passive)==null?void 0:Zl.unhealthy)==null?void 0:Xl.tcp_failures)!==null&&((tr=(er=s.healthchecks.passive)==null?void 0:er.unhealthy)==null?void 0:tr.tcp_failures)!==void 0?(rr=(lr=(ar=s.healthchecks.passive)==null?void 0:ar.unhealthy)==null?void 0:lr.tcp_failures)==null?void 0:rr.toString():"",d.passiveHealthCheck.unhealthyHttpStatuses=(nr=(or=s.healthchecks.passive)==null?void 0:or.unhealthy)!=null&&nr.http_statuses?r(((ir=(sr=s.healthchecks.passive)==null?void 0:sr.unhealthy)==null?void 0:ir.http_statuses)||[]):yt,d},getDefaultUpstreamFields:o,objectsAreEqual:(s,d)=>{try{return JSON.stringify(s)===JSON.stringify(d)}catch{return!1}},cloneDeep:s=>JSON.parse(JSON.stringify(s))}}const ie={useI18n:Ti,useMultiselectCreation:Fe,useHelpers:Pe},we="/api/runtime_groups/{controlPlaneId}",Se="/{workspace}",xe={list:{konnect:`${we}/upstreams`,kongManager:`${Se}/upstreams`},form:{konnect:{getServices:`${we}/services`,getCertificates:`${we}/certificates`,validate:`${we}/v1/schemas/json/upstream/validate`,create:`${we}/upstreams`,edit:`${we}/upstreams/{id}`},kongManager:{getServices:`${Se}/services`,getCertificates:`${Se}/certificates`,validate:`${Se}/schemas/upstreams/validate`,create:`${Se}/upstreams`,edit:`${Se}/upstreams/{id}`}}},Rc="",Ui={class:"kong-ui-entities-upstreams-list"},$i={class:"upstream-name"},vi=t.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},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}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:l}){var K;const a=e,{i18n:{t:r}}=ie.useI18n(),o=Je.useRouter(),{axiosInstance:i}=Ke({headers:(K=a.config)==null?void 0:K.requestHeaders}),c=t.ref(1),h=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),s={name:{label:r("upstreams.list.table_headers.name"),searchable:!0,sortable:!0},slots:{label:r("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:r("upstreams.list.table_headers.tags"),sortable:!1}},d=s,u=t.computed(()=>{var U,D;let B=`${a.config.apiBaseUrl}${xe.list[a.config.app]}`;return a.config.app==="konnect"?B=B.replace(/{controlPlaneId}/gi,((U=a.config)==null?void 0:U.controlPlaneId)||""):a.config.app==="kongManager"&&(B=B.replace(/\/{workspace}/gi,(D=a.config)!=null&&D.workspace?`/${a.config.workspace}`:"")),B}),p=t.ref(""),n=t.computed(()=>{const B=a.config.app==="konnect"||a.config.isExactMatch;if(B)return{isExactMatch:B,placeholder:r("upstreams.search.placeholder")};const{name:U,slots:D}=s;return{isExactMatch:B,fields:{name:U,slots:D},schema:a.config.filterSchema}}),{fetcher:y,fetcherState:C}=Da(a.config,u.value),f=()=>{p.value=""},m=()=>{c.value++},N=t.ref(""),k=(B,U)=>{const D=B.id;if(!U(D)){l("copy:error",{entity:B,field:"id",message:r("upstreams.errors.copy")});return}l("copy:success",{entity:B,field:"id",message:r("upstreams.copy.success",{val:D})})},S=(B,U)=>{const D=JSON.stringify(B);if(!U(D)){l("copy:error",{entity:B,message:r("upstreams.errors.copy")});return}l("copy:success",{entity:B,message:r("upstreams.copy.success_brief")})},F=async B=>{var D;await((D=a.canRetrieve)==null?void 0:D.call(a,B))&&o.push(a.config.getViewRoute(B.id))},x=B=>({label:r("upstreams.actions.view"),to:a.config.getViewRoute(B)}),H=B=>({label:r("upstreams.actions.edit"),to:a.config.getEditRoute(B)}),E=t.ref(void 0),V=t.ref(!1),I=t.ref(!1),_=t.ref(""),O=$a(a.config,u.value),q=B=>{E.value=B,V.value=!0},M=()=>{V.value=!1},A=async()=>{var B,U,D;if((B=E.value)!=null&&B.id){I.value=!0;try{await i.delete(O(E.value.id)),I.value=!1,V.value=!1,c.value++,l("delete:success",E.value)}catch(v){_.value=((D=(U=v.response)==null?void 0:U.data)==null?void 0:D.message)||v.message||r("upstreams.errors.delete"),l("error",v)}finally{I.value=!1}}};t.watch(C,B=>{if(B.status===de.Error){N.value=r("upstreams.errors.general"),l("error",B.error);return}N.value=""});const $=t.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:r("upstreams.list.empty_state.description"),title:r("upstreams.title")});return t.onBeforeMount(async()=>{await a.canCreate()&&($.value.title=r("upstreams.list.empty_state.title"),$.value.ctaText=r("upstreams.actions.create"))}),(B,U)=>{const D=t.resolveComponent("KButton"),v=t.resolveComponent("KBadge"),w=t.resolveComponent("KTruncate"),g=t.resolveComponent("KDropdownItem"),b=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Ui,[t.createVNode(t.unref(qa),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":h.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":N.value,fetcher:t.unref(y),"fetcher-cache-key":c.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:p.value,"table-headers":t.unref(d),onClearSearchInput:f,"onClick:row":U[1]||(U[1]=j=>F(j)),onSort:m},{"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(_i),{modelValue:p.value,"onUpdate:modelValue":U[0]||(U[0]=j=>p.value=j),config:n.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(D,{appearance:"primary","data-testid":"toolbar-add-upstream",icon:"plus",to:e.config.createRoute},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:t.withCtx(({rowValue:j})=>[t.createElementVNode("span",$i,t.toDisplayString(j),1)]),tags:t.withCtx(({rowValue:j})=>[t.createVNode(w,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j,R=>(t.openBlock(),t.createBlock(v,{key:R,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(R),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:j})=>[t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-id",onClick:ae=>k(j,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-json",onClick:ae=>S(j,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canRetrieve(j)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-view","has-divider":"",item:x(j.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(j)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-edit",item:H(j.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(j)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:R=>q(j)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),t.createVNode(t.unref(Ua),{"action-pending":I.value,description:t.unref(r)("upstreams.delete.description"),"entity-name":E.value&&(E.value.name||E.value.id),"entity-type":t.unref(ze).Upstream,error:_.value,title:t.unref(r)("upstreams.delete.title"),visible:V.value,onCancel:M,onProceed:A},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Jc="",ce=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Di=ce(vi,[["__scopeId","data-v-033bd1ef"]]),Le={list:{konnect:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",kongManager:"/{workspace}/upstreams/{upstreamId}/targets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",edit:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/target/validate"},kongManager:{create:"/{workspace}/upstreams/{upstreamId}/targets",edit:"/{workspace}/upstreams/{upstreamId}/targets/{id}",validate:"/{workspace}/schemas/targets/validate"}}},Mi={class:"kong-ui-entities-target-form"},Ki={class:"target-form-container"},ji={key:0,class:"target-form-info"},Pi=t.defineComponent({__name:"TargetForm",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.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(e,{emit:l}){var F;const a=e;t.useCssVars(x=>({"2cc5362c":S.value}));const{i18n:{t:r}}=ie.useI18n(),{getMessageFromError:o}=va(),{axiosInstance:i}=Ke({headers:(F=a.config)==null?void 0:F.requestHeaders}),c=t.computed(()=>{var x;return Le.form[a.config.app].edit.replace(/{upstreamId}/gi,((x=a.config)==null?void 0:x.upstreamId)||"")}),h=t.computed(()=>a.targetId?re.Edit:re.Create),s=t.computed(()=>h.value===re.Edit?r("targets.form.edit.title"):r("targets.form.create.title")),d=t.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),u=t.reactive({target:"",weight:100,tags:""}),p={target:"",weight:100,tags:""},n=t.computed(()=>{const x=parseInt(d.fields.weight.toString(),10);return x<0||x>65535}),y=t.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(u)&&!!d.fields.target&&!!d.fields.weight&&!n.value),C=x=>{var H;d.fields.target=(x==null?void 0:x.target)||"",d.fields.weight=(x==null?void 0:x.weight)??"",d.fields.tags=((H=x==null?void 0:x.tags)==null?void 0:H.join(", "))||"",Object.assign(u,d.fields)},f=()=>{d.errorMessage="",l("cancel")},m=t.computed(()=>{var H,E;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app].validate}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((H=a.config)==null?void 0:H.controlPlaneId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(E=a.config)!=null&&E.workspace?`/${a.config.workspace}`:"")),x=x.replace(/{id}/gi,a.targetId),x}),N=t.computed(()=>{var H,E,V,I;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app][h.value]}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((H=a.config)==null?void 0:H.controlPlaneId)||"").replace(/{upstreamId}/gi,((E=a.config)==null?void 0:E.upstreamId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(V=a.config)!=null&&V.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((I=a.config)==null?void 0:I.upstreamId)||"")),x=x.replace(/{id}/gi,a.targetId),x}),k=async()=>{var x,H,E,V,I;try{d.isReadonly=!0,d.errorMessage="";const _={target:d.fields.target,weight:parseInt(d.fields.weight),tags:(E=(H=(x=d.fields.tags)==null?void 0:x.split(","))==null?void 0:H.map(q=>String(q||"").trim()))==null?void 0:E.filter(q=>q!==""),upstream:{id:a.config.upstreamId}};let O;if(await i.post(m.value,_),h.value==="create"?O=await i.post(N.value,_):h.value==="edit"&&(O=((V=a.config)==null?void 0:V.app)==="konnect"?await i.put(N.value,_):await i.patch(N.value,_)),O){const{data:q}=O;d.fields.target=(q==null?void 0:q.name)||"",d.fields.weight=(q==null?void 0:q.weight)??100,d.fields.tags=((I=q==null?void 0:q.tags)==null?void 0:I.join(", "))||"",l("update",q),Object.assign(d.fields,p)}}catch(_){d.errorMessage=o(_),l("error",_)}finally{d.isReadonly=!1}},S=t.computed(()=>d.isReadonly?"inline-flex":"none");return t.watch(()=>a.targetId,()=>{Object.assign(d.fields,p)}),(x,H)=>{const E=t.resolveComponent("KInput"),V=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(V,{"action-button-text":t.unref(r)("targets.form.buttons.save"),"action-pending":!y.value||d.isReadonly,"cancel-button-text":t.unref(r)("targets.form.buttons.cancel"),"is-visible":e.isVisible,title:s.value,onCanceled:f,onProceed:k},{"body-content":t.withCtx(()=>[t.createElementVNode("div",Mi,[t.createVNode(t.unref(Oa),{config:e.config,"edit-id":e.targetId,"error-message":d.errorMessage,"fetch-url":c.value,"is-readonly":d.isReadonly,onCancel:f,"onFetch:error":H[3]||(H[3]=I=>x.$emit("error",I)),"onFetch:success":C,onLoading:H[4]||(H[4]=I=>x.$emit("loading",I))},{default:t.withCtx(()=>[t.createElementVNode("div",Ki,[x.$slots.info?(t.openBlock(),t.createElementBlock("div",ji,[t.renderSlot(x.$slots,"info",{},void 0,!0)])):t.createCommentVNode("",!0),t.createVNode(E,{modelValue:d.fields.target,"onUpdate:modelValue":H[0]||(H[0]=I=>d.fields.target=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:t.unref(r)("targets.form.fields.target.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.target.tooltip")},placeholder:t.unref(r)("targets.form.fields.target.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),t.createVNode(E,{modelValue:d.fields.weight,"onUpdate:modelValue":H[1]||(H[1]=I=>d.fields.weight=I),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight","error-message":t.unref(r)("targets.errors.weight"),"has-error":n.value,label:t.unref(r)("targets.form.fields.weight.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.weight.tooltip")},max:"65535",min:"0",readonly:d.isReadonly,required:"",type:"number"},null,8,["modelValue","error-message","has-error","label","label-attributes","readonly"]),t.createVNode(E,{modelValue:d.fields.tags,"onUpdate:modelValue":H[2]||(H[2]=I=>d.fields.tags=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:t.unref(r)("targets.form.fields.tags.help"),label:t.unref(r)("targets.form.fields.tags.label"),placeholder:t.unref(r)("targets.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","error-message","fetch-url","is-readonly"])])]),_:3},8,["action-button-text","action-pending","cancel-button-text","is-visible","title"])}}}),zc="",Ra=ce(Pi,[["__scopeId","data-v-77134304"]]),Li={class:"kong-ui-entities-targets-list"},Ri={class:"target-address"},Ji=t.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.upstreamId||e.app==="kongManager"&&(typeof e.canMarkHealthy>"u"||typeof e.canMarkUnhealthy>"u"))},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}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(e,{emit:l}){var D;const a=e,{i18n:{t:r}}=ie.useI18n(),{axiosInstance:o}=Ke({headers:(D=a.config)==null?void 0:D.requestHeaders}),i=t.ref(1),c=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),s={target:{label:r("targets.list.table_headers.target_address"),sortable:!0},weight:{label:r("targets.list.table_headers.weight"),sortable:!0},tags:{label:r("targets.list.table_headers.tags"),sortable:!1}},d=t.computed(()=>{var w,g,b,j;let v=`${a.config.apiBaseUrl}${Le.list[a.config.app]}`;return a.config.app==="konnect"?v=v.replace(/{controlPlaneId}/gi,((w=a.config)==null?void 0:w.controlPlaneId)||"").replace(/{upstreamId}/gi,((g=a.config)==null?void 0:g.upstreamId)||""):a.config.app==="kongManager"&&(v=v.replace(/\/{workspace}/gi,(b=a.config)!=null&&b.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((j=a.config)==null?void 0:j.upstreamId)||"")),v}),{fetcher:u,fetcherState:p}=Da(a.config,d.value),n=()=>{i.value++},y=t.ref(""),C=()=>{$.value=!0},f=(v,w)=>{const g=v.id;if(!w(g)){l("copy:error",{entity:v,field:"id",message:r("targets.errors.copy")});return}l("copy:success",{entity:v,field:"id",message:r("targets.copy.success",{val:g})})},m=(v,w)=>{const g=JSON.stringify(v);if(!w(g)){l("copy:error",{entity:v,message:r("targets.errors.copy")});return}l("copy:success",{entity:v,message:r("targets.copy.success_brief")})},N=v=>{A.value=v,$.value=!0},k=v=>a.config.app==="konnect"?!1:a.config.canMarkHealthy(v),S=v=>a.config.app==="konnect"?!1:a.config.canMarkUnhealthy(v),F=t.ref(void 0),x=t.ref(!1),H=t.ref(!1),E=t.ref(""),V=$a(a.config,d.value),I=v=>{F.value=v,x.value=!0},_=()=>{x.value=!1},O=async()=>{var v,w,g;if((v=F.value)!=null&&v.id){H.value=!0;try{await o.delete(V(F.value.id)),H.value=!1,x.value=!1,i.value++,l("delete:success",F.value)}catch(b){E.value=((g=(w=b.response)==null?void 0:w.data)==null?void 0:g.message)||b.message||r("targets.errors.delete"),l("error",b)}finally{H.value=!1}}};t.watch(p,v=>{if(v.status===de.Error){y.value=r("targets.errors.general"),l("error",v.error);return}y.value=""});const q=t.ref({ctaText:void 0,message:r("targets.list.empty_state.description"),title:r("targets.title"),...a.config.createRoute&&{ctaPath:a.config.createRoute}});t.onBeforeMount(async()=>{await a.canCreate()&&(q.value.title=r("targets.list.empty_state.title"),q.value.ctaText=r("targets.actions.create"))});const M=t.computed(()=>({app:a.config.app,apiBaseUrl:a.config.apiBaseUrl,upstreamId:a.config.upstreamId,...a.config.app==="konnect"&&{controlPlaneId:a.config.controlPlaneId},...a.config.app==="kongManager"&&{workspace:a.config.workspace,requestHeaders:a.config.requestHeaders}})),A=t.ref(""),$=t.ref(!1),K=v=>{A.value?l("update:target",v):l("create:target",v),B()},B=()=>{U(),i.value++},U=()=>{$.value=!1,A.value=""};return(v,w)=>{const g=t.resolveComponent("KButton"),b=t.resolveComponent("KBadge"),j=t.resolveComponent("KTruncate"),R=t.resolveComponent("KDropdownItem"),ae=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Li,[t.createVNode(t.unref(qa),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":c.value,"empty-state-options":q.value,"enable-entity-actions":"","error-message":y.value,fetcher:t.unref(u),"fetcher-cache-key":i.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":t.unref(s),onEmptyStateCtaClicked:w[1]||(w[1]=()=>a.config.createRoute?void 0:C()),onSort:n},{"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(g,{appearance:"primary","data-testid":"toolbar-new-target",icon:"plus",to:a.config.createRoute?a.config.createRoute:void 0,onClick:w[0]||(w[0]=()=>a.config.createRoute?void 0:C())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),target:t.withCtx(({rowValue:P})=>[t.createElementVNode("span",Ri,t.toDisplayString(P),1)]),tags:t.withCtx(({rowValue:P})=>[t.createVNode(j,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P,W=>(t.openBlock(),t.createBlock(b,{key:W,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(W),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:P})=>[t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:fe=>f(P,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:fe=>m(P,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-edit","has-divider":"",onClick:W=>N(P.id)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>k(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-healthy",onClick:W=>l("health-actions:healthy",P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>S(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-unhealthy",onClick:W=>l("health-actions:unhealthy",P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:W=>I(P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),t.createVNode(t.unref(Ua),{"action-pending":H.value,description:t.unref(r)("targets.delete.description"),"entity-type":t.unref(ze).Target,error:E.value,"need-confirm":!1,title:t.unref(r)("targets.delete.title"),visible:x.value,onCancel:_,onProceed:O},null,8,["action-pending","description","entity-type","error","title","visible"]),t.createVNode(Ra,{config:M.value,"is-visible":$.value,"target-id":A.value,onCancel:U,onUpdate:K},t.createSlots({_:2},[v.$slots["form-info"]?{name:"info",fn:t.withCtx(()=>[t.renderSlot(v.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),Wc="",zi=ce(Ji,[["__scopeId","data-v-aba40390"]]),Wi={key:1},Qi=t.defineComponent({__name:"UpstreamsFormGeneralInfo",props:{config:{type:Object,required:!0},name:{type:String,required:!0},hostHeader:{type:String,required:!0},clientCertificate:{type:String,required:!0},tags:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:name","update:host-header","update:client-certificate","update:tags"],setup(e,{emit:l}){var _,O,q,M;const a=e,{i18nT:r,i18n:{t:o}}=ie.useI18n(),{debouncedQueryChange:i,loading:c,loadItems:h,results:s,allRecords:d}=Ma(a.config,(O=xe.form[(_=a.config)==null?void 0:_.app])==null?void 0:O.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:u,loading:p,loadItems:n,results:y}=Ma(a.config,(M=xe.form[(q=a.config)==null?void 0:q.app])==null?void 0:M.getCertificates),C=t.ref(""),f=t.computed(()=>{var A;return!!a.name&&!((A=d.value)!=null&&A.some($=>$.host===a.name))}),m=t.computed(()=>{var $,K,B;const A=f.value&&a.name.includes(($=C.value)==null?void 0:$.toLowerCase());return(B=s.value)==null?void 0:B.map(U=>({label:U.host,value:U.id})).concat(A?[{label:a.name,value:((K=S.value)==null?void 0:K.value)||a.name}]:[])}),N=t.computed(()=>{var A;return(A=y.value)==null?void 0:A.map($=>({label:$.id,value:$.id}))}),k=t.ref(""),S=t.ref({value:"",label:""}),F=t.computed(()=>{var A,$;return((A=m.value.find(K=>K.value===k.value))==null?void 0:A.label)||(($=S.value)==null?void 0:$.label)}),x=A=>{C.value=A,i(A)},H=A=>{S.value=A},E=()=>{S.value={value:"",label:""}},V=A=>{k.value=A,l("update:name",F.value)},I=t.ref(!1);return t.onBeforeMount(async()=>{var A,$;try{I.value=!0,await h(),a.name&&(k.value=(($=(A=m.value.find(K=>K.label===a.name))==null?void 0:A.value)==null?void 0:$.toString())||a.name),await n()}finally{I.value=!1}}),(A,$)=>{const K=t.resolveComponent("KSkeleton"),B=t.resolveComponent("KSelect"),U=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-general-info",description:t.unref(o)("upstreams.form.general_info.help"),title:t.unref(o)("upstreams.form.general_info.title")},{default:t.withCtx(()=>[I.value?(t.openBlock(),t.createBlock(K,{key:0,type:"form"})):(t.openBlock(),t.createElementBlock("div",Wi,[t.createVNode(B,{appearance:"select",autosuggest:"",class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"",items:m.value,label:t.unref(o)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},loading:t.unref(c),"model-value":k.value,placeholder:t.unref(o)("upstreams.form.fields.name.placeholder"),readonly:e.readonly,required:"",width:"100%","onItem:added":H,"onItem:removed":E,onQueryChange:x,"onUpdate:modelValue":V},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),t.createVNode(U,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:t.unref(o)("upstreams.form.fields.host_header.label"),"model-value":e.hostHeader,readonly:e.readonly,type:"text","onUpdate:modelValue":$[0]||($[0]=D=>l("update:host-header",D))},null,8,["label","model-value","readonly"]),t.createVNode(B,{appearance:"select",autosuggest:"",class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"",items:N.value,label:t.unref(o)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:t.unref(o)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"250px"}},loading:t.unref(p),"model-value":e.clientCertificate,placeholder:t.unref(o)("upstreams.form.fields.client_certificate.placeholder"),readonly:e.readonly,width:"100%",onQueryChange:t.unref(u),"onUpdate:modelValue":$[1]||($[1]=D=>l("update:client-certificate",D))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),t.createVNode(U,{autocomplete:"off","data-testid":"upstreams-form-tags",help:t.unref(o)("upstreams.form.fields.tags.help"),label:t.unref(o)("upstreams.form.fields.tags.label"),"label-attributes":{info:t.unref(o)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250px"}},"model-value":e.tags,placeholder:t.unref(o)("upstreams.form.fields.tags.placeholder"),readonly:e.readonly,type:"text","onUpdate:modelValue":$[2]||($[2]=D=>l("update:tags",D))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),Qc="",Yi=ce(Qi,[["__scopeId","data-v-02065a3d"]]),Re={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},Gi={class:"fields-group-title"},Zi={class:"fields-group-text"},Xi={class:"fields-group-title"},ec={class:"fields-group-text"},tc=t.defineComponent({__name:"UpstreamsFormLoadBalancing",props:{algorithm:{type:String,required:!0},slots:{type:String,required:!0},hashOn:{type:String,required:!0},hashFallback:{type:String,required:!0},hashOnHeader:{type:String,required:!0},hashOnCookie:{type:String,required:!0},hashOnCookiePath:{type:String,required:!0},hashOnQueryArgument:{type:String,required:!0},hashOnUriCapture:{type:String,required:!0},hashFallbackHeader:{type:String,required:!0},hashFallbackQueryArgument:{type:String,required:!0},hashFallbackUriCapture:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:algorithm","update:slots","update:hash-on","update:hash-fallback","update:hash-on-header","update:hash-on-cookie","update:hash-on-cookie-path","update:hash-on-query-argument","update:hash-on-uri-capture","update:hash-fallback-header","update:hash-fallback-query-argument","update:hash-fallback-uri-capture"],setup(e,{emit:l}){const a=e,{i18nT:r,i18n:{t:o}}=ie.useI18n(),{inRange:i}=Pe(),c=t.ref([{label:o("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:o("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:o("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:o("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),h=t.ref([{label:o("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:o("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:o("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:o("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:o("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:o("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:o("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:o("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);t.watch(()=>a.hashOn,(u,p)=>{p==="header"&&u!==p&&l("update:hash-on-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-on-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-on-uri-capture",""),(u==="cookie"||u==="none")&&(l("update:hash-fallback","none"),l("update:hash-fallback-header",""),l("update:hash-fallback-query-argument",""),l("update:hash-fallback-uri-capture",""))}),t.watch(()=>a.hashFallback,(u,p)=>{p==="header"&&u!==p&&l("update:hash-fallback-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-fallback-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-fallback-uri-capture","")});const s=t.computed(()=>a.hashOn==="cookie"||a.hashOn==="none"),d=t.computed(()=>a.slots?i(a.slots,pt,ut)?"":o("upstreams.form.errors.in_range"):"");return(u,p)=>{const n=t.resolveComponent("KExternalLink"),y=t.resolveComponent("KSelect"),C=t.resolveComponent("KInput"),f=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-load-balancing",title:t.unref(o)("upstreams.form.load_balancing.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(o)("upstreams.form.load_balancing.help"))+" ",1),t.createVNode(n,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(y,{appearance:"select",class:"algorithm-select",items:c.value,label:t.unref(o)("upstreams.form.fields.algorithm.label"),"model-value":e.algorithm,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[0]||(p[0]=m=>l("update:algorithm",m))},null,8,["items","label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off","data-testid":"upstreams-form-slots","error-message":d.value,"has-error":!!d.value,help:t.unref(o)("upstreams.form.fields.slots.help"),label:t.unref(o)("upstreams.form.fields.slots.label"),max:t.unref(ut),min:t.unref(pt),"model-value":e.slots,readonly:e.readonly,type:"number","onUpdate:modelValue":p[1]||(p[1]=m=>l("update:slots",m))},null,8,["error-message","has-error","help","label","max","min","model-value","readonly"]),t.createVNode(f,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Gi,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_on.label")),1),t.createElementVNode("p",Zi,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_on.help")),1),t.createVNode(y,{appearance:"select",class:"hash-on-select",items:h.value,label:t.unref(o)("upstreams.form.fields.hash_on.label"),"model-value":e.hashOn,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[2]||(p[2]=m=>l("update:hash-on",m))},null,8,["items","label","model-value","readonly"]),e.hashOn==="header"?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:t.unref(o)("upstreams.form.fields.header.label"),"model-value":e.hashOnHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[3]||(p[3]=m=>l("update:hash-on-header",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(o)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[4]||(p[4]=m=>l("update:hash-on-cookie",m))},null,8,["label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(o)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[5]||(p[5]=m=>l("update:hash-on-cookie-path",m))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashOn==="query_arg"?(t.openBlock(),t.createBlock(C,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:t.unref(o)("upstreams.form.fields.query_argument.label"),"model-value":e.hashOnQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[6]||(p[6]=m=>l("update:hash-on-query-argument",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="uri_capture"?(t.openBlock(),t.createBlock(C,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:t.unref(o)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashOnUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[7]||(p[7]=m=>l("update:hash-on-uri-capture",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1}),t.createVNode(f,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Xi,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.label")),1),t.createElementVNode("p",ec,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.help")),1),t.createVNode(y,{appearance:"select",class:"hash-fallback-select",disabled:s.value,items:h.value,label:t.unref(o)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},"model-value":e.hashFallback,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[8]||(p[8]=m=>l("update:hash-fallback",m))},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),e.hashFallback==="header"?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:t.unref(o)("upstreams.form.fields.header.label"),"model-value":e.hashFallbackHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[9]||(p[9]=m=>l("update:hash-fallback-header",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(o)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[10]||(p[10]=m=>l("update:hash-on-cookie",m))},null,8,["label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(o)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[11]||(p[11]=m=>l("update:hash-on-cookie-path",m))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashFallback==="query_arg"?(t.openBlock(),t.createBlock(C,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:t.unref(o)("upstreams.form.fields.query_argument.label"),"model-value":e.hashFallbackQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[12]||(p[12]=m=>l("update:hash-fallback-query-argument",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="uri_capture"?(t.openBlock(),t.createBlock(C,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:t.unref(o)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashFallbackUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[13]||(p[13]=m=>l("update:hash-fallback-uri-capture",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),Yc="",ac=ce(tc,[["__scopeId","data-v-522adce0"]]),lc={class:"fields-group-title"},rc={class:"fields-group-text"},oc={class:"fields-group-title"},nc={class:"fields-group-text"},sc=t.defineComponent({__name:"UpstreamsFormHealthChecks",props:{activeHealthSwitch:{type:Boolean,required:!0},passiveHealthSwitch:{type:Boolean,required:!0},healthchecksThreshold:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:active-health-switch","update:passive-health-switch","update:healthchecks-threshold"],setup(e,{emit:l}){const{i18n:{t:a}}=ie.useI18n();return(r,o)=>{const i=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KInputSwitch"),h=t.resolveComponent("KCard"),s=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-healthchecks",title:t.unref(a)("upstreams.form.health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.health_check.help"))+" ",1),t.createVNode(i,{"hide-icon":"",href:t.unref(Re).loadBalancing},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",lc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.label")),1),t.createElementVNode("p",rc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.help")),1),t.createVNode(c,{class:"active-health-switch","data-testid":"active-health-switch",disabled:e.readonly,"model-value":e.activeHealthSwitch,onChange:o[0]||(o[0]=d=>l("update:active-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",oc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.label")),1),t.createElementVNode("p",nc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.help")),1),t.createVNode(c,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:e.readonly,"model-value":e.passiveHealthSwitch,onChange:o[1]||(o[1]=d=>l("update:passive-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(s,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:t.unref(a)("upstreams.form.fields.healthchecks_threshold.label"),max:t.unref(Ei),min:t.unref(Hi),"model-value":e.healthchecksThreshold,readonly:e.readonly,type:"number","onUpdate:modelValue":o[2]||(o[2]=d=>l("update:healthchecks-threshold",d))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),Gc="",ic=ce(sc,[["__scopeId","data-v-7fda4841"]]),cc={key:2},dc={class:"fields-group-title"},hc={class:"fields-group-text"},pc={class:"fields-group-title"},uc={class:"fields-group-text"},fc=t.defineComponent({__name:"UpstreamsFormActiveHealthCheck",props:{config:{type:Object,required:!0},type:{type:String,required:!0},httpPath:{type:String,required:!0},timeout:{type:String,required:!0},concurrency:{type:String,required:!0},httpsSni:{type:String,required:!0},verifySsl:{type:Boolean,required:!0},headers:{type:Array,required:!0},interval:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},unhealthyInterval:{type:String,required:!0},httpFailures:{type:String,required:!0},tcpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:http-path","update:timeout","update:concurrency","update:https-sni","update:verify-ssl","update:headers","update:interval","update:successes","update:http-statuses","update:unhealthy-interval","update:http-failures","update:tcp-failures","update:unhealthy-http-statuses","update:unhealthy-timeouts"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),{objectsAreEqual:o}=Pe(),i=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),c=t.computed(()=>a.type==="https"||a.type==="grpcs"),h=t.computed(()=>a.type==="tcp"),{trackNewItems:s}=Fe({replaceId:!0}),{trackNewItems:d}=Fe({replaceId:!0});t.watch(()=>a.type,(C,f)=>{f==="tcp"&&C!==f&&l("update:tcp-failures","5"),(f==="https"||f==="grpcs")&&C!==f&&(l("update:https-sni",""),l("update:verify-ssl",!1)),f!=="tcp"&&C==="tcp"&&(l("update:http-path","/"),l("update:http-statuses",ft),l("update:unhealthy-http-statuses",gt))});const u=t.ref([{key:"",values:""}]);t.watch(()=>a.headers,C=>{o(u.value,C)||(u.value=[...C])},{immediate:!0,deep:!0});const p=()=>{l("update:headers",u.value)},n=()=>{u.value.push({key:"",values:""}),p()},y=C=>{C===0&&u.value.length===1?u.value[0]={key:"",values:""}:u.value.splice(C,1),p()};return(C,f)=>{const m=t.resolveComponent("KExternalLink"),N=t.resolveComponent("KSelect"),k=t.resolveComponent("KInput"),S=t.resolveComponent("KCheckbox"),F=t.resolveComponent("KLabel"),x=t.resolveComponent("KIcon"),H=t.resolveComponent("KButton"),E=t.resolveComponent("KMultiselect"),V=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-active-healthcheck",title:t.unref(r)("upstreams.form.active_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.active_health_check.help"))+" ",1),t.createVNode(m,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>{var I;return[t.createVNode(N,{appearance:"select",class:"active-healthcheck-type-select",items:i.value,label:t.unref(r)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":f[0]||(f[0]=_=>l("update:type",_))},null,8,["items","label","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:t.unref(r)("upstreams.form.fields.http_path.label"),"model-value":e.httpPath,readonly:e.readonly,type:"text","onUpdate:modelValue":f[1]||(f[1]=_=>l("update:http-path",_))},null,8,["label","model-value","readonly"])),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:t.unref(r)("upstreams.form.fields.timeout.label"),max:t.unref(Fi),min:t.unref(Ai),"model-value":e.timeout,readonly:e.readonly,type:"number","onUpdate:modelValue":f[2]||(f[2]=_=>l("update:timeout",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:t.unref(r)("upstreams.form.fields.concurrency.label"),max:t.unref(qi),min:t.unref(Oi),"model-value":e.concurrency,readonly:e.readonly,type:"number","onUpdate:modelValue":f[3]||(f[3]=_=>l("update:concurrency",_))},null,8,["label","max","min","model-value","readonly"]),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:t.unref(r)("upstreams.form.fields.https_sni.label"),"model-value":e.httpsSni,readonly:e.readonly,type:"text","onUpdate:modelValue":f[4]||(f[4]=_=>l("update:https-sni",_))},null,8,["label","model-value","readonly"]),t.createVNode(S,{"data-testid":"active-healthcheck-verify-ssl",disabled:e.readonly,label:t.unref(r)("upstreams.form.fields.verify_ssl.label"),"model-value":e.verifySsl,"onUpdate:modelValue":f[5]||(f[5]=_=>l("update:verify-ssl",_))},null,8,["disabled","label","model-value"])],64)):t.createCommentVNode("",!0),((I=e.config)==null?void 0:I.app)==="kongManager"?(t.openBlock(),t.createElementBlock("div",cc,[t.createVNode(F,{info:t.unref(r)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(_,O)=>(t.openBlock(),t.createElementBlock("div",{key:`${_.header}_${O}`,class:t.normalizeClass(["headers-row",{"margin-top-6":O>0}])},[t.createVNode(k,{modelValue:u.value[O].key,"onUpdate:modelValue":q=>u.value[O].key=q,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${O+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(k,{modelValue:u.value[O].values,"onUpdate:modelValue":q=>u.value[O].values=q,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${O+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(H,{appearance:"btn-link",class:"btn-remove","data-testid":"btn-remove-header",onClick:q=>y(O)},{icon:t.withCtx(()=>[t.createVNode(x,{class:"delete-item",icon:"trash"})]),_:2},1032,["onClick"]),u.value&&O===u.value.length-1?(t.openBlock(),t.createBlock(H,{key:0,appearance:"btn-link",class:"btn-add-header","data-testid":"btn-add-header",onClick:n},{icon:t.withCtx(()=>[t.createVNode(x,{color:"$kui-color-text-primary-strong",icon:"plus",size:"22"})]),_:1})):t.createCommentVNode("",!0)],2))),128))])])):t.createCommentVNode("",!0),t.createVNode(V,null,{body:t.withCtx(()=>[t.createElementVNode("h5",dc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.label")),1),t.createElementVNode("p",hc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.help")),1),t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(La),min:t.unref(Pa),"model-value":e.interval,readonly:e.readonly,type:"number","onUpdate:modelValue":f[6]||(f[6]=_=>l("update:interval",_))},null,8,["help","label","max","min","model-value","readonly"]),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":f[7]||(f[7]=_=>l("update:successes",_))},null,8,["label","max","min","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(E,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(je),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":f[8]||(f[8]=_=>t.unref(s)(_,!0)),"onItem:removed":f[9]||(f[9]=_=>t.unref(s)(_,!1)),"onUpdate:modelValue":f[10]||(f[10]=_=>l("update:http-statuses",_))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(V,null,{body:t.withCtx(()=>[t.createElementVNode("h5",pc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.label")),1),t.createElementVNode("p",uc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.help")),1),t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(La),min:t.unref(Pa),"model-value":e.unhealthyInterval,readonly:e.readonly,type:"number","onUpdate:modelValue":f[11]||(f[11]=_=>l("update:unhealthy-interval",_))},null,8,["help","label","max","min","model-value","readonly"]),h.value?(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":f[12]||(f[12]=_=>l("update:tcp-failures",_))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":f[13]||(f[13]=_=>l("update:http-failures",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(E,{autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(je),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":f[14]||(f[14]=_=>t.unref(d)(_,!0)),"onItem:removed":f[15]||(f[15]=_=>t.unref(d)(_,!1)),"onUpdate:modelValue":f[16]||(f[16]=_=>l("update:unhealthy-http-statuses",_))},null,8,["items","label","model-value","readonly"])],64)),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(ja),min:t.unref(Ka),"model-value":e.unhealthyTimeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":f[17]||(f[17]=_=>l("update:unhealthy-timeouts",_))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),Zc="",mc=ce(fc,[["__scopeId","data-v-18b80e62"]]),gc={class:"fields-group-title"},yc={class:"fields-group-text"},kc={class:"fields-group-title"},bc={class:"fields-group-text"},Cc=t.defineComponent({__name:"UpstreamsFormPassiveHealthCheck",props:{type:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},timeouts:{type:String,required:!0},httpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},tcpFailures:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:successes","update:http-statuses","update:timeouts","update:http-failures","update:unhealthy-http-statuses","update:tcp-failures"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),o=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),i=t.computed(()=>a.type==="tcp"),{trackNewItems:c}=Fe({replaceId:!0}),{trackNewItems:h}=Fe({replaceId:!0});return t.watch(()=>a.type,(s,d)=>{d==="tcp"&&s!==d&&l("update:tcp-failures","5"),d!=="tcp"&&s==="tcp"&&(l("update:http-statuses",mt),l("update:unhealthy-http-statuses",yt))}),(s,d)=>{const u=t.resolveComponent("KExternalLink"),p=t.resolveComponent("KSelect"),n=t.resolveComponent("KInput"),y=t.resolveComponent("KMultiselect"),C=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:t.unref(r)("upstreams.form.passive_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.passive_health_check.help"))+" ",1),t.createVNode(u,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(p,{appearance:"select",class:"passive-healthcheck-type-select",items:o.value,label:t.unref(r)("upstreams.form.fields.passive_health_check_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=f=>l("update:type",f))},null,8,["items","label","model-value","readonly"]),t.createVNode(C,null,{body:t.withCtx(()=>[t.createElementVNode("h5",gc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.label")),1),t.createElementVNode("p",yc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.help")),1),t.createVNode(n,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":d[1]||(d[1]=f=>l("update:successes",f))},null,8,["label","max","min","model-value","readonly"]),i.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(y,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(je),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[2]||(d[2]=f=>t.unref(c)(f,!0)),"onItem:removed":d[3]||(d[3]=f=>t.unref(c)(f,!1)),"onUpdate:modelValue":d[4]||(d[4]=f=>l("update:http-statuses",f))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(C,null,{body:t.withCtx(()=>[t.createElementVNode("h5",kc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.label")),1),t.createElementVNode("p",bc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.help")),1),t.createVNode(n,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(ja),min:t.unref(Ka),"model-value":e.timeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":d[5]||(d[5]=f=>l("update:timeouts",f))},null,8,["label","max","min","model-value","readonly"]),i.value?(t.openBlock(),t.createBlock(n,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=f=>l("update:tcp-failures",f))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(n,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=f=>l("update:http-failures",f))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(y,{autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(je),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[8]||(d[8]=f=>t.unref(h)(f,!0)),"onItem:removed":d[9]||(d[9]=f=>t.unref(h)(f,!1)),"onUpdate:modelValue":d[10]||(d[10]=f=>l("update:unhealthy-http-statuses",f))},null,8,["items","label","model-value","readonly"])],64))]),_:1})]),_:1},8,["title"])}}}),Xc="",_c=ce(Cc,[["__scopeId","data-v-6d6854e3"]]),wc={class:"kong-ui-entities-upstreams-form"},Sc=t.defineComponent({__name:"UpstreamsForm",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"||!(e!=null&&e.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:l}){var v;const a=e,{inRange:r,stringToNumberArray:o,upstreamsResponseToFields:i,getDefaultUpstreamFields:c,objectsAreEqual:h,cloneDeep:s}=Pe(),{axiosInstance:d}=Ke({headers:(v=a.config)==null?void 0:v.requestHeaders}),{getMessageFromError:u}=va(),p=Je.useRouter(),n=t.reactive({fields:c(),readonly:!1,errorMessage:""}),y=t.reactive(c()),C=t.computed(()=>!h(n.fields,y)),f=w=>{n.fields.activeHealthCheck.interval=w?"5":"0",n.fields.activeHealthCheck.successes=w?"5":"0",n.fields.activeHealthCheck.httpFailures=w?"5":"0",n.fields.activeHealthCheck.unhealthyInterval=w?"5":"0"},m=w=>{n.fields.passiveHealthCheck.timeouts=w?"5":"0",n.fields.passiveHealthCheck.successes=w?"80":"0"},N=t.computed(()=>n.fields.slots?r(n.fields.slots,pt,ut):!0),k=t.computed(()=>n.fields.hashOn==="header"?!!n.fields.hashOnHeader:!0),S=t.computed(()=>n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie"?!!n.fields.hashOnCookie:!0),F=t.computed(()=>n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie"?!!n.fields.hashOnCookiePath:!0),x=t.computed(()=>n.fields.hashOn==="query_arg"?!!n.fields.hashOnQueryArgument:!0),H=t.computed(()=>n.fields.hashOn==="uri_capture"?!!n.fields.hashOnUriCapture:!0),E=t.computed(()=>n.fields.hashFallback==="header"?!!n.fields.hashFallbackHeader:!0),V=t.computed(()=>n.fields.hashFallback==="query_arg"?!!n.fields.hashFallbackQueryArgument:!0),I=t.computed(()=>n.fields.hashFallback==="uri_capture"?!!n.fields.hashFallbackUriCapture:!0),_=t.computed(()=>!!n.fields.name&&N.value&&k.value&&S.value&&F.value&&x.value&&H.value&&E.value&&V.value&&I.value),O=t.computed(()=>a.upstreamId?re.Edit:re.Create),q=t.computed(()=>{var w,g;return(g=xe.form[(w=a.config)==null?void 0:w.app])==null?void 0:g.edit}),M=w=>{Object.assign(n.fields,i(w)),Object.assign(y,s(n.fields))},A=()=>{var w;p.push(((w=a.config)==null?void 0:w.cancelRoute)||{name:"upstreams-list"})},$=w=>{l("loading",w)},K=w=>{l("error",w)},B=()=>{var g,b,j,R,ae;const w={name:n.fields.name,slots:Number(n.fields.slots),algorithm:n.fields.algorithm,hash_on:n.fields.hashOn,hash_fallback:n.fields.hashFallback,healthchecks:{}};return n.fields.hostHeader&&(w.host_header=n.fields.hostHeader),n.fields.clientCertificate&&(w.client_certificate={id:n.fields.clientCertificate}),n.fields.healthchecksThreshold&&(w.healthchecks.threshold=Number(n.fields.healthchecksThreshold)),n.fields.tags&&(w.tags=(b=(g=n.fields.tags.split(","))==null?void 0:g.map(P=>String(P||"").trim()))==null?void 0:b.filter(P=>P!=="")),n.fields.hashOn==="header"&&(w.hash_on_header=n.fields.hashOnHeader),(n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie")&&(w.hash_on_cookie=n.fields.hashOnCookie,w.hash_on_cookie_path=n.fields.hashOnCookiePath),n.fields.hashOn==="query_arg"&&(w.hash_on_query_arg=n.fields.hashOnQueryArgument),n.fields.hashOn==="uri_capture"&&(w.hash_on_uri_capture=n.fields.hashOnUriCapture),n.fields.hashFallback==="header"&&(w.hash_fallback_header=n.fields.hashFallbackHeader),n.fields.hashFallback==="query_arg"&&(w.hash_fallback_query_arg=n.fields.hashFallbackQueryArgument),n.fields.hashFallback==="uri_capture"&&(w.hash_fallback_uri_capture=n.fields.hashFallbackUriCapture),n.fields.activeHealthSwitch?(w.healthchecks.active={type:n.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},n.fields.activeHealthCheck.timeout&&(w.healthchecks.active.timeout=Number(n.fields.activeHealthCheck.timeout)),n.fields.activeHealthCheck.concurrency&&(w.healthchecks.active.concurrency=Number(n.fields.activeHealthCheck.concurrency)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpPath&&(w.healthchecks.active.http_path=n.fields.activeHealthCheck.httpPath),((j=a.config)==null?void 0:j.app)==="kongManager"&&(n.fields.activeHealthCheck.headers.length===0?w.healthchecks.active.headers=[]:w.healthchecks.active.headers=n.fields.activeHealthCheck.headers.reduce((P,W)=>{var fe,Oe;return W.key?{...P,[W.key]:(Oe=(fe=W.values.split(","))==null?void 0:fe.map(Ne=>String(Ne||"").trim()))==null?void 0:Oe.filter(Ne=>Ne!=="")}:{...P}},{})),(n.fields.activeHealthCheck.type==="https"||n.fields.activeHealthCheck.type==="grpcs")&&n.fields.activeHealthCheck.httpsSni&&(w.healthchecks.active.https_sni=n.fields.activeHealthCheck.httpsSni),(n.fields.activeHealthCheck.type==="https"||n.fields.activeHealthCheck.type==="grpcs")&&(w.healthchecks.active.https_verify_certificate=n.fields.activeHealthCheck.verifySsl),n.fields.activeHealthCheck.interval&&(w.healthchecks.active.healthy.interval=Number(n.fields.activeHealthCheck.interval)),n.fields.activeHealthCheck.successes&&(w.healthchecks.active.healthy.successes=Number(n.fields.activeHealthCheck.successes)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpStatuses&&(w.healthchecks.active.healthy.http_statuses=o(n.fields.activeHealthCheck.httpStatuses)),n.fields.activeHealthCheck.unhealthyInterval&&(w.healthchecks.active.unhealthy.interval=Number(n.fields.activeHealthCheck.unhealthyInterval)),n.fields.activeHealthCheck.unhealthyTimeouts&&(w.healthchecks.active.unhealthy.timeouts=Number(n.fields.activeHealthCheck.unhealthyTimeouts)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.unhealthyHttpStatuses&&(w.healthchecks.active.unhealthy.http_statuses=o(n.fields.activeHealthCheck.unhealthyHttpStatuses)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpFailures&&(w.healthchecks.active.unhealthy.http_failures=Number(n.fields.activeHealthCheck.httpFailures)),n.fields.activeHealthCheck.type==="tcp"&&n.fields.activeHealthCheck.tcpFailures&&(w.healthchecks.active.unhealthy.tcp_failures=Number(n.fields.activeHealthCheck.tcpFailures))):((R=a.config)==null?void 0:R.app)==="kongManager"&&O.value===re.Edit&&(w.healthchecks.active={type:n.fields.activeHealthCheck.type,headers:{},healthy:{interval:0},unhealthy:{interval:0}}),n.fields.passiveHealthSwitch?(w.healthchecks.passive={type:n.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},n.fields.passiveHealthCheck.successes&&(w.healthchecks.passive.healthy.successes=Number(n.fields.passiveHealthCheck.successes)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.httpStatuses&&(w.healthchecks.passive.healthy.http_statuses=o(n.fields.passiveHealthCheck.httpStatuses)),n.fields.passiveHealthCheck.timeouts&&(w.healthchecks.passive.unhealthy.timeouts=Number(n.fields.passiveHealthCheck.timeouts)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.unhealthyHttpStatuses&&(w.healthchecks.passive.unhealthy.http_statuses=o(n.fields.passiveHealthCheck.unhealthyHttpStatuses)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.httpFailures&&(w.healthchecks.passive.unhealthy.http_failures=Number(n.fields.passiveHealthCheck.httpFailures)),n.fields.passiveHealthCheck.type==="tcp"&&n.fields.passiveHealthCheck.tcpFailures&&(w.healthchecks.passive.unhealthy.tcp_failures=Number(n.fields.passiveHealthCheck.tcpFailures))):((ae=a.config)==null?void 0:ae.app)==="kongManager"&&O.value===re.Edit&&(w.healthchecks.passive={type:n.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),w},U=w=>{var b,j,R,ae,P,W;let g=`${(b=a.config)==null?void 0:b.apiBaseUrl}${xe.form[(j=a.config)==null?void 0:j.app][w]}`;return((R=a.config)==null?void 0:R.app)==="konnect"?g=g.replace(/{controlPlaneId}/gi,((ae=a.config)==null?void 0:ae.controlPlaneId)||""):((P=a.config)==null?void 0:P.app)==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(W=a.config)!=null&&W.workspace?`/${a.config.workspace}`:"")),g=g.replace(/{id}/gi,a.upstreamId),g},D=async()=>{var w;try{n.readonly=!0,await d.post(U("validate"),B());let g;O.value===re.Create?g=await d.post(U("create"),B()):O.value===re.Edit&&(g=((w=a.config)==null?void 0:w.app)==="konnect"?await d.put(U("edit"),B()):await d.patch(U("edit"),B())),l("update",g==null?void 0:g.data)}catch(g){n.errorMessage=u(g),l("error",g)}finally{n.readonly=!1}};return(w,g)=>(t.openBlock(),t.createElementBlock("div",wc,[t.createVNode(t.unref(Oa),{"can-submit":_.value&&C.value,config:e.config,"edit-id":e.upstreamId,"error-message":n.errorMessage,"fetch-url":q.value,"is-readonly":n.readonly,onCancel:A,"onFetch:error":K,"onFetch:success":M,onLoading:$,onSubmit:D},{default:t.withCtx(()=>[t.createVNode(Yi,{"client-certificate":n.fields.clientCertificate,"onUpdate:clientCertificate":g[0]||(g[0]=b=>n.fields.clientCertificate=b),"host-header":n.fields.hostHeader,"onUpdate:hostHeader":g[1]||(g[1]=b=>n.fields.hostHeader=b),name:n.fields.name,"onUpdate:name":g[2]||(g[2]=b=>n.fields.name=b),tags:n.fields.tags,"onUpdate:tags":g[3]||(g[3]=b=>n.fields.tags=b),config:e.config,readonly:n.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),t.createVNode(ac,{algorithm:n.fields.algorithm,"onUpdate:algorithm":g[4]||(g[4]=b=>n.fields.algorithm=b),"hash-fallback":n.fields.hashFallback,"onUpdate:hashFallback":g[5]||(g[5]=b=>n.fields.hashFallback=b),"hash-fallback-header":n.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":g[6]||(g[6]=b=>n.fields.hashFallbackHeader=b),"hash-fallback-query-argument":n.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":g[7]||(g[7]=b=>n.fields.hashFallbackQueryArgument=b),"hash-fallback-uri-capture":n.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":g[8]||(g[8]=b=>n.fields.hashFallbackUriCapture=b),"hash-on":n.fields.hashOn,"onUpdate:hashOn":g[9]||(g[9]=b=>n.fields.hashOn=b),"hash-on-cookie":n.fields.hashOnCookie,"onUpdate:hashOnCookie":g[10]||(g[10]=b=>n.fields.hashOnCookie=b),"hash-on-cookie-path":n.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":g[11]||(g[11]=b=>n.fields.hashOnCookiePath=b),"hash-on-header":n.fields.hashOnHeader,"onUpdate:hashOnHeader":g[12]||(g[12]=b=>n.fields.hashOnHeader=b),"hash-on-query-argument":n.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":g[13]||(g[13]=b=>n.fields.hashOnQueryArgument=b),"hash-on-uri-capture":n.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":g[14]||(g[14]=b=>n.fields.hashOnUriCapture=b),slots:n.fields.slots,"onUpdate:slots":g[15]||(g[15]=b=>n.fields.slots=b),readonly:n.readonly},null,8,["algorithm","hash-fallback","hash-fallback-header","hash-fallback-query-argument","hash-fallback-uri-capture","hash-on","hash-on-cookie","hash-on-cookie-path","hash-on-header","hash-on-query-argument","hash-on-uri-capture","slots","readonly"]),t.createVNode(ic,{"active-health-switch":n.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[g[16]||(g[16]=b=>n.fields.activeHealthSwitch=b),f],"healthchecks-threshold":n.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":g[17]||(g[17]=b=>n.fields.healthchecksThreshold=b),"passive-health-switch":n.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[g[18]||(g[18]=b=>n.fields.passiveHealthSwitch=b),m],readonly:n.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),n.fields.activeHealthSwitch?(t.openBlock(),t.createBlock(mc,{key:0,concurrency:n.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":g[19]||(g[19]=b=>n.fields.activeHealthCheck.concurrency=b),headers:n.fields.activeHealthCheck.headers,"onUpdate:headers":g[20]||(g[20]=b=>n.fields.activeHealthCheck.headers=b),"http-failures":n.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":g[21]||(g[21]=b=>n.fields.activeHealthCheck.httpFailures=b),"http-path":n.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":g[22]||(g[22]=b=>n.fields.activeHealthCheck.httpPath=b),"http-statuses":n.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[23]||(g[23]=b=>n.fields.activeHealthCheck.httpStatuses=b),"https-sni":n.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":g[24]||(g[24]=b=>n.fields.activeHealthCheck.httpsSni=b),interval:n.fields.activeHealthCheck.interval,"onUpdate:interval":g[25]||(g[25]=b=>n.fields.activeHealthCheck.interval=b),successes:n.fields.activeHealthCheck.successes,"onUpdate:successes":g[26]||(g[26]=b=>n.fields.activeHealthCheck.successes=b),"tcp-failures":n.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[27]||(g[27]=b=>n.fields.activeHealthCheck.tcpFailures=b),timeout:n.fields.activeHealthCheck.timeout,"onUpdate:timeout":g[28]||(g[28]=b=>n.fields.activeHealthCheck.timeout=b),type:n.fields.activeHealthCheck.type,"onUpdate:type":g[29]||(g[29]=b=>n.fields.activeHealthCheck.type=b),"unhealthy-http-statuses":n.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[30]||(g[30]=b=>n.fields.activeHealthCheck.unhealthyHttpStatuses=b),"unhealthy-interval":n.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":g[31]||(g[31]=b=>n.fields.activeHealthCheck.unhealthyInterval=b),"unhealthy-timeouts":n.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":g[32]||(g[32]=b=>n.fields.activeHealthCheck.unhealthyTimeouts=b),"verify-ssl":n.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":g[33]||(g[33]=b=>n.fields.activeHealthCheck.verifySsl=b),config:e.config,readonly:n.readonly},null,8,["concurrency","headers","http-failures","http-path","http-statuses","https-sni","interval","successes","tcp-failures","timeout","type","unhealthy-http-statuses","unhealthy-interval","unhealthy-timeouts","verify-ssl","config","readonly"])):t.createCommentVNode("",!0),n.fields.passiveHealthSwitch?(t.openBlock(),t.createBlock(_c,{key:1,"http-failures":n.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":g[34]||(g[34]=b=>n.fields.passiveHealthCheck.httpFailures=b),"http-statuses":n.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[35]||(g[35]=b=>n.fields.passiveHealthCheck.httpStatuses=b),successes:n.fields.passiveHealthCheck.successes,"onUpdate:successes":g[36]||(g[36]=b=>n.fields.passiveHealthCheck.successes=b),"tcp-failures":n.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[37]||(g[37]=b=>n.fields.passiveHealthCheck.tcpFailures=b),timeouts:n.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":g[38]||(g[38]=b=>n.fields.passiveHealthCheck.timeouts=b),type:n.fields.passiveHealthCheck.type,"onUpdate:type":g[39]||(g[39]=b=>n.fields.passiveHealthCheck.type=b),"unhealthy-http-statuses":n.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[40]||(g[40]=b=>n.fields.passiveHealthCheck.unhealthyHttpStatuses=b),readonly:n.readonly},null,8,["http-failures","http-statuses","successes","tcp-failures","timeouts","type","unhealthy-http-statuses","readonly"])):t.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])]))}}),ed="",xc=ce(Sc,[["__scopeId","data-v-810fb7b7"]]),Nc=t.createElementVNode("code",null,"10",-1),Vc=t.createElementVNode("code",null,"65536",-1),Bc={"data-testid":"client_certificate-plain-text"},Ic=t.defineComponent({__name:"UpstreamsConfigCard",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:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e){const l=e,{i18n:{t:a},i18nT:r}=ie.useI18n(),{getPropValue:o}=Bi(),i=t.computed(()=>xe.form[l.config.app].edit),c=t.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:J.Basic,tooltip:a("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:J.Basic},hash_on:{order:7,section:J.Basic},hash_on_header:{order:8,section:J.Basic},hash_on_uri_capture:{order:9,section:J.Basic},hash_on_query_arg:{order:10,section:J.Basic,label:`${a("upstreams.form.fields.hash_on.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:J.Basic},hash_on_cookie_path:{order:12,section:J.Basic},healthchecks:{order:13,section:J.Basic,type:L.Json},tags:{order:14,tooltip:a("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${a("upstreams.form.fields.hash_fallback.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_fallback_uri_capture:{order:4},host_header:{order:5},use_srv_name:{order:6},client_certificate:{order:7,tooltip:a("upstreams.form.hash_tooltips.client_certificate")}});return(h,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(t.unref(Xs),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":c.value,"fetch-url":i.value,"hide-title":e.hideTitle,"onCopy:success":s[0]||(s[0]=d=>h.$emit("copy:success",d)),"onFetch:error":s[1]||(s[1]=d=>h.$emit("fetch:error",d)),"onFetch:success":s[2]||(s[2]=d=>h.$emit("fetch:success",d)),onLoading:s[3]||(s[3]=d=>h.$emit("loading",d))},{"name-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":t.withCtx(({row:d})=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(d.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:t.withCtx(()=>[Nc]),max:t.withCtx(()=>[Vc]),_:1})]),"hash_fallback-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:t.withCtx(d=>{var u;return[t.createElementVNode("div",null,[t.createElementVNode("div",Bc,[t.createElementVNode("span",null,t.toDisplayString((u=t.unref(o)("rowValue",d))==null?void 0:u.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});X.TargetForm=Ra,X.TargetsList=zi,X.UpstreamsConfigCard=Ic,X.UpstreamsForm=xc,X.UpstreamsList=Di,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
|
|
32
|
+
`:""}var gs=ms,ys={dump:gs};function ht(e,l){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}var ks=G,bs=Ot,Cs=vt,_s=Pt,ws=Lt,Ss=at,xs=ua.load,Ns=ua.loadAll,Vs=ys.dump,Bs=ee,Is={binary:Qt,float:jt,map:$t,null:Dt,pairs:Gt,set:Zt,timestamp:zt,bool:Mt,int:Kt,merge:Wt,omap:Yt,seq:Ut,str:qt},Ts=ht("safeLoad","load"),Hs=ht("safeLoadAll","loadAll"),Es=ht("safeDump","dump"),As={Type:ks,Schema:bs,FAILSAFE_SCHEMA:Cs,JSON_SCHEMA:_s,CORE_SCHEMA:ws,DEFAULT_SCHEMA:Ss,load:xs,loadAll:Ns,dump:Vs,YAMLException:Bs,types:Is,safeLoad:Ts,safeLoadAll:Hs,safeDump:Es};const Fs={key:0,class:"config-card-display-form"},Os=["data-testid"],qs={key:0,class:"config-card-prop-section-title"},Us={key:1,class:"config-card-display-json"},$s={key:2,class:"config-card-display-yaml"},vs=le(t.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const l=e,a=t.useSlots(),{i18n:{t:r}}=Y.useI18n(),o=h=>!!(h.tooltip||a[`${h.key}-label-tooltip`]),i=t.ref(""),c=t.ref("");return t.watch(()=>l.format,h=>{h==="json"?i.value=JSON.stringify(l.record,null,2):h==="yaml"&&(c.value=As.dump(l.record))},{immediate:!0}),(h,s)=>{const d=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Fs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,u=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${u}-props`,class:t.normalizeClass(`config-card-details-${u}-props`),"data-testid":`config-card-details-${u}-props`},[u!=="basic"?(t.openBlock(),t.createElementBlock("div",qs,t.toDisplayString(u==="advanced"?t.unref(r)("baseConfigCard.sections.advanced"):t.unref(r)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[u],p=>(t.openBlock(),t.createBlock(Ge,{key:p.key,item:p},t.createSlots({label:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label`,{row:p},void 0,!0)]),[p.key]:t.withCtx(({rowValue:n})=>[t.renderSlot(h.$slots,p.key,{row:p,rowValue:n},void 0,!0)]),_:2},[o(p)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label-tooltip`,{row:p},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Os))),128))])):t.createCommentVNode("",!0),e.format==="json"?(t.openBlock(),t.createElementBlock("div",Us,[t.createVNode(d,{id:"config-card-codeblock",code:i.value,language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),e.format==="yaml"?(t.openBlock(),t.createElementBlock("div",$s,[t.createVNode(d,{id:"config-card-codeblock",code:c.value,language:"yaml",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c45e9e4"]]),Fa="24px",Ds=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Ms=e=>(t.pushScopeId("data-v-dd88a2bb"),e=e(),t.popScopeId(),e),Ks=["aria-hidden"],js={key:0,"data-testid":"kui-icon-svg-title"},Ps=Ms(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),Ls=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Fa,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const l=String(e).replace(/px/gi,""),a=Number(l);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const l=e,a=t.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const o=String(l.size).replace(/px/gi,""),i=Number(o);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return Fa}),r=t.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:a.value,lineHeight:"0",width:a.value}));return(o,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",js,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Ps],8,Ks))]),_:1},8,["aria-hidden","style"]))}}),Rs=Ds(Ls,[["__scopeId","data-v-dd88a2bb"]]),Js={"data-testid":"config-card-title"},zs={class:"config-card-actions"},Ws=["href"],Qs={key:2,class:"config-card-details-section"},Ys={key:3,class:"config-card-details-section"},Gs=["data-testid"],Zs={key:0,class:"config-card-prop-section-title"},Xs=le(t.defineComponent({__name:"EntityBaseConfigCard",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)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:l}){var a;const r=e,o=t.useSlots(),{i18n:{t:i}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{convertKeyToTitle:h}=Y.useStringHelpers(),{axiosInstance:s}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),d=[{label:i("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=t.ref("structured"),p=V=>{u.value=V==null?void 0:V.value},n={id:{type:L.ID,label:i("baseConfigCard.commonFields.id_label"),order:0,section:J.Basic},name:{order:1,section:J.Basic},enabled:{type:L.BadgeStatus,order:2,section:J.Basic},updated_at:{type:L.Date,label:i("baseConfigCard.commonFields.updated_at_label"),order:3,section:J.Basic},created_at:{type:L.Date,label:i("baseConfigCard.commonFields.created_at_label"),order:4,section:J.Basic},tags:{type:L.BadgeTag,order:-1,section:J.Basic}},y=t.ref(!1),C=t.ref(!1),f=t.ref(""),m=t.ref(),N=t.computed(()=>{var V,I,_;if(!m.value)return[];const O=[],q=Object.keys(m.value).length;for(const M in m.value){const A=(I=(V=r.configSchema)==null?void 0:V[M])==null?void 0:I.order,$=(_=n[M])==null?void 0:_.order;let K=q;($||$===0)&&(K=$===-1?q+1:$),A&&(K=A===-1?q+1:A),O.push([M,K])}return O.sort(function(M,A){return M[1]-A[1]}),O.map(M=>{var A,$;const K=M[0],B=(A=m.value)==null?void 0:A[K],U=(($=r.configSchema)==null?void 0:$[K])||{},D=n[K];return{key:K,value:B,hidden:U.hidden||!1,type:U.type??((D==null?void 0:D.type)||L.Text),label:U.label??((D==null?void 0:D.label)||h(K)),tooltip:U.tooltip??((D==null?void 0:D.tooltip)||void 0),section:U.section??((D==null?void 0:D.section)||J.Advanced)}}).filter(M=>!M.hidden&&M.key!==r.pluginConfigKey)}),k=t.computed(()=>{var V,I;if(!m.value||!r.pluginConfigKey)return[];const _=m.value[r.pluginConfigKey]||{},O=Object.keys(_).length,q=[];for(const M in _){const A=(I=(V=r.pluginConfigSchema)==null?void 0:V[M])==null?void 0:I.order,$=_[M];let K=$!=null&&$!==""?O-1:O;A&&(K=A===-1?O+1:A),q.push([M,K])}return q.sort(function(M,A){return M[1]-A[1]}),q.map(M=>{var A;const $=M[0],K=_[$],B=((A=r.pluginConfigSchema)==null?void 0:A[$])||{};return{key:$,value:K,hidden:B.hidden||!1,type:B.type??L.Text,label:B.label??h($),tooltip:B.tooltip??void 0,section:J.Plugin}}).filter(M=>!M.hidden)}),S=t.computed(()=>{var V,I,_,O;return{basic:(V=N.value)==null?void 0:V.filter(q=>q.section===J.Basic),advanced:(I=N.value)==null?void 0:I.filter(q=>q.section===J.Advanced),plugin:(O=k.value)==null?void 0:O.concat((_=N.value)==null?void 0:_.filter(q=>q.section===J.Plugin))}}),F=t.computed(()=>{const V=[];return S.value.basic.length&&V.push("basic"),S.value.advanced.length&&V.push("advanced"),S.value.plugin.length&&V.push("plugin"),V}),x=V=>!!(V.tooltip||o[`${V.key}-label-tooltip`]),H=t.computed(()=>{var V,I;let _=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((V=r.config)==null?void 0:V.controlPlaneId)||""):r.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(I=r.config)!=null&&I.workspace?`/${r.config.workspace}`:"")),_=_.replace(/{id}/gi,r.config.entityId),_}),E=V=>{m.value&&V(JSON.stringify(m.value))?l("copy:success",m.value):l("copy:error")};return t.watch(y,V=>{l("loading",V)},{immediate:!0}),t.onBeforeMount(async()=>{C.value=!1,y.value=!0;try{const{data:V}=await s.get(H.value);if(r.dataKey)if(typeof V[r.dataKey]<"u")m.value={...V[r.dataKey]};else throw new Error(i("errors.dataKeyUndefined",{dataKey:r.dataKey}));else m.value={...V};Object.keys(r.configSchema).filter(I=>r.configSchema[I].forceShow).forEach(I=>{m.value&&typeof m.value[I]>"u"&&(m.value[I]=null)}),l("fetch:success",V)}catch(V){const I=c(V);f.value=I.startsWith("code")?i("baseConfigCard.errors.load"):I,C.value=!0,l("fetch:error",V)}finally{y.value=!1}}),(V,I)=>{const _=t.resolveComponent("KLabel"),O=t.resolveComponent("KSelect"),q=t.resolveComponent("KButton"),M=t.resolveComponent("KClipboardProvider"),A=t.resolveComponent("KSkeleton"),$=t.resolveComponent("KEmptyState"),K=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(K,{class:"kong-ui-entity-base-config-card"},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",zs,[t.renderSlot(V.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(_,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(O,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:p})):t.createCommentVNode("",!0),r.config.jsonYamlEnabled&&e.configCardDoc?(t.openBlock(),t.createBlock(q,{key:2,appearance:"btn-link",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(Rs),{size:t.unref(Zr)},null,8,["size"])],8,Ws)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(M,{key:3},{default:t.withCtx(({copyToClipboard:B})=>[!y.value&&!C.value?(t.openBlock(),t.createBlock(q,{key:0,appearance:"btn-link","data-testid":"json-copy-button",onClick:U=>E(B)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:1}))])]),body:t.withCtx(()=>[y.value?(t.openBlock(),t.createBlock(A,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):C.value?(t.openBlock(),t.createBlock($,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(f.value),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createElementBlock("div",Qs,[t.createVNode(vs,{format:u.value,"prop-list-types":F.value,"property-collections":S.value,record:m.value},t.createSlots({_:2},[t.renderList(Object.keys(V.$slots),B=>({name:B,fn:t.withCtx(({row:U,rowValue:D})=>[t.renderSlot(V.$slots,B,{row:U,rowValue:D},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(t.openBlock(),t.createElementBlock("div",Ys,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(F.value,B=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${B}-props`,class:t.normalizeClass(`config-card-details-${B}-props`),"data-testid":`config-card-details-${B}-props`},[B!=="basic"?(t.openBlock(),t.createElementBlock("div",Zs,t.toDisplayString(B==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.value[B],U=>(t.openBlock(),t.createBlock(Ge,{key:U.key,item:U},t.createSlots({label:t.withCtx(()=>[t.renderSlot(V.$slots,`${U.key}-label`,{row:U},void 0,!0)]),[U.key]:t.withCtx(({rowValue:D})=>[t.renderSlot(V.$slots,U.key,{row:U,rowValue:D},void 0,!0)]),_:2},[x(U)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(V.$slots,`${U.key}-label-tooltip`,{row:U},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Gs))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("div",Js,[t.renderSlot(V.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-64349aa2"]]),ei=["onReset","onSubmit"],ti={class:"form-actions","data-testid":"form-actions"},Oa=le(t.defineComponent({__name:"EntityBaseForm",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")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:l}){var a;const r=e,o=Je.useRouter(),{i18n:{t:i}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{axiosInstance:h}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),s=t.ref(!1),d=t.ref(!1),u=t.ref(""),p=t.computed(()=>r.canSubmit===!1||r.isReadonly),n=t.computed(()=>{var m,N;if(!r.editId)return"";let k=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((m=r.config)==null?void 0:m.controlPlaneId)||""):r.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(N=r.config)!=null&&N.workspace?`/${r.config.workspace}`:"")),k=k.replace(/{id}/gi,r.editId),k}),y=()=>{r.config.cancelRoute?o.push(r.config.cancelRoute):C()},C=()=>{l("cancel")},f=()=>{p.value||l("submit")};return t.watch(()=>s.value,m=>{l("loading",m)},{immediate:!0}),t.onBeforeMount(async()=>{if(r.editId)try{d.value=!1,s.value=!0;const{data:m}=await h.get(n.value);l("fetch:success",m)}catch(m){const N=c(m);u.value=N.startsWith("code")?i("baseForm.errors.edit"):N,d.value=!0,l("fetch:error",m)}finally{s.value=!1}}),(m,N)=>{const k=t.resolveComponent("KSkeleton"),S=t.resolveComponent("KEmptyState"),F=t.resolveComponent("KAlert"),x=t.resolveComponent("KButton"),H=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(H,{class:"kong-ui-entity-base-form"},{body:t.withCtx(()=>[s.value?(t.openBlock(),t.createBlock(k,{key:0,type:"form"})):d.value?(t.openBlock(),t.createBlock(S,{key:1,"cta-text":t.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":y,"is-error":!0},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(u.value),1)]),_:1},8,["cta-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:t.withModifiers(C,["prevent"]),onSubmit:t.withModifiers(f,["prevent"])},[t.renderSlot(m.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(F,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createElementVNode("div",ti,[t.renderSlot(m.$slots,"form-actions",{},()=>[t.createVNode(x,{appearance:"outline","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(x,{appearance:"primary","data-testid":"form-submit",disabled:p.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,ei))]),_:3})}}}),[["__scopeId","data-v-44a90aae"]]),ai={key:0,"data-testid":"first-col"},li=le(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const l=e,a=t.computed(()=>{var f;return((f=l.rowEl)==null?void 0:f.querySelector(`[data-testid="${l.keyName}"]`))||null}),r=t.computed(()=>{var f;return((f=a.value)==null?void 0:f.querySelector('[data-testid="first-col"]'))||null}),o=t.computed(()=>{var f,m;const N=(f=l.rowEl)==null?void 0:f.querySelectorAll("td");return N?((m=N[0])==null?void 0:m.getAttribute("data-testid"))===l.keyName:!1});let i;const c=()=>{i&&(i.disconnect(),i=void 0)},h=()=>{var f,m,N;d.value=((f=r.value)==null?void 0:f.getBoundingClientRect().width)||0,u.value=((m=a.value)==null?void 0:m.clientWidth)||0,p.value=((N=s.value)==null?void 0:N.innerText)||""},s=t.ref({}),d=t.ref(0),u=t.ref(0),p=t.ref(""),n=t.computed(()=>[r.value,a.value]),y=t.watch(n,f=>{if(o.value&&(c(),"ResizeObserver"in window&&window)){i=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{!Array.isArray(m)||!m.length||h()})});for(const m of f)m&&i.observe(m)}},{immediate:!0,flush:"post",deep:!0}),C=t.computed(()=>o.value?d.value>u.value:!1);return t.onMounted(()=>{h()}),t.onUnmounted(()=>{y()}),(f,m)=>{const N=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:s,class:"content-wrapper"},[o.value?(t.openBlock(),t.createElementBlock("span",ai,[t.createVNode(N,{label:C.value?p.value:"","max-width":"300",placement:"bottomStart"},{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):t.renderSlot(f.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),ri={class:"toolbar-container"},oi={key:0,class:"toolbar-button-container"},ni=["data-testid"],qa=le(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),o=t.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),i=S=>S.hasData||!!a.query,c=t.computed(()=>{const S=[];return Object.keys(a.tableHeaders).forEach(F=>{const x=a.tableHeaders[F];S.push({label:x.label??F,key:F,sortable:x.sortable??!1})}),a.enableEntityActions&&S.push({key:"actions",hideLabel:!0}),S}),h=S=>({"data-rowid":S.id,"data-testid":S.name,...a.rowAttributes(S)}),s=t.ref({}),d=S=>{var F;return(F=s.value)==null?void 0:F.$el.querySelector(`[data-rowid="${S.id}"]`)},u=S=>{const F={"data-testid":S.headerKey,...a.cellAttributes(S)};return S.colIndex===0&&(F.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),F},p=()=>{l("empty-state-cta-clicked"),n()},n=()=>{l("clear-search-input")},y=t.computed(()=>a.disableRowClick?void 0:(S,F)=>{l("click:row",F)}),C=S=>{l("sort",S)},{setTablePreferences:f,getTablePreferences:m}=ur(),N=t.computed(()=>{const S=m(a.preferencesStorageKey);return{...a.initialFetcherParams,...S}}),k=S=>{a.preferencesStorageKey&&f(a.preferencesStorageKey,S)};return(S,F)=>{const x=t.resolveComponent("KIcon"),H=t.resolveComponent("KButton"),E=t.resolveComponent("KDropdownMenu"),V=t.resolveComponent("KTable"),I=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(I,{class:"kong-ui-entity-base-table",title:e.title},{body:t.withCtx(()=>[t.createVNode(V,{ref_key:"tableRefs",ref:s,"cache-identifier":o.value,"cell-attrs":u,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-title":e.errorMessage,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":!!e.errorMessage,headers:c.value,"hide-pagination-when-optional":"","initial-fetcher-params":N.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":h,"search-input":e.query,onKtableEmptyStateCtaClicked:p,"onRow:click":y.value,onSort:F[0]||(F[0]=_=>C(_)),"onUpdate:tablePreferences":k},t.createSlots({toolbar:t.withCtx(({state:_})=>[t.withDirectives(t.createElementVNode("div",ri,[t.renderSlot(S.$slots,"toolbar-filter",{},void 0,!0),S.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",oi,[t.renderSlot(S.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,i(_)]])]),actions:t.withCtx(({row:_,rowKey:O,rowValue:q})=>[t.createElementVNode("div",{class:"actions-container","data-testid":_.name},[t.createVNode(E,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(S.$slots,"actions",{row:_,rowKey:O,rowValue:q},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(H,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:t.withCtx(()=>[t.createVNode(x,{color:t.unref(Yr),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,ni)]),_:2},[t.renderList(e.tableHeaders,(_,O)=>({name:O,fn:t.withCtx(({row:q,rowKey:M,rowValue:A})=>[t.createVNode(li,{"key-name":String(O),"row-el":d(q)},{default:t.withCtx(()=>[t.renderSlot(S.$slots,O,{row:q,rowKey:M,rowValue:A},()=>[t.createTextVNode(t.toDisplayString(A),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-6bf92df6"]]),si={key:0,class:"kong-ui-entity-delete-error"},ii={key:1,class:"description"},Ua=le(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:l}){const a=e,{i18nT:r}=Y.useI18n(),o=t.computed(()=>a.needConfirm?a.entityName:""),i=()=>{l("cancel")},c=()=>{l("proceed")};return(h,s)=>{const d=t.resolveComponent("KAlert"),u=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(u,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":o.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:i,onProceed:c},{"body-content":t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",si,[t.createVNode(d,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||h.$slots.description?(t.openBlock(),t.createElementBlock("div",ii,[t.renderSlot(h.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(a.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),ci={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},di={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},hi=["fill"],pi={mask:"url(#mask0_180_20349)"},ui=["fill"],fi=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Wr})`}},setup(e){return(l,a)=>(t.openBlock(),t.createElementBlock("svg",ci,[t.createElementVNode("mask",di,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,hi)]),t.createElementVNode("g",pi,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,ui)])]))}}),mi={key:1,class:"kong-ui-entity-filter"},gi={class:"menu-item-title"},yi={class:"menu-item-indicator"},ki={class:"menu-item-body"},bi=["for"],Ci={class:"menu-item-buttons"},_i=le(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),o=t.ref(!1),i=t.ref({}),c=t.computed(()=>{const m=[];return new URLSearchParams(a.modelValue).forEach((N,k)=>{N!==""&&m.push(k)}),m}),h=t.computed(()=>{const m=a.config.fields;return Object.keys(m).filter(N=>m[N].searchable).map(N=>({label:m[N].label||N,value:N}))});t.watch(()=>a.modelValue,m=>{i.value={},new URLSearchParams(m).forEach((N,k)=>{i.value[k]=N})});const s=()=>{o.value=!o.value},d=m=>{l("update:modelValue",m)},u=m=>`filter-${m}`,p=m=>{var N,k;return(((k=(N=a.config.schema)==null?void 0:N[m])==null?void 0:k.values)??[]).map(S=>({value:S,label:S}))},n=m=>{var N,k;return((k=(N=a.config.schema)==null?void 0:N[m])==null?void 0:k.type)??"text"},y=m=>{i.value={...i.value,[m]:""},f()},C=()=>{i.value={},f(!0)},f=(m=!1)=>{const N=Object.keys(i.value).reduce((k,S)=>(i.value[S]&&(k[S]=`${i.value[S]}`),k),{});m&&(o.value=!1),l("update:modelValue",new URLSearchParams(N).toString())};return(m,N)=>{const k=t.resolveComponent("KInput"),S=t.resolveComponent("KButton"),F=t.resolveComponent("KSelect"),x=t.resolveComponent("KMenuItem"),H=t.resolveComponent("KMenu");return e.config.isExactMatch?(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":d},{icon:t.withCtx(()=>[t.createVNode(fi)]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",mi,[t.createVNode(S,{appearance:"btn-link","data-testid":"filter-button",icon:"filter",onClick:s},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(c.value.length>0?`(${c.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:s},null,512),[[t.vShow,o.value]]),t.withDirectives(t.createVNode(H,{class:"kong-ui-entity-filter-menu"},{body:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(E,V)=>(t.openBlock(),t.createBlock(x,{key:E.value,"data-testid":E.value,expandable:"","last-menu-item":V===h.value.length-1},{itemTitle:t.withCtx(()=>[t.createElementVNode("span",gi,[t.createTextVNode(t.toDisplayString(E.label)+" ",1),t.withDirectives(t.createElementVNode("span",yi,null,512),[[t.vShow,c.value.includes(E.value)]])])]),itemBody:t.withCtx(()=>{var I,_;return[t.createElementVNode("div",ki,[t.createElementVNode("label",{class:"menu-item-label",for:u(E.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,bi),((_=(I=e.config.schema)==null?void 0:I[E.value])==null?void 0:_.type)==="select"?(t.openBlock(),t.createBlock(F,{key:0,id:u(E.value),modelValue:i.value[E.value],"onUpdate:modelValue":O=>i.value[E.value]=O,appearance:"select",items:p(E.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(k,{key:1,id:u(E.value),modelValue:i.value[E.value],"onUpdate:modelValue":O=>i.value[E.value]=O,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),size:"small",type:n(E.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),t.createElementVNode("div",Ci,[t.createVNode(S,{appearance:"btn-link","data-testid":"apply-filter",size:"small",onClick:N[0]||(N[0]=O=>f(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(S,{appearance:"btn-link","data-testid":"clear-filter",size:"small",onClick:O=>y(E.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:t.withCtx(()=>[t.createVNode(S,{onClick:C},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})]),_:1},512),[[t.vShow,o.value]])]))}}}),[["__scopeId","data-v-745f38c0"]]),se=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const l=e,a=t.ref(void 0),r=t.computed(()=>a.value===!0||a.value!==void 0&&l.forceShow===!0);return t.watch(()=>l.authFunction,async()=>{a.value=await l.authFunction()},{immediate:!0}),(o,i)=>r.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:a.value}):t.createCommentVNode("",!0)}}),wi={class:"form-section-wrapper"},Si={key:0,class:"form-section-title"},xi={key:1,class:"form-section-description"},Ni={key:2,class:"form-section-footer"},Vi={class:"form-section-content"},Ae=le(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const l=t.useSlots();return(a,r)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[t.createElementVNode("div",wi,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createElementBlock("h4",Si,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.description||t.unref(l).description?(t.openBlock(),t.createElementBlock("div",xi,[t.renderSlot(a.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(l).footer?(t.openBlock(),t.createElementBlock("div",Ni,[t.renderSlot(a.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Vi,[t.renderSlot(a.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:Ke,useDeleteUrlBuilder:$a,useErrors:va,useFetchUrlBuilder:Dc,useFetcher:Da,useDebouncedFilter:Ma,useStringHelpers:Mc,useHelpers:Bi,useGatewayFeatureSupported:Kc,useTruncationDetector:jc}=Y,Ii={upstreams:{list:{table_headers:{id:"ID",name:"Name",slots:"Slots",tags:"Tags"},empty_state:{title:"Configure a New Upstream",description:"Upstreams are used to load balance incoming requests."},toolbar_actions:{new_upstream:"New Upstream"}},title:"Upstreams",search:{placeholder:"Filter by exact name or ID"},actions:{create:"New Upstream",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View Details"},delete:{title:"Delete an Upstream",description:"This action cannot be reversed so make sure to check upstream usage before deleting."},errors:{general:"Upstreams could not be retrieved",delete:"The upstream could not be deleted at this time.",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{errors:{name_required:"Name is required",should_be_integer:"Field should contain an integer",in_range:"Accepts an integer in the range of 10 - 65536"},general_info:{title:"General Information",help:"General information will help identify and manage this Upstream."},load_balancing:{title:"Load Balancing",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},health_check:{title:"Health Checks & Circuit Breakers",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},active_health_check:{title:"Active Health Checks",help:"Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."},passive_health_check:{title:"Passive Health Checks",help:"Passive health checks, also known as circuit breakers, are checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},buttons:{view_documentation:"View documentation"},algorithms:{round_robin_label:"Round Robin",least_connections_label:"Least Connections",consistent_hashing_label:"Consistent Hashing",latency_label:"Latency"},hash_labels:{none:"None",consumer:"Consumer",ip:"IP",header:"Header",cookie:"Cookie",path:"Path",query_argument:"Query Argument",uri_capture:"URI Capture"},hash_tooltips:{hash_on_header:{text:"The header name to take the value from as hash input. Only required when {hash_on} is set to {header}",hash_on:"hash_on",header:"header"},hash_on_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_on} is set to {uri_capture}",hash_on:"hash_on",uri_capture:"uri_capture"},hash_on_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_on} is set to {query_arg}",hash_on:"hash_on",query_arg:"query_arg"},hash_on_cookie:{text:"The cookie name to take the value from as hash input. Only required when {hash_on} or {hash_fallback} is set to {cookie}. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},hash_on_cookie_path:{text:"The cookie path to set in the response headers. Only required when {hash_on} or {hash_fallback} is set to {cookie}.",hash_on:"hash_on",hash_fallback:"hash_fallback",cookie:"cookie"},slots:{text:"The number of slots in the load balancer algorithm. If {algorithm} is set to {round_robin}, this setting determines the maximum number of slots. If {algorithm} is set to {consistent_hashing}, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range {min}-{max}",algorithm:"algorithm",round_robin:"round-robin",consistent_hashing:"consistent-hashing"},tags:"An optional set of strings associated with the Upstream for grouping and filtering.",hash_fallback:{text:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}",hash_on:"hash_on",cookie:"cookie"},hash_fallback_header:{text:"The header name to take the value from as hash input. Only required when {hash_fallback} is set to {header}",hash_fallback:"hash_fallback",header:"header"},hash_fallback_query_arg:{text:"The name of the query string argument to take the value from as hash input. Only required when {hash_fallback} is set to {query_arg}",hash_fallback:"hash_fallback",query_arg:"query_arg"},hash_fallback_uri_capture:{text:"The name of the route URI capture to take the value from as hash input. Only required when {hash_fallback} is set to {uri_capture}",hash_fallback:"hash_fallback",uri_capture:"uri_capture"},host_header:{text:"The hostname to be used as {host} header when proxying requests through Kong.",host:"Host"},client_certificate:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},healthcheck_type_labels:{http:"HTTP",https:"HTTPS",tcp:"TCP",grsp:"gRPC",grsps:"gRPCs"},healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},passive_healthy:{label:"Healthy",help:"The counter thresholds to determine whether targets are healthy."},passive_unhealthy:{label:"Unhealthy",help:"The counter thresholds to determine whether targets are unhealthy."},fields:{name:{label:"Name",placeholder:"Enter or select a host",tooltip:"This is a hostname, which must be equal to the {host} of a Service.",host:"host"},host_header:{label:"Host Header"},client_certificate:{label:"Client Certificate",placeholder:"Select or enter a Certificate ID",tooltip:"If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."},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 Upstream for grouping and filtering."},algorithm:{label:"Algorithm",tooltip:"Which load balancing algorithm to use."},slots:{label:"Slots",help:"Accepts an integer in the range of 10 - 65536"},hash_on:{label:"Hash on",help:"What to use as hashing input.",tooltip:"What to use as hashing input. Using {result} results in a weighted-round-robin scheme with no hashing."},hash_fallback:{label:"Hash Fallback",help:"What to use as hashing input if the primary hash_on does not return a hash",tooltip:"What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}.",hash_on:"hash_on",cookie:"cookie"},active_health_checks:{label:"Active Health Checks",help:"Actively probe the targets for their health."},passive_health_checks:{label:"Passive Health Checks / Circuit Breakers",help:"Checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."},healthchecks_threshold:{label:"Healthchecks Threshold"},header:{label:"Header"},headers:{label:"Headers",tooltip_active:"Header values can be separated by commas (value1, value2, value3)."},cookie:{label:"Cookie"},cookie_path:{label:"Cookie Path"},query_argument:{label:"Query Argument"},uri_capture:{label:"URI Capture"},active_healthcheck_type:{label:"Active Health Check Type"},http_path:{label:"HTTP Path"},timeout:{label:"Timeout"},concurrency:{label:"Concurrency"},https_sni:{label:"HTTPS SNI"},verify_ssl:{label:"Verify the SSL certificate when performing active health checks using HTTPS"},interval:{label:"Interval",help:"A value of zero indicates that active probes for healthy targets are disabled."},successes:{label:"Successes"},http_statuses:{label:"HTTP Statuses"},http_failures:{label:"HTTP Failures"},tcp_failures:{label:"TCP Failures"},timeouts:{label:"Timeouts"},passive_health_check_type:{label:"Passive Health Check Type"}}},labels:{created_at:"Created at"}},targets:{list:{table_headers:{id:"ID",target_address:"Target Address",weight:"Weight",tags:"Tags"},empty_state:{title:"Configure a New Target",description:"A target is an IP address/hostname with a port that identifies an instance of a backend service."},toolbar_actions:{new_target:"New Target"}},title:"Targets",actions:{create:"New Target",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",mark_healthy:"Mark Healthy",mark_unhealthy:"Mark Unhealthy"},delete:{title:"Delete a Target",description:"This action cannot be reversed so make sure to check target usage before deleting."},errors:{general:"Targets could not be retrieved",delete:"The target could not be deleted at this time.",copy:"Failed to copy to clipboard",weight:"Value must be in range 0 to 65535"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{create:{title:"New Target"},edit:{title:"Edit Target"},buttons:{save:"Save",cancel:"Cancel"},fields:{target:{label:"Target Address",placeholder:"Enter IP/hostname and port",tooltip:"The target address (IP or hostname) and port. If omitted the port defaults to 8000."},weight:{label:"Weight",tooltip:"The weight of this target in relation to other targets in the upstream. Value must be in range 0 to 65535, defaults to 100."},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}}}}};function Ti(){const e=Ve.createI18n("en-us",Ii);return{i18n:e,i18nT:Ve.i18nTComponent(e)}}function Fe(e){const{replaceId:l=!1}=e,a=t.ref([]);return{addedItems:a,trackNewItems:(o,i)=>{if(i){const c={...o};l&&(c.value=o.label),a.value.push(c)}else a.value=a.value.filter(c=>c.value!==o.value)}}}const je=[{label:"100",value:"100"},{label:"101",value:"101"},{label:"102",value:"102"},{label:"103",value:"103"},{label:"200",value:"200"},{label:"201",value:"201"},{label:"202",value:"202"},{label:"203",value:"203"},{label:"204",value:"204"},{label:"205",value:"205"},{label:"206",value:"206"},{label:"207",value:"207"},{label:"208",value:"208"},{label:"226",value:"226"},{label:"300",value:"300"},{label:"301",value:"301"},{label:"302",value:"302"},{label:"303",value:"303"},{label:"304",value:"304"},{label:"305",value:"305"},{label:"306",value:"306"},{label:"307",value:"307"},{label:"308",value:"308"},{label:"400",value:"400"},{label:"401",value:"401"},{label:"402",value:"402"},{label:"403",value:"403"},{label:"404",value:"404"},{label:"405",value:"405"},{label:"406",value:"406"},{label:"407",value:"407"},{label:"408",value:"408"},{label:"409",value:"409"},{label:"410",value:"410"},{label:"411",value:"411"},{label:"412",value:"412"},{label:"413",value:"413"},{label:"414",value:"414"},{label:"415",value:"415"},{label:"416",value:"416"},{label:"417",value:"417"},{label:"418",value:"418"},{label:"419",value:"419"},{label:"420",value:"420"},{label:"421",value:"421"},{label:"422",value:"422"},{label:"423",value:"423"},{label:"424",value:"424"},{label:"425",value:"425"},{label:"426",value:"426"},{label:"428",value:"428"},{label:"429",value:"429"},{label:"430",value:"430"},{label:"431",value:"431"},{label:"440",value:"440"},{label:"444",value:"444"},{label:"449",value:"449"},{label:"450",value:"450"},{label:"451",value:"451"},{label:"460",value:"460"},{label:"463",value:"463"},{label:"494",value:"494"},{label:"495",value:"495"},{label:"496",value:"496"},{label:"497",value:"497"},{label:"498",value:"498"},{label:"499",value:"499"},{label:"500",value:"500"},{label:"501",value:"501"},{label:"502",value:"502"},{label:"503",value:"503"},{label:"504",value:"504"},{label:"505",value:"505"},{label:"506",value:"506"},{label:"507",value:"507"},{label:"508",value:"508"},{label:"509",value:"509"},{label:"510",value:"510"},{label:"511",value:"511"},{label:"520",value:"520"},{label:"521",value:"521"},{label:"522",value:"522"},{label:"523",value:"523"},{label:"524",value:"524"},{label:"525",value:"525"},{label:"526",value:"526"},{label:"527",value:"527"},{label:"529",value:"529"},{label:"530",value:"530"},{label:"561",value:"561"},{label:"598",value:"598"},{label:"599",value:"599"}],pt=10,ut=65536,Hi=0,Ei=65535,Ce=0,_e=255,Ka=0,ja=255,Ai=0,Fi=65535,Pa=0,La=65535,Oi=0,qi=2**31,ft=["200","302"],mt=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],gt=["429","404","500","501","502","503","504","505"],yt=["429","500","503"];function Pe(){const e=s=>/^\d+$/.test(s),l=(s,d,u)=>{if(e(s)){const p=Number(s);return p>=d&&p<=u}else return!1},a=s=>s.map(d=>Number(d)),r=s=>s.map(d=>d.toString()),o=()=>({name:"",hostHeader:"",clientCertificate:"",tags:"",algorithm:"round-robin",slots:"10000",hashOn:"none",hashFallback:"none",hashOnHeader:"",hashOnCookie:"",hashOnCookiePath:"/",hashOnQueryArgument:"",hashOnUriCapture:"",hashFallbackHeader:"",hashFallbackQueryArgument:"",hashFallbackUriCapture:"",activeHealthSwitch:!1,passiveHealthSwitch:!1,healthchecksThreshold:"0",activeHealthCheck:{type:"http",httpPath:"/",timeout:"1",concurrency:"10",httpsSni:"",verifySsl:!1,headers:[{key:"",values:""}],interval:"0",successes:"5",httpStatuses:ft,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:gt,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:mt,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:yt,tcpFailures:"5"}});return{isInteger:e,inRange:l,stringToNumberArray:a,numberToStringArray:r,upstreamsResponseToFields:s=>{var u,p,n,y,C,f,m,N,k,S,F,x,H,E,V,I,_,O,q,M,A,$,K,B,U,D,v,w,g,b,j,R,ae,P,W,fe,Oe,Ne,Ja,za,Wa,Qa,Ya,Ga,Za,Xa,el,tl,al,ll,rl,ol,nl,sl,il,cl,dl,hl,pl,ul,fl,ml,gl,yl,kl,bl,Cl,_l,wl,Sl,xl,Nl,Vl,Bl,Il,Tl,Hl,El,Al,Fl,Ol,ql,Ul,$l,vl,Dl,Ml,Kl,jl,Pl,Ll,Rl,Jl,zl,Wl,Ql,Yl,Gl,Zl,Xl,er,tr,ar,lr,rr,or,nr,sr,ir;const d=o();return d.name=s.name||"",d.algorithm=s.algorithm||"round-robin",d.hostHeader=s.host_header||"",d.clientCertificate=s.client_certificate?(u=s.client_certificate)==null?void 0:u.id:"",d.tags=((p=s.tags)==null?void 0:p.join(", "))||"",d.slots=s.slots!==null&&s.slots!==void 0?s.slots.toString():"10000",d.hashOn=s.hash_on||"none",d.hashFallback=s.hash_fallback||"none",d.hashOnHeader=s.hash_on_header||"",d.hashOnCookie=s.hash_on_cookie||"",d.hashOnCookiePath=s.hash_on_cookie_path||"/",d.hashOnQueryArgument=s.hash_on_query_arg||"",d.hashOnUriCapture=s.hash_on_uri_capture||"",d.hashFallbackHeader=s.hash_fallback_header||"",d.hashFallbackQueryArgument=s.hash_fallback_query_arg||"",d.hashFallbackUriCapture=s.hash_fallback_uri_capture||"",d.healthchecksThreshold=s.healthchecks.threshold!==null&&s.healthchecks.threshold!==void 0?s.healthchecks.threshold.toString():"",d.activeHealthSwitch=((y=(n=s.healthchecks.active)==null?void 0:n.healthy)==null?void 0:y.interval)!==0||((f=(C=s.healthchecks.active)==null?void 0:C.unhealthy)==null?void 0:f.interval)!==0,d.activeHealthCheck.type=((m=s.healthchecks.active)==null?void 0:m.type)||"http",d.activeHealthCheck.httpPath=((N=s.healthchecks.active)==null?void 0:N.http_path)||"/",d.activeHealthCheck.timeout=((k=s.healthchecks.active)==null?void 0:k.timeout)!==null&&((S=s.healthchecks.active)==null?void 0:S.timeout)!==void 0?(x=(F=s.healthchecks.active)==null?void 0:F.timeout)==null?void 0:x.toString():"",d.activeHealthCheck.concurrency=((H=s.healthchecks.active)==null?void 0:H.concurrency)!==null&&((E=s.healthchecks.active)==null?void 0:E.concurrency)!==void 0?(I=(V=s.healthchecks.active)==null?void 0:V.concurrency)==null?void 0:I.toString():"",d.activeHealthCheck.httpsSni=((_=s.healthchecks.active)==null?void 0:_.https_sni)||"",d.activeHealthCheck.verifySsl=((O=s.healthchecks.active)==null?void 0:O.https_verify_certificate)||!1,d.activeHealthCheck.headers=(q=s.healthchecks.active)!=null&&q.headers&&Object.entries((M=s.healthchecks.active)==null?void 0:M.headers).length>0?Object.entries((A=s.healthchecks.active)==null?void 0:A.headers).map(([Tc,kt])=>({key:Tc,values:kt==null?void 0:kt.join(", ")})):[{key:"",values:""}],d.activeHealthCheck.interval=((K=($=s.healthchecks.active)==null?void 0:$.healthy)==null?void 0:K.interval)!==null&&((U=(B=s.healthchecks.active)==null?void 0:B.healthy)==null?void 0:U.interval)!==void 0?(w=(v=(D=s.healthchecks.active)==null?void 0:D.healthy)==null?void 0:v.interval)==null?void 0:w.toString():"0",d.activeHealthCheck.interval=((b=(g=s.healthchecks.active)==null?void 0:g.healthy)==null?void 0:b.interval)!==null&&((R=(j=s.healthchecks.active)==null?void 0:j.healthy)==null?void 0:R.interval)!==void 0?(W=(P=(ae=s.healthchecks.active)==null?void 0:ae.healthy)==null?void 0:P.interval)==null?void 0:W.toString():"0",d.activeHealthCheck.successes=((Oe=(fe=s.healthchecks.active)==null?void 0:fe.healthy)==null?void 0:Oe.successes)!==null&&((Ja=(Ne=s.healthchecks.active)==null?void 0:Ne.healthy)==null?void 0:Ja.successes)!==void 0?(Qa=(Wa=(za=s.healthchecks.active)==null?void 0:za.healthy)==null?void 0:Wa.successes)==null?void 0:Qa.toString():"0",d.activeHealthCheck.httpStatuses=(Ga=(Ya=s.healthchecks.active)==null?void 0:Ya.healthy)!=null&&Ga.http_statuses?r(((Xa=(Za=s.healthchecks.active)==null?void 0:Za.healthy)==null?void 0:Xa.http_statuses)||[]):ft,d.activeHealthCheck.unhealthyInterval=((tl=(el=s.healthchecks.active)==null?void 0:el.unhealthy)==null?void 0:tl.interval)!==null&&((ll=(al=s.healthchecks.active)==null?void 0:al.unhealthy)==null?void 0:ll.interval)!==void 0?(nl=(ol=(rl=s.healthchecks.active)==null?void 0:rl.unhealthy)==null?void 0:ol.interval)==null?void 0:nl.toString():"0",d.activeHealthCheck.httpFailures=((il=(sl=s.healthchecks.active)==null?void 0:sl.unhealthy)==null?void 0:il.http_failures)!==null&&((dl=(cl=s.healthchecks.active)==null?void 0:cl.unhealthy)==null?void 0:dl.http_failures)!==void 0?(ul=(pl=(hl=s.healthchecks.active)==null?void 0:hl.unhealthy)==null?void 0:pl.http_failures)==null?void 0:ul.toString():"0",d.activeHealthCheck.unhealthyTimeouts=((ml=(fl=s.healthchecks.active)==null?void 0:fl.unhealthy)==null?void 0:ml.timeouts)!==null&&((yl=(gl=s.healthchecks.active)==null?void 0:gl.unhealthy)==null?void 0:yl.timeouts)!==void 0?(Cl=(bl=(kl=s.healthchecks.active)==null?void 0:kl.unhealthy)==null?void 0:bl.timeouts)==null?void 0:Cl.toString():"0",d.activeHealthCheck.unhealthyHttpStatuses=(wl=(_l=s.healthchecks.active)==null?void 0:_l.unhealthy)!=null&&wl.http_statuses?r(((xl=(Sl=s.healthchecks.active)==null?void 0:Sl.unhealthy)==null?void 0:xl.http_statuses)||[]):gt,d.passiveHealthSwitch=((Vl=(Nl=s.healthchecks.passive)==null?void 0:Nl.healthy)==null?void 0:Vl.successes)!==0||((Il=(Bl=s.healthchecks.passive)==null?void 0:Bl.unhealthy)==null?void 0:Il.timeouts)!==0||((Hl=(Tl=s.healthchecks.passive)==null?void 0:Tl.unhealthy)==null?void 0:Hl.tcp_failures)!==0||((Al=(El=s.healthchecks.passive)==null?void 0:El.unhealthy)==null?void 0:Al.http_failures)!==0,d.passiveHealthCheck.type=((Fl=s.healthchecks.passive)==null?void 0:Fl.type)||"http",d.passiveHealthCheck.successes=((ql=(Ol=s.healthchecks.passive)==null?void 0:Ol.healthy)==null?void 0:ql.successes)!==null&&(($l=(Ul=s.healthchecks.passive)==null?void 0:Ul.healthy)==null?void 0:$l.successes)!==void 0?(Ml=(Dl=(vl=s.healthchecks.passive)==null?void 0:vl.healthy)==null?void 0:Dl.successes)==null?void 0:Ml.toString():"0",d.passiveHealthCheck.httpStatuses=(jl=(Kl=s.healthchecks.passive)==null?void 0:Kl.healthy)!=null&&jl.http_statuses?r(((Ll=(Pl=s.healthchecks.passive)==null?void 0:Pl.healthy)==null?void 0:Ll.http_statuses)||[]):mt,d.passiveHealthCheck.timeouts=((Jl=(Rl=s.healthchecks.passive)==null?void 0:Rl.unhealthy)==null?void 0:Jl.timeouts)!==null&&((Wl=(zl=s.healthchecks.passive)==null?void 0:zl.unhealthy)==null?void 0:Wl.timeouts)!==void 0?(Gl=(Yl=(Ql=s.healthchecks.passive)==null?void 0:Ql.unhealthy)==null?void 0:Yl.timeouts)==null?void 0:Gl.toString():"0",d.passiveHealthCheck.tcpFailures=((Xl=(Zl=s.healthchecks.passive)==null?void 0:Zl.unhealthy)==null?void 0:Xl.tcp_failures)!==null&&((tr=(er=s.healthchecks.passive)==null?void 0:er.unhealthy)==null?void 0:tr.tcp_failures)!==void 0?(rr=(lr=(ar=s.healthchecks.passive)==null?void 0:ar.unhealthy)==null?void 0:lr.tcp_failures)==null?void 0:rr.toString():"",d.passiveHealthCheck.unhealthyHttpStatuses=(nr=(or=s.healthchecks.passive)==null?void 0:or.unhealthy)!=null&&nr.http_statuses?r(((ir=(sr=s.healthchecks.passive)==null?void 0:sr.unhealthy)==null?void 0:ir.http_statuses)||[]):yt,d},getDefaultUpstreamFields:o,objectsAreEqual:(s,d)=>{try{return JSON.stringify(s)===JSON.stringify(d)}catch{return!1}},cloneDeep:s=>JSON.parse(JSON.stringify(s))}}const ie={useI18n:Ti,useMultiselectCreation:Fe,useHelpers:Pe},we="/api/runtime_groups/{controlPlaneId}",Se="/{workspace}",xe={list:{konnect:`${we}/upstreams`,kongManager:`${Se}/upstreams`},form:{konnect:{getServices:`${we}/services`,getCertificates:`${we}/certificates`,validate:`${we}/v1/schemas/json/upstream/validate`,create:`${we}/upstreams`,edit:`${we}/upstreams/{id}`},kongManager:{getServices:`${Se}/services`,getCertificates:`${Se}/certificates`,validate:`${Se}/schemas/upstreams/validate`,create:`${Se}/upstreams`,edit:`${Se}/upstreams/{id}`}}},Rc="",Ui={class:"kong-ui-entities-upstreams-list"},$i={class:"upstream-name"},vi=t.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},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}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:l}){var K;const a=e,{i18n:{t:r}}=ie.useI18n(),o=Je.useRouter(),{axiosInstance:i}=Ke({headers:(K=a.config)==null?void 0:K.requestHeaders}),c=t.ref(1),h=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),s={name:{label:r("upstreams.list.table_headers.name"),searchable:!0,sortable:!0},slots:{label:r("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:r("upstreams.list.table_headers.tags"),sortable:!1}},d=s,u=t.computed(()=>{var U,D;let B=`${a.config.apiBaseUrl}${xe.list[a.config.app]}`;return a.config.app==="konnect"?B=B.replace(/{controlPlaneId}/gi,((U=a.config)==null?void 0:U.controlPlaneId)||""):a.config.app==="kongManager"&&(B=B.replace(/\/{workspace}/gi,(D=a.config)!=null&&D.workspace?`/${a.config.workspace}`:"")),B}),p=t.ref(""),n=t.computed(()=>{const B=a.config.app==="konnect"||a.config.isExactMatch;if(B)return{isExactMatch:B,placeholder:r("upstreams.search.placeholder")};const{name:U,slots:D}=s;return{isExactMatch:B,fields:{name:U,slots:D},schema:a.config.filterSchema}}),{fetcher:y,fetcherState:C}=Da(a.config,u.value),f=()=>{p.value=""},m=()=>{c.value++},N=t.ref(""),k=(B,U)=>{const D=B.id;if(!U(D)){l("copy:error",{entity:B,field:"id",message:r("upstreams.errors.copy")});return}l("copy:success",{entity:B,field:"id",message:r("upstreams.copy.success",{val:D})})},S=(B,U)=>{const D=JSON.stringify(B);if(!U(D)){l("copy:error",{entity:B,message:r("upstreams.errors.copy")});return}l("copy:success",{entity:B,message:r("upstreams.copy.success_brief")})},F=async B=>{var D;await((D=a.canRetrieve)==null?void 0:D.call(a,B))&&o.push(a.config.getViewRoute(B.id))},x=B=>({label:r("upstreams.actions.view"),to:a.config.getViewRoute(B)}),H=B=>({label:r("upstreams.actions.edit"),to:a.config.getEditRoute(B)}),E=t.ref(void 0),V=t.ref(!1),I=t.ref(!1),_=t.ref(""),O=$a(a.config,u.value),q=B=>{E.value=B,V.value=!0},M=()=>{V.value=!1},A=async()=>{var B,U,D;if((B=E.value)!=null&&B.id){I.value=!0;try{await i.delete(O(E.value.id)),I.value=!1,V.value=!1,c.value++,l("delete:success",E.value)}catch(v){_.value=((D=(U=v.response)==null?void 0:U.data)==null?void 0:D.message)||v.message||r("upstreams.errors.delete"),l("error",v)}finally{I.value=!1}}};t.watch(C,B=>{if(B.status===de.Error){N.value=r("upstreams.errors.general"),l("error",B.error);return}N.value=""});const $=t.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:r("upstreams.list.empty_state.description"),title:r("upstreams.title")});return t.onBeforeMount(async()=>{await a.canCreate()&&($.value.title=r("upstreams.list.empty_state.title"),$.value.ctaText=r("upstreams.actions.create"))}),(B,U)=>{const D=t.resolveComponent("KButton"),v=t.resolveComponent("KBadge"),w=t.resolveComponent("KTruncate"),g=t.resolveComponent("KDropdownItem"),b=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Ui,[t.createVNode(t.unref(qa),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":h.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":N.value,fetcher:t.unref(y),"fetcher-cache-key":c.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:p.value,"table-headers":t.unref(d),onClearSearchInput:f,"onClick:row":U[1]||(U[1]=j=>F(j)),onSort:m},{"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(_i),{modelValue:p.value,"onUpdate:modelValue":U[0]||(U[0]=j=>p.value=j),config:n.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(D,{appearance:"primary","data-testid":"toolbar-add-upstream",icon:"plus",to:e.config.createRoute},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:t.withCtx(({rowValue:j})=>[t.createElementVNode("span",$i,t.toDisplayString(j),1)]),tags:t.withCtx(({rowValue:j})=>[t.createVNode(w,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j,R=>(t.openBlock(),t.createBlock(v,{key:R,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(R),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:j})=>[t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-id",onClick:ae=>k(j,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-json",onClick:ae=>S(j,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canRetrieve(j)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-view","has-divider":"",item:x(j.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(j)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-edit",item:H(j.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(j)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:R=>q(j)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),t.createVNode(t.unref(Ua),{"action-pending":I.value,description:t.unref(r)("upstreams.delete.description"),"entity-name":E.value&&(E.value.name||E.value.id),"entity-type":t.unref(ze).Upstream,error:_.value,title:t.unref(r)("upstreams.delete.title"),visible:V.value,onCancel:M,onProceed:A},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Jc="",ce=(e,l)=>{const a=e.__vccOpts||e;for(const[r,o]of l)a[r]=o;return a},Di=ce(vi,[["__scopeId","data-v-033bd1ef"]]),Le={list:{konnect:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",kongManager:"/{workspace}/upstreams/{upstreamId}/targets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",edit:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/target/validate"},kongManager:{create:"/{workspace}/upstreams/{upstreamId}/targets",edit:"/{workspace}/upstreams/{upstreamId}/targets/{id}",validate:"/{workspace}/schemas/targets/validate"}}},Mi={class:"kong-ui-entities-target-form"},Ki={class:"target-form-container"},ji={key:0,class:"target-form-info"},Pi=t.defineComponent({__name:"TargetForm",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.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(e,{emit:l}){var F;const a=e;t.useCssVars(x=>({"2cc5362c":S.value}));const{i18n:{t:r}}=ie.useI18n(),{getMessageFromError:o}=va(),{axiosInstance:i}=Ke({headers:(F=a.config)==null?void 0:F.requestHeaders}),c=t.computed(()=>{var x;return Le.form[a.config.app].edit.replace(/{upstreamId}/gi,((x=a.config)==null?void 0:x.upstreamId)||"")}),h=t.computed(()=>a.targetId?re.Edit:re.Create),s=t.computed(()=>h.value===re.Edit?r("targets.form.edit.title"):r("targets.form.create.title")),d=t.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),u=t.reactive({target:"",weight:100,tags:""}),p={target:"",weight:100,tags:""},n=t.computed(()=>{const x=parseInt(d.fields.weight.toString(),10);return x<0||x>65535}),y=t.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(u)&&!!d.fields.target&&!!d.fields.weight&&!n.value),C=x=>{var H;d.fields.target=(x==null?void 0:x.target)||"",d.fields.weight=(x==null?void 0:x.weight)??"",d.fields.tags=((H=x==null?void 0:x.tags)==null?void 0:H.join(", "))||"",Object.assign(u,d.fields)},f=()=>{d.errorMessage="",l("cancel")},m=t.computed(()=>{var H,E;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app].validate}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((H=a.config)==null?void 0:H.controlPlaneId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(E=a.config)!=null&&E.workspace?`/${a.config.workspace}`:"")),x=x.replace(/{id}/gi,a.targetId),x}),N=t.computed(()=>{var H,E,V,I;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app][h.value]}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((H=a.config)==null?void 0:H.controlPlaneId)||"").replace(/{upstreamId}/gi,((E=a.config)==null?void 0:E.upstreamId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(V=a.config)!=null&&V.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((I=a.config)==null?void 0:I.upstreamId)||"")),x=x.replace(/{id}/gi,a.targetId),x}),k=async()=>{var x,H,E,V,I;try{d.isReadonly=!0,d.errorMessage="";const _={target:d.fields.target,weight:parseInt(d.fields.weight),tags:(E=(H=(x=d.fields.tags)==null?void 0:x.split(","))==null?void 0:H.map(q=>String(q||"").trim()))==null?void 0:E.filter(q=>q!==""),upstream:{id:a.config.upstreamId}};let O;if(await i.post(m.value,_),h.value==="create"?O=await i.post(N.value,_):h.value==="edit"&&(O=((V=a.config)==null?void 0:V.app)==="konnect"?await i.put(N.value,_):await i.patch(N.value,_)),O){const{data:q}=O;d.fields.target=(q==null?void 0:q.name)||"",d.fields.weight=(q==null?void 0:q.weight)??100,d.fields.tags=((I=q==null?void 0:q.tags)==null?void 0:I.join(", "))||"",l("update",q),Object.assign(d.fields,p)}}catch(_){d.errorMessage=o(_),l("error",_)}finally{d.isReadonly=!1}},S=t.computed(()=>d.isReadonly?"inline-flex":"none");return t.watch(()=>a.targetId,()=>{Object.assign(d.fields,p)}),(x,H)=>{const E=t.resolveComponent("KInput"),V=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(V,{"action-button-text":t.unref(r)("targets.form.buttons.save"),"action-pending":!y.value||d.isReadonly,"cancel-button-text":t.unref(r)("targets.form.buttons.cancel"),"is-visible":e.isVisible,title:s.value,onCanceled:f,onProceed:k},{"body-content":t.withCtx(()=>[t.createElementVNode("div",Mi,[t.createVNode(t.unref(Oa),{config:e.config,"edit-id":e.targetId,"error-message":d.errorMessage,"fetch-url":c.value,"is-readonly":d.isReadonly,onCancel:f,"onFetch:error":H[3]||(H[3]=I=>x.$emit("error",I)),"onFetch:success":C,onLoading:H[4]||(H[4]=I=>x.$emit("loading",I))},{default:t.withCtx(()=>[t.createElementVNode("div",Ki,[x.$slots.info?(t.openBlock(),t.createElementBlock("div",ji,[t.renderSlot(x.$slots,"info",{},void 0,!0)])):t.createCommentVNode("",!0),t.createVNode(E,{modelValue:d.fields.target,"onUpdate:modelValue":H[0]||(H[0]=I=>d.fields.target=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:t.unref(r)("targets.form.fields.target.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.target.tooltip")},placeholder:t.unref(r)("targets.form.fields.target.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),t.createVNode(E,{modelValue:d.fields.weight,"onUpdate:modelValue":H[1]||(H[1]=I=>d.fields.weight=I),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight","error-message":t.unref(r)("targets.errors.weight"),"has-error":n.value,label:t.unref(r)("targets.form.fields.weight.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.weight.tooltip")},max:"65535",min:"0",readonly:d.isReadonly,required:"",type:"number"},null,8,["modelValue","error-message","has-error","label","label-attributes","readonly"]),t.createVNode(E,{modelValue:d.fields.tags,"onUpdate:modelValue":H[2]||(H[2]=I=>d.fields.tags=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:t.unref(r)("targets.form.fields.tags.help"),label:t.unref(r)("targets.form.fields.tags.label"),placeholder:t.unref(r)("targets.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","error-message","fetch-url","is-readonly"])])]),_:3},8,["action-button-text","action-pending","cancel-button-text","is-visible","title"])}}}),zc="",Ra=ce(Pi,[["__scopeId","data-v-77134304"]]),Li={class:"kong-ui-entities-targets-list"},Ri={class:"target-address"},Ji=t.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.upstreamId||e.app==="kongManager"&&(typeof e.canMarkHealthy>"u"||typeof e.canMarkUnhealthy>"u"))},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}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(e,{emit:l}){var D;const a=e,{i18n:{t:r}}=ie.useI18n(),{axiosInstance:o}=Ke({headers:(D=a.config)==null?void 0:D.requestHeaders}),i=t.ref(1),c=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),s={target:{label:r("targets.list.table_headers.target_address"),sortable:!0},weight:{label:r("targets.list.table_headers.weight"),sortable:!0},tags:{label:r("targets.list.table_headers.tags"),sortable:!1}},d=t.computed(()=>{var w,g,b,j;let v=`${a.config.apiBaseUrl}${Le.list[a.config.app]}`;return a.config.app==="konnect"?v=v.replace(/{controlPlaneId}/gi,((w=a.config)==null?void 0:w.controlPlaneId)||"").replace(/{upstreamId}/gi,((g=a.config)==null?void 0:g.upstreamId)||""):a.config.app==="kongManager"&&(v=v.replace(/\/{workspace}/gi,(b=a.config)!=null&&b.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((j=a.config)==null?void 0:j.upstreamId)||"")),v}),{fetcher:u,fetcherState:p}=Da(a.config,d.value),n=()=>{i.value++},y=t.ref(""),C=()=>{$.value=!0},f=(v,w)=>{const g=v.id;if(!w(g)){l("copy:error",{entity:v,field:"id",message:r("targets.errors.copy")});return}l("copy:success",{entity:v,field:"id",message:r("targets.copy.success",{val:g})})},m=(v,w)=>{const g=JSON.stringify(v);if(!w(g)){l("copy:error",{entity:v,message:r("targets.errors.copy")});return}l("copy:success",{entity:v,message:r("targets.copy.success_brief")})},N=v=>{A.value=v,$.value=!0},k=v=>a.config.app==="konnect"?!1:a.config.canMarkHealthy(v),S=v=>a.config.app==="konnect"?!1:a.config.canMarkUnhealthy(v),F=t.ref(void 0),x=t.ref(!1),H=t.ref(!1),E=t.ref(""),V=$a(a.config,d.value),I=v=>{F.value=v,x.value=!0},_=()=>{x.value=!1},O=async()=>{var v,w,g;if((v=F.value)!=null&&v.id){H.value=!0;try{await o.delete(V(F.value.id)),H.value=!1,x.value=!1,i.value++,l("delete:success",F.value)}catch(b){E.value=((g=(w=b.response)==null?void 0:w.data)==null?void 0:g.message)||b.message||r("targets.errors.delete"),l("error",b)}finally{H.value=!1}}};t.watch(p,v=>{if(v.status===de.Error){y.value=r("targets.errors.general"),l("error",v.error);return}y.value=""});const q=t.ref({ctaText:void 0,message:r("targets.list.empty_state.description"),title:r("targets.title"),...a.config.createRoute&&{ctaPath:a.config.createRoute}});t.onBeforeMount(async()=>{await a.canCreate()&&(q.value.title=r("targets.list.empty_state.title"),q.value.ctaText=r("targets.actions.create"))});const M=t.computed(()=>({app:a.config.app,apiBaseUrl:a.config.apiBaseUrl,upstreamId:a.config.upstreamId,...a.config.app==="konnect"&&{controlPlaneId:a.config.controlPlaneId},...a.config.app==="kongManager"&&{workspace:a.config.workspace,requestHeaders:a.config.requestHeaders}})),A=t.ref(""),$=t.ref(!1),K=v=>{A.value?l("update:target",v):l("create:target",v),B()},B=()=>{U(),i.value++},U=()=>{$.value=!1,A.value=""};return(v,w)=>{const g=t.resolveComponent("KButton"),b=t.resolveComponent("KBadge"),j=t.resolveComponent("KTruncate"),R=t.resolveComponent("KDropdownItem"),ae=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Li,[t.createVNode(t.unref(qa),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":c.value,"empty-state-options":q.value,"enable-entity-actions":"","error-message":y.value,fetcher:t.unref(u),"fetcher-cache-key":i.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":t.unref(s),onEmptyStateCtaClicked:w[1]||(w[1]=()=>a.config.createRoute?void 0:C()),onSort:n},{"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(g,{appearance:"primary","data-testid":"toolbar-new-target",icon:"plus",to:a.config.createRoute?a.config.createRoute:void 0,onClick:w[0]||(w[0]=()=>a.config.createRoute?void 0:C())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),target:t.withCtx(({rowValue:P})=>[t.createElementVNode("span",Ri,t.toDisplayString(P),1)]),tags:t.withCtx(({rowValue:P})=>[t.createVNode(j,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P,W=>(t.openBlock(),t.createBlock(b,{key:W,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(W),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:P})=>[t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:fe=>f(P,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:fe=>m(P,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-edit","has-divider":"",onClick:W=>N(P.id)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>k(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-healthy",onClick:W=>l("health-actions:healthy",P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>S(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-unhealthy",onClick:W=>l("health-actions:unhealthy",P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(P)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:W=>I(P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),t.createVNode(t.unref(Ua),{"action-pending":H.value,description:t.unref(r)("targets.delete.description"),"entity-type":t.unref(ze).Target,error:E.value,"need-confirm":!1,title:t.unref(r)("targets.delete.title"),visible:x.value,onCancel:_,onProceed:O},null,8,["action-pending","description","entity-type","error","title","visible"]),t.createVNode(Ra,{config:M.value,"is-visible":$.value,"target-id":A.value,onCancel:U,onUpdate:K},t.createSlots({_:2},[v.$slots["form-info"]?{name:"info",fn:t.withCtx(()=>[t.renderSlot(v.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),Wc="",zi=ce(Ji,[["__scopeId","data-v-aba40390"]]),Wi={key:1},Qi=t.defineComponent({__name:"UpstreamsFormGeneralInfo",props:{config:{type:Object,required:!0},name:{type:String,required:!0},hostHeader:{type:String,required:!0},clientCertificate:{type:String,required:!0},tags:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:name","update:host-header","update:client-certificate","update:tags"],setup(e,{emit:l}){var _,O,q,M;const a=e,{i18nT:r,i18n:{t:o}}=ie.useI18n(),{debouncedQueryChange:i,loading:c,loadItems:h,results:s,allRecords:d}=Ma(a.config,(O=xe.form[(_=a.config)==null?void 0:_.app])==null?void 0:O.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:u,loading:p,loadItems:n,results:y}=Ma(a.config,(M=xe.form[(q=a.config)==null?void 0:q.app])==null?void 0:M.getCertificates),C=t.ref(""),f=t.computed(()=>{var A;return!!a.name&&!((A=d.value)!=null&&A.some($=>$.host===a.name))}),m=t.computed(()=>{var $,K,B;const A=f.value&&a.name.includes(($=C.value)==null?void 0:$.toLowerCase());return(B=s.value)==null?void 0:B.map(U=>({label:U.host,value:U.id})).concat(A?[{label:a.name,value:((K=S.value)==null?void 0:K.value)||a.name}]:[])}),N=t.computed(()=>{var A;return(A=y.value)==null?void 0:A.map($=>({label:$.id,value:$.id}))}),k=t.ref(""),S=t.ref({value:"",label:""}),F=t.computed(()=>{var A,$;return((A=m.value.find(K=>K.value===k.value))==null?void 0:A.label)||(($=S.value)==null?void 0:$.label)}),x=A=>{C.value=A,i(A)},H=A=>{S.value=A},E=()=>{S.value={value:"",label:""}},V=A=>{k.value=A,l("update:name",F.value)},I=t.ref(!1);return t.onBeforeMount(async()=>{var A,$;try{I.value=!0,await h(),a.name&&(k.value=(($=(A=m.value.find(K=>K.label===a.name))==null?void 0:A.value)==null?void 0:$.toString())||a.name),await n()}finally{I.value=!1}}),(A,$)=>{const K=t.resolveComponent("KSkeleton"),B=t.resolveComponent("KSelect"),U=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-general-info",description:t.unref(o)("upstreams.form.general_info.help"),title:t.unref(o)("upstreams.form.general_info.title")},{default:t.withCtx(()=>[I.value?(t.openBlock(),t.createBlock(K,{key:0,type:"form"})):(t.openBlock(),t.createElementBlock("div",Wi,[t.createVNode(B,{appearance:"select",autosuggest:"",class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"",items:m.value,label:t.unref(o)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},loading:t.unref(c),"model-value":k.value,placeholder:t.unref(o)("upstreams.form.fields.name.placeholder"),readonly:e.readonly,required:"",width:"100%","onItem:added":H,"onItem:removed":E,onQueryChange:x,"onUpdate:modelValue":V},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),t.createVNode(U,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:t.unref(o)("upstreams.form.fields.host_header.label"),"model-value":e.hostHeader,readonly:e.readonly,type:"text","onUpdate:modelValue":$[0]||($[0]=D=>l("update:host-header",D))},null,8,["label","model-value","readonly"]),t.createVNode(B,{appearance:"select",autosuggest:"",class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"",items:N.value,label:t.unref(o)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:t.unref(o)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"250px"}},loading:t.unref(p),"model-value":e.clientCertificate,placeholder:t.unref(o)("upstreams.form.fields.client_certificate.placeholder"),readonly:e.readonly,width:"100%",onQueryChange:t.unref(u),"onUpdate:modelValue":$[1]||($[1]=D=>l("update:client-certificate",D))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),t.createVNode(U,{autocomplete:"off","data-testid":"upstreams-form-tags",help:t.unref(o)("upstreams.form.fields.tags.help"),label:t.unref(o)("upstreams.form.fields.tags.label"),"label-attributes":{info:t.unref(o)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250px"}},"model-value":e.tags,placeholder:t.unref(o)("upstreams.form.fields.tags.placeholder"),readonly:e.readonly,type:"text","onUpdate:modelValue":$[2]||($[2]=D=>l("update:tags",D))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),Qc="",Yi=ce(Qi,[["__scopeId","data-v-02065a3d"]]),Re={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},Gi={class:"fields-group-title"},Zi={class:"fields-group-text"},Xi={class:"fields-group-title"},ec={class:"fields-group-text"},tc=t.defineComponent({__name:"UpstreamsFormLoadBalancing",props:{algorithm:{type:String,required:!0},slots:{type:String,required:!0},hashOn:{type:String,required:!0},hashFallback:{type:String,required:!0},hashOnHeader:{type:String,required:!0},hashOnCookie:{type:String,required:!0},hashOnCookiePath:{type:String,required:!0},hashOnQueryArgument:{type:String,required:!0},hashOnUriCapture:{type:String,required:!0},hashFallbackHeader:{type:String,required:!0},hashFallbackQueryArgument:{type:String,required:!0},hashFallbackUriCapture:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:algorithm","update:slots","update:hash-on","update:hash-fallback","update:hash-on-header","update:hash-on-cookie","update:hash-on-cookie-path","update:hash-on-query-argument","update:hash-on-uri-capture","update:hash-fallback-header","update:hash-fallback-query-argument","update:hash-fallback-uri-capture"],setup(e,{emit:l}){const a=e,{i18nT:r,i18n:{t:o}}=ie.useI18n(),{inRange:i}=Pe(),c=t.ref([{label:o("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:o("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:o("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:o("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),h=t.ref([{label:o("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:o("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:o("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:o("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:o("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:o("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:o("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:o("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);t.watch(()=>a.hashOn,(u,p)=>{p==="header"&&u!==p&&l("update:hash-on-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-on-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-on-uri-capture",""),(u==="cookie"||u==="none")&&(l("update:hash-fallback","none"),l("update:hash-fallback-header",""),l("update:hash-fallback-query-argument",""),l("update:hash-fallback-uri-capture",""))}),t.watch(()=>a.hashFallback,(u,p)=>{p==="header"&&u!==p&&l("update:hash-fallback-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-fallback-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-fallback-uri-capture","")});const s=t.computed(()=>a.hashOn==="cookie"||a.hashOn==="none"),d=t.computed(()=>a.slots?i(a.slots,pt,ut)?"":o("upstreams.form.errors.in_range"):"");return(u,p)=>{const n=t.resolveComponent("KExternalLink"),y=t.resolveComponent("KSelect"),C=t.resolveComponent("KInput"),f=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-load-balancing",title:t.unref(o)("upstreams.form.load_balancing.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(o)("upstreams.form.load_balancing.help"))+" ",1),t.createVNode(n,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(y,{appearance:"select",class:"algorithm-select",items:c.value,label:t.unref(o)("upstreams.form.fields.algorithm.label"),"model-value":e.algorithm,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[0]||(p[0]=m=>l("update:algorithm",m))},null,8,["items","label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off","data-testid":"upstreams-form-slots","error-message":d.value,"has-error":!!d.value,help:t.unref(o)("upstreams.form.fields.slots.help"),label:t.unref(o)("upstreams.form.fields.slots.label"),max:t.unref(ut),min:t.unref(pt),"model-value":e.slots,readonly:e.readonly,type:"number","onUpdate:modelValue":p[1]||(p[1]=m=>l("update:slots",m))},null,8,["error-message","has-error","help","label","max","min","model-value","readonly"]),t.createVNode(f,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Gi,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_on.label")),1),t.createElementVNode("p",Zi,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_on.help")),1),t.createVNode(y,{appearance:"select",class:"hash-on-select",items:h.value,label:t.unref(o)("upstreams.form.fields.hash_on.label"),"model-value":e.hashOn,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[2]||(p[2]=m=>l("update:hash-on",m))},null,8,["items","label","model-value","readonly"]),e.hashOn==="header"?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:t.unref(o)("upstreams.form.fields.header.label"),"model-value":e.hashOnHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[3]||(p[3]=m=>l("update:hash-on-header",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(o)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[4]||(p[4]=m=>l("update:hash-on-cookie",m))},null,8,["label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(o)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[5]||(p[5]=m=>l("update:hash-on-cookie-path",m))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashOn==="query_arg"?(t.openBlock(),t.createBlock(C,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:t.unref(o)("upstreams.form.fields.query_argument.label"),"model-value":e.hashOnQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[6]||(p[6]=m=>l("update:hash-on-query-argument",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="uri_capture"?(t.openBlock(),t.createBlock(C,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:t.unref(o)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashOnUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[7]||(p[7]=m=>l("update:hash-on-uri-capture",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1}),t.createVNode(f,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Xi,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.label")),1),t.createElementVNode("p",ec,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.help")),1),t.createVNode(y,{appearance:"select",class:"hash-fallback-select",disabled:s.value,items:h.value,label:t.unref(o)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},"model-value":e.hashFallback,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[8]||(p[8]=m=>l("update:hash-fallback",m))},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(o)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),e.hashFallback==="header"?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:t.unref(o)("upstreams.form.fields.header.label"),"model-value":e.hashFallbackHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[9]||(p[9]=m=>l("update:hash-fallback-header",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(o)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[10]||(p[10]=m=>l("update:hash-on-cookie",m))},null,8,["label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(o)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[11]||(p[11]=m=>l("update:hash-on-cookie-path",m))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashFallback==="query_arg"?(t.openBlock(),t.createBlock(C,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:t.unref(o)("upstreams.form.fields.query_argument.label"),"model-value":e.hashFallbackQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[12]||(p[12]=m=>l("update:hash-fallback-query-argument",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="uri_capture"?(t.openBlock(),t.createBlock(C,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:t.unref(o)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashFallbackUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[13]||(p[13]=m=>l("update:hash-fallback-uri-capture",m))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),Yc="",ac=ce(tc,[["__scopeId","data-v-522adce0"]]),lc={class:"fields-group-title"},rc={class:"fields-group-text"},oc={class:"fields-group-title"},nc={class:"fields-group-text"},sc=t.defineComponent({__name:"UpstreamsFormHealthChecks",props:{activeHealthSwitch:{type:Boolean,required:!0},passiveHealthSwitch:{type:Boolean,required:!0},healthchecksThreshold:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:active-health-switch","update:passive-health-switch","update:healthchecks-threshold"],setup(e,{emit:l}){const{i18n:{t:a}}=ie.useI18n();return(r,o)=>{const i=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KInputSwitch"),h=t.resolveComponent("KCard"),s=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-healthchecks",title:t.unref(a)("upstreams.form.health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.health_check.help"))+" ",1),t.createVNode(i,{"hide-icon":"",href:t.unref(Re).loadBalancing},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",lc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.label")),1),t.createElementVNode("p",rc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.help")),1),t.createVNode(c,{class:"active-health-switch","data-testid":"active-health-switch",disabled:e.readonly,"model-value":e.activeHealthSwitch,onChange:o[0]||(o[0]=d=>l("update:active-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",oc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.label")),1),t.createElementVNode("p",nc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.help")),1),t.createVNode(c,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:e.readonly,"model-value":e.passiveHealthSwitch,onChange:o[1]||(o[1]=d=>l("update:passive-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(s,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:t.unref(a)("upstreams.form.fields.healthchecks_threshold.label"),max:t.unref(Ei),min:t.unref(Hi),"model-value":e.healthchecksThreshold,readonly:e.readonly,type:"number","onUpdate:modelValue":o[2]||(o[2]=d=>l("update:healthchecks-threshold",d))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),Gc="",ic=ce(sc,[["__scopeId","data-v-7fda4841"]]),cc={key:2},dc={class:"fields-group-title"},hc={class:"fields-group-text"},pc={class:"fields-group-title"},uc={class:"fields-group-text"},fc=t.defineComponent({__name:"UpstreamsFormActiveHealthCheck",props:{config:{type:Object,required:!0},type:{type:String,required:!0},httpPath:{type:String,required:!0},timeout:{type:String,required:!0},concurrency:{type:String,required:!0},httpsSni:{type:String,required:!0},verifySsl:{type:Boolean,required:!0},headers:{type:Array,required:!0},interval:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},unhealthyInterval:{type:String,required:!0},httpFailures:{type:String,required:!0},tcpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:http-path","update:timeout","update:concurrency","update:https-sni","update:verify-ssl","update:headers","update:interval","update:successes","update:http-statuses","update:unhealthy-interval","update:http-failures","update:tcp-failures","update:unhealthy-http-statuses","update:unhealthy-timeouts"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),{objectsAreEqual:o}=Pe(),i=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),c=t.computed(()=>a.type==="https"||a.type==="grpcs"),h=t.computed(()=>a.type==="tcp"),{trackNewItems:s}=Fe({replaceId:!0}),{trackNewItems:d}=Fe({replaceId:!0});t.watch(()=>a.type,(C,f)=>{f==="tcp"&&C!==f&&l("update:tcp-failures","5"),(f==="https"||f==="grpcs")&&C!==f&&(l("update:https-sni",""),l("update:verify-ssl",!1)),f!=="tcp"&&C==="tcp"&&(l("update:http-path","/"),l("update:http-statuses",ft),l("update:unhealthy-http-statuses",gt))});const u=t.ref([{key:"",values:""}]);t.watch(()=>a.headers,C=>{o(u.value,C)||(u.value=[...C])},{immediate:!0,deep:!0});const p=()=>{l("update:headers",u.value)},n=()=>{u.value.push({key:"",values:""}),p()},y=C=>{C===0&&u.value.length===1?u.value[0]={key:"",values:""}:u.value.splice(C,1),p()};return(C,f)=>{const m=t.resolveComponent("KExternalLink"),N=t.resolveComponent("KSelect"),k=t.resolveComponent("KInput"),S=t.resolveComponent("KCheckbox"),F=t.resolveComponent("KLabel"),x=t.resolveComponent("KIcon"),H=t.resolveComponent("KButton"),E=t.resolveComponent("KMultiselect"),V=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-active-healthcheck",title:t.unref(r)("upstreams.form.active_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.active_health_check.help"))+" ",1),t.createVNode(m,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>{var I;return[t.createVNode(N,{appearance:"select",class:"active-healthcheck-type-select",items:i.value,label:t.unref(r)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":f[0]||(f[0]=_=>l("update:type",_))},null,8,["items","label","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:t.unref(r)("upstreams.form.fields.http_path.label"),"model-value":e.httpPath,readonly:e.readonly,type:"text","onUpdate:modelValue":f[1]||(f[1]=_=>l("update:http-path",_))},null,8,["label","model-value","readonly"])),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:t.unref(r)("upstreams.form.fields.timeout.label"),max:t.unref(Fi),min:t.unref(Ai),"model-value":e.timeout,readonly:e.readonly,type:"number","onUpdate:modelValue":f[2]||(f[2]=_=>l("update:timeout",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:t.unref(r)("upstreams.form.fields.concurrency.label"),max:t.unref(qi),min:t.unref(Oi),"model-value":e.concurrency,readonly:e.readonly,type:"number","onUpdate:modelValue":f[3]||(f[3]=_=>l("update:concurrency",_))},null,8,["label","max","min","model-value","readonly"]),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:t.unref(r)("upstreams.form.fields.https_sni.label"),"model-value":e.httpsSni,readonly:e.readonly,type:"text","onUpdate:modelValue":f[4]||(f[4]=_=>l("update:https-sni",_))},null,8,["label","model-value","readonly"]),t.createVNode(S,{"data-testid":"active-healthcheck-verify-ssl",disabled:e.readonly,label:t.unref(r)("upstreams.form.fields.verify_ssl.label"),"model-value":e.verifySsl,"onUpdate:modelValue":f[5]||(f[5]=_=>l("update:verify-ssl",_))},null,8,["disabled","label","model-value"])],64)):t.createCommentVNode("",!0),((I=e.config)==null?void 0:I.app)==="kongManager"?(t.openBlock(),t.createElementBlock("div",cc,[t.createVNode(F,{info:t.unref(r)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(_,O)=>(t.openBlock(),t.createElementBlock("div",{key:`${_.header}_${O}`,class:t.normalizeClass(["headers-row",{"margin-top-6":O>0}])},[t.createVNode(k,{modelValue:u.value[O].key,"onUpdate:modelValue":q=>u.value[O].key=q,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${O+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(k,{modelValue:u.value[O].values,"onUpdate:modelValue":q=>u.value[O].values=q,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${O+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(H,{appearance:"btn-link",class:"btn-remove","data-testid":"btn-remove-header",onClick:q=>y(O)},{icon:t.withCtx(()=>[t.createVNode(x,{class:"delete-item",icon:"trash"})]),_:2},1032,["onClick"]),u.value&&O===u.value.length-1?(t.openBlock(),t.createBlock(H,{key:0,appearance:"btn-link",class:"btn-add-header","data-testid":"btn-add-header",onClick:n},{icon:t.withCtx(()=>[t.createVNode(x,{color:"$kui-color-text-primary-strong",icon:"plus",size:"22"})]),_:1})):t.createCommentVNode("",!0)],2))),128))])])):t.createCommentVNode("",!0),t.createVNode(V,null,{body:t.withCtx(()=>[t.createElementVNode("h5",dc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.label")),1),t.createElementVNode("p",hc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.help")),1),t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(La),min:t.unref(Pa),"model-value":e.interval,readonly:e.readonly,type:"number","onUpdate:modelValue":f[6]||(f[6]=_=>l("update:interval",_))},null,8,["help","label","max","min","model-value","readonly"]),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":f[7]||(f[7]=_=>l("update:successes",_))},null,8,["label","max","min","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(E,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(je),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":f[8]||(f[8]=_=>t.unref(s)(_,!0)),"onItem:removed":f[9]||(f[9]=_=>t.unref(s)(_,!1)),"onUpdate:modelValue":f[10]||(f[10]=_=>l("update:http-statuses",_))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(V,null,{body:t.withCtx(()=>[t.createElementVNode("h5",pc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.label")),1),t.createElementVNode("p",uc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.help")),1),t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(La),min:t.unref(Pa),"model-value":e.unhealthyInterval,readonly:e.readonly,type:"number","onUpdate:modelValue":f[11]||(f[11]=_=>l("update:unhealthy-interval",_))},null,8,["help","label","max","min","model-value","readonly"]),h.value?(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":f[12]||(f[12]=_=>l("update:tcp-failures",_))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":f[13]||(f[13]=_=>l("update:http-failures",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(E,{autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(je),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":f[14]||(f[14]=_=>t.unref(d)(_,!0)),"onItem:removed":f[15]||(f[15]=_=>t.unref(d)(_,!1)),"onUpdate:modelValue":f[16]||(f[16]=_=>l("update:unhealthy-http-statuses",_))},null,8,["items","label","model-value","readonly"])],64)),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(ja),min:t.unref(Ka),"model-value":e.unhealthyTimeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":f[17]||(f[17]=_=>l("update:unhealthy-timeouts",_))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),Zc="",mc=ce(fc,[["__scopeId","data-v-18b80e62"]]),gc={class:"fields-group-title"},yc={class:"fields-group-text"},kc={class:"fields-group-title"},bc={class:"fields-group-text"},Cc=t.defineComponent({__name:"UpstreamsFormPassiveHealthCheck",props:{type:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},timeouts:{type:String,required:!0},httpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},tcpFailures:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:successes","update:http-statuses","update:timeouts","update:http-failures","update:unhealthy-http-statuses","update:tcp-failures"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),o=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),i=t.computed(()=>a.type==="tcp"),{trackNewItems:c}=Fe({replaceId:!0}),{trackNewItems:h}=Fe({replaceId:!0});return t.watch(()=>a.type,(s,d)=>{d==="tcp"&&s!==d&&l("update:tcp-failures","5"),d!=="tcp"&&s==="tcp"&&(l("update:http-statuses",mt),l("update:unhealthy-http-statuses",yt))}),(s,d)=>{const u=t.resolveComponent("KExternalLink"),p=t.resolveComponent("KSelect"),n=t.resolveComponent("KInput"),y=t.resolveComponent("KMultiselect"),C=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:t.unref(r)("upstreams.form.passive_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.passive_health_check.help"))+" ",1),t.createVNode(u,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(p,{appearance:"select",class:"passive-healthcheck-type-select",items:o.value,label:t.unref(r)("upstreams.form.fields.passive_health_check_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=f=>l("update:type",f))},null,8,["items","label","model-value","readonly"]),t.createVNode(C,null,{body:t.withCtx(()=>[t.createElementVNode("h5",gc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.label")),1),t.createElementVNode("p",yc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.help")),1),t.createVNode(n,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":d[1]||(d[1]=f=>l("update:successes",f))},null,8,["label","max","min","model-value","readonly"]),i.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(y,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(je),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[2]||(d[2]=f=>t.unref(c)(f,!0)),"onItem:removed":d[3]||(d[3]=f=>t.unref(c)(f,!1)),"onUpdate:modelValue":d[4]||(d[4]=f=>l("update:http-statuses",f))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(C,null,{body:t.withCtx(()=>[t.createElementVNode("h5",kc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.label")),1),t.createElementVNode("p",bc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.help")),1),t.createVNode(n,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(ja),min:t.unref(Ka),"model-value":e.timeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":d[5]||(d[5]=f=>l("update:timeouts",f))},null,8,["label","max","min","model-value","readonly"]),i.value?(t.openBlock(),t.createBlock(n,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=f=>l("update:tcp-failures",f))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(n,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=f=>l("update:http-failures",f))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(y,{autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(je),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[8]||(d[8]=f=>t.unref(h)(f,!0)),"onItem:removed":d[9]||(d[9]=f=>t.unref(h)(f,!1)),"onUpdate:modelValue":d[10]||(d[10]=f=>l("update:unhealthy-http-statuses",f))},null,8,["items","label","model-value","readonly"])],64))]),_:1})]),_:1},8,["title"])}}}),Xc="",_c=ce(Cc,[["__scopeId","data-v-6d6854e3"]]),wc={class:"kong-ui-entities-upstreams-form"},Sc=t.defineComponent({__name:"UpstreamsForm",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"||!(e!=null&&e.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:l}){var v;const a=e,{inRange:r,stringToNumberArray:o,upstreamsResponseToFields:i,getDefaultUpstreamFields:c,objectsAreEqual:h,cloneDeep:s}=Pe(),{axiosInstance:d}=Ke({headers:(v=a.config)==null?void 0:v.requestHeaders}),{getMessageFromError:u}=va(),p=Je.useRouter(),n=t.reactive({fields:c(),readonly:!1,errorMessage:""}),y=t.reactive(c()),C=t.computed(()=>!h(n.fields,y)),f=w=>{n.fields.activeHealthCheck.interval=w?"5":"0",n.fields.activeHealthCheck.successes=w?"5":"0",n.fields.activeHealthCheck.httpFailures=w?"5":"0",n.fields.activeHealthCheck.unhealthyInterval=w?"5":"0"},m=w=>{n.fields.passiveHealthCheck.timeouts=w?"5":"0",n.fields.passiveHealthCheck.successes=w?"80":"0"},N=t.computed(()=>n.fields.slots?r(n.fields.slots,pt,ut):!0),k=t.computed(()=>n.fields.hashOn==="header"?!!n.fields.hashOnHeader:!0),S=t.computed(()=>n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie"?!!n.fields.hashOnCookie:!0),F=t.computed(()=>n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie"?!!n.fields.hashOnCookiePath:!0),x=t.computed(()=>n.fields.hashOn==="query_arg"?!!n.fields.hashOnQueryArgument:!0),H=t.computed(()=>n.fields.hashOn==="uri_capture"?!!n.fields.hashOnUriCapture:!0),E=t.computed(()=>n.fields.hashFallback==="header"?!!n.fields.hashFallbackHeader:!0),V=t.computed(()=>n.fields.hashFallback==="query_arg"?!!n.fields.hashFallbackQueryArgument:!0),I=t.computed(()=>n.fields.hashFallback==="uri_capture"?!!n.fields.hashFallbackUriCapture:!0),_=t.computed(()=>!!n.fields.name&&N.value&&k.value&&S.value&&F.value&&x.value&&H.value&&E.value&&V.value&&I.value),O=t.computed(()=>a.upstreamId?re.Edit:re.Create),q=t.computed(()=>{var w,g;return(g=xe.form[(w=a.config)==null?void 0:w.app])==null?void 0:g.edit}),M=w=>{Object.assign(n.fields,i(w)),Object.assign(y,s(n.fields))},A=()=>{var w;p.push(((w=a.config)==null?void 0:w.cancelRoute)||{name:"upstreams-list"})},$=w=>{l("loading",w)},K=w=>{l("error",w)},B=()=>{var g,b,j,R,ae;const w={name:n.fields.name,slots:Number(n.fields.slots),algorithm:n.fields.algorithm,hash_on:n.fields.hashOn,hash_fallback:n.fields.hashFallback,healthchecks:{}};return n.fields.hostHeader&&(w.host_header=n.fields.hostHeader),n.fields.clientCertificate&&(w.client_certificate={id:n.fields.clientCertificate}),n.fields.healthchecksThreshold&&(w.healthchecks.threshold=Number(n.fields.healthchecksThreshold)),n.fields.tags&&(w.tags=(b=(g=n.fields.tags.split(","))==null?void 0:g.map(P=>String(P||"").trim()))==null?void 0:b.filter(P=>P!=="")),n.fields.hashOn==="header"&&(w.hash_on_header=n.fields.hashOnHeader),(n.fields.hashOn==="cookie"||n.fields.hashFallback==="cookie")&&(w.hash_on_cookie=n.fields.hashOnCookie,w.hash_on_cookie_path=n.fields.hashOnCookiePath),n.fields.hashOn==="query_arg"&&(w.hash_on_query_arg=n.fields.hashOnQueryArgument),n.fields.hashOn==="uri_capture"&&(w.hash_on_uri_capture=n.fields.hashOnUriCapture),n.fields.hashFallback==="header"&&(w.hash_fallback_header=n.fields.hashFallbackHeader),n.fields.hashFallback==="query_arg"&&(w.hash_fallback_query_arg=n.fields.hashFallbackQueryArgument),n.fields.hashFallback==="uri_capture"&&(w.hash_fallback_uri_capture=n.fields.hashFallbackUriCapture),n.fields.activeHealthSwitch?(w.healthchecks.active={type:n.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},n.fields.activeHealthCheck.timeout&&(w.healthchecks.active.timeout=Number(n.fields.activeHealthCheck.timeout)),n.fields.activeHealthCheck.concurrency&&(w.healthchecks.active.concurrency=Number(n.fields.activeHealthCheck.concurrency)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpPath&&(w.healthchecks.active.http_path=n.fields.activeHealthCheck.httpPath),((j=a.config)==null?void 0:j.app)==="kongManager"&&(n.fields.activeHealthCheck.headers.length===0?w.healthchecks.active.headers=[]:w.healthchecks.active.headers=n.fields.activeHealthCheck.headers.reduce((P,W)=>{var fe,Oe;return W.key?{...P,[W.key]:(Oe=(fe=W.values.split(","))==null?void 0:fe.map(Ne=>String(Ne||"").trim()))==null?void 0:Oe.filter(Ne=>Ne!=="")}:{...P}},{})),(n.fields.activeHealthCheck.type==="https"||n.fields.activeHealthCheck.type==="grpcs")&&n.fields.activeHealthCheck.httpsSni&&(w.healthchecks.active.https_sni=n.fields.activeHealthCheck.httpsSni),(n.fields.activeHealthCheck.type==="https"||n.fields.activeHealthCheck.type==="grpcs")&&(w.healthchecks.active.https_verify_certificate=n.fields.activeHealthCheck.verifySsl),n.fields.activeHealthCheck.interval&&(w.healthchecks.active.healthy.interval=Number(n.fields.activeHealthCheck.interval)),n.fields.activeHealthCheck.successes&&(w.healthchecks.active.healthy.successes=Number(n.fields.activeHealthCheck.successes)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpStatuses&&(w.healthchecks.active.healthy.http_statuses=o(n.fields.activeHealthCheck.httpStatuses)),n.fields.activeHealthCheck.unhealthyInterval&&(w.healthchecks.active.unhealthy.interval=Number(n.fields.activeHealthCheck.unhealthyInterval)),n.fields.activeHealthCheck.unhealthyTimeouts&&(w.healthchecks.active.unhealthy.timeouts=Number(n.fields.activeHealthCheck.unhealthyTimeouts)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.unhealthyHttpStatuses&&(w.healthchecks.active.unhealthy.http_statuses=o(n.fields.activeHealthCheck.unhealthyHttpStatuses)),n.fields.activeHealthCheck.type!=="tcp"&&n.fields.activeHealthCheck.httpFailures&&(w.healthchecks.active.unhealthy.http_failures=Number(n.fields.activeHealthCheck.httpFailures)),n.fields.activeHealthCheck.type==="tcp"&&n.fields.activeHealthCheck.tcpFailures&&(w.healthchecks.active.unhealthy.tcp_failures=Number(n.fields.activeHealthCheck.tcpFailures))):((R=a.config)==null?void 0:R.app)==="kongManager"&&O.value===re.Edit&&(w.healthchecks.active={type:n.fields.activeHealthCheck.type,headers:{},healthy:{interval:0},unhealthy:{interval:0}}),n.fields.passiveHealthSwitch?(w.healthchecks.passive={type:n.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},n.fields.passiveHealthCheck.successes&&(w.healthchecks.passive.healthy.successes=Number(n.fields.passiveHealthCheck.successes)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.httpStatuses&&(w.healthchecks.passive.healthy.http_statuses=o(n.fields.passiveHealthCheck.httpStatuses)),n.fields.passiveHealthCheck.timeouts&&(w.healthchecks.passive.unhealthy.timeouts=Number(n.fields.passiveHealthCheck.timeouts)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.unhealthyHttpStatuses&&(w.healthchecks.passive.unhealthy.http_statuses=o(n.fields.passiveHealthCheck.unhealthyHttpStatuses)),n.fields.passiveHealthCheck.type!=="tcp"&&n.fields.passiveHealthCheck.httpFailures&&(w.healthchecks.passive.unhealthy.http_failures=Number(n.fields.passiveHealthCheck.httpFailures)),n.fields.passiveHealthCheck.type==="tcp"&&n.fields.passiveHealthCheck.tcpFailures&&(w.healthchecks.passive.unhealthy.tcp_failures=Number(n.fields.passiveHealthCheck.tcpFailures))):((ae=a.config)==null?void 0:ae.app)==="kongManager"&&O.value===re.Edit&&(w.healthchecks.passive={type:n.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),w},U=w=>{var b,j,R,ae,P,W;let g=`${(b=a.config)==null?void 0:b.apiBaseUrl}${xe.form[(j=a.config)==null?void 0:j.app][w]}`;return((R=a.config)==null?void 0:R.app)==="konnect"?g=g.replace(/{controlPlaneId}/gi,((ae=a.config)==null?void 0:ae.controlPlaneId)||""):((P=a.config)==null?void 0:P.app)==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(W=a.config)!=null&&W.workspace?`/${a.config.workspace}`:"")),g=g.replace(/{id}/gi,a.upstreamId),g},D=async()=>{var w;try{n.readonly=!0,await d.post(U("validate"),B());let g;O.value===re.Create?g=await d.post(U("create"),B()):O.value===re.Edit&&(g=((w=a.config)==null?void 0:w.app)==="konnect"?await d.put(U("edit"),B()):await d.patch(U("edit"),B())),l("update",g==null?void 0:g.data)}catch(g){n.errorMessage=u(g),l("error",g)}finally{n.readonly=!1}};return(w,g)=>(t.openBlock(),t.createElementBlock("div",wc,[t.createVNode(t.unref(Oa),{"can-submit":_.value&&C.value,config:e.config,"edit-id":e.upstreamId,"error-message":n.errorMessage,"fetch-url":q.value,"is-readonly":n.readonly,onCancel:A,"onFetch:error":K,"onFetch:success":M,onLoading:$,onSubmit:D},{default:t.withCtx(()=>[t.createVNode(Yi,{"client-certificate":n.fields.clientCertificate,"onUpdate:clientCertificate":g[0]||(g[0]=b=>n.fields.clientCertificate=b),"host-header":n.fields.hostHeader,"onUpdate:hostHeader":g[1]||(g[1]=b=>n.fields.hostHeader=b),name:n.fields.name,"onUpdate:name":g[2]||(g[2]=b=>n.fields.name=b),tags:n.fields.tags,"onUpdate:tags":g[3]||(g[3]=b=>n.fields.tags=b),config:e.config,readonly:n.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),t.createVNode(ac,{algorithm:n.fields.algorithm,"onUpdate:algorithm":g[4]||(g[4]=b=>n.fields.algorithm=b),"hash-fallback":n.fields.hashFallback,"onUpdate:hashFallback":g[5]||(g[5]=b=>n.fields.hashFallback=b),"hash-fallback-header":n.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":g[6]||(g[6]=b=>n.fields.hashFallbackHeader=b),"hash-fallback-query-argument":n.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":g[7]||(g[7]=b=>n.fields.hashFallbackQueryArgument=b),"hash-fallback-uri-capture":n.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":g[8]||(g[8]=b=>n.fields.hashFallbackUriCapture=b),"hash-on":n.fields.hashOn,"onUpdate:hashOn":g[9]||(g[9]=b=>n.fields.hashOn=b),"hash-on-cookie":n.fields.hashOnCookie,"onUpdate:hashOnCookie":g[10]||(g[10]=b=>n.fields.hashOnCookie=b),"hash-on-cookie-path":n.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":g[11]||(g[11]=b=>n.fields.hashOnCookiePath=b),"hash-on-header":n.fields.hashOnHeader,"onUpdate:hashOnHeader":g[12]||(g[12]=b=>n.fields.hashOnHeader=b),"hash-on-query-argument":n.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":g[13]||(g[13]=b=>n.fields.hashOnQueryArgument=b),"hash-on-uri-capture":n.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":g[14]||(g[14]=b=>n.fields.hashOnUriCapture=b),slots:n.fields.slots,"onUpdate:slots":g[15]||(g[15]=b=>n.fields.slots=b),readonly:n.readonly},null,8,["algorithm","hash-fallback","hash-fallback-header","hash-fallback-query-argument","hash-fallback-uri-capture","hash-on","hash-on-cookie","hash-on-cookie-path","hash-on-header","hash-on-query-argument","hash-on-uri-capture","slots","readonly"]),t.createVNode(ic,{"active-health-switch":n.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[g[16]||(g[16]=b=>n.fields.activeHealthSwitch=b),f],"healthchecks-threshold":n.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":g[17]||(g[17]=b=>n.fields.healthchecksThreshold=b),"passive-health-switch":n.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[g[18]||(g[18]=b=>n.fields.passiveHealthSwitch=b),m],readonly:n.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),n.fields.activeHealthSwitch?(t.openBlock(),t.createBlock(mc,{key:0,concurrency:n.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":g[19]||(g[19]=b=>n.fields.activeHealthCheck.concurrency=b),headers:n.fields.activeHealthCheck.headers,"onUpdate:headers":g[20]||(g[20]=b=>n.fields.activeHealthCheck.headers=b),"http-failures":n.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":g[21]||(g[21]=b=>n.fields.activeHealthCheck.httpFailures=b),"http-path":n.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":g[22]||(g[22]=b=>n.fields.activeHealthCheck.httpPath=b),"http-statuses":n.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[23]||(g[23]=b=>n.fields.activeHealthCheck.httpStatuses=b),"https-sni":n.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":g[24]||(g[24]=b=>n.fields.activeHealthCheck.httpsSni=b),interval:n.fields.activeHealthCheck.interval,"onUpdate:interval":g[25]||(g[25]=b=>n.fields.activeHealthCheck.interval=b),successes:n.fields.activeHealthCheck.successes,"onUpdate:successes":g[26]||(g[26]=b=>n.fields.activeHealthCheck.successes=b),"tcp-failures":n.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[27]||(g[27]=b=>n.fields.activeHealthCheck.tcpFailures=b),timeout:n.fields.activeHealthCheck.timeout,"onUpdate:timeout":g[28]||(g[28]=b=>n.fields.activeHealthCheck.timeout=b),type:n.fields.activeHealthCheck.type,"onUpdate:type":g[29]||(g[29]=b=>n.fields.activeHealthCheck.type=b),"unhealthy-http-statuses":n.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[30]||(g[30]=b=>n.fields.activeHealthCheck.unhealthyHttpStatuses=b),"unhealthy-interval":n.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":g[31]||(g[31]=b=>n.fields.activeHealthCheck.unhealthyInterval=b),"unhealthy-timeouts":n.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":g[32]||(g[32]=b=>n.fields.activeHealthCheck.unhealthyTimeouts=b),"verify-ssl":n.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":g[33]||(g[33]=b=>n.fields.activeHealthCheck.verifySsl=b),config:e.config,readonly:n.readonly},null,8,["concurrency","headers","http-failures","http-path","http-statuses","https-sni","interval","successes","tcp-failures","timeout","type","unhealthy-http-statuses","unhealthy-interval","unhealthy-timeouts","verify-ssl","config","readonly"])):t.createCommentVNode("",!0),n.fields.passiveHealthSwitch?(t.openBlock(),t.createBlock(_c,{key:1,"http-failures":n.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":g[34]||(g[34]=b=>n.fields.passiveHealthCheck.httpFailures=b),"http-statuses":n.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[35]||(g[35]=b=>n.fields.passiveHealthCheck.httpStatuses=b),successes:n.fields.passiveHealthCheck.successes,"onUpdate:successes":g[36]||(g[36]=b=>n.fields.passiveHealthCheck.successes=b),"tcp-failures":n.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[37]||(g[37]=b=>n.fields.passiveHealthCheck.tcpFailures=b),timeouts:n.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":g[38]||(g[38]=b=>n.fields.passiveHealthCheck.timeouts=b),type:n.fields.passiveHealthCheck.type,"onUpdate:type":g[39]||(g[39]=b=>n.fields.passiveHealthCheck.type=b),"unhealthy-http-statuses":n.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[40]||(g[40]=b=>n.fields.passiveHealthCheck.unhealthyHttpStatuses=b),readonly:n.readonly},null,8,["http-failures","http-statuses","successes","tcp-failures","timeouts","type","unhealthy-http-statuses","readonly"])):t.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])]))}}),ed="",xc=ce(Sc,[["__scopeId","data-v-810fb7b7"]]),Nc=t.createElementVNode("code",null,"10",-1),Vc=t.createElementVNode("code",null,"65536",-1),Bc={"data-testid":"client_certificate-plain-text"},Ic=t.defineComponent({__name:"UpstreamsConfigCard",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:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e){const l=e,{i18n:{t:a},i18nT:r}=ie.useI18n(),{getPropValue:o}=Bi(),i=t.computed(()=>xe.form[l.config.app].edit),c=t.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:J.Basic,tooltip:a("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:J.Basic},hash_on:{order:7,section:J.Basic},hash_on_header:{order:8,section:J.Basic},hash_on_uri_capture:{order:9,section:J.Basic},hash_on_query_arg:{order:10,section:J.Basic,label:`${a("upstreams.form.fields.hash_on.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:J.Basic},hash_on_cookie_path:{order:12,section:J.Basic},healthchecks:{order:13,section:J.Basic,type:L.Json},tags:{order:14,tooltip:a("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${a("upstreams.form.fields.hash_fallback.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_fallback_uri_capture:{order:4},host_header:{order:5},use_srv_name:{order:6},client_certificate:{order:7,tooltip:a("upstreams.form.hash_tooltips.client_certificate")}});return(h,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(t.unref(Xs),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":c.value,"fetch-url":i.value,"hide-title":e.hideTitle,"onCopy:success":s[0]||(s[0]=d=>h.$emit("copy:success",d)),"onFetch:error":s[1]||(s[1]=d=>h.$emit("fetch:error",d)),"onFetch:success":s[2]||(s[2]=d=>h.$emit("fetch:success",d)),onLoading:s[3]||(s[3]=d=>h.$emit("loading",d))},{"name-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":t.withCtx(({row:d})=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(d.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:t.withCtx(()=>[Nc]),max:t.withCtx(()=>[Vc]),_:1})]),"hash_fallback-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:t.withCtx(d=>{var u;return[t.createElementVNode("div",null,[t.createElementVNode("div",Bc,[t.createElementVNode("span",null,t.toDisplayString((u=t.unref(o)("rowValue",d))==null?void 0:u.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});X.TargetForm=Ra,X.TargetsList=zi,X.UpstreamsConfigCard=Ic,X.UpstreamsForm=xc,X.UpstreamsList=Di,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-upstreams-targets",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-upstreams-targets.umd.js",
|
|
6
6
|
"module": "./dist/entities-upstreams-targets.es.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"errorLimit": "900KB"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@kong-ui-public/entities-shared": "^1.7.
|
|
52
|
+
"@kong-ui-public/entities-shared": "^1.7.4"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"dev": "cross-env USE_SANDBOX=true vite",
|