homebridge-config-ui-x 5.12.1-beta.7 → 5.12.1-beta.9
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/package.json +8 -3
- package/public/{chunk-KAPGBFLJ.js → chunk-2WY7OHS3.js} +1 -1
- package/public/{chunk-S5H22WRF.js → chunk-5VQ42S62.js} +1 -1
- package/public/{chunk-JTQQTKY7.js → chunk-ABEGZR4S.js} +1 -1
- package/public/{chunk-KLWYBXMO.js → chunk-B5VZPCMG.js} +1 -1
- package/public/{chunk-4J3J7FSY.js → chunk-BG5R3K3W.js} +1 -1
- package/public/{chunk-JNPGEJ3W.js → chunk-C3OHEJYI.js} +1 -1
- package/public/{chunk-7LOFSGZK.js → chunk-DFIU7YL4.js} +1 -1
- package/public/{chunk-PQPDMNKK.js → chunk-DLFCGYGB.js} +1 -1
- package/public/{chunk-F332UHUK.js → chunk-DZHTCVQ3.js} +1 -1
- package/public/chunk-E773VJLI.js +1 -0
- package/public/chunk-END6WICU.js +1 -0
- package/public/chunk-EOQA6LYA.js +1 -0
- package/public/{chunk-5VXOT5GC.js → chunk-ESCWTBUZ.js} +1 -1
- package/public/{chunk-UCTE5J3F.js → chunk-EYMA3MVV.js} +1 -1
- package/public/{chunk-VY4NTNG3.js → chunk-GEK4M54S.js} +1 -1
- package/public/{chunk-GFJO2QTW.js → chunk-GZD66OFT.js} +1 -1
- package/public/chunk-IB247UL5.js +4 -0
- package/public/{chunk-YIHVWXAX.js → chunk-ICKLYQ7C.js} +2 -2
- package/public/{chunk-PSSWIPLS.js → chunk-IMI2RZ46.js} +1 -1
- package/public/{chunk-K73S26T3.js → chunk-IZWQYACB.js} +1 -1
- package/public/{chunk-2QUH2FXS.js → chunk-JJGNR7WT.js} +1 -1
- package/public/{chunk-7AD56BSX.js → chunk-JMPDHTJK.js} +1 -1
- package/public/{chunk-EKYMLGZU.js → chunk-JP5PZ43M.js} +1 -1
- package/public/{chunk-IXSMCZ5A.js → chunk-JRGRN6QD.js} +1 -1
- package/public/{chunk-KDNXPUO5.js → chunk-LABZFZLD.js} +1 -1
- package/public/{chunk-ZH3VNDIS.js → chunk-MBLEJVQV.js} +1 -1
- package/public/chunk-MGXPEQE7.js +19 -0
- package/public/{chunk-SCW535TW.js → chunk-NT7IQCMH.js} +1 -1
- package/public/{chunk-WZXTVC6W.js → chunk-OMEQ6FGM.js} +1 -1
- package/public/{chunk-G5C66QEU.js → chunk-OX22563K.js} +1 -1
- package/public/{chunk-MTYIEY2M.js → chunk-PE2GX5FN.js} +1 -1
- package/public/{chunk-RGRPV7TK.js → chunk-PIUE42YY.js} +1 -1
- package/public/{chunk-6P53ACWC.js → chunk-PJYTYQ2O.js} +1 -1
- package/public/{chunk-VFZPU4ZL.js → chunk-QTJHXXNA.js} +1 -1
- package/public/{chunk-ARR3OK4P.js → chunk-R6GUMZUN.js} +1 -1
- package/public/{chunk-BADNEAHD.js → chunk-SHCRZWO6.js} +1 -1
- package/public/{chunk-YQXFTYEI.js → chunk-SNF4UEIW.js} +6 -6
- package/public/{chunk-S3E6JDMS.js → chunk-SSWIXX3X.js} +1 -1
- package/public/{chunk-3WNDNRRB.js → chunk-U42INEHF.js} +1 -1
- package/public/{chunk-55DZYJHI.js → chunk-UWIOFP4B.js} +1 -1
- package/public/{chunk-ZMEMMUUF.js → chunk-UZZUODGJ.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-XUQ5G5JD.js → main-KLJYWDOJ.js} +1 -1
- package/public/chunk-3VAD7GQK.js +0 -1
- package/public/chunk-C5UZ5BUH.js +0 -1
- package/public/chunk-D3QQAOPW.js +0 -1
- package/public/chunk-HOHCTPYN.js +0 -4
- package/public/chunk-HZA5LDUU.js +0 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as bo,d as G0,e as Ms,g as K0,j as As,l as J0}from"./chunk-BNNKKGLH.js";import{a as yo}from"./chunk-GIBUKDL3.js";import{C as Nf,D as Mf,a as F0,b as q0,c as Ns,e as tr,f as j0,h as L0,i as V0,k as z0,l as du,m as B0,o as H0,p as U0,q as vo,t as W0,u as fu,v as Rf,w as pu}from"./chunk-WZXTVC6W.js";import{e as M0,k as er,m as A0,w as k0}from"./chunk-7AD56BSX.js";import{$ as ou,$b as Df,Aa as xt,Ab as ne,C as yf,Ca as x0,Cb as It,Db as St,Dc as Tf,Ea as I0,Eb as Dt,F as y0,Fb as G,Fc as $f,G as v0,Gb as ee,Hb as Y,I as Os,Ib as le,Mc as Qn,Nc as H,O as b0,Oc as cu,P as po,Pc as $0,Q as vf,Qb as P0,R as Jn,Rb as bt,Rc as $t,S as w0,Sb as Xi,Ua as Ne,Uc as Tr,Vc as R0,W as bf,Wc as N0,X as je,Xb as Ue,Y as Ot,Za as L,Zb as F,_ as Zn,_b as Sf,a as Dr,aa as N,ac as Pr,bc as Or,c as Er,cc as on,d as Ae,db as Cf,dc as sn,e as fo,ea as C0,eb as ho,ec as lu,f as _f,fc as uu,ga as pt,gb as mo,h as p0,ha as ht,hb as au,hc as An,i as nu,ib as Rs,ic as Ze,jc as X,ka as Ts,kb as Mn,kc as wn,la as $i,lc as go,m as h0,ma as $s,mc as O0,nb as $e,o as iu,oa as ke,ob as Tt,pa as bn,pb as mt,qb as S0,rb as D0,rc as Ef,sa as fi,sb as xf,sc as Pf,tb as E0,tc as Of,u as m0,vc as _o,wc as Zt,x as g0,xa as Nt,xb as If,xc as T0,y as ru,ya as su,yb as _e,z as _0,za as wf,zb as te}from"./chunk-JJ5CEM72.js";import{a as re,b as Ve,e as y,g as Jt,h as Yi}from"./chunk-VJN6YUS2.js";var iv=y(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.formatNames=hi.fastFormats=hi.fullFormats=void 0;function pi(e,n){return{validate:e,compare:n}}hi.fullFormats={date:pi(X0,qf),time:pi(kf(!0),jf),"date-time":pi(Z0(!0),tv),"iso-time":pi(kf(),ev),"iso-date-time":pi(Z0(),nv),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:aq,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:hq,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:lq,int32:{type:"number",validate:dq},int64:{type:"number",validate:fq},float:{type:"number",validate:Y0},double:{type:"number",validate:Y0},password:!0,binary:!0};hi.fastFormats=Ve(re({},hi.fullFormats),{date:pi(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,qf),time:pi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,jf),"date-time":pi(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,tv),"iso-time":pi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ev),"iso-date-time":pi(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,nv),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});hi.formatNames=Object.keys(hi.fullFormats);function nq(e){return e%4===0&&(e%100!==0||e%400===0)}var iq=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,rq=[0,31,28,31,30,31,30,31,31,30,31,30,31];function X0(e){let n=iq.exec(e);if(!n)return!1;let t=+n[1],i=+n[2],r=+n[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&nq(t)?29:rq[i])}function qf(e,n){if(e&&n)return e>n?1:e<n?-1:0}var Af=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function kf(e){return function(t){let i=Af.exec(t);if(!i)return!1;let r=+i[1],s=+i[2],l=+i[3],u=i[4],d=i[5]==="-"?-1:1,p=+(i[6]||0),m=+(i[7]||0);if(p>23||m>59||e&&!u)return!1;if(r<=23&&s<=59&&l<60)return!0;let g=s-m*d,w=r-p*d-(g<0?1:0);return(w===23||w===-1)&&(g===59||g===-1)&&l<61}}function jf(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+n).valueOf();if(t&&i)return t-i}function ev(e,n){if(!(e&&n))return;let t=Af.exec(e),i=Af.exec(n);if(t&&i)return e=t[1]+t[2]+t[3],n=i[1]+i[2]+i[3],e>n?1:e<n?-1:0}var Ff=/t|\s/i;function Z0(e){let n=kf(e);return function(i){let r=i.split(Ff);return r.length===2&&X0(r[0])&&n(r[1])}}function tv(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),i=new Date(n).valueOf();if(t&&i)return t-i}function nv(e,n){if(!(e&&n))return;let[t,i]=e.split(Ff),[r,s]=n.split(Ff),l=qf(t,r);if(l!==void 0)return l||jf(i,s)}var oq=/\/|:/,sq=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function aq(e){return oq.test(e)&&sq.test(e)}var Q0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function lq(e){return Q0.lastIndex=0,Q0.test(e)}var uq=-(2**31),cq=2**31-1;function dq(e){return Number.isInteger(e)&&e<=cq&&e>=uq}function fq(e){return Number.isInteger(e)}function Y0(){return!0}var pq=/[^\\]\\Z/;function hq(e){if(pq.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var qs=y(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.regexpCode=Fe.getEsmExportName=Fe.getProperty=Fe.safeStringify=Fe.stringify=Fe.strConcat=Fe.addCodeArg=Fe.str=Fe._=Fe.nil=Fe._Code=Fe.Name=Fe.IDENTIFIER=Fe._CodeOrName=void 0;var ks=class{};Fe._CodeOrName=ks;Fe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $r=class extends ks{constructor(n){if(super(),!Fe.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Fe.Name=$r;var kn=class extends ks{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,i)=>(i instanceof $r&&(t[i.str]=(t[i.str]||0)+1),t),{})}};Fe._Code=kn;Fe.nil=new kn("");function rv(e,...n){let t=[e[0]],i=0;for(;i<n.length;)Vf(t,n[i]),t.push(e[++i]);return new kn(t)}Fe._=rv;var Lf=new kn("+");function ov(e,...n){let t=[Fs(e[0])],i=0;for(;i<n.length;)t.push(Lf),Vf(t,n[i]),t.push(Lf,Fs(e[++i]));return mq(t),new kn(t)}Fe.str=ov;function Vf(e,n){n instanceof kn?e.push(...n._items):n instanceof $r?e.push(n):e.push(yq(n))}Fe.addCodeArg=Vf;function mq(e){let n=1;for(;n<e.length-1;){if(e[n]===Lf){let t=gq(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function gq(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof $r||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof $r))return`"${e}${n.slice(1)}`}function _q(e,n){return n.emptyStr()?e:e.emptyStr()?n:ov`${e}${n}`}Fe.strConcat=_q;function yq(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Fs(Array.isArray(e)?e.join(","):e)}function vq(e){return new kn(Fs(e))}Fe.stringify=vq;function Fs(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Fe.safeStringify=Fs;function bq(e){return typeof e=="string"&&Fe.IDENTIFIER.test(e)?new kn(`.${e}`):rv`[${e}]`}Fe.getProperty=bq;function wq(e){if(typeof e=="string"&&Fe.IDENTIFIER.test(e))return new kn(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Fe.getEsmExportName=wq;function Cq(e){return new kn(e.toString())}Fe.regexpCode=Cq});var Hf=y(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ValueScope=ln.ValueScopeName=ln.Scope=ln.varKinds=ln.UsedValueState=void 0;var an=qs(),zf=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},hu=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(hu||(ln.UsedValueState=hu={}));ln.varKinds={const:new an.Name("const"),let:new an.Name("let"),var:new an.Name("var")};var mu=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof an.Name?n:this.name(n)}name(n){return new an.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};ln.Scope=mu;var gu=class extends an.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:i}){this.value=n,this.scopePath=(0,an._)`.${new an.Name(t)}[${i}]`}};ln.ValueScopeName=gu;var xq=(0,an._)`\n`,Bf=class extends mu{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=Ve(re({},n),{_n:n.lines?xq:an.nil})}get(){return this._scope}name(n){return new gu(n,this._newName(n))}value(n,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(n),{prefix:s}=r,l=(i=t.key)!==null&&i!==void 0?i:t.ref,u=this._values[s];if(u){let m=u.get(l);if(m)return m}else u=this._values[s]=new Map;u.set(l,r);let d=this._scope[s]||(this._scope[s]=[]),p=d.length;return d[p]=t.ref,r.setValue(t,{property:s,itemIndex:p}),r}getValue(n,t){let i=this._values[n];if(i)return i.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,an._)`${n}${i.scopePath}`})}scopeCode(n=this._values,t,i){return this._reduceValues(n,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,i)}_reduceValues(n,t,i={},r){let s=an.nil;for(let l in n){let u=n[l];if(!u)continue;let d=i[l]=i[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,hu.Started);let m=t(p);if(m){let g=this.opts.es5?ln.varKinds.var:ln.varKinds.const;s=(0,an._)`${s}${g} ${p} = ${m};${this.opts._n}`}else if(m=r?.(p))s=(0,an._)`${s}${m}${this.opts._n}`;else throw new zf(p);d.set(p,hu.Completed)})}return s}};ln.ValueScope=Bf});var ue=y(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.or=Se.and=Se.not=Se.CodeGen=Se.operators=Se.varKinds=Se.ValueScopeName=Se.ValueScope=Se.Scope=Se.Name=Se.regexpCode=Se.stringify=Se.getProperty=Se.nil=Se.strConcat=Se.str=Se._=void 0;var Re=qs(),Yn=Hf(),nr=qs();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return nr._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return nr.str}});Object.defineProperty(Se,"strConcat",{enumerable:!0,get:function(){return nr.strConcat}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return nr.nil}});Object.defineProperty(Se,"getProperty",{enumerable:!0,get:function(){return nr.getProperty}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return nr.stringify}});Object.defineProperty(Se,"regexpCode",{enumerable:!0,get:function(){return nr.regexpCode}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return nr.Name}});var wu=Hf();Object.defineProperty(Se,"Scope",{enumerable:!0,get:function(){return wu.Scope}});Object.defineProperty(Se,"ValueScope",{enumerable:!0,get:function(){return wu.ValueScope}});Object.defineProperty(Se,"ValueScopeName",{enumerable:!0,get:function(){return wu.ValueScopeName}});Object.defineProperty(Se,"varKinds",{enumerable:!0,get:function(){return wu.varKinds}});Se.operators={GT:new Re._Code(">"),GTE:new Re._Code(">="),LT:new Re._Code("<"),LTE:new Re._Code("<="),EQ:new Re._Code("==="),NEQ:new Re._Code("!=="),NOT:new Re._Code("!"),OR:new Re._Code("||"),AND:new Re._Code("&&"),ADD:new Re._Code("+")};var Ri=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},Uf=class extends Ri{constructor(n,t,i){super(),this.varKind=n,this.name=t,this.rhs=i}render({es5:n,_n:t}){let i=n?Yn.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=wo(this.rhs,n,t)),this}get names(){return this.rhs instanceof Re._CodeOrName?this.rhs.names:{}}},yu=class extends Ri{constructor(n,t,i){super(),this.lhs=n,this.rhs=t,this.sideEffects=i}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Re.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=wo(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Re.Name?{}:re({},this.lhs.names);return bu(n,this.rhs)}},Wf=class extends yu{constructor(n,t,i,r){super(n,i,r),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},Gf=class extends Ri{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Kf=class extends Ri{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Jf=class extends Ri{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Zf=class extends Ri{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=wo(this.code,n,t),this}get names(){return this.code instanceof Re._CodeOrName?this.code.names:{}}},js=class extends Ri{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,i)=>t+i.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let i=n[t].optimizeNodes();Array.isArray(i)?n.splice(t,1,...i):i?n[t]=i:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:i}=this,r=i.length;for(;r--;){let s=i[r];s.optimizeNames(n,t)||(Iq(n,s.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>Rr(n,t.names),{})}},Ni=class extends js{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},Qf=class extends js{},Yf=(()=>{class e extends Ni{}return e.kind="else",e})(),_u=(()=>{class e extends Ni{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let r=i.optimizeNodes();i=this.else=Array.isArray(r)?new Yf(r):r}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(cv(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=wo(this.condition,t,i),this}get names(){let t=super.names;return bu(t,this.condition),this.else&&Rr(t,this.else.names),t}}return e.kind="if",e})(),Cu=(()=>{class e extends Ni{}return e.kind="for",e})(),Xf=class extends Cu{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=wo(this.iteration,n,t),this}get names(){return Rr(super.names,this.iteration.names)}},ep=class extends Cu{constructor(n,t,i,r){super(),this.varKind=n,this.name=t,this.from=i,this.to=r}render(n){let t=n.es5?Yn.varKinds.var:this.varKind,{name:i,from:r,to:s}=this;return`for(${t} ${i}=${r}; ${i}<${s}; ${i}++)`+super.render(n)}get names(){let n=bu(super.names,this.from);return bu(n,this.to)}},vu=class extends Cu{constructor(n,t,i,r){super(),this.loop=n,this.varKind=t,this.name=i,this.iterable=r}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=wo(this.iterable,n,t),this}get names(){return Rr(super.names,this.iterable.names)}},sv=(()=>{class e extends Ni{constructor(t,i,r){super(),this.name=t,this.args=i,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),av=(()=>{class e extends js{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),tp=class extends Ni{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var i,r;return super.optimizeNames(n,t),(i=this.catch)===null||i===void 0||i.optimizeNames(n,t),(r=this.finally)===null||r===void 0||r.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&Rr(n,this.catch.names),this.finally&&Rr(n,this.finally.names),n}},lv=(()=>{class e extends Ni{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),uv=(()=>{class e extends Ni{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),np=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ve(re({},t),{_n:t.lines?`
|
|
1
|
+
import{a as bo,d as G0,e as Ms,g as K0,j as As,l as J0}from"./chunk-BNNKKGLH.js";import{a as yo}from"./chunk-GIBUKDL3.js";import{C as Nf,D as Mf,a as F0,b as q0,c as Ns,e as tr,f as j0,h as L0,i as V0,k as z0,l as du,m as B0,o as H0,p as U0,q as vo,t as W0,u as fu,v as Rf,w as pu}from"./chunk-OMEQ6FGM.js";import{e as M0,k as er,m as A0,w as k0}from"./chunk-JMPDHTJK.js";import{$ as ou,$b as Df,Aa as xt,Ab as ne,C as yf,Ca as x0,Cb as It,Db as St,Dc as Tf,Ea as I0,Eb as Dt,F as y0,Fb as G,Fc as $f,G as v0,Gb as ee,Hb as Y,I as Os,Ib as le,Mc as Qn,Nc as H,O as b0,Oc as cu,P as po,Pc as $0,Q as vf,Qb as P0,R as Jn,Rb as bt,Rc as $t,S as w0,Sb as Xi,Ua as Ne,Uc as Tr,Vc as R0,W as bf,Wc as N0,X as je,Xb as Ue,Y as Ot,Za as L,Zb as F,_ as Zn,_b as Sf,a as Dr,aa as N,ac as Pr,bc as Or,c as Er,cc as on,d as Ae,db as Cf,dc as sn,e as fo,ea as C0,eb as ho,ec as lu,f as _f,fc as uu,ga as pt,gb as mo,h as p0,ha as ht,hb as au,hc as An,i as nu,ib as Rs,ic as Ze,jc as X,ka as Ts,kb as Mn,kc as wn,la as $i,lc as go,m as h0,ma as $s,mc as O0,nb as $e,o as iu,oa as ke,ob as Tt,pa as bn,pb as mt,qb as S0,rb as D0,rc as Ef,sa as fi,sb as xf,sc as Pf,tb as E0,tc as Of,u as m0,vc as _o,wc as Zt,x as g0,xa as Nt,xb as If,xc as T0,y as ru,ya as su,yb as _e,z as _0,za as wf,zb as te}from"./chunk-JJ5CEM72.js";import{a as re,b as Ve,e as y,g as Jt,h as Yi}from"./chunk-VJN6YUS2.js";var iv=y(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.formatNames=hi.fastFormats=hi.fullFormats=void 0;function pi(e,n){return{validate:e,compare:n}}hi.fullFormats={date:pi(X0,qf),time:pi(kf(!0),jf),"date-time":pi(Z0(!0),tv),"iso-time":pi(kf(),ev),"iso-date-time":pi(Z0(),nv),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:aq,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:hq,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:lq,int32:{type:"number",validate:dq},int64:{type:"number",validate:fq},float:{type:"number",validate:Y0},double:{type:"number",validate:Y0},password:!0,binary:!0};hi.fastFormats=Ve(re({},hi.fullFormats),{date:pi(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,qf),time:pi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,jf),"date-time":pi(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,tv),"iso-time":pi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ev),"iso-date-time":pi(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,nv),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});hi.formatNames=Object.keys(hi.fullFormats);function nq(e){return e%4===0&&(e%100!==0||e%400===0)}var iq=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,rq=[0,31,28,31,30,31,30,31,31,30,31,30,31];function X0(e){let n=iq.exec(e);if(!n)return!1;let t=+n[1],i=+n[2],r=+n[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&nq(t)?29:rq[i])}function qf(e,n){if(e&&n)return e>n?1:e<n?-1:0}var Af=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function kf(e){return function(t){let i=Af.exec(t);if(!i)return!1;let r=+i[1],s=+i[2],l=+i[3],u=i[4],d=i[5]==="-"?-1:1,p=+(i[6]||0),m=+(i[7]||0);if(p>23||m>59||e&&!u)return!1;if(r<=23&&s<=59&&l<60)return!0;let g=s-m*d,w=r-p*d-(g<0?1:0);return(w===23||w===-1)&&(g===59||g===-1)&&l<61}}function jf(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+n).valueOf();if(t&&i)return t-i}function ev(e,n){if(!(e&&n))return;let t=Af.exec(e),i=Af.exec(n);if(t&&i)return e=t[1]+t[2]+t[3],n=i[1]+i[2]+i[3],e>n?1:e<n?-1:0}var Ff=/t|\s/i;function Z0(e){let n=kf(e);return function(i){let r=i.split(Ff);return r.length===2&&X0(r[0])&&n(r[1])}}function tv(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),i=new Date(n).valueOf();if(t&&i)return t-i}function nv(e,n){if(!(e&&n))return;let[t,i]=e.split(Ff),[r,s]=n.split(Ff),l=qf(t,r);if(l!==void 0)return l||jf(i,s)}var oq=/\/|:/,sq=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function aq(e){return oq.test(e)&&sq.test(e)}var Q0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function lq(e){return Q0.lastIndex=0,Q0.test(e)}var uq=-(2**31),cq=2**31-1;function dq(e){return Number.isInteger(e)&&e<=cq&&e>=uq}function fq(e){return Number.isInteger(e)}function Y0(){return!0}var pq=/[^\\]\\Z/;function hq(e){if(pq.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var qs=y(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.regexpCode=Fe.getEsmExportName=Fe.getProperty=Fe.safeStringify=Fe.stringify=Fe.strConcat=Fe.addCodeArg=Fe.str=Fe._=Fe.nil=Fe._Code=Fe.Name=Fe.IDENTIFIER=Fe._CodeOrName=void 0;var ks=class{};Fe._CodeOrName=ks;Fe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $r=class extends ks{constructor(n){if(super(),!Fe.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Fe.Name=$r;var kn=class extends ks{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,i)=>(i instanceof $r&&(t[i.str]=(t[i.str]||0)+1),t),{})}};Fe._Code=kn;Fe.nil=new kn("");function rv(e,...n){let t=[e[0]],i=0;for(;i<n.length;)Vf(t,n[i]),t.push(e[++i]);return new kn(t)}Fe._=rv;var Lf=new kn("+");function ov(e,...n){let t=[Fs(e[0])],i=0;for(;i<n.length;)t.push(Lf),Vf(t,n[i]),t.push(Lf,Fs(e[++i]));return mq(t),new kn(t)}Fe.str=ov;function Vf(e,n){n instanceof kn?e.push(...n._items):n instanceof $r?e.push(n):e.push(yq(n))}Fe.addCodeArg=Vf;function mq(e){let n=1;for(;n<e.length-1;){if(e[n]===Lf){let t=gq(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function gq(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof $r||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof $r))return`"${e}${n.slice(1)}`}function _q(e,n){return n.emptyStr()?e:e.emptyStr()?n:ov`${e}${n}`}Fe.strConcat=_q;function yq(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Fs(Array.isArray(e)?e.join(","):e)}function vq(e){return new kn(Fs(e))}Fe.stringify=vq;function Fs(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Fe.safeStringify=Fs;function bq(e){return typeof e=="string"&&Fe.IDENTIFIER.test(e)?new kn(`.${e}`):rv`[${e}]`}Fe.getProperty=bq;function wq(e){if(typeof e=="string"&&Fe.IDENTIFIER.test(e))return new kn(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Fe.getEsmExportName=wq;function Cq(e){return new kn(e.toString())}Fe.regexpCode=Cq});var Hf=y(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ValueScope=ln.ValueScopeName=ln.Scope=ln.varKinds=ln.UsedValueState=void 0;var an=qs(),zf=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},hu=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(hu||(ln.UsedValueState=hu={}));ln.varKinds={const:new an.Name("const"),let:new an.Name("let"),var:new an.Name("var")};var mu=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof an.Name?n:this.name(n)}name(n){return new an.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};ln.Scope=mu;var gu=class extends an.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:i}){this.value=n,this.scopePath=(0,an._)`.${new an.Name(t)}[${i}]`}};ln.ValueScopeName=gu;var xq=(0,an._)`\n`,Bf=class extends mu{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=Ve(re({},n),{_n:n.lines?xq:an.nil})}get(){return this._scope}name(n){return new gu(n,this._newName(n))}value(n,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(n),{prefix:s}=r,l=(i=t.key)!==null&&i!==void 0?i:t.ref,u=this._values[s];if(u){let m=u.get(l);if(m)return m}else u=this._values[s]=new Map;u.set(l,r);let d=this._scope[s]||(this._scope[s]=[]),p=d.length;return d[p]=t.ref,r.setValue(t,{property:s,itemIndex:p}),r}getValue(n,t){let i=this._values[n];if(i)return i.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,an._)`${n}${i.scopePath}`})}scopeCode(n=this._values,t,i){return this._reduceValues(n,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,i)}_reduceValues(n,t,i={},r){let s=an.nil;for(let l in n){let u=n[l];if(!u)continue;let d=i[l]=i[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,hu.Started);let m=t(p);if(m){let g=this.opts.es5?ln.varKinds.var:ln.varKinds.const;s=(0,an._)`${s}${g} ${p} = ${m};${this.opts._n}`}else if(m=r?.(p))s=(0,an._)`${s}${m}${this.opts._n}`;else throw new zf(p);d.set(p,hu.Completed)})}return s}};ln.ValueScope=Bf});var ue=y(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.or=Se.and=Se.not=Se.CodeGen=Se.operators=Se.varKinds=Se.ValueScopeName=Se.ValueScope=Se.Scope=Se.Name=Se.regexpCode=Se.stringify=Se.getProperty=Se.nil=Se.strConcat=Se.str=Se._=void 0;var Re=qs(),Yn=Hf(),nr=qs();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return nr._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return nr.str}});Object.defineProperty(Se,"strConcat",{enumerable:!0,get:function(){return nr.strConcat}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return nr.nil}});Object.defineProperty(Se,"getProperty",{enumerable:!0,get:function(){return nr.getProperty}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return nr.stringify}});Object.defineProperty(Se,"regexpCode",{enumerable:!0,get:function(){return nr.regexpCode}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return nr.Name}});var wu=Hf();Object.defineProperty(Se,"Scope",{enumerable:!0,get:function(){return wu.Scope}});Object.defineProperty(Se,"ValueScope",{enumerable:!0,get:function(){return wu.ValueScope}});Object.defineProperty(Se,"ValueScopeName",{enumerable:!0,get:function(){return wu.ValueScopeName}});Object.defineProperty(Se,"varKinds",{enumerable:!0,get:function(){return wu.varKinds}});Se.operators={GT:new Re._Code(">"),GTE:new Re._Code(">="),LT:new Re._Code("<"),LTE:new Re._Code("<="),EQ:new Re._Code("==="),NEQ:new Re._Code("!=="),NOT:new Re._Code("!"),OR:new Re._Code("||"),AND:new Re._Code("&&"),ADD:new Re._Code("+")};var Ri=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},Uf=class extends Ri{constructor(n,t,i){super(),this.varKind=n,this.name=t,this.rhs=i}render({es5:n,_n:t}){let i=n?Yn.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=wo(this.rhs,n,t)),this}get names(){return this.rhs instanceof Re._CodeOrName?this.rhs.names:{}}},yu=class extends Ri{constructor(n,t,i){super(),this.lhs=n,this.rhs=t,this.sideEffects=i}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Re.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=wo(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Re.Name?{}:re({},this.lhs.names);return bu(n,this.rhs)}},Wf=class extends yu{constructor(n,t,i,r){super(n,i,r),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},Gf=class extends Ri{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Kf=class extends Ri{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Jf=class extends Ri{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Zf=class extends Ri{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=wo(this.code,n,t),this}get names(){return this.code instanceof Re._CodeOrName?this.code.names:{}}},js=class extends Ri{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,i)=>t+i.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let i=n[t].optimizeNodes();Array.isArray(i)?n.splice(t,1,...i):i?n[t]=i:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:i}=this,r=i.length;for(;r--;){let s=i[r];s.optimizeNames(n,t)||(Iq(n,s.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>Rr(n,t.names),{})}},Ni=class extends js{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},Qf=class extends js{},Yf=(()=>{class e extends Ni{}return e.kind="else",e})(),_u=(()=>{class e extends Ni{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let r=i.optimizeNodes();i=this.else=Array.isArray(r)?new Yf(r):r}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(cv(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=wo(this.condition,t,i),this}get names(){let t=super.names;return bu(t,this.condition),this.else&&Rr(t,this.else.names),t}}return e.kind="if",e})(),Cu=(()=>{class e extends Ni{}return e.kind="for",e})(),Xf=class extends Cu{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=wo(this.iteration,n,t),this}get names(){return Rr(super.names,this.iteration.names)}},ep=class extends Cu{constructor(n,t,i,r){super(),this.varKind=n,this.name=t,this.from=i,this.to=r}render(n){let t=n.es5?Yn.varKinds.var:this.varKind,{name:i,from:r,to:s}=this;return`for(${t} ${i}=${r}; ${i}<${s}; ${i}++)`+super.render(n)}get names(){let n=bu(super.names,this.from);return bu(n,this.to)}},vu=class extends Cu{constructor(n,t,i,r){super(),this.loop=n,this.varKind=t,this.name=i,this.iterable=r}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=wo(this.iterable,n,t),this}get names(){return Rr(super.names,this.iterable.names)}},sv=(()=>{class e extends Ni{constructor(t,i,r){super(),this.name=t,this.args=i,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),av=(()=>{class e extends js{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),tp=class extends Ni{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var i,r;return super.optimizeNames(n,t),(i=this.catch)===null||i===void 0||i.optimizeNames(n,t),(r=this.finally)===null||r===void 0||r.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&Rr(n,this.catch.names),this.finally&&Rr(n,this.finally.names),n}},lv=(()=>{class e extends Ni{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),uv=(()=>{class e extends Ni{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),np=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ve(re({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=n,this._scope=new Yn.Scope({parent:n}),this._nodes=[new Qf]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,t){let i=this._extScope.value(n,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(n,t){return this._extScope.getValue(n,t)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,t,i,r){let s=this._scope.toName(t);return i!==void 0&&r&&(this._constants[s.str]=i),this._leafNode(new Uf(n,s,i)),s}const(n,t,i){return this._def(Yn.varKinds.const,n,t,i)}let(n,t,i){return this._def(Yn.varKinds.let,n,t,i)}var(n,t,i){return this._def(Yn.varKinds.var,n,t,i)}assign(n,t,i){return this._leafNode(new yu(n,t,i))}add(n,t){return this._leafNode(new Wf(n,Se.operators.ADD,t))}code(n){return typeof n=="function"?n():n!==Re.nil&&this._leafNode(new Zf(n)),this}object(...n){let t=["{"];for(let[i,r]of n)t.length>1&&t.push(","),t.push(i),(i!==r||this.opts.es5)&&(t.push(":"),(0,Re.addCodeArg)(t,r));return t.push("}"),new Re._Code(t)}if(n,t,i){if(this._blockNode(new _u(n)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new _u(n))}else(){return this._elseNode(new Yf)}endIf(){return this._endBlockNode(_u,Yf)}_for(n,t){return this._blockNode(n),t&&this.code(t).endFor(),this}for(n,t){return this._for(new Xf(n),t)}forRange(n,t,i,r,s=this.opts.es5?Yn.varKinds.var:Yn.varKinds.let){let l=this._scope.toName(n);return this._for(new ep(s,l,t,i),()=>r(l))}forOf(n,t,i,r=Yn.varKinds.const){let s=this._scope.toName(n);if(this.opts.es5){let l=t instanceof Re.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Re._)`${l}.length`,u=>{this.var(s,(0,Re._)`${l}[${u}]`),i(s)})}return this._for(new vu("of",r,s,t),()=>i(s))}forIn(n,t,i,r=this.opts.es5?Yn.varKinds.var:Yn.varKinds.const){if(this.opts.ownProperties)return this.forOf(n,(0,Re._)`Object.keys(${t})`,i);let s=this._scope.toName(n);return this._for(new vu("in",r,s,t),()=>i(s))}endFor(){return this._endBlockNode(Cu)}label(n){return this._leafNode(new Gf(n))}break(n){return this._leafNode(new Kf(n))}return(n){let t=new av;if(this._blockNode(t),this.code(n),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(av)}try(n,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new tp;if(this._blockNode(r),this.code(n),t){let s=this.name("e");this._currNode=r.catch=new lv(s),t(s)}return i&&(this._currNode=r.finally=new uv,this.code(i)),this._endBlockNode(lv,uv)}throw(n){return this._leafNode(new Jf(n))}block(n,t){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(t),this}endBlock(n){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||n!==void 0&&i!==n)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${n} expected`);return this._nodes.length=t,this}func(n,t=Re.nil,i,r){return this._blockNode(new sv(n,t,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(sv)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,t){let i=this._currNode;if(i instanceof n||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${n.kind}/${t.kind}`:n.kind}"`)}_elseNode(n){let t=this._currNode;if(!(t instanceof _u))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=n,this}get _root(){return this._nodes[0]}get _currNode(){let n=this._nodes;return n[n.length-1]}set _currNode(n){let t=this._nodes;t[t.length-1]=n}};Se.CodeGen=np;function Rr(e,n){for(let t in n)e[t]=(e[t]||0)+(n[t]||0);return e}function bu(e,n){return n instanceof Re._CodeOrName?Rr(e,n.names):e}function wo(e,n,t){if(e instanceof Re.Name)return i(e);if(!r(e))return e;return new Re._Code(e._items.reduce((s,l)=>(l instanceof Re.Name&&(l=i(l)),l instanceof Re._Code?s.push(...l._items):s.push(l),s),[]));function i(s){let l=t[s.str];return l===void 0||n[s.str]!==1?s:(delete n[s.str],l)}function r(s){return s instanceof Re._Code&&s._items.some(l=>l instanceof Re.Name&&n[l.str]===1&&t[l.str]!==void 0)}}function Iq(e,n){for(let t in n)e[t]=(e[t]||0)-(n[t]||0)}function cv(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Re._)`!${ip(e)}`}Se.not=cv;var Sq=dv(Se.operators.AND);function Dq(...e){return e.reduce(Sq)}Se.and=Dq;var Eq=dv(Se.operators.OR);function Pq(...e){return e.reduce(Eq)}Se.or=Pq;function dv(e){return(n,t)=>n===Re.nil?t:t===Re.nil?n:(0,Re._)`${ip(n)} ${e} ${ip(t)}`}function ip(e){return e instanceof Re.Name?e:(0,Re._)`(${e})`}});var Pe=y(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.checkStrictMode=De.getErrorPath=De.Type=De.useFunc=De.setEvaluated=De.evaluatedPropsToName=De.mergeEvaluated=De.eachItem=De.unescapeJsonPointer=De.escapeJsonPointer=De.escapeFragment=De.unescapeFragment=De.schemaRefOrVal=De.schemaHasRulesButRef=De.schemaHasRules=De.checkUnknownRules=De.alwaysValidSchema=De.toHash=void 0;var Qe=ue(),Oq=qs();function Tq(e){let n={};for(let t of e)n[t]=!0;return n}De.toHash=Tq;function $q(e,n){return typeof n=="boolean"?n:Object.keys(n).length===0?!0:(hv(e,n),!mv(n,e.self.RULES.all))}De.alwaysValidSchema=$q;function hv(e,n=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof n=="boolean")return;let r=i.RULES.keywords;for(let s in n)r[s]||yv(e,`unknown keyword: "${s}"`)}De.checkUnknownRules=hv;function mv(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(n[t])return!0;return!1}De.schemaHasRules=mv;function Rq(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&n.all[t])return!0;return!1}De.schemaHasRulesButRef=Rq;function Nq({topSchemaRef:e,schemaPath:n},t,i,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Qe._)`${t}`}return(0,Qe._)`${e}${n}${(0,Qe.getProperty)(i)}`}De.schemaRefOrVal=Nq;function Mq(e){return gv(decodeURIComponent(e))}De.unescapeFragment=Mq;function Aq(e){return encodeURIComponent(op(e))}De.escapeFragment=Aq;function op(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}De.escapeJsonPointer=op;function gv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}De.unescapeJsonPointer=gv;function kq(e,n){if(Array.isArray(e))for(let t of e)n(t);else n(e)}De.eachItem=kq;function fv({mergeNames:e,mergeToName:n,mergeValues:t,resultToName:i}){return(r,s,l,u)=>{let d=l===void 0?s:l instanceof Qe.Name?(s instanceof Qe.Name?e(r,s,l):n(r,s,l),l):s instanceof Qe.Name?(n(r,l,s),s):t(s,l);return u===Qe.Name&&!(d instanceof Qe.Name)?i(r,d):d}}De.mergeEvaluated={props:fv({mergeNames:(e,n,t)=>e.if((0,Qe._)`${t} !== true && ${n} !== undefined`,()=>{e.if((0,Qe._)`${n} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Qe._)`${t} || {}`).code((0,Qe._)`Object.assign(${t}, ${n})`))}),mergeToName:(e,n,t)=>e.if((0,Qe._)`${t} !== true`,()=>{n===!0?e.assign(t,!0):(e.assign(t,(0,Qe._)`${t} || {}`),sp(e,t,n))}),mergeValues:(e,n)=>e===!0?!0:re(re({},e),n),resultToName:_v}),items:fv({mergeNames:(e,n,t)=>e.if((0,Qe._)`${t} !== true && ${n} !== undefined`,()=>e.assign(t,(0,Qe._)`${n} === true ? true : ${t} > ${n} ? ${t} : ${n}`)),mergeToName:(e,n,t)=>e.if((0,Qe._)`${t} !== true`,()=>e.assign(t,n===!0?!0:(0,Qe._)`${t} > ${n} ? ${t} : ${n}`)),mergeValues:(e,n)=>e===!0?!0:Math.max(e,n),resultToName:(e,n)=>e.var("items",n)})};function _v(e,n){if(n===!0)return e.var("props",!0);let t=e.var("props",(0,Qe._)`{}`);return n!==void 0&&sp(e,t,n),t}De.evaluatedPropsToName=_v;function sp(e,n,t){Object.keys(t).forEach(i=>e.assign((0,Qe._)`${n}${(0,Qe.getProperty)(i)}`,!0))}De.setEvaluated=sp;var pv={};function Fq(e,n){return e.scopeValue("func",{ref:n,code:pv[n.code]||(pv[n.code]=new Oq._Code(n.code))})}De.useFunc=Fq;var rp=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(rp||(De.Type=rp={}));function qq(e,n,t){if(e instanceof Qe.Name){let i=n===rp.Num;return t?i?(0,Qe._)`"[" + ${e} + "]"`:(0,Qe._)`"['" + ${e} + "']"`:i?(0,Qe._)`"/" + ${e}`:(0,Qe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Qe.getProperty)(e).toString():"/"+op(e)}De.getErrorPath=qq;function yv(e,n,t=e.opts.strictSchema){if(t){if(n=`strict mode: ${n}`,t===!0)throw new Error(n);e.self.logger.warn(n)}}De.checkStrictMode=yv});var Fn=y(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var Lt=ue(),jq={data:new Lt.Name("data"),valCxt:new Lt.Name("valCxt"),instancePath:new Lt.Name("instancePath"),parentData:new Lt.Name("parentData"),parentDataProperty:new Lt.Name("parentDataProperty"),rootData:new Lt.Name("rootData"),dynamicAnchors:new Lt.Name("dynamicAnchors"),vErrors:new Lt.Name("vErrors"),errors:new Lt.Name("errors"),this:new Lt.Name("this"),self:new Lt.Name("self"),scope:new Lt.Name("scope"),json:new Lt.Name("json"),jsonPos:new Lt.Name("jsonPos"),jsonLen:new Lt.Name("jsonLen"),jsonPart:new Lt.Name("jsonPart")};ap.default=jq});var Ls=y(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.extendErrors=Vt.resetErrorsCount=Vt.reportExtraError=Vt.reportError=Vt.keyword$DataError=Vt.keywordError=void 0;var Me=ue(),xu=Pe(),Qt=Fn();Vt.keywordError={message:({keyword:e})=>(0,Me.str)`must pass "${e}" keyword validation`};Vt.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,Me.str)`"${e}" keyword must be ${n} ($data)`:(0,Me.str)`"${e}" keyword is invalid ($data)`};function Lq(e,n=Vt.keywordError,t,i){let{it:r}=e,{gen:s,compositeRule:l,allErrors:u}=r,d=wv(e,n,t);i??(l||u)?vv(s,d):bv(r,(0,Me._)`[${d}]`)}Vt.reportError=Lq;function Vq(e,n=Vt.keywordError,t){let{it:i}=e,{gen:r,compositeRule:s,allErrors:l}=i,u=wv(e,n,t);vv(r,u),s||l||bv(i,Qt.default.vErrors)}Vt.reportExtraError=Vq;function zq(e,n){e.assign(Qt.default.errors,n),e.if((0,Me._)`${Qt.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,Me._)`${Qt.default.vErrors}.length`,n),()=>e.assign(Qt.default.vErrors,null)))}Vt.resetErrorsCount=zq;function Bq({gen:e,keyword:n,schemaValue:t,data:i,errsCount:r,it:s}){if(r===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",r,Qt.default.errors,u=>{e.const(l,(0,Me._)`${Qt.default.vErrors}[${u}]`),e.if((0,Me._)`${l}.instancePath === undefined`,()=>e.assign((0,Me._)`${l}.instancePath`,(0,Me.strConcat)(Qt.default.instancePath,s.errorPath))),e.assign((0,Me._)`${l}.schemaPath`,(0,Me.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,Me._)`${l}.schema`,t),e.assign((0,Me._)`${l}.data`,i))})}Vt.extendErrors=Bq;function vv(e,n){let t=e.const("err",n);e.if((0,Me._)`${Qt.default.vErrors} === null`,()=>e.assign(Qt.default.vErrors,(0,Me._)`[${t}]`),(0,Me._)`${Qt.default.vErrors}.push(${t})`),e.code((0,Me._)`${Qt.default.errors}++`)}function bv(e,n){let{gen:t,validateName:i,schemaEnv:r}=e;r.$async?t.throw((0,Me._)`new ${e.ValidationError}(${n})`):(t.assign((0,Me._)`${i}.errors`,n),t.return(!1))}var Nr={keyword:new Me.Name("keyword"),schemaPath:new Me.Name("schemaPath"),params:new Me.Name("params"),propertyName:new Me.Name("propertyName"),message:new Me.Name("message"),schema:new Me.Name("schema"),parentSchema:new Me.Name("parentSchema")};function wv(e,n,t){let{createErrors:i}=e.it;return i===!1?(0,Me._)`{}`:Hq(e,n,t)}function Hq(e,n,t={}){let{gen:i,it:r}=e,s=[Uq(r,t),Wq(e,t)];return Gq(e,n,s),i.object(...s)}function Uq({errorPath:e},{instancePath:n}){let t=n?(0,Me.str)`${e}${(0,xu.getErrorPath)(n,xu.Type.Str)}`:e;return[Qt.default.instancePath,(0,Me.strConcat)(Qt.default.instancePath,t)]}function Wq({keyword:e,it:{errSchemaPath:n}},{schemaPath:t,parentSchema:i}){let r=i?n:(0,Me.str)`${n}/${e}`;return t&&(r=(0,Me.str)`${r}${(0,xu.getErrorPath)(t,xu.Type.Str)}`),[Nr.schemaPath,r]}function Gq(e,{params:n,message:t},i){let{keyword:r,data:s,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:m,schemaPath:g}=u;i.push([Nr.keyword,r],[Nr.params,typeof n=="function"?n(e):n||(0,Me._)`{}`]),d.messages&&i.push([Nr.message,typeof t=="function"?t(e):t]),d.verbose&&i.push([Nr.schema,l],[Nr.parentSchema,(0,Me._)`${m}${g}`],[Qt.default.data,s]),p&&i.push([Nr.propertyName,p])}});var xv=y(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.boolOrEmptySchema=Co.topBoolOrEmptySchema=void 0;var Kq=Ls(),Jq=ue(),Zq=Fn(),Qq={message:"boolean schema is false"};function Yq(e){let{gen:n,schema:t,validateName:i}=e;t===!1?Cv(e,!1):typeof t=="object"&&t.$async===!0?n.return(Zq.default.data):(n.assign((0,Jq._)`${i}.errors`,null),n.return(!0))}Co.topBoolOrEmptySchema=Yq;function Xq(e,n){let{gen:t,schema:i}=e;i===!1?(t.var(n,!1),Cv(e)):t.var(n,!0)}Co.boolOrEmptySchema=Xq;function Cv(e,n){let{gen:t,data:i}=e,r={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Kq.reportError)(r,Qq,void 0,n)}});var lp=y(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.getRules=xo.isJSONType=void 0;var ej=["string","number","integer","boolean","null","object","array"],tj=new Set(ej);function nj(e){return typeof e=="string"&&tj.has(e)}xo.isJSONType=nj;function ij(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ve(re({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}xo.getRules=ij});var up=y(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.shouldUseRule=ir.shouldUseGroup=ir.schemaHasRulesForType=void 0;function rj({schema:e,self:n},t){let i=n.RULES.types[t];return i&&i!==!0&&Iv(e,i)}ir.schemaHasRulesForType=rj;function Iv(e,n){return n.rules.some(t=>Sv(e,t))}ir.shouldUseGroup=Iv;function Sv(e,n){var t;return e[n.keyword]!==void 0||((t=n.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}ir.shouldUseRule=Sv});var Vs=y(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.reportTypeError=zt.checkDataTypes=zt.checkDataType=zt.coerceAndCheckDataType=zt.getJSONTypes=zt.getSchemaTypes=zt.DataType=void 0;var oj=lp(),sj=up(),aj=Ls(),we=ue(),Dv=Pe(),Io=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(Io||(zt.DataType=Io={}));function lj(e){let n=Ev(e.type);if(n.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!n.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&n.push("null")}return n}zt.getSchemaTypes=lj;function Ev(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(oj.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}zt.getJSONTypes=Ev;function uj(e,n){let{gen:t,data:i,opts:r}=e,s=cj(n,r.coerceTypes),l=n.length>0&&!(s.length===0&&n.length===1&&(0,sj.schemaHasRulesForType)(e,n[0]));if(l){let u=dp(n,i,r.strictNumbers,Io.Wrong);t.if(u,()=>{s.length?dj(e,n,s):fp(e)})}return l}zt.coerceAndCheckDataType=uj;var Pv=new Set(["string","number","integer","boolean","null"]);function cj(e,n){return n?e.filter(t=>Pv.has(t)||n==="array"&&t==="array"):[]}function dj(e,n,t){let{gen:i,data:r,opts:s}=e,l=i.let("dataType",(0,we._)`typeof ${r}`),u=i.let("coerced",(0,we._)`undefined`);s.coerceTypes==="array"&&i.if((0,we._)`${l} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>i.assign(r,(0,we._)`${r}[0]`).assign(l,(0,we._)`typeof ${r}`).if(dp(n,r,s.strictNumbers),()=>i.assign(u,r))),i.if((0,we._)`${u} !== undefined`);for(let p of t)(Pv.has(p)||p==="array"&&s.coerceTypes==="array")&&d(p);i.else(),fp(e),i.endIf(),i.if((0,we._)`${u} !== undefined`,()=>{i.assign(r,u),fj(e,u)});function d(p){switch(p){case"string":i.elseIf((0,we._)`${l} == "number" || ${l} == "boolean"`).assign(u,(0,we._)`"" + ${r}`).elseIf((0,we._)`${r} === null`).assign(u,(0,we._)`""`);return;case"number":i.elseIf((0,we._)`${l} == "boolean" || ${r} === null
|
|
3
3
|
|| (${l} == "string" && ${r} && ${r} == +${r})`).assign(u,(0,we._)`+${r}`);return;case"integer":i.elseIf((0,we._)`${l} === "boolean" || ${r} === null
|
|
4
4
|
|| (${l} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(u,(0,we._)`+${r}`);return;case"boolean":i.elseIf((0,we._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(u,!1).elseIf((0,we._)`${r} === "true" || ${r} === 1`).assign(u,!0);return;case"null":i.elseIf((0,we._)`${r} === "" || ${r} === 0 || ${r} === false`),i.assign(u,null);return;case"array":i.elseIf((0,we._)`${l} === "string" || ${l} === "number"
|
|
@@ -85,7 +85,7 @@ return __eta.res;
|
|
|
85
85
|
`],encapsulation:2,changeDetection:0})}return e})(),zP=(()=>{class e{_ngZone=N(bn);_document=N($i);_styleLoader=N(gP);_renderer=N(mo).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new Ae;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=fi([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new Ae;pointerUp=new Ae;constructor(){}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,Lm)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(vQ),this._activeDragInstances.update(r=>[...r,t]),this._activeDragInstances().length===1)){let r=i.type.startsWith("touch"),s=u=>this.pointerUp.next(u),l=[["scroll",u=>this._scroll.next(u),Ea],["selectstart",this._preventDefaultWhileDragging,Lm]];r?l.push(["touchend",s,Ea],["touchcancel",s,Ea]):l.push(["mouseup",s,Ea]),r||l.push(["mousemove",u=>this.pointerMove.next(u),Lm]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=l.map(([u,d,p])=>this._renderer.listen(this._document,u,d,p))})}}stopDragging(t){this._activeDragInstances.update(i=>{let r=i.indexOf(t);return r>-1?(i.splice(r,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){let i=[this._scroll];return t&&t!==this._document&&i.push(new Er(r=>this._ngZone.runOutsideAngular(()=>{let s=this._renderer.listen(t,"scroll",l=>{this._activeDragInstances().length&&r.next(l)},Ea);return()=>{s()}}))),ru(...i)}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i)}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t)}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault()};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||e)};static \u0275prov=je({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),bQ={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Jm=(()=>{class e{_document=N($i);_ngZone=N(bn);_viewportRuler=N(yP);_dragDropRegistry=N(zP);_renderer=N(mo).createRenderer(null,null);constructor(){}createDrag(t,i=bQ){return new Hm(t,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(t){return new Wm(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=je({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),AP=new Zn("CDK_DRAG_PARENT");var wQ=new Zn("CdkDragHandle");var BP=new Zn("CDK_DRAG_CONFIG"),HP=new Zn("CdkDropList"),UP=(()=>{class e{element=N(xt);dropContainer=N(HP,{optional:!0,skipSelf:!0});_ngZone=N(bn);_viewContainerRef=N(Mn);_dir=N(Fm,{optional:!0});_changeDetectorRef=N($t);_selfHandle=N(wQ,{optional:!0,self:!0});_parentDrag=N(AP,{optional:!0,skipSelf:!0});_dragDropRegistry=N(zP);_destroyed=new Ae;_handles=new fo([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new ke;released=new ke;ended=new ke;entered=new ke;exited=new ke;dropped=new ke;moved=new Er(t=>{let i=this._dragRef.moved.pipe(iu(r=>({source:this,pointerPosition:r.pointerPosition,event:r.event,delta:r.delta,distance:r.distance}))).subscribe(t);return()=>{i.unsubscribe()}});_injector=N(Ts);constructor(){let t=this.dropContainer,i=N(BP,{optional:!0}),r=N(Jm);this._dragRef=r.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe(Jn(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){Cf(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){let i=t.rootElementSelector,r=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){let i=this._handles.getValue();i.push(t),this._handles.next(i)}_removeHandle(t){let i=this._handles.getValue(),r=i.indexOf(t);r>-1&&(i.splice(r,1),this._handles.next(i))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let t=this.element.nativeElement,i=t;this.rootElementSelector&&(i=t.closest!==void 0?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){let t=this.boundaryElement;return t?typeof t=="string"?this.element.nativeElement.closest(t):ri(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){let i=this._dir,r=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,l=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay=typeof r=="object"&&r?r:Pc(r),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(l).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe(v0(1)).subscribe(()=>{if(this._parentDrag){t.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let r=this._dragDropRegistry.getDragDirectiveForNode(i);if(r){t.withParent(r._dragRef);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(t){let{lockAxis:i,dragStartDelay:r,constrainPosition:s,previewClass:l,boundaryElement:u,draggingDisabled:d,rootElementSelector:p,previewContainer:m}=t;this.disabled=d??!1,this.dragStartDelay=r||0,this.lockAxis=i||null,s&&(this.constrainPosition=s),l&&(this.previewClass=l),u&&(this.boundaryElement=u),p&&(this.rootElementSelector=p),m&&(this.previewContainer=m)}_setupHandlesListener(){this._handles.pipe(w0(t=>{let i=t.map(r=>r.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),vf(t=>ru(...t.map(i=>i._stateChanges.pipe(po(i))))),Jn(this._destroyed)).subscribe(t=>{let i=this._dragRef,r=t.element.nativeElement;t.disabled?i.disableHandle(r):i.enableHandle(r)})}static \u0275fac=function(i){return new(i||e)};static \u0275dir=mt({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,r){i&2&&Ze("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",Tr],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",R0]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[_o([{provide:AP,useExisting:e}]),Nt]})}return e})(),kP=new Zn("CdkDropListGroup");var WP=(()=>{class e{element=N(xt);_changeDetectorRef=N($t);_scrollDispatcher=N(_P);_dir=N(Fm,{optional:!0});_group=N(kP,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new Ae;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=N(Tc).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;hasAnchor;dropped=new ke;entered=new ke;exited=new ke;sorted=new ke;_unsortedItems=new Set;constructor(){let t=N(Jm),i=N(BP,{optional:!0});this._dropListRef=t.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(r,s)=>this.enterPredicate(r.data,s.data),this._dropListRef.sortPredicate=(r,s,l)=>this.sortPredicate(r,s.data,l.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),e._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(t){this._unsortedItems.add(t),t._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(t){if(this._unsortedItems.delete(t),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(t._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let t=e._dropLists.indexOf(this);t>-1&&e._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe(po(this._dir.value),Jn(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{let i=bP(this.connectedTo).map(r=>{if(typeof r=="string"){let s=e._dropLists.find(l=>l.id===r);return s}return r});if(this._group&&this._group._items.forEach(r=>{i.indexOf(r)===-1&&i.push(r)}),!this._scrollableParentsResolved){let r=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(r),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let r=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(r)}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=Pc(this.autoScrollStep,2),t.hasAnchor=this.hasAnchor,t.connectedTo(i.filter(r=>r&&r!==this).map(r=>r._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),ru(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){let{lockAxis:i,draggingDisabled:r,sortingDisabled:s,listAutoScrollDisabled:l,listOrientation:u}=t;this.disabled=r??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=l??!1,this.orientation=u||"vertical",this.lockAxis=i||null}_syncItemsWithRef(t){this._latestSortedRefs=t,this._dropListRef.withItems(t)}static \u0275fac=function(i){return new(i||e)};static \u0275dir=mt({type:e,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,r){i&2&&(_e("id",r.id),Ze("cdk-drop-list-disabled",r.disabled)("cdk-drop-list-dragging",r._dropListRef.isDragging())("cdk-drop-list-receiving",r._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",Tr],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",Tr],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",Tr],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",Tr]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[_o([{provide:kP,useValue:void 0},{provide:HP,useExisting:e}])]})}return e})();var GP=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=Tt({type:e});static \u0275inj=Ot({providers:[Jm],imports:[vP]})}return e})();var n$=Jt(UT(),1),i$=Jt(pg(),1);var kt=[];for(let e=0;e<256;++e)kt.push((e+256).toString(16).slice(1));function WT(e,n=0){return(kt[e[n+0]]+kt[e[n+1]]+kt[e[n+2]]+kt[e[n+3]]+"-"+kt[e[n+4]]+kt[e[n+5]]+"-"+kt[e[n+6]]+kt[e[n+7]]+"-"+kt[e[n+8]]+kt[e[n+9]]+"-"+kt[e[n+10]]+kt[e[n+11]]+kt[e[n+12]]+kt[e[n+13]]+kt[e[n+14]]+kt[e[n+15]]).toLowerCase()}var gg,XY=new Uint8Array(16);function _g(){if(!gg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");gg=crypto.getRandomValues.bind(crypto)}return gg(XY)}var eX=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),yg={randomUUID:eX};function tX(e,n,t){e=e||{};let i=e.random??e.rng?.()??_g();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,n){if(t=t||0,t<0||t+16>n.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let r=0;r<16;++r)n[t+r]=i[r];return n}return WT(i)}function nX(e,n,t){return yg.randomUUID&&!n&&!e?yg.randomUUID():tX(e,n,t)}var vg=nX;var $g=["widgetContainer"],Gr=()=>["mousedown","touchstart"];function iX(e,n){if(e&1&&le(0,"span"),e&2){let t=F(2);X(t.options==null?null:t.options.icon)}}function rX(e,n){if(e&1&&le(0,"span",4),e&2){let t=F(2);G("innerHTML",t.buttonText,Ne)}}function oX(e,n){if(e&1){let t=bt();ee(0,"button",2),Ue("click",function(r){pt(t);let s=F();return ht(s.addItem(r))}),te(1,iX,1,2,"span",3),te(2,rX,1,1,"span",4),Y()}if(e&2){let t=F();X((t.options==null?null:t.options.fieldHtmlClass)||""),G("disabled",t.options==null?null:t.options.readonly)("appStopPropagation",Zt(6,Gr)),L(),ne(t.options!=null&&t.options.icon?1:-1),L(),ne(t.options!=null&&t.options.title?2:-1)}}function sX(e,n){if(e&1&&le(0,"span",2),e&2){let t=F();X(t.options==null?null:t.options.icon),G("innerHTML",t.options==null?null:t.options.title,Ne)}}function aX(e,n){if(e&1&&le(0,"input",4),e&2){let t,i,r=F();X(((r.options==null?null:r.options.fieldHtmlClass)||"")+(r.isChecked?" "+((r.options==null?null:r.options.activeClass)||"")+" "+((r.options==null||r.options.style==null?null:r.options.style.selected)||""):" "+((r.options==null||r.options.style==null?null:r.options.style.unselected)||""))),G("formControl",r.formControl)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName)("readonly",r.options!=null&&r.options.readonly?"readonly":null),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")}}function lX(e,n){if(e&1){let t=bt();ee(0,"input",5),Ue("change",function(r){pt(t);let s=F();return ht(s.updateValue(r))}),Y()}if(e&2){let t,i,r=F();X(((r.options==null?null:r.options.fieldHtmlClass)||"")+(r.isChecked?" "+((r.options==null?null:r.options.activeClass)||"")+" "+((r.options==null||r.options.style==null?null:r.options.style.selected)||""):" "+((r.options==null||r.options.style==null?null:r.options.style.unselected)||""))),G("checked",r.isChecked)("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName)("readonly",r.options!=null&&r.options.readonly?"readonly":null)("value",r.controlValue),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")}}function uX(e,n){if(e&1&&le(0,"span",6),e&2){let t=F();An("display",t.options!=null&&t.options.notitle?"none":""),G("innerHTML",t.options==null?null:t.options.title,Ne)}}function cX(e,n){if(e&1&&le(0,"label",2),e&2){let t=F();X((t.options==null?null:t.options.labelHtmlClass)||""),An("display",t.options!=null&&t.options.notitle?"none":""),G("innerHTML",t.options==null?null:t.options.title,Ne)}}function dX(e,n){if(e&1){let t=bt();ee(0,"label")(1,"input",3),Ue("change",function(r){pt(t);let s=F(2);return ht(s.updateValue(r))}),Y(),le(2,"span",2)(3,"span",4),Y()}if(e&2){let t,i,r=n.$implicit,s=F(2);X(((s.options==null?null:s.options.itemLabelHtmlClass)||"hb-uix-switch")+(r.checked?" "+((s.options==null?null:s.options.activeClass)||"")+" "+((s.options==null||s.options.style==null?null:s.options.style.selected)||""):" "+((s.options==null||s.options.style==null?null:s.options.style.unselected)||"hb-uix-switch"))),_e("for","control"+((t=s.layoutNode())==null?null:t._id)+"/"+r.value),L(),X((s.options==null?null:s.options.fieldHtmlClass)||""),G("checked",r.checked)("disabled",s.controlDisabled)("id","control"+((i=s.layoutNode())==null?null:i._id)+"/"+r.value)("name",r==null?null:r.name)("readonly",s.options!=null&&s.options.readonly?"readonly":null)("value",r.value),_e("required",s.options==null?null:s.options.required),L(),G("innerHTML",r.name,Ne)}}function fX(e,n){if(e&1&&(ee(0,"div"),St(1,dX,4,13,"label",1,It),Y()),e&2){let t=F();X((t.options==null?null:t.options.htmlClass)||""),L(),Dt(t.checkboxList)}}function pX(e,n){if(e&1){let t=bt();ee(0,"div")(1,"label")(2,"input",3),Ue("change",function(r){pt(t);let s=F(2);return ht(s.updateValue(r))}),Y(),le(3,"span",2)(4,"span",4),Y()()}if(e&2){let t,i,r=n.$implicit,s=F(2);X((s.options==null?null:s.options.htmlClass)||""),L(),X(((s.options==null?null:s.options.itemLabelHtmlClass)||"hb-uix-switch")+(r.checked?" "+((s.options==null?null:s.options.activeClass)||"")+" "+((s.options==null||s.options.style==null?null:s.options.style.selected)||""):" "+((s.options==null||s.options.style==null?null:s.options.style.unselected)||"hb-uix-switch"))),_e("for","control"+((t=s.layoutNode())==null?null:t._id)+"/"+r.value),L(),X((s.options==null?null:s.options.fieldHtmlClass)||""),G("checked",r.checked)("disabled",s.controlDisabled)("id","control"+((i=s.layoutNode())==null?null:i._id)+"/"+r.value)("name",r==null?null:r.name)("readonly",s.options!=null&&s.options.readonly?"readonly":null)("value",r.value),_e("required",s.options==null?null:s.options.required),L(),G("innerHTML",r==null?null:r.name,Ne)}}function hX(e,n){if(e&1&&(ee(0,"div"),St(1,pX,5,15,"div",1,It),Y()),e&2){let t=F();L(),Dt(t.checkboxList)}}function mX(e,n){if(e&1&&le(0,"label",4),e&2){let t,i=F();X((i.options==null?null:i.options.labelHtmlClass)||""),An("display",i.options!=null&&i.options.notitle?"none":""),G("innerHTML",i.options==null?null:i.options.title,Ne),_e("for","control"+((t=i.layoutNode())==null?null:t._id))}}function gX(e,n){if(e&1&&le(0,"input",5),e&2){let t,i,r,s,l=F();X((l.options==null?null:l.options.fieldHtmlClass)||""),G("formControl",l.formControl)("id","control"+((t=l.layoutNode())==null?null:t._id))("name",l.controlName)("readonly",l.options!=null&&l.options.readonly?"readonly":null)("type",(i=l.layoutNode())==null?null:i.type)("attributes",l.inputAttributes)("appStopPropagation",Zt(16,Gr)),_e("aria-describedby","control"+((r=l.layoutNode())==null?null:r._id)+"Status")("list","control"+((s=l.layoutNode())==null?null:s._id)+"Autocomplete")("maxlength",l.options==null?null:l.options.maxLength)("minlength",l.options==null?null:l.options.minLength)("pattern",l.options==null?null:l.options.pattern)("placeholder",l.options==null?null:l.options.placeholder)("required",l.options==null?null:l.options.required)}}function _X(e,n){if(e&1){let t=bt();ee(0,"input",6),Ue("input",function(r){pt(t);let s=F();return ht(s.updateValue(r))}),Y()}if(e&2){let t,i,r,s,l=F();X((l.options==null?null:l.options.fieldHtmlClass)||""),G("disabled",l.controlDisabled)("id","control"+((t=l.layoutNode())==null?null:t._id))("name",l.controlName)("readonly",l.options!=null&&l.options.readonly?"readonly":null)("type",(i=l.layoutNode())==null?null:i.type)("value",l.controlValue)("attributes",l.inputAttributes)("appStopPropagation",Zt(17,Gr)),_e("aria-describedby","control"+((r=l.layoutNode())==null?null:r._id)+"Status")("list","control"+((s=l.layoutNode())==null?null:s._id)+"Autocomplete")("maxlength",l.options==null?null:l.options.maxLength)("minlength",l.options==null?null:l.options.minLength)("pattern",l.options==null?null:l.options.pattern)("placeholder",l.options==null?null:l.options.placeholder)("required",l.options==null?null:l.options.required)}}function yX(e,n){if(e&1&&le(0,"option",7),e&2){let t=n.$implicit;G("value",t)}}function vX(e,n){if(e&1&&(ee(0,"datalist",3),St(1,yX,1,1,"option",7,It),Y()),e&2){let t,i=F();G("id","control"+((t=i.layoutNode())==null?null:t._id)+"Autocomplete"),L(),Dt(i.options==null||i.options.typeahead==null?null:i.options.typeahead.source)}}function bX(e,n){if(e&1&&le(0,"span",1),e&2){let t=F();X((t.options==null?null:t.options.labelHtmlClass)||""),G("innerHTML",t.message,Ne)}}var wX=["inputControl"],CX=["divElt"];function xX(e,n){if(e&1&&le(0,"label",5),e&2){let t,i=F();X((i.options==null?null:i.options.labelHtmlClass)||""),An("display",i.options!=null&&i.options.notitle?"none":""),G("innerHTML",i.options==null?null:i.options.title,Ne),_e("for","control"+((t=i.layoutNode())==null?null:t._id))}}function IX(e,n){if(e&1&&le(0,"input",6,1),e&2){let t,i,r,s=F();X((s.options==null?null:s.options.fieldHtmlClass)||""),G("formControl",s.formControl)("id","control"+((t=s.layoutNode())==null?null:t._id))("name",s.controlName)("readonly",s.options!=null&&s.options.readonly?"readonly":null)("title",s.lastValidNumber)("type",((i=s.layoutNode())==null?null:i.type)==="range"?"range":"number")("attributes",s.inputAttributes)("appStopPropagation",Zt(17,Gr)),_e("aria-describedby","control"+((r=s.layoutNode())==null?null:r._id)+"Status")("max",s.options==null?null:s.options.maximum)("min",s.options==null?null:s.options.minimum)("placeholder",s.options==null?null:s.options.placeholder)("required",s.options==null?null:s.options.required)("readonly",s.options!=null&&s.options.readonly?"readonly":null)("step",(s.options==null?null:s.options.multipleOf)||(s.options==null?null:s.options.step)||"any")}}function SX(e,n){if(e&1){let t=bt();ee(0,"input",7,1),Ue("input",function(r){pt(t);let s=F();return ht(s.updateValue(r))}),Y()}if(e&2){let t,i,r,s=F();X((s.options==null?null:s.options.fieldHtmlClass)||""),G("disabled",s.controlDisabled)("id","control"+((t=s.layoutNode())==null?null:t._id))("name",s.controlName)("readonly",s.options!=null&&s.options.readonly?"readonly":null)("title",s.lastValidNumber)("type",((i=s.layoutNode())==null?null:i.type)==="range"?"range":"number")("value",s.controlValue)("attributes",s.inputAttributes)("appStopPropagation",Zt(18,Gr)),_e("aria-describedby","control"+((r=s.layoutNode())==null?null:r._id)+"Status")("max",s.options==null?null:s.options.maximum)("min",s.options==null?null:s.options.minimum)("placeholder",s.options==null?null:s.options.placeholder)("required",s.options==null?null:s.options.required)("readonly",s.options!=null&&s.options.readonly?"readonly":null)("step",(s.options==null?null:s.options.multipleOf)||(s.options==null?null:s.options.step)||"any")}}function DX(e,n){if(e&1&&le(0,"span",5),e&2){let t=F();G("innerHTML",t.controlValue,Ne)}}var Hc=()=>[];function EX(e,n){if(e&1){let t=bt();ee(0,"input",5),Of("ngModelChange",function(r){pt(t);let s=F(3);return Pf(s.selectedItem,r)||(s.selectedItem=r),ht(r)}),Ue("change",function(){pt(t);let r=F(2).$index,s=F();return ht(s.select(r))}),Y()}if(e&2){let t=F(2).$index,i=F();X((i.options==null?null:i.options.widget_radioClass)||""),G("value",t),Ef("ngModel",i.selectedItem),G("value",t)}}function PX(e,n){if(e&1){let t=bt();ee(0,"a",3),Ue("click",function(){pt(t);let r=F().$index,s=F();return ht(s.select(r))}),te(1,EX,1,5,"input",4),wn(2),Y()}if(e&2){let t=F(),i=t.$implicit,r=t.$index,s=F();X("nav-link"+(s.selectedItem===r?" "+(s.options==null?null:s.options.activeClass)+" "+(s.options==null||s.options.style==null?null:s.options.style.selected):" "+(s.options==null||s.options.style==null?null:s.options.style.unselected))),L(),ne((s.options==null?null:s.options.tabMode)=="oneOfMode"?1:-1),L(),O0(" ",s.setTabTitle(i,r)," ")}}function OX(e,n){if(e&1&&(ee(0,"li",2),te(1,PX,3,4,"a",1),Y()),e&2){let t=n.$implicit,i=n.$index,r=F();X(((r.options==null?null:r.options.itemLabelHtmlClass)||"")+(r.selectedItem===i?" "+((r.options==null?null:r.options.activeClass)||"")+" "+((r.options==null||r.options.style==null?null:r.options.style.selected)||""):" "+(r.options==null||r.options.style==null?null:r.options.style.unselected))),L(),ne(r.showAddTab||t.type!=="$ref"?1:-1)}}function TX(e,n){if(e&1&&le(0,"select-framework-widget",7),e&2){let t,i=F(2),r=i.$implicit,s=i.$index,l=F();X(((l.options==null?null:l.options.fieldHtmlClass)||"")+" "+((l.options==null?null:l.options.activeClass)||"")+" "+((l.options==null||l.options.style==null?null:l.options.style.selected)||"")),G("dataIndex",((t=l.layoutNode())==null?null:t.dataType)==="array"?(l.dataIndex()||Zt(5,Hc)).concat(s):l.dataIndex())("layoutIndex",(l.layoutIndex()||Zt(6,Hc)).concat(s))("layoutNode",r)}}function $X(e,n){if(e&1&&te(0,TX,1,7,"select-framework-widget",6),e&2){let t=F().$index,i=F();ne(i.selectedItem===t?0:-1)}}function RX(e,n){if(e&1&&le(0,"select-framework-widget",7),e&2){let t,i=F(),r=i.$implicit,s=i.$index,l=F();X(((l.options==null?null:l.options.fieldHtmlClass)||"")+" "+((l.options==null?null:l.options.activeClass)||"")+" "+((l.options==null||l.options.style==null?null:l.options.style.selected)||"")),G("dataIndex",((t=l.layoutNode())==null?null:t.dataType)==="array"?(l.dataIndex()||Zt(5,Hc)).concat(s):l.dataIndex())("layoutIndex",(l.layoutIndex()||Zt(6,Hc)).concat(s))("layoutNode",r)}}function NX(e,n){if(e&1&&(ee(0,"div"),te(1,$X,1,1),te(2,RX,1,7,"select-framework-widget",6),Y()),e&2){let t=n.$index,i=F();X(((i.options==null?null:i.options.htmlClass)||"")+(i.selectedItem!=t?" ngf-hidden":"")),L(),ne((i.options==null?null:i.options.tabMode)=="oneOfMode"?1:-1),L(),ne((i.options==null?null:i.options.tabMode)!="oneOfMode"?2:-1)}}function MX(e,n){if(e&1&&le(0,"label",2),e&2){let t,i=F();X((i.options==null?null:i.options.labelHtmlClass)||""),An("display",i.options!=null&&i.options.notitle?"none":""),G("innerHTML",i.options==null?null:i.options.title,Ne),_e("for","control"+((t=i.layoutNode())==null?null:t._id))}}function AX(e,n){if(e&1){let t=bt();ee(0,"label")(1,"input",3),Ue("change",function(r){pt(t);let s=F(2);return ht(s.updateValue(r))}),Y(),le(2,"span",2),Y()}if(e&2){let t,i,r,s=n.$implicit,l=F(2);X(((l.options==null?null:l.options.itemLabelHtmlClass)||"")+(l.controlValue+""==(s==null?null:s.value)+""?" "+((l.options==null?null:l.options.activeClass)||"")+" "+((l.options==null||l.options.style==null?null:l.options.style.selected)||""):" "+((l.options==null||l.options.style==null?null:l.options.style.unselected)||"hb-uix-switch"))),_e("for","control"+((t=l.layoutNode())==null?null:t._id)+"/"+(s==null?null:s.value)),L(),X((l.options==null?null:l.options.fieldHtmlClass)||""),G("checked",(s==null?null:s.value)===l.controlValue)("disabled",l.controlDisabled)("id","control"+((i=l.layoutNode())==null?null:i._id)+"/"+(s==null?null:s.value))("name",l.controlName)("value",s==null?null:s.value),_e("aria-describedby","control"+((r=l.layoutNode())==null?null:r._id)+"Status")("readonly",l.options!=null&&l.options.readonly?"readonly":null)("required",l.options==null?null:l.options.required),L(),G("innerHTML",s==null?null:s.name,Ne)}}function kX(e,n){if(e&1&&(ee(0,"div"),St(1,AX,3,14,"label",1,It),Y()),e&2){let t=F();X((t.options==null?null:t.options.htmlClass)||""),L(),Dt(t.radiosList)}}function FX(e,n){if(e&1){let t=bt();ee(0,"div")(1,"label")(2,"input",3),Ue("change",function(r){pt(t);let s=F(2);return ht(s.updateValue(r))}),Y(),le(3,"span",2),Y()()}if(e&2){let t,i,r,s=n.$implicit,l=F(2);X((l.options==null?null:l.options.htmlClass)||""),L(),X(((l.options==null?null:l.options.itemLabelHtmlClass)||"")+(l.controlValue+""==(s==null?null:s.value)+""?" "+((l.options==null?null:l.options.activeClass)||"")+" "+((l.options==null||l.options.style==null?null:l.options.style.selected)||""):" "+((l.options==null||l.options.style==null?null:l.options.style.unselected)||"hb-uix-switch"))),_e("for","control"+((t=l.layoutNode())==null?null:t._id)+"/"+(s==null?null:s.value)),L(),X((l.options==null?null:l.options.fieldHtmlClass)||""),G("checked",(s==null?null:s.value)===l.controlValue)("disabled",l.controlDisabled)("id","control"+((i=l.layoutNode())==null?null:i._id)+"/"+(s==null?null:s.value))("name",l.controlName)("value",s==null?null:s.value),_e("aria-describedby","control"+((r=l.layoutNode())==null?null:r._id)+"Status")("readonly",l.options!=null&&l.options.readonly?"readonly":null)("required",l.options==null?null:l.options.required),L(),G("innerHTML",s==null?null:s.name,Ne)}}function qX(e,n){if(e&1&&(ee(0,"div"),St(1,FX,4,16,"div",1,It),Y()),e&2){let t=F();L(),Dt(t.radiosList)}}var GT=()=>({}),jX=()=>({touch:1e3,mouse:0});function LX(e,n){if(e&1&&le(0,"select-framework-widget",3),e&2){let t=F(),i=t.$implicit,r=t.$index,s=F();G("dataIndex",s.getSelectFrameworkInputs(i,r).dataIndex)("layoutIndex",s.getSelectFrameworkInputs(i,r).layoutIndex)("layoutNode",s.getSelectFrameworkInputs(i,r).layoutNode)}}function VX(e,n){if(e&1&&(ee(0,"div",2),te(1,LX,1,3,"select-framework-widget",3),Y()),e&2){let t=n.$implicit,i=F();An("align-self",(t.options||Zt(15,GT))["align-self"])("flex-basis",i.getFlexAttribute(t,"flex-basis"))("flex-grow",i.getFlexAttribute(t,"flex-grow"))("flex-shrink",i.getFlexAttribute(t,"flex-shrink"))("order",(t.options||Zt(16,GT)).order),Ze("form-flex-item",i.isFlexItem()),G("cdkDragStartDelay",Zt(17,jX))("cdkDragDisabled",!i.isDraggable(t)),L(),ne(i.showWidget(t)?1:-1)}}function zX(e,n){if(e&1){let t=bt();ee(0,"label",4),Tf(1,"textTemplate"),Ue("click",function(){pt(t);let r=F(2);return ht(r.toggleExpanded())}),Y()}if(e&2){let t=F(2);X((t.options==null?null:t.options.labelHtmlClass)||""),G("innerHTML",$f(1,3,t.options.title,t.titleContext),Ne)}}function BX(e,n){if(e&1&&(ee(0,"div"),te(1,zX,2,6,"label",2),le(2,"root-widget",3),Y()),e&2){let t=F();X((t.options==null?null:t.options.htmlClass)||""),Ze("expandable",(t.options==null?null:t.options.expandable)&&!t.expanded)("expanded",(t.options==null?null:t.options.expandable)&&t.expanded),L(),ne(t.options.notitle?-1:1),L(),An("align-content",t.getFlexAttribute("align-content"))("align-items",t.getFlexAttribute("align-items"))("display",t.expanded?t.getFlexAttribute("display"):"none")("flex-direction",t.getFlexAttribute("flex-direction"))("flex-wrap",t.getFlexAttribute("flex-wrap"))("justify-content",t.getFlexAttribute("justify-content")),Ze("form-flex-column",t.getFlexAttribute("flex-direction")==="column")("form-flex-row",t.getFlexAttribute("flex-direction")==="row"),G("dataIndex",t.dataIndex())("layout",t.layoutNode().items)("layoutIndex",t.layoutIndex())("isFlexItem",t.getFlexAttribute("is-flex"))("isOrderable",t.options==null?null:t.options.orderable)}}function HX(e,n){if(e&1){let t=bt();ee(0,"legend",4),Tf(1,"textTemplate"),Ue("click",function(){pt(t);let r=F(2);return ht(r.toggleExpanded())}),Y()}if(e&2){let t=F(2);X((t.options==null?null:t.options.labelHtmlClass)||""),G("innerHTML",$f(1,3,t.options.title,t.titleContext),Ne)}}function UX(e,n){if(e&1&&le(0,"p",7),e&2){let t=F(3);X((t.options==null?null:t.options.labelHelpBlockClass)||""),G("innerHTML",t.options==null?null:t.options.description,Ne)}}function WX(e,n){if(e&1&&(ee(0,"div"),te(1,UX,1,3,"p",6),Y()),e&2){let t=F(2);L(),ne(t.options!=null&&t.options.description?1:-1)}}function GX(e,n){if(e&1&&le(0,"p",7),e&2){let t=F(3);X((t.options==null?null:t.options.labelHelpBlockClass)||""),G("innerHTML",t.options==null?null:t.options.description,Ne)}}function KX(e,n){if(e&1&&(ee(0,"div"),te(1,GX,1,3,"p",6),Y()),e&2){let t=F(2);L(),ne(t.options!=null&&t.options.description?1:-1)}}function JX(e,n){if(e&1&&(ee(0,"fieldset",5),te(1,HX,2,6,"legend",2),te(2,WX,2,1,"div"),le(3,"root-widget",3),te(4,KX,2,1,"div"),Y()),e&2){let t=F();X((t.options==null?null:t.options.htmlClass)||""),Ze("expandable",(t.options==null?null:t.options.expandable)&&!t.expanded)("expanded",(t.options==null?null:t.options.expandable)&&t.expanded),G("disabled",t.options==null?null:t.options.readonly),L(),ne(t.options.notitle?-1:1),L(),ne((t.options==null?null:t.options.messageLocation)!=="bottom"?2:-1),L(),An("align-content",t.getFlexAttribute("align-content"))("align-items",t.getFlexAttribute("align-items"))("display",t.expanded?t.getFlexAttribute("display"):"none")("flex-direction",t.getFlexAttribute("flex-direction"))("flex-wrap",t.getFlexAttribute("flex-wrap"))("justify-content",t.getFlexAttribute("justify-content")),Ze("form-flex-column",t.getFlexAttribute("flex-direction")==="column")("form-flex-row",t.getFlexAttribute("flex-direction")==="row"),G("dataIndex",t.dataIndex())("layout",t.layoutNode().items)("layoutIndex",t.layoutIndex())("isFlexItem",t.getFlexAttribute("is-flex"))("isOrderable",t.options==null?null:t.options.orderable),L(),ne((t.options==null?null:t.options.messageLocation)==="bottom"?4:-1)}}function ZX(e,n){if(e&1&&le(0,"label",4),e&2){let t,i=F();X((i.options==null?null:i.options.labelHtmlClass)||""),An("display",i.options!=null&&i.options.notitle?"none":""),G("innerHTML",i.options==null?null:i.options.title,Ne),_e("for","control"+((t=i.layoutNode())==null?null:t._id))}}function QX(e,n){if(e&1&&(ee(0,"option",6),le(1,"span",4),Y()),e&2){let t=F().$implicit;G("ngValue",t==null?null:t.value),L(),G("innerHTML",t==null?null:t.name,Ne)}}function YX(e,n){if(e&1&&(ee(0,"option",6),le(1,"span",4),Y()),e&2){let t=n.$implicit;G("ngValue",t==null?null:t.value),L(),G("innerHTML",t==null?null:t.name,Ne)}}function XX(e,n){if(e&1&&(ee(0,"optgroup",7),St(1,YX,2,2,"option",6,It),Y()),e&2){let t=F().$implicit;G("label",t==null?null:t.group),L(),Dt(t.items)}}function eee(e,n){if(e&1&&(te(0,QX,2,2,"option",6),te(1,XX,3,1,"optgroup",7)),e&2){let t=n.$implicit,i=F(2);ne(i.isArray(t==null?null:t.items)?-1:0),L(),ne(i.isArray(t==null?null:t.items)?1:-1)}}function tee(e,n){if(e&1&&(ee(0,"select",5),St(1,eee,2,2,null,null,It),Y()),e&2){let t,i,r=F();X((r.options==null?null:r.options.fieldHtmlClass)||""),G("formControl",r.formControl)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),L(),Dt(r.selectList)}}function nee(e,n){if(e&1&&(ee(0,"option",9),le(1,"span",4),Y()),e&2){let t=F().$implicit,i=F(2);G("selected",(t==null?null:t.value)===i.controlValue)("ngValue",t==null?null:t.value),L(),G("innerHTML",t==null?null:t.name,Ne)}}function iee(e,n){if(e&1&&(ee(0,"option",6),le(1,"span",4),Y()),e&2){let t=n.$implicit,i=F(4);G("ngValue",t==null?null:t.value),_e("selected",(t==null?null:t.value)===i.controlValue),L(),G("innerHTML",t==null?null:t.name,Ne)}}function ree(e,n){if(e&1&&(ee(0,"optgroup",7),St(1,iee,2,3,"option",6,It),Y()),e&2){let t=F().$implicit;G("label",t==null?null:t.group),L(),Dt(t.items)}}function oee(e,n){if(e&1&&(te(0,nee,2,3,"option",9),te(1,ree,3,1,"optgroup",7)),e&2){let t=n.$implicit,i=F(2);ne(i.isArray(t==null?null:t.items)?-1:0),L(),ne(i.isArray(t==null?null:t.items)?1:-1)}}function see(e,n){if(e&1){let t=bt();ee(0,"select",8),Ue("change",function(r){pt(t);let s=F();return ht(s.updateValue(r))}),St(1,oee,2,2,null,null,It),Y()}if(e&2){let t,i,r=F();X((r.options==null?null:r.options.fieldHtmlClass)||""),G("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),L(),Dt(r.selectList)}}function aee(e,n){if(e&1&&(ee(0,"option",9),le(1,"span",4),Y()),e&2){let t=F().$implicit,i=F(2);G("selected",(t==null?null:t.value)===i.controlValue)("ngValue",t==null?null:t.value),L(),G("innerHTML",t==null?null:t.name,Ne)}}function lee(e,n){if(e&1&&(ee(0,"option",6),le(1,"span",4),Y()),e&2){let t=n.$implicit,i=F(4);G("ngValue",t==null?null:t.value),_e("selected",(t==null?null:t.value)===i.controlValue),L(),G("innerHTML",t==null?null:t.name,Ne)}}function uee(e,n){if(e&1&&(ee(0,"optgroup",7),St(1,lee,2,3,"option",6,It),Y()),e&2){let t=F().$implicit;G("label",t==null?null:t.group),L(),Dt(t.items)}}function cee(e,n){if(e&1&&(te(0,aee,2,3,"option",9),te(1,uee,3,1,"optgroup",7)),e&2){let t=n.$implicit,i=F(2);ne(i.isArray(t==null?null:t.items)?-1:0),L(),ne(i.isArray(t==null?null:t.items)?1:-1)}}function dee(e,n){if(e&1){let t=bt();ee(0,"select",10),Of("ngModelChange",function(r){pt(t);let s=F();return Pf(s.controlValue,r)||(s.controlValue=r),ht(r)}),Ue("change",function(r){pt(t);let s=F();return ht(s.updateValue(r))}),St(1,cee,2,2,null,null,It),Y()}if(e&2){let t,i,r=F();X((r.options==null?null:r.options.fieldHtmlClass)||""),G("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("multiple",r.options==null?null:r.options.multiple)("name",r.controlName),Ef("ngModel",r.controlValue),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),L(),Dt(r.selectList)}}function fee(e,n){if(e&1&&le(0,"label",3),e&2){let t,i=F();X((i.options==null?null:i.options.labelHtmlClass)||""),An("display",i.options!=null&&i.options.notitle?"none":""),G("innerHTML",i.options==null?null:i.options.title,Ne),_e("for","control"+((t=i.layoutNode())==null?null:t._id))}}function pee(e,n){if(e&1&&le(0,"textarea",4),e&2){let t,i,r=F();X((r.options==null?null:r.options.fieldHtmlClass)||""),G("formControl",r.formControl)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("maxlength",r.options==null?null:r.options.maxLength)("minlength",r.options==null?null:r.options.minLength)("pattern",r.options==null?null:r.options.pattern)("placeholder",r.options==null?null:r.options.placeholder)("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required)}}function hee(e,n){if(e&1){let t=bt();ee(0,"textarea",5),Ue("input",function(r){pt(t);let s=F();return ht(s.updateValue(r))}),wn(1),Y()}if(e&2){let t,i,r=F();X((r.options==null?null:r.options.fieldHtmlClass)||""),G("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName)("value",r.controlValue),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("maxlength",r.options==null?null:r.options.maxLength)("minlength",r.options==null?null:r.options.minLength)("pattern",r.options==null?null:r.options.pattern)("placeholder",r.options==null?null:r.options.placeholder)("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),L(),go(r.controlValue)}}function mee(e,n){if(e&1){let t=bt();ee(0,"option",5),Ue("click",function(r){pt(t);let s=F(3);return ht(s.onSelectClicked(r))}),Y()}if(e&2){let t=F().$implicit,i=F(2);X(i.frameworkStyles[i.activeFramework].optionClass),Ze("active",(t==null?null:t.value)===i.controlValue)("unchecked-notusing",(t==null?null:t.value)!=i.controlValue),G("value",t==null?null:t.value)}}function gee(e,n){if(e&1&&(te(0,mee,1,7,"option",3),le(1,"span",4)),e&2){let t=n.$implicit,i=F(2);ne(i.isArray(t==null?null:t.items)?-1:0),L(),G("innerHTML",t==null?null:t.name,Ne)}}function _ee(e,n){if(e&1&&(ee(0,"select",2),St(1,gee,2,2,null,null,It),Y()),e&2){let t,i,r=F();X(r.frameworkStyles[r.activeFramework].selectClass),G("multiple",!0)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName)("ngModel",r.selectValue),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),L(),Dt(r.selectList)}}function yee(e,n){if(e&1&&le(0,"option",8),e&2){let t=F().$implicit,i=F(2);X(i.frameworkStyles[i.activeFramework].optionClass),Ze("checked-notusing",(t==null?null:t.value)===i.controlValue)("unchecked-notusing]",(t==null?null:t.value)!=i.controlValue),G("selected",(t==null?null:t.value)===i.controlValue)("value",t==null?null:t.value)}}function vee(e,n){if(e&1&&(te(0,yee,1,8,"option",7),le(1,"span",4)),e&2){let t=n.$implicit,i=F(2);ne(i.isArray(t==null?null:t.items)?-1:0),L(),G("innerHTML",t==null?null:t.name,Ne)}}function bee(e,n){if(e&1){let t=bt();ee(0,"select",6),Ue("change",function(r){pt(t);let s=F();return ht(s.updateValue(r))}),St(1,vee,2,2,null,null,It),Y()}if(e&2){let t,i,r=F();X(r.frameworkStyles[r.activeFramework].selectClass+" select-box"),G("multiple",!0)("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName),_e("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),L(),Dt(r.selectList)}}function wee(e,n){if(e&1&&(ee(0,"div"),wn(1," Debug output: "),ee(2,"pre"),wn(3),Y()()),e&2){let t=F();L(3),go(t.debugOutput)}}i$.default.DEFAULTS.uuid=vg;var Kr=(()=>{class e{constructor(){this.widgets={},this.stylesheets=[],this.scripts=[]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac})}}return e})(),Cee={required:"Darf nicht leer sein",minLength:"Mindestens {{minimumLength}} Zeichen ben\xF6tigt (aktuell: {{currentLength}})",maxLength:"Maximal {{maximumLength}} Zeichen erlaubt (aktuell: {{currentLength}})",pattern:"Entspricht nicht diesem regul\xE4ren Ausdruck: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Muss ein Datum sein, z. B. "2000-12-31"';case"time":return'Muss eine Zeitangabe sein, z. B. "16:20" oder "03:14:15.9265"';case"date-time":return'Muss Datum mit Zeit beinhalten, z. B. "2000-03-14T01:59" oder "2000-03-14T01:59:26.535Z"';case"email":return'Keine g\xFCltige E-Mail-Adresse (z. B. "name@example.com")';case"hostname":return'Kein g\xFCltiger Hostname (z. B. "example.com")';case"ipv4":return'Keine g\xFCltige IPv4-Adresse (z. B. "127.0.0.1")';case"ipv6":return'Keine g\xFCltige IPv6-Adresse (z. B. "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0")';case"url":return'Keine g\xFCltige URL (z. B. "http://www.example.com/page.html")';case"uuid":return'Keine g\xFCltige UUID (z. B. "12345678-9ABC-DEF0-1234-56789ABCDEF0")';case"color":return'Kein g\xFCltiger Farbwert (z. B. "#FFFFFF")';case"json-pointer":return'Kein g\xFCltiger JSON-Pointer (z. B. "/pointer/to/something")';case"relative-json-pointer":return'Kein g\xFCltiger relativer JSON-Pointer (z. B. "2/pointer/to/something")';case"regex":return'Kein g\xFCltiger regul\xE4rer Ausdruck (z. B. "(1-)?\\d{3}-\\d{3}-\\d{4}")';case"duration":return"Muss eine g\xFCltige ISO 8601-Dauer sein (z.\u202FB. 'PT1H30M')";default:return"Muss diesem Format entsprechen: "+e.requiredFormat}},minimum:"Muss mindestens {{minimumValue}} sein",exclusiveMinimum:"Muss gr\xF6\xDFer als {{exclusiveMinimumValue}} sein",maximum:"Darf maximal {{maximumValue}} sein",exclusiveMaximum:"Muss kleiner als {{exclusiveMaximumValue}} sein",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Maximal ${Math.log10(1/e.multipleOfValue)} Dezimalstellen erlaubt`:`Muss ein Vielfaches von ${e.multipleOfValue} sein`},minProperties:"Mindestens {{minimumProperties}} Attribute erforderlich (aktuell: {{currentProperties}})",maxProperties:"Maximal {{maximumProperties}} Attribute erlaubt (aktuell: {{currentProperties}})",minItems:"Mindestens {{minimumItems}} Werte erforderlich (aktuell: {{currentItems}})",maxItems:"Maximal {{maximumItems}} Werte erlaubt (aktuell: {{currentItems}})",uniqueItems:"Alle Werte m\xFCssen eindeutig sein"},xee={required:"This field is required.",minLength:"Must be {{minimumLength}} characters or longer (current length: {{currentLength}})",maxLength:"Must be {{maximumLength}} characters or shorter (current length: {{currentLength}})",pattern:"Must match pattern: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Must be a date, like "2000-12-31"';case"time":return'Must be a time, like "16:20" or "03:14:15.9265"';case"date-time":return'Must be a date-time, like "2000-03-14T01:59" or "2000-03-14T01:59:26.535Z"';case"email":return'Must be an email address, like "name@example.com"';case"hostname":return'Must be a hostname, like "example.com"';case"ipv4":return'Must be an IPv4 address, like "127.0.0.1"';case"ipv6":return'Must be an IPv6 address, like "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Must be a url, like "http://www.example.com/page.html"';case"uuid":return'Must be a uuid, like "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Must be a color, like "#FFFFFF"';case"json-pointer":return'Must be a JSON Pointer, like "/pointer/to/something"';case"relative-json-pointer":return'Must be a relative JSON Pointer, like "2/pointer/to/something"';case"regex":return'Must be a regular expression, like "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Must be a valid ISO 8601 duration (e.g., 'PT1H30M')";default:return"Must be a correctly formatted "+e.requiredFormat}},minimum:"Must be {{minimumValue}} or more",exclusiveMinimum:"Must be more than {{exclusiveMinimumValue}}",maximum:"Must be {{maximumValue}} or less",exclusiveMaximum:"Must be less than {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Must have ${Math.log10(1/e.multipleOfValue)} or fewer decimal places.`:`Must be a multiple of ${e.multipleOfValue}.`},minProperties:"Must have {{minimumProperties}} or more items (current items: {{currentProperties}})",maxProperties:"Must have {{maximumProperties}} or fewer items (current items: {{currentProperties}})",minItems:"Must have {{minimumItems}} or more items (current items: {{currentItems}})",maxItems:"Must have {{maximumItems}} or fewer items (current items: {{currentItems}})",uniqueItems:"All items must be unique"},Iee={required:"Este campo est\xE1 requerido.",minLength:"Debe tener {{minimumLength}} caracteres o m\xE1s longitud (longitud actual: {{currentLength}})",maxLength:"Debe tener {{maximumLength}} caracteres o menos longitud (longitud actual: {{currentLength}})",pattern:"Must match pattern: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Debe tener una fecha, ej "2000-12-31"';case"time":return'Debe tener una hora, ej "16:20" o "03:14:15.9265"';case"date-time":return'Debe tener fecha y hora, ej "2000-03-14T01:59" o "2000-03-14T01:59:26.535Z"';case"email":return'No hay direcci\xF3n de correo electr\xF3nico v\xE1lida, ej "name@example.com"';case"hostname":return'Debe ser un nombre de host v\xE1lido, ej "example.com"';case"ipv4":return'Debe ser una direcci\xF3n de IPv4, ej "127.0.0.1"';case"ipv6":return'Debe ser una direcci\xF3n de IPv6, ej "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Debe ser una URL, ej "http://www.example.com/page.html"';case"uuid":return'Debe ser un UUID, ej "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Debe ser un color, ej "#FFFFFF"';case"json-pointer":return'Debe ser un JSON Pointer, ej "/pointer/to/something"';case"relative-json-pointer":return'Debe ser un JSON Pointer relativo, ej "2/pointer/to/something"';case"regex":return'Debe ser una expresi\xF3n regular, ej "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Debe ser una duraci\xF3n v\xE1lida en formato ISO 8601 (p. ej., 'PT1H30M')";default:return"Debe tener el formato correcto "+e.requiredFormat}},minimum:"Debe ser {{minimumValue}} o m\xE1s",exclusiveMinimum:"Debe ser superior a {{exclusiveMinimumValue}}",maximum:"Debe ser {{maximumValue}} o menos",exclusiveMaximum:"Debe ser menor que {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Se permite un m\xE1ximo de ${Math.log10(1/e.multipleOfValue)} decimales`:`Debe ser m\xFAltiplo de ${e.multipleOfValue}.`},minProperties:"Debe tener {{minimumProperties}} o m\xE1s elementos (elementos actuales: {{currentProperties}})",maxProperties:"Debe tener {{maximumProperties}} o menos elementos (elementos actuales: {{currentProperties}})",minItems:"Debe tener {{minimumItems}} o m\xE1s elementos (elementos actuales: {{currentItems}})",maxItems:"Debe tener {{maximumItems}} o menos elementos (elementos actuales: {{currentItems}})",uniqueItems:"Todos los elementos deben ser \xFAnicos"},See={required:"Est obligatoire.",minLength:"Doit avoir minimum {{minimumLength}} caract\xE8res (actuellement: {{currentLength}})",maxLength:"Doit avoir maximum {{maximumLength}} caract\xE8res (actuellement: {{currentLength}})",pattern:"Doit respecter: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Doit \xEAtre une date, tel que "2000-12-31"';case"time":return'Doit \xEAtre une heure, tel que "16:20" ou "03:14:15.9265"';case"date-time":return'Doit \xEAtre une date et une heure, tel que "2000-03-14T01:59" ou "2000-03-14T01:59:26.535Z"';case"email":return'Doit \xEAtre une adresse e-mail, tel que "name@example.com"';case"hostname":return'Doit \xEAtre un nom de domaine, tel que "example.com"';case"ipv4":return'Doit \xEAtre une adresse IPv4, tel que "127.0.0.1"';case"ipv6":return'Doit \xEAtre une adresse IPv6, tel que "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Doit \xEAtre une URL, tel que "http://www.example.com/page.html"';case"uuid":return'Doit \xEAtre un UUID, tel que "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Doit \xEAtre une couleur, tel que "#FFFFFF"';case"json-pointer":return'Doit \xEAtre un JSON Pointer, tel que "/pointer/to/something"';case"relative-json-pointer":return'Doit \xEAtre un relative JSON Pointer, tel que "2/pointer/to/something"';case"regex":return'Doit \xEAtre une expression r\xE9guli\xE8re, tel que "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Doit \xEAtre une dur\xE9e valide au format ISO 8601 (par ex., 'PT1H30M')";default:return"Doit \xEAtre avoir le format correct: "+e.requiredFormat}},minimum:"Doit \xEAtre sup\xE9rieur \xE0 {{minimumValue}}",exclusiveMinimum:"Doit avoir minimum {{exclusiveMinimumValue}} charact\xE8res",maximum:"Doit \xEAtre inf\xE9rieur \xE0 {{maximumValue}}",exclusiveMaximum:"Doit avoir maximum {{exclusiveMaximumValue}} charact\xE8res",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Doit comporter ${Math.log10(1/e.multipleOfValue)} ou moins de decimales.`:`Doit \xEAtre un multiple de ${e.multipleOfValue}.`},minProperties:"Doit comporter au minimum {{minimumProperties}} \xE9l\xE9ments",maxProperties:"Doit comporter au maximum {{maximumProperties}} \xE9l\xE9ments",minItems:"Doit comporter au minimum {{minimumItems}} \xE9l\xE9ments",maxItems:"Doit comporter au maximum {{minimumItems}} \xE9l\xE9ments",uniqueItems:"Tous les \xE9l\xE9ments doivent \xEAtre uniques"},Dee={required:"Il campo \xE8 obbligatorio",minLength:"Deve inserire almeno {{minimumLength}} caratteri (lunghezza corrente: {{currentLength}})",maxLength:"Il numero massimo di caratteri consentito \xE8 {{maximumLength}} (lunghezza corrente: {{currentLength}})",pattern:"Devi rispettare il pattern : {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Deve essere una data, come "31-12-2000"';case"time":return'Deve essere un orario, come "16:20" o "03:14:15.9265"';case"date-time":return'Deve essere data-orario, come "14-03-2000T01:59" or "14-03-2000T01:59:26.535Z"';case"email":return'Deve essere un indirzzo email, come "name@example.com"';case"hostname":return'Deve essere un hostname, come "example.com"';case"ipv4":return'Deve essere un indirizzo IPv4, come "127.0.0.1"';case"ipv6":return'Deve essere un indirizzo IPv6, come "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Deve essere un url, come "http://www.example.com/page.html"';case"uuid":return'Deve essere un uuid, come "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Deve essere un colore, come "#FFFFFF"';case"json-pointer":return'Deve essere un JSON Pointer, come "/pointer/to/something"';case"relative-json-pointer":return'Deve essere un JSON Pointer relativo, come "2/pointer/to/something"';case"regex":return'Deve essere una regular expression, come "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Deve essere una durata valida nel formato ISO 8601 (es. 'PT1H30M')";default:return"Deve essere formattato correttamente "+e.requiredFormat}},minimum:"Deve essere {{minimumValue}} o pi\xF9",exclusiveMinimum:"Deve essere pi\xF9 di {{exclusiveMinimumValue}}",maximum:"Deve essere {{maximumValue}} o meno",exclusiveMaximum:"Deve essere minore di {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Deve avere ${Math.log10(1/e.multipleOfValue)} o meno decimali.`:`Deve essere multiplo di ${e.multipleOfValue}.`},minProperties:"Deve avere {{minimumProperties}} o pi\xF9 elementi (elementi correnti: {{currentProperties}})",maxProperties:"Deve avere {{maximumProperties}} o meno elementi (elementi correnti: {{currentProperties}})",minItems:"Deve avere {{minimumItems}} o pi\xF9 elementi (elementi correnti: {{currentItems}})",maxItems:"Deve avere {{maximumItems}} o meno elementi (elementi correnti: {{currentItems}})",uniqueItems:"Tutti gli elementi devono essere unici"},Eee={required:"Este campo \xE9 obrigat\xF3rio.",minLength:"\xC9 preciso no m\xEDnimo {{minimumLength}} caracteres ou mais (tamanho atual: {{currentLength}})",maxLength:"\xC9 preciso no m\xE1ximo {{maximumLength}} caracteres ou menos (tamanho atual: {{currentLength}})",pattern:"Tem que ajustar ao formato: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Tem que ser uma data, por exemplo "2000-12-31"';case"time":return'Tem que ser hor\xE1rio, por exemplo "16:20" ou "03:14:15.9265"';case"date-time":return'Tem que ser data e hora, por exemplo "2000-03-14T01:59" ou "2000-03-14T01:59:26.535Z"';case"email":return'Tem que ser um email, por exemplo "fulano@exemplo.com.br"';case"hostname":return'Tem que ser uma nome de dom\xEDnio, por exemplo "exemplo.com.br"';case"ipv4":return'Tem que ser um endere\xE7o IPv4, por exemplo "127.0.0.1"';case"ipv6":return'Tem que ser um endere\xE7o IPv6, por exemplo "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Tem que ser uma URL, por exemplo "http://www.exemplo.com.br/pagina.html"';case"uuid":return'Tem que ser um uuid, por exemplo "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Tem que ser uma cor, por exemplo "#FFFFFF"';case"json-pointer":return'Tem que ser um JSON Pointer, por exemplo "/referencia/para/algo"';case"relative-json-pointer":return'Tem que ser um JSON Pointer relativo, por exemplo "2/referencia/para/algo"';case"regex":return'Tem que ser uma express\xE3o regular, por exemplo "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Deve ser uma dura\xE7\xE3o v\xE1lida no formato ISO 8601 (ex.: 'PT1H30M')";default:return"Tem que ser no formato: "+e.requiredFormat}},minimum:"Tem que ser {{minimumValue}} ou mais",exclusiveMinimum:"Tem que ser mais que {{exclusiveMinimumValue}}",maximum:"Tem que ser {{maximumValue}} ou menos",exclusiveMaximum:"Tem que ser menor que {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Tem que ter ${Math.log10(1/e.multipleOfValue)} ou menos casas decimais.`:`Tem que ser um m\xFAltiplo de ${e.multipleOfValue}.`},minProperties:"Deve ter {{minimumProperties}} ou mais itens (itens at\xE9 o momento: {{currentProperties}})",maxProperties:"Deve ter {{maximumProperties}} ou menos intens (itens at\xE9 o momento: {{currentProperties}})",minItems:"Deve ter {{minimumItems}} ou mais itens (itens at\xE9 o momento: {{currentItems}})",maxItems:"Deve ter {{maximumItems}} ou menos itens (itens at\xE9 o momento: {{currentItems}})",uniqueItems:"Todos os itens devem ser \xFAnicos"},Pee={required:"\u5FC5\u586B\u5B57\u6BB5.",minLength:"\u5B57\u7B26\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u6216\u8005\u7B49\u4E8E {{minimumLength}} (\u5F53\u524D\u957F\u5EA6: {{currentLength}})",maxLength:"\u5B57\u7B26\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u6216\u8005\u7B49\u4E8E {{maximumLength}} (\u5F53\u524D\u957F\u5EA6: {{currentLength}})",pattern:"\u5FC5\u987B\u5339\u914D\u6B63\u5219\u8868\u8FBE\u5F0F: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'\u5FC5\u987B\u4E3A\u65E5\u671F\u683C\u5F0F, \u6BD4\u5982 "2000-12-31"';case"time":return'\u5FC5\u987B\u4E3A\u65F6\u95F4\u683C\u5F0F, \u6BD4\u5982 "16:20" \u6216\u8005 "03:14:15.9265"';case"date-time":return'\u5FC5\u987B\u4E3A\u65E5\u671F\u65F6\u95F4\u683C\u5F0F, \u6BD4\u5982 "2000-03-14T01:59" \u6216\u8005 "2000-03-14T01:59:26.535Z"';case"email":return'\u5FC5\u987B\u4E3A\u90AE\u7BB1\u5730\u5740, \u6BD4\u5982 "name@example.com"';case"hostname":return'\u5FC5\u987B\u4E3A\u4E3B\u673A\u540D, \u6BD4\u5982 "example.com"';case"ipv4":return'\u5FC5\u987B\u4E3A IPv4 \u5730\u5740, \u6BD4\u5982 "127.0.0.1"';case"ipv6":return'\u5FC5\u987B\u4E3A IPv6 \u5730\u5740, \u6BD4\u5982 "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'\u5FC5\u987B\u4E3A url, \u6BD4\u5982 "http://www.example.com/page.html"';case"uuid":return'\u5FC5\u987B\u4E3A uuid, \u6BD4\u5982 "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'\u5FC5\u987B\u4E3A\u989C\u8272\u503C, \u6BD4\u5982 "#FFFFFF"';case"json-pointer":return'\u5FC5\u987B\u4E3A JSON Pointer, \u6BD4\u5982 "/pointer/to/something"';case"relative-json-pointer":return'\u5FC5\u987B\u4E3A\u76F8\u5BF9\u7684 JSON Pointer, \u6BD4\u5982 "2/pointer/to/something"';case"regex":return'\u5FC5\u987B\u4E3A\u6B63\u5219\u8868\u8FBE\u5F0F, \u6BD4\u5982 "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"\u5FC5\u987B\u662F\u6709\u6548\u7684 ISO 8601 \u6301\u7EED\u65F6\u95F4\uFF08\u4F8B\u5982\uFF1A'PT1H30M'\uFF09";default:return"\u5FC5\u987B\u4E3A\u683C\u5F0F\u6B63\u786E\u7684 "+e.requiredFormat}},minimum:"\u5FC5\u987B\u5927\u4E8E\u6216\u8005\u7B49\u4E8E\u6700\u5C0F\u503C: {{minimumValue}}",exclusiveMinimum:"\u5FC5\u987B\u5927\u4E8E\u6700\u5C0F\u503C: {{exclusiveMinimumValue}}",maximum:"\u5FC5\u987B\u5C0F\u4E8E\u6216\u8005\u7B49\u4E8E\u6700\u5927\u503C: {{maximumValue}}",exclusiveMaximum:"\u5FC5\u987B\u5C0F\u4E8E\u6700\u5927\u503C: {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`\u5FC5\u987B\u6709 ${Math.log10(1/e.multipleOfValue)} \u4F4D\u6216\u66F4\u5C11\u7684\u5C0F\u6570\u4F4D`:`\u5FC5\u987B\u4E3A ${e.multipleOfValue} \u7684\u500D\u6570`},minProperties:"\u9879\u76EE\u6570\u5FC5\u987B\u5927\u4E8E\u6216\u8005\u7B49\u4E8E {{minimumProperties}} (\u5F53\u524D\u9879\u76EE\u6570: {{currentProperties}})",maxProperties:"\u9879\u76EE\u6570\u5FC5\u987B\u5C0F\u4E8E\u6216\u8005\u7B49\u4E8E {{maximumProperties}} (\u5F53\u524D\u9879\u76EE\u6570: {{currentProperties}})",minItems:"\u9879\u76EE\u6570\u5FC5\u987B\u5927\u4E8E\u6216\u8005\u7B49\u4E8E {{minimumItems}} (\u5F53\u524D\u9879\u76EE\u6570: {{currentItems}})",maxItems:"\u9879\u76EE\u6570\u5FC5\u987B\u5C0F\u4E8E\u6216\u8005\u7B49\u4E8E {{maximumItems}} (\u5F53\u524D\u9879\u76EE\u6570: {{currentItems}})",uniqueItems:"\u6240\u6709\u9879\u76EE\u5FC5\u987B\u662F\u552F\u4E00\u7684"};function el(e,n,t=!1){return n.map(i=>i(e,t))}function Oee(e,n,t=!1){return n.map(i=>i(e,t))}function Fi(...e){let n={};for(let t of e)if(B(t))for(let i of Object.keys(t)){let r=t[i],s=n[i];n[i]=ze(s)?i==="not"&&si(s,"strict")&&si(r,"strict")?at(s,r):is(s)==="object"&&is(r)==="object"?Fi(s,r):r:r}return n}function bg(e){let n=Fi(...e);return ye(n)?null:n}function ze(e){return e!=null}function de(e){return e!=null&&e!==""}function ye(e){return R(e)?!e.length:B(e)?!Object.keys(e).length:e==null||e===""}function Ye(e){return typeof e=="string"}function ct(e,n=!1){return n&&typeof e!="number"?!1:!isNaN(e)&&e!==e/0}function Uc(e,n=!1){return n&&typeof e!="number"?!1:!isNaN(e)&&e!==e/0&&e%1===0}function si(e,n=null){return n==="strict"?e===!0||e===!1:n===!0?e===!0||e===1||e==="true"||e==="1":n===!1?e===!1||e===0||e==="false"||e==="0":e===!0||e===1||e==="true"||e==="1"||e===!1||e===0||e==="false"||e==="0"}function B(e){return e!==null&&typeof e=="object"}function R(e){return Array.isArray(e)}function rs(e){return!!e&&Object.prototype.toString.call(e)==="[object Date]"}function zn(e){return!!e&&Object.prototype.toString.call(e)==="[object Map]"}function ns(e){return!!e&&Object.prototype.toString.call(e)==="[object Set]"}function is(e,n=!1){return ze(e)?R(e)?"array":B(e)?"object":si(e,"strict")?"boolean":Uc(e,n)?"integer":ct(e,n)?"number":Ye(e)||!n&&rs(e)?"string":null:"null"}function KT(e,n){switch(n){case"string":return Ye(e)||rs(e);case"number":return ct(e);case"integer":return Uc(e);case"boolean":return si(e);case"null":return!de(e);default:return console.error(`isType error: "${n}" is not a recognized type.`),null}}function Tee(e){return Ye(e)||ct(e)||si(e,"strict")||e===null}var $ee=e=>{let n=e.getDate(),t=e.getMonth()+1;return`${e.getFullYear()}-${t<10?"0"+t:t}-${n<10?"0"+n:n}`};function hr(e,n,t=!0){if(!ze(e))return null;if(Ye(n)&&(n=[n]),t&>("integer",n)){if(Uc(e,"strict"))return e;if(Uc(e))return parseInt(e,10)}if(gt("number",n)||!t&>("integer",n)){if(ct(e,"strict"))return e;if(ct(e))return parseFloat(e)}if(gt("string",n)){if(Ye(e))return e;if(rs(e))return $ee(e);if(ct(e))return e.toString()}if(rs(e)&&(gt("integer",n)||gt("number",n)))return e.getTime();if(gt("boolean",n)){if(si(e,!0))return!0;if(si(e,!1))return!1}return null}function Ree(e,n){if(R(n)||(n=[n]),n.includes("null")&&!de(e))return null;if(n.includes("boolean")&&!si(e,"strict"))return e;if(n.includes("integer")){let t=hr(e,"integer");if(t!==null)return+t}if(n.includes("number")){let t=hr(e,"number");if(t!==null)return+t}if((Ye(e)||ct(e,"strict"))&&n.includes("string"))return hr(e,"string");if(n.includes("boolean")&&si(e))return hr(e,"boolean");if(n.includes("string")){if(e===null)return"";let t=hr(e,"string");if(t!==null)return t}if(n.includes("number")||n.includes("integer")){if(e===!0)return 1;if(e===!1||e===null||e==="")return 0}if(n.includes("number")){let t=parseFloat(e);if(t)return t}if(n.includes("integer")){let t=parseInt(e,10);if(t)return t}if(n.includes("boolean"))return!!e;if((n.includes("number")||n.includes("integer"))&&!n.includes("null"))return 0}function Nee(e){return!!e&&typeof e.then=="function"}function Mee(e){return!!e&&typeof e.subscribe=="function"}function Aee(e){let n=Nee(e)?p0(e):e;return Mee(n)?n:(console.error("toObservable error: Expected validator to return Promise or Observable."),new Er)}function gt(e,n,t=!1){return!ze(e)||!R(n)?!1:R(e)?e[t?"every":"some"](i=>n.includes(i)):n.includes(e)}function at(e,n){return!!e&&!n||!e&&!!n}function Li(e,n){let t=l=>!ns(l)&&!R(l)&&!Ye(l);if(t(n))return e;t(e)&&(e="");let i=l=>ns(l)?l:R(l)?new Set(l):new Set(l.split(" ")),r=i(e);return i(n).forEach(l=>r.add(l)),ns(e)?r:R(e)?Array.from(r):Array.from(r).join(" ")}function Vc(e,n=!1){return typeof e!="object"||e===null?e:zn(e)?new Map(e):ns(e)?new Set(e):R(e)?[...e]:B(e)?re({},e):(n&&console.error("copy error: Object to copy must be a JavaScript object or value."),e)}function pn(e,n,t=!1,i=e,r=!1){if(!ye(e)){if((B(e)||R(e))&&typeof n=="function")for(let s of Object.keys(e)){let l=e[s];t==="bottom-up"&&(B(l)||R(l))&&pn(l,n,t,i),n(l,s,e,i),t==="top-down"&&(B(l)||R(l))&&pn(l,n,t,i)}r&&(typeof n!="function"&&(console.error("forEach error: Iterator must be a function."),console.error("function",n)),!B(e)&&!R(e)&&(console.error("forEach error: Input object must be an object or array."),console.error("object",e)))}}function wg(e,n,t=!1){if(de(e)){if((B(e)||R(e))&&typeof e!="function"){let i=R(e)?[]:{};for(let r of Object.keys(e))i[r]=n(e[r],r,e);return i}t&&(typeof n!="function"&&(console.error("forEachCopy error: Iterator must be a function."),console.error("function",n)),!B(e)&&!R(e)&&(console.error("forEachCopy error: Input object must be an object or array."),console.error("object",e)))}}function E(e,n){if(!e||!["number","string","symbol"].includes(typeof n)||!B(e)&&!R(e)&&!zn(e)&&!ns(e))return!1;if(zn(e)||ns(e))return e.has(n);if(typeof n=="number"){if(R(e))return e[n];n=n+""}return e.hasOwnProperty(n)}var Ur=(function(e){return e[e.EQUALS=0]="EQUALS",e[e.NOT_EQUALS=1]="NOT_EQUALS",e[e.NOT_AN_EXPRESSION=2]="NOT_AN_EXPRESSION",e})(Ur||{});function kee(e){return e.indexOf("==")!==-1?Ur.EQUALS:e.toString().indexOf("!=")!==-1?Ur.NOT_EQUALS:Ur.NOT_AN_EXPRESSION}function Ig(e){return e===Ur.EQUALS}function Sg(e){return e===Ur.NOT_EQUALS}function Fee(e){return e===Ur.NOT_AN_EXPRESSION}function qee(e,n){return Ig(e)?n.split("==",2):Sg(e)?n.split("!=",2):null}function jee(e){return e.charAt(0)==="'"&&e.charAt(e.length-1)==="'"?e.replace("'","").replace("'",""):e}function JT(e,n,t=[],i=s=>s,r=s=>s){if(!B(n))return e;B(e)||(e={});for(let s of Object.keys(n))!gt(s,t)&&ze(n[s])&&(e[i(s)]=r(n[s]));return e}function jc(...e){let n=[];for(let t of e)n.includes(t)||n.push(t);return n}function Lee(...e){let n=null;for(let t of e)if(Ye(t)&&(t=[t]),n=n===null?[...t]:n.filter(i=>t.includes(i)),!n.length)return[];return n}function ji(e){return e&&r$(e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," "))}function r$(e,n){if(!Ye(e))return e;let t=["a","an","and","as","at","but","by","en","for","if","in","nor","of","on","or","per","the","to","v","v.","vs","vs.","via"];Ye(n)&&(n=n.split("|")),R(n)&&(t=t.concat(n));let i=t.map(l=>l.toLowerCase()),r=e===e.toUpperCase()||e===e.toLowerCase(),s="";return e=e.trim(),e.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,(l,u)=>{if(!r&&l.slice(1).search(/[A-Z]|\../)!==-1)return l;{let d,p=t[i.indexOf(l.toLowerCase())];return p?p===p.toLowerCase()&&(u===0||u+l.length===e.length||s===":"||e[u-1].search(/[^\s-]/)!==-1||e[u-1]!=="-"&&e[u+l.length]==="-")?d=p[0].toUpperCase()+p.slice(1):d=p:r?l.slice(1).search(/\../)!==-1?d=l.toLowerCase():d=l[0].toUpperCase()+l.slice(1).toLowerCase():d=l[0].toUpperCase()+l.slice(1),s=l.slice(-1),d}})}function o$(e){return e===null||typeof e!="object"?!1:(0,Ut.some)(e,n=>B(n)?o$(n):!(0,Ut.isNil)(n))}function Dg(e,n,t=""){if(R(e)&&R(n)){if(e.length!=n.length)return console.log(`size mismatch at ${t}`),!1;for(let i=0;i<e.length;i++){let r=e[i],s=n[i];if(Dg(r,s,`${t}/${i}`)===!1)return!1}}if(B(e)&&!R(e)){for(let i in e)if(n.hasOwnProperty(i)&&Dg(e[i],n[i],`${t}/${i}`)===!1)return!1}return!0}var k=(()=>{class e{static get(t,i,r=0,s=null,l=!1,u=!1){if(t===null)return l?!1:void 0;let d=this.parse(i,u);if(typeof t=="object"&&d!==null){let p=t;if(r>=d.length||s<=-d.length)return t;r<=-d.length&&(r=0),(!ze(s)||s>=d.length)&&(s=d.length),d=d.slice(r,s);for(let m of d)if(m==="-"&&R(p)&&p.length&&(m=p.length-1),zn(p)&&p.has(m))p=p.get(m);else if(typeof p=="object"&&p!==null&&E(p,m))p=p[m];else{let g=e.evaluateExpression(p,m);if(g.passed)p=g.key?p[g.key]:p;else return this.logErrors(u,m,i,t),l?!1:void 0}return l?!0:p}return u&&d===null&&console.error(`get error: Invalid JSON Pointer: ${i}`),u&&typeof t!="object"&&(console.error("get error: Invalid object:"),console.error(t)),l?!1:void 0}static logErrors(t,i,r,s){t&&(console.error(`get error: "${i}" key not found in object.`),console.error(r),console.error(s))}static evaluateExpression(t,i){let r={passed:!1,key:i},s=this.parseKeysAndExpression(i,t);if(!s)return r;let l=this.doOwnCheckResult(t,s);if(l)return l;let u=jee(s.keyAndValue[1]),d=this.performExpressionOnValue(s,u,t);return d||r}static performExpressionOnValue(t,i,r){let s=r[t.keyAndValue[0]];return this.doComparisonByExpressionType(t.expressionType,s,i)?{passed:!0,key:t.keyAndValue[0]}:null}static doComparisonByExpressionType(t,i,r){return Ig(t)?i===r:Sg(t)?i!==r:!1}static doOwnCheckResult(t,i){let r=null;return E(t,i.keyAndValue[0])||(Ig(i.expressionType)&&(r={passed:!1,key:null}),Sg(i.expressionType)&&(r={passed:!0,key:null})),r}static parseKeysAndExpression(t,i){if(this.keyOrSubObjEmpty(t,i))return null;let r=kee(t.toString());if(Fee(r))return null;let s=qee(r,t);return!s||!s[0]||!s[1]?null:{expressionType:r,keyAndValue:s}}static keyOrSubObjEmpty(t,i){return!t||!i}static getCopy(t,i,r=0,s=null,l=!1,u=!1){let d=this.get(t,i,r,s,l,u);return this.forEachDeepCopy(d)}static getFirst(t,i=null,r=!1){if(!ye(t)){if(R(t)){for(let s of t)if(!ye(s)){if(R(s)&&s.length>=2){if(ye(s[0])||ye(s[1]))continue;let l=r?this.getCopy(s[0],s[1]):this.get(s[0],s[1]);if(l)return l;continue}console.error(`getFirst error: Input not in correct format.
|
|
86
86
|
Should be: [ [ object1, pointer1 ], [ object 2, pointer2 ], etc... ]`);return}return i}if(zn(t)){for(let[s,l]of t){if(s===null||!this.isJsonPointer(l))continue;let u=r?this.getCopy(s,l):this.get(s,l);if(u)return u}return i}return console.error(`getFirst error: Input not in correct format.
|
|
87
87
|
Should be: [ [ object1, pointer1 ], [ object 2, pointer2 ], etc... ]`),i}}static getFirstCopy(t,i=null){return this.getFirst(t,i,!0)}static set(t,i,r,s=!1){let l=this.parse(i);if(l!==null&&l.length){let u=t;for(let p=0;p<l.length-1;++p){let m=l[p];m==="-"&&R(u)&&(m=u.length),zn(u)&&u.has(m)?u=u.get(m):(E(u,m)||(u[m]=l[p+1].match(/^(\d+|-)$/)?[]:{}),u=u[m])}let d=l[l.length-1];return R(u)&&d==="-"?u.push(r):s&&R(u)&&!isNaN(+d)?u.splice(d,0,r):zn(u)?u.set(d,r):u[d]=r,t}return console.error(`set error: Invalid JSON Pointer: ${i}`),t}static setCopy(t,i,r,s=!1){let l=this.parse(i);if(l!==null){let u=Vc(t),d=u;for(let m=0;m<l.length-1;++m){let g=l[m];g==="-"&&R(d)&&(g=d.length),zn(d)&&d.has(g)?(d.set(g,Vc(d.get(g))),d=d.get(g)):(E(d,g)||(d[g]=l[m+1].match(/^(\d+|-)$/)?[]:{}),d[g]=Vc(d[g]),d=d[g])}let p=l[l.length-1];return R(d)&&p==="-"?d.push(r):s&&R(d)&&!isNaN(+p)?d.splice(p,0,r):zn(d)?d.set(p,r):d[p]=r,u}return console.error(`setCopy error: Invalid JSON Pointer: ${i}`),t}static insert(t,i,r){return this.set(t,i,r,!0)}static insertCopy(t,i,r){return this.setCopy(t,i,r,!0)}static remove(t,i){let r=this.parse(i);if(r!==null&&r.length){let s=r.pop(),l=this.get(t,r);return R(l)?(s==="-"&&(s=l.length-1),l.splice(s,1)):B(l)&&delete l[s],t}return console.error(`remove error: Invalid JSON Pointer: ${i}`),t}static has(t,i){return this.get(t,i,0,null,!0)}static dict(t){let i={};return this.forEachDeep(t,(r,s)=>{typeof r!="object"&&(i[s]=r)}),i}static forEachDeep(t,i=u=>u,r=!1,s="",l=t){if(typeof i!="function"){console.error("forEachDeep error: Iterator is not a function:",i);return}if(r||i(t,s,l),B(t)||R(t))for(let u of Object.keys(t)){let d=s+"/"+this.escape(u);this.forEachDeep(t[u],i,r,d,l)}r&&i(t,s,l)}static forEachDeepCopy(t,i=u=>u,r=!1,s="",l=t){if(typeof i!="function")return console.error("forEachDeepCopy error: Iterator is not a function:",i),null;if(B(t)||R(t)){let u=R(t)?[...t]:re({},t);r||(u=i(u,s,l));for(let d of Object.keys(u)){let p=s+"/"+this.escape(d);u[d]=this.forEachDeepCopy(u[d],i,r,p,l)}return r&&(u=i(u,s,l)),u}else return i(t,s,l)}static escape(t){return t.toString().replace(/~/g,"~0").replace(/\//g,"~1")}static unescape(t){return t.toString().replace(/~1/g,"/").replace(/~0/g,"~")}static parse(t,i=!1){if(!this.isJsonPointer(t))return i&&console.error(`parse error: Invalid JSON Pointer: ${t}`),null;if(R(t))return t;if(typeof t=="string")return t[0]==="#"&&(t=t.slice(1)),t===""||t==="/"?[]:t.slice(1).split("/").map(this.unescape)}static compile(t,i="",r=!1){if(t==="#")return"";if(!this.isJsonPointer(t))return r&&console.error(`compile error: Invalid JSON Pointer: ${t}`),null;if(R(t))return t.length===0?"":"/"+t.map(s=>s===""?i:this.escape(s)).join("/");if(typeof t=="string")return t[0]==="#"&&(t=t.slice(1)),t}static toKey(t,i=!1){let r=this.parse(t,i);return r===null?null:r.length?r[r.length-1]:""}static isJsonPointer(t){if(R(t))return t.every(i=>typeof i=="string");if(Ye(t)){if(t===""||t==="#")return!0;if(t[0]==="/"||t.slice(0,2)==="#/")return!/(~[^01]|~$)/g.test(t)}return!1}static isSubPointer(t,i,r=!1,s=!1){if(!this.isJsonPointer(t)||!this.isJsonPointer(i)){if(s){let l="";this.isJsonPointer(t)||(l+=` 1: ${t}`),this.isJsonPointer(i)||(l+=` 2: ${i}`),console.error(`isSubPointer error: Invalid JSON Pointer ${l}`)}return}return t=this.compile(t,"",s),i=this.compile(i,"",s),t===i?r:`${t}/`===i.slice(0,t.length+1)}static toIndexedPointer(t,i,r=null){if(this.isJsonPointer(t)&&R(i)){let s=this.compile(t);if(zn(r)){let l=0;return s.replace(/\/\-(?=\/|$)/g,(u,d)=>r.has(s.slice(0,d))?"/"+i[l++]:u)}else{for(let l of i)s=s.replace("/-","/"+l);return s}}this.isJsonPointer(t)||console.error(`toIndexedPointer error: Invalid JSON Pointer: ${t}`),R(i)||console.error(`toIndexedPointer error: Invalid indexArray: ${i}`)}static toGenericPointer(t,i=new Map){if(this.isJsonPointer(t)&&zn(i)){let r=this.parse(t);for(let s=1;s<r.length;s++){let l=this.compile(r.slice(0,s));i.has(l)&&i.get(l)<=+r[s]&&(r[s]="-")}return this.compile(r)}this.isJsonPointer(t)||console.error(`toGenericPointer error: invalid JSON Pointer: ${t}`),zn(i)||console.error(`toGenericPointer error: invalid arrayMap: ${i}`)}static toControlPointer(t,i,r=!1){let s=this.parse(t),l=[],u=i;if(s!==null){for(let d of s)if(E(u,"controls")&&(l.push("controls"),u=u.controls),R(u)&&d==="-")l.push((u.length-1).toString()),u=u[u.length-1];else if(E(u,d))l.push(d),u=u[d];else if(r){console.error(`toControlPointer error: Unable to find "${d}" item in FormGroup.`),console.error(t),console.error(i);return}else l.push(d),u={controls:{}};return this.compile(l)}console.error(`toControlPointer error: Invalid JSON Pointer: ${t}`)}static toSchemaPointer(t,i){if(this.isJsonPointer(t)&&typeof i=="object"){let r=this.parse(t);if(!r.length)return"";let s=r.shift();if(i.type==="object"||i.properties||i.additionalProperties){if((i.properties||{})[s])return`/properties/${this.escape(s)}`+this.toSchemaPointer(r,i.properties[s]);if(i.additionalProperties)return"/additionalProperties"+this.toSchemaPointer(r,i.additionalProperties)}if((i.type==="array"||i.items)&&(ct(s)||s==="-"||s==="")){let l=s==="-"||s===""?0:+s;if(R(i.items)){if(l<i.items.length)return"/items/"+l+this.toSchemaPointer(r,i.items[l]);if(i.additionalItems)return"/additionalItems"+this.toSchemaPointer(r,i.additionalItems)}else{if(B(i.items))return"/items"+this.toSchemaPointer(r,i.items);if(B(i.additionalItems))return"/additionalItems"+this.toSchemaPointer(r,i.additionalItems)}}return console.error(`toSchemaPointer error: Data pointer ${t} not compatible with schema ${i}`),null}return this.isJsonPointer(t)||console.error(`toSchemaPointer error: Invalid JSON Pointer: ${t}`),typeof i!="object"&&console.error(`toSchemaPointer error: Invalid JSON Schema: ${i}`),null}static toDataPointer(t,i,r=!1){if(this.isJsonPointer(t)&&typeof i=="object"&&this.has(i,t)){let s=this.parse(t);if(!s.length)return"";let l=s.shift();if(l==="properties"||l==="items"&&R(i.items)){let u=s.shift(),d=this.toDataPointer(s,i[l][u]);return d===null?null:"/"+u+d}else if(l==="additionalItems"||l==="items"&&B(i.items)){let u=this.toDataPointer(s,i[l]);return u===null?null:"/-"+u}else if(["allOf","anyOf","oneOf"].includes(l)){let u=s.shift();return this.toDataPointer(s,i[l][u])}else{if(l==="not")return this.toDataPointer(s,i[l]);["contains","definitions","dependencies","additionalItems","additionalProperties","patternProperties","propertyNames"].includes(l)&&r&&console.error("toDataPointer error: Ambiguous location")}return""}return r&&(this.isJsonPointer(t)||console.error(`toDataPointer error: Invalid JSON Pointer: ${t}`),typeof i!="object"&&console.error(`toDataPointer error: Invalid JSON Schema: ${i}`),typeof i!="object"&&console.error(`toDataPointer error: Pointer ${t} invalid for Schema: ${i}`)),null}static parseObjectPath(t){if(R(t))return t;if(this.isJsonPointer(t))return this.parse(t);if(typeof t=="string"){let i=0,r=[];for(;i<t.length;){let s=t.indexOf(".",i),l=t.indexOf("[",i);if(s===-1&&l===-1)r.push(t.slice(i)),i=t.length;else if(s!==-1&&(s<l||l===-1))r.push(t.slice(i,s)),i=s+1;else{l>i&&(r.push(t.slice(i,l)),i=l);let u=t.charAt(l+1);if(u==='"'||u==="'"){let d=t.indexOf(u+"]",l);for(;d!==-1&&t.charAt(d-1)==="\\";)d=t.indexOf(u+"]",d+2);d===-1&&(d=t.length),r.push(t.slice(i+2,d).replace(new RegExp("\\"+u,"g"),u)),i=d+2}else{let d=t.indexOf("]",l);d===-1&&(d=t.length),r.push(t.slice(i+1,d)),i=d+1}t.charAt(i)==="."&&i++}}return r}console.error("parseObjectPath error: Input object path must be a string.")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac})}}return e})(),Vee={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d(?::[0-5]\d)?(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"iso-date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d(?::[0-5]\d)?(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,color:/^\s*(#(?:[\da-f]{3}){1,2}|rgb\((?:\d{1,3},\s*){2}\d{1,3}\)|rgba\((?:\d{1,3},\s*){3}\d*\.?\d+\)|hsl\(\d{1,3}(?:,\s*\d{1,3}%){2}\)|hsla\(\d{1,3}(?:,\s*\d{1,3}%){2},\s*\d*\.?\d+\))\s*$/gi,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,duration:/^P(?!$)(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$/,regex:function(e){if(/[^\\]\\Z/.test(e))return!1;try{return!0}catch{return!1}}},nl=class e{static required(n){switch(n===void 0&&(n=!0),n){case!0:return(t,i=!1)=>i||de(t.value)?null:{required:!0};case!1:return e.nullValidator;default:return de(n.value)?null:{required:!0}}}static type(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value,s=R(n)?n.some(l=>KT(r,l)):KT(r,n);return at(s,i)?null:{type:{requiredType:n,currentValue:r}}}:e.nullValidator}static enum(n){return R(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value,s=(u,d)=>u===d||ct(u)&&+d==+u||si(u,"strict")&&hr(d,"boolean")===u||u===null&&!de(d)||(0,fn.default)(u,d),l=R(r)?r.every(u=>n.some(d=>s(d,u))):n.some(u=>s(u,r));return at(l,i)?null:{enum:{allowedValues:n,currentValue:r}}}:e.nullValidator}static const(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value,l=((u,d)=>u===d||ct(u)&&+d==+u||si(u,"strict")&&hr(d,"boolean")===u||u===null&&!de(d))(n,r);return at(l,i)?null:{const:{requiredValue:n,currentValue:r}}}:e.nullValidator}static minLength(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=Ye(t.value)?t.value.length:0,s=r>=n;return at(s,i)?null:{minLength:{minimumLength:n,currentLength:r}}}:e.nullValidator}static maxLength(n){return de(n)?(t,i=!1)=>{let r=Ye(t.value)?t.value.length:0,s=r<=n;return at(s,i)?null:{maxLength:{maximumLength:n,currentLength:r}}}:e.nullValidator}static pattern(n,t=!1){return de(n)?(i,r=!1)=>{if(ye(i.value))return null;let s,l;typeof n=="string"?(l=t?`^${n}$`:n,s=new RegExp(l)):(l=n.toString(),s=n);let u=i.value,d=Ye(u)?s.test(u):!1;return at(d,r)?null:{pattern:{requiredPattern:l,currentValue:u}}}:e.nullValidator}static format(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r,s=t.value;if(Ye(s)){let l=Vee[n];typeof l=="object"?r=new RegExp(l.source,l.flags).test(s):typeof l=="function"?r=l(s):(console.error(`format validator error: "${n}" is not a recognized format.`),r=!0)}else r=["date","time","iso-date-time"].includes(n)&&Object.prototype.toString.call(s)==="[object Date]";return at(r,i)?null:{format:{requiredFormat:n,currentValue:s}}}:e.nullValidator}static minimum(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value,s=!ct(r)||r>=n;return at(s,i)?null:{minimum:{minimumValue:n,currentValue:r}}}:e.nullValidator}static exclusiveMinimum(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value,s=!ct(r)||+r<n;return at(s,i)?null:{exclusiveMinimum:{exclusiveMinimumValue:n,currentValue:r}}}:e.nullValidator}static maximum(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value,s=!ct(r)||+r<=n;return at(s,i)?null:{maximum:{maximumValue:n,currentValue:r}}}:e.nullValidator}static exclusiveMaximum(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value,s=!ct(r)||+r<n;return at(s,i)?null:{exclusiveMaximum:{exclusiveMaximumValue:n,currentValue:r}}}:e.nullValidator}static multipleOf(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value,s=ct(r)&&r%n===0;return at(s,i)?null:{multipleOf:{multipleOfValue:n,currentValue:r}}}:e.nullValidator}static minProperties(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=Object.keys(t.value).length||0,s=r>=n;return at(s,i)?null:{minProperties:{minimumProperties:n,currentProperties:r}}}:e.nullValidator}static maxProperties(n){return de(n)?(t,i=!1)=>{let r=Object.keys(t.value).length||0,s=r<=n;return at(s,i)?null:{maxProperties:{maximumProperties:n,currentProperties:r}}}:e.nullValidator}static dependencies(n){return is(n)!=="object"||ye(n)?e.nullValidator:(t,i=!1)=>{if(ye(t.value))return null;let r=Fi(wg(n,(s,l)=>{if(!de(t.value[l]))return null;let u={},d,p={};is(n[l])==="array"?d=n[l]:is(n[l])==="object"&&(d=n[l].required||[],p=n[l].properties||{});for(let m of d)at(!de(t.value[m]),i)&&(u[m]={required:!0});return u=Fi(u,wg(p,(m,g)=>{let w=Fi(wg(m,(C,I)=>{let b=null;if(C==="maximum"||C==="minimum"){let P=!!m["exclusiveM"+C.slice(1)];b=e[C](I,P)}else typeof e[C]=="function"&&(b=e[C](I));return ze(b)?b(t.value[g]):null}));return ye(w)?null:{[g]:w}})),ye(u)?null:{[l]:u}}));return ye(r)?null:r}}static minItems(n){return de(n)?(t,i=!1)=>{if(ye(t.value))return null;let r=R(t.value)?t.value.length:0,s=r>=n;return at(s,i)?null:{minItems:{minimumItems:n,currentItems:r}}}:e.nullValidator}static maxItems(n){return de(n)?(t,i=!1)=>{let r=R(t.value)?t.value.length:0,s=r<=n;return at(s,i)?null:{maxItems:{maximumItems:n,currentItems:r}}}:e.nullValidator}static uniqueItems(n=!0){return n?(t,i=!1)=>{if(ye(t.value))return null;let r=t.value.slice().sort(),s=[];for(let u=1;u<r.length;u++)r[u-1]===r[u]&&s.includes(r[u])&&s.push(r[u]);let l=!s.length;return at(l,i)?null:{uniqueItems:{duplicateItems:s}}}:e.nullValidator}static contains(n=!0){return n?(t,i=!1)=>{if(ye(t.value)||!R(t.value))return null;let r=t.value;return at(!0,i)?null:{contains:{requiredItem:n,currentItems:r}}}:e.nullValidator}static nullValidator(n){return null}static composeAnyOf(n){if(!n)return null;let t=n.filter(ze);return t.length===0?null:(i,r=!1)=>{let s=el(i,t,r).filter(ze),l=n.length>s.length;return at(l,r)?null:Fi(...s,{anyOf:!r})}}static composeOneOf(n){if(!n)return null;let t=n.filter(ze);return t.length===0?null:(i,r=!1)=>{let s=el(i,t),u=n.length-s.filter(ze).length===1;if(at(u,r))return null;let d=el(i,t,r);return Fi(...s,...d,{oneOf:!r})}}static composeAllOf(n){if(!n)return null;let t=n.filter(ze);return t.length===0?null:(i,r=!1)=>{let s=bg(el(i,t,r));return at(s===null,r)?null:Fi(s,{allOf:!r})}}static composeNot(n){return n?(t,i=!1)=>{if(ye(t.value))return null;let r=n(t,!i);return at(r===null,i)?null:Fi(r,{not:!i})}:null}static compose(n){if(!n)return null;let t=n.filter(ze);return t.length===0?null:(i,r=!1)=>bg(el(i,t,r))}static composeAsync(n){if(!n)return null;let t=n.filter(ze);return t.length===0?null:i=>{let r=Oee(i,t).map(Aee);return iu.call(m0(r),bg)}}static min(n){return de(n)?t=>{if(ye(t.value)||ye(n))return null;let i=parseFloat(t.value),r=t.value;return isNaN(i)||i>=n?null:{min:{min:n,actual:r}}}:e.nullValidator}static max(n){return de(n)?t=>{if(ye(t.value)||ye(n))return null;let i=parseFloat(t.value),r=t.value;return isNaN(i)||i<=n?null:{max:{max:n,actual:r}}}:e.nullValidator}static requiredTrue(n){return n?n.value===!0?null:{required:!0}:e.nullValidator}static email(n){return n?/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/.test(n.value)?null:{email:!0}:e.nullValidator}};function In(...e){if(e=e.filter(t=>!ye(t)),e.some(t=>!B(t)))return null;let n={};for(let t of e)for(let i of Object.keys(t)){let r=n[i],s=t[i];if(!E(n,i)||(0,fn.default)(r,s))n[i]=s;else switch(i){case"allOf":if(R(r)&&R(s))n.allOf=In(...r,...s);else return{allOf:[...e]};break;case"additionalItems":case"additionalProperties":case"contains":case"propertyNames":if(B(r)&&B(s))n[i]=In(r,s);else if(i==="additionalProperties"&&(r===!1||s===!1))n.combinedSchema=!1;else return{allOf:[...e]};break;case"anyOf":case"oneOf":case"enum":if(R(r)&&R(s)){if(n[i]=r.filter(l=>s.findIndex(u=>(0,fn.default)(l,u))>-1),!n[i].length)return{allOf:[...e]}}else return{allOf:[...e]};break;case"definitions":if(B(r)&&B(s)){let l=re({},r);for(let u of Object.keys(s))if(!E(l,u)||(0,fn.default)(l[u],s[u]))l[u]=s[u];else return{allOf:[...e]};n.definitions=l}else return{allOf:[...e]};break;case"dependencies":if(B(r)&&B(s)){let l=re({},r);for(let u of Object.keys(s))if(!E(l,u)||(0,fn.default)(l[u],s[u]))l[u]=s[u];else if(R(s[u])&&R(l[u]))l[u]=jc(...l[u],...s[u]);else if((R(s[u])||B(s[u]))&&(R(l[u])||B(l[u]))){let d=R(n.required)?n.required:[],p=R(l[u])?{required:jc(...d,l[u])}:l[u],m=R(s[u])?{required:jc(...d,s[u])}:s[u];l[u]=In(p,m)}else return{allOf:[...e]};n.dependencies=l}else return{allOf:[...e]};break;case"items":if(R(r)&&R(s)){if(n.items=r.filter(l=>s.findIndex(u=>(0,fn.default)(l,u))>-1),!n.items.length)return{allOf:[...e]}}else if(B(r)&&B(s))n.items=In(r,s);else if(R(r)&&B(s))n.items=r.map(l=>In(l,s));else if(B(r)&&R(s))n.items=s.map(l=>In(l,r));else return{allOf:[...e]};break;case"multipleOf":if(ct(r)&&ct(s)){let l=(d,p)=>p?l(p,d%p):d,u=(d,p)=>d*p/l(d,p);n.multipleOf=u(r,s)}else return{allOf:[...e]};break;case"maximum":case"exclusiveMaximum":case"maxLength":case"maxItems":case"maxProperties":if(ct(r)&&ct(s))n[i]=Math.min(r,s);else return{allOf:[...e]};break;case"minimum":case"exclusiveMinimum":case"minLength":case"minItems":case"minProperties":if(ct(r)&&ct(s))n[i]=Math.max(r,s);else return{allOf:[...e]};break;case"not":if(B(r)&&B(s)){let l=[r,s].reduce((u,d)=>R(d.anyOf)&&Object.keys(d).length===1?[...u,...d.anyOf]:[...u,d],[]);n.not={anyOf:l}}else return{allOf:[...e]};break;case"patternProperties":if(B(r)&&B(s)){let l=re({},r);for(let u of Object.keys(s))if(!E(l,u)||(0,fn.default)(l[u],s[u]))l[u]=s[u];else if(B(s[u])&&B(l[u]))l[u]=In(l[u],s[u]);else return{allOf:[...e]};n.patternProperties=l}else return{allOf:[...e]};break;case"properties":if(B(r)&&B(s)){let l=re({},r);E(s,"additionalProperties")&&Object.keys(r).filter(u=>!Object.keys(s).includes(u)).forEach(u=>{s.additionalProperties===!1?delete l[u]:B(s.additionalProperties)&&(l[u]=In(l[u],s.additionalProperties))});for(let u of Object.keys(s))if((0,fn.default)(l[u],s[u])||!E(l,u)&&!E(l,"additionalProperties"))l[u]=s[u];else if(!E(l,u)&&E(l,"additionalProperties"))B(l.additionalProperties)&&(l[u]=In(l.additionalProperties,s[u]));else if(B(s[u])&&B(l[u]))l[u]=In(l[u],s[u]);else return{allOf:[...e]};n.properties=l}else return{allOf:[...e]};break;case"required":if(R(r)&&R(s))n.required=jc(...r,...s);else if(typeof s=="boolean"&&typeof r=="boolean")n.required=!!r||!!s;else return{allOf:[...e]};break;case"$schema":case"$id":case"id":break;case"title":case"description":case"$comment":n[i]=s;break;case"type":if((R(s)||Ye(s))&&(R(r)||Ye(r))){let l=Lee(r,s);if(!l.length)return{allOf:[...e]};n.type=l.length>1?l:l[0]}else return{allOf:[...e]};break;case"uniqueItems":n.uniqueItems=!!r||!!s;break;default:return{allOf:[...e]}}}return n}function Eg(e,n=!1,t=!0){let i={},r=l=>{let u=is(l,"strict");return{integer:"number",null:"string"}[u]||u},s=l=>Eg(l,n,!1);if(t&&(i.$schema="http://json-schema.org/draft-06/schema#"),i.type=r(e),i.type==="object"){i.properties={},n&&(i.required=[]);for(let l of Object.keys(e))i.properties[l]=s(e[l]),n&&i.required.push(l)}else i.type==="array"&&(i.items=e.map(s),new Set(e.map(r)).size===1&&(i.items=i.items.reduce((l,u)=>re(re({},l),u),{})),n&&(i.minItems=1));return i}function zee(e,n,t="schema"){let i=k.parse(n);if(i===null)return console.error(`getFromSchema error: Invalid JSON Pointer: ${n}`),null;let r=e,s=[],l=i.length;t.slice(0,6)==="parent"&&i.length--;for(let u=0;u<l;++u){let d=r,p=i[u],m=!1;if(typeof r!="object")return console.error(`getFromSchema error: Unable to find "${p}" key in schema.`),console.error(e),console.error(n),null;if(r.type==="array"&&(!isNaN(p)||p==="-")?(E(r,"items")&&(B(r.items)?(m=!0,r=r.items,s.push("items")):R(r.items)&&!isNaN(p)&&r.items.length>=+p&&(m=!0,r=r.items[+p],s.push("items",p))),!m&&B(r.additionalItems)?(m=!0,r=r.additionalItems,s.push("additionalItems")):r.additionalItems!==!1&&(m=!0,r={},s.push("additionalItems"))):r.type==="object"&&(B(r.properties)&&E(r.properties,p)?(m=!0,r=r.properties[p],s.push("properties",p)):B(r.additionalProperties)?(m=!0,r=r.additionalProperties,s.push("additionalProperties")):r.additionalProperties!==!1&&(m=!0,r={},s.push("additionalProperties"))),!m){console.error(`getFromSchema error: Unable to find "${p}" item in schema.`),console.error(e),console.error(n);return}}return t.slice(-7)==="Pointer"?s:r}function Ht(e,n,t=new Map){if(!e)return"";let i=k.toGenericPointer(k.compile(e),t);if(i.indexOf("/")===-1)return i;let r=!0;for(;r;)r=!1,n.forEach((s,l)=>{if(k.isSubPointer(s,l))for(;k.isSubPointer(l,i,!0);)i=k.toGenericPointer(s+i.slice(l.length),t),r=!0});return i}function Pg(e,n=null){let t=k.getFirst([[e,"/x-schema-form/type"],[e,"/x-schema-form/widget/component"],[e,"/x-schema-form/widget"],[e,"/widget/component"],[e,"/widget"]]);if(Ye(t))return Og(t,e,n);let i=e.type;if(i){if(R(i)&&(i=gt("object",i)&&E(e,"properties")?"object":gt("array",i)&&E(e,"items")||gt("array",i)&&E(e,"additionalItems")?"array":gt("string",i)?"string":gt("number",i)?"number":gt("integer",i)?"integer":gt("boolean",i)?"boolean":"unknown"),i==="boolean")return"checkbox";if(i==="object"){if(E(e,"properties")||E(e,"additionalProperties"))return"section";if(E(e,"$ref"))return"$ref"}if(i==="array"){let r=k.getFirst([[e,"/items"],[e,"/additionalItems"]])||{};return E(r,"enum")&&e.maxItems!==1?Og("checkboxes",e,n):"array"}if(i==="null")return"none";if(k.has(n,"/options/titleMap")||E(e,"enum")||Tg(e,null,!0))return"select";if(i==="number"||i==="integer")return(i==="integer"||E(e,"multipleOf"))&&E(e,"maximum")&&E(e,"minimum")?"range":i;if(i==="string")return{color:"color",date:"date","iso-date-time":"datetime-local",email:"email",uri:"url"}[e.format]||"text"}return E(e,"$ref")?"$ref":R(e.oneOf)?"one-of":E(e,"if")?"if":E(e,"then")?"then":E(e,"else")?"else":(console.error(`getInputType error: Unable to determine input type for ${i}`),console.error("schema",e),n&&console.error("layoutNode",n),"none")}function Og(e,n,t=null){return!Ye(e)||e.slice(0,8)!=="checkbox"&&e.slice(0,5)!=="radio"?e:k.getFirst([[t,"/inline"],[t,"/options/inline"],[n,"/inline"],[n,"/x-schema-form/inline"],[n,"/x-schema-form/options/inline"],[n,"/x-schema-form/widget/inline"],[n,"/x-schema-form/widget/component/inline"],[n,"/x-schema-form/widget/component/options/inline"],[n,"/widget/inline"],[n,"/widget/component/inline"],[n,"/widget/component/options/inline"]])===!0?e.slice(0,5)==="radio"?"radios-inline":"checkboxes-inline":e}function zc(e,n){if(!B(e))return console.error("isInputRequired error: Input schema must be an object."),!1;let t=k.parse(n);if(R(t)){if(!t.length)return e.required===!0;let i=t.pop(),r=t[t.length-1];["properties","additionalProperties","patternProperties","items","additionalItems"].includes(r)&&t.pop();let s=k.get(e,t)||{};if(R(s.required))return s.required.includes(i);if(s.type==="array")return E(s,"minItems")&&ct(i)&&+s.minItems>+i}return!1}function tl(e,n,t){if(!B(e)||!B(e.options))return;let i={},r=s=>s.slice(0,3).toLowerCase()==="ui:"?s.slice(3):s;if(JT(i,t.formOptions.defaultWidgetOptions,[],r),[[k.get(n,"/ui:widget/options"),[]],[k.get(n,"/ui:widget"),[]],[n,["additionalProperties","additionalItems","properties","items","required","type","x-schema-form","$ref"]],[k.get(n,"/x-schema-form/options"),[]],[k.get(n,"/x-schema-form"),["items","options"]],[e,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"]],[e.options,[]]].forEach(([s,l])=>JT(i,s,l,r)),!E(i,"titleMap")){let s=null;s=Tg(n,i.flatList),s&&(i.titleMap=s),!E(i,"titleMap")&&!E(i,"enum")&&E(n,"items")&&(k.has(n,"/items/titleMap")?i.titleMap=n.items.titleMap:k.has(n,"/items/enum")?(i.enum=n.items.enum,!E(i,"enumNames")&&k.has(n,"/items/enumNames")&&(i.enumNames=n.items.enumNames)):k.has(n,"/items/oneOf")&&(s=Tg(n.items,i.flatList),s&&(i.titleMap=s)))}n.type==="integer"&&!de(i.multipleOf)&&(i.multipleOf=1),k.has(i,"/autocomplete/source")?i.typeahead=i.autocomplete:k.has(i,"/tagsinput/source")?i.typeahead=i.tagsinput:k.has(i,"/tagsinput/typeahead/source")&&(i.typeahead=i.tagsinput.typeahead),e.options=i}function Tg(e={},n=null,t=!1){let i=null,r=e.oneOf||e.anyOf||null;if(R(r)&&r.every(s=>s.title)){if(r.every(s=>R(s.enum)&&s.enum.length===1)){if(t)return!0;i=r.map(s=>({name:s.title,value:s.enum[0]}))}else if(r.every(s=>s.const)){if(t)return!0;i=r.map(s=>({name:s.title,value:s.const}))}if(n!==!1&&(i||[]).filter(s=>((s||{}).name||"").indexOf(": ")).length>1){let s=i.map(l=>{let[u,d]=l.name.split(/: (.+)/);return u&&d?Ve(re({},l),{group:u,name:d}):l});(n===!0||s.some((l,u)=>u&&E(l,"group")&&l.group===s[u-1].group))&&(i=s)}}return t?!1:i}function Bee(e){if(!B(e))return null;let n={};if(E(e,"type"))switch(e.type){case"string":pn(["pattern","format","minLength","maxLength"],t=>{E(e,t)&&(n[t]=[e[t]])});break;case"number":case"integer":pn(["Minimum","Maximum"],t=>{let i="exclusive"+t,r=t.toLowerCase();if(E(e,r)){let s=E(e,i)&&e[i]===!0;n[r]=[e[r],s]}}),pn(["multipleOf","type"],t=>{E(e,t)&&(n[t]=[e[t]])});break;case"object":pn(["minProperties","maxProperties","dependencies"],t=>{E(e,t)&&(n[t]=[e[t]])});break;case"array":pn(["minItems","maxItems","uniqueItems"],t=>{E(e,t)&&(n[t]=[e[t]])});break}return E(e,"enum")&&(n.enum=[e.enum]),n}function Hee(e,n,t,i,r){if(!B(e)){console.error("resolveSchemaReferences error: schema must be an object.");return}let s=new Set,l=new Set,u=new Map,d=new Map,p={};k.forEachDeep(e,(w,C)=>{if(E(w,"$ref")&&Ye(w.$ref)){let I=k.compile(w.$ref);s.add(I),l.add(C+"~~"+I),u.set(C,I)}}),s.forEach(w=>p[w]=Bc(e,w));let m=!0;for(;m;)m=!1,Array.from(u).forEach(([w,C])=>Array.from(u).filter(([I,b])=>k.isSubPointer(C,I,!0)&&!k.isSubPointer(b,C,!0)&&!l.has(w+I.slice(C.length)+"~~"+b)).forEach(([I,b])=>{l.add(w+I.slice(C.length)+"~~"+b),m=!0}));Array.from(l).map(w=>w.split("~~")).filter(([w,C])=>k.isSubPointer(C,w)).forEach(([w,C])=>d.set(w,C)),Array.from(u).filter(([w,C])=>Array.from(d.keys()).every(I=>!k.isSubPointer(w,I,!0))).forEach(([w,C])=>Array.from(d).filter(([I,b])=>!d.has(w+I.slice(C.length))&&k.isSubPointer(C,I,!0)&&!k.isSubPointer(C,w,!0)).forEach(([I,b])=>d.set(w+I.slice(C.length),w+b.slice(C.length))));let g=re({},e);return delete g.definitions,g=Bc(g,"",p,d),k.forEachDeep(g,(w,C)=>{if(Ye(w.$ref)){let I=k.compile(w.$ref);k.isSubPointer(I,C,!0)||(I=Ht(C,d),k.set(g,C,{$ref:`#${I}`})),E(n,"refPointer")||(n[I]=I.length?Bc(g,I,n,d):g),t.has(C)||t.set(C,I);let b=k.toDataPointer(C,g);if(!i.has(b)){let P=k.toDataPointer(I,g);i.set(b,P)}}if(w.type==="array"&&(E(w,"items")||E(w,"additionalItems"))){let I=k.toDataPointer(C,g);if(!r.has(I)){let b=R(w.items)?w.items.length:0;r.set(I,b)}}},!0),g}function Bc(e,n,t=null,i=null,r=[]){if(!t||!i)return k.getCopy(e,n);typeof n!="string"&&(n=k.compile(n)),r=[...r,n];let s=null;if(n==="")s=(0,xe.default)(e);else{let l=Ht(n,i);l!==n&&(r=[...r,l]),s=k.getFirstCopy([[t,[l]],[e,n],[e,l]])}return k.forEachDeepCopy(s,(l,u)=>{if(B(l)){if(Ye(l.$ref)){let d=k.compile(l.$ref);if(d.length&&r.every(p=>!k.isSubPointer(d,p,!0))){let p=Bc(e,d,t,i,r);if(Object.keys(l).length===1)return p;{let m=re({},l);return delete m.$ref,In(p,m)}}}if(R(l.allOf))return Wee(l);if(l.type==="array"&&R(l.required))return Gee(l)}return l},!0,n)}function Uee(e,n){return e.map(t=>(0,YT.default)(t,n))}function Wee(e){if(!B(e)||!R(e.allOf))return e;let n=e.allOf.map(r=>r.if&&r).filter(r=>!(0,Ut.isEmpty)(r)),t=Uee(e.allOf,["if","then","else"]),i=In(...t);if(Object.keys(e).length>1){let r=re({},e);delete r.allOf,i=In(r,i),n&&n.length>0&&(i.allOf=i.allOf||[],i.allOf.push(...n))}return i}function Gee(e){if(e.type==="array"&&R(e.required)){let n=E(e.items,"properties")?"items":E(e.additionalItems,"properties")?"additionalItems":null;n&&!E(e[n],"required")&&(E(e[n],"additionalProperties")||e.required.every(t=>E(e[n].properties,t)))&&(e=(0,xe.default)(e),e[n].required=e.required,delete e.required)}return e}function ZT(e,n,t=!1){let i="",r={},s=t?"!":"",l=n.dataPointer?n.dataPointer.split("/").slice(1,-1).map((p,m)=>{let g=m==0?"":".";return p=="-"?"[arrayIndices]":g+p}).join(""):"",u=l?`model.${l}`:"model",d=u.replace(/\[/g,".[").split(".").join("?.");return e.if&&Object.keys(e.if.properties).forEach((p,m)=>{let g=m>0?"&":"",C=(E(e.if.properties[p],"const")?[e.if.properties[p].const]:E(e.if.properties[p],"enum")?e.if.properties[p].enum:[]).map(I=>`"${I}"`);i+=`${g} ${d} && [${C}].includes(${u}.${p}+"")`}),r.functionBody=`return ${s}(${i})`,r}function es(e,n={}){let t=n.draft||null,i=n.changed||!1;if(typeof e!="object")return e;if(typeof e.map=="function")return[...e.map(l=>es(l,{changed:i,draft:t}))];let r=re({},e),s=["array","boolean","integer","null","number","object","string"];if(typeof r.$schema=="string"&&/http\:\/\/json\-schema\.org\/draft\-0\d\/schema\#/.test(r.$schema)&&(t=r.$schema[30]),r.contentEncoding&&(r.media={binaryEncoding:r.contentEncoding},delete r.contentEncoding,i=!0),typeof r.extends=="object"&&(r.allOf=typeof r.extends.map=="function"?r.extends.map(l=>es(l,{changed:i,draft:t})):[es(r.extends,{changed:i,draft:t})],delete r.extends,i=!0),r.disallow&&(typeof r.disallow=="string"?r.not={type:r.disallow}:typeof r.disallow.map=="function"&&(r.not={anyOf:r.disallow.map(l=>typeof l=="object"?l:{type:l})}),delete r.disallow,i=!0),typeof r.dependencies=="object"&&Object.keys(r.dependencies).some(l=>typeof r.dependencies[l]=="string")&&(r.dependencies=re({},r.dependencies),Object.keys(r.dependencies).filter(l=>typeof r.dependencies[l]=="string").forEach(l=>r.dependencies[l]=[r.dependencies[l]]),i=!0),typeof r.maxDecimal=="number"&&(r.multipleOf=1/Math.pow(10,r.maxDecimal),delete r.divisibleBy,i=!0,(!t||t===2)&&(t=1)),typeof r.divisibleBy=="number"&&(r.multipleOf=r.divisibleBy,delete r.divisibleBy,i=!0),typeof r.minimum=="number"&&r.minimumCanEqual===!1?(r.exclusiveMinimum=r.minimum,delete r.minimum,i=!0,t||(t=2)):typeof r.minimumCanEqual=="boolean"&&(delete r.minimumCanEqual,i=!0,t||(t=2)),typeof r.minimum=="number"&&r.exclusiveMinimum===!0?(r.exclusiveMinimum=r.minimum,delete r.minimum,i=!0):typeof r.exclusiveMinimum=="boolean"&&(delete r.exclusiveMinimum,i=!0),typeof r.maximum=="number"&&r.maximumCanEqual===!1?(r.exclusiveMaximum=r.maximum,delete r.maximum,i=!0,t||(t=2)):typeof r.maximumCanEqual=="boolean"&&(delete r.maximumCanEqual,i=!0,t||(t=2)),typeof r.maximum=="number"&&r.exclusiveMaximum===!0?(r.exclusiveMaximum=r.maximum,delete r.maximum,i=!0):typeof r.exclusiveMaximum=="boolean"&&(delete r.exclusiveMaximum,i=!0),typeof r.properties=="object"){let l=re({},r.properties),u=Array.isArray(r.required)?new Set(r.required):new Set;if((t===1||t===2||Object.keys(l).some(d=>l[d].optional===!0))&&(Object.keys(l).filter(d=>l[d].optional!==!0).forEach(d=>u.add(d)),i=!0,t||(t=2)),Object.keys(l).some(d=>l[d].required===!0)&&(Object.keys(l).filter(d=>l[d].required===!0).forEach(d=>u.add(d)),i=!0),u.size&&(r.required=Array.from(u)),Object.keys(l).some(d=>l[d].requires)){let d=typeof r.dependencies=="object"?re({},r.dependencies):{};Object.keys(l).filter(p=>l[p].requires).forEach(p=>d[p]=typeof l[p].requires=="string"?[l[p].requires]:l[p].requires),r.dependencies=d,i=!0,t||(t=2)}r.properties=l}if(typeof r.optional=="boolean"&&(delete r.optional,i=!0,t||(t=2)),r.requires&&delete r.requires,typeof r.required=="boolean"&&delete r.required,typeof r.id=="string"&&!r.$id&&(r.id.slice(-1)==="#"&&(r.id=r.id.slice(0,-1)),r.$id=r.id+"-CONVERTED-TO-DRAFT-06#",delete r.id,i=!0),r.type&&(typeof r.type.every=="function"?!r.type.every(l=>s.includes(l)):!s.includes(r.type))&&(i=!0),typeof r.$schema=="string"&&/http\:\/\/json\-schema\.org\/draft\-0[1-4]\/schema\#/.test(r.$schema))r.$schema="http://json-schema.org/draft-06/schema#",i=!0;else if(i&&typeof r.$schema=="string"){let l="Converted to draft 6 from "+r.$schema;typeof r.description=="string"&&r.description.length?r.description+=`
|
|
88
|
-
`+l:r.description=l,delete r.$schema}if(r.type&&(typeof r.type.every=="function"?!r.type.every(l=>s.includes(l)):!s.includes(r.type)))if(r.type.length===1&&(r.type=r.type[0]),typeof r.type=="string")r.type==="any"?r.type=s:delete r.type;else if(typeof r.type=="object"){if(typeof r.type.every=="function")if(r.type.every(l=>typeof l=="string"))r.type=r.type.some(l=>l==="any")?r.type=s:r.type.filter(l=>s.includes(l));else if(r.type.length>1){let l=["additionalItems","items","maxItems","minItems","uniqueItems","contains"],u=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"],d=["maxProperties","minProperties","required","additionalProperties","properties","patternProperties","dependencies","propertyNames"],p=["maxLength","minLength","pattern","format"],m={array:[...u,...d,...p],integer:[...l,...d,...p],number:[...l,...d,...p],object:[...l,...u,...p],string:[...l,...u,...d],all:[...l,...u,...d,...p]},g=[];for(let w of r.type){let C=typeof w=="string"?{type:w}:re({},w);Object.keys(r).filter(I=>!C.hasOwnProperty(I)&&![...m[C.type]||m.all,"type","default"].includes(I)).forEach(I=>C[I]=r[I]),g.push(C)}r=r.hasOwnProperty("default")?{anyOf:g,default:r.default}:{anyOf:g}}else{let l=r.type;delete r.type,Object.assign(r,l)}}else delete r.type;return Object.keys(r).filter(l=>typeof r[l]=="object").forEach(l=>{if(["definitions","dependencies","properties","patternProperties"].includes(l)&&typeof r[l].map!="function"){let u={};Object.keys(r[l]).forEach(d=>u[d]=es(r[l][d],{changed:i,draft:t})),r[l]=u}else["items","additionalItems","additionalProperties","allOf","anyOf","oneOf","not"].includes(l)?r[l]=es(r[l],{changed:i,draft:t}):r[l]=(0,xe.default)(r[l])}),r}function mr(e){return e.replace(/\//g,"$")}function Cn(e,n=null,t=!0,i="",r="",s=""){let l=k.get(e.schema,i);t?!ze(n)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&ye(e.formValues))&&(n=k.get(e.schema,i+"/default")):n=null;let u=k.get(l,"/type"),p=(E(l,"if")||E(l,"then")||E(l,"else"))&&!u?"IfThenElse":(E(l,"properties")||E(l,"additionalProperties"))&&u==="object"?"FormGroup":(E(l,"items")||E(l,"additionalItems"))&&u==="array"?"FormArray":!u&&E(l,"$ref")?"$ref":"FormControl",m=Ht(r,e.dataRecursiveRefMap,e.arrayMap);e.dataMap.has(m)||e.dataMap.set(m,new Map);let g=e.dataMap.get(m);g.has("schemaType")||(g.set("schemaPointer",i),g.set("schemaType",l.type),l.format&&(g.set("schemaFormat",l.format),l.type||g.set("schemaType","string")),p&&(g.set("templatePointer",s),g.set("templateType",p)));let w,C=Bee(l);switch(p){case"FormGroup":if(w={},E(l,"ui:order")||E(l,"properties")){let U=l["ui:order"]||Object.keys(l.properties);if(U.includes("*")&&!E(l.properties,"*")){let K=Object.keys(l.properties).filter(oe=>!U.includes(oe));for(let oe=U.length-1;oe>=0;oe--)U[oe]==="*"&&U.splice(oe,1,...K)}U.filter(K=>E(l.properties,K)||E(l,"additionalProperties")).forEach(K=>{w[K]=Cn(e,k.get(n,[K]),t,i+(E(l.properties,K)?"/properties/"+K:"/additionalProperties"),r+"/"+K,s+"/controls/"+K),["allOf","anyOf","oneOf"].forEach(oe=>{w[K].controls&&w[K].controls[`_${oe}`]&&(Object.keys(w[K].controls[`_${oe}`]).forEach(fe=>{w[fe]=w[K].controls[`_${oe}`][fe],delete w[K].controls[fe]}),delete w[K].controls[`_${oe}`])})}),E(l,"if")&&["then","else"].forEach(K=>{if(E(l,K)){let oe=`/${K}`,fe=Cn(e,n,t,i+oe,r,s+`/controls/${K}`);Object.assign(w,fe.controls)}});let z=["allOf","anyOf","oneOf","if","then","else","type","properties","items"];["allOf","anyOf","oneOf"].forEach(K=>{E(l,K)&&R(l[K])&&l[K].forEach((oe,fe)=>{let qe=Object.keys(oe),Ke=z.filter(lt=>qe.includes(lt));if(Ke&&Ke.length>0){let lt=`/${K}/${fe}`,li=n;K=="oneOf"&&(li=n);let Sn=Cn(e,li,t,i+lt,r,s+"/controls/"+fe);Sn.controls&&Object.keys(Sn.controls).forEach(Ft=>{let ul=E(l,"properties")?"/properties/"+Ft:Ft,bi=Sn.controls[Ft].schemaPointer||`${i}${lt}${ul}`;bi=mr(bi);let dt=(0,xe.default)(Sn.controls[Ft]);dt.key=Ft,dt.schemaPointer=dt.schemaPointer||`${i}${lt}${ul}`,w[bi]=dt;let Ag=Ft.startsWith("$oneOf")?dt.schemaPointer:lt,cl=k.get(e.schema,dt.schemaPointer),gr=dt.schemaPointer.replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g,"").replace(/(if|then|else|properties)\//g,"").replace(/\/items\//g,"/-/");gr=gr.indexOf(r)==0?gr.substring(r.length):gr;let Vi=k.get(n,gr),Zr=Ft,ss=Vi;E(dt,"value")&&(e.ajv.validate(cl,ss)?dt.value.value=cl.properties?ss[Zr]:ss:dt.value.value=null),w[`_${K}`]=w[`_${K}`]||{},w[`_${K}`][bi]=dt})}})}),e.formOptions.fieldsRequired=Kee(l,w)}return{controlType:p,controls:w,validators:C,schemaPointer:i};case"FormArray":w=[];let I=Math.max(l.minItems||0,g.get("minItems")||0),b=Math.min(l.maxItems||1e3,g.get("maxItems")||1e3),P=null;if(R(l.items)){let U=g.get("tupleItems")||(R(l.items)?Math.min(l.items.length,b):0);for(let z=0;z<U;z++)if(z<I)w.push(Cn(e,R(n)?n[z]:n,t,i+"/items/"+z,r+"/"+z,s+"/controls/"+z));else{let K=Ht(i+"/items/"+z,e.schemaRecursiveRefMap),oe=Ht(m+"/"+z,e.dataRecursiveRefMap,e.arrayMap),fe=oe!==m+"/"+z,qe=`${oe}@${i}`,Ke=oe;E(e.templateRefLibrary,oe)&&!E(e.templateRefLibrary,qe)&&(e.templateRefLibrary[qe]=Cn(e,null,t,K,oe,s+"/controls/"+z),Ke=qe),E(e.templateRefLibrary,oe)||(e.templateRefLibrary[oe]=null,e.templateRefLibrary[oe]=Cn(e,null,t,K,oe,s+"/controls/"+z),e.templateRefLibrary[qe]=e.templateRefLibrary[oe]),w.push(R(n)?Cn(e,n[z],t,i+"/items/"+z,r+"/"+z,s+"/controls/"+z):fe?null:(0,xe.default)(e.templateRefLibrary[Ke]))}l.items.length<b&&B(l.additionalItems)&&(P=i+"/additionalItems")}else P=i+"/items";if(P){let U=Ht(P,e.schemaRecursiveRefMap),z=Ht(m+"/-",e.dataRecursiveRefMap,e.arrayMap),K=z!==m+"/-",oe=`${z}@${i}`,fe=z;E(e.templateRefLibrary,z)&&!E(e.templateRefLibrary,oe)&&(e.templateRefLibrary[oe]=Cn(e,null,t,U,z,s+"/controls/-"),fe=oe),E(e.templateRefLibrary,z)||(e.templateRefLibrary[z]=null,e.templateRefLibrary[z]=Cn(e,null,t,U,z,s+"/controls/-"),e.templateRefLibrary[oe]=e.templateRefLibrary[z]);let qe=g;if(!K||E(C,"required")){let Ke=Math.min(Math.max(K?0:qe.get("tupleItems")+qe.get("listItems")||0,R(n)?n.length:0),b);for(let lt=w.length;lt<Ke;lt++)w.push(R(n)?Cn(e,n[lt],t,U,r+"/-",s+"/controls/-"):K?null:(0,xe.default)(e.templateRefLibrary[fe]))}}return{controlType:p,controls:w,validators:C,schemaPointer:i};case"$ref":let T=k.compile(l.$ref),J=k.toDataPointer(T,l),W=Ht(J,e.dataRecursiveRefMap,e.arrayMap);if(W&&!E(e.templateRefLibrary,W)){e.templateRefLibrary[W]=null;let U=Cn(e,t,t,T);U?e.templateRefLibrary[W]=U:delete e.templateRefLibrary[W]}return null;case"FormControl":let Z={value:t&&Tee(n)?n:null,disabled:g.get("disabled")||!1};return{controlType:p,value:Z,validators:C,schemaPointer:i};case"IfThenElse":w={};let M;return E(l,"if")&&["then","else"].forEach(U=>{if(E(l,U)){let z=`/${U}`,K=Cn(e,n,t,i+z,r,s+`/controls/${U}`);E(K,"controls")&&Object.keys(K.controls).forEach(oe=>{let fe=K.controls[oe].schemaPointer;if(fe){fe=mr(fe);let qe=Object.assign({},K.controls[oe]);w[fe]=qe}})}}),{controlType:p,controls:w,validators:C,schemaPointer:i};default:return null}}function il(e){let n=[],t=null;if(E(e,"validators")&&(pn(e.validators,(i,r)=>{typeof nl[r]=="function"&&n.push(nl[r].apply(null,i))}),n.length&>(e.controlType,["FormGroup","FormArray"])&&(t=n.length>1?nl.compose(n):n[0])),E(e,"controlType"))switch(e.controlType){case"FormGroup":let i={};return pn(e.controls,(r,s)=>{let l=il(r);l&&(i[s]=l)}),new L0(i,t);case"FormArray":return new U0((0,XT.default)((0,e$.default)(e.controls,r=>il(r))),t);case"FormControl":return new z0(e.value,n)}return null}function Kee(e,n){let t=!1;if(E(e,"required")&&!ye(e.required)){t=!0;let i=R(e.required)?e.required:[e.required];i=pn(i,r=>k.set(n,"/"+r+"/validators/required",[]))}return t}function Jee(e,n,t,i,r=!1,s=!1){if(e===null||typeof e!="object")return e;let l=R(e)?[]:{};return k.forEachDeep(e,(u,d)=>{if(r&&R(u))k.set(l,d,[]);else if(r&&B(u)&&!rs(u))k.set(l,d,{});else{let p=k.has(n,[d,"schemaType"])?d:Ht(d,t,i);if(k.has(n,[p,"schemaType"])){let m=n.get(p).get("schemaType");if(m==="null")k.set(l,d,null);else if((de(u)||r)&>(m,["string","integer","number","boolean"])){let g=s||u===null&&r?Ree(u,m):hr(u,m);(ze(g)||r)&&k.set(l,d,g)}}else if(typeof u!="object"||rs(u)||u===null&&r){if(p.indexOf("/$")>=0)return l;console.error(`formatFormData error: Schema type not found for form value at ${p}`),console.error("dataMap",n),console.error("recursiveRefMap",t),console.error("genericPointer",p)}}}),l}function Lc(e,n,t=!1,i){if(!B(e)||!k.isJsonPointer(n)){if(!k.isJsonPointer(n)){if(typeof n=="string"){let l=i?mr(i):n,u=e.get(l);if(u)return u}console.error(`getControl error: Invalid JSON Pointer: ${n}`)}return B(e)||console.error(`getControl error: Invalid formGroup: ${e}`),null}let r=k.parse(n);if(t&&(r=r.slice(0,-1)),typeof e.get=="function"&&r.every(l=>l.indexOf(".")===-1)){let l=i?mr(i):r.join("."),u=e.get(l);if(u)return u}let s=e;if(i){let l=k.toControlPointer(n,{}),u=i.split("/"),d=k.parse(n),p,m;for(;u.length>0;){p=u.pop();let g=mr(u.join("/"));if(m=e.get(g),d[0]==u[u.length-1]&&d.shift(),m)break}s=m||s,r=m?d:r}for(let l of r){if(E(s,"controls")&&(s=s.controls),i&&E(s,mr(i)))return s=s[mr(i)],s;if(R(s)&&l==="-")s=s[s.length-1];else if(E(s,l))s=s[l];else{console.error(`getControl error: Unable to find "${l}" item in FormGroup.`),console.error(n),console.error(e);return}}return s}function Zee(e,n,t,i){let r=k.parse(n),s=e;for(let u=0;u<r.length-1;u++)if(s=s.get(r[u]),typeof s.setControl!="function")throw new Error(`Path '${r[u]}' is not a valid FormGroup or FormArray.`);let l=r[r.length-1];s.setControl(l,t)}function Qee(e,n){let t=!k.get(e,"/formOptions/addSubmit"),i=s$(e.layout,(r,s,l)=>{let u={_id:(0,qi.default)(),options:{}};if(B(r))Object.assign(u,r),Object.keys(u).filter(p=>!gt(p,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"])).forEach(p=>{u.options[p]=u[p],delete u[p]}),!E(u,"type")&&Ye(u.widget)&&(u.type=u.widget,delete u.widget),E(u.options,"title")||E(u.options,"legend")&&(u.options.title=u.options.legend,delete u.options.legend),E(u.options,"validationMessages")||(E(u.options,"errorMessages")?(u.options.validationMessages=u.options.errorMessages,delete u.options.errorMessages):E(u.options,"validationMessage")&&(typeof u.options.validationMessage=="string"?u.options.validationMessages=u.options.validationMessage:(u.options.validationMessages={},Object.keys(u.options.validationMessage).forEach(p=>{let m=p+"",g=m==="0"?"type":m==="1"?"enum":m==="100"?"multipleOf":m==="101"?"minimum":m==="102"?"exclusiveMinimum":m==="103"?"maximum":m==="104"?"exclusiveMaximum":m==="200"?"minLength":m==="201"?"maxLength":m==="202"?"pattern":m==="300"?"minProperties":m==="301"?"maxProperties":m==="302"?"required":m==="304"?"dependencies":m==="400"?"minItems":m==="401"?"maxItems":m==="402"?"uniqueItems":m==="500"?"format":m+"";u.options.validationMessages[g]=u.options.validationMessage[p]})),delete u.options.validationMessage));else if(k.isJsonPointer(r))u.dataPointer=r;else if(Ye(r))u.key=r;else return console.error("buildLayout error: Form layout element not recognized:"),console.error(r),null;let d=null;if(!E(u,"dataPointer")){if(E(u,"key"))u.dataPointer=u.key==="*"?u.key:k.compile(k.parseObjectPath(u.key),"-"),delete u.key;else if(E(u,"type")&&u.type.slice(-5)==="array"){let p=g=>{if(!(g===null||typeof g!="object")){if(E(g,"dataPointer"))return g.dataPointer;if(R(g.items))for(let w of g.items){if(E(w,"dataPointer")&&w.dataPointer.indexOf("/-")!==-1)return w.dataPointer;if(E(w,"items")){let C=p(w);if(C)return C}}}},m=p(u);m&&(u.dataPointer=m.slice(0,m.lastIndexOf("/-")))}}if(E(u,"dataPointer")){if(u.dataPointer==="*")return xn(e,n,e.formValues);let p=k.get(e.formValues,u.dataPointer.replace(/\/-/g,"/1"));u.dataPointer=k.toGenericPointer(u.dataPointer,e.arrayMap);let m=k.toKey(u.dataPointer);!u.name&&Ye(m)&&m!=="-"&&(u.name=m);let g=Ht(u.dataPointer,e.dataRecursiveRefMap,e.arrayMap),w=!g.length||g!==u.dataPointer,C;e.dataMap.has(g)||e.dataMap.set(g,new Map);let I=e.dataMap.get(g);if(I.has("schemaPointer")?C=I.get("schemaPointer"):(C=k.toSchemaPointer(g,e.schema),I.set("schemaPointer",C)),d=k.get(e.schema,C),d){if(!E(u,"type"))u.type=Pg(d,u);else if(n.hasWidget(u.type))u.type=Og(u.type,d,u);else{let b=u.type;u.type=Pg(d,u),console.error(`error: widget type "${b}" not found in library. Replacing with "${u.type}".`)}d.type==="object"&&R(d.required)&&I.set("required",d.required),u.dataType=d.type||(E(d,"$ref")?"$ref":null),tl(u,d,e),I.set("disabled",!!u.options.disabled),u.type==="checkboxes"&&E(d,"items")?tl(u,d.items,e):u.dataType==="array"&&(u.options.maxItems=Math.min(d.maxItems||1e3,u.options.maxItems||1e3),u.options.minItems=Math.max(d.minItems||0,u.options.minItems||0),u.options.listItems=Math.max(u.options.listItems||0,R(p)?p.length:0),u.options.tupleItems=R(d.items)?d.items.length:0,u.options.maxItems<u.options.tupleItems?(u.options.tupleItems=u.options.maxItems,u.options.listItems=0):u.options.maxItems<u.options.tupleItems+u.options.listItems?u.options.listItems=u.options.maxItems-u.options.tupleItems:u.options.minItems>u.options.tupleItems+u.options.listItems&&(u.options.listItems=u.options.minItems-u.options.tupleItems),I.has("maxItems")||(I.set("maxItems",u.options.maxItems),I.set("minItems",u.options.minItems),I.set("tupleItems",u.options.tupleItems),I.set("listItems",u.options.listItems)),e.arrayMap.has(g)||e.arrayMap.set(g,u.options.tupleItems)),zc(e.schema,C)&&(u.options.required=!0,e.fieldsRequired=!0)}else tl(u,{},e);if(!u.options.title&&!/^\d+$/.test(u.name)&&(u.options.title=ji(u.name)),E(u.options,"copyValueTo")&&(typeof u.options.copyValueTo=="string"&&(u.options.copyValueTo=[u.options.copyValueTo]),R(u.options.copyValueTo)&&(u.options.copyValueTo=u.options.copyValueTo.map(b=>k.compile(k.parseObjectPath(b),"-")))),u.widget=n.getWidget(u.type),I.set("inputType",u.type),I.set("widget",u.widget),u.dataType==="array"&&(E(u,"items")||E(u,"additionalItems"))){let b=Ht(u.dataPointer+"/-",e.dataRecursiveRefMap,e.arrayMap);if(e.dataMap.has(b)||e.dataMap.set(b,new Map),e.dataMap.get(b).set("inputType","section"),u.items.length>1){let P=[];for(let T=u.items.length-1;T>=0;T--){let J=u.items[T];if(E(J,"dataPointer")&&J.dataPointer.slice(0,b.length)===b){let W=u.items.splice(T,1)[0];W.dataPointer=u.dataPointer+"/-"+W.dataPointer.slice(b.length),P.unshift(W)}else J.arrayItem=!0,J.arrayItemType="list",J.removable=u.options.removable!==!1}P.length&&u.items.push({_id:(0,qi.default)(),arrayItem:!0,arrayItemType:u.options.tupleItems>u.items.length?"tuple":"list",items:P,options:{removable:u.options.removable!==!1},dataPointer:u.dataPointer+"/-",type:"section",widget:n.getWidget("section")})}else u.items[0].arrayItem=!0,u.items[0].dataPointer||(u.items[0].dataPointer=k.toGenericPointer(b,e.arrayMap)),k.has(u,"/items/0/options/removable")||(u.items[0].options.removable=!0),u.options.orderable===!1&&(u.items[0].options.orderable=!1),u.items[0].arrayItemType=u.options.tupleItems?"tuple":"list";if(R(u.items)){let P=u.items.filter(T=>T.type!=="$ref").length-u.options.tupleItems;P>u.options.listItems&&(u.options.listItems=P,I.set("listItems",P))}if(E(e.layoutRefLibrary,b)||(e.layoutRefLibrary[b]=(0,xe.default)(u.items[u.items.length-1]),w&&(e.layoutRefLibrary[b].recursiveReference=!0),pn(e.layoutRefLibrary[b],(P,T)=>{E(P,"_id")&&(P._id=null),w&&E(P,"dataPointer")&&(P.dataPointer=P.dataPointer.slice(b.length))},"top-down")),!u.recursiveReference||u.options.required){let P=Math.min(Math.max(u.options.tupleItems+u.options.listItems,R(p)?p.length:0),u.options.maxItems);for(let T=u.items.length;T<P;T++)u.items.push(Wc({$ref:b,dataPointer:u.dataPointer,recursiveReference:u.recursiveReference},e,n))}if(u.options.addable!==!1&&u.options.minItems<u.options.maxItems&&(u.items[u.items.length-1]||{}).type!=="$ref"){let P="Add";if(u.options.title)/^add\b/i.test(u.options.title)?P=u.options.title:P+=" "+u.options.title;else if(u.name&&!/^\d+$/.test(u.name))/^add\b/i.test(u.name)?P+=" "+ji(u.name):P=ji(u.name);else{let T=zee(e.schema,u.dataPointer,"parentSchema");if(E(T,"title"))P+=" to "+T.title;else{let J=k.parse(u.dataPointer);P+=" to "+ji(J[J.length-2])}}u.items.push({_id:(0,qi.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:u.dataPointer+"/-",options:{listItems:u.options.listItems,maxItems:u.options.maxItems,minItems:u.options.minItems,removable:!1,title:P,tupleItems:u.options.tupleItems},recursiveReference:w,type:"$ref",widget:n.getWidget("$ref"),$ref:b}),Ye(k.get(u,"/style/add"))&&(u.items[u.items.length-1].options.fieldStyle=u.style.add,delete u.style.add,ye(u.style)&&delete u.style)}}else u.arrayItem=!1}else if(E(u,"type")||E(u,"items")){let p=k.get(e.layout,l,0,-2).type;E(u,"type")||(u.type=gt(p,["tabs","tabarray"])?"tab":"array"),u.arrayItem=p==="array",u.widget=n.getWidget(u.type),tl(u,{},e)}return u.type==="submit"&&(t=!0),u});if(e.hasRootReference){let r=(0,xe.default)(i);r[r.length-1].type==="submit"&&r.pop(),e.layoutRefLibrary[""]={_id:null,dataPointer:"",dataType:"object",items:r,name:"",options:(0,xe.default)(e.formOptions.defaultWidgetOptions),recursiveReference:!0,required:!1,type:"section",widget:n.getWidget("section")}}return t||i.push({_id:(0,qi.default)(),options:{title:"Submit"},type:"submit",widget:n.getWidget("submit")}),i}function Yee(e,n){let t=Qee(e,n);if(e.formValues){let i=Xee({builtLayout:t,formData:e.formValues})}return t}function Xee(e){let{builtLayout:n,formData:t}=e,i={},r=function(p,m,g){if((0,ts.default)(p)){g&&g(p,m),p.forEach((w,C)=>{g&&g(w,m+"/"+C),r(w,m+"/"+C,g)});return}if((0,t$.default)(p)){g&&g(p,m),Object.keys(p).forEach(w=>{g&&g(p[w],m+"/"+w),r(p[w],m+"/"+w,g)});return}};r(t,"",(p,m)=>{(0,ts.default)(p)&&(i[m]=i[m]||p.length)});let s=p=>{let{data:m,dataPointer:g,indexArray:w}=p,C=0,I=g.substring(1).split("/").map((P,T)=>P=="-"&&w[C]!=null?w[C++]:P).join("/");return I="/"+I,i[I]},l=p=>{let m={type:"section",recursiveReference:!1,items:[]};return(0,xe.default)(p)},u=p=>{let{builtLayout:m,indices:g,parentDataPointer:w,indexPos:C}=p;if(g=g||[],C=C??(C=-1),(0,ts.default)(m)){m.forEach((b,P)=>{u({builtLayout:b,indices:g,indexPos:C,parentDataPointer:w})});return}let I=["array"];if(m.items&&I.indexOf(m.dataType)>=0&&m.dataPointer&&!m.recursiveReference){let b=s({data:t,dataPointer:m.dataPointer,indexArray:g}),P=m.items.length;m.items.forEach(J=>{J.type&&J.type=="$ref"&&P--});let T=m.options?.listItems;if(P=Math.max(P,0),P<Math.max(b,T)){let J=Math.max(b,T)-P;P==0&&m.items[0].recursiveReference&&(J=0);for(let W=0;W<J;W++){let M=m.items[0].type&&m.items[0].type=="$ref"?l(m.items[0]):(0,xe.default)(m.items[0]);M._id=(0,qi.default)("new_"),m.items.unshift(M)}}else if(P>Math.max(b,T)){let J=P-Math.max(b,T);for(let W=0;W<J;W++)m.items.pop()}m.options.listItems&&(m.options.listItems=b),g[m.dataPointer]=g[m.dataPointer]||-1,C++,m.items.forEach((J,W)=>{g[C]=W,u({builtLayout:J,indices:g,parentDataPointer:m.dataPointer,indexPos:C})}),C--}else m.items&&m.items.forEach((b,P)=>{u({builtLayout:b,indices:g,parentDataPointer:w,indexPos:C})})};return u({builtLayout:n}),n}function xn(e,n,t=null,i="",r="",s=!1,l=null,u=null,d=!1,p="",m){function g(Z,M,U,z,K){if(Z){let oe=K&&K.isITEItem&&K.options.condition;if(oe)return;R(Z)?Z.forEach(fe=>{fe.isITEItem=!0,fe.options.condition=oe?null:ZT(C,fe,z),g(fe,M,U,z,Z)}):E(Z,"items")?g(Z.items,M,U,z,Z):(Z.isITEItem=!0,Z.options.condition=oe?null:ZT(C,Z,z))}}let w=m||e.schema,C=k.get(w,i);if(!E(C,"type")&&!E(C,"$ref")&&!E(C,"x-schema-form")&&!E(C,"if")&&!E(C,"then")&&!E(C,"else"))return null;let I=Pg(C);!ze(t)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&ye(e.formValues))&&(t=k.get(w,i+"/default"));let b={_id:d?null:(0,qi.default)(),arrayItem:s,dataPointer:k.toGenericPointer(r,e.arrayMap),dataType:C.type||(E(C,"$ref")?"$ref":null),options:{},required:zc(w,i),type:I,widget:n.getWidget(I)},P=k.toKey(b.dataPointer);P!=="-"&&(b.name=P),b.arrayItem&&(b.arrayItemType=l,b.options.removable=u!==!1);let T=Ht(p+r,e.dataRecursiveRefMap,e.arrayMap),J=!T.length||T!==p+r;e.dataMap.has(T)||e.dataMap.set(T,new Map),tl(b,C,e);let W=e.dataMap.get(T);if(W.has("inputType")||(W.set("schemaPointer",i),W.set("inputType",b.type),W.set("widget",b.widget),W.set("disabled",!!b.options.disabled)),!b.options.title&&b.name&&!/^\d+$/.test(b.name)&&(b.options.title=ji(b.name)),b.dataType==="object"){if(R(C.required)&&!W.has("required")&&W.set("required",C.required),B(C.properties)){let Z=[],M=C["ui:order"]||Object.keys(C.properties);if(M.includes("*")&&!E(C.properties,"*")){let U=Object.keys(C.properties).filter(z=>!M.includes(z));for(let z=M.length-1;z>=0;z--)M[z]==="*"&&M.splice(z,1,...U)}M.filter(U=>E(C.properties,U)||E(C,"additionalProperties")).forEach(U=>{let z=E(C.properties,U)?"/properties/"+U:"/additionalProperties",K=xn(e,n,B(t)?t[U]:null,i+z,r+"/"+U,!1,null,null,d,p);K&&(K.schemaPointer=i+z,zc(C,"/"+U)&&(K.options.required=!0,e.fieldsRequired=!0),Z.push(K))}),["allOf","anyOf","oneOf"].forEach(U=>{if(E(C,U)&&R(C[U])){let z;U=="oneOf"&&(z=xn(e,n,C.oneOf,"/",r,!1,null,null,d,p,{type:"one-of",items:C.oneOf,oneOf:C.oneOf}),Z.push(z)),C[U].forEach((K,oe)=>{let fe=`/${U}/${oe}`,qe=xn(e,n,K,i+fe,r,!1,null,null,U=="oneOf",p);if(qe)if(qe.items&&qe.items.forEach(Ke=>{let lt=E(K,"properties")?"/properties/"+Ke.name:Ke.name,li={anyOf:"anyOfPointer",oneOf:"oneOfPointer"}[U];Ke[li]=li?Ke.schemaPointer:void 0}),R(qe)){let Ke=(0,xe.default)(b);qe.forEach(lt=>{let li=E(K,"properties")?"/properties/"+lt.name:lt.name;U=="anyOf"&&(lt.anyOfPointer=lt.schemaPointer),z?(Ke.items=Ke.items||[],Ke.items.push(lt)):Z.push(lt)}),z&&(z.items=z.items||[],z.items.push(Ke))}else if(z){let Ke={anyOf:"anyOfPointer",oneOf:"oneOfPointer"}[U];qe[Ke]=Ke?i+fe:void 0,z.items=z.items||[],z.items.push(qe)}else Z.push(qe)})}}),E(C,"if")&&["then","else"].forEach(U=>{if(E(C,U)){let z=`/${U}`,K=U=="else",oe=xn(e,n,t[U],i+z,r,!1,null,null,d,p);oe&&(g(oe,i,z,K),R(oe)?oe.forEach(fe=>{Z.push(fe)}):Z.push(oe))}}),r===""&&!d?b=Z:b.items=Z}}else if(b.dataType==="array"){b.items=[],b.options.maxItems=Math.min(C.maxItems||1e3,b.options.maxItems||1e3),b.options.minItems=Math.max(C.minItems||0,b.options.minItems||0),!b.options.minItems&&zc(w,i)&&(b.options.minItems=1),E(b.options,"listItems")||(b.options.listItems=1),b.options.tupleItems=R(C.items)?C.items.length:0,b.options.maxItems<=b.options.tupleItems?(b.options.tupleItems=b.options.maxItems,b.options.listItems=0):b.options.maxItems<b.options.tupleItems+b.options.listItems?b.options.listItems=b.options.maxItems-b.options.tupleItems:b.options.minItems>b.options.tupleItems+b.options.listItems&&(b.options.listItems=b.options.minItems-b.options.tupleItems),W.has("maxItems")||(W.set("maxItems",b.options.maxItems),W.set("minItems",b.options.minItems),W.set("tupleItems",b.options.tupleItems),W.set("listItems",b.options.listItems)),e.arrayMap.has(T)||e.arrayMap.set(T,b.options.tupleItems),u=b.options.removable!==!1;let Z=null;if(R(C.items)){b.items=[];for(let M=0;M<b.options.tupleItems;M++){let U,z=Ht(T+"/"+M,e.dataRecursiveRefMap,e.arrayMap),K=!z.length||z!==T+"/"+M;if(u&&M>=b.options.minItems){let oe=`${z}@${i}`,fe=z;E(e.layoutRefLibrary,z)&&!E(e.layoutRefLibrary,oe)&&(e.layoutRefLibrary[oe]=xn(e,n,R(t)?t[M]:null,i+"/items/"+M,K?"":r+"/"+M,!0,"tuple",!0,!0,K?r+"/"+M:""),fe=oe),E(e.layoutRefLibrary,z)||(e.layoutRefLibrary[z]=null,e.layoutRefLibrary[z]=xn(e,n,R(t)?t[M]:null,i+"/items/"+M,K?"":r+"/"+M,!0,"tuple",!0,!0,K?r+"/"+M:""),K&&(e.layoutRefLibrary[z].recursiveReference=!0),e.layoutRefLibrary[oe]=e.layoutRefLibrary[z]),U=Wc({$ref:fe,dataPointer:r+"/"+M,recursiveReference:K},e,n,R(t)?t[M]:null)}else U=xn(e,n,R(t)?t[M]:null,i+"/items/"+M,r+"/"+M,!0,"tuple",!1,d,p);U&&b.items.push(U)}B(C.additionalItems)&&(Z=i+"/additionalItems")}else B(C.items)&&(Z=i+"/items");if(Z){let M=Ht(T+"/-",e.dataRecursiveRefMap,e.arrayMap),U=!M.length||M!==T+"/-",z=Ht(Z,e.schemaRecursiveRefMap,e.arrayMap),K=`${M}@${i}`,oe=M;if(E(e.layoutRefLibrary,M)&&!E(e.layoutRefLibrary,K)&&(e.layoutRefLibrary[K]=xn(e,n,null,z,U?"":r+"/-",!0,"list",u,!0,U?r+"/-":""),oe=K),M.length&&!E(e.layoutRefLibrary,M)&&(e.layoutRefLibrary[M]=null,e.layoutRefLibrary[M]=xn(e,n,null,z,U?"":r+"/-",!0,"list",u,!0,U?r+"/-":""),U&&(e.layoutRefLibrary[M].recursiveReference=!0),e.layoutRefLibrary[K]=e.layoutRefLibrary[M]),!U||b.options.required){let fe=Math.min(Math.max(U?0:b.options.tupleItems+b.options.listItems,R(t)?t.length:0),b.options.maxItems);if(b.items.length<fe)for(let qe=b.items.length;qe<fe;qe++)b.items.push(Wc({$ref:oe,dataPointer:r+"/-",recursiveReference:U},e,n,R(t)?t[qe]:null))}if(b.options.addable!==!1&&b.options.minItems<b.options.maxItems&&(b.items[b.items.length-1]||{}).type!=="$ref"){let fe=((e.layoutRefLibrary[M]||{}).options||{}).title,qe=fe?"Add ":"Add to ";fe||(fe=C.title||ji(k.toKey(r))),/^add\b/i.test(fe)||(fe=qe+fe),b.items.push({_id:(0,qi.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:b.dataPointer+"/-",options:{listItems:b.options.listItems,maxItems:b.options.maxItems,minItems:b.options.minItems,removable:!1,title:fe,tupleItems:b.options.tupleItems},recursiveReference:U,type:"$ref",widget:n.getWidget("$ref"),$ref:oe})}}}else if(b.dataType==="$ref"){let Z=k.compile(C.$ref),M=k.toDataPointer(Z,w),U="";if(b.options.add)U=b.options.add;else if(b.name&&!/^\d+$/.test(b.name))U=(/^add\b/i.test(b.name)?"":"Add ")+ji(b.name);else{let z=k.get(w,i,0,-1);if(E(z,"title"))U="Add to "+z.title;else{let K=k.parse(b.dataPointer);U="Add to "+ji(K[K.length-2])}}if(Object.assign(b,{recursiveReference:!0,widget:n.getWidget("$ref"),$ref:M}),Object.assign(b.options,{removable:!1,title:U}),ct(k.get(w,i,0,-1).maxItems)&&(b.options.maxItems=k.get(w,i,0,-1).maxItems),M.length)if(E(e.layoutRefLibrary,M))e.layoutRefLibrary[M].recursiveReference||(e.layoutRefLibrary[M].recursiveReference=!0);else{e.layoutRefLibrary[M]=null;let z=xn(e,n,null,Z,"",b.arrayItem,b.arrayItemType,!0,!0,r);z?(z.recursiveReference=!0,e.layoutRefLibrary[M]=z):delete e.layoutRefLibrary[M]}}else if(b.type==="if"){let Z=[];["then","else"].forEach(M=>{if(E(C,M)){let U=`/${M}`,z=M=="else",K=xn(e,n,t[M],i+U,r,!1,null,null,d,p);K&&(g(K,i,U,z),R(K)?K.forEach(oe=>{Z.push(oe)}):Z.push(K))}}),b=Z}return b}function s$(e,n,t="",i=e){let r=0,s=[];return pn(e,(l,u)=>{let d=+u+r,p=t+"/"+d,m=Vc(l),g=[];B(l)&&(E(l,"tabs")&&(l.items=l.tabs,delete l.tabs),E(l,"items")&&(g=R(l.items)?l.items:[l.items])),g.length&&(m.items=s$(g,n,p+"/items",i)),m=n(m,d,p,i),ze(m)?(R(m)&&(r+=m.length-1),s=s.concat(m)):r--}),s}function Wc(e,n,t=null,i=null){if(e.recursiveReference&&t){let r=(0,xe.default)(e);return r.options||(r.options={}),Object.assign(r,{recursiveReference:!0,widget:t.getWidget("$ref")}),Object.assign(r.options,{removable:!1,title:"Add "+r.$ref}),r}else{let r=n.layoutRefLibrary[e.$ref];return ze(i)?r=xn(n,t,i,k.toSchemaPointer(e.$ref,n.schema),e.$ref,r.arrayItem,r.arrayItemType,r.options.removable,!1):(r=(0,xe.default)(r),k.forEachDeep(r,(s,l)=>{E(s,"_id")&&(s._id=(0,qi.default)()),e.recursiveReference&&E(s,"dataPointer")&&(s.dataPointer=e.dataPointer+s.dataPointer)})),r}}function rl(e,n,t=!0,i=!0){let r=[],s=!1;if(e)if(R(e))if(n){for(let l of Object.keys(e))if(B(e[l])){let u=e[l].value;if(n.includes(u)){let d=e[l].name;r.push({name:d,value:u}),u==null&&(s=!0)}}else if(Ye(e[l])&&l<n.length){let u=e[l],d=n[l];r.push({name:u,value:d}),d==null&&(s=!0)}}else r=e,t||(s=!!r.filter(l=>l.value===void 0||l.value===null).length);else if(n)for(let l of Object.keys(n)){let u=n[l];if(E(e,u)){let d=e[u];r.push({name:d,value:u}),u==null&&(s=!0)}}else for(let l of Object.keys(e)){let u=e[l];r.push({name:u,value:l}),l==null&&(s=!0)}else if(n)for(let l of Object.keys(n)){let u=n[l],d=n[l];r.push({name:u,value:d}),d==null&&(s=!0)}else r=[{name:"True",value:!0},{name:"False",value:!1}];return r.some(l=>E(l,"group"))&&(s=!1,i?r=r.reduce((l,u)=>(E(u,"group")?(R(u.items)&&(l=[...l,...u.items.map(d=>Ve(re({},d),{name:`${u.group}: ${d.name}`}))],u.items.some(d=>d.value===void 0||d.value===null)&&(s=!0)),E(u,"name")&&E(u,"value")&&(u.name=`${u.group}: ${u.name}`,delete u.group,l.push(u),(u.value===void 0||u.value===null)&&(s=!0))):(l.push(u),(u.value===void 0||u.value===null)&&(s=!0)),l),[]):r=r.reduce((l,u)=>(E(u,"group")?(u.group!==(l[l.length-1]||{}).group&&l.push({group:u.group,items:u.items||[]}),E(u,"name")&&E(u,"value")&&(l[l.length-1].items.push({name:u.name,value:u.value}),(u.value===void 0||u.value===null)&&(s=!0))):(l.push(u),(u.value===void 0||u.value===null)&&(s=!0)),l),[])),!t&&!s&&r.unshift({name:"<em>None</em>",value:null}),r}var We=(()=>{class e{setDraggableState(t){this.draggableStateSubject.next(t)}createAjvInstance(t){let i=new xg.default(t);return i.addMetaSchema(Uh),i.addMetaSchema(Wh),(0,Cg.default)(i),i}createAndRegisterAjvInstance(t,i){let r=i||`ajv_${Date.now()}`;if(this.ajvRegistry[r])throw new Error(`ajv instance with name:'${r}' has already been registered`);let s=this.createAjvInstance(t);return this.ajvRegistry[r]={name:r,ajvInstance:s,ajvValidator:null},this.ajvRegistry[r]}getAjvInstance(t="default"){return this.ajvRegistry[t].ajvInstance}getAjvValidator(t="default"){return this.ajvRegistry[t]?.ajvValidator}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}constructor(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.ajvOptions={allErrors:!0,strict:!1},this.ajv=(0,n$.default)(new xg.default(this.ajvOptions),["uniqueItemProperties","dynamicDefaults"]),this.validateFormData=null,this.formValues={},this.data={},this.schema={},this.layout=[],this.formGroupTemplate={},this.formGroup=null,this.framework=null,this.validData=null,this.isValid=null,this.ajvErrors=null,this.validationErrors=null,this.dataErrors=new Map,this.formValueSubscription=null,this.dataChanges=new Ae,this.isValidChanges=new Ae,this.validationErrorChanges=new Ae,this.arrayMap=new Map,this.dataMap=new Map,this.dataRecursiveRefMap=new Map,this.schemaRecursiveRefMap=new Map,this.schemaRefLibrary={},this.layoutRefLibrary={"":null},this.templateRefLibrary={},this.hasRootReference=!1,this.language="en-US",this.defaultFormOptions={autocomplete:!0,addSubmit:"auto",debug:!1,disableInvalidSubmit:!0,formDisabled:!1,formReadonly:!1,fieldsRequired:!1,framework:"no-framework",loadExternalAssets:!1,pristine:{errors:!0,success:!0},supressPropertyTitles:!1,setSchemaDefaults:"auto",setLayoutDefaults:"auto",validateOnRender:"auto",widgets:{},defaultWidgetOptions:{listItems:1,addable:!0,orderable:!0,removable:!0,enableErrorState:!0,enableSuccessState:!0,feedback:!1,feedbackOnRender:!1,notitle:!1,disabled:!1,readonly:!1,returnEmptyFields:!0,validationMessages:{}},validationDebounceMs:50},this.zone=N(bn),this.templateCache=new Map,this.lodashConfig={interpolate:/{{([\s\S]+?)}}/g},this.etaConfig={tags:["{{","}}"],cache:!0,functionHeader:"const value=it.value, values=it.values,tpldata=it.tpldata,idx=it.idx,$index=it.$index"},this.evalFunctionCache=new Map,this.draggableStateSubject=new fo(!0),this.draggableState$=this.draggableStateSubject.asObservable(),this.ajvRegistry={},this.setLanguage(this.language),this.ajv.addMetaSchema(Uh),this.ajv.addMetaSchema(Wh),(0,Cg.default)(this.ajv),this.ajvRegistry.default={name:"default",ajvInstance:this.ajv,ajvValidator:null};let t="{{",i="}}";this.tagPresenceRegex=new RegExp(`${t}.+?${i}`),this.eta=new pP(this.etaConfig)}ngOnDestroy(){this.fcValueChangesSubs?.unsubscribe(),this.fcStatusChangesSubs?.unsubscribe(),this.formValueSubscription?.unsubscribe(),this.fcValueChangesSubs=null,this.fcStatusChangesSubs=null,this.formValueSubscription=null}setLanguage(t="en-US"){this.language=t;let i={de:Cee,en:xee,es:Iee,fr:See,it:Dee,pt:Eee,zh:Pee},r=t.slice(0,2),s=i[r];this.defaultFormOptions.defaultWidgetOptions.validationMessages=(0,xe.default)(s)}getData(){return this.data}getSchema(){return this.schema}getLayout(){return this.layout}resetAllValues(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.validateFormData=null,this.formValues={},this.schema={},this.layout=[],this.formGroupTemplate={},this.formGroup=null,this.framework=null,this.data={},this.validData=null,this.isValid=null,this.validationErrors=null,this.arrayMap=new Map,this.dataMap=new Map,this.dataRecursiveRefMap=new Map,this.schemaRecursiveRefMap=new Map,this.layoutRefLibrary={},this.schemaRefLibrary={},this.templateRefLibrary={},this.formOptions=(0,xe.default)(this.defaultFormOptions),this.ajvRegistry={},this.ajvRegistry.default={name:"default",ajvInstance:this.ajv,ajvValidator:null},this.templateCache.clear(),this.evalFunctionCache.clear()}buildRemoteError(t){pn(t,(i,r)=>{if(r in this.formGroup.controls)for(let s of i){let l={};l[s.code]=s.message,this.formGroup.get(r).setErrors(l,{emitEvent:!0})}})}validateData(t,i=!0,r="default"){this.data=Jee(t,this.dataMap,this.dataRecursiveRefMap,this.arrayMap,this.formOptions.returnEmptyFields),this.isValid=this.getAjvValidator(r)(this.data),this.validData=this.isValid?this.data:null;let s=l=>{let u={};return(l||[]).forEach(d=>{let p=d.instancePath||"ROOT";u[p]||(u[p]=[]),u[p].push(d.message)}),u};this.ajvErrors=this.getAjvValidator(r).errors,this.validationErrors=s(this.ajvErrors),i&&(this.dataChanges.next(this.data),this.isValidChanges.next(this.isValid),this.validationErrorChanges.next(this.ajvErrors))}buildFormGroupTemplate(t=null,i=!0){this.formGroupTemplate=Cn(this,t,i)}buildFormGroup(t){if(this.formGroup=il(this.formGroupTemplate),this.formGroup){this.compileAjvSchema(t),this.validateData(this.formGroup.getRawValue(),!0,t),this.formValueSubscription&&this.formValueSubscription.unsubscribe();let i=this.formOptions&&this.formOptions.validationDebounceMs||50;this.formValueSubscription=this.formGroup.valueChanges.pipe(y0(i),Os((r,s)=>(0,fn.default)(r,s))).subscribe(()=>{this.validateData(this.formGroup.getRawValue(),!0,t)})}}buildLayout(t){this.layout=Yee(this,t)}setOptions(t){if(B(t)){let i=(0,xe.default)(t);B(i.defaultOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,i.defaultOptions),delete i.defaultOptions),B(i.defaultWidgetOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,i.defaultWidgetOptions),delete i.defaultWidgetOptions),Object.assign(this.formOptions,i);let r=this.formOptions.defaultWidgetOptions;["ErrorState","SuccessState"].filter(s=>E(r,"disable"+s)).forEach(s=>{r["enable"+s]=!r["disable"+s],delete r["disable"+s]})}}compileAjvSchema(t="default"){let i=this.getAjvValidator(t);i||(Array.isArray(this.schema.properties["ui:order"])&&(this.schema["ui:order"]=this.schema.properties["ui:order"],delete this.schema.properties["ui:order"]),this.getAjvInstance(t).removeSchema(this.schema),i=this.getAjvInstance(t).compile(this.schema),this.ajvRegistry[t].ajvValidator=i)}buildSchemaFromData(t,i=!1){if(t)return Eg(t,i);this.schema=Eg(this.formValues,i)}buildSchemaFromLayout(t){if(t)return void 0;this.schema=(this.layout,void 0)}setTpldata(t={}){this.tpldata=t}parseText(t="",i={},r={},s=null){if(!t)return t;let l=this.templateCache.get(t);if(!l)try{let p=t.replace(/{{/g,"{{=");l=this.eta.compile(p,this.etaConfig),this.templateCache.set(t,l)}catch(p){return console.error("Error compiling template:",p),t}let u=typeof s=="number"?s+1:s,d={value:i,values:r,tpldata:this.tpldata,idx:u,$index:u};try{return l.call(this.eta,d,this.etaConfig)}catch(p){return console.error("Error during template execution:",p),t}}parseExpression(t="",i={},r={},s=null,l=null){if(typeof t!="string"||!t.trim())return"";let u=typeof s=="number"?s+1:s,d={value:i,values:r,tpldata:l||this.tpldata,idx:u,$index:u},p=`{{ ${t.trim()} }}`;try{let m=this.templateCache.get(p);if(!m)try{m=(0,QT.default)(p,this.lodashConfig),this.templateCache.set(p,m)}catch(g){return console.error("Error compiling template:",g),p}try{return m(d)}catch(g){return console.error("Error during template execution:",g),p}}catch(m){return console.error(`Error evaluating expression "${t}":`,m),""}}setArrayItemTitle(t={},i=null,r=null){let s={layoutNode:()=>B(t.layoutNode)?t.layoutNode:t.layoutNode(),dataIndex:()=>B(t.dataIndex)?t.dataIndex:t.dataIndex()},l=s.layoutNode();if(l.options.buttonText)return l.options.buttonText;let u=this.getFormControlValue(s),d=(l.type||"").slice(-5)==="array"&&R(u),p=k.getFirst(d&&i.type!=="$ref"?[[i,"/options/legend"],[i,"/options/title"],[l,"/options/title"],[l,"/options/legend"]]:[[i,"/options/title"],[i,"/options/legend"],[l,"/options/title"],[l,"/options/legend"]]);if(!p)return p;let m=R(u)&&r<u.length?u[r]:u;return this.parseText(p,m,u,r)}setItemTitle(t){return!t.options.title&&/^(\d+|-)$/.test(t.layoutNode().name)?null:this.parseText(t.options.title||r$(t.layoutNode().name),this.getFormControlValue(t),(this.getFormControlGroup(t)||{}).value,t.dataIndex()[t.dataIndex().length-1])}getItemTitleContext(t){return{value:this.getFormControlValue(t),values:(this.getFormControlGroup(t)||{}).value,key:t.dataIndex()[t.dataIndex().length-1]}}evaluateCondition(t,i){let r=t.options?.condition;if(!de(r))return!0;if(typeof r=="string")return this.evaluateStringCondition(r,i);if(typeof r=="function")try{return r(this.data)}catch(s){return console.error("Condition function errored out:",s),!0}if(typeof r=="object"&&(typeof r?.functionBody=="string"||typeof r?.functionBodyRaw=="string")){let s={functionBody:r.functionBodyRaw||r.functionBody.replace(/\[/g,".[").split(".").join("?.").replace(/\?\?\./g,"?").replace(/(\?)(\.\[)/g,"[")};return this.evaluateFunctionBodyCondition(s,i)}return!0}evaluateStringCondition(t,i){let r=i?.[i.length-1];de(r)&&(t=t.replace("[arrayIndex]",`[${r}]`));let s=k.parseObjectPath(t);return!!k.get(this.data,s)}evaluateFunctionBodyCondition(t,i){try{return this._getFunctionFromBody(t.functionBody)(this.data,i)}catch(r){return console.error("condition functionBody errored out on evaluation: "+t.functionBody,r),!0}}evaluateConditionAsync(t,i){let r=this.evaluateCondition(t,i);return nu(r)}_getFunctionFromBody(t){let i=`${t}`;if(!this.evalFunctionCache.has(i)){let r=new Function("model","arrayIndices",t);this.evalFunctionCache.set(i,r)}return this.evalFunctionCache.get(i)}initializeControl(t,i=!0){if(!B(t))return!1;let r=t.layoutNode();if(ye(t.options)&&(t.options=ye((r||{}).options)?(0,xe.default)(this.formOptions):r.options),t.formControl=this.getFormControl(t),(r?.schemaPointer&&r.isITEItem||r?.schemaPointer&&r?.oneOfPointer||r?.schemaPointer&&r.anyOfPointer)&&(this.dataMap.get(r?.dataPointer).get("schemaType")!=r.dataType&&this.dataMap.get(r?.dataPointer).set("schemaType",r.dataType),this.setFormControl(t,t.formControl)),t.boundControl=i&&!!t.formControl,t.formControl)t.controlName=this.getFormControlName(t),t.controlValue=t.formControl.value,t.controlDisabled=t.formControl.disabled,t.options.errorMessage=t.formControl.status==="VALID"?null:this.formatErrors(t.formControl.errors,t.options.validationMessages),t.options.showErrors=this.formOptions.validateOnRender===!0||this.formOptions.validateOnRender==="auto"&&de(t.controlValue),this.fcStatusChangesSubs=t.formControl.statusChanges.subscribe(l=>t.options.errorMessage=l==="VALID"?null:this.formatErrors(t.formControl.errors,t.options.validationMessages)),this.fcValueChangesSubs=t.formControl.valueChanges.subscribe(l=>{(0,fn.default)(t.controlValue,l)||(t.controlValue=l)});else{t.controlName=r.name,t.controlValue=r.value||null;let l=this.getDataPointer(t);i&&l&&console.error(`warning: control "${l}" is not bound to the Angular FormGroup.`)}let s=r?.schemaPointer?.split("/").some(l=>["then","else"].includes(l));if(t.options?.condition||r?.oneOfPointer||r?.anyOfPointer||s){let l=this.getDataPointer(t),u=t.formControl?.value,d=k.has(this.data,l)?k.get(this.data,l):void 0,p=k.has(this.formValues,l)?k.get(this.formValues,l):void 0,m=t.options?.default,g=this.formValues&&(0,fn.default)(p,u)||!this.formValues&&(0,fn.default)(m,u)?d:m;t.formControl?.patchValue(g)}return t.boundControl}formatErrors(t,i={}){if(ye(t))return null;B(i)||(i={});let r=u=>u[0].toUpperCase()+(u.slice(1)||"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," "),s=u=>typeof u=="object"?Object.keys(u).map(d=>u[d]===!0?r(d):u[d]===!1?"Not "+r(d):r(d)+": "+s(u[d])).join(", "):r(u.toString()),l=[];return Object.keys(t).filter(u=>u!=="required"||Object.keys(t).length===1).map(u=>typeof i=="string"?i:typeof i[u]=="function"?i[u](t[u]):typeof i[u]=="string"?/{{.+?}}/.test(i[u])?Object.keys(t[u]).reduce((d,p)=>d.replace(new RegExp("{{"+p+"}}","g"),t[u][p]),i[u]):i[u]:r(u)+" Error: "+s(t[u])).join("<br>")}updateValue(t,i){if(t.controlValue=i,t.boundControl&&(t.formControl.setValue(i),t.formControl.markAsDirty()),t.layoutNode().value=i,R(t.options.copyValueTo))for(let r of t.options.copyValueTo){let s=this.formGroup&&Lc(this.formGroup,r);B(s)&&typeof s.setValue=="function"&&(s.setValue(i),s.markAsDirty())}}updateArrayCheckboxList(t,i){let r=this.getFormControl(t);for(;r.value.length;)r.removeAt(0);let s=Ht(t.layoutNode().dataPointer+"/-",this.dataRecursiveRefMap,this.arrayMap);for(let l of i)if(l.checked){let u=il(this.templateRefLibrary[s]);u.setValue(l.value),r.push(u)}r.markAsDirty()}updateArrayMultiSelectList(t,i){this.updateArrayCheckboxList(t,i)}getFormControl(t){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||t.layoutNode().type==="$ref")return null;let i=t.layoutNode()?.isITEItem?t.layoutNode()?.schemaPointer:null,r=t.layoutNode()?.oneOfPointer,s=t.layoutNode()?.anyOfPointer;return Lc(this.formGroup,this.getDataPointer(t),!1,i||r||s)}setFormControl(t,i){return!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||t.layoutNode().type==="$ref"?null:Zee(this.formGroup,this.getDataPointer(t),i)}getFormControlValue(t){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||t.layoutNode().type==="$ref"||this.formGroup==null)return null;let i=t.layoutNode()?.isITEItem?t.layoutNode()?.schemaPointer:null,r=t.layoutNode()?.oneOfPointer,s=t.layoutNode()?.anyOfPointer,l=Lc(this.formGroup,this.getDataPointer(t),!1,i||r||s);return l?l.value:null}getFormControlGroup(t){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||this.formGroup==null)return null;let i=t.layoutNode()?.isITEItem?t.layoutNode()?.schemaPointer:null,r=t.layoutNode()?.oneOfPointer,s=t.layoutNode()?.anyOfPointer;return Lc(this.formGroup,this.getDataPointer(t),!0,i||r||s)}getFormControlName(t){return!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex())?null:k.toKey(this.getDataPointer(t))}getLayoutArray(t){return k.get(this.layout,this.getLayoutPointer(t),0,-1)}getParentNode(t){return k.get(this.layout,this.getLayoutPointer(t),0,-2)}getDataPointer(t){return!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex())?null:k.toIndexedPointer(t.layoutNode().dataPointer,t.dataIndex(),this.arrayMap)}getLayoutPointer(t){return de(t.layoutIndex())?"/"+t.layoutIndex().join("/items/"):null}isControlBound(t){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex()))return!1;let i=this.getFormControlGroup(t),r=this.getFormControlName(t);return i?E(i.controls,r):!1}addItem(t,i){if(!t||!t.layoutNode||!ze(t.layoutNode().$ref)||!de(t.dataIndex())||!de(t.layoutIndex()))return!1;let r=il(this.templateRefLibrary[t.layoutNode().$ref]);t.layoutNode().arrayItem?this.getFormControlGroup(t).push(r):this.getFormControlGroup(t).addControl(i||this.getFormControlName(t),r);let s=Wc(t.layoutNode(),this);return s.arrayItem=t.layoutNode().arrayItem,t.layoutNode().arrayItemType?s.arrayItemType=t.layoutNode().arrayItemType:delete s.arrayItemType,i&&(s.name=i,s.dataPointer+="/"+k.escape(i),s.options.title=ji(i)),k.insert(this.layout,this.getLayoutPointer(t),s),!0}moveArrayItem(t,i,r,s=!0){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex())||!de(t.layoutIndex())||!ze(i)||!ze(r)||i===r)return!1;let l=this.getFormControlGroup(t);if(i>=l.length)return!1;let u=l.at(i);if(l.removeAt(i),l.insert(r,u),l.updateValueAndValidity(),s){let d=this.getLayoutArray(t);d.splice(r,0,d.splice(i,1)[0])}return!0}removeItem(t){return!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex())||!de(t.layoutIndex())?!1:(t.layoutNode().arrayItem?this.getFormControlGroup(t).removeAt(t.dataIndex()[t.dataIndex().length-1]):this.getFormControlGroup(t).removeControl(this.getFormControlName(t)),k.remove(this.layout,this.getLayoutPointer(t)),!0)}adjustLayout(t,i,r=[0],s=[]){let l=(u,d,p)=>({layoutNode:()=>u,layoutIndex:()=>d,dataIndex:()=>p});if(t.items&&(0,ts.default)(i)){let u=l(Ve(re({},t),{$ref:t.$ref||t.items[0]?.dataPointer,dataPointer:t.items[0]?.dataPointer,arrayItem:!0,arrayItemType:"list"}),[...r.slice(0,r.length-1),t.items.length-1],[...s.slice(0,s.length-1),t.items.length-1]),d=i.length-t.items.filter(p=>p?.type!="$ref").length;if(d>0)for(let p=0;p<d;p++)this.addItem(u);else if(d<0){let p=t.items.filter(m=>m?.type!="$ref").length-i.length;for(let m=0;m<p;m++){let g=u.dataIndex(),w=g[g.length-1],C=[...r.slice(0,r.length-1),0],I=[...g.slice(0,g.length-1),0];u=l(u.layoutNode(),C,I);let b=this.removeItem(u)}}return}(0,ts.default)(t)&&t.forEach((u,d)=>{let p=u.dataPointer?k.get(i,u.dataPointer):void 0;this.adjustLayout(u,p,[...r,d],[...s,d])})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac})}}return e})(),Gc=(()=>{class e{constructor(){this.jsf=N(We),this.newComponent=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.widgetContainer=cu("widgetContainer",{read:Mn})}ngOnInit(){this.updateComponent()}ngOnChanges(t){this.updateComponent()}updateComponent(){let t=this.widgetContainer();if(t&&!this.newComponent&&(this.layoutNode()||{}).widget&&(this.newComponent=t.createComponent(this.layoutNode().widget)),this.newComponent)for(let i of["layoutNode","layoutIndex","dataIndex"])this.newComponent.setInput(i,this[i]())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["select-widget-widget"]],viewQuery:function(i,r){i&1&&lu(r.widgetContainer,$g,5,Mn),i&2&&uu()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(i,r){i&1&&le(0,"div",null,0)},encapsulation:2})}}return e})(),ete=(()=>{class e{constructor(){this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["no-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:1,vars:3,consts:[[3,"dataIndex","layoutIndex","layoutNode"]],template:function(i,r){i&1&&le(0,"select-widget-widget",0),i&2&&G("dataIndex",r.dataIndex())("layoutIndex",r.layoutIndex())("layoutNode",r.layoutNode())},dependencies:[Gc],encapsulation:2})}}return e})(),tte=(()=>{class e extends Kr{constructor(){super(...arguments),this.name="no-framework",this.text="None (plain HTML)",this.framework=ete}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=su(e)))(r||e)}})()}static{this.\u0275prov=je({token:e,factory:e.\u0275fac})}}return e})(),a$=(()=>{class e{constructor(t,i){this.renderer=t,this.elementRef=i}ngOnChanges(t){if(t.attributes)for(let i in this.attributes){let r=this.attributes[i];r?this.renderer.setAttribute(this.elementRef.nativeElement,i,r):this.renderer.removeAttribute(this.elementRef.nativeElement,i)}}static{this.\u0275fac=function(i){return new(i||e)(Rs(au),Rs(xt))}}static{this.\u0275dir=mt({type:e,selectors:[["","attributes",""]],inputs:{attributes:"attributes"},standalone:!1,features:[Nt]})}}return e})(),ol=(()=>{class e{constructor(t,i){this.el=t,this.renderer=i,this.events=[],this.unsubscribeFunctions=[]}ngOnInit(){(this.events.length>0?this.events:["mousedown"]).forEach(i=>{let r=this.renderer.listen(this.el.nativeElement,i,s=>{s.stopPropagation()});this.unsubscribeFunctions.push(r)})}ngOnDestroy(){this.unsubscribeFunctions.forEach(t=>t())}static{this.\u0275fac=function(i){return new(i||e)(Rs(xt),Rs(au))}}static{this.\u0275dir=mt({type:e,selectors:[["","appStopPropagation",""]],inputs:{events:[0,"appStopPropagation","events"]},standalone:!1})}}return e})(),nte=(()=>{class e{constructor(){this.jsf=N(We),this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{}}get showAddButton(){return!this.layoutNode().arrayItem||this.layoutIndex()[this.layoutIndex().length-1]<this.options.maxItems}addItem(t){t.preventDefault(),this.jsf.addItem(this)}get buttonText(){let t={dataIndex:this.dataIndex().slice(0,-1),layoutIndex:this.layoutIndex().slice(0,-1),layoutNode:this.jsf.getParentNode(this)};return t.layoutNode&&(t.layoutNode.add||this.jsf.setArrayItemTitle(t,this.layoutNode(),this.itemCount))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["add-reference-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:3,consts:[["align","end"],[3,"class","disabled","appStopPropagation"],[3,"click","disabled","appStopPropagation"],[3,"class"],[3,"innerHTML"]],template:function(i,r){i&1&&(ee(0,"section",0),te(1,oX,3,7,"button",1),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.showAddButton?1:-1))},dependencies:[ol],encapsulation:2})}}return e})(),ite=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(t){typeof this.options.onClick=="function"?this.options.onClick(t):this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["button-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:13,consts:[[3,"click","disabled","name","type","value","appStopPropagation"],[3,"class","innerHTML"],[3,"innerHTML"]],template:function(i,r){if(i&1&&(ee(0,"div")(1,"button",0),Ue("click",function(l){return r.updateValue(l)}),te(2,sX,1,3,"span",1),Y()()),i&2){let s,l;X((r.options==null?null:r.options.htmlClass)||""),L(),X((r.options==null?null:r.options.fieldHtmlClass)||""),G("disabled",r.controlDisabled)("name",r.controlName)("type",(s=r.layoutNode())==null?null:s.type)("value",r.controlValue)("appStopPropagation",Zt(12,Gr)),_e("readonly",r.options!=null&&r.options.readonly?"readonly":null)("aria-describedby","control"+((l=r.layoutNode())==null?null:l._id)+"Status"),L(),ne(r.options!=null&&r.options.icon||r.options!=null&&r.options.title?2:-1)}},dependencies:[ol],encapsulation:2})}}return e})(),rte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.trueValue=!0,this.falseValue=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),(this.controlValue===null||this.controlValue===void 0)&&(this.controlValue=!1,this.jsf.updateValue(this,this.falseValue))}updateValue(t){t.preventDefault(),this.jsf.updateValue(this,t.target.checked?this.trueValue:this.falseValue)}get isChecked(){return this.jsf.getFormControlValue(this)===this.trueValue}ngOnDestroy(){this.jsf.updateValue(this,null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["checkbox-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[["type","checkbox",3,"formControl","class","id","name","readonly"],["type","checkbox",3,"checked","class","disabled","id","name","readonly","value"],[3,"display","innerHTML"],[1,"hb-uix-slider","hb-uix-round"],["type","checkbox",3,"formControl","id","name","readonly"],["type","checkbox",3,"change","checked","disabled","id","name","readonly","value"],[3,"innerHTML"]],template:function(i,r){if(i&1&&(ee(0,"label"),te(1,aX,1,7,"input",0),te(2,lX,1,9,"input",1),te(3,uX,1,3,"span",2),le(4,"span",3),Y()),i&2){let s;X((r.options==null?null:r.options.itemLabelHtmlClass)||"hb-uix-switch"),_e("for","control"+((s=r.layoutNode())==null?null:s._id)),L(),ne(r.boundControl?1:-1),L(),ne(r.boundControl?-1:2),L(),ne(r.options!=null&&r.options.title?3:-1)}},dependencies:[q0,tr,vo],encapsulation:2})}}return e})(),ote=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.checkboxList=[],this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{};let t=this.layoutNode();if(this.layoutOrientation=t.type==="checkboxes-inline"||t.type==="checkboxbuttons"?"horizontal":"vertical",this.jsf.initializeControl(this),this.checkboxList=rl(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.boundControl){let i=this.jsf.getFormControl(this);this.checkboxList.forEach(r=>r.checked=i.value.includes(r.value))}}updateValue(t){for(let i of this.checkboxList)t.target.value===i.value&&(i.checked=t.target.checked);this.boundControl&&this.jsf.updateArrayCheckboxList(this,this.checkboxList)}ngOnDestroy(){let t=[];this.formControl.reset(t),this.controlValue=null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["checkboxes-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:3,consts:[[3,"class","display","innerHTML"],[3,"class"],[3,"innerHTML"],["type","checkbox",3,"change","checked","disabled","id","name","readonly","value"],[1,"hb-uix-slider","hb-uix-round"]],template:function(i,r){i&1&&(te(0,cX,1,5,"label",0),te(1,fX,3,2,"div",1),te(2,hX,3,0,"div")),i&2&&(ne(r.options!=null&&r.options.title?0:-1),L(),ne(r.layoutOrientation==="horizontal"?1:-1),L(),ne(r.layoutOrientation==="vertical"?2:-1))},encapsulation:2})}}return e})(),ste=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["file-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:0,vars:0,template:function(i,r){},encapsulation:2})}}return e})();var ate=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.autoCompleteList=[],this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}get inputAttributes(){return this.options?.["x-inputAttributes"]}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){setTimeout(()=>{this.jsf.updateValue(this,null)})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["input-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[[3,"class","display","innerHTML"],[3,"formControl","class","id","name","readonly","type","attributes","appStopPropagation"],[3,"class","disabled","id","name","readonly","type","value","attributes","appStopPropagation"],[3,"id"],[3,"innerHTML"],[3,"formControl","id","name","readonly","type","attributes","appStopPropagation"],[3,"input","disabled","id","name","readonly","type","value","attributes","appStopPropagation"],[3,"value"]],template:function(i,r){i&1&&(ee(0,"div"),te(1,mX,1,6,"label",0),te(2,gX,1,17,"input",1),te(3,_X,1,18,"input",2),te(4,vX,3,1,"datalist",3),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.options!=null&&r.options.title?1:-1),L(),ne(r.boundControl?2:-1),L(),ne(r.boundControl?-1:3),L(),ne(!(r.options==null||r.options.typeahead==null)&&r.options.typeahead.source?4:-1))},dependencies:[fu,pu,Ns,tr,vo,a$,ol],encapsulation:2})}}return e})();var lte=(()=>{class e{constructor(){this.jsf=N(We),this.message=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.message=this.options.help||this.options.helpvalue||this.options.msg||this.options.message}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["message-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:1,vars:1,consts:[[3,"class","innerHTML"],[3,"innerHTML"]],template:function(i,r){i&1&&te(0,bX,1,3,"span",0),i&2&&ne(r.message?0:-1)},encapsulation:2})}}return e})(),ute=(()=>{class e{constructor(){this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["none-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:0,vars:0,template:function(i,r){},encapsulation:2})}}return e})(),cte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.allowNegative=!0,this.allowDecimal=!0,this.allowExponents=!1,this.lastValidNumber="",this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}get inputAttributes(){return this.options?.["x-inputAttributes"]}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),this.layoutNode().dataType==="integer"&&(this.allowDecimal=!1)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){setTimeout(()=>{this.jsf.updateValue(this,null)})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["number-widget"]],viewQuery:function(i,r){if(i&1&&Or(wX,5)(CX,5),i&2){let s;on(s=sn())&&(r.inputControl=s.first),on(s=sn())&&(r.div=s.first)}},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:6,vars:6,consts:[["divElt",""],["inputControl",""],[3,"class","display","innerHTML"],[3,"formControl","class","id","name","readonly","title","type","attributes","appStopPropagation"],[3,"class","disabled","id","name","readonly","title","type","value","attributes","appStopPropagation"],[3,"innerHTML"],[3,"formControl","id","name","readonly","title","type","attributes","appStopPropagation"],[3,"input","disabled","id","name","readonly","title","type","value","attributes","appStopPropagation"]],template:function(i,r){if(i&1&&(ee(0,"div",null,0),te(2,xX,1,6,"label",2),te(3,IX,2,18,"input",3),te(4,SX,2,19,"input",4),te(5,DX,1,1,"span",5),Y()),i&2){let s;X((r.options==null?null:r.options.htmlClass)||""),L(2),ne(r.options!=null&&r.options.title?2:-1),L(),ne(r.boundControl?3:-1),L(),ne(r.boundControl?-1:4),L(),ne(((s=r.layoutNode())==null?null:s.type)==="range"?5:-1)}},dependencies:[Ns,tr,vo,a$,ol],encapsulation:2})}}return e})(),Rg=(()=>{class e{constructor(){this.jsf=N(We),this.changeDetectorRef=N($t),this.newComponent=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.widgetContainer=cu("widgetContainer",{read:Mn})}ngOnInit(){this.updateComponent()}ngOnChanges(t){this.updateComponent()}updateComponent(){let t=this.widgetContainer();if(t&&!this.newComponent&&this.jsf.framework&&(this.newComponent=t.createComponent(this.jsf.framework)),this.newComponent)for(let i of["layoutNode","layoutIndex","dataIndex"])this.newComponent.setInput(i,this[i]())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["select-framework-widget"]],viewQuery:function(i,r){i&1&&lu(r.widgetContainer,$g,5,Mn),i&2&&uu()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(i,r){i&1&&le(0,"div",null,0)},encapsulation:2})}}return e})(),l$=(()=>{class e{constructor(){this.jsf=N(We),this.cdr=N($t),this.selectedItem=0,this.showAddTab=!0,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.options.selectedTab&&(this.selectedItem=this.options.selectedTab),this.itemCount=this.layoutNode().items.length-1,this.updateControl(),this.dataChangesSubs=this.jsf.dataChanges.subscribe(t=>{})}select(t){let i=this.layoutNode();i.items[t].type==="$ref"&&(this.itemCount=i.items.length,this.jsf.addItem({layoutNode:fi(i.items[t]),layoutIndex:fi(this.layoutIndex().concat(t)),dataIndex:fi(this.dataIndex().concat(t))}),this.updateControl()),this.selectedItem=t}updateControl(){let t=this.layoutNode().items[this.layoutNode().items.length-1];t.type==="$ref"&&this.itemCount>=(t.options.maxItems||1e3)&&(this.showAddTab=!1)}setTabTitle(t,i){return this.jsf.setArrayItemTitle(this,t,i)}ngOnDestroy(){this.dataChangesSubs?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["tabs-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:2,consts:[["role","presentation","data-tabs","",3,"class"],[3,"class"],["role","presentation","data-tabs",""],[3,"click"],["type","radio","name","tabSelection",3,"value","ngModel","class"],["type","radio","name","tabSelection",3,"ngModelChange","change","value","ngModel"],[3,"class","dataIndex","layoutIndex","layoutNode"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(i,r){if(i&1&&(ee(0,"ul"),St(1,OX,2,3,"li",0,It),Y(),St(3,NX,3,4,"div",1,It)),i&2){let s,l;X((r.options==null?null:r.options.labelHtmlClass)||""),L(),Dt((s=r.layoutNode())==null?null:s.items),L(2),Dt((l=r.layoutNode())==null?null:l.items)}},dependencies:[Ns,H0,tr,du,Rg],styles:["a[_ngcontent-%COMP%]{cursor:pointer}.ngf-hidden[_ngcontent-%COMP%]{display:none}"]})}}return e})(),dte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.options.tabMode="oneOfMode",this.options.selectedTab=this.findSelectedTab(),this.jsf.initializeControl(this)}findSelectedTab(){let t=-1;return this.layoutNode().items&&this.layoutNode().items.forEach((i,r)=>{let s=k.get(this.jsf.formValues,i.dataPointer);if(i.oneOfPointer){let l=mr(i.oneOfPointer),u=i.name;E(this.jsf.formGroup.controls,l)&&(s||o$(this.jsf.formGroup.controls[l].value))&&(t=r),t==-1&&Object.keys(this.jsf.formGroup.controls).filter(p=>p.startsWith(l)).forEach(p=>{let m=p.split("$"),g=m[m.length-1],w=this.jsf.formGroup.controls[p].value,C=k.get(this.jsf.schema,m.join("/")),b=m.join("/").replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g,"").replace(/(if|then|else|properties)\//g,"").replace(/\/items\//g,"/-/"),P=k.get(this.jsf.formValues,b),T=P;C&&C.properties&&(T=(0,Ut.isObject)(P)&&E(P,g)?(0,Ut.pick)(P[g],Object.keys(C.properties)):(0,Ut.pick)(P,Object.keys(C.properties))),(0,Ut.isEqual)(T,w)&&(t=r)})}}),Math.max(t,0)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["one-of-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:4,vars:4,consts:[["tabs",""],[3,"layoutNode","layoutIndex","dataIndex"]],template:function(i,r){i&1&&(ee(0,"h4"),wn(1),Y(),le(2,"tabs-widget",1,0)),i&2&&(L(),go(r.options==null?null:r.options.description),L(),G("layoutNode",r.layoutNode())("layoutIndex",r.layoutIndex())("dataIndex",r.dataIndex()))},dependencies:[l$],encapsulation:2})}}return e})(),fte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutOrientation="vertical",this.radiosList=[],this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{};let t=this.layoutNode();(t.type==="radios-inline"||t.type==="radiobuttons")&&(this.layoutOrientation="horizontal"),this.radiosList=rl(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.jsf.initializeControl(this)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["radios-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:3,consts:[[3,"class","display","innerHTML"],[3,"class"],[3,"innerHTML"],["type","radio",3,"change","checked","disabled","id","name","value"]],template:function(i,r){i&1&&(te(0,MX,1,6,"label",0),te(1,kX,3,2,"div",1),te(2,qX,3,0,"div")),i&2&&(ne(r.options!=null&&r.options.title?0:-1),L(),ne(r.layoutOrientation==="horizontal"?1:-1),L(),ne(r.layoutOrientation!=="horizontal"?2:-1))},encapsulation:2})}}return e})(),Ng=(()=>{class e{constructor(){this.jsf=N(We),this.cdr=N($t),this.dataIndex=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.layout=H(void 0,{}),this.isOrderable=H(void 0,{}),this.isFlexItem=H(!1,{}),this.memoizationEnabled=H(!0,{}),this.sortPredicate=(t,i)=>{let r=this.layout()[t];return this.isDraggable(r)},this._getSelectFrameworkInputsRaw=(t,i)=>{let r=this.dataIndex()||[],s=this.layoutIndex()||[];return{layoutNode:t,layoutIndex:[...s,i],dataIndex:t?.arrayItem?[...r,i]:r}},this._getSelectFrameworkInputsMemoized=(0,Ut.memoize)(this._getSelectFrameworkInputsRaw,(t,i)=>`${t?.id??JSON.stringify(t)}-${i}`),this._showWidgetRaw=t=>this.jsf.evaluateCondition(t,this.dataIndex()),this._showWidgetMemoized=(0,Ut.memoize)(this._showWidgetRaw,t=>JSON.stringify(t)+"-"+(this.dataIndex()||[]).join("-"))}drop(t){let i=t.previousIndex,r=t.currentIndex,s=this.layout()[r],l=s?.arrayItem?(this.dataIndex()||[]).concat(r):this.dataIndex()||[],u=(this.layoutIndex()||[]).concat(r),d={dataIndex:()=>l,layoutIndex:()=>u,layoutNode:()=>s};this.jsf.moveArrayItem(d,i,r,!0)}isDraggable(t){return t.arrayItem&&t.type!=="$ref"&&t.arrayItemType==="list"&&this.isOrderable()!==!1&&t.type!=="submit"}isFixed(t){return t.type=="$ref"}getFlexAttribute(t,i){let r=["flex-grow","flex-shrink","flex-basis"].indexOf(i);return((t.options||{}).flex||"").split(/\s+/)[r]||(t.options||{})[i]||["1","1","auto"][r]}getSelectFrameworkInputs(t,i){return this.memoizationEnabled?this._getSelectFrameworkInputsMemoized(t,i):this._getSelectFrameworkInputsRaw(t,i)}trackByFn(t,i){return i._id??t}ngOnChanges(t){(t.layout||t.dataIndex||t.layoutIndex)&&(this._showWidgetMemoized.cache.clear(),this._getSelectFrameworkInputsMemoized.cache.clear(),this.cdr.markForCheck())}showWidget(t){return this.memoizationEnabled?this._showWidgetMemoized(t):this._showWidgetRaw(t)}ngOnInit(){this.memoizationEnabled&&(this.dataChangesSubs=this.jsf.dataChanges.subscribe(t=>{this._showWidgetMemoized.cache.clear(),this.cdr.markForCheck()}))}ngOnDestroy(){this._getSelectFrameworkInputsMemoized.cache.clear(),this.dataChangesSubs?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["root-widget"]],inputs:{dataIndex:[1,"dataIndex"],layoutIndex:[1,"layoutIndex"],layout:[1,"layout"],isOrderable:[1,"isOrderable"],isFlexItem:[1,"isFlexItem"],memoizationEnabled:[1,"memoizationEnabled"]},standalone:!1,features:[Nt],decls:3,vars:3,consts:[["cdkDropList","",3,"cdkDropListDropped","cdkDropListSortPredicate"],["cdkDrag","",3,"cdkDragStartDelay","cdkDragDisabled","form-flex-item","align-self","flex-basis","flex-grow","flex-shrink","order"],["cdkDrag","",3,"cdkDragStartDelay","cdkDragDisabled"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(i,r){i&1&&(ee(0,"div",0),Ue("cdkDropListDropped",function(l){return r.drop(l)}),St(1,VX,2,18,"div",1,It),Y()),i&2&&(Ze("flex-inherit",!0),G("cdkDropListSortPredicate",r.sortPredicate),L(),Dt(r.layout()))},dependencies:[WP,UP,Rg],styles:["[draggable=true][_ngcontent-%COMP%]{transition:all .15s cubic-bezier(.4,0,.2,1)}[draggable=true][_ngcontent-%COMP%]:hover{cursor:move;box-shadow:2px 2px 4px #0003;position:relative;z-index:10;margin:-1px 1px 1px -1px}[draggable=true].drag-target-top[_ngcontent-%COMP%]{box-shadow:0 -2px #000;position:relative;z-index:20}[draggable=true].drag-target-bottom[_ngcontent-%COMP%]{box-shadow:0 2px #000;position:relative;z-index:20}.flex-inherit[_ngcontent-%COMP%]{display:inherit;flex-flow:inherit;flex-wrap:inherit;flex-direction:inherit;width:100%}"],changeDetection:0})}}return e})(),pte=(()=>{class e{constructor(){this.jsf=N(We)}transform(t,i){return this.jsf.parseText(t,i.value,i.values,i.key)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=S0({name:"textTemplate",type:e,pure:!0,standalone:!1})}}return e})(),hte=(()=>{class e{constructor(){this.jsf=N(We),this.expanded=!0,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.titleContext={value:{},values:{},key:null}}get sectionTitle(){return this.jsf.setItemTitle(this)}ngOnInit(){switch(this.jsf.initializeControl(this),this.options=this.layoutNode().options||{},this.expanded=typeof this.options.expanded=="boolean"?this.options.expanded:!this.options.expandable,this.layoutNode().type){case"fieldset":case"array":case"tab":case"advancedfieldset":case"authfieldset":case"optionfieldset":case"selectfieldset":this.containerType="fieldset";break;default:this.containerType="div";break}this.updateTitleContext(),this.dataChangesSubs=this.jsf.dataChanges.subscribe(t=>{this.updateTitleContext()})}toggleExpanded(){this.options.expandable&&(this.expanded=!this.expanded)}getFlexAttribute(t){let i=this.layoutNode().type==="flex"||!!this.options.displayFlex||this.options.display==="flex";if(t!=="flex"&&!i)return null;switch(t){case"is-flex":return i;case"display":return i?"flex":"initial";case"flex-direction":case"flex-wrap":let r=["flex-direction","flex-wrap"].indexOf(t);return(this.options["flex-flow"]||"").split(/\s+/)[r]||this.options[t]||["column","nowrap"][r];case"justify-content":case"align-items":case"align-content":return this.options[t]}}ngOnChanges(t){}updateTitleContext(){this.titleContext=this.jsf.getItemTitleContext(this)}ngOnDestroy(){this.dataChangesSubs?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["section-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:2,consts:[[3,"class","expandable","expanded"],[3,"class","expandable","expanded","disabled"],[1,"legend",3,"class","innerHTML"],[3,"dataIndex","layout","layoutIndex","isFlexItem","isOrderable"],[1,"legend",3,"click","innerHTML"],[3,"disabled"],[1,"help-block",3,"class","innerHTML"],[1,"help-block",3,"innerHTML"]],template:function(i,r){i&1&&(te(0,BX,3,28,"div",0),te(1,JX,5,31,"fieldset",1)),i&2&&(ne(r.containerType==="div"?0:-1),L(),ne(r.containerType==="fieldset"?1:-1))},dependencies:[Ng,pte],styles:[".legend[_ngcontent-%COMP%]{font-weight:700}.expandable[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%], .expandable[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], .expanded[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%], .expanded[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{cursor:pointer;}.expandable[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%]:before, .expandable[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{font-weight:900;font-family:'Font Awesome 7 Free';content:'\\f054';padding-right:.3em;}.expanded[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%]:before, .expanded[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{font-weight:900;font-family:'Font Awesome 7 Free';content:'\\f078';padding-right:.2em;}"]})}}return e})(),mte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.selectListFlatGroup=[],this.isArray=R,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.selectList=rl(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!!this.options.flatList),this.selectListFlatGroup=rl(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!0),this.jsf.initializeControl(this),this.valueChanges=this.formControl.valueChanges.subscribe(t=>{t==="null"&&this.formControl.setValue(null)})}ngOnDestroy(){this.valueChanges&&this.valueChanges.unsubscribe()}deselectAll(){this.selectListFlatGroup.forEach(t=>{t.checked=!1})}updateValue(t){if(this.options.showErrors=!0,this.options.multiple){this.controlValue?.includes(null)?(this.deselectAll(),this.jsf.updateArrayMultiSelectList(this,[])):(this.selectListFlatGroup.forEach(i=>{i.checked=this.controlValue?.indexOf(i.value)>=0}),this.jsf.updateArrayMultiSelectList(this,this.selectListFlatGroup));return}this.jsf.updateValue(this,this.controlValue)}ngOnDestroy(){let t=this.options.multiple?[null]:null;this.formControl.reset(t),this.controlValue=null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["select-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[[3,"class","display","innerHTML"],[3,"formControl","class","id","name"],[3,"class","disabled","id","name"],[3,"class","disabled","id","multiple","name","ngModel"],[3,"innerHTML"],[3,"formControl","id","name"],[3,"ngValue"],[3,"label"],[3,"change","disabled","id","name"],[3,"selected","ngValue"],[3,"ngModelChange","change","disabled","id","multiple","name","ngModel"]],template:function(i,r){i&1&&(ee(0,"div"),te(1,ZX,1,6,"label",0),te(2,tee,3,8,"select",1),te(3,see,3,8,"select",2),te(4,dee,3,10,"select",3),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.options!=null&&r.options.title?1:-1),L(),ne(r.boundControl&&!(r.options!=null&&r.options.multiple)?2:-1),L(),ne(r.boundControl?-1:3),L(),ne(r.boundControl&&(r.options!=null&&r.options.multiple)?4:-1))},dependencies:[fu,pu,W0,Rf,tr,du,vo],encapsulation:2})}}return e})(),gte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnDestroy(){this.isValidChangesSubs?.unsubscribe(),this.isValidChangesSubs=null,this.updateValue({target:{value:null}})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),E(this.options,"disabled")?this.controlDisabled=this.options.disabled:this.jsf.formOptions.disableInvalidSubmit&&(this.controlDisabled=!this.jsf.isValid,this.isValidChangesSubs=this.jsf.isValidChanges.subscribe(t=>this.controlDisabled=!t)),(this.controlValue===null||this.controlValue===void 0)&&(this.controlValue=this.options.title)}updateValue(t){typeof this.options.onClick=="function"?this.options.onClick(t):this.jsf.updateValue(this,t.target.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["submit-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:14,consts:[[3,"click","disabled","id","name","type","value","appStopPropagation"]],template:function(i,r){if(i&1&&(ee(0,"div")(1,"input",0),Ue("click",function(l){return r.updateValue(l)}),Y()()),i&2){let s,l,u;X((r.options==null?null:r.options.htmlClass)||""),L(),X((r.options==null?null:r.options.fieldHtmlClass)||""),G("disabled",r.controlDisabled)("id","control"+((s=r.layoutNode())==null?null:s._id))("name",r.controlName)("type",(l=r.layoutNode())==null?null:l.type)("value",r.controlValue)("appStopPropagation",Zt(13,Gr)),_e("aria-describedby","control"+((u=r.layoutNode())==null?null:u._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required)}},dependencies:[ol],encapsulation:2})}}return e})(),_te=(()=>{class e{constructor(){this.jsf=N(We),this.newComponent=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.widgetContainer=cu("widgetContainer",{read:Mn})}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){let t=this.layoutNode(),i=this.widgetContainer();if(i&&!this.newComponent&&t.options.template&&(this.newComponent=i.createComponent(t.options.template)),this.newComponent)for(let r of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[r]=this[r]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["template-widget"]],viewQuery:function(i,r){i&1&&lu(r.widgetContainer,$g,5,Mn),i&2&&uu()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(i,r){i&1&&le(0,"div",null,0)},encapsulation:2})}}return e})(),yte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){setTimeout(()=>{this.jsf.updateValue(this,null)})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["textarea-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:4,vars:5,consts:[[3,"class","display","innerHTML"],[3,"formControl","class","id","name"],[3,"class","disabled","id","name","value"],[3,"innerHTML"],[3,"formControl","id","name"],[3,"input","disabled","id","name","value"]],template:function(i,r){i&1&&(ee(0,"div"),te(1,fee,1,6,"label",0),te(2,pee,1,12,"textarea",1),te(3,hee,2,14,"textarea",2),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.options!=null&&r.options.title?1:-1),L(),ne(r.boundControl?2:-1),L(),ne(r.boundControl?-1:3))},dependencies:[Ns,tr,vo],encapsulation:2})}}return e})(),os=(()=>{class e{constructor(){this.defaultWidget="text",this.widgetLibrary={none:ute,root:Ng,"select-framework":Rg,"select-widget":Gc,$ref:nte,email:"text",integer:"number",number:cte,password:"text",search:"text",tel:"text",text:ate,url:"text",color:"text",date:"text",datetime:"text","datetime-local":"text",month:"text",range:"number",time:"text",week:"text",checkbox:rte,file:ste,hidden:"text",image:"text",radio:"radios",reset:"submit",submit:gte,button:ite,select:mte,textarea:yte,checkboxes:ote,"checkboxes-inline":"checkboxes",checkboxbuttons:"checkboxes",radios:fte,"radios-inline":"radios",radiobuttons:"radios",section:hte,div:"section",fieldset:"section",flex:"section","one-of":dte,array:"section",tabarray:"tabs",tab:"section",tabs:l$,message:lte,help:"message",msg:"message",html:"message",template:_te,advancedfieldset:"section",authfieldset:"section",optionfieldset:"one-of",selectfieldset:"one-of",conditional:"section",actions:"section",tagsinput:"section",updown:"number","iso-date-time":"datetime-local","alt-datetime":"datetime-local","alt-date":"date",wizard:"section",textline:"text",selectcheckbox:vte},this.registeredWidgets={},this.frameworkWidgets={},this.activeWidgets={},this.setActiveWidgets()}setActiveWidgets(){this.activeWidgets=Object.assign({},this.widgetLibrary,this.frameworkWidgets,this.registeredWidgets);for(let t of Object.keys(this.activeWidgets)){let i=this.activeWidgets[t];if(typeof i=="string"){let r=[];for(;typeof i=="string"&&!r.includes(i);)r.push(i),i=this.activeWidgets[i];typeof i!="string"&&(this.activeWidgets[t]=i)}}return!0}setDefaultWidget(t){return this.hasWidget(t)?(this.defaultWidget=t,!0):!1}hasWidget(t,i="activeWidgets"){return!t||typeof t!="string"?!1:E(this[i],t)}hasDefaultWidget(t){return this.hasWidget(t,"widgetLibrary")}registerWidget(t,i){return!t||!i||typeof t!="string"?!1:(this.registeredWidgets[t]=i,this.setActiveWidgets())}unRegisterWidget(t){return E(this.registeredWidgets,t)?(delete this.registeredWidgets[t],this.setActiveWidgets()):!1}unRegisterAllWidgets(t=!0){return this.registeredWidgets={},t&&(this.frameworkWidgets={}),this.setActiveWidgets()}registerFrameworkWidgets(t){return(t===null||typeof t!="object")&&(t={}),this.frameworkWidgets=t,this.setActiveWidgets()}unRegisterFrameworkWidgets(){return Object.keys(this.frameworkWidgets).length?(this.frameworkWidgets={},this.setActiveWidgets()):!1}getWidget(t,i="activeWidgets"){return this.hasWidget(t,i)?this[i][t]:this.hasWidget(this.defaultWidget,i)?this[i][this.defaultWidget]:null}getAllWidgets(){return{widgetLibrary:this.widgetLibrary,registeredWidgets:this.registeredWidgets,frameworkWidgets:this.frameworkWidgets,activeWidgets:this.activeWidgets}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Jr=(()=>{class e{constructor(t){this.frameworks=t,this.widgetLibrary=N(os),this.http=N(k0),this.activeFramework=null,this.loadExternalAssets=!1,this.frameworkLibrary={},this.frameworks.forEach(i=>this.frameworkLibrary[i.name]=i),this.defaultFramework=this.frameworks[0].name,this.activeFrameworkName=this.defaultFramework,this.activeFrameworkNameSubject=new Ae,this.activeFrameworkName$=this.activeFrameworkNameSubject.asObservable(),this.setFramework(this.defaultFramework)}setLoadExternalAssets(t=!0){this.loadExternalAssets=!!t}setFramework(t=this.defaultFramework,i=this.loadExternalAssets){return this.activeFramework=typeof t=="string"&&this.hasFramework(t)?this.frameworkLibrary[t]:typeof t=="object"&&E(t,"framework")?t:this.frameworkLibrary[this.defaultFramework],this.activeFramework.name!=this.activeFrameworkName&&(this.activeFrameworkName=this.activeFramework.name,this.activeFrameworkNameSubject.next(this.activeFrameworkName)),this.registerFrameworkWidgets(this.activeFramework)}registerFrameworkWidgets(t){return E(t,"widgets")?this.widgetLibrary.registerFrameworkWidgets(t.widgets):this.widgetLibrary.unRegisterFrameworkWidgets()}hasFramework(t){return E(this.frameworkLibrary,t)}getFramework(){return this.activeFramework||this.setFramework("default",!0),this.activeFramework.framework}getFrameworkList(){return this.frameworks.map(t=>({name:t.name,text:t.text}))}getFrameworkWidgets(){return this.activeFramework.widgets||{}}getFrameworkStylesheets(t=this.loadExternalAssets){return t&&this.activeFramework.stylesheets||[]}getFrameworkScripts(t=this.loadExternalAssets){return t&&this.activeFramework.scripts||[]}getFrameworkConfig(t){return(t||this.activeFramework).config}getFrameworkAssetConfig(t,i=!0){let s=`assets/${(t||this.activeFramework).name}/cssframework`,l=`${s}/assets.json`,u=this.http.get(l,{responseType:"text"});return h0(u).then(d=>{let p=JSON.parse(d);return i&&(p.stylesheets=p.stylesheets.map(m=>{let g=["/","//","http:","https:"],w=!1;return g.forEach(C=>{w=w||m.indexOf(C)==0}),w?m:`${s}/${m}`}),p.scripts=p.scripts.map(m=>`${s}/${m}`)),p})}getFrameworkThemes(){let t=this.getFrameworkConfig(),i;return t&&(i=t?.widgetstyles?.__themes__||[]),i}requestThemeChange(t,i=!1,r){let s=r||this.activeFramework;if(s.requestThemeChange){if(i){let u=this.getFrameworkThemes().filter(d=>d.name==t);if(!u||u.length==0)return!1}return s.requestThemeChange(t),!0}}getActiveTheme(t){let i=t||this.activeFramework;if(i.getActiveTheme)return i.getActiveTheme()}registerTheme(t,i){let r=i||this.activeFramework;if(r.registerTheme)return r.registerTheme(t)}unregisterTheme(t,i){let r=i||this.activeFramework;if(r.registerTheme)return r.unregisterTheme(t)}static{this.\u0275fac=function(i){return new(i||e)(ou(Kr))}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),vte=(()=>{class e{constructor(){this.jsf=N(We),this.jsfFLService=N(Jr),this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.selectListFlatGroup=[],this.isArray=R,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.frameworkStyles={daisyui:{selectClass:"select-box",optionClass:"checkbox tw:dui-checkbox",optionChecked:"active",optionUnchecked:""},"bootstrap-3":{selectClass:"select-box",optionClass:"bs3-option checkbox display-inline-block",optionChecked:"active",optionUnchecked:""},"bootstrap-4":{selectClass:"select-box",optionClass:"bs4-option checkbox display-inline-block",optionChecked:"active",optionUnchecked:""},"bootstrap-5":{selectClass:" select-box",optionClass:"form-check-input display-inline-block",optionChecked:"active",optionUnchecked:""}}}ngOnInit(){this.options=this.layoutNode().options||{},this.activeFramework=this.jsfFLService.activeFramework.name,this.selectList=rl(this.options.enumNames||this.options?.title&&[this.options?.title]||[this.layoutNode().name],[!0],!0,!!this.options.flatList),this.jsf.initializeControl(this),this.selectValue=[this.controlValue]}deselectAll(){this.selectListFlatGroup.forEach(t=>{t.checked=!1})}updateValue(t){this.options.showErrors=!0,this.controlValue=this.selectValue[0],this.jsf.updateValue(this,this.controlValue)}onSelectClicked(t){this.selectValue=this.selectValue&&this.selectValue[0]?[!1]:[!0],this.controlValue=this.selectValue[0],this.jsf.updateValue(this,this.controlValue)}ngOnDestroy(){let t=this.options.multiple?[null]:null;this.formControl.reset(t),this.controlValue=null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["selectcheckbox-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:4,consts:[[3,"class","multiple","id","name","ngModel"],[3,"class","multiple","disabled","id","name"],[3,"multiple","id","name","ngModel"],["type","checkbox",3,"class","active","unchecked-notusing","value"],[3,"innerHTML"],["type","checkbox",3,"click","value"],[3,"change","multiple","disabled","id","name"],["type","checkbox",3,"selected","class","checked-notusing","unchecked-notusing]","value"],["type","checkbox",3,"selected","value"]],template:function(i,r){i&1&&(ee(0,"div"),te(1,_ee,3,9,"select",0),te(2,bee,3,9,"select",1),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.boundControl?1:-1),L(),ne(r.boundControl?-1:2))},dependencies:[fu,pu,Rf,tr,du],styles:['.select-box[_ngcontent-%COMP%]{font-size:16px;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;height:25px;overflow:hidden;text-overflow:ellipsis;background-color:#fff;color:#000;background-color:transparent}.select-box[_ngcontent-%COMP%]:focus{outline:none}.select-option[_ngcontent-%COMP%]{font-size:20px;color:#000;background-color:#fff;display:inline-block}.unchecked[_ngcontent-%COMP%]:before{content:"\\2610";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.checked[_ngcontent-%COMP%]:before{content:"\\2611";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.select-option[_ngcontent-%COMP%]:checked{background-image:linear-gradient(0deg,#fff 0% 100%);color:#000}.select-box[multiple][_ngcontent-%COMP%]:focus{background-color:transparent;color:#00f;-webkit-text-fill-color:black}.display-inline-block[_ngcontent-%COMP%]{display:inline-block}.bs4-option[_ngcontent-%COMP%], .bs3-option[_ngcontent-%COMP%]{width:14px;height:14px;border:solid 1px;color:#a9a9a9;min-block-size:auto;border-radius:3px}.bs4-option[_ngcontent-%COMP%]:checked[type=checkbox], .bs3-option[_ngcontent-%COMP%]:checked[type=checkbox]{background-image:url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!--%20License%3A%20MIT.%20Made%20by%20jaynewey%3A%20https%3A%2F%2Fgithub.com%2Fjaynewey%2Fcharm-icons%20--%3E%3Csvg%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222.5%22%3E%3Cpolyline%20points%3D%224%208.75%2C6.25%2012.25%2C13.25%203.5%22%2F%3E%3C%2Fsvg%3E);background-color:#00ced1}']})}}return e})();var Wr=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Tt({type:e})}static{this.\u0275inj=Ot({imports:[er,Nf,Mf,GP]})}}return e})(),bte=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Tt({type:e})}static{this.\u0275inj=Ot({providers:[{provide:Kr,useClass:tte,multi:!0}],imports:[er,Wr]})}}return e})(),wte={provide:F0,useExisting:bf(()=>Cte),multi:!0},Cte=(()=>{class e{constructor(){this.changeDetector=N($t),this.frameworkLibrary=N(Jr),this.widgetLibrary=N(os),this.jsf=N(We),this.unsubscribeOnActivateForm$=new Ae,this.formValueSubscription=null,this.formInitialized=!1,this.objectWrap=!1,this.previousInputs={schema:null,layout:null,data:null,options:null,framework:null,widgets:null,form:null,model:null,JSONSchema:null,UISchema:null,formData:null,loadExternalAssets:null,debug:null,ajvOptions:null},this.schema=H(void 0,{}),this.layout=H(void 0,{}),this.data=H(void 0,{}),this.options=H(void 0,{}),this.framework=H(void 0,{}),this.widgets=H(void 0,{}),this.form=H(void 0,{}),this.model=H(void 0,{}),this.JSONSchema=H(void 0,{}),this.UISchema=H(void 0,{}),this.formData=H(void 0,{}),this.ngModel=H(void 0,{}),this.language=H(void 0,{}),this.loadExternalAssets=H(void 0,{}),this.debug=H(void 0,{}),this.theme=H(void 0,{}),this.ajvOptions=H(void 0,{}),this.onChanges=Qn(),this.onSubmit=Qn(),this.isValid=Qn(),this.validationErrors=Qn(),this.formSchema=Qn(),this.formLayout=Qn(),this.dataChange=Qn(),this.modelChange=Qn(),this.formDataChange=Qn(),this.ngModelChange=Qn()}get value(){return this.objectWrap?this.jsf.data[1]:this.jsf.data}set value(t){this.setFormValues(t,!1)}ngOnDestroy(){this.dataChangesSubs?.unsubscribe(),this.statusChangesSubs?.unsubscribe(),this.isValidChangesSubs?.unsubscribe(),this.validationErrorChangesSubs?.unsubscribe(),this.dataChangesSubs=null,this.statusChangesSubs=null,this.isValidChangesSubs=null,this.validationErrorChangesSubs=null}getInputValue(t){return typeof this[t]=="function"?this[t]():this[t]}resetScriptsAndStyleSheets(){document.querySelectorAll(".ajsf").forEach(t=>t.remove())}loadScripts(t){(t||this.frameworkLibrary.getFrameworkScripts()).map(r=>{let s=document.createElement("script");s.src=r,s.type="text/javascript",s.async=!0,s.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(s)})}loadStyleSheets(t){(t||this.frameworkLibrary.getFrameworkStylesheets()).map(r=>{let s=document.createElement("link");s.rel="stylesheet",s.href=r,s.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(s)})}loadAssets(){this.frameworkLibrary.getFrameworkAssetConfig().then(t=>{this.resetScriptsAndStyleSheets(),this.loadScripts(t.scripts),this.loadStyleSheets(t.stylesheets)}).catch(t=>{console.log(t),this.resetScriptsAndStyleSheets(),this.loadScripts(),this.loadStyleSheets()})}ngOnInit(){this.updateForm(),this.loadAssets()}ngOnChanges(t){this.updateForm(),t.framework&&!t.framework.isFirstChange()&&t.framework.previousValue!==t.framework.currentValue&&this.loadAssets()}writeValue(t){this.setFormValues(t,!1),this.formValuesInput||(this.formValuesInput="ngModel")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.jsf.formOptions.formDisabled!==!!t&&(this.jsf.formOptions.formDisabled=!!t,this.initializeForm())}updateForm(){let t,i=this.language();if(!this.formInitialized||!this.formValuesInput||i&&i!==this.jsf.language)this.initializeForm();else{i&&i!==this.jsf.language&&this.jsf.setLanguage(i);let r=Object.keys(this.previousInputs).filter(u=>this.previousInputs[u]!==this.getInputValue(u)),s=!0;if(r.length===1&&r[0]==="form"&&this.formValuesInput.startsWith("form.")&&(r=Object.keys(this.previousInputs.form||{}).filter(u=>!(0,fn.default)(this.previousInputs.form[u],this.form()[u])).map(u=>`form.${u}`),s=!1),r.length===1&&r[0]===this.formValuesInput){if(this.formValuesInput.indexOf(".")===-1)t=this.getInputValue(this.formValuesInput);else{let[d,p]=this.formValuesInput.split(".");t=this.getInputValue(d)[p]}!Dg(t,this.jsf.data)?(this.initializeForm(t),this.onChange&&this.onChange(t),this.onTouched&&this.onTouched(t)):this.setFormValues(t,s)}else r.length&&(this.initializeForm(t),this.onChange&&this.onChange(this.jsf.formValues),this.onTouched&&this.onTouched(this.jsf.formValues));let l=this.theme();l&&l!==this.frameworkLibrary.getActiveTheme()?.name&&this.frameworkLibrary.requestThemeChange(l),Object.keys(this.previousInputs).filter(u=>this.previousInputs[u]!==this.getInputValue(u)).forEach(u=>this.previousInputs[u]=this.getInputValue(u))}}setFormValues(t,i=!0,r=!0,s=!0){if(t){let l=this.objectWrap?t[1]:t;this.jsf.formGroup?i&&this.jsf.formGroup.reset({},{emitEvent:r}):(this.jsf.formValues=t,this.activateForm()),this.jsf.formGroup&&(s?this.jsf.formGroup.patchValue(l,{emitEvent:r}):this.jsf.formGroup.setValue(l,{emitEvent:r})),this.onChange&&this.onChange(l),this.onTouched&&this.onTouched(l)}else this.jsf.formGroup.reset();this.changeDetector.markForCheck()}submitForm(){let t=this.jsf.validData;this.onSubmit.emit(this.objectWrap?t[1]:t)}initializeForm(t){if(this.schema()||this.layout()||this.data()||this.form()||this.model()||this.JSONSchema()||this.UISchema()||this.formData()||this.ngModel()||this.jsf.data){if(this.jsf.resetAllValues(),this.initializeAjv(),this.initializeOptions(),this.initializeSchema(),this.initializeLayout(),this.initializeData(),t&&(this.jsf.formValues=t),this.activateForm(),this.debug()||this.jsf.formOptions.debug){let i=[];this.debugOutput=i.map(r=>JSON.stringify(r,null,2)).join(`
|
|
88
|
+
`+l:r.description=l,delete r.$schema}if(r.type&&(typeof r.type.every=="function"?!r.type.every(l=>s.includes(l)):!s.includes(r.type)))if(r.type.length===1&&(r.type=r.type[0]),typeof r.type=="string")r.type==="any"?r.type=s:delete r.type;else if(typeof r.type=="object"){if(typeof r.type.every=="function")if(r.type.every(l=>typeof l=="string"))r.type=r.type.some(l=>l==="any")?r.type=s:r.type.filter(l=>s.includes(l));else if(r.type.length>1){let l=["additionalItems","items","maxItems","minItems","uniqueItems","contains"],u=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"],d=["maxProperties","minProperties","required","additionalProperties","properties","patternProperties","dependencies","propertyNames"],p=["maxLength","minLength","pattern","format"],m={array:[...u,...d,...p],integer:[...l,...d,...p],number:[...l,...d,...p],object:[...l,...u,...p],string:[...l,...u,...d],all:[...l,...u,...d,...p]},g=[];for(let w of r.type){let C=typeof w=="string"?{type:w}:re({},w);Object.keys(r).filter(I=>!C.hasOwnProperty(I)&&![...m[C.type]||m.all,"type","default"].includes(I)).forEach(I=>C[I]=r[I]),g.push(C)}r=r.hasOwnProperty("default")?{anyOf:g,default:r.default}:{anyOf:g}}else{let l=r.type;delete r.type,Object.assign(r,l)}}else delete r.type;return Object.keys(r).filter(l=>typeof r[l]=="object").forEach(l=>{if(["definitions","dependencies","properties","patternProperties"].includes(l)&&typeof r[l].map!="function"){let u={};Object.keys(r[l]).forEach(d=>u[d]=es(r[l][d],{changed:i,draft:t})),r[l]=u}else["items","additionalItems","additionalProperties","allOf","anyOf","oneOf","not"].includes(l)?r[l]=es(r[l],{changed:i,draft:t}):r[l]=(0,xe.default)(r[l])}),r}function mr(e){return e.replace(/\//g,"$")}function Cn(e,n=null,t=!0,i="",r="",s=""){let l=k.get(e.schema,i);t?!ze(n)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&ye(e.formValues))&&(n=k.get(e.schema,i+"/default")):n=null;let u=k.get(l,"/type"),p=(E(l,"if")||E(l,"then")||E(l,"else"))&&!u?"IfThenElse":(E(l,"properties")||E(l,"additionalProperties"))&&u==="object"?"FormGroup":(E(l,"items")||E(l,"additionalItems"))&&u==="array"?"FormArray":!u&&E(l,"$ref")?"$ref":"FormControl",m=Ht(r,e.dataRecursiveRefMap,e.arrayMap);e.dataMap.has(m)||e.dataMap.set(m,new Map);let g=e.dataMap.get(m);g.has("schemaType")||(g.set("schemaPointer",i),g.set("schemaType",l.type),l.format&&(g.set("schemaFormat",l.format),l.type||g.set("schemaType","string")),p&&(g.set("templatePointer",s),g.set("templateType",p)));let w,C=Bee(l);switch(p){case"FormGroup":if(w={},E(l,"ui:order")||E(l,"properties")){let U=l["ui:order"]||Object.keys(l.properties);if(U.includes("*")&&!E(l.properties,"*")){let K=Object.keys(l.properties).filter(oe=>!U.includes(oe));for(let oe=U.length-1;oe>=0;oe--)U[oe]==="*"&&U.splice(oe,1,...K)}U.filter(K=>E(l.properties,K)||E(l,"additionalProperties")).forEach(K=>{w[K]=Cn(e,k.get(n,[K]),t,i+(E(l.properties,K)?"/properties/"+K:"/additionalProperties"),r+"/"+K,s+"/controls/"+K),["allOf","anyOf","oneOf"].forEach(oe=>{w[K].controls&&w[K].controls[`_${oe}`]&&(Object.keys(w[K].controls[`_${oe}`]).forEach(fe=>{w[fe]=w[K].controls[`_${oe}`][fe],delete w[K].controls[fe]}),delete w[K].controls[`_${oe}`])})}),E(l,"if")&&["then","else"].forEach(K=>{if(E(l,K)){let oe=`/${K}`,fe=Cn(e,n,t,i+oe,r,s+`/controls/${K}`);Object.assign(w,fe.controls)}});let z=["allOf","anyOf","oneOf","if","then","else","type","properties","items"];["allOf","anyOf","oneOf"].forEach(K=>{E(l,K)&&R(l[K])&&l[K].forEach((oe,fe)=>{let qe=Object.keys(oe),Ke=z.filter(lt=>qe.includes(lt));if(Ke&&Ke.length>0){let lt=`/${K}/${fe}`,li=n;K=="oneOf"&&(li=n);let Sn=Cn(e,li,t,i+lt,r,s+"/controls/"+fe);Sn.controls&&Object.keys(Sn.controls).forEach(Ft=>{let ul=E(l,"properties")?"/properties/"+Ft:Ft,bi=Sn.controls[Ft].schemaPointer||`${i}${lt}${ul}`;bi=mr(bi);let dt=(0,xe.default)(Sn.controls[Ft]);dt.key=Ft,dt.schemaPointer=dt.schemaPointer||`${i}${lt}${ul}`,w[bi]=dt;let Ag=Ft.startsWith("$oneOf")?dt.schemaPointer:lt,cl=k.get(e.schema,dt.schemaPointer),gr=dt.schemaPointer.replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g,"").replace(/(if|then|else|properties)\//g,"").replace(/\/items\//g,"/-/");gr=gr.indexOf(r)==0?gr.substring(r.length):gr;let Vi=k.get(n,gr),Zr=Ft,ss=Vi;E(dt,"value")&&(e.ajv.validate(cl,ss)?dt.value.value=cl.properties?ss[Zr]:ss:dt.value.value=null),w[`_${K}`]=w[`_${K}`]||{},w[`_${K}`][bi]=dt})}})}),e.formOptions.fieldsRequired=Kee(l,w)}return{controlType:p,controls:w,validators:C,schemaPointer:i};case"FormArray":w=[];let I=Math.max(l.minItems||0,g.get("minItems")||0),b=Math.min(l.maxItems||1e3,g.get("maxItems")||1e3),P=null;if(R(l.items)){let U=g.get("tupleItems")||(R(l.items)?Math.min(l.items.length,b):0);for(let z=0;z<U;z++)if(z<I)w.push(Cn(e,R(n)?n[z]:n,t,i+"/items/"+z,r+"/"+z,s+"/controls/"+z));else{let K=Ht(i+"/items/"+z,e.schemaRecursiveRefMap),oe=Ht(m+"/"+z,e.dataRecursiveRefMap,e.arrayMap),fe=oe!==m+"/"+z,qe=`${oe}@${i}`,Ke=oe;E(e.templateRefLibrary,oe)&&!E(e.templateRefLibrary,qe)&&(e.templateRefLibrary[qe]=Cn(e,null,t,K,oe,s+"/controls/"+z),Ke=qe),E(e.templateRefLibrary,oe)||(e.templateRefLibrary[oe]=null,e.templateRefLibrary[oe]=Cn(e,null,t,K,oe,s+"/controls/"+z),e.templateRefLibrary[qe]=e.templateRefLibrary[oe]),w.push(R(n)?Cn(e,n[z],t,i+"/items/"+z,r+"/"+z,s+"/controls/"+z):fe?null:(0,xe.default)(e.templateRefLibrary[Ke]))}l.items.length<b&&B(l.additionalItems)&&(P=i+"/additionalItems")}else P=i+"/items";if(P){let U=Ht(P,e.schemaRecursiveRefMap),z=Ht(m+"/-",e.dataRecursiveRefMap,e.arrayMap),K=z!==m+"/-",oe=`${z}@${i}`,fe=z;E(e.templateRefLibrary,z)&&!E(e.templateRefLibrary,oe)&&(e.templateRefLibrary[oe]=Cn(e,null,t,U,z,s+"/controls/-"),fe=oe),E(e.templateRefLibrary,z)||(e.templateRefLibrary[z]=null,e.templateRefLibrary[z]=Cn(e,null,t,U,z,s+"/controls/-"),e.templateRefLibrary[oe]=e.templateRefLibrary[z]);let qe=g;if(!K||E(C,"required")){let Ke=Math.min(Math.max(K?0:qe.get("tupleItems")+qe.get("listItems")||0,R(n)?n.length:0),b);for(let lt=w.length;lt<Ke;lt++)w.push(R(n)?Cn(e,n[lt],t,U,r+"/-",s+"/controls/-"):K?null:(0,xe.default)(e.templateRefLibrary[fe]))}}return{controlType:p,controls:w,validators:C,schemaPointer:i};case"$ref":let T=k.compile(l.$ref),J=k.toDataPointer(T,l),W=Ht(J,e.dataRecursiveRefMap,e.arrayMap);if(W&&!E(e.templateRefLibrary,W)){e.templateRefLibrary[W]=null;let U=Cn(e,t,t,T);U?e.templateRefLibrary[W]=U:delete e.templateRefLibrary[W]}return null;case"FormControl":let Z={value:t&&Tee(n)?n:null,disabled:g.get("disabled")||!1};return{controlType:p,value:Z,validators:C,schemaPointer:i};case"IfThenElse":w={};let M;return E(l,"if")&&["then","else"].forEach(U=>{if(E(l,U)){let z=`/${U}`,K=Cn(e,n,t,i+z,r,s+`/controls/${U}`);E(K,"controls")&&Object.keys(K.controls).forEach(oe=>{let fe=K.controls[oe].schemaPointer;if(fe){fe=mr(fe);let qe=Object.assign({},K.controls[oe]);w[fe]=qe}})}}),{controlType:p,controls:w,validators:C,schemaPointer:i};default:return null}}function il(e){let n=[],t=null;if(E(e,"validators")&&(pn(e.validators,(i,r)=>{typeof nl[r]=="function"&&n.push(nl[r].apply(null,i))}),n.length&>(e.controlType,["FormGroup","FormArray"])&&(t=n.length>1?nl.compose(n):n[0])),E(e,"controlType"))switch(e.controlType){case"FormGroup":let i={};return pn(e.controls,(r,s)=>{let l=il(r);l&&(i[s]=l)}),new L0(i,t);case"FormArray":return new U0((0,XT.default)((0,e$.default)(e.controls,r=>il(r))),t);case"FormControl":return new z0(e.value,n)}return null}function Kee(e,n){let t=!1;if(E(e,"required")&&!ye(e.required)){t=!0;let i=R(e.required)?e.required:[e.required];i=pn(i,r=>k.set(n,"/"+r+"/validators/required",[]))}return t}function Jee(e,n,t,i,r=!1,s=!1){if(e===null||typeof e!="object")return e;let l=R(e)?[]:{};return k.forEachDeep(e,(u,d)=>{if(r&&R(u))k.set(l,d,[]);else if(r&&B(u)&&!rs(u))k.set(l,d,{});else{let p=k.has(n,[d,"schemaType"])?d:Ht(d,t,i);if(k.has(n,[p,"schemaType"])){let m=n.get(p).get("schemaType");if(m==="null")k.set(l,d,null);else if((de(u)||r)&>(m,["string","integer","number","boolean"])){let g=s||u===null&&r?Ree(u,m):hr(u,m);(ze(g)||r)&&k.set(l,d,g)}}else if(typeof u!="object"||rs(u)||u===null&&r){if(p.indexOf("/$")>=0)return l;console.error(`formatFormData error: Schema type not found for form value at ${p}`),console.error("dataMap",n),console.error("recursiveRefMap",t),console.error("genericPointer",p)}}}),l}function Lc(e,n,t=!1,i){if(!B(e)||!k.isJsonPointer(n)){if(!k.isJsonPointer(n)){if(typeof n=="string"){let l=i?mr(i):n,u=e.get(l);if(u)return u}console.error(`getControl error: Invalid JSON Pointer: ${n}`)}return B(e)||console.error(`getControl error: Invalid formGroup: ${e}`),null}let r=k.parse(n);if(t&&(r=r.slice(0,-1)),typeof e.get=="function"&&r.every(l=>l.indexOf(".")===-1)){let l=i?mr(i):r.join("."),u=e.get(l);if(u)return u}let s=e;if(i){let l=k.toControlPointer(n,{}),u=i.split("/"),d=k.parse(n),p,m;for(;u.length>0;){p=u.pop();let g=mr(u.join("/"));if(m=e.get(g),d[0]==u[u.length-1]&&d.shift(),m)break}s=m||s,r=m?d:r}for(let l of r){if(E(s,"controls")&&(s=s.controls),i&&E(s,mr(i)))return s=s[mr(i)],s;if(R(s)&&l==="-")s=s[s.length-1];else if(E(s,l))s=s[l];else{console.error(`getControl error: Unable to find "${l}" item in FormGroup.`),console.error(n),console.error(e);return}}return s}function Zee(e,n,t,i){let r=k.parse(n),s=e;for(let u=0;u<r.length-1;u++)if(s=s.get(r[u]),typeof s.setControl!="function")throw new Error(`Path '${r[u]}' is not a valid FormGroup or FormArray.`);let l=r[r.length-1];s.setControl(l,t)}function Qee(e,n){let t=!k.get(e,"/formOptions/addSubmit"),i=s$(e.layout,(r,s,l)=>{let u={_id:(0,qi.default)(),options:{}};if(B(r))Object.assign(u,r),Object.keys(u).filter(p=>!gt(p,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"])).forEach(p=>{u.options[p]=u[p],delete u[p]}),!E(u,"type")&&Ye(u.widget)&&(u.type=u.widget,delete u.widget),E(u.options,"title")||E(u.options,"legend")&&(u.options.title=u.options.legend,delete u.options.legend),E(u.options,"validationMessages")||(E(u.options,"errorMessages")?(u.options.validationMessages=u.options.errorMessages,delete u.options.errorMessages):E(u.options,"validationMessage")&&(typeof u.options.validationMessage=="string"?u.options.validationMessages=u.options.validationMessage:(u.options.validationMessages={},Object.keys(u.options.validationMessage).forEach(p=>{let m=p+"",g=m==="0"?"type":m==="1"?"enum":m==="100"?"multipleOf":m==="101"?"minimum":m==="102"?"exclusiveMinimum":m==="103"?"maximum":m==="104"?"exclusiveMaximum":m==="200"?"minLength":m==="201"?"maxLength":m==="202"?"pattern":m==="300"?"minProperties":m==="301"?"maxProperties":m==="302"?"required":m==="304"?"dependencies":m==="400"?"minItems":m==="401"?"maxItems":m==="402"?"uniqueItems":m==="500"?"format":m+"";u.options.validationMessages[g]=u.options.validationMessage[p]})),delete u.options.validationMessage));else if(k.isJsonPointer(r))u.dataPointer=r;else if(Ye(r))u.key=r;else return console.error("buildLayout error: Form layout element not recognized:"),console.error(r),null;let d=null;if(!E(u,"dataPointer")){if(E(u,"key"))u.dataPointer=u.key==="*"?u.key:k.compile(k.parseObjectPath(u.key),"-"),delete u.key;else if(E(u,"type")&&u.type.slice(-5)==="array"){let p=g=>{if(!(g===null||typeof g!="object")){if(E(g,"dataPointer"))return g.dataPointer;if(R(g.items))for(let w of g.items){if(E(w,"dataPointer")&&w.dataPointer.indexOf("/-")!==-1)return w.dataPointer;if(E(w,"items")){let C=p(w);if(C)return C}}}},m=p(u);m&&(u.dataPointer=m.slice(0,m.lastIndexOf("/-")))}}if(E(u,"dataPointer")){if(u.dataPointer==="*")return xn(e,n,e.formValues);let p=k.get(e.formValues,u.dataPointer.replace(/\/-/g,"/1"));u.dataPointer=k.toGenericPointer(u.dataPointer,e.arrayMap);let m=k.toKey(u.dataPointer);!u.name&&Ye(m)&&m!=="-"&&(u.name=m);let g=Ht(u.dataPointer,e.dataRecursiveRefMap,e.arrayMap),w=!g.length||g!==u.dataPointer,C;e.dataMap.has(g)||e.dataMap.set(g,new Map);let I=e.dataMap.get(g);if(I.has("schemaPointer")?C=I.get("schemaPointer"):(C=k.toSchemaPointer(g,e.schema),I.set("schemaPointer",C)),d=k.get(e.schema,C),d){if(!E(u,"type"))u.type=Pg(d,u);else if(n.hasWidget(u.type))u.type=Og(u.type,d,u);else{let b=u.type;u.type=Pg(d,u),console.error(`error: widget type "${b}" not found in library. Replacing with "${u.type}".`)}d.type==="object"&&R(d.required)&&I.set("required",d.required),u.dataType=d.type||(E(d,"$ref")?"$ref":null),tl(u,d,e),I.set("disabled",!!u.options.disabled),u.type==="checkboxes"&&E(d,"items")?tl(u,d.items,e):u.dataType==="array"&&(u.options.maxItems=Math.min(d.maxItems||1e3,u.options.maxItems||1e3),u.options.minItems=Math.max(d.minItems||0,u.options.minItems||0),u.options.listItems=Math.max(u.options.listItems||0,R(p)?p.length:0),u.options.tupleItems=R(d.items)?d.items.length:0,u.options.maxItems<u.options.tupleItems?(u.options.tupleItems=u.options.maxItems,u.options.listItems=0):u.options.maxItems<u.options.tupleItems+u.options.listItems?u.options.listItems=u.options.maxItems-u.options.tupleItems:u.options.minItems>u.options.tupleItems+u.options.listItems&&(u.options.listItems=u.options.minItems-u.options.tupleItems),I.has("maxItems")||(I.set("maxItems",u.options.maxItems),I.set("minItems",u.options.minItems),I.set("tupleItems",u.options.tupleItems),I.set("listItems",u.options.listItems)),e.arrayMap.has(g)||e.arrayMap.set(g,u.options.tupleItems)),zc(e.schema,C)&&(u.options.required=!0,e.fieldsRequired=!0)}else tl(u,{},e);if(!u.options.title&&!/^\d+$/.test(u.name)&&(u.options.title=ji(u.name)),E(u.options,"copyValueTo")&&(typeof u.options.copyValueTo=="string"&&(u.options.copyValueTo=[u.options.copyValueTo]),R(u.options.copyValueTo)&&(u.options.copyValueTo=u.options.copyValueTo.map(b=>k.compile(k.parseObjectPath(b),"-")))),u.widget=n.getWidget(u.type),I.set("inputType",u.type),I.set("widget",u.widget),u.dataType==="array"&&(E(u,"items")||E(u,"additionalItems"))){let b=Ht(u.dataPointer+"/-",e.dataRecursiveRefMap,e.arrayMap);if(e.dataMap.has(b)||e.dataMap.set(b,new Map),e.dataMap.get(b).set("inputType","section"),u.items.length>1){let P=[];for(let T=u.items.length-1;T>=0;T--){let J=u.items[T];if(E(J,"dataPointer")&&J.dataPointer.slice(0,b.length)===b){let W=u.items.splice(T,1)[0];W.dataPointer=u.dataPointer+"/-"+W.dataPointer.slice(b.length),P.unshift(W)}else J.arrayItem=!0,J.arrayItemType="list",J.removable=u.options.removable!==!1}P.length&&u.items.push({_id:(0,qi.default)(),arrayItem:!0,arrayItemType:u.options.tupleItems>u.items.length?"tuple":"list",items:P,options:{removable:u.options.removable!==!1},dataPointer:u.dataPointer+"/-",type:"section",widget:n.getWidget("section")})}else u.items[0].arrayItem=!0,u.items[0].dataPointer||(u.items[0].dataPointer=k.toGenericPointer(b,e.arrayMap)),k.has(u,"/items/0/options/removable")||(u.items[0].options.removable=!0),u.options.orderable===!1&&(u.items[0].options.orderable=!1),u.items[0].arrayItemType=u.options.tupleItems?"tuple":"list";if(R(u.items)){let P=u.items.filter(T=>T.type!=="$ref").length-u.options.tupleItems;P>u.options.listItems&&(u.options.listItems=P,I.set("listItems",P))}if(E(e.layoutRefLibrary,b)||(e.layoutRefLibrary[b]=(0,xe.default)(u.items[u.items.length-1]),w&&(e.layoutRefLibrary[b].recursiveReference=!0),pn(e.layoutRefLibrary[b],(P,T)=>{E(P,"_id")&&(P._id=null),w&&E(P,"dataPointer")&&(P.dataPointer=P.dataPointer.slice(b.length))},"top-down")),!u.recursiveReference||u.options.required){let P=Math.min(Math.max(u.options.tupleItems+u.options.listItems,R(p)?p.length:0),u.options.maxItems);for(let T=u.items.length;T<P;T++)u.items.push(Wc({$ref:b,dataPointer:u.dataPointer,recursiveReference:u.recursiveReference},e,n))}if(u.options.addable!==!1&&u.options.minItems<u.options.maxItems&&(u.items[u.items.length-1]||{}).type!=="$ref"){let P="Add";if(u.options.title)/^add\b/i.test(u.options.title)?P=u.options.title:P+=" "+u.options.title;else if(u.name&&!/^\d+$/.test(u.name))/^add\b/i.test(u.name)?P+=" "+ji(u.name):P=ji(u.name);else{let T=zee(e.schema,u.dataPointer,"parentSchema");if(E(T,"title"))P+=" to "+T.title;else{let J=k.parse(u.dataPointer);P+=" to "+ji(J[J.length-2])}}u.items.push({_id:(0,qi.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:u.dataPointer+"/-",options:{listItems:u.options.listItems,maxItems:u.options.maxItems,minItems:u.options.minItems,removable:!1,title:P,tupleItems:u.options.tupleItems},recursiveReference:w,type:"$ref",widget:n.getWidget("$ref"),$ref:b}),Ye(k.get(u,"/style/add"))&&(u.items[u.items.length-1].options.fieldStyle=u.style.add,delete u.style.add,ye(u.style)&&delete u.style)}}else u.arrayItem=!1}else if(E(u,"type")||E(u,"items")){let p=k.get(e.layout,l,0,-2).type;E(u,"type")||(u.type=gt(p,["tabs","tabarray"])?"tab":"array"),u.arrayItem=p==="array",u.widget=n.getWidget(u.type),tl(u,{},e)}return u.type==="submit"&&(t=!0),u});if(e.hasRootReference){let r=(0,xe.default)(i);r[r.length-1].type==="submit"&&r.pop(),e.layoutRefLibrary[""]={_id:null,dataPointer:"",dataType:"object",items:r,name:"",options:(0,xe.default)(e.formOptions.defaultWidgetOptions),recursiveReference:!0,required:!1,type:"section",widget:n.getWidget("section")}}return t||i.push({_id:(0,qi.default)(),options:{title:"Submit"},type:"submit",widget:n.getWidget("submit")}),i}function Yee(e,n){let t=Qee(e,n);if(e.formValues){let i=Xee({builtLayout:t,formData:e.formValues})}return t}function Xee(e){let{builtLayout:n,formData:t}=e,i={},r=function(p,m,g){if((0,ts.default)(p)){g&&g(p,m),p.forEach((w,C)=>{g&&g(w,m+"/"+C),r(w,m+"/"+C,g)});return}if((0,t$.default)(p)){g&&g(p,m),Object.keys(p).forEach(w=>{g&&g(p[w],m+"/"+w),r(p[w],m+"/"+w,g)});return}};r(t,"",(p,m)=>{(0,ts.default)(p)&&(i[m]=i[m]||p.length)});let s=p=>{let{data:m,dataPointer:g,indexArray:w}=p,C=0,I=g.substring(1).split("/").map((P,T)=>P=="-"&&w[C]!=null?w[C++]:P).join("/");return I="/"+I,i[I]},l=p=>{let m={type:"section",recursiveReference:!1,items:[]};return(0,xe.default)(p)},u=p=>{let{builtLayout:m,indices:g,parentDataPointer:w,indexPos:C}=p;if(g=g||[],C=C??(C=-1),(0,ts.default)(m)){m.forEach((b,P)=>{u({builtLayout:b,indices:g,indexPos:C,parentDataPointer:w})});return}let I=["array"];if(m.items&&I.indexOf(m.dataType)>=0&&m.dataPointer&&!m.recursiveReference){let b=s({data:t,dataPointer:m.dataPointer,indexArray:g}),P=m.items.length;m.items.forEach(J=>{J.type&&J.type=="$ref"&&P--});let T=m.options?.listItems;if(P=Math.max(P,0),P<Math.max(b,T)){let J=Math.max(b,T)-P;P==0&&m.items[0].recursiveReference&&(J=0);for(let W=0;W<J;W++){let M=m.items[0].type&&m.items[0].type=="$ref"?l(m.items[0]):(0,xe.default)(m.items[0]);M._id=(0,qi.default)("new_"),m.items.unshift(M)}}else if(P>Math.max(b,T)){let J=P-Math.max(b,T);for(let W=0;W<J;W++)m.items.pop()}m.options.listItems&&(m.options.listItems=b),g[m.dataPointer]=g[m.dataPointer]||-1,C++,m.items.forEach((J,W)=>{g[C]=W,u({builtLayout:J,indices:g,parentDataPointer:m.dataPointer,indexPos:C})}),C--}else m.items&&m.items.forEach((b,P)=>{u({builtLayout:b,indices:g,parentDataPointer:w,indexPos:C})})};return u({builtLayout:n}),n}function xn(e,n,t=null,i="",r="",s=!1,l=null,u=null,d=!1,p="",m){function g(Z,M,U,z,K){if(Z){let oe=K&&K.isITEItem&&K.options.condition;if(oe)return;R(Z)?Z.forEach(fe=>{fe.isITEItem=!0,fe.options.condition=oe?null:ZT(C,fe,z),g(fe,M,U,z,Z)}):E(Z,"items")?g(Z.items,M,U,z,Z):(Z.isITEItem=!0,Z.options.condition=oe?null:ZT(C,Z,z))}}let w=m||e.schema,C=k.get(w,i);if(!E(C,"type")&&!E(C,"$ref")&&!E(C,"x-schema-form")&&!E(C,"if")&&!E(C,"then")&&!E(C,"else"))return null;let I=Pg(C);!ze(t)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&ye(e.formValues))&&(t=k.get(w,i+"/default"));let b={_id:d?null:(0,qi.default)(),arrayItem:s,dataPointer:k.toGenericPointer(r,e.arrayMap),dataType:C.type||(E(C,"$ref")?"$ref":null),options:{},required:zc(w,i),type:I,widget:n.getWidget(I)},P=k.toKey(b.dataPointer);P!=="-"&&(b.name=P),b.arrayItem&&(b.arrayItemType=l,b.options.removable=u!==!1);let T=Ht(p+r,e.dataRecursiveRefMap,e.arrayMap),J=!T.length||T!==p+r;e.dataMap.has(T)||e.dataMap.set(T,new Map),tl(b,C,e);let W=e.dataMap.get(T);if(W.has("inputType")||(W.set("schemaPointer",i),W.set("inputType",b.type),W.set("widget",b.widget),W.set("disabled",!!b.options.disabled)),!b.options.title&&b.name&&!/^\d+$/.test(b.name)&&(b.options.title=ji(b.name)),b.dataType==="object"){if(R(C.required)&&!W.has("required")&&W.set("required",C.required),B(C.properties)){let Z=[],M=C["ui:order"]||Object.keys(C.properties);if(M.includes("*")&&!E(C.properties,"*")){let U=Object.keys(C.properties).filter(z=>!M.includes(z));for(let z=M.length-1;z>=0;z--)M[z]==="*"&&M.splice(z,1,...U)}M.filter(U=>E(C.properties,U)||E(C,"additionalProperties")).forEach(U=>{let z=E(C.properties,U)?"/properties/"+U:"/additionalProperties",K=xn(e,n,B(t)?t[U]:null,i+z,r+"/"+U,!1,null,null,d,p);K&&(K.schemaPointer=i+z,zc(C,"/"+U)&&(K.options.required=!0,e.fieldsRequired=!0),Z.push(K))}),["allOf","anyOf","oneOf"].forEach(U=>{if(E(C,U)&&R(C[U])){let z;U=="oneOf"&&(z=xn(e,n,C.oneOf,"/",r,!1,null,null,d,p,{type:"one-of",items:C.oneOf,oneOf:C.oneOf}),Z.push(z)),C[U].forEach((K,oe)=>{let fe=`/${U}/${oe}`,qe=xn(e,n,K,i+fe,r,!1,null,null,U=="oneOf",p);if(qe)if(qe.items&&qe.items.forEach(Ke=>{let lt=E(K,"properties")?"/properties/"+Ke.name:Ke.name,li={anyOf:"anyOfPointer",oneOf:"oneOfPointer"}[U];Ke[li]=li?Ke.schemaPointer:void 0}),R(qe)){let Ke=(0,xe.default)(b);qe.forEach(lt=>{let li=E(K,"properties")?"/properties/"+lt.name:lt.name;U=="anyOf"&&(lt.anyOfPointer=lt.schemaPointer),z?(Ke.items=Ke.items||[],Ke.items.push(lt)):Z.push(lt)}),z&&(z.items=z.items||[],z.items.push(Ke))}else if(z){let Ke={anyOf:"anyOfPointer",oneOf:"oneOfPointer"}[U];qe[Ke]=Ke?i+fe:void 0,z.items=z.items||[],z.items.push(qe)}else Z.push(qe)})}}),E(C,"if")&&["then","else"].forEach(U=>{if(E(C,U)){let z=`/${U}`,K=U=="else",oe=xn(e,n,t[U],i+z,r,!1,null,null,d,p);oe&&(g(oe,i,z,K),R(oe)?oe.forEach(fe=>{Z.push(fe)}):Z.push(oe))}}),r===""&&!d?b=Z:b.items=Z}}else if(b.dataType==="array"){b.items=[],b.options.maxItems=Math.min(C.maxItems||1e3,b.options.maxItems||1e3),b.options.minItems=Math.max(C.minItems||0,b.options.minItems||0),!b.options.minItems&&zc(w,i)&&(b.options.minItems=1),E(b.options,"listItems")||(b.options.listItems=1),b.options.tupleItems=R(C.items)?C.items.length:0,b.options.maxItems<=b.options.tupleItems?(b.options.tupleItems=b.options.maxItems,b.options.listItems=0):b.options.maxItems<b.options.tupleItems+b.options.listItems?b.options.listItems=b.options.maxItems-b.options.tupleItems:b.options.minItems>b.options.tupleItems+b.options.listItems&&(b.options.listItems=b.options.minItems-b.options.tupleItems),W.has("maxItems")||(W.set("maxItems",b.options.maxItems),W.set("minItems",b.options.minItems),W.set("tupleItems",b.options.tupleItems),W.set("listItems",b.options.listItems)),e.arrayMap.has(T)||e.arrayMap.set(T,b.options.tupleItems),u=b.options.removable!==!1;let Z=null;if(R(C.items)){b.items=[];for(let M=0;M<b.options.tupleItems;M++){let U,z=Ht(T+"/"+M,e.dataRecursiveRefMap,e.arrayMap),K=!z.length||z!==T+"/"+M;if(u&&M>=b.options.minItems){let oe=`${z}@${i}`,fe=z;E(e.layoutRefLibrary,z)&&!E(e.layoutRefLibrary,oe)&&(e.layoutRefLibrary[oe]=xn(e,n,R(t)?t[M]:null,i+"/items/"+M,K?"":r+"/"+M,!0,"tuple",!0,!0,K?r+"/"+M:""),fe=oe),E(e.layoutRefLibrary,z)||(e.layoutRefLibrary[z]=null,e.layoutRefLibrary[z]=xn(e,n,R(t)?t[M]:null,i+"/items/"+M,K?"":r+"/"+M,!0,"tuple",!0,!0,K?r+"/"+M:""),K&&(e.layoutRefLibrary[z].recursiveReference=!0),e.layoutRefLibrary[oe]=e.layoutRefLibrary[z]),U=Wc({$ref:fe,dataPointer:r+"/"+M,recursiveReference:K},e,n,R(t)?t[M]:null)}else U=xn(e,n,R(t)?t[M]:null,i+"/items/"+M,r+"/"+M,!0,"tuple",!1,d,p);U&&b.items.push(U)}B(C.additionalItems)&&(Z=i+"/additionalItems")}else B(C.items)&&(Z=i+"/items");if(Z){let M=Ht(T+"/-",e.dataRecursiveRefMap,e.arrayMap),U=!M.length||M!==T+"/-",z=Ht(Z,e.schemaRecursiveRefMap,e.arrayMap),K=`${M}@${i}`,oe=M;if(E(e.layoutRefLibrary,M)&&!E(e.layoutRefLibrary,K)&&(e.layoutRefLibrary[K]=xn(e,n,null,z,U?"":r+"/-",!0,"list",u,!0,U?r+"/-":""),oe=K),M.length&&!E(e.layoutRefLibrary,M)&&(e.layoutRefLibrary[M]=null,e.layoutRefLibrary[M]=xn(e,n,null,z,U?"":r+"/-",!0,"list",u,!0,U?r+"/-":""),U&&(e.layoutRefLibrary[M].recursiveReference=!0),e.layoutRefLibrary[K]=e.layoutRefLibrary[M]),!U||b.options.required){let fe=Math.min(Math.max(U?0:b.options.tupleItems+b.options.listItems,R(t)?t.length:0),b.options.maxItems);if(b.items.length<fe)for(let qe=b.items.length;qe<fe;qe++)b.items.push(Wc({$ref:oe,dataPointer:r+"/-",recursiveReference:U},e,n,R(t)?t[qe]:null))}if(b.options.addable!==!1&&b.options.minItems<b.options.maxItems&&(b.items[b.items.length-1]||{}).type!=="$ref"){let fe=((e.layoutRefLibrary[M]||{}).options||{}).title,qe=fe?"Add ":"Add to ";fe||(fe=C.title||ji(k.toKey(r))),/^add\b/i.test(fe)||(fe=qe+fe),b.items.push({_id:(0,qi.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:b.dataPointer+"/-",options:{listItems:b.options.listItems,maxItems:b.options.maxItems,minItems:b.options.minItems,removable:!1,title:fe,tupleItems:b.options.tupleItems},recursiveReference:U,type:"$ref",widget:n.getWidget("$ref"),$ref:oe})}}}else if(b.dataType==="$ref"){let Z=k.compile(C.$ref),M=k.toDataPointer(Z,w),U="";if(b.options.add)U=b.options.add;else if(b.name&&!/^\d+$/.test(b.name))U=(/^add\b/i.test(b.name)?"":"Add ")+ji(b.name);else{let z=k.get(w,i,0,-1);if(E(z,"title"))U="Add to "+z.title;else{let K=k.parse(b.dataPointer);U="Add to "+ji(K[K.length-2])}}if(Object.assign(b,{recursiveReference:!0,widget:n.getWidget("$ref"),$ref:M}),Object.assign(b.options,{removable:!1,title:U}),ct(k.get(w,i,0,-1).maxItems)&&(b.options.maxItems=k.get(w,i,0,-1).maxItems),M.length)if(E(e.layoutRefLibrary,M))e.layoutRefLibrary[M].recursiveReference||(e.layoutRefLibrary[M].recursiveReference=!0);else{e.layoutRefLibrary[M]=null;let z=xn(e,n,null,Z,"",b.arrayItem,b.arrayItemType,!0,!0,r);z?(z.recursiveReference=!0,e.layoutRefLibrary[M]=z):delete e.layoutRefLibrary[M]}}else if(b.type==="if"){let Z=[];["then","else"].forEach(M=>{if(E(C,M)){let U=`/${M}`,z=M=="else",K=xn(e,n,t[M],i+U,r,!1,null,null,d,p);K&&(g(K,i,U,z),R(K)?K.forEach(oe=>{Z.push(oe)}):Z.push(K))}}),b=Z}return b}function s$(e,n,t="",i=e){let r=0,s=[];return pn(e,(l,u)=>{let d=+u+r,p=t+"/"+d,m=Vc(l),g=[];B(l)&&(E(l,"tabs")&&(l.items=l.tabs,delete l.tabs),E(l,"items")&&(g=R(l.items)?l.items:[l.items])),g.length&&(m.items=s$(g,n,p+"/items",i)),m=n(m,d,p,i),ze(m)?(R(m)&&(r+=m.length-1),s=s.concat(m)):r--}),s}function Wc(e,n,t=null,i=null){if(e.recursiveReference&&t){let r=(0,xe.default)(e);return r.options||(r.options={}),Object.assign(r,{recursiveReference:!0,widget:t.getWidget("$ref")}),Object.assign(r.options,{removable:!1,title:"Add "+r.$ref}),r}else{let r=n.layoutRefLibrary[e.$ref];return ze(i)?r=xn(n,t,i,k.toSchemaPointer(e.$ref,n.schema),e.$ref,r.arrayItem,r.arrayItemType,r.options.removable,!1):(r=(0,xe.default)(r),k.forEachDeep(r,(s,l)=>{E(s,"_id")&&(s._id=(0,qi.default)()),e.recursiveReference&&E(s,"dataPointer")&&(s.dataPointer=e.dataPointer+s.dataPointer)})),r}}function rl(e,n,t=!0,i=!0){let r=[],s=!1;if(e)if(R(e))if(n){for(let l of Object.keys(e))if(B(e[l])){let u=e[l].value;if(n.includes(u)){let d=e[l].name;r.push({name:d,value:u}),u==null&&(s=!0)}}else if(Ye(e[l])&&l<n.length){let u=e[l],d=n[l];r.push({name:u,value:d}),d==null&&(s=!0)}}else r=e,t||(s=!!r.filter(l=>l.value===void 0||l.value===null).length);else if(n)for(let l of Object.keys(n)){let u=n[l];if(E(e,u)){let d=e[u];r.push({name:d,value:u}),u==null&&(s=!0)}}else for(let l of Object.keys(e)){let u=e[l];r.push({name:u,value:l}),l==null&&(s=!0)}else if(n)for(let l of Object.keys(n)){let u=n[l],d=n[l];r.push({name:u,value:d}),d==null&&(s=!0)}else r=[{name:"True",value:!0},{name:"False",value:!1}];return r.some(l=>E(l,"group"))&&(s=!1,i?r=r.reduce((l,u)=>(E(u,"group")?(R(u.items)&&(l=[...l,...u.items.map(d=>Ve(re({},d),{name:`${u.group}: ${d.name}`}))],u.items.some(d=>d.value===void 0||d.value===null)&&(s=!0)),E(u,"name")&&E(u,"value")&&(u.name=`${u.group}: ${u.name}`,delete u.group,l.push(u),(u.value===void 0||u.value===null)&&(s=!0))):(l.push(u),(u.value===void 0||u.value===null)&&(s=!0)),l),[]):r=r.reduce((l,u)=>(E(u,"group")?(u.group!==(l[l.length-1]||{}).group&&l.push({group:u.group,items:u.items||[]}),E(u,"name")&&E(u,"value")&&(l[l.length-1].items.push({name:u.name,value:u.value}),(u.value===void 0||u.value===null)&&(s=!0))):(l.push(u),(u.value===void 0||u.value===null)&&(s=!0)),l),[])),!t&&!s&&r.unshift({name:"<em>None</em>",value:null}),r}var We=(()=>{class e{setDraggableState(t){this.draggableStateSubject.next(t)}createAjvInstance(t){let i=new xg.default(t);return i.addMetaSchema(Uh),i.addMetaSchema(Wh),(0,Cg.default)(i),i}createAndRegisterAjvInstance(t,i){let r=i||`ajv_${Date.now()}`;if(this.ajvRegistry[r])throw new Error(`ajv instance with name:'${r}' has already been registered`);let s=this.createAjvInstance(t);return this.ajvRegistry[r]={name:r,ajvInstance:s,ajvValidator:null},this.ajvRegistry[r]}getAjvInstance(t="default"){return this.ajvRegistry[t].ajvInstance}getAjvValidator(t="default"){return this.ajvRegistry[t]?.ajvValidator}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}constructor(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.ajvOptions={allErrors:!0,strict:!1},this.ajv=(0,n$.default)(new xg.default(this.ajvOptions),["uniqueItemProperties","dynamicDefaults"]),this.validateFormData=null,this.formValues={},this.data={},this.schema={},this.layout=[],this.formGroupTemplate={},this.formGroup=null,this.framework=null,this.validData=null,this.isValid=null,this.ajvErrors=null,this.validationErrors=null,this.dataErrors=new Map,this.formValueSubscription=null,this.dataChanges=new Ae,this.isValidChanges=new Ae,this.validationErrorChanges=new Ae,this.arrayMap=new Map,this.dataMap=new Map,this.dataRecursiveRefMap=new Map,this.schemaRecursiveRefMap=new Map,this.schemaRefLibrary={},this.layoutRefLibrary={"":null},this.templateRefLibrary={},this.hasRootReference=!1,this.language="en-US",this.defaultFormOptions={autocomplete:!0,addSubmit:"auto",debug:!1,disableInvalidSubmit:!0,formDisabled:!1,formReadonly:!1,fieldsRequired:!1,framework:"no-framework",loadExternalAssets:!1,pristine:{errors:!0,success:!0},supressPropertyTitles:!1,setSchemaDefaults:"auto",setLayoutDefaults:"auto",validateOnRender:"auto",widgets:{},defaultWidgetOptions:{listItems:1,addable:!0,orderable:!0,removable:!0,enableErrorState:!0,enableSuccessState:!0,feedback:!1,feedbackOnRender:!1,notitle:!1,disabled:!1,readonly:!1,returnEmptyFields:!0,validationMessages:{}},validationDebounceMs:50},this.zone=N(bn),this.templateCache=new Map,this.lodashConfig={interpolate:/{{([\s\S]+?)}}/g},this.etaConfig={tags:["{{","}}"],cache:!0,functionHeader:"const value=it.value, values=it.values,tpldata=it.tpldata,idx=it.idx,$index=it.$index"},this.evalFunctionCache=new Map,this.draggableStateSubject=new fo(!0),this.draggableState$=this.draggableStateSubject.asObservable(),this.ajvRegistry={},this.setLanguage(this.language),this.ajv.addMetaSchema(Uh),this.ajv.addMetaSchema(Wh),(0,Cg.default)(this.ajv),this.ajvRegistry.default={name:"default",ajvInstance:this.ajv,ajvValidator:null};let t="{{",i="}}";this.tagPresenceRegex=new RegExp(`${t}.+?${i}`),this.eta=new pP(this.etaConfig)}ngOnDestroy(){this.fcValueChangesSubs?.unsubscribe(),this.fcStatusChangesSubs?.unsubscribe(),this.formValueSubscription?.unsubscribe(),this.fcValueChangesSubs=null,this.fcStatusChangesSubs=null,this.formValueSubscription=null}setLanguage(t="en-US"){this.language=t;let i={de:Cee,en:xee,es:Iee,fr:See,it:Dee,pt:Eee,zh:Pee},r=t.slice(0,2),s=i[r];this.defaultFormOptions.defaultWidgetOptions.validationMessages=(0,xe.default)(s)}getData(){return this.data}getSchema(){return this.schema}getLayout(){return this.layout}resetAllValues(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.validateFormData=null,this.formValues={},this.schema={},this.layout=[],this.formGroupTemplate={},this.formGroup=null,this.framework=null,this.data={},this.validData=null,this.isValid=null,this.validationErrors=null,this.arrayMap=new Map,this.dataMap=new Map,this.dataRecursiveRefMap=new Map,this.schemaRecursiveRefMap=new Map,this.layoutRefLibrary={},this.schemaRefLibrary={},this.templateRefLibrary={},this.formOptions=(0,xe.default)(this.defaultFormOptions),this.ajvRegistry={},this.ajvRegistry.default={name:"default",ajvInstance:this.ajv,ajvValidator:null},this.templateCache.clear(),this.evalFunctionCache.clear()}buildRemoteError(t){pn(t,(i,r)=>{if(r in this.formGroup.controls)for(let s of i){let l={};l[s.code]=s.message,this.formGroup.get(r).setErrors(l,{emitEvent:!0})}})}validateData(t,i=!0,r="default"){this.data=Jee(t,this.dataMap,this.dataRecursiveRefMap,this.arrayMap,this.formOptions.returnEmptyFields),this.isValid=this.getAjvValidator(r)(this.data),this.validData=this.isValid?this.data:null;let s=l=>{let u={};return(l||[]).forEach(d=>{let p=d.instancePath||"ROOT";u[p]||(u[p]=[]),u[p].push(d.message)}),u};this.ajvErrors=this.getAjvValidator(r).errors,this.validationErrors=s(this.ajvErrors),i&&(this.dataChanges.next(this.data),this.isValidChanges.next(this.isValid),this.validationErrorChanges.next(this.ajvErrors))}buildFormGroupTemplate(t=null,i=!0){this.formGroupTemplate=Cn(this,t,i)}buildFormGroup(t){if(this.formGroup=il(this.formGroupTemplate),this.formGroup){this.compileAjvSchema(t),this.validateData(this.formGroup.getRawValue(),!0,t),this.formValueSubscription&&this.formValueSubscription.unsubscribe();let i=this.formOptions&&this.formOptions.validationDebounceMs||50;this.formValueSubscription=this.formGroup.valueChanges.pipe(y0(i),Os((r,s)=>(0,fn.default)(r,s))).subscribe(()=>{this.validateData(this.formGroup.getRawValue(),!0,t)})}}buildLayout(t){this.layout=Yee(this,t)}setOptions(t){if(B(t)){let i=(0,xe.default)(t);B(i.defaultOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,i.defaultOptions),delete i.defaultOptions),B(i.defaultWidgetOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,i.defaultWidgetOptions),delete i.defaultWidgetOptions),Object.assign(this.formOptions,i);let r=this.formOptions.defaultWidgetOptions;["ErrorState","SuccessState"].filter(s=>E(r,"disable"+s)).forEach(s=>{r["enable"+s]=!r["disable"+s],delete r["disable"+s]})}}compileAjvSchema(t="default"){let i=this.getAjvValidator(t);i||(Array.isArray(this.schema.properties["ui:order"])&&(this.schema["ui:order"]=this.schema.properties["ui:order"],delete this.schema.properties["ui:order"]),this.getAjvInstance(t).removeSchema(this.schema),i=this.getAjvInstance(t).compile(this.schema),this.ajvRegistry[t].ajvValidator=i)}buildSchemaFromData(t,i=!1){if(t)return Eg(t,i);this.schema=Eg(this.formValues,i)}buildSchemaFromLayout(t){if(t)return void 0;this.schema=(this.layout,void 0)}setTpldata(t={}){this.tpldata=t}parseText(t="",i={},r={},s=null){if(!t)return t;let l=this.templateCache.get(t);if(!l)try{let p=t.replace(/{{/g,"{{=");l=this.eta.compile(p,this.etaConfig),this.templateCache.set(t,l)}catch(p){return console.error("Error compiling template:",p),t}let u=typeof s=="number"?s+1:s,d={value:i,values:r,tpldata:this.tpldata,idx:u,$index:u};try{return l.call(this.eta,d,this.etaConfig)}catch(p){return console.error("Error during template execution:",p),t}}parseExpression(t="",i={},r={},s=null,l=null){if(typeof t!="string"||!t.trim())return"";let u=typeof s=="number"?s+1:s,d={value:i,values:r,tpldata:l||this.tpldata,idx:u,$index:u},p=`{{ ${t.trim()} }}`;try{let m=this.templateCache.get(p);if(!m)try{m=(0,QT.default)(p,this.lodashConfig),this.templateCache.set(p,m)}catch(g){return console.error("Error compiling template:",g),p}try{return m(d)}catch(g){return console.error("Error during template execution:",g),p}}catch(m){return console.error(`Error evaluating expression "${t}":`,m),""}}setArrayItemTitle(t={},i=null,r=null){let s={layoutNode:()=>B(t.layoutNode)?t.layoutNode:t.layoutNode(),dataIndex:()=>B(t.dataIndex)?t.dataIndex:t.dataIndex()},l=s.layoutNode();if(l.options.buttonText)return l.options.buttonText;let u=this.getFormControlValue(s),d=(l.type||"").slice(-5)==="array"&&R(u),p=k.getFirst(d&&i.type!=="$ref"?[[i,"/options/legend"],[i,"/options/title"],[l,"/options/title"],[l,"/options/legend"]]:[[i,"/options/title"],[i,"/options/legend"],[l,"/options/title"],[l,"/options/legend"]]);if(!p)return p;let m=R(u)&&r<u.length?u[r]:u;return this.parseText(p,m,u,r)}setItemTitle(t){return!t.options.title&&/^(\d+|-)$/.test(t.layoutNode().name)?null:this.parseText(t.options.title||r$(t.layoutNode().name),this.getFormControlValue(t),(this.getFormControlGroup(t)||{}).value,t.dataIndex()[t.dataIndex().length-1])}getItemTitleContext(t){return{value:this.getFormControlValue(t),values:(this.getFormControlGroup(t)||{}).value,key:t.dataIndex()[t.dataIndex().length-1]}}evaluateCondition(t,i){let r=t.options?.condition;if(!de(r))return!0;if(typeof r=="string")return this.evaluateStringCondition(r,i);if(typeof r=="function")try{return r(this.data)}catch(s){return console.error("Condition function errored out:",s),!0}if(typeof r=="object"&&(typeof r?.functionBody=="string"||typeof r?.functionBodyRaw=="string")){let s={functionBody:r.functionBodyRaw||(r.functionBody.includes("?.")?r.functionBody:r.functionBody.replace(/\[/g,".[").split(".").join("?.").replace(/\?\?\./g,"?").replace(/(\?)(\.\[)/g,"["))};return this.evaluateFunctionBodyCondition(s,i)}return!0}evaluateStringCondition(t,i){let r=i?.[i.length-1];de(r)&&(t=t.replace("[arrayIndex]",`[${r}]`));let s=k.parseObjectPath(t);return!!k.get(this.data,s)}evaluateFunctionBodyCondition(t,i){try{return this._getFunctionFromBody(t.functionBody)(this.data,i)}catch(r){return console.error("condition functionBody errored out on evaluation: "+t.functionBody,r),!0}}evaluateConditionAsync(t,i){let r=this.evaluateCondition(t,i);return nu(r)}_getFunctionFromBody(t){let i=`${t}`;if(!this.evalFunctionCache.has(i)){let r=new Function("model","arrayIndices",t);this.evalFunctionCache.set(i,r)}return this.evalFunctionCache.get(i)}initializeControl(t,i=!0){if(!B(t))return!1;let r=t.layoutNode();if(ye(t.options)&&(t.options=ye((r||{}).options)?(0,xe.default)(this.formOptions):r.options),t.formControl=this.getFormControl(t),(r?.schemaPointer&&r.isITEItem||r?.schemaPointer&&r?.oneOfPointer||r?.schemaPointer&&r.anyOfPointer)&&(this.dataMap.get(r?.dataPointer).get("schemaType")!=r.dataType&&this.dataMap.get(r?.dataPointer).set("schemaType",r.dataType),this.setFormControl(t,t.formControl)),t.boundControl=i&&!!t.formControl,t.formControl)t.controlName=this.getFormControlName(t),t.controlValue=t.formControl.value,t.controlDisabled=t.formControl.disabled,t.options.errorMessage=t.formControl.status==="VALID"?null:this.formatErrors(t.formControl.errors,t.options.validationMessages),t.options.showErrors=this.formOptions.validateOnRender===!0||this.formOptions.validateOnRender==="auto"&&de(t.controlValue),this.fcStatusChangesSubs=t.formControl.statusChanges.subscribe(l=>t.options.errorMessage=l==="VALID"?null:this.formatErrors(t.formControl.errors,t.options.validationMessages)),this.fcValueChangesSubs=t.formControl.valueChanges.subscribe(l=>{(0,fn.default)(t.controlValue,l)||(t.controlValue=l)});else{t.controlName=r.name,t.controlValue=r.value||null;let l=this.getDataPointer(t);i&&l&&console.error(`warning: control "${l}" is not bound to the Angular FormGroup.`)}let s=r?.schemaPointer?.split("/").some(l=>["then","else"].includes(l));if(t.options?.condition||r?.oneOfPointer||r?.anyOfPointer||s){let l=this.getDataPointer(t),u=t.formControl?.value,d=k.has(this.data,l)?k.get(this.data,l):void 0,p=k.has(this.formValues,l)?k.get(this.formValues,l):void 0,m=t.options?.default,g=this.formValues&&(0,fn.default)(p,u)||!this.formValues&&(0,fn.default)(m,u)?d:m;t.formControl?.patchValue(g)}return t.boundControl}formatErrors(t,i={}){if(ye(t))return null;B(i)||(i={});let r=u=>u[0].toUpperCase()+(u.slice(1)||"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," "),s=u=>typeof u=="object"?Object.keys(u).map(d=>u[d]===!0?r(d):u[d]===!1?"Not "+r(d):r(d)+": "+s(u[d])).join(", "):r(u.toString()),l=[];return Object.keys(t).filter(u=>u!=="required"||Object.keys(t).length===1).map(u=>typeof i=="string"?i:typeof i[u]=="function"?i[u](t[u]):typeof i[u]=="string"?/{{.+?}}/.test(i[u])?Object.keys(t[u]).reduce((d,p)=>d.replace(new RegExp("{{"+p+"}}","g"),t[u][p]),i[u]):i[u]:r(u)+" Error: "+s(t[u])).join("<br>")}updateValue(t,i){if(t.controlValue=i,t.boundControl&&(t.formControl.setValue(i),t.formControl.markAsDirty()),t.layoutNode().value=i,R(t.options.copyValueTo))for(let r of t.options.copyValueTo){let s=this.formGroup&&Lc(this.formGroup,r);B(s)&&typeof s.setValue=="function"&&(s.setValue(i),s.markAsDirty())}}updateArrayCheckboxList(t,i){let r=this.getFormControl(t);for(;r.value.length;)r.removeAt(0);let s=Ht(t.layoutNode().dataPointer+"/-",this.dataRecursiveRefMap,this.arrayMap);for(let l of i)if(l.checked){let u=il(this.templateRefLibrary[s]);u.setValue(l.value),r.push(u)}r.markAsDirty()}updateArrayMultiSelectList(t,i){this.updateArrayCheckboxList(t,i)}getFormControl(t){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||t.layoutNode().type==="$ref")return null;let i=t.layoutNode()?.isITEItem?t.layoutNode()?.schemaPointer:null,r=t.layoutNode()?.oneOfPointer,s=t.layoutNode()?.anyOfPointer;return Lc(this.formGroup,this.getDataPointer(t),!1,i||r||s)}setFormControl(t,i){return!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||t.layoutNode().type==="$ref"?null:Zee(this.formGroup,this.getDataPointer(t),i)}getFormControlValue(t){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||t.layoutNode().type==="$ref"||this.formGroup==null)return null;let i=t.layoutNode()?.isITEItem?t.layoutNode()?.schemaPointer:null,r=t.layoutNode()?.oneOfPointer,s=t.layoutNode()?.anyOfPointer,l=Lc(this.formGroup,this.getDataPointer(t),!1,i||r||s);return l?l.value:null}getFormControlGroup(t){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||this.formGroup==null)return null;let i=t.layoutNode()?.isITEItem?t.layoutNode()?.schemaPointer:null,r=t.layoutNode()?.oneOfPointer,s=t.layoutNode()?.anyOfPointer;return Lc(this.formGroup,this.getDataPointer(t),!0,i||r||s)}getFormControlName(t){return!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex())?null:k.toKey(this.getDataPointer(t))}getLayoutArray(t){return k.get(this.layout,this.getLayoutPointer(t),0,-1)}getParentNode(t){return k.get(this.layout,this.getLayoutPointer(t),0,-2)}getDataPointer(t){return!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex())?null:k.toIndexedPointer(t.layoutNode().dataPointer,t.dataIndex(),this.arrayMap)}getLayoutPointer(t){return de(t.layoutIndex())?"/"+t.layoutIndex().join("/items/"):null}isControlBound(t){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex()))return!1;let i=this.getFormControlGroup(t),r=this.getFormControlName(t);return i?E(i.controls,r):!1}addItem(t,i){if(!t||!t.layoutNode||!ze(t.layoutNode().$ref)||!de(t.dataIndex())||!de(t.layoutIndex()))return!1;let r=il(this.templateRefLibrary[t.layoutNode().$ref]);t.layoutNode().arrayItem?this.getFormControlGroup(t).push(r):this.getFormControlGroup(t).addControl(i||this.getFormControlName(t),r);let s=Wc(t.layoutNode(),this);return s.arrayItem=t.layoutNode().arrayItem,t.layoutNode().arrayItemType?s.arrayItemType=t.layoutNode().arrayItemType:delete s.arrayItemType,i&&(s.name=i,s.dataPointer+="/"+k.escape(i),s.options.title=ji(i)),k.insert(this.layout,this.getLayoutPointer(t),s),!0}moveArrayItem(t,i,r,s=!0){if(!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex())||!de(t.layoutIndex())||!ze(i)||!ze(r)||i===r)return!1;let l=this.getFormControlGroup(t);if(i>=l.length)return!1;let u=l.at(i);if(l.removeAt(i),l.insert(r,u),l.updateValueAndValidity(),s){let d=this.getLayoutArray(t);d.splice(r,0,d.splice(i,1)[0])}return!0}removeItem(t){return!t||!t.layoutNode||!ze(t.layoutNode().dataPointer)||!de(t.dataIndex())||!de(t.layoutIndex())?!1:(t.layoutNode().arrayItem?this.getFormControlGroup(t).removeAt(t.dataIndex()[t.dataIndex().length-1]):this.getFormControlGroup(t).removeControl(this.getFormControlName(t)),k.remove(this.layout,this.getLayoutPointer(t)),!0)}adjustLayout(t,i,r=[0],s=[]){let l=(u,d,p)=>({layoutNode:()=>u,layoutIndex:()=>d,dataIndex:()=>p});if(t.items&&(0,ts.default)(i)){let u=l(Ve(re({},t),{$ref:t.$ref||t.items[0]?.dataPointer,dataPointer:t.items[0]?.dataPointer,arrayItem:!0,arrayItemType:"list"}),[...r.slice(0,r.length-1),t.items.length-1],[...s.slice(0,s.length-1),t.items.length-1]),d=i.length-t.items.filter(p=>p?.type!="$ref").length;if(d>0)for(let p=0;p<d;p++)this.addItem(u);else if(d<0){let p=t.items.filter(m=>m?.type!="$ref").length-i.length;for(let m=0;m<p;m++){let g=u.dataIndex(),w=g[g.length-1],C=[...r.slice(0,r.length-1),0],I=[...g.slice(0,g.length-1),0];u=l(u.layoutNode(),C,I);let b=this.removeItem(u)}}return}(0,ts.default)(t)&&t.forEach((u,d)=>{let p=u.dataPointer?k.get(i,u.dataPointer):void 0;this.adjustLayout(u,p,[...r,d],[...s,d])})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac})}}return e})(),Gc=(()=>{class e{constructor(){this.jsf=N(We),this.newComponent=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.widgetContainer=cu("widgetContainer",{read:Mn})}ngOnInit(){this.updateComponent()}ngOnChanges(t){this.updateComponent()}updateComponent(){let t=this.widgetContainer();if(t&&!this.newComponent&&(this.layoutNode()||{}).widget&&(this.newComponent=t.createComponent(this.layoutNode().widget)),this.newComponent)for(let i of["layoutNode","layoutIndex","dataIndex"])this.newComponent.setInput(i,this[i]())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["select-widget-widget"]],viewQuery:function(i,r){i&1&&lu(r.widgetContainer,$g,5,Mn),i&2&&uu()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(i,r){i&1&&le(0,"div",null,0)},encapsulation:2})}}return e})(),ete=(()=>{class e{constructor(){this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["no-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:1,vars:3,consts:[[3,"dataIndex","layoutIndex","layoutNode"]],template:function(i,r){i&1&&le(0,"select-widget-widget",0),i&2&&G("dataIndex",r.dataIndex())("layoutIndex",r.layoutIndex())("layoutNode",r.layoutNode())},dependencies:[Gc],encapsulation:2})}}return e})(),tte=(()=>{class e extends Kr{constructor(){super(...arguments),this.name="no-framework",this.text="None (plain HTML)",this.framework=ete}static{this.\u0275fac=(()=>{let t;return function(r){return(t||(t=su(e)))(r||e)}})()}static{this.\u0275prov=je({token:e,factory:e.\u0275fac})}}return e})(),a$=(()=>{class e{constructor(t,i){this.renderer=t,this.elementRef=i}ngOnChanges(t){if(t.attributes)for(let i in this.attributes){let r=this.attributes[i];r?this.renderer.setAttribute(this.elementRef.nativeElement,i,r):this.renderer.removeAttribute(this.elementRef.nativeElement,i)}}static{this.\u0275fac=function(i){return new(i||e)(Rs(au),Rs(xt))}}static{this.\u0275dir=mt({type:e,selectors:[["","attributes",""]],inputs:{attributes:"attributes"},standalone:!1,features:[Nt]})}}return e})(),ol=(()=>{class e{constructor(t,i){this.el=t,this.renderer=i,this.events=[],this.unsubscribeFunctions=[]}ngOnInit(){(this.events.length>0?this.events:["mousedown"]).forEach(i=>{let r=this.renderer.listen(this.el.nativeElement,i,s=>{s.stopPropagation()});this.unsubscribeFunctions.push(r)})}ngOnDestroy(){this.unsubscribeFunctions.forEach(t=>t())}static{this.\u0275fac=function(i){return new(i||e)(Rs(xt),Rs(au))}}static{this.\u0275dir=mt({type:e,selectors:[["","appStopPropagation",""]],inputs:{events:[0,"appStopPropagation","events"]},standalone:!1})}}return e})(),nte=(()=>{class e{constructor(){this.jsf=N(We),this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{}}get showAddButton(){return!this.layoutNode().arrayItem||this.layoutIndex()[this.layoutIndex().length-1]<this.options.maxItems}addItem(t){t.preventDefault(),this.jsf.addItem(this)}get buttonText(){let t={dataIndex:this.dataIndex().slice(0,-1),layoutIndex:this.layoutIndex().slice(0,-1),layoutNode:this.jsf.getParentNode(this)};return t.layoutNode&&(t.layoutNode.add||this.jsf.setArrayItemTitle(t,this.layoutNode(),this.itemCount))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["add-reference-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:3,consts:[["align","end"],[3,"class","disabled","appStopPropagation"],[3,"click","disabled","appStopPropagation"],[3,"class"],[3,"innerHTML"]],template:function(i,r){i&1&&(ee(0,"section",0),te(1,oX,3,7,"button",1),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.showAddButton?1:-1))},dependencies:[ol],encapsulation:2})}}return e})(),ite=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(t){typeof this.options.onClick=="function"?this.options.onClick(t):this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["button-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:13,consts:[[3,"click","disabled","name","type","value","appStopPropagation"],[3,"class","innerHTML"],[3,"innerHTML"]],template:function(i,r){if(i&1&&(ee(0,"div")(1,"button",0),Ue("click",function(l){return r.updateValue(l)}),te(2,sX,1,3,"span",1),Y()()),i&2){let s,l;X((r.options==null?null:r.options.htmlClass)||""),L(),X((r.options==null?null:r.options.fieldHtmlClass)||""),G("disabled",r.controlDisabled)("name",r.controlName)("type",(s=r.layoutNode())==null?null:s.type)("value",r.controlValue)("appStopPropagation",Zt(12,Gr)),_e("readonly",r.options!=null&&r.options.readonly?"readonly":null)("aria-describedby","control"+((l=r.layoutNode())==null?null:l._id)+"Status"),L(),ne(r.options!=null&&r.options.icon||r.options!=null&&r.options.title?2:-1)}},dependencies:[ol],encapsulation:2})}}return e})(),rte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.trueValue=!0,this.falseValue=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),(this.controlValue===null||this.controlValue===void 0)&&(this.controlValue=!1,this.jsf.updateValue(this,this.falseValue))}updateValue(t){t.preventDefault(),this.jsf.updateValue(this,t.target.checked?this.trueValue:this.falseValue)}get isChecked(){return this.jsf.getFormControlValue(this)===this.trueValue}ngOnDestroy(){this.jsf.updateValue(this,null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["checkbox-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[["type","checkbox",3,"formControl","class","id","name","readonly"],["type","checkbox",3,"checked","class","disabled","id","name","readonly","value"],[3,"display","innerHTML"],[1,"hb-uix-slider","hb-uix-round"],["type","checkbox",3,"formControl","id","name","readonly"],["type","checkbox",3,"change","checked","disabled","id","name","readonly","value"],[3,"innerHTML"]],template:function(i,r){if(i&1&&(ee(0,"label"),te(1,aX,1,7,"input",0),te(2,lX,1,9,"input",1),te(3,uX,1,3,"span",2),le(4,"span",3),Y()),i&2){let s;X((r.options==null?null:r.options.itemLabelHtmlClass)||"hb-uix-switch"),_e("for","control"+((s=r.layoutNode())==null?null:s._id)),L(),ne(r.boundControl?1:-1),L(),ne(r.boundControl?-1:2),L(),ne(r.options!=null&&r.options.title?3:-1)}},dependencies:[q0,tr,vo],encapsulation:2})}}return e})(),ote=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.checkboxList=[],this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{};let t=this.layoutNode();if(this.layoutOrientation=t.type==="checkboxes-inline"||t.type==="checkboxbuttons"?"horizontal":"vertical",this.jsf.initializeControl(this),this.checkboxList=rl(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.boundControl){let i=this.jsf.getFormControl(this);this.checkboxList.forEach(r=>r.checked=i.value.includes(r.value))}}updateValue(t){for(let i of this.checkboxList)t.target.value===i.value&&(i.checked=t.target.checked);this.boundControl&&this.jsf.updateArrayCheckboxList(this,this.checkboxList)}ngOnDestroy(){let t=[];this.formControl.reset(t),this.controlValue=null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["checkboxes-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:3,consts:[[3,"class","display","innerHTML"],[3,"class"],[3,"innerHTML"],["type","checkbox",3,"change","checked","disabled","id","name","readonly","value"],[1,"hb-uix-slider","hb-uix-round"]],template:function(i,r){i&1&&(te(0,cX,1,5,"label",0),te(1,fX,3,2,"div",1),te(2,hX,3,0,"div")),i&2&&(ne(r.options!=null&&r.options.title?0:-1),L(),ne(r.layoutOrientation==="horizontal"?1:-1),L(),ne(r.layoutOrientation==="vertical"?2:-1))},encapsulation:2})}}return e})(),ste=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["file-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:0,vars:0,template:function(i,r){},encapsulation:2})}}return e})();var ate=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.autoCompleteList=[],this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}get inputAttributes(){return this.options?.["x-inputAttributes"]}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){setTimeout(()=>{this.jsf.updateValue(this,null)})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["input-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[[3,"class","display","innerHTML"],[3,"formControl","class","id","name","readonly","type","attributes","appStopPropagation"],[3,"class","disabled","id","name","readonly","type","value","attributes","appStopPropagation"],[3,"id"],[3,"innerHTML"],[3,"formControl","id","name","readonly","type","attributes","appStopPropagation"],[3,"input","disabled","id","name","readonly","type","value","attributes","appStopPropagation"],[3,"value"]],template:function(i,r){i&1&&(ee(0,"div"),te(1,mX,1,6,"label",0),te(2,gX,1,17,"input",1),te(3,_X,1,18,"input",2),te(4,vX,3,1,"datalist",3),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.options!=null&&r.options.title?1:-1),L(),ne(r.boundControl?2:-1),L(),ne(r.boundControl?-1:3),L(),ne(!(r.options==null||r.options.typeahead==null)&&r.options.typeahead.source?4:-1))},dependencies:[fu,pu,Ns,tr,vo,a$,ol],encapsulation:2})}}return e})();var lte=(()=>{class e{constructor(){this.jsf=N(We),this.message=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.message=this.options.help||this.options.helpvalue||this.options.msg||this.options.message}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["message-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:1,vars:1,consts:[[3,"class","innerHTML"],[3,"innerHTML"]],template:function(i,r){i&1&&te(0,bX,1,3,"span",0),i&2&&ne(r.message?0:-1)},encapsulation:2})}}return e})(),ute=(()=>{class e{constructor(){this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["none-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:0,vars:0,template:function(i,r){},encapsulation:2})}}return e})(),cte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.allowNegative=!0,this.allowDecimal=!0,this.allowExponents=!1,this.lastValidNumber="",this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}get inputAttributes(){return this.options?.["x-inputAttributes"]}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),this.layoutNode().dataType==="integer"&&(this.allowDecimal=!1)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){setTimeout(()=>{this.jsf.updateValue(this,null)})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["number-widget"]],viewQuery:function(i,r){if(i&1&&Or(wX,5)(CX,5),i&2){let s;on(s=sn())&&(r.inputControl=s.first),on(s=sn())&&(r.div=s.first)}},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:6,vars:6,consts:[["divElt",""],["inputControl",""],[3,"class","display","innerHTML"],[3,"formControl","class","id","name","readonly","title","type","attributes","appStopPropagation"],[3,"class","disabled","id","name","readonly","title","type","value","attributes","appStopPropagation"],[3,"innerHTML"],[3,"formControl","id","name","readonly","title","type","attributes","appStopPropagation"],[3,"input","disabled","id","name","readonly","title","type","value","attributes","appStopPropagation"]],template:function(i,r){if(i&1&&(ee(0,"div",null,0),te(2,xX,1,6,"label",2),te(3,IX,2,18,"input",3),te(4,SX,2,19,"input",4),te(5,DX,1,1,"span",5),Y()),i&2){let s;X((r.options==null?null:r.options.htmlClass)||""),L(2),ne(r.options!=null&&r.options.title?2:-1),L(),ne(r.boundControl?3:-1),L(),ne(r.boundControl?-1:4),L(),ne(((s=r.layoutNode())==null?null:s.type)==="range"?5:-1)}},dependencies:[Ns,tr,vo,a$,ol],encapsulation:2})}}return e})(),Rg=(()=>{class e{constructor(){this.jsf=N(We),this.changeDetectorRef=N($t),this.newComponent=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.widgetContainer=cu("widgetContainer",{read:Mn})}ngOnInit(){this.updateComponent()}ngOnChanges(t){this.updateComponent()}updateComponent(){let t=this.widgetContainer();if(t&&!this.newComponent&&this.jsf.framework&&(this.newComponent=t.createComponent(this.jsf.framework)),this.newComponent)for(let i of["layoutNode","layoutIndex","dataIndex"])this.newComponent.setInput(i,this[i]())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["select-framework-widget"]],viewQuery:function(i,r){i&1&&lu(r.widgetContainer,$g,5,Mn),i&2&&uu()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(i,r){i&1&&le(0,"div",null,0)},encapsulation:2})}}return e})(),l$=(()=>{class e{constructor(){this.jsf=N(We),this.cdr=N($t),this.selectedItem=0,this.showAddTab=!0,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.options.selectedTab&&(this.selectedItem=this.options.selectedTab),this.itemCount=this.layoutNode().items.length-1,this.updateControl(),this.dataChangesSubs=this.jsf.dataChanges.subscribe(t=>{})}select(t){let i=this.layoutNode();i.items[t].type==="$ref"&&(this.itemCount=i.items.length,this.jsf.addItem({layoutNode:fi(i.items[t]),layoutIndex:fi(this.layoutIndex().concat(t)),dataIndex:fi(this.dataIndex().concat(t))}),this.updateControl()),this.selectedItem=t}updateControl(){let t=this.layoutNode().items[this.layoutNode().items.length-1];t.type==="$ref"&&this.itemCount>=(t.options.maxItems||1e3)&&(this.showAddTab=!1)}setTabTitle(t,i){return this.jsf.setArrayItemTitle(this,t,i)}ngOnDestroy(){this.dataChangesSubs?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["tabs-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:2,consts:[["role","presentation","data-tabs","",3,"class"],[3,"class"],["role","presentation","data-tabs",""],[3,"click"],["type","radio","name","tabSelection",3,"value","ngModel","class"],["type","radio","name","tabSelection",3,"ngModelChange","change","value","ngModel"],[3,"class","dataIndex","layoutIndex","layoutNode"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(i,r){if(i&1&&(ee(0,"ul"),St(1,OX,2,3,"li",0,It),Y(),St(3,NX,3,4,"div",1,It)),i&2){let s,l;X((r.options==null?null:r.options.labelHtmlClass)||""),L(),Dt((s=r.layoutNode())==null?null:s.items),L(2),Dt((l=r.layoutNode())==null?null:l.items)}},dependencies:[Ns,H0,tr,du,Rg],styles:["a[_ngcontent-%COMP%]{cursor:pointer}.ngf-hidden[_ngcontent-%COMP%]{display:none}"]})}}return e})(),dte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.options.tabMode="oneOfMode",this.options.selectedTab=this.findSelectedTab(),this.jsf.initializeControl(this)}findSelectedTab(){let t=-1;return this.layoutNode().items&&this.layoutNode().items.forEach((i,r)=>{let s=k.get(this.jsf.formValues,i.dataPointer);if(i.oneOfPointer){let l=mr(i.oneOfPointer),u=i.name;E(this.jsf.formGroup.controls,l)&&(s||o$(this.jsf.formGroup.controls[l].value))&&(t=r),t==-1&&Object.keys(this.jsf.formGroup.controls).filter(p=>p.startsWith(l)).forEach(p=>{let m=p.split("$"),g=m[m.length-1],w=this.jsf.formGroup.controls[p].value,C=k.get(this.jsf.schema,m.join("/")),b=m.join("/").replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g,"").replace(/(if|then|else|properties)\//g,"").replace(/\/items\//g,"/-/"),P=k.get(this.jsf.formValues,b),T=P;C&&C.properties&&(T=(0,Ut.isObject)(P)&&E(P,g)?(0,Ut.pick)(P[g],Object.keys(C.properties)):(0,Ut.pick)(P,Object.keys(C.properties))),(0,Ut.isEqual)(T,w)&&(t=r)})}}),Math.max(t,0)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["one-of-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:4,vars:4,consts:[["tabs",""],[3,"layoutNode","layoutIndex","dataIndex"]],template:function(i,r){i&1&&(ee(0,"h4"),wn(1),Y(),le(2,"tabs-widget",1,0)),i&2&&(L(),go(r.options==null?null:r.options.description),L(),G("layoutNode",r.layoutNode())("layoutIndex",r.layoutIndex())("dataIndex",r.dataIndex()))},dependencies:[l$],encapsulation:2})}}return e})(),fte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutOrientation="vertical",this.radiosList=[],this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{};let t=this.layoutNode();(t.type==="radios-inline"||t.type==="radiobuttons")&&(this.layoutOrientation="horizontal"),this.radiosList=rl(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.jsf.initializeControl(this)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["radios-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:3,consts:[[3,"class","display","innerHTML"],[3,"class"],[3,"innerHTML"],["type","radio",3,"change","checked","disabled","id","name","value"]],template:function(i,r){i&1&&(te(0,MX,1,6,"label",0),te(1,kX,3,2,"div",1),te(2,qX,3,0,"div")),i&2&&(ne(r.options!=null&&r.options.title?0:-1),L(),ne(r.layoutOrientation==="horizontal"?1:-1),L(),ne(r.layoutOrientation!=="horizontal"?2:-1))},encapsulation:2})}}return e})(),Ng=(()=>{class e{constructor(){this.jsf=N(We),this.cdr=N($t),this.dataIndex=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.layout=H(void 0,{}),this.isOrderable=H(void 0,{}),this.isFlexItem=H(!1,{}),this.memoizationEnabled=H(!0,{}),this.sortPredicate=(t,i)=>{let r=this.layout()[t];return this.isDraggable(r)},this._getSelectFrameworkInputsRaw=(t,i)=>{let r=this.dataIndex()||[],s=this.layoutIndex()||[];return{layoutNode:t,layoutIndex:[...s,i],dataIndex:t?.arrayItem?[...r,i]:r}},this._getSelectFrameworkInputsMemoized=(0,Ut.memoize)(this._getSelectFrameworkInputsRaw,(t,i)=>`${t?.id??JSON.stringify(t)}-${i}`),this._showWidgetRaw=t=>this.jsf.evaluateCondition(t,this.dataIndex()),this._showWidgetMemoized=(0,Ut.memoize)(this._showWidgetRaw,t=>JSON.stringify(t)+"-"+(this.dataIndex()||[]).join("-"))}drop(t){let i=t.previousIndex,r=t.currentIndex,s=this.layout()[r],l=s?.arrayItem?(this.dataIndex()||[]).concat(r):this.dataIndex()||[],u=(this.layoutIndex()||[]).concat(r),d={dataIndex:()=>l,layoutIndex:()=>u,layoutNode:()=>s};this.jsf.moveArrayItem(d,i,r,!0)}isDraggable(t){return t.arrayItem&&t.type!=="$ref"&&t.arrayItemType==="list"&&this.isOrderable()!==!1&&t.type!=="submit"}isFixed(t){return t.type=="$ref"}getFlexAttribute(t,i){let r=["flex-grow","flex-shrink","flex-basis"].indexOf(i);return((t.options||{}).flex||"").split(/\s+/)[r]||(t.options||{})[i]||["1","1","auto"][r]}getSelectFrameworkInputs(t,i){return this.memoizationEnabled?this._getSelectFrameworkInputsMemoized(t,i):this._getSelectFrameworkInputsRaw(t,i)}trackByFn(t,i){return i._id??t}ngOnChanges(t){(t.layout||t.dataIndex||t.layoutIndex)&&(this._showWidgetMemoized.cache.clear(),this._getSelectFrameworkInputsMemoized.cache.clear(),this.cdr.markForCheck())}showWidget(t){return this.memoizationEnabled?this._showWidgetMemoized(t):this._showWidgetRaw(t)}ngOnInit(){this.memoizationEnabled&&(this.dataChangesSubs=this.jsf.dataChanges.subscribe(t=>{this._showWidgetMemoized.cache.clear(),this.cdr.markForCheck()}))}ngOnDestroy(){this._getSelectFrameworkInputsMemoized.cache.clear(),this.dataChangesSubs?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["root-widget"]],inputs:{dataIndex:[1,"dataIndex"],layoutIndex:[1,"layoutIndex"],layout:[1,"layout"],isOrderable:[1,"isOrderable"],isFlexItem:[1,"isFlexItem"],memoizationEnabled:[1,"memoizationEnabled"]},standalone:!1,features:[Nt],decls:3,vars:3,consts:[["cdkDropList","",3,"cdkDropListDropped","cdkDropListSortPredicate"],["cdkDrag","",3,"cdkDragStartDelay","cdkDragDisabled","form-flex-item","align-self","flex-basis","flex-grow","flex-shrink","order"],["cdkDrag","",3,"cdkDragStartDelay","cdkDragDisabled"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(i,r){i&1&&(ee(0,"div",0),Ue("cdkDropListDropped",function(l){return r.drop(l)}),St(1,VX,2,18,"div",1,It),Y()),i&2&&(Ze("flex-inherit",!0),G("cdkDropListSortPredicate",r.sortPredicate),L(),Dt(r.layout()))},dependencies:[WP,UP,Rg],styles:["[draggable=true][_ngcontent-%COMP%]{transition:all .15s cubic-bezier(.4,0,.2,1)}[draggable=true][_ngcontent-%COMP%]:hover{cursor:move;box-shadow:2px 2px 4px #0003;position:relative;z-index:10;margin:-1px 1px 1px -1px}[draggable=true].drag-target-top[_ngcontent-%COMP%]{box-shadow:0 -2px #000;position:relative;z-index:20}[draggable=true].drag-target-bottom[_ngcontent-%COMP%]{box-shadow:0 2px #000;position:relative;z-index:20}.flex-inherit[_ngcontent-%COMP%]{display:inherit;flex-flow:inherit;flex-wrap:inherit;flex-direction:inherit;width:100%}"],changeDetection:0})}}return e})(),pte=(()=>{class e{constructor(){this.jsf=N(We)}transform(t,i){return this.jsf.parseText(t,i.value,i.values,i.key)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=S0({name:"textTemplate",type:e,pure:!0,standalone:!1})}}return e})(),hte=(()=>{class e{constructor(){this.jsf=N(We),this.expanded=!0,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.titleContext={value:{},values:{},key:null}}get sectionTitle(){return this.jsf.setItemTitle(this)}ngOnInit(){switch(this.jsf.initializeControl(this),this.options=this.layoutNode().options||{},this.expanded=typeof this.options.expanded=="boolean"?this.options.expanded:!this.options.expandable,this.layoutNode().type){case"fieldset":case"array":case"tab":case"advancedfieldset":case"authfieldset":case"optionfieldset":case"selectfieldset":this.containerType="fieldset";break;default:this.containerType="div";break}this.updateTitleContext(),this.dataChangesSubs=this.jsf.dataChanges.subscribe(t=>{this.updateTitleContext()})}toggleExpanded(){this.options.expandable&&(this.expanded=!this.expanded)}getFlexAttribute(t){let i=this.layoutNode().type==="flex"||!!this.options.displayFlex||this.options.display==="flex";if(t!=="flex"&&!i)return null;switch(t){case"is-flex":return i;case"display":return i?"flex":"initial";case"flex-direction":case"flex-wrap":let r=["flex-direction","flex-wrap"].indexOf(t);return(this.options["flex-flow"]||"").split(/\s+/)[r]||this.options[t]||["column","nowrap"][r];case"justify-content":case"align-items":case"align-content":return this.options[t]}}ngOnChanges(t){}updateTitleContext(){this.titleContext=this.jsf.getItemTitleContext(this)}ngOnDestroy(){this.dataChangesSubs?.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["section-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:2,consts:[[3,"class","expandable","expanded"],[3,"class","expandable","expanded","disabled"],[1,"legend",3,"class","innerHTML"],[3,"dataIndex","layout","layoutIndex","isFlexItem","isOrderable"],[1,"legend",3,"click","innerHTML"],[3,"disabled"],[1,"help-block",3,"class","innerHTML"],[1,"help-block",3,"innerHTML"]],template:function(i,r){i&1&&(te(0,BX,3,28,"div",0),te(1,JX,5,31,"fieldset",1)),i&2&&(ne(r.containerType==="div"?0:-1),L(),ne(r.containerType==="fieldset"?1:-1))},dependencies:[Ng,pte],styles:[".legend[_ngcontent-%COMP%]{font-weight:700}.expandable[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%], .expandable[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], .expanded[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%], .expanded[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{cursor:pointer;}.expandable[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%]:before, .expandable[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{font-weight:900;font-family:'Font Awesome 7 Free';content:'\\f054';padding-right:.3em;}.expanded[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%]:before, .expanded[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{font-weight:900;font-family:'Font Awesome 7 Free';content:'\\f078';padding-right:.2em;}"]})}}return e})(),mte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.selectListFlatGroup=[],this.isArray=R,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.selectList=rl(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!!this.options.flatList),this.selectListFlatGroup=rl(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!0),this.jsf.initializeControl(this),this.valueChanges=this.formControl.valueChanges.subscribe(t=>{t==="null"&&this.formControl.setValue(null)})}ngOnDestroy(){this.valueChanges&&this.valueChanges.unsubscribe()}deselectAll(){this.selectListFlatGroup.forEach(t=>{t.checked=!1})}updateValue(t){if(this.options.showErrors=!0,this.options.multiple){this.controlValue?.includes(null)?(this.deselectAll(),this.jsf.updateArrayMultiSelectList(this,[])):(this.selectListFlatGroup.forEach(i=>{i.checked=this.controlValue?.indexOf(i.value)>=0}),this.jsf.updateArrayMultiSelectList(this,this.selectListFlatGroup));return}this.jsf.updateValue(this,this.controlValue)}ngOnDestroy(){let t=this.options.multiple?[null]:null;this.formControl.reset(t),this.controlValue=null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["select-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[[3,"class","display","innerHTML"],[3,"formControl","class","id","name"],[3,"class","disabled","id","name"],[3,"class","disabled","id","multiple","name","ngModel"],[3,"innerHTML"],[3,"formControl","id","name"],[3,"ngValue"],[3,"label"],[3,"change","disabled","id","name"],[3,"selected","ngValue"],[3,"ngModelChange","change","disabled","id","multiple","name","ngModel"]],template:function(i,r){i&1&&(ee(0,"div"),te(1,ZX,1,6,"label",0),te(2,tee,3,8,"select",1),te(3,see,3,8,"select",2),te(4,dee,3,10,"select",3),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.options!=null&&r.options.title?1:-1),L(),ne(r.boundControl&&!(r.options!=null&&r.options.multiple)?2:-1),L(),ne(r.boundControl?-1:3),L(),ne(r.boundControl&&(r.options!=null&&r.options.multiple)?4:-1))},dependencies:[fu,pu,W0,Rf,tr,du,vo],encapsulation:2})}}return e})(),gte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnDestroy(){this.isValidChangesSubs?.unsubscribe(),this.isValidChangesSubs=null,this.updateValue({target:{value:null}})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),E(this.options,"disabled")?this.controlDisabled=this.options.disabled:this.jsf.formOptions.disableInvalidSubmit&&(this.controlDisabled=!this.jsf.isValid,this.isValidChangesSubs=this.jsf.isValidChanges.subscribe(t=>this.controlDisabled=!t)),(this.controlValue===null||this.controlValue===void 0)&&(this.controlValue=this.options.title)}updateValue(t){typeof this.options.onClick=="function"?this.options.onClick(t):this.jsf.updateValue(this,t.target.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["submit-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:14,consts:[[3,"click","disabled","id","name","type","value","appStopPropagation"]],template:function(i,r){if(i&1&&(ee(0,"div")(1,"input",0),Ue("click",function(l){return r.updateValue(l)}),Y()()),i&2){let s,l,u;X((r.options==null?null:r.options.htmlClass)||""),L(),X((r.options==null?null:r.options.fieldHtmlClass)||""),G("disabled",r.controlDisabled)("id","control"+((s=r.layoutNode())==null?null:s._id))("name",r.controlName)("type",(l=r.layoutNode())==null?null:l.type)("value",r.controlValue)("appStopPropagation",Zt(13,Gr)),_e("aria-describedby","control"+((u=r.layoutNode())==null?null:u._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required)}},dependencies:[ol],encapsulation:2})}}return e})(),_te=(()=>{class e{constructor(){this.jsf=N(We),this.newComponent=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.widgetContainer=cu("widgetContainer",{read:Mn})}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){let t=this.layoutNode(),i=this.widgetContainer();if(i&&!this.newComponent&&t.options.template&&(this.newComponent=i.createComponent(t.options.template)),this.newComponent)for(let r of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[r]=this[r]}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["template-widget"]],viewQuery:function(i,r){i&1&&lu(r.widgetContainer,$g,5,Mn),i&2&&uu()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(i,r){i&1&&le(0,"div",null,0)},encapsulation:2})}}return e})(),yte=(()=>{class e{constructor(){this.jsf=N(We),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(t){this.jsf.updateValue(this,t.target.value)}ngOnDestroy(){setTimeout(()=>{this.jsf.updateValue(this,null)})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["textarea-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:4,vars:5,consts:[[3,"class","display","innerHTML"],[3,"formControl","class","id","name"],[3,"class","disabled","id","name","value"],[3,"innerHTML"],[3,"formControl","id","name"],[3,"input","disabled","id","name","value"]],template:function(i,r){i&1&&(ee(0,"div"),te(1,fee,1,6,"label",0),te(2,pee,1,12,"textarea",1),te(3,hee,2,14,"textarea",2),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.options!=null&&r.options.title?1:-1),L(),ne(r.boundControl?2:-1),L(),ne(r.boundControl?-1:3))},dependencies:[Ns,tr,vo],encapsulation:2})}}return e})(),os=(()=>{class e{constructor(){this.defaultWidget="text",this.widgetLibrary={none:ute,root:Ng,"select-framework":Rg,"select-widget":Gc,$ref:nte,email:"text",integer:"number",number:cte,password:"text",search:"text",tel:"text",text:ate,url:"text",color:"text",date:"text",datetime:"text","datetime-local":"text",month:"text",range:"number",time:"text",week:"text",checkbox:rte,file:ste,hidden:"text",image:"text",radio:"radios",reset:"submit",submit:gte,button:ite,select:mte,textarea:yte,checkboxes:ote,"checkboxes-inline":"checkboxes",checkboxbuttons:"checkboxes",radios:fte,"radios-inline":"radios",radiobuttons:"radios",section:hte,div:"section",fieldset:"section",flex:"section","one-of":dte,array:"section",tabarray:"tabs",tab:"section",tabs:l$,message:lte,help:"message",msg:"message",html:"message",template:_te,advancedfieldset:"section",authfieldset:"section",optionfieldset:"one-of",selectfieldset:"one-of",conditional:"section",actions:"section",tagsinput:"section",updown:"number","iso-date-time":"datetime-local","alt-datetime":"datetime-local","alt-date":"date",wizard:"section",textline:"text",selectcheckbox:vte},this.registeredWidgets={},this.frameworkWidgets={},this.activeWidgets={},this.setActiveWidgets()}setActiveWidgets(){this.activeWidgets=Object.assign({},this.widgetLibrary,this.frameworkWidgets,this.registeredWidgets);for(let t of Object.keys(this.activeWidgets)){let i=this.activeWidgets[t];if(typeof i=="string"){let r=[];for(;typeof i=="string"&&!r.includes(i);)r.push(i),i=this.activeWidgets[i];typeof i!="string"&&(this.activeWidgets[t]=i)}}return!0}setDefaultWidget(t){return this.hasWidget(t)?(this.defaultWidget=t,!0):!1}hasWidget(t,i="activeWidgets"){return!t||typeof t!="string"?!1:E(this[i],t)}hasDefaultWidget(t){return this.hasWidget(t,"widgetLibrary")}registerWidget(t,i){return!t||!i||typeof t!="string"?!1:(this.registeredWidgets[t]=i,this.setActiveWidgets())}unRegisterWidget(t){return E(this.registeredWidgets,t)?(delete this.registeredWidgets[t],this.setActiveWidgets()):!1}unRegisterAllWidgets(t=!0){return this.registeredWidgets={},t&&(this.frameworkWidgets={}),this.setActiveWidgets()}registerFrameworkWidgets(t){return(t===null||typeof t!="object")&&(t={}),this.frameworkWidgets=t,this.setActiveWidgets()}unRegisterFrameworkWidgets(){return Object.keys(this.frameworkWidgets).length?(this.frameworkWidgets={},this.setActiveWidgets()):!1}getWidget(t,i="activeWidgets"){return this.hasWidget(t,i)?this[i][t]:this.hasWidget(this.defaultWidget,i)?this[i][this.defaultWidget]:null}getAllWidgets(){return{widgetLibrary:this.widgetLibrary,registeredWidgets:this.registeredWidgets,frameworkWidgets:this.frameworkWidgets,activeWidgets:this.activeWidgets}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Jr=(()=>{class e{constructor(t){this.frameworks=t,this.widgetLibrary=N(os),this.http=N(k0),this.activeFramework=null,this.loadExternalAssets=!1,this.frameworkLibrary={},this.frameworks.forEach(i=>this.frameworkLibrary[i.name]=i),this.defaultFramework=this.frameworks[0].name,this.activeFrameworkName=this.defaultFramework,this.activeFrameworkNameSubject=new Ae,this.activeFrameworkName$=this.activeFrameworkNameSubject.asObservable(),this.setFramework(this.defaultFramework)}setLoadExternalAssets(t=!0){this.loadExternalAssets=!!t}setFramework(t=this.defaultFramework,i=this.loadExternalAssets){return this.activeFramework=typeof t=="string"&&this.hasFramework(t)?this.frameworkLibrary[t]:typeof t=="object"&&E(t,"framework")?t:this.frameworkLibrary[this.defaultFramework],this.activeFramework.name!=this.activeFrameworkName&&(this.activeFrameworkName=this.activeFramework.name,this.activeFrameworkNameSubject.next(this.activeFrameworkName)),this.registerFrameworkWidgets(this.activeFramework)}registerFrameworkWidgets(t){return E(t,"widgets")?this.widgetLibrary.registerFrameworkWidgets(t.widgets):this.widgetLibrary.unRegisterFrameworkWidgets()}hasFramework(t){return E(this.frameworkLibrary,t)}getFramework(){return this.activeFramework||this.setFramework("default",!0),this.activeFramework.framework}getFrameworkList(){return this.frameworks.map(t=>({name:t.name,text:t.text}))}getFrameworkWidgets(){return this.activeFramework.widgets||{}}getFrameworkStylesheets(t=this.loadExternalAssets){return t&&this.activeFramework.stylesheets||[]}getFrameworkScripts(t=this.loadExternalAssets){return t&&this.activeFramework.scripts||[]}getFrameworkConfig(t){return(t||this.activeFramework).config}getFrameworkAssetConfig(t,i=!0){let s=`assets/${(t||this.activeFramework).name}/cssframework`,l=`${s}/assets.json`,u=this.http.get(l,{responseType:"text"});return h0(u).then(d=>{let p=JSON.parse(d);return i&&(p.stylesheets=p.stylesheets.map(m=>{let g=["/","//","http:","https:"],w=!1;return g.forEach(C=>{w=w||m.indexOf(C)==0}),w?m:`${s}/${m}`}),p.scripts=p.scripts.map(m=>`${s}/${m}`)),p})}getFrameworkThemes(){let t=this.getFrameworkConfig(),i;return t&&(i=t?.widgetstyles?.__themes__||[]),i}requestThemeChange(t,i=!1,r){let s=r||this.activeFramework;if(s.requestThemeChange){if(i){let u=this.getFrameworkThemes().filter(d=>d.name==t);if(!u||u.length==0)return!1}return s.requestThemeChange(t),!0}}getActiveTheme(t){let i=t||this.activeFramework;if(i.getActiveTheme)return i.getActiveTheme()}registerTheme(t,i){let r=i||this.activeFramework;if(r.registerTheme)return r.registerTheme(t)}unregisterTheme(t,i){let r=i||this.activeFramework;if(r.registerTheme)return r.unregisterTheme(t)}static{this.\u0275fac=function(i){return new(i||e)(ou(Kr))}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),vte=(()=>{class e{constructor(){this.jsf=N(We),this.jsfFLService=N(Jr),this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.selectListFlatGroup=[],this.isArray=R,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.frameworkStyles={daisyui:{selectClass:"select-box",optionClass:"checkbox tw:dui-checkbox",optionChecked:"active",optionUnchecked:""},"bootstrap-3":{selectClass:"select-box",optionClass:"bs3-option checkbox display-inline-block",optionChecked:"active",optionUnchecked:""},"bootstrap-4":{selectClass:"select-box",optionClass:"bs4-option checkbox display-inline-block",optionChecked:"active",optionUnchecked:""},"bootstrap-5":{selectClass:" select-box",optionClass:"form-check-input display-inline-block",optionChecked:"active",optionUnchecked:""}}}ngOnInit(){this.options=this.layoutNode().options||{},this.activeFramework=this.jsfFLService.activeFramework.name,this.selectList=rl(this.options.enumNames||this.options?.title&&[this.options?.title]||[this.layoutNode().name],[!0],!0,!!this.options.flatList),this.jsf.initializeControl(this),this.selectValue=[this.controlValue]}deselectAll(){this.selectListFlatGroup.forEach(t=>{t.checked=!1})}updateValue(t){this.options.showErrors=!0,this.controlValue=this.selectValue[0],this.jsf.updateValue(this,this.controlValue)}onSelectClicked(t){this.selectValue=this.selectValue&&this.selectValue[0]?[!1]:[!0],this.controlValue=this.selectValue[0],this.jsf.updateValue(this,this.controlValue)}ngOnDestroy(){let t=this.options.multiple?[null]:null;this.formControl.reset(t),this.controlValue=null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["selectcheckbox-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:4,consts:[[3,"class","multiple","id","name","ngModel"],[3,"class","multiple","disabled","id","name"],[3,"multiple","id","name","ngModel"],["type","checkbox",3,"class","active","unchecked-notusing","value"],[3,"innerHTML"],["type","checkbox",3,"click","value"],[3,"change","multiple","disabled","id","name"],["type","checkbox",3,"selected","class","checked-notusing","unchecked-notusing]","value"],["type","checkbox",3,"selected","value"]],template:function(i,r){i&1&&(ee(0,"div"),te(1,_ee,3,9,"select",0),te(2,bee,3,9,"select",1),Y()),i&2&&(X((r.options==null?null:r.options.htmlClass)||""),L(),ne(r.boundControl?1:-1),L(),ne(r.boundControl?-1:2))},dependencies:[fu,pu,Rf,tr,du],styles:['.select-box[_ngcontent-%COMP%]{font-size:16px;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;height:25px;overflow:hidden;text-overflow:ellipsis;background-color:#fff;color:#000;background-color:transparent}.select-box[_ngcontent-%COMP%]:focus{outline:none}.select-option[_ngcontent-%COMP%]{font-size:20px;color:#000;background-color:#fff;display:inline-block}.unchecked[_ngcontent-%COMP%]:before{content:"\\2610";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.checked[_ngcontent-%COMP%]:before{content:"\\2611";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.select-option[_ngcontent-%COMP%]:checked{background-image:linear-gradient(0deg,#fff 0% 100%);color:#000}.select-box[multiple][_ngcontent-%COMP%]:focus{background-color:transparent;color:#00f;-webkit-text-fill-color:black}.display-inline-block[_ngcontent-%COMP%]{display:inline-block}.bs4-option[_ngcontent-%COMP%], .bs3-option[_ngcontent-%COMP%]{width:14px;height:14px;border:solid 1px;color:#a9a9a9;min-block-size:auto;border-radius:3px}.bs4-option[_ngcontent-%COMP%]:checked[type=checkbox], .bs3-option[_ngcontent-%COMP%]:checked[type=checkbox]{background-image:url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!--%20License%3A%20MIT.%20Made%20by%20jaynewey%3A%20https%3A%2F%2Fgithub.com%2Fjaynewey%2Fcharm-icons%20--%3E%3Csvg%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222.5%22%3E%3Cpolyline%20points%3D%224%208.75%2C6.25%2012.25%2C13.25%203.5%22%2F%3E%3C%2Fsvg%3E);background-color:#00ced1}']})}}return e})();var Wr=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Tt({type:e})}static{this.\u0275inj=Ot({imports:[er,Nf,Mf,GP]})}}return e})(),bte=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Tt({type:e})}static{this.\u0275inj=Ot({providers:[{provide:Kr,useClass:tte,multi:!0}],imports:[er,Wr]})}}return e})(),wte={provide:F0,useExisting:bf(()=>Cte),multi:!0},Cte=(()=>{class e{constructor(){this.changeDetector=N($t),this.frameworkLibrary=N(Jr),this.widgetLibrary=N(os),this.jsf=N(We),this.unsubscribeOnActivateForm$=new Ae,this.formValueSubscription=null,this.formInitialized=!1,this.objectWrap=!1,this.previousInputs={schema:null,layout:null,data:null,options:null,framework:null,widgets:null,form:null,model:null,JSONSchema:null,UISchema:null,formData:null,loadExternalAssets:null,debug:null,ajvOptions:null},this.schema=H(void 0,{}),this.layout=H(void 0,{}),this.data=H(void 0,{}),this.options=H(void 0,{}),this.framework=H(void 0,{}),this.widgets=H(void 0,{}),this.form=H(void 0,{}),this.model=H(void 0,{}),this.JSONSchema=H(void 0,{}),this.UISchema=H(void 0,{}),this.formData=H(void 0,{}),this.ngModel=H(void 0,{}),this.language=H(void 0,{}),this.loadExternalAssets=H(void 0,{}),this.debug=H(void 0,{}),this.theme=H(void 0,{}),this.ajvOptions=H(void 0,{}),this.onChanges=Qn(),this.onSubmit=Qn(),this.isValid=Qn(),this.validationErrors=Qn(),this.formSchema=Qn(),this.formLayout=Qn(),this.dataChange=Qn(),this.modelChange=Qn(),this.formDataChange=Qn(),this.ngModelChange=Qn()}get value(){return this.objectWrap?this.jsf.data[1]:this.jsf.data}set value(t){this.setFormValues(t,!1)}ngOnDestroy(){this.dataChangesSubs?.unsubscribe(),this.statusChangesSubs?.unsubscribe(),this.isValidChangesSubs?.unsubscribe(),this.validationErrorChangesSubs?.unsubscribe(),this.dataChangesSubs=null,this.statusChangesSubs=null,this.isValidChangesSubs=null,this.validationErrorChangesSubs=null}getInputValue(t){return typeof this[t]=="function"?this[t]():this[t]}resetScriptsAndStyleSheets(){document.querySelectorAll(".ajsf").forEach(t=>t.remove())}loadScripts(t){(t||this.frameworkLibrary.getFrameworkScripts()).map(r=>{let s=document.createElement("script");s.src=r,s.type="text/javascript",s.async=!0,s.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(s)})}loadStyleSheets(t){(t||this.frameworkLibrary.getFrameworkStylesheets()).map(r=>{let s=document.createElement("link");s.rel="stylesheet",s.href=r,s.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(s)})}loadAssets(){this.frameworkLibrary.getFrameworkAssetConfig().then(t=>{this.resetScriptsAndStyleSheets(),this.loadScripts(t.scripts),this.loadStyleSheets(t.stylesheets)}).catch(t=>{console.log(t),this.resetScriptsAndStyleSheets(),this.loadScripts(),this.loadStyleSheets()})}ngOnInit(){this.updateForm(),this.loadAssets()}ngOnChanges(t){this.updateForm(),t.framework&&!t.framework.isFirstChange()&&t.framework.previousValue!==t.framework.currentValue&&this.loadAssets()}writeValue(t){this.setFormValues(t,!1),this.formValuesInput||(this.formValuesInput="ngModel")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.jsf.formOptions.formDisabled!==!!t&&(this.jsf.formOptions.formDisabled=!!t,this.initializeForm())}updateForm(){let t,i=this.language();if(!this.formInitialized||!this.formValuesInput||i&&i!==this.jsf.language)this.initializeForm();else{i&&i!==this.jsf.language&&this.jsf.setLanguage(i);let r=Object.keys(this.previousInputs).filter(u=>this.previousInputs[u]!==this.getInputValue(u)),s=!0;if(r.length===1&&r[0]==="form"&&this.formValuesInput.startsWith("form.")&&(r=Object.keys(this.previousInputs.form||{}).filter(u=>!(0,fn.default)(this.previousInputs.form[u],this.form()[u])).map(u=>`form.${u}`),s=!1),r.length===1&&r[0]===this.formValuesInput){if(this.formValuesInput.indexOf(".")===-1)t=this.getInputValue(this.formValuesInput);else{let[d,p]=this.formValuesInput.split(".");t=this.getInputValue(d)[p]}!Dg(t,this.jsf.data)?(this.initializeForm(t),this.onChange&&this.onChange(t),this.onTouched&&this.onTouched(t)):this.setFormValues(t,s)}else r.length&&(this.initializeForm(t),this.onChange&&this.onChange(this.jsf.formValues),this.onTouched&&this.onTouched(this.jsf.formValues));let l=this.theme();l&&l!==this.frameworkLibrary.getActiveTheme()?.name&&this.frameworkLibrary.requestThemeChange(l),Object.keys(this.previousInputs).filter(u=>this.previousInputs[u]!==this.getInputValue(u)).forEach(u=>this.previousInputs[u]=this.getInputValue(u))}}setFormValues(t,i=!0,r=!0,s=!0){if(t){let l=this.objectWrap?t[1]:t;this.jsf.formGroup?i&&this.jsf.formGroup.reset({},{emitEvent:r}):(this.jsf.formValues=t,this.activateForm()),this.jsf.formGroup&&(s?this.jsf.formGroup.patchValue(l,{emitEvent:r}):this.jsf.formGroup.setValue(l,{emitEvent:r})),this.onChange&&this.onChange(l),this.onTouched&&this.onTouched(l)}else this.jsf.formGroup.reset();this.changeDetector.markForCheck()}submitForm(){let t=this.jsf.validData;this.onSubmit.emit(this.objectWrap?t[1]:t)}initializeForm(t){if(this.schema()||this.layout()||this.data()||this.form()||this.model()||this.JSONSchema()||this.UISchema()||this.formData()||this.ngModel()||this.jsf.data){if(this.jsf.resetAllValues(),this.initializeAjv(),this.initializeOptions(),this.initializeSchema(),this.initializeLayout(),this.initializeData(),t&&(this.jsf.formValues=t),this.activateForm(),this.debug()||this.jsf.formOptions.debug){let i=[];this.debugOutput=i.map(r=>JSON.stringify(r,null,2)).join(`
|
|
89
89
|
`)}this.formInitialized=!0}}initializeAjv(){let t=this.form(),i=(0,xe.default)(this.ajvOptions())||t&&E(t,"ajvOptions")&&B(t.ajvOptions)&&(0,xe.default)(t.ajvOptions);i&&(this.ajvInstanceName=this.jsf.createAndRegisterAjvInstance(i).name)}initializeOptions(){let t=this.language();t&&t!==this.jsf.language&&this.jsf.setLanguage(t),this.jsf.setOptions({debug:!!this.debug()});let i=this.loadExternalAssets()||!1,r=this.framework()||"default",s=this.options();B(s)&&(this.jsf.setOptions(s),i=s.loadExternalAssets||i,r=s.framework||r);let l=this.form();B(l)&&B(l.options)&&(this.jsf.setOptions(l.options),i=l.options.loadExternalAssets||i,r=l.options.framework||r);let u=this.widgets();if(B(u)&&this.jsf.setOptions({widgets:u}),this.frameworkLibrary.setLoadExternalAssets(i),this.frameworkLibrary.setFramework(r),this.jsf.framework=this.frameworkLibrary.getFramework(),B(this.jsf.formOptions.widgets))for(let p of Object.keys(this.jsf.formOptions.widgets))this.widgetLibrary.registerWidget(p,this.jsf.formOptions.widgets[p]);B(l)&&B(l.tpldata)&&this.jsf.setTpldata(l.tpldata);let d=this.theme();d&&this.frameworkLibrary.requestThemeChange(d)}initializeSchema(){let t=this.form(),i=this.schema(),r=this.JSONSchema();B(i)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.schema=(0,xe.default)(i)):E(t,"schema")&&B(t.schema)?this.jsf.schema=(0,xe.default)(t.schema):B(r)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,xe.default)(r)):E(t,"JSONSchema")&&B(t.JSONSchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,xe.default)(t.JSONSchema)):E(t,"properties")&&B(t.properties)?this.jsf.schema=(0,xe.default)(t):B(t),ye(this.jsf.schema)||(gt("object",this.jsf.schema.type)&&(this.jsf.schema.type="object"),E(this.jsf.schema,"type")&&this.jsf.schema.type!=="object"?(this.jsf.schema={type:"object",properties:{1:this.jsf.schema}},this.objectWrap=!0):E(this.jsf.schema,"type")||(B(this.jsf.schema.properties)||B(this.jsf.schema.patternProperties)||B(this.jsf.schema.additionalProperties)?this.jsf.schema.type="object":(this.jsf.JsonFormCompatibility=!0,this.jsf.schema={type:"object",properties:this.jsf.schema})),this.jsf.schema=es(this.jsf.schema),this.jsf.schema=Hee(this.jsf.schema,this.jsf.schemaRefLibrary,this.jsf.schemaRecursiveRefMap,this.jsf.dataRecursiveRefMap,this.jsf.arrayMap),E(this.jsf.schemaRefLibrary,"")&&(this.jsf.hasRootReference=!0))}initializeData(){let t=this.form(),i=this.data(),r=this.model(),s=this.ngModel();de(i)?(this.jsf.formValues=(0,xe.default)(i),this.formValuesInput="data"):de(r)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,xe.default)(r),this.formValuesInput="model"):de(s)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,xe.default)(s),this.formValuesInput="ngModel"):B(t)&&de(t.value)?(this.jsf.JsonFormCompatibility=!0,this.jsf.formValues=(0,xe.default)(t.value),this.formValuesInput="form.value"):B(t)&&de(t.data)?(this.jsf.formValues=(0,xe.default)(t.data),this.formValuesInput="form.data"):de(this.formData())?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.formValuesInput="formData"):E(t,"formData")&&de(t.formData)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.formValues=(0,xe.default)(t.formData),this.formValuesInput="form.formData"):this.formValuesInput="data"}initializeLayout(){let t=d=>((B(d)||R(d))&&pn(d,(p,m)=>{E(p,"options")&&B(p.options)&&(p.titleMap=p.options,delete p.options)},"top-down"),d),i=this.form(),r=this.layout();R(r)?this.jsf.layout=(0,xe.default)(r):R(i)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.layout=(0,xe.default)(i)):i&&R(i.form)?(this.jsf.JsonFormCompatibility=!0,this.jsf.layout=t((0,xe.default)(i.form))):i&&R(i.layout)?this.jsf.layout=(0,xe.default)(i.layout):this.jsf.layout=["*"];let s=null,l=this.form(),u=this.UISchema();B(u)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,s=(0,xe.default)(u)):E(l,"UISchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,s=(0,xe.default)(l.UISchema)):E(l,"uiSchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,s=(0,xe.default)(l.uiSchema)):E(l,"customFormItems")&&(this.jsf.JsonFormCompatibility=!0,s=t((0,xe.default)(l.customFormItems))),s&&k.forEachDeep(s,(d,p)=>{let m=p.replace(/\//g,"/properties/").replace(/\/properties\/items\/properties\//g,"/items/properties/").replace(/\/properties\/titleMap\/properties\//g,"/titleMap/properties/");if(de(d)&&de(p)){let g=k.toKey(p),w=(k.parse(m)||[]).slice(0,-2),C;g.toLowerCase()==="ui:order"?C=[...w,"ui:order"]:(g.slice(0,3).toLowerCase()==="ui:"&&(g=g.slice(3)),C=[...w,"x-schema-form",g]),k.has(this.jsf.schema,w)&&!k.has(this.jsf.schema,C)&&k.set(this.jsf.schema,C,d)}})}activateForm(){if(this.unsubscribeOnActivateForm$.next(),ye(this.jsf.schema)&&(ye(this.jsf.formValues)||this.jsf.buildSchemaFromData()),ye(this.jsf.schema)||(this.jsf.buildLayout(this.widgetLibrary),this.jsf.buildFormGroupTemplate(this.jsf.formValues),this.jsf.buildFormGroup(this.ajvInstanceName)),this.jsf.formGroup){!ye(this.jsf.formValues)&&this.jsf.formOptions.setSchemaDefaults!==!0&&this.jsf.formOptions.setLayoutDefaults!==!0&&this.setFormValues(this.jsf.formValues),this.dataChangesSubs=this.jsf.dataChanges.pipe(Jn(this.unsubscribeOnActivateForm$)).subscribe(i=>{this.onChanges.emit(this.objectWrap?i[1]:i),this.formValuesInput&&this.formValuesInput.indexOf(".")===-1&&this[`${this.formValuesInput}Change`].emit(this.objectWrap?i[1]:i)}),this.statusChangesSubs=this.jsf.formGroup.statusChanges.pipe(Jn(this.unsubscribeOnActivateForm$)).subscribe(()=>this.changeDetector.markForCheck()),this.isValidChangesSubs=this.jsf.isValidChanges.pipe(Jn(this.unsubscribeOnActivateForm$)).subscribe(i=>this.isValid.emit(i)),this.validationErrorChangesSubs=this.jsf.validationErrorChanges.pipe(Jn(this.unsubscribeOnActivateForm$)).subscribe(i=>this.validationErrors.emit(i)),this.formSchema.emit(this.jsf.schema),this.formLayout.emit(this.jsf.layout),this.onChanges.emit(this.objectWrap?this.jsf.data[1]:this.jsf.data);let t=k.get(this.jsf,"/formOptions/validateOnRender");if(t){let i=r=>{(t===!0||de(r.value))&&r.markAsTouched(),Object.keys(r.controls||{}).forEach(s=>i(r.controls[s]))};i(this.jsf.formGroup),this.isValid.emit(this.jsf.isValid),this.validationErrors.emit(this.jsf.ajvErrors)}}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["json-schema-form"]],inputs:{schema:[1,"schema"],layout:[1,"layout"],data:[1,"data"],options:[1,"options"],framework:[1,"framework"],widgets:[1,"widgets"],form:[1,"form"],model:[1,"model"],JSONSchema:[1,"JSONSchema"],UISchema:[1,"UISchema"],formData:[1,"formData"],ngModel:[1,"ngModel"],language:[1,"language"],loadExternalAssets:[1,"loadExternalAssets"],debug:[1,"debug"],theme:[1,"theme"],ajvOptions:[1,"ajvOptions"],value:"value"},outputs:{onChanges:"onChanges",onSubmit:"onSubmit",isValid:"isValid",validationErrors:"validationErrors",formSchema:"formSchema",formLayout:"formLayout",dataChange:"dataChange",modelChange:"modelChange",formDataChange:"formDataChange",ngModelChange:"ngModelChange"},standalone:!1,features:[_o([We,wte]),Nt],decls:3,vars:3,consts:[[1,"json-schema-form",3,"ngSubmit","autocomplete"],[3,"layout"]],template:function(i,r){i&1&&(ee(0,"form",0),Ue("ngSubmit",function(){return r.submitForm()}),le(1,"root-widget",1),Y(),te(2,wee,4,1,"div")),i&2&&(G("autocomplete",!(r.jsf==null||r.jsf.formOptions==null)&&r.jsf.formOptions.autocomplete?"on":"off"),L(),G("layout",r.jsf==null?null:r.jsf.layout),L(),ne(r.debug()||!(r.jsf==null||r.jsf.formOptions==null)&&r.jsf.formOptions.debug?2:-1))},dependencies:[B0,j0,V0,Ng],encapsulation:2,changeDetection:0})}}return e})(),sl=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Tt({type:e})}static{this.\u0275inj=Ot({imports:[er,Nf,Mf,Wr,bte,Wr]})}}return e})();var ai=Jt(Im(),1);function Ite(e,n){if(e&1){let t=bt();ee(0,"button",5),Ue("click",function(){pt(t);let r=F();return ht(r.removeItem())}),ee(1,"span",6),wn(2,"\xD7"),Y(),ee(3,"span"),wn(4,"Close"),Y()()}if(e&2){let t=F();X(t.widgetStyles().__remove_item__),L(3),X(t.widgetStyles().__screen_reader__)}}function Ste(e,n){if(e&1&&le(0,"p",7),e&2){let t=F(2);X(t.widgetStyles().__help_block__),G("innerHTML",t.options==null?null:t.options.helpBlock,Ne)}}function Dte(e,n){if(e&1&&(ee(0,"div"),te(1,Ste,1,3,"p",2),Y()),e&2){let t=F();L(),ne(t.options!=null&&t.options.helpBlock?1:-1)}}function Ete(e,n){if(e&1&&le(0,"label",7),e&2){let t,i=F();X((i.options==null?null:i.options.labelHtmlClass)||""),Ze("sr-only",i.options==null?null:i.options.notitle),G("innerHTML",i.dynamicTitle,Ne),_e("for","control"+((t=i.layoutNode())==null?null:t._id))}}function Pte(e,n){if(e&1&&(ee(0,"p")(1,"strong"),wn(2,"*"),Y(),wn(3," = required fields "),Y()),e&2){let t=F();L(),X(t.widgetStyles().__required_asterisk__)}}function Ote(e,n){if(e&1&&le(0,"span",7),e&2){let t=F();X(t.widgetStyles().__field_addon_left__),G("innerHTML",t.options==null?null:t.options.fieldAddonLeft,Ne)}}function Tte(e,n){if(e&1&&le(0,"span",7),e&2){let t=F();X(t.widgetStyles().__field_addon_right__),G("innerHTML",t.options==null?null:t.options.fieldAddonRight,Ne)}}function $te(e,n){if(e&1&&le(0,"span",8),e&2){let t=F();Ze("glyphicon-ok",(t.options==null?null:t.options.enableSuccessState)&&!(t.formControl!=null&&t.formControl.errors))("glyphicon-remove",(t.options==null?null:t.options.enableErrorState)&&(t.formControl==null?null:t.formControl.errors))}}function Rte(e,n){if(e&1&&le(0,"p",7),e&2){let t=F(2);X(t.widgetStyles().__help_block__),G("innerHTML",t.options==null?null:t.options.helpBlock,Ne)}}function Nte(e,n){if(e&1&&(ee(0,"div"),te(1,Rte,1,3,"p",2),Y()),e&2){let t=F();L(),ne(t.options!=null&&t.options.helpBlock?1:-1)}}function Mte(e,n){if(e&1&&(ee(0,"div"),wn(1,"debug: "),ee(2,"pre"),wn(3),Y()()),e&2){let t=F();L(3),go(t.debugOutput)}}var al=(()=>{class e{constructor(){this.frameworkThemeSubject=new fo("default"),this.frameworkTheme$=this.frameworkThemeSubject.asObservable()}requestThemeChange(t){this.frameworkThemeSubject.next(t),this.activeRequestedTheme=t}getActiveRequestedTheme(){return this.activeRequestedTheme}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Mg=(()=>{class e{applyCssClasses(t,i,r){let s=this.widgetStyles()[t];(!s||ai.default.isEmpty(s))&&(s=this.widgetStyles().default),Object.keys(s).forEach(l=>{let u=s[l];u.length&&(i[l]=Li(i[l],u)),r&&(i[l]=Li(i[l],r))})}flattenWidgetStyles(t){var i={};let r=["__themes__"];return Object.keys(t).forEach(s=>{let l=t[s];if(r.indexOf(s)>=0){i[s]=l;return}ai.default.isArray(l)&&(i[s]=l.join(" ")),ai.default.isObject(l)&&(i[s]=i[s]||{},Object.keys(l).forEach(u=>{let d=l[u];ai.default.isArray(d)?i[s][u]=d.join(" "):i[s][u]=d})),ai.default.isString(l)&&(i[s]=l)}),i}constructor(){this.cdr=N($t),this.jsf=N(We),this.jsfFLService=N(Jr),this.cssFWService=N(al),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.dynamicTitle=null,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{}),this.widgetStyles=$0(void 0,{}),this.defaultStyling={array:{},default:{fieldHtmlClass:"cssfw-form-control"},__themes__:[{name:"notheme",text:"None"}],__remove_item__:"cssfw-remove-item",__array_item_nonref__:{htmlClass:"cssfw-array-item-nonref"},__active__:{activeClass:"cssfw-active"},__array__:{htmlClass:"cssfw-array"},__control_label__:{labelHtmlClass:"cssfw-control-label"},__form_group__:{htmlClass:"cssfw-form-group"},__field_addon_left__:"cssfw-addon-left",__field_addon_right__:"cssfw-addon-right",__help_block__:"cssfw-help-block",__required_asterisk__:"cssfw-required-astersisk",__screen_reader__:"cssfw-screen-reader"};let t=this.cssFWService,r=this.jsfFLService.activeFramework.config||{};this.widgetStyles.set(Object.assign(this.defaultStyling,r.widgetstyles));let s=this.widgetStyles().__themes__[0],l=t.activeRequestedTheme||s.name;this.theme=this.options?.theme||l}ngOnDestroy(){this.frameworkThemeSubs?.unsubscribe(),this.frameworkThemeSubs=null}get showRemoveButton(){let t=this.layoutNode();return!this.options.removable||this.options.readonly||t.type==="$ref"?!1:t.recursiveReference?!0:!t.arrayItem||!this.parentArray||this.parentArray.items.length-1<=this.parentArray.options.minItems?!1:t.arrayItemType==="list"?!0:this.layoutIndex()[this.layoutIndex().length-1]===this.parentArray.items.length-2}ngOnInit(){let t=this.cssFWService;this.frameworkThemeSubs=t.frameworkTheme$.subscribe(r=>{this.theme=r,this.cdr.detectChanges()}),this.initializeFramework();let i=this.layoutNode();i.arrayItem&&i.type!=="$ref"&&(this.parentArray=this.jsf.getParentNode(this),this.parentArray&&(this.isOrderable=i.arrayItemType==="list"&&!this.options.readonly&&this.parentArray.options.orderable))}ngOnChanges(t){this.frameworkInitialized||this.initializeFramework(),this.isDynamicTitle&&this.updateTitle()}initializeFramework(){let t=this.layoutNode();if(t){if(this.options=(0,ai.cloneDeep)(t.options),this.widgetLayoutNode=Ve(re({},t),{options:(0,ai.cloneDeep)(t.options)}),this.widgetOptions=this.widgetLayoutNode.options,this.formControl=this.jsf.getFormControl(this),this.options.isInputWidget=gt(t.type,["button","checkbox","checkboxes-inline","checkboxes","color","date","datetime-local","datetime","email","file","hidden","image","integer","month","number","password","radio","radiobuttons","radios-inline","radios","range","reset","search","select","submit","tel","text","textarea","time","url","week"]),this.isDynamicTitle=this.options?.title&&/{{.+?}}/.test(this.options.title),this.dynamicTitle=this.options?.title,!["$ref","advancedfieldset","authfieldset","button","card","checkbox","expansion-panel","help","message","msg","section","submit","tabarray","tabs"].includes(t.type)&&/{{.+?}}/.test(this.widgetOptions.title||"")&&this.updateTitle(),this.options.title=this.setTitle(),this.widgetOptions.title&&(this.dynamicTitle=""),this.options.htmlClass=Li(this.options.htmlClass,"schema-form-"+t.type),t.type==="array"?this.options.htmlClass=Li(this.options.htmlClass,this.widgetStyles().__array__.htmlClass):t.arrayItem&&t.type!=="$ref"?this.options.htmlClass=Li(this.options.htmlClass,this.widgetStyles().__array_item_nonref__.htmlClass):this.options.htmlClass=Li(this.options.htmlClass,this.widgetStyles().__form_group__.htmlClass),this.widgetOptions.htmlClass="",this.options.labelHtmlClass=Li(this.options.labelHtmlClass,this.widgetStyles().__control_label__.labelHtmlClass),this.widgetOptions.activeClass=Li(this.widgetOptions.activeClass,this.widgetStyles().__active__.activeClass),this.options.fieldAddonLeft=this.options.fieldAddonLeft||this.options.prepend,this.options.fieldAddonRight=this.options.fieldAddonRight||this.options.append,this.options.title&&t.type!=="tab"&&!this.options.notitle&&this.options.required&&!this.options.title.includes("*")){let i=this.widgetStyles().__required_asterisk__||"text-danger";this.options.title+=`<strong class="${i}">◦</strong>`}if(t.type=="optionfieldset"&&(this.options.messageLocation="top"),this.applyCssClasses(t.type,this.widgetOptions,this.options.style),this.formControl&&(this.updateHelpBlock(this.formControl.status),this.formControl.statusChanges.subscribe(i=>this.updateHelpBlock(i)),this.options.debug)){let i=[];this.debugOutput=(0,ai.map)(i,r=>JSON.stringify(r,null,2)).join(`
|
|
90
90
|
`)}this.updateTitle(),this.frameworkInitialized=!0}}updateHelpBlock(t){this.options.helpBlock=t==="INVALID"&&this.options.enableErrorState&&this.formControl.errors&&(this.formControl.dirty||this.options.feedbackOnRender)?this.jsf.formatErrors(this.formControl.errors,this.options.validationMessages):this.options.description||this.options.help||null}setTitle(){switch(this.layoutNode().type){case"button":case"checkbox":case"section":case"help":case"msg":case"submit":case"message":case"tabarray":case"tabs":case"$ref":return null;case"advancedfieldset":return this.widgetOptions.expandable=!0,this.widgetOptions.title="Advanced options",null;case"authfieldset":return this.widgetOptions.expandable=!0,this.widgetOptions.title="Authentication settings",null;case"fieldset":return this.widgetOptions.title=this.options.title,null;case"array":return this.widgetOptions.title=this.options.title,null;default:return this.widgetOptions.title=null,this.jsf.setItemTitle(this)}}updateTitle(){this.dynamicTitle=this.jsf.parseText(this.options?.title,this.jsf.getFormControlValue(this),this.jsf.getFormControlGroup(this)?.value,this.dataIndex()[this.dataIndex().length-1])}removeItem(){this.jsf.removeItem(this)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["css-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"],widgetStyles:[1,"widgetStyles"]},outputs:{widgetStyles:"widgetStylesChange"},standalone:!1,features:[Nt],decls:12,vars:24,consts:[["type","button",3,"class"],[3,"class","sr-only","innerHTML"],[3,"class","innerHTML"],[3,"layoutNode","dataIndex","layoutIndex"],["aria-hidden","true",1,"form-control-feedback","glyphicon",3,"glyphicon-ok","glyphicon-remove"],["type","button",3,"click"],["aria-hidden","true"],[3,"innerHTML"],["aria-hidden","true",1,"form-control-feedback","glyphicon"]],template:function(i,r){if(i&1&&(ee(0,"div"),te(1,Ite,5,4,"button",0),te(2,Dte,2,1,"div"),te(3,Ete,1,6,"label",1),te(4,Pte,4,2,"p"),ee(5,"div"),te(6,Ote,1,3,"span",2),le(7,"select-widget-widget",3),te(8,Tte,1,3,"span",2),Y(),te(9,$te,1,4,"span",4),te(10,Nte,2,1,"div"),Y(),te(11,Mte,4,1,"div")),i&2){let s,l,u,d;X((r.options==null?null:r.options.htmlClass)||""),Ze("has-feedback",(r.options==null?null:r.options.feedback)&&(r.options==null?null:r.options.isInputWidget)&&((r.formControl==null?null:r.formControl.dirty)||(r.options==null?null:r.options.feedbackOnRender)))("has-error",(r.options==null?null:r.options.enableErrorState)&&(r.formControl==null?null:r.formControl.errors)&&((r.formControl==null?null:r.formControl.dirty)||(r.options==null?null:r.options.feedbackOnRender)))("has-success",(r.options==null?null:r.options.enableSuccessState)&&!(r.formControl!=null&&r.formControl.errors)&&((r.formControl==null?null:r.formControl.dirty)||(r.options==null?null:r.options.feedbackOnRender))),_e("data-bs-theme",r.theme)("data-theme",r.theme),L(),ne(r.showRemoveButton?1:-1),L(),ne((r.options==null?null:r.options.messageLocation)==="top"&&((s=r.layoutNode())==null?null:s.type)!=="array"?2:-1),L(),ne(r.options!=null&&r.options.title&&((l=r.layoutNode())==null?null:l.type)!=="tab"?3:-1),L(),ne(((u=r.layoutNode())==null?null:u.type)==="submit"&&(!(r.jsf==null||r.jsf.formOptions==null)&&r.jsf.formOptions.fieldsRequired)?4:-1),L(),Ze("input-group",(r.options==null?null:r.options.fieldAddonLeft)||(r.options==null?null:r.options.fieldAddonRight)),L(),ne(r.options!=null&&r.options.fieldAddonLeft?6:-1),L(),G("layoutNode",r.widgetLayoutNode)("dataIndex",r.dataIndex())("layoutIndex",r.layoutIndex()),L(),ne(r.options!=null&&r.options.fieldAddonRight?8:-1),L(),ne(r.options!=null&&r.options.feedback&&(r.options!=null&&r.options.isInputWidget)&&!(r.options!=null&&r.options.fieldAddonRight)&&!r.layoutNode().arrayItem&&(r.formControl!=null&&r.formControl.dirty||r.options!=null&&r.options.feedbackOnRender)?9:-1),L(),ne((r.options==null?null:r.options.messageLocation)!=="top"&&((d=r.layoutNode())==null?null:d.type)!=="array"?10:-1),L(),ne(r.debug&&r.debugOutput?11:-1)}},dependencies:[Gc],styles:[`:host ::ng-deep .list-group-item .form-control-feedback{top:40px}:host ::ng-deep .checkbox,:host ::ng-deep .radio{margin-top:0;margin-bottom:0}:host ::ng-deep .checkbox-inline,:host ::ng-deep .checkbox-inline+.checkbox-inline,:host ::ng-deep .checkbox-inline+.radio-inline,:host ::ng-deep .radio-inline,:host ::ng-deep .radio-inline+.radio-inline,:host ::ng-deep .radio-inline+.checkbox-inline{margin-left:0;margin-right:10px}:host ::ng-deep .checkbox-inline:last-child,:host ::ng-deep .radio-inline:last-child{margin-right:0}:host ::ng-deep .ng-invalid.ng-touched{border:1px solid #f44336}.checkbox-inline,.checkbox-inline+.checkbox-inline,.checkbox-inline+.radio-inline,.radio-inline,.radio-inline+.radio-inline,.radio-inline+.checkbox-inline{margin-left:0;margin-right:10px}.checkbox-inline:last-child,.radio-inline:last-child{margin-right:0}.ng-invalid.ng-touched{border:1px solid #f44336}
|
|
91
91
|
`],encapsulation:2})}}return e})(),Ate=new Zn("CSS_FRAMEWORK_CFG"),u$;(function(e){class n{}e.csscategories=n})(u$||(u$={}));var c$=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Tt({type:e})}static{this.\u0275inj=Ot({providers:[We,Jr,os,al],imports:[sl,er,Wr]})}}return e})(),d$=(()=>{class e extends Kr{constructor(t){super(),this.cssFWService=N(al),this.name="css",this.framework=Mg,this.name=t.name,this.text=t.text||this.name,this.stylesheets=t.stylesheets,this.scripts=t.scripts,this.config=t,this.widgets=t.widgets}getActiveTheme(){let t=this.cssFWService.getActiveRequestedTheme(),i=this.config?.widgetstyles?.__themes__,r=i&&i[0];if(t&&(r={name:t,text:t},i)){let s=i.filter(l=>l.name==t);r=s&&s[0]||r}return r}requestThemeChange(t){this.cssFWService.requestThemeChange(t)}registerTheme(t,i=!0){let s=(this.config?.widgetstyles?.__themes__||[]).filter(l=>t.name==l.name);if(s&&s[0]){if(i)return s[0].text=t.text,!0;if(!i)return!1}if(!s||s.length==0){let l=this.config;return l.widgetstyles=this.config.widgetstyles||{},l.widgetstyles.__themes__=l.widgetstyles.__themes__||[],l.widgetstyles.__themes__.push(t),!0}}unregisterTheme(t){let i=this.config?.widgetstyles?.__themes__,r=-1;return i&&(i.forEach((s,l)=>{t==s.name&&(r=l)}),r>=0)?(i.splice(r,1),!0):!1}getConfig(){return this.config}static{this.\u0275fac=function(i){return new(i||e)(ou(Ate))}}static{this.\u0275prov=je({token:e,factory:e.\u0275fac})}}return e})();var Fte=(()=>{class e{constructor(){this.changeDetector=N($t),this.jsf=N(We),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.layoutNode=H(void 0,{}),this.layoutIndex=H(void 0,{}),this.dataIndex=H(void 0,{})}ngOnInit(){}ngOnChanges(){}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=$e({type:e,selectors:[["bootstrap-5-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Nt],decls:2,vars:3,consts:[[3,"layoutNode","layoutIndex","dataIndex"]],template:function(i,r){i&1&&(ee(0,"div"),le(1,"css-framework",0),Y()),i&2&&(L(),G("layoutNode",r.layoutNode())("layoutIndex",r.layoutIndex())("dataIndex",r.dataIndex()))},dependencies:[Mg],styles:[`:host ::ng-deep .list-group-item .list-group-item-hb .form-control-feedback{top:40px}:host ::ng-deep .checkbox,:host ::ng-deep .radio{margin-top:0;margin-bottom:0}:host ::ng-deep .checkbox-inline,:host ::ng-deep .checkbox-inline+.checkbox-inline,:host ::ng-deep .checkbox-inline+.radio-inline,:host ::ng-deep .radio-inline,:host ::ng-deep .radio-inline+.radio-inline,:host ::ng-deep .radio-inline+.checkbox-inline{margin-left:0;margin-right:10px}:host ::ng-deep .checkbox-inline:last-child,:host ::ng-deep .radio-inline:last-child{margin-right:0}:host ::ng-deep .ng-invalid.ng-touched{border:1px solid #f44336}.input-group .form-control:first-child,.input-group-text:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text:first-child{border-right:0}.input-group .form-control:last-child,.input-group-text:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text:last-child{border-left:0}.input-group .form-control:not(:first-child):not(:last-child),.input-group-text:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.btn-close>span:first-child{display:none}
|