@kong-ui-public/entities-shared 3.73.8 → 3.73.9-pr.4150.42cdddd87.0

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.
@@ -0,0 +1 @@
1
+ "use strict";const U=require("axios"),c=require("vue"),M=require("@kong-ui-public/i18n"),oe=Symbol("PLUGIN_FORM_LAYOUT_STATE"),ie=Symbol("CONFIG_CARD_SHOW_SENSITIVE_FIELDS"),x=Symbol("DECK_COMMAND_EDITOR"),K="[entities-shared] DeckCommandEditor was not provided. Provide it via the `DECK_COMMAND_EDITOR_KEY` injection key or the `provideDeckCommandEditor` helper (see @kong-ui-public/entities-shared/deck-editor).",ce="50vh",le=2e5,Y={MANAGED_BY:"KM-3018-entity-managed-by"};function ue(){return{getAxiosInstance:(e={})=>{try{const a=c.inject("get-axios-instance",void 0);return typeof a=="function"?a(e):U.create({withCredentials:!0,timeout:3e4,...e})}catch(a){return console.warn("getAxiosInstance:",a.message||a),U.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{const a=e?.response?.headers||{};return a["x-trace-id"]||a["x-datadog-trace-id"]||""}}}function de(){return{debounce:(e,a)=>{let o;return(...t)=>{clearTimeout(o),o=window?.setTimeout(()=>{e(...t)},a)}}}}const L="khcp-user-table-preferences",J={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnVisibility:{}};function fe(){const e=o=>{if(typeof o=="string")try{return JSON.parse(o)}catch(t){console.error("useTablePreferences(tryParseJson)",t);return}},a=()=>{const o=e(localStorage.getItem(L));return!o||!Object.keys(o).length?new Map:new Map(Object.entries(o))};return{setTablePreferences:(o,t)=>{try{const s=a();s.set(o,t),localStorage.setItem(L,JSON.stringify(Object.fromEntries(s.entries())))}catch(s){console.error("useTablePreferences(setTablePreferences)",s)}},getTablePreferences:(o,t)=>a()?.get(o)||void 0||t||J,deleteAllTablePreferences:()=>{localStorage.removeItem(L)}}}function N(e={}){const{getAxiosInstance:a}=ue();return{axiosInstance:a(e)}}const pe={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},ge={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ye={actions:{viewConfiguration:"View configuration",hideConfiguration:"Hide configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON",terraform:"Terraform",deck:"decK"},errors:{edit:"The entity could not be edited at this time."}},me={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},he={title:"Configuration",actions:{copy:"Copy JSON",deck_customize:"Customize before copying to CLI",deck_customize_cancel:"Cancel",sensitive_fields:"Show sensitive fields",sensitive_fields_tooltip:"View masked sensitive data in your configurations if any field values have been redacted."},sections:{advanced:"Advanced",plugin:"Plugin specific configuration",policy:"Policy specific configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last updated",created_at_label:"Created",managed_by_label:"Managed By",tags_label:"Tags",link:"Link",partial_label:"Redis configuration"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{formatLabel:"Format:",entryTitle:"Entry {index}",structuredFormat:"Structured"}},be={learnMore:"Learn more",pricingTitle:"Pricing: "},ve={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},_e={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Ae={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ce={utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},Ie={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},ke={copy_url:"Copy URL"},we={hint:{konnect:"The {token} environment variable must be added first. See {link} for details.",kongManager:"If your Admin API is secured, set up authentication following {link}."},documentation:"the documentation",steps:{step_1:"Step 1: Export token",step_2:"Step 2: Apply configuration"},customization:{title:"Customize before copying to CLI",copy_pat:"Make sure to copy your personal access token now. You won't be able to see it again.",reuse_pat:"Use an existing PAT if you've already generated one.",generate_pat:"Generate PAT",footer_reminder:"Changes you make here won't affect your configuration. After you apply changes with decK in the CLI, refresh the page to view them.",secret_advise:"Command may contain sensitive values. Treat it as a secret."},copy_tooltip:"Copy"},Ee={body:"Want a ready-to-use CLI command? {cta} to view this configuration as a decK sync snippet you can copy directly.",cta:"Switch to decK format"},De={title:"Generate a Personal Access Token",description:"Personal access tokens are used to authenticate decK commands and Konnect API requests.",fields:{name:{label:"Name",placeholder:"Enter token name"},expiresAt:{label:"Expiration date",placeholder:"Select an expiration date",n_days:"{n} days"}},actions:{cancel:"Cancel",generate:"Generate",generating:"Generating…"}},Oe={dismissLabel:"Dismiss"},Le={rotateKey:"Rotate key",generateKey:"Generate key",placeholder:"Enter or generate a key",oneTimeHint:"The key is shown only once. Copy it now and store it securely.",copy:"Copy",showKey:"Show key",hideKey:"Hide key"},X={global:pe,deleteModal:ge,baseForm:ye,baseTable:me,baseConfigCard:he,emptyState:be,filter:ve,debouncedFilter:_e,errors:Ae,validationErrors:Ce,toggleModal:Ie,jsonCodeBlock:ke,deckCodeBlock:we,deckCallout:Ee,generatePatModal:De,onboardingCard:Oe,sensitiveInput:Le};function O(){const e=M.createI18n("en-us",X);return{i18n:e,i18nT:M.i18nTComponent(e)}}var C=(e=>(e[e.InitialLoad=0]="InitialLoad",e[e.Loading=1]="Loading",e[e.Idle=2]="Idle",e[e.NoResults=3]="NoResults",e[e.NoRecords=4]="NoRecords",e[e.Error=5]="Error",e))(C||{}),P=(e=>(e.CaCertificate="ca_certificate",e.Certificate="certificate",e.Consumer="consumer",e.ConsumerGroup="consumer_group",e.GatewayService="service",e.Key="key",e.KeySet="set",e.Plugin="plugin",e.Route="route",e.SNI="sni",e.Upstream="upstream",e.Target="target",e.Vault="vault",e.Partial="partial",e.CloudGatewayAddon="cloud_gateway_addon",e.BackendCluster="backend_cluster",e.VirtualCluster="virtual_cluster",e.Listener="listener",e.ProducePolicy="produce_policy",e.ConsumePolicy="consume_policy",e.ClusterPolicy="cluster_policy",e.ListenerPolicy="listener_policy",e.SchemaRegistry="schema_registry",e.StaticKey="static_key",e.TlsTrustBundle="tls_trust_bundle",e.AuthServer="auth_server",e.AuthServerScopes="auth_server_scopes",e.AuthServerClaims="auth_server_claims",e.AuthServerClients="auth_server_clients",e.Other="other",e.PluginSchema="plugin_schema",e.CustomPlugin="custom_plugin",e.ClonedPlugin="cloned_plugin",e))(P||{});const Te=Object.values(P),Q=["ca_certificate","certificate","consumer","consumer_group","service","key","set","plugin","plugin_schema","custom_plugin","cloned_plugin","route","upstream","target","vault","partial"];function F(e){return Q.includes(e)}const Me=["backend_cluster","virtual_cluster","listener","produce_policy","consume_policy","cluster_policy","listener_policy","schema_registry","static_key","tls_trust_bundle"],Re=["auth_server","auth_server_scopes","auth_server_claims","auth_server_clients"];var D=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.CopyBadge="copy-badge",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e.ManagedBy="managed-by",e))(D||{}),Z=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e.Policy="policy",e))(Z||{});const xe=["structured","yaml","json","terraform","deck"];function $(){const e=(i,r)=>r?.[i]??void 0,a=(i,r)=>{if(i.length!==r.length)return!1;const f=new Set([...i,...r]);for(const l of f){const p=i.filter(v=>v===l).length,m=r.filter(v=>v===l).length;if(p!==m)return!1}return!0},o=(i,r,f)=>{if(f){if(Object.keys(i).length===Object.keys(r).length)for(const l in i)if(Array.isArray(i[l])&&Array.isArray(r[l])){if(a(i[l],r[l]))continue;return!1}else{if(i[l]===r[l])continue;return!1}else return!1;return!0}try{return JSON.stringify(i)===JSON.stringify(r)}catch{return!1}},t=i=>(r,f)=>{let l=r[i]===void 0||r[i]===null?"":r[i],p=f[i]===void 0||f[i]===null?"":f[i];return Array.isArray(r[i])&&(l=r[i][0]),Array.isArray(f[i])&&(p=f[i][0]),l.localeCompare(p)},s=i=>i?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(i):!1,u="********",n=i=>!!i&&typeof i=="object"&&!Array.isArray(i),d=(i,r)=>i?.find(l=>Object.keys(l)?.[0]===r)?.[r],g=(i,r)=>{if(!r||i===null||i===void 0)return i;if(r.type==="string")return r.encrypted?u:i;if(r.type==="record"||r.type==="map"){if(!n(i))return i;if(r.type==="map"&&!r.values)return{...i};const f={};for(const l in i)if(r.type==="record"){const p=d(r.fields,l);f[l]=p?g(i[l],p):i[l]}else if(r.type==="map"){const p=r.values;f[l]=g(i[l],{...p,encrypted:!!(r.encrypted||p.encrypted)})}return f}if((r.type==="array"||r.type==="set")&&Array.isArray(i)){const f=r.elements;return f?i.map(l=>g(l,{...f,encrypted:!!(r.encrypted||f.encrypted)})):i.slice()}return i},h=(i,r)=>{if(Array.isArray(i))return i.map(l=>h(l,r));if(!n(i))return i;const f={};for(const l in i){if(r[l]?.type===D.Redacted){f[l]=u;continue}if(r[l]?.type===D.RedactedArray&&Array.isArray(i[l])){f[l]=i[l].map(()=>u);continue}f[l]=h(i[l],r)}return f};return{getPropValue:e,objectsAreEqual:o,sortAlpha:t,isValidUuid:s,isObjectRecord:n,getApiSchemaField:d,redactByApiSchema:g,redactByConfigSchema:h}}function Ke(e,a,o,t={fetchedItemsKey:"data",searchKeys:["id"]}){o||(o="1000");const{axiosInstance:s}=N(e.axiosRequestConfig),{i18n:{t:u}}=O(),{debounce:n}=de(),d=n(async y=>{await k(y)},200),g=c.ref(!1),h=c.ref(""),i=c.ref(""),r=c.ref([]),f=c.ref([]),l=c.ref(void 0),p=c.computed(()=>{let y=`${e.apiBaseUrl}${c.unref(a)}`;return e.app==="konnect"&&(y=y.replace(/{controlPlaneId}/gi,e?.controlPlaneId||"")),y.replace(/\/{workspace}/gi,e?.workspace?`/${e.workspace}`:"")}),{isValidUuid:m}=$(),v=async()=>{try{g.value=!0;const{data:y}=await s.get(`${p.value}?size=${o}`);y?.next||(l.value=t.fetchedItemsKey in y?y[t.fetchedItemsKey]:[]),f.value=t.fetchedItemsKey in y?y[t.fetchedItemsKey]:[],r.value=f.value}catch{r.value=[],h.value=u("debouncedFilter.errors.fetch")}finally{g.value=!1}},I=c.ref(""),k=async y=>{if(I.value!==y){if(I.value=y??"",!y){r.value=f.value;return}if(l.value===void 0)try{if(g.value=!0,h.value="",i.value="",e.app==="konnect"){const b=`${p.value}/${y}`,{data:_}=await s.get(`${b}?size=${o}`);t.fetchedItemsKey in _?r.value=_[t.fetchedItemsKey]:_?.[t.exactMatchKey??"id"]?r.value=[_]:r.value=[]}else{const b=[];m(y)&&t.searchKeys.includes("id")?b.push((async()=>{const{data:A}=await s.get(`${p.value}/${y}`);return[A[t.fetchedItemsKey]??A]})()):b.push(...t.searchKeys.filter(A=>A!=="id").map(async A=>{const{data:E}=await s.get(`${p.value}?${A}=${y}`);return E[t.fetchedItemsKey]}));const _=await Promise.all(b),w=new Set;r.value=[],_?.forEach?.(A=>{A?.forEach?.(E=>{w.has(E.id)||(w.add(E.id),r.value.push(E))})})}}catch(b){b?.response?.status===404?i.value=u("debouncedFilter.errors.invalid"):(r.value=[],h.value=u("debouncedFilter.errors.fetch"))}finally{g.value=!1}else g.value=!0,i.value="",r.value=l.value?.filter(b=>{let _=!1;for(const w of t.searchKeys)(typeof b[w]=="string"?b[w]?.toLowerCase():b[w])?.includes(y.toLowerCase())&&(_=!0);return _}),(!r.value||!r.value.length)&&(i.value=u("debouncedFilter.errors.invalid")),g.value=!1}};return{loading:g,error:h,validationError:i,results:r,allRecords:l,loadItems:v,debouncedQueryChange:d}}function Ne(e,a){const o=c.inject(x,null),t=c.computed(()=>{const n=c.toValue(e),d=n.app==="kongManager"||!!(n.app==="konnect"&&n.enableDeckConfig),g=c.toValue(a);return d&&g!==void 0&&F(g)}),s=c.computed(()=>{const n=c.toValue(e),d=n.app==="konnect"&&n.enableDeckConfig&&typeof n.enableDeckConfig!="boolean"?n.enableDeckConfig.customization:void 0;if(d&&!o){console.warn(K);return}return d}),u=c.computed(()=>{const n=c.toValue(e);return n.app==="konnect"&&n.enableDeckConfig&&typeof n.enableDeckConfig!="boolean"?n.enableDeckConfig.calloutPreferenceKey:n.app==="kongManager"?n.deckCalloutPreferenceKey:void 0});return{isDeckEnabled:t,deckCustomizationOptions:s,deckCalloutPreferenceKey:u}}function Pe(e,a){const o=c.inject(x,null),t=c.computed(()=>{const n=c.toValue(e);return(n.app==="kongManager"||!!(n.app==="konnect"&&n.enableDeckTab))&&F(c.toValue(a))}),s=c.computed(()=>{const n=c.toValue(e),d=n.app==="konnect"&&n.enableDeckTab&&typeof n.enableDeckTab!="boolean"?n.enableDeckTab.customization:void 0;if(d&&!o){console.warn(K);return}return d}),u=c.computed(()=>{const n=c.toValue(e);return n.app==="konnect"&&n.enableDeckTab&&typeof n.enableDeckTab!="boolean"?n.enableDeckTab.calloutPreferenceKey:n.app==="kongManager"?n.deckCalloutPreferenceKey:void 0});return{isDeckEnabled:t,deckCustomizationOptions:s,deckCalloutPreferenceKey:u}}function Fe(e,a){const o=c.unref(a),t=c.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${o}`):new URL(o));return t.value.search="",s=>`${t.value.href}/${s}`}function $e(){const{i18n:{t:e}}=O();return{getErrorFieldsFromError:t=>{if(!t)return{messages:[e("errors.unexpected")],fields:[]};if(t?.response?.status===401)return{messages:[],fields:[]};let s=[e("errors.unexpected")];const u=[];if(t?.response?.data){if(t.response.data.details?.length)return s=[],t.response.data.details.forEach(n=>{let d=e("errors.unexpected");n.messages&&Array.isArray(n.messages)&&n.messages.length&&(d=n.messages.join(", ")),n.field&&u.push({field:n.field,message:d}),s.push(`${n.field??""} ${d}`)}),{messages:s,fields:u};if(t.response.data.message&&Array.isArray(t.response.data.message))return s=[],t.response.data.message.forEach(n=>{if(n?.constraints){const d=Object.values(n.constraints).join(", ");s.push(d),n.property&&u.push({field:n.property,message:d})}else n?.property&&n?.message?(u.push({field:n.property,message:n.message}),s.push(n.message)):s.push(n)}),{messages:s,fields:u};if(typeof t.response.data.message=="string"||typeof t.response.data=="string")return{messages:[t.response.data.message],fields:[]};if(typeof t.response.data=="object")return s=[],Object.keys(t.response.data).forEach(n=>{u.push({field:n,message:t.response.data[n]}),s.push(t.response.data[n])}),{messages:s,fields:u}}return{messages:[t.message||e("errors.unexpected")],fields:[]}},getMessageFromError:t=>{if(!t)return e("errors.unexpected");if(t?.response?.status===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if(t?.response?.data){if(t.response.data.detail)return t.response.data.detail;if(t.response.data.details?.length)return t.response.data.details.map(s=>{let u=e("errors.unexpected");return s.messages&&typeof s.messages=="object"&&s.messages.length&&(u=s.messages.join(", ")),s.field?`${s.field} - ${u}`:u}).join("; ");if(t.response.data.message){const{message:s}=t.response.data;return Array.isArray(s)?s[0]?.constraints?Object.values(s[0].constraints)[0]:s[0]:s}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(s=>`${s} ${t.response.data[s]}`).join(", ")}return t.message||e("errors.unexpected")}}}function Be(e){const a=window.location.origin,o=a.endsWith("/")?a:`${a}/`;try{const t=e.join("/"),s=`${o}${t}`,u=e.some(d=>d.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(s)&&!u&&new URL(s))return`${o}${t}`;throw new Error("Invalid url")}catch(t){return console.warn("Failed to build valid URL:",t),""}}function q(e,a){const o=c.computed(()=>{const s=c.toValue(e);return typeof s.isExactMatch=="boolean"?s.isExactMatch:s.app==="konnect"}),t=c.computed(()=>{const s=c.toValue(a);return s.startsWith("/")?new URL(`${window.location.origin}${s}`):new URL(s)});return s=>{const{page:u,pageSize:n,offset:d,sortColumnKey:g,sortColumnOrder:h,query:i}=s;try{let r=new URL(t.value.href);if(o.value&&i){const f=new URLSearchParams(t.value.search);r.search="",r=c.toValue(e).isExactMatch?new URL(`${r.href}/${i}`):new URL(`${r.href}?filter[name][contains]=${i}`),f.forEach((l,p)=>r.searchParams.append(p,l))}else o.value||new URLSearchParams(i).forEach((f,l)=>{r.searchParams.append(l,f)}),g&&r.searchParams.append("sort_by",g),h==="desc"&&r.searchParams.append("sort_desc","1"),r.searchParams.append("size",String(n));return d&&u!==1&&r.searchParams.append("offset",String(d)),r.href}catch(r){return console.error("RouteList(fetcher)",r),c.toValue(a)}}}const j=new Map;function Ue(e,a,o){const t=c.ref(!0),s=c.toValue(e),{axiosInstance:u}=N(s.axiosRequestConfig),n=q(e,a),d=c.ref({status:C.Idle}),g=async r=>{const f=c.toValue(o)||"data";try{d.value=t.value?{status:C.InitialLoad}:{status:C.Loading},t.value=!1;const l=je(n(r),r),p=await u.get(l);if(p.status>=400)throw p;const m=p.data,v=f&&f.replace(/[^\w-_]/gi,"");let I;m[v]?I=Array.isArray(m[v])?m[v]:[m[v]]:Array.isArray(m)?I=m:I=Object.keys(m).length?[m]:[];const k={data:I,total:I.length,...m.offset?{pagination:{offset:m.offset}}:null};return k.data.length===0&&!r.query?d.value={status:C.NoRecords,response:k}:d.value={status:C.Idle,response:k},k}catch(l){const p={data:[],total:0};return r.query&&(l.response?.status===404||l.status===404)?(d.value={status:C.NoResults,response:p,error:l.response?l:{response:l}},p):(d.value={status:C.Error,response:p,error:l.response?l:{response:l}},p)}},h=s.cacheIdentifier,i=ee(h);return{fetcher:g,fetcherState:d,fetcherCacheKey:i}}function je(e,{pageSize:a,page:o}){if(!e.includes("filter[name]"))return e;let t;try{t=new URL(e,window.location.origin)}catch{return e}return t.pathname.endsWith("/search")?t.searchParams.has("size")||a===void 0?e:`${e}&size=${a}`:`${e}&page[size]=${a}&page[number]=${o}`}function ee(e){if(e){let a=j.get(e);return a||(a=c.ref(1),j.set(e,a)),a}return c.ref(1)}function Ge(){const e=(t,s="_")=>t?t.split(s).map(u=>u.toLowerCase()==="id"?u.toUpperCase():u.charAt(0).toUpperCase()+u.substring(1)).join(" "):"",a=/(?:^|[\s-:'"])\w/g;return{capitalize:t=>t?t.replace(a,s=>s.toUpperCase()):"",convertKeyToTitle:e}}const te=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,G=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const a=e.match(te);if(!a)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return a.shift(),a},V=e=>e==="*"||e==="x"||e==="X",S=e=>{const a=parseInt(e,10);return isNaN(a)?e:a},Ve=(e,a)=>typeof e!=typeof a?[String(e),String(a)]:[e,a],Se=(e,a)=>{if(V(e)||V(a))return 0;const[o,t]=Ve(S(e),S(a));return o>t?1:o<t?-1:0},H=(e,a)=>{for(let o=0;o<Math.max(e.length,a.length);o++){const t=Se(e[o]||"0",a[o]||"0");if(t!==0)return t}return 0},He=(e,a)=>{const o=G(e),t=G(a),s=o.pop(),u=t.pop(),n=H(o,t);return n!==0?n:s&&u?H(s.split("."),u.split(".")):s||u?s?-1:1:0},z=(e,a,o)=>{ze(o);const t=He(e,a);return ae[o].includes(t)},ae={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},W=Object.keys(ae),ze=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(W.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${W.join("|")}`)},We=e=>typeof e=="string"&&/^[v\d]/.test(e)&&te.test(e);function Ye(e){const{gatewayInfo:a,supportedRange:o}=e;if(!a)return!0;const{edition:t,version:s}=a;if(!We(s))return console.error("Invalid version"),!1;const u=o[t];if(!u)return!1;const[n,d]=u;return!(n&&z(s,n,"<")||d&&z(s,d,">"))}function Je(e){const a=c.ref(0),o=c.ref(0),t=c.ref(!1);return c.watch(e,u=>{u&&!t.value&&(a.value=u.offsetWidth,o.value=u.scrollWidth,t.value=!0)}),{isTruncated:c.computed(()=>a.value<o.value)}}function Xe(){const{i18n:{t:e}}=O();return{utf8Name:o=>/^[\p{N}\p{L}.\-_~]*$/u.test(o)?"":e("validationErrors.utf8Name")}}const B=Symbol("schema"),Qe=e=>{c.provide(B,e)},ne=()=>c.inject(B,void 0),Ze=e=>/^\d+$/.test(e),qe=e=>{const a=ne(),o=c.computed(()=>{const t=a?.value,s=e();if((t?.type==="array"||t?.type==="set")&&Ze(s)){const n=t.elements;return n&&{...n,encrypted:!!(t.encrypted||n.encrypted)}}return t?.fields?.find(n=>Object.keys(n)[0]===s)?.[s]});return c.provide(B,o),o};function et(e){let a="";const o=c.ref(!1),t=c.ref(null),s=c.computed(()=>{let n;return o.value?n=!0:t.value?n=t.value.hasData||e&&c.toValue(e):n=!1,!n});return{tableState:t,hasRecords:o,hideTableToolbar:s,handleStateChange:n=>{n.hasData?o.value=!0:n.state==="success"&&!n.hasData&&(!e||!a)&&(o.value=!1),e&&(a=c.toValue(e)),t.value={...n}}}}function se(){const e=c.inject(Y.MANAGED_BY,!1);return c.computed(()=>!!c.toValue(e))}const tt=e=>e?.service||e?.tool||null,at="Custom",R={"terraform-provider-konnect":"Terraform",deck:"decK","kong-gateway-operator":"Kong Gateway Operator",kongctl:"kongctl","kong-ingress-controller":"Kong Ingress Controller","gw-manager":"Konnect UI","ai-manager":"AI Manager","dev-portal":"Dev Portal"},nt=e=>{const a=tt(e);return a?Object.hasOwn(R,a)?R[a]:at:null};let T;const re=()=>(T===void 0&&(T=M.createI18n("en-us",X).t("baseConfigCard.commonFields.managed_by_label")),T);function st(e,a={}){const o=se();return{defaultTablePreferences:{columnVisibility:{managed_by:!1,...a}},tableHeaders:c.computed(()=>({...c.toValue(e),...o.value?{managed_by:{label:re(),sortable:!1}}:{}}))}}const rt={useAxios:N,useDebouncedFilter:Ke,useDeleteUrlBuilder:Fe,useBaseEntityDeckOptions:Ne,useBaseFormDeckOptions:Pe,useErrors:$e,useExternalLinkCreator:Be,useFetcher:Ue,useFetcherCacheKey:ee,useFetchUrlBuilder:q,useHelpers:$,useStringHelpers:Ge,useI18n:O,useGatewayFeatureSupported:Ye,useTruncationDetector:Je,useValidators:Xe,useSchema:ne,useSchemaProvider:Qe,useSubSchema:qe,useTableState:et,useManagedByEnabled:se,useManagedByColumn:st},ot=(e,a)=>{const o=e.__vccOpts||e;for(const[t,s]of a)o[t]=s;return o};exports.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT=ce;exports.CONFIG_CARD_FORMATS=xe;exports.CONFIG_CARD_SHOW_SENSITIVE_FIELDS=ie;exports.ConfigurationSchemaSection=Z;exports.ConfigurationSchemaType=D;exports.DECK_COMMAND_EDITOR_KEY=x;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=K;exports.ENTITIES_FEATURE_FLAGS=Y;exports.EventGatewayTypesArray=Me;exports.FetcherStatus=C;exports.IdentityTypesArray=Re;exports.MANAGED_BY_LABELS=R;exports.PLUGIN_FORM_LAYOUT_STATE=oe;exports.SHIKI_MAX_HIGHLIGHT_LENGTH=le;exports.SupportedEntityDeckArray=Q;exports.SupportedEntityType=P;exports.SupportedEntityTypesArray=Te;exports._export_sfc=ot;exports.composables=rt;exports.de=fe;exports.getManagedByFieldLabel=re;exports.getManagedByLabel=nt;exports.isSupportedDeckEntityType=F;exports.ne=J;exports.useHelpers=$;
@@ -1,7 +1,7 @@
1
1
  import N from "axios";
2
- import { inject as O, ref as y, computed as h, unref as S, toValue as m, watch as oe, provide as H } from "vue";
3
- import { createI18n as W, i18nTComponent as ie } from "@kong-ui-public/i18n";
4
- const nt = /* @__PURE__ */ Symbol("PLUGIN_FORM_LAYOUT_STATE"), rt = /* @__PURE__ */ Symbol("CONFIG_CARD_SHOW_SENSITIVE_FIELDS"), Y = /* @__PURE__ */ Symbol("DECK_COMMAND_EDITOR"), J = "[entities-shared] DeckCommandEditor was not provided. Provide it via the `DECK_COMMAND_EDITOR_KEY` injection key or the `provideDeckCommandEditor` helper (see @kong-ui-public/entities-shared/deck-editor).", ot = "50vh", it = 2e5, ce = {
2
+ import { inject as L, ref as y, computed as h, unref as H, toValue as m, watch as oe, provide as W } from "vue";
3
+ import { createI18n as S, i18nTComponent as ie } from "@kong-ui-public/i18n";
4
+ const rt = /* @__PURE__ */ Symbol("PLUGIN_FORM_LAYOUT_STATE"), ot = /* @__PURE__ */ Symbol("CONFIG_CARD_SHOW_SENSITIVE_FIELDS"), Y = /* @__PURE__ */ Symbol("DECK_COMMAND_EDITOR"), J = "[entities-shared] DeckCommandEditor was not provided. Provide it via the `DECK_COMMAND_EDITOR_KEY` injection key or the `provideDeckCommandEditor` helper (see @kong-ui-public/entities-shared/deck-editor).", it = "50vh", ct = 2e5, ce = {
5
5
  /** Surfaces the `managed_by` ownership field in entity lists and detail cards. */
6
6
  MANAGED_BY: "KM-3018-entity-managed-by"
7
7
  };
@@ -9,14 +9,14 @@ function le() {
9
9
  return {
10
10
  getAxiosInstance: (e = {}) => {
11
11
  try {
12
- const n = O("get-axios-instance", void 0);
13
- return typeof n == "function" ? n(e) : N.create({
12
+ const s = L("get-axios-instance", void 0);
13
+ return typeof s == "function" ? s(e) : N.create({
14
14
  withCredentials: !0,
15
15
  timeout: 3e4,
16
16
  ...e
17
17
  });
18
- } catch (n) {
19
- return console.warn("getAxiosInstance:", n.message || n), N.create({
18
+ } catch (s) {
19
+ return console.warn("getAxiosInstance:", s.message || s), N.create({
20
20
  withCredentials: !0,
21
21
  timeout: 3e4,
22
22
  ...e
@@ -24,19 +24,19 @@ function le() {
24
24
  }
25
25
  },
26
26
  getTraceIdFromError: (e) => {
27
- const n = e?.response?.headers || {};
28
- return n["x-trace-id"] || n["x-datadog-trace-id"] || "";
27
+ const s = e?.response?.headers || {};
28
+ return s["x-trace-id"] || s["x-datadog-trace-id"] || "";
29
29
  }
30
30
  };
31
31
  }
32
32
  function ue() {
33
33
  return {
34
- debounce: (e, n) => {
34
+ debounce: (e, s) => {
35
35
  let o;
36
36
  return (...t) => {
37
37
  clearTimeout(o), o = window?.setTimeout(() => {
38
38
  e(...t);
39
- }, n);
39
+ }, s);
40
40
  };
41
41
  }
42
42
  };
@@ -47,7 +47,7 @@ const K = "khcp-user-table-preferences", de = {
47
47
  sortColumnOrder: void 0,
48
48
  columnVisibility: {}
49
49
  };
50
- function ct() {
50
+ function lt() {
51
51
  const e = (o) => {
52
52
  if (typeof o == "string")
53
53
  try {
@@ -56,29 +56,29 @@ function ct() {
56
56
  console.error("useTablePreferences(tryParseJson)", t);
57
57
  return;
58
58
  }
59
- }, n = () => {
59
+ }, s = () => {
60
60
  const o = e(localStorage.getItem(K));
61
61
  return !o || !Object.keys(o).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(o));
62
62
  };
63
63
  return {
64
64
  setTablePreferences: (o, t) => {
65
65
  try {
66
- const a = n();
67
- a.set(o, t), localStorage.setItem(K, JSON.stringify(Object.fromEntries(a.entries())));
68
- } catch (a) {
69
- console.error("useTablePreferences(setTablePreferences)", a);
66
+ const n = s();
67
+ n.set(o, t), localStorage.setItem(K, JSON.stringify(Object.fromEntries(n.entries())));
68
+ } catch (n) {
69
+ console.error("useTablePreferences(setTablePreferences)", n);
70
70
  }
71
71
  },
72
- getTablePreferences: (o, t) => n()?.get(o) || void 0 || t || de,
72
+ getTablePreferences: (o, t) => s()?.get(o) || void 0 || t || de,
73
73
  deleteAllTablePreferences: () => {
74
74
  localStorage.removeItem(K);
75
75
  }
76
76
  };
77
77
  }
78
78
  function P(e = {}) {
79
- const { getAxiosInstance: n } = le();
79
+ const { getAxiosInstance: s } = le();
80
80
  return {
81
- axiosInstance: n(e)
81
+ axiosInstance: s(e)
82
82
  };
83
83
  }
84
84
  const fe = { actions: { copyId: "Copy ID", copied_id: 'Copied "{id}" to the clipboard', copyToClipboard: "Copied successfully!", copyToClipboardFailed: "Failed to copy to the clipboard" } }, pe = { message: "Are you sure you want to delete this {entityType}?", messageWithName: "Are you sure you want to delete this {entityType} {entityName}?" }, ge = { actions: { viewConfiguration: "View configuration", hideConfiguration: "Hide configuration", save: "Save", cancel: "Cancel", back: "Back" }, configuration: { title: "Configuration", message: "Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.", yaml: "YAML", json: "JSON", terraform: "Terraform", deck: "decK" }, errors: { edit: "The entity could not be edited at this time." } }, me = { emptyState: { noSearchResultsTitle: "No results found", noSearchResultsMessage: "Please adjust the criteria and try again.", noSearchResultsCtaText: "Clear" } }, ye = { title: "Configuration", actions: { copy: "Copy JSON", deck_customize: "Customize before copying to CLI", deck_customize_cancel: "Cancel", sensitive_fields: "Show sensitive fields", sensitive_fields_tooltip: "View masked sensitive data in your configurations if any field values have been redacted." }, sections: { advanced: "Advanced", plugin: "Plugin specific configuration", policy: "Policy specific configuration" }, commonFields: { id_label: "ID", name_label: "Name", enabled_label: "Enabled", enabled_tooltip: "Enabled is FTW", updated_at_label: "Last updated", created_at_label: "Created", managed_by_label: "Managed By", tags_label: "Tags", link: "Link", partial_label: "Redis configuration" }, statusBadge: { enabledLabel: "Enabled", disabledLabel: "Disabled" }, copy: { tooltip: "Copy {label}", success: "Copied!" }, errors: { load: "The entity configuration data could not be loaded at this time.", copy: "Failed to copy to clipboard" }, general: { formatLabel: "Format:", entryTitle: "Entry {index}", structuredFormat: "Structured" } }, he = { learnMore: "Learn more", pricingTitle: "Pricing: " }, be = { filterButtonText: "Filter", fieldLabel: "Filter by:", inputPlaceholder: "Enter a value", selectPlaceholder: "Select an item", applyButtonText: "Apply", clearButtonText: "Clear", clearAllButtonText: "Clear all filters" }, ve = { errors: { fetch: "Could not fetch available items", invalid: "Please select a valid value" } }, _e = { unexpected: "An unexpected error has occurred", dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.' }, Ae = { utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces." }, Ce = { enable: { title: "Enable {entityType}", message: "Are you sure you want to enable the {entityType} {entityName}?", confirmText: "Yes, enable" }, disable: { title: "Disable {entityType}", message: "Are you sure you want to disable the {entityType} {entityName}?", confirmText: "Yes, disable" } }, ke = { copy_url: "Copy URL" }, we = { hint: { konnect: "The {token} environment variable must be added first. See {link} for details.", kongManager: "If your Admin API is secured, set up authentication following {link}." }, documentation: "the documentation", steps: { step_1: "Step 1: Export token", step_2: "Step 2: Apply configuration" }, customization: { title: "Customize before copying to CLI", copy_pat: "Make sure to copy your personal access token now. You won't be able to see it again.", reuse_pat: "Use an existing PAT if you've already generated one.", generate_pat: "Generate PAT", footer_reminder: "Changes you make here won't affect your configuration. After you apply changes with decK in the CLI, refresh the page to view them.", secret_advise: "Command may contain sensitive values. Treat it as a secret." }, copy_tooltip: "Copy" }, Ie = { body: "Want a ready-to-use CLI command? {cta} to view this configuration as a decK sync snippet you can copy directly.", cta: "Switch to decK format" }, xe = { title: "Generate a Personal Access Token", description: "Personal access tokens are used to authenticate decK commands and Konnect API requests.", fields: { name: { label: "Name", placeholder: "Enter token name" }, expiresAt: { label: "Expiration date", placeholder: "Select an expiration date", n_days: "{n} days" } }, actions: { cancel: "Cancel", generate: "Generate", generating: "Generating…" } }, Ee = { dismissLabel: "Dismiss" }, De = { rotateKey: "Rotate key", generateKey: "Generate key", placeholder: "Enter or generate a key", oneTimeHint: "The key is shown only once. Copy it now and store it securely.", copy: "Copy", showKey: "Show key", hideKey: "Hide key" }, Q = {
@@ -100,8 +100,8 @@ const fe = { actions: { copyId: "Copy ID", copied_id: 'Copied "{id}" to the clip
100
100
  onboardingCard: Ee,
101
101
  sensitiveInput: De
102
102
  };
103
- function L() {
104
- const e = W("en-us", Q);
103
+ function O() {
104
+ const e = S("en-us", Q);
105
105
  return {
106
106
  i18n: e,
107
107
  i18nT: ie(e)
@@ -109,7 +109,7 @@ function L() {
109
109
  };
110
110
  }
111
111
  var I = /* @__PURE__ */ ((e) => (e[e.InitialLoad = 0] = "InitialLoad", e[e.Loading = 1] = "Loading", e[e.Idle = 2] = "Idle", e[e.NoResults = 3] = "NoResults", e[e.NoRecords = 4] = "NoRecords", e[e.Error = 5] = "Error", e))(I || {}), X = /* @__PURE__ */ ((e) => (e.CaCertificate = "ca_certificate", e.Certificate = "certificate", e.Consumer = "consumer", e.ConsumerGroup = "consumer_group", e.GatewayService = "service", e.Key = "key", e.KeySet = "set", e.Plugin = "plugin", e.Route = "route", e.SNI = "sni", e.Upstream = "upstream", e.Target = "target", e.Vault = "vault", e.Partial = "partial", e.CloudGatewayAddon = "cloud_gateway_addon", e.BackendCluster = "backend_cluster", e.VirtualCluster = "virtual_cluster", e.Listener = "listener", e.ProducePolicy = "produce_policy", e.ConsumePolicy = "consume_policy", e.ClusterPolicy = "cluster_policy", e.ListenerPolicy = "listener_policy", e.SchemaRegistry = "schema_registry", e.StaticKey = "static_key", e.TlsTrustBundle = "tls_trust_bundle", e.AuthServer = "auth_server", e.AuthServerScopes = "auth_server_scopes", e.AuthServerClaims = "auth_server_claims", e.AuthServerClients = "auth_server_clients", e.Other = "other", e.PluginSchema = "plugin_schema", e.CustomPlugin = "custom_plugin", e.ClonedPlugin = "cloned_plugin", e))(X || {});
112
- const lt = Object.values(X), Oe = [
112
+ const ut = Object.values(X), Le = [
113
113
  "ca_certificate",
114
114
  "certificate",
115
115
  "consumer",
@@ -129,13 +129,13 @@ const lt = Object.values(X), Oe = [
129
129
  /* Partial */
130
130
  ];
131
131
  function Z(e) {
132
- return Oe.includes(e);
132
+ return Le.includes(e);
133
133
  }
134
- const ut = ["backend_cluster", "virtual_cluster", "listener", "produce_policy", "consume_policy", "cluster_policy", "listener_policy", "schema_registry", "static_key", "tls_trust_bundle"], dt = ["auth_server", "auth_server_scopes", "auth_server_claims", "auth_server_clients"];
135
- var R = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e.ManagedBy = "managed-by", e))(R || {}), Le = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e.Policy = "policy", e))(Le || {});
136
- const ft = ["structured", "yaml", "json", "terraform", "deck"];
134
+ const dt = ["backend_cluster", "virtual_cluster", "listener", "produce_policy", "consume_policy", "cluster_policy", "listener_policy", "schema_registry", "static_key", "tls_trust_bundle"], ft = ["auth_server", "auth_server_scopes", "auth_server_claims", "auth_server_clients"];
135
+ var R = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e.ManagedBy = "managed-by", e))(R || {}), Oe = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e.Policy = "policy", e))(Oe || {});
136
+ const pt = ["structured", "yaml", "json", "terraform", "deck"];
137
137
  function q() {
138
- const e = (i, r) => r?.[i] ?? void 0, n = (i, r) => {
138
+ const e = (i, r) => r?.[i] ?? void 0, s = (i, r) => {
139
139
  if (i.length !== r.length) return !1;
140
140
  const d = /* @__PURE__ */ new Set([...i, ...r]);
141
141
  for (const c of d) {
@@ -148,7 +148,7 @@ function q() {
148
148
  if (Object.keys(i).length === Object.keys(r).length)
149
149
  for (const c in i)
150
150
  if (Array.isArray(i[c]) && Array.isArray(r[c])) {
151
- if (n(i[c], r[c]))
151
+ if (s(i[c], r[c]))
152
152
  continue;
153
153
  return !1;
154
154
  } else {
@@ -168,13 +168,13 @@ function q() {
168
168
  }, t = (i) => (r, d) => {
169
169
  let c = r[i] === void 0 || r[i] === null ? "" : r[i], f = d[i] === void 0 || d[i] === null ? "" : d[i];
170
170
  return Array.isArray(r[i]) && (c = r[i][0]), Array.isArray(d[i]) && (f = d[i][0]), c.localeCompare(f);
171
- }, a = (i) => i ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(i) : !1, l = "********", s = (i) => !!i && typeof i == "object" && !Array.isArray(i), u = (i, r) => i?.find((c) => Object.keys(c)?.[0] === r)?.[r], p = (i, r) => {
171
+ }, n = (i) => i ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(i) : !1, l = "********", a = (i) => !!i && typeof i == "object" && !Array.isArray(i), u = (i, r) => i?.find((c) => Object.keys(c)?.[0] === r)?.[r], p = (i, r) => {
172
172
  if (!r || i === null || i === void 0)
173
173
  return i;
174
174
  if (r.type === "string")
175
175
  return r.encrypted ? l : i;
176
176
  if (r.type === "record" || r.type === "map") {
177
- if (!s(i))
177
+ if (!a(i))
178
178
  return i;
179
179
  if (r.type === "map" && !r.values)
180
180
  return { ...i };
@@ -204,7 +204,7 @@ function q() {
204
204
  }, v = (i, r) => {
205
205
  if (Array.isArray(i))
206
206
  return i.map((c) => v(c, r));
207
- if (!s(i))
207
+ if (!a(i))
208
208
  return i;
209
209
  const d = {};
210
210
  for (const c in i) {
@@ -224,27 +224,27 @@ function q() {
224
224
  getPropValue: e,
225
225
  objectsAreEqual: o,
226
226
  sortAlpha: t,
227
- isValidUuid: a,
228
- isObjectRecord: s,
227
+ isValidUuid: n,
228
+ isObjectRecord: a,
229
229
  getApiSchemaField: u,
230
230
  redactByApiSchema: p,
231
231
  redactByConfigSchema: v
232
232
  };
233
233
  }
234
- function Ke(e, n, o, t = {
234
+ function Ke(e, s, o, t = {
235
235
  fetchedItemsKey: "data",
236
236
  searchKeys: ["id"]
237
237
  }) {
238
238
  o || (o = "1000");
239
- const { axiosInstance: a } = P(e.axiosRequestConfig), { i18n: { t: l } } = L(), { debounce: s } = ue(), u = s(async (g) => {
239
+ const { axiosInstance: n } = P(e.axiosRequestConfig), { i18n: { t: l } } = O(), { debounce: a } = ue(), u = a(async (g) => {
240
240
  await x(g);
241
241
  }, 200), p = y(!1), v = y(""), i = y(""), r = y([]), d = y([]), c = y(void 0), f = h(() => {
242
- let g = `${e.apiBaseUrl}${S(n)}`;
242
+ let g = `${e.apiBaseUrl}${H(s)}`;
243
243
  return e.app === "konnect" && (g = g.replace(/{controlPlaneId}/gi, e?.controlPlaneId || "")), g.replace(/\/{workspace}/gi, e?.workspace ? `/${e.workspace}` : "");
244
244
  }), { isValidUuid: b } = q(), A = async () => {
245
245
  try {
246
246
  p.value = !0;
247
- const { data: g } = await a.get(`${f.value}?size=${o}`);
247
+ const { data: g } = await n.get(`${f.value}?size=${o}`);
248
248
  g?.next || (c.value = t.fetchedItemsKey in g ? g[t.fetchedItemsKey] : []), d.value = t.fetchedItemsKey in g ? g[t.fetchedItemsKey] : [], r.value = d.value;
249
249
  } catch {
250
250
  r.value = [], v.value = l("debouncedFilter.errors.fetch");
@@ -260,16 +260,16 @@ function Ke(e, n, o, t = {
260
260
  if (c.value === void 0)
261
261
  try {
262
262
  if (p.value = !0, v.value = "", i.value = "", e.app === "konnect") {
263
- const _ = `${f.value}/${g}`, { data: C } = await a.get(`${_}?size=${o}`);
263
+ const _ = `${f.value}/${g}`, { data: C } = await n.get(`${_}?size=${o}`);
264
264
  t.fetchedItemsKey in C ? r.value = C[t.fetchedItemsKey] : C?.[t.exactMatchKey ?? "id"] ? r.value = [C] : r.value = [];
265
265
  } else {
266
266
  const _ = [];
267
267
  b(g) && t.searchKeys.includes("id") ? _.push((async () => {
268
- const { data: k } = await a.get(`${f.value}/${g}`);
268
+ const { data: k } = await n.get(`${f.value}/${g}`);
269
269
  return [k[t.fetchedItemsKey] ?? k];
270
270
  })()) : _.push(
271
271
  ...t.searchKeys.filter((k) => k !== "id").map(async (k) => {
272
- const { data: D } = await a.get(`${f.value}?${k}=${g}`);
272
+ const { data: D } = await n.get(`${f.value}?${k}=${g}`);
273
273
  return D[t.fetchedItemsKey];
274
274
  })
275
275
  );
@@ -304,56 +304,56 @@ function Ke(e, n, o, t = {
304
304
  debouncedQueryChange: u
305
305
  };
306
306
  }
307
- function Me(e, n) {
308
- const o = O(Y, null), t = h(() => {
309
- const s = m(e), u = s.app === "kongManager" || !!(s.app === "konnect" && s.enableDeckConfig), p = m(n);
307
+ function Me(e, s) {
308
+ const o = L(Y, null), t = h(() => {
309
+ const a = m(e), u = a.app === "kongManager" || !!(a.app === "konnect" && a.enableDeckConfig), p = m(s);
310
310
  return u && p !== void 0 && Z(p);
311
- }), a = h(() => {
312
- const s = m(e), u = s.app === "konnect" && s.enableDeckConfig && typeof s.enableDeckConfig != "boolean" ? s.enableDeckConfig.customization : void 0;
311
+ }), n = h(() => {
312
+ const a = m(e), u = a.app === "konnect" && a.enableDeckConfig && typeof a.enableDeckConfig != "boolean" ? a.enableDeckConfig.customization : void 0;
313
313
  if (u && !o) {
314
314
  console.warn(J);
315
315
  return;
316
316
  }
317
317
  return u;
318
318
  }), l = h(() => {
319
- const s = m(e);
320
- return s.app === "konnect" && s.enableDeckConfig && typeof s.enableDeckConfig != "boolean" ? s.enableDeckConfig.calloutPreferenceKey : s.app === "kongManager" ? s.deckCalloutPreferenceKey : void 0;
319
+ const a = m(e);
320
+ return a.app === "konnect" && a.enableDeckConfig && typeof a.enableDeckConfig != "boolean" ? a.enableDeckConfig.calloutPreferenceKey : a.app === "kongManager" ? a.deckCalloutPreferenceKey : void 0;
321
321
  });
322
322
  return {
323
323
  isDeckEnabled: t,
324
- deckCustomizationOptions: a,
324
+ deckCustomizationOptions: n,
325
325
  deckCalloutPreferenceKey: l
326
326
  };
327
327
  }
328
- function Re(e, n) {
329
- const o = O(Y, null), t = h(() => {
330
- const s = m(e);
331
- return (s.app === "kongManager" || !!(s.app === "konnect" && s.enableDeckTab)) && Z(m(n));
332
- }), a = h(() => {
333
- const s = m(e), u = s.app === "konnect" && s.enableDeckTab && typeof s.enableDeckTab != "boolean" ? s.enableDeckTab.customization : void 0;
328
+ function Re(e, s) {
329
+ const o = L(Y, null), t = h(() => {
330
+ const a = m(e);
331
+ return (a.app === "kongManager" || !!(a.app === "konnect" && a.enableDeckTab)) && Z(m(s));
332
+ }), n = h(() => {
333
+ const a = m(e), u = a.app === "konnect" && a.enableDeckTab && typeof a.enableDeckTab != "boolean" ? a.enableDeckTab.customization : void 0;
334
334
  if (u && !o) {
335
335
  console.warn(J);
336
336
  return;
337
337
  }
338
338
  return u;
339
339
  }), l = h(() => {
340
- const s = m(e);
341
- return s.app === "konnect" && s.enableDeckTab && typeof s.enableDeckTab != "boolean" ? s.enableDeckTab.calloutPreferenceKey : s.app === "kongManager" ? s.deckCalloutPreferenceKey : void 0;
340
+ const a = m(e);
341
+ return a.app === "konnect" && a.enableDeckTab && typeof a.enableDeckTab != "boolean" ? a.enableDeckTab.calloutPreferenceKey : a.app === "kongManager" ? a.deckCalloutPreferenceKey : void 0;
342
342
  });
343
343
  return {
344
344
  isDeckEnabled: t,
345
- deckCustomizationOptions: a,
345
+ deckCustomizationOptions: n,
346
346
  deckCalloutPreferenceKey: l
347
347
  };
348
348
  }
349
- function Pe(e, n) {
350
- const o = S(n), t = h(
349
+ function Pe(e, s) {
350
+ const o = H(s), t = h(
351
351
  () => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${o}`) : new URL(o)
352
352
  );
353
- return t.value.search = "", (a) => `${t.value.href}/${a}`;
353
+ return t.value.search = "", (n) => `${t.value.href}/${n}`;
354
354
  }
355
355
  function Te() {
356
- const { i18n: { t: e } } = L();
356
+ const { i18n: { t: e } } = O();
357
357
  return {
358
358
  getErrorFieldsFromError: (t) => {
359
359
  if (!t)
@@ -366,30 +366,30 @@ function Te() {
366
366
  messages: [],
367
367
  fields: []
368
368
  };
369
- let a = [e("errors.unexpected")];
369
+ let n = [e("errors.unexpected")];
370
370
  const l = [];
371
371
  if (t?.response?.data) {
372
372
  if (t.response.data.details?.length)
373
- return a = [], t.response.data.details.forEach((s) => {
373
+ return n = [], t.response.data.details.forEach((a) => {
374
374
  let u = e("errors.unexpected");
375
- s.messages && Array.isArray(s.messages) && s.messages.length && (u = s.messages.join(", ")), s.field && l.push({ field: s.field, message: u }), a.push(`${s.field ?? ""} ${u}`);
376
- }), { messages: a, fields: l };
375
+ a.messages && Array.isArray(a.messages) && a.messages.length && (u = a.messages.join(", ")), a.field && l.push({ field: a.field, message: u }), n.push(`${a.field ?? ""} ${u}`);
376
+ }), { messages: n, fields: l };
377
377
  if (t.response.data.message && Array.isArray(t.response.data.message))
378
- return a = [], t.response.data.message.forEach((s) => {
379
- if (s?.constraints) {
380
- const u = Object.values(s.constraints).join(", ");
381
- a.push(u), s.property && l.push({ field: s.property, message: u });
382
- } else s?.property && s?.message ? (l.push({ field: s.property, message: s.message }), a.push(s.message)) : a.push(s);
383
- }), { messages: a, fields: l };
378
+ return n = [], t.response.data.message.forEach((a) => {
379
+ if (a?.constraints) {
380
+ const u = Object.values(a.constraints).join(", ");
381
+ n.push(u), a.property && l.push({ field: a.property, message: u });
382
+ } else a?.property && a?.message ? (l.push({ field: a.property, message: a.message }), n.push(a.message)) : n.push(a);
383
+ }), { messages: n, fields: l };
384
384
  if (typeof t.response.data.message == "string" || typeof t.response.data == "string")
385
385
  return {
386
386
  messages: [t.response.data.message],
387
387
  fields: []
388
388
  };
389
389
  if (typeof t.response.data == "object")
390
- return a = [], Object.keys(t.response.data).forEach((s) => {
391
- l.push({ field: s, message: t.response.data[s] }), a.push(t.response.data[s]);
392
- }), { messages: a, fields: l };
390
+ return n = [], Object.keys(t.response.data).forEach((a) => {
391
+ l.push({ field: a, message: t.response.data[a] }), n.push(t.response.data[a]);
392
+ }), { messages: n, fields: l };
393
393
  }
394
394
  return {
395
395
  messages: [t.message || e("errors.unexpected")],
@@ -405,44 +405,44 @@ function Te() {
405
405
  if (t.response.data.detail)
406
406
  return t.response.data.detail;
407
407
  if (t.response.data.details?.length)
408
- return t.response.data.details.map((a) => {
408
+ return t.response.data.details.map((n) => {
409
409
  let l = e("errors.unexpected");
410
- return a.messages && typeof a.messages == "object" && a.messages.length && (l = a.messages.join(", ")), a.field ? `${a.field} - ${l}` : l;
410
+ return n.messages && typeof n.messages == "object" && n.messages.length && (l = n.messages.join(", ")), n.field ? `${n.field} - ${l}` : l;
411
411
  }).join("; ");
412
412
  if (t.response.data.message) {
413
- const { message: a } = t.response.data;
414
- return Array.isArray(a) ? a[0]?.constraints ? Object.values(a[0].constraints)[0] : a[0] : a;
413
+ const { message: n } = t.response.data;
414
+ return Array.isArray(n) ? n[0]?.constraints ? Object.values(n[0].constraints)[0] : n[0] : n;
415
415
  }
416
416
  if (typeof t.response.data == "string")
417
417
  return t.response.data;
418
418
  if (typeof t.response.data == "object")
419
- return Object.keys(t.response.data).map((a) => `${a} ${t.response.data[a]}`).join(", ");
419
+ return Object.keys(t.response.data).map((n) => `${n} ${t.response.data[n]}`).join(", ");
420
420
  }
421
421
  return t.message || e("errors.unexpected");
422
422
  }
423
423
  };
424
424
  }
425
425
  function Ne(e) {
426
- const n = window.location.origin, o = n.endsWith("/") ? n : `${n}/`;
426
+ const s = window.location.origin, o = s.endsWith("/") ? s : `${s}/`;
427
427
  try {
428
- const t = e.join("/"), a = `${o}${t}`, l = e.some((u) => u.trim() === "");
429
- if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a) && !l && new URL(a))
428
+ const t = e.join("/"), n = `${o}${t}`, l = e.some((u) => u.trim() === "");
429
+ if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(n) && !l && new URL(n))
430
430
  return `${o}${t}`;
431
431
  throw new Error("Invalid url");
432
432
  } catch (t) {
433
433
  return console.warn("Failed to build valid URL:", t), "";
434
434
  }
435
435
  }
436
- function ee(e, n) {
436
+ function ee(e, s) {
437
437
  const o = h(() => {
438
- const a = m(e);
439
- return typeof a.isExactMatch == "boolean" ? a.isExactMatch : a.app === "konnect";
438
+ const n = m(e);
439
+ return typeof n.isExactMatch == "boolean" ? n.isExactMatch : n.app === "konnect";
440
440
  }), t = h(() => {
441
- const a = m(n);
442
- return a.startsWith("/") ? new URL(`${window.location.origin}${a}`) : new URL(a);
441
+ const n = m(s);
442
+ return n.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n);
443
443
  });
444
- return (a) => {
445
- const { page: l, pageSize: s, offset: u, sortColumnKey: p, sortColumnOrder: v, query: i } = a;
444
+ return (n) => {
445
+ const { page: l, pageSize: a, offset: u, sortColumnKey: p, sortColumnOrder: v, query: i } = n;
446
446
  try {
447
447
  let r = new URL(t.value.href);
448
448
  if (o.value && i) {
@@ -451,24 +451,22 @@ function ee(e, n) {
451
451
  } else
452
452
  o.value || new URLSearchParams(i).forEach((d, c) => {
453
453
  r.searchParams.append(c, d);
454
- }), p && r.searchParams.append("sort_by", p), v === "desc" && r.searchParams.append("sort_desc", "1"), r.searchParams.append("size", String(s));
454
+ }), p && r.searchParams.append("sort_by", p), v === "desc" && r.searchParams.append("sort_desc", "1"), r.searchParams.append("size", String(a));
455
455
  return u && l !== 1 && r.searchParams.append("offset", String(u)), r.href;
456
456
  } catch (r) {
457
- return console.error("RouteList(fetcher)", r), m(n);
457
+ return console.error("RouteList(fetcher)", r), m(s);
458
458
  }
459
459
  };
460
460
  }
461
461
  const $ = /* @__PURE__ */ new Map();
462
- function $e(e, n, o) {
463
- const t = y(!0), a = m(e), { axiosInstance: l } = P(a.axiosRequestConfig), s = ee(e, n), u = y({
462
+ function $e(e, s, o) {
463
+ const t = y(!0), n = m(e), { axiosInstance: l } = P(n.axiosRequestConfig), a = ee(e, s), u = y({
464
464
  status: I.Idle
465
465
  }), p = async (r) => {
466
466
  const d = m(o) || "data";
467
467
  try {
468
468
  u.value = t.value ? { status: I.InitialLoad } : { status: I.Loading }, t.value = !1;
469
- let c = s(r);
470
- c.includes("filter[name]") && (c = `${c}&page[size]=${r.pageSize}&page[number]=${r.page}`);
471
- const f = await l.get(c);
469
+ const c = Be(a(r), r), f = await l.get(c);
472
470
  if (f.status >= 400)
473
471
  throw f;
474
472
  const b = f.data, A = d && d.replace(/[^\w-_]/gi, "");
@@ -505,51 +503,62 @@ function $e(e, n, o) {
505
503
  error: c.response ? c : { response: c }
506
504
  }, f);
507
505
  }
508
- }, v = a.cacheIdentifier, i = te(v);
506
+ }, v = n.cacheIdentifier, i = te(v);
509
507
  return { fetcher: p, fetcherState: u, fetcherCacheKey: i };
510
508
  }
509
+ function Be(e, { pageSize: s, page: o }) {
510
+ if (!e.includes("filter[name]"))
511
+ return e;
512
+ let t;
513
+ try {
514
+ t = new URL(e, window.location.origin);
515
+ } catch {
516
+ return e;
517
+ }
518
+ return t.pathname.endsWith("/search") ? t.searchParams.has("size") || s === void 0 ? e : `${e}&size=${s}` : `${e}&page[size]=${s}&page[number]=${o}`;
519
+ }
511
520
  function te(e) {
512
521
  if (e) {
513
- let n = $.get(e);
514
- return n || (n = y(1), $.set(e, n)), n;
522
+ let s = $.get(e);
523
+ return s || (s = y(1), $.set(e, s)), s;
515
524
  }
516
525
  return y(1);
517
526
  }
518
- function Ue() {
519
- const e = (t, a = "_") => t ? t.split(a).map((l) => l.toLowerCase() === "id" ? l.toUpperCase() : l.charAt(0).toUpperCase() + l.substring(1)).join(" ") : "", n = /(?:^|[\s-:'"])\w/g;
527
+ function Fe() {
528
+ const e = (t, n = "_") => t ? t.split(n).map((l) => l.toLowerCase() === "id" ? l.toUpperCase() : l.charAt(0).toUpperCase() + l.substring(1)).join(" ") : "", s = /(?:^|[\s-:'"])\w/g;
520
529
  return {
521
- capitalize: (t) => t ? t.replace(n, (a) => a.toUpperCase()) : "",
530
+ capitalize: (t) => t ? t.replace(s, (n) => n.toUpperCase()) : "",
522
531
  convertKeyToTitle: e
523
532
  };
524
533
  }
525
- const se = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, U = (e) => {
534
+ const se = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, B = (e) => {
526
535
  if (typeof e != "string")
527
536
  throw new TypeError("Invalid argument expected string");
528
- const n = e.match(se);
529
- if (!n)
537
+ const s = e.match(se);
538
+ if (!s)
530
539
  throw new Error(`Invalid argument not valid semver ('${e}' received)`);
531
- return n.shift(), n;
532
- }, B = (e) => e === "*" || e === "x" || e === "X", F = (e) => {
533
- const n = parseInt(e, 10);
534
- return isNaN(n) ? e : n;
535
- }, Be = (e, n) => typeof e != typeof n ? [String(e), String(n)] : [e, n], Fe = (e, n) => {
536
- if (B(e) || B(n))
540
+ return s.shift(), s;
541
+ }, F = (e) => e === "*" || e === "x" || e === "X", U = (e) => {
542
+ const s = parseInt(e, 10);
543
+ return isNaN(s) ? e : s;
544
+ }, Ue = (e, s) => typeof e != typeof s ? [String(e), String(s)] : [e, s], je = (e, s) => {
545
+ if (F(e) || F(s))
537
546
  return 0;
538
- const [o, t] = Be(F(e), F(n));
547
+ const [o, t] = Ue(U(e), U(s));
539
548
  return o > t ? 1 : o < t ? -1 : 0;
540
- }, j = (e, n) => {
541
- for (let o = 0; o < Math.max(e.length, n.length); o++) {
542
- const t = Fe(e[o] || "0", n[o] || "0");
549
+ }, j = (e, s) => {
550
+ for (let o = 0; o < Math.max(e.length, s.length); o++) {
551
+ const t = je(e[o] || "0", s[o] || "0");
543
552
  if (t !== 0)
544
553
  return t;
545
554
  }
546
555
  return 0;
547
- }, je = (e, n) => {
548
- const o = U(e), t = U(n), a = o.pop(), l = t.pop(), s = j(o, t);
549
- return s !== 0 ? s : a && l ? j(a.split("."), l.split(".")) : a || l ? a ? -1 : 1 : 0;
550
- }, G = (e, n, o) => {
551
- Ge(o);
552
- const t = je(e, n);
556
+ }, Ge = (e, s) => {
557
+ const o = B(e), t = B(s), n = o.pop(), l = t.pop(), a = j(o, t);
558
+ return a !== 0 ? a : n && l ? j(n.split("."), l.split(".")) : n || l ? n ? -1 : 1 : 0;
559
+ }, G = (e, s, o) => {
560
+ ze(o);
561
+ const t = Ge(e, s);
553
562
  return ae[o].includes(t);
554
563
  }, ae = {
555
564
  ">": [1],
@@ -558,76 +567,76 @@ const se = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
558
567
  "<=": [-1, 0],
559
568
  "<": [-1],
560
569
  "!=": [-1, 1]
561
- }, z = Object.keys(ae), Ge = (e) => {
570
+ }, z = Object.keys(ae), ze = (e) => {
562
571
  if (typeof e != "string")
563
572
  throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
564
573
  if (z.indexOf(e) === -1)
565
574
  throw new Error(`Invalid operator, expected one of ${z.join("|")}`);
566
- }, ze = (e) => typeof e == "string" && /^[v\d]/.test(e) && se.test(e);
567
- function Ve(e) {
568
- const { gatewayInfo: n, supportedRange: o } = e;
569
- if (!n)
575
+ }, Ve = (e) => typeof e == "string" && /^[v\d]/.test(e) && se.test(e);
576
+ function He(e) {
577
+ const { gatewayInfo: s, supportedRange: o } = e;
578
+ if (!s)
570
579
  return !0;
571
- const { edition: t, version: a } = n;
572
- if (!ze(a))
580
+ const { edition: t, version: n } = s;
581
+ if (!Ve(n))
573
582
  return console.error("Invalid version"), !1;
574
583
  const l = o[t];
575
584
  if (!l)
576
585
  return !1;
577
- const [s, u] = l;
578
- return !(s && G(a, s, "<") || u && G(a, u, ">"));
586
+ const [a, u] = l;
587
+ return !(a && G(n, a, "<") || u && G(n, u, ">"));
579
588
  }
580
- function Se(e) {
581
- const n = y(0), o = y(0), t = y(!1);
589
+ function We(e) {
590
+ const s = y(0), o = y(0), t = y(!1);
582
591
  return oe(e, (l) => {
583
- l && !t.value && (n.value = l.offsetWidth, o.value = l.scrollWidth, t.value = !0);
592
+ l && !t.value && (s.value = l.offsetWidth, o.value = l.scrollWidth, t.value = !0);
584
593
  }), {
585
- isTruncated: h(() => n.value < o.value)
594
+ isTruncated: h(() => s.value < o.value)
586
595
  };
587
596
  }
588
- function He() {
589
- const { i18n: { t: e } } = L();
597
+ function Se() {
598
+ const { i18n: { t: e } } = O();
590
599
  return {
591
600
  utf8Name: (o) => /^[\p{N}\p{L}.\-_~]*$/u.test(o) ? "" : e("validationErrors.utf8Name")
592
601
  };
593
602
  }
594
- const T = /* @__PURE__ */ Symbol("schema"), We = (e) => {
595
- H(T, e);
596
- }, ne = () => O(T, void 0), Ye = (e) => /^\d+$/.test(e), Je = (e) => {
597
- const n = ne(), o = h(() => {
598
- const t = n?.value, a = e();
599
- if ((t?.type === "array" || t?.type === "set") && Ye(a)) {
600
- const s = t.elements;
601
- return s && {
602
- ...s,
603
+ const T = /* @__PURE__ */ Symbol("schema"), Ye = (e) => {
604
+ W(T, e);
605
+ }, ne = () => L(T, void 0), Je = (e) => /^\d+$/.test(e), Qe = (e) => {
606
+ const s = ne(), o = h(() => {
607
+ const t = s?.value, n = e();
608
+ if ((t?.type === "array" || t?.type === "set") && Je(n)) {
609
+ const a = t.elements;
610
+ return a && {
611
+ ...a,
603
612
  // encryption set if either parent or child is encrypted
604
- encrypted: !!(t.encrypted || s.encrypted)
613
+ encrypted: !!(t.encrypted || a.encrypted)
605
614
  };
606
615
  }
607
- return t?.fields?.find((s) => Object.keys(s)[0] === a)?.[a];
616
+ return t?.fields?.find((a) => Object.keys(a)[0] === n)?.[n];
608
617
  });
609
- return H(T, o), o;
618
+ return W(T, o), o;
610
619
  };
611
- function Qe(e) {
612
- let n = "";
613
- const o = y(!1), t = y(null), a = h(() => {
614
- let s;
615
- return o.value ? s = !0 : t.value ? s = t.value.hasData || e && m(e) : s = !1, !s;
620
+ function Xe(e) {
621
+ let s = "";
622
+ const o = y(!1), t = y(null), n = h(() => {
623
+ let a;
624
+ return o.value ? a = !0 : t.value ? a = t.value.hasData || e && m(e) : a = !1, !a;
616
625
  });
617
626
  return {
618
627
  tableState: t,
619
628
  hasRecords: o,
620
- hideTableToolbar: a,
621
- handleStateChange: (s) => {
622
- s.hasData ? o.value = !0 : s.state === "success" && !s.hasData && (!e || !n) && (o.value = !1), e && (n = m(e)), t.value = { ...s };
629
+ hideTableToolbar: n,
630
+ handleStateChange: (a) => {
631
+ a.hasData ? o.value = !0 : a.state === "success" && !a.hasData && (!e || !s) && (o.value = !1), e && (s = m(e)), t.value = { ...a };
623
632
  }
624
633
  };
625
634
  }
626
635
  function re() {
627
- const e = O(ce.MANAGED_BY, !1);
636
+ const e = L(ce.MANAGED_BY, !1);
628
637
  return h(() => !!m(e));
629
638
  }
630
- const Xe = (e) => e?.service || e?.tool || null, Ze = "Custom", V = {
639
+ const Ze = (e) => e?.service || e?.tool || null, qe = "Custom", V = {
631
640
  "terraform-provider-konnect": "Terraform",
632
641
  deck: "decK",
633
642
  "kong-gateway-operator": "Kong Gateway Operator",
@@ -636,28 +645,28 @@ const Xe = (e) => e?.service || e?.tool || null, Ze = "Custom", V = {
636
645
  "gw-manager": "Konnect UI",
637
646
  "ai-manager": "AI Manager",
638
647
  "dev-portal": "Dev Portal"
639
- }, pt = (e) => {
640
- const n = Xe(e);
641
- return n ? Object.hasOwn(V, n) ? V[n] : Ze : null;
648
+ }, gt = (e) => {
649
+ const s = Ze(e);
650
+ return s ? Object.hasOwn(V, s) ? V[s] : qe : null;
642
651
  };
643
652
  let M;
644
- const qe = () => (M === void 0 && (M = W("en-us", Q).t("baseConfigCard.commonFields.managed_by_label")), M);
645
- function et(e, n = {}) {
653
+ const et = () => (M === void 0 && (M = S("en-us", Q).t("baseConfigCard.commonFields.managed_by_label")), M);
654
+ function tt(e, s = {}) {
646
655
  const o = re();
647
656
  return {
648
657
  defaultTablePreferences: {
649
658
  columnVisibility: {
650
659
  managed_by: !1,
651
- ...n
660
+ ...s
652
661
  }
653
662
  },
654
663
  tableHeaders: h(() => ({
655
664
  ...m(e),
656
- ...o.value ? { managed_by: { label: qe(), sortable: !1 } } : {}
665
+ ...o.value ? { managed_by: { label: et(), sortable: !1 } } : {}
657
666
  }))
658
667
  };
659
668
  }
660
- const gt = {
669
+ const mt = {
661
670
  useAxios: P,
662
671
  useDebouncedFilter: Ke,
663
672
  useDeleteUrlBuilder: Pe,
@@ -669,46 +678,46 @@ const gt = {
669
678
  useFetcherCacheKey: te,
670
679
  useFetchUrlBuilder: ee,
671
680
  useHelpers: q,
672
- useStringHelpers: Ue,
673
- useI18n: L,
674
- useGatewayFeatureSupported: Ve,
675
- useTruncationDetector: Se,
676
- useValidators: He,
681
+ useStringHelpers: Fe,
682
+ useI18n: O,
683
+ useGatewayFeatureSupported: He,
684
+ useTruncationDetector: We,
685
+ useValidators: Se,
677
686
  useSchema: ne,
678
- useSchemaProvider: We,
679
- useSubSchema: Je,
680
- useTableState: Qe,
687
+ useSchemaProvider: Ye,
688
+ useSubSchema: Qe,
689
+ useTableState: Xe,
681
690
  useManagedByEnabled: re,
682
- useManagedByColumn: et
683
- }, mt = (e, n) => {
691
+ useManagedByColumn: tt
692
+ }, yt = (e, s) => {
684
693
  const o = e.__vccOpts || e;
685
- for (const [t, a] of n)
686
- o[t] = a;
694
+ for (const [t, n] of s)
695
+ o[t] = n;
687
696
  return o;
688
697
  };
689
698
  export {
690
699
  R as C,
691
700
  Y as D,
692
- ut as E,
701
+ dt as E,
693
702
  I as F,
694
- dt as I,
703
+ ft as I,
695
704
  V as M,
696
- nt as P,
697
- it as S,
698
- mt as _,
699
- rt as a,
700
- ot as b,
701
- gt as c,
705
+ rt as P,
706
+ ct as S,
707
+ yt as _,
708
+ ot as a,
709
+ it as b,
710
+ mt as c,
702
711
  X as d,
703
- lt as e,
712
+ ut as e,
704
713
  J as f,
705
- pt as g,
706
- Oe as h,
707
- ft as i,
708
- Le as j,
709
- ct as k,
714
+ gt as g,
715
+ Le as h,
716
+ pt as i,
717
+ Oe as j,
718
+ lt as k,
710
719
  ce as l,
711
- qe as m,
720
+ et as m,
712
721
  de as n,
713
722
  Z as o,
714
723
  q as u
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./_plugin-vue_export-helper-DLkhKvEr.cjs"),p=require("@kong-ui-public/monaco-editor"),k=require("@kong/icons"),y=require("@kong/kongponents");require("@kong-ui-public/monaco-editor/dist/runtime/style.css");const _={class:"deck-command-editor-wrapper"},f={class:"deck-command-copy-button"},C=e.defineComponent({__name:"DeckCommandEditor",props:e.mergeModels({language:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const d=e.inject("app:konnectColorMode",e.computed(()=>"light")),n=e.useModel(r,"modelValue"),{i18n:{t:c}}=a.composables.useI18n(),s={scrollbar:{alwaysConsumeMouseWheel:!1},autoIndent:"keep",editContext:!1};async function u(){await m(n.value)}async function m(l){if(navigator.clipboard)try{return await navigator.clipboard.writeText(l),!0}catch{}const o=document?.createElement("textarea");o&&(o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="32px",o.style.height="32px",o.style.padding="0",o.style.border="none",o.style.outline="none",o.style.boxShadow="none",o.style.background="transparent",o.value=l,document?.body?.appendChild(o),o.focus(),o.select());let t;try{t=document?.execCommand("copy")}catch{t=!1}finally{document?.body?.removeChild(o)}return t}return(l,o)=>(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(),e.createBlock(e.unref(p.MonacoEditor),{key:e.unref(d),modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=t=>n.value=t),appearance:"standalone",class:"deck-command-editor",language:r.language,options:s,theme:e.unref(d)},null,8,["modelValue","language","theme"])),e.createElementVNode("div",f,[e.createVNode(e.unref(y.KCodeBlockIconButton),{"aria-label":e.unref(c)("deckCodeBlock.copy_tooltip"),"copy-tooltip":e.unref(c)("deckCodeBlock.copy_tooltip"),theme:"light",onClick:o[1]||(o[1]=t=>u())},{default:e.withCtx(()=>[e.createVNode(e.unref(k.CopyIcon),{decorative:""})]),_:1},8,["aria-label","copy-tooltip"])])]))}}),i=a._export_sfc(C,[["__scopeId","data-v-2da602e1"]]),g={},v={class:"editor-skeleton"};function b(r,d){const n=e.resolveComponent("KSkeleton");return e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,c=>e.createVNode(n,{key:c})),64))])}const E=a._export_sfc(g,[["render",b],["__scopeId","data-v-ec59bbd1"]]);function h(){e.provide(a.DECK_COMMAND_EDITOR_KEY,i)}exports.DeckCommandEditor=i;exports.DeckCommandEditorLoading=E;exports.provideDeckCommandEditor=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./_plugin-vue_export-helper-CHX8gon_.cjs"),p=require("@kong-ui-public/monaco-editor"),k=require("@kong/icons"),y=require("@kong/kongponents");require("@kong-ui-public/monaco-editor/dist/runtime/style.css");const _={class:"deck-command-editor-wrapper"},f={class:"deck-command-copy-button"},C=e.defineComponent({__name:"DeckCommandEditor",props:e.mergeModels({language:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const d=e.inject("app:konnectColorMode",e.computed(()=>"light")),n=e.useModel(r,"modelValue"),{i18n:{t:c}}=a.composables.useI18n(),s={scrollbar:{alwaysConsumeMouseWheel:!1},autoIndent:"keep",editContext:!1};async function u(){await m(n.value)}async function m(l){if(navigator.clipboard)try{return await navigator.clipboard.writeText(l),!0}catch{}const o=document?.createElement("textarea");o&&(o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="32px",o.style.height="32px",o.style.padding="0",o.style.border="none",o.style.outline="none",o.style.boxShadow="none",o.style.background="transparent",o.value=l,document?.body?.appendChild(o),o.focus(),o.select());let t;try{t=document?.execCommand("copy")}catch{t=!1}finally{document?.body?.removeChild(o)}return t}return(l,o)=>(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(),e.createBlock(e.unref(p.MonacoEditor),{key:e.unref(d),modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=t=>n.value=t),appearance:"standalone",class:"deck-command-editor",language:r.language,options:s,theme:e.unref(d)},null,8,["modelValue","language","theme"])),e.createElementVNode("div",f,[e.createVNode(e.unref(y.KCodeBlockIconButton),{"aria-label":e.unref(c)("deckCodeBlock.copy_tooltip"),"copy-tooltip":e.unref(c)("deckCodeBlock.copy_tooltip"),theme:"light",onClick:o[1]||(o[1]=t=>u())},{default:e.withCtx(()=>[e.createVNode(e.unref(k.CopyIcon),{decorative:""})]),_:1},8,["aria-label","copy-tooltip"])])]))}}),i=a._export_sfc(C,[["__scopeId","data-v-2da602e1"]]),g={},v={class:"editor-skeleton"};function b(r,d){const n=e.resolveComponent("KSkeleton");return e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,c=>e.createVNode(n,{key:c})),64))])}const E=a._export_sfc(g,[["render",b],["__scopeId","data-v-ec59bbd1"]]);function h(){e.provide(a.DECK_COMMAND_EDITOR_KEY,i)}exports.DeckCommandEditor=i;exports.DeckCommandEditorLoading=E;exports.provideDeckCommandEditor=h;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as _, inject as f, computed as k, useModel as C, openBlock as c, createElementBlock as i, createBlock as g, unref as o, createElementVNode as v, createVNode as s, withCtx as h, mergeModels as b, resolveComponent as x, Fragment as E, renderList as D, provide as M } from "vue";
2
- import { c as w, _ as m, D as V } from "./_plugin-vue_export-helper-CzCSHAcC.js";
2
+ import { c as w, _ as m, D as V } from "./_plugin-vue_export-helper-CVlAL6HT.js";
3
3
  import { MonacoEditor as B } from "@kong-ui-public/monaco-editor";
4
4
  import { CopyIcon as I } from "@kong/icons";
5
5
  import { KCodeBlockIconButton as K } from "@kong/kongponents";
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./_plugin-vue_export-helper-DLkhKvEr.cjs"),G=require("@kong/kongponents"),wt=require("@shikijs/core"),xt=require("@shikijs/engine-javascript"),Lt=require("@shikijs/langs/json"),Ft=require("@shikijs/langs/yaml"),Rt=require("@shikijs/langs/terraform"),Vt=require("@shikijs/langs/shellscript"),Dt=require("@shikijs/langs/powershell"),Kt=require("@shikijs/themes/material-theme-darker"),Pt=require("@shikijs/themes/catppuccin-latte"),V=require("@kong/icons"),Mt=require("@vueuse/core"),Ut=require("vue-router"),qt=require("@kong-ui-public/misc-widgets");require("@kong-ui-public/misc-widgets/dist/style.css");var Je=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t.Secret="secret",t.RedisConfiguration="redis configuration",t))(Je||{}),Qe=(t=>(t.Edit="edit",t.Create="create",t))(Qe||{});const jt=["json","yaml","terraform","deck"],pe=["primary","secondary"];function Xe(t,n){const o={...t};for(const a of Object.keys(n))n[a].forceShow&&o[a]===void 0&&(o[a]=null);return o}function Ze(t,n,o){const{redactByApiSchema:a,redactByConfigSchema:r,getApiSchemaField:i,isObjectRecord:l}=d.useHelpers();let s=t;return l(t)&&Array.isArray(n?.fields)&&(s=Object.fromEntries(Object.entries(t).map(([u,f])=>{const c=i(n.fields,u);return[u,c?a(f,c):f]}))),r(s,o)}const zt={key:0,class:"config-card-fieldset-title"},Gt=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(t){const n=t,{i18n:{t:o}}=d.composables.useI18n(),{convertKeyToTitle:a}=d.composables.useStringHelpers();n.isArrayItem&&d.composables.useSubSchema(()=>String(n.index));const r=e.computed(()=>n.item.key??"json-array-item"),i=e.computed(()=>n.item.value??n.item),l=e.computed(()=>{const u=JSON.parse(JSON.stringify(i.value));return n.isArrayItem&&delete u.name,u}),s=e.computed(()=>n.isArrayItem?i.value?.name?a(i.value.name,"_"):o("baseConfigCard.general.entryTitle",{index:n.index}):"");return(u,f)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(t.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[t.isArrayItem?(e.openBlock(),e.createElementBlock("legend",zt,[e.createElementVNode("b",null,e.toDisplayString(s.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(l.value),(c,k)=>(e.openBlock(),e.createBlock(Se,{key:`${r.value}-property-${k}`,item:{key:c,label:e.unref(a)(c),value:l.value[c]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),et=d._export_sfc(Gt,[["__scopeId","data-v-32504351"]]),Ht={key:3,class:"navigation-subtitle"},Yt=e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(t){const{i18n:{t:n}}=d.composables.useI18n();return(o,a)=>{const r=e.resolveComponent("router-link"),i=e.resolveComponent("KButton"),l=e.resolveComponent("KSkeleton");return e.openBlock(),e.createElementBlock("div",null,[t.item.to?(e.openBlock(),e.createBlock(r,{key:0,class:"navigation-link",to:t.item.to},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1},8,["to"])):(e.openBlock(),e.createBlock(i,{key:1,appearance:"tertiary",class:"navigation-button",onClick:a[0]||(a[0]=s=>o.$emit("navigation-click",t.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})),t.item.subtitleLoading?(e.openBlock(),e.createBlock(l,{key:2,"data-testid":"navigation-subtitle-loader",type:"spinner"})):t.item.subtitle?(e.openBlock(),e.createElementBlock("div",Ht,e.toDisplayString(t.item.subtitle),1)):e.createCommentVNode("",!0)])}}}),tt=d._export_sfc(Yt,[["__scopeId","data-v-6996418f"]]),Wt=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(t){const{i18n:{t:n}}=d.composables.useI18n();return(o,a)=>{const r=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(r,{appearance:t.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.status?e.unref(n)("baseConfigCard.statusBadge.enabledLabel"):e.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}});let se=null;function Jt(){return se||(se=wt.createHighlighterCoreSync({langs:[Lt,Ft,Rt,Vt,Dt],themes:[Kt,Pt],engine:xt.createJavaScriptRegexEngine(),langAlias:{bash:"shellscript",sh:"shellscript",shell:"shellscript",zsh:"shellscript"}})),se}function Qt(t,n){return Jt().codeToHtml(t,n)}function Y({codeElement:t,code:n,language:o}){n.length>d.SHIKI_MAX_HIGHLIGHT_LENGTH||(t.innerHTML=Qt(n,{lang:o,themes:{light:"catppuccin-latte",dark:"material-theme-darker"},structure:"inline"}))}const Xt=["data-testid"],Zt=["data-testid"],en=["data-testid"],tn=["data-testid"],nn={key:1},on=["data-testid"],an=["data-testid"],rn=["data-testid"],ln=["data-testid"],sn={name:"ConfigCardItem",components:{JsonCardItem:et,StatusBadge:Wt,InternalLinkItem:tt}},cn=e.defineComponent({...sn,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(t,{emit:n}){const o=t,a=n,r=e.useId(),i=e.useSlots(),{i18n:{t:l,formatIsoDate:s,formatUnixTimeStamp:u}}=d.composables.useI18n(),f=e.computed(()=>o.item.value!==void 0&&o.item.value!==null&&o.item.value!==""),c=e.computed(()=>!!(o.item.tooltip||i["label-tooltip"])),k=e.computed(()=>o.item.type===d.ConfigurationSchemaType.Json||o.item.type===d.ConfigurationSchemaType.JsonArray),h=e.computed(()=>o.item.type===d.ConfigurationSchemaType.JsonArray),S=d.composables.useSubSchema(()=>o.item.key),{redactByApiSchema:$}=d.composables.useHelpers(),g=e.inject(d.CONFIG_CARD_SHOW_SENSITIVE_FIELDS,e.ref(!1)),m=e.computed(()=>g.value?"default":"redacted"),T=e.computed(()=>o.item.type?o.item.type:S?.value?.encrypted?d.ConfigurationSchemaType.Redacted:void 0),p=e.computed(()=>{switch(T.value){case d.ConfigurationSchemaType.ID:return{tag:"KCopy",attrs:{"data-testid":`${o.item.key}-copy-uuid`,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:o.item.label}),text:o.item.value}};case d.ConfigurationSchemaType.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:o.item.label})}};case d.ConfigurationSchemaType.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${o.item.key}-copy-uuid-redacted`,"data-dd-privacy":"mask",format:m.value,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:o.item.label}),text:o.item.value}};case d.ConfigurationSchemaType.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"data-dd-privacy":"mask",format:m.value,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:o.item.label})}};case d.ConfigurationSchemaType.Date:return{tag:"div",attrs:{"data-testid":`${o.item.key}-date`},text:isNaN(Number(o.item.value))?s(o.item.value):u(o.item.value)};case d.ConfigurationSchemaType.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${o.item.key}-badge-status`,status:o.item.value}};case d.ConfigurationSchemaType.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case d.ConfigurationSchemaType.CopyBadge:return{tag:"div",additionalComponent:"KCopy",childAttrs:{badge:!0,truncate:!0,truncationLimit:"auto",text:o.item.value}};case d.ConfigurationSchemaType.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case d.ConfigurationSchemaType.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${o.item.key}-internal-link`,item:o.item,onNavigationClick:B=>{a("navigation-click",B)}}};case d.ConfigurationSchemaType.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${o.item.key}-external-link`,href:o.item.value},text:o.item.value};case d.ConfigurationSchemaType.ManagedBy:return{tag:"div",attrs:{"data-testid":`${o.item.key}-managed-by`},text:d.getManagedByLabel(o.item.value)??"–"};case d.ConfigurationSchemaType.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${o.item.key}-json-content`,item:o.item}};case d.ConfigurationSchemaType.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${o.item.key}-json-array-content`,item:o.item}};default:return o.item.value!=null&&typeof o.item.value=="object"?{tag:"KCodeBlock",attrs:{"data-testid":`${o.item.key}-json-code`,"data-dd-privacy":"mask",id:`json-code-${r}`,language:"json",code:JSON.stringify(g.value?o.item.value:$(o.item.value,S.value),null," "),copyCode:JSON.stringify(o.item.value,null," "),maxHeight:"480px",showLineNumbers:!1,onCodeBlockRender:Y}}:{tag:"div",attrs:{"data-testid":`${o.item.key}-plain-text`},text:o.item.value}}}),y=e.ref(),N=e.ref(),{isTruncated:I}=d.composables.useTruncationDetector(y),{isTruncated:L}=d.composables.useTruncationDetector(N);return(B,E)=>{const O=e.resolveComponent("KTooltip"),v=e.resolveComponent("KLabel"),b=e.resolveComponent("KBadge"),C=e.resolveComponent("KCopy");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["config-card-details-row",{"json-array-item":h.value,"json-item":k.value&&f.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["config-card-details-label",{"json-item-label":k.value&&f.value,"slim-label":t.slim}]),"data-testid":`${t.item.key}-label`},[e.renderSlot(B.$slots,"label",{item:t.item},()=>[e.createVNode(v,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createVNode(O,{text:e.unref(I)?t.item.label:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"labelContent",ref:y,class:"label-content"},e.toDisplayString(t.item.label),513)]),_:1},8,["text"])]),_:2},[c.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${t.item.key}-label-tooltip`},[e.renderSlot(B.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(t.item.tooltip),1)],!0)],8,Zt)]),key:"0"}:void 0]),1024)],!0)],10,Xt),e.createElementVNode("div",{class:e.normalizeClass(["config-card-details-value",{"json-item-value":k.value&&f.value,"slim-value":t.slim}]),"data-testid":`${t.item.key}-property-value`},[e.renderSlot(B.$slots,t.item.key,{rowValue:t.item.value},()=>[f.value?(e.openBlock(),e.createElementBlock("div",nn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.value.tag),e.normalizeProps(e.guardReactiveProps(p.value.attrs)),{default:e.withCtx(()=>[p.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(_,F)=>(e.openBlock(),e.createBlock(b,{key:`${t.item.key}-badge-tag-${F}`,class:"config-badge","data-testid":`${t.item.key}-badge-tag-${F}`,tooltip:_,"truncation-tooltip":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,on)):p.value.additionalComponent==="KCopy"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${t.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(_,F)=>(e.openBlock(),e.createBlock(C,e.mergeProps({ref_for:!0},p.value.childAttrs,{key:`${t.item.key}-copy-uuid-${F}`,"data-testid":`${t.item.key}-copy-uuid-${F}`,text:_}),null,16,["data-testid","text"]))),128))],8,an)):p.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${t.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(_,F)=>(e.openBlock(),e.createBlock(b,{key:`${t.item.key}-badge-method-${F}`,appearance:Object.values(e.unref(G.BadgeMethodAppearances)).includes(_.toLowerCase())?_.toLowerCase():"custom",class:"config-badge","data-testid":`${t.item.key}-badge-method-${F}`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,rn)):p.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${o.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(_,F)=>(e.openBlock(),e.createBlock(et,{key:`json-array-item-${F}`,index:Number(F),"is-array-item":"",item:_},null,8,["index","item"]))),128))],8,ln)):(e.openBlock(),e.createBlock(O,{key:4,text:e.unref(L)?t.item.value:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:N,class:e.normalizeClass(["attrs-data-text",{truncated:t.truncated}])},e.toDisplayString(p.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-no-value`}," – ",8,tn))],!0)],10,en)],2)}}}),Se=d._export_sfc(cn,[["__scopeId","data-v-2270c941"]]),nt=Symbol("config-card-row-schema"),dn=e.defineComponent({__name:"ConfigCardRowSchemaScope",props:{item:{type:Object,required:!0}},setup(t){const n=t,o=e.inject(nt,void 0);if(o){const a=d.composables.useSchema();d.composables.useSchemaProvider(e.computed(()=>{const r=o(n.item);return r?r.schema:a?.value}))}return(a,r)=>e.renderSlot(a.$slots,"default")}}),un={class:"json-config config-card-code-block"},fn=["title"],pn=e.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},requestMethod:{type:String,required:!1,default:""},entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null}},setup(t){e.useCssVars(i=>({v6e8a5e62:`${r.value}ch`}));const n=t,{i18n:{t:o}}=d.composables.useI18n(),a=e.computed(()=>n.entityRecord),r=e.computed(()=>{if(!n.fetcherUrl)return 0;const i=n.fetcherUrl?.split("/");return i.length<2?0:41+(n.requestMethod==="post"?i[i.length-1]:i[i.length-2]).length});return(i,l)=>{const s=e.resolveComponent("KBadge"),u=e.resolveComponent("KClipboardProvider"),f=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock("div",un,[t.entityRecord?(e.openBlock(),e.createBlock(f,{key:0,id:"json-codeblock",code:JSON.stringify(a.value,null,2),"copy-code":JSON.stringify(t.unredactedRecord||a.value,null,2),"data-dd-privacy":"mask",language:"json","max-height":e.unref(d.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT),theme:"dark",onCodeBlockRender:e.unref(Y)},e.createSlots({_:2},[t.fetcherUrl?{name:"actions",fn:e.withCtx(()=>[e.createVNode(s,{appearance:t.requestMethod,class:"json-endpoint-method","data-testid":"json-endpoint-method"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.requestMethod),1)]),_:1},8,["appearance"]),e.createElementVNode("code",{id:"json-endpoint-codeblock",class:"json-endpoint-url",title:t.fetcherUrl},e.toDisplayString(t.fetcherUrl),9,fn),e.createVNode(u,null,{default:e.withCtx(({copyToClipboard:c})=>[e.createVNode(e.unref(G.KCodeBlockIconButton),{"aria-label":e.unref(o)("jsonCodeBlock.copy_url"),"copy-tooltip":e.unref(o)("jsonCodeBlock.copy_url"),"data-testid":"code-block-copy-button-json-endpoint-codeblock",onClick:k=>c(t.fetcherUrl)},{default:e.withCtx(()=>[e.createVNode(e.unref(V.CopyIcon),{decorative:""})]),_:1},8,["aria-label","copy-tooltip","onClick"])]),_:1})]),key:"0"}:void 0]),1032,["code","copy-code","max-height","onCodeBlockRender"])):e.createCommentVNode("",!0)])}}}),Be=d._export_sfc(pn,[["__scopeId","data-v-8736ff0c"]]);var x=Symbol("NOT_RESOLVED");function P(t,n){return{tagName:t,nodeKind:"scalar",implicit:n.implicit??!1,matchByTagPrefix:n.matchByTagPrefix??!1,implicitFirstChars:n.implicitFirstChars??null,resolve:n.resolve,identify:n.identify,represent:n.represent??(o=>String(o)),representTagName:n.representTagName??(()=>t)}}function Te(t,n){const o=n.finalize===void 0;return{tagName:t,nodeKind:"sequence",implicit:!1,matchByTagPrefix:n.matchByTagPrefix??!1,create:n.create,addItem:n.addItem,finalize:n.finalize??(a=>a),carrierIsResult:o,identify:n.identify,represent:n.represent??(a=>a),representTagName:n.representTagName??(()=>t)}}function oe(t,n){const o=n.finalize===void 0;return{tagName:t,nodeKind:"mapping",implicit:!1,matchByTagPrefix:n.matchByTagPrefix??!1,create:n.create,addPair:n.addPair,has:n.has,keys:n.keys,get:n.get,finalize:n.finalize??(a=>a),carrierIsResult:o,identify:n.identify,represent:n.represent??(a=>a),representTagName:n.representTagName??(()=>t)}}var mn=P("tag:yaml.org,2002:str",{resolve:t=>t,identify:t=>typeof t=="string"}),yn=["","~","null","Null","NULL"],gn=P("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>yn.indexOf(t)!==-1?null:x,identify:t=>t===null,represent:()=>"null"}),vn=P("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(t,n)=>t==="null"||n&&t===""?null:x,identify:t=>t===null,represent:()=>"null"}),kn=["","~","null","Null","NULL"],hn=P("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>kn.indexOf(t)!==-1?null:x,identify:t=>t===null,represent:()=>"null"}),Cn=["true","True","TRUE"],bn=["false","False","FALSE"],Sn=P("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:t=>Cn.indexOf(t)!==-1?!0:bn.indexOf(t)!==-1?!1:x,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),Bn=["true"],Tn=["false"],En=P("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:t=>Bn.indexOf(t)!==-1?!0:Tn.indexOf(t)!==-1?!1:x,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),Nn=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],_n=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],$n=P("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:t=>Nn.indexOf(t)!==-1?!0:_n.indexOf(t)!==-1?!1:x,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),In=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),On=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function An(t){let n=t,o=1;return(n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b")?o*parseInt(n.slice(2),2):n.startsWith("0o")?o*parseInt(n.slice(2),8):n.startsWith("0x")?o*parseInt(n.slice(2),16):o*parseInt(n,10)}function wn(t,n){if(n){if(!On.test(t))return x}else if(!In.test(t))return x;const o=An(t);return Number.isFinite(o)?o:x}var ot=P("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:wn,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),xn=new RegExp("^-?(?:0|[1-9][0-9]*)$"),Ln=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function Fn(t){let n=t,o=1;return(n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b")?o*parseInt(n.slice(2),2):n.startsWith("0o")?o*parseInt(n.slice(2),8):n.startsWith("0x")?o*parseInt(n.slice(2),16):o*parseInt(n,10)}function Rn(t,n){if(n){if(!Ln.test(t))return x}else if(!xn.test(t))return x;const o=Fn(t);return Number.isFinite(o)?o:x}var Vn=P("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Rn,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),Dn=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function Kn(t){let n=t.replace(/_/g,""),o=1;if((n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b"))return o*parseInt(n.slice(2),2);if(n.startsWith("0x"))return o*parseInt(n.slice(2),16);if(n.includes(":")){let a=0;for(const r of n.split(":"))a=a*60+Number(r);return o*a}return n!=="0"&&n[0]==="0"?o*parseInt(n,8):o*parseInt(n,10)}function Pn(t){if(!Dn.test(t))return x;const n=Kn(t);return Number.isFinite(n)?n:x}var me=P("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Pn,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),Mn=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Un=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function qn(t){if(!Mn.test(t))return x;let n=t.toLowerCase();const o=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;const a=o*parseFloat(n);return Number.isFinite(a)||Un.test(t)?a:x}function jn(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var at=P("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:qn,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:jn}),zn=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Gn=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hn(t,n){if(n){if(!Gn.test(t))return x;let a=t.toLowerCase();const r=a[0]==="-"?-1:1;if("+-".includes(a[0])&&(a=a.slice(1)),a===".inf")return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(a===".nan")return NaN;const i=r*parseFloat(a);return Number.isFinite(i)?i:x}if(!zn.test(t))return x;const o=Number(t);return Number.isFinite(o)?o:x}function Yn(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var Wn=P("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Hn,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Yn}),Jn=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Qn=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Xn(t){if(!Jn.test(t))return x;let n=t.toLowerCase().replace(/_/g,"");const o=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;let a=0;if(n.includes(":")){for(const r of n.split(":"))a=a*60+Number(r);a*=o}else a=o*parseFloat(n);return Number.isFinite(a)||Qn.test(t)?a:x}function Zn(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var ye=P("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Xn,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Zn}),eo=P("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(t,n)=>t==="<<"||n&&t===""?"<<":x,identify:()=>!1}),to=/^[A-Za-z0-9+/]*={0,2}$/;function no(t){const n=t.replace(/\s/g,"");if(n.length%4!==0||!to.test(n))return x;const o=atob(n),a=new Uint8Array(o.length);for(let r=0;r<o.length;r++)a[r]=o.charCodeAt(r);return a}function oo(t){let n="";for(let o=0;o<t.length;o++)n+=String.fromCharCode(t[o]);return btoa(n)}var ao=P("tag:yaml.org,2002:binary",{resolve:no,identify:t=>Object.prototype.toString.call(t)==="[object Uint8Array]",represent:oo}),ro=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),io=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Fe(t,n,o,a=0,r=0,i=0,l=0){const s=new Date(Date.UTC(t,n,o,a,r,i,l));return s.setUTCFullYear(t,n,o),s}function lo(t){let n=ro.exec(t);if(n===null&&(n=io.exec(t)),n===null)return x;const o=+n[1],a=+n[2]-1,r=+n[3];if(!n[4]){const c=Fe(o,a,r);return c.getUTCFullYear()!==o||c.getUTCMonth()!==a||c.getUTCDate()!==r?x:c}const i=+n[4],l=+n[5],s=+n[6];let u=0;if(i>23||l>59||s>59)return x;if(n[7]){let c=n[7].slice(0,3);for(;c.length<3;)c+="0";u=+c}const f=Fe(o,a,r,i,l,s,u);if(f.getUTCFullYear()!==o||f.getUTCMonth()!==a||f.getUTCDate()!==r)return x;if(n[9]){const c=+n[10],k=+(n[11]||0);if(c>23||k>59)return x;const h=(c*60+k)*6e4;f.setTime(f.getTime()-(n[9]==="-"?-h:h))}return f}var so=P("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:lo,identify:t=>t instanceof Date,represent:t=>t.toISOString()}),co=Te("tag:yaml.org,2002:seq",{create:()=>[],addItem:(t,n)=>{t.push(n)},identify:Array.isArray});function ae(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const n=Object.getPrototypeOf(t);return n===null||n===Object.prototype}function uo(t,n){const o={};for(const a of n)t[a]!==void 0&&(o[a]=t[a]);return o}var fo=Te("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(t,n)=>{let o;if(n instanceof Map){if(n.size!==1)return"cannot resolve an ordered map item";o=n.keys().next().value}else if(ae(n)){const a=Object.keys(n);if(a.length!==1)return"cannot resolve an ordered map item";o=a[0]}else return"cannot resolve an ordered map item";return t.seen.has(o)?"duplicate key in ordered map":(t.seen.add(o),t.list.push(n),"")},finalize:t=>t.list,identify:()=>!1}),po=Te("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(t,n)=>{if(n instanceof Map)return n.size!==1?"cannot resolve a pairs item":(t.push(n.entries().next().value),"");if(Object.prototype.toString.call(n)!=="[object Object]")return"cannot resolve a pairs item";const o=n,a=Object.keys(o);return a.length!==1?"cannot resolve a pairs item":(t.push([a[0],o[a[0]]]),"")},identify:()=>!1}),mo=oe("tag:yaml.org,2002:map",{create:()=>({}),identify:ae,represent:t=>{const n=new Map;for(const o of Object.keys(t))n.set(o,t[o]);return n},addPair:(t,n,o)=>{if(n!==null&&typeof n=="object")return"object-based map does not support complex keys";const a=String(n);return a==="__proto__"?Object.defineProperty(t,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[a]=o,""},has:(t,n)=>n!==null&&typeof n=="object"?!1:Object.prototype.hasOwnProperty.call(t,String(n)),keys:t=>Object.keys(t),get:(t,n)=>{const o=String(n);return Object.prototype.hasOwnProperty.call(t,o)?t[o]:null}}),yo=oe("tag:yaml.org,2002:set",{create:()=>new Set,identify:t=>t instanceof Set,represent:t=>{const n=new Map;for(const o of t)n.set(o,null);return n},addPair:(t,n,o)=>o!==null?"cannot resolve a set item":(t.add(n),""),has:(t,n)=>t.has(n),keys:t=>t.keys(),get:()=>null});function go(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function vo(){return{scalar:[],sequence:[],mapping:[]}}function ko(t){const n=[];for(const o of t){let a=n.length;for(let r=0;r<n.length;r++){const i=n[r];if(i.nodeKind===o.nodeKind&&i.tagName===o.tagName&&i.matchByTagPrefix===o.matchByTagPrefix){a=r;break}}n[a]=o}return n}var re=class rt{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(n){const o=ko(n),a=[],r=go(),i=vo();for(const c of o){if(c.nodeKind==="scalar"&&c.implicit){if(c.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");a.push(c)}switch(c.nodeKind){case"scalar":c.matchByTagPrefix?i.scalar.push(c):r.scalar[c.tagName]=c;break;case"sequence":c.matchByTagPrefix?i.sequence.push(c):r.sequence[c.tagName]=c;break;case"mapping":c.matchByTagPrefix?i.mapping.push(c):r.mapping[c.tagName]=c}}const l=a.filter(c=>c.implicitFirstChars===null),s=new Set;for(const c of a)if(c.implicitFirstChars!==null)for(const k of c.implicitFirstChars)s.add(k);const u=new Map;for(const c of s)u.set(c,a.filter(k=>k.implicitFirstChars===null||k.implicitFirstChars.indexOf(c)!==-1));const f=r.scalar["tag:yaml.org,2002:str"];if(!f)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=o,this.implicitScalarTags=a,this.implicitScalarByFirstChar=u,this.implicitScalarAnyFirstChar=l,this.defaultScalarTag=f,this.defaultSequenceTag=r.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=r.mapping["tag:yaml.org,2002:map"],this.exact=r,this.prefix=i}lookupScalarTag(n){const o=this.exact.scalar[n];if(o)return o;for(const a of this.prefix.scalar)if(n.startsWith(a.tagName))return a}lookupSequenceTag(n){const o=this.exact.sequence[n];if(o)return o;for(const a of this.prefix.sequence)if(n.startsWith(a.tagName))return a}lookupMappingTag(n){const o=this.exact.mapping[n];if(o)return o;for(const a of this.prefix.mapping)if(n.startsWith(a.tagName))return a}resolveImplicitScalarTag(n){const o=this.implicitScalarByFirstChar.get(n.charAt(0))??this.implicitScalarAnyFirstChar;for(const r of o){const i=r.resolve(n,!1,r.tagName);if(i!==x)return{value:i,tag:r}}const a=this.defaultScalarTag;return{value:a.resolve(n,!1,a.tagName),tag:a}}withTags(...n){let o=[];for(const a of n)o=o.concat(a);return new rt([...this.tags,...o])}},Ee=new re([mn,co,mo]);new re([...Ee.tags,vn,En,Vn,Wn]);new re([...Ee.tags,gn,Sn,ot,at]);var ho=new re([...Ee.tags,hn,$n,me,ye,so,eo,ao,fo,po,yo]),Co=ho.withTags({...me,resolve:(t,n,o)=>{const a=me.resolve(t,n,o);return a===x?ot.resolve(t,n,o):a}},{...ye,resolve:(t,n,o)=>{const a=ye.resolve(t,n,o);return a===x?at.resolve(t,n,o):a}});oe("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(t,n,o)=>(t.set(n,o),""),has:(t,n)=>t.has(n),keys:t=>t.keys(),get:(t,n)=>t.get(n),identify:t=>t instanceof Map||ae(t),represent:t=>{if(t instanceof Map)return t;const n=new Map,o=t;for(const a of Object.keys(o))n.set(a,o[a]);return n}});function Re(t){if(Array.isArray(t)){const n=Array.prototype.slice.call(t);for(let o=0;o<n.length;o++){if(Array.isArray(n[o]))return null;typeof n[o]=="object"&&Object.prototype.toString.call(n[o])==="[object Object]"&&(n[o]="[object Object]")}return String(n)}return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"?"[object Object]":String(t)}oe("tag:yaml.org,2002:map",{create:()=>({}),identify:ae,represent:t=>{const n=new Map;for(const o of Object.keys(t))n.set(o,t[o]);return n},addPair:(t,n,o)=>{const a=Re(n);return a===null?"nested arrays are not supported inside keys":(a==="__proto__"?Object.defineProperty(t,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[a]=o,"")},has:(t,n)=>{const o=Re(n);return o!==null&&Object.prototype.hasOwnProperty.call(t,o)},keys:t=>Object.keys(t),get:(t,n)=>{const o=String(n);return Object.prototype.hasOwnProperty.call(t,o)?t[o]:null}});var bo={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function ce(t,n,o,a,r){let i="",l="";const s=Math.floor(r/2)-1;return a-n>s&&(i=" ... ",n=a-s+i.length),o-a>s&&(l=" ...",o=a+s-l.length),{str:i+t.slice(n,o).replace(/\t/g,"→")+l,pos:a-n+i.length}}function de(t,n){return" ".repeat(Math.max(n-t.length,0))+t}function So(t,n){if(!t.buffer)return null;const o={...bo,...n},a=/\r?\n|\r|\0/g,r=[0],i=[];let l,s=-1;for(;l=a.exec(t.buffer);)i.push(l.index),r.push(l.index+l[0].length),t.position<=l.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);let u="";const f=Math.min(t.line+o.linesAfter,i.length).toString().length,c=o.maxLength-(o.indent+f+3);for(let h=1;h<=o.linesBefore&&!(s-h<0);h++){const S=ce(t.buffer,r[s-h],i[s-h],t.position-(r[s]-r[s-h]),c);u=`${" ".repeat(o.indent)}${de((t.line-h+1).toString(),f)} | ${S.str}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./_plugin-vue_export-helper-CHX8gon_.cjs"),G=require("@kong/kongponents"),wt=require("@shikijs/core"),xt=require("@shikijs/engine-javascript"),Lt=require("@shikijs/langs/json"),Ft=require("@shikijs/langs/yaml"),Rt=require("@shikijs/langs/terraform"),Vt=require("@shikijs/langs/shellscript"),Dt=require("@shikijs/langs/powershell"),Kt=require("@shikijs/themes/material-theme-darker"),Pt=require("@shikijs/themes/catppuccin-latte"),V=require("@kong/icons"),Mt=require("@vueuse/core"),Ut=require("vue-router"),qt=require("@kong-ui-public/misc-widgets");require("@kong-ui-public/misc-widgets/dist/style.css");var Je=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t.Secret="secret",t.RedisConfiguration="redis configuration",t))(Je||{}),Qe=(t=>(t.Edit="edit",t.Create="create",t))(Qe||{});const jt=["json","yaml","terraform","deck"],pe=["primary","secondary"];function Xe(t,n){const o={...t};for(const a of Object.keys(n))n[a].forceShow&&o[a]===void 0&&(o[a]=null);return o}function Ze(t,n,o){const{redactByApiSchema:a,redactByConfigSchema:r,getApiSchemaField:i,isObjectRecord:l}=d.useHelpers();let s=t;return l(t)&&Array.isArray(n?.fields)&&(s=Object.fromEntries(Object.entries(t).map(([u,f])=>{const c=i(n.fields,u);return[u,c?a(f,c):f]}))),r(s,o)}const zt={key:0,class:"config-card-fieldset-title"},Gt=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(t){const n=t,{i18n:{t:o}}=d.composables.useI18n(),{convertKeyToTitle:a}=d.composables.useStringHelpers();n.isArrayItem&&d.composables.useSubSchema(()=>String(n.index));const r=e.computed(()=>n.item.key??"json-array-item"),i=e.computed(()=>n.item.value??n.item),l=e.computed(()=>{const u=JSON.parse(JSON.stringify(i.value));return n.isArrayItem&&delete u.name,u}),s=e.computed(()=>n.isArrayItem?i.value?.name?a(i.value.name,"_"):o("baseConfigCard.general.entryTitle",{index:n.index}):"");return(u,f)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(t.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[t.isArrayItem?(e.openBlock(),e.createElementBlock("legend",zt,[e.createElementVNode("b",null,e.toDisplayString(s.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(l.value),(c,k)=>(e.openBlock(),e.createBlock(Se,{key:`${r.value}-property-${k}`,item:{key:c,label:e.unref(a)(c),value:l.value[c]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),et=d._export_sfc(Gt,[["__scopeId","data-v-32504351"]]),Ht={key:3,class:"navigation-subtitle"},Yt=e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(t){const{i18n:{t:n}}=d.composables.useI18n();return(o,a)=>{const r=e.resolveComponent("router-link"),i=e.resolveComponent("KButton"),l=e.resolveComponent("KSkeleton");return e.openBlock(),e.createElementBlock("div",null,[t.item.to?(e.openBlock(),e.createBlock(r,{key:0,class:"navigation-link",to:t.item.to},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1},8,["to"])):(e.openBlock(),e.createBlock(i,{key:1,appearance:"tertiary",class:"navigation-button",onClick:a[0]||(a[0]=s=>o.$emit("navigation-click",t.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})),t.item.subtitleLoading?(e.openBlock(),e.createBlock(l,{key:2,"data-testid":"navigation-subtitle-loader",type:"spinner"})):t.item.subtitle?(e.openBlock(),e.createElementBlock("div",Ht,e.toDisplayString(t.item.subtitle),1)):e.createCommentVNode("",!0)])}}}),tt=d._export_sfc(Yt,[["__scopeId","data-v-6996418f"]]),Wt=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(t){const{i18n:{t:n}}=d.composables.useI18n();return(o,a)=>{const r=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(r,{appearance:t.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.status?e.unref(n)("baseConfigCard.statusBadge.enabledLabel"):e.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}});let se=null;function Jt(){return se||(se=wt.createHighlighterCoreSync({langs:[Lt,Ft,Rt,Vt,Dt],themes:[Kt,Pt],engine:xt.createJavaScriptRegexEngine(),langAlias:{bash:"shellscript",sh:"shellscript",shell:"shellscript",zsh:"shellscript"}})),se}function Qt(t,n){return Jt().codeToHtml(t,n)}function Y({codeElement:t,code:n,language:o}){n.length>d.SHIKI_MAX_HIGHLIGHT_LENGTH||(t.innerHTML=Qt(n,{lang:o,themes:{light:"catppuccin-latte",dark:"material-theme-darker"},structure:"inline"}))}const Xt=["data-testid"],Zt=["data-testid"],en=["data-testid"],tn=["data-testid"],nn={key:1},on=["data-testid"],an=["data-testid"],rn=["data-testid"],ln=["data-testid"],sn={name:"ConfigCardItem",components:{JsonCardItem:et,StatusBadge:Wt,InternalLinkItem:tt}},cn=e.defineComponent({...sn,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(t,{emit:n}){const o=t,a=n,r=e.useId(),i=e.useSlots(),{i18n:{t:l,formatIsoDate:s,formatUnixTimeStamp:u}}=d.composables.useI18n(),f=e.computed(()=>o.item.value!==void 0&&o.item.value!==null&&o.item.value!==""),c=e.computed(()=>!!(o.item.tooltip||i["label-tooltip"])),k=e.computed(()=>o.item.type===d.ConfigurationSchemaType.Json||o.item.type===d.ConfigurationSchemaType.JsonArray),h=e.computed(()=>o.item.type===d.ConfigurationSchemaType.JsonArray),S=d.composables.useSubSchema(()=>o.item.key),{redactByApiSchema:$}=d.composables.useHelpers(),g=e.inject(d.CONFIG_CARD_SHOW_SENSITIVE_FIELDS,e.ref(!1)),m=e.computed(()=>g.value?"default":"redacted"),T=e.computed(()=>o.item.type?o.item.type:S?.value?.encrypted?d.ConfigurationSchemaType.Redacted:void 0),p=e.computed(()=>{switch(T.value){case d.ConfigurationSchemaType.ID:return{tag:"KCopy",attrs:{"data-testid":`${o.item.key}-copy-uuid`,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:o.item.label}),text:o.item.value}};case d.ConfigurationSchemaType.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:o.item.label})}};case d.ConfigurationSchemaType.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${o.item.key}-copy-uuid-redacted`,"data-dd-privacy":"mask",format:m.value,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:o.item.label}),text:o.item.value}};case d.ConfigurationSchemaType.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"data-dd-privacy":"mask",format:m.value,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:o.item.label})}};case d.ConfigurationSchemaType.Date:return{tag:"div",attrs:{"data-testid":`${o.item.key}-date`},text:isNaN(Number(o.item.value))?s(o.item.value):u(o.item.value)};case d.ConfigurationSchemaType.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${o.item.key}-badge-status`,status:o.item.value}};case d.ConfigurationSchemaType.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case d.ConfigurationSchemaType.CopyBadge:return{tag:"div",additionalComponent:"KCopy",childAttrs:{badge:!0,truncate:!0,truncationLimit:"auto",text:o.item.value}};case d.ConfigurationSchemaType.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case d.ConfigurationSchemaType.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${o.item.key}-internal-link`,item:o.item,onNavigationClick:B=>{a("navigation-click",B)}}};case d.ConfigurationSchemaType.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${o.item.key}-external-link`,href:o.item.value},text:o.item.value};case d.ConfigurationSchemaType.ManagedBy:return{tag:"div",attrs:{"data-testid":`${o.item.key}-managed-by`},text:d.getManagedByLabel(o.item.value)??"–"};case d.ConfigurationSchemaType.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${o.item.key}-json-content`,item:o.item}};case d.ConfigurationSchemaType.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${o.item.key}-json-array-content`,item:o.item}};default:return o.item.value!=null&&typeof o.item.value=="object"?{tag:"KCodeBlock",attrs:{"data-testid":`${o.item.key}-json-code`,"data-dd-privacy":"mask",id:`json-code-${r}`,language:"json",code:JSON.stringify(g.value?o.item.value:$(o.item.value,S.value),null," "),copyCode:JSON.stringify(o.item.value,null," "),maxHeight:"480px",showLineNumbers:!1,onCodeBlockRender:Y}}:{tag:"div",attrs:{"data-testid":`${o.item.key}-plain-text`},text:o.item.value}}}),y=e.ref(),N=e.ref(),{isTruncated:I}=d.composables.useTruncationDetector(y),{isTruncated:L}=d.composables.useTruncationDetector(N);return(B,E)=>{const O=e.resolveComponent("KTooltip"),v=e.resolveComponent("KLabel"),b=e.resolveComponent("KBadge"),C=e.resolveComponent("KCopy");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["config-card-details-row",{"json-array-item":h.value,"json-item":k.value&&f.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["config-card-details-label",{"json-item-label":k.value&&f.value,"slim-label":t.slim}]),"data-testid":`${t.item.key}-label`},[e.renderSlot(B.$slots,"label",{item:t.item},()=>[e.createVNode(v,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createVNode(O,{text:e.unref(I)?t.item.label:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"labelContent",ref:y,class:"label-content"},e.toDisplayString(t.item.label),513)]),_:1},8,["text"])]),_:2},[c.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${t.item.key}-label-tooltip`},[e.renderSlot(B.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(t.item.tooltip),1)],!0)],8,Zt)]),key:"0"}:void 0]),1024)],!0)],10,Xt),e.createElementVNode("div",{class:e.normalizeClass(["config-card-details-value",{"json-item-value":k.value&&f.value,"slim-value":t.slim}]),"data-testid":`${t.item.key}-property-value`},[e.renderSlot(B.$slots,t.item.key,{rowValue:t.item.value},()=>[f.value?(e.openBlock(),e.createElementBlock("div",nn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.value.tag),e.normalizeProps(e.guardReactiveProps(p.value.attrs)),{default:e.withCtx(()=>[p.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(_,F)=>(e.openBlock(),e.createBlock(b,{key:`${t.item.key}-badge-tag-${F}`,class:"config-badge","data-testid":`${t.item.key}-badge-tag-${F}`,tooltip:_,"truncation-tooltip":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,on)):p.value.additionalComponent==="KCopy"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${t.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(_,F)=>(e.openBlock(),e.createBlock(C,e.mergeProps({ref_for:!0},p.value.childAttrs,{key:`${t.item.key}-copy-uuid-${F}`,"data-testid":`${t.item.key}-copy-uuid-${F}`,text:_}),null,16,["data-testid","text"]))),128))],8,an)):p.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${t.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(_,F)=>(e.openBlock(),e.createBlock(b,{key:`${t.item.key}-badge-method-${F}`,appearance:Object.values(e.unref(G.BadgeMethodAppearances)).includes(_.toLowerCase())?_.toLowerCase():"custom",class:"config-badge","data-testid":`${t.item.key}-badge-method-${F}`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,rn)):p.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${o.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(_,F)=>(e.openBlock(),e.createBlock(et,{key:`json-array-item-${F}`,index:Number(F),"is-array-item":"",item:_},null,8,["index","item"]))),128))],8,ln)):(e.openBlock(),e.createBlock(O,{key:4,text:e.unref(L)?t.item.value:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:N,class:e.normalizeClass(["attrs-data-text",{truncated:t.truncated}])},e.toDisplayString(p.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-no-value`}," – ",8,tn))],!0)],10,en)],2)}}}),Se=d._export_sfc(cn,[["__scopeId","data-v-2270c941"]]),nt=Symbol("config-card-row-schema"),dn=e.defineComponent({__name:"ConfigCardRowSchemaScope",props:{item:{type:Object,required:!0}},setup(t){const n=t,o=e.inject(nt,void 0);if(o){const a=d.composables.useSchema();d.composables.useSchemaProvider(e.computed(()=>{const r=o(n.item);return r?r.schema:a?.value}))}return(a,r)=>e.renderSlot(a.$slots,"default")}}),un={class:"json-config config-card-code-block"},fn=["title"],pn=e.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},requestMethod:{type:String,required:!1,default:""},entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null}},setup(t){e.useCssVars(i=>({v6e8a5e62:`${r.value}ch`}));const n=t,{i18n:{t:o}}=d.composables.useI18n(),a=e.computed(()=>n.entityRecord),r=e.computed(()=>{if(!n.fetcherUrl)return 0;const i=n.fetcherUrl?.split("/");return i.length<2?0:41+(n.requestMethod==="post"?i[i.length-1]:i[i.length-2]).length});return(i,l)=>{const s=e.resolveComponent("KBadge"),u=e.resolveComponent("KClipboardProvider"),f=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock("div",un,[t.entityRecord?(e.openBlock(),e.createBlock(f,{key:0,id:"json-codeblock",code:JSON.stringify(a.value,null,2),"copy-code":JSON.stringify(t.unredactedRecord||a.value,null,2),"data-dd-privacy":"mask",language:"json","max-height":e.unref(d.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT),theme:"dark",onCodeBlockRender:e.unref(Y)},e.createSlots({_:2},[t.fetcherUrl?{name:"actions",fn:e.withCtx(()=>[e.createVNode(s,{appearance:t.requestMethod,class:"json-endpoint-method","data-testid":"json-endpoint-method"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.requestMethod),1)]),_:1},8,["appearance"]),e.createElementVNode("code",{id:"json-endpoint-codeblock",class:"json-endpoint-url",title:t.fetcherUrl},e.toDisplayString(t.fetcherUrl),9,fn),e.createVNode(u,null,{default:e.withCtx(({copyToClipboard:c})=>[e.createVNode(e.unref(G.KCodeBlockIconButton),{"aria-label":e.unref(o)("jsonCodeBlock.copy_url"),"copy-tooltip":e.unref(o)("jsonCodeBlock.copy_url"),"data-testid":"code-block-copy-button-json-endpoint-codeblock",onClick:k=>c(t.fetcherUrl)},{default:e.withCtx(()=>[e.createVNode(e.unref(V.CopyIcon),{decorative:""})]),_:1},8,["aria-label","copy-tooltip","onClick"])]),_:1})]),key:"0"}:void 0]),1032,["code","copy-code","max-height","onCodeBlockRender"])):e.createCommentVNode("",!0)])}}}),Be=d._export_sfc(pn,[["__scopeId","data-v-8736ff0c"]]);var x=Symbol("NOT_RESOLVED");function P(t,n){return{tagName:t,nodeKind:"scalar",implicit:n.implicit??!1,matchByTagPrefix:n.matchByTagPrefix??!1,implicitFirstChars:n.implicitFirstChars??null,resolve:n.resolve,identify:n.identify,represent:n.represent??(o=>String(o)),representTagName:n.representTagName??(()=>t)}}function Te(t,n){const o=n.finalize===void 0;return{tagName:t,nodeKind:"sequence",implicit:!1,matchByTagPrefix:n.matchByTagPrefix??!1,create:n.create,addItem:n.addItem,finalize:n.finalize??(a=>a),carrierIsResult:o,identify:n.identify,represent:n.represent??(a=>a),representTagName:n.representTagName??(()=>t)}}function oe(t,n){const o=n.finalize===void 0;return{tagName:t,nodeKind:"mapping",implicit:!1,matchByTagPrefix:n.matchByTagPrefix??!1,create:n.create,addPair:n.addPair,has:n.has,keys:n.keys,get:n.get,finalize:n.finalize??(a=>a),carrierIsResult:o,identify:n.identify,represent:n.represent??(a=>a),representTagName:n.representTagName??(()=>t)}}var mn=P("tag:yaml.org,2002:str",{resolve:t=>t,identify:t=>typeof t=="string"}),yn=["","~","null","Null","NULL"],gn=P("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>yn.indexOf(t)!==-1?null:x,identify:t=>t===null,represent:()=>"null"}),vn=P("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(t,n)=>t==="null"||n&&t===""?null:x,identify:t=>t===null,represent:()=>"null"}),kn=["","~","null","Null","NULL"],hn=P("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>kn.indexOf(t)!==-1?null:x,identify:t=>t===null,represent:()=>"null"}),Cn=["true","True","TRUE"],bn=["false","False","FALSE"],Sn=P("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:t=>Cn.indexOf(t)!==-1?!0:bn.indexOf(t)!==-1?!1:x,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),Bn=["true"],Tn=["false"],En=P("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:t=>Bn.indexOf(t)!==-1?!0:Tn.indexOf(t)!==-1?!1:x,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),Nn=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],_n=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],$n=P("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:t=>Nn.indexOf(t)!==-1?!0:_n.indexOf(t)!==-1?!1:x,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),In=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),On=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function An(t){let n=t,o=1;return(n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b")?o*parseInt(n.slice(2),2):n.startsWith("0o")?o*parseInt(n.slice(2),8):n.startsWith("0x")?o*parseInt(n.slice(2),16):o*parseInt(n,10)}function wn(t,n){if(n){if(!On.test(t))return x}else if(!In.test(t))return x;const o=An(t);return Number.isFinite(o)?o:x}var ot=P("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:wn,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),xn=new RegExp("^-?(?:0|[1-9][0-9]*)$"),Ln=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function Fn(t){let n=t,o=1;return(n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b")?o*parseInt(n.slice(2),2):n.startsWith("0o")?o*parseInt(n.slice(2),8):n.startsWith("0x")?o*parseInt(n.slice(2),16):o*parseInt(n,10)}function Rn(t,n){if(n){if(!Ln.test(t))return x}else if(!xn.test(t))return x;const o=Fn(t);return Number.isFinite(o)?o:x}var Vn=P("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Rn,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),Dn=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function Kn(t){let n=t.replace(/_/g,""),o=1;if((n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b"))return o*parseInt(n.slice(2),2);if(n.startsWith("0x"))return o*parseInt(n.slice(2),16);if(n.includes(":")){let a=0;for(const r of n.split(":"))a=a*60+Number(r);return o*a}return n!=="0"&&n[0]==="0"?o*parseInt(n,8):o*parseInt(n,10)}function Pn(t){if(!Dn.test(t))return x;const n=Kn(t);return Number.isFinite(n)?n:x}var me=P("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Pn,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),Mn=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Un=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function qn(t){if(!Mn.test(t))return x;let n=t.toLowerCase();const o=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;const a=o*parseFloat(n);return Number.isFinite(a)||Un.test(t)?a:x}function jn(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var at=P("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:qn,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:jn}),zn=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Gn=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hn(t,n){if(n){if(!Gn.test(t))return x;let a=t.toLowerCase();const r=a[0]==="-"?-1:1;if("+-".includes(a[0])&&(a=a.slice(1)),a===".inf")return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(a===".nan")return NaN;const i=r*parseFloat(a);return Number.isFinite(i)?i:x}if(!zn.test(t))return x;const o=Number(t);return Number.isFinite(o)?o:x}function Yn(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var Wn=P("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Hn,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Yn}),Jn=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Qn=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Xn(t){if(!Jn.test(t))return x;let n=t.toLowerCase().replace(/_/g,"");const o=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;let a=0;if(n.includes(":")){for(const r of n.split(":"))a=a*60+Number(r);a*=o}else a=o*parseFloat(n);return Number.isFinite(a)||Qn.test(t)?a:x}function Zn(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var ye=P("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Xn,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Zn}),eo=P("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(t,n)=>t==="<<"||n&&t===""?"<<":x,identify:()=>!1}),to=/^[A-Za-z0-9+/]*={0,2}$/;function no(t){const n=t.replace(/\s/g,"");if(n.length%4!==0||!to.test(n))return x;const o=atob(n),a=new Uint8Array(o.length);for(let r=0;r<o.length;r++)a[r]=o.charCodeAt(r);return a}function oo(t){let n="";for(let o=0;o<t.length;o++)n+=String.fromCharCode(t[o]);return btoa(n)}var ao=P("tag:yaml.org,2002:binary",{resolve:no,identify:t=>Object.prototype.toString.call(t)==="[object Uint8Array]",represent:oo}),ro=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),io=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Fe(t,n,o,a=0,r=0,i=0,l=0){const s=new Date(Date.UTC(t,n,o,a,r,i,l));return s.setUTCFullYear(t,n,o),s}function lo(t){let n=ro.exec(t);if(n===null&&(n=io.exec(t)),n===null)return x;const o=+n[1],a=+n[2]-1,r=+n[3];if(!n[4]){const c=Fe(o,a,r);return c.getUTCFullYear()!==o||c.getUTCMonth()!==a||c.getUTCDate()!==r?x:c}const i=+n[4],l=+n[5],s=+n[6];let u=0;if(i>23||l>59||s>59)return x;if(n[7]){let c=n[7].slice(0,3);for(;c.length<3;)c+="0";u=+c}const f=Fe(o,a,r,i,l,s,u);if(f.getUTCFullYear()!==o||f.getUTCMonth()!==a||f.getUTCDate()!==r)return x;if(n[9]){const c=+n[10],k=+(n[11]||0);if(c>23||k>59)return x;const h=(c*60+k)*6e4;f.setTime(f.getTime()-(n[9]==="-"?-h:h))}return f}var so=P("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:lo,identify:t=>t instanceof Date,represent:t=>t.toISOString()}),co=Te("tag:yaml.org,2002:seq",{create:()=>[],addItem:(t,n)=>{t.push(n)},identify:Array.isArray});function ae(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const n=Object.getPrototypeOf(t);return n===null||n===Object.prototype}function uo(t,n){const o={};for(const a of n)t[a]!==void 0&&(o[a]=t[a]);return o}var fo=Te("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(t,n)=>{let o;if(n instanceof Map){if(n.size!==1)return"cannot resolve an ordered map item";o=n.keys().next().value}else if(ae(n)){const a=Object.keys(n);if(a.length!==1)return"cannot resolve an ordered map item";o=a[0]}else return"cannot resolve an ordered map item";return t.seen.has(o)?"duplicate key in ordered map":(t.seen.add(o),t.list.push(n),"")},finalize:t=>t.list,identify:()=>!1}),po=Te("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(t,n)=>{if(n instanceof Map)return n.size!==1?"cannot resolve a pairs item":(t.push(n.entries().next().value),"");if(Object.prototype.toString.call(n)!=="[object Object]")return"cannot resolve a pairs item";const o=n,a=Object.keys(o);return a.length!==1?"cannot resolve a pairs item":(t.push([a[0],o[a[0]]]),"")},identify:()=>!1}),mo=oe("tag:yaml.org,2002:map",{create:()=>({}),identify:ae,represent:t=>{const n=new Map;for(const o of Object.keys(t))n.set(o,t[o]);return n},addPair:(t,n,o)=>{if(n!==null&&typeof n=="object")return"object-based map does not support complex keys";const a=String(n);return a==="__proto__"?Object.defineProperty(t,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[a]=o,""},has:(t,n)=>n!==null&&typeof n=="object"?!1:Object.prototype.hasOwnProperty.call(t,String(n)),keys:t=>Object.keys(t),get:(t,n)=>{const o=String(n);return Object.prototype.hasOwnProperty.call(t,o)?t[o]:null}}),yo=oe("tag:yaml.org,2002:set",{create:()=>new Set,identify:t=>t instanceof Set,represent:t=>{const n=new Map;for(const o of t)n.set(o,null);return n},addPair:(t,n,o)=>o!==null?"cannot resolve a set item":(t.add(n),""),has:(t,n)=>t.has(n),keys:t=>t.keys(),get:()=>null});function go(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function vo(){return{scalar:[],sequence:[],mapping:[]}}function ko(t){const n=[];for(const o of t){let a=n.length;for(let r=0;r<n.length;r++){const i=n[r];if(i.nodeKind===o.nodeKind&&i.tagName===o.tagName&&i.matchByTagPrefix===o.matchByTagPrefix){a=r;break}}n[a]=o}return n}var re=class rt{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(n){const o=ko(n),a=[],r=go(),i=vo();for(const c of o){if(c.nodeKind==="scalar"&&c.implicit){if(c.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");a.push(c)}switch(c.nodeKind){case"scalar":c.matchByTagPrefix?i.scalar.push(c):r.scalar[c.tagName]=c;break;case"sequence":c.matchByTagPrefix?i.sequence.push(c):r.sequence[c.tagName]=c;break;case"mapping":c.matchByTagPrefix?i.mapping.push(c):r.mapping[c.tagName]=c}}const l=a.filter(c=>c.implicitFirstChars===null),s=new Set;for(const c of a)if(c.implicitFirstChars!==null)for(const k of c.implicitFirstChars)s.add(k);const u=new Map;for(const c of s)u.set(c,a.filter(k=>k.implicitFirstChars===null||k.implicitFirstChars.indexOf(c)!==-1));const f=r.scalar["tag:yaml.org,2002:str"];if(!f)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=o,this.implicitScalarTags=a,this.implicitScalarByFirstChar=u,this.implicitScalarAnyFirstChar=l,this.defaultScalarTag=f,this.defaultSequenceTag=r.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=r.mapping["tag:yaml.org,2002:map"],this.exact=r,this.prefix=i}lookupScalarTag(n){const o=this.exact.scalar[n];if(o)return o;for(const a of this.prefix.scalar)if(n.startsWith(a.tagName))return a}lookupSequenceTag(n){const o=this.exact.sequence[n];if(o)return o;for(const a of this.prefix.sequence)if(n.startsWith(a.tagName))return a}lookupMappingTag(n){const o=this.exact.mapping[n];if(o)return o;for(const a of this.prefix.mapping)if(n.startsWith(a.tagName))return a}resolveImplicitScalarTag(n){const o=this.implicitScalarByFirstChar.get(n.charAt(0))??this.implicitScalarAnyFirstChar;for(const r of o){const i=r.resolve(n,!1,r.tagName);if(i!==x)return{value:i,tag:r}}const a=this.defaultScalarTag;return{value:a.resolve(n,!1,a.tagName),tag:a}}withTags(...n){let o=[];for(const a of n)o=o.concat(a);return new rt([...this.tags,...o])}},Ee=new re([mn,co,mo]);new re([...Ee.tags,vn,En,Vn,Wn]);new re([...Ee.tags,gn,Sn,ot,at]);var ho=new re([...Ee.tags,hn,$n,me,ye,so,eo,ao,fo,po,yo]),Co=ho.withTags({...me,resolve:(t,n,o)=>{const a=me.resolve(t,n,o);return a===x?ot.resolve(t,n,o):a}},{...ye,resolve:(t,n,o)=>{const a=ye.resolve(t,n,o);return a===x?at.resolve(t,n,o):a}});oe("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(t,n,o)=>(t.set(n,o),""),has:(t,n)=>t.has(n),keys:t=>t.keys(),get:(t,n)=>t.get(n),identify:t=>t instanceof Map||ae(t),represent:t=>{if(t instanceof Map)return t;const n=new Map,o=t;for(const a of Object.keys(o))n.set(a,o[a]);return n}});function Re(t){if(Array.isArray(t)){const n=Array.prototype.slice.call(t);for(let o=0;o<n.length;o++){if(Array.isArray(n[o]))return null;typeof n[o]=="object"&&Object.prototype.toString.call(n[o])==="[object Object]"&&(n[o]="[object Object]")}return String(n)}return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"?"[object Object]":String(t)}oe("tag:yaml.org,2002:map",{create:()=>({}),identify:ae,represent:t=>{const n=new Map;for(const o of Object.keys(t))n.set(o,t[o]);return n},addPair:(t,n,o)=>{const a=Re(n);return a===null?"nested arrays are not supported inside keys":(a==="__proto__"?Object.defineProperty(t,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[a]=o,"")},has:(t,n)=>{const o=Re(n);return o!==null&&Object.prototype.hasOwnProperty.call(t,o)},keys:t=>Object.keys(t),get:(t,n)=>{const o=String(n);return Object.prototype.hasOwnProperty.call(t,o)?t[o]:null}});var bo={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function ce(t,n,o,a,r){let i="",l="";const s=Math.floor(r/2)-1;return a-n>s&&(i=" ... ",n=a-s+i.length),o-a>s&&(l=" ...",o=a+s-l.length),{str:i+t.slice(n,o).replace(/\t/g,"→")+l,pos:a-n+i.length}}function de(t,n){return" ".repeat(Math.max(n-t.length,0))+t}function So(t,n){if(!t.buffer)return null;const o={...bo,...n},a=/\r?\n|\r|\0/g,r=[0],i=[];let l,s=-1;for(;l=a.exec(t.buffer);)i.push(l.index),r.push(l.index+l[0].length),t.position<=l.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);let u="";const f=Math.min(t.line+o.linesAfter,i.length).toString().length,c=o.maxLength-(o.indent+f+3);for(let h=1;h<=o.linesBefore&&!(s-h<0);h++){const S=ce(t.buffer,r[s-h],i[s-h],t.position-(r[s]-r[s-h]),c);u=`${" ".repeat(o.indent)}${de((t.line-h+1).toString(),f)} | ${S.str}
2
2
  ${u}`}const k=ce(t.buffer,r[s],i[s],t.position,c);u+=`${" ".repeat(o.indent)}${de((t.line+1).toString(),f)} | ${k.str}
3
3
  `,u+=`${"-".repeat(o.indent+f+3+k.pos)}^
4
4
  `;for(let h=1;h<=o.linesAfter&&!(s+h>=i.length);h++){const S=ce(t.buffer,r[s+h],i[s+h],t.position-(r[s]-r[s+h]),c);u+=`${" ".repeat(o.indent)}${de((t.line+h+1).toString(),f)} | ${S.str}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as H, computed as S, openBlock as d, createBlock as E, resolveDynamicComponent as pe, normalizeClass as Z, withCtx as g, createElementBlock as $, createElementVNode as F, toDisplayString as T, createCommentVNode as L, Fragment as ee, renderList as ie, unref as c, resolveComponent as R, createTextVNode as K, useId as Tn, useSlots as Fe, inject as ke, ref as P, renderSlot as x, createVNode as O, createSlots as se, normalizeProps as At, guardReactiveProps as Nt, mergeProps as ye, useCssVars as Bt, watch as le, watchEffect as $n, provide as Ne, onMounted as Oe, normalizeStyle as In, onBeforeMount as Ze, withModifiers as Ee, Teleport as Lt, onUnmounted as _n, withDirectives as he, vShow as be, withKeys as Ft, shallowRef as En, onBeforeUnmount as Rt, warn as On, useTemplateRef as An } from "vue";
2
- import { u as Nn, c as U, _ as X, S as Bn, C as G, a as wt, g as Ln, b as Re, d as ge, E as Fn, I as Rn, e as Ae, D as Kt, f as wn, h as Kn, i as xn, j as oe, P as Pn, k as Dn, n as Un } from "./_plugin-vue_export-helper-CzCSHAcC.js";
3
- import { l as nc, F as ac, M as ic, m as rc, o as oc } from "./_plugin-vue_export-helper-CzCSHAcC.js";
2
+ import { u as Nn, c as U, _ as X, S as Bn, C as G, a as wt, g as Ln, b as Re, d as ge, E as Fn, I as Rn, e as Ae, D as Kt, f as wn, h as Kn, i as xn, j as oe, P as Pn, k as Dn, n as Un } from "./_plugin-vue_export-helper-CVlAL6HT.js";
3
+ import { l as nc, F as ac, M as ic, m as rc, o as oc } from "./_plugin-vue_export-helper-CVlAL6HT.js";
4
4
  import { BadgeMethodAppearances as Mn, KCodeBlockIconButton as qn, KExternalLink as jn, KButton as ct, KInput as zn, KTruncate as Vn, KBadge as Yn } from "@kong/kongponents";
5
5
  import { createHighlighterCoreSync as Wn } from "@shikijs/core";
6
6
  import { createJavaScriptRegexEngine as Hn } from "@shikijs/engine-javascript";
@@ -36,5 +36,13 @@ dataKeyNameRef?: MaybeRefOrGetter<string | undefined>): {
36
36
  }>;
37
37
  fetcherCacheKey: Ref<number, number>;
38
38
  };
39
+ /**
40
+ * Add the pagination params a name-filtered request needs.
41
+ *
42
+ * Konnect `/search` endpoints (KSearch) page with `size` and an `offset` cursor, and ignore
43
+ * `page[size]`/`page[number]`, so they get `size` (the url builder already adds `offset`).
44
+ * Other `filter[name]` requests keep the `page[size]`/`page[number]` params.
45
+ */
46
+ export declare function withFilterPagination(requestUrl: string, { pageSize, page }: TableDataFetcherParams): string;
39
47
  export declare function useFetcherCacheKey(cacheId?: string): Ref<number, number>;
40
48
  //# sourceMappingURL=useFetcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFetcher.d.ts","sourceRoot":"","sources":["../../../src/composables/useFetcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAChD,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,0BAA0B,EAC1B,sBAAsB,EACtB,QAAQ,EACT,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGxC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAK/D,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,SAAS,EAAE,gBAAgB,CAAC,sBAAsB,GAAG,0BAA0B,CAAC,EAChF,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC;AACzB;;;;;GAKG;AACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC;6BAYf,sBAAsB,KAAG,OAAO,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;EA4FxF;AAED,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,uBAWlD"}
1
+ {"version":3,"file":"useFetcher.d.ts","sourceRoot":"","sources":["../../../src/composables/useFetcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAChD,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,0BAA0B,EAC1B,sBAAsB,EACtB,QAAQ,EACT,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGxC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAK/D,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,SAAS,EAAE,gBAAgB,CAAC,sBAAsB,GAAG,0BAA0B,CAAC,EAChF,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC;AACzB;;;;;GAKG;AACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC;6BAYf,sBAAsB,KAAG,OAAO,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;EAuFxF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,sBAAsB,GAAG,MAAM,CAmB3G;AAED,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,uBAWlD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-shared",
3
- "version": "3.73.8",
3
+ "version": "3.73.9-pr.4150.42cdddd87.0",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-shared.umd.js",
6
6
  "module": "./dist/entities-shared.es.js",
@@ -1 +0,0 @@
1
- "use strict";const $=require("axios"),i=require("vue"),M=require("@kong-ui-public/i18n"),oe=Symbol("PLUGIN_FORM_LAYOUT_STATE"),ce=Symbol("CONFIG_CARD_SHOW_SENSITIVE_FIELDS"),R=Symbol("DECK_COMMAND_EDITOR"),K="[entities-shared] DeckCommandEditor was not provided. Provide it via the `DECK_COMMAND_EDITOR_KEY` injection key or the `provideDeckCommandEditor` helper (see @kong-ui-public/entities-shared/deck-editor).",ie="50vh",le=2e5,Y={MANAGED_BY:"KM-3018-entity-managed-by"};function ue(){return{getAxiosInstance:(e={})=>{try{const n=i.inject("get-axios-instance",void 0);return typeof n=="function"?n(e):$.create({withCredentials:!0,timeout:3e4,...e})}catch(n){return console.warn("getAxiosInstance:",n.message||n),$.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{const n=e?.response?.headers||{};return n["x-trace-id"]||n["x-datadog-trace-id"]||""}}}function de(){return{debounce:(e,n)=>{let o;return(...t)=>{clearTimeout(o),o=window?.setTimeout(()=>{e(...t)},n)}}}}const L="khcp-user-table-preferences",J={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnVisibility:{}};function fe(){const e=o=>{if(typeof o=="string")try{return JSON.parse(o)}catch(t){console.error("useTablePreferences(tryParseJson)",t);return}},n=()=>{const o=e(localStorage.getItem(L));return!o||!Object.keys(o).length?new Map:new Map(Object.entries(o))};return{setTablePreferences:(o,t)=>{try{const a=n();a.set(o,t),localStorage.setItem(L,JSON.stringify(Object.fromEntries(a.entries())))}catch(a){console.error("useTablePreferences(setTablePreferences)",a)}},getTablePreferences:(o,t)=>n()?.get(o)||void 0||t||J,deleteAllTablePreferences:()=>{localStorage.removeItem(L)}}}function N(e={}){const{getAxiosInstance:n}=ue();return{axiosInstance:n(e)}}const pe={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},ge={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ye={actions:{viewConfiguration:"View configuration",hideConfiguration:"Hide configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON",terraform:"Terraform",deck:"decK"},errors:{edit:"The entity could not be edited at this time."}},me={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},he={title:"Configuration",actions:{copy:"Copy JSON",deck_customize:"Customize before copying to CLI",deck_customize_cancel:"Cancel",sensitive_fields:"Show sensitive fields",sensitive_fields_tooltip:"View masked sensitive data in your configurations if any field values have been redacted."},sections:{advanced:"Advanced",plugin:"Plugin specific configuration",policy:"Policy specific configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last updated",created_at_label:"Created",managed_by_label:"Managed By",tags_label:"Tags",link:"Link",partial_label:"Redis configuration"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{formatLabel:"Format:",entryTitle:"Entry {index}",structuredFormat:"Structured"}},be={learnMore:"Learn more",pricingTitle:"Pricing: "},_e={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},ve={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Ae={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ce={utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},Ie={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},ke={copy_url:"Copy URL"},we={hint:{konnect:"The {token} environment variable must be added first. See {link} for details.",kongManager:"If your Admin API is secured, set up authentication following {link}."},documentation:"the documentation",steps:{step_1:"Step 1: Export token",step_2:"Step 2: Apply configuration"},customization:{title:"Customize before copying to CLI",copy_pat:"Make sure to copy your personal access token now. You won't be able to see it again.",reuse_pat:"Use an existing PAT if you've already generated one.",generate_pat:"Generate PAT",footer_reminder:"Changes you make here won't affect your configuration. After you apply changes with decK in the CLI, refresh the page to view them.",secret_advise:"Command may contain sensitive values. Treat it as a secret."},copy_tooltip:"Copy"},Ee={body:"Want a ready-to-use CLI command? {cta} to view this configuration as a decK sync snippet you can copy directly.",cta:"Switch to decK format"},De={title:"Generate a Personal Access Token",description:"Personal access tokens are used to authenticate decK commands and Konnect API requests.",fields:{name:{label:"Name",placeholder:"Enter token name"},expiresAt:{label:"Expiration date",placeholder:"Select an expiration date",n_days:"{n} days"}},actions:{cancel:"Cancel",generate:"Generate",generating:"Generating…"}},Oe={dismissLabel:"Dismiss"},Le={rotateKey:"Rotate key",generateKey:"Generate key",placeholder:"Enter or generate a key",oneTimeHint:"The key is shown only once. Copy it now and store it securely.",copy:"Copy",showKey:"Show key",hideKey:"Hide key"},X={global:pe,deleteModal:ge,baseForm:ye,baseTable:me,baseConfigCard:he,emptyState:be,filter:_e,debouncedFilter:ve,errors:Ae,validationErrors:Ce,toggleModal:Ie,jsonCodeBlock:ke,deckCodeBlock:we,deckCallout:Ee,generatePatModal:De,onboardingCard:Oe,sensitiveInput:Le};function O(){const e=M.createI18n("en-us",X);return{i18n:e,i18nT:M.i18nTComponent(e)}}var C=(e=>(e[e.InitialLoad=0]="InitialLoad",e[e.Loading=1]="Loading",e[e.Idle=2]="Idle",e[e.NoResults=3]="NoResults",e[e.NoRecords=4]="NoRecords",e[e.Error=5]="Error",e))(C||{}),P=(e=>(e.CaCertificate="ca_certificate",e.Certificate="certificate",e.Consumer="consumer",e.ConsumerGroup="consumer_group",e.GatewayService="service",e.Key="key",e.KeySet="set",e.Plugin="plugin",e.Route="route",e.SNI="sni",e.Upstream="upstream",e.Target="target",e.Vault="vault",e.Partial="partial",e.CloudGatewayAddon="cloud_gateway_addon",e.BackendCluster="backend_cluster",e.VirtualCluster="virtual_cluster",e.Listener="listener",e.ProducePolicy="produce_policy",e.ConsumePolicy="consume_policy",e.ClusterPolicy="cluster_policy",e.ListenerPolicy="listener_policy",e.SchemaRegistry="schema_registry",e.StaticKey="static_key",e.TlsTrustBundle="tls_trust_bundle",e.AuthServer="auth_server",e.AuthServerScopes="auth_server_scopes",e.AuthServerClaims="auth_server_claims",e.AuthServerClients="auth_server_clients",e.Other="other",e.PluginSchema="plugin_schema",e.CustomPlugin="custom_plugin",e.ClonedPlugin="cloned_plugin",e))(P||{});const Te=Object.values(P),q=["ca_certificate","certificate","consumer","consumer_group","service","key","set","plugin","plugin_schema","custom_plugin","cloned_plugin","route","upstream","target","vault","partial"];function B(e){return q.includes(e)}const Me=["backend_cluster","virtual_cluster","listener","produce_policy","consume_policy","cluster_policy","listener_policy","schema_registry","static_key","tls_trust_bundle"],xe=["auth_server","auth_server_scopes","auth_server_claims","auth_server_clients"];var D=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.CopyBadge="copy-badge",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e.ManagedBy="managed-by",e))(D||{}),Q=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e.Policy="policy",e))(Q||{});const Re=["structured","yaml","json","terraform","deck"];function F(){const e=(c,r)=>r?.[c]??void 0,n=(c,r)=>{if(c.length!==r.length)return!1;const f=new Set([...c,...r]);for(const l of f){const p=c.filter(_=>_===l).length,m=r.filter(_=>_===l).length;if(p!==m)return!1}return!0},o=(c,r,f)=>{if(f){if(Object.keys(c).length===Object.keys(r).length)for(const l in c)if(Array.isArray(c[l])&&Array.isArray(r[l])){if(n(c[l],r[l]))continue;return!1}else{if(c[l]===r[l])continue;return!1}else return!1;return!0}try{return JSON.stringify(c)===JSON.stringify(r)}catch{return!1}},t=c=>(r,f)=>{let l=r[c]===void 0||r[c]===null?"":r[c],p=f[c]===void 0||f[c]===null?"":f[c];return Array.isArray(r[c])&&(l=r[c][0]),Array.isArray(f[c])&&(p=f[c][0]),l.localeCompare(p)},a=c=>c?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(c):!1,u="********",s=c=>!!c&&typeof c=="object"&&!Array.isArray(c),d=(c,r)=>c?.find(l=>Object.keys(l)?.[0]===r)?.[r],g=(c,r)=>{if(!r||c===null||c===void 0)return c;if(r.type==="string")return r.encrypted?u:c;if(r.type==="record"||r.type==="map"){if(!s(c))return c;if(r.type==="map"&&!r.values)return{...c};const f={};for(const l in c)if(r.type==="record"){const p=d(r.fields,l);f[l]=p?g(c[l],p):c[l]}else if(r.type==="map"){const p=r.values;f[l]=g(c[l],{...p,encrypted:!!(r.encrypted||p.encrypted)})}return f}if((r.type==="array"||r.type==="set")&&Array.isArray(c)){const f=r.elements;return f?c.map(l=>g(l,{...f,encrypted:!!(r.encrypted||f.encrypted)})):c.slice()}return c},h=(c,r)=>{if(Array.isArray(c))return c.map(l=>h(l,r));if(!s(c))return c;const f={};for(const l in c){if(r[l]?.type===D.Redacted){f[l]=u;continue}if(r[l]?.type===D.RedactedArray&&Array.isArray(c[l])){f[l]=c[l].map(()=>u);continue}f[l]=h(c[l],r)}return f};return{getPropValue:e,objectsAreEqual:o,sortAlpha:t,isValidUuid:a,isObjectRecord:s,getApiSchemaField:d,redactByApiSchema:g,redactByConfigSchema:h}}function Ke(e,n,o,t={fetchedItemsKey:"data",searchKeys:["id"]}){o||(o="1000");const{axiosInstance:a}=N(e.axiosRequestConfig),{i18n:{t:u}}=O(),{debounce:s}=de(),d=s(async y=>{await k(y)},200),g=i.ref(!1),h=i.ref(""),c=i.ref(""),r=i.ref([]),f=i.ref([]),l=i.ref(void 0),p=i.computed(()=>{let y=`${e.apiBaseUrl}${i.unref(n)}`;return e.app==="konnect"&&(y=y.replace(/{controlPlaneId}/gi,e?.controlPlaneId||"")),y.replace(/\/{workspace}/gi,e?.workspace?`/${e.workspace}`:"")}),{isValidUuid:m}=F(),_=async()=>{try{g.value=!0;const{data:y}=await a.get(`${p.value}?size=${o}`);y?.next||(l.value=t.fetchedItemsKey in y?y[t.fetchedItemsKey]:[]),f.value=t.fetchedItemsKey in y?y[t.fetchedItemsKey]:[],r.value=f.value}catch{r.value=[],h.value=u("debouncedFilter.errors.fetch")}finally{g.value=!1}},I=i.ref(""),k=async y=>{if(I.value!==y){if(I.value=y??"",!y){r.value=f.value;return}if(l.value===void 0)try{if(g.value=!0,h.value="",c.value="",e.app==="konnect"){const b=`${p.value}/${y}`,{data:v}=await a.get(`${b}?size=${o}`);t.fetchedItemsKey in v?r.value=v[t.fetchedItemsKey]:v?.[t.exactMatchKey??"id"]?r.value=[v]:r.value=[]}else{const b=[];m(y)&&t.searchKeys.includes("id")?b.push((async()=>{const{data:A}=await a.get(`${p.value}/${y}`);return[A[t.fetchedItemsKey]??A]})()):b.push(...t.searchKeys.filter(A=>A!=="id").map(async A=>{const{data:E}=await a.get(`${p.value}?${A}=${y}`);return E[t.fetchedItemsKey]}));const v=await Promise.all(b),w=new Set;r.value=[],v?.forEach?.(A=>{A?.forEach?.(E=>{w.has(E.id)||(w.add(E.id),r.value.push(E))})})}}catch(b){b?.response?.status===404?c.value=u("debouncedFilter.errors.invalid"):(r.value=[],h.value=u("debouncedFilter.errors.fetch"))}finally{g.value=!1}else g.value=!0,c.value="",r.value=l.value?.filter(b=>{let v=!1;for(const w of t.searchKeys)(typeof b[w]=="string"?b[w]?.toLowerCase():b[w])?.includes(y.toLowerCase())&&(v=!0);return v}),(!r.value||!r.value.length)&&(c.value=u("debouncedFilter.errors.invalid")),g.value=!1}};return{loading:g,error:h,validationError:c,results:r,allRecords:l,loadItems:_,debouncedQueryChange:d}}function Ne(e,n){const o=i.inject(R,null),t=i.computed(()=>{const s=i.toValue(e),d=s.app==="kongManager"||!!(s.app==="konnect"&&s.enableDeckConfig),g=i.toValue(n);return d&&g!==void 0&&B(g)}),a=i.computed(()=>{const s=i.toValue(e),d=s.app==="konnect"&&s.enableDeckConfig&&typeof s.enableDeckConfig!="boolean"?s.enableDeckConfig.customization:void 0;if(d&&!o){console.warn(K);return}return d}),u=i.computed(()=>{const s=i.toValue(e);return s.app==="konnect"&&s.enableDeckConfig&&typeof s.enableDeckConfig!="boolean"?s.enableDeckConfig.calloutPreferenceKey:s.app==="kongManager"?s.deckCalloutPreferenceKey:void 0});return{isDeckEnabled:t,deckCustomizationOptions:a,deckCalloutPreferenceKey:u}}function Pe(e,n){const o=i.inject(R,null),t=i.computed(()=>{const s=i.toValue(e);return(s.app==="kongManager"||!!(s.app==="konnect"&&s.enableDeckTab))&&B(i.toValue(n))}),a=i.computed(()=>{const s=i.toValue(e),d=s.app==="konnect"&&s.enableDeckTab&&typeof s.enableDeckTab!="boolean"?s.enableDeckTab.customization:void 0;if(d&&!o){console.warn(K);return}return d}),u=i.computed(()=>{const s=i.toValue(e);return s.app==="konnect"&&s.enableDeckTab&&typeof s.enableDeckTab!="boolean"?s.enableDeckTab.calloutPreferenceKey:s.app==="kongManager"?s.deckCalloutPreferenceKey:void 0});return{isDeckEnabled:t,deckCustomizationOptions:a,deckCalloutPreferenceKey:u}}function Be(e,n){const o=i.unref(n),t=i.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${o}`):new URL(o));return t.value.search="",a=>`${t.value.href}/${a}`}function Fe(){const{i18n:{t:e}}=O();return{getErrorFieldsFromError:t=>{if(!t)return{messages:[e("errors.unexpected")],fields:[]};if(t?.response?.status===401)return{messages:[],fields:[]};let a=[e("errors.unexpected")];const u=[];if(t?.response?.data){if(t.response.data.details?.length)return a=[],t.response.data.details.forEach(s=>{let d=e("errors.unexpected");s.messages&&Array.isArray(s.messages)&&s.messages.length&&(d=s.messages.join(", ")),s.field&&u.push({field:s.field,message:d}),a.push(`${s.field??""} ${d}`)}),{messages:a,fields:u};if(t.response.data.message&&Array.isArray(t.response.data.message))return a=[],t.response.data.message.forEach(s=>{if(s?.constraints){const d=Object.values(s.constraints).join(", ");a.push(d),s.property&&u.push({field:s.property,message:d})}else s?.property&&s?.message?(u.push({field:s.property,message:s.message}),a.push(s.message)):a.push(s)}),{messages:a,fields:u};if(typeof t.response.data.message=="string"||typeof t.response.data=="string")return{messages:[t.response.data.message],fields:[]};if(typeof t.response.data=="object")return a=[],Object.keys(t.response.data).forEach(s=>{u.push({field:s,message:t.response.data[s]}),a.push(t.response.data[s])}),{messages:a,fields:u}}return{messages:[t.message||e("errors.unexpected")],fields:[]}},getMessageFromError:t=>{if(!t)return e("errors.unexpected");if(t?.response?.status===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if(t?.response?.data){if(t.response.data.detail)return t.response.data.detail;if(t.response.data.details?.length)return t.response.data.details.map(a=>{let u=e("errors.unexpected");return a.messages&&typeof a.messages=="object"&&a.messages.length&&(u=a.messages.join(", ")),a.field?`${a.field} - ${u}`:u}).join("; ");if(t.response.data.message){const{message:a}=t.response.data;return Array.isArray(a)?a[0]?.constraints?Object.values(a[0].constraints)[0]:a[0]:a}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(a=>`${a} ${t.response.data[a]}`).join(", ")}return t.message||e("errors.unexpected")}}}function Ue(e){const n=window.location.origin,o=n.endsWith("/")?n:`${n}/`;try{const t=e.join("/"),a=`${o}${t}`,u=e.some(d=>d.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!u&&new URL(a))return`${o}${t}`;throw new Error("Invalid url")}catch(t){return console.warn("Failed to build valid URL:",t),""}}function Z(e,n){const o=i.computed(()=>{const a=i.toValue(e);return typeof a.isExactMatch=="boolean"?a.isExactMatch:a.app==="konnect"}),t=i.computed(()=>{const a=i.toValue(n);return a.startsWith("/")?new URL(`${window.location.origin}${a}`):new URL(a)});return a=>{const{page:u,pageSize:s,offset:d,sortColumnKey:g,sortColumnOrder:h,query:c}=a;try{let r=new URL(t.value.href);if(o.value&&c){const f=new URLSearchParams(t.value.search);r.search="",r=i.toValue(e).isExactMatch?new URL(`${r.href}/${c}`):new URL(`${r.href}?filter[name][contains]=${c}`),f.forEach((l,p)=>r.searchParams.append(p,l))}else o.value||new URLSearchParams(c).forEach((f,l)=>{r.searchParams.append(l,f)}),g&&r.searchParams.append("sort_by",g),h==="desc"&&r.searchParams.append("sort_desc","1"),r.searchParams.append("size",String(s));return d&&u!==1&&r.searchParams.append("offset",String(d)),r.href}catch(r){return console.error("RouteList(fetcher)",r),i.toValue(n)}}}const j=new Map;function $e(e,n,o){const t=i.ref(!0),a=i.toValue(e),{axiosInstance:u}=N(a.axiosRequestConfig),s=Z(e,n),d=i.ref({status:C.Idle}),g=async r=>{const f=i.toValue(o)||"data";try{d.value=t.value?{status:C.InitialLoad}:{status:C.Loading},t.value=!1;let l=s(r);l.includes("filter[name]")&&(l=`${l}&page[size]=${r.pageSize}&page[number]=${r.page}`);const p=await u.get(l);if(p.status>=400)throw p;const m=p.data,_=f&&f.replace(/[^\w-_]/gi,"");let I;m[_]?I=Array.isArray(m[_])?m[_]:[m[_]]:Array.isArray(m)?I=m:I=Object.keys(m).length?[m]:[];const k={data:I,total:I.length,...m.offset?{pagination:{offset:m.offset}}:null};return k.data.length===0&&!r.query?d.value={status:C.NoRecords,response:k}:d.value={status:C.Idle,response:k},k}catch(l){const p={data:[],total:0};return r.query&&(l.response?.status===404||l.status===404)?(d.value={status:C.NoResults,response:p,error:l.response?l:{response:l}},p):(d.value={status:C.Error,response:p,error:l.response?l:{response:l}},p)}},h=a.cacheIdentifier,c=ee(h);return{fetcher:g,fetcherState:d,fetcherCacheKey:c}}function ee(e){if(e){let n=j.get(e);return n||(n=i.ref(1),j.set(e,n)),n}return i.ref(1)}function je(){const e=(t,a="_")=>t?t.split(a).map(u=>u.toLowerCase()==="id"?u.toUpperCase():u.charAt(0).toUpperCase()+u.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:t=>t?t.replace(n,a=>a.toUpperCase()):"",convertKeyToTitle:e}}const te=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,G=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(te);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},S=e=>e==="*"||e==="x"||e==="X",V=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},Ge=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],Se=(e,n)=>{if(S(e)||S(n))return 0;const[o,t]=Ge(V(e),V(n));return o>t?1:o<t?-1:0},H=(e,n)=>{for(let o=0;o<Math.max(e.length,n.length);o++){const t=Se(e[o]||"0",n[o]||"0");if(t!==0)return t}return 0},Ve=(e,n)=>{const o=G(e),t=G(n),a=o.pop(),u=t.pop(),s=H(o,t);return s!==0?s:a&&u?H(a.split("."),u.split(".")):a||u?a?-1:1:0},z=(e,n,o)=>{He(o);const t=Ve(e,n);return se[o].includes(t)},se={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},W=Object.keys(se),He=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(W.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${W.join("|")}`)},ze=e=>typeof e=="string"&&/^[v\d]/.test(e)&&te.test(e);function We(e){const{gatewayInfo:n,supportedRange:o}=e;if(!n)return!0;const{edition:t,version:a}=n;if(!ze(a))return console.error("Invalid version"),!1;const u=o[t];if(!u)return!1;const[s,d]=u;return!(s&&z(a,s,"<")||d&&z(a,d,">"))}function Ye(e){const n=i.ref(0),o=i.ref(0),t=i.ref(!1);return i.watch(e,u=>{u&&!t.value&&(n.value=u.offsetWidth,o.value=u.scrollWidth,t.value=!0)}),{isTruncated:i.computed(()=>n.value<o.value)}}function Je(){const{i18n:{t:e}}=O();return{utf8Name:o=>/^[\p{N}\p{L}.\-_~]*$/u.test(o)?"":e("validationErrors.utf8Name")}}const U=Symbol("schema"),Xe=e=>{i.provide(U,e)},ae=()=>i.inject(U,void 0),qe=e=>/^\d+$/.test(e),Qe=e=>{const n=ae(),o=i.computed(()=>{const t=n?.value,a=e();if((t?.type==="array"||t?.type==="set")&&qe(a)){const s=t.elements;return s&&{...s,encrypted:!!(t.encrypted||s.encrypted)}}return t?.fields?.find(s=>Object.keys(s)[0]===a)?.[a]});return i.provide(U,o),o};function Ze(e){let n="";const o=i.ref(!1),t=i.ref(null),a=i.computed(()=>{let s;return o.value?s=!0:t.value?s=t.value.hasData||e&&i.toValue(e):s=!1,!s});return{tableState:t,hasRecords:o,hideTableToolbar:a,handleStateChange:s=>{s.hasData?o.value=!0:s.state==="success"&&!s.hasData&&(!e||!n)&&(o.value=!1),e&&(n=i.toValue(e)),t.value={...s}}}}function ne(){const e=i.inject(Y.MANAGED_BY,!1);return i.computed(()=>!!i.toValue(e))}const et=e=>e?.service||e?.tool||null,tt="Custom",x={"terraform-provider-konnect":"Terraform",deck:"decK","kong-gateway-operator":"Kong Gateway Operator",kongctl:"kongctl","kong-ingress-controller":"Kong Ingress Controller","gw-manager":"Konnect UI","ai-manager":"AI Manager","dev-portal":"Dev Portal"},st=e=>{const n=et(e);return n?Object.hasOwn(x,n)?x[n]:tt:null};let T;const re=()=>(T===void 0&&(T=M.createI18n("en-us",X).t("baseConfigCard.commonFields.managed_by_label")),T);function at(e,n={}){const o=ne();return{defaultTablePreferences:{columnVisibility:{managed_by:!1,...n}},tableHeaders:i.computed(()=>({...i.toValue(e),...o.value?{managed_by:{label:re(),sortable:!1}}:{}}))}}const nt={useAxios:N,useDebouncedFilter:Ke,useDeleteUrlBuilder:Be,useBaseEntityDeckOptions:Ne,useBaseFormDeckOptions:Pe,useErrors:Fe,useExternalLinkCreator:Ue,useFetcher:$e,useFetcherCacheKey:ee,useFetchUrlBuilder:Z,useHelpers:F,useStringHelpers:je,useI18n:O,useGatewayFeatureSupported:We,useTruncationDetector:Ye,useValidators:Je,useSchema:ae,useSchemaProvider:Xe,useSubSchema:Qe,useTableState:Ze,useManagedByEnabled:ne,useManagedByColumn:at},rt=(e,n)=>{const o=e.__vccOpts||e;for(const[t,a]of n)o[t]=a;return o};exports.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT=ie;exports.CONFIG_CARD_FORMATS=Re;exports.CONFIG_CARD_SHOW_SENSITIVE_FIELDS=ce;exports.ConfigurationSchemaSection=Q;exports.ConfigurationSchemaType=D;exports.DECK_COMMAND_EDITOR_KEY=R;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=K;exports.ENTITIES_FEATURE_FLAGS=Y;exports.EventGatewayTypesArray=Me;exports.FetcherStatus=C;exports.IdentityTypesArray=xe;exports.MANAGED_BY_LABELS=x;exports.PLUGIN_FORM_LAYOUT_STATE=oe;exports.SHIKI_MAX_HIGHLIGHT_LENGTH=le;exports.SupportedEntityDeckArray=q;exports.SupportedEntityType=P;exports.SupportedEntityTypesArray=Te;exports._export_sfc=rt;exports.composables=nt;exports.de=fe;exports.getManagedByFieldLabel=re;exports.getManagedByLabel=st;exports.isSupportedDeckEntityType=B;exports.ne=J;exports.useHelpers=F;