@kong-ui-public/documentation 0.2.0 → 0.2.1
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.
package/dist/documentation.es.js
CHANGED
|
@@ -2498,7 +2498,7 @@ const Se = /* @__PURE__ */ q({
|
|
|
2498
2498
|
for (const [r, a] of n)
|
|
2499
2499
|
t[r] = a;
|
|
2500
2500
|
return t;
|
|
2501
|
-
}, Ja = (e) => (fe("data-v-
|
|
2501
|
+
}, Ja = (e) => (fe("data-v-e68c4d49"), e = e(), he(), e), Wa = ["aria-hidden"], Ga = {
|
|
2502
2502
|
key: 0,
|
|
2503
2503
|
"data-testid": "kui-icon-svg-title"
|
|
2504
2504
|
}, Xa = /* @__PURE__ */ Ja(() => /* @__PURE__ */ j("path", {
|
|
@@ -2597,7 +2597,7 @@ const Se = /* @__PURE__ */ q({
|
|
|
2597
2597
|
_: 1
|
|
2598
2598
|
}, 8, ["aria-hidden", "style"]));
|
|
2599
2599
|
}
|
|
2600
|
-
}), er = /* @__PURE__ */ Ye(Qa, [["__scopeId", "data-v-
|
|
2600
|
+
}), er = /* @__PURE__ */ Ye(Qa, [["__scopeId", "data-v-e68c4d49"]]), Je = (e) => (fe("data-v-fb6f389d"), e = e(), he(), e), tr = ["aria-hidden"], nr = {
|
|
2601
2601
|
key: 0,
|
|
2602
2602
|
"data-testid": "kui-icon-svg-title"
|
|
2603
2603
|
}, ar = /* @__PURE__ */ Je(() => /* @__PURE__ */ j("path", {
|
|
@@ -2706,7 +2706,7 @@ const Se = /* @__PURE__ */ q({
|
|
|
2706
2706
|
_: 1
|
|
2707
2707
|
}, 8, ["aria-hidden", "style"]));
|
|
2708
2708
|
}
|
|
2709
|
-
}), Be = /* @__PURE__ */ Ye(or, [["__scopeId", "data-v-
|
|
2709
|
+
}), Be = /* @__PURE__ */ Ye(or, [["__scopeId", "data-v-fb6f389d"]]), ir = /* @__PURE__ */ q({
|
|
2710
2710
|
__name: "DocumentationPageEmptyState",
|
|
2711
2711
|
props: {
|
|
2712
2712
|
/**
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
`+e.mark.snippet),r+" "+n):r}function j(e,a){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=a,this.message=ke(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}j.prototype=Object.create(Error.prototype),j.prototype.constructor=j,j.prototype.toString=function(e){return this.name+": "+ke(this,e)};var D=j,nn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],an=["scalar","sequence","mapping"];function rn(e){var a={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){a[String(r)]=n})}),a}function on(e,a){if(a=a||{},Object.keys(a).forEach(function(n){if(nn.indexOf(n)===-1)throw new D('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=a,this.tag=e,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=rn(a.styleAliases||null),an.indexOf(this.kind)===-1)throw new D('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var P=on;function Ee(e,a){var n=[];return e[a].forEach(function(r){var o=n.length;n.forEach(function(d,c){d.tag===r.tag&&d.kind===r.kind&&d.multi===r.multi&&(o=c)}),n[o]=r}),n}function ln(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},a,n;function r(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(a=0,n=arguments.length;a<n;a+=1)arguments[a].forEach(r);return e}function re(e){return this.extend(e)}re.prototype.extend=function(e){var a=[],n=[];if(e instanceof P)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(a=a.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new D("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(o){if(!(o instanceof P))throw new D("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new D("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new D("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof P))throw new D("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(re.prototype);return r.implicit=(this.implicit||[]).concat(a),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=Ee(r,"implicit"),r.compiledExplicit=Ee(r,"explicit"),r.compiledTypeMap=ln(r.compiledImplicit,r.compiledExplicit),r};var sn=re,cn=new P("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),dn=new P("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),un=new P("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),pn=new sn({explicit:[cn,dn,un]});function mn(e){if(e===null)return!0;var a=e.length;return a===1&&e==="~"||a===4&&(e==="null"||e==="Null"||e==="NULL")}function gn(){return null}function fn(e){return e===null}var bn=new P("tag:yaml.org,2002:null",{kind:"scalar",resolve:mn,construct:gn,predicate:fn,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function hn(e){if(e===null)return!1;var a=e.length;return a===4&&(e==="true"||e==="True"||e==="TRUE")||a===5&&(e==="false"||e==="False"||e==="FALSE")}function yn(e){return e==="true"||e==="True"||e==="TRUE"}function kn(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var En=new P("tag:yaml.org,2002:bool",{kind:"scalar",resolve:hn,construct:yn,predicate:kn,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function _n(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Sn(e){return 48<=e&&e<=55}function wn(e){return 48<=e&&e<=57}function An(e){if(e===null)return!1;var a=e.length,n=0,r=!1,o;if(!a)return!1;if(o=e[n],(o==="-"||o==="+")&&(o=e[++n]),o==="0"){if(n+1===a)return!0;if(o=e[++n],o==="b"){for(n++;n<a;n++)if(o=e[n],o!=="_"){if(o!=="0"&&o!=="1")return!1;r=!0}return r&&o!=="_"}if(o==="x"){for(n++;n<a;n++)if(o=e[n],o!=="_"){if(!_n(e.charCodeAt(n)))return!1;r=!0}return r&&o!=="_"}if(o==="o"){for(n++;n<a;n++)if(o=e[n],o!=="_"){if(!Sn(e.charCodeAt(n)))return!1;r=!0}return r&&o!=="_"}}if(o==="_")return!1;for(;n<a;n++)if(o=e[n],o!=="_"){if(!wn(e.charCodeAt(n)))return!1;r=!0}return!(!r||o==="_")}function Tn(e){var a=e,n=1,r;if(a.indexOf("_")!==-1&&(a=a.replace(/_/g,"")),r=a[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),a=a.slice(1),r=a[0]),a==="0")return 0;if(r==="0"){if(a[1]==="b")return n*parseInt(a.slice(2),2);if(a[1]==="x")return n*parseInt(a.slice(2),16);if(a[1]==="o")return n*parseInt(a.slice(2),8)}return n*parseInt(a,10)}function Nn(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!ae.isNegativeZero(e)}var xn=new P("tag:yaml.org,2002:int",{kind:"scalar",resolve:An,construct:Tn,predicate:Nn,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),In=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function On(e){return!(e===null||!In.test(e)||e[e.length-1]==="_")}function Cn(e){var a,n;return a=e.replace(/_/g,"").toLowerCase(),n=a[0]==="-"?-1:1,"+-".indexOf(a[0])>=0&&(a=a.slice(1)),a===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:a===".nan"?NaN:n*parseFloat(a,10)}var Fn=/^[-+]?[0-9]+e/;function Pn(e,a){var n;if(isNaN(e))switch(a){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(a){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(a){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ae.isNegativeZero(e))return"-0.0";return n=e.toString(10),Fn.test(n)?n.replace("e",".e"):n}function Rn(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ae.isNegativeZero(e))}var $n=new P("tag:yaml.org,2002:float",{kind:"scalar",resolve:On,construct:Cn,predicate:Rn,represent:Pn,defaultStyle:"lowercase"}),vn=pn.extend({implicit:[bn,En,xn,$n]}),Ln=vn,_e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Se=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 Bn(e){return e===null?!1:_e.exec(e)!==null||Se.exec(e)!==null}function Dn(e){var a,n,r,o,d,c,i,m=0,g=null,w,S,I;if(a=_e.exec(e),a===null&&(a=Se.exec(e)),a===null)throw new Error("Date resolve error");if(n=+a[1],r=+a[2]-1,o=+a[3],!a[4])return new Date(Date.UTC(n,r,o));if(d=+a[4],c=+a[5],i=+a[6],a[7]){for(m=a[7].slice(0,3);m.length<3;)m+="0";m=+m}return a[9]&&(w=+a[10],S=+(a[11]||0),g=(w*60+S)*6e4,a[9]==="-"&&(g=-g)),I=new Date(Date.UTC(n,r,o,d,c,i,m)),g&&I.setTime(I.getTime()-g),I}function Mn(e){return e.toISOString()}var zn=new P("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Bn,construct:Dn,instanceOf:Date,represent:Mn});function Un(e){return e==="<<"||e===null}var jn=new P("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Un}),oe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
13
13
|
\r`;function Vn(e){if(e===null)return!1;var a,n,r=0,o=e.length,d=oe;for(n=0;n<o;n++)if(a=d.indexOf(e.charAt(n)),!(a>64)){if(a<0)return!1;r+=6}return r%8===0}function Hn(e){var a,n,r=e.replace(/[\r\n=]/g,""),o=r.length,d=oe,c=0,i=[];for(a=0;a<o;a++)a%4===0&&a&&(i.push(c>>16&255),i.push(c>>8&255),i.push(c&255)),c=c<<6|d.indexOf(r.charAt(a));return n=o%4*6,n===0?(i.push(c>>16&255),i.push(c>>8&255),i.push(c&255)):n===18?(i.push(c>>10&255),i.push(c>>2&255)):n===12&&i.push(c>>4&255),new Uint8Array(i)}function Gn(e){var a="",n=0,r,o,d=e.length,c=oe;for(r=0;r<d;r++)r%3===0&&r&&(a+=c[n>>18&63],a+=c[n>>12&63],a+=c[n>>6&63],a+=c[n&63]),n=(n<<8)+e[r];return o=d%3,o===0?(a+=c[n>>18&63],a+=c[n>>12&63],a+=c[n>>6&63],a+=c[n&63]):o===2?(a+=c[n>>10&63],a+=c[n>>4&63],a+=c[n<<2&63],a+=c[64]):o===1&&(a+=c[n>>2&63],a+=c[n<<4&63],a+=c[64],a+=c[64]),a}function Kn(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var qn=new P("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Vn,construct:Hn,predicate:Kn,represent:Gn}),Yn=Object.prototype.hasOwnProperty,Xn=Object.prototype.toString;function Zn(e){if(e===null)return!0;var a=[],n,r,o,d,c,i=e;for(n=0,r=i.length;n<r;n+=1){if(o=i[n],c=!1,Xn.call(o)!=="[object Object]")return!1;for(d in o)if(Yn.call(o,d))if(!c)c=!0;else return!1;if(!c)return!1;if(a.indexOf(d)===-1)a.push(d);else return!1}return!0}function Wn(e){return e!==null?e:[]}var Jn=new P("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Zn,construct:Wn}),Qn=Object.prototype.toString;function ea(e){if(e===null)return!0;var a,n,r,o,d,c=e;for(d=new Array(c.length),a=0,n=c.length;a<n;a+=1){if(r=c[a],Qn.call(r)!=="[object Object]"||(o=Object.keys(r),o.length!==1))return!1;d[a]=[o[0],r[o[0]]]}return!0}function ta(e){if(e===null)return[];var a,n,r,o,d,c=e;for(d=new Array(c.length),a=0,n=c.length;a<n;a+=1)r=c[a],o=Object.keys(r),d[a]=[o[0],r[o[0]]];return d}var na=new P("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ea,construct:ta}),aa=Object.prototype.hasOwnProperty;function ra(e){if(e===null)return!0;var a,n=e;for(a in n)if(aa.call(n,a)&&n[a]!==null)return!1;return!0}function oa(e){return e!==null?e:{}}var ia=new P("tag:yaml.org,2002:set",{kind:"mapping",resolve:ra,construct:oa});Ln.extend({implicit:[zn,jn],explicit:[qn,Jn,na,ia]});function we(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
14
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}for(var la=new Array(256),sa=new Array(256),z=0;z<256;z++)la[z]=we(z)?1:0,sa[z]=we(z);const ie=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const a=e,n=t.ref(void 0),r=t.computed(()=>n.value===!0||n.value!==void 0&&a.forceShow===!0);return t.watch(()=>a.authFunction,async()=>{n.value=await a.authFunction()},{immediate:!0}),(o,d)=>r.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:n.value}):t.createCommentVNode("",!0)}}),ca=e=>(t.pushScopeId("data-v-98786fd9"),e=e(),t.popScopeId(),e),da={class:"documentation-display"},ua={class:"document-meta"},pa={class:"document-title meta-section"},ma=ca(()=>t.createElementVNode("span",{class:"document-title-extension"},"md",-1)),ga={key:0,class:"document-status meta-section"},fa={class:"meta-label"},ba={key:1,class:"document-create meta-section"},ha={class:"meta-label"},ya={class:"document-display-actions"},ka={key:0,class:"markdown-content-loading","data-testid":"markdown-content-loading"},Ea={key:1},_a=t.defineComponent({__name:"DocumentationDisplay",props:{canEdit:{type:Function,required:!1,default:async()=>!1},card:{type:Boolean,default:!1},hidePublishToggle:{type:Boolean,default:!1},selectedDocument:{type:Object,default:()=>null}},emits:["add","edit","download","toggle-published"],setup(e,{emit:a}){const n=e,r=a,{i18n:o}=te.useI18n(),d=t.ref(!0),c=t.computed(()=>{var y,k,E,l,s;return((k=(y=n.selectedDocument)==null?void 0:y.document)==null?void 0:k.title)||((s=(l=(E=n.selectedDocument)==null?void 0:E.document)==null?void 0:l.revision)==null?void 0:s.title)||""}),i=t.computed(()=>""),m=t.ref(!1),g=t.ref(o.t("documentation.common.unpublished")),w=t.ref(null);t.watch(()=>n.selectedDocument,y=>{var k;Ht(y)||(n.hidePublishToggle||O((k=y.document)==null?void 0:k.status),y.ast&&T())},{deep:!0});const S=()=>{try{if(!n.selectedDocument.markdown)return;const y=new Blob([n.selectedDocument.markdown],{type:"text/markdown;charset=utf-8"}),k=URL.createObjectURL(y),E=document.createElement("a");E.href=k,E.download=`${(c.value?c.value:"document").replace(/(\.md)+$/g,"")}.md`,E.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),r("download"),setTimeout(()=>{window.URL.revokeObjectURL(k),E.remove()},100)}catch(y){console.error(`Could not download document '${c.value}'`,y)}},I=()=>{const y=!m.value;r("toggle-published",y),m.value=y,g.value=y?o.t("documentation.common.published"):o.t("documentation.common.unpublished")},O=y=>{y==="published"?(m.value=!0,g.value=o.t("documentation.common.published")):(m.value=!1,g.value=o.t("documentation.common.unpublished"))},T=()=>{w.value={children:n.selectedDocument.ast,type:"document",version:1},d.value=!1};return(y,k)=>{const E=t.resolveComponent("KBadge"),l=t.resolveComponent("KInputSwitch"),s=t.resolveComponent("KButton"),u=t.resolveComponent("KSkeleton");return t.openBlock(),t.createElementBlock("div",da,[t.createElementVNode("div",ua,[t.createElementVNode("div",pa,[t.renderSlot(y.$slots,"document-title",{},()=>[t.createElementVNode("span",null,t.toDisplayString(c.value),1),t.createTextVNode("."),ma],!0)]),e.hidePublishToggle?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ga,[t.createElementVNode("span",fa,t.toDisplayString(t.unref(o).t("documentation.documentation_display.status_label")),1),m.value?(t.openBlock(),t.createBlock(E,{key:0,appearance:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.common.published")),1)]),_:1})):(t.openBlock(),t.createBlock(E,{key:1,appearance:"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.common.unpublished")),1)]),_:1}))])),i.value?(t.openBlock(),t.createElementBlock("div",ba,[t.createElementVNode("span",ha,t.toDisplayString(t.unref(o).t("documentation.documentation_display.added_label")),1),t.createVNode(E,{appearance:"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value),1)]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",ya,[t.createVNode(t.unref(ie),{"auth-function":()=>e.canEdit()},{default:t.withCtx(()=>[!e.hidePublishToggle&&!e.card?(t.openBlock(),t.createBlock(l,{key:0,modelValue:m.value,"onUpdate:modelValue":k[0]||(k[0]=p=>m.value=p),class:"document-publish-toggle","data-testid":"document-publish-toggle",label:g.value,"label-before":"",onClick:I},null,8,["modelValue","label"])):t.createCommentVNode("",!0)]),_:1},8,["auth-function"]),e.selectedDocument.markdown?(t.openBlock(),t.createBlock(s,{key:0,appearance:"secondary",class:"document-download-button","data-testid":"document-download-button",size:"small",onClick:S},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.documentation_display.download_button")),1)]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(ie),{"auth-function":()=>e.canEdit()},{default:t.withCtx(()=>[t.createVNode(s,{appearance:"secondary",class:"document-edit-button","data-testid":"document-edit-button",size:"small",onClick:k[1]||(k[1]=p=>r("edit"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.documentation_display.edit_button")),1)]),_:1}),t.createVNode(s,{appearance:"primary","data-testid":"add-new-page-button",size:"small",onClick:k[2]||(k[2]=p=>r("add"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.documentation_display.add_new")),1)]),_:1})]),_:1},8,["auth-function"])])]),d.value?(t.openBlock(),t.createElementBlock("div",ka,[e.card?(t.openBlock(),t.createBlock(u,{key:1,type:"card"})):(t.openBlock(),t.createBlock(u,{key:0,class:"markdown-content-loader"}))])):(t.openBlock(),t.createElementBlock("div",Ea,[t.createElementVNode("div",{class:t.normalizeClass(["document-content",{"content-card-view":e.card}])},[w.value?(t.openBlock(),t.createBlock(t.unref(Vt),{key:0,document:w.value},null,8,["document"])):t.createCommentVNode("",!0)],2)]))])}}}),le=(e,a)=>{const n=e.__vccOpts||e;for(const[r,o]of a)n[r]=o;return n},Ae=le(_a,[["__scopeId","data-v-98786fd9"]]),Y="24px",Te=(e,a)=>{const n=e.__vccOpts||e;for(const[r,o]of a)n[r]=o;return n},Sa=e=>(t.pushScopeId("data-v-9db7f1a1"),e=e(),t.popScopeId(),e),wa=["aria-hidden"],Aa={key:0,"data-testid":"kui-icon-svg-title"},Ta=Sa(()=>t.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),Na=t.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Y,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const a=String(e).replace(/px/gi,""),n=Number(a);if(n&&!isNaN(n)&&Number.isInteger(n)&&n>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const a=e,n=t.computed(()=>{if(typeof a.size=="number"&&a.size>0)return`${a.size}px`;if(typeof a.size=="string"){const o=String(a.size).replace(/px/gi,""),d=Number(o);if(d&&!isNaN(d)&&Number.isInteger(d)&&d>0)return`${d}px`}return Y}),r=t.computed(()=>({boxSizing:"border-box",color:a.color,display:a.display,height:n.value,lineHeight:"0",width:n.value}));return(o,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Aa,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Ta],8,wa))]),_:1},8,["aria-hidden","style"]))}}),xa=Te(Na,[["__scopeId","data-v-9db7f1a1"]]),Ne=e=>(t.pushScopeId("data-v-038fbb9a"),e=e(),t.popScopeId(),e),Ia=["aria-hidden"],Oa={key:0,"data-testid":"kui-icon-svg-title"},Ca=Ne(()=>t.createElementVNode("path",{d:"M12 22C10.6333 22 9.34167 21.7375 8.125 21.2125C6.90833 20.6875 5.84583 19.9708 4.9375 19.0625C4.02917 18.1542 3.3125 17.0917 2.7875 15.875C2.2625 14.6583 2 13.3667 2 12C2 10.6167 2.2625 9.32083 2.7875 8.1125C3.3125 6.90417 4.02917 5.84583 4.9375 4.9375C5.84583 4.02917 6.90833 3.3125 8.125 2.7875C9.34167 2.2625 10.6333 2 12 2C12.2833 2 12.5208 2.09583 12.7125 2.2875C12.9042 2.47917 13 2.71667 13 3C13 3.28333 12.9042 3.52083 12.7125 3.7125C12.5208 3.90417 12.2833 4 12 4C9.78333 4 7.89583 4.77917 6.3375 6.3375C4.77917 7.89583 4 9.78333 4 12C4 14.2167 4.77917 16.1042 6.3375 17.6625C7.89583 19.2208 9.78333 20 12 20C14.2167 20 16.1042 19.2208 17.6625 17.6625C19.2208 16.1042 20 14.2167 20 12C20 11.7167 20.0958 11.4792 20.2875 11.2875C20.4792 11.0958 20.7167 11 21 11C21.2833 11 21.5208 11.0958 21.7125 11.2875C21.9042 11.4792 22 11.7167 22 12C22 13.3667 21.7375 14.6583 21.2125 15.875C20.6875 17.0917 19.9708 18.1542 19.0625 19.0625C18.1542 19.9708 17.0958 20.6875 15.8875 21.2125C14.6792 21.7375 13.3833 22 12 22Z",fill:"currentColor","transform-origin":"center"},null,-1)),Fa=Ne(()=>t.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",dur:"1.5s",from:"0",repeatCount:"indefinite",to:"360",type:"rotate"},null,-1)),Pa=t.defineComponent({__name:"ProgressIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Y,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const a=String(e).replace(/px/gi,""),n=Number(a);if(n&&!isNaN(n)&&Number.isInteger(n)&&n>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const a=e,n=t.computed(()=>{if(typeof a.size=="number"&&a.size>0)return`${a.size}px`;if(typeof a.size=="string"){const o=String(a.size).replace(/px/gi,""),d=Number(o);if(d&&!isNaN(d)&&Number.isInteger(d)&&d>0)return`${d}px`}return Y}),r=t.computed(()=>({boxSizing:"border-box",color:a.color,display:a.display,height:n.value,lineHeight:"0",width:n.value}));return(o,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon progress-icon","data-testid":"kui-icon-wrapper-progress-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-progress-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Oa,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Ca,Fa],8,Ia))]),_:1},8,["aria-hidden","style"]))}}),xe=Te(Pa,[["__scopeId","data-v-038fbb9a"]]),Ie=t.defineComponent({__name:"DocumentationPageEmptyState",props:{canEdit:{type:Function,required:!1,default:async()=>!1}},emits:["create-documentation"],setup(e,{emit:a}){const n=a,{i18n:r}=te.useI18n();return(o,d)=>{const c=t.resolveComponent("KButton"),i=t.resolveComponent("KEmptyState");return t.openBlock(),t.createBlock(i,{class:"documentation-page-empty-state","data-testid":"documentation-page-empty-state",icon:"stateGruceo","icon-size":"96"},{title:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r).t("documentation.show.empty_state.title")),1)]),message:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r).t("documentation.show.empty_state.message")),1)]),cta:t.withCtx(()=>[t.createVNode(t.unref(ie),{"auth-function":()=>e.canEdit()},{default:t.withCtx(()=>[t.createVNode(c,{appearance:"primary","data-testid":"add-new-page-button",onClick:d[0]||(d[0]=m=>n("create-documentation"))},{icon:t.withCtx(()=>[t.createVNode(t.unref(xa),{size:"22"})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(r).t("documentation.show.empty_state.ctaText")),1)]),_:1})]),_:1},8,["auth-function"])]),_:1})}}}),Ra={serviceDocumentationDocs:"https://docs.konghq.com/konnect/servicehub/service-documentation/#main"},$a=e=>(t.pushScopeId("data-v-ad1a177c"),e=e(),t.popScopeId(),e),va={class:"title"},La={class:"subtitle"},Ba=$a(()=>t.createElementVNode("br",null,null,-1)),Da={class:"document-inputs"},Ma={class:"page-name side-by-side"},za={class:"url-slug side-by-side"},Ua={key:1,class:"documentation-status"},ja={class:"action-buttons"},Va={class:"button-spacing"},Oe=le(t.defineComponent({__name:"ProductDocumentModal",props:{actionPending:{type:Boolean,default:!1},documents:{type:Array,required:!0},editing:{type:Boolean,default:!1},errorMessage:{type:String,default:""},hidePublishToggle:{type:Boolean,default:!1},record:{type:Object,default:null}},emits:["cancel","save","delete"],setup(e,{emit:a}){const n=e,r=a,{i18n:o}=te.useI18n(),d=t.computed(()=>{var b;return(b=n.record.file)==null?void 0:b.filename}),c=t.computed(()=>{var b;return E.value?(b=E.value.name)==null?void 0:b.split(".")[0]:""}),i=t.ref(!0),m=t.computed(()=>i.value?"published":"unpublished"),g=t.reactive({fileName:"",pageName:"",urlSlug:"",status:m.value,parent:""}),w=/^[\w-]+$/,S=t.computed(()=>{var b;return g.urlSlug!==""&&!((b=g.urlSlug)!=null&&b.match(w))}),I=t.computed(()=>{var h;let b=(h=n.documents)==null?void 0:h.filter(A=>{var x;return A.record.id!==((x=n.record)==null?void 0:x.id)&&!A.record.parent_document_id}).map(A=>({label:A.record.title,value:A.record.id,selected:!1}));b||(b=[]);const _=he(b.length);return b.push({label:o.t("documentation.form_modal.parent_document_select_option_none"),value:"none",selected:!_}),b}),O=t.computed(()=>!n.editing&&!E.value||!g.pageName||S.value),T=t.computed(()=>n.editing?o.t("documentation.form_modal.edit_title"):o.t("documentation.form_modal.create_title")),y=t.computed(()=>n.editing?o.t("documentation.form_modal.replace_file_button_text"):o.t("documentation.form_modal.filename_button_text")),k=t.computed(()=>m.value==="published"?o.t("documentation.common.published"):o.t("documentation.common.unpublished")),E=t.ref(null),l=b=>{E.value=b==null?void 0:b[0],g.pageName=c.value,g.urlSlug=c.value,g.fileName=c.value},s=()=>{E.value=null},u=()=>{r("cancel"),f()},p=()=>{r("save",Object.assign(g,{status:m.value}),E)},f=()=>{var b,_,h,A,x;if(E.value=null,n.editing&&((b=n.record)!=null&&b.document)){const C=he(n.record),M=C.status||n.record.document.status||i.value;g.fileName=((_=C.document.file)==null?void 0:_.filename)||((A=(h=C.document.revision)==null?void 0:h.file)==null?void 0:A.filename),g.pageName=C.document.title||((x=C.document.revision)==null?void 0:x.title),g.urlSlug=C.document.slug,g.parent=C.document.parent_document_id,g.status=M,i.value=M==="published"}else g.fileName="",g.pageName="",g.urlSlug="",g.parent="",g.status=""};return t.onMounted(()=>{f()}),(b,_)=>{const h=t.resolveComponent("KExternalLink"),A=t.resolveComponent("KAlert"),x=t.resolveComponent("KFileUpload"),C=t.resolveComponent("KInput"),M=t.resolveComponent("KLabel"),X=t.resolveComponent("KInputSwitch"),se=t.resolveComponent("KSelect"),V=t.resolveComponent("KButton"),Z=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(t.Teleport,{to:"#kong-ui-app-layout-teleport-default-slot"},[t.createVNode(Z,{class:"edit-document-modal","data-testid":"edit-document-modal","is-visible":"",onCanceled:u,onProceed:p},{"header-content":t.withCtx(()=>[t.createElementVNode("div",va,[t.createTextVNode(t.toDisplayString(T.value)+" ",1),t.createElementVNode("div",La,[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.form_modal.subtitle"))+" ",1),Ba,t.createVNode(h,{class:"doc-link",href:t.unref(Ra).serviceDocumentationDocs},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.form_modal.documentation_link_text")),1)]),_:1},8,["href"])])])]),"body-content":t.withCtx(()=>[e.errorMessage?(t.openBlock(),t.createBlock(A,{key:0,"alert-message":e.errorMessage,appearance:"danger",class:"bottom-spacing"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createVNode(x,{accept:[".md",".markdown"],"button-text":y.value,class:"document-file-upload","data-testid":"document-file-upload",label:t.unref(o).t("documentation.form_modal.file_label"),"label-attributes":{help:t.unref(o).t("documentation.form_modal.file_tooltip")},placeholder:e.editing?d.value:void 0,onFileAdded:l,onFileRemoved:s},null,8,["accept","button-text","label","label-attributes","placeholder"]),t.createElementVNode("div",Da,[t.createElementVNode("div",Ma,[t.createVNode(C,{modelValue:g.pageName,"onUpdate:modelValue":_[0]||(_[0]=N=>g.pageName=N),modelModifiers:{trim:!0},"data-testid":"documentation-page-name",label:t.unref(o).t("documentation.form_modal.title_label"),placeholder:t.unref(o).t("documentation.form_modal.title_placeholder"),required:""},null,8,["modelValue","label","placeholder"])]),t.createElementVNode("div",za,[t.createVNode(C,{modelValue:g.urlSlug,"onUpdate:modelValue":_[1]||(_[1]=N=>g.urlSlug=N),modelModifiers:{trim:!0},"data-testid":"documentation-url-slug","error-message":t.unref(o).t("documentation.form_modal.slug_error"),"has-error":S.value,label:t.unref(o).t("documentation.form_modal.slug_label"),pattern:w,placeholder:t.unref(o).t("documentation.form_modal.slug_placeholder")},null,8,["modelValue","error-message","has-error","label","placeholder"])])]),e.hidePublishToggle?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ua,[t.createElementVNode("div",null,[t.createVNode(M,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.form_modal.status_label")),1)]),_:1})]),t.createVNode(X,{modelValue:i.value,"onUpdate:modelValue":_[2]||(_[2]=N=>i.value=N),"data-testid":"documentation-status",label:k.value},null,8,["modelValue","label"])])),t.createVNode(se,{modelValue:g.parent,"onUpdate:modelValue":_[3]||(_[3]=N=>g.parent=N),appearance:"select",class:"document-parent-select","data-testid":"documentation-parent","enable-filtering":"",items:I.value,label:t.unref(o).t("documentation.form_modal.parent_document_select_label"),width:"100%"},null,8,["modelValue","items","label"])]),"action-buttons":t.withCtx(()=>[t.createElementVNode("div",ja,[e.editing?(t.openBlock(),t.createBlock(V,{key:0,appearance:"danger",class:"edit-documentation-delete-button","data-testid":"edit-documentation-delete-button",disabled:e.actionPending,onClick:_[4]||(_[4]=N=>r("delete"))},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(o).t("documentation.form_modal.delete_button_text")),1)]),_:2},[e.actionPending?{name:"icon",fn:t.withCtx(()=>[t.createVNode(t.unref(xe),{size:"16"})]),key:"0"}:void 0]),1032,["disabled"])):t.createCommentVNode("",!0),t.createElementVNode("div",Va,[t.createVNode(V,{appearance:"secondary",class:"edit-documentation-cancel-button","data-testid":"edit-documentation-cancel-button",onClick:u},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.form_modal.cancel_button_text")),1)]),_:1}),t.createVNode(V,{appearance:"primary","data-testid":"edit-documentation-save-button",disabled:e.actionPending||O.value,onClick:p},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(o).t("documentation.form_modal.save_button_text")),1)]),_:2},[e.actionPending?{name:"icon",fn:t.withCtx(()=>[t.createVNode(t.unref(xe),{size:"16"})]),key:"0"}:void 0]),1032,["disabled"])])])]),_:1})])}}}),[["__scopeId","data-v-ad1a177c"]]),Ha={class:"documentation"},Ga={class:"documentation-parent-container"},Ka=le(t.defineComponent({__name:"DocumentationContent",props:{actionPending:{type:Boolean,default:!1},actionSuccess:{type:Boolean,default:!1},cacheKey:{type:Number,default:0},canEdit:{type:Function,required:!1,default:async()=>!1},card:{type:Boolean,default:!1},documentList:{type:Array,required:!0},entityId:{type:String,required:!0},hidePublishToggle:{type:Boolean,default:!1},modalErrorMessage:{type:String,default:""},selectedDocument:{type:Object,default:()=>null}},emits:["child-change","delete","download","edit","document-selection","modal-closed","parent-change","save","toggle-published"],setup(e,{emit:a}){const n=a,r=t.ref(!1),o=t.ref(!1),d=e;t.watch(()=>d.actionSuccess,w=>{w&&g()});const c=t.computed(()=>{var w,S;return`data-display-${d.cacheKey}-${((S=(w=d.selectedDocument)==null?void 0:w.document)==null?void 0:S.id)||""}`}),i=()=>{o.value=!1,r.value=!0},m=()=>{o.value=!0,r.value=!0,n("edit")},g=()=>{r.value=!1,n("modal-closed")};return(w,S)=>{const I=t.resolveComponent("KTreeList"),O=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",Ha,[e.documentList&&!e.documentList.length?(t.openBlock(),t.createBlock(Ie,{key:0,"can-edit":e.canEdit,onCreateDocumentation:i},null,8,["can-edit"])):(t.openBlock(),t.createBlock(O,{key:1,class:"documentation-card"},{default:t.withCtx(()=>[t.createElementVNode("div",Ga,[(t.openBlock(),t.createBlock(I,{key:`tree-list-${e.cacheKey}`,class:"document-tree-list",items:e.documentList,"max-depth":2,onChange:S[0]||(S[0]=T=>n("parent-change",T)),onChildChange:S[1]||(S[1]=T=>n("child-change",T)),onSelected:S[2]||(S[2]=T=>n("document-selection",T))},null,8,["items"])),e.selectedDocument?(t.openBlock(),t.createBlock(Ae,{key:c.value,"can-edit":e.canEdit,card:e.card,class:"document-holder","hide-publish-toggle":e.hidePublishToggle,"selected-document":e.selectedDocument,onAdd:i,onDownload:S[3]||(S[3]=T=>n("download")),onEdit:m,onTogglePublished:S[4]||(S[4]=T=>n("toggle-published",T))},null,8,["can-edit","card","hide-publish-toggle","selected-document"])):t.createCommentVNode("",!0)])]),_:1})),r.value?(t.openBlock(),t.createBlock(Oe,{key:2,"action-pending":e.actionPending,documents:e.documentList,editing:o.value,"error-message":e.modalErrorMessage,"hide-publish-toggle":e.hidePublishToggle,record:o.value&&e.selectedDocument?e.selectedDocument:void 0,onCancel:g,onDelete:S[5]||(S[5]=T=>n("delete")),onSave:S[6]||(S[6]=(T,y)=>n("save",T,y))},null,8,["action-pending","documents","editing","error-message","hide-publish-toggle","record"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-d231f54f"]]);(function(e){var a="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+a),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+a),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+a),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+a),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],d=r.variable[1].inside,c=0;c<o.length;c++)d[o[c]]=e.languages.bash[o[c]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);const qa=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));(function(e){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+a.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+`|(?:[^\\\\\r
|
|
14
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}for(var la=new Array(256),sa=new Array(256),z=0;z<256;z++)la[z]=we(z)?1:0,sa[z]=we(z);const ie=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const a=e,n=t.ref(void 0),r=t.computed(()=>n.value===!0||n.value!==void 0&&a.forceShow===!0);return t.watch(()=>a.authFunction,async()=>{n.value=await a.authFunction()},{immediate:!0}),(o,d)=>r.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:n.value}):t.createCommentVNode("",!0)}}),ca=e=>(t.pushScopeId("data-v-98786fd9"),e=e(),t.popScopeId(),e),da={class:"documentation-display"},ua={class:"document-meta"},pa={class:"document-title meta-section"},ma=ca(()=>t.createElementVNode("span",{class:"document-title-extension"},"md",-1)),ga={key:0,class:"document-status meta-section"},fa={class:"meta-label"},ba={key:1,class:"document-create meta-section"},ha={class:"meta-label"},ya={class:"document-display-actions"},ka={key:0,class:"markdown-content-loading","data-testid":"markdown-content-loading"},Ea={key:1},_a=t.defineComponent({__name:"DocumentationDisplay",props:{canEdit:{type:Function,required:!1,default:async()=>!1},card:{type:Boolean,default:!1},hidePublishToggle:{type:Boolean,default:!1},selectedDocument:{type:Object,default:()=>null}},emits:["add","edit","download","toggle-published"],setup(e,{emit:a}){const n=e,r=a,{i18n:o}=te.useI18n(),d=t.ref(!0),c=t.computed(()=>{var y,k,E,l,s;return((k=(y=n.selectedDocument)==null?void 0:y.document)==null?void 0:k.title)||((s=(l=(E=n.selectedDocument)==null?void 0:E.document)==null?void 0:l.revision)==null?void 0:s.title)||""}),i=t.computed(()=>""),m=t.ref(!1),g=t.ref(o.t("documentation.common.unpublished")),w=t.ref(null);t.watch(()=>n.selectedDocument,y=>{var k;Ht(y)||(n.hidePublishToggle||O((k=y.document)==null?void 0:k.status),y.ast&&T())},{deep:!0});const S=()=>{try{if(!n.selectedDocument.markdown)return;const y=new Blob([n.selectedDocument.markdown],{type:"text/markdown;charset=utf-8"}),k=URL.createObjectURL(y),E=document.createElement("a");E.href=k,E.download=`${(c.value?c.value:"document").replace(/(\.md)+$/g,"")}.md`,E.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),r("download"),setTimeout(()=>{window.URL.revokeObjectURL(k),E.remove()},100)}catch(y){console.error(`Could not download document '${c.value}'`,y)}},I=()=>{const y=!m.value;r("toggle-published",y),m.value=y,g.value=y?o.t("documentation.common.published"):o.t("documentation.common.unpublished")},O=y=>{y==="published"?(m.value=!0,g.value=o.t("documentation.common.published")):(m.value=!1,g.value=o.t("documentation.common.unpublished"))},T=()=>{w.value={children:n.selectedDocument.ast,type:"document",version:1},d.value=!1};return(y,k)=>{const E=t.resolveComponent("KBadge"),l=t.resolveComponent("KInputSwitch"),s=t.resolveComponent("KButton"),u=t.resolveComponent("KSkeleton");return t.openBlock(),t.createElementBlock("div",da,[t.createElementVNode("div",ua,[t.createElementVNode("div",pa,[t.renderSlot(y.$slots,"document-title",{},()=>[t.createElementVNode("span",null,t.toDisplayString(c.value),1),t.createTextVNode("."),ma],!0)]),e.hidePublishToggle?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ga,[t.createElementVNode("span",fa,t.toDisplayString(t.unref(o).t("documentation.documentation_display.status_label")),1),m.value?(t.openBlock(),t.createBlock(E,{key:0,appearance:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.common.published")),1)]),_:1})):(t.openBlock(),t.createBlock(E,{key:1,appearance:"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.common.unpublished")),1)]),_:1}))])),i.value?(t.openBlock(),t.createElementBlock("div",ba,[t.createElementVNode("span",ha,t.toDisplayString(t.unref(o).t("documentation.documentation_display.added_label")),1),t.createVNode(E,{appearance:"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.value),1)]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",ya,[t.createVNode(t.unref(ie),{"auth-function":()=>e.canEdit()},{default:t.withCtx(()=>[!e.hidePublishToggle&&!e.card?(t.openBlock(),t.createBlock(l,{key:0,modelValue:m.value,"onUpdate:modelValue":k[0]||(k[0]=p=>m.value=p),class:"document-publish-toggle","data-testid":"document-publish-toggle",label:g.value,"label-before":"",onClick:I},null,8,["modelValue","label"])):t.createCommentVNode("",!0)]),_:1},8,["auth-function"]),e.selectedDocument.markdown?(t.openBlock(),t.createBlock(s,{key:0,appearance:"secondary",class:"document-download-button","data-testid":"document-download-button",size:"small",onClick:S},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.documentation_display.download_button")),1)]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(ie),{"auth-function":()=>e.canEdit()},{default:t.withCtx(()=>[t.createVNode(s,{appearance:"secondary",class:"document-edit-button","data-testid":"document-edit-button",size:"small",onClick:k[1]||(k[1]=p=>r("edit"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.documentation_display.edit_button")),1)]),_:1}),t.createVNode(s,{appearance:"primary","data-testid":"add-new-page-button",size:"small",onClick:k[2]||(k[2]=p=>r("add"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.documentation_display.add_new")),1)]),_:1})]),_:1},8,["auth-function"])])]),d.value?(t.openBlock(),t.createElementBlock("div",ka,[e.card?(t.openBlock(),t.createBlock(u,{key:1,type:"card"})):(t.openBlock(),t.createBlock(u,{key:0,class:"markdown-content-loader"}))])):(t.openBlock(),t.createElementBlock("div",Ea,[t.createElementVNode("div",{class:t.normalizeClass(["document-content",{"content-card-view":e.card}])},[w.value?(t.openBlock(),t.createBlock(t.unref(Vt),{key:0,document:w.value},null,8,["document"])):t.createCommentVNode("",!0)],2)]))])}}}),le=(e,a)=>{const n=e.__vccOpts||e;for(const[r,o]of a)n[r]=o;return n},Ae=le(_a,[["__scopeId","data-v-98786fd9"]]),Y="24px",Te=(e,a)=>{const n=e.__vccOpts||e;for(const[r,o]of a)n[r]=o;return n},Sa=e=>(t.pushScopeId("data-v-e68c4d49"),e=e(),t.popScopeId(),e),wa=["aria-hidden"],Aa={key:0,"data-testid":"kui-icon-svg-title"},Ta=Sa(()=>t.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),Na=t.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Y,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const a=String(e).replace(/px/gi,""),n=Number(a);if(n&&!isNaN(n)&&Number.isInteger(n)&&n>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const a=e,n=t.computed(()=>{if(typeof a.size=="number"&&a.size>0)return`${a.size}px`;if(typeof a.size=="string"){const o=String(a.size).replace(/px/gi,""),d=Number(o);if(d&&!isNaN(d)&&Number.isInteger(d)&&d>0)return`${d}px`}return Y}),r=t.computed(()=>({boxSizing:"border-box",color:a.color,display:a.display,height:n.value,lineHeight:"0",width:n.value}));return(o,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Aa,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Ta],8,wa))]),_:1},8,["aria-hidden","style"]))}}),xa=Te(Na,[["__scopeId","data-v-e68c4d49"]]),Ne=e=>(t.pushScopeId("data-v-fb6f389d"),e=e(),t.popScopeId(),e),Ia=["aria-hidden"],Oa={key:0,"data-testid":"kui-icon-svg-title"},Ca=Ne(()=>t.createElementVNode("path",{d:"M12 22C10.6333 22 9.34167 21.7375 8.125 21.2125C6.90833 20.6875 5.84583 19.9708 4.9375 19.0625C4.02917 18.1542 3.3125 17.0917 2.7875 15.875C2.2625 14.6583 2 13.3667 2 12C2 10.6167 2.2625 9.32083 2.7875 8.1125C3.3125 6.90417 4.02917 5.84583 4.9375 4.9375C5.84583 4.02917 6.90833 3.3125 8.125 2.7875C9.34167 2.2625 10.6333 2 12 2C12.2833 2 12.5208 2.09583 12.7125 2.2875C12.9042 2.47917 13 2.71667 13 3C13 3.28333 12.9042 3.52083 12.7125 3.7125C12.5208 3.90417 12.2833 4 12 4C9.78333 4 7.89583 4.77917 6.3375 6.3375C4.77917 7.89583 4 9.78333 4 12C4 14.2167 4.77917 16.1042 6.3375 17.6625C7.89583 19.2208 9.78333 20 12 20C14.2167 20 16.1042 19.2208 17.6625 17.6625C19.2208 16.1042 20 14.2167 20 12C20 11.7167 20.0958 11.4792 20.2875 11.2875C20.4792 11.0958 20.7167 11 21 11C21.2833 11 21.5208 11.0958 21.7125 11.2875C21.9042 11.4792 22 11.7167 22 12C22 13.3667 21.7375 14.6583 21.2125 15.875C20.6875 17.0917 19.9708 18.1542 19.0625 19.0625C18.1542 19.9708 17.0958 20.6875 15.8875 21.2125C14.6792 21.7375 13.3833 22 12 22Z",fill:"currentColor","transform-origin":"center"},null,-1)),Fa=Ne(()=>t.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",dur:"1.5s",from:"0",repeatCount:"indefinite",to:"360",type:"rotate"},null,-1)),Pa=t.defineComponent({__name:"ProgressIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Y,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const a=String(e).replace(/px/gi,""),n=Number(a);if(n&&!isNaN(n)&&Number.isInteger(n)&&n>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const a=e,n=t.computed(()=>{if(typeof a.size=="number"&&a.size>0)return`${a.size}px`;if(typeof a.size=="string"){const o=String(a.size).replace(/px/gi,""),d=Number(o);if(d&&!isNaN(d)&&Number.isInteger(d)&&d>0)return`${d}px`}return Y}),r=t.computed(()=>({boxSizing:"border-box",color:a.color,display:a.display,height:n.value,lineHeight:"0",width:n.value}));return(o,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon progress-icon","data-testid":"kui-icon-wrapper-progress-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-progress-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Oa,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Ca,Fa],8,Ia))]),_:1},8,["aria-hidden","style"]))}}),xe=Te(Pa,[["__scopeId","data-v-fb6f389d"]]),Ie=t.defineComponent({__name:"DocumentationPageEmptyState",props:{canEdit:{type:Function,required:!1,default:async()=>!1}},emits:["create-documentation"],setup(e,{emit:a}){const n=a,{i18n:r}=te.useI18n();return(o,d)=>{const c=t.resolveComponent("KButton"),i=t.resolveComponent("KEmptyState");return t.openBlock(),t.createBlock(i,{class:"documentation-page-empty-state","data-testid":"documentation-page-empty-state",icon:"stateGruceo","icon-size":"96"},{title:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r).t("documentation.show.empty_state.title")),1)]),message:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r).t("documentation.show.empty_state.message")),1)]),cta:t.withCtx(()=>[t.createVNode(t.unref(ie),{"auth-function":()=>e.canEdit()},{default:t.withCtx(()=>[t.createVNode(c,{appearance:"primary","data-testid":"add-new-page-button",onClick:d[0]||(d[0]=m=>n("create-documentation"))},{icon:t.withCtx(()=>[t.createVNode(t.unref(xa),{size:"22"})]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(r).t("documentation.show.empty_state.ctaText")),1)]),_:1})]),_:1},8,["auth-function"])]),_:1})}}}),Ra={serviceDocumentationDocs:"https://docs.konghq.com/konnect/servicehub/service-documentation/#main"},$a=e=>(t.pushScopeId("data-v-ad1a177c"),e=e(),t.popScopeId(),e),va={class:"title"},La={class:"subtitle"},Ba=$a(()=>t.createElementVNode("br",null,null,-1)),Da={class:"document-inputs"},Ma={class:"page-name side-by-side"},za={class:"url-slug side-by-side"},Ua={key:1,class:"documentation-status"},ja={class:"action-buttons"},Va={class:"button-spacing"},Oe=le(t.defineComponent({__name:"ProductDocumentModal",props:{actionPending:{type:Boolean,default:!1},documents:{type:Array,required:!0},editing:{type:Boolean,default:!1},errorMessage:{type:String,default:""},hidePublishToggle:{type:Boolean,default:!1},record:{type:Object,default:null}},emits:["cancel","save","delete"],setup(e,{emit:a}){const n=e,r=a,{i18n:o}=te.useI18n(),d=t.computed(()=>{var b;return(b=n.record.file)==null?void 0:b.filename}),c=t.computed(()=>{var b;return E.value?(b=E.value.name)==null?void 0:b.split(".")[0]:""}),i=t.ref(!0),m=t.computed(()=>i.value?"published":"unpublished"),g=t.reactive({fileName:"",pageName:"",urlSlug:"",status:m.value,parent:""}),w=/^[\w-]+$/,S=t.computed(()=>{var b;return g.urlSlug!==""&&!((b=g.urlSlug)!=null&&b.match(w))}),I=t.computed(()=>{var h;let b=(h=n.documents)==null?void 0:h.filter(A=>{var x;return A.record.id!==((x=n.record)==null?void 0:x.id)&&!A.record.parent_document_id}).map(A=>({label:A.record.title,value:A.record.id,selected:!1}));b||(b=[]);const _=he(b.length);return b.push({label:o.t("documentation.form_modal.parent_document_select_option_none"),value:"none",selected:!_}),b}),O=t.computed(()=>!n.editing&&!E.value||!g.pageName||S.value),T=t.computed(()=>n.editing?o.t("documentation.form_modal.edit_title"):o.t("documentation.form_modal.create_title")),y=t.computed(()=>n.editing?o.t("documentation.form_modal.replace_file_button_text"):o.t("documentation.form_modal.filename_button_text")),k=t.computed(()=>m.value==="published"?o.t("documentation.common.published"):o.t("documentation.common.unpublished")),E=t.ref(null),l=b=>{E.value=b==null?void 0:b[0],g.pageName=c.value,g.urlSlug=c.value,g.fileName=c.value},s=()=>{E.value=null},u=()=>{r("cancel"),f()},p=()=>{r("save",Object.assign(g,{status:m.value}),E)},f=()=>{var b,_,h,A,x;if(E.value=null,n.editing&&((b=n.record)!=null&&b.document)){const C=he(n.record),M=C.status||n.record.document.status||i.value;g.fileName=((_=C.document.file)==null?void 0:_.filename)||((A=(h=C.document.revision)==null?void 0:h.file)==null?void 0:A.filename),g.pageName=C.document.title||((x=C.document.revision)==null?void 0:x.title),g.urlSlug=C.document.slug,g.parent=C.document.parent_document_id,g.status=M,i.value=M==="published"}else g.fileName="",g.pageName="",g.urlSlug="",g.parent="",g.status=""};return t.onMounted(()=>{f()}),(b,_)=>{const h=t.resolveComponent("KExternalLink"),A=t.resolveComponent("KAlert"),x=t.resolveComponent("KFileUpload"),C=t.resolveComponent("KInput"),M=t.resolveComponent("KLabel"),X=t.resolveComponent("KInputSwitch"),se=t.resolveComponent("KSelect"),V=t.resolveComponent("KButton"),Z=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(t.Teleport,{to:"#kong-ui-app-layout-teleport-default-slot"},[t.createVNode(Z,{class:"edit-document-modal","data-testid":"edit-document-modal","is-visible":"",onCanceled:u,onProceed:p},{"header-content":t.withCtx(()=>[t.createElementVNode("div",va,[t.createTextVNode(t.toDisplayString(T.value)+" ",1),t.createElementVNode("div",La,[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.form_modal.subtitle"))+" ",1),Ba,t.createVNode(h,{class:"doc-link",href:t.unref(Ra).serviceDocumentationDocs},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.form_modal.documentation_link_text")),1)]),_:1},8,["href"])])])]),"body-content":t.withCtx(()=>[e.errorMessage?(t.openBlock(),t.createBlock(A,{key:0,"alert-message":e.errorMessage,appearance:"danger",class:"bottom-spacing"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createVNode(x,{accept:[".md",".markdown"],"button-text":y.value,class:"document-file-upload","data-testid":"document-file-upload",label:t.unref(o).t("documentation.form_modal.file_label"),"label-attributes":{help:t.unref(o).t("documentation.form_modal.file_tooltip")},placeholder:e.editing?d.value:void 0,onFileAdded:l,onFileRemoved:s},null,8,["accept","button-text","label","label-attributes","placeholder"]),t.createElementVNode("div",Da,[t.createElementVNode("div",Ma,[t.createVNode(C,{modelValue:g.pageName,"onUpdate:modelValue":_[0]||(_[0]=N=>g.pageName=N),modelModifiers:{trim:!0},"data-testid":"documentation-page-name",label:t.unref(o).t("documentation.form_modal.title_label"),placeholder:t.unref(o).t("documentation.form_modal.title_placeholder"),required:""},null,8,["modelValue","label","placeholder"])]),t.createElementVNode("div",za,[t.createVNode(C,{modelValue:g.urlSlug,"onUpdate:modelValue":_[1]||(_[1]=N=>g.urlSlug=N),modelModifiers:{trim:!0},"data-testid":"documentation-url-slug","error-message":t.unref(o).t("documentation.form_modal.slug_error"),"has-error":S.value,label:t.unref(o).t("documentation.form_modal.slug_label"),pattern:w,placeholder:t.unref(o).t("documentation.form_modal.slug_placeholder")},null,8,["modelValue","error-message","has-error","label","placeholder"])])]),e.hidePublishToggle?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ua,[t.createElementVNode("div",null,[t.createVNode(M,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.form_modal.status_label")),1)]),_:1})]),t.createVNode(X,{modelValue:i.value,"onUpdate:modelValue":_[2]||(_[2]=N=>i.value=N),"data-testid":"documentation-status",label:k.value},null,8,["modelValue","label"])])),t.createVNode(se,{modelValue:g.parent,"onUpdate:modelValue":_[3]||(_[3]=N=>g.parent=N),appearance:"select",class:"document-parent-select","data-testid":"documentation-parent","enable-filtering":"",items:I.value,label:t.unref(o).t("documentation.form_modal.parent_document_select_label"),width:"100%"},null,8,["modelValue","items","label"])]),"action-buttons":t.withCtx(()=>[t.createElementVNode("div",ja,[e.editing?(t.openBlock(),t.createBlock(V,{key:0,appearance:"danger",class:"edit-documentation-delete-button","data-testid":"edit-documentation-delete-button",disabled:e.actionPending,onClick:_[4]||(_[4]=N=>r("delete"))},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(o).t("documentation.form_modal.delete_button_text")),1)]),_:2},[e.actionPending?{name:"icon",fn:t.withCtx(()=>[t.createVNode(t.unref(xe),{size:"16"})]),key:"0"}:void 0]),1032,["disabled"])):t.createCommentVNode("",!0),t.createElementVNode("div",Va,[t.createVNode(V,{appearance:"secondary",class:"edit-documentation-cancel-button","data-testid":"edit-documentation-cancel-button",onClick:u},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o).t("documentation.form_modal.cancel_button_text")),1)]),_:1}),t.createVNode(V,{appearance:"primary","data-testid":"edit-documentation-save-button",disabled:e.actionPending||O.value,onClick:p},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(o).t("documentation.form_modal.save_button_text")),1)]),_:2},[e.actionPending?{name:"icon",fn:t.withCtx(()=>[t.createVNode(t.unref(xe),{size:"16"})]),key:"0"}:void 0]),1032,["disabled"])])])]),_:1})])}}}),[["__scopeId","data-v-ad1a177c"]]),Ha={class:"documentation"},Ga={class:"documentation-parent-container"},Ka=le(t.defineComponent({__name:"DocumentationContent",props:{actionPending:{type:Boolean,default:!1},actionSuccess:{type:Boolean,default:!1},cacheKey:{type:Number,default:0},canEdit:{type:Function,required:!1,default:async()=>!1},card:{type:Boolean,default:!1},documentList:{type:Array,required:!0},entityId:{type:String,required:!0},hidePublishToggle:{type:Boolean,default:!1},modalErrorMessage:{type:String,default:""},selectedDocument:{type:Object,default:()=>null}},emits:["child-change","delete","download","edit","document-selection","modal-closed","parent-change","save","toggle-published"],setup(e,{emit:a}){const n=a,r=t.ref(!1),o=t.ref(!1),d=e;t.watch(()=>d.actionSuccess,w=>{w&&g()});const c=t.computed(()=>{var w,S;return`data-display-${d.cacheKey}-${((S=(w=d.selectedDocument)==null?void 0:w.document)==null?void 0:S.id)||""}`}),i=()=>{o.value=!1,r.value=!0},m=()=>{o.value=!0,r.value=!0,n("edit")},g=()=>{r.value=!1,n("modal-closed")};return(w,S)=>{const I=t.resolveComponent("KTreeList"),O=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",Ha,[e.documentList&&!e.documentList.length?(t.openBlock(),t.createBlock(Ie,{key:0,"can-edit":e.canEdit,onCreateDocumentation:i},null,8,["can-edit"])):(t.openBlock(),t.createBlock(O,{key:1,class:"documentation-card"},{default:t.withCtx(()=>[t.createElementVNode("div",Ga,[(t.openBlock(),t.createBlock(I,{key:`tree-list-${e.cacheKey}`,class:"document-tree-list",items:e.documentList,"max-depth":2,onChange:S[0]||(S[0]=T=>n("parent-change",T)),onChildChange:S[1]||(S[1]=T=>n("child-change",T)),onSelected:S[2]||(S[2]=T=>n("document-selection",T))},null,8,["items"])),e.selectedDocument?(t.openBlock(),t.createBlock(Ae,{key:c.value,"can-edit":e.canEdit,card:e.card,class:"document-holder","hide-publish-toggle":e.hidePublishToggle,"selected-document":e.selectedDocument,onAdd:i,onDownload:S[3]||(S[3]=T=>n("download")),onEdit:m,onTogglePublished:S[4]||(S[4]=T=>n("toggle-published",T))},null,8,["can-edit","card","hide-publish-toggle","selected-document"])):t.createCommentVNode("",!0)])]),_:1})),r.value?(t.openBlock(),t.createBlock(Oe,{key:2,"action-pending":e.actionPending,documents:e.documentList,editing:o.value,"error-message":e.modalErrorMessage,"hide-publish-toggle":e.hidePublishToggle,record:o.value&&e.selectedDocument?e.selectedDocument:void 0,onCancel:g,onDelete:S[5]||(S[5]=T=>n("delete")),onSave:S[6]||(S[6]=(T,y)=>n("save",T,y))},null,8,["action-pending","documents","editing","error-message","hide-publish-toggle","record"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-d231f54f"]]);(function(e){var a="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+a),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+a),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+a),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+a),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],d=r.variable[1].inside,c=0;c<o.length;c++)d[o[c]]=e.languages.bash[o[c]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);const qa=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));(function(e){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+a.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+`|(?:[^\\\\\r
|
|
15
15
|
()"']|\\\\[^])*)\\)`,"i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);const Ya=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));(function(e){var a="(?:[ ]+(?![ ])(?:<SP_BS>)?|<SP_BS>)".replace(/<SP_BS>/g,function(){return`\\\\[\r
|
|
16
16
|
](?:\\s|\\\\[\r
|
|
17
17
|
]|#.*(?!.))*(?![\\s#]|\\\\[\r
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/documentation",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/documentation.umd.js",
|
|
6
6
|
"module": "./dist/documentation.es.js",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@kong-ui-public/i18n": "^2.0.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@kong/icons": "^1.8.
|
|
54
|
+
"@kong/icons": "^1.8.11",
|
|
55
55
|
"@kong-ui-public/document-viewer": "^2.0.19",
|
|
56
|
-
"@kong-ui-public/entities-shared": "^2.4.
|
|
56
|
+
"@kong-ui-public/entities-shared": "^2.4.7"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"dev": "cross-env USE_SANDBOX=true vite",
|