@kong-ui-public/entities-certificates 3.8.20 → 3.8.22

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.
@@ -9717,7 +9717,7 @@ const lt = {
9717
9717
  for (const [i, n] of e)
9718
9718
  t[i] = n;
9719
9719
  return t;
9720
- }, jg = /* @__PURE__ */ gr(ap, [["__scopeId", "data-v-37a46970"]]), cp = { class: "sni-field-container" }, lp = {
9720
+ }, jg = /* @__PURE__ */ gr(ap, [["__scopeId", "data-v-0656bf7a"]]), cp = { class: "sni-field-container" }, lp = {
9721
9721
  key: 1,
9722
9722
  class: "sni-field-controls-container"
9723
9723
  }, up = { key: 0 }, fp = /* @__PURE__ */ dr({
@@ -9821,7 +9821,7 @@ const lt = {
9821
9821
  ]);
9822
9822
  };
9823
9823
  }
9824
- }), dp = /* @__PURE__ */ gr(fp, [["__scopeId", "data-v-543a45f0"]]), hp = { class: "kong-ui-entities-certificates-form" }, pp = /* @__PURE__ */ dr({
9824
+ }), dp = /* @__PURE__ */ gr(fp, [["__scopeId", "data-v-89e994ac"]]), hp = { class: "kong-ui-entities-certificates-form" }, pp = /* @__PURE__ */ dr({
9825
9825
  __name: "CertificateForm",
9826
9826
  props: {
9827
9827
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -10067,7 +10067,7 @@ const lt = {
10067
10067
  ]);
10068
10068
  };
10069
10069
  }
10070
- }), Pg = /* @__PURE__ */ gr(pp, [["__scopeId", "data-v-fc596de1"]]), Di = "/v2/control-planes/{controlPlaneId}/core-entities", Mi = "/{workspace}", ei = {
10070
+ }), Pg = /* @__PURE__ */ gr(pp, [["__scopeId", "data-v-7988c8e6"]]), Di = "/v2/control-planes/{controlPlaneId}/core-entities", Mi = "/{workspace}", ei = {
10071
10071
  list: {
10072
10072
  konnect: `${Di}/ca_certificates`,
10073
10073
  kongManager: `${Mi}/ca_certificates`
@@ -10244,7 +10244,7 @@ const lt = {
10244
10244
  ]);
10245
10245
  };
10246
10246
  }
10247
- }), Rg = /* @__PURE__ */ gr(vp, [["__scopeId", "data-v-1d42f61b"]]), mp = { class: "kong-ui-entities-ca-certificates-list" }, bp = { class: "button-row" }, wp = { class: "empty-state-icon-gateway" }, Ap = { key: 0 }, Sp = { key: 1 }, kp = { key: 0 }, xp = { key: 1 }, Cp = /* @__PURE__ */ dr({
10247
+ }), Rg = /* @__PURE__ */ gr(vp, [["__scopeId", "data-v-03b2633e"]]), mp = { class: "kong-ui-entities-ca-certificates-list" }, bp = { class: "button-row" }, wp = { class: "empty-state-icon-gateway" }, Ap = { key: 0 }, Sp = { key: 1 }, kp = { key: 0 }, xp = { key: 1 }, Cp = /* @__PURE__ */ dr({
10248
10248
  __name: "CACertificateList",
10249
10249
  props: {
10250
10250
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -10645,7 +10645,7 @@ const lt = {
10645
10645
  ]);
10646
10646
  };
10647
10647
  }
10648
- }), Vg = /* @__PURE__ */ gr(Cp, [["__scopeId", "data-v-88d5c7a2"]]), Bp = { class: "kong-ui-entities-ca-certificates-form" }, Ip = /* @__PURE__ */ dr({
10648
+ }), Vg = /* @__PURE__ */ gr(Cp, [["__scopeId", "data-v-b92930c0"]]), Bp = { class: "kong-ui-entities-ca-certificates-form" }, Ip = /* @__PURE__ */ dr({
10649
10649
  __name: "CACertificateForm",
10650
10650
  props: {
10651
10651
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -10790,7 +10790,7 @@ const lt = {
10790
10790
  ]);
10791
10791
  };
10792
10792
  }
10793
- }), $g = /* @__PURE__ */ gr(Ip, [["__scopeId", "data-v-2a3f488f"]]), Ep = { class: "kong-ui-certificate-entity-config-card" }, Op = { key: 0 }, Np = /* @__PURE__ */ dr({
10793
+ }), $g = /* @__PURE__ */ gr(Ip, [["__scopeId", "data-v-a850d9bb"]]), Ep = { class: "kong-ui-certificate-entity-config-card" }, Op = { key: 0 }, Np = /* @__PURE__ */ dr({
10794
10794
  __name: "CertificateConfigCard",
10795
10795
  props: {
10796
10796
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -11055,7 +11055,7 @@ const lt = {
11055
11055
  ]);
11056
11056
  };
11057
11057
  }
