homebridge-config-ui-x 5.4.2-beta.20 → 5.4.2-beta.21

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.
Files changed (61) hide show
  1. package/dist/core/spa/spa-html.service.d.ts +2 -3
  2. package/dist/core/spa/spa-html.service.js +21 -22
  3. package/dist/core/spa/spa-html.service.js.map +1 -1
  4. package/dist/main.js +1 -3
  5. package/dist/main.js.map +1 -1
  6. package/package.json +1 -1
  7. package/public/{chunk-SARARWVB.js → chunk-24MFIAJC.js} +1 -1
  8. package/public/{chunk-V4C2UK3E.js → chunk-2GPXWXUT.js} +1 -1
  9. package/public/{chunk-2WWJCZHM.js → chunk-5RI5TLFW.js} +1 -1
  10. package/public/{chunk-LEMGHTLZ.js → chunk-5YEBXXYW.js} +1 -1
  11. package/public/{chunk-H2RXQG5H.js → chunk-7FVJXUCR.js} +1 -1
  12. package/public/{chunk-YTQ2YMRY.js → chunk-ANRLCCQG.js} +1 -1
  13. package/public/{chunk-X4MPFU5C.js → chunk-BH4JDZF4.js} +1 -1
  14. package/public/{chunk-UWDXUOOS.js → chunk-BHMKIJVI.js} +1 -1
  15. package/public/{chunk-5BUCR3XW.js → chunk-C64P3A75.js} +1 -1
  16. package/public/{chunk-52MVDXGB.js → chunk-CDS2MSIW.js} +1 -1
  17. package/public/{chunk-AZV3CUCF.js → chunk-DOOSRLOB.js} +1 -1
  18. package/public/{chunk-SRQ6LPJT.js → chunk-E6AE64XW.js} +1 -1
  19. package/public/{chunk-QNIJXVUM.js → chunk-EKP4IO3L.js} +1 -1
  20. package/public/{chunk-YKYTNWAK.js → chunk-F6VJ3EFY.js} +1 -1
  21. package/public/{chunk-D6IDPBE4.js → chunk-FB6OF4XR.js} +1 -1
  22. package/public/{chunk-W5OGX7AA.js → chunk-G5PK6IZW.js} +1 -1
  23. package/public/{chunk-TGKSDRIM.js → chunk-GFPRNM6N.js} +1 -1
  24. package/public/{chunk-NN5OOBYB.js → chunk-GTGO4A2X.js} +1 -1
  25. package/public/{chunk-AOFPD5RE.js → chunk-IJXZNORX.js} +1 -1
  26. package/public/{chunk-OOMKUC2L.js → chunk-KCX2WQ7I.js} +1 -1
  27. package/public/{chunk-ZB4ICO2R.js → chunk-L432DR6J.js} +1 -1
  28. package/public/{chunk-2YQ45RVC.js → chunk-LNGNBQBM.js} +1 -1
  29. package/public/{chunk-TEH5OE3K.js → chunk-MCMJ5GFL.js} +1 -1
  30. package/public/{chunk-KYDJ2BOY.js → chunk-MIOXSBCB.js} +1 -1
  31. package/public/{chunk-W3QIEA7I.js → chunk-MKVX26LQ.js} +1 -1
  32. package/public/{chunk-D76J6X6T.js → chunk-MODJOHCZ.js} +1 -1
  33. package/public/{chunk-WRQFNDNS.js → chunk-NMHMMKMV.js} +1 -1
  34. package/public/{chunk-CH3TIV2C.js → chunk-NVX4KPO6.js} +1 -1
  35. package/public/{chunk-W7BYOOHZ.js → chunk-OLGI5A27.js} +1 -1
  36. package/public/{chunk-6IVWHMEH.js → chunk-P6VGWWMV.js} +1 -1
  37. package/public/{chunk-M6OUGTBW.js → chunk-PCCN3UQI.js} +1 -1
  38. package/public/{chunk-F5XX47TF.js → chunk-POHAQOWN.js} +1 -1
  39. package/public/{chunk-4UNAKMJH.js → chunk-PVFUJ4PR.js} +1 -1
  40. package/public/{chunk-T43ICSTP.js → chunk-QZJJX4BS.js} +1 -1
  41. package/public/{chunk-3TJEOX3U.js → chunk-RH474C2P.js} +1 -1
  42. package/public/{chunk-GTDOYUPC.js → chunk-RN2CW4V7.js} +1 -1
  43. package/public/{chunk-YK6LTORK.js → chunk-SEYIRMYP.js} +1 -1
  44. package/public/{chunk-2U7MBXGQ.js → chunk-SJP6OUG5.js} +1 -1
  45. package/public/{chunk-ZYKKMWVV.js → chunk-TXNEVPOK.js} +1 -1
  46. package/public/{chunk-TTXUXYHJ.js → chunk-UFFCOH7L.js} +1 -1
  47. package/public/{chunk-NZXJM7CQ.js → chunk-UO7UMJN3.js} +1 -1
  48. package/public/{chunk-YJJ3RKIW.js → chunk-UUM2722D.js} +1 -1
  49. package/public/{chunk-2K4LS57D.js → chunk-VNH6VAIL.js} +1 -1
  50. package/public/{chunk-YF4R6U5Q.js → chunk-VSICB3TW.js} +1 -1
  51. package/public/{chunk-TJ2BLEN2.js → chunk-W5UULTHE.js} +1 -1
  52. package/public/{chunk-FCS22ER4.js → chunk-XBQ6GTWH.js} +1 -1
  53. package/public/{chunk-CO2XUFAO.js → chunk-XHOBTVZN.js} +1 -1
  54. package/public/chunk-XSTH4HOH.js +1 -0
  55. package/public/{chunk-6EMSBLEJ.js → chunk-YBETHBKT.js} +1 -1
  56. package/public/{chunk-VWIK56CI.js → chunk-YGABEALD.js} +1 -1
  57. package/public/{chunk-3636BUVB.js → chunk-YWY6NRRB.js} +1 -1
  58. package/public/{chunk-XQLZOUM5.js → chunk-ZUW7E67I.js} +1 -1
  59. package/public/index.html +1 -1
  60. package/public/{main-FPE4AVNW.js → main-CVBTY5OH.js} +1 -1
  61. package/public/chunk-67M7OWPG.js +0 -1
