@kong-ui-public/entities-vaults 4.16.20 → 4.16.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(B,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):(B=typeof globalThis<"u"?globalThis:B||self,e(B["kong-ui-public-entities-vaults"]={},B.Vue,B.VueRouter,B.KongIcons,B["kong-ui-public-entities-shared"],B["kong-ui-public-i18n"]))})(this,(function(B,e,Ce,K,_,Re){"use strict";const Te={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",prefix_ai_gateway:"Name",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",learn_more:"Learn more"}}},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",rotateLabel:"Rotate value"}},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",vault_type_ai_gateway:"Type",vault_name_ai_gateway:"Name"},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 reference prefix. You need this prefix to access secrets stored in this vault. For example, {vault://<your-prefix>/<some-secret>}."},prefix_ai_gateway:{label:"Name",placeholder:"Enter a unique name for this vault",help:"e.g. my-vault",tooltip:"The reference name. You need this name to access secrets stored in this vault. For example, {vault://<your-name>/<some-secret>}."},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"},ssl_verify:{label:"SSL verify"},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"},aws_auth_role:{label:"AWS auth role"},aws_auth_region:{label:"AWS auth region"},aws_access_key_id:{label:"AWS access key ID"},aws_secret_access_key:{label:"AWS secret access key"},aws_auth_nonce:{label:"AWS auth nonce"},aws_login_path:{label:"AWS login path"},azure_auth_role:{label:"Azure auth role"},azure_login_path:{label:"Azure login path"},gcp_auth_role:{label:"GCP auth role"},gcp_login_path:{label:"GCP login path"},gcp_service_account:{label:"GCP service account"},gcp_jwt_exp:{label:"GCP JWT exp"},aws_sts_endpoint_url:{label:"AWS STS endpoint URL"},aws_assume_role_arn:{label:"AWS assume role ARN"},aws_role_session_name:{label:"AWS role session name"},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"},cert_auth_cert:{label:"Cert"},cert_auth_cert_key:{label:"Cert key",rotateLabel:"Rotate cert key",rotateAlert:"Once saved, the cert key value will not be visible."},cert_auth_role_name:{label:"Role name"},oauth2_audiences:{label:"OAuth2 audiences",tooltip:"Comma-separated list of OAuth2 audiences."},oauth2_client_id:{label:"OAuth2 client ID"},oauth2_client_secret:{label:"OAuth2 client secret"},jwt_role:{label:"JWT role",tooltip:"The configured role name in HashiCorp Vault for JWT auth. When creating the role in HashiCorp Vault, make sure that the `role_type` is `jwt` and the `token_policies` have permissions to read the secrets."},oauth2_token_endpoint:{label:"OAuth2 token endpoint"}}},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"}}},"azure-certs":{label:"Azure Key Vault (Certificates)",description:"Access certificates stored in Azure Key Vault for Kong Gateway TLS termination.",fields:{vault_uri:{label:"Vault URI"},credential_prefix:{label:"Credential prefix"},client_id:{label:"Client ID"},tenant_id:{label:"Tenant ID"}}},conjur:{label:"CyberArk Secrets Manager (Conjur)",description:"Access secrets stored in CyberArk Secrets Manager (Conjur) for Kong Gateway configuration.",fields:{endpoint_url:{label:"Server",tooltip:"The CyberArk Secrets Manager (Conjur) backend url. Accepts http or https."},login:{label:"Workload identity",tooltip:"Identity of the workload or host authenticating to CyberArk Secrets Manager (Conjur). In this case Kong is the workload/host."},api_key:{label:"API key",tooltip:"The API key issued to the workload."},account:{label:"Account",tooltip:"The CyberArk Secrets Manager (Conjur) account for which the token will be issued. This is the identifier provided during CyberArk Secrets Manager (Conjur) configuration."}}},fs:{label:"File system",description:"Access secrets stored in the file system.",fields:{prefix:{label:"File path prefix",tooltip:"The prefix path for the file vault referenced files."}}},advancedFields:{title:"View advanced fields",ttl:"TTL",ttlTooltip:`Time-to-live (in seconds) of a secret from the vault when it's cached. The special value of 0 means "no rotation" and it's the default. When using non-zero values, it is recommended that they're at least 1 minute.`,negTtl:"Negative TTL",negTtlTooltip:"Time-to-live (in seconds) of a vault miss (no secret). Negatively cached secrets will remain valid until neg_ttl is reached, after which Kong will attempt to refresh the secret again. The default value for neg_ttl is 0, meaning no negative caching occurs.",resurrectTtl:"Resurrect TTL",resurrectTtlTooltip:"Time (in seconds) for how long secrets will remain in use after they are expired (config.ttl is over). This is useful when a vault becomes unreachable, or when a secret is deleted from the Vault and isn't replaced immediately. On both cases, the Gateway will keep trying to refresh the secret for resurrect_ttl seconds. After that, it will stop trying to refresh. We recommend assigning a sufficiently high value to this configuration option to ensure a seamless transition in case there are unexpected issues with the Vault. The default value for resurrect_ttl is 1e8 seconds, which is about 3 years."},commonFields:{base64_decode:{label:"Base64 decode",tooltip:"Decode all secrets in this vault as base64, useful for binary data. If some of the secrets are not base64 encoded, an error will occur when using them. It's recommended to create a separate vault for base64 secrets."}}},unavailable:"This vault provider is available on Enterprise."},vault_secret_picker:{title:"Look up key in vault",vault:{label:"Vault",placeholder:"Select a vault"},secret_id:{label:"Secret ID",input_placeholder:"Enter a secret ID",select_placeholder:"Select or enter a complete secret ID"},optional_secret_key:{label:"Secret key",placeholder:"Enter the key or key path to access a nested secret value",help:"Optional. e.g. tokens, tokens/refresh_token"},fetch_error:{vaults:"Could not fetch available vaults",secrets:"Could not fetch available secrets",vaults_and_secrets:"Could not fetch available vaults and secrets"},no_results:"No results found",actions:{use_key:"Use key"},provider:{complete_action:"Look up {cta}",cta:"key in vault"}}};function He(){const l=Re.createI18n("en-us",Te);return{i18n:l,i18nT:Re.i18nTComponent(l)}}const fe={useI18n:He},Ee="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Se="/v2/control-planes/{controlPlaneId}/{workspace}/config-stores",xe="/{workspace}",he="/v1/ai-gateways/{aiGatewayId}",Q={list:{konnect:{getAll:`${Ee}/vaults`,deleteConfigStore:`${Se}/{id}?force=true`},kongManager:{getAll:`${xe}/vaults`},aiGateway:{getAll:`${he}/vaults`,deleteConfigStore:`${he}/config-stores/{id}?force=true`}},form:{konnect:{create:`${Ee}/vaults`,createConfigStore:Se,edit:`${Ee}/vaults/{id}`},kongManager:{create:`${xe}/vaults`,edit:`${xe}/vaults/{id}`},aiGateway:{create:`${he}/vaults`,edit:`${he}/vaults/{id}`,createConfigStore:`${he}/config-stores`}}};var t=(l=>(l.AWS="aws",l.GCP="gcp",l.HCV="hcv",l.ENV="env",l.AZURE="azure",l.AZURE_CERTS="azure-certs",l.KONNECT="konnect",l.CONJUR="conjur",l.FS="fs",l))(t||{}),p=(l=>(l.TOKEN="token",l.K8S="kubernetes",l.APP_ROLE="approle",l.CERT="cert",l.JWT="jwt",l.AWS_IAM="aws_iam",l.AWS_EC2="aws_ec2",l.AZURE="azure",l.GCP_GCE="gcp_gce",l.GCP_IAM="gcp_iam",l))(p||{});const Ie={[p.TOKEN]:{token:"token"},[p.CERT]:{cert_auth_cert:"cert",cert_auth_cert_key:"key",cert_auth_role_name:"role_name"},[p.JWT]:{jwt_role:"role",oauth2_token_endpoint:"token_endpoint",oauth2_client_id:"client_id",oauth2_client_secret:"client_secret",oauth2_audiences:"audiences"},[p.APP_ROLE]:{approle_auth_path:"path",approle_response_wrapping:"response_wrapping",approle_role_id:"role_id",approle_secret_id:"secret_id",approle_secret_id_file:"secret_id_file"},[p.K8S]:{kube_role:"role",kube_auth_path:"path",kube_api_token_file:"api_token_file"},[p.GCP_IAM]:{gcp_auth_role:"role",gcp_service_account:"service_account",gcp_jwt_exp:"jwt_exp",gcp_login_path:"login_path"},[p.GCP_GCE]:{gcp_auth_role:"role",gcp_login_path:"login_path"},[p.AWS_IAM]:{aws_auth_role:"role",aws_auth_region:"region",aws_login_path:"login_path",aws_access_key_id:"access_key_id",aws_secret_access_key:"secret_access_key",aws_sts_endpoint_url:"sts_endpoint_url",aws_assume_role_arn:"assume_role_arn",aws_role_session_name:"role_session_name"},[p.AWS_EC2]:{aws_auth_role:"role",aws_auth_nonce:"nonce",aws_login_path:"login_path"},[p.AZURE]:{azure_auth_role:"role",azure_login_path:"login_path"}},Be=["protocol","host","port","mount","kv","namespace","ssl_verify","auth_method","base64_decode","ttl","neg_ttl","resurrect_ttl"],Me=l=>Object.fromEntries(Object.entries(l).map(([g,i])=>[i,g])),$e=l=>l==null,Ae=l=>Object.fromEntries(Object.entries(l).filter(([,g])=>!$e(g))),Pe=l=>{const g=Ie[l.auth_method]??{},i={};for(const s of Be)s in l&&(i[s]=l[s]);for(const[s,f]of Object.entries(g))s in l&&(i[f]=l[s]);return Ae(i)},Ge=l=>{const g=l.name;let i=l.config??{};if(g===t.HCV)i=Pe(i);else if(g===t.CONJUR){const s={...i};delete s.auth_method,i=Ae(s)}else i=Ae(i);return{type:g,name:l.prefix,description:l.description??"",config:i}},Fe=l=>{const g=Me(Ie[l.auth_method]??{}),i={};for(const[s,f]of Object.entries(l))i[g[s]??s]=f;return i},Ve=l=>{const g=l?.type;let i=l?.config?{...l.config}:{};return g===t.HCV?i=Fe(i):g===t.CONJUR&&(i={...i,auth_method:"api_key"}),{id:l?.id,created_at:l?.created_at,updated_at:l?.updated_at,name:g,prefix:l?.name,description:l?.description??"",labels:Object.entries(l?.labels??{}).map(([s,f])=>`${s}: ${f}`),config:i}},Oe={class:"kong-ui-entities-vaults-list"},Ke={class:"button-row"},We={class:"table-content-overflow-wrapper"},je={class:"table-content-overflow-wrapper"},qe=e.defineComponent({__name:"VaultList",props:{config:{type:Object,required:!0,validator:l=>!(!l||!["konnect","kongManager"].includes(l?.app)||!l.createRoute||!l.getViewRoute||!l.getEditRoute||l.app==="kongManager"&&!l.isExactMatch&&!l.filterSchema||l.apiType==="aiGateway"&&!l.aiGatewayId)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(l,{emit:g}){const i=g,s=l,{i18n:{t:f}}=fe.useI18n(),o=Ce.useRouter(),S=e.computed(()=>s.config.apiType==="aiGateway"),A=e.computed(()=>S.value?"aiGateway":s.config.app),y=b=>b.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||""),{axiosInstance:h}=_.useAxios(s.config?.axiosRequestConfig),{hasRecords:w,handleStateChange:C}=_.useTableState(()=>$.value),x=e.computed(()=>w.value&&s.config.app==="konnect"),c=e.computed(()=>s.config.app!=="kongManager"||!!s.config.disableSorting),N={prefix:{label:f("vaults.list.table_headers.prefix"),searchable:!0,sortable:!0,hidable:!1},name:{label:f("vaults.list.table_headers.name"),searchable:!0,sortable:!0},description:{label:f("vaults.list.table_headers.description"),sortable:!1},tags:{label:f("vaults.list.table_headers.tags"),sortable:!1}},u=e.computed(()=>{if(S.value){const{description:b,name:v,prefix:F}=N;return{prefix:{...F,label:f("vaults.list.table_headers.prefix_ai_gateway")},name:v,description:b}}return N}),O=e.computed(()=>{let b=`${s.config.apiBaseUrl}${Q.list[A.value].getAll}`;return s.config.app==="konnect"&&(b=b.replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"")),y(b).replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"")}),$=e.ref(""),W=e.computed(()=>{if(s.config.app==="konnect"||s.config.isExactMatch)return{isExactMatch:!0,placeholder:f("search.placeholder_for_vaults.konnect")};const{prefix:v,name:F}=N;return{isExactMatch:!1,fields:{name:F,prefix:v},schema:s.config.filterSchema}}),{fetcher:oe,fetcherState:j,fetcherCacheKey:G}=_.useFetcher(e.computed(()=>({...s.config,cacheIdentifier:s.cacheIdentifier})),O),Y=S.value?async b=>{const v=await oe(b);return{...v,data:(v.data??[]).map(Ve)}}:oe,V=()=>{$.value=""},a=()=>{G.value++},Z=e.ref(null),se=async(b,v)=>{const F=b.id;if(!await v(F)){i("copy:error",{entity:b,field:"id",message:f("errors.copy")});return}i("copy:success",{entity:b,field:"id",message:f("copy.success",{val:F})})},ee=async(b,v)=>{const F=JSON.stringify(b);if(!await v(F)){i("copy:error",{entity:b,message:f("errors.copy")});return}i("copy:success",{entity:b,message:f("copy.success_brief")})},re=async b=>{await s.canRetrieve?.(b)&&o.push(s.config.getViewRoute(b.id))},H=b=>({label:f("actions.view"),to:s.config.getViewRoute(b)}),q=b=>({label:f("actions.edit"),to:s.config.getEditRoute(b)}),T=e.ref(void 0),X=e.ref(!1),M=e.ref(!1),ue=e.ref(""),te=_.useDeleteUrlBuilder(s.config,O.value),k=b=>{T.value=b,X.value=!0},E=()=>{X.value=!1},I=async b=>{const{apiBaseUrl:v,controlPlaneId:F}=s.config,ie=y(`${v}${Q.list[S.value?"aiGateway":"konnect"].deleteConfigStore}`).replace(/{controlPlaneId}/gi,F||"").replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,b);try{await h.delete(ie)}catch{}},ae=async()=>{if(T.value?.id){M.value=!0;try{await h.delete(te(T.value.id)),s.config.app==="konnect"&&T.value.config?.config_store_id&&I(T.value.config.config_store_id),M.value=!1,X.value=!1,G.value++,i("delete:success",T.value)}catch(b){ue.value=b.response?.data?.message||b.message||f("errors.delete"),i("error",b)}finally{M.value=!1}}},ne=()=>{o.push(s.config.createRoute)};e.watch(j,b=>{if(b.status===_.FetcherStatus.Error){Z.value={title:f("errors.general")},b.error?.response?.data?.message&&(Z.value.message=b.error.response.data.message),i("error",b.error);return}Z.value=null});const P=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${f("vaults.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:f("vaults.title")}),R=e.ref(!1);return e.onBeforeMount(async()=>{R.value=await s.canCreate(),R.value&&(P.value.title=f("vaults.list.empty_state.title"),P.value.ctaText=f("actions.create"))}),(b,v)=>{const F=e.resolveComponent("KButton"),ie=e.resolveComponent("KEmptyState"),le=e.resolveComponent("KDropdownItem"),pe=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":l.cacheIdentifier,"disable-sorting":c.value,"empty-state-options":P.value,"enable-entity-actions":"","error-message":Z.value,fetcher:e.unref(Y),"fetcher-cache-key":e.unref(G),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-vaults-list",query:$.value,"table-headers":u.value,onClearSearchInput:V,"onClick:row":v[3]||(v[3]=U=>re(U)),onSort:a,onState:e.unref(C)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:$.value,"onUpdate:modelValue":v[0]||(v[0]=U=>$.value=U),config:W.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!l.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ke,[x.value?(e.openBlock(),e.createBlock(F,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:v[1]||(v[1]=U=>b.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(K.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canCreate()},{default:e.withCtx(()=>[e.createVNode(F,{appearance:"primary","data-testid":"toolbar-add-vault",size:l.useActionOutside?"medium":"large",to:l.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(K.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("vaults.list.toolbar_actions.new_vault")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),prefix:e.withCtx(({rowValue:U})=>[e.createElementVNode("div",We,[e.createElementVNode("b",null,e.toDisplayString(U??"-"),1)])]),name:e.withCtx(({rowValue:U})=>[e.createElementVNode("b",null,e.toDisplayString(U??"-"),1)]),description:e.withCtx(({rowValue:U})=>[e.createElementVNode("div",je,e.toDisplayString(U??"-"),1)]),tags:e.withCtx(({rowValue:U})=>[e.createVNode(e.unref(_.TableTags),{tags:U},null,8,["tags"])]),actions:e.withCtx(({row:U})=>[e.createVNode(pe,null,{default:e.withCtx(({copyToClipboard:me})=>[e.createVNode(le,{"data-testid":"action-entity-copy-id",onClick:d=>se(U,me)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(pe,null,{default:e.withCtx(({copyToClipboard:me})=>[e.createVNode(le,{"data-testid":"action-entity-copy-json",onClick:d=>ee(U,me)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("actions.copy_json")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canRetrieve(U)},{default:e.withCtx(()=>[e.createVNode(le,{"data-testid":"action-entity-view","has-divider":"",item:H(U.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canEdit(U)},{default:e.withCtx(()=>[e.createVNode(le,{"data-testid":"action-entity-edit",item:q(U.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canDelete(U)},{default:e.withCtx(()=>[e.createVNode(le,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:me=>k(U)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!$.value&&l.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>[e.createVNode(ie,{"data-testid":"vaults-entity-empty-state","icon-background":"",message:e.unref(f)("vaults.list.empty_state_v2.description"),title:e.unref(f)("vaults.list.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(K.SecurityIcon),{decorative:""})]),action:e.withCtx(()=>[R.value?(e.openBlock(),e.createBlock(F,{key:0,"data-testid":"entity-create-button",onClick:ne},{default:e.withCtx(()=>[e.createVNode(e.unref(K.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("vaults.list.empty_state_v2.create_cta")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(F,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:v[2]||(v[2]=U=>b.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(K.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("vaults.list.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[l.config?.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("vaults.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["message","title"])]),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(_.EntityDeleteModal),{"action-pending":M.value,description:e.unref(f)("delete.description"),"entity-name":T.value&&(T.value.prefix||T.value.id),"entity-type":e.unref(_.EntityTypes).Vault,error:ue.value,title:e.unref(f)("delete.title"),visible:X.value,onCancel:E,onProceed:ae},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),ce=(l,g)=>{const i=l.__vccOpts||l;for(const[s,f]of g)i[s]=f;return i},De=ce(qe,[["__scopeId","data-v-374c7841"]]),ze={class:"kong-ui-entities-vault-form"},Le={class:"vault-form-provider-cards-container"},Ze=["data-testid"],Je={class:"provider-item-title-container"},Qe={class:"provider-item-title"},Ye={class:"provider-item-description"},Xe={key:"kong-vault-config-fields",class:"vault-form-config-fields-container"},et={key:1,class:"vault-form-config-auth-method-container"},tt={key:2,class:"vault-form-config-auth-method-container"},at={key:3,class:"vault-form-config-auth-method-container"},lt={key:4,class:"vault-form-config-auth-method-container"},ot={key:5,class:"vault-form-config-auth-method-container"},rt={key:6,class:"vault-form-config-auth-method-container"},nt={key:7,class:"vault-form-config-auth-method-container"},it={key:8,class:"vault-form-config-auth-method-container"},st={key:9,class:"vault-form-config-auth-method-container"},ct={key:10,class:"vault-form-config-auth-method-container"},dt={key:8},ft={class:"wrapper"},ut={class:"item-50"},pt={class:"item-50"},mt={class:"wrapper"},_t={class:"item-100"},gt=ce(e.defineComponent({__name:"VaultForm",props:{config:{type:Object,required:!0,validator:l=>!(!l||!["konnect","kongManager"].includes(l?.app)||l?.app==="konnect"&&l?.apiType!=="aiGateway"&&!l?.controlPlaneId||l?.app==="kongManager"&&typeof l?.workspace!="string"||l?.apiType==="aiGateway"&&!l?.aiGatewayId||!l?.cancelRoute)},vaultId:{type:String,required:!1,default:null}},emits:["update","error","loading"],setup(l,{emit:g}){const i=l,s=g,{i18nT:f,i18n:{t:o}}=fe.useI18n(),S=Ce.useRouter(),{axiosInstance:A}=_.useAxios(i.config?.axiosRequestConfig),{getMessageFromError:y}=_.useErrors(),h=e.computed(()=>i.config.apiType==="aiGateway"),w=e.computed(()=>h.value?"aiGateway":i.config.app),C=d=>d.replace(/{aiGatewayId}/gi,i.config.aiGatewayId||""),x=h.value?"https":"http",c=e.reactive({fields:{prefix:"",description:"",tags:"",labelList:[]},isReadonly:!1,errorMessage:""}),N=e.reactive({prefix:"",description:"",tags:"",labelList:[]}),u=e.ref(i.config.app==="konnect"?t.KONNECT:t.ENV),O=e.ref(null),$=e.ref();let W=0;const oe=d=>Object.entries(d).map(([r,de])=>({id:`label-${W++}`,key:r,value:de})),j=d=>{c.fields.labelList=d},G=e.computed(()=>[t.AWS,t.GCP,t.HCV,t.AZURE,t.CONJUR,t.FS,t.AZURE_CERTS].includes(u.value)),Y=e.computed(()=>h.value?[{label:o("form.config.konnect.label"),value:t.KONNECT},{label:o("form.config.env.label"),value:t.ENV},{label:o("form.config.aws.label"),value:t.AWS},{label:o("form.config.gcp.label"),value:t.GCP},{label:o("form.config.hcv.label"),value:t.HCV},{label:o("form.config.azure.label"),value:t.AZURE},{label:o("form.config.conjur.label"),value:t.CONJUR}]:[...i.config.app==="konnect"?[{label:o("form.config.konnect.label"),value:t.KONNECT}]:[],{label:o("form.config.env.label"),value:t.ENV},{label:o("form.config.aws.label"),value:t.AWS,disabled:!te.value},{label:o("form.config.gcp.label"),value:t.GCP,disabled:!te.value},{label:o("form.config.hcv.label"),value:t.HCV,disabled:!te.value},...i.config.azureVaultProviderAvailable?[{label:o("form.config.azure.label"),value:t.AZURE,disabled:!te.value}]:[],...i.config.conjurVaultProviderAvailable?[{label:o("form.config.conjur.label"),value:t.CONJUR,disabled:!te.value}]:[],...i.config.fsVaultProviderAvailable?[{label:o("form.config.fs.label"),value:t.FS,disabled:!te.value}]:[],...i.config.azureCertsVaultProviderAvailable?[{label:o("form.config.azure-certs.label"),value:t.AZURE_CERTS,disabled:!te.value}]:[]]),V=i.config.base64FieldAvailable?{base64_decode:!1}:{},a=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...V},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...V},[t.GCP]:{project_id:"",...V},[t.HCV]:{protocol:x,host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",ssl_verify:!0,auth_method:p.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",aws_auth_role:"",aws_auth_region:"",aws_auth_nonce:"",aws_login_path:"",aws_access_key_id:"",aws_secret_access_key:"",aws_sts_endpoint_url:"",aws_assume_role_arn:"",aws_role_session_name:"",azure_auth_role:"",azure_login_path:"",gcp_auth_role:"",gcp_login_path:"",gcp_service_account:"",gcp_jwt_exp:void 0,approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,cert_auth_cert:"",cert_auth_cert_key:"",cert_auth_role_name:"",oauth2_client_id:"",oauth2_client_secret:"",jwt_role:"",oauth2_token_endpoint:"",oauth2_audiences:"",...V},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...V},[t.AZURE_CERTS]:{vault_uri:"",credentials_prefix:"AZURE",client_id:"",tenant_id:"",ttl:3600},[t.CONJUR]:{endpoint_url:"",auth_method:"api_key",...V},[t.FS]:{prefix:"",...V}}),Z=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...V},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...V},[t.GCP]:{project_id:"",...V},[t.HCV]:{protocol:x,host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",ssl_verify:!0,auth_method:p.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",aws_auth_role:"",aws_auth_region:"",aws_auth_nonce:"",aws_login_path:"",aws_access_key_id:"",aws_secret_access_key:"",aws_sts_endpoint_url:"",aws_assume_role_arn:"",aws_role_session_name:"",azure_auth_role:"",azure_login_path:"",gcp_auth_role:"",gcp_login_path:"",gcp_service_account:"",gcp_jwt_exp:void 0,approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,cert_auth_cert:"",cert_auth_cert_key:"",cert_auth_role_name:"",oauth2_client_id:"",oauth2_client_secret:"",jwt_role:"",oauth2_token_endpoint:"",oauth2_audiences:"",...V},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...V},[t.AZURE_CERTS]:{vault_uri:"",credentials_prefix:"AZURE",client_id:"",tenant_id:"",ttl:3600},[t.CONJUR]:{endpoint_url:"",auth_method:"api_key",...V},[t.FS]:{prefix:"",...V}}),se=[{label:`${o("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`,value:"us-east-1"},{label:`${o("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`,value:"us-east-2"},{label:`${o("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`,value:"us-west-1"},{label:`${o("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`,value:"us-west-2"},{label:`${o("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`,value:"af-south-1"},{label:`${o("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`,value:"ap-east-1"},{label:`${o("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`,value:"ap-southeast-3"},{label:`${o("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`,value:"ap-south-1"},{label:`${o("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`,value:"ap-northeast-1"},{label:`${o("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`,value:"ap-northeast-2"},{label:`${o("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`,value:"ap-northeast-3"},{label:`${o("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`,value:"ap-southeast-1"},{label:`${o("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`,value:"ap-southeast-2"},{label:`${o("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`,value:"ca-central-1"},{label:`${o("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`,value:"eu-central-1"},{label:`${o("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`,value:"eu-west-1"},{label:`${o("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`,value:"eu-west-2"},{label:`${o("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`,value:"eu-west-3"},{label:`${o("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`,value:"eu-south-1"},{label:`${o("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`,value:"eu-north-1"},{label:`${o("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`,value:"me-south-1"},{label:`${o("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`,value:"sa-east-1"},{label:`${o("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`,value:"us-gov-east-1"},{label:`${o("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`,value:"us-gov-west-1"}],ee=[{label:"secrets",value:"secrets"}],re=[{label:"http",value:"http"},{label:"https",value:"https"}],H=[{label:"v1",value:"v1"},{label:"v2",value:"v2"}],q=e.computed(()=>i.vaultId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),T=e.computed(()=>q.value===_.EntityBaseFormType.Edit?"edit":"create"),X=e.ref(!1),M=e.computed(()=>C(Q.form[w.value]?.edit)),ue=e.computed(()=>q.value===_.EntityBaseFormType.Edit&&(i.config.app==="kongManager"||h.value)),te=e.computed(()=>i.config.app==="konnect"||_.useGatewayFeatureSupported({gatewayInfo:i.config.gatewayInfo,supportedRange:{enterprise:[]}})),k=()=>{S.push(i.config?.cancelRoute||{name:"vault-list"})},E=d=>{s("loading",d)},I=d=>{s("error",d)},ae=d=>{switch(d){case t.KONNECT:return K.KongIcon;case t.ENV:return K.CodeIcon;case t.AWS:return K.AwsIcon;case t.GCP:return K.GoogleCloudIcon;case t.HCV:return K.HashicorpIcon;case t.AZURE:return K.AzureIcon;case t.AZURE_CERTS:return K.AzureIcon;case t.CONJUR:return K.ConjourIcon;case t.FS:return K.FolderIcon}},ne=d=>{switch(d){case t.KONNECT:return o("form.config.konnect.description");case t.ENV:return o("form.config.env.description");case t.AWS:return o("form.config.aws.description");case t.GCP:return o("form.config.gcp.description");case t.HCV:return o("form.config.hcv.description");case t.AZURE:return o("form.config.azure.description");case t.AZURE_CERTS:return o("form.config.azure-certs.description");case t.CONJUR:return o("form.config.conjur.description");case t.FS:return o("form.config.fs.description")}},P=d=>{const r=h.value?Ve(d?.item??d):d;c.fields.prefix=r?.item?.prefix||r?.prefix||"",c.fields.description=r?.item?.description||r?.description||"";const de=r?.item?.tags||r?.tags||[];if(c.fields.tags=de?.join(", ")||"",h.value){const m=r?.labels??{};c.fields.labelList=oe(m)}Object.assign(N,c.fields),N.labelList=c.fields.labelList.map(m=>({...m}));const J=r?.item?.config||r?.config||null;J&&(Object.keys(J).length||r?.name===t.KONNECT)?(u.value=r?.item?.name||r?.name||"",O.value=u.value,$.value=r?.config?.config_store_id||void 0,Object.assign(a[u.value],J),Object.assign(Z[u.value],J)):c.errorMessage="Error loading vault config"},R=d=>d===""||d==null,b=e.computed(()=>u.value===t.HCV?!Object.keys(a[t.HCV]).filter(d=>["namespace","ttl","neg_ttl","resurrect_ttl","kube_role","kube_api_token_file","cert_auth_role_name","kube_auth_path","approle_auth_path","approle_secret_id","approle_secret_id_file","oauth2_audiences","aws_login_path","aws_sts_endpoint_url","aws_assume_role_arn","aws_role_session_name","azure_login_path","gcp_login_path"].includes(d)||!i.config.hcvCspAuthMethodsAvailable&&["aws_auth_role","aws_auth_region","aws_auth_nonce","aws_access_key_id","aws_secret_access_key","aws_login_path","aws_sts_endpoint_url","aws_assume_role_arn","aws_role_session_name","azure_auth_role","azure_login_path","gcp_auth_role","gcp_login_path","gcp_service_account","gcp_jwt_exp"].includes(d)||![p.AWS_IAM,p.AWS_EC2].includes(a[t.HCV].auth_method)&&d==="aws_auth_role"||a[t.HCV].auth_method!==p.AWS_IAM&&["aws_auth_region","aws_access_key_id","aws_secret_access_key"].includes(d)||a[t.HCV].auth_method===p.AWS_IAM&&["aws_access_key_id","aws_secret_access_key"].includes(d)||a[t.HCV].auth_method!==p.AWS_EC2&&d==="aws_auth_nonce"||a[t.HCV].auth_method!==p.AZURE&&d==="azure_auth_role"||![p.GCP_GCE,p.GCP_IAM].includes(a[t.HCV].auth_method)&&d==="gcp_auth_role"||a[t.HCV].auth_method!==p.GCP_IAM&&["gcp_service_account","gcp_jwt_exp"].includes(d)||a[t.HCV].auth_method!==p.TOKEN&&d==="token"||h.value&&q.value===_.EntityBaseFormType.Edit&&["token","oauth2_client_secret","cert_auth_cert_key"].includes(d)||a[t.HCV].auth_method!==p.APP_ROLE&&(d==="approle_role_id"||d==="approle_response_wrapping")||a[t.HCV].auth_method===p.APP_ROLE&&d==="approle_response_wrapping"&&typeof a[u.value][d]=="boolean"||a[t.HCV].auth_method!==p.CERT&&["cert_auth_cert","cert_auth_cert_key"].includes(d)||a[t.HCV].auth_method!==p.JWT&&["oauth2_client_id","oauth2_client_secret","jwt_role","oauth2_token_endpoint"].includes(d)?!1:R(a[u.value][d])).length:u.value===t.AZURE?!Object.keys(a[t.AZURE]).filter(d=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:R(a[u.value][d])).length:u.value===t.AZURE_CERTS?!Object.keys(a[t.AZURE_CERTS]).filter(d=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:R(a[u.value][d])).length:u.value===t.AWS?!Object.keys(a[t.AWS]).filter(d=>["endpoint_url","assume_role_arn","ttl","neg_ttl","resurrect_ttl","sts_endpoint_url"].includes(d)?!1:R(a[u.value][d])).length:!Object.keys(a[u.value]).filter(d=>["ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:R(a[u.value][d])).length),v=e.computed(()=>!!c.fields.prefix&&b.value),F=e.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(N)||u.value!==O.value||JSON.stringify(a[u.value])!==JSON.stringify(Z[u.value])),ie=e.computed(()=>{let d=`${i.config.apiBaseUrl}${Q.form[w.value][q.value]}`;return i.config.app==="konnect"&&(d=d.replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"")),C(d).replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:"").replace(/{id}/gi,i.vaultId??"")}),le=e.computed(()=>{const d=parseInt(String(a[t.HCV].gcp_jwt_exp),10),r={protocol:a[t.HCV].protocol,host:a[t.HCV].host,port:parseInt(a[t.HCV].port.toString()),mount:a[t.HCV].mount,kv:a[t.HCV].kv,namespace:a[t.HCV].namespace||null,...i.config.hcvSslVerifyAvailable&&{ssl_verify:a[t.HCV].ssl_verify??!0},auth_method:a[t.HCV].auth_method,...i.config.base64FieldAvailable&&{base64_decode:a[t.HCV].base64_decode},...a[t.HCV].auth_method===p.TOKEN&&{token:a[t.HCV].token},...a[t.HCV].auth_method===p.K8S&&{kube_role:a[t.HCV].kube_role||void 0,kube_auth_path:a[t.HCV].kube_auth_path||void 0,kube_api_token_file:a[t.HCV].kube_api_token_file||void 0,token:null},...a[t.HCV].auth_method===p.AWS_IAM&&{aws_auth_role:a[t.HCV].aws_auth_role||void 0,aws_auth_region:a[t.HCV].aws_auth_region||void 0,aws_login_path:a[t.HCV].aws_login_path||void 0,aws_access_key_id:a[t.HCV].aws_access_key_id||void 0,aws_secret_access_key:a[t.HCV].aws_secret_access_key||void 0,aws_sts_endpoint_url:a[t.HCV].aws_sts_endpoint_url||void 0,aws_assume_role_arn:a[t.HCV].aws_assume_role_arn||void 0,aws_role_session_name:a[t.HCV].aws_role_session_name||void 0},...a[t.HCV].auth_method===p.AWS_EC2&&{aws_auth_role:a[t.HCV].aws_auth_role||void 0,aws_auth_nonce:a[t.HCV].aws_auth_nonce||void 0,aws_login_path:a[t.HCV].aws_login_path||void 0},...a[t.HCV].auth_method===p.AZURE&&{azure_auth_role:a[t.HCV].azure_auth_role||void 0,azure_login_path:a[t.HCV].azure_login_path||void 0},...a[t.HCV].auth_method===p.GCP_GCE&&{gcp_auth_role:a[t.HCV].gcp_auth_role||void 0,gcp_login_path:a[t.HCV].gcp_login_path||void 0},...a[t.HCV].auth_method===p.GCP_IAM&&{gcp_auth_role:a[t.HCV].gcp_auth_role||void 0,gcp_login_path:a[t.HCV].gcp_login_path||void 0,gcp_service_account:a[t.HCV].gcp_service_account||void 0,gcp_jwt_exp:Number.isNaN(d)?void 0:d},...a[t.HCV].auth_method===p.APP_ROLE&&{approle_auth_path:a[t.HCV].approle_auth_path||void 0,approle_role_id:a[t.HCV].approle_role_id,approle_secret_id:a[t.HCV].approle_secret_id||void 0,approle_secret_id_file:a[t.HCV].approle_secret_id_file||void 0,approle_response_wrapping:a[t.HCV].approle_response_wrapping??!1},...a[t.HCV].auth_method===p.CERT&&{cert_auth_role_name:a[t.HCV].cert_auth_role_name||void 0,cert_auth_cert:a[t.HCV].cert_auth_cert,cert_auth_cert_key:a[t.HCV].cert_auth_cert_key},...a[t.HCV].auth_method===p.JWT&&{oauth2_audiences:a[t.HCV].oauth2_audiences||null,oauth2_client_id:a[t.HCV].oauth2_client_id,oauth2_client_secret:a[t.HCV].oauth2_client_secret,jwt_role:a[t.HCV].jwt_role,oauth2_token_endpoint:a[t.HCV].oauth2_token_endpoint}},de={...a[u.value],client_id:a[u.value].client_id||null,tenant_id:a[u.value].tenant_id||null},J={...a[u.value],client_id:a[u.value].client_id||null,tenant_id:a[u.value].tenant_id||null},m={...a[u.value],endpoint_url:a[u.value].endpoint_url||null,assume_role_arn:a[u.value].assume_role_arn||null,...i.config.awsStsEndpointUrlAvailable?{sts_endpoint_url:a[u.value].sts_endpoint_url||null}:{}};let D=a[u.value];u.value===t.HCV?D=r:u.value===t.AZURE?D=de:u.value===t.AZURE_CERTS?D=J:u.value===t.AWS&&(D=m);let _e={};if(![t.KONNECT,t.ENV].includes(u.value)){const z=a[u.value],ye=z.ttl,be=z.neg_ttl,Ue=z.resurrect_ttl;_e={ttl:ye?parseInt(ye.toString(),10):null,neg_ttl:be?parseInt(be.toString(),10):null,resurrect_ttl:Ue?parseInt(Ue.toString(),10):null}}const we={prefix:c.fields.prefix,description:c.fields.description||null,tags:c.fields.tags.split(",")?.map(z=>String(z||"").trim())?.filter(z=>z!==""),name:u.value,config:{...D,..._e}};if(!h.value)return we;const ge=Ge(we),n={};for(const z of c.fields.labelList){const ye=z.key.trim();ye&&(n[ye]=z.value.trim())}if(Object.keys(n).length>0&&(ge.labels=n),q.value===_.EntityBaseFormType.Edit){const z={...ge.config};return["token","client_secret","secret_access_key","api_key","key"].forEach(be=>{be in z&&R(z[be])&&delete z[be]}),{...ge,config:z}}return ge}),pe=e.computed(()=>({...le.value,config:{...le.value.config,config_store_id:$.value}})),U=async()=>{try{c.isReadonly=!0;const d=C(`${i.config.apiBaseUrl}${Q.form[h.value?"aiGateway":"konnect"].createConfigStore}`).replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"").replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:""),r=h.value?{name:c.fields.prefix}:void 0;return(await A.post(d,r))?.data.id}catch(d){c.errorMessage=y(d),s("error",d)}finally{c.isReadonly=!1}},me=async()=>{try{c.isReadonly=!0;let d;q.value==="create"?u.value===t.KONNECT?($.value=await U(),d=await A.post(ie.value,pe.value)):d=await A.post(ie.value,le.value):q.value==="edit"&&(u.value===t.KONNECT&&!$.value?($.value=await U(),d=await A.put(ie.value,pe.value)):d=i.config?.app==="konnect"?await A.put(ie.value,pe.value):await A.patch(ie.value,le.value)),P(d?.data),s("update",d?.data)}catch(d){c.errorMessage=y(d),s("error",d)}finally{c.isReadonly=!1}};return(d,r)=>{const de=e.resolveComponent("KTooltip"),J=e.resolveComponent("KSelect"),m=e.resolveComponent("KInput"),D=e.resolveComponent("KCheckbox"),_e=e.resolveComponent("KTextArea"),we=e.resolveComponent("KAlert"),ge=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(e.unref(_.EntityBaseForm),{"can-submit":v.value&&F.value,config:l.config,"edit-id":l.vaultId,"entity-type":e.unref(_.SupportedEntityType).Vault,"error-message":c.errorMessage,"fetch-url":M.value,"form-fields":le.value,"is-readonly":c.isReadonly,"tabs-to-hide":l.config.apiType==="aiGateway"?["terraform","deck"]:[],onCancel:k,"onFetch:error":I,"onFetch:success":P,onLoading:E,onSubmit:me},{default:e.withCtx(()=>[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(o)("form.sections.config.description"),title:e.unref(o)("form.sections.config.title")},{default:e.withCtx(()=>[e.createElementVNode("div",Le,[e.createVNode(J,{modelValue:u.value,"onUpdate:modelValue":r[0]||(r[0]=n=>u.value=n),"data-testid":"provider-select",disabled:ue.value,"dropdown-max-height":"500",items:Y.value,readonly:c.isReadonly},{"selected-item-template":e.withCtx(({item:n})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ae(n.value)))),e.createElementVNode("span",null,e.toDisplayString(n?.label),1)]),"item-template":e.withCtx(({item:n})=>[e.createVNode(de,{placement:"top",text:n.disabled?e.unref(o)("form.unavailable"):""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"provider-item","data-testid":`vault-form-provider-${n.value}`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ae(n.value)))),e.createElementVNode("div",Je,[e.createElementVNode("span",Qe,e.toDisplayString(n?.label),1),e.createElementVNode("span",Ye,e.toDisplayString(ne(n.value)),1)])],8,Ze)]),_:2},1032,["text"])]),_:1},8,["modelValue","disabled","items","readonly"])]),e.createVNode(e.TransitionGroup,{name:"appear"},{default:e.withCtx(()=>[u.value===e.unref(t).ENV?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(m,{modelValue:a[e.unref(t).ENV].prefix,"onUpdate:modelValue":r[1]||(r[1]=n=>a[e.unref(t).ENV].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-kong-prefix",label:e.unref(o)("form.config.env.fields.prefix.label"),"label-attributes":{info:e.unref(o)("form.config.env.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)("form.config.env.fields.prefix.placeholder"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).ENV].base64_decode,"onUpdate:modelValue":r[2]||(r[2]=n=>a[e.unref(t).ENV].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).AWS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AWS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(J,{modelValue:a[e.unref(t).AWS].region,"onUpdate:modelValue":r[3]||(r[3]=n=>a[e.unref(t).AWS].region=n),"data-testid":"vault-form-config-aws-region",items:se,label:e.unref(o)("form.config.aws.fields.region.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.region.tooltip")},placeholder:e.unref(o)("form.config.aws.fields.region.placeholder"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].endpoint_url,"onUpdate:modelValue":r[4]||(r[4]=n=>a[e.unref(t).AWS].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-endpoint_url",label:e.unref(o)("form.config.aws.fields.endpoint_url.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].assume_role_arn,"onUpdate:modelValue":r[5]||(r[5]=n=>a[e.unref(t).AWS].assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-assume_role_arn",label:e.unref(o)("form.config.aws.fields.assume_role_arn.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.assume_role_arn.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].role_session_name,"onUpdate:modelValue":r[6]||(r[6]=n=>a[e.unref(t).AWS].role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-role_session_name",label:e.unref(o)("form.config.aws.fields.role_session_name.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.role_session_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),l.config.awsStsEndpointUrlAvailable?(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).AWS].sts_endpoint_url,"onUpdate:modelValue":r[7]||(r[7]=n=>a[e.unref(t).AWS].sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-sts_endpoint_url",label:e.unref(o)("form.config.aws.fields.sts_endpoint_url.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.sts_endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:1,modelValue:a[e.unref(t).AWS].base64_decode,"onUpdate:modelValue":r[8]||(r[8]=n=>a[e.unref(t).AWS].base64_decode=n),"data-testid":"vault-form-config-aws-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).GCP?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).GCP}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).GCP].project_id,"onUpdate:modelValue":r[9]||(r[9]=n=>a[e.unref(t).GCP].project_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-gcp-project-id",label:e.unref(o)("form.config.gcp.fields.project_id.label"),placeholder:e.unref(o)("form.config.gcp.fields.project_id.placeholder"),readonly:c.isReadonly,required:"",type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(f),{keypath:"form.config.gcp.fields.project_id.tooltip.text",scope:"global"},{"italic-text":e.withCtx(()=>[e.createElementVNode("em",null,e.toDisplayString(e.unref(o)("form.config.gcp.fields.project_id.tooltip.italicText")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).GCP].base64_decode,"onUpdate:modelValue":r[10]||(r[10]=n=>a[e.unref(t).GCP].base64_decode=n),"data-testid":"vault-form-config-gcp-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).HCV?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(J,{modelValue:a[e.unref(t).HCV].protocol,"onUpdate:modelValue":r[11]||(r[11]=n=>a[e.unref(t).HCV].protocol=n),"data-testid":"vault-form-config-hcv-protocol",items:re,label:e.unref(o)("form.config.hcv.fields.protocol.label"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),l.config.hcvSslVerifyAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).HCV].ssl_verify,"onUpdate:modelValue":r[12]||(r[12]=n=>a[e.unref(t).HCV].ssl_verify=n),"data-testid":"vault-form-config-hcv-ssl_verify",label:e.unref(o)("form.config.hcv.fields.ssl_verify.label"),readonly:c.isReadonly},null,8,["modelValue","label","readonly"])):e.createCommentVNode("",!0),e.createVNode(m,{modelValue:a[e.unref(t).HCV].host,"onUpdate:modelValue":r[13]||(r[13]=n=>a[e.unref(t).HCV].host=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-host",label:e.unref(o)("form.config.hcv.fields.host.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].port,"onUpdate:modelValue":r[14]||(r[14]=n=>a[e.unref(t).HCV].port=n),autocomplete:"off","data-testid":"vault-form-config-hcv-port",label:e.unref(o)("form.config.hcv.fields.port.label"),min:"0",readonly:c.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].mount,"onUpdate:modelValue":r[15]||(r[15]=n=>a[e.unref(t).HCV].mount=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-mount",label:e.unref(o)("form.config.hcv.fields.mount.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(J,{modelValue:a[e.unref(t).HCV].kv,"onUpdate:modelValue":r[16]||(r[16]=n=>a[e.unref(t).HCV].kv=n),"data-testid":"vault-form-config-hcv-kv",items:H,label:e.unref(o)("form.config.hcv.fields.kv.label"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].namespace,"onUpdate:modelValue":r[17]||(r[17]=n=>a[e.unref(t).HCV].namespace=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-namespace",label:e.unref(o)("form.config.hcv.fields.namespace.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(J,{modelValue:a[e.unref(t).HCV].auth_method,"onUpdate:modelValue":r[18]||(r[18]=n=>a[e.unref(t).HCV].auth_method=n),"data-testid":"vault-form-config-hcv-auth_method",items:[{label:e.unref(p).TOKEN,value:e.unref(p).TOKEN},{label:e.unref(p).K8S,value:e.unref(p).K8S},...l.config.hcvAppRoleMethodAvailable?[{label:e.unref(p).APP_ROLE,value:e.unref(p).APP_ROLE}]:[],...l.config.hcvCertMethodAvailable?[{label:e.unref(p).CERT,value:e.unref(p).CERT}]:[],...l.config.hcvJwtMethodAvailable?[{label:e.unref(p).JWT,value:e.unref(p).JWT}]:[],...l.config.hcvCspAuthMethodsAvailable?[{label:e.unref(p).AWS_IAM,value:e.unref(p).AWS_IAM},{label:e.unref(p).AWS_EC2,value:e.unref(p).AWS_EC2},{label:e.unref(p).AZURE,value:e.unref(p).AZURE},{label:e.unref(p).GCP_GCE,value:e.unref(p).GCP_GCE},{label:e.unref(p).GCP_IAM,value:e.unref(p).GCP_IAM}]:[]],label:e.unref(o)("form.config.hcv.fields.auth_method.label"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","items","label","readonly"]),a[e.unref(t).HCV].auth_method===e.unref(p).TOKEN?(e.openBlock(),e.createElementBlock("div",et,[h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":r[20]||(r[20]=n=>a[e.unref(t).HCV].token=n),"data-testid":"vault-form-config-hcv-token",label:e.unref(o)("form.config.hcv.fields.token.label"),mode:T.value,readonly:c.isReadonly,required:T.value==="create"},null,8,["modelValue","label","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":r[19]||(r[19]=n=>a[e.unref(t).HCV].token=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-token",label:e.unref(o)("form.config.hcv.fields.token.label"),readonly:c.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]))])):a[e.unref(t).HCV].auth_method===e.unref(p).K8S?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_role,"onUpdate:modelValue":r[21]||(r[21]=n=>a[e.unref(t).HCV].kube_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_role",label:e.unref(o)("form.config.hcv.fields.kube_role.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_auth_path,"onUpdate:modelValue":r[22]||(r[22]=n=>a[e.unref(t).HCV].kube_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_auth_path",label:e.unref(o)("form.config.hcv.fields.kube_auth_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_api_token_file,"onUpdate:modelValue":r[23]||(r[23]=n=>a[e.unref(t).HCV].kube_api_token_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_api_token_file",label:e.unref(o)("form.config.hcv.fields.kube_api_token_file.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AWS_IAM?(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_role,"onUpdate:modelValue":r[24]||(r[24]=n=>a[e.unref(t).HCV].aws_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_role",label:e.unref(o)("form.config.hcv.fields.aws_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_region,"onUpdate:modelValue":r[25]||(r[25]=n=>a[e.unref(t).HCV].aws_auth_region=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_region",label:e.unref(o)("form.config.hcv.fields.aws_auth_region.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_login_path,"onUpdate:modelValue":r[26]||(r[26]=n=>a[e.unref(t).HCV].aws_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_login_path",label:e.unref(o)("form.config.hcv.fields.aws_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_access_key_id,"onUpdate:modelValue":r[27]||(r[27]=n=>a[e.unref(t).HCV].aws_access_key_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_access_key_id",label:e.unref(o)("form.config.hcv.fields.aws_access_key_id.label"),readonly:c.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].aws_secret_access_key,"onUpdate:modelValue":r[29]||(r[29]=n=>a[e.unref(t).HCV].aws_secret_access_key=n),"data-testid":"vault-form-config-hcv-aws_secret_access_key",label:e.unref(o)("form.config.hcv.fields.aws_secret_access_key.label"),mode:T.value,readonly:c.isReadonly},null,8,["modelValue","label","mode","readonly"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].aws_secret_access_key,"onUpdate:modelValue":r[28]||(r[28]=n=>a[e.unref(t).HCV].aws_secret_access_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_secret_access_key",label:e.unref(o)("form.config.hcv.fields.aws_secret_access_key.label"),readonly:c.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_sts_endpoint_url,"onUpdate:modelValue":r[30]||(r[30]=n=>a[e.unref(t).HCV].aws_sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_sts_endpoint_url",label:e.unref(o)("form.config.hcv.fields.aws_sts_endpoint_url.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_assume_role_arn,"onUpdate:modelValue":r[31]||(r[31]=n=>a[e.unref(t).HCV].aws_assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_assume_role_arn",label:e.unref(o)("form.config.hcv.fields.aws_assume_role_arn.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_role_session_name,"onUpdate:modelValue":r[32]||(r[32]=n=>a[e.unref(t).HCV].aws_role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_role_session_name",label:e.unref(o)("form.config.hcv.fields.aws_role_session_name.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AWS_EC2?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_role,"onUpdate:modelValue":r[33]||(r[33]=n=>a[e.unref(t).HCV].aws_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_role",label:e.unref(o)("form.config.hcv.fields.aws_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_nonce,"onUpdate:modelValue":r[34]||(r[34]=n=>a[e.unref(t).HCV].aws_auth_nonce=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_nonce",label:e.unref(o)("form.config.hcv.fields.aws_auth_nonce.label"),readonly:c.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_login_path,"onUpdate:modelValue":r[35]||(r[35]=n=>a[e.unref(t).HCV].aws_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_login_path",label:e.unref(o)("form.config.hcv.fields.aws_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AZURE?(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].azure_auth_role,"onUpdate:modelValue":r[36]||(r[36]=n=>a[e.unref(t).HCV].azure_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-azure_auth_role",label:e.unref(o)("form.config.hcv.fields.azure_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].azure_login_path,"onUpdate:modelValue":r[37]||(r[37]=n=>a[e.unref(t).HCV].azure_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-azure_login_path",label:e.unref(o)("form.config.hcv.fields.azure_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).GCP_GCE?(e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_auth_role,"onUpdate:modelValue":r[38]||(r[38]=n=>a[e.unref(t).HCV].gcp_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_auth_role",label:e.unref(o)("form.config.hcv.fields.gcp_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_login_path,"onUpdate:modelValue":r[39]||(r[39]=n=>a[e.unref(t).HCV].gcp_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_login_path",label:e.unref(o)("form.config.hcv.fields.gcp_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).GCP_IAM?(e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_auth_role,"onUpdate:modelValue":r[40]||(r[40]=n=>a[e.unref(t).HCV].gcp_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_auth_role",label:e.unref(o)("form.config.hcv.fields.gcp_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_login_path,"onUpdate:modelValue":r[41]||(r[41]=n=>a[e.unref(t).HCV].gcp_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_login_path",label:e.unref(o)("form.config.hcv.fields.gcp_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_service_account,"onUpdate:modelValue":r[42]||(r[42]=n=>a[e.unref(t).HCV].gcp_service_account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_service_account",label:e.unref(o)("form.config.hcv.fields.gcp_service_account.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_jwt_exp,"onUpdate:modelValue":r[43]||(r[43]=n=>a[e.unref(t).HCV].gcp_jwt_exp=n),autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_jwt_exp",label:e.unref(o)("form.config.hcv.fields.gcp_jwt_exp.label"),readonly:c.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(p).APP_ROLE?(e.openBlock(),e.createElementBlock("div",it,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_auth_path,"onUpdate:modelValue":r[44]||(r[44]=n=>a[e.unref(t).HCV].approle_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_auth_path",label:e.unref(o)("form.config.hcv.fields.approle_auth_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_role_id,"onUpdate:modelValue":r[45]||(r[45]=n=>a[e.unref(t).HCV].approle_role_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_role_id",label:e.unref(o)("form.config.hcv.fields.approle_role_id.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_secret_id,"onUpdate:modelValue":r[46]||(r[46]=n=>a[e.unref(t).HCV].approle_secret_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id",label:e.unref(o)("form.config.hcv.fields.approle_secret_id.label"),readonly:c.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_secret_id_file,"onUpdate:modelValue":r[47]||(r[47]=n=>a[e.unref(t).HCV].approle_secret_id_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id_file",label:e.unref(o)("form.config.hcv.fields.approle_secret_id_file.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(D,{modelValue:a[e.unref(t).HCV].approle_response_wrapping,"onUpdate:modelValue":r[48]||(r[48]=n=>a[e.unref(t).HCV].approle_response_wrapping=n),"data-testid":"vault-form-config-hcv-approle_response_wrapping",label:e.unref(o)("form.config.hcv.fields.approle_response_wrapping.label")},null,8,["modelValue","label"])])):a[e.unref(t).HCV].auth_method===e.unref(p).CERT?(e.openBlock(),e.createElementBlock("div",st,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].cert_auth_role_name,"onUpdate:modelValue":r[49]||(r[49]=n=>a[e.unref(t).HCV].cert_auth_role_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_role_name",label:e.unref(o)("form.config.hcv.fields.cert_auth_role_name.label"),readonly:c.isReadonly},null,8,["modelValue","label","readonly"]),e.createVNode(_e,{modelValue:a[e.unref(t).HCV].cert_auth_cert,"onUpdate:modelValue":r[50]||(r[50]=n=>a[e.unref(t).HCV].cert_auth_cert=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_cert",label:e.unref(o)("form.config.hcv.fields.cert_auth_cert.label"),readonly:c.isReadonly,required:""},null,8,["modelValue","label","readonly"]),h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].cert_auth_cert_key,"onUpdate:modelValue":r[52]||(r[52]=n=>a[e.unref(t).HCV].cert_auth_cert_key=n),"data-testid":"vault-form-config-hcv-cert_auth_cert_key",label:e.unref(o)("form.config.hcv.fields.cert_auth_cert_key.label"),labels:{rotateLabel:e.unref(o)("form.config.hcv.fields.cert_auth_cert_key.rotateLabel")},mode:T.value,multiline:"",placeholder:"",readonly:c.isReadonly,required:T.value==="create",onRotate:r[53]||(r[53]=n=>X.value=!0)},{alert:e.withCtx(()=>[X.value?(e.openBlock(),e.createBlock(we,{key:0,message:e.unref(o)("form.config.hcv.fields.cert_auth_cert_key.rotateAlert")},null,8,["message"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","label","labels","mode","readonly","required"])):(e.openBlock(),e.createBlock(_e,{key:0,modelValue:a[e.unref(t).HCV].cert_auth_cert_key,"onUpdate:modelValue":r[51]||(r[51]=n=>a[e.unref(t).HCV].cert_auth_cert_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_cert_key",label:e.unref(o)("form.config.hcv.fields.cert_auth_cert_key.label"),readonly:c.isReadonly,required:""},null,8,["modelValue","label","readonly"]))])):a[e.unref(t).HCV].auth_method===e.unref(p).JWT?(e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_client_id,"onUpdate:modelValue":r[54]||(r[54]=n=>a[e.unref(t).HCV].oauth2_client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_client_id",label:e.unref(o)("form.config.hcv.fields.oauth2_client_id.label"),readonly:c.isReadonly,required:""},null,8,["modelValue","label","readonly"]),h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].oauth2_client_secret,"onUpdate:modelValue":r[56]||(r[56]=n=>a[e.unref(t).HCV].oauth2_client_secret=n),"data-testid":"vault-form-config-hcv-oauth2_client_secret",label:e.unref(o)("form.config.hcv.fields.oauth2_client_secret.label"),mode:T.value,readonly:c.isReadonly,required:T.value==="create"},null,8,["modelValue","label","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].oauth2_client_secret,"onUpdate:modelValue":r[55]||(r[55]=n=>a[e.unref(t).HCV].oauth2_client_secret=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_client_secret",label:e.unref(o)("form.config.hcv.fields.oauth2_client_secret.label"),readonly:c.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])),e.createVNode(m,{modelValue:a[e.unref(t).HCV].jwt_role,"onUpdate:modelValue":r[57]||(r[57]=n=>a[e.unref(t).HCV].jwt_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-jwt_role",label:e.unref(o)("form.config.hcv.fields.jwt_role.label"),"label-attributes":{info:e.unref(o)("form.config.hcv.fields.jwt_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_token_endpoint,"onUpdate:modelValue":r[58]||(r[58]=n=>a[e.unref(t).HCV].oauth2_token_endpoint=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_token_endpoint",label:e.unref(o)("form.config.hcv.fields.oauth2_token_endpoint.label"),readonly:c.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_audiences,"onUpdate:modelValue":r[59]||(r[59]=n=>a[e.unref(t).HCV].oauth2_audiences=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_audiences",label:e.unref(o)("form.config.hcv.fields.oauth2_audiences.label"),"label-attributes":{info:e.unref(o)("form.config.hcv.fields.oauth2_audiences.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])])):e.createCommentVNode("",!0),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:11,modelValue:a[e.unref(t).HCV].base64_decode,"onUpdate:modelValue":r[60]||(r[60]=n=>a[e.unref(t).HCV].base64_decode=n),"data-testid":"vault-form-config-hcv-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).AZURE?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).AZURE].location,"onUpdate:modelValue":r[61]||(r[61]=n=>a[e.unref(t).AZURE].location=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-location",label:e.unref(o)("form.config.azure.fields.location.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].vault_uri,"onUpdate:modelValue":r[62]||(r[62]=n=>a[e.unref(t).AZURE].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-uri",label:e.unref(o)("form.config.azure.fields.vault_uri.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].credentials_prefix,"onUpdate:modelValue":r[63]||(r[63]=n=>a[e.unref(t).AZURE].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-prefix",label:e.unref(o)("form.config.azure.fields.credential_prefix.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(J,{modelValue:a[e.unref(t).AZURE].type,"onUpdate:modelValue":r[64]||(r[64]=n=>a[e.unref(t).AZURE].type=n),"data-testid":"vault-form-config-azure-type",items:ee,label:e.unref(o)("form.config.azure.fields.type.label"),placeholder:e.unref(o)("form.config.azure.fields.type.placeholder"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].client_id,"onUpdate:modelValue":r[65]||(r[65]=n=>a[e.unref(t).AZURE].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-client-id",label:e.unref(o)("form.config.azure.fields.client_id.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].tenant_id,"onUpdate:modelValue":r[66]||(r[66]=n=>a[e.unref(t).AZURE].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-tenant-id",label:e.unref(o)("form.config.azure.fields.tenant_id.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).AZURE].base64_decode,"onUpdate:modelValue":r[67]||(r[67]=n=>a[e.unref(t).AZURE].base64_decode=n),"data-testid":"vault-form-config-azure-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).AZURE_CERTS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE_CERTS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].vault_uri,"onUpdate:modelValue":r[68]||(r[68]=n=>a[e.unref(t).AZURE_CERTS].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-vault-uri",label:e.unref(o)("form.config.azure-certs.fields.vault_uri.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].credentials_prefix,"onUpdate:modelValue":r[69]||(r[69]=n=>a[e.unref(t).AZURE_CERTS].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-credentials-prefix",label:e.unref(o)("form.config.azure-certs.fields.credential_prefix.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].client_id,"onUpdate:modelValue":r[70]||(r[70]=n=>a[e.unref(t).AZURE_CERTS].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-client-id",label:e.unref(o)("form.config.azure-certs.fields.client_id.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].tenant_id,"onUpdate:modelValue":r[71]||(r[71]=n=>a[e.unref(t).AZURE_CERTS].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-tenant-id",label:e.unref(o)("form.config.azure-certs.fields.tenant_id.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):e.createCommentVNode("",!0),u.value===e.unref(t).CONJUR?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).CONJUR}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].endpoint_url,"onUpdate:modelValue":r[72]||(r[72]=n=>a[e.unref(t).CONJUR].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-endpoint_url",label:e.unref(o)("form.config.conjur.fields.endpoint_url.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].login,"onUpdate:modelValue":r[73]||(r[73]=n=>a[e.unref(t).CONJUR].login=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-login",label:e.unref(o)("form.config.conjur.fields.login.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.login.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].account,"onUpdate:modelValue":r[74]||(r[74]=n=>a[e.unref(t).CONJUR].account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-account",label:e.unref(o)("form.config.conjur.fields.account.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.account.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":r[76]||(r[76]=n=>a[e.unref(t).CONJUR].api_key=n),"data-testid":"vault-form-config-conjur-api_key",label:e.unref(o)("form.config.conjur.fields.api_key.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.api_key.tooltip"),tooltipAttributes:{maxWidth:"400"}},mode:T.value,readonly:c.isReadonly,required:T.value==="create"},null,8,["modelValue","label","label-attributes","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":r[75]||(r[75]=n=>a[e.unref(t).CONJUR].api_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-api_key",label:e.unref(o)("form.config.conjur.fields.api_key.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.api_key.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"])),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:2,modelValue:a[e.unref(t).CONJUR].base64_decode,"onUpdate:modelValue":r[77]||(r[77]=n=>a[e.unref(t).CONJUR].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).FS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).FS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).FS].prefix,"onUpdate:modelValue":r[78]||(r[78]=n=>a[e.unref(t).FS].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-fs-prefix",label:e.unref(o)("form.config.fs.fields.prefix.label"),"label-attributes":{info:e.unref(o)("form.config.fs.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).FS].base64_decode,"onUpdate:modelValue":r[79]||(r[79]=n=>a[e.unref(t).FS].base64_decode=n),"data-testid":"vault-form-config-fs-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.config.ttl?(e.openBlock(),e.createElementBlock("div",dt,[G.value?(e.openBlock(),e.createBlock(ge,{key:0,class:"advanced-fields-collapse","data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(o)("form.config.advancedFields.title")},{default:e.withCtx(()=>[e.createElementVNode("div",ft,[e.createElementVNode("div",ut,[e.createVNode(m,{modelValue:a[u.value].ttl,"onUpdate:modelValue":r[80]||(r[80]=n=>a[u.value].ttl=n),"data-testid":"vault-ttl-input",label:e.unref(o)("form.config.advancedFields.ttl"),"label-attributes":{info:e.unref(o)("form.config.advancedFields.ttlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])]),e.createElementVNode("div",pt,[e.createVNode(m,{modelValue:a[u.value].neg_ttl,"onUpdate:modelValue":r[81]||(r[81]=n=>a[u.value].neg_ttl=n),"data-testid":"vault-neg-ttl-input",label:e.unref(o)("form.config.advancedFields.negTtl"),"label-attributes":{info:e.unref(o)("form.config.advancedFields.negTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])]),e.createElementVNode("div",mt,[e.createElementVNode("div",_t,[e.createVNode(m,{modelValue:a[u.value].resurrect_ttl,"onUpdate:modelValue":r[82]||(r[82]=n=>a[u.value].resurrect_ttl=n),"data-testid":"vault-resurrect-ttl-input",label:e.unref(o)("form.config.advancedFields.resurrectTtl"),"label-attributes":{info:e.unref(o)("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(_.EntityFormSection),{description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:c.fields.prefix,"onUpdate:modelValue":r[83]||(r[83]=n=>c.fields.prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-prefix",help:e.unref(o)(h.value?"form.fields.prefix_ai_gateway.help":"form.fields.prefix.help"),label:e.unref(o)(h.value?"form.fields.prefix_ai_gateway.label":"form.fields.prefix.label"),"label-attributes":{info:e.unref(o)(h.value?"form.fields.prefix_ai_gateway.tooltip":"form.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)(h.value?"form.fields.prefix_ai_gateway.placeholder":"form.fields.prefix.placeholder"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"]),e.createVNode(_e,{modelValue:c.fields.description,"onUpdate:modelValue":r[84]||(r[84]=n=>c.fields.description=n),modelModifiers:{trim:!0},"character-limit":1e3,class:"vault-form-textarea","data-testid":"vault-form-description",label:e.unref(o)("form.fields.description.label"),placeholder:e.unref(o)("form.fields.description.placeholder"),readonly:c.isReadonly},null,8,["modelValue","label","placeholder","readonly"]),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:0,modelValue:c.fields.tags,"onUpdate:modelValue":r[85]||(r[85]=n=>c.fields.tags=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-tags",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])),h.value?e.renderSlot(d.$slots,"labels",{key:1,disabled:c.isReadonly,labelList:c.fields.labelList,updateLabelList:j},void 0,!0):e.createCommentVNode("",!0)]),_:3},8,["description","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","tabs-to-hide"])])}}}),[["__scopeId","data-v-cadc7f7d"]]),yt={class:"kong-ui-vault-entity-config-card"},ve="************",bt=e.defineComponent({__name:"VaultConfigCard",props:{config:{type:Object,required:!0,validator:l=>!(!l||!["konnect","kongManager"].includes(l?.app)||l.app==="konnect"&&l.apiType!=="aiGateway"&&!l.controlPlaneId||l.app==="kongManager"&&typeof l.workspace!="string"||l.apiType==="aiGateway"&&!l.aiGatewayId||!l.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(l){const g=l,i=["token","approle_secret_id","api_key","aws_access_key_id","aws_secret_access_key","aws_auth_nonce","cert_auth_cert_key","oauth2_client_secret"],s=e.computed(()=>g.config.apiType==="aiGateway"),f=e.computed(()=>(s.value?Q.form.aiGateway?.edit:Q.form[g.config?.app]?.edit)?.replace(/{aiGatewayId}/gi,g.config.aiGatewayId||"")),o=x=>s.value?Ve(x):x,{i18n:{t:S}}=fe.useI18n(),{convertKeyToTitle:A}=_.useStringHelpers(),{getPropValue:y}=_.useHelpers(),h=e.computed(()=>({id:{},name:{label:S(s.value?"labels.vault_type_ai_gateway":"labels.vault_type")},updated_at:{},created_at:{},prefix:{order:5,section:_.ConfigurationSchemaSection.Basic,label:s.value?S("labels.vault_name_ai_gateway"):void 0},description:{order:6,section:_.ConfigurationSchemaSection.Basic},...s.value?{}:{tags:{order:7}},config:{order:8,type:_.ConfigurationSchemaType.Json}})),w=x=>{const c={...x.config};i.forEach(u=>{u in c&&(c[u]=ve)});const N={...x,config:c};if(s.value){const u={...N,type:N.name,name:N.prefix};return delete u.prefix,u}return N},C=x=>h.value?.[x]?.label||A(x);return(x,c)=>(e.openBlock(),e.createElementBlock("div",yt,[e.createVNode(e.unref(_.EntityBaseConfigCard),{"code-block-record-formatter":w,config:l.config,"config-card-doc":l.configCardDoc,"config-schema":h.value,"entity-type":e.unref(_.SupportedEntityType).Vault,"fetch-url":f.value,"formats-to-hide":l.config.apiType==="aiGateway"?["terraform","deck"]:[],"hide-title":l.hideTitle,"record-resolver":o,"onFetch:error":c[0]||(c[0]=N=>x.$emit("fetch:error",N)),"onFetch:success":c[1]||(c[1]=N=>x.$emit("fetch:success",N)),onLoading:c[2]||(c[2]=N=>x.$emit("loading",N))},{config:e.withCtx(({rowValue:N})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(N).sort(),u=>(e.openBlock(),e.createBlock(e.unref(_.ConfigCardItem),{key:u,item:{key:u,value:i.includes(u)?ve:e.unref(y)(u,N),label:C(u)}},null,8,["item"]))),128))]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","formats-to-hide","hide-title"])]))}}),ht="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Ne="/v2/control-planes/{controlPlaneId}/{workspace}/config-stores",ke="/v1/ai-gateways/{aiGatewayId}",L={getVault:{konnect:`${ht}/vaults/{id}`,aiGateway:`${ke}/vaults/{id}`},list:{konnect:`${Ne}/{id}/secrets`,aiGateway:`${ke}/config-stores/{id}/secrets`},form:{konnect:{create:`${Ne}/{id}/secrets`,edit:`${Ne}/{id}/secrets/{secretId}`},aiGateway:{create:`${ke}/config-stores/{id}/secrets`,edit:`${ke}/config-stores/{id}/secrets/{secretId}`}}},Vt={class:"table-content-overflow-wrapper"},kt=ce(e.defineComponent({inheritAttrs:!1,__name:"SecretListInner",props:{config:{type:Object,required:!0,validator:l=>!(!l||l?.app!=="konnect"||!l.createRoute||!l.getEditRoute||l.apiType==="aiGateway"&&!l.aiGatewayId)},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(l,{emit:g}){const i=g,s=l,{i18n:{t:f,formatUnixTimeStamp:o}}=fe.useI18n(),{axiosInstance:S}=_.useAxios(s.config?.axiosRequestConfig),y={key:{label:f("secrets.list.table_headers.key"),sortable:!1,hidable:!1},updated_at:{label:f("secrets.list.table_headers.updated_at"),sortable:!1}},h=H=>({"data-testid":H.key}),w=e.computed(()=>s.config.apiType==="aiGateway"?L.list.aiGateway:L.list[s.config.app]),C=e.computed(()=>`${s.config.apiBaseUrl}${w.value}`.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"").replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.configStoreId||"")),x=e.ref(""),c={isExactMatch:!0,placeholder:f("search.placeholder_for_secrets.konnect")},{fetcher:N,fetcherState:u,fetcherCacheKey:O}=_.useFetcher(e.computed(()=>({...s.config,cacheIdentifier:s.cacheIdentifier})),C),$=()=>{x.value=""},W=e.ref(null),oe=H=>({label:f("actions.edit"),to:s.config.getEditRoute(H)}),j=e.ref(void 0),G=e.ref(!1),Y=e.ref(!1),V=e.ref(""),a=_.useDeleteUrlBuilder(s.config,C.value),Z=H=>{j.value=H,G.value=!0},se=()=>{G.value=!1},ee=async()=>{if(j.value?.key){Y.value=!0;try{await S.delete(a(j.value.key)),Y.value=!1,G.value=!1,O.value++,i("delete:success",j.value)}catch(H){V.value=H.response?.data?.message||H.message||f("errors.delete"),i("error",H)}finally{Y.value=!1}}};e.watch(u,H=>{if(H.status===_.FetcherStatus.Error){W.value={title:f("errors.general")},H.error?.response?.data?.message&&(W.value.message=H.error.response.data.message),i("error",H.error);return}W.value=null});const re=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${f("secrets.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:f("secrets.title")});return e.onBeforeMount(async()=>{await s.canCreate()&&(re.value.title=f("secrets.list.empty_state.title"),re.value.ctaText=f("secrets.list.toolbar_actions.new_secret"))}),(H,q)=>{const T=e.resolveComponent("KButton"),X=e.resolveComponent("KDropdownItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":l.cacheIdentifier,"disable-sorting":"","empty-state-options":re.value,"enable-entity-actions":"","error-message":W.value,fetcher:e.unref(N),"fetcher-cache-key":e.unref(O),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-secrets-list",query:x.value,"row-attributes":h,"table-headers":e.unref(y),onClearSearchInput:$},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:x.value,"onUpdate:modelValue":q[0]||(q[0]=M=>x.value=M),config:c},null,8,["modelValue"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canCreate()},{default:e.withCtx(()=>[e.createVNode(T,{appearance:"primary","data-testid":"toolbar-add-secret",size:"large",to:l.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(K.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("secrets.list.toolbar_actions.new_secret")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),key:e.withCtx(({rowValue:M})=>[e.createElementVNode("div",Vt,[e.createElementVNode("b",null,e.toDisplayString(M??"-"),1)])]),updated_at:e.withCtx(({rowValue:M})=>[e.createElementVNode("span",null,e.toDisplayString(M?e.unref(o)(new Date(M).getTime()/1e3):"-"),1)]),actions:e.withCtx(({row:M})=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canEdit(M)},{default:e.withCtx(()=>[e.createVNode(X,{"data-testid":"action-entity-edit",item:oe(M.key)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canDelete(M)},{default:e.withCtx(()=>[e.createVNode(X,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:ue=>Z(M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("actions.delete")),1)]),_:1},8,["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(_.EntityDeleteModal),{"action-pending":Y.value,description:e.unref(f)("delete.description"),"entity-name":j.value&&j.value.key,"entity-type":e.unref(_.EntityTypes).Secret,error:V.value,title:e.unref(f)("delete.title_for_secret"),visible:G.value,onCancel:se,onProceed:ee},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])],64)}}}),[["__scopeId","data-v-115ca40d"]]),wt={class:"kong-ui-entities-secrets-list"},Ct=ce(e.defineComponent({__name:"SecretList",props:{config:{type:Object,required:!0,validator:l=>!(!l||l?.app!=="konnect"||!l.createRoute||!l.getEditRoute||l.apiType==="aiGateway"&&!l.aiGatewayId)},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(l,{emit:g}){const i=g,s=l,f=w=>{i("error",w)},o=w=>{i("delete:success",w)},{axiosInstance:S}=_.useAxios(s.config?.axiosRequestConfig),A=e.ref(""),y=e.computed(()=>s.config.apiType==="aiGateway"?L.getVault.aiGateway:L.getVault[s.config.app]),h=e.computed(()=>`${s.config.apiBaseUrl}${y.value}`.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"").replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.vaultId));return e.onBeforeMount(async()=>{try{const{data:w}=await S.get(h.value);A.value=w?.config?.config_store_id}catch(w){i("error",w)}}),(w,C)=>(e.openBlock(),e.createElementBlock("div",wt,[A.value?(e.openBlock(),e.createBlock(kt,e.mergeProps({key:0},s,{"config-store-id":A.value,"onDelete:success":o,onError:f}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-e9c157a0"]]),Et=ce(e.defineComponent({inheritAttrs:!1,__name:"SecretFormInner",props:{config:{type:Object,required:!0,validator:l=>!(!l||l.app!=="konnect"||l.apiType!=="aiGateway"&&!l.controlPlaneId||!l.cancelRoute||l.apiType==="aiGateway"&&!l.aiGatewayId)},configStoreId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(l,{emit:g}){const i=l,s=g,{i18n:{t:f}}=fe.useI18n(),o=Ce.useRouter(),{axiosInstance:S}=_.useAxios(i.config?.axiosRequestConfig),{getMessageFromError:A}=_.useErrors(),y=e.reactive({fields:{key:"",value:""},readonly:!1,errorMessage:""}),h=e.reactive({key:"",value:""}),w=e.computed(()=>i.config.apiType==="aiGateway"?L.form.aiGateway:L.form[i.config.app]),C=e.computed(()=>w.value?.edit.replace(/{aiGatewayId}/gi,i.config.aiGatewayId||"").replace(/{id}/gi,i.configStoreId).replace(/{secretId}/gi,i.secretId)),x=()=>{o.push(i.config?.cancelRoute||{name:"secret-list"})},c=V=>{s("loading",V)},N=V=>{s("error",V)},u=V=>{y.fields.key=V?.item?.key||V?.key||"",y.fields.value=V?.item?.value||V?.value||"",Object.assign(h,y.fields)},O=e.computed(()=>i.secretId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),$=e.computed(()=>O.value===_.EntityBaseFormType.Edit?"edit":"create"),W=e.computed(()=>`${i.config.apiBaseUrl}${w.value[O.value]}`.replace(/{aiGatewayId}/gi,i.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"").replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:"").replace(/{id}/gi,i.configStoreId).replace(/{secretId}/gi,i.secretId)),oe=e.computed(()=>!!y.fields.key&&!!y.fields.value),j=e.computed(()=>JSON.stringify(y.fields)!==JSON.stringify(h)),G=e.computed(()=>({key:y.fields.key,value:y.fields.value})),Y=async()=>{try{y.readonly=!0;let V;if(O.value==="create")V=await S.post(W.value,G.value);else if(O.value==="edit"){const a=i.config.apiType==="aiGateway"?{value:G.value.value}:G.value;V=await S.put(W.value,a)}u(V?.data),s("update",V?.data)}catch(V){y.errorMessage=A(V),s("error",V)}finally{y.readonly=!1}};return(V,a)=>{const Z=e.resolveComponent("KInput"),se=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(e.unref(_.EntityBaseForm),{"can-submit":oe.value&&j.value,config:l.config,"edit-id":l.secretId,"entity-type":e.unref(_.SupportedEntityType).Other,"error-message":y.errorMessage,"fetch-url":C.value,"form-fields":G.value,"is-readonly":y.readonly,onCancel:x,"onFetch:error":N,"onFetch:success":u,onLoading:c,onSubmit:Y},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(f)("secrets.form.info.description"),"has-divider":"",title:e.unref(f)("secrets.form.info.title")},{default:e.withCtx(()=>[e.createVNode(Z,{modelValue:y.fields.key,"onUpdate:modelValue":a[0]||(a[0]=ee=>y.fields.key=ee),modelModifiers:{trim:!0},autocomplete:"off",class:"key-field","data-testid":"secret-form-key",disabled:O.value===e.unref(_.EntityBaseFormType).Edit,label:e.unref(f)("secrets.form.fields.key.label"),placeholder:e.unref(f)("secrets.form.fields.key.placeholder"),readonly:y.readonly,required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(e.unref(_.SensitiveInput),{modelValue:y.fields.value,"onUpdate:modelValue":a[1]||(a[1]=ee=>y.fields.value=ee),modelModifiers:{trim:!0},"data-testid":"secret-form-value",label:e.unref(f)("secrets.form.fields.value.label"),labels:{rotateLabel:e.unref(f)("secrets.form.fields.value.rotateLabel")},mode:$.value,multiline:"",placeholder:e.unref(f)("secrets.form.fields.value.placeholder"),readonly:y.readonly,required:""},null,8,["modelValue","label","labels","mode","placeholder","readonly"]),e.createVNode(se,{appearance:"warning",message:e.unref(f)("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-6ff371de"]]),xt={class:"kong-ui-entities-secret-form"},At=ce(e.defineComponent({__name:"SecretForm",props:{config:{type:Object,required:!0,validator:l=>!(!l||l.app!=="konnect"||l.apiType!=="aiGateway"&&!l.controlPlaneId||!l.cancelRoute||l.apiType==="aiGateway"&&!l.aiGatewayId)},vaultId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(l,{emit:g}){const i=l,s=g,f=C=>{s("update",C)},o=C=>{s("error",C)},S=C=>{s("loading",C)},{axiosInstance:A}=_.useAxios(i.config?.axiosRequestConfig),y=e.ref(""),h=e.computed(()=>i.config.apiType==="aiGateway"?L.getVault.aiGateway:L.getVault[i.config.app]),w=e.computed(()=>`${i.config.apiBaseUrl}${h.value}`.replace(/{aiGatewayId}/gi,i.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"").replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:"").replace(/{id}/gi,i.vaultId));return e.onBeforeMount(async()=>{try{const{data:C}=await A.get(w.value);y.value=C?.config?.config_store_id}catch(C){s("error",C)}}),(C,x)=>(e.openBlock(),e.createElementBlock("div",xt,[y.value?(e.openBlock(),e.createBlock(Et,e.mergeProps({key:0},i,{"config-store-id":y.value,onError:o,onLoading:S,onUpdate:f}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-1651a0c6"]]),Nt={class:"vault-secret-picker-provider"},Rt=ce(e.defineComponent({__name:"VaultSecretPickerProvider",props:{value:{},disabled:{type:Boolean},update:{type:Function}},emits:["open"],setup(l,{emit:g}){const i=l,s=g,{i18n:{t:f},i18nT:o}=fe.useI18n();return(S,A)=>(e.openBlock(),e.createElementBlock("div",Nt,[e.createVNode(e.unref(o),{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:i.disabled}),onClick:A[0]||(A[0]=()=>!i.disabled&&s("open",i.value,i.update))},e.toDisplayString(e.unref(f)("vault_secret_picker.provider.cta")),3)]),_:1})]))}}),[["__scopeId","data-v-fdd70514"]]),St=l=>{let g=l.trim();if(!g.startsWith("{")||!g.endsWith("}"))throw new Error("Invalid secret reference: must be enclosed in curly braces");if(g=g.substring(1,g.length-1).trim(),!g.startsWith("vault://"))throw new Error("Invalid secret reference: must start with vault://");const i=new URL(`http://${g.substring(8)}`);if(!i)throw new Error("Invalid secret reference: must have a vault prefix");const s=i.host,[,f,...o]=i.pathname.split("/");if(!s)throw new Error("Invalid secret reference: must have a vault prefix");return{vaultPrefix:s,secretId:f||void 0,optionalSecretKey:o?.join("/")}},It=l=>{if(!l.vaultPrefix)throw new Error("Invalid secret reference: must have a vault prefix");let g=`vault://${l.vaultPrefix}`;return l.secretId&&(g=`${g}/${l.secretId}`),l.optionalSecretKey&&(g=`${g}/${l.optionalSecretKey}`),`{${g}}`},vt={key:1,class:"inputs-wrapper"},Ut={"data-testid":"no-search-results"},Tt={class:"k-select-selected-item-label"},Ht={class:"vault-secret-picker-vault-dropdown-item"},Bt={class:"select-item-label"},Mt={class:"select-item-description"},$t={class:"select-item-description"},Pt={"data-testid":"no-search-results"},Gt=ce(e.defineComponent({__name:"VaultSecretPicker",props:{config:{type:Object,required:!0,validator:l=>!(!l||!["konnect","kongManager"].includes(l?.app)||l.app==="konnect"&&l.apiType!=="aiGateway"&&!l.controlPlaneId||l.app==="kongManager"&&typeof l.workspace!="string"||l.apiType==="aiGateway"&&!l.aiGatewayId)},setup:{type:null,required:!1,default:!1},title:{type:String,required:!1,default:void 0},proceedButtonText:{type:String,required:!1,default:void 0},additionalDisabled:{type:Boolean,required:!1,default:!1},allowedProviders:{type:Array,required:!1,default:void 0},showSecretKey:{type:Boolean,required:!1,default:!0}},emits:["proceed","cancel"],setup(l,{emit:g}){const{i18n:{t:i}}=fe.useI18n(),s=l,f=g,{axiosInstance:o}=_.useAxios({validateStatus:k=>k===404||k>=200&&k<300,...s.config?.axiosRequestConfig}),S=e.ref(!1),A=e.ref(""),y=e.ref(""),h=e.ref(""),w=e.ref(),C=e.computed(()=>s.config.apiType==="aiGateway"),x=k=>k.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||""),c=e.computed(()=>C.value?x(Q.list.aiGateway.getAll):Q.list[s.config.app].getAll),N=e.computed(()=>C.value?x(L.list.aiGateway).replace(/{id}/gi,w.value?.config?.config_store_id??""):s.config.app==="konnect"?L.list[s.config.app].replace(/{id}/gi,w.value?.config?.config_store_id??""):"<not_applicable>"),u=e.computed(()=>{if(W&&V)return i("vault_secret_picker.fetch_error.vaults_and_secrets");if(W)return i("vault_secret_picker.fetch_error.vaults");if(V)return i("vault_secret_picker.fetch_error.secrets")}),{debouncedQueryChange:O,loading:$,error:W,loadItems:oe,results:j}=_.useDebouncedFilter(s.config,c,void 0,{fetchedItemsKey:"data",searchKeys:C.value?["name"]:["prefix"]}),{debouncedQueryChange:G,loading:Y,error:V,loadItems:a,results:Z}=_.useDebouncedFilter(s.config,N,void 0,{fetchedItemsKey:"data",searchKeys:["key"],exactMatchKey:"key"}),se=k=>s.allowedProviders?.length?s.allowedProviders.includes(k):k!==t.AZURE_CERTS,ee=e.computed(()=>C.value?(j.value??[]).map(k=>Ve(k)):j.value??[]),re=e.computed(()=>{let k=!1;const E=(ee.value??[]).filter(I=>se(I.name)).map(I=>(I.prefix===A.value&&(k=!0),{label:I.prefix,value:I.prefix,vault:I}));return!k&&w.value&&E.push({label:w.value.prefix,value:w.value.prefix,vault:w.value}),E}),H=e.computed(()=>{let k=!1;const E=Z.value?.map(I=>(I.key===y.value&&(k=!0),{label:I.key,value:I.key}))??[];return!k&&y.value&&E.push({label:y.value,value:y.value}),E}),q=e.computed(()=>w?.value?.name==="konnect"),T=e.computed(()=>!!w.value&&!!y.value&&!s.additionalDisabled),X=k=>k.label?`${k.label} - (${k.vault.name} - ${k.vault.id})`:k.value,M=k=>{const E=C.value?Q.form.aiGateway.edit:Q.form[s.config.app].edit;let I=`${s.config.apiBaseUrl}${E}`;return s.config.app==="konnect"&&(I=I.replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"")),x(I).replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,k)},ue=(k,E)=>{if(s.config.app!=="konnect")return"<not_applicable>";const I=C.value?L.form.aiGateway.edit:L.form[s.config.app].edit;return x(`${s.config.apiBaseUrl}${I}`).replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"").replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,E).replace(/{secretId}/gi,k)},te=()=>{f("proceed",It({vaultPrefix:A.value,secretId:y.value||void 0,optionalSecretKey:h.value||void 0}))};return e.watch(()=>s.setup,async k=>{if(k!==!1){if(S.value=!0,A.value="",w.value=void 0,y.value="",h.value="",typeof k=="string"&&k.trim().length>0)try{let E,I="",ae="",ne="";const P=St(k),{data:R}=await o.get(M(P.vaultPrefix)),b=R&&C.value?Ve(R):R;if(b?.name)if(E=b,I=P.vaultPrefix,E.name==="konnect"){if(P.secretId){const{data:v}=await o.get(ue(P.secretId,b.config.config_store_id));v.key===P.secretId&&(ae=P.secretId,ne=P.optionalSecretKey??"")}}else ae=P.secretId??"",ne=P.optionalSecretKey??"";await e.nextTick(()=>{A.value=I,w.value=E,y.value=ae,h.value=ne})}catch(E){console.debug(E)}S.value=!1,await oe()}},{immediate:!0}),e.watch(A,async(k,E)=>{S.value||k===E||(w.value=re.value.find(I=>I.value===k)?.vault,y.value="",h.value="")}),e.watch(N,async()=>{q.value&&await a()},{immediate:!0}),(k,E)=>{const I=e.resolveComponent("KEmptyState"),ae=e.resolveComponent("KSelect"),ne=e.resolveComponent("KInput"),P=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(P,{"action-button-disabled":!T.value,"action-button-text":l.proceedButtonText||e.unref(i)("vault_secret_picker.actions.use_key"),class:"vault-secret-picker","data-testid":"vault-secret-picker-modal",title:l.title||e.unref(i)("vault_secret_picker.title"),visible:s.setup!==!1,onCancel:E[4]||(E[4]=()=>f("cancel")),onProceed:te},{default:e.withCtx(()=>[e.unref(W)||e.unref(V)?(e.openBlock(),e.createBlock(I,{key:0,"data-testid":"vault-secret-picker-fetch-error","icon-variant":"error",message:u.value},null,8,["message"])):(e.openBlock(),e.createElementBlock("div",vt,[e.renderSlot(k.$slots,"form-prefix",{},void 0,!0),e.createVNode(ae,{modelValue:A.value,"onUpdate:modelValue":E[0]||(E[0]=R=>A.value=R),clearable:"","data-testid":"vault-secret-picker-vault-select",disabled:S.value,"enable-filtering":"","filter-function":()=>!0,items:re.value,"kpop-attributes":{"data-testid":"vault-secret-picker-vault-popover"},label:e.unref(i)("vault_secret_picker.vault.label"),loading:e.unref($),placeholder:e.unref(i)("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(i)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",Ut,e.toDisplayString(e.unref(i)("vault_secret_picker.no_results")),1)]),"selected-item-template":e.withCtx(({item:R})=>[e.createElementVNode("span",Tt,e.toDisplayString(X(R)),1)]),"item-template":e.withCtx(({item:R})=>[e.createElementVNode("div",Ht,[e.createElementVNode("span",Bt,e.toDisplayString(R.label),1),e.createElementVNode("span",Mt,e.toDisplayString(R.vault.name),1),e.createElementVNode("span",$t,e.toDisplayString(R.vault.id),1)])]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"]),q.value?(e.openBlock(),e.createBlock(ae,{key:0,modelValue:y.value,"onUpdate:modelValue":E[1]||(E[1]=R=>y.value=R),clearable:"","data-testid":"vault-secret-picker-secret-id-select",disabled:S.value||!w.value,"enable-filtering":"","filter-function":()=>!0,items:H.value,"kpop-attributes":{"data-testid":"vault-secret-picker-secret-id-popover"},label:e.unref(i)("vault_secret_picker.secret_id.label"),loading:e.unref(Y),placeholder:e.unref(i)("vault_secret_picker.secret_id.select_placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(G)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(i)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",Pt,e.toDisplayString(e.unref(i)("vault_secret_picker.no_results")),1)]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"])):(e.openBlock(),e.createBlock(ne,{key:1,modelValue:y.value,"onUpdate:modelValue":E[2]||(E[2]=R=>y.value=R),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-id-input",disabled:S.value||!w.value,label:e.unref(i)("vault_secret_picker.secret_id.label"),placeholder:e.unref(i)("vault_secret_picker.secret_id.input_placeholder"),required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder"])),l.showSecretKey?(e.openBlock(),e.createBlock(ne,{key:2,modelValue:h.value,"onUpdate:modelValue":E[3]||(E[3]=R=>h.value=R),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-key-input",disabled:S.value||!w.value,help:e.unref(i)("vault_secret_picker.optional_secret_key.help"),label:e.unref(i)("vault_secret_picker.optional_secret_key.label"),placeholder:e.unref(i)("vault_secret_picker.optional_secret_key.placeholder"),type:"text"},null,8,["modelValue","disabled","help","label","placeholder"])):e.createCommentVNode("",!0)]))]),_:3},8,["action-button-disabled","action-button-text","title","visible"])}}}),[["__scopeId","data-v-2ab21bd2"]]);B.SecretForm=At,B.SecretList=Ct,B.VaultAuthMethods=p,B.VaultConfigCard=bt,B.VaultForm=gt,B.VaultList=De,B.VaultProviders=t,B.VaultSecretPicker=Gt,B.VaultSecretPickerProvider=Rt,B.secretsEndpoints=L,B.vaultsEndpoints=Q,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(B,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):(B=typeof globalThis<"u"?globalThis:B||self,e(B["kong-ui-public-entities-vaults"]={},B.Vue,B.VueRouter,B.KongIcons,B["kong-ui-public-entities-shared"],B["kong-ui-public-i18n"]))})(this,(function(B,e,Ce,K,_,Re){"use strict";const Te={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",prefix_ai_gateway:"Name",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",learn_more:"Learn more"}}},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",rotateLabel:"Rotate value"}},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",vault_type_ai_gateway:"Type",vault_name_ai_gateway:"Name"},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 reference prefix. You need this prefix to access secrets stored in this vault. For example, {vault://<your-prefix>/<some-secret>}."},prefix_ai_gateway:{label:"Name",placeholder:"Enter a unique name for this vault",help:"e.g. my-vault",tooltip:"The reference name. You need this name to access secrets stored in this vault. For example, {vault://<your-name>/<some-secret>}."},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"},ssl_verify:{label:"SSL verify"},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"},aws_auth_role:{label:"AWS auth role"},aws_auth_region:{label:"AWS auth region"},aws_access_key_id:{label:"AWS access key ID"},aws_secret_access_key:{label:"AWS secret access key"},aws_auth_nonce:{label:"AWS auth nonce"},aws_login_path:{label:"AWS login path"},azure_auth_role:{label:"Azure auth role"},azure_login_path:{label:"Azure login path"},gcp_auth_role:{label:"GCP auth role"},gcp_login_path:{label:"GCP login path"},gcp_service_account:{label:"GCP service account"},gcp_jwt_exp:{label:"GCP JWT exp"},aws_sts_endpoint_url:{label:"AWS STS endpoint URL"},aws_assume_role_arn:{label:"AWS assume role ARN"},aws_role_session_name:{label:"AWS role session name"},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"},cert_auth_cert:{label:"Cert"},cert_auth_cert_key:{label:"Cert key",rotateLabel:"Rotate cert key",rotateAlert:"Once saved, the cert key value will not be visible."},cert_auth_role_name:{label:"Role name"},oauth2_audiences:{label:"OAuth2 audiences",tooltip:"Comma-separated list of OAuth2 audiences."},oauth2_client_id:{label:"OAuth2 client ID"},oauth2_client_secret:{label:"OAuth2 client secret"},jwt_role:{label:"JWT role",tooltip:"The configured role name in HashiCorp Vault for JWT auth. When creating the role in HashiCorp Vault, make sure that the `role_type` is `jwt` and the `token_policies` have permissions to read the secrets."},oauth2_token_endpoint:{label:"OAuth2 token endpoint"}}},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"}}},"azure-certs":{label:"Azure Key Vault (Certificates)",description:"Access certificates stored in Azure Key Vault for Kong Gateway TLS termination.",fields:{vault_uri:{label:"Vault URI"},credential_prefix:{label:"Credential prefix"},client_id:{label:"Client ID"},tenant_id:{label:"Tenant ID"}}},conjur:{label:"CyberArk Secrets Manager (Conjur)",description:"Access secrets stored in CyberArk Secrets Manager (Conjur) for Kong Gateway configuration.",fields:{endpoint_url:{label:"Server",tooltip:"The CyberArk Secrets Manager (Conjur) backend url. Accepts http or https."},login:{label:"Workload identity",tooltip:"Identity of the workload or host authenticating to CyberArk Secrets Manager (Conjur). In this case Kong is the workload/host."},api_key:{label:"API key",tooltip:"The API key issued to the workload."},account:{label:"Account",tooltip:"The CyberArk Secrets Manager (Conjur) account for which the token will be issued. This is the identifier provided during CyberArk Secrets Manager (Conjur) configuration."}}},fs:{label:"File system",description:"Access secrets stored in the file system.",fields:{prefix:{label:"File path prefix",tooltip:"The prefix path for the file vault referenced files."}}},advancedFields:{title:"View advanced fields",ttl:"TTL",ttlTooltip:`Time-to-live (in seconds) of a secret from the vault when it's cached. The special value of 0 means "no rotation" and it's the default. When using non-zero values, it is recommended that they're at least 1 minute.`,negTtl:"Negative TTL",negTtlTooltip:"Time-to-live (in seconds) of a vault miss (no secret). Negatively cached secrets will remain valid until neg_ttl is reached, after which Kong will attempt to refresh the secret again. The default value for neg_ttl is 0, meaning no negative caching occurs.",resurrectTtl:"Resurrect TTL",resurrectTtlTooltip:"Time (in seconds) for how long secrets will remain in use after they are expired (config.ttl is over). This is useful when a vault becomes unreachable, or when a secret is deleted from the Vault and isn't replaced immediately. On both cases, the Gateway will keep trying to refresh the secret for resurrect_ttl seconds. After that, it will stop trying to refresh. We recommend assigning a sufficiently high value to this configuration option to ensure a seamless transition in case there are unexpected issues with the Vault. The default value for resurrect_ttl is 1e8 seconds, which is about 3 years."},commonFields:{base64_decode:{label:"Base64 decode",tooltip:"Decode all secrets in this vault as base64, useful for binary data. If some of the secrets are not base64 encoded, an error will occur when using them. It's recommended to create a separate vault for base64 secrets."}}},unavailable:"This vault provider is available on Enterprise."},vault_secret_picker:{title:"Look up key in vault",vault:{label:"Vault",placeholder:"Select a vault"},secret_id:{label:"Secret ID",input_placeholder:"Enter a secret ID",select_placeholder:"Select or enter a complete secret ID"},optional_secret_key:{label:"Secret key",placeholder:"Enter the key or key path to access a nested secret value",help:"Optional. e.g. tokens, tokens/refresh_token"},fetch_error:{vaults:"Could not fetch available vaults",secrets:"Could not fetch available secrets",vaults_and_secrets:"Could not fetch available vaults and secrets"},no_results:"No results found",actions:{use_key:"Use key"},provider:{complete_action:"Look up {cta}",cta:"key in vault"}}};function He(){const l=Re.createI18n("en-us",Te);return{i18n:l,i18nT:Re.i18nTComponent(l)}}const fe={useI18n:He},Ee="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Se="/v2/control-planes/{controlPlaneId}/{workspace}/config-stores",xe="/{workspace}",he="/v1/ai-gateways/{aiGatewayId}",Q={list:{konnect:{getAll:`${Ee}/vaults`,deleteConfigStore:`${Se}/{id}?force=true`},kongManager:{getAll:`${xe}/vaults`},aiGateway:{getAll:`${he}/vaults`,deleteConfigStore:`${he}/config-stores/{id}?force=true`}},form:{konnect:{create:`${Ee}/vaults`,createConfigStore:Se,edit:`${Ee}/vaults/{id}`},kongManager:{create:`${xe}/vaults`,edit:`${xe}/vaults/{id}`},aiGateway:{create:`${he}/vaults`,edit:`${he}/vaults/{id}`,createConfigStore:`${he}/config-stores`}}};var t=(l=>(l.AWS="aws",l.GCP="gcp",l.HCV="hcv",l.ENV="env",l.AZURE="azure",l.AZURE_CERTS="azure-certs",l.KONNECT="konnect",l.CONJUR="conjur",l.FS="fs",l))(t||{}),p=(l=>(l.TOKEN="token",l.K8S="kubernetes",l.APP_ROLE="approle",l.CERT="cert",l.JWT="jwt",l.AWS_IAM="aws_iam",l.AWS_EC2="aws_ec2",l.AZURE="azure",l.GCP_GCE="gcp_gce",l.GCP_IAM="gcp_iam",l))(p||{});const Ie={[p.TOKEN]:{token:"token"},[p.CERT]:{cert_auth_cert:"cert",cert_auth_cert_key:"key",cert_auth_role_name:"role_name"},[p.JWT]:{jwt_role:"role",oauth2_token_endpoint:"token_endpoint",oauth2_client_id:"client_id",oauth2_client_secret:"client_secret",oauth2_audiences:"audiences"},[p.APP_ROLE]:{approle_auth_path:"path",approle_response_wrapping:"response_wrapping",approle_role_id:"role_id",approle_secret_id:"secret_id",approle_secret_id_file:"secret_id_file"},[p.K8S]:{kube_role:"role",kube_auth_path:"path",kube_api_token_file:"api_token_file"},[p.GCP_IAM]:{gcp_auth_role:"role",gcp_service_account:"service_account",gcp_jwt_exp:"jwt_exp",gcp_login_path:"login_path"},[p.GCP_GCE]:{gcp_auth_role:"role",gcp_login_path:"login_path"},[p.AWS_IAM]:{aws_auth_role:"role",aws_auth_region:"region",aws_login_path:"login_path",aws_access_key_id:"access_key_id",aws_secret_access_key:"secret_access_key",aws_sts_endpoint_url:"sts_endpoint_url",aws_assume_role_arn:"assume_role_arn",aws_role_session_name:"role_session_name"},[p.AWS_EC2]:{aws_auth_role:"role",aws_auth_nonce:"nonce",aws_login_path:"login_path"},[p.AZURE]:{azure_auth_role:"role",azure_login_path:"login_path"}},Be=["protocol","host","port","mount","kv","namespace","ssl_verify","auth_method","base64_decode","ttl","neg_ttl","resurrect_ttl"],Me=l=>Object.fromEntries(Object.entries(l).map(([g,i])=>[i,g])),$e=l=>l==null,Ae=l=>Object.fromEntries(Object.entries(l).filter(([,g])=>!$e(g))),Pe=l=>{const g=Ie[l.auth_method]??{},i={};for(const s of Be)s in l&&(i[s]=l[s]);for(const[s,d]of Object.entries(g))s in l&&(i[d]=l[s]);return Ae(i)},Ge=l=>{const g=l.name;let i=l.config??{};if(g===t.HCV)i=Pe(i);else if(g===t.CONJUR){const s={...i};delete s.auth_method,i=Ae(s)}else i=Ae(i);return{type:g,name:l.prefix,description:l.description??"",config:i}},Fe=l=>{const g=Me(Ie[l.auth_method]??{}),i={};for(const[s,d]of Object.entries(l))i[g[s]??s]=d;return i},Ve=l=>{const g=l?.type;let i=l?.config?{...l.config}:{};return g===t.HCV?i=Fe(i):g===t.CONJUR&&(i={...i,auth_method:"api_key"}),{id:l?.id,created_at:l?.created_at,updated_at:l?.updated_at,name:g,prefix:l?.name,description:l?.description??"",labels:Object.entries(l?.labels??{}).map(([s,d])=>`${s}: ${d}`),config:i}},Oe={class:"kong-ui-entities-vaults-list"},Ke={class:"button-row"},We={class:"table-content-overflow-wrapper"},je={class:"table-content-overflow-wrapper"},qe=e.defineComponent({__name:"VaultList",props:{config:{type:Object,required:!0,validator:l=>!(!l||!["konnect","kongManager"].includes(l?.app)||!l.createRoute||!l.getViewRoute||!l.getEditRoute||l.app==="kongManager"&&!l.isExactMatch&&!l.filterSchema||l.apiType==="aiGateway"&&!l.aiGatewayId)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(l,{emit:g}){const i=g,s=l,{i18n:{t:d}}=fe.useI18n(),o=Ce.useRouter(),S=e.computed(()=>s.config.apiType==="aiGateway"),A=e.computed(()=>S.value?"aiGateway":s.config.app),y=b=>b.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||""),{axiosInstance:h}=_.useAxios(s.config?.axiosRequestConfig),{hasRecords:w,handleStateChange:C}=_.useTableState(()=>$.value),x=e.computed(()=>w.value&&s.config.app==="konnect"),c=e.computed(()=>s.config.app!=="kongManager"||!!s.config.disableSorting),N={prefix:{label:d("vaults.list.table_headers.prefix"),searchable:!0,sortable:!0,hidable:!1},name:{label:d("vaults.list.table_headers.name"),searchable:!0,sortable:!0},description:{label:d("vaults.list.table_headers.description"),sortable:!1},tags:{label:d("vaults.list.table_headers.tags"),sortable:!1}},f=e.computed(()=>{if(S.value){const{description:b,name:v,prefix:F}=N;return{prefix:{...F,label:d("vaults.list.table_headers.prefix_ai_gateway")},name:v,description:b}}return N}),O=e.computed(()=>{let b=`${s.config.apiBaseUrl}${Q.list[A.value].getAll}`;return s.config.app==="konnect"&&(b=b.replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"")),y(b).replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"")}),$=e.ref(""),W=e.computed(()=>{if(s.config.app==="konnect"||s.config.isExactMatch)return{isExactMatch:!0,placeholder:d("search.placeholder_for_vaults.konnect")};const{prefix:v,name:F}=N;return{isExactMatch:!1,fields:{name:F,prefix:v},schema:s.config.filterSchema}}),{fetcher:oe,fetcherState:j,fetcherCacheKey:G}=_.useFetcher(e.computed(()=>({...s.config,cacheIdentifier:s.cacheIdentifier})),O),Y=S.value?async b=>{const v=await oe(b);return{...v,data:(v.data??[]).map(Ve)}}:oe,V=()=>{$.value=""},a=()=>{G.value++},Z=e.ref(null),se=async(b,v)=>{const F=b.id;if(!await v(F)){i("copy:error",{entity:b,field:"id",message:d("errors.copy")});return}i("copy:success",{entity:b,field:"id",message:d("copy.success",{val:F})})},ee=async(b,v)=>{const F=JSON.stringify(b);if(!await v(F)){i("copy:error",{entity:b,message:d("errors.copy")});return}i("copy:success",{entity:b,message:d("copy.success_brief")})},re=async b=>{await s.canRetrieve?.(b)&&o.push(s.config.getViewRoute(b.id))},H=b=>({label:d("actions.view"),to:s.config.getViewRoute(b)}),q=b=>({label:d("actions.edit"),to:s.config.getEditRoute(b)}),T=e.ref(void 0),X=e.ref(!1),M=e.ref(!1),ue=e.ref(""),te=_.useDeleteUrlBuilder(s.config,O.value),k=b=>{T.value=b,X.value=!0},E=()=>{X.value=!1},I=async b=>{const{apiBaseUrl:v,controlPlaneId:F}=s.config,ie=y(`${v}${Q.list[S.value?"aiGateway":"konnect"].deleteConfigStore}`).replace(/{controlPlaneId}/gi,F||"").replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,b);try{await h.delete(ie)}catch{}},ae=async()=>{if(T.value?.id){M.value=!0;try{await h.delete(te(T.value.id)),s.config.app==="konnect"&&T.value.config?.config_store_id&&I(T.value.config.config_store_id),M.value=!1,X.value=!1,G.value++,i("delete:success",T.value)}catch(b){ue.value=b.response?.data?.message||b.message||d("errors.delete"),i("error",b)}finally{M.value=!1}}},ne=()=>{o.push(s.config.createRoute)};e.watch(j,b=>{if(b.status===_.FetcherStatus.Error){Z.value={title:d("errors.general")},b.error?.response?.data?.message&&(Z.value.message=b.error.response.data.message),i("error",b.error);return}Z.value=null});const P=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${d("vaults.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:d("vaults.title")}),R=e.ref(!1);return e.onBeforeMount(async()=>{R.value=await s.canCreate(),R.value&&(P.value.title=d("vaults.list.empty_state.title"),P.value.ctaText=d("actions.create"))}),(b,v)=>{const F=e.resolveComponent("KButton"),ie=e.resolveComponent("KEmptyState"),le=e.resolveComponent("KDropdownItem"),pe=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":l.cacheIdentifier,"disable-sorting":c.value,"empty-state-options":P.value,"enable-entity-actions":"","error-message":Z.value,fetcher:e.unref(Y),"fetcher-cache-key":e.unref(G),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-vaults-list",query:$.value,"table-headers":f.value,onClearSearchInput:V,"onClick:row":v[3]||(v[3]=U=>re(U)),onSort:a,onState:e.unref(C)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:$.value,"onUpdate:modelValue":v[0]||(v[0]=U=>$.value=U),config:W.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!l.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ke,[x.value?(e.openBlock(),e.createBlock(F,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:v[1]||(v[1]=U=>b.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(K.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canCreate()},{default:e.withCtx(()=>[e.createVNode(F,{appearance:"primary","data-testid":"toolbar-add-vault",size:l.useActionOutside?"medium":"large",to:l.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(K.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("vaults.list.toolbar_actions.new_vault")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),prefix:e.withCtx(({rowValue:U})=>[e.createElementVNode("div",We,[e.createElementVNode("b",null,e.toDisplayString(U??"-"),1)])]),name:e.withCtx(({rowValue:U})=>[e.createElementVNode("b",null,e.toDisplayString(U??"-"),1)]),description:e.withCtx(({rowValue:U})=>[e.createElementVNode("div",je,e.toDisplayString(U??"-"),1)]),tags:e.withCtx(({rowValue:U})=>[e.createVNode(e.unref(_.TableTags),{tags:U},null,8,["tags"])]),actions:e.withCtx(({row:U})=>[e.createVNode(pe,null,{default:e.withCtx(({copyToClipboard:me})=>[e.createVNode(le,{"data-testid":"action-entity-copy-id",onClick:u=>se(U,me)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(pe,null,{default:e.withCtx(({copyToClipboard:me})=>[e.createVNode(le,{"data-testid":"action-entity-copy-json",onClick:u=>ee(U,me)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.copy_json")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canRetrieve(U)},{default:e.withCtx(()=>[e.createVNode(le,{"data-testid":"action-entity-view","has-divider":"",item:H(U.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canEdit(U)},{default:e.withCtx(()=>[e.createVNode(le,{"data-testid":"action-entity-edit",item:q(U.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canDelete(U)},{default:e.withCtx(()=>[e.createVNode(le,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:me=>k(U)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!$.value&&l.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>[e.createVNode(ie,{"data-testid":"vaults-entity-empty-state","icon-background":"",message:e.unref(d)("vaults.list.empty_state_v2.description"),title:e.unref(d)("vaults.list.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(K.SecurityIcon),{decorative:""})]),action:e.withCtx(()=>[R.value?(e.openBlock(),e.createBlock(F,{key:0,"data-testid":"entity-create-button",onClick:ne},{default:e.withCtx(()=>[e.createVNode(e.unref(K.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("vaults.list.empty_state_v2.create_cta")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(F,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:v[2]||(v[2]=U=>b.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(K.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("vaults.list.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[l.config?.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("vaults.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["message","title"])]),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(_.EntityDeleteModal),{"action-pending":M.value,description:e.unref(d)("delete.description"),"entity-name":T.value&&(T.value.prefix||T.value.id),"entity-type":e.unref(_.EntityTypes).Vault,error:ue.value,title:e.unref(d)("delete.title"),visible:X.value,onCancel:E,onProceed:ae},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),ce=(l,g)=>{const i=l.__vccOpts||l;for(const[s,d]of g)i[s]=d;return i},De=ce(qe,[["__scopeId","data-v-374c7841"]]),ze={class:"kong-ui-entities-vault-form"},Le={class:"vault-form-provider-cards-container"},Ze=["data-testid"],Je={class:"provider-item-title-container"},Qe={class:"provider-item-title"},Ye={class:"provider-item-description"},Xe={key:"kong-vault-config-fields",class:"vault-form-config-fields-container"},et={key:1,class:"vault-form-config-auth-method-container"},tt={key:2,class:"vault-form-config-auth-method-container"},at={key:3,class:"vault-form-config-auth-method-container"},lt={key:4,class:"vault-form-config-auth-method-container"},ot={key:5,class:"vault-form-config-auth-method-container"},rt={key:6,class:"vault-form-config-auth-method-container"},nt={key:7,class:"vault-form-config-auth-method-container"},it={key:8,class:"vault-form-config-auth-method-container"},st={key:9,class:"vault-form-config-auth-method-container"},ct={key:10,class:"vault-form-config-auth-method-container"},dt={key:8},ft={class:"wrapper"},ut={class:"item-50"},pt={class:"item-50"},mt={class:"wrapper"},_t={class:"item-100"},gt=ce(e.defineComponent({__name:"VaultForm",props:{config:{type:Object,required:!0,validator:l=>!(!l||!["konnect","kongManager"].includes(l?.app)||l?.app==="konnect"&&l?.apiType!=="aiGateway"&&!l?.controlPlaneId||l?.app==="kongManager"&&typeof l?.workspace!="string"||l?.apiType==="aiGateway"&&!l?.aiGatewayId||!l?.cancelRoute)},vaultId:{type:String,required:!1,default:null}},emits:["update","error","loading"],setup(l,{emit:g}){const i=l,s=g,{i18nT:d,i18n:{t:o}}=fe.useI18n(),S=Ce.useRouter(),{axiosInstance:A}=_.useAxios(i.config?.axiosRequestConfig),{getMessageFromError:y}=_.useErrors(),h=e.computed(()=>i.config.apiType==="aiGateway"),w=e.computed(()=>h.value?"aiGateway":i.config.app),C=u=>u.replace(/{aiGatewayId}/gi,i.config.aiGatewayId||""),x=h.value?"https":"http",c=e.reactive({fields:{prefix:"",description:"",tags:"",labelList:[]},isReadonly:!1,errorMessage:""}),N=e.reactive({prefix:"",description:"",tags:"",labelList:[]}),f=e.ref(i.config.app==="konnect"?t.KONNECT:t.ENV),O=e.ref(null),$=e.ref();let W=0;const oe=u=>Object.entries(u).map(([r,de])=>({id:`label-${W++}`,key:r,value:de})),j=u=>{c.fields.labelList=u},G=e.computed(()=>[t.AWS,t.GCP,t.HCV,t.AZURE,t.CONJUR,t.FS,t.AZURE_CERTS].includes(f.value)),Y=e.computed(()=>h.value?[{label:o("form.config.konnect.label"),value:t.KONNECT},{label:o("form.config.env.label"),value:t.ENV},{label:o("form.config.aws.label"),value:t.AWS},{label:o("form.config.gcp.label"),value:t.GCP},{label:o("form.config.hcv.label"),value:t.HCV},{label:o("form.config.azure.label"),value:t.AZURE},{label:o("form.config.conjur.label"),value:t.CONJUR}]:[...i.config.app==="konnect"?[{label:o("form.config.konnect.label"),value:t.KONNECT}]:[],{label:o("form.config.env.label"),value:t.ENV},{label:o("form.config.aws.label"),value:t.AWS,disabled:!te.value},{label:o("form.config.gcp.label"),value:t.GCP,disabled:!te.value},{label:o("form.config.hcv.label"),value:t.HCV,disabled:!te.value},...i.config.azureVaultProviderAvailable?[{label:o("form.config.azure.label"),value:t.AZURE,disabled:!te.value}]:[],...i.config.conjurVaultProviderAvailable?[{label:o("form.config.conjur.label"),value:t.CONJUR,disabled:!te.value}]:[],...i.config.fsVaultProviderAvailable?[{label:o("form.config.fs.label"),value:t.FS,disabled:!te.value}]:[],...i.config.azureCertsVaultProviderAvailable?[{label:o("form.config.azure-certs.label"),value:t.AZURE_CERTS,disabled:!te.value}]:[]]),V=i.config.base64FieldAvailable?{base64_decode:!1}:{},a=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...V},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...V},[t.GCP]:{project_id:"",...V},[t.HCV]:{protocol:x,host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",ssl_verify:!0,auth_method:p.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",aws_auth_role:"",aws_auth_region:"",aws_auth_nonce:"",aws_login_path:"",aws_access_key_id:"",aws_secret_access_key:"",aws_sts_endpoint_url:"",aws_assume_role_arn:"",aws_role_session_name:"",azure_auth_role:"",azure_login_path:"",gcp_auth_role:"",gcp_login_path:"",gcp_service_account:"",gcp_jwt_exp:void 0,approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,cert_auth_cert:"",cert_auth_cert_key:"",cert_auth_role_name:"",oauth2_client_id:"",oauth2_client_secret:"",jwt_role:"",oauth2_token_endpoint:"",oauth2_audiences:"",...V},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...V},[t.AZURE_CERTS]:{vault_uri:"",credentials_prefix:"AZURE",client_id:"",tenant_id:"",ttl:3600},[t.CONJUR]:{endpoint_url:"",auth_method:"api_key",...V},[t.FS]:{prefix:"",...V}}),Z=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...V},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...V},[t.GCP]:{project_id:"",...V},[t.HCV]:{protocol:x,host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",ssl_verify:!0,auth_method:p.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",aws_auth_role:"",aws_auth_region:"",aws_auth_nonce:"",aws_login_path:"",aws_access_key_id:"",aws_secret_access_key:"",aws_sts_endpoint_url:"",aws_assume_role_arn:"",aws_role_session_name:"",azure_auth_role:"",azure_login_path:"",gcp_auth_role:"",gcp_login_path:"",gcp_service_account:"",gcp_jwt_exp:void 0,approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,cert_auth_cert:"",cert_auth_cert_key:"",cert_auth_role_name:"",oauth2_client_id:"",oauth2_client_secret:"",jwt_role:"",oauth2_token_endpoint:"",oauth2_audiences:"",...V},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...V},[t.AZURE_CERTS]:{vault_uri:"",credentials_prefix:"AZURE",client_id:"",tenant_id:"",ttl:3600},[t.CONJUR]:{endpoint_url:"",auth_method:"api_key",...V},[t.FS]:{prefix:"",...V}}),se=[{label:`${o("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`,value:"us-east-1"},{label:`${o("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`,value:"us-east-2"},{label:`${o("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`,value:"us-west-1"},{label:`${o("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`,value:"us-west-2"},{label:`${o("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`,value:"af-south-1"},{label:`${o("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`,value:"ap-east-1"},{label:`${o("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`,value:"ap-southeast-3"},{label:`${o("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`,value:"ap-south-1"},{label:`${o("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`,value:"ap-northeast-1"},{label:`${o("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`,value:"ap-northeast-2"},{label:`${o("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`,value:"ap-northeast-3"},{label:`${o("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`,value:"ap-southeast-1"},{label:`${o("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`,value:"ap-southeast-2"},{label:`${o("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`,value:"ca-central-1"},{label:`${o("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`,value:"eu-central-1"},{label:`${o("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`,value:"eu-west-1"},{label:`${o("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`,value:"eu-west-2"},{label:`${o("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`,value:"eu-west-3"},{label:`${o("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`,value:"eu-south-1"},{label:`${o("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`,value:"eu-north-1"},{label:`${o("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`,value:"me-south-1"},{label:`${o("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`,value:"sa-east-1"},{label:`${o("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`,value:"us-gov-east-1"},{label:`${o("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`,value:"us-gov-west-1"}],ee=[{label:"secrets",value:"secrets"}],re=[{label:"http",value:"http"},{label:"https",value:"https"}],H=[{label:"v1",value:"v1"},{label:"v2",value:"v2"}],q=e.computed(()=>i.vaultId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),T=e.computed(()=>q.value===_.EntityBaseFormType.Edit?"edit":"create"),X=e.ref(!1),M=e.computed(()=>C(Q.form[w.value]?.edit)),ue=e.computed(()=>q.value===_.EntityBaseFormType.Edit&&(i.config.app==="kongManager"||h.value)),te=e.computed(()=>i.config.app==="konnect"||_.useGatewayFeatureSupported({gatewayInfo:i.config.gatewayInfo,supportedRange:{enterprise:[]}})),k=()=>{S.push(i.config?.cancelRoute||{name:"vault-list"})},E=u=>{s("loading",u)},I=u=>{s("error",u)},ae=u=>{switch(u){case t.KONNECT:return K.KongIcon;case t.ENV:return K.CodeIcon;case t.AWS:return K.AwsIcon;case t.GCP:return K.GoogleCloudIcon;case t.HCV:return K.HashicorpIcon;case t.AZURE:return K.AzureIcon;case t.AZURE_CERTS:return K.AzureIcon;case t.CONJUR:return K.ConjourIcon;case t.FS:return K.FolderIcon}},ne=u=>{switch(u){case t.KONNECT:return o("form.config.konnect.description");case t.ENV:return o("form.config.env.description");case t.AWS:return o("form.config.aws.description");case t.GCP:return o("form.config.gcp.description");case t.HCV:return o("form.config.hcv.description");case t.AZURE:return o("form.config.azure.description");case t.AZURE_CERTS:return o("form.config.azure-certs.description");case t.CONJUR:return o("form.config.conjur.description");case t.FS:return o("form.config.fs.description")}},P=u=>{const r=h.value?Ve(u?.item??u):u;c.fields.prefix=r?.item?.prefix||r?.prefix||"",c.fields.description=r?.item?.description||r?.description||"";const de=r?.item?.tags||r?.tags||[];if(c.fields.tags=de?.join(", ")||"",h.value){const m=r?.labels??{};c.fields.labelList=oe(m)}Object.assign(N,c.fields),N.labelList=c.fields.labelList.map(m=>({...m}));const J=r?.item?.config||r?.config||null;J&&(Object.keys(J).length||r?.name===t.KONNECT)?(f.value=r?.item?.name||r?.name||"",O.value=f.value,$.value=r?.config?.config_store_id||void 0,Object.assign(a[f.value],J),Object.assign(Z[f.value],J)):c.errorMessage="Error loading vault config"},R=u=>u===""||u==null,b=e.computed(()=>f.value===t.HCV?!Object.keys(a[t.HCV]).filter(u=>["namespace","ttl","neg_ttl","resurrect_ttl","kube_role","kube_api_token_file","cert_auth_role_name","kube_auth_path","approle_auth_path","approle_secret_id","approle_secret_id_file","oauth2_audiences","aws_login_path","aws_sts_endpoint_url","aws_assume_role_arn","aws_role_session_name","azure_login_path","gcp_login_path"].includes(u)||!i.config.hcvCspAuthMethodsAvailable&&["aws_auth_role","aws_auth_region","aws_auth_nonce","aws_access_key_id","aws_secret_access_key","aws_login_path","aws_sts_endpoint_url","aws_assume_role_arn","aws_role_session_name","azure_auth_role","azure_login_path","gcp_auth_role","gcp_login_path","gcp_service_account","gcp_jwt_exp"].includes(u)||![p.AWS_IAM,p.AWS_EC2].includes(a[t.HCV].auth_method)&&u==="aws_auth_role"||a[t.HCV].auth_method!==p.AWS_IAM&&["aws_auth_region","aws_access_key_id","aws_secret_access_key"].includes(u)||a[t.HCV].auth_method===p.AWS_IAM&&["aws_access_key_id","aws_secret_access_key"].includes(u)||a[t.HCV].auth_method!==p.AWS_EC2&&u==="aws_auth_nonce"||a[t.HCV].auth_method!==p.AZURE&&u==="azure_auth_role"||![p.GCP_GCE,p.GCP_IAM].includes(a[t.HCV].auth_method)&&u==="gcp_auth_role"||a[t.HCV].auth_method!==p.GCP_IAM&&["gcp_service_account","gcp_jwt_exp"].includes(u)||a[t.HCV].auth_method!==p.TOKEN&&u==="token"||h.value&&q.value===_.EntityBaseFormType.Edit&&["token","oauth2_client_secret","cert_auth_cert_key"].includes(u)||a[t.HCV].auth_method!==p.APP_ROLE&&(u==="approle_role_id"||u==="approle_response_wrapping")||a[t.HCV].auth_method===p.APP_ROLE&&u==="approle_response_wrapping"&&typeof a[f.value][u]=="boolean"||a[t.HCV].auth_method!==p.CERT&&["cert_auth_cert","cert_auth_cert_key"].includes(u)||a[t.HCV].auth_method!==p.JWT&&["oauth2_client_id","oauth2_client_secret","jwt_role","oauth2_token_endpoint"].includes(u)?!1:R(a[f.value][u])).length:f.value===t.AZURE?!Object.keys(a[t.AZURE]).filter(u=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(u)?!1:R(a[f.value][u])).length:f.value===t.AZURE_CERTS?!Object.keys(a[t.AZURE_CERTS]).filter(u=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(u)?!1:R(a[f.value][u])).length:f.value===t.AWS?!Object.keys(a[t.AWS]).filter(u=>["endpoint_url","assume_role_arn","ttl","neg_ttl","resurrect_ttl","sts_endpoint_url"].includes(u)?!1:R(a[f.value][u])).length:!Object.keys(a[f.value]).filter(u=>["ttl","neg_ttl","resurrect_ttl"].includes(u)?!1:R(a[f.value][u])).length),v=e.computed(()=>!!c.fields.prefix&&b.value),F=e.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(N)||f.value!==O.value||JSON.stringify(a[f.value])!==JSON.stringify(Z[f.value])),ie=e.computed(()=>{let u=`${i.config.apiBaseUrl}${Q.form[w.value][q.value]}`;return i.config.app==="konnect"&&(u=u.replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"")),C(u).replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:"").replace(/{id}/gi,i.vaultId??"")}),le=e.computed(()=>{const u=parseInt(String(a[t.HCV].gcp_jwt_exp),10),r={protocol:a[t.HCV].protocol,host:a[t.HCV].host,port:parseInt(a[t.HCV].port.toString()),mount:a[t.HCV].mount,kv:a[t.HCV].kv,namespace:a[t.HCV].namespace||null,...i.config.hcvSslVerifyAvailable&&{ssl_verify:a[t.HCV].ssl_verify??!0},auth_method:a[t.HCV].auth_method,...i.config.base64FieldAvailable&&{base64_decode:a[t.HCV].base64_decode},...a[t.HCV].auth_method===p.TOKEN&&{token:a[t.HCV].token},...a[t.HCV].auth_method===p.K8S&&{kube_role:a[t.HCV].kube_role||void 0,kube_auth_path:a[t.HCV].kube_auth_path||void 0,kube_api_token_file:a[t.HCV].kube_api_token_file||void 0,token:null},...a[t.HCV].auth_method===p.AWS_IAM&&{aws_auth_role:a[t.HCV].aws_auth_role||void 0,aws_auth_region:a[t.HCV].aws_auth_region||void 0,aws_login_path:a[t.HCV].aws_login_path||void 0,aws_access_key_id:a[t.HCV].aws_access_key_id||void 0,aws_secret_access_key:a[t.HCV].aws_secret_access_key||void 0,aws_sts_endpoint_url:a[t.HCV].aws_sts_endpoint_url||void 0,aws_assume_role_arn:a[t.HCV].aws_assume_role_arn||void 0,aws_role_session_name:a[t.HCV].aws_role_session_name||void 0},...a[t.HCV].auth_method===p.AWS_EC2&&{aws_auth_role:a[t.HCV].aws_auth_role||void 0,aws_auth_nonce:a[t.HCV].aws_auth_nonce||void 0,aws_login_path:a[t.HCV].aws_login_path||void 0},...a[t.HCV].auth_method===p.AZURE&&{azure_auth_role:a[t.HCV].azure_auth_role||void 0,azure_login_path:a[t.HCV].azure_login_path||void 0},...a[t.HCV].auth_method===p.GCP_GCE&&{gcp_auth_role:a[t.HCV].gcp_auth_role||void 0,gcp_login_path:a[t.HCV].gcp_login_path||void 0},...a[t.HCV].auth_method===p.GCP_IAM&&{gcp_auth_role:a[t.HCV].gcp_auth_role||void 0,gcp_login_path:a[t.HCV].gcp_login_path||void 0,gcp_service_account:a[t.HCV].gcp_service_account||void 0,gcp_jwt_exp:Number.isNaN(u)?void 0:u},...a[t.HCV].auth_method===p.APP_ROLE&&{approle_auth_path:a[t.HCV].approle_auth_path||void 0,approle_role_id:a[t.HCV].approle_role_id,approle_secret_id:a[t.HCV].approle_secret_id||void 0,approle_secret_id_file:a[t.HCV].approle_secret_id_file||void 0,approle_response_wrapping:a[t.HCV].approle_response_wrapping??!1},...a[t.HCV].auth_method===p.CERT&&{cert_auth_role_name:a[t.HCV].cert_auth_role_name||void 0,cert_auth_cert:a[t.HCV].cert_auth_cert,cert_auth_cert_key:a[t.HCV].cert_auth_cert_key},...a[t.HCV].auth_method===p.JWT&&{oauth2_audiences:a[t.HCV].oauth2_audiences||null,oauth2_client_id:a[t.HCV].oauth2_client_id,oauth2_client_secret:a[t.HCV].oauth2_client_secret,jwt_role:a[t.HCV].jwt_role,oauth2_token_endpoint:a[t.HCV].oauth2_token_endpoint}},de={...a[f.value],client_id:a[f.value].client_id||null,tenant_id:a[f.value].tenant_id||null},J={...a[f.value],client_id:a[f.value].client_id||null,tenant_id:a[f.value].tenant_id||null},m={...a[f.value],endpoint_url:a[f.value].endpoint_url||null,assume_role_arn:a[f.value].assume_role_arn||null,...i.config.awsStsEndpointUrlAvailable?{sts_endpoint_url:a[f.value].sts_endpoint_url||null}:{}};let D=a[f.value];f.value===t.HCV?D=r:f.value===t.AZURE?D=de:f.value===t.AZURE_CERTS?D=J:f.value===t.AWS&&(D=m);let _e={};if(![t.KONNECT,t.ENV].includes(f.value)){const z=a[f.value],ye=z.ttl,be=z.neg_ttl,Ue=z.resurrect_ttl;_e={ttl:ye?parseInt(ye.toString(),10):null,neg_ttl:be?parseInt(be.toString(),10):null,resurrect_ttl:Ue?parseInt(Ue.toString(),10):null}}const we={prefix:c.fields.prefix,description:c.fields.description||null,tags:c.fields.tags.split(",")?.map(z=>String(z||"").trim())?.filter(z=>z!==""),name:f.value,config:{...D,..._e}};if(!h.value)return we;const ge=Ge(we),n={};for(const z of c.fields.labelList){const ye=z.key.trim();ye&&(n[ye]=z.value.trim())}if(Object.keys(n).length>0&&(ge.labels=n),q.value===_.EntityBaseFormType.Edit){const z={...ge.config};return["token","client_secret","secret_access_key","api_key","key"].forEach(be=>{be in z&&R(z[be])&&delete z[be]}),{...ge,config:z}}return ge}),pe=e.computed(()=>({...le.value,config:{...le.value.config,config_store_id:$.value}})),U=async()=>{const u=C(`${i.config.apiBaseUrl}${Q.form[h.value?"aiGateway":"konnect"].createConfigStore}`).replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"").replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:""),r=h.value?{name:c.fields.prefix}:void 0;return(await A.post(u,r))?.data.id},me=async()=>{try{c.isReadonly=!0;let u;q.value==="create"?f.value===t.KONNECT?($.value=await U(),u=await A.post(ie.value,pe.value)):u=await A.post(ie.value,le.value):q.value==="edit"&&(f.value===t.KONNECT&&!$.value?($.value=await U(),u=await A.put(ie.value,pe.value)):u=i.config?.app==="konnect"?await A.put(ie.value,pe.value):await A.patch(ie.value,le.value)),P(u?.data),s("update",u?.data)}catch(u){c.errorMessage=y(u),s("error",u)}finally{c.isReadonly=!1}};return(u,r)=>{const de=e.resolveComponent("KTooltip"),J=e.resolveComponent("KSelect"),m=e.resolveComponent("KInput"),D=e.resolveComponent("KCheckbox"),_e=e.resolveComponent("KTextArea"),we=e.resolveComponent("KAlert"),ge=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(e.unref(_.EntityBaseForm),{"can-submit":v.value&&F.value,config:l.config,"edit-id":l.vaultId,"entity-type":e.unref(_.SupportedEntityType).Vault,"error-message":c.errorMessage,"fetch-url":M.value,"form-fields":le.value,"is-readonly":c.isReadonly,"tabs-to-hide":l.config.apiType==="aiGateway"?["terraform","deck"]:[],onCancel:k,"onFetch:error":I,"onFetch:success":P,onLoading:E,onSubmit:me},{default:e.withCtx(()=>[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(o)("form.sections.config.description"),title:e.unref(o)("form.sections.config.title")},{default:e.withCtx(()=>[e.createElementVNode("div",Le,[e.createVNode(J,{modelValue:f.value,"onUpdate:modelValue":r[0]||(r[0]=n=>f.value=n),"data-testid":"provider-select",disabled:ue.value,"dropdown-max-height":"500",items:Y.value,readonly:c.isReadonly},{"selected-item-template":e.withCtx(({item:n})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ae(n.value)))),e.createElementVNode("span",null,e.toDisplayString(n?.label),1)]),"item-template":e.withCtx(({item:n})=>[e.createVNode(de,{placement:"top",text:n.disabled?e.unref(o)("form.unavailable"):""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"provider-item","data-testid":`vault-form-provider-${n.value}`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ae(n.value)))),e.createElementVNode("div",Je,[e.createElementVNode("span",Qe,e.toDisplayString(n?.label),1),e.createElementVNode("span",Ye,e.toDisplayString(ne(n.value)),1)])],8,Ze)]),_:2},1032,["text"])]),_:1},8,["modelValue","disabled","items","readonly"])]),e.createVNode(e.TransitionGroup,{name:"appear"},{default:e.withCtx(()=>[f.value===e.unref(t).ENV?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(m,{modelValue:a[e.unref(t).ENV].prefix,"onUpdate:modelValue":r[1]||(r[1]=n=>a[e.unref(t).ENV].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-kong-prefix",label:e.unref(o)("form.config.env.fields.prefix.label"),"label-attributes":{info:e.unref(o)("form.config.env.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)("form.config.env.fields.prefix.placeholder"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).ENV].base64_decode,"onUpdate:modelValue":r[2]||(r[2]=n=>a[e.unref(t).ENV].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AWS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AWS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(J,{modelValue:a[e.unref(t).AWS].region,"onUpdate:modelValue":r[3]||(r[3]=n=>a[e.unref(t).AWS].region=n),"data-testid":"vault-form-config-aws-region",items:se,label:e.unref(o)("form.config.aws.fields.region.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.region.tooltip")},placeholder:e.unref(o)("form.config.aws.fields.region.placeholder"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].endpoint_url,"onUpdate:modelValue":r[4]||(r[4]=n=>a[e.unref(t).AWS].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-endpoint_url",label:e.unref(o)("form.config.aws.fields.endpoint_url.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].assume_role_arn,"onUpdate:modelValue":r[5]||(r[5]=n=>a[e.unref(t).AWS].assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-assume_role_arn",label:e.unref(o)("form.config.aws.fields.assume_role_arn.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.assume_role_arn.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].role_session_name,"onUpdate:modelValue":r[6]||(r[6]=n=>a[e.unref(t).AWS].role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-role_session_name",label:e.unref(o)("form.config.aws.fields.role_session_name.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.role_session_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),l.config.awsStsEndpointUrlAvailable?(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).AWS].sts_endpoint_url,"onUpdate:modelValue":r[7]||(r[7]=n=>a[e.unref(t).AWS].sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-sts_endpoint_url",label:e.unref(o)("form.config.aws.fields.sts_endpoint_url.label"),"label-attributes":{info:e.unref(o)("form.config.aws.fields.sts_endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:1,modelValue:a[e.unref(t).AWS].base64_decode,"onUpdate:modelValue":r[8]||(r[8]=n=>a[e.unref(t).AWS].base64_decode=n),"data-testid":"vault-form-config-aws-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).GCP?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).GCP}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).GCP].project_id,"onUpdate:modelValue":r[9]||(r[9]=n=>a[e.unref(t).GCP].project_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-gcp-project-id",label:e.unref(o)("form.config.gcp.fields.project_id.label"),placeholder:e.unref(o)("form.config.gcp.fields.project_id.placeholder"),readonly:c.isReadonly,required:"",type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:"form.config.gcp.fields.project_id.tooltip.text",scope:"global"},{"italic-text":e.withCtx(()=>[e.createElementVNode("em",null,e.toDisplayString(e.unref(o)("form.config.gcp.fields.project_id.tooltip.italicText")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).GCP].base64_decode,"onUpdate:modelValue":r[10]||(r[10]=n=>a[e.unref(t).GCP].base64_decode=n),"data-testid":"vault-form-config-gcp-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).HCV?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(J,{modelValue:a[e.unref(t).HCV].protocol,"onUpdate:modelValue":r[11]||(r[11]=n=>a[e.unref(t).HCV].protocol=n),"data-testid":"vault-form-config-hcv-protocol",items:re,label:e.unref(o)("form.config.hcv.fields.protocol.label"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),l.config.hcvSslVerifyAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).HCV].ssl_verify,"onUpdate:modelValue":r[12]||(r[12]=n=>a[e.unref(t).HCV].ssl_verify=n),"data-testid":"vault-form-config-hcv-ssl_verify",label:e.unref(o)("form.config.hcv.fields.ssl_verify.label"),readonly:c.isReadonly},null,8,["modelValue","label","readonly"])):e.createCommentVNode("",!0),e.createVNode(m,{modelValue:a[e.unref(t).HCV].host,"onUpdate:modelValue":r[13]||(r[13]=n=>a[e.unref(t).HCV].host=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-host",label:e.unref(o)("form.config.hcv.fields.host.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].port,"onUpdate:modelValue":r[14]||(r[14]=n=>a[e.unref(t).HCV].port=n),autocomplete:"off","data-testid":"vault-form-config-hcv-port",label:e.unref(o)("form.config.hcv.fields.port.label"),min:"0",readonly:c.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].mount,"onUpdate:modelValue":r[15]||(r[15]=n=>a[e.unref(t).HCV].mount=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-mount",label:e.unref(o)("form.config.hcv.fields.mount.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(J,{modelValue:a[e.unref(t).HCV].kv,"onUpdate:modelValue":r[16]||(r[16]=n=>a[e.unref(t).HCV].kv=n),"data-testid":"vault-form-config-hcv-kv",items:H,label:e.unref(o)("form.config.hcv.fields.kv.label"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].namespace,"onUpdate:modelValue":r[17]||(r[17]=n=>a[e.unref(t).HCV].namespace=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-namespace",label:e.unref(o)("form.config.hcv.fields.namespace.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(J,{modelValue:a[e.unref(t).HCV].auth_method,"onUpdate:modelValue":r[18]||(r[18]=n=>a[e.unref(t).HCV].auth_method=n),"data-testid":"vault-form-config-hcv-auth_method",items:[{label:e.unref(p).TOKEN,value:e.unref(p).TOKEN},{label:e.unref(p).K8S,value:e.unref(p).K8S},...l.config.hcvAppRoleMethodAvailable?[{label:e.unref(p).APP_ROLE,value:e.unref(p).APP_ROLE}]:[],...l.config.hcvCertMethodAvailable?[{label:e.unref(p).CERT,value:e.unref(p).CERT}]:[],...l.config.hcvJwtMethodAvailable?[{label:e.unref(p).JWT,value:e.unref(p).JWT}]:[],...l.config.hcvCspAuthMethodsAvailable?[{label:e.unref(p).AWS_IAM,value:e.unref(p).AWS_IAM},{label:e.unref(p).AWS_EC2,value:e.unref(p).AWS_EC2},{label:e.unref(p).AZURE,value:e.unref(p).AZURE},{label:e.unref(p).GCP_GCE,value:e.unref(p).GCP_GCE},{label:e.unref(p).GCP_IAM,value:e.unref(p).GCP_IAM}]:[]],label:e.unref(o)("form.config.hcv.fields.auth_method.label"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","items","label","readonly"]),a[e.unref(t).HCV].auth_method===e.unref(p).TOKEN?(e.openBlock(),e.createElementBlock("div",et,[h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":r[20]||(r[20]=n=>a[e.unref(t).HCV].token=n),"data-testid":"vault-form-config-hcv-token",label:e.unref(o)("form.config.hcv.fields.token.label"),mode:T.value,readonly:c.isReadonly,required:T.value==="create"},null,8,["modelValue","label","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":r[19]||(r[19]=n=>a[e.unref(t).HCV].token=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-token",label:e.unref(o)("form.config.hcv.fields.token.label"),readonly:c.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]))])):a[e.unref(t).HCV].auth_method===e.unref(p).K8S?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_role,"onUpdate:modelValue":r[21]||(r[21]=n=>a[e.unref(t).HCV].kube_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_role",label:e.unref(o)("form.config.hcv.fields.kube_role.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_auth_path,"onUpdate:modelValue":r[22]||(r[22]=n=>a[e.unref(t).HCV].kube_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_auth_path",label:e.unref(o)("form.config.hcv.fields.kube_auth_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_api_token_file,"onUpdate:modelValue":r[23]||(r[23]=n=>a[e.unref(t).HCV].kube_api_token_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_api_token_file",label:e.unref(o)("form.config.hcv.fields.kube_api_token_file.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AWS_IAM?(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_role,"onUpdate:modelValue":r[24]||(r[24]=n=>a[e.unref(t).HCV].aws_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_role",label:e.unref(o)("form.config.hcv.fields.aws_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_region,"onUpdate:modelValue":r[25]||(r[25]=n=>a[e.unref(t).HCV].aws_auth_region=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_region",label:e.unref(o)("form.config.hcv.fields.aws_auth_region.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_login_path,"onUpdate:modelValue":r[26]||(r[26]=n=>a[e.unref(t).HCV].aws_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_login_path",label:e.unref(o)("form.config.hcv.fields.aws_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_access_key_id,"onUpdate:modelValue":r[27]||(r[27]=n=>a[e.unref(t).HCV].aws_access_key_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_access_key_id",label:e.unref(o)("form.config.hcv.fields.aws_access_key_id.label"),readonly:c.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].aws_secret_access_key,"onUpdate:modelValue":r[29]||(r[29]=n=>a[e.unref(t).HCV].aws_secret_access_key=n),"data-testid":"vault-form-config-hcv-aws_secret_access_key",label:e.unref(o)("form.config.hcv.fields.aws_secret_access_key.label"),mode:T.value,readonly:c.isReadonly},null,8,["modelValue","label","mode","readonly"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].aws_secret_access_key,"onUpdate:modelValue":r[28]||(r[28]=n=>a[e.unref(t).HCV].aws_secret_access_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_secret_access_key",label:e.unref(o)("form.config.hcv.fields.aws_secret_access_key.label"),readonly:c.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_sts_endpoint_url,"onUpdate:modelValue":r[30]||(r[30]=n=>a[e.unref(t).HCV].aws_sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_sts_endpoint_url",label:e.unref(o)("form.config.hcv.fields.aws_sts_endpoint_url.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_assume_role_arn,"onUpdate:modelValue":r[31]||(r[31]=n=>a[e.unref(t).HCV].aws_assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_assume_role_arn",label:e.unref(o)("form.config.hcv.fields.aws_assume_role_arn.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_role_session_name,"onUpdate:modelValue":r[32]||(r[32]=n=>a[e.unref(t).HCV].aws_role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_role_session_name",label:e.unref(o)("form.config.hcv.fields.aws_role_session_name.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AWS_EC2?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_role,"onUpdate:modelValue":r[33]||(r[33]=n=>a[e.unref(t).HCV].aws_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_role",label:e.unref(o)("form.config.hcv.fields.aws_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_nonce,"onUpdate:modelValue":r[34]||(r[34]=n=>a[e.unref(t).HCV].aws_auth_nonce=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_nonce",label:e.unref(o)("form.config.hcv.fields.aws_auth_nonce.label"),readonly:c.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_login_path,"onUpdate:modelValue":r[35]||(r[35]=n=>a[e.unref(t).HCV].aws_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_login_path",label:e.unref(o)("form.config.hcv.fields.aws_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AZURE?(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].azure_auth_role,"onUpdate:modelValue":r[36]||(r[36]=n=>a[e.unref(t).HCV].azure_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-azure_auth_role",label:e.unref(o)("form.config.hcv.fields.azure_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].azure_login_path,"onUpdate:modelValue":r[37]||(r[37]=n=>a[e.unref(t).HCV].azure_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-azure_login_path",label:e.unref(o)("form.config.hcv.fields.azure_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).GCP_GCE?(e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_auth_role,"onUpdate:modelValue":r[38]||(r[38]=n=>a[e.unref(t).HCV].gcp_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_auth_role",label:e.unref(o)("form.config.hcv.fields.gcp_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_login_path,"onUpdate:modelValue":r[39]||(r[39]=n=>a[e.unref(t).HCV].gcp_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_login_path",label:e.unref(o)("form.config.hcv.fields.gcp_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):l.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).GCP_IAM?(e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_auth_role,"onUpdate:modelValue":r[40]||(r[40]=n=>a[e.unref(t).HCV].gcp_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_auth_role",label:e.unref(o)("form.config.hcv.fields.gcp_auth_role.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_login_path,"onUpdate:modelValue":r[41]||(r[41]=n=>a[e.unref(t).HCV].gcp_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_login_path",label:e.unref(o)("form.config.hcv.fields.gcp_login_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_service_account,"onUpdate:modelValue":r[42]||(r[42]=n=>a[e.unref(t).HCV].gcp_service_account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_service_account",label:e.unref(o)("form.config.hcv.fields.gcp_service_account.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_jwt_exp,"onUpdate:modelValue":r[43]||(r[43]=n=>a[e.unref(t).HCV].gcp_jwt_exp=n),autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_jwt_exp",label:e.unref(o)("form.config.hcv.fields.gcp_jwt_exp.label"),readonly:c.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(p).APP_ROLE?(e.openBlock(),e.createElementBlock("div",it,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_auth_path,"onUpdate:modelValue":r[44]||(r[44]=n=>a[e.unref(t).HCV].approle_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_auth_path",label:e.unref(o)("form.config.hcv.fields.approle_auth_path.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_role_id,"onUpdate:modelValue":r[45]||(r[45]=n=>a[e.unref(t).HCV].approle_role_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_role_id",label:e.unref(o)("form.config.hcv.fields.approle_role_id.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_secret_id,"onUpdate:modelValue":r[46]||(r[46]=n=>a[e.unref(t).HCV].approle_secret_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id",label:e.unref(o)("form.config.hcv.fields.approle_secret_id.label"),readonly:c.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_secret_id_file,"onUpdate:modelValue":r[47]||(r[47]=n=>a[e.unref(t).HCV].approle_secret_id_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id_file",label:e.unref(o)("form.config.hcv.fields.approle_secret_id_file.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(D,{modelValue:a[e.unref(t).HCV].approle_response_wrapping,"onUpdate:modelValue":r[48]||(r[48]=n=>a[e.unref(t).HCV].approle_response_wrapping=n),"data-testid":"vault-form-config-hcv-approle_response_wrapping",label:e.unref(o)("form.config.hcv.fields.approle_response_wrapping.label")},null,8,["modelValue","label"])])):a[e.unref(t).HCV].auth_method===e.unref(p).CERT?(e.openBlock(),e.createElementBlock("div",st,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].cert_auth_role_name,"onUpdate:modelValue":r[49]||(r[49]=n=>a[e.unref(t).HCV].cert_auth_role_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_role_name",label:e.unref(o)("form.config.hcv.fields.cert_auth_role_name.label"),readonly:c.isReadonly},null,8,["modelValue","label","readonly"]),e.createVNode(_e,{modelValue:a[e.unref(t).HCV].cert_auth_cert,"onUpdate:modelValue":r[50]||(r[50]=n=>a[e.unref(t).HCV].cert_auth_cert=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_cert",label:e.unref(o)("form.config.hcv.fields.cert_auth_cert.label"),readonly:c.isReadonly,required:""},null,8,["modelValue","label","readonly"]),h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].cert_auth_cert_key,"onUpdate:modelValue":r[52]||(r[52]=n=>a[e.unref(t).HCV].cert_auth_cert_key=n),"data-testid":"vault-form-config-hcv-cert_auth_cert_key",label:e.unref(o)("form.config.hcv.fields.cert_auth_cert_key.label"),labels:{rotateLabel:e.unref(o)("form.config.hcv.fields.cert_auth_cert_key.rotateLabel")},mode:T.value,multiline:"",placeholder:"",readonly:c.isReadonly,required:T.value==="create",onRotate:r[53]||(r[53]=n=>X.value=!0)},{alert:e.withCtx(()=>[X.value?(e.openBlock(),e.createBlock(we,{key:0,message:e.unref(o)("form.config.hcv.fields.cert_auth_cert_key.rotateAlert")},null,8,["message"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","label","labels","mode","readonly","required"])):(e.openBlock(),e.createBlock(_e,{key:0,modelValue:a[e.unref(t).HCV].cert_auth_cert_key,"onUpdate:modelValue":r[51]||(r[51]=n=>a[e.unref(t).HCV].cert_auth_cert_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_cert_key",label:e.unref(o)("form.config.hcv.fields.cert_auth_cert_key.label"),readonly:c.isReadonly,required:""},null,8,["modelValue","label","readonly"]))])):a[e.unref(t).HCV].auth_method===e.unref(p).JWT?(e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_client_id,"onUpdate:modelValue":r[54]||(r[54]=n=>a[e.unref(t).HCV].oauth2_client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_client_id",label:e.unref(o)("form.config.hcv.fields.oauth2_client_id.label"),readonly:c.isReadonly,required:""},null,8,["modelValue","label","readonly"]),h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].oauth2_client_secret,"onUpdate:modelValue":r[56]||(r[56]=n=>a[e.unref(t).HCV].oauth2_client_secret=n),"data-testid":"vault-form-config-hcv-oauth2_client_secret",label:e.unref(o)("form.config.hcv.fields.oauth2_client_secret.label"),mode:T.value,readonly:c.isReadonly,required:T.value==="create"},null,8,["modelValue","label","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].oauth2_client_secret,"onUpdate:modelValue":r[55]||(r[55]=n=>a[e.unref(t).HCV].oauth2_client_secret=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_client_secret",label:e.unref(o)("form.config.hcv.fields.oauth2_client_secret.label"),readonly:c.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])),e.createVNode(m,{modelValue:a[e.unref(t).HCV].jwt_role,"onUpdate:modelValue":r[57]||(r[57]=n=>a[e.unref(t).HCV].jwt_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-jwt_role",label:e.unref(o)("form.config.hcv.fields.jwt_role.label"),"label-attributes":{info:e.unref(o)("form.config.hcv.fields.jwt_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_token_endpoint,"onUpdate:modelValue":r[58]||(r[58]=n=>a[e.unref(t).HCV].oauth2_token_endpoint=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_token_endpoint",label:e.unref(o)("form.config.hcv.fields.oauth2_token_endpoint.label"),readonly:c.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_audiences,"onUpdate:modelValue":r[59]||(r[59]=n=>a[e.unref(t).HCV].oauth2_audiences=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_audiences",label:e.unref(o)("form.config.hcv.fields.oauth2_audiences.label"),"label-attributes":{info:e.unref(o)("form.config.hcv.fields.oauth2_audiences.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])])):e.createCommentVNode("",!0),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:11,modelValue:a[e.unref(t).HCV].base64_decode,"onUpdate:modelValue":r[60]||(r[60]=n=>a[e.unref(t).HCV].base64_decode=n),"data-testid":"vault-form-config-hcv-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AZURE?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).AZURE].location,"onUpdate:modelValue":r[61]||(r[61]=n=>a[e.unref(t).AZURE].location=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-location",label:e.unref(o)("form.config.azure.fields.location.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].vault_uri,"onUpdate:modelValue":r[62]||(r[62]=n=>a[e.unref(t).AZURE].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-uri",label:e.unref(o)("form.config.azure.fields.vault_uri.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].credentials_prefix,"onUpdate:modelValue":r[63]||(r[63]=n=>a[e.unref(t).AZURE].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-prefix",label:e.unref(o)("form.config.azure.fields.credential_prefix.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(J,{modelValue:a[e.unref(t).AZURE].type,"onUpdate:modelValue":r[64]||(r[64]=n=>a[e.unref(t).AZURE].type=n),"data-testid":"vault-form-config-azure-type",items:ee,label:e.unref(o)("form.config.azure.fields.type.label"),placeholder:e.unref(o)("form.config.azure.fields.type.placeholder"),readonly:c.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].client_id,"onUpdate:modelValue":r[65]||(r[65]=n=>a[e.unref(t).AZURE].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-client-id",label:e.unref(o)("form.config.azure.fields.client_id.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].tenant_id,"onUpdate:modelValue":r[66]||(r[66]=n=>a[e.unref(t).AZURE].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-tenant-id",label:e.unref(o)("form.config.azure.fields.tenant_id.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).AZURE].base64_decode,"onUpdate:modelValue":r[67]||(r[67]=n=>a[e.unref(t).AZURE].base64_decode=n),"data-testid":"vault-form-config-azure-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AZURE_CERTS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE_CERTS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].vault_uri,"onUpdate:modelValue":r[68]||(r[68]=n=>a[e.unref(t).AZURE_CERTS].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-vault-uri",label:e.unref(o)("form.config.azure-certs.fields.vault_uri.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].credentials_prefix,"onUpdate:modelValue":r[69]||(r[69]=n=>a[e.unref(t).AZURE_CERTS].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-credentials-prefix",label:e.unref(o)("form.config.azure-certs.fields.credential_prefix.label"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].client_id,"onUpdate:modelValue":r[70]||(r[70]=n=>a[e.unref(t).AZURE_CERTS].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-client-id",label:e.unref(o)("form.config.azure-certs.fields.client_id.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].tenant_id,"onUpdate:modelValue":r[71]||(r[71]=n=>a[e.unref(t).AZURE_CERTS].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-tenant-id",label:e.unref(o)("form.config.azure-certs.fields.tenant_id.label"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):e.createCommentVNode("",!0),f.value===e.unref(t).CONJUR?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).CONJUR}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].endpoint_url,"onUpdate:modelValue":r[72]||(r[72]=n=>a[e.unref(t).CONJUR].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-endpoint_url",label:e.unref(o)("form.config.conjur.fields.endpoint_url.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].login,"onUpdate:modelValue":r[73]||(r[73]=n=>a[e.unref(t).CONJUR].login=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-login",label:e.unref(o)("form.config.conjur.fields.login.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.login.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].account,"onUpdate:modelValue":r[74]||(r[74]=n=>a[e.unref(t).CONJUR].account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-account",label:e.unref(o)("form.config.conjur.fields.account.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.account.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),h.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":r[76]||(r[76]=n=>a[e.unref(t).CONJUR].api_key=n),"data-testid":"vault-form-config-conjur-api_key",label:e.unref(o)("form.config.conjur.fields.api_key.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.api_key.tooltip"),tooltipAttributes:{maxWidth:"400"}},mode:T.value,readonly:c.isReadonly,required:T.value==="create"},null,8,["modelValue","label","label-attributes","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":r[75]||(r[75]=n=>a[e.unref(t).CONJUR].api_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-api_key",label:e.unref(o)("form.config.conjur.fields.api_key.label"),"label-attributes":{info:e.unref(o)("form.config.conjur.fields.api_key.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"])),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:2,modelValue:a[e.unref(t).CONJUR].base64_decode,"onUpdate:modelValue":r[77]||(r[77]=n=>a[e.unref(t).CONJUR].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).FS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).FS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).FS].prefix,"onUpdate:modelValue":r[78]||(r[78]=n=>a[e.unref(t).FS].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-fs-prefix",label:e.unref(o)("form.config.fs.fields.prefix.label"),"label-attributes":{info:e.unref(o)("form.config.fs.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),l.config.base64FieldAvailable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:a[e.unref(t).FS].base64_decode,"onUpdate:modelValue":r[79]||(r[79]=n=>a[e.unref(t).FS].base64_decode=n),"data-testid":"vault-form-config-fs-base64_decode",label:e.unref(o)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(o)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:c.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.config.ttl?(e.openBlock(),e.createElementBlock("div",dt,[G.value?(e.openBlock(),e.createBlock(ge,{key:0,class:"advanced-fields-collapse","data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(o)("form.config.advancedFields.title")},{default:e.withCtx(()=>[e.createElementVNode("div",ft,[e.createElementVNode("div",ut,[e.createVNode(m,{modelValue:a[f.value].ttl,"onUpdate:modelValue":r[80]||(r[80]=n=>a[f.value].ttl=n),"data-testid":"vault-ttl-input",label:e.unref(o)("form.config.advancedFields.ttl"),"label-attributes":{info:e.unref(o)("form.config.advancedFields.ttlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])]),e.createElementVNode("div",pt,[e.createVNode(m,{modelValue:a[f.value].neg_ttl,"onUpdate:modelValue":r[81]||(r[81]=n=>a[f.value].neg_ttl=n),"data-testid":"vault-neg-ttl-input",label:e.unref(o)("form.config.advancedFields.negTtl"),"label-attributes":{info:e.unref(o)("form.config.advancedFields.negTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])]),e.createElementVNode("div",mt,[e.createElementVNode("div",_t,[e.createVNode(m,{modelValue:a[f.value].resurrect_ttl,"onUpdate:modelValue":r[82]||(r[82]=n=>a[f.value].resurrect_ttl=n),"data-testid":"vault-resurrect-ttl-input",label:e.unref(o)("form.config.advancedFields.resurrectTtl"),"label-attributes":{info:e.unref(o)("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(_.EntityFormSection),{description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:c.fields.prefix,"onUpdate:modelValue":r[83]||(r[83]=n=>c.fields.prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-prefix",help:e.unref(o)(h.value?"form.fields.prefix_ai_gateway.help":"form.fields.prefix.help"),label:e.unref(o)(h.value?"form.fields.prefix_ai_gateway.label":"form.fields.prefix.label"),"label-attributes":{info:e.unref(o)(h.value?"form.fields.prefix_ai_gateway.tooltip":"form.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)(h.value?"form.fields.prefix_ai_gateway.placeholder":"form.fields.prefix.placeholder"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"]),e.createVNode(_e,{modelValue:c.fields.description,"onUpdate:modelValue":r[84]||(r[84]=n=>c.fields.description=n),modelModifiers:{trim:!0},"character-limit":1e3,class:"vault-form-textarea","data-testid":"vault-form-description",label:e.unref(o)("form.fields.description.label"),placeholder:e.unref(o)("form.fields.description.placeholder"),readonly:c.isReadonly},null,8,["modelValue","label","placeholder","readonly"]),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:0,modelValue:c.fields.tags,"onUpdate:modelValue":r[85]||(r[85]=n=>c.fields.tags=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-tags",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])),h.value?e.renderSlot(u.$slots,"labels",{key:1,disabled:c.isReadonly,labelList:c.fields.labelList,updateLabelList:j},void 0,!0):e.createCommentVNode("",!0)]),_:3},8,["description","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","tabs-to-hide"])])}}}),[["__scopeId","data-v-ba772fc7"]]),yt={class:"kong-ui-vault-entity-config-card"},ve="************",bt=e.defineComponent({__name:"VaultConfigCard",props:{config:{type:Object,required:!0,validator:l=>!(!l||!["konnect","kongManager"].includes(l?.app)||l.app==="konnect"&&l.apiType!=="aiGateway"&&!l.controlPlaneId||l.app==="kongManager"&&typeof l.workspace!="string"||l.apiType==="aiGateway"&&!l.aiGatewayId||!l.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(l){const g=l,i=["token","approle_secret_id","api_key","aws_access_key_id","aws_secret_access_key","aws_auth_nonce","cert_auth_cert_key","oauth2_client_secret"],s=e.computed(()=>g.config.apiType==="aiGateway"),d=e.computed(()=>(s.value?Q.form.aiGateway?.edit:Q.form[g.config?.app]?.edit)?.replace(/{aiGatewayId}/gi,g.config.aiGatewayId||"")),o=x=>s.value?Ve(x):x,{i18n:{t:S}}=fe.useI18n(),{convertKeyToTitle:A}=_.useStringHelpers(),{getPropValue:y}=_.useHelpers(),h=e.computed(()=>({id:{},name:{label:S(s.value?"labels.vault_type_ai_gateway":"labels.vault_type")},updated_at:{},created_at:{},prefix:{order:5,section:_.ConfigurationSchemaSection.Basic,label:s.value?S("labels.vault_name_ai_gateway"):void 0},description:{order:6,section:_.ConfigurationSchemaSection.Basic},...s.value?{}:{tags:{order:7}},config:{order:8,type:_.ConfigurationSchemaType.Json}})),w=x=>{const c={...x.config};i.forEach(f=>{f in c&&(c[f]=ve)});const N={...x,config:c};if(s.value){const f={...N,type:N.name,name:N.prefix};return delete f.prefix,f}return N},C=x=>h.value?.[x]?.label||A(x);return(x,c)=>(e.openBlock(),e.createElementBlock("div",yt,[e.createVNode(e.unref(_.EntityBaseConfigCard),{"code-block-record-formatter":w,config:l.config,"config-card-doc":l.configCardDoc,"config-schema":h.value,"entity-type":e.unref(_.SupportedEntityType).Vault,"fetch-url":d.value,"formats-to-hide":l.config.apiType==="aiGateway"?["terraform","deck"]:[],"hide-title":l.hideTitle,"record-resolver":o,"onFetch:error":c[0]||(c[0]=N=>x.$emit("fetch:error",N)),"onFetch:success":c[1]||(c[1]=N=>x.$emit("fetch:success",N)),onLoading:c[2]||(c[2]=N=>x.$emit("loading",N))},{config:e.withCtx(({rowValue:N})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(N).sort(),f=>(e.openBlock(),e.createBlock(e.unref(_.ConfigCardItem),{key:f,item:{key:f,value:i.includes(f)?ve:e.unref(y)(f,N),label:C(f)}},null,8,["item"]))),128))]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","formats-to-hide","hide-title"])]))}}),ht="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Ne="/v2/control-planes/{controlPlaneId}/{workspace}/config-stores",ke="/v1/ai-gateways/{aiGatewayId}",L={getVault:{konnect:`${ht}/vaults/{id}`,aiGateway:`${ke}/vaults/{id}`},list:{konnect:`${Ne}/{id}/secrets`,aiGateway:`${ke}/config-stores/{id}/secrets`},form:{konnect:{create:`${Ne}/{id}/secrets`,edit:`${Ne}/{id}/secrets/{secretId}`},aiGateway:{create:`${ke}/config-stores/{id}/secrets`,edit:`${ke}/config-stores/{id}/secrets/{secretId}`}}},Vt={class:"table-content-overflow-wrapper"},kt=ce(e.defineComponent({inheritAttrs:!1,__name:"SecretListInner",props:{config:{type:Object,required:!0,validator:l=>!(!l||l?.app!=="konnect"||!l.createRoute||!l.getEditRoute||l.apiType==="aiGateway"&&!l.aiGatewayId)},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(l,{emit:g}){const i=g,s=l,{i18n:{t:d,formatUnixTimeStamp:o}}=fe.useI18n(),{axiosInstance:S}=_.useAxios(s.config?.axiosRequestConfig),y={key:{label:d("secrets.list.table_headers.key"),sortable:!1,hidable:!1},updated_at:{label:d("secrets.list.table_headers.updated_at"),sortable:!1}},h=H=>({"data-testid":H.key}),w=e.computed(()=>s.config.apiType==="aiGateway"?L.list.aiGateway:L.list[s.config.app]),C=e.computed(()=>`${s.config.apiBaseUrl}${w.value}`.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"").replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.configStoreId||"")),x=e.ref(""),c={isExactMatch:!0,placeholder:d("search.placeholder_for_secrets.konnect")},{fetcher:N,fetcherState:f,fetcherCacheKey:O}=_.useFetcher(e.computed(()=>({...s.config,cacheIdentifier:s.cacheIdentifier})),C),$=()=>{x.value=""},W=e.ref(null),oe=H=>({label:d("actions.edit"),to:s.config.getEditRoute(H)}),j=e.ref(void 0),G=e.ref(!1),Y=e.ref(!1),V=e.ref(""),a=_.useDeleteUrlBuilder(s.config,C.value),Z=H=>{j.value=H,G.value=!0},se=()=>{G.value=!1},ee=async()=>{if(j.value?.key){Y.value=!0;try{await S.delete(a(j.value.key)),Y.value=!1,G.value=!1,O.value++,i("delete:success",j.value)}catch(H){V.value=H.response?.data?.message||H.message||d("errors.delete"),i("error",H)}finally{Y.value=!1}}};e.watch(f,H=>{if(H.status===_.FetcherStatus.Error){W.value={title:d("errors.general")},H.error?.response?.data?.message&&(W.value.message=H.error.response.data.message),i("error",H.error);return}W.value=null});const re=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${d("secrets.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:d("secrets.title")});return e.onBeforeMount(async()=>{await s.canCreate()&&(re.value.title=d("secrets.list.empty_state.title"),re.value.ctaText=d("secrets.list.toolbar_actions.new_secret"))}),(H,q)=>{const T=e.resolveComponent("KButton"),X=e.resolveComponent("KDropdownItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":l.cacheIdentifier,"disable-sorting":"","empty-state-options":re.value,"enable-entity-actions":"","error-message":W.value,fetcher:e.unref(N),"fetcher-cache-key":e.unref(O),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-secrets-list",query:x.value,"row-attributes":h,"table-headers":e.unref(y),onClearSearchInput:$},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:x.value,"onUpdate:modelValue":q[0]||(q[0]=M=>x.value=M),config:c},null,8,["modelValue"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canCreate()},{default:e.withCtx(()=>[e.createVNode(T,{appearance:"primary","data-testid":"toolbar-add-secret",size:"large",to:l.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(K.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("secrets.list.toolbar_actions.new_secret")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),key:e.withCtx(({rowValue:M})=>[e.createElementVNode("div",Vt,[e.createElementVNode("b",null,e.toDisplayString(M??"-"),1)])]),updated_at:e.withCtx(({rowValue:M})=>[e.createElementVNode("span",null,e.toDisplayString(M?e.unref(o)(new Date(M).getTime()/1e3):"-"),1)]),actions:e.withCtx(({row:M})=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canEdit(M)},{default:e.withCtx(()=>[e.createVNode(X,{"data-testid":"action-entity-edit",item:oe(M.key)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>l.canDelete(M)},{default:e.withCtx(()=>[e.createVNode(X,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:ue=>Z(M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.delete")),1)]),_:1},8,["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(_.EntityDeleteModal),{"action-pending":Y.value,description:e.unref(d)("delete.description"),"entity-name":j.value&&j.value.key,"entity-type":e.unref(_.EntityTypes).Secret,error:V.value,title:e.unref(d)("delete.title_for_secret"),visible:G.value,onCancel:se,onProceed:ee},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])],64)}}}),[["__scopeId","data-v-115ca40d"]]),wt={class:"kong-ui-entities-secrets-list"},Ct=ce(e.defineComponent({__name:"SecretList",props:{config:{type:Object,required:!0,validator:l=>!(!l||l?.app!=="konnect"||!l.createRoute||!l.getEditRoute||l.apiType==="aiGateway"&&!l.aiGatewayId)},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(l,{emit:g}){const i=g,s=l,d=w=>{i("error",w)},o=w=>{i("delete:success",w)},{axiosInstance:S}=_.useAxios(s.config?.axiosRequestConfig),A=e.ref(""),y=e.computed(()=>s.config.apiType==="aiGateway"?L.getVault.aiGateway:L.getVault[s.config.app]),h=e.computed(()=>`${s.config.apiBaseUrl}${y.value}`.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"").replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.vaultId));return e.onBeforeMount(async()=>{try{const{data:w}=await S.get(h.value);A.value=w?.config?.config_store_id}catch(w){i("error",w)}}),(w,C)=>(e.openBlock(),e.createElementBlock("div",wt,[A.value?(e.openBlock(),e.createBlock(kt,e.mergeProps({key:0},s,{"config-store-id":A.value,"onDelete:success":o,onError:d}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-e9c157a0"]]),Et=ce(e.defineComponent({inheritAttrs:!1,__name:"SecretFormInner",props:{config:{type:Object,required:!0,validator:l=>!(!l||l.app!=="konnect"||l.apiType!=="aiGateway"&&!l.controlPlaneId||!l.cancelRoute||l.apiType==="aiGateway"&&!l.aiGatewayId)},configStoreId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(l,{emit:g}){const i=l,s=g,{i18n:{t:d}}=fe.useI18n(),o=Ce.useRouter(),{axiosInstance:S}=_.useAxios(i.config?.axiosRequestConfig),{getMessageFromError:A}=_.useErrors(),y=e.reactive({fields:{key:"",value:""},readonly:!1,errorMessage:""}),h=e.reactive({key:"",value:""}),w=e.computed(()=>i.config.apiType==="aiGateway"?L.form.aiGateway:L.form[i.config.app]),C=e.computed(()=>w.value?.edit.replace(/{aiGatewayId}/gi,i.config.aiGatewayId||"").replace(/{id}/gi,i.configStoreId).replace(/{secretId}/gi,i.secretId)),x=()=>{o.push(i.config?.cancelRoute||{name:"secret-list"})},c=V=>{s("loading",V)},N=V=>{s("error",V)},f=V=>{y.fields.key=V?.item?.key||V?.key||"",y.fields.value=V?.item?.value||V?.value||"",Object.assign(h,y.fields)},O=e.computed(()=>i.secretId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),$=e.computed(()=>O.value===_.EntityBaseFormType.Edit?"edit":"create"),W=e.computed(()=>`${i.config.apiBaseUrl}${w.value[O.value]}`.replace(/{aiGatewayId}/gi,i.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"").replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:"").replace(/{id}/gi,i.configStoreId).replace(/{secretId}/gi,i.secretId)),oe=e.computed(()=>!!y.fields.key&&!!y.fields.value),j=e.computed(()=>JSON.stringify(y.fields)!==JSON.stringify(h)),G=e.computed(()=>({key:y.fields.key,value:y.fields.value})),Y=async()=>{try{y.readonly=!0;let V;if(O.value==="create")V=await S.post(W.value,G.value);else if(O.value==="edit"){const a=i.config.apiType==="aiGateway"?{value:G.value.value}:G.value;V=await S.put(W.value,a)}f(V?.data),s("update",V?.data)}catch(V){y.errorMessage=A(V),s("error",V)}finally{y.readonly=!1}};return(V,a)=>{const Z=e.resolveComponent("KInput"),se=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(e.unref(_.EntityBaseForm),{"can-submit":oe.value&&j.value,config:l.config,"edit-id":l.secretId,"entity-type":e.unref(_.SupportedEntityType).Other,"error-message":y.errorMessage,"fetch-url":C.value,"form-fields":G.value,"is-readonly":y.readonly,onCancel:x,"onFetch:error":N,"onFetch:success":f,onLoading:c,onSubmit:Y},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(d)("secrets.form.info.description"),"has-divider":"",title:e.unref(d)("secrets.form.info.title")},{default:e.withCtx(()=>[e.createVNode(Z,{modelValue:y.fields.key,"onUpdate:modelValue":a[0]||(a[0]=ee=>y.fields.key=ee),modelModifiers:{trim:!0},autocomplete:"off",class:"key-field","data-testid":"secret-form-key",disabled:O.value===e.unref(_.EntityBaseFormType).Edit,label:e.unref(d)("secrets.form.fields.key.label"),placeholder:e.unref(d)("secrets.form.fields.key.placeholder"),readonly:y.readonly,required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(e.unref(_.SensitiveInput),{modelValue:y.fields.value,"onUpdate:modelValue":a[1]||(a[1]=ee=>y.fields.value=ee),modelModifiers:{trim:!0},"data-testid":"secret-form-value",label:e.unref(d)("secrets.form.fields.value.label"),labels:{rotateLabel:e.unref(d)("secrets.form.fields.value.rotateLabel")},mode:$.value,multiline:"",placeholder:e.unref(d)("secrets.form.fields.value.placeholder"),readonly:y.readonly,required:""},null,8,["modelValue","label","labels","mode","placeholder","readonly"]),e.createVNode(se,{appearance:"warning",message:e.unref(d)("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-6ff371de"]]),xt={class:"kong-ui-entities-secret-form"},At=ce(e.defineComponent({__name:"SecretForm",props:{config:{type:Object,required:!0,validator:l=>!(!l||l.app!=="konnect"||l.apiType!=="aiGateway"&&!l.controlPlaneId||!l.cancelRoute||l.apiType==="aiGateway"&&!l.aiGatewayId)},vaultId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(l,{emit:g}){const i=l,s=g,d=C=>{s("update",C)},o=C=>{s("error",C)},S=C=>{s("loading",C)},{axiosInstance:A}=_.useAxios(i.config?.axiosRequestConfig),y=e.ref(""),h=e.computed(()=>i.config.apiType==="aiGateway"?L.getVault.aiGateway:L.getVault[i.config.app]),w=e.computed(()=>`${i.config.apiBaseUrl}${h.value}`.replace(/{aiGatewayId}/gi,i.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"").replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:"").replace(/{id}/gi,i.vaultId));return e.onBeforeMount(async()=>{try{const{data:C}=await A.get(w.value);y.value=C?.config?.config_store_id}catch(C){s("error",C)}}),(C,x)=>(e.openBlock(),e.createElementBlock("div",xt,[y.value?(e.openBlock(),e.createBlock(Et,e.mergeProps({key:0},i,{"config-store-id":y.value,onError:o,onLoading:S,onUpdate:d}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-1651a0c6"]]),Nt={class:"vault-secret-picker-provider"},Rt=ce(e.defineComponent({__name:"VaultSecretPickerProvider",props:{value:{},disabled:{type:Boolean},update:{type:Function}},emits:["open"],setup(l,{emit:g}){const i=l,s=g,{i18n:{t:d},i18nT:o}=fe.useI18n();return(S,A)=>(e.openBlock(),e.createElementBlock("div",Nt,[e.createVNode(e.unref(o),{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:i.disabled}),onClick:A[0]||(A[0]=()=>!i.disabled&&s("open",i.value,i.update))},e.toDisplayString(e.unref(d)("vault_secret_picker.provider.cta")),3)]),_:1})]))}}),[["__scopeId","data-v-fdd70514"]]),St=l=>{let g=l.trim();if(!g.startsWith("{")||!g.endsWith("}"))throw new Error("Invalid secret reference: must be enclosed in curly braces");if(g=g.substring(1,g.length-1).trim(),!g.startsWith("vault://"))throw new Error("Invalid secret reference: must start with vault://");const i=new URL(`http://${g.substring(8)}`);if(!i)throw new Error("Invalid secret reference: must have a vault prefix");const s=i.host,[,d,...o]=i.pathname.split("/");if(!s)throw new Error("Invalid secret reference: must have a vault prefix");return{vaultPrefix:s,secretId:d||void 0,optionalSecretKey:o?.join("/")}},It=l=>{if(!l.vaultPrefix)throw new Error("Invalid secret reference: must have a vault prefix");let g=`vault://${l.vaultPrefix}`;return l.secretId&&(g=`${g}/${l.secretId}`),l.optionalSecretKey&&(g=`${g}/${l.optionalSecretKey}`),`{${g}}`},vt={key:1,class:"inputs-wrapper"},Ut={"data-testid":"no-search-results"},Tt={class:"k-select-selected-item-label"},Ht={class:"vault-secret-picker-vault-dropdown-item"},Bt={class:"select-item-label"},Mt={class:"select-item-description"},$t={class:"select-item-description"},Pt={"data-testid":"no-search-results"},Gt=ce(e.defineComponent({__name:"VaultSecretPicker",props:{config:{type:Object,required:!0,validator:l=>!(!l||!["konnect","kongManager"].includes(l?.app)||l.app==="konnect"&&l.apiType!=="aiGateway"&&!l.controlPlaneId||l.app==="kongManager"&&typeof l.workspace!="string"||l.apiType==="aiGateway"&&!l.aiGatewayId)},setup:{type:null,required:!1,default:!1},title:{type:String,required:!1,default:void 0},proceedButtonText:{type:String,required:!1,default:void 0},additionalDisabled:{type:Boolean,required:!1,default:!1},allowedProviders:{type:Array,required:!1,default:void 0},showSecretKey:{type:Boolean,required:!1,default:!0}},emits:["proceed","cancel"],setup(l,{emit:g}){const{i18n:{t:i}}=fe.useI18n(),s=l,d=g,{axiosInstance:o}=_.useAxios({validateStatus:k=>k===404||k>=200&&k<300,...s.config?.axiosRequestConfig}),S=e.ref(!1),A=e.ref(""),y=e.ref(""),h=e.ref(""),w=e.ref(),C=e.computed(()=>s.config.apiType==="aiGateway"),x=k=>k.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||""),c=e.computed(()=>C.value?x(Q.list.aiGateway.getAll):Q.list[s.config.app].getAll),N=e.computed(()=>C.value?x(L.list.aiGateway).replace(/{id}/gi,w.value?.config?.config_store_id??""):s.config.app==="konnect"?L.list[s.config.app].replace(/{id}/gi,w.value?.config?.config_store_id??""):"<not_applicable>"),f=e.computed(()=>{if(W&&V)return i("vault_secret_picker.fetch_error.vaults_and_secrets");if(W)return i("vault_secret_picker.fetch_error.vaults");if(V)return i("vault_secret_picker.fetch_error.secrets")}),{debouncedQueryChange:O,loading:$,error:W,loadItems:oe,results:j}=_.useDebouncedFilter(s.config,c,void 0,{fetchedItemsKey:"data",searchKeys:C.value?["name"]:["prefix"]}),{debouncedQueryChange:G,loading:Y,error:V,loadItems:a,results:Z}=_.useDebouncedFilter(s.config,N,void 0,{fetchedItemsKey:"data",searchKeys:["key"],exactMatchKey:"key"}),se=k=>s.allowedProviders?.length?s.allowedProviders.includes(k):k!==t.AZURE_CERTS,ee=e.computed(()=>C.value?(j.value??[]).map(k=>Ve(k)):j.value??[]),re=e.computed(()=>{let k=!1;const E=(ee.value??[]).filter(I=>se(I.name)).map(I=>(I.prefix===A.value&&(k=!0),{label:I.prefix,value:I.prefix,vault:I}));return!k&&w.value&&E.push({label:w.value.prefix,value:w.value.prefix,vault:w.value}),E}),H=e.computed(()=>{let k=!1;const E=Z.value?.map(I=>(I.key===y.value&&(k=!0),{label:I.key,value:I.key}))??[];return!k&&y.value&&E.push({label:y.value,value:y.value}),E}),q=e.computed(()=>w?.value?.name==="konnect"),T=e.computed(()=>!!w.value&&!!y.value&&!s.additionalDisabled),X=k=>k.label?`${k.label} - (${k.vault.name} - ${k.vault.id})`:k.value,M=k=>{const E=C.value?Q.form.aiGateway.edit:Q.form[s.config.app].edit;let I=`${s.config.apiBaseUrl}${E}`;return s.config.app==="konnect"&&(I=I.replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"")),x(I).replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,k)},ue=(k,E)=>{if(s.config.app!=="konnect")return"<not_applicable>";const I=C.value?L.form.aiGateway.edit:L.form[s.config.app].edit;return x(`${s.config.apiBaseUrl}${I}`).replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"").replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,E).replace(/{secretId}/gi,k)},te=()=>{d("proceed",It({vaultPrefix:A.value,secretId:y.value||void 0,optionalSecretKey:h.value||void 0}))};return e.watch(()=>s.setup,async k=>{if(k!==!1){if(S.value=!0,A.value="",w.value=void 0,y.value="",h.value="",typeof k=="string"&&k.trim().length>0)try{let E,I="",ae="",ne="";const P=St(k),{data:R}=await o.get(M(P.vaultPrefix)),b=R&&C.value?Ve(R):R;if(b?.name)if(E=b,I=P.vaultPrefix,E.name==="konnect"){if(P.secretId){const{data:v}=await o.get(ue(P.secretId,b.config.config_store_id));v.key===P.secretId&&(ae=P.secretId,ne=P.optionalSecretKey??"")}}else ae=P.secretId??"",ne=P.optionalSecretKey??"";await e.nextTick(()=>{A.value=I,w.value=E,y.value=ae,h.value=ne})}catch(E){console.debug(E)}S.value=!1,await oe()}},{immediate:!0}),e.watch(A,async(k,E)=>{S.value||k===E||(w.value=re.value.find(I=>I.value===k)?.vault,y.value="",h.value="")}),e.watch(N,async()=>{q.value&&await a()},{immediate:!0}),(k,E)=>{const I=e.resolveComponent("KEmptyState"),ae=e.resolveComponent("KSelect"),ne=e.resolveComponent("KInput"),P=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(P,{"action-button-disabled":!T.value,"action-button-text":l.proceedButtonText||e.unref(i)("vault_secret_picker.actions.use_key"),class:"vault-secret-picker","data-testid":"vault-secret-picker-modal",title:l.title||e.unref(i)("vault_secret_picker.title"),visible:s.setup!==!1,onCancel:E[4]||(E[4]=()=>d("cancel")),onProceed:te},{default:e.withCtx(()=>[e.unref(W)||e.unref(V)?(e.openBlock(),e.createBlock(I,{key:0,"data-testid":"vault-secret-picker-fetch-error","icon-variant":"error",message:f.value},null,8,["message"])):(e.openBlock(),e.createElementBlock("div",vt,[e.renderSlot(k.$slots,"form-prefix",{},void 0,!0),e.createVNode(ae,{modelValue:A.value,"onUpdate:modelValue":E[0]||(E[0]=R=>A.value=R),clearable:"","data-testid":"vault-secret-picker-vault-select",disabled:S.value,"enable-filtering":"","filter-function":()=>!0,items:re.value,"kpop-attributes":{"data-testid":"vault-secret-picker-vault-popover"},label:e.unref(i)("vault_secret_picker.vault.label"),loading:e.unref($),placeholder:e.unref(i)("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(i)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",Ut,e.toDisplayString(e.unref(i)("vault_secret_picker.no_results")),1)]),"selected-item-template":e.withCtx(({item:R})=>[e.createElementVNode("span",Tt,e.toDisplayString(X(R)),1)]),"item-template":e.withCtx(({item:R})=>[e.createElementVNode("div",Ht,[e.createElementVNode("span",Bt,e.toDisplayString(R.label),1),e.createElementVNode("span",Mt,e.toDisplayString(R.vault.name),1),e.createElementVNode("span",$t,e.toDisplayString(R.vault.id),1)])]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"]),q.value?(e.openBlock(),e.createBlock(ae,{key:0,modelValue:y.value,"onUpdate:modelValue":E[1]||(E[1]=R=>y.value=R),clearable:"","data-testid":"vault-secret-picker-secret-id-select",disabled:S.value||!w.value,"enable-filtering":"","filter-function":()=>!0,items:H.value,"kpop-attributes":{"data-testid":"vault-secret-picker-secret-id-popover"},label:e.unref(i)("vault_secret_picker.secret_id.label"),loading:e.unref(Y),placeholder:e.unref(i)("vault_secret_picker.secret_id.select_placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(G)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(i)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",Pt,e.toDisplayString(e.unref(i)("vault_secret_picker.no_results")),1)]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"])):(e.openBlock(),e.createBlock(ne,{key:1,modelValue:y.value,"onUpdate:modelValue":E[2]||(E[2]=R=>y.value=R),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-id-input",disabled:S.value||!w.value,label:e.unref(i)("vault_secret_picker.secret_id.label"),placeholder:e.unref(i)("vault_secret_picker.secret_id.input_placeholder"),required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder"])),l.showSecretKey?(e.openBlock(),e.createBlock(ne,{key:2,modelValue:h.value,"onUpdate:modelValue":E[3]||(E[3]=R=>h.value=R),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-key-input",disabled:S.value||!w.value,help:e.unref(i)("vault_secret_picker.optional_secret_key.help"),label:e.unref(i)("vault_secret_picker.optional_secret_key.label"),placeholder:e.unref(i)("vault_secret_picker.optional_secret_key.placeholder"),type:"text"},null,8,["modelValue","disabled","help","label","placeholder"])):e.createCommentVNode("",!0)]))]),_:3},8,["action-button-disabled","action-button-text","title","visible"])}}}),[["__scopeId","data-v-2ab21bd2"]]);B.SecretForm=At,B.SecretList=Ct,B.VaultAuthMethods=p,B.VaultConfigCard=bt,B.VaultForm=gt,B.VaultList=De,B.VaultProviders=t,B.VaultSecretPicker=Gt,B.VaultSecretPickerProvider=Rt,B.secretsEndpoints=L,B.vaultsEndpoints=Q,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})}));