homebridge-config-ui-x 5.11.2-beta.6 → 5.11.2-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/{chunk-TWKIJ7CI.js → chunk-2HDDFLX5.js} +1 -1
- package/public/{chunk-ZABNRIEK.js → chunk-2KUGAT6L.js} +1 -1
- package/public/{chunk-LS3PT3EF.js → chunk-2QHT7UTY.js} +1 -1
- package/public/{chunk-SMGUXH2S.js → chunk-3B6IFS6E.js} +1 -1
- package/public/chunk-4HJPJ6JO.js +1 -0
- package/public/{chunk-IANXHCHI.js → chunk-4ZCBTPFQ.js} +1 -1
- package/public/{chunk-CDW26RZX.js → chunk-5DKBUEKC.js} +1 -1
- package/public/{chunk-4BJ6NDID.js → chunk-6SPNUKCU.js} +1 -1
- package/public/{chunk-FTXEGQIN.js → chunk-6UOFHEOA.js} +1 -1
- package/public/{chunk-OVOZ24WK.js → chunk-7KQJO6II.js} +1 -1
- package/public/{chunk-UQ2S4WMW.js → chunk-AK7DHUFI.js} +1 -1
- package/public/{chunk-FACVYIVK.js → chunk-BQLUKGX4.js} +1 -1
- package/public/{chunk-O77GFQK2.js → chunk-CAKM6QQD.js} +1 -1
- package/public/{chunk-QI7NLDCZ.js → chunk-CJ6ENU5Q.js} +1 -1
- package/public/{chunk-LB5QMOKJ.js → chunk-EHWZNITX.js} +1 -1
- package/public/{chunk-GSM4KMIN.js → chunk-FSIP765D.js} +1 -1
- package/public/{chunk-KL45DCKF.js → chunk-G5KKSLRH.js} +1 -1
- package/public/{chunk-BI4XMWOC.js → chunk-IPCY24VP.js} +1 -1
- package/public/{chunk-GZGEZ5SJ.js → chunk-K7P4YW6C.js} +1 -1
- package/public/{chunk-RMO7BI3S.js → chunk-KXDUZHXM.js} +1 -1
- package/public/{chunk-RBAGMGTH.js → chunk-LPHPZZDD.js} +1 -1
- package/public/{chunk-BLMEIZFV.js → chunk-LSBNAQT7.js} +1 -1
- package/public/{chunk-6CVW2OLK.js → chunk-M6KB66ZD.js} +1 -1
- package/public/{chunk-7INH3WTY.js → chunk-MJD4YCIZ.js} +1 -1
- package/public/{chunk-YZSYJJ4L.js → chunk-MXLTCL2C.js} +1 -1
- package/public/{chunk-GEROMTGP.js → chunk-Q5BDQ6UK.js} +4 -4
- package/public/{chunk-4FWGOD46.js → chunk-QD7ZQ5KN.js} +1 -1
- package/public/{chunk-HHCM4VPQ.js → chunk-QZUDFUPG.js} +1 -1
- package/public/{chunk-ETZZ36JZ.js → chunk-R7CS5PVV.js} +1 -1
- package/public/{chunk-G32P2EQO.js → chunk-RP6CIVXA.js} +1 -1
- package/public/{chunk-DSPXMSMH.js → chunk-SWHMQNYH.js} +1 -1
- package/public/chunk-TO4NLBFG.js +3 -0
- package/public/{chunk-2PTWRRNF.js → chunk-TSNTAL5D.js} +1 -1
- package/public/{chunk-GOEMPGSJ.js → chunk-UCQTJGBG.js} +1 -1
- package/public/{chunk-UEEWOELN.js → chunk-UIRBXR5P.js} +1 -1
- package/public/{chunk-RBF3CYNW.js → chunk-VUOEARGI.js} +1 -1
- package/public/{chunk-V5PTPKEY.js → chunk-YTCQIUDM.js} +1 -1
- package/public/{chunk-D4DHXSWV.js → chunk-Z62MEN4O.js} +1 -1
- package/public/{chunk-7LXVDGID.js → chunk-ZCXLNQRQ.js} +1 -1
- package/public/{chunk-QUVYR45J.js → chunk-ZMZV3OZR.js} +1 -1
- package/public/{chunk-3V7SIJRZ.js → chunk-ZT2XJVT5.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-UQ56N5WR.js → main-ORJXWFOK.js} +1 -1
- package/public/chunk-B5QPU7HE.js +0 -1
- package/public/chunk-VS2UHVZ2.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as nf,D as rf,a as Zy,b as Yy,c as _s,e as Wr,f as Xy,h as Qy,i as e0,k as t0,l as Ul,m as n0,o as r0,p as i0,q as so,t as o0,u as Wl,v as tf,w as Gl}from"./chunk-D4DHXSWV.js";import{d as Br,e as xt,m as Ur,o as Ky,y as Jy}from"./chunk-6CVW2OLK.js";import{$ as Fl,Aa as rr,C as Ud,Ca as zy,Ea as Hy,Fb as E,G as qy,Gb as ee,Hb as X,Ib as oe,Mb as Zd,Nb as Yd,Nc as zn,Oc as B,P as Al,Pc as Bl,Q as Wd,Qc as Uy,R as Ln,Rb as gt,S as jy,Sc as cn,Ua as $e,W as Gd,Wc as bi,X as Je,Xb as rt,Xc as Wy,Y as Cn,Yc as Gy,Za as L,Zb as j,_ as Vn,a as gi,aa as U,bc as jl,c as _i,cc as Ll,d as Ae,db as Kd,dc as Vl,e as no,ea as Ly,ec as zl,f as Bd,fc as Hl,ga as ct,gb as ro,h as Ry,ha as dt,hb as ql,hc as Dn,i as My,ib as gs,ic as wt,jc as Y,ka as ms,kb as ir,kc as un,la as yi,lc as io,m as Ny,mc as By,nb as Fe,o as Nl,oa as ln,ob as Sn,pa as Hr,pb as vi,rc as Xd,sa as nr,sc as Qd,tb as se,tc as ef,u as ky,wc as oo,x as Ay,xa as Kt,xb as Jd,xc as qt,y as kl,ya as Vy,yb as De,z as Fy}from"./chunk-MKV5RAJQ.js";import{a as ue,b as Ke,e as v,g as Gt,h as to}from"./chunk-B4AJQJMI.js";var p0=v(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.formatNames=sr.fastFormats=sr.fullFormats=void 0;function or(e,n){return{validate:e,compare:n}}sr.fullFormats={date:or(u0,lf),time:or(sf(!0),uf),"date-time":or(s0(!0),d0),"iso-time":or(sf(),c0),"iso-date-time":or(s0(),f0),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:SF,"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:RF,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:DF,int32:{type:"number",validate:EF},int64:{type:"number",validate:TF},float:{type:"number",validate:l0},double:{type:"number",validate:l0},password:!0,binary:!0};sr.fastFormats=Ke(ue({},sr.fullFormats),{date:or(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,lf),time:or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uf),"date-time":or(/^\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,d0),"iso-time":or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c0),"iso-date-time":or(/^\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,f0),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});sr.formatNames=Object.keys(sr.fullFormats);function bF(e){return e%4===0&&(e%100!==0||e%400===0)}var wF=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,xF=[0,31,28,31,30,31,30,31,31,30,31,30,31];function u0(e){let n=wF.exec(e);if(!n)return!1;let t=+n[1],r=+n[2],i=+n[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&bF(t)?29:xF[r])}function lf(e,n){if(e&&n)return e>n?1:e<n?-1:0}var of=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function sf(e){return function(t){let r=of.exec(t);if(!r)return!1;let i=+r[1],a=+r[2],l=+r[3],u=r[4],d=r[5]==="-"?-1:1,p=+(r[6]||0),m=+(r[7]||0);if(p>23||m>59||e&&!u)return!1;if(i<=23&&a<=59&&l<60)return!0;let _=a-m*d,w=i-p*d-(_<0?1:0);return(w===23||w===-1)&&(_===59||_===-1)&&l<61}}function uf(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),r=new Date("2020-01-01T"+n).valueOf();if(t&&r)return t-r}function c0(e,n){if(!(e&&n))return;let t=of.exec(e),r=of.exec(n);if(t&&r)return e=t[1]+t[2]+t[3],n=r[1]+r[2]+r[3],e>n?1:e<n?-1:0}var af=/t|\s/i;function s0(e){let n=sf(e);return function(r){let i=r.split(af);return i.length===2&&u0(i[0])&&n(i[1])}}function d0(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),r=new Date(n).valueOf();if(t&&r)return t-r}function f0(e,n){if(!(e&&n))return;let[t,r]=e.split(af),[i,a]=n.split(af),l=lf(t,i);if(l!==void 0)return l||uf(r,a)}var IF=/\/|:/,CF=/^(?:[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 SF(e){return IF.test(e)&&CF.test(e)}var a0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function DF(e){return a0.lastIndex=0,a0.test(e)}var OF=-(2**31),PF=2**31-1;function EF(e){return Number.isInteger(e)&&e<=PF&&e>=OF}function TF(e){return Number.isInteger(e)}function l0(){return!0}var $F=/[^\\]\\Z/;function RF(e){if($F.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var bs=v(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.regexpCode=Me.getEsmExportName=Me.getProperty=Me.safeStringify=Me.stringify=Me.strConcat=Me.addCodeArg=Me.str=Me._=Me.nil=Me._Code=Me.Name=Me.IDENTIFIER=Me._CodeOrName=void 0;var ys=class{};Me._CodeOrName=ys;Me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var wi=class extends ys{constructor(n){if(super(),!Me.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Me.Name=wi;var On=class extends ys{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,r)=>(r instanceof wi&&(t[r.str]=(t[r.str]||0)+1),t),{})}};Me._Code=On;Me.nil=new On("");function h0(e,...n){let t=[e[0]],r=0;for(;r<n.length;)df(t,n[r]),t.push(e[++r]);return new On(t)}Me._=h0;var cf=new On("+");function m0(e,...n){let t=[vs(e[0])],r=0;for(;r<n.length;)t.push(cf),df(t,n[r]),t.push(cf,vs(e[++r]));return MF(t),new On(t)}Me.str=m0;function df(e,n){n instanceof On?e.push(...n._items):n instanceof wi?e.push(n):e.push(AF(n))}Me.addCodeArg=df;function MF(e){let n=1;for(;n<e.length-1;){if(e[n]===cf){let t=NF(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function NF(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof wi||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof wi))return`"${e}${n.slice(1)}`}function kF(e,n){return n.emptyStr()?e:e.emptyStr()?n:m0`${e}${n}`}Me.strConcat=kF;function AF(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:vs(Array.isArray(e)?e.join(","):e)}function FF(e){return new On(vs(e))}Me.stringify=FF;function vs(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Me.safeStringify=vs;function qF(e){return typeof e=="string"&&Me.IDENTIFIER.test(e)?new On(`.${e}`):h0`[${e}]`}Me.getProperty=qF;function jF(e){if(typeof e=="string"&&Me.IDENTIFIER.test(e))return new On(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Me.getEsmExportName=jF;function LF(e){return new On(e.toString())}Me.regexpCode=LF});var hf=v(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.ValueScope=Zt.ValueScopeName=Zt.Scope=Zt.varKinds=Zt.UsedValueState=void 0;var Jt=bs(),ff=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},Kl=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Kl||(Zt.UsedValueState=Kl={}));Zt.varKinds={const:new Jt.Name("const"),let:new Jt.Name("let"),var:new Jt.Name("var")};var Jl=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof Jt.Name?n:this.name(n)}name(n){return new Jt.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,r;if(!((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0)&&r.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Zt.Scope=Jl;var Zl=class extends Jt.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:r}){this.value=n,this.scopePath=(0,Jt._)`.${new Jt.Name(t)}[${r}]`}};Zt.ValueScopeName=Zl;var VF=(0,Jt._)`\n`,pf=class extends Jl{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=Ke(ue({},n),{_n:n.lines?VF:Jt.nil})}get(){return this._scope}name(n){return new Zl(n,this._newName(n))}value(n,t){var r;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(n),{prefix:a}=i,l=(r=t.key)!==null&&r!==void 0?r:t.ref,u=this._values[a];if(u){let m=u.get(l);if(m)return m}else u=this._values[a]=new Map;u.set(l,i);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,i.setValue(t,{property:a,itemIndex:p}),i}getValue(n,t){let r=this._values[n];if(r)return r.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Jt._)`${n}${r.scopePath}`})}scopeCode(n=this._values,t,r){return this._reduceValues(n,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,r)}_reduceValues(n,t,r={},i){let a=Jt.nil;for(let l in n){let u=n[l];if(!u)continue;let d=r[l]=r[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,Kl.Started);let m=t(p);if(m){let _=this.opts.es5?Zt.varKinds.var:Zt.varKinds.const;a=(0,Jt._)`${a}${_} ${p} = ${m};${this.opts._n}`}else if(m=i?.(p))a=(0,Jt._)`${a}${m}${this.opts._n}`;else throw new ff(p);d.set(p,Kl.Completed)})}return a}};Zt.ValueScope=pf});var ae=v(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.or=Ie.and=Ie.not=Ie.CodeGen=Ie.operators=Ie.varKinds=Ie.ValueScopeName=Ie.ValueScope=Ie.Scope=Ie.Name=Ie.regexpCode=Ie.stringify=Ie.getProperty=Ie.nil=Ie.strConcat=Ie.str=Ie._=void 0;var Te=bs(),Hn=hf(),Gr=bs();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return Gr._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return Gr.str}});Object.defineProperty(Ie,"strConcat",{enumerable:!0,get:function(){return Gr.strConcat}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return Gr.nil}});Object.defineProperty(Ie,"getProperty",{enumerable:!0,get:function(){return Gr.getProperty}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return Gr.stringify}});Object.defineProperty(Ie,"regexpCode",{enumerable:!0,get:function(){return Gr.regexpCode}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return Gr.Name}});var tu=hf();Object.defineProperty(Ie,"Scope",{enumerable:!0,get:function(){return tu.Scope}});Object.defineProperty(Ie,"ValueScope",{enumerable:!0,get:function(){return tu.ValueScope}});Object.defineProperty(Ie,"ValueScopeName",{enumerable:!0,get:function(){return tu.ValueScopeName}});Object.defineProperty(Ie,"varKinds",{enumerable:!0,get:function(){return tu.varKinds}});Ie.operators={GT:new Te._Code(">"),GTE:new Te._Code(">="),LT:new Te._Code("<"),LTE:new Te._Code("<="),EQ:new Te._Code("==="),NEQ:new Te._Code("!=="),NOT:new Te._Code("!"),OR:new Te._Code("||"),AND:new Te._Code("&&"),ADD:new Te._Code("+")};var xr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},mf=class extends xr{constructor(n,t,r){super(),this.varKind=n,this.name=t,this.rhs=r}render({es5:n,_n:t}){let r=n?Hn.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ao(this.rhs,n,t)),this}get names(){return this.rhs instanceof Te._CodeOrName?this.rhs.names:{}}},Xl=class extends xr{constructor(n,t,r){super(),this.lhs=n,this.rhs=t,this.sideEffects=r}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Te.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ao(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Te.Name?{}:ue({},this.lhs.names);return eu(n,this.rhs)}},gf=class extends Xl{constructor(n,t,r,i){super(n,r,i),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},_f=class extends xr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},yf=class extends xr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},vf=class extends xr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},bf=class extends xr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ao(this.code,n,t),this}get names(){return this.code instanceof Te._CodeOrName?this.code.names:{}}},ws=class extends xr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,r)=>t+r.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let r=n[t].optimizeNodes();Array.isArray(r)?n.splice(t,1,...r):r?n[t]=r:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:r}=this,i=r.length;for(;i--;){let a=r[i];a.optimizeNames(n,t)||(zF(n,a.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xi(n,t.names),{})}},Ir=class extends ws{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},wf=class extends ws{},xf=(()=>{class e extends Ir{}return e.kind="else",e})(),Yl=(()=>{class e extends Ir{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let i=r.optimizeNodes();r=this.else=Array.isArray(i)?new xf(i):i}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(b0(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=ao(this.condition,t,r),this}get names(){let t=super.names;return eu(t,this.condition),this.else&&xi(t,this.else.names),t}}return e.kind="if",e})(),nu=(()=>{class e extends Ir{}return e.kind="for",e})(),If=class extends nu{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ao(this.iteration,n,t),this}get names(){return xi(super.names,this.iteration.names)}},Cf=class extends nu{constructor(n,t,r,i){super(),this.varKind=n,this.name=t,this.from=r,this.to=i}render(n){let t=n.es5?Hn.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(n)}get names(){let n=eu(super.names,this.from);return eu(n,this.to)}},Ql=class extends nu{constructor(n,t,r,i){super(),this.loop=n,this.varKind=t,this.name=r,this.iterable=i}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ao(this.iterable,n,t),this}get names(){return xi(super.names,this.iterable.names)}},g0=(()=>{class e extends Ir{constructor(t,r,i){super(),this.name=t,this.args=r,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),_0=(()=>{class e extends ws{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Sf=class extends Ir{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var r,i;return super.optimizeNames(n,t),(r=this.catch)===null||r===void 0||r.optimizeNames(n,t),(i=this.finally)===null||i===void 0||i.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xi(n,this.catch.names),this.finally&&xi(n,this.finally.names),n}},y0=(()=>{class e extends Ir{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),v0=(()=>{class e extends Ir{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Df=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ke(ue({},t),{_n:t.lines?`
|
|
1
|
+
import{C as nf,D as rf,a as Zy,b as Yy,c as _s,e as Wr,f as Xy,h as Qy,i as e0,k as t0,l as Ul,m as n0,o as r0,p as i0,q as so,t as o0,u as Wl,v as tf,w as Gl}from"./chunk-Z62MEN4O.js";import{d as Br,e as xt,m as Ur,o as Ky,y as Jy}from"./chunk-M6KB66ZD.js";import{$ as Fl,Aa as rr,C as Ud,Ca as zy,Ea as Hy,Fb as E,G as qy,Gb as ee,Hb as X,Ib as oe,Mb as Zd,Nb as Yd,Nc as zn,Oc as B,P as Al,Pc as Bl,Q as Wd,Qc as Uy,R as Ln,Rb as gt,S as jy,Sc as cn,Ua as $e,W as Gd,Wc as bi,X as Je,Xb as rt,Xc as Wy,Y as Cn,Yc as Gy,Za as L,Zb as j,_ as Vn,a as gi,aa as U,bc as jl,c as _i,cc as Ll,d as Ae,db as Kd,dc as Vl,e as no,ea as Ly,ec as zl,f as Bd,fc as Hl,ga as ct,gb as ro,h as Ry,ha as dt,hb as ql,hc as Dn,i as My,ib as gs,ic as wt,jc as Y,ka as ms,kb as ir,kc as un,la as yi,lc as io,m as Ny,mc as By,nb as Fe,o as Nl,oa as ln,ob as Sn,pa as Hr,pb as vi,rc as Xd,sa as nr,sc as Qd,tb as se,tc as ef,u as ky,wc as oo,x as Ay,xa as Kt,xb as Jd,xc as qt,y as kl,ya as Vy,yb as De,z as Fy}from"./chunk-MKV5RAJQ.js";import{a as ue,b as Ke,e as v,g as Gt,h as to}from"./chunk-B4AJQJMI.js";var p0=v(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.formatNames=sr.fastFormats=sr.fullFormats=void 0;function or(e,n){return{validate:e,compare:n}}sr.fullFormats={date:or(u0,lf),time:or(sf(!0),uf),"date-time":or(s0(!0),d0),"iso-time":or(sf(),c0),"iso-date-time":or(s0(),f0),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:SF,"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:RF,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:DF,int32:{type:"number",validate:EF},int64:{type:"number",validate:TF},float:{type:"number",validate:l0},double:{type:"number",validate:l0},password:!0,binary:!0};sr.fastFormats=Ke(ue({},sr.fullFormats),{date:or(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,lf),time:or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uf),"date-time":or(/^\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,d0),"iso-time":or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c0),"iso-date-time":or(/^\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,f0),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});sr.formatNames=Object.keys(sr.fullFormats);function bF(e){return e%4===0&&(e%100!==0||e%400===0)}var wF=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,xF=[0,31,28,31,30,31,30,31,31,30,31,30,31];function u0(e){let n=wF.exec(e);if(!n)return!1;let t=+n[1],r=+n[2],i=+n[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&bF(t)?29:xF[r])}function lf(e,n){if(e&&n)return e>n?1:e<n?-1:0}var of=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function sf(e){return function(t){let r=of.exec(t);if(!r)return!1;let i=+r[1],a=+r[2],l=+r[3],u=r[4],d=r[5]==="-"?-1:1,p=+(r[6]||0),m=+(r[7]||0);if(p>23||m>59||e&&!u)return!1;if(i<=23&&a<=59&&l<60)return!0;let _=a-m*d,w=i-p*d-(_<0?1:0);return(w===23||w===-1)&&(_===59||_===-1)&&l<61}}function uf(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),r=new Date("2020-01-01T"+n).valueOf();if(t&&r)return t-r}function c0(e,n){if(!(e&&n))return;let t=of.exec(e),r=of.exec(n);if(t&&r)return e=t[1]+t[2]+t[3],n=r[1]+r[2]+r[3],e>n?1:e<n?-1:0}var af=/t|\s/i;function s0(e){let n=sf(e);return function(r){let i=r.split(af);return i.length===2&&u0(i[0])&&n(i[1])}}function d0(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),r=new Date(n).valueOf();if(t&&r)return t-r}function f0(e,n){if(!(e&&n))return;let[t,r]=e.split(af),[i,a]=n.split(af),l=lf(t,i);if(l!==void 0)return l||uf(r,a)}var IF=/\/|:/,CF=/^(?:[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 SF(e){return IF.test(e)&&CF.test(e)}var a0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function DF(e){return a0.lastIndex=0,a0.test(e)}var OF=-(2**31),PF=2**31-1;function EF(e){return Number.isInteger(e)&&e<=PF&&e>=OF}function TF(e){return Number.isInteger(e)}function l0(){return!0}var $F=/[^\\]\\Z/;function RF(e){if($F.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var bs=v(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.regexpCode=Me.getEsmExportName=Me.getProperty=Me.safeStringify=Me.stringify=Me.strConcat=Me.addCodeArg=Me.str=Me._=Me.nil=Me._Code=Me.Name=Me.IDENTIFIER=Me._CodeOrName=void 0;var ys=class{};Me._CodeOrName=ys;Me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var wi=class extends ys{constructor(n){if(super(),!Me.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Me.Name=wi;var On=class extends ys{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,r)=>(r instanceof wi&&(t[r.str]=(t[r.str]||0)+1),t),{})}};Me._Code=On;Me.nil=new On("");function h0(e,...n){let t=[e[0]],r=0;for(;r<n.length;)df(t,n[r]),t.push(e[++r]);return new On(t)}Me._=h0;var cf=new On("+");function m0(e,...n){let t=[vs(e[0])],r=0;for(;r<n.length;)t.push(cf),df(t,n[r]),t.push(cf,vs(e[++r]));return MF(t),new On(t)}Me.str=m0;function df(e,n){n instanceof On?e.push(...n._items):n instanceof wi?e.push(n):e.push(AF(n))}Me.addCodeArg=df;function MF(e){let n=1;for(;n<e.length-1;){if(e[n]===cf){let t=NF(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function NF(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof wi||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof wi))return`"${e}${n.slice(1)}`}function kF(e,n){return n.emptyStr()?e:e.emptyStr()?n:m0`${e}${n}`}Me.strConcat=kF;function AF(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:vs(Array.isArray(e)?e.join(","):e)}function FF(e){return new On(vs(e))}Me.stringify=FF;function vs(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Me.safeStringify=vs;function qF(e){return typeof e=="string"&&Me.IDENTIFIER.test(e)?new On(`.${e}`):h0`[${e}]`}Me.getProperty=qF;function jF(e){if(typeof e=="string"&&Me.IDENTIFIER.test(e))return new On(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Me.getEsmExportName=jF;function LF(e){return new On(e.toString())}Me.regexpCode=LF});var hf=v(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.ValueScope=Zt.ValueScopeName=Zt.Scope=Zt.varKinds=Zt.UsedValueState=void 0;var Jt=bs(),ff=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},Kl=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Kl||(Zt.UsedValueState=Kl={}));Zt.varKinds={const:new Jt.Name("const"),let:new Jt.Name("let"),var:new Jt.Name("var")};var Jl=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof Jt.Name?n:this.name(n)}name(n){return new Jt.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,r;if(!((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0)&&r.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Zt.Scope=Jl;var Zl=class extends Jt.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:r}){this.value=n,this.scopePath=(0,Jt._)`.${new Jt.Name(t)}[${r}]`}};Zt.ValueScopeName=Zl;var VF=(0,Jt._)`\n`,pf=class extends Jl{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=Ke(ue({},n),{_n:n.lines?VF:Jt.nil})}get(){return this._scope}name(n){return new Zl(n,this._newName(n))}value(n,t){var r;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(n),{prefix:a}=i,l=(r=t.key)!==null&&r!==void 0?r:t.ref,u=this._values[a];if(u){let m=u.get(l);if(m)return m}else u=this._values[a]=new Map;u.set(l,i);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,i.setValue(t,{property:a,itemIndex:p}),i}getValue(n,t){let r=this._values[n];if(r)return r.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Jt._)`${n}${r.scopePath}`})}scopeCode(n=this._values,t,r){return this._reduceValues(n,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,r)}_reduceValues(n,t,r={},i){let a=Jt.nil;for(let l in n){let u=n[l];if(!u)continue;let d=r[l]=r[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,Kl.Started);let m=t(p);if(m){let _=this.opts.es5?Zt.varKinds.var:Zt.varKinds.const;a=(0,Jt._)`${a}${_} ${p} = ${m};${this.opts._n}`}else if(m=i?.(p))a=(0,Jt._)`${a}${m}${this.opts._n}`;else throw new ff(p);d.set(p,Kl.Completed)})}return a}};Zt.ValueScope=pf});var ae=v(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.or=Ie.and=Ie.not=Ie.CodeGen=Ie.operators=Ie.varKinds=Ie.ValueScopeName=Ie.ValueScope=Ie.Scope=Ie.Name=Ie.regexpCode=Ie.stringify=Ie.getProperty=Ie.nil=Ie.strConcat=Ie.str=Ie._=void 0;var Te=bs(),Hn=hf(),Gr=bs();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return Gr._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return Gr.str}});Object.defineProperty(Ie,"strConcat",{enumerable:!0,get:function(){return Gr.strConcat}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return Gr.nil}});Object.defineProperty(Ie,"getProperty",{enumerable:!0,get:function(){return Gr.getProperty}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return Gr.stringify}});Object.defineProperty(Ie,"regexpCode",{enumerable:!0,get:function(){return Gr.regexpCode}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return Gr.Name}});var tu=hf();Object.defineProperty(Ie,"Scope",{enumerable:!0,get:function(){return tu.Scope}});Object.defineProperty(Ie,"ValueScope",{enumerable:!0,get:function(){return tu.ValueScope}});Object.defineProperty(Ie,"ValueScopeName",{enumerable:!0,get:function(){return tu.ValueScopeName}});Object.defineProperty(Ie,"varKinds",{enumerable:!0,get:function(){return tu.varKinds}});Ie.operators={GT:new Te._Code(">"),GTE:new Te._Code(">="),LT:new Te._Code("<"),LTE:new Te._Code("<="),EQ:new Te._Code("==="),NEQ:new Te._Code("!=="),NOT:new Te._Code("!"),OR:new Te._Code("||"),AND:new Te._Code("&&"),ADD:new Te._Code("+")};var xr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},mf=class extends xr{constructor(n,t,r){super(),this.varKind=n,this.name=t,this.rhs=r}render({es5:n,_n:t}){let r=n?Hn.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ao(this.rhs,n,t)),this}get names(){return this.rhs instanceof Te._CodeOrName?this.rhs.names:{}}},Xl=class extends xr{constructor(n,t,r){super(),this.lhs=n,this.rhs=t,this.sideEffects=r}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Te.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ao(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Te.Name?{}:ue({},this.lhs.names);return eu(n,this.rhs)}},gf=class extends Xl{constructor(n,t,r,i){super(n,r,i),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},_f=class extends xr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},yf=class extends xr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},vf=class extends xr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},bf=class extends xr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ao(this.code,n,t),this}get names(){return this.code instanceof Te._CodeOrName?this.code.names:{}}},ws=class extends xr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,r)=>t+r.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let r=n[t].optimizeNodes();Array.isArray(r)?n.splice(t,1,...r):r?n[t]=r:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:r}=this,i=r.length;for(;i--;){let a=r[i];a.optimizeNames(n,t)||(zF(n,a.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xi(n,t.names),{})}},Ir=class extends ws{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},wf=class extends ws{},xf=(()=>{class e extends Ir{}return e.kind="else",e})(),Yl=(()=>{class e extends Ir{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let i=r.optimizeNodes();r=this.else=Array.isArray(i)?new xf(i):i}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(b0(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=ao(this.condition,t,r),this}get names(){let t=super.names;return eu(t,this.condition),this.else&&xi(t,this.else.names),t}}return e.kind="if",e})(),nu=(()=>{class e extends Ir{}return e.kind="for",e})(),If=class extends nu{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ao(this.iteration,n,t),this}get names(){return xi(super.names,this.iteration.names)}},Cf=class extends nu{constructor(n,t,r,i){super(),this.varKind=n,this.name=t,this.from=r,this.to=i}render(n){let t=n.es5?Hn.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(n)}get names(){let n=eu(super.names,this.from);return eu(n,this.to)}},Ql=class extends nu{constructor(n,t,r,i){super(),this.loop=n,this.varKind=t,this.name=r,this.iterable=i}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ao(this.iterable,n,t),this}get names(){return xi(super.names,this.iterable.names)}},g0=(()=>{class e extends Ir{constructor(t,r,i){super(),this.name=t,this.args=r,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),_0=(()=>{class e extends ws{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Sf=class extends Ir{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var r,i;return super.optimizeNames(n,t),(r=this.catch)===null||r===void 0||r.optimizeNames(n,t),(i=this.finally)===null||i===void 0||i.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xi(n,this.catch.names),this.finally&&xi(n,this.finally.names),n}},y0=(()=>{class e extends Ir{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),v0=(()=>{class e extends Ir{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Df=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ke(ue({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=n,this._scope=new Hn.Scope({parent:n}),this._nodes=[new wf]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,t){let r=this._extScope.value(n,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(n,t){return this._extScope.getValue(n,t)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,t,r,i){let a=this._scope.toName(t);return r!==void 0&&i&&(this._constants[a.str]=r),this._leafNode(new mf(n,a,r)),a}const(n,t,r){return this._def(Hn.varKinds.const,n,t,r)}let(n,t,r){return this._def(Hn.varKinds.let,n,t,r)}var(n,t,r){return this._def(Hn.varKinds.var,n,t,r)}assign(n,t,r){return this._leafNode(new Xl(n,t,r))}add(n,t){return this._leafNode(new gf(n,Ie.operators.ADD,t))}code(n){return typeof n=="function"?n():n!==Te.nil&&this._leafNode(new bf(n)),this}object(...n){let t=["{"];for(let[r,i]of n)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,Te.addCodeArg)(t,i));return t.push("}"),new Te._Code(t)}if(n,t,r){if(this._blockNode(new Yl(n)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new Yl(n))}else(){return this._elseNode(new xf)}endIf(){return this._endBlockNode(Yl,xf)}_for(n,t){return this._blockNode(n),t&&this.code(t).endFor(),this}for(n,t){return this._for(new If(n),t)}forRange(n,t,r,i,a=this.opts.es5?Hn.varKinds.var:Hn.varKinds.let){let l=this._scope.toName(n);return this._for(new Cf(a,l,t,r),()=>i(l))}forOf(n,t,r,i=Hn.varKinds.const){let a=this._scope.toName(n);if(this.opts.es5){let l=t instanceof Te.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Te._)`${l}.length`,u=>{this.var(a,(0,Te._)`${l}[${u}]`),r(a)})}return this._for(new Ql("of",i,a,t),()=>r(a))}forIn(n,t,r,i=this.opts.es5?Hn.varKinds.var:Hn.varKinds.const){if(this.opts.ownProperties)return this.forOf(n,(0,Te._)`Object.keys(${t})`,r);let a=this._scope.toName(n);return this._for(new Ql("in",i,a,t),()=>r(a))}endFor(){return this._endBlockNode(nu)}label(n){return this._leafNode(new _f(n))}break(n){return this._leafNode(new yf(n))}return(n){let t=new _0;if(this._blockNode(t),this.code(n),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_0)}try(n,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Sf;if(this._blockNode(i),this.code(n),t){let a=this.name("e");this._currNode=i.catch=new y0(a),t(a)}return r&&(this._currNode=i.finally=new v0,this.code(r)),this._endBlockNode(y0,v0)}throw(n){return this._leafNode(new vf(n))}block(n,t){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(t),this}endBlock(n){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||n!==void 0&&r!==n)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${n} expected`);return this._nodes.length=t,this}func(n,t=Te.nil,r,i){return this._blockNode(new g0(n,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(g0)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,t){let r=this._currNode;if(r instanceof n||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${n.kind}/${t.kind}`:n.kind}"`)}_elseNode(n){let t=this._currNode;if(!(t instanceof Yl))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=n,this}get _root(){return this._nodes[0]}get _currNode(){let n=this._nodes;return n[n.length-1]}set _currNode(n){let t=this._nodes;t[t.length-1]=n}};Ie.CodeGen=Df;function xi(e,n){for(let t in n)e[t]=(e[t]||0)+(n[t]||0);return e}function eu(e,n){return n instanceof Te._CodeOrName?xi(e,n.names):e}function ao(e,n,t){if(e instanceof Te.Name)return r(e);if(!i(e))return e;return new Te._Code(e._items.reduce((a,l)=>(l instanceof Te.Name&&(l=r(l)),l instanceof Te._Code?a.push(...l._items):a.push(l),a),[]));function r(a){let l=t[a.str];return l===void 0||n[a.str]!==1?a:(delete n[a.str],l)}function i(a){return a instanceof Te._Code&&a._items.some(l=>l instanceof Te.Name&&n[l.str]===1&&t[l.str]!==void 0)}}function zF(e,n){for(let t in n)e[t]=(e[t]||0)-(n[t]||0)}function b0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Te._)`!${Of(e)}`}Ie.not=b0;var HF=w0(Ie.operators.AND);function BF(...e){return e.reduce(HF)}Ie.and=BF;var UF=w0(Ie.operators.OR);function WF(...e){return e.reduce(UF)}Ie.or=WF;function w0(e){return(n,t)=>n===Te.nil?t:t===Te.nil?n:(0,Te._)`${Of(n)} ${e} ${Of(t)}`}function Of(e){return e instanceof Te.Name?e:(0,Te._)`(${e})`}});var Oe=v(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.checkStrictMode=Ce.getErrorPath=Ce.Type=Ce.useFunc=Ce.setEvaluated=Ce.evaluatedPropsToName=Ce.mergeEvaluated=Ce.eachItem=Ce.unescapeJsonPointer=Ce.escapeJsonPointer=Ce.escapeFragment=Ce.unescapeFragment=Ce.schemaRefOrVal=Ce.schemaHasRulesButRef=Ce.schemaHasRules=Ce.checkUnknownRules=Ce.alwaysValidSchema=Ce.toHash=void 0;var Ue=ae(),GF=bs();function KF(e){let n={};for(let t of e)n[t]=!0;return n}Ce.toHash=KF;function JF(e,n){return typeof n=="boolean"?n:Object.keys(n).length===0?!0:(C0(e,n),!S0(n,e.self.RULES.all))}Ce.alwaysValidSchema=JF;function C0(e,n=e.schema){let{opts:t,self:r}=e;if(!t.strictSchema||typeof n=="boolean")return;let i=r.RULES.keywords;for(let a in n)i[a]||P0(e,`unknown keyword: "${a}"`)}Ce.checkUnknownRules=C0;function S0(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(n[t])return!0;return!1}Ce.schemaHasRules=S0;function ZF(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&n.all[t])return!0;return!1}Ce.schemaHasRulesButRef=ZF;function YF({topSchemaRef:e,schemaPath:n},t,r,i){if(!i){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ue._)`${t}`}return(0,Ue._)`${e}${n}${(0,Ue.getProperty)(r)}`}Ce.schemaRefOrVal=YF;function XF(e){return D0(decodeURIComponent(e))}Ce.unescapeFragment=XF;function QF(e){return encodeURIComponent(Ef(e))}Ce.escapeFragment=QF;function Ef(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ce.escapeJsonPointer=Ef;function D0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ce.unescapeJsonPointer=D0;function e2(e,n){if(Array.isArray(e))for(let t of e)n(t);else n(e)}Ce.eachItem=e2;function x0({mergeNames:e,mergeToName:n,mergeValues:t,resultToName:r}){return(i,a,l,u)=>{let d=l===void 0?a:l instanceof Ue.Name?(a instanceof Ue.Name?e(i,a,l):n(i,a,l),l):a instanceof Ue.Name?(n(i,l,a),a):t(a,l);return u===Ue.Name&&!(d instanceof Ue.Name)?r(i,d):d}}Ce.mergeEvaluated={props:x0({mergeNames:(e,n,t)=>e.if((0,Ue._)`${t} !== true && ${n} !== undefined`,()=>{e.if((0,Ue._)`${n} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ue._)`${t} || {}`).code((0,Ue._)`Object.assign(${t}, ${n})`))}),mergeToName:(e,n,t)=>e.if((0,Ue._)`${t} !== true`,()=>{n===!0?e.assign(t,!0):(e.assign(t,(0,Ue._)`${t} || {}`),Tf(e,t,n))}),mergeValues:(e,n)=>e===!0?!0:ue(ue({},e),n),resultToName:O0}),items:x0({mergeNames:(e,n,t)=>e.if((0,Ue._)`${t} !== true && ${n} !== undefined`,()=>e.assign(t,(0,Ue._)`${n} === true ? true : ${t} > ${n} ? ${t} : ${n}`)),mergeToName:(e,n,t)=>e.if((0,Ue._)`${t} !== true`,()=>e.assign(t,n===!0?!0:(0,Ue._)`${t} > ${n} ? ${t} : ${n}`)),mergeValues:(e,n)=>e===!0?!0:Math.max(e,n),resultToName:(e,n)=>e.var("items",n)})};function O0(e,n){if(n===!0)return e.var("props",!0);let t=e.var("props",(0,Ue._)`{}`);return n!==void 0&&Tf(e,t,n),t}Ce.evaluatedPropsToName=O0;function Tf(e,n,t){Object.keys(t).forEach(r=>e.assign((0,Ue._)`${n}${(0,Ue.getProperty)(r)}`,!0))}Ce.setEvaluated=Tf;var I0={};function t2(e,n){return e.scopeValue("func",{ref:n,code:I0[n.code]||(I0[n.code]=new GF._Code(n.code))})}Ce.useFunc=t2;var Pf=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(Pf||(Ce.Type=Pf={}));function n2(e,n,t){if(e instanceof Ue.Name){let r=n===Pf.Num;return t?r?(0,Ue._)`"[" + ${e} + "]"`:(0,Ue._)`"['" + ${e} + "']"`:r?(0,Ue._)`"/" + ${e}`:(0,Ue._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ue.getProperty)(e).toString():"/"+Ef(e)}Ce.getErrorPath=n2;function P0(e,n,t=e.opts.strictSchema){if(t){if(n=`strict mode: ${n}`,t===!0)throw new Error(n);e.self.logger.warn(n)}}Ce.checkStrictMode=P0});var Pn=v($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var Tt=ae(),r2={data:new Tt.Name("data"),valCxt:new Tt.Name("valCxt"),instancePath:new Tt.Name("instancePath"),parentData:new Tt.Name("parentData"),parentDataProperty:new Tt.Name("parentDataProperty"),rootData:new Tt.Name("rootData"),dynamicAnchors:new Tt.Name("dynamicAnchors"),vErrors:new Tt.Name("vErrors"),errors:new Tt.Name("errors"),this:new Tt.Name("this"),self:new Tt.Name("self"),scope:new Tt.Name("scope"),json:new Tt.Name("json"),jsonPos:new Tt.Name("jsonPos"),jsonLen:new Tt.Name("jsonLen"),jsonPart:new Tt.Name("jsonPart")};$f.default=r2});var xs=v($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.extendErrors=$t.resetErrorsCount=$t.reportExtraError=$t.reportError=$t.keyword$DataError=$t.keywordError=void 0;var Re=ae(),ru=Oe(),jt=Pn();$t.keywordError={message:({keyword:e})=>(0,Re.str)`must pass "${e}" keyword validation`};$t.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,Re.str)`"${e}" keyword must be ${n} ($data)`:(0,Re.str)`"${e}" keyword is invalid ($data)`};function i2(e,n=$t.keywordError,t,r){let{it:i}=e,{gen:a,compositeRule:l,allErrors:u}=i,d=$0(e,n,t);r??(l||u)?E0(a,d):T0(i,(0,Re._)`[${d}]`)}$t.reportError=i2;function o2(e,n=$t.keywordError,t){let{it:r}=e,{gen:i,compositeRule:a,allErrors:l}=r,u=$0(e,n,t);E0(i,u),a||l||T0(r,jt.default.vErrors)}$t.reportExtraError=o2;function s2(e,n){e.assign(jt.default.errors,n),e.if((0,Re._)`${jt.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,Re._)`${jt.default.vErrors}.length`,n),()=>e.assign(jt.default.vErrors,null)))}$t.resetErrorsCount=s2;function a2({gen:e,keyword:n,schemaValue:t,data:r,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",i,jt.default.errors,u=>{e.const(l,(0,Re._)`${jt.default.vErrors}[${u}]`),e.if((0,Re._)`${l}.instancePath === undefined`,()=>e.assign((0,Re._)`${l}.instancePath`,(0,Re.strConcat)(jt.default.instancePath,a.errorPath))),e.assign((0,Re._)`${l}.schemaPath`,(0,Re.str)`${a.errSchemaPath}/${n}`),a.opts.verbose&&(e.assign((0,Re._)`${l}.schema`,t),e.assign((0,Re._)`${l}.data`,r))})}$t.extendErrors=a2;function E0(e,n){let t=e.const("err",n);e.if((0,Re._)`${jt.default.vErrors} === null`,()=>e.assign(jt.default.vErrors,(0,Re._)`[${t}]`),(0,Re._)`${jt.default.vErrors}.push(${t})`),e.code((0,Re._)`${jt.default.errors}++`)}function T0(e,n){let{gen:t,validateName:r,schemaEnv:i}=e;i.$async?t.throw((0,Re._)`new ${e.ValidationError}(${n})`):(t.assign((0,Re._)`${r}.errors`,n),t.return(!1))}var Ii={keyword:new Re.Name("keyword"),schemaPath:new Re.Name("schemaPath"),params:new Re.Name("params"),propertyName:new Re.Name("propertyName"),message:new Re.Name("message"),schema:new Re.Name("schema"),parentSchema:new Re.Name("parentSchema")};function $0(e,n,t){let{createErrors:r}=e.it;return r===!1?(0,Re._)`{}`:l2(e,n,t)}function l2(e,n,t={}){let{gen:r,it:i}=e,a=[u2(i,t),c2(e,t)];return d2(e,n,a),r.object(...a)}function u2({errorPath:e},{instancePath:n}){let t=n?(0,Re.str)`${e}${(0,ru.getErrorPath)(n,ru.Type.Str)}`:e;return[jt.default.instancePath,(0,Re.strConcat)(jt.default.instancePath,t)]}function c2({keyword:e,it:{errSchemaPath:n}},{schemaPath:t,parentSchema:r}){let i=r?n:(0,Re.str)`${n}/${e}`;return t&&(i=(0,Re.str)`${i}${(0,ru.getErrorPath)(t,ru.Type.Str)}`),[Ii.schemaPath,i]}function d2(e,{params:n,message:t},r){let{keyword:i,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:m,schemaPath:_}=u;r.push([Ii.keyword,i],[Ii.params,typeof n=="function"?n(e):n||(0,Re._)`{}`]),d.messages&&r.push([Ii.message,typeof t=="function"?t(e):t]),d.verbose&&r.push([Ii.schema,l],[Ii.parentSchema,(0,Re._)`${m}${_}`],[jt.default.data,a]),p&&r.push([Ii.propertyName,p])}});var M0=v(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.boolOrEmptySchema=lo.topBoolOrEmptySchema=void 0;var f2=xs(),p2=ae(),h2=Pn(),m2={message:"boolean schema is false"};function g2(e){let{gen:n,schema:t,validateName:r}=e;t===!1?R0(e,!1):typeof t=="object"&&t.$async===!0?n.return(h2.default.data):(n.assign((0,p2._)`${r}.errors`,null),n.return(!0))}lo.topBoolOrEmptySchema=g2;function _2(e,n){let{gen:t,schema:r}=e;r===!1?(t.var(n,!1),R0(e)):t.var(n,!0)}lo.boolOrEmptySchema=_2;function R0(e,n){let{gen:t,data:r}=e,i={gen:t,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,f2.reportError)(i,m2,void 0,n)}});var Rf=v(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.getRules=uo.isJSONType=void 0;var y2=["string","number","integer","boolean","null","object","array"],v2=new Set(y2);function b2(e){return typeof e=="string"&&v2.has(e)}uo.isJSONType=b2;function w2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ke(ue({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}uo.getRules=w2});var Mf=v(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.shouldUseRule=Kr.shouldUseGroup=Kr.schemaHasRulesForType=void 0;function x2({schema:e,self:n},t){let r=n.RULES.types[t];return r&&r!==!0&&N0(e,r)}Kr.schemaHasRulesForType=x2;function N0(e,n){return n.rules.some(t=>k0(e,t))}Kr.shouldUseGroup=N0;function k0(e,n){var t;return e[n.keyword]!==void 0||((t=n.definition.implements)===null||t===void 0?void 0:t.some(r=>e[r]!==void 0))}Kr.shouldUseRule=k0});var Is=v(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.reportTypeError=Rt.checkDataTypes=Rt.checkDataType=Rt.coerceAndCheckDataType=Rt.getJSONTypes=Rt.getSchemaTypes=Rt.DataType=void 0;var I2=Rf(),C2=Mf(),S2=xs(),ve=ae(),A0=Oe(),co=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(co||(Rt.DataType=co={}));function D2(e){let n=F0(e.type);if(n.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!n.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&n.push("null")}return n}Rt.getSchemaTypes=D2;function F0(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(I2.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}Rt.getJSONTypes=F0;function O2(e,n){let{gen:t,data:r,opts:i}=e,a=P2(n,i.coerceTypes),l=n.length>0&&!(a.length===0&&n.length===1&&(0,C2.schemaHasRulesForType)(e,n[0]));if(l){let u=kf(n,r,i.strictNumbers,co.Wrong);t.if(u,()=>{a.length?E2(e,n,a):Af(e)})}return l}Rt.coerceAndCheckDataType=O2;var q0=new Set(["string","number","integer","boolean","null"]);function P2(e,n){return n?e.filter(t=>q0.has(t)||n==="array"&&t==="array"):[]}function E2(e,n,t){let{gen:r,data:i,opts:a}=e,l=r.let("dataType",(0,ve._)`typeof ${i}`),u=r.let("coerced",(0,ve._)`undefined`);a.coerceTypes==="array"&&r.if((0,ve._)`${l} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,ve._)`${i}[0]`).assign(l,(0,ve._)`typeof ${i}`).if(kf(n,i,a.strictNumbers),()=>r.assign(u,i))),r.if((0,ve._)`${u} !== undefined`);for(let p of t)(q0.has(p)||p==="array"&&a.coerceTypes==="array")&&d(p);r.else(),Af(e),r.endIf(),r.if((0,ve._)`${u} !== undefined`,()=>{r.assign(i,u),T2(e,u)});function d(p){switch(p){case"string":r.elseIf((0,ve._)`${l} == "number" || ${l} == "boolean"`).assign(u,(0,ve._)`"" + ${i}`).elseIf((0,ve._)`${i} === null`).assign(u,(0,ve._)`""`);return;case"number":r.elseIf((0,ve._)`${l} == "boolean" || ${i} === null
|
|
3
3
|
|| (${l} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,ve._)`+${i}`);return;case"integer":r.elseIf((0,ve._)`${l} === "boolean" || ${i} === null
|
|
4
4
|
|| (${l} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,ve._)`+${i}`);return;case"boolean":r.elseIf((0,ve._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,ve._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":r.elseIf((0,ve._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(u,null);return;case"array":r.elseIf((0,ve._)`${l} === "string" || ${l} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as G,E as X,H as tt,K as et}from"./chunk-6CVW2OLK.js";import{L as Q,X as R,aa as W,d as P}from"./chunk-MKV5RAJQ.js";import{e as at,g as ut,h as z}from"./chunk-B4AJQJMI.js";var it=at((B,U)=>{(function(w,k){typeof B=="object"&&typeof U<"u"?U.exports=k():typeof define=="function"&&define.amd?define(k):(w=typeof globalThis<"u"?globalThis:w||self).dayjs=k()})(B,function(){"use strict";var w=1e3,k=6e4,s=36e5,h="millisecond",d="second",m="minute",v="hour",y="day",f="week",L="month",J="quarter",S="year",_="date",K="Invalid Date",st=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,nt=/\[([^\]]+)]|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,rt={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},ot={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,L),o=t-e<0,a=i.clone().add(n+(o?-1:1),L);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:L,y:S,w:f,d:y,D:_,h:v,m,s:d,ms:h,Q:J}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},I="en",D={};D[I]=rt;var q="$isDayjsObject",N=function(r){return r instanceof C||!(!r||!r[q])},Y=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 C(t)},u=ot;u.l=Y,u.i=N,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var C=(function(){function r(t){this.$L=Y(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[q]=!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(st);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()!==K},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,M){var T=u.w(e.$u?Date.UTC(e.$y,M,x):new Date(e.$y,M,x),e);return o?T:T.endOf(y)},l=function(x,M){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(M)),e)},$=this.$W,p=this.$M,b=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case L:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,j=($<O?$+7:$)-O;return c(o?b-j:b+(6-j),p);case y:case _:return l(H+"Hours",0);case v: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[L]=a+"Month",e[S]=a+"FullYear",e[v]=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===L||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 b=g(o);return u.w(b.date(b.date()+Math.round(p*t)),o)};if(a===L)return this.set(L,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[v]=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||K;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,b=e.months,H=e.meridiem,O=function(M,T,A,V){return M&&(M[T]||M(n,o))||A[T].slice(0,V)},j=function(M){return u.s(c%12||12,M,"0")},x=H||function(M,T,A){var V=M<12?"AM":"PM";return A?V.toLowerCase():V};return o.replace(nt,function(M,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,$,b,3);case"MMMM":return O(b,$);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})(M)||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,b=function(){return u.m(a,l)};switch(c){case S:o=b()/12;break;case L:o=b();break;case J:o=b()/3;break;case f:o=(p-$)/6048e5;break;case y:o=(p-$)/864e5;break;case v: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(L).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),o=Y(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=C.prototype;return g.prototype=Z,[["$ms",h],["$s",d],["$m",m],["$H",v],["$W",y],["$M",L],["$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,C,g),r.$i=!0),g},g.locale=Y,g.isDayjs=N,g.unix=function(r){return g(1e3*r)},g.en=D[I],g.Ls=D,g.p={},g})});var E=ut(it(),1);var vt=(()=>{class w{$api=W(et);$title=W(G);$toastr=W(tt);$translate=W(X);settingsLoadedSubject=new P;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];serverTimeToastSubscription;restartToastRef=null;env={};host;proxyHost;webroot;originalWebroot;formAuth=!0;sessionTimeout=28800;sessionTimeoutInactivityBased=!1;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(Q());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return z(this,null,function*(){let s=yield 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.webroot=s.webroot,this.originalWebroot=s.originalWebroot,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,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,v)=>{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 ${v}: 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 v=0;v<d.length-1;v+=1){if(this.forbiddenKeys.includes(d[v]))return;m[d[v]]||(m[d[v]]={}),m=m[d[v]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[s]=h}checkServerTime(s){let d=(0,E.default)(s).diff((0,E.default)(),"hour");if(this.serverTimeOffset=d*60*60,d>=8||d<=-8){let m=this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1});this.serverTimeToastSubscription&&this.serverTimeToastSubscription.unsubscribe(),this.serverTimeToastSubscription=m.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=R({token:w,factory:w.\u0275fac,providedIn:"root"})}return w})();export{it as a,vt as b};
|
|
1
|
+
import{C as G,E as X,H as tt,K as et}from"./chunk-M6KB66ZD.js";import{L as Q,X as R,aa as W,d as P}from"./chunk-MKV5RAJQ.js";import{e as at,g as ut,h as z}from"./chunk-B4AJQJMI.js";var it=at((B,U)=>{(function(w,k){typeof B=="object"&&typeof U<"u"?U.exports=k():typeof define=="function"&&define.amd?define(k):(w=typeof globalThis<"u"?globalThis:w||self).dayjs=k()})(B,function(){"use strict";var w=1e3,k=6e4,s=36e5,h="millisecond",d="second",m="minute",v="hour",y="day",f="week",L="month",J="quarter",S="year",_="date",K="Invalid Date",st=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,nt=/\[([^\]]+)]|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,rt={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},ot={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,L),o=t-e<0,a=i.clone().add(n+(o?-1:1),L);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:L,y:S,w:f,d:y,D:_,h:v,m,s:d,ms:h,Q:J}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},I="en",D={};D[I]=rt;var q="$isDayjsObject",N=function(r){return r instanceof C||!(!r||!r[q])},Y=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 C(t)},u=ot;u.l=Y,u.i=N,u.w=function(r,i){return g(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var C=(function(){function r(t){this.$L=Y(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[q]=!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(st);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()!==K},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,M){var T=u.w(e.$u?Date.UTC(e.$y,M,x):new Date(e.$y,M,x),e);return o?T:T.endOf(y)},l=function(x,M){return u.w(e.toDate()[x].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(M)),e)},$=this.$W,p=this.$M,b=this.$D,H="set"+(this.$u?"UTC":"");switch(a){case S:return o?c(1,0):c(31,11);case L:return o?c(1,p):c(0,p+1);case f:var O=this.$locale().weekStart||0,j=($<O?$+7:$)-O;return c(o?b-j:b+(6-j),p);case y:case _:return l(H+"Hours",0);case v: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[L]=a+"Month",e[S]=a+"FullYear",e[v]=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===L||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 b=g(o);return u.w(b.date(b.date()+Math.round(p*t)),o)};if(a===L)return this.set(L,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[v]=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||K;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,l=this.$m,$=this.$M,p=e.weekdays,b=e.months,H=e.meridiem,O=function(M,T,A,V){return M&&(M[T]||M(n,o))||A[T].slice(0,V)},j=function(M){return u.s(c%12||12,M,"0")},x=H||function(M,T,A){var V=M<12?"AM":"PM";return A?V.toLowerCase():V};return o.replace(nt,function(M,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,$,b,3);case"MMMM":return O(b,$);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})(M)||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,b=function(){return u.m(a,l)};switch(c){case S:o=b()/12;break;case L:o=b();break;case J:o=b()/3;break;case f:o=(p-$)/6048e5;break;case y:o=(p-$)/864e5;break;case v: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(L).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),o=Y(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=C.prototype;return g.prototype=Z,[["$ms",h],["$s",d],["$m",m],["$H",v],["$W",y],["$M",L],["$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,C,g),r.$i=!0),g},g.locale=Y,g.isDayjs=N,g.unix=function(r){return g(1e3*r)},g.en=D[I],g.Ls=D,g.p={},g})});var E=ut(it(),1);var vt=(()=>{class w{$api=W(et);$title=W(G);$toastr=W(tt);$translate=W(X);settingsLoadedSubject=new P;defaultTheme="deep-purple";forbiddenKeys=["__proto__","constructor","prototype"];serverTimeToastSubscription;restartToastRef=null;env={};host;proxyHost;webroot;originalWebroot;formAuth=!0;sessionTimeout=28800;sessionTimeoutInactivityBased=!1;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;keepOrphans;wallpaper;serverTimeOffset=0;rtl=!1;browserLang;onSettingsLoaded=this.settingsLoadedSubject.pipe(Q());settingsLoaded=!1;themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];constructor(){this.getAppSettings()}getAppSettings(){return z(this,null,function*(){let s=yield 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.webroot=s.webroot,this.originalWebroot=s.originalWebroot,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,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,v)=>{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 ${v}: 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 v=0;v<d.length-1;v+=1){if(this.forbiddenKeys.includes(d[v]))return;m[d[v]]||(m[d[v]]={}),m=m[d[v]]}this.forbiddenKeys.includes(d[d.length-1])||(m[d[d.length-1]]=h)}else this.env[s]=h}checkServerTime(s){let d=(0,E.default)(s).diff((0,E.default)(),"hour");if(this.serverTimeOffset=d*60*60,d>=8||d<=-8){let m=this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1});this.serverTimeToastSubscription&&this.serverTimeToastSubscription.unsubscribe(),this.serverTimeToastSubscription=m.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=R({token:w,factory:w.\u0275fac,providedIn:"root"})}return w})();export{it as a,vt as b};
|