@kong-ui-public/forms 1.3.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/forms.es.js CHANGED
@@ -5693,7 +5693,7 @@ const c0 = {
5693
5693
  this.$emit("model-updated", this.model[this.schema.model], a);
5694
5694
  }
5695
5695
  }
5696
- }, Ol = (n) => (Xn("data-v-293fe57f"), n = n(), Qn(), n), f0 = ["id"], h0 = ["data-testid"], m0 = { class: "item-wrapper" }, p0 = { class: "index-wrapper" }, g0 = /* @__PURE__ */ Ol(() => /* @__PURE__ */ I("hr", { class: "divider" }, null, -1)), v0 = { key: 0 }, _0 = { key: 1 }, y0 = ["onUpdate:modelValue", "placeholder", "onInput"], b0 = {
5696
+ }, Ol = (n) => (Xn("data-v-622b5894"), n = n(), Qn(), n), f0 = ["id"], h0 = ["data-testid"], m0 = { class: "item-wrapper" }, p0 = { class: "index-wrapper" }, g0 = /* @__PURE__ */ Ol(() => /* @__PURE__ */ I("hr", { class: "divider" }, null, -1)), v0 = { key: 0 }, _0 = { key: 1 }, y0 = ["onUpdate:modelValue", "placeholder", "onInput"], b0 = {
5697
5697
  key: 0,
5698
5698
  class: "hint"
5699
5699
  }, w0 = /* @__PURE__ */ Ol(() => /* @__PURE__ */ I("hr", { class: "wide-divider" }, null, -1)), S0 = { class: "input-item" }, C0 = ["placeholder"], T0 = {
@@ -5716,7 +5716,7 @@ function A0(n, a, s, m, f, d) {
5716
5716
  I("strong", null, ne(N), 1),
5717
5717
  I("div", null, [
5718
5718
  ue(g, {
5719
- appearance: "btn-link",
5719
+ appearance: "tertiary",
5720
5720
  class: "delete",
5721
5721
  type: "button",
5722
5722
  onClick: (se) => d.removeElement(N)
@@ -5769,7 +5769,7 @@ function A0(n, a, s, m, f, d) {
5769
5769
  [at, f.newKeyName]
5770
5770
  ]),
5771
5771
  ue(g, {
5772
- appearance: "btn-link",
5772
+ appearance: "tertiary",
5773
5773
  "data-testid": "add-key",
5774
5774
  disabled: !f.newKeyName,
5775
5775
  onClick: d.addKey
@@ -5784,7 +5784,7 @@ function A0(n, a, s, m, f, d) {
5784
5784
  ], 2)
5785
5785
  ], 10, f0);
5786
5786
  }
5787
- const $l = /* @__PURE__ */ H(c0, [["render", A0], ["__scopeId", "data-v-293fe57f"]]);
5787
+ const $l = /* @__PURE__ */ H(c0, [["render", A0], ["__scopeId", "data-v-622b5894"]]);
5788
5788
  const M0 = {
5789
5789
  name: "FieldArrayItem",
5790
5790
  props: {
@@ -5805,7 +5805,7 @@ function E0(n, a, s, m, f, d) {
5805
5805
  return b(), A("div", I0, [
5806
5806
  Zi(n.$slots, "default", {}, void 0, !0),
5807
5807
  ue(g, {
5808
- appearance: "btn-link",
5808
+ appearance: "tertiary",
5809
5809
  class: "delete",
5810
5810
  type: "button",
5811
5811
  onClick: a[0] || (a[0] = (E) => n.$emit("remove-item"))
@@ -5820,7 +5820,7 @@ function E0(n, a, s, m, f, d) {
5820
5820
  })
5821
5821
  ]);
5822
5822
  }
5823
- const kl = /* @__PURE__ */ H(M0, [["render", E0], ["__scopeId", "data-v-17a1f3c1"]]);
5823
+ const kl = /* @__PURE__ */ H(M0, [["render", E0], ["__scopeId", "data-v-b43f32dd"]]);
5824
5824
  const F0 = {
5825
5825
  name: "FieldArrayMultiItem",
5826
5826
  emits: ["remove-item"],
@@ -6257,7 +6257,7 @@ function ly(n, a, s, m, f, d) {
6257
6257
  }), null, 16, oy)) : x("", !0)
6258
6258
  ], 2))), 128)),
