homebridge-config-ui-x 5.0.0-beta.88 → 5.0.0-beta.89
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 -2
- package/package.json +2 -2
- package/public/{chunk-MUCE3524.js → chunk-2DDS5K24.js} +1 -1
- package/public/{chunk-2ZIVRYEW.js → chunk-2PP6E46M.js} +1 -1
- package/public/{chunk-SD6WI76W.js → chunk-3OLHI4ZG.js} +1 -1
- package/public/{chunk-XPQ27PA2.js → chunk-433T3XRK.js} +1 -1
- package/public/{chunk-OYBAO5D4.js → chunk-5BVWCIG2.js} +1 -1
- package/public/chunk-5FAVAVOU.js +1 -0
- package/public/{chunk-FU7E6OMM.js → chunk-6NFDNZBK.js} +1 -1
- package/public/{chunk-3GG5OHAL.js → chunk-6VFBACGI.js} +1 -1
- package/public/{chunk-2P72Z5GQ.js → chunk-7OL746BT.js} +1 -1
- package/public/{chunk-LFQTC3JD.js → chunk-7TEXX453.js} +1 -1
- package/public/{chunk-H3IOZMDH.js → chunk-A4USEWAM.js} +1 -1
- package/public/chunk-A7R7JE7J.js +1 -0
- package/public/{chunk-XOPP6Y6C.js → chunk-AK6OSKBC.js} +1 -1
- package/public/{chunk-MHXMQUVU.js → chunk-BFON6KG3.js} +1 -1
- package/public/{chunk-ALZ2VKRE.js → chunk-BPERFY2X.js} +1 -1
- package/public/chunk-BQD6ZT3W.js +1 -0
- package/public/{chunk-Z346FY4Q.js → chunk-DG3V7I4H.js} +1 -1
- package/public/{chunk-2OEG7XPN.js → chunk-E72U4F5S.js} +1 -1
- package/public/{chunk-F5PFK5KP.js → chunk-E7K55IJG.js} +1 -1
- package/public/chunk-EGW7H6AL.js +1 -0
- package/public/{chunk-JDC75DEA.js → chunk-F6AZVQGU.js} +1 -1
- package/public/{chunk-VZLOSGS7.js → chunk-FBCVUHRU.js} +1 -1
- package/public/chunk-FRHX6ZFS.js +1 -0
- package/public/{chunk-3VB3AW6E.js → chunk-G75PSCHK.js} +1 -1
- package/public/{chunk-JYNDHHKS.js → chunk-G7HHAO4N.js} +1 -1
- package/public/chunk-GHRC34HV.js +1 -0
- package/public/{chunk-JEVUBVIW.js → chunk-GOOVJ7WG.js} +1 -1
- package/public/{chunk-WIFIII43.js → chunk-IISDYYR7.js} +1 -1
- package/public/{chunk-LA4JXO55.js → chunk-ISOKJULM.js} +1 -1
- package/public/chunk-JNYLGD6A.js +1 -0
- package/public/{chunk-2GY53VDW.js → chunk-JQNJUCCC.js} +1 -1
- package/public/{chunk-DAWRVRMV.js → chunk-KITQC5TK.js} +1 -1
- package/public/{chunk-TNXCVVXQ.js → chunk-MDR5IHDC.js} +1 -1
- package/public/{chunk-7XITHR3W.js → chunk-ML4NBLLV.js} +1 -1
- package/public/chunk-MMMJKCXE.js +1 -0
- package/public/{chunk-CU4KLIWT.js → chunk-N4VYMHB2.js} +1 -1
- package/public/{chunk-WBVWEXDQ.js → chunk-NHJ5MWTG.js} +1 -1
- package/public/{chunk-D76SU6HH.js → chunk-NWDJUVJU.js} +1 -1
- package/public/{chunk-SF3KWWNT.js → chunk-NY6W3XR5.js} +1 -1
- package/public/{chunk-RPCPH2GJ.js → chunk-PWIUQQUG.js} +1 -1
- package/public/chunk-Q7SELV6D.js +1 -0
- package/public/{chunk-LVFP22MJ.js → chunk-QVP36XPX.js} +1 -1
- package/public/{chunk-EMZ4I5EZ.js → chunk-ROS3G3S5.js} +1 -1
- package/public/chunk-SMOXDAUR.js +1 -0
- package/public/{chunk-FUYZJ5A5.js → chunk-TAELONSP.js} +1 -1
- package/public/{chunk-4MSR3JUA.js → chunk-TCQOEK55.js} +1 -1
- package/public/{chunk-RDRJSNDD.js → chunk-UKFO673K.js} +1 -1
- package/public/{chunk-FZC446UQ.js → chunk-UVZQOJFV.js} +1 -1
- package/public/chunk-VX44EUY4.js +1 -0
- package/public/{chunk-VSJQXCHH.js → chunk-X5H7WG4D.js} +1 -1
- package/public/{chunk-L3HYMYAM.js → chunk-XR6435L7.js} +1 -1
- package/public/chunk-XSRZZIQT.js +1 -0
- package/public/{chunk-ZC52B47N.js → chunk-XZB3EGU2.js} +1 -1
- package/public/{chunk-A2PQ3T4C.js → chunk-Y6FL44WB.js} +1 -1
- package/public/{chunk-LBFWQVUA.js → chunk-Z5HLQZS5.js} +1 -1
- package/public/{chunk-QUJJHTI7.js → chunk-Z7YI66JY.js} +1 -1
- package/public/{chunk-4T6QUAUK.js → chunk-ZPJOZVCQ.js} +1 -1
- package/public/chunk-ZQVKXHUS.js +1 -0
- package/public/index.html +1 -1
- package/public/{main-NZVCJ2LY.js → main-SCNMP36C.js} +1 -1
- package/public/chunk-4JO4BZXN.js +0 -1
- package/public/chunk-6EJDUITC.js +0 -1
- package/public/chunk-6GW5TYOW.js +0 -1
- package/public/chunk-DI37RMF4.js +0 -1
- package/public/chunk-JZUATNVB.js +0 -1
- package/public/chunk-KHXSLNEQ.js +0 -1
- package/public/chunk-LHQPGOZD.js +0 -1
- package/public/chunk-R35MAK5U.js +0 -1
- package/public/chunk-TPZQI2CE.js +0 -1
- package/public/chunk-TRRQFGWG.js +0 -1
- package/public/chunk-URU3ZBPS.js +0 -1
- package/public/chunk-UVG5GEHI.js +0 -1
- package/public/chunk-WEAJZSV4.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as pu,b as eb}from"./chunk-SHW4IV7S.js";import{a as A1}from"./chunk-XJY7A24W.js";import{a as en,b as tn}from"./chunk-TIE2WSHM.js";import{a as T1}from"./chunk-6SEBWKRM.js";import{a as j1,b as of}from"./chunk-LA4JXO55.js";import{a as O1,b as M1}from"./chunk-DSBAEBB7.js";import{a as P1}from"./chunk-ZCCLGLMW.js";import{a as Yr}from"./chunk-HHPGR3HF.js";import{a as $1}from"./chunk-6M524CF7.js";import{a as Ur,b as Wr,c as Gr,d as Kr,e as Jr,f as Xr,g as du,m as ve,n as it,o as Qi}from"./chunk-OHFVMRCL.js";import{A as ss,a as y1,b as Ji,c as Xi,e as vt,f as v1,h as B1,i as x1,k as w1,l as Zu,m as S1,o as Yi,r as Zi,s as Bi,t as xi,y as I1,z as tu}from"./chunk-MMYB2ZMV.js";import{d as cu}from"./chunk-QY7HUYL5.js";import{a as ei}from"./chunk-2OEG7XPN.js";import{a as k1}from"./chunk-JYNDHHKS.js";import{b as ze}from"./chunk-7XITHR3W.js";import{h as _e,j as Qu,k as he}from"./chunk-6GW5TYOW.js";import{e as _1}from"./chunk-R3JWGCC5.js";import{a as Ee,b as Be}from"./chunk-KPKQNEWS.js";import{$a as l,Ac as y,Bc as B,Ca as Uu,Cc as je,D as r1,Da as D1,Fa as Wu,Gb as K,Hb as x,Ib as w,Jc as gt,Kb as nt,Kc as U,Lb as ft,Lc as Yu,M as Vr,Mb as rt,Nb as b,Nc as g1,Ob as c,Pb as p,Qb as S,Rb as p1,Sb as m1,Ub as H,Xa as de,Xb as O,Yb as h,Z as fs,_a as l1,a as X,aa as rf,ac as rs,b as Se,bc as os,bd as zt,cc as as,cd as vi,dc as Gu,dd as bt,e as F,eb as Lr,ec as Ku,fa as o1,fb as vu,g as Le,ga as Ot,gc as Qt,gd as b1,h as G,ha as Wi,hb as yi,hc as Ju,ic as Z,ja as a1,jc as E,k as u1,ka as s1,kc as L,kd as Hr,la as I,lb as Y,lc as q,mb as Gi,mc as xu,n as Pt,nb as Bu,nc as F1,o as ns,ob as d1,q as i1,qc as Pe,ra as j,rb as ce,rc as Oe,sa as N,sc as Me,sd as E1,tb as c1,tc as C1,ub as zr,uc as h1,v as n1,vc as ke,w as ae,wc as eu,x as f1,xc as Xu,yc as wu,za as Rr,zc as Ki}from"./chunk-QSPBB6EE.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 wi=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=wi;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 wi&&(t[i.str]=(t[i.str]||0)+1),t),{})}};be._Code=Ht;be.nil=new Ht("");function N1(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._=N1;var Ds=new Ht("+");function q1(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 ub(t),new Ht(t)}be.str=q1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof wi?e.push(u):e.push(fb(u))}be.addCodeArg=ls;function ub(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=ib(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function ib(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof wi||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 wi))return`"${e}${u.slice(1)}`}function nb(e,u){return u.emptyStr()?e:e.emptyStr()?u:q1`${e}${u}`}be.strConcat=nb;function fb(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sf(Array.isArray(e)?e.join(","):e)}function rb(e){return new Ht(sf(e))}be.stringify=rb;function sf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=sf;function ob(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Ht(`.${e}`):N1`[${e}]`}be.getProperty=ob;function ab(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=ab;function sb(e){return new Ht(e.toString())}be.regexpCode=sb});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}},Zr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Zr||(xt.UsedValueState=Zr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Qr=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=Qr;var eo=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=eo;var Db=(0,Bt._)`\n`,cs=class extends Qr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Se(X({},u),{_n:u.lines?Db:Bt.nil})}get(){return this._scope}name(u){return new eo(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,Zr.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,Zr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.or=se.and=se.not=se.CodeGen=se.operators=se.varKinds=se.ValueScopeName=se.ValueScope=se.Scope=se.Name=se.regexpCode=se.stringify=se.getProperty=se.nil=se.strConcat=se.str=se._=void 0;var Fe=Df(),uu=ps(),ti=Df();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return ti._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return ti.str}});Object.defineProperty(se,"strConcat",{enumerable:!0,get:function(){return ti.strConcat}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return ti.nil}});Object.defineProperty(se,"getProperty",{enumerable:!0,get:function(){return ti.getProperty}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return ti.stringify}});Object.defineProperty(se,"regexpCode",{enumerable:!0,get:function(){return ti.regexpCode}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return ti.Name}});var fo=ps();Object.defineProperty(se,"Scope",{enumerable:!0,get:function(){return fo.Scope}});Object.defineProperty(se,"ValueScope",{enumerable:!0,get:function(){return fo.ValueScope}});Object.defineProperty(se,"ValueScopeName",{enumerable:!0,get:function(){return fo.ValueScopeName}});Object.defineProperty(se,"varKinds",{enumerable:!0,get:function(){return fo.varKinds}});se.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 Su=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends Su{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?uu.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:{}}},uo=class extends Su{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 no(u,this.rhs)}},Fs=class extends uo{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 Su{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends Su{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends Su{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},bs=class extends Su{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 Su{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)||(lb(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>Si(u,t.names),{})}},Iu=class extends lf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Es=class extends lf{},_s=(()=>{class e extends Iu{}return e.kind="else",e})(),to=(()=>{class e extends Iu{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(H1(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 no(t,this.condition),this.else&&Si(t,this.else.names),t}}return e.kind="if",e})(),ro=(()=>{class e extends Iu{}return e.kind="for",e})(),ys=class extends ro{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 Si(super.names,this.iteration.names)}},vs=class extends ro{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?uu.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=no(super.names,this.from);return no(u,this.to)}},io=class extends ro{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 Si(super.names,this.iterable.names)}},V1=(()=>{class e extends Iu{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})(),R1=(()=>{class e extends lf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Iu{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&&Si(u,this.catch.names),this.finally&&Si(u,this.finally.names),u}},L1=(()=>{class e extends Iu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),z1=(()=>{class e extends Iu{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 pu,b as eb}from"./chunk-SHW4IV7S.js";import{a as A1}from"./chunk-XJY7A24W.js";import{a as en,b as tn}from"./chunk-TIE2WSHM.js";import{a as T1}from"./chunk-6SEBWKRM.js";import{a as j1,b as of}from"./chunk-ISOKJULM.js";import{a as O1,b as M1}from"./chunk-DSBAEBB7.js";import{a as P1}from"./chunk-ZCCLGLMW.js";import{a as Yr}from"./chunk-HHPGR3HF.js";import{a as $1}from"./chunk-6M524CF7.js";import{a as Ur,b as Wr,c as Gr,d as Kr,e as Jr,f as Xr,g as du,m as ve,n as it,o as Qi}from"./chunk-OHFVMRCL.js";import{A as ss,a as y1,b as Ji,c as Xi,e as vt,f as v1,h as B1,i as x1,k as w1,l as Zu,m as S1,o as Yi,r as Zi,s as Bi,t as xi,y as I1,z as tu}from"./chunk-MMYB2ZMV.js";import{d as cu}from"./chunk-QY7HUYL5.js";import{a as ei}from"./chunk-E72U4F5S.js";import{a as k1}from"./chunk-G7HHAO4N.js";import{b as ze}from"./chunk-ML4NBLLV.js";import{h as _e,j as Qu,k as he}from"./chunk-MMMJKCXE.js";import{e as _1}from"./chunk-R3JWGCC5.js";import{a as Ee,b as Be}from"./chunk-KPKQNEWS.js";import{$a as l,Ac as y,Bc as B,Ca as Uu,Cc as je,D as r1,Da as D1,Fa as Wu,Gb as K,Hb as x,Ib as w,Jc as gt,Kb as nt,Kc as U,Lb as ft,Lc as Yu,M as Vr,Mb as rt,Nb as b,Nc as g1,Ob as c,Pb as p,Qb as S,Rb as p1,Sb as m1,Ub as H,Xa as de,Xb as O,Yb as h,Z as fs,_a as l1,a as X,aa as rf,ac as rs,b as Se,bc as os,bd as zt,cc as as,cd as vi,dc as Gu,dd as bt,e as F,eb as Lr,ec as Ku,fa as o1,fb as vu,g as Le,ga as Ot,gc as Qt,gd as b1,h as G,ha as Wi,hb as yi,hc as Ju,ic as Z,ja as a1,jc as E,k as u1,ka as s1,kc as L,kd as Hr,la as I,lb as Y,lc as q,mb as Gi,mc as xu,n as Pt,nb as Bu,nc as F1,o as ns,ob as d1,q as i1,qc as Pe,ra as j,rb as ce,rc as Oe,sa as N,sc as Me,sd as E1,tb as c1,tc as C1,ub as zr,uc as h1,v as n1,vc as ke,w as ae,wc as eu,x as f1,xc as Xu,yc as wu,za as Rr,zc as Ki}from"./chunk-QSPBB6EE.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 wi=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=wi;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 wi&&(t[i.str]=(t[i.str]||0)+1),t),{})}};be._Code=Ht;be.nil=new Ht("");function N1(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._=N1;var Ds=new Ht("+");function q1(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 ub(t),new Ht(t)}be.str=q1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof wi?e.push(u):e.push(fb(u))}be.addCodeArg=ls;function ub(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=ib(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function ib(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof wi||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 wi))return`"${e}${u.slice(1)}`}function nb(e,u){return u.emptyStr()?e:e.emptyStr()?u:q1`${e}${u}`}be.strConcat=nb;function fb(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sf(Array.isArray(e)?e.join(","):e)}function rb(e){return new Ht(sf(e))}be.stringify=rb;function sf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=sf;function ob(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Ht(`.${e}`):N1`[${e}]`}be.getProperty=ob;function ab(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=ab;function sb(e){return new Ht(e.toString())}be.regexpCode=sb});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}},Zr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Zr||(xt.UsedValueState=Zr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Qr=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=Qr;var eo=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=eo;var Db=(0,Bt._)`\n`,cs=class extends Qr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Se(X({},u),{_n:u.lines?Db:Bt.nil})}get(){return this._scope}name(u){return new eo(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,Zr.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,Zr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.or=se.and=se.not=se.CodeGen=se.operators=se.varKinds=se.ValueScopeName=se.ValueScope=se.Scope=se.Name=se.regexpCode=se.stringify=se.getProperty=se.nil=se.strConcat=se.str=se._=void 0;var Fe=Df(),uu=ps(),ti=Df();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return ti._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return ti.str}});Object.defineProperty(se,"strConcat",{enumerable:!0,get:function(){return ti.strConcat}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return ti.nil}});Object.defineProperty(se,"getProperty",{enumerable:!0,get:function(){return ti.getProperty}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return ti.stringify}});Object.defineProperty(se,"regexpCode",{enumerable:!0,get:function(){return ti.regexpCode}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return ti.Name}});var fo=ps();Object.defineProperty(se,"Scope",{enumerable:!0,get:function(){return fo.Scope}});Object.defineProperty(se,"ValueScope",{enumerable:!0,get:function(){return fo.ValueScope}});Object.defineProperty(se,"ValueScopeName",{enumerable:!0,get:function(){return fo.ValueScopeName}});Object.defineProperty(se,"varKinds",{enumerable:!0,get:function(){return fo.varKinds}});se.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 Su=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends Su{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?uu.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:{}}},uo=class extends Su{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 no(u,this.rhs)}},Fs=class extends uo{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 Su{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends Su{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends Su{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},bs=class extends Su{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 Su{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)||(lb(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>Si(u,t.names),{})}},Iu=class extends lf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Es=class extends lf{},_s=(()=>{class e extends Iu{}return e.kind="else",e})(),to=(()=>{class e extends Iu{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(H1(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 no(t,this.condition),this.else&&Si(t,this.else.names),t}}return e.kind="if",e})(),ro=(()=>{class e extends Iu{}return e.kind="for",e})(),ys=class extends ro{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 Si(super.names,this.iteration.names)}},vs=class extends ro{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?uu.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=no(super.names,this.from);return no(u,this.to)}},io=class extends ro{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 Si(super.names,this.iterable.names)}},V1=(()=>{class e extends Iu{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})(),R1=(()=>{class e extends lf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Iu{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&&Si(u,this.catch.names),this.finally&&Si(u,this.finally.names),u}},L1=(()=>{class e extends Iu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),z1=(()=>{class e extends Iu{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 uu.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(uu.varKinds.const,u,t,i)}let(u,t,i){return this._def(uu.varKinds.let,u,t,i)}var(u,t,i){return this._def(uu.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new uo(u,t,i))}add(u,t){return this._leafNode(new Fs(u,se.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 to(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 to(u))}else(){return this._elseNode(new _s)}endIf(){return this._endBlockNode(to,_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?uu.varKinds.var:uu.varKinds.let){let r=this._scope.toName(u);return this._for(new vs(f,r,t,i),()=>n(r))}forOf(u,t,i,n=uu.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 io("of",n,f,t),()=>i(f))}forIn(u,t,i,n=this.opts.es5?uu.varKinds.var:uu.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 io("in",n,f,t),()=>i(f))}endFor(){return this._endBlockNode(ro)}label(u){return this._leafNode(new Cs(u))}break(u){return this._leafNode(new hs(u))}return(u){let t=new R1;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R1)}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 L1(f),t(f)}return i&&(this._currNode=n.finally=new z1,this.code(i)),this._endBlockNode(L1,z1)}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 V1(u,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(V1)}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 to))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}};se.CodeGen=xs;function Si(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function no(e,u){return u instanceof Fe._CodeOrName?Si(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 lb(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function H1(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Fe._)`!${ws(e)}`}se.not=H1;var db=U1(se.operators.AND);function cb(...e){return e.reduce(db)}se.and=cb;var pb=U1(se.operators.OR);function mb(...e){return e.reduce(pb)}se.or=mb;function U1(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(),Fb=Df();function Cb(e){let u={};for(let t of e)u[t]=!0;return u}De.toHash=Cb;function hb(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(K1(e,u),!J1(u,e.self.RULES.all))}De.alwaysValidSchema=hb;function K1(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]||Z1(e,`unknown keyword: "${f}"`)}De.checkUnknownRules=K1;function J1(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}De.schemaHasRules=J1;function gb(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=gb;function bb({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=bb;function Eb(e){return X1(decodeURIComponent(e))}De.unescapeFragment=Eb;function _b(e){return encodeURIComponent(Is(e))}De.escapeFragment=_b;function Is(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}De.escapeJsonPointer=Is;function X1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}De.unescapeJsonPointer=X1;function yb(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}De.eachItem=yb;function W1({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:W1({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:Y1}),items:W1({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 Y1(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=Y1;function As(e,u,t){Object.keys(t).forEach(i=>e.assign((0,Ie._)`${u}${(0,Ie.getProperty)(i)}`,!0))}De.setEvaluated=As;var G1={};function vb(e,u){return e.scopeValue("func",{ref:u,code:G1[u.code]||(G1[u.code]=new Fb._Code(u.code))})}De.useFunc=vb;var Ss=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ss||(De.Type=Ss={}));function Bb(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=Bb;function Z1(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=Z1});var Ut=F(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var lt=ee(),xb={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=xb});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(),oo=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 wb(e,u=dt.keywordError,t,i){let{it:n}=e,{gen:f,compositeRule:r,allErrors:o}=n,a=td(e,u,t);i??(r||o)?Q1(f,a):ed(n,(0,ge._)`[${a}]`)}dt.reportError=wb;function Sb(e,u=dt.keywordError,t){let{it:i}=e,{gen:n,compositeRule:f,allErrors:r}=i,o=td(e,u,t);Q1(n,o),f||r||ed(i,Et.default.vErrors)}dt.reportExtraError=Sb;function Ib(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=Ib;function Ab({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=Ab;function Q1(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 ed(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 Ii={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 td(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,ge._)`{}`:kb(e,u,t)}function kb(e,u,t={}){let{gen:i,it:n}=e,f=[$b(n,t),Tb(e,t)];return Pb(e,u,f),i.object(...f)}function $b({errorPath:e},{instancePath:u}){let t=u?(0,ge.str)`${e}${(0,oo.getErrorPath)(u,oo.Type.Str)}`:e;return[Et.default.instancePath,(0,ge.strConcat)(Et.default.instancePath,t)]}function Tb({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,oo.getErrorPath)(t,oo.Type.Str)}`),[Ii.schemaPath,n]}function Pb(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([Ii.keyword,n],[Ii.params,typeof u=="function"?u(e):u||(0,ge._)`{}`]),a.messages&&i.push([Ii.message,typeof t=="function"?t(e):t]),a.verbose&&i.push([Ii.schema,r],[Ii.parentSchema,(0,ge._)`${D}${d}`],[Et.default.data,f]),s&&i.push([Ii.propertyName,s])}});var id=F(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.boolOrEmptySchema=fn.topBoolOrEmptySchema=void 0;var Ob=df(),Mb=ee(),jb=Ut(),Nb={message:"boolean schema is false"};function qb(e){let{gen:u,schema:t,validateName:i}=e;t===!1?ud(e,!1):typeof t=="object"&&t.$async===!0?u.return(jb.default.data):(u.assign((0,Mb._)`${i}.errors`,null),u.return(!0))}fn.topBoolOrEmptySchema=qb;function Vb(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),ud(e)):t.var(u,!0)}fn.boolOrEmptySchema=Vb;function ud(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,Ob.reportError)(n,Nb,void 0,u)}});var $s=F(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.getRules=rn.isJSONType=void 0;var Rb=["string","number","integer","boolean","null","object","array"],Lb=new Set(Rb);function zb(e){return typeof e=="string"&&Lb.has(e)}rn.isJSONType=zb;function Hb(){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=Hb});var Ts=F(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.shouldUseRule=ui.shouldUseGroup=ui.schemaHasRulesForType=void 0;function Ub({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&nd(e,i)}ui.schemaHasRulesForType=Ub;function nd(e,u){return u.rules.some(t=>fd(e,t))}ui.shouldUseGroup=nd;function fd(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))}ui.shouldUseRule=fd});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 Wb=$s(),Gb=Ts(),Kb=df(),re=ee(),rd=le(),on=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(on||(ct.DataType=on={}));function Jb(e){let u=od(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=Jb;function od(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(Wb.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}ct.getJSONTypes=od;function Xb(e,u){let{gen:t,data:i,opts:n}=e,f=Yb(u,n.coerceTypes),r=u.length>0&&!(f.length===0&&u.length===1&&(0,Gb.schemaHasRulesForType)(e,u[0]));if(r){let o=Os(u,i,n.strictNumbers,on.Wrong);t.if(o,()=>{f.length?Zb(e,u,f):Ms(e)})}return r}ct.coerceAndCheckDataType=Xb;var ad=new Set(["string","number","integer","boolean","null"]);function Yb(e,u){return u?e.filter(t=>ad.has(t)||u==="array"&&t==="array"):[]}function Zb(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)(ad.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),Qb(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"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j}from"./chunk-
|
|
1
|
+
import{a as j}from"./chunk-3OLHI4ZG.js";import"./chunk-JRQEWFL4.js";import"./chunk-SHW4IV7S.js";import{c as M}from"./chunk-XJY7A24W.js";import"./chunk-6SEBWKRM.js";import{q as u}from"./chunk-OHFVMRCL.js";import{A as d,z as l}from"./chunk-MMYB2ZMV.js";import{d as h,g as a}from"./chunk-QY7HUYL5.js";import"./chunk-ML4NBLLV.js";import{h as v,k as y}from"./chunk-MMMJKCXE.js";import"./chunk-R3JWGCC5.js";import{a as g,c as C}from"./chunk-KPKQNEWS.js";import{ga as c,h as s,ha as i,kd as p,la as e,mb as n,w as f}from"./chunk-QSPBB6EE.js";var m=(()=>{class o{$api=e(y);$router=e(h);$toastr=e(v);$translate=e(g);constructor(){}resolve(){return s(this,null,function*(){try{let r=yield f(this.$api.get("/config-editor"));return JSON.stringify(r,null,4)}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=c({token:o,factory:o.\u0275fac})}return o})();var $=[{path:"",loadComponent:()=>import("./chunk-A4USEWAM.js").then(o=>o.ConfigEditorComponent),resolve:{config:m}}],R=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=n({type:o});static \u0275inj=i({imports:[a.forChild($),a]})}return o})();var Q=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=n({type:o});static \u0275inj=i({providers:[m],imports:[p,l,d,M,u,C.forChild(),R,j]})}return o})();export{Q as ConfigEditorModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-Z7YI66JY.js";import"./chunk-XJY7A24W.js";import"./chunk-6SEBWKRM.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-ML4NBLLV.js";import"./chunk-MMMJKCXE.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as StartupScriptComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-JQNJUCCC.js";import"./chunk-PWIUQQUG.js";import"./chunk-DSBAEBB7.js";import{g as i}from"./chunk-QY7HUYL5.js";import"./chunk-E72U4F5S.js";import"./chunk-G7HHAO4N.js";import"./chunk-ML4NBLLV.js";import"./chunk-MMMJKCXE.js";import"./chunk-R3JWGCC5.js";import{c as m}from"./chunk-KPKQNEWS.js";import{ha as t,kd as n,mb as r}from"./chunk-QSPBB6EE.js";var u=[{path:"",loadComponent:()=>import("./chunk-BQD6ZT3W.js").then(o=>o.TerminalComponent)}],a=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(u),i]})}return o})();var T=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,a,m.forChild()]})}return o})();export{T as TerminalModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _,b as D}from"./chunk-
|
|
1
|
+
import{a as _,b as D}from"./chunk-ML4NBLLV.js";import{j as c,k as S}from"./chunk-MMMJKCXE.js";import{f as x}from"./chunk-R3JWGCC5.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-QSPBB6EE.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as a}from"./chunk-TAELONSP.js";import"./chunk-NY6W3XR5.js";import"./chunk-F6AZVQGU.js";import"./chunk-SHW4IV7S.js";import"./chunk-XJY7A24W.js";import"./chunk-TIE2WSHM.js";import"./chunk-6SEBWKRM.js";import"./chunk-ISOKJULM.js";import"./chunk-DSBAEBB7.js";import"./chunk-ZCCLGLMW.js";import"./chunk-HHPGR3HF.js";import"./chunk-6M524CF7.js";import"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-E72U4F5S.js";import"./chunk-G7HHAO4N.js";import"./chunk-ML4NBLLV.js";import"./chunk-MMMJKCXE.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as SettingsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-6NFDNZBK.js";import"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-ML4NBLLV.js";import"./chunk-MMMJKCXE.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as PowerOptionsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as w}from"./chunk-QY7HUYL5.js";import{a as E}from"./chunk-
|
|
1
|
+
import{d as w}from"./chunk-QY7HUYL5.js";import{a as E}from"./chunk-E72U4F5S.js";import{b}from"./chunk-ML4NBLLV.js";import{h as k,k as S}from"./chunk-MMMJKCXE.js";import{a as $,b as T}from"./chunk-KPKQNEWS.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-QSPBB6EE.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as S,b as O,c as U}from"./chunk-DSBAEBB7.js";import{a as g}from"./chunk-
|
|
1
|
+
import{a as S,b as O,c as U}from"./chunk-DSBAEBB7.js";import{a as g}from"./chunk-E72U4F5S.js";import{M as w,e as x,g as h,ga as E,la as L,n as R}from"./chunk-QSPBB6EE.js";var F=x((v,b)=>{(function(a,l){typeof define=="function"&&define.amd?define([],l):typeof v<"u"?l():(l(),a.FileSaver={})})(v,function(){"use strict";function a(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function l(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){r(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function d(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,m=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),r=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,n){var i=s.URL||s.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?c(o):d(o.href)?l(e,t,n):c(o,o.target="_blank")):(o.href=i.createObjectURL(e),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){c(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(a(e,n),t);else if(d(e))l(e,t,n);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){c(i)})}}:function(e,t,n,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return l(e,t,n);var o=e.type==="application/octet-stream",z=/constructor/i.test(s.HTMLElement)||s.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||o&&z||m)&&typeof FileReader<"u"){var u=new FileReader;u.onloadend=function(){var f=u.result;f=y?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=f:location=f,i=null},u.readAsDataURL(e)}else{var A=s.URL||s.webkitURL,p=A.createObjectURL(e);i?i.location=p:location.href=p,i=null,setTimeout(function(){A.revokeObjectURL(p)},4e4)}});s.saveAs=r.saveAs=r,typeof b<"u"&&(b.exports=r)})});var k=h(S(),1),j=h(O(),1),T=h(U(),1);var W=(()=>{class a{$ws=L(g);term;io;fitAddon;webLinksAddon;resize;elementResize;pluginName;constructor(){}startTerminal(d,c={},s,m){this.pluginName=m,this.elementResize=s,this.io=this.$ws.connectToNamespace("log"),this.term=new k.Terminal(c),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new j.FitAddon,this.webLinksAddon=new T.WebLinksAddon,this.resize=new R,this.term.open(d.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
2
|
\r
|
|
3
3
|
\rWebsocket failed to connect. Is the server running?
|
|
4
4
|
\r
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as a}from"./chunk-ZPJOZVCQ.js";import"./chunk-PWIUQQUG.js";import"./chunk-BFON6KG3.js";import"./chunk-NY6W3XR5.js";import"./chunk-KNJE27OR.js";import"./chunk-J6ICAYDY.js";import"./chunk-F6AZVQGU.js";import"./chunk-SHW4IV7S.js";import"./chunk-XJY7A24W.js";import"./chunk-TIE2WSHM.js";import"./chunk-6SEBWKRM.js";import"./chunk-ISOKJULM.js";import"./chunk-DSBAEBB7.js";import"./chunk-ZCCLGLMW.js";import"./chunk-HHPGR3HF.js";import"./chunk-6M524CF7.js";import"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-E72U4F5S.js";import"./chunk-G7HHAO4N.js";import"./chunk-ML4NBLLV.js";import"./chunk-MMMJKCXE.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as StatusComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-PWIUQQUG.js";import{b}from"./chunk-KPKQNEWS.js";import{$a as s,Ac as w,Bc as y,Lc as T,Ob as r,Pb as o,Qb as c,Xb as u,_a as l,dc as p,ec as f,jc as v,kc as g,la as a,lb as d,n as m}from"./chunk-QSPBB6EE.js";var C=["terminaloutput"],k=(()=>{class t{$terminal=a(h);termTarget=T("terminaloutput");resizeEvent=new m;constructor(){}onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent),this.$terminal.term.focus()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$terminal.destroyTerminal()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&p(n.termTarget,C,5),e&2&&f()},hostBindings:function(e,n){e&1&&u("resize",function(x){return n.onWindowResize(x)},l)},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,n){e&1&&(r(0,"div",1)(1,"div",2)(2,"h3",3),v(3),w(4,"translate"),o()()(),r(5,"div",4),c(6,"div",5,0),o()),e&2&&(s(3),g(y(4,1,"menu.linux.label_terminal")))},dependencies:[b],encapsulation:2})}return t})();export{k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as ie,a as U,b as X,c as Y,f as te}from"./chunk-MHXMQUVU.js";import{a as ne}from"./chunk-6SEBWKRM.js";import{m as $,n as K,o as Q}from"./chunk-OHFVMRCL.js";import{c as W,e as R,f as j,i as z,l as q,m as G,z as J}from"./chunk-MMYB2ZMV.js";import{c as ee}from"./chunk-JYNDHHKS.js";import{b as Z}from"./chunk-7XITHR3W.js";import{b as w}from"./chunk-KPKQNEWS.js";import{$a as o,Ac as s,Bc as l,Cc as H,Gb as v,Hb as h,Ib as M,Kb as I,Lb as V,Mb as F,Nb as _,Ob as a,Pb as r,Qb as p,Ub as B,Xa as N,Xb as b,Yb as m,bd as O,jc as d,kc as u,la as f,lb as y,lc as S,qc as k,ra as C,rc as T,sa as x,sc as A,vc as L,wc as E}from"./chunk-QSPBB6EE.js";var oe=(()=>{class t{$activeModal=f($);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],decls:31,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li"),d(13),s(14,"translate"),r(),a(15,"li"),d(16),s(17,"translate"),r(),a(18,"li"),d(19),s(20,"translate"),r(),a(21,"li"),d(22),s(23,"translate"),r()()(),a(24,"div",8),p(25,"div",9),a(26,"div",10)(27,"button",11),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(28),s(29,"translate"),r()(),p(30,"div",12),r()()()),i&2&&(o(4),u(l(5,7,"support.title")),o(2),v("aria-label",l(7,9,"form.button_close")),o(7),u(l(14,11,"accessories.support.list_1")),o(3),u(l(17,13,"accessories.support.list_2")),o(3),u(l(20,15,"accessories.support.list_3")),o(3),u(l(23,17,"accessories.support.list_4")),o(6),S(" ",l(29,19,"form.button_close")," "))},dependencies:[w],encapsulation:2})}return t})();var se=()=>({standalone:!0}),ae=(()=>{class t{$activeModal=f($);roomName;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li",8)(13,"label",9),d(14),s(15,"translate"),r(),a(16,"div",10)(17,"input",11),A("ngModelChange",function(D){return T(n.roomName,D)||(n.roomName=D),D}),b("keyup.enter",function(){return n.$activeModal.close(n.roomName)}),r()()()()(),a(18,"div",12)(19,"div",13)(20,"button",14),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(21),s(22,"translate"),r()(),p(23,"div",15),a(24,"div",16)(25,"button",17),b("click",function(){return n.$activeModal.close(n.roomName)}),d(26),s(27,"translate"),r()()()()()),i&2&&(o(4),u(l(5,8,"accessories.button_add_room")),o(2),v("aria-label",l(7,10,"form.button_close")),o(8),u(l(15,12,"accessories.room_name")),o(3),k("ngModel",n.roomName),_("ngModelOptions",L(18,se)),o(4),S(" ",l(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),S(" ",l(27,16,"form.button_save")," "))},dependencies:[J,G,W,R,j,q,z,w],encapsulation:2})}return t})();var re=(()=>{class t{constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(a(0,"div",0),p(1,"i",1),a(2,"div",2),d(3),s(4,"translate"),r()()),i&2&&(o(3),u(l(4,1,"accessories.control.drag_here")))},dependencies:[w],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var le=t=>({"cursor-move":t}),ce=t=>({"justify-content-between":t}),de=t=>({link:t});function pe(t,g){if(t&1&&(a(0,"div",0)(1,"div",18)(2,"h5",19),d(3),s(4,"translate"),r()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",E(4,le,!i.isMobile)),o(),S(" ",e.name==="Default Room"?l(4,2,"accessories.control.default_room"):e.name," ")}}function me(t,g){if(t&1&&(a(0,"div",22),p(1,"app-accessory-tile",23),r()),t&2){let e=m().$implicit;o(),_("service",e)}}function ue(t,g){if(t&1&&h(0,me,2,1,"div",22),t&2){let e=g.$implicit,i=m(4);M(!i.hideHidden||!e.hidden?0:-1)}}function _e(t,g){if(t&1){let e=B();a(0,"div",20),A("dragulaModelChange",function(n){C(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),x(n)}),V(1,ue,1,1,null,null,I),p(3,"div",21)(4,"div",21)(5,"div",21)(6,"div",21)(7,"div",21)(8,"div",21)(9,"div",21)(10,"div",21)(11,"div",21)(12,"div",21),r()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",E(3,ce,i.isMobile))("dragula","services-bag"),k("dragulaModel",e.services),o(),F(e.services)}}function be(t,g){if(t&1){let e=B();a(0,"div",24),A("dragulaModelChange",function(n){C(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),x(n)}),p(1,"app-drag-here-placeholder",25),r()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),k("dragulaModel",e.services)}}function fe(t,g){if(t&1&&(a(0,"div"),h(1,pe,5,6,"div",0),a(2,"div",15),h(3,_e,13,5,"div",16),h(4,be,2,2,"div",17),r()()),t&2){let e=g.$implicit,i=m(2);o(),M(!i.isMobile||e.services.length?1:-1),o(2),M(e.services.length?3:-1),o(),M(!e.services.length&&!i.isMobile?4:-1)}}function ge(t,g){if(t&1){let e=B();a(0,"div",1)(1,"div",2)(2,"h3",3),d(3),s(4,"translate"),r()(),a(5,"div",4)(6,"button",5),s(7,"translate"),s(8,"translate"),b("click",function(){C(e);let n=m();return x(n.addRoom())}),p(9,"i",6),r(),a(10,"button",5),s(11,"translate"),s(12,"translate"),s(13,"translate"),s(14,"translate"),b("click",function(){C(e);let n=m();return x(n.hideHidden=!n.hideHidden)}),p(15,"i",7),r(),a(16,"div",8)(17,"button",9),s(18,"translate"),s(19,"translate"),b("click",function(){C(e);let n=m();return x(n.toggleLayoutLock())}),p(20,"i",10),r(),a(21,"button",9),s(22,"translate"),s(23,"translate"),b("click",function(){C(e);let n=m();return x(n.toggleLayoutLock())}),p(24,"i",11),r()(),a(25,"button",12),s(26,"translate"),b("click",function(){C(e);let n=m();return x(n.openSupport())}),p(27,"i",13),r()()(),a(28,"div",14),A("dragulaModelChange",function(n){C(e);let c=m();return T(c.$accessories.rooms,n)||(c.$accessories.rooms=n),x(n)}),V(29,fe,5,3,"div",null,I),r()}if(t&2){let e=m();o(3),u(l(4,17,"accessories.title_accessories")),o(3),_("hidden",e.isMobile)("ngbTooltip",l(7,19,"accessories.button_add_room")),v("aria-label",l(8,21,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?l(11,23,"accessories.button_hidden_show"):l(12,25,"accessories.button_hidden_hide")),v("aria-label",e.hideHidden?l(13,27,"accessories.button_hidden_show"):l(14,29,"accessories.button_hidden_hide")),o(5),_("ngClass",e.hideHidden?"fa-eye-slash":"fa-eye"),o(2),_("disabled",!e.isMobile)("ngbTooltip",l(18,31,"form.button_unlock")),v("aria-label",l(19,33,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",l(22,35,"form.button_lock")),v("aria-label",l(23,37,"form.button_lock")),o(4),v("aria-label",l(26,39,"support.title")),o(3),_("dragula","rooms-bag"),k("dragulaModel",e.$accessories.rooms),o(),F(e.$accessories.rooms)}}function ve(t,g){t&1&&(a(0,"p",32),d(1),s(2,"translate"),r()),t&2&&(o(),u(l(2,1,"accessories.settings_link")))}function Ce(t,g){if(t&1&&(a(0,"div",0)(1,"div",26)(2,"h3",27),d(3),s(4,"translate"),r()(),a(5,"div",28)(6,"div",29)(7,"h5",30),d(8),s(9,"translate"),r(),p(10,"p",31),s(11,"translate"),h(12,ve,3,3,"p",32),r()()()),t&2){let e=m();o(3),u(l(4,4,"accessories.title_accessories")),o(5),u(l(9,6,"accessories.control_disabled")),o(2),_("innerHTML",H(11,8,"accessories.message_must_use_insecure_mode",E(11,de,e.linkInsecure)),N),o(2),M(e.$auth.user.admin?12:-1)}}var Ue=(()=>{class t{$auth=f(ee);dragulaService=f(U);$modal=f(K);$settings=f(Z);$md=f(ne);$accessories=f(te);isMobile=!1;hideHidden=!0;orderSubscription;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,c)=>!this.isMobile&&c.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(ae,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let c=document.createElement("div");c.className="accessory-box invisible py-0 my-0",c.style.height="0",i.appendChild(c)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(oe,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-accessories"]],decls:2,vars:2,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&(h(0,ge,31,41),h(1,Ce,13,13,"div",0)),i&2&&(M(n.$settings.env.enableAccessories?0:-1),o(),M(n.$settings.env.enableAccessories?-1:1))},dependencies:[Q,O,Y,X,ie,re,w],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{ae as a,Ue as b};
|
|
1
|
+
import{U as ie,a as U,b as X,c as Y,f as te}from"./chunk-BFON6KG3.js";import{a as ne}from"./chunk-6SEBWKRM.js";import{m as $,n as K,o as Q}from"./chunk-OHFVMRCL.js";import{c as W,e as R,f as j,i as z,l as q,m as G,z as J}from"./chunk-MMYB2ZMV.js";import{c as ee}from"./chunk-G7HHAO4N.js";import{b as Z}from"./chunk-ML4NBLLV.js";import{b as w}from"./chunk-KPKQNEWS.js";import{$a as o,Ac as s,Bc as l,Cc as H,Gb as v,Hb as h,Ib as M,Kb as I,Lb as V,Mb as F,Nb as _,Ob as a,Pb as r,Qb as p,Ub as B,Xa as N,Xb as b,Yb as m,bd as O,jc as d,kc as u,la as f,lb as y,lc as S,qc as k,ra as C,rc as T,sa as x,sc as A,vc as L,wc as E}from"./chunk-QSPBB6EE.js";var oe=(()=>{class t{$activeModal=f($);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],decls:31,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li"),d(13),s(14,"translate"),r(),a(15,"li"),d(16),s(17,"translate"),r(),a(18,"li"),d(19),s(20,"translate"),r(),a(21,"li"),d(22),s(23,"translate"),r()()(),a(24,"div",8),p(25,"div",9),a(26,"div",10)(27,"button",11),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(28),s(29,"translate"),r()(),p(30,"div",12),r()()()),i&2&&(o(4),u(l(5,7,"support.title")),o(2),v("aria-label",l(7,9,"form.button_close")),o(7),u(l(14,11,"accessories.support.list_1")),o(3),u(l(17,13,"accessories.support.list_2")),o(3),u(l(20,15,"accessories.support.list_3")),o(3),u(l(23,17,"accessories.support.list_4")),o(6),S(" ",l(29,19,"form.button_close")," "))},dependencies:[w],encapsulation:2})}return t})();var se=()=>({standalone:!0}),ae=(()=>{class t{$activeModal=f($);roomName;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li",8)(13,"label",9),d(14),s(15,"translate"),r(),a(16,"div",10)(17,"input",11),A("ngModelChange",function(D){return T(n.roomName,D)||(n.roomName=D),D}),b("keyup.enter",function(){return n.$activeModal.close(n.roomName)}),r()()()()(),a(18,"div",12)(19,"div",13)(20,"button",14),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(21),s(22,"translate"),r()(),p(23,"div",15),a(24,"div",16)(25,"button",17),b("click",function(){return n.$activeModal.close(n.roomName)}),d(26),s(27,"translate"),r()()()()()),i&2&&(o(4),u(l(5,8,"accessories.button_add_room")),o(2),v("aria-label",l(7,10,"form.button_close")),o(8),u(l(15,12,"accessories.room_name")),o(3),k("ngModel",n.roomName),_("ngModelOptions",L(18,se)),o(4),S(" ",l(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),S(" ",l(27,16,"form.button_save")," "))},dependencies:[J,G,W,R,j,q,z,w],encapsulation:2})}return t})();var re=(()=>{class t{constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(a(0,"div",0),p(1,"i",1),a(2,"div",2),d(3),s(4,"translate"),r()()),i&2&&(o(3),u(l(4,1,"accessories.control.drag_here")))},dependencies:[w],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var le=t=>({"cursor-move":t}),ce=t=>({"justify-content-between":t}),de=t=>({link:t});function pe(t,g){if(t&1&&(a(0,"div",0)(1,"div",18)(2,"h5",19),d(3),s(4,"translate"),r()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",E(4,le,!i.isMobile)),o(),S(" ",e.name==="Default Room"?l(4,2,"accessories.control.default_room"):e.name," ")}}function me(t,g){if(t&1&&(a(0,"div",22),p(1,"app-accessory-tile",23),r()),t&2){let e=m().$implicit;o(),_("service",e)}}function ue(t,g){if(t&1&&h(0,me,2,1,"div",22),t&2){let e=g.$implicit,i=m(4);M(!i.hideHidden||!e.hidden?0:-1)}}function _e(t,g){if(t&1){let e=B();a(0,"div",20),A("dragulaModelChange",function(n){C(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),x(n)}),V(1,ue,1,1,null,null,I),p(3,"div",21)(4,"div",21)(5,"div",21)(6,"div",21)(7,"div",21)(8,"div",21)(9,"div",21)(10,"div",21)(11,"div",21)(12,"div",21),r()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",E(3,ce,i.isMobile))("dragula","services-bag"),k("dragulaModel",e.services),o(),F(e.services)}}function be(t,g){if(t&1){let e=B();a(0,"div",24),A("dragulaModelChange",function(n){C(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),x(n)}),p(1,"app-drag-here-placeholder",25),r()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),k("dragulaModel",e.services)}}function fe(t,g){if(t&1&&(a(0,"div"),h(1,pe,5,6,"div",0),a(2,"div",15),h(3,_e,13,5,"div",16),h(4,be,2,2,"div",17),r()()),t&2){let e=g.$implicit,i=m(2);o(),M(!i.isMobile||e.services.length?1:-1),o(2),M(e.services.length?3:-1),o(),M(!e.services.length&&!i.isMobile?4:-1)}}function ge(t,g){if(t&1){let e=B();a(0,"div",1)(1,"div",2)(2,"h3",3),d(3),s(4,"translate"),r()(),a(5,"div",4)(6,"button",5),s(7,"translate"),s(8,"translate"),b("click",function(){C(e);let n=m();return x(n.addRoom())}),p(9,"i",6),r(),a(10,"button",5),s(11,"translate"),s(12,"translate"),s(13,"translate"),s(14,"translate"),b("click",function(){C(e);let n=m();return x(n.hideHidden=!n.hideHidden)}),p(15,"i",7),r(),a(16,"div",8)(17,"button",9),s(18,"translate"),s(19,"translate"),b("click",function(){C(e);let n=m();return x(n.toggleLayoutLock())}),p(20,"i",10),r(),a(21,"button",9),s(22,"translate"),s(23,"translate"),b("click",function(){C(e);let n=m();return x(n.toggleLayoutLock())}),p(24,"i",11),r()(),a(25,"button",12),s(26,"translate"),b("click",function(){C(e);let n=m();return x(n.openSupport())}),p(27,"i",13),r()()(),a(28,"div",14),A("dragulaModelChange",function(n){C(e);let c=m();return T(c.$accessories.rooms,n)||(c.$accessories.rooms=n),x(n)}),V(29,fe,5,3,"div",null,I),r()}if(t&2){let e=m();o(3),u(l(4,17,"accessories.title_accessories")),o(3),_("hidden",e.isMobile)("ngbTooltip",l(7,19,"accessories.button_add_room")),v("aria-label",l(8,21,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?l(11,23,"accessories.button_hidden_show"):l(12,25,"accessories.button_hidden_hide")),v("aria-label",e.hideHidden?l(13,27,"accessories.button_hidden_show"):l(14,29,"accessories.button_hidden_hide")),o(5),_("ngClass",e.hideHidden?"fa-eye-slash":"fa-eye"),o(2),_("disabled",!e.isMobile)("ngbTooltip",l(18,31,"form.button_unlock")),v("aria-label",l(19,33,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",l(22,35,"form.button_lock")),v("aria-label",l(23,37,"form.button_lock")),o(4),v("aria-label",l(26,39,"support.title")),o(3),_("dragula","rooms-bag"),k("dragulaModel",e.$accessories.rooms),o(),F(e.$accessories.rooms)}}function ve(t,g){t&1&&(a(0,"p",32),d(1),s(2,"translate"),r()),t&2&&(o(),u(l(2,1,"accessories.settings_link")))}function Ce(t,g){if(t&1&&(a(0,"div",0)(1,"div",26)(2,"h3",27),d(3),s(4,"translate"),r()(),a(5,"div",28)(6,"div",29)(7,"h5",30),d(8),s(9,"translate"),r(),p(10,"p",31),s(11,"translate"),h(12,ve,3,3,"p",32),r()()()),t&2){let e=m();o(3),u(l(4,4,"accessories.title_accessories")),o(5),u(l(9,6,"accessories.control_disabled")),o(2),_("innerHTML",H(11,8,"accessories.message_must_use_insecure_mode",E(11,de,e.linkInsecure)),N),o(2),M(e.$auth.user.admin?12:-1)}}var Ue=(()=>{class t{$auth=f(ee);dragulaService=f(U);$modal=f(K);$settings=f(Z);$md=f(ne);$accessories=f(te);isMobile=!1;hideHidden=!0;orderSubscription;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,c)=>!this.isMobile&&c.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(ae,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let c=document.createElement("div");c.className="accessory-box invisible py-0 my-0",c.style.height="0",i.appendChild(c)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(oe,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-accessories"]],decls:2,vars:2,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&(h(0,ge,31,41),h(1,Ce,13,13,"div",0)),i&2&&(M(n.$settings.env.enableAccessories?0:-1),o(),M(n.$settings.env.enableAccessories?-1:1))},dependencies:[Q,O,Y,X,ie,re,w],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{ae as a,Ue as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-E7K55IJG.js";import{a as s}from"./chunk-7OL746BT.js";import"./chunk-4O7NT7TT.js";import"./chunk-J6ICAYDY.js";import"./chunk-F6AZVQGU.js";import"./chunk-SHW4IV7S.js";import"./chunk-XJY7A24W.js";import"./chunk-TIE2WSHM.js";import"./chunk-6SEBWKRM.js";import"./chunk-ISOKJULM.js";import"./chunk-DSBAEBB7.js";import"./chunk-ZCCLGLMW.js";import"./chunk-HHPGR3HF.js";import"./chunk-6M524CF7.js";import{q as l}from"./chunk-OHFVMRCL.js";import{A as u,z as m}from"./chunk-MMYB2ZMV.js";import{g as e}from"./chunk-QY7HUYL5.js";import"./chunk-E72U4F5S.js";import"./chunk-G7HHAO4N.js";import"./chunk-ML4NBLLV.js";import"./chunk-MMMJKCXE.js";import"./chunk-R3JWGCC5.js";import{c as p}from"./chunk-KPKQNEWS.js";import{ha as t,kd as n,mb as r}from"./chunk-QSPBB6EE.js";var g=[{path:"",loadComponent:()=>import("./chunk-Y6FL44WB.js").then(o=>o.PluginsComponent)}],d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[e.forChild(g),e]})}return o})();var v=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,m,u,p.forChild(),l,f,d,s]})}return o})();export{v as PluginsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as et,k as it}from"./chunk-6GW5TYOW.js";import{l as X}from"./chunk-R3JWGCC5.js";import{a as tt}from"./chunk-KPKQNEWS.js";import{T as K,e as ut,g as ct,ga as R,h as Q,la as Y,n as G,w as N}from"./chunk-QSPBB6EE.js";var st=ut((J,q)=>{(function(L,T){typeof J=="object"&&typeof q<"u"?q.exports=T():typeof define=="function"&&define.amd?define(T):(L=typeof globalThis<"u"?globalThis:L||self).dayjs=T()})(J,function(){"use strict";var L=1e3,T=6e4,n=36e5,h="millisecond",l="second",f="minute",p="hour",v="day",y="week",S="month",Z="quarter",b="year",x="date",z="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,at={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var s=String(r);return!s||s.length>=i?r:""+Array(i+1-s.length).join(t)+r},ot={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),s=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(s,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var s=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(s,S),a=t-e<0,o=i.clone().add(s+(a?-1:1),S);return+(-(s+(t-e)/(a?e-o:o-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:S,y:b,w:y,d:v,D:x,h:p,m:f,s:l,ms:h,Q:Z}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},A="en",k={};k[A]=at;var B="$isDayjsObject",U=function(r){return r instanceof W||!(!r||!r[B])},V=function r(i,t,s){var e;if(!i)return A;if(typeof i=="string"){var a=i.toLowerCase();k[a]&&(e=a),t&&(k[a]=t,e=a);var o=i.split("-");if(!e&&o.length>1)return r(o[0])}else{var c=i.name;k[c]=i,e=c}return!s&&e&&(A=e),e||!s&&A},m=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new W(t)},u=ot;u.l=V,u.i=U,u.w=function(r,i){return m(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var W=function(){function r(t){this.$L=V(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[B]=!0}var i=r.prototype;return i.parse=function(t){this.$d=function(s){var e=s.date,a=s.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var o=e.match(nt);if(o){var c=o[2]-1||0,d=(o[7]||"0").substring(0,3);return a?new Date(Date.UTC(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,d)):new Date(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,d)}}return new Date(e)}(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==z},i.isSame=function(t,s){var e=m(t);return this.startOf(s)<=e&&e<=this.endOf(s)},i.isAfter=function(t,s){return m(t)<this.startOf(s)},i.isBefore=function(t,s){return this.endOf(s)<m(t)},i.$g=function(t,s,e){return u.u(t)?this[s]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,s){var e=this,a=!!u.u(s)||s,o=u.p(t),c=function(_,M){var D=u.w(e.$u?Date.UTC(e.$y,M,_):new Date(e.$y,M,_),e);return a?D:D.endOf(v)},d=function(_,M){return u.w(e.toDate()[_].apply(e.toDate("s"),(a?[0,0,0,0]:[23,59,59,999]).slice(M)),e)},g=this.$W,$=this.$M,w=this.$D,j="set"+(this.$u?"UTC":"");switch(o){case b:return a?c(1,0):c(31,11);case S:return a?c(1,$):c(0,$+1);case y:var O=this.$locale().weekStart||0,H=(g<O?g+7:g)-O;return c(a?w-H:w+(6-H),$);case v:case x:return d(j+"Hours",0);case p:return d(j+"Minutes",1);case f:return d(j+"Seconds",2);case l:return d(j+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,s){var e,a=u.p(t),o="set"+(this.$u?"UTC":""),c=(e={},e[v]=o+"Date",e[x]=o+"Date",e[S]=o+"Month",e[b]=o+"FullYear",e[p]=o+"Hours",e[f]=o+"Minutes",e[l]=o+"Seconds",e[h]=o+"Milliseconds",e)[a],d=a===v?this.$D+(s-this.$W):s;if(a===S||a===b){var g=this.clone().set(x,1);g.$d[c](d),g.init(),this.$d=g.set(x,Math.min(this.$D,g.daysInMonth())).$d}else c&&this.$d[c](d);return this.init(),this},i.set=function(t,s){return this.clone().$set(t,s)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,s){var e,a=this;t=Number(t);var o=u.p(s),c=function($){var w=m(a);return u.w(w.date(w.date()+Math.round($*t)),a)};if(o===S)return this.set(S,this.$M+t);if(o===b)return this.set(b,this.$y+t);if(o===v)return c(1);if(o===y)return c(7);var d=(e={},e[f]=T,e[p]=n,e[l]=L,e)[o]||1,g=this.$d.getTime()+t*d;return u.w(g,this)},i.subtract=function(t,s){return this.add(-1*t,s)},i.format=function(t){var s=this,e=this.$locale();if(!this.isValid())return e.invalidDate||z;var a=t||"YYYY-MM-DDTHH:mm:ssZ",o=u.z(this),c=this.$H,d=this.$m,g=this.$M,$=e.weekdays,w=e.months,j=e.meridiem,O=function(M,D,I,C){return M&&(M[D]||M(s,a))||I[D].slice(0,C)},H=function(M){return u.s(c%12||12,M,"0")},_=j||function(M,D,I){var C=M<12?"AM":"PM";return I?C.toLowerCase():C};return a.replace(rt,function(M,D){return D||function(I){switch(I){case"YY":return String(s.$y).slice(-2);case"YYYY":return u.s(s.$y,4,"0");case"M":return g+1;case"MM":return u.s(g+1,2,"0");case"MMM":return O(e.monthsShort,g,w,3);case"MMMM":return O(w,g);case"D":return s.$D;case"DD":return u.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return O(e.weekdaysMin,s.$W,$,2);case"ddd":return O(e.weekdaysShort,s.$W,$,3);case"dddd":return $[s.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return H(1);case"hh":return H(2);case"a":return _(c,d,!0);case"A":return _(c,d,!1);case"m":return String(d);case"mm":return u.s(d,2,"0");case"s":return String(s.$s);case"ss":return u.s(s.$s,2,"0");case"SSS":return u.s(s.$ms,3,"0");case"Z":return o}return null}(M)||o.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,s,e){var a,o=this,c=u.p(s),d=m(t),g=(d.utcOffset()-this.utcOffset())*T,$=this-d,w=function(){return u.m(o,d)};switch(c){case b:a=w()/12;break;case S:a=w();break;case Z:a=w()/3;break;case y:a=($-g)/6048e5;break;case v:a=($-g)/864e5;break;case p:a=$/n;break;case f:a=$/T;break;case l:a=$/L;break;default:a=$}return e?a:u.a(a)},i.daysInMonth=function(){return this.endOf(S).$D},i.$locale=function(){return k[this.$L]},i.locale=function(t,s){if(!t)return this.$L;var e=this.clone(),a=V(t,s,!0);return a&&(e.$L=a),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r}(),P=W.prototype;return m.prototype=P,[["$ms",h],["$s",l],["$m",f],["$H",p],["$W",v],["$M",S],["$y",b],["$D",x]].forEach(function(r){P[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),m.extend=function(r,i){return r.$i||(r(i,W,m),r.$i=!0),m},m.locale=V,m.isDayjs=U,m.unix=function(r){return m(1e3*r)},m.en=k[A],m.Ls=k,m.p={},m})});var E=ct(st(),1);var vt=(()=>{class L{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);env={};formAuth=!0;sessionTimeout=28800;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;wallpaper;serverTimeOffset=0;defaultTheme="orange";themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];rtl=!1;settingsLoadedSubject=new G;onSettingsLoaded=this.settingsLoadedSubject.pipe(K());settingsLoaded=!1;constructor(){this.getAppSettings()}getAppSettings(){return Q(this,null,function*(){let n=yield N(this.$api.get("/auth/settings"));this.formAuth=n.formAuth,this.sessionTimeout=n.sessionTimeout,this.env=n.env,this.lightingMode=n.lightingMode,this.wallpaper=n.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(n.theme),this.setMenuMode(n.menuMode),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(n.serverTimestamp),this.setUiVersion(n.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0)})}setBrowserLightingMode(n){this.browserLightingMode=n,this.lightingMode==="auto"&&this.setLightingMode(n,"browser")}setLightingMode(n,h){h==="user"&&(this.lightingMode=n),this.currentLightingMode=n,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(n){(!n||!this.themeList.includes(n))&&(n=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:n})).catch(f=>console.error("Error saving setTheme:",f)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=n,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((f,p)=>{try{let v=f.contentDocument;if(v){let y=v.body;y.classList.remove(`config-ui-x-${this.theme}`),y.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.actualLightingMode==="dark"?(y.classList.add(`config-ui-x-dark-mode-${this.theme}`),y.classList.contains("dark-mode")||y.classList.add("dark-mode")):(y.classList.add(`config-ui-x-${this.theme}`),y.classList.contains("dark-mode")&&y.classList.remove("dark-mode")),f.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:n},window.location.origin)}}catch(v){console.warn(`Iframe ${p}: Access denied (cross-origin?)`,{error:v,src:f.src})}})}setMenuMode(n){this.menuMode=n}setTitle(n){this.$title.setTitle(n||"Homebridge")}setUiVersion(n){this.uiVersion||(this.uiVersion=n)}setLang(n){n?this.$translate.use(n):n="auto",this.env.lang=n}setItem(n,h){this[n]=h}setEnvItem(n,h){if(n.includes(".")){let l=n.split("."),f=this.env;for(let p=0;p<l.length-1;p++)f[l[p]]||(f[l[p]]={}),f=f[l[p]];f[l[l.length-1]]=h}else this.env[n]=h}checkServerTime(n){let l=(0,E.default)(n).diff((0,E.default)(),"hour");this.serverTimeOffset=l*60*60,(l>=8||l<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}static \u0275fac=function(h){return new(h||L)};static \u0275prov=R({token:L,factory:L.\u0275fac,providedIn:"root"})}return L})();export{st as a,vt as b};
|
|
1
|
+
import{h as et,k as it}from"./chunk-MMMJKCXE.js";import{l as X}from"./chunk-R3JWGCC5.js";import{a as tt}from"./chunk-KPKQNEWS.js";import{T as K,e as ut,g as ct,ga as R,h as Q,la as Y,n as G,w as N}from"./chunk-QSPBB6EE.js";var st=ut((J,q)=>{(function(L,T){typeof J=="object"&&typeof q<"u"?q.exports=T():typeof define=="function"&&define.amd?define(T):(L=typeof globalThis<"u"?globalThis:L||self).dayjs=T()})(J,function(){"use strict";var L=1e3,T=6e4,n=36e5,h="millisecond",l="second",f="minute",p="hour",v="day",y="week",S="month",Z="quarter",b="year",x="date",z="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,at={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var i=["th","st","nd","rd"],t=r%100;return"["+r+(i[(t-20)%10]||i[t]||i[0])+"]"}},F=function(r,i,t){var s=String(r);return!s||s.length>=i?r:""+Array(i+1-s.length).join(t)+r},ot={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),s=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(s,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var s=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(s,S),a=t-e<0,o=i.clone().add(s+(a?-1:1),S);return+(-(s+(t-e)/(a?e-o:o-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:S,y:b,w:y,d:v,D:x,h:p,m:f,s:l,ms:h,Q:Z}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},A="en",k={};k[A]=at;var B="$isDayjsObject",U=function(r){return r instanceof W||!(!r||!r[B])},V=function r(i,t,s){var e;if(!i)return A;if(typeof i=="string"){var a=i.toLowerCase();k[a]&&(e=a),t&&(k[a]=t,e=a);var o=i.split("-");if(!e&&o.length>1)return r(o[0])}else{var c=i.name;k[c]=i,e=c}return!s&&e&&(A=e),e||!s&&A},m=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new W(t)},u=ot;u.l=V,u.i=U,u.w=function(r,i){return m(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var W=function(){function r(t){this.$L=V(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[B]=!0}var i=r.prototype;return i.parse=function(t){this.$d=function(s){var e=s.date,a=s.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var o=e.match(nt);if(o){var c=o[2]-1||0,d=(o[7]||"0").substring(0,3);return a?new Date(Date.UTC(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,d)):new Date(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,d)}}return new Date(e)}(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return u},i.isValid=function(){return this.$d.toString()!==z},i.isSame=function(t,s){var e=m(t);return this.startOf(s)<=e&&e<=this.endOf(s)},i.isAfter=function(t,s){return m(t)<this.startOf(s)},i.isBefore=function(t,s){return this.endOf(s)<m(t)},i.$g=function(t,s,e){return u.u(t)?this[s]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,s){var e=this,a=!!u.u(s)||s,o=u.p(t),c=function(_,M){var D=u.w(e.$u?Date.UTC(e.$y,M,_):new Date(e.$y,M,_),e);return a?D:D.endOf(v)},d=function(_,M){return u.w(e.toDate()[_].apply(e.toDate("s"),(a?[0,0,0,0]:[23,59,59,999]).slice(M)),e)},g=this.$W,$=this.$M,w=this.$D,j="set"+(this.$u?"UTC":"");switch(o){case b:return a?c(1,0):c(31,11);case S:return a?c(1,$):c(0,$+1);case y:var O=this.$locale().weekStart||0,H=(g<O?g+7:g)-O;return c(a?w-H:w+(6-H),$);case v:case x:return d(j+"Hours",0);case p:return d(j+"Minutes",1);case f:return d(j+"Seconds",2);case l:return d(j+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,s){var e,a=u.p(t),o="set"+(this.$u?"UTC":""),c=(e={},e[v]=o+"Date",e[x]=o+"Date",e[S]=o+"Month",e[b]=o+"FullYear",e[p]=o+"Hours",e[f]=o+"Minutes",e[l]=o+"Seconds",e[h]=o+"Milliseconds",e)[a],d=a===v?this.$D+(s-this.$W):s;if(a===S||a===b){var g=this.clone().set(x,1);g.$d[c](d),g.init(),this.$d=g.set(x,Math.min(this.$D,g.daysInMonth())).$d}else c&&this.$d[c](d);return this.init(),this},i.set=function(t,s){return this.clone().$set(t,s)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,s){var e,a=this;t=Number(t);var o=u.p(s),c=function($){var w=m(a);return u.w(w.date(w.date()+Math.round($*t)),a)};if(o===S)return this.set(S,this.$M+t);if(o===b)return this.set(b,this.$y+t);if(o===v)return c(1);if(o===y)return c(7);var d=(e={},e[f]=T,e[p]=n,e[l]=L,e)[o]||1,g=this.$d.getTime()+t*d;return u.w(g,this)},i.subtract=function(t,s){return this.add(-1*t,s)},i.format=function(t){var s=this,e=this.$locale();if(!this.isValid())return e.invalidDate||z;var a=t||"YYYY-MM-DDTHH:mm:ssZ",o=u.z(this),c=this.$H,d=this.$m,g=this.$M,$=e.weekdays,w=e.months,j=e.meridiem,O=function(M,D,I,C){return M&&(M[D]||M(s,a))||I[D].slice(0,C)},H=function(M){return u.s(c%12||12,M,"0")},_=j||function(M,D,I){var C=M<12?"AM":"PM";return I?C.toLowerCase():C};return a.replace(rt,function(M,D){return D||function(I){switch(I){case"YY":return String(s.$y).slice(-2);case"YYYY":return u.s(s.$y,4,"0");case"M":return g+1;case"MM":return u.s(g+1,2,"0");case"MMM":return O(e.monthsShort,g,w,3);case"MMMM":return O(w,g);case"D":return s.$D;case"DD":return u.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return O(e.weekdaysMin,s.$W,$,2);case"ddd":return O(e.weekdaysShort,s.$W,$,3);case"dddd":return $[s.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return H(1);case"hh":return H(2);case"a":return _(c,d,!0);case"A":return _(c,d,!1);case"m":return String(d);case"mm":return u.s(d,2,"0");case"s":return String(s.$s);case"ss":return u.s(s.$s,2,"0");case"SSS":return u.s(s.$ms,3,"0");case"Z":return o}return null}(M)||o.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,s,e){var a,o=this,c=u.p(s),d=m(t),g=(d.utcOffset()-this.utcOffset())*T,$=this-d,w=function(){return u.m(o,d)};switch(c){case b:a=w()/12;break;case S:a=w();break;case Z:a=w()/3;break;case y:a=($-g)/6048e5;break;case v:a=($-g)/864e5;break;case p:a=$/n;break;case f:a=$/T;break;case l:a=$/L;break;default:a=$}return e?a:u.a(a)},i.daysInMonth=function(){return this.endOf(S).$D},i.$locale=function(){return k[this.$L]},i.locale=function(t,s){if(!t)return this.$L;var e=this.clone(),a=V(t,s,!0);return a&&(e.$L=a),e},i.clone=function(){return u.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},r}(),P=W.prototype;return m.prototype=P,[["$ms",h],["$s",l],["$m",f],["$H",p],["$W",v],["$M",S],["$y",b],["$D",x]].forEach(function(r){P[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),m.extend=function(r,i){return r.$i||(r(i,W,m),r.$i=!0),m},m.locale=V,m.isDayjs=U,m.unix=function(r){return m(1e3*r)},m.en=k[A],m.Ls=k,m.p={},m})});var E=ct(st(),1);var vt=(()=>{class L{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);env={};formAuth=!0;sessionTimeout=28800;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;wallpaper;serverTimeOffset=0;defaultTheme="orange";themeList=["orange","red","pink","purple","deep-purple","indigo","blue","blue-grey","cyan","green","teal","grey","brown"];rtl=!1;settingsLoadedSubject=new G;onSettingsLoaded=this.settingsLoadedSubject.pipe(K());settingsLoaded=!1;constructor(){this.getAppSettings()}getAppSettings(){return Q(this,null,function*(){let n=yield N(this.$api.get("/auth/settings"));this.formAuth=n.formAuth,this.sessionTimeout=n.sessionTimeout,this.env=n.env,this.lightingMode=n.lightingMode,this.wallpaper=n.wallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(n.theme),this.setMenuMode(n.menuMode),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(n.serverTimestamp),this.setUiVersion(n.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0)})}setBrowserLightingMode(n){this.browserLightingMode=n,this.lightingMode==="auto"&&this.setLightingMode(n,"browser")}setLightingMode(n,h){h==="user"&&(this.lightingMode=n),this.currentLightingMode=n,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(n){(!n||!this.themeList.includes(n))&&(n=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:n})).catch(f=>console.error("Error saving setTheme:",f)));let h=window.document.querySelector("body");h.classList.remove(`config-ui-x-${this.theme}`),h.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=n,this.actualLightingMode==="dark"?(h.classList.add(`config-ui-x-dark-mode-${this.theme}`),h.classList.contains("dark-mode")||h.classList.add("dark-mode")):(h.classList.add(`config-ui-x-${this.theme}`),h.classList.contains("dark-mode")&&h.classList.remove("dark-mode")),window.document.querySelectorAll("iframe").forEach((f,p)=>{try{let v=f.contentDocument;if(v){let y=v.body;y.classList.remove(`config-ui-x-${this.theme}`),y.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.actualLightingMode==="dark"?(y.classList.add(`config-ui-x-dark-mode-${this.theme}`),y.classList.contains("dark-mode")||y.classList.add("dark-mode")):(y.classList.add(`config-ui-x-${this.theme}`),y.classList.contains("dark-mode")&&y.classList.remove("dark-mode")),f.contentWindow.postMessage({type:"theme-update",isDark:this.actualLightingMode==="dark",theme:n},window.location.origin)}}catch(v){console.warn(`Iframe ${p}: Access denied (cross-origin?)`,{error:v,src:f.src})}})}setMenuMode(n){this.menuMode=n}setTitle(n){this.$title.setTitle(n||"Homebridge")}setUiVersion(n){this.uiVersion||(this.uiVersion=n)}setLang(n){n?this.$translate.use(n):n="auto",this.env.lang=n}setItem(n,h){this[n]=h}setEnvItem(n,h){if(n.includes(".")){let l=n.split("."),f=this.env;for(let p=0;p<l.length-1;p++)f[l[p]]||(f[l[p]]={}),f=f[l[p]];f[l[l.length-1]]=h}else this.env[n]=h}checkServerTime(n){let l=(0,E.default)(n).diff((0,E.default)(),"hour");this.serverTimeOffset=l*60*60,(l>=8||l<=-8)&&this.$toastr.warning(this.$translate.instant("settings.datetime.incorrect"),this.$translate.instant("toast.title_warning"),{timeOut:2e4,tapToDismiss:!1}).onTap.subscribe(()=>{window.open("https://homebridge.io/w/JqTFs","_blank")})}static \u0275fac=function(h){return new(h||L)};static \u0275prov=R({token:L,factory:L.\u0275fac,providedIn:"root"})}return L})();export{st as a,vt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as ft,m as gt}from"./chunk-R3JWGCC5.js";import{$a as r,Fb as M,Gb as E,Nb as l,Ob as h,Pb as p,Qb as F,Rb as Y,Sb as K,Ub as Q,Wa as ht,Wb as mt,Xa as q,Xb as j,Yb as c,a as u,b as T,cb as dt,dd as J,e as xt,fb as y,ga as C,gc as A,ha as lt,ic as m,ja as ct,jc as f,ka as w,la as _,lb as G,lc as b,ma as ut,mb as pt,n as g,ra as V,rb as S,sa as z,ua as N,ub as U,va as Z,za as O}from"./chunk-QSPBB6EE.js";var Tt=xt((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.0.0-beta.89",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"homebridge-config-ui-x":"dist/bin/standalone.js","hb-service":"dist/bin/hb-service.js"},engines:{node:"^20 || ^22 || ^24",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.0.0-beta.0","@homebridge/node-pty-prebuilt-multiarch":"0.13.0-beta.4","@nestjs/axios":"4.0.0","@nestjs/common":"11.1.3","@nestjs/core":"11.1.3","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.3","@nestjs/platform-socket.io":"11.1.3","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.3",axios:"1.9.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.3.3","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"5.4.1",otplib:"12.0.1","p-limit":"3.1.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.1",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^4.14.1","@nestjs/testing":"^11.1.3","@prettier/plugin-xml":"^3.4.1","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.17","@types/node":"^22.15.30","@types/node-schedule":"^2.1.7","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.2",concurrently:"^9.1.2","eslint-plugin-format":"^1.0.1","form-data":"^4.0.3",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.4",vitest:"^3.2.2"},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),It="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let I=new st(k),$=new D(this.index,o,rt,n,t,I),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);I.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:I,onShown:I.afterActivate(),onHidden:I.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var x={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);constructor(){}get(t,e){return this.$http.get(`${x.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${x.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${x.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${x.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${x.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,It as b,Yt as c,R as d,W as e,X as f,Ot as g,bt as h,be as i,x as j,Fe as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as j,c as $,d as C,e as T,f as N,g as q,j as w,m as H,p as z,q as D,w as G,x as Q,z as A}from"./chunk-MMYB2ZMV.js";import{d as U}from"./chunk-QY7HUYL5.js";import{c as X}from"./chunk-
|
|
1
|
+
import{A as j,c as $,d as C,e as T,f as N,g as q,j as w,m as H,p as z,q as D,w as G,x as Q,z as A}from"./chunk-MMYB2ZMV.js";import{d as U}from"./chunk-QY7HUYL5.js";import{c as X}from"./chunk-G7HHAO4N.js";import{b as K}from"./chunk-ML4NBLLV.js";import{j as J}from"./chunk-MMMJKCXE.js";import{b as W}from"./chunk-KPKQNEWS.js";import{$a as n,Ac as l,Bc as d,Hb as p,Ib as u,Lc as b,M as I,Nb as m,Nc as V,Ob as r,Pb as a,Qb as s,Xa as x,Xb as M,Yb as F,bd as B,dc as v,ec as L,ed as O,fb as k,h as y,jc as c,kc as h,la as f,lb as E,lc as P,sd as R,w as S,wc as g}from"./chunk-QSPBB6EE.js";var Z=["password"],ee=["username"],te=["otp"],ie=e=>({background:e}),ne=e=>({anim:e}),Y=e=>({"is-invalid":e});function oe(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let i=F();n(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",g(8,Y,i.form.controls.username.dirty&&i.form.controls.username.errors)),n(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",g(10,Y,i.form.controls.password.dirty&&i.form.controls.password.errors))}}function ae(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(n(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),c(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(n(5),h(d(6,2,"login.invalid_credentials")),n(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function se(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),c(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(n(5),h(d(6,2,"login.invalid_code")),n(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var ye=(()=>{class e{cdr;$auth=f(X);$router=f(U);$settings=f(K);passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");form;backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;targetRoute;constructor(i){this.cdr=i}ngOnInit(){this.form=new q({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(i=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==i.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.cdr.detectChanges()}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash&&this.$settings.env.customWallpaperHash){let i=`${J.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${i}') center/cover`}})}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let i=this.passwordInput()?.nativeElement.value;i&&i!==this.form.get("password").value&&this.form.controls.password.setValue(i);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}static \u0275fac=function(o){return new(o||e)(k(V))};static \u0275cmp=E({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Z,5),v(t.usernameInput,ee,5),v(t.otpInput,te,5)),o&2&&L(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","/assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-fw","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),M("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),c(5),l(6,"translate"),a(),p(7,oe,12,12),p(8,ae,6,3,"div",8),p(9,re,9,6,"div",9),p(10,se,9,6,"div",9),r(11,"div",10)(12,"button",11),c(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",g(14,ie,t.backgroundStyle))("ngClass",g(16,ne,!t.backgroundStyle)),n(3),m("formGroup",t.form),n(2),h(d(6,10,"setup.welcome_to_homebridge")),n(2),u(t.twoFactorCodeRequired?-1:7),n(),u(t.twoFactorCodeRequired?8:-1),n(),u(t.invalidCredentials?9:-1),n(),u(t.invalid2faCode?10:-1),n(2),m("disabled",t.form.invalid),n(),P(" ",d(14,12,"form.label_continue")," "))},dependencies:[O,A,H,$,T,N,G,Q,j,z,D,B,W,R],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}.btn-primary[_ngcontent-%COMP%]{background-color:#4a266c!important;border-color:#4a266c!important}"]})}return e})();export{ye as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as V,b as q}from"./chunk-
|
|
1
|
+
import{a as V,b as q}from"./chunk-ISOKJULM.js";import{a as _}from"./chunk-6M524CF7.js";import{n as B,o as k}from"./chunk-OHFVMRCL.js";import{h as D,k as F}from"./chunk-MMMJKCXE.js";import{a as z,b as E}from"./chunk-KPKQNEWS.js";import{$a as m,Ac as i,Bc as r,Gb as b,Lc as S,Nb as h,Ob as s,Pb as l,Qb as p,Ub as L,Xb as d,_a as y,dc as T,ec as C,g as j,h as w,jc as x,kc as I,la as o,lb as $,n as v,ra as u,sa as f}from"./chunk-QSPBB6EE.js";var H=j(q(),1);var A=["logoutput"],X=(()=>{class c{$api=o(F);$log=o(V);$modal=o(B);$toastr=o(D);$translate=o(z);termTarget=S("logoutput");resizeEvent=new v;constructor(){}onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$log.startTerminal(this.termTarget(),{},this.resizeEvent)}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$log.destroyTerminal()}downloadLogFile(){let t=this.$modal.open(_,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_download_log_file"),t.componentInstance.message=this.$translate.instant("logs.download_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_download"),t.componentInstance.faIconClass="fas fa-fw fa-user-secret primary-text",t.result.then(()=>{this.$api.get("/platform-tools/hb-service/log/download",{observe:"response",responseType:"blob"}).subscribe({next:e=>{(0,H.saveAs)(e.body,"homebridge.log.txt")},error:e=>w(this,null,function*(){let n;try{n=JSON.parse(yield e.error.text()).message}catch(a){console.error(a)}this.$toastr.error(n||this.$translate.instant("logs.download.error"),this.$translate.instant("toast.title_error"))})})}).catch(()=>{})}truncateLogFile(){let t=this.$modal.open(_,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_truncate_log_file"),t.componentInstance.message=this.$translate.instant("logs.truncate_log_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_delete"),t.componentInstance.confirmButtonClass="btn-danger",t.componentInstance.faIconClass="fas fa-fw fa-circle-exclamation primary-text",t.result.then(()=>{this.$api.put("/platform-tools/hb-service/log/truncate",{}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("logs.log_file_truncated"),this.$translate.instant("toast.title_success")),this.$log.term.clear()},error:e=>{console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("logs.truncate.error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=$({type:c,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&T(n.termTarget,A,5),e&2&&C()},hostBindings:function(e,n){e&1&&d("resize",function(g){return n.onWindowResize(g)},y)},decls:17,vars:15,consts:[["logoutput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-0",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-trash-alt"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","log-output",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,n){if(e&1){let a=L();s(0,"div",1)(1,"div",2)(2,"h3",3),x(3),i(4,"translate"),l()(),s(5,"div",4)(6,"button",5),i(7,"translate"),i(8,"translate"),d("click",function(){return u(a),f(n.downloadLogFile())}),p(9,"i",6),l(),s(10,"button",7),i(11,"translate"),i(12,"translate"),d("click",function(){return u(a),f(n.truncateLogFile())}),p(13,"i",8),l()()(),s(14,"div",9),p(15,"div",10,0),l()}e&2&&(m(3),I(r(4,5,"menu.linux.label_logs")),m(3),h("ngbTooltip",r(7,7,"form.button_download")),b("aria-label",r(8,9,"form.button_download")),m(4),h("ngbTooltip",r(11,11,"form.button_delete")),b("aria-label",r(12,13,"form.button_delete")))},dependencies:[k,E],encapsulation:2})}return c})();export{X as a};
|