homebridge-config-ui-x 5.0.0-beta.70 → 5.0.0-beta.71
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/CHANGELOG.md +2 -0
- package/package.json +2 -2
- package/public/{chunk-I2L3GMBC.js → chunk-2OBPFCY2.js} +1 -1
- package/public/{chunk-JH55PRGX.js → chunk-2SXSAYFM.js} +1 -1
- package/public/{chunk-CNEG5OIV.js → chunk-3EHBMPWY.js} +1 -1
- package/public/{chunk-XSXBWJW4.js → chunk-4CHNDLJI.js} +1 -1
- package/public/{chunk-OR6GW5WP.js → chunk-4WTLH2XC.js} +1 -1
- package/public/{chunk-GFELNZRD.js → chunk-5K7NARQK.js} +1 -1
- package/public/{chunk-YLJ4YK2P.js → chunk-5PQJRA5G.js} +1 -1
- package/public/chunk-5T7JAJJE.js +1 -0
- package/public/{chunk-2OXWNNKT.js → chunk-752FLZDX.js} +1 -1
- package/public/{chunk-REUKAKIF.js → chunk-A2LWX7FC.js} +1 -1
- package/public/{chunk-OYHOVHGM.js → chunk-AK4S37TG.js} +1 -1
- package/public/chunk-AWX3JVVV.js +1 -0
- package/public/{chunk-CGQJWESO.js → chunk-AXOQXZMS.js} +1 -1
- package/public/chunk-B4ZMGETB.js +1 -0
- package/public/{chunk-7NH4NVWO.js → chunk-CAAUHMGY.js} +1 -1
- package/public/{chunk-3C65WELO.js → chunk-CWBE5JGC.js} +1 -1
- package/public/{chunk-Q3LSTRCD.js → chunk-DJ7A6WCT.js} +1 -1
- package/public/{chunk-7K64Z2GO.js → chunk-ECZONFVO.js} +1 -1
- package/public/chunk-EO357XL5.js +1 -0
- package/public/{chunk-D6HAEAIY.js → chunk-EWHDFFHL.js} +1 -1
- package/public/chunk-F6QHMWSD.js +1 -0
- package/public/{chunk-RWMXS5CJ.js → chunk-FPFW7VCW.js} +1 -1
- package/public/{chunk-I74DZSHW.js → chunk-G6GTWDKY.js} +1 -1
- package/public/{chunk-BXNSJERZ.js → chunk-GJEQY7FK.js} +1 -1
- package/public/{chunk-UJPIGBLW.js → chunk-IEOEU3PV.js} +1 -1
- package/public/chunk-J75SJ6HL.js +1 -0
- package/public/{chunk-ULBJMQJF.js → chunk-JIG56QTE.js} +1 -1
- package/public/{chunk-A6DLVGIC.js → chunk-JPVF3EPM.js} +1 -1
- package/public/{chunk-H34IWNCG.js → chunk-JX3E4VFM.js} +1 -1
- package/public/chunk-KUE46RRU.js +1 -0
- package/public/{chunk-ZAFVFM3T.js → chunk-LXATRDDS.js} +1 -1
- package/public/{chunk-53GLNOVG.js → chunk-M6OQT53Y.js} +1 -1
- package/public/chunk-N4VWPJ6S.js +1 -0
- package/public/{chunk-BLCADRP2.js → chunk-NKGM5COZ.js} +1 -1
- package/public/{chunk-PXFCEK22.js → chunk-OCZ2H4UT.js} +1 -1
- package/public/{chunk-2FXBIEFA.js → chunk-OGSVTVGE.js} +1 -1
- package/public/{chunk-AYAHOPHC.js → chunk-OT3IJBCR.js} +1 -1
- package/public/chunk-P3A42IW2.js +1 -0
- package/public/chunk-PKP4FSKB.js +1 -0
- package/public/{chunk-IU44HP4M.js → chunk-PTJSEANH.js} +1 -1
- package/public/chunk-Q5DVL6Z6.js +1 -0
- package/public/{chunk-OKGCGHKO.js → chunk-QELUTKQF.js} +1 -1
- package/public/chunk-QR2DRJ5Q.js +1 -0
- package/public/{chunk-C4OILQGQ.js → chunk-RHYCATQR.js} +1 -1
- package/public/chunk-S4CZRO5L.js +1 -0
- package/public/{chunk-FTPISXWD.js → chunk-TCKHBFBN.js} +1 -1
- package/public/{chunk-HWQ3KYIQ.js → chunk-TJHYTY4K.js} +1 -1
- package/public/{chunk-XZLDNJOX.js → chunk-TQNPIZF3.js} +1 -1
- package/public/{chunk-UIPWNZIB.js → chunk-TUHGKUZA.js} +1 -1
- package/public/chunk-TVF7CAJN.js +1 -0
- package/public/chunk-U6XLWNAV.js +1 -0
- package/public/{chunk-Y532R476.js → chunk-UOC65WET.js} +1 -1
- package/public/{chunk-AKBHSB64.js → chunk-VISSPBAJ.js} +1 -1
- package/public/{chunk-OLCJ3UHM.js → chunk-VWAY3YX4.js} +1 -1
- package/public/{chunk-F7KMJJSW.js → chunk-WNGOTZ3I.js} +1 -1
- package/public/{chunk-7JPH5SDX.js → chunk-YRCKAGKJ.js} +1 -1
- package/public/{chunk-7YEHCGBQ.js → chunk-YZMZPZB3.js} +1 -1
- package/public/{chunk-EIL4KU4D.js → chunk-Z2BKSNSC.js} +1 -1
- package/public/{chunk-PCAN2IQ6.js → chunk-Z4W7FR2B.js} +1 -1
- package/public/{chunk-3TKE62PU.js → chunk-ZXXOJAVC.js} +1 -1
- package/public/index.html +2 -2
- package/public/main-LJS4FW2X.js +1 -0
- package/public/styles-RBNVUC4M.css +1 -0
- package/public/chunk-2TIYBO73.js +0 -1
- package/public/chunk-2TV4AE2B.js +0 -1
- package/public/chunk-CBVDW3UH.js +0 -1
- package/public/chunk-CL3ZDKJG.js +0 -1
- package/public/chunk-CUAJJ6IB.js +0 -1
- package/public/chunk-DNSPHPB6.js +0 -1
- package/public/chunk-ENWIG42Q.js +0 -1
- package/public/chunk-HT4RSDPG.js +0 -1
- package/public/chunk-I44OXIOM.js +0 -1
- package/public/chunk-JXN4RBAX.js +0 -1
- package/public/chunk-MNWOLOKA.js +0 -1
- package/public/chunk-MUNP54KM.js +0 -1
- package/public/chunk-PIPVTUBD.js +0 -1
- package/public/chunk-SCUB4HUR.js +0 -1
- package/public/chunk-XCZRGZLZ.js +0 -1
- package/public/main-CCEKU4WV.js +0 -1
- package/public/styles-4YGS4LAH.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as uu,b as Z6}from"./chunk-ULBJMQJF.js";import{a as S1}from"./chunk-2FGEOEQD.js";import{a as en,b as tn}from"./chunk-3VIG5M5R.js";import{a as T1}from"./chunk-XZR7OZ6I.js";import{a as O1}from"./chunk-2FXBIEFA.js";import{a as P1}from"./chunk-FHMZVMZK.js";import{a as of}from"./chunk-JMCN2SQV.js";import{a as A1,b as k1}from"./chunk-YXEV6KOV.js";import{a as ss}from"./chunk-LTDUXFUG.js";import{a as $1}from"./chunk-RSIXVZQ5.js";import{a as Ur,b as Wr,c as Gr,d as Kr,e as Jr,f as Xr,g as Yi,m as ve,n as it,o as Zi}from"./chunk-YHABGXDF.js";import{a as E1,b as Gi,c as Ki,e as vt,f as _1,h as y1,i as v1,k as B1,l as Yu,m as x1,o as Ji,r as Xi,s as yi,t as vi,x as w1,y as tu,z as as}from"./chunk-JOBKDXBH.js";import{a as Qi}from"./chunk-I74DZSHW.js";import{d as cu}from"./chunk-QR7L4UUP.js";import{a as I1}from"./chunk-Y532R476.js";import{b as Ve}from"./chunk-AYAHOPHC.js";import{h as _e,j as Zu,k as he}from"./chunk-OR6GW5WP.js";import{e as b1}from"./chunk-ASBFWS7L.js";import{a as Ee,b as Be}from"./chunk-DJKI5XBW.js";import{$a as l,Ac as v,Bc as B,Ca as Hu,Cc as Ye,D as f1,Da as s1,Fa as Uu,Gb as K,Hb as w,Ib as S,Jc as gt,Kb as nt,Kc as z,Lb as ft,Lc as Xu,M as Vr,Mb as rt,Nb as b,Nc as h1,Ob as c,Pb as p,Qb as I,Rb as c1,Sb as p1,Ub as U,Xa as de,Xb as M,Yb as h,Z as ns,_a as D1,a as X,aa as rf,ac as fs,b as Se,bc as rs,bd as zt,cc as os,cd as _i,dc as Wu,dd as bt,e as F,eb as Lr,ec as Gu,fa as r1,fb as yu,g as ze,ga as Ot,gc as Qt,gd as g1,h as G,ha as Hi,hb as Ei,hc as Ku,ic as Z,ja as o1,jc as _,k as t1,ka as a1,kc as H,kd as Hr,la as x,lb as Y,lc as q,mb as Ui,mc as Bu,n as Pt,nb as vu,nc as m1,o as is,ob as l1,q as u1,qc as Te,ra as j,rb as ce,rc as Pe,sa as N,sc as Oe,tb as d1,tc as F1,ub as zr,uc as C1,v as i1,vc as Xe,w as se,wc as eu,x as n1,xc as Ju,yc as xu,za as Rr,zc as Wi}from"./chunk-U4V4ICSI.js";var Df=F(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var af=class{};be._CodeOrName=af;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Bi=class extends af{constructor(u){if(super(),!be.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=Bi;var Ht=class extends af{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof Bi&&(t[i.str]=(t[i.str]||0)+1),t),{})}};be._Code=Ht;be.nil=new Ht("");function M1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)ls(t,u[i]),t.push(e[++i]);return new Ht(t)}be._=M1;var Ds=new Ht("+");function j1(e,...u){let t=[sf(e[0])],i=0;for(;i<u.length;)t.push(Ds),ls(t,u[i]),t.push(Ds,sf(e[++i]));return eb(t),new Ht(t)}be.str=j1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof Bi?e.push(u):e.push(ib(u))}be.addCodeArg=ls;function eb(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=tb(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function tb(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof Bi||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof Bi))return`"${e}${u.slice(1)}`}function ub(e,u){return u.emptyStr()?e:e.emptyStr()?u:j1`${e}${u}`}be.strConcat=ub;function ib(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sf(Array.isArray(e)?e.join(","):e)}function nb(e){return new Ht(sf(e))}be.stringify=nb;function sf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=sf;function fb(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Ht(`.${e}`):M1`[${e}]`}be.getProperty=fb;function rb(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new Ht(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=rb;function ob(e){return new Ht(e.toString())}be.regexpCode=ob});var ps=F(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.ValueScope=xt.ValueScopeName=xt.Scope=xt.varKinds=xt.UsedValueState=void 0;var Bt=Df(),ds=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Yr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Yr||(xt.UsedValueState=Yr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Zr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof Bt.Name?u:this.name(u)}name(u){return new Bt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};xt.Scope=Zr;var Qr=class extends Bt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,Bt._)`.${new Bt.Name(t)}[${i}]`}};xt.ValueScopeName=Qr;var ab=(0,Bt._)`\n`,cs=class extends Zr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Se(X({},u),{_n:u.lines?ab:Bt.nil})}get(){return this._scope}name(u){return new Qr(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let D=o.get(r);if(D)return D}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),s=a.length;return a[s]=t.ref,n.setValue(t,{property:f,itemIndex:s}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,Bt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=Bt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(s=>{if(a.has(s))return;a.set(s,Yr.Started);let D=t(s);if(D){let d=this.opts.es5?xt.varKinds.var:xt.varKinds.const;f=(0,Bt._)`${f}${d} ${s} = ${D};${this.opts._n}`}else if(D=n?.(s))f=(0,Bt._)`${f}${D}${this.opts._n}`;else throw new ds(s);a.set(s,Yr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.or=ae.and=ae.not=ae.CodeGen=ae.operators=ae.varKinds=ae.ValueScopeName=ae.ValueScope=ae.Scope=ae.Name=ae.regexpCode=ae.stringify=ae.getProperty=ae.nil=ae.strConcat=ae.str=ae._=void 0;var Fe=Df(),iu=ps(),Qu=Df();Object.defineProperty(ae,"_",{enumerable:!0,get:function(){return Qu._}});Object.defineProperty(ae,"str",{enumerable:!0,get:function(){return Qu.str}});Object.defineProperty(ae,"strConcat",{enumerable:!0,get:function(){return Qu.strConcat}});Object.defineProperty(ae,"nil",{enumerable:!0,get:function(){return Qu.nil}});Object.defineProperty(ae,"getProperty",{enumerable:!0,get:function(){return Qu.getProperty}});Object.defineProperty(ae,"stringify",{enumerable:!0,get:function(){return Qu.stringify}});Object.defineProperty(ae,"regexpCode",{enumerable:!0,get:function(){return Qu.regexpCode}});Object.defineProperty(ae,"Name",{enumerable:!0,get:function(){return Qu.Name}});var no=ps();Object.defineProperty(ae,"Scope",{enumerable:!0,get:function(){return no.Scope}});Object.defineProperty(ae,"ValueScope",{enumerable:!0,get:function(){return no.ValueScope}});Object.defineProperty(ae,"ValueScopeName",{enumerable:!0,get:function(){return no.ValueScopeName}});Object.defineProperty(ae,"varKinds",{enumerable:!0,get:function(){return no.varKinds}});ae.operators={GT:new Fe._Code(">"),GTE:new Fe._Code(">="),LT:new Fe._Code("<"),LTE:new Fe._Code("<="),EQ:new Fe._Code("==="),NEQ:new Fe._Code("!=="),NOT:new Fe._Code("!"),OR:new Fe._Code("||"),AND:new Fe._Code("&&"),ADD:new Fe._Code("+")};var wu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends wu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?iu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=nn(this.rhs,u,t)),this}get names(){return this.rhs instanceof Fe._CodeOrName?this.rhs.names:{}}},to=class extends wu{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof Fe.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=nn(this.rhs,u,t),this}get names(){let u=this.lhs instanceof Fe.Name?{}:X({},this.lhs.names);return io(u,this.rhs)}},Fs=class extends to{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Cs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends wu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},bs=class extends wu{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=nn(this.code,u,t),this}get names(){return this.code instanceof Fe._CodeOrName?this.code.names:{}}},lf=class extends wu{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(sb(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>xi(u,t.names),{})}},Su=class extends lf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Es=class extends lf{},_s=(()=>{class e extends Su{}return e.kind="else",e})(),eo=(()=>{class e extends Su{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new _s(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(L1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=nn(this.condition,t,i),this}get names(){let t=super.names;return io(t,this.condition),this.else&&xi(t,this.else.names),t}}return e.kind="if",e})(),fo=(()=>{class e extends Su{}return e.kind="for",e})(),ys=class extends fo{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=nn(this.iteration,u,t),this}get names(){return xi(super.names,this.iteration.names)}},vs=class extends fo{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?iu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=io(super.names,this.from);return io(u,this.to)}},uo=class extends fo{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=nn(this.iterable,u,t),this}get names(){return xi(super.names,this.iterable.names)}},N1=(()=>{class e extends Su{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),q1=(()=>{class e extends lf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Su{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&xi(u,this.catch.names),this.finally&&xi(u,this.finally.names),u}},V1=(()=>{class e extends Su{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),R1=(()=>{class e extends Su{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),xs=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Se(X({},t),{_n:t.lines?`
|
|
1
|
+
import{a as uu,b as Z6}from"./chunk-JIG56QTE.js";import{a as S1}from"./chunk-2FGEOEQD.js";import{a as en,b as tn}from"./chunk-3VIG5M5R.js";import{a as T1}from"./chunk-XZR7OZ6I.js";import{a as O1}from"./chunk-OGSVTVGE.js";import{a as P1}from"./chunk-FHMZVMZK.js";import{a as of}from"./chunk-JMCN2SQV.js";import{a as A1,b as k1}from"./chunk-YXEV6KOV.js";import{a as ss}from"./chunk-LTDUXFUG.js";import{a as $1}from"./chunk-RSIXVZQ5.js";import{a as Ur,b as Wr,c as Gr,d as Kr,e as Jr,f as Xr,g as Yi,m as ve,n as it,o as Zi}from"./chunk-YHABGXDF.js";import{a as E1,b as Gi,c as Ki,e as vt,f as _1,h as y1,i as v1,k as B1,l as Yu,m as x1,o as Ji,r as Xi,s as yi,t as vi,x as w1,y as tu,z as as}from"./chunk-JOBKDXBH.js";import{a as Qi}from"./chunk-G6GTWDKY.js";import{d as cu}from"./chunk-QR7L4UUP.js";import{a as I1}from"./chunk-UOC65WET.js";import{b as Ve}from"./chunk-OT3IJBCR.js";import{h as _e,j as Zu,k as he}from"./chunk-4WTLH2XC.js";import{e as b1}from"./chunk-ASBFWS7L.js";import{a as Ee,b as Be}from"./chunk-DJKI5XBW.js";import{$a as l,Ac as v,Bc as B,Ca as Hu,Cc as Ye,D as f1,Da as s1,Fa as Uu,Gb as K,Hb as w,Ib as S,Jc as gt,Kb as nt,Kc as z,Lb as ft,Lc as Xu,M as Vr,Mb as rt,Nb as b,Nc as h1,Ob as c,Pb as p,Qb as I,Rb as c1,Sb as p1,Ub as U,Xa as de,Xb as M,Yb as h,Z as ns,_a as D1,a as X,aa as rf,ac as fs,b as Se,bc as rs,bd as zt,cc as os,cd as _i,dc as Wu,dd as bt,e as F,eb as Lr,ec as Gu,fa as r1,fb as yu,g as ze,ga as Ot,gc as Qt,gd as g1,h as G,ha as Hi,hb as Ei,hc as Ku,ic as Z,ja as o1,jc as _,k as t1,ka as a1,kc as H,kd as Hr,la as x,lb as Y,lc as q,mb as Ui,mc as Bu,n as Pt,nb as vu,nc as m1,o as is,ob as l1,q as u1,qc as Te,ra as j,rb as ce,rc as Pe,sa as N,sc as Oe,tb as d1,tc as F1,ub as zr,uc as C1,v as i1,vc as Xe,w as se,wc as eu,x as n1,xc as Ju,yc as xu,za as Rr,zc as Wi}from"./chunk-U4V4ICSI.js";var Df=F(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var af=class{};be._CodeOrName=af;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Bi=class extends af{constructor(u){if(super(),!be.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=Bi;var Ht=class extends af{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof Bi&&(t[i.str]=(t[i.str]||0)+1),t),{})}};be._Code=Ht;be.nil=new Ht("");function M1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)ls(t,u[i]),t.push(e[++i]);return new Ht(t)}be._=M1;var Ds=new Ht("+");function j1(e,...u){let t=[sf(e[0])],i=0;for(;i<u.length;)t.push(Ds),ls(t,u[i]),t.push(Ds,sf(e[++i]));return eb(t),new Ht(t)}be.str=j1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof Bi?e.push(u):e.push(ib(u))}be.addCodeArg=ls;function eb(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=tb(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function tb(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof Bi||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof Bi))return`"${e}${u.slice(1)}`}function ub(e,u){return u.emptyStr()?e:e.emptyStr()?u:j1`${e}${u}`}be.strConcat=ub;function ib(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sf(Array.isArray(e)?e.join(","):e)}function nb(e){return new Ht(sf(e))}be.stringify=nb;function sf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=sf;function fb(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Ht(`.${e}`):M1`[${e}]`}be.getProperty=fb;function rb(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new Ht(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=rb;function ob(e){return new Ht(e.toString())}be.regexpCode=ob});var ps=F(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.ValueScope=xt.ValueScopeName=xt.Scope=xt.varKinds=xt.UsedValueState=void 0;var Bt=Df(),ds=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Yr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Yr||(xt.UsedValueState=Yr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Zr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof Bt.Name?u:this.name(u)}name(u){return new Bt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};xt.Scope=Zr;var Qr=class extends Bt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,Bt._)`.${new Bt.Name(t)}[${i}]`}};xt.ValueScopeName=Qr;var ab=(0,Bt._)`\n`,cs=class extends Zr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Se(X({},u),{_n:u.lines?ab:Bt.nil})}get(){return this._scope}name(u){return new Qr(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let D=o.get(r);if(D)return D}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),s=a.length;return a[s]=t.ref,n.setValue(t,{property:f,itemIndex:s}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,Bt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=Bt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(s=>{if(a.has(s))return;a.set(s,Yr.Started);let D=t(s);if(D){let d=this.opts.es5?xt.varKinds.var:xt.varKinds.const;f=(0,Bt._)`${f}${d} ${s} = ${D};${this.opts._n}`}else if(D=n?.(s))f=(0,Bt._)`${f}${D}${this.opts._n}`;else throw new ds(s);a.set(s,Yr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.or=ae.and=ae.not=ae.CodeGen=ae.operators=ae.varKinds=ae.ValueScopeName=ae.ValueScope=ae.Scope=ae.Name=ae.regexpCode=ae.stringify=ae.getProperty=ae.nil=ae.strConcat=ae.str=ae._=void 0;var Fe=Df(),iu=ps(),Qu=Df();Object.defineProperty(ae,"_",{enumerable:!0,get:function(){return Qu._}});Object.defineProperty(ae,"str",{enumerable:!0,get:function(){return Qu.str}});Object.defineProperty(ae,"strConcat",{enumerable:!0,get:function(){return Qu.strConcat}});Object.defineProperty(ae,"nil",{enumerable:!0,get:function(){return Qu.nil}});Object.defineProperty(ae,"getProperty",{enumerable:!0,get:function(){return Qu.getProperty}});Object.defineProperty(ae,"stringify",{enumerable:!0,get:function(){return Qu.stringify}});Object.defineProperty(ae,"regexpCode",{enumerable:!0,get:function(){return Qu.regexpCode}});Object.defineProperty(ae,"Name",{enumerable:!0,get:function(){return Qu.Name}});var no=ps();Object.defineProperty(ae,"Scope",{enumerable:!0,get:function(){return no.Scope}});Object.defineProperty(ae,"ValueScope",{enumerable:!0,get:function(){return no.ValueScope}});Object.defineProperty(ae,"ValueScopeName",{enumerable:!0,get:function(){return no.ValueScopeName}});Object.defineProperty(ae,"varKinds",{enumerable:!0,get:function(){return no.varKinds}});ae.operators={GT:new Fe._Code(">"),GTE:new Fe._Code(">="),LT:new Fe._Code("<"),LTE:new Fe._Code("<="),EQ:new Fe._Code("==="),NEQ:new Fe._Code("!=="),NOT:new Fe._Code("!"),OR:new Fe._Code("||"),AND:new Fe._Code("&&"),ADD:new Fe._Code("+")};var wu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends wu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?iu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=nn(this.rhs,u,t)),this}get names(){return this.rhs instanceof Fe._CodeOrName?this.rhs.names:{}}},to=class extends wu{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof Fe.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=nn(this.rhs,u,t),this}get names(){let u=this.lhs instanceof Fe.Name?{}:X({},this.lhs.names);return io(u,this.rhs)}},Fs=class extends to{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Cs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends wu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},bs=class extends wu{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=nn(this.code,u,t),this}get names(){return this.code instanceof Fe._CodeOrName?this.code.names:{}}},lf=class extends wu{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(sb(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>xi(u,t.names),{})}},Su=class extends lf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Es=class extends lf{},_s=(()=>{class e extends Su{}return e.kind="else",e})(),eo=(()=>{class e extends Su{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new _s(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(L1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=nn(this.condition,t,i),this}get names(){let t=super.names;return io(t,this.condition),this.else&&xi(t,this.else.names),t}}return e.kind="if",e})(),fo=(()=>{class e extends Su{}return e.kind="for",e})(),ys=class extends fo{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=nn(this.iteration,u,t),this}get names(){return xi(super.names,this.iteration.names)}},vs=class extends fo{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?iu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=io(super.names,this.from);return io(u,this.to)}},uo=class extends fo{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=nn(this.iterable,u,t),this}get names(){return xi(super.names,this.iterable.names)}},N1=(()=>{class e extends Su{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),q1=(()=>{class e extends lf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Su{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&xi(u,this.catch.names),this.finally&&xi(u,this.finally.names),u}},V1=(()=>{class e extends Su{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),R1=(()=>{class e extends Su{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),xs=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Se(X({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=u,this._scope=new iu.Scope({parent:u}),this._nodes=[new Es]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,t){let i=this._extScope.value(u,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(u,t){return this._extScope.getValue(u,t)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,t,i,n){let f=this._scope.toName(t);return i!==void 0&&n&&(this._constants[f.str]=i),this._leafNode(new ms(u,f,i)),f}const(u,t,i){return this._def(iu.varKinds.const,u,t,i)}let(u,t,i){return this._def(iu.varKinds.let,u,t,i)}var(u,t,i){return this._def(iu.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new to(u,t,i))}add(u,t){return this._leafNode(new Fs(u,ae.operators.ADD,t))}code(u){return typeof u=="function"?u():u!==Fe.nil&&this._leafNode(new bs(u)),this}object(...u){let t=["{"];for(let[i,n]of u)t.length>1&&t.push(","),t.push(i),(i!==n||this.opts.es5)&&(t.push(":"),(0,Fe.addCodeArg)(t,n));return t.push("}"),new Fe._Code(t)}if(u,t,i){if(this._blockNode(new eo(u)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new eo(u))}else(){return this._elseNode(new _s)}endIf(){return this._endBlockNode(eo,_s)}_for(u,t){return this._blockNode(u),t&&this.code(t).endFor(),this}for(u,t){return this._for(new ys(u),t)}forRange(u,t,i,n,f=this.opts.es5?iu.varKinds.var:iu.varKinds.let){let r=this._scope.toName(u);return this._for(new vs(f,r,t,i),()=>n(r))}forOf(u,t,i,n=iu.varKinds.const){let f=this._scope.toName(u);if(this.opts.es5){let r=t instanceof Fe.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Fe._)`${r}.length`,o=>{this.var(f,(0,Fe._)`${r}[${o}]`),i(f)})}return this._for(new uo("of",n,f,t),()=>i(f))}forIn(u,t,i,n=this.opts.es5?iu.varKinds.var:iu.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,Fe._)`Object.keys(${t})`,i);let f=this._scope.toName(u);return this._for(new uo("in",n,f,t),()=>i(f))}endFor(){return this._endBlockNode(fo)}label(u){return this._leafNode(new Cs(u))}break(u){return this._leafNode(new hs(u))}return(u){let t=new q1;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(q1)}try(u,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Bs;if(this._blockNode(n),this.code(u),t){let f=this.name("e");this._currNode=n.catch=new V1(f),t(f)}return i&&(this._currNode=n.finally=new R1,this.code(i)),this._endBlockNode(V1,R1)}throw(u){return this._leafNode(new gs(u))}block(u,t){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(t),this}endBlock(u){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||u!==void 0&&i!==u)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${u} expected`);return this._nodes.length=t,this}func(u,t=Fe.nil,i,n){return this._blockNode(new N1(u,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(N1)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,t){let i=this._currNode;if(i instanceof u||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${u.kind}/${t.kind}`:u.kind}"`)}_elseNode(u){let t=this._currNode;if(!(t instanceof eo))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=u,this}get _root(){return this._nodes[0]}get _currNode(){let u=this._nodes;return u[u.length-1]}set _currNode(u){let t=this._nodes;t[t.length-1]=u}};ae.CodeGen=xs;function xi(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function io(e,u){return u instanceof Fe._CodeOrName?xi(e,u.names):e}function nn(e,u,t){if(e instanceof Fe.Name)return i(e);if(!n(e))return e;return new Fe._Code(e._items.reduce((f,r)=>(r instanceof Fe.Name&&(r=i(r)),r instanceof Fe._Code?f.push(...r._items):f.push(r),f),[]));function i(f){let r=t[f.str];return r===void 0||u[f.str]!==1?f:(delete u[f.str],r)}function n(f){return f instanceof Fe._Code&&f._items.some(r=>r instanceof Fe.Name&&u[r.str]===1&&t[r.str]!==void 0)}}function sb(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function L1(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Fe._)`!${ws(e)}`}ae.not=L1;var Db=z1(ae.operators.AND);function lb(...e){return e.reduce(Db)}ae.and=lb;var db=z1(ae.operators.OR);function cb(...e){return e.reduce(db)}ae.or=cb;function z1(e){return(u,t)=>u===Fe.nil?t:t===Fe.nil?u:(0,Fe._)`${ws(u)} ${e} ${ws(t)}`}function ws(e){return e instanceof Fe.Name?e:(0,Fe._)`(${e})`}});var le=F(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.checkStrictMode=De.getErrorPath=De.Type=De.useFunc=De.setEvaluated=De.evaluatedPropsToName=De.mergeEvaluated=De.eachItem=De.unescapeJsonPointer=De.escapeJsonPointer=De.escapeFragment=De.unescapeFragment=De.schemaRefOrVal=De.schemaHasRulesButRef=De.schemaHasRules=De.checkUnknownRules=De.alwaysValidSchema=De.toHash=void 0;var Ie=ee(),pb=Df();function mb(e){let u={};for(let t of e)u[t]=!0;return u}De.toHash=mb;function Fb(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(W1(e,u),!G1(u,e.self.RULES.all))}De.alwaysValidSchema=Fb;function W1(e,u=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof u=="boolean")return;let n=i.RULES.keywords;for(let f in u)n[f]||X1(e,`unknown keyword: "${f}"`)}De.checkUnknownRules=W1;function G1(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}De.schemaHasRules=G1;function Cb(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&u.all[t])return!0;return!1}De.schemaHasRulesButRef=Cb;function hb({topSchemaRef:e,schemaPath:u},t,i,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ie._)`${t}`}return(0,Ie._)`${e}${u}${(0,Ie.getProperty)(i)}`}De.schemaRefOrVal=hb;function gb(e){return K1(decodeURIComponent(e))}De.unescapeFragment=gb;function bb(e){return encodeURIComponent(Is(e))}De.escapeFragment=bb;function Is(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}De.escapeJsonPointer=Is;function K1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}De.unescapeJsonPointer=K1;function Eb(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}De.eachItem=Eb;function H1({mergeNames:e,mergeToName:u,mergeValues:t,resultToName:i}){return(n,f,r,o)=>{let a=r===void 0?f:r instanceof Ie.Name?(f instanceof Ie.Name?e(n,f,r):u(n,f,r),r):f instanceof Ie.Name?(u(n,r,f),f):t(f,r);return o===Ie.Name&&!(a instanceof Ie.Name)?i(n,a):a}}De.mergeEvaluated={props:H1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>{e.if((0,Ie._)`${u} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ie._)`${t} || {}`).code((0,Ie._)`Object.assign(${t}, ${u})`))}),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>{u===!0?e.assign(t,!0):(e.assign(t,(0,Ie._)`${t} || {}`),As(e,t,u))}),mergeValues:(e,u)=>e===!0?!0:X(X({},e),u),resultToName:J1}),items:H1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>e.assign(t,(0,Ie._)`${u} === true ? true : ${t} > ${u} ? ${t} : ${u}`)),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>e.assign(t,u===!0?!0:(0,Ie._)`${t} > ${u} ? ${t} : ${u}`)),mergeValues:(e,u)=>e===!0?!0:Math.max(e,u),resultToName:(e,u)=>e.var("items",u)})};function J1(e,u){if(u===!0)return e.var("props",!0);let t=e.var("props",(0,Ie._)`{}`);return u!==void 0&&As(e,t,u),t}De.evaluatedPropsToName=J1;function As(e,u,t){Object.keys(t).forEach(i=>e.assign((0,Ie._)`${u}${(0,Ie.getProperty)(i)}`,!0))}De.setEvaluated=As;var U1={};function _b(e,u){return e.scopeValue("func",{ref:u,code:U1[u.code]||(U1[u.code]=new pb._Code(u.code))})}De.useFunc=_b;var Ss=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ss||(De.Type=Ss={}));function yb(e,u,t){if(e instanceof Ie.Name){let i=u===Ss.Num;return t?i?(0,Ie._)`"[" + ${e} + "]"`:(0,Ie._)`"['" + ${e} + "']"`:i?(0,Ie._)`"/" + ${e}`:(0,Ie._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ie.getProperty)(e).toString():"/"+Is(e)}De.getErrorPath=yb;function X1(e,u,t=e.opts.strictSchema){if(t){if(u=`strict mode: ${u}`,t===!0)throw new Error(u);e.self.logger.warn(u)}}De.checkStrictMode=X1});var Ut=F(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var lt=ee(),vb={data:new lt.Name("data"),valCxt:new lt.Name("valCxt"),instancePath:new lt.Name("instancePath"),parentData:new lt.Name("parentData"),parentDataProperty:new lt.Name("parentDataProperty"),rootData:new lt.Name("rootData"),dynamicAnchors:new lt.Name("dynamicAnchors"),vErrors:new lt.Name("vErrors"),errors:new lt.Name("errors"),this:new lt.Name("this"),self:new lt.Name("self"),scope:new lt.Name("scope"),json:new lt.Name("json"),jsonPos:new lt.Name("jsonPos"),jsonLen:new lt.Name("jsonLen"),jsonPart:new lt.Name("jsonPart")};ks.default=vb});var df=F(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.extendErrors=dt.resetErrorsCount=dt.reportExtraError=dt.reportError=dt.keyword$DataError=dt.keywordError=void 0;var ge=ee(),ro=le(),Et=Ut();dt.keywordError={message:({keyword:e})=>(0,ge.str)`must pass "${e}" keyword validation`};dt.keyword$DataError={message:({keyword:e,schemaType:u})=>u?(0,ge.str)`"${e}" keyword must be ${u} ($data)`:(0,ge.str)`"${e}" keyword is invalid ($data)`};function Bb(e,u=dt.keywordError,t,i){let{it:n}=e,{gen:f,compositeRule:r,allErrors:o}=n,a=Q1(e,u,t);i??(r||o)?Y1(f,a):Z1(n,(0,ge._)`[${a}]`)}dt.reportError=Bb;function xb(e,u=dt.keywordError,t){let{it:i}=e,{gen:n,compositeRule:f,allErrors:r}=i,o=Q1(e,u,t);Y1(n,o),f||r||Z1(i,Et.default.vErrors)}dt.reportExtraError=xb;function wb(e,u){e.assign(Et.default.errors,u),e.if((0,ge._)`${Et.default.vErrors} !== null`,()=>e.if(u,()=>e.assign((0,ge._)`${Et.default.vErrors}.length`,u),()=>e.assign(Et.default.vErrors,null)))}dt.resetErrorsCount=wb;function Sb({gen:e,keyword:u,schemaValue:t,data:i,errsCount:n,it:f}){if(n===void 0)throw new Error("ajv implementation error");let r=e.name("err");e.forRange("i",n,Et.default.errors,o=>{e.const(r,(0,ge._)`${Et.default.vErrors}[${o}]`),e.if((0,ge._)`${r}.instancePath === undefined`,()=>e.assign((0,ge._)`${r}.instancePath`,(0,ge.strConcat)(Et.default.instancePath,f.errorPath))),e.assign((0,ge._)`${r}.schemaPath`,(0,ge.str)`${f.errSchemaPath}/${u}`),f.opts.verbose&&(e.assign((0,ge._)`${r}.schema`,t),e.assign((0,ge._)`${r}.data`,i))})}dt.extendErrors=Sb;function Y1(e,u){let t=e.const("err",u);e.if((0,ge._)`${Et.default.vErrors} === null`,()=>e.assign(Et.default.vErrors,(0,ge._)`[${t}]`),(0,ge._)`${Et.default.vErrors}.push(${t})`),e.code((0,ge._)`${Et.default.errors}++`)}function Z1(e,u){let{gen:t,validateName:i,schemaEnv:n}=e;n.$async?t.throw((0,ge._)`new ${e.ValidationError}(${u})`):(t.assign((0,ge._)`${i}.errors`,u),t.return(!1))}var wi={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 Q1(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,ge._)`{}`:Ib(e,u,t)}function Ib(e,u,t={}){let{gen:i,it:n}=e,f=[Ab(n,t),kb(e,t)];return $b(e,u,f),i.object(...f)}function Ab({errorPath:e},{instancePath:u}){let t=u?(0,ge.str)`${e}${(0,ro.getErrorPath)(u,ro.Type.Str)}`:e;return[Et.default.instancePath,(0,ge.strConcat)(Et.default.instancePath,t)]}function kb({keyword:e,it:{errSchemaPath:u}},{schemaPath:t,parentSchema:i}){let n=i?u:(0,ge.str)`${u}/${e}`;return t&&(n=(0,ge.str)`${n}${(0,ro.getErrorPath)(t,ro.Type.Str)}`),[wi.schemaPath,n]}function $b(e,{params:u,message:t},i){let{keyword:n,data:f,schemaValue:r,it:o}=e,{opts:a,propertyName:s,topSchemaRef:D,schemaPath:d}=o;i.push([wi.keyword,n],[wi.params,typeof u=="function"?u(e):u||(0,ge._)`{}`]),a.messages&&i.push([wi.message,typeof t=="function"?t(e):t]),a.verbose&&i.push([wi.schema,r],[wi.parentSchema,(0,ge._)`${D}${d}`],[Et.default.data,f]),s&&i.push([wi.propertyName,s])}});var td=F(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.boolOrEmptySchema=fn.topBoolOrEmptySchema=void 0;var Tb=df(),Pb=ee(),Ob=Ut(),Mb={message:"boolean schema is false"};function jb(e){let{gen:u,schema:t,validateName:i}=e;t===!1?ed(e,!1):typeof t=="object"&&t.$async===!0?u.return(Ob.default.data):(u.assign((0,Pb._)`${i}.errors`,null),u.return(!0))}fn.topBoolOrEmptySchema=jb;function Nb(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),ed(e)):t.var(u,!0)}fn.boolOrEmptySchema=Nb;function ed(e,u){let{gen:t,data:i}=e,n={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Tb.reportError)(n,Mb,void 0,u)}});var $s=F(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.getRules=rn.isJSONType=void 0;var qb=["string","number","integer","boolean","null","object","array"],Vb=new Set(qb);function Rb(e){return typeof e=="string"&&Vb.has(e)}rn.isJSONType=Rb;function Lb(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Se(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}rn.getRules=Lb});var Ts=F(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.shouldUseRule=ei.shouldUseGroup=ei.schemaHasRulesForType=void 0;function zb({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&ud(e,i)}ei.schemaHasRulesForType=zb;function ud(e,u){return u.rules.some(t=>id(e,t))}ei.shouldUseGroup=ud;function id(e,u){var t;return e[u.keyword]!==void 0||((t=u.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}ei.shouldUseRule=id});var cf=F(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.reportTypeError=ct.checkDataTypes=ct.checkDataType=ct.coerceAndCheckDataType=ct.getJSONTypes=ct.getSchemaTypes=ct.DataType=void 0;var Hb=$s(),Ub=Ts(),Wb=df(),re=ee(),nd=le(),on=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(on||(ct.DataType=on={}));function Gb(e){let u=fd(e.type);if(u.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&u.push("null")}return u}ct.getSchemaTypes=Gb;function fd(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(Hb.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}ct.getJSONTypes=fd;function Kb(e,u){let{gen:t,data:i,opts:n}=e,f=Jb(u,n.coerceTypes),r=u.length>0&&!(f.length===0&&u.length===1&&(0,Ub.schemaHasRulesForType)(e,u[0]));if(r){let o=Os(u,i,n.strictNumbers,on.Wrong);t.if(o,()=>{f.length?Xb(e,u,f):Ms(e)})}return r}ct.coerceAndCheckDataType=Kb;var rd=new Set(["string","number","integer","boolean","null"]);function Jb(e,u){return u?e.filter(t=>rd.has(t)||u==="array"&&t==="array"):[]}function Xb(e,u,t){let{gen:i,data:n,opts:f}=e,r=i.let("dataType",(0,re._)`typeof ${n}`),o=i.let("coerced",(0,re._)`undefined`);f.coerceTypes==="array"&&i.if((0,re._)`${r} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,re._)`${n}[0]`).assign(r,(0,re._)`typeof ${n}`).if(Os(u,n,f.strictNumbers),()=>i.assign(o,n))),i.if((0,re._)`${o} !== undefined`);for(let s of t)(rd.has(s)||s==="array"&&f.coerceTypes==="array")&&a(s);i.else(),Ms(e),i.endIf(),i.if((0,re._)`${o} !== undefined`,()=>{i.assign(n,o),Yb(e,o)});function a(s){switch(s){case"string":i.elseIf((0,re._)`${r} == "number" || ${r} == "boolean"`).assign(o,(0,re._)`"" + ${n}`).elseIf((0,re._)`${n} === null`).assign(o,(0,re._)`""`);return;case"number":i.elseIf((0,re._)`${r} == "boolean" || ${n} === null
|
|
3
3
|
|| (${r} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,re._)`+${n}`);return;case"integer":i.elseIf((0,re._)`${r} === "boolean" || ${n} === null
|
|
4
4
|
|| (${r} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,re._)`+${n}`);return;case"boolean":i.elseIf((0,re._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,re._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":i.elseIf((0,re._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(o,null);return;case"array":i.elseIf((0,re._)`${r} === "string" || ${r} === "number"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-5K7NARQK.js";import"./chunk-WM3ZC7RY.js";import"./chunk-JIG56QTE.js";import"./chunk-2FGEOEQD.js";import"./chunk-XZR7OZ6I.js";import"./chunk-YHABGXDF.js";import"./chunk-JOBKDXBH.js";import"./chunk-QR7L4UUP.js";import"./chunk-OT3IJBCR.js";import"./chunk-4WTLH2XC.js";import"./chunk-ASBFWS7L.js";import"./chunk-DJKI5XBW.js";import"./chunk-U4V4ICSI.js";export{a as ConfigEditorComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-G6GTWDKY.js";import{d as w}from"./chunk-QR7L4UUP.js";import{b}from"./chunk-OT3IJBCR.js";import{h as k,k as S}from"./chunk-4WTLH2XC.js";import{a as $,b as T}from"./chunk-DJKI5XBW.js";import{$a as i,Ac as c,Bc as l,Cc as y,Hb as m,Ib as p,Nb as g,Ob as r,Pb as n,Qb as u,Xa as _,Yb as v,jc as o,kc as s,la as a,lb as x,wc as C}from"./chunk-U4V4ICSI.js";var I=t=>({command:t});function R(t,h){t&1&&(r(0,"p",7),o(1),c(2,"translate"),n()),t&2&&(i(),s(l(2,1,"restart.please_wait_while_server_restarts")))}function D(t,h){if(t&1&&(r(0,"div",8),o(1),n()),t&2){let e=v();i(),s(e.error)}}function B(t,h){t&1&&(r(0,"div",9)(1,"div",11),u(2,"i",12),n()())}function M(t,h){if(t&1&&(r(0,"div",10)(1,"p"),o(2),c(3,"translate"),n(),u(4,"p",13),c(5,"translate"),n()),t&2){let e=v();i(2),s(l(3,2,"platform.docker.server_long_time")),i(2),g("innerHTML",y(5,4,"platform.docker.run_with_restart",C(7,I,e.command)),_)}}var N=(()=>{class t{$api=a(S);$router=a(w);$settings=a(b);$toastr=a(k);$translate=a($);$ws=a(E);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';io;constructor(){}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"))}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||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)}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(d){return new(d||t)};static \u0275cmp=x({type:t,selectors:[["ng-component"]],decls:15,vars:10,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-fw","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[1,"justify-content-center","my-4"],[1,"alert","alert-warning","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(d,f){d&1&&(r(0,"div",0)(1,"h3",1),o(2),c(3,"translate"),n()(),r(4,"div",2)(5,"div",3),u(6,"i",4),n(),r(7,"div",5)(8,"h4",6),o(9),c(10,"translate"),n(),m(11,R,3,3,"p",7),m(12,D,2,1,"div",8),m(13,B,3,0,"div",9),m(14,M,6,9,"div",10),n()()),d&2&&(i(2),s(l(3,6,"menu.restart.title")),i(7),s(l(10,8,"platform.docker.title_restarting")),i(2),p(f.error?-1:11),i(),p(f.error?12:-1),i(),p(f.error?-1:13),i(),p(f.timeout?14:-1))},dependencies:[T],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{N as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-Z2BKSNSC.js";import"./chunk-2FGEOEQD.js";import"./chunk-XZR7OZ6I.js";import"./chunk-JOBKDXBH.js";import"./chunk-QR7L4UUP.js";import"./chunk-OT3IJBCR.js";import"./chunk-4WTLH2XC.js";import"./chunk-ASBFWS7L.js";import"./chunk-DJKI5XBW.js";import"./chunk-U4V4ICSI.js";export{a as StartupScriptComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as X}from"./chunk-53GLNOVG.js";import{n as j}from"./chunk-YHABGXDF.js";import{c as B,d as v,e as P,f as V,g as O,j as z,m as R,p as W,q as N,y as D,z as G}from"./chunk-JOBKDXBH.js";import{e as L}from"./chunk-QR7L4UUP.js";import{c as Q}from"./chunk-Y532R476.js";import{b as J}from"./chunk-AYAHOPHC.js";import{h as q,j as T,k as K}from"./chunk-OR6GW5WP.js";import{l as M}from"./chunk-ASBFWS7L.js";import{a as H,b as A}from"./chunk-DJKI5XBW.js";import{$a as i,Ac as s,Bc as l,Hb as _,Ib as f,Nb as h,Ob as n,Pb as o,Qb as d,Ub as k,Xb as b,Yb as m,bd as I,h as y,jc as p,kc as c,la as g,lb as E,lc as w,ra as C,sa as x,w as S,wc as $,xc as F}from"./chunk-U4V4ICSI.js";var U=(t,u)=>({"is-valid":t,"is-invalid":u}),Z=t=>({"button-loading":t});function ee(t,u){if(t&1){let e=k();n(0,"div",2),d(1,"img",3),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"button",5),b("click",function(){C(e);let a=m();return x(a.onClickGettingStarted())}),p(6),s(7,"translate"),o(),n(8,"small",6)(9,"a",7),b("click",function(){C(e);let a=m();return x(a.onClickRestoreBackup())}),p(10),s(11,"translate"),o()()()}t&2&&(i(3),c(l(4,3,"setup.welcome_to_homebridge")),i(3),w(" ",l(7,5,"setup.button_get_started")," "),i(4),c(l(11,7,"setup_wizard_message_restore")))}function te(t,u){if(t&1){let e=k();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"div",9)(6,"p"),p(7),s(8,"translate"),o(),n(9,"form",10),b("ngSubmit",function(){C(e);let a=m();return x(a.createFirstUser())}),n(10,"div",11)(11,"span",12),d(12,"i",13),o(),d(13,"input",14),s(14,"translate"),o(),n(15,"div",11)(16,"span",12),d(17,"i",15),o(),d(18,"input",16),s(19,"translate"),o(),n(20,"div",17)(21,"span",12),d(22,"i",15),o(),d(23,"input",18),s(24,"translate"),o(),n(25,"div",19)(26,"button",20),p(27),s(28,"translate"),d(29,"i",21),o()()()()()}if(t&2){let e=m();i(3),c(l(4,15,"setup.create_account")),i(4),c(l(8,17,"setup.create_account_reason")),i(2),h("formGroup",e.createUserForm),i(4),h("placeholder",l(14,19,"users.label_username"))("readonly",e.loading)("ngClass",F(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),i(5),h("placeholder",l(19,21,"users.label_password"))("readonly",e.loading)("ngClass",F(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),i(5),h("placeholder",l(24,23,"users.label_confirm_password"))("readonly",e.loading)("ngClass",F(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),i(3),h("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),i(),w(" ",l(28,25,"setup.create_account")," ")}}function ie(t,u){t&1&&(n(0,"span"),d(1,"i",26),p(2),s(3,"translate"),o()),t&2&&(i(2),w(" ",l(3,1,"backup.label_uploading")," "))}function ne(t,u){t&1&&(p(0),s(1,"translate")),t&2&&w(" ",l(1,1,"backup.button_restore_backup")," ")}function oe(t,u){if(t&1){let e=k();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"p"),p(6),s(7,"translate"),o(),n(8,"input",22),b("change",function(a){C(e);let Y=m();return x(Y.handleRestoreFileInput(a.target.files))}),o(),n(9,"div",23)(10,"button",24),b("click",function(){C(e);let a=m();return x(a.onClickCancelRestore())}),p(11),s(12,"translate"),o(),n(13,"button",25),b("click",function(){C(e);let a=m();return x(a.onRestoreBackupClick())}),_(14,ie,4,3,"span"),_(15,ne,2,3),o()()()}if(t&2){let e=m();i(3),c(l(4,7,"form.button_restore")),i(3),c(l(7,9,"backup.restore_help_one")),i(4),h("disabled",e.restoreUploading),i(),w(" ",l(12,11,"form.button_cancel")," "),i(2),h("disabled",e.restoreUploading||!e.selectedFile),i(),f(e.restoreUploading?14:-1),i(),f(e.restoreUploading?-1:15)}}function re(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"h1"),d(6,"i",26),o()()),t&2&&(i(3),c(l(4,1,"restart.title_restart")))}function ae(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",27),p(3),s(4,"translate"),o(),n(5,"p",28),p(6),s(7,"translate"),o(),n(8,"a",29),p(9),s(10,"translate"),o()()),t&2&&(i(3),c(l(4,3,"setup_wizard_message_complete_title")),i(3),c(l(7,5,"setup_wizard_message_complete_message")),i(3),c(l(10,7,"setup.open_dashboard")))}var Se=(()=>{class t{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(M);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new z("",[v.required]),password:new z("",[v.compose([v.required,v.minLength(4)])]),passwordConfirm:new z("",[v.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,a=e.get("passwordConfirm").value;if(r!==a)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>y(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return y(this,null,function*(){try{let e=yield S(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(T.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield S(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return y(this,null,function*(){this.step="restarting",window.localStorage.removeItem(T.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>y(this,null,function*(){try{yield S(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=E({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"md-form","input-group","mb-4"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control",3,"change"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,a){r&1&&(n(0,"div",0)(1,"div",1),_(2,ee,12,9,"div",2),_(3,te,30,38,"div",2),_(4,oe,16,13,"div",2),_(5,re,7,3,"div",2),_(6,ae,11,9,"div",2),o()()),r&2&&(i(2),f(a.step==="welcome"?2:-1),i(),f(a.step==="create-account"?3:-1),i(),f(a.step==="restore-backup"?4:-1),i(),f(a.step==="restarting"?5:-1),i(),f(a.step==="setup-complete"?6:-1))},dependencies:[D,R,B,P,V,G,W,N,I,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();export{Se as a};
|
|
1
|
+
import{b as X}from"./chunk-M6OQT53Y.js";import{n as j}from"./chunk-YHABGXDF.js";import{c as B,d as v,e as P,f as V,g as O,j as z,m as R,p as W,q as N,y as D,z as G}from"./chunk-JOBKDXBH.js";import{e as L}from"./chunk-QR7L4UUP.js";import{c as Q}from"./chunk-UOC65WET.js";import{b as J}from"./chunk-OT3IJBCR.js";import{h as q,j as T,k as K}from"./chunk-4WTLH2XC.js";import{l as M}from"./chunk-ASBFWS7L.js";import{a as H,b as A}from"./chunk-DJKI5XBW.js";import{$a as i,Ac as s,Bc as l,Hb as _,Ib as f,Nb as h,Ob as n,Pb as o,Qb as d,Ub as k,Xb as b,Yb as m,bd as I,h as y,jc as p,kc as c,la as g,lb as E,lc as w,ra as C,sa as x,w as S,wc as $,xc as F}from"./chunk-U4V4ICSI.js";var U=(t,u)=>({"is-valid":t,"is-invalid":u}),Z=t=>({"button-loading":t});function ee(t,u){if(t&1){let e=k();n(0,"div",2),d(1,"img",3),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"button",5),b("click",function(){C(e);let a=m();return x(a.onClickGettingStarted())}),p(6),s(7,"translate"),o(),n(8,"small",6)(9,"a",7),b("click",function(){C(e);let a=m();return x(a.onClickRestoreBackup())}),p(10),s(11,"translate"),o()()()}t&2&&(i(3),c(l(4,3,"setup.welcome_to_homebridge")),i(3),w(" ",l(7,5,"setup.button_get_started")," "),i(4),c(l(11,7,"setup_wizard_message_restore")))}function te(t,u){if(t&1){let e=k();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"div",9)(6,"p"),p(7),s(8,"translate"),o(),n(9,"form",10),b("ngSubmit",function(){C(e);let a=m();return x(a.createFirstUser())}),n(10,"div",11)(11,"span",12),d(12,"i",13),o(),d(13,"input",14),s(14,"translate"),o(),n(15,"div",11)(16,"span",12),d(17,"i",15),o(),d(18,"input",16),s(19,"translate"),o(),n(20,"div",17)(21,"span",12),d(22,"i",15),o(),d(23,"input",18),s(24,"translate"),o(),n(25,"div",19)(26,"button",20),p(27),s(28,"translate"),d(29,"i",21),o()()()()()}if(t&2){let e=m();i(3),c(l(4,15,"setup.create_account")),i(4),c(l(8,17,"setup.create_account_reason")),i(2),h("formGroup",e.createUserForm),i(4),h("placeholder",l(14,19,"users.label_username"))("readonly",e.loading)("ngClass",F(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),i(5),h("placeholder",l(19,21,"users.label_password"))("readonly",e.loading)("ngClass",F(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),i(5),h("placeholder",l(24,23,"users.label_confirm_password"))("readonly",e.loading)("ngClass",F(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),i(3),h("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),i(),w(" ",l(28,25,"setup.create_account")," ")}}function ie(t,u){t&1&&(n(0,"span"),d(1,"i",26),p(2),s(3,"translate"),o()),t&2&&(i(2),w(" ",l(3,1,"backup.label_uploading")," "))}function ne(t,u){t&1&&(p(0),s(1,"translate")),t&2&&w(" ",l(1,1,"backup.button_restore_backup")," ")}function oe(t,u){if(t&1){let e=k();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"p"),p(6),s(7,"translate"),o(),n(8,"input",22),b("change",function(a){C(e);let Y=m();return x(Y.handleRestoreFileInput(a.target.files))}),o(),n(9,"div",23)(10,"button",24),b("click",function(){C(e);let a=m();return x(a.onClickCancelRestore())}),p(11),s(12,"translate"),o(),n(13,"button",25),b("click",function(){C(e);let a=m();return x(a.onRestoreBackupClick())}),_(14,ie,4,3,"span"),_(15,ne,2,3),o()()()}if(t&2){let e=m();i(3),c(l(4,7,"form.button_restore")),i(3),c(l(7,9,"backup.restore_help_one")),i(4),h("disabled",e.restoreUploading),i(),w(" ",l(12,11,"form.button_cancel")," "),i(2),h("disabled",e.restoreUploading||!e.selectedFile),i(),f(e.restoreUploading?14:-1),i(),f(e.restoreUploading?-1:15)}}function re(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"h1"),d(6,"i",26),o()()),t&2&&(i(3),c(l(4,1,"restart.title_restart")))}function ae(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",27),p(3),s(4,"translate"),o(),n(5,"p",28),p(6),s(7,"translate"),o(),n(8,"a",29),p(9),s(10,"translate"),o()()),t&2&&(i(3),c(l(4,3,"setup_wizard_message_complete_title")),i(3),c(l(7,5,"setup_wizard_message_complete_message")),i(3),c(l(10,7,"setup.open_dashboard")))}var Se=(()=>{class t{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(M);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new z("",[v.required]),password:new z("",[v.compose([v.required,v.minLength(4)])]),passwordConfirm:new z("",[v.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,a=e.get("passwordConfirm").value;if(r!==a)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>y(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return y(this,null,function*(){try{let e=yield S(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(T.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield S(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return y(this,null,function*(){this.step="restarting",window.localStorage.removeItem(T.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>y(this,null,function*(){try{yield S(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=E({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"md-form","input-group","mb-4"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control",3,"change"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,a){r&1&&(n(0,"div",0)(1,"div",1),_(2,ee,12,9,"div",2),_(3,te,30,38,"div",2),_(4,oe,16,13,"div",2),_(5,re,7,3,"div",2),_(6,ae,11,9,"div",2),o()()),r&2&&(i(2),f(a.step==="welcome"?2:-1),i(),f(a.step==="create-account"?3:-1),i(),f(a.step==="restore-backup"?4:-1),i(),f(a.step==="restarting"?5:-1),i(),f(a.step==="setup-complete"?6:-1))},dependencies:[D,R,B,P,V,G,W,N,I,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();export{Se as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as J}from"./chunk-YHABGXDF.js";import{e as O,l as W,r as z,s as q,t as G,y as H}from"./chunk-JOBKDXBH.js";import{d as Y}from"./chunk-QR7L4UUP.js";import{h as X,k as Z}from"./chunk-
|
|
1
|
+
import{m as J}from"./chunk-YHABGXDF.js";import{e as O,l as W,r as z,s as q,t as G,y as H}from"./chunk-JOBKDXBH.js";import{d as Y}from"./chunk-QR7L4UUP.js";import{h as X,k as Z}from"./chunk-4WTLH2XC.js";import{a as K,b as Q}from"./chunk-DJKI5XBW.js";import{$a as s,Ac as m,Bc as p,Gb as A,Hb as _,Ib as u,Kb as $,Lb as k,Mb as E,Nb as C,Ob as o,Pb as a,Qb as w,Ub as B,Xb as b,Yb as d,a as T,b as D,bd as j,h as R,jc as c,kc as g,la as y,lb as M,lc as h,mc as V,qc as F,ra as v,rc as U,sa as f,sc as L,w as S,xc as N,yc as P}from"./chunk-U4V4ICSI.js";var te=(t,l)=>({"btn-danger":t,"btn-elegant":l}),ie=(t,l,e)=>({"fa-trash":t,"fa-undo":l,"fa-spinner fa-pulse":e});function ne(t,l){t&1&&(o(0,"div",12),w(1,"i",13),a(),o(2,"p",14),c(3),m(4,"translate"),a()),t&2&&(s(3),g(p(4,1,"reset.no_accessories")))}function se(t,l){if(t&1&&(o(0,"option",24),c(1),a()),t&2){let e=l.$implicit;C("value",e._id),s(),V("",e.name," (",e._username,")")}}function oe(t,l){if(t&1){let e=B();o(0,"li",20),c(1),m(2,"translate"),a(),o(3,"li",18)(4,"label",21),c(5),m(6,"translate"),a(),o(7,"div",22)(8,"select",23),L("ngModelChange",function(i){v(e);let r=d(2);return U(r.selectedBridge,i)||(r.selectedBridge=i),f(i)}),b("change",function(i){v(e);let r=d(2);return f(r.onBridgeChange(i.target.value))}),k(9,se,2,3,"option",24,$),a()()()}if(t&2){let e=d(2);s(),g(p(2,3,"form.label.changes_kept")),s(4),g(p(6,5,"reset.accessory_ind.bridge")),s(3),F("ngModel",e.selectedBridge),s(),E(e.pairings)}}function ae(t,l){if(t&1&&(o(0,"li",18)(1,"label",25),c(2),m(3,"translate"),a(),o(4,"div",26),c(5),a()()),t&2){let e=d(2);s(2),g(p(3,2,"reset.accessory_ind.bridge")),s(3),h(" ",e.getCurrentlySelectedBridge()," ")}}function re(t,l){if(t&1){let e=B();o(0,"li",19)(1,"span"),c(2),w(3,"br"),o(4,"small")(5,"span",27),c(6),a()()(),o(7,"button",28),m(8,"translate"),b("click",function(){let i=v(e).$implicit,r=d(2);return f(r.toggleList(i.UUID,i.$cacheFile))}),w(9,"i",29),a()()}if(t&2){let e=l.$implicit,n=d(2);s(2),h(" ",e.displayName),s(4),g(e.UUID),s(),C("disabled",n.clicked)("ngClass",N(8,te,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile))),A("aria-label",p(8,6,"form.button_delete")),s(2),C("ngClass",P(11,ie,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile)&&!n.clicked,n.isInList(e.UUID,e.$cacheFile)&&n.clicked))}}function le(t,l){if(t&1&&(o(0,"div",12),w(1,"i",15),a(),o(2,"ul",16)(3,"li"),c(4),m(5,"translate"),a(),o(6,"li"),c(7),m(8,"translate"),a(),o(9,"li"),c(10),m(11,"translate"),a()(),o(12,"ul",17),_(13,oe,11,7),_(14,ae,6,4,"li",18),k(15,re,10,15,"li",19,$),a()),t&2){let e=d();s(4),g(p(5,5,"reset.accessory_ind.list_1")),s(3),g(p(8,7,"reset.accessory_ind.list_2")),s(3),g(p(11,9,"reset.accessory_ind.list_3")),s(3),u(e.pairings.length>1?13:-1),s(),u(e.pairings.length===1?14:-1),s(),E(e.selectedBridgeAccessories)}}function ce(t,l){if(t&1){let e=B();o(0,"button",30),b("click",function(){v(e);let i=d();return f(i.$activeModal.dismiss("Dismiss"))}),c(1),m(2,"translate"),a()}if(t&2){let e=d();C("disabled",e.clicked),s(),h(" ",p(2,2,"form.button_close")," ")}}function de(t,l){if(t&1){let e=B();o(0,"button",31),b("click",function(){v(e);let i=d();return f(i.$activeModal.dismiss("Dismiss"))}),c(1),m(2,"translate"),a()}t&2&&(s(),h(" ",p(2,1,"form.button_close")," "))}function me(t,l){if(t&1&&c(0),t&2){let e=d(3);h(" (",e.toDelete.length,") ")}}function pe(t,l){if(t&1&&(c(0),m(1,"translate"),_(2,me,1,1)),t&2){let e=d(2);h(" ",p(1,2,"form.button_remove")," "),s(2),u(e.toDelete.length>0?2:-1)}}function _e(t,l){t&1&&w(0,"i",33)}function ue(t,l){if(t&1){let e=B();o(0,"button",32),b("click",function(){v(e);let i=d();return f(i.removeAccessories())}),_(1,pe,3,4),_(2,_e,1,0,"i",33),a()}if(t&2){let e=d();C("disabled",!e.toDelete.length||e.clicked),s(),u(e.clicked?-1:1),s(),u(e.clicked?2:-1)}}var $e=(()=>{class t{$activeModal=y(J);$api=y(Z);$router=y(Y);$toastr=y(X);$translate=y(K);pairings=[];selectedBridge="";clicked=!1;selectedBridgeAccessories=[];accessoriesExist=!1;toDelete=[];constructor(){}ngOnInit(){this.loadCachedAccessories()}loadCachedAccessories(){return R(this,null,function*(){try{let[e,n]=yield Promise.all([S(this.$api.get("/server/cached-accessories")),S(this.$api.get("/server/pairings"))]),i=new Map(n.map(r=>[r._id,D(T({},r),{accessories:[]})]));e.sort((r,x)=>r.displayName.localeCompare(x.displayName)).forEach(r=>{let x=n.find(ee=>ee._main),I=r.$cacheFile?.split(".")?.[1]||x._id;(!this.selectedBridge||this.selectedBridge===I)&&(i.has(I)||i.set(I,{_id:I,_username:I.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),i.get(I).accessories.push(r))}),this.pairings=Array.from(i.values()).filter(r=>r.accessories.length>0).sort((r,x)=>r._main&&!x._main?-1:!r._main&&x._main?1:r.name.localeCompare(x.name)),this.selectedBridge=this.selectedBridge||this.pairings[0]?._id,this.selectedBridge&&(this.accessoriesExist=!0,this.selectedBridgeAccessories=this.pairings[0].accessories)}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}onBridgeChange(e){this.selectedBridge=e,this.selectedBridgeAccessories=this.pairings.find(n=>n._id===this.selectedBridge)?.accessories}getCurrentlySelectedBridge(){let e=this.pairings.find(n=>n._id===this.selectedBridge);return`${e.name} - ${e._username}`}toggleList(e,n){this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)?this.toDelete=this.toDelete.filter(i=>i.uuid!==e||i.cacheFile!==n):this.toDelete.push({cacheFile:n,uuid:e})}isInList(e,n){return this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)}removeAccessories(){return this.clicked=!0,this.$api.delete("/server/cached-accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],inputs:{selectedBridge:"selectedBridge"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-fw","fa-network-wired","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas","fa-fw",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),c(3),m(4,"translate"),a(),o(5,"button",3),m(6,"translate"),b("click",function(){return i.$activeModal.dismiss("Dismiss")}),a()(),o(7,"div",4),_(8,ne,5,3),_(9,le,17,11),a(),o(10,"div",5)(11,"div",6),_(12,ce,3,4,"button",7),a(),o(13,"div",8),_(14,de,3,3,"button",9),a(),o(15,"div",10),_(16,ue,3,3,"button",11),a()()()),n&2&&(s(3),g(p(4,8,"reset.accessory_ind.title")),s(2),C("disabled",i.clicked),A("aria-label",p(6,10,"form.button_close")),s(3),u(i.accessoriesExist?-1:8),s(),u(i.accessoriesExist?9:-1),s(3),u(i.accessoriesExist?12:-1),s(2),u(i.accessoriesExist?-1:14),s(2),u(i.accessoriesExist?16:-1))},dependencies:[j,Q,H,q,G,z,O,W],encapsulation:2})}return t})();export{$e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as i}from"./chunk-QR7L4UUP.js";import"./chunk-ASBFWS7L.js";import{ha as t,kd as l,mb as e}from"./chunk-U4V4ICSI.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-
|
|
1
|
+
import{g as i}from"./chunk-QR7L4UUP.js";import"./chunk-ASBFWS7L.js";import{ha as t,kd as l,mb as e}from"./chunk-U4V4ICSI.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-OCZ2H4UT.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-752FLZDX.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-ECZONFVO.js").then(o=>o.TerminalModule)}],n=(()=>{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 s=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l,n]})}return o})();export{s as PlatformToolsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i}from"./chunk-QR7L4UUP.js";import{c as s}from"./chunk-
|
|
1
|
+
import{d as i}from"./chunk-QR7L4UUP.js";import{c as s}from"./chunk-UOC65WET.js";import{h as o}from"./chunk-4WTLH2XC.js";import{a}from"./chunk-DJKI5XBW.js";import{ga as e,la as r}from"./chunk-U4V4ICSI.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);constructor(){}canActivate(){return this.$auth.user&&this.$auth.user.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),this.$router.navigate(["/"]),!1)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-TCKHBFBN.js";import"./chunk-M6OQT53Y.js";import"./chunk-JMCN2SQV.js";import"./chunk-YXEV6KOV.js";import"./chunk-YHABGXDF.js";import"./chunk-JOBKDXBH.js";import"./chunk-G6GTWDKY.js";import"./chunk-QR7L4UUP.js";import"./chunk-UOC65WET.js";import"./chunk-OT3IJBCR.js";import"./chunk-4WTLH2XC.js";import"./chunk-ASBFWS7L.js";import"./chunk-DJKI5XBW.js";import"./chunk-U4V4ICSI.js";export{a as SetupWizardComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-IEOEU3PV.js";import"./chunk-G6GTWDKY.js";import"./chunk-QR7L4UUP.js";import"./chunk-UOC65WET.js";import"./chunk-OT3IJBCR.js";import"./chunk-4WTLH2XC.js";import"./chunk-ASBFWS7L.js";import"./chunk-DJKI5XBW.js";import"./chunk-U4V4ICSI.js";export{a as RestartLinuxComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _,b as D}from"./chunk-
|
|
1
|
+
import{a as _,b as D}from"./chunk-OT3IJBCR.js";import{j as c,k as S}from"./chunk-4WTLH2XC.js";import{f as x}from"./chunk-ASBFWS7L.js";import{C as v,g as O,ga as h,h as a,ha as E,ja as y,ka as l,la as f,mb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-U4V4ICSI.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as w,k as S}from"./chunk-
|
|
1
|
+
import{h as w,k as S}from"./chunk-4WTLH2XC.js";import{a as _,b as h}from"./chunk-DJKI5XBW.js";import{$a as e,Ac as s,Bc as m,Hb as d,Ib as c,Ob as n,Pb as i,Qb as u,Yb as v,jc as o,kc as a,la as p,lb as f}from"./chunk-U4V4ICSI.js";function y(t,C){t&1&&(n(0,"p",7),o(1),s(2,"translate"),i()),t&2&&(e(),a(m(2,1,"platform.linux.server_will_power_down")))}function g(t,C){if(t&1&&(n(0,"div",8),o(1),i()),t&2){let r=v();e(),a(r.error)}}var B=(()=>{class t{$api=p(S);$toastr=p(w);$translate=p(_);error=!1;constructor(){}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(l){return new(l||t)};static \u0275cmp=f({type:t,selectors:[["ng-component"]],decls:13,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,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"]],template:function(l,x){l&1&&(n(0,"div",0)(1,"h3",1),o(2),s(3,"translate"),i()(),n(4,"div",2)(5,"div",3),u(6,"i",4),i(),n(7,"div",5)(8,"h4",6),o(9),s(10,"translate"),i(),d(11,y,3,3,"p",7),d(12,g,2,1,"div",8),i()()),l&2&&(e(2),a(m(3,4,"menu.restart.title")),e(7),a(m(10,6,"platform.linux.shutting_down_server")),e(2),c(x.error?-1:11),e(),c(x.error?12:-1))},dependencies:[h],encapsulation:2})}return t})();export{B as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,b as u}from"./chunk-
|
|
1
|
+
import{a as f,b as u}from"./chunk-DJ7A6WCT.js";import{a as d}from"./chunk-YZMZPZB3.js";import{c as p}from"./chunk-Q5DVL6Z6.js";import"./chunk-TJHYTY4K.js";import"./chunk-3VIG5M5R.js";import"./chunk-XZR7OZ6I.js";import{q as n}from"./chunk-YHABGXDF.js";import{y as s}from"./chunk-JOBKDXBH.js";import"./chunk-G6GTWDKY.js";import{g as i}from"./chunk-QR7L4UUP.js";import"./chunk-UOC65WET.js";import"./chunk-OT3IJBCR.js";import"./chunk-4WTLH2XC.js";import"./chunk-ASBFWS7L.js";import{c}from"./chunk-DJKI5XBW.js";import{ha as r,kd as m,mb as e}from"./chunk-U4V4ICSI.js";var C=[{path:"",loadComponent:()=>import("./chunk-5T7JAJJE.js").then(o=>o.AccessoriesComponent)}],l=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[i.forChild(C),i]})}return o})();var S=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[m,s,n,p,c.forChild(),d,l,u,f]})}return o})();export{S as AccessoriesModule};
|