6259
6259
  ue(g, {
6260
- appearance: "btn-link",
6260
+ appearance: "tertiary",
6261
6261
  class: de(n.schema.newElementButtonLabelClasses),
6262
6262
  "data-testid": `add-${n.getFieldID(n.schema)}`,
6263
6263
  type: "button",
@@ -6415,7 +6415,7 @@ function Ay(n, a, s, m, f, d) {
6415
6415
  "collapsed-context": "",
6416
6416
  "data-testid": "field-multiselect",
6417
6417
  items: n.schema.values,
6418
- "label-attributes": { help: n.schema.help },
6418
+ "label-attributes": { info: n.schema.help },
6419
6419
  "model-value": n.value,
6420
6420
  placeholder: n.schema.placeholder,
6421
6421
  required: n.schema.required || void 0,
package/dist/forms.umd.js CHANGED
@@ -24,4 +24,4 @@ __p += '`),z&&(S+=`' +
24
24
  function print() { __p += __j.call(arguments, '') }
25
25
  `:`;
26
26
  `)+S+`return __p
27
- }`;var U=ua(function(){return G(c,I+"return "+S).apply(s,f)});if(U.source=S,qr(U))throw U;return U}function K0(e){return Z(e).toLowerCase()}function z0(e){return Z(e).toUpperCase()}function H0(e,t,i){if(e=Z(e),e&&(i||t===s))return ws(e);if(!e||!(t=$e(t)))return e;var o=Je(e),a=Je(t),c=vs(o,a),f=Es(o,a)+1;return At(o,c,f).join("")}function Y0(e,t,i){if(e=Z(e),e&&(i||t===s))return e.slice(0,ks(e)+1);if(!e||!(t=$e(t)))return e;var o=Je(e),a=Es(o,Je(t))+1;return At(o,0,a).join("")}function G0(e,t,i){if(e=Z(e),e&&(i||t===s))return e.replace(qi,"");if(!e||!(t=$e(t)))return e;var o=Je(e),a=vs(o,Je(t));return At(o,a).join("")}function Z0(e,t){var i=qf,o=Wf;if(re(t)){var a="separator"in t?t.separator:a;i="length"in t?x(t.length):i,o="omission"in t?$e(t.omission):o}e=Z(e);var c=e.length;if(Zt(e)){var f=Je(e);c=f.length}if(i>=c)return e;var m=i-Jt(o);if(m<1)return o;var y=f?At(f,0,m).join(""):e.slice(0,m);if(a===s)return y+o;if(f&&(m+=y.length-m),Wr(a)){if(e.slice(m).search(a)){var C,k=y;for(a.global||(a=or(a.source,Z(qo.exec(a))+"g")),a.lastIndex=0;C=a.exec(k);)var S=C.index;y=y.slice(0,S===s?m:S)}}else if(e.indexOf($e(a),m)!=m){var B=y.lastIndexOf(a);B>-1&&(y=y.slice(0,B))}return y+o}function J0(e){return e=Z(e),e&&lh.test(e)?e.replace(Uo,Sm):e}var X0=rn(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Hr=fl("toUpperCase");function ca(e,t,i){return e=Z(e),t=i?s:t,t===s?wm(e)?Mm(e):um(e):e.match(t)||[]}var ua=R(function(e,t){try{return Ne(e,s,t)}catch(i){return qr(i)?i:new D(i)}}),Q0=ft(function(e,t){return Re(t,function(i){i=ot(i),ct(e,i,Rr(e[i],e))}),e});function j0(e){var t=e==null?0:e.length,i=N();return e=t?ne(e,function(o){if(typeof o[1]!="function")throw new Pe(b);return[i(o[0]),o[1]]}):[],R(function(o){for(var a=-1;++a<t;){var c=e[a];if(Ne(c[0],this,o))return Ne(c[1],this,o)}})}function e1(e){return Sp(We(e,j))}function Yr(e){return function(){return e}}function t1(e,t){return e==null||e!==e?t:e}var n1=ml(),i1=ml(!0);function Ie(e){return e}function Gr(e){return Ks(typeof e=="function"?e:We(e,j))}function r1(e){return Hs(We(e,j))}function o1(e,t){return Ys(e,We(t,j))}var s1=R(function(e,t){return function(i){return Tn(i,e,t)}}),l1=R(function(e,t){return function(i){return Tn(e,i,t)}});function Zr(e,t,i){var o=ue(t),a=di(t,o);i==null&&!(re(t)&&(a.length||!o.length))&&(i=t,t=e,e=this,a=di(t,ue(t)));var c=!(re(i)&&"chain"in i)||!!i.chain,f=mt(e);return Re(a,function(m){var y=t[m];e[m]=y,f&&(e.prototype[m]=function(){var C=this.__chain__;if(c||C){var k=e(this.__wrapped__),S=k.__actions__=Be(this.__actions__);return S.push({func:y,args:arguments,thisArg:e}),k.__chain__=C,k}return y.apply(e,Ct([this.value()],arguments))})}),e}function a1(){return me._===this&&(me._=Om),this}function Jr(){}function d1(e){return e=x(e),R(function(t){return Gs(t,e)})}var c1=Br(ne),u1=Br(ps),f1=Br(Qi);function fa(e){return Or(e)?ji(ot(e)):qp(e)}function h1(e){return function(t){return e==null?s:Rt(e,t)}}var m1=gl(),p1=gl(!0);function Xr(){return[]}function Qr(){return!1}function g1(){return{}}function _1(){return""}function y1(){return!0}function b1(e,t){if(e=x(e),e<1||e>vt)return[];var i=nt,o=_e(e,nt);t=N(t),e-=nt;for(var a=nr(o,t);++i<e;)t(i);return a}function w1(e){return L(e)?ne(e,ot):Oe(e)?[e]:Be(Fl(Z(e)))}function v1(e){var t=++Fm;return Z(e)+t}var E1=pi(function(e,t){return e+t},0),C1=Mr("ceil"),k1=pi(function(e,t){return e/t},1),S1=Mr("floor");function T1(e){return e&&e.length?ai(e,Ie,hr):s}function B1(e,t){return e&&e.length?ai(e,N(t,2),hr):s}function M1(e){return ys(e,Ie)}function A1(e,t){return ys(e,N(t,2))}function I1(e){return e&&e.length?ai(e,Ie,_r):s}function N1(e,t){return e&&e.length?ai(e,N(t,2),_r):s}var F1=pi(function(e,t){return e*t},1),$1=Mr("round"),O1=pi(function(e,t){return e-t},0);function V1(e){return e&&e.length?tr(e,Ie):0}function D1(e,t){return e&&e.length?tr(e,N(t,2)):0}return d.after=ry,d.ary=Wl,d.assign=zy,d.assignIn=ia,d.assignInWith=Mi,d.assignWith=Hy,d.at=Yy,d.before=Kl,d.bind=Rr,d.bindAll=Q0,d.bindKey=zl,d.castArray=gy,d.chain=Rl,d.chunk=Sg,d.compact=Tg,d.concat=Bg,d.cond=j0,d.conforms=e1,d.constant=Yr,d.countBy=V_,d.create=Gy,d.curry=Hl,d.curryRight=Yl,d.debounce=Gl,d.defaults=Zy,d.defaultsDeep=Jy,d.defer=oy,d.delay=sy,d.difference=Mg,d.differenceBy=Ag,d.differenceWith=Ig,d.drop=Ng,d.dropRight=Fg,d.dropRightWhile=$g,d.dropWhile=Og,d.fill=Vg,d.filter=L_,d.flatMap=R_,d.flatMapDeep=P_,d.flatMapDepth=q_,d.flatten=Dl,d.flattenDeep=Dg,d.flattenDepth=Lg,d.flip=ly,d.flow=n1,d.flowRight=i1,d.fromPairs=xg,d.functions=i0,d.functionsIn=r0,d.groupBy=W_,d.initial=Rg,d.intersection=Pg,d.intersectionBy=qg,d.intersectionWith=Wg,d.invert=s0,d.invertBy=l0,d.invokeMap=z_,d.iteratee=Gr,d.keyBy=H_,d.keys=ue,d.keysIn=Ae,d.map=Ei,d.mapKeys=d0,d.mapValues=c0,d.matches=r1,d.matchesProperty=o1,d.memoize=ki,d.merge=u0,d.mergeWith=ra,d.method=s1,d.methodOf=l1,d.mixin=Zr,d.negate=Si,d.nthArg=d1,d.omit=f0,d.omitBy=h0,d.once=ay,d.orderBy=Y_,d.over=c1,d.overArgs=dy,d.overEvery=u1,d.overSome=f1,d.partial=Pr,d.partialRight=Zl,d.partition=G_,d.pick=m0,d.pickBy=oa,d.property=fa,d.propertyOf=h1,d.pull=Yg,d.pullAll=xl,d.pullAllBy=Gg,d.pullAllWith=Zg,d.pullAt=Jg,d.range=m1,d.rangeRight=p1,d.rearg=cy,d.reject=X_,d.remove=Xg,d.rest=uy,d.reverse=xr,d.sampleSize=j_,d.set=g0,d.setWith=_0,d.shuffle=ey,d.slice=Qg,d.sortBy=iy,d.sortedUniq=o_,d.sortedUniqBy=s_,d.split=R0,d.spread=fy,d.tail=l_,d.take=a_,d.takeRight=d_,d.takeRightWhile=c_,d.takeWhile=u_,d.tap=T_,d.throttle=hy,d.thru=vi,d.toArray=ea,d.toPairs=sa,d.toPairsIn=la,d.toPath=w1,d.toPlainObject=na,d.transform=y0,d.unary=my,d.union=f_,d.unionBy=h_,d.unionWith=m_,d.uniq=p_,d.uniqBy=g_,d.uniqWith=__,d.unset=b0,d.unzip=Ur,d.unzipWith=Ul,d.update=w0,d.updateWith=v0,d.values=ln,d.valuesIn=E0,d.without=y_,d.words=ca,d.wrap=py,d.xor=b_,d.xorBy=w_,d.xorWith=v_,d.zip=E_,d.zipObject=C_,d.zipObjectDeep=k_,d.zipWith=S_,d.entries=sa,d.entriesIn=la,d.extend=ia,d.extendWith=Mi,Zr(d,d),d.add=E1,d.attempt=ua,d.camelCase=T0,d.capitalize=aa,d.ceil=C1,d.clamp=C0,d.clone=_y,d.cloneDeep=by,d.cloneDeepWith=wy,d.cloneWith=yy,d.conformsTo=vy,d.deburr=da,d.defaultTo=t1,d.divide=k1,d.endsWith=B0,d.eq=Qe,d.escape=M0,d.escapeRegExp=A0,d.every=D_,d.find=x_,d.findIndex=Ol,d.findKey=Xy,d.findLast=U_,d.findLastIndex=Vl,d.findLastKey=Qy,d.floor=S1,d.forEach=Pl,d.forEachRight=ql,d.forIn=jy,d.forInRight=e0,d.forOwn=t0,d.forOwnRight=n0,d.get=Kr,d.gt=Ey,d.gte=Cy,d.has=o0,d.hasIn=zr,d.head=Ll,d.identity=Ie,d.includes=K_,d.indexOf=Ug,d.inRange=k0,d.invoke=a0,d.isArguments=Wt,d.isArray=L,d.isArrayBuffer=ky,d.isArrayLike=Me,d.isArrayLikeObject=se,d.isBoolean=Sy,d.isBuffer=It,d.isDate=Ty,d.isElement=By,d.isEmpty=My,d.isEqual=Ay,d.isEqualWith=Iy,d.isError=qr,d.isFinite=Ny,d.isFunction=mt,d.isInteger=Jl,d.isLength=Ti,d.isMap=Xl,d.isMatch=Fy,d.isMatchWith=$y,d.isNaN=Oy,d.isNative=Vy,d.isNil=Ly,d.isNull=Dy,d.isNumber=Ql,d.isObject=re,d.isObjectLike=oe,d.isPlainObject=Fn,d.isRegExp=Wr,d.isSafeInteger=xy,d.isSet=jl,d.isString=Bi,d.isSymbol=Oe,d.isTypedArray=sn,d.isUndefined=Uy,d.isWeakMap=Ry,d.isWeakSet=Py,d.join=Kg,d.kebabCase=I0,d.last=ze,d.lastIndexOf=zg,d.lowerCase=N0,d.lowerFirst=F0,d.lt=qy,d.lte=Wy,d.max=T1,d.maxBy=B1,d.mean=M1,d.meanBy=A1,d.min=I1,d.minBy=N1,d.stubArray=Xr,d.stubFalse=Qr,d.stubObject=g1,d.stubString=_1,d.stubTrue=y1,d.multiply=F1,d.nth=Hg,d.noConflict=a1,d.noop=Jr,d.now=Ci,d.pad=$0,d.padEnd=O0,d.padStart=V0,d.parseInt=D0,d.random=S0,d.reduce=Z_,d.reduceRight=J_,d.repeat=L0,d.replace=x0,d.result=p0,d.round=$1,d.runInContext=g,d.sample=Q_,d.size=ty,d.snakeCase=U0,d.some=ny,d.sortedIndex=jg,d.sortedIndexBy=e_,d.sortedIndexOf=t_,d.sortedLastIndex=n_,d.sortedLastIndexBy=i_,d.sortedLastIndexOf=r_,d.startCase=P0,d.startsWith=q0,d.subtract=O1,d.sum=V1,d.sumBy=D1,d.template=W0,d.times=b1,d.toFinite=pt,d.toInteger=x,d.toLength=ta,d.toLower=K0,d.toNumber=He,d.toSafeInteger=Ky,d.toString=Z,d.toUpper=z0,d.trim=H0,d.trimEnd=Y0,d.trimStart=G0,d.truncate=Z0,d.unescape=J0,d.uniqueId=v1,d.upperCase=X0,d.upperFirst=Hr,d.each=Pl,d.eachRight=ql,d.first=Ll,Zr(d,function(){var e={};return it(d,function(t,i){X.call(d.prototype,i)||(e[i]=t)}),e}(),{chain:!1}),d.VERSION=p,Re(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Re(["drop","take"],function(e,t){W.prototype[e]=function(i){i=i===s?1:de(x(i),0);var o=this.__filtered__&&!t?new W(this):this.clone();return o.__filtered__?o.__takeCount__=_e(i,o.__takeCount__):o.__views__.push({size:_e(i,nt),type:e+(o.__dir__<0?"Right":"")}),o},W.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),Re(["filter","map","takeWhile"],function(e,t){var i=t+1,o=i==Do||i==Yf;W.prototype[e]=function(a){var c=this.clone();return c.__iteratees__.push({iteratee:N(a,3),type:i}),c.__filtered__=c.__filtered__||o,c}}),Re(["head","last"],function(e,t){var i="take"+(t?"Right":"");W.prototype[e]=function(){return this[i](1).value()[0]}}),Re(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");W.prototype[e]=function(){return this.__filtered__?new W(this):this[i](1)}}),W.prototype.compact=function(){return this.filter(Ie)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=R(function(e,t){return typeof e=="function"?new W(this):this.map(function(i){return Tn(i,e,t)})}),W.prototype.reject=function(e){return this.filter(Si(N(e)))},W.prototype.slice=function(e,t){e=x(e);var i=this;return i.__filtered__&&(e>0||t<0)?new W(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==s&&(t=x(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(nt)},it(W.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=d[o?"take"+(t=="last"?"Right":""):t],c=o||/^find/.test(t);a&&(d.prototype[t]=function(){var f=this.__wrapped__,m=o?[1]:arguments,y=f instanceof W,C=m[0],k=y||L(f),S=function(q){var z=a.apply(d,Ct([q],m));return o&&B?z[0]:z};k&&i&&typeof C=="function"&&C.length!=1&&(y=k=!1);var B=this.__chain__,I=!!this.__actions__.length,F=c&&!B,U=y&&!I;if(!c&&k){f=U?f:new W(this);var O=e.apply(f,m);return O.__actions__.push({func:vi,args:[S],thisArg:s}),new qe(O,B)}return F&&U?e.apply(this,m):(O=this.thru(S),F?o?O.value()[0]:O.value():O)})}),Re(["pop","push","shift","sort","splice","unshift"],function(e){var t=Yn[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var a=arguments;if(o&&!this.__chain__){var c=this.value();return t.apply(L(c)?c:[],a)}return this[i](function(f){return t.apply(L(f)?f:[],a)})}}),it(W.prototype,function(e,t){var i=d[t];if(i){var o=i.name+"";X.call(en,o)||(en[o]=[]),en[o].push({name:t,func:i})}}),en[mi(s,K).name]=[{name:"wrapper",func:s}],W.prototype.clone=Jm,W.prototype.reverse=Xm,W.prototype.value=Qm,d.prototype.at=B_,d.prototype.chain=M_,d.prototype.commit=A_,d.prototype.next=I_,d.prototype.plant=F_,d.prototype.reverse=$_,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=O_,d.prototype.first=d.prototype.head,bn&&(d.prototype[bn]=N_),d},Xt=Am();Vt?((Vt.exports=Xt)._=Xt,Gi._=Xt):me._=Xt}).call(an)}($n,$n.exports);var v=$n.exports;const eo={methods:{getFieldRowClasses(n){const l=this.fieldErrors(n).length>0,s={[v.get(this.options,"validationErrorClass","error")]:l,[v.get(this.options,"validationSuccessClass","valid")]:!l,disabled:this.fieldDisabled(n),readonly:this.fieldReadonly(n),featured:this.fieldFeatured(n),required:this.fieldRequired(n)};return v.isArray(n.styleClasses)?v.forEach(n.styleClasses,p=>s[p]=!0):v.isString(n.styleClasses)&&(s[n.styleClasses]=!0),v.isNil(n.type)||(s["field-"+n.type]=!0),s},fieldErrors(n){return this.errors.filter(s=>s.field.fieldName===n.fieldName).map(s=>s.error)},fieldDisabled(n){return v.isFunction(n.disabled)?n.disabled.call(this,this.model,n,this):v.isNil(n.disabled)?!1:n.disabled},fieldReadonly(n){return v.isFunction(n.readonly)?n.readonly.call(this,this.model,n,this):v.isNil(n.readonly)?!1:n.readonly},fieldFeatured(n){return v.isFunction(n.featured)?n.featured.call(this,this.model,n,this):v.isNil(n.featured)?!1:n.featured},fieldRequired(n){return v.isFunction(n.required)?n.required.call(this,this.model,n,this):v.isNil(n.required)?!1:n.required}}},to=(n,l="")=>typeof n.id<"u"?l+n.id:l+(n.inputName||n.label||n.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),no=(n="")=>n.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var io=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,_t="\\d\\d?",yt="\\d\\d",ma="\\d{3}",pa="\\d{4}",dn="[^\\s]+",ro=/\[([^]*?)\]/gm;function oo(n,l){for(var s=[],p=0,h=n.length;p<h;p++)s.push(n[p].substr(0,l));return s}var so=function(n){return function(l,s){var p=s[n].map(function(u){return u.toLowerCase()}),h=p.indexOf(l.toLowerCase());return h>-1?h:null}};function Nt(n){for(var l=[],s=1;s<arguments.length;s++)l[s-1]=arguments[s];for(var p=0,h=l;p<h.length;p++){var u=h[p];for(var b in u)n[b]=u[b]}return n}var lo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ao=["January","February","March","April","May","June","July","August","September","October","November","December"],ga=oo(ao,3),_a=oo(lo,3),co={dayNamesShort:_a,dayNames:lo,monthNamesShort:ga,monthNames:ao,amPm:["am","pm"],DoFn:function(n){return n+["th","st","nd","rd"][n%10>3?0:(n-n%10!==10?1:0)*n%10]}},On=Nt({},co),ya=function(n){return On=Nt(On,n)},uo=function(n){return n.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Se=function(n,l){for(l===void 0&&(l=2),n=String(n);n.length<l;)n="0"+n;return n},ba={D:function(n){return String(n.getDate())},DD:function(n){return Se(n.getDate())},Do:function(n,l){return l.DoFn(n.getDate())},d:function(n){return String(n.getDay())},dd:function(n){return Se(n.getDay())},ddd:function(n,l){return l.dayNamesShort[n.getDay()]},dddd:function(n,l){return l.dayNames[n.getDay()]},M:function(n){return String(n.getMonth()+1)},MM:function(n){return Se(n.getMonth()+1)},MMM:function(n,l){return l.monthNamesShort[n.getMonth()]},MMMM:function(n,l){return l.monthNames[n.getMonth()]},YY:function(n){return Se(String(n.getFullYear()),4).substr(2)},YYYY:function(n){return Se(n.getFullYear(),4)},h:function(n){return String(n.getHours()%12||12)},hh:function(n){return Se(n.getHours()%12||12)},H:function(n){return String(n.getHours())},HH:function(n){return Se(n.getHours())},m:function(n){return String(n.getMinutes())},mm:function(n){return Se(n.getMinutes())},s:function(n){return String(n.getSeconds())},ss:function(n){return Se(n.getSeconds())},S:function(n){return String(Math.round(n.getMilliseconds()/100))},SS:function(n){return Se(Math.round(n.getMilliseconds()/10),2)},SSS:function(n){return Se(n.getMilliseconds(),3)},a:function(n,l){return n.getHours()<12?l.amPm[0]:l.amPm[1]},A:function(n,l){return n.getHours()<12?l.amPm[0].toUpperCase():l.amPm[1].toUpperCase()},ZZ:function(n){var l=n.getTimezoneOffset();return(l>0?"-":"+")+Se(Math.floor(Math.abs(l)/60)*100+Math.abs(l)%60,4)},Z:function(n){var l=n.getTimezoneOffset();return(l>0?"-":"+")+Se(Math.floor(Math.abs(l)/60),2)+":"+Se(Math.abs(l)%60,2)}},fo=function(n){return+n-1},ho=[null,_t],mo=[null,dn],po=["isPm",dn,function(n,l){var s=n.toLowerCase();return s===l.amPm[0]?0:s===l.amPm[1]?1:null}],go=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(n){var l=(n+"").match(/([+-]|\d\d)/gi);if(l){var s=+l[1]*60+parseInt(l[2],10);return l[0]==="+"?s:-s}return 0}],wa={D:["day",_t],DD:["day",yt],Do:["day",_t+dn,function(n){return parseInt(n,10)}],M:["month",_t,fo],MM:["month",yt,fo],YY:["year",yt,function(n){var l=new Date,s=+(""+l.getFullYear()).substr(0,2);return+(""+(+n>68?s-1:s)+n)}],h:["hour",_t,void 0,"isPm"],hh:["hour",yt,void 0,"isPm"],H:["hour",_t],HH:["hour",yt],m:["minute",_t],mm:["minute",yt],s:["second",_t],ss:["second",yt],YYYY:["year",pa],S:["millisecond","\\d",function(n){return+n*100}],SS:["millisecond",yt,function(n){return+n*10}],SSS:["millisecond",ma],d:ho,dd:ho,ddd:mo,dddd:mo,MMM:["month",dn,so("monthNamesShort")],MMMM:["month",dn,so("monthNames")],a:po,A:po,ZZ:go,Z:go},Vn={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"},va=function(n){return Nt(Vn,n)},Ea=function(n,l,s){if(l===void 0&&(l=Vn.default),s===void 0&&(s={}),typeof n=="number"&&(n=new Date(n)),Object.prototype.toString.call(n)!=="[object Date]"||isNaN(n.getTime()))throw new Error("Invalid Date pass to format");l=Vn[l]||l;var p=[];l=l.replace(ro,function(u,b){return p.push(b),"@@@"});var h=Nt(Nt({},On),s);return l=l.replace(io,function(u){return ba[u](n,h)}),l.replace(/@@@/g,function(){return p.shift()})};function Ca(n,l,s){if(s===void 0&&(s={}),typeof l!="string")throw new Error("Invalid format in fecha parse");if(l=Vn[l]||l,n.length>1e3)return null;var p=new Date,h={year:p.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},u=[],b=[],_=l.replace(ro,function(Te,he){return b.push(uo(he)),"@@@"}),T={},A={};_=uo(_).replace(io,function(Te){var he=wa[Te],tt=he[0],Ye=he[1],wt=he[3];if(T[tt])throw new Error("Invalid format. "+tt+" specified twice in format");return T[tt]=!0,wt&&(A[wt]=!0),u.push(he),"("+Ye+")"}),Object.keys(A).forEach(function(Te){if(!T[Te])throw new Error("Invalid format. "+Te+" is required in specified format")}),_=_.replace(/@@@/g,function(){return b.shift()});var V=n.match(new RegExp(_,"i"));if(!V)return null;for(var j=Nt(Nt({},On),s),J=1;J<V.length;J++){var we=u[J-1],et=we[0],st=we[2],fe=st?st(V[J],j):+V[J];if(fe==null)return null;h[et]=fe}h.isPm===1&&h.hour!=null&&+h.hour!=12?h.hour=+h.hour+12:h.isPm===0&&+h.hour==12&&(h.hour=0);var K;if(h.timezoneOffset==null){K=new Date(h.year,h.month,h.day,h.hour,h.minute,h.second,h.millisecond);for(var Y=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],J=0,ce=Y.length;J<ce;J++)if(T[Y[J][0]]&&h[Y[J][0]]!==K[Y[J][1]]())return null}else if(K=new Date(Date.UTC(h.year,h.month,h.day,h.hour,h.minute-h.timezoneOffset,h.second,h.millisecond)),h.month>11||h.month<0||h.day>31||h.day<1||h.hour>23||h.hour<0||h.minute>59||h.minute<0||h.second>59||h.second<0)return null;return K}var Le={format:Ea,parse:Ca,defaultI18n:co,setGlobalDateI18n:ya,setGlobalDateMasks:va};const ge={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 xe(n,l,s=ge){return v.isNil(n)||n===""?l?[ie(s.fieldIsRequired)]:[]:null}function ie(n,...l){if(n!=null&&l.length>0)for(let s=0;s<l.length;s++)n=n.replace("{"+(s-1)+"}",l[s]);return n}const cn={resources:ge,required(n,l,s,p=ge){return xe(n,l.required,p)},number(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=[];return v.isFinite(n)?(!v.isNil(l.min)&&n<l.min&&u.push(ie(p.numberTooSmall,l.min)),!v.isNil(l.max)&&n>l.max&&u.push(ie(p.numberTooBig,l.max))):u.push(ie(p.invalidNumber)),u},integer(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=cn.number(n,l,s,p);return v.isInteger(n)||u.push(ie(p.invalidInteger)),u},double(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!v.isNumber(n)||isNaN(n))return[ie(p.invalidNumber)]},string(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=[];return v.isString(n)?(!v.isNil(l.min)&&n.length<l.min&&u.push(ie(p.textTooSmall,n.length,l.min)),!v.isNil(l.max)&&n.length>l.max&&u.push(ie(p.textTooBig,n.length,l.max))):u.push(ie(p.thisNotText)),u},array(n,l,s,p=ge){if(l.required){if(!v.isArray(n))return[ie(p.thisNotArray)];if(n.length===0)return[ie(p.fieldIsRequired)]}if(!v.isNil(n)){if(!v.isNil(l.min)&&n.length<l.min)return[ie(p.selectMinItems,l.min)];if(!v.isNil(l.max)&&n.length>l.max)return[ie(p.selectMaxItems,l.max)]}},date(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=new Date(n);if(isNaN(u.getDate()))return[ie(p.invalidDate)];const b=[];if(!v.isNil(l.min)){const _=new Date(l.min);u.valueOf()<_.valueOf()&&b.push(ie(p.dateIsEarly,Le.format(u),Le.format(_)))}if(!v.isNil(l.max)){const _=new Date(l.max);u.valueOf()>_.valueOf()&&b.push(ie(p.dateIsLate,Le.format(u),Le.format(_)))}return b},regexp(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!v.isNil(l.pattern)&&!new RegExp(l.pattern).test(n))return[ie(p.invalidFormat)]},email(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;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(n))return[ie(p.invalidEmail)]},url(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(n))return[ie(p.invalidURL)]},creditCard(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=/^(?: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})$/,b=n.replace(/[^0-9]+/g,"");if(!u.test(b))return[ie(p.invalidCard)];let _=0,T,A,V;for(let j=b.length-1;j>=0;j--)T=b.substring(j,j+1),A=parseInt(T,10),V?(A*=2,A>=10?_+=A%10+1:_+=A):_+=A,V=!V;if(!(_%10===0&&b))return[ie(p.invalidCardNumber)]},alpha(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!/^[a-zA-Z]*$/.test(n))return[ie(p.invalidTextContainNumber)]},alphaNumeric(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!/^[a-zA-Z0-9]*$/.test(n))return[ie(p.invalidTextContainSpec)]}};Object.keys(cn).forEach(n=>{const l=cn[n];v.isFunction(l)&&(l.locale=s=>(p,h,u)=>l(p,h,u,v.defaults(s,ge)))});function _o(n){return v.isString(n)?cn[n]!=null?cn[n]:(console.warn(`'${n}' is not a validator function!`),null):n}function Ai(n,l,s){let p=v.get(s.context,"schema.attributes",{});const h=l.value||"input";v.isString(h)&&(p=v.get(p,h)||p),v.forEach(p,(u,b)=>{n.setAttribute(b,u)})}const H={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:Ai,updated:Ai,componentUpdated:Ai}},computed:{value:{cache:!1,get(){let n;return v.isFunction(v.get(this.schema,"get"))?n=this.schema.get(this.model):n=v.get(this.model,this.schema.model),this.formatValueToField(n)},set(n){const l=this.value;n=this.formatValueToModel(n),v.isFunction(n)?n(n,l):this.updateModelValue(n,l)}}},methods:{validate(n){this.clearValidationErrors();const l=v.get(this.formOptions,"validateAsync",!1);let s=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const h=[];v.isArray(this.schema.validator)?v.forEach(this.schema.validator,u=>{h.push(_o(u).bind(this))}):h.push(_o(this.schema.validator).bind(this)),v.forEach(h,u=>{if(l)s.push(u(this.value,this.schema,this.model));else{const b=u(this.value,this.schema,this.model);b&&v.isFunction(b.then)?b.then(_=>{_&&(this.errors=this.errors.concat(_));const T=this.errors.length===0;this.$emit("validated",T,this.errors,this)}):b&&(s=s.concat(b))}})}const p=h=>{let u=[];v.forEach(v.uniq(h),_=>{v.isArray(_)&&_.length>0?u=u.concat(_):v.isString(_)&&u.push(_)}),v.isFunction(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,u,this.schema);const b=u.length===0;return n||this.$emit("validated",b,u,this),this.errors=u,u};return l?Promise.all(s).then(p):p(s)},debouncedValidate(){v.isFunction(this.debouncedValidateFunc)||(this.debouncedValidateFunc=v.debounce(this.validate.bind(this),v.get(this.schema,"validateDebounceTime",v.get(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(n,l){let s=!1;v.isFunction(this.schema.set)?(this.schema.set(this.model,n),s=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,n),s=!0),s&&(this.$emit("modelUpdated",n,this.schema.model),v.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,n,l,this.schema),v.get(this.formOptions,"validateAfterChanged",!1)===!0&&(v.get(this.schema,"validateDebounceTime",v.get(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(n,l){let s=n.replace(/\[(\w+)\]/g,".$1");s=s.replace(/^\./,"");let p=this.model;const h=s.split(".");let u=0;const b=h.length;for(;u<b;){const _=h[u];if(u<b-1)p[_]!==void 0||(p[_]={}),p=p[_];else{p[_]=l;return}++u}},getFieldID(n,l=!1){const s=v.get(this.formOptions,"fieldIdPrefix","");return to(n,s)+(l?"-"+v.uniqueId():"")},getFieldClasses(){return v.get(this.schema,"fieldClasses",[])},formatValueToField(n){return n},formatValueToModel(n){return n}}},ka=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),Sa={mixins:[H]},Ta=["id","autocomplete","disabled","name","required"];function Ba(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("input",{id:n.getFieldID(n.schema),type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=_=>n.value=_),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,name:n.schema.inputName,class:r.normalizeClass(n.schema.fieldClasses),required:n.schema.required},null,10,Ta)),[[r.vModelCheckbox,n.value],[b,"input"]])}const L1="",P=(n,l)=>{const s=n.__vccOpts||n;for(const[p,h]of l)s[p]=h;return s},Ma=P(Sa,[["render",Ba]]),Aa={class:"wrapper"},Ia=["disabled"],Na=["id","checked","disabled","onChange","name"],Fa=["disabled"],$a={class:"info"},Oa=r.createElementVNode("div",{class:"arrow"},null,-1),Va={class:"dropList"},Da=["id","checked","disabled","onChange","name"];function La(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",Aa,[n.schema.listBox?(r.openBlock(),r.createElementBlock("div",{key:0,class:"listbox form-control",disabled:n.disabled||null},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,_=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["list-row",{"is-checked":u.isItemChecked(_)}])},[r.createElementVNode("label",null,[r.withDirectives(r.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"checkbox",checked:u.isItemChecked(_)||null,disabled:n.disabled||null,onChange:T=>u.onChanged(T,_),name:u.getInputName(_)},null,40,Na),[[b,"input"]]),r.createTextVNode(r.toDisplayString(u.getItemName(_)),1)])],2))),256))],8,Ia)):r.createCommentVNode("",!0),n.schema.listBox?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:1,class:"combobox form-control",disabled:n.disabled||null},[r.createElementVNode("div",{class:r.normalizeClass(["mainRow",{expanded:h.comboExpanded}]),onClick:l[0]||(l[0]=(..._)=>u.onExpandCombo&&u.onExpandCombo(..._))},[r.createElementVNode("div",$a,r.toDisplayString(u.selectedCount)+" selected",1),Oa],2),r.createElementVNode("div",Va,[h.comboExpanded?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(u.items,_=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["list-row",{"is-checked":u.isItemChecked(_)}])},[r.createElementVNode("label",null,[r.withDirectives(r.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"checkbox",checked:u.isItemChecked(_)||null,disabled:n.disabled||null,onChange:T=>u.onChanged(T,_),name:u.getInputName(_)},null,40,Da),[[b,"input"]]),r.createTextVNode(r.toDisplayString(u.getItemName(_)),1)])],2))),256)):r.createCommentVNode("",!0)])],8,Fa))])),[[b,"wrapper"]])}const x1="",xa=P({mixins:[H],data(){return{comboExpanded:!1}},computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(n){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?no(this.schema.inputName+"_"+this.getItemValue(n)):no(this.getItemValue(n))},getItemValue(n){if(v.isObject(n)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return n[this.schema.checklistOptions.value];if(typeof n.value<"u")return n.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 n},getItemName(n){if(v.isObject(n)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return n[this.schema.checklistOptions.name];if(typeof n.name<"u")return n.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 n},isItemChecked(n){return this.value&&this.value.indexOf(this.getItemValue(n))!==-1},onChanged(n,l){if((v.isNil(this.value)||!Array.isArray(this.value))&&(this.value=[]),n.target.checked){const s=v.clone(this.value);s.push(this.getItemValue(l)),this.value=s}else{const s=v.clone(this.value);s.splice(this.value.indexOf(this.getItemValue(l)),1),this.value=s}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",La]]),Ua={class:"wrapper"},Ra=["id","type","value","disabled","accept","alt","autocomplete","checked","dirname","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","width","files"],Pa={key:0,class:"helper"};function qa(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",Ua,[r.withDirectives(r.createElementVNode("input",{class:r.normalizeClass(["form-control",n.schema.fieldClasses]),id:n.getFieldID(n.schema),type:u.inputType,value:n.value,onInput:l[0]||(l[0]=(..._)=>u.onInput&&u.onInput(..._)),onBlur:l[1]||(l[1]=(..._)=>u.onBlur&&u.onBlur(..._)),onChange:l[2]||(l[2]=(..._)=>n.schema.onChange&&n.schema.onChange(..._)),disabled:n.disabled||null,accept:n.schema.accept,alt:n.schema.alt,autocomplete:n.schema.autocomplete,checked:n.schema.checked||null,dirname:n.schema.dirname,formaction:n.schema.formaction,formenctype:n.schema.formenctype,formmethod:n.schema.formmethod,formnovalidate:n.schema.formnovalidate,formtarget:n.schema.formtarget,height:n.schema.height,list:n.schema.list,max:n.schema.max,maxlength:n.schema.maxlength,min:n.schema.min,minlength:n.schema.minlength,multiple:n.schema.multiple,name:n.schema.inputName,pattern:n.schema.pattern,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,size:n.schema&&n.schema.size>0?n.schema.size:1,src:n.schema.src,step:n.schema.step,width:n.schema.width,files:n.schema.files},null,42,Ra),[[b,"input"]]),n.schema.inputType.toLowerCase()==="color"||n.schema.inputType.toLowerCase()==="range"?(r.openBlock(),r.createElementBlock("span",Pa,r.toDisplayString(n.value),1)):r.createCommentVNode("",!0)])),[[b,"wrapper"]])}const R1="",yo={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},Wa=P({mixins:[H],computed:{inputType(){return this.schema&&this.schema.inputType==="datetime"?"datetime-local":this.schema.inputType}},mounted(){switch(this.schema.inputType.toLowerCase()){case"number":case"range":this.debouncedFormatFunc=v.debounce((n,l)=>{this.formatNumberToModel(n,l)},parseInt(v.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":this.debouncedFormatFunc=v.debounce((n,l)=>{this.formatDatetimeToModel(n,l)},parseInt(v.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}},created(){this.schema.inputType.toLowerCase()==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")},methods:{formatValueToModel(n){if(n!=null)switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":case"number":case"range":return(l,s)=>{this.debouncedFormatFunc(n,s)}}return n},formatValueToField(n){switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":return this.formatDatetimeValueToField(n)}return n},formatDatetimeToModel(n,l){const s=yo[this.schema.inputType.toLowerCase()],p=Le.parse(n,s);p!==!1&&(this.schema.format?n=Le.format(p,this.schema.format):n=p.valueOf()),this.updateModelValue(n,l)},formatDatetimeValueToField(n){if(n==null)return null;const l=yo[this.schema.inputType.toLowerCase()];let s=n;return v.isNumber(n)||(s=Le.parse(n,l)),s!==!1?Le.format(s,l):n},formatNumberToModel(n,l){v.isNumber(n)||(n=NaN),this.updateModelValue(n,l)},onInput(n){let l=n.target.value;switch(this.schema.inputType.toLowerCase()){case"number":case"range":v.isNumber(parseFloat(n.target.value))&&(l=parseFloat(n.target.value));break}this.value=l},onBlur(){v.isFunction(this.debouncedFormatFunc)&&this.debouncedFormatFunc.flush()}}},[["render",qa]]),Ka=["id"];function za(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("span",{id:n.getFieldID(n.schema),class:r.normalizeClass(n.schema.fieldClasses)},[r.createTextVNode(r.toDisplayString(n.value),1)],10,Ka)),[[b,"label"]])}const q1="",Ha=P({mixins:[H]},[["render",za]]),Ya=["disabled"],Ga=["id","disabled","name","onClick","value","checked","required"];function Za(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"radio-list",disabled:n.disabled||null},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,_=>r.withDirectives((r.openBlock(),r.createElementBlock("label",{class:r.normalizeClass(u.getItemCssClasses(_))},[r.withDirectives(r.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"radio",disabled:u.isItemDisabled(_)||null,name:u.id,onClick:T=>u.onSelection(_),value:u.getItemValue(_),checked:u.isItemChecked(_)||null,class:r.normalizeClass(n.schema.fieldClasses),required:n.schema.required},null,10,Ga),[[b,"input"]]),r.createTextVNode(r.toDisplayString(u.getItemName(_)),1)],2)),[[b,"label"]])),256))],8,Ya)),[[b,"wrapper"]])}const K1="",Ja=P({mixins:[H],computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n},id(){return this.schema.model}},methods:{getItemValue(n){if(v.isObject(n)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.value<"u")return n[this.schema.radiosOptions.value];if(typeof n.value<"u")return n.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 n},getItemName(n){if(v.isObject(n)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.name<"u")return n[this.schema.radiosOptions.name];if(typeof n.name<"u")return n.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 n},getItemCssClasses(n){return{"is-checked":this.isItemChecked(n),"is-disabled":this.isItemDisabled(n)}},onSelection(n){this.value=this.getItemValue(n)},isItemChecked(n){return this.getItemValue(n)===this.value},isItemDisabled(n){if(this.disabled)return!0;const l=v.get(n,"disabled",!1);return v.isFunction(l)?l(this.model):l}}},[["render",Za]]),Xa=["disabled","name","id"],Qa=["disabled"],ja=["label"],ed=["value"],td=["value"];function nd(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("select",{class:r.normalizeClass(["form-control",n.schema.fieldClasses]),"onUpdate:modelValue":l[0]||(l[0]=_=>n.value=_),disabled:n.disabled||null,name:n.schema.inputName,id:n.getFieldID(n.schema)},[u.selectOptions.hideNoneSelectedText?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("option",{key:0,disabled:n.schema.required||null,value:null},r.toDisplayString(u.selectOptions.noneSelectedText||"<Nothing selected>"),9,Qa)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,_=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[_.group?(r.openBlock(),r.createElementBlock("optgroup",{key:0,label:u.getGroupName(_)},[_.ops?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(_.ops,T=>(r.openBlock(),r.createElementBlock("option",{value:u.getItemValue(T)},r.toDisplayString(u.getItemName(T)),9,ed))),256)):r.createCommentVNode("",!0)],8,ja)):r.createCommentVNode("",!0),_.group?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("option",{key:1,value:u.getItemValue(_)},r.toDisplayString(u.getItemName(_)),9,td))],64))),256))],10,Xa)),[[r.vModelSelect,n.value],[b,"input"]])}const bo=P({mixins:[H],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const n=this.schema.values;return typeof n=="function"?this.groupValues(n.apply(this,[this.model,this.schema])):this.groupValues(n)}},methods:{formatValueToField(n){return v.isNil(n)?null:n},groupValues(n){const l=[];let s={};return n.forEach(p=>{s=null,p.group&&v.isObject(p)?(s=v.find(l,h=>h.group===p.group),s?s.ops.push({id:p.id,name:p.name}):(s={group:"",ops:[]},s.group=p.group,s.ops.push({id:p.id,name:p.name}),l.push(s))):l.push(p)}),l},getGroupName(n){if(n&&n.group)return n.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(n){if(v.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return n[this.schema.selectOptions.value];if(typeof n.id<"u")return n.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 n},getItemName(n){if(v.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return n[this.schema.selectOptions.name];if(typeof n.name<"u")return n.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 n}}},[["render",nd]]),id=["id","value","name","disabled"];function rd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("input",{id:n.getFieldID(n.schema),type:"submit",value:n.schema.buttonText,onClick:l[0]||(l[0]=(...b)=>u.onClick&&u.onClick(...b)),name:n.schema.inputName,disabled:n.disabled||null,class:r.normalizeClass(n.schema.fieldClasses)},null,10,id)}const Y1="",od=P({mixins:[H],methods:{onClick(n){if(this.schema.validateBeforeSubmit===!0){n.preventDefault();const l=v.get(this.formOptions,"validateAsync",!1),s=this.vfg.validate(),p=h=>{l&&!v.isEmpty(h)||!l&&!h?v.isFunction(this.schema.onValidationError)&&this.schema.onValidationError(this.model,this.schema,h,n):v.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,n)};s&&v.isFunction(s.then)?s.then(p):p(s)}else v.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,n)}}},[["render",rd]]),sd=["id","disabled","maxlength","minlength","placeholder","readonly","required","rows","name"];function ld(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("textarea",{class:r.normalizeClass(["form-control",n.schema.fieldClasses]),"onUpdate:modelValue":l[0]||(l[0]=_=>n.value=_),id:n.getFieldID(n.schema),disabled:n.disabled||null,maxlength:n.schema.max,minlength:n.schema.min,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,rows:n.schema.rows||2,name:n.schema.inputName},null,10,sd)),[[r.vModelText,n.value],[b,"input"]])}const wo=P({mixins:[H]},[["render",ld]]),ad={class:"wrapper"},dd=["id","name","accept","multiple","placeholder","readonly","required","disabled"];function cd(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",ad,[r.withDirectives(r.createElementVNode("input",{class:"form-control",id:n.getFieldID(n.schema),type:"file",name:n.schema.inputName,onChange:l[0]||(l[0]=(..._)=>u.onChange&&u.onChange(..._)),accept:n.schema.accept,multiple:n.schema.multiple,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,disabled:n.disabled||null},null,40,dd),[[b,"input"]])])),[[b,"wrapper"]])}const J1="",ud=P({mixins:[H],methods:{onChange(n){v.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,n,this)}}},[["render",cd]]),fd=["value","autocomplete","disabled","placeholder","readonly","name","id"];function hd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("input",{class:"form-control",type:"text",value:n.value,autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,fd)}const md=P({mixins:[H],data(){return{cleave:null}},mounted(){this.$nextTick(function(){window.Cleave?(this.cleave=new window.Cleave(this.$el,v.defaults(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",hd]]),vo={formatValueToField(n){if(n!=null){const l=this.schema.format?Le.parse(n,this.schema.format):new Date(n);return Le.format(l,this.getDateFormat())}return n},formatValueToModel(n){if(n!=null){const l=Le.parse(n,this.getDateFormat());this.schema.format?n=Le.format(l,this.schema.format):n=l.valueOf()}return n}},pd={class:"input-group date"},gd=["autocomplete","disabled","placeholder","readonly","name","id"],_d=r.createElementVNode("span",{class:"input-group-addon"},[r.createElementVNode("span",{class:"glyphicon glyphicon-calendar"})],-1);function yd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",pd,[r.withDirectives(r.createElementVNode("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,gd),[[r.vModelText,n.value]]),_d])}const Eo="YYYY-MM-DD HH:mm:ss",bd={mixins:[H],mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.datetimepicker){const n=this.$el.querySelector(".form-control");$(this.$el).datetimepicker(v.defaults(this.schema.dateTimePickerOptions||{},{format:Eo})).on("dp.change",()=>{this.value=n.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:Eo},...vo}},wd=P(bd,[["render",yd]]),vd=["autocomplete","disabled","placeholder","readonly","name","id"];function Ed(n,l,s,p,h,u){return r.withDirectives((r.openBlock(),r.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,debounce:"500",onFocus:l[1]||(l[1]=b=>u.geolocate()),id:n.getFieldID(n.schema)},null,40,vd)),[[r.vModelText,n.value]])}const Cd=P({mixins:[H],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 n=this.autocomplete.getPlace();if(n){this.value=n.formatted_address;const l={};if(n.address_components!==void 0)for(let s=0;s<n.address_components.length;s++){const p=n.address_components[s].types[0];this.inputs[p]&&(l[p]=n.address_components[s][this.inputs[p]])}v.isFunction(this.schema.onPlaceChanged)&&this.schema.onPlaceChanged(this.value,l,n,this.model,this.schema)}},geolocate(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(n=>{const l={lat:n.coords.latitude,lng:n.coords.longitude},s=new window.google.maps.Circle({center:l,radius:n.coords.accuracy});this.autocomplete.setBounds(s.getBounds())})}}},[["render",Ed]]),kd={class:"wrapper"},Sd=["autocomplete","disabled","placeholder","readonly"],Td=["disabled","name"];function Bd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",kd,[r.withDirectives(r.createElementVNode("input",{class:"form-control link",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>u.wrappedValue=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly},null,8,Sd),[[r.vShow,n.schema.hideInput!==!0],[r.vModelText,u.wrappedValue]]),n.schema.browse!==!1?(r.openBlock(),r.createElementBlock("input",{key:0,class:"form-control file",type:"file",disabled:n.disabled||null,onChange:l[1]||(l[1]=(...b)=>u.fileChanged&&u.fileChanged(...b)),name:n.schema.inputName},null,40,Td)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"preview",style:r.normalizeStyle(u.previewStyle)},[r.createElementVNode("div",{class:"remove",title:"Remove image",onClick:l[2]||(l[2]=(...b)=>u.remove&&u.remove(...b))})],4)])}const eb="",Md=P({mixins:[H],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(n){n&&n.indexOf("http")===0&&(this.value=n)}}},watch:{model:{deep:!0,handler(){const n=this.$el.querySelector("input.file");n&&(n.value="")}}},methods:{remove(){this.value=""},fileChanged(n){const l=new FileReader;l.onload=s=>{this.value=s.target.result},n.target.files&&n.target.files.length>0&&l.readAsDataURL(n.target.files[0])}}},[["render",Bd]]),Ad=["autocomplete","disabled","placeholder","readonly","name","id"];function Id(n,l,s,p,h,u){return r.withDirectives((r.openBlock(),r.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,Ad)),[[r.vModelText,n.value]])}const Nd=P({mixins:[H],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",Id]]),ib="",Fd={mixins:[H],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,v.defaults(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(n){v.isArray(n)?this.value=[parseFloat(n[0]),parseFloat(n[1])]:this.value=parseFloat(n)},formatValueToField(n){this.slider!==null&&typeof this.slider.noUiSlider<"u"&&this.slider.noUiSlider.set(n)},formatValueToModel(n){if(typeof this.slider.noUiSlider<"u")return n instanceof Array?[Number(n[0]),Number(n[1])]:Number(n)},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}}},$d=["disabled"];function Od(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["slider",{"contain-pips":u.containPips,"contain-tooltip":u.containTooltip}]),disabled:n.disabled||null},null,10,$d)}const Vd=P(Fd,[["render",Od]]),Dd=["autocomplete","disabled","placeholder","readonly","name"];function Ld(n,l,s,p,h,u){return r.withDirectives((r.openBlock(),r.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName},null,8,Dd)),[[r.vModelText,n.value]])}const xd="YYYY-MM-DD",Ud={mixins:[H],data(){return{picker:null,options:null}},mounted(){this.initialize(v.get(this.schema,"pikadayOptions",{}))},beforeUnmount(){this.picker&&this.picker.destroy()},methods:{getDateFormat(){return v.get(this.schema,"pikadayOptions.format",xd)},...vo,initialize(n){this.picker&&this.picker.destroy&&this.picker.destroy(),this.$nextTick(()=>{window.Pikaday?(this.options=v.defaults({},n,{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!")})}}},Rd=P(Ud,[["render",Ld]]),Pd=["autocomplete","data-disable","data-max","data-min","data-step","placeholder","readonly","name"];function qd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("input",{type:"text",autocomplete:n.schema.autocomplete,"data-disable":n.disabled,"data-max":n.schema.max,"data-min":n.schema.min,"data-step":n.schema.step,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName},null,8,Pd)}const rb="",Wd=P({mixins:[H],data(){return{slider:null}},watch:{model:{deep:!0,handler(){if(window.$&&window.$.fn.ionRangeSlider){let n,l;v.isArray(this.value)?[n,l]=this.value:n=this.value,this.slider&&this.slider.update({from:n,to:l})}}}},mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.ionRangeSlider){let n,l;v.isArray(this.value)?[n,l]=this.value:n=this.value;const s=this;$(this.$el).ionRangeSlider(v.defaults(this.schema.rangeSliderOptions||{},{type:"single",grid:!0,hide_min_max:!0,from:n,to:l,onChange(p){s.slider.options.type==="double"?s.value=[p.from,p.to]:s.value=p.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",qd]]),Kd=["disabled","multiple","title","name"],zd=["disabled","selected"],Hd=["value"];function Yd(n,l,s,p,h,u){return r.withDirectives((r.openBlock(),r.createElementBlock("select",{class:"selectpicker","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),disabled:n.disabled||null,multiple:n.schema.multiSelect,title:n.schema.placeholder,"data-width":"100%",name:n.schema.inputName},[n.schema.multiSelect!==!0?(r.openBlock(),r.createElementBlock("option",{key:0,disabled:n.schema.required||null,value:null,selected:n.value==null},null,8,zd)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,b=>(r.openBlock(),r.createElementBlock("option",{value:u.getItemValue(b)},r.toDisplayString(u.getItemName(b)),9,Hd))),256))],8,Kd)),[[r.vModelSelect,n.value]])}const sb="",Gd=P({mixins:[H],computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n}},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(n){if(v.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return n[this.schema.selectOptions.value];if(typeof n.id<"u")return n.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 n},getItemName(n){if(v.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return n[this.schema.selectOptions.name];if(typeof n.name<"u")return n.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 n}}},[["render",Yd]]),Zd=["autocomplete","disabled","placeholder","readonly","name","id"];function Jd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("input",{type:"text",autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,Zd)}const Xd=P({mixins:[H],data(){return{picker:null}},watch:{model:{deep:!0,handler(){window.$&&window.$.fn.spectrum&&this.picker.spectrum("set",this.value)}},disabled(n){n?this.picker.spectrum("disable"):this.picker.spectrum("enable")}},mounted(){this.$nextTick(function(){window.$&&window.$.fn.spectrum?(this.picker=$(this.$el).spectrum("destroy").spectrum(v.defaults(this.schema.colorOptions||{},{showInput:!0,showAlpha:!0,disabled:this.schema.disabled,allowEmpty:!this.schema.required,preferredFormat:"hex",change:n=>{this.value=n?n.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",Jd]]),Qd=["src"];function jd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("img",{src:u.mapLink},null,8,Qd)}const db="",ec=P({mixins:[H],computed:{mapLink(){let n,l,s;if(this.value){const p=v.defaults(this.schema.staticMapOptions||{},{lat:"lat",lng:"lng",zoom:8,sizeX:640,sizeY:640});n=this.value[p.lat],l=this.value[p.lng],s=`http://maps.googleapis.com/maps/api/staticmap?center=${n},${l}&zoom=${p.zoom}&size=${p.sizeX}x${p.sizeY}`;const h=["scale","format","maptype","language","region","markers","path","visible","style","key","signature"];for(const u of h)typeof p[u]<"u"&&(s+=`&${u}=${p[u]}`)}return s}}},[["render",jd]]),tc=["autocomplete","disabled","name","id"],nc=["data-on","data-off","for"],ic=r.createElementVNode("span",{class:"handle"},null,-1);function rc(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("label",null,[r.withDirectives(r.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,tc),[[r.vModelCheckbox,n.value]]),r.createElementVNode("span",{class:"label","data-on":n.schema.textOn||"On","data-off":n.schema.textOff||"Off",for:n.getFieldID(n.schema)},null,8,nc),ic])}const ub="",oc=P({mixins:[H],methods:{formatValueToField(n){return n!=null&&this.schema.valueOn?n===this.schema.valueOn:n},formatValueToModel(n){return n!=null&&this.schema.valueOn?n?this.schema.valueOn:this.schema.valueOff:n}}},[["render",rc]]),sc={mixins:[H],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 n=Object.keys(this.value),l={};for(let s=0;s<n.length;s++){const p=n[s];l[p]=typeof this.value[p]}this.keyTypes=l},methods:{removeElement(n){const l=this.value;delete l[n],this.value=JSON.parse(JSON.stringify(l));const s=this.keyTypes;delete s[n],this.keyTypes=JSON.parse(JSON.stringify(s))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""}}},lc={key:0},ac={key:1},dc=["id"],cc={key:0},uc=["onUpdate:modelValue"],fc={key:1},hc=["onUpdate:modelValue"],mc={key:2},pc=["onUpdate:modelValue"],gc=["onClick"],_c=[r.createElementVNode("option",{value:"string"}," String ",-1),r.createElementVNode("option",{value:"number"}," Number ",-1),r.createElementVNode("option",{value:"boolean"}," Boolean ",-1)];function yc(n,l,s,p,h,u){const b=r.resolveComponent("vue-form-generator"),_=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[n.schema.schema?(r.openBlock(),r.createElementBlock("div",lc,[r.createVNode(b,{model:n.value,options:n.formOptions,schema:n.schema.schema},null,8,["model","options","schema"])])):(r.openBlock(),r.createElementBlock("div",ac,[r.createElementVNode("table",{id:n.getFieldID(n.schema),class:r.normalizeClass(n.schema.fieldClasses)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(T,A)=>(r.openBlock(),r.createElementBlock("tr",{key:A},[r.createElementVNode("td",null,r.toDisplayString(A),1),h.keyTypes[A]==="string"?(r.openBlock(),r.createElementBlock("td",cc,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"text"},null,8,uc),[[r.vModelText,n.value[A]]])])):r.createCommentVNode("",!0),h.keyTypes[A]==="boolean"?(r.openBlock(),r.createElementBlock("td",fc,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"checkbox"},null,8,hc),[[r.vModelCheckbox,n.value[A]]])])):r.createCommentVNode("",!0),h.keyTypes[A]==="number"?(r.openBlock(),r.createElementBlock("td",mc,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"number"},null,8,pc),[[r.vModelText,n.value[A]]])])):r.createCommentVNode("",!0),r.createElementVNode("td",null,[r.createElementVNode("input",{type:"button",value:"x",onClick:V=>u.removeElement(A)},null,8,gc)])]))),128))],10,dc),r.withDirectives(r.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=T=>h.newKeyType=T)},_c,512),[[r.vModelSelect,h.newKeyType]]),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":l[1]||(l[1]=T=>h.newKeyName=T),type:"text"},null,512),[[r.vModelText,h.newKeyName]]),r.createElementVNode("input",{type:"button",value:"Add key",onClick:l[2]||(l[2]=(...T)=>u.addKey&&u.addKey(...T))})]))])),[[_,h.attributes]])}const Co=P(sc,[["render",yc]]),gb="",_b="",bc={mixins:[H],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:(n,l)=>({[this.schema.model]:n[l]}),set:(n,l,s)=>n[l]=s[this.schema.model]}):this.model[this.schema.model]}},mounted(){this.value||(this.value={});let n=[];this.subSchema?n=this.subSchema.fields:this.subFields&&(n=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,n,this.schema.model)},methods:{removeElement(n){const l=this.value;delete l[n],this.value={...l}},transformMapModelValuesToObject(n,l,s){const p={};return Object.keys(n).map(h=>{const u=h.indexOf(s+"-");if(u>-1&&Array.isArray(l))if(l.length>0){const _=h.split("-").filter(A=>l.find(V=>V.model===A)),T=h.split(`-${_}`)[0].split(`${s}-`)[1];_.length?p[T]={...p[T],[_]:n[h]}:p[h.substring(u+`${s}-`.length)]=n[h]}else p[h.substring(`${s}-`.length)]=n[h];else{const _=h.split("-").filter(A=>A===this.schema.model),T=h.split(`-${_}`)[0].split(`${s}-`)[1];T&&(p[T]=n[h])}return h}),p},addKey(){const n=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",l=this.subSchema?n?[""]:{}:"";this.value[this.newKeyName]=l,this.newKeyName=""},updateModel(n,l){this.$emit("model-updated",this.model[this.schema.model],l)}}},ko=n=>(r.pushScopeId("data-v-293fe57f"),n=n(),r.popScopeId(),n),wc=["id"],vc=["data-testid"],Ec={class:"item-wrapper"},Cc={class:"index-wrapper"},kc=ko(()=>r.createElementVNode("hr",{class:"divider"},null,-1)),Sc={key:0},Tc={key:1},Bc=["onUpdate:modelValue","placeholder","onInput"],Mc={key:0,class:"hint"},Ac=ko(()=>r.createElementVNode("hr",{class:"wide-divider"},null,-1)),Ic={class:"input-item"},Nc=["placeholder"],Fc={key:0,class:"hint"};function $c(n,l,s,p,h,u){const b=r.resolveComponent("KIcon"),_=r.resolveComponent("KButton"),T=r.resolveComponent("vue-form-generator");return r.openBlock(),r.createElementBlock("div",{id:n.getFieldID(n.schema),class:r.normalizeClass(["object-advanced-wrapper",n.schema.fieldClasses])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(A,V)=>(r.openBlock(),r.createElementBlock("div",{key:V,"data-testid":`field-object-key-${V}`},[r.createElementVNode("div",null,[r.createElementVNode("div",Ec,[r.createElementVNode("div",Cc,[r.createElementVNode("strong",null,r.toDisplayString(V),1),r.createElementVNode("div",null,[r.createVNode(_,{appearance:"btn-link",class:"delete",type:"button",onClick:j=>u.removeElement(V)},{default:r.withCtx(()=>[r.createVNode(b,{icon:"trash",size:"18"})]),_:2},1032,["onClick"])])]),kc,u.subSchema?(r.openBlock(),r.createElementBlock("div",Sc,[r.createVNode(T,{model:u.transformedModel[V],options:{helpAsHtml:!0},schema:u.subSchema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])):(r.openBlock(),r.createElementBlock("div",Tc,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":j=>n.value[V]=j,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:"text",onInput:j=>u.updateModel(n.value[V],n.model[n.schema.model])},null,40,Bc),[[r.vModelText,n.value[V]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(r.openBlock(),r.createElementBlock("p",Mc,r.toDisplayString(n.schema.fields[0].schema.hint),1)):r.createCommentVNode("",!0)])),Ac])])],8,vc))),128)),r.createElementVNode("div",{class:r.normalizeClass(["input-wrapper",{indent:u.hasObjectKeys}])},[r.createElementVNode("div",Ic,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=A=>h.newKeyName=A),class:"form-control","data-testid":"keyname-input",placeholder:n.schema.placeholder,type:"text"},null,8,Nc),[[r.vModelText,h.newKeyName]]),r.createVNode(_,{appearance:"btn-link","data-testid":"add-key",disabled:!h.newKeyName,onClick:u.addKey},{default:r.withCtx(()=>[r.createTextVNode(" + Add "+r.toDisplayString(n.schema.buttonLabel||n.schema.label),1)]),_:1},8,["disabled","onClick"])]),n.schema.hintText?(r.openBlock(),r.createElementBlock("p",Fc,r.toDisplayString(n.schema.hintText),1)):r.createCommentVNode("",!0)],2)],10,wc)}const So=P(bc,[["render",$c],["__scopeId","data-v-293fe57f"]]),yb="",bb="",Oc={name:"FieldArrayItem",props:{model:{type:String,default:null}},emits:["remove-item"],data(){return{contentVisible:!1}}},Vc={class:"array-item"};function Dc(n,l,s,p,h,u){const b=r.resolveComponent("KIcon"),_=r.resolveComponent("KButton");return r.openBlock(),r.createElementBlock("div",Vc,[r.renderSlot(n.$slots,"default",{},void 0,!0),r.createVNode(_,{appearance:"btn-link",class:"delete",type:"button",onClick:l[0]||(l[0]=T=>n.$emit("remove-item"))},{icon:r.withCtx(()=>[r.createVNode(b,{icon:"trash",size:"18"})]),_:1})])}const To=P(Oc,[["render",Dc],["__scopeId","data-v-17a1f3c1"]]),wb="",Lc={name:"FieldArrayMultiItem",emits:["remove-item"],data(){return{contentVisible:!1}}},xc=n=>(r.pushScopeId("data-v-47ff1f9a"),n=n(),r.popScopeId(),n),Uc={class:"multi-item-wrapper"},Rc=xc(()=>r.createElementVNode("hr",null,null,-1));function Pc(n,l,s,p,h,u){const b=r.resolveComponent("KButton");return r.openBlock(),r.createElementBlock("div",Uc,[r.renderSlot(n.$slots,"default",{},void 0,!0),r.createVNode(b,{appearance:"danger",class:"delete",type:"input",onClick:l[0]||(l[0]=_=>n.$emit("remove-item"))},{default:r.withCtx(()=>[r.createTextVNode(" - Remove Field ")]),_:1}),Rc])}const Bo=P(Lc,[["render",Pc],["__scopeId","data-v-47ff1f9a"]]),vb="",qc={name:"FieldMetric",mixins:[H],emits:["remove-item"],data(){return{contentVisible:!1}}},Wc=r.createElementVNode("i",{class:"material-icons"},"add",-1),Kc={key:0,class:"content"};function zc(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["field-dropdown",{active:h.contentVisible}])},[r.createElementVNode("div",{class:"title",onClick:l[0]||(l[0]=b=>h.contentVisible=!h.contentVisible)},[r.createTextVNode(r.toDisplayString(n.model.name?n.model.name:"New Item")+" ",1),Wc]),r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[h.contentVisible?(r.openBlock(),r.createElementBlock("div",Kc,[r.renderSlot(n.$slots,"default"),r.createElementVNode("i",{class:"material-icons",onClick:l[1]||(l[1]=b=>n.$emit("remove-item"))}," delete ")])):r.createCommentVNode("",!0)]),_:3})],2)}const Mo=P(qc,[["render",zc]]),bt="kong-ui-forms-api",Hc="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function Yc(n){return n?n.length===36&&new RegExp(`^${Hc}$`).test(n):!1}const Eb="",Cb="",Ii=50,Ft={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 Gc(n,l,s){return s?Ft.SET_REFERRAL_VALUE:n&&!l||!n&&l?Ft.UPDATE_ENTITY:n&&l?Ft.CREATE_FROM_ENTITY:Ft.CREATE_NOT_FROM_ENTITY}const Zc={mixins:[H],inject:[bt],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Gc(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 n,l;switch(this.fieldState){case Ft.UPDATE_ENTITY:if(!this[bt]){console.warn("[@kong-ui-public/forms] No API service provided");break}l=(await this[bt].getOne(this.entity,this.model[this.schema.model])).data,n=this.getItem(this.schema.entityDataKey?l[this.schema.entityDataKey]:l),this.idValue=n.id;break;case Ft.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Ft.SET_REFERRAL_VALUE:this.idValue=this.value}try{n&&(this.initialItems=[{...n,label:this.getSuggestionLabel(n),value:n.id}]),this.items=this.initialItems}catch(s){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",s)}},methods:{onQueryChange(n){n.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=v.debounce(this.search,500)),this.performSearch(n)},async search(n){if(n.trim().length===0)return;this.loading=!0;const l=[],s=[],p=this.getInputFields(),h=new Set;Yc(n)&&p.includes("id")?s.push((async()=>{const u=await this.fetchExact(n);l.push({...u,label:this.getSuggestionLabel(u),value:u.id})})()):s.push(...p.filter(u=>u!=="id").map(async u=>{(await this.fetchSuggestions(n,u)).forEach(_=>{h.has(_.id)||(h.add(_.id),l.push({..._,label:this.getSuggestionLabel(_),value:_.id}))})})),await Promise.all(s),this.items=l,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(n){return n.data?n.data.length>0?n.data[0]:[]:n},async fetchUntilLimit(n){const l=[];let s=null;if(!this[bt])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;l.length<Ii;){const p=await this[bt].getAll(this.entity,{size:Ii,offset:s,...n});if(l.push(...p.data.data),s=p.data.offset,!s)break}return l.slice(0,Ii)},async fetchSuggestions(n,l){return this.fetchUntilLimit({[l]:n})},async fetchExact(n){return this[bt]?(await this[bt].getOne(this.entity,n)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var n,l;return((l=(n=this.schema)==null?void 0:n.inputValues)==null?void 0:l.fields)||[]},getSuggestionLabel(n){const l=this.getInputFields();return l.length&&n?l.map(s=>n[s]).filter(Boolean).join(" - "):""},updateModel(n){this.$emit("model-updated",n&&n.length?n:null,this.schema.model)},onSelected(n){this.idValue=n&&n.id,this.updateModel(this.getReturnValue(n||{}))},getReturnValue(n){var s;const l=(s=this.schema)==null?void 0:s.returnKey;return l?n[l]:n.id}}},Jc={class:"field-wrap autosuggest"},Xc=["data-testid","data-testlabel"],Qc=["data-testid"],jc={class:"autosuggest__results_message"};function eu(n,l,s,p,h,u){const b=r.resolveComponent("KSelect");return r.openBlock(),r.createElementBlock("div",Jc,[r.createVNode(b,{id:n.schema.model,ref:"suggestion",modelValue:h.idValue,"onUpdate:modelValue":l[0]||(l[0]=_=>h.idValue=_),appearance:"select",autosuggest:"",clearable:"","enable-filtering":"",items:h.items,loading:h.loading,placeholder:n.schema.placeholder,width:"100%",onChange:u.onSelected,onQueryChange:u.onQueryChange},{"item-template":r.withCtx(({item:_})=>[r.createElementVNode("span",{class:"first-part","data-testid":_.id&&`${_.id}-0`,"data-testlabel":_.label},r.toDisplayString(u.getSuggestionLabel(_).split(" - ")[0]),9,Xc),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.getSuggestionLabel(_).split(" - ").slice(1),(T,A)=>(r.openBlock(),r.createElementBlock("span",{key:A,class:"field-span","data-testid":_.id&&`${_.id}-${A+1}`||A+1},r.toDisplayString(T),9,Qc))),128))]),empty:r.withCtx(()=>[r.createElementVNode("div",jc,[r.createElementVNode("span",null,r.toDisplayString(h.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const Ao=P(Zc,[["render",eu],["__scopeId","data-v-27d6a440"]]),kb="",Sb="",tu={name:"FieldArrayCardContainer",props:{model:{type:Object,default:null},schema:{type:Object,default:null}},emits:["remove-item"]},nu={class:"array-card-container"};function iu(n,l,s,p,h,u){const b=r.resolveComponent("KCard"),_=r.resolveComponent("KIcon"),T=r.resolveComponent("KButton");return r.openBlock(),r.createElementBlock("div",nu,[r.createVNode(b,{class:"card"},{body:r.withCtx(()=>[r.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),r.createVNode(T,{onClick:l[0]||(l[0]=A=>n.$emit("remove-item"))},{icon:r.withCtx(()=>[r.createVNode(_,{icon:"trash",size:"18"})]),_:1})])}const Io=P(tu,[["render",iu],["__scopeId","data-v-2404b311"]]),Tb="",ru={mixins:[H],emits:["model-updated"],methods:{updateModel(n){this.$emit("model-updated",n,this.schema.model)},checkOption(n){return this.model[this.schema.model]?n.value.toString()===this.model[this.schema.model].toString():n.checked},onChange(n){let l=n.target.value.split(",");this.schema.array||(l=l.toString()),this.updateModel(l)}}},ou={class:"selection-group"},su={class:"form-group"},lu=["id","checked","name","value"];function au(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",ou,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.schema.values,(b,_)=>(r.openBlock(),r.createElementBlock("div",{key:_,class:"option-group"},[r.createElementVNode("div",su,[r.createElementVNode("label",{class:r.normalizeClass(["k-input-label",b.name])},[r.createElementVNode("input",{id:n.schema.name+"-"+_,checked:u.checkOption(b),class:"k-input",name:n.schema.name,type:"radio",value:b.value,onChange:l[0]||(l[0]=(...T)=>u.onChange&&u.onChange(...T))},null,40,lu),r.createTextVNode(" "+r.toDisplayString(b.name),1)],2)])]))),128))])}const No=P(ru,[["render",au],["__scopeId","data-v-705e327d"]]),du={name:"FieldArray",components:{FieldArrayItem:To,FieldArrayMultiItem:Bo,FieldSelect:bo,FieldMetric:Mo,FieldObject:Co,FieldObjectAdvanced:So,FieldAutoSuggest:Ao,FieldRadio:No,FieldArrayCardContainer:Io,FieldTextArea:wo},mixins:[H],props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(n,l,s){let p;return l&&(p=JSON.parse(JSON.stringify(l)),p.schema.fields.map(h=>(h.id=`${h.id||h.model}-${s}`,h))),{...p,set(h,u){n[s]=u},get(){return n[s]}}},newElement(){let n=this.value,l;(!n||!n.push)&&(n=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?l=this.schema.items.default():l=this.schema.items.default),n.push(l),this.value=[...n]},removeElement(n){this.value.splice(n,1)},getFieldType(n){return"field-"+n.type},modelUpdated(){}}},cu=["id"],uu={key:1},fu=["onUpdate:modelValue","type"],hu=["value","onClick"],mu=["onUpdate:modelValue"],pu=["value","onClick"];function gu(n,l,s,p,h,u){const b=r.resolveComponent("FieldTextArea"),_=r.resolveComponent("KButton");return n.schema?(r.openBlock(),r.createElementBlock("div",{key:0,id:n.getFieldID(n.schema),class:r.normalizeClass(n.schema.fieldClasses)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(T,A)=>(r.openBlock(),r.createElementBlock("div",{key:A,class:r.normalizeClass(n.schema.fieldItemsClasses)},[n.schema.items&&n.schema.itemContainerComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.schema.itemContainerComponent),{key:0,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onRemoveItem:V=>u.removeElement(A)},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(u.getFieldType(n.schema.items)),{"form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):n.schema.items?(r.openBlock(),r.createElementBlock("span",uu,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(u.getFieldType(n.schema.items)),{"form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):n.schema.itemContainerComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.schema.itemContainerComponent),{key:2,"data-testid":`${n.getFieldID(n.schema)}-item-${A}`,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onRemoveItem:V=>u.removeElement(A)},{default:r.withCtx(()=>{var V,j;return[((V=n.schema.inputAttributes)==null?void 0:V.type)==="textarea"?(r.openBlock(),r.createBlock(b,{key:0,class:"k-input","form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,8,["form-options","model","schema","onModelUpdated"])):r.withDirectives((r.openBlock(),r.createElementBlock("input",r.mergeProps({key:1,"onUpdate:modelValue":J=>n.value[A]=J},n.schema.inputAttributes,{type:((j=n.schema.inputAttributes)==null?void 0:j.type)||"text"}),null,16,fu)),[[r.vModelDynamic,n.value[A]]]),n.schema.showRemoveButton?(r.openBlock(),r.createElementBlock("input",r.mergeProps({key:2},n.schema.removeElementButtonAttributes,{type:"button",value:n.schema.removeElementButtonLabel||s.removeElementButtonLabel,onClick:J=>u.removeElement(A)}),null,16,hu)):r.createCommentVNode("",!0)]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):r.withDirectives((r.openBlock(),r.createElementBlock("input",r.mergeProps({key:3},n.schema.inputAttributes,{"onUpdate:modelValue":V=>n.value[A]=V,type:"text"}),null,16,mu)),[[r.vModelText,n.value[A]]]),n.schema.showRemoveButton?(r.openBlock(),r.createElementBlock("input",r.mergeProps({key:4},n.schema.removeElementButtonAttributes,{type:"button",value:n.schema.removeElementButtonLabel||s.removeElementButtonLabel,onClick:V=>u.removeElement(A)}),null,16,pu)):r.createCommentVNode("",!0)],2))),128)),r.createVNode(_,{appearance:"btn-link",class:r.normalizeClass(n.schema.newElementButtonLabelClasses),"data-testid":`add-${n.getFieldID(n.schema)}`,type:"button",onClick:u.newElement},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.schema.newElementButtonLabel||s.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,cu)):r.createCommentVNode("",!0)}const _u=P(du,[["render",gu]]),Bb="",yu={mixins:[H],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(n,l){this.$emit("model-updated",n,l)}}},bu={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},wu={class:"material-icons"};function vu(n,l,s,p,h,u){const b=r.resolveComponent("vue-form-generator");return r.openBlock(),r.createElementBlock("div",bu,[r.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:l[0]||(l[0]=(..._)=>u.handleOpen&&u.handleOpen(..._))},[r.createElementVNode("i",wu,r.toDisplayString(h.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),r.createElementVNode("span",null,r.toDisplayString(u.titleText),1)]),r.createElementVNode("div",{class:r.normalizeClass(["advanced-field-dropdown",u.openClass])},[r.createVNode(b,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const Eu=P(yu,[["render",vu],["__scopeId","data-v-2d8e71e1"]]),Mb="",Ab="",Cu={mixins:[H],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(n,l){if(l===null){this.fieldModel={...this.model};return}const s=this.schema.fields[n].fields,p=this.schema.fields[l].fields;p&&p.forEach(h=>this.updateModel("",h.model)),s&&s.forEach(h=>this.updateModel(this.fieldModel[h.model],h.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((n,l)=>{n.fields&&n.fields.forEach(s=>{this.model[s.model]&&(this.checkedGroup=l,this.fieldSchema.push(s.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(n,l){this.$emit("model-updated",n,l)}}},ku={class:"selection-group"},Su={class:"form-group"},Tu=["value"],Bu={class:"control-help"},Mu={class:"option-field"},Au={class:"option-field-container"};function Iu(n,l,s,p,h,u){const b=r.resolveComponent("vue-form-generator");return r.openBlock(),r.createElementBlock("div",ku,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.schema.fields,(_,T)=>(r.openBlock(),r.createElementBlock("div",{key:T,class:"option-group"},[r.createElementVNode("div",Su,[r.createElementVNode("label",{class:r.normalizeClass(["k-input-label",`${_.label}-check`])},[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=A=>h.checkedGroup=A),class:"k-input",type:"radio",value:T},null,8,Tu),[[r.vModelRadio,h.checkedGroup]]),r.createTextVNode(" "+r.toDisplayString(_.label)+" ",1),r.createElementVNode("div",Bu,r.toDisplayString(_.description),1)],2)]),r.withDirectives(r.createElementVNode("div",Mu,[r.createElementVNode("div",Au,[r.createVNode(b,{model:n.model,options:{helpAsHtml:!0},schema:{fields:_.fields},onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[r.vShow,_.fields&&h.checkedGroup===T]])]))),128))])}const Nu=P(Cu,[["render",Iu],["__scopeId","data-v-cd14c14b"]]),Fu={mixins:[H],emits:["model-updated"],methods:{onUpdate(n){this.$emit("model-updated",n,this.schema.model)}}};function $u(n,l,s,p,h,u){const b=r.resolveComponent("KMultiselect");return r.openBlock(),r.createBlock(b,{"collapsed-context":"","data-testid":"field-multiselect",items:n.schema.values,"label-attributes":{help:n.schema.help},"model-value":n.value,placeholder:n.schema.placeholder,required:n.schema.required||void 0,width:"100%","onUpdate:modelValue":u.onUpdate},null,8,["items","label-attributes","model-value","placeholder","required","onUpdate:modelValue"])}const Ou=Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:Eu,FieldArray:_u,FieldArrayCardContainer:Io,FieldArrayItem:To,FieldArrayMultiItem:Bo,FieldAutoSuggest:Ao,FieldCheckbox:Ma,FieldChecklist:xa,FieldCleave:md,FieldDateTimePicker:wd,FieldGoogleAddress:Cd,FieldImage:Md,FieldInput:Wa,FieldLabel:Ha,FieldMasked:Nd,FieldMetric:Mo,FieldMultiselect:P(Fu,[["render",$u]]),FieldNoUiSlider:Vd,FieldObject:Co,FieldObjectAdvanced:So,FieldPikaday:Rd,FieldRadio:No,FieldRadios:Ja,FieldRangeSlider:Wd,FieldSelect:bo,FieldSelectEx:Gd,FieldSelectionGroup:Nu,FieldSpectrum:Xd,FieldStaticMap:ec,FieldSubmit:od,FieldTextArea:wo,FieldUpload:ud,fieldSwitch:oc},Symbol.toStringTag,{value:"Module"})),Nb="",Fb="",Vu={name:"FormGroup",components:Ou,mixins:[eo],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:r.ref()}},methods:{fieldTypeHasLabel(n){if(v.isNil(n.label))return!1;let l="";switch(n.type==="input"?l=n.inputType:l=n.type,l){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(n){const l=v.get(this.options,"fieldIdPrefix","");return to(n,l)},getFieldType(n){return"field-"+n.type},getButtonType(n){return v.get(n,"type","button")},onFieldValidated(n,l,s){this.$emit("validated",n,l,s)},buttonVisibility(n){return n.buttons&&n.buttons.length>0},buttonClickHandler(n,l,s){return n.onclick.call(this,this.model,l,s,this)},fieldHint(n){return v.isFunction(n.hint)?n.hint.call(this,this.model,n,this):n.hint},fieldErrors(n){return this.errors.filter(l=>l.field.fieldName===n.fieldName).map(l=>l.error)},onModelUpdated(n,l){this.$emit("modelUpdated",n,l)},validate(n){return this.$refs.child.validate(n)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(n){return n?n.replace(/^[cC]onfig\./,""):""}}},Fo=n=>(r.pushScopeId("data-v-e016d4ec"),n=n(),r.popScopeId(),n),Du=["for"],Lu={class:"icon-wrapper"},xu=["innerHTML"],Uu=Fo(()=>r.createElementVNode("div",{class:"help",role:"button",tabindex:"0"},[r.createElementVNode("i",{class:"icon"})],-1)),Ru=["innerHTML"],Pu={key:0,class:"link-wrapper"},qu=Fo(()=>r.createElementVNode("span",{class:"section-header"},"More info",-1)),Wu={class:"field-wrap"},Ku={key:0,class:"buttons"},zu=["type","onClick","textContent"],Hu=["innerHTML"],Yu={key:2,class:"errors help-block"},Gu=["innerHTML"];function Zu(n,l,s,p,h,u){const b=r.resolveComponent("KTooltip"),_=r.resolveComponent("KExternalLink");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["form-group",n.getFieldRowClasses(s.field)])},[u.fieldTypeHasLabel(s.field)?(r.openBlock(),r.createElementBlock("label",{key:0,class:r.normalizeClass(["form-group-label",s.field.labelClasses]),for:u.getFieldID(s.field)},[r.createElementVNode("div",Lu,[r.createElementVNode("span",{innerHTML:u.formattedLabel(s.field.label)},null,8,xu),s.field.help?(r.openBlock(),r.createBlock(b,{key:0,"max-width":"300",placement:"top","position-fixed":!0},{content:r.withCtx(()=>[s.options.helpAsHtml?(r.openBlock(),r.createElementBlock("div",{key:0,innerHTML:s.field.help},null,8,Ru)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(s.field.help),1)],64))]),default:r.withCtx(()=>[Uu]),_:1})):r.createCommentVNode("",!0)]),s.field.link?(r.openBlock(),r.createElementBlock("div",Pu,[r.createVNode(_,{href:s.field.link},{default:r.withCtx(()=>[qu]),_:1},8,["href"])])):r.createCommentVNode("",!0)],10,Du)):r.createCommentVNode("",!0),r.createElementVNode("div",Wu,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(u.getFieldType(s.field)),r.mergeProps(n.$attrs,{ref:"child",disabled:n.fieldDisabled(s.field)||null,"form-options":s.options,model:s.model,schema:s.field,vfg:s.vfg,onModelUpdated:u.onModelUpdated,onValidated:u.onFieldValidated}),null,16,["disabled","form-options","model","schema","vfg","onModelUpdated","onValidated"])),u.buttonVisibility(s.field)?(r.openBlock(),r.createElementBlock("div",Ku,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.field.buttons,(T,A)=>(r.openBlock(),r.createElementBlock("button",{key:A,class:r.normalizeClass(T.classes),type:u.getButtonType(T),onClick:V=>u.buttonClickHandler(T,s.field,V),textContent:r.toDisplayString(T.label)},null,10,zu))),128))])):r.createCommentVNode("",!0)]),s.field.hint?(r.openBlock(),r.createElementBlock("div",{key:1,class:"hint",innerHTML:u.fieldHint(s.field)},null,8,Hu)):r.createCommentVNode("",!0),u.fieldErrors(s.field).length>0?(r.openBlock(),r.createElementBlock("div",Yu,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.fieldErrors(s.field),(T,A)=>(r.openBlock(),r.createElementBlock("span",{key:A,innerHTML:T},null,8,Gu))),128))])):r.createCommentVNode("",!0)],2)}const Ju=P(Vu,[["render",Zu],["__scopeId","data-v-e016d4ec"]]),Xu={key:0,class:"vue-form-generator"},Qu=["is"],ju=["is"],ef={key:0};function tf(n,l,s,p,h,u){const b=r.resolveComponent("form-group");return s.schema!=null?(r.openBlock(),r.createElementBlock("div",Xu,[s.schema.fields?(r.openBlock(),r.createElementBlock("fieldset",{key:0,is:s.tag},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.fields,_=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[u.fieldVisible(_)?(r.openBlock(),r.createBlock(b,{key:0,ref_for:!0,ref:"children",vfg:h.vfg,field:_,errors:h.errors,model:s.model,options:s.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):r.createCommentVNode("",!0)],64))),256))],8,Qu)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.groups,_=>(r.openBlock(),r.createElementBlock("fieldset",{is:s.tag,class:r.normalizeClass(n.getFieldRowClasses(_))},[_.legend?(r.openBlock(),r.createElementBlock("legend",ef,r.toDisplayString(_.legend),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_.fields,T=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[u.fieldVisible(T)?(r.openBlock(),r.createBlock(b,{key:0,ref_for:!0,ref:"children",vfg:h.vfg,field:T,errors:h.errors,model:s.model,options:s.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):r.createCommentVNode("",!0)],64))),256))],10,ju))),256))])):r.createCommentVNode("",!0)}const $b="",be=P({name:"FormGenerator",components:{formGroup:Ju},mixins:[eo],props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:r.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(n){return n.length>0}}},emits:["validated","modelUpdated"],data(){return{vfg:this,errors:[],children:r.ref([])}},computed:{fields(){const n=[];return this.schema&&this.schema.fields&&v.forEach(this.schema.fields,l=>{(!this.multiple||l.multi===!0)&&n.push(l)}),n},groups(){const n=[];return this.schema&&this.schema.groups&&v.forEach(this.schema.groups.slice(0),l=>{n.push(l)}),n}},watch:{model:{deep:!0,handler(n,l){l!==n&&n!=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(n){return v.isFunction(n.visible)?n.visible.call(this,this.model,n,this):v.isNil(n.visible)?!0:n.visible},onFieldValidated(n,l,s){this.errors=this.errors.filter(h=>h.field.fieldName!==s.schema.fieldName),!n&&l&&l.length>0&&v.forEach(l,h=>{this.errors.push({field:s.schema,error:h})});const p=this.errors.length===0;this.$emit("validated",p,this.errors,this)},onModelUpdated(n,l){this.$emit("modelUpdated",n,l)},validate(n=null){n===null&&(n=v.get(this.options,"validateAsync",!1)),this.clearValidationErrors();const l=[],s=[];v.forEach(this.$refs.children,h=>{v.isFunction(h.validate)&&(l.push(h.$refs.child),s.push(h.$refs.child.validate(!0)))});const p=h=>{const u=[];v.forEach(h,(_,T)=>{v.isArray(_)&&_.length>0&&v.forEach(_,A=>{u.push({field:l[T].schema,error:A})})}),this.errors=u;const b=u.length===0;return this.$emit("validated",b,u,this),n?u:b};return n?Promise.all(s).then(p):p(s)},clearValidationErrors(){this.errors.splice(0),v.forEach(this.$refs.children,n=>{n.clearValidationErrors()})}}},[["render",tf]]),nf={fields:[{help:"The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.",inputType:"password",label:"Config.Client Id",model:"config-client_id",type:"input"},{help:"The client secret.",inputType:"password",label:"Config.Client Secret",model:"config-client_secret",type:"input"},{help:"The discovery endpoint (or just the issuer identifier).",inputType:"text",label:"Config.Issuer",model:"config-issuer",required:!0,type:"input"},{help:"Types of credentials/grants to enable.",inputType:"text",label:"Config.Auth Methods",model:"config-auth_methods",type:"input"}]},rf={fields:[{help:"The claim that contains the scopes.",inputType:"text",label:"Config.Scopes Claim",model:"config-scopes_claim",type:"input"},{help:"The scopes required to be in the access token.",inputType:"text",label:"Config.Scopes Required",model:"config-scopes_required",type:"input"},{help:"The claim that contains the audience.",inputType:"text",label:"Config.Audience Claim",model:"config-audience_claim",type:"input"},{help:"The audience required to be in the access token.",inputType:"text",label:"Config.Audience Required",model:"config-audience_required",type:"input"},{help:"The claim that contains the roles.",inputType:"text",label:"Config.Roles Claim",model:"config-roles_claim",type:"input"},{help:"The roles required to be in the access token.",inputType:"text",label:"Config.Roles Required",model:"config-roles_required",type:"input"},{help:"The claim that contains the groups.",inputType:"text",label:"Config.Groups Claim",model:"config-groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The groups required to be in the access token.",inputType:"text",label:"Config.Groups Required",model:"config-groups_required",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The claim that contains authenticated groups.",inputType:"text",label:"Config.Authenticated Groups Claim",model:"config-authenticated_groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"}]},of={fields:[{help:"The input must be in JSON format.",type:"input",valueArrayType:"record",inputType:"text",default:void 0,valueType:"array",model:"config-client_jwk",label:"Config.Client Jwk",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record"},{help:"The input must be in JSON format.",type:"input",valueArrayType:"record",inputType:"text",default:void 0,valueType:"array",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"}]},Vb="",Db="",sf={name:"OIDCForm",components:{VueFormGenerator:be},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(){this.init||(this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(n=>!n.model.startsWith("config")&&n.model!=="tags")},this.commonFieldsSchema={...nf},this.authFieldsSchema={...rf},this.advancedFieldsSchema.fields=this.formSchema.fields.filter(n=>n.model.startsWith("config")&&!this.commonFieldsSchema.fields.filter(l=>l.model===n.model).length&&!this.authFieldsSchema.fields.filter(l=>l.model===n.model).length||n.model==="tags"),this.advancedFieldsSchema.fields=this.advancedFieldsSchema.fields.map(n=>{const l=of.fields.find(s=>s.model===n.model);return l||n}),this.commonFieldsSchema.fields=this.commonFieldsSchema.fields.filter(n=>n.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}])},getAuthMethodsValue(n,l){const s=[];for(let p=0;p<this.authMethods.length;p++)this.authMethods[p].prop&&this.authMethods[p].value!==n&&s.push(this.authMethods[p].value);return this.sessionManagement&&n&&s.push("session"),l&&(n?s.push(n):s.push("session")),s},handleUpdate(n,l){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(l,n),this.onModelUpdated()}}},Kt=n=>(r.pushScopeId("data-v-5ac1c38b"),n=n(),r.popScopeId(),n),lf={class:"general-settings"},af={class:"link-wrapper"},df=Kt(()=>r.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),cf=Kt(()=>r.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),uf={class:"auth-method-container"},ff={class:"general-settings"},hf={class:"link-wrapper"},mf=Kt(()=>r.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),pf=Kt(()=>r.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),gf={class:"general-settings"},_f={class:"link-wrapper"},yf=Kt(()=>r.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),bf=Kt(()=>r.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function wf(n,l,s,p,h,u){const b=r.resolveComponent("VueFormGenerator"),_=r.resolveComponent("KExternalLink"),T=r.resolveComponent("KLabel"),A=r.resolveComponent("KCheckbox"),V=r.resolveComponent("KInputSwitch"),j=r.resolveComponent("KTabs");return r.openBlock(),r.createElementBlock("div",null,[s.formModel.id&&s.isEditing||!s.isEditing?(r.openBlock(),r.createBlock(b,{key:0,class:"global-fields",model:s.formModel,options:s.formOptions,schema:h.globalFields,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),r.createVNode(j,{tabs:h.tabs},{common:r.withCtx(()=>[r.createElementVNode("div",lf,[r.createElementVNode("div",af,[r.createVNode(_,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:r.withCtx(()=>[df]),_:1})]),cf,u.displayForm?(r.openBlock(),r.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.commonFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),r.createVNode(T,null,{default:r.withCtx(()=>[r.createTextVNode("Auth Methods")]),_:1}),r.createElementVNode("div",uf,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.authMethods,J=>(r.openBlock(),r.createElementBlock("div",{key:J.value,class:"auth-method"},[r.createVNode(A,{modelValue:J.prop,"onUpdate:modelValue":we=>J.prop=we,onChange:we=>u.handleUpdate(we,J.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(J.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),r.createVNode(V,{modelValue:h.sessionManagement,"onUpdate:modelValue":l[0]||(l[0]=J=>h.sessionManagement=J),label:"Enable Session Management",onChange:u.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:r.withCtx(()=>[r.createElementVNode("div",ff,[r.createElementVNode("div",hf,[r.createVNode(_,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:r.withCtx(()=>[mf]),_:1})]),pf,u.displayForm?(r.openBlock(),r.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.authFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])]),advanced:r.withCtx(()=>[r.createElementVNode("div",gf,[r.createElementVNode("div",_f,[r.createVNode(_,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:r.withCtx(()=>[yf]),_:1})]),bf,u.displayForm?(r.openBlock(),r.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.advancedFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])]),_:1},8,["tabs"])])}const vf=P(sf,[["render",wf],["__scopeId","data-v-5ac1c38b"]]),$o={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"}}},Ef=r.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(n){const l=n,{t:s,te:p}=jr.createI18n("en-us",$o),h=r.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),u=r.computed(()=>{const b=l.formSchema;return b.fields.map(_=>{const T=`post-function.${_.model}`;return _.hint=p(`${T}.hint`)&&s(`${T}.hint`)||_.hint,_.help=p(`${T}.help`)&&s(`${T}.help`)||_.help,_.newElementButtonLabel=p(`${T}.newElementButtonLabel`)&&s(`${T}.newElementButtonLabel`)||_.newElementButtonLabel,_.model!=="tags"&&(_.valueType==="array"||_.type==="array")&&(_.type="array",_.valueArrayType="array",_.itemContainerComponent="FieldArrayItem",_.fieldClasses="w-100",_.fieldItemsClasses="w-100 mt-2 mb-2",_.inputAttributes={..._.inputAttributes,type:"textarea"}),_}),b});return(b,_)=>h.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)}}),Cf=r.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(n){const l=n,{t:s,te:p}=jr.createI18n("en-us",$o),h=r.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),u=r.computed(()=>{const b=l.formSchema;return b.fields.map(_=>{const T=`exit-transformer.${_.model}`;return _.hint=p(`${T}.hint`)&&s(`${T}.hint`)||_.hint,_.help=p(`${T}.help`)&&s(`${T}.help`)||_.help,_.newElementButtonLabel=p(`${T}.newElementButtonLabel`)&&s(`${T}.newElementButtonLabel`)||_.newElementButtonLabel,_.model!=="tags"&&(_.valueType==="array"||_.type==="array")&&(_.type="array",_.valueArrayType="array",_.itemContainerComponent="FieldArrayItem",_.fieldClasses="w-100",_.fieldItemsClasses="w-100 mt-2 mb-2",_.inputAttributes={..._.inputAttributes,type:"textarea"}),_}),b});return(b,_)=>h.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)}}),kf={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}]},Oo={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}]},Vo={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}]},$t=n=>(r.pushScopeId("data-v-bc6f1e04"),n=n(),r.popScopeId(),n),Sf={class:"general-settings"},Tf=$t(()=>r.createElementVNode("div",{class:"header-wrapper"},[r.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),Bf=$t(()=>r.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),Mf=$t(()=>r.createElementVNode("hr",null,null,-1)),Af={class:"sub-form"},If={class:"general-settings"},Nf=$t(()=>r.createElementVNode("div",{class:"header-wrapper"},[r.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),Ff=$t(()=>r.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),$f={class:"sub-form"},Of={class:"general-settings"},Vf=$t(()=>r.createElementVNode("div",{class:"header-wrapper"},[r.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),Df=$t(()=>r.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),Lf=r.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(n){const l=n,s=r.ref("zeroSsl"),p=r.ref("shm"),h=r.computed(()=>({fields:l.formSchema.fields.filter(K=>!K.model.startsWith("config")&&K.model!=="tags")})),u=r.computed(()=>({fields:kf.fields.filter(Y=>!Oo.fields.some(ce=>ce.model===Y.model)&&!Vo.fields.some(ce=>ce.model===Y.model))})),b=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage")&&!Y.model.startsWith("config-storage_config-consul")&&!Y.model.startsWith("config-storage_config-redis")&&!Y.model.startsWith("config-storage_config-shm")&&!Y.model.startsWith("config-storage_config-vault"))})),_=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-consul"))})),T=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-redis"))})),A=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-shm"))})),V=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-vault"))})),j=r.computed(()=>({fields:l.formSchema.fields.filter(K=>K.model.startsWith("config")&&!u.value.fields.filter(Y=>Y.model===K.model).length&&!b.value.fields.filter(Y=>Y.model===K.model).length||K.model==="tags")})),J=r.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),we=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],et=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];r.onMounted(()=>{s.value==="zeroSsl"&&(l.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const st=K=>{s.value=K.value,(K.value==="zeroSsl"||K.value==="other")&&(K.value==="zeroSsl"?l.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":l.formModel["config-api_uri"]="https://acme.example.com/",l.formModel["config-tos_accepted"]=!1),K.value==="letsEncrypt"&&(l.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",l.formModel["config-eab_hmac_key"]="",l.formModel["config-eab_kid"]=""),l.onModelUpdated()},fe=(K,Y)=>{Y==="config-storage"&&(p.value=K),l.onModelUpdated()};return(K,Y)=>{const ce=r.resolveComponent("KSelect"),Te=r.resolveComponent("KTabs");return r.openBlock(),r.createElementBlock("div",null,[n.formModel.id&&n.isEditing||!n.isEditing?(r.openBlock(),r.createBlock(be,{key:0,class:"global-fields",model:n.formModel,options:n.formOptions,schema:h.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),r.createVNode(Te,{tabs:we},{general:r.withCtx(()=>[r.createElementVNode("div",Sf,[Tf,Bf,J.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),Mf,r.createVNode(ce,{appearance:"select",class:"issuer-select",items:et,label:"Issuer",onChange:st}),r.createElementVNode("div",Af,[s.value==="letsEncrypt"?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:r.unref(Oo),onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),s.value==="zeroSsl"||s.value==="other"?(r.openBlock(),r.createBlock(be,{key:1,model:n.formModel,options:n.formOptions,schema:r.unref(Vo),onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])])]),storage:r.withCtx(()=>[r.createElementVNode("div",If,[Nf,Ff,J.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:b.value,onModelUpdated:fe},null,8,["model","options","schema"])):r.createCommentVNode("",!0),r.createElementVNode("div",$f,[p.value==="consul"?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:_.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),p.value==="redis"?(r.openBlock(),r.createBlock(be,{key:1,model:n.formModel,options:n.formOptions,schema:T.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),p.value==="shm"?(r.openBlock(),r.createBlock(be,{key:2,model:n.formModel,options:n.formOptions,schema:A.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),p.value==="vault"?(r.openBlock(),r.createBlock(be,{key:3,model:n.formModel,options:n.formOptions,schema:V.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])])]),advanced:r.withCtx(()=>[r.createElementVNode("div",Of,[Vf,Df,J.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:j.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])]),_:1})])}}}),xb="",xf=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:P(Lf,[["__scopeId","data-v-bc6f1e04"]]),ExitTransformer:Cf,OIDCForm:vf,PostFunction:Ef},Symbol.toStringTag,{value:"Module"})),Uf=["array","metric","advanced","selectionGroup","object-advanced"],Rf={install:n=>{n.component("VueFormGenerator",be)}},Pf=(n,l=!1)=>({...l&&{acme:"ACMEForm"},"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer"})[n];ke.FORMS_API_KEY=bt,ke.VueFormGenerator=be,ke.abstractField=ka,ke.customFields=Uf,ke.default=Rf,ke.getSharedFormName=Pf,ke.sharedForms=xf,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
27
+ }`;var U=ua(function(){return G(c,I+"return "+S).apply(s,f)});if(U.source=S,qr(U))throw U;return U}function K0(e){return Z(e).toLowerCase()}function z0(e){return Z(e).toUpperCase()}function H0(e,t,i){if(e=Z(e),e&&(i||t===s))return ws(e);if(!e||!(t=$e(t)))return e;var o=Je(e),a=Je(t),c=vs(o,a),f=Es(o,a)+1;return At(o,c,f).join("")}function Y0(e,t,i){if(e=Z(e),e&&(i||t===s))return e.slice(0,ks(e)+1);if(!e||!(t=$e(t)))return e;var o=Je(e),a=Es(o,Je(t))+1;return At(o,0,a).join("")}function G0(e,t,i){if(e=Z(e),e&&(i||t===s))return e.replace(qi,"");if(!e||!(t=$e(t)))return e;var o=Je(e),a=vs(o,Je(t));return At(o,a).join("")}function Z0(e,t){var i=qf,o=Wf;if(re(t)){var a="separator"in t?t.separator:a;i="length"in t?x(t.length):i,o="omission"in t?$e(t.omission):o}e=Z(e);var c=e.length;if(Zt(e)){var f=Je(e);c=f.length}if(i>=c)return e;var m=i-Jt(o);if(m<1)return o;var y=f?At(f,0,m).join(""):e.slice(0,m);if(a===s)return y+o;if(f&&(m+=y.length-m),Wr(a)){if(e.slice(m).search(a)){var C,k=y;for(a.global||(a=or(a.source,Z(qo.exec(a))+"g")),a.lastIndex=0;C=a.exec(k);)var S=C.index;y=y.slice(0,S===s?m:S)}}else if(e.indexOf($e(a),m)!=m){var B=y.lastIndexOf(a);B>-1&&(y=y.slice(0,B))}return y+o}function J0(e){return e=Z(e),e&&lh.test(e)?e.replace(Uo,Sm):e}var X0=rn(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Hr=fl("toUpperCase");function ca(e,t,i){return e=Z(e),t=i?s:t,t===s?wm(e)?Mm(e):um(e):e.match(t)||[]}var ua=R(function(e,t){try{return Ne(e,s,t)}catch(i){return qr(i)?i:new D(i)}}),Q0=ft(function(e,t){return Re(t,function(i){i=ot(i),ct(e,i,Rr(e[i],e))}),e});function j0(e){var t=e==null?0:e.length,i=N();return e=t?ne(e,function(o){if(typeof o[1]!="function")throw new Pe(b);return[i(o[0]),o[1]]}):[],R(function(o){for(var a=-1;++a<t;){var c=e[a];if(Ne(c[0],this,o))return Ne(c[1],this,o)}})}function e1(e){return Sp(We(e,j))}function Yr(e){return function(){return e}}function t1(e,t){return e==null||e!==e?t:e}var n1=ml(),i1=ml(!0);function Ie(e){return e}function Gr(e){return Ks(typeof e=="function"?e:We(e,j))}function r1(e){return Hs(We(e,j))}function o1(e,t){return Ys(e,We(t,j))}var s1=R(function(e,t){return function(i){return Tn(i,e,t)}}),l1=R(function(e,t){return function(i){return Tn(e,i,t)}});function Zr(e,t,i){var o=ue(t),a=di(t,o);i==null&&!(re(t)&&(a.length||!o.length))&&(i=t,t=e,e=this,a=di(t,ue(t)));var c=!(re(i)&&"chain"in i)||!!i.chain,f=mt(e);return Re(a,function(m){var y=t[m];e[m]=y,f&&(e.prototype[m]=function(){var C=this.__chain__;if(c||C){var k=e(this.__wrapped__),S=k.__actions__=Be(this.__actions__);return S.push({func:y,args:arguments,thisArg:e}),k.__chain__=C,k}return y.apply(e,Ct([this.value()],arguments))})}),e}function a1(){return me._===this&&(me._=Om),this}function Jr(){}function d1(e){return e=x(e),R(function(t){return Gs(t,e)})}var c1=Br(ne),u1=Br(ps),f1=Br(Qi);function fa(e){return Or(e)?ji(ot(e)):qp(e)}function h1(e){return function(t){return e==null?s:Rt(e,t)}}var m1=gl(),p1=gl(!0);function Xr(){return[]}function Qr(){return!1}function g1(){return{}}function _1(){return""}function y1(){return!0}function b1(e,t){if(e=x(e),e<1||e>vt)return[];var i=nt,o=_e(e,nt);t=N(t),e-=nt;for(var a=nr(o,t);++i<e;)t(i);return a}function w1(e){return L(e)?ne(e,ot):Oe(e)?[e]:Be(Fl(Z(e)))}function v1(e){var t=++Fm;return Z(e)+t}var E1=pi(function(e,t){return e+t},0),C1=Mr("ceil"),k1=pi(function(e,t){return e/t},1),S1=Mr("floor");function T1(e){return e&&e.length?ai(e,Ie,hr):s}function B1(e,t){return e&&e.length?ai(e,N(t,2),hr):s}function M1(e){return ys(e,Ie)}function A1(e,t){return ys(e,N(t,2))}function I1(e){return e&&e.length?ai(e,Ie,_r):s}function N1(e,t){return e&&e.length?ai(e,N(t,2),_r):s}var F1=pi(function(e,t){return e*t},1),$1=Mr("round"),O1=pi(function(e,t){return e-t},0);function V1(e){return e&&e.length?tr(e,Ie):0}function D1(e,t){return e&&e.length?tr(e,N(t,2)):0}return d.after=ry,d.ary=Wl,d.assign=zy,d.assignIn=ia,d.assignInWith=Mi,d.assignWith=Hy,d.at=Yy,d.before=Kl,d.bind=Rr,d.bindAll=Q0,d.bindKey=zl,d.castArray=gy,d.chain=Rl,d.chunk=Sg,d.compact=Tg,d.concat=Bg,d.cond=j0,d.conforms=e1,d.constant=Yr,d.countBy=V_,d.create=Gy,d.curry=Hl,d.curryRight=Yl,d.debounce=Gl,d.defaults=Zy,d.defaultsDeep=Jy,d.defer=oy,d.delay=sy,d.difference=Mg,d.differenceBy=Ag,d.differenceWith=Ig,d.drop=Ng,d.dropRight=Fg,d.dropRightWhile=$g,d.dropWhile=Og,d.fill=Vg,d.filter=L_,d.flatMap=R_,d.flatMapDeep=P_,d.flatMapDepth=q_,d.flatten=Dl,d.flattenDeep=Dg,d.flattenDepth=Lg,d.flip=ly,d.flow=n1,d.flowRight=i1,d.fromPairs=xg,d.functions=i0,d.functionsIn=r0,d.groupBy=W_,d.initial=Rg,d.intersection=Pg,d.intersectionBy=qg,d.intersectionWith=Wg,d.invert=s0,d.invertBy=l0,d.invokeMap=z_,d.iteratee=Gr,d.keyBy=H_,d.keys=ue,d.keysIn=Ae,d.map=Ei,d.mapKeys=d0,d.mapValues=c0,d.matches=r1,d.matchesProperty=o1,d.memoize=ki,d.merge=u0,d.mergeWith=ra,d.method=s1,d.methodOf=l1,d.mixin=Zr,d.negate=Si,d.nthArg=d1,d.omit=f0,d.omitBy=h0,d.once=ay,d.orderBy=Y_,d.over=c1,d.overArgs=dy,d.overEvery=u1,d.overSome=f1,d.partial=Pr,d.partialRight=Zl,d.partition=G_,d.pick=m0,d.pickBy=oa,d.property=fa,d.propertyOf=h1,d.pull=Yg,d.pullAll=xl,d.pullAllBy=Gg,d.pullAllWith=Zg,d.pullAt=Jg,d.range=m1,d.rangeRight=p1,d.rearg=cy,d.reject=X_,d.remove=Xg,d.rest=uy,d.reverse=xr,d.sampleSize=j_,d.set=g0,d.setWith=_0,d.shuffle=ey,d.slice=Qg,d.sortBy=iy,d.sortedUniq=o_,d.sortedUniqBy=s_,d.split=R0,d.spread=fy,d.tail=l_,d.take=a_,d.takeRight=d_,d.takeRightWhile=c_,d.takeWhile=u_,d.tap=T_,d.throttle=hy,d.thru=vi,d.toArray=ea,d.toPairs=sa,d.toPairsIn=la,d.toPath=w1,d.toPlainObject=na,d.transform=y0,d.unary=my,d.union=f_,d.unionBy=h_,d.unionWith=m_,d.uniq=p_,d.uniqBy=g_,d.uniqWith=__,d.unset=b0,d.unzip=Ur,d.unzipWith=Ul,d.update=w0,d.updateWith=v0,d.values=ln,d.valuesIn=E0,d.without=y_,d.words=ca,d.wrap=py,d.xor=b_,d.xorBy=w_,d.xorWith=v_,d.zip=E_,d.zipObject=C_,d.zipObjectDeep=k_,d.zipWith=S_,d.entries=sa,d.entriesIn=la,d.extend=ia,d.extendWith=Mi,Zr(d,d),d.add=E1,d.attempt=ua,d.camelCase=T0,d.capitalize=aa,d.ceil=C1,d.clamp=C0,d.clone=_y,d.cloneDeep=by,d.cloneDeepWith=wy,d.cloneWith=yy,d.conformsTo=vy,d.deburr=da,d.defaultTo=t1,d.divide=k1,d.endsWith=B0,d.eq=Qe,d.escape=M0,d.escapeRegExp=A0,d.every=D_,d.find=x_,d.findIndex=Ol,d.findKey=Xy,d.findLast=U_,d.findLastIndex=Vl,d.findLastKey=Qy,d.floor=S1,d.forEach=Pl,d.forEachRight=ql,d.forIn=jy,d.forInRight=e0,d.forOwn=t0,d.forOwnRight=n0,d.get=Kr,d.gt=Ey,d.gte=Cy,d.has=o0,d.hasIn=zr,d.head=Ll,d.identity=Ie,d.includes=K_,d.indexOf=Ug,d.inRange=k0,d.invoke=a0,d.isArguments=Wt,d.isArray=L,d.isArrayBuffer=ky,d.isArrayLike=Me,d.isArrayLikeObject=se,d.isBoolean=Sy,d.isBuffer=It,d.isDate=Ty,d.isElement=By,d.isEmpty=My,d.isEqual=Ay,d.isEqualWith=Iy,d.isError=qr,d.isFinite=Ny,d.isFunction=mt,d.isInteger=Jl,d.isLength=Ti,d.isMap=Xl,d.isMatch=Fy,d.isMatchWith=$y,d.isNaN=Oy,d.isNative=Vy,d.isNil=Ly,d.isNull=Dy,d.isNumber=Ql,d.isObject=re,d.isObjectLike=oe,d.isPlainObject=Fn,d.isRegExp=Wr,d.isSafeInteger=xy,d.isSet=jl,d.isString=Bi,d.isSymbol=Oe,d.isTypedArray=sn,d.isUndefined=Uy,d.isWeakMap=Ry,d.isWeakSet=Py,d.join=Kg,d.kebabCase=I0,d.last=ze,d.lastIndexOf=zg,d.lowerCase=N0,d.lowerFirst=F0,d.lt=qy,d.lte=Wy,d.max=T1,d.maxBy=B1,d.mean=M1,d.meanBy=A1,d.min=I1,d.minBy=N1,d.stubArray=Xr,d.stubFalse=Qr,d.stubObject=g1,d.stubString=_1,d.stubTrue=y1,d.multiply=F1,d.nth=Hg,d.noConflict=a1,d.noop=Jr,d.now=Ci,d.pad=$0,d.padEnd=O0,d.padStart=V0,d.parseInt=D0,d.random=S0,d.reduce=Z_,d.reduceRight=J_,d.repeat=L0,d.replace=x0,d.result=p0,d.round=$1,d.runInContext=g,d.sample=Q_,d.size=ty,d.snakeCase=U0,d.some=ny,d.sortedIndex=jg,d.sortedIndexBy=e_,d.sortedIndexOf=t_,d.sortedLastIndex=n_,d.sortedLastIndexBy=i_,d.sortedLastIndexOf=r_,d.startCase=P0,d.startsWith=q0,d.subtract=O1,d.sum=V1,d.sumBy=D1,d.template=W0,d.times=b1,d.toFinite=pt,d.toInteger=x,d.toLength=ta,d.toLower=K0,d.toNumber=He,d.toSafeInteger=Ky,d.toString=Z,d.toUpper=z0,d.trim=H0,d.trimEnd=Y0,d.trimStart=G0,d.truncate=Z0,d.unescape=J0,d.uniqueId=v1,d.upperCase=X0,d.upperFirst=Hr,d.each=Pl,d.eachRight=ql,d.first=Ll,Zr(d,function(){var e={};return it(d,function(t,i){X.call(d.prototype,i)||(e[i]=t)}),e}(),{chain:!1}),d.VERSION=p,Re(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Re(["drop","take"],function(e,t){W.prototype[e]=function(i){i=i===s?1:de(x(i),0);var o=this.__filtered__&&!t?new W(this):this.clone();return o.__filtered__?o.__takeCount__=_e(i,o.__takeCount__):o.__views__.push({size:_e(i,nt),type:e+(o.__dir__<0?"Right":"")}),o},W.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),Re(["filter","map","takeWhile"],function(e,t){var i=t+1,o=i==Do||i==Yf;W.prototype[e]=function(a){var c=this.clone();return c.__iteratees__.push({iteratee:N(a,3),type:i}),c.__filtered__=c.__filtered__||o,c}}),Re(["head","last"],function(e,t){var i="take"+(t?"Right":"");W.prototype[e]=function(){return this[i](1).value()[0]}}),Re(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");W.prototype[e]=function(){return this.__filtered__?new W(this):this[i](1)}}),W.prototype.compact=function(){return this.filter(Ie)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=R(function(e,t){return typeof e=="function"?new W(this):this.map(function(i){return Tn(i,e,t)})}),W.prototype.reject=function(e){return this.filter(Si(N(e)))},W.prototype.slice=function(e,t){e=x(e);var i=this;return i.__filtered__&&(e>0||t<0)?new W(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==s&&(t=x(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(nt)},it(W.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=d[o?"take"+(t=="last"?"Right":""):t],c=o||/^find/.test(t);a&&(d.prototype[t]=function(){var f=this.__wrapped__,m=o?[1]:arguments,y=f instanceof W,C=m[0],k=y||L(f),S=function(q){var z=a.apply(d,Ct([q],m));return o&&B?z[0]:z};k&&i&&typeof C=="function"&&C.length!=1&&(y=k=!1);var B=this.__chain__,I=!!this.__actions__.length,F=c&&!B,U=y&&!I;if(!c&&k){f=U?f:new W(this);var O=e.apply(f,m);return O.__actions__.push({func:vi,args:[S],thisArg:s}),new qe(O,B)}return F&&U?e.apply(this,m):(O=this.thru(S),F?o?O.value()[0]:O.value():O)})}),Re(["pop","push","shift","sort","splice","unshift"],function(e){var t=Yn[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var a=arguments;if(o&&!this.__chain__){var c=this.value();return t.apply(L(c)?c:[],a)}return this[i](function(f){return t.apply(L(f)?f:[],a)})}}),it(W.prototype,function(e,t){var i=d[t];if(i){var o=i.name+"";X.call(en,o)||(en[o]=[]),en[o].push({name:t,func:i})}}),en[mi(s,K).name]=[{name:"wrapper",func:s}],W.prototype.clone=Jm,W.prototype.reverse=Xm,W.prototype.value=Qm,d.prototype.at=B_,d.prototype.chain=M_,d.prototype.commit=A_,d.prototype.next=I_,d.prototype.plant=F_,d.prototype.reverse=$_,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=O_,d.prototype.first=d.prototype.head,bn&&(d.prototype[bn]=N_),d},Xt=Am();Vt?((Vt.exports=Xt)._=Xt,Gi._=Xt):me._=Xt}).call(an)}($n,$n.exports);var v=$n.exports;const eo={methods:{getFieldRowClasses(n){const l=this.fieldErrors(n).length>0,s={[v.get(this.options,"validationErrorClass","error")]:l,[v.get(this.options,"validationSuccessClass","valid")]:!l,disabled:this.fieldDisabled(n),readonly:this.fieldReadonly(n),featured:this.fieldFeatured(n),required:this.fieldRequired(n)};return v.isArray(n.styleClasses)?v.forEach(n.styleClasses,p=>s[p]=!0):v.isString(n.styleClasses)&&(s[n.styleClasses]=!0),v.isNil(n.type)||(s["field-"+n.type]=!0),s},fieldErrors(n){return this.errors.filter(s=>s.field.fieldName===n.fieldName).map(s=>s.error)},fieldDisabled(n){return v.isFunction(n.disabled)?n.disabled.call(this,this.model,n,this):v.isNil(n.disabled)?!1:n.disabled},fieldReadonly(n){return v.isFunction(n.readonly)?n.readonly.call(this,this.model,n,this):v.isNil(n.readonly)?!1:n.readonly},fieldFeatured(n){return v.isFunction(n.featured)?n.featured.call(this,this.model,n,this):v.isNil(n.featured)?!1:n.featured},fieldRequired(n){return v.isFunction(n.required)?n.required.call(this,this.model,n,this):v.isNil(n.required)?!1:n.required}}},to=(n,l="")=>typeof n.id<"u"?l+n.id:l+(n.inputName||n.label||n.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),no=(n="")=>n.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var io=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,_t="\\d\\d?",yt="\\d\\d",ma="\\d{3}",pa="\\d{4}",dn="[^\\s]+",ro=/\[([^]*?)\]/gm;function oo(n,l){for(var s=[],p=0,h=n.length;p<h;p++)s.push(n[p].substr(0,l));return s}var so=function(n){return function(l,s){var p=s[n].map(function(u){return u.toLowerCase()}),h=p.indexOf(l.toLowerCase());return h>-1?h:null}};function Nt(n){for(var l=[],s=1;s<arguments.length;s++)l[s-1]=arguments[s];for(var p=0,h=l;p<h.length;p++){var u=h[p];for(var b in u)n[b]=u[b]}return n}var lo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ao=["January","February","March","April","May","June","July","August","September","October","November","December"],ga=oo(ao,3),_a=oo(lo,3),co={dayNamesShort:_a,dayNames:lo,monthNamesShort:ga,monthNames:ao,amPm:["am","pm"],DoFn:function(n){return n+["th","st","nd","rd"][n%10>3?0:(n-n%10!==10?1:0)*n%10]}},On=Nt({},co),ya=function(n){return On=Nt(On,n)},uo=function(n){return n.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Se=function(n,l){for(l===void 0&&(l=2),n=String(n);n.length<l;)n="0"+n;return n},ba={D:function(n){return String(n.getDate())},DD:function(n){return Se(n.getDate())},Do:function(n,l){return l.DoFn(n.getDate())},d:function(n){return String(n.getDay())},dd:function(n){return Se(n.getDay())},ddd:function(n,l){return l.dayNamesShort[n.getDay()]},dddd:function(n,l){return l.dayNames[n.getDay()]},M:function(n){return String(n.getMonth()+1)},MM:function(n){return Se(n.getMonth()+1)},MMM:function(n,l){return l.monthNamesShort[n.getMonth()]},MMMM:function(n,l){return l.monthNames[n.getMonth()]},YY:function(n){return Se(String(n.getFullYear()),4).substr(2)},YYYY:function(n){return Se(n.getFullYear(),4)},h:function(n){return String(n.getHours()%12||12)},hh:function(n){return Se(n.getHours()%12||12)},H:function(n){return String(n.getHours())},HH:function(n){return Se(n.getHours())},m:function(n){return String(n.getMinutes())},mm:function(n){return Se(n.getMinutes())},s:function(n){return String(n.getSeconds())},ss:function(n){return Se(n.getSeconds())},S:function(n){return String(Math.round(n.getMilliseconds()/100))},SS:function(n){return Se(Math.round(n.getMilliseconds()/10),2)},SSS:function(n){return Se(n.getMilliseconds(),3)},a:function(n,l){return n.getHours()<12?l.amPm[0]:l.amPm[1]},A:function(n,l){return n.getHours()<12?l.amPm[0].toUpperCase():l.amPm[1].toUpperCase()},ZZ:function(n){var l=n.getTimezoneOffset();return(l>0?"-":"+")+Se(Math.floor(Math.abs(l)/60)*100+Math.abs(l)%60,4)},Z:function(n){var l=n.getTimezoneOffset();return(l>0?"-":"+")+Se(Math.floor(Math.abs(l)/60),2)+":"+Se(Math.abs(l)%60,2)}},fo=function(n){return+n-1},ho=[null,_t],mo=[null,dn],po=["isPm",dn,function(n,l){var s=n.toLowerCase();return s===l.amPm[0]?0:s===l.amPm[1]?1:null}],go=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(n){var l=(n+"").match(/([+-]|\d\d)/gi);if(l){var s=+l[1]*60+parseInt(l[2],10);return l[0]==="+"?s:-s}return 0}],wa={D:["day",_t],DD:["day",yt],Do:["day",_t+dn,function(n){return parseInt(n,10)}],M:["month",_t,fo],MM:["month",yt,fo],YY:["year",yt,function(n){var l=new Date,s=+(""+l.getFullYear()).substr(0,2);return+(""+(+n>68?s-1:s)+n)}],h:["hour",_t,void 0,"isPm"],hh:["hour",yt,void 0,"isPm"],H:["hour",_t],HH:["hour",yt],m:["minute",_t],mm:["minute",yt],s:["second",_t],ss:["second",yt],YYYY:["year",pa],S:["millisecond","\\d",function(n){return+n*100}],SS:["millisecond",yt,function(n){return+n*10}],SSS:["millisecond",ma],d:ho,dd:ho,ddd:mo,dddd:mo,MMM:["month",dn,so("monthNamesShort")],MMMM:["month",dn,so("monthNames")],a:po,A:po,ZZ:go,Z:go},Vn={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"},va=function(n){return Nt(Vn,n)},Ea=function(n,l,s){if(l===void 0&&(l=Vn.default),s===void 0&&(s={}),typeof n=="number"&&(n=new Date(n)),Object.prototype.toString.call(n)!=="[object Date]"||isNaN(n.getTime()))throw new Error("Invalid Date pass to format");l=Vn[l]||l;var p=[];l=l.replace(ro,function(u,b){return p.push(b),"@@@"});var h=Nt(Nt({},On),s);return l=l.replace(io,function(u){return ba[u](n,h)}),l.replace(/@@@/g,function(){return p.shift()})};function Ca(n,l,s){if(s===void 0&&(s={}),typeof l!="string")throw new Error("Invalid format in fecha parse");if(l=Vn[l]||l,n.length>1e3)return null;var p=new Date,h={year:p.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},u=[],b=[],_=l.replace(ro,function(Te,he){return b.push(uo(he)),"@@@"}),T={},A={};_=uo(_).replace(io,function(Te){var he=wa[Te],tt=he[0],Ye=he[1],wt=he[3];if(T[tt])throw new Error("Invalid format. "+tt+" specified twice in format");return T[tt]=!0,wt&&(A[wt]=!0),u.push(he),"("+Ye+")"}),Object.keys(A).forEach(function(Te){if(!T[Te])throw new Error("Invalid format. "+Te+" is required in specified format")}),_=_.replace(/@@@/g,function(){return b.shift()});var V=n.match(new RegExp(_,"i"));if(!V)return null;for(var j=Nt(Nt({},On),s),J=1;J<V.length;J++){var we=u[J-1],et=we[0],st=we[2],fe=st?st(V[J],j):+V[J];if(fe==null)return null;h[et]=fe}h.isPm===1&&h.hour!=null&&+h.hour!=12?h.hour=+h.hour+12:h.isPm===0&&+h.hour==12&&(h.hour=0);var K;if(h.timezoneOffset==null){K=new Date(h.year,h.month,h.day,h.hour,h.minute,h.second,h.millisecond);for(var Y=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],J=0,ce=Y.length;J<ce;J++)if(T[Y[J][0]]&&h[Y[J][0]]!==K[Y[J][1]]())return null}else if(K=new Date(Date.UTC(h.year,h.month,h.day,h.hour,h.minute-h.timezoneOffset,h.second,h.millisecond)),h.month>11||h.month<0||h.day>31||h.day<1||h.hour>23||h.hour<0||h.minute>59||h.minute<0||h.second>59||h.second<0)return null;return K}var Le={format:Ea,parse:Ca,defaultI18n:co,setGlobalDateI18n:ya,setGlobalDateMasks:va};const ge={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 xe(n,l,s=ge){return v.isNil(n)||n===""?l?[ie(s.fieldIsRequired)]:[]:null}function ie(n,...l){if(n!=null&&l.length>0)for(let s=0;s<l.length;s++)n=n.replace("{"+(s-1)+"}",l[s]);return n}const cn={resources:ge,required(n,l,s,p=ge){return xe(n,l.required,p)},number(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=[];return v.isFinite(n)?(!v.isNil(l.min)&&n<l.min&&u.push(ie(p.numberTooSmall,l.min)),!v.isNil(l.max)&&n>l.max&&u.push(ie(p.numberTooBig,l.max))):u.push(ie(p.invalidNumber)),u},integer(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=cn.number(n,l,s,p);return v.isInteger(n)||u.push(ie(p.invalidInteger)),u},double(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!v.isNumber(n)||isNaN(n))return[ie(p.invalidNumber)]},string(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=[];return v.isString(n)?(!v.isNil(l.min)&&n.length<l.min&&u.push(ie(p.textTooSmall,n.length,l.min)),!v.isNil(l.max)&&n.length>l.max&&u.push(ie(p.textTooBig,n.length,l.max))):u.push(ie(p.thisNotText)),u},array(n,l,s,p=ge){if(l.required){if(!v.isArray(n))return[ie(p.thisNotArray)];if(n.length===0)return[ie(p.fieldIsRequired)]}if(!v.isNil(n)){if(!v.isNil(l.min)&&n.length<l.min)return[ie(p.selectMinItems,l.min)];if(!v.isNil(l.max)&&n.length>l.max)return[ie(p.selectMaxItems,l.max)]}},date(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=new Date(n);if(isNaN(u.getDate()))return[ie(p.invalidDate)];const b=[];if(!v.isNil(l.min)){const _=new Date(l.min);u.valueOf()<_.valueOf()&&b.push(ie(p.dateIsEarly,Le.format(u),Le.format(_)))}if(!v.isNil(l.max)){const _=new Date(l.max);u.valueOf()>_.valueOf()&&b.push(ie(p.dateIsLate,Le.format(u),Le.format(_)))}return b},regexp(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!v.isNil(l.pattern)&&!new RegExp(l.pattern).test(n))return[ie(p.invalidFormat)]},email(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;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(n))return[ie(p.invalidEmail)]},url(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(n))return[ie(p.invalidURL)]},creditCard(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;const u=/^(?: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})$/,b=n.replace(/[^0-9]+/g,"");if(!u.test(b))return[ie(p.invalidCard)];let _=0,T,A,V;for(let j=b.length-1;j>=0;j--)T=b.substring(j,j+1),A=parseInt(T,10),V?(A*=2,A>=10?_+=A%10+1:_+=A):_+=A,V=!V;if(!(_%10===0&&b))return[ie(p.invalidCardNumber)]},alpha(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!/^[a-zA-Z]*$/.test(n))return[ie(p.invalidTextContainNumber)]},alphaNumeric(n,l,s,p=ge){const h=xe(n,l.required,p);if(h!=null)return h;if(!/^[a-zA-Z0-9]*$/.test(n))return[ie(p.invalidTextContainSpec)]}};Object.keys(cn).forEach(n=>{const l=cn[n];v.isFunction(l)&&(l.locale=s=>(p,h,u)=>l(p,h,u,v.defaults(s,ge)))});function _o(n){return v.isString(n)?cn[n]!=null?cn[n]:(console.warn(`'${n}' is not a validator function!`),null):n}function Ai(n,l,s){let p=v.get(s.context,"schema.attributes",{});const h=l.value||"input";v.isString(h)&&(p=v.get(p,h)||p),v.forEach(p,(u,b)=>{n.setAttribute(b,u)})}const H={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:Ai,updated:Ai,componentUpdated:Ai}},computed:{value:{cache:!1,get(){let n;return v.isFunction(v.get(this.schema,"get"))?n=this.schema.get(this.model):n=v.get(this.model,this.schema.model),this.formatValueToField(n)},set(n){const l=this.value;n=this.formatValueToModel(n),v.isFunction(n)?n(n,l):this.updateModelValue(n,l)}}},methods:{validate(n){this.clearValidationErrors();const l=v.get(this.formOptions,"validateAsync",!1);let s=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const h=[];v.isArray(this.schema.validator)?v.forEach(this.schema.validator,u=>{h.push(_o(u).bind(this))}):h.push(_o(this.schema.validator).bind(this)),v.forEach(h,u=>{if(l)s.push(u(this.value,this.schema,this.model));else{const b=u(this.value,this.schema,this.model);b&&v.isFunction(b.then)?b.then(_=>{_&&(this.errors=this.errors.concat(_));const T=this.errors.length===0;this.$emit("validated",T,this.errors,this)}):b&&(s=s.concat(b))}})}const p=h=>{let u=[];v.forEach(v.uniq(h),_=>{v.isArray(_)&&_.length>0?u=u.concat(_):v.isString(_)&&u.push(_)}),v.isFunction(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,u,this.schema);const b=u.length===0;return n||this.$emit("validated",b,u,this),this.errors=u,u};return l?Promise.all(s).then(p):p(s)},debouncedValidate(){v.isFunction(this.debouncedValidateFunc)||(this.debouncedValidateFunc=v.debounce(this.validate.bind(this),v.get(this.schema,"validateDebounceTime",v.get(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(n,l){let s=!1;v.isFunction(this.schema.set)?(this.schema.set(this.model,n),s=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,n),s=!0),s&&(this.$emit("modelUpdated",n,this.schema.model),v.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,n,l,this.schema),v.get(this.formOptions,"validateAfterChanged",!1)===!0&&(v.get(this.schema,"validateDebounceTime",v.get(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(n,l){let s=n.replace(/\[(\w+)\]/g,".$1");s=s.replace(/^\./,"");let p=this.model;const h=s.split(".");let u=0;const b=h.length;for(;u<b;){const _=h[u];if(u<b-1)p[_]!==void 0||(p[_]={}),p=p[_];else{p[_]=l;return}++u}},getFieldID(n,l=!1){const s=v.get(this.formOptions,"fieldIdPrefix","");return to(n,s)+(l?"-"+v.uniqueId():"")},getFieldClasses(){return v.get(this.schema,"fieldClasses",[])},formatValueToField(n){return n},formatValueToModel(n){return n}}},ka=Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"})),Sa={mixins:[H]},Ta=["id","autocomplete","disabled","name","required"];function Ba(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("input",{id:n.getFieldID(n.schema),type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=_=>n.value=_),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,name:n.schema.inputName,class:r.normalizeClass(n.schema.fieldClasses),required:n.schema.required},null,10,Ta)),[[r.vModelCheckbox,n.value],[b,"input"]])}const L1="",P=(n,l)=>{const s=n.__vccOpts||n;for(const[p,h]of l)s[p]=h;return s},Ma=P(Sa,[["render",Ba]]),Aa={class:"wrapper"},Ia=["disabled"],Na=["id","checked","disabled","onChange","name"],Fa=["disabled"],$a={class:"info"},Oa=r.createElementVNode("div",{class:"arrow"},null,-1),Va={class:"dropList"},Da=["id","checked","disabled","onChange","name"];function La(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",Aa,[n.schema.listBox?(r.openBlock(),r.createElementBlock("div",{key:0,class:"listbox form-control",disabled:n.disabled||null},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,_=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["list-row",{"is-checked":u.isItemChecked(_)}])},[r.createElementVNode("label",null,[r.withDirectives(r.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"checkbox",checked:u.isItemChecked(_)||null,disabled:n.disabled||null,onChange:T=>u.onChanged(T,_),name:u.getInputName(_)},null,40,Na),[[b,"input"]]),r.createTextVNode(r.toDisplayString(u.getItemName(_)),1)])],2))),256))],8,Ia)):r.createCommentVNode("",!0),n.schema.listBox?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:1,class:"combobox form-control",disabled:n.disabled||null},[r.createElementVNode("div",{class:r.normalizeClass(["mainRow",{expanded:h.comboExpanded}]),onClick:l[0]||(l[0]=(..._)=>u.onExpandCombo&&u.onExpandCombo(..._))},[r.createElementVNode("div",$a,r.toDisplayString(u.selectedCount)+" selected",1),Oa],2),r.createElementVNode("div",Va,[h.comboExpanded?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(u.items,_=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["list-row",{"is-checked":u.isItemChecked(_)}])},[r.createElementVNode("label",null,[r.withDirectives(r.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"checkbox",checked:u.isItemChecked(_)||null,disabled:n.disabled||null,onChange:T=>u.onChanged(T,_),name:u.getInputName(_)},null,40,Da),[[b,"input"]]),r.createTextVNode(r.toDisplayString(u.getItemName(_)),1)])],2))),256)):r.createCommentVNode("",!0)])],8,Fa))])),[[b,"wrapper"]])}const x1="",xa=P({mixins:[H],data(){return{comboExpanded:!1}},computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(n){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?no(this.schema.inputName+"_"+this.getItemValue(n)):no(this.getItemValue(n))},getItemValue(n){if(v.isObject(n)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return n[this.schema.checklistOptions.value];if(typeof n.value<"u")return n.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 n},getItemName(n){if(v.isObject(n)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return n[this.schema.checklistOptions.name];if(typeof n.name<"u")return n.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 n},isItemChecked(n){return this.value&&this.value.indexOf(this.getItemValue(n))!==-1},onChanged(n,l){if((v.isNil(this.value)||!Array.isArray(this.value))&&(this.value=[]),n.target.checked){const s=v.clone(this.value);s.push(this.getItemValue(l)),this.value=s}else{const s=v.clone(this.value);s.splice(this.value.indexOf(this.getItemValue(l)),1),this.value=s}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",La]]),Ua={class:"wrapper"},Ra=["id","type","value","disabled","accept","alt","autocomplete","checked","dirname","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","width","files"],Pa={key:0,class:"helper"};function qa(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",Ua,[r.withDirectives(r.createElementVNode("input",{class:r.normalizeClass(["form-control",n.schema.fieldClasses]),id:n.getFieldID(n.schema),type:u.inputType,value:n.value,onInput:l[0]||(l[0]=(..._)=>u.onInput&&u.onInput(..._)),onBlur:l[1]||(l[1]=(..._)=>u.onBlur&&u.onBlur(..._)),onChange:l[2]||(l[2]=(..._)=>n.schema.onChange&&n.schema.onChange(..._)),disabled:n.disabled||null,accept:n.schema.accept,alt:n.schema.alt,autocomplete:n.schema.autocomplete,checked:n.schema.checked||null,dirname:n.schema.dirname,formaction:n.schema.formaction,formenctype:n.schema.formenctype,formmethod:n.schema.formmethod,formnovalidate:n.schema.formnovalidate,formtarget:n.schema.formtarget,height:n.schema.height,list:n.schema.list,max:n.schema.max,maxlength:n.schema.maxlength,min:n.schema.min,minlength:n.schema.minlength,multiple:n.schema.multiple,name:n.schema.inputName,pattern:n.schema.pattern,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,size:n.schema&&n.schema.size>0?n.schema.size:1,src:n.schema.src,step:n.schema.step,width:n.schema.width,files:n.schema.files},null,42,Ra),[[b,"input"]]),n.schema.inputType.toLowerCase()==="color"||n.schema.inputType.toLowerCase()==="range"?(r.openBlock(),r.createElementBlock("span",Pa,r.toDisplayString(n.value),1)):r.createCommentVNode("",!0)])),[[b,"wrapper"]])}const R1="",yo={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},Wa=P({mixins:[H],computed:{inputType(){return this.schema&&this.schema.inputType==="datetime"?"datetime-local":this.schema.inputType}},mounted(){switch(this.schema.inputType.toLowerCase()){case"number":case"range":this.debouncedFormatFunc=v.debounce((n,l)=>{this.formatNumberToModel(n,l)},parseInt(v.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":this.debouncedFormatFunc=v.debounce((n,l)=>{this.formatDatetimeToModel(n,l)},parseInt(v.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}},created(){this.schema.inputType.toLowerCase()==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")},methods:{formatValueToModel(n){if(n!=null)switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":case"number":case"range":return(l,s)=>{this.debouncedFormatFunc(n,s)}}return n},formatValueToField(n){switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":return this.formatDatetimeValueToField(n)}return n},formatDatetimeToModel(n,l){const s=yo[this.schema.inputType.toLowerCase()],p=Le.parse(n,s);p!==!1&&(this.schema.format?n=Le.format(p,this.schema.format):n=p.valueOf()),this.updateModelValue(n,l)},formatDatetimeValueToField(n){if(n==null)return null;const l=yo[this.schema.inputType.toLowerCase()];let s=n;return v.isNumber(n)||(s=Le.parse(n,l)),s!==!1?Le.format(s,l):n},formatNumberToModel(n,l){v.isNumber(n)||(n=NaN),this.updateModelValue(n,l)},onInput(n){let l=n.target.value;switch(this.schema.inputType.toLowerCase()){case"number":case"range":v.isNumber(parseFloat(n.target.value))&&(l=parseFloat(n.target.value));break}this.value=l},onBlur(){v.isFunction(this.debouncedFormatFunc)&&this.debouncedFormatFunc.flush()}}},[["render",qa]]),Ka=["id"];function za(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("span",{id:n.getFieldID(n.schema),class:r.normalizeClass(n.schema.fieldClasses)},[r.createTextVNode(r.toDisplayString(n.value),1)],10,Ka)),[[b,"label"]])}const q1="",Ha=P({mixins:[H]},[["render",za]]),Ya=["disabled"],Ga=["id","disabled","name","onClick","value","checked","required"];function Za(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"radio-list",disabled:n.disabled||null},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,_=>r.withDirectives((r.openBlock(),r.createElementBlock("label",{class:r.normalizeClass(u.getItemCssClasses(_))},[r.withDirectives(r.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"radio",disabled:u.isItemDisabled(_)||null,name:u.id,onClick:T=>u.onSelection(_),value:u.getItemValue(_),checked:u.isItemChecked(_)||null,class:r.normalizeClass(n.schema.fieldClasses),required:n.schema.required},null,10,Ga),[[b,"input"]]),r.createTextVNode(r.toDisplayString(u.getItemName(_)),1)],2)),[[b,"label"]])),256))],8,Ya)),[[b,"wrapper"]])}const K1="",Ja=P({mixins:[H],computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n},id(){return this.schema.model}},methods:{getItemValue(n){if(v.isObject(n)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.value<"u")return n[this.schema.radiosOptions.value];if(typeof n.value<"u")return n.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 n},getItemName(n){if(v.isObject(n)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.name<"u")return n[this.schema.radiosOptions.name];if(typeof n.name<"u")return n.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 n},getItemCssClasses(n){return{"is-checked":this.isItemChecked(n),"is-disabled":this.isItemDisabled(n)}},onSelection(n){this.value=this.getItemValue(n)},isItemChecked(n){return this.getItemValue(n)===this.value},isItemDisabled(n){if(this.disabled)return!0;const l=v.get(n,"disabled",!1);return v.isFunction(l)?l(this.model):l}}},[["render",Za]]),Xa=["disabled","name","id"],Qa=["disabled"],ja=["label"],ed=["value"],td=["value"];function nd(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("select",{class:r.normalizeClass(["form-control",n.schema.fieldClasses]),"onUpdate:modelValue":l[0]||(l[0]=_=>n.value=_),disabled:n.disabled||null,name:n.schema.inputName,id:n.getFieldID(n.schema)},[u.selectOptions.hideNoneSelectedText?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("option",{key:0,disabled:n.schema.required||null,value:null},r.toDisplayString(u.selectOptions.noneSelectedText||"<Nothing selected>"),9,Qa)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,_=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[_.group?(r.openBlock(),r.createElementBlock("optgroup",{key:0,label:u.getGroupName(_)},[_.ops?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(_.ops,T=>(r.openBlock(),r.createElementBlock("option",{value:u.getItemValue(T)},r.toDisplayString(u.getItemName(T)),9,ed))),256)):r.createCommentVNode("",!0)],8,ja)):r.createCommentVNode("",!0),_.group?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("option",{key:1,value:u.getItemValue(_)},r.toDisplayString(u.getItemName(_)),9,td))],64))),256))],10,Xa)),[[r.vModelSelect,n.value],[b,"input"]])}const bo=P({mixins:[H],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const n=this.schema.values;return typeof n=="function"?this.groupValues(n.apply(this,[this.model,this.schema])):this.groupValues(n)}},methods:{formatValueToField(n){return v.isNil(n)?null:n},groupValues(n){const l=[];let s={};return n.forEach(p=>{s=null,p.group&&v.isObject(p)?(s=v.find(l,h=>h.group===p.group),s?s.ops.push({id:p.id,name:p.name}):(s={group:"",ops:[]},s.group=p.group,s.ops.push({id:p.id,name:p.name}),l.push(s))):l.push(p)}),l},getGroupName(n){if(n&&n.group)return n.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(n){if(v.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return n[this.schema.selectOptions.value];if(typeof n.id<"u")return n.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 n},getItemName(n){if(v.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return n[this.schema.selectOptions.name];if(typeof n.name<"u")return n.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 n}}},[["render",nd]]),id=["id","value","name","disabled"];function rd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("input",{id:n.getFieldID(n.schema),type:"submit",value:n.schema.buttonText,onClick:l[0]||(l[0]=(...b)=>u.onClick&&u.onClick(...b)),name:n.schema.inputName,disabled:n.disabled||null,class:r.normalizeClass(n.schema.fieldClasses)},null,10,id)}const Y1="",od=P({mixins:[H],methods:{onClick(n){if(this.schema.validateBeforeSubmit===!0){n.preventDefault();const l=v.get(this.formOptions,"validateAsync",!1),s=this.vfg.validate(),p=h=>{l&&!v.isEmpty(h)||!l&&!h?v.isFunction(this.schema.onValidationError)&&this.schema.onValidationError(this.model,this.schema,h,n):v.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,n)};s&&v.isFunction(s.then)?s.then(p):p(s)}else v.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,n)}}},[["render",rd]]),sd=["id","disabled","maxlength","minlength","placeholder","readonly","required","rows","name"];function ld(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("textarea",{class:r.normalizeClass(["form-control",n.schema.fieldClasses]),"onUpdate:modelValue":l[0]||(l[0]=_=>n.value=_),id:n.getFieldID(n.schema),disabled:n.disabled||null,maxlength:n.schema.max,minlength:n.schema.min,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,rows:n.schema.rows||2,name:n.schema.inputName},null,10,sd)),[[r.vModelText,n.value],[b,"input"]])}const wo=P({mixins:[H]},[["render",ld]]),ad={class:"wrapper"},dd=["id","name","accept","multiple","placeholder","readonly","required","disabled"];function cd(n,l,s,p,h,u){const b=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",ad,[r.withDirectives(r.createElementVNode("input",{class:"form-control",id:n.getFieldID(n.schema),type:"file",name:n.schema.inputName,onChange:l[0]||(l[0]=(..._)=>u.onChange&&u.onChange(..._)),accept:n.schema.accept,multiple:n.schema.multiple,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,disabled:n.disabled||null},null,40,dd),[[b,"input"]])])),[[b,"wrapper"]])}const J1="",ud=P({mixins:[H],methods:{onChange(n){v.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,n,this)}}},[["render",cd]]),fd=["value","autocomplete","disabled","placeholder","readonly","name","id"];function hd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("input",{class:"form-control",type:"text",value:n.value,autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,fd)}const md=P({mixins:[H],data(){return{cleave:null}},mounted(){this.$nextTick(function(){window.Cleave?(this.cleave=new window.Cleave(this.$el,v.defaults(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",hd]]),vo={formatValueToField(n){if(n!=null){const l=this.schema.format?Le.parse(n,this.schema.format):new Date(n);return Le.format(l,this.getDateFormat())}return n},formatValueToModel(n){if(n!=null){const l=Le.parse(n,this.getDateFormat());this.schema.format?n=Le.format(l,this.schema.format):n=l.valueOf()}return n}},pd={class:"input-group date"},gd=["autocomplete","disabled","placeholder","readonly","name","id"],_d=r.createElementVNode("span",{class:"input-group-addon"},[r.createElementVNode("span",{class:"glyphicon glyphicon-calendar"})],-1);function yd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",pd,[r.withDirectives(r.createElementVNode("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,gd),[[r.vModelText,n.value]]),_d])}const Eo="YYYY-MM-DD HH:mm:ss",bd={mixins:[H],mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.datetimepicker){const n=this.$el.querySelector(".form-control");$(this.$el).datetimepicker(v.defaults(this.schema.dateTimePickerOptions||{},{format:Eo})).on("dp.change",()=>{this.value=n.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:Eo},...vo}},wd=P(bd,[["render",yd]]),vd=["autocomplete","disabled","placeholder","readonly","name","id"];function Ed(n,l,s,p,h,u){return r.withDirectives((r.openBlock(),r.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,debounce:"500",onFocus:l[1]||(l[1]=b=>u.geolocate()),id:n.getFieldID(n.schema)},null,40,vd)),[[r.vModelText,n.value]])}const Cd=P({mixins:[H],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 n=this.autocomplete.getPlace();if(n){this.value=n.formatted_address;const l={};if(n.address_components!==void 0)for(let s=0;s<n.address_components.length;s++){const p=n.address_components[s].types[0];this.inputs[p]&&(l[p]=n.address_components[s][this.inputs[p]])}v.isFunction(this.schema.onPlaceChanged)&&this.schema.onPlaceChanged(this.value,l,n,this.model,this.schema)}},geolocate(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(n=>{const l={lat:n.coords.latitude,lng:n.coords.longitude},s=new window.google.maps.Circle({center:l,radius:n.coords.accuracy});this.autocomplete.setBounds(s.getBounds())})}}},[["render",Ed]]),kd={class:"wrapper"},Sd=["autocomplete","disabled","placeholder","readonly"],Td=["disabled","name"];function Bd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",kd,[r.withDirectives(r.createElementVNode("input",{class:"form-control link",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>u.wrappedValue=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly},null,8,Sd),[[r.vShow,n.schema.hideInput!==!0],[r.vModelText,u.wrappedValue]]),n.schema.browse!==!1?(r.openBlock(),r.createElementBlock("input",{key:0,class:"form-control file",type:"file",disabled:n.disabled||null,onChange:l[1]||(l[1]=(...b)=>u.fileChanged&&u.fileChanged(...b)),name:n.schema.inputName},null,40,Td)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"preview",style:r.normalizeStyle(u.previewStyle)},[r.createElementVNode("div",{class:"remove",title:"Remove image",onClick:l[2]||(l[2]=(...b)=>u.remove&&u.remove(...b))})],4)])}const eb="",Md=P({mixins:[H],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(n){n&&n.indexOf("http")===0&&(this.value=n)}}},watch:{model:{deep:!0,handler(){const n=this.$el.querySelector("input.file");n&&(n.value="")}}},methods:{remove(){this.value=""},fileChanged(n){const l=new FileReader;l.onload=s=>{this.value=s.target.result},n.target.files&&n.target.files.length>0&&l.readAsDataURL(n.target.files[0])}}},[["render",Bd]]),Ad=["autocomplete","disabled","placeholder","readonly","name","id"];function Id(n,l,s,p,h,u){return r.withDirectives((r.openBlock(),r.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,Ad)),[[r.vModelText,n.value]])}const Nd=P({mixins:[H],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",Id]]),ib="",Fd={mixins:[H],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,v.defaults(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(n){v.isArray(n)?this.value=[parseFloat(n[0]),parseFloat(n[1])]:this.value=parseFloat(n)},formatValueToField(n){this.slider!==null&&typeof this.slider.noUiSlider<"u"&&this.slider.noUiSlider.set(n)},formatValueToModel(n){if(typeof this.slider.noUiSlider<"u")return n instanceof Array?[Number(n[0]),Number(n[1])]:Number(n)},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}}},$d=["disabled"];function Od(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["slider",{"contain-pips":u.containPips,"contain-tooltip":u.containTooltip}]),disabled:n.disabled||null},null,10,$d)}const Vd=P(Fd,[["render",Od]]),Dd=["autocomplete","disabled","placeholder","readonly","name"];function Ld(n,l,s,p,h,u){return r.withDirectives((r.openBlock(),r.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName},null,8,Dd)),[[r.vModelText,n.value]])}const xd="YYYY-MM-DD",Ud={mixins:[H],data(){return{picker:null,options:null}},mounted(){this.initialize(v.get(this.schema,"pikadayOptions",{}))},beforeUnmount(){this.picker&&this.picker.destroy()},methods:{getDateFormat(){return v.get(this.schema,"pikadayOptions.format",xd)},...vo,initialize(n){this.picker&&this.picker.destroy&&this.picker.destroy(),this.$nextTick(()=>{window.Pikaday?(this.options=v.defaults({},n,{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!")})}}},Rd=P(Ud,[["render",Ld]]),Pd=["autocomplete","data-disable","data-max","data-min","data-step","placeholder","readonly","name"];function qd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("input",{type:"text",autocomplete:n.schema.autocomplete,"data-disable":n.disabled,"data-max":n.schema.max,"data-min":n.schema.min,"data-step":n.schema.step,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName},null,8,Pd)}const rb="",Wd=P({mixins:[H],data(){return{slider:null}},watch:{model:{deep:!0,handler(){if(window.$&&window.$.fn.ionRangeSlider){let n,l;v.isArray(this.value)?[n,l]=this.value:n=this.value,this.slider&&this.slider.update({from:n,to:l})}}}},mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.ionRangeSlider){let n,l;v.isArray(this.value)?[n,l]=this.value:n=this.value;const s=this;$(this.$el).ionRangeSlider(v.defaults(this.schema.rangeSliderOptions||{},{type:"single",grid:!0,hide_min_max:!0,from:n,to:l,onChange(p){s.slider.options.type==="double"?s.value=[p.from,p.to]:s.value=p.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",qd]]),Kd=["disabled","multiple","title","name"],zd=["disabled","selected"],Hd=["value"];function Yd(n,l,s,p,h,u){return r.withDirectives((r.openBlock(),r.createElementBlock("select",{class:"selectpicker","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),disabled:n.disabled||null,multiple:n.schema.multiSelect,title:n.schema.placeholder,"data-width":"100%",name:n.schema.inputName},[n.schema.multiSelect!==!0?(r.openBlock(),r.createElementBlock("option",{key:0,disabled:n.schema.required||null,value:null,selected:n.value==null},null,8,zd)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,b=>(r.openBlock(),r.createElementBlock("option",{value:u.getItemValue(b)},r.toDisplayString(u.getItemName(b)),9,Hd))),256))],8,Kd)),[[r.vModelSelect,n.value]])}const sb="",Gd=P({mixins:[H],computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n}},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(n){if(v.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return n[this.schema.selectOptions.value];if(typeof n.id<"u")return n.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 n},getItemName(n){if(v.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return n[this.schema.selectOptions.name];if(typeof n.name<"u")return n.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 n}}},[["render",Yd]]),Zd=["autocomplete","disabled","placeholder","readonly","name","id"];function Jd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("input",{type:"text",autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,Zd)}const Xd=P({mixins:[H],data(){return{picker:null}},watch:{model:{deep:!0,handler(){window.$&&window.$.fn.spectrum&&this.picker.spectrum("set",this.value)}},disabled(n){n?this.picker.spectrum("disable"):this.picker.spectrum("enable")}},mounted(){this.$nextTick(function(){window.$&&window.$.fn.spectrum?(this.picker=$(this.$el).spectrum("destroy").spectrum(v.defaults(this.schema.colorOptions||{},{showInput:!0,showAlpha:!0,disabled:this.schema.disabled,allowEmpty:!this.schema.required,preferredFormat:"hex",change:n=>{this.value=n?n.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",Jd]]),Qd=["src"];function jd(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("img",{src:u.mapLink},null,8,Qd)}const db="",ec=P({mixins:[H],computed:{mapLink(){let n,l,s;if(this.value){const p=v.defaults(this.schema.staticMapOptions||{},{lat:"lat",lng:"lng",zoom:8,sizeX:640,sizeY:640});n=this.value[p.lat],l=this.value[p.lng],s=`http://maps.googleapis.com/maps/api/staticmap?center=${n},${l}&zoom=${p.zoom}&size=${p.sizeX}x${p.sizeY}`;const h=["scale","format","maptype","language","region","markers","path","visible","style","key","signature"];for(const u of h)typeof p[u]<"u"&&(s+=`&${u}=${p[u]}`)}return s}}},[["render",jd]]),tc=["autocomplete","disabled","name","id"],nc=["data-on","data-off","for"],ic=r.createElementVNode("span",{class:"handle"},null,-1);function rc(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("label",null,[r.withDirectives(r.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,tc),[[r.vModelCheckbox,n.value]]),r.createElementVNode("span",{class:"label","data-on":n.schema.textOn||"On","data-off":n.schema.textOff||"Off",for:n.getFieldID(n.schema)},null,8,nc),ic])}const ub="",oc=P({mixins:[H],methods:{formatValueToField(n){return n!=null&&this.schema.valueOn?n===this.schema.valueOn:n},formatValueToModel(n){return n!=null&&this.schema.valueOn?n?this.schema.valueOn:this.schema.valueOff:n}}},[["render",rc]]),sc={mixins:[H],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 n=Object.keys(this.value),l={};for(let s=0;s<n.length;s++){const p=n[s];l[p]=typeof this.value[p]}this.keyTypes=l},methods:{removeElement(n){const l=this.value;delete l[n],this.value=JSON.parse(JSON.stringify(l));const s=this.keyTypes;delete s[n],this.keyTypes=JSON.parse(JSON.stringify(s))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""}}},lc={key:0},ac={key:1},dc=["id"],cc={key:0},uc=["onUpdate:modelValue"],fc={key:1},hc=["onUpdate:modelValue"],mc={key:2},pc=["onUpdate:modelValue"],gc=["onClick"],_c=[r.createElementVNode("option",{value:"string"}," String ",-1),r.createElementVNode("option",{value:"number"}," Number ",-1),r.createElementVNode("option",{value:"boolean"}," Boolean ",-1)];function yc(n,l,s,p,h,u){const b=r.resolveComponent("vue-form-generator"),_=r.resolveDirective("attributes");return r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[n.schema.schema?(r.openBlock(),r.createElementBlock("div",lc,[r.createVNode(b,{model:n.value,options:n.formOptions,schema:n.schema.schema},null,8,["model","options","schema"])])):(r.openBlock(),r.createElementBlock("div",ac,[r.createElementVNode("table",{id:n.getFieldID(n.schema),class:r.normalizeClass(n.schema.fieldClasses)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(T,A)=>(r.openBlock(),r.createElementBlock("tr",{key:A},[r.createElementVNode("td",null,r.toDisplayString(A),1),h.keyTypes[A]==="string"?(r.openBlock(),r.createElementBlock("td",cc,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"text"},null,8,uc),[[r.vModelText,n.value[A]]])])):r.createCommentVNode("",!0),h.keyTypes[A]==="boolean"?(r.openBlock(),r.createElementBlock("td",fc,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"checkbox"},null,8,hc),[[r.vModelCheckbox,n.value[A]]])])):r.createCommentVNode("",!0),h.keyTypes[A]==="number"?(r.openBlock(),r.createElementBlock("td",mc,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"number"},null,8,pc),[[r.vModelText,n.value[A]]])])):r.createCommentVNode("",!0),r.createElementVNode("td",null,[r.createElementVNode("input",{type:"button",value:"x",onClick:V=>u.removeElement(A)},null,8,gc)])]))),128))],10,dc),r.withDirectives(r.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=T=>h.newKeyType=T)},_c,512),[[r.vModelSelect,h.newKeyType]]),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":l[1]||(l[1]=T=>h.newKeyName=T),type:"text"},null,512),[[r.vModelText,h.newKeyName]]),r.createElementVNode("input",{type:"button",value:"Add key",onClick:l[2]||(l[2]=(...T)=>u.addKey&&u.addKey(...T))})]))])),[[_,h.attributes]])}const Co=P(sc,[["render",yc]]),gb="",_b="",bc={mixins:[H],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:(n,l)=>({[this.schema.model]:n[l]}),set:(n,l,s)=>n[l]=s[this.schema.model]}):this.model[this.schema.model]}},mounted(){this.value||(this.value={});let n=[];this.subSchema?n=this.subSchema.fields:this.subFields&&(n=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,n,this.schema.model)},methods:{removeElement(n){const l=this.value;delete l[n],this.value={...l}},transformMapModelValuesToObject(n,l,s){const p={};return Object.keys(n).map(h=>{const u=h.indexOf(s+"-");if(u>-1&&Array.isArray(l))if(l.length>0){const _=h.split("-").filter(A=>l.find(V=>V.model===A)),T=h.split(`-${_}`)[0].split(`${s}-`)[1];_.length?p[T]={...p[T],[_]:n[h]}:p[h.substring(u+`${s}-`.length)]=n[h]}else p[h.substring(`${s}-`.length)]=n[h];else{const _=h.split("-").filter(A=>A===this.schema.model),T=h.split(`-${_}`)[0].split(`${s}-`)[1];T&&(p[T]=n[h])}return h}),p},addKey(){const n=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",l=this.subSchema?n?[""]:{}:"";this.value[this.newKeyName]=l,this.newKeyName=""},updateModel(n,l){this.$emit("model-updated",this.model[this.schema.model],l)}}},ko=n=>(r.pushScopeId("data-v-622b5894"),n=n(),r.popScopeId(),n),wc=["id"],vc=["data-testid"],Ec={class:"item-wrapper"},Cc={class:"index-wrapper"},kc=ko(()=>r.createElementVNode("hr",{class:"divider"},null,-1)),Sc={key:0},Tc={key:1},Bc=["onUpdate:modelValue","placeholder","onInput"],Mc={key:0,class:"hint"},Ac=ko(()=>r.createElementVNode("hr",{class:"wide-divider"},null,-1)),Ic={class:"input-item"},Nc=["placeholder"],Fc={key:0,class:"hint"};function $c(n,l,s,p,h,u){const b=r.resolveComponent("KIcon"),_=r.resolveComponent("KButton"),T=r.resolveComponent("vue-form-generator");return r.openBlock(),r.createElementBlock("div",{id:n.getFieldID(n.schema),class:r.normalizeClass(["object-advanced-wrapper",n.schema.fieldClasses])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(A,V)=>(r.openBlock(),r.createElementBlock("div",{key:V,"data-testid":`field-object-key-${V}`},[r.createElementVNode("div",null,[r.createElementVNode("div",Ec,[r.createElementVNode("div",Cc,[r.createElementVNode("strong",null,r.toDisplayString(V),1),r.createElementVNode("div",null,[r.createVNode(_,{appearance:"tertiary",class:"delete",type:"button",onClick:j=>u.removeElement(V)},{default:r.withCtx(()=>[r.createVNode(b,{icon:"trash",size:"18"})]),_:2},1032,["onClick"])])]),kc,u.subSchema?(r.openBlock(),r.createElementBlock("div",Sc,[r.createVNode(T,{model:u.transformedModel[V],options:{helpAsHtml:!0},schema:u.subSchema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])):(r.openBlock(),r.createElementBlock("div",Tc,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":j=>n.value[V]=j,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:"text",onInput:j=>u.updateModel(n.value[V],n.model[n.schema.model])},null,40,Bc),[[r.vModelText,n.value[V]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(r.openBlock(),r.createElementBlock("p",Mc,r.toDisplayString(n.schema.fields[0].schema.hint),1)):r.createCommentVNode("",!0)])),Ac])])],8,vc))),128)),r.createElementVNode("div",{class:r.normalizeClass(["input-wrapper",{indent:u.hasObjectKeys}])},[r.createElementVNode("div",Ic,[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=A=>h.newKeyName=A),class:"form-control","data-testid":"keyname-input",placeholder:n.schema.placeholder,type:"text"},null,8,Nc),[[r.vModelText,h.newKeyName]]),r.createVNode(_,{appearance:"tertiary","data-testid":"add-key",disabled:!h.newKeyName,onClick:u.addKey},{default:r.withCtx(()=>[r.createTextVNode(" + Add "+r.toDisplayString(n.schema.buttonLabel||n.schema.label),1)]),_:1},8,["disabled","onClick"])]),n.schema.hintText?(r.openBlock(),r.createElementBlock("p",Fc,r.toDisplayString(n.schema.hintText),1)):r.createCommentVNode("",!0)],2)],10,wc)}const So=P(bc,[["render",$c],["__scopeId","data-v-622b5894"]]),yb="",bb="",Oc={name:"FieldArrayItem",props:{model:{type:String,default:null}},emits:["remove-item"],data(){return{contentVisible:!1}}},Vc={class:"array-item"};function Dc(n,l,s,p,h,u){const b=r.resolveComponent("KIcon"),_=r.resolveComponent("KButton");return r.openBlock(),r.createElementBlock("div",Vc,[r.renderSlot(n.$slots,"default",{},void 0,!0),r.createVNode(_,{appearance:"tertiary",class:"delete",type:"button",onClick:l[0]||(l[0]=T=>n.$emit("remove-item"))},{icon:r.withCtx(()=>[r.createVNode(b,{icon:"trash",size:"18"})]),_:1})])}const To=P(Oc,[["render",Dc],["__scopeId","data-v-b43f32dd"]]),wb="",Lc={name:"FieldArrayMultiItem",emits:["remove-item"],data(){return{contentVisible:!1}}},xc=n=>(r.pushScopeId("data-v-47ff1f9a"),n=n(),r.popScopeId(),n),Uc={class:"multi-item-wrapper"},Rc=xc(()=>r.createElementVNode("hr",null,null,-1));function Pc(n,l,s,p,h,u){const b=r.resolveComponent("KButton");return r.openBlock(),r.createElementBlock("div",Uc,[r.renderSlot(n.$slots,"default",{},void 0,!0),r.createVNode(b,{appearance:"danger",class:"delete",type:"input",onClick:l[0]||(l[0]=_=>n.$emit("remove-item"))},{default:r.withCtx(()=>[r.createTextVNode(" - Remove Field ")]),_:1}),Rc])}const Bo=P(Lc,[["render",Pc],["__scopeId","data-v-47ff1f9a"]]),vb="",qc={name:"FieldMetric",mixins:[H],emits:["remove-item"],data(){return{contentVisible:!1}}},Wc=r.createElementVNode("i",{class:"material-icons"},"add",-1),Kc={key:0,class:"content"};function zc(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["field-dropdown",{active:h.contentVisible}])},[r.createElementVNode("div",{class:"title",onClick:l[0]||(l[0]=b=>h.contentVisible=!h.contentVisible)},[r.createTextVNode(r.toDisplayString(n.model.name?n.model.name:"New Item")+" ",1),Wc]),r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[h.contentVisible?(r.openBlock(),r.createElementBlock("div",Kc,[r.renderSlot(n.$slots,"default"),r.createElementVNode("i",{class:"material-icons",onClick:l[1]||(l[1]=b=>n.$emit("remove-item"))}," delete ")])):r.createCommentVNode("",!0)]),_:3})],2)}const Mo=P(qc,[["render",zc]]),bt="kong-ui-forms-api",Hc="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function Yc(n){return n?n.length===36&&new RegExp(`^${Hc}$`).test(n):!1}const Eb="",Cb="",Ii=50,Ft={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 Gc(n,l,s){return s?Ft.SET_REFERRAL_VALUE:n&&!l||!n&&l?Ft.UPDATE_ENTITY:n&&l?Ft.CREATE_FROM_ENTITY:Ft.CREATE_NOT_FROM_ENTITY}const Zc={mixins:[H],inject:[bt],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Gc(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 n,l;switch(this.fieldState){case Ft.UPDATE_ENTITY:if(!this[bt]){console.warn("[@kong-ui-public/forms] No API service provided");break}l=(await this[bt].getOne(this.entity,this.model[this.schema.model])).data,n=this.getItem(this.schema.entityDataKey?l[this.schema.entityDataKey]:l),this.idValue=n.id;break;case Ft.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Ft.SET_REFERRAL_VALUE:this.idValue=this.value}try{n&&(this.initialItems=[{...n,label:this.getSuggestionLabel(n),value:n.id}]),this.items=this.initialItems}catch(s){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",s)}},methods:{onQueryChange(n){n.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=v.debounce(this.search,500)),this.performSearch(n)},async search(n){if(n.trim().length===0)return;this.loading=!0;const l=[],s=[],p=this.getInputFields(),h=new Set;Yc(n)&&p.includes("id")?s.push((async()=>{const u=await this.fetchExact(n);l.push({...u,label:this.getSuggestionLabel(u),value:u.id})})()):s.push(...p.filter(u=>u!=="id").map(async u=>{(await this.fetchSuggestions(n,u)).forEach(_=>{h.has(_.id)||(h.add(_.id),l.push({..._,label:this.getSuggestionLabel(_),value:_.id}))})})),await Promise.all(s),this.items=l,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(n){return n.data?n.data.length>0?n.data[0]:[]:n},async fetchUntilLimit(n){const l=[];let s=null;if(!this[bt])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;l.length<Ii;){const p=await this[bt].getAll(this.entity,{size:Ii,offset:s,...n});if(l.push(...p.data.data),s=p.data.offset,!s)break}return l.slice(0,Ii)},async fetchSuggestions(n,l){return this.fetchUntilLimit({[l]:n})},async fetchExact(n){return this[bt]?(await this[bt].getOne(this.entity,n)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var n,l;return((l=(n=this.schema)==null?void 0:n.inputValues)==null?void 0:l.fields)||[]},getSuggestionLabel(n){const l=this.getInputFields();return l.length&&n?l.map(s=>n[s]).filter(Boolean).join(" - "):""},updateModel(n){this.$emit("model-updated",n&&n.length?n:null,this.schema.model)},onSelected(n){this.idValue=n&&n.id,this.updateModel(this.getReturnValue(n||{}))},getReturnValue(n){var s;const l=(s=this.schema)==null?void 0:s.returnKey;return l?n[l]:n.id}}},Jc={class:"field-wrap autosuggest"},Xc=["data-testid","data-testlabel"],Qc=["data-testid"],jc={class:"autosuggest__results_message"};function eu(n,l,s,p,h,u){const b=r.resolveComponent("KSelect");return r.openBlock(),r.createElementBlock("div",Jc,[r.createVNode(b,{id:n.schema.model,ref:"suggestion",modelValue:h.idValue,"onUpdate:modelValue":l[0]||(l[0]=_=>h.idValue=_),appearance:"select",autosuggest:"",clearable:"","enable-filtering":"",items:h.items,loading:h.loading,placeholder:n.schema.placeholder,width:"100%",onChange:u.onSelected,onQueryChange:u.onQueryChange},{"item-template":r.withCtx(({item:_})=>[r.createElementVNode("span",{class:"first-part","data-testid":_.id&&`${_.id}-0`,"data-testlabel":_.label},r.toDisplayString(u.getSuggestionLabel(_).split(" - ")[0]),9,Xc),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.getSuggestionLabel(_).split(" - ").slice(1),(T,A)=>(r.openBlock(),r.createElementBlock("span",{key:A,class:"field-span","data-testid":_.id&&`${_.id}-${A+1}`||A+1},r.toDisplayString(T),9,Qc))),128))]),empty:r.withCtx(()=>[r.createElementVNode("div",jc,[r.createElementVNode("span",null,r.toDisplayString(h.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const Ao=P(Zc,[["render",eu],["__scopeId","data-v-27d6a440"]]),kb="",Sb="",tu={name:"FieldArrayCardContainer",props:{model:{type:Object,default:null},schema:{type:Object,default:null}},emits:["remove-item"]},nu={class:"array-card-container"};function iu(n,l,s,p,h,u){const b=r.resolveComponent("KCard"),_=r.resolveComponent("KIcon"),T=r.resolveComponent("KButton");return r.openBlock(),r.createElementBlock("div",nu,[r.createVNode(b,{class:"card"},{body:r.withCtx(()=>[r.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),r.createVNode(T,{onClick:l[0]||(l[0]=A=>n.$emit("remove-item"))},{icon:r.withCtx(()=>[r.createVNode(_,{icon:"trash",size:"18"})]),_:1})])}const Io=P(tu,[["render",iu],["__scopeId","data-v-2404b311"]]),Tb="",ru={mixins:[H],emits:["model-updated"],methods:{updateModel(n){this.$emit("model-updated",n,this.schema.model)},checkOption(n){return this.model[this.schema.model]?n.value.toString()===this.model[this.schema.model].toString():n.checked},onChange(n){let l=n.target.value.split(",");this.schema.array||(l=l.toString()),this.updateModel(l)}}},ou={class:"selection-group"},su={class:"form-group"},lu=["id","checked","name","value"];function au(n,l,s,p,h,u){return r.openBlock(),r.createElementBlock("div",ou,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.schema.values,(b,_)=>(r.openBlock(),r.createElementBlock("div",{key:_,class:"option-group"},[r.createElementVNode("div",su,[r.createElementVNode("label",{class:r.normalizeClass(["k-input-label",b.name])},[r.createElementVNode("input",{id:n.schema.name+"-"+_,checked:u.checkOption(b),class:"k-input",name:n.schema.name,type:"radio",value:b.value,onChange:l[0]||(l[0]=(...T)=>u.onChange&&u.onChange(...T))},null,40,lu),r.createTextVNode(" "+r.toDisplayString(b.name),1)],2)])]))),128))])}const No=P(ru,[["render",au],["__scopeId","data-v-705e327d"]]),du={name:"FieldArray",components:{FieldArrayItem:To,FieldArrayMultiItem:Bo,FieldSelect:bo,FieldMetric:Mo,FieldObject:Co,FieldObjectAdvanced:So,FieldAutoSuggest:Ao,FieldRadio:No,FieldArrayCardContainer:Io,FieldTextArea:wo},mixins:[H],props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(n,l,s){let p;return l&&(p=JSON.parse(JSON.stringify(l)),p.schema.fields.map(h=>(h.id=`${h.id||h.model}-${s}`,h))),{...p,set(h,u){n[s]=u},get(){return n[s]}}},newElement(){let n=this.value,l;(!n||!n.push)&&(n=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?l=this.schema.items.default():l=this.schema.items.default),n.push(l),this.value=[...n]},removeElement(n){this.value.splice(n,1)},getFieldType(n){return"field-"+n.type},modelUpdated(){}}},cu=["id"],uu={key:1},fu=["onUpdate:modelValue","type"],hu=["value","onClick"],mu=["onUpdate:modelValue"],pu=["value","onClick"];function gu(n,l,s,p,h,u){const b=r.resolveComponent("FieldTextArea"),_=r.resolveComponent("KButton");return n.schema?(r.openBlock(),r.createElementBlock("div",{key:0,id:n.getFieldID(n.schema),class:r.normalizeClass(n.schema.fieldClasses)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.value,(T,A)=>(r.openBlock(),r.createElementBlock("div",{key:A,class:r.normalizeClass(n.schema.fieldItemsClasses)},[n.schema.items&&n.schema.itemContainerComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.schema.itemContainerComponent),{key:0,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onRemoveItem:V=>u.removeElement(A)},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(u.getFieldType(n.schema.items)),{"form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):n.schema.items?(r.openBlock(),r.createElementBlock("span",uu,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(u.getFieldType(n.schema.items)),{"form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):n.schema.itemContainerComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.schema.itemContainerComponent),{key:2,"data-testid":`${n.getFieldID(n.schema)}-item-${A}`,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onRemoveItem:V=>u.removeElement(A)},{default:r.withCtx(()=>{var V,j;return[((V=n.schema.inputAttributes)==null?void 0:V.type)==="textarea"?(r.openBlock(),r.createBlock(b,{key:0,class:"k-input","form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,8,["form-options","model","schema","onModelUpdated"])):r.withDirectives((r.openBlock(),r.createElementBlock("input",r.mergeProps({key:1,"onUpdate:modelValue":J=>n.value[A]=J},n.schema.inputAttributes,{type:((j=n.schema.inputAttributes)==null?void 0:j.type)||"text"}),null,16,fu)),[[r.vModelDynamic,n.value[A]]]),n.schema.showRemoveButton?(r.openBlock(),r.createElementBlock("input",r.mergeProps({key:2},n.schema.removeElementButtonAttributes,{type:"button",value:n.schema.removeElementButtonLabel||s.removeElementButtonLabel,onClick:J=>u.removeElement(A)}),null,16,hu)):r.createCommentVNode("",!0)]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):r.withDirectives((r.openBlock(),r.createElementBlock("input",r.mergeProps({key:3},n.schema.inputAttributes,{"onUpdate:modelValue":V=>n.value[A]=V,type:"text"}),null,16,mu)),[[r.vModelText,n.value[A]]]),n.schema.showRemoveButton?(r.openBlock(),r.createElementBlock("input",r.mergeProps({key:4},n.schema.removeElementButtonAttributes,{type:"button",value:n.schema.removeElementButtonLabel||s.removeElementButtonLabel,onClick:V=>u.removeElement(A)}),null,16,pu)):r.createCommentVNode("",!0)],2))),128)),r.createVNode(_,{appearance:"tertiary",class:r.normalizeClass(n.schema.newElementButtonLabelClasses),"data-testid":`add-${n.getFieldID(n.schema)}`,type:"button",onClick:u.newElement},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.schema.newElementButtonLabel||s.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,cu)):r.createCommentVNode("",!0)}const _u=P(du,[["render",gu]]),Bb="",yu={mixins:[H],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(n,l){this.$emit("model-updated",n,l)}}},bu={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},wu={class:"material-icons"};function vu(n,l,s,p,h,u){const b=r.resolveComponent("vue-form-generator");return r.openBlock(),r.createElementBlock("div",bu,[r.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:l[0]||(l[0]=(..._)=>u.handleOpen&&u.handleOpen(..._))},[r.createElementVNode("i",wu,r.toDisplayString(h.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),r.createElementVNode("span",null,r.toDisplayString(u.titleText),1)]),r.createElementVNode("div",{class:r.normalizeClass(["advanced-field-dropdown",u.openClass])},[r.createVNode(b,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const Eu=P(yu,[["render",vu],["__scopeId","data-v-2d8e71e1"]]),Mb="",Ab="",Cu={mixins:[H],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(n,l){if(l===null){this.fieldModel={...this.model};return}const s=this.schema.fields[n].fields,p=this.schema.fields[l].fields;p&&p.forEach(h=>this.updateModel("",h.model)),s&&s.forEach(h=>this.updateModel(this.fieldModel[h.model],h.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((n,l)=>{n.fields&&n.fields.forEach(s=>{this.model[s.model]&&(this.checkedGroup=l,this.fieldSchema.push(s.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(n,l){this.$emit("model-updated",n,l)}}},ku={class:"selection-group"},Su={class:"form-group"},Tu=["value"],Bu={class:"control-help"},Mu={class:"option-field"},Au={class:"option-field-container"};function Iu(n,l,s,p,h,u){const b=r.resolveComponent("vue-form-generator");return r.openBlock(),r.createElementBlock("div",ku,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.schema.fields,(_,T)=>(r.openBlock(),r.createElementBlock("div",{key:T,class:"option-group"},[r.createElementVNode("div",Su,[r.createElementVNode("label",{class:r.normalizeClass(["k-input-label",`${_.label}-check`])},[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=A=>h.checkedGroup=A),class:"k-input",type:"radio",value:T},null,8,Tu),[[r.vModelRadio,h.checkedGroup]]),r.createTextVNode(" "+r.toDisplayString(_.label)+" ",1),r.createElementVNode("div",Bu,r.toDisplayString(_.description),1)],2)]),r.withDirectives(r.createElementVNode("div",Mu,[r.createElementVNode("div",Au,[r.createVNode(b,{model:n.model,options:{helpAsHtml:!0},schema:{fields:_.fields},onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[r.vShow,_.fields&&h.checkedGroup===T]])]))),128))])}const Nu=P(Cu,[["render",Iu],["__scopeId","data-v-cd14c14b"]]),Fu={mixins:[H],emits:["model-updated"],methods:{onUpdate(n){this.$emit("model-updated",n,this.schema.model)}}};function $u(n,l,s,p,h,u){const b=r.resolveComponent("KMultiselect");return r.openBlock(),r.createBlock(b,{"collapsed-context":"","data-testid":"field-multiselect",items:n.schema.values,"label-attributes":{info:n.schema.help},"model-value":n.value,placeholder:n.schema.placeholder,required:n.schema.required||void 0,width:"100%","onUpdate:modelValue":u.onUpdate},null,8,["items","label-attributes","model-value","placeholder","required","onUpdate:modelValue"])}const Ou=Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:Eu,FieldArray:_u,FieldArrayCardContainer:Io,FieldArrayItem:To,FieldArrayMultiItem:Bo,FieldAutoSuggest:Ao,FieldCheckbox:Ma,FieldChecklist:xa,FieldCleave:md,FieldDateTimePicker:wd,FieldGoogleAddress:Cd,FieldImage:Md,FieldInput:Wa,FieldLabel:Ha,FieldMasked:Nd,FieldMetric:Mo,FieldMultiselect:P(Fu,[["render",$u]]),FieldNoUiSlider:Vd,FieldObject:Co,FieldObjectAdvanced:So,FieldPikaday:Rd,FieldRadio:No,FieldRadios:Ja,FieldRangeSlider:Wd,FieldSelect:bo,FieldSelectEx:Gd,FieldSelectionGroup:Nu,FieldSpectrum:Xd,FieldStaticMap:ec,FieldSubmit:od,FieldTextArea:wo,FieldUpload:ud,fieldSwitch:oc},Symbol.toStringTag,{value:"Module"})),Nb="",Fb="",Vu={name:"FormGroup",components:Ou,mixins:[eo],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:r.ref()}},methods:{fieldTypeHasLabel(n){if(v.isNil(n.label))return!1;let l="";switch(n.type==="input"?l=n.inputType:l=n.type,l){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(n){const l=v.get(this.options,"fieldIdPrefix","");return to(n,l)},getFieldType(n){return"field-"+n.type},getButtonType(n){return v.get(n,"type","button")},onFieldValidated(n,l,s){this.$emit("validated",n,l,s)},buttonVisibility(n){return n.buttons&&n.buttons.length>0},buttonClickHandler(n,l,s){return n.onclick.call(this,this.model,l,s,this)},fieldHint(n){return v.isFunction(n.hint)?n.hint.call(this,this.model,n,this):n.hint},fieldErrors(n){return this.errors.filter(l=>l.field.fieldName===n.fieldName).map(l=>l.error)},onModelUpdated(n,l){this.$emit("modelUpdated",n,l)},validate(n){return this.$refs.child.validate(n)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(n){return n?n.replace(/^[cC]onfig\./,""):""}}},Fo=n=>(r.pushScopeId("data-v-e016d4ec"),n=n(),r.popScopeId(),n),Du=["for"],Lu={class:"icon-wrapper"},xu=["innerHTML"],Uu=Fo(()=>r.createElementVNode("div",{class:"help",role:"button",tabindex:"0"},[r.createElementVNode("i",{class:"icon"})],-1)),Ru=["innerHTML"],Pu={key:0,class:"link-wrapper"},qu=Fo(()=>r.createElementVNode("span",{class:"section-header"},"More info",-1)),Wu={class:"field-wrap"},Ku={key:0,class:"buttons"},zu=["type","onClick","textContent"],Hu=["innerHTML"],Yu={key:2,class:"errors help-block"},Gu=["innerHTML"];function Zu(n,l,s,p,h,u){const b=r.resolveComponent("KTooltip"),_=r.resolveComponent("KExternalLink");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["form-group",n.getFieldRowClasses(s.field)])},[u.fieldTypeHasLabel(s.field)?(r.openBlock(),r.createElementBlock("label",{key:0,class:r.normalizeClass(["form-group-label",s.field.labelClasses]),for:u.getFieldID(s.field)},[r.createElementVNode("div",Lu,[r.createElementVNode("span",{innerHTML:u.formattedLabel(s.field.label)},null,8,xu),s.field.help?(r.openBlock(),r.createBlock(b,{key:0,"max-width":"300",placement:"top","position-fixed":!0},{content:r.withCtx(()=>[s.options.helpAsHtml?(r.openBlock(),r.createElementBlock("div",{key:0,innerHTML:s.field.help},null,8,Ru)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(s.field.help),1)],64))]),default:r.withCtx(()=>[Uu]),_:1})):r.createCommentVNode("",!0)]),s.field.link?(r.openBlock(),r.createElementBlock("div",Pu,[r.createVNode(_,{href:s.field.link},{default:r.withCtx(()=>[qu]),_:1},8,["href"])])):r.createCommentVNode("",!0)],10,Du)):r.createCommentVNode("",!0),r.createElementVNode("div",Wu,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(u.getFieldType(s.field)),r.mergeProps(n.$attrs,{ref:"child",disabled:n.fieldDisabled(s.field)||null,"form-options":s.options,model:s.model,schema:s.field,vfg:s.vfg,onModelUpdated:u.onModelUpdated,onValidated:u.onFieldValidated}),null,16,["disabled","form-options","model","schema","vfg","onModelUpdated","onValidated"])),u.buttonVisibility(s.field)?(r.openBlock(),r.createElementBlock("div",Ku,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.field.buttons,(T,A)=>(r.openBlock(),r.createElementBlock("button",{key:A,class:r.normalizeClass(T.classes),type:u.getButtonType(T),onClick:V=>u.buttonClickHandler(T,s.field,V),textContent:r.toDisplayString(T.label)},null,10,zu))),128))])):r.createCommentVNode("",!0)]),s.field.hint?(r.openBlock(),r.createElementBlock("div",{key:1,class:"hint",innerHTML:u.fieldHint(s.field)},null,8,Hu)):r.createCommentVNode("",!0),u.fieldErrors(s.field).length>0?(r.openBlock(),r.createElementBlock("div",Yu,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.fieldErrors(s.field),(T,A)=>(r.openBlock(),r.createElementBlock("span",{key:A,innerHTML:T},null,8,Gu))),128))])):r.createCommentVNode("",!0)],2)}const Ju=P(Vu,[["render",Zu],["__scopeId","data-v-e016d4ec"]]),Xu={key:0,class:"vue-form-generator"},Qu=["is"],ju=["is"],ef={key:0};function tf(n,l,s,p,h,u){const b=r.resolveComponent("form-group");return s.schema!=null?(r.openBlock(),r.createElementBlock("div",Xu,[s.schema.fields?(r.openBlock(),r.createElementBlock("fieldset",{key:0,is:s.tag},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.fields,_=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[u.fieldVisible(_)?(r.openBlock(),r.createBlock(b,{key:0,ref_for:!0,ref:"children",vfg:h.vfg,field:_,errors:h.errors,model:s.model,options:s.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):r.createCommentVNode("",!0)],64))),256))],8,Qu)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.groups,_=>(r.openBlock(),r.createElementBlock("fieldset",{is:s.tag,class:r.normalizeClass(n.getFieldRowClasses(_))},[_.legend?(r.openBlock(),r.createElementBlock("legend",ef,r.toDisplayString(_.legend),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_.fields,T=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[u.fieldVisible(T)?(r.openBlock(),r.createBlock(b,{key:0,ref_for:!0,ref:"children",vfg:h.vfg,field:T,errors:h.errors,model:s.model,options:s.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):r.createCommentVNode("",!0)],64))),256))],10,ju))),256))])):r.createCommentVNode("",!0)}const $b="",be=P({name:"FormGenerator",components:{formGroup:Ju},mixins:[eo],props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:r.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(n){return n.length>0}}},emits:["validated","modelUpdated"],data(){return{vfg:this,errors:[],children:r.ref([])}},computed:{fields(){const n=[];return this.schema&&this.schema.fields&&v.forEach(this.schema.fields,l=>{(!this.multiple||l.multi===!0)&&n.push(l)}),n},groups(){const n=[];return this.schema&&this.schema.groups&&v.forEach(this.schema.groups.slice(0),l=>{n.push(l)}),n}},watch:{model:{deep:!0,handler(n,l){l!==n&&n!=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(n){return v.isFunction(n.visible)?n.visible.call(this,this.model,n,this):v.isNil(n.visible)?!0:n.visible},onFieldValidated(n,l,s){this.errors=this.errors.filter(h=>h.field.fieldName!==s.schema.fieldName),!n&&l&&l.length>0&&v.forEach(l,h=>{this.errors.push({field:s.schema,error:h})});const p=this.errors.length===0;this.$emit("validated",p,this.errors,this)},onModelUpdated(n,l){this.$emit("modelUpdated",n,l)},validate(n=null){n===null&&(n=v.get(this.options,"validateAsync",!1)),this.clearValidationErrors();const l=[],s=[];v.forEach(this.$refs.children,h=>{v.isFunction(h.validate)&&(l.push(h.$refs.child),s.push(h.$refs.child.validate(!0)))});const p=h=>{const u=[];v.forEach(h,(_,T)=>{v.isArray(_)&&_.length>0&&v.forEach(_,A=>{u.push({field:l[T].schema,error:A})})}),this.errors=u;const b=u.length===0;return this.$emit("validated",b,u,this),n?u:b};return n?Promise.all(s).then(p):p(s)},clearValidationErrors(){this.errors.splice(0),v.forEach(this.$refs.children,n=>{n.clearValidationErrors()})}}},[["render",tf]]),nf={fields:[{help:"The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.",inputType:"password",label:"Config.Client Id",model:"config-client_id",type:"input"},{help:"The client secret.",inputType:"password",label:"Config.Client Secret",model:"config-client_secret",type:"input"},{help:"The discovery endpoint (or just the issuer identifier).",inputType:"text",label:"Config.Issuer",model:"config-issuer",required:!0,type:"input"},{help:"Types of credentials/grants to enable.",inputType:"text",label:"Config.Auth Methods",model:"config-auth_methods",type:"input"}]},rf={fields:[{help:"The claim that contains the scopes.",inputType:"text",label:"Config.Scopes Claim",model:"config-scopes_claim",type:"input"},{help:"The scopes required to be in the access token.",inputType:"text",label:"Config.Scopes Required",model:"config-scopes_required",type:"input"},{help:"The claim that contains the audience.",inputType:"text",label:"Config.Audience Claim",model:"config-audience_claim",type:"input"},{help:"The audience required to be in the access token.",inputType:"text",label:"Config.Audience Required",model:"config-audience_required",type:"input"},{help:"The claim that contains the roles.",inputType:"text",label:"Config.Roles Claim",model:"config-roles_claim",type:"input"},{help:"The roles required to be in the access token.",inputType:"text",label:"Config.Roles Required",model:"config-roles_required",type:"input"},{help:"The claim that contains the groups.",inputType:"text",label:"Config.Groups Claim",model:"config-groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The groups required to be in the access token.",inputType:"text",label:"Config.Groups Required",model:"config-groups_required",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The claim that contains authenticated groups.",inputType:"text",label:"Config.Authenticated Groups Claim",model:"config-authenticated_groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"}]},of={fields:[{help:"The input must be in JSON format.",type:"input",valueArrayType:"record",inputType:"text",default:void 0,valueType:"array",model:"config-client_jwk",label:"Config.Client Jwk",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record"},{help:"The input must be in JSON format.",type:"input",valueArrayType:"record",inputType:"text",default:void 0,valueType:"array",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"}]},Vb="",Db="",sf={name:"OIDCForm",components:{VueFormGenerator:be},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(){this.init||(this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(n=>!n.model.startsWith("config")&&n.model!=="tags")},this.commonFieldsSchema={...nf},this.authFieldsSchema={...rf},this.advancedFieldsSchema.fields=this.formSchema.fields.filter(n=>n.model.startsWith("config")&&!this.commonFieldsSchema.fields.filter(l=>l.model===n.model).length&&!this.authFieldsSchema.fields.filter(l=>l.model===n.model).length||n.model==="tags"),this.advancedFieldsSchema.fields=this.advancedFieldsSchema.fields.map(n=>{const l=of.fields.find(s=>s.model===n.model);return l||n}),this.commonFieldsSchema.fields=this.commonFieldsSchema.fields.filter(n=>n.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}])},getAuthMethodsValue(n,l){const s=[];for(let p=0;p<this.authMethods.length;p++)this.authMethods[p].prop&&this.authMethods[p].value!==n&&s.push(this.authMethods[p].value);return this.sessionManagement&&n&&s.push("session"),l&&(n?s.push(n):s.push("session")),s},handleUpdate(n,l){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(l,n),this.onModelUpdated()}}},Kt=n=>(r.pushScopeId("data-v-5ac1c38b"),n=n(),r.popScopeId(),n),lf={class:"general-settings"},af={class:"link-wrapper"},df=Kt(()=>r.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),cf=Kt(()=>r.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),uf={class:"auth-method-container"},ff={class:"general-settings"},hf={class:"link-wrapper"},mf=Kt(()=>r.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),pf=Kt(()=>r.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),gf={class:"general-settings"},_f={class:"link-wrapper"},yf=Kt(()=>r.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),bf=Kt(()=>r.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function wf(n,l,s,p,h,u){const b=r.resolveComponent("VueFormGenerator"),_=r.resolveComponent("KExternalLink"),T=r.resolveComponent("KLabel"),A=r.resolveComponent("KCheckbox"),V=r.resolveComponent("KInputSwitch"),j=r.resolveComponent("KTabs");return r.openBlock(),r.createElementBlock("div",null,[s.formModel.id&&s.isEditing||!s.isEditing?(r.openBlock(),r.createBlock(b,{key:0,class:"global-fields",model:s.formModel,options:s.formOptions,schema:h.globalFields,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),r.createVNode(j,{tabs:h.tabs},{common:r.withCtx(()=>[r.createElementVNode("div",lf,[r.createElementVNode("div",af,[r.createVNode(_,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:r.withCtx(()=>[df]),_:1})]),cf,u.displayForm?(r.openBlock(),r.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.commonFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),r.createVNode(T,null,{default:r.withCtx(()=>[r.createTextVNode("Auth Methods")]),_:1}),r.createElementVNode("div",uf,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.authMethods,J=>(r.openBlock(),r.createElementBlock("div",{key:J.value,class:"auth-method"},[r.createVNode(A,{modelValue:J.prop,"onUpdate:modelValue":we=>J.prop=we,onChange:we=>u.handleUpdate(we,J.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(J.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),r.createVNode(V,{modelValue:h.sessionManagement,"onUpdate:modelValue":l[0]||(l[0]=J=>h.sessionManagement=J),label:"Enable Session Management",onChange:u.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:r.withCtx(()=>[r.createElementVNode("div",ff,[r.createElementVNode("div",hf,[r.createVNode(_,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:r.withCtx(()=>[mf]),_:1})]),pf,u.displayForm?(r.openBlock(),r.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.authFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])]),advanced:r.withCtx(()=>[r.createElementVNode("div",gf,[r.createElementVNode("div",_f,[r.createVNode(_,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:r.withCtx(()=>[yf]),_:1})]),bf,u.displayForm?(r.openBlock(),r.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.advancedFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])]),_:1},8,["tabs"])])}const vf=P(sf,[["render",wf],["__scopeId","data-v-5ac1c38b"]]),$o={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"}}},Ef=r.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(n){const l=n,{t:s,te:p}=jr.createI18n("en-us",$o),h=r.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),u=r.computed(()=>{const b=l.formSchema;return b.fields.map(_=>{const T=`post-function.${_.model}`;return _.hint=p(`${T}.hint`)&&s(`${T}.hint`)||_.hint,_.help=p(`${T}.help`)&&s(`${T}.help`)||_.help,_.newElementButtonLabel=p(`${T}.newElementButtonLabel`)&&s(`${T}.newElementButtonLabel`)||_.newElementButtonLabel,_.model!=="tags"&&(_.valueType==="array"||_.type==="array")&&(_.type="array",_.valueArrayType="array",_.itemContainerComponent="FieldArrayItem",_.fieldClasses="w-100",_.fieldItemsClasses="w-100 mt-2 mb-2",_.inputAttributes={..._.inputAttributes,type:"textarea"}),_}),b});return(b,_)=>h.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)}}),Cf=r.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(n){const l=n,{t:s,te:p}=jr.createI18n("en-us",$o),h=r.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),u=r.computed(()=>{const b=l.formSchema;return b.fields.map(_=>{const T=`exit-transformer.${_.model}`;return _.hint=p(`${T}.hint`)&&s(`${T}.hint`)||_.hint,_.help=p(`${T}.help`)&&s(`${T}.help`)||_.help,_.newElementButtonLabel=p(`${T}.newElementButtonLabel`)&&s(`${T}.newElementButtonLabel`)||_.newElementButtonLabel,_.model!=="tags"&&(_.valueType==="array"||_.type==="array")&&(_.type="array",_.valueArrayType="array",_.itemContainerComponent="FieldArrayItem",_.fieldClasses="w-100",_.fieldItemsClasses="w-100 mt-2 mb-2",_.inputAttributes={..._.inputAttributes,type:"textarea"}),_}),b});return(b,_)=>h.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)}}),kf={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}]},Oo={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}]},Vo={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}]},$t=n=>(r.pushScopeId("data-v-bc6f1e04"),n=n(),r.popScopeId(),n),Sf={class:"general-settings"},Tf=$t(()=>r.createElementVNode("div",{class:"header-wrapper"},[r.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),Bf=$t(()=>r.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),Mf=$t(()=>r.createElementVNode("hr",null,null,-1)),Af={class:"sub-form"},If={class:"general-settings"},Nf=$t(()=>r.createElementVNode("div",{class:"header-wrapper"},[r.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),Ff=$t(()=>r.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),$f={class:"sub-form"},Of={class:"general-settings"},Vf=$t(()=>r.createElementVNode("div",{class:"header-wrapper"},[r.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),Df=$t(()=>r.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),Lf=r.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(n){const l=n,s=r.ref("zeroSsl"),p=r.ref("shm"),h=r.computed(()=>({fields:l.formSchema.fields.filter(K=>!K.model.startsWith("config")&&K.model!=="tags")})),u=r.computed(()=>({fields:kf.fields.filter(Y=>!Oo.fields.some(ce=>ce.model===Y.model)&&!Vo.fields.some(ce=>ce.model===Y.model))})),b=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage")&&!Y.model.startsWith("config-storage_config-consul")&&!Y.model.startsWith("config-storage_config-redis")&&!Y.model.startsWith("config-storage_config-shm")&&!Y.model.startsWith("config-storage_config-vault"))})),_=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-consul"))})),T=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-redis"))})),A=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-shm"))})),V=r.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-vault"))})),j=r.computed(()=>({fields:l.formSchema.fields.filter(K=>K.model.startsWith("config")&&!u.value.fields.filter(Y=>Y.model===K.model).length&&!b.value.fields.filter(Y=>Y.model===K.model).length||K.model==="tags")})),J=r.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),we=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],et=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];r.onMounted(()=>{s.value==="zeroSsl"&&(l.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const st=K=>{s.value=K.value,(K.value==="zeroSsl"||K.value==="other")&&(K.value==="zeroSsl"?l.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":l.formModel["config-api_uri"]="https://acme.example.com/",l.formModel["config-tos_accepted"]=!1),K.value==="letsEncrypt"&&(l.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",l.formModel["config-eab_hmac_key"]="",l.formModel["config-eab_kid"]=""),l.onModelUpdated()},fe=(K,Y)=>{Y==="config-storage"&&(p.value=K),l.onModelUpdated()};return(K,Y)=>{const ce=r.resolveComponent("KSelect"),Te=r.resolveComponent("KTabs");return r.openBlock(),r.createElementBlock("div",null,[n.formModel.id&&n.isEditing||!n.isEditing?(r.openBlock(),r.createBlock(be,{key:0,class:"global-fields",model:n.formModel,options:n.formOptions,schema:h.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),r.createVNode(Te,{tabs:we},{general:r.withCtx(()=>[r.createElementVNode("div",Sf,[Tf,Bf,J.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),Mf,r.createVNode(ce,{appearance:"select",class:"issuer-select",items:et,label:"Issuer",onChange:st}),r.createElementVNode("div",Af,[s.value==="letsEncrypt"?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:r.unref(Oo),onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),s.value==="zeroSsl"||s.value==="other"?(r.openBlock(),r.createBlock(be,{key:1,model:n.formModel,options:n.formOptions,schema:r.unref(Vo),onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])])]),storage:r.withCtx(()=>[r.createElementVNode("div",If,[Nf,Ff,J.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:b.value,onModelUpdated:fe},null,8,["model","options","schema"])):r.createCommentVNode("",!0),r.createElementVNode("div",$f,[p.value==="consul"?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:_.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),p.value==="redis"?(r.openBlock(),r.createBlock(be,{key:1,model:n.formModel,options:n.formOptions,schema:T.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),p.value==="shm"?(r.openBlock(),r.createBlock(be,{key:2,model:n.formModel,options:n.formOptions,schema:A.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0),p.value==="vault"?(r.openBlock(),r.createBlock(be,{key:3,model:n.formModel,options:n.formOptions,schema:V.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])])]),advanced:r.withCtx(()=>[r.createElementVNode("div",Of,[Vf,Df,J.value?(r.openBlock(),r.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:j.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):r.createCommentVNode("",!0)])]),_:1})])}}}),xb="",xf=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:P(Lf,[["__scopeId","data-v-bc6f1e04"]]),ExitTransformer:Cf,OIDCForm:vf,PostFunction:Ef},Symbol.toStringTag,{value:"Module"})),Uf=["array","metric","advanced","selectionGroup","object-advanced"],Rf={install:n=>{n.component("VueFormGenerator",be)}},Pf=(n,l=!1)=>({...l&&{acme:"ACMEForm"},"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer"})[n];ke.FORMS_API_KEY=bt,ke.VueFormGenerator=be,ke.abstractField=ka,ke.customFields=Uf,ke.default=Rf,ke.getSharedFormName=Pf,ke.sharedForms=xf,Object.defineProperties(ke,{__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}.vue-form-generator .field-input .wrapper,.vue-form-generator .field-input input[type=radio]{width:100%}.vue-form-generator .field-input input[type=color]{width:60px}.vue-form-generator .field-input input[type=range]{padding:0}.vue-form-generator .field-label span{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}.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{background:#e1b42b;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,#ffffff 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,#eeeeee,#ffffff);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}.vue-form-generator .field-wrap .k-button,.vue-form-generator .field-wrap .k-button:hover{background:none;border:none}.object-advanced-wrapper[data-v-293fe57f]{width:100%}.item-wrapper[data-v-293fe57f]{margin-left:28px}.index-wrapper[data-v-293fe57f]{align-items:center;display:flex;justify-content:space-between;margin-top:4px}.divider[data-v-293fe57f]{margin-bottom:8px;margin-top:8px}.wide-divider[data-v-293fe57f]{margin-bottom:16px;margin-top:16px}.input-wrapper[data-v-293fe57f]{margin-right:16px;margin-top:16px}.input-wrapper .indent[data-v-293fe57f]{margin-left:28px}.input-item[data-v-293fe57f],.input-item .form-control[data-v-293fe57f]{display:flex}.input-item .k-button[data-v-293fe57f]{display:flex;margin-left:20px;margin-right:20px}.vue-form-generator .field-wrap button.delete,.vue-form-generator .field-wrap button.delete:hover{background:none;border:none}.array-item[data-v-17a1f3c1]{display:flex;width:100%}.array-item .delete[data-v-17a1f3c1]{height:100%;margin-left:20px}.vue-form-generator .field-wrap button.delete[data-v-47ff1f9a],.vue-form-generator .field-wrap button.delete[data-v-47ff1f9a]:hover{background:#d60027;border:none}.multi-item-wrapper[data-v-47ff1f9a]{width:100%}.label-hint[data-v-47ff1f9a]{font-weight:300;padding:8px;text-align:center}.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 0 5px;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 i{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 i:hover{color:#c9302c}.field-dropdown .content .material-icons{float:right;margin-bottom:16px;margin-right:16px}.field-dropdown .content .vue-form-generator{padding:16px}.field-dropdown.active .title i{transform:rotate(135deg)}.autosuggest[data-v-27d6a440]{width:100%}.k-select[data-v-27d6a440]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-27d6a440]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-27d6a440]:last-child{opacity:.7}.field-span[data-v-27d6a440]{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-wrapper .kong-card{width:50%}.array-card-container[data-v-2404b311]{display:flex}.array-card-container .card[data-v-2404b311]{margin-bottom:8px}.selection-group[data-v-705e327d]{margin-bottom:8px;width:100%}.selection-group .form-group[data-v-705e327d]{margin-bottom:0}.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-input-label{display:block}.selection-group[data-v-cd14c14b]{width:100%}.selection-group .form-group[data-v-cd14c14b],.selection-group .option-field-container[data-v-cd14c14b]{margin-bottom:0}.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-e016d4ec]{display:flex;justify-content:space-between}.icon-wrapper[data-v-e016d4ec]{display:flex!important}.link-wrapper[data-v-e016d4ec]{margin-left:4px}.vue-form-generator *{box-sizing:border-box}.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 button,.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 button:not(:last-child),.vue-form-generator .field-wrap input[type=submit]:not(:last-child){margin-right:4px}.vue-form-generator .field-wrap button:hover,.vue-form-generator .field-wrap input[type=submit]:hover{background-color:#e6e6e6;border-color:#adadad;color:#333}.vue-form-generator .field-wrap button:active,.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 button:disabled,.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{background-color:#f9fafb;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 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.btn-link:hover,.vue-form-generator .field-wrap input[type=submit].btn-link:hover,.vue-form-generator .field-wrap button.btn-link:active,.vue-form-generator .field-wrap input[type=submit].btn-link: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}.global-fields.VueFormGenerator .form-group:last-child{margin-bottom:24px}.general-settings .VueFormGenerator .form-group:last-child{margin-bottom:0}.general-settings .k-input-label{margin-bottom:8px;margin-top:24px}.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-5ac1c38b]{color:#000000d9;font-size:16px;font-weight:500;line-height:20px}.description[data-v-5ac1c38b]{color:#00000073;margin-bottom:12px}.description a[data-v-5ac1c38b]{display:inline}.link-wrapper[data-v-5ac1c38b]{margin-bottom:8px}.issuer-select[data-v-bc6f1e04]{margin-bottom:16px;width:100%}.header-wrapper[data-v-bc6f1e04]{margin-bottom:8px}.sub-form[data-v-bc6f1e04]{margin-left:24px}.description[data-v-bc6f1e04]{margin-bottom:12px}
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}.vue-form-generator .field-input .wrapper,.vue-form-generator .field-input input[type=radio]{width:100%}.vue-form-generator .field-input input[type=color]{width:60px}.vue-form-generator .field-input input[type=range]{padding:0}.vue-form-generator .field-label span{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}.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{background:#e1b42b;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,#ffffff 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,#eeeeee,#ffffff);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}.vue-form-generator .field-wrap .k-button,.vue-form-generator .field-wrap .k-button:hover{background:none;border:none}.object-advanced-wrapper[data-v-622b5894]{width:100%}.item-wrapper[data-v-622b5894]{margin-left:28px}.index-wrapper[data-v-622b5894]{align-items:center;display:flex;justify-content:space-between;margin-top:4px}.divider[data-v-622b5894]{margin-bottom:8px;margin-top:8px}.wide-divider[data-v-622b5894]{margin-bottom:16px;margin-top:16px}.input-wrapper[data-v-622b5894]{margin-right:16px;margin-top:16px}.input-wrapper .indent[data-v-622b5894]{margin-left:28px}.input-item[data-v-622b5894],.input-item .form-control[data-v-622b5894]{display:flex}.input-item .k-button[data-v-622b5894]{display:flex;margin-left:20px;margin-right:20px}.vue-form-generator .field-wrap button.delete,.vue-form-generator .field-wrap button.delete:hover{background:none;border:none}.array-item[data-v-b43f32dd]{display:flex;width:100%}.array-item .delete[data-v-b43f32dd]{height:100%;margin-left:20px}.vue-form-generator .field-wrap button.delete[data-v-47ff1f9a],.vue-form-generator .field-wrap button.delete[data-v-47ff1f9a]:hover{background:#d60027;border:none}.multi-item-wrapper[data-v-47ff1f9a]{width:100%}.label-hint[data-v-47ff1f9a]{font-weight:300;padding:8px;text-align:center}.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 0 5px;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 i{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 i:hover{color:#c9302c}.field-dropdown .content .material-icons{float:right;margin-bottom:16px;margin-right:16px}.field-dropdown .content .vue-form-generator{padding:16px}.field-dropdown.active .title i{transform:rotate(135deg)}.autosuggest[data-v-27d6a440]{width:100%}.k-select[data-v-27d6a440]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-27d6a440]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-27d6a440]:last-child{opacity:.7}.field-span[data-v-27d6a440]{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-wrapper .kong-card{width:50%}.array-card-container[data-v-2404b311]{display:flex}.array-card-container .card[data-v-2404b311]{margin-bottom:8px}.selection-group[data-v-705e327d]{margin-bottom:8px;width:100%}.selection-group .form-group[data-v-705e327d]{margin-bottom:0}.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-input-label{display:block}.selection-group[data-v-cd14c14b]{width:100%}.selection-group .form-group[data-v-cd14c14b],.selection-group .option-field-container[data-v-cd14c14b]{margin-bottom:0}.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-e016d4ec]{display:flex;justify-content:space-between}.icon-wrapper[data-v-e016d4ec]{display:flex!important}.link-wrapper[data-v-e016d4ec]{margin-left:4px}.vue-form-generator *{box-sizing:border-box}.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 button,.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 button:not(:last-child),.vue-form-generator .field-wrap input[type=submit]:not(:last-child){margin-right:4px}.vue-form-generator .field-wrap button:hover,.vue-form-generator .field-wrap input[type=submit]:hover{background-color:#e6e6e6;border-color:#adadad;color:#333}.vue-form-generator .field-wrap button:active,.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 button:disabled,.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{background-color:#f9fafb;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 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}.global-fields.VueFormGenerator .form-group:last-child{margin-bottom:24px}.general-settings .VueFormGenerator .form-group:last-child{margin-bottom:0}.general-settings .k-input-label{margin-bottom:8px;margin-top:24px}.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-5ac1c38b]{color:#000000d9;font-size:16px;font-weight:500;line-height:20px}.description[data-v-5ac1c38b]{color:#00000073;margin-bottom:12px}.description a[data-v-5ac1c38b]{display:inline}.link-wrapper[data-v-5ac1c38b]{margin-bottom:8px}.issuer-select[data-v-bc6f1e04]{margin-bottom:16px;width:100%}.header-wrapper[data-v-bc6f1e04]{margin-bottom:8px}.sub-form[data-v-bc6f1e04]{margin-left:24px}.description[data-v-bc6f1e04]{margin-bottom:12px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/forms",
3
- "version": "1.3.0",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/forms.umd.js",
6
6
  "module": "./dist/forms.es.js",
@@ -35,16 +35,16 @@
35
35
  "lodash": "^4.17.21"
36
36
  },
37
37
  "peerDependencies": {
38
- "@kong/kongponents": "^8.126.2",
38
+ "@kong/kongponents": "9.0.0-alpha.54",
39
39
  "vue": "^3.3.4",
40
- "@kong-ui-public/i18n": "^0.8.6"
40
+ "@kong-ui-public/i18n": "^2.0.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@kong/design-tokens": "^1.11.9",
44
- "@kong/kongponents": "^8.126.2",
44
+ "@kong/kongponents": "9.0.0-alpha.54",
45
45
  "@types/lodash": "^4.14.199",
46
46
  "pug": "^3.0.2",
47
- "@kong-ui-public/i18n": "^0.8.6"
47
+ "@kong-ui-public/i18n": "^2.0.0"
48
48
  },
49
49
  "distSizeChecker": {
50
50
  "errorLimit": "1.2MB"