@kong-ui-public/forms 4.25.5 → 4.25.6-pr.3398.16e39b2ae.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forms.es.js +2995 -2709
- package/dist/forms.umd.js +4 -4
- package/dist/style.css +1 -1
- package/dist/types/components/forms/OIDCForm.vue.d.ts +283 -5
- package/dist/types/components/forms/OIDCForm.vue.d.ts.map +1 -1
- package/dist/types/components/forms/OIDCPrincipals.vue.d.ts +283 -5
- package/dist/types/components/forms/OIDCPrincipals.vue.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/forms.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(D,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):(D=typeof globalThis<"u"?globalThis:D||self,t(D["kong-ui-public-forms"]={},D.Vue,D["kong-ui-public-i18n"],D.KongIcons,D.axios,D["kong-ui-public-entities-shared"]))})(this,function(D,t,pe,Ae,hi,Bt){"use strict";function Kn(e,n){for(var o=-1,a=e==null?0:e.length;++o<a&&n(e[o],o,e)!==!1;);return e}function pi(e){return function(n,o,a){for(var r=-1,i=Object(n),s=a(n),d=s.length;d--;){var c=s[++r];if(o(i[c],c,i)===!1)break}return n}}var gi=pi();function yi(e,n){for(var o=-1,a=Array(e);++o<e;)a[o]=n(o);return a}var qn=typeof global=="object"&&global&&global.Object===Object&&global,bi=typeof self=="object"&&self&&self.Object===Object&&self,Ee=qn||bi||Function("return this")(),Pe=Ee.Symbol,zn=Object.prototype,_i=zn.hasOwnProperty,Ei=zn.toString,bt=Pe?Pe.toStringTag:void 0;function Ti(e){var n=_i.call(e,bt),o=e[bt];try{e[bt]=void 0;var a=!0}catch{}var r=Ei.call(e);return a&&(n?e[bt]=o:delete e[bt]),r}var Si=Object.prototype,Ci=Si.toString;function wi(e){return Ci.call(e)}var ki="[object Null]",Ai="[object Undefined]",Hn=Pe?Pe.toStringTag:void 0;function $e(e){return e==null?e===void 0?Ai:ki:Hn&&Hn in Object(e)?Ti(e):wi(e)}function xe(e){return e!=null&&typeof e=="object"}var Mi="[object Arguments]";function Gn(e){return xe(e)&&$e(e)==Mi}var Yn=Object.prototype,Ni=Yn.hasOwnProperty,Ii=Yn.propertyIsEnumerable,Oi=Gn(function(){return arguments}())?Gn:function(e){return xe(e)&&Ni.call(e,"callee")&&!Ii.call(e,"callee")},ve=Array.isArray;function Vi(){return!1}var Wn=typeof D=="object"&&D&&!D.nodeType&&D,Zn=Wn&&typeof module=="object"&&module&&!module.nodeType&&module,Bi=Zn&&Zn.exports===Wn,Xn=Bi?Ee.Buffer:void 0,Fi=Xn?Xn.isBuffer:void 0,Jn=Fi||Vi,Ri=9007199254740991,Di=/^(?:0|[1-9]\d*)$/;function Qn(e,n){var o=typeof e;return n=n??Ri,!!n&&(o=="number"||o!="symbol"&&Di.test(e))&&e>-1&&e%1==0&&e<n}var Li=9007199254740991;function eo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Li}var Ui="[object Arguments]",Pi="[object Array]",$i="[object Boolean]",xi="[object Date]",vi="[object Error]",ji="[object Function]",Ki="[object Map]",qi="[object Number]",zi="[object Object]",Hi="[object RegExp]",Gi="[object Set]",Yi="[object String]",Wi="[object WeakMap]",Zi="[object ArrayBuffer]",Xi="[object DataView]",Ji="[object Float32Array]",Qi="[object Float64Array]",er="[object Int8Array]",tr="[object Int16Array]",nr="[object Int32Array]",or="[object Uint8Array]",ar="[object Uint8ClampedArray]",ir="[object Uint16Array]",rr="[object Uint32Array]",q={};q[Ji]=q[Qi]=q[er]=q[tr]=q[nr]=q[or]=q[ar]=q[ir]=q[rr]=!0,q[Ui]=q[Pi]=q[Zi]=q[$i]=q[Xi]=q[xi]=q[vi]=q[ji]=q[Ki]=q[qi]=q[zi]=q[Hi]=q[Gi]=q[Yi]=q[Wi]=!1;function lr(e){return xe(e)&&eo(e.length)&&!!q[$e(e)]}function en(e){return function(n){return e(n)}}var to=typeof D=="object"&&D&&!D.nodeType&&D,_t=to&&typeof module=="object"&&module&&!module.nodeType&&module,sr=_t&&_t.exports===to,tn=sr&&qn.process,nt=function(){try{var e=_t&&_t.require&&_t.require("util").types;return e||tn&&tn.binding&&tn.binding("util")}catch{}}(),no=nt&&nt.isTypedArray,dr=no?en(no):lr,cr=Object.prototype,mr=cr.hasOwnProperty;function oo(e,n){var o=ve(e),a=!o&&Oi(e),r=!o&&!a&&Jn(e),i=!o&&!a&&!r&&dr(e),s=o||a||r||i,d=s?yi(e.length,String):[],c=d.length;for(var m in e)(n||mr.call(e,m))&&!(s&&(m=="length"||r&&(m=="offset"||m=="parent")||i&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Qn(m,c)))&&d.push(m);return d}var ur=Object.prototype;function nn(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||ur;return e===o}function ao(e,n){return function(o){return e(n(o))}}var fr=ao(Object.keys,Object),hr=Object.prototype,pr=hr.hasOwnProperty;function gr(e){if(!nn(e))return fr(e);var n=[];for(var o in Object(e))pr.call(e,o)&&o!="constructor"&&n.push(o);return n}function ge(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var yr="[object AsyncFunction]",br="[object Function]",_r="[object GeneratorFunction]",Er="[object Proxy]";function j(e){if(!ge(e))return!1;var n=$e(e);return n==br||n==_r||n==yr||n==Er}function Ft(e){return e!=null&&eo(e.length)&&!j(e)}function Rt(e){return Ft(e)?oo(e):gr(e)}function Tr(e,n){return e&&gi(e,n,Rt)}function Sr(e,n){return function(o,a){if(o==null)return o;if(!Ft(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 Cr=Sr(Tr);function on(e){return e}function wr(e){return typeof e=="function"?e:on}function de(e,n){var o=ve(e)?Kn:Cr;return o(e,wr(n))}var kr="[object Symbol]";function Dt(e){return typeof e=="symbol"||xe(e)&&$e(e)==kr}var Ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mr=/^\w*$/;function Nr(e,n){if(ve(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Dt(e)?!0:Mr.test(e)||!Ar.test(e)||n!=null&&e in Object(n)}var an=Ee["__core-js_shared__"],io=function(){var e=/[^.]+$/.exec(an&&an.keys&&an.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ir(e){return!!io&&io in e}var Or=Function.prototype,Vr=Or.toString;function He(e){if(e!=null){try{return Vr.call(e)}catch{}try{return e+""}catch{}}return""}var Br=/[\\^$.*+?()[\]{}|]/g,Fr=/^\[object .+?Constructor\]$/,Rr=Function.prototype,Dr=Object.prototype,Lr=Rr.toString,Ur=Dr.hasOwnProperty,Pr=RegExp("^"+Lr.call(Ur).replace(Br,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $r(e){if(!ge(e)||Ir(e))return!1;var n=j(e)?Pr:Fr;return n.test(He(e))}function xr(e,n){return e==null?void 0:e[n]}function Ge(e,n){var o=xr(e,n);return $r(o)?o:void 0}var Et=Ge(Object,"create");function vr(){this.__data__=Et?Et(null):{},this.size=0}function jr(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Kr="__lodash_hash_undefined__",qr=Object.prototype,zr=qr.hasOwnProperty;function Hr(e){var n=this.__data__;if(Et){var o=n[e];return o===Kr?void 0:o}return zr.call(n,e)?n[e]:void 0}var Gr=Object.prototype,Yr=Gr.hasOwnProperty;function Wr(e){var n=this.__data__;return Et?n[e]!==void 0:Yr.call(n,e)}var Zr="__lodash_hash_undefined__";function Xr(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Et&&n===void 0?Zr:n,this}function Ye(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])}}Ye.prototype.clear=vr,Ye.prototype.delete=jr,Ye.prototype.get=Hr,Ye.prototype.has=Wr,Ye.prototype.set=Xr;function Jr(){this.__data__=[],this.size=0}function Lt(e,n){return e===n||e!==e&&n!==n}function Ut(e,n){for(var o=e.length;o--;)if(Lt(e[o][0],n))return o;return-1}var Qr=Array.prototype,el=Qr.splice;function tl(e){var n=this.__data__,o=Ut(n,e);if(o<0)return!1;var a=n.length-1;return o==a?n.pop():el.call(n,o,1),--this.size,!0}function nl(e){var n=this.__data__,o=Ut(n,e);return o<0?void 0:n[o][1]}function ol(e){return Ut(this.__data__,e)>-1}function al(e,n){var o=this.__data__,a=Ut(o,e);return a<0?(++this.size,o.push([e,n])):o[a][1]=n,this}function Fe(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])}}Fe.prototype.clear=Jr,Fe.prototype.delete=tl,Fe.prototype.get=nl,Fe.prototype.has=ol,Fe.prototype.set=al;var Tt=Ge(Ee,"Map");function il(){this.size=0,this.__data__={hash:new Ye,map:new(Tt||Fe),string:new Ye}}function rl(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Pt(e,n){var o=e.__data__;return rl(n)?o[typeof n=="string"?"string":"hash"]:o.map}function ll(e){var n=Pt(this,e).delete(e);return this.size-=n?1:0,n}function sl(e){return Pt(this,e).get(e)}function dl(e){return Pt(this,e).has(e)}function cl(e,n){var o=Pt(this,e),a=o.size;return o.set(e,n),this.size+=o.size==a?0:1,this}function Re(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])}}Re.prototype.clear=il,Re.prototype.delete=ll,Re.prototype.get=sl,Re.prototype.has=dl,Re.prototype.set=cl;var ml="Expected a function";function rn(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(ml);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(rn.Cache||Re),o}rn.Cache=Re;var ul=500;function fl(e){var n=rn(e,function(a){return o.size===ul&&o.clear(),a}),o=n.cache;return n}var hl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pl=/\\(\\)?/g,gl=fl(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(hl,function(o,a,r,i){n.push(r?i.replace(pl,"$1"):a||o)}),n});function yl(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 ro=Pe?Pe.prototype:void 0,lo=ro?ro.toString:void 0;function so(e){if(typeof e=="string")return e;if(ve(e))return yl(e,so)+"";if(Dt(e))return lo?lo.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function co(e){return e==null?"":so(e)}function bl(e,n){return ve(e)?e:Nr(e,n)?[e]:gl(co(e))}function _l(e){if(typeof e=="string"||Dt(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function El(e,n){n=bl(n,e);for(var o=0,a=n.length;e!=null&&o<a;)e=e[_l(n[o++])];return o&&o==a?e:void 0}function v(e,n,o){var a=e==null?void 0:El(e,n);return a===void 0?o:a}function Z(e){return e==null}const ye="kong-ui-forms-api",ln="kong-ui-forms-config",mo="redis-partial-list-fetcher-key",Tl="redis-partial-info",We="autofill",be="autofillSlot",Me={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"},uo="—";/*! @license DOMPurify 3.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.3/LICENSE */function fo(e,n){(n==null||n>e.length)&&(n=e.length);for(var o=0,a=Array(n);o<n;o++)a[o]=e[o];return a}function Sl(e){if(Array.isArray(e))return e}function Cl(e,n){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var a,r,i,s,d=[],c=!0,m=!1;try{if(i=(o=o.call(e)).next,n!==0)for(;!(c=(a=i.call(o)).done)&&(d.push(a.value),d.length!==n);c=!0);}catch(p){m=!0,r=p}finally{try{if(!c&&o.return!=null&&(s=o.return(),Object(s)!==s))return}finally{if(m)throw r}}return d}}function wl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kl(e,n){return Sl(e)||Cl(e,n)||Al(e,n)||wl()}function Al(e,n){if(e){if(typeof e=="string")return fo(e,n);var o={}.toString.call(e).slice(8,-1);return o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set"?Array.from(e):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?fo(e,n):void 0}}const ho=Object.entries,po=Object.setPrototypeOf,Ml=Object.isFrozen,Nl=Object.getPrototypeOf,Il=Object.getOwnPropertyDescriptor;let ce=Object.freeze,Te=Object.seal,ot=Object.create,go=typeof Reflect<"u"&&Reflect,sn=go.apply,dn=go.construct;ce||(ce=function(n){return n}),Te||(Te=function(n){return n}),sn||(sn=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)}),dn||(dn=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 at=ee(Array.prototype.forEach),Ol=ee(Array.prototype.lastIndexOf),yo=ee(Array.prototype.pop),it=ee(Array.prototype.push),Vl=ee(Array.prototype.splice),me=Array.isArray,St=ee(String.prototype.toLowerCase),cn=ee(String.prototype.toString),bo=ee(String.prototype.match),rt=ee(String.prototype.replace),_o=ee(String.prototype.indexOf),Bl=ee(String.prototype.trim),Fl=ee(Number.prototype.toString),Rl=ee(Boolean.prototype.toString),Eo=typeof BigInt>"u"?null:ee(BigInt.prototype.toString),To=typeof Symbol>"u"?null:ee(Symbol.prototype.toString),Y=ee(Object.prototype.hasOwnProperty),Ct=ee(Object.prototype.toString),re=ee(RegExp.prototype.test),$t=Dl(TypeError);function ee(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 sn(e,n,a)}}function Dl(e){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return dn(e,o)}}function R(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:St;if(po&&po(e,null),!me(n))return e;let a=n.length;for(;a--;){let r=n[a];if(typeof r=="string"){const i=o(r);i!==r&&(Ml(n)||(n[a]=i),r=i)}e[r]=!0}return e}function Ll(e){for(let n=0;n<e.length;n++)Y(e,n)||(e[n]=null);return e}function ue(e){const n=ot(null);for(const a of ho(e)){var o=kl(a,2);const r=o[0],i=o[1];Y(e,r)&&(me(i)?n[r]=Ll(i):i&&typeof i=="object"&&i.constructor===Object?n[r]=ue(i):n[r]=i)}return n}function Ul(e){switch(typeof e){case"string":return e;case"number":return Fl(e);case"boolean":return Rl(e);case"bigint":return Eo?Eo(e):"0";case"symbol":return To?To(e):"Symbol()";case"undefined":return Ct(e);case"function":case"object":{if(e===null)return Ct(e);const n=e,o=lt(n,"toString");if(typeof o=="function"){const a=o(n);return typeof a=="string"?a:Ct(a)}return Ct(e)}default:return Ct(e)}}function lt(e,n){for(;e!==null;){const a=Il(e,n);if(a){if(a.get)return ee(a.get);if(typeof a.value=="function")return ee(a.value)}e=Nl(e)}function o(){return null}return o}function Pl(e){try{return re(e,""),!0}catch{return!1}}const So=ce(["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"]),mn=ce(["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"]),un=ce(["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"]),$l=ce(["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"]),fn=ce(["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"]),xl=ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Co=ce(["#text"]),wo=ce(["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"]),hn=ce(["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"]),ko=ce(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),xt=ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vl=Te(/{{[\w\W]*|^[\w\W]*}}/g),jl=Te(/<%[\w\W]*|^[\w\W]*%>/g),Kl=Te(/\${[\w\W]*/g),ql=Te(/^data-[\-\w.\u00B7-\uFFFF]+$/),zl=Te(/^aria-[\-\w]+$/),Ao=Te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hl=Te(/^(?:\w+script|data):/i),Gl=Te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yl=Te(/^html$/i),Wl=Te(/^[a-z][.\w]*(-[.\w]+)+$/i),st={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zl=function(){return typeof window>"u"?null:window},Xl=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}},Mo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function No(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zl();const n=F=>No(F);if(n.version="3.4.3",n.removed=[],!e||!e.document||e.document.nodeType!==st.document||!e.Element)return n.isSupported=!1,n;let o=e.document;const a=o,r=a.currentScript,i=e.DocumentFragment,s=e.HTMLTemplateElement,d=e.Node,c=e.Element,m=e.NodeFilter,p=e.NamedNodeMap,f=p===void 0?e.NamedNodeMap||e.MozNamedAttrMap:p,h=e.HTMLFormElement,E=e.DOMParser,M=e.trustedTypes,g=c.prototype,V=lt(g,"cloneNode"),I=lt(g,"remove"),L=lt(g,"nextSibling"),B=lt(g,"childNodes"),A=lt(g,"parentNode");if(typeof s=="function"){const F=o.createElement("template");F.content&&F.content.ownerDocument&&(o=F.content.ownerDocument)}let C,T="";const _=o,w=_.implementation,O=_.createNodeIterator,u=_.createDocumentFragment,y=_.getElementsByTagName,S=a.importNode;let k=Mo();n.isSupported=typeof ho=="function"&&typeof A=="function"&&w&&w.createHTMLDocument!==void 0;const U=vl,J=jl,we=Kl,te=ql,qe=zl,Mn=Hl,Gt=Gl,P=Wl;let G=Ao,W=null;const Ha=R({},[...So,...mn,...un,...fn,...Co]);let se=null;const Ga=R({},[...wo,...hn,...ko,...xt]);let Q=Object.seal(ot(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}})),Nt=null,Yt=null;const ze=Object.seal(ot(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ya=!0,Nn=!0,Wa=!1,Za=!0,Qe=!1,It=!0,et=!1,In=!1,On=!1,ht=!1,Wt=!1,Zt=!1,Xa=!0,Ja=!1;const Qa="user-content-";let Vn=!0,Ot=!1,pt={},Ve=null;const Bn=R({},["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 ei=null;const ti=R({},["audio","video","img","source","image","track"]);let Fn=null;const ni=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xt="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml";let gt=Be,Rn=!1,Dn=null;const uh=R({},[Xt,Jt,Be],cn);let Ln=R({},["mi","mo","mn","ms","mtext"]),Un=R({},["annotation-xml"]);const fh=R({},["title","style","font","a","script"]);let Vt=null;const hh=["application/xhtml+xml","text/html"],ph="text/html";let oe=null,yt=null;const gh=o.createElement("form"),oi=function(l){return l instanceof RegExp||l instanceof Function},Pn=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(yt&&yt===l)return;(!l||typeof l!="object")&&(l={}),l=ue(l),Vt=hh.indexOf(l.PARSER_MEDIA_TYPE)===-1?ph:l.PARSER_MEDIA_TYPE,oe=Vt==="application/xhtml+xml"?cn:St,W=Y(l,"ALLOWED_TAGS")&&me(l.ALLOWED_TAGS)?R({},l.ALLOWED_TAGS,oe):Ha,se=Y(l,"ALLOWED_ATTR")&&me(l.ALLOWED_ATTR)?R({},l.ALLOWED_ATTR,oe):Ga,Dn=Y(l,"ALLOWED_NAMESPACES")&&me(l.ALLOWED_NAMESPACES)?R({},l.ALLOWED_NAMESPACES,cn):uh,Fn=Y(l,"ADD_URI_SAFE_ATTR")&&me(l.ADD_URI_SAFE_ATTR)?R(ue(ni),l.ADD_URI_SAFE_ATTR,oe):ni,ei=Y(l,"ADD_DATA_URI_TAGS")&&me(l.ADD_DATA_URI_TAGS)?R(ue(ti),l.ADD_DATA_URI_TAGS,oe):ti,Ve=Y(l,"FORBID_CONTENTS")&&me(l.FORBID_CONTENTS)?R({},l.FORBID_CONTENTS,oe):Bn,Nt=Y(l,"FORBID_TAGS")&&me(l.FORBID_TAGS)?R({},l.FORBID_TAGS,oe):ue({}),Yt=Y(l,"FORBID_ATTR")&&me(l.FORBID_ATTR)?R({},l.FORBID_ATTR,oe):ue({}),pt=Y(l,"USE_PROFILES")?l.USE_PROFILES&&typeof l.USE_PROFILES=="object"?ue(l.USE_PROFILES):l.USE_PROFILES:!1,Ya=l.ALLOW_ARIA_ATTR!==!1,Nn=l.ALLOW_DATA_ATTR!==!1,Wa=l.ALLOW_UNKNOWN_PROTOCOLS||!1,Za=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=l.SAFE_FOR_TEMPLATES||!1,It=l.SAFE_FOR_XML!==!1,et=l.WHOLE_DOCUMENT||!1,ht=l.RETURN_DOM||!1,Wt=l.RETURN_DOM_FRAGMENT||!1,Zt=l.RETURN_TRUSTED_TYPE||!1,On=l.FORCE_BODY||!1,Xa=l.SANITIZE_DOM!==!1,Ja=l.SANITIZE_NAMED_PROPS||!1,Vn=l.KEEP_CONTENT!==!1,Ot=l.IN_PLACE||!1,G=Pl(l.ALLOWED_URI_REGEXP)?l.ALLOWED_URI_REGEXP:Ao,gt=typeof l.NAMESPACE=="string"?l.NAMESPACE:Be,Ln=Y(l,"MATHML_TEXT_INTEGRATION_POINTS")&&l.MATHML_TEXT_INTEGRATION_POINTS&&typeof l.MATHML_TEXT_INTEGRATION_POINTS=="object"?ue(l.MATHML_TEXT_INTEGRATION_POINTS):R({},["mi","mo","mn","ms","mtext"]),Un=Y(l,"HTML_INTEGRATION_POINTS")&&l.HTML_INTEGRATION_POINTS&&typeof l.HTML_INTEGRATION_POINTS=="object"?ue(l.HTML_INTEGRATION_POINTS):R({},["annotation-xml"]);const b=Y(l,"CUSTOM_ELEMENT_HANDLING")&&l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING=="object"?ue(l.CUSTOM_ELEMENT_HANDLING):ot(null);if(Q=ot(null),Y(b,"tagNameCheck")&&oi(b.tagNameCheck)&&(Q.tagNameCheck=b.tagNameCheck),Y(b,"attributeNameCheck")&&oi(b.attributeNameCheck)&&(Q.attributeNameCheck=b.attributeNameCheck),Y(b,"allowCustomizedBuiltInElements")&&typeof b.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=b.allowCustomizedBuiltInElements),Qe&&(Nn=!1),Wt&&(ht=!0),pt&&(W=R({},Co),se=ot(null),pt.html===!0&&(R(W,So),R(se,wo)),pt.svg===!0&&(R(W,mn),R(se,hn),R(se,xt)),pt.svgFilters===!0&&(R(W,un),R(se,hn),R(se,xt)),pt.mathMl===!0&&(R(W,fn),R(se,ko),R(se,xt))),ze.tagCheck=null,ze.attributeCheck=null,Y(l,"ADD_TAGS")&&(typeof l.ADD_TAGS=="function"?ze.tagCheck=l.ADD_TAGS:me(l.ADD_TAGS)&&(W===Ha&&(W=ue(W)),R(W,l.ADD_TAGS,oe))),Y(l,"ADD_ATTR")&&(typeof l.ADD_ATTR=="function"?ze.attributeCheck=l.ADD_ATTR:me(l.ADD_ATTR)&&(se===Ga&&(se=ue(se)),R(se,l.ADD_ATTR,oe))),Y(l,"ADD_URI_SAFE_ATTR")&&me(l.ADD_URI_SAFE_ATTR)&&R(Fn,l.ADD_URI_SAFE_ATTR,oe),Y(l,"FORBID_CONTENTS")&&me(l.FORBID_CONTENTS)&&(Ve===Bn&&(Ve=ue(Ve)),R(Ve,l.FORBID_CONTENTS,oe)),Y(l,"ADD_FORBID_CONTENTS")&&me(l.ADD_FORBID_CONTENTS)&&(Ve===Bn&&(Ve=ue(Ve)),R(Ve,l.ADD_FORBID_CONTENTS,oe)),Vn&&(W["#text"]=!0),et&&R(W,["html","head","body"]),W.table&&(R(W,["tbody"]),delete Nt.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw $t('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $t('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=l.TRUSTED_TYPES_POLICY,T=C.createHTML("")}else C===void 0&&(C=Xl(M,r)),C!==null&&typeof T=="string"&&(T=C.createHTML(""));ce&&ce(l),yt=l},ai=R({},[...mn,...un,...$l]),ii=R({},[...fn,...xl]),yh=function(l){let b=A(l);(!b||!b.tagName)&&(b={namespaceURI:gt,tagName:"template"});const N=St(l.tagName),$=St(b.tagName);return Dn[l.namespaceURI]?l.namespaceURI===Jt?b.namespaceURI===Be?N==="svg":b.namespaceURI===Xt?N==="svg"&&($==="annotation-xml"||Ln[$]):!!ai[N]:l.namespaceURI===Xt?b.namespaceURI===Be?N==="math":b.namespaceURI===Jt?N==="math"&&Un[$]:!!ii[N]:l.namespaceURI===Be?b.namespaceURI===Jt&&!Un[$]||b.namespaceURI===Xt&&!Ln[$]?!1:!ii[N]&&(fh[N]||!ai[N]):!!(Vt==="application/xhtml+xml"&&Dn[l.namespaceURI]):!1},Ie=function(l){it(n.removed,{element:l});try{A(l).removeChild(l)}catch{I(l)}},tt=function(l,b){try{it(n.removed,{attribute:b.getAttributeNode(l),from:b})}catch{it(n.removed,{attribute:null,from:b})}if(b.removeAttribute(l),l==="is")if(ht||Wt)try{Ie(b)}catch{}else try{b.setAttribute(l,"")}catch{}},ri=function(l){let b=null,N=null;if(On)l="<remove></remove>"+l;else{const ne=bo(l,/^[\r\n\t ]+/);N=ne&&ne[0]}Vt==="application/xhtml+xml"&>===Be&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const $=C?C.createHTML(l):l;if(gt===Be)try{b=new E().parseFromString($,Vt)}catch{}if(!b||!b.documentElement){b=w.createDocument(gt,"template",null);try{b.documentElement.innerHTML=Rn?T:$}catch{}}const ae=b.body||b.documentElement;return l&&N&&ae.insertBefore(o.createTextNode(N),ae.childNodes[0]||null),gt===Be?y.call(b,et?"html":"body")[0]:et?b.documentElement:ae},li=function(l){return O.call(l.ownerDocument||l,l,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},$n=function(l){return l instanceof h&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof f)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},xn=function(l){return typeof d=="function"&&l instanceof d};function Ue(F,l,b){at(F,N=>{N.call(n,l,b,yt)})}const si=function(l){let b=null;if(Ue(k.beforeSanitizeElements,l,null),$n(l))return Ie(l),!0;const N=oe(l.nodeName);if(Ue(k.uponSanitizeElement,l,{tagName:N,allowedTags:W}),It&&l.hasChildNodes()&&!xn(l.firstElementChild)&&re(/<[/\w!]/g,l.innerHTML)&&re(/<[/\w!]/g,l.textContent)||It&&l.namespaceURI===Be&&N==="style"&&xn(l.firstElementChild)||l.nodeType===st.progressingInstruction||It&&l.nodeType===st.comment&&re(/<[/\w]/g,l.data))return Ie(l),!0;if(Nt[N]||!(ze.tagCheck instanceof Function&&ze.tagCheck(N))&&!W[N]){if(!Nt[N]&&ci(N)&&(Q.tagNameCheck instanceof RegExp&&re(Q.tagNameCheck,N)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(N)))return!1;if(Vn&&!Ve[N]){const $=A(l)||l.parentNode,ae=B(l)||l.childNodes;if(ae&&$){const ne=ae.length;for(let he=ne-1;he>=0;--he){const ke=V(ae[he],!0);$.insertBefore(ke,L(l))}}}return Ie(l),!0}return l instanceof c&&!yh(l)||(N==="noscript"||N==="noembed"||N==="noframes")&&re(/<\/no(script|embed|frames)/i,l.innerHTML)?(Ie(l),!0):(Qe&&l.nodeType===st.text&&(b=l.textContent,at([U,J,we],$=>{b=rt(b,$," ")}),l.textContent!==b&&(it(n.removed,{element:l.cloneNode()}),l.textContent=b)),Ue(k.afterSanitizeElements,l,null),!1)},di=function(l,b,N){if(Yt[b]||Xa&&(b==="id"||b==="name")&&(N in o||N in gh))return!1;const $=se[b]||ze.attributeCheck instanceof Function&&ze.attributeCheck(b,l);if(!(Nn&&!Yt[b]&&re(te,b))){if(!(Ya&&re(qe,b))){if(!$||Yt[b]){if(!(ci(l)&&(Q.tagNameCheck instanceof RegExp&&re(Q.tagNameCheck,l)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(l))&&(Q.attributeNameCheck instanceof RegExp&&re(Q.attributeNameCheck,b)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(b,l))||b==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&re(Q.tagNameCheck,N)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(N))))return!1}else if(!Fn[b]){if(!re(G,rt(N,Gt,""))){if(!((b==="src"||b==="xlink:href"||b==="href")&&l!=="script"&&_o(N,"data:")===0&&ei[l])){if(!(Wa&&!re(Mn,rt(N,Gt,"")))){if(N)return!1}}}}}}return!0},bh=R({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ci=function(l){return!bh[St(l)]&&re(P,l)},mi=function(l){Ue(k.beforeSanitizeAttributes,l,null);const b=l.attributes;if(!b||$n(l))return;const N={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se,forceKeepAttr:void 0};let $=b.length;for(;$--;){const ae=b[$],ne=ae.name,he=ae.namespaceURI,ke=ae.value,Oe=oe(ne),jn=ke;let ie=ne==="value"?jn:Bl(jn);if(N.attrName=Oe,N.attrValue=ie,N.keepAttr=!0,N.forceKeepAttr=void 0,Ue(k.uponSanitizeAttribute,l,N),ie=N.attrValue,Ja&&(Oe==="id"||Oe==="name")&&_o(ie,Qa)!==0&&(tt(ne,l),ie=Qa+ie),It&&re(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ie)){tt(ne,l);continue}if(Oe==="attributename"&&bo(ie,"href")){tt(ne,l);continue}if(N.forceKeepAttr)continue;if(!N.keepAttr){tt(ne,l);continue}if(!Za&&re(/\/>/i,ie)){tt(ne,l);continue}Qe&&at([U,J,we],fi=>{ie=rt(ie,fi," ")});const ui=oe(l.nodeName);if(!di(ui,Oe,ie)){tt(ne,l);continue}if(C&&typeof M=="object"&&typeof M.getAttributeType=="function"&&!he)switch(M.getAttributeType(ui,Oe)){case"TrustedHTML":{ie=C.createHTML(ie);break}case"TrustedScriptURL":{ie=C.createScriptURL(ie);break}}if(ie!==jn)try{he?l.setAttributeNS(he,ne,ie):l.setAttribute(ne,ie),$n(l)?Ie(l):yo(n.removed)}catch{tt(ne,l)}}Ue(k.afterSanitizeAttributes,l,null)},vn=function(l){let b=null;const N=li(l);for(Ue(k.beforeSanitizeShadowDOM,l,null);b=N.nextNode();)Ue(k.uponSanitizeShadowNode,b,null),si(b),mi(b),b.content instanceof i&&vn(b.content);Ue(k.afterSanitizeShadowDOM,l,null)},Qt=function(l){if(l.nodeType===st.element&&l.shadowRoot instanceof i){const $=l.shadowRoot;Qt($),vn($)}const b=l.childNodes;if(!b)return;const N=[];at(b,$=>{it(N,$)});for(const $ of N)Qt($)};return n.sanitize=function(F){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=null,N=null,$=null,ae=null;if(Rn=!F,Rn&&(F="<!-->"),typeof F!="string"&&!xn(F)&&(F=Ul(F),typeof F!="string"))throw $t("dirty is not a string, aborting");if(!n.isSupported)return F;if(In||Pn(l),n.removed=[],typeof F=="string"&&(Ot=!1),Ot){const ke=F.nodeName;if(typeof ke=="string"){const Oe=oe(ke);if(!W[Oe]||Nt[Oe])throw $t("root node is forbidden and cannot be sanitized in-place")}Qt(F)}else if(F instanceof d)b=ri("<!---->"),N=b.ownerDocument.importNode(F,!0),N.nodeType===st.element&&N.nodeName==="BODY"||N.nodeName==="HTML"?b=N:b.appendChild(N),Qt(N);else{if(!ht&&!Qe&&!et&&F.indexOf("<")===-1)return C&&Zt?C.createHTML(F):F;if(b=ri(F),!b)return ht?null:Zt?T:""}b&&On&&Ie(b.firstChild);const ne=li(Ot?F:b);for(;$=ne.nextNode();)si($),mi($),$.content instanceof i&&vn($.content);if(Ot)return F;if(ht){if(Qe){b.normalize();let ke=b.innerHTML;at([U,J,we],Oe=>{ke=rt(ke,Oe," ")}),b.innerHTML=ke}if(Wt)for(ae=u.call(b.ownerDocument);b.firstChild;)ae.appendChild(b.firstChild);else ae=b;return(se.shadowroot||se.shadowrootmode)&&(ae=S.call(a,ae,!0)),ae}let he=et?b.outerHTML:b.innerHTML;return et&&W["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&re(Yl,b.ownerDocument.doctype.name)&&(he="<!DOCTYPE "+b.ownerDocument.doctype.name+`>
|
|
3
|
-
`+he),Qe&&at([U,J,we],ke=>{he=rt(he,ke," ")}),C&&Zt?C.createHTML(he):he},n.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Pn(F),In=!0},n.clearConfig=function(){yt=null,In=!1},n.isValidAttribute=function(F,l,b){yt||Pn({});const N=oe(F),$=oe(l);return di(N,$,b)},n.addHook=function(F,l){typeof l=="function"&&it(k[F],l)},n.removeHook=function(F,l){if(l!==void 0){const b=Ol(k[F],l);return b===-1?void 0:Vl(k[F],b,1)[0]}return yo(k[F])},n.removeHooks=function(F){k[F]=[]},n.removeAllHooks=function(){k=Mo()},n}var Jl=No();function Ql(){this.__data__=new Fe,this.size=0}function es(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function ts(e){return this.__data__.get(e)}function ns(e){return this.__data__.has(e)}var os=200;function as(e,n){var o=this.__data__;if(o instanceof Fe){var a=o.__data__;if(!Tt||a.length<os-1)return a.push([e,n]),this.size=++o.size,this;o=this.__data__=new Re(a)}return o.set(e,n),this.size=o.size,this}function dt(e){var n=this.__data__=new Fe(e);this.size=n.size}dt.prototype.clear=Ql,dt.prototype.delete=es,dt.prototype.get=ts,dt.prototype.has=ns,dt.prototype.set=as;var vt=function(){try{var e=Ge(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Io(e,n,o){n=="__proto__"&&vt?vt(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}var is=Object.prototype,rs=is.hasOwnProperty;function Oo(e,n,o){var a=e[n];(!(rs.call(e,n)&&Lt(a,o))||o===void 0&&!(n in e))&&Io(e,n,o)}function jt(e,n,o,a){var r=!o;o||(o={});for(var i=-1,s=n.length;++i<s;){var d=n[i],c=void 0;c===void 0&&(c=e[d]),r?Io(o,d,c):Oo(o,d,c)}return o}function ls(e,n){return e&&jt(n,Rt(n),e)}function ss(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}var ds=Object.prototype,cs=ds.hasOwnProperty;function ms(e){if(!ge(e))return ss(e);var n=nn(e),o=[];for(var a in e)a=="constructor"&&(n||!cs.call(e,a))||o.push(a);return o}function Kt(e){return Ft(e)?oo(e,!0):ms(e)}function us(e,n){return e&&jt(n,Kt(n),e)}var Vo=typeof D=="object"&&D&&!D.nodeType&&D,Bo=Vo&&typeof module=="object"&&module&&!module.nodeType&&module,fs=Bo&&Bo.exports===Vo,Fo=fs?Ee.Buffer:void 0,Ro=Fo?Fo.allocUnsafe:void 0;function hs(e,n){if(n)return e.slice();var o=e.length,a=Ro?Ro(o):new e.constructor(o);return e.copy(a),a}function ps(e,n){var o=-1,a=e.length;for(n||(n=Array(a));++o<a;)n[o]=e[o];return n}function gs(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 Do(){return[]}var ys=Object.prototype,bs=ys.propertyIsEnumerable,Lo=Object.getOwnPropertySymbols,pn=Lo?function(e){return e==null?[]:(e=Object(e),gs(Lo(e),function(n){return bs.call(e,n)}))}:Do;function _s(e,n){return jt(e,pn(e),n)}function Uo(e,n){for(var o=-1,a=n.length,r=e.length;++o<a;)e[r+o]=n[o];return e}var Po=ao(Object.getPrototypeOf,Object),Es=Object.getOwnPropertySymbols,$o=Es?function(e){for(var n=[];e;)Uo(n,pn(e)),e=Po(e);return n}:Do;function Ts(e,n){return jt(e,$o(e),n)}function xo(e,n,o){var a=n(e);return ve(e)?a:Uo(a,o(e))}function Ss(e){return xo(e,Rt,pn)}function Cs(e){return xo(e,Kt,$o)}var gn=Ge(Ee,"DataView"),yn=Ge(Ee,"Promise"),ct=Ge(Ee,"Set"),bn=Ge(Ee,"WeakMap"),vo="[object Map]",ws="[object Object]",jo="[object Promise]",Ko="[object Set]",qo="[object WeakMap]",zo="[object DataView]",ks=He(gn),As=He(Tt),Ms=He(yn),Ns=He(ct),Is=He(bn),De=$e;(gn&&De(new gn(new ArrayBuffer(1)))!=zo||Tt&&De(new Tt)!=vo||yn&&De(yn.resolve())!=jo||ct&&De(new ct)!=Ko||bn&&De(new bn)!=qo)&&(De=function(e){var n=$e(e),o=n==ws?e.constructor:void 0,a=o?He(o):"";if(a)switch(a){case ks:return zo;case As:return vo;case Ms:return jo;case Ns:return Ko;case Is:return qo}return n});var Os=Object.prototype,Vs=Os.hasOwnProperty;function Bs(e){var n=e.length,o=new e.constructor(n);return n&&typeof e[0]=="string"&&Vs.call(e,"index")&&(o.index=e.index,o.input=e.input),o}var Ho=Ee.Uint8Array;function _n(e){var n=new e.constructor(e.byteLength);return new Ho(n).set(new Ho(e)),n}function Fs(e,n){var o=n?_n(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var Rs=/\w*$/;function Ds(e){var n=new e.constructor(e.source,Rs.exec(e));return n.lastIndex=e.lastIndex,n}var Go=Pe?Pe.prototype:void 0,Yo=Go?Go.valueOf:void 0;function Ls(e){return Yo?Object(Yo.call(e)):{}}function Us(e,n){var o=n?_n(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var Ps="[object Boolean]",$s="[object Date]",xs="[object Map]",vs="[object Number]",js="[object RegExp]",Ks="[object Set]",qs="[object String]",zs="[object Symbol]",Hs="[object ArrayBuffer]",Gs="[object DataView]",Ys="[object Float32Array]",Ws="[object Float64Array]",Zs="[object Int8Array]",Xs="[object Int16Array]",Js="[object Int32Array]",Qs="[object Uint8Array]",ed="[object Uint8ClampedArray]",td="[object Uint16Array]",nd="[object Uint32Array]";function od(e,n,o){var a=e.constructor;switch(n){case Hs:return _n(e);case Ps:case $s:return new a(+e);case Gs:return Fs(e,o);case Ys:case Ws:case Zs:case Xs:case Js:case Qs:case ed:case td:case nd:return Us(e,o);case xs:return new a;case vs:case qs:return new a(e);case js:return Ds(e);case Ks:return new a;case zs:return Ls(e)}}var Wo=Object.create,ad=function(){function e(){}return function(n){if(!ge(n))return{};if(Wo)return Wo(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}}();function id(e){return typeof e.constructor=="function"&&!nn(e)?ad(Po(e)):{}}var rd="[object Map]";function ld(e){return xe(e)&&De(e)==rd}var Zo=nt&&nt.isMap,sd=Zo?en(Zo):ld,dd="[object Set]";function cd(e){return xe(e)&&De(e)==dd}var Xo=nt&&nt.isSet,md=Xo?en(Xo):cd,ud=1,fd=2,hd=4,Jo="[object Arguments]",pd="[object Array]",gd="[object Boolean]",yd="[object Date]",bd="[object Error]",Qo="[object Function]",_d="[object GeneratorFunction]",Ed="[object Map]",Td="[object Number]",ea="[object Object]",Sd="[object RegExp]",Cd="[object Set]",wd="[object String]",kd="[object Symbol]",Ad="[object WeakMap]",Md="[object ArrayBuffer]",Nd="[object DataView]",Id="[object Float32Array]",Od="[object Float64Array]",Vd="[object Int8Array]",Bd="[object Int16Array]",Fd="[object Int32Array]",Rd="[object Uint8Array]",Dd="[object Uint8ClampedArray]",Ld="[object Uint16Array]",Ud="[object Uint32Array]",K={};K[Jo]=K[pd]=K[Md]=K[Nd]=K[gd]=K[yd]=K[Id]=K[Od]=K[Vd]=K[Bd]=K[Fd]=K[Ed]=K[Td]=K[ea]=K[Sd]=K[Cd]=K[wd]=K[kd]=K[Rd]=K[Dd]=K[Ld]=K[Ud]=!0,K[bd]=K[Qo]=K[Ad]=!1;function wt(e,n,o,a,r,i){var s,d=n&ud,c=n&fd,m=n&hd;if(s!==void 0)return s;if(!ge(e))return e;var p=ve(e);if(p){if(s=Bs(e),!d)return ps(e,s)}else{var f=De(e),h=f==Qo||f==_d;if(Jn(e))return hs(e,d);if(f==ea||f==Jo||h&&!r){if(s=c||h?{}:id(e),!d)return c?Ts(e,us(s,e)):_s(e,ls(s,e))}else{if(!K[f])return r?e:{};s=od(e,f,d)}}i||(i=new dt);var E=i.get(e);if(E)return E;i.set(e,s),md(e)?e.forEach(function(V){s.add(wt(V,n,o,V,e,i))}):sd(e)&&e.forEach(function(V,I){s.set(I,wt(V,n,o,I,e,i))});var M=m?c?Cs:Ss:c?Kt:Rt,g=p?void 0:M(e);return Kn(g||e,function(V,I){g&&(I=V,V=e[I]),Oo(s,I,wt(V,n,o,I,e,i))}),s}var Pd=1,$d=4;function Le(e){return wt(e,Pd|$d)}const En=(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,""),ta=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var xd="[object String]";function Ze(e){return typeof e=="string"||!ve(e)&&xe(e)&&$e(e)==xd}const na={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,o={[v(this.options,"validationErrorClass","error")]:n,[v(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)?de(e.styleClasses,a=>o[a]=!0):Ze(e.styleClasses)&&(o[e.styleClasses]=!0),Z(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 j(e.disabled)?e.disabled.call(this,this.model,e,this):Z(e.disabled)?!1:e.disabled},fieldReadonly(e){return j(e.readonly)?e.readonly.call(this,this.model,e,this):Z(e.readonly)?!1:e.readonly},fieldFeatured(e){return j(e.featured)?e.featured.call(this,this.model,e,this):Z(e.featured)?!1:e.featured},fieldRequired(e){return j(e.required)?e.required.call(this,this.model,e,this):Z(e.required)?!1:e.required}}};var Tn=function(){return Ee.Date.now()},vd=/\s/;function jd(e){for(var n=e.length;n--&&vd.test(e.charAt(n)););return n}var Kd=/^\s+/;function qd(e){return e&&e.slice(0,jd(e)+1).replace(Kd,"")}var oa=NaN,zd=/^[-+]0x[0-9a-f]+$/i,Hd=/^0b[01]+$/i,Gd=/^0o[0-7]+$/i,Yd=parseInt;function Sn(e){if(typeof e=="number")return e;if(Dt(e))return oa;if(ge(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ge(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=qd(e);var o=Hd.test(e);return o||Gd.test(e)?Yd(e.slice(2),o?2:8):zd.test(e)?oa:+e}var Wd="Expected a function",Zd=Math.max,Xd=Math.min;function mt(e,n,o){var a,r,i,s,d,c,m=0,p=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Wd);n=Sn(n)||0,ge(o)&&(p=!!o.leading,f="maxWait"in o,i=f?Zd(Sn(o.maxWait)||0,n):i,h="trailing"in o?!!o.trailing:h);function E(T){var _=a,w=r;return a=r=void 0,m=T,s=e.apply(w,_),s}function M(T){return m=T,d=setTimeout(I,n),p?E(T):s}function g(T){var _=T-c,w=T-m,O=n-_;return f?Xd(O,i-w):O}function V(T){var _=T-c,w=T-m;return c===void 0||_>=n||_<0||f&&w>=i}function I(){var T=Tn();if(V(T))return L(T);d=setTimeout(I,g(T))}function L(T){return d=void 0,h&&a?E(T):(a=r=void 0,s)}function B(){d!==void 0&&clearTimeout(d),m=0,a=c=r=d=void 0}function A(){return d===void 0?s:L(Tn())}function C(){var T=Tn(),_=V(T);if(a=arguments,r=this,c=T,_){if(d===void 0)return M(c);if(f)return clearTimeout(d),d=setTimeout(I,n),E(c)}return d===void 0&&(d=setTimeout(I,n)),s}return C.cancel=B,C.flush=A,C}var Jd="__lodash_hash_undefined__";function Qd(e){return this.__data__.set(e,Jd),this}function ec(e){return this.__data__.has(e)}function qt(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new Re;++n<o;)this.add(e[n])}qt.prototype.add=qt.prototype.push=Qd,qt.prototype.has=ec;function tc(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 nc(e){return e!==e}function oc(e,n,o){for(var a=o-1,r=e.length;++a<r;)if(e[a]===n)return a;return-1}function ac(e,n,o){return n===n?oc(e,n,o):tc(e,nc,o)}function ic(e,n){var o=e==null?0:e.length;return!!o&&ac(e,n,0)>-1}function rc(e,n){return e.has(n)}function lc(){}function aa(e){var n=-1,o=Array(e.size);return e.forEach(function(a){o[++n]=a}),o}var sc=1/0,dc=ct&&1/aa(new ct([,-0]))[1]==sc?function(e){return new ct(e)}:lc,cc=200;function mc(e,n,o){var a=-1,r=ic,i=e.length,s=!0,d=[],c=d;if(i>=cc){var m=dc(e);if(m)return aa(m);s=!1,r=rc,c=new qt}else c=d;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;d.push(p)}else r(c,f,o)||(c!==d&&c.push(f),d.push(p))}return d}function ia(e){return e&&e.length?mc(e):[]}var uc=0;function ra(e){var n=++uc;return co(e)+n}var la=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,je="\\d\\d?",Ke="\\d\\d",fc="\\d{3}",hc="\\d{4}",kt="[^\\s]+",sa=/\[([^]*?)\]/gm;function da(e,n){for(var o=[],a=0,r=e.length;a<r;a++)o.push(e[a].substr(0,n));return o}var ca=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 Xe(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 ma=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ua=["January","February","March","April","May","June","July","August","September","October","November","December"],pc=da(ua,3),gc=da(ma,3),fa={dayNamesShort:gc,dayNames:ma,monthNamesShort:pc,monthNames:ua,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},zt=Xe({},fa),yc=function(e){return zt=Xe(zt,e)},ha=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},fe=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},bc={D:function(e){return String(e.getDate())},DD:function(e){return fe(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return fe(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 fe(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 fe(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return fe(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return fe(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return fe(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return fe(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return fe(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return fe(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return fe(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?"-":"+")+fe(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+fe(Math.floor(Math.abs(n)/60),2)+":"+fe(Math.abs(n)%60,2)}},pa=function(e){return+e-1},ga=[null,je],ya=[null,kt],ba=["isPm",kt,function(e,n){var o=e.toLowerCase();return o===n.amPm[0]?0:o===n.amPm[1]?1:null}],_a=["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}],_c={D:["day",je],DD:["day",Ke],Do:["day",je+kt,function(e){return parseInt(e,10)}],M:["month",je,pa],MM:["month",Ke,pa],YY:["year",Ke,function(e){var n=new Date,o=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?o-1:o)+e)}],h:["hour",je,void 0,"isPm"],hh:["hour",Ke,void 0,"isPm"],H:["hour",je],HH:["hour",Ke],m:["minute",je],mm:["minute",Ke],s:["second",je],ss:["second",Ke],YYYY:["year",hc],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",Ke,function(e){return+e*10}],SSS:["millisecond",fc],d:ga,dd:ga,ddd:ya,dddd:ya,MMM:["month",kt,ca("monthNamesShort")],MMMM:["month",kt,ca("monthNames")],a:ba,A:ba,ZZ:_a,Z:_a},Ht={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"},Ec=function(e){return Xe(Ht,e)},Tc=function(e,n,o){if(n===void 0&&(n=Ht.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=Ht[n]||n;var a=[];n=n.replace(sa,function(i,s){return a.push(s),"@@@"});var r=Xe(Xe({},zt),o);return n=n.replace(la,function(i){return bc[i](e,r)}),n.replace(/@@@/g,function(){return a.shift()})};function Sc(e,n,o){if(o===void 0&&(o={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=Ht[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=[],d=n.replace(sa,function(A,C){return s.push(ha(C)),"@@@"}),c={},m={};d=ha(d).replace(la,function(A){var C=_c[A],T=C[0],_=C[1],w=C[3];if(c[T])throw new Error("Invalid format. "+T+" specified twice in format");return c[T]=!0,w&&(m[w]=!0),i.push(C),"("+_+")"}),Object.keys(m).forEach(function(A){if(!c[A])throw new Error("Invalid format. "+A+" is required in specified format")}),d=d.replace(/@@@/g,function(){return s.shift()});var p=e.match(new RegExp(d,"i"));if(!p)return null;for(var f=Xe(Xe({},zt),o),h=1;h<p.length;h++){var E=i[h-1],M=E[0],g=E[2],V=g?g(p[h],f):+p[h];if(V==null)return null;r[M]=V}r.isPm===1&&r.hour!=null&&+r.hour!=12?r.hour=+r.hour+12:r.isPm===0&&+r.hour==12&&(r.hour=0);var I;if(r.timezoneOffset==null){I=new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond);for(var L=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],h=0,B=L.length;h<B;h++)if(c[L[h][0]]&&r[L[h][0]]!==I[L[h][1]]())return null}else if(I=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 I}var ut={format:Tc,parse:Sc,defaultI18n:fa,setGlobalDateI18n:yc,setGlobalDateMasks:Ec};function Cc(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 Ea=Math.max;function wc(e,n,o){return n=Ea(n===void 0?e.length-1:n,0),function(){for(var a=arguments,r=-1,i=Ea(a.length-n,0),s=Array(i);++r<i;)s[r]=a[n+r];r=-1;for(var d=Array(n+1);++r<n;)d[r]=a[r];return d[n]=o(s),Cc(e,this,d)}}function kc(e){return function(){return e}}var Ac=vt?function(e,n){return vt(e,"toString",{configurable:!0,enumerable:!1,value:kc(n),writable:!0})}:on,Mc=800,Nc=16,Ic=Date.now;function Oc(e){var n=0,o=0;return function(){var a=Ic(),r=Nc-(a-o);if(o=a,r>0){if(++n>=Mc)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var Vc=Oc(Ac);function Bc(e,n){return Vc(wc(e,n,on),e+"")}function Fc(e,n,o){if(!ge(o))return!1;var a=typeof n;return(a=="number"?Ft(o)&&Qn(n,o.length):a=="string"&&n in o)?Lt(o[n],e):!1}var Ta=Object.prototype,Rc=Ta.hasOwnProperty,Dc=Bc(function(e,n){e=Object(e);var o=-1,a=n.length,r=a>2?n[2]:void 0;for(r&&Fc(n[0],n[1],r)&&(a=1);++o<a;)for(var i=n[o],s=Kt(i),d=-1,c=s.length;++d<c;){var m=s[d],p=e[m];(p===void 0||Lt(p,Ta[m])&&!Rc.call(e,m))&&(e[m]=i[m])}return e}),Lc=Ee.isFinite;function Sa(e){return typeof e=="number"&&Lc(e)}var Ca=1/0,Uc=17976931348623157e292;function Pc(e){if(!e)return e===0?e:0;if(e=Sn(e),e===Ca||e===-Ca){var n=e<0?-1:1;return n*Uc}return e===e?e:0}function $c(e){var n=Pc(e),o=n%1;return n===n?o?n-o:n:0}function xc(e){return typeof e=="number"&&e==$c(e)}var vc="[object Number]";function Cn(e){return typeof e=="number"||xe(e)&&$e(e)==vc}const _e={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",managed_ui:{title:"Redis",groups:{self_managed:"Self-managed Redis",konnect_managed:"Konnect-managed Redis"},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.",badge:"Recommended",title:"Shared Redis Configuration",create_new_configuration:"New Redis",selector:{placeholder:"Filter Redis configurations..."}},dedicated_configuration:{label:"Use locally-scoped configuration",description:"Create and use a Redis configuration specifically for this plugin."}},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",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:X}=pe.createI18n("en-us",_e),le={fieldIsRequired:X("validators.field_is_required"),invalidFormat:X("validators.invalid_format"),numberTooSmall:X("validators.number_too_small"),numberTooBig:X("validators.number_too_large"),invalidNumber:X("validators.invalid_number"),invalidInteger:X("validators.invalid_integer"),textTooSmall:X("validators.text_too_short"),textTooBig:X("validators.text_too_long"),thisNotText:X("validators.this_not_text"),thisNotArray:X("validators.this_not_array"),selectMinItems:X("validators.select_min_items"),selectMaxItems:X("validators.select_max_items"),invalidDate:X("validators.invalid_date"),dateIsEarly:X("validators.date_is_early"),dateIsLate:X("validators.date_is_late"),invalidEmail:X("validators.invalid_email"),invalidURL:X("validators.invalid_url"),invalidCard:X("validators.invalid_card"),invalidCardNumber:X("validators.invalid_card_number"),invalidTextContainNumber:X("validators.invalid_text_contain_number"),invalidTextContainSpec:X("validators.invalid_tex_contain_spec")},z=(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},Se=(e,n,o=le)=>Z(e)||e===""?n?[z(o.fieldIsRequired)]:[]:null,Je={required:(e,n,o,a=le)=>Se(e,n.required,a)||[],number:(e,n,o,a=le)=>{let r=Se(e,n.required,a);return r!=null||(r=[],Sa(e)?(!Z(n.min)&&e<n.min,(a=le)&&r.push(z(a.numberTooSmall,n.min)),!Z(n.max)&&e>n.max,(a=le)&&r.push(z(a.numberTooBig,n.max))):r.push(z(a.invalidNumber))),r},integer:(e,n,o,a=le)=>{let r=Se(e,n.required,a);return r!=null||(r=[],r.concat(Je.number(e,n,o,a)),xc(e)||r.push(z(a.invalidInteger))),r},double:(e,n,o,a=le)=>{const r=Se(e,n.required,a);return r??(!Cn(e)||isNaN(e)?[z(a.invalidNumber)]:[])},string:(e,n,o,a=le)=>{let r=Se(e,n.required,a);return r!=null||(r=[],Ze(e)?(!Z(n.min)&&e.length<n.min&&r.push(z(a.textTooSmall,e.length,n.min)),!Z(n.max)&&e.length>n.max&&r.push(z(a.textTooBig,e.length,n.max))):r.push(z(a.thisNotText))),r},array:(e,n,o,a=le)=>{if(n.required){if(!Array.isArray(e))return[z(a.thisNotArray)];if(e.length===0)return[z(a.fieldIsRequired)]}if(!Z(e)){if(!Z(n.min)&&e.length<n.min)return[z(a.selectMinItems,n.min)];if(!Z(n.max)&&e.length>n.max)return[z(a.selectMaxItems,n.max)]}return[]},date:(e,n,o,a=le)=>{let r=Se(e,n.required,a);if(r!=null)return r;r=[];const i=new Date(e);if(isNaN(i.getDate()))return[z(a.invalidDate)];if(!Z(n.min)){const s=new Date(n.min);i.valueOf()<s.valueOf()&&r.push(z(a.dateIsEarly,ut.format(i),ut.format(s)))}if(!Z(n.max)){const s=new Date(n.max);i.valueOf()>s.valueOf()&&r.push(z(a.dateIsLate,ut.format(i),ut.format(s)))}return r},regexp:(e,n,o,a=le)=>{const r=Se(e,n.required,a);return r??(!Z(n.pattern)&&!new RegExp(n.pattern).test(e)?[z(a.invalidFormat)]:[])},email:(e,n,o,a=le)=>{const r=Se(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)?[]:[z(a.invalidEmail)])},url:(e,n,o,a=le)=>{const r=Se(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)?[]:[z(a.invalidURL)])},creditCard:(e,n,o,a=le)=>{const r=Se(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[z(a.invalidCard)];let d=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?d+=m%10+1:d+=m):d+=m,p=!p;return d%10===0&&s?[]:[z(a.invalidCardNumber)]},alpha:(e,n,o,a=le)=>{const r=Se(e,n.required,a);return r??(/^[a-zA-Z]*$/.test(e)?[]:[z(a.invalidTextContainNumber)])},alphaNumeric:(e,n,o,a=le)=>{const r=Se(e,n.required,a);return r??(/^[a-zA-Z0-9]*$/.test(e)?[]:[z(a.invalidTextContainSpec)])}};Object.keys(Je).forEach(e=>{const n=Je[e];j(n)&&(n.locale=o=>(a,r,i)=>n(a,r,i,Dc(o,le)))});function wa(e){return Ze(e)?Je[e]!=null?Je[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function wn(e,n,o){let a=v(o.context,"schema.attributes",{});const r=n.value||"input";Ze(r)&&(a=v(a,r)||a),de(a,(i,s)=>{e.setAttribute(s,i)})}const Ne={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:wn,updated:wn,componentUpdated:wn}},computed:{value:{cache:!1,get(){let e;return j(v(this.schema,"get"))?e=this.schema.get(this.model):e=v(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),j(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=v(this.formOptions,"validateAsync",!1);let o=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const r=[];Array.isArray(this.schema.validator)?de(this.schema.validator,i=>{r.push(wa(i).bind(this))}):r.push(wa(this.schema.validator).bind(this)),de(r,i=>{if(n)o.push(i(this.value,this.schema,this.model));else{const s=i(this.value,this.schema,this.model);s&&j(s.then)?s.then(d=>{d&&(this.errors=this.errors.concat(d));const c=this.errors.length===0;this.$emit("validated",c,this.errors,this)}):s&&(o=o.concat(s))}})}const a=r=>{let i=[];de(ia(r),d=>{Array.isArray(d)&&d.length>0?i=i.concat(d):Ze(d)&&i.push(d)}),j(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(){j(this.debouncedValidateFunc)||(this.debouncedValidateFunc=mt(this.validate.bind(this),v(this.schema,"validateDebounceTime",v(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let o=!1;j(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),j(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),v(this.formOptions,"validateAfterChanged",!1)===!0&&(v(this.schema,"validateDebounceTime",v(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 d=r[i];if(i<s-1)a[d]!==void 0||(a[d]={}),a=a[d];else{a[d]=n;return}++i}},getFieldID(e,n=!1){const o=v(this.formOptions,"fieldIdPrefix","");return En(e,o)+(n?"-"+ra():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return v(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},jc=Object.freeze(Object.defineProperty({__proto__:null,default:Ne},Symbol.toStringTag,{value:"Module"})),x=(e,n)=>{const o=e.__vccOpts||e;for(const[a,r]of n)o[a]=r;return o},Kc={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},qc={class:"material-icons"},zc=x(Object.assign({mixins:[Ne],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",Kc,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:o[0]||(o[0]=(...a)=>n.handleOpen&&n.handleOpen(...a))},[t.createElementVNode("i",qc,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(H,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])],2)]))}}),[["__scopeId","data-v-e8f66c8a"]]),Hc={class:"array-card-container"},ka=x(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",Hc,[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(Ae.TrashIcon))]),_:1})])}}}),[["__scopeId","data-v-a8366ec5"]]),Gc={class:"array-item-wrapper"},Yc={class:"array-item"},Wc={class:"array-item-after"},Aa=x(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",Gc,[t.createElementVNode("div",Yc,[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(Ae.TrashIcon))]),_:1})]),t.createElementVNode("div",Wc,[t.renderSlot(n.$slots,"after",{},void 0,!0)])])}}}),[["__scopeId","data-v-e6b6837c"]]),Zc={class:"multi-item-wrapper"},Ma=x(t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Zc,[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"]]);var Xc=4;function Na(e){return wt(e,Xc)}const Jc="#6c7489",Qc="12px",em="20px",tm=["data-testid","data-testlabel"],nm={class:"item-label"},om={class:"autosuggest__results_message"},am=x(t.defineComponent({__name:"AutoSuggest",props:t.mergeModels({placeholder:{default:""},suggestions:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emptyMessage:{default:""},domId:{},error:{default:null}},{id:{required:!0},idModifiers:{}}),emits:t.mergeModels(["change","query-change"],["update:id"]),setup(e){const{t:n}=pe.createI18n("en-us",_e),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,tm)],!0)]),"selected-item-template":t.withCtx(({item:s})=>[t.renderSlot(a.$slots,"selected-item",{item:s},()=>[t.createElementVNode("span",nm,t.toDisplayString(s.label),1)],!0)]),empty:t.withCtx(()=>[t.createElementVNode("div",om,[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-1e9151dd"]]),im="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",kn=e=>e?e.length===36&&new RegExp(`^${im}$`).test(e):!1,rm={class:"selected-entity-item"},lm={class:"selected-entity-label"},sm={class:"entity-suggestion-item"},dm={class:"entity-label"},cm={class:"entity-id"},mm=500,um=50,fm=1e3,Ia=x(t.defineComponent({__name:"FieldScopedEntitySelect",props:{transformItem:{type:Function},allowUuidSearch:{type:Boolean,default:!1},placeholder:{},fields:{default:()=>[]},selectedItem:{},selectedItemLoading:{type:Boolean},domId:{},id:{},entity:{},disabled:{type:Boolean},fieldDisabled:{type:Boolean},error:{},labelField:{default:"name"}},emits:["change"],setup(e){const n=t.inject(ye,void 0),o=async(u,y)=>{if(!n)return console.warn("[@kong-ui-public/forms] No API service provided"),[];const{data:S}=await n.getAllV2(e.entity,{name:u,size:fm},y);return S.data},a=async u=>n?n.peek(e.entity,u):(console.warn("[@kong-ui-public/forms] No API service provided"),Promise.resolve({data:{data:[]}})),r=async u=>{if(!n)return console.warn("[@kong-ui-public/forms] No API service provided"),{id:u};const y=await n.getOne(e.entity,u,{validateStatus:S=>S>=200&&S<300||S===404});if(y.status===404)throw new Error(`Entity of type ${e.entity} with id ${u} not found`);return y.data},i=e.transformItem??(u=>({...u,label:u[e.labelField],value:u.id})),s=t.ref(""),d=t.ref(!1),c=t.ref(!1),m=t.ref(""),p=t.ref([]),f=t.ref([]),h=t.ref([]),{t:E}=pe.createI18n("en-us",_e),M=t.ref(null);let g=null;const V=async(u,y)=>{if(!e.fieldDisabled){clearTimeout(g),g=setTimeout(()=>{d.value=!0},1500);try{const S=await u();f.value=S,p.value=f.value.map(i)}catch(S){if(y!=null&&y.aborted)return;if(p.value=[],hi.isAxiosError(S)&&S.status===404){console.warn("unable to search with UUID",m.value,"for entity type",e.entity);return}s.value=S.message}finally{clearTimeout(g),d.value=!1}}},I=mt(u=>{if(u=u||"",m.value=u,!u.trim()&&!c.value){p.value=_(h.value);return}M.value&&M.value.abort();const y=new AbortController;if(M.value=y,c.value){O(u);return}C(u,y)},mm,{leading:!0}),L=async(u,y)=>await o(u,y),B=async()=>{const{data:{data:u,next:y,offset:S}}=await a(um);return(!y||!S)&&(c.value=!0),f.value=u,h.value=u.map(k=>({...i(k),group:E("fields.auto_suggest.recently_created",{entity:e.entity})})),u},A=async u=>[await r(u)],C=(u,y)=>{kn(u)&&e.allowUuidSearch?V(async()=>await A(u)):V(async()=>await L(u,y.signal),y.signal)},T=u=>{let y=[];y=_(h.value),u!=null&&u.trim()?p.value=y.filter(S=>e.fields.some(k=>(S[k]||"").includes(u))):p.value=y},_=u=>e.selectedItem?u.some(y=>y.value===e.selectedItem.value)?u:[e.selectedItem,...u]:u,w=u=>{p.value=h.value.filter(y=>y.id===u)},O=u=>{kn(u)&&e.allowUuidSearch?w(u):T(u)};return t.onMounted(async()=>{await V(B);const u=t.watch(()=>e.selectedItem,y=>{y&&(p.value=_(h.value)),u()});p.value=_(h.value)}),(u,y)=>(t.openBlock(),t.createBlock(am,{id:e.id,disabled:e.fieldDisabled,"dom-id":e.domId,"empty-message":s.value,error:e.error,loading:e.selectedItemLoading||d.value,placeholder:e.placeholder,readonly:e.disabled,suggestions:p.value,onChange:y[0]||(y[0]=S=>u.$emit("change",S)),onQueryChange:t.unref(I)},{before:t.withCtx(()=>[t.renderSlot(u.$slots,"before",{},()=>[t.createVNode(t.unref(Ae.SearchIcon),{color:t.unref(Jc),size:t.unref(em)},null,8,["color","size"])],!0)]),"selected-item":t.withCtx(({item:S})=>[t.renderSlot(u.$slots,"selected-item",{item:S},()=>[t.createElementVNode("span",rm,[t.createElementVNode("span",lm,t.toDisplayString(S.label??S.id),1)])],!0)]),item:t.withCtx(({item:S})=>[t.renderSlot(u.$slots,"item",{item:S},()=>[t.createElementVNode("div",sm,[t.createElementVNode("span",dm,t.toDisplayString(S.label??t.unref(uo)),1),t.createElementVNode("span",cm,t.toDisplayString(S.id),1)])],!0)]),_:3},8,["id","disabled","dom-id","empty-message","error","loading","placeholder","readonly","suggestions","onQueryChange"]))}}),[["__scopeId","data-v-28628e7b"]]);function Oa(e,n,o){return o?Me.SET_REFERRAL_VALUE:e&&!n||!e&&n?Me.UPDATE_ENTITY:e&&n?Me.CREATE_FROM_ENTITY:Me.CREATE_NOT_FROM_ENTITY}const hm={components:{FieldScopedEntitySelect:Ia},mixins:[Ne],inject:[ye],emits:["model-updated"],setup(){const{t:e}=pe.createI18n("en-us",_e);return{t:e}},data(){return{idValue:"",error:null,initialItem:null,selectedItem:null,loading:!1}},computed:{fieldState(){return Oa(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search},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 Me.UPDATE_ENTITY:if(!this[ye]){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 Me.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Me.SET_REFERRAL_VALUE:this.idValue=this.value}e&&(this.initialItem=this.transformItem(e),this.selectedItem=this.initialItem)}catch(o){this.error=o.message||this.t("fields.auto_suggest.error.load_entity",{entity:this.schema.entity}),console.error("err!",o)}finally{this.loading=!1}},methods:{async getOne(e){if(!this[ye])return console.warn("[@kong-ui-public/forms] No API service provided"),{};const n=await this[ye].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){var o;const n=((o=this.schema)==null?void 0:o.labelField)||"id";return{...e,label:n&&e?e[n]:"",value:e.id}},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},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}}};function pm(e,n,o,a,r,i){const s=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(s,{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,"initial-item-selected":i.initialValueSelected,"label-field":e.schema.labelField||"id",placeholder:r.loading?a.t("fields.auto_suggest.loading"):e.schema.placeholder,"selected-item":r.selectedItem,"selected-item-loading":r.loading,onChange:i.onSelected},null,8,["id","allow-uuid-search","disabled","dom-id","entity","error","field-disabled","fields","initial-item-selected","label-field","placeholder","selected-item","selected-item-loading","onChange"])]),_:1},8,["text"])}const Va=x(hm,[["render",pm],["__scopeId","data-v-9ab50e80"]]),An=50,gm={mixins:[Ne],inject:[ye],emits:["model-updated"],setup(){const{t:e}=pe.createI18n("en-us",_e);return{t:e}},data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Oa(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 Me.UPDATE_ENTITY:if(!this[ye]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[ye].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 Me.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Me.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=mt(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;kn(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(d=>{r.has(d.id)||(r.add(d.id),n.push({...d,label:this.getSuggestionLabel(d),value:d.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[ye])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<An;){const a=await this[ye].getAll(this.entity,{size:An,offset:o,...e});if(n.push(...a.data.data),o=a.data.offset,!o)break}return n.slice(0,An)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[ye]?(await this[ye].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}}},ym=["data-testid","data-testlabel"],bm=["data-testid"],_m={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]=d=>r.idValue=d),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:d})=>[t.createElementVNode("span",{class:"first-part","data-testid":d.id&&`${d.id}-0`,"data-testlabel":d.label},t.toDisplayString(i.getSuggestionLabel(d).split(" - ")[0]),9,ym),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.getSuggestionLabel(d).split(" - ").slice(1),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m,class:"field-span","data-testid":d.id&&`${d.id}-${m+1}`||m+1},t.toDisplayString(c),9,bm))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",_m,[t.createElementVNode("span",null,t.toDisplayString(r.message),1)])]),_:1},8,["id","modelValue","disabled","items","loading","placeholder","onChange","onQueryChange"])]),_:1},8,["text"])}const Ba=x(gm,[["render",Em],["__scopeId","data-v-433129a3"]]);function Tm(e){const n=t.ref([]),o=t.ref(null),a=g=>Ze(g)?Je[g]!=null?Je[g]:(console.warn(`'${g}' is not a validator function!`),null):g,r=t.computed({get(){var V,I;let g;return j(v(e.schema,"get"))?g=e.schema.get((V=e.model)==null?void 0:V.value):g=v((I=e.model)==null?void 0:I.value,e.schema.model),E(g)},set(g){const V=r;g=M(g),j(g)?g(g,V):d(g,V)}}),i=g=>{var B;c();const V=v(e.formOptions,"validateAsync",!1);let I=[];if(e.schema.readonly!==!0&&e.disabled!==!0){const A=[],C=(B=e.schema)==null?void 0:B.validator;C&&(Array.isArray(C)?de(C,T=>{A.push(a(T))}):A.push(a(C))),j(e.externalValidator)&&A.push(e.externalValidator),de(A,T=>{var _,w;if(V)I.push(T(r.value,e.schema,(_=e.model)==null?void 0:_.value));else{const O=T(r.value,e.schema,(w=e.model)==null?void 0:w.value);O&&j(O.then)?O.then(u=>{u&&(n.value=n.value.concat(u));const y=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:y,errors:n.value,field:e.schema})}):O&&(I=I.concat(O))}})}const L=A=>{var T,_;let C=[];if(de(ia(A),w=>{Array.isArray(w)&&w.length>0?C=C.concat(w):Ze(w)&&C.push(w)}),j((T=e.schema)==null?void 0:T.onValidated)&&e.schema.onValidated((_=e.model)==null?void 0:_.value,C,e.schema),!g){const w=C.length===0;e.emitValidated&&e.emitValidated({isValid:w,errors:C,field:e.schema})}return A=C,C};return V?Promise.all(I).then(L):L(I)},s=()=>{j(o.value)?o.value():o.value=mt(i,v(e.schema,"validateDebounceTime",v(e.formOptions,"validateDebounceTime",500)))},d=(g,V)=>{var L,B,A;let I=!1;j(e.schema.set)?(e.schema.set((L=e.model)==null?void 0:L.value,g),I=!0):e.schema.model&&(m(e.schema.model,g),I=!0),I&&(e.emitModelUpdated&&((B=e.model)!=null&&B.value)&&e.emitModelUpdated({value:g,model:e.schema.model}),j(e.schema.onChanged)&&e.schema.onChanged((A=e.model)==null?void 0:A.value,g,V,e.schema),v(e.formOptions,"validateAfterChanged",!1)===!0&&(v(e.schema,"validateDebounceTime",v(e.formOptions,"validateDebounceTime",0))>0?s():i()))},c=()=>{n.value.splice(0)},m=(g,V)=>{var T;let I=g.replace(/\[(\w+)\]/g,".$1");I=I.replace(/^\./,"");let L=((T=e.model)==null?void 0:T.value)||{},B=0;const A=I.split("."),C=A.length;for(;B<C;){const _=A[B];if(B<C-1)L[_]!==void 0||(L[_]={}),L=L[_];else{L[_]=V;return}++B}},p=(g,V=!1)=>{const I=v(e.formOptions,"fieldIdPrefix","");return En(g,I)+(V?"-"+ra():"")},f=g=>`${p(g)}-label`,h=()=>v(e.schema,"fieldClasses",[]),E=g=>e.formatValueToField&&typeof e.formatValueToField=="function"?e.formatValueToField(g):g,M=g=>e.formatValueToModel&&typeof e.formatValueToModel=="function"?e.formatValueToModel(g):g;return{value:r,clearValidationErrors:c,getFieldID:p,getLabelId:f,getFieldClasses:h,updateModelValue:d}}function Sm(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 Cm(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 Ce={useAbstractFields:Tm,useRedisPartial:Sm,useRedisNonStandardFields:Cm},wm={class:"form-field-wrapper"},Fa=x(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(be,void 0),{updateModelValue:d,getFieldID:c,clearValidationErrors:m,value:p}=Ce.useAbstractFields({model:i.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:B=>{r("modelUpdated",B.value,B.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{var A,C;const B=(A=a.schema)==null?void 0:A.inputType.toLowerCase();if(B==="number"&&((C=a.schema)==null?void 0:C.referenceable)===!0)return"text";switch(B){case"string":return"text";case"datetime":return"datetime-local";default:return B||"text"}}),h={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},E=(B,A)=>{var w,O;let C=B;const T=h[f.value]||"",_=ut.parse(B,T);_&&((w=a.schema)!=null&&w.format?C=ut.format(_,(O=a.schema)==null?void 0:O.format):C=_.valueOf()),d(C,A)},M=(B,A)=>{Cn(B)||(B=NaN),d(B,A)},g=B=>{let A=B;switch(a.schema.inputType){case"number":case"range":Sa(parseFloat(B))&&(A=parseFloat(B));break}p.value=A,d(A,B)},V=B=>{p.value=B,d(B,B)},I=t.ref(null),L=()=>{var B;j(I.value)&&((B=I.value)==null||B.flush())};return t.onMounted(()=>{switch(f.value){case"number":case"range":I.value=mt((B,A)=>{M(B,A)},parseInt(v(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":I.value=mt((B,A)=>{E(B,A)},parseInt(v(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.")}),(B,A)=>{const C=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",wm,[t.createVNode(C,t.mergeProps(B.$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:L,"onUpdate:modelValue":g}),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:V,value:t.unref(p)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-c9bb165e"]]),km={name:"FieldMetric",components:{AddIcon:Ae.AddIcon,TrashIcon:Ae.TrashIcon},mixins:[Ne],emits:["remove-item"],data(){return{contentVisible:!1}}},Am={key:0,class:"content"};function Mm(e,n,o,a,r,i){const s=t.resolveComponent("AddIcon"),d=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",Am,[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(d)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const Ra=x(km,[["render",Mm]]),Nm={class:"field-object-container"},Im={key:1},Om=["id"],Vm={key:0},Bm=["onUpdate:modelValue"],Fm={key:1},Rm=["onUpdate:modelValue"],Dm={key:2},Lm=["onUpdate:modelValue"],Um=["onClick"],Da=x(Object.assign({mixins:[Ne],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",Nm,[n.schema.schema?(t.openBlock(),t.createBlock(H,{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",Im,[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",Vm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,type:"text"},null,8,Bm),[[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,Rm),[[t.vModelCheckbox,n.value[i]]])])):t.createCommentVNode("",!0),n.keyTypes[i]==="number"?(t.openBlock(),t.createElementBlock("td",Dm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[i]=s,type:"number"},null,8,Lm),[[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,Um)])]))),128))],10,Om),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"]]),Pm=["id"],$m=["data-testid"],xm={class:"item-wrapper"},vm={class:"index-wrapper"},jm={key:0},Km={key:1},qm=["onUpdate:modelValue","placeholder","type","onInput"],zm={key:0,class:"hint"},Hm={class:"input-item"},Gm=["placeholder"],Ym={key:0,class:"hint"},La=x(Object.assign({mixins:[Ne],inject:{autofillSlot:{from:be,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 d=r.split("-").filter(m=>n.find(p=>p.model===m)),c=r.split(`-${d}`)[0].split(`${o}-`)[1];d.length?a[c]={...a[c],[d]:e[r]}:a[r.substring(i+`${o}-`.length)]=e[r]}else a[r.substring(`${o}-`.length)]=e[r];else{const d=r.split("-").filter(m=>m===this.schema.model),c=r.split(`-${d}`)[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",xm,[t.createElementVNode("div",vm,[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(Ae.TrashIcon))]),_:1},8,["onClick"])])]),o[1]||(o[1]=t.createElementVNode("hr",{class:"divider"},null,-1)),n.subSchema?(t.openBlock(),t.createElementBlock("div",jm,[t.createVNode(H,{model:n.transformedModel[i],options:{helpAsHtml:!0},schema:n.subSchema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",Km,[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,qm),[[t.vModelDynamic,n.value[i]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",zm,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",Hm,[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,Gm),[[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",Ym,t.toDisplayString(n.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,Pm)}}}),[["__scopeId","data-v-0faeec4d"]]),Wm={class:"radio-selection-group"},Ua=x(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:d,clearValidationErrors:c}=Ce.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",Wm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(E,M)=>(t.openBlock(),t.createBlock(h,{id:e.schema.name+"-"+M,key:E.value,modelValue:t.unref(d),"onUpdate:modelValue":f[0]||(f[0]=g=>t.isRef(d)?d.value=g: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-a070103e"]]),Pa=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=g=>Z(g)?null:g,d=t.toRefs(a),{getFieldID:c,clearValidationErrors:m,value:p}=Ce.useAbstractFields({model:d.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:s,emitModelUpdated:g=>{r("modelUpdated",g.value,g.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{const g=a.schema.values;return h(typeof g=="function"?g.apply(this,[a.model,a.schema]):g)}),h=g=>{const V=[];return g.forEach(I=>{V.push({label:M(I),value:E(I),disabled:typeof I=="object"&&I.disabled||void 0,group:typeof I=="object"&&String(I.group||"").toUpperCase()||void 0})}),V},E=g=>{if(ge(g)){if(i.value&&typeof i.value.value<"u")return g[i.value.value];if(typeof g.id<"u")return String(g.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 g},M=g=>{if(ge(g)){if(i.value&&typeof i.value.name<"u")return g[i.value.name];if(typeof g.name<"u")return String(g.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(g)};return(g,V)=>{const I=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(I,{id:t.unref(c)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":V[0]||(V[0]=L=>t.isRef(p)?p.value=L: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"])}}}),Zm={class:"field-string-array"},$a=x(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:d,value:c}=Ce.useAbstractFields({model:t.toRef(()=>e.model),schema:e.schema,formOptions:e.formOptions,emitModelUpdated:E=>{a("modelUpdated",E.value,E.model)}});n({clearValidationErrors:d});const m=t.ref("");function p(E){return Array.isArray(E)?E.map(M=>String(M).trim()).filter(Boolean).join(", "):""}function f(E){return E?E.trim().split(",").map(M=>M.trim()).filter(Boolean):[]}function h(E){m.value=E;const M=f(E);r(M,c.value)}return t.watch(c,E=>{const M=E?p(E):"";p(f(m.value))!==M&&(m.value=M)},{immediate:!0}),(E,M)=>{const g=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Zm,[t.createVNode(g,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"]]),Xm={name:"FieldArray",components:{FieldArrayItem:Aa,FieldArrayMultiItem:Ma,FieldSelect:Pa,FieldMetric:Ra,FieldObject:Da,FieldObjectAdvanced:La,FieldAutoSuggest:Va,FieldAutoSuggestLegacy:Ba,FieldRadio:Ua,FieldArrayCardContainer:ka,FieldInput:Fa,FieldStringArray:$a,TrashIcon:Ae.TrashIcon},mixins:[Ne],inject:{autofillSlot:{from:be,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,d=>(d.id=`${d.id||d.model}-${o}`,d))),{...a,set(d,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"&&Cn(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")}}},Jm=["id"],Qm={key:0,class:"string-array-item"},eu={key:2},tu=["onUpdate:modelValue","aria-labelledby","type"],nu=["onUpdate:modelValue","aria-labelledby"];function ou(e,n,o,a,r,i){const s=t.resolveComponent("FieldStringArray"),d=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",Qm,[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(d,{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",eu,[(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":M=>e.value[h]=M,"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:M=>{i.handleInput(M,h)}}),null,16,["aria-labelledby","model-value","type","onInput"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,"onUpdate:modelValue":M=>e.value[h]=M,"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,tu)),[[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,nu),[[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,Jm)):t.createCommentVNode("",!0)}const au=x(Xm,[["render",ou],["__scopeId","data-v-7633b3a8"]]),iu={class:"form-field-wrapper field-checkbox"},ru=x(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:d,clearValidationErrors:c}=Ce.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",iu,[t.createVNode(f,t.mergeProps(m.$attrs,{id:t.unref(s)(e.schema),modelValue:t.unref(d),"onUpdate:modelValue":p[0]||(p[0]=h=>t.isRef(d)?d.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-6811d435"]]),lu={class:"wrapper"},su=["disabled"],du=["id","checked","disabled","onChange","name"],cu=["disabled"],mu={class:"info"},uu={class:"dropList"},fu=["id","checked","disabled","onChange","name"];function hu(e,n,o,a,r,i){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",lu,[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,d=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":i.isItemChecked(d)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:i.isItemChecked(d)||null,disabled:e.disabled||null,onChange:c=>i.onChanged(c,d),name:i.getInputName(d)},null,40,du),[[s,"input"]]),t.createTextVNode(t.toDisplayString(i.getItemName(d)),1)])],2))),256))],8,su)):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]=(...d)=>i.onExpandCombo&&i.onExpandCombo(...d))},[t.createElementVNode("div",mu,t.toDisplayString(i.selectedCount)+" selected",1),n[1]||(n[1]=t.createElementVNode("div",{class:"arrow"},null,-1))],2),t.createElementVNode("div",uu,[r.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.items,d=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":i.isItemChecked(d)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:i.isItemChecked(d)||null,disabled:e.disabled||null,onChange:c=>i.onChanged(c,d),name:i.getInputName(d)},null,40,fu),[[s,"input"]]),t.createTextVNode(t.toDisplayString(i.getItemName(d)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,cu))])),[[s,"wrapper"]])}const pu=x({mixins:[Ne],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?ta(this.schema.inputName+"_"+this.getItemValue(e)):ta(this.getItemValue(e))},getItemValue(e){if(ge(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(ge(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((Z(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const o=Na(this.value);o.push(this.getItemValue(n)),this.value=o}else{const o=Na(this.value);o.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",hu]]),gu={name:"FieldKeyValuePairs",components:{TrashIcon:Ae.TrashIcon},mixins:[Ne],inject:{autofillSlot:{from:be,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)}}},yu={class:"key-value-pairs-editor"},bu={class:"pair-item-cell"},_u=["data-testid","placeholder","value","onInput"],Eu={class:"pair-item-cell"},Tu=["data-testid","placeholder","value","onInput"];function Su(e,n,o,a,r,i){const s=t.resolveComponent("TrashIcon"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",yu,[(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",bu,[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,_u),(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(d,{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(d,{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 Cu=x(gu,[["render",Su],["__scopeId","data-v-be99d00c"]]),wu=x(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}=Ce.useAbstractFields({model:o.model,schema:n.schema,formOptions:n.formOptions});return(i,s)=>{const d=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(d,{id:t.unref(a)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)),1)]),_:1},8,["id"])],2)}}}),[["__scopeId","data-v-e3423a11"]]),ku=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:d,clearValidationErrors:c,value:m}=Ce.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(d)(e.schema),modelValue:t.unref(m),"onUpdate:modelValue":h[0]||(h[0]=M=>t.isRef(m)?m.value=M: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(d)(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"])}}}),Au={class:"selection-group"},Mu={class:"form-group horizontal-radios"},Nu={class:"radio-group"},Iu=["disabled","value"],Ou={class:"control-help"},Vu={key:0,class:"option-field"},Bu={class:"option-field-container"},Fu=x(Object.assign({mixins:[Ne],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}=pe.createI18n("en-us",_e);return(o,a)=>(t.openBlock(),t.createElementBlock("div",Au,[(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",Mu,[t.createElementVNode("div",Nu,[(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,Iu),[[t.vModelRadio,o.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(r.label)+" ",1),t.createElementVNode("div",Ou,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",Vu,[t.createElementVNode("div",Bu,[t.createVNode(H,{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-0b44571b"]]),Ru={class:"form-field-wrapper"},Du=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}=pe.createI18n("en-us",_e),s=h=>h!=null&&a.schema.valueOn?h===a.schema.valueOn:h,d=h=>h!=null&&a.schema.valueOn?h?a.schema.valueOn:a.schema.valueOff:h,c=t.toRefs(a),{getFieldID:m,value:p,clearValidationErrors:f}=Ce.useAbstractFields({model:c.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:s,formatValueToModel:d,emitModelUpdated:h=>{r("modelUpdated",h.value,h.model)}});return n({clearValidationErrors:f}),(h,E)=>{const M=t.resolveComponent("KInputSwitch");return t.openBlock(),t.createElementBlock("div",Ru,[t.createVNode(M,{id:t.unref(m)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":E[0]||(E[0]=g=>t.isRef(p)?p.value=g: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"])])}}}),Lu={class:"field-textarea"},Uu={name:"FormGroup",components:Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:zc,FieldArray:au,FieldArrayCardContainer:ka,FieldArrayItem:Aa,FieldArrayMultiItem:Ma,FieldAutoSuggest:Va,FieldAutoSuggestLegacy:Ba,FieldCheckbox:ru,FieldChecklist:pu,FieldInput:Fa,FieldKeyValuePairs:Cu,FieldLabel:wu,FieldMetric:Ra,FieldMultiselect:ku,FieldObject:Da,FieldObjectAdvanced:La,FieldRadio:Ua,FieldSelect:Pa,FieldSelectionGroup:Fu,FieldStringArray:$a,FieldSwitch:Du,FieldTextArea:x(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(be,void 0),{updateModelValue:d,getFieldID:c,clearValidationErrors:m,value:p}=Ce.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,d(h,h)};return(h,E)=>{const M=t.resolveComponent("KTextArea");return t.openBlock(),t.createElementBlock("div",Lu,[t.createVNode(M,t.mergeProps(h.$attrs,{id:t.unref(c)(e.schema),modelValue:t.unref(p),"onUpdate:modelValue":E[0]||(E[0]=g=>t.isRef(p)?p.value=g: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:[na],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 Jl.sanitize(e)},fieldTypeHasLabel(e){if(Z(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=v(this.options,"fieldIdPrefix","");return En(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldComponent(e){return e.component?e.component:"field-"+e.type},getButtonType(e){return v(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 j(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\./,""):""}}},Pu=["innerHTML"],$u={class:"icon-wrapper"},xu={key:0,class:"link-wrapper"},vu={class:"field-wrap"},ju={key:0,class:"buttons"},Ku=["type","onClick","textContent"],qu={key:1,class:"hint"},zu={key:2,class:"errors help-block"};function Hu(e,n,o,a,r,i){const s=t.resolveComponent("KExternalLink"),d=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(d,{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",xu,[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,Pu)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",vu,[(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",ju,[(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,Ku))),128))])):t.createCommentVNode("",!0)]),o.field.hint&&o.field.type!=="input"?(t.openBlock(),t.createElementBlock("div",qu,t.toDisplayString(i.fieldHint(o.field)),1)):t.createCommentVNode("",!0),i.fieldErrors(o.field).length>0?(t.openBlock(),t.createElementBlock("div",zu,[(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 xa=x(Uu,[["render",Hu],["__scopeId","data-v-87df5b50"]]);var At=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(At||{});const Gu=e=>{var n,o;return e.type===At.REDIS_CE?"Host/Port":(n=e.config.sentinel_nodes)!=null&&n.length?"Sentinel":(o=e.config.cluster_nodes)!=null&&o.length?"Cluster":"Host/Port"},Yu={[At.REDIS_CE]:"open source",[At.REDIS_EE]:"enterprise"},va=e=>Yu[e]??"",ft={KONNECT_MANAGED:"konnect-managed",SELF_MANAGED:"self-managed"},Wu="managed_cache.v0";function Zu(e){const o=(Array.isArray(e.tags)?e.tags:[]).filter(a=>typeof a=="string").map(a=>a.toLowerCase());return o.includes(ft.KONNECT_MANAGED)||o.includes(Wu)?ft.KONNECT_MANAGED:ft.SELF_MANAGED}const Xu={class:"partial-config-card"},Ju={class:"config-card-row-label"},Qu={class:"label-text"},ef=["data-testid"],tf=["data-testid"],nf={key:1},of=["data-testid"],af=["data-testid"],rf=x(t.defineComponent({__name:"RedisConfigCard",props:{configFields:{type:Object,required:!0},pluginRedisFields:{type:Array,required:!0}},setup(e){const{t:n,formatUnixTimeStamp:o}=pe.createI18n("en-us",_e),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:d}=Bt.useStringHelpers(),c=t.computed(()=>Object.entries(r.configFields).map(([f,h])=>{var E,M,g,V;return{key:f,label:((E=a[f])==null?void 0:E.label)??d(f),value:(M=a[f])!=null&&M.formatter?a[f].formatter(h):h,type:((g=a[f])==null?void 0:g.type)??s(f,h),order:((V=a[f])==null?void 0:V.order)??100}}).sort((f,h)=>f.order-h.order).filter(f=>f.type!=="hidden")),m=Ce.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",Xu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,({key:M,label:g,value:V,type:I})=>(t.openBlock(),t.createElementBlock("div",{key:M,class:"partial-config-card-row"},[t.createElementVNode("div",Ju,[t.createElementVNode("div",Qu,t.toDisplayString(g),1)]),t.createElementVNode("div",{class:"config-card-row-value","data-testid":`${M}-property-value`},[i(V)?(t.openBlock(),t.createElementBlock("div",nf,[I==="password"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${M}-copy-password`},[t.createVNode(E,{format:"redacted",text:String(V)},null,8,["text"])],8,of)):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`${M}-plain-text`},t.toDisplayString(V),9,af))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${M}-no-value`}," – ",8,tf))],8,ef)]))),128))])}}}),[["__scopeId","data-v-57f78095"]]),lf={class:"redis-config-select","data-testid":"redis-config-select"},sf={class:"selected-redis-config"},df=["data-testid"],cf={class:"select-item-name","data-testid":"selected-redis-config"},mf={class:"empty-redis-config","data-testid":"empty-redis-config"},uf={key:1,class:"redis-shared-config-error-message","data-testid":"redis-config-fetch-error"},ff="1000",ja=x(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},isKonnectManagedRedisEnabled:{type:Boolean,default:!1}},emits:["showNewPartialModal"],setup(e){const{t:n}=pe.createI18n("en-us",_e),o=t.inject(mo),a={konnect:{getOne:"/v2/control-planes/{controlPlaneId}/core-entities/{workspace}/partials/{id}",getAll:"/v2/control-planes/{controlPlaneId}/core-entities/{workspace}/partials"},kongManager:{getOne:"/{workspace}/partials/{id}",getAll:"/{workspace}/partials"}},r=e,i=t.ref(null),{getMessageFromError:s}=Bt.useErrors(),d=t.inject(ln),{debouncedQueryChange:c,loading:m,error:p,loadItems:f,results:h}=Bt.useDebouncedFilter(d,a[d.app].getAll,ff,{fetchedItemsKey:"data",searchKeys:["id","name"]}),E=t.computed(()=>p.value?s(p.value):""),M=t.computed(()=>r.isCustomPlugin?n("redis.custom_plugin.tooltip"):n("redis.shared_configuration.tooltip",{type:va(r.redisType)})),g=t.computed(()=>r.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.title"):n("redis.shared_configuration.title")),V=t.computed(()=>r.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.selector.placeholder"):n("redis.shared_configuration.selector.placeholder")),I=t.computed(()=>r.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.create_new_configuration"):n("redis.shared_configuration.create_new_configuration",{type:va(r.redisType)})),L=t.computed(()=>E.value||n("redis.shared_configuration.error")),B=w=>{let O=`${d.apiBaseUrl}${a[d.app].getOne}`;return d.app==="konnect"&&(O=O.replace(/{controlPlaneId}/gi,(d==null?void 0:d.controlPlaneId)||"")),O=O.replace(/\/{workspace}/gi,d!=null&&d.workspace?`/${d.workspace}`:"").replace(/{id}/gi,String(w)),O},A=t.computed(()=>{const w=(h.value||[]).map(O=>{const u=O,y=r.isKonnectManagedRedisEnabled?Zu(u):void 0,S=y===ft.KONNECT_MANAGED;return{...r.isKonnectManagedRedisEnabled&&y?{source:y}:{},label:O.id,name:O.name,value:O.id,type:O.type,tag:r.isKonnectManagedRedisEnabled&&S?void 0:Gu(u)}}).filter(O=>O.type==="redis-ce"||O.type==="redis-ee");return r.redisType!=="all"?w.filter(O=>O.type===r.redisType):w}),C=t.computed(()=>{const w=A.value;if(!r.isKonnectManagedRedisEnabled)return w;const O=w.filter(S=>S.source===ft.KONNECT_MANAGED),u=w.filter(S=>S.source===ft.SELF_MANAGED),y=[];return O.length>0&&y.push({label:n("redis.managed_ui.groups.konnect_managed"),items:O}),u.length>0&&y.push({label:n("redis.managed_ui.groups.self_managed"),items:u}),y}),{axiosInstance:T}=Bt.useAxios(d==null?void 0:d.axiosRequestConfig),_=async w=>{if(w){r.updateRedisModel(w);try{const O=await T.get(B(w));if(O.data.config){const u=Object.assign(O.data,O.data.config);delete u.config,i.value=u}}catch(O){console.error(O)}}};return t.watch(()=>o==null?void 0:o.value,async w=>{w&&await f()}),t.onBeforeMount(()=>{f(),r.defaultRedisConfigItem&&_(r.defaultRedisConfigItem)}),(w,O)=>{const u=t.resolveComponent("KLabel"),y=t.resolveComponent("KBadge"),S=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",lf,[t.createVNode(u,{info:M.value,"tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.value),1)]),_:1},8,["info"]),O[2]||(O[2]=t.createElementVNode("div",{class:"shared-redis-config-title"},null,-1)),t.createVNode(S,{class:"redis-config-select-trigger","data-testid":"redis-config-select-trigger","enable-filtering":"","filter-function":()=>!0,items:C.value,loading:t.unref(m),"model-value":e.defaultRedisConfigItem,placeholder:V.value,onChange:O[1]||(O[1]=k=>_(k==null?void 0:k.value)),onQueryChange:t.unref(c)},{"selected-item-template":t.withCtx(({item:k})=>[t.createElementVNode("div",sf,t.toDisplayString(k.name),1)]),"item-template":t.withCtx(({item:k})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${k.name}`},[t.createElementVNode("span",cf,t.toDisplayString(k.name),1),k.tag?(t.openBlock(),t.createBlock(y,{key:0,appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,df)]),empty:t.withCtx(()=>[t.createElementVNode("div",mf,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:O[0]||(O[0]=k=>w.$emit("showNewPartialModal"))},[t.createVNode(t.unref(Ae.AddIcon),{size:t.unref(Qc)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(I.value),1)])]),_:1},8,["items","loading","model-value","placeholder","onQueryChange"])]),i.value?(t.openBlock(),t.createBlock(rf,{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",uf,t.toDisplayString(L.value),1)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-3b12e969"]]),hf={key:0},pf={class:"redis-config-radio-group","data-testid":"redis-config-radio-group"},gf={key:0,class:"shared-redis-config"},yf={key:1,class:"dedicated-redis-config"},bf={class:"dedicated-redis-config-title"},_f={name:"VueFormGenerator",components:{formGroup:xa,formRedis:x(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},isKonnectManagedRedisEnabled:{type:Boolean,default:!1}},emits:["modelUpdated","partialToggled","showNewPartialModal","refreshModel","validated"],setup(e,{emit:n}){const o=e,a=n,{t:r}=pe.createI18n("en-us",_e),i=t.computed(()=>o.isKonnectManagedRedisEnabled?r("redis.managed_ui.title"):r("redis.title")),s=t.computed(()=>o.isKonnectManagedRedisEnabled?r("redis.managed_ui.shared_configuration.description"):r("redis.shared_configuration.description")),d=t.computed(()=>o.isKonnectManagedRedisEnabled?r("redis.managed_ui.shared_configuration.label"):r("redis.shared_configuration.label")),c=t.computed(()=>o.isKonnectManagedRedisEnabled?r("redis.managed_ui.dedicated_configuration.description"):r("redis.dedicated_configuration.description")),m=t.computed(()=>o.isKonnectManagedRedisEnabled?r("redis.managed_ui.dedicated_configuration.label"):r("redis.dedicated_configuration.label")),p=t.computed(()=>o.field.pluginType==="custom"),f=t.ref(!o.isEditing),h=t.ref(),E=t.ref({}),M=t.ref(),g=A=>j(A.visible)?A.visible.call(this,o.model,A,this):Z(A.visible)?!0:A.visible,V=async A=>{a("modelUpdated",[{id:A,path:o.redisPath}],"partials"),M.value=[{id:A,path:o.redisPath}],h.value=A},I=(A,C)=>{E.value={...E.value,[C]:A},a("modelUpdated",A,C)},L=()=>{a("refreshModel")},B=(A,C,T)=>{a("validated",A,C,T)};return t.watch(()=>f.value,A=>{A?M.value&&a("partialToggled","redis",{partials:M.value}):a("partialToggled","partials",E.value)}),t.onBeforeMount(()=>{var A,C,T;if(o.model&&(E.value=o.field.fields.reduce((_,w)=>(Object.keys(o.model).includes(w.model)&&(_[w.model]=o.model[w.model]),_),{})),(T=(C=(A=o==null?void 0:o.model)==null?void 0:A.partials)==null?void 0:C[0])!=null&&T.id){const _=o.model.partials[0].id;f.value=!0,h.value=_}}),(A,C)=>{const T=t.resolveComponent("KAlert"),_=t.resolveComponent("KBadge"),w=t.resolveComponent("KRadio"),O=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",null,[p.value?(t.openBlock(),t.createElementBlock("div",hf,[t.createVNode(T,{"data-testid":"custom-plugin-redis-config-note",message:t.unref(r)("redis.custom_plugin.alert")},null,8,["message"]),t.createVNode(ja,{"default-redis-config-item":h.value,"is-custom-plugin":"","is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,"plugin-redis-fields":e.field.fields,"update-redis-model":V,onShowNewPartialModal:C[0]||(C[0]=u=>A.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","is-konnect-managed-redis-enabled","plugin-redis-fields"])])):(t.openBlock(),t.createBlock(O,{key:1,class:"redis-config-card","data-testid":"redis-config-card",title:i.value},{default:t.withCtx(()=>[t.createElementVNode("div",pf,[t.createVNode(w,{modelValue:f.value,"onUpdate:modelValue":C[1]||(C[1]=u=>f.value=u),card:"","card-orientation":"horizontal","data-testid":"shared-redis-config-radio",description:s.value,label:d.value,"selected-value":!0},{default:t.withCtx(()=>[e.isKonnectManagedRedisEnabled?(t.openBlock(),t.createBlock(_,{key:0,appearance:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("redis.managed_ui.shared_configuration.badge")),1)]),_:1})):t.createCommentVNode("",!0)]),_:1},8,["modelValue","description","label"]),t.createVNode(w,{modelValue:f.value,"onUpdate:modelValue":C[2]||(C[2]=u=>f.value=u),card:"","card-orientation":"horizontal","data-testid":"dedicated-redis-config-radio",description:c.value,label:m.value,"selected-value":!1},null,8,["modelValue","description","label"])]),f.value?(t.openBlock(),t.createElementBlock("div",gf,[t.createVNode(ja,{"default-redis-config-item":h.value,"is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,"plugin-redis-fields":e.field.fields,"redis-type":e.field.redisType,"update-redis-model":V,onShowNewPartialModal:C[3]||(C[3]=u=>A.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","is-konnect-managed-redis-enabled","plugin-redis-fields","redis-type"])])):(t.openBlock(),t.createElementBlock("div",yf,[t.createElementVNode("div",bf,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,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.model},[g(u)?(t.openBlock(),t.createBlock(xa,{key:0,ref_for:!0,ref:"children",errors:e.errors,field:u,model:e.model,options:e.options,vfg:e.vfg,onModelUpdated:I,onRefreshModel:L,onValidated:B},null,8,["errors","field","model","options","vfg"])):t.createCommentVNode("",!0)],64))),128))]),_:1}))]))]),_:1},8,["title"]))])}}}),[["__scopeId","data-v-58023d89"]])},mixins:[na],inject:{autofillSlot:{from:be,default:void 0}},provide(){var e;return{...!this.autofillSlot&&{[be]:(e=this.$slots)==null?void 0:e[We]}}},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},isKonnectManagedRedisEnabled:{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&&de(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&de(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 j(e.visible)?e.visible.call(this,this.model,e,this):Z(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&&de(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=v(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],o=[];de(this.$refs.children,r=>{j(r.validate)&&(n.push(r.$refs.child),o.push(r.$refs.child.validate(!0)))});const a=r=>{const i=[];de(r,(d,c)=>{Array.isArray(d)&&d.length>0&&de(d,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),de(this.$refs.children,e=>{e.clearValidationErrors()})}}},Ef={key:0,class:"vue-form-generator"},Tf={key:0};function Sf(e,n,o,a,r,i){const s=t.resolveComponent("form-redis"),d=t.resolveComponent("form-group"),c=t.resolveComponent("KCollapse");return o.schema!=null?(t.openBlock(),t.createElementBlock("div",Ef,[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,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,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","is-konnect-managed-redis-enabled","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):i.fieldVisible(m)?(t.openBlock(),t.createBlock(d,{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,M;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,(M=m.slots)==null?void 0:M.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,g=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:g.model},[i.fieldVisible(g)?(t.openBlock(),t.createBlock(d,{key:0,ref_for:!0,ref:"children",errors:r.errors,field:g,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":g=>r.collapseStates[`group-${p}-nested`]=g},{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,g=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:g.model},[g.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(s,{key:0,errors:r.errors,field:g,"is-editing":o.isEditing,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,model:o.model,options:o.options,tag:o.tag,vfg:r.vfg,onModelUpdated:i.onModelUpdated,onPartialToggled:i.onPartialToggled,onShowNewPartialModal:V=>e.$emit("showNewPartialModal",g.redisType),onValidated:i.onFieldValidated},null,8,["errors","field","is-editing","is-konnect-managed-redis-enabled","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):i.fieldVisible(g)?(t.openBlock(),t.createBlock(d,{key:1,ref_for:!0,ref:"children",errors:r.errors,field:g,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",Tf,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(d,{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 H=x(_f,[["render",Sf]]),Cf=new Set(["config-principals-enabled","config-principals-directory","config-principals-principal_by","config-principals-principal_claim","config-principals-match_consumer","config-principals-match_consumer_groups","config-principals-error_on_miss"]),wf={name:"OIDCPrincipals",components:{VueFormGenerator:H},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>({})},onModelUpdated:{type:Function,required:!0}},computed:{principalsSchema(){return{fields:(this.formSchema.fields||[]).filter(e=>Cf.has(e.model))}}}},kf={class:"oidc-principals-section","data-testid":"oidc-principals-section"};function Af(e,n,o,a,r,i){const s=t.resolveComponent("VueFormGenerator");return t.openBlock(),t.createElementBlock("div",kf,[n[0]||(n[0]=t.createElementVNode("div",{class:"principals-header"}," Who should manage authentication and credentials? ",-1)),n[1]||(n[1]=t.createElementVNode("div",{class:"principals-description"},[t.createTextVNode(" Use Consumers for Consumer-based authentication. Use Kong Identity for principal-based authentication and advanced integrations. "),t.createElementVNode("a",{href:"https://developer.konghq.com/kong-identity/",target:"_blank"},"Learn more.")],-1)),t.createVNode(s,{model:o.formModel,options:o.formOptions,schema:i.principalsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])])}const Mf=x(wf,[["render",Af],["__scopeId","data-v-64b2d504"]]),Mt={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"},Ka=new Set(["config-client_id","config-client_secret","config-issuer"]),qa=new Set(["config-principals-enabled","config-principals-directory","config-principals-principal_by","config-principals-principal_claim","config-principals-match_consumer","config-principals-match_consumer_groups","config-principals-error_on_miss"]),za=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"]),Nf={name:"OIDCForm",components:{VueFormGenerator:H,OIDCPrincipals:Mf},provide(){var e;return{[be]:(e=this.$slots)==null?void 0:e[We]}},inject:{formsConfig:{from:ln,default:()=>({})}},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},isKonnectManagedRedisEnabled:{type:Boolean,default:!1},showNewPartialModal:{type:Function,default:()=>{}}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,openIdConnectLink:Mt.openIdConnectDocs,openIdConnectJWKLink:Mt.openIdConnectJWKDocs,openIdConnectClusterNodesLink:Mt.openIdConnectClusterNodesDocs,openIdConfigurationDocs:Mt.openIdConfigurationDocs,openIdAuthorizationDocs:Mt.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},hasPrincipalsFields(){var e;return(e=this.formSchema.fields)==null?void 0:e.some(n=>qa.has(n.model))},isKonnect(){var e;return((e=this.formsConfig)==null?void 0:e.app)==="konnect"}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){var e;if(!this.init){this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(i=>!i.model.startsWith("config")&&i.model!=="tags")};const n=this.formSchema.fields.reduce((i,s)=>(i[s.model]=s,i),{});this.commonFieldsSchema={fields:Array.from(Ka).reduce((i,s)=>(n[s]&&i.push(n[s]),i),[])},this.authFieldsSchema={fields:Array.from(za).reduce((i,s)=>(n[s]&&i.push(n[s]),i),[])};const{redis:o,redisModels:a}=Ce.useRedisPartial(this.formSchema);this.advancedFieldsSchema={fields:this.formSchema.fields.filter(i=>i.model.startsWith("config")&&i.model!=="config-auth_methods"&&!Ka.has(i.model)&&!za.has(i.model)&&!qa.has(i.model)&&(!this.enableRedisPartial||!a.includes(i.model))||i.model==="tags").reduce((i,s)=>{var d,c,m,p;switch(s.model){case"config-client_jwk":{if(Array.isArray((c=(d=s.items)==null?void 0:d.schema)==null?void 0:c.fields))for(const f of s.items.schema.fields)f.label=f.model;i.push({...s,link:this.openIdConnectJWKLink,newElementButtonLabel:"+ Add Client JWK",...Array.isArray((p=(m=s.items)==null?void 0:m.schema)==null?void 0:p.fields)&&s.items.schema.fields.map(f=>({...f,label:f.model}))});break}case"config-session_redis_cluster_nodes":{i.push({...s,link:this.openIdConnectClusterNodesLink,newElementButtonLabel:"+ Add Cluster Node"});break}default:i.push(s)}return i},[])},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 i of[this.commonFieldsSchema,this.authFieldsSchema,this.advancedFieldsSchema])for(const s of i.fields){const d=(e=n[s.model])==null?void 0:e.help;s.help===void 0&&typeof d=="string"&&(s.help=d)}const r=this.formModel["config-consumer_claim"];if(r!=null&&r!==""&&(!this.formModel["config-consumer_claims"]||this.formModel["config-consumer_claims"].length===0)){const i=Array.isArray(r)?r:[r];this.formModel["config-consumer_claims"]=[i],this.onModelUpdated()}}},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()}}},If={class:"general-settings"},Of={class:"link-wrapper"},Vf={class:"auth-method-container"},Bf={class:"general-settings"},Ff={class:"link-wrapper"},Rf={class:"general-settings"},Df={class:"link-wrapper"};function Lf(e,n,o,a,r,i){const s=t.resolveComponent("VueFormGenerator"),d=t.resolveComponent("KExternalLink"),c=t.resolveComponent("OIDCPrincipals"),m=t.resolveComponent("KLabel"),p=t.resolveComponent("KCheckbox"),f=t.resolveComponent("KInputSwitch"),h=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(h,{tabs:r.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",If,[t.createElementVNode("div",Of,[t.createVNode(d,{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.isKonnect&&i.hasPrincipalsFields?(t.openBlock(),t.createBlock(c,{key:0,"form-model":o.formModel,"form-options":o.formOptions,"form-schema":o.formSchema,"on-model-updated":o.onModelUpdated},null,8,["form-model","form-options","form-schema","on-model-updated"])):t.createCommentVNode("",!0),i.displayForm?(t.openBlock(),t.createBlock(s,{key:1,model:o.formModel,options:o.formOptions,schema:r.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(m,null,{default:t.withCtx(()=>[...n[3]||(n[3]=[t.createTextVNode("Auth methods",-1)])]),_:1}),t.createElementVNode("div",Vf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.authMethods,E=>(t.openBlock(),t.createElementBlock("div",{key:E.value,class:"auth-method"},[t.createVNode(p,{modelValue:E.prop,"onUpdate:modelValue":M=>E.prop=M,onChange:M=>i.handleUpdate(M,E.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(E.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(f,{modelValue:r.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=E=>r.sessionManagement=E),label:"Enable Session Management",onChange:i.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",Bf,[t.createElementVNode("div",Ff,[t.createVNode(d,{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(E=>[t.renderSlot(e.$slots,"autofill-provider",t.normalizeProps(t.guardReactiveProps(E)),void 0,!0)]),_:3},8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",Rf,[t.createElementVNode("div",Df,[t.createVNode(d,{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,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,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","is-konnect-managed-redis-enabled","model","options","schema","onModelUpdated","onPartialToggled"])):t.createCommentVNode("",!0)])]),_:3},8,["tabs"])])}const Uf=x(Nf,[["render",Lf],["__scopeId","data-v-5cf4e4e3"]]),Pf=x(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(be,(s=t.useSlots())==null?void 0:s[We]);const{t:n,te:o}=pe.createI18n("en-us",_e),a=e,r=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),i=t.computed(()=>{const d=a.formSchema;return d.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}),d});return(d,c)=>r.value?(t.openBlock(),t.createBlock(H,{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"]]),$f=x(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(be,(s=t.useSlots())==null?void 0:s[We]);const{t:n,te:o}=pe.createI18n("en-us",_e),a=e,r=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),i=t.computed(()=>{const d=a.formSchema;return d.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}),d});return(d,c)=>r.value?(t.openBlock(),t.createBlock(H,{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"]]),xf={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}]},vf={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}]},jf={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}]},Kf={class:"general-settings"},qf={class:"sub-form"},zf={class:"general-settings"},Hf={class:"sub-form"},Gf={class:"general-settings"},Yf=x(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 C;t.provide(be,(C=t.useSlots())==null?void 0:C[We]);const n=e,o=t.ref("zeroSsl"),a=t.ref("shm"),r=t.computed(()=>{var _;const T={};if((_=n.formSchema)!=null&&_.fields)for(const w of n.formSchema.fields)T[w.model]=w;return T}),i=t.computed(()=>{var _;const T=Le(xf);for(const w of T.fields){const O=(_=r.value[w.model])==null?void 0:_.help;w.help===void 0&&typeof O=="string"&&(w.help=O)}return T}),s=t.computed(()=>{var _;const T=Le(vf);for(const w of T.fields){const O=(_=r.value[w.model])==null?void 0:_.help;w.help===void 0&&typeof O=="string"&&(w.help=O)}return T}),d=t.computed(()=>{var _;const T=Le(jf);for(const w of T.fields){const O=(_=r.value[w.model])==null?void 0:_.help;w.help===void 0&&typeof O=="string"&&(w.help=O)}return T}),c=t.computed(()=>({fields:n.formSchema.fields.filter(T=>!T.model.startsWith("config")&&T.model!=="tags")})),m=t.computed(()=>({fields:i.value.fields.filter(_=>!s.value.fields.some(w=>w.model===_.model)&&!d.value.fields.some(w=>w.model===_.model))})),p=t.computed(()=>({fields:n.formSchema.fields.filter(_=>_.model.startsWith("config-storage")&&!_.model.startsWith("config-storage_config-consul")&&!_.model.startsWith("config-storage_config-redis")&&!_.model.startsWith("config-storage_config-shm")&&!_.model.startsWith("config-storage_config-vault"))})),f=t.computed(()=>({fields:n.formSchema.fields.filter(_=>_.model.startsWith("config-storage_config-consul"))})),h=t.computed(()=>({fields:n.formSchema.fields.filter(_=>_.model.startsWith("config-storage_config-redis"))})),E=t.computed(()=>({fields:n.formSchema.fields.filter(_=>_.model.startsWith("config-storage_config-shm"))})),M=t.computed(()=>({fields:n.formSchema.fields.filter(_=>_.model.startsWith("config-storage_config-vault"))})),g=t.computed(()=>({fields:n.formSchema.fields.filter(T=>T.model.startsWith("config")&&!m.value.fields.filter(_=>_.model===T.model).length&&!p.value.fields.filter(_=>_.model===T.model).length||T.model==="tags")})),V=t.computed(()=>n.formModel.id&&n.isEditing||!n.isEditing),I=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],L=[{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 B=T=>{o.value=T.value,(T.value==="zeroSsl"||T.value==="other")&&(T.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),T.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()},A=(T,_)=>{_==="config-storage"&&(a.value=T),n.onModelUpdated()};return(T,_)=>{const w=t.resolveComponent("KSelect"),O=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(H,{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(O,{tabs:I},{general:t.withCtx(()=>[t.createElementVNode("div",Kf,[_[0]||(_[0]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),_[1]||(_[1]=t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),V.value?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:m.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),_[2]||(_[2]=t.createElementVNode("hr",null,null,-1)),t.createVNode(w,{class:"issuer-select",items:L,label:"Issuer",onChange:B}),t.createElementVNode("div",qf,[o.value==="letsEncrypt"?(t.openBlock(),t.createBlock(H,{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(H,{key:1,model:e.formModel,options:e.formOptions,schema:d.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",zf,[_[3]||(_[3]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),_[4]||(_[4]=t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),V.value?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:p.value,onModelUpdated:A},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",Hf,[a.value==="consul"?(t.openBlock(),t.createBlock(H,{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(H,{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(H,{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(H,{key:3,model:e.formModel,options:e.formOptions,schema:M.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",Gf,[_[5]||(_[5]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),_[6]||(_[6]=t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),V.value?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:g.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),[["__scopeId","data-v-07cecf5b"]]),Wf={class:"rla-form-basic-fields"},Zf={class:"rla-form-request-limits-subtitle"},Xf={class:"rla-form-request-limits-content"},Jf={class:"rla-form-window-type"},Qf=["innerHTML"],eh={class:"rla-form-window-type-radios"},th={class:"rla-form-request-limits-items"},nh={class:"rla-form-request-limits-row"},oh=["id"],ah={class:"rla-form-request-limits-actions"},ih={key:0,class:"rla-form-request-limits-examples"},rh={class:"rla-form-request-limits-examples-badges"},lh=["innerHTML"],sh={id:"rla-form-error-legend",class:"rla-form-error-inputs"},dh=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:Yf,ExitTransformer:$f,OIDCForm:Uf,PostFunction:Pf,RLAForm:x(t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},onPartialToggled:{type:Function},showNewPartialModal:{type:Function},isEditing:{type:Boolean},enableRedisPartial:{type:Boolean},isKonnectManagedRedisEnabled:{type:Boolean}},setup(e){var O;t.provide(be,(O=t.useSlots())==null?void 0:O[We]);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.
|
|
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,ge,ue,ba,nt){"use strict";function zn(e,n){for(var o=-1,a=e==null?0:e.length;++o<a&&n(e[o],o,e)!==!1;);return e}function _a(e){return function(n,o,a){for(var i=-1,r=Object(n),l=a(n),d=l.length;d--;){var c=l[++i];if(o(r[c],c,r)===!1)break}return n}}var Ea=_a();function Ca(e,n){for(var o=-1,a=Array(e);++o<e;)a[o]=n(o);return a}var qn=typeof global=="object"&&global&&global.Object===Object&&global,Sa=typeof self=="object"&&self&&self.Object===Object&&self,Ce=qn||Sa||Function("return this")(),Pe=Ce.Symbol,Hn=Object.prototype,Ta=Hn.hasOwnProperty,wa=Hn.toString,_t=Pe?Pe.toStringTag:void 0;function ka(e){var n=Ta.call(e,_t),o=e[_t];try{e[_t]=void 0;var a=!0}catch{}var i=wa.call(e);return a&&(n?e[_t]=o:delete e[_t]),i}var Ma=Object.prototype,Na=Ma.toString;function Aa(e){return Na.call(e)}var Ia="[object Null]",Oa="[object Undefined]",Gn=Pe?Pe.toStringTag:void 0;function ve(e){return e==null?e===void 0?Oa:Ia:Gn&&Gn in Object(e)?ka(e):Aa(e)}function xe(e){return e!=null&&typeof e=="object"}var Va="[object Arguments]";function Yn(e){return xe(e)&&ve(e)==Va}var Wn=Object.prototype,Ba=Wn.hasOwnProperty,Fa=Wn.propertyIsEnumerable,Ra=Yn(function(){return arguments}())?Yn:function(e){return xe(e)&&Ba.call(e,"callee")&&!Fa.call(e,"callee")},$e=Array.isArray;function Da(){return!1}var Zn=typeof L=="object"&&L&&!L.nodeType&&L,Xn=Zn&&typeof module=="object"&&module&&!module.nodeType&&module,La=Xn&&Xn.exports===Zn,Jn=La?Ce.Buffer:void 0,Ua=Jn?Jn.isBuffer:void 0,Qn=Ua||Da,Pa=9007199254740991,va=/^(?:0|[1-9]\d*)$/;function eo(e,n){var o=typeof e;return n=n??Pa,!!n&&(o=="number"||o!="symbol"&&va.test(e))&&e>-1&&e%1==0&&e<n}var xa=9007199254740991;function to(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xa}var $a="[object Arguments]",ja="[object Array]",Ka="[object Boolean]",za="[object Date]",qa="[object Error]",Ha="[object Function]",Ga="[object Map]",Ya="[object Number]",Wa="[object Object]",Za="[object RegExp]",Xa="[object Set]",Ja="[object String]",Qa="[object WeakMap]",er="[object ArrayBuffer]",tr="[object DataView]",nr="[object Float32Array]",or="[object Float64Array]",ir="[object Int8Array]",ar="[object Int16Array]",rr="[object Int32Array]",lr="[object Uint8Array]",sr="[object Uint8ClampedArray]",dr="[object Uint16Array]",cr="[object Uint32Array]",z={};z[nr]=z[or]=z[ir]=z[ar]=z[rr]=z[lr]=z[sr]=z[dr]=z[cr]=!0,z[$a]=z[ja]=z[er]=z[Ka]=z[tr]=z[za]=z[qa]=z[Ha]=z[Ga]=z[Ya]=z[Wa]=z[Za]=z[Xa]=z[Ja]=z[Qa]=!1;function mr(e){return xe(e)&&to(e.length)&&!!z[ve(e)]}function nn(e){return function(n){return e(n)}}var no=typeof L=="object"&&L&&!L.nodeType&&L,Et=no&&typeof module=="object"&&module&&!module.nodeType&&module,ur=Et&&Et.exports===no,on=ur&&qn.process,ot=function(){try{var e=Et&&Et.require&&Et.require("util").types;return e||on&&on.binding&&on.binding("util")}catch{}}(),oo=ot&&ot.isTypedArray,fr=oo?nn(oo):mr,hr=Object.prototype,pr=hr.hasOwnProperty;function io(e,n){var o=$e(e),a=!o&&Ra(e),i=!o&&!a&&Qn(e),r=!o&&!a&&!i&&fr(e),l=o||a||i||r,d=l?Ca(e.length,String):[],c=d.length;for(var m in e)(n||pr.call(e,m))&&!(l&&(m=="length"||i&&(m=="offset"||m=="parent")||r&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||eo(m,c)))&&d.push(m);return d}var gr=Object.prototype;function an(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||gr;return e===o}function ao(e,n){return function(o){return e(n(o))}}var yr=ao(Object.keys,Object),br=Object.prototype,_r=br.hasOwnProperty;function Er(e){if(!an(e))return yr(e);var n=[];for(var o in Object(e))_r.call(e,o)&&o!="constructor"&&n.push(o);return n}function ye(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var Cr="[object AsyncFunction]",Sr="[object Function]",Tr="[object GeneratorFunction]",wr="[object Proxy]";function j(e){if(!ye(e))return!1;var n=ve(e);return n==Sr||n==Tr||n==Cr||n==wr}function Ft(e){return e!=null&&to(e.length)&&!j(e)}function Rt(e){return Ft(e)?io(e):Er(e)}function kr(e,n){return e&&Ea(e,n,Rt)}function Mr(e,n){return function(o,a){if(o==null)return o;if(!Ft(o))return e(o,a);for(var i=o.length,r=-1,l=Object(o);++r<i&&a(l[r],r,l)!==!1;);return o}}var Nr=Mr(kr);function rn(e){return e}function Ar(e){return typeof e=="function"?e:rn}function de(e,n){var o=$e(e)?zn:Nr;return o(e,Ar(n))}var Ir="[object Symbol]";function Dt(e){return typeof e=="symbol"||xe(e)&&ve(e)==Ir}var Or=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vr=/^\w*$/;function Br(e,n){if($e(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Dt(e)?!0:Vr.test(e)||!Or.test(e)||n!=null&&e in Object(n)}var ln=Ce["__core-js_shared__"],ro=function(){var e=/[^.]+$/.exec(ln&&ln.keys&&ln.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Fr(e){return!!ro&&ro in e}var Rr=Function.prototype,Dr=Rr.toString;function He(e){if(e!=null){try{return Dr.call(e)}catch{}try{return e+""}catch{}}return""}var Lr=/[\\^$.*+?()[\]{}|]/g,Ur=/^\[object .+?Constructor\]$/,Pr=Function.prototype,vr=Object.prototype,xr=Pr.toString,$r=vr.hasOwnProperty,jr=RegExp("^"+xr.call($r).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kr(e){if(!ye(e)||Fr(e))return!1;var n=j(e)?jr:Ur;return n.test(He(e))}function zr(e,n){return e==null?void 0:e[n]}function Ge(e,n){var o=zr(e,n);return Kr(o)?o:void 0}var Ct=Ge(Object,"create");function qr(){this.__data__=Ct?Ct(null):{},this.size=0}function Hr(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Gr="__lodash_hash_undefined__",Yr=Object.prototype,Wr=Yr.hasOwnProperty;function Zr(e){var n=this.__data__;if(Ct){var o=n[e];return o===Gr?void 0:o}return Wr.call(n,e)?n[e]:void 0}var Xr=Object.prototype,Jr=Xr.hasOwnProperty;function Qr(e){var n=this.__data__;return Ct?n[e]!==void 0:Jr.call(n,e)}var el="__lodash_hash_undefined__";function tl(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Ct&&n===void 0?el:n,this}function Ye(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])}}Ye.prototype.clear=qr,Ye.prototype.delete=Hr,Ye.prototype.get=Zr,Ye.prototype.has=Qr,Ye.prototype.set=tl;function nl(){this.__data__=[],this.size=0}function Lt(e,n){return e===n||e!==e&&n!==n}function Ut(e,n){for(var o=e.length;o--;)if(Lt(e[o][0],n))return o;return-1}var ol=Array.prototype,il=ol.splice;function al(e){var n=this.__data__,o=Ut(n,e);if(o<0)return!1;var a=n.length-1;return o==a?n.pop():il.call(n,o,1),--this.size,!0}function rl(e){var n=this.__data__,o=Ut(n,e);return o<0?void 0:n[o][1]}function ll(e){return Ut(this.__data__,e)>-1}function sl(e,n){var o=this.__data__,a=Ut(o,e);return a<0?(++this.size,o.push([e,n])):o[a][1]=n,this}function Fe(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])}}Fe.prototype.clear=nl,Fe.prototype.delete=al,Fe.prototype.get=rl,Fe.prototype.has=ll,Fe.prototype.set=sl;var St=Ge(Ce,"Map");function dl(){this.size=0,this.__data__={hash:new Ye,map:new(St||Fe),string:new Ye}}function cl(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Pt(e,n){var o=e.__data__;return cl(n)?o[typeof n=="string"?"string":"hash"]:o.map}function ml(e){var n=Pt(this,e).delete(e);return this.size-=n?1:0,n}function ul(e){return Pt(this,e).get(e)}function fl(e){return Pt(this,e).has(e)}function hl(e,n){var o=Pt(this,e),a=o.size;return o.set(e,n),this.size+=o.size==a?0:1,this}function Re(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])}}Re.prototype.clear=dl,Re.prototype.delete=ml,Re.prototype.get=ul,Re.prototype.has=fl,Re.prototype.set=hl;var pl="Expected a function";function sn(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(pl);var o=function(){var a=arguments,i=n?n.apply(this,a):a[0],r=o.cache;if(r.has(i))return r.get(i);var l=e.apply(this,a);return o.cache=r.set(i,l)||r,l};return o.cache=new(sn.Cache||Re),o}sn.Cache=Re;var gl=500;function yl(e){var n=sn(e,function(a){return o.size===gl&&o.clear(),a}),o=n.cache;return n}var bl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_l=/\\(\\)?/g,El=yl(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(bl,function(o,a,i,r){n.push(i?r.replace(_l,"$1"):a||o)}),n});function Cl(e,n){for(var o=-1,a=e==null?0:e.length,i=Array(a);++o<a;)i[o]=n(e[o],o,e);return i}var lo=Pe?Pe.prototype:void 0,so=lo?lo.toString:void 0;function co(e){if(typeof e=="string")return e;if($e(e))return Cl(e,co)+"";if(Dt(e))return so?so.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function mo(e){return e==null?"":co(e)}function Sl(e,n){return $e(e)?e:Br(e,n)?[e]:El(mo(e))}function Tl(e){if(typeof e=="string"||Dt(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function wl(e,n){n=Sl(n,e);for(var o=0,a=n.length;e!=null&&o<a;)e=e[Tl(n[o++])];return o&&o==a?e:void 0}function $(e,n,o){var a=e==null?void 0:wl(e,n);return a===void 0?o:a}function Z(e){return e==null}const be="kong-ui-forms-api",vt="kong-ui-forms-config",uo="redis-partial-list-fetcher-key",kl="redis-partial-info",We="autofill",_e="autofillSlot",Ne={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"},fo="—";/*! @license DOMPurify 3.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.3/LICENSE */function ho(e,n){(n==null||n>e.length)&&(n=e.length);for(var o=0,a=Array(n);o<n;o++)a[o]=e[o];return a}function Ml(e){if(Array.isArray(e))return e}function Nl(e,n){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var a,i,r,l,d=[],c=!0,m=!1;try{if(r=(o=o.call(e)).next,n!==0)for(;!(c=(a=r.call(o)).done)&&(d.push(a.value),d.length!==n);c=!0);}catch(h){m=!0,i=h}finally{try{if(!c&&o.return!=null&&(l=o.return(),Object(l)!==l))return}finally{if(m)throw i}}return d}}function Al(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Il(e,n){return Ml(e)||Nl(e,n)||Ol(e,n)||Al()}function Ol(e,n){if(e){if(typeof e=="string")return ho(e,n);var o={}.toString.call(e).slice(8,-1);return o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set"?Array.from(e):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?ho(e,n):void 0}}const po=Object.entries,go=Object.setPrototypeOf,Vl=Object.isFrozen,Bl=Object.getPrototypeOf,Fl=Object.getOwnPropertyDescriptor;let ce=Object.freeze,Se=Object.seal,it=Object.create,yo=typeof Reflect<"u"&&Reflect,dn=yo.apply,cn=yo.construct;ce||(ce=function(n){return n}),Se||(Se=function(n){return n}),dn||(dn=function(n,o){for(var a=arguments.length,i=new Array(a>2?a-2:0),r=2;r<a;r++)i[r-2]=arguments[r];return n.apply(o,i)}),cn||(cn=function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return new n(...a)});const at=ee(Array.prototype.forEach),Rl=ee(Array.prototype.lastIndexOf),bo=ee(Array.prototype.pop),rt=ee(Array.prototype.push),Dl=ee(Array.prototype.splice),me=Array.isArray,Tt=ee(String.prototype.toLowerCase),mn=ee(String.prototype.toString),_o=ee(String.prototype.match),lt=ee(String.prototype.replace),Eo=ee(String.prototype.indexOf),Ll=ee(String.prototype.trim),Ul=ee(Number.prototype.toString),Pl=ee(Boolean.prototype.toString),Co=typeof BigInt>"u"?null:ee(BigInt.prototype.toString),So=typeof Symbol>"u"?null:ee(Symbol.prototype.toString),Y=ee(Object.prototype.hasOwnProperty),wt=ee(Object.prototype.toString),re=ee(RegExp.prototype.test),xt=vl(TypeError);function ee(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return dn(e,n,a)}}function vl(e){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return cn(e,o)}}function D(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Tt;if(go&&go(e,null),!me(n))return e;let a=n.length;for(;a--;){let i=n[a];if(typeof i=="string"){const r=o(i);r!==i&&(Vl(n)||(n[a]=r),i=r)}e[i]=!0}return e}function xl(e){for(let n=0;n<e.length;n++)Y(e,n)||(e[n]=null);return e}function fe(e){const n=it(null);for(const a of po(e)){var o=Il(a,2);const i=o[0],r=o[1];Y(e,i)&&(me(r)?n[i]=xl(r):r&&typeof r=="object"&&r.constructor===Object?n[i]=fe(r):n[i]=r)}return n}function $l(e){switch(typeof e){case"string":return e;case"number":return Ul(e);case"boolean":return Pl(e);case"bigint":return Co?Co(e):"0";case"symbol":return So?So(e):"Symbol()";case"undefined":return wt(e);case"function":case"object":{if(e===null)return wt(e);const n=e,o=st(n,"toString");if(typeof o=="function"){const a=o(n);return typeof a=="string"?a:wt(a)}return wt(e)}default:return wt(e)}}function st(e,n){for(;e!==null;){const a=Fl(e,n);if(a){if(a.get)return ee(a.get);if(typeof a.value=="function")return ee(a.value)}e=Bl(e)}function o(){return null}return o}function jl(e){try{return re(e,""),!0}catch{return!1}}const To=ce(["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"]),un=ce(["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"]),fn=ce(["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"]),Kl=ce(["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"]),hn=ce(["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"]),zl=ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),wo=ce(["#text"]),ko=ce(["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"]),pn=ce(["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"]),Mo=ce(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),$t=ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ql=Se(/{{[\w\W]*|^[\w\W]*}}/g),Hl=Se(/<%[\w\W]*|^[\w\W]*%>/g),Gl=Se(/\${[\w\W]*/g),Yl=Se(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wl=Se(/^aria-[\-\w]+$/),No=Se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zl=Se(/^(?:\w+script|data):/i),Xl=Se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jl=Se(/^html$/i),Ql=Se(/^[a-z][.\w]*(-[.\w]+)+$/i),dt={element:1,text:3,progressingInstruction:7,comment:8,document:9},es=function(){return typeof window>"u"?null:window},ts=function(n,o){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let a=null;const i="data-tt-policy-suffix";o&&o.hasAttribute(i)&&(a=o.getAttribute(i));const r="dompurify"+(a?"#"+a:"");try{return n.createPolicy(r,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Ao=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Io(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:es();const n=F=>Io(F);if(n.version="3.4.3",n.removed=[],!e||!e.document||e.document.nodeType!==dt.document||!e.Element)return n.isSupported=!1,n;let o=e.document;const a=o,i=a.currentScript,r=e.DocumentFragment,l=e.HTMLTemplateElement,d=e.Node,c=e.Element,m=e.NodeFilter,h=e.NamedNodeMap,u=h===void 0?e.NamedNodeMap||e.MozNamedAttrMap:h,p=e.HTMLFormElement,_=e.DOMParser,N=e.trustedTypes,g=c.prototype,O=st(g,"cloneNode"),A=st(g,"remove"),R=st(g,"nextSibling"),B=st(g,"childNodes"),M=st(g,"parentNode");if(typeof l=="function"){const F=o.createElement("template");F.content&&F.content.ownerDocument&&(o=F.content.ownerDocument)}let T,C="";const E=o,w=E.implementation,V=E.createNodeIterator,f=E.createDocumentFragment,y=E.getElementsByTagName,S=a.importNode;let k=Ao();n.isSupported=typeof po=="function"&&typeof M=="function"&&w&&w.createHTMLDocument!==void 0;const U=ql,J=Hl,ke=Gl,te=Yl,ze=Wl,An=Zl,Wt=Xl,P=Ql;let G=No,W=null;const Zi=D({},[...To,...un,...fn,...hn,...wo]);let se=null;const Xi=D({},[...ko,...pn,...Mo,...$t]);let Q=Object.seal(it(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}})),It=null,Zt=null;const qe=Object.seal(it(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ji=!0,In=!0,Qi=!1,ea=!0,Qe=!1,Ot=!0,et=!1,On=!1,Vn=!1,pt=!1,Xt=!1,Jt=!1,ta=!0,na=!1;const oa="user-content-";let Bn=!0,Vt=!1,gt={},Ve=null;const Fn=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 ia=null;const aa=D({},["audio","video","img","source","image","track"]);let Rn=null;const ra=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qt="http://www.w3.org/1998/Math/MathML",en="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml";let yt=Be,Dn=!1,Ln=null;const Sh=D({},[Qt,en,Be],mn);let Un=D({},["mi","mo","mn","ms","mtext"]),Pn=D({},["annotation-xml"]);const Th=D({},["title","style","font","a","script"]);let Bt=null;const wh=["application/xhtml+xml","text/html"],kh="text/html";let oe=null,bt=null;const Mh=o.createElement("form"),la=function(s){return s instanceof RegExp||s instanceof Function},vn=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(bt&&bt===s)return;(!s||typeof s!="object")&&(s={}),s=fe(s),Bt=wh.indexOf(s.PARSER_MEDIA_TYPE)===-1?kh:s.PARSER_MEDIA_TYPE,oe=Bt==="application/xhtml+xml"?mn:Tt,W=Y(s,"ALLOWED_TAGS")&&me(s.ALLOWED_TAGS)?D({},s.ALLOWED_TAGS,oe):Zi,se=Y(s,"ALLOWED_ATTR")&&me(s.ALLOWED_ATTR)?D({},s.ALLOWED_ATTR,oe):Xi,Ln=Y(s,"ALLOWED_NAMESPACES")&&me(s.ALLOWED_NAMESPACES)?D({},s.ALLOWED_NAMESPACES,mn):Sh,Rn=Y(s,"ADD_URI_SAFE_ATTR")&&me(s.ADD_URI_SAFE_ATTR)?D(fe(ra),s.ADD_URI_SAFE_ATTR,oe):ra,ia=Y(s,"ADD_DATA_URI_TAGS")&&me(s.ADD_DATA_URI_TAGS)?D(fe(aa),s.ADD_DATA_URI_TAGS,oe):aa,Ve=Y(s,"FORBID_CONTENTS")&&me(s.FORBID_CONTENTS)?D({},s.FORBID_CONTENTS,oe):Fn,It=Y(s,"FORBID_TAGS")&&me(s.FORBID_TAGS)?D({},s.FORBID_TAGS,oe):fe({}),Zt=Y(s,"FORBID_ATTR")&&me(s.FORBID_ATTR)?D({},s.FORBID_ATTR,oe):fe({}),gt=Y(s,"USE_PROFILES")?s.USE_PROFILES&&typeof s.USE_PROFILES=="object"?fe(s.USE_PROFILES):s.USE_PROFILES:!1,Ji=s.ALLOW_ARIA_ATTR!==!1,In=s.ALLOW_DATA_ATTR!==!1,Qi=s.ALLOW_UNKNOWN_PROTOCOLS||!1,ea=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=s.SAFE_FOR_TEMPLATES||!1,Ot=s.SAFE_FOR_XML!==!1,et=s.WHOLE_DOCUMENT||!1,pt=s.RETURN_DOM||!1,Xt=s.RETURN_DOM_FRAGMENT||!1,Jt=s.RETURN_TRUSTED_TYPE||!1,Vn=s.FORCE_BODY||!1,ta=s.SANITIZE_DOM!==!1,na=s.SANITIZE_NAMED_PROPS||!1,Bn=s.KEEP_CONTENT!==!1,Vt=s.IN_PLACE||!1,G=jl(s.ALLOWED_URI_REGEXP)?s.ALLOWED_URI_REGEXP:No,yt=typeof s.NAMESPACE=="string"?s.NAMESPACE:Be,Un=Y(s,"MATHML_TEXT_INTEGRATION_POINTS")&&s.MATHML_TEXT_INTEGRATION_POINTS&&typeof s.MATHML_TEXT_INTEGRATION_POINTS=="object"?fe(s.MATHML_TEXT_INTEGRATION_POINTS):D({},["mi","mo","mn","ms","mtext"]),Pn=Y(s,"HTML_INTEGRATION_POINTS")&&s.HTML_INTEGRATION_POINTS&&typeof s.HTML_INTEGRATION_POINTS=="object"?fe(s.HTML_INTEGRATION_POINTS):D({},["annotation-xml"]);const b=Y(s,"CUSTOM_ELEMENT_HANDLING")&&s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING=="object"?fe(s.CUSTOM_ELEMENT_HANDLING):it(null);if(Q=it(null),Y(b,"tagNameCheck")&&la(b.tagNameCheck)&&(Q.tagNameCheck=b.tagNameCheck),Y(b,"attributeNameCheck")&&la(b.attributeNameCheck)&&(Q.attributeNameCheck=b.attributeNameCheck),Y(b,"allowCustomizedBuiltInElements")&&typeof b.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=b.allowCustomizedBuiltInElements),Qe&&(In=!1),Xt&&(pt=!0),gt&&(W=D({},wo),se=it(null),gt.html===!0&&(D(W,To),D(se,ko)),gt.svg===!0&&(D(W,un),D(se,pn),D(se,$t)),gt.svgFilters===!0&&(D(W,fn),D(se,pn),D(se,$t)),gt.mathMl===!0&&(D(W,hn),D(se,Mo),D(se,$t))),qe.tagCheck=null,qe.attributeCheck=null,Y(s,"ADD_TAGS")&&(typeof s.ADD_TAGS=="function"?qe.tagCheck=s.ADD_TAGS:me(s.ADD_TAGS)&&(W===Zi&&(W=fe(W)),D(W,s.ADD_TAGS,oe))),Y(s,"ADD_ATTR")&&(typeof s.ADD_ATTR=="function"?qe.attributeCheck=s.ADD_ATTR:me(s.ADD_ATTR)&&(se===Xi&&(se=fe(se)),D(se,s.ADD_ATTR,oe))),Y(s,"ADD_URI_SAFE_ATTR")&&me(s.ADD_URI_SAFE_ATTR)&&D(Rn,s.ADD_URI_SAFE_ATTR,oe),Y(s,"FORBID_CONTENTS")&&me(s.FORBID_CONTENTS)&&(Ve===Fn&&(Ve=fe(Ve)),D(Ve,s.FORBID_CONTENTS,oe)),Y(s,"ADD_FORBID_CONTENTS")&&me(s.ADD_FORBID_CONTENTS)&&(Ve===Fn&&(Ve=fe(Ve)),D(Ve,s.ADD_FORBID_CONTENTS,oe)),Bn&&(W["#text"]=!0),et&&D(W,["html","head","body"]),W.table&&(D(W,["tbody"]),delete It.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=s.TRUSTED_TYPES_POLICY,C=T.createHTML("")}else T===void 0&&(T=ts(N,i)),T!==null&&typeof C=="string"&&(C=T.createHTML(""));ce&&ce(s),bt=s},sa=D({},[...un,...fn,...Kl]),da=D({},[...hn,...zl]),Nh=function(s){let b=M(s);(!b||!b.tagName)&&(b={namespaceURI:yt,tagName:"template"});const I=Tt(s.tagName),v=Tt(b.tagName);return Ln[s.namespaceURI]?s.namespaceURI===en?b.namespaceURI===Be?I==="svg":b.namespaceURI===Qt?I==="svg"&&(v==="annotation-xml"||Un[v]):!!sa[I]:s.namespaceURI===Qt?b.namespaceURI===Be?I==="math":b.namespaceURI===en?I==="math"&&Pn[v]:!!da[I]:s.namespaceURI===Be?b.namespaceURI===en&&!Pn[v]||b.namespaceURI===Qt&&!Un[v]?!1:!da[I]&&(Th[I]||!sa[I]):!!(Bt==="application/xhtml+xml"&&Ln[s.namespaceURI]):!1},Ie=function(s){rt(n.removed,{element:s});try{M(s).removeChild(s)}catch{A(s)}},tt=function(s,b){try{rt(n.removed,{attribute:b.getAttributeNode(s),from:b})}catch{rt(n.removed,{attribute:null,from:b})}if(b.removeAttribute(s),s==="is")if(pt||Xt)try{Ie(b)}catch{}else try{b.setAttribute(s,"")}catch{}},ca=function(s){let b=null,I=null;if(Vn)s="<remove></remove>"+s;else{const ne=_o(s,/^[\r\n\t ]+/);I=ne&&ne[0]}Bt==="application/xhtml+xml"&&yt===Be&&(s='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+s+"</body></html>");const v=T?T.createHTML(s):s;if(yt===Be)try{b=new _().parseFromString(v,Bt)}catch{}if(!b||!b.documentElement){b=w.createDocument(yt,"template",null);try{b.documentElement.innerHTML=Dn?C:v}catch{}}const ie=b.body||b.documentElement;return s&&I&&ie.insertBefore(o.createTextNode(I),ie.childNodes[0]||null),yt===Be?y.call(b,et?"html":"body")[0]:et?b.documentElement:ie},ma=function(s){return V.call(s.ownerDocument||s,s,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},xn=function(s){return s instanceof p&&(typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||!(s.attributes instanceof u)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function")},$n=function(s){return typeof d=="function"&&s instanceof d};function Ue(F,s,b){at(F,I=>{I.call(n,s,b,bt)})}const ua=function(s){let b=null;if(Ue(k.beforeSanitizeElements,s,null),xn(s))return Ie(s),!0;const I=oe(s.nodeName);if(Ue(k.uponSanitizeElement,s,{tagName:I,allowedTags:W}),Ot&&s.hasChildNodes()&&!$n(s.firstElementChild)&&re(/<[/\w!]/g,s.innerHTML)&&re(/<[/\w!]/g,s.textContent)||Ot&&s.namespaceURI===Be&&I==="style"&&$n(s.firstElementChild)||s.nodeType===dt.progressingInstruction||Ot&&s.nodeType===dt.comment&&re(/<[/\w]/g,s.data))return Ie(s),!0;if(It[I]||!(qe.tagCheck instanceof Function&&qe.tagCheck(I))&&!W[I]){if(!It[I]&&ha(I)&&(Q.tagNameCheck instanceof RegExp&&re(Q.tagNameCheck,I)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(I)))return!1;if(Bn&&!Ve[I]){const v=M(s)||s.parentNode,ie=B(s)||s.childNodes;if(ie&&v){const ne=ie.length;for(let pe=ne-1;pe>=0;--pe){const Me=O(ie[pe],!0);v.insertBefore(Me,R(s))}}}return Ie(s),!0}return s instanceof c&&!Nh(s)||(I==="noscript"||I==="noembed"||I==="noframes")&&re(/<\/no(script|embed|frames)/i,s.innerHTML)?(Ie(s),!0):(Qe&&s.nodeType===dt.text&&(b=s.textContent,at([U,J,ke],v=>{b=lt(b,v," ")}),s.textContent!==b&&(rt(n.removed,{element:s.cloneNode()}),s.textContent=b)),Ue(k.afterSanitizeElements,s,null),!1)},fa=function(s,b,I){if(Zt[b]||ta&&(b==="id"||b==="name")&&(I in o||I in Mh))return!1;const v=se[b]||qe.attributeCheck instanceof Function&&qe.attributeCheck(b,s);if(!(In&&!Zt[b]&&re(te,b))){if(!(Ji&&re(ze,b))){if(!v||Zt[b]){if(!(ha(s)&&(Q.tagNameCheck instanceof RegExp&&re(Q.tagNameCheck,s)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(s))&&(Q.attributeNameCheck instanceof RegExp&&re(Q.attributeNameCheck,b)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(b,s))||b==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&re(Q.tagNameCheck,I)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(I))))return!1}else if(!Rn[b]){if(!re(G,lt(I,Wt,""))){if(!((b==="src"||b==="xlink:href"||b==="href")&&s!=="script"&&Eo(I,"data:")===0&&ia[s])){if(!(Qi&&!re(An,lt(I,Wt,"")))){if(I)return!1}}}}}}return!0},Ah=D({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ha=function(s){return!Ah[Tt(s)]&&re(P,s)},pa=function(s){Ue(k.beforeSanitizeAttributes,s,null);const b=s.attributes;if(!b||xn(s))return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se,forceKeepAttr:void 0};let v=b.length;for(;v--;){const ie=b[v],ne=ie.name,pe=ie.namespaceURI,Me=ie.value,Oe=oe(ne),Kn=Me;let ae=ne==="value"?Kn:Ll(Kn);if(I.attrName=Oe,I.attrValue=ae,I.keepAttr=!0,I.forceKeepAttr=void 0,Ue(k.uponSanitizeAttribute,s,I),ae=I.attrValue,na&&(Oe==="id"||Oe==="name")&&Eo(ae,oa)!==0&&(tt(ne,s),ae=oa+ae),Ot&&re(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ae)){tt(ne,s);continue}if(Oe==="attributename"&&_o(ae,"href")){tt(ne,s);continue}if(I.forceKeepAttr)continue;if(!I.keepAttr){tt(ne,s);continue}if(!ea&&re(/\/>/i,ae)){tt(ne,s);continue}Qe&&at([U,J,ke],ya=>{ae=lt(ae,ya," ")});const ga=oe(s.nodeName);if(!fa(ga,Oe,ae)){tt(ne,s);continue}if(T&&typeof N=="object"&&typeof N.getAttributeType=="function"&&!pe)switch(N.getAttributeType(ga,Oe)){case"TrustedHTML":{ae=T.createHTML(ae);break}case"TrustedScriptURL":{ae=T.createScriptURL(ae);break}}if(ae!==Kn)try{pe?s.setAttributeNS(pe,ne,ae):s.setAttribute(ne,ae),xn(s)?Ie(s):bo(n.removed)}catch{tt(ne,s)}}Ue(k.afterSanitizeAttributes,s,null)},jn=function(s){let b=null;const I=ma(s);for(Ue(k.beforeSanitizeShadowDOM,s,null);b=I.nextNode();)Ue(k.uponSanitizeShadowNode,b,null),ua(b),pa(b),b.content instanceof r&&jn(b.content);Ue(k.afterSanitizeShadowDOM,s,null)},tn=function(s){if(s.nodeType===dt.element&&s.shadowRoot instanceof r){const v=s.shadowRoot;tn(v),jn(v)}const b=s.childNodes;if(!b)return;const I=[];at(b,v=>{rt(I,v)});for(const v of I)tn(v)};return n.sanitize=function(F){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=null,I=null,v=null,ie=null;if(Dn=!F,Dn&&(F="<!-->"),typeof F!="string"&&!$n(F)&&(F=$l(F),typeof F!="string"))throw xt("dirty is not a string, aborting");if(!n.isSupported)return F;if(On||vn(s),n.removed=[],typeof F=="string"&&(Vt=!1),Vt){const Me=F.nodeName;if(typeof Me=="string"){const Oe=oe(Me);if(!W[Oe]||It[Oe])throw xt("root node is forbidden and cannot be sanitized in-place")}tn(F)}else if(F instanceof d)b=ca("<!---->"),I=b.ownerDocument.importNode(F,!0),I.nodeType===dt.element&&I.nodeName==="BODY"||I.nodeName==="HTML"?b=I:b.appendChild(I),tn(I);else{if(!pt&&!Qe&&!et&&F.indexOf("<")===-1)return T&&Jt?T.createHTML(F):F;if(b=ca(F),!b)return pt?null:Jt?C:""}b&&Vn&&Ie(b.firstChild);const ne=ma(Vt?F:b);for(;v=ne.nextNode();)ua(v),pa(v),v.content instanceof r&&jn(v.content);if(Vt)return F;if(pt){if(Qe){b.normalize();let Me=b.innerHTML;at([U,J,ke],Oe=>{Me=lt(Me,Oe," ")}),b.innerHTML=Me}if(Xt)for(ie=f.call(b.ownerDocument);b.firstChild;)ie.appendChild(b.firstChild);else ie=b;return(se.shadowroot||se.shadowrootmode)&&(ie=S.call(a,ie,!0)),ie}let pe=et?b.outerHTML:b.innerHTML;return et&&W["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&re(Jl,b.ownerDocument.doctype.name)&&(pe="<!DOCTYPE "+b.ownerDocument.doctype.name+`>
|
|
3
|
+
`+pe),Qe&&at([U,J,ke],Me=>{pe=lt(pe,Me," ")}),T&&Jt?T.createHTML(pe):pe},n.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vn(F),On=!0},n.clearConfig=function(){bt=null,On=!1},n.isValidAttribute=function(F,s,b){bt||vn({});const I=oe(F),v=oe(s);return fa(I,v,b)},n.addHook=function(F,s){typeof s=="function"&&rt(k[F],s)},n.removeHook=function(F,s){if(s!==void 0){const b=Rl(k[F],s);return b===-1?void 0:Dl(k[F],b,1)[0]}return bo(k[F])},n.removeHooks=function(F){k[F]=[]},n.removeAllHooks=function(){k=Ao()},n}var ns=Io();function os(){this.__data__=new Fe,this.size=0}function is(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function as(e){return this.__data__.get(e)}function rs(e){return this.__data__.has(e)}var ls=200;function ss(e,n){var o=this.__data__;if(o instanceof Fe){var a=o.__data__;if(!St||a.length<ls-1)return a.push([e,n]),this.size=++o.size,this;o=this.__data__=new Re(a)}return o.set(e,n),this.size=o.size,this}function ct(e){var n=this.__data__=new Fe(e);this.size=n.size}ct.prototype.clear=os,ct.prototype.delete=is,ct.prototype.get=as,ct.prototype.has=rs,ct.prototype.set=ss;var jt=function(){try{var e=Ge(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Oo(e,n,o){n=="__proto__"&&jt?jt(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}var ds=Object.prototype,cs=ds.hasOwnProperty;function Vo(e,n,o){var a=e[n];(!(cs.call(e,n)&&Lt(a,o))||o===void 0&&!(n in e))&&Oo(e,n,o)}function Kt(e,n,o,a){var i=!o;o||(o={});for(var r=-1,l=n.length;++r<l;){var d=n[r],c=void 0;c===void 0&&(c=e[d]),i?Oo(o,d,c):Vo(o,d,c)}return o}function ms(e,n){return e&&Kt(n,Rt(n),e)}function us(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}var fs=Object.prototype,hs=fs.hasOwnProperty;function ps(e){if(!ye(e))return us(e);var n=an(e),o=[];for(var a in e)a=="constructor"&&(n||!hs.call(e,a))||o.push(a);return o}function zt(e){return Ft(e)?io(e,!0):ps(e)}function gs(e,n){return e&&Kt(n,zt(n),e)}var Bo=typeof L=="object"&&L&&!L.nodeType&&L,Fo=Bo&&typeof module=="object"&&module&&!module.nodeType&&module,ys=Fo&&Fo.exports===Bo,Ro=ys?Ce.Buffer:void 0,Do=Ro?Ro.allocUnsafe:void 0;function bs(e,n){if(n)return e.slice();var o=e.length,a=Do?Do(o):new e.constructor(o);return e.copy(a),a}function _s(e,n){var o=-1,a=e.length;for(n||(n=Array(a));++o<a;)n[o]=e[o];return n}function Es(e,n){for(var o=-1,a=e==null?0:e.length,i=0,r=[];++o<a;){var l=e[o];n(l,o,e)&&(r[i++]=l)}return r}function Lo(){return[]}var Cs=Object.prototype,Ss=Cs.propertyIsEnumerable,Uo=Object.getOwnPropertySymbols,gn=Uo?function(e){return e==null?[]:(e=Object(e),Es(Uo(e),function(n){return Ss.call(e,n)}))}:Lo;function Ts(e,n){return Kt(e,gn(e),n)}function Po(e,n){for(var o=-1,a=n.length,i=e.length;++o<a;)e[i+o]=n[o];return e}var vo=ao(Object.getPrototypeOf,Object),ws=Object.getOwnPropertySymbols,xo=ws?function(e){for(var n=[];e;)Po(n,gn(e)),e=vo(e);return n}:Lo;function ks(e,n){return Kt(e,xo(e),n)}function $o(e,n,o){var a=n(e);return $e(e)?a:Po(a,o(e))}function Ms(e){return $o(e,Rt,gn)}function Ns(e){return $o(e,zt,xo)}var yn=Ge(Ce,"DataView"),bn=Ge(Ce,"Promise"),mt=Ge(Ce,"Set"),_n=Ge(Ce,"WeakMap"),jo="[object Map]",As="[object Object]",Ko="[object Promise]",zo="[object Set]",qo="[object WeakMap]",Ho="[object DataView]",Is=He(yn),Os=He(St),Vs=He(bn),Bs=He(mt),Fs=He(_n),De=ve;(yn&&De(new yn(new ArrayBuffer(1)))!=Ho||St&&De(new St)!=jo||bn&&De(bn.resolve())!=Ko||mt&&De(new mt)!=zo||_n&&De(new _n)!=qo)&&(De=function(e){var n=ve(e),o=n==As?e.constructor:void 0,a=o?He(o):"";if(a)switch(a){case Is:return Ho;case Os:return jo;case Vs:return Ko;case Bs:return zo;case Fs:return qo}return n});var Rs=Object.prototype,Ds=Rs.hasOwnProperty;function Ls(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 Go=Ce.Uint8Array;function En(e){var n=new e.constructor(e.byteLength);return new Go(n).set(new Go(e)),n}function Us(e,n){var o=n?En(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var Ps=/\w*$/;function vs(e){var n=new e.constructor(e.source,Ps.exec(e));return n.lastIndex=e.lastIndex,n}var Yo=Pe?Pe.prototype:void 0,Wo=Yo?Yo.valueOf:void 0;function xs(e){return Wo?Object(Wo.call(e)):{}}function $s(e,n){var o=n?En(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var js="[object Boolean]",Ks="[object Date]",zs="[object Map]",qs="[object Number]",Hs="[object RegExp]",Gs="[object Set]",Ys="[object String]",Ws="[object Symbol]",Zs="[object ArrayBuffer]",Xs="[object DataView]",Js="[object Float32Array]",Qs="[object Float64Array]",ed="[object Int8Array]",td="[object Int16Array]",nd="[object Int32Array]",od="[object Uint8Array]",id="[object Uint8ClampedArray]",ad="[object Uint16Array]",rd="[object Uint32Array]";function ld(e,n,o){var a=e.constructor;switch(n){case Zs:return En(e);case js:case Ks:return new a(+e);case Xs:return Us(e,o);case Js:case Qs:case ed:case td:case nd:case od:case id:case ad:case rd:return $s(e,o);case zs:return new a;case qs:case Ys:return new a(e);case Hs:return vs(e);case Gs:return new a;case Ws:return xs(e)}}var Zo=Object.create,sd=function(){function e(){}return function(n){if(!ye(n))return{};if(Zo)return Zo(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}}();function dd(e){return typeof e.constructor=="function"&&!an(e)?sd(vo(e)):{}}var cd="[object Map]";function md(e){return xe(e)&&De(e)==cd}var Xo=ot&&ot.isMap,ud=Xo?nn(Xo):md,fd="[object Set]";function hd(e){return xe(e)&&De(e)==fd}var Jo=ot&&ot.isSet,pd=Jo?nn(Jo):hd,gd=1,yd=2,bd=4,Qo="[object Arguments]",_d="[object Array]",Ed="[object Boolean]",Cd="[object Date]",Sd="[object Error]",ei="[object Function]",Td="[object GeneratorFunction]",wd="[object Map]",kd="[object Number]",ti="[object Object]",Md="[object RegExp]",Nd="[object Set]",Ad="[object String]",Id="[object Symbol]",Od="[object WeakMap]",Vd="[object ArrayBuffer]",Bd="[object DataView]",Fd="[object Float32Array]",Rd="[object Float64Array]",Dd="[object Int8Array]",Ld="[object Int16Array]",Ud="[object Int32Array]",Pd="[object Uint8Array]",vd="[object Uint8ClampedArray]",xd="[object Uint16Array]",$d="[object Uint32Array]",K={};K[Qo]=K[_d]=K[Vd]=K[Bd]=K[Ed]=K[Cd]=K[Fd]=K[Rd]=K[Dd]=K[Ld]=K[Ud]=K[wd]=K[kd]=K[ti]=K[Md]=K[Nd]=K[Ad]=K[Id]=K[Pd]=K[vd]=K[xd]=K[$d]=!0,K[Sd]=K[ei]=K[Od]=!1;function kt(e,n,o,a,i,r){var l,d=n&gd,c=n&yd,m=n&bd;if(l!==void 0)return l;if(!ye(e))return e;var h=$e(e);if(h){if(l=Ls(e),!d)return _s(e,l)}else{var u=De(e),p=u==ei||u==Td;if(Qn(e))return bs(e,d);if(u==ti||u==Qo||p&&!i){if(l=c||p?{}:dd(e),!d)return c?ks(e,gs(l,e)):Ts(e,ms(l,e))}else{if(!K[u])return i?e:{};l=ld(e,u,d)}}r||(r=new ct);var _=r.get(e);if(_)return _;r.set(e,l),pd(e)?e.forEach(function(O){l.add(kt(O,n,o,O,e,r))}):ud(e)&&e.forEach(function(O,A){l.set(A,kt(O,n,o,A,e,r))});var N=m?c?Ns:Ms:c?zt:Rt,g=h?void 0:N(e);return zn(g||e,function(O,A){g&&(A=O,O=e[A]),Vo(l,A,kt(O,n,o,A,e,r))}),l}var jd=1,Kd=4;function Le(e){return kt(e,jd|Kd)}const Cn=(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,""),ni=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var zd="[object String]";function Ze(e){return typeof e=="string"||!$e(e)&&xe(e)&&ve(e)==zd}const oi={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)?de(e.styleClasses,a=>o[a]=!0):Ze(e.styleClasses)&&(o[e.styleClasses]=!0),Z(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 j(e.disabled)?e.disabled.call(this,this.model,e,this):Z(e.disabled)?!1:e.disabled},fieldReadonly(e){return j(e.readonly)?e.readonly.call(this,this.model,e,this):Z(e.readonly)?!1:e.readonly},fieldFeatured(e){return j(e.featured)?e.featured.call(this,this.model,e,this):Z(e.featured)?!1:e.featured},fieldRequired(e){return j(e.required)?e.required.call(this,this.model,e,this):Z(e.required)?!1:e.required}}};var Sn=function(){return Ce.Date.now()},qd=/\s/;function Hd(e){for(var n=e.length;n--&&qd.test(e.charAt(n)););return n}var Gd=/^\s+/;function Yd(e){return e&&e.slice(0,Hd(e)+1).replace(Gd,"")}var ii=NaN,Wd=/^[-+]0x[0-9a-f]+$/i,Zd=/^0b[01]+$/i,Xd=/^0o[0-7]+$/i,Jd=parseInt;function Tn(e){if(typeof e=="number")return e;if(Dt(e))return ii;if(ye(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ye(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Yd(e);var o=Zd.test(e);return o||Xd.test(e)?Jd(e.slice(2),o?2:8):Wd.test(e)?ii:+e}var Qd="Expected a function",ec=Math.max,tc=Math.min;function ut(e,n,o){var a,i,r,l,d,c,m=0,h=!1,u=!1,p=!0;if(typeof e!="function")throw new TypeError(Qd);n=Tn(n)||0,ye(o)&&(h=!!o.leading,u="maxWait"in o,r=u?ec(Tn(o.maxWait)||0,n):r,p="trailing"in o?!!o.trailing:p);function _(C){var E=a,w=i;return a=i=void 0,m=C,l=e.apply(w,E),l}function N(C){return m=C,d=setTimeout(A,n),h?_(C):l}function g(C){var E=C-c,w=C-m,V=n-E;return u?tc(V,r-w):V}function O(C){var E=C-c,w=C-m;return c===void 0||E>=n||E<0||u&&w>=r}function A(){var C=Sn();if(O(C))return R(C);d=setTimeout(A,g(C))}function R(C){return d=void 0,p&&a?_(C):(a=i=void 0,l)}function B(){d!==void 0&&clearTimeout(d),m=0,a=c=i=d=void 0}function M(){return d===void 0?l:R(Sn())}function T(){var C=Sn(),E=O(C);if(a=arguments,i=this,c=C,E){if(d===void 0)return N(c);if(u)return clearTimeout(d),d=setTimeout(A,n),_(c)}return d===void 0&&(d=setTimeout(A,n)),l}return T.cancel=B,T.flush=M,T}var nc="__lodash_hash_undefined__";function oc(e){return this.__data__.set(e,nc),this}function ic(e){return this.__data__.has(e)}function qt(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new Re;++n<o;)this.add(e[n])}qt.prototype.add=qt.prototype.push=oc,qt.prototype.has=ic;function ac(e,n,o,a){for(var i=e.length,r=o+-1;++r<i;)if(n(e[r],r,e))return r;return-1}function rc(e){return e!==e}function lc(e,n,o){for(var a=o-1,i=e.length;++a<i;)if(e[a]===n)return a;return-1}function sc(e,n,o){return n===n?lc(e,n,o):ac(e,rc,o)}function dc(e,n){var o=e==null?0:e.length;return!!o&&sc(e,n,0)>-1}function cc(e,n){return e.has(n)}function mc(){}function ai(e){var n=-1,o=Array(e.size);return e.forEach(function(a){o[++n]=a}),o}var uc=1/0,fc=mt&&1/ai(new mt([,-0]))[1]==uc?function(e){return new mt(e)}:mc,hc=200;function pc(e,n,o){var a=-1,i=dc,r=e.length,l=!0,d=[],c=d;if(r>=hc){var m=fc(e);if(m)return ai(m);l=!1,i=cc,c=new qt}else c=d;e:for(;++a<r;){var h=e[a],u=h;if(h=h!==0?h:0,l&&u===u){for(var p=c.length;p--;)if(c[p]===u)continue e;d.push(h)}else i(c,u,o)||(c!==d&&c.push(u),d.push(h))}return d}function ri(e){return e&&e.length?pc(e):[]}var gc=0;function li(e){var n=++gc;return mo(e)+n}var si=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,je="\\d\\d?",Ke="\\d\\d",yc="\\d{3}",bc="\\d{4}",Mt="[^\\s]+",di=/\[([^]*?)\]/gm;function ci(e,n){for(var o=[],a=0,i=e.length;a<i;a++)o.push(e[a].substr(0,n));return o}var mi=function(e){return function(n,o){var a=o[e].map(function(r){return r.toLowerCase()}),i=a.indexOf(n.toLowerCase());return i>-1?i:null}};function Xe(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];for(var a=0,i=n;a<i.length;a++){var r=i[a];for(var l in r)e[l]=r[l]}return e}var ui=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],fi=["January","February","March","April","May","June","July","August","September","October","November","December"],_c=ci(fi,3),Ec=ci(ui,3),hi={dayNamesShort:Ec,dayNames:ui,monthNamesShort:_c,monthNames:fi,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},Ht=Xe({},hi),Cc=function(e){return Ht=Xe(Ht,e)},pi=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},he=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},Sc={D:function(e){return String(e.getDate())},DD:function(e){return he(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return he(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 he(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 he(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return he(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return he(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return he(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return he(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return he(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return he(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return he(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?"-":"+")+he(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+he(Math.floor(Math.abs(n)/60),2)+":"+he(Math.abs(n)%60,2)}},gi=function(e){return+e-1},yi=[null,je],bi=[null,Mt],_i=["isPm",Mt,function(e,n){var o=e.toLowerCase();return o===n.amPm[0]?0:o===n.amPm[1]?1:null}],Ei=["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}],Tc={D:["day",je],DD:["day",Ke],Do:["day",je+Mt,function(e){return parseInt(e,10)}],M:["month",je,gi],MM:["month",Ke,gi],YY:["year",Ke,function(e){var n=new Date,o=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?o-1:o)+e)}],h:["hour",je,void 0,"isPm"],hh:["hour",Ke,void 0,"isPm"],H:["hour",je],HH:["hour",Ke],m:["minute",je],mm:["minute",Ke],s:["second",je],ss:["second",Ke],YYYY:["year",bc],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",Ke,function(e){return+e*10}],SSS:["millisecond",yc],d:yi,dd:yi,ddd:bi,dddd:bi,MMM:["month",Mt,mi("monthNamesShort")],MMMM:["month",Mt,mi("monthNames")],a:_i,A:_i,ZZ:Ei,Z:Ei},Gt={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"},wc=function(e){return Xe(Gt,e)},kc=function(e,n,o){if(n===void 0&&(n=Gt.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=Gt[n]||n;var a=[];n=n.replace(di,function(r,l){return a.push(l),"@@@"});var i=Xe(Xe({},Ht),o);return n=n.replace(si,function(r){return Sc[r](e,i)}),n.replace(/@@@/g,function(){return a.shift()})};function Mc(e,n,o){if(o===void 0&&(o={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=Gt[n]||n,e.length>1e3)return null;var a=new Date,i={year:a.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],l=[],d=n.replace(di,function(M,T){return l.push(pi(T)),"@@@"}),c={},m={};d=pi(d).replace(si,function(M){var T=Tc[M],C=T[0],E=T[1],w=T[3];if(c[C])throw new Error("Invalid format. "+C+" specified twice in format");return c[C]=!0,w&&(m[w]=!0),r.push(T),"("+E+")"}),Object.keys(m).forEach(function(M){if(!c[M])throw new Error("Invalid format. "+M+" is required in specified format")}),d=d.replace(/@@@/g,function(){return l.shift()});var h=e.match(new RegExp(d,"i"));if(!h)return null;for(var u=Xe(Xe({},Ht),o),p=1;p<h.length;p++){var _=r[p-1],N=_[0],g=_[2],O=g?g(h[p],u):+h[p];if(O==null)return null;i[N]=O}i.isPm===1&&i.hour!=null&&+i.hour!=12?i.hour=+i.hour+12:i.isPm===0&&+i.hour==12&&(i.hour=0);var A;if(i.timezoneOffset==null){A=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var R=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],p=0,B=R.length;p<B;p++)if(c[R[p][0]]&&i[R[p][0]]!==A[R[p][1]]())return null}else if(A=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return A}var ft={format:kc,parse:Mc,defaultI18n:hi,setGlobalDateI18n:Cc,setGlobalDateMasks:wc};function Nc(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 Ci=Math.max;function Ac(e,n,o){return n=Ci(n===void 0?e.length-1:n,0),function(){for(var a=arguments,i=-1,r=Ci(a.length-n,0),l=Array(r);++i<r;)l[i]=a[n+i];i=-1;for(var d=Array(n+1);++i<n;)d[i]=a[i];return d[n]=o(l),Nc(e,this,d)}}function Ic(e){return function(){return e}}var Oc=jt?function(e,n){return jt(e,"toString",{configurable:!0,enumerable:!1,value:Ic(n),writable:!0})}:rn,Vc=800,Bc=16,Fc=Date.now;function Rc(e){var n=0,o=0;return function(){var a=Fc(),i=Bc-(a-o);if(o=a,i>0){if(++n>=Vc)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var Dc=Rc(Oc);function Lc(e,n){return Dc(Ac(e,n,rn),e+"")}function Uc(e,n,o){if(!ye(o))return!1;var a=typeof n;return(a=="number"?Ft(o)&&eo(n,o.length):a=="string"&&n in o)?Lt(o[n],e):!1}var Si=Object.prototype,Pc=Si.hasOwnProperty,vc=Lc(function(e,n){e=Object(e);var o=-1,a=n.length,i=a>2?n[2]:void 0;for(i&&Uc(n[0],n[1],i)&&(a=1);++o<a;)for(var r=n[o],l=zt(r),d=-1,c=l.length;++d<c;){var m=l[d],h=e[m];(h===void 0||Lt(h,Si[m])&&!Pc.call(e,m))&&(e[m]=r[m])}return e}),xc=Ce.isFinite;function Ti(e){return typeof e=="number"&&xc(e)}var wi=1/0,$c=17976931348623157e292;function jc(e){if(!e)return e===0?e:0;if(e=Tn(e),e===wi||e===-wi){var n=e<0?-1:1;return n*$c}return e===e?e:0}function Kc(e){var n=jc(e),o=n%1;return n===n?o?n-o:n:0}function zc(e){return typeof e=="number"&&e==Kc(e)}var qc="[object Number]";function wn(e){return typeof e=="number"||xe(e)&&ve(e)==qc}const Ee={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",managed_ui:{title:"Redis",groups:{self_managed:"Self-managed Redis",konnect_managed:"Konnect-managed Redis"},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.",badge:"Recommended",title:"Shared Redis Configuration",create_new_configuration:"New Redis",selector:{placeholder:"Filter Redis configurations..."}},dedicated_configuration:{label:"Use locally-scoped configuration",description:"Create and use a Redis configuration specifically for this plugin."}},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",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:X}=ge.createI18n("en-us",Ee),le={fieldIsRequired:X("validators.field_is_required"),invalidFormat:X("validators.invalid_format"),numberTooSmall:X("validators.number_too_small"),numberTooBig:X("validators.number_too_large"),invalidNumber:X("validators.invalid_number"),invalidInteger:X("validators.invalid_integer"),textTooSmall:X("validators.text_too_short"),textTooBig:X("validators.text_too_long"),thisNotText:X("validators.this_not_text"),thisNotArray:X("validators.this_not_array"),selectMinItems:X("validators.select_min_items"),selectMaxItems:X("validators.select_max_items"),invalidDate:X("validators.invalid_date"),dateIsEarly:X("validators.date_is_early"),dateIsLate:X("validators.date_is_late"),invalidEmail:X("validators.invalid_email"),invalidURL:X("validators.invalid_url"),invalidCard:X("validators.invalid_card"),invalidCardNumber:X("validators.invalid_card_number"),invalidTextContainNumber:X("validators.invalid_text_contain_number"),invalidTextContainSpec:X("validators.invalid_tex_contain_spec")},q=(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},Te=(e,n,o=le)=>Z(e)||e===""?n?[q(o.fieldIsRequired)]:[]:null,Je={required:(e,n,o,a=le)=>Te(e,n.required,a)||[],number:(e,n,o,a=le)=>{let i=Te(e,n.required,a);return i!=null||(i=[],Ti(e)?(!Z(n.min)&&e<n.min,(a=le)&&i.push(q(a.numberTooSmall,n.min)),!Z(n.max)&&e>n.max,(a=le)&&i.push(q(a.numberTooBig,n.max))):i.push(q(a.invalidNumber))),i},integer:(e,n,o,a=le)=>{let i=Te(e,n.required,a);return i!=null||(i=[],i.concat(Je.number(e,n,o,a)),zc(e)||i.push(q(a.invalidInteger))),i},double:(e,n,o,a=le)=>{const i=Te(e,n.required,a);return i??(!wn(e)||isNaN(e)?[q(a.invalidNumber)]:[])},string:(e,n,o,a=le)=>{let i=Te(e,n.required,a);return i!=null||(i=[],Ze(e)?(!Z(n.min)&&e.length<n.min&&i.push(q(a.textTooSmall,e.length,n.min)),!Z(n.max)&&e.length>n.max&&i.push(q(a.textTooBig,e.length,n.max))):i.push(q(a.thisNotText))),i},array:(e,n,o,a=le)=>{if(n.required){if(!Array.isArray(e))return[q(a.thisNotArray)];if(e.length===0)return[q(a.fieldIsRequired)]}if(!Z(e)){if(!Z(n.min)&&e.length<n.min)return[q(a.selectMinItems,n.min)];if(!Z(n.max)&&e.length>n.max)return[q(a.selectMaxItems,n.max)]}return[]},date:(e,n,o,a=le)=>{let i=Te(e,n.required,a);if(i!=null)return i;i=[];const r=new Date(e);if(isNaN(r.getDate()))return[q(a.invalidDate)];if(!Z(n.min)){const l=new Date(n.min);r.valueOf()<l.valueOf()&&i.push(q(a.dateIsEarly,ft.format(r),ft.format(l)))}if(!Z(n.max)){const l=new Date(n.max);r.valueOf()>l.valueOf()&&i.push(q(a.dateIsLate,ft.format(r),ft.format(l)))}return i},regexp:(e,n,o,a=le)=>{const i=Te(e,n.required,a);return i??(!Z(n.pattern)&&!new RegExp(n.pattern).test(e)?[q(a.invalidFormat)]:[])},email:(e,n,o,a=le)=>{const i=Te(e,n.required,a);return i??(/^(([^<>()\[\]\\.,;:\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)?[]:[q(a.invalidEmail)])},url:(e,n,o,a=le)=>{const i=Te(e,n.required,a);return i??(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(e)?[]:[q(a.invalidURL)])},creditCard:(e,n,o,a=le)=>{const i=Te(e,n.required,a);if(i!=null)return i;const r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,l=e.replace(/[^0-9]+/g,"");if(!r.test(l))return[q(a.invalidCard)];let d=0,c,m,h;for(let u=l.length-1;u>=0;u--)c=l.substring(u,u+1),m=parseInt(c,10),h?(m*=2,m>=10?d+=m%10+1:d+=m):d+=m,h=!h;return d%10===0&&l?[]:[q(a.invalidCardNumber)]},alpha:(e,n,o,a=le)=>{const i=Te(e,n.required,a);return i??(/^[a-zA-Z]*$/.test(e)?[]:[q(a.invalidTextContainNumber)])},alphaNumeric:(e,n,o,a=le)=>{const i=Te(e,n.required,a);return i??(/^[a-zA-Z0-9]*$/.test(e)?[]:[q(a.invalidTextContainSpec)])}};Object.keys(Je).forEach(e=>{const n=Je[e];j(n)&&(n.locale=o=>(a,i,r)=>n(a,i,r,vc(o,le)))});function ki(e){return Ze(e)?Je[e]!=null?Je[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function kn(e,n,o){let a=$(o.context,"schema.attributes",{});const i=n.value||"input";Ze(i)&&(a=$(a,i)||a),de(a,(r,l)=>{e.setAttribute(l,r)})}const Ae={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:kn,updated:kn,componentUpdated:kn}},computed:{value:{cache:!1,get(){let e;return j($(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),j(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 i=[];Array.isArray(this.schema.validator)?de(this.schema.validator,r=>{i.push(ki(r).bind(this))}):i.push(ki(this.schema.validator).bind(this)),de(i,r=>{if(n)o.push(r(this.value,this.schema,this.model));else{const l=r(this.value,this.schema,this.model);l&&j(l.then)?l.then(d=>{d&&(this.errors=this.errors.concat(d));const c=this.errors.length===0;this.$emit("validated",c,this.errors,this)}):l&&(o=o.concat(l))}})}const a=i=>{let r=[];de(ri(i),d=>{Array.isArray(d)&&d.length>0?r=r.concat(d):Ze(d)&&r.push(d)}),j(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,r,this.schema);const l=r.length===0;return e||this.$emit("validated",l,r,this),this.errors=r,r};return n?Promise.all(o).then(a):a(o)},debouncedValidate(){j(this.debouncedValidateFunc)||(this.debouncedValidateFunc=ut(this.validate.bind(this),$(this.schema,"validateDebounceTime",$(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let o=!1;j(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),j(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 i=o.split(".");let r=0;const l=i.length;for(;r<l;){const d=i[r];if(r<l-1)a[d]!==void 0||(a[d]={}),a=a[d];else{a[d]=n;return}++r}},getFieldID(e,n=!1){const o=$(this.formOptions,"fieldIdPrefix","");return Cn(e,o)+(n?"-"+li():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return $(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},Hc=Object.freeze(Object.defineProperty({__proto__:null,default:Ae},Symbol.toStringTag,{value:"Module"})),x=(e,n)=>{const o=e.__vccOpts||e;for(const[a,i]of n)o[a]=i;return o},Gc={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},Yc={class:"material-icons"},Wc=x(Object.assign({mixins:[Ae],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",Gc,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:o[0]||(o[0]=(...a)=>n.handleOpen&&n.handleOpen(...a))},[t.createElementVNode("i",Yc,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(H,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])],2)]))}}),[["__scopeId","data-v-e8f66c8a"]]),Zc={class:"array-card-container"},Mi=x(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 i=t.resolveComponent("KCard"),r=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Zc,[t.createVNode(i,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(r,{appearance:"tertiary",class:"array-card-remove-button",onClick:a[0]||(a[0]=l=>o.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(ue.TrashIcon))]),_:1})])}}}),[["__scopeId","data-v-a8366ec5"]]),Xc={class:"array-item-wrapper"},Jc={class:"array-item"},Qc={class:"array-item-after"},Ni=x(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",Xc,[t.createElementVNode("div",Jc,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"tertiary",class:"delete",onClick:o[0]||(o[0]=i=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(ue.TrashIcon))]),_:1})]),t.createElementVNode("div",Qc,[t.renderSlot(n.$slots,"after",{},void 0,!0)])])}}}),[["__scopeId","data-v-e6b6837c"]]),em={class:"multi-item-wrapper"},Ai=x(t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",em,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"danger",class:"delete",onClick:o[0]||(o[0]=i=>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"]]);var tm=4;function Ii(e){return kt(e,tm)}const nm="#6c7489",Oi="12px",Vi="20px",om=["data-testid","data-testlabel"],im={class:"item-label"},am={class:"autosuggest__results_message"},rm=x(t.defineComponent({__name:"AutoSuggest",props:t.mergeModels({placeholder:{default:""},suggestions:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emptyMessage:{default:""},domId:{},error:{default:null}},{id:{required:!0},idModifiers:{}}),emits:t.mergeModels(["change","query-change"],["update:id"]),setup(e){const{t:n}=ge.createI18n("en-us",Ee),o=t.useModel(e,"id");return(a,i)=>{const r=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(r,{id:e.domId,ref:"suggestion",modelValue:o.value,"onUpdate:modelValue":i[0]||(i[0]=l=>o.value=l),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:i[1]||(i[1]=l=>a.$emit("change",l)),onQueryChange:i[2]||(i[2]=l=>a.$emit("query-change",l))},t.createSlots({"item-template":t.withCtx(({item:l})=>[t.renderSlot(a.$slots,"item",{item:l},()=>[t.createElementVNode("span",{class:"item-label","data-testid":l.id&&`${l.id}-0`,"data-testlabel":l.label},t.toDisplayString(l.label),9,om)],!0)]),"selected-item-template":t.withCtx(({item:l})=>[t.renderSlot(a.$slots,"selected-item",{item:l},()=>[t.createElementVNode("span",im,t.toDisplayString(l.label),1)],!0)]),empty:t.withCtx(()=>[t.createElementVNode("div",am,[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-1e9151dd"]]),lm="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Mn=e=>e?e.length===36&&new RegExp(`^${lm}$`).test(e):!1,sm={class:"selected-entity-item"},dm={class:"selected-entity-label"},cm={class:"entity-suggestion-item"},mm={class:"entity-label"},um={class:"entity-id"},fm=500,hm=50,pm=1e3,Bi=x(t.defineComponent({__name:"FieldScopedEntitySelect",props:{transformItem:{type:Function},allowUuidSearch:{type:Boolean,default:!1},placeholder:{},fields:{default:()=>[]},selectedItem:{},selectedItemLoading:{type:Boolean},domId:{},id:{},entity:{},disabled:{type:Boolean},fieldDisabled:{type:Boolean},error:{},labelField:{default:"name"}},emits:["change"],setup(e){const n=t.inject(be,void 0),o=async(f,y)=>{if(!n)return console.warn("[@kong-ui-public/forms] No API service provided"),[];const{data:S}=await n.getAllV2(e.entity,{name:f,size:pm},y);return S.data},a=async f=>n?n.peek(e.entity,f):(console.warn("[@kong-ui-public/forms] No API service provided"),Promise.resolve({data:{data:[]}})),i=async f=>{if(!n)return console.warn("[@kong-ui-public/forms] No API service provided"),{id:f};const y=await n.getOne(e.entity,f,{validateStatus:S=>S>=200&&S<300||S===404});if(y.status===404)throw new Error(`Entity of type ${e.entity} with id ${f} not found`);return y.data},r=e.transformItem??(f=>({...f,label:f[e.labelField],value:f.id})),l=t.ref(""),d=t.ref(!1),c=t.ref(!1),m=t.ref(""),h=t.ref([]),u=t.ref([]),p=t.ref([]),{t:_}=ge.createI18n("en-us",Ee),N=t.ref(null);let g=null;const O=async(f,y)=>{if(!e.fieldDisabled){clearTimeout(g),g=setTimeout(()=>{d.value=!0},1500);try{const S=await f();u.value=S,h.value=u.value.map(r)}catch(S){if(y!=null&&y.aborted)return;if(h.value=[],ba.isAxiosError(S)&&S.status===404){console.warn("unable to search with UUID",m.value,"for entity type",e.entity);return}l.value=S.message}finally{clearTimeout(g),d.value=!1}}},A=ut(f=>{if(f=f||"",m.value=f,!f.trim()&&!c.value){h.value=E(p.value);return}N.value&&N.value.abort();const y=new AbortController;if(N.value=y,c.value){V(f);return}T(f,y)},fm,{leading:!0}),R=async(f,y)=>await o(f,y),B=async()=>{const{data:{data:f,next:y,offset:S}}=await a(hm);return(!y||!S)&&(c.value=!0),u.value=f,p.value=f.map(k=>({...r(k),group:_("fields.auto_suggest.recently_created",{entity:e.entity})})),f},M=async f=>[await i(f)],T=(f,y)=>{Mn(f)&&e.allowUuidSearch?O(async()=>await M(f)):O(async()=>await R(f,y.signal),y.signal)},C=f=>{let y=[];y=E(p.value),f!=null&&f.trim()?h.value=y.filter(S=>e.fields.some(k=>(S[k]||"").includes(f))):h.value=y},E=f=>e.selectedItem?f.some(y=>y.value===e.selectedItem.value)?f:[e.selectedItem,...f]:f,w=f=>{h.value=p.value.filter(y=>y.id===f)},V=f=>{Mn(f)&&e.allowUuidSearch?w(f):C(f)};return t.onMounted(async()=>{await O(B);const f=t.watch(()=>e.selectedItem,y=>{y&&(h.value=E(p.value)),f()});h.value=E(p.value)}),(f,y)=>(t.openBlock(),t.createBlock(rm,{id:e.id,disabled:e.fieldDisabled,"dom-id":e.domId,"empty-message":l.value,error:e.error,loading:e.selectedItemLoading||d.value,placeholder:e.placeholder,readonly:e.disabled,suggestions:h.value,onChange:y[0]||(y[0]=S=>f.$emit("change",S)),onQueryChange:t.unref(A)},{before:t.withCtx(()=>[t.renderSlot(f.$slots,"before",{},()=>[t.createVNode(t.unref(ue.SearchIcon),{color:t.unref(nm),size:t.unref(Vi)},null,8,["color","size"])],!0)]),"selected-item":t.withCtx(({item:S})=>[t.renderSlot(f.$slots,"selected-item",{item:S},()=>[t.createElementVNode("span",sm,[t.createElementVNode("span",dm,t.toDisplayString(S.label??S.id),1)])],!0)]),item:t.withCtx(({item:S})=>[t.renderSlot(f.$slots,"item",{item:S},()=>[t.createElementVNode("div",cm,[t.createElementVNode("span",mm,t.toDisplayString(S.label??t.unref(fo)),1),t.createElementVNode("span",um,t.toDisplayString(S.id),1)])],!0)]),_:3},8,["id","disabled","dom-id","empty-message","error","loading","placeholder","readonly","suggestions","onQueryChange"]))}}),[["__scopeId","data-v-28628e7b"]]);function Fi(e,n,o){return o?Ne.SET_REFERRAL_VALUE:e&&!n||!e&&n?Ne.UPDATE_ENTITY:e&&n?Ne.CREATE_FROM_ENTITY:Ne.CREATE_NOT_FROM_ENTITY}const gm={components:{FieldScopedEntitySelect:Bi},mixins:[Ae],inject:[be],emits:["model-updated"],setup(){const{t:e}=ge.createI18n("en-us",Ee);return{t:e}},data(){return{idValue:"",error:null,initialItem:null,selectedItem:null,loading:!1}},computed:{fieldState(){return Fi(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search},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 Ne.UPDATE_ENTITY:if(!this[be]){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 Ne.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Ne.SET_REFERRAL_VALUE:this.idValue=this.value}e&&(this.initialItem=this.transformItem(e),this.selectedItem=this.initialItem)}catch(o){this.error=o.message||this.t("fields.auto_suggest.error.load_entity",{entity:this.schema.entity}),console.error("err!",o)}finally{this.loading=!1}},methods:{async getOne(e){if(!this[be])return console.warn("[@kong-ui-public/forms] No API service provided"),{};const n=await this[be].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){var o;const n=((o=this.schema)==null?void 0:o.labelField)||"id";return{...e,label:n&&e?e[n]:"",value:e.id}},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},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}}};function ym(e,n,o,a,i,r){const 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:i.idValue,"allow-uuid-search":r.allowUuidSearch,disabled:i.loading,"dom-id":e.schema.model,entity:r.entity,error:i.error,"field-disabled":e.schema.disabled,fields:r.inputFieldsWithoutId,"initial-item-selected":r.initialValueSelected,"label-field":e.schema.labelField||"id",placeholder:i.loading?a.t("fields.auto_suggest.loading"):e.schema.placeholder,"selected-item":i.selectedItem,"selected-item-loading":i.loading,onChange:r.onSelected},null,8,["id","allow-uuid-search","disabled","dom-id","entity","error","field-disabled","fields","initial-item-selected","label-field","placeholder","selected-item","selected-item-loading","onChange"])]),_:1},8,["text"])}const Ri=x(gm,[["render",ym],["__scopeId","data-v-9ab50e80"]]),Nn=50,bm={mixins:[Ae],inject:[be],emits:["model-updated"],setup(){const{t:e}=ge.createI18n("en-us",Ee);return{t:e}},data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Fi(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 Ne.UPDATE_ENTITY:if(!this[be]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[be].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 Ne.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Ne.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=ut(this.search,500)),this.performSearch(e)},async search(e){if(e.trim().length===0)return;this.loading=!0;const n=[],o=[],a=this.getInputFields(),i=new Set;Mn(e)&&a.includes("id")?o.push((async()=>{const r=await this.fetchExact(e);n.push({...r,label:this.getSuggestionLabel(r),value:r.id})})()):o.push(...a.filter(r=>r!=="id").map(async r=>{(await this.fetchSuggestions(e,r)).forEach(d=>{i.has(d.id)||(i.add(d.id),n.push({...d,label:this.getSuggestionLabel(d),value:d.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[be])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<Nn;){const a=await this[be].getAll(this.entity,{size:Nn,offset:o,...e});if(n.push(...a.data.data),o=a.data.offset,!o)break}return n.slice(0,Nn)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[be]?(await this[be].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}}},_m=["data-testid","data-testlabel"],Em=["data-testid"],Cm={class:"autosuggest__results_message"};function Sm(e,n,o,a,i,r){const l=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:r.scope})},{default:t.withCtx(()=>[t.createVNode(l,{id:e.schema.model,ref:"suggestion",modelValue:i.idValue,"onUpdate:modelValue":n[0]||(n[0]=d=>i.idValue=d),clearable:"",disabled:e.schema.disabled,"enable-filtering":"","filter-function":()=>!0,items:i.items,loading:i.loading,placeholder:e.schema.placeholder,width:"100%",onChange:r.onSelected,onQueryChange:r.onQueryChange},{"item-template":t.withCtx(({item:d})=>[t.createElementVNode("span",{class:"first-part","data-testid":d.id&&`${d.id}-0`,"data-testlabel":d.label},t.toDisplayString(r.getSuggestionLabel(d).split(" - ")[0]),9,_m),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.getSuggestionLabel(d).split(" - ").slice(1),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m,class:"field-span","data-testid":d.id&&`${d.id}-${m+1}`||m+1},t.toDisplayString(c),9,Em))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",Cm,[t.createElementVNode("span",null,t.toDisplayString(i.message),1)])]),_:1},8,["id","modelValue","disabled","items","loading","placeholder","onChange","onQueryChange"])]),_:1},8,["text"])}const Di=x(bm,[["render",Sm],["__scopeId","data-v-433129a3"]]);function Tm(e){const n=t.ref([]),o=t.ref(null),a=g=>Ze(g)?Je[g]!=null?Je[g]:(console.warn(`'${g}' is not a validator function!`),null):g,i=t.computed({get(){var O,A;let g;return j($(e.schema,"get"))?g=e.schema.get((O=e.model)==null?void 0:O.value):g=$((A=e.model)==null?void 0:A.value,e.schema.model),_(g)},set(g){const O=i;g=N(g),j(g)?g(g,O):d(g,O)}}),r=g=>{var B;c();const O=$(e.formOptions,"validateAsync",!1);let A=[];if(e.schema.readonly!==!0&&e.disabled!==!0){const M=[],T=(B=e.schema)==null?void 0:B.validator;T&&(Array.isArray(T)?de(T,C=>{M.push(a(C))}):M.push(a(T))),j(e.externalValidator)&&M.push(e.externalValidator),de(M,C=>{var E,w;if(O)A.push(C(i.value,e.schema,(E=e.model)==null?void 0:E.value));else{const V=C(i.value,e.schema,(w=e.model)==null?void 0:w.value);V&&j(V.then)?V.then(f=>{f&&(n.value=n.value.concat(f));const y=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:y,errors:n.value,field:e.schema})}):V&&(A=A.concat(V))}})}const R=M=>{var C,E;let T=[];if(de(ri(M),w=>{Array.isArray(w)&&w.length>0?T=T.concat(w):Ze(w)&&T.push(w)}),j((C=e.schema)==null?void 0:C.onValidated)&&e.schema.onValidated((E=e.model)==null?void 0:E.value,T,e.schema),!g){const w=T.length===0;e.emitValidated&&e.emitValidated({isValid:w,errors:T,field:e.schema})}return M=T,T};return O?Promise.all(A).then(R):R(A)},l=()=>{j(o.value)?o.value():o.value=ut(r,$(e.schema,"validateDebounceTime",$(e.formOptions,"validateDebounceTime",500)))},d=(g,O)=>{var R,B,M;let A=!1;j(e.schema.set)?(e.schema.set((R=e.model)==null?void 0:R.value,g),A=!0):e.schema.model&&(m(e.schema.model,g),A=!0),A&&(e.emitModelUpdated&&((B=e.model)!=null&&B.value)&&e.emitModelUpdated({value:g,model:e.schema.model}),j(e.schema.onChanged)&&e.schema.onChanged((M=e.model)==null?void 0:M.value,g,O,e.schema),$(e.formOptions,"validateAfterChanged",!1)===!0&&($(e.schema,"validateDebounceTime",$(e.formOptions,"validateDebounceTime",0))>0?l():r()))},c=()=>{n.value.splice(0)},m=(g,O)=>{var C;let A=g.replace(/\[(\w+)\]/g,".$1");A=A.replace(/^\./,"");let R=((C=e.model)==null?void 0:C.value)||{},B=0;const M=A.split("."),T=M.length;for(;B<T;){const E=M[B];if(B<T-1)R[E]!==void 0||(R[E]={}),R=R[E];else{R[E]=O;return}++B}},h=(g,O=!1)=>{const A=$(e.formOptions,"fieldIdPrefix","");return Cn(g,A)+(O?"-"+li():"")},u=g=>`${h(g)}-label`,p=()=>$(e.schema,"fieldClasses",[]),_=g=>e.formatValueToField&&typeof e.formatValueToField=="function"?e.formatValueToField(g):g,N=g=>e.formatValueToModel&&typeof e.formatValueToModel=="function"?e.formatValueToModel(g):g;return{value:i,clearValidationErrors:c,getFieldID:h,getLabelId:u,getFieldClasses:p,updateModelValue:d}}function wm(e){const n=[],o=a=>{const i=["cluster-cache","cluster_cache"];for(const r of i)if(a.model.includes(r))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 km(e,n){const o=new RegExp("(?<=config-redis-).*"),a=/Config\.Redis.*/;return n.filter(r=>{const l=r.model.match(o);return l&&!Object.keys(e).includes(l[0])}).map(r=>{const l=r.label.match(a);return{label:l?l[0]:r.label,key:r.model,value:"N/A",type:"text"}})}const we={useAbstractFields:Tm,useRedisPartial:wm,useRedisNonStandardFields:km},Mm={class:"form-field-wrapper"},Li=x(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,i=o,r=t.toRefs(a),l=t.inject(_e,void 0),{updateModelValue:d,getFieldID:c,clearValidationErrors:m,value:h}=we.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:B=>{i("modelUpdated",B.value,B.model)}});n({clearValidationErrors:m});const u=t.computed(()=>{var M,T;const B=(M=a.schema)==null?void 0:M.inputType.toLowerCase();if(B==="number"&&((T=a.schema)==null?void 0:T.referenceable)===!0)return"text";switch(B){case"string":return"text";case"datetime":return"datetime-local";default:return B||"text"}}),p={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},_=(B,M)=>{var w,V;let T=B;const C=p[u.value]||"",E=ft.parse(B,C);E&&((w=a.schema)!=null&&w.format?T=ft.format(E,(V=a.schema)==null?void 0:V.format):T=E.valueOf()),d(T,M)},N=(B,M)=>{wn(B)||(B=NaN),d(B,M)},g=B=>{let M=B;switch(a.schema.inputType){case"number":case"range":Ti(parseFloat(B))&&(M=parseFloat(B));break}h.value=M,d(M,B)},O=B=>{h.value=B,d(B,B)},A=t.ref(null),R=()=>{var B;j(A.value)&&((B=A.value)==null||B.flush())};return t.onMounted(()=>{switch(u.value){case"number":case"range":A.value=ut((B,M)=>{N(B,M)},parseInt($(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":A.value=ut((B,M)=>{_(B,M)},parseInt($(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}}),t.onBeforeMount(()=>{u.value==="checkbox"?console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead."):u.value==="radio"?console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead."):u.value==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}),(B,M)=>{const T=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Mm,[t.createVNode(T,t.mergeProps(B.$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:u.value==="color"||u.value==="range"?t.unref(h):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(h),name:e.schema.inputName,pattern:e.schema.pattern,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,"show-password-mask-toggle":u.value==="password",type:u.value,width:e.schema.width,onBlur:R,"onUpdate:modelValue":g}),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(l)),{schema:e.schema,update:O,value:t.unref(h)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-c9bb165e"]]),Nm={name:"FieldMetric",components:{AddIcon:ue.AddIcon,TrashIcon:ue.TrashIcon},mixins:[Ae],emits:["remove-item"],data(){return{contentVisible:!1}}},Am={key:0,class:"content"};function Im(e,n,o,a,i,r){const l=t.resolveComponent("AddIcon"),d=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field-dropdown",{active:i.contentVisible}])},[t.createElementVNode("div",{class:"title",onClick:n[0]||(n[0]=m=>i.contentVisible=!i.contentVisible)},[t.createTextVNode(t.toDisplayString(e.model.name?e.model.name:"New Item")+" ",1),t.createVNode(l,{class:"metric-add-icon"})]),t.createVNode(t.Transition,{name:"slide-fade"},{default:t.withCtx(()=>[i.contentVisible?(t.openBlock(),t.createElementBlock("div",Am,[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(d)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const Ui=x(Nm,[["render",Im]]),Om={class:"field-object-container"},Vm={key:1},Bm=["id"],Fm={key:0},Rm=["onUpdate:modelValue"],Dm={key:1},Lm=["onUpdate:modelValue"],Um={key:2},Pm=["onUpdate:modelValue"],vm=["onClick"],Pi=x(Object.assign({mixins:[Ae],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",Om,[n.schema.schema?(t.openBlock(),t.createBlock(H,{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",Vm,[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,(i,r)=>(t.openBlock(),t.createElementBlock("tr",{key:r},[t.createElementVNode("td",null,t.toDisplayString(r),1),n.keyTypes[r]==="string"?(t.openBlock(),t.createElementBlock("td",Fm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l=>n.value[r]=l,type:"text"},null,8,Rm),[[t.vModelText,n.value[r]]])])):t.createCommentVNode("",!0),n.keyTypes[r]==="boolean"?(t.openBlock(),t.createElementBlock("td",Dm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l=>n.value[r]=l,type:"checkbox"},null,8,Lm),[[t.vModelCheckbox,n.value[r]]])])):t.createCommentVNode("",!0),n.keyTypes[r]==="number"?(t.openBlock(),t.createElementBlock("td",Um,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l=>n.value[r]=l,type:"number"},null,8,Pm),[[t.vModelText,n.value[r]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:l=>n.removeElement(r)},null,8,vm)])]))),128))],10,Bm),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=i=>n.newKeyType=i)},[...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]=i=>n.newKeyName=i),type:"text"},null,512),[[t.vModelText,n.newKeyName]]),t.createElementVNode("input",{type:"button",value:"Add key",onClick:o[2]||(o[2]=(...i)=>n.addKey&&n.addKey(...i))})]))])),[[a,n.attributes]])}}}),[["__scopeId","data-v-6eddb0ed"]]),xm=["id"],$m=["data-testid"],jm={class:"item-wrapper"},Km={class:"index-wrapper"},zm={key:0},qm={key:1},Hm=["onUpdate:modelValue","placeholder","type","onInput"],Gm={key:0,class:"hint"},Ym={class:"input-item"},Wm=["placeholder"],Zm={key:0,class:"hint"},vi=x(Object.assign({mixins:[Ae],inject:{autofillSlot:{from:_e,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(i=>{const r=i.indexOf(o+"-");if(r>-1&&Array.isArray(n))if(n.length>0){const d=i.split("-").filter(m=>n.find(h=>h.model===m)),c=i.split(`-${d}`)[0].split(`${o}-`)[1];d.length?a[c]={...a[c],[d]:e[i]}:a[i.substring(r+`${o}-`.length)]=e[i]}else a[i.substring(`${o}-`.length)]=e[i];else{const d=i.split("-").filter(m=>m===this.schema.model),c=i.split(`-${d}`)[0].split(`${o}-`)[1];c&&(a[c]=e[i])}return i}),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,(i,r)=>(t.openBlock(),t.createElementBlock("div",{key:r,"data-testid":`field-object-key-${r}`},[t.createElementVNode("div",null,[t.createElementVNode("div",jm,[t.createElementVNode("div",Km,[t.createElementVNode("strong",null,t.toDisplayString(r),1),t.createElementVNode("div",null,[t.createVNode(a,{appearance:"tertiary",class:"delete",icon:"",type:"button",onClick:l=>n.removeElement(r)},{default:t.withCtx(()=>[t.createVNode(t.unref(ue.TrashIcon))]),_:1},8,["onClick"])])]),o[1]||(o[1]=t.createElementVNode("hr",{class:"divider"},null,-1)),n.subSchema?(t.openBlock(),t.createElementBlock("div",zm,[t.createVNode(H,{model:n.transformedModel[r],options:{helpAsHtml:!0},schema:n.subSchema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",qm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l=>n.value[r]=l,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:n.valueInputType,onInput:l=>n.updateModel(n.value[r],n.model[n.schema.model])},null,40,Hm),[[t.vModelDynamic,n.value[r]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",Gm,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:l=>n.value[r]=l,value:n.value[r]},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",Ym,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>n.newKeyName=i),class:"form-control","data-testid":"keyname-input",placeholder:n.schema.placeholder,type:"text"},null,8,Wm),[[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",Zm,t.toDisplayString(n.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,xm)}}}),[["__scopeId","data-v-0faeec4d"]]),Xm={class:"radio-selection-group"},xi=x(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,i=o,r=t.toRefs(a),{updateModelValue:l,value:d,clearValidationErrors:c}=we.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:h=>{i("modelUpdated",h.value,h.model)}});n({clearValidationErrors:c});const m=h=>{let u=h;typeof h=="string"&&(u=h.split(","),a.schema.array||(u=u.toString())),l(u,h)};return(h,u)=>{const p=t.resolveComponent("KRadio");return t.openBlock(),t.createElementBlock("div",Xm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(_,N)=>(t.openBlock(),t.createBlock(p,{id:e.schema.name+"-"+N,key:_.value,modelValue:t.unref(d),"onUpdate:modelValue":u[0]||(u[0]=g=>t.isRef(d)?d.value=g:null),label:_.name,"label-attributes":{info:e.schema.help},name:e.schema.name,required:e.schema.required||void 0,"selected-value":_.value,onChange:m},null,8,["id","modelValue","label","label-attributes","name","required","selected-value"]))),128))])}}}),[["__scopeId","data-v-a070103e"]]),$i=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,i=o,r=t.computed(()=>a.schema.selectOptions||{}),l=g=>Z(g)?null:g,d=t.toRefs(a),{getFieldID:c,clearValidationErrors:m,value:h}=we.useAbstractFields({model:d.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:l,emitModelUpdated:g=>{i("modelUpdated",g.value,g.model)}});n({clearValidationErrors:m});const u=t.computed(()=>{const g=a.schema.values;return p(typeof g=="function"?g.apply(this,[a.model,a.schema]):g)}),p=g=>{const O=[];return g.forEach(A=>{O.push({label:N(A),value:_(A),disabled:typeof A=="object"&&A.disabled||void 0,group:typeof A=="object"&&String(A.group||"").toUpperCase()||void 0})}),O},_=g=>{if(ye(g)){if(r.value&&typeof r.value.value<"u")return g[r.value.value];if(typeof g.id<"u")return String(g.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 g},N=g=>{if(ye(g)){if(r.value&&typeof r.value.name<"u")return g[r.value.name];if(typeof g.name<"u")return String(g.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(g)};return(g,O)=>{const A=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(A,{id:t.unref(c)(e.schema),modelValue:t.unref(h),"onUpdate:modelValue":O[0]||(O[0]=R=>t.isRef(h)?h.value=R:null),class:t.normalizeClass(e.schema.fieldClasses),clearable:!e.schema.required,disabled:e.disabled||void 0,items:u.value,"kpop-attributes":{"data-testid":`${t.unref(c)(e.schema)}-items`},"label-attributes":{info:e.schema.help},name:e.schema.inputName,placeholder:r.value.hideNoneSelectedText?void 0:r.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"])}}}),Jm={class:"field-string-array"},ji=x(t.defineComponent({__name:"FieldStringArray",props:{formOptions:{},model:{},schema:{}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=o,{updateModelValue:i,getFieldID:r,getLabelId:l,clearValidationErrors:d,value:c}=we.useAbstractFields({model:t.toRef(()=>e.model),schema:e.schema,formOptions:e.formOptions,emitModelUpdated:_=>{a("modelUpdated",_.value,_.model)}});n({clearValidationErrors:d});const m=t.ref("");function h(_){return Array.isArray(_)?_.map(N=>String(N).trim()).filter(Boolean).join(", "):""}function u(_){return _?_.trim().split(",").map(N=>N.trim()).filter(Boolean):[]}function p(_){m.value=_;const N=u(_);i(N,c.value)}return t.watch(c,_=>{const N=_?h(_):"";h(u(m.value))!==N&&(m.value=N)},{immediate:!0}),(_,N)=>{const g=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Jm,[t.createVNode(g,t.mergeProps(_.$attrs,{id:t.unref(r)(e.schema),"aria-labelledby":t.unref(l)(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":p}),null,16,["id","aria-labelledby","class","model-value","placeholder"])])}}}),[["__scopeId","data-v-cf2eff67"]]),Qm={name:"FieldArray",components:{FieldArrayItem:Ni,FieldArrayMultiItem:Ai,FieldSelect:$i,FieldMetric:Ui,FieldObject:Pi,FieldObjectAdvanced:vi,FieldAutoSuggest:Ri,FieldAutoSuggestLegacy:Di,FieldRadio:xi,FieldArrayCardContainer:Mi,FieldInput:Li,FieldStringArray:ji,TrashIcon:ue.TrashIcon},mixins:[Ae],inject:{autofillSlot:{from:_e,default:void 0}},props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},emits:["refreshModel"],methods:{generateSchema(e,n,o){var i,r,l;let a;return n&&(a=JSON.parse(JSON.stringify(n)),(l=(r=(i=a.schema)==null?void 0:i.fields)==null?void 0:r.map)==null||l.call(r,d=>(d.id=`${d.id||d.model}-${o}`,d))),{...a,set(d,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,i;let o=e;((i=(a=this.schema)==null?void 0:a.inputAttributes)==null?void 0:i.type)==="number"&&wn(parseFloat(e))&&(o=parseFloat(e)),this.value=this.value.map((r,l)=>l===n?o:r)},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")}}},eu=["id"],tu={key:0,class:"string-array-item"},nu={key:2},ou=["onUpdate:modelValue","aria-labelledby","type"],iu=["onUpdate:modelValue","aria-labelledby"];function au(e,n,o,a,i,r){const l=t.resolveComponent("FieldStringArray"),d=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton"),m=t.resolveComponent("KTextArea"),h=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,(u,p)=>(t.openBlock(),t.createElementBlock("div",{key:p,class:t.normalizeClass(e.schema.fieldItemsClasses)},[r.isStringArrayItems()?(t.openBlock(),t.createElementBlock("div",tu,[t.createVNode(l,{"form-options":e.formOptions,model:e.value,schema:r.generateStringArraySchema(p),onModelUpdated:_=>r.handleStringArrayUpdate(_,p)},null,8,["form-options","model","schema","onModelUpdated"]),t.createVNode(c,{appearance:"tertiary",class:"string-array-remove-btn",icon:"",onClick:_=>r.removeElement(p)},{default:t.withCtx(()=>[t.createVNode(d,{decorative:""})]),_:1},8,["onClick"])])):e.schema.items&&e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:1,index:p,model:u,schema:r.generateSchema(e.value,e.schema.items,p),onRemoveItem:_=>r.removeElement(p)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:u,schema:r.generateSchema(e.value,e.schema.items,p),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["index","model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",nu,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:u,schema:r.generateSchema(e.value,e.schema.items,p),onModelUpdated:r.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-${p}`,model:u,schema:r.generateSchema(e.value,e.schema.items,p),onRemoveItem:_=>r.removeElement(p)},{after:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:_=>e.value[p]=_,value:e.value[p]},null,8,["schema","update","value"]))]),default:t.withCtx(()=>{var _;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[p],"onUpdate:modelValue":N=>e.value[p]=N,"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(h,t.mergeProps({key:1,"aria-labelledby":e.getLabelId(e.schema)},{ref_for:!0},e.schema.inputAttributes,{"model-value":e.value[p],type:e.schema.inputAttributes&&e.schema.inputAttributes.type||"text",onInput:N=>{r.handleInput(N,p)}}),null,16,["aria-labelledby","model-value","type","onInput"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,"onUpdate:modelValue":N=>e.value[p]=N,"aria-labelledby":e.getLabelId(e.schema)},{ref_for:!0},e.schema.inputAttributes,{type:((_=e.schema.inputAttributes)==null?void 0:_.type)||"text"}),null,16,ou)),[[t.vModelDynamic,e.value[p]]])]}),_: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.value[p]=_,"aria-labelledby":e.getLabelId(e.schema),type:"text"}),null,16,iu),[[t.vModelText,e.value[p]]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:_=>e.value[p]=_,value:e.value[p]},null,8,["schema","update","value"]))],64))],2))),128)),t.createVNode(c,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`add-${e.getFieldID(e.schema)}`,type:"button",onClick:r.newElement},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel||o.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,eu)):t.createCommentVNode("",!0)}const ru=x(Qm,[["render",au],["__scopeId","data-v-7633b3a8"]]),lu={class:"form-field-wrapper field-checkbox"},su=x(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,i=o,r=t.toRefs(a),{getFieldID:l,value:d,clearValidationErrors:c}=we.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:m=>{i("modelUpdated",m.value,m.model)}});return n({clearValidationErrors:c}),(m,h)=>{const u=t.resolveComponent("KCheckbox");return t.openBlock(),t.createElementBlock("div",lu,[t.createVNode(u,t.mergeProps(m.$attrs,{id:t.unref(l)(e.schema),modelValue:t.unref(d),"onUpdate:modelValue":h[0]||(h[0]=p=>t.isRef(d)?d.value=p: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-6811d435"]]),du={class:"wrapper"},cu=["disabled"],mu=["id","checked","disabled","onChange","name"],uu=["disabled"],fu={class:"info"},hu={class:"dropList"},pu=["id","checked","disabled","onChange","name"];function gu(e,n,o,a,i,r){const l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",du,[e.schema.listBox?(t.openBlock(),t.createElementBlock("div",{key:0,class:"listbox form-control",disabled:e.disabled||null},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,d=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(d)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(d)||null,disabled:e.disabled||null,onChange:c=>r.onChanged(c,d),name:r.getInputName(d)},null,40,mu),[[l,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(d)),1)])],2))),256))],8,cu)):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:i.comboExpanded}]),onClick:n[0]||(n[0]=(...d)=>r.onExpandCombo&&r.onExpandCombo(...d))},[t.createElementVNode("div",fu,t.toDisplayString(r.selectedCount)+" selected",1),n[1]||(n[1]=t.createElementVNode("div",{class:"arrow"},null,-1))],2),t.createElementVNode("div",hu,[i.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.items,d=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(d)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(d)||null,disabled:e.disabled||null,onChange:c=>r.onChanged(c,d),name:r.getInputName(d)},null,40,pu),[[l,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(d)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,uu))])),[[l,"wrapper"]])}const yu=x({mixins:[Ae],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?ni(this.schema.inputName+"_"+this.getItemValue(e)):ni(this.getItemValue(e))},getItemValue(e){if(ye(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(ye(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((Z(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const o=Ii(this.value);o.push(this.getItemValue(n)),this.value=o}else{const o=Ii(this.value);o.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",gu]]),bu={name:"FieldKeyValuePairs",components:{TrashIcon:ue.TrashIcon},mixins:[Ae],inject:{autofillSlot:{from:_e,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)}}},_u={class:"key-value-pairs-editor"},Eu={class:"pair-item-cell"},Cu=["data-testid","placeholder","value","onInput"],Su={class:"pair-item-cell"},Tu=["data-testid","placeholder","value","onInput"];function wu(e,n,o,a,i,r){const l=t.resolveComponent("TrashIcon"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",_u,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.pairs,(c,m)=>(t.openBlock(),t.createElementBlock("div",{key:m,class:"pair-item"},[t.createElementVNode("div",Eu,[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:h=>{r.onInput(h,m,"key")}},null,40,Cu),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:h=>r.onInput({target:{value:h}},m,"key"),value:c.key},null,8,["schema","update","value"]))]),t.createElementVNode("div",Su,[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:h=>{r.onInput(h,m,"value")}},null,40,Tu),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:h=>r.onInput({target:{value:h}},m,"value"),value:c.value},null,8,["schema","update","value"]))]),t.createVNode(d,{appearance:"tertiary","data-testid":`${e.getFieldID(e.schema)}-remove-pair-${m}`,onClick:()=>{r.removePair(m)}},{default:t.withCtx(()=>[t.createVNode(l)]),_:1},8,["data-testid","onClick"])]))),128)),t.createVNode(d,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`${e.getFieldID(e.schema)}-add-pair`,type:"button",onClick:r.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const ku=x(bu,[["render",wu],["__scopeId","data-v-be99d00c"]]),Mu=x(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:i}=we.useAbstractFields({model:o.model,schema:n.schema,formOptions:n.formOptions});return(r,l)=>{const d=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(d,{id:t.unref(a)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)),1)]),_:1},8,["id"])],2)}}}),[["__scopeId","data-v-e3423a11"]]),Nu=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,i=o,r=t.toRef(a,"model"),{getLabelId:l,getFieldID:d,clearValidationErrors:c,value:m}=we.useAbstractFields({model:r,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:u=>{i("modelUpdated",u.value,u.model)}});n({clearValidationErrors:c});const h=t.computed(()=>{var u,p;return a.schema.values?a.schema.values:(p=(u=a.schema.elements)==null?void 0:u.one_of)!=null&&p.length?a.schema.elements.one_of.map(_=>({label:String(_),value:String(_)})):[]});return(u,p)=>{const _=t.resolveComponent("KMultiselect");return t.openBlock(),t.createBlock(_,{id:t.unref(d)(e.schema),modelValue:t.unref(m),"onUpdate:modelValue":p[0]||(p[0]=N=>t.isRef(m)?m.value=N:null),"aria-labelledby":t.unref(l)(e.schema),class:t.normalizeClass(e.schema.fieldClasses),"data-testid":"field-multiselect",disabled:e.disabled||void 0,items:h.value,"kpop-attributes":{"data-testid":`${t.unref(d)(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"])}}}),Au={class:"selection-group"},Iu={class:"form-group horizontal-radios"},Ou={class:"radio-group"},Vu=["disabled","value"],Bu={class:"control-help"},Fu={key:0,class:"option-field"},Ru={class:"option-field-container"},Du=x(Object.assign({mixins:[Ae],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(i=>this.updateModel("",i.model)),o&&o.forEach(i=>this.updateModel(this.fieldModel[i.model],i.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}=ge.createI18n("en-us",Ee);return(o,a)=>(t.openBlock(),t.createElementBlock("div",Au,[(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",Iu,[t.createElementVNode("div",Ou,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.schema.fields,(i,r)=>(t.openBlock(),t.createElementBlock("div",{key:r,class:t.normalizeClass(["option-group",{"radio-disabled":o.$props.disabled}])},[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${i.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>o.checkedGroup=l),class:"k-input",disabled:o.$props.disabled,type:"radio",value:r},null,8,Vu),[[t.vModelRadio,o.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(i.label)+" ",1),t.createElementVNode("div",Bu,t.toDisplayString(i.description),1)],2)],2))),128))])])]),_:1},8,["text"])),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.schema.fields,(i,r)=>(t.openBlock(),t.createElementBlock("div",{key:r,class:"option-group"},[o.renderedTrack[r]?t.withDirectives((t.openBlock(),t.createElementBlock("div",Fu,[t.createElementVNode("div",Ru,[t.createVNode(H,{model:o.model,options:{helpAsHtml:!0},schema:{fields:i.fields},onModelUpdated:o.updateModel},null,8,["model","schema","onModelUpdated"])])],512)),[[t.vShow,i.fields&&o.checkedGroup===r]]):t.createCommentVNode("",!0)]))),128))]))}}),[["__scopeId","data-v-0b44571b"]]),Lu={class:"form-field-wrapper"},Uu=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,i=o,{t:r}=ge.createI18n("en-us",Ee),l=p=>p!=null&&a.schema.valueOn?p===a.schema.valueOn:p,d=p=>p!=null&&a.schema.valueOn?p?a.schema.valueOn:a.schema.valueOff:p,c=t.toRefs(a),{getFieldID:m,value:h,clearValidationErrors:u}=we.useAbstractFields({model:c.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:l,formatValueToModel:d,emitModelUpdated:p=>{i("modelUpdated",p.value,p.model)}});return n({clearValidationErrors:u}),(p,_)=>{const N=t.resolveComponent("KInputSwitch");return t.openBlock(),t.createElementBlock("div",Lu,[t.createVNode(N,{id:t.unref(m)(e.schema),modelValue:t.unref(h),"onUpdate:modelValue":_[0]||(_[0]=g=>t.isRef(h)?h.value=g:null),autocomplete:e.schema.autocomplete,class:t.normalizeClass(e.schema.fieldClasses),disabled:e.disabled||void 0,label:t.unref(h)?e.schema.textOn||t.unref(r)("vfg.labels.on"):e.schema.textOff||t.unref(r)("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"])])}}}),Pu={class:"field-textarea"},vu={name:"FormGroup",components:Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:Wc,FieldArray:ru,FieldArrayCardContainer:Mi,FieldArrayItem:Ni,FieldArrayMultiItem:Ai,FieldAutoSuggest:Ri,FieldAutoSuggestLegacy:Di,FieldCheckbox:su,FieldChecklist:yu,FieldInput:Li,FieldKeyValuePairs:ku,FieldLabel:Mu,FieldMetric:Ui,FieldMultiselect:Nu,FieldObject:Pi,FieldObjectAdvanced:vi,FieldRadio:xi,FieldSelect:$i,FieldSelectionGroup:Du,FieldStringArray:ji,FieldSwitch:Uu,FieldTextArea:x(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,i=o,r=t.toRefs(a),l=t.inject(_e,void 0),{updateModelValue:d,getFieldID:c,clearValidationErrors:m,value:h}=we.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:p=>{i("modelUpdated",p.value,p.model)}});n({clearValidationErrors:m});const u=p=>{h.value=p,d(p,p)};return(p,_)=>{const N=t.resolveComponent("KTextArea");return t.openBlock(),t.createElementBlock("div",Pu,[t.createVNode(N,t.mergeProps(p.$attrs,{id:t.unref(c)(e.schema),modelValue:t.unref(h),"onUpdate:modelValue":_[0]||(_[0]=g=>t.isRef(h)?h.value=g: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(l)),{schema:e.schema,update:u,value:t.unref(h)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-609c18d6"]])},Symbol.toStringTag,{value:"Module"})),mixins:[oi],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 ns.sanitize(e)},fieldTypeHasLabel(e){if(Z(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 Cn(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 j(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\./,""):""}}},xu=["innerHTML"],$u={class:"icon-wrapper"},ju={key:0,class:"link-wrapper"},Ku={class:"field-wrap"},zu={key:0,class:"buttons"},qu=["type","onClick","textContent"],Hu={key:1,class:"hint"},Gu={key:2,class:"errors help-block"};function Yu(e,n,o,a,i,r){const l=t.resolveComponent("KExternalLink"),d=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-group",e.getFieldRowClasses(o.field)])},[r.fieldTypeHasLabel(o.field)?(t.openBlock(),t.createBlock(d,{key:0,"aria-describedby":o.field.help?r.getTooltipId(o.field):void 0,class:t.normalizeClass([o.field.labelClasses,"form-group-label"]),for:r.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:r.getTooltipId(o.field)}:void 0},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",$u,[t.createElementVNode("span",null,t.toDisplayString(r.formattedLabel(o.field.label)),1)]),o.field.link?(t.openBlock(),t.createElementBlock("div",ju,[t.createVNode(l,{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:r.sanitize(o.field.help)},null,8,xu)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",Ku,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.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"?r.fieldHint(o.field):void 0,model:o.model,schema:r.schema,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.onFieldValidated}),null,16,["disabled","form-options","hint","model","schema","vfg","onModelUpdated","onRefreshModel","onValidated"])),r.buttonVisibility(o.field)?(t.openBlock(),t.createElementBlock("div",zu,[(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:r.getButtonType(c),onClick:h=>r.buttonClickHandler(c,o.field,h),textContent:t.toDisplayString(c.label)},null,10,qu))),128))])):t.createCommentVNode("",!0)]),o.field.hint&&o.field.type!=="input"?(t.openBlock(),t.createElementBlock("div",Hu,t.toDisplayString(r.fieldHint(o.field)),1)):t.createCommentVNode("",!0),r.fieldErrors(o.field).length>0?(t.openBlock(),t.createElementBlock("div",Gu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fieldErrors(o.field),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m},t.toDisplayString(c),1))),128))])):t.createCommentVNode("",!0)],2)}const Ki=x(vu,[["render",Yu],["__scopeId","data-v-87df5b50"]]);var Nt=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(Nt||{});const Wu=e=>{var n,o;return e.type===Nt.REDIS_CE?"Host/Port":(n=e.config.sentinel_nodes)!=null&&n.length?"Sentinel":(o=e.config.cluster_nodes)!=null&&o.length?"Cluster":"Host/Port"},Zu={[Nt.REDIS_CE]:"open source",[Nt.REDIS_EE]:"enterprise"},zi=e=>Zu[e]??"",ht={KONNECT_MANAGED:"konnect-managed",SELF_MANAGED:"self-managed"},Xu="managed_cache.v0";function Ju(e){const o=(Array.isArray(e.tags)?e.tags:[]).filter(a=>typeof a=="string").map(a=>a.toLowerCase());return o.includes(ht.KONNECT_MANAGED)||o.includes(Xu)?ht.KONNECT_MANAGED:ht.SELF_MANAGED}const Qu={class:"partial-config-card"},ef={class:"config-card-row-label"},tf={class:"label-text"},nf=["data-testid"],of=["data-testid"],af={key:1},rf=["data-testid"],lf=["data-testid"],sf=x(t.defineComponent({__name:"RedisConfigCard",props:{configFields:{type:Object,required:!0},pluginRedisFields:{type:Array,required:!0}},setup(e){const{t:n,formatUnixTimeStamp:o}=ge.createI18n("en-us",Ee),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}},i=e,r=u=>u!=null,l=(u,p)=>r(p)&&["password","sentinel_password"].includes(u)?"password":"text",{convertKeyToTitle:d}=nt.useStringHelpers(),c=t.computed(()=>Object.entries(i.configFields).map(([u,p])=>{var _,N,g,O;return{key:u,label:((_=a[u])==null?void 0:_.label)??d(u),value:(N=a[u])!=null&&N.formatter?a[u].formatter(p):p,type:((g=a[u])==null?void 0:g.type)??l(u,p),order:((O=a[u])==null?void 0:O.order)??100}}).sort((u,p)=>u.order-p.order).filter(u=>u.type!=="hidden")),m=we.useRedisNonStandardFields(i.configFields,i.pluginRedisFields),h=t.computed(()=>c.value.concat(m));return(u,p)=>{const _=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",Qu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,({key:N,label:g,value:O,type:A})=>(t.openBlock(),t.createElementBlock("div",{key:N,class:"partial-config-card-row"},[t.createElementVNode("div",ef,[t.createElementVNode("div",tf,t.toDisplayString(g),1)]),t.createElementVNode("div",{class:"config-card-row-value","data-testid":`${N}-property-value`},[r(O)?(t.openBlock(),t.createElementBlock("div",af,[A==="password"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${N}-copy-password`},[t.createVNode(_,{format:"redacted",text:String(O)},null,8,["text"])],8,rf)):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`${N}-plain-text`},t.toDisplayString(O),9,lf))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${N}-no-value`}," – ",8,of))],8,nf)]))),128))])}}}),[["__scopeId","data-v-57f78095"]]),df={class:"redis-config-select","data-testid":"redis-config-select"},cf={class:"selected-redis-config"},mf=["data-testid"],uf={class:"select-item-name","data-testid":"selected-redis-config"},ff={class:"empty-redis-config","data-testid":"empty-redis-config"},hf={key:1,class:"redis-shared-config-error-message","data-testid":"redis-config-fetch-error"},pf="1000",qi=x(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},isKonnectManagedRedisEnabled:{type:Boolean,default:!1}},emits:["showNewPartialModal"],setup(e){const{t:n}=ge.createI18n("en-us",Ee),o=t.inject(uo),a={konnect:{getOne:"/v2/control-planes/{controlPlaneId}/core-entities/{workspace}/partials/{id}",getAll:"/v2/control-planes/{controlPlaneId}/core-entities/{workspace}/partials"},kongManager:{getOne:"/{workspace}/partials/{id}",getAll:"/{workspace}/partials"}},i=e,r=t.ref(null),{getMessageFromError:l}=nt.useErrors(),d=t.inject(vt),{debouncedQueryChange:c,loading:m,error:h,loadItems:u,results:p}=nt.useDebouncedFilter(d,a[d.app].getAll,pf,{fetchedItemsKey:"data",searchKeys:["id","name"]}),_=t.computed(()=>h.value?l(h.value):""),N=t.computed(()=>i.isCustomPlugin?n("redis.custom_plugin.tooltip"):n("redis.shared_configuration.tooltip",{type:zi(i.redisType)})),g=t.computed(()=>i.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.title"):n("redis.shared_configuration.title")),O=t.computed(()=>i.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.selector.placeholder"):n("redis.shared_configuration.selector.placeholder")),A=t.computed(()=>i.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.create_new_configuration"):n("redis.shared_configuration.create_new_configuration",{type:zi(i.redisType)})),R=t.computed(()=>_.value||n("redis.shared_configuration.error")),B=w=>{let V=`${d.apiBaseUrl}${a[d.app].getOne}`;return d.app==="konnect"&&(V=V.replace(/{controlPlaneId}/gi,(d==null?void 0:d.controlPlaneId)||"")),V=V.replace(/\/{workspace}/gi,d!=null&&d.workspace?`/${d.workspace}`:"").replace(/{id}/gi,String(w)),V},M=t.computed(()=>{const w=(p.value||[]).map(V=>{const f=V,y=i.isKonnectManagedRedisEnabled?Ju(f):void 0,S=y===ht.KONNECT_MANAGED;return{...i.isKonnectManagedRedisEnabled&&y?{source:y}:{},label:V.id,name:V.name,value:V.id,type:V.type,tag:i.isKonnectManagedRedisEnabled&&S?void 0:Wu(f)}}).filter(V=>V.type==="redis-ce"||V.type==="redis-ee");return i.redisType!=="all"?w.filter(V=>V.type===i.redisType):w}),T=t.computed(()=>{const w=M.value;if(!i.isKonnectManagedRedisEnabled)return w;const V=w.filter(S=>S.source===ht.KONNECT_MANAGED),f=w.filter(S=>S.source===ht.SELF_MANAGED),y=[];return V.length>0&&y.push({label:n("redis.managed_ui.groups.konnect_managed"),items:V}),f.length>0&&y.push({label:n("redis.managed_ui.groups.self_managed"),items:f}),y}),{axiosInstance:C}=nt.useAxios(d==null?void 0:d.axiosRequestConfig),E=async w=>{if(w){i.updateRedisModel(w);try{const V=await C.get(B(w));if(V.data.config){const f=Object.assign(V.data,V.data.config);delete f.config,r.value=f}}catch(V){console.error(V)}}};return t.watch(()=>o==null?void 0:o.value,async w=>{w&&await u()}),t.onBeforeMount(()=>{u(),i.defaultRedisConfigItem&&E(i.defaultRedisConfigItem)}),(w,V)=>{const f=t.resolveComponent("KLabel"),y=t.resolveComponent("KBadge"),S=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",df,[t.createVNode(f,{info:N.value,"tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.value),1)]),_:1},8,["info"]),V[2]||(V[2]=t.createElementVNode("div",{class:"shared-redis-config-title"},null,-1)),t.createVNode(S,{class:"redis-config-select-trigger","data-testid":"redis-config-select-trigger","enable-filtering":"","filter-function":()=>!0,items:T.value,loading:t.unref(m),"model-value":e.defaultRedisConfigItem,placeholder:O.value,onChange:V[1]||(V[1]=k=>E(k==null?void 0:k.value)),onQueryChange:t.unref(c)},{"selected-item-template":t.withCtx(({item:k})=>[t.createElementVNode("div",cf,t.toDisplayString(k.name),1)]),"item-template":t.withCtx(({item:k})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${k.name}`},[t.createElementVNode("span",uf,t.toDisplayString(k.name),1),k.tag?(t.openBlock(),t.createBlock(y,{key:0,appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,mf)]),empty:t.withCtx(()=>[t.createElementVNode("div",ff,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:V[0]||(V[0]=k=>w.$emit("showNewPartialModal"))},[t.createVNode(t.unref(ue.AddIcon),{size:t.unref(Oi)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(A.value),1)])]),_:1},8,["items","loading","model-value","placeholder","onQueryChange"])]),r.value?(t.openBlock(),t.createBlock(sf,{key:0,"config-fields":r.value,"plugin-redis-fields":e.pluginRedisFields},null,8,["config-fields","plugin-redis-fields"])):t.createCommentVNode("",!0),_.value?(t.openBlock(),t.createElementBlock("p",hf,t.toDisplayString(R.value),1)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-3b12e969"]]),gf={key:0},yf={class:"redis-config-radio-group","data-testid":"redis-config-radio-group"},bf={key:0,class:"shared-redis-config"},_f={key:1,class:"dedicated-redis-config"},Ef={class:"dedicated-redis-config-title"},Cf={name:"VueFormGenerator",components:{formGroup:Ki,formRedis:x(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},isKonnectManagedRedisEnabled:{type:Boolean,default:!1}},emits:["modelUpdated","partialToggled","showNewPartialModal","refreshModel","validated"],setup(e,{emit:n}){const o=e,a=n,{t:i}=ge.createI18n("en-us",Ee),r=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.title"):i("redis.title")),l=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.shared_configuration.description"):i("redis.shared_configuration.description")),d=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.shared_configuration.label"):i("redis.shared_configuration.label")),c=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.dedicated_configuration.description"):i("redis.dedicated_configuration.description")),m=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.dedicated_configuration.label"):i("redis.dedicated_configuration.label")),h=t.computed(()=>o.field.pluginType==="custom"),u=t.ref(!o.isEditing),p=t.ref(),_=t.ref({}),N=t.ref(),g=M=>j(M.visible)?M.visible.call(this,o.model,M,this):Z(M.visible)?!0:M.visible,O=async M=>{a("modelUpdated",[{id:M,path:o.redisPath}],"partials"),N.value=[{id:M,path:o.redisPath}],p.value=M},A=(M,T)=>{_.value={..._.value,[T]:M},a("modelUpdated",M,T)},R=()=>{a("refreshModel")},B=(M,T,C)=>{a("validated",M,T,C)};return t.watch(()=>u.value,M=>{M?N.value&&a("partialToggled","redis",{partials:N.value}):a("partialToggled","partials",_.value)}),t.onBeforeMount(()=>{var M,T,C;if(o.model&&(_.value=o.field.fields.reduce((E,w)=>(Object.keys(o.model).includes(w.model)&&(E[w.model]=o.model[w.model]),E),{})),(C=(T=(M=o==null?void 0:o.model)==null?void 0:M.partials)==null?void 0:T[0])!=null&&C.id){const E=o.model.partials[0].id;u.value=!0,p.value=E}}),(M,T)=>{const C=t.resolveComponent("KAlert"),E=t.resolveComponent("KBadge"),w=t.resolveComponent("KRadio"),V=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",null,[h.value?(t.openBlock(),t.createElementBlock("div",gf,[t.createVNode(C,{"data-testid":"custom-plugin-redis-config-note",message:t.unref(i)("redis.custom_plugin.alert")},null,8,["message"]),t.createVNode(qi,{"default-redis-config-item":p.value,"is-custom-plugin":"","is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,"plugin-redis-fields":e.field.fields,"update-redis-model":O,onShowNewPartialModal:T[0]||(T[0]=f=>M.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","is-konnect-managed-redis-enabled","plugin-redis-fields"])])):(t.openBlock(),t.createBlock(V,{key:1,class:"redis-config-card","data-testid":"redis-config-card",title:r.value},{default:t.withCtx(()=>[t.createElementVNode("div",yf,[t.createVNode(w,{modelValue:u.value,"onUpdate:modelValue":T[1]||(T[1]=f=>u.value=f),card:"","card-orientation":"horizontal","data-testid":"shared-redis-config-radio",description:l.value,label:d.value,"selected-value":!0},{default:t.withCtx(()=>[e.isKonnectManagedRedisEnabled?(t.openBlock(),t.createBlock(E,{key:0,appearance:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("redis.managed_ui.shared_configuration.badge")),1)]),_:1})):t.createCommentVNode("",!0)]),_:1},8,["modelValue","description","label"]),t.createVNode(w,{modelValue:u.value,"onUpdate:modelValue":T[2]||(T[2]=f=>u.value=f),card:"","card-orientation":"horizontal","data-testid":"dedicated-redis-config-radio",description:c.value,label:m.value,"selected-value":!1},null,8,["modelValue","description","label"])]),u.value?(t.openBlock(),t.createElementBlock("div",bf,[t.createVNode(qi,{"default-redis-config-item":p.value,"is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,"plugin-redis-fields":e.field.fields,"redis-type":e.field.redisType,"update-redis-model":O,onShowNewPartialModal:T[3]||(T[3]=f=>M.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","is-konnect-managed-redis-enabled","plugin-redis-fields","redis-type"])])):(t.openBlock(),t.createElementBlock("div",_f,[t.createElementVNode("div",Ef,t.toDisplayString(t.unref(i)("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,f=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:f.model},[g(f)?(t.openBlock(),t.createBlock(Ki,{key:0,ref_for:!0,ref:"children",errors:e.errors,field:f,model:e.model,options:e.options,vfg:e.vfg,onModelUpdated:A,onRefreshModel:R,onValidated:B},null,8,["errors","field","model","options","vfg"])):t.createCommentVNode("",!0)],64))),128))]),_:1}))]))]),_:1},8,["title"]))])}}}),[["__scopeId","data-v-58023d89"]])},mixins:[oi],inject:{autofillSlot:{from:_e,default:void 0}},provide(){var e;return{...!this.autofillSlot&&{[_e]:(e=this.$slots)==null?void 0:e[We]}}},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},isKonnectManagedRedisEnabled:{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&&de(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&de(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 j(e.visible)?e.visible.call(this,this.model,e,this):Z(e.visible)?!0:e.visible},onFieldValidated(e,n,o){this.errors=this.errors.filter(i=>i.field.fieldName!==o.schema.fieldName),!e&&n&&n.length>0&&de(n,i=>{this.errors.push({field:o.schema,error:i})});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=[];de(this.$refs.children,i=>{j(i.validate)&&(n.push(i.$refs.child),o.push(i.$refs.child.validate(!0)))});const a=i=>{const r=[];de(i,(d,c)=>{Array.isArray(d)&&d.length>0&&de(d,m=>{r.push({field:n[c].schema,error:m})})}),this.errors=r;const l=r.length===0;return this.$emit("validated",l,r,this),e?r:l};return e?Promise.all(o).then(a):a(o)},clearValidationErrors(){this.errors.splice(0),de(this.$refs.children,e=>{e.clearValidationErrors()})}}},Sf={key:0,class:"vue-form-generator"},Tf={key:0};function wf(e,n,o,a,i,r){const l=t.resolveComponent("form-redis"),d=t.resolveComponent("form-group"),c=t.resolveComponent("KCollapse");return o.schema!=null?(t.openBlock(),t.createElementBlock("div",Sf,[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(r.fields,m=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m.model},[m.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(l,{key:0,errors:i.errors,field:m,"is-editing":o.isEditing,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,model:o.model,options:o.options,tag:o.tag,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onPartialToggled:r.onPartialToggled,onShowNewPartialModal:h=>e.$emit("showNewPartialModal",m.redisType),onValidated:r.onFieldValidated},null,8,["errors","field","is-editing","is-konnect-managed-redis-enabled","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):r.fieldVisible(m)?(t.openBlock(),t.createBlock(d,{key:1,ref_for:!0,ref:"children",errors:i.errors,field:m,model:o.model,options:o.options,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.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(r.groups,(m,h)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${h}`},[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 u,p,_,N;return[(u=m.slots)!=null&&u.beforeContent?t.renderSlot(e.$slots,(p=m.slots)==null?void 0:p.beforeContent,{key:0}):t.createCommentVNode("",!0),m.fields.length===0&&((_=m.slots)!=null&&_.emptyState)?t.renderSlot(e.$slots,(N=m.slots)==null?void 0:N.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,g=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:g.model},[r.fieldVisible(g)?(t.openBlock(),t.createBlock(d,{key:0,ref_for:!0,ref:"children",errors:i.errors,field:g,model:o.model,options:o.options,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.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":i.collapseStates[`group-${h}-nested`]??!0,"trigger-alignment":"leading","trigger-label":i.collapseStates[`group-${h}-nested`]??!0?m.collapsible.nestedCollapsible.triggerLabel.expand:m.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":g=>i.collapseStates[`group-${h}-nested`]=g},{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,g=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:g.model},[g.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(l,{key:0,errors:i.errors,field:g,"is-editing":o.isEditing,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,model:o.model,options:o.options,tag:o.tag,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onPartialToggled:r.onPartialToggled,onShowNewPartialModal:O=>e.$emit("showNewPartialModal",g.redisType),onValidated:r.onFieldValidated},null,8,["errors","field","is-editing","is-konnect-managed-redis-enabled","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):r.fieldVisible(g)?(t.openBlock(),t.createBlock(d,{key:1,ref_for:!0,ref:"children",errors:i.errors,field:g,model:o.model,options:o.options,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.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",Tf,t.toDisplayString(m.legend),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.fields,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.model},[r.fieldVisible(u)?(t.openBlock(),t.createBlock(d,{key:0,ref_for:!0,ref:"children",errors:i.errors,field:u,model:o.model,options:o.options,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.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 H=x(Cf,[["render",wf]]),Yt="kong-identity",Hi="external",kf="/v1/auth-servers/_computed",Mf=new Set(["config-client_id","config-client_secret","config-issuer"]),Nf=e=>{if(e["config-principals-enabled"]===!0)return Yt;for(const n of Mf){const o=e[n];if(o!=null&&o!=="")return Hi}return Yt},Af={name:"OIDCPrincipals",components:{VueFormGenerator:H,AddIcon:ue.AddIcon,KeyIcon:ue.KeyIcon,WorldIcon:ue.WorldIcon},inject:{formsConfig:{from:vt,default:()=>({})}},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>({})},commonFieldsSchema:{type:Object,required:!0},onModelUpdated:{type:Function,required:!0}},data(){return{MODE_KONG_IDENTITY:Yt,MODE_EXTERNAL:Hi,KUI_ICON_SIZE_20:Oi,KUI_ICON_SIZE_40:Vi,selectedMode:Nf(this.formModel),kongIdentityServers:[],kongIdentityServersLoading:!1,clients:[],clientsLoading:!1,selectedClientId:null,selectedServer:null,leavePromptType:null}},computed:{kongIdentityServerItems(){return this.kongIdentityServers.map(e=>({label:e.name,value:e.id}))},clientItems(){return this.clients.map(e=>({label:e.name,value:e.client_id||e.id}))}},mounted(){this.fetchKongIdentityServers();const e=this.formModel["config-client_id"];Array.isArray(e)&&e.length>0&&(this.selectedClientId=e[0])},methods:{async fetchKongIdentityServers(){var e,n;try{this.kongIdentityServersLoading=!0;const{axiosInstance:o}=nt.useAxios((e=this.formsConfig)==null?void 0:e.axiosRequestConfig),a=`${this.formsConfig.apiBaseUrl}${kf}`,i=await o.get(a,{});this.kongIdentityServers=((n=i.data)==null?void 0:n.data)??[];const r=this.formModel["config-issuer"];r&&!this.selectedServer&&(this.selectedServer=this.kongIdentityServers.find(l=>l.issuer===r)||null,this.selectedServer&&this.fetchClients(this.selectedServer.id))}catch{this.kongIdentityServers=[]}finally{this.kongIdentityServersLoading=!1}},async fetchClients(e){var n,o;try{this.clientsLoading=!0;const{axiosInstance:a}=nt.useAxios((n=this.formsConfig)==null?void 0:n.axiosRequestConfig),i=`${this.formsConfig.apiBaseUrl}/v1/auth-servers/${e}/clients`,r=await a.get(i,{params:{"page[size]":30,"page[number]":1}});this.clients=((o=r.data)==null?void 0:o.data)??[]}catch{this.clients=[]}finally{this.clientsLoading=!1}},handleServerChange(e){var n;this.selectedServer=this.kongIdentityServers.find(o=>o.id===e)||null,(n=this.selectedServer)!=null&&n.issuer&&this.updateField("config-issuer",this.selectedServer.issuer),this.selectedClientId=null,this.clients=[],this.clientsLoading=!!e,e&&this.fetchClients(e)},handleClientChange(e){this.selectedClientId=e,this.updateField("config-client_id",[e])},handleMatchConsumerChange(e){this.updateField("config-principals-match_consumer",e),e||this.updateField("config-principals-match_consumer_groups",!1)},updateField(e,n){this.formModel[e]=n,this.onModelUpdated()},handleLeaveConfirmed(){var a,i,r,l,d,c,m;const e=this.leavePromptType;this.leavePromptType=null;const n=(a=this.formsConfig)==null?void 0:a.geoApiServerUrl,o=n?new URL(n).hostname.split(".")[0]:((l=(r=(i=this.formsConfig)==null?void 0:i.apiBaseUrl)==null?void 0:r.match(/^\/([^/]+)/))==null?void 0:l[1])||"us";if(e==="authServer"){const h=((d=this.formsConfig)==null?void 0:d.createAuthServerUrl)||`${window.location.origin}/${o}/identity/create-auth-server`;document.location.href=h}else if(e==="client"){const h=((c=this.formsConfig)==null?void 0:c.createClientUrl)||`${window.location.origin}/${o}/kong-identity/auth-servers/${(m=this.selectedServer)==null?void 0:m.id}/create-auth-server-client`;document.location.href=h}},handleModeChange(e){e===Yt?(this.formModel["config-client_id"]=null,this.formModel["config-client_secret"]=null,this.formModel["config-issuer"]=null,this.formModel["config-principals-enabled"]=!0,this.formModel["config-principals-directory"]="default",this.formModel["config-principals-error_on_miss"]=!0,this.formModel["config-principals-match_consumer"]=!0,this.formModel["config-principals-match_consumer_groups"]=!0):(this.formModel["config-principals-enabled"]=!1,this.formModel["config-principals-directory"]="default",this.formModel["config-principals-error_on_miss"]=!0,this.formModel["config-principals-match_consumer"]=!0,this.formModel["config-principals-match_consumer_groups"]=!0,this.selectedServer=null,this.selectedClientId=null,this.clients=[]),this.onModelUpdated()}}},If={class:"oidc-principals-section","data-testid":"oidc-principals-section"},Of={class:"oidc-auth-mode-radio-group","data-testid":"oidc-auth-mode-radio-group"},Vf={class:"auth-mode-card-content"},Bf={class:"auth-mode-card-content"},Ff={class:"principals-field-group"},Rf={class:"principals-field-group"},Df={class:"principals-field-group"};function Lf(e,n,o,a,i,r){var A;const l=t.resolveComponent("KeyIcon"),d=t.resolveComponent("KRadio"),c=t.resolveComponent("WorldIcon"),m=t.resolveComponent("AddIcon"),h=t.resolveComponent("KSelect"),u=t.resolveComponent("KInput"),p=t.resolveComponent("KLabel"),_=t.resolveComponent("KCheckbox"),N=t.resolveComponent("KCollapse"),g=t.resolveComponent("VueFormGenerator"),O=t.resolveComponent("KPrompt");return t.openBlock(),t.createElementBlock("div",If,[n[21]||(n[21]=t.createElementVNode("div",{class:"principals-header"}," Who should manage authentication and credentials? ",-1)),n[22]||(n[22]=t.createElementVNode("div",{class:"principals-description"},[t.createTextVNode(" Use Consumers for Consumer-based authentication. Use Kong Identity for principal-based authentication and advanced integrations. "),t.createElementVNode("a",{href:"https://developer.konghq.com/plugins/openid-connect/",rel:"noopener noreferrer",target:"_blank"},"Learn more.")],-1)),t.createElementVNode("div",Of,[t.createVNode(d,{modelValue:i.selectedMode,"onUpdate:modelValue":n[0]||(n[0]=R=>i.selectedMode=R),card:"","card-orientation":"horizontal","data-testid":"oidc-auth-mode-kong-identity","selected-value":i.MODE_KONG_IDENTITY,onChange:r.handleModeChange},{default:t.withCtx(()=>[t.createElementVNode("div",Vf,[t.createVNode(l,{size:i.KUI_ICON_SIZE_40},null,8,["size"]),n[10]||(n[10]=t.createElementVNode("div",{class:"auth-mode-card-label"}," Kong Identity ",-1)),n[11]||(n[11]=t.createElementVNode("div",{class:"auth-mode-card-description"}," Use Kong Identity for principal-based authentication and advanced integrations. ",-1))])]),_:1},8,["modelValue","selected-value","onChange"]),t.createVNode(d,{modelValue:i.selectedMode,"onUpdate:modelValue":n[1]||(n[1]=R=>i.selectedMode=R),card:"","card-orientation":"horizontal","data-testid":"oidc-auth-mode-external","selected-value":i.MODE_EXTERNAL,onChange:r.handleModeChange},{default:t.withCtx(()=>[t.createElementVNode("div",Bf,[t.createVNode(c,{size:i.KUI_ICON_SIZE_40},null,8,["size"]),n[12]||(n[12]=t.createElementVNode("div",{class:"auth-mode-card-label"}," External auth server ",-1)),n[13]||(n[13]=t.createElementVNode("div",{class:"auth-mode-card-description"}," Authenticate against an external OpenID Connect issuer. ",-1))])]),_:1},8,["modelValue","selected-value","onChange"])]),i.selectedMode===i.MODE_KONG_IDENTITY?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(h,{class:"principals-directory-select","data-testid":"principals-directory-select",items:r.kongIdentityServerItems,label:"Authorization Server",loading:i.kongIdentityServersLoading,"model-value":(A=i.selectedServer)==null?void 0:A.id,placeholder:"Select an Authorization Server",required:"","onUpdate:modelValue":r.handleServerChange},{"dropdown-footer-text":t.withCtx(()=>[t.createElementVNode("div",{class:"create-action","data-testid":"create-auth-server-action",onClick:n[2]||(n[2]=t.withModifiers(R=>i.leavePromptType="authServer",["stop"]))},[t.createVNode(m,{size:i.KUI_ICON_SIZE_20},null,8,["size"]),n[14]||(n[14]=t.createElementVNode("div",{class:"create-action-content"},[t.createElementVNode("span",null,"Create authorization server"),t.createElementVNode("div",{class:"create-action-hint"}," You’ll need to return here after creating a auth server. Your progress won’t be saved. ")],-1))])]),_:1},8,["items","loading","model-value","onUpdate:modelValue"]),t.createVNode(h,{class:"principals-client-select","data-testid":"principals-client-select",disabled:!i.selectedServer,items:r.clientItems,label:"Client",loading:i.clientsLoading,"model-value":i.selectedClientId,placeholder:"Select a client","onUpdate:modelValue":r.handleClientChange},{"dropdown-footer-text":t.withCtx(()=>[t.createElementVNode("div",{class:"create-action","data-testid":"create-client-action",onClick:n[3]||(n[3]=t.withModifiers(R=>i.leavePromptType="client",["stop"]))},[t.createVNode(m,{size:i.KUI_ICON_SIZE_20},null,8,["size"]),n[15]||(n[15]=t.createElementVNode("div",{class:"create-action-content"},[t.createElementVNode("span",null,"Create client"),t.createElementVNode("div",{class:"create-action-hint"}," You'll need to return here after creating a client. Your progress won't be saved. ")],-1))])]),_:1},8,["disabled","items","loading","model-value","onUpdate:modelValue"]),t.createVNode(u,{"data-testid":"principals-client-secret",disabled:!i.selectedServer,label:"Client secret","model-value":o.formModel["config-client_secret"],placeholder:"e.g., your-client-secret",type:"password","onUpdate:modelValue":n[4]||(n[4]=R=>r.updateField("config-client_secret",R))},null,8,["disabled","model-value"]),t.createVNode(u,{"data-testid":"principals-issuer",disabled:"",label:"Issuer","model-value":o.formModel["config-issuer"],placeholder:"Automatically deciphered based on the selected auth server"},null,8,["model-value"]),t.createVNode(N,{class:"principals-advanced-settings","data-testid":"principals-advanced-settings","trigger-label":"Show additional settings"},{default:t.withCtx(()=>[t.createElementVNode("div",Ff,[t.createVNode(p,null,{default:t.withCtx(()=>[...n[16]||(n[16]=[t.createTextVNode("If principal lookup fails",-1)])]),_:1}),t.createVNode(d,{"data-testid":"principals-error-on-miss-true",description:"Treat the request as unauthenticated if Kong Identity cannot resolve the principal.",label:"Reject the request","model-value":o.formModel["config-principals-error_on_miss"],"selected-value":!0,onChange:n[5]||(n[5]=R=>r.updateField("config-principals-error_on_miss",!0))},null,8,["model-value"]),t.createVNode(d,{"data-testid":"principals-error-on-miss-false",description:"Allow the request to continue without resolving a principal.",label:"Continue without a principal","model-value":o.formModel["config-principals-error_on_miss"],"selected-value":!1,onChange:n[6]||(n[6]=R=>r.updateField("config-principals-error_on_miss",!1))},null,8,["model-value"])]),t.createElementVNode("div",Rf,[t.createVNode(_,{"data-testid":"principals-match-consumer","model-value":o.formModel["config-principals-match_consumer"],"onUpdate:modelValue":n[7]||(n[7]=R=>r.handleMatchConsumerChange(R))},{description:t.withCtx(()=>[...n[17]||(n[17]=[t.createTextVNode(" Use the consumer linked to the authenticated principal so existing consumer-based plugins and policies continue to work. ",-1),t.createElementVNode("a",{href:"https://developer.konghq.com/how-to/create-centrally-managed-consumer/",rel:"noopener noreferrer",target:"_blank"},"Learn how to link a consumer.",-1)])]),default:t.withCtx(()=>[n[18]||(n[18]=t.createTextVNode(" Use linked consumers ",-1))]),_:1},8,["model-value"])]),t.createElementVNode("div",Df,[t.createVNode(_,{"data-testid":"principals-match-consumer-groups",disabled:!o.formModel["config-principals-match_consumer"],"model-value":o.formModel["config-principals-match_consumer_groups"],"onUpdate:modelValue":n[8]||(n[8]=R=>r.updateField("config-principals-match_consumer_groups",R))},{description:t.withCtx(()=>[...n[19]||(n[19]=[t.createTextVNode(" Use consumer groups associated with the linked consumer so existing consumer group policies and plugins continue to work. This setting applies only when ",-1),t.createElementVNode("b",null,"Use linked consumer",-1),t.createTextVNode(" is enabled. ",-1)])]),default:t.withCtx(()=>[n[20]||(n[20]=t.createTextVNode(" Use linked consumer groups ",-1))]),_:1},8,["disabled","model-value"])])]),_:1})],64)):(t.openBlock(),t.createBlock(g,{key:1,model:o.formModel,options:o.formOptions,schema:o.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])),t.createVNode(O,{"action-button-text":"Leave page",message:"Your unsaved changes will be lost if you continue.",title:"Leave this page?",visible:!!i.leavePromptType,onCancel:n[9]||(n[9]=R=>i.leavePromptType=null),onProceed:r.handleLeaveConfirmed},null,8,["visible","onProceed"])])}const Uf=x(Af,[["render",Lf],["__scopeId","data-v-37b6b43c"]]),At={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"},Gi=new Set(["config-client_id","config-client_secret","config-issuer"]),Yi=new Set(["config-principals-enabled","config-principals-directory","config-principals-principal_by","config-principals-principal_claim","config-principals-match_consumer","config-principals-match_consumer_groups","config-principals-error_on_miss"]),Wi=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"]),Pf={name:"OIDCForm",components:{VueFormGenerator:H,OIDCPrincipals:Uf},provide(){var e;return{[_e]:(e=this.$slots)==null?void 0:e[We]}},inject:{formsConfig:{from:vt,default:()=>({})}},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},isKonnectManagedRedisEnabled:{type:Boolean,default:!1},showNewPartialModal:{type:Function,default:()=>{}}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,openIdConnectLink:At.openIdConnectDocs,openIdConnectJWKLink:At.openIdConnectJWKDocs,openIdConnectClusterNodesLink:At.openIdConnectClusterNodesDocs,openIdConfigurationDocs:At.openIdConfigurationDocs,openIdAuthorizationDocs:At.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},hasPrincipalsFields(){var e;return(e=this.formSchema.fields)==null?void 0:e.some(n=>Yi.has(n.model))},isKonnect(){var e;return((e=this.formsConfig)==null?void 0:e.app)==="konnect"}},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,l)=>(r[l.model]=l,r),{});this.commonFieldsSchema={fields:Array.from(Gi).reduce((r,l)=>(n[l]&&r.push(n[l]),r),[])},this.authFieldsSchema={fields:Array.from(Wi).reduce((r,l)=>(n[l]&&r.push(n[l]),r),[])};const{redis:o,redisModels:a}=we.useRedisPartial(this.formSchema);this.advancedFieldsSchema={fields:this.formSchema.fields.filter(r=>r.model.startsWith("config")&&r.model!=="config-auth_methods"&&!Gi.has(r.model)&&!Wi.has(r.model)&&!Yi.has(r.model)&&(!this.enableRedisPartial||!a.includes(r.model))||r.model==="tags").reduce((r,l)=>{var d,c,m,h;switch(l.model){case"config-client_jwk":{if(Array.isArray((c=(d=l.items)==null?void 0:d.schema)==null?void 0:c.fields))for(const u of l.items.schema.fields)u.label=u.model;r.push({...l,link:this.openIdConnectJWKLink,newElementButtonLabel:"+ Add Client JWK",...Array.isArray((h=(m=l.items)==null?void 0:m.schema)==null?void 0:h.fields)&&l.items.schema.fields.map(u=>({...u,label:u.model}))});break}case"config-session_redis_cluster_nodes":{r.push({...l,link:this.openIdConnectClusterNodesLink,newElementButtonLabel:"+ Add Cluster Node"});break}default:r.push(l)}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 l of r.fields){const d=(e=n[l.model])==null?void 0:e.help;l.help===void 0&&typeof d=="string"&&(l.help=d)}const i=this.formModel["config-consumer_claim"];if(i!=null&&i!==""&&(!this.formModel["config-consumer_claims"]||this.formModel["config-consumer_claims"].length===0)){const r=Array.isArray(i)?i:[i];this.formModel["config-consumer_claims"]=[r],this.onModelUpdated()}}},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()}}},vf={class:"general-settings"},xf={class:"link-wrapper"},$f={class:"auth-method-container"},jf={class:"general-settings"},Kf={class:"link-wrapper"},zf={class:"general-settings"},qf={class:"link-wrapper"};function Hf(e,n,o,a,i,r){const l=t.resolveComponent("VueFormGenerator"),d=t.resolveComponent("KExternalLink"),c=t.resolveComponent("OIDCPrincipals"),m=t.resolveComponent("KLabel"),h=t.resolveComponent("KCheckbox"),u=t.resolveComponent("KInputSwitch"),p=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[o.formModel.id&&o.isEditing||!o.isEditing?(t.openBlock(),t.createBlock(l,{key:0,class:"global-fields",model:o.formModel,options:o.formOptions,schema:i.globalFields,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(p,{tabs:i.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",vf,[t.createElementVNode("div",xf,[t.createVNode(d,{href:i.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)),r.isKonnect&&r.hasPrincipalsFields?(t.openBlock(),t.createBlock(c,{key:0,"common-fields-schema":i.commonFieldsSchema,"form-model":o.formModel,"form-options":o.formOptions,"form-schema":o.formSchema,"on-model-updated":o.onModelUpdated},null,8,["common-fields-schema","form-model","form-options","form-schema","on-model-updated"])):r.displayForm?(t.openBlock(),t.createBlock(l,{key:1,model:o.formModel,options:o.formOptions,schema:i.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(m,null,{default:t.withCtx(()=>[...n[3]||(n[3]=[t.createTextVNode("Auth methods",-1)])]),_:1}),t.createElementVNode("div",$f,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.authMethods,_=>(t.openBlock(),t.createElementBlock("div",{key:_.value,class:"auth-method"},[t.createVNode(h,{modelValue:_.prop,"onUpdate:modelValue":N=>_.prop=N,onChange:N=>r.handleUpdate(N,_.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(_.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(u,{modelValue:i.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=_=>i.sessionManagement=_),label:"Enable Session Management",onChange:r.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",jf,[t.createElementVNode("div",Kf,[t.createVNode(d,{href:i.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)),r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:o.formModel,options:o.formOptions,schema:i.authFieldsSchema,onModelUpdated:o.onModelUpdated},{"autofill-provider":t.withCtx(_=>[t.renderSlot(e.$slots,"autofill-provider",t.normalizeProps(t.guardReactiveProps(_)),void 0,!0)]),_:3},8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",zf,[t.createElementVNode("div",qf,[t.createVNode(d,{href:i.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)),r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,"enable-redis-partial":o.enableRedisPartial,"is-editing":o.isEditing,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,model:o.formModel,options:o.formOptions,schema:i.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","is-konnect-managed-redis-enabled","model","options","schema","onModelUpdated","onPartialToggled"])):t.createCommentVNode("",!0)])]),_:3},8,["tabs"])])}const Gf=x(Pf,[["render",Hf],["__scopeId","data-v-7d523257"]]),Yf=x(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 l;t.provide(_e,(l=t.useSlots())==null?void 0:l[We]);const{t:n,te:o}=ge.createI18n("en-us",Ee),a=e,i=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),r=t.computed(()=>{const d=a.formSchema;return d.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}),d});return(d,c)=>i.value?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:r.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-f54f37ae"]]),Wf=x(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 l;t.provide(_e,(l=t.useSlots())==null?void 0:l[We]);const{t:n,te:o}=ge.createI18n("en-us",Ee),a=e,i=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),r=t.computed(()=>{const d=a.formSchema;return d.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}),d});return(d,c)=>i.value?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:r.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-0d5c541f"]]),Zf={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}]},Xf={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}]},Jf={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}]},Qf={class:"general-settings"},eh={class:"sub-form"},th={class:"general-settings"},nh={class:"sub-form"},oh={class:"general-settings"},ih=x(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 T;t.provide(_e,(T=t.useSlots())==null?void 0:T[We]);const n=e,o=t.ref("zeroSsl"),a=t.ref("shm"),i=t.computed(()=>{var E;const C={};if((E=n.formSchema)!=null&&E.fields)for(const w of n.formSchema.fields)C[w.model]=w;return C}),r=t.computed(()=>{var E;const C=Le(Zf);for(const w of C.fields){const V=(E=i.value[w.model])==null?void 0:E.help;w.help===void 0&&typeof V=="string"&&(w.help=V)}return C}),l=t.computed(()=>{var E;const C=Le(Xf);for(const w of C.fields){const V=(E=i.value[w.model])==null?void 0:E.help;w.help===void 0&&typeof V=="string"&&(w.help=V)}return C}),d=t.computed(()=>{var E;const C=Le(Jf);for(const w of C.fields){const V=(E=i.value[w.model])==null?void 0:E.help;w.help===void 0&&typeof V=="string"&&(w.help=V)}return C}),c=t.computed(()=>({fields:n.formSchema.fields.filter(C=>!C.model.startsWith("config")&&C.model!=="tags")})),m=t.computed(()=>({fields:r.value.fields.filter(E=>!l.value.fields.some(w=>w.model===E.model)&&!d.value.fields.some(w=>w.model===E.model))})),h=t.computed(()=>({fields:n.formSchema.fields.filter(E=>E.model.startsWith("config-storage")&&!E.model.startsWith("config-storage_config-consul")&&!E.model.startsWith("config-storage_config-redis")&&!E.model.startsWith("config-storage_config-shm")&&!E.model.startsWith("config-storage_config-vault"))})),u=t.computed(()=>({fields:n.formSchema.fields.filter(E=>E.model.startsWith("config-storage_config-consul"))})),p=t.computed(()=>({fields:n.formSchema.fields.filter(E=>E.model.startsWith("config-storage_config-redis"))})),_=t.computed(()=>({fields:n.formSchema.fields.filter(E=>E.model.startsWith("config-storage_config-shm"))})),N=t.computed(()=>({fields:n.formSchema.fields.filter(E=>E.model.startsWith("config-storage_config-vault"))})),g=t.computed(()=>({fields:n.formSchema.fields.filter(C=>C.model.startsWith("config")&&!m.value.fields.filter(E=>E.model===C.model).length&&!h.value.fields.filter(E=>E.model===C.model).length||C.model==="tags")})),O=t.computed(()=>n.formModel.id&&n.isEditing||!n.isEditing),A=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],R=[{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 B=C=>{o.value=C.value,(C.value==="zeroSsl"||C.value==="other")&&(C.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),C.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()},M=(C,E)=>{E==="config-storage"&&(a.value=C),n.onModelUpdated()};return(C,E)=>{const w=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(H,{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:A},{general:t.withCtx(()=>[t.createElementVNode("div",Qf,[E[0]||(E[0]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),E[1]||(E[1]=t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),O.value?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:m.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),E[2]||(E[2]=t.createElementVNode("hr",null,null,-1)),t.createVNode(w,{class:"issuer-select",items:R,label:"Issuer",onChange:B}),t.createElementVNode("div",eh,[o.value==="letsEncrypt"?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="zeroSsl"||o.value==="other"?(t.openBlock(),t.createBlock(H,{key:1,model:e.formModel,options:e.formOptions,schema:d.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",th,[E[3]||(E[3]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),E[4]||(E[4]=t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),O.value?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:h.value,onModelUpdated:M},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",nh,[a.value==="consul"?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:u.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="redis"?(t.openBlock(),t.createBlock(H,{key:1,model:e.formModel,options:e.formOptions,schema:p.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="shm"?(t.openBlock(),t.createBlock(H,{key:2,model:e.formModel,options:e.formOptions,schema:_.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="vault"?(t.openBlock(),t.createBlock(H,{key:3,model:e.formModel,options:e.formOptions,schema:N.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",oh,[E[5]||(E[5]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),E[6]||(E[6]=t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),O.value?(t.openBlock(),t.createBlock(H,{key:0,model:e.formModel,options:e.formOptions,schema:g.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),[["__scopeId","data-v-07cecf5b"]]),ah={class:"rla-form-basic-fields"},rh={class:"rla-form-request-limits-subtitle"},lh={class:"rla-form-request-limits-content"},sh={class:"rla-form-window-type"},dh=["innerHTML"],ch={class:"rla-form-window-type-radios"},mh={class:"rla-form-request-limits-items"},uh={class:"rla-form-request-limits-row"},fh=["id"],hh={class:"rla-form-request-limits-actions"},ph={key:0,class:"rla-form-request-limits-examples"},gh={class:"rla-form-request-limits-examples-badges"},yh=["innerHTML"],bh={id:"rla-form-error-legend",class:"rla-form-error-inputs"},_h=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:ih,ExitTransformer:Wf,OIDCForm:Gf,PostFunction:Yf,RLAForm:x(t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},onPartialToggled:{type:Function},showNewPartialModal:{type:Function},isEditing:{type:Boolean},enableRedisPartial:{type:Boolean},isKonnectManagedRedisEnabled:{type:Boolean}},setup(e){var V;t.provide(_e,(V=t.useSlots())==null?void 0:V[We]);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.
|
|
4
4
|
If the limit is exceeded and the user receives a 429 error, each additional request within the sliding window (hour)
|
|
5
|
-
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(u=>`config-${u}`)]),a=u=>u===void 0?!1:o.has(u),{t:r}=pe.createI18n("en-us",_e),i=e,s=t.computed(()=>{var S,k,U;const u=(k=(S=i.formSchema)==null?void 0:S.fields)==null?void 0:k.find(J=>J.type==="selectionGroup"&&J.model==="selectionGroup");return{fields:[(U=i.formSchema)==null?void 0:U.fields.find(J=>J.model==="enabled"),u].filter(Boolean)}}),d=t.computed(()=>{var J,we;const u=((we=(J=i.formSchema)==null?void 0:J.fields)==null?void 0:we.filter(te=>!a(te.model)))??[],y=[],S=[],k=[];let U=!1;for(const te of u){const qe=te.model;if(qe!==void 0){if(qe.startsWith("config-redis-")){(te.model==="config-redis-cluster_addresses"||te.model==="config-redis-sentinel_addresses")&&(te.inputAttributes.help=r("rla.redis.address_example")),S.push(te);continue}U?k.push(te):y.push(te),te.model==="config-strategy"&&(U=!0)}}return{endsWithStrategy:{fields:y},redis:i.enableRedisPartial?{fields:[{fields:S,id:"_redis",model:"__redis_partial",redisType:i.formSchema._supported_redis_partial_type}]}:{fields:S},afterStrategy:{fields:k}}}),c=t.computed(()=>{const u=i.formModel["config-window_type"];return Object.prototype.hasOwnProperty.call(n,u)?n[u]:[]}),m=t.computed(()=>{var u,y;return(y=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:y.find(S=>S.model==="config-identifier")}),p=t.computed(()=>{var u,y,S;return(((S=(y=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:y.find(k=>k.model==="config-identifier"))==null?void 0:S.values)??[]).map(k=>({label:r(`rla.identifiers.options.${k}`),value:k}))}),f=t.ref(),h=t.ref(!0),E=t.computed(()=>{var u,y,S;return i.formModel["config-window_type"]??((S=(y=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:y.find(k=>k.model==="config-window_type"))==null?void 0:S.default)}),M=t.computed(()=>{var y,S,k,U,J,we;const u=(k=(S=(y=i.formSchema)==null?void 0:y.fields)==null?void 0:S.find(te=>te.model==="config-window_type"))==null?void 0:k.default;return(((we=(J=(U=i.formSchema)==null?void 0:U.fields)==null?void 0:J.find(te=>te.model==="config-window_type"))==null?void 0:we.values)??[]).sort((te,qe)=>te===u?-1:qe===u?1:0)}),g=t.computed(()=>{var y;const u=(y=i.formModel["config-limit"])==null?void 0:y.map((S,k)=>{var U,J;return{limit:S,windowSize:(J=(U=i.formModel)==null?void 0:U["config-window_size"])==null?void 0:J[k]}});return!Array.isArray(u)||u.length===0?[{limit:void 0,windowSize:void 0}]:u}),V=t.computed(()=>{var u,y,S,k;return((u=i.formModel)==null?void 0:u["config-identifier"])??((k=(S=(y=i.formSchema)==null?void 0:y.fields)==null?void 0:S.find(U=>U.model==="config-identifier"))==null?void 0:k.default)}),I=t.computed(()=>{var u,y,S,k;return((u=i.formModel)==null?void 0:u["config-error_code"])??((k=(S=(y=i.formSchema)==null?void 0:y.fields)==null?void 0:S.find(U=>U.model==="config-error_code"))==null?void 0:k.default)}),L=t.computed(()=>{var u,y,S,k;return((u=i.formModel)==null?void 0:u["config-error_message"])??((k=(S=(y=i.formSchema)==null?void 0:y.fields)==null?void 0:S.find(U=>U.model==="config-error_message"))==null?void 0:k.default)}),B=(u,y)=>{if(y===f.value){i.onModelUpdated([],"config-limit"),i.onModelUpdated([],"config-window_size"),t.nextTick(()=>{f.value=void 0});return}i.onModelUpdated([u.config.limit],"config-limit"),i.onModelUpdated([u.config.window_size],"config-window_size"),t.nextTick(()=>{f.value=y})},A=u=>{f.value!==void 0&&(f.value=void 0),u!==null&&i.onModelUpdated(u.toString(),"config-window_type")},C=(u,y)=>{var k;f.value!==void 0&&(f.value=void 0);const S=Le(((k=i.formModel)==null?void 0:k["config-limit"])??[]);S[u]=y,i.onModelUpdated(S,"config-limit")},T=(u,y)=>{var k;f.value!==void 0&&(f.value=void 0);const S=Le(((k=i.formModel)==null?void 0:k["config-window_size"])??[]);S[u]=y,i.onModelUpdated(S,"config-window_size")},_=u=>{var k,U;f.value!==void 0&&(f.value=void 0);const y=Le(((k=i.formModel)==null?void 0:k["config-limit"])??[]),S=Le(((U=i.formModel)==null?void 0:U["config-window_size"])??[]);y.length===0&&y.push(void 0),S.length===0&&S.push(void 0),y.splice(u+1,0,void 0),S.splice(u+1,0,void 0),i.onModelUpdated(y,"config-limit"),i.onModelUpdated(S,"config-window_size")},w=u=>{var y,S;if(g.value.length>1){f.value!==void 0&&(f.value=void 0);const k=Le(((y=i.formModel)==null?void 0:y["config-limit"])??[]),U=Le(((S=i.formModel)==null?void 0:S["config-window_size"])??[]);k.length===0&&k.push(void 0),U.length===0&&U.push(void 0),k.splice(u,1),U.splice(u,1),i.onModelUpdated(k,"config-limit"),i.onModelUpdated(U,"config-window_size")}};return t.watch(()=>i.formModel["config-strategy"],u=>{u!=="redis"&&i.formModel.partials&&i.onModelUpdated(void 0,"partials")}),(u,y)=>{const S=t.resolveComponent("KLabel"),k=t.resolveComponent("KRadio"),U=t.resolveComponent("KInput"),J=t.resolveComponent("KButton"),we=t.resolveComponent("KBadge"),te=t.resolveComponent("KTooltip"),qe=t.resolveComponent("KCard"),Mn=t.resolveComponent("KSelect"),Gt=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Wf,[t.createVNode(H,{model:e.formModel,options:e.formOptions,schema:s.value,onModelUpdated:y[0]||(y[0]=(P,G)=>e.onModelUpdated(P,G))},null,8,["model","options","schema"]),t.createVNode(qe,{class:"rla-form-request-limits"},{title:t.withCtx(()=>[t.createVNode(S,{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",Zf,t.toDisplayString(t.unref(r)("rla.request_limits.subtitle")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",Xf,[t.createElementVNode("div",Jf,[t.createVNode(S,{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,Qf)]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.window_type.label"))+" ",1)]),_:1}),t.createElementVNode("div",eh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,P=>(t.openBlock(),t.createBlock(k,{key:`window-type-${P}`,"model-value":E.value,name:P,"selected-value":P,"onUpdate:modelValue":A},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)(`rla.window_type.options.${P}`)),1)]),_:2},1032,["model-value","name","selected-value"]))),128))])]),t.createElementVNode("div",th,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(P,G)=>(t.openBlock(),t.createElementBlock("div",{key:G.toString()},[t.createVNode(S,{for:`rla-form-request-limits-item-${G}-legend`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("rla.request_limits.label_index",{index:G+1})),1)]),_:2},1032,["for"]),t.createElementVNode("div",nh,[t.createElementVNode("legend",{id:`rla-form-request-limits-item-${G}-legend`,class:"rla-form-request-limits-inputs"},[t.createVNode(U,{"model-value":P.limit&&P.limit.toString(),placeholder:t.unref(r)("rla.request_limits.request_number"),type:"number","onUpdate:modelValue":W=>C(G,Number.parseInt(W))},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":P.windowSize&&P.windowSize.toString(),placeholder:t.unref(r)("rla.request_limits.time_interval"),type:"number","onUpdate:modelValue":W=>T(G,Number.parseInt(W))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.seconds")),1)],8,oh),t.createElementVNode("div",ah,[t.createVNode(J,{appearance:"tertiary",disabled:g.value.length<=1,onClick:()=>w(G)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ae.RemoveIcon))]),_:1},8,["disabled","onClick"]),t.createVNode(J,{appearance:"tertiary",onClick:()=>_(G)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ae.AddIcon))]),_:1},8,["onClick"])])])]))),128))]),c.value.length>0?(t.openBlock(),t.createElementBlock("div",ih,[t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.start_with_a_use_case")),1),t.createElementVNode("div",rh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(P,G)=>(t.openBlock(),t.createBlock(te,{key:`use-case-${G}`,"max-width":"300"},{content:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(P.description),1),y[10]||(y[10]=t.createElementVNode("br",null,null,-1)),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.label"))+": "+t.toDisplayString(P.config.limit),1),t.createElementVNode("div",null,t.toDisplayString(t.unref(r)("rla.request_limits.time_interval"))+": "+t.toDisplayString(P.config.window_size),1)]),default:t.withCtx(()=>[t.createVNode(we,{appearance:f.value===`${E.value}-${G}`?"info":"decorative",class:"rla-form-request-limits-examples-badge",onClick:()=>B(P,`${E.value}-${G}`)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(P.label),1)]),_:2},1032,["appearance","onClick"])]),_:2},1024))),128))])])):t.createCommentVNode("",!0)])]),_:1}),t.createVNode(Mn,{modelValue:V.value,"onUpdate:modelValue":y[1]||(y[1]=P=>V.value=P),class:"rla-form-identifiers",items:p.value,label:t.unref(r)("rla.identifiers.label"),"label-attributes":{tooltipAttributes:{maxWidth:"300",placement:"top"}},required:"",onSelected:y[2]||(y[2]=P=>i.onModelUpdated(P.value,"config-identifier"))},{"label-tooltip":t.withCtx(()=>[t.createElementVNode("div",{innerHTML:m.value&&m.value.help},null,8,lh)]),_:1},8,["modelValue","items","label"]),t.createElementVNode("div",null,[t.createVNode(S,{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",sh,[t.createVNode(U,{class:"input-error-code","model-value":I.value&&I.value.toString(),placeholder:t.unref(r)("rla.error_message.code_placeholder"),type:"number","onUpdate:modelValue":y[3]||(y[3]=P=>e.onModelUpdated(Number.parseInt(P),"config-error_code"))},null,8,["model-value","placeholder"]),y[11]||(y[11]=t.createElementVNode("div",null,":",-1)),t.createVNode(U,{"model-value":L.value,placeholder:t.unref(r)("rla.error_message.message_placeholder"),"onUpdate:modelValue":y[4]||(y[4]=P=>e.onModelUpdated(P,"config-error_message"))},null,8,["model-value","placeholder"])])])]),t.createVNode(Gt,{modelValue:h.value,"onUpdate:modelValue":y[9]||(y[9]=P=>h.value=P),"data-testid":"view-advanced","trigger-label":t.unref(r)("rla.view_advanced")},{default:t.withCtx(()=>[t.createVNode(H,{model:e.formModel,options:e.formOptions,schema:d.value.endsWithStrategy,onModelUpdated:y[5]||(y[5]=(P,G)=>e.onModelUpdated(P,G))},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(H,{"enable-redis-partial":e.enableRedisPartial,"is-editing":e.isEditing,"is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,model:e.formModel,options:e.formOptions,schema:d.value.redis,onModelUpdated:y[6]||(y[6]=(P,G)=>e.onModelUpdated(P,G)),onPartialToggled:e.onPartialToggled,onShowNewPartialModal:y[7]||(y[7]=()=>e.showNewPartialModal(e.formSchema._supported_redis_partial_type))},null,8,["enable-redis-partial","is-editing","is-konnect-managed-redis-enabled","model","options","schema","onPartialToggled"])]),_:1},8,["title"])):t.createCommentVNode("",!0),t.createVNode(H,{class:t.normalizeClass({"rla-last-vfg":e.formModel["config-strategy"]!=="redis"}),model:e.formModel,options:e.formOptions,schema:d.value.afterStrategy,onModelUpdated:y[8]||(y[8]=(P,G)=>e.onModelUpdated(P,G))},null,8,["class","model","options","schema"])]),_:1},8,["modelValue","trigger-label"])],64)}}}),[["__scopeId","data-v-c304263d"]])},Symbol.toStringTag,{value:"Module"})),ch=["array","metric","advanced","selectionGroup","object-advanced"],mh=e=>({"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer","rate-limiting-advanced":"RLAForm"})[e];D.AUTOFILL_SLOT=be,D.AUTOFILL_SLOT_NAME=We,D.EMPTY_VALUE_PLACEHOLDER=uo,D.FIELD_STATES=Me,D.FORMS_API_KEY=ye,D.FORMS_CONFIG=ln,D.FieldScopedEntitySelect=Ia,D.PartialType=At,D.REDIS_PARTIAL_FETCHER_KEY=mo,D.REDIS_PARTIAL_INFO=Tl,D.VueFormGenerator=H,D.abstractField=jc,D.composables=Ce,D.customFields=ch,D.getSharedFormName=mh,D.sharedForms=dh,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
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(f=>`config-${f}`)]),a=f=>f===void 0?!1:o.has(f),{t:i}=ge.createI18n("en-us",Ee),r=e,l=t.computed(()=>{var S,k,U;const f=(k=(S=r.formSchema)==null?void 0:S.fields)==null?void 0:k.find(J=>J.type==="selectionGroup"&&J.model==="selectionGroup");return{fields:[(U=r.formSchema)==null?void 0:U.fields.find(J=>J.model==="enabled"),f].filter(Boolean)}}),d=t.computed(()=>{var J,ke;const f=((ke=(J=r.formSchema)==null?void 0:J.fields)==null?void 0:ke.filter(te=>!a(te.model)))??[],y=[],S=[],k=[];let U=!1;for(const te of f){const ze=te.model;if(ze!==void 0){if(ze.startsWith("config-redis-")){(te.model==="config-redis-cluster_addresses"||te.model==="config-redis-sentinel_addresses")&&(te.inputAttributes.help=i("rla.redis.address_example")),S.push(te);continue}U?k.push(te):y.push(te),te.model==="config-strategy"&&(U=!0)}}return{endsWithStrategy:{fields:y},redis:r.enableRedisPartial?{fields:[{fields:S,id:"_redis",model:"__redis_partial",redisType:r.formSchema._supported_redis_partial_type}]}:{fields:S},afterStrategy:{fields:k}}}),c=t.computed(()=>{const f=r.formModel["config-window_type"];return Object.prototype.hasOwnProperty.call(n,f)?n[f]:[]}),m=t.computed(()=>{var f,y;return(y=(f=r.formSchema)==null?void 0:f.fields)==null?void 0:y.find(S=>S.model==="config-identifier")}),h=t.computed(()=>{var f,y,S;return(((S=(y=(f=r.formSchema)==null?void 0:f.fields)==null?void 0:y.find(k=>k.model==="config-identifier"))==null?void 0:S.values)??[]).map(k=>({label:i(`rla.identifiers.options.${k}`),value:k}))}),u=t.ref(),p=t.ref(!0),_=t.computed(()=>{var f,y,S;return r.formModel["config-window_type"]??((S=(y=(f=r.formSchema)==null?void 0:f.fields)==null?void 0:y.find(k=>k.model==="config-window_type"))==null?void 0:S.default)}),N=t.computed(()=>{var y,S,k,U,J,ke;const f=(k=(S=(y=r.formSchema)==null?void 0:y.fields)==null?void 0:S.find(te=>te.model==="config-window_type"))==null?void 0:k.default;return(((ke=(J=(U=r.formSchema)==null?void 0:U.fields)==null?void 0:J.find(te=>te.model==="config-window_type"))==null?void 0:ke.values)??[]).sort((te,ze)=>te===f?-1:ze===f?1:0)}),g=t.computed(()=>{var y;const f=(y=r.formModel["config-limit"])==null?void 0:y.map((S,k)=>{var U,J;return{limit:S,windowSize:(J=(U=r.formModel)==null?void 0:U["config-window_size"])==null?void 0:J[k]}});return!Array.isArray(f)||f.length===0?[{limit:void 0,windowSize:void 0}]:f}),O=t.computed(()=>{var f,y,S,k;return((f=r.formModel)==null?void 0:f["config-identifier"])??((k=(S=(y=r.formSchema)==null?void 0:y.fields)==null?void 0:S.find(U=>U.model==="config-identifier"))==null?void 0:k.default)}),A=t.computed(()=>{var f,y,S,k;return((f=r.formModel)==null?void 0:f["config-error_code"])??((k=(S=(y=r.formSchema)==null?void 0:y.fields)==null?void 0:S.find(U=>U.model==="config-error_code"))==null?void 0:k.default)}),R=t.computed(()=>{var f,y,S,k;return((f=r.formModel)==null?void 0:f["config-error_message"])??((k=(S=(y=r.formSchema)==null?void 0:y.fields)==null?void 0:S.find(U=>U.model==="config-error_message"))==null?void 0:k.default)}),B=(f,y)=>{if(y===u.value){r.onModelUpdated([],"config-limit"),r.onModelUpdated([],"config-window_size"),t.nextTick(()=>{u.value=void 0});return}r.onModelUpdated([f.config.limit],"config-limit"),r.onModelUpdated([f.config.window_size],"config-window_size"),t.nextTick(()=>{u.value=y})},M=f=>{u.value!==void 0&&(u.value=void 0),f!==null&&r.onModelUpdated(f.toString(),"config-window_type")},T=(f,y)=>{var k;u.value!==void 0&&(u.value=void 0);const S=Le(((k=r.formModel)==null?void 0:k["config-limit"])??[]);S[f]=y,r.onModelUpdated(S,"config-limit")},C=(f,y)=>{var k;u.value!==void 0&&(u.value=void 0);const S=Le(((k=r.formModel)==null?void 0:k["config-window_size"])??[]);S[f]=y,r.onModelUpdated(S,"config-window_size")},E=f=>{var k,U;u.value!==void 0&&(u.value=void 0);const y=Le(((k=r.formModel)==null?void 0:k["config-limit"])??[]),S=Le(((U=r.formModel)==null?void 0:U["config-window_size"])??[]);y.length===0&&y.push(void 0),S.length===0&&S.push(void 0),y.splice(f+1,0,void 0),S.splice(f+1,0,void 0),r.onModelUpdated(y,"config-limit"),r.onModelUpdated(S,"config-window_size")},w=f=>{var y,S;if(g.value.length>1){u.value!==void 0&&(u.value=void 0);const k=Le(((y=r.formModel)==null?void 0:y["config-limit"])??[]),U=Le(((S=r.formModel)==null?void 0:S["config-window_size"])??[]);k.length===0&&k.push(void 0),U.length===0&&U.push(void 0),k.splice(f,1),U.splice(f,1),r.onModelUpdated(k,"config-limit"),r.onModelUpdated(U,"config-window_size")}};return t.watch(()=>r.formModel["config-strategy"],f=>{f!=="redis"&&r.formModel.partials&&r.onModelUpdated(void 0,"partials")}),(f,y)=>{const S=t.resolveComponent("KLabel"),k=t.resolveComponent("KRadio"),U=t.resolveComponent("KInput"),J=t.resolveComponent("KButton"),ke=t.resolveComponent("KBadge"),te=t.resolveComponent("KTooltip"),ze=t.resolveComponent("KCard"),An=t.resolveComponent("KSelect"),Wt=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",ah,[t.createVNode(H,{model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:y[0]||(y[0]=(P,G)=>e.onModelUpdated(P,G))},null,8,["model","options","schema"]),t.createVNode(ze,{class:"rla-form-request-limits"},{title:t.withCtx(()=>[t.createVNode(S,{class:"rla-form-request-limits-title",for:"rla-form-request-limits-legend",required:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.request_limits.title")),1)]),_:1}),t.createElementVNode("div",rh,t.toDisplayString(t.unref(i)("rla.request_limits.subtitle")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",lh,[t.createElementVNode("div",sh,[t.createVNode(S,{class:"rla-form-window-type-label","tooltip-attributes":{maxWidth:"300",placement:"top"}},{tooltip:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:t.unref(i)("rla.window_type.help")},null,8,dh)]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.window_type.label"))+" ",1)]),_:1}),t.createElementVNode("div",ch,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N.value,P=>(t.openBlock(),t.createBlock(k,{key:`window-type-${P}`,"model-value":_.value,name:P,"selected-value":P,"onUpdate:modelValue":M},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)(`rla.window_type.options.${P}`)),1)]),_:2},1032,["model-value","name","selected-value"]))),128))])]),t.createElementVNode("div",mh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(P,G)=>(t.openBlock(),t.createElementBlock("div",{key:G.toString()},[t.createVNode(S,{for:`rla-form-request-limits-item-${G}-legend`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.request_limits.label_index",{index:G+1})),1)]),_:2},1032,["for"]),t.createElementVNode("div",uh,[t.createElementVNode("legend",{id:`rla-form-request-limits-item-${G}-legend`,class:"rla-form-request-limits-inputs"},[t.createVNode(U,{"model-value":P.limit&&P.limit.toString(),placeholder:t.unref(i)("rla.request_limits.request_number"),type:"number","onUpdate:modelValue":W=>T(G,Number.parseInt(W))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.interval_determiner")),1),t.createVNode(U,{"model-value":P.windowSize&&P.windowSize.toString(),placeholder:t.unref(i)("rla.request_limits.time_interval"),type:"number","onUpdate:modelValue":W=>C(G,Number.parseInt(W))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.seconds")),1)],8,fh),t.createElementVNode("div",hh,[t.createVNode(J,{appearance:"tertiary",disabled:g.value.length<=1,onClick:()=>w(G)},{default:t.withCtx(()=>[t.createVNode(t.unref(ue.RemoveIcon))]),_:1},8,["disabled","onClick"]),t.createVNode(J,{appearance:"tertiary",onClick:()=>E(G)},{default:t.withCtx(()=>[t.createVNode(t.unref(ue.AddIcon))]),_:1},8,["onClick"])])])]))),128))]),c.value.length>0?(t.openBlock(),t.createElementBlock("div",ph,[t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.start_with_a_use_case")),1),t.createElementVNode("div",gh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(P,G)=>(t.openBlock(),t.createBlock(te,{key:`use-case-${G}`,"max-width":"300"},{content:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(P.description),1),y[10]||(y[10]=t.createElementVNode("br",null,null,-1)),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.label"))+": "+t.toDisplayString(P.config.limit),1),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.time_interval"))+": "+t.toDisplayString(P.config.window_size),1)]),default:t.withCtx(()=>[t.createVNode(ke,{appearance:u.value===`${_.value}-${G}`?"info":"decorative",class:"rla-form-request-limits-examples-badge",onClick:()=>B(P,`${_.value}-${G}`)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(P.label),1)]),_:2},1032,["appearance","onClick"])]),_:2},1024))),128))])])):t.createCommentVNode("",!0)])]),_:1}),t.createVNode(An,{modelValue:O.value,"onUpdate:modelValue":y[1]||(y[1]=P=>O.value=P),class:"rla-form-identifiers",items:h.value,label:t.unref(i)("rla.identifiers.label"),"label-attributes":{tooltipAttributes:{maxWidth:"300",placement:"top"}},required:"",onSelected:y[2]||(y[2]=P=>r.onModelUpdated(P.value,"config-identifier"))},{"label-tooltip":t.withCtx(()=>[t.createElementVNode("div",{innerHTML:m.value&&m.value.help},null,8,yh)]),_:1},8,["modelValue","items","label"]),t.createElementVNode("div",null,[t.createVNode(S,{for:"rla-form-error-legend",info:t.unref(i)("rla.error_message.help"),required:"","tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.error_message.label")),1)]),_:1},8,["info"]),t.createElementVNode("legend",bh,[t.createVNode(U,{class:"input-error-code","model-value":A.value&&A.value.toString(),placeholder:t.unref(i)("rla.error_message.code_placeholder"),type:"number","onUpdate:modelValue":y[3]||(y[3]=P=>e.onModelUpdated(Number.parseInt(P),"config-error_code"))},null,8,["model-value","placeholder"]),y[11]||(y[11]=t.createElementVNode("div",null,":",-1)),t.createVNode(U,{"model-value":R.value,placeholder:t.unref(i)("rla.error_message.message_placeholder"),"onUpdate:modelValue":y[4]||(y[4]=P=>e.onModelUpdated(P,"config-error_message"))},null,8,["model-value","placeholder"])])])]),t.createVNode(Wt,{modelValue:p.value,"onUpdate:modelValue":y[9]||(y[9]=P=>p.value=P),"data-testid":"view-advanced","trigger-label":t.unref(i)("rla.view_advanced")},{default:t.withCtx(()=>[t.createVNode(H,{model:e.formModel,options:e.formOptions,schema:d.value.endsWithStrategy,onModelUpdated:y[5]||(y[5]=(P,G)=>e.onModelUpdated(P,G))},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(i)("rla.redis.title")},{default:t.withCtx(()=>[t.createVNode(H,{"enable-redis-partial":e.enableRedisPartial,"is-editing":e.isEditing,"is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,model:e.formModel,options:e.formOptions,schema:d.value.redis,onModelUpdated:y[6]||(y[6]=(P,G)=>e.onModelUpdated(P,G)),onPartialToggled:e.onPartialToggled,onShowNewPartialModal:y[7]||(y[7]=()=>e.showNewPartialModal(e.formSchema._supported_redis_partial_type))},null,8,["enable-redis-partial","is-editing","is-konnect-managed-redis-enabled","model","options","schema","onPartialToggled"])]),_:1},8,["title"])):t.createCommentVNode("",!0),t.createVNode(H,{class:t.normalizeClass({"rla-last-vfg":e.formModel["config-strategy"]!=="redis"}),model:e.formModel,options:e.formOptions,schema:d.value.afterStrategy,onModelUpdated:y[8]||(y[8]=(P,G)=>e.onModelUpdated(P,G))},null,8,["class","model","options","schema"])]),_:1},8,["modelValue","trigger-label"])],64)}}}),[["__scopeId","data-v-c304263d"]])},Symbol.toStringTag,{value:"Module"})),Eh=["array","metric","advanced","selectionGroup","object-advanced"],Ch=e=>({"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer","rate-limiting-advanced":"RLAForm"})[e];L.AUTOFILL_SLOT=_e,L.AUTOFILL_SLOT_NAME=We,L.EMPTY_VALUE_PLACEHOLDER=fo,L.FIELD_STATES=Ne,L.FORMS_API_KEY=be,L.FORMS_CONFIG=vt,L.FieldScopedEntitySelect=Bi,L.PartialType=Nt,L.REDIS_PARTIAL_FETCHER_KEY=uo,L.REDIS_PARTIAL_INFO=kl,L.VueFormGenerator=H,L.abstractField=Hc,L.composables=we,L.customFields=Eh,L.getSharedFormName=Ch,L.sharedForms=_h,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|