@@ -1 +1 @@
1
- import{b as f,d,g as s}from"./chunk-MDV2S56W.js";import{k as u,n as l,q as h}from"./chunk-D6IDPBE4.js";import{Xa as a,ea as m,fa as i,h as p,ja as r,w as c}from"./chunk-3LEW5FOJ.js";var n=(()=>{class t{$api=r(h);$route=r(f);$router=r(d);$toastr=r(l);$translate=r(u);resolve(){return p(this,null,function*(){try{return yield c(this.$api.get("/platform-tools/docker/startup-script"))}catch(o){console.error(o),this.$toastr.error(o.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"],{relativeTo:this.$route})}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})();var $=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-4UNAKMJH.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-CO2XUFAO.js").then(t=>t.ContainerRestartComponent)}],S=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[s.forChild($),s]})}return t})();var b=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[S]})}return t})();export{b as DockerModule};
1
+ import{b as f,d,g as s}from"./chunk-MDV2S56W.js";import{k as u,n as l,q as h}from"./chunk-FB6OF4XR.js";import{Xa as a,ea as m,fa as i,h as p,ja as r,w as c}from"./chunk-3LEW5FOJ.js";var n=(()=>{class t{$api=r(h);$route=r(f);$router=r(d);$toastr=r(l);$translate=r(u);resolve(){return p(this,null,function*(){try{return yield c(this.$api.get("/platform-tools/docker/startup-script"))}catch(o){console.error(o),this.$toastr.error(o.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"],{relativeTo:this.$route})}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})();var $=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-PVFUJ4PR.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-XHOBTVZN.js").then(t=>t.ContainerRestartComponent)}],S=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[s.forChild($),s]})}return t})();var b=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[S]})}return t})();export{b as DockerModule};
@@ -1,4 +1,4 @@
1
- import{a as Wv}from"./chunk-V4C2UK3E.js";import{a as Im,c as Kv,d as $v,e as gn,f as Vs,g as _U}from"./chunk-ZYKKMWVV.js";import{a as Rv}from"./chunk-M7Q6VBJE.js";import{a as Vv}from"./chunk-KNZTEJFP.js";import{a as Gv}from"./chunk-SRQ6LPJT.js";import{a as Fv,b as Ov,c as qv}from"./chunk-MVMZJM7B.js";import{a as za}from"./chunk-KXMDG63G.js";import{a as Lv}from"./chunk-CCHRGHTT.js";import{a as dd,b as md}from"./chunk-EWO5Q2EI.js";import{a as ud,b as gd}from"./chunk-CIVLN3HQ.js";import{a as Uv}from"./chunk-H2RXQG5H.js";import{a as od,b as rd,c as nd,d as ad,e as ld,f as cd,g as un,m as zt,n as ei,o as Nv,p as Dv,q as Bv,r as Ev,s as Mv,t as $o}from"./chunk-BQMDK4YS.js";import{A as jv,B as Cs,C as Pa,a as Sv,b as Oo,c as Hr,e as ci,f as Cv,h as xv,i as Iv,j as Tv,k as Pv,l as cs,m as zv,o as Av,p as qo,s as dn,t as Vo,u as xm,v as Ko}from"./chunk-AM53KSWA.js";import{a as Go}from"./chunk-NZXJM7CQ.js";import{b as Os,d as qs}from"./chunk-MDV2S56W.js";import{b as jt}from"./chunk-2WWJCZHM.js";import{k as gt,l as At,n as mt,p as Lo,q as ot}from"./chunk-D6IDPBE4.js";import{$ as xa,Ba as an,D as dv,Db as ae,Ga as qe,Gb as Q,Hb as td,Ib as C,Jc as ls,Ka as hv,Kc as Fo,La as p,Lc as li,M as rn,Mb as Hm,Nb as Sm,Ob as Cm,Pa as Jc,Pb as Mo,Qa as go,Qb as Ro,Rb as bv,Sa as yr,Sb as Hs,Sc as sd,Tb as Fs,Ub as fe,Vb as A,Wa as we,Wb as le,Wc as kv,Xa as ln,Xb as ie,Y as km,Ya as vr,Yb as wr,Za as _v,Zb as id,_c as Hv,a as ye,ab as Ie,ac as lt,b as nt,bb as fv,bc as ct,c as rv,cb as Zc,cc as dt,da as uv,dc as yv,e as w,ea as Gi,ec as vv,fa as nn,fc as ut,g as at,gc as Ss,h as he,ha as gv,hc as kr,ia as mv,ic as as,ja as q,jc as cn,k as nv,kb as me,lb as U,mb as F,mc as N,n as Li,nc as M,o as wm,oa as J,ob as wi,oc as Et,pa as Z,pb as ki,q as av,qb as Hi,rb as I,sb as y,tb as b,ub as E,v as lv,vb as Qc,vc as Si,w as Re,wa as Yc,wb as Xc,wc as re,x as cv,xb as ed,xc as Uo,ya as Eo,yb as Ia,za as pv,zb as Ta,zc as wv}from"./chunk-3LEW5FOJ.js";var iw=w($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.formatNames=$s.fastFormats=$s.fullFormats=void 0;function Ks(e,i){return{validate:e,compare:i}}$s.fullFormats={date:Ks(Qv,Am),time:Ks(Pm(!0),jm),"date-time":Ks(Yv(!0),ew),"iso-time":Ks(Pm(),Xv),"iso-date-time":Ks(Yv(),tw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:kU,"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:PU,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:HU,int32:{type:"number",validate:xU},int64:{type:"number",validate:IU},float:{type:"number",validate:Zv},double:{type:"number",validate:Zv},password:!0,binary:!0};$s.fastFormats=nt(ye({},$s.fullFormats),{date:Ks(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Am),time:Ks(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,jm),"date-time":Ks(/^\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,ew),"iso-time":Ks(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Xv),"iso-date-time":Ks(/^\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,tw),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});$s.formatNames=Object.keys($s.fullFormats);function fU(e){return e%4===0&&(e%100!==0||e%400===0)}var bU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,yU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Qv(e){let i=bU.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&fU(t)?29:yU[s])}function Am(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Tm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Pm(e){return function(t){let s=Tm.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,m=+(s[6]||0),h=+(s[7]||0);if(m>23||h>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-h*u,S=o-m*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function jm(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Xv(e,i){if(!(e&&i))return;let t=Tm.exec(e),s=Tm.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var zm=/t|\s/i;function Yv(e){let i=Pm(e);return function(s){let o=s.split(zm);return o.length===2&&Qv(o[0])&&i(o[1])}}function ew(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function tw(e,i){if(!(e&&i))return;let[t,s]=e.split(zm),[o,n]=i.split(zm),l=Am(t,o);if(l!==void 0)return l||jm(s,n)}var vU=/\/|:/,wU=/^(?:[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 kU(e){return vU.test(e)&&wU.test(e)}var Jv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function HU(e){return Jv.lastIndex=0,Jv.test(e)}var SU=-(2**31),CU=2**31-1;function xU(e){return Number.isInteger(e)&&e<=CU&&e>=SU}function IU(e){return Number.isInteger(e)}function Zv(){return!0}var TU=/[^\\]\\Z/;function PU(e){if(TU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Na=w(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.regexpCode=Xe.getEsmExportName=Xe.getProperty=Xe.safeStringify=Xe.stringify=Xe.strConcat=Xe.addCodeArg=Xe.str=Xe._=Xe.nil=Xe._Code=Xe.Name=Xe.IDENTIFIER=Xe._CodeOrName=void 0;var Aa=class{};Xe._CodeOrName=Aa;Xe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Sr=class extends Aa{constructor(i){if(super(),!Xe.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Xe.Name=Sr;var ds=class extends Aa{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof Sr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Xe._Code=ds;Xe.nil=new ds("");function sw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Dm(t,i[s]),t.push(e[++s]);return new ds(t)}Xe._=sw;var Nm=new ds("+");function ow(e,...i){let t=[ja(e[0])],s=0;for(;s<i.length;)t.push(Nm),Dm(t,i[s]),t.push(Nm,ja(e[++s]));return zU(t),new ds(t)}Xe.str=ow;function Dm(e,i){i instanceof ds?e.push(...i._items):i instanceof Sr?e.push(i):e.push(NU(i))}Xe.addCodeArg=Dm;function zU(e){let i=1;for(;i<e.length-1;){if(e[i]===Nm){let t=AU(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function AU(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof Sr||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof Sr))return`"${e}${i.slice(1)}`}function jU(e,i){return i.emptyStr()?e:e.emptyStr()?i:ow`${e}${i}`}Xe.strConcat=jU;function NU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ja(Array.isArray(e)?e.join(","):e)}function DU(e){return new ds(ja(e))}Xe.stringify=DU;function ja(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Xe.safeStringify=ja;function BU(e){return typeof e=="string"&&Xe.IDENTIFIER.test(e)?new ds(`.${e}`):sw`[${e}]`}Xe.getProperty=BU;function EU(e){if(typeof e=="string"&&Xe.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Xe.getEsmExportName=EU;function MU(e){return new ds(e.toString())}Xe.regexpCode=MU});var Mm=w(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ValueScope=Ni.ValueScopeName=Ni.Scope=Ni.varKinds=Ni.UsedValueState=void 0;var ji=Na(),Bm=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},pd=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(pd||(Ni.UsedValueState=pd={}));Ni.varKinds={const:new ji.Name("const"),let:new ji.Name("let"),var:new ji.Name("var")};var hd=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof ji.Name?i:this.name(i)}name(i){return new ji.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ni.Scope=hd;var _d=class extends ji.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,ji._)`.${new ji.Name(t)}[${s}]`}};Ni.ValueScopeName=_d;var RU=(0,ji._)`\n`,Em=class extends hd{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=nt(ye({},i),{_n:i.lines?RU:ji.nil})}get(){return this._scope}name(i){return new _d(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let h=c.get(l);if(h)return h}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),m=u.length;return u[m]=t.ref,o.setValue(t,{property:n,itemIndex:m}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,ji._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=ji.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(m=>{if(u.has(m))return;u.set(m,pd.Started);let h=t(m);if(h){let f=this.opts.es5?Ni.varKinds.var:Ni.varKinds.const;n=(0,ji._)`${n}${f} ${m} = ${h};${this.opts._n}`}else if(h=o?.(m))n=(0,ji._)`${n}${h}${this.opts._n}`;else throw new Bm(m);u.set(m,pd.Completed)})}return n}};Ni.ValueScope=Em});var ke=w(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.or=Oe.and=Oe.not=Oe.CodeGen=Oe.operators=Oe.varKinds=Oe.ValueScopeName=Oe.ValueScope=Oe.Scope=Oe.Name=Oe.regexpCode=Oe.stringify=Oe.getProperty=Oe.nil=Oe.strConcat=Oe.str=Oe._=void 0;var Je=Na(),xs=Mm(),Wo=Na();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Wo._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Wo.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Wo.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Wo.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Wo.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Wo.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Wo.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Wo.Name}});var wd=Mm();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return wd.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return wd.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return wd.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return wd.varKinds}});Oe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var mo=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Rm=class extends mo{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?xs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=mn(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},bd=class extends mo{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=mn(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:ye({},this.lhs.names);return vd(i,this.rhs)}},Um=class extends bd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},Fm=class extends mo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Om=class extends mo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},qm=class extends mo{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Vm=class extends mo{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=mn(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Da=class extends mo{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(UU(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Cr(i,t.names),{})}},po=class extends Da{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Km=class extends Da{},$m=(()=>{class e extends po{}return e.kind="else",e})(),fd=(()=>{class e extends po{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new $m(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(cw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=mn(this.condition,t,s),this}get names(){let t=super.names;return vd(t,this.condition),this.else&&Cr(t,this.else.names),t}}return e.kind="if",e})(),kd=(()=>{class e extends po{}return e.kind="for",e})(),Lm=class extends kd{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=mn(this.iteration,i,t),this}get names(){return Cr(super.names,this.iteration.names)}},Gm=class extends kd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?xs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=vd(super.names,this.from);return vd(i,this.to)}},yd=class extends kd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=mn(this.iterable,i,t),this}get names(){return Cr(super.names,this.iterable.names)}},rw=(()=>{class e extends po{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),nw=(()=>{class e extends Da{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Wm=class extends po{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Cr(i,this.catch.names),this.finally&&Cr(i,this.finally.names),i}},aw=(()=>{class e extends po{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),lw=(()=>{class e extends po{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Ym=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=nt(ye({},t),{_n:t.lines?`
1
+ import{a as Wv}from"./chunk-2GPXWXUT.js";import{a as Im,c as Kv,d as $v,e as gn,f as Vs,g as _U}from"./chunk-TXNEVPOK.js";import{a as Rv}from"./chunk-M7Q6VBJE.js";import{a as Vv}from"./chunk-KNZTEJFP.js";import{a as Gv}from"./chunk-E6AE64XW.js";import{a as Fv,b as Ov,c as qv}from"./chunk-MVMZJM7B.js";import{a as za}from"./chunk-KXMDG63G.js";import{a as Lv}from"./chunk-CCHRGHTT.js";import{a as dd,b as md}from"./chunk-EWO5Q2EI.js";import{a as ud,b as gd}from"./chunk-CIVLN3HQ.js";import{a as Uv}from"./chunk-7FVJXUCR.js";import{a as od,b as rd,c as nd,d as ad,e as ld,f as cd,g as un,m as zt,n as ei,o as Nv,p as Dv,q as Bv,r as Ev,s as Mv,t as $o}from"./chunk-BQMDK4YS.js";import{A as jv,B as Cs,C as Pa,a as Sv,b as Oo,c as Hr,e as ci,f as Cv,h as xv,i as Iv,j as Tv,k as Pv,l as cs,m as zv,o as Av,p as qo,s as dn,t as Vo,u as xm,v as Ko}from"./chunk-AM53KSWA.js";import{a as Go}from"./chunk-UO7UMJN3.js";import{b as Os,d as qs}from"./chunk-MDV2S56W.js";import{b as jt}from"./chunk-5RI5TLFW.js";import{k as gt,l as At,n as mt,p as Lo,q as ot}from"./chunk-FB6OF4XR.js";import{$ as xa,Ba as an,D as dv,Db as ae,Ga as qe,Gb as Q,Hb as td,Ib as C,Jc as ls,Ka as hv,Kc as Fo,La as p,Lc as li,M as rn,Mb as Hm,Nb as Sm,Ob as Cm,Pa as Jc,Pb as Mo,Qa as go,Qb as Ro,Rb as bv,Sa as yr,Sb as Hs,Sc as sd,Tb as Fs,Ub as fe,Vb as A,Wa as we,Wb as le,Wc as kv,Xa as ln,Xb as ie,Y as km,Ya as vr,Yb as wr,Za as _v,Zb as id,_c as Hv,a as ye,ab as Ie,ac as lt,b as nt,bb as fv,bc as ct,c as rv,cb as Zc,cc as dt,da as uv,dc as yv,e as w,ea as Gi,ec as vv,fa as nn,fc as ut,g as at,gc as Ss,h as he,ha as gv,hc as kr,ia as mv,ic as as,ja as q,jc as cn,k as nv,kb as me,lb as U,mb as F,mc as N,n as Li,nc as M,o as wm,oa as J,ob as wi,oc as Et,pa as Z,pb as ki,q as av,qb as Hi,rb as I,sb as y,tb as b,ub as E,v as lv,vb as Qc,vc as Si,w as Re,wa as Yc,wb as Xc,wc as re,x as cv,xb as ed,xc as Uo,ya as Eo,yb as Ia,za as pv,zb as Ta,zc as wv}from"./chunk-3LEW5FOJ.js";var iw=w($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.formatNames=$s.fastFormats=$s.fullFormats=void 0;function Ks(e,i){return{validate:e,compare:i}}$s.fullFormats={date:Ks(Qv,Am),time:Ks(Pm(!0),jm),"date-time":Ks(Yv(!0),ew),"iso-time":Ks(Pm(),Xv),"iso-date-time":Ks(Yv(),tw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:kU,"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:PU,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:HU,int32:{type:"number",validate:xU},int64:{type:"number",validate:IU},float:{type:"number",validate:Zv},double:{type:"number",validate:Zv},password:!0,binary:!0};$s.fastFormats=nt(ye({},$s.fullFormats),{date:Ks(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Am),time:Ks(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,jm),"date-time":Ks(/^\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,ew),"iso-time":Ks(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Xv),"iso-date-time":Ks(/^\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,tw),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});$s.formatNames=Object.keys($s.fullFormats);function fU(e){return e%4===0&&(e%100!==0||e%400===0)}var bU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,yU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Qv(e){let i=bU.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&fU(t)?29:yU[s])}function Am(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Tm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Pm(e){return function(t){let s=Tm.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,m=+(s[6]||0),h=+(s[7]||0);if(m>23||h>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-h*u,S=o-m*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function jm(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Xv(e,i){if(!(e&&i))return;let t=Tm.exec(e),s=Tm.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var zm=/t|\s/i;function Yv(e){let i=Pm(e);return function(s){let o=s.split(zm);return o.length===2&&Qv(o[0])&&i(o[1])}}function ew(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function tw(e,i){if(!(e&&i))return;let[t,s]=e.split(zm),[o,n]=i.split(zm),l=Am(t,o);if(l!==void 0)return l||jm(s,n)}var vU=/\/|:/,wU=/^(?:[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 kU(e){return vU.test(e)&&wU.test(e)}var Jv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function HU(e){return Jv.lastIndex=0,Jv.test(e)}var SU=-(2**31),CU=2**31-1;function xU(e){return Number.isInteger(e)&&e<=CU&&e>=SU}function IU(e){return Number.isInteger(e)}function Zv(){return!0}var TU=/[^\\]\\Z/;function PU(e){if(TU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Na=w(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.regexpCode=Xe.getEsmExportName=Xe.getProperty=Xe.safeStringify=Xe.stringify=Xe.strConcat=Xe.addCodeArg=Xe.str=Xe._=Xe.nil=Xe._Code=Xe.Name=Xe.IDENTIFIER=Xe._CodeOrName=void 0;var Aa=class{};Xe._CodeOrName=Aa;Xe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Sr=class extends Aa{constructor(i){if(super(),!Xe.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Xe.Name=Sr;var ds=class extends Aa{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof Sr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Xe._Code=ds;Xe.nil=new ds("");function sw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Dm(t,i[s]),t.push(e[++s]);return new ds(t)}Xe._=sw;var Nm=new ds("+");function ow(e,...i){let t=[ja(e[0])],s=0;for(;s<i.length;)t.push(Nm),Dm(t,i[s]),t.push(Nm,ja(e[++s]));return zU(t),new ds(t)}Xe.str=ow;function Dm(e,i){i instanceof ds?e.push(...i._items):i instanceof Sr?e.push(i):e.push(NU(i))}Xe.addCodeArg=Dm;function zU(e){let i=1;for(;i<e.length-1;){if(e[i]===Nm){let t=AU(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function AU(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof Sr||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof Sr))return`"${e}${i.slice(1)}`}function jU(e,i){return i.emptyStr()?e:e.emptyStr()?i:ow`${e}${i}`}Xe.strConcat=jU;function NU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ja(Array.isArray(e)?e.join(","):e)}function DU(e){return new ds(ja(e))}Xe.stringify=DU;function ja(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Xe.safeStringify=ja;function BU(e){return typeof e=="string"&&Xe.IDENTIFIER.test(e)?new ds(`.${e}`):sw`[${e}]`}Xe.getProperty=BU;function EU(e){if(typeof e=="string"&&Xe.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Xe.getEsmExportName=EU;function MU(e){return new ds(e.toString())}Xe.regexpCode=MU});var Mm=w(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ValueScope=Ni.ValueScopeName=Ni.Scope=Ni.varKinds=Ni.UsedValueState=void 0;var ji=Na(),Bm=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},pd=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(pd||(Ni.UsedValueState=pd={}));Ni.varKinds={const:new ji.Name("const"),let:new ji.Name("let"),var:new ji.Name("var")};var hd=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof ji.Name?i:this.name(i)}name(i){return new ji.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ni.Scope=hd;var _d=class extends ji.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,ji._)`.${new ji.Name(t)}[${s}]`}};Ni.ValueScopeName=_d;var RU=(0,ji._)`\n`,Em=class extends hd{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=nt(ye({},i),{_n:i.lines?RU:ji.nil})}get(){return this._scope}name(i){return new _d(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let h=c.get(l);if(h)return h}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),m=u.length;return u[m]=t.ref,o.setValue(t,{property:n,itemIndex:m}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,ji._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=ji.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(m=>{if(u.has(m))return;u.set(m,pd.Started);let h=t(m);if(h){let f=this.opts.es5?Ni.varKinds.var:Ni.varKinds.const;n=(0,ji._)`${n}${f} ${m} = ${h};${this.opts._n}`}else if(h=o?.(m))n=(0,ji._)`${n}${h}${this.opts._n}`;else throw new Bm(m);u.set(m,pd.Completed)})}return n}};Ni.ValueScope=Em});var ke=w(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.or=Oe.and=Oe.not=Oe.CodeGen=Oe.operators=Oe.varKinds=Oe.ValueScopeName=Oe.ValueScope=Oe.Scope=Oe.Name=Oe.regexpCode=Oe.stringify=Oe.getProperty=Oe.nil=Oe.strConcat=Oe.str=Oe._=void 0;var Je=Na(),xs=Mm(),Wo=Na();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Wo._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Wo.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Wo.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Wo.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Wo.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Wo.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Wo.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Wo.Name}});var wd=Mm();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return wd.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return wd.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return wd.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return wd.varKinds}});Oe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var mo=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Rm=class extends mo{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?xs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=mn(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},bd=class extends mo{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=mn(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:ye({},this.lhs.names);return vd(i,this.rhs)}},Um=class extends bd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},Fm=class extends mo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Om=class extends mo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},qm=class extends mo{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Vm=class extends mo{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=mn(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Da=class extends mo{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(UU(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Cr(i,t.names),{})}},po=class extends Da{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Km=class extends Da{},$m=(()=>{class e extends po{}return e.kind="else",e})(),fd=(()=>{class e extends po{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new $m(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(cw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=mn(this.condition,t,s),this}get names(){let t=super.names;return vd(t,this.condition),this.else&&Cr(t,this.else.names),t}}return e.kind="if",e})(),kd=(()=>{class e extends po{}return e.kind="for",e})(),Lm=class extends kd{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=mn(this.iteration,i,t),this}get names(){return Cr(super.names,this.iteration.names)}},Gm=class extends kd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?xs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=vd(super.names,this.from);return vd(i,this.to)}},yd=class extends kd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=mn(this.iterable,i,t),this}get names(){return Cr(super.names,this.iterable.names)}},rw=(()=>{class e extends po{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),nw=(()=>{class e extends Da{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Wm=class extends po{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Cr(i,this.catch.names),this.finally&&Cr(i,this.finally.names),i}},aw=(()=>{class e extends po{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),lw=(()=>{class e extends po{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Ym=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=nt(ye({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new xs.Scope({parent:i}),this._nodes=[new Km]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,o){let n=this._scope.toName(t);return s!==void 0&&o&&(this._constants[n.str]=s),this._leafNode(new Rm(i,n,s)),n}const(i,t,s){return this._def(xs.varKinds.const,i,t,s)}let(i,t,s){return this._def(xs.varKinds.let,i,t,s)}var(i,t,s){return this._def(xs.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new bd(i,t,s))}add(i,t){return this._leafNode(new Um(i,Oe.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==Je.nil&&this._leafNode(new Vm(i)),this}object(...i){let t=["{"];for(let[s,o]of i)t.length>1&&t.push(","),t.push(s),(s!==o||this.opts.es5)&&(t.push(":"),(0,Je.addCodeArg)(t,o));return t.push("}"),new Je._Code(t)}if(i,t,s){if(this._blockNode(new fd(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new fd(i))}else(){return this._elseNode(new $m)}endIf(){return this._endBlockNode(fd,$m)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new Lm(i),t)}forRange(i,t,s,o,n=this.opts.es5?xs.varKinds.var:xs.varKinds.let){let l=this._scope.toName(i);return this._for(new Gm(n,l,t,s),()=>o(l))}forOf(i,t,s,o=xs.varKinds.const){let n=this._scope.toName(i);if(this.opts.es5){let l=t instanceof Je.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Je._)`${l}.length`,c=>{this.var(n,(0,Je._)`${l}[${c}]`),s(n)})}return this._for(new yd("of",o,n,t),()=>s(n))}forIn(i,t,s,o=this.opts.es5?xs.varKinds.var:xs.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,Je._)`Object.keys(${t})`,s);let n=this._scope.toName(i);return this._for(new yd("in",o,n,t),()=>s(n))}endFor(){return this._endBlockNode(kd)}label(i){return this._leafNode(new Fm(i))}break(i){return this._leafNode(new Om(i))}return(i){let t=new nw;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(nw)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new Wm;if(this._blockNode(o),this.code(i),t){let n=this.name("e");this._currNode=o.catch=new aw(n),t(n)}return s&&(this._currNode=o.finally=new lw,this.code(s)),this._endBlockNode(aw,lw)}throw(i){return this._leafNode(new qm(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=Je.nil,s,o){return this._blockNode(new rw(i,t,s)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(rw)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof fd))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};Oe.CodeGen=Ym;function Cr(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function vd(e,i){return i instanceof Je._CodeOrName?Cr(e,i.names):e}function mn(e,i,t){if(e instanceof Je.Name)return s(e);if(!o(e))return e;return new Je._Code(e._items.reduce((n,l)=>(l instanceof Je.Name&&(l=s(l)),l instanceof Je._Code?n.push(...l._items):n.push(l),n),[]));function s(n){let l=t[n.str];return l===void 0||i[n.str]!==1?n:(delete i[n.str],l)}function o(n){return n instanceof Je._Code&&n._items.some(l=>l instanceof Je.Name&&i[l.str]===1&&t[l.str]!==void 0)}}function UU(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function cw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Je._)`!${Jm(e)}`}Oe.not=cw;var FU=dw(Oe.operators.AND);function OU(...e){return e.reduce(FU)}Oe.and=OU;var qU=dw(Oe.operators.OR);function VU(...e){return e.reduce(qU)}Oe.or=VU;function dw(e){return(i,t)=>i===Je.nil?t:t===Je.nil?i:(0,Je._)`${Jm(i)} ${e} ${Jm(t)}`}function Jm(e){return e instanceof Je.Name?e:(0,Je._)`(${e})`}});var $e=w(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.checkStrictMode=Ve.getErrorPath=Ve.Type=Ve.useFunc=Ve.setEvaluated=Ve.evaluatedPropsToName=Ve.mergeEvaluated=Ve.eachItem=Ve.unescapeJsonPointer=Ve.escapeJsonPointer=Ve.escapeFragment=Ve.unescapeFragment=Ve.schemaRefOrVal=Ve.schemaHasRulesButRef=Ve.schemaHasRules=Ve.checkUnknownRules=Ve.alwaysValidSchema=Ve.toHash=void 0;var ft=ke(),KU=Na();function $U(e){let i={};for(let t of e)i[t]=!0;return i}Ve.toHash=$U;function LU(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(mw(e,i),!pw(i,e.self.RULES.all))}Ve.alwaysValidSchema=LU;function mw(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let o=s.RULES.keywords;for(let n in i)o[n]||fw(e,`unknown keyword: "${n}"`)}Ve.checkUnknownRules=mw;function pw(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}Ve.schemaHasRules=pw;function GU(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}Ve.schemaHasRulesButRef=GU;function WU({topSchemaRef:e,schemaPath:i},t,s,o){if(!o){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,ft._)`${t}`}return(0,ft._)`${e}${i}${(0,ft.getProperty)(s)}`}Ve.schemaRefOrVal=WU;function YU(e){return hw(decodeURIComponent(e))}Ve.unescapeFragment=YU;function JU(e){return encodeURIComponent(Qm(e))}Ve.escapeFragment=JU;function Qm(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ve.escapeJsonPointer=Qm;function hw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ve.unescapeJsonPointer=hw;function ZU(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}Ve.eachItem=ZU;function uw({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(o,n,l,c)=>{let u=l===void 0?n:l instanceof ft.Name?(n instanceof ft.Name?e(o,n,l):i(o,n,l),l):n instanceof ft.Name?(i(o,l,n),n):t(n,l);return c===ft.Name&&!(u instanceof ft.Name)?s(o,u):u}}Ve.mergeEvaluated={props:uw({mergeNames:(e,i,t)=>e.if((0,ft._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,ft._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,ft._)`${t} || {}`).code((0,ft._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,ft._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,ft._)`${t} || {}`),Xm(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:ye(ye({},e),i),resultToName:_w}),items:uw({mergeNames:(e,i,t)=>e.if((0,ft._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,ft._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,ft._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,ft._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function _w(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,ft._)`{}`);return i!==void 0&&Xm(e,t,i),t}Ve.evaluatedPropsToName=_w;function Xm(e,i,t){Object.keys(t).forEach(s=>e.assign((0,ft._)`${i}${(0,ft.getProperty)(s)}`,!0))}Ve.setEvaluated=Xm;var gw={};function QU(e,i){return e.scopeValue("func",{ref:i,code:gw[i.code]||(gw[i.code]=new KU._Code(i.code))})}Ve.useFunc=QU;var Zm=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(Zm||(Ve.Type=Zm={}));function XU(e,i,t){if(e instanceof ft.Name){let s=i===Zm.Num;return t?s?(0,ft._)`"[" + ${e} + "]"`:(0,ft._)`"['" + ${e} + "']"`:s?(0,ft._)`"/" + ${e}`:(0,ft._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,ft.getProperty)(e).toString():"/"+Qm(e)}Ve.getErrorPath=XU;function fw(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}Ve.checkStrictMode=fw});var us=w(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var di=ke(),eF={data:new di.Name("data"),valCxt:new di.Name("valCxt"),instancePath:new di.Name("instancePath"),parentData:new di.Name("parentData"),parentDataProperty:new di.Name("parentDataProperty"),rootData:new di.Name("rootData"),dynamicAnchors:new di.Name("dynamicAnchors"),vErrors:new di.Name("vErrors"),errors:new di.Name("errors"),this:new di.Name("this"),self:new di.Name("self"),scope:new di.Name("scope"),json:new di.Name("json"),jsonPos:new di.Name("jsonPos"),jsonLen:new di.Name("jsonLen"),jsonPart:new di.Name("jsonPart")};ep.default=eF});var Ba=w(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.extendErrors=ui.resetErrorsCount=ui.reportExtraError=ui.reportError=ui.keyword$DataError=ui.keywordError=void 0;var Qe=ke(),Hd=$e(),Ci=us();ui.keywordError={message:({keyword:e})=>(0,Qe.str)`must pass "${e}" keyword validation`};ui.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,Qe.str)`"${e}" keyword must be ${i} ($data)`:(0,Qe.str)`"${e}" keyword is invalid ($data)`};function tF(e,i=ui.keywordError,t,s){let{it:o}=e,{gen:n,compositeRule:l,allErrors:c}=o,u=vw(e,i,t);s??(l||c)?bw(n,u):yw(o,(0,Qe._)`[${u}]`)}ui.reportError=tF;function iF(e,i=ui.keywordError,t){let{it:s}=e,{gen:o,compositeRule:n,allErrors:l}=s,c=vw(e,i,t);bw(o,c),n||l||yw(s,Ci.default.vErrors)}ui.reportExtraError=iF;function sF(e,i){e.assign(Ci.default.errors,i),e.if((0,Qe._)`${Ci.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,Qe._)`${Ci.default.vErrors}.length`,i),()=>e.assign(Ci.default.vErrors,null)))}ui.resetErrorsCount=sF;function oF({gen:e,keyword:i,schemaValue:t,data:s,errsCount:o,it:n}){if(o===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",o,Ci.default.errors,c=>{e.const(l,(0,Qe._)`${Ci.default.vErrors}[${c}]`),e.if((0,Qe._)`${l}.instancePath === undefined`,()=>e.assign((0,Qe._)`${l}.instancePath`,(0,Qe.strConcat)(Ci.default.instancePath,n.errorPath))),e.assign((0,Qe._)`${l}.schemaPath`,(0,Qe.str)`${n.errSchemaPath}/${i}`),n.opts.verbose&&(e.assign((0,Qe._)`${l}.schema`,t),e.assign((0,Qe._)`${l}.data`,s))})}ui.extendErrors=oF;function bw(e,i){let t=e.const("err",i);e.if((0,Qe._)`${Ci.default.vErrors} === null`,()=>e.assign(Ci.default.vErrors,(0,Qe._)`[${t}]`),(0,Qe._)`${Ci.default.vErrors}.push(${t})`),e.code((0,Qe._)`${Ci.default.errors}++`)}function yw(e,i){let{gen:t,validateName:s,schemaEnv:o}=e;o.$async?t.throw((0,Qe._)`new ${e.ValidationError}(${i})`):(t.assign((0,Qe._)`${s}.errors`,i),t.return(!1))}var xr={keyword:new Qe.Name("keyword"),schemaPath:new Qe.Name("schemaPath"),params:new Qe.Name("params"),propertyName:new Qe.Name("propertyName"),message:new Qe.Name("message"),schema:new Qe.Name("schema"),parentSchema:new Qe.Name("parentSchema")};function vw(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,Qe._)`{}`:rF(e,i,t)}function rF(e,i,t={}){let{gen:s,it:o}=e,n=[nF(o,t),aF(e,t)];return lF(e,i,n),s.object(...n)}function nF({errorPath:e},{instancePath:i}){let t=i?(0,Qe.str)`${e}${(0,Hd.getErrorPath)(i,Hd.Type.Str)}`:e;return[Ci.default.instancePath,(0,Qe.strConcat)(Ci.default.instancePath,t)]}function aF({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let o=s?i:(0,Qe.str)`${i}/${e}`;return t&&(o=(0,Qe.str)`${o}${(0,Hd.getErrorPath)(t,Hd.Type.Str)}`),[xr.schemaPath,o]}function lF(e,{params:i,message:t},s){let{keyword:o,data:n,schemaValue:l,it:c}=e,{opts:u,propertyName:m,topSchemaRef:h,schemaPath:f}=c;s.push([xr.keyword,o],[xr.params,typeof i=="function"?i(e):i||(0,Qe._)`{}`]),u.messages&&s.push([xr.message,typeof t=="function"?t(e):t]),u.verbose&&s.push([xr.schema,l],[xr.parentSchema,(0,Qe._)`${h}${f}`],[Ci.default.data,n]),m&&s.push([xr.propertyName,m])}});var kw=w(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.boolOrEmptySchema=pn.topBoolOrEmptySchema=void 0;var cF=Ba(),dF=ke(),uF=us(),gF={message:"boolean schema is false"};function mF(e){let{gen:i,schema:t,validateName:s}=e;t===!1?ww(e,!1):typeof t=="object"&&t.$async===!0?i.return(uF.default.data):(i.assign((0,dF._)`${s}.errors`,null),i.return(!0))}pn.topBoolOrEmptySchema=mF;function pF(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),ww(e)):t.var(i,!0)}pn.boolOrEmptySchema=pF;function ww(e,i){let{gen:t,data:s}=e,o={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,cF.reportError)(o,gF,void 0,i)}});var tp=w(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.getRules=hn.isJSONType=void 0;var hF=["string","number","integer","boolean","null","object","array"],_F=new Set(hF);function fF(e){return typeof e=="string"&&_F.has(e)}hn.isJSONType=fF;function bF(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:nt(ye({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}hn.getRules=bF});var ip=w(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.shouldUseRule=Yo.shouldUseGroup=Yo.schemaHasRulesForType=void 0;function yF({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&Hw(e,s)}Yo.schemaHasRulesForType=yF;function Hw(e,i){return i.rules.some(t=>Sw(e,t))}Yo.shouldUseGroup=Hw;function Sw(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}Yo.shouldUseRule=Sw});var Ea=w(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.reportTypeError=gi.checkDataTypes=gi.checkDataType=gi.coerceAndCheckDataType=gi.getJSONTypes=gi.getSchemaTypes=gi.DataType=void 0;var vF=tp(),wF=ip(),kF=Ba(),Ee=ke(),Cw=$e(),_n=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(_n||(gi.DataType=_n={}));function HF(e){let i=xw(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}gi.getSchemaTypes=HF;function xw(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(vF.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}gi.getJSONTypes=xw;function SF(e,i){let{gen:t,data:s,opts:o}=e,n=CF(i,o.coerceTypes),l=i.length>0&&!(n.length===0&&i.length===1&&(0,wF.schemaHasRulesForType)(e,i[0]));if(l){let c=op(i,s,o.strictNumbers,_n.Wrong);t.if(c,()=>{n.length?xF(e,i,n):rp(e)})}return l}gi.coerceAndCheckDataType=SF;var Iw=new Set(["string","number","integer","boolean","null"]);function CF(e,i){return i?e.filter(t=>Iw.has(t)||i==="array"&&t==="array"):[]}function xF(e,i,t){let{gen:s,data:o,opts:n}=e,l=s.let("dataType",(0,Ee._)`typeof ${o}`),c=s.let("coerced",(0,Ee._)`undefined`);n.coerceTypes==="array"&&s.if((0,Ee._)`${l} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,(0,Ee._)`${o}[0]`).assign(l,(0,Ee._)`typeof ${o}`).if(op(i,o,n.strictNumbers),()=>s.assign(c,o))),s.if((0,Ee._)`${c} !== undefined`);for(let m of t)(Iw.has(m)||m==="array"&&n.coerceTypes==="array")&&u(m);s.else(),rp(e),s.endIf(),s.if((0,Ee._)`${c} !== undefined`,()=>{s.assign(o,c),IF(e,c)});function u(m){switch(m){case"string":s.elseIf((0,Ee._)`${l} == "number" || ${l} == "boolean"`).assign(c,(0,Ee._)`"" + ${o}`).elseIf((0,Ee._)`${o} === null`).assign(c,(0,Ee._)`""`);return;case"number":s.elseIf((0,Ee._)`${l} == "boolean" || ${o} === null
3
3
  || (${l} == "string" && ${o} && ${o} == +${o})`).assign(c,(0,Ee._)`+${o}`);return;case"integer":s.elseIf((0,Ee._)`${l} === "boolean" || ${o} === null
4
4
  || (${l} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,(0,Ee._)`+${o}`);return;case"boolean":s.elseIf((0,Ee._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf((0,Ee._)`${o} === "true" || ${o} === 1`).assign(c,!0);return;case"null":s.elseIf((0,Ee._)`${o} === "" || ${o} === 0 || ${o} === false`),s.assign(c,null);return;case"array":s.elseIf((0,Ee._)`${l} === "string" || ${l} === "number"
@@ -1 +1 @@
1
- import{B as G,C as Q,c as $,d as C,e as B,f as O,g as T,j as w,m as q,q as z,r as D,y as H,z as A}from"./chunk-AM53KSWA.js";import{b as K}from"./chunk-X4MPFU5C.js";import{d as U}from"./chunk-MDV2S56W.js";import{b as J}from"./chunk-2WWJCZHM.js";import{l as j,p as W}from"./chunk-D6IDPBE4.js";import{Ga as x,Gb as E,Ib as M,Jc as N,La as i,M as I,Mc as V,Pb as v,Qb as F,Vb as g,Wa as k,Wb as h,Wc as P,Xb as R,gc as f,h as y,ja as p,lb as u,mb as c,mc as l,nc as d,rb as m,sb as r,tb as a,ub as s,w as S,xc as b,zc as L}from"./chunk-3LEW5FOJ.js";var Y=["password"],Z=["username"],ee=["otp"],te=e=>({background:e}),ie=e=>({anim:e}),X=e=>({"is-invalid":e});function ne(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let n=M();i(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",f(8,X,n.form.controls.username.dirty&&n.form.controls.username.errors)),i(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",f(10,X,n.form.controls.password.dirty&&n.form.controls.password.errors))}}function oe(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(i(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function ae(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_credentials")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_code")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var _e=(()=>{class e{$auth=p(K);$cdr=p(L);$router=p(U);$settings=p(J);targetRoute;validNonAdminRoutes=["/accessories","/plugins","/logs","/support"];passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;form;ngOnInit(){this.form=new T({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(n=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==n.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.$cdr.detectChanges()}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let n=this.passwordInput()?.nativeElement.value;n&&n!==this.form.get("password").value&&this.form.controls.password.setValue(n);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),!this.$auth.user.admin&&!this.validNonAdminRoutes.includes(this.targetRoute)&&(this.targetRoute="/"),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let n=`${W.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${n}') center/cover`}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Y,5),v(t.usernameInput,Z,5),v(t.otpInput,ee,5)),o&2&&F(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-fw","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),E("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),g(5),l(6,"translate"),a(),u(7,ne,12,12),u(8,oe,6,3,"div",8),u(9,ae,9,6,"div",9),u(10,re,9,6,"div",9),r(11,"div",10)(12,"button",11),g(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",f(14,te,t.backgroundStyle))("ngClass",f(16,ie,!t.backgroundStyle)),i(3),m("formGroup",t.form),i(2),h(d(6,10,"setup.welcome_to_homebridge")),i(2),c(t.twoFactorCodeRequired?-1:7),i(),c(t.twoFactorCodeRequired?8:-1),i(),c(t.invalidCredentials?9:-1),i(),c(t.invalid2faCode?10:-1),i(2),m("disabled",t.form.invalid),i(),R(" ",d(14,12,"form.button_continue")," "))},dependencies:[V,G,q,$,B,O,H,A,Q,z,D,N,P,j],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return e})();export{_e as LoginComponent};
1
+ import{B as G,C as Q,c as $,d as C,e as B,f as O,g as T,j as w,m as q,q as z,r as D,y as H,z as A}from"./chunk-AM53KSWA.js";import{b as K}from"./chunk-BH4JDZF4.js";import{d as U}from"./chunk-MDV2S56W.js";import{b as J}from"./chunk-5RI5TLFW.js";import{l as j,p as W}from"./chunk-FB6OF4XR.js";import{Ga as x,Gb as E,Ib as M,Jc as N,La as i,M as I,Mc as V,Pb as v,Qb as F,Vb as g,Wa as k,Wb as h,Wc as P,Xb as R,gc as f,h as y,ja as p,lb as u,mb as c,mc as l,nc as d,rb as m,sb as r,tb as a,ub as s,w as S,xc as b,zc as L}from"./chunk-3LEW5FOJ.js";var Y=["password"],Z=["username"],ee=["otp"],te=e=>({background:e}),ie=e=>({anim:e}),X=e=>({"is-invalid":e});function ne(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let n=M();i(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",f(8,X,n.form.controls.username.dirty&&n.form.controls.username.errors)),i(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",f(10,X,n.form.controls.password.dirty&&n.form.controls.password.errors))}}function oe(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(i(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function ae(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_credentials")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_code")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var _e=(()=>{class e{$auth=p(K);$cdr=p(L);$router=p(U);$settings=p(J);targetRoute;validNonAdminRoutes=["/accessories","/plugins","/logs","/support"];passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;form;ngOnInit(){this.form=new T({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(n=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==n.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.$cdr.detectChanges()}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let n=this.passwordInput()?.nativeElement.value;n&&n!==this.form.get("password").value&&this.form.controls.password.setValue(n);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),!this.$auth.user.admin&&!this.validNonAdminRoutes.includes(this.targetRoute)&&(this.targetRoute="/"),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let n=`${W.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${n}') center/cover`}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Y,5),v(t.usernameInput,Z,5),v(t.otpInput,ee,5)),o&2&&F(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-fw","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),E("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),g(5),l(6,"translate"),a(),u(7,ne,12,12),u(8,oe,6,3,"div",8),u(9,ae,9,6,"div",9),u(10,re,9,6,"div",9),r(11,"div",10)(12,"button",11),g(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",f(14,te,t.backgroundStyle))("ngClass",f(16,ie,!t.backgroundStyle)),i(3),m("formGroup",t.form),i(2),h(d(6,10,"setup.welcome_to_homebridge")),i(2),c(t.twoFactorCodeRequired?-1:7),i(),c(t.twoFactorCodeRequired?8:-1),i(),c(t.invalidCredentials?9:-1),i(),c(t.invalid2faCode?10:-1),i(2),m("disabled",t.form.invalid),i(),R(" ",d(14,12,"form.button_continue")," "))},dependencies:[V,G,q,$,B,O,H,A,Q,z,D,N,P,j],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return e})();export{_e as LoginComponent};
@@ -1,4 +1,4 @@
1
- import{a as P}from"./chunk-M7Q6VBJE.js";import{a as z}from"./chunk-KNZTEJFP.js";import{B as $,c as E,e as y,l as k}from"./chunk-AM53KSWA.js";import{b as D}from"./chunk-MDV2S56W.js";import{b as O}from"./chunk-2WWJCZHM.js";import{k as T,n as I,q as H}from"./chunk-D6IDPBE4.js";import{Db as g,Gb as _,Ib as a,La as p,Vb as v,Wa as x,ac as b,bc as M,cc as V,h as S,ja as r,lb as m,mb as u,oa as l,pa as c,rb as f,sb as d,tb as s,ub as w,w as C}from"./chunk-3LEW5FOJ.js";function A(i,h){i&1&&w(0,"i",6)}function L(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(z);$route=r(D);$settings=r(O);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light"},this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
1
+ import{a as P}from"./chunk-M7Q6VBJE.js";import{a as z}from"./chunk-KNZTEJFP.js";import{B as $,c as E,e as y,l as k}from"./chunk-AM53KSWA.js";import{b as D}from"./chunk-MDV2S56W.js";import{b as O}from"./chunk-5RI5TLFW.js";import{k as T,n as I,q as H}from"./chunk-FB6OF4XR.js";import{Db as g,Gb as _,Ib as a,La as p,Vb as v,Wa as x,ac as b,bc as M,cc as V,h as S,ja as r,lb as m,mb as u,oa as l,pa as c,rb as f,sb as d,tb as s,ub as w,w as C}from"./chunk-3LEW5FOJ.js";function A(i,h){i&1&&w(0,"i",6)}function L(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(z);$route=r(D);$settings=r(O);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light"},this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
2
2
  `)[0].trim())){this.$toastr.error(this.$translate.instant("platform.docker.must_use_hashbang"),this.$translate.instant("toast.title_error")),this.startupScript=`#!/bin/sh
3
3
 
4
4
  ${this.startupScript}`,this.isMobile||this.monacoEditor.getModel().setValue(this.startupScript),this.saveInProgress=!1;return}try{yield C(this.$api.put("/platform-tools/docker/startup-script",{script:this.startupScript})),this.$toastr.success(this.$translate.instant("platform.docker.restart_required"),this.$translate.instant("platform.docker.script_saved"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0","font-monospace"],[1,"col-6","text-end"],[1,"btn","btn-primary","waves-effect","m-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"flex-grow-1","h-100","w-100","my-2",3,"options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModel"],[1,"flex-grow-1","h-100","w-100","my-2",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModelChange","ngModel"]],template:function(n,e){n&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),v(4,"startup.sh"),s()(),d(5,"div",4)(6,"button",5),_("click",function(){return e.onSave()}),m(7,A,1,0,"i",6)(8,L,1,0,"i",7),s()()(),m(9,F,1,2,"ngx-monaco-editor",8),m(10,W,2,1,"textarea",9),s()),n&2&&(p(6),f("disabled",e.saveInProgress),p(),u(e.saveInProgress?7:8),p(2),u(e.isMobile?-1:9),p(),u(e.isMobile?10:-1))},dependencies:[P,$,E,y,k],encapsulation:2})}return i})();export{tt as StartupScriptComponent};
@@ -1 +1 @@
1
- import{c as n}from"./chunk-AZV3CUCF.js";import"./chunk-X4MPFU5C.js";import{g as r}from"./chunk-MDV2S56W.js";import"./chunk-2WWJCZHM.js";import"./chunk-D6IDPBE4.js";import{Xa as e,fa as o}from"./chunk-3LEW5FOJ.js";var c=[{path:"",loadComponent:()=>import("./chunk-W7BYOOHZ.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
1
+ import{c as n}from"./chunk-DOOSRLOB.js";import"./chunk-BH4JDZF4.js";import{g as r}from"./chunk-MDV2S56W.js";import"./chunk-5RI5TLFW.js";import"./chunk-FB6OF4XR.js";import{Xa as e,fa as o}from"./chunk-3LEW5FOJ.js";var c=[{path:"",loadComponent:()=>import("./chunk-OLGI5A27.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
@@ -1 +1 @@
1
- import{g as l}from"./chunk-BQMDK4YS.js";import{l as c}from"./chunk-D6IDPBE4.js";import{Ga as i,Wa as r,hc as s,mc as a,oc as m,rb as o,ub as p}from"./chunk-3LEW5FOJ.js";var f=(e,d)=>({github:e,discord:d}),k=(()=>{class e{linkGithub='<a href="https://github.com/homebridge/homebridge-config-ui-x/issues/new?template=feature-request.yml" target="_blank" rel="noopener noreferrer">GitHub</a>';linkDiscord='<a href="https://discord.gg/kqNCe2D" target="_blank" rel="noopener noreferrer">Discord</a>';static \u0275fac=function(t){return new(t||e)};static \u0275cmp=r({type:e,selectors:[["app-support-banner"]],decls:2,vars:8,consts:[["type","info",1,"mt-3","mb-0","grey-text","small",3,"dismissible","innerHtml"]],template:function(t,n){t&1&&(p(0,"ngb-alert",0),a(1,"translate")),t&2&&o("dismissible",!1)("innerHtml",m(1,2,"common.phrases.support",s(5,f,n.linkGithub,n.linkDiscord)),i)},dependencies:[l,c],encapsulation:2})}return e})();export{k as a};
1
+ import{g as l}from"./chunk-BQMDK4YS.js";import{l as c}from"./chunk-FB6OF4XR.js";import{Ga as i,Wa as r,hc as s,mc as a,oc as m,rb as o,ub as p}from"./chunk-3LEW5FOJ.js";var f=(e,d)=>({github:e,discord:d}),k=(()=>{class e{linkGithub='<a href="https://github.com/homebridge/homebridge-config-ui-x/issues/new?template=feature-request.yml" target="_blank" rel="noopener noreferrer">GitHub</a>';linkDiscord='<a href="https://discord.gg/kqNCe2D" target="_blank" rel="noopener noreferrer">Discord</a>';static \u0275fac=function(t){return new(t||e)};static \u0275cmp=r({type:e,selectors:[["app-support-banner"]],decls:2,vars:8,consts:[["type","info",1,"mt-3","mb-0","grey-text","small",3,"dismissible","innerHtml"]],template:function(t,n){t&1&&(p(0,"ngb-alert",0),a(1,"translate")),t&2&&o("dismissible",!1)("innerHtml",m(1,2,"common.phrases.support",s(5,f,n.linkGithub,n.linkDiscord)),i)},dependencies:[l,c],encapsulation:2})}return e})();export{k as a};
@@ -1,4 +1,4 @@
1
- import{M as ne,P as oe,a as ue,b as R,c as te,d as b,e as S,f as ie,g as E,h as T,i as W,j as N}from"./chunk-M6OUGTBW.js";import{b as D}from"./chunk-CIVLN3HQ.js";import{Db as U,Ga as I,Gb as X,Ib as u,La as d,Lc as ee,Sc as A,Tb as F,Ub as _,Vb as w,Wa as O,Wb as Y,Xa as C,a as P,ab as v,b as $,ea as M,fa as y,g as pe,ha as J,ia as G,ja as f,kb as q,n as V,oa as K,pa as Q,rb as a,sb as p,tb as c,ub as g,wc as k,ya as H,yc as Z,zc as L}from"./chunk-3LEW5FOJ.js";var h=pe(ue(),1);function ce(i,n){if(i&1){let s=U();p(0,"button",6),X("click",function(){K(s);let o=u();return Q(o.removeItem())}),p(1,"span",7),w(2,"\xD7"),c(),p(3,"span"),w(4,"Close"),c()()}if(i&2){let s=u();_(s.widgetStyles().__remove_item__),d(3),_(s.widgetStyles().__screen_reader__)}}function me(i,n){if(i&1&&g(0,"p",8),i&2){let s=u(2);_(s.widgetStyles().__help_block__),a("innerHTML",s.options==null?null:s.options.helpBlock,I)}}function he(i,n){if(i&1&&(p(0,"div"),v(1,me,1,3,"p",3),c()),i&2){let s=u();d(),a("ngIf",s.options==null?null:s.options.helpBlock)}}function fe(i,n){if(i&1&&g(0,"label",8),i&2){let s,t=u();_((t.options==null?null:t.options.labelHtmlClass)||""),F("sr-only",t.options==null?null:t.options.notitle),a("innerHTML",t.options==null?null:t.options.title,I),q("for","control"+((s=t.layoutNode())==null?null:s._id))}}function ge(i,n){if(i&1&&(p(0,"p")(1,"strong"),w(2,"*"),c(),w(3," = required fields "),c()),i&2){let s=u();d(),_(s.widgetStyles().__required_asterisk__)}}function _e(i,n){if(i&1&&g(0,"span",8),i&2){let s=u();_(s.widgetStyles().__field_addon_left__),a("innerHTML",s.options==null?null:s.options.fieldAddonLeft,I)}}function be(i,n){if(i&1&&g(0,"span",8),i&2){let s=u();_(s.widgetStyles().__field_addon_right__),a("innerHTML",s.options==null?null:s.options.fieldAddonRight,I)}}function ye(i,n){if(i&1&&g(0,"span",9),i&2){let s=u();F("glyphicon-ok",(s.options==null?null:s.options.enableSuccessState)&&!(s.formControl!=null&&s.formControl.errors))("glyphicon-remove",(s.options==null?null:s.options.enableErrorState)&&(s.formControl==null?null:s.formControl.errors))}}function Ce(i,n){if(i&1&&g(0,"p",8),i&2){let s=u(2);_(s.widgetStyles().__help_block__),a("innerHTML",s.options==null?null:s.options.helpBlock,I)}}function ve(i,n){if(i&1&&(p(0,"div"),v(1,Ce,1,3,"p",3),c()),i&2){let s=u();d(),a("ngIf",s.options==null?null:s.options.helpBlock)}}function ke(i,n){if(i&1&&(p(0,"div"),w(1,"debug: "),p(2,"pre"),w(3),c()()),i&2){let s=u();d(3),Y(s.debugOutput)}}var j=(()=>{let n=class n{constructor(){this.frameworkThemeSubject=new V,this.frameworkTheme$=this.frameworkThemeSubject.asObservable()}requestThemeChange(t){this.frameworkThemeSubject.next(t),this.activeRequestedTheme=t}getActiveRequestedTheme(){return this.activeRequestedTheme}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),B=(()=>{let n=class n{applyCssClasses(t,o,e){let r=this.widgetStyles()[t];(!r||h.default.isEmpty(r))&&(r=this.widgetStyles().default),Object.keys(r).forEach(l=>{let m=r[l];m.length&&(o[l]=b(o[l],m)),e&&(o[l]=b(o[l],e))})}flattenWidgetStyles(t){var o={};let e=["__themes__"];return Object.keys(t).forEach(r=>{let l=t[r];if(e.indexOf(r)>=0){o[r]=l;return}h.default.isArray(l)&&(o[r]=l.join(" ")),h.default.isObject(l)&&(o[r]=o[r]||{},Object.keys(l).forEach(m=>{let x=l[m];h.default.isArray(x)?o[r][m]=x.join(" "):o[r][m]=x})),h.default.isString(l)&&(o[r]=l)}),o}constructor(){this.changeDetector=f(L),this.jsf=f(S),this.jsfFLService=f(T),this.cssFWService=f(j),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.layoutNode=k(void 0),this.layoutIndex=k(void 0),this.dataIndex=k(void 0),this.widgetStyles=Z(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,e=this.jsfFLService.activeFramework.config||{};this.widgetStyles.set(Object.assign(this.defaultStyling,e.widgetstyles));let r=this.widgetStyles().__themes__[0],l=t.activeRequestedTheme||r.name;this.theme=this.options?.theme||l,this.frameworkThemeSubs=t.frameworkTheme$.subscribe(m=>{this.theme=m})}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(){this.initializeFramework();let t=this.layoutNode();t.arrayItem&&t.type!=="$ref"&&(this.parentArray=this.jsf.getParentNode(this),this.parentArray&&(this.isOrderable=t.arrayItemType==="list"&&!this.options.readonly&&this.parentArray.options.orderable))}ngOnChanges(){this.frameworkInitialized||this.initializeFramework()}initializeFramework(){let t=this.layoutNode();if(t){if(this.options=(0,h.cloneDeep)(t.options),this.widgetLayoutNode=$(P({},t),{options:(0,h.cloneDeep)(t.options)}),this.widgetOptions=this.widgetLayoutNode.options,this.formControl=this.jsf.getFormControl(this),this.options.isInputWidget=te(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.options.title=this.setTitle(),this.options.htmlClass=b(this.options.htmlClass,"schema-form-"+t.type),t.type==="array"?this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__array__.htmlClass):t.arrayItem&&t.type!=="$ref"?this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__array_item_nonref__.htmlClass):this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__form_group__.htmlClass),this.widgetOptions.htmlClass="",this.options.labelHtmlClass=b(this.options.labelHtmlClass,this.widgetStyles().__control_label__.labelHtmlClass),this.widgetOptions.activeClass=b(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 o=this.widgetStyles().__required_asterisk__||"text-danger";this.options.title+=` <strong class="${o}">*</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(o=>this.updateHelpBlock(o)),this.options.debug)){let o=[];this.debugOutput=(0,h.map)(o,e=>JSON.stringify(e,null,2)).join(`
1
+ import{M as ne,P as oe,a as ue,b as R,c as te,d as b,e as S,f as ie,g as E,h as T,i as W,j as N}from"./chunk-PCCN3UQI.js";import{b as D}from"./chunk-CIVLN3HQ.js";import{Db as U,Ga as I,Gb as X,Ib as u,La as d,Lc as ee,Sc as A,Tb as F,Ub as _,Vb as w,Wa as O,Wb as Y,Xa as C,a as P,ab as v,b as $,ea as M,fa as y,g as pe,ha as J,ia as G,ja as f,kb as q,n as V,oa as K,pa as Q,rb as a,sb as p,tb as c,ub as g,wc as k,ya as H,yc as Z,zc as L}from"./chunk-3LEW5FOJ.js";var h=pe(ue(),1);function ce(i,n){if(i&1){let s=U();p(0,"button",6),X("click",function(){K(s);let o=u();return Q(o.removeItem())}),p(1,"span",7),w(2,"\xD7"),c(),p(3,"span"),w(4,"Close"),c()()}if(i&2){let s=u();_(s.widgetStyles().__remove_item__),d(3),_(s.widgetStyles().__screen_reader__)}}function me(i,n){if(i&1&&g(0,"p",8),i&2){let s=u(2);_(s.widgetStyles().__help_block__),a("innerHTML",s.options==null?null:s.options.helpBlock,I)}}function he(i,n){if(i&1&&(p(0,"div"),v(1,me,1,3,"p",3),c()),i&2){let s=u();d(),a("ngIf",s.options==null?null:s.options.helpBlock)}}function fe(i,n){if(i&1&&g(0,"label",8),i&2){let s,t=u();_((t.options==null?null:t.options.labelHtmlClass)||""),F("sr-only",t.options==null?null:t.options.notitle),a("innerHTML",t.options==null?null:t.options.title,I),q("for","control"+((s=t.layoutNode())==null?null:s._id))}}function ge(i,n){if(i&1&&(p(0,"p")(1,"strong"),w(2,"*"),c(),w(3," = required fields "),c()),i&2){let s=u();d(),_(s.widgetStyles().__required_asterisk__)}}function _e(i,n){if(i&1&&g(0,"span",8),i&2){let s=u();_(s.widgetStyles().__field_addon_left__),a("innerHTML",s.options==null?null:s.options.fieldAddonLeft,I)}}function be(i,n){if(i&1&&g(0,"span",8),i&2){let s=u();_(s.widgetStyles().__field_addon_right__),a("innerHTML",s.options==null?null:s.options.fieldAddonRight,I)}}function ye(i,n){if(i&1&&g(0,"span",9),i&2){let s=u();F("glyphicon-ok",(s.options==null?null:s.options.enableSuccessState)&&!(s.formControl!=null&&s.formControl.errors))("glyphicon-remove",(s.options==null?null:s.options.enableErrorState)&&(s.formControl==null?null:s.formControl.errors))}}function Ce(i,n){if(i&1&&g(0,"p",8),i&2){let s=u(2);_(s.widgetStyles().__help_block__),a("innerHTML",s.options==null?null:s.options.helpBlock,I)}}function ve(i,n){if(i&1&&(p(0,"div"),v(1,Ce,1,3,"p",3),c()),i&2){let s=u();d(),a("ngIf",s.options==null?null:s.options.helpBlock)}}function ke(i,n){if(i&1&&(p(0,"div"),w(1,"debug: "),p(2,"pre"),w(3),c()()),i&2){let s=u();d(3),Y(s.debugOutput)}}var j=(()=>{let n=class n{constructor(){this.frameworkThemeSubject=new V,this.frameworkTheme$=this.frameworkThemeSubject.asObservable()}requestThemeChange(t){this.frameworkThemeSubject.next(t),this.activeRequestedTheme=t}getActiveRequestedTheme(){return this.activeRequestedTheme}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),B=(()=>{let n=class n{applyCssClasses(t,o,e){let r=this.widgetStyles()[t];(!r||h.default.isEmpty(r))&&(r=this.widgetStyles().default),Object.keys(r).forEach(l=>{let m=r[l];m.length&&(o[l]=b(o[l],m)),e&&(o[l]=b(o[l],e))})}flattenWidgetStyles(t){var o={};let e=["__themes__"];return Object.keys(t).forEach(r=>{let l=t[r];if(e.indexOf(r)>=0){o[r]=l;return}h.default.isArray(l)&&(o[r]=l.join(" ")),h.default.isObject(l)&&(o[r]=o[r]||{},Object.keys(l).forEach(m=>{let x=l[m];h.default.isArray(x)?o[r][m]=x.join(" "):o[r][m]=x})),h.default.isString(l)&&(o[r]=l)}),o}constructor(){this.changeDetector=f(L),this.jsf=f(S),this.jsfFLService=f(T),this.cssFWService=f(j),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.layoutNode=k(void 0),this.layoutIndex=k(void 0),this.dataIndex=k(void 0),this.widgetStyles=Z(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,e=this.jsfFLService.activeFramework.config||{};this.widgetStyles.set(Object.assign(this.defaultStyling,e.widgetstyles));let r=this.widgetStyles().__themes__[0],l=t.activeRequestedTheme||r.name;this.theme=this.options?.theme||l,this.frameworkThemeSubs=t.frameworkTheme$.subscribe(m=>{this.theme=m})}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(){this.initializeFramework();let t=this.layoutNode();t.arrayItem&&t.type!=="$ref"&&(this.parentArray=this.jsf.getParentNode(this),this.parentArray&&(this.isOrderable=t.arrayItemType==="list"&&!this.options.readonly&&this.parentArray.options.orderable))}ngOnChanges(){this.frameworkInitialized||this.initializeFramework()}initializeFramework(){let t=this.layoutNode();if(t){if(this.options=(0,h.cloneDeep)(t.options),this.widgetLayoutNode=$(P({},t),{options:(0,h.cloneDeep)(t.options)}),this.widgetOptions=this.widgetLayoutNode.options,this.formControl=this.jsf.getFormControl(this),this.options.isInputWidget=te(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.options.title=this.setTitle(),this.options.htmlClass=b(this.options.htmlClass,"schema-form-"+t.type),t.type==="array"?this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__array__.htmlClass):t.arrayItem&&t.type!=="$ref"?this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__array_item_nonref__.htmlClass):this.options.htmlClass=b(this.options.htmlClass,this.widgetStyles().__form_group__.htmlClass),this.widgetOptions.htmlClass="",this.options.labelHtmlClass=b(this.options.labelHtmlClass,this.widgetStyles().__control_label__.labelHtmlClass),this.widgetOptions.activeClass=b(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 o=this.widgetStyles().__required_asterisk__||"text-danger";this.options.title+=` <strong class="${o}">*</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(o=>this.updateHelpBlock(o)),this.options.debug)){let o=[];this.debugOutput=(0,h.map)(o,e=>JSON.stringify(e,null,2)).join(`
2
2
  `)}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)}}removeItem(){this.jsf.removeItem(this)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=O({type:n,selectors:[["css-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"],widgetStyles:[1,"widgetStyles"]},outputs:{widgetStyles:"widgetStylesChange"},standalone:!1,features:[H],decls:12,vars:24,consts:[["type","button",3,"class","click",4,"ngIf"],[4,"ngIf"],[3,"class","sr-only","innerHTML",4,"ngIf"],[3,"class","innerHTML",4,"ngIf"],[3,"layoutNode","dataIndex","layoutIndex"],["aria-hidden","true","class","form-control-feedback glyphicon",3,"glyphicon-ok","glyphicon-remove",4,"ngIf"],["type","button",3,"click"],["aria-hidden","true"],[3,"innerHTML"],["aria-hidden","true",1,"form-control-feedback","glyphicon"]],template:function(o,e){if(o&1&&(p(0,"div"),v(1,ce,5,4,"button",0)(2,he,2,1,"div",1)(3,fe,1,6,"label",2)(4,ge,4,2,"p",1),p(5,"div"),v(6,_e,1,3,"span",3),g(7,"select-widget-widget",4),v(8,be,1,3,"span",3),c(),v(9,ye,1,4,"span",5)(10,ve,2,1,"div",1),c(),v(11,ke,4,1,"div",1)),o&2){let r,l,m,x;_((e.options==null?null:e.options.htmlClass)||""),F("has-feedback",(e.options==null?null:e.options.feedback)&&(e.options==null?null:e.options.isInputWidget)&&((e.formControl==null?null:e.formControl.dirty)||(e.options==null?null:e.options.feedbackOnRender)))("has-error",(e.options==null?null:e.options.enableErrorState)&&(e.formControl==null?null:e.formControl.errors)&&((e.formControl==null?null:e.formControl.dirty)||(e.options==null?null:e.options.feedbackOnRender)))("has-success",(e.options==null?null:e.options.enableSuccessState)&&!(e.formControl!=null&&e.formControl.errors)&&((e.formControl==null?null:e.formControl.dirty)||(e.options==null?null:e.options.feedbackOnRender))),q("data-bs-theme",e.theme)("data-theme",e.theme),d(),a("ngIf",e.showRemoveButton),d(),a("ngIf",(e.options==null?null:e.options.messageLocation)==="top"&&((r=e.layoutNode())==null?null:r.type)!=="array"),d(),a("ngIf",(e.options==null?null:e.options.title)&&((l=e.layoutNode())==null?null:l.type)!=="tab"&&((l=e.layoutNode())==null?null:l.type)!=="array"),d(),a("ngIf",((m=e.layoutNode())==null?null:m.type)==="submit"&&(e.jsf==null||e.jsf.formOptions==null?null:e.jsf.formOptions.fieldsRequired)),d(),F("input-group",(e.options==null?null:e.options.fieldAddonLeft)||(e.options==null?null:e.options.fieldAddonRight)),d(),a("ngIf",e.options==null?null:e.options.fieldAddonLeft),d(),a("layoutNode",e.widgetLayoutNode)("dataIndex",e.dataIndex())("layoutIndex",e.layoutIndex()),d(),a("ngIf",e.options==null?null:e.options.fieldAddonRight),d(),a("ngIf",(e.options==null?null:e.options.feedback)&&(e.options==null?null:e.options.isInputWidget)&&!(e.options!=null&&e.options.fieldAddonRight)&&!e.layoutNode().arrayItem&&((e.formControl==null?null:e.formControl.dirty)||(e.options==null?null:e.options.feedbackOnRender))),d(),a("ngIf",(e.options==null?null:e.options.messageLocation)!=="top"&&((x=e.layoutNode())==null?null:x.type)!=="array"),d(),a("ngIf",e.debug&&e.debugOutput)}},dependencies:[ie,ee],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}
3
3
  `],encapsulation:2});let i=n;return i})(),we=new J("CSS_FRAMEWORK_CFG"),se;(function(i){class n{}i.csscategories=n})(se||(se={}));var le=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=C({type:n}),n.\u0275inj=y({providers:[S,T,E,j],imports:[N,A,W]});let i=n;return i})(),re=(()=>{let n=class n extends R{constructor(t){super(),this.cssFWService=f(j),this.name="css",this.framework=B,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(),o=this.config?.widgetstyles?.__themes__,e=o&&o[0];if(t&&(e={name:t,text:t},o)){let r=o.filter(l=>l.name==t);e=r&&r[0]||e}return e}requestThemeChange(t){this.cssFWService.requestThemeChange(t)}registerTheme(t,o=!0){let r=(this.config?.widgetstyles?.__themes__||[]).filter(l=>t.name==l.name);if(r&&r[0]){if(o)return r[0].text=t.text,!0;if(!o)return!1}if(!r||r.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 o=this.config?.widgetstyles?.__themes__,e=-1;return o&&(o.forEach((r,l)=>{t==r.name&&(e=l)}),e>=0)?(o.splice(e,1),!0):!1}getConfig(){return this.config}};n.\u0275fac=function(o){return new(o||n)(G(we))},n.\u0275prov=M({token:n,factory:n.\u0275fac});let i=n;return i})();var Ie=(()=>{let n=class n{constructor(){this.changeDetector=f(L),this.jsf=f(S),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.layoutNode=k(void 0),this.layoutIndex=k(void 0),this.dataIndex=k(void 0)}ngOnInit(){}ngOnChanges(){}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=O({type:n,selectors:[["bootstrap-5-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[H],decls:2,vars:3,consts:[[3,"layoutNode","layoutIndex","dataIndex"]],template:function(o,e){o&1&&(p(0,"div"),g(1,"css-framework",0),c()),o&2&&(d(),a("layoutNode",e.layoutNode())("layoutIndex",e.layoutIndex())("dataIndex",e.dataIndex()))},dependencies:[B],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}
4
4
  `],encapsulation:2});let i=n;return i})(),Se={name:"bootstrap-5",text:"Bootstrap 5",scripts:["//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"],stylesheets:["//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"],widgetstyles:{__themes__:[{name:"bootstrap5_default",text:"Bootstrap5 default"},{name:"dark",text:"Dark"},{name:"light",text:"Light"}],$ref:{fieldHtmlClass:"btn btn-primary"},__array_item_nonref__:{htmlClass:"list-group-item list-group-item-hb"},__form_group__:{htmlClass:"form-group"},__control_label__:{labelHtmlClass:"control-label"},__active__:{activeClass:"active"},__required_asterisk__:"text-danger",__screen_reader__:"visually-hidden",__remove_item__:"btn-close float-end",__help_block__:"help-block grey-text small",__field_addon_left__:"input-group-text",__field_addon_right__:"input-group-text","alt-date":{},"alt-datetime":{},__array__:{htmlClass:"list-group list-group-hb"},array:{},authfieldset:{},advancedfieldset:{},button:{fieldHtmlClass:"btn btn-sm btn-primary"},checkbox:{fieldHtmlClass:"form-check-input"},checkboxes:{fieldHtmlClass:"form-check-input"},checkboxbuttons:{fieldHtmlClass:"visually-hidden",htmlClass:"btn-group",itemLabelHtmlClass:"btn"},"checkboxes-inline":{htmlClass:"form-check-input",itemLabelHtmlClass:"form-check-inline"},date:{},"datetime-local":{},fieldset:{},integer:{},number:{},optionfieldset:{},password:{},radiobuttons:{fieldHtmlClass:"visually-hidden",htmlClass:"btn-group",itemLabelHtmlClass:"btn"},radio:{fieldHtmlClass:"form-check-input"},radios:{fieldHtmlClass:"form-check-input"},"radios-inline":{htmlClass:"form-check form-check-inline",itemLabelHtmlClass:"form-check-label"},range:{},section:{},selectfieldset:{},select:{fieldHtmlClass:"form-select"},submit:{fieldHtmlClass:"btn btn-primary"},text:{},tabs:{labelHtmlClass:"nav nav-tabs",htmlClass:"tab-content",fieldHtmlClass:"tab-pane",widget_radioClass:"form-check-input"},tabarray:{labelHtmlClass:"nav nav-tabs",htmlClass:"tab-content",fieldHtmlClass:"tab-pane",widget_radioClass:"form-check-input"},"one-of":{labelHtmlClass:"nav nav-tabs",htmlClass:"tab-content",fieldHtmlClass:"tab-pane",widget_radioClass:"form-check-input"},textarea:{},default:{fieldHtmlClass:"form-control"}}},Me=(()=>{let n=class n extends re{constructor(){let t=f(j);super(Se),this.framework=Ie,this.cssFWService=t}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac});let i=n;return i})(),ae=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=C({type:n}),n.\u0275inj=y({providers:[S,T,E,{provide:R,useClass:Me,multi:!0}],imports:[N,A,W,le,N]});let i=n;return i})();var de=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=C({type:i});static \u0275inj=y({providers:[ne],imports:[ae,D]})}return i})();var it=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=C({type:i});static \u0275inj=y({providers:[oe],imports:[D,de]})}return i})();export{it as a};