homebridge-config-ui-x 5.0.0-beta.52 → 5.0.0-beta.53
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 -1
- package/package.json +2 -2
- package/public/{chunk-DZNGJOAD.js → chunk-2OUYQIDT.js} +1 -1
- package/public/chunk-2SKV4EZG.js +1 -0
- package/public/{chunk-E7HFXMQC.js → chunk-3MX5DOL7.js} +1 -1
- package/public/{chunk-LRNCAR4N.js → chunk-3QZ375B7.js} +1 -1
- package/public/{chunk-YPMZ3DYC.js → chunk-6ILQEJNG.js} +1 -1
- package/public/{chunk-NPCZCOZC.js → chunk-6KTIHC4T.js} +1 -1
- package/public/chunk-7NJFL3V5.js +1 -0
- package/public/{chunk-SLUFR3ON.js → chunk-A6T442AC.js} +1 -1
- package/public/{chunk-CJSSN6RK.js → chunk-ADLO54TI.js} +1 -1
- package/public/chunk-ASPLXDLK.js +1 -0
- package/public/{chunk-KQ4WIJTU.js → chunk-ATZCPOHY.js} +1 -1
- package/public/{chunk-UMSMYWYC.js → chunk-BSQTJCCZ.js} +1 -1
- package/public/chunk-BVKEUYDD.js +1 -0
- package/public/{chunk-4B7IZE2P.js → chunk-C7B7J3YU.js} +1 -1
- package/public/{chunk-MAIN5YCW.js → chunk-CHKLSRJ3.js} +1 -1
- package/public/{chunk-MFP6D5U2.js → chunk-CPYAFTPH.js} +14 -14
- package/public/chunk-ECYEAXRB.js +1 -0
- package/public/{chunk-V5C6TH72.js → chunk-ESRGAJUF.js} +1 -1
- package/public/{chunk-TK4BPPSX.js → chunk-FASTOCS5.js} +1 -1
- package/public/{chunk-OYB4GWS2.js → chunk-H22PVD4I.js} +1 -1
- package/public/{chunk-ZNQOGJMW.js → chunk-H3B6SNLD.js} +1 -1
- package/public/{chunk-RIXGXWCM.js → chunk-HATWVP5C.js} +1 -1
- package/public/{chunk-2UDC7EMX.js → chunk-I5QQRRPS.js} +1 -1
- package/public/chunk-IU42UO7J.js +1 -0
- package/public/{chunk-T75TOYED.js → chunk-JMXJZ2Q7.js} +1 -1
- package/public/{chunk-44C4SVOH.js → chunk-JUFP3U6F.js} +1 -1
- package/public/chunk-KUMEH2DS.js +1 -0
- package/public/{chunk-56QTN3FM.js → chunk-KW4MJOSS.js} +1 -1
- package/public/chunk-KXTEHFOE.js +1 -0
- package/public/{chunk-6CVPCQKP.js → chunk-LFQIH47S.js} +1 -1
- package/public/chunk-LU42XXER.js +1 -0
- package/public/{chunk-F3FEWT6G.js → chunk-MF5APUVW.js} +1 -1
- package/public/{chunk-O2IBEQMY.js → chunk-MJJZV2ZZ.js} +1 -1
- package/public/{chunk-OY5MWFSR.js → chunk-MNIEFP5R.js} +1 -1
- package/public/{chunk-3EGZ5RTQ.js → chunk-MR2YBKPP.js} +1 -1
- package/public/{chunk-3XIIWU5P.js → chunk-MRUJHSFO.js} +1 -1
- package/public/{chunk-OPHOXI7M.js → chunk-N23UCYUG.js} +1 -1
- package/public/{chunk-UFCYTM46.js → chunk-NSTYUUFS.js} +1 -1
- package/public/chunk-NTKR7QBR.js +1 -0
- package/public/{chunk-TG6N743W.js → chunk-OE7J5OFK.js} +1 -1
- package/public/{chunk-Y5URZ5MZ.js → chunk-ON2E7LVH.js} +1 -1
- package/public/chunk-PNVUM7VV.js +1 -0
- package/public/chunk-PWQDJSBN.js +1 -0
- package/public/chunk-QTMHY65L.js +1 -0
- package/public/{chunk-ZSUARIC5.js → chunk-RDPAVLAZ.js} +1 -1
- package/public/chunk-RK2BHUS3.js +1 -0
- package/public/{chunk-PZNRYHHJ.js → chunk-RP6EJVPS.js} +1 -1
- package/public/{chunk-6JK2KWCJ.js → chunk-SD472BD2.js} +1 -1
- package/public/{chunk-Z5KABSBS.js → chunk-SRUQ34W2.js} +1 -1
- package/public/{chunk-HSKPWR6T.js → chunk-THWGBC4V.js} +1 -1
- package/public/chunk-UL2YWIGQ.js +1 -0
- package/public/{chunk-G4RNPDKM.js → chunk-UTIL4E7P.js} +1 -1
- package/public/{chunk-6EWOCV2F.js → chunk-WSXVUEYM.js} +1 -1
- package/public/{chunk-PSSA4PHP.js → chunk-X3WLRBIN.js} +1 -1
- package/public/{chunk-FHOSQQJ4.js → chunk-X7R5UQDS.js} +1 -1
- package/public/{chunk-BEXZ3EKZ.js → chunk-XEJ57GXO.js} +1 -1
- package/public/{chunk-SMBDBPLM.js → chunk-XSZWYGN5.js} +1 -1
- package/public/{chunk-HG7ORW3R.js → chunk-YYVRF4AL.js} +1 -1
- package/public/{chunk-CYO7GF7S.js → chunk-ZJTXU2GZ.js} +1 -1
- package/public/{chunk-X3ZB4QGO.js → chunk-ZREFVRCJ.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-4MY7DYH6.js → main-BETLO3TF.js} +1 -1
- package/public/chunk-275KUFU5.js +0 -1
- package/public/chunk-3SK2YI5N.js +0 -1
- package/public/chunk-4ZZTRP44.js +0 -1
- package/public/chunk-54WT3CWA.js +0 -1
- package/public/chunk-55LWQ27W.js +0 -1
- package/public/chunk-BAWBN252.js +0 -1
- package/public/chunk-BCX23V6Z.js +0 -1
- package/public/chunk-NU7ESJEV.js +0 -1
- package/public/chunk-OSNLCRQT.js +0 -1
- package/public/chunk-QBDCMHMS.js +0 -1
- package/public/chunk-R23RQFWE.js +0 -1
- package/public/chunk-RJFVCCT6.js +0 -1
- package/public/chunk-UXKMPYAN.js +0 -1
- package/public/chunk-W3U5YRAT.js +0 -1
- package/public/chunk-YPSV6VWW.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ADLO54TI.js";import"./chunk-GKSJJJEG.js";import"./chunk-ZREFVRCJ.js";import"./chunk-R5JL6NY3.js";import"./chunk-6WEQLPNK.js";import"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import"./chunk-ZS7TMHAN.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as ConfigEditorComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _,b as D}from"./chunk-
|
|
1
|
+
import{a as _,b as D}from"./chunk-ON2E7LVH.js";import{j as c,k as S}from"./chunk-UL2YWIGQ.js";import{f as x}from"./chunk-DNCUP6B7.js";import{C as v,Rc as I,g as O,ga as h,h as a,ha as E,ja as y,la as l,ma as f,r as p,ub as j,w as d,x as T,z as w}from"./chunk-NVNBNEFN.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(I))},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=j({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,b as y,c as $,d as j}from"./chunk-
|
|
1
|
+
import{a as C,b as y,c as $,d as j}from"./chunk-XEJ57GXO.js";import"./chunk-XBIY2EKP.js";import{q as d}from"./chunk-WCXU6QPE.js";import{y as l,z as u}from"./chunk-JKRWJSXD.js";import{d as v,g as n}from"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import{h as g,k as h}from"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import{a as M,c as U}from"./chunk-2WNK6SOS.js";import{ga as f,h as a,ha as i,id as c,ma as e,ub as s,w as p}from"./chunk-NVNBNEFN.js";var m=(()=>{class r{$api=e(h);$router=e(v);$toastr=e(g);$translate=e(M);constructor(){}resolve(){return a(this,null,function*(){try{return yield p(this.$api.get("/users"))}catch(o){console.error(o),this.$toastr.error(o.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})();var F=[{path:"",loadComponent:()=>import("./chunk-NTKR7QBR.js").then(r=>r.UsersComponent),resolve:{homebridgeUsers:m}}],b=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275mod=s({type:r});static \u0275inj=i({imports:[n.forChild(F),n]})}return r})();var Y=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275mod=s({type:r});static \u0275inj=i({providers:[m],imports:[c,l,u,U.forChild(),d,b,$,j,y,C]})}return r})();export{Y as UsersModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i}from"./chunk-ZS7TMHAN.js";import{c as s}from"./chunk-
|
|
1
|
+
import{d as i}from"./chunk-ZS7TMHAN.js";import{c as s}from"./chunk-ESRGAJUF.js";import{h as o}from"./chunk-UL2YWIGQ.js";import{a}from"./chunk-2WNK6SOS.js";import{ga as e,ma as r}from"./chunk-NVNBNEFN.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);constructor(){}canActivate(){return this.$auth.user&&this.$auth.user.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),this.$router.navigate(["/"]),!1)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-YYVRF4AL.js";import"./chunk-JMXJZ2Q7.js";import{c as S}from"./chunk-R5JL6NY3.js";import"./chunk-6WEQLPNK.js";import{q as d}from"./chunk-WCXU6QPE.js";import{y as u,z as f}from"./chunk-JKRWJSXD.js";import"./chunk-CHKLSRJ3.js";import{d as C,g as m}from"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import{h as v,k as g}from"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import{a as M,c as h}from"./chunk-2WNK6SOS.js";import{ga as c,h as p,ha as i,id as l,ma as e,ub as a,w as s}from"./chunk-NVNBNEFN.js";var n=(()=>{class t{$api=e(g);$router=e(C);$toastr=e(v);$translate=e(M);constructor(){}resolve(){return p(this,null,function*(){try{return yield s(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=c({token:t,factory:t.\u0275fac})}return t})();var j=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-PNVUM7VV.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-ASPLXDLK.js").then(t=>t.ContainerRestartComponent)}],$=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[m.forChild(j),m]})}return t})();var Q=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[l,u,f,S,d,h.forChild(),$,R]})}return t})();export{Q as DockerModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as i}from"./chunk-ZS7TMHAN.js";import"./chunk-DNCUP6B7.js";import{ha as t,id as l,ub as e}from"./chunk-NVNBNEFN.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-
|
|
1
|
+
import{g as i}from"./chunk-ZS7TMHAN.js";import"./chunk-DNCUP6B7.js";import{ha as t,id as l,ub as e}from"./chunk-NVNBNEFN.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-H3B6SNLD.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-LFQIH47S.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-MF5APUVW.js").then(o=>o.TerminalModule)}],n=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var s=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l,n]})}return o})();export{s as PlatformToolsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-CHKLSRJ3.js";import{d as y}from"./chunk-ZS7TMHAN.js";import{b as T}from"./chunk-ON2E7LVH.js";import{h as $,k as S}from"./chunk-UL2YWIGQ.js";import{a as _,b as g}from"./chunk-2WNK6SOS.js";import{Ac as m,Bc as p,Pb as l,Ub as r,Vb as n,Wb as f,cc as v,gb as i,ma as a,mc as s,nc as o,tb as x,zb as h}from"./chunk-NVNBNEFN.js";function C(t,u){t&1&&(r(0,"p",7),s(1),m(2,"translate"),n()),t&2&&(i(),o(p(2,1,"restart.please_wait_while_server_restarts")))}function k(t,u){if(t&1&&(r(0,"div",8),s(1),n()),t&2){let e=v();i(),o(e.error)}}function b(t,u){t&1&&(r(0,"div",9)(1,"div",11),f(2,"i",12),n()())}function E(t,u){t&1&&(r(0,"div",10),s(1),m(2,"translate"),n()),t&2&&(i(),o(p(2,1,"platform.linux.long_time")))}var A=(()=>{class t{$api=a(S);$router=a(y);$settings=a(T);$toastr=a($);$translate=a(_);$ws=a(w);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;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/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(c){return new(c||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,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[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"]],template:function(c,d){c&1&&(r(0,"div",0)(1,"h3",1),s(2),m(3,"translate"),n()(),r(4,"div",2)(5,"div",3),f(6,"i",4),n(),r(7,"div",5)(8,"h4",6),s(9),m(10,"translate"),n(),h(11,C,3,3,"p",7)(12,k,2,1,"div",8)(13,b,3,0,"div",9)(14,E,3,3,"div",10),n()()),c&2&&(i(2),o(p(3,6,"menu.restart.title")),i(7),o(p(10,8,"platform.linux.restarting_server")),i(2),l(d.error?-1:11),i(),l(d.error?12:-1),i(),l(d.error?-1:13),i(),l(d.timeout?14:-1))},dependencies:[g],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{A as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-I5QQRRPS.js";import"./chunk-CHKLSRJ3.js";import"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as RestartLinuxComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-CHKLSRJ3.js";import{d as w}from"./chunk-ZS7TMHAN.js";import{b}from"./chunk-ON2E7LVH.js";import{h as k,k as S}from"./chunk-UL2YWIGQ.js";import{a as $,b as T}from"./chunk-2WNK6SOS.js";import{Ac as c,Bc as p,Cc as C,Kb as g,Pb as m,Ub as r,Vb as n,Wb as f,cb as v,cc as h,gb as i,ma as a,mc as o,nc as s,tb as _,wc as y,zb as x}from"./chunk-NVNBNEFN.js";var I=t=>({command:t});function R(t,u){t&1&&(r(0,"p",7),o(1),c(2,"translate"),n()),t&2&&(i(),s(p(2,1,"restart.please_wait_while_server_restarts")))}function D(t,u){if(t&1&&(r(0,"div",8),o(1),n()),t&2){let e=h();i(),s(e.error)}}function B(t,u){t&1&&(r(0,"div",9)(1,"div",11),f(2,"i",12),n()())}function M(t,u){if(t&1&&(r(0,"div",10)(1,"p"),o(2),c(3,"translate"),n(),f(4,"p",13),c(5,"translate"),n()),t&2){let e=h();i(2),s(p(3,2,"platform.docker.server_long_time")),i(2),g("innerHTML",C(5,4,"platform.docker.run_with_restart",y(7,I,e.command)),v)}}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(l){return new(l||t)};static \u0275cmp=_({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(l,d){l&1&&(r(0,"div",0)(1,"h3",1),o(2),c(3,"translate"),n()(),r(4,"div",2)(5,"div",3),f(6,"i",4),n(),r(7,"div",5)(8,"h4",6),o(9),c(10,"translate"),n(),x(11,R,3,3,"p",7)(12,D,2,1,"div",8)(13,B,3,0,"div",9)(14,M,6,9,"div",10),n()()),l&2&&(i(2),s(p(3,6,"menu.restart.title")),i(7),s(p(10,8,"platform.docker.title_restarting")),i(2),m(d.error?-1:11),i(),m(d.error?12:-1),i(),m(d.error?-1:13),i(),m(d.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 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-3QZ375B7.js";import{q as p}from"./chunk-WCXU6QPE.js";import{z as m}from"./chunk-JKRWJSXD.js";import{g as i}from"./chunk-ZS7TMHAN.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import{c as s}from"./chunk-2WNK6SOS.js";import{ha as t,id as n,ub as r}from"./chunk-NVNBNEFN.js";var a=[{path:"",loadComponent:()=>import("./chunk-UTIL4E7P.js").then(o=>o.PowerOptionsComponent)}],u=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(a),i]})}return o})();var j=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,u,p,m,s]})}return o})();export{j as PowerOptionsModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ZJTXU2GZ.js";import"./chunk-IC7Y4XQH.js";import"./chunk-7V7FVNQR.js";import"./chunk-CPYAFTPH.js";import"./chunk-ZREFVRCJ.js";import"./chunk-R5JL6NY3.js";import"./chunk-JN4WEHM3.js";import"./chunk-6WEQLPNK.js";import"./chunk-NSTYUUFS.js";import"./chunk-XHTRCMG4.js";import"./chunk-XBIY2EKP.js";import"./chunk-FNBFKTZI.js";import"./chunk-YCKXYAPE.js";import"./chunk-WPESHLCE.js";import"./chunk-2TXKGWMR.js";import"./chunk-V65HN5SX.js";import"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import"./chunk-CHKLSRJ3.js";import"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as PluginsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-6ILQEJNG.js";import"./chunk-NSTYUUFS.js";import"./chunk-XHTRCMG4.js";import"./chunk-FNBFKTZI.js";import"./chunk-YCKXYAPE.js";import"./chunk-V65HN5SX.js";import{q as n}from"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import"./chunk-CHKLSRJ3.js";import{g as i}from"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import{c as s}from"./chunk-2WNK6SOS.js";import{ha as t,id as m,ub as r}from"./chunk-NVNBNEFN.js";var f=[{path:"",loadComponent:()=>import("./chunk-PWQDJSBN.js").then(o=>o.LogsComponent)}],p=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(f),i]})}return o})();var h=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[m,p,n,s.forChild()]})}return o})();export{h as LogsModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MNIEFP5R.js";import"./chunk-6KTIHC4T.js";import"./chunk-XHTRCMG4.js";import"./chunk-YCKXYAPE.js";import"./chunk-CHKLSRJ3.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as TerminalComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-I5QQRRPS.js";import"./chunk-X7R5UQDS.js";import"./chunk-CHKLSRJ3.js";import{g as n}from"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import{c as m}from"./chunk-2WNK6SOS.js";import{ha as t,id as i,ub as r}from"./chunk-NVNBNEFN.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-IU42UO7J.js").then(o=>o.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-RDPAVLAZ.js").then(o=>o.ShutdownLinuxComponent)}],u=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n.forChild(d),n]})}return o})();var g=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i,m.forChild(),u]})}return o})();export{g as LinuxModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-WSXVUEYM.js";import"./chunk-X3WLRBIN.js";import"./chunk-MRUJHSFO.js";import"./chunk-6WEQLPNK.js";import"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import"./chunk-CHKLSRJ3.js";import"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as AccessoriesComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-MNIEFP5R.js";import"./chunk-6KTIHC4T.js";import"./chunk-XHTRCMG4.js";import"./chunk-YCKXYAPE.js";import"./chunk-CHKLSRJ3.js";import{g as i}from"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import{c as m}from"./chunk-2WNK6SOS.js";import{ha as t,id as n,ub as r}from"./chunk-NVNBNEFN.js";var u=[{path:"",loadComponent:()=>import("./chunk-KXTEHFOE.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 X}from"./chunk-IFJS5HBB.js";import{a as H}from"./chunk-WPESHLCE.js";import{a as Z}from"./chunk-2TXKGWMR.js";import{a as R}from"./chunk-V65HN5SX.js";import{n as L}from"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import{a as j}from"./chunk-MAIN5YCW.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-ZS7TMHAN.js";import{c as B}from"./chunk-V5C6TH72.js";import{b as $}from"./chunk-Y5URZ5MZ.js";import{j as T}from"./chunk-BAWBN252.js";import"./chunk-DNCUP6B7.js";import{a as M,b as U}from"./chunk-2WNK6SOS.js";import{$c as E,Ac as d,Bc as l,Jb as u,Kb as c,Pb as C,Ub as n,Vb as a,Wb as p,_b as y,bc as _,cc as w,g as Y,gb as o,h as z,lb as F,ma as m,mc as f,nc as g,od as K,tb as P,ua as h,va as b,vc as v,w as A,wc as k,zb as O}from"./chunk-NVNBNEFN.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&((window==null?void 0:window.matchMedia("(display-mode: standalone)").matches)||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||(window==null?void 0:window.Windows)||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){h(e);let t=w();return b(t.openUnderVoltageModal())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),g(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),g(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),g(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),g(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),g(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),g(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.reloadPage())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.reload")),o(5),g(l(7,4,"menu.reload")))}function be(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.$auth.logout())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),g(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=m(V);translate=m(M);$auth=m(B);$settings=m($);$modal=m(L);$notification=m(X);$translate=m(M);renderer=m(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){let e=this.router;this.isMobile=window.innerWidth<768;let s;window.addEventListener("resize",()=>{clearTimeout(s),s=setTimeout(()=>{this.updateListeners()},500)}),e.events.subscribe(t=>{t instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}reloadPage(){window.location.reload()}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:61,vars:67,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),O(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),O(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),O(59,he,8,6,"div",10)(60,be,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,34,"menu.sidebar.aria_menu")),o(3),c("routerLink",v(56,I)),u("aria-label",l(4,36,"menu.label_status")),o(5),c("ngClass",k(57,te,t.isExpanded)),o(5),c("ngClass",k(59,ne,t.isExpanded)),o(2),c("routerLink",v(61,I)),u("aria-label",l(16,38,"menu.label_status")),o(7),c("routerLink",v(62,I))("routerLinkActive","active")("routerLinkActiveOptions",v(63,ie)),u("aria-label",l(23,40,"menu.label_status")),o(5),g(l(28,42,"menu.label_status")),o(2),C(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),C(t.$auth.user.admin?30:-1),o(2),c("routerLink",v(64,oe))("routerLinkActive","active"),u("aria-label",l(33,44,"menu.label_accessories")),o(5),g(l(38,46,"menu.label_accessories")),o(2),C(t.$auth.user.admin?39:-1),o(),C(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),C(t.$auth.user.admin?41:-1),o(),C(t.$auth.user.admin?42:-1),o(2),c("routerLink",v(65,re))("routerLinkActive","active"),u("aria-label",l(45,48,"support.title")),o(5),g(l(50,50,"support.title")),o(3),c("routerLink",v(66,ae))("routerLinkActive","active"),u("aria-label",l(53,52,"menu.restart.title")),o(5),g(l(58,54,"menu.restart.title")),o(2),C(t.isPwa?59:-1),o(),C(t.$settings.formAuth?60:-1))},dependencies:[N,K,E,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var we=i=>({sidebarExpanded:i}),Xe=(()=>{class i{$auth=m(B);$modal=m(L);$router=m(V);$settings=m($);$translate=m(M);$ws=m(j);sidebarExpanded=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",k(2,we,t.sidebarExpanded)))},dependencies:[J,E,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{Xe as LayoutComponent};
|
|
1
|
+
import{a as X}from"./chunk-IFJS5HBB.js";import{a as H}from"./chunk-WPESHLCE.js";import{a as Z}from"./chunk-2TXKGWMR.js";import{a as R}from"./chunk-V65HN5SX.js";import{n as L}from"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import{a as j}from"./chunk-CHKLSRJ3.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-ZS7TMHAN.js";import{c as B}from"./chunk-ESRGAJUF.js";import{b as $}from"./chunk-ON2E7LVH.js";import{j as T}from"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import{a as M,b as U}from"./chunk-2WNK6SOS.js";import{$c as E,Ac as d,Bc as l,Jb as u,Kb as c,Pb as C,Ub as n,Vb as a,Wb as p,_b as y,bc as _,cc as w,g as Y,gb as o,h as z,lb as F,ma as m,mc as f,nc as g,od as K,tb as P,ua as h,va as b,vc as v,w as A,wc as k,zb as O}from"./chunk-NVNBNEFN.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&((window==null?void 0:window.matchMedia("(display-mode: standalone)").matches)||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||(window==null?void 0:window.Windows)||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){h(e);let t=w();return b(t.openUnderVoltageModal())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),g(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),g(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),g(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),g(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),g(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),g(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.reloadPage())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.reload")),o(5),g(l(7,4,"menu.reload")))}function be(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.$auth.logout())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),g(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=m(V);translate=m(M);$auth=m(B);$settings=m($);$modal=m(L);$notification=m(X);$translate=m(M);renderer=m(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){let e=this.router;this.isMobile=window.innerWidth<768;let s;window.addEventListener("resize",()=>{clearTimeout(s),s=setTimeout(()=>{this.updateListeners()},500)}),e.events.subscribe(t=>{t instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}reloadPage(){window.location.reload()}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:61,vars:67,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),O(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),O(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),O(59,he,8,6,"div",10)(60,be,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,34,"menu.sidebar.aria_menu")),o(3),c("routerLink",v(56,I)),u("aria-label",l(4,36,"menu.label_status")),o(5),c("ngClass",k(57,te,t.isExpanded)),o(5),c("ngClass",k(59,ne,t.isExpanded)),o(2),c("routerLink",v(61,I)),u("aria-label",l(16,38,"menu.label_status")),o(7),c("routerLink",v(62,I))("routerLinkActive","active")("routerLinkActiveOptions",v(63,ie)),u("aria-label",l(23,40,"menu.label_status")),o(5),g(l(28,42,"menu.label_status")),o(2),C(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),C(t.$auth.user.admin?30:-1),o(2),c("routerLink",v(64,oe))("routerLinkActive","active"),u("aria-label",l(33,44,"menu.label_accessories")),o(5),g(l(38,46,"menu.label_accessories")),o(2),C(t.$auth.user.admin?39:-1),o(),C(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),C(t.$auth.user.admin?41:-1),o(),C(t.$auth.user.admin?42:-1),o(2),c("routerLink",v(65,re))("routerLinkActive","active"),u("aria-label",l(45,48,"support.title")),o(5),g(l(50,50,"support.title")),o(3),c("routerLink",v(66,ae))("routerLinkActive","active"),u("aria-label",l(53,52,"menu.restart.title")),o(5),g(l(58,54,"menu.restart.title")),o(2),C(t.isPwa?59:-1),o(),C(t.$settings.formAuth?60:-1))},dependencies:[N,K,E,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var we=i=>({sidebarExpanded:i}),Xe=(()=>{class i{$auth=m(B);$modal=m(L);$router=m(V);$settings=m($);$translate=m(M);$ws=m(j);sidebarExpanded=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",k(2,we,t.sidebarExpanded)))},dependencies:[J,E,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{Xe as LayoutComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-6KTIHC4T.js";import{b}from"./chunk-2WNK6SOS.js";import{Ac as y,Bc as T,Ub as r,Vb as o,Wb as u,bc as p,fb as l,gb as s,jc as f,kc as v,ma as a,mc as g,n as m,nc as w,pb as d,tb as c}from"./chunk-NVNBNEFN.js";var C=["terminaloutput"],k=(()=>{class t{$terminal=a(h);termTarget=d("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=c({type:t,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&f(n.termTarget,C,5),e&2&&v()},hostBindings:function(e,n){e&1&&p("resize",function(x){return n.onWindowResize(x)},!1,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),g(3),y(4,"translate"),o()()(),r(5,"div",4),u(6,"div",5,0),o()),e&2&&(s(3),w(T(4,1,"menu.linux.label_terminal")))},dependencies:[b],encapsulation:2})}return t})();export{k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-CHKLSRJ3.js";import{d as E}from"./chunk-ZS7TMHAN.js";import{b as B}from"./chunk-ON2E7LVH.js";import{h as O,k as R}from"./chunk-UL2YWIGQ.js";import{a as k,b as I}from"./chunk-2WNK6SOS.js";import{$c as T,Ac as o,Bc as l,Kb as _,Pb as u,Ub as r,Vb as n,Wb as v,_b as $,bc as S,cc as f,gb as e,ma as m,mc as a,nc as p,oc as x,tb as w,ua as C,va as y,wc as b,xc as g,zb as h}from"./chunk-NVNBNEFN.js";var U=(t,c)=>({"fas fa-fw fa-spinner fa-spin":t,"far fa-fw fa-check-circle":c}),F=t=>({"grey-text":t}),P=(t,c)=>({"far fa-fw fa-circle":t,"fas fa-fw fa-spinner fa-spin":c});function j(t,c){t&1&&(r(0,"p",7),a(1),o(2,"translate"),n()),t&2&&(e(),p(l(2,1,"restart.please_wait_while_server_restarts")))}function M(t,c){if(t&1&&(r(0,"div",8),a(1),n()),t&2){let i=f();e(),p(i.error)}}function V(t,c){if(t&1&&(r(0,"div",9)(1,"div",11)(2,"span"),v(3,"i",12),a(4),o(5,"translate"),n()(),r(6,"div",11)(7,"span",12),v(8,"i",12),a(9),o(10,"translate"),n()()()),t&2){let i=f();e(3),_("ngClass",g(9,U,!i.uiOnline,i.uiOnline)),e(),x(" ",l(5,5,"restart.ui_online")," "),e(3),_("ngClass",b(12,F,!i.uiOnline)),e(),_("ngClass",g(14,P,!i.uiOnline,i.uiOnline)),e(),x(" ",l(10,7,"restart.service_ready")," ")}}function z(t,c){if(t&1){let i=$();r(0,"p",15)(1,"button",16),S("click",function(){C(i);let d=f(2);return y(d.viewLogs())}),a(2),o(3,"translate"),n()()}t&2&&(e(2),p(l(3,1,"menu.tooltip_view_logs")))}function A(t,c){if(t&1&&(r(0,"div",10)(1,"p"),a(2),o(3,"translate"),n(),r(4,"p",13),a(5),o(6,"translate"),r(7,"span",14),a(8),n()(),h(9,z,4,3,"p",15),n()),t&2){let i=f();e(2),p(l(3,4,"restart.server_is_taking_long_time_to_restart")),e(3),x(" ",l(6,6,"restart.label_restart_command_executed"),": "),e(3),p(i.resp.command||"End Process"),e(),u(i.uiOnline?9:-1)}}var Y=(()=>{class t{$api=m(R);$router=m(E);$settings=m(B);$toastr=m(O);$translate=m(k);$ws=m(D);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;uiOnline=!1;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.$router.parseUrl(this.$router.url).queryParams.restarting?(this.uiOnline=!0,this.checkIfServerUp()):this.$api.put("/server/restart",{}).subscribe({next:s=>{this.resp=s,this.checkIfServerUp(),s.restartingUI||(this.uiOnline=!0)},error:s=>{console.error(s),this.error=this.$translate.instant("restart.toast_server_restart_error"),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",i=>{this.uiOnline=!0,(i.status==="up"||i.status==="pending")&&(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},7e3),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},4e4)}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=w({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,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[1,"justify-content-center","my-4"],[1,"alert","alert-warning","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(s,d){s&1&&(r(0,"div",0)(1,"h3",1),a(2),o(3,"translate"),n()(),r(4,"div",2)(5,"div",3),v(6,"i",4),n(),r(7,"div",5)(8,"h4",6),a(9),o(10,"translate"),n(),h(11,j,3,3,"p",7)(12,M,2,1,"div",8)(13,V,11,17,"div",9)(14,A,10,8,"div",10),n()()),s&2&&(e(2),p(l(3,6,"menu.restart.title")),e(7),p(l(10,8,"restart.title_restart")),e(2),u(d.error?-1:11),e(),u(d.error?12:-1),e(),u(d.error?-1:13),e(),u(d.timeout?14:-1))},dependencies:[T,I],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{Y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as X}from"./chunk-WCXU6QPE.js";import{e as q,l as G,r as H,s as J,t as K,y as Q}from"./chunk-JKRWJSXD.js";import{d as te}from"./chunk-ZS7TMHAN.js";import{h as ee,k as ie}from"./chunk-
|
|
1
|
+
import{m as X}from"./chunk-WCXU6QPE.js";import{e as q,l as G,r as H,s as J,t as K,y as Q}from"./chunk-JKRWJSXD.js";import{d as te}from"./chunk-ZS7TMHAN.js";import{h as ee,k as ie}from"./chunk-UL2YWIGQ.js";import{a as Y,b as Z}from"./chunk-2WNK6SOS.js";import{$c as z,Ac as d,Bc as m,Jb as $,Kb as b,Pb as u,Rb as k,Sb as E,Tb as T,Ub as a,Vb as o,Wb as B,_b as S,a as M,b as V,bc as h,cc as c,gb as s,h as F,ma as w,mc as l,nc as g,oc as I,pc as L,rc as N,sc as P,tb as U,tc as j,ua as f,va as C,w as A,xc as O,yc as W,zb as x}from"./chunk-NVNBNEFN.js";var se=(t,r)=>({"btn-danger":t,"btn-elegant":r}),ae=(t,r,e)=>({"fa-trash":t,"fa-undo":r,"fa-spinner fa-pulse":e});function oe(t,r){t&1&&(a(0,"div",12),B(1,"i",13),o(),a(2,"p",14),l(3),d(4,"translate"),o()),t&2&&(s(3),g(m(4,1,"reset.no_accessories")))}function re(t,r){if(t&1&&(a(0,"option",24),l(1),o()),t&2){let e=r.$implicit;b("value",e._id),s(),L("",e.name," (",e._username,")")}}function le(t,r){if(t&1){let e=S();a(0,"li",20),l(1),d(2,"translate"),o(),a(3,"li",18)(4,"label",21),l(5),d(6,"translate"),o(),a(7,"div",22)(8,"select",23),j("ngModelChange",function(i){f(e);let _=c(2);return P(_.selectedBridge,i)||(_.selectedBridge=i),C(i)}),h("change",function(i){f(e);let _=c(2);return C(_.onBridgeChange(i.target.value))}),E(9,re,2,3,"option",24,k),o()()()}if(t&2){let e=c(2);s(),g(m(2,3,"form.label.changes_kept")),s(4),g(m(6,5,"reset.accessory_ind.bridge")),s(3),N("ngModel",e.selectedBridge),s(),T(e.pairings)}}function ce(t,r){if(t&1&&(a(0,"li",18)(1,"label",25),l(2),d(3,"translate"),o(),a(4,"div",26),l(5),o()()),t&2){let e=c(2);s(2),g(m(3,2,"reset.accessory_ind.bridge")),s(3),I(" ",e.getCurrentlySelectedBridge()," ")}}function de(t,r){if(t&1){let e=S();a(0,"li",19)(1,"span"),l(2),B(3,"br"),a(4,"small")(5,"span",27),l(6),o()()(),a(7,"button",28),d(8,"translate"),h("click",function(){let i=f(e).$implicit,_=c(2);return C(_.toggleList(i.UUID,i.$cacheFile))}),B(9,"i",29),o()()}if(t&2){let e=r.$implicit,n=c(2);s(2),I(" ",e.displayName,""),s(4),g(e.UUID),s(),b("disabled",n.clicked)("ngClass",O(8,se,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile))),$("aria-label",m(8,6,"form.button_delete")),s(2),b("ngClass",W(11,ae,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile)&&!n.clicked,n.isInList(e.UUID,e.$cacheFile)&&n.clicked))}}function me(t,r){if(t&1&&(a(0,"div",12),B(1,"i",15),o(),a(2,"ul",16)(3,"li"),l(4),d(5,"translate"),o(),a(6,"li"),l(7),d(8,"translate"),o(),a(9,"li"),l(10),d(11,"translate"),o()(),a(12,"ul",17),x(13,le,11,7)(14,ce,6,4,"li",18),E(15,de,10,15,"li",19,k),o()),t&2){let e=c();s(4),g(m(5,5,"reset.accessory_ind.list_1")),s(3),g(m(8,7,"reset.accessory_ind.list_2")),s(3),g(m(11,9,"reset.accessory_ind.list_3")),s(3),u(e.pairings.length>1?13:-1),s(),u(e.pairings.length===1?14:-1),s(),T(e.selectedBridgeAccessories)}}function pe(t,r){if(t&1){let e=S();a(0,"button",30),h("click",function(){f(e);let i=c();return C(i.$activeModal.dismiss("Dismiss"))}),l(1),d(2,"translate"),o()}if(t&2){let e=c();b("disabled",e.clicked),s(),I(" ",m(2,2,"form.button_close")," ")}}function _e(t,r){if(t&1){let e=S();a(0,"button",31),h("click",function(){f(e);let i=c();return C(i.$activeModal.dismiss("Dismiss"))}),l(1),d(2,"translate"),o()}t&2&&(s(),I(" ",m(2,1,"form.button_close")," "))}function ue(t,r){if(t&1&&l(0),t&2){let e=c(3);I(" (",e.toDelete.length,") ")}}function ge(t,r){if(t&1&&(l(0),d(1,"translate"),x(2,ue,1,1)),t&2){let e=c(2);I(" ",m(1,2,"form.button_remove")," "),s(2),u(e.toDelete.length>0?2:-1)}}function xe(t,r){t&1&&B(0,"i",33)}function ve(t,r){if(t&1){let e=S();a(0,"button",32),h("click",function(){f(e);let i=c();return C(i.removeAccessories())}),x(1,ge,3,4)(2,xe,1,0,"i",33),o()}if(t&2){let e=c();b("disabled",!e.toDelete.length||e.clicked),s(),u(e.clicked?-1:1),s(),u(e.clicked?2:-1)}}var Te=(()=>{class t{$activeModal=w(X);$api=w(ie);$router=w(te);$toastr=w(ee);$translate=w(Y);pairings=[];selectedBridge="";clicked=!1;selectedBridgeAccessories=[];accessoriesExist=!1;toDelete=[];constructor(){}ngOnInit(){this.loadCachedAccessories()}loadCachedAccessories(){return F(this,null,function*(){var e;try{let[n,i]=yield Promise.all([A(this.$api.get("/server/cached-accessories")),A(this.$api.get("/server/pairings"))]),_=new Map(i.map(p=>[p._id,V(M({},p),{accessories:[]})]));n.sort((p,v)=>p.displayName.localeCompare(v.displayName)).forEach(p=>{var D,R;let v=i.find(ne=>ne._main),y=((R=(D=p.$cacheFile)==null?void 0:D.split("."))==null?void 0:R[1])||v._id;(!this.selectedBridge||this.selectedBridge===y)&&(_.has(y)||_.set(y,{_id:y,_username:y.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),_.get(y).accessories.push(p))}),this.pairings=Array.from(_.values()).filter(p=>p.accessories.length>0).sort((p,v)=>p._main&&!v._main?-1:!p._main&&v._main?1:p.name.localeCompare(v.name)),this.selectedBridge=this.selectedBridge||((e=this.pairings[0])==null?void 0:e._id),this.selectedBridge&&(this.accessoriesExist=!0,this.selectedBridgeAccessories=this.pairings[0].accessories)}catch(n){console.error(n),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}onBridgeChange(e){var n;this.selectedBridge=e,this.selectedBridgeAccessories=(n=this.pairings.find(i=>i._id===this.selectedBridge))==null?void 0:n.accessories}getCurrentlySelectedBridge(){let e=this.pairings.find(n=>n._id===this.selectedBridge);return`${e.name} - ${e._username}`}toggleList(e,n){this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)?this.toDelete=this.toDelete.filter(i=>i.uuid!==e&&i.cacheFile!==n):this.toDelete.push({cacheFile:n,uuid:e})}isInList(e,n){return this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)}removeAccessories(){return this.clicked=!0,this.$api.delete("/server/cached-accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=U({type:t,selectors:[["ng-component"]],inputs:{selectedBridge:"selectedBridge"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-fw","fa-network-wired","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas","fa-fw",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),l(3),d(4,"translate"),o(),a(5,"button",3),d(6,"translate"),h("click",function(){return i.$activeModal.dismiss("Dismiss")}),o()(),a(7,"div",4),x(8,oe,5,3)(9,me,17,11),o(),a(10,"div",5)(11,"div",6),x(12,pe,3,4,"button",7),o(),a(13,"div",8),x(14,_e,3,3,"button",9),o(),a(15,"div",10),x(16,ve,3,3,"button",11),o()()()),n&2&&(s(3),g(m(4,8,"reset.accessory_ind.title")),s(2),b("disabled",i.clicked),$("aria-label",m(6,10,"form.button_close")),s(3),u(i.accessoriesExist?-1:8),s(),u(i.accessoriesExist?9:-1),s(3),u(i.accessoriesExist?12:-1),s(2),u(i.accessoriesExist?-1:14),s(2),u(i.accessoriesExist?16:-1))},dependencies:[z,Z,Q,J,K,H,q,G],encapsulation:2})}return t})();export{Te as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,b as u}from"./chunk-
|
|
1
|
+
import{a as f,b as u}from"./chunk-WSXVUEYM.js";import{a as d}from"./chunk-RP6EJVPS.js";import{c as p}from"./chunk-X3WLRBIN.js";import"./chunk-MRUJHSFO.js";import"./chunk-JN4WEHM3.js";import"./chunk-6WEQLPNK.js";import{q as n}from"./chunk-WCXU6QPE.js";import{y as s}from"./chunk-JKRWJSXD.js";import"./chunk-CHKLSRJ3.js";import{g as i}from"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import{c}from"./chunk-2WNK6SOS.js";import{ha as r,id as m,ub as e}from"./chunk-NVNBNEFN.js";var C=[{path:"",loadComponent:()=>import("./chunk-LU42XXER.js").then(o=>o.AccessoriesComponent)}],l=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[i.forChild(C),i]})}return o})();var S=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[m,s,n,p,c.forChild(),d,l,u,f]})}return o})();export{S as AccessoriesModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k}from"./chunk-XHTRCMG4.js";import{a as z,b as A}from"./chunk-YCKXYAPE.js";import{a as l}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-XHTRCMG4.js";import{a as z,b as A}from"./chunk-YCKXYAPE.js";import{a as l}from"./chunk-CHKLSRJ3.js";import{M as n,g as r,ga as c,ma as d,n as h}from"./chunk-NVNBNEFN.js";var f=r(z(),1),a=r(A(),1),p=r(k(),1);var $=(()=>{class t{$ws=d(l);term;io;fitAddon;webLinksAddon;resize;elementResize;pluginName;constructor(){}startTerminal(m,s={},u,w){this.pluginName=w,this.elementResize=u,this.io=this.$ws.connectToNamespace("log"),this.term=new f.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new a.FitAddon,this.webLinksAddon=new p.WebLinksAddon,this.resize=new h,this.term.open(m.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{e as a}from"./chunk-XEJ57GXO.js";import"./chunk-XBIY2EKP.js";import"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as UsersComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n}from"./chunk-ZS7TMHAN.js";import{b as s}from"./chunk-
|
|
1
|
+
import{d as n}from"./chunk-ZS7TMHAN.js";import{b as s}from"./chunk-ON2E7LVH.js";import{ga as o,h as r,ma as e,w as i}from"./chunk-NVNBNEFN.js";var l=(()=>{class t{$router=e(n);$settings=e(s);constructor(){}canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as et,k as it}from"./chunk-BAWBN252.js";import{l as X}from"./chunk-DNCUP6B7.js";import{a as tt}from"./chunk-2WNK6SOS.js";import{T as K,e as ut,g as ct,ga as R,h as Q,ma as Y,n as G,w as N}from"./chunk-NVNBNEFN.js";var nt=ut((J,Z)=>{(function(M,b){typeof J=="object"&&typeof Z<"u"?Z.exports=b():typeof define=="function"&&define.amd?define(b):(M=typeof globalThis<"u"?globalThis:M||self).dayjs=b()})(J,function(){"use strict";var M=1e3,b=6e4,o=36e5,d="millisecond",$="second",L="minute",O="hour",y="day",W="week",v="month",z="quarter",S="year",_="date",B="Invalid Date",rt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,st=/\[([^\]]+)]|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 n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},ot={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,v),s=t-e<0,a=i.clone().add(n+(s?-1:1),v);return+(-(n+(t-e)/(s?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:v,y:S,w:W,d:y,D:_,h:O,m:L,s:$,ms:d,Q:z}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},x="en",D={};D[x]=at;var E="$isDayjsObject",U=function(r){return r instanceof V||!(!r||!r[E])},I=function r(i,t,n){var e;if(!i)return x;if(typeof i=="string"){var s=i.toLowerCase();D[s]&&(e=s),t&&(D[s]=t,e=s);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;D[c]=i,e=c}return!n&&e&&(x=e),e||!n&&x},f=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new V(t)},u=ot;u.l=I,u.i=U,u.w=function(r,i){return f(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var V=function(){function r(t){this.$L=I(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[E]=!0}var i=r.prototype;return i.parse=function(t){this.$d=function(n){var e=n.date,s=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(rt);if(a){var c=a[2]-1||0,h=(a[7]||"0").substring(0,3);return s?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,h)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,h)}}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()!==B},i.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return f(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<f(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,s=!!u.u(n)||n,a=u.p(t),c=function(k,m){var w=u.w(e.$u?Date.UTC(e.$y,m,k):new Date(e.$y,m,k),e);return s?w:w.endOf(y)},h=function(k,m){return u.w(e.toDate()[k].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(m)),e)},l=this.$W,g=this.$M,p=this.$D,j="set"+(this.$u?"UTC":"");switch(a){case S:return s?c(1,0):c(31,11);case v:return s?c(1,g):c(0,g+1);case W:var T=this.$locale().weekStart||0,A=(l<T?l+7:l)-T;return c(s?p-A:p+(6-A),g);case y:case _:return h(j+"Hours",0);case O:return h(j+"Minutes",1);case L:return h(j+"Seconds",2);case $:return h(j+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,s=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[y]=a+"Date",e[_]=a+"Date",e[v]=a+"Month",e[S]=a+"FullYear",e[O]=a+"Hours",e[L]=a+"Minutes",e[$]=a+"Seconds",e[d]=a+"Milliseconds",e)[s],h=s===y?this.$D+(n-this.$W):n;if(s===v||s===S){var l=this.clone().set(_,1);l.$d[c](h),l.init(),this.$d=l.set(_,Math.min(this.$D,l.daysInMonth())).$d}else c&&this.$d[c](h);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,s=this;t=Number(t);var a=u.p(n),c=function(g){var p=f(s);return u.w(p.date(p.date()+Math.round(g*t)),s)};if(a===v)return this.set(v,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===y)return c(1);if(a===W)return c(7);var h=(e={},e[L]=b,e[O]=o,e[$]=M,e)[a]||1,l=this.$d.getTime()+t*h;return u.w(l,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||B;var s=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,h=this.$m,l=this.$M,g=e.weekdays,p=e.months,j=e.meridiem,T=function(m,w,H,C){return m&&(m[w]||m(n,s))||H[w].slice(0,C)},A=function(m){return u.s(c%12||12,m,"0")},k=j||function(m,w,H){var C=m<12?"AM":"PM";return H?C.toLowerCase():C};return s.replace(st,function(m,w){return w||function(H){switch(H){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return l+1;case"MM":return u.s(l+1,2,"0");case"MMM":return T(e.monthsShort,l,p,3);case"MMMM":return T(p,l);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return T(e.weekdaysMin,n.$W,g,2);case"ddd":return T(e.weekdaysShort,n.$W,g,3);case"dddd":return g[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return k(c,h,!0);case"A":return k(c,h,!1);case"m":return String(h);case"mm":return u.s(h,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null}(m)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var s,a=this,c=u.p(n),h=f(t),l=(h.utcOffset()-this.utcOffset())*b,g=this-h,p=function(){return u.m(a,h)};switch(c){case S:s=p()/12;break;case v:s=p();break;case z:s=p()/3;break;case W:s=(g-l)/6048e5;break;case y:s=(g-l)/864e5;break;case O:s=g/o;break;case L:s=g/b;break;case $:s=g/M;break;default:s=g}return e?s:u.a(s)},i.daysInMonth=function(){return this.endOf(v).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),s=I(t,n,!0);return s&&(e.$L=s),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=V.prototype;return f.prototype=P,[["$ms",d],["$s",$],["$m",L],["$H",O],["$W",y],["$M",v],["$y",S],["$D",_]].forEach(function(r){P[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),f.extend=function(r,i){return r.$i||(r(i,V,f),r.$i=!0),f},f.locale=I,f.isDayjs=U,f.unix=function(r){return f(1e3*r)},f.en=D[x],f.Ls=D,f.p={},f})});var q=ct(nt(),1);var vt=(()=>{class M{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);env={};formAuth=!0;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;loginWallpaper;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 o=yield N(this.$api.get("/auth/settings"));this.formAuth=o.formAuth,this.env=o.env,this.lightingMode=o.lightingMode,this.loginWallpaper=o.loginWallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(o.theme),this.setMenuMode(o.menuMode),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(o.serverTimestamp),this.setUiVersion(o.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0)})}setBrowserLightingMode(o){this.browserLightingMode=o,this.lightingMode==="auto"&&this.setLightingMode(o,"browser")}setLightingMode(o,d){d==="user"&&(this.lightingMode=o),this.currentLightingMode=o,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(o){(!o||!this.themeList.includes(o))&&(o=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:o})).catch($=>console.error($)));let d=window.document.querySelector("body");d.classList.remove(`config-ui-x-${this.theme}`),d.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=o,this.actualLightingMode==="dark"?(d.classList.add(`config-ui-x-dark-mode-${this.theme}`),d.classList.contains("dark-mode")||d.classList.add("dark-mode")):(d.classList.add(`config-ui-x-${this.theme}`),d.classList.contains("dark-mode")&&d.classList.remove("dark-mode"))}setMenuMode(o){this.menuMode=o}setTitle(o){this.$title.setTitle(o||"Homebridge")}setUiVersion(o){this.uiVersion||(this.uiVersion=o)}setLang(o){o?this.$translate.use(o):o="auto",this.env.lang=o}setEnvItem(o,d){this.env[o]=d}checkServerTime(o){let $=(0,q.default)(o).diff((0,q.default)(),"hour");this.serverTimeOffset=$*60*60,($>=8||$<=-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(d){return new(d||M)};static \u0275prov=R({token:M,factory:M.\u0275fac,providedIn:"root"})}return M})();export{nt as a,vt as b};
|
|
1
|
+
import{h as et,k as it}from"./chunk-UL2YWIGQ.js";import{l as X}from"./chunk-DNCUP6B7.js";import{a as tt}from"./chunk-2WNK6SOS.js";import{T as K,e as ut,g as ct,ga as R,h as Q,ma as Y,n as G,w as N}from"./chunk-NVNBNEFN.js";var nt=ut((J,Z)=>{(function(M,b){typeof J=="object"&&typeof Z<"u"?Z.exports=b():typeof define=="function"&&define.amd?define(b):(M=typeof globalThis<"u"?globalThis:M||self).dayjs=b()})(J,function(){"use strict";var M=1e3,b=6e4,o=36e5,d="millisecond",$="second",L="minute",O="hour",y="day",W="week",v="month",z="quarter",S="year",_="date",B="Invalid Date",rt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,st=/\[([^\]]+)]|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 n=String(r);return!n||n.length>=i?r:""+Array(i+1-n.length).join(t)+r},ot={s:F,z:function(r){var i=-r.utcOffset(),t=Math.abs(i),n=Math.floor(t/60),e=t%60;return(i<=0?"+":"-")+F(n,2,"0")+":"+F(e,2,"0")},m:function r(i,t){if(i.date()<t.date())return-r(t,i);var n=12*(t.year()-i.year())+(t.month()-i.month()),e=i.clone().add(n,v),s=t-e<0,a=i.clone().add(n+(s?-1:1),v);return+(-(n+(t-e)/(s?e-a:a-e))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:v,y:S,w:W,d:y,D:_,h:O,m:L,s:$,ms:d,Q:z}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},x="en",D={};D[x]=at;var E="$isDayjsObject",U=function(r){return r instanceof V||!(!r||!r[E])},I=function r(i,t,n){var e;if(!i)return x;if(typeof i=="string"){var s=i.toLowerCase();D[s]&&(e=s),t&&(D[s]=t,e=s);var a=i.split("-");if(!e&&a.length>1)return r(a[0])}else{var c=i.name;D[c]=i,e=c}return!n&&e&&(x=e),e||!n&&x},f=function(r,i){if(U(r))return r.clone();var t=typeof i=="object"?i:{};return t.date=r,t.args=arguments,new V(t)},u=ot;u.l=I,u.i=U,u.w=function(r,i){return f(r,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var V=function(){function r(t){this.$L=I(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[E]=!0}var i=r.prototype;return i.parse=function(t){this.$d=function(n){var e=n.date,s=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(rt);if(a){var c=a[2]-1||0,h=(a[7]||"0").substring(0,3);return s?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,h)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,h)}}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()!==B},i.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},i.isAfter=function(t,n){return f(t)<this.startOf(n)},i.isBefore=function(t,n){return this.endOf(n)<f(t)},i.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,n){var e=this,s=!!u.u(n)||n,a=u.p(t),c=function(k,m){var w=u.w(e.$u?Date.UTC(e.$y,m,k):new Date(e.$y,m,k),e);return s?w:w.endOf(y)},h=function(k,m){return u.w(e.toDate()[k].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(m)),e)},l=this.$W,g=this.$M,p=this.$D,j="set"+(this.$u?"UTC":"");switch(a){case S:return s?c(1,0):c(31,11);case v:return s?c(1,g):c(0,g+1);case W:var T=this.$locale().weekStart||0,A=(l<T?l+7:l)-T;return c(s?p-A:p+(6-A),g);case y:case _:return h(j+"Hours",0);case O:return h(j+"Minutes",1);case L:return h(j+"Seconds",2);case $:return h(j+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,n){var e,s=u.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[y]=a+"Date",e[_]=a+"Date",e[v]=a+"Month",e[S]=a+"FullYear",e[O]=a+"Hours",e[L]=a+"Minutes",e[$]=a+"Seconds",e[d]=a+"Milliseconds",e)[s],h=s===y?this.$D+(n-this.$W):n;if(s===v||s===S){var l=this.clone().set(_,1);l.$d[c](h),l.init(),this.$d=l.set(_,Math.min(this.$D,l.daysInMonth())).$d}else c&&this.$d[c](h);return this.init(),this},i.set=function(t,n){return this.clone().$set(t,n)},i.get=function(t){return this[u.p(t)]()},i.add=function(t,n){var e,s=this;t=Number(t);var a=u.p(n),c=function(g){var p=f(s);return u.w(p.date(p.date()+Math.round(g*t)),s)};if(a===v)return this.set(v,this.$M+t);if(a===S)return this.set(S,this.$y+t);if(a===y)return c(1);if(a===W)return c(7);var h=(e={},e[L]=b,e[O]=o,e[$]=M,e)[a]||1,l=this.$d.getTime()+t*h;return u.w(l,this)},i.subtract=function(t,n){return this.add(-1*t,n)},i.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||B;var s=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),c=this.$H,h=this.$m,l=this.$M,g=e.weekdays,p=e.months,j=e.meridiem,T=function(m,w,H,C){return m&&(m[w]||m(n,s))||H[w].slice(0,C)},A=function(m){return u.s(c%12||12,m,"0")},k=j||function(m,w,H){var C=m<12?"AM":"PM";return H?C.toLowerCase():C};return s.replace(st,function(m,w){return w||function(H){switch(H){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return l+1;case"MM":return u.s(l+1,2,"0");case"MMM":return T(e.monthsShort,l,p,3);case"MMMM":return T(p,l);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return T(e.weekdaysMin,n.$W,g,2);case"ddd":return T(e.weekdaysShort,n.$W,g,3);case"dddd":return g[n.$W];case"H":return String(c);case"HH":return u.s(c,2,"0");case"h":return A(1);case"hh":return A(2);case"a":return k(c,h,!0);case"A":return k(c,h,!1);case"m":return String(h);case"mm":return u.s(h,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null}(m)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,n,e){var s,a=this,c=u.p(n),h=f(t),l=(h.utcOffset()-this.utcOffset())*b,g=this-h,p=function(){return u.m(a,h)};switch(c){case S:s=p()/12;break;case v:s=p();break;case z:s=p()/3;break;case W:s=(g-l)/6048e5;break;case y:s=(g-l)/864e5;break;case O:s=g/o;break;case L:s=g/b;break;case $:s=g/M;break;default:s=g}return e?s:u.a(s)},i.daysInMonth=function(){return this.endOf(v).$D},i.$locale=function(){return D[this.$L]},i.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),s=I(t,n,!0);return s&&(e.$L=s),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=V.prototype;return f.prototype=P,[["$ms",d],["$s",$],["$m",L],["$H",O],["$W",y],["$M",v],["$y",S],["$D",_]].forEach(function(r){P[r[1]]=function(i){return this.$g(i,r[0],r[1])}}),f.extend=function(r,i){return r.$i||(r(i,V,f),r.$i=!0),f},f.locale=I,f.isDayjs=U,f.unix=function(r){return f(1e3*r)},f.en=D[x],f.Ls=D,f.p={},f})});var q=ct(nt(),1);var vt=(()=>{class M{$api=Y(it);$title=Y(X);$toastr=Y(et);$translate=Y(tt);env={};formAuth=!0;uiVersion;theme;lightingMode;currentLightingMode;actualLightingMode;browserLightingMode;menuMode;loginWallpaper;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 o=yield N(this.$api.get("/auth/settings"));this.formAuth=o.formAuth,this.env=o.env,this.lightingMode=o.lightingMode,this.loginWallpaper=o.loginWallpaper,this.setLightingMode(this.lightingMode,"user"),this.setTheme(o.theme),this.setMenuMode(o.menuMode),this.setTitle(this.env.homebridgeInstanceName),this.checkServerTime(o.serverTimestamp),this.setUiVersion(o.env.packageVersion),this.setLang(this.env.lang),this.settingsLoaded=!0,this.settingsLoadedSubject.next(void 0)})}setBrowserLightingMode(o){this.browserLightingMode=o,this.lightingMode==="auto"&&this.setLightingMode(o,"browser")}setLightingMode(o,d){d==="user"&&(this.lightingMode=o),this.currentLightingMode=o,this.actualLightingMode=this.currentLightingMode==="auto"?this.browserLightingMode:this.currentLightingMode,this.theme&&this.setTheme(this.theme)}setTheme(o){(!o||!this.themeList.includes(o))&&(o=this.defaultTheme,N(this.$api.put("/config-editor/ui",{key:"theme",value:o})).catch($=>console.error($)));let d=window.document.querySelector("body");d.classList.remove(`config-ui-x-${this.theme}`),d.classList.remove(`config-ui-x-dark-mode-${this.theme}`),this.theme=o,this.actualLightingMode==="dark"?(d.classList.add(`config-ui-x-dark-mode-${this.theme}`),d.classList.contains("dark-mode")||d.classList.add("dark-mode")):(d.classList.add(`config-ui-x-${this.theme}`),d.classList.contains("dark-mode")&&d.classList.remove("dark-mode"))}setMenuMode(o){this.menuMode=o}setTitle(o){this.$title.setTitle(o||"Homebridge")}setUiVersion(o){this.uiVersion||(this.uiVersion=o)}setLang(o){o?this.$translate.use(o):o="auto",this.env.lang=o}setEnvItem(o,d){this.env[o]=d}checkServerTime(o){let $=(0,q.default)(o).diff((0,q.default)(),"hour");this.serverTimeOffset=$*60*60,($>=8||$<=-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(d){return new(d||M)};static \u0275prov=R({token:M,factory:M.\u0275fac,providedIn:"root"})}return M})();export{nt as a,vt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-YYVRF4AL.js";import"./chunk-R5JL6NY3.js";import"./chunk-6WEQLPNK.js";import"./chunk-JKRWJSXD.js";import"./chunk-ZS7TMHAN.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as StartupScriptComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-6ILQEJNG.js";import"./chunk-NSTYUUFS.js";import"./chunk-XHTRCMG4.js";import"./chunk-FNBFKTZI.js";import"./chunk-YCKXYAPE.js";import"./chunk-V65HN5SX.js";import"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import"./chunk-CHKLSRJ3.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as LogsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as a}from"./chunk-2OUYQIDT.js";import"./chunk-6KTIHC4T.js";import"./chunk-X3WLRBIN.js";import"./chunk-MRUJHSFO.js";import"./chunk-IFJS5HBB.js";import"./chunk-7V7FVNQR.js";import"./chunk-CPYAFTPH.js";import"./chunk-ZREFVRCJ.js";import"./chunk-R5JL6NY3.js";import"./chunk-JN4WEHM3.js";import"./chunk-6WEQLPNK.js";import"./chunk-NSTYUUFS.js";import"./chunk-XHTRCMG4.js";import"./chunk-XBIY2EKP.js";import"./chunk-FNBFKTZI.js";import"./chunk-YCKXYAPE.js";import"./chunk-WPESHLCE.js";import"./chunk-2TXKGWMR.js";import"./chunk-V65HN5SX.js";import"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import"./chunk-CHKLSRJ3.js";import"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as StatusComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-X7R5UQDS.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as ShutdownLinuxComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a}from"./chunk-A6T442AC.js";import"./chunk-SD472BD2.js";import"./chunk-MRUJHSFO.js";import"./chunk-CPYAFTPH.js";import"./chunk-ZREFVRCJ.js";import"./chunk-R5JL6NY3.js";import"./chunk-JN4WEHM3.js";import"./chunk-6WEQLPNK.js";import"./chunk-NSTYUUFS.js";import"./chunk-XHTRCMG4.js";import"./chunk-XBIY2EKP.js";import"./chunk-FNBFKTZI.js";import"./chunk-YCKXYAPE.js";import"./chunk-2TXKGWMR.js";import"./chunk-V65HN5SX.js";import"./chunk-WCXU6QPE.js";import"./chunk-JKRWJSXD.js";import"./chunk-CHKLSRJ3.js";import"./chunk-ZS7TMHAN.js";import"./chunk-ESRGAJUF.js";import"./chunk-ON2E7LVH.js";import"./chunk-UL2YWIGQ.js";import"./chunk-DNCUP6B7.js";import"./chunk-2WNK6SOS.js";import"./chunk-NVNBNEFN.js";export{a as SettingsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as N,B as x,C as D,D as W,E as I,F as j,G as O,H as q,I as B,J as G,K as R,L as U,M as V,N as z,O as E,P as J,Q as K,R as P,S as Q,e as f,f as a,g as s,h as C,i as d,j as c,k as u,l,m as g,n as M,o as y,p as h,q as v,r as S,s as b,t as w,u as A,v as F,w as k,x as T,y as H,z as L}from"./chunk-
|
|
1
|
+
import{A as N,B as x,C as D,D as W,E as I,F as j,G as O,H as q,I as B,J as G,K as R,L as U,M as V,N as z,O as E,P as J,Q as K,R as P,S as Q,e as f,f as a,g as s,h as C,i as d,j as c,k as u,l,m as g,n as M,o as y,p as h,q as v,r as S,s as b,t as w,u as A,v as F,w as k,x as T,y as H,z as L}from"./chunk-X3WLRBIN.js";import{b as X}from"./chunk-JN4WEHM3.js";import{q as i}from"./chunk-WCXU6QPE.js";import{y as n,z as t}from"./chunk-JKRWJSXD.js";import{c as p}from"./chunk-2WNK6SOS.js";import{ha as m,id as e,ub as r}from"./chunk-NVNBNEFN.js";var fm=(()=>{class o{static \u0275fac=function(Y){return new(Y||o)};static \u0275mod=r({type:o});static \u0275inj=m({providers:[a],imports:[e,n,t,p.forChild(),s,i,X,Q,f,G,B,U,D,h,v,V,T,k,H,L,S,N,x,c,P,K,J,E,y,M,R,g,q,O,I,W,F,j,z,A,d,C,b,w,l,u]})}return o})();export{fm as a};
|