@kong-ui-public/forms 4.21.0 → 4.21.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/forms.es.js
CHANGED
|
@@ -4064,7 +4064,7 @@ function nf(e, t, n, i, a, o) {
|
|
|
4064
4064
|
}, 8, ["class", "data-testid", "onClick"])
|
|
4065
4065
|
], 10, Xm)) : K("", !0);
|
|
4066
4066
|
}
|
|
4067
|
-
const af = /* @__PURE__ */ G(Zm, [["render", nf], ["__scopeId", "data-v-
|
|
4067
|
+
const af = /* @__PURE__ */ G(Zm, [["render", nf], ["__scopeId", "data-v-83ea3503"]]), of = { class: "form-field-wrapper field-checkbox" }, rf = /* @__PURE__ */ fe({
|
|
4068
4068
|
__name: "FieldCheckbox",
|
|
4069
4069
|
props: {
|
|
4070
4070
|
disabled: {
|
package/dist/forms.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(function(L,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong/icons"),require("axios"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong/icons","axios","@kong-ui-public/entities-shared"],t):(L=typeof globalThis<"u"?globalThis:L||self,t(L["kong-ui-public-forms"]={},L.Vue,L["kong-ui-public-i18n"],L.KongIcons,L.axios,L["kong-ui-public-entities-shared"]))})(this,(function(L,t,ue,Ee,tr,kt){"use strict";function Ln(e,n){for(var o=-1,a=e==null?0:e.length;++o<a&&n(e[o],o,e)!==!1;);return e}function nr(e){return function(n,o,a){for(var r=-1,i=Object(n),s=a(n),l=s.length;l--;){var c=s[++r];if(o(i[c],c,i)===!1)break}return n}}var or=nr();function ar(e,n){for(var o=-1,a=Array(e);++o<e;)a[o]=n(o);return a}var Un=typeof global=="object"&&global&&global.Object===Object&&global,rr=typeof self=="object"&&self&&self.Object===Object&&self,ge=Un||rr||Function("return this")(),Le=ge.Symbol,Pn=Object.prototype,ir=Pn.hasOwnProperty,lr=Pn.toString,dt=Le?Le.toStringTag:void 0;function sr(e){var n=ir.call(e,dt),o=e[dt];try{e[dt]=void 0;var a=!0}catch{}var r=lr.call(e);return a&&(n?e[dt]=o:delete e[dt]),r}var dr=Object.prototype,cr=dr.toString;function mr(e){return cr.call(e)}var ur="[object Null]",fr="[object Undefined]",$n=Le?Le.toStringTag:void 0;function Ue(e){return e==null?e===void 0?fr:ur:$n&&$n in Object(e)?sr(e):mr(e)}function Pe(e){return e!=null&&typeof e=="object"}var hr="[object Arguments]";function xn(e){return Pe(e)&&Ue(e)==hr}var vn=Object.prototype,pr=vn.hasOwnProperty,gr=vn.propertyIsEnumerable,yr=xn((function(){return arguments})())?xn:function(e){return Pe(e)&&pr.call(e,"callee")&&!gr.call(e,"callee")},$e=Array.isArray;function br(){return!1}var jn=typeof L=="object"&&L&&!L.nodeType&&L,qn=jn&&typeof module=="object"&&module&&!module.nodeType&&module,_r=qn&&qn.exports===jn,zn=_r?ge.Buffer:void 0,Er=zn?zn.isBuffer:void 0,Kn=Er||br,Tr=9007199254740991,Sr=/^(?:0|[1-9]\d*)$/;function Hn(e,n){var o=typeof e;return n=n??Tr,!!n&&(o=="number"||o!="symbol"&&Sr.test(e))&&e>-1&&e%1==0&&e<n}var Cr=9007199254740991;function Yn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Cr}var wr="[object Arguments]",kr="[object Array]",Ar="[object Boolean]",Mr="[object Date]",Nr="[object Error]",Ir="[object Function]",Or="[object Map]",Vr="[object Number]",Br="[object Object]",Fr="[object RegExp]",Rr="[object Set]",Dr="[object String]",Lr="[object WeakMap]",Ur="[object ArrayBuffer]",Pr="[object DataView]",$r="[object Float32Array]",xr="[object Float64Array]",vr="[object Int8Array]",jr="[object Int16Array]",qr="[object Int32Array]",zr="[object Uint8Array]",Kr="[object Uint8ClampedArray]",Hr="[object Uint16Array]",Yr="[object Uint32Array]",q={};q[$r]=q[xr]=q[vr]=q[jr]=q[qr]=q[zr]=q[Kr]=q[Hr]=q[Yr]=!0,q[wr]=q[kr]=q[Ur]=q[Ar]=q[Pr]=q[Mr]=q[Nr]=q[Ir]=q[Or]=q[Vr]=q[Br]=q[Fr]=q[Rr]=q[Dr]=q[Lr]=!1;function Gr(e){return Pe(e)&&Yn(e.length)&&!!q[Ue(e)]}function Wt(e){return function(n){return e(n)}}var Gn=typeof L=="object"&&L&&!L.nodeType&&L,ct=Gn&&typeof module=="object"&&module&&!module.nodeType&&module,Wr=ct&&ct.exports===Gn,Zt=Wr&&Un.process,Xe=(function(){try{var e=ct&&ct.require&&ct.require("util").types;return e||Zt&&Zt.binding&&Zt.binding("util")}catch{}})(),Wn=Xe&&Xe.isTypedArray,Zr=Wn?Wt(Wn):Gr,Xr=Object.prototype,Jr=Xr.hasOwnProperty;function Zn(e,n){var o=$e(e),a=!o&&yr(e),r=!o&&!a&&Kn(e),i=!o&&!a&&!r&&Zr(e),s=o||a||r||i,l=s?ar(e.length,String):[],c=l.length;for(var m in e)(n||Jr.call(e,m))&&!(s&&(m=="length"||r&&(m=="offset"||m=="parent")||i&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Hn(m,c)))&&l.push(m);return l}var Qr=Object.prototype;function Xt(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||Qr;return e===o}function Xn(e,n){return function(o){return e(n(o))}}var ei=Xn(Object.keys,Object),ti=Object.prototype,ni=ti.hasOwnProperty;function oi(e){if(!Xt(e))return ei(e);var n=[];for(var o in Object(e))ni.call(e,o)&&o!="constructor"&&n.push(o);return n}function fe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var ai="[object AsyncFunction]",ri="[object Function]",ii="[object GeneratorFunction]",li="[object Proxy]";function x(e){if(!fe(e))return!1;var n=Ue(e);return n==ri||n==ii||n==ai||n==li}function At(e){return e!=null&&Yn(e.length)&&!x(e)}function Mt(e){return At(e)?Zn(e):oi(e)}function si(e,n){return e&&or(e,n,Mt)}function di(e,n){return function(o,a){if(o==null)return o;if(!At(o))return e(o,a);for(var r=o.length,i=-1,s=Object(o);++i<r&&a(s[i],i,s)!==!1;);return o}}var ci=di(si);function Jt(e){return e}function mi(e){return typeof e=="function"?e:Jt}function re(e,n){var o=$e(e)?Ln:ci;return o(e,mi(n))}var ui="[object Symbol]";function Nt(e){return typeof e=="symbol"||Pe(e)&&Ue(e)==ui}var fi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hi=/^\w*$/;function pi(e,n){if($e(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Nt(e)?!0:hi.test(e)||!fi.test(e)||n!=null&&e in Object(n)}var Qt=ge["__core-js_shared__"],Jn=(function(){var e=/[^.]+$/.exec(Qt&&Qt.keys&&Qt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function gi(e){return!!Jn&&Jn in e}var yi=Function.prototype,bi=yi.toString;function je(e){if(e!=null){try{return bi.call(e)}catch{}try{return e+""}catch{}}return""}var _i=/[\\^$.*+?()[\]{}|]/g,Ei=/^\[object .+?Constructor\]$/,Ti=Function.prototype,Si=Object.prototype,Ci=Ti.toString,wi=Si.hasOwnProperty,ki=RegExp("^"+Ci.call(wi).replace(_i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ai(e){if(!fe(e)||gi(e))return!1;var n=x(e)?ki:Ei;return n.test(je(e))}function Mi(e,n){return e==null?void 0:e[n]}function qe(e,n){var o=Mi(e,n);return Ai(o)?o:void 0}var mt=qe(Object,"create");function Ni(){this.__data__=mt?mt(null):{},this.size=0}function Ii(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Oi="__lodash_hash_undefined__",Vi=Object.prototype,Bi=Vi.hasOwnProperty;function Fi(e){var n=this.__data__;if(mt){var o=n[e];return o===Oi?void 0:o}return Bi.call(n,e)?n[e]:void 0}var Ri=Object.prototype,Di=Ri.hasOwnProperty;function Li(e){var n=this.__data__;return mt?n[e]!==void 0:Di.call(n,e)}var Ui="__lodash_hash_undefined__";function Pi(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=mt&&n===void 0?Ui:n,this}function ze(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}ze.prototype.clear=Ni,ze.prototype.delete=Ii,ze.prototype.get=Fi,ze.prototype.has=Li,ze.prototype.set=Pi;function $i(){this.__data__=[],this.size=0}function It(e,n){return e===n||e!==e&&n!==n}function Ot(e,n){for(var o=e.length;o--;)if(It(e[o][0],n))return o;return-1}var xi=Array.prototype,vi=xi.splice;function ji(e){var n=this.__data__,o=Ot(n,e);if(o<0)return!1;var a=n.length-1;return o==a?n.pop():vi.call(n,o,1),--this.size,!0}function qi(e){var n=this.__data__,o=Ot(n,e);return o<0?void 0:n[o][1]}function zi(e){return Ot(this.__data__,e)>-1}function Ki(e,n){var o=this.__data__,a=Ot(o,e);return a<0?(++this.size,o.push([e,n])):o[a][1]=n,this}function Me(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}Me.prototype.clear=$i,Me.prototype.delete=ji,Me.prototype.get=qi,Me.prototype.has=zi,Me.prototype.set=Ki;var ut=qe(ge,"Map");function Hi(){this.size=0,this.__data__={hash:new ze,map:new(ut||Me),string:new ze}}function Yi(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Vt(e,n){var o=e.__data__;return Yi(n)?o[typeof n=="string"?"string":"hash"]:o.map}function Gi(e){var n=Vt(this,e).delete(e);return this.size-=n?1:0,n}function Wi(e){return Vt(this,e).get(e)}function Zi(e){return Vt(this,e).has(e)}function Xi(e,n){var o=Vt(this,e),a=o.size;return o.set(e,n),this.size+=o.size==a?0:1,this}function Ne(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}Ne.prototype.clear=Hi,Ne.prototype.delete=Gi,Ne.prototype.get=Wi,Ne.prototype.has=Zi,Ne.prototype.set=Xi;var Ji="Expected a function";function en(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(Ji);var o=function(){var a=arguments,r=n?n.apply(this,a):a[0],i=o.cache;if(i.has(r))return i.get(r);var s=e.apply(this,a);return o.cache=i.set(r,s)||i,s};return o.cache=new(en.Cache||Ne),o}en.Cache=Ne;var Qi=500;function el(e){var n=en(e,function(a){return o.size===Qi&&o.clear(),a}),o=n.cache;return n}var tl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nl=/\\(\\)?/g,ol=el(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(tl,function(o,a,r,i){n.push(r?i.replace(nl,"$1"):a||o)}),n});function al(e,n){for(var o=-1,a=e==null?0:e.length,r=Array(a);++o<a;)r[o]=n(e[o],o,e);return r}var Qn=Le?Le.prototype:void 0,eo=Qn?Qn.toString:void 0;function to(e){if(typeof e=="string")return e;if($e(e))return al(e,to)+"";if(Nt(e))return eo?eo.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function no(e){return e==null?"":to(e)}function rl(e,n){return $e(e)?e:pi(e,n)?[e]:ol(no(e))}function il(e){if(typeof e=="string"||Nt(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function ll(e,n){n=rl(n,e);for(var o=0,a=n.length;e!=null&&o<a;)e=e[il(n[o++])];return o&&o==a?e:void 0}function $(e,n,o){var a=e==null?void 0:ll(e,n);return a===void 0?o:a}function G(e){return e==null}const ie="kong-ui-forms-api",oo="kong-ui-forms-config",ao="redis-partial-list-fetcher-key",sl="redis-partial-info",Ke="autofill",he="autofillSlot",Te={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"},ro="—";/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:io,setPrototypeOf:lo,isFrozen:dl,getPrototypeOf:cl,getOwnPropertyDescriptor:ml}=Object;let{freeze:le,seal:ye,create:tn}=Object,{apply:nn,construct:on}=typeof Reflect<"u"&&Reflect;le||(le=function(n){return n}),ye||(ye=function(n){return n}),nn||(nn=function(n,o){for(var a=arguments.length,r=new Array(a>2?a-2:0),i=2;i<a;i++)r[i-2]=arguments[i];return n.apply(o,r)}),on||(on=function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),r=1;r<o;r++)a[r-1]=arguments[r];return new n(...a)});const Bt=de(Array.prototype.forEach),ul=de(Array.prototype.lastIndexOf),so=de(Array.prototype.pop),ft=de(Array.prototype.push),fl=de(Array.prototype.splice),Ft=de(String.prototype.toLowerCase),an=de(String.prototype.toString),rn=de(String.prototype.match),ht=de(String.prototype.replace),hl=de(String.prototype.indexOf),pl=de(String.prototype.trim),Se=de(Object.prototype.hasOwnProperty),se=de(RegExp.prototype.test),pt=gl(TypeError);function de(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var o=arguments.length,a=new Array(o>1?o-1:0),r=1;r<o;r++)a[r-1]=arguments[r];return nn(e,n,a)}}function gl(e){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return on(e,o)}}function D(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ft;lo&&lo(e,null);let a=n.length;for(;a--;){let r=n[a];if(typeof r=="string"){const i=o(r);i!==r&&(dl(n)||(n[a]=i),r=i)}e[r]=!0}return e}function yl(e){for(let n=0;n<e.length;n++)Se(e,n)||(e[n]=null);return e}function we(e){const n=tn(null);for(const[o,a]of io(e))Se(e,o)&&(Array.isArray(a)?n[o]=yl(a):a&&typeof a=="object"&&a.constructor===Object?n[o]=we(a):n[o]=a);return n}function gt(e,n){for(;e!==null;){const a=ml(e,n);if(a){if(a.get)return de(a.get);if(typeof a.value=="function")return de(a.value)}e=cl(e)}function o(){return null}return o}const co=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ln=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),sn=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bl=le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dn=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_l=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mo=le(["#text"]),uo=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),cn=le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fo=le(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rt=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),El=ye(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Tl=ye(/<%[\w\W]*|[\w\W]*%>/gm),Sl=ye(/\$\{[\w\W]*/gm),Cl=ye(/^data-[\-\w.\u00B7-\uFFFF]+$/),wl=ye(/^aria-[\-\w]+$/),ho=ye(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),kl=ye(/^(?:\w+script|data):/i),Al=ye(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),po=ye(/^html$/i),Ml=ye(/^[a-z][.\w]*(-[.\w]+)+$/i);var go=Object.freeze({__proto__:null,ARIA_ATTR:wl,ATTR_WHITESPACE:Al,CUSTOM_ELEMENT:Ml,DATA_ATTR:Cl,DOCTYPE_NAME:po,ERB_EXPR:Tl,IS_ALLOWED_URI:ho,IS_SCRIPT_OR_DATA:kl,MUSTACHE_EXPR:El,TMPLIT_EXPR:Sl});const yt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Nl=function(){return typeof window>"u"?null:window},Il=function(n,o){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let a=null;const r="data-tt-policy-suffix";o&&o.hasAttribute(r)&&(a=o.getAttribute(r));const i="dompurify"+(a?"#"+a:"");try{return n.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},yo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function bo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nl();const n=O=>bo(O);if(n.version="3.3.1",n.removed=[],!e||!e.document||e.document.nodeType!==yt.document||!e.Element)return n.isSupported=!1,n;let{document:o}=e;const a=o,r=a.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:m,NamedNodeMap:p=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:E}=e,A=c.prototype,u=gt(A,"cloneNode"),C=gt(A,"remove"),w=gt(A,"nextSibling"),I=gt(A,"childNodes"),_=gt(A,"parentNode");if(typeof s=="function"){const O=o.createElement("template");O.content&&O.content.ownerDocument&&(o=O.content.ownerDocument)}let k,b="";const{implementation:y,createNodeIterator:g,createDocumentFragment:B,getElementsByTagName:v}=o,{importNode:N}=a;let S=yo();n.isSupported=typeof io=="function"&&typeof _=="function"&&y&&y.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:R,TMPLIT_EXPR:U,DATA_ATTR:te,ARIA_ATTR:Ve,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:Be,CUSTOM_ELEMENT:Cn}=go;let{IS_ALLOWED_URI:vt}=go,V=null;const H=D({},[...co,...ln,...sn,...dn,...mo]);let Z=null;const Ra=D({},[...uo,...cn,...fo,...Rt]);let X=Object.seal(tn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),St=null,wn=null;const nt=Object.seal(tn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Da=!0,kn=!0,La=!1,Ua=!0,ot=!1,jt=!0,We=!1,An=!1,Mn=!1,at=!1,qt=!1,zt=!1,Pa=!0,$a=!1;const $f="user-content-";let Nn=!0,Ct=!1,rt={},ke=null;const In=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let xa=null;const va=D({},["audio","video","img","source","image","track"]);let On=null;const ja=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kt="http://www.w3.org/1998/Math/MathML",Ht="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let it=Fe,Vn=!1,Bn=null;const xf=D({},[Kt,Ht,Fe],an);let Yt=D({},["mi","mo","mn","ms","mtext"]),Gt=D({},["annotation-xml"]);const vf=D({},["title","style","font","a","script"]);let wt=null;const jf=["application/xhtml+xml","text/html"],qf="text/html";let ee=null,lt=null;const zf=o.createElement("form"),qa=function(d){return d instanceof RegExp||d instanceof Function},Fn=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(lt&<===d)){if((!d||typeof d!="object")&&(d={}),d=we(d),wt=jf.indexOf(d.PARSER_MEDIA_TYPE)===-1?qf:d.PARSER_MEDIA_TYPE,ee=wt==="application/xhtml+xml"?an:Ft,V=Se(d,"ALLOWED_TAGS")?D({},d.ALLOWED_TAGS,ee):H,Z=Se(d,"ALLOWED_ATTR")?D({},d.ALLOWED_ATTR,ee):Ra,Bn=Se(d,"ALLOWED_NAMESPACES")?D({},d.ALLOWED_NAMESPACES,an):xf,On=Se(d,"ADD_URI_SAFE_ATTR")?D(we(ja),d.ADD_URI_SAFE_ATTR,ee):ja,xa=Se(d,"ADD_DATA_URI_TAGS")?D(we(va),d.ADD_DATA_URI_TAGS,ee):va,ke=Se(d,"FORBID_CONTENTS")?D({},d.FORBID_CONTENTS,ee):In,St=Se(d,"FORBID_TAGS")?D({},d.FORBID_TAGS,ee):we({}),wn=Se(d,"FORBID_ATTR")?D({},d.FORBID_ATTR,ee):we({}),rt=Se(d,"USE_PROFILES")?d.USE_PROFILES:!1,Da=d.ALLOW_ARIA_ATTR!==!1,kn=d.ALLOW_DATA_ATTR!==!1,La=d.ALLOW_UNKNOWN_PROTOCOLS||!1,Ua=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ot=d.SAFE_FOR_TEMPLATES||!1,jt=d.SAFE_FOR_XML!==!1,We=d.WHOLE_DOCUMENT||!1,at=d.RETURN_DOM||!1,qt=d.RETURN_DOM_FRAGMENT||!1,zt=d.RETURN_TRUSTED_TYPE||!1,Mn=d.FORCE_BODY||!1,Pa=d.SANITIZE_DOM!==!1,$a=d.SANITIZE_NAMED_PROPS||!1,Nn=d.KEEP_CONTENT!==!1,Ct=d.IN_PLACE||!1,vt=d.ALLOWED_URI_REGEXP||ho,it=d.NAMESPACE||Fe,Yt=d.MATHML_TEXT_INTEGRATION_POINTS||Yt,Gt=d.HTML_INTEGRATION_POINTS||Gt,X=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&qa(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&qa(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ot&&(kn=!1),qt&&(at=!0),rt&&(V=D({},mo),Z=[],rt.html===!0&&(D(V,co),D(Z,uo)),rt.svg===!0&&(D(V,ln),D(Z,cn),D(Z,Rt)),rt.svgFilters===!0&&(D(V,sn),D(Z,cn),D(Z,Rt)),rt.mathMl===!0&&(D(V,dn),D(Z,fo),D(Z,Rt))),d.ADD_TAGS&&(typeof d.ADD_TAGS=="function"?nt.tagCheck=d.ADD_TAGS:(V===H&&(V=we(V)),D(V,d.ADD_TAGS,ee))),d.ADD_ATTR&&(typeof d.ADD_ATTR=="function"?nt.attributeCheck=d.ADD_ATTR:(Z===Ra&&(Z=we(Z)),D(Z,d.ADD_ATTR,ee))),d.ADD_URI_SAFE_ATTR&&D(On,d.ADD_URI_SAFE_ATTR,ee),d.FORBID_CONTENTS&&(ke===In&&(ke=we(ke)),D(ke,d.FORBID_CONTENTS,ee)),d.ADD_FORBID_CONTENTS&&(ke===In&&(ke=we(ke)),D(ke,d.ADD_FORBID_CONTENTS,ee)),Nn&&(V["#text"]=!0),We&&D(V,["html","head","body"]),V.table&&(D(V,["tbody"]),delete St.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=d.TRUSTED_TYPES_POLICY,b=k.createHTML("")}else k===void 0&&(k=Il(E,r)),k!==null&&typeof b=="string"&&(b=k.createHTML(""));le&&le(d),lt=d}},za=D({},[...ln,...sn,...bl]),Ka=D({},[...dn,..._l]),Kf=function(d){let T=_(d);(!T||!T.tagName)&&(T={namespaceURI:it,tagName:"template"});const M=Ft(d.tagName),z=Ft(T.tagName);return Bn[d.namespaceURI]?d.namespaceURI===Ht?T.namespaceURI===Fe?M==="svg":T.namespaceURI===Kt?M==="svg"&&(z==="annotation-xml"||Yt[z]):!!za[M]:d.namespaceURI===Kt?T.namespaceURI===Fe?M==="math":T.namespaceURI===Ht?M==="math"&&Gt[z]:!!Ka[M]:d.namespaceURI===Fe?T.namespaceURI===Ht&&!Gt[z]||T.namespaceURI===Kt&&!Yt[z]?!1:!Ka[M]&&(vf[M]||!za[M]):!!(wt==="application/xhtml+xml"&&Bn[d.namespaceURI]):!1},Ae=function(d){ft(n.removed,{element:d});try{_(d).removeChild(d)}catch{C(d)}},Ze=function(d,T){try{ft(n.removed,{attribute:T.getAttributeNode(d),from:T})}catch{ft(n.removed,{attribute:null,from:T})}if(T.removeAttribute(d),d==="is")if(at||qt)try{Ae(T)}catch{}else try{T.setAttribute(d,"")}catch{}},Ha=function(d){let T=null,M=null;if(Mn)d="<remove></remove>"+d;else{const Q=rn(d,/^[\r\n\t ]+/);M=Q&&Q[0]}wt==="application/xhtml+xml"&&it===Fe&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");const z=k?k.createHTML(d):d;if(it===Fe)try{T=new h().parseFromString(z,wt)}catch{}if(!T||!T.documentElement){T=y.createDocument(it,"template",null);try{T.documentElement.innerHTML=Vn?b:z}catch{}}const ae=T.body||T.documentElement;return d&&M&&ae.insertBefore(o.createTextNode(M),ae.childNodes[0]||null),it===Fe?v.call(T,We?"html":"body")[0]:We?T.documentElement:ae},Ya=function(d){return g.call(d.ownerDocument||d,d,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Rn=function(d){return d instanceof f&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof p)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},Ga=function(d){return typeof l=="function"&&d instanceof l};function Re(O,d,T){Bt(O,M=>{M.call(n,d,T,lt)})}const Wa=function(d){let T=null;if(Re(S.beforeSanitizeElements,d,null),Rn(d))return Ae(d),!0;const M=ee(d.nodeName);if(Re(S.uponSanitizeElement,d,{tagName:M,allowedTags:V}),jt&&d.hasChildNodes()&&!Ga(d.firstElementChild)&&se(/<[/\w!]/g,d.innerHTML)&&se(/<[/\w!]/g,d.textContent)||d.nodeType===yt.progressingInstruction||jt&&d.nodeType===yt.comment&&se(/<[/\w]/g,d.data))return Ae(d),!0;if(!(nt.tagCheck instanceof Function&&nt.tagCheck(M))&&(!V[M]||St[M])){if(!St[M]&&Xa(M)&&(X.tagNameCheck instanceof RegExp&&se(X.tagNameCheck,M)||X.tagNameCheck instanceof Function&&X.tagNameCheck(M)))return!1;if(Nn&&!ke[M]){const z=_(d)||d.parentNode,ae=I(d)||d.childNodes;if(ae&&z){const Q=ae.length;for(let me=Q-1;me>=0;--me){const De=u(ae[me],!0);De.__removalCount=(d.__removalCount||0)+1,z.insertBefore(De,w(d))}}}return Ae(d),!0}return d instanceof c&&!Kf(d)||(M==="noscript"||M==="noembed"||M==="noframes")&&se(/<\/no(script|embed|frames)/i,d.innerHTML)?(Ae(d),!0):(ot&&d.nodeType===yt.text&&(T=d.textContent,Bt([F,R,U],z=>{T=ht(T,z," ")}),d.textContent!==T&&(ft(n.removed,{element:d.cloneNode()}),d.textContent=T)),Re(S.afterSanitizeElements,d,null),!1)},Za=function(d,T,M){if(Pa&&(T==="id"||T==="name")&&(M in o||M in zf))return!1;if(!(kn&&!wn[T]&&se(te,T))){if(!(Da&&se(Ve,T))){if(!(nt.attributeCheck instanceof Function&&nt.attributeCheck(T,d))){if(!Z[T]||wn[T]){if(!(Xa(d)&&(X.tagNameCheck instanceof RegExp&&se(X.tagNameCheck,d)||X.tagNameCheck instanceof Function&&X.tagNameCheck(d))&&(X.attributeNameCheck instanceof RegExp&&se(X.attributeNameCheck,T)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(T,d))||T==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&se(X.tagNameCheck,M)||X.tagNameCheck instanceof Function&&X.tagNameCheck(M))))return!1}else if(!On[T]){if(!se(vt,ht(M,Be,""))){if(!((T==="src"||T==="xlink:href"||T==="href")&&d!=="script"&&hl(M,"data:")===0&&xa[d])){if(!(La&&!se(J,ht(M,Be,"")))){if(M)return!1}}}}}}}return!0},Xa=function(d){return d!=="annotation-xml"&&rn(d,Cn)},Ja=function(d){Re(S.beforeSanitizeAttributes,d,null);const{attributes:T}=d;if(!T||Rn(d))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let z=T.length;for(;z--;){const ae=T[z],{name:Q,namespaceURI:me,value:De}=ae,st=ee(Q),Dn=De;let oe=Q==="value"?Dn:pl(Dn);if(M.attrName=st,M.attrValue=oe,M.keepAttr=!0,M.forceKeepAttr=void 0,Re(S.uponSanitizeAttribute,d,M),oe=M.attrValue,$a&&(st==="id"||st==="name")&&(Ze(Q,d),oe=$f+oe),jt&&se(/((--!?|])>)|<\/(style|title|textarea)/i,oe)){Ze(Q,d);continue}if(st==="attributename"&&rn(oe,"href")){Ze(Q,d);continue}if(M.forceKeepAttr)continue;if(!M.keepAttr){Ze(Q,d);continue}if(!Ua&&se(/\/>/i,oe)){Ze(Q,d);continue}ot&&Bt([F,R,U],er=>{oe=ht(oe,er," ")});const Qa=ee(d.nodeName);if(!Za(Qa,st,oe)){Ze(Q,d);continue}if(k&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!me)switch(E.getAttributeType(Qa,st)){case"TrustedHTML":{oe=k.createHTML(oe);break}case"TrustedScriptURL":{oe=k.createScriptURL(oe);break}}if(oe!==Dn)try{me?d.setAttributeNS(me,Q,oe):d.setAttribute(Q,oe),Rn(d)?Ae(d):so(n.removed)}catch{Ze(Q,d)}}Re(S.afterSanitizeAttributes,d,null)},Hf=function O(d){let T=null;const M=Ya(d);for(Re(S.beforeSanitizeShadowDOM,d,null);T=M.nextNode();)Re(S.uponSanitizeShadowNode,T,null),Wa(T),Ja(T),T.content instanceof i&&O(T.content);Re(S.afterSanitizeShadowDOM,d,null)};return n.sanitize=function(O){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=null,M=null,z=null,ae=null;if(Vn=!O,Vn&&(O="<!-->"),typeof O!="string"&&!Ga(O))if(typeof O.toString=="function"){if(O=O.toString(),typeof O!="string")throw pt("dirty is not a string, aborting")}else throw pt("toString is not a function");if(!n.isSupported)return O;if(An||Fn(d),n.removed=[],typeof O=="string"&&(Ct=!1),Ct){if(O.nodeName){const De=ee(O.nodeName);if(!V[De]||St[De])throw pt("root node is forbidden and cannot be sanitized in-place")}}else if(O instanceof l)T=Ha("<!---->"),M=T.ownerDocument.importNode(O,!0),M.nodeType===yt.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?T=M:T.appendChild(M);else{if(!at&&!ot&&!We&&O.indexOf("<")===-1)return k&&zt?k.createHTML(O):O;if(T=Ha(O),!T)return at?null:zt?b:""}T&&Mn&&Ae(T.firstChild);const Q=Ya(Ct?O:T);for(;z=Q.nextNode();)Wa(z),Ja(z),z.content instanceof i&&Hf(z.content);if(Ct)return O;if(at){if(qt)for(ae=B.call(T.ownerDocument);T.firstChild;)ae.appendChild(T.firstChild);else ae=T;return(Z.shadowroot||Z.shadowrootmode)&&(ae=N.call(a,ae,!0)),ae}let me=We?T.outerHTML:T.innerHTML;return We&&V["!doctype"]&&T.ownerDocument&&T.ownerDocument.doctype&&T.ownerDocument.doctype.name&&se(po,T.ownerDocument.doctype.name)&&(me="<!DOCTYPE "+T.ownerDocument.doctype.name+`>
|
|
2
|
-
`+me),ot&&Bt([F,R,U],De=>{me=ht(me,De," ")}),k&&zt?k.createHTML(me):me},n.setConfig=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fn(O),An=!0},n.clearConfig=function(){lt=null,An=!1},n.isValidAttribute=function(O,d,T){lt||Fn({});const M=ee(O),z=ee(d);return Za(M,z,T)},n.addHook=function(O,d){typeof d=="function"&&ft(S[O],d)},n.removeHook=function(O,d){if(d!==void 0){const T=ul(S[O],d);return T===-1?void 0:fl(S[O],T,1)[0]}return so(S[O])},n.removeHooks=function(O){S[O]=[]},n.removeAllHooks=function(){S=yo()},n}var Ol=bo();function Vl(){this.__data__=new Me,this.size=0}function Bl(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function Fl(e){return this.__data__.get(e)}function Rl(e){return this.__data__.has(e)}var Dl=200;function Ll(e,n){var o=this.__data__;if(o instanceof Me){var a=o.__data__;if(!ut||a.length<Dl-1)return a.push([e,n]),this.size=++o.size,this;o=this.__data__=new Ne(a)}return o.set(e,n),this.size=o.size,this}function Je(e){var n=this.__data__=new Me(e);this.size=n.size}Je.prototype.clear=Vl,Je.prototype.delete=Bl,Je.prototype.get=Fl,Je.prototype.has=Rl,Je.prototype.set=Ll;var Dt=(function(){try{var e=qe(Object,"defineProperty");return e({},"",{}),e}catch{}})();function _o(e,n,o){n=="__proto__"&&Dt?Dt(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}var Ul=Object.prototype,Pl=Ul.hasOwnProperty;function Eo(e,n,o){var a=e[n];(!(Pl.call(e,n)&&It(a,o))||o===void 0&&!(n in e))&&_o(e,n,o)}function Lt(e,n,o,a){var r=!o;o||(o={});for(var i=-1,s=n.length;++i<s;){var l=n[i],c=void 0;c===void 0&&(c=e[l]),r?_o(o,l,c):Eo(o,l,c)}return o}function $l(e,n){return e&&Lt(n,Mt(n),e)}function xl(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}var vl=Object.prototype,jl=vl.hasOwnProperty;function ql(e){if(!fe(e))return xl(e);var n=Xt(e),o=[];for(var a in e)a=="constructor"&&(n||!jl.call(e,a))||o.push(a);return o}function Ut(e){return At(e)?Zn(e,!0):ql(e)}function zl(e,n){return e&&Lt(n,Ut(n),e)}var To=typeof L=="object"&&L&&!L.nodeType&&L,So=To&&typeof module=="object"&&module&&!module.nodeType&&module,Kl=So&&So.exports===To,Co=Kl?ge.Buffer:void 0,wo=Co?Co.allocUnsafe:void 0;function Hl(e,n){if(n)return e.slice();var o=e.length,a=wo?wo(o):new e.constructor(o);return e.copy(a),a}function Yl(e,n){var o=-1,a=e.length;for(n||(n=Array(a));++o<a;)n[o]=e[o];return n}function Gl(e,n){for(var o=-1,a=e==null?0:e.length,r=0,i=[];++o<a;){var s=e[o];n(s,o,e)&&(i[r++]=s)}return i}function ko(){return[]}var Wl=Object.prototype,Zl=Wl.propertyIsEnumerable,Ao=Object.getOwnPropertySymbols,mn=Ao?function(e){return e==null?[]:(e=Object(e),Gl(Ao(e),function(n){return Zl.call(e,n)}))}:ko;function Xl(e,n){return Lt(e,mn(e),n)}function Mo(e,n){for(var o=-1,a=n.length,r=e.length;++o<a;)e[r+o]=n[o];return e}var No=Xn(Object.getPrototypeOf,Object),Jl=Object.getOwnPropertySymbols,Io=Jl?function(e){for(var n=[];e;)Mo(n,mn(e)),e=No(e);return n}:ko;function Ql(e,n){return Lt(e,Io(e),n)}function Oo(e,n,o){var a=n(e);return $e(e)?a:Mo(a,o(e))}function es(e){return Oo(e,Mt,mn)}function ts(e){return Oo(e,Ut,Io)}var un=qe(ge,"DataView"),fn=qe(ge,"Promise"),Qe=qe(ge,"Set"),hn=qe(ge,"WeakMap"),Vo="[object Map]",ns="[object Object]",Bo="[object Promise]",Fo="[object Set]",Ro="[object WeakMap]",Do="[object DataView]",os=je(un),as=je(ut),rs=je(fn),is=je(Qe),ls=je(hn),Ie=Ue;(un&&Ie(new un(new ArrayBuffer(1)))!=Do||ut&&Ie(new ut)!=Vo||fn&&Ie(fn.resolve())!=Bo||Qe&&Ie(new Qe)!=Fo||hn&&Ie(new hn)!=Ro)&&(Ie=function(e){var n=Ue(e),o=n==ns?e.constructor:void 0,a=o?je(o):"";if(a)switch(a){case os:return Do;case as:return Vo;case rs:return Bo;case is:return Fo;case ls:return Ro}return n});var ss=Object.prototype,ds=ss.hasOwnProperty;function cs(e){var n=e.length,o=new e.constructor(n);return n&&typeof e[0]=="string"&&ds.call(e,"index")&&(o.index=e.index,o.input=e.input),o}var Lo=ge.Uint8Array;function pn(e){var n=new e.constructor(e.byteLength);return new Lo(n).set(new Lo(e)),n}function ms(e,n){var o=n?pn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var us=/\w*$/;function fs(e){var n=new e.constructor(e.source,us.exec(e));return n.lastIndex=e.lastIndex,n}var Uo=Le?Le.prototype:void 0,Po=Uo?Uo.valueOf:void 0;function hs(e){return Po?Object(Po.call(e)):{}}function ps(e,n){var o=n?pn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var gs="[object Boolean]",ys="[object Date]",bs="[object Map]",_s="[object Number]",Es="[object RegExp]",Ts="[object Set]",Ss="[object String]",Cs="[object Symbol]",ws="[object ArrayBuffer]",ks="[object DataView]",As="[object Float32Array]",Ms="[object Float64Array]",Ns="[object Int8Array]",Is="[object Int16Array]",Os="[object Int32Array]",Vs="[object Uint8Array]",Bs="[object Uint8ClampedArray]",Fs="[object Uint16Array]",Rs="[object Uint32Array]";function Ds(e,n,o){var a=e.constructor;switch(n){case ws:return pn(e);case gs:case ys:return new a(+e);case ks:return ms(e,o);case As:case Ms:case Ns:case Is:case Os:case Vs:case Bs:case Fs:case Rs:return ps(e,o);case bs:return new a;case _s:case Ss:return new a(e);case Es:return fs(e);case Ts:return new a;case Cs:return hs(e)}}var $o=Object.create,Ls=(function(){function e(){}return function(n){if(!fe(n))return{};if($o)return $o(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}})();function Us(e){return typeof e.constructor=="function"&&!Xt(e)?Ls(No(e)):{}}var Ps="[object Map]";function $s(e){return Pe(e)&&Ie(e)==Ps}var xo=Xe&&Xe.isMap,xs=xo?Wt(xo):$s,vs="[object Set]";function js(e){return Pe(e)&&Ie(e)==vs}var vo=Xe&&Xe.isSet,qs=vo?Wt(vo):js,zs=1,Ks=2,Hs=4,jo="[object Arguments]",Ys="[object Array]",Gs="[object Boolean]",Ws="[object Date]",Zs="[object Error]",qo="[object Function]",Xs="[object GeneratorFunction]",Js="[object Map]",Qs="[object Number]",zo="[object Object]",ed="[object RegExp]",td="[object Set]",nd="[object String]",od="[object Symbol]",ad="[object WeakMap]",rd="[object ArrayBuffer]",id="[object DataView]",ld="[object Float32Array]",sd="[object Float64Array]",dd="[object Int8Array]",cd="[object Int16Array]",md="[object Int32Array]",ud="[object Uint8Array]",fd="[object Uint8ClampedArray]",hd="[object Uint16Array]",pd="[object Uint32Array]",j={};j[jo]=j[Ys]=j[rd]=j[id]=j[Gs]=j[Ws]=j[ld]=j[sd]=j[dd]=j[cd]=j[md]=j[Js]=j[Qs]=j[zo]=j[ed]=j[td]=j[nd]=j[od]=j[ud]=j[fd]=j[hd]=j[pd]=!0,j[Zs]=j[qo]=j[ad]=!1;function bt(e,n,o,a,r,i){var s,l=n&zs,c=n&Ks,m=n&Hs;if(s!==void 0)return s;if(!fe(e))return e;var p=$e(e);if(p){if(s=cs(e),!l)return Yl(e,s)}else{var f=Ie(e),h=f==qo||f==Xs;if(Kn(e))return Hl(e,l);if(f==zo||f==jo||h&&!r){if(s=c||h?{}:Us(e),!l)return c?Ql(e,zl(s,e)):Xl(e,$l(s,e))}else{if(!j[f])return r?e:{};s=Ds(e,f,l)}}i||(i=new Je);var E=i.get(e);if(E)return E;i.set(e,s),qs(e)?e.forEach(function(C){s.add(bt(C,n,o,C,e,i))}):xs(e)&&e.forEach(function(C,w){s.set(w,bt(C,n,o,w,e,i))});var A=m?c?ts:es:c?Ut:Mt,u=p?void 0:A(e);return Ln(u||e,function(C,w){u&&(w=C,C=e[w]),Eo(s,w,bt(C,n,o,w,e,i))}),s}var gd=1,yd=4;function Oe(e){return bt(e,gd|yd)}const gn=(e,n="")=>typeof e.id<"u"?n+e.id+"":n+(e.inputName||e.label||e.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),Ko=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var bd="[object String]";function He(e){return typeof e=="string"||!$e(e)&&Pe(e)&&Ue(e)==bd}const Ho={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,o={[$(this.options,"validationErrorClass","error")]:n,[$(this.options,"validationSuccessClass","valid")]:!n,disabled:this.fieldDisabled(e),readonly:this.fieldReadonly(e),featured:this.fieldFeatured(e),required:this.fieldRequired(e)};return Array.isArray(e.styleClasses)?re(e.styleClasses,a=>o[a]=!0):He(e.styleClasses)&&(o[e.styleClasses]=!0),G(e.type)||(o["field-"+e.type]=!0),o},fieldErrors(e){return this.errors.filter(o=>o.field.fieldName===e.fieldName).map(o=>o.error)},fieldDisabled(e){return x(e.disabled)?e.disabled.call(this,this.model,e,this):G(e.disabled)?!1:e.disabled},fieldReadonly(e){return x(e.readonly)?e.readonly.call(this,this.model,e,this):G(e.readonly)?!1:e.readonly},fieldFeatured(e){return x(e.featured)?e.featured.call(this,this.model,e,this):G(e.featured)?!1:e.featured},fieldRequired(e){return x(e.required)?e.required.call(this,this.model,e,this):G(e.required)?!1:e.required}}};var yn=function(){return ge.Date.now()},_d=/\s/;function Ed(e){for(var n=e.length;n--&&_d.test(e.charAt(n)););return n}var Td=/^\s+/;function Sd(e){return e&&e.slice(0,Ed(e)+1).replace(Td,"")}var Yo=NaN,Cd=/^[-+]0x[0-9a-f]+$/i,wd=/^0b[01]+$/i,kd=/^0o[0-7]+$/i,Ad=parseInt;function bn(e){if(typeof e=="number")return e;if(Nt(e))return Yo;if(fe(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=fe(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Sd(e);var o=wd.test(e);return o||kd.test(e)?Ad(e.slice(2),o?2:8):Cd.test(e)?Yo:+e}var Md="Expected a function",Nd=Math.max,Id=Math.min;function et(e,n,o){var a,r,i,s,l,c,m=0,p=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Md);n=bn(n)||0,fe(o)&&(p=!!o.leading,f="maxWait"in o,i=f?Nd(bn(o.maxWait)||0,n):i,h="trailing"in o?!!o.trailing:h);function E(y){var g=a,B=r;return a=r=void 0,m=y,s=e.apply(B,g),s}function A(y){return m=y,l=setTimeout(w,n),p?E(y):s}function u(y){var g=y-c,B=y-m,v=n-g;return f?Id(v,i-B):v}function C(y){var g=y-c,B=y-m;return c===void 0||g>=n||g<0||f&&B>=i}function w(){var y=yn();if(C(y))return I(y);l=setTimeout(w,u(y))}function I(y){return l=void 0,h&&a?E(y):(a=r=void 0,s)}function _(){l!==void 0&&clearTimeout(l),m=0,a=c=r=l=void 0}function k(){return l===void 0?s:I(yn())}function b(){var y=yn(),g=C(y);if(a=arguments,r=this,c=y,g){if(l===void 0)return A(c);if(f)return clearTimeout(l),l=setTimeout(w,n),E(c)}return l===void 0&&(l=setTimeout(w,n)),s}return b.cancel=_,b.flush=k,b}var Od="__lodash_hash_undefined__";function Vd(e){return this.__data__.set(e,Od),this}function Bd(e){return this.__data__.has(e)}function Pt(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new Ne;++n<o;)this.add(e[n])}Pt.prototype.add=Pt.prototype.push=Vd,Pt.prototype.has=Bd;function Fd(e,n,o,a){for(var r=e.length,i=o+-1;++i<r;)if(n(e[i],i,e))return i;return-1}function Rd(e){return e!==e}function Dd(e,n,o){for(var a=o-1,r=e.length;++a<r;)if(e[a]===n)return a;return-1}function Ld(e,n,o){return n===n?Dd(e,n,o):Fd(e,Rd,o)}function Ud(e,n){var o=e==null?0:e.length;return!!o&&Ld(e,n,0)>-1}function Pd(e,n){return e.has(n)}function $d(){}function Go(e){var n=-1,o=Array(e.size);return e.forEach(function(a){o[++n]=a}),o}var xd=1/0,vd=Qe&&1/Go(new Qe([,-0]))[1]==xd?function(e){return new Qe(e)}:$d,jd=200;function qd(e,n,o){var a=-1,r=Ud,i=e.length,s=!0,l=[],c=l;if(i>=jd){var m=vd(e);if(m)return Go(m);s=!1,r=Pd,c=new Pt}else c=l;e:for(;++a<i;){var p=e[a],f=p;if(p=p!==0?p:0,s&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;l.push(p)}else r(c,f,o)||(c!==l&&c.push(f),l.push(p))}return l}function Wo(e){return e&&e.length?qd(e):[]}var zd=0;function Zo(e){var n=++zd;return no(e)+n}var Xo=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,xe="\\d\\d?",ve="\\d\\d",Kd="\\d{3}",Hd="\\d{4}",_t="[^\\s]+",Jo=/\[([^]*?)\]/gm;function Qo(e,n){for(var o=[],a=0,r=e.length;a<r;a++)o.push(e[a].substr(0,n));return o}var ea=function(e){return function(n,o){var a=o[e].map(function(i){return i.toLowerCase()}),r=a.indexOf(n.toLowerCase());return r>-1?r:null}};function Ye(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];for(var a=0,r=n;a<r.length;a++){var i=r[a];for(var s in i)e[s]=i[s]}return e}var ta=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],na=["January","February","March","April","May","June","July","August","September","October","November","December"],Yd=Qo(na,3),Gd=Qo(ta,3),oa={dayNamesShort:Gd,dayNames:ta,monthNamesShort:Yd,monthNames:na,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},$t=Ye({},oa),Wd=function(e){return $t=Ye($t,e)},aa=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},ce=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},Zd={D:function(e){return String(e.getDate())},DD:function(e){return ce(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return ce(e.getDay())},ddd:function(e,n){return n.dayNamesShort[e.getDay()]},dddd:function(e,n){return n.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return ce(e.getMonth()+1)},MMM:function(e,n){return n.monthNamesShort[e.getMonth()]},MMMM:function(e,n){return n.monthNames[e.getMonth()]},YY:function(e){return ce(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return ce(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return ce(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return ce(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return ce(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return ce(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return ce(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return ce(e.getMilliseconds(),3)},a:function(e,n){return e.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(e,n){return e.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+ce(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+ce(Math.floor(Math.abs(n)/60),2)+":"+ce(Math.abs(n)%60,2)}},ra=function(e){return+e-1},ia=[null,xe],la=[null,_t],sa=["isPm",_t,function(e,n){var o=e.toLowerCase();return o===n.amPm[0]?0:o===n.amPm[1]?1:null}],da=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var n=(e+"").match(/([+-]|\d\d)/gi);if(n){var o=+n[1]*60+parseInt(n[2],10);return n[0]==="+"?o:-o}return 0}],Xd={D:["day",xe],DD:["day",ve],Do:["day",xe+_t,function(e){return parseInt(e,10)}],M:["month",xe,ra],MM:["month",ve,ra],YY:["year",ve,function(e){var n=new Date,o=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?o-1:o)+e)}],h:["hour",xe,void 0,"isPm"],hh:["hour",ve,void 0,"isPm"],H:["hour",xe],HH:["hour",ve],m:["minute",xe],mm:["minute",ve],s:["second",xe],ss:["second",ve],YYYY:["year",Hd],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",ve,function(e){return+e*10}],SSS:["millisecond",Kd],d:ia,dd:ia,ddd:la,dddd:la,MMM:["month",_t,ea("monthNamesShort")],MMMM:["month",_t,ea("monthNames")],a:sa,A:sa,ZZ:da,Z:da},xt={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Jd=function(e){return Ye(xt,e)},Qd=function(e,n,o){if(n===void 0&&(n=xt.default),o===void 0&&(o={}),typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");n=xt[n]||n;var a=[];n=n.replace(Jo,function(i,s){return a.push(s),"@@@"});var r=Ye(Ye({},$t),o);return n=n.replace(Xo,function(i){return Zd[i](e,r)}),n.replace(/@@@/g,function(){return a.shift()})};function ec(e,n,o){if(o===void 0&&(o={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=xt[n]||n,e.length>1e3)return null;var a=new Date,r={year:a.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],s=[],l=n.replace(Jo,function(k,b){return s.push(aa(b)),"@@@"}),c={},m={};l=aa(l).replace(Xo,function(k){var b=Xd[k],y=b[0],g=b[1],B=b[3];if(c[y])throw new Error("Invalid format. "+y+" specified twice in format");return c[y]=!0,B&&(m[B]=!0),i.push(b),"("+g+")"}),Object.keys(m).forEach(function(k){if(!c[k])throw new Error("Invalid format. "+k+" is required in specified format")}),l=l.replace(/@@@/g,function(){return s.shift()});var p=e.match(new RegExp(l,"i"));if(!p)return null;for(var f=Ye(Ye({},$t),o),h=1;h<p.length;h++){var E=i[h-1],A=E[0],u=E[2],C=u?u(p[h],f):+p[h];if(C==null)return null;r[A]=C}r.isPm===1&&r.hour!=null&&+r.hour!=12?r.hour=+r.hour+12:r.isPm===0&&+r.hour==12&&(r.hour=0);var w;if(r.timezoneOffset==null){w=new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond);for(var I=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],h=0,_=I.length;h<_;h++)if(c[I[h][0]]&&r[I[h][0]]!==w[I[h][1]]())return null}else if(w=new Date(Date.UTC(r.year,r.month,r.day,r.hour,r.minute-r.timezoneOffset,r.second,r.millisecond)),r.month>11||r.month<0||r.day>31||r.day<1||r.hour>23||r.hour<0||r.minute>59||r.minute<0||r.second>59||r.second<0)return null;return w}var tt={format:Qd,parse:ec,defaultI18n:oa,setGlobalDateI18n:Wd,setGlobalDateMasks:Jd};function tc(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var ca=Math.max;function nc(e,n,o){return n=ca(n===void 0?e.length-1:n,0),function(){for(var a=arguments,r=-1,i=ca(a.length-n,0),s=Array(i);++r<i;)s[r]=a[n+r];r=-1;for(var l=Array(n+1);++r<n;)l[r]=a[r];return l[n]=o(s),tc(e,this,l)}}function oc(e){return function(){return e}}var ac=Dt?function(e,n){return Dt(e,"toString",{configurable:!0,enumerable:!1,value:oc(n),writable:!0})}:Jt,rc=800,ic=16,lc=Date.now;function sc(e){var n=0,o=0;return function(){var a=lc(),r=ic-(a-o);if(o=a,r>0){if(++n>=rc)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var dc=sc(ac);function cc(e,n){return dc(nc(e,n,Jt),e+"")}function mc(e,n,o){if(!fe(o))return!1;var a=typeof n;return(a=="number"?At(o)&&Hn(n,o.length):a=="string"&&n in o)?It(o[n],e):!1}var ma=Object.prototype,uc=ma.hasOwnProperty,fc=cc(function(e,n){e=Object(e);var o=-1,a=n.length,r=a>2?n[2]:void 0;for(r&&mc(n[0],n[1],r)&&(a=1);++o<a;)for(var i=n[o],s=Ut(i),l=-1,c=s.length;++l<c;){var m=s[l],p=e[m];(p===void 0||It(p,ma[m])&&!uc.call(e,m))&&(e[m]=i[m])}return e}),hc=ge.isFinite;function ua(e){return typeof e=="number"&&hc(e)}var fa=1/0,pc=17976931348623157e292;function gc(e){if(!e)return e===0?e:0;if(e=bn(e),e===fa||e===-fa){var n=e<0?-1:1;return n*pc}return e===e?e:0}function yc(e){var n=gc(e),o=n%1;return n===n?o?n-o:n:0}function bc(e){return typeof e=="number"&&e==yc(e)}var _c="[object Number]";function _n(e){return typeof e=="number"||Pe(e)&&Ue(e)==_c}const pe={general:{packageName:"forms",disable_global_radio:"The plugin is set to 'Scoped' by default when configured under a {scope}. To configure a global plugin, navigate to the global plugin list page.",disable_source_scope_change:"Changing the {scope} is not allowed when configuring a plugin under it."},"post-function":{tags:{hint:"e.g. tag1, tag2, tag3",newElementButtonLabel:"+ Add"},enabled:{newElementButtonLabel:"+ Add"},selectionGroup:{newElementButtonLabel:"+ Add"},instance_name:{newElementButtonLabel:"+ Add"},name:{newElementButtonLabel:"+ Add"},"config-certificate":{help:"Array of stringified Lua code to be cached and run in sequence during the certificate phase.",newElementButtonLabel:"+ Add"},"config-access":{help:"Array of stringified Lua code to be cached and run in sequence during the access phase.",newElementButtonLabel:"+ Add"},"config-body_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the body_filter phase.",newElementButtonLabel:"+ Add"},"config-header_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the header_filter phase.",newElementButtonLabel:"+ Add"},"config-functions":{newElementButtonLabel:"+ Add"},"config-log":{newElementButtonLabel:"+ Add"},"config-rewrite":{newElementButtonLabel:"+ Add"},"config-ws_client_frame":{newElementButtonLabel:"+ Add"},"config-ws_close":{newElementButtonLabel:"+ Add"},"config-ws_handshake":{newElementButtonLabel:"+ Add"},"config-ws_upstream_frame":{newElementButtonLabel:"+ Add"}},"exit-transformer":{"config-functions":{newElementButtonLabel:"+ Add"}},rla:{view_advanced:"View advanced parameters",window_type:{label:"Rate Limit Window Type",help:"Sets the time window type to either <code>sliding</code> (default) or <code>fixed</code>.<br><ul><li>Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight.</li><li>Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.</li></ul>",options:{fixed:"Fixed",sliding:"Sliding"}},request_limits:{title:"Request Limits",subtitle:"Set one or more limits on the number of API requests allowed within a defined timeframe.",label:"Limit",label_index:"Limit {index}",request_number:"Request number",time_interval:"Time interval",interval_determiner:"Every",seconds:"Seconds"},start_with_a_use_case:"Start with a use case:",use_case_index:"Use case {index}",error_message:{label:"Error Message",code_placeholder:"Code Message",message_placeholder:"Error Message",help:"Set a custom error code and message to be returned when the rate limit is exceeded."},identifiers:{label:"Identifiers",options:{ip:"IP",credential:"Credential",consumer:"Consumer",service:"Service",header:"Header",path:"Path","consumer-group":"Consumer Group",route:"Route"}},redis:{title:"Configure your Redis",address_example:"e.g. localhost:6379"}},validators:{field_is_required:"This field is required",invalid_format:"Invalid format",number_too_small:"The number is too small. Minimum: {0}",number_too_large:"The number is too large. Maximum: {0}",invalid_number:"Invalid number",invalid_integer:"The value is not an integer",text_too_short:"The length of text is too short. Current: {0}, Minimum: {1}",text_too_long:"The length of text is too long. Current: {0}, Maximum: {1}",this_not_text:"This is not a text",this_not_array:"This is not an array",select_min_items:"Select minimum {0} items",select_max_items:"Select maximum {0} items",invalid_date:"Invalid date",date_is_early:"The date is too early. Current: {0}, Minimum: {1}",date_is_late:"The date is too late. Current: {0}, Maximum: {1}",invalid_email:"Invalid e-mail address",invalid_url:"Invalid URL",invalid_card:"Invalid card format",invalid_card_number:"Invalid card number",invalid_text_contain_number:"Invalid text - cannot contains numbers or special characters",invalid_tex_contain_spec:"Invalid text - cannot contains special characters"},redis:{title:"Redis Configuration",shared_configuration:{label:"Use shared configuration",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins.",title:"Shared Redis Configuration",error:"Fetching shared Redis configurations failed.",tooltip:"Only compatible {type} redis configurations will be listed here.",configuration_selector_label:"Select stored Redis configuration",configuration_selector_placeholder:"Pick Redis configuration",create_new_configuration:"New {type} shared configuration",empty_state:"No shared configurations",badge:"Recommended",selector:{title:"Select a Redis configuration",placeholder:"Filter Configurations",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins."}},dedicated_configuration:{label:"Use dedicated configuration",description:"Create a Redis configuration exclusively for this plugin, with settings that won’t impact other plugins.",title:"Connection Settings"},config_card:{common_fields:{created_at_label:"Created at",updated_at_label:"Last Updated at",type_label:"Redis Type"}},custom_plugin:{alert:"Note: For custom plugins, we cannot determine the correct Redis configuration type. Please ensure you select the appropriate option manually.",tooltip:"To apply a shared redis configuration, the redis fields must defined as Kong plugins in plugin schema."}},fields:{auto_suggest:{error:{load_entity:"There was an error loading {entity}"},recently_created:"Recently created {entity}",items_count:"Currently showing {count} {count, plural, =1 {item} other {items}}, type to search",no_results:"No results",loading:"Loading..."}},vfg:{labels:{on:"On",off:"Off"}}},{t:W}=ue.createI18n("en-us",pe),ne={fieldIsRequired:W("validators.field_is_required"),invalidFormat:W("validators.invalid_format"),numberTooSmall:W("validators.number_too_small"),numberTooBig:W("validators.number_too_large"),invalidNumber:W("validators.invalid_number"),invalidInteger:W("validators.invalid_integer"),textTooSmall:W("validators.text_too_short"),textTooBig:W("validators.text_too_long"),thisNotText:W("validators.this_not_text"),thisNotArray:W("validators.this_not_array"),selectMinItems:W("validators.select_min_items"),selectMaxItems:W("validators.select_max_items"),invalidDate:W("validators.invalid_date"),dateIsEarly:W("validators.date_is_early"),dateIsLate:W("validators.date_is_late"),invalidEmail:W("validators.invalid_email"),invalidURL:W("validators.invalid_url"),invalidCard:W("validators.invalid_card"),invalidCardNumber:W("validators.invalid_card_number"),invalidTextContainNumber:W("validators.invalid_text_contain_number"),invalidTextContainSpec:W("validators.invalid_tex_contain_spec")},K=(e,...n)=>{if(e&&n.length>0)for(let o=0;o<n.length;o++)e=e.replace("{"+(o-1)+"}",String(n[o]||""));return e},be=(e,n,o=ne)=>G(e)||e===""?n?[K(o.fieldIsRequired)]:[]:null,Ge={required:(e,n,o,a=ne)=>be(e,n.required,a)||[],number:(e,n,o,a=ne)=>{let r=be(e,n.required,a);return r!=null||(r=[],ua(e)?(!G(n.min)&&e<n.min,(a=ne)&&r.push(K(a.numberTooSmall,n.min)),!G(n.max)&&e>n.max,(a=ne)&&r.push(K(a.numberTooBig,n.max))):r.push(K(a.invalidNumber))),r},integer:(e,n,o,a=ne)=>{let r=be(e,n.required,a);return r!=null||(r=[],r.concat(Ge.number(e,n,o,a)),bc(e)||r.push(K(a.invalidInteger))),r},double:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(!_n(e)||isNaN(e)?[K(a.invalidNumber)]:[])},string:(e,n,o,a=ne)=>{let r=be(e,n.required,a);return r!=null||(r=[],He(e)?(!G(n.min)&&e.length<n.min&&r.push(K(a.textTooSmall,e.length,n.min)),!G(n.max)&&e.length>n.max&&r.push(K(a.textTooBig,e.length,n.max))):r.push(K(a.thisNotText))),r},array:(e,n,o,a=ne)=>{if(n.required){if(!Array.isArray(e))return[K(a.thisNotArray)];if(e.length===0)return[K(a.fieldIsRequired)]}if(!G(e)){if(!G(n.min)&&e.length<n.min)return[K(a.selectMinItems,n.min)];if(!G(n.max)&&e.length>n.max)return[K(a.selectMaxItems,n.max)]}return[]},date:(e,n,o,a=ne)=>{let r=be(e,n.required,a);if(r!=null)return r;r=[];const i=new Date(e);if(isNaN(i.getDate()))return[K(a.invalidDate)];if(!G(n.min)){const s=new Date(n.min);i.valueOf()<s.valueOf()&&r.push(K(a.dateIsEarly,tt.format(i),tt.format(s)))}if(!G(n.max)){const s=new Date(n.max);i.valueOf()>s.valueOf()&&r.push(K(a.dateIsLate,tt.format(i),tt.format(s)))}return r},regexp:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(!G(n.pattern)&&!new RegExp(n.pattern).test(e)?[K(a.invalidFormat)]:[])},email:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)?[]:[K(a.invalidEmail)])},url:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(e)?[]:[K(a.invalidURL)])},creditCard:(e,n,o,a=ne)=>{const r=be(e,n.required,a);if(r!=null)return r;const i=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,s=e.replace(/[^0-9]+/g,"");if(!i.test(s))return[K(a.invalidCard)];let l=0,c,m,p;for(let f=s.length-1;f>=0;f--)c=s.substring(f,f+1),m=parseInt(c,10),p?(m*=2,m>=10?l+=m%10+1:l+=m):l+=m,p=!p;return l%10===0&&s?[]:[K(a.invalidCardNumber)]},alpha:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(/^[a-zA-Z]*$/.test(e)?[]:[K(a.invalidTextContainNumber)])},alphaNumeric:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(/^[a-zA-Z0-9]*$/.test(e)?[]:[K(a.invalidTextContainSpec)])}};Object.keys(Ge).forEach(e=>{const n=Ge[e];x(n)&&(n.locale=o=>(a,r,i)=>n(a,r,i,fc(o,ne)))});function ha(e){return He(e)?Ge[e]!=null?Ge[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function En(e,n,o){let a=$(o.context,"schema.attributes",{});const r=n.value||"input";He(r)&&(a=$(a,r)||a),re(a,(i,s)=>{e.setAttribute(s,i)})}const Ce={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:En,updated:En,componentUpdated:En}},computed:{value:{cache:!1,get(){let e;return x($(this.schema,"get"))?e=this.schema.get(this.model):e=$(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),x(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=$(this.formOptions,"validateAsync",!1);let o=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const r=[];Array.isArray(this.schema.validator)?re(this.schema.validator,i=>{r.push(ha(i).bind(this))}):r.push(ha(this.schema.validator).bind(this)),re(r,i=>{if(n)o.push(i(this.value,this.schema,this.model));else{const s=i(this.value,this.schema,this.model);s&&x(s.then)?s.then(l=>{l&&(this.errors=this.errors.concat(l));const c=this.errors.length===0;this.$emit("validated",c,this.errors,this)}):s&&(o=o.concat(s))}})}const a=r=>{let i=[];re(Wo(r),l=>{Array.isArray(l)&&l.length>0?i=i.concat(l):He(l)&&i.push(l)}),x(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,i,this.schema);const s=i.length===0;return e||this.$emit("validated",s,i,this),this.errors=i,i};return n?Promise.all(o).then(a):a(o)},debouncedValidate(){x(this.debouncedValidateFunc)||(this.debouncedValidateFunc=et(this.validate.bind(this),$(this.schema,"validateDebounceTime",$(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let o=!1;x(this.schema.set)?(this.schema.set(this.model,e),o=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,e),o=!0),o&&(this.$emit("modelUpdated",e,this.schema.model),x(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),$(this.formOptions,"validateAfterChanged",!1)===!0&&($(this.schema,"validateDebounceTime",$(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(e,n){let o=e.replace(/\[(\w+)\]/g,".$1");o=o.replace(/^\./,"");let a=this.model;const r=o.split(".");let i=0;const s=r.length;for(;i<s;){const l=r[i];if(i<s-1)a[l]!==void 0||(a[l]={}),a=a[l];else{a[l]=n;return}++i}},getFieldID(e,n=!1){const o=$(this.formOptions,"fieldIdPrefix","");return gn(e,o)+(n?"-"+Zo():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return $(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},Ec=Object.freeze(Object.defineProperty({__proto__:null,default:Ce},Symbol.toStringTag,{value:"Module"})),P=(e,n)=>{const o=e.__vccOpts||e;for(const[a,r]of n)o[a]=r;return o},Tc={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},Sc={class:"material-icons"},Cc=P(Object.assign({mixins:[Ce],emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{isOpen:!1}},computed:{openClass(){return this.isOpen?"open":"closed"},fieldCount(){return this.schema.fields.length},titleText(){return`${this.isOpen?"Hide":"View"} ${this.fieldCount} Advanced Fields`}},methods:{handleOpen(){this.isOpen=!this.isOpen},updateModel(e,n){this.$emit("model-updated",e,n)}}},{__name:"FieldAdvanced",setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",Tc,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:o[0]||(o[0]=(...a)=>n.handleOpen&&n.handleOpen(...a))},[t.createElementVNode("i",Sc,t.toDisplayString(n.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),t.createElementVNode("span",null,t.toDisplayString(n.titleText),1)]),t.createElementVNode("div",{class:t.normalizeClass(["advanced-field-dropdown",n.openClass])},[t.createVNode(Y,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])],2)]))}}),[["__scopeId","data-v-e8f66c8a"]]),wc={class:"array-card-container"},pa=P(t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0}},emits:["remove-item"],setup(e){const n=e;return t.provide("vfg-array-item-index",n.index),(o,a)=>{const r=t.resolveComponent("KCard"),i=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",wc,[t.createVNode(r,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(i,{appearance:"tertiary",class:"array-card-remove-button",onClick:a[0]||(a[0]=s=>o.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.TrashIcon))]),_:1})])}}}),[["__scopeId","data-v-97302224"]]),kc={class:"array-item-wrapper"},Ac={class:"array-item"},Mc={class:"array-item-after"},ga=P(t.defineComponent({__name:"FieldArrayItem",props:{model:{type:String,default:""}},emits:["remove-item"],setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",kc,[t.createElementVNode("div",Ac,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"tertiary",class:"delete",onClick:o[0]||(o[0]=r=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.TrashIcon))]),_:1})]),t.createElementVNode("div",Mc,[t.renderSlot(n.$slots,"after",{},void 0,!0)])])}}}),[["__scopeId","data-v-51d79db2"]]),Nc={class:"multi-item-wrapper"},ya=P(t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Nc,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"danger",class:"delete",onClick:o[0]||(o[0]=r=>n.$emit("remove-item"))},{default:t.withCtx(()=>[...o[1]||(o[1]=[t.createTextVNode(" - Remove Field ",-1)])]),_:1}),o[2]||(o[2]=t.createElementVNode("hr",null,null,-1))])}}}),[["__scopeId","data-v-b4fcf731"]]),Ic="#6c7489",Oc="12px",Vc="20px";var Bc=4;function ba(e){return bt(e,Bc)}const Fc=["data-testid","data-testlabel"],Rc={class:"item-label"},Dc={class:"autosuggest__results_message"},Lc=P(t.defineComponent({__name:"AutoSuggest",props:t.mergeModels({placeholder:{default:""},suggestions:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emptyMessage:{default:""},domId:{},error:{}},{id:{required:!0},idModifiers:{}}),emits:t.mergeModels(["change","query-change"],["update:id"]),setup(e){const{t:n}=ue.createI18n("en-us",pe),o=t.useModel(e,"id");return(a,r)=>{const i=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(i,{id:e.domId,ref:"suggestion",modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),clearable:"",disabled:e.disabled,"enable-filtering":"",error:e.error!==null,"filter-function":()=>!0,help:e.error!==null?e.error:void 0,items:e.suggestions,loading:e.loading,placeholder:e.placeholder,width:"100%",onChange:r[1]||(r[1]=s=>a.$emit("change",s)),onQueryChange:r[2]||(r[2]=s=>a.$emit("query-change",s))},t.createSlots({"item-template":t.withCtx(({item:s})=>[t.renderSlot(a.$slots,"item",{item:s},()=>[t.createElementVNode("span",{class:"item-label","data-testid":s.id&&`${s.id}-0`,"data-testlabel":s.label},t.toDisplayString(s.label),9,Fc)],!0)]),"selected-item-template":t.withCtx(({item:s})=>[t.renderSlot(a.$slots,"selected-item",{item:s},()=>[t.createElementVNode("span",Rc,t.toDisplayString(s.label),1)],!0)]),empty:t.withCtx(()=>[t.createElementVNode("div",Dc,[t.createElementVNode("span",null,t.toDisplayString(e.emptyMessage||t.unref(n)("fields.auto_suggest.no_results")),1)])]),_:2},[a.$slots.before?{name:"before",fn:t.withCtx(()=>[t.renderSlot(a.$slots,"before",{},void 0,!0)]),key:"0"}:void 0]),1032,["id","modelValue","disabled","error","help","items","loading","placeholder"])}}}),[["__scopeId","data-v-9f6760b4"]]),Uc="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Tn=e=>e?e.length===36&&new RegExp(`^${Uc}$`).test(e):!1,Pc=e=>({...e,label:e.name,value:e.id});function _a(e,n,o){return o?Te.SET_REFERRAL_VALUE:e&&!n||!e&&n?Te.UPDATE_ENTITY:e&&n?Te.CREATE_FROM_ENTITY:Te.CREATE_NOT_FROM_ENTITY}const $c=500,xc=50,vc=t.defineComponent({__name:"FieldScopedEntitySelect",props:{transformItem:{type:Function,default:Pc},allowUuidSearch:{type:Boolean,default:!1},placeholder:{},fields:{default:()=>[]},selectedItem:{},selectedItemLoading:{type:Boolean},initialItemSelected:{type:Boolean},domId:{},id:{},entity:{},disabled:{type:Boolean},fieldDisabled:{type:Boolean},error:{},getAll:{type:Function},getPartial:{type:Function},getOne:{type:Function}},emits:["change"],setup(e){const n=t.ref(""),o=t.ref(!1),a=t.ref(!1),r=t.ref(""),i=t.ref([]),s=t.ref([]),l=t.ref([]),{t:c}=ue.createI18n("en-us",pe),m=t.ref(null);let p=null;const f=async(b,y)=>{if(!e.fieldDisabled){clearTimeout(p),p=setTimeout(()=>{o.value=!0},1500);try{const g=await b();s.value=g,i.value=s.value.map(e.transformItem)}catch(g){if(y!=null&&y.aborted)return;if(i.value=[],tr.isAxiosError(g)&&g.status===404){console.warn("unable to search with UUID",r.value,"for entity type",e.entity);return}n.value=g.message}finally{clearTimeout(p),o.value=!1}}},h=et(b=>{if(b=b||"",r.value=b,!b.trim()&&!a.value){i.value=I(l.value);return}m.value&&m.value.abort();const y=new AbortController;if(m.value=y,a.value){k(b);return}C(b,y)},$c,{leading:!0}),E=async(b,y)=>await e.getAll(b,y),A=async()=>{const{data:{data:b,next:y,offset:g}}=await e.getPartial(xc);return(!y||!g)&&(a.value=!0),s.value=b,l.value=b.map(B=>({...e.transformItem(B),group:c("fields.auto_suggest.recently_created",{entity:e.entity})})),b},u=async b=>[await e.getOne(b)],C=(b,y)=>{Tn(b)&&e.allowUuidSearch?f(async()=>await u(b)):f(async()=>await E(b,y.signal),y.signal)},w=b=>{let y=[];y=I(l.value),b!=null&&b.trim()?i.value=y.filter(g=>e.fields.some(B=>(g[B]||"").includes(b))):i.value=y},I=b=>e.selectedItem?b.some(y=>y.value===e.selectedItem.value)?b:[e.selectedItem,...b]:b,_=b=>{i.value=l.value.filter(y=>y.id===b)},k=b=>{Tn(b)&&e.allowUuidSearch?_(b):w(b)};return t.onMounted(async()=>{await f(A);const b=t.watch(()=>e.selectedItem,y=>{y&&(i.value=I(l.value)),b()});i.value=I(l.value)}),(b,y)=>(t.openBlock(),t.createBlock(Lc,{id:e.id,disabled:e.fieldDisabled,"dom-id":e.domId,"empty-message":n.value,error:e.error,loading:e.selectedItemLoading||o.value,placeholder:e.placeholder,readonly:e.disabled,suggestions:i.value,onChange:y[0]||(y[0]=g=>b.$emit("change",g)),onQueryChange:t.unref(h)},t.createSlots({"selected-item":t.withCtx(({item:g})=>[t.renderSlot(b.$slots,"selected-item",{item:g})]),item:t.withCtx(({item:g})=>[t.renderSlot(b.$slots,"item",{item:g})]),_:2},[b.$slots.before?{name:"before",fn:t.withCtx(()=>[t.renderSlot(b.$slots,"before")]),key:"0"}:void 0]),1032,["id","disabled","dom-id","empty-message","error","loading","placeholder","readonly","suggestions","onQueryChange"]))}}),jc=1e3,qc={components:{FieldScopedEntitySelect:vc,SearchIcon:Ee.SearchIcon},mixins:[Ce],inject:[ie],emits:["model-updated"],setup(){const{t:e}=ue.createI18n("en-us",pe);return{t:e,KUI_ICON_SIZE_40:Vc,KUI_COLOR_TEXT_NEUTRAL:Ic,EMPTY_VALUE_PLACEHOLDER:ro}},data(){return{suggestions:[],idValue:"",message:"Type something to search",error:null,items:[],initialItem:null,selectedItem:null,loading:!1,dataDrained:!1}},computed:{fieldState(){return _a(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},scope(){return this.schema.label.toLowerCase()},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search},inputFields(){var e,n;return((n=(e=this.schema)==null?void 0:e.inputValues)==null?void 0:n.fields)||[]},allowUuidSearch(){return this.inputFields.includes("id")},inputFieldsWithoutId(){return this.inputFields.filter(e=>e!=="id")},initialValueSelected(){var e;return this.idValue===((e=this.initialItem)==null?void 0:e.id)}},async created(){await this.$nextTick();let e,n;this.error=null;try{switch(this.fieldState){case Te.UPDATE_ENTITY:if(!this[ie]){console.warn("[@kong-ui-public/forms] No API service provided");break}this.loading=!0,n=await this.getOne(this.model[this.schema.model]),e=this.getItem(this.schema.entityDataKey?n[this.schema.entityDataKey]:n),this.idValue=e.id;break;case Te.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Te.SET_REFERRAL_VALUE:this.idValue=this.value}e&&(this.initialItem=this.transformItem(e),this.selectedItem=this.initialItem)}catch(o){this.message=this.t("fields.auto_suggest.error.load_entity",{entity:this.schema.entity}),this.error=o.message||this.message,console.error("err!",o)}finally{this.loading=!1}},methods:{getPartial(e){return this[ie].peek(this.entity,e)},async getAll(e,n){return await this.fetchSuggestions(e,"name",n)},async getOne(e){if(!this[ie])return console.warn("[@kong-ui-public/forms] No API service provided"),{};const n=await this[ie].getOne(this.entity,e,{validateStatus:o=>o>=200&&o<300||o===404});if(n.status===404)throw new Error(`Entity of type ${this.entity} with id ${e} not found`);return n.data},transformItem(e){return{...e,label:this.getSuggestionLabel(e),value:e.id}},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e,n){if(!this[ie])return console.warn("[@kong-ui-public/forms] No API service provided"),[];const o=this[ie].getAllV2,{data:a}=await o(this.entity,{size:jc,...e},n);return a.data},async fetchSuggestions(e,n,o){return this.fetchUntilLimit({[n]:e},o)},getSuggestionLabel(e){var o;const n=((o=this.schema)==null?void 0:o.labelField)||"id";return n&&e?e[n]:""},updateModel(e){this.$emit("model-updated",e!=null&&e.length?e:null,this.schema.model)},onSelected(e){this.error=null,this.idValue=e&&e.id,this.selectedItem=e,this.updateModel(this.getReturnValue(e||{}))},getReturnValue(e){var o;const n=(o=this.schema)==null?void 0:o.returnKey;return n?e[n]:e.id}}},zc={class:"entity-suggestion-item"},Kc={class:"entity-label"},Hc={class:"entity-id"},Yc={class:"selected-entity-item"},Gc={class:"selected-entity-label"};function Wc(e,n,o,a,r,i){const s=t.resolveComponent("SearchIcon"),l=t.resolveComponent("FieldScopedEntitySelect");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.disabled?"k-tooltip":"div"),{class:"field-wrap autosuggest","max-width":"300",text:e.schema.disabledTooltip},{default:t.withCtx(()=>[t.createVNode(l,{id:r.idValue,"allow-uuid-search":i.allowUuidSearch,disabled:r.loading,"dom-id":e.schema.model,entity:i.entity,error:r.error,"field-disabled":e.schema.disabled,fields:i.inputFieldsWithoutId,"get-all":i.getAll,"get-one":i.getOne,"get-partial":i.getPartial,"initial-item-selected":i.initialValueSelected,placeholder:r.loading?a.t("fields.auto_suggest.loading"):e.schema.placeholder,"selected-item":r.selectedItem,"selected-item-loading":r.loading,"transform-item":i.transformItem,onChange:i.onSelected},{before:t.withCtx(()=>[t.createVNode(s,{color:a.KUI_COLOR_TEXT_NEUTRAL,size:a.KUI_ICON_SIZE_40},null,8,["color","size"])]),item:t.withCtx(({item:c})=>[t.createElementVNode("div",zc,[t.createElementVNode("span",Kc,t.toDisplayString(c.label??a.EMPTY_VALUE_PLACEHOLDER),1),t.createElementVNode("span",Hc,t.toDisplayString(c.id),1)])]),"selected-item":t.withCtx(({item:c})=>[t.createElementVNode("span",Yc,[t.createElementVNode("span",Gc,t.toDisplayString(c.label??c.id),1)])]),_:1},8,["id","allow-uuid-search","disabled","dom-id","entity","error","field-disabled","fields","get-all","get-one","get-partial","initial-item-selected","placeholder","selected-item","selected-item-loading","transform-item","onChange"])]),_:1},8,["text"])}const Ea=P(qc,[["render",Wc],["__scopeId","data-v-6fe8b574"]]),Sn=50,Zc={mixins:[Ce],inject:[ie],emits:["model-updated"],setup(){const{t:e}=ue.createI18n("en-us",pe);return{t:e}},data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return _a(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},scope(){return this.schema.label.toLowerCase()},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search}},async created(){await this.$nextTick();let e,n;switch(this.fieldState){case Te.UPDATE_ENTITY:if(!this[ie]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[ie].getOne(this.entity,this.model[this.schema.model])).data,e=this.getItem(this.schema.entityDataKey?n[this.schema.entityDataKey]:n),this.idValue=e.id;break;case Te.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Te.SET_REFERRAL_VALUE:this.idValue=this.value}try{e&&(this.initialItems=[{...e,label:this.getSuggestionLabel(e),value:e.id}]),this.items=this.initialItems}catch(o){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",o)}},methods:{onQueryChange(e){e.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=et(this.search,500)),this.performSearch(e)},async search(e){if(e.trim().length===0)return;this.loading=!0;const n=[],o=[],a=this.getInputFields(),r=new Set;Tn(e)&&a.includes("id")?o.push((async()=>{const i=await this.fetchExact(e);n.push({...i,label:this.getSuggestionLabel(i),value:i.id})})()):o.push(...a.filter(i=>i!=="id").map(async i=>{(await this.fetchSuggestions(e,i)).forEach(l=>{r.has(l.id)||(r.add(l.id),n.push({...l,label:this.getSuggestionLabel(l),value:l.id}))})})),await Promise.all(o),this.items=n,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e){const n=[];let o=null;if(!this[ie])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<Sn;){const a=await this[ie].getAll(this.entity,{size:Sn,offset:o,...e});if(n.push(...a.data.data),o=a.data.offset,!o)break}return n.slice(0,Sn)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[ie]?(await this[ie].getOne(this.entity,e)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var e,n;return((n=(e=this.schema)==null?void 0:e.inputValues)==null?void 0:n.fields)||[]},getSuggestionLabel(e){const n=this.getInputFields();return n.length&&e?n.map(o=>e[o]).filter(Boolean).join(" - "):""},updateModel(e){this.$emit("model-updated",e!=null&&e.length?e:null,this.schema.model)},onSelected(e){this.idValue=e&&e.id,this.updateModel(this.getReturnValue(e||{}))},getReturnValue(e){var o;const n=(o=this.schema)==null?void 0:o.returnKey;return n?e[n]:e.id}}},Xc=["data-testid","data-testlabel"],Jc=["data-testid"],Qc={class:"autosuggest__results_message"};function em(e,n,o,a,r,i){const s=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.disabled?"k-tooltip":"div"),{class:"field-wrap autosuggest","max-width":"300",text:a.t("general.disable_source_scope_change",{scope:i.scope})},{default:t.withCtx(()=>[t.createVNode(s,{id:e.schema.model,ref:"suggestion",modelValue:r.idValue,"onUpdate:modelValue":n[0]||(n[0]=l=>r.idValue=l),clearable:"",disabled:e.schema.disabled,"enable-filtering":"","filter-function":()=>!0,items:r.items,loading:r.loading,placeholder:e.schema.placeholder,width:"100%",onChange:i.onSelected,onQueryChange:i.onQueryChange},{"item-template":t.withCtx(({item:l})=>[t.createElementVNode("span",{class:"first-part","data-testid":l.id&&`${l.id}-0`,"data-testlabel":l.label},t.toDisplayString(i.getSuggestionLabel(l).split(" - ")[0]),9,Xc),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.getSuggestionLabel(l).split(" - ").slice(1),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m,class:"field-span","data-testid":l.id&&`${l.id}-${m+1}`||m+1},t.toDisplayString(c),9,Jc))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",Qc,[t.createElementVNode("span",null,t.toDisplayString(r.message),1)])]),_:1},8,["id","modelValue","disabled","items","loading","placeholder","onChange","onQueryChange"])]),_:1},8,["text"])}const Ta=P(Zc,[["render",em],["__scopeId","data-v-8cfdc7f6"]]);function tm(e){const n=t.ref([]),o=t.ref(null),a=u=>He(u)?Ge[u]!=null?Ge[u]:(console.warn(`'${u}' is not a validator function!`),null):u,r=t.computed({get(){var C,w;let u;return x($(e.schema,"get"))?u=e.schema.get((C=e.model)==null?void 0:C.value):u=$((w=e.model)==null?void 0:w.value,e.schema.model),E(u)},set(u){const C=r;u=A(u),x(u)?u(u,C):l(u,C)}}),i=u=>{var _;c();const C=$(e.formOptions,"validateAsync",!1);let w=[];if(e.schema.readonly!==!0&&e.disabled!==!0){const k=[],b=(_=e.schema)==null?void 0:_.validator;b&&(Array.isArray(b)?re(b,y=>{k.push(a(y))}):k.push(a(b))),x(e.externalValidator)&&k.push(e.externalValidator),re(k,y=>{var g,B;if(C)w.push(y(r.value,e.schema,(g=e.model)==null?void 0:g.value));else{const v=y(r.value,e.schema,(B=e.model)==null?void 0:B.value);v&&x(v.then)?v.then(N=>{N&&(n.value=n.value.concat(N));const S=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:S,errors:n.value,field:e.schema})}):v&&(w=w.concat(v))}})}const I=k=>{var y,g;let b=[];if(re(Wo(k),B=>{Array.isArray(B)&&B.length>0?b=b.concat(B):He(B)&&b.push(B)}),x((y=e.schema)==null?void 0:y.onValidated)&&e.schema.onValidated((g=e.model)==null?void 0:g.value,b,e.schema),!u){const B=b.length===0;e.emitValidated&&e.emitValidated({isValid:B,errors:b,field:e.schema})}return k=b,b};return C?Promise.all(w).then(I):I(w)},s=()=>{x(o.value)?o.value():o.value=et(i,$(e.schema,"validateDebounceTime",$(e.formOptions,"validateDebounceTime",500)))},l=(u,C)=>{var I,_,k;let w=!1;x(e.schema.set)?(e.schema.set((I=e.model)==null?void 0:I.value,u),w=!0):e.schema.model&&(m(e.schema.model,u),w=!0),w&&(e.emitModelUpdated&&((_=e.model)!=null&&_.value)&&e.emitModelUpdated({value:u,model:e.schema.model}),x(e.schema.onChanged)&&e.schema.onChanged((k=e.model)==null?void 0:k.value,u,C,e.schema),$(e.formOptions,"validateAfterChanged",!1)===!0&&($(e.schema,"validateDebounceTime",$(e.formOptions,"validateDebounceTime",0))>0?s():i()))},c=()=>{n.value.splice(0)},m=(u,C)=>{var y;let w=u.replace(/\[(\w+)\]/g,".$1");w=w.replace(/^\./,"");let I=((y=e.model)==null?void 0:y.value)||{},_=0;const k=w.split("."),b=k.length;for(;_<b;){const g=k[_];if(_<b-1)I[g]!==void 0||(I[g]={}),I=I[g];else{I[g]=C;return}++_}},p=(u,C=!1)=>{const w=$(e.formOptions,"fieldIdPrefix","");return gn(u,w)+(C?"-"+Zo():"")},f=u=>`${p(u)}-label`,h=()=>$(e.schema,"fieldClasses",[]),E=u=>e.formatValueToField&&typeof e.formatValueToField=="function"?e.formatValueToField(u):u,A=u=>e.formatValueToModel&&typeof e.formatValueToModel=="function"?e.formatValueToModel(u):u;return{value:r,clearValidationErrors:c,getFieldID:p,getLabelId:f,getFieldClasses:h,updateModelValue:l}}function nm(e){const n=[],o=a=>{const r=["cluster-cache","cluster_cache"];for(const i of r)if(a.model.includes(i))return!1;return new RegExp("(?<=-redis-).*").test(a.model)};return e.fields.forEach(a=>{o(a)&&n.push(a)}),{redis:{id:"_redis",fields:n,model:"__redis_partial",redisType:e._supported_redis_partial_type,redisPath:e._redis_partial_path},redisModels:n.map(a=>a.model)}}function om(e,n){const o=new RegExp("(?<=config-redis-).*"),a=/Config\.Redis.*/;return n.filter(i=>{const s=i.model.match(o);return s&&!Object.keys(e).includes(s[0])}).map(i=>{const s=i.label.match(a);return{label:s?s[0]:i.label,key:i.model,value:"N/A",type:"text"}})}const _e={useAbstractFields:tm,useRedisPartial:nm,useRedisNonStandardFields:om},am={class:"form-field-wrapper"},Sa=P(t.defineComponent({__name:"FieldInput",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRefs(a),s=t.inject(he,void 0),{updateModelValue:l,getFieldID:c,clearValidationErrors:m,value:p}=_e.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:_=>{r("modelUpdated",_.value,_.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{var k,b;const _=(k=a.schema)==null?void 0:k.inputType.toLowerCase();if(_==="number"&&((b=a.schema)==null?void 0:b.referenceable)===!0)return"text";switch(_){case"string":return"text";case"datetime":return"datetime-local";default:return _||"text"}}),h={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},E=(_,k)=>{var B,v;let b=_;const y=h[f.value]||"",g=tt.parse(_,y);g&&((B=a.schema)!=null&&B.format?b=tt.format(g,(v=a.schema)==null?void 0:v.format):b=g.valueOf()),l(b,k)},A=(_,k)=>{_n(_)||(_=NaN),l(_,k)},u=_=>{let k=_;switch(a.schema.inputType){case"number":case"range":ua(parseFloat(_))&&(k=parseFloat(_));break}p.value=k,l(k,_)},C=_=>{p.value=_,l(_,_)},w=t.ref(null),I=()=>{var _;x(w.value)&&((_=w.value)==null||_.flush())};return t.onMounted(()=>{switch(f.value){case"number":case"range":w.value=et((_,k)=>{A(_,k)},parseInt($(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":w.value=et((_,k)=>{E(_,k)},parseInt($(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}}),t.onBeforeMount(()=>{f.value==="checkbox"?console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead."):f.value==="radio"?console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead."):f.value==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}),(_,k)=>{const b=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",am,[t.createVNode(b,t.mergeProps(_.$attrs,{id:t.unref(c)(e.schema),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint?e.hint:f.value==="color"||f.value==="range"?t.unref(p):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(p),name:e.schema.inputName,pattern:e.schema.pattern,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,"show-password-mask-toggle":f.value==="password",type:f.value,width:e.schema.width,onBlur:I,"onUpdate:modelValue":u}),null,16,["id","autocomplete","class","disabled","help","max","maxlength","min","minlength","model-value","name","pattern","placeholder","readonly","required","show-password-mask-toggle","type","width"]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(s)),{schema:e.schema,update:C,value:t.unref(p)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-899b626c"]]),rm={name:"FieldMetric",components:{AddIcon:Ee.AddIcon,TrashIcon:Ee.TrashIcon},mixins:[Ce],emits:["remove-item"],data(){return{contentVisible:!1}}},im={key:0,class:"content"};function lm(e,n,o,a,r,i){const s=t.resolveComponent("AddIcon"),l=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field-dropdown",{active:r.contentVisible}])},[t.createElementVNode("div",{class:"title",onClick:n[0]||(n[0]=m=>r.contentVisible=!r.contentVisible)},[t.createTextVNode(t.toDisplayString(e.model.name?e.model.name:"New Item")+" ",1),t.createVNode(s,{class:"metric-add-icon"})]),t.createVNode(t.Transition,{name:"slide-fade"},{default:t.withCtx(()=>[r.contentVisible?(t.openBlock(),t.createElementBlock("div",im,[t.renderSlot(e.$slots,"default"),t.createVNode(c,{appearance:"tertiary",class:"metric-remove-button",onClick:n[1]||(n[1]=m=>e.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(l)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const Ca=P(rm,[["render",lm]]),sm={class:"field-object-container"},dm={key:1},cm=["id"],mm={key:0},um=["onUpdate:modelValue"],fm={key:1},hm=["onUpdate:modelValue"],pm={key:2},gm=["onUpdate:modelValue"],ym=["onClick"],wa=P(Object.assign({mixins:[Ce],emits:["modelUpdated"],expose:["validate","clearValidationErrors","schema"],data(){return{attributes:this.schema?this.schema.attributes:void 0,newKeyType:"string",newKeyName:"",keyTypes:{}}},created(){this.value||(this.value={})},mounted(){if(!this.value)return;const e=Object.keys(this.value),n={};for(let o=0;o<e.length;o++){const a=e[o];n[a]=typeof this.value[a]}this.keyTypes=n},methods:{removeElement(e){const n=this.value;delete n[e],this.value=JSON.parse(JSON.stringify(n));const o=this.keyTypes;delete o[e],this.keyTypes=JSON.parse(JSON.stringify(o))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""},updateModel(e,n){this.$emit("modelUpdated",e,n)}}},{__name:"FieldObject",setup(e){return(n,o)=>{const a=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",sm,[n.schema.schema?(t.openBlock(),t.createBlock(Y,{key:0,model:n.value,options:n.formOptions,schema:n.schema.schema,onModelUpdated:n.updateModel},null,8,["model","options","schema","onModelUpdated"])):(t.openBlock(),t.createElementBlock("div",dm,[t.createElementVNode("table",{id:n.getFieldID(n.schema),class:t.normalizeClass(n.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(r,i)=>(t.openBlock(),t.createElementBlock("tr",{key:i},[t.createElementVNode("td",null,t.toDisplayString(i),1),n.keyTypes[i]==="string"?(t.openBlock(),t.createElementBlock("td",mm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,type:"text"},null,8,um),[[t.vModelText,n.value[i]]])])):t.createCommentVNode("",!0),n.keyTypes[i]==="boolean"?(t.openBlock(),t.createElementBlock("td",fm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,type:"checkbox"},null,8,hm),[[t.vModelCheckbox,n.value[i]]])])):t.createCommentVNode("",!0),n.keyTypes[i]==="number"?(t.openBlock(),t.createElementBlock("td",pm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,type:"number"},null,8,gm),[[t.vModelText,n.value[i]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:s=>n.removeElement(i)},null,8,ym)])]))),128))],10,cm),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=r=>n.newKeyType=r)},[...o[3]||(o[3]=[t.createElementVNode("option",{value:"string"}," String ",-1),t.createElementVNode("option",{value:"number"}," Number ",-1),t.createElementVNode("option",{value:"boolean"}," Boolean ",-1)])],512),[[t.vModelSelect,n.newKeyType]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=r=>n.newKeyName=r),type:"text"},null,512),[[t.vModelText,n.newKeyName]]),t.createElementVNode("input",{type:"button",value:"Add key",onClick:o[2]||(o[2]=(...r)=>n.addKey&&n.addKey(...r))})]))])),[[a,n.attributes]])}}}),[["__scopeId","data-v-6eddb0ed"]]),bm=["id"],_m=["data-testid"],Em={class:"item-wrapper"},Tm={class:"index-wrapper"},Sm={key:0},Cm={key:1},wm=["onUpdate:modelValue","placeholder","type","onInput"],km={key:0,class:"hint"},Am={class:"input-item"},Mm=["placeholder"],Nm={key:0,class:"hint"},ka=P(Object.assign({mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{newKeyName:""}},computed:{subSchema(){return this.schema.schema&&this.schema.schema.fields[0].schema},subFields(){return!this.subSchema&&this.schema.fields},hasObjectKeys(){return this.value&&Object.keys(this.value).length>0},transformedModel(){return this.subSchema&&this.subSchema.fields.length>=1&&this.subSchema.fields[0].type==="array"?new Proxy(this.model[this.schema.model],{get:(e,n)=>({[this.schema.model]:e[n]}),set:(e,n,o)=>e[n]=o[this.schema.model]}):this.model[this.schema.model]},valueInputType(){var e;return["number","integer"].includes((e=this.schema.values)==null?void 0:e.type)?"number":"text"}},mounted(){this.value||(this.value={});let e=[];this.subSchema?e=this.subSchema.fields:this.subFields&&(e=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,e,this.schema.model)},methods:{removeElement(e){const n=this.value;delete n[e],this.value={...n}},transformMapModelValuesToObject(e,n,o){let a={};try{a=JSON.parse(JSON.stringify(e??{}))[o]??{}}catch{}return Object.keys(e).map(r=>{const i=r.indexOf(o+"-");if(i>-1&&Array.isArray(n))if(n.length>0){const l=r.split("-").filter(m=>n.find(p=>p.model===m)),c=r.split(`-${l}`)[0].split(`${o}-`)[1];l.length?a[c]={...a[c],[l]:e[r]}:a[r.substring(i+`${o}-`.length)]=e[r]}else a[r.substring(`${o}-`.length)]=e[r];else{const l=r.split("-").filter(m=>m===this.schema.model),c=r.split(`-${l}`)[0].split(`${o}-`)[1];c&&(a[c]=e[r])}return r}),a},addKey(){var a;const e=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",n=((a=this.schema.values)==null?void 0:a.default)??(this.valueInputType==="number"?0:""),o=this.subSchema?e?[""]:{}:n;this.value[this.newKeyName]=o,this.newKeyName=""},updateModel(e,n){this.$emit("model-updated",this.model[this.schema.model],n)}}},{__name:"FieldObjectAdvanced",setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{id:n.getFieldID(n.schema),class:t.normalizeClass(["object-advanced-wrapper",n.schema.fieldClasses])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(r,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,"data-testid":`field-object-key-${i}`},[t.createElementVNode("div",null,[t.createElementVNode("div",Em,[t.createElementVNode("div",Tm,[t.createElementVNode("strong",null,t.toDisplayString(i),1),t.createElementVNode("div",null,[t.createVNode(a,{appearance:"tertiary",class:"delete",icon:"",type:"button",onClick:s=>n.removeElement(i)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.TrashIcon))]),_:1},8,["onClick"])])]),o[1]||(o[1]=t.createElementVNode("hr",{class:"divider"},null,-1)),n.subSchema?(t.openBlock(),t.createElementBlock("div",Sm,[t.createVNode(Y,{model:n.transformedModel[i],options:{helpAsHtml:!0},schema:n.subSchema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",Cm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:n.valueInputType,onInput:s=>n.updateModel(n.value[i],n.model[n.schema.model])},null,40,wm),[[t.vModelDynamic,n.value[i]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",km,t.toDisplayString(n.schema.fields[0].schema.hint),1)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.autofillSlot),{schema:n.schema.fields&&n.schema.fields[0].schema||n.schema.values,update:s=>n.value[i]=s,value:n.value[i]},null,8,["schema","update","value"]))])),o[2]||(o[2]=t.createElementVNode("hr",{class:"wide-divider"},null,-1))])])],8,_m))),128)),t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper",{indent:n.hasObjectKeys}])},[t.createElementVNode("div",Am,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=r=>n.newKeyName=r),class:"form-control","data-testid":"keyname-input",placeholder:n.schema.placeholder,type:"text"},null,8,Mm),[[t.vModelText,n.newKeyName]]),t.createVNode(a,{appearance:"tertiary","data-testid":"add-key",disabled:!n.newKeyName,onClick:n.addKey},{default:t.withCtx(()=>[t.createTextVNode(" + Add "+t.toDisplayString(n.schema.buttonLabel||n.schema.label),1)]),_:1},8,["disabled","onClick"])]),n.schema.hintText?(t.openBlock(),t.createElementBlock("p",Nm,t.toDisplayString(n.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,bm)}}}),[["__scopeId","data-v-0faeec4d"]]),Im={class:"radio-selection-group"},Aa=P(t.defineComponent({__name:"FieldRadio",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRefs(a),{updateModelValue:s,value:l,clearValidationErrors:c}=_e.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:p=>{r("modelUpdated",p.value,p.model)}});n({clearValidationErrors:c});const m=p=>{let f=p;typeof p=="string"&&(f=p.split(","),a.schema.array||(f=f.toString())),s(f,p)};return(p,f)=>{const h=t.resolveComponent("KRadio");return t.openBlock(),t.createElementBlock("div",Im,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(E,A)=>(t.openBlock(),t.createBlock(h,{id:e.schema.name+"-"+A,key:E.value,modelValue:t.unref(l),"onUpdate:modelValue":f[0]||(f[0]=u=>t.isRef(l)?l.value=u:null),label:E.name,"label-attributes":{info:e.schema.help},name:e.schema.name,required:e.schema.required||void 0,"selected-value":E.value,onChange:m},null,8,["id","modelValue","label","label-attributes","name","required","selected-value"]))),128))])}}}),[["__scopeId","data-v-42b9c6ac"]]),Ma=t.defineComponent({__name:"FieldSelect",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.computed(()=>a.schema.selectOptions||{}),s=u=>G(u)?null:u,l=t.toRefs(a),{getFieldID:c,clearValidationErrors:m,value:p}=_e.useAbstractFields({model:l.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:s,emitModelUpdated:u=>{r("modelUpdated",u.value,u.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{const u=a.schema.values;return h(typeof u=="function"?u.apply(this,[a.model,a.schema]):u)}),h=u=>{const C=[];return u.forEach(w=>{C.push({label:A(w),value:E(w),disabled:typeof w=="object"&&w.disabled||void 0,group:typeof w=="object"&&String(w.group||"").toUpperCase()||void 0})}),C},E=u=>{if(fe(u)){if(i.value&&typeof i.value.value<"u")return u[i.value.value];if(typeof u.id<"u")return String(u.id);throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return u},A=u=>{if(fe(u)){if(i.value&&typeof i.value.name<"u")return u[i.value.name];if(typeof u.name<"u")return String(u.name);throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return String(u)};return(u,C)=>{const w=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(w,{id:t.unref(c)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":C[0]||(C[0]=I=>t.isRef(p)?p.value=I:null),class:t.normalizeClass(e.schema.fieldClasses),clearable:!e.schema.required,disabled:e.disabled||void 0,items:f.value,"kpop-attributes":{"data-testid":`${t.unref(c)(e.schema)}-items`},"label-attributes":{info:e.schema.help},name:e.schema.inputName,placeholder:i.value.hideNoneSelectedText?void 0:i.value.noneSelectedText||"Nothing Selected",required:e.schema.required||void 0,width:"100%"},null,8,["id","modelValue","class","clearable","disabled","items","kpop-attributes","label-attributes","name","placeholder","required"])}}}),Om={class:"field-string-array"},Na=P(t.defineComponent({__name:"FieldStringArray",props:{formOptions:{},model:{},schema:{}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=o,{updateModelValue:r,getFieldID:i,getLabelId:s,clearValidationErrors:l,value:c}=_e.useAbstractFields({model:t.toRef(()=>e.model),schema:e.schema,formOptions:e.formOptions,emitModelUpdated:E=>{a("modelUpdated",E.value,E.model)}});n({clearValidationErrors:l});const m=t.ref("");function p(E){return Array.isArray(E)?E.map(A=>String(A).trim()).filter(Boolean).join(", "):""}function f(E){return E?E.trim().split(",").map(A=>A.trim()).filter(Boolean):[]}function h(E){m.value=E;const A=f(E);r(A,c.value)}return t.watch(c,E=>{const A=E?p(E):"";p(f(m.value))!==A&&(m.value=A)},{immediate:!0}),(E,A)=>{const u=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Om,[t.createVNode(u,t.mergeProps(E.$attrs,{id:t.unref(i)(e.schema),"aria-labelledby":t.unref(s)(e.schema),class:e.schema.fieldClasses,help:"Use comma to separate values. eg: value1, value2","model-value":m.value,placeholder:e.schema.placeholder||"Comma separated values",type:"text","onUpdate:modelValue":h}),null,16,["id","aria-labelledby","class","model-value","placeholder"])])}}}),[["__scopeId","data-v-cf2eff67"]]),Vm={name:"FieldArray",components:{FieldArrayItem:ga,FieldArrayMultiItem:ya,FieldSelect:Ma,FieldMetric:Ca,FieldObject:wa,FieldObjectAdvanced:ka,FieldAutoSuggest:Ea,FieldAutoSuggestLegacy:Ta,FieldRadio:Aa,FieldArrayCardContainer:pa,FieldInput:Sa,FieldStringArray:Na,TrashIcon:Ee.TrashIcon},mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},emits:["refreshModel"],methods:{generateSchema(e,n,o){var r,i,s;let a;return n&&(a=JSON.parse(JSON.stringify(n)),(s=(i=(r=a.schema)==null?void 0:r.fields)==null?void 0:i.map)==null||s.call(i,l=>(l.id=`${l.id||l.model}-${o}`,l))),{...a,set(l,c){e[o]=c},get(){return e[o]}}},newElement(){let e=this.value,n;(!e||!e.push)&&(e=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?n=this.schema.items.default():n=this.schema.items.default),e.push(n),this.value=[...e]},removeElement(e){this.value=this.value.filter((n,o)=>o!==e)},getFieldComponent(e){return e.component?e.component:"field-"+e.type},modelUpdated(){this.$emit("refreshModel")},handleInput(e,n){var a,r;let o=e;((r=(a=this.schema)==null?void 0:a.inputAttributes)==null?void 0:r.type)==="number"&&_n(parseFloat(e))&&(o=parseFloat(e)),this.value=this.value.map((i,s)=>s===n?o:i)},isStringArrayItems(){var n,o;const e=(n=this.schema)==null?void 0:n.elements;return e?e.type==="array"&&((o=e.elements)==null?void 0:o.type)==="string":!1},generateStringArraySchema(e){var n;return{model:String(e),id:`${this.schema.id||this.schema.model}-${e}`,placeholder:this.schema.placeholder,help:this.schema.help,fieldClasses:(n=this.schema.inputAttributes)==null?void 0:n.class,get:()=>this.value[e]}},handleStringArrayUpdate(e,n){this.value=this.value.map((o,a)=>a===n?e:o),this.$emit("refreshModel")}}},Bm=["id"],Fm={key:0,class:"string-array-item"},Rm={key:2},Dm=["onUpdate:modelValue","aria-labelledby","type"],Lm=["onUpdate:modelValue","aria-labelledby"];function Um(e,n,o,a,r,i){const s=t.resolveComponent("FieldStringArray"),l=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton"),m=t.resolveComponent("KTextArea"),p=t.resolveComponent("KInput");return e.schema?(t.openBlock(),t.createElementBlock("div",{key:0,id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(f,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,class:t.normalizeClass(e.schema.fieldItemsClasses)},[i.isStringArrayItems()?(t.openBlock(),t.createElementBlock("div",Fm,[t.createVNode(s,{"form-options":e.formOptions,model:e.value,schema:i.generateStringArraySchema(h),onModelUpdated:E=>i.handleStringArrayUpdate(E,h)},null,8,["form-options","model","schema","onModelUpdated"]),t.createVNode(c,{appearance:"tertiary",class:"string-array-remove-btn",icon:"",onClick:E=>i.removeElement(h)},{default:t.withCtx(()=>[t.createVNode(l,{decorative:""})]),_:1},8,["onClick"])])):e.schema.items&&e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:1,index:h,model:f,schema:i.generateSchema(e.value,e.schema.items,h),onRemoveItem:E=>i.removeElement(h)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:f,schema:i.generateSchema(e.value,e.schema.items,h),onModelUpdated:i.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["index","model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",Rm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:f,schema:i.generateSchema(e.value,e.schema.items,h),onModelUpdated:i.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:3,"data-testid":`${e.getFieldID(e.schema)}-item-${h}`,model:f,schema:i.generateSchema(e.value,e.schema.items,h),onRemoveItem:E=>i.removeElement(h)},{after:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.autofillSlot),{schema:e.schema,update:E=>e.value[h]=E,value:e.value[h]},null,8,["schema","update","value"]))]),default:t.withCtx(()=>{var E;return[e.schema.inputAttributes&&e.schema.inputAttributes.type==="textarea"?(t.openBlock(),t.createBlock(m,t.mergeProps({key:0,ref_for:!0},e.schema.inputAttributes,{id:e.getFieldID(e.schema),modelValue:e.value[h],"onUpdate:modelValue":A=>e.value[h]=A,"aria-labelledby":e.getLabelId(e.schema),autosize:"","character-limit":e.schema.inputAttributes.max,class:e.schema.fieldClasses,maxlength:e.schema.max,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,resizable:"",rows:e.schema.rows||3}),null,16,["id","modelValue","onUpdate:modelValue","aria-labelledby","character-limit","class","maxlength","minlength","name","placeholder","readonly","required","rows"])):!e.schema.inputAttributes||!e.schema.inputAttributes.type||e.schema.inputAttributes.type==="text"||e.schema.inputAttributes.type==="number"?(t.openBlock(),t.createBlock(p,t.mergeProps({key:1,"aria-labelledby":e.getLabelId(e.schema)},{ref_for:!0},e.schema.inputAttributes,{"model-value":e.value[h],type:e.schema.inputAttributes&&e.schema.inputAttributes.type||"text",onInput:A=>{i.handleInput(A,h)}}),null,16,["aria-labelledby","model-value","type","onInput"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,"onUpdate:modelValue":A=>e.value[h]=A,"aria-labelledby":e.getLabelId(e.schema)},{ref_for:!0},e.schema.inputAttributes,{type:((E=e.schema.inputAttributes)==null?void 0:E.type)||"text"}),null,16,Dm)),[[t.vModelDynamic,e.value[h]]])]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.withDirectives(t.createElementVNode("input",t.mergeProps({ref_for:!0},e.schema.inputAttributes,{"onUpdate:modelValue":E=>e.value[h]=E,"aria-labelledby":e.getLabelId(e.schema),type:"text"}),null,16,Lm),[[t.vModelText,e.value[h]]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.autofillSlot),{schema:e.schema,update:E=>e.value[h]=E,value:e.value[h]},null,8,["schema","update","value"]))],64))],2))),128)),t.createVNode(c,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`add-${e.getFieldID(e.schema)}`,type:"button",onClick:i.newElement},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel||o.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,Bm)):t.createCommentVNode("",!0)}const Pm=P(Vm,[["render",Um],["__scopeId","data-v-ff967525"]]),$m={class:"form-field-wrapper field-checkbox"},xm=P(t.defineComponent({__name:"FieldCheckbox",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRefs(a),{getFieldID:s,value:l,clearValidationErrors:c}=_e.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:m=>{r("modelUpdated",m.value,m.model)}});return n({clearValidationErrors:c}),(m,p)=>{const f=t.resolveComponent("KCheckbox");return t.openBlock(),t.createElementBlock("div",$m,[t.createVNode(f,t.mergeProps(m.$attrs,{id:t.unref(s)(e.schema),modelValue:t.unref(l),"onUpdate:modelValue":p[0]||(p[0]=h=>t.isRef(l)?l.value=h:null),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint?e.hint:void 0,name:e.schema.inputName,readonly:e.schema.readonly,required:e.schema.required,width:e.schema.width}),null,16,["id","modelValue","autocomplete","class","disabled","help","name","readonly","required","width"])])}}}),[["__scopeId","data-v-6b4ee1cd"]]),vm={class:"wrapper"},jm=["disabled"],qm=["id","checked","disabled","onChange","name"],zm=["disabled"],Km={class:"info"},Hm={class:"dropList"},Ym=["id","checked","disabled","onChange","name"];function Gm(e,n,o,a,r,i){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",vm,[e.schema.listBox?(t.openBlock(),t.createElementBlock("div",{key:0,class:"listbox form-control",disabled:e.disabled||null},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.items,l=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":i.isItemChecked(l)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:i.isItemChecked(l)||null,disabled:e.disabled||null,onChange:c=>i.onChanged(c,l),name:i.getInputName(l)},null,40,qm),[[s,"input"]]),t.createTextVNode(t.toDisplayString(i.getItemName(l)),1)])],2))),256))],8,jm)):t.createCommentVNode("",!0),e.schema.listBox?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:"combobox form-control",disabled:e.disabled||null},[t.createElementVNode("div",{class:t.normalizeClass(["mainRow",{expanded:r.comboExpanded}]),onClick:n[0]||(n[0]=(...l)=>i.onExpandCombo&&i.onExpandCombo(...l))},[t.createElementVNode("div",Km,t.toDisplayString(i.selectedCount)+" selected",1),n[1]||(n[1]=t.createElementVNode("div",{class:"arrow"},null,-1))],2),t.createElementVNode("div",Hm,[r.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.items,l=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":i.isItemChecked(l)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:i.isItemChecked(l)||null,disabled:e.disabled||null,onChange:c=>i.onChanged(c,l),name:i.getInputName(l)},null,40,Ym),[[s,"input"]]),t.createTextVNode(t.toDisplayString(i.getItemName(l)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,zm))])),[[s,"wrapper"]])}const Wm=P({mixins:[Ce],data(){return{comboExpanded:!1}},computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(e){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?Ko(this.schema.inputName+"_"+this.getItemValue(e)):Ko(this.getItemValue(e))},getItemValue(e){if(fe(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return e[this.schema.checklistOptions.value];if(typeof e.value<"u")return e.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},getItemName(e){if(fe(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return e[this.schema.checklistOptions.name];if(typeof e.name<"u")return e.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},isItemChecked(e){return this.value&&this.value.indexOf(this.getItemValue(e))!==-1},onChanged(e,n){if((G(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const o=ba(this.value);o.push(this.getItemValue(n)),this.value=o}else{const o=ba(this.value);o.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",Gm]]),Zm={name:"FieldKeyValuePairs",components:{TrashIcon:Ee.TrashIcon},mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},data(){return{pairs:[]}},watch:{pairs:{handler(){this.updateValue()},deep:!0}},created(){var n,o;this.value||(this.value={});const e=((o=this.model)==null?void 0:o[(n=this.schema)==null?void 0:n.model])??{};Object.keys(e).forEach(a=>{this.pairs.push({key:a,value:e[a]})})},methods:{onInput(e,n,o){this.pairs[n][o]=e.target.value},updateValue(){this.value=this.pairs.reduce((e,{key:n,value:o})=>({...e,...n&&o?{[n]:o}:null}),{})},addPair(){this.pairs.push({key:"",value:""})},removePair(e){this.pairs.splice(e,1)}}},Xm={class:"key-value-pairs-editor"},Jm={class:"pair-item-cell"},Qm=["data-testid","placeholder","value","onInput"],eu={class:"pair-item-cell"},tu=["data-testid","placeholder","value","onInput"];function nu(e,n,o,a,r,i){const s=t.resolveComponent("TrashIcon"),l=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Xm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.pairs,(c,m)=>(t.openBlock(),t.createElementBlock("div",{key:m,class:"pair-item"},[t.createElementVNode("div",Jm,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-key-${m}`,placeholder:e.schema.keyInputPlaceholder??"Key",type:"text",value:c.key,onInput:p=>{i.onInput(p,m,"key")}},null,40,Qm),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.autofillSlot),{schema:e.schema,update:p=>i.onInput({target:{value:p}},m,"key"),value:c.key},null,8,["schema","update","value"]))]),t.createElementVNode("div",eu,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-value-${m}`,placeholder:e.schema.valueInputPlaceholder??"Value",type:"text",value:c.value,onInput:p=>{i.onInput(p,m,"value")}},null,40,tu),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.autofillSlot),{schema:e.schema,update:p=>i.onInput({target:{value:p}},m,"value"),value:c.value},null,8,["schema","update","value"]))]),t.createVNode(l,{appearance:"tertiary","data-testid":`${e.getFieldID(e.schema)}-remove-pair-${m}`,onClick:()=>{i.removePair(m)}},{default:t.withCtx(()=>[t.createVNode(s)]),_:1},8,["data-testid","onClick"])]))),128)),t.createVNode(l,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`${e.getFieldID(e.schema)}-add-pair`,type:"button",onClick:i.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const ou=P(Zm,[["render",nu],["__scopeId","data-v-9a9650ac"]]),au=P(t.defineComponent({__name:"FieldLabel",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0}},setup(e){const n=e,o=t.toRefs(n),{getFieldID:a,value:r}=_e.useAbstractFields({model:o.model,schema:n.schema,formOptions:n.formOptions});return(i,s)=>{const l=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(l,{id:t.unref(a)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)),1)]),_:1},8,["id"])],2)}}}),[["__scopeId","data-v-d046a15a"]]),ru=t.defineComponent({__name:"FieldMultiselect",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRef(a,"model"),{getLabelId:s,getFieldID:l,clearValidationErrors:c,value:m}=_e.useAbstractFields({model:i,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:f=>{r("modelUpdated",f.value,f.model)}});n({clearValidationErrors:c});const p=t.computed(()=>{var f,h;return a.schema.values?a.schema.values:(h=(f=a.schema.elements)==null?void 0:f.one_of)!=null&&h.length?a.schema.elements.one_of.map(E=>({label:String(E),value:String(E)})):[]});return(f,h)=>{const E=t.resolveComponent("KMultiselect");return t.openBlock(),t.createBlock(E,{id:t.unref(l)(e.schema),modelValue:t.unref(m),"onUpdate:modelValue":h[0]||(h[0]=A=>t.isRef(m)?m.value=A:null),"aria-labelledby":t.unref(s)(e.schema),class:t.normalizeClass(e.schema.fieldClasses),"data-testid":"field-multiselect",disabled:e.disabled||void 0,items:p.value,"kpop-attributes":{"data-testid":`${t.unref(l)(e.schema)}-items`},"label-attributes":{info:e.schema.help},name:e.schema.inputName,placeholder:e.schema.placeholder,required:e.schema.required||void 0,width:"100%"},null,8,["id","modelValue","aria-labelledby","class","disabled","items","kpop-attributes","label-attributes","name","placeholder","required"])}}}),iu={class:"selection-group"},lu={class:"form-group horizontal-radios"},su={class:"radio-group"},du=["disabled","value"],cu={class:"control-help"},mu={key:0,class:"option-field"},uu={class:"option-field-container"},fu=P(Object.assign({mixins:[Ce],emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{checkedGroup:null,fieldModel:{...this.model},renderedTrack:[],fieldSchema:[],scope:"scope"}},watch:{checkedGroup:{handler(e,n){if(this.renderedTrack[e]=!0,n===null){this.fieldModel={...this.model};return}const o=this.schema.fields[e].fields,a=this.schema.fields[n].fields;a&&a.forEach(r=>this.updateModel("",r.model)),o&&o.forEach(r=>this.updateModel(this.fieldModel[r.model],r.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((e,n)=>{this.renderedTrack.push(!1),e.fields&&e.fields.forEach(o=>{var a;this.model[o.model]&&(this.checkedGroup=n,this.fieldSchema.push(o.model),this.scope=(a=o.label)==null?void 0:a.toLowerCase())})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(e,n){this.$emit("model-updated",e,n)}}},{__name:"FieldSelectionGroup",setup(e){const{t:n}=ue.createI18n("en-us",pe);return(o,a)=>(t.openBlock(),t.createElementBlock("div",iu,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.$props.disabled?"k-tooltip":"div"),{"max-width":"300",text:t.unref(n)("general.disable_global_radio",{scope:o.scope})},{default:t.withCtx(()=>[t.createElementVNode("div",lu,[t.createElementVNode("div",su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.schema.fields,(r,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:t.normalizeClass(["option-group",{"radio-disabled":o.$props.disabled}])},[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${r.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=s=>o.checkedGroup=s),class:"k-input",disabled:o.$props.disabled,type:"radio",value:i},null,8,du),[[t.vModelRadio,o.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(r.label)+" ",1),t.createElementVNode("div",cu,t.toDisplayString(r.description),1)],2)],2))),128))])])]),_:1},8,["text"])),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.schema.fields,(r,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:"option-group"},[o.renderedTrack[i]?t.withDirectives((t.openBlock(),t.createElementBlock("div",mu,[t.createElementVNode("div",uu,[t.createVNode(Y,{model:o.model,options:{helpAsHtml:!0},schema:{fields:r.fields},onModelUpdated:o.updateModel},null,8,["model","schema","onModelUpdated"])])],512)),[[t.vShow,r.fields&&o.checkedGroup===i]]):t.createCommentVNode("",!0)]))),128))]))}}),[["__scopeId","data-v-a536356c"]]),hu={class:"form-field-wrapper"},pu=t.defineComponent({__name:"FieldSwitch",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,{t:i}=ue.createI18n("en-us",pe),s=h=>h!=null&&a.schema.valueOn?h===a.schema.valueOn:h,l=h=>h!=null&&a.schema.valueOn?h?a.schema.valueOn:a.schema.valueOff:h,c=t.toRefs(a),{getFieldID:m,value:p,clearValidationErrors:f}=_e.useAbstractFields({model:c.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:s,formatValueToModel:l,emitModelUpdated:h=>{r("modelUpdated",h.value,h.model)}});return n({clearValidationErrors:f}),(h,E)=>{const A=t.resolveComponent("KInputSwitch");return t.openBlock(),t.createElementBlock("div",hu,[t.createVNode(A,{id:t.unref(m)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":E[0]||(E[0]=u=>t.isRef(p)?p.value=u:null),autocomplete:e.schema.autocomplete,class:t.normalizeClass(e.schema.fieldClasses),disabled:e.disabled||void 0,label:t.unref(p)?e.schema.textOn||t.unref(i)("vfg.labels.on"):e.schema.textOff||t.unref(i)("vfg.labels.off"),"label-attributes":{info:e.schema.help},name:e.schema.inputName,required:e.schema.required||void 0},null,8,["id","modelValue","autocomplete","class","disabled","label","label-attributes","name","required"])])}}}),gu={class:"field-textarea"},yu={name:"FormGroup",components:Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:Cc,FieldArray:Pm,FieldArrayCardContainer:pa,FieldArrayItem:ga,FieldArrayMultiItem:ya,FieldAutoSuggest:Ea,FieldAutoSuggestLegacy:Ta,FieldCheckbox:xm,FieldChecklist:Wm,FieldInput:Sa,FieldKeyValuePairs:ou,FieldLabel:au,FieldMetric:Ca,FieldMultiselect:ru,FieldObject:wa,FieldObjectAdvanced:ka,FieldRadio:Aa,FieldSelect:Ma,FieldSelectionGroup:fu,FieldStringArray:Na,FieldSwitch:pu,FieldTextArea:P(t.defineComponent({__name:"FieldTextArea",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRefs(a),s=t.inject(he,void 0),{updateModelValue:l,getFieldID:c,clearValidationErrors:m,value:p}=_e.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:h=>{r("modelUpdated",h.value,h.model)}});n({clearValidationErrors:m});const f=h=>{p.value=h,l(h,h)};return(h,E)=>{const A=t.resolveComponent("KTextArea");return t.openBlock(),t.createElementBlock("div",gu,[t.createVNode(A,t.mergeProps(h.$attrs,{id:t.unref(c)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":E[0]||(E[0]=u=>t.isRef(p)?p.value=u:null),autosize:"","character-limit":e.schema.max??!1,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint||void 0,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,resizable:"",rows:e.schema.rows||3}),null,16,["id","modelValue","character-limit","class","disabled","help","minlength","name","placeholder","readonly","required","rows"]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(s)),{schema:e.schema,update:f,value:t.unref(p)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-609c18d6"]])},Symbol.toStringTag,{value:"Module"})),mixins:[Ho],inject:{"vfg-array-item-index":{default:void 0}},props:{vfg:{type:Object,required:!0},model:{type:Object,default:()=>{}},options:{type:Object,default:()=>{}},field:{type:Object,required:!0},errors:{type:Array,default(){return[]}}},emits:["validated","modelUpdated","refreshModel"],data(){return{child:t.ref()}},computed:{schema(){var n;if(!((n=this.field)!=null&&n.schema)||!Array.isArray(this.field.schema.fields))return this.field;const e=this["vfg-array-item-index"];return typeof e!="number"||Number.isNaN(e)?this.field:{...this.field,schema:{...this.field.schema,fields:this.field.schema.fields.map(o=>({...o,...o.id?{id:`${o.id}-${e}`}:void 0}))}}}},methods:{sanitize(e){return Ol.sanitize(e)},fieldTypeHasLabel(e){if(G(e.label))return!1;let n="";switch(e.type==="input"?n=e.inputType:n=e.type,n){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(e){const n=$(this.options,"fieldIdPrefix","");return gn(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldComponent(e){return e.component?e.component:"field-"+e.type},getButtonType(e){return $(e,"type","button")},onFieldValidated(e,n,o){this.$emit("validated",e,n,o)},buttonVisibility(e){return e.buttons&&e.buttons.length>0},buttonClickHandler(e,n,o){return e.onclick.call(this,this.model,n,o,this)},fieldHint(e){return x(e.hint)?e.hint.call(this,this.model,e,this):e.hint},fieldErrors(e){return this.errors.filter(n=>n.field.fieldName===e.fieldName).map(n=>n.error)},onRefreshModel(){this.$emit("refreshModel")},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e){return this.$refs.child.validate(e)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(e){return e?e.replace(/^[cC]onfig\./,""):""}}},bu=["innerHTML"],_u={class:"icon-wrapper"},Eu={key:0,class:"link-wrapper"},Tu={class:"field-wrap"},Su={key:0,class:"buttons"},Cu=["type","onClick","textContent"],wu={key:1,class:"hint"},ku={key:2,class:"errors help-block"};function Au(e,n,o,a,r,i){const s=t.resolveComponent("KExternalLink"),l=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-group",e.getFieldRowClasses(o.field)])},[i.fieldTypeHasLabel(o.field)?(t.openBlock(),t.createBlock(l,{key:0,"aria-describedby":o.field.help?i.getTooltipId(o.field):void 0,class:t.normalizeClass([o.field.labelClasses,"form-group-label"]),for:i.getFieldID(o.field),info:!o.options.helpAsHtml&&o.field.help?o.field.help:void 0,"tooltip-attributes":o.field.help?{maxWidth:"300",placement:"top",tooltipId:i.getTooltipId(o.field)}:void 0},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",_u,[t.createElementVNode("span",null,t.toDisplayString(i.formattedLabel(o.field.label)),1)]),o.field.link?(t.openBlock(),t.createElementBlock("div",Eu,[t.createVNode(s,{href:o.field.link},{default:t.withCtx(()=>[...n[0]||(n[0]=[t.createElementVNode("span",{class:"section-header"},"More info",-1)])]),_:1},8,["href"])])):t.createCommentVNode("",!0)]),_:2},[o.options.helpAsHtml&&o.field.help?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:i.sanitize(o.field.help)},null,8,bu)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",Tu,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.getFieldComponent(o.field)),t.mergeProps(e.$attrs,{ref:"child",disabled:e.fieldDisabled(o.field)||null,"form-options":o.options,hint:o.field.hint&&o.field.type==="input"?i.fieldHint(o.field):void 0,model:o.model,schema:i.schema,vfg:o.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated}),null,16,["disabled","form-options","hint","model","schema","vfg","onModelUpdated","onRefreshModel","onValidated"])),i.buttonVisibility(o.field)?(t.openBlock(),t.createElementBlock("div",Su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.field.buttons,(c,m)=>(t.openBlock(),t.createElementBlock("button",{key:m,class:t.normalizeClass(c.classes),type:i.getButtonType(c),onClick:p=>i.buttonClickHandler(c,o.field,p),textContent:t.toDisplayString(c.label)},null,10,Cu))),128))])):t.createCommentVNode("",!0)]),o.field.hint&&o.field.type!=="input"?(t.openBlock(),t.createElementBlock("div",wu,t.toDisplayString(i.fieldHint(o.field)),1)):t.createCommentVNode("",!0),i.fieldErrors(o.field).length>0?(t.openBlock(),t.createElementBlock("div",ku,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.fieldErrors(o.field),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m},t.toDisplayString(c),1))),128))])):t.createCommentVNode("",!0)],2)}const Ia=P(yu,[["render",Au],["__scopeId","data-v-fe02085f"]]);var Et=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(Et||{});const Mu=e=>{var n,o;return e.type===Et.REDIS_CE?"Host/Port":(n=e.config.sentinel_nodes)!=null&&n.length?"Sentinel":(o=e.config.cluster_nodes)!=null&&o.length?"Cluster":"Host/Port"},Nu={[Et.REDIS_CE]:"open source",[Et.REDIS_EE]:"enterprise"},Oa=e=>Nu[e]??"",Iu={class:"partial-config-card"},Ou={class:"config-card-row-label"},Vu={class:"label-text"},Bu=["data-testid"],Fu=["data-testid"],Ru={key:1},Du=["data-testid"],Lu=["data-testid"],Uu=P(t.defineComponent({__name:"RedisConfigCard",props:{configFields:{type:Object,required:!0},pluginRedisFields:{type:Array,required:!0}},setup(e){const{t:n,formatUnixTimeStamp:o}=ue.createI18n("en-us",pe),a={id:{order:1},name:{order:1},type:{label:n("redis.config_card.common_fields.type_label"),hidden:!0,type:"hidden"},created_at:{label:n("redis.config_card.common_fields.created_at_label"),formatter:o,order:2},updated_at:{label:n("redis.config_card.common_fields.updated_at_label"),formatter:o,order:3}},r=e,i=f=>f!=null,s=(f,h)=>i(h)&&["password","sentinel_password"].includes(f)?"password":"text",{convertKeyToTitle:l}=kt.useStringHelpers(),c=t.computed(()=>Object.entries(r.configFields).map(([f,h])=>{var E,A,u,C;return{key:f,label:((E=a[f])==null?void 0:E.label)??l(f),value:(A=a[f])!=null&&A.formatter?a[f].formatter(h):h,type:((u=a[f])==null?void 0:u.type)??s(f,h),order:((C=a[f])==null?void 0:C.order)??100}}).sort((f,h)=>f.order-h.order).filter(f=>f.type!=="hidden")),m=_e.useRedisNonStandardFields(r.configFields,r.pluginRedisFields),p=t.computed(()=>c.value.concat(m));return(f,h)=>{const E=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",Iu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,({key:A,label:u,value:C,type:w})=>(t.openBlock(),t.createElementBlock("div",{key:A,class:"partial-config-card-row"},[t.createElementVNode("div",Ou,[t.createElementVNode("div",Vu,t.toDisplayString(u),1)]),t.createElementVNode("div",{class:"config-card-row-value","data-testid":`${A}-property-value`},[i(C)?(t.openBlock(),t.createElementBlock("div",Ru,[w==="password"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${A}-copy-password`},[t.createVNode(E,{format:"redacted",text:String(C)},null,8,["text"])],8,Du)):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`${A}-plain-text`},t.toDisplayString(C),9,Lu))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${A}-no-value`}," – ",8,Fu))],8,Bu)]))),128))])}}}),[["__scopeId","data-v-40b3d7b5"]]),Pu={class:"redis-config-select","data-testid":"redis-config-select"},$u={class:"selected-redis-config"},xu=["data-testid"],vu={class:"select-item-name","data-testid":"selected-redis-config"},ju={class:"empty-redis-config","data-testid":"empty-redis-config"},qu={key:1,class:"redis-shared-config-error-message","data-testid":"redis-config-fetch-error"},zu="1000",Va=P(t.defineComponent({__name:"RedisConfigSelect",props:{defaultRedisConfigItem:{type:String,required:!1,default:""},updateRedisModel:{type:Function,required:!0},pluginRedisFields:{type:Array,required:!0},redisType:{type:String,default:"all"},isCustomPlugin:{type:Boolean,default:!1}},emits:["showNewPartialModal"],setup(e){const{t:n}=ue.createI18n("en-us",pe),o=t.inject(ao),a={konnect:{getOne:"/v2/control-planes/{controlPlaneId}/core-entities/partials/{id}",getAll:"/v2/control-planes/{controlPlaneId}/core-entities/partials"},kongManager:{getOne:"/{workspace}/partials/{id}",getAll:"/{workspace}/partials"}},r=e,i=t.ref(null),{getMessageFromError:s}=kt.useErrors(),l=t.inject(oo),{debouncedQueryChange:c,loading:m,error:p,loadItems:f,results:h}=kt.useDebouncedFilter(l,a[l.app].getAll,zu,{fetchedItemsKey:"data",searchKeys:["id","name"]}),E=t.computed(()=>p.value?s(p.value):""),A=I=>{let _=`${l.apiBaseUrl}${a[l.app].getOne}`;return l.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,(l==null?void 0:l.controlPlaneId)||""):l.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,l!=null&&l.workspace?`/${l.workspace}`:"")),_=_.replace(/{id}/gi,String(I)),_},u=t.computed(()=>{const I=(h.value||[]).map(_=>({label:_.id,name:_.name,value:_.id,type:_.type,tag:Mu(_)})).filter(_=>_.type==="redis-ce"||_.type==="redis-ee");return r.redisType!=="all"?I.filter(_=>_.type===r.redisType):I}),{axiosInstance:C}=kt.useAxios(l==null?void 0:l.axiosRequestConfig),w=async I=>{if(I){r.updateRedisModel(I);try{const _=await C.get(A(I));if(_.data.config){const k=Object.assign(_.data,_.data.config);delete k.config,i.value=k}}catch(_){console.error(_)}}};return t.watch(()=>o==null?void 0:o.value,async I=>{I&&await f()}),t.onBeforeMount(()=>{f(),r.defaultRedisConfigItem&&w(r.defaultRedisConfigItem)}),(I,_)=>{const k=t.resolveComponent("KLabel"),b=t.resolveComponent("KBadge"),y=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Pu,[t.createVNode(k,{info:e.isCustomPlugin?t.unref(n)("redis.custom_plugin.tooltip"):t.unref(n)("redis.shared_configuration.tooltip",{type:t.unref(Oa)(e.redisType)}),"tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("redis.shared_configuration.title")),1)]),_:1},8,["info"]),_[2]||(_[2]=t.createElementVNode("div",{class:"shared-redis-config-title"},null,-1)),t.createVNode(y,{class:"redis-config-select-trigger","data-testid":"redis-config-select-trigger","enable-filtering":"","filter-function":()=>!0,items:u.value,loading:t.unref(m),"model-value":e.defaultRedisConfigItem,placeholder:t.unref(n)("redis.shared_configuration.selector.placeholder"),onChange:_[1]||(_[1]=g=>w(g==null?void 0:g.value)),onQueryChange:t.unref(c)},{"selected-item-template":t.withCtx(({item:g})=>[t.createElementVNode("div",$u,t.toDisplayString(g.name),1)]),"item-template":t.withCtx(({item:g})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${g.name}`},[t.createElementVNode("span",vu,t.toDisplayString(g.name),1),t.createVNode(b,{appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.tag),1)]),_:2},1024)],8,xu)]),empty:t.withCtx(()=>[t.createElementVNode("div",ju,t.toDisplayString(t.unref(n)("redis.shared_configuration.empty_state")),1)]),"dropdown-footer-text":t.withCtx(()=>[t.createElementVNode("div",{class:"new-redis-config-area","data-testid":"new-redis-config-area",onClick:_[0]||(_[0]=g=>I.$emit("showNewPartialModal"))},[t.createVNode(t.unref(Ee.AddIcon),{size:t.unref(Oc)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("redis.shared_configuration.create_new_configuration",{type:t.unref(Oa)(e.redisType)})),1)])]),_:1},8,["items","loading","model-value","placeholder","onQueryChange"])]),i.value?(t.openBlock(),t.createBlock(Uu,{key:0,"config-fields":i.value,"plugin-redis-fields":e.pluginRedisFields},null,8,["config-fields","plugin-redis-fields"])):t.createCommentVNode("",!0),E.value?(t.openBlock(),t.createElementBlock("p",qu,t.toDisplayString(E.value||t.unref(n)("redis.shared_configuration.error")),1)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-31a7151d"]]),Ku={key:0},Hu={class:"redis-config-radio-group","data-testid":"redis-config-radio-group"},Yu={key:0,class:"shared-redis-config"},Gu={key:1,class:"dedicated-redis-config"},Wu={class:"dedicated-redis-config-title"},Zu={name:"VueFormGenerator",components:{formGroup:Ia,formRedis:P(t.defineComponent({__name:"FormRedis",props:{tag:{type:String,default:"fieldset",validator:function(e){return e.length>0}},model:{type:Object,default:()=>{}},options:{type:Object,required:!0},field:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default(){return[]}},redisPath:{type:String,default:void 0,required:!1},isEditing:{type:Boolean,default:!1}},emits:["modelUpdated","partialToggled","showNewPartialModal","refreshModel","validated"],setup(e,{emit:n}){const o=e,a=n,{t:r}=ue.createI18n("en-us",pe),i=t.computed(()=>o.field.pluginType==="custom"),s=t.ref(!o.isEditing),l=t.ref(),c=t.ref({}),m=t.ref(),p=u=>x(u.visible)?u.visible.call(this,o.model,u,this):G(u.visible)?!0:u.visible,f=async u=>{a("modelUpdated",[{id:u,path:o.redisPath}],"partials"),m.value=[{id:u,path:o.redisPath}],l.value=u},h=(u,C)=>{c.value={...c.value,[C]:u},a("modelUpdated",u,C)},E=()=>{a("refreshModel")},A=(u,C,w)=>{a("validated",u,C,w)};return t.watch(()=>s.value,u=>{u?m.value&&a("partialToggled","redis",{partials:m.value}):a("partialToggled","partials",c.value)}),t.onBeforeMount(()=>{var u,C,w;if(o.model&&(c.value=o.field.fields.reduce((I,_)=>(Object.keys(o.model).includes(_.model)&&(I[_.model]=o.model[_.model]),I),{})),(w=(C=(u=o==null?void 0:o.model)==null?void 0:u.partials)==null?void 0:C[0])!=null&&w.id){const I=o.model.partials[0].id;s.value=!0,l.value=I}}),(u,C)=>{const w=t.resolveComponent("KAlert"),I=t.resolveComponent("KBadge"),_=t.resolveComponent("KRadio"),k=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",null,[i.value?(t.openBlock(),t.createElementBlock("div",Ku,[t.createVNode(w,{"data-testid":"custom-plugin-redis-config-note",message:t.unref(r)("redis.custom_plugin.alert")},null,8,["message"]),t.createVNode(Va,{"default-redis-config-item":l.value,"is-custom-plugin":"","plugin-redis-fields":e.field.fields,"update-redis-model":f,onShowNewPartialModal:C[0]||(C[0]=b=>u.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","plugin-redis-fields"])])):(t.openBlock(),t.createBlock(k,{key:1,class:"redis-config-card","data-testid":"redis-config-card",title:t.unref(r)("redis.title")},{default:t.withCtx(()=>[t.createElementVNode("div",Hu,[t.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=b=>s.value=b),card:"","card-orientation":"horizontal","data-testid":"shared-redis-config-radio",description:t.unref(r)("redis.shared_configuration.description"),label:t.unref(r)("redis.shared_configuration.label"),"selected-value":!0},{default:t.withCtx(()=>[t.createVNode(I,{appearance:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("redis.shared_configuration.badge")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":C[2]||(C[2]=b=>s.value=b),card:"","card-orientation":"horizontal","data-testid":"dedicated-redis-config-radio",description:t.unref(r)("redis.dedicated_configuration.description"),label:t.unref(r)("redis.dedicated_configuration.label"),"selected-value":!1},null,8,["modelValue","description","label"])]),s.value?(t.openBlock(),t.createElementBlock("div",Yu,[t.createVNode(Va,{"default-redis-config-item":l.value,"plugin-redis-fields":e.field.fields,"redis-type":e.field.redisType,"update-redis-model":f,onShowNewPartialModal:C[3]||(C[3]=b=>u.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","plugin-redis-fields","redis-type"])])):(t.openBlock(),t.createElementBlock("div",Gu,[t.createElementVNode("div",Wu,t.toDisplayString(t.unref(r)("redis.dedicated_configuration.title")),1),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.field.fields,b=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b.model},[p(b)?(t.openBlock(),t.createBlock(Ia,{key:0,ref_for:!0,ref:"children",errors:e.errors,field:b,model:e.model,options:e.options,vfg:e.vfg,onModelUpdated:h,onRefreshModel:E,onValidated:A},null,8,["errors","field","model","options","vfg"])):t.createCommentVNode("",!0)],64))),128))]),_:1}))]))]),_:1},8,["title"]))])}}}),[["__scopeId","data-v-addd6536"]])},mixins:[Ho],inject:{autofillSlot:{from:he,default:void 0}},provide(){var e;return{...!this.autofillSlot&&{[he]:(e=this.$slots)==null?void 0:e[Ke]}}},props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:t.ref([]),fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:"",helpAsHtml:!1}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(e){return e.length>0}},enableRedisPartial:{type:Boolean,default:!1},isEditing:{type:Boolean,default:!1}},emits:["validated","modelUpdated","refreshModel","partialToggled","showNewPartialModal"],data(){return{vfg:this,errors:[],children:t.ref([]),collapseStates:{}}},computed:{fields(){const e=[];return this.schema&&this.schema.fields&&re(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&re(this.schema.groups.slice(0),n=>{e.push(n)}),e}},watch:{model:{deep:!0,handler(e,n){n!==e&&e!=null&&this.$nextTick(()=>{this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors()})}}},mounted(){this.$nextTick(()=>{this.model&&(this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors())})},methods:{fieldVisible(e){return x(e.visible)?e.visible.call(this,this.model,e,this):G(e.visible)?!0:e.visible},onFieldValidated(e,n,o){this.errors=this.errors.filter(r=>r.field.fieldName!==o.schema.fieldName),!e&&n&&n.length>0&&re(n,r=>{this.errors.push({field:o.schema,error:r})});const a=this.errors.length===0;this.$emit("validated",a,this.errors,this)},onRefreshModel(){this.$emit("refreshModel")},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},onPartialToggled(e,n){this.$emit("partialToggled",e,n)},validate(e=null){e===null&&(e=$(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],o=[];re(this.$refs.children,r=>{x(r.validate)&&(n.push(r.$refs.child),o.push(r.$refs.child.validate(!0)))});const a=r=>{const i=[];re(r,(l,c)=>{Array.isArray(l)&&l.length>0&&re(l,m=>{i.push({field:n[c].schema,error:m})})}),this.errors=i;const s=i.length===0;return this.$emit("validated",s,i,this),e?i:s};return e?Promise.all(o).then(a):a(o)},clearValidationErrors(){this.errors.splice(0),re(this.$refs.children,e=>{e.clearValidationErrors()})}}},Xu={key:0,class:"vue-form-generator"},Ju={key:0};function Qu(e,n,o,a,r,i){const s=t.resolveComponent("form-redis"),l=t.resolveComponent("form-group"),c=t.resolveComponent("KCollapse");return o.schema!=null?(t.openBlock(),t.createElementBlock("div",Xu,[o.schema.fields?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.fields,m=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m.model},[m.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(s,{key:0,errors:r.errors,field:m,"is-editing":o.isEditing,model:o.model,options:o.options,tag:o.tag,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onPartialToggled:i.onPartialToggled,onShowNewPartialModal:p=>e.$emit("showNewPartialModal",m.redisType),onValidated:i.onFieldValidated},null,8,["errors","field","is-editing","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):i.fieldVisible(m)?(t.openBlock(),t.createBlock(l,{key:1,ref_for:!0,ref:"children",errors:r.errors,field:m,model:o.model,options:o.options,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:1})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.groups,(m,p)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${p}`},[m.collapsible!==void 0&&m.collapsible!==!1?(t.openBlock(),t.createBlock(c,{key:0,class:"root-level-collapse","model-value":!1,title:m.collapsible.title},t.createSlots({default:t.withCtx(()=>{var f,h,E,A;return[(f=m.slots)!=null&&f.beforeContent?t.renderSlot(e.$slots,(h=m.slots)==null?void 0:h.beforeContent,{key:0}):t.createCommentVNode("",!0),m.fields.length===0&&((E=m.slots)!=null&&E.emptyState)?t.renderSlot(e.$slots,(A=m.slots)==null?void 0:A.emptyState,{key:1}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:2,class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.fields,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.model},[i.fieldVisible(u)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:r.errors,field:u,model:o.model,options:o.options,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"])),m.collapsible!==!0&&m.collapsible.nestedCollapsible&&m.collapsible.nestedCollapsible.fields.length>0?(t.openBlock(),t.createBlock(c,{key:3,class:"nested-collapse","model-value":r.collapseStates[`group-${p}-nested`]??!0,"trigger-alignment":"leading","trigger-label":r.collapseStates[`group-${p}-nested`]??!0?m.collapsible.nestedCollapsible.triggerLabel.expand:m.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":u=>r.collapseStates[`group-${p}-nested`]=u},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.collapsible.nestedCollapsible.fields,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.model},[u.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(s,{key:0,errors:r.errors,field:u,"is-editing":o.isEditing,model:o.model,options:o.options,tag:o.tag,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onPartialToggled:i.onPartialToggled,onShowNewPartialModal:C=>e.$emit("showNewPartialModal",u.redisType),onValidated:i.onFieldValidated},null,8,["errors","field","is-editing","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):i.fieldVisible(u)?(t.openBlock(),t.createBlock(l,{key:1,ref_for:!0,ref:"children",errors:r.errors,field:u,model:o.model,options:o.options,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))]),_:2},1032,["model-value","trigger-label","onUpdate:modelValue"])):t.createCommentVNode("",!0)]}),_:2},[m.collapsible.description?{name:"visible-content",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.collapsible.description),1)]),key:"0"}:void 0]),1032,["title"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:1,class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[m.legend?(t.openBlock(),t.createElementBlock("legend",Ju,t.toDisplayString(m.legend),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.fields,f=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:f.model},[i.fieldVisible(f)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:r.errors,field:f,model:o.model,options:o.options,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))],64))),128))])):t.createCommentVNode("",!0)}const Y=P(Zu,[["render",Qu]]),Tt={openIdConnectDocs:"https://developer.konghq.com/plugins/openid-connect/",openIdConnectJWKDocs:"https://developer.konghq.com/plugins/openid-connect/reference/#schema--config-client-jwk",openIdConnectClusterNodesDocs:"https://developer.konghq.com/plugins/openid-connect/reference/#schema--config-redis-cluster-nodes",openIdConfigurationDocs:"https://developer.konghq.com/plugins/openid-connect/reference/",openIdAuthorizationDocs:"https://developer.konghq.com/plugins/openid-connect/#authorization"},Ba=new Set(["config-client_id","config-client_secret","config-issuer"]),Fa=new Set(["config-scopes_claim","config-scopes_required","config-audience_claim","config-audience_required","config-roles_claim","config-roles_required","config-groups_claim","config-groups_required","config-authenticated_groups_claim"]),ef={name:"OIDCForm",components:{VueFormGenerator:Y},provide(){var e;return{[he]:(e=this.$slots)==null?void 0:e[Ke]}},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},onPartialToggled:{type:Function,required:!0},isEditing:{type:Boolean,required:!0},enableRedisPartial:{type:Boolean,required:!1},showNewPartialModal:{type:Function,default:()=>{}}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,openIdConnectLink:Tt.openIdConnectDocs,openIdConnectJWKLink:Tt.openIdConnectJWKDocs,openIdConnectClusterNodesLink:Tt.openIdConnectClusterNodesDocs,openIdConfigurationDocs:Tt.openIdConfigurationDocs,openIdAuthorizationDocs:Tt.openIdAuthorizationDocs,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){var e;if(!this.init){this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(r=>!r.model.startsWith("config")&&r.model!=="tags")};const n=this.formSchema.fields.reduce((r,i)=>(r[i.model]=i,r),{});this.commonFieldsSchema={fields:Array.from(Ba).reduce((r,i)=>(n[i]&&r.push(n[i]),r),[])},this.authFieldsSchema={fields:Array.from(Fa).reduce((r,i)=>(n[i]&&r.push(n[i]),r),[])};const{redis:o,redisModels:a}=_e.useRedisPartial(this.formSchema);this.advancedFieldsSchema={fields:this.formSchema.fields.filter(r=>r.model.startsWith("config")&&r.model!=="config-auth_methods"&&!Ba.has(r.model)&&!Fa.has(r.model)&&(!this.enableRedisPartial||!a.includes(r.model))||r.model==="tags").reduce((r,i)=>{var s,l,c,m;switch(i.model){case"config-client_jwk":{if(Array.isArray((l=(s=i.items)==null?void 0:s.schema)==null?void 0:l.fields))for(const p of i.items.schema.fields)p.label=p.model;r.push({...i,link:this.openIdConnectJWKLink,newElementButtonLabel:"+ Add Client JWK",...Array.isArray((m=(c=i.items)==null?void 0:c.schema)==null?void 0:m.fields)&&i.items.schema.fields.map(p=>({...p,label:p.model}))});break}case"config-session_redis_cluster_nodes":{r.push({...i,link:this.openIdConnectClusterNodesLink,newElementButtonLabel:"+ Add Cluster Node"});break}default:r.push(i)}return r},[])},this.enableRedisPartial&&this.advancedFieldsSchema.fields.unshift(o),this.sessionManagement=this.formModel["config-auth_methods"].includes("session"),this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.formModel["config-auth_methods"].includes("authorization_code")},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.formModel["config-auth_methods"].includes("bearer")},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.formModel["config-auth_methods"].includes("client_credentials")},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.formModel["config-auth_methods"].includes("password")},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.formModel["config-auth_methods"].includes("introspection")},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.formModel["config-auth_methods"].includes("userinfo")},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.formModel["config-auth_methods"].includes("kong_oauth2")},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.formModel["config-auth_methods"].includes("refresh_token")}];for(const r of[this.commonFieldsSchema,this.authFieldsSchema,this.advancedFieldsSchema])for(const i of r.fields){const s=(e=n[i.model])==null?void 0:e.help;i.help===void 0&&typeof s=="string"&&(i.help=s)}}},getAuthMethodsValue(e,n){const o=[];for(let a=0;a<this.authMethods.length;a++)this.authMethods[a].prop&&this.authMethods[a].value!==e&&o.push(this.authMethods[a].value);return this.sessionManagement&&e&&o.push("session"),n&&(e?o.push(e):o.push("session")),o},handleUpdate(e,n){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(n,e),this.onModelUpdated()}}},tf={class:"general-settings"},nf={class:"link-wrapper"},of={class:"auth-method-container"},af={class:"general-settings"},rf={class:"link-wrapper"},lf={class:"general-settings"},sf={class:"link-wrapper"};function df(e,n,o,a,r,i){const s=t.resolveComponent("VueFormGenerator"),l=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KLabel"),m=t.resolveComponent("KCheckbox"),p=t.resolveComponent("KInputSwitch"),f=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[o.formModel.id&&o.isEditing||!o.isEditing?(t.openBlock(),t.createBlock(s,{key:0,class:"global-fields",model:o.formModel,options:o.formOptions,schema:r.globalFields,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(f,{tabs:r.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",tf,[t.createElementVNode("div",nf,[t.createVNode(l,{href:r.openIdConfigurationDocs},{default:t.withCtx(()=>[...n[2]||(n[2]=[t.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)])]),_:1},8,["href"])]),n[4]||(n[4]=t.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),i.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:r.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(c,null,{default:t.withCtx(()=>[...n[3]||(n[3]=[t.createTextVNode("Auth Methods",-1)])]),_:1}),t.createElementVNode("div",of,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.authMethods,h=>(t.openBlock(),t.createElementBlock("div",{key:h.value,class:"auth-method"},[t.createVNode(m,{modelValue:h.prop,"onUpdate:modelValue":E=>h.prop=E,onChange:E=>i.handleUpdate(E,h.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(p,{modelValue:r.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=h=>r.sessionManagement=h),label:"Enable Session Management",onChange:i.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",af,[t.createElementVNode("div",rf,[t.createVNode(l,{href:r.openIdAuthorizationDocs},{default:t.withCtx(()=>[...n[5]||(n[5]=[t.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)])]),_:1},8,["href"])]),n[6]||(n[6]=t.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),i.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:r.authFieldsSchema,onModelUpdated:o.onModelUpdated},{"autofill-provider":t.withCtx(h=>[t.renderSlot(e.$slots,"autofill-provider",t.normalizeProps(t.guardReactiveProps(h)),void 0,!0)]),_:3},8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",lf,[t.createElementVNode("div",sf,[t.createVNode(l,{href:r.openIdConnectLink},{default:t.withCtx(()=>[...n[7]||(n[7]=[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)])]),_:1},8,["href"])]),n[8]||(n[8]=t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1)),i.displayForm?(t.openBlock(),t.createBlock(s,{key:0,"enable-redis-partial":o.enableRedisPartial,"is-editing":o.isEditing,model:o.formModel,options:o.formOptions,schema:r.advancedFieldsSchema,onModelUpdated:o.onModelUpdated,onPartialToggled:o.onPartialToggled,onShowNewPartialModal:n[1]||(n[1]=()=>o.showNewPartialModal(o.formSchema._supported_redis_partial_type))},null,8,["enable-redis-partial","is-editing","model","options","schema","onModelUpdated","onPartialToggled"])):t.createCommentVNode("",!0)])]),_:3},8,["tabs"])])}const cf=P(ef,[["render",df],["__scopeId","data-v-741bf3cb"]]),mf=P(t.defineComponent({__name:"PostFunction",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var s;t.provide(he,(s=t.useSlots())==null?void 0:s[Ke]);const{t:n,te:o}=ue.createI18n("en-us",pe),a=e,r=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),i=t.computed(()=>{const l=a.formSchema;return l.fields.map(c=>{const m=`post-function.${c.model}`;return c.hint=o(`${m}.hint`)&&n(`${m}.hint`)||c.hint,c.help=o(`${m}.help`)&&n(`${m}.help`)||c.help,c.newElementButtonLabel=o(`${m}.newElementButtonLabel`)&&n(`${m}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="post-function-array-item-container",c.fieldItemsClasses="post-function-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),l});return(l,c)=>r.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:i.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-f54f37ae"]]),uf=P(t.defineComponent({__name:"ExitTransformer",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var s;t.provide(he,(s=t.useSlots())==null?void 0:s[Ke]);const{t:n,te:o}=ue.createI18n("en-us",pe),a=e,r=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),i=t.computed(()=>{const l=a.formSchema;return l.fields.map(c=>{const m=`exit-transformer.${c.model}`;return c.hint=o(`${m}.hint`)&&n(`${m}.hint`)||c.hint,c.help=o(`${m}.help`)&&n(`${m}.help`)||c.help,c.newElementButtonLabel=o(`${m}.newElementButtonLabel`)&&n(`${m}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="exit-transformer-array-item-container",c.fieldItemsClasses="exit-transformer-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),l});return(l,c)=>r.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:i.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-0d5c541f"]]),ff={fields:[{inputType:"text",label:"Config.Account Email",model:"config-account_email",required:!0,type:"input"},{inputType:"text",label:"Config.Account Key.Key Id",model:"config-account_key-key_id",required:!0,type:"input"},{type:"input",inputType:"text",valueType:"string",label:"Config.Account Key.Key Set",model:"config-account_key-key_set",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",label:"Config.Allow Any Domain",model:"config-allow_any_domain",order:0,disabled:!1}]},hf={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",model:"config-tos_accepted",label:"Config.Tos Accepted",order:0,disabled:!1}]},pf={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_hmac_key",label:"Config.Eab Hmac Key",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_kid",label:"Config.Eab Kid",order:0,disabled:!1}]},gf={class:"general-settings"},yf={class:"sub-form"},bf={class:"general-settings"},_f={class:"sub-form"},Ef={class:"general-settings"},Tf=P(t.defineComponent({__name:"ACMEForm",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var b;t.provide(he,(b=t.useSlots())==null?void 0:b[Ke]);const n=e,o=t.ref("zeroSsl"),a=t.ref("shm"),r=t.computed(()=>{var g;const y={};if((g=n.formSchema)!=null&&g.fields)for(const B of n.formSchema.fields)y[B.model]=B;return y}),i=t.computed(()=>{var g;const y=Oe(ff);for(const B of y.fields){const v=(g=r.value[B.model])==null?void 0:g.help;B.help===void 0&&typeof v=="string"&&(B.help=v)}return y}),s=t.computed(()=>{var g;const y=Oe(hf);for(const B of y.fields){const v=(g=r.value[B.model])==null?void 0:g.help;B.help===void 0&&typeof v=="string"&&(B.help=v)}return y}),l=t.computed(()=>{var g;const y=Oe(pf);for(const B of y.fields){const v=(g=r.value[B.model])==null?void 0:g.help;B.help===void 0&&typeof v=="string"&&(B.help=v)}return y}),c=t.computed(()=>({fields:n.formSchema.fields.filter(y=>!y.model.startsWith("config")&&y.model!=="tags")})),m=t.computed(()=>({fields:i.value.fields.filter(g=>!s.value.fields.some(B=>B.model===g.model)&&!l.value.fields.some(B=>B.model===g.model))})),p=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage")&&!g.model.startsWith("config-storage_config-consul")&&!g.model.startsWith("config-storage_config-redis")&&!g.model.startsWith("config-storage_config-shm")&&!g.model.startsWith("config-storage_config-vault"))})),f=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage_config-consul"))})),h=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage_config-redis"))})),E=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage_config-shm"))})),A=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage_config-vault"))})),u=t.computed(()=>({fields:n.formSchema.fields.filter(y=>y.model.startsWith("config")&&!m.value.fields.filter(g=>g.model===y.model).length&&!p.value.fields.filter(g=>g.model===y.model).length||y.model==="tags")})),C=t.computed(()=>n.formModel.id&&n.isEditing||!n.isEditing),w=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],I=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];t.onMounted(()=>{o.value==="zeroSsl"&&(n.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const _=y=>{o.value=y.value,(y.value==="zeroSsl"||y.value==="other")&&(y.value==="zeroSsl"?n.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":n.formModel["config-api_uri"]="https://acme.example.com/",n.formModel["config-tos_accepted"]=!1),y.value==="letsEncrypt"&&(n.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",n.formModel["config-eab_hmac_key"]="",n.formModel["config-eab_kid"]=""),n.onModelUpdated()},k=(y,g)=>{g==="config-storage"&&(a.value=y),n.onModelUpdated()};return(y,g)=>{const B=t.resolveComponent("KSelect"),v=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(Y,{key:0,class:"global-fields",model:e.formModel,options:e.formOptions,schema:c.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(v,{tabs:w},{general:t.withCtx(()=>[t.createElementVNode("div",gf,[g[0]||(g[0]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),g[1]||(g[1]=t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),C.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:m.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),g[2]||(g[2]=t.createElementVNode("hr",null,null,-1)),t.createVNode(B,{class:"issuer-select",items:I,label:"Issuer",onChange:_}),t.createElementVNode("div",yf,[o.value==="letsEncrypt"?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:s.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="zeroSsl"||o.value==="other"?(t.openBlock(),t.createBlock(Y,{key:1,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",bf,[g[3]||(g[3]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),g[4]||(g[4]=t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),C.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:p.value,onModelUpdated:k},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",_f,[a.value==="consul"?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:f.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="redis"?(t.openBlock(),t.createBlock(Y,{key:1,model:e.formModel,options:e.formOptions,schema:h.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="shm"?(t.openBlock(),t.createBlock(Y,{key:2,model:e.formModel,options:e.formOptions,schema:E.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="vault"?(t.openBlock(),t.createBlock(Y,{key:3,model:e.formModel,options:e.formOptions,schema:A.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",Ef,[g[5]||(g[5]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),g[6]||(g[6]=t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),C.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:u.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),[["__scopeId","data-v-07cecf5b"]]),Sf={class:"rla-form-basic-fields"},Cf={class:"rla-form-request-limits-subtitle"},wf={class:"rla-form-request-limits-content"},kf={class:"rla-form-window-type"},Af=["innerHTML"],Mf={class:"rla-form-window-type-radios"},Nf={class:"rla-form-request-limits-items"},If={class:"rla-form-request-limits-row"},Of=["id"],Vf={class:"rla-form-request-limits-actions"},Bf={key:0,class:"rla-form-request-limits-examples"},Ff={class:"rla-form-request-limits-examples-badges"},Rf=["innerHTML"],Df={id:"rla-form-error-legend",class:"rla-form-error-inputs"},Lf=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:Tf,ExitTransformer:uf,OIDCForm:cf,PostFunction:mf,RLAForm:P(t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},onPartialToggled:{type:Function},showNewPartialModal:{type:Function},isEditing:{type:Boolean},enableRedisPartial:{type:Boolean}},setup(e){var v;t.provide(he,(v=t.useSlots())==null?void 0:v[Ke]);const n={fixed:[{label:"500 requests every hour",description:"A fixed limit of 500 requests per hour resetting sharply on the hour, ensuring no user can exceed this limit.",config:{limit:500,window_size:3600}},{label:"200 requests every 30 minutes",description:"Users are allowed 200 requests per 30 minutes, resetting exactly on the 30 minute mark with no carryover of unused limits.",config:{limit:200,window_size:1800}},{label:"500 requests every day",description:"A strict limit of 5000 requests per day resetting promptly at midnight, preventing any burst traffic or inconsistent user experiences.",config:{limit:500,window_size:86400}}],sliding:[{label:"100 requests every hour",description:"Maximum of 100 requests every rolling hour, continuously adjusting the count over the course of the hour. No hard limit or known reset.",config:{limit:100,window_size:3600}},{label:"300 requests every 30 minutes",description:"Each user can make up to 300 requests in any rolling 30 minute period, with older requests dropping off as new requests are made.",config:{limit:300,window_size:1800}},{label:"500 requests every hour",description:`Each user is allowed 500 requests per hour.
|
|
2
|
+
`+me),ot&&Bt([F,R,U],De=>{me=ht(me,De," ")}),k&&zt?k.createHTML(me):me},n.setConfig=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fn(O),An=!0},n.clearConfig=function(){lt=null,An=!1},n.isValidAttribute=function(O,d,T){lt||Fn({});const M=ee(O),z=ee(d);return Za(M,z,T)},n.addHook=function(O,d){typeof d=="function"&&ft(S[O],d)},n.removeHook=function(O,d){if(d!==void 0){const T=ul(S[O],d);return T===-1?void 0:fl(S[O],T,1)[0]}return so(S[O])},n.removeHooks=function(O){S[O]=[]},n.removeAllHooks=function(){S=yo()},n}var Ol=bo();function Vl(){this.__data__=new Me,this.size=0}function Bl(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function Fl(e){return this.__data__.get(e)}function Rl(e){return this.__data__.has(e)}var Dl=200;function Ll(e,n){var o=this.__data__;if(o instanceof Me){var a=o.__data__;if(!ut||a.length<Dl-1)return a.push([e,n]),this.size=++o.size,this;o=this.__data__=new Ne(a)}return o.set(e,n),this.size=o.size,this}function Je(e){var n=this.__data__=new Me(e);this.size=n.size}Je.prototype.clear=Vl,Je.prototype.delete=Bl,Je.prototype.get=Fl,Je.prototype.has=Rl,Je.prototype.set=Ll;var Dt=(function(){try{var e=qe(Object,"defineProperty");return e({},"",{}),e}catch{}})();function _o(e,n,o){n=="__proto__"&&Dt?Dt(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}var Ul=Object.prototype,Pl=Ul.hasOwnProperty;function Eo(e,n,o){var a=e[n];(!(Pl.call(e,n)&&It(a,o))||o===void 0&&!(n in e))&&_o(e,n,o)}function Lt(e,n,o,a){var r=!o;o||(o={});for(var i=-1,s=n.length;++i<s;){var l=n[i],c=void 0;c===void 0&&(c=e[l]),r?_o(o,l,c):Eo(o,l,c)}return o}function $l(e,n){return e&&Lt(n,Mt(n),e)}function xl(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}var vl=Object.prototype,jl=vl.hasOwnProperty;function ql(e){if(!fe(e))return xl(e);var n=Xt(e),o=[];for(var a in e)a=="constructor"&&(n||!jl.call(e,a))||o.push(a);return o}function Ut(e){return At(e)?Zn(e,!0):ql(e)}function zl(e,n){return e&&Lt(n,Ut(n),e)}var To=typeof L=="object"&&L&&!L.nodeType&&L,So=To&&typeof module=="object"&&module&&!module.nodeType&&module,Kl=So&&So.exports===To,Co=Kl?ge.Buffer:void 0,wo=Co?Co.allocUnsafe:void 0;function Hl(e,n){if(n)return e.slice();var o=e.length,a=wo?wo(o):new e.constructor(o);return e.copy(a),a}function Yl(e,n){var o=-1,a=e.length;for(n||(n=Array(a));++o<a;)n[o]=e[o];return n}function Gl(e,n){for(var o=-1,a=e==null?0:e.length,r=0,i=[];++o<a;){var s=e[o];n(s,o,e)&&(i[r++]=s)}return i}function ko(){return[]}var Wl=Object.prototype,Zl=Wl.propertyIsEnumerable,Ao=Object.getOwnPropertySymbols,mn=Ao?function(e){return e==null?[]:(e=Object(e),Gl(Ao(e),function(n){return Zl.call(e,n)}))}:ko;function Xl(e,n){return Lt(e,mn(e),n)}function Mo(e,n){for(var o=-1,a=n.length,r=e.length;++o<a;)e[r+o]=n[o];return e}var No=Xn(Object.getPrototypeOf,Object),Jl=Object.getOwnPropertySymbols,Io=Jl?function(e){for(var n=[];e;)Mo(n,mn(e)),e=No(e);return n}:ko;function Ql(e,n){return Lt(e,Io(e),n)}function Oo(e,n,o){var a=n(e);return $e(e)?a:Mo(a,o(e))}function es(e){return Oo(e,Mt,mn)}function ts(e){return Oo(e,Ut,Io)}var un=qe(ge,"DataView"),fn=qe(ge,"Promise"),Qe=qe(ge,"Set"),hn=qe(ge,"WeakMap"),Vo="[object Map]",ns="[object Object]",Bo="[object Promise]",Fo="[object Set]",Ro="[object WeakMap]",Do="[object DataView]",os=je(un),as=je(ut),rs=je(fn),is=je(Qe),ls=je(hn),Ie=Ue;(un&&Ie(new un(new ArrayBuffer(1)))!=Do||ut&&Ie(new ut)!=Vo||fn&&Ie(fn.resolve())!=Bo||Qe&&Ie(new Qe)!=Fo||hn&&Ie(new hn)!=Ro)&&(Ie=function(e){var n=Ue(e),o=n==ns?e.constructor:void 0,a=o?je(o):"";if(a)switch(a){case os:return Do;case as:return Vo;case rs:return Bo;case is:return Fo;case ls:return Ro}return n});var ss=Object.prototype,ds=ss.hasOwnProperty;function cs(e){var n=e.length,o=new e.constructor(n);return n&&typeof e[0]=="string"&&ds.call(e,"index")&&(o.index=e.index,o.input=e.input),o}var Lo=ge.Uint8Array;function pn(e){var n=new e.constructor(e.byteLength);return new Lo(n).set(new Lo(e)),n}function ms(e,n){var o=n?pn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var us=/\w*$/;function fs(e){var n=new e.constructor(e.source,us.exec(e));return n.lastIndex=e.lastIndex,n}var Uo=Le?Le.prototype:void 0,Po=Uo?Uo.valueOf:void 0;function hs(e){return Po?Object(Po.call(e)):{}}function ps(e,n){var o=n?pn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var gs="[object Boolean]",ys="[object Date]",bs="[object Map]",_s="[object Number]",Es="[object RegExp]",Ts="[object Set]",Ss="[object String]",Cs="[object Symbol]",ws="[object ArrayBuffer]",ks="[object DataView]",As="[object Float32Array]",Ms="[object Float64Array]",Ns="[object Int8Array]",Is="[object Int16Array]",Os="[object Int32Array]",Vs="[object Uint8Array]",Bs="[object Uint8ClampedArray]",Fs="[object Uint16Array]",Rs="[object Uint32Array]";function Ds(e,n,o){var a=e.constructor;switch(n){case ws:return pn(e);case gs:case ys:return new a(+e);case ks:return ms(e,o);case As:case Ms:case Ns:case Is:case Os:case Vs:case Bs:case Fs:case Rs:return ps(e,o);case bs:return new a;case _s:case Ss:return new a(e);case Es:return fs(e);case Ts:return new a;case Cs:return hs(e)}}var $o=Object.create,Ls=(function(){function e(){}return function(n){if(!fe(n))return{};if($o)return $o(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}})();function Us(e){return typeof e.constructor=="function"&&!Xt(e)?Ls(No(e)):{}}var Ps="[object Map]";function $s(e){return Pe(e)&&Ie(e)==Ps}var xo=Xe&&Xe.isMap,xs=xo?Wt(xo):$s,vs="[object Set]";function js(e){return Pe(e)&&Ie(e)==vs}var vo=Xe&&Xe.isSet,qs=vo?Wt(vo):js,zs=1,Ks=2,Hs=4,jo="[object Arguments]",Ys="[object Array]",Gs="[object Boolean]",Ws="[object Date]",Zs="[object Error]",qo="[object Function]",Xs="[object GeneratorFunction]",Js="[object Map]",Qs="[object Number]",zo="[object Object]",ed="[object RegExp]",td="[object Set]",nd="[object String]",od="[object Symbol]",ad="[object WeakMap]",rd="[object ArrayBuffer]",id="[object DataView]",ld="[object Float32Array]",sd="[object Float64Array]",dd="[object Int8Array]",cd="[object Int16Array]",md="[object Int32Array]",ud="[object Uint8Array]",fd="[object Uint8ClampedArray]",hd="[object Uint16Array]",pd="[object Uint32Array]",j={};j[jo]=j[Ys]=j[rd]=j[id]=j[Gs]=j[Ws]=j[ld]=j[sd]=j[dd]=j[cd]=j[md]=j[Js]=j[Qs]=j[zo]=j[ed]=j[td]=j[nd]=j[od]=j[ud]=j[fd]=j[hd]=j[pd]=!0,j[Zs]=j[qo]=j[ad]=!1;function bt(e,n,o,a,r,i){var s,l=n&zs,c=n&Ks,m=n&Hs;if(s!==void 0)return s;if(!fe(e))return e;var p=$e(e);if(p){if(s=cs(e),!l)return Yl(e,s)}else{var f=Ie(e),h=f==qo||f==Xs;if(Kn(e))return Hl(e,l);if(f==zo||f==jo||h&&!r){if(s=c||h?{}:Us(e),!l)return c?Ql(e,zl(s,e)):Xl(e,$l(s,e))}else{if(!j[f])return r?e:{};s=Ds(e,f,l)}}i||(i=new Je);var E=i.get(e);if(E)return E;i.set(e,s),qs(e)?e.forEach(function(C){s.add(bt(C,n,o,C,e,i))}):xs(e)&&e.forEach(function(C,w){s.set(w,bt(C,n,o,w,e,i))});var A=m?c?ts:es:c?Ut:Mt,u=p?void 0:A(e);return Ln(u||e,function(C,w){u&&(w=C,C=e[w]),Eo(s,w,bt(C,n,o,w,e,i))}),s}var gd=1,yd=4;function Oe(e){return bt(e,gd|yd)}const gn=(e,n="")=>typeof e.id<"u"?n+e.id+"":n+(e.inputName||e.label||e.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),Ko=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var bd="[object String]";function He(e){return typeof e=="string"||!$e(e)&&Pe(e)&&Ue(e)==bd}const Ho={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,o={[$(this.options,"validationErrorClass","error")]:n,[$(this.options,"validationSuccessClass","valid")]:!n,disabled:this.fieldDisabled(e),readonly:this.fieldReadonly(e),featured:this.fieldFeatured(e),required:this.fieldRequired(e)};return Array.isArray(e.styleClasses)?re(e.styleClasses,a=>o[a]=!0):He(e.styleClasses)&&(o[e.styleClasses]=!0),G(e.type)||(o["field-"+e.type]=!0),o},fieldErrors(e){return this.errors.filter(o=>o.field.fieldName===e.fieldName).map(o=>o.error)},fieldDisabled(e){return x(e.disabled)?e.disabled.call(this,this.model,e,this):G(e.disabled)?!1:e.disabled},fieldReadonly(e){return x(e.readonly)?e.readonly.call(this,this.model,e,this):G(e.readonly)?!1:e.readonly},fieldFeatured(e){return x(e.featured)?e.featured.call(this,this.model,e,this):G(e.featured)?!1:e.featured},fieldRequired(e){return x(e.required)?e.required.call(this,this.model,e,this):G(e.required)?!1:e.required}}};var yn=function(){return ge.Date.now()},_d=/\s/;function Ed(e){for(var n=e.length;n--&&_d.test(e.charAt(n)););return n}var Td=/^\s+/;function Sd(e){return e&&e.slice(0,Ed(e)+1).replace(Td,"")}var Yo=NaN,Cd=/^[-+]0x[0-9a-f]+$/i,wd=/^0b[01]+$/i,kd=/^0o[0-7]+$/i,Ad=parseInt;function bn(e){if(typeof e=="number")return e;if(Nt(e))return Yo;if(fe(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=fe(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Sd(e);var o=wd.test(e);return o||kd.test(e)?Ad(e.slice(2),o?2:8):Cd.test(e)?Yo:+e}var Md="Expected a function",Nd=Math.max,Id=Math.min;function et(e,n,o){var a,r,i,s,l,c,m=0,p=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Md);n=bn(n)||0,fe(o)&&(p=!!o.leading,f="maxWait"in o,i=f?Nd(bn(o.maxWait)||0,n):i,h="trailing"in o?!!o.trailing:h);function E(y){var g=a,B=r;return a=r=void 0,m=y,s=e.apply(B,g),s}function A(y){return m=y,l=setTimeout(w,n),p?E(y):s}function u(y){var g=y-c,B=y-m,v=n-g;return f?Id(v,i-B):v}function C(y){var g=y-c,B=y-m;return c===void 0||g>=n||g<0||f&&B>=i}function w(){var y=yn();if(C(y))return I(y);l=setTimeout(w,u(y))}function I(y){return l=void 0,h&&a?E(y):(a=r=void 0,s)}function _(){l!==void 0&&clearTimeout(l),m=0,a=c=r=l=void 0}function k(){return l===void 0?s:I(yn())}function b(){var y=yn(),g=C(y);if(a=arguments,r=this,c=y,g){if(l===void 0)return A(c);if(f)return clearTimeout(l),l=setTimeout(w,n),E(c)}return l===void 0&&(l=setTimeout(w,n)),s}return b.cancel=_,b.flush=k,b}var Od="__lodash_hash_undefined__";function Vd(e){return this.__data__.set(e,Od),this}function Bd(e){return this.__data__.has(e)}function Pt(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new Ne;++n<o;)this.add(e[n])}Pt.prototype.add=Pt.prototype.push=Vd,Pt.prototype.has=Bd;function Fd(e,n,o,a){for(var r=e.length,i=o+-1;++i<r;)if(n(e[i],i,e))return i;return-1}function Rd(e){return e!==e}function Dd(e,n,o){for(var a=o-1,r=e.length;++a<r;)if(e[a]===n)return a;return-1}function Ld(e,n,o){return n===n?Dd(e,n,o):Fd(e,Rd,o)}function Ud(e,n){var o=e==null?0:e.length;return!!o&&Ld(e,n,0)>-1}function Pd(e,n){return e.has(n)}function $d(){}function Go(e){var n=-1,o=Array(e.size);return e.forEach(function(a){o[++n]=a}),o}var xd=1/0,vd=Qe&&1/Go(new Qe([,-0]))[1]==xd?function(e){return new Qe(e)}:$d,jd=200;function qd(e,n,o){var a=-1,r=Ud,i=e.length,s=!0,l=[],c=l;if(i>=jd){var m=vd(e);if(m)return Go(m);s=!1,r=Pd,c=new Pt}else c=l;e:for(;++a<i;){var p=e[a],f=p;if(p=p!==0?p:0,s&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;l.push(p)}else r(c,f,o)||(c!==l&&c.push(f),l.push(p))}return l}function Wo(e){return e&&e.length?qd(e):[]}var zd=0;function Zo(e){var n=++zd;return no(e)+n}var Xo=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,xe="\\d\\d?",ve="\\d\\d",Kd="\\d{3}",Hd="\\d{4}",_t="[^\\s]+",Jo=/\[([^]*?)\]/gm;function Qo(e,n){for(var o=[],a=0,r=e.length;a<r;a++)o.push(e[a].substr(0,n));return o}var ea=function(e){return function(n,o){var a=o[e].map(function(i){return i.toLowerCase()}),r=a.indexOf(n.toLowerCase());return r>-1?r:null}};function Ye(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];for(var a=0,r=n;a<r.length;a++){var i=r[a];for(var s in i)e[s]=i[s]}return e}var ta=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],na=["January","February","March","April","May","June","July","August","September","October","November","December"],Yd=Qo(na,3),Gd=Qo(ta,3),oa={dayNamesShort:Gd,dayNames:ta,monthNamesShort:Yd,monthNames:na,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},$t=Ye({},oa),Wd=function(e){return $t=Ye($t,e)},aa=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},ce=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},Zd={D:function(e){return String(e.getDate())},DD:function(e){return ce(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return ce(e.getDay())},ddd:function(e,n){return n.dayNamesShort[e.getDay()]},dddd:function(e,n){return n.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return ce(e.getMonth()+1)},MMM:function(e,n){return n.monthNamesShort[e.getMonth()]},MMMM:function(e,n){return n.monthNames[e.getMonth()]},YY:function(e){return ce(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return ce(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return ce(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return ce(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return ce(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return ce(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return ce(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return ce(e.getMilliseconds(),3)},a:function(e,n){return e.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(e,n){return e.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+ce(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+ce(Math.floor(Math.abs(n)/60),2)+":"+ce(Math.abs(n)%60,2)}},ra=function(e){return+e-1},ia=[null,xe],la=[null,_t],sa=["isPm",_t,function(e,n){var o=e.toLowerCase();return o===n.amPm[0]?0:o===n.amPm[1]?1:null}],da=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var n=(e+"").match(/([+-]|\d\d)/gi);if(n){var o=+n[1]*60+parseInt(n[2],10);return n[0]==="+"?o:-o}return 0}],Xd={D:["day",xe],DD:["day",ve],Do:["day",xe+_t,function(e){return parseInt(e,10)}],M:["month",xe,ra],MM:["month",ve,ra],YY:["year",ve,function(e){var n=new Date,o=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?o-1:o)+e)}],h:["hour",xe,void 0,"isPm"],hh:["hour",ve,void 0,"isPm"],H:["hour",xe],HH:["hour",ve],m:["minute",xe],mm:["minute",ve],s:["second",xe],ss:["second",ve],YYYY:["year",Hd],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",ve,function(e){return+e*10}],SSS:["millisecond",Kd],d:ia,dd:ia,ddd:la,dddd:la,MMM:["month",_t,ea("monthNamesShort")],MMMM:["month",_t,ea("monthNames")],a:sa,A:sa,ZZ:da,Z:da},xt={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Jd=function(e){return Ye(xt,e)},Qd=function(e,n,o){if(n===void 0&&(n=xt.default),o===void 0&&(o={}),typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");n=xt[n]||n;var a=[];n=n.replace(Jo,function(i,s){return a.push(s),"@@@"});var r=Ye(Ye({},$t),o);return n=n.replace(Xo,function(i){return Zd[i](e,r)}),n.replace(/@@@/g,function(){return a.shift()})};function ec(e,n,o){if(o===void 0&&(o={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=xt[n]||n,e.length>1e3)return null;var a=new Date,r={year:a.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],s=[],l=n.replace(Jo,function(k,b){return s.push(aa(b)),"@@@"}),c={},m={};l=aa(l).replace(Xo,function(k){var b=Xd[k],y=b[0],g=b[1],B=b[3];if(c[y])throw new Error("Invalid format. "+y+" specified twice in format");return c[y]=!0,B&&(m[B]=!0),i.push(b),"("+g+")"}),Object.keys(m).forEach(function(k){if(!c[k])throw new Error("Invalid format. "+k+" is required in specified format")}),l=l.replace(/@@@/g,function(){return s.shift()});var p=e.match(new RegExp(l,"i"));if(!p)return null;for(var f=Ye(Ye({},$t),o),h=1;h<p.length;h++){var E=i[h-1],A=E[0],u=E[2],C=u?u(p[h],f):+p[h];if(C==null)return null;r[A]=C}r.isPm===1&&r.hour!=null&&+r.hour!=12?r.hour=+r.hour+12:r.isPm===0&&+r.hour==12&&(r.hour=0);var w;if(r.timezoneOffset==null){w=new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond);for(var I=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],h=0,_=I.length;h<_;h++)if(c[I[h][0]]&&r[I[h][0]]!==w[I[h][1]]())return null}else if(w=new Date(Date.UTC(r.year,r.month,r.day,r.hour,r.minute-r.timezoneOffset,r.second,r.millisecond)),r.month>11||r.month<0||r.day>31||r.day<1||r.hour>23||r.hour<0||r.minute>59||r.minute<0||r.second>59||r.second<0)return null;return w}var tt={format:Qd,parse:ec,defaultI18n:oa,setGlobalDateI18n:Wd,setGlobalDateMasks:Jd};function tc(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var ca=Math.max;function nc(e,n,o){return n=ca(n===void 0?e.length-1:n,0),function(){for(var a=arguments,r=-1,i=ca(a.length-n,0),s=Array(i);++r<i;)s[r]=a[n+r];r=-1;for(var l=Array(n+1);++r<n;)l[r]=a[r];return l[n]=o(s),tc(e,this,l)}}function oc(e){return function(){return e}}var ac=Dt?function(e,n){return Dt(e,"toString",{configurable:!0,enumerable:!1,value:oc(n),writable:!0})}:Jt,rc=800,ic=16,lc=Date.now;function sc(e){var n=0,o=0;return function(){var a=lc(),r=ic-(a-o);if(o=a,r>0){if(++n>=rc)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var dc=sc(ac);function cc(e,n){return dc(nc(e,n,Jt),e+"")}function mc(e,n,o){if(!fe(o))return!1;var a=typeof n;return(a=="number"?At(o)&&Hn(n,o.length):a=="string"&&n in o)?It(o[n],e):!1}var ma=Object.prototype,uc=ma.hasOwnProperty,fc=cc(function(e,n){e=Object(e);var o=-1,a=n.length,r=a>2?n[2]:void 0;for(r&&mc(n[0],n[1],r)&&(a=1);++o<a;)for(var i=n[o],s=Ut(i),l=-1,c=s.length;++l<c;){var m=s[l],p=e[m];(p===void 0||It(p,ma[m])&&!uc.call(e,m))&&(e[m]=i[m])}return e}),hc=ge.isFinite;function ua(e){return typeof e=="number"&&hc(e)}var fa=1/0,pc=17976931348623157e292;function gc(e){if(!e)return e===0?e:0;if(e=bn(e),e===fa||e===-fa){var n=e<0?-1:1;return n*pc}return e===e?e:0}function yc(e){var n=gc(e),o=n%1;return n===n?o?n-o:n:0}function bc(e){return typeof e=="number"&&e==yc(e)}var _c="[object Number]";function _n(e){return typeof e=="number"||Pe(e)&&Ue(e)==_c}const pe={general:{packageName:"forms",disable_global_radio:"The plugin is set to 'Scoped' by default when configured under a {scope}. To configure a global plugin, navigate to the global plugin list page.",disable_source_scope_change:"Changing the {scope} is not allowed when configuring a plugin under it."},"post-function":{tags:{hint:"e.g. tag1, tag2, tag3",newElementButtonLabel:"+ Add"},enabled:{newElementButtonLabel:"+ Add"},selectionGroup:{newElementButtonLabel:"+ Add"},instance_name:{newElementButtonLabel:"+ Add"},name:{newElementButtonLabel:"+ Add"},"config-certificate":{help:"Array of stringified Lua code to be cached and run in sequence during the certificate phase.",newElementButtonLabel:"+ Add"},"config-access":{help:"Array of stringified Lua code to be cached and run in sequence during the access phase.",newElementButtonLabel:"+ Add"},"config-body_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the body_filter phase.",newElementButtonLabel:"+ Add"},"config-header_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the header_filter phase.",newElementButtonLabel:"+ Add"},"config-functions":{newElementButtonLabel:"+ Add"},"config-log":{newElementButtonLabel:"+ Add"},"config-rewrite":{newElementButtonLabel:"+ Add"},"config-ws_client_frame":{newElementButtonLabel:"+ Add"},"config-ws_close":{newElementButtonLabel:"+ Add"},"config-ws_handshake":{newElementButtonLabel:"+ Add"},"config-ws_upstream_frame":{newElementButtonLabel:"+ Add"}},"exit-transformer":{"config-functions":{newElementButtonLabel:"+ Add"}},rla:{view_advanced:"View advanced parameters",window_type:{label:"Rate Limit Window Type",help:"Sets the time window type to either <code>sliding</code> (default) or <code>fixed</code>.<br><ul><li>Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight.</li><li>Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.</li></ul>",options:{fixed:"Fixed",sliding:"Sliding"}},request_limits:{title:"Request Limits",subtitle:"Set one or more limits on the number of API requests allowed within a defined timeframe.",label:"Limit",label_index:"Limit {index}",request_number:"Request number",time_interval:"Time interval",interval_determiner:"Every",seconds:"Seconds"},start_with_a_use_case:"Start with a use case:",use_case_index:"Use case {index}",error_message:{label:"Error Message",code_placeholder:"Code Message",message_placeholder:"Error Message",help:"Set a custom error code and message to be returned when the rate limit is exceeded."},identifiers:{label:"Identifiers",options:{ip:"IP",credential:"Credential",consumer:"Consumer",service:"Service",header:"Header",path:"Path","consumer-group":"Consumer Group",route:"Route"}},redis:{title:"Configure your Redis",address_example:"e.g. localhost:6379"}},validators:{field_is_required:"This field is required",invalid_format:"Invalid format",number_too_small:"The number is too small. Minimum: {0}",number_too_large:"The number is too large. Maximum: {0}",invalid_number:"Invalid number",invalid_integer:"The value is not an integer",text_too_short:"The length of text is too short. Current: {0}, Minimum: {1}",text_too_long:"The length of text is too long. Current: {0}, Maximum: {1}",this_not_text:"This is not a text",this_not_array:"This is not an array",select_min_items:"Select minimum {0} items",select_max_items:"Select maximum {0} items",invalid_date:"Invalid date",date_is_early:"The date is too early. Current: {0}, Minimum: {1}",date_is_late:"The date is too late. Current: {0}, Maximum: {1}",invalid_email:"Invalid e-mail address",invalid_url:"Invalid URL",invalid_card:"Invalid card format",invalid_card_number:"Invalid card number",invalid_text_contain_number:"Invalid text - cannot contains numbers or special characters",invalid_tex_contain_spec:"Invalid text - cannot contains special characters"},redis:{title:"Redis Configuration",shared_configuration:{label:"Use shared configuration",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins.",title:"Shared Redis Configuration",error:"Fetching shared Redis configurations failed.",tooltip:"Only compatible {type} redis configurations will be listed here.",configuration_selector_label:"Select stored Redis configuration",configuration_selector_placeholder:"Pick Redis configuration",create_new_configuration:"New {type} shared configuration",empty_state:"No shared configurations",badge:"Recommended",selector:{title:"Select a Redis configuration",placeholder:"Filter Configurations",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins."}},dedicated_configuration:{label:"Use dedicated configuration",description:"Create a Redis configuration exclusively for this plugin, with settings that won’t impact other plugins.",title:"Connection Settings"},config_card:{common_fields:{created_at_label:"Created at",updated_at_label:"Last Updated at",type_label:"Redis Type"}},custom_plugin:{alert:"Note: For custom plugins, we cannot determine the correct Redis configuration type. Please ensure you select the appropriate option manually.",tooltip:"To apply a shared redis configuration, the redis fields must defined as Kong plugins in plugin schema."}},fields:{auto_suggest:{error:{load_entity:"There was an error loading {entity}"},recently_created:"Recently created {entity}",items_count:"Currently showing {count} {count, plural, =1 {item} other {items}}, type to search",no_results:"No results",loading:"Loading..."}},vfg:{labels:{on:"On",off:"Off"}}},{t:W}=ue.createI18n("en-us",pe),ne={fieldIsRequired:W("validators.field_is_required"),invalidFormat:W("validators.invalid_format"),numberTooSmall:W("validators.number_too_small"),numberTooBig:W("validators.number_too_large"),invalidNumber:W("validators.invalid_number"),invalidInteger:W("validators.invalid_integer"),textTooSmall:W("validators.text_too_short"),textTooBig:W("validators.text_too_long"),thisNotText:W("validators.this_not_text"),thisNotArray:W("validators.this_not_array"),selectMinItems:W("validators.select_min_items"),selectMaxItems:W("validators.select_max_items"),invalidDate:W("validators.invalid_date"),dateIsEarly:W("validators.date_is_early"),dateIsLate:W("validators.date_is_late"),invalidEmail:W("validators.invalid_email"),invalidURL:W("validators.invalid_url"),invalidCard:W("validators.invalid_card"),invalidCardNumber:W("validators.invalid_card_number"),invalidTextContainNumber:W("validators.invalid_text_contain_number"),invalidTextContainSpec:W("validators.invalid_tex_contain_spec")},K=(e,...n)=>{if(e&&n.length>0)for(let o=0;o<n.length;o++)e=e.replace("{"+(o-1)+"}",String(n[o]||""));return e},be=(e,n,o=ne)=>G(e)||e===""?n?[K(o.fieldIsRequired)]:[]:null,Ge={required:(e,n,o,a=ne)=>be(e,n.required,a)||[],number:(e,n,o,a=ne)=>{let r=be(e,n.required,a);return r!=null||(r=[],ua(e)?(!G(n.min)&&e<n.min,(a=ne)&&r.push(K(a.numberTooSmall,n.min)),!G(n.max)&&e>n.max,(a=ne)&&r.push(K(a.numberTooBig,n.max))):r.push(K(a.invalidNumber))),r},integer:(e,n,o,a=ne)=>{let r=be(e,n.required,a);return r!=null||(r=[],r.concat(Ge.number(e,n,o,a)),bc(e)||r.push(K(a.invalidInteger))),r},double:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(!_n(e)||isNaN(e)?[K(a.invalidNumber)]:[])},string:(e,n,o,a=ne)=>{let r=be(e,n.required,a);return r!=null||(r=[],He(e)?(!G(n.min)&&e.length<n.min&&r.push(K(a.textTooSmall,e.length,n.min)),!G(n.max)&&e.length>n.max&&r.push(K(a.textTooBig,e.length,n.max))):r.push(K(a.thisNotText))),r},array:(e,n,o,a=ne)=>{if(n.required){if(!Array.isArray(e))return[K(a.thisNotArray)];if(e.length===0)return[K(a.fieldIsRequired)]}if(!G(e)){if(!G(n.min)&&e.length<n.min)return[K(a.selectMinItems,n.min)];if(!G(n.max)&&e.length>n.max)return[K(a.selectMaxItems,n.max)]}return[]},date:(e,n,o,a=ne)=>{let r=be(e,n.required,a);if(r!=null)return r;r=[];const i=new Date(e);if(isNaN(i.getDate()))return[K(a.invalidDate)];if(!G(n.min)){const s=new Date(n.min);i.valueOf()<s.valueOf()&&r.push(K(a.dateIsEarly,tt.format(i),tt.format(s)))}if(!G(n.max)){const s=new Date(n.max);i.valueOf()>s.valueOf()&&r.push(K(a.dateIsLate,tt.format(i),tt.format(s)))}return r},regexp:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(!G(n.pattern)&&!new RegExp(n.pattern).test(e)?[K(a.invalidFormat)]:[])},email:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)?[]:[K(a.invalidEmail)])},url:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(e)?[]:[K(a.invalidURL)])},creditCard:(e,n,o,a=ne)=>{const r=be(e,n.required,a);if(r!=null)return r;const i=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,s=e.replace(/[^0-9]+/g,"");if(!i.test(s))return[K(a.invalidCard)];let l=0,c,m,p;for(let f=s.length-1;f>=0;f--)c=s.substring(f,f+1),m=parseInt(c,10),p?(m*=2,m>=10?l+=m%10+1:l+=m):l+=m,p=!p;return l%10===0&&s?[]:[K(a.invalidCardNumber)]},alpha:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(/^[a-zA-Z]*$/.test(e)?[]:[K(a.invalidTextContainNumber)])},alphaNumeric:(e,n,o,a=ne)=>{const r=be(e,n.required,a);return r??(/^[a-zA-Z0-9]*$/.test(e)?[]:[K(a.invalidTextContainSpec)])}};Object.keys(Ge).forEach(e=>{const n=Ge[e];x(n)&&(n.locale=o=>(a,r,i)=>n(a,r,i,fc(o,ne)))});function ha(e){return He(e)?Ge[e]!=null?Ge[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function En(e,n,o){let a=$(o.context,"schema.attributes",{});const r=n.value||"input";He(r)&&(a=$(a,r)||a),re(a,(i,s)=>{e.setAttribute(s,i)})}const Ce={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:En,updated:En,componentUpdated:En}},computed:{value:{cache:!1,get(){let e;return x($(this.schema,"get"))?e=this.schema.get(this.model):e=$(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),x(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=$(this.formOptions,"validateAsync",!1);let o=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const r=[];Array.isArray(this.schema.validator)?re(this.schema.validator,i=>{r.push(ha(i).bind(this))}):r.push(ha(this.schema.validator).bind(this)),re(r,i=>{if(n)o.push(i(this.value,this.schema,this.model));else{const s=i(this.value,this.schema,this.model);s&&x(s.then)?s.then(l=>{l&&(this.errors=this.errors.concat(l));const c=this.errors.length===0;this.$emit("validated",c,this.errors,this)}):s&&(o=o.concat(s))}})}const a=r=>{let i=[];re(Wo(r),l=>{Array.isArray(l)&&l.length>0?i=i.concat(l):He(l)&&i.push(l)}),x(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,i,this.schema);const s=i.length===0;return e||this.$emit("validated",s,i,this),this.errors=i,i};return n?Promise.all(o).then(a):a(o)},debouncedValidate(){x(this.debouncedValidateFunc)||(this.debouncedValidateFunc=et(this.validate.bind(this),$(this.schema,"validateDebounceTime",$(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let o=!1;x(this.schema.set)?(this.schema.set(this.model,e),o=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,e),o=!0),o&&(this.$emit("modelUpdated",e,this.schema.model),x(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),$(this.formOptions,"validateAfterChanged",!1)===!0&&($(this.schema,"validateDebounceTime",$(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(e,n){let o=e.replace(/\[(\w+)\]/g,".$1");o=o.replace(/^\./,"");let a=this.model;const r=o.split(".");let i=0;const s=r.length;for(;i<s;){const l=r[i];if(i<s-1)a[l]!==void 0||(a[l]={}),a=a[l];else{a[l]=n;return}++i}},getFieldID(e,n=!1){const o=$(this.formOptions,"fieldIdPrefix","");return gn(e,o)+(n?"-"+Zo():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return $(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},Ec=Object.freeze(Object.defineProperty({__proto__:null,default:Ce},Symbol.toStringTag,{value:"Module"})),P=(e,n)=>{const o=e.__vccOpts||e;for(const[a,r]of n)o[a]=r;return o},Tc={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},Sc={class:"material-icons"},Cc=P(Object.assign({mixins:[Ce],emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{isOpen:!1}},computed:{openClass(){return this.isOpen?"open":"closed"},fieldCount(){return this.schema.fields.length},titleText(){return`${this.isOpen?"Hide":"View"} ${this.fieldCount} Advanced Fields`}},methods:{handleOpen(){this.isOpen=!this.isOpen},updateModel(e,n){this.$emit("model-updated",e,n)}}},{__name:"FieldAdvanced",setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",Tc,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:o[0]||(o[0]=(...a)=>n.handleOpen&&n.handleOpen(...a))},[t.createElementVNode("i",Sc,t.toDisplayString(n.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),t.createElementVNode("span",null,t.toDisplayString(n.titleText),1)]),t.createElementVNode("div",{class:t.normalizeClass(["advanced-field-dropdown",n.openClass])},[t.createVNode(Y,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])],2)]))}}),[["__scopeId","data-v-e8f66c8a"]]),wc={class:"array-card-container"},pa=P(t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0}},emits:["remove-item"],setup(e){const n=e;return t.provide("vfg-array-item-index",n.index),(o,a)=>{const r=t.resolveComponent("KCard"),i=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",wc,[t.createVNode(r,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(i,{appearance:"tertiary",class:"array-card-remove-button",onClick:a[0]||(a[0]=s=>o.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.TrashIcon))]),_:1})])}}}),[["__scopeId","data-v-97302224"]]),kc={class:"array-item-wrapper"},Ac={class:"array-item"},Mc={class:"array-item-after"},ga=P(t.defineComponent({__name:"FieldArrayItem",props:{model:{type:String,default:""}},emits:["remove-item"],setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",kc,[t.createElementVNode("div",Ac,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"tertiary",class:"delete",onClick:o[0]||(o[0]=r=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.TrashIcon))]),_:1})]),t.createElementVNode("div",Mc,[t.renderSlot(n.$slots,"after",{},void 0,!0)])])}}}),[["__scopeId","data-v-51d79db2"]]),Nc={class:"multi-item-wrapper"},ya=P(t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Nc,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"danger",class:"delete",onClick:o[0]||(o[0]=r=>n.$emit("remove-item"))},{default:t.withCtx(()=>[...o[1]||(o[1]=[t.createTextVNode(" - Remove Field ",-1)])]),_:1}),o[2]||(o[2]=t.createElementVNode("hr",null,null,-1))])}}}),[["__scopeId","data-v-b4fcf731"]]),Ic="#6c7489",Oc="12px",Vc="20px";var Bc=4;function ba(e){return bt(e,Bc)}const Fc=["data-testid","data-testlabel"],Rc={class:"item-label"},Dc={class:"autosuggest__results_message"},Lc=P(t.defineComponent({__name:"AutoSuggest",props:t.mergeModels({placeholder:{default:""},suggestions:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emptyMessage:{default:""},domId:{},error:{}},{id:{required:!0},idModifiers:{}}),emits:t.mergeModels(["change","query-change"],["update:id"]),setup(e){const{t:n}=ue.createI18n("en-us",pe),o=t.useModel(e,"id");return(a,r)=>{const i=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(i,{id:e.domId,ref:"suggestion",modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),clearable:"",disabled:e.disabled,"enable-filtering":"",error:e.error!==null,"filter-function":()=>!0,help:e.error!==null?e.error:void 0,items:e.suggestions,loading:e.loading,placeholder:e.placeholder,width:"100%",onChange:r[1]||(r[1]=s=>a.$emit("change",s)),onQueryChange:r[2]||(r[2]=s=>a.$emit("query-change",s))},t.createSlots({"item-template":t.withCtx(({item:s})=>[t.renderSlot(a.$slots,"item",{item:s},()=>[t.createElementVNode("span",{class:"item-label","data-testid":s.id&&`${s.id}-0`,"data-testlabel":s.label},t.toDisplayString(s.label),9,Fc)],!0)]),"selected-item-template":t.withCtx(({item:s})=>[t.renderSlot(a.$slots,"selected-item",{item:s},()=>[t.createElementVNode("span",Rc,t.toDisplayString(s.label),1)],!0)]),empty:t.withCtx(()=>[t.createElementVNode("div",Dc,[t.createElementVNode("span",null,t.toDisplayString(e.emptyMessage||t.unref(n)("fields.auto_suggest.no_results")),1)])]),_:2},[a.$slots.before?{name:"before",fn:t.withCtx(()=>[t.renderSlot(a.$slots,"before",{},void 0,!0)]),key:"0"}:void 0]),1032,["id","modelValue","disabled","error","help","items","loading","placeholder"])}}}),[["__scopeId","data-v-9f6760b4"]]),Uc="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Tn=e=>e?e.length===36&&new RegExp(`^${Uc}$`).test(e):!1,Pc=e=>({...e,label:e.name,value:e.id});function _a(e,n,o){return o?Te.SET_REFERRAL_VALUE:e&&!n||!e&&n?Te.UPDATE_ENTITY:e&&n?Te.CREATE_FROM_ENTITY:Te.CREATE_NOT_FROM_ENTITY}const $c=500,xc=50,vc=t.defineComponent({__name:"FieldScopedEntitySelect",props:{transformItem:{type:Function,default:Pc},allowUuidSearch:{type:Boolean,default:!1},placeholder:{},fields:{default:()=>[]},selectedItem:{},selectedItemLoading:{type:Boolean},initialItemSelected:{type:Boolean},domId:{},id:{},entity:{},disabled:{type:Boolean},fieldDisabled:{type:Boolean},error:{},getAll:{type:Function},getPartial:{type:Function},getOne:{type:Function}},emits:["change"],setup(e){const n=t.ref(""),o=t.ref(!1),a=t.ref(!1),r=t.ref(""),i=t.ref([]),s=t.ref([]),l=t.ref([]),{t:c}=ue.createI18n("en-us",pe),m=t.ref(null);let p=null;const f=async(b,y)=>{if(!e.fieldDisabled){clearTimeout(p),p=setTimeout(()=>{o.value=!0},1500);try{const g=await b();s.value=g,i.value=s.value.map(e.transformItem)}catch(g){if(y!=null&&y.aborted)return;if(i.value=[],tr.isAxiosError(g)&&g.status===404){console.warn("unable to search with UUID",r.value,"for entity type",e.entity);return}n.value=g.message}finally{clearTimeout(p),o.value=!1}}},h=et(b=>{if(b=b||"",r.value=b,!b.trim()&&!a.value){i.value=I(l.value);return}m.value&&m.value.abort();const y=new AbortController;if(m.value=y,a.value){k(b);return}C(b,y)},$c,{leading:!0}),E=async(b,y)=>await e.getAll(b,y),A=async()=>{const{data:{data:b,next:y,offset:g}}=await e.getPartial(xc);return(!y||!g)&&(a.value=!0),s.value=b,l.value=b.map(B=>({...e.transformItem(B),group:c("fields.auto_suggest.recently_created",{entity:e.entity})})),b},u=async b=>[await e.getOne(b)],C=(b,y)=>{Tn(b)&&e.allowUuidSearch?f(async()=>await u(b)):f(async()=>await E(b,y.signal),y.signal)},w=b=>{let y=[];y=I(l.value),b!=null&&b.trim()?i.value=y.filter(g=>e.fields.some(B=>(g[B]||"").includes(b))):i.value=y},I=b=>e.selectedItem?b.some(y=>y.value===e.selectedItem.value)?b:[e.selectedItem,...b]:b,_=b=>{i.value=l.value.filter(y=>y.id===b)},k=b=>{Tn(b)&&e.allowUuidSearch?_(b):w(b)};return t.onMounted(async()=>{await f(A);const b=t.watch(()=>e.selectedItem,y=>{y&&(i.value=I(l.value)),b()});i.value=I(l.value)}),(b,y)=>(t.openBlock(),t.createBlock(Lc,{id:e.id,disabled:e.fieldDisabled,"dom-id":e.domId,"empty-message":n.value,error:e.error,loading:e.selectedItemLoading||o.value,placeholder:e.placeholder,readonly:e.disabled,suggestions:i.value,onChange:y[0]||(y[0]=g=>b.$emit("change",g)),onQueryChange:t.unref(h)},t.createSlots({"selected-item":t.withCtx(({item:g})=>[t.renderSlot(b.$slots,"selected-item",{item:g})]),item:t.withCtx(({item:g})=>[t.renderSlot(b.$slots,"item",{item:g})]),_:2},[b.$slots.before?{name:"before",fn:t.withCtx(()=>[t.renderSlot(b.$slots,"before")]),key:"0"}:void 0]),1032,["id","disabled","dom-id","empty-message","error","loading","placeholder","readonly","suggestions","onQueryChange"]))}}),jc=1e3,qc={components:{FieldScopedEntitySelect:vc,SearchIcon:Ee.SearchIcon},mixins:[Ce],inject:[ie],emits:["model-updated"],setup(){const{t:e}=ue.createI18n("en-us",pe);return{t:e,KUI_ICON_SIZE_40:Vc,KUI_COLOR_TEXT_NEUTRAL:Ic,EMPTY_VALUE_PLACEHOLDER:ro}},data(){return{suggestions:[],idValue:"",message:"Type something to search",error:null,items:[],initialItem:null,selectedItem:null,loading:!1,dataDrained:!1}},computed:{fieldState(){return _a(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},scope(){return this.schema.label.toLowerCase()},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search},inputFields(){var e,n;return((n=(e=this.schema)==null?void 0:e.inputValues)==null?void 0:n.fields)||[]},allowUuidSearch(){return this.inputFields.includes("id")},inputFieldsWithoutId(){return this.inputFields.filter(e=>e!=="id")},initialValueSelected(){var e;return this.idValue===((e=this.initialItem)==null?void 0:e.id)}},async created(){await this.$nextTick();let e,n;this.error=null;try{switch(this.fieldState){case Te.UPDATE_ENTITY:if(!this[ie]){console.warn("[@kong-ui-public/forms] No API service provided");break}this.loading=!0,n=await this.getOne(this.model[this.schema.model]),e=this.getItem(this.schema.entityDataKey?n[this.schema.entityDataKey]:n),this.idValue=e.id;break;case Te.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Te.SET_REFERRAL_VALUE:this.idValue=this.value}e&&(this.initialItem=this.transformItem(e),this.selectedItem=this.initialItem)}catch(o){this.message=this.t("fields.auto_suggest.error.load_entity",{entity:this.schema.entity}),this.error=o.message||this.message,console.error("err!",o)}finally{this.loading=!1}},methods:{getPartial(e){return this[ie].peek(this.entity,e)},async getAll(e,n){return await this.fetchSuggestions(e,"name",n)},async getOne(e){if(!this[ie])return console.warn("[@kong-ui-public/forms] No API service provided"),{};const n=await this[ie].getOne(this.entity,e,{validateStatus:o=>o>=200&&o<300||o===404});if(n.status===404)throw new Error(`Entity of type ${this.entity} with id ${e} not found`);return n.data},transformItem(e){return{...e,label:this.getSuggestionLabel(e),value:e.id}},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e,n){if(!this[ie])return console.warn("[@kong-ui-public/forms] No API service provided"),[];const o=this[ie].getAllV2,{data:a}=await o(this.entity,{size:jc,...e},n);return a.data},async fetchSuggestions(e,n,o){return this.fetchUntilLimit({[n]:e},o)},getSuggestionLabel(e){var o;const n=((o=this.schema)==null?void 0:o.labelField)||"id";return n&&e?e[n]:""},updateModel(e){this.$emit("model-updated",e!=null&&e.length?e:null,this.schema.model)},onSelected(e){this.error=null,this.idValue=e&&e.id,this.selectedItem=e,this.updateModel(this.getReturnValue(e||{}))},getReturnValue(e){var o;const n=(o=this.schema)==null?void 0:o.returnKey;return n?e[n]:e.id}}},zc={class:"entity-suggestion-item"},Kc={class:"entity-label"},Hc={class:"entity-id"},Yc={class:"selected-entity-item"},Gc={class:"selected-entity-label"};function Wc(e,n,o,a,r,i){const s=t.resolveComponent("SearchIcon"),l=t.resolveComponent("FieldScopedEntitySelect");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.disabled?"k-tooltip":"div"),{class:"field-wrap autosuggest","max-width":"300",text:e.schema.disabledTooltip},{default:t.withCtx(()=>[t.createVNode(l,{id:r.idValue,"allow-uuid-search":i.allowUuidSearch,disabled:r.loading,"dom-id":e.schema.model,entity:i.entity,error:r.error,"field-disabled":e.schema.disabled,fields:i.inputFieldsWithoutId,"get-all":i.getAll,"get-one":i.getOne,"get-partial":i.getPartial,"initial-item-selected":i.initialValueSelected,placeholder:r.loading?a.t("fields.auto_suggest.loading"):e.schema.placeholder,"selected-item":r.selectedItem,"selected-item-loading":r.loading,"transform-item":i.transformItem,onChange:i.onSelected},{before:t.withCtx(()=>[t.createVNode(s,{color:a.KUI_COLOR_TEXT_NEUTRAL,size:a.KUI_ICON_SIZE_40},null,8,["color","size"])]),item:t.withCtx(({item:c})=>[t.createElementVNode("div",zc,[t.createElementVNode("span",Kc,t.toDisplayString(c.label??a.EMPTY_VALUE_PLACEHOLDER),1),t.createElementVNode("span",Hc,t.toDisplayString(c.id),1)])]),"selected-item":t.withCtx(({item:c})=>[t.createElementVNode("span",Yc,[t.createElementVNode("span",Gc,t.toDisplayString(c.label??c.id),1)])]),_:1},8,["id","allow-uuid-search","disabled","dom-id","entity","error","field-disabled","fields","get-all","get-one","get-partial","initial-item-selected","placeholder","selected-item","selected-item-loading","transform-item","onChange"])]),_:1},8,["text"])}const Ea=P(qc,[["render",Wc],["__scopeId","data-v-6fe8b574"]]),Sn=50,Zc={mixins:[Ce],inject:[ie],emits:["model-updated"],setup(){const{t:e}=ue.createI18n("en-us",pe);return{t:e}},data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return _a(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},scope(){return this.schema.label.toLowerCase()},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search}},async created(){await this.$nextTick();let e,n;switch(this.fieldState){case Te.UPDATE_ENTITY:if(!this[ie]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[ie].getOne(this.entity,this.model[this.schema.model])).data,e=this.getItem(this.schema.entityDataKey?n[this.schema.entityDataKey]:n),this.idValue=e.id;break;case Te.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Te.SET_REFERRAL_VALUE:this.idValue=this.value}try{e&&(this.initialItems=[{...e,label:this.getSuggestionLabel(e),value:e.id}]),this.items=this.initialItems}catch(o){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",o)}},methods:{onQueryChange(e){e.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=et(this.search,500)),this.performSearch(e)},async search(e){if(e.trim().length===0)return;this.loading=!0;const n=[],o=[],a=this.getInputFields(),r=new Set;Tn(e)&&a.includes("id")?o.push((async()=>{const i=await this.fetchExact(e);n.push({...i,label:this.getSuggestionLabel(i),value:i.id})})()):o.push(...a.filter(i=>i!=="id").map(async i=>{(await this.fetchSuggestions(e,i)).forEach(l=>{r.has(l.id)||(r.add(l.id),n.push({...l,label:this.getSuggestionLabel(l),value:l.id}))})})),await Promise.all(o),this.items=n,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e){const n=[];let o=null;if(!this[ie])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<Sn;){const a=await this[ie].getAll(this.entity,{size:Sn,offset:o,...e});if(n.push(...a.data.data),o=a.data.offset,!o)break}return n.slice(0,Sn)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[ie]?(await this[ie].getOne(this.entity,e)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var e,n;return((n=(e=this.schema)==null?void 0:e.inputValues)==null?void 0:n.fields)||[]},getSuggestionLabel(e){const n=this.getInputFields();return n.length&&e?n.map(o=>e[o]).filter(Boolean).join(" - "):""},updateModel(e){this.$emit("model-updated",e!=null&&e.length?e:null,this.schema.model)},onSelected(e){this.idValue=e&&e.id,this.updateModel(this.getReturnValue(e||{}))},getReturnValue(e){var o;const n=(o=this.schema)==null?void 0:o.returnKey;return n?e[n]:e.id}}},Xc=["data-testid","data-testlabel"],Jc=["data-testid"],Qc={class:"autosuggest__results_message"};function em(e,n,o,a,r,i){const s=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.disabled?"k-tooltip":"div"),{class:"field-wrap autosuggest","max-width":"300",text:a.t("general.disable_source_scope_change",{scope:i.scope})},{default:t.withCtx(()=>[t.createVNode(s,{id:e.schema.model,ref:"suggestion",modelValue:r.idValue,"onUpdate:modelValue":n[0]||(n[0]=l=>r.idValue=l),clearable:"",disabled:e.schema.disabled,"enable-filtering":"","filter-function":()=>!0,items:r.items,loading:r.loading,placeholder:e.schema.placeholder,width:"100%",onChange:i.onSelected,onQueryChange:i.onQueryChange},{"item-template":t.withCtx(({item:l})=>[t.createElementVNode("span",{class:"first-part","data-testid":l.id&&`${l.id}-0`,"data-testlabel":l.label},t.toDisplayString(i.getSuggestionLabel(l).split(" - ")[0]),9,Xc),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.getSuggestionLabel(l).split(" - ").slice(1),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m,class:"field-span","data-testid":l.id&&`${l.id}-${m+1}`||m+1},t.toDisplayString(c),9,Jc))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",Qc,[t.createElementVNode("span",null,t.toDisplayString(r.message),1)])]),_:1},8,["id","modelValue","disabled","items","loading","placeholder","onChange","onQueryChange"])]),_:1},8,["text"])}const Ta=P(Zc,[["render",em],["__scopeId","data-v-8cfdc7f6"]]);function tm(e){const n=t.ref([]),o=t.ref(null),a=u=>He(u)?Ge[u]!=null?Ge[u]:(console.warn(`'${u}' is not a validator function!`),null):u,r=t.computed({get(){var C,w;let u;return x($(e.schema,"get"))?u=e.schema.get((C=e.model)==null?void 0:C.value):u=$((w=e.model)==null?void 0:w.value,e.schema.model),E(u)},set(u){const C=r;u=A(u),x(u)?u(u,C):l(u,C)}}),i=u=>{var _;c();const C=$(e.formOptions,"validateAsync",!1);let w=[];if(e.schema.readonly!==!0&&e.disabled!==!0){const k=[],b=(_=e.schema)==null?void 0:_.validator;b&&(Array.isArray(b)?re(b,y=>{k.push(a(y))}):k.push(a(b))),x(e.externalValidator)&&k.push(e.externalValidator),re(k,y=>{var g,B;if(C)w.push(y(r.value,e.schema,(g=e.model)==null?void 0:g.value));else{const v=y(r.value,e.schema,(B=e.model)==null?void 0:B.value);v&&x(v.then)?v.then(N=>{N&&(n.value=n.value.concat(N));const S=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:S,errors:n.value,field:e.schema})}):v&&(w=w.concat(v))}})}const I=k=>{var y,g;let b=[];if(re(Wo(k),B=>{Array.isArray(B)&&B.length>0?b=b.concat(B):He(B)&&b.push(B)}),x((y=e.schema)==null?void 0:y.onValidated)&&e.schema.onValidated((g=e.model)==null?void 0:g.value,b,e.schema),!u){const B=b.length===0;e.emitValidated&&e.emitValidated({isValid:B,errors:b,field:e.schema})}return k=b,b};return C?Promise.all(w).then(I):I(w)},s=()=>{x(o.value)?o.value():o.value=et(i,$(e.schema,"validateDebounceTime",$(e.formOptions,"validateDebounceTime",500)))},l=(u,C)=>{var I,_,k;let w=!1;x(e.schema.set)?(e.schema.set((I=e.model)==null?void 0:I.value,u),w=!0):e.schema.model&&(m(e.schema.model,u),w=!0),w&&(e.emitModelUpdated&&((_=e.model)!=null&&_.value)&&e.emitModelUpdated({value:u,model:e.schema.model}),x(e.schema.onChanged)&&e.schema.onChanged((k=e.model)==null?void 0:k.value,u,C,e.schema),$(e.formOptions,"validateAfterChanged",!1)===!0&&($(e.schema,"validateDebounceTime",$(e.formOptions,"validateDebounceTime",0))>0?s():i()))},c=()=>{n.value.splice(0)},m=(u,C)=>{var y;let w=u.replace(/\[(\w+)\]/g,".$1");w=w.replace(/^\./,"");let I=((y=e.model)==null?void 0:y.value)||{},_=0;const k=w.split("."),b=k.length;for(;_<b;){const g=k[_];if(_<b-1)I[g]!==void 0||(I[g]={}),I=I[g];else{I[g]=C;return}++_}},p=(u,C=!1)=>{const w=$(e.formOptions,"fieldIdPrefix","");return gn(u,w)+(C?"-"+Zo():"")},f=u=>`${p(u)}-label`,h=()=>$(e.schema,"fieldClasses",[]),E=u=>e.formatValueToField&&typeof e.formatValueToField=="function"?e.formatValueToField(u):u,A=u=>e.formatValueToModel&&typeof e.formatValueToModel=="function"?e.formatValueToModel(u):u;return{value:r,clearValidationErrors:c,getFieldID:p,getLabelId:f,getFieldClasses:h,updateModelValue:l}}function nm(e){const n=[],o=a=>{const r=["cluster-cache","cluster_cache"];for(const i of r)if(a.model.includes(i))return!1;return new RegExp("(?<=-redis-).*").test(a.model)};return e.fields.forEach(a=>{o(a)&&n.push(a)}),{redis:{id:"_redis",fields:n,model:"__redis_partial",redisType:e._supported_redis_partial_type,redisPath:e._redis_partial_path},redisModels:n.map(a=>a.model)}}function om(e,n){const o=new RegExp("(?<=config-redis-).*"),a=/Config\.Redis.*/;return n.filter(i=>{const s=i.model.match(o);return s&&!Object.keys(e).includes(s[0])}).map(i=>{const s=i.label.match(a);return{label:s?s[0]:i.label,key:i.model,value:"N/A",type:"text"}})}const _e={useAbstractFields:tm,useRedisPartial:nm,useRedisNonStandardFields:om},am={class:"form-field-wrapper"},Sa=P(t.defineComponent({__name:"FieldInput",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRefs(a),s=t.inject(he,void 0),{updateModelValue:l,getFieldID:c,clearValidationErrors:m,value:p}=_e.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:_=>{r("modelUpdated",_.value,_.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{var k,b;const _=(k=a.schema)==null?void 0:k.inputType.toLowerCase();if(_==="number"&&((b=a.schema)==null?void 0:b.referenceable)===!0)return"text";switch(_){case"string":return"text";case"datetime":return"datetime-local";default:return _||"text"}}),h={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},E=(_,k)=>{var B,v;let b=_;const y=h[f.value]||"",g=tt.parse(_,y);g&&((B=a.schema)!=null&&B.format?b=tt.format(g,(v=a.schema)==null?void 0:v.format):b=g.valueOf()),l(b,k)},A=(_,k)=>{_n(_)||(_=NaN),l(_,k)},u=_=>{let k=_;switch(a.schema.inputType){case"number":case"range":ua(parseFloat(_))&&(k=parseFloat(_));break}p.value=k,l(k,_)},C=_=>{p.value=_,l(_,_)},w=t.ref(null),I=()=>{var _;x(w.value)&&((_=w.value)==null||_.flush())};return t.onMounted(()=>{switch(f.value){case"number":case"range":w.value=et((_,k)=>{A(_,k)},parseInt($(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":w.value=et((_,k)=>{E(_,k)},parseInt($(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}}),t.onBeforeMount(()=>{f.value==="checkbox"?console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead."):f.value==="radio"?console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead."):f.value==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}),(_,k)=>{const b=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",am,[t.createVNode(b,t.mergeProps(_.$attrs,{id:t.unref(c)(e.schema),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint?e.hint:f.value==="color"||f.value==="range"?t.unref(p):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(p),name:e.schema.inputName,pattern:e.schema.pattern,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,"show-password-mask-toggle":f.value==="password",type:f.value,width:e.schema.width,onBlur:I,"onUpdate:modelValue":u}),null,16,["id","autocomplete","class","disabled","help","max","maxlength","min","minlength","model-value","name","pattern","placeholder","readonly","required","show-password-mask-toggle","type","width"]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(s)),{schema:e.schema,update:C,value:t.unref(p)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-899b626c"]]),rm={name:"FieldMetric",components:{AddIcon:Ee.AddIcon,TrashIcon:Ee.TrashIcon},mixins:[Ce],emits:["remove-item"],data(){return{contentVisible:!1}}},im={key:0,class:"content"};function lm(e,n,o,a,r,i){const s=t.resolveComponent("AddIcon"),l=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field-dropdown",{active:r.contentVisible}])},[t.createElementVNode("div",{class:"title",onClick:n[0]||(n[0]=m=>r.contentVisible=!r.contentVisible)},[t.createTextVNode(t.toDisplayString(e.model.name?e.model.name:"New Item")+" ",1),t.createVNode(s,{class:"metric-add-icon"})]),t.createVNode(t.Transition,{name:"slide-fade"},{default:t.withCtx(()=>[r.contentVisible?(t.openBlock(),t.createElementBlock("div",im,[t.renderSlot(e.$slots,"default"),t.createVNode(c,{appearance:"tertiary",class:"metric-remove-button",onClick:n[1]||(n[1]=m=>e.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(l)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const Ca=P(rm,[["render",lm]]),sm={class:"field-object-container"},dm={key:1},cm=["id"],mm={key:0},um=["onUpdate:modelValue"],fm={key:1},hm=["onUpdate:modelValue"],pm={key:2},gm=["onUpdate:modelValue"],ym=["onClick"],wa=P(Object.assign({mixins:[Ce],emits:["modelUpdated"],expose:["validate","clearValidationErrors","schema"],data(){return{attributes:this.schema?this.schema.attributes:void 0,newKeyType:"string",newKeyName:"",keyTypes:{}}},created(){this.value||(this.value={})},mounted(){if(!this.value)return;const e=Object.keys(this.value),n={};for(let o=0;o<e.length;o++){const a=e[o];n[a]=typeof this.value[a]}this.keyTypes=n},methods:{removeElement(e){const n=this.value;delete n[e],this.value=JSON.parse(JSON.stringify(n));const o=this.keyTypes;delete o[e],this.keyTypes=JSON.parse(JSON.stringify(o))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""},updateModel(e,n){this.$emit("modelUpdated",e,n)}}},{__name:"FieldObject",setup(e){return(n,o)=>{const a=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",sm,[n.schema.schema?(t.openBlock(),t.createBlock(Y,{key:0,model:n.value,options:n.formOptions,schema:n.schema.schema,onModelUpdated:n.updateModel},null,8,["model","options","schema","onModelUpdated"])):(t.openBlock(),t.createElementBlock("div",dm,[t.createElementVNode("table",{id:n.getFieldID(n.schema),class:t.normalizeClass(n.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(r,i)=>(t.openBlock(),t.createElementBlock("tr",{key:i},[t.createElementVNode("td",null,t.toDisplayString(i),1),n.keyTypes[i]==="string"?(t.openBlock(),t.createElementBlock("td",mm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,type:"text"},null,8,um),[[t.vModelText,n.value[i]]])])):t.createCommentVNode("",!0),n.keyTypes[i]==="boolean"?(t.openBlock(),t.createElementBlock("td",fm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,type:"checkbox"},null,8,hm),[[t.vModelCheckbox,n.value[i]]])])):t.createCommentVNode("",!0),n.keyTypes[i]==="number"?(t.openBlock(),t.createElementBlock("td",pm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,type:"number"},null,8,gm),[[t.vModelText,n.value[i]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:s=>n.removeElement(i)},null,8,ym)])]))),128))],10,cm),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=r=>n.newKeyType=r)},[...o[3]||(o[3]=[t.createElementVNode("option",{value:"string"}," String ",-1),t.createElementVNode("option",{value:"number"}," Number ",-1),t.createElementVNode("option",{value:"boolean"}," Boolean ",-1)])],512),[[t.vModelSelect,n.newKeyType]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=r=>n.newKeyName=r),type:"text"},null,512),[[t.vModelText,n.newKeyName]]),t.createElementVNode("input",{type:"button",value:"Add key",onClick:o[2]||(o[2]=(...r)=>n.addKey&&n.addKey(...r))})]))])),[[a,n.attributes]])}}}),[["__scopeId","data-v-6eddb0ed"]]),bm=["id"],_m=["data-testid"],Em={class:"item-wrapper"},Tm={class:"index-wrapper"},Sm={key:0},Cm={key:1},wm=["onUpdate:modelValue","placeholder","type","onInput"],km={key:0,class:"hint"},Am={class:"input-item"},Mm=["placeholder"],Nm={key:0,class:"hint"},ka=P(Object.assign({mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{newKeyName:""}},computed:{subSchema(){return this.schema.schema&&this.schema.schema.fields[0].schema},subFields(){return!this.subSchema&&this.schema.fields},hasObjectKeys(){return this.value&&Object.keys(this.value).length>0},transformedModel(){return this.subSchema&&this.subSchema.fields.length>=1&&this.subSchema.fields[0].type==="array"?new Proxy(this.model[this.schema.model],{get:(e,n)=>({[this.schema.model]:e[n]}),set:(e,n,o)=>e[n]=o[this.schema.model]}):this.model[this.schema.model]},valueInputType(){var e;return["number","integer"].includes((e=this.schema.values)==null?void 0:e.type)?"number":"text"}},mounted(){this.value||(this.value={});let e=[];this.subSchema?e=this.subSchema.fields:this.subFields&&(e=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,e,this.schema.model)},methods:{removeElement(e){const n=this.value;delete n[e],this.value={...n}},transformMapModelValuesToObject(e,n,o){let a={};try{a=JSON.parse(JSON.stringify(e??{}))[o]??{}}catch{}return Object.keys(e).map(r=>{const i=r.indexOf(o+"-");if(i>-1&&Array.isArray(n))if(n.length>0){const l=r.split("-").filter(m=>n.find(p=>p.model===m)),c=r.split(`-${l}`)[0].split(`${o}-`)[1];l.length?a[c]={...a[c],[l]:e[r]}:a[r.substring(i+`${o}-`.length)]=e[r]}else a[r.substring(`${o}-`.length)]=e[r];else{const l=r.split("-").filter(m=>m===this.schema.model),c=r.split(`-${l}`)[0].split(`${o}-`)[1];c&&(a[c]=e[r])}return r}),a},addKey(){var a;const e=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",n=((a=this.schema.values)==null?void 0:a.default)??(this.valueInputType==="number"?0:""),o=this.subSchema?e?[""]:{}:n;this.value[this.newKeyName]=o,this.newKeyName=""},updateModel(e,n){this.$emit("model-updated",this.model[this.schema.model],n)}}},{__name:"FieldObjectAdvanced",setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{id:n.getFieldID(n.schema),class:t.normalizeClass(["object-advanced-wrapper",n.schema.fieldClasses])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(r,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,"data-testid":`field-object-key-${i}`},[t.createElementVNode("div",null,[t.createElementVNode("div",Em,[t.createElementVNode("div",Tm,[t.createElementVNode("strong",null,t.toDisplayString(i),1),t.createElementVNode("div",null,[t.createVNode(a,{appearance:"tertiary",class:"delete",icon:"",type:"button",onClick:s=>n.removeElement(i)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.TrashIcon))]),_:1},8,["onClick"])])]),o[1]||(o[1]=t.createElementVNode("hr",{class:"divider"},null,-1)),n.subSchema?(t.openBlock(),t.createElementBlock("div",Sm,[t.createVNode(Y,{model:n.transformedModel[i],options:{helpAsHtml:!0},schema:n.subSchema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",Cm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:n.valueInputType,onInput:s=>n.updateModel(n.value[i],n.model[n.schema.model])},null,40,wm),[[t.vModelDynamic,n.value[i]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",km,t.toDisplayString(n.schema.fields[0].schema.hint),1)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.autofillSlot),{schema:n.schema.fields&&n.schema.fields[0].schema||n.schema.values,update:s=>n.value[i]=s,value:n.value[i]},null,8,["schema","update","value"]))])),o[2]||(o[2]=t.createElementVNode("hr",{class:"wide-divider"},null,-1))])])],8,_m))),128)),t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper",{indent:n.hasObjectKeys}])},[t.createElementVNode("div",Am,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=r=>n.newKeyName=r),class:"form-control","data-testid":"keyname-input",placeholder:n.schema.placeholder,type:"text"},null,8,Mm),[[t.vModelText,n.newKeyName]]),t.createVNode(a,{appearance:"tertiary","data-testid":"add-key",disabled:!n.newKeyName,onClick:n.addKey},{default:t.withCtx(()=>[t.createTextVNode(" + Add "+t.toDisplayString(n.schema.buttonLabel||n.schema.label),1)]),_:1},8,["disabled","onClick"])]),n.schema.hintText?(t.openBlock(),t.createElementBlock("p",Nm,t.toDisplayString(n.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,bm)}}}),[["__scopeId","data-v-0faeec4d"]]),Im={class:"radio-selection-group"},Aa=P(t.defineComponent({__name:"FieldRadio",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRefs(a),{updateModelValue:s,value:l,clearValidationErrors:c}=_e.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:p=>{r("modelUpdated",p.value,p.model)}});n({clearValidationErrors:c});const m=p=>{let f=p;typeof p=="string"&&(f=p.split(","),a.schema.array||(f=f.toString())),s(f,p)};return(p,f)=>{const h=t.resolveComponent("KRadio");return t.openBlock(),t.createElementBlock("div",Im,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(E,A)=>(t.openBlock(),t.createBlock(h,{id:e.schema.name+"-"+A,key:E.value,modelValue:t.unref(l),"onUpdate:modelValue":f[0]||(f[0]=u=>t.isRef(l)?l.value=u:null),label:E.name,"label-attributes":{info:e.schema.help},name:e.schema.name,required:e.schema.required||void 0,"selected-value":E.value,onChange:m},null,8,["id","modelValue","label","label-attributes","name","required","selected-value"]))),128))])}}}),[["__scopeId","data-v-42b9c6ac"]]),Ma=t.defineComponent({__name:"FieldSelect",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.computed(()=>a.schema.selectOptions||{}),s=u=>G(u)?null:u,l=t.toRefs(a),{getFieldID:c,clearValidationErrors:m,value:p}=_e.useAbstractFields({model:l.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:s,emitModelUpdated:u=>{r("modelUpdated",u.value,u.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{const u=a.schema.values;return h(typeof u=="function"?u.apply(this,[a.model,a.schema]):u)}),h=u=>{const C=[];return u.forEach(w=>{C.push({label:A(w),value:E(w),disabled:typeof w=="object"&&w.disabled||void 0,group:typeof w=="object"&&String(w.group||"").toUpperCase()||void 0})}),C},E=u=>{if(fe(u)){if(i.value&&typeof i.value.value<"u")return u[i.value.value];if(typeof u.id<"u")return String(u.id);throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return u},A=u=>{if(fe(u)){if(i.value&&typeof i.value.name<"u")return u[i.value.name];if(typeof u.name<"u")return String(u.name);throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return String(u)};return(u,C)=>{const w=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(w,{id:t.unref(c)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":C[0]||(C[0]=I=>t.isRef(p)?p.value=I:null),class:t.normalizeClass(e.schema.fieldClasses),clearable:!e.schema.required,disabled:e.disabled||void 0,items:f.value,"kpop-attributes":{"data-testid":`${t.unref(c)(e.schema)}-items`},"label-attributes":{info:e.schema.help},name:e.schema.inputName,placeholder:i.value.hideNoneSelectedText?void 0:i.value.noneSelectedText||"Nothing Selected",required:e.schema.required||void 0,width:"100%"},null,8,["id","modelValue","class","clearable","disabled","items","kpop-attributes","label-attributes","name","placeholder","required"])}}}),Om={class:"field-string-array"},Na=P(t.defineComponent({__name:"FieldStringArray",props:{formOptions:{},model:{},schema:{}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=o,{updateModelValue:r,getFieldID:i,getLabelId:s,clearValidationErrors:l,value:c}=_e.useAbstractFields({model:t.toRef(()=>e.model),schema:e.schema,formOptions:e.formOptions,emitModelUpdated:E=>{a("modelUpdated",E.value,E.model)}});n({clearValidationErrors:l});const m=t.ref("");function p(E){return Array.isArray(E)?E.map(A=>String(A).trim()).filter(Boolean).join(", "):""}function f(E){return E?E.trim().split(",").map(A=>A.trim()).filter(Boolean):[]}function h(E){m.value=E;const A=f(E);r(A,c.value)}return t.watch(c,E=>{const A=E?p(E):"";p(f(m.value))!==A&&(m.value=A)},{immediate:!0}),(E,A)=>{const u=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Om,[t.createVNode(u,t.mergeProps(E.$attrs,{id:t.unref(i)(e.schema),"aria-labelledby":t.unref(s)(e.schema),class:e.schema.fieldClasses,help:"Use comma to separate values. eg: value1, value2","model-value":m.value,placeholder:e.schema.placeholder||"Comma separated values",type:"text","onUpdate:modelValue":h}),null,16,["id","aria-labelledby","class","model-value","placeholder"])])}}}),[["__scopeId","data-v-cf2eff67"]]),Vm={name:"FieldArray",components:{FieldArrayItem:ga,FieldArrayMultiItem:ya,FieldSelect:Ma,FieldMetric:Ca,FieldObject:wa,FieldObjectAdvanced:ka,FieldAutoSuggest:Ea,FieldAutoSuggestLegacy:Ta,FieldRadio:Aa,FieldArrayCardContainer:pa,FieldInput:Sa,FieldStringArray:Na,TrashIcon:Ee.TrashIcon},mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},emits:["refreshModel"],methods:{generateSchema(e,n,o){var r,i,s;let a;return n&&(a=JSON.parse(JSON.stringify(n)),(s=(i=(r=a.schema)==null?void 0:r.fields)==null?void 0:i.map)==null||s.call(i,l=>(l.id=`${l.id||l.model}-${o}`,l))),{...a,set(l,c){e[o]=c},get(){return e[o]}}},newElement(){let e=this.value,n;(!e||!e.push)&&(e=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?n=this.schema.items.default():n=this.schema.items.default),e.push(n),this.value=[...e]},removeElement(e){this.value=this.value.filter((n,o)=>o!==e)},getFieldComponent(e){return e.component?e.component:"field-"+e.type},modelUpdated(){this.$emit("refreshModel")},handleInput(e,n){var a,r;let o=e;((r=(a=this.schema)==null?void 0:a.inputAttributes)==null?void 0:r.type)==="number"&&_n(parseFloat(e))&&(o=parseFloat(e)),this.value=this.value.map((i,s)=>s===n?o:i)},isStringArrayItems(){var n,o;const e=(n=this.schema)==null?void 0:n.elements;return e?e.type==="array"&&((o=e.elements)==null?void 0:o.type)==="string":!1},generateStringArraySchema(e){var n;return{model:String(e),id:`${this.schema.id||this.schema.model}-${e}`,placeholder:this.schema.placeholder,help:this.schema.help,fieldClasses:(n=this.schema.inputAttributes)==null?void 0:n.class,get:()=>this.value[e]}},handleStringArrayUpdate(e,n){this.value=this.value.map((o,a)=>a===n?e:o),this.$emit("refreshModel")}}},Bm=["id"],Fm={key:0,class:"string-array-item"},Rm={key:2},Dm=["onUpdate:modelValue","aria-labelledby","type"],Lm=["onUpdate:modelValue","aria-labelledby"];function Um(e,n,o,a,r,i){const s=t.resolveComponent("FieldStringArray"),l=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton"),m=t.resolveComponent("KTextArea"),p=t.resolveComponent("KInput");return e.schema?(t.openBlock(),t.createElementBlock("div",{key:0,id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(f,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,class:t.normalizeClass(e.schema.fieldItemsClasses)},[i.isStringArrayItems()?(t.openBlock(),t.createElementBlock("div",Fm,[t.createVNode(s,{"form-options":e.formOptions,model:e.value,schema:i.generateStringArraySchema(h),onModelUpdated:E=>i.handleStringArrayUpdate(E,h)},null,8,["form-options","model","schema","onModelUpdated"]),t.createVNode(c,{appearance:"tertiary",class:"string-array-remove-btn",icon:"",onClick:E=>i.removeElement(h)},{default:t.withCtx(()=>[t.createVNode(l,{decorative:""})]),_:1},8,["onClick"])])):e.schema.items&&e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:1,index:h,model:f,schema:i.generateSchema(e.value,e.schema.items,h),onRemoveItem:E=>i.removeElement(h)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:f,schema:i.generateSchema(e.value,e.schema.items,h),onModelUpdated:i.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["index","model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",Rm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:f,schema:i.generateSchema(e.value,e.schema.items,h),onModelUpdated:i.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:3,"data-testid":`${e.getFieldID(e.schema)}-item-${h}`,model:f,schema:i.generateSchema(e.value,e.schema.items,h),onRemoveItem:E=>i.removeElement(h)},{after:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.autofillSlot),{schema:e.schema,update:E=>e.value[h]=E,value:e.value[h]},null,8,["schema","update","value"]))]),default:t.withCtx(()=>{var E;return[e.schema.inputAttributes&&e.schema.inputAttributes.type==="textarea"?(t.openBlock(),t.createBlock(m,t.mergeProps({key:0,ref_for:!0},e.schema.inputAttributes,{id:e.getFieldID(e.schema),modelValue:e.value[h],"onUpdate:modelValue":A=>e.value[h]=A,"aria-labelledby":e.getLabelId(e.schema),autosize:"","character-limit":e.schema.inputAttributes.max,class:e.schema.fieldClasses,maxlength:e.schema.max,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,resizable:"",rows:e.schema.rows||3}),null,16,["id","modelValue","onUpdate:modelValue","aria-labelledby","character-limit","class","maxlength","minlength","name","placeholder","readonly","required","rows"])):!e.schema.inputAttributes||!e.schema.inputAttributes.type||e.schema.inputAttributes.type==="text"||e.schema.inputAttributes.type==="number"?(t.openBlock(),t.createBlock(p,t.mergeProps({key:1,"aria-labelledby":e.getLabelId(e.schema)},{ref_for:!0},e.schema.inputAttributes,{"model-value":e.value[h],type:e.schema.inputAttributes&&e.schema.inputAttributes.type||"text",onInput:A=>{i.handleInput(A,h)}}),null,16,["aria-labelledby","model-value","type","onInput"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,"onUpdate:modelValue":A=>e.value[h]=A,"aria-labelledby":e.getLabelId(e.schema)},{ref_for:!0},e.schema.inputAttributes,{type:((E=e.schema.inputAttributes)==null?void 0:E.type)||"text"}),null,16,Dm)),[[t.vModelDynamic,e.value[h]]])]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.withDirectives(t.createElementVNode("input",t.mergeProps({ref_for:!0},e.schema.inputAttributes,{"onUpdate:modelValue":E=>e.value[h]=E,"aria-labelledby":e.getLabelId(e.schema),type:"text"}),null,16,Lm),[[t.vModelText,e.value[h]]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.autofillSlot),{schema:e.schema,update:E=>e.value[h]=E,value:e.value[h]},null,8,["schema","update","value"]))],64))],2))),128)),t.createVNode(c,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`add-${e.getFieldID(e.schema)}`,type:"button",onClick:i.newElement},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel||o.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,Bm)):t.createCommentVNode("",!0)}const Pm=P(Vm,[["render",Um],["__scopeId","data-v-83ea3503"]]),$m={class:"form-field-wrapper field-checkbox"},xm=P(t.defineComponent({__name:"FieldCheckbox",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRefs(a),{getFieldID:s,value:l,clearValidationErrors:c}=_e.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:m=>{r("modelUpdated",m.value,m.model)}});return n({clearValidationErrors:c}),(m,p)=>{const f=t.resolveComponent("KCheckbox");return t.openBlock(),t.createElementBlock("div",$m,[t.createVNode(f,t.mergeProps(m.$attrs,{id:t.unref(s)(e.schema),modelValue:t.unref(l),"onUpdate:modelValue":p[0]||(p[0]=h=>t.isRef(l)?l.value=h:null),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint?e.hint:void 0,name:e.schema.inputName,readonly:e.schema.readonly,required:e.schema.required,width:e.schema.width}),null,16,["id","modelValue","autocomplete","class","disabled","help","name","readonly","required","width"])])}}}),[["__scopeId","data-v-6b4ee1cd"]]),vm={class:"wrapper"},jm=["disabled"],qm=["id","checked","disabled","onChange","name"],zm=["disabled"],Km={class:"info"},Hm={class:"dropList"},Ym=["id","checked","disabled","onChange","name"];function Gm(e,n,o,a,r,i){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",vm,[e.schema.listBox?(t.openBlock(),t.createElementBlock("div",{key:0,class:"listbox form-control",disabled:e.disabled||null},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.items,l=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":i.isItemChecked(l)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:i.isItemChecked(l)||null,disabled:e.disabled||null,onChange:c=>i.onChanged(c,l),name:i.getInputName(l)},null,40,qm),[[s,"input"]]),t.createTextVNode(t.toDisplayString(i.getItemName(l)),1)])],2))),256))],8,jm)):t.createCommentVNode("",!0),e.schema.listBox?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:"combobox form-control",disabled:e.disabled||null},[t.createElementVNode("div",{class:t.normalizeClass(["mainRow",{expanded:r.comboExpanded}]),onClick:n[0]||(n[0]=(...l)=>i.onExpandCombo&&i.onExpandCombo(...l))},[t.createElementVNode("div",Km,t.toDisplayString(i.selectedCount)+" selected",1),n[1]||(n[1]=t.createElementVNode("div",{class:"arrow"},null,-1))],2),t.createElementVNode("div",Hm,[r.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.items,l=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":i.isItemChecked(l)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:i.isItemChecked(l)||null,disabled:e.disabled||null,onChange:c=>i.onChanged(c,l),name:i.getInputName(l)},null,40,Ym),[[s,"input"]]),t.createTextVNode(t.toDisplayString(i.getItemName(l)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,zm))])),[[s,"wrapper"]])}const Wm=P({mixins:[Ce],data(){return{comboExpanded:!1}},computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(e){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?Ko(this.schema.inputName+"_"+this.getItemValue(e)):Ko(this.getItemValue(e))},getItemValue(e){if(fe(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return e[this.schema.checklistOptions.value];if(typeof e.value<"u")return e.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},getItemName(e){if(fe(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return e[this.schema.checklistOptions.name];if(typeof e.name<"u")return e.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},isItemChecked(e){return this.value&&this.value.indexOf(this.getItemValue(e))!==-1},onChanged(e,n){if((G(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const o=ba(this.value);o.push(this.getItemValue(n)),this.value=o}else{const o=ba(this.value);o.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",Gm]]),Zm={name:"FieldKeyValuePairs",components:{TrashIcon:Ee.TrashIcon},mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},data(){return{pairs:[]}},watch:{pairs:{handler(){this.updateValue()},deep:!0}},created(){var n,o;this.value||(this.value={});const e=((o=this.model)==null?void 0:o[(n=this.schema)==null?void 0:n.model])??{};Object.keys(e).forEach(a=>{this.pairs.push({key:a,value:e[a]})})},methods:{onInput(e,n,o){this.pairs[n][o]=e.target.value},updateValue(){this.value=this.pairs.reduce((e,{key:n,value:o})=>({...e,...n&&o?{[n]:o}:null}),{})},addPair(){this.pairs.push({key:"",value:""})},removePair(e){this.pairs.splice(e,1)}}},Xm={class:"key-value-pairs-editor"},Jm={class:"pair-item-cell"},Qm=["data-testid","placeholder","value","onInput"],eu={class:"pair-item-cell"},tu=["data-testid","placeholder","value","onInput"];function nu(e,n,o,a,r,i){const s=t.resolveComponent("TrashIcon"),l=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Xm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.pairs,(c,m)=>(t.openBlock(),t.createElementBlock("div",{key:m,class:"pair-item"},[t.createElementVNode("div",Jm,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-key-${m}`,placeholder:e.schema.keyInputPlaceholder??"Key",type:"text",value:c.key,onInput:p=>{i.onInput(p,m,"key")}},null,40,Qm),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.autofillSlot),{schema:e.schema,update:p=>i.onInput({target:{value:p}},m,"key"),value:c.key},null,8,["schema","update","value"]))]),t.createElementVNode("div",eu,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-value-${m}`,placeholder:e.schema.valueInputPlaceholder??"Value",type:"text",value:c.value,onInput:p=>{i.onInput(p,m,"value")}},null,40,tu),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.autofillSlot),{schema:e.schema,update:p=>i.onInput({target:{value:p}},m,"value"),value:c.value},null,8,["schema","update","value"]))]),t.createVNode(l,{appearance:"tertiary","data-testid":`${e.getFieldID(e.schema)}-remove-pair-${m}`,onClick:()=>{i.removePair(m)}},{default:t.withCtx(()=>[t.createVNode(s)]),_:1},8,["data-testid","onClick"])]))),128)),t.createVNode(l,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`${e.getFieldID(e.schema)}-add-pair`,type:"button",onClick:i.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const ou=P(Zm,[["render",nu],["__scopeId","data-v-9a9650ac"]]),au=P(t.defineComponent({__name:"FieldLabel",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0}},setup(e){const n=e,o=t.toRefs(n),{getFieldID:a,value:r}=_e.useAbstractFields({model:o.model,schema:n.schema,formOptions:n.formOptions});return(i,s)=>{const l=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(l,{id:t.unref(a)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)),1)]),_:1},8,["id"])],2)}}}),[["__scopeId","data-v-d046a15a"]]),ru=t.defineComponent({__name:"FieldMultiselect",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRef(a,"model"),{getLabelId:s,getFieldID:l,clearValidationErrors:c,value:m}=_e.useAbstractFields({model:i,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:f=>{r("modelUpdated",f.value,f.model)}});n({clearValidationErrors:c});const p=t.computed(()=>{var f,h;return a.schema.values?a.schema.values:(h=(f=a.schema.elements)==null?void 0:f.one_of)!=null&&h.length?a.schema.elements.one_of.map(E=>({label:String(E),value:String(E)})):[]});return(f,h)=>{const E=t.resolveComponent("KMultiselect");return t.openBlock(),t.createBlock(E,{id:t.unref(l)(e.schema),modelValue:t.unref(m),"onUpdate:modelValue":h[0]||(h[0]=A=>t.isRef(m)?m.value=A:null),"aria-labelledby":t.unref(s)(e.schema),class:t.normalizeClass(e.schema.fieldClasses),"data-testid":"field-multiselect",disabled:e.disabled||void 0,items:p.value,"kpop-attributes":{"data-testid":`${t.unref(l)(e.schema)}-items`},"label-attributes":{info:e.schema.help},name:e.schema.inputName,placeholder:e.schema.placeholder,required:e.schema.required||void 0,width:"100%"},null,8,["id","modelValue","aria-labelledby","class","disabled","items","kpop-attributes","label-attributes","name","placeholder","required"])}}}),iu={class:"selection-group"},lu={class:"form-group horizontal-radios"},su={class:"radio-group"},du=["disabled","value"],cu={class:"control-help"},mu={key:0,class:"option-field"},uu={class:"option-field-container"},fu=P(Object.assign({mixins:[Ce],emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{checkedGroup:null,fieldModel:{...this.model},renderedTrack:[],fieldSchema:[],scope:"scope"}},watch:{checkedGroup:{handler(e,n){if(this.renderedTrack[e]=!0,n===null){this.fieldModel={...this.model};return}const o=this.schema.fields[e].fields,a=this.schema.fields[n].fields;a&&a.forEach(r=>this.updateModel("",r.model)),o&&o.forEach(r=>this.updateModel(this.fieldModel[r.model],r.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((e,n)=>{this.renderedTrack.push(!1),e.fields&&e.fields.forEach(o=>{var a;this.model[o.model]&&(this.checkedGroup=n,this.fieldSchema.push(o.model),this.scope=(a=o.label)==null?void 0:a.toLowerCase())})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(e,n){this.$emit("model-updated",e,n)}}},{__name:"FieldSelectionGroup",setup(e){const{t:n}=ue.createI18n("en-us",pe);return(o,a)=>(t.openBlock(),t.createElementBlock("div",iu,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.$props.disabled?"k-tooltip":"div"),{"max-width":"300",text:t.unref(n)("general.disable_global_radio",{scope:o.scope})},{default:t.withCtx(()=>[t.createElementVNode("div",lu,[t.createElementVNode("div",su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.schema.fields,(r,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:t.normalizeClass(["option-group",{"radio-disabled":o.$props.disabled}])},[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${r.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=s=>o.checkedGroup=s),class:"k-input",disabled:o.$props.disabled,type:"radio",value:i},null,8,du),[[t.vModelRadio,o.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(r.label)+" ",1),t.createElementVNode("div",cu,t.toDisplayString(r.description),1)],2)],2))),128))])])]),_:1},8,["text"])),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.schema.fields,(r,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:"option-group"},[o.renderedTrack[i]?t.withDirectives((t.openBlock(),t.createElementBlock("div",mu,[t.createElementVNode("div",uu,[t.createVNode(Y,{model:o.model,options:{helpAsHtml:!0},schema:{fields:r.fields},onModelUpdated:o.updateModel},null,8,["model","schema","onModelUpdated"])])],512)),[[t.vShow,r.fields&&o.checkedGroup===i]]):t.createCommentVNode("",!0)]))),128))]))}}),[["__scopeId","data-v-a536356c"]]),hu={class:"form-field-wrapper"},pu=t.defineComponent({__name:"FieldSwitch",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,{t:i}=ue.createI18n("en-us",pe),s=h=>h!=null&&a.schema.valueOn?h===a.schema.valueOn:h,l=h=>h!=null&&a.schema.valueOn?h?a.schema.valueOn:a.schema.valueOff:h,c=t.toRefs(a),{getFieldID:m,value:p,clearValidationErrors:f}=_e.useAbstractFields({model:c.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:s,formatValueToModel:l,emitModelUpdated:h=>{r("modelUpdated",h.value,h.model)}});return n({clearValidationErrors:f}),(h,E)=>{const A=t.resolveComponent("KInputSwitch");return t.openBlock(),t.createElementBlock("div",hu,[t.createVNode(A,{id:t.unref(m)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":E[0]||(E[0]=u=>t.isRef(p)?p.value=u:null),autocomplete:e.schema.autocomplete,class:t.normalizeClass(e.schema.fieldClasses),disabled:e.disabled||void 0,label:t.unref(p)?e.schema.textOn||t.unref(i)("vfg.labels.on"):e.schema.textOff||t.unref(i)("vfg.labels.off"),"label-attributes":{info:e.schema.help},name:e.schema.inputName,required:e.schema.required||void 0},null,8,["id","modelValue","autocomplete","class","disabled","label","label-attributes","name","required"])])}}}),gu={class:"field-textarea"},yu={name:"FormGroup",components:Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:Cc,FieldArray:Pm,FieldArrayCardContainer:pa,FieldArrayItem:ga,FieldArrayMultiItem:ya,FieldAutoSuggest:Ea,FieldAutoSuggestLegacy:Ta,FieldCheckbox:xm,FieldChecklist:Wm,FieldInput:Sa,FieldKeyValuePairs:ou,FieldLabel:au,FieldMetric:Ca,FieldMultiselect:ru,FieldObject:wa,FieldObjectAdvanced:ka,FieldRadio:Aa,FieldSelect:Ma,FieldSelectionGroup:fu,FieldStringArray:Na,FieldSwitch:pu,FieldTextArea:P(t.defineComponent({__name:"FieldTextArea",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,r=o,i=t.toRefs(a),s=t.inject(he,void 0),{updateModelValue:l,getFieldID:c,clearValidationErrors:m,value:p}=_e.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:h=>{r("modelUpdated",h.value,h.model)}});n({clearValidationErrors:m});const f=h=>{p.value=h,l(h,h)};return(h,E)=>{const A=t.resolveComponent("KTextArea");return t.openBlock(),t.createElementBlock("div",gu,[t.createVNode(A,t.mergeProps(h.$attrs,{id:t.unref(c)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":E[0]||(E[0]=u=>t.isRef(p)?p.value=u:null),autosize:"","character-limit":e.schema.max??!1,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint||void 0,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,resizable:"",rows:e.schema.rows||3}),null,16,["id","modelValue","character-limit","class","disabled","help","minlength","name","placeholder","readonly","required","rows"]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(s)),{schema:e.schema,update:f,value:t.unref(p)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-609c18d6"]])},Symbol.toStringTag,{value:"Module"})),mixins:[Ho],inject:{"vfg-array-item-index":{default:void 0}},props:{vfg:{type:Object,required:!0},model:{type:Object,default:()=>{}},options:{type:Object,default:()=>{}},field:{type:Object,required:!0},errors:{type:Array,default(){return[]}}},emits:["validated","modelUpdated","refreshModel"],data(){return{child:t.ref()}},computed:{schema(){var n;if(!((n=this.field)!=null&&n.schema)||!Array.isArray(this.field.schema.fields))return this.field;const e=this["vfg-array-item-index"];return typeof e!="number"||Number.isNaN(e)?this.field:{...this.field,schema:{...this.field.schema,fields:this.field.schema.fields.map(o=>({...o,...o.id?{id:`${o.id}-${e}`}:void 0}))}}}},methods:{sanitize(e){return Ol.sanitize(e)},fieldTypeHasLabel(e){if(G(e.label))return!1;let n="";switch(e.type==="input"?n=e.inputType:n=e.type,n){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(e){const n=$(this.options,"fieldIdPrefix","");return gn(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldComponent(e){return e.component?e.component:"field-"+e.type},getButtonType(e){return $(e,"type","button")},onFieldValidated(e,n,o){this.$emit("validated",e,n,o)},buttonVisibility(e){return e.buttons&&e.buttons.length>0},buttonClickHandler(e,n,o){return e.onclick.call(this,this.model,n,o,this)},fieldHint(e){return x(e.hint)?e.hint.call(this,this.model,e,this):e.hint},fieldErrors(e){return this.errors.filter(n=>n.field.fieldName===e.fieldName).map(n=>n.error)},onRefreshModel(){this.$emit("refreshModel")},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e){return this.$refs.child.validate(e)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(e){return e?e.replace(/^[cC]onfig\./,""):""}}},bu=["innerHTML"],_u={class:"icon-wrapper"},Eu={key:0,class:"link-wrapper"},Tu={class:"field-wrap"},Su={key:0,class:"buttons"},Cu=["type","onClick","textContent"],wu={key:1,class:"hint"},ku={key:2,class:"errors help-block"};function Au(e,n,o,a,r,i){const s=t.resolveComponent("KExternalLink"),l=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-group",e.getFieldRowClasses(o.field)])},[i.fieldTypeHasLabel(o.field)?(t.openBlock(),t.createBlock(l,{key:0,"aria-describedby":o.field.help?i.getTooltipId(o.field):void 0,class:t.normalizeClass([o.field.labelClasses,"form-group-label"]),for:i.getFieldID(o.field),info:!o.options.helpAsHtml&&o.field.help?o.field.help:void 0,"tooltip-attributes":o.field.help?{maxWidth:"300",placement:"top",tooltipId:i.getTooltipId(o.field)}:void 0},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",_u,[t.createElementVNode("span",null,t.toDisplayString(i.formattedLabel(o.field.label)),1)]),o.field.link?(t.openBlock(),t.createElementBlock("div",Eu,[t.createVNode(s,{href:o.field.link},{default:t.withCtx(()=>[...n[0]||(n[0]=[t.createElementVNode("span",{class:"section-header"},"More info",-1)])]),_:1},8,["href"])])):t.createCommentVNode("",!0)]),_:2},[o.options.helpAsHtml&&o.field.help?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:i.sanitize(o.field.help)},null,8,bu)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",Tu,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.getFieldComponent(o.field)),t.mergeProps(e.$attrs,{ref:"child",disabled:e.fieldDisabled(o.field)||null,"form-options":o.options,hint:o.field.hint&&o.field.type==="input"?i.fieldHint(o.field):void 0,model:o.model,schema:i.schema,vfg:o.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated}),null,16,["disabled","form-options","hint","model","schema","vfg","onModelUpdated","onRefreshModel","onValidated"])),i.buttonVisibility(o.field)?(t.openBlock(),t.createElementBlock("div",Su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.field.buttons,(c,m)=>(t.openBlock(),t.createElementBlock("button",{key:m,class:t.normalizeClass(c.classes),type:i.getButtonType(c),onClick:p=>i.buttonClickHandler(c,o.field,p),textContent:t.toDisplayString(c.label)},null,10,Cu))),128))])):t.createCommentVNode("",!0)]),o.field.hint&&o.field.type!=="input"?(t.openBlock(),t.createElementBlock("div",wu,t.toDisplayString(i.fieldHint(o.field)),1)):t.createCommentVNode("",!0),i.fieldErrors(o.field).length>0?(t.openBlock(),t.createElementBlock("div",ku,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.fieldErrors(o.field),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m},t.toDisplayString(c),1))),128))])):t.createCommentVNode("",!0)],2)}const Ia=P(yu,[["render",Au],["__scopeId","data-v-fe02085f"]]);var Et=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(Et||{});const Mu=e=>{var n,o;return e.type===Et.REDIS_CE?"Host/Port":(n=e.config.sentinel_nodes)!=null&&n.length?"Sentinel":(o=e.config.cluster_nodes)!=null&&o.length?"Cluster":"Host/Port"},Nu={[Et.REDIS_CE]:"open source",[Et.REDIS_EE]:"enterprise"},Oa=e=>Nu[e]??"",Iu={class:"partial-config-card"},Ou={class:"config-card-row-label"},Vu={class:"label-text"},Bu=["data-testid"],Fu=["data-testid"],Ru={key:1},Du=["data-testid"],Lu=["data-testid"],Uu=P(t.defineComponent({__name:"RedisConfigCard",props:{configFields:{type:Object,required:!0},pluginRedisFields:{type:Array,required:!0}},setup(e){const{t:n,formatUnixTimeStamp:o}=ue.createI18n("en-us",pe),a={id:{order:1},name:{order:1},type:{label:n("redis.config_card.common_fields.type_label"),hidden:!0,type:"hidden"},created_at:{label:n("redis.config_card.common_fields.created_at_label"),formatter:o,order:2},updated_at:{label:n("redis.config_card.common_fields.updated_at_label"),formatter:o,order:3}},r=e,i=f=>f!=null,s=(f,h)=>i(h)&&["password","sentinel_password"].includes(f)?"password":"text",{convertKeyToTitle:l}=kt.useStringHelpers(),c=t.computed(()=>Object.entries(r.configFields).map(([f,h])=>{var E,A,u,C;return{key:f,label:((E=a[f])==null?void 0:E.label)??l(f),value:(A=a[f])!=null&&A.formatter?a[f].formatter(h):h,type:((u=a[f])==null?void 0:u.type)??s(f,h),order:((C=a[f])==null?void 0:C.order)??100}}).sort((f,h)=>f.order-h.order).filter(f=>f.type!=="hidden")),m=_e.useRedisNonStandardFields(r.configFields,r.pluginRedisFields),p=t.computed(()=>c.value.concat(m));return(f,h)=>{const E=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",Iu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,({key:A,label:u,value:C,type:w})=>(t.openBlock(),t.createElementBlock("div",{key:A,class:"partial-config-card-row"},[t.createElementVNode("div",Ou,[t.createElementVNode("div",Vu,t.toDisplayString(u),1)]),t.createElementVNode("div",{class:"config-card-row-value","data-testid":`${A}-property-value`},[i(C)?(t.openBlock(),t.createElementBlock("div",Ru,[w==="password"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${A}-copy-password`},[t.createVNode(E,{format:"redacted",text:String(C)},null,8,["text"])],8,Du)):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`${A}-plain-text`},t.toDisplayString(C),9,Lu))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${A}-no-value`}," – ",8,Fu))],8,Bu)]))),128))])}}}),[["__scopeId","data-v-40b3d7b5"]]),Pu={class:"redis-config-select","data-testid":"redis-config-select"},$u={class:"selected-redis-config"},xu=["data-testid"],vu={class:"select-item-name","data-testid":"selected-redis-config"},ju={class:"empty-redis-config","data-testid":"empty-redis-config"},qu={key:1,class:"redis-shared-config-error-message","data-testid":"redis-config-fetch-error"},zu="1000",Va=P(t.defineComponent({__name:"RedisConfigSelect",props:{defaultRedisConfigItem:{type:String,required:!1,default:""},updateRedisModel:{type:Function,required:!0},pluginRedisFields:{type:Array,required:!0},redisType:{type:String,default:"all"},isCustomPlugin:{type:Boolean,default:!1}},emits:["showNewPartialModal"],setup(e){const{t:n}=ue.createI18n("en-us",pe),o=t.inject(ao),a={konnect:{getOne:"/v2/control-planes/{controlPlaneId}/core-entities/partials/{id}",getAll:"/v2/control-planes/{controlPlaneId}/core-entities/partials"},kongManager:{getOne:"/{workspace}/partials/{id}",getAll:"/{workspace}/partials"}},r=e,i=t.ref(null),{getMessageFromError:s}=kt.useErrors(),l=t.inject(oo),{debouncedQueryChange:c,loading:m,error:p,loadItems:f,results:h}=kt.useDebouncedFilter(l,a[l.app].getAll,zu,{fetchedItemsKey:"data",searchKeys:["id","name"]}),E=t.computed(()=>p.value?s(p.value):""),A=I=>{let _=`${l.apiBaseUrl}${a[l.app].getOne}`;return l.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,(l==null?void 0:l.controlPlaneId)||""):l.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,l!=null&&l.workspace?`/${l.workspace}`:"")),_=_.replace(/{id}/gi,String(I)),_},u=t.computed(()=>{const I=(h.value||[]).map(_=>({label:_.id,name:_.name,value:_.id,type:_.type,tag:Mu(_)})).filter(_=>_.type==="redis-ce"||_.type==="redis-ee");return r.redisType!=="all"?I.filter(_=>_.type===r.redisType):I}),{axiosInstance:C}=kt.useAxios(l==null?void 0:l.axiosRequestConfig),w=async I=>{if(I){r.updateRedisModel(I);try{const _=await C.get(A(I));if(_.data.config){const k=Object.assign(_.data,_.data.config);delete k.config,i.value=k}}catch(_){console.error(_)}}};return t.watch(()=>o==null?void 0:o.value,async I=>{I&&await f()}),t.onBeforeMount(()=>{f(),r.defaultRedisConfigItem&&w(r.defaultRedisConfigItem)}),(I,_)=>{const k=t.resolveComponent("KLabel"),b=t.resolveComponent("KBadge"),y=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Pu,[t.createVNode(k,{info:e.isCustomPlugin?t.unref(n)("redis.custom_plugin.tooltip"):t.unref(n)("redis.shared_configuration.tooltip",{type:t.unref(Oa)(e.redisType)}),"tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("redis.shared_configuration.title")),1)]),_:1},8,["info"]),_[2]||(_[2]=t.createElementVNode("div",{class:"shared-redis-config-title"},null,-1)),t.createVNode(y,{class:"redis-config-select-trigger","data-testid":"redis-config-select-trigger","enable-filtering":"","filter-function":()=>!0,items:u.value,loading:t.unref(m),"model-value":e.defaultRedisConfigItem,placeholder:t.unref(n)("redis.shared_configuration.selector.placeholder"),onChange:_[1]||(_[1]=g=>w(g==null?void 0:g.value)),onQueryChange:t.unref(c)},{"selected-item-template":t.withCtx(({item:g})=>[t.createElementVNode("div",$u,t.toDisplayString(g.name),1)]),"item-template":t.withCtx(({item:g})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${g.name}`},[t.createElementVNode("span",vu,t.toDisplayString(g.name),1),t.createVNode(b,{appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.tag),1)]),_:2},1024)],8,xu)]),empty:t.withCtx(()=>[t.createElementVNode("div",ju,t.toDisplayString(t.unref(n)("redis.shared_configuration.empty_state")),1)]),"dropdown-footer-text":t.withCtx(()=>[t.createElementVNode("div",{class:"new-redis-config-area","data-testid":"new-redis-config-area",onClick:_[0]||(_[0]=g=>I.$emit("showNewPartialModal"))},[t.createVNode(t.unref(Ee.AddIcon),{size:t.unref(Oc)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("redis.shared_configuration.create_new_configuration",{type:t.unref(Oa)(e.redisType)})),1)])]),_:1},8,["items","loading","model-value","placeholder","onQueryChange"])]),i.value?(t.openBlock(),t.createBlock(Uu,{key:0,"config-fields":i.value,"plugin-redis-fields":e.pluginRedisFields},null,8,["config-fields","plugin-redis-fields"])):t.createCommentVNode("",!0),E.value?(t.openBlock(),t.createElementBlock("p",qu,t.toDisplayString(E.value||t.unref(n)("redis.shared_configuration.error")),1)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-31a7151d"]]),Ku={key:0},Hu={class:"redis-config-radio-group","data-testid":"redis-config-radio-group"},Yu={key:0,class:"shared-redis-config"},Gu={key:1,class:"dedicated-redis-config"},Wu={class:"dedicated-redis-config-title"},Zu={name:"VueFormGenerator",components:{formGroup:Ia,formRedis:P(t.defineComponent({__name:"FormRedis",props:{tag:{type:String,default:"fieldset",validator:function(e){return e.length>0}},model:{type:Object,default:()=>{}},options:{type:Object,required:!0},field:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default(){return[]}},redisPath:{type:String,default:void 0,required:!1},isEditing:{type:Boolean,default:!1}},emits:["modelUpdated","partialToggled","showNewPartialModal","refreshModel","validated"],setup(e,{emit:n}){const o=e,a=n,{t:r}=ue.createI18n("en-us",pe),i=t.computed(()=>o.field.pluginType==="custom"),s=t.ref(!o.isEditing),l=t.ref(),c=t.ref({}),m=t.ref(),p=u=>x(u.visible)?u.visible.call(this,o.model,u,this):G(u.visible)?!0:u.visible,f=async u=>{a("modelUpdated",[{id:u,path:o.redisPath}],"partials"),m.value=[{id:u,path:o.redisPath}],l.value=u},h=(u,C)=>{c.value={...c.value,[C]:u},a("modelUpdated",u,C)},E=()=>{a("refreshModel")},A=(u,C,w)=>{a("validated",u,C,w)};return t.watch(()=>s.value,u=>{u?m.value&&a("partialToggled","redis",{partials:m.value}):a("partialToggled","partials",c.value)}),t.onBeforeMount(()=>{var u,C,w;if(o.model&&(c.value=o.field.fields.reduce((I,_)=>(Object.keys(o.model).includes(_.model)&&(I[_.model]=o.model[_.model]),I),{})),(w=(C=(u=o==null?void 0:o.model)==null?void 0:u.partials)==null?void 0:C[0])!=null&&w.id){const I=o.model.partials[0].id;s.value=!0,l.value=I}}),(u,C)=>{const w=t.resolveComponent("KAlert"),I=t.resolveComponent("KBadge"),_=t.resolveComponent("KRadio"),k=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",null,[i.value?(t.openBlock(),t.createElementBlock("div",Ku,[t.createVNode(w,{"data-testid":"custom-plugin-redis-config-note",message:t.unref(r)("redis.custom_plugin.alert")},null,8,["message"]),t.createVNode(Va,{"default-redis-config-item":l.value,"is-custom-plugin":"","plugin-redis-fields":e.field.fields,"update-redis-model":f,onShowNewPartialModal:C[0]||(C[0]=b=>u.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","plugin-redis-fields"])])):(t.openBlock(),t.createBlock(k,{key:1,class:"redis-config-card","data-testid":"redis-config-card",title:t.unref(r)("redis.title")},{default:t.withCtx(()=>[t.createElementVNode("div",Hu,[t.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=b=>s.value=b),card:"","card-orientation":"horizontal","data-testid":"shared-redis-config-radio",description:t.unref(r)("redis.shared_configuration.description"),label:t.unref(r)("redis.shared_configuration.label"),"selected-value":!0},{default:t.withCtx(()=>[t.createVNode(I,{appearance:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("redis.shared_configuration.badge")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":C[2]||(C[2]=b=>s.value=b),card:"","card-orientation":"horizontal","data-testid":"dedicated-redis-config-radio",description:t.unref(r)("redis.dedicated_configuration.description"),label:t.unref(r)("redis.dedicated_configuration.label"),"selected-value":!1},null,8,["modelValue","description","label"])]),s.value?(t.openBlock(),t.createElementBlock("div",Yu,[t.createVNode(Va,{"default-redis-config-item":l.value,"plugin-redis-fields":e.field.fields,"redis-type":e.field.redisType,"update-redis-model":f,onShowNewPartialModal:C[3]||(C[3]=b=>u.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","plugin-redis-fields","redis-type"])])):(t.openBlock(),t.createElementBlock("div",Gu,[t.createElementVNode("div",Wu,t.toDisplayString(t.unref(r)("redis.dedicated_configuration.title")),1),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.field.fields,b=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b.model},[p(b)?(t.openBlock(),t.createBlock(Ia,{key:0,ref_for:!0,ref:"children",errors:e.errors,field:b,model:e.model,options:e.options,vfg:e.vfg,onModelUpdated:h,onRefreshModel:E,onValidated:A},null,8,["errors","field","model","options","vfg"])):t.createCommentVNode("",!0)],64))),128))]),_:1}))]))]),_:1},8,["title"]))])}}}),[["__scopeId","data-v-addd6536"]])},mixins:[Ho],inject:{autofillSlot:{from:he,default:void 0}},provide(){var e;return{...!this.autofillSlot&&{[he]:(e=this.$slots)==null?void 0:e[Ke]}}},props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:t.ref([]),fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:"",helpAsHtml:!1}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(e){return e.length>0}},enableRedisPartial:{type:Boolean,default:!1},isEditing:{type:Boolean,default:!1}},emits:["validated","modelUpdated","refreshModel","partialToggled","showNewPartialModal"],data(){return{vfg:this,errors:[],children:t.ref([]),collapseStates:{}}},computed:{fields(){const e=[];return this.schema&&this.schema.fields&&re(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&re(this.schema.groups.slice(0),n=>{e.push(n)}),e}},watch:{model:{deep:!0,handler(e,n){n!==e&&e!=null&&this.$nextTick(()=>{this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors()})}}},mounted(){this.$nextTick(()=>{this.model&&(this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors())})},methods:{fieldVisible(e){return x(e.visible)?e.visible.call(this,this.model,e,this):G(e.visible)?!0:e.visible},onFieldValidated(e,n,o){this.errors=this.errors.filter(r=>r.field.fieldName!==o.schema.fieldName),!e&&n&&n.length>0&&re(n,r=>{this.errors.push({field:o.schema,error:r})});const a=this.errors.length===0;this.$emit("validated",a,this.errors,this)},onRefreshModel(){this.$emit("refreshModel")},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},onPartialToggled(e,n){this.$emit("partialToggled",e,n)},validate(e=null){e===null&&(e=$(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],o=[];re(this.$refs.children,r=>{x(r.validate)&&(n.push(r.$refs.child),o.push(r.$refs.child.validate(!0)))});const a=r=>{const i=[];re(r,(l,c)=>{Array.isArray(l)&&l.length>0&&re(l,m=>{i.push({field:n[c].schema,error:m})})}),this.errors=i;const s=i.length===0;return this.$emit("validated",s,i,this),e?i:s};return e?Promise.all(o).then(a):a(o)},clearValidationErrors(){this.errors.splice(0),re(this.$refs.children,e=>{e.clearValidationErrors()})}}},Xu={key:0,class:"vue-form-generator"},Ju={key:0};function Qu(e,n,o,a,r,i){const s=t.resolveComponent("form-redis"),l=t.resolveComponent("form-group"),c=t.resolveComponent("KCollapse");return o.schema!=null?(t.openBlock(),t.createElementBlock("div",Xu,[o.schema.fields?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.fields,m=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m.model},[m.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(s,{key:0,errors:r.errors,field:m,"is-editing":o.isEditing,model:o.model,options:o.options,tag:o.tag,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onPartialToggled:i.onPartialToggled,onShowNewPartialModal:p=>e.$emit("showNewPartialModal",m.redisType),onValidated:i.onFieldValidated},null,8,["errors","field","is-editing","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):i.fieldVisible(m)?(t.openBlock(),t.createBlock(l,{key:1,ref_for:!0,ref:"children",errors:r.errors,field:m,model:o.model,options:o.options,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:1})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.groups,(m,p)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${p}`},[m.collapsible!==void 0&&m.collapsible!==!1?(t.openBlock(),t.createBlock(c,{key:0,class:"root-level-collapse","model-value":!1,title:m.collapsible.title},t.createSlots({default:t.withCtx(()=>{var f,h,E,A;return[(f=m.slots)!=null&&f.beforeContent?t.renderSlot(e.$slots,(h=m.slots)==null?void 0:h.beforeContent,{key:0}):t.createCommentVNode("",!0),m.fields.length===0&&((E=m.slots)!=null&&E.emptyState)?t.renderSlot(e.$slots,(A=m.slots)==null?void 0:A.emptyState,{key:1}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:2,class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.fields,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.model},[i.fieldVisible(u)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:r.errors,field:u,model:o.model,options:o.options,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"])),m.collapsible!==!0&&m.collapsible.nestedCollapsible&&m.collapsible.nestedCollapsible.fields.length>0?(t.openBlock(),t.createBlock(c,{key:3,class:"nested-collapse","model-value":r.collapseStates[`group-${p}-nested`]??!0,"trigger-alignment":"leading","trigger-label":r.collapseStates[`group-${p}-nested`]??!0?m.collapsible.nestedCollapsible.triggerLabel.expand:m.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":u=>r.collapseStates[`group-${p}-nested`]=u},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.collapsible.nestedCollapsible.fields,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.model},[u.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(s,{key:0,errors:r.errors,field:u,"is-editing":o.isEditing,model:o.model,options:o.options,tag:o.tag,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onPartialToggled:i.onPartialToggled,onShowNewPartialModal:C=>e.$emit("showNewPartialModal",u.redisType),onValidated:i.onFieldValidated},null,8,["errors","field","is-editing","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):i.fieldVisible(u)?(t.openBlock(),t.createBlock(l,{key:1,ref_for:!0,ref:"children",errors:r.errors,field:u,model:o.model,options:o.options,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))]),_:2},1032,["model-value","trigger-label","onUpdate:modelValue"])):t.createCommentVNode("",!0)]}),_:2},[m.collapsible.description?{name:"visible-content",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.collapsible.description),1)]),key:"0"}:void 0]),1032,["title"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:1,class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[m.legend?(t.openBlock(),t.createElementBlock("legend",Ju,t.toDisplayString(m.legend),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.fields,f=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:f.model},[i.fieldVisible(f)?(t.openBlock(),t.createBlock(l,{key:0,ref_for:!0,ref:"children",errors:r.errors,field:f,model:o.model,options:o.options,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onRefreshModel:i.onRefreshModel,onValidated:i.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))],64))),128))])):t.createCommentVNode("",!0)}const Y=P(Zu,[["render",Qu]]),Tt={openIdConnectDocs:"https://developer.konghq.com/plugins/openid-connect/",openIdConnectJWKDocs:"https://developer.konghq.com/plugins/openid-connect/reference/#schema--config-client-jwk",openIdConnectClusterNodesDocs:"https://developer.konghq.com/plugins/openid-connect/reference/#schema--config-redis-cluster-nodes",openIdConfigurationDocs:"https://developer.konghq.com/plugins/openid-connect/reference/",openIdAuthorizationDocs:"https://developer.konghq.com/plugins/openid-connect/#authorization"},Ba=new Set(["config-client_id","config-client_secret","config-issuer"]),Fa=new Set(["config-scopes_claim","config-scopes_required","config-audience_claim","config-audience_required","config-roles_claim","config-roles_required","config-groups_claim","config-groups_required","config-authenticated_groups_claim"]),ef={name:"OIDCForm",components:{VueFormGenerator:Y},provide(){var e;return{[he]:(e=this.$slots)==null?void 0:e[Ke]}},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},onPartialToggled:{type:Function,required:!0},isEditing:{type:Boolean,required:!0},enableRedisPartial:{type:Boolean,required:!1},showNewPartialModal:{type:Function,default:()=>{}}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,openIdConnectLink:Tt.openIdConnectDocs,openIdConnectJWKLink:Tt.openIdConnectJWKDocs,openIdConnectClusterNodesLink:Tt.openIdConnectClusterNodesDocs,openIdConfigurationDocs:Tt.openIdConfigurationDocs,openIdAuthorizationDocs:Tt.openIdAuthorizationDocs,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){var e;if(!this.init){this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(r=>!r.model.startsWith("config")&&r.model!=="tags")};const n=this.formSchema.fields.reduce((r,i)=>(r[i.model]=i,r),{});this.commonFieldsSchema={fields:Array.from(Ba).reduce((r,i)=>(n[i]&&r.push(n[i]),r),[])},this.authFieldsSchema={fields:Array.from(Fa).reduce((r,i)=>(n[i]&&r.push(n[i]),r),[])};const{redis:o,redisModels:a}=_e.useRedisPartial(this.formSchema);this.advancedFieldsSchema={fields:this.formSchema.fields.filter(r=>r.model.startsWith("config")&&r.model!=="config-auth_methods"&&!Ba.has(r.model)&&!Fa.has(r.model)&&(!this.enableRedisPartial||!a.includes(r.model))||r.model==="tags").reduce((r,i)=>{var s,l,c,m;switch(i.model){case"config-client_jwk":{if(Array.isArray((l=(s=i.items)==null?void 0:s.schema)==null?void 0:l.fields))for(const p of i.items.schema.fields)p.label=p.model;r.push({...i,link:this.openIdConnectJWKLink,newElementButtonLabel:"+ Add Client JWK",...Array.isArray((m=(c=i.items)==null?void 0:c.schema)==null?void 0:m.fields)&&i.items.schema.fields.map(p=>({...p,label:p.model}))});break}case"config-session_redis_cluster_nodes":{r.push({...i,link:this.openIdConnectClusterNodesLink,newElementButtonLabel:"+ Add Cluster Node"});break}default:r.push(i)}return r},[])},this.enableRedisPartial&&this.advancedFieldsSchema.fields.unshift(o),this.sessionManagement=this.formModel["config-auth_methods"].includes("session"),this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.formModel["config-auth_methods"].includes("authorization_code")},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.formModel["config-auth_methods"].includes("bearer")},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.formModel["config-auth_methods"].includes("client_credentials")},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.formModel["config-auth_methods"].includes("password")},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.formModel["config-auth_methods"].includes("introspection")},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.formModel["config-auth_methods"].includes("userinfo")},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.formModel["config-auth_methods"].includes("kong_oauth2")},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.formModel["config-auth_methods"].includes("refresh_token")}];for(const r of[this.commonFieldsSchema,this.authFieldsSchema,this.advancedFieldsSchema])for(const i of r.fields){const s=(e=n[i.model])==null?void 0:e.help;i.help===void 0&&typeof s=="string"&&(i.help=s)}}},getAuthMethodsValue(e,n){const o=[];for(let a=0;a<this.authMethods.length;a++)this.authMethods[a].prop&&this.authMethods[a].value!==e&&o.push(this.authMethods[a].value);return this.sessionManagement&&e&&o.push("session"),n&&(e?o.push(e):o.push("session")),o},handleUpdate(e,n){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(n,e),this.onModelUpdated()}}},tf={class:"general-settings"},nf={class:"link-wrapper"},of={class:"auth-method-container"},af={class:"general-settings"},rf={class:"link-wrapper"},lf={class:"general-settings"},sf={class:"link-wrapper"};function df(e,n,o,a,r,i){const s=t.resolveComponent("VueFormGenerator"),l=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KLabel"),m=t.resolveComponent("KCheckbox"),p=t.resolveComponent("KInputSwitch"),f=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[o.formModel.id&&o.isEditing||!o.isEditing?(t.openBlock(),t.createBlock(s,{key:0,class:"global-fields",model:o.formModel,options:o.formOptions,schema:r.globalFields,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(f,{tabs:r.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",tf,[t.createElementVNode("div",nf,[t.createVNode(l,{href:r.openIdConfigurationDocs},{default:t.withCtx(()=>[...n[2]||(n[2]=[t.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)])]),_:1},8,["href"])]),n[4]||(n[4]=t.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),i.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:r.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(c,null,{default:t.withCtx(()=>[...n[3]||(n[3]=[t.createTextVNode("Auth Methods",-1)])]),_:1}),t.createElementVNode("div",of,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.authMethods,h=>(t.openBlock(),t.createElementBlock("div",{key:h.value,class:"auth-method"},[t.createVNode(m,{modelValue:h.prop,"onUpdate:modelValue":E=>h.prop=E,onChange:E=>i.handleUpdate(E,h.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(p,{modelValue:r.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=h=>r.sessionManagement=h),label:"Enable Session Management",onChange:i.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",af,[t.createElementVNode("div",rf,[t.createVNode(l,{href:r.openIdAuthorizationDocs},{default:t.withCtx(()=>[...n[5]||(n[5]=[t.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)])]),_:1},8,["href"])]),n[6]||(n[6]=t.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),i.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:r.authFieldsSchema,onModelUpdated:o.onModelUpdated},{"autofill-provider":t.withCtx(h=>[t.renderSlot(e.$slots,"autofill-provider",t.normalizeProps(t.guardReactiveProps(h)),void 0,!0)]),_:3},8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",lf,[t.createElementVNode("div",sf,[t.createVNode(l,{href:r.openIdConnectLink},{default:t.withCtx(()=>[...n[7]||(n[7]=[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)])]),_:1},8,["href"])]),n[8]||(n[8]=t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1)),i.displayForm?(t.openBlock(),t.createBlock(s,{key:0,"enable-redis-partial":o.enableRedisPartial,"is-editing":o.isEditing,model:o.formModel,options:o.formOptions,schema:r.advancedFieldsSchema,onModelUpdated:o.onModelUpdated,onPartialToggled:o.onPartialToggled,onShowNewPartialModal:n[1]||(n[1]=()=>o.showNewPartialModal(o.formSchema._supported_redis_partial_type))},null,8,["enable-redis-partial","is-editing","model","options","schema","onModelUpdated","onPartialToggled"])):t.createCommentVNode("",!0)])]),_:3},8,["tabs"])])}const cf=P(ef,[["render",df],["__scopeId","data-v-741bf3cb"]]),mf=P(t.defineComponent({__name:"PostFunction",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var s;t.provide(he,(s=t.useSlots())==null?void 0:s[Ke]);const{t:n,te:o}=ue.createI18n("en-us",pe),a=e,r=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),i=t.computed(()=>{const l=a.formSchema;return l.fields.map(c=>{const m=`post-function.${c.model}`;return c.hint=o(`${m}.hint`)&&n(`${m}.hint`)||c.hint,c.help=o(`${m}.help`)&&n(`${m}.help`)||c.help,c.newElementButtonLabel=o(`${m}.newElementButtonLabel`)&&n(`${m}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="post-function-array-item-container",c.fieldItemsClasses="post-function-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),l});return(l,c)=>r.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:i.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-f54f37ae"]]),uf=P(t.defineComponent({__name:"ExitTransformer",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var s;t.provide(he,(s=t.useSlots())==null?void 0:s[Ke]);const{t:n,te:o}=ue.createI18n("en-us",pe),a=e,r=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),i=t.computed(()=>{const l=a.formSchema;return l.fields.map(c=>{const m=`exit-transformer.${c.model}`;return c.hint=o(`${m}.hint`)&&n(`${m}.hint`)||c.hint,c.help=o(`${m}.help`)&&n(`${m}.help`)||c.help,c.newElementButtonLabel=o(`${m}.newElementButtonLabel`)&&n(`${m}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="exit-transformer-array-item-container",c.fieldItemsClasses="exit-transformer-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),l});return(l,c)=>r.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:i.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-0d5c541f"]]),ff={fields:[{inputType:"text",label:"Config.Account Email",model:"config-account_email",required:!0,type:"input"},{inputType:"text",label:"Config.Account Key.Key Id",model:"config-account_key-key_id",required:!0,type:"input"},{type:"input",inputType:"text",valueType:"string",label:"Config.Account Key.Key Set",model:"config-account_key-key_set",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",label:"Config.Allow Any Domain",model:"config-allow_any_domain",order:0,disabled:!1}]},hf={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",model:"config-tos_accepted",label:"Config.Tos Accepted",order:0,disabled:!1}]},pf={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_hmac_key",label:"Config.Eab Hmac Key",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_kid",label:"Config.Eab Kid",order:0,disabled:!1}]},gf={class:"general-settings"},yf={class:"sub-form"},bf={class:"general-settings"},_f={class:"sub-form"},Ef={class:"general-settings"},Tf=P(t.defineComponent({__name:"ACMEForm",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var b;t.provide(he,(b=t.useSlots())==null?void 0:b[Ke]);const n=e,o=t.ref("zeroSsl"),a=t.ref("shm"),r=t.computed(()=>{var g;const y={};if((g=n.formSchema)!=null&&g.fields)for(const B of n.formSchema.fields)y[B.model]=B;return y}),i=t.computed(()=>{var g;const y=Oe(ff);for(const B of y.fields){const v=(g=r.value[B.model])==null?void 0:g.help;B.help===void 0&&typeof v=="string"&&(B.help=v)}return y}),s=t.computed(()=>{var g;const y=Oe(hf);for(const B of y.fields){const v=(g=r.value[B.model])==null?void 0:g.help;B.help===void 0&&typeof v=="string"&&(B.help=v)}return y}),l=t.computed(()=>{var g;const y=Oe(pf);for(const B of y.fields){const v=(g=r.value[B.model])==null?void 0:g.help;B.help===void 0&&typeof v=="string"&&(B.help=v)}return y}),c=t.computed(()=>({fields:n.formSchema.fields.filter(y=>!y.model.startsWith("config")&&y.model!=="tags")})),m=t.computed(()=>({fields:i.value.fields.filter(g=>!s.value.fields.some(B=>B.model===g.model)&&!l.value.fields.some(B=>B.model===g.model))})),p=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage")&&!g.model.startsWith("config-storage_config-consul")&&!g.model.startsWith("config-storage_config-redis")&&!g.model.startsWith("config-storage_config-shm")&&!g.model.startsWith("config-storage_config-vault"))})),f=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage_config-consul"))})),h=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage_config-redis"))})),E=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage_config-shm"))})),A=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config-storage_config-vault"))})),u=t.computed(()=>({fields:n.formSchema.fields.filter(y=>y.model.startsWith("config")&&!m.value.fields.filter(g=>g.model===y.model).length&&!p.value.fields.filter(g=>g.model===y.model).length||y.model==="tags")})),C=t.computed(()=>n.formModel.id&&n.isEditing||!n.isEditing),w=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],I=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];t.onMounted(()=>{o.value==="zeroSsl"&&(n.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const _=y=>{o.value=y.value,(y.value==="zeroSsl"||y.value==="other")&&(y.value==="zeroSsl"?n.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":n.formModel["config-api_uri"]="https://acme.example.com/",n.formModel["config-tos_accepted"]=!1),y.value==="letsEncrypt"&&(n.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",n.formModel["config-eab_hmac_key"]="",n.formModel["config-eab_kid"]=""),n.onModelUpdated()},k=(y,g)=>{g==="config-storage"&&(a.value=y),n.onModelUpdated()};return(y,g)=>{const B=t.resolveComponent("KSelect"),v=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(Y,{key:0,class:"global-fields",model:e.formModel,options:e.formOptions,schema:c.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(v,{tabs:w},{general:t.withCtx(()=>[t.createElementVNode("div",gf,[g[0]||(g[0]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),g[1]||(g[1]=t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),C.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:m.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),g[2]||(g[2]=t.createElementVNode("hr",null,null,-1)),t.createVNode(B,{class:"issuer-select",items:I,label:"Issuer",onChange:_}),t.createElementVNode("div",yf,[o.value==="letsEncrypt"?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:s.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="zeroSsl"||o.value==="other"?(t.openBlock(),t.createBlock(Y,{key:1,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",bf,[g[3]||(g[3]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),g[4]||(g[4]=t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),C.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:p.value,onModelUpdated:k},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",_f,[a.value==="consul"?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:f.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="redis"?(t.openBlock(),t.createBlock(Y,{key:1,model:e.formModel,options:e.formOptions,schema:h.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="shm"?(t.openBlock(),t.createBlock(Y,{key:2,model:e.formModel,options:e.formOptions,schema:E.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="vault"?(t.openBlock(),t.createBlock(Y,{key:3,model:e.formModel,options:e.formOptions,schema:A.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",Ef,[g[5]||(g[5]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),g[6]||(g[6]=t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),C.value?(t.openBlock(),t.createBlock(Y,{key:0,model:e.formModel,options:e.formOptions,schema:u.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),[["__scopeId","data-v-07cecf5b"]]),Sf={class:"rla-form-basic-fields"},Cf={class:"rla-form-request-limits-subtitle"},wf={class:"rla-form-request-limits-content"},kf={class:"rla-form-window-type"},Af=["innerHTML"],Mf={class:"rla-form-window-type-radios"},Nf={class:"rla-form-request-limits-items"},If={class:"rla-form-request-limits-row"},Of=["id"],Vf={class:"rla-form-request-limits-actions"},Bf={key:0,class:"rla-form-request-limits-examples"},Ff={class:"rla-form-request-limits-examples-badges"},Rf=["innerHTML"],Df={id:"rla-form-error-legend",class:"rla-form-error-inputs"},Lf=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:Tf,ExitTransformer:uf,OIDCForm:cf,PostFunction:mf,RLAForm:P(t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},onPartialToggled:{type:Function},showNewPartialModal:{type:Function},isEditing:{type:Boolean},enableRedisPartial:{type:Boolean}},setup(e){var v;t.provide(he,(v=t.useSlots())==null?void 0:v[Ke]);const n={fixed:[{label:"500 requests every hour",description:"A fixed limit of 500 requests per hour resetting sharply on the hour, ensuring no user can exceed this limit.",config:{limit:500,window_size:3600}},{label:"200 requests every 30 minutes",description:"Users are allowed 200 requests per 30 minutes, resetting exactly on the 30 minute mark with no carryover of unused limits.",config:{limit:200,window_size:1800}},{label:"500 requests every day",description:"A strict limit of 5000 requests per day resetting promptly at midnight, preventing any burst traffic or inconsistent user experiences.",config:{limit:500,window_size:86400}}],sliding:[{label:"100 requests every hour",description:"Maximum of 100 requests every rolling hour, continuously adjusting the count over the course of the hour. No hard limit or known reset.",config:{limit:100,window_size:3600}},{label:"300 requests every 30 minutes",description:"Each user can make up to 300 requests in any rolling 30 minute period, with older requests dropping off as new requests are made.",config:{limit:300,window_size:1800}},{label:"500 requests every hour",description:`Each user is allowed 500 requests per hour.
|
|
3
3
|
If the limit is exceeded and the user receives a 429 error, each additional request within the sliding window (hour)
|
|
4
4
|
will extend the wait time by about 12 minutes, continuously adjusting as new requests are made.`,config:{limit:500,window_size:3600}}]},o=new Set(["selectionGroup","enabled",...["identifier","limit","window_size","error_code","error_message"].map(N=>`config-${N}`)]),a=N=>N===void 0?!1:o.has(N),{t:r}=ue.createI18n("en-us",pe),i=e,s=t.computed(()=>{var F,R,U;const N=(R=(F=i.formSchema)==null?void 0:F.fields)==null?void 0:R.find(te=>te.type==="selectionGroup"&&te.model==="selectionGroup");return{fields:[(U=i.formSchema)==null?void 0:U.fields.find(te=>te.model==="enabled"),N].filter(Boolean)}}),l=t.computed(()=>{var te,Ve;const N=((Ve=(te=i.formSchema)==null?void 0:te.fields)==null?void 0:Ve.filter(J=>!a(J.model)))??[],S=[],F=[],R=[];let U=!1;for(const J of N){const Be=J.model;if(Be!==void 0){if(Be.startsWith("config-redis-")){(J.model==="config-redis-cluster_addresses"||J.model==="config-redis-sentinel_addresses")&&(J.inputAttributes.help=r("rla.redis.address_example")),F.push(J);continue}U?R.push(J):S.push(J),J.model==="config-strategy"&&(U=!0)}}return{endsWithStrategy:{fields:S},redis:i.enableRedisPartial?{fields:[{fields:F,id:"_redis",model:"__redis_partial",redisType:i.formSchema._supported_redis_partial_type}]}:{fields:F},afterStrategy:{fields:R}}}),c=t.computed(()=>{const N=i.formModel["config-window_type"];return Object.prototype.hasOwnProperty.call(n,N)?n[N]:[]}),m=t.computed(()=>{var N,S;return(S=(N=i.formSchema)==null?void 0:N.fields)==null?void 0:S.find(F=>F.model==="config-identifier")}),p=t.computed(()=>{var N,S,F;return(((F=(S=(N=i.formSchema)==null?void 0:N.fields)==null?void 0:S.find(R=>R.model==="config-identifier"))==null?void 0:F.values)??[]).map(R=>({label:r(`rla.identifiers.options.${R}`),value:R}))}),f=t.ref(),h=t.ref(!0),E=t.computed(()=>{var N,S,F;return i.formModel["config-window_type"]??((F=(S=(N=i.formSchema)==null?void 0:N.fields)==null?void 0:S.find(R=>R.model==="config-window_type"))==null?void 0:F.default)}),A=t.computed(()=>{var S,F,R,U,te,Ve;const N=(R=(F=(S=i.formSchema)==null?void 0:S.fields)==null?void 0:F.find(J=>J.model==="config-window_type"))==null?void 0:R.default;return(((Ve=(te=(U=i.formSchema)==null?void 0:U.fields)==null?void 0:te.find(J=>J.model==="config-window_type"))==null?void 0:Ve.values)??[]).sort((J,Be)=>J===N?-1:Be===N?1:0)}),u=t.computed(()=>{var S;const N=(S=i.formModel["config-limit"])==null?void 0:S.map((F,R)=>{var U,te;return{limit:F,windowSize:(te=(U=i.formModel)==null?void 0:U["config-window_size"])==null?void 0:te[R]}});return!Array.isArray(N)||N.length===0?[{limit:void 0,windowSize:void 0}]:N}),C=t.computed(()=>{var N,S,F,R;return((N=i.formModel)==null?void 0:N["config-identifier"])??((R=(F=(S=i.formSchema)==null?void 0:S.fields)==null?void 0:F.find(U=>U.model==="config-identifier"))==null?void 0:R.default)}),w=t.computed(()=>{var N,S,F,R;return((N=i.formModel)==null?void 0:N["config-error_code"])??((R=(F=(S=i.formSchema)==null?void 0:S.fields)==null?void 0:F.find(U=>U.model==="config-error_code"))==null?void 0:R.default)}),I=t.computed(()=>{var N,S,F,R;return((N=i.formModel)==null?void 0:N["config-error_message"])??((R=(F=(S=i.formSchema)==null?void 0:S.fields)==null?void 0:F.find(U=>U.model==="config-error_message"))==null?void 0:R.default)}),_=(N,S)=>{if(S===f.value){i.onModelUpdated([],"config-limit"),i.onModelUpdated([],"config-window_size"),t.nextTick(()=>{f.value=void 0});return}i.onModelUpdated([N.config.limit],"config-limit"),i.onModelUpdated([N.config.window_size],"config-window_size"),t.nextTick(()=>{f.value=S})},k=N=>{f.value!==void 0&&(f.value=void 0),N!==null&&i.onModelUpdated(N.toString(),"config-window_type")},b=(N,S)=>{var R;f.value!==void 0&&(f.value=void 0);const F=Oe(((R=i.formModel)==null?void 0:R["config-limit"])??[]);F[N]=S,i.onModelUpdated(F,"config-limit")},y=(N,S)=>{var R;f.value!==void 0&&(f.value=void 0);const F=Oe(((R=i.formModel)==null?void 0:R["config-window_size"])??[]);F[N]=S,i.onModelUpdated(F,"config-window_size")},g=N=>{var R,U;f.value!==void 0&&(f.value=void 0);const S=Oe(((R=i.formModel)==null?void 0:R["config-limit"])??[]),F=Oe(((U=i.formModel)==null?void 0:U["config-window_size"])??[]);S.length===0&&S.push(void 0),F.length===0&&F.push(void 0),S.splice(N+1,0,void 0),F.splice(N+1,0,void 0),i.onModelUpdated(S,"config-limit"),i.onModelUpdated(F,"config-window_size")},B=N=>{var S,F;if(u.value.length>1){f.value!==void 0&&(f.value=void 0);const R=Oe(((S=i.formModel)==null?void 0:S["config-limit"])??[]),U=Oe(((F=i.formModel)==null?void 0:F["config-window_size"])??[]);R.length===0&&R.push(void 0),U.length===0&&U.push(void 0),R.splice(N,1),U.splice(N,1),i.onModelUpdated(R,"config-limit"),i.onModelUpdated(U,"config-window_size")}};return t.watch(()=>i.formModel["config-strategy"],N=>{N!=="redis"&&i.formModel.partials&&i.onModelUpdated(void 0,"partials")}),(N,S)=>{const F=t.resolveComponent("KLabel"),R=t.resolveComponent("KRadio"),U=t.resolveComponent("KInput"),te=t.resolveComponent("KButton"),Ve=t.resolveComponent("KBadge"),J=t.resolveComponent("KTooltip"),Be=t.resolveComponent("KCard"),Cn=t.resolveComponent("KSelect"),vt=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Sf,[t.createVNode(Y,{model:e.formModel,options:e.formOptions,schema:s.value,onModelUpdated:S[0]||(S[0]=(V,H)=>e.onModelUpdated(V,H))},null,8,["model","options","schema"]),t.createVNode(Be,{class:"rla-form-request-limits"},{title:t.withCtx(()=>[t.createVNode(F,{class:"rla-form-request-limits-title",for:"rla-form-request-limits-legend",required:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.request_limits.title")),1)]),_:1}),t.createElementVNode("div",Cf,t.toDisplayString(t.unref(r)("rla.request_limits.subtitle")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",wf,[t.createElementVNode("div",kf,[t.createVNode(F,{class:"rla-form-window-type-label","tooltip-attributes":{maxWidth:"300",placement:"top"}},{tooltip:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:t.unref(r)("rla.window_type.help")},null,8,Af)]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.window_type.label"))+" ",1)]),_:1}),t.createElementVNode("div",Mf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(A.value,V=>(t.openBlock(),t.createBlock(R,{key:`window-type-${V}`,"model-value":E.value,name:V,"selected-value":V,"onUpdate:modelValue":k},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)(`rla.window_type.options.${V}`)),1)]),_:2},1032,["model-value","name","selected-value"]))),128))])]),t.createElementVNode("div",Nf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(V,H)=>(t.openBlock(),t.createElementBlock("div",{key:H.toString()},[t.createVNode(F,{for:`rla-form-request-limits-item-${H}-legend`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.request_limits.label_index",{index:H+1})),1)]),_:2},1032,["for"]),t.createElementVNode("div",If,[t.createElementVNode("legend",{id:`rla-form-request-limits-item-${H}-legend`,class:"rla-form-request-limits-inputs"},[t.createVNode(U,{"model-value":V.limit&&V.limit.toString(),placeholder:t.unref(r)("rla.request_limits.request_number"),type:"number","onUpdate:modelValue":Z=>b(H,Number.parseInt(Z))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.interval_determiner")),1),t.createVNode(U,{"model-value":V.windowSize&&V.windowSize.toString(),placeholder:t.unref(r)("rla.request_limits.time_interval"),type:"number","onUpdate:modelValue":Z=>y(H,Number.parseInt(Z))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.seconds")),1)],8,Of),t.createElementVNode("div",Vf,[t.createVNode(te,{appearance:"tertiary",disabled:u.value.length<=1,onClick:()=>B(H)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.RemoveIcon))]),_:1},8,["disabled","onClick"]),t.createVNode(te,{appearance:"tertiary",onClick:()=>g(H)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.AddIcon))]),_:1},8,["onClick"])])])]))),128))]),c.value.length>0?(t.openBlock(),t.createElementBlock("div",Bf,[t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.start_with_a_use_case")),1),t.createElementVNode("div",Ff,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(V,H)=>(t.openBlock(),t.createBlock(J,{key:`use-case-${H}`,"max-width":"300"},{content:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(V.description),1),S[10]||(S[10]=t.createElementVNode("br",null,null,-1)),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.label"))+": "+t.toDisplayString(V.config.limit),1),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.time_interval"))+": "+t.toDisplayString(V.config.window_size),1)]),default:t.withCtx(()=>[t.createVNode(Ve,{appearance:f.value===`${E.value}-${H}`?"info":"decorative",class:"rla-form-request-limits-examples-badge",onClick:()=>_(V,`${E.value}-${H}`)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(V.label),1)]),_:2},1032,["appearance","onClick"])]),_:2},1024))),128))])])):t.createCommentVNode("",!0)])]),_:1}),t.createVNode(Cn,{modelValue:C.value,"onUpdate:modelValue":S[1]||(S[1]=V=>C.value=V),class:"rla-form-identifiers",items:p.value,label:t.unref(r)("rla.identifiers.label"),"label-attributes":{tooltipAttributes:{maxWidth:"300",placement:"top"}},required:"",onSelected:S[2]||(S[2]=V=>i.onModelUpdated(V.value,"config-identifier"))},{"label-tooltip":t.withCtx(()=>[t.createElementVNode("div",{innerHTML:m.value&&m.value.help},null,8,Rf)]),_:1},8,["modelValue","items","label"]),t.createElementVNode("div",null,[t.createVNode(F,{for:"rla-form-error-legend",info:t.unref(r)("rla.error_message.help"),required:"","tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.error_message.label")),1)]),_:1},8,["info"]),t.createElementVNode("legend",Df,[t.createVNode(U,{class:"input-error-code","model-value":w.value&&w.value.toString(),placeholder:t.unref(r)("rla.error_message.code_placeholder"),type:"number","onUpdate:modelValue":S[3]||(S[3]=V=>e.onModelUpdated(Number.parseInt(V),"config-error_code"))},null,8,["model-value","placeholder"]),S[11]||(S[11]=t.createElementVNode("div",null,":",-1)),t.createVNode(U,{"model-value":I.value,placeholder:t.unref(r)("rla.error_message.message_placeholder"),"onUpdate:modelValue":S[4]||(S[4]=V=>e.onModelUpdated(V,"config-error_message"))},null,8,["model-value","placeholder"])])])]),t.createVNode(vt,{modelValue:h.value,"onUpdate:modelValue":S[9]||(S[9]=V=>h.value=V),"data-testid":"view-advanced","trigger-label":t.unref(r)("rla.view_advanced")},{default:t.withCtx(()=>[t.createVNode(Y,{model:e.formModel,options:e.formOptions,schema:l.value.endsWithStrategy,onModelUpdated:S[5]||(S[5]=(V,H)=>e.onModelUpdated(V,H))},null,8,["model","options","schema"]),e.formModel["config-strategy"]==="redis"?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.enableRedisPartial?"div":"KCard"),{key:0,class:"rla-form-redis-card",title:t.unref(r)("rla.redis.title")},{default:t.withCtx(()=>[t.createVNode(Y,{"enable-redis-partial":e.enableRedisPartial,"is-editing":e.isEditing,model:e.formModel,options:e.formOptions,schema:l.value.redis,onModelUpdated:S[6]||(S[6]=(V,H)=>e.onModelUpdated(V,H)),onPartialToggled:e.onPartialToggled,onShowNewPartialModal:S[7]||(S[7]=()=>e.showNewPartialModal(e.formSchema._supported_redis_partial_type))},null,8,["enable-redis-partial","is-editing","model","options","schema","onPartialToggled"])]),_:1},8,["title"])):t.createCommentVNode("",!0),t.createVNode(Y,{class:t.normalizeClass({"rla-last-vfg":e.formModel["config-strategy"]!=="redis"}),model:e.formModel,options:e.formOptions,schema:l.value.afterStrategy,onModelUpdated:S[8]||(S[8]=(V,H)=>e.onModelUpdated(V,H))},null,8,["class","model","options","schema"])]),_:1},8,["modelValue","trigger-label"])],64)}}}),[["__scopeId","data-v-dc7ac5da"]])},Symbol.toStringTag,{value:"Module"})),Uf=["array","metric","advanced","selectionGroup","object-advanced"],Pf=e=>({"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer","rate-limiting-advanced":"RLAForm"})[e];L.AUTOFILL_SLOT=he,L.AUTOFILL_SLOT_NAME=Ke,L.EMPTY_VALUE_PLACEHOLDER=ro,L.FIELD_STATES=Te,L.FORMS_API_KEY=ie,L.FORMS_CONFIG=oo,L.PartialType=Et,L.REDIS_PARTIAL_FETCHER_KEY=ao,L.REDIS_PARTIAL_INFO=sl,L.VueFormGenerator=Y,L.abstractField=Ec,L.composables=_e,L.customFields=Uf,L.getSharedFormName=Pf,L.sharedForms=Lf,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.field-advanced[data-v-e8f66c8a]{margin-bottom:32px!important;margin-top:-16px}.advanced-field-dropdown-wrapper[data-v-e8f66c8a]{display:flex;flex-direction:column;width:100%}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-e8f66c8a]{align-items:center;color:#07c;cursor:pointer;display:flex;font-size:inherit;margin-top:16px;order:2;padding:0}.advanced-field-dropdown-wrapper .advanced-field-title i[data-v-e8f66c8a]{color:#07c;font-size:16px}.advanced-field-dropdown-wrapper .advanced-field-title:hover span[data-v-e8f66c8a]{color:#07c;text-decoration:underline}.advanced-field-dropdown-wrapper .advanced-field-dropdown[data-v-e8f66c8a]{display:block;height:auto;max-height:100%;position:relative;width:100%}.advanced-field-dropdown-wrapper .advanced-field-dropdown.closed[data-v-e8f66c8a]{max-height:0;overflow:hidden}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-e8f66c8a],.advanced-field-dropdown-wrapper .advanced-field-title[data-v-e8f66c8a]:focus,.advanced-field-dropdown-wrapper .advanced-field-title[data-v-e8f66c8a]:hover{background-color:transparent!important;border:none!important;cursor:pointer!important;font-weight:400!important}.array-card-container-wrapper{width:100%}.array-card-container[data-v-97302224]{align-items:center;display:flex}.array-card-container .card[data-v-97302224]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-97302224]{margin-left:12px}.array-item-wrapper[data-v-51d79db2]{width:100%}.array-item[data-v-51d79db2]{display:flex;width:100%}.array-item[data-v-51d79db2] .k-button.delete{align-self:center;height:100%;margin-left:20px}.multi-item-wrapper[data-v-b4fcf731]{width:100%}.autosuggest .k-select .k-select-list .k-select-item button[data-v-9f6760b4]:active{box-shadow:none}.autosuggest .k-select .k-select-list .k-select-item button[data-v-9f6760b4]:active:not(.selected){background-color:#f9fafb}.autosuggest[data-v-6fe8b574]{width:100%}.k-select[data-v-6fe8b574]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-6fe8b574]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-6fe8b574]:last-child{opacity:.7}.k-select[data-v-6fe8b574] .select-item>.select-item-container>button:hover>span{background-color:#e0e4ea}.k-select[data-v-6fe8b574] .dropdown-footer{margin-bottom:-4px}.field-span[data-v-6fe8b574]{color:#6c7489;display:flex;justify-content:space-between}.entity-suggestion-item[data-v-6fe8b574]{display:flex;flex-direction:column;font-family:Inter,sans-serif}.entity-suggestion-item .entity-label[data-v-6fe8b574]{color:#3a3f51;font-size:14px;font-weight:500}.entity-suggestion-item .entity-id[data-v-6fe8b574]{color:#6c7489;font-size:14px;font-weight:500}.selected-entity-item[data-v-6fe8b574]{font-family:Iter,sans-serif;padding-left:28px}.selected-entity-item .selected-entity-label[data-v-6fe8b574]{font-size:14px;font-weight:400}.autosuggest[data-v-8cfdc7f6]{width:100%}.k-select[data-v-8cfdc7f6]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-8cfdc7f6]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-8cfdc7f6]:last-child{opacity:.7}.field-span[data-v-8cfdc7f6]{display:flex;justify-content:space-between}.autosuggest .k-select .k-select-list .k-select-item button:active{box-shadow:none}.autosuggest .k-select .k-select-list .k-select-item button:active:not(.selected){background-color:#f9fafb}.form-field-wrapper[data-v-899b626c],.form-field-wrapper[data-v-899b626c] input[type=radio]{width:100%}.form-field-wrapper[data-v-899b626c] input[type=color]{width:60px}.form-field-wrapper[data-v-899b626c] input[type=range]{padding:0}.form-field-wrapper[data-v-899b626c] input[type=password]::-ms-reveal{display:none}.slide-fade-enter-active,.slide-fade-leave-active{padding:0;transition:all .5s}.slide-fade-enter-from,.slide-fade-leave-to{max-height:0!important}.metrics-wrapper{width:100%}.metrics-wrapper .btn,.metrics-wrapper .metrics-wrapper i{cursor:pointer}.field-dropdown .title{align-items:center;background-color:#f9fafb;border-bottom:1px solid #eee;cursor:pointer;display:flex;height:45px;padding:0 16px;position:relative;transition:transform .2s cubic-bezier(.41,.35,1,.28) 0s,background-color .2s ease-in;width:100%}.field-dropdown .title:hover{background-color:#f5f5f5}.field-dropdown .metric-add-icon{margin-left:auto;transition:all .7s;-webkit-user-select:none;user-select:none}.field-dropdown .content{border:1px solid #eee;border-top:0;height:auto;overflow:hidden;transition:all .5s}.field-dropdown .content .metric-remove-button{float:right;margin-bottom:16px;margin-right:16px}.field-dropdown .content .vue-form-generator{padding:16px}.field-dropdown.active .title .metric-add-icon{transform:rotate(45deg)}.field-object-container[data-v-6eddb0ed],.object-advanced-wrapper[data-v-0faeec4d]{width:100%}.item-wrapper[data-v-0faeec4d]{margin-left:28px}.index-wrapper[data-v-0faeec4d]{align-items:center;display:flex;justify-content:space-between;margin-top:4px}.divider[data-v-0faeec4d]{margin-bottom:8px;margin-top:8px}.wide-divider[data-v-0faeec4d]{margin-bottom:16px;margin-top:16px}.input-wrapper[data-v-0faeec4d]{margin-right:16px;margin-top:16px}.input-wrapper .indent[data-v-0faeec4d]{margin-left:28px}.input-item[data-v-0faeec4d],.input-item .form-control[data-v-0faeec4d]{display:flex}.input-item .k-button[data-v-0faeec4d]{display:flex;margin-left:20px;margin-right:20px}.radio-selection-group[data-v-42b9c6ac]{align-items:center;display:flex;gap:16px}.radio-selection-group[data-v-42b9c6ac] .k-radio{align-items:baseline}.field-string-array[data-v-cf2eff67]{width:100%}.field-array-item[data-v-ff967525]{display:flex;justify-content:space-between}.field-array-item input.form-control[data-v-ff967525]{width:200px}.string-array-item[data-v-ff967525]{align-items:flex-start;display:flex;gap:20px}.string-array-item .field-string-array[data-v-ff967525]{flex:1}.string-array-item .string-array-remove-btn[data-v-ff967525]{flex-shrink:0;margin-top:4px}.field-checkbox input[data-v-6b4ee1cd]{margin-left:12px}.vue-form-generator .field-checklist .listbox,.vue-form-generator .field-checklist .dropList{height:auto;max-height:150px;overflow:auto}.vue-form-generator .field-checklist .listbox .list-row label,.vue-form-generator .field-checklist .dropList .list-row label{font-weight:initial}.vue-form-generator .field-checklist .listbox .list-row input,.vue-form-generator .field-checklist .dropList .list-row input{margin-right:4px}.vue-form-generator .field-checklist .combobox{height:initial;overflow:hidden}.vue-form-generator .field-checklist .combobox .mainRow{cursor:pointer;padding-right:10px;position:relative}.vue-form-generator .field-checklist .combobox .mainRow .arrow{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGdJREFUOI3tzjsOwjAURNGDUqSgTxU5K2AVrJtswjUsgHSR0qdxAZZFPrS+3ZvRzBsqf9MUtBtazJk+oMe0VTriiZCFX8nbpENMgfARjsn74vKj5IFruhfc8d6zIF9S/Hyk5HS4spMVeFcOjszaOwMAAAAASUVORK5CYII=);background-repeat:no-repeat;height:16px;position:absolute;right:-9px;top:3px;transform:rotate(0);transition:transform .5s;width:16px}.vue-form-generator .field-checklist .combobox .mainRow.expanded .arrow{transform:rotate(-180deg)}.vue-form-generator .field-checklist .combobox .dropList{transition:height .5s}.key-value-pairs-editor[data-v-9a9650ac]{width:100%}.key-value-pairs-editor .pair-item[data-v-9a9650ac]{display:flex;gap:12px;justify-content:space-between}.key-value-pairs-editor .pair-item[data-v-9a9650ac]:not(:first-child){margin-top:12px}.key-value-pairs-editor .pair-item .pair-item-cell[data-v-9a9650ac]{flex-grow:1}span.field-label[data-v-d046a15a]{display:block;margin-left:12px;width:100%}.field-selectionGroup>label{display:none}.field-selectionGroup .control-help{color:#00000073;font-weight:400;margin-left:32px;width:100%}.field-selectionGroup .form-check-input{margin-bottom:8px;margin-right:8px}.field-selectionGroup .option-field{margin-top:16px}.field-selectionGroup .option-field .form-group{margin-bottom:16px}.field-selectionGroup .k-label{display:block}.selection-group[data-v-a536356c]{width:100%}.selection-group .form-group[data-v-a536356c],.selection-group .option-field-container[data-v-a536356c]{margin-bottom:0}.selection-group .form-group.horizontal-radios .radio-group[data-v-a536356c]{align-items:center;display:flex;flex-direction:row;gap:24px}.selection-group .form-group.horizontal-radios .radio-disabled[data-v-a536356c]{cursor:not-allowed}.field-textarea[data-v-609c18d6]{width:100%}.form-group:not([class*=" col-"]){width:100%}.form-group{display:inline-block;margin-bottom:16px;vertical-align:top}.form-group label{font-weight:400}.form-group label>:first-child{display:inline-block}.form-group label>div[role=button]{display:inline-block}.form-group.featured>label{font-weight:700}.form-group.required>label:before{background-color:#d60027;border-radius:50%;content:"";height:6px;margin-right:8px;width:6px}.form-group.field-checkbox.required>label:before{display:none}.form-group.error input:not([type=checkbox]),.form-group.error textarea,.form-group.error select{background-color:#ff000026;border:1px solid #f00}.form-group.error .errors{color:red;font-size:12px}.form-group.error .errors span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiklEQVR4Xt2TMQoCQQxF3xdhu72MpZU3GU/meBFLOztPYrVWsQmEWSaMsIXgK8P8RyYkMjO2sAN+K9gTIAmDAlzoUzE7p4IFytvDCQWJKSStYB2efcAvqZFM0BcstMx5naSDYFzfLhh/4SmRM+6Agw/xIX0tKEDFufeDNRUc4XqLRz3qabVIf3BMHwl6Ktexn3nmAAAAAElFTkSuQmCC);background-repeat:no-repeat;display:block;font-weight:600;margin-top:3px;padding-left:17px;padding-top:0}.form-group-label[data-v-fe02085f]{display:flex}.form-group-label[data-v-fe02085f] .k-tooltip p{margin:0}.icon-wrapper[data-v-fe02085f]{display:flex!important}.link-wrapper[data-v-fe02085f]{margin-left:4px}.partial-config-card[data-v-40b3d7b5]{display:flex;flex-direction:column;padding:20px}.partial-config-card .partial-config-card-row[data-v-40b3d7b5]{border-bottom:1px solid #e0e4ea;color:#000933;display:flex}.partial-config-card .partial-config-card-row .config-card-row-label[data-v-40b3d7b5]{align-items:center;flex:1;font-weight:600;padding:12px 0 16px}.partial-config-card .partial-config-card-row .config-card-row-label .label-text[data-v-40b3d7b5]{line-height:24px}.partial-config-card .partial-config-card-row .config-card-row-value[data-v-40b3d7b5]{align-items:center;display:flex;flex:1;font-family:JetBrains Mono,Consolas,monospace;font-family:var(--kui-font-family-code, "JetBrains Mono", Consolas, monospace);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);padding-left:16px}.partial-config-card .partial-config-card-row .config-card-row-value .value-text[data-v-40b3d7b5]{line-height:20px}.redis-config-select[data-v-31a7151d]{margin:16px 0}.redis-config-select[data-v-31a7151d] .k-label{margin-top:0}.redis-config-select .shared-redis-config-title[data-v-31a7151d]{font-weight:600;line-height:20px;margin-bottom:8px}.redis-config-select .empty-redis-config[data-v-31a7151d]{color:#6c7489}.redis-config-select .new-redis-config-area[data-v-31a7151d]{align-items:center;color:#0044f4;cursor:pointer;display:flex;gap:2px;pointer-events:auto}.redis-config-select .plugin-form-redis-configuration-dropdown-item[data-v-31a7151d]{align-items:center;display:flex;gap:16px}.redis-config-select .plugin-form-redis-configuration-dropdown-item .select-item-name[data-v-31a7151d]{color:#3a3f51;line-height:24px}.redis-config-select .selected-redis-config[data-v-31a7151d],.redis-config-select .plugin-form-selected-redis-config[data-v-31a7151d]{font-weight:700;line-height:24px}.redis-shared-config-error-message[data-v-31a7151d]{color:#d60027}.redis-config-card[data-v-addd6536]{margin-bottom:16px}.redis-config-card[data-v-addd6536] .form-group:last-child{margin-bottom:0}.dedicated-redis-config[data-v-addd6536]{margin-top:16px}.dedicated-redis-config .dedicated-redis-config-title[data-v-addd6536]{font-size:16px;font-weight:700;line-height:20px;margin-bottom:16px}.redis-config-radio-group[data-v-addd6536]{display:flex;gap:8px;margin-bottom:8px}.vue-form-generator *{box-sizing:border-box}.vue-form-generator .hidden-field{display:none}.vue-form-generator .form-group{margin-bottom:24px}.vue-form-generator .form-group:last-child{margin-bottom:32px}.vue-form-generator .form-group.hide-label>label{display:none}.vue-form-generator .form-group label{font-weight:500}.vue-form-generator .field-advanced{margin-bottom:8px;margin-top:-8px}.vue-form-generator .field-advanced .form-group:last-child{margin-bottom:16px}.vue-form-generator .k-input[type=text]{width:100%}.vue-form-generator :not(.k-input):not(.k-textarea).form-control{background-color:#fff;background-image:none;border:none;border-radius:3px;box-shadow:inset 0 0 0 1px #e7e7ec;box-sizing:border-box;color:#52596e;display:block;font-size:16px;line-height:24px;padding:8px 16px;transition:color .1s ease,box-shadow .1s ease,border-color ease-in-out .15s;width:100%}.vue-form-generator :not(.k-input):not(.k-textarea).form-control:hover{box-shadow:inset 0 0 0 1px #bdd3f9}.vue-form-generator :not(.k-input):not(.k-textarea).form-control:focus{box-shadow:inset 0 0 0 1px #3972d5;outline:none}.vue-form-generator :not(.k-input):not(.k-textarea).form-control:not([class*=" col-"]){width:100%}.vue-form-generator div.help{margin-left:4px;position:relative}.vue-form-generator div.help .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA+UlEQVQ4ja3TS0oDQRAG4C8+lq7ceICICoLGK7iXuNBbeAMJuPVOIm7cqmDiIncIggg+cMZFaqCnZyYKWtB0df31V1VXdfNH6S2wD9CP8xT3KH8T9BiTcE7XBMOfyBcogvCFO9ziLWwFRosyV+QxthNsA9dJkEYlvazsQdi3sBv6Ol6TBLX+HWT3fcQZ3vGM5fBLk+ynAU41m1biCXvhs4OPBDuBpa6GxF0P8YAj3GA1d1qJfdoS4DOIcIm1DK9x8iaWeDF/SP3QU6zRROpjLDFLsFlibx1jJaMkSIGrWKntvItcyTBKzCcybsvc9ZmYz3kz9Ooz/b98A8yvW13B3ch6AAAAAElFTkSuQmCC);background-position:center center;background-repeat:no-repeat;display:inline-block;height:14px;width:16px}.vue-form-generator .field-wrap{display:flex}.vue-form-generator .field-wrap .buttons{margin-left:4px;white-space:nowrap}.vue-form-generator .field-wrap input[type=submit]{background-color:#fff;border:1px solid #ccc;border-radius:4px;color:#333;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0;padding:6px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.vue-form-generator .field-wrap input[type=submit]:not(:last-child){margin-right:4px}.vue-form-generator .field-wrap input[type=submit]:hover{background-color:#e6e6e6;color:#333}.vue-form-generator .field-wrap input[type=submit]:active{background-color:#d4d4d4;border-color:#8c8c8c;box-shadow:inset 0 3px 5px #00000020;color:#333;outline:0}.vue-form-generator .field-wrap input[type=submit]:disabled{cursor:not-allowed;opacity:.6}.vue-form-generator .hint{font-size:12px;font-style:italic}.vue-form-generator .kong-form-new-element-button-label{margin-bottom:24px!important;margin-top:24px!important}.vue-form-generator div.help .icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+ICA8cGF0aCBmaWxsPSIjMDA4NkU2IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDExYy0yLjc2MSAwLTUtMi4yMzktNS01czIuMjM5LTUgNS01IDUgMi4yMzkgNSA1LTIuMjM5IDUtNSA1TTYgMEMyLjY4NiAwIDAgMi42ODYgMCA2czIuNjg2IDYgNiA2IDYtMi42ODYgNi02LTIuNjg2LTYtNi02bTAgM2MtMS4xMDUgMC0yIC44OTUtMiAyaDFjMC0uNTUyLjQ0OC0xIDEtMXMxIC40NDggMSAxLS40NDggMS0xIDEtMSAuNDQ4LTEgMWgxYzEuMTA1IDAgMi0uODk1IDItMnMtLjg5NS0yLTItMnpNNSA5aDJWOEg1djF6Ii8+PC9zdmc+);height:12px;width:12px}.vue-form-generator .field-wrap button.danger:hover,.vue-form-generator .field-wrap input[type=submit].danger:hover,.vue-form-generator .field-wrap button.danger:active,.vue-form-generator .field-wrap input[type=submit].danger:active{background-color:#fff;box-shadow:none;color:#fff}.vue-form-generator .field-wrap button.tertiary:hover,.vue-form-generator .field-wrap input[type=submit].tertiary:hover,.vue-form-generator .field-wrap button.tertiary:active,.vue-form-generator .field-wrap input[type=submit].tertiary:active{background-color:#fff;box-shadow:none;color:#0044f4}.vue-form-generator .field-checkbox{align-items:center;display:flex}.vue-form-generator .field-checkbox label{margin:0;order:1}.vue-form-generator .field-checkbox input{margin-left:0;margin-right:12px}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:10px}.vue-form-generator label{font-weight:500}.vue-form-generator .form-group input[type=radio]{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid currentColor;border-radius:100%;color:#0044f4;display:inline-flex;height:20px;justify-content:center;width:20px}.vue-form-generator .form-group input[type=radio]:after{border-radius:100%;content:"";height:10px;width:10px}.vue-form-generator .form-group input[type=radio]:disabled{background-color:#e0e4ea;border-color:#afb7c5}.vue-form-generator .form-group input[type=radio]:checked:after{background-color:currentColor}.vue-form-generator .form-group input[type=radio]:checked:disabled:after{background-color:#afb7c5}.vue-form-generator .root-level-collapse .k-collapse-heading{margin-bottom:0!important}.vue-form-generator .root-level-collapse .k-collapse-visible-content{color:#6c7489}.vue-form-generator .nested-collapse .k-collapse-heading{margin-bottom:24px!important}.global-fields.VueFormGenerator .form-group:last-child{margin-bottom:24px}.general-settings .VueFormGenerator .form-group:last-child{margin-bottom:0}.general-settings .k-label{margin-bottom:8px;margin-top:24px}.general-settings .k-input-switch .k-label{margin-top:0}.general-settings .auth-method-container{display:flex;flex-wrap:wrap}.general-settings .auth-method-container .auth-method{margin-bottom:8px;width:50%}.general-settings .k-switch{margin:24px 0}.advanced-field-dropdown.closed{margin-bottom:32px}.advanced-field-dropdown.open{margin-top:8px}.section-header[data-v-741bf3cb]{color:#000000d9;font-size:16px;font-weight:500;line-height:20px}.description[data-v-741bf3cb]{color:#00000073;margin-bottom:12px}.description a[data-v-741bf3cb]{display:inline}.link-wrapper[data-v-741bf3cb]{margin-bottom:8px}[data-v-741bf3cb] .k-tabs ul[role=tablist]{margin-bottom:32px}[data-v-741bf3cb] .jwk-array-input-wrapper{display:flex;justify-content:space-between;margin-bottom:12px;width:400px}[data-v-741bf3cb] .jwk-array-input-wrapper input.form-control{width:300px}[data-v-741bf3cb] .auth-array-item-container{width:100%}[data-v-741bf3cb] .auth-array-item{display:flex;margin-top:8px}[data-v-741bf3cb] .k-button.auth-array-item-new{margin-top:24px}[data-v-f54f37ae] .post-function-array-item-container{width:100%}[data-v-f54f37ae] .post-function-array-item{margin-top:8px}[data-v-0d5c541f] .exit-transformer-array-item-container{width:100%}[data-v-0d5c541f] .exit-transformer-array-item{margin-top:8px}.issuer-select[data-v-07cecf5b]{margin-bottom:16px;width:100%}.header-wrapper[data-v-07cecf5b]{margin-bottom:8px}.sub-form[data-v-07cecf5b]{margin-left:24px}.description[data-v-07cecf5b]{margin-bottom:12px}[data-v-07cecf5b] .k-tabs ul[role=tablist]{margin-bottom:32px}.rla-form-basic-fields[data-v-dc7ac5da]{display:flex;flex-direction:column;gap:24px;margin-bottom:24px}.rla-form-basic-fields .rla-form-request-limits .rla-form-request-limits-content[data-v-dc7ac5da]{display:flex;flex-direction:column;gap:12px}.rla-form-basic-fields .rla-form-request-limits .rla-form-window-type-radios[data-v-dc7ac5da]{display:flex;flex-direction:row;gap:20px}.rla-form-basic-fields .rla-form-request-limits .rla-form-window-type-radios[data-v-dc7ac5da] .radio-label{font-size:14px;font-weight:400}.rla-form-basic-fields .rla-form-request-limits-title[data-v-dc7ac5da]{font-size:16px;font-weight:700}.rla-form-basic-fields .rla-form-request-limits-subtitle[data-v-dc7ac5da]{color:#6c7489;font-size:14px;font-weight:400}.rla-form-basic-fields .rla-form-request-limits-items[data-v-dc7ac5da]{display:flex;flex-direction:column;gap:12px}.rla-form-basic-fields .rla-form-request-limits-row[data-v-dc7ac5da],.rla-form-basic-fields .rla-form-request-limits-inputs[data-v-dc7ac5da],.rla-form-basic-fields .rla-form-request-limits-actions[data-v-dc7ac5da]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.rla-form-basic-fields .rla-form-request-limits-inputs[data-v-dc7ac5da]{flex-grow:1}.rla-form-basic-fields .rla-form-request-limits-actions[data-v-dc7ac5da]{flex-shrink:0}.rla-form-basic-fields .rla-form-request-limits[data-v-dc7ac5da] .form-group{margin-bottom:0!important}.rla-form-basic-fields .rla-form-request-limits-examples[data-v-dc7ac5da]{align-items:center;display:flex;flex-direction:row;gap:8px}.rla-form-basic-fields .rla-form-request-limits-examples-badges[data-v-dc7ac5da]{display:flex;flex-direction:row;gap:8px}.rla-form-basic-fields .rla-form-request-limits-examples-badges[data-v-dc7ac5da] .rla-form-request-limits-examples-badge{cursor:pointer}.rla-form-basic-fields .rla-form-window-type-label[data-v-dc7ac5da] .k-tooltip p,.rla-form-basic-fields .rla-form-identifiers[data-v-dc7ac5da] .k-tooltip p{margin:0}.rla-form-basic-fields .rla-form-error-inputs[data-v-dc7ac5da]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.rla-form-basic-fields .rla-form-error-inputs .input-error-code[data-v-dc7ac5da]{max-width:200px;min-width:100px;width:20%}.rla-form-redis-card[data-v-dc7ac5da]{margin:12px 0}.rla-last-vfg[data-v-dc7ac5da]{margin-top:24px}
|
|
1
|
+
.field-advanced[data-v-e8f66c8a]{margin-bottom:32px!important;margin-top:-16px}.advanced-field-dropdown-wrapper[data-v-e8f66c8a]{display:flex;flex-direction:column;width:100%}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-e8f66c8a]{align-items:center;color:#07c;cursor:pointer;display:flex;font-size:inherit;margin-top:16px;order:2;padding:0}.advanced-field-dropdown-wrapper .advanced-field-title i[data-v-e8f66c8a]{color:#07c;font-size:16px}.advanced-field-dropdown-wrapper .advanced-field-title:hover span[data-v-e8f66c8a]{color:#07c;text-decoration:underline}.advanced-field-dropdown-wrapper .advanced-field-dropdown[data-v-e8f66c8a]{display:block;height:auto;max-height:100%;position:relative;width:100%}.advanced-field-dropdown-wrapper .advanced-field-dropdown.closed[data-v-e8f66c8a]{max-height:0;overflow:hidden}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-e8f66c8a],.advanced-field-dropdown-wrapper .advanced-field-title[data-v-e8f66c8a]:focus,.advanced-field-dropdown-wrapper .advanced-field-title[data-v-e8f66c8a]:hover{background-color:transparent!important;border:none!important;cursor:pointer!important;font-weight:400!important}.array-card-container-wrapper{width:100%}.array-card-container[data-v-97302224]{align-items:center;display:flex}.array-card-container .card[data-v-97302224]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-97302224]{margin-left:12px}.array-item-wrapper[data-v-51d79db2]{width:100%}.array-item[data-v-51d79db2]{display:flex;width:100%}.array-item[data-v-51d79db2] .k-button.delete{align-self:center;height:100%;margin-left:20px}.multi-item-wrapper[data-v-b4fcf731]{width:100%}.autosuggest .k-select .k-select-list .k-select-item button[data-v-9f6760b4]:active{box-shadow:none}.autosuggest .k-select .k-select-list .k-select-item button[data-v-9f6760b4]:active:not(.selected){background-color:#f9fafb}.autosuggest[data-v-6fe8b574]{width:100%}.k-select[data-v-6fe8b574]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-6fe8b574]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-6fe8b574]:last-child{opacity:.7}.k-select[data-v-6fe8b574] .select-item>.select-item-container>button:hover>span{background-color:#e0e4ea}.k-select[data-v-6fe8b574] .dropdown-footer{margin-bottom:-4px}.field-span[data-v-6fe8b574]{color:#6c7489;display:flex;justify-content:space-between}.entity-suggestion-item[data-v-6fe8b574]{display:flex;flex-direction:column;font-family:Inter,sans-serif}.entity-suggestion-item .entity-label[data-v-6fe8b574]{color:#3a3f51;font-size:14px;font-weight:500}.entity-suggestion-item .entity-id[data-v-6fe8b574]{color:#6c7489;font-size:14px;font-weight:500}.selected-entity-item[data-v-6fe8b574]{font-family:Iter,sans-serif;padding-left:28px}.selected-entity-item .selected-entity-label[data-v-6fe8b574]{font-size:14px;font-weight:400}.autosuggest[data-v-8cfdc7f6]{width:100%}.k-select[data-v-8cfdc7f6]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-8cfdc7f6]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-8cfdc7f6]:last-child{opacity:.7}.field-span[data-v-8cfdc7f6]{display:flex;justify-content:space-between}.autosuggest .k-select .k-select-list .k-select-item button:active{box-shadow:none}.autosuggest .k-select .k-select-list .k-select-item button:active:not(.selected){background-color:#f9fafb}.form-field-wrapper[data-v-899b626c],.form-field-wrapper[data-v-899b626c] input[type=radio]{width:100%}.form-field-wrapper[data-v-899b626c] input[type=color]{width:60px}.form-field-wrapper[data-v-899b626c] input[type=range]{padding:0}.form-field-wrapper[data-v-899b626c] input[type=password]::-ms-reveal{display:none}.slide-fade-enter-active,.slide-fade-leave-active{padding:0;transition:all .5s}.slide-fade-enter-from,.slide-fade-leave-to{max-height:0!important}.metrics-wrapper{width:100%}.metrics-wrapper .btn,.metrics-wrapper .metrics-wrapper i{cursor:pointer}.field-dropdown .title{align-items:center;background-color:#f9fafb;border-bottom:1px solid #eee;cursor:pointer;display:flex;height:45px;padding:0 16px;position:relative;transition:transform .2s cubic-bezier(.41,.35,1,.28) 0s,background-color .2s ease-in;width:100%}.field-dropdown .title:hover{background-color:#f5f5f5}.field-dropdown .metric-add-icon{margin-left:auto;transition:all .7s;-webkit-user-select:none;user-select:none}.field-dropdown .content{border:1px solid #eee;border-top:0;height:auto;overflow:hidden;transition:all .5s}.field-dropdown .content .metric-remove-button{float:right;margin-bottom:16px;margin-right:16px}.field-dropdown .content .vue-form-generator{padding:16px}.field-dropdown.active .title .metric-add-icon{transform:rotate(45deg)}.field-object-container[data-v-6eddb0ed],.object-advanced-wrapper[data-v-0faeec4d]{width:100%}.item-wrapper[data-v-0faeec4d]{margin-left:28px}.index-wrapper[data-v-0faeec4d]{align-items:center;display:flex;justify-content:space-between;margin-top:4px}.divider[data-v-0faeec4d]{margin-bottom:8px;margin-top:8px}.wide-divider[data-v-0faeec4d]{margin-bottom:16px;margin-top:16px}.input-wrapper[data-v-0faeec4d]{margin-right:16px;margin-top:16px}.input-wrapper .indent[data-v-0faeec4d]{margin-left:28px}.input-item[data-v-0faeec4d],.input-item .form-control[data-v-0faeec4d]{display:flex}.input-item .k-button[data-v-0faeec4d]{display:flex;margin-left:20px;margin-right:20px}.radio-selection-group[data-v-42b9c6ac]{align-items:center;display:flex;gap:16px}.radio-selection-group[data-v-42b9c6ac] .k-radio{align-items:baseline}.field-string-array[data-v-cf2eff67]{width:100%}.field-array-item[data-v-83ea3503]{display:flex;justify-content:space-between}.field-array-item input.form-control[data-v-83ea3503]{width:200px}.string-array-item[data-v-83ea3503]{align-items:flex-start;display:flex;gap:20px;width:100%}.string-array-item .field-string-array[data-v-83ea3503]{flex:1}.string-array-item .string-array-remove-btn[data-v-83ea3503]{flex-shrink:0;margin-top:4px}.field-checkbox input[data-v-6b4ee1cd]{margin-left:12px}.vue-form-generator .field-checklist .listbox,.vue-form-generator .field-checklist .dropList{height:auto;max-height:150px;overflow:auto}.vue-form-generator .field-checklist .listbox .list-row label,.vue-form-generator .field-checklist .dropList .list-row label{font-weight:initial}.vue-form-generator .field-checklist .listbox .list-row input,.vue-form-generator .field-checklist .dropList .list-row input{margin-right:4px}.vue-form-generator .field-checklist .combobox{height:initial;overflow:hidden}.vue-form-generator .field-checklist .combobox .mainRow{cursor:pointer;padding-right:10px;position:relative}.vue-form-generator .field-checklist .combobox .mainRow .arrow{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGdJREFUOI3tzjsOwjAURNGDUqSgTxU5K2AVrJtswjUsgHSR0qdxAZZFPrS+3ZvRzBsqf9MUtBtazJk+oMe0VTriiZCFX8nbpENMgfARjsn74vKj5IFruhfc8d6zIF9S/Hyk5HS4spMVeFcOjszaOwMAAAAASUVORK5CYII=);background-repeat:no-repeat;height:16px;position:absolute;right:-9px;top:3px;transform:rotate(0);transition:transform .5s;width:16px}.vue-form-generator .field-checklist .combobox .mainRow.expanded .arrow{transform:rotate(-180deg)}.vue-form-generator .field-checklist .combobox .dropList{transition:height .5s}.key-value-pairs-editor[data-v-9a9650ac]{width:100%}.key-value-pairs-editor .pair-item[data-v-9a9650ac]{display:flex;gap:12px;justify-content:space-between}.key-value-pairs-editor .pair-item[data-v-9a9650ac]:not(:first-child){margin-top:12px}.key-value-pairs-editor .pair-item .pair-item-cell[data-v-9a9650ac]{flex-grow:1}span.field-label[data-v-d046a15a]{display:block;margin-left:12px;width:100%}.field-selectionGroup>label{display:none}.field-selectionGroup .control-help{color:#00000073;font-weight:400;margin-left:32px;width:100%}.field-selectionGroup .form-check-input{margin-bottom:8px;margin-right:8px}.field-selectionGroup .option-field{margin-top:16px}.field-selectionGroup .option-field .form-group{margin-bottom:16px}.field-selectionGroup .k-label{display:block}.selection-group[data-v-a536356c]{width:100%}.selection-group .form-group[data-v-a536356c],.selection-group .option-field-container[data-v-a536356c]{margin-bottom:0}.selection-group .form-group.horizontal-radios .radio-group[data-v-a536356c]{align-items:center;display:flex;flex-direction:row;gap:24px}.selection-group .form-group.horizontal-radios .radio-disabled[data-v-a536356c]{cursor:not-allowed}.field-textarea[data-v-609c18d6]{width:100%}.form-group:not([class*=" col-"]){width:100%}.form-group{display:inline-block;margin-bottom:16px;vertical-align:top}.form-group label{font-weight:400}.form-group label>:first-child{display:inline-block}.form-group label>div[role=button]{display:inline-block}.form-group.featured>label{font-weight:700}.form-group.required>label:before{background-color:#d60027;border-radius:50%;content:"";height:6px;margin-right:8px;width:6px}.form-group.field-checkbox.required>label:before{display:none}.form-group.error input:not([type=checkbox]),.form-group.error textarea,.form-group.error select{background-color:#ff000026;border:1px solid #f00}.form-group.error .errors{color:red;font-size:12px}.form-group.error .errors span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiklEQVR4Xt2TMQoCQQxF3xdhu72MpZU3GU/meBFLOztPYrVWsQmEWSaMsIXgK8P8RyYkMjO2sAN+K9gTIAmDAlzoUzE7p4IFytvDCQWJKSStYB2efcAvqZFM0BcstMx5naSDYFzfLhh/4SmRM+6Agw/xIX0tKEDFufeDNRUc4XqLRz3qabVIf3BMHwl6Ktexn3nmAAAAAElFTkSuQmCC);background-repeat:no-repeat;display:block;font-weight:600;margin-top:3px;padding-left:17px;padding-top:0}.form-group-label[data-v-fe02085f]{display:flex}.form-group-label[data-v-fe02085f] .k-tooltip p{margin:0}.icon-wrapper[data-v-fe02085f]{display:flex!important}.link-wrapper[data-v-fe02085f]{margin-left:4px}.partial-config-card[data-v-40b3d7b5]{display:flex;flex-direction:column;padding:20px}.partial-config-card .partial-config-card-row[data-v-40b3d7b5]{border-bottom:1px solid #e0e4ea;color:#000933;display:flex}.partial-config-card .partial-config-card-row .config-card-row-label[data-v-40b3d7b5]{align-items:center;flex:1;font-weight:600;padding:12px 0 16px}.partial-config-card .partial-config-card-row .config-card-row-label .label-text[data-v-40b3d7b5]{line-height:24px}.partial-config-card .partial-config-card-row .config-card-row-value[data-v-40b3d7b5]{align-items:center;display:flex;flex:1;font-family:JetBrains Mono,Consolas,monospace;font-family:var(--kui-font-family-code, "JetBrains Mono", Consolas, monospace);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);padding-left:16px}.partial-config-card .partial-config-card-row .config-card-row-value .value-text[data-v-40b3d7b5]{line-height:20px}.redis-config-select[data-v-31a7151d]{margin:16px 0}.redis-config-select[data-v-31a7151d] .k-label{margin-top:0}.redis-config-select .shared-redis-config-title[data-v-31a7151d]{font-weight:600;line-height:20px;margin-bottom:8px}.redis-config-select .empty-redis-config[data-v-31a7151d]{color:#6c7489}.redis-config-select .new-redis-config-area[data-v-31a7151d]{align-items:center;color:#0044f4;cursor:pointer;display:flex;gap:2px;pointer-events:auto}.redis-config-select .plugin-form-redis-configuration-dropdown-item[data-v-31a7151d]{align-items:center;display:flex;gap:16px}.redis-config-select .plugin-form-redis-configuration-dropdown-item .select-item-name[data-v-31a7151d]{color:#3a3f51;line-height:24px}.redis-config-select .selected-redis-config[data-v-31a7151d],.redis-config-select .plugin-form-selected-redis-config[data-v-31a7151d]{font-weight:700;line-height:24px}.redis-shared-config-error-message[data-v-31a7151d]{color:#d60027}.redis-config-card[data-v-addd6536]{margin-bottom:16px}.redis-config-card[data-v-addd6536] .form-group:last-child{margin-bottom:0}.dedicated-redis-config[data-v-addd6536]{margin-top:16px}.dedicated-redis-config .dedicated-redis-config-title[data-v-addd6536]{font-size:16px;font-weight:700;line-height:20px;margin-bottom:16px}.redis-config-radio-group[data-v-addd6536]{display:flex;gap:8px;margin-bottom:8px}.vue-form-generator *{box-sizing:border-box}.vue-form-generator .hidden-field{display:none}.vue-form-generator .form-group{margin-bottom:24px}.vue-form-generator .form-group:last-child{margin-bottom:32px}.vue-form-generator .form-group.hide-label>label{display:none}.vue-form-generator .form-group label{font-weight:500}.vue-form-generator .field-advanced{margin-bottom:8px;margin-top:-8px}.vue-form-generator .field-advanced .form-group:last-child{margin-bottom:16px}.vue-form-generator .k-input[type=text]{width:100%}.vue-form-generator :not(.k-input):not(.k-textarea).form-control{background-color:#fff;background-image:none;border:none;border-radius:3px;box-shadow:inset 0 0 0 1px #e7e7ec;box-sizing:border-box;color:#52596e;display:block;font-size:16px;line-height:24px;padding:8px 16px;transition:color .1s ease,box-shadow .1s ease,border-color ease-in-out .15s;width:100%}.vue-form-generator :not(.k-input):not(.k-textarea).form-control:hover{box-shadow:inset 0 0 0 1px #bdd3f9}.vue-form-generator :not(.k-input):not(.k-textarea).form-control:focus{box-shadow:inset 0 0 0 1px #3972d5;outline:none}.vue-form-generator :not(.k-input):not(.k-textarea).form-control:not([class*=" col-"]){width:100%}.vue-form-generator div.help{margin-left:4px;position:relative}.vue-form-generator div.help .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA+UlEQVQ4ja3TS0oDQRAG4C8+lq7ceICICoLGK7iXuNBbeAMJuPVOIm7cqmDiIncIggg+cMZFaqCnZyYKWtB0df31V1VXdfNH6S2wD9CP8xT3KH8T9BiTcE7XBMOfyBcogvCFO9ziLWwFRosyV+QxthNsA9dJkEYlvazsQdi3sBv6Ol6TBLX+HWT3fcQZ3vGM5fBLk+ynAU41m1biCXvhs4OPBDuBpa6GxF0P8YAj3GA1d1qJfdoS4DOIcIm1DK9x8iaWeDF/SP3QU6zRROpjLDFLsFlibx1jJaMkSIGrWKntvItcyTBKzCcybsvc9ZmYz3kz9Ooz/b98A8yvW13B3ch6AAAAAElFTkSuQmCC);background-position:center center;background-repeat:no-repeat;display:inline-block;height:14px;width:16px}.vue-form-generator .field-wrap{display:flex}.vue-form-generator .field-wrap .buttons{margin-left:4px;white-space:nowrap}.vue-form-generator .field-wrap input[type=submit]{background-color:#fff;border:1px solid #ccc;border-radius:4px;color:#333;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0;padding:6px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.vue-form-generator .field-wrap input[type=submit]:not(:last-child){margin-right:4px}.vue-form-generator .field-wrap input[type=submit]:hover{background-color:#e6e6e6;color:#333}.vue-form-generator .field-wrap input[type=submit]:active{background-color:#d4d4d4;border-color:#8c8c8c;box-shadow:inset 0 3px 5px #00000020;color:#333;outline:0}.vue-form-generator .field-wrap input[type=submit]:disabled{cursor:not-allowed;opacity:.6}.vue-form-generator .hint{font-size:12px;font-style:italic}.vue-form-generator .kong-form-new-element-button-label{margin-bottom:24px!important;margin-top:24px!important}.vue-form-generator div.help .icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+ICA8cGF0aCBmaWxsPSIjMDA4NkU2IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDExYy0yLjc2MSAwLTUtMi4yMzktNS01czIuMjM5LTUgNS01IDUgMi4yMzkgNSA1LTIuMjM5IDUtNSA1TTYgMEMyLjY4NiAwIDAgMi42ODYgMCA2czIuNjg2IDYgNiA2IDYtMi42ODYgNi02LTIuNjg2LTYtNi02bTAgM2MtMS4xMDUgMC0yIC44OTUtMiAyaDFjMC0uNTUyLjQ0OC0xIDEtMXMxIC40NDggMSAxLS40NDggMS0xIDEtMSAuNDQ4LTEgMWgxYzEuMTA1IDAgMi0uODk1IDItMnMtLjg5NS0yLTItMnpNNSA5aDJWOEg1djF6Ii8+PC9zdmc+);height:12px;width:12px}.vue-form-generator .field-wrap button.danger:hover,.vue-form-generator .field-wrap input[type=submit].danger:hover,.vue-form-generator .field-wrap button.danger:active,.vue-form-generator .field-wrap input[type=submit].danger:active{background-color:#fff;box-shadow:none;color:#fff}.vue-form-generator .field-wrap button.tertiary:hover,.vue-form-generator .field-wrap input[type=submit].tertiary:hover,.vue-form-generator .field-wrap button.tertiary:active,.vue-form-generator .field-wrap input[type=submit].tertiary:active{background-color:#fff;box-shadow:none;color:#0044f4}.vue-form-generator .field-checkbox{align-items:center;display:flex}.vue-form-generator .field-checkbox label{margin:0;order:1}.vue-form-generator .field-checkbox input{margin-left:0;margin-right:12px}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:10px}.vue-form-generator label{font-weight:500}.vue-form-generator .form-group input[type=radio]{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid currentColor;border-radius:100%;color:#0044f4;display:inline-flex;height:20px;justify-content:center;width:20px}.vue-form-generator .form-group input[type=radio]:after{border-radius:100%;content:"";height:10px;width:10px}.vue-form-generator .form-group input[type=radio]:disabled{background-color:#e0e4ea;border-color:#afb7c5}.vue-form-generator .form-group input[type=radio]:checked:after{background-color:currentColor}.vue-form-generator .form-group input[type=radio]:checked:disabled:after{background-color:#afb7c5}.vue-form-generator .root-level-collapse .k-collapse-heading{margin-bottom:0!important}.vue-form-generator .root-level-collapse .k-collapse-visible-content{color:#6c7489}.vue-form-generator .nested-collapse .k-collapse-heading{margin-bottom:24px!important}.global-fields.VueFormGenerator .form-group:last-child{margin-bottom:24px}.general-settings .VueFormGenerator .form-group:last-child{margin-bottom:0}.general-settings .k-label{margin-bottom:8px;margin-top:24px}.general-settings .k-input-switch .k-label{margin-top:0}.general-settings .auth-method-container{display:flex;flex-wrap:wrap}.general-settings .auth-method-container .auth-method{margin-bottom:8px;width:50%}.general-settings .k-switch{margin:24px 0}.advanced-field-dropdown.closed{margin-bottom:32px}.advanced-field-dropdown.open{margin-top:8px}.section-header[data-v-741bf3cb]{color:#000000d9;font-size:16px;font-weight:500;line-height:20px}.description[data-v-741bf3cb]{color:#00000073;margin-bottom:12px}.description a[data-v-741bf3cb]{display:inline}.link-wrapper[data-v-741bf3cb]{margin-bottom:8px}[data-v-741bf3cb] .k-tabs ul[role=tablist]{margin-bottom:32px}[data-v-741bf3cb] .jwk-array-input-wrapper{display:flex;justify-content:space-between;margin-bottom:12px;width:400px}[data-v-741bf3cb] .jwk-array-input-wrapper input.form-control{width:300px}[data-v-741bf3cb] .auth-array-item-container{width:100%}[data-v-741bf3cb] .auth-array-item{display:flex;margin-top:8px}[data-v-741bf3cb] .k-button.auth-array-item-new{margin-top:24px}[data-v-f54f37ae] .post-function-array-item-container{width:100%}[data-v-f54f37ae] .post-function-array-item{margin-top:8px}[data-v-0d5c541f] .exit-transformer-array-item-container{width:100%}[data-v-0d5c541f] .exit-transformer-array-item{margin-top:8px}.issuer-select[data-v-07cecf5b]{margin-bottom:16px;width:100%}.header-wrapper[data-v-07cecf5b]{margin-bottom:8px}.sub-form[data-v-07cecf5b]{margin-left:24px}.description[data-v-07cecf5b]{margin-bottom:12px}[data-v-07cecf5b] .k-tabs ul[role=tablist]{margin-bottom:32px}.rla-form-basic-fields[data-v-dc7ac5da]{display:flex;flex-direction:column;gap:24px;margin-bottom:24px}.rla-form-basic-fields .rla-form-request-limits .rla-form-request-limits-content[data-v-dc7ac5da]{display:flex;flex-direction:column;gap:12px}.rla-form-basic-fields .rla-form-request-limits .rla-form-window-type-radios[data-v-dc7ac5da]{display:flex;flex-direction:row;gap:20px}.rla-form-basic-fields .rla-form-request-limits .rla-form-window-type-radios[data-v-dc7ac5da] .radio-label{font-size:14px;font-weight:400}.rla-form-basic-fields .rla-form-request-limits-title[data-v-dc7ac5da]{font-size:16px;font-weight:700}.rla-form-basic-fields .rla-form-request-limits-subtitle[data-v-dc7ac5da]{color:#6c7489;font-size:14px;font-weight:400}.rla-form-basic-fields .rla-form-request-limits-items[data-v-dc7ac5da]{display:flex;flex-direction:column;gap:12px}.rla-form-basic-fields .rla-form-request-limits-row[data-v-dc7ac5da],.rla-form-basic-fields .rla-form-request-limits-inputs[data-v-dc7ac5da],.rla-form-basic-fields .rla-form-request-limits-actions[data-v-dc7ac5da]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.rla-form-basic-fields .rla-form-request-limits-inputs[data-v-dc7ac5da]{flex-grow:1}.rla-form-basic-fields .rla-form-request-limits-actions[data-v-dc7ac5da]{flex-shrink:0}.rla-form-basic-fields .rla-form-request-limits[data-v-dc7ac5da] .form-group{margin-bottom:0!important}.rla-form-basic-fields .rla-form-request-limits-examples[data-v-dc7ac5da]{align-items:center;display:flex;flex-direction:row;gap:8px}.rla-form-basic-fields .rla-form-request-limits-examples-badges[data-v-dc7ac5da]{display:flex;flex-direction:row;gap:8px}.rla-form-basic-fields .rla-form-request-limits-examples-badges[data-v-dc7ac5da] .rla-form-request-limits-examples-badge{cursor:pointer}.rla-form-basic-fields .rla-form-window-type-label[data-v-dc7ac5da] .k-tooltip p,.rla-form-basic-fields .rla-form-identifiers[data-v-dc7ac5da] .k-tooltip p{margin:0}.rla-form-basic-fields .rla-form-error-inputs[data-v-dc7ac5da]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.rla-form-basic-fields .rla-form-error-inputs .input-error-code[data-v-dc7ac5da]{max-width:200px;min-width:100px;width:20%}.rla-form-redis-card[data-v-dc7ac5da]{margin:12px 0}.rla-last-vfg[data-v-dc7ac5da]{margin-top:24px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldArray.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/FieldArray.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldArray.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/FieldArray.vue"],"names":[],"mappings":"wBAyVqB,OAAO,YAAY;;AA8WxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAsIG"}
|