@kong-ui-public/forms 4.25.6 → 4.25.7
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 +2546 -2453
- package/dist/forms.umd.js +4 -4
- package/package.json +7 -7
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(U,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):(U=typeof globalThis<"u"?globalThis:U||self,t(U["kong-ui-public-forms"]={},U.Vue,U["kong-ui-public-i18n"],U.KongIcons,U.axios,U["kong-ui-public-entities-shared"]))})(this,function(U,t,ge,Ae,bi,Ut){"use strict";function Yn(e,n){for(var o=-1,a=e==null?0:e.length;++o<a&&n(e[o],o,e)!==!1;);return e}function _i(e){return function(n,o,a){for(var i=-1,r=Object(n),s=a(n),d=s.length;d--;){var c=s[++i];if(o(r[c],c,r)===!1)break}return n}}var Ei=_i();function Ti(e,n){for(var o=-1,a=Array(e);++o<e;)a[o]=n(o);return a}var Wn=typeof global=="object"&&global&&global.Object===Object&&global,Si=typeof self=="object"&&self&&self.Object===Object&&self,Te=Wn||Si||Function("return this")(),ve=Te.Symbol,Zn=Object.prototype,Ci=Zn.hasOwnProperty,wi=Zn.toString,Ct=ve?ve.toStringTag:void 0;function ki(e){var n=Ci.call(e,Ct),o=e[Ct];try{e[Ct]=void 0;var a=!0}catch{}var i=wi.call(e);return a&&(n?e[Ct]=o:delete e[Ct]),i}var Ai=Object.prototype,Mi=Ai.toString;function Ni(e){return Mi.call(e)}var Ii="[object Null]",Oi="[object Undefined]",Xn=ve?ve.toStringTag:void 0;function je(e){return e==null?e===void 0?Oi:Ii:Xn&&Xn in Object(e)?ki(e):Ni(e)}function Ke(e){return e!=null&&typeof e=="object"}var Vi="[object Arguments]";function Jn(e){return Ke(e)&&je(e)==Vi}var Qn=Object.prototype,Bi=Qn.hasOwnProperty,Ri=Qn.propertyIsEnumerable,Fi=Jn(function(){return arguments}())?Jn:function(e){return Ke(e)&&Bi.call(e,"callee")&&!Ri.call(e,"callee")},ze=Array.isArray;function Di(){return!1}var eo=typeof U=="object"&&U&&!U.nodeType&&U,to=eo&&typeof module=="object"&&module&&!module.nodeType&&module,Li=to&&to.exports===eo,no=Li?Te.Buffer:void 0,Ui=no?no.isBuffer:void 0,oo=Ui||Di,Pi=9007199254740991,$i=/^(?:0|[1-9]\d*)$/;function ao(e,n){var o=typeof e;return n=n??Pi,!!n&&(o=="number"||o!="symbol"&&$i.test(e))&&e>-1&&e%1==0&&e<n}var xi=9007199254740991;function io(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xi}var vi="[object Arguments]",ji="[object Array]",Ki="[object Boolean]",zi="[object Date]",qi="[object Error]",Hi="[object Function]",Gi="[object Map]",Yi="[object Number]",Wi="[object Object]",Zi="[object RegExp]",Xi="[object Set]",Ji="[object String]",Qi="[object WeakMap]",er="[object ArrayBuffer]",tr="[object DataView]",nr="[object Float32Array]",or="[object Float64Array]",ar="[object Int8Array]",ir="[object Int16Array]",rr="[object Int32Array]",lr="[object Uint8Array]",sr="[object Uint8ClampedArray]",dr="[object Uint16Array]",cr="[object Uint32Array]",G={};G[nr]=G[or]=G[ar]=G[ir]=G[rr]=G[lr]=G[sr]=G[dr]=G[cr]=!0,G[vi]=G[ji]=G[er]=G[Ki]=G[tr]=G[zi]=G[qi]=G[Hi]=G[Gi]=G[Yi]=G[Wi]=G[Zi]=G[Xi]=G[Ji]=G[Qi]=!1;function mr(e){return Ke(e)&&io(e.length)&&!!G[je(e)]}function rn(e){return function(n){return e(n)}}var ro=typeof U=="object"&&U&&!U.nodeType&&U,wt=ro&&typeof module=="object"&&module&&!module.nodeType&&module,ur=wt&&wt.exports===ro,ln=ur&&Wn.process,it=function(){try{var e=wt&&wt.require&&wt.require("util").types;return e||ln&&ln.binding&&ln.binding("util")}catch{}}(),lo=it&&it.isTypedArray,fr=lo?rn(lo):mr,hr=Object.prototype,pr=hr.hasOwnProperty;function so(e,n){var o=ze(e),a=!o&&Fi(e),i=!o&&!a&&oo(e),r=!o&&!a&&!i&&fr(e),s=o||a||i||r,d=s?Ti(e.length,String):[],c=d.length;for(var m in e)(n||pr.call(e,m))&&!(s&&(m=="length"||i&&(m=="offset"||m=="parent")||r&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||ao(m,c)))&&d.push(m);return d}var gr=Object.prototype;function sn(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||gr;return e===o}function co(e,n){return function(o){return e(n(o))}}var yr=co(Object.keys,Object),br=Object.prototype,_r=br.hasOwnProperty;function Er(e){if(!sn(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 Tr="[object AsyncFunction]",Sr="[object Function]",Cr="[object GeneratorFunction]",wr="[object Proxy]";function K(e){if(!ye(e))return!1;var n=je(e);return n==Sr||n==Cr||n==Tr||n==wr}function Pt(e){return e!=null&&io(e.length)&&!K(e)}function $t(e){return Pt(e)?so(e):Er(e)}function kr(e,n){return e&&Ei(e,n,$t)}function Ar(e,n){return function(o,a){if(o==null)return o;if(!Pt(o))return e(o,a);for(var i=o.length,r=-1,s=Object(o);++r<i&&a(s[r],r,s)!==!1;);return o}}var Mr=Ar(kr);function dn(e){return e}function Nr(e){return typeof e=="function"?e:dn}function ue(e,n){var o=ze(e)?Yn:Mr;return o(e,Nr(n))}var Ir="[object Symbol]";function xt(e){return typeof e=="symbol"||Ke(e)&&je(e)==Ir}var Or=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vr=/^\w*$/;function Br(e,n){if(ze(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||xt(e)?!0:Vr.test(e)||!Or.test(e)||n!=null&&e in Object(n)}var cn=Te["__core-js_shared__"],mo=function(){var e=/[^.]+$/.exec(cn&&cn.keys&&cn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Rr(e){return!!mo&&mo in e}var Fr=Function.prototype,Dr=Fr.toString;function We(e){if(e!=null){try{return Dr.call(e)}catch{}try{return e+""}catch{}}return""}var Lr=/[\\^$.*+?()[\]{}|]/g,Ur=/^\[object .+?Constructor\]$/,Pr=Function.prototype,$r=Object.prototype,xr=Pr.toString,vr=$r.hasOwnProperty,jr=RegExp("^"+xr.call(vr).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kr(e){if(!ye(e)||Rr(e))return!1;var n=K(e)?jr:Ur;return n.test(We(e))}function zr(e,n){return e==null?void 0:e[n]}function Ze(e,n){var o=zr(e,n);return Kr(o)?o:void 0}var kt=Ze(Object,"create");function qr(){this.__data__=kt?kt(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(kt){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 kt?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]=kt&&n===void 0?el:n,this}function Xe(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])}}Xe.prototype.clear=qr,Xe.prototype.delete=Hr,Xe.prototype.get=Zr,Xe.prototype.has=Qr,Xe.prototype.set=tl;function nl(){this.__data__=[],this.size=0}function vt(e,n){return e===n||e!==e&&n!==n}function jt(e,n){for(var o=e.length;o--;)if(vt(e[o][0],n))return o;return-1}var ol=Array.prototype,al=ol.splice;function il(e){var n=this.__data__,o=jt(n,e);if(o<0)return!1;var a=n.length-1;return o==a?n.pop():al.call(n,o,1),--this.size,!0}function rl(e){var n=this.__data__,o=jt(n,e);return o<0?void 0:n[o][1]}function ll(e){return jt(this.__data__,e)>-1}function sl(e,n){var o=this.__data__,a=jt(o,e);return a<0?(++this.size,o.push([e,n])):o[a][1]=n,this}function Le(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])}}Le.prototype.clear=nl,Le.prototype.delete=il,Le.prototype.get=rl,Le.prototype.has=ll,Le.prototype.set=sl;var At=Ze(Te,"Map");function dl(){this.size=0,this.__data__={hash:new Xe,map:new(At||Le),string:new Xe}}function cl(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Kt(e,n){var o=e.__data__;return cl(n)?o[typeof n=="string"?"string":"hash"]:o.map}function ml(e){var n=Kt(this,e).delete(e);return this.size-=n?1:0,n}function ul(e){return Kt(this,e).get(e)}function fl(e){return Kt(this,e).has(e)}function hl(e,n){var o=Kt(this,e),a=o.size;return o.set(e,n),this.size+=o.size==a?0:1,this}function Ue(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])}}Ue.prototype.clear=dl,Ue.prototype.delete=ml,Ue.prototype.get=ul,Ue.prototype.has=fl,Ue.prototype.set=hl;var pl="Expected a function";function mn(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 s=e.apply(this,a);return o.cache=r.set(i,s)||r,s};return o.cache=new(mn.Cache||Ue),o}mn.Cache=Ue;var gl=500;function yl(e){var n=mn(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 Tl(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 uo=ve?ve.prototype:void 0,fo=uo?uo.toString:void 0;function ho(e){if(typeof e=="string")return e;if(ze(e))return Tl(e,ho)+"";if(xt(e))return fo?fo.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function po(e){return e==null?"":ho(e)}function Sl(e,n){return ze(e)?e:Br(e,n)?[e]:El(po(e))}function Cl(e){if(typeof e=="string"||xt(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[Cl(n[o++])];return o&&o==a?e:void 0}function j(e,n,o){var a=e==null?void 0:wl(e,n);return a===void 0?o:a}function Q(e){return e==null}const be="kong-ui-forms-api",un="kong-ui-forms-config",go="redis-partial-list-fetcher-key",kl="redis-partial-info",Je="autofill",_e="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"},yo="—";/*! @license DOMPurify 3.4.8 | (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.8/LICENSE */function bo(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 Al(e){if(Array.isArray(e))return e}function Ml(e,n){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var a,i,r,s,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(g){m=!0,i=g}finally{try{if(!c&&o.return!=null&&(s=o.return(),Object(s)!==s))return}finally{if(m)throw i}}return d}}function Nl(){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 Al(e)||Ml(e,n)||Ol(e,n)||Nl()}function Ol(e,n){if(e){if(typeof e=="string")return bo(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)?bo(e,n):void 0}}const _o=Object.entries,Eo=Object.setPrototypeOf,Vl=Object.isFrozen,Bl=Object.getPrototypeOf,Rl=Object.getOwnPropertyDescriptor;let fe=Object.freeze,Se=Object.seal,rt=Object.create,To=typeof Reflect<"u"&&Reflect,fn=To.apply,hn=To.construct;fe||(fe=function(n){return n}),Se||(Se=function(n){return n}),fn||(fn=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)}),hn||(hn=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 Qe=ae(Array.prototype.forEach),Fl=ae(Array.prototype.lastIndexOf),So=ae(Array.prototype.pop),lt=ae(Array.prototype.push),Dl=ae(Array.prototype.splice),he=Array.isArray,Mt=ae(String.prototype.toLowerCase),pn=ae(String.prototype.toString),Co=ae(String.prototype.match),st=ae(String.prototype.replace),wo=ae(String.prototype.indexOf),Ll=ae(String.prototype.trim),Ul=ae(Number.prototype.toString),Pl=ae(Boolean.prototype.toString),ko=typeof BigInt>"u"?null:ae(BigInt.prototype.toString),Ao=typeof Symbol>"u"?null:ae(Symbol.prototype.toString),X=ae(Object.prototype.hasOwnProperty),Nt=ae(Object.prototype.toString),de=ae(RegExp.prototype.test),dt=$l(TypeError);function ae(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 fn(e,n,a)}}function $l(e){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return hn(e,o)}}function F(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mt;if(Eo&&Eo(e,null),!he(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++)X(e,n)||(e[n]=null);return e}function me(e){const n=rt(null);for(const a of _o(e)){var o=Il(a,2);const i=o[0],r=o[1];X(e,i)&&(he(r)?n[i]=xl(r):r&&typeof r=="object"&&r.constructor===Object?n[i]=me(r):n[i]=r)}return n}function vl(e){switch(typeof e){case"string":return e;case"number":return Ul(e);case"boolean":return Pl(e);case"bigint":return ko?ko(e):"0";case"symbol":return Ao?Ao(e):"Symbol()";case"undefined":return Nt(e);case"function":case"object":{if(e===null)return Nt(e);const n=e,o=Be(n,"toString");if(typeof o=="function"){const a=o(n);return typeof a=="string"?a:Nt(a)}return Nt(e)}default:return Nt(e)}}function Be(e,n){for(;e!==null;){const a=Rl(e,n);if(a){if(a.get)return ae(a.get);if(typeof a.value=="function")return ae(a.value)}e=Bl(e)}function o(){return null}return o}function jl(e){try{return de(e,""),!0}catch{return!1}}const Mo=fe(["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"]),gn=fe(["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"]),yn=fe(["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=fe(["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"]),bn=fe(["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=fe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),No=fe(["#text"]),Io=fe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),_n=fe(["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"]),Oo=fe(["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"]),zt=fe(["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]+$/),Vo=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),Re={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},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(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Bo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ro(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:es();const n=B=>Ro(B);if(n.version="3.4.8",n.removed=[],!e||!e.document||e.document.nodeType!==Re.document||!e.Element)return n.isSupported=!1,n;let o=e.document;const a=o,i=a.currentScript;e.DocumentFragment;const r=e.HTMLTemplateElement,s=e.Node,d=e.Element,c=e.NodeFilter,m=e.NamedNodeMap;m===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const g=e.DOMParser,f=e.trustedTypes,h=d.prototype,E=Be(h,"cloneNode"),I=Be(h,"remove"),b=Be(h,"nextSibling"),O=Be(h,"childNodes"),N=Be(h,"parentNode"),D=Be(h,"shadowRoot"),R=Be(h,"attributes"),C=s&&s.prototype?Be(s.prototype,"nodeType"):null,A=s&&s.prototype?Be(s.prototype,"nodeName"):null;if(typeof r=="function"){const B=o.createElement("template");B.content&&B.content.ownerDocument&&(o=B.content.ownerDocument)}let T,_="",w=0;const M=function(l){if(w>0)throw dt('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');w++;try{return T.createHTML(l)}finally{w--}},u=o,y=u.implementation,S=u.createNodeIterator,V=u.createDocumentFragment,x=u.getElementsByTagName,le=a.importNode;let H=Bo();n.isSupported=typeof _o=="function"&&typeof N=="function"&&y&&y.createHTMLDocument!==void 0;const Z=ql,Ie=Hl,pt=Gl,Bn=Yl,P=Wl,J=Zl,gt=Xl,gh=Ql;let Xa=Vo,te=null;const Rn=F({},[...Mo,...gn,...yn,...bn,...No]);let ie=null;const Fn=F({},[...Io,..._n,...Oo,...zt]);let ne=Object.seal(rt(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}})),Rt=null,Xt=null;const Ge=Object.seal(rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ja=!0,Dn=!0,Qa=!1,ei=!0,Ye=!1,Ft=!0,ot=!1,Ln=!1,Un=!1,yt=!1,Jt=!1,Qt=!1,ti=!0,ni=!1;const oi="user-content-";let Pn=!0,Dt=!1,bt={},Fe=null;const $n=F({},["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 ai=null;const ii=F({},["audio","video","img","source","image","track"]);let xn=null;const ri=F({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),en="http://www.w3.org/1998/Math/MathML",tn="http://www.w3.org/2000/svg",De="http://www.w3.org/1999/xhtml";let _t=De,vn=!1,jn=null;const yh=F({},[en,tn,De],pn);let Kn=F({},["mi","mo","mn","ms","mtext"]),zn=F({},["annotation-xml"]);const bh=F({},["title","style","font","a","script"]);let Lt=null;const _h=["application/xhtml+xml","text/html"],Eh="text/html";let oe=null,Et=null;const Th=o.createElement("form"),li=function(l){return l instanceof RegExp||l instanceof Function},qn=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Et&&Et===l)return;(!l||typeof l!="object")&&(l={}),l=me(l),Lt=_h.indexOf(l.PARSER_MEDIA_TYPE)===-1?Eh:l.PARSER_MEDIA_TYPE,oe=Lt==="application/xhtml+xml"?pn:Mt,te=X(l,"ALLOWED_TAGS")&&he(l.ALLOWED_TAGS)?F({},l.ALLOWED_TAGS,oe):Rn,ie=X(l,"ALLOWED_ATTR")&&he(l.ALLOWED_ATTR)?F({},l.ALLOWED_ATTR,oe):Fn,jn=X(l,"ALLOWED_NAMESPACES")&&he(l.ALLOWED_NAMESPACES)?F({},l.ALLOWED_NAMESPACES,pn):yh,xn=X(l,"ADD_URI_SAFE_ATTR")&&he(l.ADD_URI_SAFE_ATTR)?F(me(ri),l.ADD_URI_SAFE_ATTR,oe):ri,ai=X(l,"ADD_DATA_URI_TAGS")&&he(l.ADD_DATA_URI_TAGS)?F(me(ii),l.ADD_DATA_URI_TAGS,oe):ii,Fe=X(l,"FORBID_CONTENTS")&&he(l.FORBID_CONTENTS)?F({},l.FORBID_CONTENTS,oe):$n,Rt=X(l,"FORBID_TAGS")&&he(l.FORBID_TAGS)?F({},l.FORBID_TAGS,oe):me({}),Xt=X(l,"FORBID_ATTR")&&he(l.FORBID_ATTR)?F({},l.FORBID_ATTR,oe):me({}),bt=X(l,"USE_PROFILES")?l.USE_PROFILES&&typeof l.USE_PROFILES=="object"?me(l.USE_PROFILES):l.USE_PROFILES:!1,Ja=l.ALLOW_ARIA_ATTR!==!1,Dn=l.ALLOW_DATA_ATTR!==!1,Qa=l.ALLOW_UNKNOWN_PROTOCOLS||!1,ei=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ye=l.SAFE_FOR_TEMPLATES||!1,Ft=l.SAFE_FOR_XML!==!1,ot=l.WHOLE_DOCUMENT||!1,yt=l.RETURN_DOM||!1,Jt=l.RETURN_DOM_FRAGMENT||!1,Qt=l.RETURN_TRUSTED_TYPE||!1,Un=l.FORCE_BODY||!1,ti=l.SANITIZE_DOM!==!1,ni=l.SANITIZE_NAMED_PROPS||!1,Pn=l.KEEP_CONTENT!==!1,Dt=l.IN_PLACE||!1,Xa=jl(l.ALLOWED_URI_REGEXP)?l.ALLOWED_URI_REGEXP:Vo,_t=typeof l.NAMESPACE=="string"?l.NAMESPACE:De,Kn=X(l,"MATHML_TEXT_INTEGRATION_POINTS")&&l.MATHML_TEXT_INTEGRATION_POINTS&&typeof l.MATHML_TEXT_INTEGRATION_POINTS=="object"?me(l.MATHML_TEXT_INTEGRATION_POINTS):F({},["mi","mo","mn","ms","mtext"]),zn=X(l,"HTML_INTEGRATION_POINTS")&&l.HTML_INTEGRATION_POINTS&&typeof l.HTML_INTEGRATION_POINTS=="object"?me(l.HTML_INTEGRATION_POINTS):F({},["annotation-xml"]);const p=X(l,"CUSTOM_ELEMENT_HANDLING")&&l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING=="object"?me(l.CUSTOM_ELEMENT_HANDLING):rt(null);if(ne=rt(null),X(p,"tagNameCheck")&&li(p.tagNameCheck)&&(ne.tagNameCheck=p.tagNameCheck),X(p,"attributeNameCheck")&&li(p.attributeNameCheck)&&(ne.attributeNameCheck=p.attributeNameCheck),X(p,"allowCustomizedBuiltInElements")&&typeof p.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=p.allowCustomizedBuiltInElements),Ye&&(Dn=!1),Jt&&(yt=!0),bt&&(te=F({},No),ie=rt(null),bt.html===!0&&(F(te,Mo),F(ie,Io)),bt.svg===!0&&(F(te,gn),F(ie,_n),F(ie,zt)),bt.svgFilters===!0&&(F(te,yn),F(ie,_n),F(ie,zt)),bt.mathMl===!0&&(F(te,bn),F(ie,Oo),F(ie,zt))),Ge.tagCheck=null,Ge.attributeCheck=null,X(l,"ADD_TAGS")&&(typeof l.ADD_TAGS=="function"?Ge.tagCheck=l.ADD_TAGS:he(l.ADD_TAGS)&&(te===Rn&&(te=me(te)),F(te,l.ADD_TAGS,oe))),X(l,"ADD_ATTR")&&(typeof l.ADD_ATTR=="function"?Ge.attributeCheck=l.ADD_ATTR:he(l.ADD_ATTR)&&(ie===Fn&&(ie=me(ie)),F(ie,l.ADD_ATTR,oe))),X(l,"ADD_URI_SAFE_ATTR")&&he(l.ADD_URI_SAFE_ATTR)&&F(xn,l.ADD_URI_SAFE_ATTR,oe),X(l,"FORBID_CONTENTS")&&he(l.FORBID_CONTENTS)&&(Fe===$n&&(Fe=me(Fe)),F(Fe,l.FORBID_CONTENTS,oe)),X(l,"ADD_FORBID_CONTENTS")&&he(l.ADD_FORBID_CONTENTS)&&(Fe===$n&&(Fe=me(Fe)),F(Fe,l.ADD_FORBID_CONTENTS,oe)),Pn&&(te["#text"]=!0),ot&&F(te,["html","head","body"]),te.table&&(F(te,["tbody"]),delete Rt.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw dt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const k=T;T=l.TRUSTED_TYPES_POLICY;try{_=M("")}catch(v){throw T=k,v}}else T===void 0&&l.TRUSTED_TYPES_POLICY!==null&&(T=ts(f,i)),T&&typeof _=="string"&&(_=M(""));(H.uponSanitizeElement.length>0||H.uponSanitizeAttribute.length>0)&&te===Rn&&(te=me(te)),H.uponSanitizeAttribute.length>0&&ie===Fn&&(ie=me(ie)),fe&&fe(l),Et=l},si=F({},[...gn,...yn,...Kl]),di=F({},[...bn,...zl]),Sh=function(l){let p=N(l);(!p||!p.tagName)&&(p={namespaceURI:_t,tagName:"template"});const k=Mt(l.tagName),v=Mt(p.tagName);return jn[l.namespaceURI]?l.namespaceURI===tn?p.namespaceURI===De?k==="svg":p.namespaceURI===en?k==="svg"&&(v==="annotation-xml"||Kn[v]):!!si[k]:l.namespaceURI===en?p.namespaceURI===De?k==="math":p.namespaceURI===tn?k==="math"&&zn[v]:!!di[k]:l.namespaceURI===De?p.namespaceURI===tn&&!zn[v]||p.namespaceURI===en&&!Kn[v]?!1:!di[k]&&(bh[k]||!si[k]):!!(Lt==="application/xhtml+xml"&&jn[l.namespaceURI]):!1},Oe=function(l){lt(n.removed,{element:l});try{N(l).removeChild(l)}catch{I(l)}},at=function(l,p){try{lt(n.removed,{attribute:p.getAttributeNode(l),from:p})}catch{lt(n.removed,{attribute:null,from:p})}if(p.removeAttribute(l),l==="is")if(yt||Jt)try{Oe(p)}catch{}else try{p.setAttribute(l,"")}catch{}},ci=function(l){let p=null,k=null;if(Un)l="<remove></remove>"+l;else{const z=Co(l,/^[\r\n\t ]+/);k=z&&z[0]}Lt==="application/xhtml+xml"&&_t===De&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const v=T?M(l):l;if(_t===De)try{p=new g().parseFromString(v,Lt)}catch{}if(!p||!p.documentElement){p=y.createDocument(_t,"template",null);try{p.documentElement.innerHTML=vn?_:v}catch{}}const L=p.body||p.documentElement;return l&&k&&L.insertBefore(o.createTextNode(k),L.childNodes[0]||null),_t===De?x.call(p,ot?"html":"body")[0]:ot?p.documentElement:L},mi=function(l){return S.call(l.ownerDocument||l,l,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Hn=function(l){var p,k;l.normalize();const v=S.call(l.ownerDocument||l,l,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let L=v.nextNode();for(;L;){let re=L.data;Qe([Z,Ie,pt],ke=>{re=st(re,ke," ")}),L.data=re,L=v.nextNode()}const z=(p=(k=l.querySelectorAll)===null||k===void 0?void 0:k.call(l,"template"))!==null&&p!==void 0?p:[];Qe(Array.from(z),re=>{Tt(re.content)&&Hn(re.content)})},nn=function(l){const p=A?A(l):null;return typeof p!="string"||oe(p)!=="form"?!1:typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||l.attributes!==R(l)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function"||l.nodeType!==C(l)||l.childNodes!==O(l)},Tt=function(l){if(!C||typeof l!="object"||l===null)return!1;try{return C(l)===Re.documentFragment}catch{return!1}},on=function(l){if(!C||typeof l!="object"||l===null)return!1;try{return typeof C(l)=="number"}catch{return!1}};function xe(B,l,p){Qe(B,k=>{k.call(n,l,p,Et)})}const ui=function(l){let p=null;if(xe(H.beforeSanitizeElements,l,null),nn(l))return Oe(l),!0;const k=oe(A?A(l):l.nodeName);if(xe(H.uponSanitizeElement,l,{tagName:k,allowedTags:te}),Ft&&l.hasChildNodes()&&!on(l.firstElementChild)&&de(/<[/\w!]/g,l.innerHTML)&&de(/<[/\w!]/g,l.textContent)||Ft&&l.namespaceURI===De&&k==="style"&&on(l.firstElementChild)||l.nodeType===Re.progressingInstruction||Ft&&l.nodeType===Re.comment&&de(/<[/\w]/g,l.data))return Oe(l),!0;if(Rt[k]||!(Ge.tagCheck instanceof Function&&Ge.tagCheck(k))&&!te[k]){if(!Rt[k]&&hi(k)&&(ne.tagNameCheck instanceof RegExp&&de(ne.tagNameCheck,k)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(k)))return!1;if(Pn&&!Fe[k]){const L=N(l),z=O(l);if(z&&L){const re=z.length;for(let ke=re-1;ke>=0;--ke){const Ve=E(z[ke],!0);L.insertBefore(Ve,b(l))}}}return Oe(l),!0}return(C?C(l):l.nodeType)===Re.element&&!Sh(l)||(k==="noscript"||k==="noembed"||k==="noframes")&&de(/<\/no(script|embed|frames)/i,l.innerHTML)?(Oe(l),!0):(Ye&&l.nodeType===Re.text&&(p=l.textContent,Qe([Z,Ie,pt],L=>{p=st(p,L," ")}),l.textContent!==p&&(lt(n.removed,{element:l.cloneNode()}),l.textContent=p)),xe(H.afterSanitizeElements,l,null),!1)},fi=function(l,p,k){if(Xt[p]||ti&&(p==="id"||p==="name")&&(k in o||k in Th))return!1;const v=ie[p]||Ge.attributeCheck instanceof Function&&Ge.attributeCheck(p,l);if(!(Dn&&!Xt[p]&&de(Bn,p))){if(!(Ja&&de(P,p))){if(!v||Xt[p]){if(!(hi(l)&&(ne.tagNameCheck instanceof RegExp&&de(ne.tagNameCheck,l)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(l))&&(ne.attributeNameCheck instanceof RegExp&&de(ne.attributeNameCheck,p)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(p,l))||p==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&de(ne.tagNameCheck,k)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(k))))return!1}else if(!xn[p]){if(!de(Xa,st(k,gt,""))){if(!((p==="src"||p==="xlink:href"||p==="href")&&l!=="script"&&wo(k,"data:")===0&&ai[l])){if(!(Qa&&!de(J,st(k,gt,"")))){if(k)return!1}}}}}}return!0},Ch=F({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),hi=function(l){return!Ch[Mt(l)]&&de(gh,l)},pi=function(l){xe(H.beforeSanitizeAttributes,l,null);const p=l.attributes;if(!p||nn(l))return;const k={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ie,forceKeepAttr:void 0};let v=p.length;for(;v--;){const L=p[v],z=L.name,re=L.namespaceURI,ke=L.value,Ve=oe(z),Gn=ke;let se=z==="value"?Gn:Ll(Gn);if(k.attrName=Ve,k.attrValue=se,k.keepAttr=!0,k.forceKeepAttr=void 0,xe(H.uponSanitizeAttribute,l,k),se=k.attrValue,ni&&(Ve==="id"||Ve==="name")&&wo(se,oi)!==0&&(at(z,l),se=oi+se),Ft&&de(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,se)){at(z,l);continue}if(Ve==="attributename"&&Co(se,"href")){at(z,l);continue}if(k.forceKeepAttr)continue;if(!k.keepAttr){at(z,l);continue}if(!ei&&de(/\/>/i,se)){at(z,l);continue}Ye&&Qe([Z,Ie,pt],yi=>{se=st(se,yi," ")});const gi=oe(l.nodeName);if(!fi(gi,Ve,se)){at(z,l);continue}if(T&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!re)switch(f.getAttributeType(gi,Ve)){case"TrustedHTML":{se=M(se);break}case"TrustedScriptURL":{se=T.createScriptURL(se);break}}if(se!==Gn)try{re?l.setAttributeNS(re,z,se):l.setAttribute(z,se),nn(l)?Oe(l):So(n.removed)}catch{at(z,l)}}xe(H.afterSanitizeAttributes,l,null)},an=function(l){let p=null;const k=mi(l);for(xe(H.beforeSanitizeShadowDOM,l,null);p=k.nextNode();)if(xe(H.uponSanitizeShadowNode,p,null),ui(p),pi(p),Tt(p.content)&&an(p.content),(C?C(p):p.nodeType)===Re.element){const L=D?D(p):p.shadowRoot;Tt(L)&&(St(L),an(L))}xe(H.afterSanitizeShadowDOM,l,null)},St=function(l){const p=C?C(l):l.nodeType;if(p===Re.element){const L=D?D(l):l.shadowRoot;Tt(L)&&(St(L),an(L))}const k=O?O(l):l.childNodes;if(!k)return;const v=[];Qe(k,L=>{lt(v,L)});for(const L of v)St(L);if(p===Re.element){const L=A?A(l):null;if(typeof L=="string"&&oe(L)==="template"){const z=l.content;Tt(z)&&St(z)}}};return n.sanitize=function(B){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=null,k=null,v=null,L=null;if(vn=!B,vn&&(B="<!-->"),typeof B!="string"&&!on(B)&&(B=vl(B),typeof B!="string"))throw dt("dirty is not a string, aborting");if(!n.isSupported)return B;if(Ln||qn(l),n.removed=[],typeof B=="string"&&(Dt=!1),Dt){const ke=A?A(B):B.nodeName;if(typeof ke=="string"){const Ve=oe(ke);if(!te[Ve]||Rt[Ve])throw dt("root node is forbidden and cannot be sanitized in-place")}if(nn(B))throw dt("root node is clobbered and cannot be sanitized in-place");St(B)}else if(on(B))p=ci("<!---->"),k=p.ownerDocument.importNode(B,!0),k.nodeType===Re.element&&k.nodeName==="BODY"||k.nodeName==="HTML"?p=k:p.appendChild(k),St(k);else{if(!yt&&!Ye&&!ot&&B.indexOf("<")===-1)return T&&Qt?M(B):B;if(p=ci(B),!p)return yt?null:Qt?_:""}p&&Un&&Oe(p.firstChild);const z=mi(Dt?B:p);for(;v=z.nextNode();)ui(v),pi(v),Tt(v.content)&&an(v.content);if(Dt)return Ye&&Hn(B),B;if(yt){if(Ye&&Hn(p),Jt)for(L=V.call(p.ownerDocument);p.firstChild;)L.appendChild(p.firstChild);else L=p;return(ie.shadowroot||ie.shadowrootmode)&&(L=le.call(a,L,!0)),L}let re=ot?p.outerHTML:p.innerHTML;return ot&&te["!doctype"]&&p.ownerDocument&&p.ownerDocument.doctype&&p.ownerDocument.doctype.name&&de(Jl,p.ownerDocument.doctype.name)&&(re="<!DOCTYPE "+p.ownerDocument.doctype.name+`>
|
|
3
|
+
`+re),Ye&&Qe([Z,Ie,pt],ke=>{re=st(re,ke," ")}),T&&Qt?M(re):re},n.setConfig=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qn(B),Ln=!0},n.clearConfig=function(){Et=null,Ln=!1},n.isValidAttribute=function(B,l,p){Et||qn({});const k=oe(B),v=oe(l);return fi(k,v,p)},n.addHook=function(B,l){typeof l=="function"&<(H[B],l)},n.removeHook=function(B,l){if(l!==void 0){const p=Fl(H[B],l);return p===-1?void 0:Dl(H[B],p,1)[0]}return So(H[B])},n.removeHooks=function(B){H[B]=[]},n.removeAllHooks=function(){H=Bo()},n}var ns=Ro();function os(){this.__data__=new Le,this.size=0}function as(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function is(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 Le){var a=o.__data__;if(!At||a.length<ls-1)return a.push([e,n]),this.size=++o.size,this;o=this.__data__=new Ue(a)}return o.set(e,n),this.size=o.size,this}function ct(e){var n=this.__data__=new Le(e);this.size=n.size}ct.prototype.clear=os,ct.prototype.delete=as,ct.prototype.get=is,ct.prototype.has=rs,ct.prototype.set=ss;var qt=function(){try{var e=Ze(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Fo(e,n,o){n=="__proto__"&&qt?qt(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}var ds=Object.prototype,cs=ds.hasOwnProperty;function Do(e,n,o){var a=e[n];(!(cs.call(e,n)&&vt(a,o))||o===void 0&&!(n in e))&&Fo(e,n,o)}function Ht(e,n,o,a){var i=!o;o||(o={});for(var r=-1,s=n.length;++r<s;){var d=n[r],c=void 0;c===void 0&&(c=e[d]),i?Fo(o,d,c):Do(o,d,c)}return o}function ms(e,n){return e&&Ht(n,$t(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=sn(e),o=[];for(var a in e)a=="constructor"&&(n||!hs.call(e,a))||o.push(a);return o}function Gt(e){return Pt(e)?so(e,!0):ps(e)}function gs(e,n){return e&&Ht(n,Gt(n),e)}var Lo=typeof U=="object"&&U&&!U.nodeType&&U,Uo=Lo&&typeof module=="object"&&module&&!module.nodeType&&module,ys=Uo&&Uo.exports===Lo,Po=ys?Te.Buffer:void 0,$o=Po?Po.allocUnsafe:void 0;function bs(e,n){if(n)return e.slice();var o=e.length,a=$o?$o(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 s=e[o];n(s,o,e)&&(r[i++]=s)}return r}function xo(){return[]}var Ts=Object.prototype,Ss=Ts.propertyIsEnumerable,vo=Object.getOwnPropertySymbols,En=vo?function(e){return e==null?[]:(e=Object(e),Es(vo(e),function(n){return Ss.call(e,n)}))}:xo;function Cs(e,n){return Ht(e,En(e),n)}function jo(e,n){for(var o=-1,a=n.length,i=e.length;++o<a;)e[i+o]=n[o];return e}var Ko=co(Object.getPrototypeOf,Object),ws=Object.getOwnPropertySymbols,zo=ws?function(e){for(var n=[];e;)jo(n,En(e)),e=Ko(e);return n}:xo;function ks(e,n){return Ht(e,zo(e),n)}function qo(e,n,o){var a=n(e);return ze(e)?a:jo(a,o(e))}function As(e){return qo(e,$t,En)}function Ms(e){return qo(e,Gt,zo)}var Tn=Ze(Te,"DataView"),Sn=Ze(Te,"Promise"),mt=Ze(Te,"Set"),Cn=Ze(Te,"WeakMap"),Ho="[object Map]",Ns="[object Object]",Go="[object Promise]",Yo="[object Set]",Wo="[object WeakMap]",Zo="[object DataView]",Is=We(Tn),Os=We(At),Vs=We(Sn),Bs=We(mt),Rs=We(Cn),Pe=je;(Tn&&Pe(new Tn(new ArrayBuffer(1)))!=Zo||At&&Pe(new At)!=Ho||Sn&&Pe(Sn.resolve())!=Go||mt&&Pe(new mt)!=Yo||Cn&&Pe(new Cn)!=Wo)&&(Pe=function(e){var n=je(e),o=n==Ns?e.constructor:void 0,a=o?We(o):"";if(a)switch(a){case Is:return Zo;case Os:return Ho;case Vs:return Go;case Bs:return Yo;case Rs:return Wo}return n});var Fs=Object.prototype,Ds=Fs.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 Xo=Te.Uint8Array;function wn(e){var n=new e.constructor(e.byteLength);return new Xo(n).set(new Xo(e)),n}function Us(e,n){var o=n?wn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var Ps=/\w*$/;function $s(e){var n=new e.constructor(e.source,Ps.exec(e));return n.lastIndex=e.lastIndex,n}var Jo=ve?ve.prototype:void 0,Qo=Jo?Jo.valueOf:void 0;function xs(e){return Qo?Object(Qo.call(e)):{}}function vs(e,n){var o=n?wn(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]",ad="[object Uint8ClampedArray]",id="[object Uint16Array]",rd="[object Uint32Array]";function ld(e,n,o){var a=e.constructor;switch(n){case Zs:return wn(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 ad:case id:case rd:return vs(e,o);case zs:return new a;case qs:case Ys:return new a(e);case Hs:return $s(e);case Gs:return new a;case Ws:return xs(e)}}var ea=Object.create,sd=function(){function e(){}return function(n){if(!ye(n))return{};if(ea)return ea(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}}();function dd(e){return typeof e.constructor=="function"&&!sn(e)?sd(Ko(e)):{}}var cd="[object Map]";function md(e){return Ke(e)&&Pe(e)==cd}var ta=it&&it.isMap,ud=ta?rn(ta):md,fd="[object Set]";function hd(e){return Ke(e)&&Pe(e)==fd}var na=it&&it.isSet,pd=na?rn(na):hd,gd=1,yd=2,bd=4,oa="[object Arguments]",_d="[object Array]",Ed="[object Boolean]",Td="[object Date]",Sd="[object Error]",aa="[object Function]",Cd="[object GeneratorFunction]",wd="[object Map]",kd="[object Number]",ia="[object Object]",Ad="[object RegExp]",Md="[object Set]",Nd="[object String]",Id="[object Symbol]",Od="[object WeakMap]",Vd="[object ArrayBuffer]",Bd="[object DataView]",Rd="[object Float32Array]",Fd="[object Float64Array]",Dd="[object Int8Array]",Ld="[object Int16Array]",Ud="[object Int32Array]",Pd="[object Uint8Array]",$d="[object Uint8ClampedArray]",xd="[object Uint16Array]",vd="[object Uint32Array]",q={};q[oa]=q[_d]=q[Vd]=q[Bd]=q[Ed]=q[Td]=q[Rd]=q[Fd]=q[Dd]=q[Ld]=q[Ud]=q[wd]=q[kd]=q[ia]=q[Ad]=q[Md]=q[Nd]=q[Id]=q[Pd]=q[$d]=q[xd]=q[vd]=!0,q[Sd]=q[aa]=q[Od]=!1;function It(e,n,o,a,i,r){var s,d=n&gd,c=n&yd,m=n&bd;if(s!==void 0)return s;if(!ye(e))return e;var g=ze(e);if(g){if(s=Ls(e),!d)return _s(e,s)}else{var f=Pe(e),h=f==aa||f==Cd;if(oo(e))return bs(e,d);if(f==ia||f==oa||h&&!i){if(s=c||h?{}:dd(e),!d)return c?ks(e,gs(s,e)):Cs(e,ms(s,e))}else{if(!q[f])return i?e:{};s=ld(e,f,d)}}r||(r=new ct);var E=r.get(e);if(E)return E;r.set(e,s),pd(e)?e.forEach(function(O){s.add(It(O,n,o,O,e,r))}):ud(e)&&e.forEach(function(O,N){s.set(N,It(O,n,o,N,e,r))});var I=m?c?Ms:As:c?Gt:$t,b=g?void 0:I(e);return Yn(b||e,function(O,N){b&&(N=O,O=e[N]),Do(s,N,It(O,n,o,N,e,r))}),s}var jd=1,Kd=4;function $e(e){return It(e,jd|Kd)}const kn=(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,""),ra=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var zd="[object String]";function et(e){return typeof e=="string"||!ze(e)&&Ke(e)&&je(e)==zd}const la={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,o={[j(this.options,"validationErrorClass","error")]:n,[j(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)?ue(e.styleClasses,a=>o[a]=!0):et(e.styleClasses)&&(o[e.styleClasses]=!0),Q(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 K(e.disabled)?e.disabled.call(this,this.model,e,this):Q(e.disabled)?!1:e.disabled},fieldReadonly(e){return K(e.readonly)?e.readonly.call(this,this.model,e,this):Q(e.readonly)?!1:e.readonly},fieldFeatured(e){return K(e.featured)?e.featured.call(this,this.model,e,this):Q(e.featured)?!1:e.featured},fieldRequired(e){return K(e.required)?e.required.call(this,this.model,e,this):Q(e.required)?!1:e.required}}};var An=function(){return Te.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 sa=NaN,Wd=/^[-+]0x[0-9a-f]+$/i,Zd=/^0b[01]+$/i,Xd=/^0o[0-7]+$/i,Jd=parseInt;function Mn(e){if(typeof e=="number")return e;if(xt(e))return sa;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)?sa:+e}var Qd="Expected a function",ec=Math.max,tc=Math.min;function ut(e,n,o){var a,i,r,s,d,c,m=0,g=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Qd);n=Mn(n)||0,ye(o)&&(g=!!o.leading,f="maxWait"in o,r=f?ec(Mn(o.maxWait)||0,n):r,h="trailing"in o?!!o.trailing:h);function E(T){var _=a,w=i;return a=i=void 0,m=T,s=e.apply(w,_),s}function I(T){return m=T,d=setTimeout(N,n),g?E(T):s}function b(T){var _=T-c,w=T-m,M=n-_;return f?tc(M,r-w):M}function O(T){var _=T-c,w=T-m;return c===void 0||_>=n||_<0||f&&w>=r}function N(){var T=An();if(O(T))return D(T);d=setTimeout(N,b(T))}function D(T){return d=void 0,h&&a?E(T):(a=i=void 0,s)}function R(){d!==void 0&&clearTimeout(d),m=0,a=c=i=d=void 0}function C(){return d===void 0?s:D(An())}function A(){var T=An(),_=O(T);if(a=arguments,i=this,c=T,_){if(d===void 0)return I(c);if(f)return clearTimeout(d),d=setTimeout(N,n),E(c)}return d===void 0&&(d=setTimeout(N,n)),s}return A.cancel=R,A.flush=C,A}var nc="__lodash_hash_undefined__";function oc(e){return this.__data__.set(e,nc),this}function ac(e){return this.__data__.has(e)}function Yt(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new Ue;++n<o;)this.add(e[n])}Yt.prototype.add=Yt.prototype.push=oc,Yt.prototype.has=ac;function ic(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):ic(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 da(e){var n=-1,o=Array(e.size);return e.forEach(function(a){o[++n]=a}),o}var uc=1/0,fc=mt&&1/da(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,s=!0,d=[],c=d;if(r>=hc){var m=fc(e);if(m)return da(m);s=!1,i=cc,c=new Yt}else c=d;e:for(;++a<r;){var g=e[a],f=g;if(g=g!==0?g:0,s&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;d.push(g)}else i(c,f,o)||(c!==d&&c.push(f),d.push(g))}return d}function ca(e){return e&&e.length?pc(e):[]}var gc=0;function ma(e){var n=++gc;return po(e)+n}var ua=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,qe="\\d\\d?",He="\\d\\d",yc="\\d{3}",bc="\\d{4}",Ot="[^\\s]+",fa=/\[([^]*?)\]/gm;function ha(e,n){for(var o=[],a=0,i=e.length;a<i;a++)o.push(e[a].substr(0,n));return o}var pa=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 tt(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 s in r)e[s]=r[s]}return e}var ga=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ya=["January","February","March","April","May","June","July","August","September","October","November","December"],_c=ha(ya,3),Ec=ha(ga,3),ba={dayNamesShort:Ec,dayNames:ga,monthNamesShort:_c,monthNames:ya,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},Wt=tt({},ba),Tc=function(e){return Wt=tt(Wt,e)},_a=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},pe=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 pe(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return pe(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 pe(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 pe(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return pe(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return pe(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return pe(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return pe(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return pe(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return pe(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return pe(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?"-":"+")+pe(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+pe(Math.floor(Math.abs(n)/60),2)+":"+pe(Math.abs(n)%60,2)}},Ea=function(e){return+e-1},Ta=[null,qe],Sa=[null,Ot],Ca=["isPm",Ot,function(e,n){var o=e.toLowerCase();return o===n.amPm[0]?0:o===n.amPm[1]?1:null}],wa=["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}],Cc={D:["day",qe],DD:["day",He],Do:["day",qe+Ot,function(e){return parseInt(e,10)}],M:["month",qe,Ea],MM:["month",He,Ea],YY:["year",He,function(e){var n=new Date,o=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?o-1:o)+e)}],h:["hour",qe,void 0,"isPm"],hh:["hour",He,void 0,"isPm"],H:["hour",qe],HH:["hour",He],m:["minute",qe],mm:["minute",He],s:["second",qe],ss:["second",He],YYYY:["year",bc],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",He,function(e){return+e*10}],SSS:["millisecond",yc],d:Ta,dd:Ta,ddd:Sa,dddd:Sa,MMM:["month",Ot,pa("monthNamesShort")],MMMM:["month",Ot,pa("monthNames")],a:Ca,A:Ca,ZZ:wa,Z:wa},Zt={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 tt(Zt,e)},kc=function(e,n,o){if(n===void 0&&(n=Zt.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=Zt[n]||n;var a=[];n=n.replace(fa,function(r,s){return a.push(s),"@@@"});var i=tt(tt({},Wt),o);return n=n.replace(ua,function(r){return Sc[r](e,i)}),n.replace(/@@@/g,function(){return a.shift()})};function Ac(e,n,o){if(o===void 0&&(o={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=Zt[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=[],s=[],d=n.replace(fa,function(C,A){return s.push(_a(A)),"@@@"}),c={},m={};d=_a(d).replace(ua,function(C){var A=Cc[C],T=A[0],_=A[1],w=A[3];if(c[T])throw new Error("Invalid format. "+T+" specified twice in format");return c[T]=!0,w&&(m[w]=!0),r.push(A),"("+_+")"}),Object.keys(m).forEach(function(C){if(!c[C])throw new Error("Invalid format. "+C+" is required in specified format")}),d=d.replace(/@@@/g,function(){return s.shift()});var g=e.match(new RegExp(d,"i"));if(!g)return null;for(var f=tt(tt({},Wt),o),h=1;h<g.length;h++){var E=r[h-1],I=E[0],b=E[2],O=b?b(g[h],f):+g[h];if(O==null)return null;i[I]=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 N;if(i.timezoneOffset==null){N=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var D=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],h=0,R=D.length;h<R;h++)if(c[D[h][0]]&&i[D[h][0]]!==N[D[h][1]]())return null}else if(N=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 N}var ft={format:kc,parse:Ac,defaultI18n:ba,setGlobalDateI18n:Tc,setGlobalDateMasks:wc};function Mc(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 ka=Math.max;function Nc(e,n,o){return n=ka(n===void 0?e.length-1:n,0),function(){for(var a=arguments,i=-1,r=ka(a.length-n,0),s=Array(r);++i<r;)s[i]=a[n+i];i=-1;for(var d=Array(n+1);++i<n;)d[i]=a[i];return d[n]=o(s),Mc(e,this,d)}}function Ic(e){return function(){return e}}var Oc=qt?function(e,n){return qt(e,"toString",{configurable:!0,enumerable:!1,value:Ic(n),writable:!0})}:dn,Vc=800,Bc=16,Rc=Date.now;function Fc(e){var n=0,o=0;return function(){var a=Rc(),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=Fc(Oc);function Lc(e,n){return Dc(Nc(e,n,dn),e+"")}function Uc(e,n,o){if(!ye(o))return!1;var a=typeof n;return(a=="number"?Pt(o)&&ao(n,o.length):a=="string"&&n in o)?vt(o[n],e):!1}var Aa=Object.prototype,Pc=Aa.hasOwnProperty,$c=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],s=Gt(r),d=-1,c=s.length;++d<c;){var m=s[d],g=e[m];(g===void 0||vt(g,Aa[m])&&!Pc.call(e,m))&&(e[m]=r[m])}return e}),xc=Te.isFinite;function Ma(e){return typeof e=="number"&&xc(e)}var Na=1/0,vc=17976931348623157e292;function jc(e){if(!e)return e===0?e:0;if(e=Mn(e),e===Na||e===-Na){var n=e<0?-1:1;return n*vc}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 Nn(e){return typeof e=="number"||Ke(e)&&je(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:ee}=ge.createI18n("en-us",Ee),ce={fieldIsRequired:ee("validators.field_is_required"),invalidFormat:ee("validators.invalid_format"),numberTooSmall:ee("validators.number_too_small"),numberTooBig:ee("validators.number_too_large"),invalidNumber:ee("validators.invalid_number"),invalidInteger:ee("validators.invalid_integer"),textTooSmall:ee("validators.text_too_short"),textTooBig:ee("validators.text_too_long"),thisNotText:ee("validators.this_not_text"),thisNotArray:ee("validators.this_not_array"),selectMinItems:ee("validators.select_min_items"),selectMaxItems:ee("validators.select_max_items"),invalidDate:ee("validators.invalid_date"),dateIsEarly:ee("validators.date_is_early"),dateIsLate:ee("validators.date_is_late"),invalidEmail:ee("validators.invalid_email"),invalidURL:ee("validators.invalid_url"),invalidCard:ee("validators.invalid_card"),invalidCardNumber:ee("validators.invalid_card_number"),invalidTextContainNumber:ee("validators.invalid_text_contain_number"),invalidTextContainSpec:ee("validators.invalid_tex_contain_spec")},Y=(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},Ce=(e,n,o=ce)=>Q(e)||e===""?n?[Y(o.fieldIsRequired)]:[]:null,nt={required:(e,n,o,a=ce)=>Ce(e,n.required,a)||[],number:(e,n,o,a=ce)=>{let i=Ce(e,n.required,a);return i!=null||(i=[],Ma(e)?(!Q(n.min)&&e<n.min,(a=ce)&&i.push(Y(a.numberTooSmall,n.min)),!Q(n.max)&&e>n.max,(a=ce)&&i.push(Y(a.numberTooBig,n.max))):i.push(Y(a.invalidNumber))),i},integer:(e,n,o,a=ce)=>{let i=Ce(e,n.required,a);return i!=null||(i=[],i.concat(nt.number(e,n,o,a)),zc(e)||i.push(Y(a.invalidInteger))),i},double:(e,n,o,a=ce)=>{const i=Ce(e,n.required,a);return i??(!Nn(e)||isNaN(e)?[Y(a.invalidNumber)]:[])},string:(e,n,o,a=ce)=>{let i=Ce(e,n.required,a);return i!=null||(i=[],et(e)?(!Q(n.min)&&e.length<n.min&&i.push(Y(a.textTooSmall,e.length,n.min)),!Q(n.max)&&e.length>n.max&&i.push(Y(a.textTooBig,e.length,n.max))):i.push(Y(a.thisNotText))),i},array:(e,n,o,a=ce)=>{if(n.required){if(!Array.isArray(e))return[Y(a.thisNotArray)];if(e.length===0)return[Y(a.fieldIsRequired)]}if(!Q(e)){if(!Q(n.min)&&e.length<n.min)return[Y(a.selectMinItems,n.min)];if(!Q(n.max)&&e.length>n.max)return[Y(a.selectMaxItems,n.max)]}return[]},date:(e,n,o,a=ce)=>{let i=Ce(e,n.required,a);if(i!=null)return i;i=[];const r=new Date(e);if(isNaN(r.getDate()))return[Y(a.invalidDate)];if(!Q(n.min)){const s=new Date(n.min);r.valueOf()<s.valueOf()&&i.push(Y(a.dateIsEarly,ft.format(r),ft.format(s)))}if(!Q(n.max)){const s=new Date(n.max);r.valueOf()>s.valueOf()&&i.push(Y(a.dateIsLate,ft.format(r),ft.format(s)))}return i},regexp:(e,n,o,a=ce)=>{const i=Ce(e,n.required,a);return i??(!Q(n.pattern)&&!new RegExp(n.pattern).test(e)?[Y(a.invalidFormat)]:[])},email:(e,n,o,a=ce)=>{const i=Ce(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)?[]:[Y(a.invalidEmail)])},url:(e,n,o,a=ce)=>{const i=Ce(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)?[]:[Y(a.invalidURL)])},creditCard:(e,n,o,a=ce)=>{const i=Ce(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})$/,s=e.replace(/[^0-9]+/g,"");if(!r.test(s))return[Y(a.invalidCard)];let d=0,c,m,g;for(let f=s.length-1;f>=0;f--)c=s.substring(f,f+1),m=parseInt(c,10),g?(m*=2,m>=10?d+=m%10+1:d+=m):d+=m,g=!g;return d%10===0&&s?[]:[Y(a.invalidCardNumber)]},alpha:(e,n,o,a=ce)=>{const i=Ce(e,n.required,a);return i??(/^[a-zA-Z]*$/.test(e)?[]:[Y(a.invalidTextContainNumber)])},alphaNumeric:(e,n,o,a=ce)=>{const i=Ce(e,n.required,a);return i??(/^[a-zA-Z0-9]*$/.test(e)?[]:[Y(a.invalidTextContainSpec)])}};Object.keys(nt).forEach(e=>{const n=nt[e];K(n)&&(n.locale=o=>(a,i,r)=>n(a,i,r,$c(o,ce)))});function Ia(e){return et(e)?nt[e]!=null?nt[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function In(e,n,o){let a=j(o.context,"schema.attributes",{});const i=n.value||"input";et(i)&&(a=j(a,i)||a),ue(a,(r,s)=>{e.setAttribute(s,r)})}const Ne={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:In,updated:In,componentUpdated:In}},computed:{value:{cache:!1,get(){let e;return K(j(this.schema,"get"))?e=this.schema.get(this.model):e=j(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),K(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=j(this.formOptions,"validateAsync",!1);let o=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const i=[];Array.isArray(this.schema.validator)?ue(this.schema.validator,r=>{i.push(Ia(r).bind(this))}):i.push(Ia(this.schema.validator).bind(this)),ue(i,r=>{if(n)o.push(r(this.value,this.schema,this.model));else{const s=r(this.value,this.schema,this.model);s&&K(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=i=>{let r=[];ue(ca(i),d=>{Array.isArray(d)&&d.length>0?r=r.concat(d):et(d)&&r.push(d)}),K(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,r,this.schema);const s=r.length===0;return e||this.$emit("validated",s,r,this),this.errors=r,r};return n?Promise.all(o).then(a):a(o)},debouncedValidate(){K(this.debouncedValidateFunc)||(this.debouncedValidateFunc=ut(this.validate.bind(this),j(this.schema,"validateDebounceTime",j(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let o=!1;K(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),K(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),j(this.formOptions,"validateAfterChanged",!1)===!0&&(j(this.schema,"validateDebounceTime",j(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 s=i.length;for(;r<s;){const d=i[r];if(r<s-1)a[d]!==void 0||(a[d]={}),a=a[d];else{a[d]=n;return}++r}},getFieldID(e,n=!1){const o=j(this.formOptions,"fieldIdPrefix","");return kn(e,o)+(n?"-"+ma():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return j(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},Hc=Object.freeze(Object.defineProperty({__proto__:null,default:Ne},Symbol.toStringTag,{value:"Module"})),$=(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=$(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",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(W,{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"},Oa=$(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]=s=>o.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ae.TrashIcon))]),_:1})])}}}),[["__scopeId","data-v-a8366ec5"]]),Xc={class:"array-item-wrapper"},Jc={class:"array-item"},Qc={class:"array-item-after"},Va=$(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(Ae.TrashIcon))]),_:1})]),t.createElementVNode("div",Qc,[t.renderSlot(n.$slots,"after",{},void 0,!0)])])}}}),[["__scopeId","data-v-e6b6837c"]]),em={class:"multi-item-wrapper"},Ba=$(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 Ra(e){return It(e,tm)}const nm="#6c7489",om="12px",am="20px",im=["data-testid","data-testlabel"],rm={class:"item-label"},lm={class:"autosuggest__results_message"},sm=$(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]=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:i[1]||(i[1]=s=>a.$emit("change",s)),onQueryChange:i[2]||(i[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,im)],!0)]),"selected-item-template":t.withCtx(({item:s})=>[t.renderSlot(a.$slots,"selected-item",{item:s},()=>[t.createElementVNode("span",rm,t.toDisplayString(s.label),1)],!0)]),empty:t.withCtx(()=>[t.createElementVNode("div",lm,[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"]]),dm="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",On=e=>e?e.length===36&&new RegExp(`^${dm}$`).test(e):!1,cm={class:"selected-entity-item"},mm={class:"selected-entity-label"},um={class:"entity-suggestion-item"},fm={class:"entity-label"},hm={class:"entity-id"},pm=500,gm=50,ym=1e3,Fa=$(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(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:ym},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:[]}})),i=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},r=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(""),g=t.ref([]),f=t.ref([]),h=t.ref([]),{t:E}=ge.createI18n("en-us",Ee),I=t.ref(null);let b=null;const O=async(u,y)=>{if(!e.fieldDisabled){clearTimeout(b),b=setTimeout(()=>{d.value=!0},1500);try{const S=await u();f.value=S,g.value=f.value.map(r)}catch(S){if(y!=null&&y.aborted)return;if(g.value=[],bi.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(b),d.value=!1}}},N=ut(u=>{if(u=u||"",m.value=u,!u.trim()&&!c.value){g.value=_(h.value);return}I.value&&I.value.abort();const y=new AbortController;if(I.value=y,c.value){M(u);return}A(u,y)},pm,{leading:!0}),D=async(u,y)=>await o(u,y),R=async()=>{const{data:{data:u,next:y,offset:S}}=await a(gm);return(!y||!S)&&(c.value=!0),f.value=u,h.value=u.map(V=>({...r(V),group:E("fields.auto_suggest.recently_created",{entity:e.entity})})),u},C=async u=>[await i(u)],A=(u,y)=>{On(u)&&e.allowUuidSearch?O(async()=>await C(u)):O(async()=>await D(u,y.signal),y.signal)},T=u=>{let y=[];y=_(h.value),u!=null&&u.trim()?g.value=y.filter(S=>e.fields.some(V=>(S[V]||"").includes(u))):g.value=y},_=u=>e.selectedItem?u.some(y=>y.value===e.selectedItem.value)?u:[e.selectedItem,...u]:u,w=u=>{g.value=h.value.filter(y=>y.id===u)},M=u=>{On(u)&&e.allowUuidSearch?w(u):T(u)};return t.onMounted(async()=>{await O(R);const u=t.watch(()=>e.selectedItem,y=>{y&&(g.value=_(h.value)),u()});g.value=_(h.value)}),(u,y)=>(t.openBlock(),t.createBlock(sm,{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:g.value,onChange:y[0]||(y[0]=S=>u.$emit("change",S)),onQueryChange:t.unref(N)},{before:t.withCtx(()=>[t.renderSlot(u.$slots,"before",{},()=>[t.createVNode(t.unref(Ae.SearchIcon),{color:t.unref(nm),size:t.unref(am)},null,8,["color","size"])],!0)]),"selected-item":t.withCtx(({item:S})=>[t.renderSlot(u.$slots,"selected-item",{item:S},()=>[t.createElementVNode("span",cm,[t.createElementVNode("span",mm,t.toDisplayString(S.label??S.id),1)])],!0)]),item:t.withCtx(({item:S})=>[t.renderSlot(u.$slots,"item",{item:S},()=>[t.createElementVNode("div",um,[t.createElementVNode("span",fm,t.toDisplayString(S.label??t.unref(yo)),1),t.createElementVNode("span",hm,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 Da(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 bm={components:{FieldScopedEntitySelect:Fa},mixins:[Ne],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 Da(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[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 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[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 _m(e,n,o,a,i,r){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: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 La=$(bm,[["render",_m],["__scopeId","data-v-9ab50e80"]]),Vn=50,Em={mixins:[Ne],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 Da(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[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 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=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;On(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<Vn;){const a=await this[be].getAll(this.entity,{size:Vn,offset:o,...e});if(n.push(...a.data.data),o=a.data.offset,!o)break}return n.slice(0,Vn)},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}}},Tm=["data-testid","data-testlabel"],Sm=["data-testid"],Cm={class:"autosuggest__results_message"};function wm(e,n,o,a,i,r){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:r.scope})},{default:t.withCtx(()=>[t.createVNode(s,{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,Tm),(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,Sm))),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 Ua=$(Em,[["render",wm],["__scopeId","data-v-433129a3"]]);function km(e){const n=t.ref([]),o=t.ref(null),a=b=>et(b)?nt[b]!=null?nt[b]:(console.warn(`'${b}' is not a validator function!`),null):b,i=t.computed({get(){var O,N;let b;return K(j(e.schema,"get"))?b=e.schema.get((O=e.model)==null?void 0:O.value):b=j((N=e.model)==null?void 0:N.value,e.schema.model),E(b)},set(b){const O=i;b=I(b),K(b)?b(b,O):d(b,O)}}),r=b=>{var R;c();const O=j(e.formOptions,"validateAsync",!1);let N=[];if(e.schema.readonly!==!0&&e.disabled!==!0){const C=[],A=(R=e.schema)==null?void 0:R.validator;A&&(Array.isArray(A)?ue(A,T=>{C.push(a(T))}):C.push(a(A))),K(e.externalValidator)&&C.push(e.externalValidator),ue(C,T=>{var _,w;if(O)N.push(T(i.value,e.schema,(_=e.model)==null?void 0:_.value));else{const M=T(i.value,e.schema,(w=e.model)==null?void 0:w.value);M&&K(M.then)?M.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})}):M&&(N=N.concat(M))}})}const D=C=>{var T,_;let A=[];if(ue(ca(C),w=>{Array.isArray(w)&&w.length>0?A=A.concat(w):et(w)&&A.push(w)}),K((T=e.schema)==null?void 0:T.onValidated)&&e.schema.onValidated((_=e.model)==null?void 0:_.value,A,e.schema),!b){const w=A.length===0;e.emitValidated&&e.emitValidated({isValid:w,errors:A,field:e.schema})}return C=A,A};return O?Promise.all(N).then(D):D(N)},s=()=>{K(o.value)?o.value():o.value=ut(r,j(e.schema,"validateDebounceTime",j(e.formOptions,"validateDebounceTime",500)))},d=(b,O)=>{var D,R,C;let N=!1;K(e.schema.set)?(e.schema.set((D=e.model)==null?void 0:D.value,b),N=!0):e.schema.model&&(m(e.schema.model,b),N=!0),N&&(e.emitModelUpdated&&((R=e.model)!=null&&R.value)&&e.emitModelUpdated({value:b,model:e.schema.model}),K(e.schema.onChanged)&&e.schema.onChanged((C=e.model)==null?void 0:C.value,b,O,e.schema),j(e.formOptions,"validateAfterChanged",!1)===!0&&(j(e.schema,"validateDebounceTime",j(e.formOptions,"validateDebounceTime",0))>0?s():r()))},c=()=>{n.value.splice(0)},m=(b,O)=>{var T;let N=b.replace(/\[(\w+)\]/g,".$1");N=N.replace(/^\./,"");let D=((T=e.model)==null?void 0:T.value)||{},R=0;const C=N.split("."),A=C.length;for(;R<A;){const _=C[R];if(R<A-1)D[_]!==void 0||(D[_]={}),D=D[_];else{D[_]=O;return}++R}},g=(b,O=!1)=>{const N=j(e.formOptions,"fieldIdPrefix","");return kn(b,N)+(O?"-"+ma():"")},f=b=>`${g(b)}-label`,h=()=>j(e.schema,"fieldClasses",[]),E=b=>e.formatValueToField&&typeof e.formatValueToField=="function"?e.formatValueToField(b):b,I=b=>e.formatValueToModel&&typeof e.formatValueToModel=="function"?e.formatValueToModel(b):b;return{value:i,clearValidationErrors:c,getFieldID:g,getLabelId:f,getFieldClasses:h,updateModelValue:d}}function Am(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 Mm(e,n){const o=new RegExp("(?<=config-redis-).*"),a=/Config\.Redis.*/;return n.filter(r=>{const s=r.model.match(o);return s&&!Object.keys(e).includes(s[0])}).map(r=>{const s=r.label.match(a);return{label:s?s[0]:r.label,key:r.model,value:"N/A",type:"text"}})}const we={useAbstractFields:km,useRedisPartial:Am,useRedisNonStandardFields:Mm},Nm={class:"form-field-wrapper"},Pa=$(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),s=t.inject(_e,void 0),{updateModelValue:d,getFieldID:c,clearValidationErrors:m,value:g}=we.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:R=>{i("modelUpdated",R.value,R.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{var C,A;const R=(C=a.schema)==null?void 0:C.inputType.toLowerCase();if(R==="number"&&((A=a.schema)==null?void 0:A.referenceable)===!0)return"text";switch(R){case"string":return"text";case"datetime":return"datetime-local";default:return R||"text"}}),h={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},E=(R,C)=>{var w,M;let A=R;const T=h[f.value]||"",_=ft.parse(R,T);_&&((w=a.schema)!=null&&w.format?A=ft.format(_,(M=a.schema)==null?void 0:M.format):A=_.valueOf()),d(A,C)},I=(R,C)=>{Nn(R)||(R=NaN),d(R,C)},b=R=>{let C=R;switch(a.schema.inputType){case"number":case"range":Ma(parseFloat(R))&&(C=parseFloat(R));break}g.value=C,d(C,R)},O=R=>{g.value=R,d(R,R)},N=t.ref(null),D=()=>{var R;K(N.value)&&((R=N.value)==null||R.flush())};return t.onMounted(()=>{switch(f.value){case"number":case"range":N.value=ut((R,C)=>{I(R,C)},parseInt(j(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":N.value=ut((R,C)=>{E(R,C)},parseInt(j(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.")}),(R,C)=>{const A=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Nm,[t.createVNode(A,t.mergeProps(R.$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(g):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(g),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:D,"onUpdate:modelValue":b}),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:O,value:t.unref(g)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-c9bb165e"]]),Im={name:"FieldMetric",components:{AddIcon:Ae.AddIcon,TrashIcon:Ae.TrashIcon},mixins:[Ne],emits:["remove-item"],data(){return{contentVisible:!1}}},Om={key:0,class:"content"};function Vm(e,n,o,a,i,r){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: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(s,{class:"metric-add-icon"})]),t.createVNode(t.Transition,{name:"slide-fade"},{default:t.withCtx(()=>[i.contentVisible?(t.openBlock(),t.createElementBlock("div",Om,[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 $a=$(Im,[["render",Vm]]),Bm={class:"field-object-container"},Rm={key:1},Fm=["id"],Dm={key:0},Lm=["onUpdate:modelValue"],Um={key:1},Pm=["onUpdate:modelValue"],$m={key:2},xm=["onUpdate:modelValue"],vm=["onClick"],xa=$(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",Bm,[n.schema.schema?(t.openBlock(),t.createBlock(W,{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",Rm,[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",Dm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[r]=s,type:"text"},null,8,Lm),[[t.vModelText,n.value[r]]])])):t.createCommentVNode("",!0),n.keyTypes[r]==="boolean"?(t.openBlock(),t.createElementBlock("td",Um,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[r]=s,type:"checkbox"},null,8,Pm),[[t.vModelCheckbox,n.value[r]]])])):t.createCommentVNode("",!0),n.keyTypes[r]==="number"?(t.openBlock(),t.createElementBlock("td",$m,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[r]=s,type:"number"},null,8,xm),[[t.vModelText,n.value[r]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:s=>n.removeElement(r)},null,8,vm)])]))),128))],10,Fm),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"]]),jm=["id"],Km=["data-testid"],zm={class:"item-wrapper"},qm={class:"index-wrapper"},Hm={key:0},Gm={key:1},Ym=["onUpdate:modelValue","placeholder","type","onInput"],Wm={key:0,class:"hint"},Zm={class:"input-item"},Xm=["placeholder"],Jm={key:0,class:"hint"},va=$(Object.assign({mixins:[Ne],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(g=>g.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",zm,[t.createElementVNode("div",qm,[t.createElementVNode("strong",null,t.toDisplayString(r),1),t.createElementVNode("div",null,[t.createVNode(a,{appearance:"tertiary",class:"delete",icon:"",type:"button",onClick:s=>n.removeElement(r)},{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",Hm,[t.createVNode(W,{model:n.transformedModel[r],options:{helpAsHtml:!0},schema:n.subSchema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",Gm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":s=>n.value[r]=s,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:n.valueInputType,onInput:s=>n.updateModel(n.value[r],n.model[n.schema.model])},null,40,Ym),[[t.vModelDynamic,n.value[r]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",Wm,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[r]=s,value:n.value[r]},null,8,["schema","update","value"]))])),o[2]||(o[2]=t.createElementVNode("hr",{class:"wide-divider"},null,-1))])])],8,Km))),128)),t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper",{indent:n.hasObjectKeys}])},[t.createElementVNode("div",Zm,[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,Xm),[[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",Jm,t.toDisplayString(n.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,jm)}}}),[["__scopeId","data-v-0faeec4d"]]),Qm={class:"radio-selection-group"},ja=$(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:s,value:d,clearValidationErrors:c}=we.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:g=>{i("modelUpdated",g.value,g.model)}});n({clearValidationErrors:c});const m=g=>{let f=g;typeof g=="string"&&(f=g.split(","),a.schema.array||(f=f.toString())),s(f,g)};return(g,f)=>{const h=t.resolveComponent("KRadio");return t.openBlock(),t.createElementBlock("div",Qm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(E,I)=>(t.openBlock(),t.createBlock(h,{id:e.schema.name+"-"+I,key:E.value,modelValue:t.unref(d),"onUpdate:modelValue":f[0]||(f[0]=b=>t.isRef(d)?d.value=b: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"]]),Ka=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||{}),s=b=>Q(b)?null:b,d=t.toRefs(a),{getFieldID:c,clearValidationErrors:m,value:g}=we.useAbstractFields({model:d.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:s,emitModelUpdated:b=>{i("modelUpdated",b.value,b.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{const b=a.schema.values;return h(typeof b=="function"?b.apply(this,[a.model,a.schema]):b)}),h=b=>{const O=[];return b.forEach(N=>{O.push({label:I(N),value:E(N),disabled:typeof N=="object"&&N.disabled||void 0,group:typeof N=="object"&&String(N.group||"").toUpperCase()||void 0})}),O},E=b=>{if(ye(b)){if(r.value&&typeof r.value.value<"u")return b[r.value.value];if(typeof b.id<"u")return String(b.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 b},I=b=>{if(ye(b)){if(r.value&&typeof r.value.name<"u")return b[r.value.name];if(typeof b.name<"u")return String(b.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(b)};return(b,O)=>{const N=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(N,{id:t.unref(c)(e.schema),modelValue:t.unref(g),"onUpdate:modelValue":O[0]||(O[0]=D=>t.isRef(g)?g.value=D: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: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"])}}}),eu={class:"field-string-array"},za=$(t.defineComponent({__name:"FieldStringArray",props:{formOptions:{},model:{},schema:{}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=o,{updateModelValue:i,getFieldID:r,getLabelId:s,clearValidationErrors:d,value:c}=we.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 g(E){return Array.isArray(E)?E.map(I=>String(I).trim()).filter(Boolean).join(", "):""}function f(E){return E?E.trim().split(",").map(I=>I.trim()).filter(Boolean):[]}function h(E){m.value=E;const I=f(E);i(I,c.value)}return t.watch(c,E=>{const I=E?g(E):"";g(f(m.value))!==I&&(m.value=I)},{immediate:!0}),(E,I)=>{const b=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",eu,[t.createVNode(b,t.mergeProps(E.$attrs,{id:t.unref(r)(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"]]),tu={name:"FieldArray",components:{FieldArrayItem:Va,FieldArrayMultiItem:Ba,FieldSelect:Ka,FieldMetric:$a,FieldObject:xa,FieldObjectAdvanced:va,FieldAutoSuggest:La,FieldAutoSuggestLegacy:Ua,FieldRadio:ja,FieldArrayCardContainer:Oa,FieldInput:Pa,FieldStringArray:za,TrashIcon:Ae.TrashIcon},mixins:[Ne],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,s;let a;return n&&(a=JSON.parse(JSON.stringify(n)),(s=(r=(i=a.schema)==null?void 0:i.fields)==null?void 0:r.map)==null||s.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"&&Nn(parseFloat(e))&&(o=parseFloat(e)),this.value=this.value.map((r,s)=>s===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")}}},nu=["id"],ou={key:0,class:"string-array-item"},au={key:2},iu=["onUpdate:modelValue","aria-labelledby","type"],ru=["onUpdate:modelValue","aria-labelledby"];function lu(e,n,o,a,i,r){const s=t.resolveComponent("FieldStringArray"),d=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton"),m=t.resolveComponent("KTextArea"),g=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)},[r.isStringArrayItems()?(t.openBlock(),t.createElementBlock("div",ou,[t.createVNode(s,{"form-options":e.formOptions,model:e.value,schema:r.generateStringArraySchema(h),onModelUpdated:E=>r.handleStringArrayUpdate(E,h)},null,8,["form-options","model","schema","onModelUpdated"]),t.createVNode(c,{appearance:"tertiary",class:"string-array-remove-btn",icon:"",onClick:E=>r.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:r.generateSchema(e.value,e.schema.items,h),onRemoveItem:E=>r.removeElement(h)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:f,schema:r.generateSchema(e.value,e.schema.items,h),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["index","model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",au,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:f,schema:r.generateSchema(e.value,e.schema.items,h),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-${h}`,model:f,schema:r.generateSchema(e.value,e.schema.items,h),onRemoveItem:E=>r.removeElement(h)},{after:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.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":I=>e.value[h]=I,"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(g,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:I=>{r.handleInput(I,h)}}),null,16,["aria-labelledby","model-value","type","onInput"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,"onUpdate:modelValue":I=>e.value[h]=I,"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,iu)),[[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,ru),[[t.vModelText,e.value[h]]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.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:r.newElement},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel||o.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,nu)):t.createCommentVNode("",!0)}const su=$(tu,[["render",lu],["__scopeId","data-v-7633b3a8"]]),du={class:"form-field-wrapper field-checkbox"},cu=$(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:s,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,g)=>{const f=t.resolveComponent("KCheckbox");return t.openBlock(),t.createElementBlock("div",du,[t.createVNode(f,t.mergeProps(m.$attrs,{id:t.unref(s)(e.schema),modelValue:t.unref(d),"onUpdate:modelValue":g[0]||(g[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"]]),mu={class:"wrapper"},uu=["disabled"],fu=["id","checked","disabled","onChange","name"],hu=["disabled"],pu={class:"info"},gu={class:"dropList"},yu=["id","checked","disabled","onChange","name"];function bu(e,n,o,a,i,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",mu,[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,fu),[[s,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(d)),1)])],2))),256))],8,uu)):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",pu,t.toDisplayString(r.selectedCount)+" selected",1),n[1]||(n[1]=t.createElementVNode("div",{class:"arrow"},null,-1))],2),t.createElementVNode("div",gu,[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,yu),[[s,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(d)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,hu))])),[[s,"wrapper"]])}const _u=$({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?ra(this.schema.inputName+"_"+this.getItemValue(e)):ra(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((Q(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const o=Ra(this.value);o.push(this.getItemValue(n)),this.value=o}else{const o=Ra(this.value);o.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",bu]]),Eu={name:"FieldKeyValuePairs",components:{TrashIcon:Ae.TrashIcon},mixins:[Ne],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)}}},Tu={class:"key-value-pairs-editor"},Su={class:"pair-item-cell"},Cu=["data-testid","placeholder","value","onInput"],wu={class:"pair-item-cell"},ku=["data-testid","placeholder","value","onInput"];function Au(e,n,o,a,i,r){const s=t.resolveComponent("TrashIcon"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Tu,[(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",Su,[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:g=>{r.onInput(g,m,"key")}},null,40,Cu),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:g=>r.onInput({target:{value:g}},m,"key"),value:c.key},null,8,["schema","update","value"]))]),t.createElementVNode("div",wu,[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:g=>{r.onInput(g,m,"value")}},null,40,ku),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:g=>r.onInput({target:{value:g}},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(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:r.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const Mu=$(Eu,[["render",Au],["__scopeId","data-v-be99d00c"]]),Nu=$(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,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(i)),1)]),_:1},8,["id"])],2)}}}),[["__scopeId","data-v-e3423a11"]]),Iu=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:s,getFieldID:d,clearValidationErrors:c,value:m}=we.useAbstractFields({model:r,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:f=>{i("modelUpdated",f.value,f.model)}});n({clearValidationErrors:c});const g=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]=I=>t.isRef(m)?m.value=I:null),"aria-labelledby":t.unref(s)(e.schema),class:t.normalizeClass(e.schema.fieldClasses),"data-testid":"field-multiselect",disabled:e.disabled||void 0,items:g.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"])}}}),Ou={class:"selection-group"},Vu={class:"form-group horizontal-radios"},Bu={class:"radio-group"},Ru=["disabled","value"],Fu={class:"control-help"},Du={key:0,class:"option-field"},Lu={class:"option-field-container"},Uu=$(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(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",Ou,[(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",Vu,[t.createElementVNode("div",Bu,[(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]=s=>o.checkedGroup=s),class:"k-input",disabled:o.$props.disabled,type:"radio",value:r},null,8,Ru),[[t.vModelRadio,o.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(i.label)+" ",1),t.createElementVNode("div",Fu,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",Du,[t.createElementVNode("div",Lu,[t.createVNode(W,{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"]]),Pu={class:"form-field-wrapper"},$u=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),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:g,clearValidationErrors:f}=we.useAbstractFields({model:c.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:s,formatValueToModel:d,emitModelUpdated:h=>{i("modelUpdated",h.value,h.model)}});return n({clearValidationErrors:f}),(h,E)=>{const I=t.resolveComponent("KInputSwitch");return t.openBlock(),t.createElementBlock("div",Pu,[t.createVNode(I,{id:t.unref(m)(e.schema),modelValue:t.unref(g),"onUpdate:modelValue":E[0]||(E[0]=b=>t.isRef(g)?g.value=b:null),autocomplete:e.schema.autocomplete,class:t.normalizeClass(e.schema.fieldClasses),disabled:e.disabled||void 0,label:t.unref(g)?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"])])}}}),xu={class:"field-textarea"},vu={name:"FormGroup",components:Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:Wc,FieldArray:su,FieldArrayCardContainer:Oa,FieldArrayItem:Va,FieldArrayMultiItem:Ba,FieldAutoSuggest:La,FieldAutoSuggestLegacy:Ua,FieldCheckbox:cu,FieldChecklist:_u,FieldInput:Pa,FieldKeyValuePairs:Mu,FieldLabel:Nu,FieldMetric:$a,FieldMultiselect:Iu,FieldObject:xa,FieldObjectAdvanced:va,FieldRadio:ja,FieldSelect:Ka,FieldSelectionGroup:Uu,FieldStringArray:za,FieldSwitch:$u,FieldTextArea:$(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),s=t.inject(_e,void 0),{updateModelValue:d,getFieldID:c,clearValidationErrors:m,value:g}=we.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:h=>{i("modelUpdated",h.value,h.model)}});n({clearValidationErrors:m});const f=h=>{g.value=h,d(h,h)};return(h,E)=>{const I=t.resolveComponent("KTextArea");return t.openBlock(),t.createElementBlock("div",xu,[t.createVNode(I,t.mergeProps(h.$attrs,{id:t.unref(c)(e.schema),modelValue:t.unref(g),"onUpdate:modelValue":E[0]||(E[0]=b=>t.isRef(g)?g.value=b: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(g)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-609c18d6"]])},Symbol.toStringTag,{value:"Module"})),mixins:[la],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(Q(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=j(this.options,"fieldIdPrefix","");return kn(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldComponent(e){return e.component?e.component:"field-"+e.type},getButtonType(e){return j(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 K(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\./,""):""}}},ju=["innerHTML"],Ku={class:"icon-wrapper"},zu={key:0,class:"link-wrapper"},qu={class:"field-wrap"},Hu={key:0,class:"buttons"},Gu=["type","onClick","textContent"],Yu={key:1,class:"hint"},Wu={key:2,class:"errors help-block"};function Zu(e,n,o,a,i,r){const s=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",Ku,[t.createElementVNode("span",null,t.toDisplayString(r.formattedLabel(o.field.label)),1)]),o.field.link?(t.openBlock(),t.createElementBlock("div",zu,[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:r.sanitize(o.field.help)},null,8,ju)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",qu,[(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",Hu,[(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:g=>r.buttonClickHandler(c,o.field,g),textContent:t.toDisplayString(c.label)},null,10,Gu))),128))])):t.createCommentVNode("",!0)]),o.field.hint&&o.field.type!=="input"?(t.openBlock(),t.createElementBlock("div",Yu,t.toDisplayString(r.fieldHint(o.field)),1)):t.createCommentVNode("",!0),r.fieldErrors(o.field).length>0?(t.openBlock(),t.createElementBlock("div",Wu,[(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 qa=$(vu,[["render",Zu],["__scopeId","data-v-87df5b50"]]);var Vt=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(Vt||{});const Xu=e=>{var n,o;return e.type===Vt.REDIS_CE?"Host/Port":(n=e.config.sentinel_nodes)!=null&&n.length?"Sentinel":(o=e.config.cluster_nodes)!=null&&o.length?"Cluster":"Host/Port"},Ju={[Vt.REDIS_CE]:"open source",[Vt.REDIS_EE]:"enterprise"},Ha=e=>Ju[e]??"",ht={KONNECT_MANAGED:"konnect-managed",SELF_MANAGED:"self-managed"},Qu="managed_cache.v0";function ef(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(Qu)?ht.KONNECT_MANAGED:ht.SELF_MANAGED}const tf={class:"partial-config-card"},nf={class:"config-card-row-label"},of={class:"label-text"},af=["data-testid"],rf=["data-testid"],lf={key:1},sf=["data-testid"],df=["data-testid"],cf=$(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=f=>f!=null,s=(f,h)=>r(h)&&["password","sentinel_password"].includes(f)?"password":"text",{convertKeyToTitle:d}=Ut.useStringHelpers(),c=t.computed(()=>Object.entries(i.configFields).map(([f,h])=>{var E,I,b,O;return{key:f,label:((E=a[f])==null?void 0:E.label)??d(f),value:(I=a[f])!=null&&I.formatter?a[f].formatter(h):h,type:((b=a[f])==null?void 0:b.type)??s(f,h),order:((O=a[f])==null?void 0:O.order)??100}}).sort((f,h)=>f.order-h.order).filter(f=>f.type!=="hidden")),m=we.useRedisNonStandardFields(i.configFields,i.pluginRedisFields),g=t.computed(()=>c.value.concat(m));return(f,h)=>{const E=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",tf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,({key:I,label:b,value:O,type:N})=>(t.openBlock(),t.createElementBlock("div",{key:I,class:"partial-config-card-row"},[t.createElementVNode("div",nf,[t.createElementVNode("div",of,t.toDisplayString(b),1)]),t.createElementVNode("div",{class:"config-card-row-value","data-testid":`${I}-property-value`},[r(O)?(t.openBlock(),t.createElementBlock("div",lf,[N==="password"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${I}-copy-password`},[t.createVNode(E,{format:"redacted",text:String(O)},null,8,["text"])],8,sf)):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`${I}-plain-text`},t.toDisplayString(O),9,df))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${I}-no-value`}," – ",8,rf))],8,af)]))),128))])}}}),[["__scopeId","data-v-57f78095"]]),mf={class:"redis-config-select","data-testid":"redis-config-select"},uf={class:"selected-redis-config"},ff=["data-testid"],hf={class:"select-item-name","data-testid":"selected-redis-config"},pf={class:"empty-redis-config","data-testid":"empty-redis-config"},gf={key:1,class:"redis-shared-config-error-message","data-testid":"redis-config-fetch-error"},yf="1000",Ga=$(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(go),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:s}=Ut.useErrors(),d=t.inject(un),{debouncedQueryChange:c,loading:m,error:g,loadItems:f,results:h}=Ut.useDebouncedFilter(d,a[d.app].getAll,yf,{fetchedItemsKey:"data",searchKeys:["id","name"]}),E=t.computed(()=>g.value?s(g.value):""),I=t.computed(()=>i.isCustomPlugin?n("redis.custom_plugin.tooltip"):n("redis.shared_configuration.tooltip",{type:Ha(i.redisType)})),b=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")),N=t.computed(()=>i.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.create_new_configuration"):n("redis.shared_configuration.create_new_configuration",{type:Ha(i.redisType)})),D=t.computed(()=>E.value||n("redis.shared_configuration.error")),R=w=>{let M=`${d.apiBaseUrl}${a[d.app].getOne}`;return d.app==="konnect"&&(M=M.replace(/{controlPlaneId}/gi,(d==null?void 0:d.controlPlaneId)||"")),M=M.replace(/\/{workspace}/gi,d!=null&&d.workspace?`/${d.workspace}`:"").replace(/{id}/gi,String(w)),M},C=t.computed(()=>{const w=(h.value||[]).map(M=>{const u=M,y=i.isKonnectManagedRedisEnabled?ef(u):void 0,S=y===ht.KONNECT_MANAGED;return{...i.isKonnectManagedRedisEnabled&&y?{source:y}:{},label:M.id,name:M.name,value:M.id,type:M.type,tag:i.isKonnectManagedRedisEnabled&&S?void 0:Xu(u)}}).filter(M=>M.type==="redis-ce"||M.type==="redis-ee");return i.redisType!=="all"?w.filter(M=>M.type===i.redisType):w}),A=t.computed(()=>{const w=C.value;if(!i.isKonnectManagedRedisEnabled)return w;const M=w.filter(S=>S.source===ht.KONNECT_MANAGED),u=w.filter(S=>S.source===ht.SELF_MANAGED),y=[];return M.length>0&&y.push({label:n("redis.managed_ui.groups.konnect_managed"),items:M}),u.length>0&&y.push({label:n("redis.managed_ui.groups.self_managed"),items:u}),y}),{axiosInstance:T}=Ut.useAxios(d==null?void 0:d.axiosRequestConfig),_=async w=>{if(w){i.updateRedisModel(w);try{const M=await T.get(R(w));if(M.data.config){const u=Object.assign(M.data,M.data.config);delete u.config,r.value=u}}catch(M){console.error(M)}}};return t.watch(()=>o==null?void 0:o.value,async w=>{w&&await f()}),t.onBeforeMount(()=>{f(),i.defaultRedisConfigItem&&_(i.defaultRedisConfigItem)}),(w,M)=>{const u=t.resolveComponent("KLabel"),y=t.resolveComponent("KBadge"),S=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",mf,[t.createVNode(u,{info:I.value,"tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.value),1)]),_:1},8,["info"]),M[2]||(M[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:A.value,loading:t.unref(m),"model-value":e.defaultRedisConfigItem,placeholder:O.value,onChange:M[1]||(M[1]=V=>_(V==null?void 0:V.value)),onQueryChange:t.unref(c)},{"selected-item-template":t.withCtx(({item:V})=>[t.createElementVNode("div",uf,t.toDisplayString(V.name),1)]),"item-template":t.withCtx(({item:V})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${V.name}`},[t.createElementVNode("span",hf,t.toDisplayString(V.name),1),V.tag?(t.openBlock(),t.createBlock(y,{key:0,appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(V.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,ff)]),empty:t.withCtx(()=>[t.createElementVNode("div",pf,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:M[0]||(M[0]=V=>w.$emit("showNewPartialModal"))},[t.createVNode(t.unref(Ae.AddIcon),{size:t.unref(om)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(N.value),1)])]),_:1},8,["items","loading","model-value","placeholder","onQueryChange"])]),r.value?(t.openBlock(),t.createBlock(cf,{key:0,"config-fields":r.value,"plugin-redis-fields":e.pluginRedisFields},null,8,["config-fields","plugin-redis-fields"])):t.createCommentVNode("",!0),E.value?(t.openBlock(),t.createElementBlock("p",gf,t.toDisplayString(D.value),1)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-3b12e969"]]),bf={key:0},_f={class:"redis-config-radio-group","data-testid":"redis-config-radio-group"},Ef={key:0,class:"shared-redis-config"},Tf={key:1,class:"dedicated-redis-config"},Sf={class:"dedicated-redis-config-title"},Cf={name:"VueFormGenerator",components:{formGroup:qa,formRedis:$(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")),s=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")),g=t.computed(()=>o.field.pluginType==="custom"),f=t.ref(!o.isEditing),h=t.ref(),E=t.ref({}),I=t.ref(),b=C=>K(C.visible)?C.visible.call(this,o.model,C,this):Q(C.visible)?!0:C.visible,O=async C=>{a("modelUpdated",[{id:C,path:o.redisPath}],"partials"),I.value=[{id:C,path:o.redisPath}],h.value=C},N=(C,A)=>{E.value={...E.value,[A]:C},a("modelUpdated",C,A)},D=()=>{a("refreshModel")},R=(C,A,T)=>{a("validated",C,A,T)};return t.watch(()=>f.value,C=>{C?I.value&&a("partialToggled","redis",{partials:I.value}):a("partialToggled","partials",E.value)}),t.onBeforeMount(()=>{var C,A,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=(A=(C=o==null?void 0:o.model)==null?void 0:C.partials)==null?void 0:A[0])!=null&&T.id){const _=o.model.partials[0].id;f.value=!0,h.value=_}}),(C,A)=>{const T=t.resolveComponent("KAlert"),_=t.resolveComponent("KBadge"),w=t.resolveComponent("KRadio"),M=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",null,[g.value?(t.openBlock(),t.createElementBlock("div",bf,[t.createVNode(T,{"data-testid":"custom-plugin-redis-config-note",message:t.unref(i)("redis.custom_plugin.alert")},null,8,["message"]),t.createVNode(Ga,{"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":O,onShowNewPartialModal:A[0]||(A[0]=u=>C.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","is-konnect-managed-redis-enabled","plugin-redis-fields"])])):(t.openBlock(),t.createBlock(M,{key:1,class:"redis-config-card","data-testid":"redis-config-card",title:r.value},{default:t.withCtx(()=>[t.createElementVNode("div",_f,[t.createVNode(w,{modelValue:f.value,"onUpdate:modelValue":A[1]||(A[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(i)("redis.managed_ui.shared_configuration.badge")),1)]),_:1})):t.createCommentVNode("",!0)]),_:1},8,["modelValue","description","label"]),t.createVNode(w,{modelValue:f.value,"onUpdate:modelValue":A[2]||(A[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",Ef,[t.createVNode(Ga,{"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":O,onShowNewPartialModal:A[3]||(A[3]=u=>C.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","is-konnect-managed-redis-enabled","plugin-redis-fields","redis-type"])])):(t.openBlock(),t.createElementBlock("div",Tf,[t.createElementVNode("div",Sf,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,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.model},[b(u)?(t.openBlock(),t.createBlock(qa,{key:0,ref_for:!0,ref:"children",errors:e.errors,field:u,model:e.model,options:e.options,vfg:e.vfg,onModelUpdated:N,onRefreshModel:D,onValidated:R},null,8,["errors","field","model","options","vfg"])):t.createCommentVNode("",!0)],64))),128))]),_:1}))]))]),_:1},8,["title"]))])}}}),[["__scopeId","data-v-58023d89"]])},mixins:[la],inject:{autofillSlot:{from:_e,default:void 0}},provide(){var e;return{...!this.autofillSlot&&{[_e]:(e=this.$slots)==null?void 0:e[Je]}}},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&&ue(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&ue(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 K(e.visible)?e.visible.call(this,this.model,e,this):Q(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&&ue(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=j(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],o=[];ue(this.$refs.children,i=>{K(i.validate)&&(n.push(i.$refs.child),o.push(i.$refs.child.validate(!0)))});const a=i=>{const r=[];ue(i,(d,c)=>{Array.isArray(d)&&d.length>0&&ue(d,m=>{r.push({field:n[c].schema,error:m})})}),this.errors=r;const s=r.length===0;return this.$emit("validated",s,r,this),e?r:s};return e?Promise.all(o).then(a):a(o)},clearValidationErrors(){this.errors.splice(0),ue(this.$refs.children,e=>{e.clearValidationErrors()})}}},wf={key:0,class:"vue-form-generator"},kf={key:0};function Af(e,n,o,a,i,r){const s=t.resolveComponent("form-redis"),d=t.resolveComponent("form-group"),c=t.resolveComponent("KCollapse");return o.schema!=null?(t.openBlock(),t.createElementBlock("div",wf,[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(s,{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:g=>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,g)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${g}`},[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,I;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,(I=m.slots)==null?void 0:I.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,b=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b.model},[r.fieldVisible(b)?(t.openBlock(),t.createBlock(d,{key:0,ref_for:!0,ref:"children",errors:i.errors,field:b,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-${g}-nested`]??!0,"trigger-alignment":"leading","trigger-label":i.collapseStates[`group-${g}-nested`]??!0?m.collapsible.nestedCollapsible.triggerLabel.expand:m.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":b=>i.collapseStates[`group-${g}-nested`]=b},{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,b=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b.model},[b.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(s,{key:0,errors:i.errors,field:b,"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",b.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(b)?(t.openBlock(),t.createBlock(d,{key:1,ref_for:!0,ref:"children",errors:i.errors,field:b,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",kf,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},[r.fieldVisible(f)?(t.openBlock(),t.createBlock(d,{key:0,ref_for:!0,ref:"children",errors:i.errors,field:f,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 W=$(Cf,[["render",Af]]),Mf=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"]),Nf={name:"OIDCPrincipals",components:{VueFormGenerator:W},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=>Mf.has(e.model))}}}},If={class:"oidc-principals-section","data-testid":"oidc-principals-section"};function Of(e,n,o,a,i,r){const s=t.resolveComponent("VueFormGenerator");return t.openBlock(),t.createElementBlock("div",If,[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:r.principalsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])])}const Vf=$(Nf,[["render",Of],["__scopeId","data-v-64b2d504"]]),Bt={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"},Ya=new Set(["config-client_id","config-client_secret","config-issuer"]),Wa=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"]),Bf={name:"OIDCForm",components:{VueFormGenerator:W,OIDCPrincipals:Vf},provide(){var e;return{[_e]:(e=this.$slots)==null?void 0:e[Je]}},inject:{formsConfig:{from:un,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:Bt.openIdConnectDocs,openIdConnectJWKLink:Bt.openIdConnectJWKDocs,openIdConnectClusterNodesLink:Bt.openIdConnectClusterNodesDocs,openIdConfigurationDocs:Bt.openIdConfigurationDocs,openIdAuthorizationDocs:Bt.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=>Wa.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,s)=>(r[s.model]=s,r),{});this.commonFieldsSchema={fields:Array.from(Ya).reduce((r,s)=>(n[s]&&r.push(n[s]),r),[])},this.authFieldsSchema={fields:Array.from(Za).reduce((r,s)=>(n[s]&&r.push(n[s]),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"&&!Ya.has(r.model)&&!Za.has(r.model)&&!Wa.has(r.model)&&(!this.enableRedisPartial||!a.includes(r.model))||r.model==="tags").reduce((r,s)=>{var d,c,m,g;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;r.push({...s,link:this.openIdConnectJWKLink,newElementButtonLabel:"+ Add Client JWK",...Array.isArray((g=(m=s.items)==null?void 0:m.schema)==null?void 0:g.fields)&&s.items.schema.fields.map(f=>({...f,label:f.model}))});break}case"config-session_redis_cluster_nodes":{r.push({...s,link:this.openIdConnectClusterNodesLink,newElementButtonLabel:"+ Add Cluster Node"});break}default:r.push(s)}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 s of r.fields){const d=(e=n[s.model])==null?void 0:e.help;s.help===void 0&&typeof d=="string"&&(s.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()}}},Rf={class:"general-settings"},Ff={class:"link-wrapper"},Df={class:"auth-method-container"},Lf={class:"general-settings"},Uf={class:"link-wrapper"},Pf={class:"general-settings"},$f={class:"link-wrapper"};function xf(e,n,o,a,i,r){const s=t.resolveComponent("VueFormGenerator"),d=t.resolveComponent("KExternalLink"),c=t.resolveComponent("OIDCPrincipals"),m=t.resolveComponent("KLabel"),g=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:i.globalFields,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(h,{tabs:i.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",Rf,[t.createElementVNode("div",Ff,[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,"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),r.displayForm?(t.openBlock(),t.createBlock(s,{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",Df,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.authMethods,E=>(t.openBlock(),t.createElementBlock("div",{key:E.value,class:"auth-method"},[t.createVNode(g,{modelValue:E.prop,"onUpdate:modelValue":I=>E.prop=I,onChange:I=>r.handleUpdate(I,E.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(E.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(f,{modelValue:i.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=E=>i.sessionManagement=E),label:"Enable Session Management",onChange:r.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",Lf,[t.createElementVNode("div",Uf,[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(s,{key:0,model:o.formModel,options:o.formOptions,schema:i.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",Pf,[t.createElementVNode("div",$f,[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(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: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 vf=$(Bf,[["render",xf],["__scopeId","data-v-5cf4e4e3"]]),jf=$(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(_e,(s=t.useSlots())==null?void 0:s[Je]);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(W,{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"]]),Kf=$(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(_e,(s=t.useSlots())==null?void 0:s[Je]);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(W,{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}]},qf={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}]},Hf={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_hmac_key",label:"Config.Eab Hmac Key",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_kid",label:"Config.Eab Kid",order:0,disabled:!1}]},Gf={class:"general-settings"},Yf={class:"sub-form"},Wf={class:"general-settings"},Zf={class:"sub-form"},Xf={class:"general-settings"},Jf=$(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 A;t.provide(_e,(A=t.useSlots())==null?void 0:A[Je]);const n=e,o=t.ref("zeroSsl"),a=t.ref("shm"),i=t.computed(()=>{var _;const T={};if((_=n.formSchema)!=null&&_.fields)for(const w of n.formSchema.fields)T[w.model]=w;return T}),r=t.computed(()=>{var _;const T=$e(zf);for(const w of T.fields){const M=(_=i.value[w.model])==null?void 0:_.help;w.help===void 0&&typeof M=="string"&&(w.help=M)}return T}),s=t.computed(()=>{var _;const T=$e(qf);for(const w of T.fields){const M=(_=i.value[w.model])==null?void 0:_.help;w.help===void 0&&typeof M=="string"&&(w.help=M)}return T}),d=t.computed(()=>{var _;const T=$e(Hf);for(const w of T.fields){const M=(_=i.value[w.model])==null?void 0:_.help;w.help===void 0&&typeof M=="string"&&(w.help=M)}return T}),c=t.computed(()=>({fields:n.formSchema.fields.filter(T=>!T.model.startsWith("config")&&T.model!=="tags")})),m=t.computed(()=>({fields:r.value.fields.filter(_=>!s.value.fields.some(w=>w.model===_.model)&&!d.value.fields.some(w=>w.model===_.model))})),g=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"))})),I=t.computed(()=>({fields:n.formSchema.fields.filter(_=>_.model.startsWith("config-storage_config-vault"))})),b=t.computed(()=>({fields:n.formSchema.fields.filter(T=>T.model.startsWith("config")&&!m.value.fields.filter(_=>_.model===T.model).length&&!g.value.fields.filter(_=>_.model===T.model).length||T.model==="tags")})),O=t.computed(()=>n.formModel.id&&n.isEditing||!n.isEditing),N=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],D=[{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 R=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()},C=(T,_)=>{_==="config-storage"&&(a.value=T),n.onModelUpdated()};return(T,_)=>{const w=t.resolveComponent("KSelect"),M=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(W,{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(M,{tabs:N},{general:t.withCtx(()=>[t.createElementVNode("div",Gf,[_[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)),O.value?(t.openBlock(),t.createBlock(W,{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:D,label:"Issuer",onChange:R}),t.createElementVNode("div",Yf,[o.value==="letsEncrypt"?(t.openBlock(),t.createBlock(W,{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(W,{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",Wf,[_[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)),O.value?(t.openBlock(),t.createBlock(W,{key:0,model:e.formModel,options:e.formOptions,schema:g.value,onModelUpdated:C},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",Zf,[a.value==="consul"?(t.openBlock(),t.createBlock(W,{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(W,{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(W,{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(W,{key:3,model:e.formModel,options:e.formOptions,schema:I.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",Xf,[_[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)),O.value?(t.openBlock(),t.createBlock(W,{key:0,model:e.formModel,options:e.formOptions,schema:b.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),[["__scopeId","data-v-07cecf5b"]]),Qf={class:"rla-form-basic-fields"},eh={class:"rla-form-request-limits-subtitle"},th={class:"rla-form-request-limits-content"},nh={class:"rla-form-window-type"},oh=["innerHTML"],ah={class:"rla-form-window-type-radios"},ih={class:"rla-form-request-limits-items"},rh={class:"rla-form-request-limits-row"},lh=["id"],sh={class:"rla-form-request-limits-actions"},dh={key:0,class:"rla-form-request-limits-examples"},ch={class:"rla-form-request-limits-examples-badges"},mh=["innerHTML"],uh={id:"rla-form-error-legend",class:"rla-form-error-inputs"},fh=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:Jf,ExitTransformer:Kf,OIDCForm:vf,PostFunction:jf,RLAForm:$(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 M;t.provide(_e,(M=t.useSlots())==null?void 0:M[Je]);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(u=>`config-${u}`)]),a=u=>u===void 0?!1:o.has(u),{t:i}=ge.createI18n("en-us",Ee),r=e,s=t.computed(()=>{var S,V,x;const u=(V=(S=r.formSchema)==null?void 0:S.fields)==null?void 0:V.find(le=>le.type==="selectionGroup"&&le.model==="selectionGroup");return{fields:[(x=r.formSchema)==null?void 0:x.fields.find(le=>le.model==="enabled"),u].filter(Boolean)}}),d=t.computed(()=>{var le,H;const u=((H=(le=r.formSchema)==null?void 0:le.fields)==null?void 0:H.filter(Z=>!a(Z.model)))??[],y=[],S=[],V=[];let x=!1;for(const Z of u){const Ie=Z.model;if(Ie!==void 0){if(Ie.startsWith("config-redis-")){(Z.model==="config-redis-cluster_addresses"||Z.model==="config-redis-sentinel_addresses")&&(Z.inputAttributes.help=i("rla.redis.address_example")),S.push(Z);continue}x?V.push(Z):y.push(Z),Z.model==="config-strategy"&&(x=!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:V}}}),c=t.computed(()=>{const u=r.formModel["config-window_type"];return Object.prototype.hasOwnProperty.call(n,u)?n[u]:[]}),m=t.computed(()=>{var u,y;return(y=(u=r.formSchema)==null?void 0:u.fields)==null?void 0:y.find(S=>S.model==="config-identifier")}),g=t.computed(()=>{var u,y,S;return(((S=(y=(u=r.formSchema)==null?void 0:u.fields)==null?void 0:y.find(V=>V.model==="config-identifier"))==null?void 0:S.values)??[]).map(V=>({label:i(`rla.identifiers.options.${V}`),value:V}))}),f=t.ref(),h=t.ref(!0),E=t.computed(()=>{var u,y,S;return r.formModel["config-window_type"]??((S=(y=(u=r.formSchema)==null?void 0:u.fields)==null?void 0:y.find(V=>V.model==="config-window_type"))==null?void 0:S.default)}),I=t.computed(()=>{var y,S,V,x,le,H;const u=(V=(S=(y=r.formSchema)==null?void 0:y.fields)==null?void 0:S.find(Z=>Z.model==="config-window_type"))==null?void 0:V.default;return(((H=(le=(x=r.formSchema)==null?void 0:x.fields)==null?void 0:le.find(Z=>Z.model==="config-window_type"))==null?void 0:H.values)??[]).sort((Z,Ie)=>Z===u?-1:Ie===u?1:0)}),b=t.computed(()=>{var y;const u=(y=r.formModel["config-limit"])==null?void 0:y.map((S,V)=>{var x,le;return{limit:S,windowSize:(le=(x=r.formModel)==null?void 0:x["config-window_size"])==null?void 0:le[V]}});return!Array.isArray(u)||u.length===0?[{limit:void 0,windowSize:void 0}]:u}),O=t.computed(()=>{var u,y,S,V;return((u=r.formModel)==null?void 0:u["config-identifier"])??((V=(S=(y=r.formSchema)==null?void 0:y.fields)==null?void 0:S.find(x=>x.model==="config-identifier"))==null?void 0:V.default)}),N=t.computed(()=>{var u,y,S,V;return((u=r.formModel)==null?void 0:u["config-error_code"])??((V=(S=(y=r.formSchema)==null?void 0:y.fields)==null?void 0:S.find(x=>x.model==="config-error_code"))==null?void 0:V.default)}),D=t.computed(()=>{var u,y,S,V;return((u=r.formModel)==null?void 0:u["config-error_message"])??((V=(S=(y=r.formSchema)==null?void 0:y.fields)==null?void 0:S.find(x=>x.model==="config-error_message"))==null?void 0:V.default)}),R=(u,y)=>{if(y===f.value){r.onModelUpdated([],"config-limit"),r.onModelUpdated([],"config-window_size"),t.nextTick(()=>{f.value=void 0});return}r.onModelUpdated([u.config.limit],"config-limit"),r.onModelUpdated([u.config.window_size],"config-window_size"),t.nextTick(()=>{f.value=y})},C=u=>{f.value!==void 0&&(f.value=void 0),u!==null&&r.onModelUpdated(u.toString(),"config-window_type")},A=(u,y)=>{var V;f.value!==void 0&&(f.value=void 0);const S=$e(((V=r.formModel)==null?void 0:V["config-limit"])??[]);S[u]=y,r.onModelUpdated(S,"config-limit")},T=(u,y)=>{var V;f.value!==void 0&&(f.value=void 0);const S=$e(((V=r.formModel)==null?void 0:V["config-window_size"])??[]);S[u]=y,r.onModelUpdated(S,"config-window_size")},_=u=>{var V,x;f.value!==void 0&&(f.value=void 0);const y=$e(((V=r.formModel)==null?void 0:V["config-limit"])??[]),S=$e(((x=r.formModel)==null?void 0:x["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),r.onModelUpdated(y,"config-limit"),r.onModelUpdated(S,"config-window_size")},w=u=>{var y,S;if(b.value.length>1){f.value!==void 0&&(f.value=void 0);const V=$e(((y=r.formModel)==null?void 0:y["config-limit"])??[]),x=$e(((S=r.formModel)==null?void 0:S["config-window_size"])??[]);V.length===0&&V.push(void 0),x.length===0&&x.push(void 0),V.splice(u,1),x.splice(u,1),r.onModelUpdated(V,"config-limit"),r.onModelUpdated(x,"config-window_size")}};return t.watch(()=>r.formModel["config-strategy"],u=>{u!=="redis"&&r.formModel.partials&&r.onModelUpdated(void 0,"partials")}),(u,y)=>{const S=t.resolveComponent("KLabel"),V=t.resolveComponent("KRadio"),x=t.resolveComponent("KInput"),le=t.resolveComponent("KButton"),H=t.resolveComponent("KBadge"),Z=t.resolveComponent("KTooltip"),Ie=t.resolveComponent("KCard"),pt=t.resolveComponent("KSelect"),Bn=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Qf,[t.createVNode(W,{model:e.formModel,options:e.formOptions,schema:s.value,onModelUpdated:y[0]||(y[0]=(P,J)=>e.onModelUpdated(P,J))},null,8,["model","options","schema"]),t.createVNode(Ie,{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",eh,t.toDisplayString(t.unref(i)("rla.request_limits.subtitle")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",th,[t.createElementVNode("div",nh,[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,oh)]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.window_type.label"))+" ",1)]),_:1}),t.createElementVNode("div",ah,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,P=>(t.openBlock(),t.createBlock(V,{key:`window-type-${P}`,"model-value":E.value,name:P,"selected-value":P,"onUpdate:modelValue":C},{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",ih,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,(P,J)=>(t.openBlock(),t.createElementBlock("div",{key:J.toString()},[t.createVNode(S,{for:`rla-form-request-limits-item-${J}-legend`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.request_limits.label_index",{index:J+1})),1)]),_:2},1032,["for"]),t.createElementVNode("div",rh,[t.createElementVNode("legend",{id:`rla-form-request-limits-item-${J}-legend`,class:"rla-form-request-limits-inputs"},[t.createVNode(x,{"model-value":P.limit&&P.limit.toString(),placeholder:t.unref(i)("rla.request_limits.request_number"),type:"number","onUpdate:modelValue":gt=>A(J,Number.parseInt(gt))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.interval_determiner")),1),t.createVNode(x,{"model-value":P.windowSize&&P.windowSize.toString(),placeholder:t.unref(i)("rla.request_limits.time_interval"),type:"number","onUpdate:modelValue":gt=>T(J,Number.parseInt(gt))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.seconds")),1)],8,lh),t.createElementVNode("div",sh,[t.createVNode(le,{appearance:"tertiary",disabled:b.value.length<=1,onClick:()=>w(J)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ae.RemoveIcon))]),_:1},8,["disabled","onClick"]),t.createVNode(le,{appearance:"tertiary",onClick:()=>_(J)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ae.AddIcon))]),_:1},8,["onClick"])])])]))),128))]),c.value.length>0?(t.openBlock(),t.createElementBlock("div",dh,[t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.start_with_a_use_case")),1),t.createElementVNode("div",ch,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(P,J)=>(t.openBlock(),t.createBlock(Z,{key:`use-case-${J}`,"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(H,{appearance:f.value===`${E.value}-${J}`?"info":"decorative",class:"rla-form-request-limits-examples-badge",onClick:()=>R(P,`${E.value}-${J}`)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(P.label),1)]),_:2},1032,["appearance","onClick"])]),_:2},1024))),128))])])):t.createCommentVNode("",!0)])]),_:1}),t.createVNode(pt,{modelValue:O.value,"onUpdate:modelValue":y[1]||(y[1]=P=>O.value=P),class:"rla-form-identifiers",items:g.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,mh)]),_: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",uh,[t.createVNode(x,{class:"input-error-code","model-value":N.value&&N.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(x,{"model-value":D.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(Bn,{modelValue:h.value,"onUpdate:modelValue":y[9]||(y[9]=P=>h.value=P),"data-testid":"view-advanced","trigger-label":t.unref(i)("rla.view_advanced")},{default:t.withCtx(()=>[t.createVNode(W,{model:e.formModel,options:e.formOptions,schema:d.value.endsWithStrategy,onModelUpdated:y[5]||(y[5]=(P,J)=>e.onModelUpdated(P,J))},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(W,{"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,J)=>e.onModelUpdated(P,J)),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(W,{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,J)=>e.onModelUpdated(P,J))},null,8,["class","model","options","schema"])]),_:1},8,["modelValue","trigger-label"])],64)}}}),[["__scopeId","data-v-c304263d"]])},Symbol.toStringTag,{value:"Module"})),hh=["array","metric","advanced","selectionGroup","object-advanced"],ph=e=>({"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer","rate-limiting-advanced":"RLAForm"})[e];U.AUTOFILL_SLOT=_e,U.AUTOFILL_SLOT_NAME=Je,U.EMPTY_VALUE_PLACEHOLDER=yo,U.FIELD_STATES=Me,U.FORMS_API_KEY=be,U.FORMS_CONFIG=un,U.FieldScopedEntitySelect=Fa,U.PartialType=Vt,U.REDIS_PARTIAL_FETCHER_KEY=go,U.REDIS_PARTIAL_INFO=kl,U.VueFormGenerator=W,U.abstractField=Hc,U.composables=we,U.customFields=hh,U.getSharedFormName=ph,U.sharedForms=fh,Object.defineProperty(U,Symbol.toStringTag,{value:"Module"})});
|