@kong-ui-public/forms 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/forms.es.js CHANGED
@@ -3656,7 +3656,7 @@ const Vi = /* @__PURE__ */ F(Uc, [["render", Gc]]), Ke = "24px", Zt = (e, t) =>
3656
3656
  this.$emit("model-updated", this.model[this.schema.model], t);
3657
3657
  }
3658
3658
  }
3659
- }, qi = (e) => (be("data-v-106caf87"), e = e(), _e(), e), mm = ["id"], hm = ["data-testid"], fm = { class: "item-wrapper" }, pm = { class: "index-wrapper" }, gm = /* @__PURE__ */ qi(() => /* @__PURE__ */ c("hr", { class: "divider" }, null, -1)), ym = { key: 0 }, vm = { key: 1 }, bm = ["onUpdate:modelValue", "placeholder", "onInput"], _m = {
3659
+ }, qi = (e) => (be("data-v-b35063fd"), e = e(), _e(), e), mm = ["id"], hm = ["data-testid"], fm = { class: "item-wrapper" }, pm = { class: "index-wrapper" }, gm = /* @__PURE__ */ qi(() => /* @__PURE__ */ c("hr", { class: "divider" }, null, -1)), ym = { key: 0 }, vm = { key: 1 }, bm = ["onUpdate:modelValue", "placeholder", "onInput"], _m = {
3660
3660
  key: 0,
3661
3661
  class: "hint"
3662
3662
  }, wm = /* @__PURE__ */ qi(() => /* @__PURE__ */ c("hr", { class: "wide-divider" }, null, -1)), Tm = { class: "input-item" }, Sm = ["placeholder"], $m = {
@@ -3681,10 +3681,11 @@ function Mm(e, t, n, i, s, r) {
3681
3681
  M(a, {
3682
3682
  appearance: "tertiary",
3683
3683
  class: "delete",
3684
+ icon: "",
3684
3685
  type: "button",
3685
3686
  onClick: (b) => r.removeElement(f)
3686
3687
  }, {
3687
- icon: S(() => [
3688
+ default: S(() => [
3688
3689
  M(o)
3689
3690
  ]),
3690
3691
  _: 2
@@ -3744,7 +3745,7 @@ function Mm(e, t, n, i, s, r) {
3744
3745
  ], 2)
3745
3746
  ], 10, mm);
3746
3747
  }
3747
- const Di = /* @__PURE__ */ F(cm, [["render", Mm], ["__scopeId", "data-v-106caf87"]]), Cm = { class: "array-item" }, Im = /* @__PURE__ */ ue({
3748
+ const Di = /* @__PURE__ */ F(cm, [["render", Mm], ["__scopeId", "data-v-b35063fd"]]), Cm = { class: "array-item" }, Im = /* @__PURE__ */ ue({
3748
3749
  __name: "FieldArrayItem",
3749
3750
  props: {
3750
3751
  model: {
package/dist/forms.umd.js CHANGED
@@ -1,3 +1,3 @@
1
- (function(U,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],t):(U=typeof globalThis<"u"?globalThis:U||self,t(U["kong-ui-public-forms"]={},U.Vue,U["kong-ui-public-i18n"]))})(this,function(U,t,Ze){"use strict";function Tt(e,n){for(var o=-1,i=e==null?0:e.length;++o<i&&n(e[o],o,e)!==!1;);return e}function go(e){return function(n,o,i){for(var a=-1,r=Object(n),s=i(n),l=s.length;l--;){var d=s[e?l:++a];if(o(r[d],d,r)===!1)break}return n}}var yo=go();const bo=yo;function _o(e,n){for(var o=-1,i=Array(e);++o<e;)i[o]=n(o);return i}var $t=typeof global=="object"&&global&&global.Object===Object&&global,wo=typeof self=="object"&&self&&self.Object===Object&&self,Y=$t||wo||Function("return this")(),W=Y.Symbol,Bt=Object.prototype,ko=Bt.hasOwnProperty,Co=Bt.toString,Te=W?W.toStringTag:void 0;function Eo(e){var n=ko.call(e,Te),o=e[Te];try{e[Te]=void 0;var i=!0}catch{}var a=Co.call(e);return i&&(n?e[Te]=o:delete e[Te]),a}var So=Object.prototype,To=So.toString;function $o(e){return To.call(e)}var Bo="[object Null]",No="[object Undefined]",Nt=W?W.toStringTag:void 0;function oe(e){return e==null?e===void 0?No:Bo:Nt&&Nt in Object(e)?Eo(e):$o(e)}function Z(e){return e!=null&&typeof e=="object"}var Mo="[object Arguments]";function Mt(e){return Z(e)&&oe(e)==Mo}var Vt=Object.prototype,Vo=Vt.hasOwnProperty,Io=Vt.propertyIsEnumerable,Je=Mt(function(){return arguments}())?Mt:function(e){return Z(e)&&Vo.call(e,"callee")&&!Io.call(e,"callee")},H=Array.isArray;function Ao(){return!1}var It=typeof U=="object"&&U&&!U.nodeType&&U,At=It&&typeof module=="object"&&module&&!module.nodeType&&module,Oo=At&&At.exports===It,Ot=Oo?Y.Buffer:void 0,Fo=Ot?Ot.isBuffer:void 0,$e=Fo||Ao,Uo=9007199254740991,Do=/^(?:0|[1-9]\d*)$/;function Xe(e,n){var o=typeof e;return n=n??Uo,!!n&&(o=="number"||o!="symbol"&&Do.test(e))&&e>-1&&e%1==0&&e<n}var Lo=9007199254740991;function Qe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Lo}var vo="[object Arguments]",Po="[object Array]",qo="[object Boolean]",Ro="[object Date]",xo="[object Error]",zo="[object Function]",jo="[object Map]",Ko="[object Number]",Ho="[object Object]",Yo="[object RegExp]",Go="[object Set]",Wo="[object String]",Zo="[object WeakMap]",Jo="[object ArrayBuffer]",Xo="[object DataView]",Qo="[object Float32Array]",ei="[object Float64Array]",ti="[object Int8Array]",ni="[object Int16Array]",oi="[object Int32Array]",ii="[object Uint8Array]",ri="[object Uint8ClampedArray]",ai="[object Uint16Array]",li="[object Uint32Array]",L={};L[Qo]=L[ei]=L[ti]=L[ni]=L[oi]=L[ii]=L[ri]=L[ai]=L[li]=!0,L[vo]=L[Po]=L[Jo]=L[qo]=L[Xo]=L[Ro]=L[xo]=L[zo]=L[jo]=L[Ko]=L[Ho]=L[Yo]=L[Go]=L[Wo]=L[Zo]=!1;function si(e){return Z(e)&&Qe(e.length)&&!!L[oe(e)]}function et(e){return function(n){return e(n)}}var Ft=typeof U=="object"&&U&&!U.nodeType&&U,Be=Ft&&typeof module=="object"&&module&&!module.nodeType&&module,di=Be&&Be.exports===Ft,tt=di&&$t.process,be=function(){try{var e=Be&&Be.require&&Be.require("util").types;return e||tt&&tt.binding&&tt.binding("util")}catch{}}(),Ut=be&&be.isTypedArray,nt=Ut?et(Ut):si,ci=Object.prototype,mi=ci.hasOwnProperty;function Dt(e,n){var o=H(e),i=!o&&Je(e),a=!o&&!i&&$e(e),r=!o&&!i&&!a&&nt(e),s=o||i||a||r,l=s?_o(e.length,String):[],d=l.length;for(var c in e)(n||mi.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||r&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Xe(c,d)))&&l.push(c);return l}var hi=Object.prototype;function Le(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||hi;return e===o}function Lt(e,n){return function(o){return e(n(o))}}var ui=Lt(Object.keys,Object),pi=Object.prototype,fi=pi.hasOwnProperty;function vt(e){if(!Le(e))return ui(e);var n=[];for(var o in Object(e))fi.call(e,o)&&o!="constructor"&&n.push(o);return n}function q(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var gi="[object AsyncFunction]",yi="[object Function]",bi="[object GeneratorFunction]",_i="[object Proxy]";function V(e){if(!q(e))return!1;var n=oe(e);return n==yi||n==bi||n==gi||n==_i}function _e(e){return e!=null&&Qe(e.length)&&!V(e)}function we(e){return _e(e)?Dt(e):vt(e)}function wi(e,n){return e&&bo(e,n,we)}function ki(e,n){return function(o,i){if(o==null)return o;if(!_e(o))return e(o,i);for(var a=o.length,r=n?a:-1,s=Object(o);(n?r--:++r<a)&&i(s[r],r,s)!==!1;);return o}}var Ci=ki(wi);const Ei=Ci;function ve(e){return e}function Si(e){return typeof e=="function"?e:ve}function z(e,n){var o=H(e)?Tt:Ei;return o(e,Si(n))}var Ti="[object Symbol]";function Pe(e){return typeof e=="symbol"||Z(e)&&oe(e)==Ti}var $i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bi=/^\w*$/;function ot(e,n){if(H(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Pe(e)?!0:Bi.test(e)||!$i.test(e)||n!=null&&e in Object(n)}var it=Y["__core-js_shared__"],Pt=function(){var e=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ni(e){return!!Pt&&Pt in e}var Mi=Function.prototype,Vi=Mi.toString;function se(e){if(e!=null){try{return Vi.call(e)}catch{}try{return e+""}catch{}}return""}var Ii=/[\\^$.*+?()[\]{}|]/g,Ai=/^\[object .+?Constructor\]$/,Oi=Function.prototype,Fi=Object.prototype,Ui=Oi.toString,Di=Fi.hasOwnProperty,Li=RegExp("^"+Ui.call(Di).replace(Ii,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vi(e){if(!q(e)||Ni(e))return!1;var n=V(e)?Li:Ai;return n.test(se(e))}function Pi(e,n){return e==null?void 0:e[n]}function de(e,n){var o=Pi(e,n);return vi(o)?o:void 0}var Ne=de(Object,"create");function qi(){this.__data__=Ne?Ne(null):{},this.size=0}function Ri(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var xi="__lodash_hash_undefined__",zi=Object.prototype,ji=zi.hasOwnProperty;function Ki(e){var n=this.__data__;if(Ne){var o=n[e];return o===xi?void 0:o}return ji.call(n,e)?n[e]:void 0}var Hi=Object.prototype,Yi=Hi.hasOwnProperty;function Gi(e){var n=this.__data__;return Ne?n[e]!==void 0:Yi.call(n,e)}var Wi="__lodash_hash_undefined__";function Zi(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Ne&&n===void 0?Wi:n,this}function ce(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var i=e[n];this.set(i[0],i[1])}}ce.prototype.clear=qi,ce.prototype.delete=Ri,ce.prototype.get=Ki,ce.prototype.has=Gi,ce.prototype.set=Zi;function Ji(){this.__data__=[],this.size=0}function Me(e,n){return e===n||e!==e&&n!==n}function qe(e,n){for(var o=e.length;o--;)if(Me(e[o][0],n))return o;return-1}var Xi=Array.prototype,Qi=Xi.splice;function er(e){var n=this.__data__,o=qe(n,e);if(o<0)return!1;var i=n.length-1;return o==i?n.pop():Qi.call(n,o,1),--this.size,!0}function tr(e){var n=this.__data__,o=qe(n,e);return o<0?void 0:n[o][1]}function nr(e){return qe(this.__data__,e)>-1}function or(e,n){var o=this.__data__,i=qe(o,e);return i<0?(++this.size,o.push([e,n])):o[i][1]=n,this}function ee(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var i=e[n];this.set(i[0],i[1])}}ee.prototype.clear=Ji,ee.prototype.delete=er,ee.prototype.get=tr,ee.prototype.has=nr,ee.prototype.set=or;var Ve=de(Y,"Map");function ir(){this.size=0,this.__data__={hash:new ce,map:new(Ve||ee),string:new ce}}function rr(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Re(e,n){var o=e.__data__;return rr(n)?o[typeof n=="string"?"string":"hash"]:o.map}function ar(e){var n=Re(this,e).delete(e);return this.size-=n?1:0,n}function lr(e){return Re(this,e).get(e)}function sr(e){return Re(this,e).has(e)}function dr(e,n){var o=Re(this,e),i=o.size;return o.set(e,n),this.size+=o.size==i?0:1,this}function te(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var i=e[n];this.set(i[0],i[1])}}te.prototype.clear=ir,te.prototype.delete=ar,te.prototype.get=lr,te.prototype.has=sr,te.prototype.set=dr;var cr="Expected a function";function rt(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(cr);var o=function(){var i=arguments,a=n?n.apply(this,i):i[0],r=o.cache;if(r.has(a))return r.get(a);var s=e.apply(this,i);return o.cache=r.set(a,s)||r,s};return o.cache=new(rt.Cache||te),o}rt.Cache=te;var mr=500;function hr(e){var n=rt(e,function(i){return o.size===mr&&o.clear(),i}),o=n.cache;return n}var ur=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pr=/\\(\\)?/g,fr=hr(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(ur,function(o,i,a,r){n.push(a?r.replace(pr,"$1"):i||o)}),n});function gr(e,n){for(var o=-1,i=e==null?0:e.length,a=Array(i);++o<i;)a[o]=n(e[o],o,e);return a}var yr=1/0,qt=W?W.prototype:void 0,Rt=qt?qt.toString:void 0;function xt(e){if(typeof e=="string")return e;if(H(e))return gr(e,xt)+"";if(Pe(e))return Rt?Rt.call(e):"";var n=e+"";return n=="0"&&1/e==-yr?"-0":n}function zt(e){return e==null?"":xt(e)}function jt(e,n){return H(e)?e:ot(e,n)?[e]:fr(zt(e))}var br=1/0;function xe(e){if(typeof e=="string"||Pe(e))return e;var n=e+"";return n=="0"&&1/e==-br?"-0":n}function Kt(e,n){n=jt(n,e);for(var o=0,i=n.length;e!=null&&o<i;)e=e[xe(n[o++])];return o&&o==i?e:void 0}function N(e,n,o){var i=e==null?void 0:Kt(e,n);return i===void 0?o:i}function P(e){return e==null}var _r="[object String]";function me(e){return typeof e=="string"||!H(e)&&Z(e)&&oe(e)==_r}const Ht={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,o={[N(this.options,"validationErrorClass","error")]:n,[N(this.options,"validationSuccessClass","valid")]:!n,disabled:this.fieldDisabled(e),readonly:this.fieldReadonly(e),featured:this.fieldFeatured(e),required:this.fieldRequired(e)};return Array.isArray(e.styleClasses)?z(e.styleClasses,i=>o[i]=!0):me(e.styleClasses)&&(o[e.styleClasses]=!0),P(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 V(e.disabled)?e.disabled.call(this,this.model,e,this):P(e.disabled)?!1:e.disabled},fieldReadonly(e){return V(e.readonly)?e.readonly.call(this,this.model,e,this):P(e.readonly)?!1:e.readonly},fieldFeatured(e){return V(e.featured)?e.featured.call(this,this.model,e,this):P(e.featured)?!1:e.featured},fieldRequired(e){return V(e.required)?e.required.call(this,this.model,e,this):P(e.required)?!1:e.required}}};function wr(){this.__data__=new ee,this.size=0}function kr(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function Cr(e){return this.__data__.get(e)}function Er(e){return this.__data__.has(e)}var Sr=200;function Tr(e,n){var o=this.__data__;if(o instanceof ee){var i=o.__data__;if(!Ve||i.length<Sr-1)return i.push([e,n]),this.size=++o.size,this;o=this.__data__=new te(i)}return o.set(e,n),this.size=o.size,this}function J(e){var n=this.__data__=new ee(e);this.size=n.size}J.prototype.clear=wr,J.prototype.delete=kr,J.prototype.get=Cr,J.prototype.has=Er,J.prototype.set=Tr;var ze=function(){try{var e=de(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Yt(e,n,o){n=="__proto__"&&ze?ze(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}var $r=Object.prototype,Br=$r.hasOwnProperty;function Gt(e,n,o){var i=e[n];(!(Br.call(e,n)&&Me(i,o))||o===void 0&&!(n in e))&&Yt(e,n,o)}function je(e,n,o,i){var a=!o;o||(o={});for(var r=-1,s=n.length;++r<s;){var l=n[r],d=i?i(o[l],e[l],l,o,e):void 0;d===void 0&&(d=e[l]),a?Yt(o,l,d):Gt(o,l,d)}return o}function Nr(e,n){return e&&je(n,we(n),e)}function Mr(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}var Vr=Object.prototype,Ir=Vr.hasOwnProperty;function Ar(e){if(!q(e))return Mr(e);var n=Le(e),o=[];for(var i in e)i=="constructor"&&(n||!Ir.call(e,i))||o.push(i);return o}function Ke(e){return _e(e)?Dt(e,!0):Ar(e)}function Or(e,n){return e&&je(n,Ke(n),e)}var Wt=typeof U=="object"&&U&&!U.nodeType&&U,Zt=Wt&&typeof module=="object"&&module&&!module.nodeType&&module,Fr=Zt&&Zt.exports===Wt,Jt=Fr?Y.Buffer:void 0,Xt=Jt?Jt.allocUnsafe:void 0;function Ur(e,n){if(n)return e.slice();var o=e.length,i=Xt?Xt(o):new e.constructor(o);return e.copy(i),i}function Dr(e,n){var o=-1,i=e.length;for(n||(n=Array(i));++o<i;)n[o]=e[o];return n}function Lr(e,n){for(var o=-1,i=e==null?0:e.length,a=0,r=[];++o<i;){var s=e[o];n(s,o,e)&&(r[a++]=s)}return r}function Qt(){return[]}var vr=Object.prototype,Pr=vr.propertyIsEnumerable,en=Object.getOwnPropertySymbols,at=en?function(e){return e==null?[]:(e=Object(e),Lr(en(e),function(n){return Pr.call(e,n)}))}:Qt;function qr(e,n){return je(e,at(e),n)}function tn(e,n){for(var o=-1,i=n.length,a=e.length;++o<i;)e[a+o]=n[o];return e}var Rr=Lt(Object.getPrototypeOf,Object);const nn=Rr;var xr=Object.getOwnPropertySymbols,on=xr?function(e){for(var n=[];e;)tn(n,at(e)),e=nn(e);return n}:Qt;function zr(e,n){return je(e,on(e),n)}function rn(e,n,o){var i=n(e);return H(e)?i:tn(i,o(e))}function lt(e){return rn(e,we,at)}function jr(e){return rn(e,Ke,on)}var st=de(Y,"DataView"),dt=de(Y,"Promise"),ke=de(Y,"Set"),ct=de(Y,"WeakMap"),an="[object Map]",Kr="[object Object]",ln="[object Promise]",sn="[object Set]",dn="[object WeakMap]",cn="[object DataView]",Hr=se(st),Yr=se(Ve),Gr=se(dt),Wr=se(ke),Zr=se(ct),he=oe;(st&&he(new st(new ArrayBuffer(1)))!=cn||Ve&&he(new Ve)!=an||dt&&he(dt.resolve())!=ln||ke&&he(new ke)!=sn||ct&&he(new ct)!=dn)&&(he=function(e){var n=oe(e),o=n==Kr?e.constructor:void 0,i=o?se(o):"";if(i)switch(i){case Hr:return cn;case Yr:return an;case Gr:return ln;case Wr:return sn;case Zr:return dn}return n});const Ce=he;var Jr=Object.prototype,Xr=Jr.hasOwnProperty;function Qr(e){var n=e.length,o=new e.constructor(n);return n&&typeof e[0]=="string"&&Xr.call(e,"index")&&(o.index=e.index,o.input=e.input),o}var He=Y.Uint8Array;function mt(e){var n=new e.constructor(e.byteLength);return new He(n).set(new He(e)),n}function ea(e,n){var o=n?mt(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var ta=/\w*$/;function na(e){var n=new e.constructor(e.source,ta.exec(e));return n.lastIndex=e.lastIndex,n}var mn=W?W.prototype:void 0,hn=mn?mn.valueOf:void 0;function oa(e){return hn?Object(hn.call(e)):{}}function ia(e,n){var o=n?mt(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var ra="[object Boolean]",aa="[object Date]",la="[object Map]",sa="[object Number]",da="[object RegExp]",ca="[object Set]",ma="[object String]",ha="[object Symbol]",ua="[object ArrayBuffer]",pa="[object DataView]",fa="[object Float32Array]",ga="[object Float64Array]",ya="[object Int8Array]",ba="[object Int16Array]",_a="[object Int32Array]",wa="[object Uint8Array]",ka="[object Uint8ClampedArray]",Ca="[object Uint16Array]",Ea="[object Uint32Array]";function Sa(e,n,o){var i=e.constructor;switch(n){case ua:return mt(e);case ra:case aa:return new i(+e);case pa:return ea(e,o);case fa:case ga:case ya:case ba:case _a:case wa:case ka:case Ca:case Ea:return ia(e,o);case la:return new i;case sa:case ma:return new i(e);case da:return na(e);case ca:return new i;case ha:return oa(e)}}var un=Object.create,Ta=function(){function e(){}return function(n){if(!q(n))return{};if(un)return un(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}}();function $a(e){return typeof e.constructor=="function"&&!Le(e)?Ta(nn(e)):{}}var Ba="[object Map]";function Na(e){return Z(e)&&Ce(e)==Ba}var pn=be&&be.isMap,Ma=pn?et(pn):Na,Va="[object Set]";function Ia(e){return Z(e)&&Ce(e)==Va}var fn=be&&be.isSet,Aa=fn?et(fn):Ia,Oa=1,Fa=2,Ua=4,gn="[object Arguments]",Da="[object Array]",La="[object Boolean]",va="[object Date]",Pa="[object Error]",yn="[object Function]",qa="[object GeneratorFunction]",Ra="[object Map]",xa="[object Number]",bn="[object Object]",za="[object RegExp]",ja="[object Set]",Ka="[object String]",Ha="[object Symbol]",Ya="[object WeakMap]",Ga="[object ArrayBuffer]",Wa="[object DataView]",Za="[object Float32Array]",Ja="[object Float64Array]",Xa="[object Int8Array]",Qa="[object Int16Array]",el="[object Int32Array]",tl="[object Uint8Array]",nl="[object Uint8ClampedArray]",ol="[object Uint16Array]",il="[object Uint32Array]",D={};D[gn]=D[Da]=D[Ga]=D[Wa]=D[La]=D[va]=D[Za]=D[Ja]=D[Xa]=D[Qa]=D[el]=D[Ra]=D[xa]=D[bn]=D[za]=D[ja]=D[Ka]=D[Ha]=D[tl]=D[nl]=D[ol]=D[il]=!0,D[Pa]=D[yn]=D[Ya]=!1;function Ie(e,n,o,i,a,r){var s,l=n&Oa,d=n&Fa,c=n&Ua;if(o&&(s=a?o(e,i,a,r):o(e)),s!==void 0)return s;if(!q(e))return e;var h=H(e);if(h){if(s=Qr(e),!l)return Dr(e,s)}else{var y=Ce(e),b=y==yn||y==qa;if($e(e))return Ur(e,l);if(y==bn||y==gn||b&&!a){if(s=d||b?{}:$a(e),!l)return d?zr(e,Or(s,e)):qr(e,Nr(s,e))}else{if(!D[y])return a?e:{};s=Sa(e,y,l)}}r||(r=new J);var B=r.get(e);if(B)return B;r.set(e,s),Aa(e)?e.forEach(function(C){s.add(Ie(C,n,o,C,e,r))}):Ma(e)&&e.forEach(function(C,f){s.set(f,Ie(C,n,o,f,e,r))});var T=c?d?jr:lt:d?Ke:we,_=h?void 0:T(e);return Tt(_||e,function(C,f){_&&(f=C,C=e[f]),Gt(s,f,Ie(C,n,o,f,e,r))}),s}var rl=1,al=4;function ne(e){return Ie(e,rl|al)}const ht=(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,""),_n=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var ut=function(){return Y.Date.now()},ll=/\s/;function sl(e){for(var n=e.length;n--&&ll.test(e.charAt(n)););return n}var dl=/^\s+/;function cl(e){return e&&e.slice(0,sl(e)+1).replace(dl,"")}var wn=NaN,ml=/^[-+]0x[0-9a-f]+$/i,hl=/^0b[01]+$/i,ul=/^0o[0-7]+$/i,pl=parseInt;function pt(e){if(typeof e=="number")return e;if(Pe(e))return wn;if(q(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=q(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=cl(e);var o=hl.test(e);return o||ul.test(e)?pl(e.slice(2),o?2:8):ml.test(e)?wn:+e}var fl="Expected a function",gl=Math.max,yl=Math.min;function Ae(e,n,o){var i,a,r,s,l,d,c=0,h=!1,y=!1,b=!0;if(typeof e!="function")throw new TypeError(fl);n=pt(n)||0,q(o)&&(h=!!o.leading,y="maxWait"in o,r=y?gl(pt(o.maxWait)||0,n):r,b="trailing"in o?!!o.trailing:b);function B(p){var m=i,u=a;return i=a=void 0,c=p,s=e.apply(u,m),s}function T(p){return c=p,l=setTimeout(f,n),h?B(p):s}function _(p){var m=p-d,u=p-c,w=n-m;return y?yl(w,r-u):w}function C(p){var m=p-d,u=p-c;return d===void 0||m>=n||m<0||y&&u>=r}function f(){var p=ut();if(C(p))return k(p);l=setTimeout(f,_(p))}function k(p){return l=void 0,b&&i?B(p):(i=a=void 0,s)}function O(){l!==void 0&&clearTimeout(l),c=0,i=d=a=l=void 0}function F(){return l===void 0?s:k(ut())}function g(){var p=ut(),m=C(p);if(i=arguments,a=this,d=p,m){if(l===void 0)return T(d);if(y)return clearTimeout(l),l=setTimeout(f,n),B(d)}return l===void 0&&(l=setTimeout(f,n)),s}return g.cancel=O,g.flush=F,g}var bl="__lodash_hash_undefined__";function _l(e){return this.__data__.set(e,bl),this}function wl(e){return this.__data__.has(e)}function Oe(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new te;++n<o;)this.add(e[n])}Oe.prototype.add=Oe.prototype.push=_l,Oe.prototype.has=wl;function kn(e,n,o,i){for(var a=e.length,r=o+(i?1:-1);i?r--:++r<a;)if(n(e[r],r,e))return r;return-1}function kl(e){return e!==e}function Cl(e,n,o){for(var i=o-1,a=e.length;++i<a;)if(e[i]===n)return i;return-1}function El(e,n,o){return n===n?Cl(e,n,o):kn(e,kl,o)}function Sl(e,n){var o=e==null?0:e.length;return!!o&&El(e,n,0)>-1}function Tl(e,n,o){for(var i=-1,a=e==null?0:e.length;++i<a;)if(o(n,e[i]))return!0;return!1}function Cn(e,n){return e.has(n)}function $l(){}function ft(e){var n=-1,o=Array(e.size);return e.forEach(function(i){o[++n]=i}),o}var Bl=1/0,Nl=ke&&1/ft(new ke([,-0]))[1]==Bl?function(e){return new ke(e)}:$l,Ml=200;function Vl(e,n,o){var i=-1,a=Sl,r=e.length,s=!0,l=[],d=l;if(o)s=!1,a=Tl;else if(r>=Ml){var c=n?null:Nl(e);if(c)return ft(c);s=!1,a=Cn,d=new Oe}else d=n?[]:l;e:for(;++i<r;){var h=e[i],y=n?n(h):h;if(h=o||h!==0?h:0,s&&y===y){for(var b=d.length;b--;)if(d[b]===y)continue e;n&&d.push(y),l.push(h)}else a(d,y,o)||(d!==l&&d.push(y),l.push(h))}return l}function En(e){return e&&e.length?Vl(e):[]}var Il=0;function Sn(e){var n=++Il;return zt(e)+n}function Al(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 Tn=Math.max;function Ol(e,n,o){return n=Tn(n===void 0?e.length-1:n,0),function(){for(var i=arguments,a=-1,r=Tn(i.length-n,0),s=Array(r);++a<r;)s[a]=i[n+a];a=-1;for(var l=Array(n+1);++a<n;)l[a]=i[a];return l[n]=o(s),Al(e,this,l)}}function Fl(e){return function(){return e}}var Ul=ze?function(e,n){return ze(e,"toString",{configurable:!0,enumerable:!1,value:Fl(n),writable:!0})}:ve;const Dl=Ul;var Ll=800,vl=16,Pl=Date.now;function ql(e){var n=0,o=0;return function(){var i=Pl(),a=vl-(i-o);if(o=i,a>0){if(++n>=Ll)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var Rl=ql(Dl);function xl(e,n){return Rl(Ol(e,n,ve),e+"")}function zl(e,n,o){if(!q(o))return!1;var i=typeof n;return(i=="number"?_e(o)&&Xe(n,o.length):i=="string"&&n in o)?Me(o[n],e):!1}var $n=Object.prototype,jl=$n.hasOwnProperty,ie=xl(function(e,n){e=Object(e);var o=-1,i=n.length,a=i>2?n[2]:void 0;for(a&&zl(n[0],n[1],a)&&(i=1);++o<i;)for(var r=n[o],s=Ke(r),l=-1,d=s.length;++l<d;){var c=s[l],h=e[c];(h===void 0||Me(h,$n[c])&&!jl.call(e,c))&&(e[c]=r[c])}return e}),Kl=Y.isFinite;function Hl(e){return typeof e=="number"&&Kl(e)}var Bn=1/0,Yl=17976931348623157e292;function Gl(e){if(!e)return e===0?e:0;if(e=pt(e),e===Bn||e===-Bn){var n=e<0?-1:1;return n*Yl}return e===e?e:0}function Nn(e){var n=Gl(e),o=n%1;return n===n?o?n-o:n:0}function Wl(e){return typeof e=="number"&&e==Nn(e)}var Zl="[object Number]";function gt(e){return typeof e=="number"||Z(e)&&oe(e)==Zl}var Mn=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,re="\\d\\d?",ae="\\d\\d",Jl="\\d{3}",Xl="\\d{4}",Fe="[^\\s]+",Vn=/\[([^]*?)\]/gm;function In(e,n){for(var o=[],i=0,a=e.length;i<a;i++)o.push(e[i].substr(0,n));return o}var An=function(e){return function(n,o){var i=o[e].map(function(r){return r.toLowerCase()}),a=i.indexOf(n.toLowerCase());return a>-1?a:null}};function ue(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];for(var i=0,a=n;i<a.length;i++){var r=a[i];for(var s in r)e[s]=r[s]}return e}var On=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Fn=["January","February","March","April","May","June","July","August","September","October","November","December"],Ql=In(Fn,3),es=In(On,3),Un={dayNamesShort:es,dayNames:On,monthNamesShort:Ql,monthNames:Fn,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},Ye=ue({},Un),ts=function(e){return Ye=ue(Ye,e)},Dn=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},K=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},ns={D:function(e){return String(e.getDate())},DD:function(e){return K(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return K(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 K(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 K(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return K(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return K(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return K(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return K(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return K(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return K(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return K(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?"-":"+")+K(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+K(Math.floor(Math.abs(n)/60),2)+":"+K(Math.abs(n)%60,2)}},Ln=function(e){return+e-1},vn=[null,re],Pn=[null,Fe],qn=["isPm",Fe,function(e,n){var o=e.toLowerCase();return o===n.amPm[0]?0:o===n.amPm[1]?1:null}],Rn=["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}],os={D:["day",re],DD:["day",ae],Do:["day",re+Fe,function(e){return parseInt(e,10)}],M:["month",re,Ln],MM:["month",ae,Ln],YY:["year",ae,function(e){var n=new Date,o=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?o-1:o)+e)}],h:["hour",re,void 0,"isPm"],hh:["hour",ae,void 0,"isPm"],H:["hour",re],HH:["hour",ae],m:["minute",re],mm:["minute",ae],s:["second",re],ss:["second",ae],YYYY:["year",Xl],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",ae,function(e){return+e*10}],SSS:["millisecond",Jl],d:vn,dd:vn,ddd:Pn,dddd:Pn,MMM:["month",Fe,An("monthNamesShort")],MMMM:["month",Fe,An("monthNames")],a:qn,A:qn,ZZ:Rn,Z:Rn},Ge={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"},is=function(e){return ue(Ge,e)},rs=function(e,n,o){if(n===void 0&&(n=Ge.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=Ge[n]||n;var i=[];n=n.replace(Vn,function(r,s){return i.push(s),"@@@"});var a=ue(ue({},Ye),o);return n=n.replace(Mn,function(r){return ns[r](e,a)}),n.replace(/@@@/g,function(){return i.shift()})};function as(e,n,o){if(o===void 0&&(o={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=Ge[n]||n,e.length>1e3)return null;var i=new Date,a={year:i.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],s=[],l=n.replace(Vn,function(F,g){return s.push(Dn(g)),"@@@"}),d={},c={};l=Dn(l).replace(Mn,function(F){var g=os[F],p=g[0],m=g[1],u=g[3];if(d[p])throw new Error("Invalid format. "+p+" specified twice in format");return d[p]=!0,u&&(c[u]=!0),r.push(g),"("+m+")"}),Object.keys(c).forEach(function(F){if(!d[F])throw new Error("Invalid format. "+F+" is required in specified format")}),l=l.replace(/@@@/g,function(){return s.shift()});var h=e.match(new RegExp(l,"i"));if(!h)return null;for(var y=ue(ue({},Ye),o),b=1;b<h.length;b++){var B=r[b-1],T=B[0],_=B[2],C=_?_(h[b],y):+h[b];if(C==null)return null;a[T]=C}a.isPm===1&&a.hour!=null&&+a.hour!=12?a.hour=+a.hour+12:a.isPm===0&&+a.hour==12&&(a.hour=0);var f;if(a.timezoneOffset==null){f=new Date(a.year,a.month,a.day,a.hour,a.minute,a.second,a.millisecond);for(var k=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],b=0,O=k.length;b<O;b++)if(d[k[b][0]]&&a[k[b][0]]!==f[k[b][1]]())return null}else if(f=new Date(Date.UTC(a.year,a.month,a.day,a.hour,a.minute-a.timezoneOffset,a.second,a.millisecond)),a.month>11||a.month<0||a.day>31||a.day<1||a.hour>23||a.hour<0||a.minute>59||a.minute<0||a.second>59||a.second<0)return null;return f}var X={format:rs,parse:as,defaultI18n:Un,setGlobalDateI18n:ts,setGlobalDateMasks:is};const x={fieldIsRequired:"This field is required!",invalidFormat:"Invalid format!",numberTooSmall:"The number is too small! Minimum: {0}",numberTooBig:"The number is too big! Maximum: {0}",invalidNumber:"Invalid number",invalidInteger:"The value is not an integer",textTooSmall:"The length of text is too small! Current: {0}, Minimum: {1}",textTooBig:"The length of text is too big! Current: {0}, Maximum: {1}",thisNotText:"This is not a text!",thisNotArray:"This is not an array!",selectMinItems:"Select minimum {0} items!",selectMaxItems:"Select maximum {0} items!",invalidDate:"Invalid date!",dateIsEarly:"The date is too early! Current: {0}, Minimum: {1}",dateIsLate:"The date is too late! Current: {0}, Maximum: {1}",invalidEmail:"Invalid e-mail address!",invalidURL:"Invalid URL!",invalidCard:"Invalid card format!",invalidCardNumber:"Invalid card number!",invalidTextContainNumber:"Invalid text! Cannot contains numbers or special characters",invalidTextContainSpec:"Invalid text! Cannot contains special characters"};function G(e,n,o=x){return P(e)||e===""?n?[v(o.fieldIsRequired)]:[]:null}function v(e,...n){if(e!=null&&n.length>0)for(let o=0;o<n.length;o++)e=e.replace("{"+(o-1)+"}",n[o]);return e}const pe={resources:x,required(e,n,o,i=x){return G(e,n.required,i)},number(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;const r=[];return Hl(e)?(!P(n.min)&&e<n.min&&r.push(v(i.numberTooSmall,n.min)),!P(n.max)&&e>n.max&&r.push(v(i.numberTooBig,n.max))):r.push(v(i.invalidNumber)),r},integer(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;const r=pe.number(e,n,o,i);return Wl(e)||r.push(v(i.invalidInteger)),r},double(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!gt(e)||isNaN(e))return[v(i.invalidNumber)]},string(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;const r=[];return me(e)?(!P(n.min)&&e.length<n.min&&r.push(v(i.textTooSmall,e.length,n.min)),!P(n.max)&&e.length>n.max&&r.push(v(i.textTooBig,e.length,n.max))):r.push(v(i.thisNotText)),r},array(e,n,o,i=x){if(n.required){if(!Array.isArray(e))return[v(i.thisNotArray)];if(e.length===0)return[v(i.fieldIsRequired)]}if(!P(e)){if(!P(n.min)&&e.length<n.min)return[v(i.selectMinItems,n.min)];if(!P(n.max)&&e.length>n.max)return[v(i.selectMaxItems,n.max)]}},date(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;const r=new Date(e);if(isNaN(r.getDate()))return[v(i.invalidDate)];const s=[];if(!P(n.min)){const l=new Date(n.min);r.valueOf()<l.valueOf()&&s.push(v(i.dateIsEarly,X.format(r),X.format(l)))}if(!P(n.max)){const l=new Date(n.max);r.valueOf()>l.valueOf()&&s.push(v(i.dateIsLate,X.format(r),X.format(l)))}return s},regexp(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!P(n.pattern)&&!new RegExp(n.pattern).test(e))return[v(i.invalidFormat)]},email(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!/^(([^<>()\[\]\\.,;:\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))return[v(i.invalidEmail)]},url(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(e))return[v(i.invalidURL)]},creditCard(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;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[v(i.invalidCard)];let l=0,d,c,h;for(let y=s.length-1;y>=0;y--)d=s.substring(y,y+1),c=parseInt(d,10),h?(c*=2,c>=10?l+=c%10+1:l+=c):l+=c,h=!h;if(!(l%10===0&&s))return[v(i.invalidCardNumber)]},alpha(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!/^[a-zA-Z]*$/.test(e))return[v(i.invalidTextContainNumber)]},alphaNumeric(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!/^[a-zA-Z0-9]*$/.test(e))return[v(i.invalidTextContainSpec)]}};Object.keys(pe).forEach(e=>{const n=pe[e];V(n)&&(n.locale=o=>(i,a,r)=>n(i,a,r,ie(o,x)))});function xn(e){return me(e)?pe[e]!=null?pe[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function yt(e,n,o){let i=N(o.context,"schema.attributes",{});const a=n.value||"input";me(a)&&(i=N(i,a)||i),z(i,(r,s)=>{e.setAttribute(s,r)})}const I={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:yt,updated:yt,componentUpdated:yt}},computed:{value:{cache:!1,get(){let e;return V(N(this.schema,"get"))?e=this.schema.get(this.model):e=N(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),V(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=N(this.formOptions,"validateAsync",!1);let o=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const a=[];Array.isArray(this.schema.validator)?z(this.schema.validator,r=>{a.push(xn(r).bind(this))}):a.push(xn(this.schema.validator).bind(this)),z(a,r=>{if(n)o.push(r(this.value,this.schema,this.model));else{const s=r(this.value,this.schema,this.model);s&&V(s.then)?s.then(l=>{l&&(this.errors=this.errors.concat(l));const d=this.errors.length===0;this.$emit("validated",d,this.errors,this)}):s&&(o=o.concat(s))}})}const i=a=>{let r=[];z(En(a),l=>{Array.isArray(l)&&l.length>0?r=r.concat(l):me(l)&&r.push(l)}),V(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(i):i(o)},debouncedValidate(){V(this.debouncedValidateFunc)||(this.debouncedValidateFunc=Ae(this.validate.bind(this),N(this.schema,"validateDebounceTime",N(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let o=!1;V(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),V(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),N(this.formOptions,"validateAfterChanged",!1)===!0&&(N(this.schema,"validateDebounceTime",N(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 i=this.model;const a=o.split(".");let r=0;const s=a.length;for(;r<s;){const l=a[r];if(r<s-1)i[l]!==void 0||(i[l]={}),i=i[l];else{i[l]=n;return}++r}},getFieldID(e,n=!1){const o=N(this.formOptions,"fieldIdPrefix","");return ht(e,o)+(n?"-"+Sn():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return N(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},ls=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"})),ss={mixins:[I]},ds=["id","autocomplete","disabled","name","required"];function cs(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("input",{id:e.getFieldID(e.schema),type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,name:e.schema.inputName,class:t.normalizeClass(e.schema.fieldClasses),required:e.schema.required},null,10,ds)),[[t.vModelCheckbox,e.value],[s,"input"]])}const S=(e,n)=>{const o=e.__vccOpts||e;for(const[i,a]of n)o[i]=a;return o},ms=S(ss,[["render",cs]]);var hs=4;function zn(e){return Ie(e,hs)}const us={class:"wrapper"},ps=["disabled"],fs=["id","checked","disabled","onChange","name"],gs=["disabled"],ys={class:"info"},bs=t.createElementVNode("div",{class:"arrow"},null,-1),_s={class:"dropList"},ws=["id","checked","disabled","onChange","name"];function ks(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",us,[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,l=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(l)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(l)||null,disabled:e.disabled||null,onChange:d=>r.onChanged(d,l),name:r.getInputName(l)},null,40,fs),[[s,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(l)),1)])],2))),256))],8,ps)):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:a.comboExpanded}]),onClick:n[0]||(n[0]=(...l)=>r.onExpandCombo&&r.onExpandCombo(...l))},[t.createElementVNode("div",ys,t.toDisplayString(r.selectedCount)+" selected",1),bs],2),t.createElementVNode("div",_s,[a.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.items,l=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(l)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(l)||null,disabled:e.disabled||null,onChange:d=>r.onChanged(d,l),name:r.getInputName(l)},null,40,ws),[[s,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(l)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,gs))])),[[s,"wrapper"]])}const Cs=S({mixins:[I],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?_n(this.schema.inputName+"_"+this.getItemValue(e)):_n(this.getItemValue(e))},getItemValue(e){if(q(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(q(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((P(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const o=zn(this.value);o.push(this.getItemValue(n)),this.value=o}else{const o=zn(this.value);o.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",ks]]);function Es(e){const n=t.ref([]),o=t.ref(null),i=_=>me(_)?pe[_]!=null?pe[_]:(console.warn(`'${_}' is not a validator function!`),null):_,a=t.computed({get(){var C,f;let _;return V(N(e.schema,"get"))?_=e.schema.get((C=e.model)==null?void 0:C.value):_=N((f=e.model)==null?void 0:f.value,e.schema.model),B(_)},set(_){const C=a;_=T(_),V(_)?_(_,C):l(_,C)}}),r=_=>{var F;d();const C=(F=e.schema)==null?void 0:F.validator,f=N(e.formOptions,"validateAsync",!1);let k=[];if(C&&e.schema.readonly!==!0&&e.disabled!==!0){const g=[];Array.isArray(C)?z(C,p=>{g.push(i(p))}):g.push(i(C)),z(g,p=>{var m,u;if(f)k.push(p(a.value,e.schema,(m=e.model)==null?void 0:m.value));else{const w=p(a.value,e.schema,(u=e.model)==null?void 0:u.value);w&&V(w.then)?w.then(E=>{E&&(n.value=n.value.concat(E));const M=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:M,errors:n.value,field:e.schema})}):w&&(k=k.concat(w))}})}const O=g=>{var m,u;let p=[];if(z(En(g),w=>{Array.isArray(w)&&w.length>0?p=p.concat(w):me(w)&&p.push(w)}),V((m=e.schema)==null?void 0:m.onValidated)&&e.schema.onValidated((u=e.model)==null?void 0:u.value,p,e.schema),!_){const w=p.length===0;e.emitValidated&&e.emitValidated({isValid:w,errors:p,field:e.schema})}return g=p,p};return f?Promise.all(k).then(O):O(k)},s=()=>{V(o.value)?o.value():o.value=Ae(r,N(e.schema,"validateDebounceTime",N(e.formOptions,"validateDebounceTime",500)))},l=(_,C)=>{var k,O,F;let f=!1;V(e.schema.set)?(e.schema.set((k=e.model)==null?void 0:k.value,_),f=!0):e.schema.model&&(c(e.schema.model,_),f=!0),f&&(e.emitModelUpdated&&((O=e.model)!=null&&O.value)&&e.emitModelUpdated({value:_,model:e.schema.model}),V(e.schema.onChanged)&&e.schema.onChanged((F=e.model)==null?void 0:F.value,_,C,e.schema),N(e.formOptions,"validateAfterChanged",!1)===!0&&(N(e.schema,"validateDebounceTime",N(e.formOptions,"validateDebounceTime",0))>0?s():r()))},d=()=>{n.value.splice(0)},c=(_,C)=>{var p;let f=_.replace(/\[(\w+)\]/g,".$1");f=f.replace(/^\./,"");let k=((p=e.model)==null?void 0:p.value)||{},O=0;const F=f.split("."),g=F.length;for(;O<g;){const m=F[O];if(O<g-1)k[m]!==void 0||(k[m]={}),k=k[m];else{k[m]=C;return}++O}},h=(_,C=!1)=>{const f=N(e.formOptions,"fieldIdPrefix","");return ht(_,f)+(C?"-"+Sn():"")},y=_=>`${h(_)}-label`,b=()=>N(e.schema,"fieldClasses",[]),B=_=>_,T=_=>_;return{value:a,clearValidationErrors:d,getFieldID:h,getLabelId:y,getFieldClasses:b,updateModelValue:l}}const jn={useAbstractFields:Es},Ss={class:"form-field-wrapper"},Kn=S(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 i=e,a=o,r=t.toRefs(i),{updateModelValue:s,getFieldID:l,clearValidationErrors:d,value:c}=jn.useAbstractFields({model:r.model,schema:i.schema,formOptions:i.formOptions,emitModelUpdated:f=>{a("modelUpdated",f.value,f.model)}});n({clearValidationErrors:d});const h=t.computed(()=>{var k;const f=(k=i.schema)==null?void 0:k.inputType.toLowerCase();return f==="string"?"text":f==="datetime"?"datetime-local":f||"text"}),y={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},b=(f,k)=>{var p,m;let O=f;const F=y[h.value]||"",g=X.parse(f,F);g&&((p=i.schema)!=null&&p.format?O=X.format(g,(m=i.schema)==null?void 0:m.format):O=g.valueOf()),s(O,k)},B=(f,k)=>{gt(f)||(f=NaN),s(f,k)},T=f=>{let k=f;switch(h.value){case"number":case"range":gt(parseFloat(f))&&(k=parseFloat(f));break}c.value=k,s(k,f)},_=t.ref(null),C=()=>{var f;V(_.value)&&((f=_.value)==null||f.flush())};return t.onMounted(()=>{switch(h.value){case"number":case"range":_.value=Ae((f,k)=>{B(f,k)},parseInt(N(i.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":_.value=Ae((f,k)=>{b(f,k)},parseInt(N(i.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}}),t.onBeforeMount(()=>{h.value==="checkbox"?console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead."):h.value==="radio"?console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead."):h.value==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}),(f,k)=>{const O=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Ss,[t.createVNode(O,t.mergeProps(f.$attrs,{id:t.unref(l)(e.schema),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||null,help:e.hint?e.hint:h.value==="color"||h.value==="range"?t.unref(c):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(c),name:e.schema.inputName,pattern:e.schema.pattern,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,type:h.value,width:e.schema.width,onBlur:C,"onUpdate:modelValue":T}),null,16,["id","autocomplete","class","disabled","help","max","maxlength","min","minlength","model-value","name","pattern","placeholder","readonly","required","type","width"])])}}}),[["__scopeId","data-v-b6d4701b"]]),Ts=S(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:i,value:a}=jn.useAbstractFields({model:o.model,schema:n.schema,formOptions:n.formOptions});return(r,s)=>{const l=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(l,{id:t.unref(i)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)),1)]),_:1},8,["id"])],2)}}}),[["__scopeId","data-v-852ab959"]]),$s=["disabled"],Bs=["id","disabled","name","onClick","value","checked","required"];function Ns(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:"radio-list",disabled:e.disabled||null},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,l=>t.withDirectives((t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(r.getItemCssClasses(l))},[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"radio",disabled:r.isItemDisabled(l)||null,name:r.id,onClick:d=>r.onSelection(l),value:r.getItemValue(l),checked:r.isItemChecked(l)||null,class:t.normalizeClass(e.schema.fieldClasses),required:e.schema.required},null,10,Bs),[[s,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(l)),1)],2)),[[s,"label"]])),256))],8,$s)),[[s,"wrapper"]])}const Ms=S({mixins:[I],computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e},id(){return this.schema.model}},methods:{getItemValue(e){if(q(e)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.value<"u")return e[this.schema.radiosOptions.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 `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return e},getItemName(e){if(q(e)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.name<"u")return e[this.schema.radiosOptions.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 `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return e},getItemCssClasses(e){return{"is-checked":this.isItemChecked(e),"is-disabled":this.isItemDisabled(e)}},onSelection(e){this.value=this.getItemValue(e)},isItemChecked(e){return this.getItemValue(e)===this.value},isItemDisabled(e){if(this.disabled)return!0;const n=N(e,"disabled",!1);return V(n)?n(this.model):n}}},[["render",Ns]]);function Vs(e,n){for(var o=-1,i=e==null?0:e.length;++o<i;)if(n(e[o],o,e))return!0;return!1}var Is=1,As=2;function Hn(e,n,o,i,a,r){var s=o&Is,l=e.length,d=n.length;if(l!=d&&!(s&&d>l))return!1;var c=r.get(e),h=r.get(n);if(c&&h)return c==n&&h==e;var y=-1,b=!0,B=o&As?new Oe:void 0;for(r.set(e,n),r.set(n,e);++y<l;){var T=e[y],_=n[y];if(i)var C=s?i(_,T,y,n,e,r):i(T,_,y,e,n,r);if(C!==void 0){if(C)continue;b=!1;break}if(B){if(!Vs(n,function(f,k){if(!Cn(B,k)&&(T===f||a(T,f,o,i,r)))return B.push(k)})){b=!1;break}}else if(!(T===_||a(T,_,o,i,r))){b=!1;break}}return r.delete(e),r.delete(n),b}function Os(e){var n=-1,o=Array(e.size);return e.forEach(function(i,a){o[++n]=[a,i]}),o}var Fs=1,Us=2,Ds="[object Boolean]",Ls="[object Date]",vs="[object Error]",Ps="[object Map]",qs="[object Number]",Rs="[object RegExp]",xs="[object Set]",zs="[object String]",js="[object Symbol]",Ks="[object ArrayBuffer]",Hs="[object DataView]",Yn=W?W.prototype:void 0,bt=Yn?Yn.valueOf:void 0;function Ys(e,n,o,i,a,r,s){switch(o){case Hs:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case Ks:return!(e.byteLength!=n.byteLength||!r(new He(e),new He(n)));case Ds:case Ls:case qs:return Me(+e,+n);case vs:return e.name==n.name&&e.message==n.message;case Rs:case zs:return e==n+"";case Ps:var l=Os;case xs:var d=i&Fs;if(l||(l=ft),e.size!=n.size&&!d)return!1;var c=s.get(e);if(c)return c==n;i|=Us,s.set(e,n);var h=Hn(l(e),l(n),i,a,r,s);return s.delete(e),h;case js:if(bt)return bt.call(e)==bt.call(n)}return!1}var Gs=1,Ws=Object.prototype,Zs=Ws.hasOwnProperty;function Js(e,n,o,i,a,r){var s=o&Gs,l=lt(e),d=l.length,c=lt(n),h=c.length;if(d!=h&&!s)return!1;for(var y=d;y--;){var b=l[y];if(!(s?b in n:Zs.call(n,b)))return!1}var B=r.get(e),T=r.get(n);if(B&&T)return B==n&&T==e;var _=!0;r.set(e,n),r.set(n,e);for(var C=s;++y<d;){b=l[y];var f=e[b],k=n[b];if(i)var O=s?i(k,f,b,n,e,r):i(f,k,b,e,n,r);if(!(O===void 0?f===k||a(f,k,o,i,r):O)){_=!1;break}C||(C=b=="constructor")}if(_&&!C){var F=e.constructor,g=n.constructor;F!=g&&"constructor"in e&&"constructor"in n&&!(typeof F=="function"&&F instanceof F&&typeof g=="function"&&g instanceof g)&&(_=!1)}return r.delete(e),r.delete(n),_}var Xs=1,Gn="[object Arguments]",Wn="[object Array]",We="[object Object]",Qs=Object.prototype,Zn=Qs.hasOwnProperty;function ed(e,n,o,i,a,r){var s=H(e),l=H(n),d=s?Wn:Ce(e),c=l?Wn:Ce(n);d=d==Gn?We:d,c=c==Gn?We:c;var h=d==We,y=c==We,b=d==c;if(b&&$e(e)){if(!$e(n))return!1;s=!0,h=!1}if(b&&!h)return r||(r=new J),s||nt(e)?Hn(e,n,o,i,a,r):Ys(e,n,d,o,i,a,r);if(!(o&Xs)){var B=h&&Zn.call(e,"__wrapped__"),T=y&&Zn.call(n,"__wrapped__");if(B||T){var _=B?e.value():e,C=T?n.value():n;return r||(r=new J),a(_,C,o,i,r)}}return b?(r||(r=new J),Js(e,n,o,i,a,r)):!1}function _t(e,n,o,i,a){return e===n?!0:e==null||n==null||!Z(e)&&!Z(n)?e!==e&&n!==n:ed(e,n,o,i,_t,a)}var td=1,nd=2;function od(e,n,o,i){var a=o.length,r=a,s=!i;if(e==null)return!r;for(e=Object(e);a--;){var l=o[a];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<r;){l=o[a];var d=l[0],c=e[d],h=l[1];if(s&&l[2]){if(c===void 0&&!(d in e))return!1}else{var y=new J;if(i)var b=i(c,h,d,e,n,y);if(!(b===void 0?_t(h,c,td|nd,i,y):b))return!1}}return!0}function Jn(e){return e===e&&!q(e)}function id(e){for(var n=we(e),o=n.length;o--;){var i=n[o],a=e[i];n[o]=[i,a,Jn(a)]}return n}function Xn(e,n){return function(o){return o==null?!1:o[e]===n&&(n!==void 0||e in Object(o))}}function rd(e){var n=id(e);return n.length==1&&n[0][2]?Xn(n[0][0],n[0][1]):function(o){return o===e||od(o,e,n)}}function ad(e,n){return e!=null&&n in Object(e)}function ld(e,n,o){n=jt(n,e);for(var i=-1,a=n.length,r=!1;++i<a;){var s=xe(n[i]);if(!(r=e!=null&&o(e,s)))break;e=e[s]}return r||++i!=a?r:(a=e==null?0:e.length,!!a&&Qe(a)&&Xe(s,a)&&(H(e)||Je(e)))}function sd(e,n){return e!=null&&ld(e,n,ad)}var dd=1,cd=2;function md(e,n){return ot(e)&&Jn(n)?Xn(xe(e),n):function(o){var i=N(o,e);return i===void 0&&i===n?sd(o,e):_t(n,i,dd|cd)}}function hd(e){return function(n){return n==null?void 0:n[e]}}function ud(e){return function(n){return Kt(n,e)}}function pd(e){return ot(e)?hd(xe(e)):ud(e)}function Qn(e){return typeof e=="function"?e:e==null?ve:typeof e=="object"?H(e)?md(e[0],e[1]):rd(e):pd(e)}function fd(e){return function(n,o,i){var a=Object(n);if(!_e(n)){var r=Qn(o);n=we(n),o=function(l){return r(a[l],l,a)}}var s=e(n,o,i);return s>-1?a[r?n[s]:s]:void 0}}var gd=Math.max;function yd(e,n,o){var i=e==null?0:e.length;if(!i)return-1;var a=o==null?0:Nn(o);return a<0&&(a=gd(i+a,0)),kn(e,Qn(n),a)}var bd=fd(yd);const _d=["disabled","name","id"],wd=["disabled"],kd=["label"],Cd=["value"],Ed=["value"];function Sd(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("select",{class:t.normalizeClass(["form-control",e.schema.fieldClasses]),"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),disabled:e.disabled||null,name:e.schema.inputName,id:e.getFieldID(e.schema)},[r.selectOptions.hideNoneSelectedText?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("option",{key:0,disabled:e.schema.required||null,value:null},t.toDisplayString(r.selectOptions.noneSelectedText||"<Nothing selected>"),9,wd)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,l=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[l.group?(t.openBlock(),t.createElementBlock("optgroup",{key:0,label:r.getGroupName(l)},[l.ops?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(l.ops,d=>(t.openBlock(),t.createElementBlock("option",{value:r.getItemValue(d)},t.toDisplayString(r.getItemName(d)),9,Cd))),256)):t.createCommentVNode("",!0)],8,kd)):t.createCommentVNode("",!0),l.group?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("option",{key:1,value:r.getItemValue(l)},t.toDisplayString(r.getItemName(l)),9,Ed))],64))),256))],10,_d)),[[t.vModelSelect,e.value],[s,"input"]])}const eo=S({mixins:[I],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const e=this.schema.values;return typeof e=="function"?this.groupValues(e.apply(this,[this.model,this.schema])):this.groupValues(e)}},methods:{formatValueToField(e){return P(e)?null:e},groupValues(e){const n=[];let o={};return e.forEach(i=>{o=null,i.group&&q(i)?(o=bd(n,a=>a.group===i.group),o?o.ops.push({id:i.id,name:i.name}):(o={group:"",ops:[]},o.group=i.group,o.ops.push({id:i.id,name:i.name}),n.push(o))):n.push(i)}),n},getGroupName(e){if(e&&e.group)return e.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(e){if(q(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return e[this.schema.selectOptions.value];if(typeof e.id<"u")return e.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 e},getItemName(e){if(q(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return e[this.schema.selectOptions.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 `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return e}}},[["render",Sd]]);var Td="[object Map]",$d="[object Set]",Bd=Object.prototype,Nd=Bd.hasOwnProperty;function Md(e){if(e==null)return!0;if(_e(e)&&(H(e)||typeof e=="string"||typeof e.splice=="function"||$e(e)||nt(e)||Je(e)))return!e.length;var n=Ce(e);if(n==Td||n==$d)return!e.size;if(Le(e))return!vt(e).length;for(var o in e)if(Nd.call(e,o))return!1;return!0}const Vd=["id","value","name","disabled"];function Id(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("input",{id:e.getFieldID(e.schema),type:"submit",value:e.schema.buttonText,onClick:n[0]||(n[0]=(...s)=>r.onClick&&r.onClick(...s)),name:e.schema.inputName,disabled:e.disabled||null,class:t.normalizeClass(e.schema.fieldClasses)},null,10,Vd)}const Ad=S({mixins:[I],methods:{onClick(e){if(this.schema.validateBeforeSubmit===!0){e.preventDefault();const n=N(this.formOptions,"validateAsync",!1),o=this.vfg.validate(),i=a=>{n&&!Md(a)||!n&&!a?V(this.schema.onValidationError)&&this.schema.onValidationError(this.model,this.schema,a,e):V(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,e)};o&&V(o.then)?o.then(i):i(o)}else V(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,e)}}},[["render",Id]]),Od=["id","disabled","maxlength","minlength","placeholder","readonly","required","rows","name"];function Fd(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("textarea",{class:t.normalizeClass(["form-control",e.schema.fieldClasses]),"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),id:e.getFieldID(e.schema),disabled:e.disabled||null,maxlength:e.schema.max,minlength:e.schema.min,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,rows:e.schema.rows||2,name:e.schema.inputName},null,10,Od)),[[t.vModelText,e.value],[s,"input"]])}const to=S({mixins:[I]},[["render",Fd]]),Ud={class:"wrapper"},Dd=["id","name","accept","multiple","placeholder","readonly","required","disabled"];function Ld(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",Ud,[t.withDirectives(t.createElementVNode("input",{class:"form-control",id:e.getFieldID(e.schema),type:"file",name:e.schema.inputName,onChange:n[0]||(n[0]=(...l)=>r.onChange&&r.onChange(...l)),accept:e.schema.accept,multiple:e.schema.multiple,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,disabled:e.disabled||null},null,40,Dd),[[s,"input"]])])),[[s,"wrapper"]])}const vd=S({mixins:[I],methods:{onChange(e){V(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,e,this)}}},[["render",Ld]]),Pd=["value","autocomplete","disabled","placeholder","readonly","name","id"];function qd(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("input",{class:"form-control",type:"text",value:e.value,autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,Pd)}const Rd=S({mixins:[I],data(){return{cleave:null}},mounted(){this.$nextTick(function(){window.Cleave?(this.cleave=new window.Cleave(this.$el,ie(this.schema.cleaveOptions||{},{creditCard:!1,phone:!1,phoneRegionCode:"AU",date:!1,datePattern:["d","m","Y"],numeral:!1,numeralThousandsGroupStyle:"thousand",numeralDecimalScale:2,numeralDecimalMark:".",blocks:[],delimiter:" ",prefix:null,numericOnly:!1,uppercase:!1,lowercase:!1,maxLength:0})),this.cleave.properties&&this.cleave.properties.hasOwnProperty.call("result")?this.$watch("cleave.properties.result",()=>{this.value=this.cleave.properties.result}):this.$el.addEventListener("input",this.inputChange)):console.warn("Cleave is missing. Please download from https://github.com/nosir/cleave.js/ and load the script in the HTML head section!")})},beforeUnmount(){this.cleave&&(this.cleave.destroy(),this.$el.removeEventListener("input",this.inputChange))},methods:{inputChange(){this.value=this.$el.value}}},[["render",qd]]),no={formatValueToField(e){if(e!=null){const n=this.schema.format?X.parse(e,this.schema.format):new Date(e);return X.format(n,this.getDateFormat())}return e},formatValueToModel(e){if(e!=null){const n=X.parse(e,this.getDateFormat());this.schema.format?e=X.format(n,this.schema.format):e=n.valueOf()}return e}},xd={class:"input-group date"},zd=["autocomplete","disabled","placeholder","readonly","name","id"],jd=t.createElementVNode("span",{class:"input-group-addon"},[t.createElementVNode("span",{class:"glyphicon glyphicon-calendar"})],-1);function Kd(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("div",xd,[t.withDirectives(t.createElementVNode("input",{class:"form-control",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,zd),[[t.vModelText,e.value]]),jd])}const oo="YYYY-MM-DD HH:mm:ss",Hd={mixins:[I],mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.datetimepicker){const e=this.$el.querySelector(".form-control");$(this.$el).datetimepicker(ie(this.schema.dateTimePickerOptions||{},{format:oo})).on("dp.change",()=>{this.value=e.value})}else console.warn("Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.datetimepicker&&$(this.$el).data("DateTimePicker").destroy()},methods:{getDateFormat(){return this.schema.dateTimePickerOptions&&this.schema.dateTimePickerOptions.format?this.schema.dateTimePickerOptions.format:oo},...no}},Yd=S(Hd,[["render",Kd]]),Gd=["autocomplete","disabled","placeholder","readonly","name","id"];function Wd(e,n,o,i,a,r){return t.withDirectives((t.openBlock(),t.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,debounce:"500",onFocus:n[1]||(n[1]=s=>r.geolocate()),id:e.getFieldID(e.schema)},null,40,Gd)),[[t.vModelText,e.value]])}const Zd=S({mixins:[I],data(){return{autocomplete:"",inputs:{street_number:"long_name",route:"long_name",country:"long_name",administrative_area_level_1:"long_name",administrative_area_level_2:"long_name",locality:"long_name",postal_code:"short_name"}}},mounted(){this.$nextTick(()=>{window.google&&window.google.maps&&window.google.maps.places&&window.google.maps.places.Autocomplete?(this.autocomplete=new google.maps.places.Autocomplete(this.$el,{types:["geocode"]}),this.autocomplete.addListener("place_changed",this.pipeAddress)):console.warn("Google Maps API is missing. Please add https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&libraries=places script in the HTML head section!")})},methods:{pipeAddress(){const e=this.autocomplete.getPlace();if(e){this.value=e.formatted_address;const n={};if(e.address_components!==void 0)for(let o=0;o<e.address_components.length;o++){const i=e.address_components[o].types[0];this.inputs[i]&&(n[i]=e.address_components[o][this.inputs[i]])}V(this.schema.onPlaceChanged)&&this.schema.onPlaceChanged(this.value,n,e,this.model,this.schema)}},geolocate(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(e=>{const n={lat:e.coords.latitude,lng:e.coords.longitude},o=new window.google.maps.Circle({center:n,radius:e.coords.accuracy});this.autocomplete.setBounds(o.getBounds())})}}},[["render",Wd]]),Jd={class:"wrapper"},Xd=["autocomplete","disabled","placeholder","readonly"],Qd=["disabled","name"];function ec(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("div",Jd,[t.withDirectives(t.createElementVNode("input",{class:"form-control link",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>r.wrappedValue=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly},null,8,Xd),[[t.vShow,e.schema.hideInput!==!0],[t.vModelText,r.wrappedValue]]),e.schema.browse!==!1?(t.openBlock(),t.createElementBlock("input",{key:0,class:"form-control file",type:"file",disabled:e.disabled||null,onChange:n[1]||(n[1]=(...s)=>r.fileChanged&&r.fileChanged(...s)),name:e.schema.inputName},null,40,Qd)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"preview",style:t.normalizeStyle(r.previewStyle)},[t.createElementVNode("div",{class:"remove",title:"Remove image",onClick:n[2]||(n[2]=(...s)=>r.remove&&r.remove(...s))})],4)])}const tc=S({mixins:[I],computed:{previewStyle(){return this.schema.preview!==!1?{display:"block","background-image":this.value!=null?"url("+this.value+")":"none"}:{display:"none"}},wrappedValue:{get(){return this.value&&this.value.indexOf("data")===0?"<inline base64 image>":this.value},set(e){e&&e.indexOf("http")===0&&(this.value=e)}}},watch:{model:{deep:!0,handler(){const e=this.$el.querySelector("input.file");e&&(e.value="")}}},methods:{remove(){this.value=""},fileChanged(e){const n=new FileReader;n.onload=o=>{this.value=o.target.result},e.target.files&&e.target.files.length>0&&n.readAsDataURL(e.target.files[0])}}},[["render",ec]]),nc=["autocomplete","disabled","placeholder","readonly","name","id"];function oc(e,n,o,i,a,r){return t.withDirectives((t.openBlock(),t.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,nc)),[[t.vModelText,e.value]])}const ic=S({mixins:[I],mounted(){this.$nextTick(function(){window.$&&window.$.fn.mask?$(this.$el).unmask().mask(this.schema.mask,this.schema.maskOptions):console.warn("JQuery MaskedInput library is missing. Please download from https://github.com/digitalBush/jquery.maskedinput and load the script in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.mask&&$(this.$el).unmask()}},[["render",oc]]),rc={mixins:[I],data(){return{slider:null}},computed:{containPips(){return this.schema.noUiSliderOptions&&typeof this.schema.noUiSliderOptions.pips<"u"},containTooltip(){return this.schema.noUiSliderOptions&&this.schema.noUiSliderOptions.tooltips}},watch:{model:{handler(){window.noUiSlider&&this.slider&&this.slider.noUiSlider&&this.slider.noUiSlider.set(this.value)},deep:!0}},mounted(){this.$nextTick(()=>{window.noUiSlider?(this.slider=this.$el,window.noUiSlider.create(this.slider,ie(this.schema.noUiSliderOptions||{},{start:this.getStartValue(),range:{min:this.schema.min,max:this.schema.max}})),this.slider.noUiSlider.on("change",this.onChange.bind(this))):console.warn("noUiSlider is missing. Please download from https://github.com/leongersen/noUiSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.noUiSlider.off("change")},methods:{onChange(e){Array.isArray(e)?this.value=[parseFloat(e[0]),parseFloat(e[1])]:this.value=parseFloat(e)},formatValueToField(e){this.slider!==null&&typeof this.slider.noUiSlider<"u"&&this.slider.noUiSlider.set(e)},formatValueToModel(e){if(typeof this.slider.noUiSlider<"u")return e instanceof Array?[Number(e[0]),Number(e[1])]:Number(e)},getStartValue(){return this.value!=null?this.value:typeof this.schema.noUiSliderOptions<"u"&&this.schema.noUiSliderOptions.double?[this.schema.min,this.schema.min]:this.schema.min}}},ac=["disabled"];function lc(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["slider",{"contain-pips":r.containPips,"contain-tooltip":r.containTooltip}]),disabled:e.disabled||null},null,10,ac)}const sc=S(rc,[["render",lc]]),dc=["autocomplete","disabled","placeholder","readonly","name"];function cc(e,n,o,i,a,r){return t.withDirectives((t.openBlock(),t.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName},null,8,dc)),[[t.vModelText,e.value]])}const mc="YYYY-MM-DD",hc={mixins:[I],data(){return{picker:null,options:null}},mounted(){this.initialize(N(this.schema,"pikadayOptions",{}))},beforeUnmount(){this.picker&&this.picker.destroy()},methods:{getDateFormat(){return N(this.schema,"pikadayOptions.format",mc)},...no,initialize(e){this.picker&&this.picker.destroy&&this.picker.destroy(),this.$nextTick(()=>{window.Pikaday?(this.options=ie({},e,{field:this.$el,onSelect:()=>{this.value=this.picker.toString()}}),this.picker=new window.Pikaday(this.options)):console.warn("Pikaday is missing. Please download from https://github.com/dbushell/Pikaday/ and load the script and CSS in the HTML head section!")})}}},uc=S(hc,[["render",cc]]),pc=["autocomplete","data-disable","data-max","data-min","data-step","placeholder","readonly","name"];function fc(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("input",{type:"text",autocomplete:e.schema.autocomplete,"data-disable":e.disabled,"data-max":e.schema.max,"data-min":e.schema.min,"data-step":e.schema.step,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName},null,8,pc)}const gc=S({mixins:[I],data(){return{slider:null}},watch:{model:{deep:!0,handler(){if(window.$&&window.$.fn.ionRangeSlider){let e,n;Array.isArray(this.value)?[e,n]=this.value:e=this.value,this.slider&&this.slider.update({from:e,to:n})}}}},mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.ionRangeSlider){let e,n;Array.isArray(this.value)?[e,n]=this.value:e=this.value;const o=this;$(this.$el).ionRangeSlider(ie(this.schema.rangeSliderOptions||{},{type:"single",grid:!0,hide_min_max:!0,from:e,to:n,onChange(i){o.slider.options.type==="double"?o.value=[i.from,i.to]:o.value=i.from}})),this.slider=$(this.$el).data("ionRangeSlider")}else console.warn("ion.rangeSlider library is missing. Please download from https://github.com/IonDen/ion.rangeSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.destroy()}},[["render",fc]]),yc=["disabled","multiple","title","name"],bc=["disabled","selected"],_c=["value"];function wc(e,n,o,i,a,r){return t.withDirectives((t.openBlock(),t.createElementBlock("select",{class:"selectpicker","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),disabled:e.disabled||null,multiple:e.schema.multiSelect,title:e.schema.placeholder,"data-width":"100%",name:e.schema.inputName},[e.schema.multiSelect!==!0?(t.openBlock(),t.createElementBlock("option",{key:0,disabled:e.schema.required||null,value:null,selected:e.value==null},null,8,bc)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock("option",{value:r.getItemValue(s)},t.toDisplayString(r.getItemName(s)),9,_c))),256))],8,yc)),[[t.vModelSelect,e.value]])}const kc=S({mixins:[I],computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e}},watch:{model:{deep:!0,handler(){$.fn.selectpicker&&$(this.$el).selectpicker("refresh")}}},mounted(){this.$nextTick(function(){$.fn.selectpicker?$(this.$el).selectpicker("destroy").selectpicker(this.schema.selectOptions):console.warn("Bootstrap-select library is missing. Please download from https://silviomoreto.github.io/bootstrap-select/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){$.fn.selectpicker&&$(this.$el).selectpicker("destroy")},methods:{getItemValue(e){if(q(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return e[this.schema.selectOptions.value];if(typeof e.id<"u")return e.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 e},getItemName(e){if(q(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return e[this.schema.selectOptions.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 `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return e}}},[["render",wc]]),Cc=["autocomplete","disabled","placeholder","readonly","name","id"];function Ec(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("input",{type:"text",autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,Cc)}const Sc=S({mixins:[I],data(){return{picker:null}},watch:{model:{deep:!0,handler(){window.$&&window.$.fn.spectrum&&this.picker.spectrum("set",this.value)}},disabled(e){e?this.picker.spectrum("disable"):this.picker.spectrum("enable")}},mounted(){this.$nextTick(function(){window.$&&window.$.fn.spectrum?(this.picker=$(this.$el).spectrum("destroy").spectrum(ie(this.schema.colorOptions||{},{showInput:!0,showAlpha:!0,disabled:this.schema.disabled,allowEmpty:!this.schema.required,preferredFormat:"hex",change:e=>{this.value=e?e.toString():null}})),this.picker.spectrum("set",this.value)):console.warn("Spectrum color library is missing. Please download from http://bgrins.github.io/spectrum/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.picker&&this.picker.spectrum("destroy")}},[["render",Ec]]),Tc=["src"];function $c(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("img",{src:r.mapLink},null,8,Tc)}const Bc=S({mixins:[I],computed:{mapLink(){let e,n,o;if(this.value){const i=ie(this.schema.staticMapOptions||{},{lat:"lat",lng:"lng",zoom:8,sizeX:640,sizeY:640});e=this.value[i.lat],n=this.value[i.lng],o=`http://maps.googleapis.com/maps/api/staticmap?center=${e},${n}&zoom=${i.zoom}&size=${i.sizeX}x${i.sizeY}`;const a=["scale","format","maptype","language","region","markers","path","visible","style","key","signature"];for(const r of a)typeof i[r]<"u"&&(o+=`&${r}=${i[r]}`)}return o}}},[["render",$c]]),Nc=["autocomplete","disabled","name","id"],Mc=["data-on","data-off","for"],Vc=t.createElementVNode("span",{class:"handle"},null,-1);function Ic(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("label",null,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,Nc),[[t.vModelCheckbox,e.value]]),t.createElementVNode("span",{class:"label","data-on":e.schema.textOn||"On","data-off":e.schema.textOff||"Off",for:e.getFieldID(e.schema)},null,8,Mc),Vc])}const Ac=S({mixins:[I],methods:{formatValueToField(e){return e!=null&&this.schema.valueOn?e===this.schema.valueOn:e},formatValueToModel(e){return e!=null&&this.schema.valueOn?e?this.schema.valueOn:this.schema.valueOff:e}}},[["render",Ic]]),Oc={mixins:[I],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 i=e[o];n[i]=typeof this.value[i]}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=""}}},Fc={key:0},Uc={key:1},Dc=["id"],Lc={key:0},vc=["onUpdate:modelValue"],Pc={key:1},qc=["onUpdate:modelValue"],Rc={key:2},xc=["onUpdate:modelValue"],zc=["onClick"],jc=[t.createElementVNode("option",{value:"string"}," String ",-1),t.createElementVNode("option",{value:"number"}," Number ",-1),t.createElementVNode("option",{value:"boolean"}," Boolean ",-1)];function Kc(e,n,o,i,a,r){const s=t.resolveComponent("vue-form-generator"),l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",null,[e.schema.schema?(t.openBlock(),t.createElementBlock("div",Fc,[t.createVNode(s,{model:e.value,options:e.formOptions,schema:e.schema.schema},null,8,["model","options","schema"])])):(t.openBlock(),t.createElementBlock("div",Uc,[t.createElementVNode("table",{id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(d,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[t.createElementVNode("td",null,t.toDisplayString(c),1),a.keyTypes[c]==="string"?(t.openBlock(),t.createElementBlock("td",Lc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":h=>e.value[c]=h,type:"text"},null,8,vc),[[t.vModelText,e.value[c]]])])):t.createCommentVNode("",!0),a.keyTypes[c]==="boolean"?(t.openBlock(),t.createElementBlock("td",Pc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":h=>e.value[c]=h,type:"checkbox"},null,8,qc),[[t.vModelCheckbox,e.value[c]]])])):t.createCommentVNode("",!0),a.keyTypes[c]==="number"?(t.openBlock(),t.createElementBlock("td",Rc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":h=>e.value[c]=h,type:"number"},null,8,xc),[[t.vModelText,e.value[c]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:h=>r.removeElement(c)},null,8,zc)])]))),128))],10,Dc),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":n[0]||(n[0]=d=>a.newKeyType=d)},jc,512),[[t.vModelSelect,a.newKeyType]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[1]||(n[1]=d=>a.newKeyName=d),type:"text"},null,512),[[t.vModelText,a.newKeyName]]),t.createElementVNode("input",{type:"button",value:"Add key",onClick:n[2]||(n[2]=(...d)=>r.addKey&&r.addKey(...d))})]))])),[[l,a.attributes]])}const io=S(Oc,[["render",Kc]]),Ee="24px",wt=(e,n)=>{const o=e.__vccOpts||e;for(const[i,a]of n)o[i]=a;return o},Hc=e=>(t.pushScopeId("data-v-1d2a8d30"),e=e(),t.popScopeId(),e),Yc=["aria-hidden"],Gc={key:0,"data-testid":"kui-icon-svg-title"},Wc=Hc(()=>t.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),Zc=t.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ee,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),r=Number(a);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return Ee}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Gc,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Wc],8,Yc))]),_:1},8,["aria-hidden","style"]))}}),ro=wt(Zc,[["__scopeId","data-v-1d2a8d30"]]),Jc=e=>(t.pushScopeId("data-v-ddb48b32"),e=e(),t.popScopeId(),e),Xc=["aria-hidden"],Qc={key:0,"data-testid":"kui-icon-svg-title"},em=Jc(()=>t.createElementVNode("path",{d:"M5 13V11H19V13H5Z",fill:"currentColor"},null,-1)),tm=t.defineComponent({__name:"RemoveIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ee,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),r=Number(a);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return Ee}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon remove-icon","data-testid":"kui-icon-wrapper-remove-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-remove-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Qc,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),em],8,Xc))]),_:1},8,["aria-hidden","style"]))}}),nm=wt(tm,[["__scopeId","data-v-ddb48b32"]]),om=e=>(t.pushScopeId("data-v-b199fa56"),e=e(),t.popScopeId(),e),im=["aria-hidden"],rm={key:0,"data-testid":"kui-icon-svg-title"},am=om(()=>t.createElementVNode("path",{d:"M7 21C6.45 21 5.97917 20.8042 5.5875 20.4125C5.19583 20.0208 5 19.55 5 19V6H4V4H9V3H15V4H20V6H19V19C19 19.55 18.8042 20.0208 18.4125 20.4125C18.0208 20.8042 17.55 21 17 21H7ZM17 6H7V19H17V6ZM9 17H11V8H9V17ZM13 17H15V8H13V17Z",fill:"currentColor"},null,-1)),lm=t.defineComponent({__name:"TrashIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ee,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),r=Number(a);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return Ee}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon trash-icon","data-testid":"kui-icon-wrapper-trash-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-trash-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",rm,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),am],8,im))]),_:1},8,["aria-hidden","style"]))}}),Ue=wt(lm,[["__scopeId","data-v-b199fa56"]]),sm={components:{TrashIcon:Ue},mixins:[I],emits:["model-updated"],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]}},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){const i={};return Object.keys(e).map(a=>{const r=a.indexOf(o+"-");if(r>-1&&Array.isArray(n))if(n.length>0){const l=a.split("-").filter(c=>n.find(h=>h.model===c)),d=a.split(`-${l}`)[0].split(`${o}-`)[1];l.length?i[d]={...i[d],[l]:e[a]}:i[a.substring(r+`${o}-`.length)]=e[a]}else i[a.substring(`${o}-`.length)]=e[a];else{const l=a.split("-").filter(c=>c===this.schema.model),d=a.split(`-${l}`)[0].split(`${o}-`)[1];d&&(i[d]=e[a])}return a}),i},addKey(){const e=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",n=this.subSchema?e?[""]:{}:"";this.value[this.newKeyName]=n,this.newKeyName=""},updateModel(e,n){this.$emit("model-updated",this.model[this.schema.model],n)}}},ao=e=>(t.pushScopeId("data-v-106caf87"),e=e(),t.popScopeId(),e),dm=["id"],cm=["data-testid"],mm={class:"item-wrapper"},hm={class:"index-wrapper"},um=ao(()=>t.createElementVNode("hr",{class:"divider"},null,-1)),pm={key:0},fm={key:1},gm=["onUpdate:modelValue","placeholder","onInput"],ym={key:0,class:"hint"},bm=ao(()=>t.createElementVNode("hr",{class:"wide-divider"},null,-1)),_m={class:"input-item"},wm=["placeholder"],km={key:0,class:"hint"};function Cm(e,n,o,i,a,r){const s=t.resolveComponent("TrashIcon"),l=t.resolveComponent("KButton"),d=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",{id:e.getFieldID(e.schema),class:t.normalizeClass(["object-advanced-wrapper",e.schema.fieldClasses])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(c,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,"data-testid":`field-object-key-${h}`},[t.createElementVNode("div",null,[t.createElementVNode("div",mm,[t.createElementVNode("div",hm,[t.createElementVNode("strong",null,t.toDisplayString(h),1),t.createElementVNode("div",null,[t.createVNode(l,{appearance:"tertiary",class:"delete",type:"button",onClick:y=>r.removeElement(h)},{icon:t.withCtx(()=>[t.createVNode(s)]),_:2},1032,["onClick"])])]),um,r.subSchema?(t.openBlock(),t.createElementBlock("div",pm,[t.createVNode(d,{model:r.transformedModel[h],options:{helpAsHtml:!0},schema:r.subSchema,onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",fm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":y=>e.value[h]=y,class:"form-control",placeholder:e.schema.fields&&e.schema.fields[0].schema.placeholder,type:"text",onInput:y=>r.updateModel(e.value[h],e.model[e.schema.model])},null,40,gm),[[t.vModelText,e.value[h]]]),e.schema.fields&&e.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",ym,t.toDisplayString(e.schema.fields[0].schema.hint),1)):t.createCommentVNode("",!0)])),bm])])],8,cm))),128)),t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper",{indent:r.hasObjectKeys}])},[t.createElementVNode("div",_m,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>a.newKeyName=c),class:"form-control","data-testid":"keyname-input",placeholder:e.schema.placeholder,type:"text"},null,8,wm),[[t.vModelText,a.newKeyName]]),t.createVNode(l,{appearance:"tertiary","data-testid":"add-key",disabled:!a.newKeyName,onClick:r.addKey},{default:t.withCtx(()=>[t.createTextVNode(" + Add "+t.toDisplayString(e.schema.buttonLabel||e.schema.label),1)]),_:1},8,["disabled","onClick"])]),e.schema.hintText?(t.openBlock(),t.createElementBlock("p",km,t.toDisplayString(e.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,dm)}const lo=S(sm,[["render",Cm],["__scopeId","data-v-106caf87"]]),Em={class:"array-item"},so=S(t.defineComponent({__name:"FieldArrayItem",props:{model:{type:String,default:""}},emits:["remove-item"],setup(e){return(n,o)=>{const i=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Em,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(i,{appearance:"tertiary",class:"delete",onClick:o[0]||(o[0]=a=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ue))]),_:1})])}}}),[["__scopeId","data-v-ec926551"]]),Sm=e=>(t.pushScopeId("data-v-27d212bd"),e=e(),t.popScopeId(),e),Tm={class:"multi-item-wrapper"},$m=Sm(()=>t.createElementVNode("hr",null,null,-1)),co=S(t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,o)=>{const i=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Tm,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(i,{appearance:"danger",class:"delete",onClick:o[0]||(o[0]=a=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createTextVNode(" - Remove Field ")]),_:1}),$m])}}}),[["__scopeId","data-v-27d212bd"]]),Bm={name:"FieldMetric",components:{AddIcon:ro,TrashIcon:Ue},mixins:[I],emits:["remove-item"],data(){return{contentVisible:!1}}},Nm={key:0,class:"content"};function Mm(e,n,o,i,a,r){const s=t.resolveComponent("AddIcon"),l=t.resolveComponent("TrashIcon"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field-dropdown",{active:a.contentVisible}])},[t.createElementVNode("div",{class:"title",onClick:n[0]||(n[0]=c=>a.contentVisible=!a.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(()=>[a.contentVisible?(t.openBlock(),t.createElementBlock("div",Nm,[t.renderSlot(e.$slots,"default"),t.createVNode(d,{appearance:"tertiary",class:"metric-remove-button",onClick:n[1]||(n[1]=c=>e.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(l)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const mo=S(Bm,[["render",Mm]]),le="kong-ui-forms-api",Vm="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function Im(e){return e?e.length===36&&new RegExp(`^${Vm}$`).test(e):!1}const kt=50,fe={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"};function Am(e,n,o){return o?fe.SET_REFERRAL_VALUE:e&&!n||!e&&n?fe.UPDATE_ENTITY:e&&n?fe.CREATE_FROM_ENTITY:fe.CREATE_NOT_FROM_ENTITY}const Om={mixins:[I],inject:[le],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Am(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}},async created(){await this.$nextTick();let e,n;switch(this.fieldState){case fe.UPDATE_ENTITY:if(!this[le]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[le].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 fe.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case fe.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=Ae(this.search,500)),this.performSearch(e)},async search(e){if(e.trim().length===0)return;this.loading=!0;const n=[],o=[],i=this.getInputFields(),a=new Set;Im(e)&&i.includes("id")?o.push((async()=>{const r=await this.fetchExact(e);n.push({...r,label:this.getSuggestionLabel(r),value:r.id})})()):o.push(...i.filter(r=>r!=="id").map(async r=>{(await this.fetchSuggestions(e,r)).forEach(l=>{a.has(l.id)||(a.add(l.id),n.push({...l,label:this.getSuggestionLabel(l),value:l.id}))})})),await Promise.all(o),this.items=n,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e){const n=[];let o=null;if(!this[le])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<kt;){const i=await this[le].getAll(this.entity,{size:kt,offset:o,...e});if(n.push(...i.data.data),o=i.data.offset,!o)break}return n.slice(0,kt)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[le]?(await this[le].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}}},Fm={class:"field-wrap autosuggest"},Um=["data-testid","data-testlabel"],Dm=["data-testid"],Lm={class:"autosuggest__results_message"};function vm(e,n,o,i,a,r){const s=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock("div",Fm,[t.createVNode(s,{id:e.schema.model,ref:"suggestion",modelValue:a.idValue,"onUpdate:modelValue":n[0]||(n[0]=l=>a.idValue=l),clearable:"","enable-filtering":"","filter-function":()=>!0,items:a.items,loading:a.loading,placeholder:e.schema.placeholder,width:"100%",onChange:r.onSelected,onQueryChange:r.onQueryChange},{"item-template":t.withCtx(({item:l})=>[t.createElementVNode("span",{class:"first-part","data-testid":l.id&&`${l.id}-0`,"data-testlabel":l.label},t.toDisplayString(r.getSuggestionLabel(l).split(" - ")[0]),9,Um),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.getSuggestionLabel(l).split(" - ").slice(1),(d,c)=>(t.openBlock(),t.createElementBlock("span",{key:c,class:"field-span","data-testid":l.id&&`${l.id}-${c+1}`||c+1},t.toDisplayString(d),9,Dm))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",Lm,[t.createElementVNode("span",null,t.toDisplayString(a.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const ho=S(Om,[["render",vm],["__scopeId","data-v-647bb712"]]),Pm={class:"array-card-container"},uo=S(t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null}},emits:["remove-item"],setup(e){return(n,o)=>{const i=t.resolveComponent("KCard"),a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Pm,[t.createVNode(i,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(a,{appearance:"tertiary",class:"array-card-remove-button",onClick:o[0]||(o[0]=r=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ue))]),_:1})])}}}),[["__scopeId","data-v-5fa27cb4"]]),qm={mixins:[I],emits:["model-updated"],methods:{updateModel(e){this.$emit("model-updated",e,this.schema.model)},checkOption(e){return this.model[this.schema.model]?e.value.toString()===this.model[this.schema.model].toString():e.checked},onChange(e){let n=e.target.value.split(",");this.schema.array||(n=n.toString()),this.updateModel(n)}}},Rm={class:"selection-group"},xm={class:"form-group"},zm=["id","checked","name","value"];function jm(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("div",Rm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(s,l)=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"option-group"},[t.createElementVNode("div",xm,[t.createElementVNode("label",{class:t.normalizeClass(["k-label",s.name])},[t.createElementVNode("input",{id:e.schema.name+"-"+l,checked:r.checkOption(s),class:"k-input",name:e.schema.name,type:"radio",value:s.value,onChange:n[0]||(n[0]=(...d)=>r.onChange&&r.onChange(...d))},null,40,zm),t.createTextVNode(" "+t.toDisplayString(s.name),1)],2)])]))),128))])}const po=S(qm,[["render",jm],["__scopeId","data-v-7e49acd6"]]),Km={name:"FieldArray",components:{FieldArrayItem:so,FieldArrayMultiItem:co,FieldSelect:eo,FieldMetric:mo,FieldObject:io,FieldObjectAdvanced:lo,FieldAutoSuggest:ho,FieldRadio:po,FieldArrayCardContainer:uo,FieldTextArea:to,FieldInput:Kn},mixins:[I],props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(e,n,o){var a,r,s;let i;return n&&(i=JSON.parse(JSON.stringify(n)),(s=(r=(a=i.schema)==null?void 0:a.fields)==null?void 0:r.map)==null||s.call(r,l=>(l.id=`${l.id||l.model}-${o}`,l))),{...i,set(l,d){e[o]=d},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)},getFieldType(e){return"field-"+e.type},modelUpdated(){}}},Hm=["id"],Ym={key:1},Gm=["onUpdate:modelValue","aria-labelledby","type"],Wm=["value","onClick"],Zm=["onUpdate:modelValue","aria-labelledby"],Jm=["value","onClick"];function Xm(e,n,o,i,a,r){const s=t.resolveComponent("FieldTextArea"),l=t.resolveComponent("KButton");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,(d,c)=>(t.openBlock(),t.createElementBlock("div",{key:c,class:t.normalizeClass(e.schema.fieldItemsClasses)},[e.schema.items&&e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:0,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onRemoveItem:h=>r.removeElement(c)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(e.schema.items)),{"form-options":e.formOptions,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",Ym,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(e.schema.items)),{"form-options":e.formOptions,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:2,"data-testid":`${e.getFieldID(e.schema)}-item-${c}`,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onRemoveItem:h=>r.removeElement(c)},{default:t.withCtx(()=>{var h,y;return[((h=e.schema.inputAttributes)==null?void 0:h.type)==="textarea"?(t.openBlock(),t.createBlock(s,{key:0,"aria-labelledby":e.getLabelId(e.schema),class:"k-input","form-options":e.formOptions,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onModelUpdated:r.modelUpdated},null,8,["aria-labelledby","form-options","model","schema","onModelUpdated"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:1,"onUpdate:modelValue":b=>e.value[c]=b,"aria-labelledby":e.getLabelId(e.schema),ref_for:!0},e.schema.inputAttributes,{type:((y=e.schema.inputAttributes)==null?void 0:y.type)||"text"}),null,16,Gm)),[[t.vModelDynamic,e.value[c]]]),e.schema.showRemoveButton?(t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,ref_for:!0},e.schema.removeElementButtonAttributes,{type:"button",value:e.schema.removeElementButtonLabel||o.removeElementButtonLabel,onClick:b=>r.removeElement(c)}),null,16,Wm)):t.createCommentVNode("",!0)]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:3,ref_for:!0},e.schema.inputAttributes,{"onUpdate:modelValue":h=>e.value[c]=h,"aria-labelledby":e.getLabelId(e.schema),type:"text"}),null,16,Zm)),[[t.vModelText,e.value[c]]]),e.schema.showRemoveButton?(t.openBlock(),t.createElementBlock("input",t.mergeProps({key:4,ref_for:!0},e.schema.removeElementButtonAttributes,{type:"button",value:e.schema.removeElementButtonLabel||o.removeElementButtonLabel,onClick:h=>r.removeElement(c)}),null,16,Jm)):t.createCommentVNode("",!0)],2))),128)),t.createVNode(l,{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,Hm)):t.createCommentVNode("",!0)}const Qm=S(Km,[["render",Xm],["__scopeId","data-v-19b9d61e"]]),eh={mixins:[I],emits:["model-updated"],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)}}},th={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},nh={class:"material-icons"};function oh(e,n,o,i,a,r){const s=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",th,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:n[0]||(n[0]=(...l)=>r.handleOpen&&r.handleOpen(...l))},[t.createElementVNode("i",nh,t.toDisplayString(a.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),t.createElementVNode("span",null,t.toDisplayString(r.titleText),1)]),t.createElementVNode("div",{class:t.normalizeClass(["advanced-field-dropdown",r.openClass])},[t.createVNode(s,{model:e.model,options:{helpAsHtml:!0},schema:e.schema,onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const ih=S(eh,[["render",oh],["__scopeId","data-v-2d8e71e1"]]),rh={mixins:[I],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(e,n){if(n===null){this.fieldModel={...this.model};return}const o=this.schema.fields[e].fields,i=this.schema.fields[n].fields;i&&i.forEach(a=>this.updateModel("",a.model)),o&&o.forEach(a=>this.updateModel(this.fieldModel[a.model],a.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((e,n)=>{e.fields&&e.fields.forEach(o=>{this.model[o.model]&&(this.checkedGroup=n,this.fieldSchema.push(o.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(e,n){this.$emit("model-updated",e,n)}}},ah={class:"selection-group"},lh={class:"form-group horizontal-radios"},sh={class:"radio-group"},dh=["value"],ch={class:"control-help"},mh={class:"option-field"},hh={class:"option-field-container"},uh={class:"form-group"},ph=["value"],fh={class:"control-help"},gh={class:"option-field"},yh={class:"option-field-container"};function bh(e,n,o,i,a,r){const s=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",ah,[e.schema.horizontalRadios?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",lh,[t.createElementVNode("div",sh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.fields,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"option-group"},[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${l.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>a.checkedGroup=c),class:"k-input",type:"radio",value:d},null,8,dh),[[t.vModelRadio,a.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(l.label)+" ",1),t.createElementVNode("div",ch,t.toDisplayString(l.description),1)],2)]))),128))])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.fields,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"option-group"},[t.withDirectives(t.createElementVNode("div",mh,[t.createElementVNode("div",hh,[t.createVNode(s,{model:e.model,options:{helpAsHtml:!0},schema:{fields:l.fields},onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[t.vShow,l.fields&&a.checkedGroup===d]])]))),128))],64)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.schema.fields,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"option-group"},[t.createElementVNode("div",uh,[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${l.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[1]||(n[1]=c=>a.checkedGroup=c),class:"k-input",type:"radio",value:d},null,8,ph),[[t.vModelRadio,a.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(l.label)+" ",1),t.createElementVNode("div",fh,t.toDisplayString(l.description),1)],2)]),t.withDirectives(t.createElementVNode("div",gh,[t.createElementVNode("div",yh,[t.createVNode(s,{model:e.model,options:{helpAsHtml:!0},schema:{fields:l.fields},onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[t.vShow,l.fields&&a.checkedGroup===d]])]))),128))])}const _h=S(rh,[["render",bh],["__scopeId","data-v-22882f4c"]]),wh={mixins:[I],emits:["model-updated"],methods:{onUpdate(e){this.$emit("model-updated",e,this.schema.model)}}};function kh(e,n,o,i,a,r){const s=t.resolveComponent("KMultiselect");return t.openBlock(),t.createBlock(s,{"aria-labelledby":e.getLabelId(e.schema),"data-testid":"field-multiselect",items:e.schema.values,"label-attributes":{info:e.schema.help},"model-value":e.value,placeholder:e.schema.placeholder,required:e.schema.required||void 0,width:"100%","onUpdate:modelValue":r.onUpdate},null,8,["aria-labelledby","items","label-attributes","model-value","placeholder","required","onUpdate:modelValue"])}const Ch=S(wh,[["render",kh]]),Eh={name:"FieldKeyValuePairs",components:{TrashIcon:Ue},mixins:[I],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(i=>{this.pairs.push({key:i,value:e[i]})})},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)}}},Sh={class:"key-value-pairs-editor"},Th=["data-testid","placeholder","value","onInput"],$h=["data-testid","placeholder","value","onInput"];function Bh(e,n,o,i,a,r){const s=t.resolveComponent("TrashIcon"),l=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Sh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.pairs,(d,c)=>(t.openBlock(),t.createElementBlock("div",{key:c,class:"pair-item"},[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-key-${c}`,placeholder:e.schema.keyInputPlaceholder??"Key",type:"text",value:d.key,onInput:h=>{r.onInput(h,c,"key")}},null,40,Th),t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-value-${c}`,placeholder:e.schema.valueInputPlaceholder??"Value",type:"text",value:d.value,onInput:h=>{r.onInput(h,c,"value")}},null,40,$h),t.createVNode(l,{appearance:"tertiary","data-testid":`${e.getFieldID(e.schema)}-remove-pair-${c}`,onClick:()=>{r.removePair(c)}},{default:t.withCtx(()=>[t.createVNode(s)]),_:2},1032,["data-testid","onClick"])]))),128)),t.createVNode(l,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`${e.getFieldID(e.schema)}-add-pair`,type:"button",onClick:r.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const Nh={name:"FormGroup",components:Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:ih,FieldArray:Qm,FieldArrayCardContainer:uo,FieldArrayItem:so,FieldArrayMultiItem:co,FieldAutoSuggest:ho,FieldCheckbox:ms,FieldChecklist:Cs,FieldCleave:Rd,FieldDateTimePicker:Yd,FieldGoogleAddress:Zd,FieldImage:tc,FieldInput:Kn,FieldKeyValuePairs:S(Eh,[["render",Bh],["__scopeId","data-v-29d15375"]]),FieldLabel:Ts,FieldMasked:ic,FieldMetric:mo,FieldMultiselect:Ch,FieldNoUiSlider:sc,FieldObject:io,FieldObjectAdvanced:lo,FieldPikaday:uc,FieldRadio:po,FieldRadios:Ms,FieldRangeSlider:gc,FieldSelect:eo,FieldSelectEx:kc,FieldSelectionGroup:_h,FieldSpectrum:Sc,FieldStaticMap:Bc,FieldSubmit:Ad,FieldTextArea:to,FieldUpload:vd,fieldSwitch:Ac},Symbol.toStringTag,{value:"Module"})),mixins:[Ht],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"],data(){return{child:t.ref()}},methods:{fieldTypeHasLabel(e){if(P(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=N(this.options,"fieldIdPrefix","");return ht(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldType(e){return"field-"+e.type},getButtonType(e){return N(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 V(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)},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\./,""):""}}},Mh=e=>(t.pushScopeId("data-v-02e656fb"),e=e(),t.popScopeId(),e),Vh=["innerHTML"],Ih={class:"icon-wrapper"},Ah=["innerHTML"],Oh={key:0,class:"link-wrapper"},Fh=Mh(()=>t.createElementVNode("span",{class:"section-header"},"More info",-1)),Uh={class:"field-wrap"},Dh={key:0,class:"buttons"},Lh=["type","onClick","textContent"],vh=["innerHTML"],Ph={key:2,class:"errors help-block"},qh=["innerHTML"];function Rh(e,n,o,i,a,r){const s=t.resolveComponent("KExternalLink"),l=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(l,{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",Ih,[t.createElementVNode("span",{innerHTML:r.formattedLabel(o.field.label)},null,8,Ah)]),o.field.link?(t.openBlock(),t.createElementBlock("div",Oh,[t.createVNode(s,{href:o.field.link},{default:t.withCtx(()=>[Fh]),_:1},8,["href"])])):t.createCommentVNode("",!0)]),_:2},[o.options.helpAsHtml&&o.field.help?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:o.field.help},null,8,Vh)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",Uh,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(o.field)),t.mergeProps(e.$attrs,{ref:"child",disabled:e.fieldDisabled(o.field)||null,"form-options":o.options,hint:o.field.hint&&r.getFieldType(o.field)==="field-input"?r.fieldHint(o.field):void 0,model:o.model,schema:o.field,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated}),null,16,["disabled","form-options","hint","model","schema","vfg","onModelUpdated","onValidated"])),r.buttonVisibility(o.field)?(t.openBlock(),t.createElementBlock("div",Dh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.field.buttons,(d,c)=>(t.openBlock(),t.createElementBlock("button",{key:c,class:t.normalizeClass(d.classes),type:r.getButtonType(d),onClick:h=>r.buttonClickHandler(d,o.field,h),textContent:t.toDisplayString(d.label)},null,10,Lh))),128))])):t.createCommentVNode("",!0)]),o.field.hint&&r.getFieldType(o.field)!=="field-input"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"hint",innerHTML:r.fieldHint(o.field)},null,8,vh)):t.createCommentVNode("",!0),r.fieldErrors(o.field).length>0?(t.openBlock(),t.createElementBlock("div",Ph,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fieldErrors(o.field),(d,c)=>(t.openBlock(),t.createElementBlock("span",{key:c,innerHTML:d},null,8,qh))),128))])):t.createCommentVNode("",!0)],2)}const xh={name:"FormGenerator",components:{formGroup:S(Nh,[["render",Rh],["__scopeId","data-v-02e656fb"]])},mixins:[Ht],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}}},emits:["validated","modelUpdated"],data(){return{vfg:this,errors:[],children:t.ref([]),collapseStates:{}}},computed:{fields(){const e=[];return this.schema&&this.schema.fields&&z(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&z(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 V(e.visible)?e.visible.call(this,this.model,e,this):P(e.visible)?!0:e.visible},onFieldValidated(e,n,o){this.errors=this.errors.filter(a=>a.field.fieldName!==o.schema.fieldName),!e&&n&&n.length>0&&z(n,a=>{this.errors.push({field:o.schema,error:a})});const i=this.errors.length===0;this.$emit("validated",i,this.errors,this)},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e=null){e===null&&(e=N(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],o=[];z(this.$refs.children,a=>{V(a.validate)&&(n.push(a.$refs.child),o.push(a.$refs.child.validate(!0)))});const i=a=>{const r=[];z(a,(l,d)=>{Array.isArray(l)&&l.length>0&&z(l,c=>{r.push({field:n[d].schema,error:c})})}),this.errors=r;const s=r.length===0;return this.$emit("validated",s,r,this),e?r:s};return e?Promise.all(o).then(i):i(o)},clearValidationErrors(){this.errors.splice(0),z(this.$refs.children,e=>{e.clearValidationErrors()})}}},zh={key:0,class:"vue-form-generator"},jh={key:0};function Kh(e,n,o,i,a,r){const s=t.resolveComponent("form-group"),l=t.resolveComponent("KCollapse");return o.schema!=null?(t.openBlock(),t.createElementBlock("div",zh,[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,d=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:d.model},[r.fieldVisible(d)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:a.errors,field:d,model:o.model,options:o.options,vfg:a.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:1})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,(d,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${c}`},[d.collapsible!==void 0&&d.collapsible!==!1?(t.openBlock(),t.createBlock(l,{key:0,class:"root-level-collapse","model-value":!1,title:d.collapsible.title},t.createSlots({default:t.withCtx(()=>{var h,y,b,B;return[(h=d.slots)!=null&&h.beforeContent?t.renderSlot(e.$slots,(y=d.slots)==null?void 0:y.beforeContent,{key:0}):t.createCommentVNode("",!0),d.fields.length===0&&((b=d.slots)!=null&&b.emptyState)?t.renderSlot(e.$slots,(B=d.slots)==null?void 0:B.emptyState,{key:1}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:2,class:t.normalizeClass(e.getFieldRowClasses(d))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.fields,T=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:T.model},[r.fieldVisible(T)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:a.errors,field:T,model:o.model,options:o.options,vfg:a.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"])),d.collapsible!==!0&&d.collapsible.nestedCollapsible&&d.collapsible.nestedCollapsible.fields.length>0?(t.openBlock(),t.createBlock(l,{key:3,class:"nested-collapse","model-value":a.collapseStates[`group-${c}-nested`]??!0,"trigger-alignment":"leading","trigger-label":a.collapseStates[`group-${c}-nested`]??!0?d.collapsible.nestedCollapsible.triggerLabel.expand:d.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":T=>a.collapseStates[`group-${c}-nested`]=T},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{class:t.normalizeClass(e.getFieldRowClasses(d))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.collapsible.nestedCollapsible.fields,T=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:T.model},[r.fieldVisible(T)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:a.errors,field:T,model:o.model,options:o.options,vfg:a.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))]),_:2},1032,["model-value","trigger-label","onUpdate:modelValue"])):t.createCommentVNode("",!0)]}),_:2},[d.collapsible.description?{name:"visible-content",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d.collapsible.description),1)]),key:"0"}:void 0]),1032,["title"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:1,class:t.normalizeClass(e.getFieldRowClasses(d))},{default:t.withCtx(()=>[d.legend?(t.openBlock(),t.createElementBlock("legend",jh,t.toDisplayString(d.legend),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.fields,h=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:h.model},[r.fieldVisible(h)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:a.errors,field:h,model:o.model,options:o.options,vfg:a.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))],64))),128))])):t.createCommentVNode("",!0)}const j=S(xh,[["render",Kh]]),Hh={fields:[{inputType:"text",label:"Config.Client Id",model:"config-client_id",type:"input"},{inputType:"text",label:"Config.Client Secret",model:"config-client_secret",type:"input"},{inputType:"text",label:"Config.Issuer",model:"config-issuer",required:!0,type:"input"},{inputType:"text",label:"Config.Auth Methods",model:"config-auth_methods",type:"input"}]},Yh={fields:[{inputType:"text",label:"Config.Scopes Claim",model:"config-scopes_claim",type:"input"},{inputType:"text",label:"Config.Scopes Required",model:"config-scopes_required",type:"input"},{inputType:"text",label:"Config.Audience Claim",model:"config-audience_claim",type:"input"},{inputType:"text",label:"Config.Audience Required",model:"config-audience_required",type:"input"},{inputType:"text",label:"Config.Roles Claim",model:"config-roles_claim",type:"input"},{inputType:"text",label:"Config.Roles Required",model:"config-roles_required",type:"input"},{inputType:"text",label:"Config.Groups Claim",model:"config-groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"auth-array-item-container",fieldItemsClasses:"auth-array-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",newElementButtonLabelClasses:"auth-array-item-new",newElementButtonLabel:"+ Add"},{inputType:"text",label:"Config.Groups Required",model:"config-groups_required",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"auth-array-item-container",fieldItemsClasses:"auth-array-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",newElementButtonLabelClasses:"auth-array-item-new",newElementButtonLabel:"+ Add"},{inputType:"text",label:"Config.Authenticated Groups Claim",model:"config-authenticated_groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"auth-array-item-container",fieldItemsClasses:"auth-array-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",newElementButtonLabelClasses:"auth-array-item-new",newElementButtonLabel:"+ Add"}]},Gh={fields:[{type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldArrayCardContainer",fieldClasses:"array-card-container-wrapper",newElementButtonLabel:"+ Add Client JWK",items:{type:"object",schema:{fields:[{model:"kid",label:"kid",type:"input",inputType:"string"},{model:"issuer",label:"issuer",type:"input",inputType:"string"},{model:"kty",label:"kty",type:"input",inputType:"string"},{model:"use",label:"use",type:"input",inputType:"string"},{model:"key_ops",label:"key_ops",type:"array",fieldItemsClasses:"jwk-array-input-wrapper",showRemoveButton:!0,removeElementButtonLabel:"Remove",items:{type:"input",inputType:"string"}},{model:"alg",label:"alg",type:"input",inputType:"string"},{model:"x5u",label:"x5u",type:"input",inputType:"string"},{model:"x5c",label:"x5c",type:"array",fieldItemsClasses:"jwk-array-input-wrapper",showRemoveButton:!0,removeElementButtonLabel:"Remove",items:{type:"input",inputType:"string"}},{model:"x5t",label:"x5t",type:"input",inputType:"string"},{model:"x5t#S256",label:"x5t#S256",type:"input",inputType:"string"},{model:"k",label:"k",type:"input",inputType:"string"},{model:"x",label:"x",type:"input",inputType:"string"},{model:"y",label:"y",type:"input",inputType:"string"},{model:"crv",label:"crv",type:"input",inputType:"string"},{model:"n",label:"n",type:"input",inputType:"string"},{model:"e",label:"e",type:"input",inputType:"string"},{model:"d",label:"d",type:"input",inputType:"string"},{model:"p",label:"p",type:"input",inputType:"string"},{model:"q",label:"q",type:"input",inputType:"string"},{model:"dp",label:"dp",type:"input",inputType:"string"},{model:"dq",label:"dq",type:"input",inputType:"string"},{model:"qi",label:"qi",type:"input",inputType:"string"},{model:"oth",label:"oth",type:"input",inputType:"string"},{model:"r",label:"r",type:"input",inputType:"string"},{model:"t",label:"t",type:"input",inputType:"string"}]}},model:"config-client_jwk",label:"Config.Client Jwk",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record"},{type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldArrayCardContainer",fieldClasses:"array-card-container-wrapper",newElementButtonLabel:"+ Add Cluster Node",items:{type:"object",schema:{fields:[{label:"IP",model:"ip",type:"input",inputType:"text"},{label:"Port",model:"port",type:"input",inputType:"number"}]}},model:"config-session_redis_cluster_nodes",label:"Config.Session Redis Cluster Nodes",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#host-record"}]},Wh={name:"OIDCForm",components:{VueFormGenerator:j},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}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){var n;this.init||(this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(o=>!o.model.startsWith("config")&&o.model!=="tags")},this.commonFieldsSchema={...Hh},this.authFieldsSchema={...Yh},this.advancedFieldsSchema.fields=this.formSchema.fields.filter(o=>o.model.startsWith("config")&&!this.commonFieldsSchema.fields.filter(i=>i.model===o.model).length&&!this.authFieldsSchema.fields.filter(i=>i.model===o.model).length||o.model==="tags"),this.advancedFieldsSchema.fields=this.advancedFieldsSchema.fields.map(o=>{const i=Gh.fields.find(a=>a.model===o.model);return i||o}),this.commonFieldsSchema.fields=this.commonFieldsSchema.fields.filter(o=>o.model!=="config-auth_methods"),this.sessionManagement=this.isEditing?this.formModel["config-auth_methods"].includes("session"):!1,this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.isEditing?this.formModel["config-auth_methods"].includes("authorization_code"):!1},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("bearer"):!1},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("client_credentials"):!1},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("password"):!1},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.isEditing?this.formModel["config-auth_methods"].includes("introspection"):!1},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.isEditing?this.formModel["config-auth_methods"].includes("userinfo"):!1},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("kong_oauth2"):!1},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("refresh_token"):!1}]);const e={};for(const o of this.formSchema.fields)e[o.model]=o;for(const o of[this.commonFieldsSchema,this.authFieldsSchema,this.advancedFieldsSchema])for(const i of o.fields){const a=(n=e[i.model])==null?void 0:n.help;i.help===void 0&&typeof a=="string"&&(i.help=a)}},getAuthMethodsValue(e,n){const o=[];for(let i=0;i<this.authMethods.length;i++)this.authMethods[i].prop&&this.authMethods[i].value!==e&&o.push(this.authMethods[i].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()}}},Se=e=>(t.pushScopeId("data-v-e7395ff0"),e=e(),t.popScopeId(),e),Zh={class:"general-settings"},Jh={class:"link-wrapper"},Xh=Se(()=>t.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),Qh=Se(()=>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)),eu={class:"auth-method-container"},tu={class:"general-settings"},nu={class:"link-wrapper"},ou=Se(()=>t.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),iu=Se(()=>t.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),ru={class:"general-settings"},au={class:"link-wrapper"},lu=Se(()=>t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),su=Se(()=>t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function du(e,n,o,i,a,r){const s=t.resolveComponent("VueFormGenerator"),l=t.resolveComponent("KExternalLink"),d=t.resolveComponent("KLabel"),c=t.resolveComponent("KCheckbox"),h=t.resolveComponent("KInputSwitch"),y=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:a.globalFields,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(y,{tabs:a.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",Zh,[t.createElementVNode("div",Jh,[t.createVNode(l,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:t.withCtx(()=>[Xh]),_:1})]),Qh,r.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:a.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(d,null,{default:t.withCtx(()=>[t.createTextVNode("Auth Methods")]),_:1}),t.createElementVNode("div",eu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.authMethods,b=>(t.openBlock(),t.createElementBlock("div",{key:b.value,class:"auth-method"},[t.createVNode(c,{modelValue:b.prop,"onUpdate:modelValue":B=>b.prop=B,onChange:B=>r.handleUpdate(B,b.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(h,{modelValue:a.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=b=>a.sessionManagement=b),label:"Enable Session Management",onChange:r.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",tu,[t.createElementVNode("div",nu,[t.createVNode(l,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:t.withCtx(()=>[ou]),_:1})]),iu,r.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:a.authFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",ru,[t.createElementVNode("div",au,[t.createVNode(l,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:t.withCtx(()=>[lu]),_:1})]),su,r.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:a.advancedFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1},8,["tabs"])])}const cu=S(Wh,[["render",du],["__scopeId","data-v-e7395ff0"]]),Ct={general:{packageName:"forms"},"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_fields:"View Advanced Fields",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&#39;s counters.</li></ul>",options:{fixed:"Fixed",sliding:"Sliding"}},request_limits:{title:"Request Limits",subtitle:"Advanced control on request rate with customizable limits and window sizes.",label:"Limit",label_index:"Limit {index}",help:"Set one or more requests-per-window limits and window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.",request_number:"Request number",time_interval:"Time interval",interval_determiner:"Every",seconds:"Seconds"},try_a_use_case:"Start with a prebuilt 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"}},redis_address_example:"e.g. localhost:6379"}},mu=S(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){const{t:n,te:o}=Ze.createI18n("en-us",Ct),i=e,a=t.computed(()=>i.formModel.id&&i.isEditing||!i.isEditing),r=t.computed(()=>{const s=i.formSchema;return s.fields.map(l=>{const d=`post-function.${l.model}`;return l.hint=o(`${d}.hint`)&&n(`${d}.hint`)||l.hint,l.help=o(`${d}.help`)&&n(`${d}.help`)||l.help,l.newElementButtonLabel=o(`${d}.newElementButtonLabel`)&&n(`${d}.newElementButtonLabel`)||l.newElementButtonLabel,l.model!=="tags"&&(l.valueType==="array"||l.type==="array")&&(l.type="array",l.valueArrayType="array",l.itemContainerComponent="FieldArrayItem",l.fieldClasses="post-function-array-item-container",l.fieldItemsClasses="post-function-array-item",l.inputAttributes={...l.inputAttributes,type:"textarea"}),l}),s});return(s,l)=>a.value?(t.openBlock(),t.createBlock(j,{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-6706c68b"]]),hu=S(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){const{t:n,te:o}=Ze.createI18n("en-us",Ct),i=e,a=t.computed(()=>i.formModel.id&&i.isEditing||!i.isEditing),r=t.computed(()=>{const s=i.formSchema;return s.fields.map(l=>{const d=`exit-transformer.${l.model}`;return l.hint=o(`${d}.hint`)&&n(`${d}.hint`)||l.hint,l.help=o(`${d}.help`)&&n(`${d}.help`)||l.help,l.newElementButtonLabel=o(`${d}.newElementButtonLabel`)&&n(`${d}.newElementButtonLabel`)||l.newElementButtonLabel,l.model!=="tags"&&(l.valueType==="array"||l.type==="array")&&(l.type="array",l.valueArrayType="array",l.itemContainerComponent="FieldArrayItem",l.fieldClasses="exit-transformer-array-item-container",l.fieldItemsClasses="exit-transformer-array-item",l.inputAttributes={...l.inputAttributes,type:"textarea"}),l}),s});return(s,l)=>a.value?(t.openBlock(),t.createBlock(j,{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-0fc8ef29"]]),uu={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}]},pu={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}]},fu={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}]},ge=e=>(t.pushScopeId("data-v-b9df1c3f"),e=e(),t.popScopeId(),e),gu={class:"general-settings"},yu=ge(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),bu=ge(()=>t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),_u=ge(()=>t.createElementVNode("hr",null,null,-1)),wu={class:"sub-form"},ku={class:"general-settings"},Cu=ge(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),Eu=ge(()=>t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),Su={class:"sub-form"},Tu={class:"general-settings"},$u=ge(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),Bu=ge(()=>t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),Nu=S(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){const n=e,o=t.ref("zeroSsl"),i=t.ref("shm"),a=t.computed(()=>{var p;const g={};if((p=n.formSchema)!=null&&p.fields)for(const m of n.formSchema.fields)g[m.model]=m;return g}),r=t.computed(()=>{var p;const g=ne(uu);for(const m of g.fields){const u=(p=a.value[m.model])==null?void 0:p.help;m.help===void 0&&typeof u=="string"&&(m.help=u)}return g}),s=t.computed(()=>{var p;const g=ne(pu);for(const m of g.fields){const u=(p=a.value[m.model])==null?void 0:p.help;m.help===void 0&&typeof u=="string"&&(m.help=u)}return g}),l=t.computed(()=>{var p;const g=ne(fu);for(const m of g.fields){const u=(p=a.value[m.model])==null?void 0:p.help;m.help===void 0&&typeof u=="string"&&(m.help=u)}return g}),d=t.computed(()=>({fields:n.formSchema.fields.filter(g=>!g.model.startsWith("config")&&g.model!=="tags")})),c=t.computed(()=>({fields:r.value.fields.filter(p=>!s.value.fields.some(m=>m.model===p.model)&&!l.value.fields.some(m=>m.model===p.model))})),h=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage")&&!p.model.startsWith("config-storage_config-consul")&&!p.model.startsWith("config-storage_config-redis")&&!p.model.startsWith("config-storage_config-shm")&&!p.model.startsWith("config-storage_config-vault"))})),y=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage_config-consul"))})),b=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage_config-redis"))})),B=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage_config-shm"))})),T=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage_config-vault"))})),_=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config")&&!c.value.fields.filter(p=>p.model===g.model).length&&!h.value.fields.filter(p=>p.model===g.model).length||g.model==="tags")})),C=t.computed(()=>n.formModel.id&&n.isEditing||!n.isEditing),f=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],k=[{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 O=g=>{o.value=g.value,(g.value==="zeroSsl"||g.value==="other")&&(g.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),g.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()},F=(g,p)=>{p==="config-storage"&&(i.value=g),n.onModelUpdated()};return(g,p)=>{const m=t.resolveComponent("KSelect"),u=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(j,{key:0,class:"global-fields",model:e.formModel,options:e.formOptions,schema:d.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(u,{tabs:f},{general:t.withCtx(()=>[t.createElementVNode("div",gu,[yu,bu,C.value?(t.openBlock(),t.createBlock(j,{key:0,model:e.formModel,options:e.formOptions,schema:c.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),_u,t.createVNode(m,{class:"issuer-select",items:k,label:"Issuer",onChange:O}),t.createElementVNode("div",wu,[o.value==="letsEncrypt"?(t.openBlock(),t.createBlock(j,{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(j,{key:1,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",ku,[Cu,Eu,C.value?(t.openBlock(),t.createBlock(j,{key:0,model:e.formModel,options:e.formOptions,schema:h.value,onModelUpdated:F},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",Su,[i.value==="consul"?(t.openBlock(),t.createBlock(j,{key:0,model:e.formModel,options:e.formOptions,schema:y.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),i.value==="redis"?(t.openBlock(),t.createBlock(j,{key:1,model:e.formModel,options:e.formOptions,schema:b.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),i.value==="shm"?(t.openBlock(),t.createBlock(j,{key:2,model:e.formModel,options:e.formOptions,schema:B.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),i.value==="vault"?(t.openBlock(),t.createBlock(j,{key:3,model:e.formModel,options:e.formOptions,schema:T.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",Tu,[$u,Bu,C.value?(t.openBlock(),t.createBlock(j,{key:0,model:e.formModel,options:e.formOptions,schema:_.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),[["__scopeId","data-v-b9df1c3f"]]),fo=e=>(t.pushScopeId("data-v-04007e41"),e=e(),t.popScopeId(),e),Mu={class:"rla-form-basic-fields"},Vu={class:"rla-form-request-limits-subtitle"},Iu={class:"rla-form-request-limits-content"},Au={class:"rla-form-window-type"},Ou=["innerHTML"],Fu={class:"rla-form-window-type-radios"},Uu={class:"rla-form-request-limits-items"},Du={class:"rla-form-request-limits-row"},Lu=["id"],vu={class:"rla-form-request-limits-actions"},Pu={key:0,class:"rla-form-request-limits-examples"},qu={class:"rla-form-request-limits-examples-badges"},Ru=fo(()=>t.createElementVNode("br",null,null,-1)),xu=["innerHTML"],zu={id:"rla-form-error-legend",class:"rla-form-error-inputs"},ju=fo(()=>t.createElementVNode("div",null,":",-1)),Ku=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:Nu,ExitTransformer:hu,OIDCForm:cu,PostFunction:mu,RLAForm:S(t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},isEditing:{type:Boolean}},setup(e){const n=[{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,window_type:"fixed"}},{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,window_type:"fixed"}},{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,window_type:"fixed"}},{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,window_type:"sliding"}},{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,window_type:"sliding"}},{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")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],t):(U=typeof globalThis<"u"?globalThis:U||self,t(U["kong-ui-public-forms"]={},U.Vue,U["kong-ui-public-i18n"]))})(this,function(U,t,Ze){"use strict";function Tt(e,n){for(var o=-1,i=e==null?0:e.length;++o<i&&n(e[o],o,e)!==!1;);return e}function go(e){return function(n,o,i){for(var a=-1,r=Object(n),s=i(n),l=s.length;l--;){var d=s[e?l:++a];if(o(r[d],d,r)===!1)break}return n}}var yo=go();const bo=yo;function _o(e,n){for(var o=-1,i=Array(e);++o<e;)i[o]=n(o);return i}var $t=typeof global=="object"&&global&&global.Object===Object&&global,wo=typeof self=="object"&&self&&self.Object===Object&&self,Y=$t||wo||Function("return this")(),W=Y.Symbol,Bt=Object.prototype,ko=Bt.hasOwnProperty,Co=Bt.toString,Te=W?W.toStringTag:void 0;function Eo(e){var n=ko.call(e,Te),o=e[Te];try{e[Te]=void 0;var i=!0}catch{}var a=Co.call(e);return i&&(n?e[Te]=o:delete e[Te]),a}var So=Object.prototype,To=So.toString;function $o(e){return To.call(e)}var Bo="[object Null]",No="[object Undefined]",Nt=W?W.toStringTag:void 0;function oe(e){return e==null?e===void 0?No:Bo:Nt&&Nt in Object(e)?Eo(e):$o(e)}function Z(e){return e!=null&&typeof e=="object"}var Mo="[object Arguments]";function Mt(e){return Z(e)&&oe(e)==Mo}var Vt=Object.prototype,Vo=Vt.hasOwnProperty,Io=Vt.propertyIsEnumerable,Je=Mt(function(){return arguments}())?Mt:function(e){return Z(e)&&Vo.call(e,"callee")&&!Io.call(e,"callee")},H=Array.isArray;function Ao(){return!1}var It=typeof U=="object"&&U&&!U.nodeType&&U,At=It&&typeof module=="object"&&module&&!module.nodeType&&module,Oo=At&&At.exports===It,Ot=Oo?Y.Buffer:void 0,Fo=Ot?Ot.isBuffer:void 0,$e=Fo||Ao,Uo=9007199254740991,Do=/^(?:0|[1-9]\d*)$/;function Xe(e,n){var o=typeof e;return n=n??Uo,!!n&&(o=="number"||o!="symbol"&&Do.test(e))&&e>-1&&e%1==0&&e<n}var Lo=9007199254740991;function Qe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Lo}var vo="[object Arguments]",Po="[object Array]",qo="[object Boolean]",Ro="[object Date]",xo="[object Error]",zo="[object Function]",jo="[object Map]",Ko="[object Number]",Ho="[object Object]",Yo="[object RegExp]",Go="[object Set]",Wo="[object String]",Zo="[object WeakMap]",Jo="[object ArrayBuffer]",Xo="[object DataView]",Qo="[object Float32Array]",ei="[object Float64Array]",ti="[object Int8Array]",ni="[object Int16Array]",oi="[object Int32Array]",ii="[object Uint8Array]",ri="[object Uint8ClampedArray]",ai="[object Uint16Array]",li="[object Uint32Array]",L={};L[Qo]=L[ei]=L[ti]=L[ni]=L[oi]=L[ii]=L[ri]=L[ai]=L[li]=!0,L[vo]=L[Po]=L[Jo]=L[qo]=L[Xo]=L[Ro]=L[xo]=L[zo]=L[jo]=L[Ko]=L[Ho]=L[Yo]=L[Go]=L[Wo]=L[Zo]=!1;function si(e){return Z(e)&&Qe(e.length)&&!!L[oe(e)]}function et(e){return function(n){return e(n)}}var Ft=typeof U=="object"&&U&&!U.nodeType&&U,Be=Ft&&typeof module=="object"&&module&&!module.nodeType&&module,di=Be&&Be.exports===Ft,tt=di&&$t.process,be=function(){try{var e=Be&&Be.require&&Be.require("util").types;return e||tt&&tt.binding&&tt.binding("util")}catch{}}(),Ut=be&&be.isTypedArray,nt=Ut?et(Ut):si,ci=Object.prototype,mi=ci.hasOwnProperty;function Dt(e,n){var o=H(e),i=!o&&Je(e),a=!o&&!i&&$e(e),r=!o&&!i&&!a&&nt(e),s=o||i||a||r,l=s?_o(e.length,String):[],d=l.length;for(var c in e)(n||mi.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||r&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Xe(c,d)))&&l.push(c);return l}var hi=Object.prototype;function Le(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||hi;return e===o}function Lt(e,n){return function(o){return e(n(o))}}var ui=Lt(Object.keys,Object),pi=Object.prototype,fi=pi.hasOwnProperty;function vt(e){if(!Le(e))return ui(e);var n=[];for(var o in Object(e))fi.call(e,o)&&o!="constructor"&&n.push(o);return n}function q(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var gi="[object AsyncFunction]",yi="[object Function]",bi="[object GeneratorFunction]",_i="[object Proxy]";function V(e){if(!q(e))return!1;var n=oe(e);return n==yi||n==bi||n==gi||n==_i}function _e(e){return e!=null&&Qe(e.length)&&!V(e)}function we(e){return _e(e)?Dt(e):vt(e)}function wi(e,n){return e&&bo(e,n,we)}function ki(e,n){return function(o,i){if(o==null)return o;if(!_e(o))return e(o,i);for(var a=o.length,r=n?a:-1,s=Object(o);(n?r--:++r<a)&&i(s[r],r,s)!==!1;);return o}}var Ci=ki(wi);const Ei=Ci;function ve(e){return e}function Si(e){return typeof e=="function"?e:ve}function z(e,n){var o=H(e)?Tt:Ei;return o(e,Si(n))}var Ti="[object Symbol]";function Pe(e){return typeof e=="symbol"||Z(e)&&oe(e)==Ti}var $i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bi=/^\w*$/;function ot(e,n){if(H(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Pe(e)?!0:Bi.test(e)||!$i.test(e)||n!=null&&e in Object(n)}var it=Y["__core-js_shared__"],Pt=function(){var e=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ni(e){return!!Pt&&Pt in e}var Mi=Function.prototype,Vi=Mi.toString;function se(e){if(e!=null){try{return Vi.call(e)}catch{}try{return e+""}catch{}}return""}var Ii=/[\\^$.*+?()[\]{}|]/g,Ai=/^\[object .+?Constructor\]$/,Oi=Function.prototype,Fi=Object.prototype,Ui=Oi.toString,Di=Fi.hasOwnProperty,Li=RegExp("^"+Ui.call(Di).replace(Ii,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vi(e){if(!q(e)||Ni(e))return!1;var n=V(e)?Li:Ai;return n.test(se(e))}function Pi(e,n){return e==null?void 0:e[n]}function de(e,n){var o=Pi(e,n);return vi(o)?o:void 0}var Ne=de(Object,"create");function qi(){this.__data__=Ne?Ne(null):{},this.size=0}function Ri(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var xi="__lodash_hash_undefined__",zi=Object.prototype,ji=zi.hasOwnProperty;function Ki(e){var n=this.__data__;if(Ne){var o=n[e];return o===xi?void 0:o}return ji.call(n,e)?n[e]:void 0}var Hi=Object.prototype,Yi=Hi.hasOwnProperty;function Gi(e){var n=this.__data__;return Ne?n[e]!==void 0:Yi.call(n,e)}var Wi="__lodash_hash_undefined__";function Zi(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Ne&&n===void 0?Wi:n,this}function ce(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var i=e[n];this.set(i[0],i[1])}}ce.prototype.clear=qi,ce.prototype.delete=Ri,ce.prototype.get=Ki,ce.prototype.has=Gi,ce.prototype.set=Zi;function Ji(){this.__data__=[],this.size=0}function Me(e,n){return e===n||e!==e&&n!==n}function qe(e,n){for(var o=e.length;o--;)if(Me(e[o][0],n))return o;return-1}var Xi=Array.prototype,Qi=Xi.splice;function er(e){var n=this.__data__,o=qe(n,e);if(o<0)return!1;var i=n.length-1;return o==i?n.pop():Qi.call(n,o,1),--this.size,!0}function tr(e){var n=this.__data__,o=qe(n,e);return o<0?void 0:n[o][1]}function nr(e){return qe(this.__data__,e)>-1}function or(e,n){var o=this.__data__,i=qe(o,e);return i<0?(++this.size,o.push([e,n])):o[i][1]=n,this}function ee(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var i=e[n];this.set(i[0],i[1])}}ee.prototype.clear=Ji,ee.prototype.delete=er,ee.prototype.get=tr,ee.prototype.has=nr,ee.prototype.set=or;var Ve=de(Y,"Map");function ir(){this.size=0,this.__data__={hash:new ce,map:new(Ve||ee),string:new ce}}function rr(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Re(e,n){var o=e.__data__;return rr(n)?o[typeof n=="string"?"string":"hash"]:o.map}function ar(e){var n=Re(this,e).delete(e);return this.size-=n?1:0,n}function lr(e){return Re(this,e).get(e)}function sr(e){return Re(this,e).has(e)}function dr(e,n){var o=Re(this,e),i=o.size;return o.set(e,n),this.size+=o.size==i?0:1,this}function te(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var i=e[n];this.set(i[0],i[1])}}te.prototype.clear=ir,te.prototype.delete=ar,te.prototype.get=lr,te.prototype.has=sr,te.prototype.set=dr;var cr="Expected a function";function rt(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(cr);var o=function(){var i=arguments,a=n?n.apply(this,i):i[0],r=o.cache;if(r.has(a))return r.get(a);var s=e.apply(this,i);return o.cache=r.set(a,s)||r,s};return o.cache=new(rt.Cache||te),o}rt.Cache=te;var mr=500;function hr(e){var n=rt(e,function(i){return o.size===mr&&o.clear(),i}),o=n.cache;return n}var ur=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pr=/\\(\\)?/g,fr=hr(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(ur,function(o,i,a,r){n.push(a?r.replace(pr,"$1"):i||o)}),n});function gr(e,n){for(var o=-1,i=e==null?0:e.length,a=Array(i);++o<i;)a[o]=n(e[o],o,e);return a}var yr=1/0,qt=W?W.prototype:void 0,Rt=qt?qt.toString:void 0;function xt(e){if(typeof e=="string")return e;if(H(e))return gr(e,xt)+"";if(Pe(e))return Rt?Rt.call(e):"";var n=e+"";return n=="0"&&1/e==-yr?"-0":n}function zt(e){return e==null?"":xt(e)}function jt(e,n){return H(e)?e:ot(e,n)?[e]:fr(zt(e))}var br=1/0;function xe(e){if(typeof e=="string"||Pe(e))return e;var n=e+"";return n=="0"&&1/e==-br?"-0":n}function Kt(e,n){n=jt(n,e);for(var o=0,i=n.length;e!=null&&o<i;)e=e[xe(n[o++])];return o&&o==i?e:void 0}function N(e,n,o){var i=e==null?void 0:Kt(e,n);return i===void 0?o:i}function P(e){return e==null}var _r="[object String]";function me(e){return typeof e=="string"||!H(e)&&Z(e)&&oe(e)==_r}const Ht={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,o={[N(this.options,"validationErrorClass","error")]:n,[N(this.options,"validationSuccessClass","valid")]:!n,disabled:this.fieldDisabled(e),readonly:this.fieldReadonly(e),featured:this.fieldFeatured(e),required:this.fieldRequired(e)};return Array.isArray(e.styleClasses)?z(e.styleClasses,i=>o[i]=!0):me(e.styleClasses)&&(o[e.styleClasses]=!0),P(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 V(e.disabled)?e.disabled.call(this,this.model,e,this):P(e.disabled)?!1:e.disabled},fieldReadonly(e){return V(e.readonly)?e.readonly.call(this,this.model,e,this):P(e.readonly)?!1:e.readonly},fieldFeatured(e){return V(e.featured)?e.featured.call(this,this.model,e,this):P(e.featured)?!1:e.featured},fieldRequired(e){return V(e.required)?e.required.call(this,this.model,e,this):P(e.required)?!1:e.required}}};function wr(){this.__data__=new ee,this.size=0}function kr(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function Cr(e){return this.__data__.get(e)}function Er(e){return this.__data__.has(e)}var Sr=200;function Tr(e,n){var o=this.__data__;if(o instanceof ee){var i=o.__data__;if(!Ve||i.length<Sr-1)return i.push([e,n]),this.size=++o.size,this;o=this.__data__=new te(i)}return o.set(e,n),this.size=o.size,this}function J(e){var n=this.__data__=new ee(e);this.size=n.size}J.prototype.clear=wr,J.prototype.delete=kr,J.prototype.get=Cr,J.prototype.has=Er,J.prototype.set=Tr;var ze=function(){try{var e=de(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Yt(e,n,o){n=="__proto__"&&ze?ze(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}var $r=Object.prototype,Br=$r.hasOwnProperty;function Gt(e,n,o){var i=e[n];(!(Br.call(e,n)&&Me(i,o))||o===void 0&&!(n in e))&&Yt(e,n,o)}function je(e,n,o,i){var a=!o;o||(o={});for(var r=-1,s=n.length;++r<s;){var l=n[r],d=i?i(o[l],e[l],l,o,e):void 0;d===void 0&&(d=e[l]),a?Yt(o,l,d):Gt(o,l,d)}return o}function Nr(e,n){return e&&je(n,we(n),e)}function Mr(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}var Vr=Object.prototype,Ir=Vr.hasOwnProperty;function Ar(e){if(!q(e))return Mr(e);var n=Le(e),o=[];for(var i in e)i=="constructor"&&(n||!Ir.call(e,i))||o.push(i);return o}function Ke(e){return _e(e)?Dt(e,!0):Ar(e)}function Or(e,n){return e&&je(n,Ke(n),e)}var Wt=typeof U=="object"&&U&&!U.nodeType&&U,Zt=Wt&&typeof module=="object"&&module&&!module.nodeType&&module,Fr=Zt&&Zt.exports===Wt,Jt=Fr?Y.Buffer:void 0,Xt=Jt?Jt.allocUnsafe:void 0;function Ur(e,n){if(n)return e.slice();var o=e.length,i=Xt?Xt(o):new e.constructor(o);return e.copy(i),i}function Dr(e,n){var o=-1,i=e.length;for(n||(n=Array(i));++o<i;)n[o]=e[o];return n}function Lr(e,n){for(var o=-1,i=e==null?0:e.length,a=0,r=[];++o<i;){var s=e[o];n(s,o,e)&&(r[a++]=s)}return r}function Qt(){return[]}var vr=Object.prototype,Pr=vr.propertyIsEnumerable,en=Object.getOwnPropertySymbols,at=en?function(e){return e==null?[]:(e=Object(e),Lr(en(e),function(n){return Pr.call(e,n)}))}:Qt;function qr(e,n){return je(e,at(e),n)}function tn(e,n){for(var o=-1,i=n.length,a=e.length;++o<i;)e[a+o]=n[o];return e}var Rr=Lt(Object.getPrototypeOf,Object);const nn=Rr;var xr=Object.getOwnPropertySymbols,on=xr?function(e){for(var n=[];e;)tn(n,at(e)),e=nn(e);return n}:Qt;function zr(e,n){return je(e,on(e),n)}function rn(e,n,o){var i=n(e);return H(e)?i:tn(i,o(e))}function lt(e){return rn(e,we,at)}function jr(e){return rn(e,Ke,on)}var st=de(Y,"DataView"),dt=de(Y,"Promise"),ke=de(Y,"Set"),ct=de(Y,"WeakMap"),an="[object Map]",Kr="[object Object]",ln="[object Promise]",sn="[object Set]",dn="[object WeakMap]",cn="[object DataView]",Hr=se(st),Yr=se(Ve),Gr=se(dt),Wr=se(ke),Zr=se(ct),he=oe;(st&&he(new st(new ArrayBuffer(1)))!=cn||Ve&&he(new Ve)!=an||dt&&he(dt.resolve())!=ln||ke&&he(new ke)!=sn||ct&&he(new ct)!=dn)&&(he=function(e){var n=oe(e),o=n==Kr?e.constructor:void 0,i=o?se(o):"";if(i)switch(i){case Hr:return cn;case Yr:return an;case Gr:return ln;case Wr:return sn;case Zr:return dn}return n});const Ce=he;var Jr=Object.prototype,Xr=Jr.hasOwnProperty;function Qr(e){var n=e.length,o=new e.constructor(n);return n&&typeof e[0]=="string"&&Xr.call(e,"index")&&(o.index=e.index,o.input=e.input),o}var He=Y.Uint8Array;function mt(e){var n=new e.constructor(e.byteLength);return new He(n).set(new He(e)),n}function ea(e,n){var o=n?mt(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var ta=/\w*$/;function na(e){var n=new e.constructor(e.source,ta.exec(e));return n.lastIndex=e.lastIndex,n}var mn=W?W.prototype:void 0,hn=mn?mn.valueOf:void 0;function oa(e){return hn?Object(hn.call(e)):{}}function ia(e,n){var o=n?mt(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var ra="[object Boolean]",aa="[object Date]",la="[object Map]",sa="[object Number]",da="[object RegExp]",ca="[object Set]",ma="[object String]",ha="[object Symbol]",ua="[object ArrayBuffer]",pa="[object DataView]",fa="[object Float32Array]",ga="[object Float64Array]",ya="[object Int8Array]",ba="[object Int16Array]",_a="[object Int32Array]",wa="[object Uint8Array]",ka="[object Uint8ClampedArray]",Ca="[object Uint16Array]",Ea="[object Uint32Array]";function Sa(e,n,o){var i=e.constructor;switch(n){case ua:return mt(e);case ra:case aa:return new i(+e);case pa:return ea(e,o);case fa:case ga:case ya:case ba:case _a:case wa:case ka:case Ca:case Ea:return ia(e,o);case la:return new i;case sa:case ma:return new i(e);case da:return na(e);case ca:return new i;case ha:return oa(e)}}var un=Object.create,Ta=function(){function e(){}return function(n){if(!q(n))return{};if(un)return un(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}}();function $a(e){return typeof e.constructor=="function"&&!Le(e)?Ta(nn(e)):{}}var Ba="[object Map]";function Na(e){return Z(e)&&Ce(e)==Ba}var pn=be&&be.isMap,Ma=pn?et(pn):Na,Va="[object Set]";function Ia(e){return Z(e)&&Ce(e)==Va}var fn=be&&be.isSet,Aa=fn?et(fn):Ia,Oa=1,Fa=2,Ua=4,gn="[object Arguments]",Da="[object Array]",La="[object Boolean]",va="[object Date]",Pa="[object Error]",yn="[object Function]",qa="[object GeneratorFunction]",Ra="[object Map]",xa="[object Number]",bn="[object Object]",za="[object RegExp]",ja="[object Set]",Ka="[object String]",Ha="[object Symbol]",Ya="[object WeakMap]",Ga="[object ArrayBuffer]",Wa="[object DataView]",Za="[object Float32Array]",Ja="[object Float64Array]",Xa="[object Int8Array]",Qa="[object Int16Array]",el="[object Int32Array]",tl="[object Uint8Array]",nl="[object Uint8ClampedArray]",ol="[object Uint16Array]",il="[object Uint32Array]",D={};D[gn]=D[Da]=D[Ga]=D[Wa]=D[La]=D[va]=D[Za]=D[Ja]=D[Xa]=D[Qa]=D[el]=D[Ra]=D[xa]=D[bn]=D[za]=D[ja]=D[Ka]=D[Ha]=D[tl]=D[nl]=D[ol]=D[il]=!0,D[Pa]=D[yn]=D[Ya]=!1;function Ie(e,n,o,i,a,r){var s,l=n&Oa,d=n&Fa,c=n&Ua;if(o&&(s=a?o(e,i,a,r):o(e)),s!==void 0)return s;if(!q(e))return e;var h=H(e);if(h){if(s=Qr(e),!l)return Dr(e,s)}else{var y=Ce(e),b=y==yn||y==qa;if($e(e))return Ur(e,l);if(y==bn||y==gn||b&&!a){if(s=d||b?{}:$a(e),!l)return d?zr(e,Or(s,e)):qr(e,Nr(s,e))}else{if(!D[y])return a?e:{};s=Sa(e,y,l)}}r||(r=new J);var B=r.get(e);if(B)return B;r.set(e,s),Aa(e)?e.forEach(function(C){s.add(Ie(C,n,o,C,e,r))}):Ma(e)&&e.forEach(function(C,f){s.set(f,Ie(C,n,o,f,e,r))});var T=c?d?jr:lt:d?Ke:we,_=h?void 0:T(e);return Tt(_||e,function(C,f){_&&(f=C,C=e[f]),Gt(s,f,Ie(C,n,o,f,e,r))}),s}var rl=1,al=4;function ne(e){return Ie(e,rl|al)}const ht=(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,""),_n=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var ut=function(){return Y.Date.now()},ll=/\s/;function sl(e){for(var n=e.length;n--&&ll.test(e.charAt(n)););return n}var dl=/^\s+/;function cl(e){return e&&e.slice(0,sl(e)+1).replace(dl,"")}var wn=NaN,ml=/^[-+]0x[0-9a-f]+$/i,hl=/^0b[01]+$/i,ul=/^0o[0-7]+$/i,pl=parseInt;function pt(e){if(typeof e=="number")return e;if(Pe(e))return wn;if(q(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=q(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=cl(e);var o=hl.test(e);return o||ul.test(e)?pl(e.slice(2),o?2:8):ml.test(e)?wn:+e}var fl="Expected a function",gl=Math.max,yl=Math.min;function Ae(e,n,o){var i,a,r,s,l,d,c=0,h=!1,y=!1,b=!0;if(typeof e!="function")throw new TypeError(fl);n=pt(n)||0,q(o)&&(h=!!o.leading,y="maxWait"in o,r=y?gl(pt(o.maxWait)||0,n):r,b="trailing"in o?!!o.trailing:b);function B(p){var m=i,u=a;return i=a=void 0,c=p,s=e.apply(u,m),s}function T(p){return c=p,l=setTimeout(f,n),h?B(p):s}function _(p){var m=p-d,u=p-c,w=n-m;return y?yl(w,r-u):w}function C(p){var m=p-d,u=p-c;return d===void 0||m>=n||m<0||y&&u>=r}function f(){var p=ut();if(C(p))return k(p);l=setTimeout(f,_(p))}function k(p){return l=void 0,b&&i?B(p):(i=a=void 0,s)}function O(){l!==void 0&&clearTimeout(l),c=0,i=d=a=l=void 0}function F(){return l===void 0?s:k(ut())}function g(){var p=ut(),m=C(p);if(i=arguments,a=this,d=p,m){if(l===void 0)return T(d);if(y)return clearTimeout(l),l=setTimeout(f,n),B(d)}return l===void 0&&(l=setTimeout(f,n)),s}return g.cancel=O,g.flush=F,g}var bl="__lodash_hash_undefined__";function _l(e){return this.__data__.set(e,bl),this}function wl(e){return this.__data__.has(e)}function Oe(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new te;++n<o;)this.add(e[n])}Oe.prototype.add=Oe.prototype.push=_l,Oe.prototype.has=wl;function kn(e,n,o,i){for(var a=e.length,r=o+(i?1:-1);i?r--:++r<a;)if(n(e[r],r,e))return r;return-1}function kl(e){return e!==e}function Cl(e,n,o){for(var i=o-1,a=e.length;++i<a;)if(e[i]===n)return i;return-1}function El(e,n,o){return n===n?Cl(e,n,o):kn(e,kl,o)}function Sl(e,n){var o=e==null?0:e.length;return!!o&&El(e,n,0)>-1}function Tl(e,n,o){for(var i=-1,a=e==null?0:e.length;++i<a;)if(o(n,e[i]))return!0;return!1}function Cn(e,n){return e.has(n)}function $l(){}function ft(e){var n=-1,o=Array(e.size);return e.forEach(function(i){o[++n]=i}),o}var Bl=1/0,Nl=ke&&1/ft(new ke([,-0]))[1]==Bl?function(e){return new ke(e)}:$l,Ml=200;function Vl(e,n,o){var i=-1,a=Sl,r=e.length,s=!0,l=[],d=l;if(o)s=!1,a=Tl;else if(r>=Ml){var c=n?null:Nl(e);if(c)return ft(c);s=!1,a=Cn,d=new Oe}else d=n?[]:l;e:for(;++i<r;){var h=e[i],y=n?n(h):h;if(h=o||h!==0?h:0,s&&y===y){for(var b=d.length;b--;)if(d[b]===y)continue e;n&&d.push(y),l.push(h)}else a(d,y,o)||(d!==l&&d.push(y),l.push(h))}return l}function En(e){return e&&e.length?Vl(e):[]}var Il=0;function Sn(e){var n=++Il;return zt(e)+n}function Al(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 Tn=Math.max;function Ol(e,n,o){return n=Tn(n===void 0?e.length-1:n,0),function(){for(var i=arguments,a=-1,r=Tn(i.length-n,0),s=Array(r);++a<r;)s[a]=i[n+a];a=-1;for(var l=Array(n+1);++a<n;)l[a]=i[a];return l[n]=o(s),Al(e,this,l)}}function Fl(e){return function(){return e}}var Ul=ze?function(e,n){return ze(e,"toString",{configurable:!0,enumerable:!1,value:Fl(n),writable:!0})}:ve;const Dl=Ul;var Ll=800,vl=16,Pl=Date.now;function ql(e){var n=0,o=0;return function(){var i=Pl(),a=vl-(i-o);if(o=i,a>0){if(++n>=Ll)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var Rl=ql(Dl);function xl(e,n){return Rl(Ol(e,n,ve),e+"")}function zl(e,n,o){if(!q(o))return!1;var i=typeof n;return(i=="number"?_e(o)&&Xe(n,o.length):i=="string"&&n in o)?Me(o[n],e):!1}var $n=Object.prototype,jl=$n.hasOwnProperty,ie=xl(function(e,n){e=Object(e);var o=-1,i=n.length,a=i>2?n[2]:void 0;for(a&&zl(n[0],n[1],a)&&(i=1);++o<i;)for(var r=n[o],s=Ke(r),l=-1,d=s.length;++l<d;){var c=s[l],h=e[c];(h===void 0||Me(h,$n[c])&&!jl.call(e,c))&&(e[c]=r[c])}return e}),Kl=Y.isFinite;function Hl(e){return typeof e=="number"&&Kl(e)}var Bn=1/0,Yl=17976931348623157e292;function Gl(e){if(!e)return e===0?e:0;if(e=pt(e),e===Bn||e===-Bn){var n=e<0?-1:1;return n*Yl}return e===e?e:0}function Nn(e){var n=Gl(e),o=n%1;return n===n?o?n-o:n:0}function Wl(e){return typeof e=="number"&&e==Nn(e)}var Zl="[object Number]";function gt(e){return typeof e=="number"||Z(e)&&oe(e)==Zl}var Mn=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,re="\\d\\d?",ae="\\d\\d",Jl="\\d{3}",Xl="\\d{4}",Fe="[^\\s]+",Vn=/\[([^]*?)\]/gm;function In(e,n){for(var o=[],i=0,a=e.length;i<a;i++)o.push(e[i].substr(0,n));return o}var An=function(e){return function(n,o){var i=o[e].map(function(r){return r.toLowerCase()}),a=i.indexOf(n.toLowerCase());return a>-1?a:null}};function ue(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];for(var i=0,a=n;i<a.length;i++){var r=a[i];for(var s in r)e[s]=r[s]}return e}var On=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Fn=["January","February","March","April","May","June","July","August","September","October","November","December"],Ql=In(Fn,3),es=In(On,3),Un={dayNamesShort:es,dayNames:On,monthNamesShort:Ql,monthNames:Fn,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},Ye=ue({},Un),ts=function(e){return Ye=ue(Ye,e)},Dn=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},K=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},ns={D:function(e){return String(e.getDate())},DD:function(e){return K(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return K(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 K(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 K(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return K(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return K(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return K(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return K(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return K(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return K(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return K(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?"-":"+")+K(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+K(Math.floor(Math.abs(n)/60),2)+":"+K(Math.abs(n)%60,2)}},Ln=function(e){return+e-1},vn=[null,re],Pn=[null,Fe],qn=["isPm",Fe,function(e,n){var o=e.toLowerCase();return o===n.amPm[0]?0:o===n.amPm[1]?1:null}],Rn=["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}],os={D:["day",re],DD:["day",ae],Do:["day",re+Fe,function(e){return parseInt(e,10)}],M:["month",re,Ln],MM:["month",ae,Ln],YY:["year",ae,function(e){var n=new Date,o=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?o-1:o)+e)}],h:["hour",re,void 0,"isPm"],hh:["hour",ae,void 0,"isPm"],H:["hour",re],HH:["hour",ae],m:["minute",re],mm:["minute",ae],s:["second",re],ss:["second",ae],YYYY:["year",Xl],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",ae,function(e){return+e*10}],SSS:["millisecond",Jl],d:vn,dd:vn,ddd:Pn,dddd:Pn,MMM:["month",Fe,An("monthNamesShort")],MMMM:["month",Fe,An("monthNames")],a:qn,A:qn,ZZ:Rn,Z:Rn},Ge={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"},is=function(e){return ue(Ge,e)},rs=function(e,n,o){if(n===void 0&&(n=Ge.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=Ge[n]||n;var i=[];n=n.replace(Vn,function(r,s){return i.push(s),"@@@"});var a=ue(ue({},Ye),o);return n=n.replace(Mn,function(r){return ns[r](e,a)}),n.replace(/@@@/g,function(){return i.shift()})};function as(e,n,o){if(o===void 0&&(o={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=Ge[n]||n,e.length>1e3)return null;var i=new Date,a={year:i.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],s=[],l=n.replace(Vn,function(F,g){return s.push(Dn(g)),"@@@"}),d={},c={};l=Dn(l).replace(Mn,function(F){var g=os[F],p=g[0],m=g[1],u=g[3];if(d[p])throw new Error("Invalid format. "+p+" specified twice in format");return d[p]=!0,u&&(c[u]=!0),r.push(g),"("+m+")"}),Object.keys(c).forEach(function(F){if(!d[F])throw new Error("Invalid format. "+F+" is required in specified format")}),l=l.replace(/@@@/g,function(){return s.shift()});var h=e.match(new RegExp(l,"i"));if(!h)return null;for(var y=ue(ue({},Ye),o),b=1;b<h.length;b++){var B=r[b-1],T=B[0],_=B[2],C=_?_(h[b],y):+h[b];if(C==null)return null;a[T]=C}a.isPm===1&&a.hour!=null&&+a.hour!=12?a.hour=+a.hour+12:a.isPm===0&&+a.hour==12&&(a.hour=0);var f;if(a.timezoneOffset==null){f=new Date(a.year,a.month,a.day,a.hour,a.minute,a.second,a.millisecond);for(var k=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],b=0,O=k.length;b<O;b++)if(d[k[b][0]]&&a[k[b][0]]!==f[k[b][1]]())return null}else if(f=new Date(Date.UTC(a.year,a.month,a.day,a.hour,a.minute-a.timezoneOffset,a.second,a.millisecond)),a.month>11||a.month<0||a.day>31||a.day<1||a.hour>23||a.hour<0||a.minute>59||a.minute<0||a.second>59||a.second<0)return null;return f}var X={format:rs,parse:as,defaultI18n:Un,setGlobalDateI18n:ts,setGlobalDateMasks:is};const x={fieldIsRequired:"This field is required!",invalidFormat:"Invalid format!",numberTooSmall:"The number is too small! Minimum: {0}",numberTooBig:"The number is too big! Maximum: {0}",invalidNumber:"Invalid number",invalidInteger:"The value is not an integer",textTooSmall:"The length of text is too small! Current: {0}, Minimum: {1}",textTooBig:"The length of text is too big! Current: {0}, Maximum: {1}",thisNotText:"This is not a text!",thisNotArray:"This is not an array!",selectMinItems:"Select minimum {0} items!",selectMaxItems:"Select maximum {0} items!",invalidDate:"Invalid date!",dateIsEarly:"The date is too early! Current: {0}, Minimum: {1}",dateIsLate:"The date is too late! Current: {0}, Maximum: {1}",invalidEmail:"Invalid e-mail address!",invalidURL:"Invalid URL!",invalidCard:"Invalid card format!",invalidCardNumber:"Invalid card number!",invalidTextContainNumber:"Invalid text! Cannot contains numbers or special characters",invalidTextContainSpec:"Invalid text! Cannot contains special characters"};function G(e,n,o=x){return P(e)||e===""?n?[v(o.fieldIsRequired)]:[]:null}function v(e,...n){if(e!=null&&n.length>0)for(let o=0;o<n.length;o++)e=e.replace("{"+(o-1)+"}",n[o]);return e}const pe={resources:x,required(e,n,o,i=x){return G(e,n.required,i)},number(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;const r=[];return Hl(e)?(!P(n.min)&&e<n.min&&r.push(v(i.numberTooSmall,n.min)),!P(n.max)&&e>n.max&&r.push(v(i.numberTooBig,n.max))):r.push(v(i.invalidNumber)),r},integer(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;const r=pe.number(e,n,o,i);return Wl(e)||r.push(v(i.invalidInteger)),r},double(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!gt(e)||isNaN(e))return[v(i.invalidNumber)]},string(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;const r=[];return me(e)?(!P(n.min)&&e.length<n.min&&r.push(v(i.textTooSmall,e.length,n.min)),!P(n.max)&&e.length>n.max&&r.push(v(i.textTooBig,e.length,n.max))):r.push(v(i.thisNotText)),r},array(e,n,o,i=x){if(n.required){if(!Array.isArray(e))return[v(i.thisNotArray)];if(e.length===0)return[v(i.fieldIsRequired)]}if(!P(e)){if(!P(n.min)&&e.length<n.min)return[v(i.selectMinItems,n.min)];if(!P(n.max)&&e.length>n.max)return[v(i.selectMaxItems,n.max)]}},date(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;const r=new Date(e);if(isNaN(r.getDate()))return[v(i.invalidDate)];const s=[];if(!P(n.min)){const l=new Date(n.min);r.valueOf()<l.valueOf()&&s.push(v(i.dateIsEarly,X.format(r),X.format(l)))}if(!P(n.max)){const l=new Date(n.max);r.valueOf()>l.valueOf()&&s.push(v(i.dateIsLate,X.format(r),X.format(l)))}return s},regexp(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!P(n.pattern)&&!new RegExp(n.pattern).test(e))return[v(i.invalidFormat)]},email(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!/^(([^<>()\[\]\\.,;:\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))return[v(i.invalidEmail)]},url(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(e))return[v(i.invalidURL)]},creditCard(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;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[v(i.invalidCard)];let l=0,d,c,h;for(let y=s.length-1;y>=0;y--)d=s.substring(y,y+1),c=parseInt(d,10),h?(c*=2,c>=10?l+=c%10+1:l+=c):l+=c,h=!h;if(!(l%10===0&&s))return[v(i.invalidCardNumber)]},alpha(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!/^[a-zA-Z]*$/.test(e))return[v(i.invalidTextContainNumber)]},alphaNumeric(e,n,o,i=x){const a=G(e,n.required,i);if(a!=null)return a;if(!/^[a-zA-Z0-9]*$/.test(e))return[v(i.invalidTextContainSpec)]}};Object.keys(pe).forEach(e=>{const n=pe[e];V(n)&&(n.locale=o=>(i,a,r)=>n(i,a,r,ie(o,x)))});function xn(e){return me(e)?pe[e]!=null?pe[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function yt(e,n,o){let i=N(o.context,"schema.attributes",{});const a=n.value||"input";me(a)&&(i=N(i,a)||i),z(i,(r,s)=>{e.setAttribute(s,r)})}const I={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:yt,updated:yt,componentUpdated:yt}},computed:{value:{cache:!1,get(){let e;return V(N(this.schema,"get"))?e=this.schema.get(this.model):e=N(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),V(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=N(this.formOptions,"validateAsync",!1);let o=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const a=[];Array.isArray(this.schema.validator)?z(this.schema.validator,r=>{a.push(xn(r).bind(this))}):a.push(xn(this.schema.validator).bind(this)),z(a,r=>{if(n)o.push(r(this.value,this.schema,this.model));else{const s=r(this.value,this.schema,this.model);s&&V(s.then)?s.then(l=>{l&&(this.errors=this.errors.concat(l));const d=this.errors.length===0;this.$emit("validated",d,this.errors,this)}):s&&(o=o.concat(s))}})}const i=a=>{let r=[];z(En(a),l=>{Array.isArray(l)&&l.length>0?r=r.concat(l):me(l)&&r.push(l)}),V(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(i):i(o)},debouncedValidate(){V(this.debouncedValidateFunc)||(this.debouncedValidateFunc=Ae(this.validate.bind(this),N(this.schema,"validateDebounceTime",N(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let o=!1;V(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),V(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),N(this.formOptions,"validateAfterChanged",!1)===!0&&(N(this.schema,"validateDebounceTime",N(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 i=this.model;const a=o.split(".");let r=0;const s=a.length;for(;r<s;){const l=a[r];if(r<s-1)i[l]!==void 0||(i[l]={}),i=i[l];else{i[l]=n;return}++r}},getFieldID(e,n=!1){const o=N(this.formOptions,"fieldIdPrefix","");return ht(e,o)+(n?"-"+Sn():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return N(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},ls=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"})),ss={mixins:[I]},ds=["id","autocomplete","disabled","name","required"];function cs(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("input",{id:e.getFieldID(e.schema),type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,name:e.schema.inputName,class:t.normalizeClass(e.schema.fieldClasses),required:e.schema.required},null,10,ds)),[[t.vModelCheckbox,e.value],[s,"input"]])}const S=(e,n)=>{const o=e.__vccOpts||e;for(const[i,a]of n)o[i]=a;return o},ms=S(ss,[["render",cs]]);var hs=4;function zn(e){return Ie(e,hs)}const us={class:"wrapper"},ps=["disabled"],fs=["id","checked","disabled","onChange","name"],gs=["disabled"],ys={class:"info"},bs=t.createElementVNode("div",{class:"arrow"},null,-1),_s={class:"dropList"},ws=["id","checked","disabled","onChange","name"];function ks(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",us,[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,l=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(l)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(l)||null,disabled:e.disabled||null,onChange:d=>r.onChanged(d,l),name:r.getInputName(l)},null,40,fs),[[s,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(l)),1)])],2))),256))],8,ps)):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:a.comboExpanded}]),onClick:n[0]||(n[0]=(...l)=>r.onExpandCombo&&r.onExpandCombo(...l))},[t.createElementVNode("div",ys,t.toDisplayString(r.selectedCount)+" selected",1),bs],2),t.createElementVNode("div",_s,[a.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.items,l=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(l)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(l)||null,disabled:e.disabled||null,onChange:d=>r.onChanged(d,l),name:r.getInputName(l)},null,40,ws),[[s,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(l)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,gs))])),[[s,"wrapper"]])}const Cs=S({mixins:[I],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?_n(this.schema.inputName+"_"+this.getItemValue(e)):_n(this.getItemValue(e))},getItemValue(e){if(q(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(q(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((P(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const o=zn(this.value);o.push(this.getItemValue(n)),this.value=o}else{const o=zn(this.value);o.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",ks]]);function Es(e){const n=t.ref([]),o=t.ref(null),i=_=>me(_)?pe[_]!=null?pe[_]:(console.warn(`'${_}' is not a validator function!`),null):_,a=t.computed({get(){var C,f;let _;return V(N(e.schema,"get"))?_=e.schema.get((C=e.model)==null?void 0:C.value):_=N((f=e.model)==null?void 0:f.value,e.schema.model),B(_)},set(_){const C=a;_=T(_),V(_)?_(_,C):l(_,C)}}),r=_=>{var F;d();const C=(F=e.schema)==null?void 0:F.validator,f=N(e.formOptions,"validateAsync",!1);let k=[];if(C&&e.schema.readonly!==!0&&e.disabled!==!0){const g=[];Array.isArray(C)?z(C,p=>{g.push(i(p))}):g.push(i(C)),z(g,p=>{var m,u;if(f)k.push(p(a.value,e.schema,(m=e.model)==null?void 0:m.value));else{const w=p(a.value,e.schema,(u=e.model)==null?void 0:u.value);w&&V(w.then)?w.then(E=>{E&&(n.value=n.value.concat(E));const M=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:M,errors:n.value,field:e.schema})}):w&&(k=k.concat(w))}})}const O=g=>{var m,u;let p=[];if(z(En(g),w=>{Array.isArray(w)&&w.length>0?p=p.concat(w):me(w)&&p.push(w)}),V((m=e.schema)==null?void 0:m.onValidated)&&e.schema.onValidated((u=e.model)==null?void 0:u.value,p,e.schema),!_){const w=p.length===0;e.emitValidated&&e.emitValidated({isValid:w,errors:p,field:e.schema})}return g=p,p};return f?Promise.all(k).then(O):O(k)},s=()=>{V(o.value)?o.value():o.value=Ae(r,N(e.schema,"validateDebounceTime",N(e.formOptions,"validateDebounceTime",500)))},l=(_,C)=>{var k,O,F;let f=!1;V(e.schema.set)?(e.schema.set((k=e.model)==null?void 0:k.value,_),f=!0):e.schema.model&&(c(e.schema.model,_),f=!0),f&&(e.emitModelUpdated&&((O=e.model)!=null&&O.value)&&e.emitModelUpdated({value:_,model:e.schema.model}),V(e.schema.onChanged)&&e.schema.onChanged((F=e.model)==null?void 0:F.value,_,C,e.schema),N(e.formOptions,"validateAfterChanged",!1)===!0&&(N(e.schema,"validateDebounceTime",N(e.formOptions,"validateDebounceTime",0))>0?s():r()))},d=()=>{n.value.splice(0)},c=(_,C)=>{var p;let f=_.replace(/\[(\w+)\]/g,".$1");f=f.replace(/^\./,"");let k=((p=e.model)==null?void 0:p.value)||{},O=0;const F=f.split("."),g=F.length;for(;O<g;){const m=F[O];if(O<g-1)k[m]!==void 0||(k[m]={}),k=k[m];else{k[m]=C;return}++O}},h=(_,C=!1)=>{const f=N(e.formOptions,"fieldIdPrefix","");return ht(_,f)+(C?"-"+Sn():"")},y=_=>`${h(_)}-label`,b=()=>N(e.schema,"fieldClasses",[]),B=_=>_,T=_=>_;return{value:a,clearValidationErrors:d,getFieldID:h,getLabelId:y,getFieldClasses:b,updateModelValue:l}}const jn={useAbstractFields:Es},Ss={class:"form-field-wrapper"},Kn=S(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 i=e,a=o,r=t.toRefs(i),{updateModelValue:s,getFieldID:l,clearValidationErrors:d,value:c}=jn.useAbstractFields({model:r.model,schema:i.schema,formOptions:i.formOptions,emitModelUpdated:f=>{a("modelUpdated",f.value,f.model)}});n({clearValidationErrors:d});const h=t.computed(()=>{var k;const f=(k=i.schema)==null?void 0:k.inputType.toLowerCase();return f==="string"?"text":f==="datetime"?"datetime-local":f||"text"}),y={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},b=(f,k)=>{var p,m;let O=f;const F=y[h.value]||"",g=X.parse(f,F);g&&((p=i.schema)!=null&&p.format?O=X.format(g,(m=i.schema)==null?void 0:m.format):O=g.valueOf()),s(O,k)},B=(f,k)=>{gt(f)||(f=NaN),s(f,k)},T=f=>{let k=f;switch(h.value){case"number":case"range":gt(parseFloat(f))&&(k=parseFloat(f));break}c.value=k,s(k,f)},_=t.ref(null),C=()=>{var f;V(_.value)&&((f=_.value)==null||f.flush())};return t.onMounted(()=>{switch(h.value){case"number":case"range":_.value=Ae((f,k)=>{B(f,k)},parseInt(N(i.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":_.value=Ae((f,k)=>{b(f,k)},parseInt(N(i.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}}),t.onBeforeMount(()=>{h.value==="checkbox"?console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead."):h.value==="radio"?console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead."):h.value==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}),(f,k)=>{const O=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Ss,[t.createVNode(O,t.mergeProps(f.$attrs,{id:t.unref(l)(e.schema),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||null,help:e.hint?e.hint:h.value==="color"||h.value==="range"?t.unref(c):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(c),name:e.schema.inputName,pattern:e.schema.pattern,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,type:h.value,width:e.schema.width,onBlur:C,"onUpdate:modelValue":T}),null,16,["id","autocomplete","class","disabled","help","max","maxlength","min","minlength","model-value","name","pattern","placeholder","readonly","required","type","width"])])}}}),[["__scopeId","data-v-b6d4701b"]]),Ts=S(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:i,value:a}=jn.useAbstractFields({model:o.model,schema:n.schema,formOptions:n.formOptions});return(r,s)=>{const l=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(l,{id:t.unref(i)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)),1)]),_:1},8,["id"])],2)}}}),[["__scopeId","data-v-852ab959"]]),$s=["disabled"],Bs=["id","disabled","name","onClick","value","checked","required"];function Ns(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:"radio-list",disabled:e.disabled||null},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,l=>t.withDirectives((t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(r.getItemCssClasses(l))},[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"radio",disabled:r.isItemDisabled(l)||null,name:r.id,onClick:d=>r.onSelection(l),value:r.getItemValue(l),checked:r.isItemChecked(l)||null,class:t.normalizeClass(e.schema.fieldClasses),required:e.schema.required},null,10,Bs),[[s,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(l)),1)],2)),[[s,"label"]])),256))],8,$s)),[[s,"wrapper"]])}const Ms=S({mixins:[I],computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e},id(){return this.schema.model}},methods:{getItemValue(e){if(q(e)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.value<"u")return e[this.schema.radiosOptions.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 `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return e},getItemName(e){if(q(e)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.name<"u")return e[this.schema.radiosOptions.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 `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return e},getItemCssClasses(e){return{"is-checked":this.isItemChecked(e),"is-disabled":this.isItemDisabled(e)}},onSelection(e){this.value=this.getItemValue(e)},isItemChecked(e){return this.getItemValue(e)===this.value},isItemDisabled(e){if(this.disabled)return!0;const n=N(e,"disabled",!1);return V(n)?n(this.model):n}}},[["render",Ns]]);function Vs(e,n){for(var o=-1,i=e==null?0:e.length;++o<i;)if(n(e[o],o,e))return!0;return!1}var Is=1,As=2;function Hn(e,n,o,i,a,r){var s=o&Is,l=e.length,d=n.length;if(l!=d&&!(s&&d>l))return!1;var c=r.get(e),h=r.get(n);if(c&&h)return c==n&&h==e;var y=-1,b=!0,B=o&As?new Oe:void 0;for(r.set(e,n),r.set(n,e);++y<l;){var T=e[y],_=n[y];if(i)var C=s?i(_,T,y,n,e,r):i(T,_,y,e,n,r);if(C!==void 0){if(C)continue;b=!1;break}if(B){if(!Vs(n,function(f,k){if(!Cn(B,k)&&(T===f||a(T,f,o,i,r)))return B.push(k)})){b=!1;break}}else if(!(T===_||a(T,_,o,i,r))){b=!1;break}}return r.delete(e),r.delete(n),b}function Os(e){var n=-1,o=Array(e.size);return e.forEach(function(i,a){o[++n]=[a,i]}),o}var Fs=1,Us=2,Ds="[object Boolean]",Ls="[object Date]",vs="[object Error]",Ps="[object Map]",qs="[object Number]",Rs="[object RegExp]",xs="[object Set]",zs="[object String]",js="[object Symbol]",Ks="[object ArrayBuffer]",Hs="[object DataView]",Yn=W?W.prototype:void 0,bt=Yn?Yn.valueOf:void 0;function Ys(e,n,o,i,a,r,s){switch(o){case Hs:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case Ks:return!(e.byteLength!=n.byteLength||!r(new He(e),new He(n)));case Ds:case Ls:case qs:return Me(+e,+n);case vs:return e.name==n.name&&e.message==n.message;case Rs:case zs:return e==n+"";case Ps:var l=Os;case xs:var d=i&Fs;if(l||(l=ft),e.size!=n.size&&!d)return!1;var c=s.get(e);if(c)return c==n;i|=Us,s.set(e,n);var h=Hn(l(e),l(n),i,a,r,s);return s.delete(e),h;case js:if(bt)return bt.call(e)==bt.call(n)}return!1}var Gs=1,Ws=Object.prototype,Zs=Ws.hasOwnProperty;function Js(e,n,o,i,a,r){var s=o&Gs,l=lt(e),d=l.length,c=lt(n),h=c.length;if(d!=h&&!s)return!1;for(var y=d;y--;){var b=l[y];if(!(s?b in n:Zs.call(n,b)))return!1}var B=r.get(e),T=r.get(n);if(B&&T)return B==n&&T==e;var _=!0;r.set(e,n),r.set(n,e);for(var C=s;++y<d;){b=l[y];var f=e[b],k=n[b];if(i)var O=s?i(k,f,b,n,e,r):i(f,k,b,e,n,r);if(!(O===void 0?f===k||a(f,k,o,i,r):O)){_=!1;break}C||(C=b=="constructor")}if(_&&!C){var F=e.constructor,g=n.constructor;F!=g&&"constructor"in e&&"constructor"in n&&!(typeof F=="function"&&F instanceof F&&typeof g=="function"&&g instanceof g)&&(_=!1)}return r.delete(e),r.delete(n),_}var Xs=1,Gn="[object Arguments]",Wn="[object Array]",We="[object Object]",Qs=Object.prototype,Zn=Qs.hasOwnProperty;function ed(e,n,o,i,a,r){var s=H(e),l=H(n),d=s?Wn:Ce(e),c=l?Wn:Ce(n);d=d==Gn?We:d,c=c==Gn?We:c;var h=d==We,y=c==We,b=d==c;if(b&&$e(e)){if(!$e(n))return!1;s=!0,h=!1}if(b&&!h)return r||(r=new J),s||nt(e)?Hn(e,n,o,i,a,r):Ys(e,n,d,o,i,a,r);if(!(o&Xs)){var B=h&&Zn.call(e,"__wrapped__"),T=y&&Zn.call(n,"__wrapped__");if(B||T){var _=B?e.value():e,C=T?n.value():n;return r||(r=new J),a(_,C,o,i,r)}}return b?(r||(r=new J),Js(e,n,o,i,a,r)):!1}function _t(e,n,o,i,a){return e===n?!0:e==null||n==null||!Z(e)&&!Z(n)?e!==e&&n!==n:ed(e,n,o,i,_t,a)}var td=1,nd=2;function od(e,n,o,i){var a=o.length,r=a,s=!i;if(e==null)return!r;for(e=Object(e);a--;){var l=o[a];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<r;){l=o[a];var d=l[0],c=e[d],h=l[1];if(s&&l[2]){if(c===void 0&&!(d in e))return!1}else{var y=new J;if(i)var b=i(c,h,d,e,n,y);if(!(b===void 0?_t(h,c,td|nd,i,y):b))return!1}}return!0}function Jn(e){return e===e&&!q(e)}function id(e){for(var n=we(e),o=n.length;o--;){var i=n[o],a=e[i];n[o]=[i,a,Jn(a)]}return n}function Xn(e,n){return function(o){return o==null?!1:o[e]===n&&(n!==void 0||e in Object(o))}}function rd(e){var n=id(e);return n.length==1&&n[0][2]?Xn(n[0][0],n[0][1]):function(o){return o===e||od(o,e,n)}}function ad(e,n){return e!=null&&n in Object(e)}function ld(e,n,o){n=jt(n,e);for(var i=-1,a=n.length,r=!1;++i<a;){var s=xe(n[i]);if(!(r=e!=null&&o(e,s)))break;e=e[s]}return r||++i!=a?r:(a=e==null?0:e.length,!!a&&Qe(a)&&Xe(s,a)&&(H(e)||Je(e)))}function sd(e,n){return e!=null&&ld(e,n,ad)}var dd=1,cd=2;function md(e,n){return ot(e)&&Jn(n)?Xn(xe(e),n):function(o){var i=N(o,e);return i===void 0&&i===n?sd(o,e):_t(n,i,dd|cd)}}function hd(e){return function(n){return n==null?void 0:n[e]}}function ud(e){return function(n){return Kt(n,e)}}function pd(e){return ot(e)?hd(xe(e)):ud(e)}function Qn(e){return typeof e=="function"?e:e==null?ve:typeof e=="object"?H(e)?md(e[0],e[1]):rd(e):pd(e)}function fd(e){return function(n,o,i){var a=Object(n);if(!_e(n)){var r=Qn(o);n=we(n),o=function(l){return r(a[l],l,a)}}var s=e(n,o,i);return s>-1?a[r?n[s]:s]:void 0}}var gd=Math.max;function yd(e,n,o){var i=e==null?0:e.length;if(!i)return-1;var a=o==null?0:Nn(o);return a<0&&(a=gd(i+a,0)),kn(e,Qn(n),a)}var bd=fd(yd);const _d=["disabled","name","id"],wd=["disabled"],kd=["label"],Cd=["value"],Ed=["value"];function Sd(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("select",{class:t.normalizeClass(["form-control",e.schema.fieldClasses]),"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),disabled:e.disabled||null,name:e.schema.inputName,id:e.getFieldID(e.schema)},[r.selectOptions.hideNoneSelectedText?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("option",{key:0,disabled:e.schema.required||null,value:null},t.toDisplayString(r.selectOptions.noneSelectedText||"<Nothing selected>"),9,wd)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,l=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[l.group?(t.openBlock(),t.createElementBlock("optgroup",{key:0,label:r.getGroupName(l)},[l.ops?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(l.ops,d=>(t.openBlock(),t.createElementBlock("option",{value:r.getItemValue(d)},t.toDisplayString(r.getItemName(d)),9,Cd))),256)):t.createCommentVNode("",!0)],8,kd)):t.createCommentVNode("",!0),l.group?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("option",{key:1,value:r.getItemValue(l)},t.toDisplayString(r.getItemName(l)),9,Ed))],64))),256))],10,_d)),[[t.vModelSelect,e.value],[s,"input"]])}const eo=S({mixins:[I],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const e=this.schema.values;return typeof e=="function"?this.groupValues(e.apply(this,[this.model,this.schema])):this.groupValues(e)}},methods:{formatValueToField(e){return P(e)?null:e},groupValues(e){const n=[];let o={};return e.forEach(i=>{o=null,i.group&&q(i)?(o=bd(n,a=>a.group===i.group),o?o.ops.push({id:i.id,name:i.name}):(o={group:"",ops:[]},o.group=i.group,o.ops.push({id:i.id,name:i.name}),n.push(o))):n.push(i)}),n},getGroupName(e){if(e&&e.group)return e.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(e){if(q(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return e[this.schema.selectOptions.value];if(typeof e.id<"u")return e.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 e},getItemName(e){if(q(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return e[this.schema.selectOptions.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 `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return e}}},[["render",Sd]]);var Td="[object Map]",$d="[object Set]",Bd=Object.prototype,Nd=Bd.hasOwnProperty;function Md(e){if(e==null)return!0;if(_e(e)&&(H(e)||typeof e=="string"||typeof e.splice=="function"||$e(e)||nt(e)||Je(e)))return!e.length;var n=Ce(e);if(n==Td||n==$d)return!e.size;if(Le(e))return!vt(e).length;for(var o in e)if(Nd.call(e,o))return!1;return!0}const Vd=["id","value","name","disabled"];function Id(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("input",{id:e.getFieldID(e.schema),type:"submit",value:e.schema.buttonText,onClick:n[0]||(n[0]=(...s)=>r.onClick&&r.onClick(...s)),name:e.schema.inputName,disabled:e.disabled||null,class:t.normalizeClass(e.schema.fieldClasses)},null,10,Vd)}const Ad=S({mixins:[I],methods:{onClick(e){if(this.schema.validateBeforeSubmit===!0){e.preventDefault();const n=N(this.formOptions,"validateAsync",!1),o=this.vfg.validate(),i=a=>{n&&!Md(a)||!n&&!a?V(this.schema.onValidationError)&&this.schema.onValidationError(this.model,this.schema,a,e):V(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,e)};o&&V(o.then)?o.then(i):i(o)}else V(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,e)}}},[["render",Id]]),Od=["id","disabled","maxlength","minlength","placeholder","readonly","required","rows","name"];function Fd(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("textarea",{class:t.normalizeClass(["form-control",e.schema.fieldClasses]),"onUpdate:modelValue":n[0]||(n[0]=l=>e.value=l),id:e.getFieldID(e.schema),disabled:e.disabled||null,maxlength:e.schema.max,minlength:e.schema.min,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,rows:e.schema.rows||2,name:e.schema.inputName},null,10,Od)),[[t.vModelText,e.value],[s,"input"]])}const to=S({mixins:[I]},[["render",Fd]]),Ud={class:"wrapper"},Dd=["id","name","accept","multiple","placeholder","readonly","required","disabled"];function Ld(e,n,o,i,a,r){const s=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",Ud,[t.withDirectives(t.createElementVNode("input",{class:"form-control",id:e.getFieldID(e.schema),type:"file",name:e.schema.inputName,onChange:n[0]||(n[0]=(...l)=>r.onChange&&r.onChange(...l)),accept:e.schema.accept,multiple:e.schema.multiple,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,disabled:e.disabled||null},null,40,Dd),[[s,"input"]])])),[[s,"wrapper"]])}const vd=S({mixins:[I],methods:{onChange(e){V(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,e,this)}}},[["render",Ld]]),Pd=["value","autocomplete","disabled","placeholder","readonly","name","id"];function qd(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("input",{class:"form-control",type:"text",value:e.value,autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,Pd)}const Rd=S({mixins:[I],data(){return{cleave:null}},mounted(){this.$nextTick(function(){window.Cleave?(this.cleave=new window.Cleave(this.$el,ie(this.schema.cleaveOptions||{},{creditCard:!1,phone:!1,phoneRegionCode:"AU",date:!1,datePattern:["d","m","Y"],numeral:!1,numeralThousandsGroupStyle:"thousand",numeralDecimalScale:2,numeralDecimalMark:".",blocks:[],delimiter:" ",prefix:null,numericOnly:!1,uppercase:!1,lowercase:!1,maxLength:0})),this.cleave.properties&&this.cleave.properties.hasOwnProperty.call("result")?this.$watch("cleave.properties.result",()=>{this.value=this.cleave.properties.result}):this.$el.addEventListener("input",this.inputChange)):console.warn("Cleave is missing. Please download from https://github.com/nosir/cleave.js/ and load the script in the HTML head section!")})},beforeUnmount(){this.cleave&&(this.cleave.destroy(),this.$el.removeEventListener("input",this.inputChange))},methods:{inputChange(){this.value=this.$el.value}}},[["render",qd]]),no={formatValueToField(e){if(e!=null){const n=this.schema.format?X.parse(e,this.schema.format):new Date(e);return X.format(n,this.getDateFormat())}return e},formatValueToModel(e){if(e!=null){const n=X.parse(e,this.getDateFormat());this.schema.format?e=X.format(n,this.schema.format):e=n.valueOf()}return e}},xd={class:"input-group date"},zd=["autocomplete","disabled","placeholder","readonly","name","id"],jd=t.createElementVNode("span",{class:"input-group-addon"},[t.createElementVNode("span",{class:"glyphicon glyphicon-calendar"})],-1);function Kd(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("div",xd,[t.withDirectives(t.createElementVNode("input",{class:"form-control",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,zd),[[t.vModelText,e.value]]),jd])}const oo="YYYY-MM-DD HH:mm:ss",Hd={mixins:[I],mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.datetimepicker){const e=this.$el.querySelector(".form-control");$(this.$el).datetimepicker(ie(this.schema.dateTimePickerOptions||{},{format:oo})).on("dp.change",()=>{this.value=e.value})}else console.warn("Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.datetimepicker&&$(this.$el).data("DateTimePicker").destroy()},methods:{getDateFormat(){return this.schema.dateTimePickerOptions&&this.schema.dateTimePickerOptions.format?this.schema.dateTimePickerOptions.format:oo},...no}},Yd=S(Hd,[["render",Kd]]),Gd=["autocomplete","disabled","placeholder","readonly","name","id"];function Wd(e,n,o,i,a,r){return t.withDirectives((t.openBlock(),t.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,debounce:"500",onFocus:n[1]||(n[1]=s=>r.geolocate()),id:e.getFieldID(e.schema)},null,40,Gd)),[[t.vModelText,e.value]])}const Zd=S({mixins:[I],data(){return{autocomplete:"",inputs:{street_number:"long_name",route:"long_name",country:"long_name",administrative_area_level_1:"long_name",administrative_area_level_2:"long_name",locality:"long_name",postal_code:"short_name"}}},mounted(){this.$nextTick(()=>{window.google&&window.google.maps&&window.google.maps.places&&window.google.maps.places.Autocomplete?(this.autocomplete=new google.maps.places.Autocomplete(this.$el,{types:["geocode"]}),this.autocomplete.addListener("place_changed",this.pipeAddress)):console.warn("Google Maps API is missing. Please add https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&libraries=places script in the HTML head section!")})},methods:{pipeAddress(){const e=this.autocomplete.getPlace();if(e){this.value=e.formatted_address;const n={};if(e.address_components!==void 0)for(let o=0;o<e.address_components.length;o++){const i=e.address_components[o].types[0];this.inputs[i]&&(n[i]=e.address_components[o][this.inputs[i]])}V(this.schema.onPlaceChanged)&&this.schema.onPlaceChanged(this.value,n,e,this.model,this.schema)}},geolocate(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(e=>{const n={lat:e.coords.latitude,lng:e.coords.longitude},o=new window.google.maps.Circle({center:n,radius:e.coords.accuracy});this.autocomplete.setBounds(o.getBounds())})}}},[["render",Wd]]),Jd={class:"wrapper"},Xd=["autocomplete","disabled","placeholder","readonly"],Qd=["disabled","name"];function ec(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("div",Jd,[t.withDirectives(t.createElementVNode("input",{class:"form-control link",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>r.wrappedValue=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly},null,8,Xd),[[t.vShow,e.schema.hideInput!==!0],[t.vModelText,r.wrappedValue]]),e.schema.browse!==!1?(t.openBlock(),t.createElementBlock("input",{key:0,class:"form-control file",type:"file",disabled:e.disabled||null,onChange:n[1]||(n[1]=(...s)=>r.fileChanged&&r.fileChanged(...s)),name:e.schema.inputName},null,40,Qd)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"preview",style:t.normalizeStyle(r.previewStyle)},[t.createElementVNode("div",{class:"remove",title:"Remove image",onClick:n[2]||(n[2]=(...s)=>r.remove&&r.remove(...s))})],4)])}const tc=S({mixins:[I],computed:{previewStyle(){return this.schema.preview!==!1?{display:"block","background-image":this.value!=null?"url("+this.value+")":"none"}:{display:"none"}},wrappedValue:{get(){return this.value&&this.value.indexOf("data")===0?"<inline base64 image>":this.value},set(e){e&&e.indexOf("http")===0&&(this.value=e)}}},watch:{model:{deep:!0,handler(){const e=this.$el.querySelector("input.file");e&&(e.value="")}}},methods:{remove(){this.value=""},fileChanged(e){const n=new FileReader;n.onload=o=>{this.value=o.target.result},e.target.files&&e.target.files.length>0&&n.readAsDataURL(e.target.files[0])}}},[["render",ec]]),nc=["autocomplete","disabled","placeholder","readonly","name","id"];function oc(e,n,o,i,a,r){return t.withDirectives((t.openBlock(),t.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,nc)),[[t.vModelText,e.value]])}const ic=S({mixins:[I],mounted(){this.$nextTick(function(){window.$&&window.$.fn.mask?$(this.$el).unmask().mask(this.schema.mask,this.schema.maskOptions):console.warn("JQuery MaskedInput library is missing. Please download from https://github.com/digitalBush/jquery.maskedinput and load the script in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.mask&&$(this.$el).unmask()}},[["render",oc]]),rc={mixins:[I],data(){return{slider:null}},computed:{containPips(){return this.schema.noUiSliderOptions&&typeof this.schema.noUiSliderOptions.pips<"u"},containTooltip(){return this.schema.noUiSliderOptions&&this.schema.noUiSliderOptions.tooltips}},watch:{model:{handler(){window.noUiSlider&&this.slider&&this.slider.noUiSlider&&this.slider.noUiSlider.set(this.value)},deep:!0}},mounted(){this.$nextTick(()=>{window.noUiSlider?(this.slider=this.$el,window.noUiSlider.create(this.slider,ie(this.schema.noUiSliderOptions||{},{start:this.getStartValue(),range:{min:this.schema.min,max:this.schema.max}})),this.slider.noUiSlider.on("change",this.onChange.bind(this))):console.warn("noUiSlider is missing. Please download from https://github.com/leongersen/noUiSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.noUiSlider.off("change")},methods:{onChange(e){Array.isArray(e)?this.value=[parseFloat(e[0]),parseFloat(e[1])]:this.value=parseFloat(e)},formatValueToField(e){this.slider!==null&&typeof this.slider.noUiSlider<"u"&&this.slider.noUiSlider.set(e)},formatValueToModel(e){if(typeof this.slider.noUiSlider<"u")return e instanceof Array?[Number(e[0]),Number(e[1])]:Number(e)},getStartValue(){return this.value!=null?this.value:typeof this.schema.noUiSliderOptions<"u"&&this.schema.noUiSliderOptions.double?[this.schema.min,this.schema.min]:this.schema.min}}},ac=["disabled"];function lc(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["slider",{"contain-pips":r.containPips,"contain-tooltip":r.containTooltip}]),disabled:e.disabled||null},null,10,ac)}const sc=S(rc,[["render",lc]]),dc=["autocomplete","disabled","placeholder","readonly","name"];function cc(e,n,o,i,a,r){return t.withDirectives((t.openBlock(),t.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName},null,8,dc)),[[t.vModelText,e.value]])}const mc="YYYY-MM-DD",hc={mixins:[I],data(){return{picker:null,options:null}},mounted(){this.initialize(N(this.schema,"pikadayOptions",{}))},beforeUnmount(){this.picker&&this.picker.destroy()},methods:{getDateFormat(){return N(this.schema,"pikadayOptions.format",mc)},...no,initialize(e){this.picker&&this.picker.destroy&&this.picker.destroy(),this.$nextTick(()=>{window.Pikaday?(this.options=ie({},e,{field:this.$el,onSelect:()=>{this.value=this.picker.toString()}}),this.picker=new window.Pikaday(this.options)):console.warn("Pikaday is missing. Please download from https://github.com/dbushell/Pikaday/ and load the script and CSS in the HTML head section!")})}}},uc=S(hc,[["render",cc]]),pc=["autocomplete","data-disable","data-max","data-min","data-step","placeholder","readonly","name"];function fc(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("input",{type:"text",autocomplete:e.schema.autocomplete,"data-disable":e.disabled,"data-max":e.schema.max,"data-min":e.schema.min,"data-step":e.schema.step,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName},null,8,pc)}const gc=S({mixins:[I],data(){return{slider:null}},watch:{model:{deep:!0,handler(){if(window.$&&window.$.fn.ionRangeSlider){let e,n;Array.isArray(this.value)?[e,n]=this.value:e=this.value,this.slider&&this.slider.update({from:e,to:n})}}}},mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.ionRangeSlider){let e,n;Array.isArray(this.value)?[e,n]=this.value:e=this.value;const o=this;$(this.$el).ionRangeSlider(ie(this.schema.rangeSliderOptions||{},{type:"single",grid:!0,hide_min_max:!0,from:e,to:n,onChange(i){o.slider.options.type==="double"?o.value=[i.from,i.to]:o.value=i.from}})),this.slider=$(this.$el).data("ionRangeSlider")}else console.warn("ion.rangeSlider library is missing. Please download from https://github.com/IonDen/ion.rangeSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.destroy()}},[["render",fc]]),yc=["disabled","multiple","title","name"],bc=["disabled","selected"],_c=["value"];function wc(e,n,o,i,a,r){return t.withDirectives((t.openBlock(),t.createElementBlock("select",{class:"selectpicker","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),disabled:e.disabled||null,multiple:e.schema.multiSelect,title:e.schema.placeholder,"data-width":"100%",name:e.schema.inputName},[e.schema.multiSelect!==!0?(t.openBlock(),t.createElementBlock("option",{key:0,disabled:e.schema.required||null,value:null,selected:e.value==null},null,8,bc)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock("option",{value:r.getItemValue(s)},t.toDisplayString(r.getItemName(s)),9,_c))),256))],8,yc)),[[t.vModelSelect,e.value]])}const kc=S({mixins:[I],computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e}},watch:{model:{deep:!0,handler(){$.fn.selectpicker&&$(this.$el).selectpicker("refresh")}}},mounted(){this.$nextTick(function(){$.fn.selectpicker?$(this.$el).selectpicker("destroy").selectpicker(this.schema.selectOptions):console.warn("Bootstrap-select library is missing. Please download from https://silviomoreto.github.io/bootstrap-select/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){$.fn.selectpicker&&$(this.$el).selectpicker("destroy")},methods:{getItemValue(e){if(q(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return e[this.schema.selectOptions.value];if(typeof e.id<"u")return e.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 e},getItemName(e){if(q(e)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return e[this.schema.selectOptions.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 `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return e}}},[["render",wc]]),Cc=["autocomplete","disabled","placeholder","readonly","name","id"];function Ec(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("input",{type:"text",autocomplete:e.schema.autocomplete,disabled:e.disabled||null,placeholder:e.schema.placeholder,readonly:e.schema.readonly,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,Cc)}const Sc=S({mixins:[I],data(){return{picker:null}},watch:{model:{deep:!0,handler(){window.$&&window.$.fn.spectrum&&this.picker.spectrum("set",this.value)}},disabled(e){e?this.picker.spectrum("disable"):this.picker.spectrum("enable")}},mounted(){this.$nextTick(function(){window.$&&window.$.fn.spectrum?(this.picker=$(this.$el).spectrum("destroy").spectrum(ie(this.schema.colorOptions||{},{showInput:!0,showAlpha:!0,disabled:this.schema.disabled,allowEmpty:!this.schema.required,preferredFormat:"hex",change:e=>{this.value=e?e.toString():null}})),this.picker.spectrum("set",this.value)):console.warn("Spectrum color library is missing. Please download from http://bgrins.github.io/spectrum/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.picker&&this.picker.spectrum("destroy")}},[["render",Ec]]),Tc=["src"];function $c(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("img",{src:r.mapLink},null,8,Tc)}const Bc=S({mixins:[I],computed:{mapLink(){let e,n,o;if(this.value){const i=ie(this.schema.staticMapOptions||{},{lat:"lat",lng:"lng",zoom:8,sizeX:640,sizeY:640});e=this.value[i.lat],n=this.value[i.lng],o=`http://maps.googleapis.com/maps/api/staticmap?center=${e},${n}&zoom=${i.zoom}&size=${i.sizeX}x${i.sizeY}`;const a=["scale","format","maptype","language","region","markers","path","visible","style","key","signature"];for(const r of a)typeof i[r]<"u"&&(o+=`&${r}=${i[r]}`)}return o}}},[["render",$c]]),Nc=["autocomplete","disabled","name","id"],Mc=["data-on","data-off","for"],Vc=t.createElementVNode("span",{class:"handle"},null,-1);function Ic(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("label",null,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s),autocomplete:e.schema.autocomplete,disabled:e.disabled||null,name:e.schema.inputName,id:e.getFieldID(e.schema)},null,8,Nc),[[t.vModelCheckbox,e.value]]),t.createElementVNode("span",{class:"label","data-on":e.schema.textOn||"On","data-off":e.schema.textOff||"Off",for:e.getFieldID(e.schema)},null,8,Mc),Vc])}const Ac=S({mixins:[I],methods:{formatValueToField(e){return e!=null&&this.schema.valueOn?e===this.schema.valueOn:e},formatValueToModel(e){return e!=null&&this.schema.valueOn?e?this.schema.valueOn:this.schema.valueOff:e}}},[["render",Ic]]),Oc={mixins:[I],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 i=e[o];n[i]=typeof this.value[i]}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=""}}},Fc={key:0},Uc={key:1},Dc=["id"],Lc={key:0},vc=["onUpdate:modelValue"],Pc={key:1},qc=["onUpdate:modelValue"],Rc={key:2},xc=["onUpdate:modelValue"],zc=["onClick"],jc=[t.createElementVNode("option",{value:"string"}," String ",-1),t.createElementVNode("option",{value:"number"}," Number ",-1),t.createElementVNode("option",{value:"boolean"}," Boolean ",-1)];function Kc(e,n,o,i,a,r){const s=t.resolveComponent("vue-form-generator"),l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",null,[e.schema.schema?(t.openBlock(),t.createElementBlock("div",Fc,[t.createVNode(s,{model:e.value,options:e.formOptions,schema:e.schema.schema},null,8,["model","options","schema"])])):(t.openBlock(),t.createElementBlock("div",Uc,[t.createElementVNode("table",{id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(d,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[t.createElementVNode("td",null,t.toDisplayString(c),1),a.keyTypes[c]==="string"?(t.openBlock(),t.createElementBlock("td",Lc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":h=>e.value[c]=h,type:"text"},null,8,vc),[[t.vModelText,e.value[c]]])])):t.createCommentVNode("",!0),a.keyTypes[c]==="boolean"?(t.openBlock(),t.createElementBlock("td",Pc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":h=>e.value[c]=h,type:"checkbox"},null,8,qc),[[t.vModelCheckbox,e.value[c]]])])):t.createCommentVNode("",!0),a.keyTypes[c]==="number"?(t.openBlock(),t.createElementBlock("td",Rc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":h=>e.value[c]=h,type:"number"},null,8,xc),[[t.vModelText,e.value[c]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:h=>r.removeElement(c)},null,8,zc)])]))),128))],10,Dc),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":n[0]||(n[0]=d=>a.newKeyType=d)},jc,512),[[t.vModelSelect,a.newKeyType]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[1]||(n[1]=d=>a.newKeyName=d),type:"text"},null,512),[[t.vModelText,a.newKeyName]]),t.createElementVNode("input",{type:"button",value:"Add key",onClick:n[2]||(n[2]=(...d)=>r.addKey&&r.addKey(...d))})]))])),[[l,a.attributes]])}const io=S(Oc,[["render",Kc]]),Ee="24px",wt=(e,n)=>{const o=e.__vccOpts||e;for(const[i,a]of n)o[i]=a;return o},Hc=e=>(t.pushScopeId("data-v-1d2a8d30"),e=e(),t.popScopeId(),e),Yc=["aria-hidden"],Gc={key:0,"data-testid":"kui-icon-svg-title"},Wc=Hc(()=>t.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),Zc=t.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ee,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),r=Number(a);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return Ee}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Gc,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),Wc],8,Yc))]),_:1},8,["aria-hidden","style"]))}}),ro=wt(Zc,[["__scopeId","data-v-1d2a8d30"]]),Jc=e=>(t.pushScopeId("data-v-ddb48b32"),e=e(),t.popScopeId(),e),Xc=["aria-hidden"],Qc={key:0,"data-testid":"kui-icon-svg-title"},em=Jc(()=>t.createElementVNode("path",{d:"M5 13V11H19V13H5Z",fill:"currentColor"},null,-1)),tm=t.defineComponent({__name:"RemoveIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ee,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),r=Number(a);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return Ee}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon remove-icon","data-testid":"kui-icon-wrapper-remove-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-remove-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Qc,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),em],8,Xc))]),_:1},8,["aria-hidden","style"]))}}),nm=wt(tm,[["__scopeId","data-v-ddb48b32"]]),om=e=>(t.pushScopeId("data-v-b199fa56"),e=e(),t.popScopeId(),e),im=["aria-hidden"],rm={key:0,"data-testid":"kui-icon-svg-title"},am=om(()=>t.createElementVNode("path",{d:"M7 21C6.45 21 5.97917 20.8042 5.5875 20.4125C5.19583 20.0208 5 19.55 5 19V6H4V4H9V3H15V4H20V6H19V19C19 19.55 18.8042 20.0208 18.4125 20.4125C18.0208 20.8042 17.55 21 17 21H7ZM17 6H7V19H17V6ZM9 17H11V8H9V17ZM13 17H15V8H13V17Z",fill:"currentColor"},null,-1)),lm=t.defineComponent({__name:"TrashIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ee,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const n=String(e).replace(/px/gi,""),o=Number(n);if(o&&!isNaN(o)&&Number.isInteger(o)&&o>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const n=e,o=t.computed(()=>{if(typeof n.size=="number"&&n.size>0)return`${n.size}px`;if(typeof n.size=="string"){const a=String(n.size).replace(/px/gi,""),r=Number(a);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return`${r}px`}return Ee}),i=t.computed(()=>({boxSizing:"border-box",color:n.color,display:n.display,height:o.value,lineHeight:"0",width:o.value}));return(a,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon trash-icon","data-testid":"kui-icon-wrapper-trash-icon",style:t.normalizeStyle(i.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-trash-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",rm,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),am],8,im))]),_:1},8,["aria-hidden","style"]))}}),Ue=wt(lm,[["__scopeId","data-v-b199fa56"]]),sm={components:{TrashIcon:Ue},mixins:[I],emits:["model-updated"],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]}},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){const i={};return Object.keys(e).map(a=>{const r=a.indexOf(o+"-");if(r>-1&&Array.isArray(n))if(n.length>0){const l=a.split("-").filter(c=>n.find(h=>h.model===c)),d=a.split(`-${l}`)[0].split(`${o}-`)[1];l.length?i[d]={...i[d],[l]:e[a]}:i[a.substring(r+`${o}-`.length)]=e[a]}else i[a.substring(`${o}-`.length)]=e[a];else{const l=a.split("-").filter(c=>c===this.schema.model),d=a.split(`-${l}`)[0].split(`${o}-`)[1];d&&(i[d]=e[a])}return a}),i},addKey(){const e=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",n=this.subSchema?e?[""]:{}:"";this.value[this.newKeyName]=n,this.newKeyName=""},updateModel(e,n){this.$emit("model-updated",this.model[this.schema.model],n)}}},ao=e=>(t.pushScopeId("data-v-b35063fd"),e=e(),t.popScopeId(),e),dm=["id"],cm=["data-testid"],mm={class:"item-wrapper"},hm={class:"index-wrapper"},um=ao(()=>t.createElementVNode("hr",{class:"divider"},null,-1)),pm={key:0},fm={key:1},gm=["onUpdate:modelValue","placeholder","onInput"],ym={key:0,class:"hint"},bm=ao(()=>t.createElementVNode("hr",{class:"wide-divider"},null,-1)),_m={class:"input-item"},wm=["placeholder"],km={key:0,class:"hint"};function Cm(e,n,o,i,a,r){const s=t.resolveComponent("TrashIcon"),l=t.resolveComponent("KButton"),d=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",{id:e.getFieldID(e.schema),class:t.normalizeClass(["object-advanced-wrapper",e.schema.fieldClasses])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(c,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,"data-testid":`field-object-key-${h}`},[t.createElementVNode("div",null,[t.createElementVNode("div",mm,[t.createElementVNode("div",hm,[t.createElementVNode("strong",null,t.toDisplayString(h),1),t.createElementVNode("div",null,[t.createVNode(l,{appearance:"tertiary",class:"delete",icon:"",type:"button",onClick:y=>r.removeElement(h)},{default:t.withCtx(()=>[t.createVNode(s)]),_:2},1032,["onClick"])])]),um,r.subSchema?(t.openBlock(),t.createElementBlock("div",pm,[t.createVNode(d,{model:r.transformedModel[h],options:{helpAsHtml:!0},schema:r.subSchema,onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",fm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":y=>e.value[h]=y,class:"form-control",placeholder:e.schema.fields&&e.schema.fields[0].schema.placeholder,type:"text",onInput:y=>r.updateModel(e.value[h],e.model[e.schema.model])},null,40,gm),[[t.vModelText,e.value[h]]]),e.schema.fields&&e.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",ym,t.toDisplayString(e.schema.fields[0].schema.hint),1)):t.createCommentVNode("",!0)])),bm])])],8,cm))),128)),t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper",{indent:r.hasObjectKeys}])},[t.createElementVNode("div",_m,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>a.newKeyName=c),class:"form-control","data-testid":"keyname-input",placeholder:e.schema.placeholder,type:"text"},null,8,wm),[[t.vModelText,a.newKeyName]]),t.createVNode(l,{appearance:"tertiary","data-testid":"add-key",disabled:!a.newKeyName,onClick:r.addKey},{default:t.withCtx(()=>[t.createTextVNode(" + Add "+t.toDisplayString(e.schema.buttonLabel||e.schema.label),1)]),_:1},8,["disabled","onClick"])]),e.schema.hintText?(t.openBlock(),t.createElementBlock("p",km,t.toDisplayString(e.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,dm)}const lo=S(sm,[["render",Cm],["__scopeId","data-v-b35063fd"]]),Em={class:"array-item"},so=S(t.defineComponent({__name:"FieldArrayItem",props:{model:{type:String,default:""}},emits:["remove-item"],setup(e){return(n,o)=>{const i=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Em,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(i,{appearance:"tertiary",class:"delete",onClick:o[0]||(o[0]=a=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ue))]),_:1})])}}}),[["__scopeId","data-v-ec926551"]]),Sm=e=>(t.pushScopeId("data-v-27d212bd"),e=e(),t.popScopeId(),e),Tm={class:"multi-item-wrapper"},$m=Sm(()=>t.createElementVNode("hr",null,null,-1)),co=S(t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,o)=>{const i=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Tm,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(i,{appearance:"danger",class:"delete",onClick:o[0]||(o[0]=a=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createTextVNode(" - Remove Field ")]),_:1}),$m])}}}),[["__scopeId","data-v-27d212bd"]]),Bm={name:"FieldMetric",components:{AddIcon:ro,TrashIcon:Ue},mixins:[I],emits:["remove-item"],data(){return{contentVisible:!1}}},Nm={key:0,class:"content"};function Mm(e,n,o,i,a,r){const s=t.resolveComponent("AddIcon"),l=t.resolveComponent("TrashIcon"),d=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field-dropdown",{active:a.contentVisible}])},[t.createElementVNode("div",{class:"title",onClick:n[0]||(n[0]=c=>a.contentVisible=!a.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(()=>[a.contentVisible?(t.openBlock(),t.createElementBlock("div",Nm,[t.renderSlot(e.$slots,"default"),t.createVNode(d,{appearance:"tertiary",class:"metric-remove-button",onClick:n[1]||(n[1]=c=>e.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(l)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const mo=S(Bm,[["render",Mm]]),le="kong-ui-forms-api",Vm="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function Im(e){return e?e.length===36&&new RegExp(`^${Vm}$`).test(e):!1}const kt=50,fe={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"};function Am(e,n,o){return o?fe.SET_REFERRAL_VALUE:e&&!n||!e&&n?fe.UPDATE_ENTITY:e&&n?fe.CREATE_FROM_ENTITY:fe.CREATE_NOT_FROM_ENTITY}const Om={mixins:[I],inject:[le],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Am(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}},async created(){await this.$nextTick();let e,n;switch(this.fieldState){case fe.UPDATE_ENTITY:if(!this[le]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[le].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 fe.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case fe.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=Ae(this.search,500)),this.performSearch(e)},async search(e){if(e.trim().length===0)return;this.loading=!0;const n=[],o=[],i=this.getInputFields(),a=new Set;Im(e)&&i.includes("id")?o.push((async()=>{const r=await this.fetchExact(e);n.push({...r,label:this.getSuggestionLabel(r),value:r.id})})()):o.push(...i.filter(r=>r!=="id").map(async r=>{(await this.fetchSuggestions(e,r)).forEach(l=>{a.has(l.id)||(a.add(l.id),n.push({...l,label:this.getSuggestionLabel(l),value:l.id}))})})),await Promise.all(o),this.items=n,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e){const n=[];let o=null;if(!this[le])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<kt;){const i=await this[le].getAll(this.entity,{size:kt,offset:o,...e});if(n.push(...i.data.data),o=i.data.offset,!o)break}return n.slice(0,kt)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[le]?(await this[le].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}}},Fm={class:"field-wrap autosuggest"},Um=["data-testid","data-testlabel"],Dm=["data-testid"],Lm={class:"autosuggest__results_message"};function vm(e,n,o,i,a,r){const s=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock("div",Fm,[t.createVNode(s,{id:e.schema.model,ref:"suggestion",modelValue:a.idValue,"onUpdate:modelValue":n[0]||(n[0]=l=>a.idValue=l),clearable:"","enable-filtering":"","filter-function":()=>!0,items:a.items,loading:a.loading,placeholder:e.schema.placeholder,width:"100%",onChange:r.onSelected,onQueryChange:r.onQueryChange},{"item-template":t.withCtx(({item:l})=>[t.createElementVNode("span",{class:"first-part","data-testid":l.id&&`${l.id}-0`,"data-testlabel":l.label},t.toDisplayString(r.getSuggestionLabel(l).split(" - ")[0]),9,Um),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.getSuggestionLabel(l).split(" - ").slice(1),(d,c)=>(t.openBlock(),t.createElementBlock("span",{key:c,class:"field-span","data-testid":l.id&&`${l.id}-${c+1}`||c+1},t.toDisplayString(d),9,Dm))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",Lm,[t.createElementVNode("span",null,t.toDisplayString(a.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const ho=S(Om,[["render",vm],["__scopeId","data-v-647bb712"]]),Pm={class:"array-card-container"},uo=S(t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null}},emits:["remove-item"],setup(e){return(n,o)=>{const i=t.resolveComponent("KCard"),a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Pm,[t.createVNode(i,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(a,{appearance:"tertiary",class:"array-card-remove-button",onClick:o[0]||(o[0]=r=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ue))]),_:1})])}}}),[["__scopeId","data-v-5fa27cb4"]]),qm={mixins:[I],emits:["model-updated"],methods:{updateModel(e){this.$emit("model-updated",e,this.schema.model)},checkOption(e){return this.model[this.schema.model]?e.value.toString()===this.model[this.schema.model].toString():e.checked},onChange(e){let n=e.target.value.split(",");this.schema.array||(n=n.toString()),this.updateModel(n)}}},Rm={class:"selection-group"},xm={class:"form-group"},zm=["id","checked","name","value"];function jm(e,n,o,i,a,r){return t.openBlock(),t.createElementBlock("div",Rm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(s,l)=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"option-group"},[t.createElementVNode("div",xm,[t.createElementVNode("label",{class:t.normalizeClass(["k-label",s.name])},[t.createElementVNode("input",{id:e.schema.name+"-"+l,checked:r.checkOption(s),class:"k-input",name:e.schema.name,type:"radio",value:s.value,onChange:n[0]||(n[0]=(...d)=>r.onChange&&r.onChange(...d))},null,40,zm),t.createTextVNode(" "+t.toDisplayString(s.name),1)],2)])]))),128))])}const po=S(qm,[["render",jm],["__scopeId","data-v-7e49acd6"]]),Km={name:"FieldArray",components:{FieldArrayItem:so,FieldArrayMultiItem:co,FieldSelect:eo,FieldMetric:mo,FieldObject:io,FieldObjectAdvanced:lo,FieldAutoSuggest:ho,FieldRadio:po,FieldArrayCardContainer:uo,FieldTextArea:to,FieldInput:Kn},mixins:[I],props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(e,n,o){var a,r,s;let i;return n&&(i=JSON.parse(JSON.stringify(n)),(s=(r=(a=i.schema)==null?void 0:a.fields)==null?void 0:r.map)==null||s.call(r,l=>(l.id=`${l.id||l.model}-${o}`,l))),{...i,set(l,d){e[o]=d},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)},getFieldType(e){return"field-"+e.type},modelUpdated(){}}},Hm=["id"],Ym={key:1},Gm=["onUpdate:modelValue","aria-labelledby","type"],Wm=["value","onClick"],Zm=["onUpdate:modelValue","aria-labelledby"],Jm=["value","onClick"];function Xm(e,n,o,i,a,r){const s=t.resolveComponent("FieldTextArea"),l=t.resolveComponent("KButton");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,(d,c)=>(t.openBlock(),t.createElementBlock("div",{key:c,class:t.normalizeClass(e.schema.fieldItemsClasses)},[e.schema.items&&e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:0,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onRemoveItem:h=>r.removeElement(c)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(e.schema.items)),{"form-options":e.formOptions,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",Ym,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(e.schema.items)),{"form-options":e.formOptions,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:2,"data-testid":`${e.getFieldID(e.schema)}-item-${c}`,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onRemoveItem:h=>r.removeElement(c)},{default:t.withCtx(()=>{var h,y;return[((h=e.schema.inputAttributes)==null?void 0:h.type)==="textarea"?(t.openBlock(),t.createBlock(s,{key:0,"aria-labelledby":e.getLabelId(e.schema),class:"k-input","form-options":e.formOptions,model:d,schema:r.generateSchema(e.value,e.schema.items,c),onModelUpdated:r.modelUpdated},null,8,["aria-labelledby","form-options","model","schema","onModelUpdated"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:1,"onUpdate:modelValue":b=>e.value[c]=b,"aria-labelledby":e.getLabelId(e.schema),ref_for:!0},e.schema.inputAttributes,{type:((y=e.schema.inputAttributes)==null?void 0:y.type)||"text"}),null,16,Gm)),[[t.vModelDynamic,e.value[c]]]),e.schema.showRemoveButton?(t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,ref_for:!0},e.schema.removeElementButtonAttributes,{type:"button",value:e.schema.removeElementButtonLabel||o.removeElementButtonLabel,onClick:b=>r.removeElement(c)}),null,16,Wm)):t.createCommentVNode("",!0)]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:3,ref_for:!0},e.schema.inputAttributes,{"onUpdate:modelValue":h=>e.value[c]=h,"aria-labelledby":e.getLabelId(e.schema),type:"text"}),null,16,Zm)),[[t.vModelText,e.value[c]]]),e.schema.showRemoveButton?(t.openBlock(),t.createElementBlock("input",t.mergeProps({key:4,ref_for:!0},e.schema.removeElementButtonAttributes,{type:"button",value:e.schema.removeElementButtonLabel||o.removeElementButtonLabel,onClick:h=>r.removeElement(c)}),null,16,Jm)):t.createCommentVNode("",!0)],2))),128)),t.createVNode(l,{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,Hm)):t.createCommentVNode("",!0)}const Qm=S(Km,[["render",Xm],["__scopeId","data-v-19b9d61e"]]),eh={mixins:[I],emits:["model-updated"],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)}}},th={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},nh={class:"material-icons"};function oh(e,n,o,i,a,r){const s=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",th,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:n[0]||(n[0]=(...l)=>r.handleOpen&&r.handleOpen(...l))},[t.createElementVNode("i",nh,t.toDisplayString(a.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),t.createElementVNode("span",null,t.toDisplayString(r.titleText),1)]),t.createElementVNode("div",{class:t.normalizeClass(["advanced-field-dropdown",r.openClass])},[t.createVNode(s,{model:e.model,options:{helpAsHtml:!0},schema:e.schema,onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const ih=S(eh,[["render",oh],["__scopeId","data-v-2d8e71e1"]]),rh={mixins:[I],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(e,n){if(n===null){this.fieldModel={...this.model};return}const o=this.schema.fields[e].fields,i=this.schema.fields[n].fields;i&&i.forEach(a=>this.updateModel("",a.model)),o&&o.forEach(a=>this.updateModel(this.fieldModel[a.model],a.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((e,n)=>{e.fields&&e.fields.forEach(o=>{this.model[o.model]&&(this.checkedGroup=n,this.fieldSchema.push(o.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(e,n){this.$emit("model-updated",e,n)}}},ah={class:"selection-group"},lh={class:"form-group horizontal-radios"},sh={class:"radio-group"},dh=["value"],ch={class:"control-help"},mh={class:"option-field"},hh={class:"option-field-container"},uh={class:"form-group"},ph=["value"],fh={class:"control-help"},gh={class:"option-field"},yh={class:"option-field-container"};function bh(e,n,o,i,a,r){const s=t.resolveComponent("vue-form-generator");return t.openBlock(),t.createElementBlock("div",ah,[e.schema.horizontalRadios?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",lh,[t.createElementVNode("div",sh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.fields,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"option-group"},[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${l.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>a.checkedGroup=c),class:"k-input",type:"radio",value:d},null,8,dh),[[t.vModelRadio,a.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(l.label)+" ",1),t.createElementVNode("div",ch,t.toDisplayString(l.description),1)],2)]))),128))])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.fields,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"option-group"},[t.withDirectives(t.createElementVNode("div",mh,[t.createElementVNode("div",hh,[t.createVNode(s,{model:e.model,options:{helpAsHtml:!0},schema:{fields:l.fields},onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[t.vShow,l.fields&&a.checkedGroup===d]])]))),128))],64)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.schema.fields,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"option-group"},[t.createElementVNode("div",uh,[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${l.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[1]||(n[1]=c=>a.checkedGroup=c),class:"k-input",type:"radio",value:d},null,8,ph),[[t.vModelRadio,a.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(l.label)+" ",1),t.createElementVNode("div",fh,t.toDisplayString(l.description),1)],2)]),t.withDirectives(t.createElementVNode("div",gh,[t.createElementVNode("div",yh,[t.createVNode(s,{model:e.model,options:{helpAsHtml:!0},schema:{fields:l.fields},onModelUpdated:r.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[t.vShow,l.fields&&a.checkedGroup===d]])]))),128))])}const _h=S(rh,[["render",bh],["__scopeId","data-v-22882f4c"]]),wh={mixins:[I],emits:["model-updated"],methods:{onUpdate(e){this.$emit("model-updated",e,this.schema.model)}}};function kh(e,n,o,i,a,r){const s=t.resolveComponent("KMultiselect");return t.openBlock(),t.createBlock(s,{"aria-labelledby":e.getLabelId(e.schema),"data-testid":"field-multiselect",items:e.schema.values,"label-attributes":{info:e.schema.help},"model-value":e.value,placeholder:e.schema.placeholder,required:e.schema.required||void 0,width:"100%","onUpdate:modelValue":r.onUpdate},null,8,["aria-labelledby","items","label-attributes","model-value","placeholder","required","onUpdate:modelValue"])}const Ch=S(wh,[["render",kh]]),Eh={name:"FieldKeyValuePairs",components:{TrashIcon:Ue},mixins:[I],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(i=>{this.pairs.push({key:i,value:e[i]})})},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)}}},Sh={class:"key-value-pairs-editor"},Th=["data-testid","placeholder","value","onInput"],$h=["data-testid","placeholder","value","onInput"];function Bh(e,n,o,i,a,r){const s=t.resolveComponent("TrashIcon"),l=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Sh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.pairs,(d,c)=>(t.openBlock(),t.createElementBlock("div",{key:c,class:"pair-item"},[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-key-${c}`,placeholder:e.schema.keyInputPlaceholder??"Key",type:"text",value:d.key,onInput:h=>{r.onInput(h,c,"key")}},null,40,Th),t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-value-${c}`,placeholder:e.schema.valueInputPlaceholder??"Value",type:"text",value:d.value,onInput:h=>{r.onInput(h,c,"value")}},null,40,$h),t.createVNode(l,{appearance:"tertiary","data-testid":`${e.getFieldID(e.schema)}-remove-pair-${c}`,onClick:()=>{r.removePair(c)}},{default:t.withCtx(()=>[t.createVNode(s)]),_:2},1032,["data-testid","onClick"])]))),128)),t.createVNode(l,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`${e.getFieldID(e.schema)}-add-pair`,type:"button",onClick:r.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const Nh={name:"FormGroup",components:Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:ih,FieldArray:Qm,FieldArrayCardContainer:uo,FieldArrayItem:so,FieldArrayMultiItem:co,FieldAutoSuggest:ho,FieldCheckbox:ms,FieldChecklist:Cs,FieldCleave:Rd,FieldDateTimePicker:Yd,FieldGoogleAddress:Zd,FieldImage:tc,FieldInput:Kn,FieldKeyValuePairs:S(Eh,[["render",Bh],["__scopeId","data-v-29d15375"]]),FieldLabel:Ts,FieldMasked:ic,FieldMetric:mo,FieldMultiselect:Ch,FieldNoUiSlider:sc,FieldObject:io,FieldObjectAdvanced:lo,FieldPikaday:uc,FieldRadio:po,FieldRadios:Ms,FieldRangeSlider:gc,FieldSelect:eo,FieldSelectEx:kc,FieldSelectionGroup:_h,FieldSpectrum:Sc,FieldStaticMap:Bc,FieldSubmit:Ad,FieldTextArea:to,FieldUpload:vd,fieldSwitch:Ac},Symbol.toStringTag,{value:"Module"})),mixins:[Ht],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"],data(){return{child:t.ref()}},methods:{fieldTypeHasLabel(e){if(P(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=N(this.options,"fieldIdPrefix","");return ht(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldType(e){return"field-"+e.type},getButtonType(e){return N(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 V(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)},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\./,""):""}}},Mh=e=>(t.pushScopeId("data-v-02e656fb"),e=e(),t.popScopeId(),e),Vh=["innerHTML"],Ih={class:"icon-wrapper"},Ah=["innerHTML"],Oh={key:0,class:"link-wrapper"},Fh=Mh(()=>t.createElementVNode("span",{class:"section-header"},"More info",-1)),Uh={class:"field-wrap"},Dh={key:0,class:"buttons"},Lh=["type","onClick","textContent"],vh=["innerHTML"],Ph={key:2,class:"errors help-block"},qh=["innerHTML"];function Rh(e,n,o,i,a,r){const s=t.resolveComponent("KExternalLink"),l=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(l,{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",Ih,[t.createElementVNode("span",{innerHTML:r.formattedLabel(o.field.label)},null,8,Ah)]),o.field.link?(t.openBlock(),t.createElementBlock("div",Oh,[t.createVNode(s,{href:o.field.link},{default:t.withCtx(()=>[Fh]),_:1},8,["href"])])):t.createCommentVNode("",!0)]),_:2},[o.options.helpAsHtml&&o.field.help?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:o.field.help},null,8,Vh)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",Uh,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldType(o.field)),t.mergeProps(e.$attrs,{ref:"child",disabled:e.fieldDisabled(o.field)||null,"form-options":o.options,hint:o.field.hint&&r.getFieldType(o.field)==="field-input"?r.fieldHint(o.field):void 0,model:o.model,schema:o.field,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated}),null,16,["disabled","form-options","hint","model","schema","vfg","onModelUpdated","onValidated"])),r.buttonVisibility(o.field)?(t.openBlock(),t.createElementBlock("div",Dh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.field.buttons,(d,c)=>(t.openBlock(),t.createElementBlock("button",{key:c,class:t.normalizeClass(d.classes),type:r.getButtonType(d),onClick:h=>r.buttonClickHandler(d,o.field,h),textContent:t.toDisplayString(d.label)},null,10,Lh))),128))])):t.createCommentVNode("",!0)]),o.field.hint&&r.getFieldType(o.field)!=="field-input"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"hint",innerHTML:r.fieldHint(o.field)},null,8,vh)):t.createCommentVNode("",!0),r.fieldErrors(o.field).length>0?(t.openBlock(),t.createElementBlock("div",Ph,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fieldErrors(o.field),(d,c)=>(t.openBlock(),t.createElementBlock("span",{key:c,innerHTML:d},null,8,qh))),128))])):t.createCommentVNode("",!0)],2)}const xh={name:"FormGenerator",components:{formGroup:S(Nh,[["render",Rh],["__scopeId","data-v-02e656fb"]])},mixins:[Ht],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}}},emits:["validated","modelUpdated"],data(){return{vfg:this,errors:[],children:t.ref([]),collapseStates:{}}},computed:{fields(){const e=[];return this.schema&&this.schema.fields&&z(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&z(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 V(e.visible)?e.visible.call(this,this.model,e,this):P(e.visible)?!0:e.visible},onFieldValidated(e,n,o){this.errors=this.errors.filter(a=>a.field.fieldName!==o.schema.fieldName),!e&&n&&n.length>0&&z(n,a=>{this.errors.push({field:o.schema,error:a})});const i=this.errors.length===0;this.$emit("validated",i,this.errors,this)},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e=null){e===null&&(e=N(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],o=[];z(this.$refs.children,a=>{V(a.validate)&&(n.push(a.$refs.child),o.push(a.$refs.child.validate(!0)))});const i=a=>{const r=[];z(a,(l,d)=>{Array.isArray(l)&&l.length>0&&z(l,c=>{r.push({field:n[d].schema,error:c})})}),this.errors=r;const s=r.length===0;return this.$emit("validated",s,r,this),e?r:s};return e?Promise.all(o).then(i):i(o)},clearValidationErrors(){this.errors.splice(0),z(this.$refs.children,e=>{e.clearValidationErrors()})}}},zh={key:0,class:"vue-form-generator"},jh={key:0};function Kh(e,n,o,i,a,r){const s=t.resolveComponent("form-group"),l=t.resolveComponent("KCollapse");return o.schema!=null?(t.openBlock(),t.createElementBlock("div",zh,[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,d=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:d.model},[r.fieldVisible(d)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:a.errors,field:d,model:o.model,options:o.options,vfg:a.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:1})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,(d,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${c}`},[d.collapsible!==void 0&&d.collapsible!==!1?(t.openBlock(),t.createBlock(l,{key:0,class:"root-level-collapse","model-value":!1,title:d.collapsible.title},t.createSlots({default:t.withCtx(()=>{var h,y,b,B;return[(h=d.slots)!=null&&h.beforeContent?t.renderSlot(e.$slots,(y=d.slots)==null?void 0:y.beforeContent,{key:0}):t.createCommentVNode("",!0),d.fields.length===0&&((b=d.slots)!=null&&b.emptyState)?t.renderSlot(e.$slots,(B=d.slots)==null?void 0:B.emptyState,{key:1}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:2,class:t.normalizeClass(e.getFieldRowClasses(d))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.fields,T=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:T.model},[r.fieldVisible(T)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:a.errors,field:T,model:o.model,options:o.options,vfg:a.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"])),d.collapsible!==!0&&d.collapsible.nestedCollapsible&&d.collapsible.nestedCollapsible.fields.length>0?(t.openBlock(),t.createBlock(l,{key:3,class:"nested-collapse","model-value":a.collapseStates[`group-${c}-nested`]??!0,"trigger-alignment":"leading","trigger-label":a.collapseStates[`group-${c}-nested`]??!0?d.collapsible.nestedCollapsible.triggerLabel.expand:d.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":T=>a.collapseStates[`group-${c}-nested`]=T},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{class:t.normalizeClass(e.getFieldRowClasses(d))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.collapsible.nestedCollapsible.fields,T=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:T.model},[r.fieldVisible(T)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:a.errors,field:T,model:o.model,options:o.options,vfg:a.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))]),_:2},1032,["model-value","trigger-label","onUpdate:modelValue"])):t.createCommentVNode("",!0)]}),_:2},[d.collapsible.description?{name:"visible-content",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d.collapsible.description),1)]),key:"0"}:void 0]),1032,["title"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:1,class:t.normalizeClass(e.getFieldRowClasses(d))},{default:t.withCtx(()=>[d.legend?(t.openBlock(),t.createElementBlock("legend",jh,t.toDisplayString(d.legend),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.fields,h=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:h.model},[r.fieldVisible(h)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:a.errors,field:h,model:o.model,options:o.options,vfg:a.vfg,onModelUpdated:r.onModelUpdated,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))],64))),128))])):t.createCommentVNode("",!0)}const j=S(xh,[["render",Kh]]),Hh={fields:[{inputType:"text",label:"Config.Client Id",model:"config-client_id",type:"input"},{inputType:"text",label:"Config.Client Secret",model:"config-client_secret",type:"input"},{inputType:"text",label:"Config.Issuer",model:"config-issuer",required:!0,type:"input"},{inputType:"text",label:"Config.Auth Methods",model:"config-auth_methods",type:"input"}]},Yh={fields:[{inputType:"text",label:"Config.Scopes Claim",model:"config-scopes_claim",type:"input"},{inputType:"text",label:"Config.Scopes Required",model:"config-scopes_required",type:"input"},{inputType:"text",label:"Config.Audience Claim",model:"config-audience_claim",type:"input"},{inputType:"text",label:"Config.Audience Required",model:"config-audience_required",type:"input"},{inputType:"text",label:"Config.Roles Claim",model:"config-roles_claim",type:"input"},{inputType:"text",label:"Config.Roles Required",model:"config-roles_required",type:"input"},{inputType:"text",label:"Config.Groups Claim",model:"config-groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"auth-array-item-container",fieldItemsClasses:"auth-array-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",newElementButtonLabelClasses:"auth-array-item-new",newElementButtonLabel:"+ Add"},{inputType:"text",label:"Config.Groups Required",model:"config-groups_required",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"auth-array-item-container",fieldItemsClasses:"auth-array-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",newElementButtonLabelClasses:"auth-array-item-new",newElementButtonLabel:"+ Add"},{inputType:"text",label:"Config.Authenticated Groups Claim",model:"config-authenticated_groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"auth-array-item-container",fieldItemsClasses:"auth-array-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",newElementButtonLabelClasses:"auth-array-item-new",newElementButtonLabel:"+ Add"}]},Gh={fields:[{type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldArrayCardContainer",fieldClasses:"array-card-container-wrapper",newElementButtonLabel:"+ Add Client JWK",items:{type:"object",schema:{fields:[{model:"kid",label:"kid",type:"input",inputType:"string"},{model:"issuer",label:"issuer",type:"input",inputType:"string"},{model:"kty",label:"kty",type:"input",inputType:"string"},{model:"use",label:"use",type:"input",inputType:"string"},{model:"key_ops",label:"key_ops",type:"array",fieldItemsClasses:"jwk-array-input-wrapper",showRemoveButton:!0,removeElementButtonLabel:"Remove",items:{type:"input",inputType:"string"}},{model:"alg",label:"alg",type:"input",inputType:"string"},{model:"x5u",label:"x5u",type:"input",inputType:"string"},{model:"x5c",label:"x5c",type:"array",fieldItemsClasses:"jwk-array-input-wrapper",showRemoveButton:!0,removeElementButtonLabel:"Remove",items:{type:"input",inputType:"string"}},{model:"x5t",label:"x5t",type:"input",inputType:"string"},{model:"x5t#S256",label:"x5t#S256",type:"input",inputType:"string"},{model:"k",label:"k",type:"input",inputType:"string"},{model:"x",label:"x",type:"input",inputType:"string"},{model:"y",label:"y",type:"input",inputType:"string"},{model:"crv",label:"crv",type:"input",inputType:"string"},{model:"n",label:"n",type:"input",inputType:"string"},{model:"e",label:"e",type:"input",inputType:"string"},{model:"d",label:"d",type:"input",inputType:"string"},{model:"p",label:"p",type:"input",inputType:"string"},{model:"q",label:"q",type:"input",inputType:"string"},{model:"dp",label:"dp",type:"input",inputType:"string"},{model:"dq",label:"dq",type:"input",inputType:"string"},{model:"qi",label:"qi",type:"input",inputType:"string"},{model:"oth",label:"oth",type:"input",inputType:"string"},{model:"r",label:"r",type:"input",inputType:"string"},{model:"t",label:"t",type:"input",inputType:"string"}]}},model:"config-client_jwk",label:"Config.Client Jwk",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record"},{type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldArrayCardContainer",fieldClasses:"array-card-container-wrapper",newElementButtonLabel:"+ Add Cluster Node",items:{type:"object",schema:{fields:[{label:"IP",model:"ip",type:"input",inputType:"text"},{label:"Port",model:"port",type:"input",inputType:"number"}]}},model:"config-session_redis_cluster_nodes",label:"Config.Session Redis Cluster Nodes",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#host-record"}]},Wh={name:"OIDCForm",components:{VueFormGenerator:j},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}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){var n;this.init||(this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(o=>!o.model.startsWith("config")&&o.model!=="tags")},this.commonFieldsSchema={...Hh},this.authFieldsSchema={...Yh},this.advancedFieldsSchema.fields=this.formSchema.fields.filter(o=>o.model.startsWith("config")&&!this.commonFieldsSchema.fields.filter(i=>i.model===o.model).length&&!this.authFieldsSchema.fields.filter(i=>i.model===o.model).length||o.model==="tags"),this.advancedFieldsSchema.fields=this.advancedFieldsSchema.fields.map(o=>{const i=Gh.fields.find(a=>a.model===o.model);return i||o}),this.commonFieldsSchema.fields=this.commonFieldsSchema.fields.filter(o=>o.model!=="config-auth_methods"),this.sessionManagement=this.isEditing?this.formModel["config-auth_methods"].includes("session"):!1,this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.isEditing?this.formModel["config-auth_methods"].includes("authorization_code"):!1},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("bearer"):!1},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("client_credentials"):!1},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("password"):!1},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.isEditing?this.formModel["config-auth_methods"].includes("introspection"):!1},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.isEditing?this.formModel["config-auth_methods"].includes("userinfo"):!1},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("kong_oauth2"):!1},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("refresh_token"):!1}]);const e={};for(const o of this.formSchema.fields)e[o.model]=o;for(const o of[this.commonFieldsSchema,this.authFieldsSchema,this.advancedFieldsSchema])for(const i of o.fields){const a=(n=e[i.model])==null?void 0:n.help;i.help===void 0&&typeof a=="string"&&(i.help=a)}},getAuthMethodsValue(e,n){const o=[];for(let i=0;i<this.authMethods.length;i++)this.authMethods[i].prop&&this.authMethods[i].value!==e&&o.push(this.authMethods[i].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()}}},Se=e=>(t.pushScopeId("data-v-e7395ff0"),e=e(),t.popScopeId(),e),Zh={class:"general-settings"},Jh={class:"link-wrapper"},Xh=Se(()=>t.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),Qh=Se(()=>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)),eu={class:"auth-method-container"},tu={class:"general-settings"},nu={class:"link-wrapper"},ou=Se(()=>t.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),iu=Se(()=>t.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),ru={class:"general-settings"},au={class:"link-wrapper"},lu=Se(()=>t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),su=Se(()=>t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function du(e,n,o,i,a,r){const s=t.resolveComponent("VueFormGenerator"),l=t.resolveComponent("KExternalLink"),d=t.resolveComponent("KLabel"),c=t.resolveComponent("KCheckbox"),h=t.resolveComponent("KInputSwitch"),y=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:a.globalFields,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(y,{tabs:a.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",Zh,[t.createElementVNode("div",Jh,[t.createVNode(l,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:t.withCtx(()=>[Xh]),_:1})]),Qh,r.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:a.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(d,null,{default:t.withCtx(()=>[t.createTextVNode("Auth Methods")]),_:1}),t.createElementVNode("div",eu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.authMethods,b=>(t.openBlock(),t.createElementBlock("div",{key:b.value,class:"auth-method"},[t.createVNode(c,{modelValue:b.prop,"onUpdate:modelValue":B=>b.prop=B,onChange:B=>r.handleUpdate(B,b.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(h,{modelValue:a.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=b=>a.sessionManagement=b),label:"Enable Session Management",onChange:r.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",tu,[t.createElementVNode("div",nu,[t.createVNode(l,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:t.withCtx(()=>[ou]),_:1})]),iu,r.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:a.authFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",ru,[t.createElementVNode("div",au,[t.createVNode(l,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:t.withCtx(()=>[lu]),_:1})]),su,r.displayForm?(t.openBlock(),t.createBlock(s,{key:0,model:o.formModel,options:o.formOptions,schema:a.advancedFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1},8,["tabs"])])}const cu=S(Wh,[["render",du],["__scopeId","data-v-e7395ff0"]]),Ct={general:{packageName:"forms"},"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_fields:"View Advanced Fields",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&#39;s counters.</li></ul>",options:{fixed:"Fixed",sliding:"Sliding"}},request_limits:{title:"Request Limits",subtitle:"Advanced control on request rate with customizable limits and window sizes.",label:"Limit",label_index:"Limit {index}",help:"Set one or more requests-per-window limits and window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.",request_number:"Request number",time_interval:"Time interval",interval_determiner:"Every",seconds:"Seconds"},try_a_use_case:"Start with a prebuilt 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"}},redis_address_example:"e.g. localhost:6379"}},mu=S(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){const{t:n,te:o}=Ze.createI18n("en-us",Ct),i=e,a=t.computed(()=>i.formModel.id&&i.isEditing||!i.isEditing),r=t.computed(()=>{const s=i.formSchema;return s.fields.map(l=>{const d=`post-function.${l.model}`;return l.hint=o(`${d}.hint`)&&n(`${d}.hint`)||l.hint,l.help=o(`${d}.help`)&&n(`${d}.help`)||l.help,l.newElementButtonLabel=o(`${d}.newElementButtonLabel`)&&n(`${d}.newElementButtonLabel`)||l.newElementButtonLabel,l.model!=="tags"&&(l.valueType==="array"||l.type==="array")&&(l.type="array",l.valueArrayType="array",l.itemContainerComponent="FieldArrayItem",l.fieldClasses="post-function-array-item-container",l.fieldItemsClasses="post-function-array-item",l.inputAttributes={...l.inputAttributes,type:"textarea"}),l}),s});return(s,l)=>a.value?(t.openBlock(),t.createBlock(j,{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-6706c68b"]]),hu=S(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){const{t:n,te:o}=Ze.createI18n("en-us",Ct),i=e,a=t.computed(()=>i.formModel.id&&i.isEditing||!i.isEditing),r=t.computed(()=>{const s=i.formSchema;return s.fields.map(l=>{const d=`exit-transformer.${l.model}`;return l.hint=o(`${d}.hint`)&&n(`${d}.hint`)||l.hint,l.help=o(`${d}.help`)&&n(`${d}.help`)||l.help,l.newElementButtonLabel=o(`${d}.newElementButtonLabel`)&&n(`${d}.newElementButtonLabel`)||l.newElementButtonLabel,l.model!=="tags"&&(l.valueType==="array"||l.type==="array")&&(l.type="array",l.valueArrayType="array",l.itemContainerComponent="FieldArrayItem",l.fieldClasses="exit-transformer-array-item-container",l.fieldItemsClasses="exit-transformer-array-item",l.inputAttributes={...l.inputAttributes,type:"textarea"}),l}),s});return(s,l)=>a.value?(t.openBlock(),t.createBlock(j,{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-0fc8ef29"]]),uu={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}]},pu={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}]},fu={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}]},ge=e=>(t.pushScopeId("data-v-b9df1c3f"),e=e(),t.popScopeId(),e),gu={class:"general-settings"},yu=ge(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),bu=ge(()=>t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),_u=ge(()=>t.createElementVNode("hr",null,null,-1)),wu={class:"sub-form"},ku={class:"general-settings"},Cu=ge(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),Eu=ge(()=>t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),Su={class:"sub-form"},Tu={class:"general-settings"},$u=ge(()=>t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),Bu=ge(()=>t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),Nu=S(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){const n=e,o=t.ref("zeroSsl"),i=t.ref("shm"),a=t.computed(()=>{var p;const g={};if((p=n.formSchema)!=null&&p.fields)for(const m of n.formSchema.fields)g[m.model]=m;return g}),r=t.computed(()=>{var p;const g=ne(uu);for(const m of g.fields){const u=(p=a.value[m.model])==null?void 0:p.help;m.help===void 0&&typeof u=="string"&&(m.help=u)}return g}),s=t.computed(()=>{var p;const g=ne(pu);for(const m of g.fields){const u=(p=a.value[m.model])==null?void 0:p.help;m.help===void 0&&typeof u=="string"&&(m.help=u)}return g}),l=t.computed(()=>{var p;const g=ne(fu);for(const m of g.fields){const u=(p=a.value[m.model])==null?void 0:p.help;m.help===void 0&&typeof u=="string"&&(m.help=u)}return g}),d=t.computed(()=>({fields:n.formSchema.fields.filter(g=>!g.model.startsWith("config")&&g.model!=="tags")})),c=t.computed(()=>({fields:r.value.fields.filter(p=>!s.value.fields.some(m=>m.model===p.model)&&!l.value.fields.some(m=>m.model===p.model))})),h=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage")&&!p.model.startsWith("config-storage_config-consul")&&!p.model.startsWith("config-storage_config-redis")&&!p.model.startsWith("config-storage_config-shm")&&!p.model.startsWith("config-storage_config-vault"))})),y=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage_config-consul"))})),b=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage_config-redis"))})),B=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage_config-shm"))})),T=t.computed(()=>({fields:n.formSchema.fields.filter(p=>p.model.startsWith("config-storage_config-vault"))})),_=t.computed(()=>({fields:n.formSchema.fields.filter(g=>g.model.startsWith("config")&&!c.value.fields.filter(p=>p.model===g.model).length&&!h.value.fields.filter(p=>p.model===g.model).length||g.model==="tags")})),C=t.computed(()=>n.formModel.id&&n.isEditing||!n.isEditing),f=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],k=[{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 O=g=>{o.value=g.value,(g.value==="zeroSsl"||g.value==="other")&&(g.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),g.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()},F=(g,p)=>{p==="config-storage"&&(i.value=g),n.onModelUpdated()};return(g,p)=>{const m=t.resolveComponent("KSelect"),u=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(j,{key:0,class:"global-fields",model:e.formModel,options:e.formOptions,schema:d.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(u,{tabs:f},{general:t.withCtx(()=>[t.createElementVNode("div",gu,[yu,bu,C.value?(t.openBlock(),t.createBlock(j,{key:0,model:e.formModel,options:e.formOptions,schema:c.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),_u,t.createVNode(m,{class:"issuer-select",items:k,label:"Issuer",onChange:O}),t.createElementVNode("div",wu,[o.value==="letsEncrypt"?(t.openBlock(),t.createBlock(j,{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(j,{key:1,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",ku,[Cu,Eu,C.value?(t.openBlock(),t.createBlock(j,{key:0,model:e.formModel,options:e.formOptions,schema:h.value,onModelUpdated:F},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",Su,[i.value==="consul"?(t.openBlock(),t.createBlock(j,{key:0,model:e.formModel,options:e.formOptions,schema:y.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),i.value==="redis"?(t.openBlock(),t.createBlock(j,{key:1,model:e.formModel,options:e.formOptions,schema:b.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),i.value==="shm"?(t.openBlock(),t.createBlock(j,{key:2,model:e.formModel,options:e.formOptions,schema:B.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),i.value==="vault"?(t.openBlock(),t.createBlock(j,{key:3,model:e.formModel,options:e.formOptions,schema:T.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",Tu,[$u,Bu,C.value?(t.openBlock(),t.createBlock(j,{key:0,model:e.formModel,options:e.formOptions,schema:_.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),[["__scopeId","data-v-b9df1c3f"]]),fo=e=>(t.pushScopeId("data-v-04007e41"),e=e(),t.popScopeId(),e),Mu={class:"rla-form-basic-fields"},Vu={class:"rla-form-request-limits-subtitle"},Iu={class:"rla-form-request-limits-content"},Au={class:"rla-form-window-type"},Ou=["innerHTML"],Fu={class:"rla-form-window-type-radios"},Uu={class:"rla-form-request-limits-items"},Du={class:"rla-form-request-limits-row"},Lu=["id"],vu={class:"rla-form-request-limits-actions"},Pu={key:0,class:"rla-form-request-limits-examples"},qu={class:"rla-form-request-limits-examples-badges"},Ru=fo(()=>t.createElementVNode("br",null,null,-1)),xu=["innerHTML"],zu={id:"rla-form-error-legend",class:"rla-form-error-inputs"},ju=fo(()=>t.createElementVNode("div",null,":",-1)),Ku=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:Nu,ExitTransformer:hu,OIDCForm:cu,PostFunction:mu,RLAForm:S(t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},isEditing:{type:Boolean}},setup(e){const n=[{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,window_type:"fixed"}},{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,window_type:"fixed"}},{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,window_type:"fixed"}},{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,window_type:"sliding"}},{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,window_type:"sliding"}},{description:`Each user is allowed 500 requests per hour.
2
2
  If the limit is exceeded and the user receives a 429 error, each additional request within the sliding window (hour)
3
3
  will extend the wait time by about 12 minutes, continuously adjusting as new requests are made.`,config:{limit:500,window_size:3600,window_type:"sliding",disable_penalty:!1}}],{t:o}=Ze.createI18n("en-us",Ct),i=e,a=t.computed(()=>{var u,w;const m=(w=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:w.find(E=>E.model==="selectionGroup");if(m)return{fields:[{...m,horizontalRadios:!0}]}}),r=t.computed(()=>{var u,w,E;const m=new Set(["selectionGroup",...["identifier","limit","window_size","error_code","error_message"].map(M=>`config-${M}`)]);return{fields:(E=(w=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:w.filter(M=>typeof M.model=="string"&&!m.has(M.model)))==null?void 0:E.map(M=>((M.model==="config-redis-cluster_addresses"||M.model==="config-redis-sentinel_addresses")&&(M.hint=o("rla.redis_address_example")),M))}}),s=t.computed(()=>n.filter(m=>i.formModel["config-window_type"]===m.config.window_type)),l=t.computed(()=>{var m,u;return(u=(m=i.formSchema)==null?void 0:m.fields)==null?void 0:u.find(w=>w.model==="config-identifier")}),d=t.computed(()=>{var m,u,w;return(((w=(u=(m=i.formSchema)==null?void 0:m.fields)==null?void 0:u.find(E=>E.model==="config-identifier"))==null?void 0:w.values)??[]).map(E=>({label:o(`rla.identifiers.options.${E}`),value:E}))}),c=t.ref(),h=t.ref(!0),y=t.computed(()=>{var m,u,w;return i.formModel["config-window_type"]??((w=(u=(m=i.formSchema)==null?void 0:m.fields)==null?void 0:u.find(E=>E.model==="config-window_type"))==null?void 0:w.default)}),b=t.computed(()=>{var u,w,E,M,Q,De;const m=(E=(w=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:w.find(ye=>ye.model==="config-window_type"))==null?void 0:E.default;return(((De=(Q=(M=i.formSchema)==null?void 0:M.fields)==null?void 0:Q.find(ye=>ye.model==="config-window_type"))==null?void 0:De.values)??[]).sort((ye,Et)=>ye===m?-1:Et===m?1:0)}),B=t.computed(()=>{var u;const m=(u=i.formModel["config-limit"])==null?void 0:u.map((w,E)=>{var M,Q;return{limit:w,windowSize:(Q=(M=i.formModel)==null?void 0:M["config-window_size"])==null?void 0:Q[E]}});return!Array.isArray(m)||m.length===0?[{limit:void 0,windowSize:void 0}]:m}),T=t.computed(()=>{var m,u,w,E;return((m=i.formModel)==null?void 0:m["config-identifier"])??((E=(w=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:w.find(M=>M.model==="config-identifier"))==null?void 0:E.default)}),_=t.computed(()=>{var m,u,w,E;return((m=i.formModel)==null?void 0:m["config-error_code"])??((E=(w=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:w.find(M=>M.model==="config-error_code"))==null?void 0:E.default)}),C=t.computed(()=>{var m,u,w,E;return((m=i.formModel)==null?void 0:m["config-error_message"])??((E=(w=(u=i.formSchema)==null?void 0:u.fields)==null?void 0:w.find(M=>M.model==="config-error_message"))==null?void 0:E.default)}),f=(m,u)=>{if(u===c.value){i.onModelUpdated([],"config-limit"),i.onModelUpdated([],"config-window_size"),t.nextTick(()=>{c.value=void 0});return}i.onModelUpdated([m.config.limit],"config-limit"),i.onModelUpdated([m.config.window_size],"config-window_size"),t.nextTick(()=>{c.value=u})},k=m=>{c.value!==void 0&&(c.value=void 0),i.onModelUpdated(m,"config-window_type")},O=(m,u)=>{var E;c.value!==void 0&&(c.value=void 0);const w=ne(((E=i.formModel)==null?void 0:E["config-limit"])??[]);w[m]=u,i.onModelUpdated(w,"config-limit")},F=(m,u)=>{var E;c.value!==void 0&&(c.value=void 0);const w=ne(((E=i.formModel)==null?void 0:E["config-window_size"])??[]);w[m]=u,i.onModelUpdated(w,"config-window_size")},g=m=>{var E,M;c.value!==void 0&&(c.value=void 0);const u=ne(((E=i.formModel)==null?void 0:E["config-limit"])??[]),w=ne(((M=i.formModel)==null?void 0:M["config-window_size"])??[]);u.length===0&&u.push(void 0),w.length===0&&w.push(void 0),u.splice(m+1,0,void 0),w.splice(m+1,0,void 0),i.onModelUpdated(u,"config-limit"),i.onModelUpdated(w,"config-window_size")},p=m=>{var u,w;if(B.value.length>1){c.value!==void 0&&(c.value=void 0);const E=ne(((u=i.formModel)==null?void 0:u["config-limit"])??[]),M=ne(((w=i.formModel)==null?void 0:w["config-window_size"])??[]);E.length===0&&E.push(void 0),M.length===0&&M.push(void 0),E.splice(m,1),M.splice(m,1),i.onModelUpdated(E,"config-limit"),i.onModelUpdated(M,"config-window_size")}};return(m,u)=>{const w=t.resolveComponent("VueFormGenerator"),E=t.resolveComponent("KLabel"),M=t.resolveComponent("KRadio"),Q=t.resolveComponent("KInput"),De=t.resolveComponent("KButton"),ye=t.resolveComponent("KBadge"),Et=t.resolveComponent("KTooltip"),Wu=t.resolveComponent("KCard"),Zu=t.resolveComponent("KSelect"),Ju=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Mu,[t.createVNode(w,{model:m.formModel,options:m.formOptions,schema:a.value,onModelUpdated:u[0]||(u[0]=(A,R)=>m.onModelUpdated(A,R))},null,8,["model","options","schema"]),t.createVNode(Wu,{class:"rla-form-request-limits"},{title:t.withCtx(()=>[t.createVNode(E,{class:"rla-form-request-limits-title",for:"rla-form-request-limits-legend",info:t.unref(o)("rla.request_limits.help"),"tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("rla.request_limits.title")),1)]),_:1},8,["info"]),t.createElementVNode("div",Vu,t.toDisplayString(t.unref(o)("rla.request_limits.subtitle")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",Iu,[t.createElementVNode("div",Au,[t.createVNode(E,{class:"rla-form-window-type-label","tooltip-attributes":{maxWidth:"300",placement:"top"}},{tooltip:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:t.unref(o)("rla.window_type.help")},null,8,Ou)]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("rla.window_type.label"))+" ",1)]),_:1}),t.createElementVNode("div",Fu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,A=>(t.openBlock(),t.createBlock(M,{key:`window-type-${A}`,"model-value":y.value,name:A,"selected-value":A,"onUpdate:modelValue":k},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)(`rla.window_type.options.${A}`)),1)]),_:2},1032,["model-value","name","selected-value"]))),128))])]),t.createElementVNode("div",Uu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B.value,(A,R)=>(t.openBlock(),t.createElementBlock("div",{key:R.toString()},[t.createVNode(E,{for:`rla-form-request-limits-item-${R}-legend`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("rla.request_limits.label_index",{index:R+1})),1)]),_:2},1032,["for"]),t.createElementVNode("div",Du,[t.createElementVNode("legend",{id:`rla-form-request-limits-item-${R}-legend`,class:"rla-form-request-limits-inputs"},[t.createVNode(Q,{"model-value":A.limit&&A.limit.toString(),placeholder:t.unref(o)("rla.request_limits.request_number"),type:"number","onUpdate:modelValue":St=>O(R,Number.parseInt(St))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(o)("rla.request_limits.interval_determiner")),1),t.createVNode(Q,{"model-value":A.windowSize&&A.windowSize.toString(),placeholder:t.unref(o)("rla.request_limits.time_interval"),type:"number","onUpdate:modelValue":St=>F(R,Number.parseInt(St))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(o)("rla.request_limits.seconds")),1)],8,Lu),t.createElementVNode("div",vu,[t.createVNode(De,{appearance:"tertiary",disabled:B.value.length<=1,onClick:()=>p(R)},{default:t.withCtx(()=>[t.createVNode(t.unref(nm))]),_:2},1032,["disabled","onClick"]),t.createVNode(De,{appearance:"tertiary",onClick:()=>g(R)},{default:t.withCtx(()=>[t.createVNode(t.unref(ro))]),_:2},1032,["onClick"])])])]))),128))]),s.value.length>0?(t.openBlock(),t.createElementBlock("div",Pu,[t.createElementVNode("div",null,t.toDisplayString(t.unref(o)("rla.try_a_use_case"))+":",1),t.createElementVNode("div",qu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(A,R)=>(t.openBlock(),t.createBlock(Et,{key:`use-case-${R}`,"max-width":"300"},{content:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(A.description),1),Ru,t.createElementVNode("div",null,t.toDisplayString(t.unref(o)("rla.request_limits.label"))+": "+t.toDisplayString(A.config.limit),1),t.createElementVNode("div",null,t.toDisplayString(t.unref(o)("rla.request_limits.time_interval"))+": "+t.toDisplayString(A.config.window_size),1)]),default:t.withCtx(()=>[t.createVNode(ye,{appearance:c.value===`${y.value}-${R}`?"info":"decorative",class:"rla-form-request-limits-examples-badge",onClick:()=>f(A,`${y.value}-${R}`)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("rla.use_case_index",{index:R+1})),1)]),_:2},1032,["appearance","onClick"])]),_:2},1024))),128))])])):t.createCommentVNode("",!0)])]),_:1}),t.createVNode(Zu,{modelValue:T.value,"onUpdate:modelValue":u[1]||(u[1]=A=>T.value=A),class:"rla-form-identifiers",items:d.value,label:t.unref(o)("rla.identifiers.label"),"label-attributes":{tooltipAttributes:{maxWidth:"300",placement:"top"}},onSelected:u[2]||(u[2]=A=>i.onModelUpdated(A.value,"config-identifier"))},{"label-tooltip":t.withCtx(()=>[t.createElementVNode("div",{innerHTML:l.value&&l.value.help},null,8,xu)]),_:1},8,["modelValue","items","label"]),t.createElementVNode("div",null,[t.createVNode(E,{for:"rla-form-error-legend",info:t.unref(o)("rla.error_message.help"),required:"","tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("rla.error_message.label")),1)]),_:1},8,["info"]),t.createElementVNode("legend",zu,[t.createVNode(Q,{class:"input-error-code","model-value":_.value&&_.value.toString(),placeholder:t.unref(o)("rla.error_message.code_placeholder"),type:"number","onUpdate:modelValue":u[3]||(u[3]=A=>m.onModelUpdated(Number.parseInt(A),"config-error_code"))},null,8,["model-value","placeholder"]),ju,t.createVNode(Q,{"model-value":C.value,placeholder:t.unref(o)("rla.error_message.message_placeholder"),"onUpdate:modelValue":u[4]||(u[4]=A=>m.onModelUpdated(A,"config-error_message"))},null,8,["model-value","placeholder"])])])]),t.createVNode(Ju,{modelValue:h.value,"onUpdate:modelValue":u[6]||(u[6]=A=>h.value=A),"trigger-label":t.unref(o)("rla.view_advanced_fields")},{default:t.withCtx(()=>[t.createVNode(w,{model:m.formModel,options:m.formOptions,schema:r.value,onModelUpdated:u[5]||(u[5]=(A,R)=>m.onModelUpdated(A,R))},null,8,["model","options","schema"])]),_:1},8,["modelValue","trigger-label"])],64)}}}),[["__scopeId","data-v-04007e41"]])},Symbol.toStringTag,{value:"Module"})),Hu=["array","metric","advanced","selectionGroup","object-advanced"],Yu={install:e=>{e.component("VueFormGenerator",j)}},Gu=(e,n)=>({"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer",...(n==null?void 0:n.useRLARedesignedForm)&&{"rate-limiting-advanced":"RLAForm"}})[e];U.FORMS_API_KEY=le,U.VueFormGenerator=j,U.abstractField=ls,U.customFields=Hu,U.default=Yu,U.getSharedFormName=Gu,U.sharedForms=Ku,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .vue-form-generator .field-checkbox input{margin-left:12px}.vue-form-generator .field-checklist .listbox,.vue-form-generator .field-checklist .dropList{height:auto;max-height:150px;overflow:auto}.vue-form-generator .field-checklist .listbox .list-row label,.vue-form-generator .field-checklist .dropList .list-row label{font-weight:initial}.vue-form-generator .field-checklist .listbox .list-row input,.vue-form-generator .field-checklist .dropList .list-row input{margin-right:4px}.vue-form-generator .field-checklist .combobox{height:initial;overflow:hidden}.vue-form-generator .field-checklist .combobox .mainRow{cursor:pointer;padding-right:10px;position:relative}.vue-form-generator .field-checklist .combobox .mainRow .arrow{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGdJREFUOI3tzjsOwjAURNGDUqSgTxU5K2AVrJtswjUsgHSR0qdxAZZFPrS+3ZvRzBsqf9MUtBtazJk+oMe0VTriiZCFX8nbpENMgfARjsn74vKj5IFruhfc8d6zIF9S/Hyk5HS4spMVeFcOjszaOwMAAAAASUVORK5CYII=);background-repeat:no-repeat;height:16px;position:absolute;right:-9px;top:3px;transform:rotate(0);transition:transform .5s;width:16px}.vue-form-generator .field-checklist .combobox .mainRow.expanded .arrow{transform:rotate(-180deg)}.vue-form-generator .field-checklist .combobox .dropList{transition:height .5s}.form-field-wrapper[data-v-b6d4701b],.form-field-wrapper[data-v-b6d4701b] input[type=radio]{width:100%}.form-field-wrapper[data-v-b6d4701b] input[type=color]{width:60px}.form-field-wrapper[data-v-b6d4701b] input[type=range]{padding:0}span.field-label[data-v-852ab959]{display:block;margin-left:12px;width:100%}.vue-form-generator .field-radios .radio-list label{display:block}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:5px}.vue-form-generator .field-submit input{background-color:#337ab7!important;border-color:#2e6da4!important;color:#fff!important}.vue-form-generator .field-input .wrapper{width:100%}.vue-form-generator .field-input .helper{margin:auto 7px}.vue-form-generator .field-image .wrapper{width:100%}.vue-form-generator .field-image .preview{background-position:center center;background-repeat:no-repeat;background-size:contain;border:1px solid #ccc;border-radius:3px;box-shadow:inset 0 1px 1px #00000013;height:100px;margin-top:5px;position:relative}.vue-form-generator .field-image .preview .remove{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAXUlEQVR42u2SwQoAIAhD88vVLy8KBlaS0i1oJwP3piGVg0Skmpq8HjqZrWl9uwCbGAmwKYGZs/6iqgMyAdJuM8W2QmYKpLt/0AG9ASCv/oAnANd3AEjmAlFT1BypAV+PnRH5YehvAAAAAElFTkSuQmCC);bottom:3px;font-size:16px;height:16px;opacity:.7;position:absolute;right:3px;width:16px}.vue-form-generator .field-image .preview .remove:hover{cursor:pointer;opacity:1}.vue-form-generator .field-noUiSlider .field-wrap{display:block}.vue-form-generator .field-noUiSlider .contain-pips{margin-bottom:30px}.vue-form-generator .field-noUiSlider .contain-tooltip{margin-top:30px}.vue-form-generator .field-noUiSlider .noUi-vertical{height:200px;margin:10px 0}.vue-form-generator .field-rangeSlider .irs{width:100%}.vue-form-generator .field-selectEx .bootstrap-select .dropdown-menu li.selected .text{font-weight:700}.vue-form-generator .field-staticMap img{display:block;max-width:100%;width:auto}.vue-form-generator .field-switch .field-wrap label{border-radius:15px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px #0000000d;cursor:pointer;display:block;height:30px;margin:0 10px 10px 0;padding:0;position:relative;width:120px}.vue-form-generator .field-switch input{left:0;opacity:0;position:absolute;top:0}.vue-form-generator .field-switch .label{background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px #0000001f,inset 0 0 2px #00000026;display:block;font-size:10px;height:inherit;position:relative;text-transform:uppercase;width:100%}.vue-form-generator .field-switch .label:before,.vue-form-generator .field-switch .label:after{line-height:1;margin-top:-7px;position:absolute;top:50%;-webkit-transition:inherit;-moz-transition:inherit;-o-transition:inherit;transition:inherit}.vue-form-generator .field-switch .label:before{color:#aaa;content:attr(data-off);right:11px;text-shadow:0 1px rgba(255,255,255,.5)}.vue-form-generator .field-switch .label:after{color:#fff;content:attr(data-on);left:11px;opacity:0;text-shadow:0 1px rgba(0,0,0,.2)}.vue-form-generator .field-switch input:checked~.label{box-shadow:inset 0 1px 2px #00000026,inset 0 0 3px #0003}.vue-form-generator .field-switch input:checked~.label:before{opacity:0}.vue-form-generator .field-switch input:checked~.label:after{opacity:1}.vue-form-generator .field-switch .handle{background:linear-gradient(to bottom,#fff 40%,#f0f0f0);background-image:-webkit-linear-gradient(top,#ffffff 40%,#f0f0f0);border-radius:100%;box-shadow:1px 1px 5px #0003;height:28px;left:1px;position:absolute;top:1px;width:28px}.vue-form-generator .field-switch .handle:before{background:linear-gradient(to bottom,#eee,#fff);background-image:-webkit-linear-gradient(top,#eeeeee,#ffffff);border-radius:6px;box-shadow:inset 0 1px #00000005;content:"";height:12px;left:50%;margin:-6px 0 0 -6px;position:absolute;top:50%;width:12px}.vue-form-generator .field-switch input:checked~.handle{box-shadow:-1px 1px 5px #0003;left:91px;left:calc(100% - 29px)}.vue-form-generator .field-switch .label,.vue-form-generator .field-switch .handle{transition:all .3s ease}.object-advanced-wrapper[data-v-106caf87]{width:100%}.item-wrapper[data-v-106caf87]{margin-left:28px}.index-wrapper[data-v-106caf87]{align-items:center;display:flex;justify-content:space-between;margin-top:4px}.divider[data-v-106caf87]{margin-bottom:8px;margin-top:8px}.wide-divider[data-v-106caf87]{margin-bottom:16px;margin-top:16px}.input-wrapper[data-v-106caf87]{margin-right:16px;margin-top:16px}.input-wrapper .indent[data-v-106caf87]{margin-left:28px}.input-item[data-v-106caf87],.input-item .form-control[data-v-106caf87]{display:flex}.input-item .k-button[data-v-106caf87]{display:flex;margin-left:20px;margin-right:20px}.array-item[data-v-ec926551]{display:flex;width:100%}.array-item[data-v-ec926551] .k-button.delete{align-self:center;height:100%;margin-left:20px}.multi-item-wrapper[data-v-27d212bd]{width:100%}.slide-fade-enter-active,.slide-fade-leave-active{padding:0;transition:all .5s}.slide-fade-enter-from,.slide-fade-leave-to{max-height:0!important}.metrics-wrapper{width:100%}.metrics-wrapper .btn,.metrics-wrapper .metrics-wrapper i{cursor:pointer}.field-dropdown .title{align-items:center;background-color:#f9fafb;border-bottom:1px solid #eee;cursor:pointer;display:flex;height:45px;padding:0 16px;position:relative;transition:transform .2s cubic-bezier(.41,.35,1,.28) 0s,background-color .2s ease-in;width:100%}.field-dropdown .title:hover{background-color:#f5f5f5}.field-dropdown .metric-add-icon{margin-left:auto;transition:all .7s;-webkit-user-select:none;user-select:none}.field-dropdown .content{border:1px solid #eee;border-top:0;height:auto;overflow:hidden;transition:all .5s}.field-dropdown .content .metric-remove-button{float:right;margin-bottom:16px;margin-right:16px}.field-dropdown .content .vue-form-generator{padding:16px}.field-dropdown.active .title .metric-add-icon{transform:rotate(45deg)}.autosuggest[data-v-647bb712]{width:100%}.k-select[data-v-647bb712]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-647bb712]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-647bb712]:last-child{opacity:.7}.field-span[data-v-647bb712]{display:flex;justify-content:space-between}.autosuggest .k-select .k-select-list .k-select-item button:active{box-shadow:none}.autosuggest .k-select .k-select-list .k-select-item button:active:not(.selected){background-color:#f9fafb}.array-card-container-wrapper{width:100%}.array-card-container[data-v-5fa27cb4]{align-items:center;display:flex}.array-card-container .card[data-v-5fa27cb4]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-5fa27cb4]{margin-left:12px}.selection-group[data-v-7e49acd6]{margin-bottom:8px;width:100%}.selection-group .form-group[data-v-7e49acd6]{margin-bottom:0}.field-array-item[data-v-19b9d61e]{display:flex;justify-content:space-between}.field-array-item input.form-control[data-v-19b9d61e]{width:200px}.field-advanced[data-v-2d8e71e1]{margin-bottom:32px!important;margin-top:-16px}.advanced-field-dropdown-wrapper[data-v-2d8e71e1]{display:flex;flex-direction:column;width:100%}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]{align-items:center;color:#07c;cursor:pointer;display:flex;font-size:inherit;margin-top:16px;order:2;padding:0}.advanced-field-dropdown-wrapper .advanced-field-title i[data-v-2d8e71e1]{color:#07c;font-size:16px}.advanced-field-dropdown-wrapper .advanced-field-title:hover span[data-v-2d8e71e1]{color:#07c;text-decoration:underline}.advanced-field-dropdown-wrapper .advanced-field-dropdown[data-v-2d8e71e1]{display:block;height:auto;max-height:100%;position:relative;width:100%}.advanced-field-dropdown-wrapper .advanced-field-dropdown.closed[data-v-2d8e71e1]{max-height:0;overflow:hidden}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1],.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]:focus,.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]:hover{background-color:transparent!important;border:none!important;cursor:pointer!important;font-weight:400!important}.field-selectionGroup>label{display:none}.field-selectionGroup .control-help{color:#00000073;font-weight:400;margin-left:32px;width:100%}.field-selectionGroup .form-check-input{margin-bottom:8px;margin-right:8px}.field-selectionGroup .option-field{margin-top:16px}.field-selectionGroup .option-field .form-group{margin-bottom:16px}.field-selectionGroup .k-label{display:block}.selection-group[data-v-22882f4c]{width:100%}.selection-group .form-group[data-v-22882f4c],.selection-group .option-field-container[data-v-22882f4c]{margin-bottom:0}.selection-group .form-group.horizontal-radios .radio-group[data-v-22882f4c]{align-items:center;display:flex;flex-direction:row;gap:24px}.key-value-pairs-editor[data-v-29d15375]{width:100%}.key-value-pairs-editor .pair-item[data-v-29d15375]{display:flex}.key-value-pairs-editor .pair-item[data-v-29d15375]:not(:first-child){margin-top:12px}.key-value-pairs-editor .pair-item input[data-v-29d15375]{margin-right:12px}.form-group:not([class*=" col-"]){width:100%}.form-group{display:inline-block;margin-bottom:16px;vertical-align:top}.form-group label{font-weight:400}.form-group label>:first-child{display:inline-block}.form-group label>div[role=button]{display:inline-block}.form-group.featured>label{font-weight:700}.form-group.required>label:after{color:red;content:"*";font-size:14px;font-weight:400;padding-left:3px}.form-group.disabled>label{color:#666;font-style:italic}.form-group.error input:not([type=checkbox]),.form-group.error textarea,.form-group.error select{background-color:#ff000026;border:1px solid #f00}.form-group.error .errors{color:red;font-size:12px}.form-group.error .errors span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiklEQVR4Xt2TMQoCQQxF3xdhu72MpZU3GU/meBFLOztPYrVWsQmEWSaMsIXgK8P8RyYkMjO2sAN+K9gTIAmDAlzoUzE7p4IFytvDCQWJKSStYB2efcAvqZFM0BcstMx5naSDYFzfLhh/4SmRM+6Agw/xIX0tKEDFufeDNRUc4XqLRz3qabVIf3BMHwl6Ktexn3nmAAAAAElFTkSuQmCC);background-repeat:no-repeat;display:block;font-weight:600;margin-top:3px;padding-left:17px;padding-top:0}.form-group-label[data-v-02e656fb]{display:flex}.form-group-label[data-v-02e656fb] .k-tooltip p{margin:0}.icon-wrapper[data-v-02e656fb]{display:flex!important}.link-wrapper[data-v-02e656fb]{margin-left:4px}.vue-form-generator *{box-sizing:border-box}.vue-form-generator .hidden-field{display:none}.vue-form-generator .form-group{margin-bottom:24px}.vue-form-generator .form-group:last-child{margin-bottom:32px}.vue-form-generator .form-group.hide-label>label{display:none}.vue-form-generator .form-group label{font-weight:500}.vue-form-generator .field-advanced{margin-bottom:8px;margin-top:-8px}.vue-form-generator .field-advanced .form-group:last-child{margin-bottom:16px}.vue-form-generator .k-input[type=text]{width:100%}.vue-form-generator .form-control{background-color:#fff;background-image:none;border:none;border-radius:3px;box-shadow:inset 0 0 0 1px #e7e7ec;box-sizing:border-box;color:#52596e;display:block;font-size:16px;line-height:24px;padding:8px 16px;transition:color .1s ease,box-shadow .1s ease,border-color ease-in-out .15s;width:100%}.vue-form-generator .form-control:hover{box-shadow:inset 0 0 0 1px #bdd3f9}.vue-form-generator .form-control:focus{box-shadow:inset 0 0 0 1px #3972d5;outline:none}.vue-form-generator .form-control:not([class*=" col-"]){width:100%}.vue-form-generator div.help{margin-left:4px;position:relative}.vue-form-generator div.help .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA+UlEQVQ4ja3TS0oDQRAG4C8+lq7ceICICoLGK7iXuNBbeAMJuPVOIm7cqmDiIncIggg+cMZFaqCnZyYKWtB0df31V1VXdfNH6S2wD9CP8xT3KH8T9BiTcE7XBMOfyBcogvCFO9ziLWwFRosyV+QxthNsA9dJkEYlvazsQdi3sBv6Ol6TBLX+HWT3fcQZ3vGM5fBLk+ynAU41m1biCXvhs4OPBDuBpa6GxF0P8YAj3GA1d1qJfdoS4DOIcIm1DK9x8iaWeDF/SP3QU6zRROpjLDFLsFlibx1jJaMkSIGrWKntvItcyTBKzCcybsvc9ZmYz3kz9Ooz/b98A8yvW13B3ch6AAAAAElFTkSuQmCC);background-position:center center;background-repeat:no-repeat;display:inline-block;height:14px;width:16px}.vue-form-generator .field-wrap{display:flex}.vue-form-generator .field-wrap .buttons{margin-left:4px;white-space:nowrap}.vue-form-generator .field-wrap input[type=submit]{background-color:#fff;border:1px solid #ccc;border-radius:4px;color:#333;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0;padding:6px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.vue-form-generator .field-wrap input[type=submit]:not(:last-child){margin-right:4px}.vue-form-generator .field-wrap input[type=submit]:hover{background-color:#e6e6e6;color:#333}.vue-form-generator .field-wrap input[type=submit]:active{background-color:#d4d4d4;border-color:#8c8c8c;box-shadow:inset 0 3px 5px #00000020;color:#333;outline:0}.vue-form-generator .field-wrap input[type=submit]:disabled{cursor:not-allowed;opacity:.6}.vue-form-generator .hint{font-size:12px;font-style:italic}.vue-form-generator .field-switch .field-wrap input[type=checkbox]{position:absolute}.vue-form-generator .field-switch .field-wrap input[type=checkbox]:checked~.label{background-color:#0044f4;box-shadow:none}.vue-form-generator .field-switch .field-wrap input[type=checkbox]:checked~.handle{left:calc(100% - 22px)}.vue-form-generator .field-switch .field-wrap label{box-shadow:none;height:24px;margin:0;width:44px}.vue-form-generator .field-switch .label{box-shadow:none}.vue-form-generator .field-switch .label:before,.vue-form-generator .field-switch .label:after{color:#000000b3;font-size:14px;font-weight:400;left:18px;margin-left:42px;text-shadow:none;text-transform:none;width:max-content}.vue-form-generator .field-switch .handle{background:#fff;box-shadow:none;height:20px;left:2px;top:2px;width:20px}.vue-form-generator .field-switch .handle:before{background:none;box-shadow:none}.vue-form-generator .kong-form-new-element-button-label{margin-bottom:24px!important;margin-top:24px!important}.vue-form-generator div.help .icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+ICA8cGF0aCBmaWxsPSIjMDA4NkU2IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDExYy0yLjc2MSAwLTUtMi4yMzktNS01czIuMjM5LTUgNS01IDUgMi4yMzkgNSA1LTIuMjM5IDUtNSA1TTYgMEMyLjY4NiAwIDAgMi42ODYgMCA2czIuNjg2IDYgNiA2IDYtMi42ODYgNi02LTIuNjg2LTYtNi02bTAgM2MtMS4xMDUgMC0yIC44OTUtMiAyaDFjMC0uNTUyLjQ0OC0xIDEtMXMxIC40NDggMSAxLS40NDggMS0xIDEtMSAuNDQ4LTEgMWgxYzEuMTA1IDAgMi0uODk1IDItMnMtLjg5NS0yLTItMnpNNSA5aDJWOEg1djF6Ii8+PC9zdmc+);height:12px;width:12px}.vue-form-generator .field-wrap button.danger:hover,.vue-form-generator .field-wrap input[type=submit].danger:hover,.vue-form-generator .field-wrap button.danger:active,.vue-form-generator .field-wrap input[type=submit].danger:active{background-color:#fff;box-shadow:none;color:#fff}.vue-form-generator .field-wrap button.tertiary:hover,.vue-form-generator .field-wrap input[type=submit].tertiary:hover,.vue-form-generator .field-wrap button.tertiary:active,.vue-form-generator .field-wrap input[type=submit].tertiary:active{background-color:#fff;box-shadow:none;color:#0044f4}.vue-form-generator .field-checkbox{align-items:center;display:flex}.vue-form-generator .field-checkbox label{margin:0;order:1}.vue-form-generator .field-checkbox input{margin-left:0;margin-right:12px}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:10px}.vue-form-generator label{font-weight:500}.vue-form-generator .form-group input[type=radio]{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid currentColor;border-radius:100%;color:#0044f4;display:inline-flex;height:20px;justify-content:center;width:20px}.vue-form-generator .form-group input[type=radio]:after{border-radius:100%;content:"";height:10px;width:10px}.vue-form-generator .form-group input[type=radio]:checked:after{background-color:currentColor}.vue-form-generator .root-level-collapse .k-collapse-heading{margin-bottom:0!important}.vue-form-generator .root-level-collapse .k-collapse-visible-content{color:#6c7489}.vue-form-generator .nested-collapse .k-collapse-heading{margin-bottom:24px!important}.global-fields.VueFormGenerator .form-group:last-child{margin-bottom:24px}.general-settings .VueFormGenerator .form-group:last-child{margin-bottom:0}.general-settings .k-label{margin-bottom:8px;margin-top:24px}.general-settings .k-input-switch .k-label{margin-top:0}.general-settings .auth-method-container{display:flex;flex-wrap:wrap}.general-settings .auth-method-container .auth-method{margin-bottom:8px;width:50%}.general-settings .k-switch{margin:24px 0}.advanced-field-dropdown.closed{margin-bottom:32px}.advanced-field-dropdown.open{margin-top:8px}.section-header[data-v-e7395ff0]{color:#000000d9;font-size:16px;font-weight:500;line-height:20px}.description[data-v-e7395ff0]{color:#00000073;margin-bottom:12px}.description a[data-v-e7395ff0]{display:inline}.link-wrapper[data-v-e7395ff0]{margin-bottom:8px}[data-v-e7395ff0] .k-tabs ul[role=tablist]{margin-bottom:32px}[data-v-e7395ff0] .jwk-array-input-wrapper{display:flex;justify-content:space-between;margin-bottom:12px;width:400px}[data-v-e7395ff0] .jwk-array-input-wrapper input.form-control{width:300px}[data-v-e7395ff0] .auth-array-item-container{width:100%}[data-v-e7395ff0] .auth-array-item{display:flex;margin-top:8px}[data-v-e7395ff0] .k-button.auth-array-item-new{margin-top:24px}[data-v-6706c68b] .post-function-array-item-container{width:100%}[data-v-6706c68b] .post-function-array-item{margin-top:8px}[data-v-0fc8ef29] .exit-transformer-array-item-container{width:100%}[data-v-0fc8ef29] .exit-transformer-array-item{margin-top:8px}.issuer-select[data-v-b9df1c3f]{margin-bottom:16px;width:100%}.header-wrapper[data-v-b9df1c3f]{margin-bottom:8px}.sub-form[data-v-b9df1c3f]{margin-left:24px}.description[data-v-b9df1c3f]{margin-bottom:12px}[data-v-b9df1c3f] .k-tabs ul[role=tablist]{margin-bottom:32px}.rla-form-basic-fields[data-v-04007e41]{display:flex;flex-direction:column;gap:24px;margin-bottom:24px}.rla-form-basic-fields .rla-form-request-limits .rla-form-request-limits-content[data-v-04007e41]{display:flex;flex-direction:column;gap:12px}.rla-form-basic-fields .rla-form-request-limits .rla-form-window-type-radios[data-v-04007e41]{display:flex;flex-direction:row;gap:20px}.rla-form-basic-fields .rla-form-request-limits .rla-form-window-type-radios[data-v-04007e41] .radio-label{font-size:14px;font-weight:400}.rla-form-basic-fields .rla-form-request-limits-title[data-v-04007e41]{font-size:16px;font-weight:700}.rla-form-basic-fields .rla-form-request-limits-subtitle[data-v-04007e41]{color:#6c7489;font-size:14px;font-weight:400}.rla-form-basic-fields .rla-form-request-limits-items[data-v-04007e41]{display:flex;flex-direction:column;gap:12px}.rla-form-basic-fields .rla-form-request-limits-row[data-v-04007e41],.rla-form-basic-fields .rla-form-request-limits-inputs[data-v-04007e41],.rla-form-basic-fields .rla-form-request-limits-actions[data-v-04007e41]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.rla-form-basic-fields .rla-form-request-limits-inputs[data-v-04007e41]{flex-grow:1}.rla-form-basic-fields .rla-form-request-limits-actions[data-v-04007e41]{flex-shrink:0}.rla-form-basic-fields .rla-form-request-limits[data-v-04007e41] .form-group{margin-bottom:0!important}.rla-form-basic-fields .rla-form-request-limits-examples[data-v-04007e41]{align-items:center;display:flex;flex-direction:row;gap:8px}.rla-form-basic-fields .rla-form-request-limits-examples-badges[data-v-04007e41]{display:flex;flex-direction:row;gap:8px}.rla-form-basic-fields .rla-form-request-limits-examples-badges[data-v-04007e41] .rla-form-request-limits-examples-badge{cursor:pointer}.rla-form-basic-fields .rla-form-window-type-label[data-v-04007e41] .k-tooltip p,.rla-form-basic-fields .rla-form-identifiers[data-v-04007e41] .k-tooltip p{margin:0}.rla-form-basic-fields .rla-form-error-inputs[data-v-04007e41]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.rla-form-basic-fields .rla-form-error-inputs .input-error-code[data-v-04007e41]{max-width:200px;min-width:100px;width:20%}
1
+ .vue-form-generator .field-checkbox input{margin-left:12px}.vue-form-generator .field-checklist .listbox,.vue-form-generator .field-checklist .dropList{height:auto;max-height:150px;overflow:auto}.vue-form-generator .field-checklist .listbox .list-row label,.vue-form-generator .field-checklist .dropList .list-row label{font-weight:initial}.vue-form-generator .field-checklist .listbox .list-row input,.vue-form-generator .field-checklist .dropList .list-row input{margin-right:4px}.vue-form-generator .field-checklist .combobox{height:initial;overflow:hidden}.vue-form-generator .field-checklist .combobox .mainRow{cursor:pointer;padding-right:10px;position:relative}.vue-form-generator .field-checklist .combobox .mainRow .arrow{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGdJREFUOI3tzjsOwjAURNGDUqSgTxU5K2AVrJtswjUsgHSR0qdxAZZFPrS+3ZvRzBsqf9MUtBtazJk+oMe0VTriiZCFX8nbpENMgfARjsn74vKj5IFruhfc8d6zIF9S/Hyk5HS4spMVeFcOjszaOwMAAAAASUVORK5CYII=);background-repeat:no-repeat;height:16px;position:absolute;right:-9px;top:3px;transform:rotate(0);transition:transform .5s;width:16px}.vue-form-generator .field-checklist .combobox .mainRow.expanded .arrow{transform:rotate(-180deg)}.vue-form-generator .field-checklist .combobox .dropList{transition:height .5s}.form-field-wrapper[data-v-b6d4701b],.form-field-wrapper[data-v-b6d4701b] input[type=radio]{width:100%}.form-field-wrapper[data-v-b6d4701b] input[type=color]{width:60px}.form-field-wrapper[data-v-b6d4701b] input[type=range]{padding:0}span.field-label[data-v-852ab959]{display:block;margin-left:12px;width:100%}.vue-form-generator .field-radios .radio-list label{display:block}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:5px}.vue-form-generator .field-submit input{background-color:#337ab7!important;border-color:#2e6da4!important;color:#fff!important}.vue-form-generator .field-input .wrapper{width:100%}.vue-form-generator .field-input .helper{margin:auto 7px}.vue-form-generator .field-image .wrapper{width:100%}.vue-form-generator .field-image .preview{background-position:center center;background-repeat:no-repeat;background-size:contain;border:1px solid #ccc;border-radius:3px;box-shadow:inset 0 1px 1px #00000013;height:100px;margin-top:5px;position:relative}.vue-form-generator .field-image .preview .remove{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAXUlEQVR42u2SwQoAIAhD88vVLy8KBlaS0i1oJwP3piGVg0Skmpq8HjqZrWl9uwCbGAmwKYGZs/6iqgMyAdJuM8W2QmYKpLt/0AG9ASCv/oAnANd3AEjmAlFT1BypAV+PnRH5YehvAAAAAElFTkSuQmCC);bottom:3px;font-size:16px;height:16px;opacity:.7;position:absolute;right:3px;width:16px}.vue-form-generator .field-image .preview .remove:hover{cursor:pointer;opacity:1}.vue-form-generator .field-noUiSlider .field-wrap{display:block}.vue-form-generator .field-noUiSlider .contain-pips{margin-bottom:30px}.vue-form-generator .field-noUiSlider .contain-tooltip{margin-top:30px}.vue-form-generator .field-noUiSlider .noUi-vertical{height:200px;margin:10px 0}.vue-form-generator .field-rangeSlider .irs{width:100%}.vue-form-generator .field-selectEx .bootstrap-select .dropdown-menu li.selected .text{font-weight:700}.vue-form-generator .field-staticMap img{display:block;max-width:100%;width:auto}.vue-form-generator .field-switch .field-wrap label{border-radius:15px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px #0000000d;cursor:pointer;display:block;height:30px;margin:0 10px 10px 0;padding:0;position:relative;width:120px}.vue-form-generator .field-switch input{left:0;opacity:0;position:absolute;top:0}.vue-form-generator .field-switch .label{background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px #0000001f,inset 0 0 2px #00000026;display:block;font-size:10px;height:inherit;position:relative;text-transform:uppercase;width:100%}.vue-form-generator .field-switch .label:before,.vue-form-generator .field-switch .label:after{line-height:1;margin-top:-7px;position:absolute;top:50%;-webkit-transition:inherit;-moz-transition:inherit;-o-transition:inherit;transition:inherit}.vue-form-generator .field-switch .label:before{color:#aaa;content:attr(data-off);right:11px;text-shadow:0 1px rgba(255,255,255,.5)}.vue-form-generator .field-switch .label:after{color:#fff;content:attr(data-on);left:11px;opacity:0;text-shadow:0 1px rgba(0,0,0,.2)}.vue-form-generator .field-switch input:checked~.label{box-shadow:inset 0 1px 2px #00000026,inset 0 0 3px #0003}.vue-form-generator .field-switch input:checked~.label:before{opacity:0}.vue-form-generator .field-switch input:checked~.label:after{opacity:1}.vue-form-generator .field-switch .handle{background:linear-gradient(to bottom,#fff 40%,#f0f0f0);background-image:-webkit-linear-gradient(top,#ffffff 40%,#f0f0f0);border-radius:100%;box-shadow:1px 1px 5px #0003;height:28px;left:1px;position:absolute;top:1px;width:28px}.vue-form-generator .field-switch .handle:before{background:linear-gradient(to bottom,#eee,#fff);background-image:-webkit-linear-gradient(top,#eeeeee,#ffffff);border-radius:6px;box-shadow:inset 0 1px #00000005;content:"";height:12px;left:50%;margin:-6px 0 0 -6px;position:absolute;top:50%;width:12px}.vue-form-generator .field-switch input:checked~.handle{box-shadow:-1px 1px 5px #0003;left:91px;left:calc(100% - 29px)}.vue-form-generator .field-switch .label,.vue-form-generator .field-switch .handle{transition:all .3s ease}.object-advanced-wrapper[data-v-b35063fd]{width:100%}.item-wrapper[data-v-b35063fd]{margin-left:28px}.index-wrapper[data-v-b35063fd]{align-items:center;display:flex;justify-content:space-between;margin-top:4px}.divider[data-v-b35063fd]{margin-bottom:8px;margin-top:8px}.wide-divider[data-v-b35063fd]{margin-bottom:16px;margin-top:16px}.input-wrapper[data-v-b35063fd]{margin-right:16px;margin-top:16px}.input-wrapper .indent[data-v-b35063fd]{margin-left:28px}.input-item[data-v-b35063fd],.input-item .form-control[data-v-b35063fd]{display:flex}.input-item .k-button[data-v-b35063fd]{display:flex;margin-left:20px;margin-right:20px}.array-item[data-v-ec926551]{display:flex;width:100%}.array-item[data-v-ec926551] .k-button.delete{align-self:center;height:100%;margin-left:20px}.multi-item-wrapper[data-v-27d212bd]{width:100%}.slide-fade-enter-active,.slide-fade-leave-active{padding:0;transition:all .5s}.slide-fade-enter-from,.slide-fade-leave-to{max-height:0!important}.metrics-wrapper{width:100%}.metrics-wrapper .btn,.metrics-wrapper .metrics-wrapper i{cursor:pointer}.field-dropdown .title{align-items:center;background-color:#f9fafb;border-bottom:1px solid #eee;cursor:pointer;display:flex;height:45px;padding:0 16px;position:relative;transition:transform .2s cubic-bezier(.41,.35,1,.28) 0s,background-color .2s ease-in;width:100%}.field-dropdown .title:hover{background-color:#f5f5f5}.field-dropdown .metric-add-icon{margin-left:auto;transition:all .7s;-webkit-user-select:none;user-select:none}.field-dropdown .content{border:1px solid #eee;border-top:0;height:auto;overflow:hidden;transition:all .5s}.field-dropdown .content .metric-remove-button{float:right;margin-bottom:16px;margin-right:16px}.field-dropdown .content .vue-form-generator{padding:16px}.field-dropdown.active .title .metric-add-icon{transform:rotate(45deg)}.autosuggest[data-v-647bb712]{width:100%}.k-select[data-v-647bb712]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-647bb712]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-647bb712]:last-child{opacity:.7}.field-span[data-v-647bb712]{display:flex;justify-content:space-between}.autosuggest .k-select .k-select-list .k-select-item button:active{box-shadow:none}.autosuggest .k-select .k-select-list .k-select-item button:active:not(.selected){background-color:#f9fafb}.array-card-container-wrapper{width:100%}.array-card-container[data-v-5fa27cb4]{align-items:center;display:flex}.array-card-container .card[data-v-5fa27cb4]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-5fa27cb4]{margin-left:12px}.selection-group[data-v-7e49acd6]{margin-bottom:8px;width:100%}.selection-group .form-group[data-v-7e49acd6]{margin-bottom:0}.field-array-item[data-v-19b9d61e]{display:flex;justify-content:space-between}.field-array-item input.form-control[data-v-19b9d61e]{width:200px}.field-advanced[data-v-2d8e71e1]{margin-bottom:32px!important;margin-top:-16px}.advanced-field-dropdown-wrapper[data-v-2d8e71e1]{display:flex;flex-direction:column;width:100%}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]{align-items:center;color:#07c;cursor:pointer;display:flex;font-size:inherit;margin-top:16px;order:2;padding:0}.advanced-field-dropdown-wrapper .advanced-field-title i[data-v-2d8e71e1]{color:#07c;font-size:16px}.advanced-field-dropdown-wrapper .advanced-field-title:hover span[data-v-2d8e71e1]{color:#07c;text-decoration:underline}.advanced-field-dropdown-wrapper .advanced-field-dropdown[data-v-2d8e71e1]{display:block;height:auto;max-height:100%;position:relative;width:100%}.advanced-field-dropdown-wrapper .advanced-field-dropdown.closed[data-v-2d8e71e1]{max-height:0;overflow:hidden}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1],.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]:focus,.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]:hover{background-color:transparent!important;border:none!important;cursor:pointer!important;font-weight:400!important}.field-selectionGroup>label{display:none}.field-selectionGroup .control-help{color:#00000073;font-weight:400;margin-left:32px;width:100%}.field-selectionGroup .form-check-input{margin-bottom:8px;margin-right:8px}.field-selectionGroup .option-field{margin-top:16px}.field-selectionGroup .option-field .form-group{margin-bottom:16px}.field-selectionGroup .k-label{display:block}.selection-group[data-v-22882f4c]{width:100%}.selection-group .form-group[data-v-22882f4c],.selection-group .option-field-container[data-v-22882f4c]{margin-bottom:0}.selection-group .form-group.horizontal-radios .radio-group[data-v-22882f4c]{align-items:center;display:flex;flex-direction:row;gap:24px}.key-value-pairs-editor[data-v-29d15375]{width:100%}.key-value-pairs-editor .pair-item[data-v-29d15375]{display:flex}.key-value-pairs-editor .pair-item[data-v-29d15375]:not(:first-child){margin-top:12px}.key-value-pairs-editor .pair-item input[data-v-29d15375]{margin-right:12px}.form-group:not([class*=" col-"]){width:100%}.form-group{display:inline-block;margin-bottom:16px;vertical-align:top}.form-group label{font-weight:400}.form-group label>:first-child{display:inline-block}.form-group label>div[role=button]{display:inline-block}.form-group.featured>label{font-weight:700}.form-group.required>label:after{color:red;content:"*";font-size:14px;font-weight:400;padding-left:3px}.form-group.disabled>label{color:#666;font-style:italic}.form-group.error input:not([type=checkbox]),.form-group.error textarea,.form-group.error select{background-color:#ff000026;border:1px solid #f00}.form-group.error .errors{color:red;font-size:12px}.form-group.error .errors span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiklEQVR4Xt2TMQoCQQxF3xdhu72MpZU3GU/meBFLOztPYrVWsQmEWSaMsIXgK8P8RyYkMjO2sAN+K9gTIAmDAlzoUzE7p4IFytvDCQWJKSStYB2efcAvqZFM0BcstMx5naSDYFzfLhh/4SmRM+6Agw/xIX0tKEDFufeDNRUc4XqLRz3qabVIf3BMHwl6Ktexn3nmAAAAAElFTkSuQmCC);background-repeat:no-repeat;display:block;font-weight:600;margin-top:3px;padding-left:17px;padding-top:0}.form-group-label[data-v-02e656fb]{display:flex}.form-group-label[data-v-02e656fb] .k-tooltip p{margin:0}.icon-wrapper[data-v-02e656fb]{display:flex!important}.link-wrapper[data-v-02e656fb]{margin-left:4px}.vue-form-generator *{box-sizing:border-box}.vue-form-generator .hidden-field{display:none}.vue-form-generator .form-group{margin-bottom:24px}.vue-form-generator .form-group:last-child{margin-bottom:32px}.vue-form-generator .form-group.hide-label>label{display:none}.vue-form-generator .form-group label{font-weight:500}.vue-form-generator .field-advanced{margin-bottom:8px;margin-top:-8px}.vue-form-generator .field-advanced .form-group:last-child{margin-bottom:16px}.vue-form-generator .k-input[type=text]{width:100%}.vue-form-generator .form-control{background-color:#fff;background-image:none;border:none;border-radius:3px;box-shadow:inset 0 0 0 1px #e7e7ec;box-sizing:border-box;color:#52596e;display:block;font-size:16px;line-height:24px;padding:8px 16px;transition:color .1s ease,box-shadow .1s ease,border-color ease-in-out .15s;width:100%}.vue-form-generator .form-control:hover{box-shadow:inset 0 0 0 1px #bdd3f9}.vue-form-generator .form-control:focus{box-shadow:inset 0 0 0 1px #3972d5;outline:none}.vue-form-generator .form-control:not([class*=" col-"]){width:100%}.vue-form-generator div.help{margin-left:4px;position:relative}.vue-form-generator div.help .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA+UlEQVQ4ja3TS0oDQRAG4C8+lq7ceICICoLGK7iXuNBbeAMJuPVOIm7cqmDiIncIggg+cMZFaqCnZyYKWtB0df31V1VXdfNH6S2wD9CP8xT3KH8T9BiTcE7XBMOfyBcogvCFO9ziLWwFRosyV+QxthNsA9dJkEYlvazsQdi3sBv6Ol6TBLX+HWT3fcQZ3vGM5fBLk+ynAU41m1biCXvhs4OPBDuBpa6GxF0P8YAj3GA1d1qJfdoS4DOIcIm1DK9x8iaWeDF/SP3QU6zRROpjLDFLsFlibx1jJaMkSIGrWKntvItcyTBKzCcybsvc9ZmYz3kz9Ooz/b98A8yvW13B3ch6AAAAAElFTkSuQmCC);background-position:center center;background-repeat:no-repeat;display:inline-block;height:14px;width:16px}.vue-form-generator .field-wrap{display:flex}.vue-form-generator .field-wrap .buttons{margin-left:4px;white-space:nowrap}.vue-form-generator .field-wrap input[type=submit]{background-color:#fff;border:1px solid #ccc;border-radius:4px;color:#333;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0;padding:6px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.vue-form-generator .field-wrap input[type=submit]:not(:last-child){margin-right:4px}.vue-form-generator .field-wrap input[type=submit]:hover{background-color:#e6e6e6;color:#333}.vue-form-generator .field-wrap input[type=submit]:active{background-color:#d4d4d4;border-color:#8c8c8c;box-shadow:inset 0 3px 5px #00000020;color:#333;outline:0}.vue-form-generator .field-wrap input[type=submit]:disabled{cursor:not-allowed;opacity:.6}.vue-form-generator .hint{font-size:12px;font-style:italic}.vue-form-generator .field-switch .field-wrap input[type=checkbox]{position:absolute}.vue-form-generator .field-switch .field-wrap input[type=checkbox]:checked~.label{background-color:#0044f4;box-shadow:none}.vue-form-generator .field-switch .field-wrap input[type=checkbox]:checked~.handle{left:calc(100% - 22px)}.vue-form-generator .field-switch .field-wrap label{box-shadow:none;height:24px;margin:0;width:44px}.vue-form-generator .field-switch .label{box-shadow:none}.vue-form-generator .field-switch .label:before,.vue-form-generator .field-switch .label:after{color:#000000b3;font-size:14px;font-weight:400;left:18px;margin-left:42px;text-shadow:none;text-transform:none;width:max-content}.vue-form-generator .field-switch .handle{background:#fff;box-shadow:none;height:20px;left:2px;top:2px;width:20px}.vue-form-generator .field-switch .handle:before{background:none;box-shadow:none}.vue-form-generator .kong-form-new-element-button-label{margin-bottom:24px!important;margin-top:24px!important}.vue-form-generator div.help .icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+ICA8cGF0aCBmaWxsPSIjMDA4NkU2IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDExYy0yLjc2MSAwLTUtMi4yMzktNS01czIuMjM5LTUgNS01IDUgMi4yMzkgNSA1LTIuMjM5IDUtNSA1TTYgMEMyLjY4NiAwIDAgMi42ODYgMCA2czIuNjg2IDYgNiA2IDYtMi42ODYgNi02LTIuNjg2LTYtNi02bTAgM2MtMS4xMDUgMC0yIC44OTUtMiAyaDFjMC0uNTUyLjQ0OC0xIDEtMXMxIC40NDggMSAxLS40NDggMS0xIDEtMSAuNDQ4LTEgMWgxYzEuMTA1IDAgMi0uODk1IDItMnMtLjg5NS0yLTItMnpNNSA5aDJWOEg1djF6Ii8+PC9zdmc+);height:12px;width:12px}.vue-form-generator .field-wrap button.danger:hover,.vue-form-generator .field-wrap input[type=submit].danger:hover,.vue-form-generator .field-wrap button.danger:active,.vue-form-generator .field-wrap input[type=submit].danger:active{background-color:#fff;box-shadow:none;color:#fff}.vue-form-generator .field-wrap button.tertiary:hover,.vue-form-generator .field-wrap input[type=submit].tertiary:hover,.vue-form-generator .field-wrap button.tertiary:active,.vue-form-generator .field-wrap input[type=submit].tertiary:active{background-color:#fff;box-shadow:none;color:#0044f4}.vue-form-generator .field-checkbox{align-items:center;display:flex}.vue-form-generator .field-checkbox label{margin:0;order:1}.vue-form-generator .field-checkbox input{margin-left:0;margin-right:12px}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:10px}.vue-form-generator label{font-weight:500}.vue-form-generator .form-group input[type=radio]{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid currentColor;border-radius:100%;color:#0044f4;display:inline-flex;height:20px;justify-content:center;width:20px}.vue-form-generator .form-group input[type=radio]:after{border-radius:100%;content:"";height:10px;width:10px}.vue-form-generator .form-group input[type=radio]:checked:after{background-color:currentColor}.vue-form-generator .root-level-collapse .k-collapse-heading{margin-bottom:0!important}.vue-form-generator .root-level-collapse .k-collapse-visible-content{color:#6c7489}.vue-form-generator .nested-collapse .k-collapse-heading{margin-bottom:24px!important}.global-fields.VueFormGenerator .form-group:last-child{margin-bottom:24px}.general-settings .VueFormGenerator .form-group:last-child{margin-bottom:0}.general-settings .k-label{margin-bottom:8px;margin-top:24px}.general-settings .k-input-switch .k-label{margin-top:0}.general-settings .auth-method-container{display:flex;flex-wrap:wrap}.general-settings .auth-method-container .auth-method{margin-bottom:8px;width:50%}.general-settings .k-switch{margin:24px 0}.advanced-field-dropdown.closed{margin-bottom:32px}.advanced-field-dropdown.open{margin-top:8px}.section-header[data-v-e7395ff0]{color:#000000d9;font-size:16px;font-weight:500;line-height:20px}.description[data-v-e7395ff0]{color:#00000073;margin-bottom:12px}.description a[data-v-e7395ff0]{display:inline}.link-wrapper[data-v-e7395ff0]{margin-bottom:8px}[data-v-e7395ff0] .k-tabs ul[role=tablist]{margin-bottom:32px}[data-v-e7395ff0] .jwk-array-input-wrapper{display:flex;justify-content:space-between;margin-bottom:12px;width:400px}[data-v-e7395ff0] .jwk-array-input-wrapper input.form-control{width:300px}[data-v-e7395ff0] .auth-array-item-container{width:100%}[data-v-e7395ff0] .auth-array-item{display:flex;margin-top:8px}[data-v-e7395ff0] .k-button.auth-array-item-new{margin-top:24px}[data-v-6706c68b] .post-function-array-item-container{width:100%}[data-v-6706c68b] .post-function-array-item{margin-top:8px}[data-v-0fc8ef29] .exit-transformer-array-item-container{width:100%}[data-v-0fc8ef29] .exit-transformer-array-item{margin-top:8px}.issuer-select[data-v-b9df1c3f]{margin-bottom:16px;width:100%}.header-wrapper[data-v-b9df1c3f]{margin-bottom:8px}.sub-form[data-v-b9df1c3f]{margin-left:24px}.description[data-v-b9df1c3f]{margin-bottom:12px}[data-v-b9df1c3f] .k-tabs ul[role=tablist]{margin-bottom:32px}.rla-form-basic-fields[data-v-04007e41]{display:flex;flex-direction:column;gap:24px;margin-bottom:24px}.rla-form-basic-fields .rla-form-request-limits .rla-form-request-limits-content[data-v-04007e41]{display:flex;flex-direction:column;gap:12px}.rla-form-basic-fields .rla-form-request-limits .rla-form-window-type-radios[data-v-04007e41]{display:flex;flex-direction:row;gap:20px}.rla-form-basic-fields .rla-form-request-limits .rla-form-window-type-radios[data-v-04007e41] .radio-label{font-size:14px;font-weight:400}.rla-form-basic-fields .rla-form-request-limits-title[data-v-04007e41]{font-size:16px;font-weight:700}.rla-form-basic-fields .rla-form-request-limits-subtitle[data-v-04007e41]{color:#6c7489;font-size:14px;font-weight:400}.rla-form-basic-fields .rla-form-request-limits-items[data-v-04007e41]{display:flex;flex-direction:column;gap:12px}.rla-form-basic-fields .rla-form-request-limits-row[data-v-04007e41],.rla-form-basic-fields .rla-form-request-limits-inputs[data-v-04007e41],.rla-form-basic-fields .rla-form-request-limits-actions[data-v-04007e41]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.rla-form-basic-fields .rla-form-request-limits-inputs[data-v-04007e41]{flex-grow:1}.rla-form-basic-fields .rla-form-request-limits-actions[data-v-04007e41]{flex-shrink:0}.rla-form-basic-fields .rla-form-request-limits[data-v-04007e41] .form-group{margin-bottom:0!important}.rla-form-basic-fields .rla-form-request-limits-examples[data-v-04007e41]{align-items:center;display:flex;flex-direction:row;gap:8px}.rla-form-basic-fields .rla-form-request-limits-examples-badges[data-v-04007e41]{display:flex;flex-direction:row;gap:8px}.rla-form-basic-fields .rla-form-request-limits-examples-badges[data-v-04007e41] .rla-form-request-limits-examples-badge{cursor:pointer}.rla-form-basic-fields .rla-form-window-type-label[data-v-04007e41] .k-tooltip p,.rla-form-basic-fields .rla-form-identifiers[data-v-04007e41] .k-tooltip p{margin:0}.rla-form-basic-fields .rla-form-error-inputs[data-v-04007e41]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.rla-form-basic-fields .rla-form-error-inputs .input-error-code[data-v-04007e41]{max-width:200px;min-width:100px;width:20%}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/forms",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "type": "module",
5
5
  "main": "./dist/forms.umd.js",
6
6
  "module": "./dist/forms.es.js",