@kong-ui-public/entities-vaults 3.19.0 → 3.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1116,6 +1116,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
1116
1116
  kv: a[t.HCV].kv,
1117
1117
  namespace: a[t.HCV].namespace || null,
1118
1118
  auth_method: a[t.HCV].auth_method,
1119
+ ...c.config.base64FieldAvailable && { base64_decode: a[t.HCV].base64_decode },
1119
1120
  ...a[t.HCV].auth_method === D.TOKEN && { token: a[t.HCV].token },
1120
1121
  // For Kong Admin API, when auth_method is kubernetes, token must be in the request body and its value has to be null
1121
1122
  ...a[t.HCV].auth_method === D.K8S && {
@@ -1848,7 +1849,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
1848
1849
  ]);
1849
1850
  };
1850
1851
  }
1851
- }), El = /* @__PURE__ */ fe(Xt, [["__scopeId", "data-v-356c233b"]]), Yt = { class: "kong-ui-vault-entity-config-card" }, Rl = /* @__PURE__ */ ce({
1852
+ }), El = /* @__PURE__ */ fe(Xt, [["__scopeId", "data-v-e4d00b01"]]), Yt = { class: "kong-ui-vault-entity-config-card" }, Rl = /* @__PURE__ */ ce({
1852
1853
  __name: "VaultConfigCard",
1853
1854
  props: {
1854
1855
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -1 +1 @@
1
- (function(U,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/entities-shared","@kong-ui-public/i18n"],e):(U=typeof globalThis<"u"?globalThis:U||self,e(U["kong-ui-public-entities-vaults"]={},U.Vue,U.VueRouter,U.KongIcons,U["kong-ui-public-entities-shared"],U["kong-ui-public-i18n"]))})(this,function(U,e,ce,G,p,ue){"use strict";const ye={actions:{create:"New vault",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View Details",loading:"Loading..."},delete:{title:"Delete a Vault",title_for_secret:"Delete a Secret",description:"This action cannot be reversed."},errors:{general:"Vaults could not be retrieved",delete:"The vault could not be deleted at this time.",copy:"Failed to copy to clipboard"},search:{placeholder_for_vaults:{konnect:"Filter by exact prefix or ID"},placeholder_for_secrets:{konnect:"Filter by exact key"}},vaults:{title:"Vaults",list:{toolbar_actions:{new_vault:"New vault"},table_headers:{prefix:"Prefix",name:"Vault Type",description:"Description",tags:"Tags",id:"ID"},empty_state:{title:"Configure a New Vault",description:"Improve the security of your Kong Gateway deployment with centralized secrets."},empty_state_v2:{title:"Configure your first vault",group:"Vaults created in gateways within this group will automatically appear here.",description:"Vaults securely and centrally store sensitive information, such as credentials, tokens, and keys, to simplify secrets management.",create_cta:"New vault"}}},secrets:{title:"Secrets",list:{toolbar_actions:{new_secret:"Store New Secret"},table_headers:{key:"Secret Key",updated_at:"Updated At"},empty_state:{title:"No Secrets Stored",description:"Improve the security of your Kong Gateway deployment with centralized secrets."}},form:{info:{title:"Secret",description:"Enter the secret key and secret value to be stored in Konnect vault"},fields:{key:{label:"Key",placeholder:"Enter key"},value:{label:"Value",placeholder:"Enter value here, can be simple values or multi-line"}},hint:"Once saved, the secret value will not be visible"}},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},labels:{vault_type:"Vault Type"},form:{sections:{general:{title:"General Information",description:"General information helps identify and manage this Vault instance."},config:{title:"Vault Configuration",description:"Select a type of Vault and configure properties specific to each type of Vault."}},fields:{prefix:{label:"Prefix",placeholder:"Enter a unique prefix for this vault",help:"e.g. my-vault",tooltip:"The prefix is used to load the right Vault configuration and implementation when referencing secrets with the other entities."},description:{label:"Description",placeholder:"Enter some description for this vault"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}},config:{konnect:{label:"Konnect",description:"Access secrets stored directly in Konnect's unified platform to easily reference in Kong Gateway configuration."},env:{label:"Environment Variables",description:"Access secrets stored via variables to be made available in Kong Gateway at runtime.",fields:{prefix:{label:"Environment Variable Prefix",placeholder:"Enter your environment variable vault prefix",tooltip:"Data plane will access all the environment variables starting with this prefix."}}},aws:{label:"AWS Secrets Manager",description:"Access secrets stored in AWS Secrets Manager for Kong Gateway configuration.",fields:{region:{label:"Region",placeholder:"Select an AWS region",tooltip:"The AWS region your vault is located in",locations:{"us-east-1":{location:"N. Virginia"},"us-east-2":{location:"Ohio"},"us-west-1":{location:"N. California"},"us-west-2":{location:"Oregon"},"af-south-1":{location:"Cape Town"},"ap-east-1":{location:"Hong Kong"},"ap-southeast-3":{location:"Jakarta"},"ap-south-1":{location:"Mumbai"},"ap-northeast-1":{location:"Tokyo"},"ap-northeast-2":{location:"Seoul"},"ap-northeast-3":{location:"Osaka"},"ap-southeast-1":{location:"Singapore"},"ap-southeast-2":{location:"Sydney"},"ca-central-1":{location:"Canada"},"eu-central-1":{location:"Frankfurt"},"eu-west-1":{location:"Ireland"},"eu-west-2":{location:"London"},"eu-west-3":{location:"Paris"},"eu-south-1":{location:"Milan"},"eu-north-1":{location:"Stockholm"},"me-south-1":{location:"Bahrain"},"sa-east-1":{location:"São Paulo"},"us-gov-east-1":{location:"US East"},"us-gov-west-1":{location:"US West"}}},endpoint_url:{label:"Endpoint URL",tooltip:'The AWS SecretsManager service endpoint url. If not specified, the value used by vault will be the official AWS SecretsManager service url which is `https://secretsmanager.<region>.amazonaws.com`. You can specify a complete URL(including the "http/https" scheme) to override the endpoint that vault will connect to.'},assume_role_arn:{label:"Assume Role ARN",tooltip:"The target AWS IAM role ARN that will be assumed. Typically this is used for operating between multiple roles or cross-accounts. If you are not using assume role you should not specify this value."},role_session_name:{label:"Role Session Name",tooltip:"The role session name used for role assuming."},sts_endpoint_url:{label:"STS Endpoint URL",tooltip:"The custom STS endpoint URL used for role assuming in AWS Vault. Note that this value will override the default STS endpoint URL(which should be `https: //sts.amazonaws.com`, or `https: //sts.<region>.amazonaws.com` if you have `AWS_STS_REGIONAL_ENDPOINTS` set to `regional`). If you are not using private VPC endpoint for STS service, you should not specify this value."}}},gcp:{label:"Google Secret Manager",description:"Access secrets stored in Google Secret Manager for Kong Gateway configuration.",fields:{project_id:{label:"Project ID",placeholder:"Enter your Google Cloud Project ID",tooltip:{text:"Visit your Google API Console and select {italic-text} in the projects list to see your project ID",italicText:"Manage all projects"}}}},hcv:{label:"HashiCorp Vault",description:"Access secrets stored in HashiCorp Vault for Kong Gateway configuration.",fields:{protocol:{label:"Protocol"},host:{label:"Host"},port:{label:"Port"},mount:{label:"Mount"},kv:{label:"Kv"},namespace:{label:"Namespace"},auth_method:{label:"Authentication Method"},token:{label:"Token"},kube_role:{label:"Kubernetes Role"},kube_auth_path:{label:"Kubernetes Auth Path"},kube_api_token_file:{label:"Kubernetes API Token File"},approle_auth_path:{label:"App Role Auth Path"},approle_role_id:{label:"App Role Role ID"},approle_secret_id:{label:"App Role Secret ID"},approle_secret_id_file:{label:"App Role Secret ID File"},approle_response_wrapping:{label:"App Role Response Wrapping"}}},azure:{label:"Azure Vault",description:"Access secrets stored in Azure Key Vault for Kong Gateway configuration.",fields:{location:{label:"Location"},vault_uri:{label:"Vault URI"},credential_prefix:{label:"Credential Prefix"},type:{label:"Type",placeholder:"Select a type"},client_id:{label:"Client ID"},tenant_id:{label:"Tenant ID"}}},conjur:{label:"Conjur Vault",description:"Access secrets stored in Conjur Key Vault for Kong Gateway configuration.",fields:{endpoint_url:{label:"Endpoint URL"},login:{label:"Login"},api_key:{label:"API Key"},account:{label:"Account"}}},advancedFields:{title:"View Advanced Fields",ttl:"Time-to-Live",ttlTooltip:"Time-to-live (in seconds) of a secret from a vault when cached by this reference",negTtl:"Negative Time-to-Live",negTtlTooltip:"Time-to-live (in seconds) of a vault miss (no secret)",resurrectTtl:"Time-to-Live Resurrection",resurrectTtlTooltip:"Time (in seconds) for which stale secrets from the vault are resurrected for when they cannot be refreshed"},commonFields:{base64_decode:{label:"Base64 Decode",tooltip:"Decode all secrets in this vault as base64, useful for binary data. If some of the secrets are not base64 encoded, an error will occur when using them. It's recommended to create a separate vault for base64 secrets."}}},unavailable:"This vault provider is available on Enterprise."},vault_secret_picker:{title:"Look up Key in Vault",vault:{label:"Vault",placeholder:"Select a vault"},secret_id:{label:"Secret ID",input_placeholder:"Enter a secret ID",select_placeholder:"Select or enter a complete secret ID"},optional_secret_key:{label:"Secret Key",placeholder:"Enter the key or key path to access a nested secret value",help:"Optional. e.g. tokens, tokens/refresh_token"},fetch_error:{vaults:"Could not fetch available vaults",secrets:"Could not fetch available secrets",vaults_and_secrets:"Could not fetch available vaults and secrets"},no_results:"No results found",actions:{use_key:"Use Key"},provider:{complete_action:"Look up {cta}",cta:"Key in Vault"}}};function _e(){const o=ue.createI18n("en-us",ye);return{i18n:o,i18nT:ue.i18nTComponent(o)}}const re={useI18n:_e},de="/v2/control-planes/{controlPlaneId}/core-entities",pe="/v2/control-planes/{controlPlaneId}/config-stores",fe="/{workspace}",te={list:{konnect:{getAll:`${de}/vaults`,deleteConfigStore:`${pe}/{id}?force=true`},kongManager:{getAll:`${fe}/vaults`}},form:{konnect:{create:`${de}/vaults`,createConfigStore:pe,edit:`${de}/vaults/{id}`},kongManager:{create:`${fe}/vaults`,edit:`${fe}/vaults/{id}`}}},he="#00abd2",Ve="24px",ke={class:"kong-ui-entities-vaults-list"},Ce={class:"button-row"},we={class:"empty-state-icon-gateway"},Ee={class:"table-content-overflow-wrapper"},Ne={class:"table-content-overflow-wrapper"},xe=e.defineComponent({__name:"VaultList",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||!o.createRoute||!o.getViewRoute||!o.getEditRoute||o.app==="kongManager"&&!o.isExactMatch&&!o.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},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(o,{emit:w}){var ae;const c=w,s=o,{i18n:{t:u}}=re.useI18n(),l=ce.useRouter(),{axiosInstance:E}=p.useAxios((ae=s.config)==null?void 0:ae.axiosRequestConfig),{hasRecords:C,handleStateChange:y}=p.useTableState(()=>$.value),d=e.computed(()=>C.value&&s.config.app==="konnect"),k=e.computed(()=>!s.enableV2EmptyStates&&s.config.app==="konnect"),f=e.computed(()=>s.config.app!=="kongManager"||!!s.config.disableSorting),F={prefix:{label:u("vaults.list.table_headers.prefix"),searchable:!0,sortable:!0,hidable:!1},name:{label:u("vaults.list.table_headers.name"),searchable:!0,sortable:!0},description:{label:u("vaults.list.table_headers.description"),sortable:!1},tags:{label:u("vaults.list.table_headers.tags"),sortable:!1}},W=F,J=e.computed(()=>{var N,I;let h=`${s.config.apiBaseUrl}${te.list[s.config.app].getAll}`;return s.config.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,((N=s.config)==null?void 0:N.controlPlaneId)||""):s.config.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,(I=s.config)!=null&&I.workspace?`/${s.config.workspace}`:"")),h}),$=e.ref(""),P=e.computed(()=>{if(s.config.app==="konnect"||s.config.isExactMatch)return{isExactMatch:!0,placeholder:u("search.placeholder_for_vaults.konnect")};const{prefix:N,name:I}=F;return{isExactMatch:!1,fields:{name:I,prefix:N},schema:s.config.filterSchema}}),{fetcher:a,fetcherState:Q,fetcherCacheKey:M}=p.useFetcher(e.computed(()=>({...s.config,cacheIdentifier:s.cacheIdentifier})),J),q=()=>{$.value=""},j=()=>{M.value++},g=e.ref(null),v=async(h,N)=>{const I=h.id;if(!await N(I)){c("copy:error",{entity:h,field:"id",message:u("errors.copy")});return}c("copy:success",{entity:h,field:"id",message:u("copy.success",{val:I})})},Z=async(h,N)=>{const I=JSON.stringify(h);if(!await N(I)){c("copy:error",{entity:h,message:u("errors.copy")});return}c("copy:success",{entity:h,message:u("copy.success_brief")})},X=async h=>{var I;await((I=s.canRetrieve)==null?void 0:I.call(s,h))&&l.push(s.config.getViewRoute(h.id))},L=h=>({label:u("actions.view"),to:s.config.getViewRoute(h)}),z=h=>({label:u("actions.edit"),to:s.config.getEditRoute(h)}),O=e.ref(void 0),S=e.ref(!1),D=e.ref(!1),H=e.ref(""),b=p.useDeleteUrlBuilder(s.config,J.value),m=h=>{O.value=h,S.value=!0},A=()=>{S.value=!1},R=async h=>{const{apiBaseUrl:N,app:I,controlPlaneId:i}=s.config,r=`${N}${te.list[I].deleteConfigStore}`.replace(/{controlPlaneId}/gi,i||"").replace(/{id}/gi,h);try{await E.delete(r)}catch{}},Y=async()=>{var h,N,I,i;if((h=O.value)!=null&&h.id){D.value=!0;try{await E.delete(b(O.value.id)),s.config.app==="konnect"&&((N=O.value.config)!=null&&N.config_store_id)&&R(O.value.config.config_store_id),D.value=!1,S.value=!1,M.value++,c("delete:success",O.value)}catch(r){H.value=((i=(I=r.response)==null?void 0:I.data)==null?void 0:i.message)||r.message||u("errors.delete"),c("error",r)}finally{D.value=!1}}},K=()=>{l.push(s.config.createRoute)};e.watch(Q,h=>{var N,I,i;if(h.status===p.FetcherStatus.Error){g.value={title:u("errors.general")},(i=(I=(N=h.error)==null?void 0:N.response)==null?void 0:I.data)!=null&&i.message&&(g.value.message=h.error.response.data.message),c("error",h.error);return}g.value=null});const x=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${u("vaults.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:u("vaults.title")});return e.onBeforeMount(async()=>{await s.canCreate()&&(x.value.title=u("vaults.list.empty_state.title"),x.value.ctaText=u("actions.create"))}),(h,N)=>{const I=e.resolveComponent("KButton"),i=e.resolveComponent("KDropdownItem"),r=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ke,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-sorting":f.value,"empty-state-options":x.value,"enable-entity-actions":"","error-message":g.value,fetcher:e.unref(a),"fetcher-cache-key":e.unref(M),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-vaults-list",query:$.value,"table-headers":e.unref(W),onClearSearchInput:q,"onClick:row":N[4]||(N[4]=_=>X(_)),onSort:j,onState:e.unref(y)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(p.EntityFilter),{modelValue:$.value,"onUpdate:modelValue":N[0]||(N[0]=_=>$.value=_),config:P.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ce,[d.value?(e.openBlock(),e.createBlock(I,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:N[1]||(N[1]=_=>h.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(G.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(I,{appearance:"primary","data-testid":"toolbar-add-vault",size:o.useActionOutside?"medium":"large",to:o.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(G.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("vaults.list.toolbar_actions.new_vault")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),prefix:e.withCtx(({rowValue:_})=>[e.createElementVNode("div",Ee,[e.createElementVNode("b",null,e.toDisplayString(_??"-"),1)])]),name:e.withCtx(({rowValue:_})=>[e.createElementVNode("b",null,e.toDisplayString(_??"-"),1)]),description:e.withCtx(({rowValue:_})=>[e.createElementVNode("div",Ne,e.toDisplayString(_??"-"),1)]),tags:e.withCtx(({rowValue:_})=>[e.createVNode(e.unref(p.TableTags),{tags:_},null,8,["tags"])]),actions:e.withCtx(({row:_})=>[e.createVNode(r,null,{default:e.withCtx(({copyToClipboard:B})=>[e.createVNode(i,{"data-testid":"action-entity-copy-id",onClick:V=>v(_,B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(r,null,{default:e.withCtx(({copyToClipboard:B})=>[e.createVNode(i,{"data-testid":"action-entity-copy-json",onClick:V=>Z(_,B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canRetrieve(_)},{default:e.withCtx(()=>[e.createVNode(i,{"data-testid":"action-entity-view","has-divider":"",item:L(_.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canEdit(_)},{default:e.withCtx(()=>[e.createVNode(i,{"data-testid":"action-entity-edit",item:z(_.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canDelete(_)},{default:e.withCtx(()=>[e.createVNode(i,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:B=>m(_)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(C)&&k.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(I,{appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:N[2]||(N[2]=_=>h.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(G.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!$.value&&o.enableV2EmptyStates&&o.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var _;return[e.createVNode(e.unref(p.EntityEmptyState),{"action-button-text":e.unref(u)("vaults.list.toolbar_actions.new_vault"),appearance:"secondary","can-create":()=>o.canCreate(),"data-testid":"vaults-entity-empty-state",description:e.unref(u)("vaults.list.empty_state_v2.description"),"learn-more":o.config.app==="konnect",title:e.unref(u)("vaults.list.empty_state_v2.title"),"onClick:create":K,"onClick:learnMore":N[3]||(N[3]=B=>h.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",we,[e.createVNode(e.unref(G.SecurityIcon),{color:e.unref(he),size:e.unref(Ve)},null,8,["color","size"])])]),_:2},[(_=o.config)!=null&&_.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vaults.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":D.value,description:e.unref(u)("delete.description"),"entity-name":O.value&&(O.value.prefix||O.value.id),"entity-type":e.unref(p.EntityTypes).Vault,error:H.value,title:e.unref(u)("delete.title"),visible:S.value,onCancel:A,onProceed:Y},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),oe=(o,w)=>{const c=o.__vccOpts||o;for(const[s,u]of w)c[s]=u;return c},Se=oe(xe,[["__scopeId","data-v-77e50046"]]);var t=(o=>(o.AWS="aws",o.GCP="gcp",o.HCV="hcv",o.ENV="env",o.AZURE="azure",o.KONNECT="konnect",o.CONJUR="conjur",o))(t||{}),T=(o=>(o.TOKEN="token",o.K8S="kubernetes",o.APP_ROLE="approle",o))(T||{});const Ie={class:"kong-ui-entities-vault-form"},Ae={class:"vault-form-provider-cards-container"},Re=["data-testid"],ve={class:"provider-item-title-container"},Ue={class:"provider-item-title"},Te={class:"provider-item-description"},$e={key:"kong-vault-config-fields",class:"vault-form-config-fields-container"},Be={key:0,class:"vault-form-config-auth-method-container"},Pe={key:1,class:"vault-form-config-auth-method-container"},Ke={key:2,class:"vault-form-config-auth-method-container"},Fe={key:6},Me={class:"wrapper"},De={class:"item-50"},Oe={class:"item-50"},He={class:"wrapper"},qe={class:"item-100"},We=oe(e.defineComponent({__name:"VaultForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||(o==null?void 0:o.app)==="konnect"&&!(o!=null&&o.controlPlaneId)||(o==null?void 0:o.app)==="kongManager"&&typeof(o==null?void 0:o.workspace)!="string"||!(o!=null&&o.cancelRoute))},vaultId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:w}){var I;const c=o,s=w,{i18nT:u,i18n:{t:l}}=re.useI18n(),E=ce.useRouter(),{axiosInstance:C}=p.useAxios((I=c.config)==null?void 0:I.axiosRequestConfig),{getMessageFromError:y}=p.useErrors(),d=e.reactive({fields:{prefix:"",description:"",tags:""},isReadonly:!1,errorMessage:""}),k=e.reactive({prefix:"",description:"",tags:""}),f=e.ref(c.config.konnectConfigStoreAvailable?t.KONNECT:t.ENV),F=e.ref(null),W=e.ref(),J=e.computed(()=>[t.AWS,t.GCP,t.HCV,t.AZURE,t.CONJUR].includes(f.value)),$=e.computed(()=>[...c.config.konnectConfigStoreAvailable?[{label:l("form.config.konnect.label"),value:t.KONNECT}]:[],{label:l("form.config.env.label"),value:t.ENV},{label:l("form.config.aws.label"),value:t.AWS,disabled:!L.value},{label:l("form.config.gcp.label"),value:t.GCP,disabled:!L.value},{label:l("form.config.hcv.label"),value:t.HCV,disabled:!L.value},...c.config.azureVaultProviderAvailable?[{label:l("form.config.azure.label"),value:t.AZURE,disabled:!L.value}]:[],...c.config.conjurVaultProviderAvailable?[{label:l("form.config.conjur.label"),value:t.CONJUR,disabled:!L.value}]:[]]),P=c.config.base64FieldAvailable?{base64_decode:!1}:{},a=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...P},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...P},[t.GCP]:{project_id:"",...P},[t.HCV]:{protocol:"http",host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",auth_method:T.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,...P},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...P},[t.CONJUR]:{endpoint_url:"",auth_method:"default"}}),Q=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...P},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...P},[t.GCP]:{project_id:"",...P},[t.HCV]:{protocol:"http",host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",auth_method:T.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,...P},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...P},[t.CONJUR]:{endpoint_url:"",auth_method:"default"}}),M=[{label:`${l("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`,value:"us-east-1"},{label:`${l("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`,value:"us-east-2"},{label:`${l("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`,value:"us-west-1"},{label:`${l("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`,value:"us-west-2"},{label:`${l("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`,value:"af-south-1"},{label:`${l("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`,value:"ap-east-1"},{label:`${l("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`,value:"ap-southeast-3"},{label:`${l("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`,value:"ap-south-1"},{label:`${l("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`,value:"ap-northeast-1"},{label:`${l("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`,value:"ap-northeast-2"},{label:`${l("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`,value:"ap-northeast-3"},{label:`${l("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`,value:"ap-southeast-1"},{label:`${l("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`,value:"ap-southeast-2"},{label:`${l("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`,value:"ca-central-1"},{label:`${l("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`,value:"eu-central-1"},{label:`${l("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`,value:"eu-west-1"},{label:`${l("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`,value:"eu-west-2"},{label:`${l("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`,value:"eu-west-3"},{label:`${l("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`,value:"eu-south-1"},{label:`${l("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`,value:"eu-north-1"},{label:`${l("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`,value:"me-south-1"},{label:`${l("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`,value:"sa-east-1"},{label:`${l("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`,value:"us-gov-east-1"},{label:`${l("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`,value:"us-gov-west-1"}],q=[{label:"secrets",value:"secrets"}],j=[{label:"http",value:"http"},{label:"https",value:"https"}],g=[{label:"v1",value:"v1"},{label:"v2",value:"v2"}],v=e.computed(()=>c.vaultId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),Z=e.computed(()=>{var i,r;return(r=te.form[(i=c.config)==null?void 0:i.app])==null?void 0:r.edit}),X=e.computed(()=>v.value===p.EntityBaseFormType.Edit&&c.config.app==="kongManager"),L=e.computed(()=>c.config.app==="konnect"||p.useGatewayFeatureSupported({gatewayInfo:c.config.gatewayInfo,supportedRange:{enterprise:[]}})),z=()=>{var i;E.push(((i=c.config)==null?void 0:i.cancelRoute)||{name:"vault-list"})},O=i=>{s("loading",i)},S=i=>{s("error",i)},D=i=>{switch(i){case t.KONNECT:return G.KongIcon;case t.ENV:return G.CodeIcon;case t.AWS:return G.AwsIcon;case t.GCP:return G.GoogleCloudIcon;case t.HCV:return G.HashicorpIcon;case t.AZURE:return G.AzureIcon;case t.CONJUR:return G.ConjourIcon}},H=i=>{switch(i){case t.KONNECT:return l("form.config.konnect.description");case t.ENV:return l("form.config.env.description");case t.AWS:return l("form.config.aws.description");case t.GCP:return l("form.config.gcp.description");case t.HCV:return l("form.config.hcv.description");case t.AZURE:return l("form.config.azure.description");case t.CONJUR:return l("form.config.conjur.description")}},b=i=>{var B,V,ee,ne,ie,n;d.fields.prefix=((B=i==null?void 0:i.item)==null?void 0:B.prefix)||(i==null?void 0:i.prefix)||"",d.fields.description=((V=i==null?void 0:i.item)==null?void 0:V.description)||(i==null?void 0:i.description)||"";const r=((ee=i==null?void 0:i.item)==null?void 0:ee.tags)||(i==null?void 0:i.tags)||[];d.fields.tags=(r==null?void 0:r.join(", "))||"",Object.assign(k,d.fields);const _=((ne=i==null?void 0:i.item)==null?void 0:ne.config)||(i==null?void 0:i.config)||null;_&&(Object.keys(_).length||(i==null?void 0:i.name)===t.KONNECT)?(f.value=((ie=i==null?void 0:i.item)==null?void 0:ie.name)||(i==null?void 0:i.name)||"",F.value=f.value,W.value=((n=i==null?void 0:i.config)==null?void 0:n.config_store_id)||void 0,Object.assign(a[f.value],_),Object.assign(Q[f.value],_)):d.errorMessage="Error loading vault config"},m=i=>i===""||i==null,A=e.computed(()=>f.value===t.HCV?!Object.keys(a[t.HCV]).filter(i=>["namespace","ttl","neg_ttl","resurrect_ttl","kube_auth_path","approle_auth_path","approle_secret_id","approle_secret_id_file"].includes(i)||a[t.HCV].auth_method!==T.K8S&&(i==="kube_role"||i==="kube_api_token_file")||a[t.HCV].auth_method!==T.TOKEN&&i==="token"||a[t.HCV].auth_method!==T.APP_ROLE&&(i==="approle_role_id"||i==="approle_response_wrapping")||a[t.HCV].auth_method===T.APP_ROLE&&i==="approle_response_wrapping"&&typeof a[f.value][i]=="boolean"?!1:m(a[f.value][i])).length:f.value===t.AZURE?!Object.keys(a[t.AZURE]).filter(i=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(i)?!1:m(a[f.value][i])).length:f.value===t.AWS?!Object.keys(a[t.AWS]).filter(i=>["endpoint_url","assume_role_arn","ttl","neg_ttl","resurrect_ttl","sts_endpoint_url"].includes(i)?!1:m(a[f.value][i])).length:!Object.keys(a[f.value]).filter(i=>["ttl","neg_ttl","resurrect_ttl"].includes(i)?!1:m(a[f.value][i])).length),R=e.computed(()=>!!d.fields.prefix&&A.value),Y=e.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(k)||f.value!==F.value||JSON.stringify(a[f.value])!==JSON.stringify(Q[f.value])),K=e.computed(()=>{var r,_;let i=`${c.config.apiBaseUrl}${te.form[c.config.app][v.value]}`;return c.config.app==="konnect"?i=i.replace(/{controlPlaneId}/gi,((r=c.config)==null?void 0:r.controlPlaneId)||""):c.config.app==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(_=c.config)!=null&&_.workspace?`/${c.config.workspace}`:"")),i=i.replace(/{id}/gi,c.vaultId),i}),x=e.computed(()=>{var ne,ie;const i={protocol:a[t.HCV].protocol,host:a[t.HCV].host,port:parseInt(a[t.HCV].port.toString()),mount:a[t.HCV].mount,kv:a[t.HCV].kv,namespace:a[t.HCV].namespace||null,auth_method:a[t.HCV].auth_method,...a[t.HCV].auth_method===T.TOKEN&&{token:a[t.HCV].token},...a[t.HCV].auth_method===T.K8S&&{kube_role:a[t.HCV].kube_role,kube_auth_path:a[t.HCV].kube_auth_path||void 0,kube_api_token_file:a[t.HCV].kube_api_token_file,token:null},...a[t.HCV].auth_method===T.APP_ROLE&&{approle_auth_path:a[t.HCV].approle_auth_path||void 0,approle_role_id:a[t.HCV].approle_role_id,approle_secret_id:a[t.HCV].approle_secret_id||void 0,approle_secret_id_file:a[t.HCV].approle_secret_id_file||void 0,approle_response_wrapping:a[t.HCV].approle_response_wrapping??!1}},r={...a[f.value],client_id:a[f.value].client_id||null,tenant_id:a[f.value].tenant_id||null},_={...a[f.value],endpoint_url:a[f.value].endpoint_url||null,assume_role_arn:a[f.value].assume_role_arn||null,...c.config.awsStsEndpointUrlAvailable?{sts_endpoint_url:a[f.value].sts_endpoint_url||null}:{}};let B=a[f.value];f.value===t.HCV?B=i:f.value===t.AZURE?B=r:f.value===t.AWS&&(B=_);let V={};if(![t.KONNECT,t.ENV].includes(f.value)){const n=a[f.value],me=n.ttl,ge=n.neg_ttl,be=n.resurrect_ttl;V={ttl:me?parseInt(me.toString(),10):null,neg_ttl:ge?parseInt(ge.toString(),10):null,resurrect_ttl:be?parseInt(be.toString(),10):null}}return{prefix:d.fields.prefix,description:d.fields.description||null,tags:(ie=(ne=d.fields.tags.split(","))==null?void 0:ne.map(n=>String(n||"").trim()))==null?void 0:ie.filter(n=>n!==""),name:f.value,config:{...B,...V}}}),ae=e.computed(()=>({...x.value,config:{...x.value.config,config_store_id:W.value}})),h=async()=>{var i;try{d.isReadonly=!0;const r=`${c.config.apiBaseUrl}${te.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi,((i=c.config)==null?void 0:i.controlPlaneId)||""),_=await C.post(r);return _==null?void 0:_.data.id}catch(r){d.errorMessage=y(r),s("error",r)}finally{d.isReadonly=!1}},N=async()=>{var i;try{d.isReadonly=!0;let r;v.value==="create"?f.value===t.KONNECT?(W.value=await h(),r=await C.post(K.value,ae.value)):r=await C.post(K.value,x.value):v.value==="edit"&&(f.value===t.KONNECT&&!W.value?(W.value=await h(),r=await C.put(K.value,ae.value)):r=((i=c.config)==null?void 0:i.app)==="konnect"?await C.put(K.value,ae.value):await C.patch(K.value,x.value)),b(r==null?void 0:r.data),s("update",r==null?void 0:r.data)}catch(r){d.errorMessage=y(r),s("error",r)}finally{d.isReadonly=!1}};return(i,r)=>{const _=e.resolveComponent("KTooltip"),B=e.resolveComponent("KSelect"),V=e.resolveComponent("KInput"),ee=e.resolveComponent("KCheckbox"),ne=e.resolveComponent("KCollapse"),ie=e.resolveComponent("KTextArea");return e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(e.unref(p.EntityBaseForm),{"can-submit":R.value&&Y.value,config:o.config,"edit-id":o.vaultId,"entity-type":e.unref(p.SupportedEntityType).Vault,"error-message":d.errorMessage,"fetch-url":Z.value,"form-fields":x.value,"is-readonly":d.isReadonly,onCancel:z,"onFetch:error":S,"onFetch:success":b,onLoading:O,onSubmit:N},{default:e.withCtx(()=>[e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(l)("form.sections.config.description"),title:e.unref(l)("form.sections.config.title")},{default:e.withCtx(()=>[e.createElementVNode("div",Ae,[e.createVNode(B,{modelValue:f.value,"onUpdate:modelValue":r[0]||(r[0]=n=>f.value=n),"data-testid":"provider-select",disabled:X.value,"dropdown-max-height":"500",items:$.value,readonly:d.isReadonly},{"selected-item-template":e.withCtx(({item:n})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(n.value)))),e.createElementVNode("span",null,e.toDisplayString(n==null?void 0:n.label),1)]),"item-template":e.withCtx(({item:n})=>[e.createVNode(_,{placement:"top",text:n.disabled?e.unref(l)("form.unavailable"):""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"provider-item","data-testid":`vault-form-provider-${n.value}`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(n.value)))),e.createElementVNode("div",ve,[e.createElementVNode("span",Ue,e.toDisplayString(n==null?void 0:n.label),1),e.createElementVNode("span",Te,e.toDisplayString(H(n.value)),1)])],8,Re)]),_:2},1032,["text"])]),_:1},8,["modelValue","disabled","items","readonly"])]),e.createVNode(e.TransitionGroup,{name:"appear"},{default:e.withCtx(()=>[f.value===e.unref(t).ENV?(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(V,{modelValue:a[e.unref(t).ENV].prefix,"onUpdate:modelValue":r[1]||(r[1]=n=>a[e.unref(t).ENV].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-kong-prefix",label:e.unref(l)("form.config.env.fields.prefix.label"),"label-attributes":{info:e.unref(l)("form.config.env.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(l)("form.config.env.fields.prefix.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:0,modelValue:a[e.unref(t).ENV].base64_decode,"onUpdate:modelValue":r[2]||(r[2]=n=>a[e.unref(t).ENV].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AWS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AWS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(B,{modelValue:a[e.unref(t).AWS].region,"onUpdate:modelValue":r[3]||(r[3]=n=>a[e.unref(t).AWS].region=n),"data-testid":"vault-form-config-aws-region",items:M,label:e.unref(l)("form.config.aws.fields.region.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.region.tooltip")},placeholder:e.unref(l)("form.config.aws.fields.region.placeholder"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AWS].endpoint_url,"onUpdate:modelValue":r[4]||(r[4]=n=>a[e.unref(t).AWS].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-endpoint_url",label:e.unref(l)("form.config.aws.fields.endpoint_url.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AWS].assume_role_arn,"onUpdate:modelValue":r[5]||(r[5]=n=>a[e.unref(t).AWS].assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-assume_role_arn",label:e.unref(l)("form.config.aws.fields.assume_role_arn.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.assume_role_arn.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AWS].role_session_name,"onUpdate:modelValue":r[6]||(r[6]=n=>a[e.unref(t).AWS].role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-role_session_name",label:e.unref(l)("form.config.aws.fields.role_session_name.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.role_session_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),o.config.awsStsEndpointUrlAvailable?(e.openBlock(),e.createBlock(V,{key:0,modelValue:a[e.unref(t).AWS].sts_endpoint_url,"onUpdate:modelValue":r[7]||(r[7]=n=>a[e.unref(t).AWS].sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-sts_endpoint_url",label:e.unref(l)("form.config.aws.fields.sts_endpoint_url.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.sts_endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:1,modelValue:a[e.unref(t).AWS].base64_decode,"onUpdate:modelValue":r[8]||(r[8]=n=>a[e.unref(t).AWS].base64_decode=n),"data-testid":"vault-form-config-aws-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).GCP?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).GCP}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(V,{modelValue:a[e.unref(t).GCP].project_id,"onUpdate:modelValue":r[9]||(r[9]=n=>a[e.unref(t).GCP].project_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-gcp-project-id",label:e.unref(l)("form.config.gcp.fields.project_id.label"),placeholder:e.unref(l)("form.config.gcp.fields.project_id.placeholder"),readonly:d.isReadonly,required:"",type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(u),{keypath:"form.config.gcp.fields.project_id.tooltip.text",scope:"global"},{"italic-text":e.withCtx(()=>[e.createElementVNode("em",null,e.toDisplayString(e.unref(l)("form.config.gcp.fields.project_id.tooltip.italicText")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:0,modelValue:a[e.unref(t).GCP].base64_decode,"onUpdate:modelValue":r[10]||(r[10]=n=>a[e.unref(t).GCP].base64_decode=n),"data-testid":"vault-form-config-gcp-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).HCV?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(B,{modelValue:a[e.unref(t).HCV].protocol,"onUpdate:modelValue":r[11]||(r[11]=n=>a[e.unref(t).HCV].protocol=n),"data-testid":"vault-form-config-hcv-protocol",items:j,label:e.unref(l)("form.config.hcv.fields.protocol.label"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].host,"onUpdate:modelValue":r[12]||(r[12]=n=>a[e.unref(t).HCV].host=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-host",label:e.unref(l)("form.config.hcv.fields.host.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].port,"onUpdate:modelValue":r[13]||(r[13]=n=>a[e.unref(t).HCV].port=n),autocomplete:"off","data-testid":"vault-form-config-hcv-port",label:e.unref(l)("form.config.hcv.fields.port.label"),min:"0",readonly:d.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].mount,"onUpdate:modelValue":r[14]||(r[14]=n=>a[e.unref(t).HCV].mount=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-mount",label:e.unref(l)("form.config.hcv.fields.mount.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(B,{modelValue:a[e.unref(t).HCV].kv,"onUpdate:modelValue":r[15]||(r[15]=n=>a[e.unref(t).HCV].kv=n),"data-testid":"vault-form-config-hcv-kv",items:g,label:e.unref(l)("form.config.hcv.fields.kv.label"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].namespace,"onUpdate:modelValue":r[16]||(r[16]=n=>a[e.unref(t).HCV].namespace=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-namespace",label:e.unref(l)("form.config.hcv.fields.namespace.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(B,{modelValue:a[e.unref(t).HCV].auth_method,"onUpdate:modelValue":r[17]||(r[17]=n=>a[e.unref(t).HCV].auth_method=n),"data-testid":"vault-form-config-hcv-auth_method",items:[{label:e.unref(T).TOKEN,value:e.unref(T).TOKEN},{label:e.unref(T).K8S,value:e.unref(T).K8S},...o.config.hcvAppRoleMethodAvailable?[{label:e.unref(T).APP_ROLE,value:e.unref(T).APP_ROLE}]:[]],label:e.unref(l)("form.config.hcv.fields.auth_method.label"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","items","label","readonly"]),a[e.unref(t).HCV].auth_method===e.unref(T).TOKEN?(e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(V,{modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":r[18]||(r[18]=n=>a[e.unref(t).HCV].token=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-token",label:e.unref(l)("form.config.hcv.fields.token.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(T).K8S?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(V,{modelValue:a[e.unref(t).HCV].kube_role,"onUpdate:modelValue":r[19]||(r[19]=n=>a[e.unref(t).HCV].kube_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_role",label:e.unref(l)("form.config.hcv.fields.kube_role.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].kube_auth_path,"onUpdate:modelValue":r[20]||(r[20]=n=>a[e.unref(t).HCV].kube_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_auth_path",label:e.unref(l)("form.config.hcv.fields.kube_auth_path.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].kube_api_token_file,"onUpdate:modelValue":r[21]||(r[21]=n=>a[e.unref(t).HCV].kube_api_token_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_api_token_file",label:e.unref(l)("form.config.hcv.fields.kube_api_token_file.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(T).APP_ROLE?(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(V,{modelValue:a[e.unref(t).HCV].approle_auth_path,"onUpdate:modelValue":r[22]||(r[22]=n=>a[e.unref(t).HCV].approle_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_auth_path",label:e.unref(l)("form.config.hcv.fields.approle_auth_path.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].approle_role_id,"onUpdate:modelValue":r[23]||(r[23]=n=>a[e.unref(t).HCV].approle_role_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_role_id",label:e.unref(l)("form.config.hcv.fields.approle_role_id.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].approle_secret_id,"onUpdate:modelValue":r[24]||(r[24]=n=>a[e.unref(t).HCV].approle_secret_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id",label:e.unref(l)("form.config.hcv.fields.approle_secret_id.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].approle_secret_id_file,"onUpdate:modelValue":r[25]||(r[25]=n=>a[e.unref(t).HCV].approle_secret_id_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id_file",label:e.unref(l)("form.config.hcv.fields.approle_secret_id_file.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(ee,{modelValue:a[e.unref(t).HCV].approle_response_wrapping,"onUpdate:modelValue":r[26]||(r[26]=n=>a[e.unref(t).HCV].approle_response_wrapping=n),"data-testid":"vault-form-config-hcv-approle_response_wrapping",label:e.unref(l)("form.config.hcv.fields.approle_response_wrapping.label")},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:3,modelValue:a[e.unref(t).HCV].base64_decode,"onUpdate:modelValue":r[27]||(r[27]=n=>a[e.unref(t).HCV].base64_decode=n),"data-testid":"vault-form-config-hcv-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AZURE?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(V,{modelValue:a[e.unref(t).AZURE].location,"onUpdate:modelValue":r[28]||(r[28]=n=>a[e.unref(t).AZURE].location=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-location",label:e.unref(l)("form.config.azure.fields.location.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AZURE].vault_uri,"onUpdate:modelValue":r[29]||(r[29]=n=>a[e.unref(t).AZURE].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-uri",label:e.unref(l)("form.config.azure.fields.vault_uri.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AZURE].credentials_prefix,"onUpdate:modelValue":r[30]||(r[30]=n=>a[e.unref(t).AZURE].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-prefix",label:e.unref(l)("form.config.azure.fields.credential_prefix.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(B,{modelValue:a[e.unref(t).AZURE].type,"onUpdate:modelValue":r[31]||(r[31]=n=>a[e.unref(t).AZURE].type=n),"data-testid":"vault-form-config-azure-type",items:q,label:e.unref(l)("form.config.azure.fields.type.label"),placeholder:e.unref(l)("form.config.azure.fields.type.placeholder"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AZURE].client_id,"onUpdate:modelValue":r[32]||(r[32]=n=>a[e.unref(t).AZURE].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-client-id",label:e.unref(l)("form.config.azure.fields.client_id.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AZURE].tenant_id,"onUpdate:modelValue":r[33]||(r[33]=n=>a[e.unref(t).AZURE].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-tenant-id",label:e.unref(l)("form.config.azure.fields.tenant_id.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:0,modelValue:a[e.unref(t).AZURE].base64_decode,"onUpdate:modelValue":r[34]||(r[34]=n=>a[e.unref(t).AZURE].base64_decode=n),"data-testid":"vault-form-config-azure-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).CONJUR?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).CONJUR}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(V,{modelValue:a[e.unref(t).CONJUR].endpoint_url,"onUpdate:modelValue":r[35]||(r[35]=n=>a[e.unref(t).CONJUR].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-endpoint_url",label:e.unref(l)("form.config.conjur.fields.endpoint_url.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).CONJUR].login,"onUpdate:modelValue":r[36]||(r[36]=n=>a[e.unref(t).CONJUR].login=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-login",label:e.unref(l)("form.config.conjur.fields.login.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).CONJUR].account,"onUpdate:modelValue":r[37]||(r[37]=n=>a[e.unref(t).CONJUR].account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-account",label:e.unref(l)("form.config.conjur.fields.account.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":r[38]||(r[38]=n=>a[e.unref(t).CONJUR].api_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-api_key",label:e.unref(l)("form.config.conjur.fields.api_key.label"),readonly:d.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])])):e.createCommentVNode("",!0),o.config.ttl?(e.openBlock(),e.createElementBlock("div",Fe,[J.value?(e.openBlock(),e.createBlock(ne,{key:0,class:"advanced-fields-collapse","data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(l)("form.config.advancedFields.title")},{default:e.withCtx(()=>[e.createElementVNode("div",Me,[e.createElementVNode("div",De,[e.createVNode(V,{modelValue:a[f.value].ttl,"onUpdate:modelValue":r[39]||(r[39]=n=>a[f.value].ttl=n),"data-testid":"vault-ttl-input",label:e.unref(l)("form.config.advancedFields.ttl"),"label-attributes":{info:e.unref(l)("form.config.advancedFields.ttlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])]),e.createElementVNode("div",Oe,[e.createVNode(V,{modelValue:a[f.value].neg_ttl,"onUpdate:modelValue":r[40]||(r[40]=n=>a[f.value].neg_ttl=n),"data-testid":"vault-neg-ttl-input",label:e.unref(l)("form.config.advancedFields.negTtl"),"label-attributes":{info:e.unref(l)("form.config.advancedFields.negTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])]),e.createElementVNode("div",He,[e.createElementVNode("div",qe,[e.createVNode(V,{modelValue:a[f.value].resurrect_ttl,"onUpdate:modelValue":r[41]||(r[41]=n=>a[f.value].resurrect_ttl=n),"data-testid":"vault-resurrect-ttl-input",label:e.unref(l)("form.config.advancedFields.resurrectTtl"),"label-attributes":{info:e.unref(l)("form.config.advancedFields.resurrectTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])])]),_:1},8,["trigger-label"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["description","title"]),e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(l)("form.sections.general.description"),title:e.unref(l)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:d.fields.prefix,"onUpdate:modelValue":r[42]||(r[42]=n=>d.fields.prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-prefix",help:e.unref(l)("form.fields.prefix.help"),label:e.unref(l)("form.fields.prefix.label"),"label-attributes":{info:e.unref(l)("form.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(l)("form.fields.prefix.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"]),e.createVNode(ie,{modelValue:d.fields.description,"onUpdate:modelValue":r[43]||(r[43]=n=>d.fields.description=n),modelModifiers:{trim:!0},"character-limit":1e3,class:"vault-form-textarea","data-testid":"vault-form-description",label:e.unref(l)("form.fields.description.label"),placeholder:e.unref(l)("form.fields.description.placeholder"),readonly:d.isReadonly},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(V,{modelValue:d.fields.tags,"onUpdate:modelValue":r[44]||(r[44]=n=>d.fields.tags=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-tags",help:e.unref(l)("form.fields.tags.help"),label:e.unref(l)("form.fields.tags.label"),placeholder:e.unref(l)("form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-356c233b"]]),je={class:"kong-ui-vault-entity-config-card"},Le=e.defineComponent({__name:"VaultConfigCard",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string"||!o.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(o){const w=o,c=e.computed(()=>{var l,E;return(E=te.form[(l=w.config)==null?void 0:l.app])==null?void 0:E.edit}),{i18n:{t:s}}=re.useI18n(),u=e.ref({id:{},name:{label:s("labels.vault_type")},updated_at:{},created_at:{},prefix:{order:5,section:p.ConfigurationSchemaSection.Basic},description:{order:6,section:p.ConfigurationSchemaSection.Basic},tags:{order:7},config:{order:8,type:p.ConfigurationSchemaType.Json}});return(l,E)=>(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(e.unref(p.EntityBaseConfigCard),{config:o.config,"config-card-doc":o.configCardDoc,"config-schema":u.value,"entity-type":e.unref(p.SupportedEntityType).Vault,"fetch-url":c.value,"hide-title":o.hideTitle,"onFetch:error":E[0]||(E[0]=C=>l.$emit("fetch:error",C)),"onFetch:success":E[1]||(E[1]=C=>l.$emit("fetch:success",C)),onLoading:E[2]||(E[2]=C=>l.$emit("loading",C))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),se="/v2/control-planes/{controlPlaneId}",le={getVault:{konnect:`${se}/core-entities/vaults/{id}`},list:{konnect:`${se}/config-stores/{id}/secrets`},form:{konnect:{create:`${se}/config-stores/{id}/secrets`,edit:`${se}/config-stores/{id}/secrets/{secretId}`}}},ze={class:"table-content-overflow-wrapper"},Ge=oe(e.defineComponent({inheritAttrs:!1,__name:"SecretListInner",props:{config:{type:Object,required:!0,validator:o=>!(!o||(o==null?void 0:o.app)!=="konnect"||!o.createRoute||!o.getEditRoute)},configStoreId:{type:String,required:!0},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","delete:success"],setup(o,{emit:w}){var O;const c=w,s=o,{i18n:{t:u,formatUnixTimeStamp:l}}=re.useI18n(),{axiosInstance:E}=p.useAxios((O=s.config)==null?void 0:O.axiosRequestConfig),y={key:{label:u("secrets.list.table_headers.key"),sortable:!1,hidable:!1},updated_at:{label:u("secrets.list.table_headers.updated_at"),sortable:!1}},d=S=>({"data-testid":S.key}),k=e.computed(()=>{var S;return`${s.config.apiBaseUrl}${le.list[s.config.app]}`.replace(/{controlPlaneId}/gi,((S=s.config)==null?void 0:S.controlPlaneId)||"").replace(/{id}/gi,s.configStoreId||"")}),f=e.ref(""),F={isExactMatch:!0,placeholder:u("search.placeholder_for_secrets.konnect")},{fetcher:W,fetcherState:J,fetcherCacheKey:$}=p.useFetcher(e.computed(()=>({...s.config,cacheIdentifier:s.cacheIdentifier})),k),P=()=>{f.value=""},a=e.ref(null),Q=S=>({label:u("actions.edit"),to:s.config.getEditRoute(S)}),M=e.ref(void 0),q=e.ref(!1),j=e.ref(!1),g=e.ref(""),v=p.useDeleteUrlBuilder(s.config,k.value),Z=S=>{M.value=S,q.value=!0},X=()=>{q.value=!1},L=async()=>{var S,D,H;if((S=M.value)!=null&&S.key){j.value=!0;try{await E.delete(v(M.value.key)),j.value=!1,q.value=!1,$.value++,c("delete:success",M.value)}catch(b){g.value=((H=(D=b.response)==null?void 0:D.data)==null?void 0:H.message)||b.message||u("errors.delete"),c("error",b)}finally{j.value=!1}}};e.watch(J,S=>{var D,H,b;if(S.status===p.FetcherStatus.Error){a.value={title:u("errors.general")},(b=(H=(D=S.error)==null?void 0:D.response)==null?void 0:H.data)!=null&&b.message&&(a.value.message=S.error.response.data.message),c("error",S.error);return}a.value=null});const z=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${u("secrets.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:u("secrets.title")});return e.onBeforeMount(async()=>{await s.canCreate()&&(z.value.title=u("secrets.list.empty_state.title"),z.value.ctaText=u("secrets.list.toolbar_actions.new_secret"))}),(S,D)=>{const H=e.resolveComponent("KButton"),b=e.resolveComponent("KDropdownItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-sorting":"","empty-state-options":z.value,"enable-entity-actions":"","error-message":a.value,fetcher:e.unref(W),"fetcher-cache-key":e.unref($),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-secrets-list",query:f.value,"row-attributes":d,"table-headers":e.unref(y),onClearSearchInput:P},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(p.EntityFilter),{modelValue:f.value,"onUpdate:modelValue":D[0]||(D[0]=m=>f.value=m),config:F},null,8,["modelValue"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(H,{appearance:"primary","data-testid":"toolbar-add-secret",size:"large",to:o.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(G.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("secrets.list.toolbar_actions.new_secret")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),key:e.withCtx(({rowValue:m})=>[e.createElementVNode("div",ze,[e.createElementVNode("b",null,e.toDisplayString(m??"-"),1)])]),updated_at:e.withCtx(({rowValue:m})=>[e.createElementVNode("span",null,e.toDisplayString(m?e.unref(l)(new Date(m).getTime()/1e3):"-"),1)]),actions:e.withCtx(({row:m})=>[e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canEdit(m)},{default:e.withCtx(()=>[e.createVNode(b,{"data-testid":"action-entity-edit",item:Q(m.key)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canDelete(m)},{default:e.withCtx(()=>[e.createVNode(b,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:A=>Z(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":j.value,description:e.unref(u)("delete.description"),"entity-name":M.value&&M.value.key,"entity-type":e.unref(p.EntityTypes).Secret,error:g.value,title:e.unref(u)("delete.title_for_secret"),visible:q.value,onCancel:X,onProceed:L},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])],64)}}}),[["__scopeId","data-v-904390fc"]]),Ze={class:"kong-ui-entities-secrets-list"},Je=oe(e.defineComponent({__name:"SecretList",props:{config:{type:Object,required:!0,validator:o=>!(!o||(o==null?void 0:o.app)!=="konnect"||!o.createRoute||!o.getEditRoute)},vaultId:{type:String,required:!0},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","delete:success"],setup(o,{emit:w}){var d;const c=w,s=o,u=k=>{c("error",k)},l=k=>{c("delete:success",k)},{axiosInstance:E}=p.useAxios((d=s.config)==null?void 0:d.axiosRequestConfig),C=e.ref(""),y=e.computed(()=>{var k;return`${s.config.apiBaseUrl}${le.getVault[s.config.app]}`.replace(/{controlPlaneId}/gi,((k=s.config)==null?void 0:k.controlPlaneId)||"").replace(/{id}/gi,s.vaultId)});return e.onBeforeMount(async()=>{var k;try{const{data:f}=await E.get(y.value);C.value=(k=f==null?void 0:f.config)==null?void 0:k.config_store_id}catch(f){c("error",f)}}),(k,f)=>(e.openBlock(),e.createElementBlock("div",Ze,[C.value?(e.openBlock(),e.createBlock(Ge,e.mergeProps({key:0},s,{"config-store-id":C.value,"onDelete:success":l,onError:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-f5aa5636"]]),Qe=oe(e.defineComponent({inheritAttrs:!1,__name:"SecretFormInner",props:{config:{type:Object,required:!0,validator:o=>!(!o||o.app!=="konnect"||!o.controlPlaneId||!o.cancelRoute)},configStoreId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:w}){var j;const c=o,s=w,{i18n:{t:u}}=re.useI18n(),l=ce.useRouter(),{axiosInstance:E}=p.useAxios((j=c.config)==null?void 0:j.axiosRequestConfig),{getMessageFromError:C}=p.useErrors(),y=e.reactive({fields:{key:"",value:""},readonly:!1,errorMessage:""}),d=e.reactive({key:"",value:""}),k=e.computed(()=>{var g,v;return(v=le.form[(g=c.config)==null?void 0:g.app])==null?void 0:v.edit.replace(/{id}/gi,c.configStoreId).replace(/{secretId}/gi,c.secretId)}),f=()=>{var g;l.push(((g=c.config)==null?void 0:g.cancelRoute)||{name:"secret-list"})},F=g=>{s("loading",g)},W=g=>{s("error",g)},J=g=>{var v,Z;y.fields.key=((v=g==null?void 0:g.item)==null?void 0:v.key)||(g==null?void 0:g.key)||"",y.fields.value=((Z=g==null?void 0:g.item)==null?void 0:Z.value)||(g==null?void 0:g.value)||"",Object.assign(d,y.fields)},$=e.computed(()=>c.secretId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),P=e.computed(()=>{var g;return`${c.config.apiBaseUrl}${le.form[c.config.app][$.value]}`.replace(/{controlPlaneId}/gi,((g=c.config)==null?void 0:g.controlPlaneId)||"").replace(/{id}/gi,c.configStoreId).replace(/{secretId}/gi,c.secretId)}),a=e.computed(()=>!!y.fields.key&&!!y.fields.value),Q=e.computed(()=>JSON.stringify(y.fields)!==JSON.stringify(d)),M=e.computed(()=>({key:y.fields.key,value:y.fields.value})),q=async()=>{try{y.readonly=!0;let g;$.value==="create"?g=await E.post(P.value,M.value):$.value==="edit"&&(g=await E.put(P.value,M.value)),J(g==null?void 0:g.data),s("update",g==null?void 0:g.data)}catch(g){y.errorMessage=C(g),s("error",g)}finally{y.readonly=!1}};return(g,v)=>{const Z=e.resolveComponent("KInput"),X=e.resolveComponent("KTextArea"),L=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(e.unref(p.EntityBaseForm),{"can-submit":a.value&&Q.value,config:o.config,"edit-id":o.secretId,"entity-type":e.unref(p.SupportedEntityType).Other,"error-message":y.errorMessage,"fetch-url":k.value,"form-fields":M.value,"is-readonly":y.readonly,onCancel:f,"onFetch:error":W,"onFetch:success":J,onLoading:F,onSubmit:q},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(u)("secrets.form.info.description"),"has-divider":"",title:e.unref(u)("secrets.form.info.title")},{default:e.withCtx(()=>[e.createVNode(Z,{modelValue:y.fields.key,"onUpdate:modelValue":v[0]||(v[0]=z=>y.fields.key=z),modelModifiers:{trim:!0},autocomplete:"off",class:"key-field","data-testid":"secret-form-key",disabled:$.value===e.unref(p.EntityBaseFormType).Edit,label:e.unref(u)("secrets.form.fields.key.label"),placeholder:e.unref(u)("secrets.form.fields.key.placeholder"),readonly:y.readonly,required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(X,{modelValue:y.fields.value,"onUpdate:modelValue":v[1]||(v[1]=z=>y.fields.value=z),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"secret-form-value",label:e.unref(u)("secrets.form.fields.value.label"),placeholder:e.unref(u)("secrets.form.fields.value.placeholder"),readonly:y.readonly,required:"",resizable:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(L,{appearance:"warning",message:e.unref(u)("secrets.form.hint")},null,8,["message"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])}}}),[["__scopeId","data-v-5ee165bf"]]),Xe={class:"kong-ui-entities-secret-form"},Ye=oe(e.defineComponent({__name:"SecretForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||o.app!=="konnect"||!o.controlPlaneId||!o.cancelRoute)},vaultId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:w}){var k;const c=o,s=w,u=f=>{s("update",f)},l=f=>{s("error",f)},E=f=>{s("loading",f)},{axiosInstance:C}=p.useAxios((k=c.config)==null?void 0:k.axiosRequestConfig),y=e.ref(""),d=e.computed(()=>{var f;return`${c.config.apiBaseUrl}${le.getVault[c.config.app]}`.replace(/{controlPlaneId}/gi,((f=c.config)==null?void 0:f.controlPlaneId)||"").replace(/{id}/gi,c.vaultId)});return e.onBeforeMount(async()=>{var f;try{const{data:F}=await C.get(d.value);y.value=(f=F==null?void 0:F.config)==null?void 0:f.config_store_id}catch(F){s("error",F)}}),(f,F)=>(e.openBlock(),e.createElementBlock("div",Xe,[y.value?(e.openBlock(),e.createBlock(Qe,e.mergeProps({key:0},c,{"config-store-id":y.value,onError:l,onLoading:E,onUpdate:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-754ddb2f"]]),et={class:"vault-secret-picker-provider"},tt=oe(e.defineComponent({__name:"VaultSecretPickerProvider",props:{value:{},disabled:{type:Boolean},update:{type:Function}},emits:["open"],setup(o,{emit:w}){const c=o,s=w,{i18n:{t:u},i18nT:l}=re.useI18n();return(E,C)=>(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(e.unref(l),{keypath:"vault_secret_picker.provider.complete_action",scope:"global"},{cta:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass({"vault-secret-picker-provider-action":!0,disabled:c.disabled}),onClick:C[0]||(C[0]=()=>!c.disabled&&s("open",c.value,c.update))},e.toDisplayString(e.unref(u)("vault_secret_picker.provider.cta")),3)]),_:1})]))}}),[["__scopeId","data-v-66a1e406"]]),ot=o=>{let w=o.trim();if(!w.startsWith("{")||!w.endsWith("}"))throw new Error("Invalid secret reference: must be enclosed in curly braces");if(w=w.substring(1,w.length-1).trim(),!w.startsWith("vault://"))throw new Error("Invalid secret reference: must start with vault://");const c=new URL(`http://${w.substring(8)}`);if(!c)throw new Error("Invalid secret reference: must have a vault prefix");const s=c.host,[,u,...l]=c.pathname.split("/");if(!s)throw new Error("Invalid secret reference: must have a vault prefix");return{vaultPrefix:s,secretId:u||void 0,optionalSecretKey:l==null?void 0:l.join("/")}},lt=o=>{if(!o.vaultPrefix)throw new Error("Invalid secret reference: must have a vault prefix");let w=`vault://${o.vaultPrefix}`;return o.secretId&&(w=`${w}/${o.secretId}`),o.optionalSecretKey&&(w=`${w}/${o.optionalSecretKey}`),`{${w}}`},at={key:1,class:"inputs-wrapper"},rt={"data-testid":"no-search-results"},nt={class:"k-select-selected-item-label"},it={class:"vault-secret-picker-vault-dropdown-item"},st={class:"select-item-label"},ct={class:"select-item-description"},dt={class:"select-item-description"},ft={"data-testid":"no-search-results"},ut=oe(e.defineComponent({__name:"VaultSecretPicker",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string")},setup:{type:null,required:!1,default:!1}},emits:["proceed","cancel"],setup(o,{emit:w}){var H;const{i18n:{t:c}}=re.useI18n(),s=o,u=w,{axiosInstance:l}=p.useAxios({validateStatus:b=>b===404||b>=200&&b<300,...(H=s.config)==null?void 0:H.axiosRequestConfig}),E=e.ref(!1),C=e.ref(""),y=e.ref(""),d=e.ref(""),k=e.ref(),f=e.computed(()=>{var b,m;return s.config.app==="konnect"?le.list[s.config.app].replace(/{id}/gi,((m=(b=k.value)==null?void 0:b.config)==null?void 0:m.config_store_id)??""):"<not_applicable>"}),F=e.computed(()=>{if($&&q)return c("vault_secret_picker.fetch_error.vaults_and_secrets");if($)return c("vault_secret_picker.fetch_error.vaults");if(q)return c("vault_secret_picker.fetch_error.secrets")}),{debouncedQueryChange:W,loading:J,error:$,loadItems:P,results:a}=p.useDebouncedFilter(s.config,te.list[s.config.app].getAll,void 0,{fetchedItemsKey:"data",searchKeys:["prefix"]}),{debouncedQueryChange:Q,loading:M,error:q,loadItems:j,results:g}=p.useDebouncedFilter(s.config,f,void 0,{fetchedItemsKey:"data",searchKeys:["key"],exactMatchKey:"key"}),v=e.computed(()=>{var A;let b=!1;const m=((A=a.value)==null?void 0:A.map(R=>(R.prefix===C.value&&(b=!0),{label:R.prefix,value:R.prefix,vault:R})))??[];return!b&&k.value&&m.push({label:k.value.prefix,value:k.value.prefix,vault:k.value}),m}),Z=e.computed(()=>{var A;let b=!1;const m=((A=g.value)==null?void 0:A.map(R=>(R.key===y.value&&(b=!0),{label:R.key,value:R.key})))??[];return!b&&y.value&&m.push({label:y.value,value:y.value}),m}),X=e.computed(()=>{var b;return((b=k==null?void 0:k.value)==null?void 0:b.name)==="konnect"}),L=e.computed(()=>!!k.value&&!!y.value),z=b=>b.label?`${b.label} - (${b.vault.name} - ${b.vault.id})`:b.value,O=b=>{var A,R;let m=`${s.config.apiBaseUrl}${te.form[s.config.app].edit}`;return s.config.app==="konnect"?m=m.replace(/{controlPlaneId}/gi,((A=s.config)==null?void 0:A.controlPlaneId)||""):s.config.app==="kongManager"&&(m=m.replace(/\/{workspace}/gi,(R=s.config)!=null&&R.workspace?`/${s.config.workspace}`:"")),m.replace(/{id}/gi,b)},S=(b,m)=>{var A;return s.config.app!=="konnect"?"<not_applicable>":`${s.config.apiBaseUrl}${le.form[s.config.app].edit}`.replace(/{controlPlaneId}/gi,((A=s.config)==null?void 0:A.controlPlaneId)||"").replace(/{id}/gi,m).replace(/{secretId}/gi,b)},D=()=>{u("proceed",lt({vaultPrefix:C.value,secretId:y.value||void 0,optionalSecretKey:d.value||void 0}))};return e.watch(()=>s.setup,async b=>{if(b!==!1){if(E.value=!0,C.value="",k.value=void 0,y.value="",d.value="",typeof b=="string"&&b.trim().length>0)try{let m,A="",R="",Y="";const K=ot(b),{data:x}=await l.get(O(K.vaultPrefix));if(x!=null&&x.name)if(m=x,A=K.vaultPrefix,m.name==="konnect"){if(K.secretId){const{data:ae}=await l.get(S(K.secretId,x.config.config_store_id));ae.key===K.secretId&&(R=K.secretId,Y=K.optionalSecretKey??"")}}else R=K.secretId??"",Y=K.optionalSecretKey??"";await e.nextTick(()=>{C.value=A,k.value=m,y.value=R,d.value=Y})}catch(m){console.debug(m)}E.value=!1,await P()}},{immediate:!0}),e.watch(C,async(b,m)=>{var A;E.value||b===m||(k.value=(A=v.value.find(R=>R.value===b))==null?void 0:A.vault,y.value="",d.value="")}),e.watch(f,async()=>{X.value&&await j()},{immediate:!0}),(b,m)=>{const A=e.resolveComponent("KEmptyState"),R=e.resolveComponent("KSelect"),Y=e.resolveComponent("KInput"),K=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(K,{"action-button-disabled":!L.value,"action-button-text":e.unref(c)("vault_secret_picker.actions.use_key"),class:"vault-secret-picker","data-testid":"vault-secret-picker-modal",title:e.unref(c)("vault_secret_picker.title"),visible:s.setup!==!1,onCancel:m[4]||(m[4]=()=>u("cancel")),onProceed:D},{default:e.withCtx(()=>[e.unref($)||e.unref(q)?(e.openBlock(),e.createBlock(A,{key:0,"data-testid":"vault-secret-picker-fetch-error","icon-variant":"error",message:F.value},null,8,["message"])):(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(R,{modelValue:C.value,"onUpdate:modelValue":m[0]||(m[0]=x=>C.value=x),clearable:"","data-testid":"vault-secret-picker-vault-select",disabled:E.value,"enable-filtering":"","filter-function":()=>!0,items:v.value,"kpop-attributes":{"data-testid":"vault-secret-picker-vault-popover"},label:e.unref(c)("vault_secret_picker.vault.label"),loading:e.unref(J),placeholder:e.unref(c)("vault_secret_picker.vault.placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(W)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",rt,e.toDisplayString(e.unref(c)("vault_secret_picker.no_results")),1)]),"selected-item-template":e.withCtx(({item:x})=>[e.createElementVNode("span",nt,e.toDisplayString(z(x)),1)]),"item-template":e.withCtx(({item:x})=>[e.createElementVNode("div",it,[e.createElementVNode("span",st,e.toDisplayString(x.label),1),e.createElementVNode("span",ct,e.toDisplayString(x.vault.name),1),e.createElementVNode("span",dt,e.toDisplayString(x.vault.id),1)])]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"]),X.value?(e.openBlock(),e.createBlock(R,{key:0,modelValue:y.value,"onUpdate:modelValue":m[1]||(m[1]=x=>y.value=x),clearable:"","data-testid":"vault-secret-picker-secret-id-select",disabled:E.value||!k.value,"enable-filtering":"","filter-function":()=>!0,items:Z.value,"kpop-attributes":{"data-testid":"vault-secret-picker-secret-id-popover"},label:e.unref(c)("vault_secret_picker.secret_id.label"),loading:e.unref(M),placeholder:e.unref(c)("vault_secret_picker.secret_id.select_placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(Q)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",ft,e.toDisplayString(e.unref(c)("vault_secret_picker.no_results")),1)]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"])):(e.openBlock(),e.createBlock(Y,{key:1,modelValue:y.value,"onUpdate:modelValue":m[2]||(m[2]=x=>y.value=x),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-id-input",disabled:E.value||!k.value,label:e.unref(c)("vault_secret_picker.secret_id.label"),placeholder:e.unref(c)("vault_secret_picker.secret_id.input_placeholder"),required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder"])),e.createVNode(Y,{modelValue:d.value,"onUpdate:modelValue":m[3]||(m[3]=x=>d.value=x),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-key-input",disabled:E.value||!k.value,help:e.unref(c)("vault_secret_picker.optional_secret_key.help"),label:e.unref(c)("vault_secret_picker.optional_secret_key.label"),placeholder:e.unref(c)("vault_secret_picker.optional_secret_key.placeholder"),type:"text"},null,8,["modelValue","disabled","help","label","placeholder"])]))]),_:1},8,["action-button-disabled","action-button-text","title","visible"])}}}),[["__scopeId","data-v-df8552cc"]]);U.SecretForm=Ye,U.SecretList=Je,U.VaultAuthMethods=T,U.VaultConfigCard=Le,U.VaultForm=We,U.VaultList=Se,U.VaultProviders=t,U.VaultSecretPicker=ut,U.VaultSecretPickerProvider=tt,U.secretsEndpoints=le,U.vaultsEndpoints=te,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})});
1
+ (function(U,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/entities-shared","@kong-ui-public/i18n"],e):(U=typeof globalThis<"u"?globalThis:U||self,e(U["kong-ui-public-entities-vaults"]={},U.Vue,U.VueRouter,U.KongIcons,U["kong-ui-public-entities-shared"],U["kong-ui-public-i18n"]))})(this,function(U,e,ce,G,p,ue){"use strict";const ye={actions:{create:"New vault",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View Details",loading:"Loading..."},delete:{title:"Delete a Vault",title_for_secret:"Delete a Secret",description:"This action cannot be reversed."},errors:{general:"Vaults could not be retrieved",delete:"The vault could not be deleted at this time.",copy:"Failed to copy to clipboard"},search:{placeholder_for_vaults:{konnect:"Filter by exact prefix or ID"},placeholder_for_secrets:{konnect:"Filter by exact key"}},vaults:{title:"Vaults",list:{toolbar_actions:{new_vault:"New vault"},table_headers:{prefix:"Prefix",name:"Vault Type",description:"Description",tags:"Tags",id:"ID"},empty_state:{title:"Configure a New Vault",description:"Improve the security of your Kong Gateway deployment with centralized secrets."},empty_state_v2:{title:"Configure your first vault",group:"Vaults created in gateways within this group will automatically appear here.",description:"Vaults securely and centrally store sensitive information, such as credentials, tokens, and keys, to simplify secrets management.",create_cta:"New vault"}}},secrets:{title:"Secrets",list:{toolbar_actions:{new_secret:"Store New Secret"},table_headers:{key:"Secret Key",updated_at:"Updated At"},empty_state:{title:"No Secrets Stored",description:"Improve the security of your Kong Gateway deployment with centralized secrets."}},form:{info:{title:"Secret",description:"Enter the secret key and secret value to be stored in Konnect vault"},fields:{key:{label:"Key",placeholder:"Enter key"},value:{label:"Value",placeholder:"Enter value here, can be simple values or multi-line"}},hint:"Once saved, the secret value will not be visible"}},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},labels:{vault_type:"Vault Type"},form:{sections:{general:{title:"General Information",description:"General information helps identify and manage this Vault instance."},config:{title:"Vault Configuration",description:"Select a type of Vault and configure properties specific to each type of Vault."}},fields:{prefix:{label:"Prefix",placeholder:"Enter a unique prefix for this vault",help:"e.g. my-vault",tooltip:"The prefix is used to load the right Vault configuration and implementation when referencing secrets with the other entities."},description:{label:"Description",placeholder:"Enter some description for this vault"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}},config:{konnect:{label:"Konnect",description:"Access secrets stored directly in Konnect's unified platform to easily reference in Kong Gateway configuration."},env:{label:"Environment Variables",description:"Access secrets stored via variables to be made available in Kong Gateway at runtime.",fields:{prefix:{label:"Environment Variable Prefix",placeholder:"Enter your environment variable vault prefix",tooltip:"Data plane will access all the environment variables starting with this prefix."}}},aws:{label:"AWS Secrets Manager",description:"Access secrets stored in AWS Secrets Manager for Kong Gateway configuration.",fields:{region:{label:"Region",placeholder:"Select an AWS region",tooltip:"The AWS region your vault is located in",locations:{"us-east-1":{location:"N. Virginia"},"us-east-2":{location:"Ohio"},"us-west-1":{location:"N. California"},"us-west-2":{location:"Oregon"},"af-south-1":{location:"Cape Town"},"ap-east-1":{location:"Hong Kong"},"ap-southeast-3":{location:"Jakarta"},"ap-south-1":{location:"Mumbai"},"ap-northeast-1":{location:"Tokyo"},"ap-northeast-2":{location:"Seoul"},"ap-northeast-3":{location:"Osaka"},"ap-southeast-1":{location:"Singapore"},"ap-southeast-2":{location:"Sydney"},"ca-central-1":{location:"Canada"},"eu-central-1":{location:"Frankfurt"},"eu-west-1":{location:"Ireland"},"eu-west-2":{location:"London"},"eu-west-3":{location:"Paris"},"eu-south-1":{location:"Milan"},"eu-north-1":{location:"Stockholm"},"me-south-1":{location:"Bahrain"},"sa-east-1":{location:"São Paulo"},"us-gov-east-1":{location:"US East"},"us-gov-west-1":{location:"US West"}}},endpoint_url:{label:"Endpoint URL",tooltip:'The AWS SecretsManager service endpoint url. If not specified, the value used by vault will be the official AWS SecretsManager service url which is `https://secretsmanager.<region>.amazonaws.com`. You can specify a complete URL(including the "http/https" scheme) to override the endpoint that vault will connect to.'},assume_role_arn:{label:"Assume Role ARN",tooltip:"The target AWS IAM role ARN that will be assumed. Typically this is used for operating between multiple roles or cross-accounts. If you are not using assume role you should not specify this value."},role_session_name:{label:"Role Session Name",tooltip:"The role session name used for role assuming."},sts_endpoint_url:{label:"STS Endpoint URL",tooltip:"The custom STS endpoint URL used for role assuming in AWS Vault. Note that this value will override the default STS endpoint URL(which should be `https: //sts.amazonaws.com`, or `https: //sts.<region>.amazonaws.com` if you have `AWS_STS_REGIONAL_ENDPOINTS` set to `regional`). If you are not using private VPC endpoint for STS service, you should not specify this value."}}},gcp:{label:"Google Secret Manager",description:"Access secrets stored in Google Secret Manager for Kong Gateway configuration.",fields:{project_id:{label:"Project ID",placeholder:"Enter your Google Cloud Project ID",tooltip:{text:"Visit your Google API Console and select {italic-text} in the projects list to see your project ID",italicText:"Manage all projects"}}}},hcv:{label:"HashiCorp Vault",description:"Access secrets stored in HashiCorp Vault for Kong Gateway configuration.",fields:{protocol:{label:"Protocol"},host:{label:"Host"},port:{label:"Port"},mount:{label:"Mount"},kv:{label:"Kv"},namespace:{label:"Namespace"},auth_method:{label:"Authentication Method"},token:{label:"Token"},kube_role:{label:"Kubernetes Role"},kube_auth_path:{label:"Kubernetes Auth Path"},kube_api_token_file:{label:"Kubernetes API Token File"},approle_auth_path:{label:"App Role Auth Path"},approle_role_id:{label:"App Role Role ID"},approle_secret_id:{label:"App Role Secret ID"},approle_secret_id_file:{label:"App Role Secret ID File"},approle_response_wrapping:{label:"App Role Response Wrapping"}}},azure:{label:"Azure Vault",description:"Access secrets stored in Azure Key Vault for Kong Gateway configuration.",fields:{location:{label:"Location"},vault_uri:{label:"Vault URI"},credential_prefix:{label:"Credential Prefix"},type:{label:"Type",placeholder:"Select a type"},client_id:{label:"Client ID"},tenant_id:{label:"Tenant ID"}}},conjur:{label:"Conjur Vault",description:"Access secrets stored in Conjur Key Vault for Kong Gateway configuration.",fields:{endpoint_url:{label:"Endpoint URL"},login:{label:"Login"},api_key:{label:"API Key"},account:{label:"Account"}}},advancedFields:{title:"View Advanced Fields",ttl:"Time-to-Live",ttlTooltip:"Time-to-live (in seconds) of a secret from a vault when cached by this reference",negTtl:"Negative Time-to-Live",negTtlTooltip:"Time-to-live (in seconds) of a vault miss (no secret)",resurrectTtl:"Time-to-Live Resurrection",resurrectTtlTooltip:"Time (in seconds) for which stale secrets from the vault are resurrected for when they cannot be refreshed"},commonFields:{base64_decode:{label:"Base64 Decode",tooltip:"Decode all secrets in this vault as base64, useful for binary data. If some of the secrets are not base64 encoded, an error will occur when using them. It's recommended to create a separate vault for base64 secrets."}}},unavailable:"This vault provider is available on Enterprise."},vault_secret_picker:{title:"Look up Key in Vault",vault:{label:"Vault",placeholder:"Select a vault"},secret_id:{label:"Secret ID",input_placeholder:"Enter a secret ID",select_placeholder:"Select or enter a complete secret ID"},optional_secret_key:{label:"Secret Key",placeholder:"Enter the key or key path to access a nested secret value",help:"Optional. e.g. tokens, tokens/refresh_token"},fetch_error:{vaults:"Could not fetch available vaults",secrets:"Could not fetch available secrets",vaults_and_secrets:"Could not fetch available vaults and secrets"},no_results:"No results found",actions:{use_key:"Use Key"},provider:{complete_action:"Look up {cta}",cta:"Key in Vault"}}};function _e(){const o=ue.createI18n("en-us",ye);return{i18n:o,i18nT:ue.i18nTComponent(o)}}const re={useI18n:_e},de="/v2/control-planes/{controlPlaneId}/core-entities",pe="/v2/control-planes/{controlPlaneId}/config-stores",fe="/{workspace}",te={list:{konnect:{getAll:`${de}/vaults`,deleteConfigStore:`${pe}/{id}?force=true`},kongManager:{getAll:`${fe}/vaults`}},form:{konnect:{create:`${de}/vaults`,createConfigStore:pe,edit:`${de}/vaults/{id}`},kongManager:{create:`${fe}/vaults`,edit:`${fe}/vaults/{id}`}}},he="#00abd2",Ve="24px",ke={class:"kong-ui-entities-vaults-list"},Ce={class:"button-row"},we={class:"empty-state-icon-gateway"},Ee={class:"table-content-overflow-wrapper"},Ne={class:"table-content-overflow-wrapper"},xe=e.defineComponent({__name:"VaultList",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||!o.createRoute||!o.getViewRoute||!o.getEditRoute||o.app==="kongManager"&&!o.isExactMatch&&!o.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},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(o,{emit:w}){var ae;const c=w,s=o,{i18n:{t:u}}=re.useI18n(),l=ce.useRouter(),{axiosInstance:E}=p.useAxios((ae=s.config)==null?void 0:ae.axiosRequestConfig),{hasRecords:C,handleStateChange:y}=p.useTableState(()=>$.value),d=e.computed(()=>C.value&&s.config.app==="konnect"),k=e.computed(()=>!s.enableV2EmptyStates&&s.config.app==="konnect"),f=e.computed(()=>s.config.app!=="kongManager"||!!s.config.disableSorting),F={prefix:{label:u("vaults.list.table_headers.prefix"),searchable:!0,sortable:!0,hidable:!1},name:{label:u("vaults.list.table_headers.name"),searchable:!0,sortable:!0},description:{label:u("vaults.list.table_headers.description"),sortable:!1},tags:{label:u("vaults.list.table_headers.tags"),sortable:!1}},W=F,J=e.computed(()=>{var N,I;let h=`${s.config.apiBaseUrl}${te.list[s.config.app].getAll}`;return s.config.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,((N=s.config)==null?void 0:N.controlPlaneId)||""):s.config.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,(I=s.config)!=null&&I.workspace?`/${s.config.workspace}`:"")),h}),$=e.ref(""),P=e.computed(()=>{if(s.config.app==="konnect"||s.config.isExactMatch)return{isExactMatch:!0,placeholder:u("search.placeholder_for_vaults.konnect")};const{prefix:N,name:I}=F;return{isExactMatch:!1,fields:{name:I,prefix:N},schema:s.config.filterSchema}}),{fetcher:a,fetcherState:Q,fetcherCacheKey:M}=p.useFetcher(e.computed(()=>({...s.config,cacheIdentifier:s.cacheIdentifier})),J),q=()=>{$.value=""},j=()=>{M.value++},g=e.ref(null),v=async(h,N)=>{const I=h.id;if(!await N(I)){c("copy:error",{entity:h,field:"id",message:u("errors.copy")});return}c("copy:success",{entity:h,field:"id",message:u("copy.success",{val:I})})},Z=async(h,N)=>{const I=JSON.stringify(h);if(!await N(I)){c("copy:error",{entity:h,message:u("errors.copy")});return}c("copy:success",{entity:h,message:u("copy.success_brief")})},X=async h=>{var I;await((I=s.canRetrieve)==null?void 0:I.call(s,h))&&l.push(s.config.getViewRoute(h.id))},L=h=>({label:u("actions.view"),to:s.config.getViewRoute(h)}),z=h=>({label:u("actions.edit"),to:s.config.getEditRoute(h)}),H=e.ref(void 0),S=e.ref(!1),D=e.ref(!1),O=e.ref(""),b=p.useDeleteUrlBuilder(s.config,J.value),m=h=>{H.value=h,S.value=!0},A=()=>{S.value=!1},R=async h=>{const{apiBaseUrl:N,app:I,controlPlaneId:i}=s.config,r=`${N}${te.list[I].deleteConfigStore}`.replace(/{controlPlaneId}/gi,i||"").replace(/{id}/gi,h);try{await E.delete(r)}catch{}},Y=async()=>{var h,N,I,i;if((h=H.value)!=null&&h.id){D.value=!0;try{await E.delete(b(H.value.id)),s.config.app==="konnect"&&((N=H.value.config)!=null&&N.config_store_id)&&R(H.value.config.config_store_id),D.value=!1,S.value=!1,M.value++,c("delete:success",H.value)}catch(r){O.value=((i=(I=r.response)==null?void 0:I.data)==null?void 0:i.message)||r.message||u("errors.delete"),c("error",r)}finally{D.value=!1}}},K=()=>{l.push(s.config.createRoute)};e.watch(Q,h=>{var N,I,i;if(h.status===p.FetcherStatus.Error){g.value={title:u("errors.general")},(i=(I=(N=h.error)==null?void 0:N.response)==null?void 0:I.data)!=null&&i.message&&(g.value.message=h.error.response.data.message),c("error",h.error);return}g.value=null});const x=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${u("vaults.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:u("vaults.title")});return e.onBeforeMount(async()=>{await s.canCreate()&&(x.value.title=u("vaults.list.empty_state.title"),x.value.ctaText=u("actions.create"))}),(h,N)=>{const I=e.resolveComponent("KButton"),i=e.resolveComponent("KDropdownItem"),r=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ke,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-sorting":f.value,"empty-state-options":x.value,"enable-entity-actions":"","error-message":g.value,fetcher:e.unref(a),"fetcher-cache-key":e.unref(M),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-vaults-list",query:$.value,"table-headers":e.unref(W),onClearSearchInput:q,"onClick:row":N[4]||(N[4]=_=>X(_)),onSort:j,onState:e.unref(y)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(p.EntityFilter),{modelValue:$.value,"onUpdate:modelValue":N[0]||(N[0]=_=>$.value=_),config:P.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ce,[d.value?(e.openBlock(),e.createBlock(I,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:N[1]||(N[1]=_=>h.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(G.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(I,{appearance:"primary","data-testid":"toolbar-add-vault",size:o.useActionOutside?"medium":"large",to:o.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(G.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("vaults.list.toolbar_actions.new_vault")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),prefix:e.withCtx(({rowValue:_})=>[e.createElementVNode("div",Ee,[e.createElementVNode("b",null,e.toDisplayString(_??"-"),1)])]),name:e.withCtx(({rowValue:_})=>[e.createElementVNode("b",null,e.toDisplayString(_??"-"),1)]),description:e.withCtx(({rowValue:_})=>[e.createElementVNode("div",Ne,e.toDisplayString(_??"-"),1)]),tags:e.withCtx(({rowValue:_})=>[e.createVNode(e.unref(p.TableTags),{tags:_},null,8,["tags"])]),actions:e.withCtx(({row:_})=>[e.createVNode(r,null,{default:e.withCtx(({copyToClipboard:B})=>[e.createVNode(i,{"data-testid":"action-entity-copy-id",onClick:V=>v(_,B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(r,null,{default:e.withCtx(({copyToClipboard:B})=>[e.createVNode(i,{"data-testid":"action-entity-copy-json",onClick:V=>Z(_,B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canRetrieve(_)},{default:e.withCtx(()=>[e.createVNode(i,{"data-testid":"action-entity-view","has-divider":"",item:L(_.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canEdit(_)},{default:e.withCtx(()=>[e.createVNode(i,{"data-testid":"action-entity-edit",item:z(_.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canDelete(_)},{default:e.withCtx(()=>[e.createVNode(i,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:B=>m(_)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(C)&&k.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(I,{appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:N[2]||(N[2]=_=>h.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(G.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!$.value&&o.enableV2EmptyStates&&o.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var _;return[e.createVNode(e.unref(p.EntityEmptyState),{"action-button-text":e.unref(u)("vaults.list.toolbar_actions.new_vault"),appearance:"secondary","can-create":()=>o.canCreate(),"data-testid":"vaults-entity-empty-state",description:e.unref(u)("vaults.list.empty_state_v2.description"),"learn-more":o.config.app==="konnect",title:e.unref(u)("vaults.list.empty_state_v2.title"),"onClick:create":K,"onClick:learnMore":N[3]||(N[3]=B=>h.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",we,[e.createVNode(e.unref(G.SecurityIcon),{color:e.unref(he),size:e.unref(Ve)},null,8,["color","size"])])]),_:2},[(_=o.config)!=null&&_.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vaults.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":D.value,description:e.unref(u)("delete.description"),"entity-name":H.value&&(H.value.prefix||H.value.id),"entity-type":e.unref(p.EntityTypes).Vault,error:O.value,title:e.unref(u)("delete.title"),visible:S.value,onCancel:A,onProceed:Y},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),oe=(o,w)=>{const c=o.__vccOpts||o;for(const[s,u]of w)c[s]=u;return c},Se=oe(xe,[["__scopeId","data-v-77e50046"]]);var t=(o=>(o.AWS="aws",o.GCP="gcp",o.HCV="hcv",o.ENV="env",o.AZURE="azure",o.KONNECT="konnect",o.CONJUR="conjur",o))(t||{}),T=(o=>(o.TOKEN="token",o.K8S="kubernetes",o.APP_ROLE="approle",o))(T||{});const Ie={class:"kong-ui-entities-vault-form"},Ae={class:"vault-form-provider-cards-container"},Re=["data-testid"],ve={class:"provider-item-title-container"},Ue={class:"provider-item-title"},Te={class:"provider-item-description"},$e={key:"kong-vault-config-fields",class:"vault-form-config-fields-container"},Be={key:0,class:"vault-form-config-auth-method-container"},Pe={key:1,class:"vault-form-config-auth-method-container"},Ke={key:2,class:"vault-form-config-auth-method-container"},Fe={key:6},Me={class:"wrapper"},De={class:"item-50"},He={class:"item-50"},Oe={class:"wrapper"},qe={class:"item-100"},We=oe(e.defineComponent({__name:"VaultForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||(o==null?void 0:o.app)==="konnect"&&!(o!=null&&o.controlPlaneId)||(o==null?void 0:o.app)==="kongManager"&&typeof(o==null?void 0:o.workspace)!="string"||!(o!=null&&o.cancelRoute))},vaultId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:w}){var I;const c=o,s=w,{i18nT:u,i18n:{t:l}}=re.useI18n(),E=ce.useRouter(),{axiosInstance:C}=p.useAxios((I=c.config)==null?void 0:I.axiosRequestConfig),{getMessageFromError:y}=p.useErrors(),d=e.reactive({fields:{prefix:"",description:"",tags:""},isReadonly:!1,errorMessage:""}),k=e.reactive({prefix:"",description:"",tags:""}),f=e.ref(c.config.konnectConfigStoreAvailable?t.KONNECT:t.ENV),F=e.ref(null),W=e.ref(),J=e.computed(()=>[t.AWS,t.GCP,t.HCV,t.AZURE,t.CONJUR].includes(f.value)),$=e.computed(()=>[...c.config.konnectConfigStoreAvailable?[{label:l("form.config.konnect.label"),value:t.KONNECT}]:[],{label:l("form.config.env.label"),value:t.ENV},{label:l("form.config.aws.label"),value:t.AWS,disabled:!L.value},{label:l("form.config.gcp.label"),value:t.GCP,disabled:!L.value},{label:l("form.config.hcv.label"),value:t.HCV,disabled:!L.value},...c.config.azureVaultProviderAvailable?[{label:l("form.config.azure.label"),value:t.AZURE,disabled:!L.value}]:[],...c.config.conjurVaultProviderAvailable?[{label:l("form.config.conjur.label"),value:t.CONJUR,disabled:!L.value}]:[]]),P=c.config.base64FieldAvailable?{base64_decode:!1}:{},a=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...P},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...P},[t.GCP]:{project_id:"",...P},[t.HCV]:{protocol:"http",host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",auth_method:T.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,...P},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...P},[t.CONJUR]:{endpoint_url:"",auth_method:"default"}}),Q=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...P},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...P},[t.GCP]:{project_id:"",...P},[t.HCV]:{protocol:"http",host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",auth_method:T.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,...P},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...P},[t.CONJUR]:{endpoint_url:"",auth_method:"default"}}),M=[{label:`${l("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`,value:"us-east-1"},{label:`${l("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`,value:"us-east-2"},{label:`${l("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`,value:"us-west-1"},{label:`${l("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`,value:"us-west-2"},{label:`${l("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`,value:"af-south-1"},{label:`${l("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`,value:"ap-east-1"},{label:`${l("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`,value:"ap-southeast-3"},{label:`${l("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`,value:"ap-south-1"},{label:`${l("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`,value:"ap-northeast-1"},{label:`${l("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`,value:"ap-northeast-2"},{label:`${l("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`,value:"ap-northeast-3"},{label:`${l("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`,value:"ap-southeast-1"},{label:`${l("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`,value:"ap-southeast-2"},{label:`${l("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`,value:"ca-central-1"},{label:`${l("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`,value:"eu-central-1"},{label:`${l("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`,value:"eu-west-1"},{label:`${l("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`,value:"eu-west-2"},{label:`${l("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`,value:"eu-west-3"},{label:`${l("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`,value:"eu-south-1"},{label:`${l("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`,value:"eu-north-1"},{label:`${l("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`,value:"me-south-1"},{label:`${l("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`,value:"sa-east-1"},{label:`${l("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`,value:"us-gov-east-1"},{label:`${l("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`,value:"us-gov-west-1"}],q=[{label:"secrets",value:"secrets"}],j=[{label:"http",value:"http"},{label:"https",value:"https"}],g=[{label:"v1",value:"v1"},{label:"v2",value:"v2"}],v=e.computed(()=>c.vaultId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),Z=e.computed(()=>{var i,r;return(r=te.form[(i=c.config)==null?void 0:i.app])==null?void 0:r.edit}),X=e.computed(()=>v.value===p.EntityBaseFormType.Edit&&c.config.app==="kongManager"),L=e.computed(()=>c.config.app==="konnect"||p.useGatewayFeatureSupported({gatewayInfo:c.config.gatewayInfo,supportedRange:{enterprise:[]}})),z=()=>{var i;E.push(((i=c.config)==null?void 0:i.cancelRoute)||{name:"vault-list"})},H=i=>{s("loading",i)},S=i=>{s("error",i)},D=i=>{switch(i){case t.KONNECT:return G.KongIcon;case t.ENV:return G.CodeIcon;case t.AWS:return G.AwsIcon;case t.GCP:return G.GoogleCloudIcon;case t.HCV:return G.HashicorpIcon;case t.AZURE:return G.AzureIcon;case t.CONJUR:return G.ConjourIcon}},O=i=>{switch(i){case t.KONNECT:return l("form.config.konnect.description");case t.ENV:return l("form.config.env.description");case t.AWS:return l("form.config.aws.description");case t.GCP:return l("form.config.gcp.description");case t.HCV:return l("form.config.hcv.description");case t.AZURE:return l("form.config.azure.description");case t.CONJUR:return l("form.config.conjur.description")}},b=i=>{var B,V,ee,ne,ie,n;d.fields.prefix=((B=i==null?void 0:i.item)==null?void 0:B.prefix)||(i==null?void 0:i.prefix)||"",d.fields.description=((V=i==null?void 0:i.item)==null?void 0:V.description)||(i==null?void 0:i.description)||"";const r=((ee=i==null?void 0:i.item)==null?void 0:ee.tags)||(i==null?void 0:i.tags)||[];d.fields.tags=(r==null?void 0:r.join(", "))||"",Object.assign(k,d.fields);const _=((ne=i==null?void 0:i.item)==null?void 0:ne.config)||(i==null?void 0:i.config)||null;_&&(Object.keys(_).length||(i==null?void 0:i.name)===t.KONNECT)?(f.value=((ie=i==null?void 0:i.item)==null?void 0:ie.name)||(i==null?void 0:i.name)||"",F.value=f.value,W.value=((n=i==null?void 0:i.config)==null?void 0:n.config_store_id)||void 0,Object.assign(a[f.value],_),Object.assign(Q[f.value],_)):d.errorMessage="Error loading vault config"},m=i=>i===""||i==null,A=e.computed(()=>f.value===t.HCV?!Object.keys(a[t.HCV]).filter(i=>["namespace","ttl","neg_ttl","resurrect_ttl","kube_auth_path","approle_auth_path","approle_secret_id","approle_secret_id_file"].includes(i)||a[t.HCV].auth_method!==T.K8S&&(i==="kube_role"||i==="kube_api_token_file")||a[t.HCV].auth_method!==T.TOKEN&&i==="token"||a[t.HCV].auth_method!==T.APP_ROLE&&(i==="approle_role_id"||i==="approle_response_wrapping")||a[t.HCV].auth_method===T.APP_ROLE&&i==="approle_response_wrapping"&&typeof a[f.value][i]=="boolean"?!1:m(a[f.value][i])).length:f.value===t.AZURE?!Object.keys(a[t.AZURE]).filter(i=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(i)?!1:m(a[f.value][i])).length:f.value===t.AWS?!Object.keys(a[t.AWS]).filter(i=>["endpoint_url","assume_role_arn","ttl","neg_ttl","resurrect_ttl","sts_endpoint_url"].includes(i)?!1:m(a[f.value][i])).length:!Object.keys(a[f.value]).filter(i=>["ttl","neg_ttl","resurrect_ttl"].includes(i)?!1:m(a[f.value][i])).length),R=e.computed(()=>!!d.fields.prefix&&A.value),Y=e.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(k)||f.value!==F.value||JSON.stringify(a[f.value])!==JSON.stringify(Q[f.value])),K=e.computed(()=>{var r,_;let i=`${c.config.apiBaseUrl}${te.form[c.config.app][v.value]}`;return c.config.app==="konnect"?i=i.replace(/{controlPlaneId}/gi,((r=c.config)==null?void 0:r.controlPlaneId)||""):c.config.app==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(_=c.config)!=null&&_.workspace?`/${c.config.workspace}`:"")),i=i.replace(/{id}/gi,c.vaultId),i}),x=e.computed(()=>{var ne,ie;const i={protocol:a[t.HCV].protocol,host:a[t.HCV].host,port:parseInt(a[t.HCV].port.toString()),mount:a[t.HCV].mount,kv:a[t.HCV].kv,namespace:a[t.HCV].namespace||null,auth_method:a[t.HCV].auth_method,...c.config.base64FieldAvailable&&{base64_decode:a[t.HCV].base64_decode},...a[t.HCV].auth_method===T.TOKEN&&{token:a[t.HCV].token},...a[t.HCV].auth_method===T.K8S&&{kube_role:a[t.HCV].kube_role,kube_auth_path:a[t.HCV].kube_auth_path||void 0,kube_api_token_file:a[t.HCV].kube_api_token_file,token:null},...a[t.HCV].auth_method===T.APP_ROLE&&{approle_auth_path:a[t.HCV].approle_auth_path||void 0,approle_role_id:a[t.HCV].approle_role_id,approle_secret_id:a[t.HCV].approle_secret_id||void 0,approle_secret_id_file:a[t.HCV].approle_secret_id_file||void 0,approle_response_wrapping:a[t.HCV].approle_response_wrapping??!1}},r={...a[f.value],client_id:a[f.value].client_id||null,tenant_id:a[f.value].tenant_id||null},_={...a[f.value],endpoint_url:a[f.value].endpoint_url||null,assume_role_arn:a[f.value].assume_role_arn||null,...c.config.awsStsEndpointUrlAvailable?{sts_endpoint_url:a[f.value].sts_endpoint_url||null}:{}};let B=a[f.value];f.value===t.HCV?B=i:f.value===t.AZURE?B=r:f.value===t.AWS&&(B=_);let V={};if(![t.KONNECT,t.ENV].includes(f.value)){const n=a[f.value],me=n.ttl,ge=n.neg_ttl,be=n.resurrect_ttl;V={ttl:me?parseInt(me.toString(),10):null,neg_ttl:ge?parseInt(ge.toString(),10):null,resurrect_ttl:be?parseInt(be.toString(),10):null}}return{prefix:d.fields.prefix,description:d.fields.description||null,tags:(ie=(ne=d.fields.tags.split(","))==null?void 0:ne.map(n=>String(n||"").trim()))==null?void 0:ie.filter(n=>n!==""),name:f.value,config:{...B,...V}}}),ae=e.computed(()=>({...x.value,config:{...x.value.config,config_store_id:W.value}})),h=async()=>{var i;try{d.isReadonly=!0;const r=`${c.config.apiBaseUrl}${te.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi,((i=c.config)==null?void 0:i.controlPlaneId)||""),_=await C.post(r);return _==null?void 0:_.data.id}catch(r){d.errorMessage=y(r),s("error",r)}finally{d.isReadonly=!1}},N=async()=>{var i;try{d.isReadonly=!0;let r;v.value==="create"?f.value===t.KONNECT?(W.value=await h(),r=await C.post(K.value,ae.value)):r=await C.post(K.value,x.value):v.value==="edit"&&(f.value===t.KONNECT&&!W.value?(W.value=await h(),r=await C.put(K.value,ae.value)):r=((i=c.config)==null?void 0:i.app)==="konnect"?await C.put(K.value,ae.value):await C.patch(K.value,x.value)),b(r==null?void 0:r.data),s("update",r==null?void 0:r.data)}catch(r){d.errorMessage=y(r),s("error",r)}finally{d.isReadonly=!1}};return(i,r)=>{const _=e.resolveComponent("KTooltip"),B=e.resolveComponent("KSelect"),V=e.resolveComponent("KInput"),ee=e.resolveComponent("KCheckbox"),ne=e.resolveComponent("KCollapse"),ie=e.resolveComponent("KTextArea");return e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(e.unref(p.EntityBaseForm),{"can-submit":R.value&&Y.value,config:o.config,"edit-id":o.vaultId,"entity-type":e.unref(p.SupportedEntityType).Vault,"error-message":d.errorMessage,"fetch-url":Z.value,"form-fields":x.value,"is-readonly":d.isReadonly,onCancel:z,"onFetch:error":S,"onFetch:success":b,onLoading:H,onSubmit:N},{default:e.withCtx(()=>[e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(l)("form.sections.config.description"),title:e.unref(l)("form.sections.config.title")},{default:e.withCtx(()=>[e.createElementVNode("div",Ae,[e.createVNode(B,{modelValue:f.value,"onUpdate:modelValue":r[0]||(r[0]=n=>f.value=n),"data-testid":"provider-select",disabled:X.value,"dropdown-max-height":"500",items:$.value,readonly:d.isReadonly},{"selected-item-template":e.withCtx(({item:n})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(n.value)))),e.createElementVNode("span",null,e.toDisplayString(n==null?void 0:n.label),1)]),"item-template":e.withCtx(({item:n})=>[e.createVNode(_,{placement:"top",text:n.disabled?e.unref(l)("form.unavailable"):""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"provider-item","data-testid":`vault-form-provider-${n.value}`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(n.value)))),e.createElementVNode("div",ve,[e.createElementVNode("span",Ue,e.toDisplayString(n==null?void 0:n.label),1),e.createElementVNode("span",Te,e.toDisplayString(O(n.value)),1)])],8,Re)]),_:2},1032,["text"])]),_:1},8,["modelValue","disabled","items","readonly"])]),e.createVNode(e.TransitionGroup,{name:"appear"},{default:e.withCtx(()=>[f.value===e.unref(t).ENV?(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(V,{modelValue:a[e.unref(t).ENV].prefix,"onUpdate:modelValue":r[1]||(r[1]=n=>a[e.unref(t).ENV].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-kong-prefix",label:e.unref(l)("form.config.env.fields.prefix.label"),"label-attributes":{info:e.unref(l)("form.config.env.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(l)("form.config.env.fields.prefix.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:0,modelValue:a[e.unref(t).ENV].base64_decode,"onUpdate:modelValue":r[2]||(r[2]=n=>a[e.unref(t).ENV].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AWS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AWS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(B,{modelValue:a[e.unref(t).AWS].region,"onUpdate:modelValue":r[3]||(r[3]=n=>a[e.unref(t).AWS].region=n),"data-testid":"vault-form-config-aws-region",items:M,label:e.unref(l)("form.config.aws.fields.region.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.region.tooltip")},placeholder:e.unref(l)("form.config.aws.fields.region.placeholder"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AWS].endpoint_url,"onUpdate:modelValue":r[4]||(r[4]=n=>a[e.unref(t).AWS].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-endpoint_url",label:e.unref(l)("form.config.aws.fields.endpoint_url.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AWS].assume_role_arn,"onUpdate:modelValue":r[5]||(r[5]=n=>a[e.unref(t).AWS].assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-assume_role_arn",label:e.unref(l)("form.config.aws.fields.assume_role_arn.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.assume_role_arn.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AWS].role_session_name,"onUpdate:modelValue":r[6]||(r[6]=n=>a[e.unref(t).AWS].role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-role_session_name",label:e.unref(l)("form.config.aws.fields.role_session_name.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.role_session_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),o.config.awsStsEndpointUrlAvailable?(e.openBlock(),e.createBlock(V,{key:0,modelValue:a[e.unref(t).AWS].sts_endpoint_url,"onUpdate:modelValue":r[7]||(r[7]=n=>a[e.unref(t).AWS].sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-sts_endpoint_url",label:e.unref(l)("form.config.aws.fields.sts_endpoint_url.label"),"label-attributes":{info:e.unref(l)("form.config.aws.fields.sts_endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:1,modelValue:a[e.unref(t).AWS].base64_decode,"onUpdate:modelValue":r[8]||(r[8]=n=>a[e.unref(t).AWS].base64_decode=n),"data-testid":"vault-form-config-aws-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).GCP?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).GCP}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(V,{modelValue:a[e.unref(t).GCP].project_id,"onUpdate:modelValue":r[9]||(r[9]=n=>a[e.unref(t).GCP].project_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-gcp-project-id",label:e.unref(l)("form.config.gcp.fields.project_id.label"),placeholder:e.unref(l)("form.config.gcp.fields.project_id.placeholder"),readonly:d.isReadonly,required:"",type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(u),{keypath:"form.config.gcp.fields.project_id.tooltip.text",scope:"global"},{"italic-text":e.withCtx(()=>[e.createElementVNode("em",null,e.toDisplayString(e.unref(l)("form.config.gcp.fields.project_id.tooltip.italicText")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:0,modelValue:a[e.unref(t).GCP].base64_decode,"onUpdate:modelValue":r[10]||(r[10]=n=>a[e.unref(t).GCP].base64_decode=n),"data-testid":"vault-form-config-gcp-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).HCV?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(B,{modelValue:a[e.unref(t).HCV].protocol,"onUpdate:modelValue":r[11]||(r[11]=n=>a[e.unref(t).HCV].protocol=n),"data-testid":"vault-form-config-hcv-protocol",items:j,label:e.unref(l)("form.config.hcv.fields.protocol.label"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].host,"onUpdate:modelValue":r[12]||(r[12]=n=>a[e.unref(t).HCV].host=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-host",label:e.unref(l)("form.config.hcv.fields.host.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].port,"onUpdate:modelValue":r[13]||(r[13]=n=>a[e.unref(t).HCV].port=n),autocomplete:"off","data-testid":"vault-form-config-hcv-port",label:e.unref(l)("form.config.hcv.fields.port.label"),min:"0",readonly:d.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].mount,"onUpdate:modelValue":r[14]||(r[14]=n=>a[e.unref(t).HCV].mount=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-mount",label:e.unref(l)("form.config.hcv.fields.mount.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(B,{modelValue:a[e.unref(t).HCV].kv,"onUpdate:modelValue":r[15]||(r[15]=n=>a[e.unref(t).HCV].kv=n),"data-testid":"vault-form-config-hcv-kv",items:g,label:e.unref(l)("form.config.hcv.fields.kv.label"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].namespace,"onUpdate:modelValue":r[16]||(r[16]=n=>a[e.unref(t).HCV].namespace=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-namespace",label:e.unref(l)("form.config.hcv.fields.namespace.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(B,{modelValue:a[e.unref(t).HCV].auth_method,"onUpdate:modelValue":r[17]||(r[17]=n=>a[e.unref(t).HCV].auth_method=n),"data-testid":"vault-form-config-hcv-auth_method",items:[{label:e.unref(T).TOKEN,value:e.unref(T).TOKEN},{label:e.unref(T).K8S,value:e.unref(T).K8S},...o.config.hcvAppRoleMethodAvailable?[{label:e.unref(T).APP_ROLE,value:e.unref(T).APP_ROLE}]:[]],label:e.unref(l)("form.config.hcv.fields.auth_method.label"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","items","label","readonly"]),a[e.unref(t).HCV].auth_method===e.unref(T).TOKEN?(e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(V,{modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":r[18]||(r[18]=n=>a[e.unref(t).HCV].token=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-token",label:e.unref(l)("form.config.hcv.fields.token.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(T).K8S?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(V,{modelValue:a[e.unref(t).HCV].kube_role,"onUpdate:modelValue":r[19]||(r[19]=n=>a[e.unref(t).HCV].kube_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_role",label:e.unref(l)("form.config.hcv.fields.kube_role.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].kube_auth_path,"onUpdate:modelValue":r[20]||(r[20]=n=>a[e.unref(t).HCV].kube_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_auth_path",label:e.unref(l)("form.config.hcv.fields.kube_auth_path.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].kube_api_token_file,"onUpdate:modelValue":r[21]||(r[21]=n=>a[e.unref(t).HCV].kube_api_token_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_api_token_file",label:e.unref(l)("form.config.hcv.fields.kube_api_token_file.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(T).APP_ROLE?(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(V,{modelValue:a[e.unref(t).HCV].approle_auth_path,"onUpdate:modelValue":r[22]||(r[22]=n=>a[e.unref(t).HCV].approle_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_auth_path",label:e.unref(l)("form.config.hcv.fields.approle_auth_path.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].approle_role_id,"onUpdate:modelValue":r[23]||(r[23]=n=>a[e.unref(t).HCV].approle_role_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_role_id",label:e.unref(l)("form.config.hcv.fields.approle_role_id.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].approle_secret_id,"onUpdate:modelValue":r[24]||(r[24]=n=>a[e.unref(t).HCV].approle_secret_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id",label:e.unref(l)("form.config.hcv.fields.approle_secret_id.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).HCV].approle_secret_id_file,"onUpdate:modelValue":r[25]||(r[25]=n=>a[e.unref(t).HCV].approle_secret_id_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id_file",label:e.unref(l)("form.config.hcv.fields.approle_secret_id_file.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(ee,{modelValue:a[e.unref(t).HCV].approle_response_wrapping,"onUpdate:modelValue":r[26]||(r[26]=n=>a[e.unref(t).HCV].approle_response_wrapping=n),"data-testid":"vault-form-config-hcv-approle_response_wrapping",label:e.unref(l)("form.config.hcv.fields.approle_response_wrapping.label")},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:3,modelValue:a[e.unref(t).HCV].base64_decode,"onUpdate:modelValue":r[27]||(r[27]=n=>a[e.unref(t).HCV].base64_decode=n),"data-testid":"vault-form-config-hcv-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AZURE?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(V,{modelValue:a[e.unref(t).AZURE].location,"onUpdate:modelValue":r[28]||(r[28]=n=>a[e.unref(t).AZURE].location=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-location",label:e.unref(l)("form.config.azure.fields.location.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AZURE].vault_uri,"onUpdate:modelValue":r[29]||(r[29]=n=>a[e.unref(t).AZURE].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-uri",label:e.unref(l)("form.config.azure.fields.vault_uri.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AZURE].credentials_prefix,"onUpdate:modelValue":r[30]||(r[30]=n=>a[e.unref(t).AZURE].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-prefix",label:e.unref(l)("form.config.azure.fields.credential_prefix.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(B,{modelValue:a[e.unref(t).AZURE].type,"onUpdate:modelValue":r[31]||(r[31]=n=>a[e.unref(t).AZURE].type=n),"data-testid":"vault-form-config-azure-type",items:q,label:e.unref(l)("form.config.azure.fields.type.label"),placeholder:e.unref(l)("form.config.azure.fields.type.placeholder"),readonly:d.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AZURE].client_id,"onUpdate:modelValue":r[32]||(r[32]=n=>a[e.unref(t).AZURE].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-client-id",label:e.unref(l)("form.config.azure.fields.client_id.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).AZURE].tenant_id,"onUpdate:modelValue":r[33]||(r[33]=n=>a[e.unref(t).AZURE].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-tenant-id",label:e.unref(l)("form.config.azure.fields.tenant_id.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(ee,{key:0,modelValue:a[e.unref(t).AZURE].base64_decode,"onUpdate:modelValue":r[34]||(r[34]=n=>a[e.unref(t).AZURE].base64_decode=n),"data-testid":"vault-form-config-azure-base64_decode",label:e.unref(l)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(l)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:d.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).CONJUR?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).CONJUR}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(V,{modelValue:a[e.unref(t).CONJUR].endpoint_url,"onUpdate:modelValue":r[35]||(r[35]=n=>a[e.unref(t).CONJUR].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-endpoint_url",label:e.unref(l)("form.config.conjur.fields.endpoint_url.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).CONJUR].login,"onUpdate:modelValue":r[36]||(r[36]=n=>a[e.unref(t).CONJUR].login=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-login",label:e.unref(l)("form.config.conjur.fields.login.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).CONJUR].account,"onUpdate:modelValue":r[37]||(r[37]=n=>a[e.unref(t).CONJUR].account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-account",label:e.unref(l)("form.config.conjur.fields.account.label"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(V,{modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":r[38]||(r[38]=n=>a[e.unref(t).CONJUR].api_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-api_key",label:e.unref(l)("form.config.conjur.fields.api_key.label"),readonly:d.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])])):e.createCommentVNode("",!0),o.config.ttl?(e.openBlock(),e.createElementBlock("div",Fe,[J.value?(e.openBlock(),e.createBlock(ne,{key:0,class:"advanced-fields-collapse","data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(l)("form.config.advancedFields.title")},{default:e.withCtx(()=>[e.createElementVNode("div",Me,[e.createElementVNode("div",De,[e.createVNode(V,{modelValue:a[f.value].ttl,"onUpdate:modelValue":r[39]||(r[39]=n=>a[f.value].ttl=n),"data-testid":"vault-ttl-input",label:e.unref(l)("form.config.advancedFields.ttl"),"label-attributes":{info:e.unref(l)("form.config.advancedFields.ttlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])]),e.createElementVNode("div",He,[e.createVNode(V,{modelValue:a[f.value].neg_ttl,"onUpdate:modelValue":r[40]||(r[40]=n=>a[f.value].neg_ttl=n),"data-testid":"vault-neg-ttl-input",label:e.unref(l)("form.config.advancedFields.negTtl"),"label-attributes":{info:e.unref(l)("form.config.advancedFields.negTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])]),e.createElementVNode("div",Oe,[e.createElementVNode("div",qe,[e.createVNode(V,{modelValue:a[f.value].resurrect_ttl,"onUpdate:modelValue":r[41]||(r[41]=n=>a[f.value].resurrect_ttl=n),"data-testid":"vault-resurrect-ttl-input",label:e.unref(l)("form.config.advancedFields.resurrectTtl"),"label-attributes":{info:e.unref(l)("form.config.advancedFields.resurrectTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])])]),_:1},8,["trigger-label"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["description","title"]),e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(l)("form.sections.general.description"),title:e.unref(l)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:d.fields.prefix,"onUpdate:modelValue":r[42]||(r[42]=n=>d.fields.prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-prefix",help:e.unref(l)("form.fields.prefix.help"),label:e.unref(l)("form.fields.prefix.label"),"label-attributes":{info:e.unref(l)("form.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(l)("form.fields.prefix.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"]),e.createVNode(ie,{modelValue:d.fields.description,"onUpdate:modelValue":r[43]||(r[43]=n=>d.fields.description=n),modelModifiers:{trim:!0},"character-limit":1e3,class:"vault-form-textarea","data-testid":"vault-form-description",label:e.unref(l)("form.fields.description.label"),placeholder:e.unref(l)("form.fields.description.placeholder"),readonly:d.isReadonly},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(V,{modelValue:d.fields.tags,"onUpdate:modelValue":r[44]||(r[44]=n=>d.fields.tags=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-tags",help:e.unref(l)("form.fields.tags.help"),label:e.unref(l)("form.fields.tags.label"),placeholder:e.unref(l)("form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-e4d00b01"]]),je={class:"kong-ui-vault-entity-config-card"},Le=e.defineComponent({__name:"VaultConfigCard",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string"||!o.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(o){const w=o,c=e.computed(()=>{var l,E;return(E=te.form[(l=w.config)==null?void 0:l.app])==null?void 0:E.edit}),{i18n:{t:s}}=re.useI18n(),u=e.ref({id:{},name:{label:s("labels.vault_type")},updated_at:{},created_at:{},prefix:{order:5,section:p.ConfigurationSchemaSection.Basic},description:{order:6,section:p.ConfigurationSchemaSection.Basic},tags:{order:7},config:{order:8,type:p.ConfigurationSchemaType.Json}});return(l,E)=>(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(e.unref(p.EntityBaseConfigCard),{config:o.config,"config-card-doc":o.configCardDoc,"config-schema":u.value,"entity-type":e.unref(p.SupportedEntityType).Vault,"fetch-url":c.value,"hide-title":o.hideTitle,"onFetch:error":E[0]||(E[0]=C=>l.$emit("fetch:error",C)),"onFetch:success":E[1]||(E[1]=C=>l.$emit("fetch:success",C)),onLoading:E[2]||(E[2]=C=>l.$emit("loading",C))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),se="/v2/control-planes/{controlPlaneId}",le={getVault:{konnect:`${se}/core-entities/vaults/{id}`},list:{konnect:`${se}/config-stores/{id}/secrets`},form:{konnect:{create:`${se}/config-stores/{id}/secrets`,edit:`${se}/config-stores/{id}/secrets/{secretId}`}}},ze={class:"table-content-overflow-wrapper"},Ge=oe(e.defineComponent({inheritAttrs:!1,__name:"SecretListInner",props:{config:{type:Object,required:!0,validator:o=>!(!o||(o==null?void 0:o.app)!=="konnect"||!o.createRoute||!o.getEditRoute)},configStoreId:{type:String,required:!0},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","delete:success"],setup(o,{emit:w}){var H;const c=w,s=o,{i18n:{t:u,formatUnixTimeStamp:l}}=re.useI18n(),{axiosInstance:E}=p.useAxios((H=s.config)==null?void 0:H.axiosRequestConfig),y={key:{label:u("secrets.list.table_headers.key"),sortable:!1,hidable:!1},updated_at:{label:u("secrets.list.table_headers.updated_at"),sortable:!1}},d=S=>({"data-testid":S.key}),k=e.computed(()=>{var S;return`${s.config.apiBaseUrl}${le.list[s.config.app]}`.replace(/{controlPlaneId}/gi,((S=s.config)==null?void 0:S.controlPlaneId)||"").replace(/{id}/gi,s.configStoreId||"")}),f=e.ref(""),F={isExactMatch:!0,placeholder:u("search.placeholder_for_secrets.konnect")},{fetcher:W,fetcherState:J,fetcherCacheKey:$}=p.useFetcher(e.computed(()=>({...s.config,cacheIdentifier:s.cacheIdentifier})),k),P=()=>{f.value=""},a=e.ref(null),Q=S=>({label:u("actions.edit"),to:s.config.getEditRoute(S)}),M=e.ref(void 0),q=e.ref(!1),j=e.ref(!1),g=e.ref(""),v=p.useDeleteUrlBuilder(s.config,k.value),Z=S=>{M.value=S,q.value=!0},X=()=>{q.value=!1},L=async()=>{var S,D,O;if((S=M.value)!=null&&S.key){j.value=!0;try{await E.delete(v(M.value.key)),j.value=!1,q.value=!1,$.value++,c("delete:success",M.value)}catch(b){g.value=((O=(D=b.response)==null?void 0:D.data)==null?void 0:O.message)||b.message||u("errors.delete"),c("error",b)}finally{j.value=!1}}};e.watch(J,S=>{var D,O,b;if(S.status===p.FetcherStatus.Error){a.value={title:u("errors.general")},(b=(O=(D=S.error)==null?void 0:D.response)==null?void 0:O.data)!=null&&b.message&&(a.value.message=S.error.response.data.message),c("error",S.error);return}a.value=null});const z=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${u("secrets.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:u("secrets.title")});return e.onBeforeMount(async()=>{await s.canCreate()&&(z.value.title=u("secrets.list.empty_state.title"),z.value.ctaText=u("secrets.list.toolbar_actions.new_secret"))}),(S,D)=>{const O=e.resolveComponent("KButton"),b=e.resolveComponent("KDropdownItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-sorting":"","empty-state-options":z.value,"enable-entity-actions":"","error-message":a.value,fetcher:e.unref(W),"fetcher-cache-key":e.unref($),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-secrets-list",query:f.value,"row-attributes":d,"table-headers":e.unref(y),onClearSearchInput:P},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(p.EntityFilter),{modelValue:f.value,"onUpdate:modelValue":D[0]||(D[0]=m=>f.value=m),config:F},null,8,["modelValue"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(O,{appearance:"primary","data-testid":"toolbar-add-secret",size:"large",to:o.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(G.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("secrets.list.toolbar_actions.new_secret")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),key:e.withCtx(({rowValue:m})=>[e.createElementVNode("div",ze,[e.createElementVNode("b",null,e.toDisplayString(m??"-"),1)])]),updated_at:e.withCtx(({rowValue:m})=>[e.createElementVNode("span",null,e.toDisplayString(m?e.unref(l)(new Date(m).getTime()/1e3):"-"),1)]),actions:e.withCtx(({row:m})=>[e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canEdit(m)},{default:e.withCtx(()=>[e.createVNode(b,{"data-testid":"action-entity-edit",item:Q(m.key)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>o.canDelete(m)},{default:e.withCtx(()=>[e.createVNode(b,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:A=>Z(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":j.value,description:e.unref(u)("delete.description"),"entity-name":M.value&&M.value.key,"entity-type":e.unref(p.EntityTypes).Secret,error:g.value,title:e.unref(u)("delete.title_for_secret"),visible:q.value,onCancel:X,onProceed:L},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])],64)}}}),[["__scopeId","data-v-904390fc"]]),Ze={class:"kong-ui-entities-secrets-list"},Je=oe(e.defineComponent({__name:"SecretList",props:{config:{type:Object,required:!0,validator:o=>!(!o||(o==null?void 0:o.app)!=="konnect"||!o.createRoute||!o.getEditRoute)},vaultId:{type:String,required:!0},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","delete:success"],setup(o,{emit:w}){var d;const c=w,s=o,u=k=>{c("error",k)},l=k=>{c("delete:success",k)},{axiosInstance:E}=p.useAxios((d=s.config)==null?void 0:d.axiosRequestConfig),C=e.ref(""),y=e.computed(()=>{var k;return`${s.config.apiBaseUrl}${le.getVault[s.config.app]}`.replace(/{controlPlaneId}/gi,((k=s.config)==null?void 0:k.controlPlaneId)||"").replace(/{id}/gi,s.vaultId)});return e.onBeforeMount(async()=>{var k;try{const{data:f}=await E.get(y.value);C.value=(k=f==null?void 0:f.config)==null?void 0:k.config_store_id}catch(f){c("error",f)}}),(k,f)=>(e.openBlock(),e.createElementBlock("div",Ze,[C.value?(e.openBlock(),e.createBlock(Ge,e.mergeProps({key:0},s,{"config-store-id":C.value,"onDelete:success":l,onError:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-f5aa5636"]]),Qe=oe(e.defineComponent({inheritAttrs:!1,__name:"SecretFormInner",props:{config:{type:Object,required:!0,validator:o=>!(!o||o.app!=="konnect"||!o.controlPlaneId||!o.cancelRoute)},configStoreId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:w}){var j;const c=o,s=w,{i18n:{t:u}}=re.useI18n(),l=ce.useRouter(),{axiosInstance:E}=p.useAxios((j=c.config)==null?void 0:j.axiosRequestConfig),{getMessageFromError:C}=p.useErrors(),y=e.reactive({fields:{key:"",value:""},readonly:!1,errorMessage:""}),d=e.reactive({key:"",value:""}),k=e.computed(()=>{var g,v;return(v=le.form[(g=c.config)==null?void 0:g.app])==null?void 0:v.edit.replace(/{id}/gi,c.configStoreId).replace(/{secretId}/gi,c.secretId)}),f=()=>{var g;l.push(((g=c.config)==null?void 0:g.cancelRoute)||{name:"secret-list"})},F=g=>{s("loading",g)},W=g=>{s("error",g)},J=g=>{var v,Z;y.fields.key=((v=g==null?void 0:g.item)==null?void 0:v.key)||(g==null?void 0:g.key)||"",y.fields.value=((Z=g==null?void 0:g.item)==null?void 0:Z.value)||(g==null?void 0:g.value)||"",Object.assign(d,y.fields)},$=e.computed(()=>c.secretId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),P=e.computed(()=>{var g;return`${c.config.apiBaseUrl}${le.form[c.config.app][$.value]}`.replace(/{controlPlaneId}/gi,((g=c.config)==null?void 0:g.controlPlaneId)||"").replace(/{id}/gi,c.configStoreId).replace(/{secretId}/gi,c.secretId)}),a=e.computed(()=>!!y.fields.key&&!!y.fields.value),Q=e.computed(()=>JSON.stringify(y.fields)!==JSON.stringify(d)),M=e.computed(()=>({key:y.fields.key,value:y.fields.value})),q=async()=>{try{y.readonly=!0;let g;$.value==="create"?g=await E.post(P.value,M.value):$.value==="edit"&&(g=await E.put(P.value,M.value)),J(g==null?void 0:g.data),s("update",g==null?void 0:g.data)}catch(g){y.errorMessage=C(g),s("error",g)}finally{y.readonly=!1}};return(g,v)=>{const Z=e.resolveComponent("KInput"),X=e.resolveComponent("KTextArea"),L=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(e.unref(p.EntityBaseForm),{"can-submit":a.value&&Q.value,config:o.config,"edit-id":o.secretId,"entity-type":e.unref(p.SupportedEntityType).Other,"error-message":y.errorMessage,"fetch-url":k.value,"form-fields":M.value,"is-readonly":y.readonly,onCancel:f,"onFetch:error":W,"onFetch:success":J,onLoading:F,onSubmit:q},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(u)("secrets.form.info.description"),"has-divider":"",title:e.unref(u)("secrets.form.info.title")},{default:e.withCtx(()=>[e.createVNode(Z,{modelValue:y.fields.key,"onUpdate:modelValue":v[0]||(v[0]=z=>y.fields.key=z),modelModifiers:{trim:!0},autocomplete:"off",class:"key-field","data-testid":"secret-form-key",disabled:$.value===e.unref(p.EntityBaseFormType).Edit,label:e.unref(u)("secrets.form.fields.key.label"),placeholder:e.unref(u)("secrets.form.fields.key.placeholder"),readonly:y.readonly,required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(X,{modelValue:y.fields.value,"onUpdate:modelValue":v[1]||(v[1]=z=>y.fields.value=z),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"secret-form-value",label:e.unref(u)("secrets.form.fields.value.label"),placeholder:e.unref(u)("secrets.form.fields.value.placeholder"),readonly:y.readonly,required:"",resizable:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(L,{appearance:"warning",message:e.unref(u)("secrets.form.hint")},null,8,["message"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])}}}),[["__scopeId","data-v-5ee165bf"]]),Xe={class:"kong-ui-entities-secret-form"},Ye=oe(e.defineComponent({__name:"SecretForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||o.app!=="konnect"||!o.controlPlaneId||!o.cancelRoute)},vaultId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:w}){var k;const c=o,s=w,u=f=>{s("update",f)},l=f=>{s("error",f)},E=f=>{s("loading",f)},{axiosInstance:C}=p.useAxios((k=c.config)==null?void 0:k.axiosRequestConfig),y=e.ref(""),d=e.computed(()=>{var f;return`${c.config.apiBaseUrl}${le.getVault[c.config.app]}`.replace(/{controlPlaneId}/gi,((f=c.config)==null?void 0:f.controlPlaneId)||"").replace(/{id}/gi,c.vaultId)});return e.onBeforeMount(async()=>{var f;try{const{data:F}=await C.get(d.value);y.value=(f=F==null?void 0:F.config)==null?void 0:f.config_store_id}catch(F){s("error",F)}}),(f,F)=>(e.openBlock(),e.createElementBlock("div",Xe,[y.value?(e.openBlock(),e.createBlock(Qe,e.mergeProps({key:0},c,{"config-store-id":y.value,onError:l,onLoading:E,onUpdate:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-754ddb2f"]]),et={class:"vault-secret-picker-provider"},tt=oe(e.defineComponent({__name:"VaultSecretPickerProvider",props:{value:{},disabled:{type:Boolean},update:{type:Function}},emits:["open"],setup(o,{emit:w}){const c=o,s=w,{i18n:{t:u},i18nT:l}=re.useI18n();return(E,C)=>(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(e.unref(l),{keypath:"vault_secret_picker.provider.complete_action",scope:"global"},{cta:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass({"vault-secret-picker-provider-action":!0,disabled:c.disabled}),onClick:C[0]||(C[0]=()=>!c.disabled&&s("open",c.value,c.update))},e.toDisplayString(e.unref(u)("vault_secret_picker.provider.cta")),3)]),_:1})]))}}),[["__scopeId","data-v-66a1e406"]]),ot=o=>{let w=o.trim();if(!w.startsWith("{")||!w.endsWith("}"))throw new Error("Invalid secret reference: must be enclosed in curly braces");if(w=w.substring(1,w.length-1).trim(),!w.startsWith("vault://"))throw new Error("Invalid secret reference: must start with vault://");const c=new URL(`http://${w.substring(8)}`);if(!c)throw new Error("Invalid secret reference: must have a vault prefix");const s=c.host,[,u,...l]=c.pathname.split("/");if(!s)throw new Error("Invalid secret reference: must have a vault prefix");return{vaultPrefix:s,secretId:u||void 0,optionalSecretKey:l==null?void 0:l.join("/")}},lt=o=>{if(!o.vaultPrefix)throw new Error("Invalid secret reference: must have a vault prefix");let w=`vault://${o.vaultPrefix}`;return o.secretId&&(w=`${w}/${o.secretId}`),o.optionalSecretKey&&(w=`${w}/${o.optionalSecretKey}`),`{${w}}`},at={key:1,class:"inputs-wrapper"},rt={"data-testid":"no-search-results"},nt={class:"k-select-selected-item-label"},it={class:"vault-secret-picker-vault-dropdown-item"},st={class:"select-item-label"},ct={class:"select-item-description"},dt={class:"select-item-description"},ft={"data-testid":"no-search-results"},ut=oe(e.defineComponent({__name:"VaultSecretPicker",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string")},setup:{type:null,required:!1,default:!1}},emits:["proceed","cancel"],setup(o,{emit:w}){var O;const{i18n:{t:c}}=re.useI18n(),s=o,u=w,{axiosInstance:l}=p.useAxios({validateStatus:b=>b===404||b>=200&&b<300,...(O=s.config)==null?void 0:O.axiosRequestConfig}),E=e.ref(!1),C=e.ref(""),y=e.ref(""),d=e.ref(""),k=e.ref(),f=e.computed(()=>{var b,m;return s.config.app==="konnect"?le.list[s.config.app].replace(/{id}/gi,((m=(b=k.value)==null?void 0:b.config)==null?void 0:m.config_store_id)??""):"<not_applicable>"}),F=e.computed(()=>{if($&&q)return c("vault_secret_picker.fetch_error.vaults_and_secrets");if($)return c("vault_secret_picker.fetch_error.vaults");if(q)return c("vault_secret_picker.fetch_error.secrets")}),{debouncedQueryChange:W,loading:J,error:$,loadItems:P,results:a}=p.useDebouncedFilter(s.config,te.list[s.config.app].getAll,void 0,{fetchedItemsKey:"data",searchKeys:["prefix"]}),{debouncedQueryChange:Q,loading:M,error:q,loadItems:j,results:g}=p.useDebouncedFilter(s.config,f,void 0,{fetchedItemsKey:"data",searchKeys:["key"],exactMatchKey:"key"}),v=e.computed(()=>{var A;let b=!1;const m=((A=a.value)==null?void 0:A.map(R=>(R.prefix===C.value&&(b=!0),{label:R.prefix,value:R.prefix,vault:R})))??[];return!b&&k.value&&m.push({label:k.value.prefix,value:k.value.prefix,vault:k.value}),m}),Z=e.computed(()=>{var A;let b=!1;const m=((A=g.value)==null?void 0:A.map(R=>(R.key===y.value&&(b=!0),{label:R.key,value:R.key})))??[];return!b&&y.value&&m.push({label:y.value,value:y.value}),m}),X=e.computed(()=>{var b;return((b=k==null?void 0:k.value)==null?void 0:b.name)==="konnect"}),L=e.computed(()=>!!k.value&&!!y.value),z=b=>b.label?`${b.label} - (${b.vault.name} - ${b.vault.id})`:b.value,H=b=>{var A,R;let m=`${s.config.apiBaseUrl}${te.form[s.config.app].edit}`;return s.config.app==="konnect"?m=m.replace(/{controlPlaneId}/gi,((A=s.config)==null?void 0:A.controlPlaneId)||""):s.config.app==="kongManager"&&(m=m.replace(/\/{workspace}/gi,(R=s.config)!=null&&R.workspace?`/${s.config.workspace}`:"")),m.replace(/{id}/gi,b)},S=(b,m)=>{var A;return s.config.app!=="konnect"?"<not_applicable>":`${s.config.apiBaseUrl}${le.form[s.config.app].edit}`.replace(/{controlPlaneId}/gi,((A=s.config)==null?void 0:A.controlPlaneId)||"").replace(/{id}/gi,m).replace(/{secretId}/gi,b)},D=()=>{u("proceed",lt({vaultPrefix:C.value,secretId:y.value||void 0,optionalSecretKey:d.value||void 0}))};return e.watch(()=>s.setup,async b=>{if(b!==!1){if(E.value=!0,C.value="",k.value=void 0,y.value="",d.value="",typeof b=="string"&&b.trim().length>0)try{let m,A="",R="",Y="";const K=ot(b),{data:x}=await l.get(H(K.vaultPrefix));if(x!=null&&x.name)if(m=x,A=K.vaultPrefix,m.name==="konnect"){if(K.secretId){const{data:ae}=await l.get(S(K.secretId,x.config.config_store_id));ae.key===K.secretId&&(R=K.secretId,Y=K.optionalSecretKey??"")}}else R=K.secretId??"",Y=K.optionalSecretKey??"";await e.nextTick(()=>{C.value=A,k.value=m,y.value=R,d.value=Y})}catch(m){console.debug(m)}E.value=!1,await P()}},{immediate:!0}),e.watch(C,async(b,m)=>{var A;E.value||b===m||(k.value=(A=v.value.find(R=>R.value===b))==null?void 0:A.vault,y.value="",d.value="")}),e.watch(f,async()=>{X.value&&await j()},{immediate:!0}),(b,m)=>{const A=e.resolveComponent("KEmptyState"),R=e.resolveComponent("KSelect"),Y=e.resolveComponent("KInput"),K=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(K,{"action-button-disabled":!L.value,"action-button-text":e.unref(c)("vault_secret_picker.actions.use_key"),class:"vault-secret-picker","data-testid":"vault-secret-picker-modal",title:e.unref(c)("vault_secret_picker.title"),visible:s.setup!==!1,onCancel:m[4]||(m[4]=()=>u("cancel")),onProceed:D},{default:e.withCtx(()=>[e.unref($)||e.unref(q)?(e.openBlock(),e.createBlock(A,{key:0,"data-testid":"vault-secret-picker-fetch-error","icon-variant":"error",message:F.value},null,8,["message"])):(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(R,{modelValue:C.value,"onUpdate:modelValue":m[0]||(m[0]=x=>C.value=x),clearable:"","data-testid":"vault-secret-picker-vault-select",disabled:E.value,"enable-filtering":"","filter-function":()=>!0,items:v.value,"kpop-attributes":{"data-testid":"vault-secret-picker-vault-popover"},label:e.unref(c)("vault_secret_picker.vault.label"),loading:e.unref(J),placeholder:e.unref(c)("vault_secret_picker.vault.placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(W)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",rt,e.toDisplayString(e.unref(c)("vault_secret_picker.no_results")),1)]),"selected-item-template":e.withCtx(({item:x})=>[e.createElementVNode("span",nt,e.toDisplayString(z(x)),1)]),"item-template":e.withCtx(({item:x})=>[e.createElementVNode("div",it,[e.createElementVNode("span",st,e.toDisplayString(x.label),1),e.createElementVNode("span",ct,e.toDisplayString(x.vault.name),1),e.createElementVNode("span",dt,e.toDisplayString(x.vault.id),1)])]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"]),X.value?(e.openBlock(),e.createBlock(R,{key:0,modelValue:y.value,"onUpdate:modelValue":m[1]||(m[1]=x=>y.value=x),clearable:"","data-testid":"vault-secret-picker-secret-id-select",disabled:E.value||!k.value,"enable-filtering":"","filter-function":()=>!0,items:Z.value,"kpop-attributes":{"data-testid":"vault-secret-picker-secret-id-popover"},label:e.unref(c)("vault_secret_picker.secret_id.label"),loading:e.unref(M),placeholder:e.unref(c)("vault_secret_picker.secret_id.select_placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(Q)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",ft,e.toDisplayString(e.unref(c)("vault_secret_picker.no_results")),1)]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"])):(e.openBlock(),e.createBlock(Y,{key:1,modelValue:y.value,"onUpdate:modelValue":m[2]||(m[2]=x=>y.value=x),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-id-input",disabled:E.value||!k.value,label:e.unref(c)("vault_secret_picker.secret_id.label"),placeholder:e.unref(c)("vault_secret_picker.secret_id.input_placeholder"),required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder"])),e.createVNode(Y,{modelValue:d.value,"onUpdate:modelValue":m[3]||(m[3]=x=>d.value=x),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-key-input",disabled:E.value||!k.value,help:e.unref(c)("vault_secret_picker.optional_secret_key.help"),label:e.unref(c)("vault_secret_picker.optional_secret_key.label"),placeholder:e.unref(c)("vault_secret_picker.optional_secret_key.placeholder"),type:"text"},null,8,["modelValue","disabled","help","label","placeholder"])]))]),_:1},8,["action-button-disabled","action-button-text","title","visible"])}}}),[["__scopeId","data-v-df8552cc"]]);U.SecretForm=Ye,U.SecretList=Je,U.VaultAuthMethods=T,U.VaultConfigCard=Le,U.VaultForm=We,U.VaultList=Se,U.VaultProviders=t,U.VaultSecretPicker=ut,U.VaultSecretPickerProvider=tt,U.secretsEndpoints=le,U.vaultsEndpoints=te,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-dd0edd92]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-dd0edd92]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-dd0edd92]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-dd0edd92] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-dd0edd92]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-b073d014]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-b073d014] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-b073d014] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-b073d014]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-b073d014] .k-button:last-of-type,.form-actions[data-v-b073d014] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-254b0222]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-254b0222]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-254b0222]{display:none}.kong-ui-entity-base-table[data-v-254b0222] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-d1bb74d1]{width:100%}.kong-ui-entity-filter-clear[data-v-d1bb74d1]{cursor:pointer}.kong-ui-entity-filter[data-v-d1bb74d1]{display:flex;position:relative}.kong-ui-entity-filter[data-v-d1bb74d1] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-d1bb74d1] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-d1bb74d1]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-d1bb74d1]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-d1bb74d1]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-d1bb74d1]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-d1bb74d1]{color:#232633}.menu-item-expand-icon[data-v-d1bb74d1]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-d1bb74d1]{transform:rotate(180deg)}.menu-item-indicator[data-v-d1bb74d1]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-d1bb74d1]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-d1bb74d1] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-d1bb74d1] .k-input{width:100%}.menu-item-body[data-v-d1bb74d1] .k-select-input .input{font-size:12px}.menu-item-body[data-v-d1bb74d1] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-d1bb74d1]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-d1bb74d1]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-d1bb74d1]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.button-row[data-v-77e50046]{align-items:center;display:flex;gap:12px}.kong-ui-entities-vaults-list[data-v-77e50046]{width:100%}.kong-ui-entities-vaults-list .kong-ui-entity-filter-input[data-v-77e50046]{margin-right:12px}.kong-ui-entities-vaults-list .table-content-overflow-wrapper[data-v-77e50046]{max-width:60ch;overflow:hidden;text-overflow:ellipsis}.appear-enter-active{transition:all .5s ease}.appear-enter-from,.appear-leave-to{opacity:0;transform:translate(30px)}.kong-ui-entities-vault-form[data-v-356c233b]{width:100%}.kong-ui-entities-vault-form .advanced-fields-collapse[data-v-356c233b]{margin-bottom:24px}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper[data-v-356c233b]{display:flex;gap:24px;margin-bottom:24px}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper .item-50[data-v-356c233b]{width:50%}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper .item-100[data-v-356c233b],.kong-ui-entities-vault-form .vault-form-textarea[data-v-356c233b]{width:100%}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item[data-v-356c233b]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-title-container[data-v-356c233b]{flex:1}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-title[data-v-356c233b]{display:block;font-weight:700}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-description[data-v-356c233b]{display:block;font-size:12px}.kong-ui-entities-vault-form .vault-form-provider-cards-container button:not(:disabled) .provider-item-title[data-v-356c233b]{color:#3a3f51}.kong-ui-entities-vault-form .vault-form-provider-cards-container button:not(:disabled) .provider-item-description[data-v-356c233b]{color:#6c7489}.kong-ui-entities-vault-form .vault-form-provider-cards-container[data-v-356c233b] .k-tooltip .popover-container{padding:6px!important}.kong-ui-entities-vault-form .vault-form-config-fields-container[data-v-356c233b]>*:not(:first-child),.kong-ui-entities-vault-form .vault-form-config-fields-container .vault-form-config-auth-method-container[data-v-356c233b]>*:not(:first-child){margin-top:24px}.kong-ui-entity-filter-input[data-v-904390fc]{margin-right:12px}.table-content-overflow-wrapper[data-v-904390fc]{max-width:60ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-entities-secrets-list[data-v-f5aa5636]{width:100%}@media screen and (min-width: 1280px){[data-v-5ee165bf] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-secret-form[data-v-754ddb2f]{width:100%}.vault-secret-picker-provider[data-v-66a1e406]{font-size:12px;margin:8px 0}.vault-secret-picker-provider-action[data-v-66a1e406]{color:#0044f4;cursor:pointer}.vault-secret-picker-provider-action.disabled[data-v-66a1e406]{color:#afb7c5;cursor:not-allowed}.vault-secret-picker .inputs-wrapper[data-v-df8552cc]{display:flex;flex-direction:column;gap:20px}.vault-secret-picker-vault-dropdown-item[data-v-df8552cc],.vault-secret-picker-secret-dropdown-item[data-v-df8552cc]{display:flex;flex-direction:column}.vault-secret-picker-vault-dropdown-item span[data-v-df8552cc],.vault-secret-picker-secret-dropdown-item span[data-v-df8552cc]{line-height:20px}.vault-secret-picker-vault-dropdown-item .select-item-label[data-v-df8552cc],.vault-secret-picker-secret-dropdown-item .select-item-label[data-v-df8552cc]{font-weight:600}.vault-secret-picker-vault-dropdown-item .select-item-description[data-v-df8552cc]{color:#6c7489;font-size:12px}.vault-secret-picker .k-empty-state[data-v-df8552cc]{background:none;box-sizing:border-box}
1
+ .config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-dd0edd92]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-dd0edd92]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-dd0edd92]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-dd0edd92] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-dd0edd92]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-b073d014]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-b073d014] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-b073d014] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-b073d014]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-b073d014] .k-button:last-of-type,.form-actions[data-v-b073d014] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-254b0222]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-254b0222]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-254b0222]{display:none}.kong-ui-entity-base-table[data-v-254b0222] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-d1bb74d1]{width:100%}.kong-ui-entity-filter-clear[data-v-d1bb74d1]{cursor:pointer}.kong-ui-entity-filter[data-v-d1bb74d1]{display:flex;position:relative}.kong-ui-entity-filter[data-v-d1bb74d1] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-d1bb74d1] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-d1bb74d1]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-d1bb74d1]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-d1bb74d1]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-d1bb74d1]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-d1bb74d1]{color:#232633}.menu-item-expand-icon[data-v-d1bb74d1]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-d1bb74d1]{transform:rotate(180deg)}.menu-item-indicator[data-v-d1bb74d1]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-d1bb74d1]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-d1bb74d1] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-d1bb74d1] .k-input{width:100%}.menu-item-body[data-v-d1bb74d1] .k-select-input .input{font-size:12px}.menu-item-body[data-v-d1bb74d1] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-d1bb74d1]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-d1bb74d1]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-d1bb74d1]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.button-row[data-v-77e50046]{align-items:center;display:flex;gap:12px}.kong-ui-entities-vaults-list[data-v-77e50046]{width:100%}.kong-ui-entities-vaults-list .kong-ui-entity-filter-input[data-v-77e50046]{margin-right:12px}.kong-ui-entities-vaults-list .table-content-overflow-wrapper[data-v-77e50046]{max-width:60ch;overflow:hidden;text-overflow:ellipsis}.appear-enter-active{transition:all .5s ease}.appear-enter-from,.appear-leave-to{opacity:0;transform:translate(30px)}.kong-ui-entities-vault-form[data-v-e4d00b01]{width:100%}.kong-ui-entities-vault-form .advanced-fields-collapse[data-v-e4d00b01]{margin-bottom:24px}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper[data-v-e4d00b01]{display:flex;gap:24px;margin-bottom:24px}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper .item-50[data-v-e4d00b01]{width:50%}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper .item-100[data-v-e4d00b01],.kong-ui-entities-vault-form .vault-form-textarea[data-v-e4d00b01]{width:100%}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item[data-v-e4d00b01]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-title-container[data-v-e4d00b01]{flex:1}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-title[data-v-e4d00b01]{display:block;font-weight:700}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-description[data-v-e4d00b01]{display:block;font-size:12px}.kong-ui-entities-vault-form .vault-form-provider-cards-container button:not(:disabled) .provider-item-title[data-v-e4d00b01]{color:#3a3f51}.kong-ui-entities-vault-form .vault-form-provider-cards-container button:not(:disabled) .provider-item-description[data-v-e4d00b01]{color:#6c7489}.kong-ui-entities-vault-form .vault-form-provider-cards-container[data-v-e4d00b01] .k-tooltip .popover-container{padding:6px!important}.kong-ui-entities-vault-form .vault-form-config-fields-container[data-v-e4d00b01]>*:not(:first-child),.kong-ui-entities-vault-form .vault-form-config-fields-container .vault-form-config-auth-method-container[data-v-e4d00b01]>*:not(:first-child){margin-top:24px}.kong-ui-entity-filter-input[data-v-904390fc]{margin-right:12px}.table-content-overflow-wrapper[data-v-904390fc]{max-width:60ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-entities-secrets-list[data-v-f5aa5636]{width:100%}@media screen and (min-width: 1280px){[data-v-5ee165bf] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-secret-form[data-v-754ddb2f]{width:100%}.vault-secret-picker-provider[data-v-66a1e406]{font-size:12px;margin:8px 0}.vault-secret-picker-provider-action[data-v-66a1e406]{color:#0044f4;cursor:pointer}.vault-secret-picker-provider-action.disabled[data-v-66a1e406]{color:#afb7c5;cursor:not-allowed}.vault-secret-picker .inputs-wrapper[data-v-df8552cc]{display:flex;flex-direction:column;gap:20px}.vault-secret-picker-vault-dropdown-item[data-v-df8552cc],.vault-secret-picker-secret-dropdown-item[data-v-df8552cc]{display:flex;flex-direction:column}.vault-secret-picker-vault-dropdown-item span[data-v-df8552cc],.vault-secret-picker-secret-dropdown-item span[data-v-df8552cc]{line-height:20px}.vault-secret-picker-vault-dropdown-item .select-item-label[data-v-df8552cc],.vault-secret-picker-secret-dropdown-item .select-item-label[data-v-df8552cc]{font-weight:600}.vault-secret-picker-vault-dropdown-item .select-item-description[data-v-df8552cc]{color:#6c7489;font-size:12px}.vault-secret-picker .k-empty-state[data-v-df8552cc]{background:none;box-sizing:border-box}
@@ -1 +1 @@
1
- {"version":3,"file":"VaultForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VaultForm.vue"],"names":[],"mappings":"AA6yCA,OAAO,gDAAgD,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAQV,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB,EAGvB,MAAM,UAAU,CAAA;AAOjB,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;;IAowCpD,oHAAoH;;cAElG,QAAQ,CAAC,sBAAsB,GAAG,0BAA0B,CAAC;;4BAEzD,sBAAsB,GAAG,0BAA0B,KAAG,OAAO;;IAQnF,0FAA0F;;;;;;;;;;;IAZ1F,oHAAoH;;cAElG,QAAQ,CAAC,sBAAsB,GAAG,0BAA0B,CAAC;;4BAEzD,sBAAsB,GAAG,0BAA0B,KAAG,OAAO;;IAQnF,0FAA0F;;;;;;;;;;;;;AAvB5F,wBA8BG"}
1
+ {"version":3,"file":"VaultForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VaultForm.vue"],"names":[],"mappings":"AA8yCA,OAAO,gDAAgD,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAQV,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB,EAGvB,MAAM,UAAU,CAAA;AAOjB,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;;IAqwCpD,oHAAoH;;cAElG,QAAQ,CAAC,sBAAsB,GAAG,0BAA0B,CAAC;;4BAEzD,sBAAsB,GAAG,0BAA0B,KAAG,OAAO;;IAQnF,0FAA0F;;;;;;;;;;;IAZ1F,oHAAoH;;cAElG,QAAQ,CAAC,sBAAsB,GAAG,0BAA0B,CAAC;;4BAEzD,sBAAsB,GAAG,0BAA0B,KAAG,OAAO;;IAQnF,0FAA0F;;;;;;;;;;;;;AAvB5F,wBA8BG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-vaults",
3
- "version": "3.19.0",
3
+ "version": "3.19.1",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-vaults.umd.js",
6
6
  "module": "./dist/entities-vaults.es.js",