11058
- }), Dg = /* @__PURE__ */ gr(Np, [["__scopeId", "data-v-401d92d6"]]);
11058
+ }), Dg = /* @__PURE__ */ gr(Np, [["__scopeId", "data-v-605d185b"]]);
11059
11059
  export {
11060
11060
  Rg as CACertificateConfigCard,
11061
11061
  $g as CACertificateForm,
@@ -114,4 +114,4 @@ ${e.join(`
114
114
  `)}static pad(e=0){return"".padStart(2*e," ")}static serializeObj(e,t=0){const i=[];let n=this.pad(t++),s="";const c=e[ne.VALUE];c&&(s=` ${c}`),i.push(`${n}${e[ne.NAME]}:${s}`),n=this.pad(t);for(const u in e){if(typeof u=="symbol")continue;const f=e[u],p=u?`${u}: `:"";if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")i.push(`${n}${p}${f}`);else if(f instanceof Date)i.push(`${n}${p}${f.toUTCString()}`);else if(Array.isArray(f))for(const b of f)b[ne.NAME]=u,i.push(...this.serializeObj(b,t));else if(f instanceof ne)f[ne.NAME]=u,i.push(...this.serializeObj(f,t));else if(_.isBufferSource(f))u?(i.push(`${n}${p}`),i.push(...this.serializeBufferSource(f,t+1))):i.push(...this.serializeBufferSource(f,t));else if("toTextObject"in f){const b=f.toTextObject();b[ne.NAME]=u,i.push(...this.serializeObj(b,t))}else throw new TypeError("Cannot serialize data in text format. Unsupported type.")}return i}static serializeBufferSource(e,t=0){const i=this.pad(t),n=_.toUint8Array(e),s=[];for(let c=0;c<n.length;){const u=[];for(let f=0;f<16&&c<n.length;f++){f===8&&u.push("");const p=n[c++].toString(16).padStart(2,"0");u.push(p)}s.push(`${i}${u.join(" ")}`)}return s}static serializeAlgorithm(e){return this.algorithmSerializer.toTextObject(e)}}er.oidSerializer=Ot,er.algorithmSerializer=Od;class Tt{constructor(...e){if(e.length===1){const t=e[0];this.rawData=j.serialize(t),this.onInit(t)}else{const t=j.parse(e[0],e[1]);this.rawData=_.toArrayBuffer(e[0]),this.onInit(t)}}equal(e){return e instanceof Tt?Ba(e.rawData,this.rawData):!1}toString(e="text"){switch(e){case"asn":return j.toString(this.rawData);case"text":return er.serialize(this.toTextObject());case"hex":return L.ToHex(this.rawData);case"base64":return L.ToBase64(this.rawData);case"base64url":return L.ToBase64Url(this.rawData);default:throw TypeError("Argument 'format' is unsupported value")}}getTextName(){return this.constructor.NAME}toTextObject(){const e=this.toTextObjectEmpty();return e[""]=this.rawData,e}toTextObjectEmpty(e){return new ne(this.getTextName(),{},e)}}Tt.NAME="ASN";class Ke extends Tt{constructor(...e){let t;_.isBufferSource(e[0])?t=_.toArrayBuffer(e[0]):t=j.serialize(new Ze({extnID:e[0],critical:e[1],extnValue:new ie(_.toArrayBuffer(e[2]))})),super(t,Ze)}onInit(e){this.type=e.extnID,this.critical=e.critical,this.value=e.extnValue.buffer}toTextObject(){const e=this.toTextObjectWithoutValue();return e[""]=this.value,e}toTextObjectWithoutValue(){const e=this.toTextObjectEmpty(this.critical?"critical":void 0);return e[ne.NAME]===Ke.NAME&&(e[ne.NAME]=Ot.toString(this.type)),e}}var Cu;class Vt{static isCryptoKeyPair(e){return e&&e.privateKey&&e.publicKey}static isCryptoKey(e){return e&&e.usages&&e.type&&e.algorithm&&e.extractable!==void 0}constructor(){this.items=new Map,this[Cu]="CryptoProvider",typeof self<"u"&&typeof crypto<"u"?this.set(Vt.DEFAULT,crypto):typeof global<"u"&&global.crypto&&global.crypto.subtle&&this.set(Vt.DEFAULT,global.crypto)}clear(){this.items.clear()}delete(e){return this.items.delete(e)}forEach(e,t){return this.items.forEach(e,t)}has(e){return this.items.has(e)}get size(){return this.items.size}entries(){return this.items.entries()}keys(){return this.items.keys()}values(){return this.items.values()}[Symbol.iterator](){return this.items[Symbol.iterator]()}get(e=Vt.DEFAULT){const t=this.items.get(e.toLowerCase());if(!t)throw new Error(`Cannot get Crypto by name '${e}'`);return t}set(e,t){if(typeof e=="string"){if(!t)throw new TypeError("Argument 'value' is required");this.items.set(e.toLowerCase(),t)}else this.items.set(Vt.DEFAULT,e);return this}}Cu=Symbol.toStringTag,Vt.DEFAULT="default";const Te=new Vt,Td=/^[0-2](?:\.[1-9][0-9]*)+$/;function Vd(r){return new RegExp(Td).test(r)}class xu{constructor(e={}){this.items={};for(const t in e)this.register(t,e[t])}get(e){return this.items[e]||null}findId(e){return Vd(e)?e:this.get(e)}register(e,t){this.items[e]=t,this.items[t]=e}}const De=new xu;De.register("CN","2.5.4.3"),De.register("L","2.5.4.7"),De.register("ST","2.5.4.8"),De.register("O","2.5.4.10"),De.register("OU","2.5.4.11"),De.register("C","2.5.4.6"),De.register("DC","0.9.2342.19200300.100.1.25"),De.register("E","1.2.840.113549.1.9.1"),De.register("G","2.5.4.42"),De.register("I","2.5.4.43"),De.register("SN","2.5.4.4"),De.register("T","2.5.4.12");function _d(r,e){return`\\${L.ToHex(L.FromUtf8String(e)).toUpperCase()}`}function jd(r){return r.replace(/([,+"\\<>;])/g,"\\$1").replace(/^([ #])/,"\\$1").replace(/([ ]$)/,"\\$1").replace(/([\r\n\t])/,_d)}class _t{static isASCII(e){for(let t=0;t<e.length;t++)if(e.charCodeAt(t)>255)return!1;return!0}static isPrintableString(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/g.test(e)}constructor(e,t={}){this.extraNames=new xu,this.asn=new ye;for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)){const n=t[i];this.extraNames.register(i,n)}typeof e=="string"?this.asn=this.fromString(e):e instanceof ye?this.asn=e:_.isBufferSource(e)?this.asn=j.parse(e,ye):this.asn=this.fromJSON(e)}getField(e){const t=this.extraNames.findId(e)||De.findId(e),i=[];for(const n of this.asn)for(const s of n)s.type===t&&i.push(s.value.toString());return i}getName(e){return this.extraNames.get(e)||De.get(e)}toString(){return this.asn.map(e=>e.map(t=>{const i=this.getName(t.type)||t.type,n=t.value.anyValue?`#${L.ToHex(t.value.anyValue)}`:jd(t.value.toString());return`${i}=${n}`}).join("+")).join(", ")}toJSON(){var e;const t=[];for(const i of this.asn){const n={};for(const s of i){const c=this.getName(s.type)||s.type;(e=n[c])!==null&&e!==void 0||(n[c]=[]),n[c].push(s.value.anyValue?`#${L.ToHex(s.value.anyValue)}`:s.value.toString())}t.push(n)}return t}fromString(e){const t=new ye,i=/(\d\.[\d.]*\d|[A-Za-z]+)=((?:"")|(?:".*?[^\\]")|(?:[^,+].*?(?:[^\\][,+]))|(?:))([,+])?/g;let n=null,s=",";for(;n=i.exec(`${e},`);){let[,c,u]=n;const f=u[u.length-1];(f===","||f==="+")&&(u=u.slice(0,u.length-1),n[3]=f);const p=n[3];c=this.getTypeOid(c);const b=this.createAttribute(c,u);s==="+"?t[t.length-1].push(b):t.push(new ar([b])),s=p}return t}fromJSON(e){const t=new ye;for(const i of e){const n=new ar;for(const s in i){const c=this.getTypeOid(s),u=i[s];for(const f of u){const p=this.createAttribute(c,f);n.push(p)}}t.push(n)}return t}getTypeOid(e){if(/[\d.]+/.test(e)||(e=this.getName(e)||""),!e)throw new Error(`Cannot get OID for name type '${e}'`);return e}createAttribute(e,t){const i=new Pi({type:e});if(typeof t=="object")for(const n in t)switch(n){case"ia5String":i.value.ia5String=t[n];break;case"utf8String":i.value.utf8String=t[n];break;case"universalString":i.value.universalString=t[n];break;case"bmpString":i.value.bmpString=t[n];break;case"printableString":i.value.printableString=t[n];break}else if(t[0]==="#")i.value.anyValue=L.FromHex(t.slice(1));else{const n=this.processStringValue(t);e===this.getName("E")||e===this.getName("DC")?i.value.ia5String=n:_t.isPrintableString(n)?i.value.printableString=n:i.value.utf8String=n}return i}processStringValue(e){const t=/"(.*?[^\\])?"/.exec(e);return t&&(e=t[1]),e.replace(/\\0a/ig,`
115
115
  `).replace(/\\0d/ig,"\r").replace(/\\0g/ig," ").replace(/\\(.)/g,"$1")}toArrayBuffer(){return j.serialize(this.asn)}async getThumbprint(...e){var t;let i,n="SHA-1";return e.length>=1&&!(!((t=e[0])===null||t===void 0)&&t.subtle)?(n=e[0]||n,i=e[1]||Te.get()):i=e[0]||Te.get(),await i.subtle.digest(n,this.toArrayBuffer())}}const Bu="Cannot initialize GeneralName from ASN.1 data.",Eu=`${Bu} Unsupported string format in use.`,Pd=`${Bu} Value doesn't match to GUID regular expression.`,Iu=/^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i,Nu="1.3.6.1.4.1.311.25.1",Ou="1.3.6.1.4.1.311.20.2.3",ia="dns",na="dn",oa="email",sa="ip",aa="url",ca="guid",la="upn",Hn="id";class jt extends Tt{constructor(...e){let t;if(e.length===2)switch(e[0]){case na:{const i=new _t(e[1]).toArrayBuffer(),n=j.parse(i,ye);t=new X({directoryName:n});break}case ia:t=new X({dNSName:e[1]});break;case oa:t=new X({rfc822Name:e[1]});break;case ca:{const i=new RegExp(Iu,"i").exec(e[1]);if(!i)throw new Error("Cannot parse GUID value. Value doesn't match to regular expression");const n=i.slice(1).map((s,c)=>c<3?L.ToHex(new Uint8Array(L.FromHex(s)).reverse()):s).join("");t=new X({otherName:new Dr({typeId:Nu,value:j.serialize(new ie(L.FromHex(n)))})});break}case sa:t=new X({iPAddress:e[1]});break;case Hn:t=new X({registeredID:e[1]});break;case la:{t=new X({otherName:new Dr({typeId:Ou,value:j.serialize(Ic.toASN(e[1]))})});break}case aa:t=new X({uniformResourceIdentifier:e[1]});break;default:throw new Error("Cannot create GeneralName. Unsupported type of the name")}else _.isBufferSource(e[0])?t=j.parse(e[0],X):t=e[0];super(t)}onInit(e){if(e.dNSName!=null)this.type=ia,this.value=e.dNSName;else if(e.rfc822Name!=null)this.type=oa,this.value=e.rfc822Name;else if(e.iPAddress!=null)this.type=sa,this.value=e.iPAddress;else if(e.uniformResourceIdentifier!=null)this.type=aa,this.value=e.uniformResourceIdentifier;else if(e.registeredID!=null)this.type=Hn,this.value=e.registeredID;else if(e.directoryName!=null)this.type=na,this.value=new _t(e.directoryName).toString();else if(e.otherName!=null)if(e.otherName.typeId===Nu){this.type=ca;const t=j.parse(e.otherName.value,ie),i=new RegExp(Iu,"i").exec(L.ToHex(t));if(!i)throw new Error(Pd);this.value=i.slice(1).map((n,s)=>s<3?L.ToHex(new Uint8Array(L.FromHex(n)).reverse()):n).join("-")}else if(e.otherName.typeId===Ou)this.type=la,this.value=j.parse(e.otherName.value,Ae).toString();else throw new Error(Eu);else throw new Error(Eu)}toJSON(){return{type:this.type,value:this.value}}toTextObject(){let e;switch(this.type){case na:case ia:case ca:case sa:case Hn:case la:case aa:e=this.type.toUpperCase();break;case oa:e="Email";break;default:throw new Error("Unsupported GeneralName type")}let t=this.value;return this.type===Hn&&(t=Ot.toString(t)),new ne(e,void 0,t)}}class si extends Tt{constructor(e){let t;if(e instanceof Ne)t=e;else if(Array.isArray(e)){const i=[];for(const n of e)if(n instanceof X)i.push(n);else{const s=j.parse(new jt(n.type,n.value).rawData,X);i.push(s)}t=new Ne(i)}else if(_.isBufferSource(e))t=j.parse(e,Ne);else throw new Error("Cannot initialize GeneralNames. Incorrect incoming arguments");super(t)}onInit(e){const t=[];for(const i of e){let n=null;try{n=new jt(i)}catch{continue}t.push(n)}this.items=t}toJSON(){return this.items.map(e=>e.toJSON())}toTextObject(){const e=super.toTextObjectEmpty();for(const t of this.items){const i=t.toTextObject();let n=e[i[ne.NAME]];Array.isArray(n)||(n=[],e[i[ne.NAME]]=n),n.push(i)}return e}}si.NAME="GeneralNames";const ai="-{5}",ci="\\n",Rd=`[^${ci}]+`,Dd=`${ai}BEGIN (${Rd}(?=${ai}))${ai}`,$d=`${ai}END \\1${ai}`,Nr="\\n",Md=`[^:${ci}]+`,Ud=`(?:[^${ci}]+${Nr}(?: +[^${ci}]+${Nr})*)`,Ld=`(?:[a-zA-Z0-9=+/]+${Nr})+`,Tu=`${Dd}${Nr}(?:((?:${Md}: ${Ud})+))?${Nr}?(${Ld})${$d}`;class Le{static isPem(e){return typeof e=="string"&&new RegExp(Tu,"g").test(e)}static decodeWithHeaders(e){e=e.replace(/\r/g,"");const t=new RegExp(Tu,"g"),i=[];let n=null;for(;n=t.exec(e);){const s=n[3].replace(new RegExp(`[${ci}]+`,"g"),""),c={type:n[1],headers:[],rawData:L.FromBase64(s)},u=n[2];if(u){const f=u.split(new RegExp(Nr,"g"));let p=null;for(const b of f){const[y,q]=b.split(/:(.*)/);if(q===void 0){if(!p)throw new Error("Cannot parse PEM string. Incorrect header value");p.value+=y.trim()}else p&&c.headers.push(p),p={key:y,value:q.trim()}}p&&c.headers.push(p)}i.push(c)}return i}static decode(e){return this.decodeWithHeaders(e).map(i=>i.rawData)}static decodeFirst(e){const t=this.decode(e);if(!t.length)throw new RangeError("PEM string doesn't contain any objects");return t[0]}static encode(e,t){if(Array.isArray(e)){const i=new Array;return t?e.forEach(n=>{if(!_.isBufferSource(n))throw new TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource");i.push(this.encodeStruct({type:t,rawData:_.toArrayBuffer(n)}))}):e.forEach(n=>{if(!("type"in n))throw new TypeError("Cannot encode array of PemStruct in PEM format. Not all items of the array are PemStrut");i.push(this.encodeStruct(n))}),i.join(`
116
116
  `)}else{if(!t)throw new Error("Required argument 'tag' is missed");return this.encodeStruct({type:t,rawData:_.toArrayBuffer(e)})}}static encodeStruct(e){var t;const i=e.type.toLocaleUpperCase(),n=[];if(n.push(`-----BEGIN ${i}-----`),!((t=e.headers)===null||t===void 0)&&t.length){for(const p of e.headers)n.push(`${p.key}: ${p.value}`);n.push("")}const s=L.ToBase64(e.rawData);let c,u=0;const f=Array();for(;u<s.length&&(s.length-u<64?c=s.substring(u):(c=s.substring(u,u+64),u+=64),c.length!==0);)if(f.push(c),c.length<64)break;return n.push(...f),n.push(`-----END ${i}-----`),n.join(`
117
- `)}}Le.CertificateTag="CERTIFICATE",Le.CrlTag="CRL",Le.CertificateRequestTag="CERTIFICATE REQUEST",Le.PublicKeyTag="PUBLIC KEY",Le.PrivateKeyTag="PRIVATE KEY";class kt extends Tt{static isAsnEncoded(e){return _.isBufferSource(e)||typeof e=="string"}static toArrayBuffer(e){if(typeof e=="string"){if(Le.isPem(e))return Le.decode(e)[0];if(L.isHex(e))return L.FromHex(e);if(L.isBase64(e))return L.FromBase64(e);if(L.isBase64Url(e))return L.FromBase64Url(e);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}else{const t=L.ToBinary(e);return Le.isPem(t)?Le.decode(t)[0]:L.isHex(t)?L.FromHex(t):L.isBase64(t)?L.FromBase64(t):L.isBase64Url(t)?L.FromBase64Url(t):_.toArrayBuffer(e)}}constructor(...e){kt.isAsnEncoded(e[0])?super(kt.toArrayBuffer(e[0]),e[1]):super(e[0])}toString(e="pem"){switch(e){case"pem":return Le.encode(this.rawData,this.tag);default:return super.toString(e)}}}class lt extends kt{static async create(e,t=Te.get()){if(e instanceof lt)return e;if(Vt.isCryptoKey(e)){if(e.type!=="public")throw new TypeError("Public key is required");const i=await t.subtle.exportKey("spki",e);return new lt(i)}else{if(e.publicKey)return e.publicKey;if(_.isBufferSource(e))return new lt(e);throw new TypeError("Unsupported PublicKeyType")}}constructor(e){kt.isAsnEncoded(e)?super(e,ot):super(e),this.tag=Le.PublicKeyTag}async export(...e){let t,i=["verify"],n={hash:"SHA-256",...this.algorithm};e.length>1?(n=e[0]||n,i=e[1]||i,t=e[2]||Te.get()):t=e[0]||Te.get();let s=this.rawData;const c=j.parse(this.rawData,ot);return c.algorithm.algorithm===ei&&(s=Hd(c,s)),t.subtle.importKey("spki",s,n,!0,i)}onInit(e){const t=Oe.resolve(Ir),i=this.algorithm=t.toWebAlgorithm(e.algorithm);switch(e.algorithm.algorithm){case Yt:{const n=j.parse(e.subjectPublicKey,_s),s=_.toUint8Array(n.modulus);i.publicExponent=_.toUint8Array(n.publicExponent),i.modulusLength=(s[0]?s:s.slice(1)).byteLength<<3;break}}}async getThumbprint(...e){var t;let i,n="SHA-1";return e.length>=1&&!(!((t=e[0])===null||t===void 0)&&t.subtle)?(n=e[0]||n,i=e[1]||Te.get()):i=e[0]||Te.get(),await i.subtle.digest(n,this.rawData)}async getKeyIdentifier(...e){let t,i="SHA-1";e.length===1?typeof e[0]=="string"?(i=e[0],t=Te.get()):t=e[0]:e.length===2?(i=e[0],t=e[1]):t=Te.get();const n=j.parse(this.rawData,ot);return await t.subtle.digest(i,n.subjectPublicKey)}toTextObject(){const e=this.toTextObjectEmpty(),t=j.parse(this.rawData,ot);switch(e.Algorithm=er.serializeAlgorithm(t.algorithm),t.algorithm.algorithm){case Zr:e["EC Point"]=t.subjectPublicKey;break;case Yt:default:e["Raw Data"]=t.subjectPublicKey}return e}}function Hd(r,e){return r.algorithm=new R({algorithm:Yt,parameters:null}),e=j.serialize(r),e}class li extends Ke{static async create(e,t=!1,i=Te.get()){if("name"in e&&"serialNumber"in e)return new li(e,t);const s=await(await lt.create(e,i)).getKeyIdentifier(i);return new li(L.ToHex(s),t)}constructor(...e){if(_.isBufferSource(e[0]))super(e[0]);else if(typeof e[0]=="string"){const t=new qt({keyIdentifier:new No(L.FromHex(e[0]))});super(Io,e[1],j.serialize(t))}else{const t=e[0],i=t.name instanceof si?j.parse(t.name.rawData,Ne):t.name,n=new qt({authorityCertIssuer:i,authorityCertSerialNumber:L.FromHex(t.serialNumber)});super(Io,e[1],j.serialize(n))}}onInit(e){super.onInit(e);const t=j.parse(e.extnValue,qt);t.keyIdentifier&&(this.keyId=L.ToHex(t.keyIdentifier)),(t.authorityCertIssuer||t.authorityCertSerialNumber)&&(this.certId={name:t.authorityCertIssuer||[],serialNumber:t.authorityCertSerialNumber?L.ToHex(t.authorityCertSerialNumber):""})}toTextObject(){const e=this.toTextObjectWithoutValue(),t=j.parse(this.value,qt);return t.authorityCertIssuer&&(e["Authority Issuer"]=new si(t.authorityCertIssuer).toTextObject()),t.authorityCertSerialNumber&&(e["Authority Serial Number"]=t.authorityCertSerialNumber),t.keyIdentifier&&(e[""]=t.keyIdentifier),e}}li.NAME="Authority Key Identifier";class Vu extends Ke{constructor(...e){if(_.isBufferSource(e[0])){super(e[0]);const t=j.parse(this.value,Di);this.ca=t.cA,this.pathLength=t.pathLenConstraint}else{const t=new Di({cA:e[0],pathLenConstraint:e[1]});super($c,e[2],j.serialize(t)),this.ca=e[0],this.pathLength=e[1]}}toTextObject(){const e=this.toTextObjectWithoutValue();return this.ca&&(e.CA=this.ca),this.pathLength!==void 0&&(e["Path Length"]=this.pathLength),e}}Vu.NAME="Basic Constraints";var _u;(function(r){r.serverAuth="1.3.6.1.5.5.7.3.1",r.clientAuth="1.3.6.1.5.5.7.3.2",r.codeSigning="1.3.6.1.5.5.7.3.3",r.emailProtection="1.3.6.1.5.5.7.3.4",r.timeStamping="1.3.6.1.5.5.7.3.8",r.ocspSigning="1.3.6.1.5.5.7.3.9"})(_u||(_u={}));class ju extends Ke{constructor(...e){if(_.isBufferSource(e[0])){super(e[0]);const t=j.parse(this.value,Hi);this.usages=t.map(i=>i)}else{const t=new Hi(e[0]);super(qc,e[1],j.serialize(t)),this.usages=e[0]}}toTextObject(){const e=this.toTextObjectWithoutValue();return e[""]=this.usages.map(t=>Ot.toString(t)).join(", "),e}}ju.NAME="Extended Key Usages";var ua;(function(r){r[r.digitalSignature=1]="digitalSignature",r[r.nonRepudiation=2]="nonRepudiation",r[r.keyEncipherment=4]="keyEncipherment",r[r.dataEncipherment=8]="dataEncipherment",r[r.keyAgreement=16]="keyAgreement",r[r.keyCertSign=32]="keyCertSign",r[r.cRLSign=64]="cRLSign",r[r.encipherOnly=128]="encipherOnly",r[r.decipherOnly=256]="decipherOnly"})(ua||(ua={}));class fa extends Ke{constructor(...e){if(_.isBufferSource(e[0])){super(e[0]);const t=j.parse(this.value,qo);this.usages=t.toNumber()}else{const t=new qo(e[0]);super(zc,e[1],j.serialize(t)),this.usages=e[0]}}toTextObject(){const e=this.toTextObjectWithoutValue(),t=j.parse(this.value,qo);return e[""]=t.toJSON().join(", "),e}}fa.NAME="Key Usages";class Fn extends Ke{static async create(e,t=!1,i=Te.get()){const s=await(await lt.create(e,i)).getKeyIdentifier(i);return new Fn(L.ToHex(s),t)}constructor(...e){if(_.isBufferSource(e[0])){super(e[0]);const t=j.parse(this.value,Et);this.keyId=L.ToHex(t)}else{const t=typeof e[0]=="string"?L.FromHex(e[0]):e[0],i=new Et(t);super(Qc,e[1],j.serialize(i)),this.keyId=L.ToHex(t)}}toTextObject(){const e=this.toTextObjectWithoutValue(),t=j.parse(this.value,Et);return e[""]=t,e}}Fn.NAME="Subject Key Identifier";class da extends Ke{constructor(...e){_.isBufferSource(e[0])?super(e[0]):super(Yc,e[1],new si(e[0]||[]).rawData)}onInit(e){super.onInit(e);const t=j.parse(e.extnValue,Jo);this.names=new si(t)}toTextObject(){const e=this.toTextObjectWithoutValue(),t=this.names.toTextObject();for(const i in t)e[i]=t[i];return e}}da.NAME="Subject Alternative Name";class ze{static register(e,t){this.items.set(e,t)}static create(e){const t=new Ke(e),i=this.items.get(t.type);return i?new i(e):t}}ze.items=new Map;class Pu extends Ke{constructor(...e){var t;if(_.isBufferSource(e[0])){super(e[0]);const i=j.parse(this.value,Ui);this.policies=i.map(n=>n.policyIdentifier)}else{const i=e[0],n=(t=e[1])!==null&&t!==void 0?t:!1,s=new Ui(i.map(c=>new Mi({policyIdentifier:c})));super(Uc,n,j.serialize(s)),this.policies=i}}toTextObject(){const e=this.toTextObjectWithoutValue();return e.Policy=this.policies.map(t=>new ne("",{},Ot.toString(t))),e}}Pu.NAME="Certificate Policies",ze.register(Uc,Pu);class Ru extends Ke{constructor(...e){var t;if(_.isBufferSource(e[0]))super(e[0]);else if(Array.isArray(e[0])&&typeof e[0][0]=="string"){const n=e[0].map(c=>new ur({distributionPoint:new Kt({fullName:[new X({uniformResourceIdentifier:c})]})})),s=new fr(n);super(Do,e[1],j.serialize(s))}else{const i=new fr(e[0]);super(Do,e[1],j.serialize(i))}(t=this.distributionPoints)!==null&&t!==void 0||(this.distributionPoints=[])}onInit(e){super.onInit(e);const t=j.parse(e.extnValue,fr);this.distributionPoints=t}toTextObject(){const e=this.toTextObjectWithoutValue();return e["Distribution Point"]=this.distributionPoints.map(t=>{var i;const n={};return t.distributionPoint&&(n[""]=(i=t.distributionPoint.fullName)===null||i===void 0?void 0:i.map(s=>new jt(s).toString()).join(", ")),t.reasons&&(n.Reasons=t.reasons.toString()),t.cRLIssuer&&(n["CRL Issuer"]=t.cRLIssuer.map(s=>s.toString()).join(", ")),n}),e}}Ru.NAME="CRL Distribution Points";class Du extends Ke{constructor(...e){var t,i,n,s;if(_.isBufferSource(e[0]))super(e[0]);else if(e[0]instanceof lr){const c=new lr(e[0]);super(Eo,e[1],j.serialize(c))}else{const c=e[0],u=new lr;Kn(u,c,jc,"ocsp"),Kn(u,c,Pc,"caIssuers"),Kn(u,c,Rc,"timeStamping"),Kn(u,c,Dc,"caRepository"),super(Eo,e[1],j.serialize(u))}(t=this.ocsp)!==null&&t!==void 0||(this.ocsp=[]),(i=this.caIssuers)!==null&&i!==void 0||(this.caIssuers=[]),(n=this.timeStamping)!==null&&n!==void 0||(this.timeStamping=[]),(s=this.caRepository)!==null&&s!==void 0||(this.caRepository=[])}onInit(e){super.onInit(e),this.ocsp=[],this.caIssuers=[],this.timeStamping=[],this.caRepository=[],j.parse(e.extnValue,lr).forEach(i=>{switch(i.accessMethod){case jc:this.ocsp.push(new jt(i.accessLocation));break;case Pc:this.caIssuers.push(new jt(i.accessLocation));break;case Rc:this.timeStamping.push(new jt(i.accessLocation));break;case Dc:this.caRepository.push(new jt(i.accessLocation));break}})}toTextObject(){const e=this.toTextObjectWithoutValue();return this.ocsp.length&&qn(e,"OCSP",this.ocsp),this.caIssuers.length&&qn(e,"CA Issuers",this.caIssuers),this.timeStamping.length&&qn(e,"Time Stamping",this.timeStamping),this.caRepository.length&&qn(e,"CA Repository",this.caRepository),e}}Du.NAME="Authority Info Access";function qn(r,e,t){if(t.length===1)r[e]=t[0].toTextObject();else{const i=new ne("");t.forEach((n,s)=>{const c=n.toTextObject(),u=`${c[ne.NAME]} ${s+1}`;let f=i[u];Array.isArray(f)||(f=[],i[u]=f),f.push(c)}),r[e]=i}}function Kn(r,e,t,i){const n=e[i];n&&(Array.isArray(n)?n:[n]).forEach(c=>{typeof c=="string"&&(c=new jt("url",c)),r.push(new $r({accessMethod:t,accessLocation:j.parse(c.rawData,X)}))})}class Or extends Tt{constructor(...e){let t;if(_.isBufferSource(e[0]))t=_.toArrayBuffer(e[0]);else{const i=e[0],n=Array.isArray(e[1])?e[1].map(s=>_.toArrayBuffer(s)):[];t=j.serialize(new vt({type:i,values:n}))}super(t,vt)}onInit(e){this.type=e.type,this.values=e.values}toTextObject(){const e=this.toTextObjectWithoutValue();return e.Value=this.values.map(t=>new ne("",{"":t})),e}toTextObjectWithoutValue(){const e=this.toTextObjectEmpty();return e[ne.NAME]===Or.NAME&&(e[ne.NAME]=Ot.toString(this.type)),e}}Or.NAME="Attribute";class $u extends Or{constructor(...e){var t;if(_.isBufferSource(e[0]))super(e[0]);else{const i=new Mn({printableString:e[0]});super(jl,[j.serialize(i)])}(t=this.password)!==null&&t!==void 0||(this.password="")}onInit(e){if(super.onInit(e),this.values[0]){const t=j.parse(this.values[0],Mn);this.password=t.toString()}}toTextObject(){const e=this.toTextObjectWithoutValue();return e[ne.VALUE]=this.password,e}}$u.NAME="Challenge Password";class pa extends Or{constructor(...e){var t;if(_.isBufferSource(e[0]))super(e[0]);else{const i=e[0],n=new zt;for(const s of i)n.push(j.parse(s.rawData,Ze));super(Ws,[j.serialize(n)])}(t=this.items)!==null&&t!==void 0||(this.items=[])}onInit(e){if(super.onInit(e),this.values[0]){const t=j.parse(this.values[0],zt);this.items=t.map(i=>ze.create(j.serialize(i)))}}toTextObject(){const e=this.toTextObjectWithoutValue(),t=this.items.map(i=>i.toTextObject());for(const i of t)e[i[ne.NAME]]=i;return e}}pa.NAME="Extensions";class zn{static register(e,t){this.items.set(e,t)}static create(e){const t=new Or(e),i=this.items.get(t.type);return i?new i(e):t}}zn.items=new Map;const Gn="crypto.signatureFormatter";class Fd{toAsnSignature(e,t){return _.toArrayBuffer(t)}toWebSignature(e,t){return _.toArrayBuffer(t)}}var Wn;let ha=Wn=class{static createPssParams(e,t){const i=Wn.getHashAlgorithm(e);return i?new Qt({hashAlgorithm:i,maskGenAlgorithm:new R({algorithm:Cn,parameters:j.serialize(i)}),saltLength:t}):null}static getHashAlgorithm(e){const t=Oe.resolve(Ir);return typeof e=="string"?t.toAsnAlgorithm({name:e}):typeof e=="object"&&e&&"name"in e?t.toAsnAlgorithm(e):null}toAsnAlgorithm(e){switch(e.name.toLowerCase()){case"rsassa-pkcs1-v1_5":if("hash"in e){let t;if(typeof e.hash=="string")t=e.hash;else if(e.hash&&typeof e.hash=="object"&&"name"in e.hash&&typeof e.hash.name=="string")t=e.hash.name.toUpperCase();else throw new Error("Cannot get hash algorithm name");switch(t.toLowerCase()){case"sha-1":return new R({algorithm:mn,parameters:null});case"sha-256":return new R({algorithm:Os,parameters:null});case"sha-384":return new R({algorithm:bn,parameters:null});case"sha-512":return new R({algorithm:vn,parameters:null})}}else return new R({algorithm:Yt,parameters:null});break;case"rsa-pss":if("hash"in e){if(!("saltLength"in e&&typeof e.saltLength=="number"))throw new Error("Cannot get 'saltLength' from 'alg' argument");const t=Wn.createPssParams(e.hash,e.saltLength);if(!t)throw new Error("Cannot create PSS parameters");return new R({algorithm:ei,parameters:j.serialize(t)})}else return new R({algorithm:ei,parameters:null})}return null}toWebAlgorithm(e){switch(e.algorithm){case Yt:return{name:"RSASSA-PKCS1-v1_5"};case mn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case Os:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case bn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case vn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}};case ei:if(e.parameters){const t=j.parse(e.parameters,Qt);return{name:"RSA-PSS",hash:Oe.resolve(Ir).toWebAlgorithm(t.hashAlgorithm),saltLength:t.saltLength}}else return{name:"RSA-PSS"}}return null}};ha=Wn=a([Vn()],ha),Oe.registerSingleton(ni,ha);let ya=class{toAsnAlgorithm(e){switch(e.name.toLowerCase()){case"sha-1":return new R({algorithm:wn});case"sha-256":return new R({algorithm:Sn});case"sha-384":return new R({algorithm:An});case"sha-512":return new R({algorithm:kn})}return null}toWebAlgorithm(e){switch(e.algorithm){case wn:return{name:"SHA-1"};case Sn:return{name:"SHA-256"};case An:return{name:"SHA-384"};case kn:return{name:"SHA-512"}}return null}};ya=a([Vn()],ya),Oe.registerSingleton(ni,ya);class Ge{addPadding(e,t){const i=_.toUint8Array(t),n=new Uint8Array(e);return n.set(i,e-i.length),n}removePadding(e,t=!1){let i=_.toUint8Array(e);for(let n=0;n<i.length;n++)if(i[n]){i=i.slice(n);break}if(t&&i[0]>127){const n=new Uint8Array(i.length+1);return n.set(i,1),n.buffer}return i.buffer}toAsnSignature(e,t){if(e.name==="ECDSA"){const i=e.namedCurve,n=Ge.namedCurveSize.get(i)||Ge.defaultNamedCurveSize,s=new gn,c=_.toUint8Array(t);return s.r=this.removePadding(c.slice(0,n),!0),s.s=this.removePadding(c.slice(n,n+n),!0),j.serialize(s)}return null}toWebSignature(e,t){if(e.name==="ECDSA"){const i=j.parse(t,gn),n=e.namedCurve,s=Ge.namedCurveSize.get(n)||Ge.defaultNamedCurveSize,c=this.addPadding(s,this.removePadding(i.r)),u=this.addPadding(s,this.removePadding(i.s));return rf(c,u)}return null}}Ge.namedCurveSize=new Map,Ge.defaultNamedCurveSize=32;const ga="1.3.101.110",Mu="1.3.101.111",ma="1.3.101.112",Uu="1.3.101.113";let ba=class{toAsnAlgorithm(e){let t=null;switch(e.name.toLowerCase()){case"ed25519":t=ma;break;case"x25519":t=ga;break;case"eddsa":switch(e.namedCurve.toLowerCase()){case"ed25519":t=ma;break;case"ed448":t=Uu;break}break;case"ecdh-es":switch(e.namedCurve.toLowerCase()){case"x25519":t=ga;break;case"x448":t=Mu;break}}return t?new R({algorithm:t}):null}toWebAlgorithm(e){switch(e.algorithm){case ma:return{name:"Ed25519"};case Uu:return{name:"EdDSA",namedCurve:"Ed448"};case ga:return{name:"X25519"};case Mu:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};ba=a([Vn()],ba),Oe.registerSingleton(ni,ba);class qd extends kt{constructor(e){kt.isAsnEncoded(e)?super(e,ii):super(e),this.tag=Le.CertificateRequestTag}onInit(e){this.tbs=j.serialize(e.certificationRequestInfo),this.publicKey=new lt(e.certificationRequestInfo.subjectPKInfo);const t=Oe.resolve(Ir);this.signatureAlgorithm=t.toWebAlgorithm(e.signatureAlgorithm),this.signature=e.signature,this.attributes=e.certificationRequestInfo.attributes.map(n=>zn.create(j.serialize(n)));const i=this.getAttribute(Ws);this.extensions=[],i instanceof pa&&(this.extensions=i.items),this.subjectName=new _t(e.certificationRequestInfo.subject),this.subject=this.subjectName.toString()}getAttribute(e){for(const t of this.attributes)if(t.type===e)return t;return null}getAttributes(e){return this.attributes.filter(t=>t.type===e)}getExtension(e){for(const t of this.extensions)if(t.type===e)return t;return null}getExtensions(e){return this.extensions.filter(t=>t.type===e)}async verify(e=Te.get()){const t={...this.publicKey.algorithm,...this.signatureAlgorithm},i=await this.publicKey.export(t,["verify"],e),n=Oe.resolveAll(Gn).reverse();let s=null;for(const u of n)if(s=u.toWebSignature(t,this.signature),s)break;if(!s)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await e.subtle.verify(this.signatureAlgorithm,i,s,this.tbs)}toTextObject(){const e=this.toTextObjectEmpty(),t=j.parse(this.rawData,ii),i=t.certificationRequestInfo,n=new ne("",{Version:`${dr[i.version]} (${i.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){const s=new ne("");for(const c of this.attributes){const u=c.toTextObject();s[u[ne.NAME]]=u}n.Attributes=s}return e.Data=n,e.Signature=new ne("",{Algorithm:er.serializeAlgorithm(t.signatureAlgorithm),"":t.signature}),e}}qd.NAME="PKCS#10 Certificate Request";class Lu extends kt{constructor(e){kt.isAsnEncoded(e)?super(e,pr):super(e),this.tag=Le.CertificateTag}onInit(e){const t=e.tbsCertificate;this.tbs=j.serialize(t),this.serialNumber=L.ToHex(t.serialNumber),this.subjectName=new _t(t.subject),this.subject=new _t(t.subject).toString(),this.issuerName=new _t(t.issuer),this.issuer=this.issuerName.toString();const i=Oe.resolve(Ir);this.signatureAlgorithm=i.toWebAlgorithm(e.signatureAlgorithm),this.signature=e.signatureValue;const n=t.validity.notBefore.utcTime||t.validity.notBefore.generalTime;if(!n)throw new Error("Cannot get 'notBefore' value");this.notBefore=n;const s=t.validity.notAfter.utcTime||t.validity.notAfter.generalTime;if(!s)throw new Error("Cannot get 'notAfter' value");this.notAfter=s,this.extensions=[],t.extensions&&(this.extensions=t.extensions.map(c=>ze.create(j.serialize(c)))),this.publicKey=new lt(t.subjectPublicKeyInfo)}getExtension(e){for(const t of this.extensions)if(typeof e=="string"){if(t.type===e)return t}else if(t instanceof e)return t;return null}getExtensions(e){return this.extensions.filter(t=>typeof e=="string"?t.type===e:t instanceof e)}async verify(e={},t=Te.get()){let i,n;const s=e.publicKey;try{if(!s)i={...this.publicKey.algorithm,...this.signatureAlgorithm},n=await this.publicKey.export(i,["verify"],t);else if("publicKey"in s)i={...s.publicKey.algorithm,...this.signatureAlgorithm},n=await s.publicKey.export(i,["verify"],t);else if(s instanceof lt)i={...s.algorithm,...this.signatureAlgorithm},n=await s.export(i,["verify"],t);else if(_.isBufferSource(s)){const p=new lt(s);i={...p.algorithm,...this.signatureAlgorithm},n=await p.export(i,["verify"],t)}else i={...s.algorithm,...this.signatureAlgorithm},n=s}catch{return!1}const c=Oe.resolveAll(Gn).reverse();let u=null;for(const p of c)if(u=p.toWebSignature(i,this.signature),u)break;if(!u)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");const f=await t.subtle.verify(this.signatureAlgorithm,n,u,this.tbs);if(e.signatureOnly)return f;{const b=(e.date||new Date).getTime();return f&&this.notBefore.getTime()<b&&b<this.notAfter.getTime()}}async getThumbprint(...e){let t,i="SHA-1";return e[0]&&(e[0].subtle?t=e[0]:(i=e[0]||i,t=e[1])),t??(t=Te.get()),await t.subtle.digest(i,this.rawData)}async isSelfSigned(e=Te.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},e)}toTextObject(){const e=this.toTextObjectEmpty(),t=j.parse(this.rawData,pr),i=t.tbsCertificate,n=new ne("",{Version:`${dr[i.version]} (${i.version})`,"Serial Number":i.serialNumber,"Signature Algorithm":er.serializeAlgorithm(i.signature),Issuer:this.issuer,Validity:new ne("",{"Not Before":i.validity.notBefore.getTime(),"Not After":i.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(i.issuerUniqueID&&(n["Issuer Unique ID"]=i.issuerUniqueID),i.subjectUniqueID&&(n["Subject Unique ID"]=i.subjectUniqueID),this.extensions.length){const s=new ne("");for(const c of this.extensions){const u=c.toTextObject();s[u[ne.NAME]]=u}n.Extensions=s}return e.Data=n,e.Signature=new ne("",{Algorithm:er.serializeAlgorithm(t.signatureAlgorithm),"":t.signatureValue}),e}}Lu.NAME="Certificate";var Hu;(function(r){r[r.unspecified=0]="unspecified",r[r.keyCompromise=1]="keyCompromise",r[r.cACompromise=2]="cACompromise",r[r.affiliationChanged=3]="affiliationChanged",r[r.superseded=4]="superseded",r[r.cessationOfOperation=5]="cessationOfOperation",r[r.certificateHold=6]="certificateHold",r[r.removeFromCRL=8]="removeFromCRL",r[r.privilegeWithdrawn=9]="privilegeWithdrawn",r[r.aACompromise=10]="aACompromise"})(Hu||(Hu={})),ze.register($c,Vu),ze.register(qc,ju),ze.register(zc,fa),ze.register(Qc,Fn),ze.register(Io,li),ze.register(Yc,da),ze.register(Do,Ru),ze.register(Eo,Du),zn.register(jl,$u),zn.register(Ws,pa),Oe.registerSingleton(Gn,Fd),Oe.registerSingleton(Gn,Ge),Ge.namedCurveSize.set("P-256",32),Ge.namedCurveSize.set("K-256",32),Ge.namedCurveSize.set("P-384",48),Ge.namedCurveSize.set("P-521",66);function Fu(){return{parseMetaCertificateData:e=>{if(/{vault:\/\/.*}/g.test(e))throw new Error("not a X.509 certificate");const t=new Lu(e),i={subject:t.subjectName.toString(),issuer:t.issuer,notAfter:t.notAfter};for(const n of t.extensions)if(n instanceof da){const s=n.names.toJSON(),u=Object.entries(s).map(f=>({type:f[1].type,value:f[1].value})).reduce((f,p)=>{const b=p.type,y=f[b]??[];return{...f,[b]:[...y,p.value]}},{});for(const f in u)i.subjectAltName=`${f}=${u[f].join(", ")}`}else if(n instanceof fa){const s=Object.values(ua),c=Array(s.length/2).fill(null).reduce((u,f,p)=>{const b=s[s.length/2+p];if(n.usages&b){const y=s[p];u.push(y)}return u},[]);i.keyUsage=c}return i}}}function Kd(){const r=Fu(),e=o.ref({}),t=n=>{if(!(n.id in e.value))try{e.value[n.id]=r.parseMetaCertificateData(n.cert)}catch{e.value[n.id]=void 0}return e.value[n.id]};return{certificateDataCache:e,getCertificateData:n=>{const s=t(n);return{schemaIssuer:(s==null?void 0:s.issuer)||"",schemaSubject:(s==null?void 0:s.subject)||"",schemaExpiry:(s==null?void 0:s.notAfter)instanceof Date?s.notAfter.getTime()/1e3:0,schemaSanNames:(s==null?void 0:s.subjectAltName)||"",schemaKeyUsages:(s==null?void 0:s.keyUsage)||[]}}}}const zd={certificates:{title:"Certificates",list:{toolbar_actions:{new_certificate:"New certificate"},table_headers:{subject:"Subject",expiry:"Expiry",san:"SAN",cert:"Cert",tags:"Tags",issuer:"Issuer",snis:"SNIs"},empty_state:{title:"Configure a New Certificate",description:"Certificates handle SSL/TLS termination for encrypted requests."},empty_state_v2:{create:"New certificate",title:"Configure your first certificate",group:"Certificates created in gateways within this group will automatically appear here.",description:"Certificates manage SSL/TLS encryption, ensuring secure communication between clients and your API services."}},form:{sections:{ssl:{title:"SSL Key Pair",description:"The PEM-encoded public certificate chain and private key of the SSL key pair and the alternate."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate chain of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key:{label:"Key",tooltip:"PEM-encoded private key of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},cert_alt:{label:"Cert Alt",tooltip:"PEM-encoded public certificate chain of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key_alt:{label:"Key Alt",tooltip:"PEM-encoded private key of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},snis:{label:"SNIs",placeholder:"Enter an SNI",add:"Add an SNI",tooltip:"Zero or more hostnames to associate with this certificate as SNIs",editingTip:"To manage SNIs for this certificate, click {link}.",editingTipLink:"here"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",addSni:"Add to New SNI",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"Certificates could not be retrieved",delete:"The certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},"ca-certificates":{title:"CA Certificates",list:{toolbar_actions:{new_ca_certificate:"New CA certificate"},table_headers:{issuer:"Issuer",expiry:"Expiry",tags:"Tags"},empty_state:{title:"Configure a New CA Certificate",description:"CA certificates validate client or server certificates."},empty_state_v2:{create:"New CA certificate",title:"Configure your first CA certificate",group:"CA Certificates created in gateways within this group will automatically appear here.",description:"CA Certificates validate the authenticity of client and server certificates, reinforcing the trust and security of your API communications."}},form:{sections:{cert:{title:"Public Certificate",description:"The PEM-encoded public certificate of the CA and it’s SHA256 hex digest."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate of the CA."},cert_digest:{label:"Cert Digest",tooltip:"SHA256 hex digest of the public certificate"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New CA certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a CA Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"CA Certificates could not be retrieved",delete:"The CA Certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},general:{"key-usages":{KEY_USAGE_TYPE_KEY_CERT_SIGN:"keyCertSign",KEY_USAGE_TYPE_CRL_SIGN:"cRLSign",KEY_USAGE_TYPE_ENCIPHER_ONLY:"encipherOnly",KEY_USAGE_TYPE_DIGITAL_SIGNATURE:"digitalSignature",KEY_USAGE_TYPE_KEY_ENCIPHERMENT:"keyEncipherment",KEY_USAGE_TYPE_DATA_ENCIPHERMENT:"dataEncipherment",KEY_USAGE_TYPE_KEY_AGREEMENT:"keyAgreement",KEY_USAGE_TYPE_CONTENT_COMMITMENT:"nonRepudiation"}}};function Gd(){const r=Sa.createI18n("en-us",zd);return{i18n:r,i18nT:Sa.i18nTComponent(r)}}const Xe={useCertificate:Kd,useI18n:Gd,useX509:Fu},Jn="/v2/control-planes/{controlPlaneId}/core-entities",Yn="/{workspace}",ui={list:{konnect:`${Jn}/certificates`,kongManager:`${Yn}/certificates`},form:{konnect:{create:`${Jn}/certificates`,edit:`${Jn}/certificates/{id}`,validate:`${Jn}/v1/schemas/json/certificate/validate`},kongManager:{create:`${Yn}/certificates`,edit:`${Yn}/certificates/{id}`,validate:`${Yn}/schemas/certificates/validate`}}},Wd={class:"kong-ui-entities-certificates-list"},Jd={class:"button-row"},Yd={class:"empty-state-icon-gateway"},Zd={key:0},Qd={key:1},Xd={key:0},ep={key:1},tp={key:0},rp={key:1},ip={key:1},np=o.defineComponent({__name:"CertificateList",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||!r.createRoute||!r.getViewRoute||!r.getEditRoute||r.app==="kongManager"&&!r.isExactMatch&&!r.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canCreateSni:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(r,{emit:e}){var Z;const t=e,i=r,{i18n:{t:n,formatUnixTimeStamp:s},i18nT:c}=Xe.useI18n(),u=hi.useRouter(),{axiosInstance:f}=N.useAxios((Z=i.config)==null?void 0:Z.axiosRequestConfig),{handleStateChange:p,hasRecords:b}=N.useTableState(()=>w.value),y=o.computed(()=>b.value&&i.config.app==="konnect"),q=o.computed(()=>!i.enableV2EmptyStates&&i.config.app==="konnect"),O=o.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),g={subject:{label:n("certificates.list.table_headers.subject"),hidable:!1},expiry:{label:n("certificates.list.table_headers.expiry")},san:{label:n("certificates.list.table_headers.san")},cert:{label:n("certificates.list.table_headers.cert")},tags:{label:n("certificates.list.table_headers.tags"),sortable:!0}},S=o.computed(()=>{var J,Q;let D=`${i.config.apiBaseUrl}${ui.list[i.config.app]}`;return i.config.app==="konnect"?D=D.replace(/{controlPlaneId}/gi,((J=i.config)==null?void 0:J.controlPlaneId)||""):i.config.app==="kongManager"&&(D=D.replace(/\/{workspace}/gi,(Q=i.config)!=null&&Q.workspace?`/${i.config.workspace}`:"")),D}),w=o.ref(""),E=o.computed(()=>{const D=i.config.app==="konnect"||i.config.isExactMatch;return D?{isExactMatch:D,placeholder:n("certificates.search.placeholder")}:{isExactMatch:D,schema:i.config.filterSchema}}),{fetcher:k,fetcherState:I,fetcherCacheKey:W}=N.useFetcher({...i.config,cacheIdentifier:i.cacheIdentifier},S.value),se=()=>{w.value=""},M=()=>{W.value++},C=o.ref(null),T=async(D,J)=>{const Q=D.id;if(!await J(Q)){t("copy:error",{entity:D,field:"id",message:n("certificates.errors.copy")});return}t("copy:success",{entity:D,field:"id",message:n("certificates.copy.success",{val:Q})})},me=async(D,J)=>{const Q=JSON.stringify(D);if(!await J(Q)){t("copy:error",{entity:D,message:n("certificates.errors.copy")});return}t("copy:success",{entity:D,message:n("certificates.copy.success_brief")})},ae=async D=>{var Q;await((Q=i.canRetrieve)==null?void 0:Q.call(i,D))&&u.push(i.config.getViewRoute(D.id))},ut=D=>({label:n("certificates.actions.view"),to:i.config.getViewRoute(D)}),fe=D=>({label:n("certificates.actions.edit"),to:i.config.getEditRoute(D)}),pe=D=>{if(i.config.getCreateSniRoute)return{label:n("certificates.actions.addSni"),to:i.config.getCreateSniRoute(D)}},Ee=o.ref(void 0),ee=o.ref(!1),ft=o.ref(!1),rr=o.ref(""),Tr=N.useDeleteUrlBuilder(i.config,S.value),{certificateDataCache:Pt,getCertificateData:Ct}=Xe.useCertificate(),z=D=>{Ee.value=D,ee.value=!0},dt=()=>{ee.value=!1},di=async()=>{var D,J,Q;if((D=Ee.value)!=null&&D.id){ft.value=!0;try{await f.delete(Tr(Ee.value.id)),ft.value=!1,ee.value=!1,W.value++,t("delete:success",Ee.value)}catch($e){rr.value=((Q=(J=$e.response)==null?void 0:J.data)==null?void 0:Q.message)||$e.message||n("certificates.errors.delete"),t("error",$e)}finally{ft.value=!1}}},le=()=>{u.push(i.config.createRoute)};o.watch(I,D=>{var J,Q,$e;if(D.status===N.FetcherStatus.Error){C.value={title:n("certificates.errors.general")},($e=(Q=(J=D.error)==null?void 0:J.response)==null?void 0:Q.data)!=null&&$e.message&&(C.value.message=D.error.response.data.message),t("error",D.error);return}Pt.value={},C.value=null});const Rt=o.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${n("certificates.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:n("certificates.title")});return o.onBeforeMount(async()=>{await i.canCreate()&&(Rt.value.title=n("certificates.list.empty_state.title"),Rt.value.ctaText=n("certificates.actions.create"))}),(D,J)=>{const Q=o.resolveComponent("KButton"),$e=o.resolveComponent("KCopy"),Y=o.resolveComponent("KDropdownItem"),Ce=o.resolveComponent("KClipboardProvider");return o.openBlock(),o.createElementBlock("div",Wd,[o.createVNode(o.unref(N.EntityBaseTable),{"cache-identifier":r.cacheIdentifier,"disable-sorting":O.value,"empty-state-options":Rt.value,"enable-entity-actions":"","error-message":C.value,fetcher:o.unref(k),"fetcher-cache-key":o.unref(W),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-certificates-list",query:w.value,"table-headers":o.unref(g),onClearSearchInput:se,"onClick:row":J[4]||(J[4]=G=>ae(G)),onSort:M,onState:o.unref(p)},o.createSlots({"toolbar-filter":o.withCtx(()=>[o.createVNode(o.unref(N.EntityFilter),{modelValue:w.value,"onUpdate:modelValue":J[0]||(J[0]=G=>w.value=G),config:E.value},null,8,["modelValue","config"])]),"toolbar-button":o.withCtx(()=>[(o.openBlock(),o.createBlock(o.Teleport,{disabled:!r.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[o.createElementVNode("div",Jd,[y.value?(o.openBlock(),o.createBlock(Q,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"certificates-learn-more-button",icon:"",onClick:J[1]||(J[1]=G=>D.$emit("click:learn-more"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.BookIcon),{decorative:""})]),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canCreate()},{default:o.withCtx(()=>[o.createVNode(Q,{appearance:"primary","data-testid":"toolbar-add-certificate",size:r.useActionOutside?"medium":"large",to:r.config.createRoute},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.AddIcon)),o.createTextVNode(" "+o.toDisplayString(o.unref(n)("certificates.list.toolbar_actions.new_certificate")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),subject:o.withCtx(({row:G})=>{var ve;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("b",Zd,o.toDisplayString((ve=G==null?void 0:G.metadata)!=null&&ve.subject?G.metadata.subject:"-"),1)):(o.openBlock(),o.createElementBlock("b",Qd,o.toDisplayString(o.unref(Ct)(G).schemaSubject||"-"),1))]}),expiry:o.withCtx(({row:G})=>{var ve;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("span",Xd,o.toDisplayString((ve=G==null?void 0:G.metadata)!=null&&ve.expiry?o.unref(s)(G.metadata.expiry):"-"),1)):(o.openBlock(),o.createElementBlock("span",ep,o.toDisplayString(o.unref(Ct)(G).schemaExpiry?o.unref(s)(o.unref(Ct)(G).schemaExpiry):"-"),1))]}),san:o.withCtx(({row:G})=>{var ve;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("span",tp,o.toDisplayString((ve=G==null?void 0:G.metadata)!=null&&ve.dns_names?`dns=${G.metadata.dns_names.join(", ")}`:"-"),1)):(o.openBlock(),o.createElementBlock("span",rp,o.toDisplayString(o.unref(Ct)(G).schemaSanNames||"-"),1))]}),cert:o.withCtx(({row:G})=>[G!=null&&G.cert?(o.openBlock(),o.createBlock($e,{key:0,"data-testid":"copy-certificate-cert",text:G.cert,truncate:""},null,8,["text"])):(o.openBlock(),o.createElementBlock("span",ip,"-"))]),tags:o.withCtx(({row:G})=>[o.createVNode(o.unref(N.TableTags),{tags:G==null?void 0:G.tags},null,8,["tags"])]),actions:o.withCtx(({row:G})=>[o.createVNode(Ce,null,{default:o.withCtx(({copyToClipboard:ve})=>[o.createVNode(Y,{"data-testid":"action-entity-copy-id",onClick:Xn=>T(G,ve)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("certificates.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(Ce,null,{default:o.withCtx(({copyToClipboard:ve})=>[o.createVNode(Y,{"data-testid":"action-entity-copy-json",onClick:Xn=>me(G,ve)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("certificates.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canRetrieve(G)},{default:o.withCtx(()=>[o.createVNode(Y,{"data-testid":"action-entity-view","has-divider":"",item:ut(G.id)},null,8,["item"])]),_:2},1032,["auth-function"]),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canEdit(G)},{default:o.withCtx(()=>[o.createVNode(Y,{"data-testid":"action-entity-edit",item:fe(G.id)},null,8,["item"])]),_:2},1032,["auth-function"]),r.config.getCreateSniRoute?(o.openBlock(),o.createBlock(o.unref(N.PermissionsWrapper),{key:0,"auth-function":()=>r.canCreateSni()},{default:o.withCtx(()=>[o.createVNode(Y,{"data-testid":"action-entity-add-sni",item:pe(G.id)},null,8,["item"])]),_:2},1032,["auth-function"])):o.createCommentVNode("",!0),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canDelete(G)},{default:o.withCtx(()=>[o.createVNode(Y,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:ve=>z(G)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("certificates.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!o.unref(b)&&q.value?{name:"outside-actions",fn:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.Teleport,{disabled:!r.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[o.createVNode(Q,{appearance:"secondary",class:"open-learning-hub","data-testid":"certificates-learn-more-button",icon:"",onClick:J[2]||(J[2]=G=>D.$emit("click:learn-more"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!w.value&&r.enableV2EmptyStates&&r.config.app==="konnect"?{name:"empty-state",fn:o.withCtx(()=>{var G;return[o.createVNode(o.unref(N.EntityEmptyState),{"action-button-text":o.unref(n)("certificates.list.empty_state_v2.create"),appearance:"secondary","can-create":()=>r.canCreate(),"data-testid":"certificates-entity-empty-state",description:o.unref(n)("certificates.list.empty_state_v2.description"),"learn-more":r.config.app==="konnect",title:o.unref(n)("certificates.list.empty_state_v2.title"),"onClick:create":le,"onClick:learnMore":J[3]||(J[3]=ve=>D.$emit("click:learn-more"))},o.createSlots({image:o.withCtx(()=>[o.createElementVNode("div",Yd,[o.createVNode(o.unref(tt.ServiceDocumentIcon),{color:o.unref(Aa),size:o.unref(ka)},null,8,["color","size"])])]),_:2},[(G=r.config)!=null&&G.isControlPlaneGroup?{name:"message",fn:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("certificates.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),o.createVNode(o.unref(N.EntityDeleteModal),{"action-pending":ft.value,"entity-type":o.unref(N.EntityTypes).Certificate,error:rr.value,title:o.unref(n)("certificates.delete.title"),visible:ee.value,onCancel:dt,onProceed:di},{description:o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.delete.description",scope:"global"},{"bolded-text":o.withCtx(()=>[o.createElementVNode("b",null,o.toDisplayString(o.unref(n)("certificates.delete.boldedText")),1)]),_:1}),o.createElementVNode("p",null,o.toDisplayString(o.unref(n)("certificates.delete.description2")),1)]),_:1},8,["action-pending","entity-type","error","title","visible"])])}}}),tr=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},op=tr(np,[["__scopeId","data-v-37a46970"]]),sp={class:"sni-field-container"},ap={key:1,class:"sni-field-controls-container"},cp={key:0},lp=tr(o.defineComponent({__name:"CertificateFormSniField",props:{isEditing:{type:Boolean,default:!1},modelValue:{type:Array,required:!0},sniListRoute:{type:Object,required:!0}},emits:["add","remove","update:modelValue"],setup(r,{emit:e}){const t=r,i=e,{i18nT:n,i18n:{t:s}}=Xe.useI18n(),c=o.ref([]);return o.watch(t.modelValue,u=>{c.value=[...u]},{immediate:!0,deep:!0}),o.watch(c,u=>{i("update:modelValue",u)},{deep:!0}),(u,f)=>{const p=o.resolveComponent("KLabel"),b=o.resolveComponent("KInput"),y=o.resolveComponent("KButton"),q=o.resolveComponent("router-link");return o.openBlock(),o.createElementBlock("div",sp,[o.createVNode(p,{info:o.unref(s)("certificates.form.fields.snis.tooltip")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s)("certificates.form.fields.snis.label")),1)]),_:1},8,["info"]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,(O,d)=>(o.openBlock(),o.createElementBlock("div",{key:d,class:"sni-field-input"},[!r.isEditing||c.value[d]?(o.openBlock(),o.createBlock(b,{key:0,modelValue:c.value[d],"onUpdate:modelValue":g=>c.value[d]=g,modelModifiers:{trim:!0},"data-testid":`sni-field-input-${d+1}`,disabled:r.isEditing,placeholder:o.unref(s)("certificates.form.fields.snis.placeholder")},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","placeholder"])):o.createCommentVNode("",!0),r.isEditing?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",ap,[o.createVNode(y,{appearance:"tertiary",class:"remove-button","data-testid":"remove-sni",icon:"",onClick:g=>u.$emit("remove",d)},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.TrashIcon),{color:o.unref(Zu)},null,8,["color"])]),_:2},1032,["onClick"]),o.createVNode(y,{appearance:"tertiary","data-testid":"add-sni",disabled:d!==c.value.length-1,icon:"",onClick:f[0]||(f[0]=g=>u.$emit("add"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.AddIcon))]),_:2},1032,["disabled"])]))]))),128)),c.value.length===0?(o.openBlock(),o.createElementBlock("div",cp,[o.createVNode(y,{onClick:f[1]||(f[1]=O=>u.$emit("add"))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s)("certificates.form.fields.snis.add")),1)]),_:1})])):o.createCommentVNode("",!0),r.isEditing?(o.openBlock(),o.createBlock(o.unref(n),{key:1,keypath:"certificates.form.fields.snis.editingTip"},{link:o.withCtx(()=>[o.createVNode(q,{to:r.sniListRoute},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s)("certificates.form.fields.snis.editingTipLink")),1)]),_:1},8,["to"])]),_:1})):o.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-543a45f0"]]),up={class:"kong-ui-entities-certificates-form"},fp=tr(o.defineComponent({__name:"CertificateForm",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||r.app==="konnect"&&!r.controlPlaneId||r.app==="kongManager"&&typeof r.workspace!="string"||!r.cancelRoute)},certificateId:{type:String,required:!1,default:""},showSnisField:{type:Boolean,required:!1,default:!1}},emits:["update","error","loading"],setup(r,{emit:e}){var se;const t=e,i=r,n=hi.useRouter(),{i18nT:s,i18n:{t:c}}=Xe.useI18n(),{getMessageFromError:u}=N.useErrors(),{axiosInstance:f}=N.useAxios((se=i.config)==null?void 0:se.axiosRequestConfig),p=o.computed(()=>ui.form[i.config.app].edit),b=o.computed(()=>i.certificateId?N.EntityBaseFormType.Edit:N.EntityBaseFormType.Create),y=o.reactive({fields:{cert:"",key:"",certAlt:"",keyAlt:"",snis:[""],tags:""},isReadonly:!1,errorMessage:""}),q=o.reactive({cert:"",key:"",certAlt:"",keyAlt:"",snis:[""],tags:""}),O=o.computed(()=>(b.value===N.EntityBaseFormType.Create||JSON.stringify(y.fields)!==JSON.stringify(q))&&!!y.fields.cert&&!!y.fields.key),d=M=>{var C,T;y.fields.cert=(M==null?void 0:M.cert)||"",y.fields.key=(M==null?void 0:M.key)||"",y.fields.certAlt=(M==null?void 0:M.cert_alt)||"",y.fields.keyAlt=(M==null?void 0:M.key_alt)||"",y.fields.snis=(C=M==null?void 0:M.snis)!=null&&C.length?M.snis:[""],y.fields.tags=((T=M==null?void 0:M.tags)==null?void 0:T.join(", "))||"",Object.assign(q,y.fields)},g=()=>{n.push(i.config.cancelRoute)},S=()=>{y.fields.snis.push("")},w=M=>{y.fields.snis.splice(M,1)},E=o.computed(()=>{var C,T;let M=`${i.config.apiBaseUrl}${ui.form[i.config.app].validate}`;return i.config.app==="konnect"?M=M.replace(/{controlPlaneId}/gi,((C=i.config)==null?void 0:C.controlPlaneId)||""):i.config.app==="kongManager"&&(M=M.replace(/\/{workspace}/gi,(T=i.config)!=null&&T.workspace?`/${i.config.workspace}`:"")),M=M.replace(/{id}/gi,i.certificateId),M}),k=o.computed(()=>{var C,T;let M=`${i.config.apiBaseUrl}${ui.form[i.config.app][b.value]}`;return i.config.app==="konnect"?M=M.replace(/{controlPlaneId}/gi,((C=i.config)==null?void 0:C.controlPlaneId)||""):i.config.app==="kongManager"&&(M=M.replace(/\/{workspace}/gi,(T=i.config)!=null&&T.workspace?`/${i.config.workspace}`:"")),M=M.replace(/{id}/gi,i.certificateId),M}),I=o.computed(()=>{var M,C;return{cert:y.fields.cert,key:y.fields.key,cert_alt:y.fields.certAlt||null,key_alt:y.fields.keyAlt||null,...i.showSnisField?{snis:y.fields.snis.filter(Boolean)}:{},tags:(C=(M=y.fields.tags.split(","))==null?void 0:M.map(T=>String(T||"").trim()))==null?void 0:C.filter(T=>T!=="")}}),W=async()=>{var M,C,T,me,ae,ut,fe,pe,Ee;try{y.isReadonly=!0;let ee;await f.post(E.value,I.value),b.value==="create"?ee=await f.post(k.value,I.value):b.value==="edit"&&(ee=((M=i.config)==null?void 0:M.app)==="konnect"?await f.put(k.value,I.value):await f.patch(k.value,I.value)),y.fields.cert=((C=ee==null?void 0:ee.data)==null?void 0:C.cert)||"",y.fields.key=((T=ee==null?void 0:ee.data)==null?void 0:T.key)||"",y.fields.certAlt=((me=ee==null?void 0:ee.data)==null?void 0:me.cert_alt)||"",y.fields.keyAlt=((ae=ee==null?void 0:ee.data)==null?void 0:ae.key_alt)||"",y.fields.snis=(fe=(ut=ee==null?void 0:ee.data)==null?void 0:ut.snis)!=null&&fe.length?ee.data.snis:[""],y.fields.tags=((Ee=(pe=ee==null?void 0:ee.data)==null?void 0:pe.tags)==null?void 0:Ee.join(", "))||"",Object.assign(q,y.fields),t("update",ee==null?void 0:ee.data)}catch(ee){y.errorMessage=u(ee),t("error",ee)}finally{y.isReadonly=!1}};return(M,C)=>{const T=o.resolveComponent("KTextArea"),me=o.resolveComponent("KInput");return o.openBlock(),o.createElementBlock("div",up,[o.createVNode(o.unref(N.EntityBaseForm),{"can-submit":O.value,config:r.config,"edit-id":r.certificateId,"entity-type":o.unref(N.SupportedEntityType).Certificate,"error-message":y.errorMessage,"fetch-url":p.value,"form-fields":I.value,"is-readonly":y.isReadonly,onCancel:g,"onFetch:error":C[7]||(C[7]=ae=>M.$emit("error",ae)),"onFetch:success":d,onLoading:C[8]||(C[8]=ae=>M.$emit("loading",ae)),onSubmit:W},{default:o.withCtx(()=>[o.createVNode(o.unref(N.EntityFormSection),{description:o.unref(c)("certificates.form.sections.ssl.description"),title:o.unref(c)("certificates.form.sections.ssl.title")},{default:o.withCtx(()=>[o.createVNode(T,{modelValue:y.fields.cert,"onUpdate:modelValue":C[0]||(C[0]=ae=>y.fields.cert=ae),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-cert",label:o.unref(c)("certificates.form.fields.cert.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},readonly:y.isReadonly,required:""},{"label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(s),{keypath:"certificates.form.fields.cert.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("em",null,o.toDisplayString(o.unref(c)("certificates.form.fields.cert.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),o.createVNode(T,{modelValue:y.fields.key,"onUpdate:modelValue":C[1]||(C[1]=ae=>y.fields.key=ae),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-key",label:o.unref(c)("certificates.form.fields.key.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},readonly:y.isReadonly,required:""},{"label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(s),{keypath:"certificates.form.fields.key.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("em",null,o.toDisplayString(o.unref(c)("certificates.form.fields.key.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),o.createVNode(T,{modelValue:y.fields.certAlt,"onUpdate:modelValue":C[2]||(C[2]=ae=>y.fields.certAlt=ae),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-cert-alt",label:o.unref(c)("certificates.form.fields.cert_alt.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},readonly:y.isReadonly},{"label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(s),{keypath:"certificates.form.fields.cert_alt.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("em",null,o.toDisplayString(o.unref(c)("certificates.form.fields.cert_alt.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),o.createVNode(T,{modelValue:y.fields.keyAlt,"onUpdate:modelValue":C[3]||(C[3]=ae=>y.fields.keyAlt=ae),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-key-alt",label:o.unref(c)("certificates.form.fields.key_alt.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},readonly:y.isReadonly},{"label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(s),{keypath:"certificates.form.fields.key_alt.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("em",null,o.toDisplayString(o.unref(c)("certificates.form.fields.key_alt.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),r.showSnisField&&r.config.sniListRoute?(o.openBlock(),o.createBlock(lp,{key:0,modelValue:y.fields.snis,"onUpdate:modelValue":C[4]||(C[4]=ae=>y.fields.snis=ae),"is-editing":b.value===o.unref(N.EntityBaseFormType).Edit,"sni-list-route":r.config.sniListRoute,onAdd:S,onRemove:C[5]||(C[5]=ae=>w(ae))},null,8,["modelValue","is-editing","sni-list-route"])):o.createCommentVNode("",!0)]),_:1},8,["description","title"]),o.createVNode(o.unref(N.EntityFormSection),{description:o.unref(c)("certificates.form.sections.general.description"),title:o.unref(c)("certificates.form.sections.general.title")},{default:o.withCtx(()=>[o.createVNode(me,{modelValue:y.fields.tags,"onUpdate:modelValue":C[6]||(C[6]=ae=>y.fields.tags=ae),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"certificate-form-tags",help:o.unref(c)("certificates.form.fields.tags.help"),label:o.unref(c)("certificates.form.fields.tags.label"),"label-attributes":{info:o.unref(c)("certificates.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:o.unref(c)("certificates.form.fields.tags.placeholder"),readonly:y.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-fc596de1"]]),Zn="/v2/control-planes/{controlPlaneId}/core-entities",Qn="/{workspace}",fi={list:{konnect:`${Zn}/ca_certificates`,kongManager:`${Qn}/ca_certificates`},form:{konnect:{create:`${Zn}/ca_certificates`,edit:`${Zn}/ca_certificates/{id}`,validate:`${Zn}/v1/schemas/json/ca-certificate/validate`},kongManager:{create:`${Qn}/ca_certificates`,edit:`${Qn}/ca_certificates/{id}`,validate:`${Qn}/schemas/ca_certificates/validate`}}},dp={class:"kong-ui-ca-certificate-entity-config-card"},pp={key:0},hp=tr(o.defineComponent({__name:"CACertificateConfigCard",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||r.app==="konnect"&&!r.controlPlaneId||r.app==="kongManager"&&typeof r.workspace!="string"||!r.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(r,{emit:e}){const t=["dns_names","san_names","subject"],i=e,n=r,{i18n:{t:s,formatUnixTimeStamp:c}}=Xe.useI18n(),{convertKeyToTitle:u}=N.useStringHelpers(),{getPropValue:f}=N.useHelpers(),{getCertificateData:p}=Xe.useCertificate(),b=o.computed(()=>fi.form[n.config.app].edit),y=o.ref(),q=o.computed(()=>{if(y.value)return p(y.value)}),O=o.computed(()=>{var k;return((k=q.value)==null?void 0:k.schemaIssuer)||""}),d=o.computed(()=>{var k,I;return(k=q.value)!=null&&k.schemaExpiry?c((I=q.value)==null?void 0:I.schemaExpiry):""}),g=o.computed(()=>{var k;return((k=q.value)==null?void 0:k.schemaKeyUsages)||[]}),S=(k,I)=>{const W=f("rowValue",I);if(k==="expiry")return d.value;if(k==="key_usages")return g.value;if(W)return W[k]},w=k=>{y.value=k,i("fetch:success",k)},E=o.ref({id:{},updated_at:{},created_at:{},cert:{section:N.ConfigurationSchemaSection.Basic,label:s("ca-certificates.form.fields.cert.label"),tooltip:s("ca-certificates.form.fields.cert.tooltip"),order:5},cert_digest:{section:N.ConfigurationSchemaSection.Basic,label:s("ca-certificates.form.fields.cert_digest.label"),tooltip:s("ca-certificates.form.fields.cert_digest.tooltip"),order:6},metadata:{section:N.ConfigurationSchemaSection.Basic,type:N.ConfigurationSchemaType.Json,order:7},...n.config.app==="kongManager"&&{expiry:{label:s("certificates.list.table_headers.expiry"),section:N.ConfigurationSchemaSection.Basic,order:1.7,forceShow:!0},issuer:{section:N.ConfigurationSchemaSection.Basic,order:1.5,forceShow:!0},key_usages:{section:N.ConfigurationSchemaSection.Basic,forceShow:!0}},tags:{tooltip:s("ca-certificates.form.fields.tags.tooltip")}});return(k,I)=>{const W=o.resolveComponent("KCodeBlock"),se=o.resolveComponent("KLabel"),M=o.resolveComponent("KBadge");return o.openBlock(),o.createElementBlock("div",dp,[o.createVNode(o.unref(N.EntityBaseConfigCard),{config:r.config,"config-card-doc":r.configCardDoc,"config-schema":E.value,"entity-type":o.unref(N.SupportedEntityType).CaCertificate,"fetch-url":b.value,"hide-title":r.hideTitle,"onFetch:error":I[0]||(I[0]=C=>k.$emit("fetch:error",C)),"onFetch:success":w,onLoading:I[1]||(I[1]=C=>k.$emit("loading",C))},{cert:o.withCtx(C=>[o.unref(f)("rowValue",C)?(o.openBlock(),o.createBlock(W,{key:0,id:`ca-cert-${r.config.entityId}-cert-codeblock`,code:o.unref(f)("rowValue",C),language:"plaintext","single-line":""},null,8,["id","code"])):o.createCommentVNode("",!0)]),"metadata-label":o.withCtx(()=>[o.createVNode(se,{class:"metadata-label"},{default:o.withCtx(()=>I[2]||(I[2]=[o.createTextVNode(" Metadata ")])),_:1})]),metadata:o.withCtx(C=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.keys(o.unref(f)("rowValue",C)).filter(T=>!t.includes(T)),T=>(o.openBlock(),o.createBlock(o.unref(N.ConfigCardItem),{key:T,"data-testid":`ca-cert-metadata-${T}`,item:{key:T,label:o.unref(u)(T),value:S(T,C),type:T==="key_usages"?o.unref(N.ConfigurationSchemaType).BadgeTag:o.unref(N.ConfigurationSchemaType).Text}},null,8,["data-testid","item"]))),128))]),expiry:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(d.value||"–"),1)]),issuer:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.value||"–"),1)]),key_usages:o.withCtx(()=>[g.value.length?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",pp,o.toDisplayString("–"))),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(C,T)=>(o.openBlock(),o.createBlock(M,{key:`key_usages-badge-tag-${T}`,class:"config-badge","data-testid":`key_usages-badge-tag-${T}`,tooltip:C,"truncation-tooltip":""},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C),1)]),_:2},1032,["data-testid","tooltip"]))),128))]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])])}}}),[["__scopeId","data-v-1d42f61b"]]),yp={class:"kong-ui-entities-ca-certificates-list"},gp={class:"button-row"},mp={class:"empty-state-icon-gateway"},bp={key:0},vp={key:1},wp={key:0},Sp={key:1},Ap=tr(o.defineComponent({__name:"CACertificateList",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||!r.createRoute||!r.getViewRoute||!r.getEditRoute||r.app==="kongManager"&&!r.isExactMatch&&!r.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(r,{emit:e}){var Rt;const t=e,i=r,{i18n:{t:n,formatUnixTimeStamp:s},i18nT:c}=Xe.useI18n(),u=hi.useRouter(),{axiosInstance:f}=N.useAxios((Rt=i.config)==null?void 0:Rt.axiosRequestConfig),{hasRecords:p,handleStateChange:b}=N.useTableState(()=>w.value),y=o.computed(()=>p.value&&i.config.app==="konnect"),q=o.computed(()=>!i.enableV2EmptyStates&&i.config.app==="konnect"),O=o.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),g={issuer:{label:n("ca-certificates.list.table_headers.issuer"),hidable:!1},expiry:{label:n("ca-certificates.list.table_headers.expiry")},tags:{label:n("ca-certificates.list.table_headers.tags"),sortable:!0}},S=o.computed(()=>{var D,J;let Z=`${i.config.apiBaseUrl}${fi.list[i.config.app]}`;return i.config.app==="konnect"?Z=Z.replace(/{controlPlaneId}/gi,((D=i.config)==null?void 0:D.controlPlaneId)||""):i.config.app==="kongManager"&&(Z=Z.replace(/\/{workspace}/gi,(J=i.config)!=null&&J.workspace?`/${i.config.workspace}`:"")),Z}),w=o.ref(""),E=o.computed(()=>{const Z=i.config.app==="konnect"||i.config.isExactMatch;return Z?{isExactMatch:Z,placeholder:n("ca-certificates.search.placeholder")}:{isExactMatch:Z,schema:i.config.filterSchema}}),{fetcher:k,fetcherState:I,fetcherCacheKey:W}=N.useFetcher({...i.config,cacheIdentifier:i.cacheIdentifier},S.value),se=()=>{w.value=""},M=()=>{W.value++},C=o.ref(null),T=async(Z,D)=>{const J=Z.id;if(!await D(J)){t("copy:error",{entity:Z,field:"id",message:n("ca-certificates.errors.copy")});return}t("copy:success",{entity:Z,field:"id",message:n("ca-certificates.copy.success",{val:J})})},me=async(Z,D)=>{const J=JSON.stringify(Z);if(!await D(J)){t("copy:error",{entity:Z,message:n("ca-certificates.errors.copy")});return}t("copy:success",{entity:Z,message:n("ca-certificates.copy.success_brief")})},ae=async Z=>{var J;await((J=i.canRetrieve)==null?void 0:J.call(i,Z))&&u.push(i.config.getViewRoute(Z.id))},ut=Z=>({label:n("ca-certificates.actions.view"),to:i.config.getViewRoute(Z)}),fe=Z=>({label:n("ca-certificates.actions.edit"),to:i.config.getEditRoute(Z)}),pe=o.ref(void 0),Ee=o.ref(!1),ee=o.ref(!1),ft=o.ref(""),rr=N.useDeleteUrlBuilder(i.config,S.value),{certificateDataCache:Tr,getCertificateData:Pt}=Xe.useCertificate(),Ct=Z=>{pe.value=Z,Ee.value=!0},z=()=>{Ee.value=!1},dt=async()=>{var Z,D,J;if((Z=pe.value)!=null&&Z.id){ee.value=!0;try{await f.delete(rr(pe.value.id)),ee.value=!1,Ee.value=!1,W.value++,t("delete:success",pe.value)}catch(Q){ft.value=((J=(D=Q.response)==null?void 0:D.data)==null?void 0:J.message)||Q.message||n("ca-certificates.errors.delete"),t("error",Q)}finally{ee.value=!1}}},di=()=>{u.push(i.config.createRoute)};o.watch(I,Z=>{var D,J,Q;if(Z.status===N.FetcherStatus.Error){C.value={title:n("ca-certificates.errors.general")},(Q=(J=(D=Z.error)==null?void 0:D.response)==null?void 0:J.data)!=null&&Q.message&&(C.value.message=Z.error.response.data.message),t("error",Z.error);return}Tr.value={},C.value=null});const le=o.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${n("ca-certificates.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:n("ca-certificates.title")});return o.onBeforeMount(async()=>{await i.canCreate()&&(le.value.title=n("ca-certificates.list.empty_state.title"),le.value.ctaText=n("ca-certificates.actions.create"))}),(Z,D)=>{const J=o.resolveComponent("KButton"),Q=o.resolveComponent("KDropdownItem"),$e=o.resolveComponent("KClipboardProvider");return o.openBlock(),o.createElementBlock("div",yp,[o.createVNode(o.unref(N.EntityBaseTable),{"cache-identifier":r.cacheIdentifier,"disable-sorting":O.value,"empty-state-options":le.value,"enable-entity-actions":"","error-message":C.value,fetcher:o.unref(k),"fetcher-cache-key":o.unref(W),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-ca-certificates-list",query:w.value,"table-headers":o.unref(g),onClearSearchInput:se,"onClick:row":D[4]||(D[4]=Y=>ae(Y)),onSort:M,onState:o.unref(b)},o.createSlots({"toolbar-filter":o.withCtx(()=>[o.createVNode(o.unref(N.EntityFilter),{modelValue:w.value,"onUpdate:modelValue":D[0]||(D[0]=Y=>w.value=Y),config:E.value},null,8,["modelValue","config"])]),"toolbar-button":o.withCtx(()=>[(o.openBlock(),o.createBlock(o.Teleport,{disabled:!r.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[o.createElementVNode("div",gp,[y.value?(o.openBlock(),o.createBlock(J,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"ca-certificates-learn-more-button",icon:"",onClick:D[1]||(D[1]=Y=>Z.$emit("click:learn-more"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.BookIcon),{decorative:""})]),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canCreate()},{default:o.withCtx(()=>[o.createVNode(J,{appearance:"primary","data-testid":"toolbar-add-ca-certificate",size:r.useActionOutside?"medium":"large",to:r.config.createRoute},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.AddIcon)),o.createTextVNode(" "+o.toDisplayString(o.unref(n)("ca-certificates.list.toolbar_actions.new_ca_certificate")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),issuer:o.withCtx(({row:Y})=>{var Ce;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("b",bp,o.toDisplayString((Ce=Y==null?void 0:Y.metadata)!=null&&Ce.issuer?Y.metadata.issuer:"-"),1)):(o.openBlock(),o.createElementBlock("b",vp,o.toDisplayString(o.unref(Pt)(Y).schemaIssuer||"-"),1))]}),expiry:o.withCtx(({row:Y})=>{var Ce;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("span",wp,o.toDisplayString((Ce=Y==null?void 0:Y.metadata)!=null&&Ce.expiry?o.unref(s)(Y.metadata.expiry):"-"),1)):(o.openBlock(),o.createElementBlock("span",Sp,o.toDisplayString(o.unref(Pt)(Y).schemaExpiry?o.unref(s)(o.unref(Pt)(Y).schemaExpiry):"-"),1))]}),tags:o.withCtx(({row:Y})=>[o.createVNode(o.unref(N.TableTags),{tags:Y==null?void 0:Y.tags},null,8,["tags"])]),actions:o.withCtx(({row:Y})=>[o.createVNode($e,null,{default:o.withCtx(({copyToClipboard:Ce})=>[o.createVNode(Q,{"data-testid":"action-entity-copy-id",onClick:G=>T(Y,Ce)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("ca-certificates.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode($e,null,{default:o.withCtx(({copyToClipboard:Ce})=>[o.createVNode(Q,{"data-testid":"action-entity-copy-json",onClick:G=>me(Y,Ce)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("ca-certificates.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canRetrieve(Y)},{default:o.withCtx(()=>[o.createVNode(Q,{"data-testid":"action-entity-view","has-divider":"",item:ut(Y.id)},null,8,["item"])]),_:2},1032,["auth-function"]),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canEdit(Y)},{default:o.withCtx(()=>[o.createVNode(Q,{"data-testid":"action-entity-edit",item:fe(Y.id)},null,8,["item"])]),_:2},1032,["auth-function"]),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canDelete(Y)},{default:o.withCtx(()=>[o.createVNode(Q,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Ce=>Ct(Y)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("ca-certificates.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!o.unref(p)&&q.value?{name:"outside-actions",fn:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.Teleport,{disabled:!r.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[o.createVNode(J,{appearance:"secondary",class:"open-learning-hub","data-testid":"ca-certificates-learn-more-button",icon:"",onClick:D[2]||(D[2]=Y=>Z.$emit("click:learn-more"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!w.value&&r.enableV2EmptyStates&&r.config.app==="konnect"?{name:"empty-state",fn:o.withCtx(()=>{var Y;return[o.createVNode(o.unref(N.EntityEmptyState),{"action-button-text":o.unref(n)("ca-certificates.list.empty_state_v2.create"),appearance:"secondary","can-create":()=>r.canCreate(),"data-testid":"ca-certificates-entity-empty-state",description:o.unref(n)("ca-certificates.list.empty_state_v2.description"),"learn-more":r.config.app==="konnect",title:o.unref(n)("ca-certificates.list.empty_state_v2.title"),"onClick:create":di,"onClick:learnMore":D[3]||(D[3]=Ce=>Z.$emit("click:learn-more"))},o.createSlots({image:o.withCtx(()=>[o.createElementVNode("div",mp,[o.createVNode(o.unref(tt.ServiceDocumentIcon),{color:o.unref(Aa),size:o.unref(ka)},null,8,["color","size"])])]),_:2},[(Y=r.config)!=null&&Y.isControlPlaneGroup?{name:"message",fn:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("ca-certificates.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),o.createVNode(o.unref(N.EntityDeleteModal),{"action-pending":ee.value,"entity-type":o.unref(N.EntityTypes).CACertificate,error:ft.value,title:o.unref(n)("ca-certificates.delete.title"),visible:Ee.value,onCancel:z,onProceed:dt},{description:o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"ca-certificates.delete.description",scope:"global"},{"bolded-text":o.withCtx(()=>[o.createElementVNode("b",null,o.toDisplayString(o.unref(n)("ca-certificates.delete.boldedText")),1)]),_:1}),o.createElementVNode("p",null,o.toDisplayString(o.unref(n)("ca-certificates.delete.description2")),1)]),_:1},8,["action-pending","entity-type","error","title","visible"])])}}}),[["__scopeId","data-v-88d5c7a2"]]),kp={class:"kong-ui-entities-ca-certificates-form"},Cp=tr(o.defineComponent({__name:"CACertificateForm",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||r.app==="konnect"&&!r.controlPlaneId||r.app==="kongManager"&&typeof r.workspace!="string"||!r.cancelRoute)},certificateId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(r,{emit:e}){var k;const t=e,i=r,n=hi.useRouter(),{i18n:{t:s}}=Xe.useI18n(),{getMessageFromError:c}=N.useErrors(),{axiosInstance:u}=N.useAxios((k=i.config)==null?void 0:k.axiosRequestConfig),f=o.computed(()=>fi.form[i.config.app].edit),p=o.computed(()=>i.certificateId?N.EntityBaseFormType.Edit:N.EntityBaseFormType.Create),b=o.reactive({fields:{cert:"",certDigest:"",tags:""},isReadonly:!1,errorMessage:""}),y=o.reactive({cert:"",certDigest:"",tags:""}),q=o.computed(()=>(p.value===N.EntityBaseFormType.Create||JSON.stringify(b.fields)!==JSON.stringify(y))&&!!b.fields.cert),O=I=>{var W;b.fields.cert=(I==null?void 0:I.cert)||"",b.fields.certDigest=(I==null?void 0:I.cert_digest)||"",b.fields.tags=((W=I==null?void 0:I.tags)==null?void 0:W.join(", "))||"",Object.assign(y,b.fields)},d=()=>{n.push(i.config.cancelRoute)},g=o.computed(()=>{var W,se;let I=`${i.config.apiBaseUrl}${fi.form[i.config.app].validate}`;return i.config.app==="konnect"?I=I.replace(/{controlPlaneId}/gi,((W=i.config)==null?void 0:W.controlPlaneId)||""):i.config.app==="kongManager"&&(I=I.replace(/\/{workspace}/gi,(se=i.config)!=null&&se.workspace?`/${i.config.workspace}`:"")),I=I.replace(/{id}/gi,i.certificateId),I}),S=o.computed(()=>{var W,se;let I=`${i.config.apiBaseUrl}${fi.form[i.config.app][p.value]}`;return i.config.app==="konnect"?I=I.replace(/{controlPlaneId}/gi,((W=i.config)==null?void 0:W.controlPlaneId)||""):i.config.app==="kongManager"&&(I=I.replace(/\/{workspace}/gi,(se=i.config)!=null&&se.workspace?`/${i.config.workspace}`:"")),I=I.replace(/{id}/gi,i.certificateId),I}),w=o.computed(()=>{var I,W;return{cert:b.fields.cert,cert_digest:b.fields.certDigest||null,tags:(W=(I=b.fields.tags.split(","))==null?void 0:I.map(se=>String(se||"").trim()))==null?void 0:W.filter(se=>se!=="")}}),E=async()=>{var I,W,se,M,C;try{b.isReadonly=!0;let T;await u.post(g.value,w.value),p.value==="create"?T=await u.post(S.value,w.value):p.value==="edit"&&(T=((I=i.config)==null?void 0:I.app)==="konnect"?await u.put(S.value,w.value):await u.patch(S.value,w.value)),b.fields.cert=((W=T==null?void 0:T.data)==null?void 0:W.cert)||"",b.fields.certDigest=((se=T==null?void 0:T.data)==null?void 0:se.cert_digest)||"",b.fields.tags=((C=(M=T==null?void 0:T.data)==null?void 0:M.tags)==null?void 0:C.join(", "))||"",Object.assign(y,b.fields),t("update",T==null?void 0:T.data)}catch(T){b.errorMessage=c(T),t("error",T)}finally{b.isReadonly=!1}};return(I,W)=>{const se=o.resolveComponent("KTextArea"),M=o.resolveComponent("KInput");return o.openBlock(),o.createElementBlock("div",kp,[o.createVNode(o.unref(N.EntityBaseForm),{"can-submit":q.value,config:r.config,"edit-id":r.certificateId,"entity-type":o.unref(N.SupportedEntityType).CaCertificate,"error-message":b.errorMessage,"fetch-url":f.value,"form-fields":w.value,"is-readonly":b.isReadonly,onCancel:d,"onFetch:error":W[3]||(W[3]=C=>I.$emit("error",C)),"onFetch:success":O,onLoading:W[4]||(W[4]=C=>I.$emit("loading",C)),onSubmit:E},{default:o.withCtx(()=>[o.createVNode(o.unref(N.EntityFormSection),{description:o.unref(s)("ca-certificates.form.sections.cert.description"),title:o.unref(s)("ca-certificates.form.sections.cert.title")},{default:o.withCtx(()=>[o.createVNode(se,{modelValue:b.fields.cert,"onUpdate:modelValue":W[0]||(W[0]=C=>b.fields.cert=C),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"ca-certificate-form-cert",label:o.unref(s)("ca-certificates.form.fields.cert.label"),"label-attributes":{info:o.unref(s)("ca-certificates.form.fields.cert.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:b.isReadonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),o.createVNode(M,{modelValue:b.fields.certDigest,"onUpdate:modelValue":W[1]||(W[1]=C=>b.fields.certDigest=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"ca-certificate-form-cert-digest",label:o.unref(s)("ca-certificates.form.fields.cert_digest.label"),readonly:b.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])]),_:1},8,["description","title"]),o.createVNode(o.unref(N.EntityFormSection),{description:o.unref(s)("ca-certificates.form.sections.general.description"),title:o.unref(s)("ca-certificates.form.sections.general.title")},{default:o.withCtx(()=>[o.createVNode(M,{modelValue:b.fields.tags,"onUpdate:modelValue":W[2]||(W[2]=C=>b.fields.tags=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"ca-certificate-form-tags",help:o.unref(s)("ca-certificates.form.fields.tags.help"),label:o.unref(s)("ca-certificates.form.fields.tags.label"),"label-attributes":{info:o.unref(s)("ca-certificates.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:o.unref(s)("ca-certificates.form.fields.tags.placeholder"),readonly:b.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-2a3f488f"]]),xp={class:"kong-ui-certificate-entity-config-card"},Bp={key:0},Ep=tr(o.defineComponent({__name:"CertificateConfigCard",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||r.app==="konnect"&&!r.controlPlaneId||r.app==="kongManager"&&typeof r.workspace!="string"||!r.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(r,{emit:e}){const t=e,i=r,{i18n:{t:n,formatUnixTimeStamp:s},i18nT:c}=Xe.useI18n(),{convertKeyToTitle:u}=N.useStringHelpers(),{getPropValue:f}=N.useHelpers(),{getCertificateData:p}=Xe.useCertificate(),b=o.computed(()=>ui.form[i.config.app].edit),y=o.ref(),q=o.ref({id:{},cert:{section:N.ConfigurationSchemaSection.Basic},key:{section:N.ConfigurationSchemaSection.Basic,type:N.ConfigurationSchemaType.Redacted},metadata:{section:N.ConfigurationSchemaSection.Basic,type:N.ConfigurationSchemaType.Json},snis:{section:N.ConfigurationSchemaSection.Basic,type:N.ConfigurationSchemaType.BadgeTag,label:n("certificates.list.table_headers.snis")},updated_at:{},created_at:{},tags:{tooltip:n("certificates.form.fields.tags.tooltip")},...i.config.app==="kongManager"&&{expiry:{section:N.ConfigurationSchemaSection.Basic,label:n("certificates.list.table_headers.expiry"),forceShow:!0},issuer:{section:N.ConfigurationSchemaSection.Basic,label:n("certificates.list.table_headers.issuer"),forceShow:!0},san_names:{section:N.ConfigurationSchemaSection.Basic,label:n("certificates.list.table_headers.san"),forceShow:!0},subject:{section:N.ConfigurationSchemaSection.Basic,label:n("certificates.list.table_headers.subject"),forceShow:!0},key_usages:{forceShow:!0}},cert_alt:{section:N.ConfigurationSchemaSection.Advanced},key_alt:{section:N.ConfigurationSchemaSection.Advanced,type:N.ConfigurationSchemaType.Redacted}}),O=C=>{y.value=C,t("fetch:success",C)},d=(C,T)=>{const me=f("rowValue",T);if(C==="expiry")return S.value;if(C==="key_usages")return I.value;if(C==="san_names")return E.value;if(me)return me[C]},g=o.computed(()=>{if(y.value)return p(y.value)}),S=o.computed(()=>{var C,T;return(C=g.value)!=null&&C.schemaExpiry?s((T=g.value)==null?void 0:T.schemaExpiry):""}),w=o.computed(()=>{var C;return((C=g.value)==null?void 0:C.schemaIssuer)||""}),E=o.computed(()=>{var C;return((C=g.value)==null?void 0:C.schemaSanNames)||""}),k=o.computed(()=>{var C;return((C=g.value)==null?void 0:C.schemaSubject)||""}),I=o.computed(()=>{var C;return((C=g.value)==null?void 0:C.schemaKeyUsages)||[]}),W=o.computed(()=>{var C,T;return((T=(C=y==null?void 0:y.value)==null?void 0:C.snis)==null?void 0:T.length)>0}),se=o.computed(()=>{var C;return!!((C=y==null?void 0:y.value)!=null&&C.cert_alt)}),M=C=>{var T,me;return C==="san_names"?n("certificates.list.table_headers.san"):((me=(T=q.value)==null?void 0:T[C])==null?void 0:me.label)||u(C)};return(C,T)=>{const me=o.resolveComponent("KCodeBlock"),ae=o.resolveComponent("KLabel"),ut=o.resolveComponent("KBadge");return o.openBlock(),o.createElementBlock("div",xp,[o.createVNode(o.unref(N.EntityBaseConfigCard),{config:r.config,"config-card-doc":r.configCardDoc,"config-schema":q.value,"entity-type":o.unref(N.SupportedEntityType).Certificate,"fetch-url":b.value,"hide-title":r.hideTitle,"onFetch:error":T[0]||(T[0]=fe=>C.$emit("fetch:error",fe)),"onFetch:success":O,onLoading:T[1]||(T[1]=fe=>C.$emit("loading",fe))},o.createSlots({"cert-label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.form.fields.cert.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("i",null,o.toDisplayString(o.unref(n)("certificates.form.fields.cert.emphasis")),1)]),_:1})]),cert:o.withCtx(fe=>[o.unref(f)("rowValue",fe)?(o.openBlock(),o.createBlock(me,{key:0,id:`certificate-${r.config.entityId}-cert-codeblock`,code:o.unref(f)("rowValue",fe),language:"plaintext","single-line":""},null,8,["id","code"])):o.createCommentVNode("",!0)]),"key-label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.form.fields.key.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("i",null,o.toDisplayString(o.unref(n)("certificates.form.fields.key.emphasis")),1)]),_:1})]),"metadata-label":o.withCtx(()=>[o.createVNode(ae,{class:"metadata-label"},{default:o.withCtx(()=>T[2]||(T[2]=[o.createTextVNode(" Metadata ")])),_:1})]),metadata:o.withCtx(fe=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.keys(o.unref(f)("rowValue",fe)),pe=>(o.openBlock(),o.createBlock(o.unref(N.ConfigCardItem),{key:pe,item:{key:pe,value:d(pe,fe),label:M(pe),type:pe==="key_usages"||pe==="snis"||pe==="dns_names"?o.unref(N.ConfigurationSchemaType).BadgeTag:o.unref(N.ConfigurationSchemaType).Text}},null,8,["item"]))),128))]),expiry:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(S.value||"–"),1)]),issuer:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.value||"–"),1)]),san_names:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.value||"–"),1)]),subject:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(k.value||"–"),1)]),"cert_alt-label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.form.fields.cert_alt.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("i",null,o.toDisplayString(o.unref(n)("certificates.form.fields.cert_alt.emphasis")),1)]),_:1})]),"key_alt-label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.form.fields.key_alt.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("i",null,o.toDisplayString(o.unref(n)("certificates.form.fields.key_alt.emphasis")),1)]),_:1})]),key_usages:o.withCtx(()=>[I.value.length?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Bp,o.toDisplayString("–"))),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.value,(fe,pe)=>(o.openBlock(),o.createBlock(ut,{key:`key_usages-badge-tag-${pe}`,class:"config-badge","data-testid":`key_usages-badge-tag-${pe}`,tooltip:fe,"truncation-tooltip":""},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(fe),1)]),_:2},1032,["data-testid","tooltip"]))),128))]),_:2},[W.value?void 0:{name:"snis",fn:o.withCtx(()=>[T[3]||(T[3]=o.createTextVNode(" – "))]),key:"0"},se.value?{name:"cert_alt",fn:o.withCtx(fe=>[T[4]||(T[4]=o.createTextVNode(" > ")),o.unref(f)("rowValue",fe)?(o.openBlock(),o.createBlock(me,{key:0,id:`certificate-${r.config.entityId}-cert-alt-codeblock`,code:o.unref(f)("rowValue",fe),language:"plaintext","single-line":""},null,8,["id","code"])):o.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])])}}}),[["__scopeId","data-v-401d92d6"]]);xe.CACertificateConfigCard=hp,xe.CACertificateForm=Cp,xe.CACertificateList=Ap,xe.CertificateConfigCard=Ep,xe.CertificateForm=fp,xe.CertificateList=op,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});
117
+ `)}}Le.CertificateTag="CERTIFICATE",Le.CrlTag="CRL",Le.CertificateRequestTag="CERTIFICATE REQUEST",Le.PublicKeyTag="PUBLIC KEY",Le.PrivateKeyTag="PRIVATE KEY";class kt extends Tt{static isAsnEncoded(e){return _.isBufferSource(e)||typeof e=="string"}static toArrayBuffer(e){if(typeof e=="string"){if(Le.isPem(e))return Le.decode(e)[0];if(L.isHex(e))return L.FromHex(e);if(L.isBase64(e))return L.FromBase64(e);if(L.isBase64Url(e))return L.FromBase64Url(e);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}else{const t=L.ToBinary(e);return Le.isPem(t)?Le.decode(t)[0]:L.isHex(t)?L.FromHex(t):L.isBase64(t)?L.FromBase64(t):L.isBase64Url(t)?L.FromBase64Url(t):_.toArrayBuffer(e)}}constructor(...e){kt.isAsnEncoded(e[0])?super(kt.toArrayBuffer(e[0]),e[1]):super(e[0])}toString(e="pem"){switch(e){case"pem":return Le.encode(this.rawData,this.tag);default:return super.toString(e)}}}class lt extends kt{static async create(e,t=Te.get()){if(e instanceof lt)return e;if(Vt.isCryptoKey(e)){if(e.type!=="public")throw new TypeError("Public key is required");const i=await t.subtle.exportKey("spki",e);return new lt(i)}else{if(e.publicKey)return e.publicKey;if(_.isBufferSource(e))return new lt(e);throw new TypeError("Unsupported PublicKeyType")}}constructor(e){kt.isAsnEncoded(e)?super(e,ot):super(e),this.tag=Le.PublicKeyTag}async export(...e){let t,i=["verify"],n={hash:"SHA-256",...this.algorithm};e.length>1?(n=e[0]||n,i=e[1]||i,t=e[2]||Te.get()):t=e[0]||Te.get();let s=this.rawData;const c=j.parse(this.rawData,ot);return c.algorithm.algorithm===ei&&(s=Hd(c,s)),t.subtle.importKey("spki",s,n,!0,i)}onInit(e){const t=Oe.resolve(Ir),i=this.algorithm=t.toWebAlgorithm(e.algorithm);switch(e.algorithm.algorithm){case Yt:{const n=j.parse(e.subjectPublicKey,_s),s=_.toUint8Array(n.modulus);i.publicExponent=_.toUint8Array(n.publicExponent),i.modulusLength=(s[0]?s:s.slice(1)).byteLength<<3;break}}}async getThumbprint(...e){var t;let i,n="SHA-1";return e.length>=1&&!(!((t=e[0])===null||t===void 0)&&t.subtle)?(n=e[0]||n,i=e[1]||Te.get()):i=e[0]||Te.get(),await i.subtle.digest(n,this.rawData)}async getKeyIdentifier(...e){let t,i="SHA-1";e.length===1?typeof e[0]=="string"?(i=e[0],t=Te.get()):t=e[0]:e.length===2?(i=e[0],t=e[1]):t=Te.get();const n=j.parse(this.rawData,ot);return await t.subtle.digest(i,n.subjectPublicKey)}toTextObject(){const e=this.toTextObjectEmpty(),t=j.parse(this.rawData,ot);switch(e.Algorithm=er.serializeAlgorithm(t.algorithm),t.algorithm.algorithm){case Zr:e["EC Point"]=t.subjectPublicKey;break;case Yt:default:e["Raw Data"]=t.subjectPublicKey}return e}}function Hd(r,e){return r.algorithm=new R({algorithm:Yt,parameters:null}),e=j.serialize(r),e}class li extends Ke{static async create(e,t=!1,i=Te.get()){if("name"in e&&"serialNumber"in e)return new li(e,t);const s=await(await lt.create(e,i)).getKeyIdentifier(i);return new li(L.ToHex(s),t)}constructor(...e){if(_.isBufferSource(e[0]))super(e[0]);else if(typeof e[0]=="string"){const t=new qt({keyIdentifier:new No(L.FromHex(e[0]))});super(Io,e[1],j.serialize(t))}else{const t=e[0],i=t.name instanceof si?j.parse(t.name.rawData,Ne):t.name,n=new qt({authorityCertIssuer:i,authorityCertSerialNumber:L.FromHex(t.serialNumber)});super(Io,e[1],j.serialize(n))}}onInit(e){super.onInit(e);const t=j.parse(e.extnValue,qt);t.keyIdentifier&&(this.keyId=L.ToHex(t.keyIdentifier)),(t.authorityCertIssuer||t.authorityCertSerialNumber)&&(this.certId={name:t.authorityCertIssuer||[],serialNumber:t.authorityCertSerialNumber?L.ToHex(t.authorityCertSerialNumber):""})}toTextObject(){const e=this.toTextObjectWithoutValue(),t=j.parse(this.value,qt);return t.authorityCertIssuer&&(e["Authority Issuer"]=new si(t.authorityCertIssuer).toTextObject()),t.authorityCertSerialNumber&&(e["Authority Serial Number"]=t.authorityCertSerialNumber),t.keyIdentifier&&(e[""]=t.keyIdentifier),e}}li.NAME="Authority Key Identifier";class Vu extends Ke{constructor(...e){if(_.isBufferSource(e[0])){super(e[0]);const t=j.parse(this.value,Di);this.ca=t.cA,this.pathLength=t.pathLenConstraint}else{const t=new Di({cA:e[0],pathLenConstraint:e[1]});super($c,e[2],j.serialize(t)),this.ca=e[0],this.pathLength=e[1]}}toTextObject(){const e=this.toTextObjectWithoutValue();return this.ca&&(e.CA=this.ca),this.pathLength!==void 0&&(e["Path Length"]=this.pathLength),e}}Vu.NAME="Basic Constraints";var _u;(function(r){r.serverAuth="1.3.6.1.5.5.7.3.1",r.clientAuth="1.3.6.1.5.5.7.3.2",r.codeSigning="1.3.6.1.5.5.7.3.3",r.emailProtection="1.3.6.1.5.5.7.3.4",r.timeStamping="1.3.6.1.5.5.7.3.8",r.ocspSigning="1.3.6.1.5.5.7.3.9"})(_u||(_u={}));class ju extends Ke{constructor(...e){if(_.isBufferSource(e[0])){super(e[0]);const t=j.parse(this.value,Hi);this.usages=t.map(i=>i)}else{const t=new Hi(e[0]);super(qc,e[1],j.serialize(t)),this.usages=e[0]}}toTextObject(){const e=this.toTextObjectWithoutValue();return e[""]=this.usages.map(t=>Ot.toString(t)).join(", "),e}}ju.NAME="Extended Key Usages";var ua;(function(r){r[r.digitalSignature=1]="digitalSignature",r[r.nonRepudiation=2]="nonRepudiation",r[r.keyEncipherment=4]="keyEncipherment",r[r.dataEncipherment=8]="dataEncipherment",r[r.keyAgreement=16]="keyAgreement",r[r.keyCertSign=32]="keyCertSign",r[r.cRLSign=64]="cRLSign",r[r.encipherOnly=128]="encipherOnly",r[r.decipherOnly=256]="decipherOnly"})(ua||(ua={}));class fa extends Ke{constructor(...e){if(_.isBufferSource(e[0])){super(e[0]);const t=j.parse(this.value,qo);this.usages=t.toNumber()}else{const t=new qo(e[0]);super(zc,e[1],j.serialize(t)),this.usages=e[0]}}toTextObject(){const e=this.toTextObjectWithoutValue(),t=j.parse(this.value,qo);return e[""]=t.toJSON().join(", "),e}}fa.NAME="Key Usages";class Fn extends Ke{static async create(e,t=!1,i=Te.get()){const s=await(await lt.create(e,i)).getKeyIdentifier(i);return new Fn(L.ToHex(s),t)}constructor(...e){if(_.isBufferSource(e[0])){super(e[0]);const t=j.parse(this.value,Et);this.keyId=L.ToHex(t)}else{const t=typeof e[0]=="string"?L.FromHex(e[0]):e[0],i=new Et(t);super(Qc,e[1],j.serialize(i)),this.keyId=L.ToHex(t)}}toTextObject(){const e=this.toTextObjectWithoutValue(),t=j.parse(this.value,Et);return e[""]=t,e}}Fn.NAME="Subject Key Identifier";class da extends Ke{constructor(...e){_.isBufferSource(e[0])?super(e[0]):super(Yc,e[1],new si(e[0]||[]).rawData)}onInit(e){super.onInit(e);const t=j.parse(e.extnValue,Jo);this.names=new si(t)}toTextObject(){const e=this.toTextObjectWithoutValue(),t=this.names.toTextObject();for(const i in t)e[i]=t[i];return e}}da.NAME="Subject Alternative Name";class ze{static register(e,t){this.items.set(e,t)}static create(e){const t=new Ke(e),i=this.items.get(t.type);return i?new i(e):t}}ze.items=new Map;class Pu extends Ke{constructor(...e){var t;if(_.isBufferSource(e[0])){super(e[0]);const i=j.parse(this.value,Ui);this.policies=i.map(n=>n.policyIdentifier)}else{const i=e[0],n=(t=e[1])!==null&&t!==void 0?t:!1,s=new Ui(i.map(c=>new Mi({policyIdentifier:c})));super(Uc,n,j.serialize(s)),this.policies=i}}toTextObject(){const e=this.toTextObjectWithoutValue();return e.Policy=this.policies.map(t=>new ne("",{},Ot.toString(t))),e}}Pu.NAME="Certificate Policies",ze.register(Uc,Pu);class Ru extends Ke{constructor(...e){var t;if(_.isBufferSource(e[0]))super(e[0]);else if(Array.isArray(e[0])&&typeof e[0][0]=="string"){const n=e[0].map(c=>new ur({distributionPoint:new Kt({fullName:[new X({uniformResourceIdentifier:c})]})})),s=new fr(n);super(Do,e[1],j.serialize(s))}else{const i=new fr(e[0]);super(Do,e[1],j.serialize(i))}(t=this.distributionPoints)!==null&&t!==void 0||(this.distributionPoints=[])}onInit(e){super.onInit(e);const t=j.parse(e.extnValue,fr);this.distributionPoints=t}toTextObject(){const e=this.toTextObjectWithoutValue();return e["Distribution Point"]=this.distributionPoints.map(t=>{var i;const n={};return t.distributionPoint&&(n[""]=(i=t.distributionPoint.fullName)===null||i===void 0?void 0:i.map(s=>new jt(s).toString()).join(", ")),t.reasons&&(n.Reasons=t.reasons.toString()),t.cRLIssuer&&(n["CRL Issuer"]=t.cRLIssuer.map(s=>s.toString()).join(", ")),n}),e}}Ru.NAME="CRL Distribution Points";class Du extends Ke{constructor(...e){var t,i,n,s;if(_.isBufferSource(e[0]))super(e[0]);else if(e[0]instanceof lr){const c=new lr(e[0]);super(Eo,e[1],j.serialize(c))}else{const c=e[0],u=new lr;Kn(u,c,jc,"ocsp"),Kn(u,c,Pc,"caIssuers"),Kn(u,c,Rc,"timeStamping"),Kn(u,c,Dc,"caRepository"),super(Eo,e[1],j.serialize(u))}(t=this.ocsp)!==null&&t!==void 0||(this.ocsp=[]),(i=this.caIssuers)!==null&&i!==void 0||(this.caIssuers=[]),(n=this.timeStamping)!==null&&n!==void 0||(this.timeStamping=[]),(s=this.caRepository)!==null&&s!==void 0||(this.caRepository=[])}onInit(e){super.onInit(e),this.ocsp=[],this.caIssuers=[],this.timeStamping=[],this.caRepository=[],j.parse(e.extnValue,lr).forEach(i=>{switch(i.accessMethod){case jc:this.ocsp.push(new jt(i.accessLocation));break;case Pc:this.caIssuers.push(new jt(i.accessLocation));break;case Rc:this.timeStamping.push(new jt(i.accessLocation));break;case Dc:this.caRepository.push(new jt(i.accessLocation));break}})}toTextObject(){const e=this.toTextObjectWithoutValue();return this.ocsp.length&&qn(e,"OCSP",this.ocsp),this.caIssuers.length&&qn(e,"CA Issuers",this.caIssuers),this.timeStamping.length&&qn(e,"Time Stamping",this.timeStamping),this.caRepository.length&&qn(e,"CA Repository",this.caRepository),e}}Du.NAME="Authority Info Access";function qn(r,e,t){if(t.length===1)r[e]=t[0].toTextObject();else{const i=new ne("");t.forEach((n,s)=>{const c=n.toTextObject(),u=`${c[ne.NAME]} ${s+1}`;let f=i[u];Array.isArray(f)||(f=[],i[u]=f),f.push(c)}),r[e]=i}}function Kn(r,e,t,i){const n=e[i];n&&(Array.isArray(n)?n:[n]).forEach(c=>{typeof c=="string"&&(c=new jt("url",c)),r.push(new $r({accessMethod:t,accessLocation:j.parse(c.rawData,X)}))})}class Or extends Tt{constructor(...e){let t;if(_.isBufferSource(e[0]))t=_.toArrayBuffer(e[0]);else{const i=e[0],n=Array.isArray(e[1])?e[1].map(s=>_.toArrayBuffer(s)):[];t=j.serialize(new vt({type:i,values:n}))}super(t,vt)}onInit(e){this.type=e.type,this.values=e.values}toTextObject(){const e=this.toTextObjectWithoutValue();return e.Value=this.values.map(t=>new ne("",{"":t})),e}toTextObjectWithoutValue(){const e=this.toTextObjectEmpty();return e[ne.NAME]===Or.NAME&&(e[ne.NAME]=Ot.toString(this.type)),e}}Or.NAME="Attribute";class $u extends Or{constructor(...e){var t;if(_.isBufferSource(e[0]))super(e[0]);else{const i=new Mn({printableString:e[0]});super(jl,[j.serialize(i)])}(t=this.password)!==null&&t!==void 0||(this.password="")}onInit(e){if(super.onInit(e),this.values[0]){const t=j.parse(this.values[0],Mn);this.password=t.toString()}}toTextObject(){const e=this.toTextObjectWithoutValue();return e[ne.VALUE]=this.password,e}}$u.NAME="Challenge Password";class pa extends Or{constructor(...e){var t;if(_.isBufferSource(e[0]))super(e[0]);else{const i=e[0],n=new zt;for(const s of i)n.push(j.parse(s.rawData,Ze));super(Ws,[j.serialize(n)])}(t=this.items)!==null&&t!==void 0||(this.items=[])}onInit(e){if(super.onInit(e),this.values[0]){const t=j.parse(this.values[0],zt);this.items=t.map(i=>ze.create(j.serialize(i)))}}toTextObject(){const e=this.toTextObjectWithoutValue(),t=this.items.map(i=>i.toTextObject());for(const i of t)e[i[ne.NAME]]=i;return e}}pa.NAME="Extensions";class zn{static register(e,t){this.items.set(e,t)}static create(e){const t=new Or(e),i=this.items.get(t.type);return i?new i(e):t}}zn.items=new Map;const Gn="crypto.signatureFormatter";class Fd{toAsnSignature(e,t){return _.toArrayBuffer(t)}toWebSignature(e,t){return _.toArrayBuffer(t)}}var Wn;let ha=Wn=class{static createPssParams(e,t){const i=Wn.getHashAlgorithm(e);return i?new Qt({hashAlgorithm:i,maskGenAlgorithm:new R({algorithm:Cn,parameters:j.serialize(i)}),saltLength:t}):null}static getHashAlgorithm(e){const t=Oe.resolve(Ir);return typeof e=="string"?t.toAsnAlgorithm({name:e}):typeof e=="object"&&e&&"name"in e?t.toAsnAlgorithm(e):null}toAsnAlgorithm(e){switch(e.name.toLowerCase()){case"rsassa-pkcs1-v1_5":if("hash"in e){let t;if(typeof e.hash=="string")t=e.hash;else if(e.hash&&typeof e.hash=="object"&&"name"in e.hash&&typeof e.hash.name=="string")t=e.hash.name.toUpperCase();else throw new Error("Cannot get hash algorithm name");switch(t.toLowerCase()){case"sha-1":return new R({algorithm:mn,parameters:null});case"sha-256":return new R({algorithm:Os,parameters:null});case"sha-384":return new R({algorithm:bn,parameters:null});case"sha-512":return new R({algorithm:vn,parameters:null})}}else return new R({algorithm:Yt,parameters:null});break;case"rsa-pss":if("hash"in e){if(!("saltLength"in e&&typeof e.saltLength=="number"))throw new Error("Cannot get 'saltLength' from 'alg' argument");const t=Wn.createPssParams(e.hash,e.saltLength);if(!t)throw new Error("Cannot create PSS parameters");return new R({algorithm:ei,parameters:j.serialize(t)})}else return new R({algorithm:ei,parameters:null})}return null}toWebAlgorithm(e){switch(e.algorithm){case Yt:return{name:"RSASSA-PKCS1-v1_5"};case mn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case Os:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case bn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case vn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}};case ei:if(e.parameters){const t=j.parse(e.parameters,Qt);return{name:"RSA-PSS",hash:Oe.resolve(Ir).toWebAlgorithm(t.hashAlgorithm),saltLength:t.saltLength}}else return{name:"RSA-PSS"}}return null}};ha=Wn=a([Vn()],ha),Oe.registerSingleton(ni,ha);let ya=class{toAsnAlgorithm(e){switch(e.name.toLowerCase()){case"sha-1":return new R({algorithm:wn});case"sha-256":return new R({algorithm:Sn});case"sha-384":return new R({algorithm:An});case"sha-512":return new R({algorithm:kn})}return null}toWebAlgorithm(e){switch(e.algorithm){case wn:return{name:"SHA-1"};case Sn:return{name:"SHA-256"};case An:return{name:"SHA-384"};case kn:return{name:"SHA-512"}}return null}};ya=a([Vn()],ya),Oe.registerSingleton(ni,ya);class Ge{addPadding(e,t){const i=_.toUint8Array(t),n=new Uint8Array(e);return n.set(i,e-i.length),n}removePadding(e,t=!1){let i=_.toUint8Array(e);for(let n=0;n<i.length;n++)if(i[n]){i=i.slice(n);break}if(t&&i[0]>127){const n=new Uint8Array(i.length+1);return n.set(i,1),n.buffer}return i.buffer}toAsnSignature(e,t){if(e.name==="ECDSA"){const i=e.namedCurve,n=Ge.namedCurveSize.get(i)||Ge.defaultNamedCurveSize,s=new gn,c=_.toUint8Array(t);return s.r=this.removePadding(c.slice(0,n),!0),s.s=this.removePadding(c.slice(n,n+n),!0),j.serialize(s)}return null}toWebSignature(e,t){if(e.name==="ECDSA"){const i=j.parse(t,gn),n=e.namedCurve,s=Ge.namedCurveSize.get(n)||Ge.defaultNamedCurveSize,c=this.addPadding(s,this.removePadding(i.r)),u=this.addPadding(s,this.removePadding(i.s));return rf(c,u)}return null}}Ge.namedCurveSize=new Map,Ge.defaultNamedCurveSize=32;const ga="1.3.101.110",Mu="1.3.101.111",ma="1.3.101.112",Uu="1.3.101.113";let ba=class{toAsnAlgorithm(e){let t=null;switch(e.name.toLowerCase()){case"ed25519":t=ma;break;case"x25519":t=ga;break;case"eddsa":switch(e.namedCurve.toLowerCase()){case"ed25519":t=ma;break;case"ed448":t=Uu;break}break;case"ecdh-es":switch(e.namedCurve.toLowerCase()){case"x25519":t=ga;break;case"x448":t=Mu;break}}return t?new R({algorithm:t}):null}toWebAlgorithm(e){switch(e.algorithm){case ma:return{name:"Ed25519"};case Uu:return{name:"EdDSA",namedCurve:"Ed448"};case ga:return{name:"X25519"};case Mu:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};ba=a([Vn()],ba),Oe.registerSingleton(ni,ba);class qd extends kt{constructor(e){kt.isAsnEncoded(e)?super(e,ii):super(e),this.tag=Le.CertificateRequestTag}onInit(e){this.tbs=j.serialize(e.certificationRequestInfo),this.publicKey=new lt(e.certificationRequestInfo.subjectPKInfo);const t=Oe.resolve(Ir);this.signatureAlgorithm=t.toWebAlgorithm(e.signatureAlgorithm),this.signature=e.signature,this.attributes=e.certificationRequestInfo.attributes.map(n=>zn.create(j.serialize(n)));const i=this.getAttribute(Ws);this.extensions=[],i instanceof pa&&(this.extensions=i.items),this.subjectName=new _t(e.certificationRequestInfo.subject),this.subject=this.subjectName.toString()}getAttribute(e){for(const t of this.attributes)if(t.type===e)return t;return null}getAttributes(e){return this.attributes.filter(t=>t.type===e)}getExtension(e){for(const t of this.extensions)if(t.type===e)return t;return null}getExtensions(e){return this.extensions.filter(t=>t.type===e)}async verify(e=Te.get()){const t={...this.publicKey.algorithm,...this.signatureAlgorithm},i=await this.publicKey.export(t,["verify"],e),n=Oe.resolveAll(Gn).reverse();let s=null;for(const u of n)if(s=u.toWebSignature(t,this.signature),s)break;if(!s)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await e.subtle.verify(this.signatureAlgorithm,i,s,this.tbs)}toTextObject(){const e=this.toTextObjectEmpty(),t=j.parse(this.rawData,ii),i=t.certificationRequestInfo,n=new ne("",{Version:`${dr[i.version]} (${i.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){const s=new ne("");for(const c of this.attributes){const u=c.toTextObject();s[u[ne.NAME]]=u}n.Attributes=s}return e.Data=n,e.Signature=new ne("",{Algorithm:er.serializeAlgorithm(t.signatureAlgorithm),"":t.signature}),e}}qd.NAME="PKCS#10 Certificate Request";class Lu extends kt{constructor(e){kt.isAsnEncoded(e)?super(e,pr):super(e),this.tag=Le.CertificateTag}onInit(e){const t=e.tbsCertificate;this.tbs=j.serialize(t),this.serialNumber=L.ToHex(t.serialNumber),this.subjectName=new _t(t.subject),this.subject=new _t(t.subject).toString(),this.issuerName=new _t(t.issuer),this.issuer=this.issuerName.toString();const i=Oe.resolve(Ir);this.signatureAlgorithm=i.toWebAlgorithm(e.signatureAlgorithm),this.signature=e.signatureValue;const n=t.validity.notBefore.utcTime||t.validity.notBefore.generalTime;if(!n)throw new Error("Cannot get 'notBefore' value");this.notBefore=n;const s=t.validity.notAfter.utcTime||t.validity.notAfter.generalTime;if(!s)throw new Error("Cannot get 'notAfter' value");this.notAfter=s,this.extensions=[],t.extensions&&(this.extensions=t.extensions.map(c=>ze.create(j.serialize(c)))),this.publicKey=new lt(t.subjectPublicKeyInfo)}getExtension(e){for(const t of this.extensions)if(typeof e=="string"){if(t.type===e)return t}else if(t instanceof e)return t;return null}getExtensions(e){return this.extensions.filter(t=>typeof e=="string"?t.type===e:t instanceof e)}async verify(e={},t=Te.get()){let i,n;const s=e.publicKey;try{if(!s)i={...this.publicKey.algorithm,...this.signatureAlgorithm},n=await this.publicKey.export(i,["verify"],t);else if("publicKey"in s)i={...s.publicKey.algorithm,...this.signatureAlgorithm},n=await s.publicKey.export(i,["verify"],t);else if(s instanceof lt)i={...s.algorithm,...this.signatureAlgorithm},n=await s.export(i,["verify"],t);else if(_.isBufferSource(s)){const p=new lt(s);i={...p.algorithm,...this.signatureAlgorithm},n=await p.export(i,["verify"],t)}else i={...s.algorithm,...this.signatureAlgorithm},n=s}catch{return!1}const c=Oe.resolveAll(Gn).reverse();let u=null;for(const p of c)if(u=p.toWebSignature(i,this.signature),u)break;if(!u)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");const f=await t.subtle.verify(this.signatureAlgorithm,n,u,this.tbs);if(e.signatureOnly)return f;{const b=(e.date||new Date).getTime();return f&&this.notBefore.getTime()<b&&b<this.notAfter.getTime()}}async getThumbprint(...e){let t,i="SHA-1";return e[0]&&(e[0].subtle?t=e[0]:(i=e[0]||i,t=e[1])),t??(t=Te.get()),await t.subtle.digest(i,this.rawData)}async isSelfSigned(e=Te.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},e)}toTextObject(){const e=this.toTextObjectEmpty(),t=j.parse(this.rawData,pr),i=t.tbsCertificate,n=new ne("",{Version:`${dr[i.version]} (${i.version})`,"Serial Number":i.serialNumber,"Signature Algorithm":er.serializeAlgorithm(i.signature),Issuer:this.issuer,Validity:new ne("",{"Not Before":i.validity.notBefore.getTime(),"Not After":i.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(i.issuerUniqueID&&(n["Issuer Unique ID"]=i.issuerUniqueID),i.subjectUniqueID&&(n["Subject Unique ID"]=i.subjectUniqueID),this.extensions.length){const s=new ne("");for(const c of this.extensions){const u=c.toTextObject();s[u[ne.NAME]]=u}n.Extensions=s}return e.Data=n,e.Signature=new ne("",{Algorithm:er.serializeAlgorithm(t.signatureAlgorithm),"":t.signatureValue}),e}}Lu.NAME="Certificate";var Hu;(function(r){r[r.unspecified=0]="unspecified",r[r.keyCompromise=1]="keyCompromise",r[r.cACompromise=2]="cACompromise",r[r.affiliationChanged=3]="affiliationChanged",r[r.superseded=4]="superseded",r[r.cessationOfOperation=5]="cessationOfOperation",r[r.certificateHold=6]="certificateHold",r[r.removeFromCRL=8]="removeFromCRL",r[r.privilegeWithdrawn=9]="privilegeWithdrawn",r[r.aACompromise=10]="aACompromise"})(Hu||(Hu={})),ze.register($c,Vu),ze.register(qc,ju),ze.register(zc,fa),ze.register(Qc,Fn),ze.register(Io,li),ze.register(Yc,da),ze.register(Do,Ru),ze.register(Eo,Du),zn.register(jl,$u),zn.register(Ws,pa),Oe.registerSingleton(Gn,Fd),Oe.registerSingleton(Gn,Ge),Ge.namedCurveSize.set("P-256",32),Ge.namedCurveSize.set("K-256",32),Ge.namedCurveSize.set("P-384",48),Ge.namedCurveSize.set("P-521",66);function Fu(){return{parseMetaCertificateData:e=>{if(/{vault:\/\/.*}/g.test(e))throw new Error("not a X.509 certificate");const t=new Lu(e),i={subject:t.subjectName.toString(),issuer:t.issuer,notAfter:t.notAfter};for(const n of t.extensions)if(n instanceof da){const s=n.names.toJSON(),u=Object.entries(s).map(f=>({type:f[1].type,value:f[1].value})).reduce((f,p)=>{const b=p.type,y=f[b]??[];return{...f,[b]:[...y,p.value]}},{});for(const f in u)i.subjectAltName=`${f}=${u[f].join(", ")}`}else if(n instanceof fa){const s=Object.values(ua),c=Array(s.length/2).fill(null).reduce((u,f,p)=>{const b=s[s.length/2+p];if(n.usages&b){const y=s[p];u.push(y)}return u},[]);i.keyUsage=c}return i}}}function Kd(){const r=Fu(),e=o.ref({}),t=n=>{if(!(n.id in e.value))try{e.value[n.id]=r.parseMetaCertificateData(n.cert)}catch{e.value[n.id]=void 0}return e.value[n.id]};return{certificateDataCache:e,getCertificateData:n=>{const s=t(n);return{schemaIssuer:(s==null?void 0:s.issuer)||"",schemaSubject:(s==null?void 0:s.subject)||"",schemaExpiry:(s==null?void 0:s.notAfter)instanceof Date?s.notAfter.getTime()/1e3:0,schemaSanNames:(s==null?void 0:s.subjectAltName)||"",schemaKeyUsages:(s==null?void 0:s.keyUsage)||[]}}}}const zd={certificates:{title:"Certificates",list:{toolbar_actions:{new_certificate:"New certificate"},table_headers:{subject:"Subject",expiry:"Expiry",san:"SAN",cert:"Cert",tags:"Tags",issuer:"Issuer",snis:"SNIs"},empty_state:{title:"Configure a New Certificate",description:"Certificates handle SSL/TLS termination for encrypted requests."},empty_state_v2:{create:"New certificate",title:"Configure your first certificate",group:"Certificates created in gateways within this group will automatically appear here.",description:"Certificates manage SSL/TLS encryption, ensuring secure communication between clients and your API services."}},form:{sections:{ssl:{title:"SSL Key Pair",description:"The PEM-encoded public certificate chain and private key of the SSL key pair and the alternate."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate chain of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key:{label:"Key",tooltip:"PEM-encoded private key of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},cert_alt:{label:"Cert Alt",tooltip:"PEM-encoded public certificate chain of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key_alt:{label:"Key Alt",tooltip:"PEM-encoded private key of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},snis:{label:"SNIs",placeholder:"Enter an SNI",add:"Add an SNI",tooltip:"Zero or more hostnames to associate with this certificate as SNIs",editingTip:"To manage SNIs for this certificate, click {link}.",editingTipLink:"here"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",addSni:"Add to New SNI",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"Certificates could not be retrieved",delete:"The certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},"ca-certificates":{title:"CA Certificates",list:{toolbar_actions:{new_ca_certificate:"New CA certificate"},table_headers:{issuer:"Issuer",expiry:"Expiry",tags:"Tags"},empty_state:{title:"Configure a New CA Certificate",description:"CA certificates validate client or server certificates."},empty_state_v2:{create:"New CA certificate",title:"Configure your first CA certificate",group:"CA Certificates created in gateways within this group will automatically appear here.",description:"CA Certificates validate the authenticity of client and server certificates, reinforcing the trust and security of your API communications."}},form:{sections:{cert:{title:"Public Certificate",description:"The PEM-encoded public certificate of the CA and it’s SHA256 hex digest."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate of the CA."},cert_digest:{label:"Cert Digest",tooltip:"SHA256 hex digest of the public certificate"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New CA certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a CA Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"CA Certificates could not be retrieved",delete:"The CA Certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},general:{"key-usages":{KEY_USAGE_TYPE_KEY_CERT_SIGN:"keyCertSign",KEY_USAGE_TYPE_CRL_SIGN:"cRLSign",KEY_USAGE_TYPE_ENCIPHER_ONLY:"encipherOnly",KEY_USAGE_TYPE_DIGITAL_SIGNATURE:"digitalSignature",KEY_USAGE_TYPE_KEY_ENCIPHERMENT:"keyEncipherment",KEY_USAGE_TYPE_DATA_ENCIPHERMENT:"dataEncipherment",KEY_USAGE_TYPE_KEY_AGREEMENT:"keyAgreement",KEY_USAGE_TYPE_CONTENT_COMMITMENT:"nonRepudiation"}}};function Gd(){const r=Sa.createI18n("en-us",zd);return{i18n:r,i18nT:Sa.i18nTComponent(r)}}const Xe={useCertificate:Kd,useI18n:Gd,useX509:Fu},Jn="/v2/control-planes/{controlPlaneId}/core-entities",Yn="/{workspace}",ui={list:{konnect:`${Jn}/certificates`,kongManager:`${Yn}/certificates`},form:{konnect:{create:`${Jn}/certificates`,edit:`${Jn}/certificates/{id}`,validate:`${Jn}/v1/schemas/json/certificate/validate`},kongManager:{create:`${Yn}/certificates`,edit:`${Yn}/certificates/{id}`,validate:`${Yn}/schemas/certificates/validate`}}},Wd={class:"kong-ui-entities-certificates-list"},Jd={class:"button-row"},Yd={class:"empty-state-icon-gateway"},Zd={key:0},Qd={key:1},Xd={key:0},ep={key:1},tp={key:0},rp={key:1},ip={key:1},np=o.defineComponent({__name:"CertificateList",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||!r.createRoute||!r.getViewRoute||!r.getEditRoute||r.app==="kongManager"&&!r.isExactMatch&&!r.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canCreateSni:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(r,{emit:e}){var Z;const t=e,i=r,{i18n:{t:n,formatUnixTimeStamp:s},i18nT:c}=Xe.useI18n(),u=hi.useRouter(),{axiosInstance:f}=N.useAxios((Z=i.config)==null?void 0:Z.axiosRequestConfig),{handleStateChange:p,hasRecords:b}=N.useTableState(()=>w.value),y=o.computed(()=>b.value&&i.config.app==="konnect"),q=o.computed(()=>!i.enableV2EmptyStates&&i.config.app==="konnect"),O=o.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),g={subject:{label:n("certificates.list.table_headers.subject"),hidable:!1},expiry:{label:n("certificates.list.table_headers.expiry")},san:{label:n("certificates.list.table_headers.san")},cert:{label:n("certificates.list.table_headers.cert")},tags:{label:n("certificates.list.table_headers.tags"),sortable:!0}},S=o.computed(()=>{var J,Q;let D=`${i.config.apiBaseUrl}${ui.list[i.config.app]}`;return i.config.app==="konnect"?D=D.replace(/{controlPlaneId}/gi,((J=i.config)==null?void 0:J.controlPlaneId)||""):i.config.app==="kongManager"&&(D=D.replace(/\/{workspace}/gi,(Q=i.config)!=null&&Q.workspace?`/${i.config.workspace}`:"")),D}),w=o.ref(""),E=o.computed(()=>{const D=i.config.app==="konnect"||i.config.isExactMatch;return D?{isExactMatch:D,placeholder:n("certificates.search.placeholder")}:{isExactMatch:D,schema:i.config.filterSchema}}),{fetcher:k,fetcherState:I,fetcherCacheKey:W}=N.useFetcher({...i.config,cacheIdentifier:i.cacheIdentifier},S.value),se=()=>{w.value=""},M=()=>{W.value++},C=o.ref(null),T=async(D,J)=>{const Q=D.id;if(!await J(Q)){t("copy:error",{entity:D,field:"id",message:n("certificates.errors.copy")});return}t("copy:success",{entity:D,field:"id",message:n("certificates.copy.success",{val:Q})})},me=async(D,J)=>{const Q=JSON.stringify(D);if(!await J(Q)){t("copy:error",{entity:D,message:n("certificates.errors.copy")});return}t("copy:success",{entity:D,message:n("certificates.copy.success_brief")})},ae=async D=>{var Q;await((Q=i.canRetrieve)==null?void 0:Q.call(i,D))&&u.push(i.config.getViewRoute(D.id))},ut=D=>({label:n("certificates.actions.view"),to:i.config.getViewRoute(D)}),fe=D=>({label:n("certificates.actions.edit"),to:i.config.getEditRoute(D)}),pe=D=>{if(i.config.getCreateSniRoute)return{label:n("certificates.actions.addSni"),to:i.config.getCreateSniRoute(D)}},Ee=o.ref(void 0),ee=o.ref(!1),ft=o.ref(!1),rr=o.ref(""),Tr=N.useDeleteUrlBuilder(i.config,S.value),{certificateDataCache:Pt,getCertificateData:Ct}=Xe.useCertificate(),z=D=>{Ee.value=D,ee.value=!0},dt=()=>{ee.value=!1},di=async()=>{var D,J,Q;if((D=Ee.value)!=null&&D.id){ft.value=!0;try{await f.delete(Tr(Ee.value.id)),ft.value=!1,ee.value=!1,W.value++,t("delete:success",Ee.value)}catch($e){rr.value=((Q=(J=$e.response)==null?void 0:J.data)==null?void 0:Q.message)||$e.message||n("certificates.errors.delete"),t("error",$e)}finally{ft.value=!1}}},le=()=>{u.push(i.config.createRoute)};o.watch(I,D=>{var J,Q,$e;if(D.status===N.FetcherStatus.Error){C.value={title:n("certificates.errors.general")},($e=(Q=(J=D.error)==null?void 0:J.response)==null?void 0:Q.data)!=null&&$e.message&&(C.value.message=D.error.response.data.message),t("error",D.error);return}Pt.value={},C.value=null});const Rt=o.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${n("certificates.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:n("certificates.title")});return o.onBeforeMount(async()=>{await i.canCreate()&&(Rt.value.title=n("certificates.list.empty_state.title"),Rt.value.ctaText=n("certificates.actions.create"))}),(D,J)=>{const Q=o.resolveComponent("KButton"),$e=o.resolveComponent("KCopy"),Y=o.resolveComponent("KDropdownItem"),Ce=o.resolveComponent("KClipboardProvider");return o.openBlock(),o.createElementBlock("div",Wd,[o.createVNode(o.unref(N.EntityBaseTable),{"cache-identifier":r.cacheIdentifier,"disable-sorting":O.value,"empty-state-options":Rt.value,"enable-entity-actions":"","error-message":C.value,fetcher:o.unref(k),"fetcher-cache-key":o.unref(W),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-certificates-list",query:w.value,"table-headers":o.unref(g),onClearSearchInput:se,"onClick:row":J[4]||(J[4]=G=>ae(G)),onSort:M,onState:o.unref(p)},o.createSlots({"toolbar-filter":o.withCtx(()=>[o.createVNode(o.unref(N.EntityFilter),{modelValue:w.value,"onUpdate:modelValue":J[0]||(J[0]=G=>w.value=G),config:E.value},null,8,["modelValue","config"])]),"toolbar-button":o.withCtx(()=>[(o.openBlock(),o.createBlock(o.Teleport,{disabled:!r.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[o.createElementVNode("div",Jd,[y.value?(o.openBlock(),o.createBlock(Q,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"certificates-learn-more-button",icon:"",onClick:J[1]||(J[1]=G=>D.$emit("click:learn-more"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.BookIcon),{decorative:""})]),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canCreate()},{default:o.withCtx(()=>[o.createVNode(Q,{appearance:"primary","data-testid":"toolbar-add-certificate",size:r.useActionOutside?"medium":"large",to:r.config.createRoute},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.AddIcon)),o.createTextVNode(" "+o.toDisplayString(o.unref(n)("certificates.list.toolbar_actions.new_certificate")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),subject:o.withCtx(({row:G})=>{var ve;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("b",Zd,o.toDisplayString((ve=G==null?void 0:G.metadata)!=null&&ve.subject?G.metadata.subject:"-"),1)):(o.openBlock(),o.createElementBlock("b",Qd,o.toDisplayString(o.unref(Ct)(G).schemaSubject||"-"),1))]}),expiry:o.withCtx(({row:G})=>{var ve;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("span",Xd,o.toDisplayString((ve=G==null?void 0:G.metadata)!=null&&ve.expiry?o.unref(s)(G.metadata.expiry):"-"),1)):(o.openBlock(),o.createElementBlock("span",ep,o.toDisplayString(o.unref(Ct)(G).schemaExpiry?o.unref(s)(o.unref(Ct)(G).schemaExpiry):"-"),1))]}),san:o.withCtx(({row:G})=>{var ve;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("span",tp,o.toDisplayString((ve=G==null?void 0:G.metadata)!=null&&ve.dns_names?`dns=${G.metadata.dns_names.join(", ")}`:"-"),1)):(o.openBlock(),o.createElementBlock("span",rp,o.toDisplayString(o.unref(Ct)(G).schemaSanNames||"-"),1))]}),cert:o.withCtx(({row:G})=>[G!=null&&G.cert?(o.openBlock(),o.createBlock($e,{key:0,"data-testid":"copy-certificate-cert",text:G.cert,truncate:""},null,8,["text"])):(o.openBlock(),o.createElementBlock("span",ip,"-"))]),tags:o.withCtx(({row:G})=>[o.createVNode(o.unref(N.TableTags),{tags:G==null?void 0:G.tags},null,8,["tags"])]),actions:o.withCtx(({row:G})=>[o.createVNode(Ce,null,{default:o.withCtx(({copyToClipboard:ve})=>[o.createVNode(Y,{"data-testid":"action-entity-copy-id",onClick:Xn=>T(G,ve)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("certificates.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(Ce,null,{default:o.withCtx(({copyToClipboard:ve})=>[o.createVNode(Y,{"data-testid":"action-entity-copy-json",onClick:Xn=>me(G,ve)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("certificates.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canRetrieve(G)},{default:o.withCtx(()=>[o.createVNode(Y,{"data-testid":"action-entity-view","has-divider":"",item:ut(G.id)},null,8,["item"])]),_:2},1032,["auth-function"]),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canEdit(G)},{default:o.withCtx(()=>[o.createVNode(Y,{"data-testid":"action-entity-edit",item:fe(G.id)},null,8,["item"])]),_:2},1032,["auth-function"]),r.config.getCreateSniRoute?(o.openBlock(),o.createBlock(o.unref(N.PermissionsWrapper),{key:0,"auth-function":()=>r.canCreateSni()},{default:o.withCtx(()=>[o.createVNode(Y,{"data-testid":"action-entity-add-sni",item:pe(G.id)},null,8,["item"])]),_:2},1032,["auth-function"])):o.createCommentVNode("",!0),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canDelete(G)},{default:o.withCtx(()=>[o.createVNode(Y,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:ve=>z(G)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("certificates.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!o.unref(b)&&q.value?{name:"outside-actions",fn:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.Teleport,{disabled:!r.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[o.createVNode(Q,{appearance:"secondary",class:"open-learning-hub","data-testid":"certificates-learn-more-button",icon:"",onClick:J[2]||(J[2]=G=>D.$emit("click:learn-more"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!w.value&&r.enableV2EmptyStates&&r.config.app==="konnect"?{name:"empty-state",fn:o.withCtx(()=>{var G;return[o.createVNode(o.unref(N.EntityEmptyState),{"action-button-text":o.unref(n)("certificates.list.empty_state_v2.create"),appearance:"secondary","can-create":()=>r.canCreate(),"data-testid":"certificates-entity-empty-state",description:o.unref(n)("certificates.list.empty_state_v2.description"),"learn-more":r.config.app==="konnect",title:o.unref(n)("certificates.list.empty_state_v2.title"),"onClick:create":le,"onClick:learnMore":J[3]||(J[3]=ve=>D.$emit("click:learn-more"))},o.createSlots({image:o.withCtx(()=>[o.createElementVNode("div",Yd,[o.createVNode(o.unref(tt.ServiceDocumentIcon),{color:o.unref(Aa),size:o.unref(ka)},null,8,["color","size"])])]),_:2},[(G=r.config)!=null&&G.isControlPlaneGroup?{name:"message",fn:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("certificates.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),o.createVNode(o.unref(N.EntityDeleteModal),{"action-pending":ft.value,"entity-type":o.unref(N.EntityTypes).Certificate,error:rr.value,title:o.unref(n)("certificates.delete.title"),visible:ee.value,onCancel:dt,onProceed:di},{description:o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.delete.description",scope:"global"},{"bolded-text":o.withCtx(()=>[o.createElementVNode("b",null,o.toDisplayString(o.unref(n)("certificates.delete.boldedText")),1)]),_:1}),o.createElementVNode("p",null,o.toDisplayString(o.unref(n)("certificates.delete.description2")),1)]),_:1},8,["action-pending","entity-type","error","title","visible"])])}}}),tr=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},op=tr(np,[["__scopeId","data-v-0656bf7a"]]),sp={class:"sni-field-container"},ap={key:1,class:"sni-field-controls-container"},cp={key:0},lp=tr(o.defineComponent({__name:"CertificateFormSniField",props:{isEditing:{type:Boolean,default:!1},modelValue:{type:Array,required:!0},sniListRoute:{type:Object,required:!0}},emits:["add","remove","update:modelValue"],setup(r,{emit:e}){const t=r,i=e,{i18nT:n,i18n:{t:s}}=Xe.useI18n(),c=o.ref([]);return o.watch(t.modelValue,u=>{c.value=[...u]},{immediate:!0,deep:!0}),o.watch(c,u=>{i("update:modelValue",u)},{deep:!0}),(u,f)=>{const p=o.resolveComponent("KLabel"),b=o.resolveComponent("KInput"),y=o.resolveComponent("KButton"),q=o.resolveComponent("router-link");return o.openBlock(),o.createElementBlock("div",sp,[o.createVNode(p,{info:o.unref(s)("certificates.form.fields.snis.tooltip")},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s)("certificates.form.fields.snis.label")),1)]),_:1},8,["info"]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,(O,d)=>(o.openBlock(),o.createElementBlock("div",{key:d,class:"sni-field-input"},[!r.isEditing||c.value[d]?(o.openBlock(),o.createBlock(b,{key:0,modelValue:c.value[d],"onUpdate:modelValue":g=>c.value[d]=g,modelModifiers:{trim:!0},"data-testid":`sni-field-input-${d+1}`,disabled:r.isEditing,placeholder:o.unref(s)("certificates.form.fields.snis.placeholder")},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","placeholder"])):o.createCommentVNode("",!0),r.isEditing?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",ap,[o.createVNode(y,{appearance:"tertiary",class:"remove-button","data-testid":"remove-sni",icon:"",onClick:g=>u.$emit("remove",d)},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.TrashIcon),{color:o.unref(Zu)},null,8,["color"])]),_:2},1032,["onClick"]),o.createVNode(y,{appearance:"tertiary","data-testid":"add-sni",disabled:d!==c.value.length-1,icon:"",onClick:f[0]||(f[0]=g=>u.$emit("add"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.AddIcon))]),_:2},1032,["disabled"])]))]))),128)),c.value.length===0?(o.openBlock(),o.createElementBlock("div",cp,[o.createVNode(y,{onClick:f[1]||(f[1]=O=>u.$emit("add"))},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s)("certificates.form.fields.snis.add")),1)]),_:1})])):o.createCommentVNode("",!0),r.isEditing?(o.openBlock(),o.createBlock(o.unref(n),{key:1,keypath:"certificates.form.fields.snis.editingTip"},{link:o.withCtx(()=>[o.createVNode(q,{to:r.sniListRoute},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(s)("certificates.form.fields.snis.editingTipLink")),1)]),_:1},8,["to"])]),_:1})):o.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-89e994ac"]]),up={class:"kong-ui-entities-certificates-form"},fp=tr(o.defineComponent({__name:"CertificateForm",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||r.app==="konnect"&&!r.controlPlaneId||r.app==="kongManager"&&typeof r.workspace!="string"||!r.cancelRoute)},certificateId:{type:String,required:!1,default:""},showSnisField:{type:Boolean,required:!1,default:!1}},emits:["update","error","loading"],setup(r,{emit:e}){var se;const t=e,i=r,n=hi.useRouter(),{i18nT:s,i18n:{t:c}}=Xe.useI18n(),{getMessageFromError:u}=N.useErrors(),{axiosInstance:f}=N.useAxios((se=i.config)==null?void 0:se.axiosRequestConfig),p=o.computed(()=>ui.form[i.config.app].edit),b=o.computed(()=>i.certificateId?N.EntityBaseFormType.Edit:N.EntityBaseFormType.Create),y=o.reactive({fields:{cert:"",key:"",certAlt:"",keyAlt:"",snis:[""],tags:""},isReadonly:!1,errorMessage:""}),q=o.reactive({cert:"",key:"",certAlt:"",keyAlt:"",snis:[""],tags:""}),O=o.computed(()=>(b.value===N.EntityBaseFormType.Create||JSON.stringify(y.fields)!==JSON.stringify(q))&&!!y.fields.cert&&!!y.fields.key),d=M=>{var C,T;y.fields.cert=(M==null?void 0:M.cert)||"",y.fields.key=(M==null?void 0:M.key)||"",y.fields.certAlt=(M==null?void 0:M.cert_alt)||"",y.fields.keyAlt=(M==null?void 0:M.key_alt)||"",y.fields.snis=(C=M==null?void 0:M.snis)!=null&&C.length?M.snis:[""],y.fields.tags=((T=M==null?void 0:M.tags)==null?void 0:T.join(", "))||"",Object.assign(q,y.fields)},g=()=>{n.push(i.config.cancelRoute)},S=()=>{y.fields.snis.push("")},w=M=>{y.fields.snis.splice(M,1)},E=o.computed(()=>{var C,T;let M=`${i.config.apiBaseUrl}${ui.form[i.config.app].validate}`;return i.config.app==="konnect"?M=M.replace(/{controlPlaneId}/gi,((C=i.config)==null?void 0:C.controlPlaneId)||""):i.config.app==="kongManager"&&(M=M.replace(/\/{workspace}/gi,(T=i.config)!=null&&T.workspace?`/${i.config.workspace}`:"")),M=M.replace(/{id}/gi,i.certificateId),M}),k=o.computed(()=>{var C,T;let M=`${i.config.apiBaseUrl}${ui.form[i.config.app][b.value]}`;return i.config.app==="konnect"?M=M.replace(/{controlPlaneId}/gi,((C=i.config)==null?void 0:C.controlPlaneId)||""):i.config.app==="kongManager"&&(M=M.replace(/\/{workspace}/gi,(T=i.config)!=null&&T.workspace?`/${i.config.workspace}`:"")),M=M.replace(/{id}/gi,i.certificateId),M}),I=o.computed(()=>{var M,C;return{cert:y.fields.cert,key:y.fields.key,cert_alt:y.fields.certAlt||null,key_alt:y.fields.keyAlt||null,...i.showSnisField?{snis:y.fields.snis.filter(Boolean)}:{},tags:(C=(M=y.fields.tags.split(","))==null?void 0:M.map(T=>String(T||"").trim()))==null?void 0:C.filter(T=>T!=="")}}),W=async()=>{var M,C,T,me,ae,ut,fe,pe,Ee;try{y.isReadonly=!0;let ee;await f.post(E.value,I.value),b.value==="create"?ee=await f.post(k.value,I.value):b.value==="edit"&&(ee=((M=i.config)==null?void 0:M.app)==="konnect"?await f.put(k.value,I.value):await f.patch(k.value,I.value)),y.fields.cert=((C=ee==null?void 0:ee.data)==null?void 0:C.cert)||"",y.fields.key=((T=ee==null?void 0:ee.data)==null?void 0:T.key)||"",y.fields.certAlt=((me=ee==null?void 0:ee.data)==null?void 0:me.cert_alt)||"",y.fields.keyAlt=((ae=ee==null?void 0:ee.data)==null?void 0:ae.key_alt)||"",y.fields.snis=(fe=(ut=ee==null?void 0:ee.data)==null?void 0:ut.snis)!=null&&fe.length?ee.data.snis:[""],y.fields.tags=((Ee=(pe=ee==null?void 0:ee.data)==null?void 0:pe.tags)==null?void 0:Ee.join(", "))||"",Object.assign(q,y.fields),t("update",ee==null?void 0:ee.data)}catch(ee){y.errorMessage=u(ee),t("error",ee)}finally{y.isReadonly=!1}};return(M,C)=>{const T=o.resolveComponent("KTextArea"),me=o.resolveComponent("KInput");return o.openBlock(),o.createElementBlock("div",up,[o.createVNode(o.unref(N.EntityBaseForm),{"can-submit":O.value,config:r.config,"edit-id":r.certificateId,"entity-type":o.unref(N.SupportedEntityType).Certificate,"error-message":y.errorMessage,"fetch-url":p.value,"form-fields":I.value,"is-readonly":y.isReadonly,onCancel:g,"onFetch:error":C[7]||(C[7]=ae=>M.$emit("error",ae)),"onFetch:success":d,onLoading:C[8]||(C[8]=ae=>M.$emit("loading",ae)),onSubmit:W},{default:o.withCtx(()=>[o.createVNode(o.unref(N.EntityFormSection),{description:o.unref(c)("certificates.form.sections.ssl.description"),title:o.unref(c)("certificates.form.sections.ssl.title")},{default:o.withCtx(()=>[o.createVNode(T,{modelValue:y.fields.cert,"onUpdate:modelValue":C[0]||(C[0]=ae=>y.fields.cert=ae),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-cert",label:o.unref(c)("certificates.form.fields.cert.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},readonly:y.isReadonly,required:""},{"label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(s),{keypath:"certificates.form.fields.cert.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("em",null,o.toDisplayString(o.unref(c)("certificates.form.fields.cert.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),o.createVNode(T,{modelValue:y.fields.key,"onUpdate:modelValue":C[1]||(C[1]=ae=>y.fields.key=ae),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-key",label:o.unref(c)("certificates.form.fields.key.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},readonly:y.isReadonly,required:""},{"label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(s),{keypath:"certificates.form.fields.key.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("em",null,o.toDisplayString(o.unref(c)("certificates.form.fields.key.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),o.createVNode(T,{modelValue:y.fields.certAlt,"onUpdate:modelValue":C[2]||(C[2]=ae=>y.fields.certAlt=ae),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-cert-alt",label:o.unref(c)("certificates.form.fields.cert_alt.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},readonly:y.isReadonly},{"label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(s),{keypath:"certificates.form.fields.cert_alt.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("em",null,o.toDisplayString(o.unref(c)("certificates.form.fields.cert_alt.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),o.createVNode(T,{modelValue:y.fields.keyAlt,"onUpdate:modelValue":C[3]||(C[3]=ae=>y.fields.keyAlt=ae),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-key-alt",label:o.unref(c)("certificates.form.fields.key_alt.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},readonly:y.isReadonly},{"label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(s),{keypath:"certificates.form.fields.key_alt.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("em",null,o.toDisplayString(o.unref(c)("certificates.form.fields.key_alt.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),r.showSnisField&&r.config.sniListRoute?(o.openBlock(),o.createBlock(lp,{key:0,modelValue:y.fields.snis,"onUpdate:modelValue":C[4]||(C[4]=ae=>y.fields.snis=ae),"is-editing":b.value===o.unref(N.EntityBaseFormType).Edit,"sni-list-route":r.config.sniListRoute,onAdd:S,onRemove:C[5]||(C[5]=ae=>w(ae))},null,8,["modelValue","is-editing","sni-list-route"])):o.createCommentVNode("",!0)]),_:1},8,["description","title"]),o.createVNode(o.unref(N.EntityFormSection),{description:o.unref(c)("certificates.form.sections.general.description"),title:o.unref(c)("certificates.form.sections.general.title")},{default:o.withCtx(()=>[o.createVNode(me,{modelValue:y.fields.tags,"onUpdate:modelValue":C[6]||(C[6]=ae=>y.fields.tags=ae),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"certificate-form-tags",help:o.unref(c)("certificates.form.fields.tags.help"),label:o.unref(c)("certificates.form.fields.tags.label"),"label-attributes":{info:o.unref(c)("certificates.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:o.unref(c)("certificates.form.fields.tags.placeholder"),readonly:y.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-7988c8e6"]]),Zn="/v2/control-planes/{controlPlaneId}/core-entities",Qn="/{workspace}",fi={list:{konnect:`${Zn}/ca_certificates`,kongManager:`${Qn}/ca_certificates`},form:{konnect:{create:`${Zn}/ca_certificates`,edit:`${Zn}/ca_certificates/{id}`,validate:`${Zn}/v1/schemas/json/ca-certificate/validate`},kongManager:{create:`${Qn}/ca_certificates`,edit:`${Qn}/ca_certificates/{id}`,validate:`${Qn}/schemas/ca_certificates/validate`}}},dp={class:"kong-ui-ca-certificate-entity-config-card"},pp={key:0},hp=tr(o.defineComponent({__name:"CACertificateConfigCard",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||r.app==="konnect"&&!r.controlPlaneId||r.app==="kongManager"&&typeof r.workspace!="string"||!r.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(r,{emit:e}){const t=["dns_names","san_names","subject"],i=e,n=r,{i18n:{t:s,formatUnixTimeStamp:c}}=Xe.useI18n(),{convertKeyToTitle:u}=N.useStringHelpers(),{getPropValue:f}=N.useHelpers(),{getCertificateData:p}=Xe.useCertificate(),b=o.computed(()=>fi.form[n.config.app].edit),y=o.ref(),q=o.computed(()=>{if(y.value)return p(y.value)}),O=o.computed(()=>{var k;return((k=q.value)==null?void 0:k.schemaIssuer)||""}),d=o.computed(()=>{var k,I;return(k=q.value)!=null&&k.schemaExpiry?c((I=q.value)==null?void 0:I.schemaExpiry):""}),g=o.computed(()=>{var k;return((k=q.value)==null?void 0:k.schemaKeyUsages)||[]}),S=(k,I)=>{const W=f("rowValue",I);if(k==="expiry")return d.value;if(k==="key_usages")return g.value;if(W)return W[k]},w=k=>{y.value=k,i("fetch:success",k)},E=o.ref({id:{},updated_at:{},created_at:{},cert:{section:N.ConfigurationSchemaSection.Basic,label:s("ca-certificates.form.fields.cert.label"),tooltip:s("ca-certificates.form.fields.cert.tooltip"),order:5},cert_digest:{section:N.ConfigurationSchemaSection.Basic,label:s("ca-certificates.form.fields.cert_digest.label"),tooltip:s("ca-certificates.form.fields.cert_digest.tooltip"),order:6},metadata:{section:N.ConfigurationSchemaSection.Basic,type:N.ConfigurationSchemaType.Json,order:7},...n.config.app==="kongManager"&&{expiry:{label:s("certificates.list.table_headers.expiry"),section:N.ConfigurationSchemaSection.Basic,order:1.7,forceShow:!0},issuer:{section:N.ConfigurationSchemaSection.Basic,order:1.5,forceShow:!0},key_usages:{section:N.ConfigurationSchemaSection.Basic,forceShow:!0}},tags:{tooltip:s("ca-certificates.form.fields.tags.tooltip")}});return(k,I)=>{const W=o.resolveComponent("KCodeBlock"),se=o.resolveComponent("KLabel"),M=o.resolveComponent("KBadge");return o.openBlock(),o.createElementBlock("div",dp,[o.createVNode(o.unref(N.EntityBaseConfigCard),{config:r.config,"config-card-doc":r.configCardDoc,"config-schema":E.value,"entity-type":o.unref(N.SupportedEntityType).CaCertificate,"fetch-url":b.value,"hide-title":r.hideTitle,"onFetch:error":I[0]||(I[0]=C=>k.$emit("fetch:error",C)),"onFetch:success":w,onLoading:I[1]||(I[1]=C=>k.$emit("loading",C))},{cert:o.withCtx(C=>[o.unref(f)("rowValue",C)?(o.openBlock(),o.createBlock(W,{key:0,id:`ca-cert-${r.config.entityId}-cert-codeblock`,code:o.unref(f)("rowValue",C),language:"plaintext","single-line":""},null,8,["id","code"])):o.createCommentVNode("",!0)]),"metadata-label":o.withCtx(()=>[o.createVNode(se,{class:"metadata-label"},{default:o.withCtx(()=>I[2]||(I[2]=[o.createTextVNode(" Metadata ")])),_:1})]),metadata:o.withCtx(C=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.keys(o.unref(f)("rowValue",C)).filter(T=>!t.includes(T)),T=>(o.openBlock(),o.createBlock(o.unref(N.ConfigCardItem),{key:T,"data-testid":`ca-cert-metadata-${T}`,item:{key:T,label:o.unref(u)(T),value:S(T,C),type:T==="key_usages"?o.unref(N.ConfigurationSchemaType).BadgeTag:o.unref(N.ConfigurationSchemaType).Text}},null,8,["data-testid","item"]))),128))]),expiry:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(d.value||"–"),1)]),issuer:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.value||"–"),1)]),key_usages:o.withCtx(()=>[g.value.length?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",pp,o.toDisplayString("–"))),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(C,T)=>(o.openBlock(),o.createBlock(M,{key:`key_usages-badge-tag-${T}`,class:"config-badge","data-testid":`key_usages-badge-tag-${T}`,tooltip:C,"truncation-tooltip":""},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(C),1)]),_:2},1032,["data-testid","tooltip"]))),128))]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])])}}}),[["__scopeId","data-v-03b2633e"]]),yp={class:"kong-ui-entities-ca-certificates-list"},gp={class:"button-row"},mp={class:"empty-state-icon-gateway"},bp={key:0},vp={key:1},wp={key:0},Sp={key:1},Ap=tr(o.defineComponent({__name:"CACertificateList",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||!r.createRoute||!r.getViewRoute||!r.getEditRoute||r.app==="kongManager"&&!r.isExactMatch&&!r.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(r,{emit:e}){var Rt;const t=e,i=r,{i18n:{t:n,formatUnixTimeStamp:s},i18nT:c}=Xe.useI18n(),u=hi.useRouter(),{axiosInstance:f}=N.useAxios((Rt=i.config)==null?void 0:Rt.axiosRequestConfig),{hasRecords:p,handleStateChange:b}=N.useTableState(()=>w.value),y=o.computed(()=>p.value&&i.config.app==="konnect"),q=o.computed(()=>!i.enableV2EmptyStates&&i.config.app==="konnect"),O=o.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),g={issuer:{label:n("ca-certificates.list.table_headers.issuer"),hidable:!1},expiry:{label:n("ca-certificates.list.table_headers.expiry")},tags:{label:n("ca-certificates.list.table_headers.tags"),sortable:!0}},S=o.computed(()=>{var D,J;let Z=`${i.config.apiBaseUrl}${fi.list[i.config.app]}`;return i.config.app==="konnect"?Z=Z.replace(/{controlPlaneId}/gi,((D=i.config)==null?void 0:D.controlPlaneId)||""):i.config.app==="kongManager"&&(Z=Z.replace(/\/{workspace}/gi,(J=i.config)!=null&&J.workspace?`/${i.config.workspace}`:"")),Z}),w=o.ref(""),E=o.computed(()=>{const Z=i.config.app==="konnect"||i.config.isExactMatch;return Z?{isExactMatch:Z,placeholder:n("ca-certificates.search.placeholder")}:{isExactMatch:Z,schema:i.config.filterSchema}}),{fetcher:k,fetcherState:I,fetcherCacheKey:W}=N.useFetcher({...i.config,cacheIdentifier:i.cacheIdentifier},S.value),se=()=>{w.value=""},M=()=>{W.value++},C=o.ref(null),T=async(Z,D)=>{const J=Z.id;if(!await D(J)){t("copy:error",{entity:Z,field:"id",message:n("ca-certificates.errors.copy")});return}t("copy:success",{entity:Z,field:"id",message:n("ca-certificates.copy.success",{val:J})})},me=async(Z,D)=>{const J=JSON.stringify(Z);if(!await D(J)){t("copy:error",{entity:Z,message:n("ca-certificates.errors.copy")});return}t("copy:success",{entity:Z,message:n("ca-certificates.copy.success_brief")})},ae=async Z=>{var J;await((J=i.canRetrieve)==null?void 0:J.call(i,Z))&&u.push(i.config.getViewRoute(Z.id))},ut=Z=>({label:n("ca-certificates.actions.view"),to:i.config.getViewRoute(Z)}),fe=Z=>({label:n("ca-certificates.actions.edit"),to:i.config.getEditRoute(Z)}),pe=o.ref(void 0),Ee=o.ref(!1),ee=o.ref(!1),ft=o.ref(""),rr=N.useDeleteUrlBuilder(i.config,S.value),{certificateDataCache:Tr,getCertificateData:Pt}=Xe.useCertificate(),Ct=Z=>{pe.value=Z,Ee.value=!0},z=()=>{Ee.value=!1},dt=async()=>{var Z,D,J;if((Z=pe.value)!=null&&Z.id){ee.value=!0;try{await f.delete(rr(pe.value.id)),ee.value=!1,Ee.value=!1,W.value++,t("delete:success",pe.value)}catch(Q){ft.value=((J=(D=Q.response)==null?void 0:D.data)==null?void 0:J.message)||Q.message||n("ca-certificates.errors.delete"),t("error",Q)}finally{ee.value=!1}}},di=()=>{u.push(i.config.createRoute)};o.watch(I,Z=>{var D,J,Q;if(Z.status===N.FetcherStatus.Error){C.value={title:n("ca-certificates.errors.general")},(Q=(J=(D=Z.error)==null?void 0:D.response)==null?void 0:J.data)!=null&&Q.message&&(C.value.message=Z.error.response.data.message),t("error",Z.error);return}Tr.value={},C.value=null});const le=o.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${n("ca-certificates.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:n("ca-certificates.title")});return o.onBeforeMount(async()=>{await i.canCreate()&&(le.value.title=n("ca-certificates.list.empty_state.title"),le.value.ctaText=n("ca-certificates.actions.create"))}),(Z,D)=>{const J=o.resolveComponent("KButton"),Q=o.resolveComponent("KDropdownItem"),$e=o.resolveComponent("KClipboardProvider");return o.openBlock(),o.createElementBlock("div",yp,[o.createVNode(o.unref(N.EntityBaseTable),{"cache-identifier":r.cacheIdentifier,"disable-sorting":O.value,"empty-state-options":le.value,"enable-entity-actions":"","error-message":C.value,fetcher:o.unref(k),"fetcher-cache-key":o.unref(W),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-ca-certificates-list",query:w.value,"table-headers":o.unref(g),onClearSearchInput:se,"onClick:row":D[4]||(D[4]=Y=>ae(Y)),onSort:M,onState:o.unref(b)},o.createSlots({"toolbar-filter":o.withCtx(()=>[o.createVNode(o.unref(N.EntityFilter),{modelValue:w.value,"onUpdate:modelValue":D[0]||(D[0]=Y=>w.value=Y),config:E.value},null,8,["modelValue","config"])]),"toolbar-button":o.withCtx(()=>[(o.openBlock(),o.createBlock(o.Teleport,{disabled:!r.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[o.createElementVNode("div",gp,[y.value?(o.openBlock(),o.createBlock(J,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"ca-certificates-learn-more-button",icon:"",onClick:D[1]||(D[1]=Y=>Z.$emit("click:learn-more"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.BookIcon),{decorative:""})]),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canCreate()},{default:o.withCtx(()=>[o.createVNode(J,{appearance:"primary","data-testid":"toolbar-add-ca-certificate",size:r.useActionOutside?"medium":"large",to:r.config.createRoute},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.AddIcon)),o.createTextVNode(" "+o.toDisplayString(o.unref(n)("ca-certificates.list.toolbar_actions.new_ca_certificate")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),issuer:o.withCtx(({row:Y})=>{var Ce;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("b",bp,o.toDisplayString((Ce=Y==null?void 0:Y.metadata)!=null&&Ce.issuer?Y.metadata.issuer:"-"),1)):(o.openBlock(),o.createElementBlock("b",vp,o.toDisplayString(o.unref(Pt)(Y).schemaIssuer||"-"),1))]}),expiry:o.withCtx(({row:Y})=>{var Ce;return[r.config.app==="konnect"?(o.openBlock(),o.createElementBlock("span",wp,o.toDisplayString((Ce=Y==null?void 0:Y.metadata)!=null&&Ce.expiry?o.unref(s)(Y.metadata.expiry):"-"),1)):(o.openBlock(),o.createElementBlock("span",Sp,o.toDisplayString(o.unref(Pt)(Y).schemaExpiry?o.unref(s)(o.unref(Pt)(Y).schemaExpiry):"-"),1))]}),tags:o.withCtx(({row:Y})=>[o.createVNode(o.unref(N.TableTags),{tags:Y==null?void 0:Y.tags},null,8,["tags"])]),actions:o.withCtx(({row:Y})=>[o.createVNode($e,null,{default:o.withCtx(({copyToClipboard:Ce})=>[o.createVNode(Q,{"data-testid":"action-entity-copy-id",onClick:G=>T(Y,Ce)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("ca-certificates.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode($e,null,{default:o.withCtx(({copyToClipboard:Ce})=>[o.createVNode(Q,{"data-testid":"action-entity-copy-json",onClick:G=>me(Y,Ce)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("ca-certificates.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canRetrieve(Y)},{default:o.withCtx(()=>[o.createVNode(Q,{"data-testid":"action-entity-view","has-divider":"",item:ut(Y.id)},null,8,["item"])]),_:2},1032,["auth-function"]),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canEdit(Y)},{default:o.withCtx(()=>[o.createVNode(Q,{"data-testid":"action-entity-edit",item:fe(Y.id)},null,8,["item"])]),_:2},1032,["auth-function"]),o.createVNode(o.unref(N.PermissionsWrapper),{"auth-function":()=>r.canDelete(Y)},{default:o.withCtx(()=>[o.createVNode(Q,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Ce=>Ct(Y)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("ca-certificates.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!o.unref(p)&&q.value?{name:"outside-actions",fn:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.Teleport,{disabled:!r.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[o.createVNode(J,{appearance:"secondary",class:"open-learning-hub","data-testid":"ca-certificates-learn-more-button",icon:"",onClick:D[2]||(D[2]=Y=>Z.$emit("click:learn-more"))},{default:o.withCtx(()=>[o.createVNode(o.unref(tt.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!w.value&&r.enableV2EmptyStates&&r.config.app==="konnect"?{name:"empty-state",fn:o.withCtx(()=>{var Y;return[o.createVNode(o.unref(N.EntityEmptyState),{"action-button-text":o.unref(n)("ca-certificates.list.empty_state_v2.create"),appearance:"secondary","can-create":()=>r.canCreate(),"data-testid":"ca-certificates-entity-empty-state",description:o.unref(n)("ca-certificates.list.empty_state_v2.description"),"learn-more":r.config.app==="konnect",title:o.unref(n)("ca-certificates.list.empty_state_v2.title"),"onClick:create":di,"onClick:learnMore":D[3]||(D[3]=Ce=>Z.$emit("click:learn-more"))},o.createSlots({image:o.withCtx(()=>[o.createElementVNode("div",mp,[o.createVNode(o.unref(tt.ServiceDocumentIcon),{color:o.unref(Aa),size:o.unref(ka)},null,8,["color","size"])])]),_:2},[(Y=r.config)!=null&&Y.isControlPlaneGroup?{name:"message",fn:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("ca-certificates.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),o.createVNode(o.unref(N.EntityDeleteModal),{"action-pending":ee.value,"entity-type":o.unref(N.EntityTypes).CACertificate,error:ft.value,title:o.unref(n)("ca-certificates.delete.title"),visible:Ee.value,onCancel:z,onProceed:dt},{description:o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"ca-certificates.delete.description",scope:"global"},{"bolded-text":o.withCtx(()=>[o.createElementVNode("b",null,o.toDisplayString(o.unref(n)("ca-certificates.delete.boldedText")),1)]),_:1}),o.createElementVNode("p",null,o.toDisplayString(o.unref(n)("ca-certificates.delete.description2")),1)]),_:1},8,["action-pending","entity-type","error","title","visible"])])}}}),[["__scopeId","data-v-b92930c0"]]),kp={class:"kong-ui-entities-ca-certificates-form"},Cp=tr(o.defineComponent({__name:"CACertificateForm",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||r.app==="konnect"&&!r.controlPlaneId||r.app==="kongManager"&&typeof r.workspace!="string"||!r.cancelRoute)},certificateId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(r,{emit:e}){var k;const t=e,i=r,n=hi.useRouter(),{i18n:{t:s}}=Xe.useI18n(),{getMessageFromError:c}=N.useErrors(),{axiosInstance:u}=N.useAxios((k=i.config)==null?void 0:k.axiosRequestConfig),f=o.computed(()=>fi.form[i.config.app].edit),p=o.computed(()=>i.certificateId?N.EntityBaseFormType.Edit:N.EntityBaseFormType.Create),b=o.reactive({fields:{cert:"",certDigest:"",tags:""},isReadonly:!1,errorMessage:""}),y=o.reactive({cert:"",certDigest:"",tags:""}),q=o.computed(()=>(p.value===N.EntityBaseFormType.Create||JSON.stringify(b.fields)!==JSON.stringify(y))&&!!b.fields.cert),O=I=>{var W;b.fields.cert=(I==null?void 0:I.cert)||"",b.fields.certDigest=(I==null?void 0:I.cert_digest)||"",b.fields.tags=((W=I==null?void 0:I.tags)==null?void 0:W.join(", "))||"",Object.assign(y,b.fields)},d=()=>{n.push(i.config.cancelRoute)},g=o.computed(()=>{var W,se;let I=`${i.config.apiBaseUrl}${fi.form[i.config.app].validate}`;return i.config.app==="konnect"?I=I.replace(/{controlPlaneId}/gi,((W=i.config)==null?void 0:W.controlPlaneId)||""):i.config.app==="kongManager"&&(I=I.replace(/\/{workspace}/gi,(se=i.config)!=null&&se.workspace?`/${i.config.workspace}`:"")),I=I.replace(/{id}/gi,i.certificateId),I}),S=o.computed(()=>{var W,se;let I=`${i.config.apiBaseUrl}${fi.form[i.config.app][p.value]}`;return i.config.app==="konnect"?I=I.replace(/{controlPlaneId}/gi,((W=i.config)==null?void 0:W.controlPlaneId)||""):i.config.app==="kongManager"&&(I=I.replace(/\/{workspace}/gi,(se=i.config)!=null&&se.workspace?`/${i.config.workspace}`:"")),I=I.replace(/{id}/gi,i.certificateId),I}),w=o.computed(()=>{var I,W;return{cert:b.fields.cert,cert_digest:b.fields.certDigest||null,tags:(W=(I=b.fields.tags.split(","))==null?void 0:I.map(se=>String(se||"").trim()))==null?void 0:W.filter(se=>se!=="")}}),E=async()=>{var I,W,se,M,C;try{b.isReadonly=!0;let T;await u.post(g.value,w.value),p.value==="create"?T=await u.post(S.value,w.value):p.value==="edit"&&(T=((I=i.config)==null?void 0:I.app)==="konnect"?await u.put(S.value,w.value):await u.patch(S.value,w.value)),b.fields.cert=((W=T==null?void 0:T.data)==null?void 0:W.cert)||"",b.fields.certDigest=((se=T==null?void 0:T.data)==null?void 0:se.cert_digest)||"",b.fields.tags=((C=(M=T==null?void 0:T.data)==null?void 0:M.tags)==null?void 0:C.join(", "))||"",Object.assign(y,b.fields),t("update",T==null?void 0:T.data)}catch(T){b.errorMessage=c(T),t("error",T)}finally{b.isReadonly=!1}};return(I,W)=>{const se=o.resolveComponent("KTextArea"),M=o.resolveComponent("KInput");return o.openBlock(),o.createElementBlock("div",kp,[o.createVNode(o.unref(N.EntityBaseForm),{"can-submit":q.value,config:r.config,"edit-id":r.certificateId,"entity-type":o.unref(N.SupportedEntityType).CaCertificate,"error-message":b.errorMessage,"fetch-url":f.value,"form-fields":w.value,"is-readonly":b.isReadonly,onCancel:d,"onFetch:error":W[3]||(W[3]=C=>I.$emit("error",C)),"onFetch:success":O,onLoading:W[4]||(W[4]=C=>I.$emit("loading",C)),onSubmit:E},{default:o.withCtx(()=>[o.createVNode(o.unref(N.EntityFormSection),{description:o.unref(s)("ca-certificates.form.sections.cert.description"),title:o.unref(s)("ca-certificates.form.sections.cert.title")},{default:o.withCtx(()=>[o.createVNode(se,{modelValue:b.fields.cert,"onUpdate:modelValue":W[0]||(W[0]=C=>b.fields.cert=C),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"ca-certificate-form-cert",label:o.unref(s)("ca-certificates.form.fields.cert.label"),"label-attributes":{info:o.unref(s)("ca-certificates.form.fields.cert.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:b.isReadonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),o.createVNode(M,{modelValue:b.fields.certDigest,"onUpdate:modelValue":W[1]||(W[1]=C=>b.fields.certDigest=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"ca-certificate-form-cert-digest",label:o.unref(s)("ca-certificates.form.fields.cert_digest.label"),readonly:b.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])]),_:1},8,["description","title"]),o.createVNode(o.unref(N.EntityFormSection),{description:o.unref(s)("ca-certificates.form.sections.general.description"),title:o.unref(s)("ca-certificates.form.sections.general.title")},{default:o.withCtx(()=>[o.createVNode(M,{modelValue:b.fields.tags,"onUpdate:modelValue":W[2]||(W[2]=C=>b.fields.tags=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"ca-certificate-form-tags",help:o.unref(s)("ca-certificates.form.fields.tags.help"),label:o.unref(s)("ca-certificates.form.fields.tags.label"),"label-attributes":{info:o.unref(s)("ca-certificates.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:o.unref(s)("ca-certificates.form.fields.tags.placeholder"),readonly:b.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-a850d9bb"]]),xp={class:"kong-ui-certificate-entity-config-card"},Bp={key:0},Ep=tr(o.defineComponent({__name:"CertificateConfigCard",props:{config:{type:Object,required:!0,validator:r=>!(!r||!["konnect","kongManager"].includes(r==null?void 0:r.app)||r.app==="konnect"&&!r.controlPlaneId||r.app==="kongManager"&&typeof r.workspace!="string"||!r.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(r,{emit:e}){const t=e,i=r,{i18n:{t:n,formatUnixTimeStamp:s},i18nT:c}=Xe.useI18n(),{convertKeyToTitle:u}=N.useStringHelpers(),{getPropValue:f}=N.useHelpers(),{getCertificateData:p}=Xe.useCertificate(),b=o.computed(()=>ui.form[i.config.app].edit),y=o.ref(),q=o.ref({id:{},cert:{section:N.ConfigurationSchemaSection.Basic},key:{section:N.ConfigurationSchemaSection.Basic,type:N.ConfigurationSchemaType.Redacted},metadata:{section:N.ConfigurationSchemaSection.Basic,type:N.ConfigurationSchemaType.Json},snis:{section:N.ConfigurationSchemaSection.Basic,type:N.ConfigurationSchemaType.BadgeTag,label:n("certificates.list.table_headers.snis")},updated_at:{},created_at:{},tags:{tooltip:n("certificates.form.fields.tags.tooltip")},...i.config.app==="kongManager"&&{expiry:{section:N.ConfigurationSchemaSection.Basic,label:n("certificates.list.table_headers.expiry"),forceShow:!0},issuer:{section:N.ConfigurationSchemaSection.Basic,label:n("certificates.list.table_headers.issuer"),forceShow:!0},san_names:{section:N.ConfigurationSchemaSection.Basic,label:n("certificates.list.table_headers.san"),forceShow:!0},subject:{section:N.ConfigurationSchemaSection.Basic,label:n("certificates.list.table_headers.subject"),forceShow:!0},key_usages:{forceShow:!0}},cert_alt:{section:N.ConfigurationSchemaSection.Advanced},key_alt:{section:N.ConfigurationSchemaSection.Advanced,type:N.ConfigurationSchemaType.Redacted}}),O=C=>{y.value=C,t("fetch:success",C)},d=(C,T)=>{const me=f("rowValue",T);if(C==="expiry")return S.value;if(C==="key_usages")return I.value;if(C==="san_names")return E.value;if(me)return me[C]},g=o.computed(()=>{if(y.value)return p(y.value)}),S=o.computed(()=>{var C,T;return(C=g.value)!=null&&C.schemaExpiry?s((T=g.value)==null?void 0:T.schemaExpiry):""}),w=o.computed(()=>{var C;return((C=g.value)==null?void 0:C.schemaIssuer)||""}),E=o.computed(()=>{var C;return((C=g.value)==null?void 0:C.schemaSanNames)||""}),k=o.computed(()=>{var C;return((C=g.value)==null?void 0:C.schemaSubject)||""}),I=o.computed(()=>{var C;return((C=g.value)==null?void 0:C.schemaKeyUsages)||[]}),W=o.computed(()=>{var C,T;return((T=(C=y==null?void 0:y.value)==null?void 0:C.snis)==null?void 0:T.length)>0}),se=o.computed(()=>{var C;return!!((C=y==null?void 0:y.value)!=null&&C.cert_alt)}),M=C=>{var T,me;return C==="san_names"?n("certificates.list.table_headers.san"):((me=(T=q.value)==null?void 0:T[C])==null?void 0:me.label)||u(C)};return(C,T)=>{const me=o.resolveComponent("KCodeBlock"),ae=o.resolveComponent("KLabel"),ut=o.resolveComponent("KBadge");return o.openBlock(),o.createElementBlock("div",xp,[o.createVNode(o.unref(N.EntityBaseConfigCard),{config:r.config,"config-card-doc":r.configCardDoc,"config-schema":q.value,"entity-type":o.unref(N.SupportedEntityType).Certificate,"fetch-url":b.value,"hide-title":r.hideTitle,"onFetch:error":T[0]||(T[0]=fe=>C.$emit("fetch:error",fe)),"onFetch:success":O,onLoading:T[1]||(T[1]=fe=>C.$emit("loading",fe))},o.createSlots({"cert-label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.form.fields.cert.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("i",null,o.toDisplayString(o.unref(n)("certificates.form.fields.cert.emphasis")),1)]),_:1})]),cert:o.withCtx(fe=>[o.unref(f)("rowValue",fe)?(o.openBlock(),o.createBlock(me,{key:0,id:`certificate-${r.config.entityId}-cert-codeblock`,code:o.unref(f)("rowValue",fe),language:"plaintext","single-line":""},null,8,["id","code"])):o.createCommentVNode("",!0)]),"key-label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.form.fields.key.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("i",null,o.toDisplayString(o.unref(n)("certificates.form.fields.key.emphasis")),1)]),_:1})]),"metadata-label":o.withCtx(()=>[o.createVNode(ae,{class:"metadata-label"},{default:o.withCtx(()=>T[2]||(T[2]=[o.createTextVNode(" Metadata ")])),_:1})]),metadata:o.withCtx(fe=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.keys(o.unref(f)("rowValue",fe)),pe=>(o.openBlock(),o.createBlock(o.unref(N.ConfigCardItem),{key:pe,item:{key:pe,value:d(pe,fe),label:M(pe),type:pe==="key_usages"||pe==="snis"||pe==="dns_names"?o.unref(N.ConfigurationSchemaType).BadgeTag:o.unref(N.ConfigurationSchemaType).Text}},null,8,["item"]))),128))]),expiry:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(S.value||"–"),1)]),issuer:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.value||"–"),1)]),san_names:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(E.value||"–"),1)]),subject:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(k.value||"–"),1)]),"cert_alt-label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.form.fields.cert_alt.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("i",null,o.toDisplayString(o.unref(n)("certificates.form.fields.cert_alt.emphasis")),1)]),_:1})]),"key_alt-label-tooltip":o.withCtx(()=>[o.createVNode(o.unref(c),{keypath:"certificates.form.fields.key_alt.tooltip",scope:"global"},{emphasis:o.withCtx(()=>[o.createElementVNode("i",null,o.toDisplayString(o.unref(n)("certificates.form.fields.key_alt.emphasis")),1)]),_:1})]),key_usages:o.withCtx(()=>[I.value.length?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Bp,o.toDisplayString("–"))),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.value,(fe,pe)=>(o.openBlock(),o.createBlock(ut,{key:`key_usages-badge-tag-${pe}`,class:"config-badge","data-testid":`key_usages-badge-tag-${pe}`,tooltip:fe,"truncation-tooltip":""},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(fe),1)]),_:2},1032,["data-testid","tooltip"]))),128))]),_:2},[W.value?void 0:{name:"snis",fn:o.withCtx(()=>[T[3]||(T[3]=o.createTextVNode(" – "))]),key:"0"},se.value?{name:"cert_alt",fn:o.withCtx(fe=>[T[4]||(T[4]=o.createTextVNode(" > ")),o.unref(f)("rowValue",fe)?(o.openBlock(),o.createBlock(me,{key:0,id:`certificate-${r.config.entityId}-cert-alt-codeblock`,code:o.unref(f)("rowValue",fe),language:"plaintext","single-line":""},null,8,["id","code"])):o.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])])}}}),[["__scopeId","data-v-605d185b"]]);xe.CACertificateConfigCard=hp,xe.CACertificateForm=Cp,xe.CACertificateList=Ap,xe.CertificateConfigCard=Ep,xe.CertificateForm=fp,xe.CertificateList=op,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-a19fafa9]{align-items:center;border-bottom:var(--eaabfd90);box-sizing:border-box;display:var(--ea5e332a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a19fafa9]{box-sizing:border-box;padding-right:16px;width:var(--f719ead6)}.config-card-details-row .config-card-details-label label[data-v-a19fafa9]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-a19fafa9]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-a19fafa9]{min-width:0}.config-card-details-row .config-card-details-value[data-v-a19fafa9]{box-sizing:border-box;width:var(--f7155f20)}.config-card-details-row .config-card-details-value .truncated[data-v-a19fafa9]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-a19fafa9]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a19fafa9] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a19fafa9]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-a19fafa9]{margin-right:4px}.config-card-details-row[data-v-a19fafa9] .k-label{margin-bottom:0}.config-card-details-row[data-v-a19fafa9] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a19fafa9] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-be491a0e]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-be491a0e]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-be491a0e]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-be491a0e] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-be491a0e]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-e8247cfa]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-e8247cfa] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-e8247cfa] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-e8247cfa] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-e8247cfa] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-e8247cfa]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-e8247cfa] .k-button:last-of-type,.form-actions[data-v-e8247cfa] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d58db70c]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d58db70c]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d58db70c]{display:none}.kong-ui-entity-base-table[data-v-d58db70c] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-48ae9c8c]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-48ae9c8c]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-48ae9c8c]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-48ae9c8c]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-48ae9c8c]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-48ae9c8c]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-48ae9c8c]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{width:640px}}.button-row[data-v-37a46970]{align-items:center;display:flex;gap:12px}.kong-ui-entities-certificates-list[data-v-37a46970]{width:100%}.kong-ui-entities-certificates-list .kong-ui-entity-filter-input[data-v-37a46970]{margin-right:12px}.sni-field-container .sni-field-input[data-v-543a45f0]{align-items:center;display:flex;gap:24px}.sni-field-container .sni-field-input[data-v-543a45f0]:not(:last-child){margin-bottom:16px}.sni-field-container .sni-field-controls-container[data-v-543a45f0]{display:flex;gap:4px}.kong-ui-entities-certificates-form[data-v-fc596de1],.kong-ui-entities-certificates-form .certificate-form-textarea[data-v-fc596de1]{width:100%}.kong-ui-entities-certificates-form .certificate-form-textarea[data-v-fc596de1] .k-tooltip{max-width:300px}.kong-ui-ca-certificate-entity-config-card[data-v-1d42f61b] .config-badge{margin-right:4px}.kong-ui-ca-certificate-entity-config-card .metadata-label[data-v-1d42f61b]{font-size:16px}.button-row[data-v-88d5c7a2]{align-items:center;display:flex;gap:12px}.kong-ui-entities-ca-certificates-list[data-v-88d5c7a2]{width:100%}.kong-ui-entities-ca-certificates-list .kong-ui-entity-filter-input[data-v-88d5c7a2]{margin-right:12px}.kong-ui-entities-ca-certificates-form[data-v-2a3f488f],.kong-ui-entities-ca-certificates-form .certificate-form-textarea[data-v-2a3f488f]{width:100%}.kong-ui-certificate-entity-config-card[data-v-401d92d6] .config-badge{margin-right:4px}.kong-ui-certificate-entity-config-card .metadata-label[data-v-401d92d6]{font-size:16px}
1
+ .config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-69a1e1d7]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-69a1e1d7]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-69a1e1d7]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-69a1e1d7] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-69a1e1d7]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-b073d014]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-b073d014] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-b073d014] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-b073d014] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-b073d014]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-b073d014] .k-button:last-of-type,.form-actions[data-v-b073d014] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-1cdbe476]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-1cdbe476]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-1cdbe476]{display:none}.kong-ui-entity-base-table[data-v-1cdbe476] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-d1bb74d1]{width:100%}.kong-ui-entity-filter-clear[data-v-d1bb74d1]{cursor:pointer}.kong-ui-entity-filter[data-v-d1bb74d1]{display:flex;position:relative}.kong-ui-entity-filter[data-v-d1bb74d1] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-d1bb74d1] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-d1bb74d1]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-d1bb74d1]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-d1bb74d1]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-d1bb74d1]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-d1bb74d1]{color:#232633}.menu-item-expand-icon[data-v-d1bb74d1]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-d1bb74d1]{transform:rotate(180deg)}.menu-item-indicator[data-v-d1bb74d1]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-d1bb74d1]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-d1bb74d1] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-d1bb74d1] .k-input{width:100%}.menu-item-body[data-v-d1bb74d1] .k-select-input .input{font-size:12px}.menu-item-body[data-v-d1bb74d1] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-d1bb74d1]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-d1bb74d1]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-d1bb74d1]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-b6376b66]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-b6376b66]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-b6376b66] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-b6376b66]{width:640px}}.button-row[data-v-0656bf7a]{align-items:center;display:flex;gap:12px}.kong-ui-entities-certificates-list[data-v-0656bf7a]{width:100%}.kong-ui-entities-certificates-list .kong-ui-entity-filter-input[data-v-0656bf7a]{margin-right:12px}.sni-field-container .sni-field-input[data-v-89e994ac]{align-items:center;display:flex;gap:24px}.sni-field-container .sni-field-input[data-v-89e994ac]:not(:last-child){margin-bottom:16px}.sni-field-container .sni-field-controls-container[data-v-89e994ac]{display:flex;gap:4px}.kong-ui-entities-certificates-form[data-v-7988c8e6],.kong-ui-entities-certificates-form .certificate-form-textarea[data-v-7988c8e6]{width:100%}.kong-ui-entities-certificates-form .certificate-form-textarea[data-v-7988c8e6] .k-tooltip{max-width:300px}.kong-ui-ca-certificate-entity-config-card[data-v-03b2633e] .config-badge{margin-right:4px}.kong-ui-ca-certificate-entity-config-card .metadata-label[data-v-03b2633e]{font-size:16px}.button-row[data-v-b92930c0]{align-items:center;display:flex;gap:12px}.kong-ui-entities-ca-certificates-list[data-v-b92930c0]{width:100%}.kong-ui-entities-ca-certificates-list .kong-ui-entity-filter-input[data-v-b92930c0]{margin-right:12px}.kong-ui-entities-ca-certificates-form[data-v-a850d9bb],.kong-ui-entities-ca-certificates-form .certificate-form-textarea[data-v-a850d9bb]{width:100%}.kong-ui-certificate-entity-config-card[data-v-605d185b] .config-badge{margin-right:4px}.kong-ui-certificate-entity-config-card .metadata-label[data-v-605d185b]{font-size:16px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-certificates",
3
- "version": "3.8.20",
3
+ "version": "3.8.22",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-certificates.umd.js",
6
6
  "module": "./dist/entities-certificates.es.js",
@@ -22,21 +22,21 @@
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@kong/icons": "^1.25.1",
25
- "@kong/kongponents": "^9.29.3",
25
+ "@kong/kongponents": "^9.29.10",
26
26
  "axios": "^1.7.7",
27
27
  "vue": ">= 3.3.13 < 4",
28
28
  "vue-router": "^4.4.5",
29
- "@kong-ui-public/entities-shared": "^3.22.3",
29
+ "@kong-ui-public/entities-shared": "^3.22.5",
30
30
  "@kong-ui-public/i18n": "^2.3.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@kong/design-tokens": "1.17.3",
33
+ "@kong/design-tokens": "1.17.4",
34
34
  "@kong/icons": "^1.25.1",
35
- "@kong/kongponents": "9.29.9",
35
+ "@kong/kongponents": "9.29.10",
36
36
  "axios": "^1.7.7",
37
37
  "vue": "^3.5.13",
38
38
  "vue-router": "^4.4.5",
39
- "@kong-ui-public/entities-shared": "^3.22.3",
39
+ "@kong-ui-public/entities-shared": "^3.22.5",
40
40
  "@kong-ui-public/i18n": "^2.3.0"
41
41
  },
42
42
  "repository": {