@kong-ui-public/entities-vaults 3.16.4 → 3.16.5

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.
@@ -752,7 +752,7 @@ const ge = {
752
752
  ]),
753
753
  key: "0"
754
754
  } : void 0,
755
- t.enableV2EmptyStates && t.config.app === "konnect" ? {
755
+ !M.value && t.enableV2EmptyStates && t.config.app === "konnect" ? {
756
756
  name: "empty-state",
757
757
  fn: g(() => {
758
758
  var m;
@@ -810,7 +810,7 @@ const ge = {
810
810
  for (const [n, f] of C)
811
811
  c[n] = f;
812
812
  return c;
813
- }, wl = /* @__PURE__ */ de(Ut, [["__scopeId", "data-v-1fcf5b11"]]);
813
+ }, wl = /* @__PURE__ */ de(Ut, [["__scopeId", "data-v-43bd51a6"]]);
814
814
  var l = /* @__PURE__ */ ((t) => (t.AWS = "aws", t.GCP = "gcp", t.HCV = "hcv", t.ENV = "env", t.AZURE = "azure", t.KONNECT = "konnect", t))(l || {}), N = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.K8S = "kubernetes", t.APP_ROLE = "approle", t))(N || {});
815
815
  const Tt = { class: "kong-ui-entities-vault-form" }, Kt = { class: "vault-form-provider-cards-container" }, Pt = ["data-testid"], Mt = { class: "provider-item-title-container" }, Ht = { class: "provider-item-title" }, Nt = { class: "provider-item-description" }, Ft = {
816
816
  key: "kong-vault-config-fields",
@@ -1 +1 @@
1
- (function(A,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):(A=typeof globalThis<"u"?globalThis:A||self,e(A["kong-ui-public-entities-vaults"]={},A.Vue,A.VueRouter,A.KongIcons,A["kong-ui-public-entities-shared"],A["kong-ui-public-i18n"]))})(this,function(A,e,ie,G,m,de){"use strict";const ge={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"}}},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"}},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 ye(){const t=de.createI18n("en-us",ge);return{i18n:t,i18nT:de.i18nTComponent(t)}}const le={useI18n:ye},se="/v2/control-planes/{controlPlaneId}/core-entities",fe="/v2/control-planes/{controlPlaneId}/config-stores",ce="/{workspace}",Q={list:{konnect:{getAll:`${se}/vaults`,deleteConfigStore:`${fe}/{id}?force=true`},kongManager:{getAll:`${ce}/vaults`}},form:{konnect:{create:`${se}/vaults`,createConfigStore:fe,edit:`${se}/vaults/{id}`},kongManager:{create:`${ce}/vaults`,edit:`${ce}/vaults/{id}`}}},be="#00abd2",_e="24px",he={class:"kong-ui-entities-vaults-list"},Ve={class:"button-row"},ke={class:"empty-state-icon-gateway"},Ce={class:"table-content-overflow-wrapper"},we={class:"table-content-overflow-wrapper"},Ee=e.defineComponent({__name:"VaultList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.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(t,{emit:C}){var re;const c=C,i=t,{i18n:{t:u}}=le.useI18n(),a=ie.useRouter(),{axiosInstance:w}=m.useAxios((re=i.config)==null?void 0:re.axiosRequestConfig),{hasRecords:k,handleStateChange:_}=m.useTableState(()=>R.value),f=e.computed(()=>k.value&&i.config.app==="konnect"),V=e.computed(()=>!i.enableV2EmptyStates&&i.config.app==="konnect"),d=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),U={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}},O=U,Z=e.computed(()=>{var n,l;let h=`${i.config.apiBaseUrl}${Q.list[i.config.app].getAll}`;return i.config.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,((n=i.config)==null?void 0:n.controlPlaneId)||""):i.config.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,(l=i.config)!=null&&l.workspace?`/${i.config.workspace}`:"")),h}),R=e.ref(""),r=e.computed(()=>{if(i.config.app==="konnect"||i.config.isExactMatch)return{isExactMatch:!0,placeholder:u("search.placeholder_for_vaults.konnect")};const{prefix:n,name:l}=U;return{isExactMatch:!1,fields:{name:l,prefix:n},schema:i.config.filterSchema}}),{fetcher:q,fetcherState:X,fetcherCacheKey:P}=m.useFetcher({...i.config,cacheIdentifier:i.cacheIdentifier},Z.value),H=()=>{R.value=""},W=()=>{P.value++},g=e.ref(null),$=(h,n)=>{const l=h.id;if(!n(l)){c("copy:error",{entity:h,field:"id",message:u("errors.copy")});return}c("copy:success",{entity:h,field:"id",message:u("copy.success",{val:l})})},z=(h,n)=>{const l=JSON.stringify(h);if(!n(l)){c("copy:error",{entity:h,message:u("errors.copy")});return}c("copy:success",{entity:h,message:u("copy.success_brief")})},L=async h=>{var l;await((l=i.canRetrieve)==null?void 0:l.call(i,h))&&a.push(i.config.getViewRoute(h.id))},Y=h=>({label:u("actions.view"),to:i.config.getViewRoute(h)}),j=h=>({label:u("actions.edit"),to:i.config.getEditRoute(h)}),M=e.ref(void 0),x=e.ref(!1),B=e.ref(!1),D=e.ref(""),b=m.useDeleteUrlBuilder(i.config,Z.value),y=h=>{M.value=h,x.value=!0},S=()=>{x.value=!1},N=async h=>{const{apiBaseUrl:n,app:l,controlPlaneId:E}=i.config,I=`${n}${Q.list[l].deleteConfigStore}`.replace(/{controlPlaneId}/gi,E||"").replace(/{id}/gi,h);try{await w.delete(I)}catch{}},F=async()=>{var h,n,l,E;if((h=M.value)!=null&&h.id){B.value=!0;try{await w.delete(b(M.value.id)),i.config.app==="konnect"&&((n=M.value.config)!=null&&n.config_store_id)&&N(M.value.config.config_store_id),B.value=!1,x.value=!1,P.value++,c("delete:success",M.value)}catch(I){D.value=((E=(l=I.response)==null?void 0:l.data)==null?void 0:E.message)||I.message||u("errors.delete"),c("error",I)}finally{B.value=!1}}},K=()=>{a.push(i.config.createRoute)};e.watch(X,h=>{var n,l,E;if(h.status===m.FetcherStatus.Error){g.value={title:u("errors.general")},(E=(l=(n=h.error)==null?void 0:n.response)==null?void 0:l.data)!=null&&E.message&&(g.value.message=h.error.response.data.message),c("error",h.error);return}g.value=null});const v=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${u("vaults.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:u("vaults.title")});return e.onBeforeMount(async()=>{await i.canCreate()&&(v.value.title=u("vaults.list.empty_state.title"),v.value.ctaText=u("actions.create"))}),(h,n)=>{const l=e.resolveComponent("KButton"),E=e.resolveComponent("KDropdownItem"),I=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",he,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":d.value,"empty-state-options":v.value,"enable-entity-actions":"","error-message":g.value,fetcher:e.unref(q),"fetcher-cache-key":e.unref(P),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-vaults-list",query:R.value,"table-headers":e.unref(O),onClearSearchInput:H,"onClick:row":n[4]||(n[4]=p=>L(p)),onSort:W,onState:e.unref(_)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(m.EntityFilter),{modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=p=>R.value=p),config:r.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ve,[f.value?(e.openBlock(),e.createBlock(l,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:n[1]||(n[1]=p=>h.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(G.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(l,{appearance:"primary","data-testid":"toolbar-add-vault",size:t.useActionOutside?"medium":"large",to:t.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:p})=>[e.createElementVNode("div",Ce,[e.createElementVNode("b",null,e.toDisplayString(p??"-"),1)])]),name:e.withCtx(({rowValue:p})=>[e.createElementVNode("b",null,e.toDisplayString(p??"-"),1)]),description:e.withCtx(({rowValue:p})=>[e.createElementVNode("div",we,e.toDisplayString(p??"-"),1)]),tags:e.withCtx(({rowValue:p})=>[e.createVNode(e.unref(m.TableTags),{tags:p},null,8,["tags"])]),actions:e.withCtx(({row:p})=>[e.createVNode(I,null,{default:e.withCtx(({copyToClipboard:J})=>[e.createVNode(E,{"data-testid":"action-entity-copy-id",onClick:ee=>$(p,J)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(I,null,{default:e.withCtx(({copyToClipboard:J})=>[e.createVNode(E,{"data-testid":"action-entity-copy-json",onClick:ee=>z(p,J)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(p)},{default:e.withCtx(()=>[e.createVNode(E,{"data-testid":"action-entity-view","has-divider":"",item:Y(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canEdit(p)},{default:e.withCtx(()=>[e.createVNode(E,{"data-testid":"action-entity-edit",item:j(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canDelete(p)},{default:e.withCtx(()=>[e.createVNode(E,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:J=>y(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(k)&&V.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(l,{appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:n[2]||(n[2]=p=>h.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(G.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,t.enableV2EmptyStates&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var p;return[e.createVNode(e.unref(m.EntityEmptyState),{"action-button-text":e.unref(u)("vaults.list.toolbar_actions.new_vault"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"vaults-entity-empty-state",description:e.unref(u)("vaults.list.empty_state_v2.description"),"learn-more":t.config.app==="konnect",title:e.unref(u)("vaults.list.empty_state_v2.title"),"onClick:create":K,"onClick:learnMore":n[3]||(n[3]=J=>h.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",ke,[e.createVNode(e.unref(G.SecurityIcon),{color:e.unref(be),size:e.unref(_e)},null,8,["color","size"])])]),_:2},[(p=t.config)!=null&&p.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(m.EntityDeleteModal),{"action-pending":B.value,description:e.unref(u)("delete.description"),"entity-name":M.value&&(M.value.prefix||M.value.id),"entity-type":e.unref(m.EntityTypes).Vault,error:D.value,title:e.unref(u)("delete.title"),visible:x.value,onCancel:S,onProceed:F},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),te=(t,C)=>{const c=t.__vccOpts||t;for(const[i,u]of C)c[i]=u;return c},xe=te(Ee,[["__scopeId","data-v-1fcf5b11"]]);var o=(t=>(t.AWS="aws",t.GCP="gcp",t.HCV="hcv",t.ENV="env",t.AZURE="azure",t.KONNECT="konnect",t))(o||{}),T=(t=>(t.TOKEN="token",t.K8S="kubernetes",t.APP_ROLE="approle",t))(T||{});const Ne={class:"kong-ui-entities-vault-form"},ve={class:"vault-form-provider-cards-container"},Se=["data-testid"],Ie={class:"provider-item-title-container"},Ae={class:"provider-item-title"},Te={class:"provider-item-description"},Re={key:"kong-vault-config-fields",class:"vault-form-config-fields-container"},$e={key:0,class:"vault-form-config-auth-method-container"},Ue={key:1,class:"vault-form-config-auth-method-container"},Pe={key:2,class:"vault-form-config-auth-method-container"},Be={key:5},Ke={class:"wrapper"},Me={class:"item-50"},De={class:"item-50"},He={class:"wrapper"},Fe={class:"item-100"},Oe=te(e.defineComponent({__name:"VaultForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string"||!(t!=null&&t.cancelRoute))},vaultId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:C}){var h;const c=t,i=C,{i18nT:u,i18n:{t:a}}=le.useI18n(),w=ie.useRouter(),{axiosInstance:k}=m.useAxios((h=c.config)==null?void 0:h.axiosRequestConfig),{getMessageFromError:_}=m.useErrors(),f=e.reactive({fields:{prefix:"",description:"",tags:""},isReadonly:!1,errorMessage:""}),V=e.reactive({prefix:"",description:"",tags:""}),d=e.ref(c.config.konnectConfigStoreAvailable?o.KONNECT:o.ENV),U=e.ref(null),O=e.ref(),Z=e.computed(()=>[o.AWS,o.GCP,o.HCV,o.AZURE].includes(d.value)),R=e.computed(()=>[...c.config.konnectConfigStoreAvailable?[{label:a("form.config.konnect.label"),value:o.KONNECT}]:[],{label:a("form.config.env.label"),value:o.ENV},{label:a("form.config.aws.label"),value:o.AWS,disabled:!L.value},{label:a("form.config.gcp.label"),value:o.GCP,disabled:!L.value},{label:a("form.config.hcv.label"),value:o.HCV,disabled:!L.value},...c.config.azureVaultProviderAvailable?[{label:a("form.config.azure.label"),value:o.AZURE,disabled:!L.value}]:[]]),r=e.reactive({[o.KONNECT]:{},[o.ENV]:{prefix:""},[o.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault"},[o.GCP]:{project_id:""},[o.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},[o.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:""}}),q=e.reactive({[o.KONNECT]:{},[o.ENV]:{prefix:""},[o.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault"},[o.GCP]:{project_id:""},[o.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},[o.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:""}}),X=[{label:`${a("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`,value:"us-east-1"},{label:`${a("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`,value:"us-east-2"},{label:`${a("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`,value:"us-west-1"},{label:`${a("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`,value:"us-west-2"},{label:`${a("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`,value:"af-south-1"},{label:`${a("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`,value:"ap-east-1"},{label:`${a("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`,value:"ap-southeast-3"},{label:`${a("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`,value:"ap-south-1"},{label:`${a("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`,value:"ap-northeast-1"},{label:`${a("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`,value:"ap-northeast-2"},{label:`${a("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`,value:"ap-northeast-3"},{label:`${a("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`,value:"ap-southeast-1"},{label:`${a("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`,value:"ap-southeast-2"},{label:`${a("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`,value:"ca-central-1"},{label:`${a("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`,value:"eu-central-1"},{label:`${a("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`,value:"eu-west-1"},{label:`${a("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`,value:"eu-west-2"},{label:`${a("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`,value:"eu-west-3"},{label:`${a("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`,value:"eu-south-1"},{label:`${a("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`,value:"eu-north-1"},{label:`${a("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`,value:"me-south-1"},{label:`${a("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`,value:"sa-east-1"},{label:`${a("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`,value:"us-gov-east-1"},{label:`${a("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`,value:"us-gov-west-1"}],P=[{label:"secrets",value:"secrets"}],H=[{label:"http",value:"http"},{label:"https",value:"https"}],W=[{label:"v1",value:"v1"},{label:"v2",value:"v2"}],g=e.computed(()=>c.vaultId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),$=e.computed(()=>{var n,l;return(l=Q.form[(n=c.config)==null?void 0:n.app])==null?void 0:l.edit}),z=e.computed(()=>g.value===m.EntityBaseFormType.Edit&&c.config.app==="kongManager"),L=e.computed(()=>c.config.app==="konnect"||m.useGatewayFeatureSupported({gatewayInfo:c.config.gatewayInfo,supportedRange:{enterprise:[]}})),Y=()=>{var n;w.push(((n=c.config)==null?void 0:n.cancelRoute)||{name:"vault-list"})},j=n=>{i("loading",n)},M=n=>{i("error",n)},x=n=>{switch(n){case o.KONNECT:return G.KongIcon;case o.ENV:return G.CodeIcon;case o.AWS:return G.AwsIcon;case o.GCP:return G.GoogleCloudIcon;case o.HCV:return G.HashicorpIcon;case o.AZURE:return G.AzureIcon}},B=n=>{switch(n){case o.KONNECT:return a("form.config.konnect.description");case o.ENV:return a("form.config.env.description");case o.AWS:return a("form.config.aws.description");case o.GCP:return a("form.config.gcp.description");case o.HCV:return a("form.config.hcv.description");case o.AZURE:return a("form.config.azure.description")}},D=n=>{var I,p,J,ee,ae,s;f.fields.prefix=((I=n==null?void 0:n.item)==null?void 0:I.prefix)||(n==null?void 0:n.prefix)||"",f.fields.description=((p=n==null?void 0:n.item)==null?void 0:p.description)||(n==null?void 0:n.description)||"";const l=((J=n==null?void 0:n.item)==null?void 0:J.tags)||(n==null?void 0:n.tags)||[];f.fields.tags=(l==null?void 0:l.join(", "))||"",Object.assign(V,f.fields);const E=((ee=n==null?void 0:n.item)==null?void 0:ee.config)||(n==null?void 0:n.config)||null;E&&(Object.keys(E).length||(n==null?void 0:n.name)===o.KONNECT)?(d.value=((ae=n==null?void 0:n.item)==null?void 0:ae.name)||(n==null?void 0:n.name)||"",U.value=d.value,O.value=((s=n==null?void 0:n.config)==null?void 0:s.config_store_id)||void 0,Object.assign(r[d.value],E),Object.assign(q[d.value],E)):f.errorMessage="Error loading vault config"},b=e.computed(()=>d.value===o.HCV?!Object.keys(r[o.HCV]).filter(n=>["namespace","ttl","neg_ttl","resurrect_ttl","kube_auth_path","approle_auth_path","approle_secret_id","approle_secret_id_file"].includes(n)||r[o.HCV].auth_method!==T.K8S&&(n==="kube_role"||n==="kube_api_token_file")||r[o.HCV].auth_method!==T.TOKEN&&n==="token"||r[o.HCV].auth_method!==T.APP_ROLE&&(n==="approle_role_id"||n==="approle_response_wrapping")||r[o.HCV].auth_method===T.APP_ROLE&&n==="approle_response_wrapping"&&typeof r[d.value][n]=="boolean"?!1:!r[d.value][n]).length:d.value===o.AZURE?!Object.keys(r[o.AZURE]).filter(n=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(n)?!1:!r[d.value][n]).length:d.value===o.AWS?!Object.keys(r[o.AWS]).filter(n=>["endpoint_url","assume_role_arn","ttl","neg_ttl","resurrect_ttl","sts_endpoint_url"].includes(n)?!1:!r[d.value][n]).length:!Object.keys(r[d.value]).filter(n=>["ttl","neg_ttl","resurrect_ttl"].includes(n)?!1:!r[d.value][n]).length),y=e.computed(()=>!!f.fields.prefix&&b.value),S=e.computed(()=>JSON.stringify(f.fields)!==JSON.stringify(V)||d.value!==U.value||JSON.stringify(r[d.value])!==JSON.stringify(q[d.value])),N=e.computed(()=>{var l,E;let n=`${c.config.apiBaseUrl}${Q.form[c.config.app][g.value]}`;return c.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((l=c.config)==null?void 0:l.controlPlaneId)||""):c.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(E=c.config)!=null&&E.workspace?`/${c.config.workspace}`:"")),n=n.replace(/{id}/gi,c.vaultId),n}),F=e.computed(()=>{var ee,ae;const n={protocol:r[o.HCV].protocol,host:r[o.HCV].host,port:parseInt(r[o.HCV].port.toString()),mount:r[o.HCV].mount,kv:r[o.HCV].kv,namespace:r[o.HCV].namespace||null,auth_method:r[o.HCV].auth_method,...r[o.HCV].auth_method===T.TOKEN&&{token:r[o.HCV].token},...r[o.HCV].auth_method===T.K8S&&{kube_role:r[o.HCV].kube_role,kube_auth_path:r[o.HCV].kube_auth_path||void 0,kube_api_token_file:r[o.HCV].kube_api_token_file,token:null},...r[o.HCV].auth_method===T.APP_ROLE&&{approle_auth_path:r[o.HCV].approle_auth_path||void 0,approle_role_id:r[o.HCV].approle_role_id,approle_secret_id:r[o.HCV].approle_secret_id||void 0,approle_secret_id_file:r[o.HCV].approle_secret_id_file||void 0,approle_response_wrapping:r[o.HCV].approle_response_wrapping??!1}},l={...r[d.value],client_id:r[d.value].client_id||null,tenant_id:r[d.value].tenant_id||null},E={...r[d.value],endpoint_url:r[d.value].endpoint_url||null,assume_role_arn:r[d.value].assume_role_arn||null,...c.config.awsStsEndpointUrlAvailable?{sts_endpoint_url:r[d.value].sts_endpoint_url||null}:{}};let I=r[d.value];d.value===o.HCV?I=n:d.value===o.AZURE?I=l:d.value===o.AWS&&(I=E);let p={};if(![o.KONNECT,o.ENV].includes(d.value)){const s=r[d.value],ue=s.ttl,pe=s.neg_ttl,me=s.resurrect_ttl;p={ttl:ue?parseInt(ue.toString(),10):null,neg_ttl:pe?parseInt(pe.toString(),10):null,resurrect_ttl:me?parseInt(me.toString(),10):null}}return{prefix:f.fields.prefix,description:f.fields.description||null,tags:(ae=(ee=f.fields.tags.split(","))==null?void 0:ee.map(s=>String(s||"").trim()))==null?void 0:ae.filter(s=>s!==""),name:d.value,config:{...I,...p}}}),K=e.computed(()=>({...F.value,config:{...F.value.config,config_store_id:O.value}})),v=async()=>{var n;try{f.isReadonly=!0;const l=`${c.config.apiBaseUrl}${Q.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi,((n=c.config)==null?void 0:n.controlPlaneId)||""),E=await k.post(l);return E==null?void 0:E.data.id}catch(l){f.errorMessage=_(l),i("error",l)}finally{f.isReadonly=!1}},re=async()=>{var n;try{f.isReadonly=!0;let l;g.value==="create"?d.value===o.KONNECT?(O.value=await v(),l=await k.post(N.value,K.value)):l=await k.post(N.value,F.value):g.value==="edit"&&(d.value===o.KONNECT&&!O.value?(O.value=await v(),l=await k.put(N.value,K.value)):l=((n=c.config)==null?void 0:n.app)==="konnect"?await k.put(N.value,K.value):await k.patch(N.value,F.value)),D(l==null?void 0:l.data),i("update",l==null?void 0:l.data)}catch(l){f.errorMessage=_(l),i("error",l)}finally{f.isReadonly=!1}};return(n,l)=>{const E=e.resolveComponent("KTooltip"),I=e.resolveComponent("KSelect"),p=e.resolveComponent("KInput"),J=e.resolveComponent("KCheckbox"),ee=e.resolveComponent("KCollapse"),ae=e.resolveComponent("KTextArea");return e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(m.EntityBaseForm),{"can-submit":y.value&&S.value,config:t.config,"edit-id":t.vaultId,"entity-type":e.unref(m.SupportedEntityType).Vault,"error-message":f.errorMessage,"fetch-url":$.value,"form-fields":F.value,"is-readonly":f.isReadonly,onCancel:Y,"onFetch:error":M,"onFetch:success":D,onLoading:j,onSubmit:re},{default:e.withCtx(()=>[e.createVNode(e.unref(m.EntityFormSection),{description:e.unref(a)("form.sections.config.description"),title:e.unref(a)("form.sections.config.title")},{default:e.withCtx(()=>[e.createElementVNode("div",ve,[e.createVNode(I,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=s=>d.value=s),"data-testid":"provider-select",disabled:z.value,"dropdown-max-height":"500",items:R.value},{"selected-item-template":e.withCtx(({item:s})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(s.value)))),e.createTextVNode(" "+e.toDisplayString(s==null?void 0:s.label),1)]),"item-template":e.withCtx(({item:s})=>[e.createVNode(E,{placement:"top",text:s.disabled?e.unref(a)("form.unavailable"):""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"provider-item","data-testid":`vault-form-provider-${s.value}`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(s.value)))),e.createElementVNode("div",Ie,[e.createElementVNode("span",Ae,e.toDisplayString(s==null?void 0:s.label),1),e.createElementVNode("span",Te,e.toDisplayString(B(s.value)),1)])],8,Se)]),_:2},1032,["text"])]),_:1},8,["modelValue","disabled","items"])]),e.createVNode(e.TransitionGroup,{name:"appear"},{default:e.withCtx(()=>[d.value===e.unref(o).ENV?(e.openBlock(),e.createElementBlock("div",Re,[e.createVNode(p,{modelValue:r[e.unref(o).ENV].prefix,"onUpdate:modelValue":l[1]||(l[1]=s=>r[e.unref(o).ENV].prefix=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-kong-prefix","is-readonly":f.isReadonly,label:e.unref(a)("form.config.env.fields.prefix.label"),"label-attributes":{info:e.unref(a)("form.config.env.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(a)("form.config.env.fields.prefix.placeholder"),required:"",type:"text"},null,8,["modelValue","is-readonly","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),d.value===e.unref(o).AWS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(o).AWS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(I,{modelValue:r[e.unref(o).AWS].region,"onUpdate:modelValue":l[2]||(l[2]=s=>r[e.unref(o).AWS].region=s),"data-testid":"vault-form-config-aws-region",items:X,label:e.unref(a)("form.config.aws.fields.region.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.region.tooltip")},placeholder:e.unref(a)("form.config.aws.fields.region.placeholder"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(p,{modelValue:r[e.unref(o).AWS].endpoint_url,"onUpdate:modelValue":l[3]||(l[3]=s=>r[e.unref(o).AWS].endpoint_url=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-endpoint_url","is-readonly":f.isReadonly,label:e.unref(a)("form.config.aws.fields.endpoint_url.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},type:"text"},null,8,["modelValue","is-readonly","label","label-attributes"]),e.createVNode(p,{modelValue:r[e.unref(o).AWS].assume_role_arn,"onUpdate:modelValue":l[4]||(l[4]=s=>r[e.unref(o).AWS].assume_role_arn=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-assume_role_arn","is-readonly":f.isReadonly,label:e.unref(a)("form.config.aws.fields.assume_role_arn.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.assume_role_arn.tooltip"),tooltipAttributes:{maxWidth:"400"}},type:"text"},null,8,["modelValue","is-readonly","label","label-attributes"]),e.createVNode(p,{modelValue:r[e.unref(o).AWS].role_session_name,"onUpdate:modelValue":l[5]||(l[5]=s=>r[e.unref(o).AWS].role_session_name=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-role_session_name","is-readonly":f.isReadonly,label:e.unref(a)("form.config.aws.fields.role_session_name.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.role_session_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},required:"",type:"text"},null,8,["modelValue","is-readonly","label","label-attributes"]),t.config.awsStsEndpointUrlAvailable?(e.openBlock(),e.createBlock(p,{key:0,modelValue:r[e.unref(o).AWS].sts_endpoint_url,"onUpdate:modelValue":l[6]||(l[6]=s=>r[e.unref(o).AWS].sts_endpoint_url=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-sts_endpoint_url","is-readonly":f.isReadonly,label:e.unref(a)("form.config.aws.fields.sts_endpoint_url.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.sts_endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},type:"text"},null,8,["modelValue","is-readonly","label","label-attributes"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),d.value===e.unref(o).GCP?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(o).GCP}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:r[e.unref(o).GCP].project_id,"onUpdate:modelValue":l[7]||(l[7]=s=>r[e.unref(o).GCP].project_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-gcp-project-id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.gcp.fields.project_id.label"),placeholder:e.unref(a)("form.config.gcp.fields.project_id.placeholder"),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(a)("form.config.gcp.fields.project_id.tooltip.italicText")),1)]),_:1})]),_:1},8,["modelValue","is-readonly","label","placeholder"])])):e.createCommentVNode("",!0),d.value===e.unref(o).HCV?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(o).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(I,{modelValue:r[e.unref(o).HCV].protocol,"onUpdate:modelValue":l[8]||(l[8]=s=>r[e.unref(o).HCV].protocol=s),"data-testid":"vault-form-config-hcv-protocol",items:H,label:e.unref(a)("form.config.hcv.fields.protocol.label"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].host,"onUpdate:modelValue":l[9]||(l[9]=s=>r[e.unref(o).HCV].host=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-host","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.host.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].port,"onUpdate:modelValue":l[10]||(l[10]=s=>r[e.unref(o).HCV].port=s),autocomplete:"off","data-testid":"vault-form-config-hcv-port","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.port.label"),min:"0",required:"",type:"number"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].mount,"onUpdate:modelValue":l[11]||(l[11]=s=>r[e.unref(o).HCV].mount=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-mount","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.mount.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(I,{modelValue:r[e.unref(o).HCV].kv,"onUpdate:modelValue":l[12]||(l[12]=s=>r[e.unref(o).HCV].kv=s),"data-testid":"vault-form-config-hcv-kv",items:W,label:e.unref(a)("form.config.hcv.fields.kv.label"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].namespace,"onUpdate:modelValue":l[13]||(l[13]=s=>r[e.unref(o).HCV].namespace=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-namespace","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.namespace.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(I,{modelValue:r[e.unref(o).HCV].auth_method,"onUpdate:modelValue":l[14]||(l[14]=s=>r[e.unref(o).HCV].auth_method=s),"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},...t.config.hcvAppRoleMethodAvailable?[{label:e.unref(T).APP_ROLE,value:e.unref(T).APP_ROLE}]:[]],label:e.unref(a)("form.config.hcv.fields.auth_method.label"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","items","label","readonly"]),r[e.unref(o).HCV].auth_method===e.unref(T).TOKEN?(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(p,{modelValue:r[e.unref(o).HCV].token,"onUpdate:modelValue":l[15]||(l[15]=s=>r[e.unref(o).HCV].token=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-token","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.token.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"])])):r[e.unref(o).HCV].auth_method===e.unref(T).K8S?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(p,{modelValue:r[e.unref(o).HCV].kube_role,"onUpdate:modelValue":l[16]||(l[16]=s=>r[e.unref(o).HCV].kube_role=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_role","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.kube_role.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].kube_auth_path,"onUpdate:modelValue":l[17]||(l[17]=s=>r[e.unref(o).HCV].kube_auth_path=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_auth_path","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.kube_auth_path.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].kube_api_token_file,"onUpdate:modelValue":l[18]||(l[18]=s=>r[e.unref(o).HCV].kube_api_token_file=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_api_token_file","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.kube_api_token_file.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"])])):r[e.unref(o).HCV].auth_method===e.unref(T).APP_ROLE?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(p,{modelValue:r[e.unref(o).HCV].approle_auth_path,"onUpdate:modelValue":l[19]||(l[19]=s=>r[e.unref(o).HCV].approle_auth_path=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_auth_path","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.approle_auth_path.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].approle_role_id,"onUpdate:modelValue":l[20]||(l[20]=s=>r[e.unref(o).HCV].approle_role_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_role_id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.approle_role_id.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].approle_secret_id,"onUpdate:modelValue":l[21]||(l[21]=s=>r[e.unref(o).HCV].approle_secret_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.approle_secret_id.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].approle_secret_id_file,"onUpdate:modelValue":l[22]||(l[22]=s=>r[e.unref(o).HCV].approle_secret_id_file=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id_file","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.approle_secret_id_file.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(J,{modelValue:r[e.unref(o).HCV].approle_response_wrapping,"onUpdate:modelValue":l[23]||(l[23]=s=>r[e.unref(o).HCV].approle_response_wrapping=s),"data-testid":"vault-form-config-hcv-approle_response_wrapping",label:e.unref(a)("form.config.hcv.fields.approle_response_wrapping.label")},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),d.value===e.unref(o).AZURE?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(o).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:r[e.unref(o).AZURE].location,"onUpdate:modelValue":l[24]||(l[24]=s=>r[e.unref(o).AZURE].location=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-location","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.location.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).AZURE].vault_uri,"onUpdate:modelValue":l[25]||(l[25]=s=>r[e.unref(o).AZURE].vault_uri=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-uri","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.vault_uri.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).AZURE].credentials_prefix,"onUpdate:modelValue":l[26]||(l[26]=s=>r[e.unref(o).AZURE].credentials_prefix=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-prefix","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.credential_prefix.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(I,{modelValue:r[e.unref(o).AZURE].type,"onUpdate:modelValue":l[27]||(l[27]=s=>r[e.unref(o).AZURE].type=s),"data-testid":"vault-form-config-azure-type",items:P,label:e.unref(a)("form.config.azure.fields.type.label"),placeholder:e.unref(a)("form.config.azure.fields.type.placeholder"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(p,{modelValue:r[e.unref(o).AZURE].client_id,"onUpdate:modelValue":l[28]||(l[28]=s=>r[e.unref(o).AZURE].client_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-client-id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.client_id.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).AZURE].tenant_id,"onUpdate:modelValue":l[29]||(l[29]=s=>r[e.unref(o).AZURE].tenant_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-tenant-id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.tenant_id.label"),type:"text"},null,8,["modelValue","is-readonly","label"])])):e.createCommentVNode("",!0),t.config.ttl?(e.openBlock(),e.createElementBlock("div",Be,[Z.value?(e.openBlock(),e.createBlock(ee,{key:0,class:"advanced-fields-collapse","data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(a)("form.config.advancedFields.title")},{default:e.withCtx(()=>[e.createElementVNode("div",Ke,[e.createElementVNode("div",Me,[e.createVNode(p,{modelValue:r[d.value].ttl,"onUpdate:modelValue":l[30]||(l[30]=s=>r[d.value].ttl=s),"data-testid":"vault-ttl-input",label:e.unref(a)("form.config.advancedFields.ttl"),"label-attributes":{info:e.unref(a)("form.config.advancedFields.ttlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])]),e.createElementVNode("div",De,[e.createVNode(p,{modelValue:r[d.value].neg_ttl,"onUpdate:modelValue":l[31]||(l[31]=s=>r[d.value].neg_ttl=s),"data-testid":"vault-neg-ttl-input",label:e.unref(a)("form.config.advancedFields.negTtl"),"label-attributes":{info:e.unref(a)("form.config.advancedFields.negTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])]),e.createElementVNode("div",He,[e.createElementVNode("div",Fe,[e.createVNode(p,{modelValue:r[d.value].resurrect_ttl,"onUpdate:modelValue":l[32]||(l[32]=s=>r[d.value].resurrect_ttl=s),"data-testid":"vault-resurrect-ttl-input",label:e.unref(a)("form.config.advancedFields.resurrectTtl"),"label-attributes":{info:e.unref(a)("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(m.EntityFormSection),{description:e.unref(a)("form.sections.general.description"),title:e.unref(a)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:f.fields.prefix,"onUpdate:modelValue":l[33]||(l[33]=s=>f.fields.prefix=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-prefix",help:e.unref(a)("form.fields.prefix.help"),"is-readonly":f.isReadonly,label:e.unref(a)("form.fields.prefix.label"),"label-attributes":{info:e.unref(a)("form.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(a)("form.fields.prefix.placeholder"),required:"",type:"text"},null,8,["modelValue","help","is-readonly","label","label-attributes","placeholder"]),e.createVNode(ae,{modelValue:f.fields.description,"onUpdate:modelValue":l[34]||(l[34]=s=>f.fields.description=s),modelModifiers:{trim:!0},"character-limit":1e3,class:"vault-form-textarea","data-testid":"vault-form-description",label:e.unref(a)("form.fields.description.label"),placeholder:e.unref(a)("form.fields.description.placeholder"),readonly:f.isReadonly},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(p,{modelValue:f.fields.tags,"onUpdate:modelValue":l[35]||(l[35]=s=>f.fields.tags=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-tags",help:e.unref(a)("form.fields.tags.help"),"is-readonly":f.isReadonly,label:e.unref(a)("form.fields.tags.label"),placeholder:e.unref(a)("form.fields.tags.placeholder"),type:"text"},null,8,["modelValue","help","is-readonly","label","placeholder"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-b24af18b"]]),qe={class:"kong-ui-vault-entity-config-card"},We=e.defineComponent({__name:"VaultConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const C=t,c=e.computed(()=>{var a,w;return(w=Q.form[(a=C.config)==null?void 0:a.app])==null?void 0:w.edit}),{i18n:{t:i}}=le.useI18n(),u=e.ref({id:{},name:{label:i("labels.vault_type")},updated_at:{},created_at:{},prefix:{order:5,section:m.ConfigurationSchemaSection.Basic},description:{order:6,section:m.ConfigurationSchemaSection.Basic},tags:{order:7},config:{order:8,type:m.ConfigurationSchemaType.Json}});return(a,w)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(e.unref(m.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":u.value,"entity-type":e.unref(m.SupportedEntityType).Vault,"fetch-url":c.value,"hide-title":t.hideTitle,"onFetch:error":w[0]||(w[0]=k=>a.$emit("fetch:error",k)),"onFetch:success":w[1]||(w[1]=k=>a.$emit("fetch:success",k)),onLoading:w[2]||(w[2]=k=>a.$emit("loading",k))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),ne="/v2/control-planes/{controlPlaneId}",oe={getVault:{konnect:`${ne}/core-entities/vaults/{id}`},list:{konnect:`${ne}/config-stores/{id}/secrets`},form:{konnect:{create:`${ne}/config-stores/{id}/secrets`,edit:`${ne}/config-stores/{id}/secrets/{secretId}`}}},Le={class:"table-content-overflow-wrapper"},je=te(e.defineComponent({inheritAttrs:!1,__name:"SecretListInner",props:{config:{type:Object,required:!0,validator:t=>!(!t||(t==null?void 0:t.app)!=="konnect"||!t.createRoute||!t.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(t,{emit:C}){var M;const c=C,i=t,{i18n:{t:u,formatUnixTimeStamp:a}}=le.useI18n(),{axiosInstance:w}=m.useAxios((M=i.config)==null?void 0:M.axiosRequestConfig),_={key:{label:u("secrets.list.table_headers.key"),sortable:!1,hidable:!1},updated_at:{label:u("secrets.list.table_headers.updated_at"),sortable:!1}},f=x=>({"data-testid":x.key}),V=e.computed(()=>{var x;return`${i.config.apiBaseUrl}${oe.list[i.config.app]}`.replace(/{controlPlaneId}/gi,((x=i.config)==null?void 0:x.controlPlaneId)||"").replace(/{id}/gi,i.configStoreId||"")}),d=e.ref(""),U={isExactMatch:!0,placeholder:u("search.placeholder_for_secrets.konnect")},{fetcher:O,fetcherState:Z,fetcherCacheKey:R}=m.useFetcher({...i.config,cacheIdentifier:i.cacheIdentifier},V.value),r=()=>{d.value=""},q=e.ref(null),X=x=>({label:u("actions.edit"),to:i.config.getEditRoute(x)}),P=e.ref(void 0),H=e.ref(!1),W=e.ref(!1),g=e.ref(""),$=m.useDeleteUrlBuilder(i.config,V.value),z=x=>{P.value=x,H.value=!0},L=()=>{H.value=!1},Y=async()=>{var x,B,D;if((x=P.value)!=null&&x.key){W.value=!0;try{await w.delete($(P.value.key)),W.value=!1,H.value=!1,R.value++,c("delete:success",P.value)}catch(b){g.value=((D=(B=b.response)==null?void 0:B.data)==null?void 0:D.message)||b.message||u("errors.delete"),c("error",b)}finally{W.value=!1}}};e.watch(Z,x=>{var B,D,b;if(x.status===m.FetcherStatus.Error){q.value={title:u("errors.general")},(b=(D=(B=x.error)==null?void 0:B.response)==null?void 0:D.data)!=null&&b.message&&(q.value.message=x.error.response.data.message),c("error",x.error);return}q.value=null});const j=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${u("secrets.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:u("secrets.title")});return e.onBeforeMount(async()=>{await i.canCreate()&&(j.value.title=u("secrets.list.empty_state.title"),j.value.ctaText=u("secrets.list.toolbar_actions.new_secret"))}),(x,B)=>{const D=e.resolveComponent("KButton"),b=e.resolveComponent("KDropdownItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":"","empty-state-options":j.value,"enable-entity-actions":"","error-message":q.value,fetcher:e.unref(O),"fetcher-cache-key":e.unref(R),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-secrets-list",query:d.value,"row-attributes":f,"table-headers":e.unref(_),onClearSearchInput:r},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(m.EntityFilter),{modelValue:d.value,"onUpdate:modelValue":B[0]||(B[0]=y=>d.value=y),config:U},null,8,["modelValue"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(D,{appearance:"primary","data-testid":"toolbar-add-secret",size:"large",to:t.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:y})=>[e.createElementVNode("div",Le,[e.createElementVNode("b",null,e.toDisplayString(y??"-"),1)])]),updated_at:e.withCtx(({rowValue:y})=>[e.createElementVNode("span",null,e.toDisplayString(y?e.unref(a)(new Date(y).getTime()/1e3):"-"),1)]),actions:e.withCtx(({row:y})=>[e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canEdit(y)},{default:e.withCtx(()=>[e.createVNode(b,{"data-testid":"action-entity-edit",item:X(y.key)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canDelete(y)},{default:e.withCtx(()=>[e.createVNode(b,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:S=>z(y)},{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(m.EntityDeleteModal),{"action-pending":W.value,description:e.unref(u)("delete.description"),"entity-name":P.value&&P.value.key,"entity-type":e.unref(m.EntityTypes).Secret,error:g.value,title:e.unref(u)("delete.title_for_secret"),visible:H.value,onCancel:L,onProceed:Y},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])],64)}}}),[["__scopeId","data-v-074727f7"]]),ze={class:"kong-ui-entities-secrets-list"},Ge=te(e.defineComponent({__name:"SecretList",props:{config:{type:Object,required:!0,validator:t=>!(!t||(t==null?void 0:t.app)!=="konnect"||!t.createRoute||!t.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(t,{emit:C}){var f;const c=C,i=t,u=V=>{c("error",V)},a=V=>{c("delete:success",V)},{axiosInstance:w}=m.useAxios((f=i.config)==null?void 0:f.axiosRequestConfig),k=e.ref(""),_=e.computed(()=>{var V;return`${i.config.apiBaseUrl}${oe.getVault[i.config.app]}`.replace(/{controlPlaneId}/gi,((V=i.config)==null?void 0:V.controlPlaneId)||"").replace(/{id}/gi,i.vaultId)});return e.onBeforeMount(async()=>{var V;try{const{data:d}=await w.get(_.value);k.value=(V=d==null?void 0:d.config)==null?void 0:V.config_store_id}catch(d){c("error",d)}}),(V,d)=>(e.openBlock(),e.createElementBlock("div",ze,[k.value?(e.openBlock(),e.createBlock(je,e.mergeProps({key:0},i,{"config-store-id":k.value,"onDelete:success":a,onError:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0f9047e6"]]),Ze=te(e.defineComponent({inheritAttrs:!1,__name:"SecretFormInner",props:{config:{type:Object,required:!0,validator:t=>!(!t||t.app!=="konnect"||!t.controlPlaneId||!t.cancelRoute)},configStoreId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:C}){var W;const c=t,i=C,{i18n:{t:u}}=le.useI18n(),a=ie.useRouter(),{axiosInstance:w}=m.useAxios((W=c.config)==null?void 0:W.axiosRequestConfig),{getMessageFromError:k}=m.useErrors(),_=e.reactive({fields:{key:"",value:""},readonly:!1,errorMessage:""}),f=e.reactive({key:"",value:""}),V=e.computed(()=>{var g,$;return($=oe.form[(g=c.config)==null?void 0:g.app])==null?void 0:$.edit.replace(/{id}/gi,c.configStoreId).replace(/{secretId}/gi,c.secretId)}),d=()=>{var g;a.push(((g=c.config)==null?void 0:g.cancelRoute)||{name:"secret-list"})},U=g=>{i("loading",g)},O=g=>{i("error",g)},Z=g=>{var $,z;_.fields.key=(($=g==null?void 0:g.item)==null?void 0:$.key)||(g==null?void 0:g.key)||"",_.fields.value=((z=g==null?void 0:g.item)==null?void 0:z.value)||(g==null?void 0:g.value)||"",Object.assign(f,_.fields)},R=e.computed(()=>c.secretId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),r=e.computed(()=>{var g;return`${c.config.apiBaseUrl}${oe.form[c.config.app][R.value]}`.replace(/{controlPlaneId}/gi,((g=c.config)==null?void 0:g.controlPlaneId)||"").replace(/{id}/gi,c.configStoreId).replace(/{secretId}/gi,c.secretId)}),q=e.computed(()=>!!_.fields.key&&!!_.fields.value),X=e.computed(()=>JSON.stringify(_.fields)!==JSON.stringify(f)),P=e.computed(()=>({key:_.fields.key,value:_.fields.value})),H=async()=>{try{_.readonly=!0;let g;R.value==="create"?g=await w.post(r.value,P.value):R.value==="edit"&&(g=await w.put(r.value,P.value)),Z(g==null?void 0:g.data),i("update",g==null?void 0:g.data)}catch(g){_.errorMessage=k(g),i("error",g)}finally{_.readonly=!1}};return(g,$)=>{const z=e.resolveComponent("KInput"),L=e.resolveComponent("KTextArea"),Y=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(e.unref(m.EntityBaseForm),{"can-submit":q.value&&X.value,config:t.config,"edit-id":t.secretId,"entity-type":e.unref(m.SupportedEntityType).Other,"error-message":_.errorMessage,"fetch-url":V.value,"form-fields":P.value,"is-readonly":_.readonly,onCancel:d,"onFetch:error":O,"onFetch:success":Z,onLoading:U,onSubmit:H},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(m.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:_.fields.key,"onUpdate:modelValue":$[0]||($[0]=j=>_.fields.key=j),modelModifiers:{trim:!0},autocomplete:"off",class:"key-field","data-testid":"secret-form-key",disabled:R.value===e.unref(m.EntityBaseFormType).Edit,label:e.unref(u)("secrets.form.fields.key.label"),placeholder:e.unref(u)("secrets.form.fields.key.placeholder"),readonly:_.readonly,required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(L,{modelValue:_.fields.value,"onUpdate:modelValue":$[1]||($[1]=j=>_.fields.value=j),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:_.readonly,required:"",resizable:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(Y,{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-eb9c7fc4"]]),Je={class:"kong-ui-entities-secret-form"},Qe=te(e.defineComponent({__name:"SecretForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||t.app!=="konnect"||!t.controlPlaneId||!t.cancelRoute)},vaultId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:C}){var V;const c=t,i=C,u=d=>{i("update",d)},a=d=>{i("error",d)},w=d=>{i("loading",d)},{axiosInstance:k}=m.useAxios((V=c.config)==null?void 0:V.axiosRequestConfig),_=e.ref(""),f=e.computed(()=>{var d;return`${c.config.apiBaseUrl}${oe.getVault[c.config.app]}`.replace(/{controlPlaneId}/gi,((d=c.config)==null?void 0:d.controlPlaneId)||"").replace(/{id}/gi,c.vaultId)});return e.onBeforeMount(async()=>{var d;try{const{data:U}=await k.get(f.value);_.value=(d=U==null?void 0:U.config)==null?void 0:d.config_store_id}catch(U){i("error",U)}}),(d,U)=>(e.openBlock(),e.createElementBlock("div",Je,[_.value?(e.openBlock(),e.createBlock(Ze,e.mergeProps({key:0},c,{"config-store-id":_.value,onError:a,onLoading:w,onUpdate:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-02e6d2f3"]]),Xe={class:"vault-secret-picker-provider"},Ye=te(e.defineComponent({__name:"VaultSecretPickerProvider",props:{value:{},disabled:{type:Boolean},update:{type:Function}},emits:["open"],setup(t,{emit:C}){const c=t,i=C,{i18n:{t:u},i18nT:a}=le.useI18n();return(w,k)=>(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(e.unref(a),{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:k[0]||(k[0]=()=>!c.disabled&&i("open",c.value,c.update))},e.toDisplayString(e.unref(u)("vault_secret_picker.provider.cta")),3)]),_:1})]))}}),[["__scopeId","data-v-66a1e406"]]),et=t=>{let C=t.trim();if(!C.startsWith("{")||!C.endsWith("}"))throw new Error("Invalid secret reference: must be enclosed in curly braces");if(C=C.substring(1,C.length-1).trim(),!C.startsWith("vault://"))throw new Error("Invalid secret reference: must start with vault://");const c=new URL(`http://${C.substring(8)}`);if(!c)throw new Error("Invalid secret reference: must have a vault prefix");const i=c.host,[,u,...a]=c.pathname.split("/");if(!i)throw new Error("Invalid secret reference: must have a vault prefix");return{vaultPrefix:i,secretId:u||void 0,optionalSecretKey:a==null?void 0:a.join("/")}},tt=t=>{if(!t.vaultPrefix)throw new Error("Invalid secret reference: must have a vault prefix");let C=`vault://${t.vaultPrefix}`;return t.secretId&&(C=`${C}/${t.secretId}`),t.optionalSecretKey&&(C=`${C}/${t.optionalSecretKey}`),`{${C}}`},ot={key:1,class:"inputs-wrapper"},lt={"data-testid":"no-search-results"},at={class:"k-select-selected-item-label"},rt={class:"vault-secret-picker-vault-dropdown-item"},nt={class:"select-item-label"},it={class:"select-item-description"},st={class:"select-item-description"},ct={"data-testid":"no-search-results"},dt=te(e.defineComponent({__name:"VaultSecretPicker",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},setup:{type:null,required:!1,default:!1}},emits:["proceed","cancel"],setup(t,{emit:C}){var D;const{i18n:{t:c}}=le.useI18n(),i=t,u=C,{axiosInstance:a}=m.useAxios({validateStatus:b=>b===404||b>=200&&b<300,...(D=i.config)==null?void 0:D.axiosRequestConfig}),w=e.ref(!1),k=e.ref(""),_=e.ref(""),f=e.ref(""),V=e.ref(),d=e.computed(()=>{var b,y;return i.config.app==="konnect"?oe.list[i.config.app].replace(/{id}/gi,((y=(b=V.value)==null?void 0:b.config)==null?void 0:y.config_store_id)??""):"<not_applicable>"}),U=e.computed(()=>{if(R&&H)return c("vault_secret_picker.fetch_error.vaults_and_secrets");if(R)return c("vault_secret_picker.fetch_error.vaults");if(H)return c("vault_secret_picker.fetch_error.secrets")}),{debouncedQueryChange:O,loading:Z,error:R,loadItems:r,results:q}=m.useDebouncedFilter(i.config,Q.list[i.config.app].getAll,void 0,{fetchedItemsKey:"data",searchKeys:["prefix"]}),{debouncedQueryChange:X,loading:P,error:H,loadItems:W,results:g}=m.useDebouncedFilter(i.config,d,void 0,{fetchedItemsKey:"data",searchKeys:["key"],exactMatchKey:"key"}),$=e.computed(()=>{var S;let b=!1;const y=((S=q.value)==null?void 0:S.map(N=>(N.prefix===k.value&&(b=!0),{label:N.prefix,value:N.prefix,vault:N})))??[];return!b&&V.value&&y.push({label:V.value.prefix,value:V.value.prefix,vault:V.value}),y}),z=e.computed(()=>{var S;let b=!1;const y=((S=g.value)==null?void 0:S.map(N=>(N.key===_.value&&(b=!0),{label:N.key,value:N.key})))??[];return!b&&_.value&&y.push({label:_.value,value:_.value}),y}),L=e.computed(()=>{var b;return((b=V==null?void 0:V.value)==null?void 0:b.name)==="konnect"}),Y=e.computed(()=>!!V.value&&!!_.value),j=b=>b.label?`${b.label} - (${b.vault.name} - ${b.vault.id})`:b.value,M=b=>{var S,N;let y=`${i.config.apiBaseUrl}${Q.form[i.config.app].edit}`;return i.config.app==="konnect"?y=y.replace(/{controlPlaneId}/gi,((S=i.config)==null?void 0:S.controlPlaneId)||""):i.config.app==="kongManager"&&(y=y.replace(/\/{workspace}/gi,(N=i.config)!=null&&N.workspace?`/${i.config.workspace}`:"")),y.replace(/{id}/gi,b)},x=(b,y)=>{var S;return i.config.app!=="konnect"?"<not_applicable>":`${i.config.apiBaseUrl}${oe.form[i.config.app].edit}`.replace(/{controlPlaneId}/gi,((S=i.config)==null?void 0:S.controlPlaneId)||"").replace(/{id}/gi,y).replace(/{secretId}/gi,b)},B=()=>{u("proceed",tt({vaultPrefix:k.value,secretId:_.value||void 0,optionalSecretKey:f.value||void 0}))};return e.watch(()=>i.setup,async b=>{if(b!==!1){if(w.value=!0,k.value="",V.value=void 0,_.value="",f.value="",typeof b=="string"&&b.trim().length>0)try{let y,S="",N="",F="";const K=et(b),{data:v}=await a.get(M(K.vaultPrefix));if(v!=null&&v.name)if(y=v,S=K.vaultPrefix,y.name==="konnect"){if(K.secretId){const{data:re}=await a.get(x(K.secretId,v.config.config_store_id));re.key===K.secretId&&(N=K.secretId,F=K.optionalSecretKey??"")}}else N=K.secretId??"",F=K.optionalSecretKey??"";await e.nextTick(()=>{k.value=S,V.value=y,_.value=N,f.value=F})}catch(y){console.debug(y)}w.value=!1,await r()}},{immediate:!0}),e.watch(k,async(b,y)=>{var S;w.value||b===y||(V.value=(S=$.value.find(N=>N.value===b))==null?void 0:S.vault,_.value="",f.value="")}),e.watch(d,async()=>{L.value&&await W()},{immediate:!0}),(b,y)=>{const S=e.resolveComponent("KEmptyState"),N=e.resolveComponent("KSelect"),F=e.resolveComponent("KInput"),K=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(K,{"action-button-disabled":!Y.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:i.setup!==!1,onCancel:y[4]||(y[4]=()=>u("cancel")),onProceed:B},{default:e.withCtx(()=>[e.unref(R)||e.unref(H)?(e.openBlock(),e.createBlock(S,{key:0,"data-testid":"vault-secret-picker-fetch-error","icon-variant":"error",message:U.value},null,8,["message"])):(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(N,{modelValue:k.value,"onUpdate:modelValue":y[0]||(y[0]=v=>k.value=v),clearable:"","data-testid":"vault-secret-picker-vault-select",disabled:w.value,"enable-filtering":"","filter-function":()=>!0,items:$.value,"kpop-attributes":{"data-testid":"vault-secret-picker-vault-popover"},label:e.unref(c)("vault_secret_picker.vault.label"),loading:e.unref(Z),placeholder:e.unref(c)("vault_secret_picker.vault.placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(O)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",lt,e.toDisplayString(e.unref(c)("vault_secret_picker.no_results")),1)]),"selected-item-template":e.withCtx(({item:v})=>[e.createElementVNode("span",at,e.toDisplayString(j(v)),1)]),"item-template":e.withCtx(({item:v})=>[e.createElementVNode("div",rt,[e.createElementVNode("span",nt,e.toDisplayString(v.label),1),e.createElementVNode("span",it,e.toDisplayString(v.vault.name),1),e.createElementVNode("span",st,e.toDisplayString(v.vault.id),1)])]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"]),L.value?(e.openBlock(),e.createBlock(N,{key:0,modelValue:_.value,"onUpdate:modelValue":y[1]||(y[1]=v=>_.value=v),clearable:"","data-testid":"vault-secret-picker-secret-id-select",disabled:w.value||!V.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(P),placeholder:e.unref(c)("vault_secret_picker.secret_id.select_placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(X)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",ct,e.toDisplayString(e.unref(c)("vault_secret_picker.no_results")),1)]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"])):(e.openBlock(),e.createBlock(F,{key:1,modelValue:_.value,"onUpdate:modelValue":y[2]||(y[2]=v=>_.value=v),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-id-input",disabled:w.value||!V.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(F,{modelValue:f.value,"onUpdate:modelValue":y[3]||(y[3]=v=>f.value=v),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-key-input",disabled:w.value||!V.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"]]);A.SecretForm=Qe,A.SecretList=Ge,A.VaultAuthMethods=T,A.VaultConfigCard=We,A.VaultForm=Oe,A.VaultList=xe,A.VaultProviders=o,A.VaultSecretPicker=dt,A.VaultSecretPickerProvider=Ye,A.secretsEndpoints=oe,A.vaultsEndpoints=Q,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
1
+ (function(A,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):(A=typeof globalThis<"u"?globalThis:A||self,e(A["kong-ui-public-entities-vaults"]={},A.Vue,A.VueRouter,A.KongIcons,A["kong-ui-public-entities-shared"],A["kong-ui-public-i18n"]))})(this,function(A,e,ie,G,m,de){"use strict";const ge={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"}}},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"}},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 ye(){const t=de.createI18n("en-us",ge);return{i18n:t,i18nT:de.i18nTComponent(t)}}const le={useI18n:ye},se="/v2/control-planes/{controlPlaneId}/core-entities",fe="/v2/control-planes/{controlPlaneId}/config-stores",ce="/{workspace}",Q={list:{konnect:{getAll:`${se}/vaults`,deleteConfigStore:`${fe}/{id}?force=true`},kongManager:{getAll:`${ce}/vaults`}},form:{konnect:{create:`${se}/vaults`,createConfigStore:fe,edit:`${se}/vaults/{id}`},kongManager:{create:`${ce}/vaults`,edit:`${ce}/vaults/{id}`}}},be="#00abd2",_e="24px",he={class:"kong-ui-entities-vaults-list"},Ve={class:"button-row"},ke={class:"empty-state-icon-gateway"},Ce={class:"table-content-overflow-wrapper"},we={class:"table-content-overflow-wrapper"},Ee=e.defineComponent({__name:"VaultList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.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(t,{emit:C}){var re;const c=C,i=t,{i18n:{t:u}}=le.useI18n(),a=ie.useRouter(),{axiosInstance:w}=m.useAxios((re=i.config)==null?void 0:re.axiosRequestConfig),{hasRecords:k,handleStateChange:_}=m.useTableState(()=>R.value),f=e.computed(()=>k.value&&i.config.app==="konnect"),V=e.computed(()=>!i.enableV2EmptyStates&&i.config.app==="konnect"),d=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),U={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}},O=U,Z=e.computed(()=>{var n,l;let h=`${i.config.apiBaseUrl}${Q.list[i.config.app].getAll}`;return i.config.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,((n=i.config)==null?void 0:n.controlPlaneId)||""):i.config.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,(l=i.config)!=null&&l.workspace?`/${i.config.workspace}`:"")),h}),R=e.ref(""),r=e.computed(()=>{if(i.config.app==="konnect"||i.config.isExactMatch)return{isExactMatch:!0,placeholder:u("search.placeholder_for_vaults.konnect")};const{prefix:n,name:l}=U;return{isExactMatch:!1,fields:{name:l,prefix:n},schema:i.config.filterSchema}}),{fetcher:q,fetcherState:X,fetcherCacheKey:P}=m.useFetcher({...i.config,cacheIdentifier:i.cacheIdentifier},Z.value),H=()=>{R.value=""},W=()=>{P.value++},g=e.ref(null),$=(h,n)=>{const l=h.id;if(!n(l)){c("copy:error",{entity:h,field:"id",message:u("errors.copy")});return}c("copy:success",{entity:h,field:"id",message:u("copy.success",{val:l})})},z=(h,n)=>{const l=JSON.stringify(h);if(!n(l)){c("copy:error",{entity:h,message:u("errors.copy")});return}c("copy:success",{entity:h,message:u("copy.success_brief")})},L=async h=>{var l;await((l=i.canRetrieve)==null?void 0:l.call(i,h))&&a.push(i.config.getViewRoute(h.id))},Y=h=>({label:u("actions.view"),to:i.config.getViewRoute(h)}),j=h=>({label:u("actions.edit"),to:i.config.getEditRoute(h)}),M=e.ref(void 0),x=e.ref(!1),B=e.ref(!1),D=e.ref(""),b=m.useDeleteUrlBuilder(i.config,Z.value),y=h=>{M.value=h,x.value=!0},S=()=>{x.value=!1},N=async h=>{const{apiBaseUrl:n,app:l,controlPlaneId:E}=i.config,I=`${n}${Q.list[l].deleteConfigStore}`.replace(/{controlPlaneId}/gi,E||"").replace(/{id}/gi,h);try{await w.delete(I)}catch{}},F=async()=>{var h,n,l,E;if((h=M.value)!=null&&h.id){B.value=!0;try{await w.delete(b(M.value.id)),i.config.app==="konnect"&&((n=M.value.config)!=null&&n.config_store_id)&&N(M.value.config.config_store_id),B.value=!1,x.value=!1,P.value++,c("delete:success",M.value)}catch(I){D.value=((E=(l=I.response)==null?void 0:l.data)==null?void 0:E.message)||I.message||u("errors.delete"),c("error",I)}finally{B.value=!1}}},K=()=>{a.push(i.config.createRoute)};e.watch(X,h=>{var n,l,E;if(h.status===m.FetcherStatus.Error){g.value={title:u("errors.general")},(E=(l=(n=h.error)==null?void 0:n.response)==null?void 0:l.data)!=null&&E.message&&(g.value.message=h.error.response.data.message),c("error",h.error);return}g.value=null});const v=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${u("vaults.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:u("vaults.title")});return e.onBeforeMount(async()=>{await i.canCreate()&&(v.value.title=u("vaults.list.empty_state.title"),v.value.ctaText=u("actions.create"))}),(h,n)=>{const l=e.resolveComponent("KButton"),E=e.resolveComponent("KDropdownItem"),I=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",he,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":d.value,"empty-state-options":v.value,"enable-entity-actions":"","error-message":g.value,fetcher:e.unref(q),"fetcher-cache-key":e.unref(P),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-vaults-list",query:R.value,"table-headers":e.unref(O),onClearSearchInput:H,"onClick:row":n[4]||(n[4]=p=>L(p)),onSort:W,onState:e.unref(_)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(m.EntityFilter),{modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=p=>R.value=p),config:r.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ve,[f.value?(e.openBlock(),e.createBlock(l,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:n[1]||(n[1]=p=>h.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(G.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(l,{appearance:"primary","data-testid":"toolbar-add-vault",size:t.useActionOutside?"medium":"large",to:t.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:p})=>[e.createElementVNode("div",Ce,[e.createElementVNode("b",null,e.toDisplayString(p??"-"),1)])]),name:e.withCtx(({rowValue:p})=>[e.createElementVNode("b",null,e.toDisplayString(p??"-"),1)]),description:e.withCtx(({rowValue:p})=>[e.createElementVNode("div",we,e.toDisplayString(p??"-"),1)]),tags:e.withCtx(({rowValue:p})=>[e.createVNode(e.unref(m.TableTags),{tags:p},null,8,["tags"])]),actions:e.withCtx(({row:p})=>[e.createVNode(I,null,{default:e.withCtx(({copyToClipboard:J})=>[e.createVNode(E,{"data-testid":"action-entity-copy-id",onClick:ee=>$(p,J)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(I,null,{default:e.withCtx(({copyToClipboard:J})=>[e.createVNode(E,{"data-testid":"action-entity-copy-json",onClick:ee=>z(p,J)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(p)},{default:e.withCtx(()=>[e.createVNode(E,{"data-testid":"action-entity-view","has-divider":"",item:Y(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canEdit(p)},{default:e.withCtx(()=>[e.createVNode(E,{"data-testid":"action-entity-edit",item:j(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canDelete(p)},{default:e.withCtx(()=>[e.createVNode(E,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:J=>y(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(k)&&V.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(l,{appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:n[2]||(n[2]=p=>h.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(G.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!R.value&&t.enableV2EmptyStates&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var p;return[e.createVNode(e.unref(m.EntityEmptyState),{"action-button-text":e.unref(u)("vaults.list.toolbar_actions.new_vault"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"vaults-entity-empty-state",description:e.unref(u)("vaults.list.empty_state_v2.description"),"learn-more":t.config.app==="konnect",title:e.unref(u)("vaults.list.empty_state_v2.title"),"onClick:create":K,"onClick:learnMore":n[3]||(n[3]=J=>h.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",ke,[e.createVNode(e.unref(G.SecurityIcon),{color:e.unref(be),size:e.unref(_e)},null,8,["color","size"])])]),_:2},[(p=t.config)!=null&&p.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(m.EntityDeleteModal),{"action-pending":B.value,description:e.unref(u)("delete.description"),"entity-name":M.value&&(M.value.prefix||M.value.id),"entity-type":e.unref(m.EntityTypes).Vault,error:D.value,title:e.unref(u)("delete.title"),visible:x.value,onCancel:S,onProceed:F},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),te=(t,C)=>{const c=t.__vccOpts||t;for(const[i,u]of C)c[i]=u;return c},xe=te(Ee,[["__scopeId","data-v-43bd51a6"]]);var o=(t=>(t.AWS="aws",t.GCP="gcp",t.HCV="hcv",t.ENV="env",t.AZURE="azure",t.KONNECT="konnect",t))(o||{}),T=(t=>(t.TOKEN="token",t.K8S="kubernetes",t.APP_ROLE="approle",t))(T||{});const Ne={class:"kong-ui-entities-vault-form"},ve={class:"vault-form-provider-cards-container"},Se=["data-testid"],Ie={class:"provider-item-title-container"},Ae={class:"provider-item-title"},Te={class:"provider-item-description"},Re={key:"kong-vault-config-fields",class:"vault-form-config-fields-container"},$e={key:0,class:"vault-form-config-auth-method-container"},Ue={key:1,class:"vault-form-config-auth-method-container"},Pe={key:2,class:"vault-form-config-auth-method-container"},Be={key:5},Ke={class:"wrapper"},Me={class:"item-50"},De={class:"item-50"},He={class:"wrapper"},Fe={class:"item-100"},Oe=te(e.defineComponent({__name:"VaultForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string"||!(t!=null&&t.cancelRoute))},vaultId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:C}){var h;const c=t,i=C,{i18nT:u,i18n:{t:a}}=le.useI18n(),w=ie.useRouter(),{axiosInstance:k}=m.useAxios((h=c.config)==null?void 0:h.axiosRequestConfig),{getMessageFromError:_}=m.useErrors(),f=e.reactive({fields:{prefix:"",description:"",tags:""},isReadonly:!1,errorMessage:""}),V=e.reactive({prefix:"",description:"",tags:""}),d=e.ref(c.config.konnectConfigStoreAvailable?o.KONNECT:o.ENV),U=e.ref(null),O=e.ref(),Z=e.computed(()=>[o.AWS,o.GCP,o.HCV,o.AZURE].includes(d.value)),R=e.computed(()=>[...c.config.konnectConfigStoreAvailable?[{label:a("form.config.konnect.label"),value:o.KONNECT}]:[],{label:a("form.config.env.label"),value:o.ENV},{label:a("form.config.aws.label"),value:o.AWS,disabled:!L.value},{label:a("form.config.gcp.label"),value:o.GCP,disabled:!L.value},{label:a("form.config.hcv.label"),value:o.HCV,disabled:!L.value},...c.config.azureVaultProviderAvailable?[{label:a("form.config.azure.label"),value:o.AZURE,disabled:!L.value}]:[]]),r=e.reactive({[o.KONNECT]:{},[o.ENV]:{prefix:""},[o.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault"},[o.GCP]:{project_id:""},[o.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},[o.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:""}}),q=e.reactive({[o.KONNECT]:{},[o.ENV]:{prefix:""},[o.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault"},[o.GCP]:{project_id:""},[o.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},[o.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:""}}),X=[{label:`${a("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`,value:"us-east-1"},{label:`${a("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`,value:"us-east-2"},{label:`${a("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`,value:"us-west-1"},{label:`${a("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`,value:"us-west-2"},{label:`${a("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`,value:"af-south-1"},{label:`${a("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`,value:"ap-east-1"},{label:`${a("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`,value:"ap-southeast-3"},{label:`${a("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`,value:"ap-south-1"},{label:`${a("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`,value:"ap-northeast-1"},{label:`${a("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`,value:"ap-northeast-2"},{label:`${a("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`,value:"ap-northeast-3"},{label:`${a("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`,value:"ap-southeast-1"},{label:`${a("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`,value:"ap-southeast-2"},{label:`${a("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`,value:"ca-central-1"},{label:`${a("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`,value:"eu-central-1"},{label:`${a("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`,value:"eu-west-1"},{label:`${a("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`,value:"eu-west-2"},{label:`${a("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`,value:"eu-west-3"},{label:`${a("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`,value:"eu-south-1"},{label:`${a("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`,value:"eu-north-1"},{label:`${a("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`,value:"me-south-1"},{label:`${a("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`,value:"sa-east-1"},{label:`${a("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`,value:"us-gov-east-1"},{label:`${a("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`,value:"us-gov-west-1"}],P=[{label:"secrets",value:"secrets"}],H=[{label:"http",value:"http"},{label:"https",value:"https"}],W=[{label:"v1",value:"v1"},{label:"v2",value:"v2"}],g=e.computed(()=>c.vaultId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),$=e.computed(()=>{var n,l;return(l=Q.form[(n=c.config)==null?void 0:n.app])==null?void 0:l.edit}),z=e.computed(()=>g.value===m.EntityBaseFormType.Edit&&c.config.app==="kongManager"),L=e.computed(()=>c.config.app==="konnect"||m.useGatewayFeatureSupported({gatewayInfo:c.config.gatewayInfo,supportedRange:{enterprise:[]}})),Y=()=>{var n;w.push(((n=c.config)==null?void 0:n.cancelRoute)||{name:"vault-list"})},j=n=>{i("loading",n)},M=n=>{i("error",n)},x=n=>{switch(n){case o.KONNECT:return G.KongIcon;case o.ENV:return G.CodeIcon;case o.AWS:return G.AwsIcon;case o.GCP:return G.GoogleCloudIcon;case o.HCV:return G.HashicorpIcon;case o.AZURE:return G.AzureIcon}},B=n=>{switch(n){case o.KONNECT:return a("form.config.konnect.description");case o.ENV:return a("form.config.env.description");case o.AWS:return a("form.config.aws.description");case o.GCP:return a("form.config.gcp.description");case o.HCV:return a("form.config.hcv.description");case o.AZURE:return a("form.config.azure.description")}},D=n=>{var I,p,J,ee,ae,s;f.fields.prefix=((I=n==null?void 0:n.item)==null?void 0:I.prefix)||(n==null?void 0:n.prefix)||"",f.fields.description=((p=n==null?void 0:n.item)==null?void 0:p.description)||(n==null?void 0:n.description)||"";const l=((J=n==null?void 0:n.item)==null?void 0:J.tags)||(n==null?void 0:n.tags)||[];f.fields.tags=(l==null?void 0:l.join(", "))||"",Object.assign(V,f.fields);const E=((ee=n==null?void 0:n.item)==null?void 0:ee.config)||(n==null?void 0:n.config)||null;E&&(Object.keys(E).length||(n==null?void 0:n.name)===o.KONNECT)?(d.value=((ae=n==null?void 0:n.item)==null?void 0:ae.name)||(n==null?void 0:n.name)||"",U.value=d.value,O.value=((s=n==null?void 0:n.config)==null?void 0:s.config_store_id)||void 0,Object.assign(r[d.value],E),Object.assign(q[d.value],E)):f.errorMessage="Error loading vault config"},b=e.computed(()=>d.value===o.HCV?!Object.keys(r[o.HCV]).filter(n=>["namespace","ttl","neg_ttl","resurrect_ttl","kube_auth_path","approle_auth_path","approle_secret_id","approle_secret_id_file"].includes(n)||r[o.HCV].auth_method!==T.K8S&&(n==="kube_role"||n==="kube_api_token_file")||r[o.HCV].auth_method!==T.TOKEN&&n==="token"||r[o.HCV].auth_method!==T.APP_ROLE&&(n==="approle_role_id"||n==="approle_response_wrapping")||r[o.HCV].auth_method===T.APP_ROLE&&n==="approle_response_wrapping"&&typeof r[d.value][n]=="boolean"?!1:!r[d.value][n]).length:d.value===o.AZURE?!Object.keys(r[o.AZURE]).filter(n=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(n)?!1:!r[d.value][n]).length:d.value===o.AWS?!Object.keys(r[o.AWS]).filter(n=>["endpoint_url","assume_role_arn","ttl","neg_ttl","resurrect_ttl","sts_endpoint_url"].includes(n)?!1:!r[d.value][n]).length:!Object.keys(r[d.value]).filter(n=>["ttl","neg_ttl","resurrect_ttl"].includes(n)?!1:!r[d.value][n]).length),y=e.computed(()=>!!f.fields.prefix&&b.value),S=e.computed(()=>JSON.stringify(f.fields)!==JSON.stringify(V)||d.value!==U.value||JSON.stringify(r[d.value])!==JSON.stringify(q[d.value])),N=e.computed(()=>{var l,E;let n=`${c.config.apiBaseUrl}${Q.form[c.config.app][g.value]}`;return c.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((l=c.config)==null?void 0:l.controlPlaneId)||""):c.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(E=c.config)!=null&&E.workspace?`/${c.config.workspace}`:"")),n=n.replace(/{id}/gi,c.vaultId),n}),F=e.computed(()=>{var ee,ae;const n={protocol:r[o.HCV].protocol,host:r[o.HCV].host,port:parseInt(r[o.HCV].port.toString()),mount:r[o.HCV].mount,kv:r[o.HCV].kv,namespace:r[o.HCV].namespace||null,auth_method:r[o.HCV].auth_method,...r[o.HCV].auth_method===T.TOKEN&&{token:r[o.HCV].token},...r[o.HCV].auth_method===T.K8S&&{kube_role:r[o.HCV].kube_role,kube_auth_path:r[o.HCV].kube_auth_path||void 0,kube_api_token_file:r[o.HCV].kube_api_token_file,token:null},...r[o.HCV].auth_method===T.APP_ROLE&&{approle_auth_path:r[o.HCV].approle_auth_path||void 0,approle_role_id:r[o.HCV].approle_role_id,approle_secret_id:r[o.HCV].approle_secret_id||void 0,approle_secret_id_file:r[o.HCV].approle_secret_id_file||void 0,approle_response_wrapping:r[o.HCV].approle_response_wrapping??!1}},l={...r[d.value],client_id:r[d.value].client_id||null,tenant_id:r[d.value].tenant_id||null},E={...r[d.value],endpoint_url:r[d.value].endpoint_url||null,assume_role_arn:r[d.value].assume_role_arn||null,...c.config.awsStsEndpointUrlAvailable?{sts_endpoint_url:r[d.value].sts_endpoint_url||null}:{}};let I=r[d.value];d.value===o.HCV?I=n:d.value===o.AZURE?I=l:d.value===o.AWS&&(I=E);let p={};if(![o.KONNECT,o.ENV].includes(d.value)){const s=r[d.value],ue=s.ttl,pe=s.neg_ttl,me=s.resurrect_ttl;p={ttl:ue?parseInt(ue.toString(),10):null,neg_ttl:pe?parseInt(pe.toString(),10):null,resurrect_ttl:me?parseInt(me.toString(),10):null}}return{prefix:f.fields.prefix,description:f.fields.description||null,tags:(ae=(ee=f.fields.tags.split(","))==null?void 0:ee.map(s=>String(s||"").trim()))==null?void 0:ae.filter(s=>s!==""),name:d.value,config:{...I,...p}}}),K=e.computed(()=>({...F.value,config:{...F.value.config,config_store_id:O.value}})),v=async()=>{var n;try{f.isReadonly=!0;const l=`${c.config.apiBaseUrl}${Q.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi,((n=c.config)==null?void 0:n.controlPlaneId)||""),E=await k.post(l);return E==null?void 0:E.data.id}catch(l){f.errorMessage=_(l),i("error",l)}finally{f.isReadonly=!1}},re=async()=>{var n;try{f.isReadonly=!0;let l;g.value==="create"?d.value===o.KONNECT?(O.value=await v(),l=await k.post(N.value,K.value)):l=await k.post(N.value,F.value):g.value==="edit"&&(d.value===o.KONNECT&&!O.value?(O.value=await v(),l=await k.put(N.value,K.value)):l=((n=c.config)==null?void 0:n.app)==="konnect"?await k.put(N.value,K.value):await k.patch(N.value,F.value)),D(l==null?void 0:l.data),i("update",l==null?void 0:l.data)}catch(l){f.errorMessage=_(l),i("error",l)}finally{f.isReadonly=!1}};return(n,l)=>{const E=e.resolveComponent("KTooltip"),I=e.resolveComponent("KSelect"),p=e.resolveComponent("KInput"),J=e.resolveComponent("KCheckbox"),ee=e.resolveComponent("KCollapse"),ae=e.resolveComponent("KTextArea");return e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(m.EntityBaseForm),{"can-submit":y.value&&S.value,config:t.config,"edit-id":t.vaultId,"entity-type":e.unref(m.SupportedEntityType).Vault,"error-message":f.errorMessage,"fetch-url":$.value,"form-fields":F.value,"is-readonly":f.isReadonly,onCancel:Y,"onFetch:error":M,"onFetch:success":D,onLoading:j,onSubmit:re},{default:e.withCtx(()=>[e.createVNode(e.unref(m.EntityFormSection),{description:e.unref(a)("form.sections.config.description"),title:e.unref(a)("form.sections.config.title")},{default:e.withCtx(()=>[e.createElementVNode("div",ve,[e.createVNode(I,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=s=>d.value=s),"data-testid":"provider-select",disabled:z.value,"dropdown-max-height":"500",items:R.value},{"selected-item-template":e.withCtx(({item:s})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(s.value)))),e.createTextVNode(" "+e.toDisplayString(s==null?void 0:s.label),1)]),"item-template":e.withCtx(({item:s})=>[e.createVNode(E,{placement:"top",text:s.disabled?e.unref(a)("form.unavailable"):""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"provider-item","data-testid":`vault-form-provider-${s.value}`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(s.value)))),e.createElementVNode("div",Ie,[e.createElementVNode("span",Ae,e.toDisplayString(s==null?void 0:s.label),1),e.createElementVNode("span",Te,e.toDisplayString(B(s.value)),1)])],8,Se)]),_:2},1032,["text"])]),_:1},8,["modelValue","disabled","items"])]),e.createVNode(e.TransitionGroup,{name:"appear"},{default:e.withCtx(()=>[d.value===e.unref(o).ENV?(e.openBlock(),e.createElementBlock("div",Re,[e.createVNode(p,{modelValue:r[e.unref(o).ENV].prefix,"onUpdate:modelValue":l[1]||(l[1]=s=>r[e.unref(o).ENV].prefix=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-kong-prefix","is-readonly":f.isReadonly,label:e.unref(a)("form.config.env.fields.prefix.label"),"label-attributes":{info:e.unref(a)("form.config.env.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(a)("form.config.env.fields.prefix.placeholder"),required:"",type:"text"},null,8,["modelValue","is-readonly","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),d.value===e.unref(o).AWS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(o).AWS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(I,{modelValue:r[e.unref(o).AWS].region,"onUpdate:modelValue":l[2]||(l[2]=s=>r[e.unref(o).AWS].region=s),"data-testid":"vault-form-config-aws-region",items:X,label:e.unref(a)("form.config.aws.fields.region.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.region.tooltip")},placeholder:e.unref(a)("form.config.aws.fields.region.placeholder"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(p,{modelValue:r[e.unref(o).AWS].endpoint_url,"onUpdate:modelValue":l[3]||(l[3]=s=>r[e.unref(o).AWS].endpoint_url=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-endpoint_url","is-readonly":f.isReadonly,label:e.unref(a)("form.config.aws.fields.endpoint_url.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},type:"text"},null,8,["modelValue","is-readonly","label","label-attributes"]),e.createVNode(p,{modelValue:r[e.unref(o).AWS].assume_role_arn,"onUpdate:modelValue":l[4]||(l[4]=s=>r[e.unref(o).AWS].assume_role_arn=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-assume_role_arn","is-readonly":f.isReadonly,label:e.unref(a)("form.config.aws.fields.assume_role_arn.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.assume_role_arn.tooltip"),tooltipAttributes:{maxWidth:"400"}},type:"text"},null,8,["modelValue","is-readonly","label","label-attributes"]),e.createVNode(p,{modelValue:r[e.unref(o).AWS].role_session_name,"onUpdate:modelValue":l[5]||(l[5]=s=>r[e.unref(o).AWS].role_session_name=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-role_session_name","is-readonly":f.isReadonly,label:e.unref(a)("form.config.aws.fields.role_session_name.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.role_session_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},required:"",type:"text"},null,8,["modelValue","is-readonly","label","label-attributes"]),t.config.awsStsEndpointUrlAvailable?(e.openBlock(),e.createBlock(p,{key:0,modelValue:r[e.unref(o).AWS].sts_endpoint_url,"onUpdate:modelValue":l[6]||(l[6]=s=>r[e.unref(o).AWS].sts_endpoint_url=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-sts_endpoint_url","is-readonly":f.isReadonly,label:e.unref(a)("form.config.aws.fields.sts_endpoint_url.label"),"label-attributes":{info:e.unref(a)("form.config.aws.fields.sts_endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},type:"text"},null,8,["modelValue","is-readonly","label","label-attributes"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),d.value===e.unref(o).GCP?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(o).GCP}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:r[e.unref(o).GCP].project_id,"onUpdate:modelValue":l[7]||(l[7]=s=>r[e.unref(o).GCP].project_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-gcp-project-id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.gcp.fields.project_id.label"),placeholder:e.unref(a)("form.config.gcp.fields.project_id.placeholder"),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(a)("form.config.gcp.fields.project_id.tooltip.italicText")),1)]),_:1})]),_:1},8,["modelValue","is-readonly","label","placeholder"])])):e.createCommentVNode("",!0),d.value===e.unref(o).HCV?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(o).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(I,{modelValue:r[e.unref(o).HCV].protocol,"onUpdate:modelValue":l[8]||(l[8]=s=>r[e.unref(o).HCV].protocol=s),"data-testid":"vault-form-config-hcv-protocol",items:H,label:e.unref(a)("form.config.hcv.fields.protocol.label"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].host,"onUpdate:modelValue":l[9]||(l[9]=s=>r[e.unref(o).HCV].host=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-host","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.host.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].port,"onUpdate:modelValue":l[10]||(l[10]=s=>r[e.unref(o).HCV].port=s),autocomplete:"off","data-testid":"vault-form-config-hcv-port","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.port.label"),min:"0",required:"",type:"number"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].mount,"onUpdate:modelValue":l[11]||(l[11]=s=>r[e.unref(o).HCV].mount=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-mount","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.mount.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(I,{modelValue:r[e.unref(o).HCV].kv,"onUpdate:modelValue":l[12]||(l[12]=s=>r[e.unref(o).HCV].kv=s),"data-testid":"vault-form-config-hcv-kv",items:W,label:e.unref(a)("form.config.hcv.fields.kv.label"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].namespace,"onUpdate:modelValue":l[13]||(l[13]=s=>r[e.unref(o).HCV].namespace=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-namespace","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.namespace.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(I,{modelValue:r[e.unref(o).HCV].auth_method,"onUpdate:modelValue":l[14]||(l[14]=s=>r[e.unref(o).HCV].auth_method=s),"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},...t.config.hcvAppRoleMethodAvailable?[{label:e.unref(T).APP_ROLE,value:e.unref(T).APP_ROLE}]:[]],label:e.unref(a)("form.config.hcv.fields.auth_method.label"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","items","label","readonly"]),r[e.unref(o).HCV].auth_method===e.unref(T).TOKEN?(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(p,{modelValue:r[e.unref(o).HCV].token,"onUpdate:modelValue":l[15]||(l[15]=s=>r[e.unref(o).HCV].token=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-token","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.token.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"])])):r[e.unref(o).HCV].auth_method===e.unref(T).K8S?(e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(p,{modelValue:r[e.unref(o).HCV].kube_role,"onUpdate:modelValue":l[16]||(l[16]=s=>r[e.unref(o).HCV].kube_role=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_role","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.kube_role.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].kube_auth_path,"onUpdate:modelValue":l[17]||(l[17]=s=>r[e.unref(o).HCV].kube_auth_path=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_auth_path","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.kube_auth_path.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].kube_api_token_file,"onUpdate:modelValue":l[18]||(l[18]=s=>r[e.unref(o).HCV].kube_api_token_file=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_api_token_file","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.kube_api_token_file.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"])])):r[e.unref(o).HCV].auth_method===e.unref(T).APP_ROLE?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(p,{modelValue:r[e.unref(o).HCV].approle_auth_path,"onUpdate:modelValue":l[19]||(l[19]=s=>r[e.unref(o).HCV].approle_auth_path=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_auth_path","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.approle_auth_path.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].approle_role_id,"onUpdate:modelValue":l[20]||(l[20]=s=>r[e.unref(o).HCV].approle_role_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_role_id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.approle_role_id.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].approle_secret_id,"onUpdate:modelValue":l[21]||(l[21]=s=>r[e.unref(o).HCV].approle_secret_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.approle_secret_id.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).HCV].approle_secret_id_file,"onUpdate:modelValue":l[22]||(l[22]=s=>r[e.unref(o).HCV].approle_secret_id_file=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id_file","is-readonly":f.isReadonly,label:e.unref(a)("form.config.hcv.fields.approle_secret_id_file.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(J,{modelValue:r[e.unref(o).HCV].approle_response_wrapping,"onUpdate:modelValue":l[23]||(l[23]=s=>r[e.unref(o).HCV].approle_response_wrapping=s),"data-testid":"vault-form-config-hcv-approle_response_wrapping",label:e.unref(a)("form.config.hcv.fields.approle_response_wrapping.label")},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),d.value===e.unref(o).AZURE?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(o).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:r[e.unref(o).AZURE].location,"onUpdate:modelValue":l[24]||(l[24]=s=>r[e.unref(o).AZURE].location=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-location","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.location.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).AZURE].vault_uri,"onUpdate:modelValue":l[25]||(l[25]=s=>r[e.unref(o).AZURE].vault_uri=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-uri","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.vault_uri.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).AZURE].credentials_prefix,"onUpdate:modelValue":l[26]||(l[26]=s=>r[e.unref(o).AZURE].credentials_prefix=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-prefix","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.credential_prefix.label"),required:"",type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(I,{modelValue:r[e.unref(o).AZURE].type,"onUpdate:modelValue":l[27]||(l[27]=s=>r[e.unref(o).AZURE].type=s),"data-testid":"vault-form-config-azure-type",items:P,label:e.unref(a)("form.config.azure.fields.type.label"),placeholder:e.unref(a)("form.config.azure.fields.type.placeholder"),readonly:f.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(p,{modelValue:r[e.unref(o).AZURE].client_id,"onUpdate:modelValue":l[28]||(l[28]=s=>r[e.unref(o).AZURE].client_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-client-id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.client_id.label"),type:"text"},null,8,["modelValue","is-readonly","label"]),e.createVNode(p,{modelValue:r[e.unref(o).AZURE].tenant_id,"onUpdate:modelValue":l[29]||(l[29]=s=>r[e.unref(o).AZURE].tenant_id=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-tenant-id","is-readonly":f.isReadonly,label:e.unref(a)("form.config.azure.fields.tenant_id.label"),type:"text"},null,8,["modelValue","is-readonly","label"])])):e.createCommentVNode("",!0),t.config.ttl?(e.openBlock(),e.createElementBlock("div",Be,[Z.value?(e.openBlock(),e.createBlock(ee,{key:0,class:"advanced-fields-collapse","data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(a)("form.config.advancedFields.title")},{default:e.withCtx(()=>[e.createElementVNode("div",Ke,[e.createElementVNode("div",Me,[e.createVNode(p,{modelValue:r[d.value].ttl,"onUpdate:modelValue":l[30]||(l[30]=s=>r[d.value].ttl=s),"data-testid":"vault-ttl-input",label:e.unref(a)("form.config.advancedFields.ttl"),"label-attributes":{info:e.unref(a)("form.config.advancedFields.ttlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])]),e.createElementVNode("div",De,[e.createVNode(p,{modelValue:r[d.value].neg_ttl,"onUpdate:modelValue":l[31]||(l[31]=s=>r[d.value].neg_ttl=s),"data-testid":"vault-neg-ttl-input",label:e.unref(a)("form.config.advancedFields.negTtl"),"label-attributes":{info:e.unref(a)("form.config.advancedFields.negTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])]),e.createElementVNode("div",He,[e.createElementVNode("div",Fe,[e.createVNode(p,{modelValue:r[d.value].resurrect_ttl,"onUpdate:modelValue":l[32]||(l[32]=s=>r[d.value].resurrect_ttl=s),"data-testid":"vault-resurrect-ttl-input",label:e.unref(a)("form.config.advancedFields.resurrectTtl"),"label-attributes":{info:e.unref(a)("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(m.EntityFormSection),{description:e.unref(a)("form.sections.general.description"),title:e.unref(a)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:f.fields.prefix,"onUpdate:modelValue":l[33]||(l[33]=s=>f.fields.prefix=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-prefix",help:e.unref(a)("form.fields.prefix.help"),"is-readonly":f.isReadonly,label:e.unref(a)("form.fields.prefix.label"),"label-attributes":{info:e.unref(a)("form.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(a)("form.fields.prefix.placeholder"),required:"",type:"text"},null,8,["modelValue","help","is-readonly","label","label-attributes","placeholder"]),e.createVNode(ae,{modelValue:f.fields.description,"onUpdate:modelValue":l[34]||(l[34]=s=>f.fields.description=s),modelModifiers:{trim:!0},"character-limit":1e3,class:"vault-form-textarea","data-testid":"vault-form-description",label:e.unref(a)("form.fields.description.label"),placeholder:e.unref(a)("form.fields.description.placeholder"),readonly:f.isReadonly},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(p,{modelValue:f.fields.tags,"onUpdate:modelValue":l[35]||(l[35]=s=>f.fields.tags=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-tags",help:e.unref(a)("form.fields.tags.help"),"is-readonly":f.isReadonly,label:e.unref(a)("form.fields.tags.label"),placeholder:e.unref(a)("form.fields.tags.placeholder"),type:"text"},null,8,["modelValue","help","is-readonly","label","placeholder"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-b24af18b"]]),qe={class:"kong-ui-vault-entity-config-card"},We=e.defineComponent({__name:"VaultConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const C=t,c=e.computed(()=>{var a,w;return(w=Q.form[(a=C.config)==null?void 0:a.app])==null?void 0:w.edit}),{i18n:{t:i}}=le.useI18n(),u=e.ref({id:{},name:{label:i("labels.vault_type")},updated_at:{},created_at:{},prefix:{order:5,section:m.ConfigurationSchemaSection.Basic},description:{order:6,section:m.ConfigurationSchemaSection.Basic},tags:{order:7},config:{order:8,type:m.ConfigurationSchemaType.Json}});return(a,w)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(e.unref(m.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":u.value,"entity-type":e.unref(m.SupportedEntityType).Vault,"fetch-url":c.value,"hide-title":t.hideTitle,"onFetch:error":w[0]||(w[0]=k=>a.$emit("fetch:error",k)),"onFetch:success":w[1]||(w[1]=k=>a.$emit("fetch:success",k)),onLoading:w[2]||(w[2]=k=>a.$emit("loading",k))},null,8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),ne="/v2/control-planes/{controlPlaneId}",oe={getVault:{konnect:`${ne}/core-entities/vaults/{id}`},list:{konnect:`${ne}/config-stores/{id}/secrets`},form:{konnect:{create:`${ne}/config-stores/{id}/secrets`,edit:`${ne}/config-stores/{id}/secrets/{secretId}`}}},Le={class:"table-content-overflow-wrapper"},je=te(e.defineComponent({inheritAttrs:!1,__name:"SecretListInner",props:{config:{type:Object,required:!0,validator:t=>!(!t||(t==null?void 0:t.app)!=="konnect"||!t.createRoute||!t.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(t,{emit:C}){var M;const c=C,i=t,{i18n:{t:u,formatUnixTimeStamp:a}}=le.useI18n(),{axiosInstance:w}=m.useAxios((M=i.config)==null?void 0:M.axiosRequestConfig),_={key:{label:u("secrets.list.table_headers.key"),sortable:!1,hidable:!1},updated_at:{label:u("secrets.list.table_headers.updated_at"),sortable:!1}},f=x=>({"data-testid":x.key}),V=e.computed(()=>{var x;return`${i.config.apiBaseUrl}${oe.list[i.config.app]}`.replace(/{controlPlaneId}/gi,((x=i.config)==null?void 0:x.controlPlaneId)||"").replace(/{id}/gi,i.configStoreId||"")}),d=e.ref(""),U={isExactMatch:!0,placeholder:u("search.placeholder_for_secrets.konnect")},{fetcher:O,fetcherState:Z,fetcherCacheKey:R}=m.useFetcher({...i.config,cacheIdentifier:i.cacheIdentifier},V.value),r=()=>{d.value=""},q=e.ref(null),X=x=>({label:u("actions.edit"),to:i.config.getEditRoute(x)}),P=e.ref(void 0),H=e.ref(!1),W=e.ref(!1),g=e.ref(""),$=m.useDeleteUrlBuilder(i.config,V.value),z=x=>{P.value=x,H.value=!0},L=()=>{H.value=!1},Y=async()=>{var x,B,D;if((x=P.value)!=null&&x.key){W.value=!0;try{await w.delete($(P.value.key)),W.value=!1,H.value=!1,R.value++,c("delete:success",P.value)}catch(b){g.value=((D=(B=b.response)==null?void 0:B.data)==null?void 0:D.message)||b.message||u("errors.delete"),c("error",b)}finally{W.value=!1}}};e.watch(Z,x=>{var B,D,b;if(x.status===m.FetcherStatus.Error){q.value={title:u("errors.general")},(b=(D=(B=x.error)==null?void 0:B.response)==null?void 0:D.data)!=null&&b.message&&(q.value.message=x.error.response.data.message),c("error",x.error);return}q.value=null});const j=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${u("secrets.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:u("secrets.title")});return e.onBeforeMount(async()=>{await i.canCreate()&&(j.value.title=u("secrets.list.empty_state.title"),j.value.ctaText=u("secrets.list.toolbar_actions.new_secret"))}),(x,B)=>{const D=e.resolveComponent("KButton"),b=e.resolveComponent("KDropdownItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":"","empty-state-options":j.value,"enable-entity-actions":"","error-message":q.value,fetcher:e.unref(O),"fetcher-cache-key":e.unref(R),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-secrets-list",query:d.value,"row-attributes":f,"table-headers":e.unref(_),onClearSearchInput:r},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(m.EntityFilter),{modelValue:d.value,"onUpdate:modelValue":B[0]||(B[0]=y=>d.value=y),config:U},null,8,["modelValue"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(D,{appearance:"primary","data-testid":"toolbar-add-secret",size:"large",to:t.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:y})=>[e.createElementVNode("div",Le,[e.createElementVNode("b",null,e.toDisplayString(y??"-"),1)])]),updated_at:e.withCtx(({rowValue:y})=>[e.createElementVNode("span",null,e.toDisplayString(y?e.unref(a)(new Date(y).getTime()/1e3):"-"),1)]),actions:e.withCtx(({row:y})=>[e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canEdit(y)},{default:e.withCtx(()=>[e.createVNode(b,{"data-testid":"action-entity-edit",item:X(y.key)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>t.canDelete(y)},{default:e.withCtx(()=>[e.createVNode(b,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:S=>z(y)},{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(m.EntityDeleteModal),{"action-pending":W.value,description:e.unref(u)("delete.description"),"entity-name":P.value&&P.value.key,"entity-type":e.unref(m.EntityTypes).Secret,error:g.value,title:e.unref(u)("delete.title_for_secret"),visible:H.value,onCancel:L,onProceed:Y},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])],64)}}}),[["__scopeId","data-v-074727f7"]]),ze={class:"kong-ui-entities-secrets-list"},Ge=te(e.defineComponent({__name:"SecretList",props:{config:{type:Object,required:!0,validator:t=>!(!t||(t==null?void 0:t.app)!=="konnect"||!t.createRoute||!t.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(t,{emit:C}){var f;const c=C,i=t,u=V=>{c("error",V)},a=V=>{c("delete:success",V)},{axiosInstance:w}=m.useAxios((f=i.config)==null?void 0:f.axiosRequestConfig),k=e.ref(""),_=e.computed(()=>{var V;return`${i.config.apiBaseUrl}${oe.getVault[i.config.app]}`.replace(/{controlPlaneId}/gi,((V=i.config)==null?void 0:V.controlPlaneId)||"").replace(/{id}/gi,i.vaultId)});return e.onBeforeMount(async()=>{var V;try{const{data:d}=await w.get(_.value);k.value=(V=d==null?void 0:d.config)==null?void 0:V.config_store_id}catch(d){c("error",d)}}),(V,d)=>(e.openBlock(),e.createElementBlock("div",ze,[k.value?(e.openBlock(),e.createBlock(je,e.mergeProps({key:0},i,{"config-store-id":k.value,"onDelete:success":a,onError:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0f9047e6"]]),Ze=te(e.defineComponent({inheritAttrs:!1,__name:"SecretFormInner",props:{config:{type:Object,required:!0,validator:t=>!(!t||t.app!=="konnect"||!t.controlPlaneId||!t.cancelRoute)},configStoreId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:C}){var W;const c=t,i=C,{i18n:{t:u}}=le.useI18n(),a=ie.useRouter(),{axiosInstance:w}=m.useAxios((W=c.config)==null?void 0:W.axiosRequestConfig),{getMessageFromError:k}=m.useErrors(),_=e.reactive({fields:{key:"",value:""},readonly:!1,errorMessage:""}),f=e.reactive({key:"",value:""}),V=e.computed(()=>{var g,$;return($=oe.form[(g=c.config)==null?void 0:g.app])==null?void 0:$.edit.replace(/{id}/gi,c.configStoreId).replace(/{secretId}/gi,c.secretId)}),d=()=>{var g;a.push(((g=c.config)==null?void 0:g.cancelRoute)||{name:"secret-list"})},U=g=>{i("loading",g)},O=g=>{i("error",g)},Z=g=>{var $,z;_.fields.key=(($=g==null?void 0:g.item)==null?void 0:$.key)||(g==null?void 0:g.key)||"",_.fields.value=((z=g==null?void 0:g.item)==null?void 0:z.value)||(g==null?void 0:g.value)||"",Object.assign(f,_.fields)},R=e.computed(()=>c.secretId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),r=e.computed(()=>{var g;return`${c.config.apiBaseUrl}${oe.form[c.config.app][R.value]}`.replace(/{controlPlaneId}/gi,((g=c.config)==null?void 0:g.controlPlaneId)||"").replace(/{id}/gi,c.configStoreId).replace(/{secretId}/gi,c.secretId)}),q=e.computed(()=>!!_.fields.key&&!!_.fields.value),X=e.computed(()=>JSON.stringify(_.fields)!==JSON.stringify(f)),P=e.computed(()=>({key:_.fields.key,value:_.fields.value})),H=async()=>{try{_.readonly=!0;let g;R.value==="create"?g=await w.post(r.value,P.value):R.value==="edit"&&(g=await w.put(r.value,P.value)),Z(g==null?void 0:g.data),i("update",g==null?void 0:g.data)}catch(g){_.errorMessage=k(g),i("error",g)}finally{_.readonly=!1}};return(g,$)=>{const z=e.resolveComponent("KInput"),L=e.resolveComponent("KTextArea"),Y=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(e.unref(m.EntityBaseForm),{"can-submit":q.value&&X.value,config:t.config,"edit-id":t.secretId,"entity-type":e.unref(m.SupportedEntityType).Other,"error-message":_.errorMessage,"fetch-url":V.value,"form-fields":P.value,"is-readonly":_.readonly,onCancel:d,"onFetch:error":O,"onFetch:success":Z,onLoading:U,onSubmit:H},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(m.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:_.fields.key,"onUpdate:modelValue":$[0]||($[0]=j=>_.fields.key=j),modelModifiers:{trim:!0},autocomplete:"off",class:"key-field","data-testid":"secret-form-key",disabled:R.value===e.unref(m.EntityBaseFormType).Edit,label:e.unref(u)("secrets.form.fields.key.label"),placeholder:e.unref(u)("secrets.form.fields.key.placeholder"),readonly:_.readonly,required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(L,{modelValue:_.fields.value,"onUpdate:modelValue":$[1]||($[1]=j=>_.fields.value=j),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:_.readonly,required:"",resizable:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(Y,{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-eb9c7fc4"]]),Je={class:"kong-ui-entities-secret-form"},Qe=te(e.defineComponent({__name:"SecretForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||t.app!=="konnect"||!t.controlPlaneId||!t.cancelRoute)},vaultId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:C}){var V;const c=t,i=C,u=d=>{i("update",d)},a=d=>{i("error",d)},w=d=>{i("loading",d)},{axiosInstance:k}=m.useAxios((V=c.config)==null?void 0:V.axiosRequestConfig),_=e.ref(""),f=e.computed(()=>{var d;return`${c.config.apiBaseUrl}${oe.getVault[c.config.app]}`.replace(/{controlPlaneId}/gi,((d=c.config)==null?void 0:d.controlPlaneId)||"").replace(/{id}/gi,c.vaultId)});return e.onBeforeMount(async()=>{var d;try{const{data:U}=await k.get(f.value);_.value=(d=U==null?void 0:U.config)==null?void 0:d.config_store_id}catch(U){i("error",U)}}),(d,U)=>(e.openBlock(),e.createElementBlock("div",Je,[_.value?(e.openBlock(),e.createBlock(Ze,e.mergeProps({key:0},c,{"config-store-id":_.value,onError:a,onLoading:w,onUpdate:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-02e6d2f3"]]),Xe={class:"vault-secret-picker-provider"},Ye=te(e.defineComponent({__name:"VaultSecretPickerProvider",props:{value:{},disabled:{type:Boolean},update:{type:Function}},emits:["open"],setup(t,{emit:C}){const c=t,i=C,{i18n:{t:u},i18nT:a}=le.useI18n();return(w,k)=>(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(e.unref(a),{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:k[0]||(k[0]=()=>!c.disabled&&i("open",c.value,c.update))},e.toDisplayString(e.unref(u)("vault_secret_picker.provider.cta")),3)]),_:1})]))}}),[["__scopeId","data-v-66a1e406"]]),et=t=>{let C=t.trim();if(!C.startsWith("{")||!C.endsWith("}"))throw new Error("Invalid secret reference: must be enclosed in curly braces");if(C=C.substring(1,C.length-1).trim(),!C.startsWith("vault://"))throw new Error("Invalid secret reference: must start with vault://");const c=new URL(`http://${C.substring(8)}`);if(!c)throw new Error("Invalid secret reference: must have a vault prefix");const i=c.host,[,u,...a]=c.pathname.split("/");if(!i)throw new Error("Invalid secret reference: must have a vault prefix");return{vaultPrefix:i,secretId:u||void 0,optionalSecretKey:a==null?void 0:a.join("/")}},tt=t=>{if(!t.vaultPrefix)throw new Error("Invalid secret reference: must have a vault prefix");let C=`vault://${t.vaultPrefix}`;return t.secretId&&(C=`${C}/${t.secretId}`),t.optionalSecretKey&&(C=`${C}/${t.optionalSecretKey}`),`{${C}}`},ot={key:1,class:"inputs-wrapper"},lt={"data-testid":"no-search-results"},at={class:"k-select-selected-item-label"},rt={class:"vault-secret-picker-vault-dropdown-item"},nt={class:"select-item-label"},it={class:"select-item-description"},st={class:"select-item-description"},ct={"data-testid":"no-search-results"},dt=te(e.defineComponent({__name:"VaultSecretPicker",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},setup:{type:null,required:!1,default:!1}},emits:["proceed","cancel"],setup(t,{emit:C}){var D;const{i18n:{t:c}}=le.useI18n(),i=t,u=C,{axiosInstance:a}=m.useAxios({validateStatus:b=>b===404||b>=200&&b<300,...(D=i.config)==null?void 0:D.axiosRequestConfig}),w=e.ref(!1),k=e.ref(""),_=e.ref(""),f=e.ref(""),V=e.ref(),d=e.computed(()=>{var b,y;return i.config.app==="konnect"?oe.list[i.config.app].replace(/{id}/gi,((y=(b=V.value)==null?void 0:b.config)==null?void 0:y.config_store_id)??""):"<not_applicable>"}),U=e.computed(()=>{if(R&&H)return c("vault_secret_picker.fetch_error.vaults_and_secrets");if(R)return c("vault_secret_picker.fetch_error.vaults");if(H)return c("vault_secret_picker.fetch_error.secrets")}),{debouncedQueryChange:O,loading:Z,error:R,loadItems:r,results:q}=m.useDebouncedFilter(i.config,Q.list[i.config.app].getAll,void 0,{fetchedItemsKey:"data",searchKeys:["prefix"]}),{debouncedQueryChange:X,loading:P,error:H,loadItems:W,results:g}=m.useDebouncedFilter(i.config,d,void 0,{fetchedItemsKey:"data",searchKeys:["key"],exactMatchKey:"key"}),$=e.computed(()=>{var S;let b=!1;const y=((S=q.value)==null?void 0:S.map(N=>(N.prefix===k.value&&(b=!0),{label:N.prefix,value:N.prefix,vault:N})))??[];return!b&&V.value&&y.push({label:V.value.prefix,value:V.value.prefix,vault:V.value}),y}),z=e.computed(()=>{var S;let b=!1;const y=((S=g.value)==null?void 0:S.map(N=>(N.key===_.value&&(b=!0),{label:N.key,value:N.key})))??[];return!b&&_.value&&y.push({label:_.value,value:_.value}),y}),L=e.computed(()=>{var b;return((b=V==null?void 0:V.value)==null?void 0:b.name)==="konnect"}),Y=e.computed(()=>!!V.value&&!!_.value),j=b=>b.label?`${b.label} - (${b.vault.name} - ${b.vault.id})`:b.value,M=b=>{var S,N;let y=`${i.config.apiBaseUrl}${Q.form[i.config.app].edit}`;return i.config.app==="konnect"?y=y.replace(/{controlPlaneId}/gi,((S=i.config)==null?void 0:S.controlPlaneId)||""):i.config.app==="kongManager"&&(y=y.replace(/\/{workspace}/gi,(N=i.config)!=null&&N.workspace?`/${i.config.workspace}`:"")),y.replace(/{id}/gi,b)},x=(b,y)=>{var S;return i.config.app!=="konnect"?"<not_applicable>":`${i.config.apiBaseUrl}${oe.form[i.config.app].edit}`.replace(/{controlPlaneId}/gi,((S=i.config)==null?void 0:S.controlPlaneId)||"").replace(/{id}/gi,y).replace(/{secretId}/gi,b)},B=()=>{u("proceed",tt({vaultPrefix:k.value,secretId:_.value||void 0,optionalSecretKey:f.value||void 0}))};return e.watch(()=>i.setup,async b=>{if(b!==!1){if(w.value=!0,k.value="",V.value=void 0,_.value="",f.value="",typeof b=="string"&&b.trim().length>0)try{let y,S="",N="",F="";const K=et(b),{data:v}=await a.get(M(K.vaultPrefix));if(v!=null&&v.name)if(y=v,S=K.vaultPrefix,y.name==="konnect"){if(K.secretId){const{data:re}=await a.get(x(K.secretId,v.config.config_store_id));re.key===K.secretId&&(N=K.secretId,F=K.optionalSecretKey??"")}}else N=K.secretId??"",F=K.optionalSecretKey??"";await e.nextTick(()=>{k.value=S,V.value=y,_.value=N,f.value=F})}catch(y){console.debug(y)}w.value=!1,await r()}},{immediate:!0}),e.watch(k,async(b,y)=>{var S;w.value||b===y||(V.value=(S=$.value.find(N=>N.value===b))==null?void 0:S.vault,_.value="",f.value="")}),e.watch(d,async()=>{L.value&&await W()},{immediate:!0}),(b,y)=>{const S=e.resolveComponent("KEmptyState"),N=e.resolveComponent("KSelect"),F=e.resolveComponent("KInput"),K=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(K,{"action-button-disabled":!Y.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:i.setup!==!1,onCancel:y[4]||(y[4]=()=>u("cancel")),onProceed:B},{default:e.withCtx(()=>[e.unref(R)||e.unref(H)?(e.openBlock(),e.createBlock(S,{key:0,"data-testid":"vault-secret-picker-fetch-error","icon-variant":"error",message:U.value},null,8,["message"])):(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(N,{modelValue:k.value,"onUpdate:modelValue":y[0]||(y[0]=v=>k.value=v),clearable:"","data-testid":"vault-secret-picker-vault-select",disabled:w.value,"enable-filtering":"","filter-function":()=>!0,items:$.value,"kpop-attributes":{"data-testid":"vault-secret-picker-vault-popover"},label:e.unref(c)("vault_secret_picker.vault.label"),loading:e.unref(Z),placeholder:e.unref(c)("vault_secret_picker.vault.placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(O)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",lt,e.toDisplayString(e.unref(c)("vault_secret_picker.no_results")),1)]),"selected-item-template":e.withCtx(({item:v})=>[e.createElementVNode("span",at,e.toDisplayString(j(v)),1)]),"item-template":e.withCtx(({item:v})=>[e.createElementVNode("div",rt,[e.createElementVNode("span",nt,e.toDisplayString(v.label),1),e.createElementVNode("span",it,e.toDisplayString(v.vault.name),1),e.createElementVNode("span",st,e.toDisplayString(v.vault.id),1)])]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"]),L.value?(e.openBlock(),e.createBlock(N,{key:0,modelValue:_.value,"onUpdate:modelValue":y[1]||(y[1]=v=>_.value=v),clearable:"","data-testid":"vault-secret-picker-secret-id-select",disabled:w.value||!V.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(P),placeholder:e.unref(c)("vault_secret_picker.secret_id.select_placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(X)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(c)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",ct,e.toDisplayString(e.unref(c)("vault_secret_picker.no_results")),1)]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"])):(e.openBlock(),e.createBlock(F,{key:1,modelValue:_.value,"onUpdate:modelValue":y[2]||(y[2]=v=>_.value=v),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-id-input",disabled:w.value||!V.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(F,{modelValue:f.value,"onUpdate:modelValue":y[3]||(y[3]=v=>f.value=v),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-key-input",disabled:w.value||!V.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"]]);A.SecretForm=Qe,A.SecretList=Ge,A.VaultAuthMethods=T,A.VaultConfigCard=We,A.VaultForm=Oe,A.VaultList=xe,A.VaultProviders=o,A.VaultSecretPicker=dt,A.VaultSecretPickerProvider=Ye,A.secretsEndpoints=oe,A.vaultsEndpoints=Q,Object.defineProperty(A,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-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{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-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{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-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .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-be491a0e]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-be491a0e]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-be491a0e]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-be491a0e] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-be491a0e]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-18af080f]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-18af080f] .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-18af080f] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-18af080f] .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-18af080f] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-18af080f]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-18af080f] .k-button:last-of-type,.form-actions[data-v-18af080f] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d58db70c]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d58db70c]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d58db70c]{display:none}.kong-ui-entity-base-table[data-v-d58db70c] .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-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{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-10fa27a5]{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-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{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-6f25ab21]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-6f25ab21]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-6f25ab21]{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-6f25ab21]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-6f25ab21]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{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-48ae9c8c]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-48ae9c8c]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-48ae9c8c]{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-48ae9c8c]{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-48ae9c8c]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{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-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-48ae9c8c]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-48ae9c8c]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-48ae9c8c]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{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-48ae9c8c]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c]{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-48ae9c8c]{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-48ae9c8c] .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-48ae9c8c] .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-48ae9c8c] .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-48ae9c8c]{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-48ae9c8c]{width:640px}}.button-row[data-v-1fcf5b11]{align-items:center;display:flex;gap:12px}.kong-ui-entities-vaults-list[data-v-1fcf5b11]{width:100%}.kong-ui-entities-vaults-list .kong-ui-entity-filter-input[data-v-1fcf5b11]{margin-right:12px}.kong-ui-entities-vaults-list .table-content-overflow-wrapper[data-v-1fcf5b11]{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-b24af18b]{width:100%}.kong-ui-entities-vault-form .advanced-fields-collapse[data-v-b24af18b]{margin-bottom:24px}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper[data-v-b24af18b]{display:flex;gap:24px;margin-bottom:24px}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper .item-50[data-v-b24af18b]{width:50%}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper .item-100[data-v-b24af18b],.kong-ui-entities-vault-form .vault-form-textarea[data-v-b24af18b]{width:100%}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item[data-v-b24af18b]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-title-container[data-v-b24af18b]{flex:1}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-title[data-v-b24af18b]{display:block;font-weight:700}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-description[data-v-b24af18b]{display:block;font-size:12px}.kong-ui-entities-vault-form .vault-form-provider-cards-container button:not(:disabled) .provider-item-title[data-v-b24af18b]{color:#3a3f51}.kong-ui-entities-vault-form .vault-form-provider-cards-container button:not(:disabled) .provider-item-description[data-v-b24af18b]{color:#6c7489}.kong-ui-entities-vault-form .vault-form-provider-cards-container[data-v-b24af18b] .k-tooltip .popover-container{padding:6px!important}.kong-ui-entities-vault-form .vault-form-config-fields-container[data-v-b24af18b]>*:not(:first-child),.kong-ui-entities-vault-form .vault-form-config-fields-container .vault-form-config-auth-method-container[data-v-b24af18b]>*:not(:first-child){margin-top:24px}.kong-ui-entity-filter-input[data-v-074727f7]{margin-right:12px}.table-content-overflow-wrapper[data-v-074727f7]{max-width:60ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-entities-secrets-list[data-v-0f9047e6]{width:100%}@media screen and (min-width: 1280px){[data-v-eb9c7fc4] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-secret-form[data-v-02e6d2f3]{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-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{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-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{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-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .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-be491a0e]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-be491a0e]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-be491a0e]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-be491a0e] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-be491a0e]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-18af080f]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-18af080f] .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-18af080f] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-18af080f] .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-18af080f] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-18af080f]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-18af080f] .k-button:last-of-type,.form-actions[data-v-18af080f] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d58db70c]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d58db70c]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d58db70c]{display:none}.kong-ui-entity-base-table[data-v-d58db70c] .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-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{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-10fa27a5]{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-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{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-6f25ab21]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-6f25ab21]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-6f25ab21]{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-6f25ab21]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-6f25ab21]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{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-48ae9c8c]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-48ae9c8c]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-48ae9c8c]{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-48ae9c8c]{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-48ae9c8c]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{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-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-48ae9c8c]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-48ae9c8c]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-48ae9c8c]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{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-48ae9c8c]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c]{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-48ae9c8c]{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-48ae9c8c] .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-48ae9c8c] .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-48ae9c8c] .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-48ae9c8c]{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-48ae9c8c]{width:640px}}.button-row[data-v-43bd51a6]{align-items:center;display:flex;gap:12px}.kong-ui-entities-vaults-list[data-v-43bd51a6]{width:100%}.kong-ui-entities-vaults-list .kong-ui-entity-filter-input[data-v-43bd51a6]{margin-right:12px}.kong-ui-entities-vaults-list .table-content-overflow-wrapper[data-v-43bd51a6]{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-b24af18b]{width:100%}.kong-ui-entities-vault-form .advanced-fields-collapse[data-v-b24af18b]{margin-bottom:24px}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper[data-v-b24af18b]{display:flex;gap:24px;margin-bottom:24px}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper .item-50[data-v-b24af18b]{width:50%}.kong-ui-entities-vault-form .advanced-fields-collapse .wrapper .item-100[data-v-b24af18b],.kong-ui-entities-vault-form .vault-form-textarea[data-v-b24af18b]{width:100%}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item[data-v-b24af18b]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-title-container[data-v-b24af18b]{flex:1}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-title[data-v-b24af18b]{display:block;font-weight:700}.kong-ui-entities-vault-form .vault-form-provider-cards-container .provider-item-description[data-v-b24af18b]{display:block;font-size:12px}.kong-ui-entities-vault-form .vault-form-provider-cards-container button:not(:disabled) .provider-item-title[data-v-b24af18b]{color:#3a3f51}.kong-ui-entities-vault-form .vault-form-provider-cards-container button:not(:disabled) .provider-item-description[data-v-b24af18b]{color:#6c7489}.kong-ui-entities-vault-form .vault-form-provider-cards-container[data-v-b24af18b] .k-tooltip .popover-container{padding:6px!important}.kong-ui-entities-vault-form .vault-form-config-fields-container[data-v-b24af18b]>*:not(:first-child),.kong-ui-entities-vault-form .vault-form-config-fields-container .vault-form-config-auth-method-container[data-v-b24af18b]>*:not(:first-child){margin-top:24px}.kong-ui-entity-filter-input[data-v-074727f7]{margin-right:12px}.table-content-overflow-wrapper[data-v-074727f7]{max-width:60ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-entities-secrets-list[data-v-0f9047e6]{width:100%}@media screen and (min-width: 1280px){[data-v-eb9c7fc4] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-secret-form[data-v-02e6d2f3]{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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-vaults",
3
- "version": "3.16.4",
3
+ "version": "3.16.5",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-vaults.umd.js",
6
6
  "module": "./dist/entities-vaults.es.js",
@@ -21,36 +21,22 @@
21
21
  "access": "public"
22
22
  },
23
23
  "peerDependencies": {
24
+ "@kong-ui-public/entities-shared": "workspace:^",
25
+ "@kong-ui-public/i18n": "workspace:^",
24
26
  "@kong/icons": "^1.21.2",
25
27
  "@kong/kongponents": "^9.21.6",
26
28
  "axios": "^1.7.7",
27
29
  "vue": ">= 3.3.13 < 4",
28
- "vue-router": "^4.4.5",
29
- "@kong-ui-public/i18n": "^2.2.10",
30
- "@kong-ui-public/entities-shared": "^3.19.3"
30
+ "vue-router": "^4.4.5"
31
31
  },
32
32
  "devDependencies": {
33
+ "@kong-ui-public/entities-shared": "^3.19.3",
34
+ "@kong-ui-public/i18n": "^2.2.10",
33
35
  "@kong/design-tokens": "1.17.3",
34
36
  "@kong/kongponents": "9.21.6",
35
37
  "axios": "^1.7.7",
36
38
  "vue": "^3.5.13",
37
- "vue-router": "^4.4.5",
38
- "@kong-ui-public/entities-shared": "^3.19.3",
39
- "@kong-ui-public/i18n": "^2.2.10"
40
- },
41
- "repository": {
42
- "type": "git",
43
- "url": "https://github.com/Kong/public-ui-components.git",
44
- "directory": "packages/entities/entities-vaults"
45
- },
46
- "homepage": "https://github.com/Kong/public-ui-components/tree/main/packages/entities/entities-vaults",
47
- "author": "Kong, Inc.",
48
- "license": "Apache-2.0",
49
- "volta": {
50
- "extends": "../../../package.json"
51
- },
52
- "distSizeChecker": {
53
- "errorLimit": "900KB"
39
+ "vue-router": "^4.4.5"
54
40
  },
55
41
  "scripts": {
56
42
  "dev": "cross-env USE_SANDBOX=true vite",
@@ -69,5 +55,20 @@
69
55
  "test:component:open": "BABEL_ENV=cypress cross-env FORCE_COLOR=1 cypress open --component -b chrome --project '../../../.'",
70
56
  "test:unit": "cross-env FORCE_COLOR=1 vitest run",
71
57
  "test:unit:open": "cross-env FORCE_COLOR=1 vitest --ui"
72
- }
73
- }
58
+ },
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "https://github.com/Kong/public-ui-components.git",
62
+ "directory": "packages/entities/entities-vaults"
63
+ },
64
+ "homepage": "https://github.com/Kong/public-ui-components/tree/main/packages/entities/entities-vaults",
65
+ "author": "Kong, Inc.",
66
+ "license": "Apache-2.0",
67
+ "volta": {
68
+ "extends": "../../../package.json"
69
+ },
70
+ "distSizeChecker": {
71
+ "errorLimit": "900KB"
72
+ },
73
+ "gitHead": "fb43f17c1677bdc8361d7845e3a019db3899d92d"
74
+ }