@kong-ui-public/entities-plugins 8.4.1 → 8.4.2

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.
@@ -7845,7 +7845,7 @@ const tn = (e) => {
7845
7845
  jwt_secrets: gh
7846
7846
  }, yh = (e) => {
7847
7847
  var i;
7848
- const t = ((i = Ct[e]) == null ? void 0 : i.imageName) || e || "missing", n = new URL((/* @__PURE__ */ Object.assign({ "../assets/images/plugin-icons/acl.png": lf, "../assets/images/plugin-icons/acme.png": cf, "../assets/images/plugin-icons/ai-azure-content-safety.png": uf, "../assets/images/plugin-icons/ai-data-sanitization.png": df, "../assets/images/plugin-icons/ai-prompt-decorator.png": pf, "../assets/images/plugin-icons/ai-prompt-guard.png": gf, "../assets/images/plugin-icons/ai-prompt-template.png": Af, "../assets/images/plugin-icons/ai-proxy-advanced.png": ff, "../assets/images/plugin-icons/ai-proxy.png": mf, "../assets/images/plugin-icons/ai-rate-limiting-advanced.png": hf, "../assets/images/plugin-icons/ai-request-transformer.png": vf, "../assets/images/plugin-icons/ai-response-transformer.png": yf, "../assets/images/plugin-icons/ai-semantic-caching.png": bf, "../assets/images/plugin-icons/ai-semantic-prompt-guard.png": wf, "../assets/images/plugin-icons/app-dynamics.png": Ef, "../assets/images/plugin-icons/application-registration.png": Cf, "../assets/images/plugin-icons/aws-lambda.png": kf, "../assets/images/plugin-icons/azure-functions.png": If, "../assets/images/plugin-icons/basic-auth.png": Of, "../assets/images/plugin-icons/bot-detection.png": Bf, "../assets/images/plugin-icons/canary.png": Mf, "../assets/images/plugin-icons/collector.png": Sf, "../assets/images/plugin-icons/correlation-id.png": xf, "../assets/images/plugin-icons/cors.png": Rf, "../assets/images/plugin-icons/datadog.png": Tf, "../assets/images/plugin-icons/degraphql.png": Lf, "../assets/images/plugin-icons/dynamic-ssl.png": jf, "../assets/images/plugin-icons/exit-transformer.png": Uf, "../assets/images/plugin-icons/file-log.png": Nf, "../assets/images/plugin-icons/forward-proxy.png": Gf, "../assets/images/plugin-icons/graphql-rate-limiting-advanced.png": Pf, "../assets/images/plugin-icons/graphql.png": Df, "../assets/images/plugin-icons/grpc-gateway.png": Yf, "../assets/images/plugin-icons/grpc-web.png": Hf, "../assets/images/plugin-icons/hmac-auth.png": Vf, "../assets/images/plugin-icons/http-log.png": Ff, "../assets/images/plugin-icons/ip-restriction.png": zf, "../assets/images/plugin-icons/jq.png": Kf, "../assets/images/plugin-icons/json-threat-protection.png": qf, "../assets/images/plugin-icons/jwe-decrypt.png": Xf, "../assets/images/plugin-icons/jwt-signer.png": Jf, "../assets/images/plugin-icons/jwt.png": Zf, "../assets/images/plugin-icons/kafka-log.png": Qf, "../assets/images/plugin-icons/kafka-upstream.png": Wf, "../assets/images/plugin-icons/key-auth-enc.png": _f, "../assets/images/plugin-icons/key-auth.png": $f, "../assets/images/plugin-icons/kong-function.png": em, "../assets/images/plugin-icons/kubernetes-sidecar-injector.png": tm, "../assets/images/plugin-icons/ldap-auth-advanced.png": nm, "../assets/images/plugin-icons/ldap-auth.png": im, "../assets/images/plugin-icons/loggly.png": am, "../assets/images/plugin-icons/missing.png": rm, "../assets/images/plugin-icons/mocking.png": sm, "../assets/images/plugin-icons/mtls-auth.png": om, "../assets/images/plugin-icons/new.png": lm, "../assets/images/plugin-icons/oas-validation.png": cm, "../assets/images/plugin-icons/oauth2-introspection.png": um, "../assets/images/plugin-icons/oauth2.png": dm, "../assets/images/plugin-icons/opa.png": pm, "../assets/images/plugin-icons/openid-connect.png": gm, "../assets/images/plugin-icons/opentelemetry.png": Am, "../assets/images/plugin-icons/openwhisk.png": fm, "../assets/images/plugin-icons/prometheus.png": mm, "../assets/images/plugin-icons/proxy-cache.png": hm, "../assets/images/plugin-icons/rate-limiting-advanced.png": vm, "../assets/images/plugin-icons/rate-limiting.png": ym, "../assets/images/plugin-icons/request-size-limiting.png": bm, "../assets/images/plugin-icons/request-termination.png": wm, "../assets/images/plugin-icons/request-transformer-advanced.png": Em, "../assets/images/plugin-icons/request-transformer.png": Cm, "../assets/images/plugin-icons/request-validator.png": km, "../assets/images/plugin-icons/response-ratelimiting.png": Im, "../assets/images/plugin-icons/response-transformer-advanced.png": Om, "../assets/images/plugin-icons/response-transformer.png": Bm, "../assets/images/plugin-icons/route-by-header.png": Mm, "../assets/images/plugin-icons/route-transformer-advanced.png": Sm, "../assets/images/plugin-icons/runscope.png": xm, "../assets/images/plugin-icons/saml.png": Rm, "../assets/images/plugin-icons/session.png": Tm, "../assets/images/plugin-icons/standard-webhooks.png": Lm, "../assets/images/plugin-icons/statsd-advanced.png": jm, "../assets/images/plugin-icons/statsd.png": Um, "../assets/images/plugin-icons/syslog.png": Nm, "../assets/images/plugin-icons/tcp-log.png": Gm, "../assets/images/plugin-icons/tls-handshake-modifier.png": Pm, "../assets/images/plugin-icons/tls-metadata-headers.png": Dm, "../assets/images/plugin-icons/udp-log.png": Ym, "../assets/images/plugin-icons/upstream-timeout.png": Hm, "../assets/images/plugin-icons/upstream-tls.png": Vm, "../assets/images/plugin-icons/vault-auth.png": Fm, "../assets/images/plugin-icons/websocket-size-limit.png": zm, "../assets/images/plugin-icons/websocket-validator.png": Km, "../assets/images/plugin-icons/xml-threat-protection.png": qm, "../assets/images/plugin-icons/zipkin.png": Xm }))[`../assets/images/plugin-icons/${t}.png`], import.meta.url).href;
7848
+ const t = ((i = Ct[e]) == null ? void 0 : i.imageName) || e || "missing", n = new URL((/* @__PURE__ */ Object.assign({ "../assets/images/plugin-icons/acl.png": lf, "../assets/images/plugin-icons/acme.png": cf, "../assets/images/plugin-icons/ai-azure-content-safety.png": uf, "../assets/images/plugin-icons/ai-data-sanitization.png": df, "../assets/images/plugin-icons/ai-prompt-decorator.png": pf, "../assets/images/plugin-icons/ai-prompt-guard.png": gf, "../assets/images/plugin-icons/ai-prompt-template.png": Af, "../assets/images/plugin-icons/ai-proxy-advanced.png": ff, "../assets/images/plugin-icons/ai-proxy.png": mf, "../assets/images/plugin-icons/ai-rate-limiting-advanced.png": hf, "../assets/images/plugin-icons/ai-request-transformer.png": vf, "../assets/images/plugin-icons/ai-response-transformer.png": yf, "../assets/images/plugin-icons/ai-semantic-cache.png": bf, "../assets/images/plugin-icons/ai-semantic-prompt-guard.png": wf, "../assets/images/plugin-icons/app-dynamics.png": Ef, "../assets/images/plugin-icons/application-registration.png": Cf, "../assets/images/plugin-icons/aws-lambda.png": kf, "../assets/images/plugin-icons/azure-functions.png": If, "../assets/images/plugin-icons/basic-auth.png": Of, "../assets/images/plugin-icons/bot-detection.png": Bf, "../assets/images/plugin-icons/canary.png": Mf, "../assets/images/plugin-icons/collector.png": Sf, "../assets/images/plugin-icons/correlation-id.png": xf, "../assets/images/plugin-icons/cors.png": Rf, "../assets/images/plugin-icons/datadog.png": Tf, "../assets/images/plugin-icons/degraphql.png": Lf, "../assets/images/plugin-icons/dynamic-ssl.png": jf, "../assets/images/plugin-icons/exit-transformer.png": Uf, "../assets/images/plugin-icons/file-log.png": Nf, "../assets/images/plugin-icons/forward-proxy.png": Gf, "../assets/images/plugin-icons/graphql-rate-limiting-advanced.png": Pf, "../assets/images/plugin-icons/graphql.png": Df, "../assets/images/plugin-icons/grpc-gateway.png": Yf, "../assets/images/plugin-icons/grpc-web.png": Hf, "../assets/images/plugin-icons/hmac-auth.png": Vf, "../assets/images/plugin-icons/http-log.png": Ff, "../assets/images/plugin-icons/ip-restriction.png": zf, "../assets/images/plugin-icons/jq.png": Kf, "../assets/images/plugin-icons/json-threat-protection.png": qf, "../assets/images/plugin-icons/jwe-decrypt.png": Xf, "../assets/images/plugin-icons/jwt-signer.png": Jf, "../assets/images/plugin-icons/jwt.png": Zf, "../assets/images/plugin-icons/kafka-log.png": Qf, "../assets/images/plugin-icons/kafka-upstream.png": Wf, "../assets/images/plugin-icons/key-auth-enc.png": _f, "../assets/images/plugin-icons/key-auth.png": $f, "../assets/images/plugin-icons/kong-function.png": em, "../assets/images/plugin-icons/kubernetes-sidecar-injector.png": tm, "../assets/images/plugin-icons/ldap-auth-advanced.png": nm, "../assets/images/plugin-icons/ldap-auth.png": im, "../assets/images/plugin-icons/loggly.png": am, "../assets/images/plugin-icons/missing.png": rm, "../assets/images/plugin-icons/mocking.png": sm, "../assets/images/plugin-icons/mtls-auth.png": om, "../assets/images/plugin-icons/new.png": lm, "../assets/images/plugin-icons/oas-validation.png": cm, "../assets/images/plugin-icons/oauth2-introspection.png": um, "../assets/images/plugin-icons/oauth2.png": dm, "../assets/images/plugin-icons/opa.png": pm, "../assets/images/plugin-icons/openid-connect.png": gm, "../assets/images/plugin-icons/opentelemetry.png": Am, "../assets/images/plugin-icons/openwhisk.png": fm, "../assets/images/plugin-icons/prometheus.png": mm, "../assets/images/plugin-icons/proxy-cache.png": hm, "../assets/images/plugin-icons/rate-limiting-advanced.png": vm, "../assets/images/plugin-icons/rate-limiting.png": ym, "../assets/images/plugin-icons/request-size-limiting.png": bm, "../assets/images/plugin-icons/request-termination.png": wm, "../assets/images/plugin-icons/request-transformer-advanced.png": Em, "../assets/images/plugin-icons/request-transformer.png": Cm, "../assets/images/plugin-icons/request-validator.png": km, "../assets/images/plugin-icons/response-ratelimiting.png": Im, "../assets/images/plugin-icons/response-transformer-advanced.png": Om, "../assets/images/plugin-icons/response-transformer.png": Bm, "../assets/images/plugin-icons/route-by-header.png": Mm, "../assets/images/plugin-icons/route-transformer-advanced.png": Sm, "../assets/images/plugin-icons/runscope.png": xm, "../assets/images/plugin-icons/saml.png": Rm, "../assets/images/plugin-icons/session.png": Tm, "../assets/images/plugin-icons/standard-webhooks.png": Lm, "../assets/images/plugin-icons/statsd-advanced.png": jm, "../assets/images/plugin-icons/statsd.png": Um, "../assets/images/plugin-icons/syslog.png": Nm, "../assets/images/plugin-icons/tcp-log.png": Gm, "../assets/images/plugin-icons/tls-handshake-modifier.png": Pm, "../assets/images/plugin-icons/tls-metadata-headers.png": Dm, "../assets/images/plugin-icons/udp-log.png": Ym, "../assets/images/plugin-icons/upstream-timeout.png": Hm, "../assets/images/plugin-icons/upstream-tls.png": Vm, "../assets/images/plugin-icons/vault-auth.png": Fm, "../assets/images/plugin-icons/websocket-size-limit.png": zm, "../assets/images/plugin-icons/websocket-validator.png": Km, "../assets/images/plugin-icons/xml-threat-protection.png": qm, "../assets/images/plugin-icons/zipkin.png": Xm }))[`../assets/images/plugin-icons/${t}.png`], import.meta.url).href;
7849
7849
  return n.includes("undefined") ? new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAMAAABKCk6nAAAAhFBMVEUAAADs+fnr8PTo7fLm7PDl6e7j6+7j6O3i6Ozh5+vp9PTm7PDj6e319fXn7PHj6O739/fn7PDi6e3////o7fLj6Ozt8fbj6u7r7vPi6ezo7fL////n7PHm6/Dl6+/q8PTs8vbu9Pjv9frw9vri6ezv9fnp7/Pt8vfk6u6cpar////e4ePLpSv+AAAAHnRSTlMAKIq93/T6/f7/W8z3GbL4Hr/9AZ39OPFo/Z4FzOeuk05oAAAFJklEQVR4Ae3ThZLjyhWA4SNdWJ9BMy/KA3n/twoXBafWWYb2QPi6Vd9XKGz4q5t4QPNZHDP2n8W/4uT0bJBUZHB2ehL/pPOLy6wQlxfn8bThaJxUajwaxuMm01lSsdl0Eo+YL5LKLebxoOUqqd5qGQ9YD7IHGKzjPptt9gTbzT19n2dv8Pyw8DZ7hG0U1tkrrOM7y0H2CoNlfGO+yp5hNY8vJovsHRaT+GyaPcQ03mkiYvjnNu4za94Ljtn+vd/Efc7+/sf4YJT32L286qjE1ctd3mMUH5yP89D1m46KvLnOQ+PzeO8iD+xuOipzs8sDF/HeZZZuX3dU5/Vtli7jnZMs7fSts/AuSycRcZqlm44q3WTpNCLOsnDdUanrLJxF29zF9zZ3QaXuNuWNJtosvOyo1ssstG0ThZ+Dah3Ea+LHIvmLjoq9KHL+2DYHyanYQc6jDYzACCxwZKGjallog177DwIjMAIjMAIjsMAIjMAIjMAIjMAILDACIzACIzACI7DACIzACIzACIzAAiMwAiMwAiMwAiOwwAiMwAiMwAiMwAIjMAIjMAIjMAILjMAIjMAIjMAIjMACIzACIzACIzACC4zACIzACIzACIzAAiMwAiMwAiMwAguMwAiMwAiMwAgsMAIjMAIjMAIjMAILjMAIjMAIjMAILDACIzACI/DP/6GjGENgBEZgBBYYgREYgREYgRGYJwMjMAIjMAI3TziCMQTmaAIjMAIjMAIjMAILjMAIjMAIjMAITBa6X9CveqD7hWWhDXpNYIERGIERGIERGIEFRmAERmAERuBKCdw2R68VGIERGIERWGAERmAERmAERmCBERiBERiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgRFYYARGYARGYARGYIERGIERGIERGIEFRmAERmAERuB+EPjt/ui9FRiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgWshcNscvVZgBEZgBEZggREYgREYgREYgQVGYARGYARGYARGYIERGIERGIERGIEFRmAERmAERmAERmCBERiBERiBERiBBUZgBEZgBEZgBBYYgREYgREYgftB4Lf7o/dWYARGYARGYIERGIERGIERGIEFRmAE5kj9GEfkb/EfwwkWGIERGIERGIERWGAERmAERmAERmAEFhiBERiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgRFYYARGYARGYARGYIERGIERGIERGIERWGAERmAERmAERmCBERiBERiBERiBBUZgBEZgBEZgBEZggREYgREYgREYgQVGYARGYARGYAQWGIERGIERGIERGIEFRmAERmAERmAEFhiBERiBERiBEZh2r3iflPn2B4HvgordPRl4H1RsL7DAfSJw/JCFq45qXWXhh3Yfhb8F1TqIt2/3ZeGf9kGl9j/F997XPcvCdUelrrNwFhGnWbrpqNJNlk4j4iRLu9cdFXq9y9JJvHOZpVuFa+x7m6XLeO8iD+xuOipzs8sDF/He+TgPXb/pqMib6zw0Po8PRnmP3curjkpcvdzlPUYR0UTE8M9t3GfWvBfHjP17v4n7nP39j/HRNOmhaXw2WSS9s5jEF/NV0jOreXxjOUh6ZbCM76yTXllHYZv0yDZKm+dJbzzfxGHhbdIT203cZz1IemCwjgcsV0n1Vst40HyRVG4xj0dMprOkYrPpJB43HI2TSo1Hw3ja+cVlUqHLi/P4J52cng2SigzOTk/iPk08oPksjhn7z+J+/wBSUhUZLUGZBgAAAABJRU5ErkJggg==", import.meta.url).href : n;
7850
7850
  }, bh = () => {
7851
7851
  const { i18n: { t: e } } = Hi(), t = {}, n = {};
@@ -84,7 +84,7 @@ Please report this to https://github.com/markedjs/marked.`,n){const o="<p>An err
84
84
  will be generated for you.`,inputType:"text",encrypted:!0}},{client_secret:{submitWhenNull:!1,hint:`You can optionally set your own unique client_secret. If missing,
85
85
  it will be generated for you.`,inputType:"text",encrypted:!0}},{redirect_uris:kn.fields.arrayItems({label:"Redirect URI(s)",hint:`One or more URLs in your app where users will be sent after
86
86
  authorization (RFC 6742 Section 3.1.2)`,newElementButtonLabel:"+ Add Redirect URI",inputAttributes:{placeholder:"Enter URI"}})}]},Zf={fields:[{id:{uuid:!0,auto:!0,type:"string",description:"A string representing a UUID (universally unique identifier)."}},{created_at:{description:"An integer representing an automatic Unix timestamp in seconds.",timestamp:!0,auto:!0,type:"integer"}},{consumer:{on_delete:"cascade",type:"foreign",reference:"consumers",required:!0}},{name:{required:!0,type:"string"}},{client_id:{required:!1,hint:"You can optionally set your own unique client_id. If missing, it will be generated for you.",unique:!0,auto:!0,type:"string"}},{client_secret:{required:!1,hint:"You can optionally set your own unique client_secret. If missing, it will be generated for you.",auto:!0,type:"string",encrypted:!0}},{hash_secret:{required:!0,type:"boolean",default:!1}},{redirect_uris:{required:!1,hint:"One or more URLs in your app where users will be sent after authorization (RFC 6742 Section 3.1.2)",type:"array",elements:{type:"string"}}},{tags:{elements:{required:!0,type:"string",description:"A string representing a tag."},type:"set",description:"A set of strings representing tags."}},{client_type:{required:!0,default:"confidential",type:"string",one_of:["confidential","public"]}}]},Ar={fields:[{key:{submitWhenNull:!1,hint:`You can optionally set your own unique key to authenticate the
87
- client. If missing, it will be generated for you.`,inputType:"text",encrypted:!0}}]},Qf={fields:[{id:{type:"string",auto:!0,uuid:!0,description:"A string representing a UUID (universally unique identifier)."}},{created_at:{type:"integer",auto:!0,timestamp:!0,description:"An integer representing an automatic Unix timestamp in seconds."}},{consumer:{required:!0,on_delete:"cascade",reference:"consumers",type:"foreign"}},{key:{required:!1,unique:!0,auto:!0,encrypted:!0,type:"string"}},{tags:{type:"set",elements:{type:"string",required:!0,description:"A string representing a tag."},description:"A set of strings representing tags."}}]},rt={"basic-auth":{descriptionKey:"plugins.meta.basic-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.basic-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"hmac-auth":{descriptionKey:"plugins.meta.hmac-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.hmac-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"jwt-signer":{descriptionKey:"plugins.meta.jwt-signer.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.jwt-signer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},jwt:{descriptionKey:"plugins.meta.jwt.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.jwt.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"key-auth":{descriptionKey:"plugins.meta.key-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.key-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"key-auth-enc":{descriptionKey:"plugins.meta.key-auth-enc.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.key-auth-enc.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"ldap-auth-advanced":{descriptionKey:"plugins.meta.ldap-auth-advanced.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.ldap-auth-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"ldap-auth":{descriptionKey:"plugins.meta.ldap-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.ldap-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"oauth2-introspection":{descriptionKey:"plugins.meta.oauth2-introspection.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.oauth2-introspection.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},oauth2:{descriptionKey:"plugins.meta.oauth2.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.oauth2.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"openid-connect":{descriptionKey:"plugins.meta.openid-connect.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.openid-connect.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"mtls-auth":{descriptionKey:"plugins.meta.mtls-auth.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.mtls-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"vault-auth":{descriptionKey:"plugins.meta.vault-auth.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.vault-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"bot-detection":{descriptionKey:"plugins.meta.bot-detection.description",group:D.SECURITY,isEnterprise:!1,nameKey:"plugins.meta.bot-detection.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},cors:{descriptionKey:"plugins.meta.cors.description",group:D.SECURITY,isEnterprise:!1,nameKey:"plugins.meta.cors.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"ip-restriction":{descriptionKey:"plugins.meta.ip-restriction.description",group:D.SECURITY,isEnterprise:!1,nameKey:"plugins.meta.ip-restriction.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],fieldRules:{atLeastOneOf:[["config.allow","config.deny"]]}},opa:{descriptionKey:"plugins.meta.opa.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.opa.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"kubernetes-sidecar-injector":{descriptionKey:"plugins.meta.kubernetes-sidecar-injector.description",group:D.DEPLOYMENT,isEnterprise:!1,nameKey:"plugins.meta.kubernetes-sidecar-injector.name",scope:[p.GLOBAL]},"request-validator":{descriptionKey:"plugins.meta.request-validator.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.request-validator.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.body_schema","config.parameter_schema"]]}},acl:{descriptionKey:"plugins.meta.acl.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.acl.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],fieldRules:{onlyOneOf:[["config.allow","config.deny"]]}},canary:{descriptionKey:"plugins.meta.canary.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.canary.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],fieldRules:{atLeastOneOf:[["config.upstream_uri","config.upstream_host","config.upstream_port"]]}},"forward-proxy":{descriptionKey:"plugins.meta.forward-proxy.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.forward-proxy.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{onlyOneOfMutuallyRequired:[[["config.http_proxy_host","config.http_proxy_port"],["config.https_proxy_host","config.https_proxy_port"]]]}},"proxy-cache":{descriptionKey:"plugins.meta.proxy-cache.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.proxy-cache.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"proxy-cache-advanced":{descriptionKey:"plugins.meta.proxy-cache-advanced.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.proxy-cache-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],imageName:"proxy-cache"},"graphql-proxy-cache-advanced":{descriptionKey:"plugins.meta.graphql-proxy-cache-advanced.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.graphql-proxy-cache-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],imageName:"graphql"},"rate-limiting-advanced":{descriptionKey:"plugins.meta.rate-limiting-advanced.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.rate-limiting-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"rate-limiting":{descriptionKey:"plugins.meta.rate-limiting.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.rate-limiting.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],fieldRules:{atLeastOneOf:[["config.second","config.minute","config.hour","config.day","config.month","config.year"]]}},"graphql-rate-limiting-advanced":{descriptionKey:"plugins.meta.graphql-rate-limiting-advanced.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.graphql-rate-limiting-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},mocking:{descriptionKey:"plugins.meta.mocking.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.mocking.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.api_specification_filename","config.api_specification"]]}},"request-size-limiting":{descriptionKey:"plugins.meta.request-size-limiting.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.request-size-limiting.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"request-termination":{descriptionKey:"plugins.meta.request-termination.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.request-termination.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"response-ratelimiting":{descriptionKey:"plugins.meta.response-ratelimiting.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.response-ratelimiting.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"route-by-header":{descriptionKey:"plugins.meta.route-by-header.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.route-by-header.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"ai-proxy":{descriptionKey:"plugins.meta.ai-proxy.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-proxy.name",scope:[p.ROUTE],useLegacyForm:!0},"ai-prompt-decorator":{descriptionKey:"plugins.meta.ai-prompt-decorator.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-decorator.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"ai-prompt-template":{descriptionKey:"plugins.meta.ai-prompt-template.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-template.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],useLegacyForm:!0},"ai-prompt-guard":{descriptionKey:"plugins.meta.ai-prompt-guard.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-guard.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"ai-request-transformer":{descriptionKey:"plugins.meta.ai-request-transformer.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-request-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],useLegacyForm:!0},"ai-response-transformer":{descriptionKey:"plugins.meta.ai-response-transformer.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-response-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],useLegacyForm:!0},"ai-rate-limiting-advanced":{descriptionKey:"plugins.meta.ai-rate-limiting-advanced.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-rate-limiting-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"ai-azure-content-safety":{descriptionKey:"plugins.meta.ai-azure-content-safety.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-azure-content-safety.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],useLegacyForm:!0},"aws-lambda":{descriptionKey:"plugins.meta.aws-lambda.description",group:D.SERVERLESS,isEnterprise:!1,nameKey:"plugins.meta.aws-lambda.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"azure-functions":{descriptionKey:"plugins.meta.azure-functions.description",group:D.SERVERLESS,isEnterprise:!0,nameKey:"plugins.meta.azure-functions.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},openwhisk:{descriptionKey:"plugins.meta.openwhisk.description",group:D.SERVERLESS,isEnterprise:!1,nameKey:"plugins.meta.openwhisk.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"pre-function":{descriptionKey:"plugins.meta.pre-function.description",group:D.SERVERLESS,isEnterprise:!0,nameKey:"plugins.meta.pre-function.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],imageName:"kong-function"},"post-function":{descriptionKey:"plugins.meta.post-function.description",group:D.SERVERLESS,isEnterprise:!0,nameKey:"plugins.meta.post-function.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],imageName:"kong-function"},datadog:{descriptionKey:"plugins.meta.datadog.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!1,nameKey:"plugins.meta.datadog.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},prometheus:{descriptionKey:"plugins.meta.prometheus.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.prometheus.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},zipkin:{descriptionKey:"plugins.meta.zipkin.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.zipkin.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},collector:{descriptionKey:"plugins.meta.collector.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.collector.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"response-transformer-advanced":{descriptionKey:"plugins.meta.response-transformer-advanced.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.response-transformer-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"correlation-id":{descriptionKey:"plugins.meta.correlation-id.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.correlation-id.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"request-transformer-advanced":{descriptionKey:"plugins.meta.request-transformer-advanced.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.request-transformer-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"request-transformer":{descriptionKey:"plugins.meta.request-transformer.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.request-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"response-transformer":{descriptionKey:"plugins.meta.response-transformer.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.response-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"route-transformer-advanced":{descriptionKey:"plugins.meta.route-transformer-advanced.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.route-transformer-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.path","config.port","config.host"]]}},"kafka-upstream":{descriptionKey:"plugins.meta.kafka-upstream.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.kafka-upstream.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},degraphql:{descriptionKey:"plugins.meta.degraphql.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.degraphql.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"exit-transformer":{descriptionKey:"plugins.meta.exit-transformer.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.exit-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},jq:{descriptionKey:"plugins.meta.jq.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.jq.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.request_jq_program","config.response_jq_program"]]}},"file-log":{descriptionKey:"plugins.meta.file-log.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.file-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"http-log":{descriptionKey:"plugins.meta.http-log.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.http-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},loggly:{descriptionKey:"plugins.meta.loggly.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.loggly.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"statsd-advanced":{descriptionKey:"plugins.meta.statsd-advanced.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.statsd-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},statsd:{descriptionKey:"plugins.meta.statsd.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!1,nameKey:"plugins.meta.statsd.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},syslog:{descriptionKey:"plugins.meta.syslog.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.syslog.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"tcp-log":{descriptionKey:"plugins.meta.tcp-log.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.tcp-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"udp-log":{descriptionKey:"plugins.meta.udp-log.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.udp-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"kafka-log":{descriptionKey:"plugins.meta.kafka-log.description",group:D.LOGGING,isEnterprise:!0,nameKey:"plugins.meta.kafka-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},session:{descriptionKey:"plugins.meta.session.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.session.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"upstream-tls":{descriptionKey:"plugins.meta.upstream-tls.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.upstream-tls.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"application-registration":{descriptionKey:"plugins.meta.application-registration.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.application-registration.name",scope:[p.SERVICE]},"konnect-application-auth":{descriptionKey:"plugins.meta.konnect-application-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.konnect-application-auth.name",scope:[p.GLOBAL,p.SERVICE],imageName:"application-registration"},acme:{descriptionKey:"plugins.meta.acme.description",group:D.SECURITY,isEnterprise:!1,nameKey:"plugins.meta.acme.name",scope:[p.GLOBAL]},"grpc-gateway":{descriptionKey:"plugins.meta.grpc-gateway.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.grpc-gateway.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"grpc-web":{descriptionKey:"plugins.meta.grpc-web.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.grpc-web.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"upstream-timeout":{descriptionKey:"plugins.meta.upstream-timeout.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.upstream-timeout.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},opentelemetry:{descriptionKey:"plugins.meta.opentelemetry.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!1,nameKey:"plugins.meta.opentelemetry.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.traces_endpoint","config.logs_endpoint"]]}},"websocket-validator":{descriptionKey:"plugins.meta.websocket-validator.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.websocket-validator.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"websocket-size-limit":{descriptionKey:"plugins.meta.websocket-size-limit.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.websocket-size-limit.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.client_max_payload","config.upstream_max_payload"]]}},"tls-metadata-headers":{descriptionKey:"plugins.meta.tls-metadata-headers.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.tls-metadata-headers.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"tls-handshake-modifier":{descriptionKey:"plugins.meta.tls-handshake-modifier.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.tls-handshake-modifier.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"oas-validation":{descriptionKey:"plugins.meta.oas-validation.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.oas-validation.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"jwe-decrypt":{descriptionKey:"plugins.meta.jwe-decrypt.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.jwe-decrypt.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"xml-threat-protection":{descriptionKey:"plugins.meta.xml-threat-protection.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.xml-threat-protection.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},saml:{descriptionKey:"plugins.meta.saml.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.saml.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"app-dynamics":{descriptionKey:"plugins.meta.app-dynamics.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.app-dynamics.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"json-threat-protection":{descriptionKey:"plugins.meta.json-threat-protection.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.json-threat-protection.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"standard-webhooks":{descriptionKey:"plugins.meta.standard-webhooks.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.standard-webhooks.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"ai-proxy-advanced":{descriptionKey:"plugins.meta.ai-proxy-advanced.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-proxy-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"ai-semantic-cache":{descriptionKey:"plugins.meta.ai-semantic-cache.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-semantic-cache.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],useLegacyForm:!0},"ai-semantic-prompt-guard":{descriptionKey:"plugins.meta.ai-semantic-prompt-guard.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-semantic-prompt-guard.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"header-cert-auth":{descriptionKey:"plugins.meta.header-cert-auth.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.header-cert-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],imageName:"tls-metadata-headers",fieldRules:{onlyOneOfMutuallyRequired:[[["config.http_proxy_host","config.http_proxy_port"],["config.https_proxy_host","config.https_proxy_port"]]]}}},nn={acl:{titleKey:"plugins.meta.acl.name",plugin:"acl",schema:ur,nameKey:"plugins.meta.acl.credential_name",endpoint:"/acls",schemaEndpoint:"acls",fields:Vt(ur),applyCredentialButtonText:"Add group to consumer"},"basic-auth":{titleKey:"plugins.meta.basic-auth.name",plugin:"basic-auth",schema:pr,nameKey:"plugins.meta.basic-auth.credential_name",endpoint:"/basic-auth",schemaEndpoint:"basicauth_credentials",fields:Vt(pr)},"key-auth":{titleKey:"plugins.meta.key-auth.name",plugin:"key-auth",schema:mr,nameKey:"plugins.meta.key-auth.credential_name",endpoint:"/key-auth",schemaEndpoint:"keyauth_credentials",fields:Vt(mr)},"key-auth-enc":{titleKey:"plugins.meta.key-auth-enc.name",plugin:"key-auth-enc",schema:Ar,nameKey:"plugins.meta.key-auth-enc.credential_name",endpoint:"/key-auth-enc",schemaEndpoint:"keyauth_enc_credentials",fields:Vt(Ar)},oauth2:{titleKey:"plugins.meta.oauth2.name",plugin:"oauth2",schema:fr,nameKey:"plugins.meta.oauth2.credential_name",endpoint:"/oauth2",schemaEndpoint:"oauth2_credentials",fields:Vt(fr)},"hmac-auth":{titleKey:"plugins.meta.hmac-auth.name",plugin:"hmac-auth",schema:gr,nameKey:"plugins.meta.hmac-auth.credential_name",endpoint:"/hmac-auth",schemaEndpoint:"hmacauth_credentials",fields:Vt(gr)},jwt:{titleKey:"plugins.meta.jwt.name",plugin:"jwt",schema:Xf,nameKey:"plugins.meta.jwt.credential_name",endpoint:"/jwt",schemaEndpoint:"jwt_secrets",fields:{id:{},key:{},algorithm:{}}}},Wf={acls:Hf,basicauth_credentials:Ff,keyauth_credentials:zf,keyauth_enc_credentials:Qf,oauth2_credentials:Zf,hmacauth_credentials:Kf,jwt_secrets:Jf},hr=e=>{var a;const n=((a=rt[e])==null?void 0:a.imageName)||e||"missing",i=new URL(Object.assign({"../assets/images/plugin-icons/acl.png":tg,"../assets/images/plugin-icons/acme.png":ng,"../assets/images/plugin-icons/ai-azure-content-safety.png":ig,"../assets/images/plugin-icons/ai-data-sanitization.png":ag,"../assets/images/plugin-icons/ai-prompt-decorator.png":og,"../assets/images/plugin-icons/ai-prompt-guard.png":rg,"../assets/images/plugin-icons/ai-prompt-template.png":lg,"../assets/images/plugin-icons/ai-proxy-advanced.png":sg,"../assets/images/plugin-icons/ai-proxy.png":cg,"../assets/images/plugin-icons/ai-rate-limiting-advanced.png":dg,"../assets/images/plugin-icons/ai-request-transformer.png":ug,"../assets/images/plugin-icons/ai-response-transformer.png":pg,"../assets/images/plugin-icons/ai-semantic-caching.png":mg,"../assets/images/plugin-icons/ai-semantic-prompt-guard.png":gg,"../assets/images/plugin-icons/app-dynamics.png":fg,"../assets/images/plugin-icons/application-registration.png":Ag,"../assets/images/plugin-icons/aws-lambda.png":hg,"../assets/images/plugin-icons/azure-functions.png":yg,"../assets/images/plugin-icons/basic-auth.png":bg,"../assets/images/plugin-icons/bot-detection.png":wg,"../assets/images/plugin-icons/canary.png":Eg,"../assets/images/plugin-icons/collector.png":Cg,"../assets/images/plugin-icons/correlation-id.png":kg,"../assets/images/plugin-icons/cors.png":Bg,"../assets/images/plugin-icons/datadog.png":Ig,"../assets/images/plugin-icons/degraphql.png":Sg,"../assets/images/plugin-icons/dynamic-ssl.png":xg,"../assets/images/plugin-icons/exit-transformer.png":vg,"../assets/images/plugin-icons/file-log.png":Og,"../assets/images/plugin-icons/forward-proxy.png":Mg,"../assets/images/plugin-icons/graphql-rate-limiting-advanced.png":Rg,"../assets/images/plugin-icons/graphql.png":Tg,"../assets/images/plugin-icons/grpc-gateway.png":Ng,"../assets/images/plugin-icons/grpc-web.png":Vg,"../assets/images/plugin-icons/hmac-auth.png":Lg,"../assets/images/plugin-icons/http-log.png":Dg,"../assets/images/plugin-icons/ip-restriction.png":jg,"../assets/images/plugin-icons/jq.png":Ug,"../assets/images/plugin-icons/json-threat-protection.png":Pg,"../assets/images/plugin-icons/jwe-decrypt.png":Gg,"../assets/images/plugin-icons/jwt-signer.png":Yg,"../assets/images/plugin-icons/jwt.png":Hg,"../assets/images/plugin-icons/kafka-log.png":Fg,"../assets/images/plugin-icons/kafka-upstream.png":zg,"../assets/images/plugin-icons/key-auth-enc.png":Kg,"../assets/images/plugin-icons/key-auth.png":qg,"../assets/images/plugin-icons/kong-function.png":Xg,"../assets/images/plugin-icons/kubernetes-sidecar-injector.png":Jg,"../assets/images/plugin-icons/ldap-auth-advanced.png":Zg,"../assets/images/plugin-icons/ldap-auth.png":Qg,"../assets/images/plugin-icons/loggly.png":Wg,"../assets/images/plugin-icons/missing.png":_g,"../assets/images/plugin-icons/mocking.png":$g,"../assets/images/plugin-icons/mtls-auth.png":ef,"../assets/images/plugin-icons/new.png":tf,"../assets/images/plugin-icons/oas-validation.png":nf,"../assets/images/plugin-icons/oauth2-introspection.png":af,"../assets/images/plugin-icons/oauth2.png":of,"../assets/images/plugin-icons/opa.png":rf,"../assets/images/plugin-icons/openid-connect.png":lf,"../assets/images/plugin-icons/opentelemetry.png":sf,"../assets/images/plugin-icons/openwhisk.png":cf,"../assets/images/plugin-icons/prometheus.png":df,"../assets/images/plugin-icons/proxy-cache.png":uf,"../assets/images/plugin-icons/rate-limiting-advanced.png":pf,"../assets/images/plugin-icons/rate-limiting.png":mf,"../assets/images/plugin-icons/request-size-limiting.png":gf,"../assets/images/plugin-icons/request-termination.png":ff,"../assets/images/plugin-icons/request-transformer-advanced.png":Af,"../assets/images/plugin-icons/request-transformer.png":hf,"../assets/images/plugin-icons/request-validator.png":yf,"../assets/images/plugin-icons/response-ratelimiting.png":bf,"../assets/images/plugin-icons/response-transformer-advanced.png":wf,"../assets/images/plugin-icons/response-transformer.png":Ef,"../assets/images/plugin-icons/route-by-header.png":Cf,"../assets/images/plugin-icons/route-transformer-advanced.png":kf,"../assets/images/plugin-icons/runscope.png":Bf,"../assets/images/plugin-icons/saml.png":If,"../assets/images/plugin-icons/session.png":Sf,"../assets/images/plugin-icons/standard-webhooks.png":xf,"../assets/images/plugin-icons/statsd-advanced.png":vf,"../assets/images/plugin-icons/statsd.png":Of,"../assets/images/plugin-icons/syslog.png":Mf,"../assets/images/plugin-icons/tcp-log.png":Rf,"../assets/images/plugin-icons/tls-handshake-modifier.png":Tf,"../assets/images/plugin-icons/tls-metadata-headers.png":Nf,"../assets/images/plugin-icons/udp-log.png":Vf,"../assets/images/plugin-icons/upstream-timeout.png":Lf,"../assets/images/plugin-icons/upstream-tls.png":Df,"../assets/images/plugin-icons/vault-auth.png":jf,"../assets/images/plugin-icons/websocket-size-limit.png":Uf,"../assets/images/plugin-icons/websocket-validator.png":Pf,"../assets/images/plugin-icons/xml-threat-protection.png":Gf,"../assets/images/plugin-icons/zipkin.png":Yf})[`../assets/images/plugin-icons/${n}.png`],typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qt&&Qt.src||new URL("entities-plugins.umd.js",document.baseURI).href).href;return i.includes("undefined")?new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAMAAABKCk6nAAAAhFBMVEUAAADs+fnr8PTo7fLm7PDl6e7j6+7j6O3i6Ozh5+vp9PTm7PDj6e319fXn7PHj6O739/fn7PDi6e3////o7fLj6Ozt8fbj6u7r7vPi6ezo7fL////n7PHm6/Dl6+/q8PTs8vbu9Pjv9frw9vri6ezv9fnp7/Pt8vfk6u6cpar////e4ePLpSv+AAAAHnRSTlMAKIq93/T6/f7/W8z3GbL4Hr/9AZ39OPFo/Z4FzOeuk05oAAAFJklEQVR4Ae3ThZLjyhWA4SNdWJ9BMy/KA3n/twoXBafWWYb2QPi6Vd9XKGz4q5t4QPNZHDP2n8W/4uT0bJBUZHB2ehL/pPOLy6wQlxfn8bThaJxUajwaxuMm01lSsdl0Eo+YL5LKLebxoOUqqd5qGQ9YD7IHGKzjPptt9gTbzT19n2dv8Pyw8DZ7hG0U1tkrrOM7y0H2CoNlfGO+yp5hNY8vJovsHRaT+GyaPcQ03mkiYvjnNu4za94Ljtn+vd/Efc7+/sf4YJT32L286qjE1ctd3mMUH5yP89D1m46KvLnOQ+PzeO8iD+xuOipzs8sDF/HeZZZuX3dU5/Vtli7jnZMs7fSts/AuSycRcZqlm44q3WTpNCLOsnDdUanrLJxF29zF9zZ3QaXuNuWNJtosvOyo1ssstG0ThZ+Dah3Ea+LHIvmLjoq9KHL+2DYHyanYQc6jDYzACCxwZKGjallog177DwIjMAIjMAIjsMAIjMAIjMAIjMAILDACIzACIzACI7DACIzACIzACIzAAiMwAiMwAiMwAiOwwAiMwAiMwAiMwAIjMAIjMAIjMAILjMAIjMAIjMAIjMACIzACIzACIzACC4zACIzACIzACIzAAiMwAiMwAiMwAguMwAiMwAiMwAgsMAIjMAIjMAIjMAILjMAIjMAIjMAILDACIzACI/DP/6GjGENgBEZgBBYYgREYgREYgRGYJwMjMAIjMAI3TziCMQTmaAIjMAIjMAIjMAILjMAIjMAIjMAITBa6X9CveqD7hWWhDXpNYIERGIERGIERGIEFRmAERmAERuBKCdw2R68VGIERGIERWGAERmAERmAERmCBERiBERiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgRFYYARGYARGYARGYIERGIERGIERGIEFRmAERmAERuB+EPjt/ui9FRiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgWshcNscvVZgBEZgBEZggREYgREYgREYgQVGYARGYARGYARGYIERGIERGIERGIEFRmAERmAERmAERmCBERiBERiBERiBBUZgBEZgBEZgBBYYgREYgREYgftB4Lf7o/dWYARGYARGYIERGIERGIERGIEFRmAE5kj9GEfkb/EfwwkWGIERGIERGIERWGAERmAERmAERmAEFhiBERiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgRFYYARGYARGYARGYIERGIERGIERGIERWGAERmAERmAERmCBERiBERiBERiBBUZgBEZgBEZgBEZggREYgREYgREYgQVGYARGYARGYAQWGIERGIERGIERGIEFRmAERmAERmAEFhiBERiBERiBEZh2r3iflPn2B4HvgordPRl4H1RsL7DAfSJw/JCFq45qXWXhh3Yfhb8F1TqIt2/3ZeGf9kGl9j/F997XPcvCdUelrrNwFhGnWbrpqNJNlk4j4iRLu9cdFXq9y9JJvHOZpVuFa+x7m6XLeO8iD+xuOipzs8sDF/He+TgPXb/pqMib6zw0Po8PRnmP3curjkpcvdzlPUYR0UTE8M9t3GfWvBfHjP17v4n7nP39j/HRNOmhaXw2WSS9s5jEF/NV0jOreXxjOUh6ZbCM76yTXllHYZv0yDZKm+dJbzzfxGHhbdIT203cZz1IemCwjgcsV0n1Vst40HyRVG4xj0dMprOkYrPpJB43HI2TSo1Hw3ja+cVlUqHLi/P4J52cng2SigzOTk/iPk08oPksjhn7z+J+/wBSUhUZLUGZBgAAAABJRU5ErkJggg==",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qt&&Qt.src||new URL("entities-plugins.umd.js",document.baseURI).href).href:i},_f=()=>{const{i18n:{t:e}}=ei(),n={},i={};for(const[o,r]of Object.entries(rt))n[o]={...r,name:e(r.nameKey),description:e(r.descriptionKey)};for(const[o,r]of Object.entries(nn))i[o]={...r,name:e(r.nameKey),title:e(r.titleKey)};return{pluginMetaData:n,credentialMetaData:i,credentialSchemas:nn,getDisplayName:o=>{var r;return((r=n[o])==null?void 0:r.name)||o}}};function yr(e,n){for(var i=-1,a=e==null?0:e.length;++i<a&&n(e[i],i,e)!==!1;);return e}function $f(e){return function(n,i,a){for(var o=-1,r=Object(n),l=a(n),s=l.length;s--;){var c=l[e?s:++o];if(i(r[c],c,r)===!1)break}return n}}var eA=$f();const tA=eA;function nA(e,n){for(var i=-1,a=Array(e);++i<e;)a[i]=n(i);return a}var br=typeof global=="object"&&global&&global.Object===Object&&global,iA=typeof self=="object"&&self&&self.Object===Object&&self,Je=br||iA||Function("return this")(),lt=Je.Symbol,wr=Object.prototype,aA=wr.hasOwnProperty,oA=wr.toString,Bn=lt?lt.toStringTag:void 0;function rA(e){var n=aA.call(e,Bn),i=e[Bn];try{e[Bn]=void 0;var a=!0}catch{}var o=oA.call(e);return a&&(n?e[Bn]=i:delete e[Bn]),o}var lA=Object.prototype,sA=lA.toString;function cA(e){return sA.call(e)}var dA="[object Null]",uA="[object Undefined]",Er=lt?lt.toStringTag:void 0;function yt(e){return e==null?e===void 0?uA:dA:Er&&Er in Object(e)?rA(e):cA(e)}function st(e){return e!=null&&typeof e=="object"}var pA="[object Arguments]";function Cr(e){return st(e)&&yt(e)==pA}var kr=Object.prototype,mA=kr.hasOwnProperty,gA=kr.propertyIsEnumerable,Br=Cr(function(){return arguments}())?Cr:function(e){return st(e)&&mA.call(e,"callee")&&!gA.call(e,"callee")},Ze=Array.isArray;function fA(){return!1}var Ir=typeof W=="object"&&W&&!W.nodeType&&W,Sr=Ir&&typeof module=="object"&&module&&!module.nodeType&&module,AA=Sr&&Sr.exports===Ir,xr=AA?Je.Buffer:void 0,hA=xr?xr.isBuffer:void 0,ti=hA||fA,yA=9007199254740991,bA=/^(?:0|[1-9]\d*)$/;function qi(e,n){var i=typeof e;return n=n??yA,!!n&&(i=="number"||i!="symbol"&&bA.test(e))&&e>-1&&e%1==0&&e<n}var wA=9007199254740991;function Xi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wA}var EA="[object Arguments]",CA="[object Array]",kA="[object Boolean]",BA="[object Date]",IA="[object Error]",SA="[object Function]",xA="[object Map]",vA="[object Number]",OA="[object Object]",MA="[object RegExp]",RA="[object Set]",TA="[object String]",NA="[object WeakMap]",VA="[object ArrayBuffer]",LA="[object DataView]",DA="[object Float32Array]",jA="[object Float64Array]",UA="[object Int8Array]",PA="[object Int16Array]",GA="[object Int32Array]",YA="[object Uint8Array]",HA="[object Uint8ClampedArray]",FA="[object Uint16Array]",zA="[object Uint32Array]",fe={};fe[DA]=fe[jA]=fe[UA]=fe[PA]=fe[GA]=fe[YA]=fe[HA]=fe[FA]=fe[zA]=!0,fe[EA]=fe[CA]=fe[VA]=fe[kA]=fe[LA]=fe[BA]=fe[IA]=fe[SA]=fe[xA]=fe[vA]=fe[OA]=fe[MA]=fe[RA]=fe[TA]=fe[NA]=!1;function KA(e){return st(e)&&Xi(e.length)&&!!fe[yt(e)]}function Ji(e){return function(n){return e(n)}}var vr=typeof W=="object"&&W&&!W.nodeType&&W,In=vr&&typeof module=="object"&&module&&!module.nodeType&&module,qA=In&&In.exports===vr,Zi=qA&&br.process,an=function(){try{var e=In&&In.require&&In.require("util").types;return e||Zi&&Zi.binding&&Zi.binding("util")}catch{}}(),Or=an&&an.isTypedArray,Mr=Or?Ji(Or):KA,XA=Object.prototype,JA=XA.hasOwnProperty;function Rr(e,n){var i=Ze(e),a=!i&&Br(e),o=!i&&!a&&ti(e),r=!i&&!a&&!o&&Mr(e),l=i||a||o||r,s=l?nA(e.length,String):[],c=s.length;for(var u in e)(n||JA.call(e,u))&&!(l&&(u=="length"||o&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||qi(u,c)))&&s.push(u);return s}var ZA=Object.prototype;function Qi(e){var n=e&&e.constructor,i=typeof n=="function"&&n.prototype||ZA;return e===i}function Tr(e,n){return function(i){return e(n(i))}}var QA=Tr(Object.keys,Object),WA=Object.prototype,_A=WA.hasOwnProperty;function $A(e){if(!Qi(e))return QA(e);var n=[];for(var i in Object(e))_A.call(e,i)&&i!="constructor"&&n.push(i);return n}function De(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var eh="[object AsyncFunction]",th="[object Function]",nh="[object GeneratorFunction]",ih="[object Proxy]";function Ae(e){if(!De(e))return!1;var n=yt(e);return n==th||n==nh||n==eh||n==ih}function Sn(e){return e!=null&&Xi(e.length)&&!Ae(e)}function on(e){return Sn(e)?Rr(e):$A(e)}function ah(e,n){return e&&tA(e,n,on)}function oh(e,n){return function(i,a){if(i==null)return i;if(!Sn(i))return e(i,a);for(var o=i.length,r=n?o:-1,l=Object(i);(n?r--:++r<o)&&a(l[r],r,l)!==!1;);return i}}var rh=oh(ah);const lh=rh;function ni(e){return e}function sh(e){return typeof e=="function"?e:ni}function je(e,n){var i=Ze(e)?yr:lh;return i(e,sh(n))}var ch="[object Symbol]";function ii(e){return typeof e=="symbol"||st(e)&&yt(e)==ch}var dh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uh=/^\w*$/;function Wi(e,n){if(Ze(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||ii(e)?!0:uh.test(e)||!dh.test(e)||n!=null&&e in Object(n)}var _i=Je["__core-js_shared__"],Nr=function(){var e=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ph(e){return!!Nr&&Nr in e}var mh=Function.prototype,gh=mh.toString;function Lt(e){if(e!=null){try{return gh.call(e)}catch{}try{return e+""}catch{}}return""}var fh=/[\\^$.*+?()[\]{}|]/g,Ah=/^\[object .+?Constructor\]$/,hh=Function.prototype,yh=Object.prototype,bh=hh.toString,wh=yh.hasOwnProperty,Eh=RegExp("^"+bh.call(wh).replace(fh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ch(e){if(!De(e)||ph(e))return!1;var n=Ae(e)?Eh:Ah;return n.test(Lt(e))}function kh(e,n){return e==null?void 0:e[n]}function Dt(e,n){var i=kh(e,n);return Ch(i)?i:void 0}var xn=Dt(Object,"create");function Bh(){this.__data__=xn?xn(null):{},this.size=0}function Ih(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Sh="__lodash_hash_undefined__",xh=Object.prototype,vh=xh.hasOwnProperty;function Oh(e){var n=this.__data__;if(xn){var i=n[e];return i===Sh?void 0:i}return vh.call(n,e)?n[e]:void 0}var Mh=Object.prototype,Rh=Mh.hasOwnProperty;function Th(e){var n=this.__data__;return xn?n[e]!==void 0:Rh.call(n,e)}var Nh="__lodash_hash_undefined__";function Vh(e,n){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=xn&&n===void 0?Nh:n,this}function jt(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var a=e[n];this.set(a[0],a[1])}}jt.prototype.clear=Bh,jt.prototype.delete=Ih,jt.prototype.get=Oh,jt.prototype.has=Th,jt.prototype.set=Vh;function Lh(){this.__data__=[],this.size=0}function vn(e,n){return e===n||e!==e&&n!==n}function ai(e,n){for(var i=e.length;i--;)if(vn(e[i][0],n))return i;return-1}var Dh=Array.prototype,jh=Dh.splice;function Uh(e){var n=this.__data__,i=ai(n,e);if(i<0)return!1;var a=n.length-1;return i==a?n.pop():jh.call(n,i,1),--this.size,!0}function Ph(e){var n=this.__data__,i=ai(n,e);return i<0?void 0:n[i][1]}function Gh(e){return ai(this.__data__,e)>-1}function Yh(e,n){var i=this.__data__,a=ai(i,e);return a<0?(++this.size,i.push([e,n])):i[a][1]=n,this}function ut(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var a=e[n];this.set(a[0],a[1])}}ut.prototype.clear=Lh,ut.prototype.delete=Uh,ut.prototype.get=Ph,ut.prototype.has=Gh,ut.prototype.set=Yh;var On=Dt(Je,"Map");function Hh(){this.size=0,this.__data__={hash:new jt,map:new(On||ut),string:new jt}}function Fh(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function oi(e,n){var i=e.__data__;return Fh(n)?i[typeof n=="string"?"string":"hash"]:i.map}function zh(e){var n=oi(this,e).delete(e);return this.size-=n?1:0,n}function Kh(e){return oi(this,e).get(e)}function qh(e){return oi(this,e).has(e)}function Xh(e,n){var i=oi(this,e),a=i.size;return i.set(e,n),this.size+=i.size==a?0:1,this}function pt(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var a=e[n];this.set(a[0],a[1])}}pt.prototype.clear=Hh,pt.prototype.delete=zh,pt.prototype.get=Kh,pt.prototype.has=qh,pt.prototype.set=Xh;var Jh="Expected a function";function $i(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(Jh);var i=function(){var a=arguments,o=n?n.apply(this,a):a[0],r=i.cache;if(r.has(o))return r.get(o);var l=e.apply(this,a);return i.cache=r.set(o,l)||r,l};return i.cache=new($i.Cache||pt),i}$i.Cache=pt;var Zh=500;function Qh(e){var n=$i(e,function(a){return i.size===Zh&&i.clear(),a}),i=n.cache;return n}var Wh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_h=/\\(\\)?/g,$h=Qh(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(Wh,function(i,a,o,r){n.push(o?r.replace(_h,"$1"):a||i)}),n});function ey(e,n){for(var i=-1,a=e==null?0:e.length,o=Array(a);++i<a;)o[i]=n(e[i],i,e);return o}var ty=1/0,Vr=lt?lt.prototype:void 0,Lr=Vr?Vr.toString:void 0;function Dr(e){if(typeof e=="string")return e;if(Ze(e))return ey(e,Dr)+"";if(ii(e))return Lr?Lr.call(e):"";var n=e+"";return n=="0"&&1/e==-ty?"-0":n}function jr(e){return e==null?"":Dr(e)}function Ur(e,n){return Ze(e)?e:Wi(e,n)?[e]:$h(jr(e))}var ny=1/0;function ri(e){if(typeof e=="string"||ii(e))return e;var n=e+"";return n=="0"&&1/e==-ny?"-0":n}function Pr(e,n){n=Ur(n,e);for(var i=0,a=n.length;e!=null&&i<a;)e=e[ri(n[i++])];return i&&i==a?e:void 0}function le(e,n,i){var a=e==null?void 0:Pr(e,n);return a===void 0?i:a}function ke(e){return e==null}const bt="kong-ui-forms-api",wt="autofill",Qe="autofillSlot";function iy(){this.__data__=new ut,this.size=0}function ay(e){var n=this.__data__,i=n.delete(e);return this.size=n.size,i}function oy(e){return this.__data__.get(e)}function ry(e){return this.__data__.has(e)}var ly=200;function sy(e,n){var i=this.__data__;if(i instanceof ut){var a=i.__data__;if(!On||a.length<ly-1)return a.push([e,n]),this.size=++i.size,this;i=this.__data__=new pt(a)}return i.set(e,n),this.size=i.size,this}function ct(e){var n=this.__data__=new ut(e);this.size=n.size}ct.prototype.clear=iy,ct.prototype.delete=ay,ct.prototype.get=oy,ct.prototype.has=ry,ct.prototype.set=sy;var li=function(){try{var e=Dt(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Gr(e,n,i){n=="__proto__"&&li?li(e,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[n]=i}var cy=Object.prototype,dy=cy.hasOwnProperty;function Yr(e,n,i){var a=e[n];(!(dy.call(e,n)&&vn(a,i))||i===void 0&&!(n in e))&&Gr(e,n,i)}function si(e,n,i,a){var o=!i;i||(i={});for(var r=-1,l=n.length;++r<l;){var s=n[r],c=a?a(i[s],e[s],s,i,e):void 0;c===void 0&&(c=e[s]),o?Gr(i,s,c):Yr(i,s,c)}return i}function uy(e,n){return e&&si(n,on(n),e)}function py(e){var n=[];if(e!=null)for(var i in Object(e))n.push(i);return n}var my=Object.prototype,gy=my.hasOwnProperty;function fy(e){if(!De(e))return py(e);var n=Qi(e),i=[];for(var a in e)a=="constructor"&&(n||!gy.call(e,a))||i.push(a);return i}function ci(e){return Sn(e)?Rr(e,!0):fy(e)}function Ay(e,n){return e&&si(n,ci(n),e)}var Hr=typeof W=="object"&&W&&!W.nodeType&&W,Fr=Hr&&typeof module=="object"&&module&&!module.nodeType&&module,hy=Fr&&Fr.exports===Hr,zr=hy?Je.Buffer:void 0,Kr=zr?zr.allocUnsafe:void 0;function yy(e,n){if(n)return e.slice();var i=e.length,a=Kr?Kr(i):new e.constructor(i);return e.copy(a),a}function by(e,n){var i=-1,a=e.length;for(n||(n=Array(a));++i<a;)n[i]=e[i];return n}function wy(e,n){for(var i=-1,a=e==null?0:e.length,o=0,r=[];++i<a;){var l=e[i];n(l,i,e)&&(r[o++]=l)}return r}function qr(){return[]}var Ey=Object.prototype,Cy=Ey.propertyIsEnumerable,Xr=Object.getOwnPropertySymbols,ea=Xr?function(e){return e==null?[]:(e=Object(e),wy(Xr(e),function(n){return Cy.call(e,n)}))}:qr;function ky(e,n){return si(e,ea(e),n)}function Jr(e,n){for(var i=-1,a=n.length,o=e.length;++i<a;)e[o+i]=n[i];return e}var By=Tr(Object.getPrototypeOf,Object);const Zr=By;var Iy=Object.getOwnPropertySymbols,Qr=Iy?function(e){for(var n=[];e;)Jr(n,ea(e)),e=Zr(e);return n}:qr;function Sy(e,n){return si(e,Qr(e),n)}function Wr(e,n,i){var a=n(e);return Ze(e)?a:Jr(a,i(e))}function ta(e){return Wr(e,on,ea)}function xy(e){return Wr(e,ci,Qr)}var na=Dt(Je,"DataView"),ia=Dt(Je,"Promise"),rn=Dt(Je,"Set"),aa=Dt(Je,"WeakMap"),_r="[object Map]",vy="[object Object]",$r="[object Promise]",el="[object Set]",tl="[object WeakMap]",nl="[object DataView]",Oy=Lt(na),My=Lt(On),Ry=Lt(ia),Ty=Lt(rn),Ny=Lt(aa),Ut=yt;(na&&Ut(new na(new ArrayBuffer(1)))!=nl||On&&Ut(new On)!=_r||ia&&Ut(ia.resolve())!=$r||rn&&Ut(new rn)!=el||aa&&Ut(new aa)!=tl)&&(Ut=function(e){var n=yt(e),i=n==vy?e.constructor:void 0,a=i?Lt(i):"";if(a)switch(a){case Oy:return nl;case My:return _r;case Ry:return $r;case Ty:return el;case Ny:return tl}return n});const Mn=Ut;var Vy=Object.prototype,Ly=Vy.hasOwnProperty;function Dy(e){var n=e.length,i=new e.constructor(n);return n&&typeof e[0]=="string"&&Ly.call(e,"index")&&(i.index=e.index,i.input=e.input),i}var di=Je.Uint8Array;function oa(e){var n=new e.constructor(e.byteLength);return new di(n).set(new di(e)),n}function jy(e,n){var i=n?oa(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}var Uy=/\w*$/;function Py(e){var n=new e.constructor(e.source,Uy.exec(e));return n.lastIndex=e.lastIndex,n}var il=lt?lt.prototype:void 0,al=il?il.valueOf:void 0;function Gy(e){return al?Object(al.call(e)):{}}function Yy(e,n){var i=n?oa(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}var Hy="[object Boolean]",Fy="[object Date]",zy="[object Map]",Ky="[object Number]",qy="[object RegExp]",Xy="[object Set]",Jy="[object String]",Zy="[object Symbol]",Qy="[object ArrayBuffer]",Wy="[object DataView]",_y="[object Float32Array]",$y="[object Float64Array]",eb="[object Int8Array]",tb="[object Int16Array]",nb="[object Int32Array]",ib="[object Uint8Array]",ab="[object Uint8ClampedArray]",ob="[object Uint16Array]",rb="[object Uint32Array]";function lb(e,n,i){var a=e.constructor;switch(n){case Qy:return oa(e);case Hy:case Fy:return new a(+e);case Wy:return jy(e,i);case _y:case $y:case eb:case tb:case nb:case ib:case ab:case ob:case rb:return Yy(e,i);case zy:return new a;case Ky:case Jy:return new a(e);case qy:return Py(e);case Xy:return new a;case Zy:return Gy(e)}}var ol=Object.create,sb=function(){function e(){}return function(n){if(!De(n))return{};if(ol)return ol(n);e.prototype=n;var i=new e;return e.prototype=void 0,i}}();function cb(e){return typeof e.constructor=="function"&&!Qi(e)?sb(Zr(e)):{}}var db="[object Map]";function ub(e){return st(e)&&Mn(e)==db}var rl=an&&an.isMap,pb=rl?Ji(rl):ub,mb="[object Set]";function gb(e){return st(e)&&Mn(e)==mb}var ll=an&&an.isSet,fb=ll?Ji(ll):gb,Ab=1,hb=2,yb=4,sl="[object Arguments]",bb="[object Array]",wb="[object Boolean]",Eb="[object Date]",Cb="[object Error]",cl="[object Function]",kb="[object GeneratorFunction]",Bb="[object Map]",Ib="[object Number]",dl="[object Object]",Sb="[object RegExp]",xb="[object Set]",vb="[object String]",Ob="[object Symbol]",Mb="[object WeakMap]",Rb="[object ArrayBuffer]",Tb="[object DataView]",Nb="[object Float32Array]",Vb="[object Float64Array]",Lb="[object Int8Array]",Db="[object Int16Array]",jb="[object Int32Array]",Ub="[object Uint8Array]",Pb="[object Uint8ClampedArray]",Gb="[object Uint16Array]",Yb="[object Uint32Array]",ge={};ge[sl]=ge[bb]=ge[Rb]=ge[Tb]=ge[wb]=ge[Eb]=ge[Nb]=ge[Vb]=ge[Lb]=ge[Db]=ge[jb]=ge[Bb]=ge[Ib]=ge[dl]=ge[Sb]=ge[xb]=ge[vb]=ge[Ob]=ge[Ub]=ge[Pb]=ge[Gb]=ge[Yb]=!0,ge[Cb]=ge[cl]=ge[Mb]=!1;function Rn(e,n,i,a,o,r){var l,s=n&Ab,c=n&hb,u=n&yb;if(i&&(l=o?i(e,a,o,r):i(e)),l!==void 0)return l;if(!De(e))return e;var d=Ze(e);if(d){if(l=Dy(e),!s)return by(e,l)}else{var m=Mn(e),g=m==cl||m==kb;if(ti(e))return yy(e,s);if(m==dl||m==sl||g&&!o){if(l=c||g?{}:cb(e),!s)return c?Sy(e,Ay(l,e)):ky(e,uy(l,e))}else{if(!ge[m])return o?e:{};l=lb(e,m,s)}}r||(r=new ct);var h=r.get(e);if(h)return h;r.set(e,l),fb(e)?e.forEach(function(b){l.add(Rn(b,n,i,b,e,r))}):pb(e)&&e.forEach(function(b,I){l.set(I,Rn(b,n,i,I,e,r))});var B=u?c?xy:ta:c?ci:on,C=d?void 0:B(e);return yr(C||e,function(b,I){C&&(I=b,b=e[I]),Yr(l,I,Rn(b,n,i,I,e,r))}),l}var Hb=1,Fb=4;function mt(e){return Rn(e,Hb|Fb)}const ra=(e,n="")=>typeof e.id<"u"?n+e.id:n+(e.inputName||e.label||e.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),ul=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var zb="[object String]";function Pt(e){return typeof e=="string"||!Ze(e)&&st(e)&&yt(e)==zb}const pl={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,i={[le(this.options,"validationErrorClass","error")]:n,[le(this.options,"validationSuccessClass","valid")]:!n,disabled:this.fieldDisabled(e),readonly:this.fieldReadonly(e),featured:this.fieldFeatured(e),required:this.fieldRequired(e)};return Array.isArray(e.styleClasses)?je(e.styleClasses,a=>i[a]=!0):Pt(e.styleClasses)&&(i[e.styleClasses]=!0),ke(e.type)||(i["field-"+e.type]=!0),i},fieldErrors(e){return this.errors.filter(n=>n.field.fieldName===e.fieldName).map(n=>n.error)},fieldDisabled(e){return Ae(e.disabled)?e.disabled.call(this,this.model,e,this):ke(e.disabled)?!1:e.disabled},fieldReadonly(e){return Ae(e.readonly)?e.readonly.call(this,this.model,e,this):ke(e.readonly)?!1:e.readonly},fieldFeatured(e){return Ae(e.featured)?e.featured.call(this,this.model,e,this):ke(e.featured)?!1:e.featured},fieldRequired(e){return Ae(e.required)?e.required.call(this,this.model,e,this):ke(e.required)?!1:e.required}}};var la=function(){return Je.Date.now()},Kb=/\s/;function qb(e){for(var n=e.length;n--&&Kb.test(e.charAt(n)););return n}var Xb=/^\s+/;function Jb(e){return e&&e.slice(0,qb(e)+1).replace(Xb,"")}var ml=NaN,Zb=/^[-+]0x[0-9a-f]+$/i,Qb=/^0b[01]+$/i,Wb=/^0o[0-7]+$/i,_b=parseInt;function sa(e){if(typeof e=="number")return e;if(ii(e))return ml;if(De(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=De(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Jb(e);var i=Qb.test(e);return i||Wb.test(e)?_b(e.slice(2),i?2:8):Zb.test(e)?ml:+e}var $b="Expected a function",e1=Math.max,t1=Math.min;function Tn(e,n,i){var a,o,r,l,s,c,u=0,d=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError($b);n=sa(n)||0,De(i)&&(d=!!i.leading,m="maxWait"in i,r=m?e1(sa(i.maxWait)||0,n):r,g="trailing"in i?!!i.trailing:g);function h(f){var y=a,k=o;return a=o=void 0,u=f,l=e.apply(k,y),l}function B(f){return u=f,s=setTimeout(I,n),d?h(f):l}function C(f){var y=f-c,k=f-u,V=n-y;return m?t1(V,r-k):V}function b(f){var y=f-c,k=f-u;return c===void 0||y>=n||y<0||m&&k>=r}function I(){var f=la();if(b(f))return x(f);s=setTimeout(I,C(f))}function x(f){return s=void 0,g&&a?h(f):(a=o=void 0,l)}function E(){s!==void 0&&clearTimeout(s),u=0,a=c=o=s=void 0}function w(){return s===void 0?l:x(la())}function A(){var f=la(),y=b(f);if(a=arguments,o=this,c=f,y){if(s===void 0)return B(c);if(m)return clearTimeout(s),s=setTimeout(I,n),h(c)}return s===void 0&&(s=setTimeout(I,n)),l}return A.cancel=E,A.flush=w,A}var n1="__lodash_hash_undefined__";function i1(e){return this.__data__.set(e,n1),this}function a1(e){return this.__data__.has(e)}function Nn(e){var n=-1,i=e==null?0:e.length;for(this.__data__=new pt;++n<i;)this.add(e[n])}Nn.prototype.add=Nn.prototype.push=i1,Nn.prototype.has=a1;function gl(e,n,i,a){for(var o=e.length,r=i+(a?1:-1);a?r--:++r<o;)if(n(e[r],r,e))return r;return-1}function o1(e){return e!==e}function r1(e,n,i){for(var a=i-1,o=e.length;++a<o;)if(e[a]===n)return a;return-1}function l1(e,n,i){return n===n?r1(e,n,i):gl(e,o1,i)}function s1(e,n){var i=e==null?0:e.length;return!!i&&l1(e,n,0)>-1}function c1(e,n,i){for(var a=-1,o=e==null?0:e.length;++a<o;)if(i(n,e[a]))return!0;return!1}function fl(e,n){return e.has(n)}function d1(){}function ca(e){var n=-1,i=Array(e.size);return e.forEach(function(a){i[++n]=a}),i}var u1=1/0,p1=rn&&1/ca(new rn([,-0]))[1]==u1?function(e){return new rn(e)}:d1,m1=200;function g1(e,n,i){var a=-1,o=s1,r=e.length,l=!0,s=[],c=s;if(i)l=!1,o=c1;else if(r>=m1){var u=n?null:p1(e);if(u)return ca(u);l=!1,o=fl,c=new Nn}else c=n?[]:s;e:for(;++a<r;){var d=e[a],m=n?n(d):d;if(d=i||d!==0?d:0,l&&m===m){for(var g=c.length;g--;)if(c[g]===m)continue e;n&&c.push(m),s.push(d)}else o(c,m,i)||(c!==s&&c.push(m),s.push(d))}return s}function Al(e){return e&&e.length?g1(e):[]}var f1=0;function hl(e){var n=++f1;return jr(e)+n}function A1(e,n,i){switch(i.length){case 0:return e.call(n);case 1:return e.call(n,i[0]);case 2:return e.call(n,i[0],i[1]);case 3:return e.call(n,i[0],i[1],i[2])}return e.apply(n,i)}var yl=Math.max;function h1(e,n,i){return n=yl(n===void 0?e.length-1:n,0),function(){for(var a=arguments,o=-1,r=yl(a.length-n,0),l=Array(r);++o<r;)l[o]=a[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=a[o];return s[n]=i(l),A1(e,this,s)}}function y1(e){return function(){return e}}var b1=li?function(e,n){return li(e,"toString",{configurable:!0,enumerable:!1,value:y1(n),writable:!0})}:ni;const w1=b1;var E1=800,C1=16,k1=Date.now;function B1(e){var n=0,i=0;return function(){var a=k1(),o=C1-(a-i);if(i=a,o>0){if(++n>=E1)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var I1=B1(w1);function S1(e,n){return I1(h1(e,n,ni),e+"")}function x1(e,n,i){if(!De(i))return!1;var a=typeof n;return(a=="number"?Sn(i)&&qi(n,i.length):a=="string"&&n in i)?vn(i[n],e):!1}var bl=Object.prototype,v1=bl.hasOwnProperty,O1=S1(function(e,n){e=Object(e);var i=-1,a=n.length,o=a>2?n[2]:void 0;for(o&&x1(n[0],n[1],o)&&(a=1);++i<a;)for(var r=n[i],l=ci(r),s=-1,c=l.length;++s<c;){var u=l[s],d=e[u];(d===void 0||vn(d,bl[u])&&!v1.call(e,u))&&(e[u]=r[u])}return e}),M1=Je.isFinite;function R1(e){return typeof e=="number"&&M1(e)}var wl=1/0,T1=17976931348623157e292;function N1(e){if(!e)return e===0?e:0;if(e=sa(e),e===wl||e===-wl){var n=e<0?-1:1;return n*T1}return e===e?e:0}function El(e){var n=N1(e),i=n%1;return n===n?i?n-i:n:0}function V1(e){return typeof e=="number"&&e==El(e)}var L1="[object Number]";function da(e){return typeof e=="number"||st(e)&&yt(e)==L1}var Cl=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Et="\\d\\d?",Ct="\\d\\d",D1="\\d{3}",j1="\\d{4}",Vn="[^\\s]+",kl=/\[([^]*?)\]/gm;function Bl(e,n){for(var i=[],a=0,o=e.length;a<o;a++)i.push(e[a].substr(0,n));return i}var Il=function(e){return function(n,i){var a=i[e].map(function(r){return r.toLowerCase()}),o=a.indexOf(n.toLowerCase());return o>-1?o:null}};function Gt(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var a=0,o=n;a<o.length;a++){var r=o[a];for(var l in r)e[l]=r[l]}return e}var Sl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xl=["January","February","March","April","May","June","July","August","September","October","November","December"],U1=Bl(xl,3),P1=Bl(Sl,3),vl={dayNamesShort:P1,dayNames:Sl,monthNamesShort:U1,monthNames:xl,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},ui=Gt({},vl),G1=function(e){return ui=Gt(ui,e)},Ol=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Ge=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},Y1={D:function(e){return String(e.getDate())},DD:function(e){return Ge(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return Ge(e.getDay())},ddd:function(e,n){return n.dayNamesShort[e.getDay()]},dddd:function(e,n){return n.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return Ge(e.getMonth()+1)},MMM:function(e,n){return n.monthNamesShort[e.getMonth()]},MMMM:function(e,n){return n.monthNames[e.getMonth()]},YY:function(e){return Ge(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return Ge(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return Ge(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return Ge(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return Ge(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return Ge(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return Ge(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return Ge(e.getMilliseconds(),3)},a:function(e,n){return e.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(e,n){return e.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+Ge(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+Ge(Math.floor(Math.abs(n)/60),2)+":"+Ge(Math.abs(n)%60,2)}},Ml=function(e){return+e-1},Rl=[null,Et],Tl=[null,Vn],Nl=["isPm",Vn,function(e,n){var i=e.toLowerCase();return i===n.amPm[0]?0:i===n.amPm[1]?1:null}],Vl=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var n=(e+"").match(/([+-]|\d\d)/gi);if(n){var i=+n[1]*60+parseInt(n[2],10);return n[0]==="+"?i:-i}return 0}],H1={D:["day",Et],DD:["day",Ct],Do:["day",Et+Vn,function(e){return parseInt(e,10)}],M:["month",Et,Ml],MM:["month",Ct,Ml],YY:["year",Ct,function(e){var n=new Date,i=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?i-1:i)+e)}],h:["hour",Et,void 0,"isPm"],hh:["hour",Ct,void 0,"isPm"],H:["hour",Et],HH:["hour",Ct],m:["minute",Et],mm:["minute",Ct],s:["second",Et],ss:["second",Ct],YYYY:["year",j1],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",Ct,function(e){return+e*10}],SSS:["millisecond",D1],d:Rl,dd:Rl,ddd:Tl,dddd:Tl,MMM:["month",Vn,Il("monthNamesShort")],MMMM:["month",Vn,Il("monthNames")],a:Nl,A:Nl,ZZ:Vl,Z:Vl},pi={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},F1=function(e){return Gt(pi,e)},z1=function(e,n,i){if(n===void 0&&(n=pi.default),i===void 0&&(i={}),typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");n=pi[n]||n;var a=[];n=n.replace(kl,function(r,l){return a.push(l),"@@@"});var o=Gt(Gt({},ui),i);return n=n.replace(Cl,function(r){return Y1[r](e,o)}),n.replace(/@@@/g,function(){return a.shift()})};function K1(e,n,i){if(i===void 0&&(i={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=pi[n]||n,e.length>1e3)return null;var a=new Date,o={year:a.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],l=[],s=n.replace(kl,function(w,A){return l.push(Ol(A)),"@@@"}),c={},u={};s=Ol(s).replace(Cl,function(w){var A=H1[w],f=A[0],y=A[1],k=A[3];if(c[f])throw new Error("Invalid format. "+f+" specified twice in format");return c[f]=!0,k&&(u[k]=!0),r.push(A),"("+y+")"}),Object.keys(u).forEach(function(w){if(!c[w])throw new Error("Invalid format. "+w+" is required in specified format")}),s=s.replace(/@@@/g,function(){return l.shift()});var d=e.match(new RegExp(s,"i"));if(!d)return null;for(var m=Gt(Gt({},ui),i),g=1;g<d.length;g++){var h=r[g-1],B=h[0],C=h[2],b=C?C(d[g],m):+d[g];if(b==null)return null;o[B]=b}o.isPm===1&&o.hour!=null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===0&&+o.hour==12&&(o.hour=0);var I;if(o.timezoneOffset==null){I=new Date(o.year,o.month,o.day,o.hour,o.minute,o.second,o.millisecond);for(var x=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],g=0,E=x.length;g<E;g++)if(c[x[g][0]]&&o[x[g][0]]!==I[x[g][1]]())return null}else if(I=new Date(Date.UTC(o.year,o.month,o.day,o.hour,o.minute-o.timezoneOffset,o.second,o.millisecond)),o.month>11||o.month<0||o.day>31||o.day<1||o.hour>23||o.hour<0||o.minute>59||o.minute<0||o.second>59||o.second<0)return null;return I}var ln={format:z1,parse:K1,defaultI18n:vl,setGlobalDateI18n:G1,setGlobalDateMasks:F1};const Te={fieldIsRequired:"This field is required!",invalidFormat:"Invalid format!",numberTooSmall:"The number is too small! Minimum: {0}",numberTooBig:"The number is too big! Maximum: {0}",invalidNumber:"Invalid number",invalidInteger:"The value is not an integer",textTooSmall:"The length of text is too small! Current: {0}, Minimum: {1}",textTooBig:"The length of text is too big! Current: {0}, Maximum: {1}",thisNotText:"This is not a text!",thisNotArray:"This is not an array!",selectMinItems:"Select minimum {0} items!",selectMaxItems:"Select maximum {0} items!",invalidDate:"Invalid date!",dateIsEarly:"The date is too early! Current: {0}, Minimum: {1}",dateIsLate:"The date is too late! Current: {0}, Maximum: {1}",invalidEmail:"Invalid e-mail address!",invalidURL:"Invalid URL!",invalidCard:"Invalid card format!",invalidCardNumber:"Invalid card number!",invalidTextContainNumber:"Invalid text! Cannot contains numbers or special characters",invalidTextContainSpec:"Invalid text! Cannot contains special characters"};function We(e,n,i=Te){return ke(e)||e===""?n?[Ee(i.fieldIsRequired)]:[]:null}function Ee(e,...n){if(e!=null&&n.length>0)for(let i=0;i<n.length;i++)e=e.replace("{"+(i-1)+"}",n[i]);return e}const Yt={resources:Te,required(e,n,i,a=Te){return We(e,n.required,a)},number(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=[];return R1(e)?(!ke(n.min)&&e<n.min&&r.push(Ee(a.numberTooSmall,n.min)),!ke(n.max)&&e>n.max&&r.push(Ee(a.numberTooBig,n.max))):r.push(Ee(a.invalidNumber)),r},integer(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=Yt.number(e,n,i,a);return V1(e)||r.push(Ee(a.invalidInteger)),r},double(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!da(e)||isNaN(e))return[Ee(a.invalidNumber)]},string(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=[];return Pt(e)?(!ke(n.min)&&e.length<n.min&&r.push(Ee(a.textTooSmall,e.length,n.min)),!ke(n.max)&&e.length>n.max&&r.push(Ee(a.textTooBig,e.length,n.max))):r.push(Ee(a.thisNotText)),r},array(e,n,i,a=Te){if(n.required){if(!Array.isArray(e))return[Ee(a.thisNotArray)];if(e.length===0)return[Ee(a.fieldIsRequired)]}if(!ke(e)){if(!ke(n.min)&&e.length<n.min)return[Ee(a.selectMinItems,n.min)];if(!ke(n.max)&&e.length>n.max)return[Ee(a.selectMaxItems,n.max)]}},date(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=new Date(e);if(isNaN(r.getDate()))return[Ee(a.invalidDate)];const l=[];if(!ke(n.min)){const s=new Date(n.min);r.valueOf()<s.valueOf()&&l.push(Ee(a.dateIsEarly,ln.format(r),ln.format(s)))}if(!ke(n.max)){const s=new Date(n.max);r.valueOf()>s.valueOf()&&l.push(Ee(a.dateIsLate,ln.format(r),ln.format(s)))}return l},regexp(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!ke(n.pattern)&&!new RegExp(n.pattern).test(e))return[Ee(a.invalidFormat)]},email(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e))return[Ee(a.invalidEmail)]},url(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(e))return[Ee(a.invalidURL)]},creditCard(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,l=e.replace(/[^0-9]+/g,"");if(!r.test(l))return[Ee(a.invalidCard)];let s=0,c,u,d;for(let m=l.length-1;m>=0;m--)c=l.substring(m,m+1),u=parseInt(c,10),d?(u*=2,u>=10?s+=u%10+1:s+=u):s+=u,d=!d;if(!(s%10===0&&l))return[Ee(a.invalidCardNumber)]},alpha(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!/^[a-zA-Z]*$/.test(e))return[Ee(a.invalidTextContainNumber)]},alphaNumeric(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!/^[a-zA-Z0-9]*$/.test(e))return[Ee(a.invalidTextContainSpec)]}};Object.keys(Yt).forEach(e=>{const n=Yt[e];Ae(n)&&(n.locale=i=>(a,o,r)=>n(a,o,r,O1(i,Te)))});function Ll(e){return Pt(e)?Yt[e]!=null?Yt[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function ua(e,n,i){let a=le(i.context,"schema.attributes",{});const o=n.value||"input";Pt(o)&&(a=le(a,o)||a),je(a,(r,l)=>{e.setAttribute(l,r)})}const Ue={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:ua,updated:ua,componentUpdated:ua}},computed:{value:{cache:!1,get(){let e;return Ae(le(this.schema,"get"))?e=this.schema.get(this.model):e=le(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),Ae(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=le(this.formOptions,"validateAsync",!1);let i=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const o=[];Array.isArray(this.schema.validator)?je(this.schema.validator,r=>{o.push(Ll(r).bind(this))}):o.push(Ll(this.schema.validator).bind(this)),je(o,r=>{if(n)i.push(r(this.value,this.schema,this.model));else{const l=r(this.value,this.schema,this.model);l&&Ae(l.then)?l.then(s=>{s&&(this.errors=this.errors.concat(s));const c=this.errors.length===0;this.$emit("validated",c,this.errors,this)}):l&&(i=i.concat(l))}})}const a=o=>{let r=[];je(Al(o),s=>{Array.isArray(s)&&s.length>0?r=r.concat(s):Pt(s)&&r.push(s)}),Ae(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,r,this.schema);const l=r.length===0;return e||this.$emit("validated",l,r,this),this.errors=r,r};return n?Promise.all(i).then(a):a(i)},debouncedValidate(){Ae(this.debouncedValidateFunc)||(this.debouncedValidateFunc=Tn(this.validate.bind(this),le(this.schema,"validateDebounceTime",le(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let i=!1;Ae(this.schema.set)?(this.schema.set(this.model,e),i=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,e),i=!0),i&&(this.$emit("modelUpdated",e,this.schema.model),Ae(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),le(this.formOptions,"validateAfterChanged",!1)===!0&&(le(this.schema,"validateDebounceTime",le(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(e,n){let i=e.replace(/\[(\w+)\]/g,".$1");i=i.replace(/^\./,"");let a=this.model;const o=i.split(".");let r=0;const l=o.length;for(;r<l;){const s=o[r];if(r<l-1)a[s]!==void 0||(a[s]={}),a=a[s];else{a[s]=n;return}++r}},getFieldID(e,n=!1){const i=le(this.formOptions,"fieldIdPrefix","");return ra(e,i)+(n?"-"+hl():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return le(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},pe=(e,n)=>{const i=e.__vccOpts||e;for(const[a,o]of n)i[a]=o;return i},q1={mixins:[Ue],emits:["model-updated"],data(){return{isOpen:!1}},computed:{openClass(){return this.isOpen?"open":"closed"},fieldCount(){return this.schema.fields.length},titleText(){return`${this.isOpen?"Hide":"View"} ${this.fieldCount} Advanced Fields`}},methods:{handleOpen(){this.isOpen=!this.isOpen},updateModel(e,n){this.$emit("model-updated",e,n)}}},X1={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},J1={class:"material-icons"};function Z1(e,n,i,a,o,r){const l=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",X1,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:n[0]||(n[0]=(...s)=>r.handleOpen&&r.handleOpen(...s))},[t.createElementVNode("i",J1,t.toDisplayString(o.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),t.createElementVNode("span",null,t.toDisplayString(r.titleText),1)]),t.createElementVNode("div",{class:t.normalizeClass(["advanced-field-dropdown",r.openClass])},[t.createVNode(l,{model:e.model,options:{helpAsHtml:!0},schema:e.schema,onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const Q1=pe(q1,[["render",Z1],["__scopeId","data-v-6f4089bd"]]),sn="24px",pa=(e,n)=>{const i=e.__vccOpts||e;for(const[a,o]of n)i[a]=o;return i},W1=e=>(t.pushScopeId("data-v-c1f7c39c"),e=e(),t.popScopeId(),e),_1=["aria-hidden"],$1={key:0,"data-testid":"kui-icon-svg-title"},ew=W1(()=>t.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),tw=t.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:sn,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),i=Number(n);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,i=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),r=Number(o);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return sn}),a=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,flexShrink:"0",height:i.value,lineHeight:"0",width:i.value}));return(o,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:t.normalizeStyle(a.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",$1,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),ew],8,_1))]),_:1},8,["aria-hidden","style"]))}}),Dl=pa(tw,[["__scopeId","data-v-c1f7c39c"]]),nw=e=>(t.pushScopeId("data-v-885f8053"),e=e(),t.popScopeId(),e),iw=["aria-hidden"],aw={key:0,"data-testid":"kui-icon-svg-title"},ow=nw(()=>t.createElementVNode("path",{d:"M5 13V11H19V13H5Z",fill:"currentColor"},null,-1)),rw=t.defineComponent({__name:"RemoveIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:sn,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),i=Number(n);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,i=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),r=Number(o);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return sn}),a=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,flexShrink:"0",height:i.value,lineHeight:"0",width:i.value}));return(o,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon remove-icon","data-testid":"kui-icon-wrapper-remove-icon",style:t.normalizeStyle(a.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-remove-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",aw,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),ow],8,iw))]),_:1},8,["aria-hidden","style"]))}}),lw=pa(rw,[["__scopeId","data-v-885f8053"]]),sw=e=>(t.pushScopeId("data-v-c73ebbaa"),e=e(),t.popScopeId(),e),cw=["aria-hidden"],dw={key:0,"data-testid":"kui-icon-svg-title"},uw=sw(()=>t.createElementVNode("path",{d:"M7 21C6.45 21 5.97917 20.8042 5.5875 20.4125C5.19583 20.0208 5 19.55 5 19V6H4V4H9V3H15V4H20V6H19V19C19 19.55 18.8042 20.0208 18.4125 20.4125C18.0208 20.8042 17.55 21 17 21H7ZM17 6H7V19H17V6ZM9 17H11V8H9V17ZM13 17H15V8H13V17Z",fill:"currentColor"},null,-1)),pw=t.defineComponent({__name:"TrashIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:sn,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),i=Number(n);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,i=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),r=Number(o);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return sn}),a=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,flexShrink:"0",height:i.value,lineHeight:"0",width:i.value}));return(o,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon trash-icon","data-testid":"kui-icon-wrapper-trash-icon",style:t.normalizeStyle(a.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-trash-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",dw,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),uw],8,cw))]),_:1},8,["aria-hidden","style"]))}}),Ln=pa(pw,[["__scopeId","data-v-c73ebbaa"]]),mw={class:"array-card-container"},gw=t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null}},emits:["remove-item"],setup(e){return(n,i)=>{const a=t.resolveComponent("KCard"),o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",mw,[t.createVNode(a,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",onClick:i[0]||(i[0]=r=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ln))]),_:1})])}}}),jl=pe(gw,[["__scopeId","data-v-7fbbde2b"]]),fw={class:"array-item-wrapper"},Aw={class:"array-item"},hw={class:"array-item-after"},yw=t.defineComponent({__name:"FieldArrayItem",props:{model:{type:String,default:""}},emits:["remove-item"],setup(e){return(n,i)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",fw,[t.createElementVNode("div",Aw,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"tertiary",class:"delete",onClick:i[0]||(i[0]=o=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ln))]),_:1})]),t.createElementVNode("div",hw,[t.renderSlot(n.$slots,"after",{},void 0,!0)])])}}}),Ul=pe(yw,[["__scopeId","data-v-b34d3920"]]),bw=e=>(t.pushScopeId("data-v-37458a0a"),e=e(),t.popScopeId(),e),ww={class:"multi-item-wrapper"},Ew=bw(()=>t.createElementVNode("hr",null,null,-1)),Cw=t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,i)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",ww,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"danger",class:"delete",onClick:i[0]||(i[0]=o=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createTextVNode(" - Remove Field ")]),_:1}),Ew])}}}),Pl=pe(Cw,[["__scopeId","data-v-37458a0a"]]),kw="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function Bw(e){return e?e.length===36&&new RegExp(`^${kw}$`).test(e):!1}const ma=50,Ht={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"};function Iw(e,n,i){return i?Ht.SET_REFERRAL_VALUE:e&&!n||!e&&n?Ht.UPDATE_ENTITY:e&&n?Ht.CREATE_FROM_ENTITY:Ht.CREATE_NOT_FROM_ENTITY}const Sw={mixins:[Ue],inject:[bt],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Iw(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search}},async created(){await this.$nextTick();let e,n;switch(this.fieldState){case Ht.UPDATE_ENTITY:if(!this[bt]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[bt].getOne(this.entity,this.model[this.schema.model])).data,e=this.getItem(this.schema.entityDataKey?n[this.schema.entityDataKey]:n),this.idValue=e.id;break;case Ht.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Ht.SET_REFERRAL_VALUE:this.idValue=this.value}try{e&&(this.initialItems=[{...e,label:this.getSuggestionLabel(e),value:e.id}]),this.items=this.initialItems}catch(i){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",i)}},methods:{onQueryChange(e){e.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=Tn(this.search,500)),this.performSearch(e)},async search(e){if(e.trim().length===0)return;this.loading=!0;const n=[],i=[],a=this.getInputFields(),o=new Set;Bw(e)&&a.includes("id")?i.push((async()=>{const r=await this.fetchExact(e);n.push({...r,label:this.getSuggestionLabel(r),value:r.id})})()):i.push(...a.filter(r=>r!=="id").map(async r=>{(await this.fetchSuggestions(e,r)).forEach(l=>{o.has(l.id)||(o.add(l.id),n.push({...l,label:this.getSuggestionLabel(l),value:l.id}))})})),await Promise.all(i),this.items=n,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e){const n=[];let i=null;if(!this[bt])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<ma;){const a=await this[bt].getAll(this.entity,{size:ma,offset:i,...e});if(n.push(...a.data.data),i=a.data.offset,!i)break}return n.slice(0,ma)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[bt]?(await this[bt].getOne(this.entity,e)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var e,n;return((n=(e=this.schema)==null?void 0:e.inputValues)==null?void 0:n.fields)||[]},getSuggestionLabel(e){const n=this.getInputFields();return n.length&&e?n.map(i=>e[i]).filter(Boolean).join(" - "):""},updateModel(e){this.$emit("model-updated",e!=null&&e.length?e:null,this.schema.model)},onSelected(e){this.idValue=e&&e.id,this.updateModel(this.getReturnValue(e||{}))},getReturnValue(e){var n;const i=(n=this.schema)==null?void 0:n.returnKey;return i?e[i]:e.id}}},xw={class:"field-wrap autosuggest"},vw=["data-testid","data-testlabel"],Ow=["data-testid"],Mw={class:"autosuggest__results_message"};function Rw(e,n,i,a,o,r){const l=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock("div",xw,[t.createVNode(l,{id:e.schema.model,ref:"suggestion",modelValue:o.idValue,"onUpdate:modelValue":n[0]||(n[0]=s=>o.idValue=s),clearable:"","enable-filtering":"","filter-function":()=>!0,items:o.items,loading:o.loading,placeholder:e.schema.placeholder,width:"100%",onChange:r.onSelected,onQueryChange:r.onQueryChange},{"item-template":t.withCtx(({item:s})=>[t.createElementVNode("span",{class:"first-part","data-testid":s.id&&`${s.id}-0`,"data-testlabel":s.label},t.toDisplayString(r.getSuggestionLabel(s).split(" - ")[0]),9,vw),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.getSuggestionLabel(s).split(" - ").slice(1),(c,u)=>(t.openBlock(),t.createElementBlock("span",{key:u,class:"field-span","data-testid":s.id&&`${s.id}-${u+1}`||u+1},t.toDisplayString(c),9,Ow))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",Mw,[t.createElementVNode("span",null,t.toDisplayString(o.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const Gl=pe(Sw,[["render",Rw],["__scopeId","data-v-dd2fda9e"]]);function Tw(e){const n=t.ref([]),i=t.ref(null),a=C=>Pt(C)?Yt[C]!=null?Yt[C]:(console.warn(`'${C}' is not a validator function!`),null):C,o=t.computed({get(){var C,b;let I;return Ae(le(e.schema,"get"))?I=e.schema.get((C=e.model)==null?void 0:C.value):I=le((b=e.model)==null?void 0:b.value,e.schema.model),h(I)},set(C){const b=o;C=B(C),Ae(C)?C(C,b):s(C,b)}}),r=C=>{var b;c();const I=(b=e.schema)==null?void 0:b.validator,x=le(e.formOptions,"validateAsync",!1);let E=[];if(I&&e.schema.readonly!==!0&&e.disabled!==!0){const A=[];Array.isArray(I)?je(I,f=>{A.push(a(f))}):A.push(a(I)),je(A,f=>{var y,k;if(x)E.push(f(o.value,e.schema,(y=e.model)==null?void 0:y.value));else{const V=f(o.value,e.schema,(k=e.model)==null?void 0:k.value);V&&Ae(V.then)?V.then(S=>{S&&(n.value=n.value.concat(S));const O=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:O,errors:n.value,field:e.schema})}):V&&(E=E.concat(V))}})}const w=A=>{var f,y;let k=[];if(je(Al(A),V=>{Array.isArray(V)&&V.length>0?k=k.concat(V):Pt(V)&&k.push(V)}),Ae((f=e.schema)==null?void 0:f.onValidated)&&e.schema.onValidated((y=e.model)==null?void 0:y.value,k,e.schema),!C){const V=k.length===0;e.emitValidated&&e.emitValidated({isValid:V,errors:k,field:e.schema})}return A=k,k};return x?Promise.all(E).then(w):w(E)},l=()=>{Ae(i.value)?i.value():i.value=Tn(r,le(e.schema,"validateDebounceTime",le(e.formOptions,"validateDebounceTime",500)))},s=(C,b)=>{var I,x,E;let w=!1;Ae(e.schema.set)?(e.schema.set((I=e.model)==null?void 0:I.value,C),w=!0):e.schema.model&&(u(e.schema.model,C),w=!0),w&&(e.emitModelUpdated&&(x=e.model)!=null&&x.value&&e.emitModelUpdated({value:C,model:e.schema.model}),Ae(e.schema.onChanged)&&e.schema.onChanged((E=e.model)==null?void 0:E.value,C,b,e.schema),le(e.formOptions,"validateAfterChanged",!1)===!0&&(le(e.schema,"validateDebounceTime",le(e.formOptions,"validateDebounceTime",0))>0?l():r()))},c=()=>{n.value.splice(0)},u=(C,b)=>{var I;let x=C.replace(/\[(\w+)\]/g,".$1");x=x.replace(/^\./,"");let E=((I=e.model)==null?void 0:I.value)||{},w=0;const A=x.split("."),f=A.length;for(;w<f;){const y=A[w];if(w<f-1)E[y]!==void 0||(E[y]={}),E=E[y];else{E[y]=b;return}++w}},d=(C,b=!1)=>{const I=le(e.formOptions,"fieldIdPrefix","");return ra(C,I)+(b?"-"+hl():"")},m=C=>`${d(C)}-label`,g=()=>le(e.schema,"fieldClasses",[]),h=C=>C,B=C=>C;return{value:o,clearValidationErrors:c,getFieldID:d,getLabelId:m,getFieldClasses:g,updateModelValue:s}}const Yl={useAbstractFields:Tw},Nw={class:"form-field-wrapper"},Vw=t.defineComponent({__name:"FieldInput",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:i}){const a=e,o=i,r=t.toRefs(a),l=t.inject(Qe,void 0),{updateModelValue:s,getFieldID:c,clearValidationErrors:u,value:d}=Yl.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:E=>{o("modelUpdated",E.value,E.model)}});n({clearValidationErrors:u});const m=t.computed(()=>{var E;const w=(E=a.schema)==null?void 0:E.inputType.toLowerCase();return w==="string"?"text":w==="datetime"?"datetime-local":w||"text"}),g={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},h=(E,w)=>{var A,f;let y=E;const k=g[m.value]||"",V=ln.parse(E,k);V&&((A=a.schema)!=null&&A.format?y=ln.format(V,(f=a.schema)==null?void 0:f.format):y=V.valueOf()),s(y,w)},B=(E,w)=>{da(E)||(E=NaN),s(E,w)},C=E=>{let w=E;switch(m.value){case"number":case"range":da(parseFloat(E))&&(w=parseFloat(E));break}d.value=w,s(w,E)},b=E=>{d.value=E,s(E,E)},I=t.ref(null),x=()=>{var E;Ae(I.value)&&((E=I.value)==null||E.flush())};return t.onMounted(()=>{switch(m.value){case"number":case"range":I.value=Tn((E,w)=>{B(E,w)},parseInt(le(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":I.value=Tn((E,w)=>{h(E,w)},parseInt(le(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}}),t.onBeforeMount(()=>{m.value==="checkbox"?console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead."):m.value==="radio"?console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead."):m.value==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}),(E,w)=>{const A=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Nw,[t.createVNode(A,t.mergeProps(E.$attrs,{id:t.unref(c)(e.schema),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||null,help:e.hint?e.hint:m.value==="color"||m.value==="range"?t.unref(d):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(d),name:e.schema.inputName,pattern:e.schema.pattern,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,type:m.value,width:e.schema.width,onBlur:x,"onUpdate:modelValue":C}),null,16,["id","autocomplete","class","disabled","help","max","maxlength","min","minlength","model-value","name","pattern","placeholder","readonly","required","type","width"]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(l)),{schema:e.schema,update:b,value:t.unref(d)},null,8,["schema","value"]))])}}}),Hl=pe(Vw,[["__scopeId","data-v-970ef0c7"]]),Lw={name:"FieldMetric",components:{AddIcon:Dl,TrashIcon:Ln},mixins:[Ue],emits:["remove-item"],data(){return{contentVisible:!1}}},Dw={key:0,class:"content"};function jw(e,n,i,a,o,r){const l=t.resolveComponent("AddIcon"),s=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field-dropdown",{active:o.contentVisible}])},[t.createElementVNode("div",{class:"title",onClick:n[0]||(n[0]=u=>o.contentVisible=!o.contentVisible)},[t.createTextVNode(t.toDisplayString(e.model.name?e.model.name:"New Item")+" ",1),t.createVNode(l,{class:"metric-add-icon"})]),t.createVNode(t.Transition,{name:"slide-fade"},{default:t.withCtx(()=>[o.contentVisible?(t.openBlock(),t.createElementBlock("div",Dw,[t.renderSlot(e.$slots,"default"),t.createVNode(c,{appearance:"tertiary",class:"metric-remove-button",onClick:n[1]||(n[1]=u=>e.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const Fl=pe(Lw,[["render",jw]]),Uw={mixins:[Ue],data(){return{attributes:this.schema?this.schema.attributes:void 0,newKeyType:"string",newKeyName:"",keyTypes:{}}},created(){this.value||(this.value={})},mounted(){if(!this.value)return;const e=Object.keys(this.value),n={};for(let i=0;i<e.length;i++){const a=e[i];n[a]=typeof this.value[a]}this.keyTypes=n},methods:{removeElement(e){const n=this.value;delete n[e],this.value=JSON.parse(JSON.stringify(n));const i=this.keyTypes;delete i[e],this.keyTypes=JSON.parse(JSON.stringify(i))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""}}},ga=e=>(t.pushScopeId("data-v-dfa59f5c"),e=e(),t.popScopeId(),e),Pw={class:"field-object-container"},Gw={key:1},Yw=["id"],Hw={key:0},Fw=["onUpdate:modelValue"],zw={key:1},Kw=["onUpdate:modelValue"],qw={key:2},Xw=["onUpdate:modelValue"],Jw=["onClick"],Zw=ga(()=>t.createElementVNode("option",{value:"string"}," String ",-1)),Qw=ga(()=>t.createElementVNode("option",{value:"number"}," Number ",-1)),Ww=ga(()=>t.createElementVNode("option",{value:"boolean"}," Boolean ",-1)),_w=[Zw,Qw,Ww];function $w(e,n,i,a,o,r){const l=t.resolveComponent("vue-form-generator"),s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",Pw,[e.schema.schema?(t.openBlock(),t.createBlock(l,{key:0,model:e.value,options:e.formOptions,schema:e.schema.schema},null,8,["model","options","schema"])):(t.openBlock(),t.createElementBlock("div",Gw,[t.createElementVNode("table",{id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(c,u)=>(t.openBlock(),t.createElementBlock("tr",{key:u},[t.createElementVNode("td",null,t.toDisplayString(u),1),o.keyTypes[u]==="string"?(t.openBlock(),t.createElementBlock("td",Hw,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":d=>e.value[u]=d,type:"text"},null,8,Fw),[[t.vModelText,e.value[u]]])])):t.createCommentVNode("",!0),o.keyTypes[u]==="boolean"?(t.openBlock(),t.createElementBlock("td",zw,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":d=>e.value[u]=d,type:"checkbox"},null,8,Kw),[[t.vModelCheckbox,e.value[u]]])])):t.createCommentVNode("",!0),o.keyTypes[u]==="number"?(t.openBlock(),t.createElementBlock("td",qw,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":d=>e.value[u]=d,type:"number"},null,8,Xw),[[t.vModelText,e.value[u]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:d=>r.removeElement(u)},null,8,Jw)])]))),128))],10,Yw),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":n[0]||(n[0]=c=>o.newKeyType=c)},_w,512),[[t.vModelSelect,o.newKeyType]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[1]||(n[1]=c=>o.newKeyName=c),type:"text"},null,512),[[t.vModelText,o.newKeyName]]),t.createElementVNode("input",{type:"button",value:"Add key",onClick:n[2]||(n[2]=(...c)=>r.addKey&&r.addKey(...c))})]))])),[[s,o.attributes]])}const zl=pe(Uw,[["render",$w],["__scopeId","data-v-dfa59f5c"]]),e0={components:{TrashIcon:Ln},mixins:[Ue],inject:{autofillSlot:{from:Qe,default:void 0}},emits:["model-updated"],data(){return{newKeyName:""}},computed:{subSchema(){return this.schema.schema&&this.schema.schema.fields[0].schema},subFields(){return!this.subSchema&&this.schema.fields},hasObjectKeys(){return this.value&&Object.keys(this.value).length>0},transformedModel(){return this.subSchema&&this.subSchema.fields.length>=1&&this.subSchema.fields[0].type==="array"?new Proxy(this.model[this.schema.model],{get:(e,n)=>({[this.schema.model]:e[n]}),set:(e,n,i)=>e[n]=i[this.schema.model]}):this.model[this.schema.model]}},mounted(){this.value||(this.value={});let e=[];this.subSchema?e=this.subSchema.fields:this.subFields&&(e=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,e,this.schema.model)},methods:{removeElement(e){const n=this.value;delete n[e],this.value={...n}},transformMapModelValuesToObject(e,n,i){const a={};return Object.keys(e).map(o=>{const r=o.indexOf(i+"-");if(r>-1&&Array.isArray(n))if(n.length>0){const l=o.split("-").filter(c=>n.find(u=>u.model===c)),s=o.split(`-${l}`)[0].split(`${i}-`)[1];l.length?a[s]={...a[s],[l]:e[o]}:a[o.substring(r+`${i}-`.length)]=e[o]}else a[o.substring(`${i}-`.length)]=e[o];else{const l=o.split("-").filter(c=>c===this.schema.model),s=o.split(`-${l}`)[0].split(`${i}-`)[1];s&&(a[s]=e[o])}return o}),a},addKey(){const e=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",n=this.subSchema?e?[""]:{}:"";this.value[this.newKeyName]=n,this.newKeyName=""},updateModel(e,n){this.$emit("model-updated",this.model[this.schema.model],n)}}},Kl=e=>(t.pushScopeId("data-v-3a00058c"),e=e(),t.popScopeId(),e),t0=["id"],n0=["data-testid"],i0={class:"item-wrapper"},a0={class:"index-wrapper"},o0=Kl(()=>t.createElementVNode("hr",{class:"divider"},null,-1)),r0={key:0},l0={key:1},s0=["onUpdate:modelValue","placeholder","onInput"],c0={key:0,class:"hint"},d0=Kl(()=>t.createElementVNode("hr",{class:"wide-divider"},null,-1)),u0={class:"input-item"},p0=["placeholder"],m0={key:0,class:"hint"};function g0(e,n,i,a,o,r){const l=t.resolveComponent("TrashIcon"),s=t.resolveComponent("KButton"),c=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",{id:e.getFieldID(e.schema),class:t.normalizeClass(["object-advanced-wrapper",e.schema.fieldClasses])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(u,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,"data-testid":`field-object-key-${d}`},[t.createElementVNode("div",null,[t.createElementVNode("div",i0,[t.createElementVNode("div",a0,[t.createElementVNode("strong",null,t.toDisplayString(d),1),t.createElementVNode("div",null,[t.createVNode(s,{appearance:"tertiary",class:"delete",icon:"",type:"button",onClick:m=>r.removeElement(d)},{default:t.withCtx(()=>[t.createVNode(l)]),_:2},1032,["onClick"])])]),o0,r.subSchema?(t.openBlock(),t.createElementBlock("div",r0,[t.createVNode(c,{model:r.transformedModel[d],options:{helpAsHtml:!0},schema:r.subSchema,onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",l0,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":m=>e.value[d]=m,class:"form-control",placeholder:e.schema.fields&&e.schema.fields[0].schema.placeholder,type:"text",onInput:m=>r.updateModel(e.value[d],e.model[e.schema.model])},null,40,s0),[[t.vModelText,e.value[d]]]),e.schema.fields&&e.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",c0,t.toDisplayString(e.schema.fields[0].schema.hint),1)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema.fields&&e.schema.fields[0].schema||e.schema.values,update:m=>e.value[d]=m,value:e.value[d]},null,8,["schema","update","value"]))])),d0])])],8,n0))),128)),t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper",{indent:r.hasObjectKeys}])},[t.createElementVNode("div",u0,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>o.newKeyName=u),class:"form-control","data-testid":"keyname-input",placeholder:e.schema.placeholder,type:"text"},null,8,p0),[[t.vModelText,o.newKeyName]]),t.createVNode(s,{appearance:"tertiary","data-testid":"add-key",disabled:!o.newKeyName,onClick:r.addKey},{default:t.withCtx(()=>[t.createTextVNode(" + Add "+t.toDisplayString(e.schema.buttonLabel||e.schema.label),1)]),_:1},8,["disabled","onClick"])]),e.schema.hintText?(t.openBlock(),t.createElementBlock("p",m0,t.toDisplayString(e.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,t0)}const ql=pe(e0,[["render",g0],["__scopeId","data-v-3a00058c"]]),f0={mixins:[Ue],emits:["model-updated"],methods:{updateModel(e){this.$emit("model-updated",e,this.schema.model)},checkOption(e){return this.model[this.schema.model]?e.value.toString()===this.model[this.schema.model].toString():e.checked},onChange(e){let n=e.target.value.split(",");this.schema.array||(n=n.toString()),this.updateModel(n)}}},A0={class:"selection-group"},h0={class:"form-group"},y0=["id","checked","name","value"];function b0(e,n,i,a,o,r){return t.openBlock(),t.createElementBlock("div",A0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(l,s)=>(t.openBlock(),t.createElementBlock("div",{key:s,class:"option-group"},[t.createElementVNode("div",h0,[t.createElementVNode("label",{class:t.normalizeClass(["k-label",l.name])},[t.createElementVNode("input",{id:e.schema.name+"-"+s,checked:r.checkOption(l),class:"k-input",name:e.schema.name,type:"radio",value:l.value,onChange:n[0]||(n[0]=(...c)=>r.onChange&&r.onChange(...c))},null,40,y0),t.createTextVNode(" "+t.toDisplayString(l.name),1)],2)])]))),128))])}const Xl=pe(f0,[["render",b0],["__scopeId","data-v-33d6c694"]]);function w0(e,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(e[i],i,e))return!0;return!1}var E0=1,C0=2;function Jl(e,n,i,a,o,r){var l=i&E0,s=e.length,c=n.length;if(s!=c&&!(l&&c>s))return!1;var u=r.get(e),d=r.get(n);if(u&&d)return u==n&&d==e;var m=-1,g=!0,h=i&C0?new Nn:void 0;for(r.set(e,n),r.set(n,e);++m<s;){var B=e[m],C=n[m];if(a)var b=l?a(C,B,m,n,e,r):a(B,C,m,e,n,r);if(b!==void 0){if(b)continue;g=!1;break}if(h){if(!w0(n,function(I,x){if(!fl(h,x)&&(B===I||o(B,I,i,a,r)))return h.push(x)})){g=!1;break}}else if(!(B===C||o(B,C,i,a,r))){g=!1;break}}return r.delete(e),r.delete(n),g}function k0(e){var n=-1,i=Array(e.size);return e.forEach(function(a,o){i[++n]=[o,a]}),i}var B0=1,I0=2,S0="[object Boolean]",x0="[object Date]",v0="[object Error]",O0="[object Map]",M0="[object Number]",R0="[object RegExp]",T0="[object Set]",N0="[object String]",V0="[object Symbol]",L0="[object ArrayBuffer]",D0="[object DataView]",Zl=lt?lt.prototype:void 0,fa=Zl?Zl.valueOf:void 0;function j0(e,n,i,a,o,r,l){switch(i){case D0:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case L0:return!(e.byteLength!=n.byteLength||!r(new di(e),new di(n)));case S0:case x0:case M0:return vn(+e,+n);case v0:return e.name==n.name&&e.message==n.message;case R0:case N0:return e==n+"";case O0:var s=k0;case T0:var c=a&B0;if(s||(s=ca),e.size!=n.size&&!c)return!1;var u=l.get(e);if(u)return u==n;a|=I0,l.set(e,n);var d=Jl(s(e),s(n),a,o,r,l);return l.delete(e),d;case V0:if(fa)return fa.call(e)==fa.call(n)}return!1}var U0=1,P0=Object.prototype,G0=P0.hasOwnProperty;function Y0(e,n,i,a,o,r){var l=i&U0,s=ta(e),c=s.length,u=ta(n),d=u.length;if(c!=d&&!l)return!1;for(var m=c;m--;){var g=s[m];if(!(l?g in n:G0.call(n,g)))return!1}var h=r.get(e),B=r.get(n);if(h&&B)return h==n&&B==e;var C=!0;r.set(e,n),r.set(n,e);for(var b=l;++m<c;){g=s[m];var I=e[g],x=n[g];if(a)var E=l?a(x,I,g,n,e,r):a(I,x,g,e,n,r);if(!(E===void 0?I===x||o(I,x,i,a,r):E)){C=!1;break}b||(b=g=="constructor")}if(C&&!b){var w=e.constructor,A=n.constructor;w!=A&&"constructor"in e&&"constructor"in n&&!(typeof w=="function"&&w instanceof w&&typeof A=="function"&&A instanceof A)&&(C=!1)}return r.delete(e),r.delete(n),C}var H0=1,Ql="[object Arguments]",Wl="[object Array]",mi="[object Object]",F0=Object.prototype,_l=F0.hasOwnProperty;function z0(e,n,i,a,o,r){var l=Ze(e),s=Ze(n),c=l?Wl:Mn(e),u=s?Wl:Mn(n);c=c==Ql?mi:c,u=u==Ql?mi:u;var d=c==mi,m=u==mi,g=c==u;if(g&&ti(e)){if(!ti(n))return!1;l=!0,d=!1}if(g&&!d)return r||(r=new ct),l||Mr(e)?Jl(e,n,i,a,o,r):j0(e,n,c,i,a,o,r);if(!(i&H0)){var h=d&&_l.call(e,"__wrapped__"),B=m&&_l.call(n,"__wrapped__");if(h||B){var C=h?e.value():e,b=B?n.value():n;return r||(r=new ct),o(C,b,i,a,r)}}return g?(r||(r=new ct),Y0(e,n,i,a,o,r)):!1}function Aa(e,n,i,a,o){return e===n?!0:e==null||n==null||!st(e)&&!st(n)?e!==e&&n!==n:z0(e,n,i,a,Aa,o)}var K0=1,q0=2;function X0(e,n,i,a){var o=i.length,r=o,l=!a;if(e==null)return!r;for(e=Object(e);o--;){var s=i[o];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<r;){s=i[o];var c=s[0],u=e[c],d=s[1];if(l&&s[2]){if(u===void 0&&!(c in e))return!1}else{var m=new ct;if(a)var g=a(u,d,c,e,n,m);if(!(g===void 0?Aa(d,u,K0|q0,a,m):g))return!1}}return!0}function $l(e){return e===e&&!De(e)}function J0(e){for(var n=on(e),i=n.length;i--;){var a=n[i],o=e[a];n[i]=[a,o,$l(o)]}return n}function es(e,n){return function(i){return i==null?!1:i[e]===n&&(n!==void 0||e in Object(i))}}function Z0(e){var n=J0(e);return n.length==1&&n[0][2]?es(n[0][0],n[0][1]):function(i){return i===e||X0(i,e,n)}}function Q0(e,n){return e!=null&&n in Object(e)}function W0(e,n,i){n=Ur(n,e);for(var a=-1,o=n.length,r=!1;++a<o;){var l=ri(n[a]);if(!(r=e!=null&&i(e,l)))break;e=e[l]}return r||++a!=o?r:(o=e==null?0:e.length,!!o&&Xi(o)&&qi(l,o)&&(Ze(e)||Br(e)))}function _0(e,n){return e!=null&&W0(e,n,Q0)}var $0=1,eE=2;function tE(e,n){return Wi(e)&&$l(n)?es(ri(e),n):function(i){var a=le(i,e);return a===void 0&&a===n?_0(i,e):Aa(n,a,$0|eE)}}function nE(e){return function(n){return n==null?void 0:n[e]}}function iE(e){return function(n){return Pr(n,e)}}function aE(e){return Wi(e)?nE(ri(e)):iE(e)}function ts(e){return typeof e=="function"?e:e==null?ni:typeof e=="object"?Ze(e)?tE(e[0],e[1]):Z0(e):aE(e)}function oE(e){return function(n,i,a){var o=Object(n);if(!Sn(n)){var r=ts(i);n=on(n),i=function(s){return r(o[s],s,o)}}var l=e(n,i,a);return l>-1?o[r?n[l]:l]:void 0}}var rE=Math.max;function lE(e,n,i){var a=e==null?0:e.length;if(!a)return-1;var o=i==null?0:El(i);return o<0&&(o=rE(a+o,0)),gl(e,ts(n),o)}var sE=oE(lE);const cE=["disabled","name","id"],dE=["disabled"],uE=["label"],pE=["value"],mE=["value"];function gE(e,n,i,a,o,r){const l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("select",{class:t.normalizeClass(["form-control",e.schema.fieldClasses]),"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),disabled:e.disabled||null,name:e.schema.inputName,id:e.getFieldID(e.schema)},[r.selectOptions.hideNoneSelectedText?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("option",{key:0,disabled:e.schema.required||null,value:null},t.toDisplayString(r.selectOptions.noneSelectedText||"<Nothing selected>"),9,dE)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[s.group?(t.openBlock(),t.createElementBlock("optgroup",{key:0,label:r.getGroupName(s)},[s.ops?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(s.ops,c=>(t.openBlock(),t.createElementBlock("option",{value:r.getItemValue(c)},t.toDisplayString(r.getItemName(c)),9,pE))),256)):t.createCommentVNode("",!0)],8,uE)):t.createCommentVNode("",!0),s.group?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("option",{key:1,value:r.getItemValue(s)},t.toDisplayString(r.getItemName(s)),9,mE))],64))),256))],10,cE)),[[t.vModelSelect,e.value],[l,"input"]])}const fE={mixins:[Ue],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const e=this.schema.values;return typeof e=="function"?this.groupValues(e.apply(this,[this.model,this.schema])):this.groupValues(e)}},methods:{formatValueToField(e){return ke(e)?null:e},groupValues(e){const n=[];let i={};return e.forEach(a=>{i=null,a.group&&De(a)?(i=sE(n,o=>o.group===a.group),i?i.ops.push({id:a.id,name:a.name}):(i={group:"",ops:[]},i.group=a.group,i.ops.push({id:a.id,name:a.name}),n.push(i))):n.push(a)}),n},getGroupName(e){if(e&&e.group)return e.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(e){if(De(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return e[this.schema.selectOptions.value];if(typeof e.id<"u")return e.id;throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return e},getItemName(e){if(De(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return e[this.schema.selectOptions.name];if(typeof e.name<"u")return e.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return e}}},ns=pe(fE,[["render",gE]]),AE={name:"FieldArray",components:{FieldArrayItem:Ul,FieldArrayMultiItem:Pl,FieldSelect:ns,FieldMetric:Fl,FieldObject:zl,FieldObjectAdvanced:ql,FieldAutoSuggest:Gl,FieldRadio:Xl,FieldArrayCardContainer:jl,FieldInput:Hl},mixins:[Ue],inject:{autofillSlot:{from:Qe,default:void 0}},props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(e,n,i){var a,o,r;let l;return n&&(l=JSON.parse(JSON.stringify(n)),(r=(o=(a=l.schema)==null?void 0:a.fields)==null?void 0:o.map)==null||r.call(o,s=>(s.id=`${s.id||s.model}-${i}`,s))),{...l,set(s,c){e[i]=c},get(){return e[i]}}},newElement(){let e=this.value,n;(!e||!e.push)&&(e=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?n=this.schema.items.default():n=this.schema.items.default),e.push(n),this.value=[...e]},removeElement(e){this.value=this.value.filter((n,i)=>i!==e)},getFieldType(e){return"field-"+e.type},modelUpdated(){}}},hE=["id"],yE={key:1},bE=["onUpdate:modelValue","aria-labelledby","type"],wE=["onUpdate:modelValue","aria-labelledby"];function EE(e,n,i,a,o,r){const l=t.resolveComponent("KTextArea"),s=t.resolveComponent("KInput"),c=t.resolveComponent("KButton");return e.schema?(t.openBlock(),t.createElementBlock("div",{key:0,id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(u,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:t.normalizeClass(e.schema.fieldItemsClasses)},[e.schema.items&&e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:0,model:u,schema:r.generateSchema(e.value,e.schema.items,d),onRemoveItem:m=>r.removeElement(d)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(e.schema.items)),{"form-options":e.formOptions,model:u,schema:r.generateSchema(e.value,e.schema.items,d),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",yE,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(e.schema.items)),{"form-options":e.formOptions,model:u,schema:r.generateSchema(e.value,e.schema.items,d),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:2,"data-testid":`${e.getFieldID(e.schema)}-item-${d}`,model:u,schema:r.generateSchema(e.value,e.schema.items,d),onRemoveItem:m=>r.removeElement(d)},{after:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:m=>e.value[d]=m,value:e.value[d]},null,8,["schema","update","value"]))]),default:t.withCtx(()=>{var m;return[e.schema.inputAttributes&&e.schema.inputAttributes.type==="textarea"?(t.openBlock(),t.createBlock(l,t.mergeProps({key:0,ref_for:!0},e.schema.inputAttributes,{id:e.getFieldID(e.schema),modelValue:e.value[d],"onUpdate:modelValue":g=>e.value[d]=g,"aria-labelledby":e.getLabelId(e.schema),class:e.schema.fieldClasses,maxlength:e.schema.max,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,rows:e.schema.rows||2}),null,16,["id","modelValue","onUpdate:modelValue","aria-labelledby","class","maxlength","minlength","name","placeholder","readonly","required","rows"])):!e.schema.inputAttributes||!e.schema.inputAttributes.type||e.schema.inputAttributes.type==="text"?(t.openBlock(),t.createBlock(s,t.mergeProps({key:1,modelValue:e.value[d],"onUpdate:modelValue":g=>e.value[d]=g,"aria-labelledby":e.getLabelId(e.schema),ref_for:!0},e.schema.inputAttributes,{type:e.schema.inputAttributes&&e.schema.inputAttributes.type||"text"}),null,16,["modelValue","onUpdate:modelValue","aria-labelledby","type"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,"onUpdate:modelValue":g=>e.value[d]=g,"aria-labelledby":e.getLabelId(e.schema),ref_for:!0},e.schema.inputAttributes,{type:((m=e.schema.inputAttributes)==null?void 0:m.type)||"text"}),null,16,bE)),[[t.vModelDynamic,e.value[d]]])]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.withDirectives(t.createElementVNode("input",t.mergeProps({ref_for:!0},e.schema.inputAttributes,{"onUpdate:modelValue":m=>e.value[d]=m,"aria-labelledby":e.getLabelId(e.schema),type:"text"}),null,16,wE),[[t.vModelText,e.value[d]]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:m=>e.value[d]=m,value:e.value[d]},null,8,["schema","update","value"]))],64))],2))),128)),t.createVNode(c,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`add-${e.getFieldID(e.schema)}`,type:"button",onClick:r.newElement},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel||i.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,hE)):t.createCommentVNode("",!0)}const CE=pe(AE,[["render",EE],["__scopeId","data-v-df18c37c"]]),kE={mixins:[Ue]},BE=["id","autocomplete","disabled","name","required"];function IE(e,n,i,a,o,r){const l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("input",{id:e.getFieldID(e.schema),type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,name:e.schema.inputName,class:t.normalizeClass(e.schema.fieldClasses),required:e.schema.required},null,10,BE)),[[t.vModelCheckbox,e.value],[l,"input"]])}const SE=pe(kE,[["render",IE]]);var xE=4;function is(e){return Rn(e,xE)}const vE={class:"wrapper"},OE=["disabled"],ME=["id","checked","disabled","onChange","name"],RE=["disabled"],TE={class:"info"},NE=t.createElementVNode("div",{class:"arrow"},null,-1),VE={class:"dropList"},LE=["id","checked","disabled","onChange","name"];function DE(e,n,i,a,o,r){const l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",vE,[e.schema.listBox?(t.openBlock(),t.createElementBlock("div",{key:0,class:"listbox form-control",disabled:e.disabled||null},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(s)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(s)||null,disabled:e.disabled||null,onChange:c=>r.onChanged(c,s),name:r.getInputName(s)},null,40,ME),[[l,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(s)),1)])],2))),256))],8,OE)):t.createCommentVNode("",!0),e.schema.listBox?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:"combobox form-control",disabled:e.disabled||null},[t.createElementVNode("div",{class:t.normalizeClass(["mainRow",{expanded:o.comboExpanded}]),onClick:n[0]||(n[0]=(...s)=>r.onExpandCombo&&r.onExpandCombo(...s))},[t.createElementVNode("div",TE,t.toDisplayString(r.selectedCount)+" selected",1),NE],2),t.createElementVNode("div",VE,[o.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(s)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(s)||null,disabled:e.disabled||null,onChange:c=>r.onChanged(c,s),name:r.getInputName(s)},null,40,LE),[[l,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(s)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,RE))])),[[l,"wrapper"]])}const jE={mixins:[Ue],data(){return{comboExpanded:!1}},computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(e){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?ul(this.schema.inputName+"_"+this.getItemValue(e)):ul(this.getItemValue(e))},getItemValue(e){if(De(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return e[this.schema.checklistOptions.value];if(typeof e.value<"u")return e.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},getItemName(e){if(De(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return e[this.schema.checklistOptions.name];if(typeof e.name<"u")return e.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},isItemChecked(e){return this.value&&this.value.indexOf(this.getItemValue(e))!==-1},onChanged(e,n){if((ke(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const i=is(this.value);i.push(this.getItemValue(n)),this.value=i}else{const i=is(this.value);i.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=i}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},UE=pe(jE,[["render",DE]]),PE={name:"FieldKeyValuePairs",components:{TrashIcon:Ln},mixins:[Ue],inject:{autofillSlot:{from:Qe,default:void 0}},data(){return{pairs:[]}},watch:{pairs:{handler(){this.updateValue()},deep:!0}},created(){var e,n;this.value||(this.value={});const i=((n=this.model)==null?void 0:n[(e=this.schema)==null?void 0:e.model])??{};Object.keys(i).forEach(a=>{this.pairs.push({key:a,value:i[a]})})},methods:{onInput(e,n,i){this.pairs[n][i]=e.target.value},updateValue(){this.value=this.pairs.reduce((e,{key:n,value:i})=>({...e,...n&&i?{[n]:i}:null}),{})},addPair(){this.pairs.push({key:"",value:""})},removePair(e){this.pairs.splice(e,1)}}},GE={class:"key-value-pairs-editor"},YE={class:"pair-item-cell"},HE=["data-testid","placeholder","value","onInput"],FE={class:"pair-item-cell"},zE=["data-testid","placeholder","value","onInput"];function KE(e,n,i,a,o,r){const l=t.resolveComponent("TrashIcon"),s=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",GE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.pairs,(c,u)=>(t.openBlock(),t.createElementBlock("div",{key:u,class:"pair-item"},[t.createElementVNode("div",YE,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-key-${u}`,placeholder:e.schema.keyInputPlaceholder??"Key",type:"text",value:c.key,onInput:d=>{r.onInput(d,u,"key")}},null,40,HE),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:d=>r.onInput({target:{value:d}},u,"key"),value:c.key},null,8,["schema","update","value"]))]),t.createElementVNode("div",FE,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-value-${u}`,placeholder:e.schema.valueInputPlaceholder??"Value",type:"text",value:c.value,onInput:d=>{r.onInput(d,u,"value")}},null,40,zE),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:d=>r.onInput({target:{value:d}},u,"value"),value:c.value},null,8,["schema","update","value"]))]),t.createVNode(s,{appearance:"tertiary","data-testid":`${e.getFieldID(e.schema)}-remove-pair-${u}`,onClick:()=>{r.removePair(u)}},{default:t.withCtx(()=>[t.createVNode(l)]),_:2},1032,["data-testid","onClick"])]))),128)),t.createVNode(s,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`${e.getFieldID(e.schema)}-add-pair`,type:"button",onClick:r.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const qE=pe(PE,[["render",KE],["__scopeId","data-v-70998d5b"]]),XE=t.defineComponent({__name:"FieldLabel",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0}},setup(e){const n=e,i=t.toRefs(n),{getFieldID:a,value:o}=Yl.useAbstractFields({model:i.model,schema:n.schema,formOptions:n.formOptions});return(r,l)=>{const s=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(s,{id:t.unref(a)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)),1)]),_:1},8,["id"])],2)}}}),JE=pe(XE,[["__scopeId","data-v-d046a15a"]]),ZE={mixins:[Ue],emits:["model-updated"],methods:{onUpdate(e){this.$emit("model-updated",e,this.schema.model)}}};function QE(e,n,i,a,o,r){const l=t.resolveComponent("KMultiselect");return t.openBlock(),t.createBlock(l,{"aria-labelledby":e.getLabelId(e.schema),"data-testid":"field-multiselect",items:e.schema.values,"label-attributes":{info:e.schema.help},"model-value":e.value,placeholder:e.schema.placeholder,required:e.schema.required||void 0,width:"100%","onUpdate:modelValue":r.onUpdate},null,8,["aria-labelledby","items","label-attributes","model-value","placeholder","required","onUpdate:modelValue"])}const WE=pe(ZE,[["render",QE]]),_E={mixins:[Ue],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(e,n){if(n===null){this.fieldModel={...this.model};return}const i=this.schema.fields[e].fields,a=this.schema.fields[n].fields;a&&a.forEach(o=>this.updateModel("",o.model)),i&&i.forEach(o=>this.updateModel(this.fieldModel[o.model],o.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((e,n)=>{e.fields&&e.fields.forEach(i=>{this.model[i.model]&&(this.checkedGroup=n,this.fieldSchema.push(i.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(e,n){this.$emit("model-updated",e,n)}}},$E={class:"selection-group"},eC={class:"form-group horizontal-radios"},tC={class:"radio-group"},nC=["value"],iC={class:"control-help"},aC={class:"option-field"},oC={class:"option-field-container"};function rC(e,n,i,a,o,r){const l=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",$E,[t.createElementVNode("div",eC,[t.createElementVNode("div",tC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.fields,(s,c)=>(t.openBlock(),t.createElementBlock("div",{key:c,class:"option-group"},[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${s.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>o.checkedGroup=u),class:"k-input",type:"radio",value:c},null,8,nC),[[t.vModelRadio,o.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(s.label)+" ",1),t.createElementVNode("div",iC,t.toDisplayString(s.description),1)],2)]))),128))])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.fields,(s,c)=>(t.openBlock(),t.createElementBlock("div",{key:c,class:"option-group"},[t.withDirectives(t.createElementVNode("div",aC,[t.createElementVNode("div",oC,[t.createVNode(l,{model:e.model,options:{helpAsHtml:!0},schema:{fields:s.fields},onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[t.vShow,s.fields&&o.checkedGroup===c]])]))),128))])}const lC=pe(_E,[["render",rC],["__scopeId","data-v-0aaaf597"]]),sC=["autocomplete","disabled","name","id"],cC=["data-on","data-off","for"],dC=t.createElementVNode("span",{class:"handle"},null,-1);function uC(e,n,i,a,o,r){return t.openBlock(),t.createElementBlock("label",null,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,sC),[[t.vModelCheckbox,e.value]]),t.createElementVNode("span",{class:"label","data-on":e.schema.textOn||"On","data-off":e.schema.textOff||"Off",for:e.getFieldID(e.schema)},null,8,cC),dC])}const pC={mixins:[Ue],methods:{formatValueToField(e){return e!=null&&this.schema.valueOn?e===this.schema.valueOn:e},formatValueToModel(e){return e!=null&&this.schema.valueOn?e?this.schema.valueOn:this.schema.valueOff:e}}},mC=pe(pC,[["render",uC]]),gC={mixins:[Ue],inject:{autofillSlot:{from:Qe,default:void 0}}},fC={class:"field-textarea"},AC=["id","disabled","maxlength","minlength","name","placeholder","readonly","required","rows"];function hC(e,n,i,a,o,r){const l=t.resolveDirective("attributes");return t.openBlock(),t.createElementBlock("div",fC,[t.withDirectives(t.createElementVNode("textarea",{id:e.getFieldID(e.schema),"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),class:t.normalizeClass(["form-control",e.schema.fieldClasses]),disabled:e.disabled||null,maxlength:e.schema.max,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,rows:e.schema.rows||2},null,10,AC),[[t.vModelText,e.value],[l,"input"]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:s=>e.value=s,value:e.value},null,8,["schema","update","value"]))])}const yC=pe(gC,[["render",hC],["__scopeId","data-v-9a62b6b0"]]),bC=Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:Q1,FieldArray:CE,FieldArrayCardContainer:jl,FieldArrayItem:Ul,FieldArrayMultiItem:Pl,FieldAutoSuggest:Gl,FieldCheckbox:SE,FieldChecklist:UE,FieldInput:Hl,FieldKeyValuePairs:qE,FieldLabel:JE,FieldMetric:Fl,FieldMultiselect:WE,FieldObject:zl,FieldObjectAdvanced:ql,FieldRadio:Xl,FieldSelect:ns,FieldSelectionGroup:lC,FieldSwitch:mC,FieldTextArea:yC},Symbol.toStringTag,{value:"Module"})),wC={name:"FormGroup",components:bC,mixins:[pl],props:{vfg:{type:Object,required:!0},model:{type:Object,default:()=>{}},options:{type:Object,default:()=>{}},field:{type:Object,required:!0},errors:{type:Array,default(){return[]}}},emits:["validated","modelUpdated"],data(){return{child:t.ref()}},methods:{fieldTypeHasLabel(e){if(ke(e.label))return!1;let n="";switch(e.type==="input"?n=e.inputType:n=e.type,n){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(e){const n=le(this.options,"fieldIdPrefix","");return ra(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldType(e){return"field-"+e.type},getButtonType(e){return le(e,"type","button")},onFieldValidated(e,n,i){this.$emit("validated",e,n,i)},buttonVisibility(e){return e.buttons&&e.buttons.length>0},buttonClickHandler(e,n,i){return e.onclick.call(this,this.model,n,i,this)},fieldHint(e){return Ae(e.hint)?e.hint.call(this,this.model,e,this):e.hint},fieldErrors(e){return this.errors.filter(n=>n.field.fieldName===e.fieldName).map(n=>n.error)},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e){return this.$refs.child.validate(e)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(e){return e?e.replace(/^[cC]onfig\./,""):""}}},EC=e=>(t.pushScopeId("data-v-3cb920d4"),e=e(),t.popScopeId(),e),CC=["innerHTML"],kC={class:"icon-wrapper"},BC=["innerHTML"],IC={key:0,class:"link-wrapper"},SC=EC(()=>t.createElementVNode("span",{class:"section-header"},"More info",-1)),xC={class:"field-wrap"},vC={key:0,class:"buttons"},OC=["type","onClick","textContent"],MC=["innerHTML"],RC={key:2,class:"errors help-block"},TC=["innerHTML"];function NC(e,n,i,a,o,r){const l=t.resolveComponent("KExternalLink"),s=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-group",e.getFieldRowClasses(i.field)])},[r.fieldTypeHasLabel(i.field)?(t.openBlock(),t.createBlock(s,{key:0,"aria-describedby":i.field.help?r.getTooltipId(i.field):void 0,class:t.normalizeClass([i.field.labelClasses,"form-group-label"]),for:r.getFieldID(i.field),info:!i.options.helpAsHtml&&i.field.help?i.field.help:void 0,"tooltip-attributes":i.field.help?{maxWidth:"300",placement:"top",tooltipId:r.getTooltipId(i.field)}:void 0},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",kC,[t.createElementVNode("span",{innerHTML:r.formattedLabel(i.field.label)},null,8,BC)]),i.field.link?(t.openBlock(),t.createElementBlock("div",IC,[t.createVNode(l,{href:i.field.link},{default:t.withCtx(()=>[SC]),_:1},8,["href"])])):t.createCommentVNode("",!0)]),_:2},[i.options.helpAsHtml&&i.field.help?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:i.field.help},null,8,CC)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",xC,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(i.field)),t.mergeProps(e.$attrs,{ref:"child",disabled:e.fieldDisabled(i.field)||null,"form-options":i.options,hint:i.field.hint&&r.getFieldType(i.field)==="field-input"?r.fieldHint(i.field):void 0,model:i.model,schema:i.field,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated}),null,16,["disabled","form-options","hint","model","schema","vfg","onModelUpdated","onValidated"])),r.buttonVisibility(i.field)?(t.openBlock(),t.createElementBlock("div",vC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.field.buttons,(c,u)=>(t.openBlock(),t.createElementBlock("button",{key:u,class:t.normalizeClass(c.classes),type:r.getButtonType(c),onClick:d=>r.buttonClickHandler(c,i.field,d),textContent:t.toDisplayString(c.label)},null,10,OC))),128))])):t.createCommentVNode("",!0)]),i.field.hint&&r.getFieldType(i.field)!=="field-input"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"hint",innerHTML:r.fieldHint(i.field)},null,8,MC)):t.createCommentVNode("",!0),r.fieldErrors(i.field).length>0?(t.openBlock(),t.createElementBlock("div",RC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fieldErrors(i.field),(c,u)=>(t.openBlock(),t.createElementBlock("span",{key:u,innerHTML:c},null,8,TC))),128))])):t.createCommentVNode("",!0)],2)}const VC=pe(wC,[["render",NC],["__scopeId","data-v-3cb920d4"]]),LC={name:"FormGenerator",components:{formGroup:VC},mixins:[pl],inject:{autofillSlot:{from:Qe,default:void 0}},provide(){var e;return{...!this.autofillSlot&&{[Qe]:(e=this.$slots)==null?void 0:e[wt]}}},props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:t.ref([]),fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:"",helpAsHtml:!1}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(e){return e.length>0}}},emits:["validated","modelUpdated"],data(){return{vfg:this,errors:[],children:t.ref([]),collapseStates:{}}},computed:{fields(){const e=[];return this.schema&&this.schema.fields&&je(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&je(this.schema.groups.slice(0),n=>{e.push(n)}),e}},watch:{model:{deep:!0,handler(e,n){n!==e&&e!=null&&this.$nextTick(()=>{this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors()})}}},mounted(){this.$nextTick(()=>{this.model&&(this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors())})},methods:{fieldVisible(e){return Ae(e.visible)?e.visible.call(this,this.model,e,this):ke(e.visible)?!0:e.visible},onFieldValidated(e,n,i){this.errors=this.errors.filter(o=>o.field.fieldName!==i.schema.fieldName),!e&&n&&n.length>0&&je(n,o=>{this.errors.push({field:i.schema,error:o})});const a=this.errors.length===0;this.$emit("validated",a,this.errors,this)},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e=null){e===null&&(e=le(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],i=[];je(this.$refs.children,o=>{Ae(o.validate)&&(n.push(o.$refs.child),i.push(o.$refs.child.validate(!0)))});const a=o=>{const r=[];je(o,(s,c)=>{Array.isArray(s)&&s.length>0&&je(s,u=>{r.push({field:n[c].schema,error:u})})}),this.errors=r;const l=r.length===0;return this.$emit("validated",l,r,this),e?r:l};return e?Promise.all(i).then(a):a(i)},clearValidationErrors(){this.errors.splice(0),je(this.$refs.children,e=>{e.clearValidationErrors()})}}},DC={key:0,class:"vue-form-generator"},jC={key:0};function UC(e,n,i,a,o,r){const l=t.resolveComponent("form-group"),s=t.resolveComponent("KCollapse");return i.schema!=null?(t.openBlock(),t.createElementBlock("div",DC,[i.schema.fields?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.tag),{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fields,c=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:c.model},[r.fieldVisible(c)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:o.errors,field:c,model:i.model,options:i.options,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:1})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,(c,u)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${u}`},[c.collapsible!==void 0&&c.collapsible!==!1?(t.openBlock(),t.createBlock(s,{key:0,class:"root-level-collapse","model-value":!1,title:c.collapsible.title},t.createSlots({default:t.withCtx(()=>{var d,m,g,h;return[(d=c.slots)!=null&&d.beforeContent?t.renderSlot(e.$slots,(m=c.slots)==null?void 0:m.beforeContent,{key:0}):t.createCommentVNode("",!0),c.fields.length===0&&(g=c.slots)!=null&&g.emptyState?t.renderSlot(e.$slots,(h=c.slots)==null?void 0:h.emptyState,{key:1}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.tag),{key:2,class:t.normalizeClass(e.getFieldRowClasses(c))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.fields,B=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:B.model},[r.fieldVisible(B)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:o.errors,field:B,model:i.model,options:i.options,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"])),c.collapsible!==!0&&c.collapsible.nestedCollapsible&&c.collapsible.nestedCollapsible.fields.length>0?(t.openBlock(),t.createBlock(s,{key:3,class:"nested-collapse","model-value":o.collapseStates[`group-${u}-nested`]??!0,"trigger-alignment":"leading","trigger-label":o.collapseStates[`group-${u}-nested`]??!0?c.collapsible.nestedCollapsible.triggerLabel.expand:c.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":B=>o.collapseStates[`group-${u}-nested`]=B},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.tag),{class:t.normalizeClass(e.getFieldRowClasses(c))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.collapsible.nestedCollapsible.fields,B=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:B.model},[r.fieldVisible(B)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:o.errors,field:B,model:i.model,options:i.options,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))]),_:2},1032,["model-value","trigger-label","onUpdate:modelValue"])):t.createCommentVNode("",!0)]}),_:2},[c.collapsible.description?{name:"visible-content",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.collapsible.description),1)]),key:"0"}:void 0]),1032,["title"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.tag),{key:1,class:t.normalizeClass(e.getFieldRowClasses(c))},{default:t.withCtx(()=>[c.legend?(t.openBlock(),t.createElementBlock("legend",jC,t.toDisplayString(c.legend),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.fields,d=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:d.model},[r.fieldVisible(d)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:o.errors,field:d,model:i.model,options:i.options,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))],64))),128))])):t.createCommentVNode("",!0)}const Ye=pe(LC,[["render",UC]]),as=new Set(["config-client_id","config-client_secret","config-issuer"]),os=new Set(["config-scopes_claim","config-scopes_required","config-audience_claim","config-audience_required","config-roles_claim","config-roles_required","config-groups_claim","config-groups_required","config-authenticated_groups_claim"]),PC={name:"OIDCForm",components:{VueFormGenerator:Ye},provide(){var e;return{[Qe]:(e=this.$slots)==null?void 0:e[wt]}},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){var e;if(!this.init){this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(i=>!i.model.startsWith("config")&&i.model!=="tags")};const n=this.formSchema.fields.reduce((i,a)=>(i[a.model]=a,i),{});this.commonFieldsSchema={fields:Array.from(as).reduce((i,a)=>(n[a]&&i.push(n[a]),i),[])},this.authFieldsSchema={fields:Array.from(os).reduce((i,a)=>(n[a]&&i.push(n[a]),i),[])},this.advancedFieldsSchema={fields:this.formSchema.fields.filter(i=>i.model.startsWith("config")&&i.model!=="config-auth_methods"&&!as.has(i.model)&&!os.has(i.model)||i.model==="tags").reduce((i,a)=>{var o,r,l,s;switch(a.model){case"config-client_jwk":{if(Array.isArray((r=(o=a.items)==null?void 0:o.schema)==null?void 0:r.fields))for(const c of a.items.schema.fields)c.label=c.model;i.push({...a,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record",newElementButtonLabel:"+ Add Client JWK",...Array.isArray((s=(l=a.items)==null?void 0:l.schema)==null?void 0:s.fields)&&a.items.schema.fields.map(c=>({...c,label:c.model}))});break}case"config-session_redis_cluster_nodes":{i.push({...a,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#host-record",newElementButtonLabel:"+ Add Cluster Node"});break}default:i.push(a)}return i},[])},this.sessionManagement=this.isEditing?this.formModel["config-auth_methods"].includes("session"):!1,this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.isEditing?this.formModel["config-auth_methods"].includes("authorization_code"):!1},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("bearer"):!1},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("client_credentials"):!1},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("password"):!1},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.isEditing?this.formModel["config-auth_methods"].includes("introspection"):!1},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.isEditing?this.formModel["config-auth_methods"].includes("userinfo"):!1},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("kong_oauth2"):!1},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("refresh_token"):!1}];for(const i of[this.commonFieldsSchema,this.authFieldsSchema,this.advancedFieldsSchema])for(const a of i.fields){const o=(e=n[a.model])==null?void 0:e.help;a.help===void 0&&typeof o=="string"&&(a.help=o)}}},getAuthMethodsValue(e,n){const i=[];for(let a=0;a<this.authMethods.length;a++)this.authMethods[a].prop&&this.authMethods[a].value!==e&&i.push(this.authMethods[a].value);return this.sessionManagement&&e&&i.push("session"),n&&(e?i.push(e):i.push("session")),i},handleUpdate(e,n){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(n,e),this.onModelUpdated()}}},cn=e=>(t.pushScopeId("data-v-bb72c68e"),e=e(),t.popScopeId(),e),GC={class:"general-settings"},YC={class:"link-wrapper"},HC=cn(()=>t.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),FC=cn(()=>t.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),zC={class:"auth-method-container"},KC={class:"general-settings"},qC={class:"link-wrapper"},XC=cn(()=>t.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),JC=cn(()=>t.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),ZC={class:"general-settings"},QC={class:"link-wrapper"},WC=cn(()=>t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),_C=cn(()=>t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function $C(e,n,i,a,o,r){const l=t.resolveComponent("VueFormGenerator"),s=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KLabel"),u=t.resolveComponent("KCheckbox"),d=t.resolveComponent("KInputSwitch"),m=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[i.formModel.id&&i.isEditing||!i.isEditing?(t.openBlock(),t.createBlock(l,{key:0,class:"global-fields",model:i.formModel,options:i.formOptions,schema:o.globalFields,onModelUpdated:i.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(m,{tabs:o.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",GC,[t.createElementVNode("div",YC,[t.createVNode(s,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:t.withCtx(()=>[HC]),_:1})]),FC,r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:i.formModel,options:i.formOptions,schema:o.commonFieldsSchema,onModelUpdated:i.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(c,null,{default:t.withCtx(()=>[t.createTextVNode("Auth Methods")]),_:1}),t.createElementVNode("div",zC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.authMethods,g=>(t.openBlock(),t.createElementBlock("div",{key:g.value,class:"auth-method"},[t.createVNode(u,{modelValue:g.prop,"onUpdate:modelValue":h=>g.prop=h,onChange:h=>r.handleUpdate(h,g.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(d,{modelValue:o.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=g=>o.sessionManagement=g),label:"Enable Session Management",onChange:r.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",KC,[t.createElementVNode("div",qC,[t.createVNode(s,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:t.withCtx(()=>[XC]),_:1})]),JC,r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:i.formModel,options:i.formOptions,schema:o.authFieldsSchema,onModelUpdated:i.onModelUpdated},{"autofill-provider":t.withCtx(g=>[t.renderSlot(e.$slots,"autofill-provider",t.normalizeProps(t.guardReactiveProps(g)),void 0,!0)]),_:3},8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",ZC,[t.createElementVNode("div",QC,[t.createVNode(s,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:t.withCtx(()=>[WC]),_:1})]),_C,r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:i.formModel,options:i.formOptions,schema:o.advancedFieldsSchema,onModelUpdated:i.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:3},8,["tabs"])])}const ek=pe(PC,[["render",$C],["__scopeId","data-v-bb72c68e"]]),tk={packageName:"forms"},nk={view_advanced_fields:"View Advanced Fields",window_type:{label:"Rate Limit Window Type",help:"Sets the time window type to either <code>sliding</code> (default) or <code>fixed</code>.<br><ul><li>Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight.</li><li>Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window&#39;s counters.</li></ul>",options:{fixed:"Fixed",sliding:"Sliding"}},request_limits:{title:"Request Limits",subtitle:"Set one or more limits on the number of API requests allowed within a defined timeframe.",label:"Limit",label_index:"Limit {index}",request_number:"Request number",time_interval:"Time interval",interval_determiner:"Every",seconds:"Seconds"},start_with_a_use_case:"Start with a use case:",use_case_index:"Use case {index}",error_message:{label:"Error Message",code_placeholder:"Code Message",message_placeholder:"Error Message",help:"Set a custom error code and message to be returned when the rate limit is exceeded."},identifiers:{label:"Identifiers",options:{ip:"IP",credential:"Credential",consumer:"Consumer",service:"Service",header:"Header",path:"Path","consumer-group":"Consumer Group"}},redis:{title:"Configure your Redis",address_example:"e.g. localhost:6379"}},ha={general:tk,"post-function":{tags:{hint:"e.g. tag1, tag2, tag3",newElementButtonLabel:"+ Add"},enabled:{newElementButtonLabel:"+ Add"},selectionGroup:{newElementButtonLabel:"+ Add"},instance_name:{newElementButtonLabel:"+ Add"},name:{newElementButtonLabel:"+ Add"},"config-certificate":{help:"Array of stringified Lua code to be cached and run in sequence during the certificate phase.",newElementButtonLabel:"+ Add"},"config-access":{help:"Array of stringified Lua code to be cached and run in sequence during the access phase.",newElementButtonLabel:"+ Add"},"config-body_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the body_filter phase.",newElementButtonLabel:"+ Add"},"config-header_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the header_filter phase.",newElementButtonLabel:"+ Add"},"config-functions":{newElementButtonLabel:"+ Add"},"config-log":{newElementButtonLabel:"+ Add"},"config-rewrite":{newElementButtonLabel:"+ Add"},"config-ws_client_frame":{newElementButtonLabel:"+ Add"},"config-ws_close":{newElementButtonLabel:"+ Add"},"config-ws_handshake":{newElementButtonLabel:"+ Add"},"config-ws_upstream_frame":{newElementButtonLabel:"+ Add"}},"exit-transformer":{"config-functions":{newElementButtonLabel:"+ Add"}},rla:nk},ik=t.defineComponent({__name:"PostFunction",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var n;t.provide(Qe,(n=t.useSlots())==null?void 0:n[wt]);const{t:i,te:a}=St.createI18n("en-us",ha),o=e,r=t.computed(()=>o.formModel.id&&o.isEditing||!o.isEditing),l=t.computed(()=>{const s=o.formSchema;return s.fields.map(c=>{const u=`post-function.${c.model}`;return c.hint=a(`${u}.hint`)&&i(`${u}.hint`)||c.hint,c.help=a(`${u}.help`)&&i(`${u}.help`)||c.help,c.newElementButtonLabel=a(`${u}.newElementButtonLabel`)&&i(`${u}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="post-function-array-item-container",c.fieldItemsClasses="post-function-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),s});return(s,c)=>r.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),ak=pe(ik,[["__scopeId","data-v-f54f37ae"]]),ok=t.defineComponent({__name:"ExitTransformer",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var n;t.provide(Qe,(n=t.useSlots())==null?void 0:n[wt]);const{t:i,te:a}=St.createI18n("en-us",ha),o=e,r=t.computed(()=>o.formModel.id&&o.isEditing||!o.isEditing),l=t.computed(()=>{const s=o.formSchema;return s.fields.map(c=>{const u=`exit-transformer.${c.model}`;return c.hint=a(`${u}.hint`)&&i(`${u}.hint`)||c.hint,c.help=a(`${u}.help`)&&i(`${u}.help`)||c.help,c.newElementButtonLabel=a(`${u}.newElementButtonLabel`)&&i(`${u}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="exit-transformer-array-item-container",c.fieldItemsClasses="exit-transformer-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),s});return(s,c)=>r.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),rk=pe(ok,[["__scopeId","data-v-0d5c541f"]]),lk={fields:[{inputType:"text",label:"Config.Account Email",model:"config-account_email",required:!0,type:"input"},{inputType:"text",label:"Config.Account Key.Key Id",model:"config-account_key-key_id",required:!0,type:"input"},{type:"input",inputType:"text",valueType:"string",label:"Config.Account Key.Key Set",model:"config-account_key-key_set",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",label:"Config.Allow Any Domain",model:"config-allow_any_domain",order:0,disabled:!1}]},sk={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",model:"config-tos_accepted",label:"Config.Tos Accepted",order:0,disabled:!1}]},ck={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_hmac_key",label:"Config.Eab Hmac Key",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_kid",label:"Config.Eab Kid",order:0,disabled:!1}]},Ft=e=>(t.pushScopeId("data-v-bb5a3a33"),e=e(),t.popScopeId(),e),dk={class:"general-settings"},uk=Ft(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),pk=Ft(()=>t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),mk=Ft(()=>t.createElementVNode("hr",null,null,-1)),gk={class:"sub-form"},fk={class:"general-settings"},Ak=Ft(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),hk=Ft(()=>t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),yk={class:"sub-form"},bk={class:"general-settings"},wk=Ft(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),Ek=Ft(()=>t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),Ck=t.defineComponent({__name:"ACMEForm",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var n;t.provide(Qe,(n=t.useSlots())==null?void 0:n[wt]);const i=e,a=t.ref("zeroSsl"),o=t.ref("shm"),r=t.computed(()=>{var f;const y={};if((f=i.formSchema)!=null&&f.fields)for(const k of i.formSchema.fields)y[k.model]=k;return y}),l=t.computed(()=>{var f;const y=mt(lk);for(const k of y.fields){const V=(f=r.value[k.model])==null?void 0:f.help;k.help===void 0&&typeof V=="string"&&(k.help=V)}return y}),s=t.computed(()=>{var f;const y=mt(sk);for(const k of y.fields){const V=(f=r.value[k.model])==null?void 0:f.help;k.help===void 0&&typeof V=="string"&&(k.help=V)}return y}),c=t.computed(()=>{var f;const y=mt(ck);for(const k of y.fields){const V=(f=r.value[k.model])==null?void 0:f.help;k.help===void 0&&typeof V=="string"&&(k.help=V)}return y}),u=t.computed(()=>({fields:i.formSchema.fields.filter(f=>!f.model.startsWith("config")&&f.model!=="tags")})),d=t.computed(()=>({fields:l.value.fields.filter(f=>!s.value.fields.some(y=>y.model===f.model)&&!c.value.fields.some(y=>y.model===f.model))})),m=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage")&&!f.model.startsWith("config-storage_config-consul")&&!f.model.startsWith("config-storage_config-redis")&&!f.model.startsWith("config-storage_config-shm")&&!f.model.startsWith("config-storage_config-vault"))})),g=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage_config-consul"))})),h=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage_config-redis"))})),B=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage_config-shm"))})),C=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage_config-vault"))})),b=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config")&&!d.value.fields.filter(y=>y.model===f.model).length&&!m.value.fields.filter(y=>y.model===f.model).length||f.model==="tags")})),I=t.computed(()=>i.formModel.id&&i.isEditing||!i.isEditing),x=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],E=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];t.onMounted(()=>{a.value==="zeroSsl"&&(i.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const w=f=>{a.value=f.value,(f.value==="zeroSsl"||f.value==="other")&&(f.value==="zeroSsl"?i.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":i.formModel["config-api_uri"]="https://acme.example.com/",i.formModel["config-tos_accepted"]=!1),f.value==="letsEncrypt"&&(i.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",i.formModel["config-eab_hmac_key"]="",i.formModel["config-eab_kid"]=""),i.onModelUpdated()},A=(f,y)=>{y==="config-storage"&&(o.value=f),i.onModelUpdated()};return(f,y)=>{const k=t.resolveComponent("KSelect"),V=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(Ye,{key:0,class:"global-fields",model:e.formModel,options:e.formOptions,schema:u.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(V,{tabs:x},{general:t.withCtx(()=>[t.createElementVNode("div",dk,[uk,pk,I.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:d.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),mk,t.createVNode(k,{class:"issuer-select",items:E,label:"Issuer",onChange:w}),t.createElementVNode("div",gk,[a.value==="letsEncrypt"?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:s.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="zeroSsl"||a.value==="other"?(t.openBlock(),t.createBlock(Ye,{key:1,model:e.formModel,options:e.formOptions,schema:c.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",fk,[Ak,hk,I.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:m.value,onModelUpdated:A},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",yk,[o.value==="consul"?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:g.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="redis"?(t.openBlock(),t.createBlock(Ye,{key:1,model:e.formModel,options:e.formOptions,schema:h.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="shm"?(t.openBlock(),t.createBlock(Ye,{key:2,model:e.formModel,options:e.formOptions,schema:B.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="vault"?(t.openBlock(),t.createBlock(Ye,{key:3,model:e.formModel,options:e.formOptions,schema:C.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",bk,[wk,Ek,I.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:b.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),kk=pe(Ck,[["__scopeId","data-v-bb5a3a33"]]),rs=e=>(t.pushScopeId("data-v-f53eec84"),e=e(),t.popScopeId(),e),Bk={class:"rla-form-basic-fields"},Ik={class:"rla-form-request-limits-subtitle"},Sk={class:"rla-form-request-limits-content"},xk={class:"rla-form-window-type"},vk=["innerHTML"],Ok={class:"rla-form-window-type-radios"},Mk={class:"rla-form-request-limits-items"},Rk={class:"rla-form-request-limits-row"},Tk=["id"],Nk={class:"rla-form-request-limits-actions"},Vk={key:0,class:"rla-form-request-limits-examples"},Lk={class:"rla-form-request-limits-examples-badges"},Dk=rs(()=>t.createElementVNode("br",null,null,-1)),jk=["innerHTML"],Uk={id:"rla-form-error-legend",class:"rla-form-error-inputs"},Pk=rs(()=>t.createElementVNode("div",null,":",-1)),Gk=t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},isEditing:{type:Boolean}},setup(e){var n;t.provide(Qe,(n=t.useSlots())==null?void 0:n[wt]);const i={fixed:[{label:"500 requests every hour",description:"A fixed limit of 500 requests per hour resetting sharply on the hour, ensuring no user can exceed this limit.",config:{limit:500,window_size:3600}},{label:"200 requests every 30 minutes",description:"Users are allowed 200 requests per 30 minutes, resetting exactly on the 30 minute mark with no carryover of unused limits.",config:{limit:200,window_size:1800}},{label:"500 requests every day",description:"A strict limit of 5000 requests per day resetting promptly at midnight, preventing any burst traffic or inconsistent user experiences.",config:{limit:500,window_size:86400}}],sliding:[{label:"100 requests every hour",description:"Maximum of 100 requests every rolling hour, continuously adjusting the count over the course of the hour. No hard limit or known reset.",config:{limit:100,window_size:3600}},{label:"300 requests every 30 minutes",description:"Each user can make up to 300 requests in any rolling 30 minute period, with older requests dropping off as new requests are made.",config:{limit:300,window_size:1800}},{label:"500 requests every hour",description:`Each user is allowed 500 requests per hour.
87
+ client. If missing, it will be generated for you.`,inputType:"text",encrypted:!0}}]},Qf={fields:[{id:{type:"string",auto:!0,uuid:!0,description:"A string representing a UUID (universally unique identifier)."}},{created_at:{type:"integer",auto:!0,timestamp:!0,description:"An integer representing an automatic Unix timestamp in seconds."}},{consumer:{required:!0,on_delete:"cascade",reference:"consumers",type:"foreign"}},{key:{required:!1,unique:!0,auto:!0,encrypted:!0,type:"string"}},{tags:{type:"set",elements:{type:"string",required:!0,description:"A string representing a tag."},description:"A set of strings representing tags."}}]},rt={"basic-auth":{descriptionKey:"plugins.meta.basic-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.basic-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"hmac-auth":{descriptionKey:"plugins.meta.hmac-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.hmac-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"jwt-signer":{descriptionKey:"plugins.meta.jwt-signer.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.jwt-signer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},jwt:{descriptionKey:"plugins.meta.jwt.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.jwt.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"key-auth":{descriptionKey:"plugins.meta.key-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.key-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"key-auth-enc":{descriptionKey:"plugins.meta.key-auth-enc.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.key-auth-enc.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"ldap-auth-advanced":{descriptionKey:"plugins.meta.ldap-auth-advanced.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.ldap-auth-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"ldap-auth":{descriptionKey:"plugins.meta.ldap-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.ldap-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"oauth2-introspection":{descriptionKey:"plugins.meta.oauth2-introspection.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.oauth2-introspection.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},oauth2:{descriptionKey:"plugins.meta.oauth2.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.oauth2.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"openid-connect":{descriptionKey:"plugins.meta.openid-connect.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.openid-connect.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"mtls-auth":{descriptionKey:"plugins.meta.mtls-auth.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.mtls-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"vault-auth":{descriptionKey:"plugins.meta.vault-auth.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.vault-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"bot-detection":{descriptionKey:"plugins.meta.bot-detection.description",group:D.SECURITY,isEnterprise:!1,nameKey:"plugins.meta.bot-detection.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},cors:{descriptionKey:"plugins.meta.cors.description",group:D.SECURITY,isEnterprise:!1,nameKey:"plugins.meta.cors.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"ip-restriction":{descriptionKey:"plugins.meta.ip-restriction.description",group:D.SECURITY,isEnterprise:!1,nameKey:"plugins.meta.ip-restriction.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],fieldRules:{atLeastOneOf:[["config.allow","config.deny"]]}},opa:{descriptionKey:"plugins.meta.opa.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.opa.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"kubernetes-sidecar-injector":{descriptionKey:"plugins.meta.kubernetes-sidecar-injector.description",group:D.DEPLOYMENT,isEnterprise:!1,nameKey:"plugins.meta.kubernetes-sidecar-injector.name",scope:[p.GLOBAL]},"request-validator":{descriptionKey:"plugins.meta.request-validator.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.request-validator.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.body_schema","config.parameter_schema"]]}},acl:{descriptionKey:"plugins.meta.acl.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.acl.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],fieldRules:{onlyOneOf:[["config.allow","config.deny"]]}},canary:{descriptionKey:"plugins.meta.canary.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.canary.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],fieldRules:{atLeastOneOf:[["config.upstream_uri","config.upstream_host","config.upstream_port"]]}},"forward-proxy":{descriptionKey:"plugins.meta.forward-proxy.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.forward-proxy.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{onlyOneOfMutuallyRequired:[[["config.http_proxy_host","config.http_proxy_port"],["config.https_proxy_host","config.https_proxy_port"]]]}},"proxy-cache":{descriptionKey:"plugins.meta.proxy-cache.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.proxy-cache.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"proxy-cache-advanced":{descriptionKey:"plugins.meta.proxy-cache-advanced.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.proxy-cache-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],imageName:"proxy-cache"},"graphql-proxy-cache-advanced":{descriptionKey:"plugins.meta.graphql-proxy-cache-advanced.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.graphql-proxy-cache-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],imageName:"graphql"},"rate-limiting-advanced":{descriptionKey:"plugins.meta.rate-limiting-advanced.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.rate-limiting-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"rate-limiting":{descriptionKey:"plugins.meta.rate-limiting.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.rate-limiting.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],fieldRules:{atLeastOneOf:[["config.second","config.minute","config.hour","config.day","config.month","config.year"]]}},"graphql-rate-limiting-advanced":{descriptionKey:"plugins.meta.graphql-rate-limiting-advanced.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.graphql-rate-limiting-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},mocking:{descriptionKey:"plugins.meta.mocking.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.mocking.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.api_specification_filename","config.api_specification"]]}},"request-size-limiting":{descriptionKey:"plugins.meta.request-size-limiting.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.request-size-limiting.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"request-termination":{descriptionKey:"plugins.meta.request-termination.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.request-termination.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"response-ratelimiting":{descriptionKey:"plugins.meta.response-ratelimiting.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.response-ratelimiting.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"route-by-header":{descriptionKey:"plugins.meta.route-by-header.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.route-by-header.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"ai-proxy":{descriptionKey:"plugins.meta.ai-proxy.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-proxy.name",scope:[p.ROUTE],useLegacyForm:!0},"ai-prompt-decorator":{descriptionKey:"plugins.meta.ai-prompt-decorator.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-decorator.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"ai-prompt-template":{descriptionKey:"plugins.meta.ai-prompt-template.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-template.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],useLegacyForm:!0},"ai-prompt-guard":{descriptionKey:"plugins.meta.ai-prompt-guard.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-guard.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"ai-request-transformer":{descriptionKey:"plugins.meta.ai-request-transformer.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-request-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],useLegacyForm:!0},"ai-response-transformer":{descriptionKey:"plugins.meta.ai-response-transformer.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-response-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],useLegacyForm:!0},"ai-rate-limiting-advanced":{descriptionKey:"plugins.meta.ai-rate-limiting-advanced.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-rate-limiting-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"ai-azure-content-safety":{descriptionKey:"plugins.meta.ai-azure-content-safety.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-azure-content-safety.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],useLegacyForm:!0},"aws-lambda":{descriptionKey:"plugins.meta.aws-lambda.description",group:D.SERVERLESS,isEnterprise:!1,nameKey:"plugins.meta.aws-lambda.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"azure-functions":{descriptionKey:"plugins.meta.azure-functions.description",group:D.SERVERLESS,isEnterprise:!0,nameKey:"plugins.meta.azure-functions.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},openwhisk:{descriptionKey:"plugins.meta.openwhisk.description",group:D.SERVERLESS,isEnterprise:!1,nameKey:"plugins.meta.openwhisk.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"pre-function":{descriptionKey:"plugins.meta.pre-function.description",group:D.SERVERLESS,isEnterprise:!0,nameKey:"plugins.meta.pre-function.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],imageName:"kong-function"},"post-function":{descriptionKey:"plugins.meta.post-function.description",group:D.SERVERLESS,isEnterprise:!0,nameKey:"plugins.meta.post-function.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],imageName:"kong-function"},datadog:{descriptionKey:"plugins.meta.datadog.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!1,nameKey:"plugins.meta.datadog.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},prometheus:{descriptionKey:"plugins.meta.prometheus.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.prometheus.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},zipkin:{descriptionKey:"plugins.meta.zipkin.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.zipkin.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},collector:{descriptionKey:"plugins.meta.collector.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.collector.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"response-transformer-advanced":{descriptionKey:"plugins.meta.response-transformer-advanced.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.response-transformer-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"correlation-id":{descriptionKey:"plugins.meta.correlation-id.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.correlation-id.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"request-transformer-advanced":{descriptionKey:"plugins.meta.request-transformer-advanced.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.request-transformer-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"request-transformer":{descriptionKey:"plugins.meta.request-transformer.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.request-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"response-transformer":{descriptionKey:"plugins.meta.response-transformer.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.response-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP]},"route-transformer-advanced":{descriptionKey:"plugins.meta.route-transformer-advanced.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.route-transformer-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.path","config.port","config.host"]]}},"kafka-upstream":{descriptionKey:"plugins.meta.kafka-upstream.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.kafka-upstream.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},degraphql:{descriptionKey:"plugins.meta.degraphql.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.degraphql.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"exit-transformer":{descriptionKey:"plugins.meta.exit-transformer.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.exit-transformer.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},jq:{descriptionKey:"plugins.meta.jq.description",group:D.TRANSFORMATIONS,isEnterprise:!0,nameKey:"plugins.meta.jq.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.request_jq_program","config.response_jq_program"]]}},"file-log":{descriptionKey:"plugins.meta.file-log.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.file-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"http-log":{descriptionKey:"plugins.meta.http-log.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.http-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},loggly:{descriptionKey:"plugins.meta.loggly.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.loggly.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"statsd-advanced":{descriptionKey:"plugins.meta.statsd-advanced.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.statsd-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},statsd:{descriptionKey:"plugins.meta.statsd.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!1,nameKey:"plugins.meta.statsd.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},syslog:{descriptionKey:"plugins.meta.syslog.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.syslog.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"tcp-log":{descriptionKey:"plugins.meta.tcp-log.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.tcp-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"udp-log":{descriptionKey:"plugins.meta.udp-log.description",group:D.LOGGING,isEnterprise:!1,nameKey:"plugins.meta.udp-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"kafka-log":{descriptionKey:"plugins.meta.kafka-log.description",group:D.LOGGING,isEnterprise:!0,nameKey:"plugins.meta.kafka-log.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},session:{descriptionKey:"plugins.meta.session.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.session.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"upstream-tls":{descriptionKey:"plugins.meta.upstream-tls.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.upstream-tls.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"application-registration":{descriptionKey:"plugins.meta.application-registration.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.application-registration.name",scope:[p.SERVICE]},"konnect-application-auth":{descriptionKey:"plugins.meta.konnect-application-auth.description",group:D.AUTHENTICATION,isEnterprise:!1,nameKey:"plugins.meta.konnect-application-auth.name",scope:[p.GLOBAL,p.SERVICE],imageName:"application-registration"},acme:{descriptionKey:"plugins.meta.acme.description",group:D.SECURITY,isEnterprise:!1,nameKey:"plugins.meta.acme.name",scope:[p.GLOBAL]},"grpc-gateway":{descriptionKey:"plugins.meta.grpc-gateway.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.grpc-gateway.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"grpc-web":{descriptionKey:"plugins.meta.grpc-web.description",group:D.TRANSFORMATIONS,isEnterprise:!1,nameKey:"plugins.meta.grpc-web.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"upstream-timeout":{descriptionKey:"plugins.meta.upstream-timeout.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.upstream-timeout.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},opentelemetry:{descriptionKey:"plugins.meta.opentelemetry.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!1,nameKey:"plugins.meta.opentelemetry.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.traces_endpoint","config.logs_endpoint"]]}},"websocket-validator":{descriptionKey:"plugins.meta.websocket-validator.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.websocket-validator.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"websocket-size-limit":{descriptionKey:"plugins.meta.websocket-size-limit.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.websocket-size-limit.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],fieldRules:{atLeastOneOf:[["config.client_max_payload","config.upstream_max_payload"]]}},"tls-metadata-headers":{descriptionKey:"plugins.meta.tls-metadata-headers.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.tls-metadata-headers.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"tls-handshake-modifier":{descriptionKey:"plugins.meta.tls-handshake-modifier.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.tls-handshake-modifier.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"oas-validation":{descriptionKey:"plugins.meta.oas-validation.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.oas-validation.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"jwe-decrypt":{descriptionKey:"plugins.meta.jwe-decrypt.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.jwe-decrypt.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"xml-threat-protection":{descriptionKey:"plugins.meta.xml-threat-protection.description",group:D.TRAFFIC_CONTROL,isEnterprise:!0,nameKey:"plugins.meta.xml-threat-protection.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},saml:{descriptionKey:"plugins.meta.saml.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.saml.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"app-dynamics":{descriptionKey:"plugins.meta.app-dynamics.description",group:D.ANALYTICS_AND_MONITORING,isEnterprise:!0,nameKey:"plugins.meta.app-dynamics.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER]},"json-threat-protection":{descriptionKey:"plugins.meta.json-threat-protection.description",group:D.SECURITY,isEnterprise:!0,nameKey:"plugins.meta.json-threat-protection.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"standard-webhooks":{descriptionKey:"plugins.meta.standard-webhooks.description",group:D.TRAFFIC_CONTROL,isEnterprise:!1,nameKey:"plugins.meta.standard-webhooks.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE]},"ai-proxy-advanced":{descriptionKey:"plugins.meta.ai-proxy-advanced.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-proxy-advanced.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"ai-semantic-cache":{descriptionKey:"plugins.meta.ai-semantic-cache.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-semantic-cache.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER],useLegacyForm:!0},"ai-semantic-prompt-guard":{descriptionKey:"plugins.meta.ai-semantic-prompt-guard.description",group:D.AI,isEnterprise:!0,nameKey:"plugins.meta.ai-semantic-prompt-guard.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE,p.CONSUMER,p.CONSUMER_GROUP],useLegacyForm:!0},"header-cert-auth":{descriptionKey:"plugins.meta.header-cert-auth.description",group:D.AUTHENTICATION,isEnterprise:!0,nameKey:"plugins.meta.header-cert-auth.name",scope:[p.GLOBAL,p.SERVICE,p.ROUTE],imageName:"tls-metadata-headers",fieldRules:{onlyOneOfMutuallyRequired:[[["config.http_proxy_host","config.http_proxy_port"],["config.https_proxy_host","config.https_proxy_port"]]]}}},nn={acl:{titleKey:"plugins.meta.acl.name",plugin:"acl",schema:ur,nameKey:"plugins.meta.acl.credential_name",endpoint:"/acls",schemaEndpoint:"acls",fields:Vt(ur),applyCredentialButtonText:"Add group to consumer"},"basic-auth":{titleKey:"plugins.meta.basic-auth.name",plugin:"basic-auth",schema:pr,nameKey:"plugins.meta.basic-auth.credential_name",endpoint:"/basic-auth",schemaEndpoint:"basicauth_credentials",fields:Vt(pr)},"key-auth":{titleKey:"plugins.meta.key-auth.name",plugin:"key-auth",schema:mr,nameKey:"plugins.meta.key-auth.credential_name",endpoint:"/key-auth",schemaEndpoint:"keyauth_credentials",fields:Vt(mr)},"key-auth-enc":{titleKey:"plugins.meta.key-auth-enc.name",plugin:"key-auth-enc",schema:Ar,nameKey:"plugins.meta.key-auth-enc.credential_name",endpoint:"/key-auth-enc",schemaEndpoint:"keyauth_enc_credentials",fields:Vt(Ar)},oauth2:{titleKey:"plugins.meta.oauth2.name",plugin:"oauth2",schema:fr,nameKey:"plugins.meta.oauth2.credential_name",endpoint:"/oauth2",schemaEndpoint:"oauth2_credentials",fields:Vt(fr)},"hmac-auth":{titleKey:"plugins.meta.hmac-auth.name",plugin:"hmac-auth",schema:gr,nameKey:"plugins.meta.hmac-auth.credential_name",endpoint:"/hmac-auth",schemaEndpoint:"hmacauth_credentials",fields:Vt(gr)},jwt:{titleKey:"plugins.meta.jwt.name",plugin:"jwt",schema:Xf,nameKey:"plugins.meta.jwt.credential_name",endpoint:"/jwt",schemaEndpoint:"jwt_secrets",fields:{id:{},key:{},algorithm:{}}}},Wf={acls:Hf,basicauth_credentials:Ff,keyauth_credentials:zf,keyauth_enc_credentials:Qf,oauth2_credentials:Zf,hmacauth_credentials:Kf,jwt_secrets:Jf},hr=e=>{var a;const n=((a=rt[e])==null?void 0:a.imageName)||e||"missing",i=new URL(Object.assign({"../assets/images/plugin-icons/acl.png":tg,"../assets/images/plugin-icons/acme.png":ng,"../assets/images/plugin-icons/ai-azure-content-safety.png":ig,"../assets/images/plugin-icons/ai-data-sanitization.png":ag,"../assets/images/plugin-icons/ai-prompt-decorator.png":og,"../assets/images/plugin-icons/ai-prompt-guard.png":rg,"../assets/images/plugin-icons/ai-prompt-template.png":lg,"../assets/images/plugin-icons/ai-proxy-advanced.png":sg,"../assets/images/plugin-icons/ai-proxy.png":cg,"../assets/images/plugin-icons/ai-rate-limiting-advanced.png":dg,"../assets/images/plugin-icons/ai-request-transformer.png":ug,"../assets/images/plugin-icons/ai-response-transformer.png":pg,"../assets/images/plugin-icons/ai-semantic-cache.png":mg,"../assets/images/plugin-icons/ai-semantic-prompt-guard.png":gg,"../assets/images/plugin-icons/app-dynamics.png":fg,"../assets/images/plugin-icons/application-registration.png":Ag,"../assets/images/plugin-icons/aws-lambda.png":hg,"../assets/images/plugin-icons/azure-functions.png":yg,"../assets/images/plugin-icons/basic-auth.png":bg,"../assets/images/plugin-icons/bot-detection.png":wg,"../assets/images/plugin-icons/canary.png":Eg,"../assets/images/plugin-icons/collector.png":Cg,"../assets/images/plugin-icons/correlation-id.png":kg,"../assets/images/plugin-icons/cors.png":Bg,"../assets/images/plugin-icons/datadog.png":Ig,"../assets/images/plugin-icons/degraphql.png":Sg,"../assets/images/plugin-icons/dynamic-ssl.png":xg,"../assets/images/plugin-icons/exit-transformer.png":vg,"../assets/images/plugin-icons/file-log.png":Og,"../assets/images/plugin-icons/forward-proxy.png":Mg,"../assets/images/plugin-icons/graphql-rate-limiting-advanced.png":Rg,"../assets/images/plugin-icons/graphql.png":Tg,"../assets/images/plugin-icons/grpc-gateway.png":Ng,"../assets/images/plugin-icons/grpc-web.png":Vg,"../assets/images/plugin-icons/hmac-auth.png":Lg,"../assets/images/plugin-icons/http-log.png":Dg,"../assets/images/plugin-icons/ip-restriction.png":jg,"../assets/images/plugin-icons/jq.png":Ug,"../assets/images/plugin-icons/json-threat-protection.png":Pg,"../assets/images/plugin-icons/jwe-decrypt.png":Gg,"../assets/images/plugin-icons/jwt-signer.png":Yg,"../assets/images/plugin-icons/jwt.png":Hg,"../assets/images/plugin-icons/kafka-log.png":Fg,"../assets/images/plugin-icons/kafka-upstream.png":zg,"../assets/images/plugin-icons/key-auth-enc.png":Kg,"../assets/images/plugin-icons/key-auth.png":qg,"../assets/images/plugin-icons/kong-function.png":Xg,"../assets/images/plugin-icons/kubernetes-sidecar-injector.png":Jg,"../assets/images/plugin-icons/ldap-auth-advanced.png":Zg,"../assets/images/plugin-icons/ldap-auth.png":Qg,"../assets/images/plugin-icons/loggly.png":Wg,"../assets/images/plugin-icons/missing.png":_g,"../assets/images/plugin-icons/mocking.png":$g,"../assets/images/plugin-icons/mtls-auth.png":ef,"../assets/images/plugin-icons/new.png":tf,"../assets/images/plugin-icons/oas-validation.png":nf,"../assets/images/plugin-icons/oauth2-introspection.png":af,"../assets/images/plugin-icons/oauth2.png":of,"../assets/images/plugin-icons/opa.png":rf,"../assets/images/plugin-icons/openid-connect.png":lf,"../assets/images/plugin-icons/opentelemetry.png":sf,"../assets/images/plugin-icons/openwhisk.png":cf,"../assets/images/plugin-icons/prometheus.png":df,"../assets/images/plugin-icons/proxy-cache.png":uf,"../assets/images/plugin-icons/rate-limiting-advanced.png":pf,"../assets/images/plugin-icons/rate-limiting.png":mf,"../assets/images/plugin-icons/request-size-limiting.png":gf,"../assets/images/plugin-icons/request-termination.png":ff,"../assets/images/plugin-icons/request-transformer-advanced.png":Af,"../assets/images/plugin-icons/request-transformer.png":hf,"../assets/images/plugin-icons/request-validator.png":yf,"../assets/images/plugin-icons/response-ratelimiting.png":bf,"../assets/images/plugin-icons/response-transformer-advanced.png":wf,"../assets/images/plugin-icons/response-transformer.png":Ef,"../assets/images/plugin-icons/route-by-header.png":Cf,"../assets/images/plugin-icons/route-transformer-advanced.png":kf,"../assets/images/plugin-icons/runscope.png":Bf,"../assets/images/plugin-icons/saml.png":If,"../assets/images/plugin-icons/session.png":Sf,"../assets/images/plugin-icons/standard-webhooks.png":xf,"../assets/images/plugin-icons/statsd-advanced.png":vf,"../assets/images/plugin-icons/statsd.png":Of,"../assets/images/plugin-icons/syslog.png":Mf,"../assets/images/plugin-icons/tcp-log.png":Rf,"../assets/images/plugin-icons/tls-handshake-modifier.png":Tf,"../assets/images/plugin-icons/tls-metadata-headers.png":Nf,"../assets/images/plugin-icons/udp-log.png":Vf,"../assets/images/plugin-icons/upstream-timeout.png":Lf,"../assets/images/plugin-icons/upstream-tls.png":Df,"../assets/images/plugin-icons/vault-auth.png":jf,"../assets/images/plugin-icons/websocket-size-limit.png":Uf,"../assets/images/plugin-icons/websocket-validator.png":Pf,"../assets/images/plugin-icons/xml-threat-protection.png":Gf,"../assets/images/plugin-icons/zipkin.png":Yf})[`../assets/images/plugin-icons/${n}.png`],typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qt&&Qt.src||new URL("entities-plugins.umd.js",document.baseURI).href).href;return i.includes("undefined")?new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAMAAABKCk6nAAAAhFBMVEUAAADs+fnr8PTo7fLm7PDl6e7j6+7j6O3i6Ozh5+vp9PTm7PDj6e319fXn7PHj6O739/fn7PDi6e3////o7fLj6Ozt8fbj6u7r7vPi6ezo7fL////n7PHm6/Dl6+/q8PTs8vbu9Pjv9frw9vri6ezv9fnp7/Pt8vfk6u6cpar////e4ePLpSv+AAAAHnRSTlMAKIq93/T6/f7/W8z3GbL4Hr/9AZ39OPFo/Z4FzOeuk05oAAAFJklEQVR4Ae3ThZLjyhWA4SNdWJ9BMy/KA3n/twoXBafWWYb2QPi6Vd9XKGz4q5t4QPNZHDP2n8W/4uT0bJBUZHB2ehL/pPOLy6wQlxfn8bThaJxUajwaxuMm01lSsdl0Eo+YL5LKLebxoOUqqd5qGQ9YD7IHGKzjPptt9gTbzT19n2dv8Pyw8DZ7hG0U1tkrrOM7y0H2CoNlfGO+yp5hNY8vJovsHRaT+GyaPcQ03mkiYvjnNu4za94Ljtn+vd/Efc7+/sf4YJT32L286qjE1ctd3mMUH5yP89D1m46KvLnOQ+PzeO8iD+xuOipzs8sDF/HeZZZuX3dU5/Vtli7jnZMs7fSts/AuSycRcZqlm44q3WTpNCLOsnDdUanrLJxF29zF9zZ3QaXuNuWNJtosvOyo1ssstG0ThZ+Dah3Ea+LHIvmLjoq9KHL+2DYHyanYQc6jDYzACCxwZKGjallog177DwIjMAIjMAIjsMAIjMAIjMAIjMAILDACIzACIzACI7DACIzACIzACIzAAiMwAiMwAiMwAiOwwAiMwAiMwAiMwAIjMAIjMAIjMAILjMAIjMAIjMAIjMACIzACIzACIzACC4zACIzACIzACIzAAiMwAiMwAiMwAguMwAiMwAiMwAgsMAIjMAIjMAIjMAILjMAIjMAIjMAILDACIzACI/DP/6GjGENgBEZgBBYYgREYgREYgRGYJwMjMAIjMAI3TziCMQTmaAIjMAIjMAIjMAILjMAIjMAIjMAITBa6X9CveqD7hWWhDXpNYIERGIERGIERGIEFRmAERmAERuBKCdw2R68VGIERGIERWGAERmAERmAERmCBERiBERiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgRFYYARGYARGYARGYIERGIERGIERGIEFRmAERmAERuB+EPjt/ui9FRiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgWshcNscvVZgBEZgBEZggREYgREYgREYgQVGYARGYARGYARGYIERGIERGIERGIEFRmAERmAERmAERmCBERiBERiBERiBBUZgBEZgBEZgBBYYgREYgREYgftB4Lf7o/dWYARGYARGYIERGIERGIERGIEFRmAE5kj9GEfkb/EfwwkWGIERGIERGIERWGAERmAERmAERmAEFhiBERiBERiBEVhgBEZgBEZgBEZggREYgREYgREYgRFYYARGYARGYARGYIERGIERGIERGIERWGAERmAERmAERmCBERiBERiBERiBBUZgBEZgBEZgBEZggREYgREYgREYgQVGYARGYARGYAQWGIERGIERGIERGIEFRmAERmAERmAEFhiBERiBERiBEZh2r3iflPn2B4HvgordPRl4H1RsL7DAfSJw/JCFq45qXWXhh3Yfhb8F1TqIt2/3ZeGf9kGl9j/F997XPcvCdUelrrNwFhGnWbrpqNJNlk4j4iRLu9cdFXq9y9JJvHOZpVuFa+x7m6XLeO8iD+xuOipzs8sDF/He+TgPXb/pqMib6zw0Po8PRnmP3curjkpcvdzlPUYR0UTE8M9t3GfWvBfHjP17v4n7nP39j/HRNOmhaXw2WSS9s5jEF/NV0jOreXxjOUh6ZbCM76yTXllHYZv0yDZKm+dJbzzfxGHhbdIT203cZz1IemCwjgcsV0n1Vst40HyRVG4xj0dMprOkYrPpJB43HI2TSo1Hw3ja+cVlUqHLi/P4J52cng2SigzOTk/iPk08oPksjhn7z+J+/wBSUhUZLUGZBgAAAABJRU5ErkJggg==",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qt&&Qt.src||new URL("entities-plugins.umd.js",document.baseURI).href).href:i},_f=()=>{const{i18n:{t:e}}=ei(),n={},i={};for(const[o,r]of Object.entries(rt))n[o]={...r,name:e(r.nameKey),description:e(r.descriptionKey)};for(const[o,r]of Object.entries(nn))i[o]={...r,name:e(r.nameKey),title:e(r.titleKey)};return{pluginMetaData:n,credentialMetaData:i,credentialSchemas:nn,getDisplayName:o=>{var r;return((r=n[o])==null?void 0:r.name)||o}}};function yr(e,n){for(var i=-1,a=e==null?0:e.length;++i<a&&n(e[i],i,e)!==!1;);return e}function $f(e){return function(n,i,a){for(var o=-1,r=Object(n),l=a(n),s=l.length;s--;){var c=l[e?s:++o];if(i(r[c],c,r)===!1)break}return n}}var eA=$f();const tA=eA;function nA(e,n){for(var i=-1,a=Array(e);++i<e;)a[i]=n(i);return a}var br=typeof global=="object"&&global&&global.Object===Object&&global,iA=typeof self=="object"&&self&&self.Object===Object&&self,Je=br||iA||Function("return this")(),lt=Je.Symbol,wr=Object.prototype,aA=wr.hasOwnProperty,oA=wr.toString,Bn=lt?lt.toStringTag:void 0;function rA(e){var n=aA.call(e,Bn),i=e[Bn];try{e[Bn]=void 0;var a=!0}catch{}var o=oA.call(e);return a&&(n?e[Bn]=i:delete e[Bn]),o}var lA=Object.prototype,sA=lA.toString;function cA(e){return sA.call(e)}var dA="[object Null]",uA="[object Undefined]",Er=lt?lt.toStringTag:void 0;function yt(e){return e==null?e===void 0?uA:dA:Er&&Er in Object(e)?rA(e):cA(e)}function st(e){return e!=null&&typeof e=="object"}var pA="[object Arguments]";function Cr(e){return st(e)&&yt(e)==pA}var kr=Object.prototype,mA=kr.hasOwnProperty,gA=kr.propertyIsEnumerable,Br=Cr(function(){return arguments}())?Cr:function(e){return st(e)&&mA.call(e,"callee")&&!gA.call(e,"callee")},Ze=Array.isArray;function fA(){return!1}var Ir=typeof W=="object"&&W&&!W.nodeType&&W,Sr=Ir&&typeof module=="object"&&module&&!module.nodeType&&module,AA=Sr&&Sr.exports===Ir,xr=AA?Je.Buffer:void 0,hA=xr?xr.isBuffer:void 0,ti=hA||fA,yA=9007199254740991,bA=/^(?:0|[1-9]\d*)$/;function qi(e,n){var i=typeof e;return n=n??yA,!!n&&(i=="number"||i!="symbol"&&bA.test(e))&&e>-1&&e%1==0&&e<n}var wA=9007199254740991;function Xi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wA}var EA="[object Arguments]",CA="[object Array]",kA="[object Boolean]",BA="[object Date]",IA="[object Error]",SA="[object Function]",xA="[object Map]",vA="[object Number]",OA="[object Object]",MA="[object RegExp]",RA="[object Set]",TA="[object String]",NA="[object WeakMap]",VA="[object ArrayBuffer]",LA="[object DataView]",DA="[object Float32Array]",jA="[object Float64Array]",UA="[object Int8Array]",PA="[object Int16Array]",GA="[object Int32Array]",YA="[object Uint8Array]",HA="[object Uint8ClampedArray]",FA="[object Uint16Array]",zA="[object Uint32Array]",fe={};fe[DA]=fe[jA]=fe[UA]=fe[PA]=fe[GA]=fe[YA]=fe[HA]=fe[FA]=fe[zA]=!0,fe[EA]=fe[CA]=fe[VA]=fe[kA]=fe[LA]=fe[BA]=fe[IA]=fe[SA]=fe[xA]=fe[vA]=fe[OA]=fe[MA]=fe[RA]=fe[TA]=fe[NA]=!1;function KA(e){return st(e)&&Xi(e.length)&&!!fe[yt(e)]}function Ji(e){return function(n){return e(n)}}var vr=typeof W=="object"&&W&&!W.nodeType&&W,In=vr&&typeof module=="object"&&module&&!module.nodeType&&module,qA=In&&In.exports===vr,Zi=qA&&br.process,an=function(){try{var e=In&&In.require&&In.require("util").types;return e||Zi&&Zi.binding&&Zi.binding("util")}catch{}}(),Or=an&&an.isTypedArray,Mr=Or?Ji(Or):KA,XA=Object.prototype,JA=XA.hasOwnProperty;function Rr(e,n){var i=Ze(e),a=!i&&Br(e),o=!i&&!a&&ti(e),r=!i&&!a&&!o&&Mr(e),l=i||a||o||r,s=l?nA(e.length,String):[],c=s.length;for(var u in e)(n||JA.call(e,u))&&!(l&&(u=="length"||o&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||qi(u,c)))&&s.push(u);return s}var ZA=Object.prototype;function Qi(e){var n=e&&e.constructor,i=typeof n=="function"&&n.prototype||ZA;return e===i}function Tr(e,n){return function(i){return e(n(i))}}var QA=Tr(Object.keys,Object),WA=Object.prototype,_A=WA.hasOwnProperty;function $A(e){if(!Qi(e))return QA(e);var n=[];for(var i in Object(e))_A.call(e,i)&&i!="constructor"&&n.push(i);return n}function De(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var eh="[object AsyncFunction]",th="[object Function]",nh="[object GeneratorFunction]",ih="[object Proxy]";function Ae(e){if(!De(e))return!1;var n=yt(e);return n==th||n==nh||n==eh||n==ih}function Sn(e){return e!=null&&Xi(e.length)&&!Ae(e)}function on(e){return Sn(e)?Rr(e):$A(e)}function ah(e,n){return e&&tA(e,n,on)}function oh(e,n){return function(i,a){if(i==null)return i;if(!Sn(i))return e(i,a);for(var o=i.length,r=n?o:-1,l=Object(i);(n?r--:++r<o)&&a(l[r],r,l)!==!1;);return i}}var rh=oh(ah);const lh=rh;function ni(e){return e}function sh(e){return typeof e=="function"?e:ni}function je(e,n){var i=Ze(e)?yr:lh;return i(e,sh(n))}var ch="[object Symbol]";function ii(e){return typeof e=="symbol"||st(e)&&yt(e)==ch}var dh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uh=/^\w*$/;function Wi(e,n){if(Ze(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||ii(e)?!0:uh.test(e)||!dh.test(e)||n!=null&&e in Object(n)}var _i=Je["__core-js_shared__"],Nr=function(){var e=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ph(e){return!!Nr&&Nr in e}var mh=Function.prototype,gh=mh.toString;function Lt(e){if(e!=null){try{return gh.call(e)}catch{}try{return e+""}catch{}}return""}var fh=/[\\^$.*+?()[\]{}|]/g,Ah=/^\[object .+?Constructor\]$/,hh=Function.prototype,yh=Object.prototype,bh=hh.toString,wh=yh.hasOwnProperty,Eh=RegExp("^"+bh.call(wh).replace(fh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ch(e){if(!De(e)||ph(e))return!1;var n=Ae(e)?Eh:Ah;return n.test(Lt(e))}function kh(e,n){return e==null?void 0:e[n]}function Dt(e,n){var i=kh(e,n);return Ch(i)?i:void 0}var xn=Dt(Object,"create");function Bh(){this.__data__=xn?xn(null):{},this.size=0}function Ih(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Sh="__lodash_hash_undefined__",xh=Object.prototype,vh=xh.hasOwnProperty;function Oh(e){var n=this.__data__;if(xn){var i=n[e];return i===Sh?void 0:i}return vh.call(n,e)?n[e]:void 0}var Mh=Object.prototype,Rh=Mh.hasOwnProperty;function Th(e){var n=this.__data__;return xn?n[e]!==void 0:Rh.call(n,e)}var Nh="__lodash_hash_undefined__";function Vh(e,n){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=xn&&n===void 0?Nh:n,this}function jt(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var a=e[n];this.set(a[0],a[1])}}jt.prototype.clear=Bh,jt.prototype.delete=Ih,jt.prototype.get=Oh,jt.prototype.has=Th,jt.prototype.set=Vh;function Lh(){this.__data__=[],this.size=0}function vn(e,n){return e===n||e!==e&&n!==n}function ai(e,n){for(var i=e.length;i--;)if(vn(e[i][0],n))return i;return-1}var Dh=Array.prototype,jh=Dh.splice;function Uh(e){var n=this.__data__,i=ai(n,e);if(i<0)return!1;var a=n.length-1;return i==a?n.pop():jh.call(n,i,1),--this.size,!0}function Ph(e){var n=this.__data__,i=ai(n,e);return i<0?void 0:n[i][1]}function Gh(e){return ai(this.__data__,e)>-1}function Yh(e,n){var i=this.__data__,a=ai(i,e);return a<0?(++this.size,i.push([e,n])):i[a][1]=n,this}function ut(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var a=e[n];this.set(a[0],a[1])}}ut.prototype.clear=Lh,ut.prototype.delete=Uh,ut.prototype.get=Ph,ut.prototype.has=Gh,ut.prototype.set=Yh;var On=Dt(Je,"Map");function Hh(){this.size=0,this.__data__={hash:new jt,map:new(On||ut),string:new jt}}function Fh(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function oi(e,n){var i=e.__data__;return Fh(n)?i[typeof n=="string"?"string":"hash"]:i.map}function zh(e){var n=oi(this,e).delete(e);return this.size-=n?1:0,n}function Kh(e){return oi(this,e).get(e)}function qh(e){return oi(this,e).has(e)}function Xh(e,n){var i=oi(this,e),a=i.size;return i.set(e,n),this.size+=i.size==a?0:1,this}function pt(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var a=e[n];this.set(a[0],a[1])}}pt.prototype.clear=Hh,pt.prototype.delete=zh,pt.prototype.get=Kh,pt.prototype.has=qh,pt.prototype.set=Xh;var Jh="Expected a function";function $i(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(Jh);var i=function(){var a=arguments,o=n?n.apply(this,a):a[0],r=i.cache;if(r.has(o))return r.get(o);var l=e.apply(this,a);return i.cache=r.set(o,l)||r,l};return i.cache=new($i.Cache||pt),i}$i.Cache=pt;var Zh=500;function Qh(e){var n=$i(e,function(a){return i.size===Zh&&i.clear(),a}),i=n.cache;return n}var Wh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_h=/\\(\\)?/g,$h=Qh(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(Wh,function(i,a,o,r){n.push(o?r.replace(_h,"$1"):a||i)}),n});function ey(e,n){for(var i=-1,a=e==null?0:e.length,o=Array(a);++i<a;)o[i]=n(e[i],i,e);return o}var ty=1/0,Vr=lt?lt.prototype:void 0,Lr=Vr?Vr.toString:void 0;function Dr(e){if(typeof e=="string")return e;if(Ze(e))return ey(e,Dr)+"";if(ii(e))return Lr?Lr.call(e):"";var n=e+"";return n=="0"&&1/e==-ty?"-0":n}function jr(e){return e==null?"":Dr(e)}function Ur(e,n){return Ze(e)?e:Wi(e,n)?[e]:$h(jr(e))}var ny=1/0;function ri(e){if(typeof e=="string"||ii(e))return e;var n=e+"";return n=="0"&&1/e==-ny?"-0":n}function Pr(e,n){n=Ur(n,e);for(var i=0,a=n.length;e!=null&&i<a;)e=e[ri(n[i++])];return i&&i==a?e:void 0}function le(e,n,i){var a=e==null?void 0:Pr(e,n);return a===void 0?i:a}function ke(e){return e==null}const bt="kong-ui-forms-api",wt="autofill",Qe="autofillSlot";function iy(){this.__data__=new ut,this.size=0}function ay(e){var n=this.__data__,i=n.delete(e);return this.size=n.size,i}function oy(e){return this.__data__.get(e)}function ry(e){return this.__data__.has(e)}var ly=200;function sy(e,n){var i=this.__data__;if(i instanceof ut){var a=i.__data__;if(!On||a.length<ly-1)return a.push([e,n]),this.size=++i.size,this;i=this.__data__=new pt(a)}return i.set(e,n),this.size=i.size,this}function ct(e){var n=this.__data__=new ut(e);this.size=n.size}ct.prototype.clear=iy,ct.prototype.delete=ay,ct.prototype.get=oy,ct.prototype.has=ry,ct.prototype.set=sy;var li=function(){try{var e=Dt(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Gr(e,n,i){n=="__proto__"&&li?li(e,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[n]=i}var cy=Object.prototype,dy=cy.hasOwnProperty;function Yr(e,n,i){var a=e[n];(!(dy.call(e,n)&&vn(a,i))||i===void 0&&!(n in e))&&Gr(e,n,i)}function si(e,n,i,a){var o=!i;i||(i={});for(var r=-1,l=n.length;++r<l;){var s=n[r],c=a?a(i[s],e[s],s,i,e):void 0;c===void 0&&(c=e[s]),o?Gr(i,s,c):Yr(i,s,c)}return i}function uy(e,n){return e&&si(n,on(n),e)}function py(e){var n=[];if(e!=null)for(var i in Object(e))n.push(i);return n}var my=Object.prototype,gy=my.hasOwnProperty;function fy(e){if(!De(e))return py(e);var n=Qi(e),i=[];for(var a in e)a=="constructor"&&(n||!gy.call(e,a))||i.push(a);return i}function ci(e){return Sn(e)?Rr(e,!0):fy(e)}function Ay(e,n){return e&&si(n,ci(n),e)}var Hr=typeof W=="object"&&W&&!W.nodeType&&W,Fr=Hr&&typeof module=="object"&&module&&!module.nodeType&&module,hy=Fr&&Fr.exports===Hr,zr=hy?Je.Buffer:void 0,Kr=zr?zr.allocUnsafe:void 0;function yy(e,n){if(n)return e.slice();var i=e.length,a=Kr?Kr(i):new e.constructor(i);return e.copy(a),a}function by(e,n){var i=-1,a=e.length;for(n||(n=Array(a));++i<a;)n[i]=e[i];return n}function wy(e,n){for(var i=-1,a=e==null?0:e.length,o=0,r=[];++i<a;){var l=e[i];n(l,i,e)&&(r[o++]=l)}return r}function qr(){return[]}var Ey=Object.prototype,Cy=Ey.propertyIsEnumerable,Xr=Object.getOwnPropertySymbols,ea=Xr?function(e){return e==null?[]:(e=Object(e),wy(Xr(e),function(n){return Cy.call(e,n)}))}:qr;function ky(e,n){return si(e,ea(e),n)}function Jr(e,n){for(var i=-1,a=n.length,o=e.length;++i<a;)e[o+i]=n[i];return e}var By=Tr(Object.getPrototypeOf,Object);const Zr=By;var Iy=Object.getOwnPropertySymbols,Qr=Iy?function(e){for(var n=[];e;)Jr(n,ea(e)),e=Zr(e);return n}:qr;function Sy(e,n){return si(e,Qr(e),n)}function Wr(e,n,i){var a=n(e);return Ze(e)?a:Jr(a,i(e))}function ta(e){return Wr(e,on,ea)}function xy(e){return Wr(e,ci,Qr)}var na=Dt(Je,"DataView"),ia=Dt(Je,"Promise"),rn=Dt(Je,"Set"),aa=Dt(Je,"WeakMap"),_r="[object Map]",vy="[object Object]",$r="[object Promise]",el="[object Set]",tl="[object WeakMap]",nl="[object DataView]",Oy=Lt(na),My=Lt(On),Ry=Lt(ia),Ty=Lt(rn),Ny=Lt(aa),Ut=yt;(na&&Ut(new na(new ArrayBuffer(1)))!=nl||On&&Ut(new On)!=_r||ia&&Ut(ia.resolve())!=$r||rn&&Ut(new rn)!=el||aa&&Ut(new aa)!=tl)&&(Ut=function(e){var n=yt(e),i=n==vy?e.constructor:void 0,a=i?Lt(i):"";if(a)switch(a){case Oy:return nl;case My:return _r;case Ry:return $r;case Ty:return el;case Ny:return tl}return n});const Mn=Ut;var Vy=Object.prototype,Ly=Vy.hasOwnProperty;function Dy(e){var n=e.length,i=new e.constructor(n);return n&&typeof e[0]=="string"&&Ly.call(e,"index")&&(i.index=e.index,i.input=e.input),i}var di=Je.Uint8Array;function oa(e){var n=new e.constructor(e.byteLength);return new di(n).set(new di(e)),n}function jy(e,n){var i=n?oa(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}var Uy=/\w*$/;function Py(e){var n=new e.constructor(e.source,Uy.exec(e));return n.lastIndex=e.lastIndex,n}var il=lt?lt.prototype:void 0,al=il?il.valueOf:void 0;function Gy(e){return al?Object(al.call(e)):{}}function Yy(e,n){var i=n?oa(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}var Hy="[object Boolean]",Fy="[object Date]",zy="[object Map]",Ky="[object Number]",qy="[object RegExp]",Xy="[object Set]",Jy="[object String]",Zy="[object Symbol]",Qy="[object ArrayBuffer]",Wy="[object DataView]",_y="[object Float32Array]",$y="[object Float64Array]",eb="[object Int8Array]",tb="[object Int16Array]",nb="[object Int32Array]",ib="[object Uint8Array]",ab="[object Uint8ClampedArray]",ob="[object Uint16Array]",rb="[object Uint32Array]";function lb(e,n,i){var a=e.constructor;switch(n){case Qy:return oa(e);case Hy:case Fy:return new a(+e);case Wy:return jy(e,i);case _y:case $y:case eb:case tb:case nb:case ib:case ab:case ob:case rb:return Yy(e,i);case zy:return new a;case Ky:case Jy:return new a(e);case qy:return Py(e);case Xy:return new a;case Zy:return Gy(e)}}var ol=Object.create,sb=function(){function e(){}return function(n){if(!De(n))return{};if(ol)return ol(n);e.prototype=n;var i=new e;return e.prototype=void 0,i}}();function cb(e){return typeof e.constructor=="function"&&!Qi(e)?sb(Zr(e)):{}}var db="[object Map]";function ub(e){return st(e)&&Mn(e)==db}var rl=an&&an.isMap,pb=rl?Ji(rl):ub,mb="[object Set]";function gb(e){return st(e)&&Mn(e)==mb}var ll=an&&an.isSet,fb=ll?Ji(ll):gb,Ab=1,hb=2,yb=4,sl="[object Arguments]",bb="[object Array]",wb="[object Boolean]",Eb="[object Date]",Cb="[object Error]",cl="[object Function]",kb="[object GeneratorFunction]",Bb="[object Map]",Ib="[object Number]",dl="[object Object]",Sb="[object RegExp]",xb="[object Set]",vb="[object String]",Ob="[object Symbol]",Mb="[object WeakMap]",Rb="[object ArrayBuffer]",Tb="[object DataView]",Nb="[object Float32Array]",Vb="[object Float64Array]",Lb="[object Int8Array]",Db="[object Int16Array]",jb="[object Int32Array]",Ub="[object Uint8Array]",Pb="[object Uint8ClampedArray]",Gb="[object Uint16Array]",Yb="[object Uint32Array]",ge={};ge[sl]=ge[bb]=ge[Rb]=ge[Tb]=ge[wb]=ge[Eb]=ge[Nb]=ge[Vb]=ge[Lb]=ge[Db]=ge[jb]=ge[Bb]=ge[Ib]=ge[dl]=ge[Sb]=ge[xb]=ge[vb]=ge[Ob]=ge[Ub]=ge[Pb]=ge[Gb]=ge[Yb]=!0,ge[Cb]=ge[cl]=ge[Mb]=!1;function Rn(e,n,i,a,o,r){var l,s=n&Ab,c=n&hb,u=n&yb;if(i&&(l=o?i(e,a,o,r):i(e)),l!==void 0)return l;if(!De(e))return e;var d=Ze(e);if(d){if(l=Dy(e),!s)return by(e,l)}else{var m=Mn(e),g=m==cl||m==kb;if(ti(e))return yy(e,s);if(m==dl||m==sl||g&&!o){if(l=c||g?{}:cb(e),!s)return c?Sy(e,Ay(l,e)):ky(e,uy(l,e))}else{if(!ge[m])return o?e:{};l=lb(e,m,s)}}r||(r=new ct);var h=r.get(e);if(h)return h;r.set(e,l),fb(e)?e.forEach(function(b){l.add(Rn(b,n,i,b,e,r))}):pb(e)&&e.forEach(function(b,I){l.set(I,Rn(b,n,i,I,e,r))});var B=u?c?xy:ta:c?ci:on,C=d?void 0:B(e);return yr(C||e,function(b,I){C&&(I=b,b=e[I]),Yr(l,I,Rn(b,n,i,I,e,r))}),l}var Hb=1,Fb=4;function mt(e){return Rn(e,Hb|Fb)}const ra=(e,n="")=>typeof e.id<"u"?n+e.id:n+(e.inputName||e.label||e.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),ul=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var zb="[object String]";function Pt(e){return typeof e=="string"||!Ze(e)&&st(e)&&yt(e)==zb}const pl={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,i={[le(this.options,"validationErrorClass","error")]:n,[le(this.options,"validationSuccessClass","valid")]:!n,disabled:this.fieldDisabled(e),readonly:this.fieldReadonly(e),featured:this.fieldFeatured(e),required:this.fieldRequired(e)};return Array.isArray(e.styleClasses)?je(e.styleClasses,a=>i[a]=!0):Pt(e.styleClasses)&&(i[e.styleClasses]=!0),ke(e.type)||(i["field-"+e.type]=!0),i},fieldErrors(e){return this.errors.filter(n=>n.field.fieldName===e.fieldName).map(n=>n.error)},fieldDisabled(e){return Ae(e.disabled)?e.disabled.call(this,this.model,e,this):ke(e.disabled)?!1:e.disabled},fieldReadonly(e){return Ae(e.readonly)?e.readonly.call(this,this.model,e,this):ke(e.readonly)?!1:e.readonly},fieldFeatured(e){return Ae(e.featured)?e.featured.call(this,this.model,e,this):ke(e.featured)?!1:e.featured},fieldRequired(e){return Ae(e.required)?e.required.call(this,this.model,e,this):ke(e.required)?!1:e.required}}};var la=function(){return Je.Date.now()},Kb=/\s/;function qb(e){for(var n=e.length;n--&&Kb.test(e.charAt(n)););return n}var Xb=/^\s+/;function Jb(e){return e&&e.slice(0,qb(e)+1).replace(Xb,"")}var ml=NaN,Zb=/^[-+]0x[0-9a-f]+$/i,Qb=/^0b[01]+$/i,Wb=/^0o[0-7]+$/i,_b=parseInt;function sa(e){if(typeof e=="number")return e;if(ii(e))return ml;if(De(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=De(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Jb(e);var i=Qb.test(e);return i||Wb.test(e)?_b(e.slice(2),i?2:8):Zb.test(e)?ml:+e}var $b="Expected a function",e1=Math.max,t1=Math.min;function Tn(e,n,i){var a,o,r,l,s,c,u=0,d=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError($b);n=sa(n)||0,De(i)&&(d=!!i.leading,m="maxWait"in i,r=m?e1(sa(i.maxWait)||0,n):r,g="trailing"in i?!!i.trailing:g);function h(f){var y=a,k=o;return a=o=void 0,u=f,l=e.apply(k,y),l}function B(f){return u=f,s=setTimeout(I,n),d?h(f):l}function C(f){var y=f-c,k=f-u,V=n-y;return m?t1(V,r-k):V}function b(f){var y=f-c,k=f-u;return c===void 0||y>=n||y<0||m&&k>=r}function I(){var f=la();if(b(f))return x(f);s=setTimeout(I,C(f))}function x(f){return s=void 0,g&&a?h(f):(a=o=void 0,l)}function E(){s!==void 0&&clearTimeout(s),u=0,a=c=o=s=void 0}function w(){return s===void 0?l:x(la())}function A(){var f=la(),y=b(f);if(a=arguments,o=this,c=f,y){if(s===void 0)return B(c);if(m)return clearTimeout(s),s=setTimeout(I,n),h(c)}return s===void 0&&(s=setTimeout(I,n)),l}return A.cancel=E,A.flush=w,A}var n1="__lodash_hash_undefined__";function i1(e){return this.__data__.set(e,n1),this}function a1(e){return this.__data__.has(e)}function Nn(e){var n=-1,i=e==null?0:e.length;for(this.__data__=new pt;++n<i;)this.add(e[n])}Nn.prototype.add=Nn.prototype.push=i1,Nn.prototype.has=a1;function gl(e,n,i,a){for(var o=e.length,r=i+(a?1:-1);a?r--:++r<o;)if(n(e[r],r,e))return r;return-1}function o1(e){return e!==e}function r1(e,n,i){for(var a=i-1,o=e.length;++a<o;)if(e[a]===n)return a;return-1}function l1(e,n,i){return n===n?r1(e,n,i):gl(e,o1,i)}function s1(e,n){var i=e==null?0:e.length;return!!i&&l1(e,n,0)>-1}function c1(e,n,i){for(var a=-1,o=e==null?0:e.length;++a<o;)if(i(n,e[a]))return!0;return!1}function fl(e,n){return e.has(n)}function d1(){}function ca(e){var n=-1,i=Array(e.size);return e.forEach(function(a){i[++n]=a}),i}var u1=1/0,p1=rn&&1/ca(new rn([,-0]))[1]==u1?function(e){return new rn(e)}:d1,m1=200;function g1(e,n,i){var a=-1,o=s1,r=e.length,l=!0,s=[],c=s;if(i)l=!1,o=c1;else if(r>=m1){var u=n?null:p1(e);if(u)return ca(u);l=!1,o=fl,c=new Nn}else c=n?[]:s;e:for(;++a<r;){var d=e[a],m=n?n(d):d;if(d=i||d!==0?d:0,l&&m===m){for(var g=c.length;g--;)if(c[g]===m)continue e;n&&c.push(m),s.push(d)}else o(c,m,i)||(c!==s&&c.push(m),s.push(d))}return s}function Al(e){return e&&e.length?g1(e):[]}var f1=0;function hl(e){var n=++f1;return jr(e)+n}function A1(e,n,i){switch(i.length){case 0:return e.call(n);case 1:return e.call(n,i[0]);case 2:return e.call(n,i[0],i[1]);case 3:return e.call(n,i[0],i[1],i[2])}return e.apply(n,i)}var yl=Math.max;function h1(e,n,i){return n=yl(n===void 0?e.length-1:n,0),function(){for(var a=arguments,o=-1,r=yl(a.length-n,0),l=Array(r);++o<r;)l[o]=a[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=a[o];return s[n]=i(l),A1(e,this,s)}}function y1(e){return function(){return e}}var b1=li?function(e,n){return li(e,"toString",{configurable:!0,enumerable:!1,value:y1(n),writable:!0})}:ni;const w1=b1;var E1=800,C1=16,k1=Date.now;function B1(e){var n=0,i=0;return function(){var a=k1(),o=C1-(a-i);if(i=a,o>0){if(++n>=E1)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var I1=B1(w1);function S1(e,n){return I1(h1(e,n,ni),e+"")}function x1(e,n,i){if(!De(i))return!1;var a=typeof n;return(a=="number"?Sn(i)&&qi(n,i.length):a=="string"&&n in i)?vn(i[n],e):!1}var bl=Object.prototype,v1=bl.hasOwnProperty,O1=S1(function(e,n){e=Object(e);var i=-1,a=n.length,o=a>2?n[2]:void 0;for(o&&x1(n[0],n[1],o)&&(a=1);++i<a;)for(var r=n[i],l=ci(r),s=-1,c=l.length;++s<c;){var u=l[s],d=e[u];(d===void 0||vn(d,bl[u])&&!v1.call(e,u))&&(e[u]=r[u])}return e}),M1=Je.isFinite;function R1(e){return typeof e=="number"&&M1(e)}var wl=1/0,T1=17976931348623157e292;function N1(e){if(!e)return e===0?e:0;if(e=sa(e),e===wl||e===-wl){var n=e<0?-1:1;return n*T1}return e===e?e:0}function El(e){var n=N1(e),i=n%1;return n===n?i?n-i:n:0}function V1(e){return typeof e=="number"&&e==El(e)}var L1="[object Number]";function da(e){return typeof e=="number"||st(e)&&yt(e)==L1}var Cl=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Et="\\d\\d?",Ct="\\d\\d",D1="\\d{3}",j1="\\d{4}",Vn="[^\\s]+",kl=/\[([^]*?)\]/gm;function Bl(e,n){for(var i=[],a=0,o=e.length;a<o;a++)i.push(e[a].substr(0,n));return i}var Il=function(e){return function(n,i){var a=i[e].map(function(r){return r.toLowerCase()}),o=a.indexOf(n.toLowerCase());return o>-1?o:null}};function Gt(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var a=0,o=n;a<o.length;a++){var r=o[a];for(var l in r)e[l]=r[l]}return e}var Sl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xl=["January","February","March","April","May","June","July","August","September","October","November","December"],U1=Bl(xl,3),P1=Bl(Sl,3),vl={dayNamesShort:P1,dayNames:Sl,monthNamesShort:U1,monthNames:xl,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},ui=Gt({},vl),G1=function(e){return ui=Gt(ui,e)},Ol=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Ge=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},Y1={D:function(e){return String(e.getDate())},DD:function(e){return Ge(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return Ge(e.getDay())},ddd:function(e,n){return n.dayNamesShort[e.getDay()]},dddd:function(e,n){return n.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return Ge(e.getMonth()+1)},MMM:function(e,n){return n.monthNamesShort[e.getMonth()]},MMMM:function(e,n){return n.monthNames[e.getMonth()]},YY:function(e){return Ge(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return Ge(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return Ge(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return Ge(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return Ge(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return Ge(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return Ge(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return Ge(e.getMilliseconds(),3)},a:function(e,n){return e.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(e,n){return e.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+Ge(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+Ge(Math.floor(Math.abs(n)/60),2)+":"+Ge(Math.abs(n)%60,2)}},Ml=function(e){return+e-1},Rl=[null,Et],Tl=[null,Vn],Nl=["isPm",Vn,function(e,n){var i=e.toLowerCase();return i===n.amPm[0]?0:i===n.amPm[1]?1:null}],Vl=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var n=(e+"").match(/([+-]|\d\d)/gi);if(n){var i=+n[1]*60+parseInt(n[2],10);return n[0]==="+"?i:-i}return 0}],H1={D:["day",Et],DD:["day",Ct],Do:["day",Et+Vn,function(e){return parseInt(e,10)}],M:["month",Et,Ml],MM:["month",Ct,Ml],YY:["year",Ct,function(e){var n=new Date,i=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?i-1:i)+e)}],h:["hour",Et,void 0,"isPm"],hh:["hour",Ct,void 0,"isPm"],H:["hour",Et],HH:["hour",Ct],m:["minute",Et],mm:["minute",Ct],s:["second",Et],ss:["second",Ct],YYYY:["year",j1],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",Ct,function(e){return+e*10}],SSS:["millisecond",D1],d:Rl,dd:Rl,ddd:Tl,dddd:Tl,MMM:["month",Vn,Il("monthNamesShort")],MMMM:["month",Vn,Il("monthNames")],a:Nl,A:Nl,ZZ:Vl,Z:Vl},pi={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},F1=function(e){return Gt(pi,e)},z1=function(e,n,i){if(n===void 0&&(n=pi.default),i===void 0&&(i={}),typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");n=pi[n]||n;var a=[];n=n.replace(kl,function(r,l){return a.push(l),"@@@"});var o=Gt(Gt({},ui),i);return n=n.replace(Cl,function(r){return Y1[r](e,o)}),n.replace(/@@@/g,function(){return a.shift()})};function K1(e,n,i){if(i===void 0&&(i={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=pi[n]||n,e.length>1e3)return null;var a=new Date,o={year:a.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],l=[],s=n.replace(kl,function(w,A){return l.push(Ol(A)),"@@@"}),c={},u={};s=Ol(s).replace(Cl,function(w){var A=H1[w],f=A[0],y=A[1],k=A[3];if(c[f])throw new Error("Invalid format. "+f+" specified twice in format");return c[f]=!0,k&&(u[k]=!0),r.push(A),"("+y+")"}),Object.keys(u).forEach(function(w){if(!c[w])throw new Error("Invalid format. "+w+" is required in specified format")}),s=s.replace(/@@@/g,function(){return l.shift()});var d=e.match(new RegExp(s,"i"));if(!d)return null;for(var m=Gt(Gt({},ui),i),g=1;g<d.length;g++){var h=r[g-1],B=h[0],C=h[2],b=C?C(d[g],m):+d[g];if(b==null)return null;o[B]=b}o.isPm===1&&o.hour!=null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===0&&+o.hour==12&&(o.hour=0);var I;if(o.timezoneOffset==null){I=new Date(o.year,o.month,o.day,o.hour,o.minute,o.second,o.millisecond);for(var x=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],g=0,E=x.length;g<E;g++)if(c[x[g][0]]&&o[x[g][0]]!==I[x[g][1]]())return null}else if(I=new Date(Date.UTC(o.year,o.month,o.day,o.hour,o.minute-o.timezoneOffset,o.second,o.millisecond)),o.month>11||o.month<0||o.day>31||o.day<1||o.hour>23||o.hour<0||o.minute>59||o.minute<0||o.second>59||o.second<0)return null;return I}var ln={format:z1,parse:K1,defaultI18n:vl,setGlobalDateI18n:G1,setGlobalDateMasks:F1};const Te={fieldIsRequired:"This field is required!",invalidFormat:"Invalid format!",numberTooSmall:"The number is too small! Minimum: {0}",numberTooBig:"The number is too big! Maximum: {0}",invalidNumber:"Invalid number",invalidInteger:"The value is not an integer",textTooSmall:"The length of text is too small! Current: {0}, Minimum: {1}",textTooBig:"The length of text is too big! Current: {0}, Maximum: {1}",thisNotText:"This is not a text!",thisNotArray:"This is not an array!",selectMinItems:"Select minimum {0} items!",selectMaxItems:"Select maximum {0} items!",invalidDate:"Invalid date!",dateIsEarly:"The date is too early! Current: {0}, Minimum: {1}",dateIsLate:"The date is too late! Current: {0}, Maximum: {1}",invalidEmail:"Invalid e-mail address!",invalidURL:"Invalid URL!",invalidCard:"Invalid card format!",invalidCardNumber:"Invalid card number!",invalidTextContainNumber:"Invalid text! Cannot contains numbers or special characters",invalidTextContainSpec:"Invalid text! Cannot contains special characters"};function We(e,n,i=Te){return ke(e)||e===""?n?[Ee(i.fieldIsRequired)]:[]:null}function Ee(e,...n){if(e!=null&&n.length>0)for(let i=0;i<n.length;i++)e=e.replace("{"+(i-1)+"}",n[i]);return e}const Yt={resources:Te,required(e,n,i,a=Te){return We(e,n.required,a)},number(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=[];return R1(e)?(!ke(n.min)&&e<n.min&&r.push(Ee(a.numberTooSmall,n.min)),!ke(n.max)&&e>n.max&&r.push(Ee(a.numberTooBig,n.max))):r.push(Ee(a.invalidNumber)),r},integer(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=Yt.number(e,n,i,a);return V1(e)||r.push(Ee(a.invalidInteger)),r},double(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!da(e)||isNaN(e))return[Ee(a.invalidNumber)]},string(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=[];return Pt(e)?(!ke(n.min)&&e.length<n.min&&r.push(Ee(a.textTooSmall,e.length,n.min)),!ke(n.max)&&e.length>n.max&&r.push(Ee(a.textTooBig,e.length,n.max))):r.push(Ee(a.thisNotText)),r},array(e,n,i,a=Te){if(n.required){if(!Array.isArray(e))return[Ee(a.thisNotArray)];if(e.length===0)return[Ee(a.fieldIsRequired)]}if(!ke(e)){if(!ke(n.min)&&e.length<n.min)return[Ee(a.selectMinItems,n.min)];if(!ke(n.max)&&e.length>n.max)return[Ee(a.selectMaxItems,n.max)]}},date(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=new Date(e);if(isNaN(r.getDate()))return[Ee(a.invalidDate)];const l=[];if(!ke(n.min)){const s=new Date(n.min);r.valueOf()<s.valueOf()&&l.push(Ee(a.dateIsEarly,ln.format(r),ln.format(s)))}if(!ke(n.max)){const s=new Date(n.max);r.valueOf()>s.valueOf()&&l.push(Ee(a.dateIsLate,ln.format(r),ln.format(s)))}return l},regexp(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!ke(n.pattern)&&!new RegExp(n.pattern).test(e))return[Ee(a.invalidFormat)]},email(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e))return[Ee(a.invalidEmail)]},url(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(e))return[Ee(a.invalidURL)]},creditCard(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;const r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,l=e.replace(/[^0-9]+/g,"");if(!r.test(l))return[Ee(a.invalidCard)];let s=0,c,u,d;for(let m=l.length-1;m>=0;m--)c=l.substring(m,m+1),u=parseInt(c,10),d?(u*=2,u>=10?s+=u%10+1:s+=u):s+=u,d=!d;if(!(s%10===0&&l))return[Ee(a.invalidCardNumber)]},alpha(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!/^[a-zA-Z]*$/.test(e))return[Ee(a.invalidTextContainNumber)]},alphaNumeric(e,n,i,a=Te){const o=We(e,n.required,a);if(o!=null)return o;if(!/^[a-zA-Z0-9]*$/.test(e))return[Ee(a.invalidTextContainSpec)]}};Object.keys(Yt).forEach(e=>{const n=Yt[e];Ae(n)&&(n.locale=i=>(a,o,r)=>n(a,o,r,O1(i,Te)))});function Ll(e){return Pt(e)?Yt[e]!=null?Yt[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function ua(e,n,i){let a=le(i.context,"schema.attributes",{});const o=n.value||"input";Pt(o)&&(a=le(a,o)||a),je(a,(r,l)=>{e.setAttribute(l,r)})}const Ue={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:ua,updated:ua,componentUpdated:ua}},computed:{value:{cache:!1,get(){let e;return Ae(le(this.schema,"get"))?e=this.schema.get(this.model):e=le(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),Ae(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=le(this.formOptions,"validateAsync",!1);let i=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const o=[];Array.isArray(this.schema.validator)?je(this.schema.validator,r=>{o.push(Ll(r).bind(this))}):o.push(Ll(this.schema.validator).bind(this)),je(o,r=>{if(n)i.push(r(this.value,this.schema,this.model));else{const l=r(this.value,this.schema,this.model);l&&Ae(l.then)?l.then(s=>{s&&(this.errors=this.errors.concat(s));const c=this.errors.length===0;this.$emit("validated",c,this.errors,this)}):l&&(i=i.concat(l))}})}const a=o=>{let r=[];je(Al(o),s=>{Array.isArray(s)&&s.length>0?r=r.concat(s):Pt(s)&&r.push(s)}),Ae(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,r,this.schema);const l=r.length===0;return e||this.$emit("validated",l,r,this),this.errors=r,r};return n?Promise.all(i).then(a):a(i)},debouncedValidate(){Ae(this.debouncedValidateFunc)||(this.debouncedValidateFunc=Tn(this.validate.bind(this),le(this.schema,"validateDebounceTime",le(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let i=!1;Ae(this.schema.set)?(this.schema.set(this.model,e),i=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,e),i=!0),i&&(this.$emit("modelUpdated",e,this.schema.model),Ae(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),le(this.formOptions,"validateAfterChanged",!1)===!0&&(le(this.schema,"validateDebounceTime",le(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(e,n){let i=e.replace(/\[(\w+)\]/g,".$1");i=i.replace(/^\./,"");let a=this.model;const o=i.split(".");let r=0;const l=o.length;for(;r<l;){const s=o[r];if(r<l-1)a[s]!==void 0||(a[s]={}),a=a[s];else{a[s]=n;return}++r}},getFieldID(e,n=!1){const i=le(this.formOptions,"fieldIdPrefix","");return ra(e,i)+(n?"-"+hl():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return le(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},pe=(e,n)=>{const i=e.__vccOpts||e;for(const[a,o]of n)i[a]=o;return i},q1={mixins:[Ue],emits:["model-updated"],data(){return{isOpen:!1}},computed:{openClass(){return this.isOpen?"open":"closed"},fieldCount(){return this.schema.fields.length},titleText(){return`${this.isOpen?"Hide":"View"} ${this.fieldCount} Advanced Fields`}},methods:{handleOpen(){this.isOpen=!this.isOpen},updateModel(e,n){this.$emit("model-updated",e,n)}}},X1={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},J1={class:"material-icons"};function Z1(e,n,i,a,o,r){const l=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",X1,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:n[0]||(n[0]=(...s)=>r.handleOpen&&r.handleOpen(...s))},[t.createElementVNode("i",J1,t.toDisplayString(o.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),t.createElementVNode("span",null,t.toDisplayString(r.titleText),1)]),t.createElementVNode("div",{class:t.normalizeClass(["advanced-field-dropdown",r.openClass])},[t.createVNode(l,{model:e.model,options:{helpAsHtml:!0},schema:e.schema,onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const Q1=pe(q1,[["render",Z1],["__scopeId","data-v-6f4089bd"]]),sn="24px",pa=(e,n)=>{const i=e.__vccOpts||e;for(const[a,o]of n)i[a]=o;return i},W1=e=>(t.pushScopeId("data-v-c1f7c39c"),e=e(),t.popScopeId(),e),_1=["aria-hidden"],$1={key:0,"data-testid":"kui-icon-svg-title"},ew=W1(()=>t.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),tw=t.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:sn,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),i=Number(n);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,i=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),r=Number(o);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return sn}),a=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,flexShrink:"0",height:i.value,lineHeight:"0",width:i.value}));return(o,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:t.normalizeStyle(a.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",$1,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),ew],8,_1))]),_:1},8,["aria-hidden","style"]))}}),Dl=pa(tw,[["__scopeId","data-v-c1f7c39c"]]),nw=e=>(t.pushScopeId("data-v-885f8053"),e=e(),t.popScopeId(),e),iw=["aria-hidden"],aw={key:0,"data-testid":"kui-icon-svg-title"},ow=nw(()=>t.createElementVNode("path",{d:"M5 13V11H19V13H5Z",fill:"currentColor"},null,-1)),rw=t.defineComponent({__name:"RemoveIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:sn,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),i=Number(n);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,i=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),r=Number(o);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return sn}),a=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,flexShrink:"0",height:i.value,lineHeight:"0",width:i.value}));return(o,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon remove-icon","data-testid":"kui-icon-wrapper-remove-icon",style:t.normalizeStyle(a.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-remove-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",aw,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),ow],8,iw))]),_:1},8,["aria-hidden","style"]))}}),lw=pa(rw,[["__scopeId","data-v-885f8053"]]),sw=e=>(t.pushScopeId("data-v-c73ebbaa"),e=e(),t.popScopeId(),e),cw=["aria-hidden"],dw={key:0,"data-testid":"kui-icon-svg-title"},uw=sw(()=>t.createElementVNode("path",{d:"M7 21C6.45 21 5.97917 20.8042 5.5875 20.4125C5.19583 20.0208 5 19.55 5 19V6H4V4H9V3H15V4H20V6H19V19C19 19.55 18.8042 20.0208 18.4125 20.4125C18.0208 20.8042 17.55 21 17 21H7ZM17 6H7V19H17V6ZM9 17H11V8H9V17ZM13 17H15V8H13V17Z",fill:"currentColor"},null,-1)),pw=t.defineComponent({__name:"TrashIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:sn,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),i=Number(n);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,i=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const o=String(n.size).replace(/px/gi,""),r=Number(o);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return sn}),a=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,flexShrink:"0",height:i.value,lineHeight:"0",width:i.value}));return(o,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon trash-icon","data-testid":"kui-icon-wrapper-trash-icon",style:t.normalizeStyle(a.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-trash-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",dw,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),uw],8,cw))]),_:1},8,["aria-hidden","style"]))}}),Ln=pa(pw,[["__scopeId","data-v-c73ebbaa"]]),mw={class:"array-card-container"},gw=t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null}},emits:["remove-item"],setup(e){return(n,i)=>{const a=t.resolveComponent("KCard"),o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",mw,[t.createVNode(a,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",onClick:i[0]||(i[0]=r=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ln))]),_:1})])}}}),jl=pe(gw,[["__scopeId","data-v-7fbbde2b"]]),fw={class:"array-item-wrapper"},Aw={class:"array-item"},hw={class:"array-item-after"},yw=t.defineComponent({__name:"FieldArrayItem",props:{model:{type:String,default:""}},emits:["remove-item"],setup(e){return(n,i)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",fw,[t.createElementVNode("div",Aw,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"tertiary",class:"delete",onClick:i[0]||(i[0]=o=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ln))]),_:1})]),t.createElementVNode("div",hw,[t.renderSlot(n.$slots,"after",{},void 0,!0)])])}}}),Ul=pe(yw,[["__scopeId","data-v-b34d3920"]]),bw=e=>(t.pushScopeId("data-v-37458a0a"),e=e(),t.popScopeId(),e),ww={class:"multi-item-wrapper"},Ew=bw(()=>t.createElementVNode("hr",null,null,-1)),Cw=t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,i)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",ww,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"danger",class:"delete",onClick:i[0]||(i[0]=o=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createTextVNode(" - Remove Field ")]),_:1}),Ew])}}}),Pl=pe(Cw,[["__scopeId","data-v-37458a0a"]]),kw="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function Bw(e){return e?e.length===36&&new RegExp(`^${kw}$`).test(e):!1}const ma=50,Ht={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"};function Iw(e,n,i){return i?Ht.SET_REFERRAL_VALUE:e&&!n||!e&&n?Ht.UPDATE_ENTITY:e&&n?Ht.CREATE_FROM_ENTITY:Ht.CREATE_NOT_FROM_ENTITY}const Sw={mixins:[Ue],inject:[bt],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Iw(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search}},async created(){await this.$nextTick();let e,n;switch(this.fieldState){case Ht.UPDATE_ENTITY:if(!this[bt]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[bt].getOne(this.entity,this.model[this.schema.model])).data,e=this.getItem(this.schema.entityDataKey?n[this.schema.entityDataKey]:n),this.idValue=e.id;break;case Ht.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Ht.SET_REFERRAL_VALUE:this.idValue=this.value}try{e&&(this.initialItems=[{...e,label:this.getSuggestionLabel(e),value:e.id}]),this.items=this.initialItems}catch(i){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",i)}},methods:{onQueryChange(e){e.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=Tn(this.search,500)),this.performSearch(e)},async search(e){if(e.trim().length===0)return;this.loading=!0;const n=[],i=[],a=this.getInputFields(),o=new Set;Bw(e)&&a.includes("id")?i.push((async()=>{const r=await this.fetchExact(e);n.push({...r,label:this.getSuggestionLabel(r),value:r.id})})()):i.push(...a.filter(r=>r!=="id").map(async r=>{(await this.fetchSuggestions(e,r)).forEach(l=>{o.has(l.id)||(o.add(l.id),n.push({...l,label:this.getSuggestionLabel(l),value:l.id}))})})),await Promise.all(i),this.items=n,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e){const n=[];let i=null;if(!this[bt])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<ma;){const a=await this[bt].getAll(this.entity,{size:ma,offset:i,...e});if(n.push(...a.data.data),i=a.data.offset,!i)break}return n.slice(0,ma)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[bt]?(await this[bt].getOne(this.entity,e)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var e,n;return((n=(e=this.schema)==null?void 0:e.inputValues)==null?void 0:n.fields)||[]},getSuggestionLabel(e){const n=this.getInputFields();return n.length&&e?n.map(i=>e[i]).filter(Boolean).join(" - "):""},updateModel(e){this.$emit("model-updated",e!=null&&e.length?e:null,this.schema.model)},onSelected(e){this.idValue=e&&e.id,this.updateModel(this.getReturnValue(e||{}))},getReturnValue(e){var n;const i=(n=this.schema)==null?void 0:n.returnKey;return i?e[i]:e.id}}},xw={class:"field-wrap autosuggest"},vw=["data-testid","data-testlabel"],Ow=["data-testid"],Mw={class:"autosuggest__results_message"};function Rw(e,n,i,a,o,r){const l=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock("div",xw,[t.createVNode(l,{id:e.schema.model,ref:"suggestion",modelValue:o.idValue,"onUpdate:modelValue":n[0]||(n[0]=s=>o.idValue=s),clearable:"","enable-filtering":"","filter-function":()=>!0,items:o.items,loading:o.loading,placeholder:e.schema.placeholder,width:"100%",onChange:r.onSelected,onQueryChange:r.onQueryChange},{"item-template":t.withCtx(({item:s})=>[t.createElementVNode("span",{class:"first-part","data-testid":s.id&&`${s.id}-0`,"data-testlabel":s.label},t.toDisplayString(r.getSuggestionLabel(s).split(" - ")[0]),9,vw),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.getSuggestionLabel(s).split(" - ").slice(1),(c,u)=>(t.openBlock(),t.createElementBlock("span",{key:u,class:"field-span","data-testid":s.id&&`${s.id}-${u+1}`||u+1},t.toDisplayString(c),9,Ow))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",Mw,[t.createElementVNode("span",null,t.toDisplayString(o.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const Gl=pe(Sw,[["render",Rw],["__scopeId","data-v-dd2fda9e"]]);function Tw(e){const n=t.ref([]),i=t.ref(null),a=C=>Pt(C)?Yt[C]!=null?Yt[C]:(console.warn(`'${C}' is not a validator function!`),null):C,o=t.computed({get(){var C,b;let I;return Ae(le(e.schema,"get"))?I=e.schema.get((C=e.model)==null?void 0:C.value):I=le((b=e.model)==null?void 0:b.value,e.schema.model),h(I)},set(C){const b=o;C=B(C),Ae(C)?C(C,b):s(C,b)}}),r=C=>{var b;c();const I=(b=e.schema)==null?void 0:b.validator,x=le(e.formOptions,"validateAsync",!1);let E=[];if(I&&e.schema.readonly!==!0&&e.disabled!==!0){const A=[];Array.isArray(I)?je(I,f=>{A.push(a(f))}):A.push(a(I)),je(A,f=>{var y,k;if(x)E.push(f(o.value,e.schema,(y=e.model)==null?void 0:y.value));else{const V=f(o.value,e.schema,(k=e.model)==null?void 0:k.value);V&&Ae(V.then)?V.then(S=>{S&&(n.value=n.value.concat(S));const O=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:O,errors:n.value,field:e.schema})}):V&&(E=E.concat(V))}})}const w=A=>{var f,y;let k=[];if(je(Al(A),V=>{Array.isArray(V)&&V.length>0?k=k.concat(V):Pt(V)&&k.push(V)}),Ae((f=e.schema)==null?void 0:f.onValidated)&&e.schema.onValidated((y=e.model)==null?void 0:y.value,k,e.schema),!C){const V=k.length===0;e.emitValidated&&e.emitValidated({isValid:V,errors:k,field:e.schema})}return A=k,k};return x?Promise.all(E).then(w):w(E)},l=()=>{Ae(i.value)?i.value():i.value=Tn(r,le(e.schema,"validateDebounceTime",le(e.formOptions,"validateDebounceTime",500)))},s=(C,b)=>{var I,x,E;let w=!1;Ae(e.schema.set)?(e.schema.set((I=e.model)==null?void 0:I.value,C),w=!0):e.schema.model&&(u(e.schema.model,C),w=!0),w&&(e.emitModelUpdated&&(x=e.model)!=null&&x.value&&e.emitModelUpdated({value:C,model:e.schema.model}),Ae(e.schema.onChanged)&&e.schema.onChanged((E=e.model)==null?void 0:E.value,C,b,e.schema),le(e.formOptions,"validateAfterChanged",!1)===!0&&(le(e.schema,"validateDebounceTime",le(e.formOptions,"validateDebounceTime",0))>0?l():r()))},c=()=>{n.value.splice(0)},u=(C,b)=>{var I;let x=C.replace(/\[(\w+)\]/g,".$1");x=x.replace(/^\./,"");let E=((I=e.model)==null?void 0:I.value)||{},w=0;const A=x.split("."),f=A.length;for(;w<f;){const y=A[w];if(w<f-1)E[y]!==void 0||(E[y]={}),E=E[y];else{E[y]=b;return}++w}},d=(C,b=!1)=>{const I=le(e.formOptions,"fieldIdPrefix","");return ra(C,I)+(b?"-"+hl():"")},m=C=>`${d(C)}-label`,g=()=>le(e.schema,"fieldClasses",[]),h=C=>C,B=C=>C;return{value:o,clearValidationErrors:c,getFieldID:d,getLabelId:m,getFieldClasses:g,updateModelValue:s}}const Yl={useAbstractFields:Tw},Nw={class:"form-field-wrapper"},Vw=t.defineComponent({__name:"FieldInput",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:i}){const a=e,o=i,r=t.toRefs(a),l=t.inject(Qe,void 0),{updateModelValue:s,getFieldID:c,clearValidationErrors:u,value:d}=Yl.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:E=>{o("modelUpdated",E.value,E.model)}});n({clearValidationErrors:u});const m=t.computed(()=>{var E;const w=(E=a.schema)==null?void 0:E.inputType.toLowerCase();return w==="string"?"text":w==="datetime"?"datetime-local":w||"text"}),g={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},h=(E,w)=>{var A,f;let y=E;const k=g[m.value]||"",V=ln.parse(E,k);V&&((A=a.schema)!=null&&A.format?y=ln.format(V,(f=a.schema)==null?void 0:f.format):y=V.valueOf()),s(y,w)},B=(E,w)=>{da(E)||(E=NaN),s(E,w)},C=E=>{let w=E;switch(m.value){case"number":case"range":da(parseFloat(E))&&(w=parseFloat(E));break}d.value=w,s(w,E)},b=E=>{d.value=E,s(E,E)},I=t.ref(null),x=()=>{var E;Ae(I.value)&&((E=I.value)==null||E.flush())};return t.onMounted(()=>{switch(m.value){case"number":case"range":I.value=Tn((E,w)=>{B(E,w)},parseInt(le(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":I.value=Tn((E,w)=>{h(E,w)},parseInt(le(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}}),t.onBeforeMount(()=>{m.value==="checkbox"?console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead."):m.value==="radio"?console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead."):m.value==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}),(E,w)=>{const A=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Nw,[t.createVNode(A,t.mergeProps(E.$attrs,{id:t.unref(c)(e.schema),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||null,help:e.hint?e.hint:m.value==="color"||m.value==="range"?t.unref(d):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(d),name:e.schema.inputName,pattern:e.schema.pattern,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,type:m.value,width:e.schema.width,onBlur:x,"onUpdate:modelValue":C}),null,16,["id","autocomplete","class","disabled","help","max","maxlength","min","minlength","model-value","name","pattern","placeholder","readonly","required","type","width"]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(l)),{schema:e.schema,update:b,value:t.unref(d)},null,8,["schema","value"]))])}}}),Hl=pe(Vw,[["__scopeId","data-v-970ef0c7"]]),Lw={name:"FieldMetric",components:{AddIcon:Dl,TrashIcon:Ln},mixins:[Ue],emits:["remove-item"],data(){return{contentVisible:!1}}},Dw={key:0,class:"content"};function jw(e,n,i,a,o,r){const l=t.resolveComponent("AddIcon"),s=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field-dropdown",{active:o.contentVisible}])},[t.createElementVNode("div",{class:"title",onClick:n[0]||(n[0]=u=>o.contentVisible=!o.contentVisible)},[t.createTextVNode(t.toDisplayString(e.model.name?e.model.name:"New Item")+" ",1),t.createVNode(l,{class:"metric-add-icon"})]),t.createVNode(t.Transition,{name:"slide-fade"},{default:t.withCtx(()=>[o.contentVisible?(t.openBlock(),t.createElementBlock("div",Dw,[t.renderSlot(e.$slots,"default"),t.createVNode(c,{appearance:"tertiary",class:"metric-remove-button",onClick:n[1]||(n[1]=u=>e.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const Fl=pe(Lw,[["render",jw]]),Uw={mixins:[Ue],data(){return{attributes:this.schema?this.schema.attributes:void 0,newKeyType:"string",newKeyName:"",keyTypes:{}}},created(){this.value||(this.value={})},mounted(){if(!this.value)return;const e=Object.keys(this.value),n={};for(let i=0;i<e.length;i++){const a=e[i];n[a]=typeof this.value[a]}this.keyTypes=n},methods:{removeElement(e){const n=this.value;delete n[e],this.value=JSON.parse(JSON.stringify(n));const i=this.keyTypes;delete i[e],this.keyTypes=JSON.parse(JSON.stringify(i))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""}}},ga=e=>(t.pushScopeId("data-v-dfa59f5c"),e=e(),t.popScopeId(),e),Pw={class:"field-object-container"},Gw={key:1},Yw=["id"],Hw={key:0},Fw=["onUpdate:modelValue"],zw={key:1},Kw=["onUpdate:modelValue"],qw={key:2},Xw=["onUpdate:modelValue"],Jw=["onClick"],Zw=ga(()=>t.createElementVNode("option",{value:"string"}," String ",-1)),Qw=ga(()=>t.createElementVNode("option",{value:"number"}," Number ",-1)),Ww=ga(()=>t.createElementVNode("option",{value:"boolean"}," Boolean ",-1)),_w=[Zw,Qw,Ww];function $w(e,n,i,a,o,r){const l=t.resolveComponent("vue-form-generator"),s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",Pw,[e.schema.schema?(t.openBlock(),t.createBlock(l,{key:0,model:e.value,options:e.formOptions,schema:e.schema.schema},null,8,["model","options","schema"])):(t.openBlock(),t.createElementBlock("div",Gw,[t.createElementVNode("table",{id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(c,u)=>(t.openBlock(),t.createElementBlock("tr",{key:u},[t.createElementVNode("td",null,t.toDisplayString(u),1),o.keyTypes[u]==="string"?(t.openBlock(),t.createElementBlock("td",Hw,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":d=>e.value[u]=d,type:"text"},null,8,Fw),[[t.vModelText,e.value[u]]])])):t.createCommentVNode("",!0),o.keyTypes[u]==="boolean"?(t.openBlock(),t.createElementBlock("td",zw,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":d=>e.value[u]=d,type:"checkbox"},null,8,Kw),[[t.vModelCheckbox,e.value[u]]])])):t.createCommentVNode("",!0),o.keyTypes[u]==="number"?(t.openBlock(),t.createElementBlock("td",qw,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":d=>e.value[u]=d,type:"number"},null,8,Xw),[[t.vModelText,e.value[u]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:d=>r.removeElement(u)},null,8,Jw)])]))),128))],10,Yw),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":n[0]||(n[0]=c=>o.newKeyType=c)},_w,512),[[t.vModelSelect,o.newKeyType]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[1]||(n[1]=c=>o.newKeyName=c),type:"text"},null,512),[[t.vModelText,o.newKeyName]]),t.createElementVNode("input",{type:"button",value:"Add key",onClick:n[2]||(n[2]=(...c)=>r.addKey&&r.addKey(...c))})]))])),[[s,o.attributes]])}const zl=pe(Uw,[["render",$w],["__scopeId","data-v-dfa59f5c"]]),e0={components:{TrashIcon:Ln},mixins:[Ue],inject:{autofillSlot:{from:Qe,default:void 0}},emits:["model-updated"],data(){return{newKeyName:""}},computed:{subSchema(){return this.schema.schema&&this.schema.schema.fields[0].schema},subFields(){return!this.subSchema&&this.schema.fields},hasObjectKeys(){return this.value&&Object.keys(this.value).length>0},transformedModel(){return this.subSchema&&this.subSchema.fields.length>=1&&this.subSchema.fields[0].type==="array"?new Proxy(this.model[this.schema.model],{get:(e,n)=>({[this.schema.model]:e[n]}),set:(e,n,i)=>e[n]=i[this.schema.model]}):this.model[this.schema.model]}},mounted(){this.value||(this.value={});let e=[];this.subSchema?e=this.subSchema.fields:this.subFields&&(e=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,e,this.schema.model)},methods:{removeElement(e){const n=this.value;delete n[e],this.value={...n}},transformMapModelValuesToObject(e,n,i){const a={};return Object.keys(e).map(o=>{const r=o.indexOf(i+"-");if(r>-1&&Array.isArray(n))if(n.length>0){const l=o.split("-").filter(c=>n.find(u=>u.model===c)),s=o.split(`-${l}`)[0].split(`${i}-`)[1];l.length?a[s]={...a[s],[l]:e[o]}:a[o.substring(r+`${i}-`.length)]=e[o]}else a[o.substring(`${i}-`.length)]=e[o];else{const l=o.split("-").filter(c=>c===this.schema.model),s=o.split(`-${l}`)[0].split(`${i}-`)[1];s&&(a[s]=e[o])}return o}),a},addKey(){const e=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",n=this.subSchema?e?[""]:{}:"";this.value[this.newKeyName]=n,this.newKeyName=""},updateModel(e,n){this.$emit("model-updated",this.model[this.schema.model],n)}}},Kl=e=>(t.pushScopeId("data-v-3a00058c"),e=e(),t.popScopeId(),e),t0=["id"],n0=["data-testid"],i0={class:"item-wrapper"},a0={class:"index-wrapper"},o0=Kl(()=>t.createElementVNode("hr",{class:"divider"},null,-1)),r0={key:0},l0={key:1},s0=["onUpdate:modelValue","placeholder","onInput"],c0={key:0,class:"hint"},d0=Kl(()=>t.createElementVNode("hr",{class:"wide-divider"},null,-1)),u0={class:"input-item"},p0=["placeholder"],m0={key:0,class:"hint"};function g0(e,n,i,a,o,r){const l=t.resolveComponent("TrashIcon"),s=t.resolveComponent("KButton"),c=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",{id:e.getFieldID(e.schema),class:t.normalizeClass(["object-advanced-wrapper",e.schema.fieldClasses])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(u,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,"data-testid":`field-object-key-${d}`},[t.createElementVNode("div",null,[t.createElementVNode("div",i0,[t.createElementVNode("div",a0,[t.createElementVNode("strong",null,t.toDisplayString(d),1),t.createElementVNode("div",null,[t.createVNode(s,{appearance:"tertiary",class:"delete",icon:"",type:"button",onClick:m=>r.removeElement(d)},{default:t.withCtx(()=>[t.createVNode(l)]),_:2},1032,["onClick"])])]),o0,r.subSchema?(t.openBlock(),t.createElementBlock("div",r0,[t.createVNode(c,{model:r.transformedModel[d],options:{helpAsHtml:!0},schema:r.subSchema,onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",l0,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":m=>e.value[d]=m,class:"form-control",placeholder:e.schema.fields&&e.schema.fields[0].schema.placeholder,type:"text",onInput:m=>r.updateModel(e.value[d],e.model[e.schema.model])},null,40,s0),[[t.vModelText,e.value[d]]]),e.schema.fields&&e.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",c0,t.toDisplayString(e.schema.fields[0].schema.hint),1)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema.fields&&e.schema.fields[0].schema||e.schema.values,update:m=>e.value[d]=m,value:e.value[d]},null,8,["schema","update","value"]))])),d0])])],8,n0))),128)),t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper",{indent:r.hasObjectKeys}])},[t.createElementVNode("div",u0,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>o.newKeyName=u),class:"form-control","data-testid":"keyname-input",placeholder:e.schema.placeholder,type:"text"},null,8,p0),[[t.vModelText,o.newKeyName]]),t.createVNode(s,{appearance:"tertiary","data-testid":"add-key",disabled:!o.newKeyName,onClick:r.addKey},{default:t.withCtx(()=>[t.createTextVNode(" + Add "+t.toDisplayString(e.schema.buttonLabel||e.schema.label),1)]),_:1},8,["disabled","onClick"])]),e.schema.hintText?(t.openBlock(),t.createElementBlock("p",m0,t.toDisplayString(e.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,t0)}const ql=pe(e0,[["render",g0],["__scopeId","data-v-3a00058c"]]),f0={mixins:[Ue],emits:["model-updated"],methods:{updateModel(e){this.$emit("model-updated",e,this.schema.model)},checkOption(e){return this.model[this.schema.model]?e.value.toString()===this.model[this.schema.model].toString():e.checked},onChange(e){let n=e.target.value.split(",");this.schema.array||(n=n.toString()),this.updateModel(n)}}},A0={class:"selection-group"},h0={class:"form-group"},y0=["id","checked","name","value"];function b0(e,n,i,a,o,r){return t.openBlock(),t.createElementBlock("div",A0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(l,s)=>(t.openBlock(),t.createElementBlock("div",{key:s,class:"option-group"},[t.createElementVNode("div",h0,[t.createElementVNode("label",{class:t.normalizeClass(["k-label",l.name])},[t.createElementVNode("input",{id:e.schema.name+"-"+s,checked:r.checkOption(l),class:"k-input",name:e.schema.name,type:"radio",value:l.value,onChange:n[0]||(n[0]=(...c)=>r.onChange&&r.onChange(...c))},null,40,y0),t.createTextVNode(" "+t.toDisplayString(l.name),1)],2)])]))),128))])}const Xl=pe(f0,[["render",b0],["__scopeId","data-v-33d6c694"]]);function w0(e,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(e[i],i,e))return!0;return!1}var E0=1,C0=2;function Jl(e,n,i,a,o,r){var l=i&E0,s=e.length,c=n.length;if(s!=c&&!(l&&c>s))return!1;var u=r.get(e),d=r.get(n);if(u&&d)return u==n&&d==e;var m=-1,g=!0,h=i&C0?new Nn:void 0;for(r.set(e,n),r.set(n,e);++m<s;){var B=e[m],C=n[m];if(a)var b=l?a(C,B,m,n,e,r):a(B,C,m,e,n,r);if(b!==void 0){if(b)continue;g=!1;break}if(h){if(!w0(n,function(I,x){if(!fl(h,x)&&(B===I||o(B,I,i,a,r)))return h.push(x)})){g=!1;break}}else if(!(B===C||o(B,C,i,a,r))){g=!1;break}}return r.delete(e),r.delete(n),g}function k0(e){var n=-1,i=Array(e.size);return e.forEach(function(a,o){i[++n]=[o,a]}),i}var B0=1,I0=2,S0="[object Boolean]",x0="[object Date]",v0="[object Error]",O0="[object Map]",M0="[object Number]",R0="[object RegExp]",T0="[object Set]",N0="[object String]",V0="[object Symbol]",L0="[object ArrayBuffer]",D0="[object DataView]",Zl=lt?lt.prototype:void 0,fa=Zl?Zl.valueOf:void 0;function j0(e,n,i,a,o,r,l){switch(i){case D0:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case L0:return!(e.byteLength!=n.byteLength||!r(new di(e),new di(n)));case S0:case x0:case M0:return vn(+e,+n);case v0:return e.name==n.name&&e.message==n.message;case R0:case N0:return e==n+"";case O0:var s=k0;case T0:var c=a&B0;if(s||(s=ca),e.size!=n.size&&!c)return!1;var u=l.get(e);if(u)return u==n;a|=I0,l.set(e,n);var d=Jl(s(e),s(n),a,o,r,l);return l.delete(e),d;case V0:if(fa)return fa.call(e)==fa.call(n)}return!1}var U0=1,P0=Object.prototype,G0=P0.hasOwnProperty;function Y0(e,n,i,a,o,r){var l=i&U0,s=ta(e),c=s.length,u=ta(n),d=u.length;if(c!=d&&!l)return!1;for(var m=c;m--;){var g=s[m];if(!(l?g in n:G0.call(n,g)))return!1}var h=r.get(e),B=r.get(n);if(h&&B)return h==n&&B==e;var C=!0;r.set(e,n),r.set(n,e);for(var b=l;++m<c;){g=s[m];var I=e[g],x=n[g];if(a)var E=l?a(x,I,g,n,e,r):a(I,x,g,e,n,r);if(!(E===void 0?I===x||o(I,x,i,a,r):E)){C=!1;break}b||(b=g=="constructor")}if(C&&!b){var w=e.constructor,A=n.constructor;w!=A&&"constructor"in e&&"constructor"in n&&!(typeof w=="function"&&w instanceof w&&typeof A=="function"&&A instanceof A)&&(C=!1)}return r.delete(e),r.delete(n),C}var H0=1,Ql="[object Arguments]",Wl="[object Array]",mi="[object Object]",F0=Object.prototype,_l=F0.hasOwnProperty;function z0(e,n,i,a,o,r){var l=Ze(e),s=Ze(n),c=l?Wl:Mn(e),u=s?Wl:Mn(n);c=c==Ql?mi:c,u=u==Ql?mi:u;var d=c==mi,m=u==mi,g=c==u;if(g&&ti(e)){if(!ti(n))return!1;l=!0,d=!1}if(g&&!d)return r||(r=new ct),l||Mr(e)?Jl(e,n,i,a,o,r):j0(e,n,c,i,a,o,r);if(!(i&H0)){var h=d&&_l.call(e,"__wrapped__"),B=m&&_l.call(n,"__wrapped__");if(h||B){var C=h?e.value():e,b=B?n.value():n;return r||(r=new ct),o(C,b,i,a,r)}}return g?(r||(r=new ct),Y0(e,n,i,a,o,r)):!1}function Aa(e,n,i,a,o){return e===n?!0:e==null||n==null||!st(e)&&!st(n)?e!==e&&n!==n:z0(e,n,i,a,Aa,o)}var K0=1,q0=2;function X0(e,n,i,a){var o=i.length,r=o,l=!a;if(e==null)return!r;for(e=Object(e);o--;){var s=i[o];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<r;){s=i[o];var c=s[0],u=e[c],d=s[1];if(l&&s[2]){if(u===void 0&&!(c in e))return!1}else{var m=new ct;if(a)var g=a(u,d,c,e,n,m);if(!(g===void 0?Aa(d,u,K0|q0,a,m):g))return!1}}return!0}function $l(e){return e===e&&!De(e)}function J0(e){for(var n=on(e),i=n.length;i--;){var a=n[i],o=e[a];n[i]=[a,o,$l(o)]}return n}function es(e,n){return function(i){return i==null?!1:i[e]===n&&(n!==void 0||e in Object(i))}}function Z0(e){var n=J0(e);return n.length==1&&n[0][2]?es(n[0][0],n[0][1]):function(i){return i===e||X0(i,e,n)}}function Q0(e,n){return e!=null&&n in Object(e)}function W0(e,n,i){n=Ur(n,e);for(var a=-1,o=n.length,r=!1;++a<o;){var l=ri(n[a]);if(!(r=e!=null&&i(e,l)))break;e=e[l]}return r||++a!=o?r:(o=e==null?0:e.length,!!o&&Xi(o)&&qi(l,o)&&(Ze(e)||Br(e)))}function _0(e,n){return e!=null&&W0(e,n,Q0)}var $0=1,eE=2;function tE(e,n){return Wi(e)&&$l(n)?es(ri(e),n):function(i){var a=le(i,e);return a===void 0&&a===n?_0(i,e):Aa(n,a,$0|eE)}}function nE(e){return function(n){return n==null?void 0:n[e]}}function iE(e){return function(n){return Pr(n,e)}}function aE(e){return Wi(e)?nE(ri(e)):iE(e)}function ts(e){return typeof e=="function"?e:e==null?ni:typeof e=="object"?Ze(e)?tE(e[0],e[1]):Z0(e):aE(e)}function oE(e){return function(n,i,a){var o=Object(n);if(!Sn(n)){var r=ts(i);n=on(n),i=function(s){return r(o[s],s,o)}}var l=e(n,i,a);return l>-1?o[r?n[l]:l]:void 0}}var rE=Math.max;function lE(e,n,i){var a=e==null?0:e.length;if(!a)return-1;var o=i==null?0:El(i);return o<0&&(o=rE(a+o,0)),gl(e,ts(n),o)}var sE=oE(lE);const cE=["disabled","name","id"],dE=["disabled"],uE=["label"],pE=["value"],mE=["value"];function gE(e,n,i,a,o,r){const l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("select",{class:t.normalizeClass(["form-control",e.schema.fieldClasses]),"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),disabled:e.disabled||null,name:e.schema.inputName,id:e.getFieldID(e.schema)},[r.selectOptions.hideNoneSelectedText?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("option",{key:0,disabled:e.schema.required||null,value:null},t.toDisplayString(r.selectOptions.noneSelectedText||"<Nothing selected>"),9,dE)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[s.group?(t.openBlock(),t.createElementBlock("optgroup",{key:0,label:r.getGroupName(s)},[s.ops?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(s.ops,c=>(t.openBlock(),t.createElementBlock("option",{value:r.getItemValue(c)},t.toDisplayString(r.getItemName(c)),9,pE))),256)):t.createCommentVNode("",!0)],8,uE)):t.createCommentVNode("",!0),s.group?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("option",{key:1,value:r.getItemValue(s)},t.toDisplayString(r.getItemName(s)),9,mE))],64))),256))],10,cE)),[[t.vModelSelect,e.value],[l,"input"]])}const fE={mixins:[Ue],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const e=this.schema.values;return typeof e=="function"?this.groupValues(e.apply(this,[this.model,this.schema])):this.groupValues(e)}},methods:{formatValueToField(e){return ke(e)?null:e},groupValues(e){const n=[];let i={};return e.forEach(a=>{i=null,a.group&&De(a)?(i=sE(n,o=>o.group===a.group),i?i.ops.push({id:a.id,name:a.name}):(i={group:"",ops:[]},i.group=a.group,i.ops.push({id:a.id,name:a.name}),n.push(i))):n.push(a)}),n},getGroupName(e){if(e&&e.group)return e.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(e){if(De(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return e[this.schema.selectOptions.value];if(typeof e.id<"u")return e.id;throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return e},getItemName(e){if(De(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return e[this.schema.selectOptions.name];if(typeof e.name<"u")return e.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return e}}},ns=pe(fE,[["render",gE]]),AE={name:"FieldArray",components:{FieldArrayItem:Ul,FieldArrayMultiItem:Pl,FieldSelect:ns,FieldMetric:Fl,FieldObject:zl,FieldObjectAdvanced:ql,FieldAutoSuggest:Gl,FieldRadio:Xl,FieldArrayCardContainer:jl,FieldInput:Hl},mixins:[Ue],inject:{autofillSlot:{from:Qe,default:void 0}},props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(e,n,i){var a,o,r;let l;return n&&(l=JSON.parse(JSON.stringify(n)),(r=(o=(a=l.schema)==null?void 0:a.fields)==null?void 0:o.map)==null||r.call(o,s=>(s.id=`${s.id||s.model}-${i}`,s))),{...l,set(s,c){e[i]=c},get(){return e[i]}}},newElement(){let e=this.value,n;(!e||!e.push)&&(e=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?n=this.schema.items.default():n=this.schema.items.default),e.push(n),this.value=[...e]},removeElement(e){this.value=this.value.filter((n,i)=>i!==e)},getFieldType(e){return"field-"+e.type},modelUpdated(){}}},hE=["id"],yE={key:1},bE=["onUpdate:modelValue","aria-labelledby","type"],wE=["onUpdate:modelValue","aria-labelledby"];function EE(e,n,i,a,o,r){const l=t.resolveComponent("KTextArea"),s=t.resolveComponent("KInput"),c=t.resolveComponent("KButton");return e.schema?(t.openBlock(),t.createElementBlock("div",{key:0,id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(u,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:t.normalizeClass(e.schema.fieldItemsClasses)},[e.schema.items&&e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:0,model:u,schema:r.generateSchema(e.value,e.schema.items,d),onRemoveItem:m=>r.removeElement(d)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(e.schema.items)),{"form-options":e.formOptions,model:u,schema:r.generateSchema(e.value,e.schema.items,d),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",yE,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(e.schema.items)),{"form-options":e.formOptions,model:u,schema:r.generateSchema(e.value,e.schema.items,d),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:2,"data-testid":`${e.getFieldID(e.schema)}-item-${d}`,model:u,schema:r.generateSchema(e.value,e.schema.items,d),onRemoveItem:m=>r.removeElement(d)},{after:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:m=>e.value[d]=m,value:e.value[d]},null,8,["schema","update","value"]))]),default:t.withCtx(()=>{var m;return[e.schema.inputAttributes&&e.schema.inputAttributes.type==="textarea"?(t.openBlock(),t.createBlock(l,t.mergeProps({key:0,ref_for:!0},e.schema.inputAttributes,{id:e.getFieldID(e.schema),modelValue:e.value[d],"onUpdate:modelValue":g=>e.value[d]=g,"aria-labelledby":e.getLabelId(e.schema),class:e.schema.fieldClasses,maxlength:e.schema.max,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,rows:e.schema.rows||2}),null,16,["id","modelValue","onUpdate:modelValue","aria-labelledby","class","maxlength","minlength","name","placeholder","readonly","required","rows"])):!e.schema.inputAttributes||!e.schema.inputAttributes.type||e.schema.inputAttributes.type==="text"?(t.openBlock(),t.createBlock(s,t.mergeProps({key:1,modelValue:e.value[d],"onUpdate:modelValue":g=>e.value[d]=g,"aria-labelledby":e.getLabelId(e.schema),ref_for:!0},e.schema.inputAttributes,{type:e.schema.inputAttributes&&e.schema.inputAttributes.type||"text"}),null,16,["modelValue","onUpdate:modelValue","aria-labelledby","type"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,"onUpdate:modelValue":g=>e.value[d]=g,"aria-labelledby":e.getLabelId(e.schema),ref_for:!0},e.schema.inputAttributes,{type:((m=e.schema.inputAttributes)==null?void 0:m.type)||"text"}),null,16,bE)),[[t.vModelDynamic,e.value[d]]])]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.withDirectives(t.createElementVNode("input",t.mergeProps({ref_for:!0},e.schema.inputAttributes,{"onUpdate:modelValue":m=>e.value[d]=m,"aria-labelledby":e.getLabelId(e.schema),type:"text"}),null,16,wE),[[t.vModelText,e.value[d]]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:m=>e.value[d]=m,value:e.value[d]},null,8,["schema","update","value"]))],64))],2))),128)),t.createVNode(c,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`add-${e.getFieldID(e.schema)}`,type:"button",onClick:r.newElement},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel||i.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,hE)):t.createCommentVNode("",!0)}const CE=pe(AE,[["render",EE],["__scopeId","data-v-df18c37c"]]),kE={mixins:[Ue]},BE=["id","autocomplete","disabled","name","required"];function IE(e,n,i,a,o,r){const l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("input",{id:e.getFieldID(e.schema),type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,name:e.schema.inputName,class:t.normalizeClass(e.schema.fieldClasses),required:e.schema.required},null,10,BE)),[[t.vModelCheckbox,e.value],[l,"input"]])}const SE=pe(kE,[["render",IE]]);var xE=4;function is(e){return Rn(e,xE)}const vE={class:"wrapper"},OE=["disabled"],ME=["id","checked","disabled","onChange","name"],RE=["disabled"],TE={class:"info"},NE=t.createElementVNode("div",{class:"arrow"},null,-1),VE={class:"dropList"},LE=["id","checked","disabled","onChange","name"];function DE(e,n,i,a,o,r){const l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",vE,[e.schema.listBox?(t.openBlock(),t.createElementBlock("div",{key:0,class:"listbox form-control",disabled:e.disabled||null},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(s)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(s)||null,disabled:e.disabled||null,onChange:c=>r.onChanged(c,s),name:r.getInputName(s)},null,40,ME),[[l,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(s)),1)])],2))),256))],8,OE)):t.createCommentVNode("",!0),e.schema.listBox?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:"combobox form-control",disabled:e.disabled||null},[t.createElementVNode("div",{class:t.normalizeClass(["mainRow",{expanded:o.comboExpanded}]),onClick:n[0]||(n[0]=(...s)=>r.onExpandCombo&&r.onExpandCombo(...s))},[t.createElementVNode("div",TE,t.toDisplayString(r.selectedCount)+" selected",1),NE],2),t.createElementVNode("div",VE,[o.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(s)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(s)||null,disabled:e.disabled||null,onChange:c=>r.onChanged(c,s),name:r.getInputName(s)},null,40,LE),[[l,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(s)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,RE))])),[[l,"wrapper"]])}const jE={mixins:[Ue],data(){return{comboExpanded:!1}},computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(e){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?ul(this.schema.inputName+"_"+this.getItemValue(e)):ul(this.getItemValue(e))},getItemValue(e){if(De(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return e[this.schema.checklistOptions.value];if(typeof e.value<"u")return e.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},getItemName(e){if(De(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return e[this.schema.checklistOptions.name];if(typeof e.name<"u")return e.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},isItemChecked(e){return this.value&&this.value.indexOf(this.getItemValue(e))!==-1},onChanged(e,n){if((ke(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const i=is(this.value);i.push(this.getItemValue(n)),this.value=i}else{const i=is(this.value);i.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=i}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},UE=pe(jE,[["render",DE]]),PE={name:"FieldKeyValuePairs",components:{TrashIcon:Ln},mixins:[Ue],inject:{autofillSlot:{from:Qe,default:void 0}},data(){return{pairs:[]}},watch:{pairs:{handler(){this.updateValue()},deep:!0}},created(){var e,n;this.value||(this.value={});const i=((n=this.model)==null?void 0:n[(e=this.schema)==null?void 0:e.model])??{};Object.keys(i).forEach(a=>{this.pairs.push({key:a,value:i[a]})})},methods:{onInput(e,n,i){this.pairs[n][i]=e.target.value},updateValue(){this.value=this.pairs.reduce((e,{key:n,value:i})=>({...e,...n&&i?{[n]:i}:null}),{})},addPair(){this.pairs.push({key:"",value:""})},removePair(e){this.pairs.splice(e,1)}}},GE={class:"key-value-pairs-editor"},YE={class:"pair-item-cell"},HE=["data-testid","placeholder","value","onInput"],FE={class:"pair-item-cell"},zE=["data-testid","placeholder","value","onInput"];function KE(e,n,i,a,o,r){const l=t.resolveComponent("TrashIcon"),s=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",GE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.pairs,(c,u)=>(t.openBlock(),t.createElementBlock("div",{key:u,class:"pair-item"},[t.createElementVNode("div",YE,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-key-${u}`,placeholder:e.schema.keyInputPlaceholder??"Key",type:"text",value:c.key,onInput:d=>{r.onInput(d,u,"key")}},null,40,HE),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:d=>r.onInput({target:{value:d}},u,"key"),value:c.key},null,8,["schema","update","value"]))]),t.createElementVNode("div",FE,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-value-${u}`,placeholder:e.schema.valueInputPlaceholder??"Value",type:"text",value:c.value,onInput:d=>{r.onInput(d,u,"value")}},null,40,zE),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:d=>r.onInput({target:{value:d}},u,"value"),value:c.value},null,8,["schema","update","value"]))]),t.createVNode(s,{appearance:"tertiary","data-testid":`${e.getFieldID(e.schema)}-remove-pair-${u}`,onClick:()=>{r.removePair(u)}},{default:t.withCtx(()=>[t.createVNode(l)]),_:2},1032,["data-testid","onClick"])]))),128)),t.createVNode(s,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`${e.getFieldID(e.schema)}-add-pair`,type:"button",onClick:r.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const qE=pe(PE,[["render",KE],["__scopeId","data-v-70998d5b"]]),XE=t.defineComponent({__name:"FieldLabel",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0}},setup(e){const n=e,i=t.toRefs(n),{getFieldID:a,value:o}=Yl.useAbstractFields({model:i.model,schema:n.schema,formOptions:n.formOptions});return(r,l)=>{const s=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(s,{id:t.unref(a)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)),1)]),_:1},8,["id"])],2)}}}),JE=pe(XE,[["__scopeId","data-v-d046a15a"]]),ZE={mixins:[Ue],emits:["model-updated"],methods:{onUpdate(e){this.$emit("model-updated",e,this.schema.model)}}};function QE(e,n,i,a,o,r){const l=t.resolveComponent("KMultiselect");return t.openBlock(),t.createBlock(l,{"aria-labelledby":e.getLabelId(e.schema),"data-testid":"field-multiselect",items:e.schema.values,"label-attributes":{info:e.schema.help},"model-value":e.value,placeholder:e.schema.placeholder,required:e.schema.required||void 0,width:"100%","onUpdate:modelValue":r.onUpdate},null,8,["aria-labelledby","items","label-attributes","model-value","placeholder","required","onUpdate:modelValue"])}const WE=pe(ZE,[["render",QE]]),_E={mixins:[Ue],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(e,n){if(n===null){this.fieldModel={...this.model};return}const i=this.schema.fields[e].fields,a=this.schema.fields[n].fields;a&&a.forEach(o=>this.updateModel("",o.model)),i&&i.forEach(o=>this.updateModel(this.fieldModel[o.model],o.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((e,n)=>{e.fields&&e.fields.forEach(i=>{this.model[i.model]&&(this.checkedGroup=n,this.fieldSchema.push(i.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(e,n){this.$emit("model-updated",e,n)}}},$E={class:"selection-group"},eC={class:"form-group horizontal-radios"},tC={class:"radio-group"},nC=["value"],iC={class:"control-help"},aC={class:"option-field"},oC={class:"option-field-container"};function rC(e,n,i,a,o,r){const l=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",$E,[t.createElementVNode("div",eC,[t.createElementVNode("div",tC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.fields,(s,c)=>(t.openBlock(),t.createElementBlock("div",{key:c,class:"option-group"},[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${s.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>o.checkedGroup=u),class:"k-input",type:"radio",value:c},null,8,nC),[[t.vModelRadio,o.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(s.label)+" ",1),t.createElementVNode("div",iC,t.toDisplayString(s.description),1)],2)]))),128))])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.fields,(s,c)=>(t.openBlock(),t.createElementBlock("div",{key:c,class:"option-group"},[t.withDirectives(t.createElementVNode("div",aC,[t.createElementVNode("div",oC,[t.createVNode(l,{model:e.model,options:{helpAsHtml:!0},schema:{fields:s.fields},onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[t.vShow,s.fields&&o.checkedGroup===c]])]))),128))])}const lC=pe(_E,[["render",rC],["__scopeId","data-v-0aaaf597"]]),sC=["autocomplete","disabled","name","id"],cC=["data-on","data-off","for"],dC=t.createElementVNode("span",{class:"handle"},null,-1);function uC(e,n,i,a,o,r){return t.openBlock(),t.createElementBlock("label",null,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,sC),[[t.vModelCheckbox,e.value]]),t.createElementVNode("span",{class:"label","data-on":e.schema.textOn||"On","data-off":e.schema.textOff||"Off",for:e.getFieldID(e.schema)},null,8,cC),dC])}const pC={mixins:[Ue],methods:{formatValueToField(e){return e!=null&&this.schema.valueOn?e===this.schema.valueOn:e},formatValueToModel(e){return e!=null&&this.schema.valueOn?e?this.schema.valueOn:this.schema.valueOff:e}}},mC=pe(pC,[["render",uC]]),gC={mixins:[Ue],inject:{autofillSlot:{from:Qe,default:void 0}}},fC={class:"field-textarea"},AC=["id","disabled","maxlength","minlength","name","placeholder","readonly","required","rows"];function hC(e,n,i,a,o,r){const l=t.resolveDirective("attributes");return t.openBlock(),t.createElementBlock("div",fC,[t.withDirectives(t.createElementVNode("textarea",{id:e.getFieldID(e.schema),"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),class:t.normalizeClass(["form-control",e.schema.fieldClasses]),disabled:e.disabled||null,maxlength:e.schema.max,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,rows:e.schema.rows||2},null,10,AC),[[t.vModelText,e.value],[l,"input"]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:s=>e.value=s,value:e.value},null,8,["schema","update","value"]))])}const yC=pe(gC,[["render",hC],["__scopeId","data-v-9a62b6b0"]]),bC=Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:Q1,FieldArray:CE,FieldArrayCardContainer:jl,FieldArrayItem:Ul,FieldArrayMultiItem:Pl,FieldAutoSuggest:Gl,FieldCheckbox:SE,FieldChecklist:UE,FieldInput:Hl,FieldKeyValuePairs:qE,FieldLabel:JE,FieldMetric:Fl,FieldMultiselect:WE,FieldObject:zl,FieldObjectAdvanced:ql,FieldRadio:Xl,FieldSelect:ns,FieldSelectionGroup:lC,FieldSwitch:mC,FieldTextArea:yC},Symbol.toStringTag,{value:"Module"})),wC={name:"FormGroup",components:bC,mixins:[pl],props:{vfg:{type:Object,required:!0},model:{type:Object,default:()=>{}},options:{type:Object,default:()=>{}},field:{type:Object,required:!0},errors:{type:Array,default(){return[]}}},emits:["validated","modelUpdated"],data(){return{child:t.ref()}},methods:{fieldTypeHasLabel(e){if(ke(e.label))return!1;let n="";switch(e.type==="input"?n=e.inputType:n=e.type,n){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(e){const n=le(this.options,"fieldIdPrefix","");return ra(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldType(e){return"field-"+e.type},getButtonType(e){return le(e,"type","button")},onFieldValidated(e,n,i){this.$emit("validated",e,n,i)},buttonVisibility(e){return e.buttons&&e.buttons.length>0},buttonClickHandler(e,n,i){return e.onclick.call(this,this.model,n,i,this)},fieldHint(e){return Ae(e.hint)?e.hint.call(this,this.model,e,this):e.hint},fieldErrors(e){return this.errors.filter(n=>n.field.fieldName===e.fieldName).map(n=>n.error)},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e){return this.$refs.child.validate(e)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(e){return e?e.replace(/^[cC]onfig\./,""):""}}},EC=e=>(t.pushScopeId("data-v-3cb920d4"),e=e(),t.popScopeId(),e),CC=["innerHTML"],kC={class:"icon-wrapper"},BC=["innerHTML"],IC={key:0,class:"link-wrapper"},SC=EC(()=>t.createElementVNode("span",{class:"section-header"},"More info",-1)),xC={class:"field-wrap"},vC={key:0,class:"buttons"},OC=["type","onClick","textContent"],MC=["innerHTML"],RC={key:2,class:"errors help-block"},TC=["innerHTML"];function NC(e,n,i,a,o,r){const l=t.resolveComponent("KExternalLink"),s=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-group",e.getFieldRowClasses(i.field)])},[r.fieldTypeHasLabel(i.field)?(t.openBlock(),t.createBlock(s,{key:0,"aria-describedby":i.field.help?r.getTooltipId(i.field):void 0,class:t.normalizeClass([i.field.labelClasses,"form-group-label"]),for:r.getFieldID(i.field),info:!i.options.helpAsHtml&&i.field.help?i.field.help:void 0,"tooltip-attributes":i.field.help?{maxWidth:"300",placement:"top",tooltipId:r.getTooltipId(i.field)}:void 0},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",kC,[t.createElementVNode("span",{innerHTML:r.formattedLabel(i.field.label)},null,8,BC)]),i.field.link?(t.openBlock(),t.createElementBlock("div",IC,[t.createVNode(l,{href:i.field.link},{default:t.withCtx(()=>[SC]),_:1},8,["href"])])):t.createCommentVNode("",!0)]),_:2},[i.options.helpAsHtml&&i.field.help?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:i.field.help},null,8,CC)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",xC,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(i.field)),t.mergeProps(e.$attrs,{ref:"child",disabled:e.fieldDisabled(i.field)||null,"form-options":i.options,hint:i.field.hint&&r.getFieldType(i.field)==="field-input"?r.fieldHint(i.field):void 0,model:i.model,schema:i.field,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated}),null,16,["disabled","form-options","hint","model","schema","vfg","onModelUpdated","onValidated"])),r.buttonVisibility(i.field)?(t.openBlock(),t.createElementBlock("div",vC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.field.buttons,(c,u)=>(t.openBlock(),t.createElementBlock("button",{key:u,class:t.normalizeClass(c.classes),type:r.getButtonType(c),onClick:d=>r.buttonClickHandler(c,i.field,d),textContent:t.toDisplayString(c.label)},null,10,OC))),128))])):t.createCommentVNode("",!0)]),i.field.hint&&r.getFieldType(i.field)!=="field-input"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"hint",innerHTML:r.fieldHint(i.field)},null,8,MC)):t.createCommentVNode("",!0),r.fieldErrors(i.field).length>0?(t.openBlock(),t.createElementBlock("div",RC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fieldErrors(i.field),(c,u)=>(t.openBlock(),t.createElementBlock("span",{key:u,innerHTML:c},null,8,TC))),128))])):t.createCommentVNode("",!0)],2)}const VC=pe(wC,[["render",NC],["__scopeId","data-v-3cb920d4"]]),LC={name:"FormGenerator",components:{formGroup:VC},mixins:[pl],inject:{autofillSlot:{from:Qe,default:void 0}},provide(){var e;return{...!this.autofillSlot&&{[Qe]:(e=this.$slots)==null?void 0:e[wt]}}},props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:t.ref([]),fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:"",helpAsHtml:!1}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(e){return e.length>0}}},emits:["validated","modelUpdated"],data(){return{vfg:this,errors:[],children:t.ref([]),collapseStates:{}}},computed:{fields(){const e=[];return this.schema&&this.schema.fields&&je(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&je(this.schema.groups.slice(0),n=>{e.push(n)}),e}},watch:{model:{deep:!0,handler(e,n){n!==e&&e!=null&&this.$nextTick(()=>{this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors()})}}},mounted(){this.$nextTick(()=>{this.model&&(this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors())})},methods:{fieldVisible(e){return Ae(e.visible)?e.visible.call(this,this.model,e,this):ke(e.visible)?!0:e.visible},onFieldValidated(e,n,i){this.errors=this.errors.filter(o=>o.field.fieldName!==i.schema.fieldName),!e&&n&&n.length>0&&je(n,o=>{this.errors.push({field:i.schema,error:o})});const a=this.errors.length===0;this.$emit("validated",a,this.errors,this)},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e=null){e===null&&(e=le(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],i=[];je(this.$refs.children,o=>{Ae(o.validate)&&(n.push(o.$refs.child),i.push(o.$refs.child.validate(!0)))});const a=o=>{const r=[];je(o,(s,c)=>{Array.isArray(s)&&s.length>0&&je(s,u=>{r.push({field:n[c].schema,error:u})})}),this.errors=r;const l=r.length===0;return this.$emit("validated",l,r,this),e?r:l};return e?Promise.all(i).then(a):a(i)},clearValidationErrors(){this.errors.splice(0),je(this.$refs.children,e=>{e.clearValidationErrors()})}}},DC={key:0,class:"vue-form-generator"},jC={key:0};function UC(e,n,i,a,o,r){const l=t.resolveComponent("form-group"),s=t.resolveComponent("KCollapse");return i.schema!=null?(t.openBlock(),t.createElementBlock("div",DC,[i.schema.fields?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.tag),{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fields,c=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:c.model},[r.fieldVisible(c)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:o.errors,field:c,model:i.model,options:i.options,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:1})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,(c,u)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${u}`},[c.collapsible!==void 0&&c.collapsible!==!1?(t.openBlock(),t.createBlock(s,{key:0,class:"root-level-collapse","model-value":!1,title:c.collapsible.title},t.createSlots({default:t.withCtx(()=>{var d,m,g,h;return[(d=c.slots)!=null&&d.beforeContent?t.renderSlot(e.$slots,(m=c.slots)==null?void 0:m.beforeContent,{key:0}):t.createCommentVNode("",!0),c.fields.length===0&&(g=c.slots)!=null&&g.emptyState?t.renderSlot(e.$slots,(h=c.slots)==null?void 0:h.emptyState,{key:1}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.tag),{key:2,class:t.normalizeClass(e.getFieldRowClasses(c))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.fields,B=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:B.model},[r.fieldVisible(B)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:o.errors,field:B,model:i.model,options:i.options,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"])),c.collapsible!==!0&&c.collapsible.nestedCollapsible&&c.collapsible.nestedCollapsible.fields.length>0?(t.openBlock(),t.createBlock(s,{key:3,class:"nested-collapse","model-value":o.collapseStates[`group-${u}-nested`]??!0,"trigger-alignment":"leading","trigger-label":o.collapseStates[`group-${u}-nested`]??!0?c.collapsible.nestedCollapsible.triggerLabel.expand:c.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":B=>o.collapseStates[`group-${u}-nested`]=B},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.tag),{class:t.normalizeClass(e.getFieldRowClasses(c))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.collapsible.nestedCollapsible.fields,B=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:B.model},[r.fieldVisible(B)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:o.errors,field:B,model:i.model,options:i.options,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))]),_:2},1032,["model-value","trigger-label","onUpdate:modelValue"])):t.createCommentVNode("",!0)]}),_:2},[c.collapsible.description?{name:"visible-content",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.collapsible.description),1)]),key:"0"}:void 0]),1032,["title"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.tag),{key:1,class:t.normalizeClass(e.getFieldRowClasses(c))},{default:t.withCtx(()=>[c.legend?(t.openBlock(),t.createElementBlock("legend",jC,t.toDisplayString(c.legend),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.fields,d=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:d.model},[r.fieldVisible(d)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:o.errors,field:d,model:i.model,options:i.options,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))],64))),128))])):t.createCommentVNode("",!0)}const Ye=pe(LC,[["render",UC]]),as=new Set(["config-client_id","config-client_secret","config-issuer"]),os=new Set(["config-scopes_claim","config-scopes_required","config-audience_claim","config-audience_required","config-roles_claim","config-roles_required","config-groups_claim","config-groups_required","config-authenticated_groups_claim"]),PC={name:"OIDCForm",components:{VueFormGenerator:Ye},provide(){var e;return{[Qe]:(e=this.$slots)==null?void 0:e[wt]}},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){var e;if(!this.init){this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(i=>!i.model.startsWith("config")&&i.model!=="tags")};const n=this.formSchema.fields.reduce((i,a)=>(i[a.model]=a,i),{});this.commonFieldsSchema={fields:Array.from(as).reduce((i,a)=>(n[a]&&i.push(n[a]),i),[])},this.authFieldsSchema={fields:Array.from(os).reduce((i,a)=>(n[a]&&i.push(n[a]),i),[])},this.advancedFieldsSchema={fields:this.formSchema.fields.filter(i=>i.model.startsWith("config")&&i.model!=="config-auth_methods"&&!as.has(i.model)&&!os.has(i.model)||i.model==="tags").reduce((i,a)=>{var o,r,l,s;switch(a.model){case"config-client_jwk":{if(Array.isArray((r=(o=a.items)==null?void 0:o.schema)==null?void 0:r.fields))for(const c of a.items.schema.fields)c.label=c.model;i.push({...a,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record",newElementButtonLabel:"+ Add Client JWK",...Array.isArray((s=(l=a.items)==null?void 0:l.schema)==null?void 0:s.fields)&&a.items.schema.fields.map(c=>({...c,label:c.model}))});break}case"config-session_redis_cluster_nodes":{i.push({...a,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#host-record",newElementButtonLabel:"+ Add Cluster Node"});break}default:i.push(a)}return i},[])},this.sessionManagement=this.isEditing?this.formModel["config-auth_methods"].includes("session"):!1,this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.isEditing?this.formModel["config-auth_methods"].includes("authorization_code"):!1},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("bearer"):!1},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("client_credentials"):!1},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("password"):!1},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.isEditing?this.formModel["config-auth_methods"].includes("introspection"):!1},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.isEditing?this.formModel["config-auth_methods"].includes("userinfo"):!1},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("kong_oauth2"):!1},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("refresh_token"):!1}];for(const i of[this.commonFieldsSchema,this.authFieldsSchema,this.advancedFieldsSchema])for(const a of i.fields){const o=(e=n[a.model])==null?void 0:e.help;a.help===void 0&&typeof o=="string"&&(a.help=o)}}},getAuthMethodsValue(e,n){const i=[];for(let a=0;a<this.authMethods.length;a++)this.authMethods[a].prop&&this.authMethods[a].value!==e&&i.push(this.authMethods[a].value);return this.sessionManagement&&e&&i.push("session"),n&&(e?i.push(e):i.push("session")),i},handleUpdate(e,n){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(n,e),this.onModelUpdated()}}},cn=e=>(t.pushScopeId("data-v-bb72c68e"),e=e(),t.popScopeId(),e),GC={class:"general-settings"},YC={class:"link-wrapper"},HC=cn(()=>t.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),FC=cn(()=>t.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),zC={class:"auth-method-container"},KC={class:"general-settings"},qC={class:"link-wrapper"},XC=cn(()=>t.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),JC=cn(()=>t.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),ZC={class:"general-settings"},QC={class:"link-wrapper"},WC=cn(()=>t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),_C=cn(()=>t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function $C(e,n,i,a,o,r){const l=t.resolveComponent("VueFormGenerator"),s=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KLabel"),u=t.resolveComponent("KCheckbox"),d=t.resolveComponent("KInputSwitch"),m=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[i.formModel.id&&i.isEditing||!i.isEditing?(t.openBlock(),t.createBlock(l,{key:0,class:"global-fields",model:i.formModel,options:i.formOptions,schema:o.globalFields,onModelUpdated:i.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(m,{tabs:o.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",GC,[t.createElementVNode("div",YC,[t.createVNode(s,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:t.withCtx(()=>[HC]),_:1})]),FC,r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:i.formModel,options:i.formOptions,schema:o.commonFieldsSchema,onModelUpdated:i.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(c,null,{default:t.withCtx(()=>[t.createTextVNode("Auth Methods")]),_:1}),t.createElementVNode("div",zC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.authMethods,g=>(t.openBlock(),t.createElementBlock("div",{key:g.value,class:"auth-method"},[t.createVNode(u,{modelValue:g.prop,"onUpdate:modelValue":h=>g.prop=h,onChange:h=>r.handleUpdate(h,g.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(d,{modelValue:o.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=g=>o.sessionManagement=g),label:"Enable Session Management",onChange:r.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",KC,[t.createElementVNode("div",qC,[t.createVNode(s,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:t.withCtx(()=>[XC]),_:1})]),JC,r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:i.formModel,options:i.formOptions,schema:o.authFieldsSchema,onModelUpdated:i.onModelUpdated},{"autofill-provider":t.withCtx(g=>[t.renderSlot(e.$slots,"autofill-provider",t.normalizeProps(t.guardReactiveProps(g)),void 0,!0)]),_:3},8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",ZC,[t.createElementVNode("div",QC,[t.createVNode(s,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:t.withCtx(()=>[WC]),_:1})]),_C,r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:i.formModel,options:i.formOptions,schema:o.advancedFieldsSchema,onModelUpdated:i.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:3},8,["tabs"])])}const ek=pe(PC,[["render",$C],["__scopeId","data-v-bb72c68e"]]),tk={packageName:"forms"},nk={view_advanced_fields:"View Advanced Fields",window_type:{label:"Rate Limit Window Type",help:"Sets the time window type to either <code>sliding</code> (default) or <code>fixed</code>.<br><ul><li>Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight.</li><li>Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window&#39;s counters.</li></ul>",options:{fixed:"Fixed",sliding:"Sliding"}},request_limits:{title:"Request Limits",subtitle:"Set one or more limits on the number of API requests allowed within a defined timeframe.",label:"Limit",label_index:"Limit {index}",request_number:"Request number",time_interval:"Time interval",interval_determiner:"Every",seconds:"Seconds"},start_with_a_use_case:"Start with a use case:",use_case_index:"Use case {index}",error_message:{label:"Error Message",code_placeholder:"Code Message",message_placeholder:"Error Message",help:"Set a custom error code and message to be returned when the rate limit is exceeded."},identifiers:{label:"Identifiers",options:{ip:"IP",credential:"Credential",consumer:"Consumer",service:"Service",header:"Header",path:"Path","consumer-group":"Consumer Group"}},redis:{title:"Configure your Redis",address_example:"e.g. localhost:6379"}},ha={general:tk,"post-function":{tags:{hint:"e.g. tag1, tag2, tag3",newElementButtonLabel:"+ Add"},enabled:{newElementButtonLabel:"+ Add"},selectionGroup:{newElementButtonLabel:"+ Add"},instance_name:{newElementButtonLabel:"+ Add"},name:{newElementButtonLabel:"+ Add"},"config-certificate":{help:"Array of stringified Lua code to be cached and run in sequence during the certificate phase.",newElementButtonLabel:"+ Add"},"config-access":{help:"Array of stringified Lua code to be cached and run in sequence during the access phase.",newElementButtonLabel:"+ Add"},"config-body_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the body_filter phase.",newElementButtonLabel:"+ Add"},"config-header_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the header_filter phase.",newElementButtonLabel:"+ Add"},"config-functions":{newElementButtonLabel:"+ Add"},"config-log":{newElementButtonLabel:"+ Add"},"config-rewrite":{newElementButtonLabel:"+ Add"},"config-ws_client_frame":{newElementButtonLabel:"+ Add"},"config-ws_close":{newElementButtonLabel:"+ Add"},"config-ws_handshake":{newElementButtonLabel:"+ Add"},"config-ws_upstream_frame":{newElementButtonLabel:"+ Add"}},"exit-transformer":{"config-functions":{newElementButtonLabel:"+ Add"}},rla:nk},ik=t.defineComponent({__name:"PostFunction",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var n;t.provide(Qe,(n=t.useSlots())==null?void 0:n[wt]);const{t:i,te:a}=St.createI18n("en-us",ha),o=e,r=t.computed(()=>o.formModel.id&&o.isEditing||!o.isEditing),l=t.computed(()=>{const s=o.formSchema;return s.fields.map(c=>{const u=`post-function.${c.model}`;return c.hint=a(`${u}.hint`)&&i(`${u}.hint`)||c.hint,c.help=a(`${u}.help`)&&i(`${u}.help`)||c.help,c.newElementButtonLabel=a(`${u}.newElementButtonLabel`)&&i(`${u}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="post-function-array-item-container",c.fieldItemsClasses="post-function-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),s});return(s,c)=>r.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),ak=pe(ik,[["__scopeId","data-v-f54f37ae"]]),ok=t.defineComponent({__name:"ExitTransformer",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var n;t.provide(Qe,(n=t.useSlots())==null?void 0:n[wt]);const{t:i,te:a}=St.createI18n("en-us",ha),o=e,r=t.computed(()=>o.formModel.id&&o.isEditing||!o.isEditing),l=t.computed(()=>{const s=o.formSchema;return s.fields.map(c=>{const u=`exit-transformer.${c.model}`;return c.hint=a(`${u}.hint`)&&i(`${u}.hint`)||c.hint,c.help=a(`${u}.help`)&&i(`${u}.help`)||c.help,c.newElementButtonLabel=a(`${u}.newElementButtonLabel`)&&i(`${u}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="exit-transformer-array-item-container",c.fieldItemsClasses="exit-transformer-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),s});return(s,c)=>r.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),rk=pe(ok,[["__scopeId","data-v-0d5c541f"]]),lk={fields:[{inputType:"text",label:"Config.Account Email",model:"config-account_email",required:!0,type:"input"},{inputType:"text",label:"Config.Account Key.Key Id",model:"config-account_key-key_id",required:!0,type:"input"},{type:"input",inputType:"text",valueType:"string",label:"Config.Account Key.Key Set",model:"config-account_key-key_set",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",label:"Config.Allow Any Domain",model:"config-allow_any_domain",order:0,disabled:!1}]},sk={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",model:"config-tos_accepted",label:"Config.Tos Accepted",order:0,disabled:!1}]},ck={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_hmac_key",label:"Config.Eab Hmac Key",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_kid",label:"Config.Eab Kid",order:0,disabled:!1}]},Ft=e=>(t.pushScopeId("data-v-bb5a3a33"),e=e(),t.popScopeId(),e),dk={class:"general-settings"},uk=Ft(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),pk=Ft(()=>t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),mk=Ft(()=>t.createElementVNode("hr",null,null,-1)),gk={class:"sub-form"},fk={class:"general-settings"},Ak=Ft(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),hk=Ft(()=>t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),yk={class:"sub-form"},bk={class:"general-settings"},wk=Ft(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),Ek=Ft(()=>t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),Ck=t.defineComponent({__name:"ACMEForm",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var n;t.provide(Qe,(n=t.useSlots())==null?void 0:n[wt]);const i=e,a=t.ref("zeroSsl"),o=t.ref("shm"),r=t.computed(()=>{var f;const y={};if((f=i.formSchema)!=null&&f.fields)for(const k of i.formSchema.fields)y[k.model]=k;return y}),l=t.computed(()=>{var f;const y=mt(lk);for(const k of y.fields){const V=(f=r.value[k.model])==null?void 0:f.help;k.help===void 0&&typeof V=="string"&&(k.help=V)}return y}),s=t.computed(()=>{var f;const y=mt(sk);for(const k of y.fields){const V=(f=r.value[k.model])==null?void 0:f.help;k.help===void 0&&typeof V=="string"&&(k.help=V)}return y}),c=t.computed(()=>{var f;const y=mt(ck);for(const k of y.fields){const V=(f=r.value[k.model])==null?void 0:f.help;k.help===void 0&&typeof V=="string"&&(k.help=V)}return y}),u=t.computed(()=>({fields:i.formSchema.fields.filter(f=>!f.model.startsWith("config")&&f.model!=="tags")})),d=t.computed(()=>({fields:l.value.fields.filter(f=>!s.value.fields.some(y=>y.model===f.model)&&!c.value.fields.some(y=>y.model===f.model))})),m=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage")&&!f.model.startsWith("config-storage_config-consul")&&!f.model.startsWith("config-storage_config-redis")&&!f.model.startsWith("config-storage_config-shm")&&!f.model.startsWith("config-storage_config-vault"))})),g=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage_config-consul"))})),h=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage_config-redis"))})),B=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage_config-shm"))})),C=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config-storage_config-vault"))})),b=t.computed(()=>({fields:i.formSchema.fields.filter(f=>f.model.startsWith("config")&&!d.value.fields.filter(y=>y.model===f.model).length&&!m.value.fields.filter(y=>y.model===f.model).length||f.model==="tags")})),I=t.computed(()=>i.formModel.id&&i.isEditing||!i.isEditing),x=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],E=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];t.onMounted(()=>{a.value==="zeroSsl"&&(i.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const w=f=>{a.value=f.value,(f.value==="zeroSsl"||f.value==="other")&&(f.value==="zeroSsl"?i.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":i.formModel["config-api_uri"]="https://acme.example.com/",i.formModel["config-tos_accepted"]=!1),f.value==="letsEncrypt"&&(i.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",i.formModel["config-eab_hmac_key"]="",i.formModel["config-eab_kid"]=""),i.onModelUpdated()},A=(f,y)=>{y==="config-storage"&&(o.value=f),i.onModelUpdated()};return(f,y)=>{const k=t.resolveComponent("KSelect"),V=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(Ye,{key:0,class:"global-fields",model:e.formModel,options:e.formOptions,schema:u.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(V,{tabs:x},{general:t.withCtx(()=>[t.createElementVNode("div",dk,[uk,pk,I.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:d.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),mk,t.createVNode(k,{class:"issuer-select",items:E,label:"Issuer",onChange:w}),t.createElementVNode("div",gk,[a.value==="letsEncrypt"?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:s.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="zeroSsl"||a.value==="other"?(t.openBlock(),t.createBlock(Ye,{key:1,model:e.formModel,options:e.formOptions,schema:c.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",fk,[Ak,hk,I.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:m.value,onModelUpdated:A},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",yk,[o.value==="consul"?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:g.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="redis"?(t.openBlock(),t.createBlock(Ye,{key:1,model:e.formModel,options:e.formOptions,schema:h.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="shm"?(t.openBlock(),t.createBlock(Ye,{key:2,model:e.formModel,options:e.formOptions,schema:B.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="vault"?(t.openBlock(),t.createBlock(Ye,{key:3,model:e.formModel,options:e.formOptions,schema:C.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",bk,[wk,Ek,I.value?(t.openBlock(),t.createBlock(Ye,{key:0,model:e.formModel,options:e.formOptions,schema:b.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),kk=pe(Ck,[["__scopeId","data-v-bb5a3a33"]]),rs=e=>(t.pushScopeId("data-v-f53eec84"),e=e(),t.popScopeId(),e),Bk={class:"rla-form-basic-fields"},Ik={class:"rla-form-request-limits-subtitle"},Sk={class:"rla-form-request-limits-content"},xk={class:"rla-form-window-type"},vk=["innerHTML"],Ok={class:"rla-form-window-type-radios"},Mk={class:"rla-form-request-limits-items"},Rk={class:"rla-form-request-limits-row"},Tk=["id"],Nk={class:"rla-form-request-limits-actions"},Vk={key:0,class:"rla-form-request-limits-examples"},Lk={class:"rla-form-request-limits-examples-badges"},Dk=rs(()=>t.createElementVNode("br",null,null,-1)),jk=["innerHTML"],Uk={id:"rla-form-error-legend",class:"rla-form-error-inputs"},Pk=rs(()=>t.createElementVNode("div",null,":",-1)),Gk=t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},isEditing:{type:Boolean}},setup(e){var n;t.provide(Qe,(n=t.useSlots())==null?void 0:n[wt]);const i={fixed:[{label:"500 requests every hour",description:"A fixed limit of 500 requests per hour resetting sharply on the hour, ensuring no user can exceed this limit.",config:{limit:500,window_size:3600}},{label:"200 requests every 30 minutes",description:"Users are allowed 200 requests per 30 minutes, resetting exactly on the 30 minute mark with no carryover of unused limits.",config:{limit:200,window_size:1800}},{label:"500 requests every day",description:"A strict limit of 5000 requests per day resetting promptly at midnight, preventing any burst traffic or inconsistent user experiences.",config:{limit:500,window_size:86400}}],sliding:[{label:"100 requests every hour",description:"Maximum of 100 requests every rolling hour, continuously adjusting the count over the course of the hour. No hard limit or known reset.",config:{limit:100,window_size:3600}},{label:"300 requests every 30 minutes",description:"Each user can make up to 300 requests in any rolling 30 minute period, with older requests dropping off as new requests are made.",config:{limit:300,window_size:1800}},{label:"500 requests every hour",description:`Each user is allowed 500 requests per hour.
88
88
  If the limit is exceeded and the user receives a 429 error, each additional request within the sliding window (hour)
89
89
  will extend the wait time by about 12 minutes, continuously adjusting as new requests are made.`,config:{limit:500,window_size:3600}}]},a=new Set(["selectionGroup",...["identifier","limit","window_size","error_code","error_message"].map(S=>`config-${S}`)]),o=S=>S===void 0?!1:a.has(S),{t:r}=St.createI18n("en-us",ha),l=e,s=t.computed(()=>{var S,O;const N=(O=(S=l.formSchema)==null?void 0:S.fields)==null?void 0:O.find(P=>P.type==="selectionGroup"&&P.model==="selectionGroup");if(N)return{fields:[N]}}),c=t.computed(()=>{var S,O;const N=((O=(S=l.formSchema)==null?void 0:S.fields)==null?void 0:O.filter(L=>!o(L.model)))??[],P=[],q=[],Z=[];let z=!1;for(const L of N){const j=L.model;if(j!==void 0){if(j.startsWith("config-redis-")){(L.model==="config-redis-cluster_addresses"||L.model==="config-redis-sentinel_addresses")&&(L.inputAttributes.help=r("rla.redis.address_example")),q.push(L);continue}z?Z.push(L):P.push(L),L.model==="config-strategy"&&(z=!0)}}return{endsWithStrategy:{fields:P},redis:{fields:q},afterStrategy:{fields:Z}}}),u=t.computed(()=>{const S=l.formModel["config-window_type"];return Object.prototype.hasOwnProperty.call(i,S)?i[S]:[]}),d=t.computed(()=>{var S,O;return(O=(S=l.formSchema)==null?void 0:S.fields)==null?void 0:O.find(N=>N.model==="config-identifier")}),m=t.computed(()=>{var S,O,N;return(((N=(O=(S=l.formSchema)==null?void 0:S.fields)==null?void 0:O.find(P=>P.model==="config-identifier"))==null?void 0:N.values)??[]).map(P=>({label:r(`rla.identifiers.options.${P}`),value:P}))}),g=t.ref(),h=t.ref(!0),B=t.computed(()=>{var S,O,N;return l.formModel["config-window_type"]??((N=(O=(S=l.formSchema)==null?void 0:S.fields)==null?void 0:O.find(P=>P.model==="config-window_type"))==null?void 0:N.default)}),C=t.computed(()=>{var S,O,N,P,q,Z;const z=(N=(O=(S=l.formSchema)==null?void 0:S.fields)==null?void 0:O.find(L=>L.model==="config-window_type"))==null?void 0:N.default;return(((Z=(q=(P=l.formSchema)==null?void 0:P.fields)==null?void 0:q.find(L=>L.model==="config-window_type"))==null?void 0:Z.values)??[]).sort((L,j)=>L===z?-1:j===z?1:0)}),b=t.computed(()=>{var S;const O=(S=l.formModel["config-limit"])==null?void 0:S.map((N,P)=>{var q,Z;return{limit:N,windowSize:(Z=(q=l.formModel)==null?void 0:q["config-window_size"])==null?void 0:Z[P]}});return!Array.isArray(O)||O.length===0?[{limit:void 0,windowSize:void 0}]:O}),I=t.computed(()=>{var S,O,N,P;return((S=l.formModel)==null?void 0:S["config-identifier"])??((P=(N=(O=l.formSchema)==null?void 0:O.fields)==null?void 0:N.find(q=>q.model==="config-identifier"))==null?void 0:P.default)}),x=t.computed(()=>{var S,O,N,P;return((S=l.formModel)==null?void 0:S["config-error_code"])??((P=(N=(O=l.formSchema)==null?void 0:O.fields)==null?void 0:N.find(q=>q.model==="config-error_code"))==null?void 0:P.default)}),E=t.computed(()=>{var S,O,N,P;return((S=l.formModel)==null?void 0:S["config-error_message"])??((P=(N=(O=l.formSchema)==null?void 0:O.fields)==null?void 0:N.find(q=>q.model==="config-error_message"))==null?void 0:P.default)}),w=(S,O)=>{if(O===g.value){l.onModelUpdated([],"config-limit"),l.onModelUpdated([],"config-window_size"),t.nextTick(()=>{g.value=void 0});return}l.onModelUpdated([S.config.limit],"config-limit"),l.onModelUpdated([S.config.window_size],"config-window_size"),t.nextTick(()=>{g.value=O})},A=S=>{g.value!==void 0&&(g.value=void 0),l.onModelUpdated(S.toString(),"config-window_type")},f=(S,O)=>{var N;g.value!==void 0&&(g.value=void 0);const P=mt(((N=l.formModel)==null?void 0:N["config-limit"])??[]);P[S]=O,l.onModelUpdated(P,"config-limit")},y=(S,O)=>{var N;g.value!==void 0&&(g.value=void 0);const P=mt(((N=l.formModel)==null?void 0:N["config-window_size"])??[]);P[S]=O,l.onModelUpdated(P,"config-window_size")},k=S=>{var O,N;g.value!==void 0&&(g.value=void 0);const P=mt(((O=l.formModel)==null?void 0:O["config-limit"])??[]),q=mt(((N=l.formModel)==null?void 0:N["config-window_size"])??[]);P.length===0&&P.push(void 0),q.length===0&&q.push(void 0),P.splice(S+1,0,void 0),q.splice(S+1,0,void 0),l.onModelUpdated(P,"config-limit"),l.onModelUpdated(q,"config-window_size")},V=S=>{var O,N;if(b.value.length>1){g.value!==void 0&&(g.value=void 0);const P=mt(((O=l.formModel)==null?void 0:O["config-limit"])??[]),q=mt(((N=l.formModel)==null?void 0:N["config-window_size"])??[]);P.length===0&&P.push(void 0),q.length===0&&q.push(void 0),P.splice(S,1),q.splice(S,1),l.onModelUpdated(P,"config-limit"),l.onModelUpdated(q,"config-window_size")}};return(S,O)=>{const N=t.resolveComponent("VueFormGenerator"),P=t.resolveComponent("KLabel"),q=t.resolveComponent("KRadio"),Z=t.resolveComponent("KInput"),z=t.resolveComponent("KButton"),L=t.resolveComponent("KBadge"),j=t.resolveComponent("KTooltip"),v=t.resolveComponent("KCard"),U=t.resolveComponent("KSelect"),K=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Bk,[t.createVNode(N,{model:S.formModel,options:S.formOptions,schema:s.value,onModelUpdated:O[0]||(O[0]=(T,_)=>S.onModelUpdated(T,_))},null,8,["model","options","schema"]),t.createVNode(v,{class:"rla-form-request-limits"},{title:t.withCtx(()=>[t.createVNode(P,{class:"rla-form-request-limits-title",for:"rla-form-request-limits-legend",required:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.request_limits.title")),1)]),_:1}),t.createElementVNode("div",Ik,t.toDisplayString(t.unref(r)("rla.request_limits.subtitle")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",Sk,[t.createElementVNode("div",xk,[t.createVNode(P,{class:"rla-form-window-type-label","tooltip-attributes":{maxWidth:"300",placement:"top"}},{tooltip:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:t.unref(r)("rla.window_type.help")},null,8,vk)]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.window_type.label"))+" ",1)]),_:1}),t.createElementVNode("div",Ok,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,T=>(t.openBlock(),t.createBlock(q,{key:`window-type-${T}`,"model-value":B.value,name:T,"selected-value":T,"onUpdate:modelValue":A},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)(`rla.window_type.options.${T}`)),1)]),_:2},1032,["model-value","name","selected-value"]))),128))])]),t.createElementVNode("div",Mk,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,(T,_)=>(t.openBlock(),t.createElementBlock("div",{key:_.toString()},[t.createVNode(P,{for:`rla-form-request-limits-item-${_}-legend`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.request_limits.label_index",{index:_+1})),1)]),_:2},1032,["for"]),t.createElementVNode("div",Rk,[t.createElementVNode("legend",{id:`rla-form-request-limits-item-${_}-legend`,class:"rla-form-request-limits-inputs"},[t.createVNode(Z,{"model-value":T.limit&&T.limit.toString(),placeholder:t.unref(r)("rla.request_limits.request_number"),type:"number","onUpdate:modelValue":$=>f(_,Number.parseInt($))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.interval_determiner")),1),t.createVNode(Z,{"model-value":T.windowSize&&T.windowSize.toString(),placeholder:t.unref(r)("rla.request_limits.time_interval"),type:"number","onUpdate:modelValue":$=>y(_,Number.parseInt($))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.seconds")),1)],8,Tk),t.createElementVNode("div",Nk,[t.createVNode(z,{appearance:"tertiary",disabled:b.value.length<=1,onClick:()=>V(_)},{default:t.withCtx(()=>[t.createVNode(t.unref(lw))]),_:2},1032,["disabled","onClick"]),t.createVNode(z,{appearance:"tertiary",onClick:()=>k(_)},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:2},1032,["onClick"])])])]))),128))]),u.value.length>0?(t.openBlock(),t.createElementBlock("div",Vk,[t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.start_with_a_use_case")),1),t.createElementVNode("div",Lk,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(T,_)=>(t.openBlock(),t.createBlock(j,{key:`use-case-${_}`,"max-width":"300"},{content:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(T.description),1),Dk,t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.label"))+": "+t.toDisplayString(T.config.limit),1),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.time_interval"))+": "+t.toDisplayString(T.config.window_size),1)]),default:t.withCtx(()=>[t.createVNode(L,{appearance:g.value===`${B.value}-${_}`?"info":"decorative",class:"rla-form-request-limits-examples-badge",onClick:()=>w(T,`${B.value}-${_}`)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(T.label),1)]),_:2},1032,["appearance","onClick"])]),_:2},1024))),128))])])):t.createCommentVNode("",!0)])]),_:1}),t.createVNode(U,{modelValue:I.value,"onUpdate:modelValue":O[1]||(O[1]=T=>I.value=T),class:"rla-form-identifiers",items:m.value,label:t.unref(r)("rla.identifiers.label"),"label-attributes":{tooltipAttributes:{maxWidth:"300",placement:"top"}},required:"",onSelected:O[2]||(O[2]=T=>l.onModelUpdated(T.value,"config-identifier"))},{"label-tooltip":t.withCtx(()=>[t.createElementVNode("div",{innerHTML:d.value&&d.value.help},null,8,jk)]),_:1},8,["modelValue","items","label"]),t.createElementVNode("div",null,[t.createVNode(P,{for:"rla-form-error-legend",info:t.unref(r)("rla.error_message.help"),required:"","tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.error_message.label")),1)]),_:1},8,["info"]),t.createElementVNode("legend",Uk,[t.createVNode(Z,{class:"input-error-code","model-value":x.value&&x.value.toString(),placeholder:t.unref(r)("rla.error_message.code_placeholder"),type:"number","onUpdate:modelValue":O[3]||(O[3]=T=>S.onModelUpdated(Number.parseInt(T),"config-error_code"))},null,8,["model-value","placeholder"]),Pk,t.createVNode(Z,{"model-value":E.value,placeholder:t.unref(r)("rla.error_message.message_placeholder"),"onUpdate:modelValue":O[4]||(O[4]=T=>S.onModelUpdated(T,"config-error_message"))},null,8,["model-value","placeholder"])])])]),t.createVNode(K,{modelValue:h.value,"onUpdate:modelValue":O[8]||(O[8]=T=>h.value=T),"trigger-label":t.unref(r)("rla.view_advanced_fields")},{default:t.withCtx(()=>[t.createVNode(N,{model:S.formModel,options:S.formOptions,schema:c.value.endsWithStrategy,onModelUpdated:O[5]||(O[5]=(T,_)=>S.onModelUpdated(T,_))},null,8,["model","options","schema"]),S.formModel["config-strategy"]==="redis"?(t.openBlock(),t.createBlock(v,{key:0,class:"rla-form-redis-card",title:t.unref(r)("rla.redis.title")},{default:t.withCtx(()=>[t.createVNode(N,{model:S.formModel,options:S.formOptions,schema:c.value.redis,onModelUpdated:O[6]||(O[6]=(T,_)=>S.onModelUpdated(T,_))},null,8,["model","options","schema"])]),_:1},8,["title"])):t.createCommentVNode("",!0),t.createVNode(N,{model:S.formModel,options:S.formOptions,schema:c.value.afterStrategy,onModelUpdated:O[7]||(O[7]=(T,_)=>S.onModelUpdated(T,_))},null,8,["model","options","schema"])]),_:1},8,["modelValue","trigger-label"])],64)}}}),Yk=pe(Gk,[["__scopeId","data-v-f53eec84"]]),Hk=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:kk,ExitTransformer:rk,OIDCForm:ek,PostFunction:ak,RLAForm:Yk},Symbol.toStringTag,{value:"Module"})),ya=["array","metric","advanced","selectionGroup","object-advanced"],ls=e=>({"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer","rate-limiting-advanced":"RLAForm"})[e],zt={type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldArrayCardContainer",fieldClasses:"array-card-container-wrapper"},Fk={"config-prompts-prepend":{...zt,newElementButtonLabel:"+ Add Message",items:{type:"object",schema:{fields:[{label:"Role",model:"role",help:"LLM message role",type:"select",required:!0,values:["system","assistant","user"]},{label:"Content",model:"content",type:"input",required:!0,help:"LLM message content",inputType:"text"}]}}},"config-prompts-append":{...zt,newElementButtonLabel:"+ Add Message",items:{type:"object",schema:{fields:[{label:"Role",model:"role",help:"LLM message role",type:"select",required:!0,values:["system","assistant","user"]},{label:"Content",model:"content",type:"input",required:!0,help:"LLM message content",inputType:"text"}]}}}},zk={"config-templates":{...zt,newElementButtonLabel:"+ Add Template",items:{type:"object",schema:{fields:[{label:"Template Name",model:"name",help:"Template Name, for reference in user requests",type:"input",required:!0,inputType:"text"},{label:"Template String",model:"template",help:"Template string content, containing {{placeholders}} for variable substitution",type:"textArea",required:!0,inputType:"text"}]}}}},Kk={"config-llm_providers":{...zt,newElementButtonLabel:"+ Add Provider",items:{type:"object",schema:{fields:[{label:"Window Size",model:"window_size",help:"Window size to apply a limit to (defined in seconds)",type:"input",required:!0,inputType:"number"},{label:"Name",model:"name",help:"The llm providers.",type:"select",required:!0,values:["anthropic","azure","cohere","llama2","mistral","openai","requestPrompt"]},{label:"Limit",model:"limit",help:"Limit applied to the llm provider.",type:"input",required:!0,inputType:"number"}]}}}},qk={enabled:{type:"switch",model:"enabled",label:"Enabled",textOn:"This plugin is Enabled",textOff:"This plugin is Disabled",inputType:"hidden",styleClasses:"field-switch top-border bottom-border hide-label",default:!0},name:{default:"application-registration",type:"input",inputType:"hidden",styleClasses:"kong-form-hidden-field-wrapper"},"service-id":{type:"AutoSuggest",label:"Gateway Service",styleClasses:"bottom-border",description:"Specific Gateway Service in this workspace",model:"service-id",entity:"services",placeholder:"Select a Gateway Service",inputValues:{fields:["name","id"]},help:"The Gateway Service that this plugin configuration will target"},tags:kn.tags,protocols:{id:"protocols",default:[],type:"multiselect",label:"Protocols",values:[{label:"grpc",value:"grpc"},{label:"grpcs",value:"grpcs"},{label:"http",value:"http"},{label:"https",value:"https"},{label:"tcp",value:"tcp"},{label:"tls",value:"tls"},{label:"tls_passthrough",value:"tls_passthrough"},{label:"udp",value:"udp"},{label:"ws",value:"ws"},{label:"wss",value:"wss"}],help:"A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type.",placeholder:"Select valid protocols for the plugin",styleClasses:"plugin-protocols-select"}},Dn={type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"kong-form-field-wrapper",newElementButtonLabel:"+ Add",newElementButtonLabelClasses:"kong-form-new-element-button-label"},jn={type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldMetric",fieldClasses:"metrics-wrapper"},Xk={"config-metrics":{...jn,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"tags",label:"Tags",type:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},inputType:"text"}]}}}},Jk={"config-strategy":{label:"Config.Strategy",type:"select",default:"cluster",values:["cluster","redis"]}},ss={"config-bootstrap_servers":{...zt,newElementButtonLabel:"+ Add Bootstrap Server",label:"Bootstrap Server(s)",placeholder:"Enter a Bootstrap Server",help:"Set of bootstrap brokers.",items:{type:"object",schema:{fields:[{label:"Host",model:"host",type:"input",inputType:"text"},{label:"Port",model:"port",type:"input",inputType:"number"}]}}}},Zk={"config-api_specification":{label:"Config.API Specification",placeholder:"Enter an API spec",type:"textArea",rows:10}},Qk={"config-access":{},"config-body_filter":{},"config-header_filter":{},"config-certificate":{},"config-functions":{},"config-log":{},"config-rewrite":{}},cs=["config-access","config-body_filter","config-header_filter","config-certificate","config-functions","config-log","config-rewrite"].reduce((e,n)=>({...e,[n]:kn.fields.arrayItems({newElementButtonLabel:"Add"})}),Qk),gi={"config-strategy":{label:"Config.Strategy",type:"select",default:"redis",values:["local","redis"]},"config-consumer_groups":{label:"Config.Consumer Groups",type:"input",placeholder:"Enter list of consumer groups",hint:"e.g. group1, group2"}},Wk={"config-remove-headers":{},"config-remove.querystring":{},"config-remove-body":{},"config-replace-headers":{},"config-replace-querystring":{},"config-replace-body":{},"config-rename-headers":{},"config-rename-querystring":{},"config-rename-body":{},"config-add-headers":{},"config-add-querystring":{},"config-add-body":{},"config-append-headers":{},"config-append-querystring":{},"config-append-body":{},"config-allow-body":{}},_k=["config-remove-headers","config-remove.querystring","config-remove-body","config-replace-headers","config-replace-querystring","config-replace-body","config-rename-headers","config-rename-querystring","config-rename-body","config-add-headers","config-add-querystring","config-add-body","config-append-headers","config-append-querystring","config-append-body","config-allow-body"].reduce((e,n)=>({...e,[n]:kn.fields.arrayItems({newElementButtonLabel:"Add"})}),Wk),$k={"config-parameter_schema":{...jn,items:{type:"object",default:()=>({required:!1,explode:!1}),schema:{fields:[{model:"in",label:"in",type:"select",values:["query","header","path"]},{model:"name",label:"name",type:"input",inputType:"string",id:"schema_name"},{model:"required",label:"required",type:"switch",id:"schema_required"},{model:"style",label:"style",type:"select",values:["label","form","matrix","simple","spaceDelimited","pipeDelimited","deepObject"]},{model:"explode",label:"explode",type:"switch",id:"schema_explode"},{model:"schema",label:"schema",type:"input",inputType:"string",id:"schema_schema"}]}}}},eB={"config-rules":{...zt,newElementButtonLabel:"+ Add Rule",items:{type:"object",schema:{fields:[{label:"Upstream Name",model:"upstream_name",type:"input",help:"Target hostname where traffic will be routed in case of condition match",placeholder:"Hostname",inputType:"text"},{label:"Condition",model:"condition",type:"keyValuePairs",help:"List of headers name and value pairs",newElementButtonLabelClasses:"kong-form-new-element-button-label",newElementButtonLabel:"+ Add Condition",keyInputPlaceholder:"Header name",valueInputPlaceholder:"Header value"}]}}}},tB={"config-session_redis_cluster_nodes":{...zt,newElementButtonLabel:"+ Add Cluster Node",items:{type:"object",schema:{fields:[{label:"IP",model:"ip",type:"input",inputType:"text"},{label:"Port",model:"port",type:"input",inputType:"number"}]}}}},nB={"config-metrics":{...jn,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency","status_count_per_user","status_count_per_user_per_route","status_count_per_workspace","shdict_usage"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"service_identifier",label:"Service Identifier",type:"select",values:["service_id","service_name","service_host","service_name_or_host"]},{model:"workspace_identifier",label:"Workspace Identifier",type:"select",values:["workspace_id","workspace_name"]}]}}}},iB={"config-metrics":{...jn,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency","status_count_per_user","status_count_per_user_per_route","status_count_per_workspace","shdict_usage","cache_datastore_hits_total","cache_datastore_misses_total"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"service_identifier",label:"Service Identifier",type:"select",values:["service_id","service_name","service_host","service_name_or_host"]},{model:"workspace_identifier",label:"Workspace Identifier",type:"select",values:["workspace_id","workspace_name"]}]}}}},aB={"config-vault":{type:"AutoSuggest",entity:"vaults",placeholder:"Select a Vault",inputValues:{fields:["prefix","name","id"]},modelTransformer:e=>({id:e}),keyFromObject:"id"}},oB={"config-static_tags":{...jn,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"name",type:"input",inputType:"string",id:"schema_name"},{model:"value",label:"value",type:"input",inputType:"string",id:"schema_value"}]}}}},rB=(e,n)=>{const i=e.model.startsWith("config-"),a=n.model.startsWith("config-");return i&&!a?1:!i&&a?-1:0},ds=(e,n)=>(e.order??0)-(n.order??0),us=(e,n)=>rB(e,n)||ds(e,n)||e.model.localeCompare(n.model),ye={useI18n:ei,usePluginMetaData:_f,usePluginHelpers:sr,useSchemas:e=>{const{capitalize:n}=ji(),{convertToDotNotation:i}=sr(),{i18n:{t:a}}=ei(),o={"application-registration":{overwriteDefault:!0,formSchema:{...qk}},datadog:{...Xk},"upstream-tls":{"config-trusted_certificates":{type:"textArea",valueType:"array",rows:4,help:"A comma separated list of certificate values"}},jwt:{...qf},"kafka-upstream":{...ss},"kafka-log":{...ss},statsd:{...nB},"statsd-advanced":{...iB},"route-by-header":{...eB},"ai-prompt-decorator":{...Fk},"ai-prompt-template":{...zk},"ai-rate-limiting-advanced":{...Kk},"vault-auth":{...aB},"oas-validation":{"config-api_spec":{type:"textArea",rows:15}},mocking:{...Zk},"rate-limiting":{...gi},"rate-limiting-advanced":(e==null?void 0:e.app)==="kongManager"?{"config-consumer_groups":gi["config-consumer_groups"]}:{...gi},"graphql-rate-limiting-advanced":{...Jk},"response-ratelimiting":{...gi},"pre-function":{...cs},"post-function":{...cs},"request-transformer-advanced":{..._k},"request-validator":{...$k},zipkin:{...oB},saml:{...tB}},r=()=>["created_at","updated_at","id"],l=(A,f,y)=>{let k={};(f||A)&&(k=f||(A.fields?A.fields:A));const V=r().concat(A.blacklist?A.blacklist:[]),S=Object.keys(k).filter(z=>!V.includes(z)),O=S.indexOf("comparator");O>-1&&S.splice(O,1);let N={fields:[]};const P={};S.forEach(z=>{c(k[z],z,k,P,N,y)});const q=P.name,Z=rt[q];if(ls(q)||Z!=null&&Z.useLegacyForm||e!=null&&e.credential)N.fields.sort((z,L)=>(z.order=z.order||0,L.order=L.order||0,z.order-L.order));else{const z=[],L=[],j=[],v={};if(Z!=null&&Z.fieldRules){const T=[...Z.fieldRules.atLeastOneOf??[],...Z.fieldRules.onlyOneOf??[],...Z.fieldRules.mutuallyRequired??[]];if(Z.fieldRules.onlyOneOfMutuallyRequired)for(const _ of Z.fieldRules.onlyOneOfMutuallyRequired)T.push(..._);for(const _ of T)for(const $ of _)v[$.replace(/-/g,"_").replace(/\./g,"-")]=!1}for(const T of N.fields){if(T.pinned){z.push(T);continue}if(T.required||v[T.model]!==void 0){v[T.model]===!1&&(v[T.model]=!0),L.push(T);continue}j.push(T)}const U=Object.entries(v).filter(([,T])=>!T).map(([T])=>T.replace(/-/g,".").replace(/_/g,"-"));U.length>0&&console.warn(`Unknown checked fields for plugin ${q}: ${U.join(", ")}`);const K=[];z.length>0&&K.push({fields:z.sort(ds)}),(L.length>0||j.length>0)&&K.push({fields:L.sort(us),collapsible:{title:a("plugins.form.grouping.plugin_configuration.title"),description:a("plugins.form.grouping.plugin_configuration.description"),nestedCollapsible:{fields:j.sort(us),triggerLabel:{expand:a("plugins.form.grouping.advanced_parameters.view"),collapse:a("plugins.form.grouping.advanced_parameters.hide")}}},slots:{beforeContent:"plugin-config-before-content",emptyState:"plugin-config-empty-state"}}),N={groups:K}}return{schema:N,model:P,options:{noneSelectedText:"Nothing Selected...",helpAsHtml:!0}}},s=A=>Array.isArray(A.default)||A.default!=null&&typeof A.default!="object"&&A.default!=="function",c=(A,f,y,k,V,S)=>{const O=s(A);return k[f]=O?A.default:null,A.id=f,A.model=f,A.fields&&A.type==="record"?d(A,f,y,k,V,S):(y[f]=A,w(A,k),S&&S[f]&&u(y[f],S[f]),V.fields.push(A)),y},u=(A,f)=>(f&&(Object.assign(A,f),f.label&&(A.label=f.label)),A),d=(A,f,y,k,V,S)=>{A.fields.forEach(O=>{Object.keys(O).forEach(N=>{const P=O[N];y=c(P,f+"-"+N,y,k,V,S)})})},m=(A,f)=>{A.type="input",A.inputType="hidden",A.styleClasses="kong-form-hidden-field-wrapper";const y=e==null?void 0:e.entityId;f[A.model]=y?{id:y}:null},g=A=>{A.type="input",A.inputType="number",A.between&&A.between.length===2&&(A.min=A.between[0],A.max=A.between[1])},h=A=>{Object.prototype.hasOwnProperty.call(A,"one_of")?(A.type="select",A.values=A.one_of,A.selectOptions={hideNoneSelectedText:!0}):(A.type="input",A.inputType="text")},B=A=>{A.type="input",A.inputType="text",A.valueType="array",A.valueArrayType="string"},C=A=>{A.type="checkbox",A.default=!0,A.required=!1},b=A=>{if(A.type="object-advanced",A.values.type==="array"){const{type:f}=A.values.elements||{};A.schema={fields:[{schema:{fields:[{...Dn,model:A.model,valueArrayType:f==="integer"?"number":f||"string",inputAttributes:{...Dn.inputAttributes,type:f==="integer"?"number":"text",inputMode:f==="integer"?"numeric":"text"}}]}}]}}else A.values.fields&&(A.schema={fields:[{type:"object",model:"object",schema:{fields:A.values.fields.map(f=>{const y=Object.keys(f)[0];return{model:y,type:"input",label:n(y),placeholder:y,inputType:f[y].type}})}}]})},I=A=>A.fields.reduce((f,y)=>(y.fields&&y.fields.forEach(k=>{f[k.model]=k}),y.model&&(f[y.model]=y),f),{}),x=(A,f)=>{if(!ya.includes(A.model))return;const y=I(A);ya.forEach(k=>{Object.keys(y).forEach(V=>{const S=s(y[V]);f[V]=S?y[V].default:null}),delete f[k]})},E=(A,f)=>A.inputType==="hidden"?"":i(n(A.label||f.replace(/_/g," "))),w=(A,f)=>{switch(x(A,f),A.type){case"foreign":m(A,f);break;case"number":g(A),A.attributes={step:"any"};break;case"integer":g(A);break;case"string":h(A);break;case"set":B(A);break;case"boolean":C(A);break;case"map":b(A);break}A.inputType==="foreign"&&m(A,f),A.label=E(A,A.model)};return{buildFormSchema:c,parseSchema:l,customSchemas:o,typedefs:kn}}},He="/v2/control-planes/{controlPlaneId}/core-entities",Ne="/{workspace}",Se={list:{konnect:{all:`${He}/plugins`,forEntity:`${He}/{entityType}/{entityId}/plugins`},kongManager:{all:`${Ne}/plugins`,forEntity:`${Ne}/{entityType}/{entityId}/plugins`}},select:{konnect:{availablePlugins:`${He}/v1/available-plugins`},kongManager:{availablePlugins:`${Ne}/kong`,availablePluginsForOss:"/"}},form:{konnect:{create:{all:`${He}/plugins`,forEntity:`${He}/{entityType}/{entityId}/plugins`},edit:{all:`${He}/plugins/{id}`,forEntity:`${He}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/plugins/{plugin}",credential:{create:`${He}/{resourceEndpoint}`,edit:`${He}/{resourceEndpoint}/{id}`},credentialSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/{plugin}",validate:`${He}/v1/schemas/json/plugin/validate`,entityGetOne:`${He}/{entity}/{id}`,entityGetAll:`${He}/{entity}?size=1000`},kongManager:{create:{all:`${Ne}/plugins`,forEntity:`${Ne}/{entityType}/{entityId}/plugins`},edit:{all:`${Ne}/plugins/{id}`,forEntity:`${Ne}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:`${Ne}/schemas/plugins/{plugin}`,credential:{create:`${Ne}/{resourceEndpoint}`,edit:`${Ne}/{resourceEndpoint}/{id}`},credentialSchema:`${Ne}/schemas/{plugin}`,validate:`${Ne}/schemas/plugins/validate`,entityGetOne:`${Ne}/{entity}/{id}`,entityGetAll:`${Ne}/{entity}`}},item:{konnect:{all:`${He}/plugins/{id}`,forEntity:`${He}/{entityType}/{entityId}/plugins/{id}`},kongManager:{all:`${Ne}/plugins/{id}`,forEntity:`${Ne}/{entityType}/{entityId}/plugins/{id}`}}},lB={key:0},sB=t.defineComponent({__name:"PluginFieldRuleAlerts",props:{rules:{}},setup(e){const n=e,{formatPluginFieldLabel:i}=ye.usePluginHelpers(),{i18n:{t:a}}=ye.useI18n(),o=s=>s.map(c=>c.replace(/^[cC]onfig\./,"").split(".").map(u=>i(u)).join(".")).join(", "),r=(s,c)=>a(s,{parameters:o(c)}),l=t.computed(()=>{const s=[];if(n.rules.atLeastOneOf)for(const c of n.rules.atLeastOneOf)s.push(r("plugins.form.field_rules.at_least_one_of",c));if(n.rules.onlyOneOf)for(const c of n.rules.onlyOneOf)s.push(r("plugins.form.field_rules.only_one_of",c));if(n.rules.mutuallyRequired)for(const c of n.rules.mutuallyRequired)s.push(r("plugins.form.field_rules.mutually_required",c));return s});return(s,c)=>{const u=t.resolveComponent("KAlert");return t.openBlock(),t.createBlock(u,{class:"plugin-field-rule-alerts"},{default:t.withCtx(()=>[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(d,m)=>(t.openBlock(),t.createElementBlock("li",{key:`simple-alert-${m}`},t.toDisplayString(d),1))),128)),n.rules.onlyOneOfMutuallyRequired&&n.rules.onlyOneOfMutuallyRequired.length>0?(t.openBlock(),t.createElementBlock("li",lB,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.rules.onlyOneOfMutuallyRequired,(d,m)=>(t.openBlock(),t.createElementBlock("div",{key:`only-one-mutually-alert-${m}`},[t.createElementVNode("div",null,t.toDisplayString(t.unref(a)("plugins.form.field_rules.only_one_of_mutually_required")),1),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d,(g,h)=>(t.openBlock(),t.createElementBlock("li",{key:`only-one-mutually-alert-${m}-combination-${h}`},t.toDisplayString(o(g)),1))),128))])]))),128))])):t.createCommentVNode("",!0)])]),_:1})}}}),_e=(e,n)=>{const i=e.__vccOpts||e;for(const[a,o]of n)i[a]=o;return i},cB=_e(sB,[["__scopeId","data-v-d8eb79cf"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ps(e){return typeof e>"u"||e===null}function dB(e){return typeof e=="object"&&e!==null}function uB(e){return Array.isArray(e)?e:ps(e)?[]:[e]}function pB(e,n){var i,a,o,r;if(n)for(r=Object.keys(n),i=0,a=r.length;i<a;i+=1)o=r[i],e[o]=n[o];return e}function mB(e,n){var i="",a;for(a=0;a<n;a+=1)i+=e;return i}function gB(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var fB=ps,AB=dB,hB=uB,yB=mB,bB=gB,wB=pB,ba={isNothing:fB,isObject:AB,toArray:hB,repeat:yB,isNegativeZero:bB,extend:wB};function ms(e,n){var i="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`
90
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-plugins",
3
- "version": "8.4.1",
3
+ "version": "8.4.2",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-plugins.umd.js",
6
6
  "module": "./dist/entities-plugins.es.js",
@@ -57,12 +57,12 @@
57
57
  "dependencies": {
58
58
  "@kong/icons": "^1.15.1",
59
59
  "marked": "^12.0.2",
60
+ "@kong-ui-public/entities-consumers": "^3.3.14",
60
61
  "@kong-ui-public/entities-consumer-groups": "^3.3.14",
61
62
  "@kong-ui-public/entities-gateway-services": "^3.5.14",
62
- "@kong-ui-public/entities-consumers": "^3.3.14",
63
- "@kong-ui-public/entities-routes": "^3.4.15",
63
+ "@kong-ui-public/forms": "^4.1.0",
64
64
  "@kong-ui-public/entities-shared": "^3.6.0",
65
- "@kong-ui-public/forms": "^4.1.0"
65
+ "@kong-ui-public/entities-routes": "^3.4.15"
66
66
  },
67
67
  "scripts": {
68
68
  "dev": "cross-env USE_SANDBOX=true vite",