homebridge-config-ui-x 5.11.2-beta.2 → 5.11.2-beta.3

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 (58) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/package.json +1 -1
  3. package/public/{chunk-ACK5QKZR.js → chunk-24WUAMEX.js} +1 -1
  4. package/public/{chunk-UH7ZNLL5.js → chunk-37VANHXR.js} +1 -1
  5. package/public/{chunk-HDF4JHFI.js → chunk-3CYQHQMG.js} +1 -1
  6. package/public/{chunk-WEXOQCVG.js → chunk-3XZXVB5X.js} +1 -1
  7. package/public/{chunk-VZ3XY34I.js → chunk-4GAZDLVC.js} +1 -1
  8. package/public/{chunk-4STYOKXR.js → chunk-4UB3VNSO.js} +1 -1
  9. package/public/{chunk-FRNPHIV3.js → chunk-5XHUVG6K.js} +1 -1
  10. package/public/{chunk-ZV26JTV7.js → chunk-6XNDXRET.js} +1 -1
  11. package/public/{chunk-KWC5QURK.js → chunk-7VHL5WCX.js} +1 -1
  12. package/public/{chunk-OKAPP6YO.js → chunk-A5LIZQXO.js} +1 -1
  13. package/public/{chunk-ASZKPQUN.js → chunk-B4UHOSC6.js} +1 -1
  14. package/public/{chunk-W663VLRG.js → chunk-BACUUL7U.js} +1 -1
  15. package/public/{chunk-CM3N3C3W.js → chunk-BBH2ZQY6.js} +1 -1
  16. package/public/{chunk-SCWBTFUY.js → chunk-CFHVD4RQ.js} +1 -1
  17. package/public/{chunk-SRFINKMY.js → chunk-CIGCQV5A.js} +1 -1
  18. package/public/{chunk-BBLJIMXX.js → chunk-CSK7YFJT.js} +1 -1
  19. package/public/{chunk-AZY2DNUN.js → chunk-D3YCLD23.js} +1 -1
  20. package/public/{chunk-C5VP7CRC.js → chunk-DI7U3IQB.js} +1 -1
  21. package/public/{chunk-3GUIMBZA.js → chunk-DIMLCFIJ.js} +1 -1
  22. package/public/{chunk-R3Y3VSF7.js → chunk-E4FQSBCT.js} +1 -1
  23. package/public/{chunk-PT24GQ5K.js → chunk-EGMMF7JA.js} +1 -1
  24. package/public/{chunk-7O3SPIWC.js → chunk-FOBEQN7K.js} +1 -1
  25. package/public/{chunk-KXNC6WH6.js → chunk-GBVRRZAB.js} +1 -1
  26. package/public/{chunk-QZU43P2A.js → chunk-I6HDP5DA.js} +1 -1
  27. package/public/{chunk-337WAYBF.js → chunk-ICGWKQ7Q.js} +1 -1
  28. package/public/{chunk-QPI2YWGC.js → chunk-JFQAZ3RI.js} +1 -1
  29. package/public/{chunk-2VYCMFLK.js → chunk-JFY2RCD6.js} +1 -1
  30. package/public/{chunk-7EKDGIG7.js → chunk-JJQ5TUDL.js} +1 -1
  31. package/public/{chunk-OM7GHRRK.js → chunk-JMZS4O2V.js} +1 -1
  32. package/public/{chunk-QQRM2O4S.js → chunk-JOYHBMRK.js} +1 -1
  33. package/public/{chunk-YXLLPJEL.js → chunk-JQJMDLP7.js} +1 -1
  34. package/public/{chunk-RY3E4AUI.js → chunk-KFXDCZRC.js} +1 -1
  35. package/public/{chunk-RAG7VYNH.js → chunk-KSSI2ZEF.js} +1 -1
  36. package/public/{chunk-EDQF53QR.js → chunk-LH7IFLPW.js} +1 -1
  37. package/public/{chunk-6T52JN5R.js → chunk-MEOR6W3Y.js} +1 -1
  38. package/public/{chunk-6C5CYDDU.js → chunk-MXYD5BHP.js} +1 -1
  39. package/public/{chunk-KWAS7MXI.js → chunk-NSMJ3YMV.js} +1 -1
  40. package/public/{chunk-JEUVQW5P.js → chunk-ODLNBFZU.js} +1 -1
  41. package/public/{chunk-4BH7J5ZU.js → chunk-OEM5IQ3P.js} +1 -1
  42. package/public/{chunk-OZKGVJ4N.js → chunk-OWKBT6OU.js} +1 -1
  43. package/public/{chunk-V2WJ2SKN.js → chunk-P3767BHD.js} +1 -1
  44. package/public/{chunk-TRDROX2J.js → chunk-P63ZI6TN.js} +1 -1
  45. package/public/{chunk-XPGJPK66.js → chunk-PAQ5FY7P.js} +1 -1
  46. package/public/{chunk-NQB7BEZZ.js → chunk-PVEWB3YZ.js} +1 -1
  47. package/public/chunk-QETNOX4M.js +1 -0
  48. package/public/{chunk-EZJQ5APU.js → chunk-T2CKM6EK.js} +1 -1
  49. package/public/{chunk-BRP3EHP7.js → chunk-TNQ2USMJ.js} +1 -1
  50. package/public/{chunk-C6X7E5CS.js → chunk-UDSIZPWR.js} +1 -1
  51. package/public/{chunk-AGDDSLXN.js → chunk-V5MOUAJH.js} +1 -1
  52. package/public/{chunk-WDXU4PPN.js → chunk-VKXQKTA4.js} +1 -1
  53. package/public/{chunk-GBTKBQ2X.js → chunk-W62QNDAL.js} +1 -1
  54. package/public/{chunk-4MSKGZXZ.js → chunk-WF6CKG4I.js} +1 -1
  55. package/public/{chunk-ADJ6TEYQ.js → chunk-Y5HHX2AA.js} +1 -1
  56. package/public/index.html +1 -1
  57. package/public/{main-YD5INHXP.js → main-XHXMXNYC.js} +1 -1
  58. package/public/chunk-CV2KW5FI.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as zv}from"./chunk-V2WJ2SKN.js";import{a as ep,c as xv,d as Cv,e as Ys,f as Tv,g as iU,h as tp}from"./chunk-GBTKBQ2X.js";import{a as yv}from"./chunk-BON2K2BD.js";import{a as Sv}from"./chunk-MMBLECEN.js";import{a as Pv}from"./chunk-KWC5QURK.js";import{a as wv,b as kv,c as Hv}from"./chunk-KI6BE77G.js";import{a as ga}from"./chunk-OMFNURQZ.js";import{a as Iv}from"./chunk-5GRM2PNI.js";import{a as Kc,b as Ko}from"./chunk-BKCIVF4W.js";import{a as Lo,b as $o}from"./chunk-ZXUIFQS4.js";import{a as vv}from"./chunk-AZY2DNUN.js";import{a as Oc,b as Fc,c as Vc,d as qc,e as Lc,f as $c,g as qo,m as xt,n as ki,o as mv,p as _v,q as hv,r as fv,s as bv,t as Pr}from"./chunk-3F6KNL45.js";import{B as pv,C as gs,D as ua,a as iv,b as Sr,c as oo,e as Zt,f as sv,h as rv,i as ov,j as nv,k as av,l as Ji,m as lv,n as cv,o as dv,p as xr,s as Vo,t as Cr,u as Xg,v as Ir,w as uv,x as gv}from"./chunk-B6MBMYJR.js";import{a as zr}from"./chunk-WEXOQCVG.js";import{e as Ts}from"./chunk-R7Q4CXAE.js";import{b as It}from"./chunk-OM7GHRRK.js";import{k as it,l as Ct,n as st,p as Tr,q as Ze}from"./chunk-6C5CYDDU.js";import{$ as Wg,$b as re,Aa as xs,Ab as na,Ac as ui,Bb as aa,Bc as ne,Ca as Cs,Cb as la,Cc as kr,Da as Ly,Db as ca,E as By,Eb as da,Ec as us,Fa as Is,Fc as ro,Ga as $y,Gc as Zy,H as My,Ha as Ky,Hc as Qy,I as zc,Ib as ie,J as Uy,La as Ue,Lb as Q,M as Gg,Ma as Gy,Mb as Dc,Nb as H,P as Mo,Pa as Wy,Pc as wi,Qa as m,Qc as Hr,R as Oy,Rb as Nc,Rc as Jt,Sa as Ri,Sb as Rc,Ta as fr,Tb as Ec,Ub as yr,Va as Zg,Vb as vr,Wb as Bc,Xb as vi,Ya as Uo,Yb as Ei,Yc as Uc,Za as jc,Zb as _e,_a as oa,_b as j,_c as Xy,a as be,aa as Ac,ab as Ps,ac as oe,ad as ev,b as We,ba as Yg,bc as wr,c as Dy,ca as ds,cc as Mc,da as Fy,db as ve,e as w,eb as br,ed as tv,fb as Ws,fc as nt,g as ot,gb as Yy,gc as at,h as ue,ha as Jg,hc as lt,i as eo,ia as gt,ic as Jy,ja as hr,jb as Ie,jc as Oo,k as to,kc as tt,la as Gs,lc as ci,ma as Vy,mc as so,n as Ee,na as A,nc as di,o as Pc,ob as Qg,oc as Fo,p as Kg,pb as ge,qa as qy,qb as O,r as Ny,rb as F,rc as N,s as Ry,sa as J,sc as M,ta as Z,tb as ni,tc as St,ub as ai,vb as li,w as Ey,wa as ra,wb as C,x as je,xa as io,xb as b,y as Tc,yb as f,zb as B}from"./chunk-OOM2PIRM.js";var Mv=w(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.formatNames=As.fastFormats=As.fullFormats=void 0;function zs(e,i){return{validate:e,compare:i}}As.fullFormats={date:zs(Nv,op),time:zs(sp(!0),np),"date-time":zs(Av(!0),Ev),"iso-time":zs(sp(),Rv),"iso-date-time":zs(Av(),Bv),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:lU,"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:_U,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:cU,int32:{type:"number",validate:gU},int64:{type:"number",validate:pU},float:{type:"number",validate:Dv},double:{type:"number",validate:Dv},password:!0,binary:!0};As.fastFormats=We(be({},As.fullFormats),{date:zs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,op),time:zs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,np),"date-time":zs(/^\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,Ev),"iso-time":zs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Rv),"iso-date-time":zs(/^\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,Bv),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});As.formatNames=Object.keys(As.fullFormats);function sU(e){return e%4===0&&(e%100!==0||e%400===0)}var rU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,oU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Nv(e){let i=rU.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],r=+i[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&sU(t)?29:oU[s])}function op(e,i){if(e&&i)return e>i?1:e<i?-1:0}var ip=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function sp(e){return function(t){let s=ip.exec(t);if(!s)return!1;let r=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(r<=23&&n<=59&&l<60)return!0;let v=n-_*u,S=r-p*u-(v<0?1:0);return(S===23||S===-1)&&(v===59||v===-1)&&l<61}}function np(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 Rv(e,i){if(!(e&&i))return;let t=ip.exec(e),s=ip.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 rp=/t|\s/i;function Av(e){let i=sp(e);return function(s){let r=s.split(rp);return r.length===2&&Nv(r[0])&&i(r[1])}}function Ev(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function Bv(e,i){if(!(e&&i))return;let[t,s]=e.split(rp),[r,n]=i.split(rp),l=op(t,r);if(l!==void 0)return l||np(s,n)}var nU=/\/|:/,aU=/^(?:[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 lU(e){return nU.test(e)&&aU.test(e)}var jv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function cU(e){return jv.lastIndex=0,jv.test(e)}var dU=-(2**31),uU=2**31-1;function gU(e){return Number.isInteger(e)&&e<=uU&&e>=dU}function pU(e){return Number.isInteger(e)}function Dv(){return!0}var mU=/[^\\]\\Z/;function _U(e){if(mU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var _a=w(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.regexpCode=Ye.getEsmExportName=Ye.getProperty=Ye.safeStringify=Ye.stringify=Ye.strConcat=Ye.addCodeArg=Ye.str=Ye._=Ye.nil=Ye._Code=Ye.Name=Ye.IDENTIFIER=Ye._CodeOrName=void 0;var pa=class{};Ye._CodeOrName=pa;Ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var no=class extends pa{constructor(i){if(super(),!Ye.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}}};Ye.Name=no;var Zi=class extends pa{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 no&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Ye._Code=Zi;Ye.nil=new Zi("");function Uv(e,...i){let t=[e[0]],s=0;for(;s<i.length;)lp(t,i[s]),t.push(e[++s]);return new Zi(t)}Ye._=Uv;var ap=new Zi("+");function Ov(e,...i){let t=[ma(e[0])],s=0;for(;s<i.length;)t.push(ap),lp(t,i[s]),t.push(ap,ma(e[++s]));return hU(t),new Zi(t)}Ye.str=Ov;function lp(e,i){i instanceof Zi?e.push(...i._items):i instanceof no?e.push(i):e.push(yU(i))}Ye.addCodeArg=lp;function hU(e){let i=1;for(;i<e.length-1;){if(e[i]===ap){let t=fU(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function fU(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof no||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 no))return`"${e}${i.slice(1)}`}function bU(e,i){return i.emptyStr()?e:e.emptyStr()?i:Ov`${e}${i}`}Ye.strConcat=bU;function yU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ma(Array.isArray(e)?e.join(","):e)}function vU(e){return new Zi(ma(e))}Ye.stringify=vU;function ma(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ye.safeStringify=ma;function wU(e){return typeof e=="string"&&Ye.IDENTIFIER.test(e)?new Zi(`.${e}`):Uv`[${e}]`}Ye.getProperty=wU;function kU(e){if(typeof e=="string"&&Ye.IDENTIFIER.test(e))return new Zi(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Ye.getEsmExportName=kU;function HU(e){return new Zi(e.toString())}Ye.regexpCode=HU});var up=w(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.ValueScope=Si.ValueScopeName=Si.Scope=Si.varKinds=Si.UsedValueState=void 0;var Hi=_a(),cp=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},Gc=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Gc||(Si.UsedValueState=Gc={}));Si.varKinds={const:new Hi.Name("const"),let:new Hi.Name("let"),var:new Hi.Name("var")};var Wc=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Hi.Name?i:this.name(i)}name(i){return new Hi.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}}};Si.Scope=Wc;var Yc=class extends Hi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,Hi._)`.${new Hi.Name(t)}[${s}]`}};Si.ValueScopeName=Yc;var SU=(0,Hi._)`\n`,dp=class extends Wc{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=We(be({},i),{_n:i.lines?SU:Hi.nil})}get(){return this._scope}name(i){return new Yc(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 r=this.toName(i),{prefix:n}=r,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,r);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,r.setValue(t,{property:n,itemIndex:p}),r}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,Hi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,s)}_reduceValues(i,t,s={},r){let n=Hi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,Gc.Started);let _=t(p);if(_){let v=this.opts.es5?Si.varKinds.var:Si.varKinds.const;n=(0,Hi._)`${n}${v} ${p} = ${_};${this.opts._n}`}else if(_=r?.(p))n=(0,Hi._)`${n}${_}${this.opts._n}`;else throw new cp(p);u.set(p,Gc.Completed)})}return n}};Si.ValueScope=dp});var we=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 Ke=_a(),ps=up(),Ar=_a();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Ar._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Ar.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Ar.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Ar.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Ar.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Ar.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Ar.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Ar.Name}});var ed=up();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return ed.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return ed.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return ed.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return ed.varKinds}});Oe.operators={GT:new Ke._Code(">"),GTE:new Ke._Code(">="),LT:new Ke._Code("<"),LTE:new Ke._Code("<="),EQ:new Ke._Code("==="),NEQ:new Ke._Code("!=="),NOT:new Ke._Code("!"),OR:new Ke._Code("||"),AND:new Ke._Code("&&"),ADD:new Ke._Code("+")};var Js=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},gp=class extends Js{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?ps.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Wo(this.rhs,i,t)),this}get names(){return this.rhs instanceof Ke._CodeOrName?this.rhs.names:{}}},Zc=class extends Js{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 Ke.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Wo(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Ke.Name?{}:be({},this.lhs.names);return Xc(i,this.rhs)}},pp=class extends Zc{constructor(i,t,s,r){super(i,s,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},mp=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},_p=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},hp=class extends Js{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},fp=class extends Js{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=Wo(this.code,i,t),this}get names(){return this.code instanceof Ke._CodeOrName?this.code.names:{}}},ha=class extends Js{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,r=s.length;for(;r--;){let n=s[r];n.optimizeNames(i,t)||(xU(i,n.names),s.splice(r,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>ao(i,t.names),{})}},Zs=class extends ha{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},bp=class extends ha{},yp=(()=>{class e extends Zs{}return e.kind="else",e})(),Jc=(()=>{class e extends Zs{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 r=s.optimizeNodes();s=this.else=Array.isArray(r)?new yp(r):r}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e($v(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Wo(this.condition,t,s),this}get names(){let t=super.names;return Xc(t,this.condition),this.else&&ao(t,this.else.names),t}}return e.kind="if",e})(),td=(()=>{class e extends Zs{}return e.kind="for",e})(),vp=class extends td{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=Wo(this.iteration,i,t),this}get names(){return ao(super.names,this.iteration.names)}},wp=class extends td{constructor(i,t,s,r){super(),this.varKind=i,this.name=t,this.from=s,this.to=r}render(i){let t=i.es5?ps.varKinds.var:this.varKind,{name:s,from:r,to:n}=this;return`for(${t} ${s}=${r}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=Xc(super.names,this.from);return Xc(i,this.to)}},Qc=class extends td{constructor(i,t,s,r){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=r}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=Wo(this.iterable,i,t),this}get names(){return ao(super.names,this.iterable.names)}},Fv=(()=>{class e extends Zs{constructor(t,s,r){super(),this.name=t,this.args=s,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Vv=(()=>{class e extends ha{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),kp=class extends Zs{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,r;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&ao(i,this.catch.names),this.finally&&ao(i,this.finally.names),i}},qv=(()=>{class e extends Zs{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Lv=(()=>{class e extends Zs{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Hp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=We(be({},t),{_n:t.lines?`
1
+ import{a as zv}from"./chunk-P3767BHD.js";import{a as ep,c as xv,d as Cv,e as Ys,f as Tv,g as iU,h as tp}from"./chunk-W62QNDAL.js";import{a as yv}from"./chunk-BON2K2BD.js";import{a as Sv}from"./chunk-MMBLECEN.js";import{a as Pv}from"./chunk-7VHL5WCX.js";import{a as wv,b as kv,c as Hv}from"./chunk-KI6BE77G.js";import{a as ga}from"./chunk-OMFNURQZ.js";import{a as Iv}from"./chunk-5GRM2PNI.js";import{a as Kc,b as Ko}from"./chunk-BKCIVF4W.js";import{a as Lo,b as $o}from"./chunk-ZXUIFQS4.js";import{a as vv}from"./chunk-D3YCLD23.js";import{a as Oc,b as Fc,c as Vc,d as qc,e as Lc,f as $c,g as qo,m as xt,n as ki,o as mv,p as _v,q as hv,r as fv,s as bv,t as Pr}from"./chunk-3F6KNL45.js";import{B as pv,C as gs,D as ua,a as iv,b as Sr,c as oo,e as Zt,f as sv,h as rv,i as ov,j as nv,k as av,l as Ji,m as lv,n as cv,o as dv,p as xr,s as Vo,t as Cr,u as Xg,v as Ir,w as uv,x as gv}from"./chunk-B6MBMYJR.js";import{a as zr}from"./chunk-3XZXVB5X.js";import{e as Ts}from"./chunk-R7Q4CXAE.js";import{b as It}from"./chunk-JMZS4O2V.js";import{k as it,l as Ct,n as st,p as Tr,q as Ze}from"./chunk-MXYD5BHP.js";import{$ as Wg,$b as re,Aa as xs,Ab as na,Ac as ui,Bb as aa,Bc as ne,Ca as Cs,Cb as la,Cc as kr,Da as Ly,Db as ca,E as By,Eb as da,Ec as us,Fa as Is,Fc as ro,Ga as $y,Gc as Zy,H as My,Ha as Ky,Hc as Qy,I as zc,Ib as ie,J as Uy,La as Ue,Lb as Q,M as Gg,Ma as Gy,Mb as Dc,Nb as H,P as Mo,Pa as Wy,Pc as wi,Qa as m,Qc as Hr,R as Oy,Rb as Nc,Rc as Jt,Sa as Ri,Sb as Rc,Ta as fr,Tb as Ec,Ub as yr,Va as Zg,Vb as vr,Wb as Bc,Xb as vi,Ya as Uo,Yb as Ei,Yc as Uc,Za as jc,Zb as _e,_a as oa,_b as j,_c as Xy,a as be,aa as Ac,ab as Ps,ac as oe,ad as ev,b as We,ba as Yg,bc as wr,c as Dy,ca as ds,cc as Mc,da as Fy,db as ve,e as w,eb as br,ed as tv,fb as Ws,fc as nt,g as ot,gb as Yy,gc as at,h as ue,ha as Jg,hc as lt,i as eo,ia as gt,ic as Jy,ja as hr,jb as Ie,jc as Oo,k as to,kc as tt,la as Gs,lc as ci,ma as Vy,mc as so,n as Ee,na as A,nc as di,o as Pc,ob as Qg,oc as Fo,p as Kg,pb as ge,qa as qy,qb as O,r as Ny,rb as F,rc as N,s as Ry,sa as J,sc as M,ta as Z,tb as ni,tc as St,ub as ai,vb as li,w as Ey,wa as ra,wb as C,x as je,xa as io,xb as b,y as Tc,yb as f,zb as B}from"./chunk-OOM2PIRM.js";var Mv=w(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.formatNames=As.fastFormats=As.fullFormats=void 0;function zs(e,i){return{validate:e,compare:i}}As.fullFormats={date:zs(Nv,op),time:zs(sp(!0),np),"date-time":zs(Av(!0),Ev),"iso-time":zs(sp(),Rv),"iso-date-time":zs(Av(),Bv),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:lU,"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:_U,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:cU,int32:{type:"number",validate:gU},int64:{type:"number",validate:pU},float:{type:"number",validate:Dv},double:{type:"number",validate:Dv},password:!0,binary:!0};As.fastFormats=We(be({},As.fullFormats),{date:zs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,op),time:zs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,np),"date-time":zs(/^\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,Ev),"iso-time":zs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Rv),"iso-date-time":zs(/^\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,Bv),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});As.formatNames=Object.keys(As.fullFormats);function sU(e){return e%4===0&&(e%100!==0||e%400===0)}var rU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,oU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Nv(e){let i=rU.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],r=+i[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&sU(t)?29:oU[s])}function op(e,i){if(e&&i)return e>i?1:e<i?-1:0}var ip=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function sp(e){return function(t){let s=ip.exec(t);if(!s)return!1;let r=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(r<=23&&n<=59&&l<60)return!0;let v=n-_*u,S=r-p*u-(v<0?1:0);return(S===23||S===-1)&&(v===59||v===-1)&&l<61}}function np(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 Rv(e,i){if(!(e&&i))return;let t=ip.exec(e),s=ip.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 rp=/t|\s/i;function Av(e){let i=sp(e);return function(s){let r=s.split(rp);return r.length===2&&Nv(r[0])&&i(r[1])}}function Ev(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function Bv(e,i){if(!(e&&i))return;let[t,s]=e.split(rp),[r,n]=i.split(rp),l=op(t,r);if(l!==void 0)return l||np(s,n)}var nU=/\/|:/,aU=/^(?:[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 lU(e){return nU.test(e)&&aU.test(e)}var jv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function cU(e){return jv.lastIndex=0,jv.test(e)}var dU=-(2**31),uU=2**31-1;function gU(e){return Number.isInteger(e)&&e<=uU&&e>=dU}function pU(e){return Number.isInteger(e)}function Dv(){return!0}var mU=/[^\\]\\Z/;function _U(e){if(mU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var _a=w(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.regexpCode=Ye.getEsmExportName=Ye.getProperty=Ye.safeStringify=Ye.stringify=Ye.strConcat=Ye.addCodeArg=Ye.str=Ye._=Ye.nil=Ye._Code=Ye.Name=Ye.IDENTIFIER=Ye._CodeOrName=void 0;var pa=class{};Ye._CodeOrName=pa;Ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var no=class extends pa{constructor(i){if(super(),!Ye.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}}};Ye.Name=no;var Zi=class extends pa{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 no&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Ye._Code=Zi;Ye.nil=new Zi("");function Uv(e,...i){let t=[e[0]],s=0;for(;s<i.length;)lp(t,i[s]),t.push(e[++s]);return new Zi(t)}Ye._=Uv;var ap=new Zi("+");function Ov(e,...i){let t=[ma(e[0])],s=0;for(;s<i.length;)t.push(ap),lp(t,i[s]),t.push(ap,ma(e[++s]));return hU(t),new Zi(t)}Ye.str=Ov;function lp(e,i){i instanceof Zi?e.push(...i._items):i instanceof no?e.push(i):e.push(yU(i))}Ye.addCodeArg=lp;function hU(e){let i=1;for(;i<e.length-1;){if(e[i]===ap){let t=fU(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function fU(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof no||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 no))return`"${e}${i.slice(1)}`}function bU(e,i){return i.emptyStr()?e:e.emptyStr()?i:Ov`${e}${i}`}Ye.strConcat=bU;function yU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ma(Array.isArray(e)?e.join(","):e)}function vU(e){return new Zi(ma(e))}Ye.stringify=vU;function ma(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ye.safeStringify=ma;function wU(e){return typeof e=="string"&&Ye.IDENTIFIER.test(e)?new Zi(`.${e}`):Uv`[${e}]`}Ye.getProperty=wU;function kU(e){if(typeof e=="string"&&Ye.IDENTIFIER.test(e))return new Zi(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Ye.getEsmExportName=kU;function HU(e){return new Zi(e.toString())}Ye.regexpCode=HU});var up=w(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.ValueScope=Si.ValueScopeName=Si.Scope=Si.varKinds=Si.UsedValueState=void 0;var Hi=_a(),cp=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},Gc=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Gc||(Si.UsedValueState=Gc={}));Si.varKinds={const:new Hi.Name("const"),let:new Hi.Name("let"),var:new Hi.Name("var")};var Wc=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Hi.Name?i:this.name(i)}name(i){return new Hi.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}}};Si.Scope=Wc;var Yc=class extends Hi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,Hi._)`.${new Hi.Name(t)}[${s}]`}};Si.ValueScopeName=Yc;var SU=(0,Hi._)`\n`,dp=class extends Wc{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=We(be({},i),{_n:i.lines?SU:Hi.nil})}get(){return this._scope}name(i){return new Yc(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 r=this.toName(i),{prefix:n}=r,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,r);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,r.setValue(t,{property:n,itemIndex:p}),r}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,Hi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,s)}_reduceValues(i,t,s={},r){let n=Hi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,Gc.Started);let _=t(p);if(_){let v=this.opts.es5?Si.varKinds.var:Si.varKinds.const;n=(0,Hi._)`${n}${v} ${p} = ${_};${this.opts._n}`}else if(_=r?.(p))n=(0,Hi._)`${n}${_}${this.opts._n}`;else throw new cp(p);u.set(p,Gc.Completed)})}return n}};Si.ValueScope=dp});var we=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 Ke=_a(),ps=up(),Ar=_a();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Ar._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Ar.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Ar.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Ar.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Ar.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Ar.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Ar.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Ar.Name}});var ed=up();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return ed.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return ed.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return ed.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return ed.varKinds}});Oe.operators={GT:new Ke._Code(">"),GTE:new Ke._Code(">="),LT:new Ke._Code("<"),LTE:new Ke._Code("<="),EQ:new Ke._Code("==="),NEQ:new Ke._Code("!=="),NOT:new Ke._Code("!"),OR:new Ke._Code("||"),AND:new Ke._Code("&&"),ADD:new Ke._Code("+")};var Js=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},gp=class extends Js{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?ps.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Wo(this.rhs,i,t)),this}get names(){return this.rhs instanceof Ke._CodeOrName?this.rhs.names:{}}},Zc=class extends Js{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 Ke.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Wo(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Ke.Name?{}:be({},this.lhs.names);return Xc(i,this.rhs)}},pp=class extends Zc{constructor(i,t,s,r){super(i,s,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},mp=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},_p=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},hp=class extends Js{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},fp=class extends Js{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=Wo(this.code,i,t),this}get names(){return this.code instanceof Ke._CodeOrName?this.code.names:{}}},ha=class extends Js{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,r=s.length;for(;r--;){let n=s[r];n.optimizeNames(i,t)||(xU(i,n.names),s.splice(r,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>ao(i,t.names),{})}},Zs=class extends ha{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},bp=class extends ha{},yp=(()=>{class e extends Zs{}return e.kind="else",e})(),Jc=(()=>{class e extends Zs{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 r=s.optimizeNodes();s=this.else=Array.isArray(r)?new yp(r):r}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e($v(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Wo(this.condition,t,s),this}get names(){let t=super.names;return Xc(t,this.condition),this.else&&ao(t,this.else.names),t}}return e.kind="if",e})(),td=(()=>{class e extends Zs{}return e.kind="for",e})(),vp=class extends td{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=Wo(this.iteration,i,t),this}get names(){return ao(super.names,this.iteration.names)}},wp=class extends td{constructor(i,t,s,r){super(),this.varKind=i,this.name=t,this.from=s,this.to=r}render(i){let t=i.es5?ps.varKinds.var:this.varKind,{name:s,from:r,to:n}=this;return`for(${t} ${s}=${r}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=Xc(super.names,this.from);return Xc(i,this.to)}},Qc=class extends td{constructor(i,t,s,r){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=r}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=Wo(this.iterable,i,t),this}get names(){return ao(super.names,this.iterable.names)}},Fv=(()=>{class e extends Zs{constructor(t,s,r){super(),this.name=t,this.args=s,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Vv=(()=>{class e extends ha{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),kp=class extends Zs{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,r;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&ao(i,this.catch.names),this.finally&&ao(i,this.finally.names),i}},qv=(()=>{class e extends Zs{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Lv=(()=>{class e extends Zs{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Hp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=We(be({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new ps.Scope({parent:i}),this._nodes=[new bp]}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,r){let n=this._scope.toName(t);return s!==void 0&&r&&(this._constants[n.str]=s),this._leafNode(new gp(i,n,s)),n}const(i,t,s){return this._def(ps.varKinds.const,i,t,s)}let(i,t,s){return this._def(ps.varKinds.let,i,t,s)}var(i,t,s){return this._def(ps.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new Zc(i,t,s))}add(i,t){return this._leafNode(new pp(i,Oe.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==Ke.nil&&this._leafNode(new fp(i)),this}object(...i){let t=["{"];for(let[s,r]of i)t.length>1&&t.push(","),t.push(s),(s!==r||this.opts.es5)&&(t.push(":"),(0,Ke.addCodeArg)(t,r));return t.push("}"),new Ke._Code(t)}if(i,t,s){if(this._blockNode(new Jc(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 Jc(i))}else(){return this._elseNode(new yp)}endIf(){return this._endBlockNode(Jc,yp)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new vp(i),t)}forRange(i,t,s,r,n=this.opts.es5?ps.varKinds.var:ps.varKinds.let){let l=this._scope.toName(i);return this._for(new wp(n,l,t,s),()=>r(l))}forOf(i,t,s,r=ps.varKinds.const){let n=this._scope.toName(i);if(this.opts.es5){let l=t instanceof Ke.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Ke._)`${l}.length`,c=>{this.var(n,(0,Ke._)`${l}[${c}]`),s(n)})}return this._for(new Qc("of",r,n,t),()=>s(n))}forIn(i,t,s,r=this.opts.es5?ps.varKinds.var:ps.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,Ke._)`Object.keys(${t})`,s);let n=this._scope.toName(i);return this._for(new Qc("in",r,n,t),()=>s(n))}endFor(){return this._endBlockNode(td)}label(i){return this._leafNode(new mp(i))}break(i){return this._leafNode(new _p(i))}return(i){let t=new Vv;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Vv)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new kp;if(this._blockNode(r),this.code(i),t){let n=this.name("e");this._currNode=r.catch=new qv(n),t(n)}return s&&(this._currNode=r.finally=new Lv,this.code(s)),this._endBlockNode(qv,Lv)}throw(i){return this._leafNode(new hp(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=Ke.nil,s,r){return this._blockNode(new Fv(i,t,s)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Fv)}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 Jc))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=Hp;function ao(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function Xc(e,i){return i instanceof Ke._CodeOrName?ao(e,i.names):e}function Wo(e,i,t){if(e instanceof Ke.Name)return s(e);if(!r(e))return e;return new Ke._Code(e._items.reduce((n,l)=>(l instanceof Ke.Name&&(l=s(l)),l instanceof Ke._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 r(n){return n instanceof Ke._Code&&n._items.some(l=>l instanceof Ke.Name&&i[l.str]===1&&t[l.str]!==void 0)}}function xU(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function $v(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Ke._)`!${Sp(e)}`}Oe.not=$v;var CU=Kv(Oe.operators.AND);function IU(...e){return e.reduce(CU)}Oe.and=IU;var PU=Kv(Oe.operators.OR);function TU(...e){return e.reduce(PU)}Oe.or=TU;function Kv(e){return(i,t)=>i===Ke.nil?t:t===Ke.nil?i:(0,Ke._)`${Sp(i)} ${e} ${Sp(t)}`}function Sp(e){return e instanceof Ke.Name?e:(0,Ke._)`(${e})`}});var qe=w(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.checkStrictMode=Fe.getErrorPath=Fe.Type=Fe.useFunc=Fe.setEvaluated=Fe.evaluatedPropsToName=Fe.mergeEvaluated=Fe.eachItem=Fe.unescapeJsonPointer=Fe.escapeJsonPointer=Fe.escapeFragment=Fe.unescapeFragment=Fe.schemaRefOrVal=Fe.schemaHasRulesButRef=Fe.schemaHasRules=Fe.checkUnknownRules=Fe.alwaysValidSchema=Fe.toHash=void 0;var pt=we(),zU=_a();function AU(e){let i={};for(let t of e)i[t]=!0;return i}Fe.toHash=AU;function jU(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(Yv(e,i),!Jv(i,e.self.RULES.all))}Fe.alwaysValidSchema=jU;function Yv(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let r=s.RULES.keywords;for(let n in i)r[n]||Xv(e,`unknown keyword: "${n}"`)}Fe.checkUnknownRules=Yv;function Jv(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}Fe.schemaHasRules=Jv;function DU(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}Fe.schemaHasRulesButRef=DU;function NU({topSchemaRef:e,schemaPath:i},t,s,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,pt._)`${t}`}return(0,pt._)`${e}${i}${(0,pt.getProperty)(s)}`}Fe.schemaRefOrVal=NU;function RU(e){return Zv(decodeURIComponent(e))}Fe.unescapeFragment=RU;function EU(e){return encodeURIComponent(Cp(e))}Fe.escapeFragment=EU;function Cp(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Fe.escapeJsonPointer=Cp;function Zv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Fe.unescapeJsonPointer=Zv;function BU(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}Fe.eachItem=BU;function Gv({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(r,n,l,c)=>{let u=l===void 0?n:l instanceof pt.Name?(n instanceof pt.Name?e(r,n,l):i(r,n,l),l):n instanceof pt.Name?(i(r,l,n),n):t(n,l);return c===pt.Name&&!(u instanceof pt.Name)?s(r,u):u}}Fe.mergeEvaluated={props:Gv({mergeNames:(e,i,t)=>e.if((0,pt._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,pt._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,pt._)`${t} || {}`).code((0,pt._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,pt._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,pt._)`${t} || {}`),Ip(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:be(be({},e),i),resultToName:Qv}),items:Gv({mergeNames:(e,i,t)=>e.if((0,pt._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,pt._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,pt._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,pt._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function Qv(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,pt._)`{}`);return i!==void 0&&Ip(e,t,i),t}Fe.evaluatedPropsToName=Qv;function Ip(e,i,t){Object.keys(t).forEach(s=>e.assign((0,pt._)`${i}${(0,pt.getProperty)(s)}`,!0))}Fe.setEvaluated=Ip;var Wv={};function MU(e,i){return e.scopeValue("func",{ref:i,code:Wv[i.code]||(Wv[i.code]=new zU._Code(i.code))})}Fe.useFunc=MU;var xp=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(xp||(Fe.Type=xp={}));function UU(e,i,t){if(e instanceof pt.Name){let s=i===xp.Num;return t?s?(0,pt._)`"[" + ${e} + "]"`:(0,pt._)`"['" + ${e} + "']"`:s?(0,pt._)`"/" + ${e}`:(0,pt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,pt.getProperty)(e).toString():"/"+Cp(e)}Fe.getErrorPath=UU;function Xv(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}Fe.checkStrictMode=Xv});var Qi=w(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var Qt=we(),OU={data:new Qt.Name("data"),valCxt:new Qt.Name("valCxt"),instancePath:new Qt.Name("instancePath"),parentData:new Qt.Name("parentData"),parentDataProperty:new Qt.Name("parentDataProperty"),rootData:new Qt.Name("rootData"),dynamicAnchors:new Qt.Name("dynamicAnchors"),vErrors:new Qt.Name("vErrors"),errors:new Qt.Name("errors"),this:new Qt.Name("this"),self:new Qt.Name("self"),scope:new Qt.Name("scope"),json:new Qt.Name("json"),jsonPos:new Qt.Name("jsonPos"),jsonLen:new Qt.Name("jsonLen"),jsonPart:new Qt.Name("jsonPart")};Pp.default=OU});var fa=w(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.extendErrors=Xt.resetErrorsCount=Xt.reportExtraError=Xt.reportError=Xt.keyword$DataError=Xt.keywordError=void 0;var Ge=we(),id=qe(),gi=Qi();Xt.keywordError={message:({keyword:e})=>(0,Ge.str)`must pass "${e}" keyword validation`};Xt.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,Ge.str)`"${e}" keyword must be ${i} ($data)`:(0,Ge.str)`"${e}" keyword is invalid ($data)`};function FU(e,i=Xt.keywordError,t,s){let{it:r}=e,{gen:n,compositeRule:l,allErrors:c}=r,u=iw(e,i,t);s??(l||c)?ew(n,u):tw(r,(0,Ge._)`[${u}]`)}Xt.reportError=FU;function VU(e,i=Xt.keywordError,t){let{it:s}=e,{gen:r,compositeRule:n,allErrors:l}=s,c=iw(e,i,t);ew(r,c),n||l||tw(s,gi.default.vErrors)}Xt.reportExtraError=VU;function qU(e,i){e.assign(gi.default.errors,i),e.if((0,Ge._)`${gi.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,Ge._)`${gi.default.vErrors}.length`,i),()=>e.assign(gi.default.vErrors,null)))}Xt.resetErrorsCount=qU;function LU({gen:e,keyword:i,schemaValue:t,data:s,errsCount:r,it:n}){if(r===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",r,gi.default.errors,c=>{e.const(l,(0,Ge._)`${gi.default.vErrors}[${c}]`),e.if((0,Ge._)`${l}.instancePath === undefined`,()=>e.assign((0,Ge._)`${l}.instancePath`,(0,Ge.strConcat)(gi.default.instancePath,n.errorPath))),e.assign((0,Ge._)`${l}.schemaPath`,(0,Ge.str)`${n.errSchemaPath}/${i}`),n.opts.verbose&&(e.assign((0,Ge._)`${l}.schema`,t),e.assign((0,Ge._)`${l}.data`,s))})}Xt.extendErrors=LU;function ew(e,i){let t=e.const("err",i);e.if((0,Ge._)`${gi.default.vErrors} === null`,()=>e.assign(gi.default.vErrors,(0,Ge._)`[${t}]`),(0,Ge._)`${gi.default.vErrors}.push(${t})`),e.code((0,Ge._)`${gi.default.errors}++`)}function tw(e,i){let{gen:t,validateName:s,schemaEnv:r}=e;r.$async?t.throw((0,Ge._)`new ${e.ValidationError}(${i})`):(t.assign((0,Ge._)`${s}.errors`,i),t.return(!1))}var lo={keyword:new Ge.Name("keyword"),schemaPath:new Ge.Name("schemaPath"),params:new Ge.Name("params"),propertyName:new Ge.Name("propertyName"),message:new Ge.Name("message"),schema:new Ge.Name("schema"),parentSchema:new Ge.Name("parentSchema")};function iw(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,Ge._)`{}`:$U(e,i,t)}function $U(e,i,t={}){let{gen:s,it:r}=e,n=[KU(r,t),GU(e,t)];return WU(e,i,n),s.object(...n)}function KU({errorPath:e},{instancePath:i}){let t=i?(0,Ge.str)`${e}${(0,id.getErrorPath)(i,id.Type.Str)}`:e;return[gi.default.instancePath,(0,Ge.strConcat)(gi.default.instancePath,t)]}function GU({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let r=s?i:(0,Ge.str)`${i}/${e}`;return t&&(r=(0,Ge.str)`${r}${(0,id.getErrorPath)(t,id.Type.Str)}`),[lo.schemaPath,r]}function WU(e,{params:i,message:t},s){let{keyword:r,data:n,schemaValue:l,it:c}=e,{opts:u,propertyName:p,topSchemaRef:_,schemaPath:v}=c;s.push([lo.keyword,r],[lo.params,typeof i=="function"?i(e):i||(0,Ge._)`{}`]),u.messages&&s.push([lo.message,typeof t=="function"?t(e):t]),u.verbose&&s.push([lo.schema,l],[lo.parentSchema,(0,Ge._)`${_}${v}`],[gi.default.data,n]),p&&s.push([lo.propertyName,p])}});var rw=w(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.boolOrEmptySchema=Yo.topBoolOrEmptySchema=void 0;var YU=fa(),JU=we(),ZU=Qi(),QU={message:"boolean schema is false"};function XU(e){let{gen:i,schema:t,validateName:s}=e;t===!1?sw(e,!1):typeof t=="object"&&t.$async===!0?i.return(ZU.default.data):(i.assign((0,JU._)`${s}.errors`,null),i.return(!0))}Yo.topBoolOrEmptySchema=XU;function eO(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),sw(e)):t.var(i,!0)}Yo.boolOrEmptySchema=eO;function sw(e,i){let{gen:t,data:s}=e,r={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,YU.reportError)(r,QU,void 0,i)}});var Tp=w(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.getRules=Jo.isJSONType=void 0;var tO=["string","number","integer","boolean","null","object","array"],iO=new Set(tO);function sO(e){return typeof e=="string"&&iO.has(e)}Jo.isJSONType=sO;function rO(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:We(be({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Jo.getRules=rO});var zp=w(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.shouldUseRule=jr.shouldUseGroup=jr.schemaHasRulesForType=void 0;function oO({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&ow(e,s)}jr.schemaHasRulesForType=oO;function ow(e,i){return i.rules.some(t=>nw(e,t))}jr.shouldUseGroup=ow;function nw(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))}jr.shouldUseRule=nw});var ba=w(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.reportTypeError=ei.checkDataTypes=ei.checkDataType=ei.coerceAndCheckDataType=ei.getJSONTypes=ei.getSchemaTypes=ei.DataType=void 0;var nO=Tp(),aO=zp(),lO=fa(),Ne=we(),aw=qe(),Zo=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(Zo||(ei.DataType=Zo={}));function cO(e){let i=lw(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}ei.getSchemaTypes=cO;function lw(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(nO.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}ei.getJSONTypes=lw;function dO(e,i){let{gen:t,data:s,opts:r}=e,n=uO(i,r.coerceTypes),l=i.length>0&&!(n.length===0&&i.length===1&&(0,aO.schemaHasRulesForType)(e,i[0]));if(l){let c=jp(i,s,r.strictNumbers,Zo.Wrong);t.if(c,()=>{n.length?gO(e,i,n):Dp(e)})}return l}ei.coerceAndCheckDataType=dO;var cw=new Set(["string","number","integer","boolean","null"]);function uO(e,i){return i?e.filter(t=>cw.has(t)||i==="array"&&t==="array"):[]}function gO(e,i,t){let{gen:s,data:r,opts:n}=e,l=s.let("dataType",(0,Ne._)`typeof ${r}`),c=s.let("coerced",(0,Ne._)`undefined`);n.coerceTypes==="array"&&s.if((0,Ne._)`${l} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>s.assign(r,(0,Ne._)`${r}[0]`).assign(l,(0,Ne._)`typeof ${r}`).if(jp(i,r,n.strictNumbers),()=>s.assign(c,r))),s.if((0,Ne._)`${c} !== undefined`);for(let p of t)(cw.has(p)||p==="array"&&n.coerceTypes==="array")&&u(p);s.else(),Dp(e),s.endIf(),s.if((0,Ne._)`${c} !== undefined`,()=>{s.assign(r,c),pO(e,c)});function u(p){switch(p){case"string":s.elseIf((0,Ne._)`${l} == "number" || ${l} == "boolean"`).assign(c,(0,Ne._)`"" + ${r}`).elseIf((0,Ne._)`${r} === null`).assign(c,(0,Ne._)`""`);return;case"number":s.elseIf((0,Ne._)`${l} == "boolean" || ${r} === null
3
3
  || (${l} == "string" && ${r} && ${r} == +${r})`).assign(c,(0,Ne._)`+${r}`);return;case"integer":s.elseIf((0,Ne._)`${l} === "boolean" || ${r} === null
4
4
  || (${l} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(c,(0,Ne._)`+${r}`);return;case"boolean":s.elseIf((0,Ne._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(c,!1).elseIf((0,Ne._)`${r} === "true" || ${r} === 1`).assign(c,!0);return;case"null":s.elseIf((0,Ne._)`${r} === "" || ${r} === 0 || ${r} === false`),s.assign(c,null);return;case"array":s.elseIf((0,Ne._)`${l} === "string" || ${l} === "number"
@@ -1,4 +1,4 @@
1
- import{M as ne,P as se,a as ue,b as R,c as te,d as b,e as S,f as ie,g as E,h as F,i as W,j}from"./chunk-3GUIMBZA.js";import{b as D}from"./chunk-ZXUIFQS4.js";import{$b as Y,Bc as k,Ca as H,Dc as Z,Ec as L,Ib as U,La as I,Lb as X,Nb as u,Qa as d,Rc as ee,Yb as T,Yc as A,Zb as g,_b as w,a as P,b as $,db as O,eb as C,g as pe,ia as M,ja as y,jb as v,la as J,ma as G,na as h,o as V,pb as q,sa as K,ta as Q,wb as a,xb as p,yb as c,zb as f}from"./chunk-OOM2PIRM.js";var m=pe(ue(),1);function ce(i,n){if(i&1){let o=U();p(0,"button",6),X("click",function(){K(o);let s=u();return Q(s.removeItem())}),p(1,"span",7),w(2,"\xD7"),c(),p(3,"span"),w(4,"Close"),c()()}if(i&2){let o=u();g(o.widgetStyles().__remove_item__),d(3),g(o.widgetStyles().__screen_reader__)}}function me(i,n){if(i&1&&f(0,"p",8),i&2){let o=u(2);g(o.widgetStyles().__help_block__),a("innerHTML",o.options==null?null:o.options.helpBlock,I)}}function he(i,n){if(i&1&&(p(0,"div"),v(1,me,1,3,"p",3),c()),i&2){let o=u();d(),a("ngIf",o.options==null?null:o.options.helpBlock)}}function fe(i,n){if(i&1&&f(0,"label",8),i&2){let o,t=u();g((t.options==null?null:t.options.labelHtmlClass)||""),T("sr-only",t.options==null?null:t.options.notitle),a("innerHTML",t.dynamicTitle,I),q("for","control"+((o=t.layoutNode())==null?null:o._id))}}function ge(i,n){if(i&1&&(p(0,"p")(1,"strong"),w(2,"*"),c(),w(3," = required fields "),c()),i&2){let o=u();d(),g(o.widgetStyles().__required_asterisk__)}}function _e(i,n){if(i&1&&f(0,"span",8),i&2){let o=u();g(o.widgetStyles().__field_addon_left__),a("innerHTML",o.options==null?null:o.options.fieldAddonLeft,I)}}function be(i,n){if(i&1&&f(0,"span",8),i&2){let o=u();g(o.widgetStyles().__field_addon_right__),a("innerHTML",o.options==null?null:o.options.fieldAddonRight,I)}}function ye(i,n){if(i&1&&f(0,"span",9),i&2){let o=u();T("glyphicon-ok",(o.options==null?null:o.options.enableSuccessState)&&!(o.formControl!=null&&o.formControl.errors))("glyphicon-remove",(o.options==null?null:o.options.enableErrorState)&&(o.formControl==null?null:o.formControl.errors))}}function Ce(i,n){if(i&1&&f(0,"p",8),i&2){let o=u(2);g(o.widgetStyles().__help_block__),a("innerHTML",o.options==null?null:o.options.helpBlock,I)}}function ve(i,n){if(i&1&&(p(0,"div"),v(1,Ce,1,3,"p",3),c()),i&2){let o=u();d(),a("ngIf",o.options==null?null:o.options.helpBlock)}}function ke(i,n){if(i&1&&(p(0,"div"),w(1,"debug: "),p(2,"pre"),w(3),c()()),i&2){let o=u();d(3),Y(o.debugOutput)}}var N=(()=>{let n=class n{constructor(){this.frameworkThemeSubject=new V("default"),this.frameworkTheme$=this.frameworkThemeSubject.asObservable()}requestThemeChange(t){this.frameworkThemeSubject.next(t),this.activeRequestedTheme=t}getActiveRequestedTheme(){return this.activeRequestedTheme}};n.\u0275fac=function(s){return new(s||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),B=(()=>{let n=class n{applyCssClasses(t,s,e){let r=this.widgetStyles()[t];(!r||m.default.isEmpty(r))&&(r=this.widgetStyles().default),Object.keys(r).forEach(l=>{let _=r[l];_.length&&(s[l]=b(s[l],_)),e&&(s[l]=b(s[l],e))})}flattenWidgetStyles(t){var s={};let e=["__themes__"];return Object.keys(t).forEach(r=>{let l=t[r];if(e.indexOf(r)>=0){s[r]=l;return}m.default.isArray(l)&&(s[r]=l.join(" ")),m.default.isObject(l)&&(s[r]=s[r]||{},Object.keys(l).forEach(_=>{let x=l[_];m.default.isArray(x)?s[r][_]=x.join(" "):s[r][_]=x})),m.default.isString(l)&&(s[r]=l)}),s}constructor(){this.cdr=h(L),this.jsf=h(S),this.jsfFLService=h(F),this.cssFWService=h(N),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.dynamicTitle=null,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}ngOnDestroy(){this.frameworkThemeSubs?.unsubscribe(),this.frameworkThemeSubs=null}get showRemoveButton(){let t=this.layoutNode();return!this.options.removable||this.options.readonly||t.type==="$ref"?!1:t.recursiveReference?!0:!t.arrayItem||!this.parentArray||this.parentArray.items.length-1<=this.parentArray.options.minItems?!1:t.arrayItemType==="list"?!0:this.layoutIndex()[this.layoutIndex().length-1]===this.parentArray.items.length-2}ngOnInit(){let t=this.cssFWService;this.frameworkThemeSubs=t.frameworkTheme$.subscribe(e=>{this.theme=e,this.cdr.detectChanges()}),this.initializeFramework();let s=this.layoutNode();s.arrayItem&&s.type!=="$ref"&&(this.parentArray=this.jsf.getParentNode(this),this.parentArray&&(this.isOrderable=s.arrayItemType==="list"&&!this.options.readonly&&this.parentArray.options.orderable))}ngOnChanges(t){this.frameworkInitialized||this.initializeFramework(),this.isDynamicTitle&&this.updateTitle()}initializeFramework(){let t=this.layoutNode();if(t){if(this.options=(0,m.cloneDeep)(t.options),this.widgetLayoutNode=$(P({},t),{options:(0,m.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.isDynamicTitle=this.options?.title&&/{{.+?}}/.test(this.options.title),this.dynamicTitle=this.options?.title,!["$ref","advancedfieldset","authfieldset","button","card","checkbox","expansion-panel","help","message","msg","section","submit","tabarray","tabs"].includes(t.type)&&/{{.+?}}/.test(this.widgetOptions.title||"")&&this.updateTitle(),this.setTitle(),this.widgetOptions.title&&(this.dynamicTitle=""),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 s=this.widgetStyles().__required_asterisk__||"text-danger";this.options.title+=` <strong class="${s}">*</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(s=>this.updateHelpBlock(s)),this.options.debug)){let s=[];this.debugOutput=(0,m.map)(s,e=>JSON.stringify(e,null,2)).join(`
1
+ import{M as ne,P as se,a as ue,b as R,c as te,d as b,e as S,f as ie,g as E,h as F,i as W,j}from"./chunk-DIMLCFIJ.js";import{b as D}from"./chunk-ZXUIFQS4.js";import{$b as Y,Bc as k,Ca as H,Dc as Z,Ec as L,Ib as U,La as I,Lb as X,Nb as u,Qa as d,Rc as ee,Yb as T,Yc as A,Zb as g,_b as w,a as P,b as $,db as O,eb as C,g as pe,ia as M,ja as y,jb as v,la as J,ma as G,na as h,o as V,pb as q,sa as K,ta as Q,wb as a,xb as p,yb as c,zb as f}from"./chunk-OOM2PIRM.js";var m=pe(ue(),1);function ce(i,n){if(i&1){let o=U();p(0,"button",6),X("click",function(){K(o);let s=u();return Q(s.removeItem())}),p(1,"span",7),w(2,"\xD7"),c(),p(3,"span"),w(4,"Close"),c()()}if(i&2){let o=u();g(o.widgetStyles().__remove_item__),d(3),g(o.widgetStyles().__screen_reader__)}}function me(i,n){if(i&1&&f(0,"p",8),i&2){let o=u(2);g(o.widgetStyles().__help_block__),a("innerHTML",o.options==null?null:o.options.helpBlock,I)}}function he(i,n){if(i&1&&(p(0,"div"),v(1,me,1,3,"p",3),c()),i&2){let o=u();d(),a("ngIf",o.options==null?null:o.options.helpBlock)}}function fe(i,n){if(i&1&&f(0,"label",8),i&2){let o,t=u();g((t.options==null?null:t.options.labelHtmlClass)||""),T("sr-only",t.options==null?null:t.options.notitle),a("innerHTML",t.dynamicTitle,I),q("for","control"+((o=t.layoutNode())==null?null:o._id))}}function ge(i,n){if(i&1&&(p(0,"p")(1,"strong"),w(2,"*"),c(),w(3," = required fields "),c()),i&2){let o=u();d(),g(o.widgetStyles().__required_asterisk__)}}function _e(i,n){if(i&1&&f(0,"span",8),i&2){let o=u();g(o.widgetStyles().__field_addon_left__),a("innerHTML",o.options==null?null:o.options.fieldAddonLeft,I)}}function be(i,n){if(i&1&&f(0,"span",8),i&2){let o=u();g(o.widgetStyles().__field_addon_right__),a("innerHTML",o.options==null?null:o.options.fieldAddonRight,I)}}function ye(i,n){if(i&1&&f(0,"span",9),i&2){let o=u();T("glyphicon-ok",(o.options==null?null:o.options.enableSuccessState)&&!(o.formControl!=null&&o.formControl.errors))("glyphicon-remove",(o.options==null?null:o.options.enableErrorState)&&(o.formControl==null?null:o.formControl.errors))}}function Ce(i,n){if(i&1&&f(0,"p",8),i&2){let o=u(2);g(o.widgetStyles().__help_block__),a("innerHTML",o.options==null?null:o.options.helpBlock,I)}}function ve(i,n){if(i&1&&(p(0,"div"),v(1,Ce,1,3,"p",3),c()),i&2){let o=u();d(),a("ngIf",o.options==null?null:o.options.helpBlock)}}function ke(i,n){if(i&1&&(p(0,"div"),w(1,"debug: "),p(2,"pre"),w(3),c()()),i&2){let o=u();d(3),Y(o.debugOutput)}}var N=(()=>{let n=class n{constructor(){this.frameworkThemeSubject=new V("default"),this.frameworkTheme$=this.frameworkThemeSubject.asObservable()}requestThemeChange(t){this.frameworkThemeSubject.next(t),this.activeRequestedTheme=t}getActiveRequestedTheme(){return this.activeRequestedTheme}};n.\u0275fac=function(s){return new(s||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),B=(()=>{let n=class n{applyCssClasses(t,s,e){let r=this.widgetStyles()[t];(!r||m.default.isEmpty(r))&&(r=this.widgetStyles().default),Object.keys(r).forEach(l=>{let _=r[l];_.length&&(s[l]=b(s[l],_)),e&&(s[l]=b(s[l],e))})}flattenWidgetStyles(t){var s={};let e=["__themes__"];return Object.keys(t).forEach(r=>{let l=t[r];if(e.indexOf(r)>=0){s[r]=l;return}m.default.isArray(l)&&(s[r]=l.join(" ")),m.default.isObject(l)&&(s[r]=s[r]||{},Object.keys(l).forEach(_=>{let x=l[_];m.default.isArray(x)?s[r][_]=x.join(" "):s[r][_]=x})),m.default.isString(l)&&(s[r]=l)}),s}constructor(){this.cdr=h(L),this.jsf=h(S),this.jsfFLService=h(F),this.cssFWService=h(N),this.frameworkInitialized=!1,this.formControl=null,this.debugOutput="",this.debug="",this.parentArray=null,this.isOrderable=!1,this.dynamicTitle=null,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}ngOnDestroy(){this.frameworkThemeSubs?.unsubscribe(),this.frameworkThemeSubs=null}get showRemoveButton(){let t=this.layoutNode();return!this.options.removable||this.options.readonly||t.type==="$ref"?!1:t.recursiveReference?!0:!t.arrayItem||!this.parentArray||this.parentArray.items.length-1<=this.parentArray.options.minItems?!1:t.arrayItemType==="list"?!0:this.layoutIndex()[this.layoutIndex().length-1]===this.parentArray.items.length-2}ngOnInit(){let t=this.cssFWService;this.frameworkThemeSubs=t.frameworkTheme$.subscribe(e=>{this.theme=e,this.cdr.detectChanges()}),this.initializeFramework();let s=this.layoutNode();s.arrayItem&&s.type!=="$ref"&&(this.parentArray=this.jsf.getParentNode(this),this.parentArray&&(this.isOrderable=s.arrayItemType==="list"&&!this.options.readonly&&this.parentArray.options.orderable))}ngOnChanges(t){this.frameworkInitialized||this.initializeFramework(),this.isDynamicTitle&&this.updateTitle()}initializeFramework(){let t=this.layoutNode();if(t){if(this.options=(0,m.cloneDeep)(t.options),this.widgetLayoutNode=$(P({},t),{options:(0,m.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.isDynamicTitle=this.options?.title&&/{{.+?}}/.test(this.options.title),this.dynamicTitle=this.options?.title,!["$ref","advancedfieldset","authfieldset","button","card","checkbox","expansion-panel","help","message","msg","section","submit","tabarray","tabs"].includes(t.type)&&/{{.+?}}/.test(this.widgetOptions.title||"")&&this.updateTitle(),this.setTitle(),this.widgetOptions.title&&(this.dynamicTitle=""),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 s=this.widgetStyles().__required_asterisk__||"text-danger";this.options.title+=` <strong class="${s}">*</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(s=>this.updateHelpBlock(s)),this.options.debug)){let s=[];this.debugOutput=(0,m.map)(s,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)}}updateTitle(){this.dynamicTitle=this.jsf.parseText(this.options?.title,this.jsf.getFormControlValue(this),this.jsf.getFormControlGroup(this)?.value,this.dataIndex()[this.dataIndex().length-1])}removeItem(){this.jsf.removeItem(this)}};n.\u0275fac=function(s){return new(s||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(s,e){if(s&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),f(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)),s&2){let r,l,_,x;g((e.options==null?null:e.options.htmlClass)||""),T("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",((_=e.layoutNode())==null?null:_.type)==="submit"&&(e.jsf==null||e.jsf.formOptions==null?null:e.jsf.formOptions.fieldsRequired)),d(),T("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"),oe;(function(i){class n{}i.csscategories=n})(oe||(oe={}));var le=(()=>{let n=class n{};n.\u0275fac=function(s){return new(s||n)},n.\u0275mod=C({type:n}),n.\u0275inj=y({providers:[S,F,E,N],imports:[j,A,W]});let i=n;return i})(),re=(()=>{let n=class n extends R{constructor(t){super(),this.cssFWService=h(N),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(),s=this.config?.widgetstyles?.__themes__,e=s&&s[0];if(t&&(e={name:t,text:t},s)){let r=s.filter(l=>l.name==t);e=r&&r[0]||e}return e}requestThemeChange(t){this.cssFWService.requestThemeChange(t)}registerTheme(t,s=!0){let r=(this.config?.widgetstyles?.__themes__||[]).filter(l=>t.name==l.name);if(r&&r[0]){if(s)return r[0].text=t.text,!0;if(!s)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 s=this.config?.widgetstyles?.__themes__,e=-1;return s&&(s.forEach((r,l)=>{t==r.name&&(e=l)}),e>=0)?(s.splice(e,1),!0):!1}getConfig(){return this.config}};n.\u0275fac=function(s){return new(s||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=h(L),this.jsf=h(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(s){return new(s||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(s,e){s&1&&(p(0,"div"),f(1,"css-framework",0),c()),s&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=h(N);super(Se),this.framework=Ie,this.cssFWService=t}};n.\u0275fac=function(s){return new(s||n)},n.\u0275prov=M({token:n,factory:n.\u0275fac});let i=n;return i})(),ae=(()=>{let n=class n{};n.\u0275fac=function(s){return new(s||n)},n.\u0275mod=C({type:n}),n.\u0275inj=y({providers:[S,F,E,{provide:R,useClass:Me,multi:!0}],imports:[j,A,W,le,j]});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:[se],imports:[D,de]})}return i})();export{it as a};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-WEXOQCVG.js";import"./chunk-C5VP7CRC.js";import{e as T}from"./chunk-R7Q4CXAE.js";import{b as w}from"./chunk-OM7GHRRK.js";import{k as C,l as $,n as k,q as S}from"./chunk-6C5CYDDU.js";import{$b as s,Ab as r,Bb as i,Cb as l,Jb as E,La as x,Nb as h,Qa as n,_b as a,db as _,lc as g,na as o,qb as d,rb as f,rc as m,sc as c,tc as y}from"./chunk-OOM2PIRM.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=h();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=h();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(S);$router=o(T);$settings=o(w);$toastr=o(k);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="ok"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),f(v.error?11:12),n(2),f(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
1
+ import{a as b}from"./chunk-3XZXVB5X.js";import"./chunk-DI7U3IQB.js";import{e as T}from"./chunk-R7Q4CXAE.js";import{b as w}from"./chunk-JMZS4O2V.js";import{k as C,l as $,n as k,q as S}from"./chunk-MXYD5BHP.js";import{$b as s,Ab as r,Bb as i,Cb as l,Jb as E,La as x,Nb as h,Qa as n,_b as a,db as _,lc as g,na as o,qb as d,rb as f,rc as m,sc as c,tc as y}from"./chunk-OOM2PIRM.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=h();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=h();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(S);$router=o(T);$settings=o(w);$toastr=o(k);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="ok"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),f(v.error?11:12),n(2),f(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
@@ -1 +1 @@
1
- import{a as l}from"./chunk-ADJ6TEYQ.js";import{a as m}from"./chunk-AZY2DNUN.js";import{n as s}from"./chunk-3F6KNL45.js";import{b as o}from"./chunk-OM7GHRRK.js";import{k as i}from"./chunk-6C5CYDDU.js";import{ia as r,na as n}from"./chunk-OOM2PIRM.js";var I=(()=>{class e{$terminal=n(l);$settings=n(o);$modal=n(s);$translate=n(i);handleBeforeUnload(t){if(!this.$settings.env.terminal?.persistence&&!this.$settings.env.terminal?.hideWarning&&this.$terminal.hasActiveSession()&&this.$terminal.hasUserTypedInSession()){let a=this.$translate.instant("platform.terminal.terminate_unload");return t.preventDefault(),t.returnValue=a,a}}canDeactivate(){if(this.$settings.env.terminal?.persistence||this.$settings.env.terminal?.hideWarning||!this.$terminal.hasActiveSession()||!this.$terminal.hasUserTypedInSession())return!0;let t=this.$modal.open(m,{size:"lg",backdrop:"static"});return t.componentInstance.title=this.$translate.instant("platform.terminal.terminate_title"),t.componentInstance.message=this.$translate.instant("platform.terminal.terminate_message_1"),t.componentInstance.message2=this.$translate.instant("platform.terminal.terminate_message_2"),t.componentInstance.message3=this.$translate.instant("common.phrases.are_you_sure"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.confirmButtonClass="btn-primary",t.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning",t.result.then(()=>!0).catch(()=>!1)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{I as a};
1
+ import{a as l}from"./chunk-Y5HHX2AA.js";import{a as m}from"./chunk-D3YCLD23.js";import{n as s}from"./chunk-3F6KNL45.js";import{b as o}from"./chunk-JMZS4O2V.js";import{k as i}from"./chunk-MXYD5BHP.js";import{ia as r,na as n}from"./chunk-OOM2PIRM.js";var I=(()=>{class e{$terminal=n(l);$settings=n(o);$modal=n(s);$translate=n(i);handleBeforeUnload(t){if(!this.$settings.env.terminal?.persistence&&!this.$settings.env.terminal?.hideWarning&&this.$terminal.hasActiveSession()&&this.$terminal.hasUserTypedInSession()){let a=this.$translate.instant("platform.terminal.terminate_unload");return t.preventDefault(),t.returnValue=a,a}}canDeactivate(){if(this.$settings.env.terminal?.persistence||this.$settings.env.terminal?.hideWarning||!this.$terminal.hasActiveSession()||!this.$terminal.hasUserTypedInSession())return!0;let t=this.$modal.open(m,{size:"lg",backdrop:"static"});return t.componentInstance.title=this.$translate.instant("platform.terminal.terminate_title"),t.componentInstance.message=this.$translate.instant("platform.terminal.terminate_message_1"),t.componentInstance.message2=this.$translate.instant("platform.terminal.terminate_message_2"),t.componentInstance.message3=this.$translate.instant("common.phrases.are_you_sure"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.confirmButtonClass="btn-primary",t.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning",t.result.then(()=>!0).catch(()=>!1)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{I as a};
@@ -1 +1 @@
1
- import{k as v,l as E,n as _,q as h}from"./chunk-6C5CYDDU.js";import{$b as a,Ab as i,Bb as e,Cb as f,Nb as u,Qa as n,_b as o,db as d,na as l,qb as c,rb as x,rc as p,sc as s}from"./chunk-OOM2PIRM.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};
1
+ import{k as v,l as E,n as _,q as h}from"./chunk-MXYD5BHP.js";import{$b as a,Ab as i,Bb as e,Cb as f,Nb as u,Qa as n,_b as o,db as d,na as l,qb as c,rb as x,rc as p,sc as s}from"./chunk-OOM2PIRM.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-NQB7BEZZ.js";import"./chunk-SCWBTFUY.js";import"./chunk-C5VP7CRC.js";import{h as r}from"./chunk-R7Q4CXAE.js";import"./chunk-OM7GHRRK.js";import"./chunk-6C5CYDDU.js";import{eb as e,ja as o}from"./chunk-OOM2PIRM.js";var c=[{path:"",loadComponent:()=>import("./chunk-JEUVQW5P.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{a as n}from"./chunk-PVEWB3YZ.js";import"./chunk-CFHVD4RQ.js";import"./chunk-DI7U3IQB.js";import{h as r}from"./chunk-R7Q4CXAE.js";import"./chunk-JMZS4O2V.js";import"./chunk-MXYD5BHP.js";import{eb as e,ja as o}from"./chunk-OOM2PIRM.js";var c=[{path:"",loadComponent:()=>import("./chunk-ODLNBFZU.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{a as s}from"./chunk-CM3N3C3W.js";import"./chunk-RY3E4AUI.js";import"./chunk-OZKGVJ4N.js";import"./chunk-ZXUIFQS4.js";import"./chunk-3F6KNL45.js";import"./chunk-B6MBMYJR.js";import"./chunk-WEXOQCVG.js";import"./chunk-C5VP7CRC.js";import{h as i}from"./chunk-R7Q4CXAE.js";import"./chunk-OM7GHRRK.js";import"./chunk-6C5CYDDU.js";import{eb as t,ja as e}from"./chunk-OOM2PIRM.js";var u=[{path:"",loadComponent:()=>import("./chunk-BRP3EHP7.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
1
+ import{a as s}from"./chunk-BBH2ZQY6.js";import"./chunk-KFXDCZRC.js";import"./chunk-OWKBT6OU.js";import"./chunk-ZXUIFQS4.js";import"./chunk-3F6KNL45.js";import"./chunk-B6MBMYJR.js";import"./chunk-3XZXVB5X.js";import"./chunk-DI7U3IQB.js";import{h as i}from"./chunk-R7Q4CXAE.js";import"./chunk-JMZS4O2V.js";import"./chunk-MXYD5BHP.js";import{eb as t,ja as e}from"./chunk-OOM2PIRM.js";var u=[{path:"",loadComponent:()=>import("./chunk-TNQ2USMJ.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
@@ -1 +1 @@
1
- import{A,C as G,D 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}from"./chunk-B6MBMYJR.js";import{b as K}from"./chunk-C5VP7CRC.js";import{e as U}from"./chunk-R7Q4CXAE.js";import{b as J}from"./chunk-OM7GHRRK.js";import{l as j,p as W}from"./chunk-6C5CYDDU.js";import{$b as h,Cc as b,Ec as L,La as x,Lb as E,Nb as M,P as I,Pc as N,Qa as i,Sc as V,Ub as v,Vb as F,_b as g,ac as R,ad as P,db as k,h as y,lc as f,na as p,qb as u,rb as c,rc as l,sc as d,wb as m,x as S,xb as r,yb as a,zb as s}from"./chunk-OOM2PIRM.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-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-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-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-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{A,C as G,D 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}from"./chunk-B6MBMYJR.js";import{b as K}from"./chunk-DI7U3IQB.js";import{e as U}from"./chunk-R7Q4CXAE.js";import{b as J}from"./chunk-JMZS4O2V.js";import{l as j,p as W}from"./chunk-MXYD5BHP.js";import{$b as h,Cc as b,Ec as L,La as x,Lb as E,Nb as M,P as I,Pc as N,Qa as i,Sc as V,Ub as v,Vb as F,_b as g,ac as R,ad as P,db as k,h as y,lc as f,na as p,qb as u,rb as c,rc as l,sc as d,wb as m,x as S,xb as r,yb as a,zb as s}from"./chunk-OOM2PIRM.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-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-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-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-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 +1 @@
1
- import{h as r}from"./chunk-R7Q4CXAE.js";import{eb as o,ja as e}from"./chunk-OOM2PIRM.js";var m=[{path:"",loadComponent:()=>import("./chunk-C6X7E5CS.js").then(t=>t.TerminalComponent),canDeactivate:[t=>t.canDeactivate?t.canDeactivate():!0]}],n=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o({type:t});static \u0275inj=e({imports:[r.forChild(m),r]})}return t})();var s=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o({type:t});static \u0275inj=e({imports:[n]})}return t})();export{s as TerminalModule};
1
+ import{h as r}from"./chunk-R7Q4CXAE.js";import{eb as o,ja as e}from"./chunk-OOM2PIRM.js";var m=[{path:"",loadComponent:()=>import("./chunk-UDSIZPWR.js").then(t=>t.TerminalComponent),canDeactivate:[t=>t.canDeactivate?t.canDeactivate():!0]}],n=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o({type:t});static \u0275inj=e({imports:[r.forChild(m),r]})}return t})();var s=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o({type:t});static \u0275inj=e({imports:[n]})}return t})();export{s as TerminalModule};
@@ -1 +1 @@
1
- import{h as i}from"./chunk-R7Q4CXAE.js";import{eb as e,ja as t}from"./chunk-OOM2PIRM.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-W663VLRG.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-FRNPHIV3.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-2VYCMFLK.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
1
+ import{h as i}from"./chunk-R7Q4CXAE.js";import{eb as e,ja as t}from"./chunk-OOM2PIRM.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-BACUUL7U.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-5XHUVG6K.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-JFY2RCD6.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
@@ -1 +1 @@
1
- import{k as tt,n as et,q as it}from"./chunk-6C5CYDDU.js";import{W as R,e as ut,g as ct,h as P,ia as G,md as X,n as Q,na as Y,x as B}from"./chunk-OOM2PIRM.js";var st=ut((U,E)=>{(function(w,k){typeof U=="object"&&typeof E<"u"?E.exports=k():typeof define=="function"&&define.amd?define(k):(w=typeof globalThis<"u"?globalThis:w||self).dayjs=k()})(U,function(){"use strict";var w=1e3,k=6e4,s=36e5,h="millisecond",d="second",m="minute",M="hour",y="day",f="week",b="month",K="quarter",S="year",_="date",q="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ot={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},at={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,b),o=t-e<0,a=i.clone().add(n+(o?-1:1),b);return+(-(n+(t-e)/(o?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:b,y:S,w:f,d:y,D:_,h:M,m,s:d,ms:h,Q:K}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},I="en",D={};D[I]=ot;var Z="$isDayjsObject",N=function(r){return r instanceof V||!(!r||!r[Z])},C=function r(i,t,n){var e;if(!i)return I;if(typeof i=="string"){var o=i.toLowerCase();D[o]&&(e=o),t&&(D[o]=t,e=o);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;D[c]=i,e=c}return!n&&e&&(I=e),e||!n&&I},g=function(r,i){if(N(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new V(t)},u=at;u.l=C,u.i=N,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var V=(function(){function r(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var i=r.prototype;return i.parse=function(t){this.$d=(function(n){var e=n.date,o=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(nt);if(a){var c=a[2]-1||0,l=(a[7]||"0").substring(0,3);return o?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)}}return new Date(e)})(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==q},i.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return g(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<g(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,o=!!u.u(n)||n,a=u.p(t),c=function(x,v){var T=u.w(e.$u?Date.UTC(e.$y,v,x):new Date(e.$y,v,x),e);return o?T:T.endOf(y)},l=function(x,v){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(v)),e)},$=this.$W,p=this.$M,L=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case b:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,j=($<O?$+7:$)-O;return c(o?L-j:L+(6-j),p);case y:case _:return l(H+"Hours",0);case M:return l(H+"Minutes",1);case m:return l(H+"Seconds",2);case d:return l(H+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,o=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[y]=a+"Date",e[_]=a+"Date",e[b]=a+"Month",e[S]=a+"FullYear",e[M]=a+"Hours",e[m]=a+"Minutes",e[d]=a+"Seconds",e[h]=a+"Milliseconds",e)[o],l=o===y?this.$D+(n-this.$W):n;if(o===b||o===S){var $=this.clone().set(_,1);$.$d[c](l),$.init(),this.$d=$.set(_,Math.min(this.$D,$.daysInMonth())).$d}else c&&this.$d[c](l);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,o=this;t=Number(t);var a=u.p(n),c=function(p){var L=g(o);return u.w(L.date(L.date()+Math.round(p*t)),o)};if(a===b)return this.set(b,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===y)return c(1);if(a===f)return c(7);var l=(e={},e[m]=k,e[M]=s,e[d]=w,e)[a]||1,$=this.$d.getTime()+t*l;return u.w($,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||q;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,L=e.months,H=e.meridiem,O=function(v,T,A,W){return v&&(v[T]||v(n,o))||A[T].slice(0,W)},j=function(v){return u.s(c%12||12,v,"0")},x=H||function(v,T,A){var W=v<12?"AM":"PM";return A?W.toLowerCase():W};return o.replace(rt,function(v,T){return T||(function(A){switch(A){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return $+1;case"MM":return u.s($+1,2,"0");case"MMM":return O(e.monthsShort,$,L,3);case"MMMM":return O(L,$);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return O(e.weekdaysMin,n.$W,p,2);case"ddd":return O(e.weekdaysShort,n.$W,p,3);case"dddd":return p[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return x(c,l,!0);case"A":return x(c,l,!1);case"m":return String(l);case"mm":return u.s(l,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null})(v)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var o,a=this,c=u.p(n),l=g(t),$=(l.utcOffset()-this.utcOffset())*k,p=this-l,L=function(){return u.m(a,l)};switch(c){case S:o=L()/12;break;case b:o=L();break;case K:o=L()/3;break;case f:o=(p-$)/6048e5;break;case y:o=(p-$)/864e5;break;case M:o=p/s;break;case m:o=p/k;break;case d:o=p/w;break;default:o=p}return e?o:u.a(o)},i.daysInMonth=function(){return this.endOf(b).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),o=C(t,n,!0);return o&&(e.$L=o),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r})(),z=V.prototype;return g.prototype=z,[["$ms",h],["$s",d],["$m",m],["$H",M],["$W",y],["$M",b],["$y",S],["$D",_]].forEach(function(r){z[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),g.extend=function(r,i){return r.$i||(r(i,V,g),r.$i=!0),g},g.locale=C,g.isDayjs=N,g.unix=function(r){return g(1e3*r)},g.en=D[I],g.Ls=D,g.p={},g})});var J=ct(st(),1);var vt=(()=>{class w{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];restartToastRef=null;env={};host;proxyHost;formAuth=!0;sessionTimeout=28800;sessionTimeoutInactivityBased=!1;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(R());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let s=yield B(this.$api.get("/auth/settings"));this.formAuth=s.formAuth,this.sessionTimeout=s.sessionTimeout,this.sessionTimeoutInactivityBased=s.sessionTimeoutInactivityBased,this.env=s.env,this.host=s.host,this.proxyHost=s.proxyHost,this.lightingMode=s.lightingMode,this.wallpaper=s.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(s.theme),this.setMenuMode(s.menuMode),this.setKeepOrphans(s.keepOrphans),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(s.serverTimestamp),this.setUiVersion(s.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0),this.browserLang=this.$translate.getBrowserCultureLang()})}setBrowserLightingMode(s){this.browserLightingMode=s,this.lightingMode==="auto"&&this.setLightingMode(s,"browser")}setLightingMode(s,h){h==="user"&&(this.lightingMode=s),this.currentLightingMode=s,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(s){(!s||!this.themeList.includes(s))&&(s=this.defaultTheme,B(this.$api.put("/config-editor/ui",{key:"theme",value:s})).catch(m=>console.error("Error saving setTheme:",m)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=s,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((m,M)=>{try{let y=m.contentDocument;if(y){let f=y.body;this.actualLightingMode==="dark"?(f.classList.contains(`config-ui-x-${this.theme}`)&&f.classList.remove(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)||f.classList.add(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")||f.classList.add("dark-mode"),f.style.backgroundColor="#242424 !important",f.style.color="#ffffff !important"):(f.classList.contains(`config-ui-x-${this.theme}`)||f.classList.add(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)&&f.classList.remove(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")&&f.classList.remove("dark-mode"),f.style.backgroundColor="#ffffff !important",f.style.color="#000000 !important"),m.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:s},window.location.origin)}}catch(y){console.warn(`Iframe ${M}: Access denied (cross-origin?)`,{error:y,src:m.src})}})}setMenuMode(s){this.menuMode=s}setKeepOrphans(s){this.keepOrphans=s}setLang(s){s?this.$translate.use(s):s="auto",this.env.lang=s}setItem(s,h){this[s]=h}setEnvItem(s,h){if(s.includes(".")){let d=s.split("."),m=this.env;for(let M=0;M<d.length-1;M+=1){if(this.forbiddenKeys.includes(d[M]))return;m[d[M]]||(m[d[M]]={}),m=m[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[s]=h}checkServerTime(s){let d=(0,J.default)(s).diff((0,J.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}setUiVersion(s){this.uiVersion||(this.uiVersion=s)}setTitle(s){this.$title.setTitle(s||"Homebridge")}setPageTitle(s){let h=this.env.homebridgeInstanceName||"Homebridge";s?this.$title.setTitle(`${h} \u2014 ${s}`):this.$title.setTitle(h)}isFeatureEnabled(s){return this.env.featureFlags?.[s]??!1}static \u0275fac=function(h){return new(h||w)};static \u0275prov=G({token:w,factory:w.\u0275fac,providedIn:"root"})}return w})();export{st as a,vt as b};
1
+ import{k as tt,n as et,q as it}from"./chunk-MXYD5BHP.js";import{W as R,e as ut,g as ct,h as P,ia as G,md as X,n as Q,na as Y,x as B}from"./chunk-OOM2PIRM.js";var st=ut((U,E)=>{(function(w,k){typeof U=="object"&&typeof E<"u"?E.exports=k():typeof define=="function"&&define.amd?define(k):(w=typeof globalThis<"u"?globalThis:w||self).dayjs=k()})(U,function(){"use strict";var w=1e3,k=6e4,s=36e5,h="millisecond",d="second",m="minute",M="hour",y="day",f="week",b="month",K="quarter",S="year",_="date",q="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ot={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},at={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,b),o=t-e<0,a=i.clone().add(n+(o?-1:1),b);return+(-(n+(t-e)/(o?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:b,y:S,w:f,d:y,D:_,h:M,m,s:d,ms:h,Q:K}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},I="en",D={};D[I]=ot;var Z="$isDayjsObject",N=function(r){return r instanceof V||!(!r||!r[Z])},C=function r(i,t,n){var e;if(!i)return I;if(typeof i=="string"){var o=i.toLowerCase();D[o]&&(e=o),t&&(D[o]=t,e=o);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;D[c]=i,e=c}return!n&&e&&(I=e),e||!n&&I},g=function(r,i){if(N(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new V(t)},u=at;u.l=C,u.i=N,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var V=(function(){function r(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var i=r.prototype;return i.parse=function(t){this.$d=(function(n){var e=n.date,o=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(nt);if(a){var c=a[2]-1||0,l=(a[7]||"0").substring(0,3);return o?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,l)}}return new Date(e)})(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==q},i.isSame=function(t,n){var e=g(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return g(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<g(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,o=!!u.u(n)||n,a=u.p(t),c=function(x,v){var T=u.w(e.$u?Date.UTC(e.$y,v,x):new Date(e.$y,v,x),e);return o?T:T.endOf(y)},l=function(x,v){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(v)),e)},$=this.$W,p=this.$M,L=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case b:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,j=($<O?$+7:$)-O;return c(o?L-j:L+(6-j),p);case y:case _:return l(H+"Hours",0);case M:return l(H+"Minutes",1);case m:return l(H+"Seconds",2);case d:return l(H+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,o=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[y]=a+"Date",e[_]=a+"Date",e[b]=a+"Month",e[S]=a+"FullYear",e[M]=a+"Hours",e[m]=a+"Minutes",e[d]=a+"Seconds",e[h]=a+"Milliseconds",e)[o],l=o===y?this.$D+(n-this.$W):n;if(o===b||o===S){var $=this.clone().set(_,1);$.$d[c](l),$.init(),this.$d=$.set(_,Math.min(this.$D,$.daysInMonth())).$d}else c&&this.$d[c](l);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,o=this;t=Number(t);var a=u.p(n),c=function(p){var L=g(o);return u.w(L.date(L.date()+Math.round(p*t)),o)};if(a===b)return this.set(b,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===y)return c(1);if(a===f)return c(7);var l=(e={},e[m]=k,e[M]=s,e[d]=w,e)[a]||1,$=this.$d.getTime()+t*l;return u.w($,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||q;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,L=e.months,H=e.meridiem,O=function(v,T,A,W){return v&&(v[T]||v(n,o))||A[T].slice(0,W)},j=function(v){return u.s(c%12||12,v,"0")},x=H||function(v,T,A){var W=v<12?"AM":"PM";return A?W.toLowerCase():W};return o.replace(rt,function(v,T){return T||(function(A){switch(A){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return $+1;case"MM":return u.s($+1,2,"0");case"MMM":return O(e.monthsShort,$,L,3);case"MMMM":return O(L,$);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return O(e.weekdaysMin,n.$W,p,2);case"ddd":return O(e.weekdaysShort,n.$W,p,3);case"dddd":return p[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return x(c,l,!0);case"A":return x(c,l,!1);case"m":return String(l);case"mm":return u.s(l,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null})(v)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var o,a=this,c=u.p(n),l=g(t),$=(l.utcOffset()-this.utcOffset())*k,p=this-l,L=function(){return u.m(a,l)};switch(c){case S:o=L()/12;break;case b:o=L();break;case K:o=L()/3;break;case f:o=(p-$)/6048e5;break;case y:o=(p-$)/864e5;break;case M:o=p/s;break;case m:o=p/k;break;case d:o=p/w;break;default:o=p}return e?o:u.a(o)},i.daysInMonth=function(){return this.endOf(b).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),o=C(t,n,!0);return o&&(e.$L=o),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r})(),z=V.prototype;return g.prototype=z,[["$ms",h],["$s",d],["$m",m],["$H",M],["$W",y],["$M",b],["$y",S],["$D",_]].forEach(function(r){z[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),g.extend=function(r,i){return r.$i||(r(i,V,g),r.$i=!0),g},g.locale=C,g.isDayjs=N,g.unix=function(r){return g(1e3*r)},g.en=D[I],g.Ls=D,g.p={},g})});var J=ct(st(),1);var vt=(()=>{class w{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);settingsLoadedSubject=new Q;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];restartToastRef=null;env={};host;proxyHost;formAuth=!0;sessionTimeout=28800;sessionTimeoutInactivityBased=!1;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(R());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return P(this,null,function*(){let s=yield B(this.$api.get("/auth/settings"));this.formAuth=s.formAuth,this.sessionTimeout=s.sessionTimeout,this.sessionTimeoutInactivityBased=s.sessionTimeoutInactivityBased,this.env=s.env,this.host=s.host,this.proxyHost=s.proxyHost,this.lightingMode=s.lightingMode,this.wallpaper=s.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(s.theme),this.setMenuMode(s.menuMode),this.setKeepOrphans(s.keepOrphans),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(s.serverTimestamp),this.setUiVersion(s.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0),this.browserLang=this.$translate.getBrowserCultureLang()})}setBrowserLightingMode(s){this.browserLightingMode=s,this.lightingMode==="auto"&&this.setLightingMode(s,"browser")}setLightingMode(s,h){h==="user"&&(this.lightingMode=s),this.currentLightingMode=s,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(s){(!s||!this.themeList.includes(s))&&(s=this.defaultTheme,B(this.$api.put("/config-editor/ui",{key:"theme",value:s})).catch(m=>console.error("Error saving setTheme:",m)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=s,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((m,M)=>{try{let y=m.contentDocument;if(y){let f=y.body;this.actualLightingMode==="dark"?(f.classList.contains(`config-ui-x-${this.theme}`)&&f.classList.remove(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)||f.classList.add(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")||f.classList.add("dark-mode"),f.style.backgroundColor="#242424 !important",f.style.color="#ffffff !important"):(f.classList.contains(`config-ui-x-${this.theme}`)||f.classList.add(`config-ui-x-${this.theme}`),f.classList.contains(`config-ui-x-dark-mode-${this.theme}`)&&f.classList.remove(`config-ui-x-dark-mode-${this.theme}`),f.classList.contains("dark-mode")&&f.classList.remove("dark-mode"),f.style.backgroundColor="#ffffff !important",f.style.color="#000000 !important"),m.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:s},window.location.origin)}}catch(y){console.warn(`Iframe ${M}: Access denied (cross-origin?)`,{error:y,src:m.src})}})}setMenuMode(s){this.menuMode=s}setKeepOrphans(s){this.keepOrphans=s}setLang(s){s?this.$translate.use(s):s="auto",this.env.lang=s}setItem(s,h){this[s]=h}setEnvItem(s,h){if(s.includes(".")){let d=s.split("."),m=this.env;for(let M=0;M<d.length-1;M+=1){if(this.forbiddenKeys.includes(d[M]))return;m[d[M]]||(m[d[M]]={}),m=m[d[M]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[s]=h}checkServerTime(s){let d=(0,J.default)(s).diff((0,J.default)(),"hour");this.serverTimeOffset=d*60*60,(d>=8||d<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}setUiVersion(s){this.uiVersion||(this.uiVersion=s)}setTitle(s){this.$title.setTitle(s||"Homebridge")}setPageTitle(s){let h=this.env.homebridgeInstanceName||"Homebridge";s?this.$title.setTitle(`${h} \u2014 ${s}`):this.$title.setTitle(h)}isFeatureEnabled(s){return this.env.featureFlags?.[s]??!1}static \u0275fac=function(h){return new(h||w)};static \u0275prov=G({token:w,factory:w.\u0275fac,providedIn:"root"})}return w})();export{st as a,vt as b};