homebridge-config-ui-x 5.5.1-beta.7 → 5.6.0
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 +1 -7
- package/dist/core/auth/auth.controller.d.ts +0 -2
- package/dist/core/config/config.service.d.ts +74 -6
- package/dist/core/config/config.service.js +0 -5
- package/dist/core/config/config.service.js.map +1 -1
- package/dist/core/config/config.startup.d.ts +12 -2
- package/dist/core/config/config.startup.js +0 -12
- package/dist/core/config/config.startup.js.map +1 -1
- package/dist/core/spa/spa.filter.d.ts +0 -3
- package/dist/core/spa/spa.filter.js +2 -22
- package/dist/core/spa/spa.filter.js.map +1 -1
- package/dist/globalDefaults.js +0 -3
- package/dist/globalDefaults.js.map +1 -1
- package/dist/main.js +3 -18
- package/dist/main.js.map +1 -1
- package/dist/modules/backup/backup.service.js +1 -4
- package/dist/modules/backup/backup.service.js.map +1 -1
- package/dist/modules/config-editor/config-editor.controller.d.ts +3 -3
- package/dist/modules/config-editor/config-editor.service.d.ts +2 -3
- package/dist/modules/config-editor/config-editor.service.js +13 -36
- package/dist/modules/config-editor/config-editor.service.js.map +1 -1
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.d.ts +1 -1
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -2
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
- package/dist/modules/log/log.gateway.d.ts +1 -1
- package/dist/modules/log/log.service.d.ts +4 -1
- package/dist/modules/log/log.service.js.map +1 -1
- package/dist/modules/platform-tools/terminal/terminal.gateway.d.ts +1 -1
- package/dist/modules/platform-tools/terminal/terminal.service.d.ts +8 -1
- package/dist/modules/platform-tools/terminal/terminal.service.js.map +1 -1
- package/dist/modules/plugins/plugins.controller.d.ts +5 -5
- package/dist/modules/plugins/plugins.service.d.ts +1 -1
- package/dist/modules/plugins/plugins.service.js +0 -6
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/dist/modules/server/server.controller.d.ts +0 -3
- package/dist/modules/server/server.controller.js +0 -13
- package/dist/modules/server/server.controller.js.map +1 -1
- package/dist/modules/server/server.service.js +3 -5
- package/dist/modules/server/server.service.js.map +1 -1
- package/dist/modules/status/status.controller.d.ts +2 -2
- package/dist/modules/status/status.gateway.d.ts +5 -5
- package/dist/modules/status/status.service.d.ts +29 -2
- package/dist/modules/status/status.service.js +9 -4
- package/dist/modules/status/status.service.js.map +1 -1
- package/package.json +2 -2
- package/public/3rdpartylicenses.txt +13 -13
- package/public/{chunk-Y4JYARXO.js → chunk-22PVDFCE.js} +1 -1
- package/public/{chunk-YRDGMK4T.js → chunk-26EI4TMU.js} +1 -1
- package/public/chunk-2GCOJOK2.js +1 -0
- package/public/{chunk-PFIRHRM5.js → chunk-2JOEE6TH.js} +1 -1
- package/public/{chunk-56NCRSXK.js → chunk-2KX534PL.js} +2 -2
- package/public/chunk-3GLEK5PO.js +1 -0
- package/public/chunk-3ZPDIOJP.js +1 -0
- package/public/{chunk-BWVMSIO4.js → chunk-45O7A76J.js} +1 -1
- package/public/chunk-4GCXGGZP.js +1 -0
- package/public/{chunk-D2RHA7X2.js → chunk-4HV5VBUX.js} +1 -1
- package/public/{chunk-5N45B6R7.js → chunk-4MEUIWY4.js} +1 -1
- package/public/{chunk-HPWK6TSC.js → chunk-5DLJ5232.js} +1 -1
- package/public/{chunk-OQM4FTFW.js → chunk-5SA6BZRC.js} +1 -1
- package/public/chunk-5UJGNWVZ.js +1 -0
- package/public/chunk-5Y3BIPLQ.js +1 -0
- package/public/{chunk-S4J6DBU3.js → chunk-6HYJYHLY.js} +1 -1
- package/public/chunk-6WXBZOVI.js +1 -0
- package/public/{chunk-DZUAVWLP.js → chunk-6YLT7NDE.js} +1 -1
- package/public/chunk-72ATQTM5.js +1 -0
- package/public/{chunk-MD7IQ7EC.js → chunk-732ZZPJC.js} +1 -1
- package/public/chunk-76EY53FS.js +1 -0
- package/public/{chunk-4S5TRRTM.js → chunk-A2HWJ2G5.js} +1 -1
- package/public/{chunk-QHDPBN4J.js → chunk-AJTGODYF.js} +1 -1
- package/public/{chunk-K2EZIL6H.js → chunk-AXPU54UR.js} +1 -1
- package/public/chunk-AZL6ANIU.js +1 -0
- package/public/{chunk-LHQCUFCP.js → chunk-B7ACJ247.js} +1 -1
- package/public/chunk-BE6EVQ43.js +1 -0
- package/public/{chunk-UERLDONE.js → chunk-CWBLLOU5.js} +1 -1
- package/public/chunk-E6EWEG2S.js +19 -0
- package/public/chunk-EPPQKARO.js +1 -0
- package/public/chunk-FGRA3MLA.js +1 -0
- package/public/{chunk-WJOFCHDT.js → chunk-FXRCC47A.js} +1 -1
- package/public/{chunk-CGPMZGNR.js → chunk-GCUB4KBA.js} +1 -1
- package/public/chunk-HDYZCMHI.js +1 -0
- package/public/chunk-HI24UXUI.js +1 -0
- package/public/{chunk-XJFWSI2A.js → chunk-I4PCV2JL.js} +1 -1
- package/public/{chunk-PRQPJEFJ.js → chunk-IJKIT7A3.js} +1 -1
- package/public/chunk-IZEKCAEE.js +1 -0
- package/public/chunk-JQ3FUL2I.js +2 -0
- package/public/chunk-K2Y72XZA.js +1 -0
- package/public/chunk-LONAPMLE.js +1 -0
- package/public/chunk-N6G4A6CB.js +1 -0
- package/public/chunk-NDJSUPAE.js +1 -0
- package/public/chunk-O3XTJPLY.js +2 -0
- package/public/chunk-OROL2MAP.js +1 -0
- package/public/chunk-PHI3ALNA.js +1 -0
- package/public/chunk-QPGZQSFV.js +1 -0
- package/public/chunk-R3FDPMAX.js +1 -0
- package/public/{chunk-3IUIBZIG.js → chunk-R6UTID3Z.js} +1 -1
- package/public/chunk-RN4HC5ZG.js +1 -0
- package/public/chunk-RQLIZDI7.js +1 -0
- package/public/chunk-TEITZMYK.js +1 -0
- package/public/chunk-TGFJLZZI.js +1 -0
- package/public/chunk-UAPZPQGY.js +49 -0
- package/public/chunk-UF5PIS5O.js +1 -0
- package/public/chunk-ULG3QICO.js +1 -0
- package/public/chunk-UPC5PDCF.js +40 -0
- package/public/chunk-UXOQX4NL.js +1 -0
- package/public/chunk-VT4775CA.js +4 -0
- package/public/chunk-WI7OEFPB.js +1 -0
- package/public/{chunk-V4K2YYFC.js → chunk-WIM4XI75.js} +1 -1
- package/public/{chunk-5TSHBP5C.js → chunk-WVUXQTE4.js} +1 -1
- package/public/chunk-XV3GV4GK.js +1 -0
- package/public/{chunk-XKBUDGTP.js → chunk-YBEY6H6T.js} +1 -1
- package/public/{chunk-NN57LKI4.js → chunk-YCD2MWRV.js} +1 -1
- package/public/{chunk-IHGRCBAQ.js → chunk-YIC5UWBJ.js} +1 -1
- package/public/chunk-YQ4ML5HX.js +1 -0
- package/public/chunk-Z2RK3DTY.js +1 -0
- package/public/chunk-Z6T4OYIT.js +1 -0
- package/public/index.html +2 -2
- package/public/main-JE3N6ZQT.js +1 -0
- package/public/{styles-5R4ZLUK4.css → styles-KAER7B5R.css} +1 -1
- package/dist/core/config/config.interfaces.d.ts +0 -118
- package/dist/core/config/config.interfaces.js +0 -3
- package/dist/core/config/config.interfaces.js.map +0 -1
- package/dist/core/spa/spa-html.service.d.ts +0 -5
- package/dist/core/spa/spa-html.service.js +0 -38
- package/dist/core/spa/spa-html.service.js.map +0 -1
- package/dist/modules/log/log.interfaces.d.ts +0 -4
- package/dist/modules/log/log.interfaces.js +0 -3
- package/dist/modules/log/log.interfaces.js.map +0 -1
- package/dist/modules/platform-tools/terminal/terminal.interfaces.d.ts +0 -8
- package/dist/modules/platform-tools/terminal/terminal.interfaces.js +0 -3
- package/dist/modules/platform-tools/terminal/terminal.interfaces.js.map +0 -1
- package/dist/modules/plugins/plugins.interfaces.d.ts +0 -211
- package/dist/modules/plugins/plugins.interfaces.js +0 -3
- package/dist/modules/plugins/plugins.interfaces.js.map +0 -1
- package/dist/modules/status/status.interfaces.d.ts +0 -27
- package/dist/modules/status/status.interfaces.js +0 -10
- package/dist/modules/status/status.interfaces.js.map +0 -1
- package/public/chunk-2FNOKD4V.js +0 -1
- package/public/chunk-2URLJNXS.js +0 -1
- package/public/chunk-4QX2JFQ3.js +0 -1
- package/public/chunk-5HRGBRFW.js +0 -1
- package/public/chunk-5P5PDPUV.js +0 -1
- package/public/chunk-6M46B4P2.js +0 -40
- package/public/chunk-7YH7QGSU.js +0 -1
- package/public/chunk-C2BJ6TMI.js +0 -1
- package/public/chunk-C3GIULAB.js +0 -1
- package/public/chunk-CMOTM56W.js +0 -1
- package/public/chunk-DS6QJJ67.js +0 -1
- package/public/chunk-EQDMW6AW.js +0 -1
- package/public/chunk-HUHI7UBZ.js +0 -1
- package/public/chunk-JFOMKOP4.js +0 -1
- package/public/chunk-L5TY36XZ.js +0 -1
- package/public/chunk-LPRP6UFT.js +0 -1
- package/public/chunk-LV5TYHZ7.js +0 -1
- package/public/chunk-M5SPFGD5.js +0 -1
- package/public/chunk-NLUWGNJN.js +0 -1
- package/public/chunk-NS7FNJX4.js +0 -1
- package/public/chunk-OBKKI254.js +0 -1
- package/public/chunk-P2O3U4B2.js +0 -1
- package/public/chunk-QKIZT7YY.js +0 -1
- package/public/chunk-QQMSIIDU.js +0 -1
- package/public/chunk-QXFI56AN.js +0 -2
- package/public/chunk-QYDIL6OE.js +0 -49
- package/public/chunk-RM72VE72.js +0 -1
- package/public/chunk-SIIVYDOU.js +0 -1
- package/public/chunk-SJODT5UV.js +0 -1
- package/public/chunk-T5DOWV7T.js +0 -1
- package/public/chunk-TUN7H57E.js +0 -1
- package/public/chunk-UY2KM7QI.js +0 -19
- package/public/chunk-UYPJZGAK.js +0 -1
- package/public/chunk-W5CPGK2R.js +0 -1
- package/public/chunk-WAOYNYGN.js +0 -1
- package/public/chunk-WFEKJT5W.js +0 -1
- package/public/chunk-WH4DTGEJ.js +0 -1
- package/public/chunk-WYUJZ326.js +0 -1
- package/public/chunk-Y7SL5IWD.js +0 -1
- package/public/chunk-ZHRPBG7M.js +0 -5
- package/public/chunk-ZT6IXE6R.js +0 -1
- package/public/main-5MJHMVKI.js +0 -1
package/public/chunk-NLUWGNJN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ue}from"./chunk-TUN7H57E.js";import{a as Ge}from"./chunk-XKBUDGTP.js";import{a as je}from"./chunk-SIIVYDOU.js";import{a as We}from"./chunk-LHQCUFCP.js";import{a as Ke}from"./chunk-OQM4FTFW.js";import{a as qe}from"./chunk-NS7FNJX4.js";import{a as dt,c as ct}from"./chunk-MD7IQ7EC.js";import{a as mt}from"./chunk-CGPMZGNR.js";import{a as He}from"./chunk-3IUIBZIG.js";import{g as ce,m as R,n as se,t as me}from"./chunk-QHDPBN4J.js";import{B as oe,C as re,b as ne,c as pe,e as ae,j as w,k as $e,l as Fe,n as Pe,p as de,s as Ae,t as Re,v as Ve,w as Me,x as De,z as Ne}from"./chunk-D2RHA7X2.js";import{a as Oe}from"./chunk-BWVMSIO4.js";import"./chunk-C2BJ6TMI.js";import{d as U,e as Le}from"./chunk-LV5TYHZ7.js";import{b as Y}from"./chunk-SJODT5UV.js";import{c as Te,d as he,f as le,g as ge,k as V,l as A,n as M,p as ze,q as D}from"./chunk-M5SPFGD5.js";import{Db as E,Eb as K,Ga as ee,Gb as x,Ha as fe,Hb as W,Ib as b,Kc as j,La as t,M as k,Mb as Ce,Nb as xe,Ob as Se,Pc as ie,Rc as we,Vb as l,Wa as P,Wb as u,Xb as g,Zc as Ee,_c as Be,ac as Ie,bc as ye,cc as ke,g as _e,gc as N,h as f,hc as F,ic as te,ja as C,kb as v,lb as _,mb as h,mc as r,nc as s,oa as S,ob as L,oc as G,pa as I,pb as z,qb as O,rb as m,sb as a,tb as o,ub as d,vb as T,w as $,wb as B,xb as H}from"./chunk-ZHRPBG7M.js";var Qe=(i,c)=>({"green-text":i,"grey-text":c});function ut(i,c){if(i&1){let e=E();a(0,"li",9)(1,"div",10),l(2),d(3,"br"),a(4,"small",11),d(5,"i",12),r(6,"translate"),l(7," \xB7 "),a(8,"span",13),l(9),o(),l(10),r(11,"titlecase"),o()(),a(12,"div",14)(13,"input",23),r(14,"translate"),x("click",function(){let p=S(e).$implicit,y=b();return I(y.toggleList(p._username))}),o(),d(15,"label",24),o()()}if(i&2){let e=c.$implicit,n=b();t(2),g(" ",e.name," "),t(3),m("ngbTooltip",s(6,11,e._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired"))("openDelay",150)("ngClass",F(17,Qe,e._isPaired,!e._isPaired)),t(4),u(e._username),t(),g(" \xB7 ",s(11,13,e._category)," "),t(3),m("id","hidePluginUpdates_"+e._username)("checked",!n.isInList(e._username))("disabled",n.clicked),v("aria-label",s(14,15,"form.button_allow")+" "+e.name),t(2),m("for","hidePluginUpdates_"+e._username)}}function _t(i,c){i&1&&(l(0),r(1,"translate")),i&2&&g(" ",s(1,1,"form.button_save")," ")}function ht(i,c){i&1&&d(0,"i",22)}var Je=(()=>{class i{$activeModal=C(R);$api=C(D);$settings=C(Y);$toastr=C(M);$translate=C(V);originalBlacklist=[];updatedBlacklist=[];existingBlacklist=[];clicked=!1;mainPairing={};pairings=[];get blacklistHasUpdated(){return this.updatedBlacklist.join(",")!==this.originalBlacklist.join(",")}ngOnInit(){return f(this,null,function*(){this.updatedBlacklist=this.existingBlacklist.map(e=>e.trim().toUpperCase()).sort((e,n)=>e.localeCompare(n)),this.originalBlacklist=[...this.updatedBlacklist];try{let e=yield $(this.$api.get("/server/pairings"));this.mainPairing=e.find(n=>n._main),this.pairings=e.filter(n=>!n._main).sort((n,p)=>n.name.localeCompare(p.name))}catch(e){console.error(e),this.$toastr.error(e.message,this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}toggleList(e){this.updatedBlacklist.includes(e)?this.updatedBlacklist=this.updatedBlacklist.filter(n=>n!==e):(this.updatedBlacklist.push(e),this.updatedBlacklist.sort((n,p)=>n.localeCompare(p)))}isInList(e){return this.updatedBlacklist.includes(e)}updateBlacklist(){return f(this,null,function*(){this.clicked=!0;try{yield $(this.$api.put("/config-editor/ui/accessory-control/instance-blacklist",{body:this.updatedBlacklist})),this.$settings.setEnvItem("accessoryControl.instanceBlacklist",this.updatedBlacklist),this.$activeModal.close()}catch(e){this.clicked=!1,console.error(e),this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],inputs:{existingBlacklist:"existingBlacklist"},decls:45,vars:35,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,"text-center","mb-3"],[1,"fas","fa-list-check","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"grey-text"],["container","body","triggers","hover","placement","left",1,"fas","fa-link",3,"ngbTooltip","openDelay","ngClass"],[1,"font-monospace"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","controlMainBridge",1,"rendux-input",3,"click","checked","disabled"],["for","controlMainBridge",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"],["type","checkbox",1,"rendux-input",3,"click","id","checked","disabled"],[1,"rendux-label","ms-3",3,"for"]],template:function(n,p){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),l(3),r(4,"translate"),o(),a(5,"button",3),r(6,"translate"),x("click",function(){return p.dismissModal()}),o()(),a(7,"div",4)(8,"div",5),d(9,"i",6),o(),a(10,"ul",7)(11,"li"),l(12),r(13,"translate"),o(),a(14,"li"),l(15),r(16,"translate"),o()(),a(17,"ul",8)(18,"li",9)(19,"div",10),l(20),d(21,"br"),a(22,"small",11),d(23,"i",12),r(24,"translate"),l(25," \xB7 "),a(26,"span",13),l(27),o(),l(28," \xB7 Homebridge "),o()(),a(29,"div",14)(30,"input",15),r(31,"translate"),x("click",function(){return p.toggleList(p.mainPairing._username)}),o(),d(32,"label",16),o()(),z(33,ut,16,20,"li",9,L),o()(),a(35,"div",17)(36,"div",10)(37,"button",18),x("click",function(){return p.dismissModal()}),l(38),r(39,"translate"),o()(),d(40,"div",19),a(41,"div",20)(42,"button",21),x("click",function(){return p.updateBlacklist()}),_(43,_t,2,3),_(44,ht,1,0,"i",22),o()()()()),n&2&&(t(3),u(s(4,18,"settings.security.ui_control")),t(2),m("disabled",p.clicked),v("aria-label",s(6,20,"form.button_close")),t(7),u(s(13,22,"settings.security.ui_control_desc")),t(3),u(s(16,24,"settings.security.ui_control_desc_2")),t(5),g(" ",p.mainPairing.name),t(3),m("ngbTooltip",s(24,26,p.mainPairing._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired"))("openDelay",150)("ngClass",F(32,Qe,p.mainPairing._isPaired,!p.mainPairing._isPaired)),t(4),u(p.mainPairing._username),t(3),m("checked",!p.isInList(p.mainPairing._username))("disabled",p.clicked),v("aria-label",s(31,28,"plugins.manage.hide_updates")),t(3),O(p.pairings),t(4),m("disabled",p.clicked),t(),g(" ",s(39,30,"form.button_close")," "),t(4),m("disabled",!p.blacklistHasUpdated||p.clicked),t(),h(p.clicked?-1:43),t(),h(p.clicked?44:-1))},dependencies:[j,oe,me,A,ie],encapsulation:2})}return i})();var it=_e(mt(),1);var Xe=_e(dt(),1),Ye=_e(ct(),1);var gt=i=>({maxBackupSizeText:i});function bt(i,c){if(i&1&&H(0,"input",10),i&2){let e=b(2);K("value",e.selectedBackup.fileName)}}function vt(i,c){if(i&1){let e=E();T(0,"input",12),W("change",function(p){S(e);let y=b(2);return I(y.handleRestoreFileInput(p.target.files))}),B()}}function ft(i,c){if(i&1&&(T(0,"div",4)(1,"div",7),H(2,"i",8),B(),T(3,"ul",9)(4,"li"),l(5),r(6,"translate"),B(),T(7,"li"),l(8),r(9,"translate"),B(),T(10,"li"),l(11),r(12,"translate"),B(),T(13,"li"),l(14),r(15,"translate"),B()(),_(16,bt,1,1,"input",10),_(17,vt,1,0,"input",11),B()),i&2){let e=b();t(5),u(s(6,6,"backup.restore_help_one")),t(3),u(s(9,8,"backup.restore_help_two")),t(3),u(G(12,10,"backup.restore_max_size",N(15,gt,e.maxFileSizeText))),t(3),u(s(15,13,"backup.restore_warning")),t(2),h(e.selectedBackup?16:-1),t(),h(e.selectedBackup?-1:17)}}function Ct(i,c){if(i&1){let e=E();T(0,"button",18),r(1,"translate"),W("click",function(){S(e);let p=b(2);return I(p.dismissModal())}),l(2),r(3,"translate"),B()}if(i&2){let e=b(2);K("disabled",e.clicked),v("aria-label",s(1,3,"form.button_close")),t(2),g(" ",s(3,5,"form.button_close")," ")}}function xt(i,c){if(i&1){let e=E();T(0,"button",18),r(1,"translate"),W("click",function(){S(e);let p=b(2);return I(p.reopenBackupModal())}),l(2),r(3,"translate"),B()}if(i&2){let e=b(2);K("disabled",e.clicked),v("aria-label",s(1,3,"form.button_back")),t(2),g(" ",s(3,5,"form.button_back")," ")}}function St(i,c){i&1&&H(0,"i",19)}function It(i,c){if(i&1&&(T(0,"span"),l(1),B()),i&2){let e=b(3);t(),g("",e.uploadPercent,"% - ")}}function yt(i,c){i&1&&(T(0,"span"),l(1," Extracting Archive"),B())}function kt(i,c){i&1&&(T(0,"span"),l(1),r(2,"translate"),B()),i&2&&(t(),g(" ",s(2,1,"backup.label_uploading")))}function wt(i,c){if(i&1&&(T(0,"span"),_(1,St,1,0,"i",19),_(2,It,2,1,"span"),_(3,yt,2,0,"span"),_(4,kt,3,3,"span"),B()),i&2){let e=b(2);t(),h(!e.uploadPercent||e.uploadPercent===100?1:-1),t(),h(e.uploadPercent&&e.uploadPercent!==100?2:-1),t(),h(e.uploadPercent===100?3:-1),t(),h(e.uploadPercent!==100?4:-1)}}function Et(i,c){i&1&&(l(0),r(1,"translate")),i&2&&g(" ",s(1,1,"form.button_restore")," ")}function Bt(i,c){if(i&1){let e=E();T(0,"div",6)(1,"div",13),_(2,Ct,4,7,"button",14),_(3,xt,4,7,"button",14),B(),H(4,"div",15),T(5,"div",16)(6,"button",17),W("click",function(){S(e);let p=b();return I(p.onRestoreBackupClick())}),_(7,wt,5,4,"span"),_(8,Et,2,3),B()()()}if(i&2){let e=b();t(2),h(e.setupWizardRestore?2:-1),t(),h(e.setupWizardRestore?-1:3),t(3),K("disabled",!e.selectedBackup&&!e.selectedFile||e.clicked),t(),h(e.clicked?7:-1),t(),h(e.clicked?-1:8)}}function Tt(i,c){if(i&1){let e=E();T(0,"div",6),H(1,"div",13),T(2,"div",15)(3,"button",20),W("click",function(){S(e);let p=b();return I(p.postBackupRestart())}),l(4),r(5,"translate"),B()(),H(6,"div",16),B()}i&2&&(t(4),g(" ",s(5,1,"menu.hbrestart.title")," "))}var Ze=(()=>{class i{$activeModal=C(R);$api=C(D);$modal=C(se);$router=C(U);$toastr=C(M);$translate=C(V);$ws=C(Oe);io;term=new Ye.Terminal;termTarget;fitAddon=new Xe.FitAddon;setupWizardRestore=!1;selectedBackup=null;clicked=!1;maxFileSizeText=globalThis.backup.maxBackupSizeText;selectedFile;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;restoreArchiveType="homebridge";uploadPercent=0;ngOnInit(){return f(this,null,function*(){this.io=this.$ws.connectToNamespace("backup"),this.termTarget=document.getElementById("plugin-log-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.socket.on("stdout",e=>{this.term.write(e)}),this.setupWizardRestore&&(this.restoreStarted=!0,this.restoreInProgress=!0,this.startRestore())})}onRestoreBackupClick(){this.selectedBackup?this.restoreScheduledBackup():this.restoreArchiveType==="homebridge"?this.uploadHomebridgeArchive():this.restoreArchiveType==="hbfx"&&this.uploadHbfxArchive()}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.selectedFile.name.endsWith(".hbfx")?this.restoreArchiveType="hbfx":this.restoreArchiveType="homebridge"):delete this.selectedFile}postBackupRestart(){this.$api.put("/backup/restart",{}).subscribe({next:()=>{this.$activeModal.close(!0),this.$router.navigate(["/"])},error:()=>{}})}reopenBackupModal(){this.$activeModal.dismiss(),this.$modal.open(ue,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.io.end()}dismissModal(){this.$activeModal.dismiss("Dismiss")}uploadHomebridgeArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore",e).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:n=>{console.error(n),this.$toastr.error(n.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})}restoreScheduledBackup(){return f(this,null,function*(){this.term.reset(),this.clicked=!0,this.$api.post(`/backup/scheduled-backups/${this.selectedBackup.id}/restore`,{}).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:e=>{console.error(e),this.$toastr.error(e.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})})}startRestore(){return f(this,null,function*(){this.io.request("do-restore").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success")),this.setupWizardRestore&&this.postBackupRestart()},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}uploadHbfxArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore/hbfx",e,{reportProgress:!0,observe:"events"}).subscribe({next:n=>{n.type===Ee.UploadProgress?this.uploadPercent=Math.round(100*n.loaded/n.total):n instanceof Be&&(this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startHbfxRestore()},500),this.clicked=!1)},error:n=>{this.clicked=!1,console.error(n),this.$toastr.error(n.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})}startHbfxRestore(){return f(this,null,function*(){this.io.request("do-restore-hbfx").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success"))},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],inputs:{setupWizardRestore:"setupWizardRestore",selectedBackup:"selectedBackup"},decls:11,vars:11,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"],["id","plugin-log-output",1,"modal-body",3,"hidden"],[1,"modal-footer","justify-content-between"],[1,"text-center","mb-3"],[1,"fas","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","text","disabled","",1,"form-control","custom-input",3,"value"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"form-control"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"form-control",3,"change"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"fa","fa-circle-notch","fa-spin"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(n,p){n&1&&(T(0,"div",0)(1,"div",1)(2,"h5",2),l(3),r(4,"translate"),B(),T(5,"button",3),r(6,"translate"),W("click",function(){return p.dismissModal()}),B()(),_(7,ft,18,17,"div",4),H(8,"div",5),_(9,Bt,9,5,"div",6),_(10,Tt,7,3,"div",6),B()),n&2&&(t(3),u(s(4,7,"backup.title_backup")),t(2),K("disabled",p.restoreInProgress),v("aria-label",s(6,9,"form.button_close")),t(2),h(!p.restoreStarted&&!p.setupWizardRestore?7:-1),t(),K("hidden",!p.restoreStarted),t(),h(!p.restoreStarted||p.restoreFailed===!0?9:-1),t(),h(!p.restoreInProgress&&p.restoreStarted?10:-1))},dependencies:[A],encapsulation:2})}return i})();var et=(i,c)=>({"fa-arrow-right":i,"fa-cog fa-spin":c}),$t=i=>({backupTime:i,dayCount:7}),Ft=(i,c)=>({"fa-trash":i,"fa-cog fa-spin":c}),Pt=(i,c)=>({backupSize:i,maxBackupSizeText:c});function At(i,c){if(i&1&&(l(0),r(1,"date"),r(2,"translate")),i&2){let e=b(2);g(" ",G(2,4,"backup.scheduled_backup_time",N(7,$t,G(1,1,e.backupTime,"shortTime")))," ")}}function Rt(i,c){i&1&&(l(0),r(1,"translate")),i&2&&g(" ",s(1,1,"plugins.settings.restart_required")," ")}function Vt(i,c){if(i&1&&_(0,At,3,9)(1,Rt,2,3),i&2){let e=b();h(e.backupTime?0:1)}}function Mt(i,c){if(i&1&&(l(0),r(1,"translate")),i&2){let e=b();g(" ",s(1,1,e.backupTime?"plugins.settings.restart_required":"backup.scheduled_backup_disabled")," ")}}function Dt(i,c){if(i&1&&(a(0,"span",33),r(1,"translate"),d(2,"i",40),l(3),o()),i&2){let e=b().$implicit;m("ngbTooltip",G(1,3,"backup.backup_exceeds_max_size",F(6,Pt,e.size+"MB",e.maxBackupSizeText)))("openDelay",150),t(3),g(" ",e.size,"MB ")}}function Nt(i,c){if(i&1&&(a(0,"span"),l(1),o()),i&2){let e=b().$implicit;t(),g(" ",e.size,"MB ")}}function Lt(i,c){if(i&1){let e=E();a(0,"li",22)(1,"span")(2,"span",32),l(3),r(4,"date"),o(),d(5,"br"),a(6,"small",23),l(7),r(8,"date"),_(9,Dt,4,9,"span",33),_(10,Nt,2,1,"span"),o()(),a(11,"span",34)(12,"button",35),r(13,"translate"),r(14,"translate"),x("click",function(){let p=S(e).$implicit,y=b(2);return I(y.restore(p))}),d(15,"i",36),o(),a(16,"button",37),r(17,"translate"),r(18,"translate"),x("click",function(){let p=S(e).$implicit,y=b(2);return I(y.download(p))}),d(19,"i",38),o(),a(20,"button",39),r(21,"translate"),r(22,"translate"),x("click",function(){let p=S(e).$implicit,y=b(2);return I(y.delete(p))}),d(23,"i",25),o()()()}if(i&2){let e=c.$implicit,n=b(2);t(2),m("ngbTooltip",e.fileName)("openDelay",150),t(),g(" ",G(4,19,e.timestamp,"mediumDate")," "),t(4),g(" ",G(8,22,e.timestamp,"shortTime")," \xB7 "),t(2),h(e.size>e.maxBackupSize?9:-1),t(),h(e.size<=e.maxBackupSize?10:-1),t(2),m("disabled",n.clicked||n.deleting||e.size>e.maxBackupSize)("ngbTooltip",s(13,25,"form.button_restore"))("openDelay",150),v("aria-label",s(14,27,"form.button_restore")),t(4),m("disabled",n.clicked||n.deleting)("ngbTooltip",s(17,29,"form.button_download"))("openDelay",150),v("aria-label",s(18,31,"form.button_download")),t(4),m("disabled",n.clicked||n.deleting)("ngbTooltip",s(21,33,"form.button_delete"))("openDelay",150),v("aria-label",s(22,35,"form.button_delete")),t(3),m("ngClass",F(37,Ft,e.id!==n.deleting,e.id===n.deleting))}}function zt(i,c){if(i&1&&(a(0,"ul",27)(1,"li",9)(2,"h6",10),l(3),r(4,"translate"),o()(),z(5,Lt,24,40,"li",22,L),o()),i&2){let e=b();t(3),u(s(4,1,"backup.files_auto")),t(2),O(e.scheduledBackups)}}var ue=(()=>{class i{$activeModal=C(R);$api=C(D);$backup=C(qe);$modal=C(se);$router=C(U);$settings=C(Y);$toastr=C(M);$translate=C(V);restartToastIsShown=!1;Date=Date;clicked=!1;scheduledBackups=[];backupTime;deleting=null;currentSettingEnabled=!1;currentSettingPath="";enabledFormControl=new w(!1);pathFormControl=new w("");ngOnInit(){this.getScheduledBackups(),this.getNextBackup(),this.currentSettingEnabled=!this.$settings.env.scheduledBackupDisable,this.currentSettingPath=this.$settings.env.scheduledBackupPath,this.enabledFormControl.patchValue(this.currentSettingEnabled),this.pathFormControl.patchValue(this.currentSettingPath),this.enabledFormControl.valueChanges.pipe(k(750)).subscribe(e=>f(this,null,function*(){this.currentSettingEnabled=e,yield this.saveUiSettingChange("scheduledBackupDisable",!this.currentSettingEnabled)})),this.pathFormControl.valueChanges.pipe(k(1500)).subscribe(e=>f(this,null,function*(){this.currentSettingPath=e,yield this.saveUiSettingChange("scheduledBackupPath",this.currentSettingPath)}))}download(e){this.$api.get(`/backup/scheduled-backups/${e.id}`,{observe:"response",responseType:"blob"}).subscribe({next:n=>{let p=e.fileName||"homebridge-backup.tar.gz",y=n.body.size;if(y>globalThis.backup.maxBackupSize){let X=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(y/1048576).toFixed(1)}MB`});this.$toastr.warning(X,this.$translate.instant("toast.title_warning"))}(0,it.saveAs)(n.body,p)},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_download_failed"),this.$translate.instant("toast.title_error"))}})}restore(e){this.$activeModal.close();let n=this.$modal.open(Ze,{size:"lg",backdrop:"static"});n.componentInstance.selectedBackup=e}delete(e){this.deleting=e.id,this.$api.delete(`/backup/scheduled-backups/${e.id}`).subscribe({next:()=>{this.getScheduledBackups(),this.deleting=null},error:n=>{this.deleting=null,console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_delete_failed"),this.$translate.instant("toast.title_error"))}})}onDownloadBackupClick(){return f(this,null,function*(){this.clicked=!0;try{yield this.$backup.downloadBackup(),this.clicked=!1}catch(e){this.clicked=!1,console.error(e),this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}})}onCreateBackupClick(){return f(this,null,function*(){this.clicked=!0;try{yield $(this.$api.post("/backup",{})),this.clicked=!1,this.getScheduledBackups()}catch(e){this.clicked=!1,console.error(e),this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}saveUiSettingChange(e,n){return f(this,null,function*(){try{yield $(this.$api.put("/config-editor/ui",{key:e,value:n})),this.$settings.setEnvItem(e,n),this.showRestartToast()}catch(p){console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}getScheduledBackups(){this.$api.get("/backup/scheduled-backups").subscribe({next:e=>{this.scheduledBackups=e},error:e=>console.error(e)})}getNextBackup(){this.$api.get("/backup/scheduled-backups/next").subscribe({next:e=>{this.backupTime=e.next},error:e=>{console.error(e)}})}showRestartToast(){if(!this.restartToastIsShown){this.restartToastIsShown=!0;let e=this.$toastr.info(this.$translate.instant("settings.changes.saved"),this.$translate.instant("menu.hbrestart.title"),{timeOut:0,tapToDismiss:!0,disableTimeOut:!0,positionClass:"toast-bottom-right",enableHtml:!0});e&&e.onTap&&e.onTap.subscribe(()=>{this.$router.navigate(["/restart"])})}}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],decls:92,vars:80,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,"text-center","mb-3"],[1,"fas","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item"],[1,"mb-0","text-center"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"grey-text","small"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","/home/pi/homebridge-backups",1,"form-control","custom-input",3,"formControl"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"small","grey-text"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","disableScheduledBackups",1,"rendux-input",3,"formControl"],["for","disableScheduledBackups",1,"rendux-label"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3",3,"click","disabled"],[1,"fas",3,"ngClass"],[1,"fas","fa-arrow-right"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-end"],["container","modal","triggers","hover",3,"ngbTooltip","openDelay"],["container","modal","triggers","hover",1,"red-text",3,"ngbTooltip","openDelay"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-3",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-history"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-download"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-exclamation-circle"]],template:function(n,p){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),l(3),r(4,"translate"),o(),a(5,"button",3),r(6,"translate"),x("click",function(){return p.dismissModal()}),o()(),a(7,"div",4)(8,"div",5),d(9,"i",6),o(),a(10,"ul",7)(11,"li"),l(12),r(13,"translate"),o(),a(14,"li"),l(15),r(16,"translate"),o(),a(17,"li"),l(18),r(19,"translate"),o()(),a(20,"ul",8)(21,"li",9)(22,"h6",10),l(23),r(24,"translate"),o()(),a(25,"li",11)(26,"div",12),l(27),r(28,"translate"),d(29,"br"),a(30,"span",13),l(31),r(32,"translate"),o()(),a(33,"div",14),d(34,"input",15),r(35,"translate"),o()(),a(36,"li",16)(37,"div",17),l(38),r(39,"translate"),d(40,"br"),a(41,"span",18),_(42,Vt,2,1)(43,Mt,2,3),o()(),a(44,"div",19),d(45,"input",20),r(46,"translate"),d(47,"label",21),o()(),a(48,"li",22)(49,"div")(50,"span"),l(51),r(52,"translate"),o(),d(53,"br"),a(54,"small",23),l(55),r(56,"translate"),o()(),a(57,"button",24),r(58,"translate"),x("click",function(){return p.onDownloadBackupClick()}),d(59,"i",25),o()(),a(60,"li",22)(61,"div")(62,"span"),l(63),r(64,"translate"),o(),d(65,"br"),a(66,"small",23),l(67),r(68,"translate"),o()(),a(69,"button",24),r(70,"translate"),x("click",function(){return p.onCreateBackupClick()}),d(71,"i",25),o()(),a(72,"li",22)(73,"div")(74,"span"),l(75),r(76,"translate"),o(),d(77,"br"),a(78,"small",23),l(79),r(80,"translate"),o()(),a(81,"button",24),r(82,"translate"),x("click",function(){return p.restore(null)}),d(83,"i",26),o()()(),_(84,zt,7,3,"ul",27),o(),a(85,"div",28),d(86,"div",17),a(87,"div",29)(88,"button",30),x("click",function(){return p.dismissModal()}),l(89),r(90,"translate"),o()(),d(91,"div",31),o()()),n&2&&(t(3),u(s(4,32,"backup.title_backup")),t(2),m("disabled",p.clicked||p.deleting),v("aria-label",s(6,34,"form.button_close")),t(7),u(s(13,36,"backup.backup_help_one")),t(3),u(s(16,38,"backup.backup_help_two")),t(3),u(s(19,40,"backup.backup_warning")),t(5),u(s(24,42,"backup.settings_title")),t(4),g(" ",s(28,44,"backup.settings_path")),t(4),u(s(32,46,"backup.settings_path_desc")),t(3),m("formControl",p.pathFormControl),v("aria-label",s(35,48,"backup.settings_path")),t(4),g(" ",s(39,50,"backup.settings_enable")),t(4),h(p.enabledFormControl.value?42:43),t(3),m("formControl",p.enabledFormControl),v("aria-label",s(46,52,"backup.settings_enable")),t(6),u(s(52,54,"backup.backup_now")),t(4),u(s(56,56,"backup.backup_now_desc")),t(2),m("disabled",p.clicked),v("aria-label",s(58,58,"backup.backup_now")),t(2),m("ngClass",F(74,et,!p.clicked,p.clicked)),t(4),u(s(64,60,"backup.backup_now")),t(4),u(s(68,62,"backup.backup_now_save_desc")),t(2),m("disabled",p.clicked),v("aria-label",s(70,64,"backup.backup_now")),t(2),m("ngClass",F(77,et,!p.clicked,p.clicked)),t(4),u(s(76,66,"backup.restore_now")),t(4),u(s(80,68,"backup.restore_now_desc")),t(2),m("disabled",p.clicked),v("aria-label",s(82,70,"backup.restore_now")),t(3),h(p.scheduledBackups.length?84:-1),t(4),m("disabled",p.clicked||p.deleting),t(),g(" ",s(90,72,"form.button_close")," "))},dependencies:[me,j,re,pe,ne,ae,de,we,A],encapsulation:2})}return i})();function Ot(i,c){i&1&&(a(0,"div",12),d(1,"i",13),o(),a(2,"p",14),l(3),r(4,"translate"),o()),i&2&&(t(3),u(s(4,1,"reset.no_accessories")))}function Ht(i,c){i&1&&(a(0,"div",12),d(1,"i",15),o(),a(2,"ul",16)(3,"li"),l(4),r(5,"translate"),o(),a(6,"li"),l(7),r(8,"translate"),o(),a(9,"li"),l(10),r(11,"translate"),o()(),a(12,"ngb-alert",17)(13,"p",18),l(14),r(15,"translate"),o()()),i&2&&(t(4),u(s(5,5,"reset.accessory_all.list_1")),t(3),u(s(8,7,"reset.accessory_all.list_2")),t(3),u(s(11,9,"reset.accessory_all.list_3")),t(2),m("dismissible",!1),t(2),u(s(15,11,"reset.action_is_irreversible")))}function Ut(i,c){if(i&1){let e=E();a(0,"button",19),r(1,"translate"),x("click",function(){S(e);let p=b();return I(p.dismissModal())}),l(2),r(3,"translate"),o()}if(i&2){let e=b();m("disabled",e.clicked),v("aria-label",s(1,3,"form.button_close")),t(2),g(" ",s(3,5,"form.button_close")," ")}}function Wt(i,c){if(i&1){let e=E();a(0,"button",20),r(1,"translate"),x("click",function(){S(e);let p=b();return I(p.dismissModal())}),l(2),r(3,"translate"),o()}i&2&&(v("aria-label",s(1,2,"form.button_close")),t(2),g(" ",s(3,4,"form.button_close")," "))}function Kt(i,c){i&1&&(l(0),r(1,"translate")),i&2&&g(" ",s(1,1,"form.button_remove")," ")}function Gt(i,c){i&1&&d(0,"i",22)}function jt(i,c){if(i&1){let e=E();a(0,"button",21),x("click",function(){S(e);let p=b();return I(p.onResetCachedAccessoriesClick())}),_(1,Kt,2,3),_(2,Gt,1,0,"i",22),o()}if(i&2){let e=b();m("disabled",e.clicked),t(),h(e.clicked?-1:1),t(),h(e.clicked?2:-1)}}var nt=(()=>{class i{$activeModal=C(R);$api=C(D);$router=C(U);$toastr=C(M);$translate=C(V);clicked=!1;cachedAccessories=[];ngOnInit(){this.loadCachedAccessories()}onResetCachedAccessoriesClick(){return this.clicked=!0,this.$api.put("/server/reset-cached-accessories",{}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.delete_success"),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.failed_to_reset"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return f(this,null,function*(){try{this.cachedAccessories=yield $(this.$api.get("/server/cached-accessories"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],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-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-network-wired","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"text-center","mb-0"],["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-spinner","fa-pulse"]],template:function(n,p){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),l(3),r(4,"translate"),o(),a(5,"button",3),r(6,"translate"),x("click",function(){return p.dismissModal()}),o()(),a(7,"div",4),_(8,Ot,5,3),_(9,Ht,16,13),o(),a(10,"div",5)(11,"div",6),_(12,Ut,4,7,"button",7),o(),a(13,"div",8),_(14,Wt,4,6,"button",9),o(),a(15,"div",10),_(16,jt,3,3,"button",11),o()()()),n&2&&(t(3),u(s(4,8,"reset.accessory_all.title")),t(2),m("disabled",p.clicked),v("aria-label",s(6,10,"form.button_close")),t(3),h(p.cachedAccessories.length===0?8:-1),t(),h(p.cachedAccessories.length>0?9:-1),t(3),h(p.cachedAccessories.length>0?12:-1),t(2),h(p.cachedAccessories.length===0?14:-1),t(2),h(p.cachedAccessories.length>0?16:-1))},dependencies:[ce,A],encapsulation:2})}return i})();var qt=(i,c)=>({"green-text":i,"grey-text":c}),Qt=(i,c)=>({"btn-danger":i,"btn-elegant":c}),Jt=(i,c,e)=>({"fa-broom":i,"fa-undo":c,"fa-spinner fa-pulse":e});function Xt(i,c){i&1&&(a(0,"div",12),d(1,"i",13),o(),a(2,"p",14),l(3),r(4,"translate"),o()),i&2&&(t(3),u(s(4,1,"reset.bridge_accessories.empty")))}function Yt(i,c){if(i&1){let e=E();a(0,"li",18)(1,"span"),l(2),d(3,"br"),a(4,"small",19),d(5,"i",20),l(6),r(7,"translate"),a(8,"span",21),l(9),o()()(),a(10,"button",22),r(11,"translate"),x("click",function(){let p=S(e).$implicit,y=b(2);return I(y.toggleList(p._id))}),d(12,"i",23),o()()}if(i&2){let e=c.$implicit,n=b(2);t(2),g(" ",e.name," "),t(3),m("ngClass",F(12,qt,e._isPaired,!e._isPaired)),t(),g(" ",s(7,8,e._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired")," \xB7 "),t(3),u(e._username),t(),m("disabled",n.clicked)("ngClass",F(15,Qt,!n.toDelete.includes(e._id),n.toDelete.includes(e._id))),v("aria-label",s(11,10,"form.button_delete")),t(2),m("ngClass",te(18,Jt,!n.toDelete.includes(e._id),n.toDelete.includes(e._id)&&!n.clicked,n.toDelete.includes(e._id)&&n.clicked))}}function Zt(i,c){if(i&1&&(a(0,"div",12),d(1,"i",15),o(),a(2,"ul",16)(3,"li"),l(4),r(5,"translate"),o(),a(6,"li"),l(7),r(8,"translate"),o(),a(9,"li"),l(10),r(11,"translate"),o()(),a(12,"ul",17),z(13,Yt,13,22,"li",18,L),o()),i&2){let e=b();t(4),u(s(5,3,"reset.bridge_accessories.list_1")),t(3),u(s(8,5,"reset.clear_cache_single.list_3")),t(3),u(s(11,7,"reset.bridge_accessories.list_2")),t(3),O(e.pairings)}}function ei(i,c){if(i&1){let e=E();a(0,"button",24),x("click",function(){S(e);let p=b();return I(p.dismissModal())}),l(1),r(2,"translate"),o()}if(i&2){let e=b();m("disabled",e.clicked),t(),g(" ",s(2,2,"form.button_close")," ")}}function ti(i,c){if(i&1){let e=E();a(0,"button",25),x("click",function(){S(e);let p=b();return I(p.dismissModal())}),l(1),r(2,"translate"),o()}i&2&&(t(),g(" ",s(2,1,"form.button_close")," "))}function ii(i,c){i&1&&d(0,"i",27)}function ni(i,c){if(i&1&&l(0),i&2){let e=b(3);g(" (",e.toDelete.length,") ")}}function ai(i,c){if(i&1&&(l(0),r(1,"translate"),_(2,ni,1,1)),i&2){let e=b(2);g(" ",s(1,2,"form.button_remove")," "),t(2),h(e.toDelete.length>0?2:-1)}}function oi(i,c){if(i&1){let e=E();a(0,"button",26),x("click",function(){S(e);let p=b();return I(p.cleanBridges())}),_(1,ii,1,0,"i",27)(2,ai,3,4),o()}if(i&2){let e=b();m("disabled",!e.toDelete.length||e.clicked),t(),h(e.clicked?1:2)}}var at=(()=>{class i{$activeModal=C(R);$api=C(D);$router=C(U);$toastr=C(M);$translate=C(V);clicked=!1;pairings=[];toDelete=[];ngOnInit(){this.loadPairings()}cleanBridges(){return this.clicked=!0,this.$api.delete("/server/pairings/accessories",{body:this.toDelete.map(e=>({id:e}))}).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"))}})}toggleList(e){this.toDelete.includes(e)?this.toDelete=this.toDelete.filter(n=>n!==e):this.toDelete.push(e)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadPairings(){return f(this,null,function*(){try{this.pairings=(yield $(this.$api.get("/server/pairings"))).filter(e=>e._category==="bridge"&&!e._main).sort((e,n)=>e.name.localeCompare(n.name))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("settings.unpair_bridge.load_error"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],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-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-broom","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"fas","fa-link",3,"ngClass"],[1,"font-monospace"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas",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-spinner","fa-pulse"]],template:function(n,p){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),l(3),r(4,"translate"),o(),a(5,"button",3),r(6,"translate"),x("click",function(){return p.dismissModal()}),o()(),a(7,"div",4),_(8,Xt,5,3),_(9,Zt,15,9),o(),a(10,"div",5)(11,"div",6),_(12,ei,3,4,"button",7),o(),a(13,"div",8),_(14,ti,3,3,"button",9),o(),a(15,"div",10),_(16,oi,3,2,"button",11),o()()()),n&2&&(t(3),u(s(4,8,"reset.bridge_accessories.title")),t(2),m("disabled",p.clicked),v("aria-label",s(6,10,"form.button_close")),t(3),h(p.pairings.length===0?8:-1),t(),h(p.pairings.length>0?9:-1),t(3),h(p.pairings.length>0?12:-1),t(2),h(p.pairings.length===0?14:-1),t(2),h(p.pairings.length>0?16:-1))},dependencies:[j,A],encapsulation:2})}return i})();function ri(i,c){i&1&&(l(0),r(1,"translate")),i&2&&g(" ",s(1,1,"form.button_reset")," ")}function si(i,c){i&1&&d(0,"i",16)}var ot=(()=>{class i{$activeModal=C(R);$api=C(D);$router=C(U);$toastr=C(M);$translate=C(V);clicked;onResetHomebridgeAccessoryClick(){return this.clicked=!0,this.$api.put("/server/reset-homebridge-accessory",{}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_reset"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"])},error:e=>{console.error(e),this.$toastr.error(this.$translate.instant("reset.failed_to_reset"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],decls:38,vars:33,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,"text-center","mb-3"],[1,"fas","fa-bridge","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"text-center","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"]],template:function(n,p){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),l(3),r(4,"translate"),o(),a(5,"button",3),r(6,"translate"),x("click",function(){return p.dismissModal()}),o()(),a(7,"div",4)(8,"div",5),d(9,"i",6),o(),a(10,"ul",7)(11,"li"),l(12),r(13,"translate"),o(),a(14,"li"),l(15),r(16,"translate"),o(),a(17,"li"),l(18),r(19,"translate"),o(),a(20,"li"),l(21),r(22,"translate"),o()(),a(23,"ngb-alert",8)(24,"p",9),l(25),r(26,"translate"),o()()(),a(27,"div",10)(28,"div",11)(29,"button",12),r(30,"translate"),x("click",function(){return p.dismissModal()}),l(31),r(32,"translate"),o()(),d(33,"div",13),a(34,"div",14)(35,"button",15),x("click",function(){return p.onResetHomebridgeAccessoryClick()}),_(36,ri,2,3),_(37,si,1,0,"i",16),o()()()()),n&2&&(t(3),u(s(4,15,"reset.bridge_all.title")),t(2),m("disabled",p.clicked),v("aria-label",s(6,17,"form.button_close")),t(7),u(s(13,19,"reset.bridge_all.list_1")),t(3),u(s(16,21,"reset.bridge_all.list_2")),t(3),u(s(19,23,"reset.bridge_all.list_3")),t(3),u(s(22,25,"reset.bridge_all.list_4")),t(2),m("dismissible",!1),t(2),u(s(26,27,"reset.action_is_irreversible")),t(4),m("disabled",p.clicked),v("aria-label",s(30,29,"form.button_close")),t(2),g(" ",s(32,31,"form.button_close")," "),t(4),m("disabled",p.clicked),t(),h(p.clicked?-1:36),t(),h(p.clicked?37:-1))},dependencies:[ce,A],encapsulation:2})}return i})();var be=(i,c)=>({"green-text":i,"grey-text":c}),ve=(i,c)=>({"btn-danger":i,"btn-elegant":c}),rt=(i,c,e)=>({"fa-refresh":i,"fa-undo":c,"fa-spinner fa-pulse":e}),li=(i,c,e)=>({"fa-trash":i,"fa-undo":c,"fa-spinner fa-pulse":e});function pi(i,c){i&1&&(a(0,"div",12),d(1,"i",13),o(),a(2,"p",14),l(3),r(4,"translate"),o()),i&2&&(t(3),u(s(4,1,"reset.bridges.empty")))}function di(i,c){if(i&1){let e=E();a(0,"li",20)(1,"span"),l(2),d(3,"br"),a(4,"small",21),d(5,"i",22),l(6),r(7,"translate"),a(8,"span",23),l(9),o(),l(10),r(11,"titlecase"),o()(),a(12,"button",24),r(13,"translate"),x("click",function(){let p=S(e).$implicit,y=b(3);return I(y.toggleList(p._id,!1))}),d(14,"i",25),o()()}if(i&2){let e=c.$implicit,n=b(3);t(2),g(" ",e.name," "),t(3),m("ngClass",F(15,be,e._isPaired,!e._isPaired)),t(),g(" ",s(7,9,e._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired")," \xB7 "),t(3),u(e._username),t(),g(" \xB7 ",e._main?"Homebridge":s(11,11,e._category)," "),t(2),m("disabled",n.clicked)("ngClass",F(18,ve,!n.isInList(e._id),n.isInList(e._id))),v("aria-label",s(13,13,"form.button_unpair")),t(2),m("ngClass",te(21,rt,!n.isInList(e._id),n.isInList(e._id)&&!n.clicked,n.isInList(e._id)&&n.clicked))}}function ci(i,c){if(i&1&&(a(0,"ul",16)(1,"li",17)(2,"h6",18),l(3),r(4,"translate"),o(),a(5,"p",19),l(6),r(7,"translate"),o()(),z(8,di,15,25,"li",20,L),o()),i&2){let e=b(2);t(3),u(s(4,2,"reset.bridge_ind.head_non_child")),t(3),u(s(7,4,"reset.bridge_ind.desc_non_child")),t(2),O(e.pairingsNonChild)}}function mi(i,c){if(i&1){let e=E();a(0,"li",20)(1,"span"),l(2),d(3,"br"),a(4,"small",21),d(5,"i",22),l(6),r(7,"translate"),a(8,"span",23),l(9),o()()(),a(10,"button",24),r(11,"translate"),x("click",function(){let p=S(e).$implicit,y=b(3);return I(y.toggleList(p._id,!0))}),d(12,"i",25),o()()}if(i&2){let e=c.$implicit,n=b(3);t(2),g(" ",e.name," "),t(3),m("ngClass",F(12,be,e._isPaired,!e._isPaired)),t(),g(" ",s(7,8,e._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired")," \xB7 "),t(3),u(e._username),t(),m("disabled",n.clicked)("ngClass",F(15,ve,!n.isInList(e._id),n.isInList(e._id))),v("aria-label",s(11,10,"form.button_unpair")),t(2),m("ngClass",te(18,rt,!n.isInList(e._id),n.isInList(e._id)&&!n.clicked,n.isInList(e._id)&&n.clicked))}}function ui(i,c){if(i&1&&(a(0,"ul",16)(1,"li",17)(2,"h6",18),l(3),r(4,"translate"),o(),a(5,"p",19),l(6),r(7,"translate"),o()(),z(8,mi,13,22,"li",20,L),o()),i&2){let e=b(2);t(3),u(s(4,2,"reset.bridge_ind.head_child_active")),t(3),u(s(7,4,"reset.bridge_ind.desc_child_active")),t(2),O(e.pairingsChildActive)}}function _i(i,c){if(i&1){let e=E();a(0,"li",20)(1,"span"),l(2),d(3,"br"),a(4,"small",21),d(5,"i",22),l(6),r(7,"translate"),a(8,"span",23),l(9),o()()(),a(10,"button",24),r(11,"translate"),x("click",function(){let p=S(e).$implicit,y=b(3);return I(y.toggleList(p._id,!1))}),d(12,"i",25),o()()}if(i&2){let e=c.$implicit,n=b(3);t(2),g(" ",e.name," "),t(3),m("ngClass",F(12,be,e._isPaired,!e._isPaired)),t(),g(" ",s(7,8,e._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired")," \xB7 "),t(3),u(e._username),t(),m("disabled",n.clicked)("ngClass",F(15,ve,!n.isInList(e._id),n.isInList(e._id))),v("aria-label",s(11,10,"form.button_unpair")),t(2),m("ngClass",te(18,li,!n.isInList(e._id),n.isInList(e._id)&&!n.clicked,n.isInList(e._id)&&n.clicked))}}function hi(i,c){if(i&1&&(a(0,"ul",16)(1,"li",17)(2,"h6",18),l(3),r(4,"translate"),o(),a(5,"p",19),l(6),r(7,"translate"),o()(),z(8,_i,13,22,"li",20,L),o()),i&2){let e=b(2);t(3),u(s(4,2,"reset.bridge_ind.head_child_stale")),t(3),u(s(7,4,"reset.bridge_ind.desc_child_stale")),t(2),O(e.pairingsChildStale)}}function gi(i,c){if(i&1&&(a(0,"div",12),d(1,"i",15),o(),_(2,ci,10,6,"ul",16),_(3,ui,10,6,"ul",16),_(4,hi,10,6,"ul",16)),i&2){let e=b();t(2),h(e.pairingsNonChild.length>0?2:-1),t(),h(e.pairingsChildActive.length>0?3:-1),t(),h(e.pairingsChildStale.length>0?4:-1)}}function bi(i,c){if(i&1){let e=E();a(0,"button",26),x("click",function(){S(e);let p=b();return I(p.dismissModal())}),l(1),r(2,"translate"),o()}if(i&2){let e=b();m("disabled",e.clicked),t(),g(" ",s(2,2,"form.button_close")," ")}}function vi(i,c){if(i&1){let e=E();a(0,"button",27),x("click",function(){S(e);let p=b();return I(p.dismissModal())}),l(1),r(2,"translate"),o()}i&2&&(t(),g(" ",s(2,1,"form.button_close")," "))}function fi(i,c){if(i&1&&l(0),i&2){let e=b(3);g(" (",e.toDelete.length,") ")}}function Ci(i,c){if(i&1&&(l(0),r(1,"translate"),_(2,fi,1,1)),i&2){let e=b(2);g(" ",s(1,2,"form.button_reset")," "),t(2),h(e.toDelete.length>0?2:-1)}}function xi(i,c){i&1&&d(0,"i",29)}function Si(i,c){if(i&1){let e=E();a(0,"button",28),x("click",function(){S(e);let p=b();return I(p.removeBridges())}),_(1,Ci,3,4),_(2,xi,1,0,"i",29),o()}if(i&2){let e=b();m("disabled",!e.toDelete.length||e.clicked),t(),h(e.clicked?-1:1),t(),h(e.clicked?2:-1)}}var st=(()=>{class i{$activeModal=C(R);$api=C(D);$router=C(U);$toastr=C(M);$translate=C(V);clicked=!1;pairingsNonChild=[];pairingsChildActive=[];pairingsChildStale=[];toDelete=[];ngOnInit(){this.loadPairings()}toggleList(e,n=!1){this.toDelete.some(p=>p.id===e)?this.toDelete=this.toDelete.filter(p=>p.id!==e):this.toDelete.push({id:e,resetPairingInfo:n})}isInList(e){return this.toDelete.some(n=>n.id===e)}removeBridges(){return this.clicked=!0,this.$api.delete("/server/pairings",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.bridge_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.bridge_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadPairings(){return f(this,null,function*(){try{let e=(yield $(this.$api.get("/server/pairings"))).filter(n=>!n._main).sort((n,p)=>n.name.localeCompare(p.name));this.pairingsChildActive=e.filter(n=>n._category==="bridge"&&!n._couldBeStale),this.pairingsNonChild=e.filter(n=>n._category!=="bridge"),this.pairingsChildStale=e.filter(n=>n._category==="bridge"&&n._couldBeStale)}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("settings.unpair_bridge.load_error"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],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-circle-check","primary-text",2,"font-size","75px"],[1,"text-center","mb-0"],[1,"fas","fa-bridge","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"list-group-item"],[1,"mb-1","text-center"],[1,"mb-0","small","grey-text","text-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"fas","fa-link",3,"ngClass"],[1,"font-monospace"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas",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-spinner","fa-pulse"]],template:function(n,p){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),l(3),r(4,"translate"),o(),a(5,"button",3),r(6,"translate"),x("click",function(){return p.dismissModal()}),o()(),a(7,"div",4),_(8,pi,5,3),_(9,gi,5,3),o(),a(10,"div",5)(11,"div",6),_(12,bi,3,4,"button",7),o(),a(13,"div",8),_(14,vi,3,3,"button",9),o(),a(15,"div",10),_(16,Si,3,3,"button",11),o()()()),n&2&&(t(3),u(s(4,8,"reset.bridge_ind.title")),t(2),m("disabled",p.clicked),v("aria-label",s(6,10,"form.button_close")),t(3),h(p.pairingsChildActive.length===0&&p.pairingsChildStale.length===0&&p.pairingsNonChild.length===0?8:-1),t(),h(p.pairingsChildActive.length>0||p.pairingsChildStale.length>0||p.pairingsNonChild.length>0?9:-1),t(3),h(p.pairingsChildActive.length>0||p.pairingsChildStale.length>0||p.pairingsNonChild.length>0?12:-1),t(2),h(p.pairingsChildActive.length===0&&p.pairingsChildStale.length===0&&p.pairingsNonChild.length===0?14:-1),t(2),h(p.pairingsChildActive.length>0||p.pairingsChildStale.length>0||p.pairingsNonChild.length>0?16:-1))},dependencies:[j,ie,A],encapsulation:2})}return i})();function Ii(i,c){if(i&1){let e=E();a(0,"li",9)(1,"div")(2,"span",16),l(3),o(),d(4,"br"),a(5,"span",17),l(6),o()(),a(7,"span")(8,"input",18),ke("ngModelChange",function(p){let y=S(e).$implicit;return ye(y.selected,p)||(y.selected=p),I(p)}),x("ngModelChange",function(){S(e);let p=b();return I(p.onAdapterSelectionChange())}),o(),d(9,"label",19),o()()}if(i&2){let e=c.$implicit;t(3),u(e.ip4||e.ip6),t(3),u(e.iface),t(2),m("id","adapter"+e.iface),Ie("ngModel",e.selected),t(),m("for","adapter"+e.iface)}}var lt=(()=>{class i{$activeModal=C(R);adaptersOriginal=[];adaptersAvailable=[];adaptersSelected=[];isUnchanged=!0;ngOnInit(){this.adaptersAvailable.forEach(e=>{e.selected=this.adaptersSelected.some(n=>n.iface===e.iface)}),this.adaptersOriginal=this.adaptersSelected.map(e=>e.iface)}onAdapterSelectionChange(){this.isUnchanged=this.adaptersOriginal.length===this.adaptersAvailable.filter(e=>e.selected).length&&this.adaptersOriginal.every(e=>this.adaptersAvailable.some(n=>n.iface===e&&n.selected))}submit(){this.$activeModal.close(this.adaptersAvailable.filter(e=>e.selected).map(e=>e.iface))}closeAndReset(){this.adaptersAvailable.forEach(e=>{e.selected=this.adaptersOriginal.includes(e.iface)}),this.isUnchanged=!0,this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],inputs:{adaptersAvailable:"adaptersAvailable",adaptersSelected:"adaptersSelected"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-ethernet","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"font-monospace"],[1,"font-monospace","grey-text"],["type","checkbox",1,"rendux-input",3,"ngModelChange","id","ngModel"],[1,"rendux-label","ms-3",3,"for"]],template:function(n,p){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),l(3),r(4,"translate"),o(),a(5,"button",3),r(6,"translate"),x("click",function(){return p.closeAndReset()}),o()(),a(7,"div",4)(8,"div",5),d(9,"i",6),o(),a(10,"ul",7)(11,"li"),l(12),r(13,"translate"),o()(),a(14,"ul",8),z(15,Ii,10,5,"li",9,L),o()(),a(17,"div",10)(18,"div",11)(19,"button",12),r(20,"translate"),x("click",function(){return p.closeAndReset()}),l(21),r(22,"translate"),o()(),d(23,"div",13),a(24,"div",14)(25,"button",15),x("click",function(){return p.submit()}),l(26),r(27,"translate"),o()()()()),n&2&&(t(3),u(s(4,7,"settings.network.title_network_interfaces")),t(2),v("aria-label",s(6,9,"form.button_close")),t(7),u(s(13,11,"settings.network.message_network_interface")),t(3),O(p.adaptersAvailable),t(4),v("aria-label",s(20,13,"form.button_close")),t(2),g(" ",s(22,15,"form.button_close")," "),t(4),m("disabled",p.isUnchanged),t(),g(" ",s(27,17,"form.button_save")," "))},dependencies:[oe,ne,ae,Fe,A],encapsulation:2})}return i})();var yi=["wallpaperInput"],ki=i=>({maxFileSizeText:i});function wi(i,c){if(i&1){let e=E();T(0,"div",10),H(1,"img",20),T(2,"button",21),r(3,"translate"),W("click",function(){S(e);let p=b();return I(p.clearWallpaper())}),H(4,"i",22),B()()}if(i&2){let e=b();t(),K("src",e.wallpaperUrl,fe),t(),v("aria-label",s(3,2,"form.button_delete"))}}function Ei(i,c){i&1&&H(0,"div",11)}var pt=(()=>{class i{$activeModal=C(R);$api=C(D);$settings=C(Y);$toastr=C(M);$translate=C(V);clicked=!1;maxFileSizeText=globalThis.backup.maxBackupSizeText;selectedFile;wallpaperUrl=null;originalWallpaperUrl=null;wallpaperInput;ngOnInit(){this.$settings.env.customWallpaperHash&&(this.wallpaperUrl=`${ze.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`,this.originalWallpaperUrl=this.wallpaperUrl)}onFileChange(e){if(e.length){this.selectedFile=e[0];let n=new FileReader;n.onload=p=>{this.wallpaperUrl=p.target.result},n.readAsDataURL(this.selectedFile)}else delete this.selectedFile,this.wallpaperUrl=this.originalWallpaperUrl}saveWallpaper(){if(this.clicked=!0,this.selectedFile){let e=new FormData;e.append("wallpaper",this.selectedFile,this.selectedFile.name),this.$api.post("/server/wallpaper",e).subscribe({next:()=>{this.$settings.setItem("wallpaper",`ui-wallpaper.${this.selectedFile.name.split(".").pop()}`),this.$activeModal.close(),this.$toastr.success(this.$translate.instant("settings.display.wallpaper_success"),this.$translate.instant("toast.title_success"))},error:n=>{console.error(n),this.$toastr.error(n.error?.message,this.$translate.instant("toast.title_error")),this.clicked=!1}})}else this.$api.delete("/server/wallpaper").subscribe({next:()=>{this.$activeModal.close()},error:e=>{console.error(e),this.$toastr.error(e.error?.message,this.$translate.instant("toast.title_error")),this.clicked=!1}})}clearWallpaper(){this.selectedFile=null,this.wallpaperUrl=this.wallpaperUrl===this.originalWallpaperUrl?null:this.originalWallpaperUrl,this.wallpaperInput.nativeElement.value=""}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],viewQuery:function(n,p){if(n&1&&Ce(yi,5),n&2){let y;xe(y=Se())&&(p.wallpaperInput=y.first)}},decls:36,vars:28,consts:[["wallpaperInput",""],[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,"text-center","mb-3"],[1,"fas","fa-image","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"mb-3","text-center"],[1,"position-relative","d-inline-block"],[1,"gradient","anim","rounded",2,"height","200px","width","350px","margin","0 auto"],[1,"mb-0"],["type","file","id","wallpaper","accept","image/*",1,"form-control",3,"change"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],["alt","Current Wallpaper",1,"img-fluid","rounded","mx-auto","d-block",2,"height","200px",3,"src"],[1,"btn","btn-danger","position-absolute",2,"top","10px","right","10px",3,"click"],[1,"fas","fa-trash"]],template:function(n,p){if(n&1){let y=E();T(0,"div",1)(1,"div",2)(2,"h5",3),l(3),r(4,"translate"),B(),T(5,"button",4),r(6,"translate"),W("click",function(){return S(y),I(p.dismissModal())}),B()(),T(7,"div",5)(8,"div",6),H(9,"i",7),B(),T(10,"ul",8)(11,"li"),l(12),r(13,"translate"),B(),T(14,"li"),l(15),r(16,"translate"),B(),T(17,"li"),l(18),r(19,"translate"),B()(),T(20,"div",9),_(21,wi,5,4,"div",10)(22,Ei,1,0,"div",11),B(),T(23,"div",12)(24,"input",13,0),W("change",function(q){return S(y),I(p.onFileChange(q.target.files))}),B()()(),T(26,"div",14)(27,"div",15)(28,"button",16),W("click",function(){return S(y),I(p.dismissModal())}),l(29),r(30,"translate"),B()(),H(31,"div",17),T(32,"div",18)(33,"button",19),W("click",function(){return S(y),I(p.saveWallpaper())}),l(34),r(35,"translate"),B()()()()}n&2&&(t(3),u(s(4,11,"settings.display.wallpaper")),t(2),K("disabled",p.clicked),v("aria-label",s(6,13,"form.button_close")),t(7),u(s(13,15,"settings.display.wallpaper_intro")),t(3),u(G(16,17,"settings.display.wallpaper_rule",N(26,ki,p.maxFileSizeText))),t(3),u(s(19,20,"settings.display.wallpaper_rule2")),t(3),h(p.wallpaperUrl?21:22),t(7),K("disabled",p.clicked),t(),g(" ",s(30,22,"form.button_close")," "),t(4),K("disabled",p.wallpaperUrl===p.originalWallpaperUrl||p.clicked),t(),g(" ",s(35,24,"form.button_save")," "))},dependencies:[re,A],styles:[".anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}"]})}return i})();var Z=(i,c)=>({"fa-chevron-down":i,"fa-chevron-right":c}),J=i=>({"is-invalid":i}),Bi=i=>({link:i}),Ti=(i,c)=>({"badge-danger":i,"badge-info":c});function $i(i,c){i&1&&d(0,"app-spinner")}function Fi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Pi(i,c){if(i&1){let e=E();a(0,"ul",8)(1,"li",18)(2,"span"),l(3),r(4,"translate"),o(),a(5,"div",19),d(6,"input",20),r(7,"translate"),_(8,Fi,1,1,"i",21),o()(),a(9,"li",22)(10,"span",23),l(11),r(12,"translate"),o(),a(13,"button",24),r(14,"translate"),x("click",function(){S(e);let p=b(2);return I(p.openBackupModal())}),d(15,"i",25),o()(),a(16,"li",22)(17,"span",23),l(18),r(19,"translate"),o(),a(20,"button",24),r(21,"translate"),x("click",function(){S(e);let p=b(2);return I(p.openConfigBackup())}),d(22,"i",25),o()(),a(23,"li",22)(24,"span",23),l(25),r(26,"translate"),o(),a(27,"a",26),r(28,"translate"),d(29,"i",25),o()()()}if(i&2){let e=b(2);t(3),u(s(4,11,"settings.name")),t(3),m("formControl",e.hbNameFormControl)("ngClass",N(27,J,e.hbNameIsInvalid)),v("aria-label",s(7,13,"settings.name")),t(2),h(e.hbNameIsSaving?8:-1),t(3),g(" ",s(12,15,"backup.title_backup")," "),t(2),v("aria-label",s(14,17,"backup.title_backup")),t(5),g(" ",s(19,19,"config.restore.title")," "),t(2),v("aria-label",s(21,21,"config.restore.title")),t(5),g(" ",s(26,23,"menu.tooltip_user_accounts")," "),t(2),v("aria-label",s(28,25,"menu.tooltip_user_accounts"))}}function Ai(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Ri(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Vi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Mi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Di(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Ni(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Li(i,c){if(i&1){let e=E();a(0,"ul",9)(1,"li",18),l(2),r(3,"translate"),a(4,"div",19)(5,"select",27)(6,"option",28),l(7),r(8,"translate"),o(),a(9,"option",29),l(10,"Bulgarian (bg)"),o(),a(11,"option",30),l(12,"Catalan (ca)"),o(),a(13,"option",31),l(14,"Chinese - Simplified (zh-CN)"),o(),a(15,"option",32),l(16,"Chinese - Traditional (zh-TW)"),o(),a(17,"option",33),l(18,"Czech (cs)"),o(),a(19,"option",34),l(20,"Dutch (nl)"),o(),a(21,"option",35),l(22,"English (en)"),o(),a(23,"option",36),l(24,"Finnish (fi)"),o(),a(25,"option",37),l(26,"French (fr)"),o(),a(27,"option",38),l(28,"German (de)"),o(),a(29,"option",39),l(30,"Hebrew (he)"),o(),a(31,"option",40),l(32,"Hungarian (hu)"),o(),a(33,"option",41),l(34,"Indonesian (id)"),o(),a(35,"option",42),l(36,"Italian (it)"),o(),a(37,"option",43),l(38,"Japanese (ja)"),o(),a(39,"option",44),l(40,"Korean (ko)"),o(),a(41,"option",45),l(42,"Macedonian (mk)"),o(),a(43,"option",46),l(44,"Norwegian (no)"),o(),a(45,"option",47),l(46,"Polish (pl)"),o(),a(47,"option",48),l(48,"Portuguese (Brazil)"),o(),a(49,"option",49),l(50,"Portuguese (Portugal)"),o(),a(51,"option",50),l(52,"Russian (ru)"),o(),a(53,"option",51),l(54,"Slovenian (sl)"),o(),a(55,"option",52),l(56,"Spanish (es)"),o(),a(57,"option",53),l(58,"Swedish (sv)"),o(),a(59,"option",54),l(60,"Thai (th)"),o(),a(61,"option",55),l(62,"Turkish (tr)"),o(),a(63,"option",56),l(64,"Ukrainian (uk)"),o()(),_(65,Ai,1,1,"i",21),o()(),a(66,"li",18),l(67),r(68,"translate"),a(69,"div",19)(70,"select",27)(71,"option",57),l(72),r(73,"translate"),o(),a(74,"option",58),l(75),r(76,"translate"),o(),a(77,"option",59),l(78),r(79,"translate"),o(),a(80,"option",60),l(81),r(82,"translate"),o(),a(83,"option",61),l(84),r(85,"translate"),o(),a(86,"option",62),l(87),r(88,"translate"),o(),a(89,"option",63),l(90),r(91,"translate"),o(),a(92,"option",64),l(93),r(94,"translate"),o(),a(95,"option",65),l(96),r(97,"translate"),o(),a(98,"option",66),l(99),r(100,"translate"),o(),a(101,"option",67),l(102),r(103,"translate"),o(),a(104,"option",68),l(105),r(106,"translate"),o(),a(107,"option",69),l(108),r(109,"translate"),o()(),_(110,Ri,1,1,"i",21),o()(),a(111,"li",18),l(112),r(113,"translate"),a(114,"div",19)(115,"select",27)(116,"option",28),l(117),r(118,"translate"),o(),a(119,"option",70),l(120),r(121,"translate"),o(),a(122,"option",71),l(123),r(124,"translate"),o()(),_(125,Vi,1,1,"i",21),o()(),a(126,"li",18),l(127),r(128,"translate"),a(129,"div",19)(130,"select",27)(131,"option",72),l(132),r(133,"translate"),o(),a(134,"option",73),l(135),r(136,"translate"),o()(),_(137,Mi,1,1,"i",21),o()(),a(138,"li",18),l(139),r(140,"translate"),a(141,"div",19)(142,"select",27)(143,"option",74),l(144),r(145,"translate"),o(),a(146,"option",75),l(147),r(148,"translate"),o()(),_(149,Di,1,1,"i",21),o()(),a(150,"li",22)(151,"span"),l(152),r(153,"translate"),o(),a(154,"div",76)(155,"div",77),d(156,"input",78),r(157,"translate"),d(158,"label",79),o(),_(159,Ni,1,1,"i",21),o()(),a(160,"li",22)(161,"span",23),l(162),r(163,"translate"),o(),a(164,"button",24),r(165,"translate"),x("click",function(){S(e);let p=b(2);return I(p.openWallpaperModal())}),d(166,"i",25),o()()()}if(i&2){let e=b(2);t(2),g(" ",s(3,42,"settings.display.lang")," "),t(3),m("formControl",e.uiLangFormControl),t(2),u(s(8,44,"form.select.auto")),t(58),h(e.uiLangIsSaving?65:-1),t(2),g(" ",s(68,46,"settings.display.theme")," "),t(3),m("formControl",e.uiThemeFormControl),t(2),u(s(73,48,"settings.display.orange")),t(3),u(s(76,50,"settings.display.red")),t(3),u(s(79,52,"settings.display.pink")),t(3),u(s(82,54,"settings.display.purple")),t(3),u(s(85,56,"settings.display.deep_purple")),t(3),u(s(88,58,"settings.display.indigo")),t(3),u(s(91,60,"settings.display.blue")),t(3),u(s(94,62,"settings.display.bluegrey")),t(3),u(s(97,64,"settings.display.cyan")),t(3),u(s(100,66,"settings.display.green")),t(3),u(s(103,68,"settings.display.teal")),t(3),u(s(106,70,"settings.display.grey")),t(3),u(s(109,72,"settings.display.brown")),t(2),h(e.uiThemeIsSaving?110:-1),t(2),g(" ",s(113,74,"settings.display.lighting_mode")," "),t(3),m("formControl",e.uiLightFormControl),t(2),u(s(118,76,"form.select.auto")),t(3),u(s(121,78,"settings.display.light")),t(3),u(s(124,80,"settings.display.dark")),t(2),h(e.uiLightIsSaving?125:-1),t(2),g(" ",s(128,82,"settings.display.menu_mode")," "),t(3),m("formControl",e.uiMenuFormControl),t(2),u(s(133,84,"settings.display.menu_default")),t(3),u(s(136,86,"settings.display.menu_freeze")),t(2),h(e.uiMenuIsSaving?137:-1),t(2),g(" ",s(140,88,"settings.display.temp_units")," "),t(3),m("formControl",e.uiTempFormControl),t(2),u(s(145,90,"settings.display.temp_units.c")),t(3),u(s(148,92,"settings.display.temp_units.f")),t(2),h(e.uiTempIsSaving?149:-1),t(3),g(" ",s(153,94,"settings.display.show_betas")," "),t(4),m("formControl",e.uiAlwaysShowBetasFormControl),v("aria-label",s(157,96,"settings.display.show_betas")),t(3),h(e.uiAlwaysShowBetasIsSaving?159:-1),t(3),u(s(163,98,"settings.display.wallpaper")),t(2),v("aria-label",s(165,100,"settings.display.wallpaper"))}}function zi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Oi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Hi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Ui(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Wi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Ki(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Gi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function ji(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function qi(i,c){if(i&1&&(a(0,"li",18)(1,"span"),l(2),r(3,"translate"),d(4,"br"),a(5,"small",80),l(6),r(7,"translate"),o()(),a(8,"div",19),d(9,"input",96),r(10,"translate"),_(11,ji,1,1,"i",21),o()()),i&2){let e=b(4);t(2),g(" ",s(3,5,"settings.linux.temp")),t(4),u(s(7,7,"settings.linux.temp_desc")),t(3),m("formControl",e.uiTempFileFormControl),v("aria-label",s(10,9,"settings.linux.temp")),t(2),h(e.uiTempFileIsSaving?11:-1)}}function Qi(i,c){if(i&1&&(a(0,"li",18)(1,"span"),l(2),r(3,"translate"),d(4,"br"),a(5,"small",80),l(6),r(7,"translate"),o()(),a(8,"div",19),d(9,"input",94),r(10,"translate"),_(11,Ki,1,1,"i",21),o()(),a(12,"li",18)(13,"span"),l(14),r(15,"translate"),d(16,"br"),a(17,"small",80),l(18),r(19,"translate"),o()(),a(20,"div",19),d(21,"input",95),r(22,"translate"),_(23,Gi,1,1,"i",21),o()(),_(24,qi,12,11,"li",18)),i&2){let e=b(3);t(2),g(" ",s(3,11,"settings.linux.shutdown")),t(4),u(s(7,13,"settings.linux.shutdown_desc")),t(3),m("formControl",e.hbLinuxShutdownFormControl),v("aria-label",s(10,15,"settings.linux.shutdown")),t(2),h(e.hbLinuxShutdownIsSaving?11:-1),t(3),g(" ",s(15,17,"settings.linux.restart")),t(4),u(s(19,19,"settings.linux.restart_desc")),t(3),m("formControl",e.hbLinuxRestartFormControl),v("aria-label",s(22,21,"settings.linux.restart")),t(2),h(e.hbLinuxRestartIsSaving?23:-1),t(),h(e.runningOnRaspberryPi?24:-1)}}function Ji(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Xi(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Yi(i,c){i&1&&(a(0,"li",22)(1,"span"),l(2),r(3,"translate"),d(4,"br"),a(5,"small",80),l(6),r(7,"translate"),o()(),a(8,"a",97),r(9,"translate"),d(10,"i",25),o()()),i&2&&(t(2),g(" ",s(3,3,"menu.docker.startup_script")),t(4),u(s(7,5,"platform.docker.script_help")),t(2),v("aria-label",s(9,7,"menu.docker.startup_script")))}function Zi(i,c){if(i&1&&(a(0,"ul",10)(1,"li",22)(2,"span"),l(3),r(4,"translate"),a(5,"code"),l(6,"-D"),o(),d(7,"br"),a(8,"small",80),l(9),r(10,"translate"),o()(),a(11,"div",76)(12,"div",77),d(13,"input",81),r(14,"translate"),d(15,"label",82),o(),_(16,zi,1,1,"i",21),o()(),a(17,"li",22)(18,"span"),l(19),r(20,"translate"),a(21,"code"),l(22,"-I"),o(),d(23,"br"),a(24,"small",80),l(25),r(26,"translate"),o()(),a(27,"div",76)(28,"div",77),d(29,"input",83),r(30,"translate"),d(31,"label",84),o(),_(32,Oi,1,1,"i",21),o()(),a(33,"li",22)(34,"span"),l(35),r(36,"translate"),a(37,"code"),l(38,"-K"),o(),d(39,"br"),a(40,"small",80),l(41),r(42,"translate"),o()(),a(43,"div",76)(44,"div",77),d(45,"input",85),r(46,"translate"),d(47,"label",86),o(),_(48,Hi,1,1,"i",21),o()(),a(49,"li",22)(50,"span"),l(51),r(52,"translate"),d(53,"br"),a(54,"small",80),l(55),r(56,"translate"),o()(),a(57,"div",76)(58,"div",77),d(59,"input",87),r(60,"translate"),d(61,"label",88),o(),_(62,Ui,1,1,"i",21),o()(),a(63,"li",18)(64,"span"),l(65),r(66,"translate"),d(67,"br"),a(68,"small",80),l(69),r(70,"translate"),o()(),a(71,"div",19),d(72,"input",89),r(73,"translate"),_(74,Wi,1,1,"i",21),o()(),_(75,Qi,25,23),a(76,"li",18)(77,"span")(78,"span",90),l(79,"DEBUG"),o(),d(80,"br")(81,"small",91),r(82,"translate"),o(),a(83,"div",19),d(84,"input",92),_(85,Ji,1,1,"i",21),o()(),a(86,"li",18)(87,"span")(88,"span",90),l(89,"NODE_OPTIONS"),o(),d(90,"br"),a(91,"small",80),l(92),r(93,"translate"),o()(),a(94,"div",19),d(95,"input",93),_(96,Xi,1,1,"i",21),o()(),_(97,Yi,11,9,"li",22),o()),i&2){let e=b(2);t(3),g(" ",s(4,33,"settings.startup.debug")," "),t(6),g(" ",s(10,35,e.isHbV2?"settings.startup.debug_desc_v2":"settings.startup.debug_desc_v1")," "),t(4),m("formControl",e.hbDebugFormControl),v("aria-label",s(14,37,"settings.startup.debug")),t(3),h(e.hbDebugIsSaving?16:-1),t(3),g(" ",s(20,39,"settings.startup.insecure")," "),t(6),u(s(26,41,"settings.startup.insecure_desc")),t(4),m("formControl",e.hbInsecureFormControl),v("aria-label",s(30,43,"settings.startup.insecure")),t(3),h(e.hbInsecureIsSaving?32:-1),t(3),g(" ",s(36,45,"settings.startup.keep_accessories")," "),t(6),u(s(42,47,"settings.startup.keep_accessories_desc")),t(4),m("formControl",e.hbKeepFormControl),v("aria-label",s(46,49,"settings.startup.keep_accessories")),t(3),h(e.hbKeepIsSaving?48:-1),t(3),g(" ",s(52,51,"settings.startup.metrics")),t(4),u(s(56,53,"settings.startup.metrics_desc")),t(4),m("formControl",e.uiMetricsFormControl),v("aria-label",s(60,55,"settings.startup.metrics")),t(3),h(e.uiMetricsIsSaving?62:-1),t(3),g(" ",s(66,57,"settings.network.hb_package")),t(4),u(s(70,59,"settings.network.hb_package_desc")),t(3),m("formControl",e.hbPackageFormControl),v("aria-label",s(73,61,"settings.network.hb_package")),t(2),h(e.hbPackageIsSaving?74:-1),t(),h(e.platform==="linux"?75:-1),t(6),m("innerHTML",G(82,63,"settings.service.debug_tooltip",N(68,Bi,e.linkDebug)),ee),t(3),m("formControl",e.hbEnvDebugFormControl),t(),h(e.hbEnvDebugIsSaving?85:-1),t(7),u(s(93,66,"settings.service.node_tooltip")),t(3),m("formControl",e.hbEnvNodeFormControl),t(),h(e.hbEnvNodeIsSaving?96:-1),t(),h(e.runningInDocker?97:-1)}}function en(i,c){i&1&&d(0,"i",112)}function tn(i,c){if(i&1&&(a(0,"span",99),_(1,en,1,0,"i",112),l(2),a(3,"span",113),l(4),r(5,"translate"),o()()),i&2){let e=c.$implicit;m("ngClass",F(6,Ti,e.missing,!e.missing)),t(),h(e.missing?1:-1),t(),g(" ",e.iface,": "),t(2),u(e.missing?s(5,4,"settings.mdns_advertiser_not_connected"):e.ip4||e.ip6)}}function nn(i,c){i&1&&(a(0,"option",101),l(1),r(2,"translate"),o()),i&2&&(t(),g("Avahi (",s(2,1,"settings.mdns_advertiser_rec"),")"))}function an(i,c){i&1&&(a(0,"option",104),l(1),r(2,"translate"),o()),i&2&&(t(),g("systemd-resolved (",s(2,1,"settings.mdns_advertiser_exp"),")"))}function on(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function rn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function sn(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114),l(3),r(4,"translate"),o()),i&2&&(t(3),g(" ",s(4,1,"settings.warning_pwa")," "))}function ln(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function pn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function dn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function cn(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114),l(3),r(4,"translate"),o()),i&2&&(t(3),g(" ",s(4,1,"settings.warning_pwa")," "))}function mn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function un(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114)(3,"span",115),r(4,"translate"),o()),i&2&&(t(3),m("innerHtml",s(4,1,"settings.warning_webroot"),ee))}function _n(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114)(3,"span",115),r(4,"translate"),o()),i&2&&(t(3),m("innerHtml",s(4,1,"settings.warning_pwa"),ee))}function hn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function gn(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114),l(3),r(4,"translate"),o()),i&2&&(t(3),g(" ",s(4,1,"settings.warning_pwa")," "))}function bn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function vn(i,c){if(i&1){let e=E();a(0,"ul",11)(1,"li",22)(2,"span",23),l(3),r(4,"translate"),d(5,"br"),a(6,"div",98),l(7),r(8,"translate"),o(),z(9,tn,6,9,"span",99,L),o(),a(11,"button",100),r(12,"translate"),x("click",function(){S(e);let p=b(2);return I(p.selectNetworkInterfaces())}),d(13,"i",25),o()(),a(14,"li",18)(15,"span"),l(16),r(17,"translate"),d(18,"br"),a(19,"small",80),l(20),r(21,"translate"),o()(),a(22,"div",19)(23,"select",27),r(24,"translate"),_(25,nn,3,3,"option",101),a(26,"option",102),l(27),r(28,"translate"),o(),a(29,"option",103),l(30,"Bonjour HAP"),o(),_(31,an,3,3,"option",104),o(),_(32,on,1,1,"i",21),o()(),a(33,"li",18)(34,"span"),l(35),r(36,"translate"),d(37,"br"),a(38,"small",80),l(39),r(40,"translate"),o()(),a(41,"div",19),d(42,"input",105),r(43,"translate"),_(44,rn,1,1,"i",21),o()(),a(45,"li",18)(46,"span"),l(47),r(48,"translate"),d(49,"br"),a(50,"small",80),l(51),r(52,"translate"),o(),_(53,sn,5,3),o(),a(54,"div",19),d(55,"input",106),r(56,"translate"),_(57,ln,1,1,"i",21),o()(),a(58,"li",18)(59,"span"),l(60),r(61,"translate"),d(62,"br"),a(63,"small",80),l(64),r(65,"translate"),o()(),a(66,"div",19),d(67,"input",105),r(68,"translate"),_(69,pn,1,1,"i",21),o()(),a(70,"li",18)(71,"span"),l(72),r(73,"translate"),d(74,"br"),a(75,"small",80),l(76),r(77,"translate"),o()(),a(78,"div",19),d(79,"input",105),r(80,"translate"),_(81,dn,1,1,"i",21),o()(),a(82,"li",18)(83,"span"),l(84),r(85,"translate"),d(86,"br")(87,"small",107),r(88,"translate"),_(89,cn,5,3),o(),a(90,"div",19),d(91,"input",108),r(92,"translate"),_(93,mn,1,1,"i",21),o()(),a(94,"li",18)(95,"span"),l(96),r(97,"translate"),a(98,"span",109),l(99),r(100,"translate"),o(),d(101,"br")(102,"small",107),r(103,"translate"),_(104,un,5,3)(105,_n,5,3),o(),a(106,"div",19),d(107,"input",110),r(108,"translate"),_(109,hn,1,1,"i",21),o()(),a(110,"li",18)(111,"span"),l(112),r(113,"translate"),d(114,"br"),a(115,"small",80),l(116),r(117,"translate"),o(),_(118,gn,5,3),o(),a(119,"div",19),d(120,"input",111),r(121,"translate"),_(122,bn,1,1,"i",21),o()()()}if(i&2){let e=b(2);t(3),g(" ",s(4,56,"settings.network.title_network_interfaces")),t(4),u(s(8,58,"settings.network.message_network_interface")),t(2),O(e.adaptersSelected),t(2),m("disabled",!e.adaptersAvailable.length),v("aria-label",s(12,60,"settings.network.title_network_interfaces")),t(5),g(" ",s(17,62,"settings.mdns_advertiser")),t(4),u(s(21,64,"settings.mdns_advertiser_help")),t(3),m("formControl",e.hbMDnsFormControl),v("aria-label",s(24,66,"settings.mdns_advertiser")),t(2),h(e.showAvahiMdnsOption?25:-1),t(2),g(" Ciao ",e.showAvahiMdnsOption?"":"("+s(28,68,"settings.mdns_advertiser_rec")+")"," "),t(4),h(e.showResolvedMdnsOption?31:-1),t(),h(e.hbMDnsIsSaving?32:-1),t(3),g(" ",s(36,70,"settings.network.port_hb")),t(4),u(s(40,72,"settings.network.port_hb_desc")),t(3),m("formControl",e.hbPortFormControl)("ngClass",N(114,J,e.hbPortIsInvalid)),v("aria-label",s(43,74,"settings.network.port_hb")),t(2),h(e.hbPortIsSaving?44:-1),t(3),g(" ",s(48,76,"settings.network.port_ui")),t(4),u(s(52,78,"settings.network.port_ui_desc")),t(2),h(e.isPwa?53:-1),t(2),m("formControl",e.uiPortFormControl)("ngClass",N(116,J,e.uiPortIsInvalid)),v("aria-label",s(56,80,"settings.network.port_ui")),t(2),h(e.uiPortIsSaving?57:-1),t(3),g(" ",s(61,82,"settings.network.port_start")),t(4),u(s(65,84,"settings.network.port_start_desc")),t(3),m("formControl",e.hbStartPortFormControl)("ngClass",N(118,J,e.hbStartPortIsInvalid)),v("aria-label",s(68,86,"settings.network.port_start")),t(2),h(e.hbStartPortIsSaving?69:-1),t(3),g(" ",s(73,88,"settings.network.port_end")),t(4),u(s(77,90,"settings.network.port_end_desc")),t(3),m("formControl",e.hbEndPortFormControl)("ngClass",N(120,J,e.hbEndPortIsInvalid)),v("aria-label",s(80,92,"settings.network.port_end")),t(2),h(e.hbEndPortIsSaving?81:-1),t(3),g(" ",s(85,94,"settings.network.host")),t(3),m("innerHtml",s(88,96,"settings.network.host_desc"),ee),t(2),h(e.isPwa?89:-1),t(2),m("formControl",e.uiHostFormControl),v("aria-label",s(92,98,"settings.network.host")),t(2),h(e.uiHostIsSaving?93:-1),t(3),g(" ",s(97,100,"settings.network.webroot")," "),t(3),u(s(100,102,"common.labels.beta")),t(3),m("innerHtml",s(103,104,"settings.network.webroot_desc"),ee),t(2),h(e.webrootSettingDisabledAccess?104:e.isPwa?105:-1),t(3),m("formControl",e.uiWebrootFormControl),v("aria-label",s(108,106,"settings.network.webroot")),t(2),h(e.uiWebrootIsSaving?109:-1),t(3),g(" ",s(113,108,"settings.network.proxy")),t(4),u(s(117,110,"settings.network.proxy_desc")),t(2),h(e.isPwa?118:-1),t(2),m("formControl",e.uiProxyHostFormControl),v("aria-label",s(121,112,"settings.network.proxy")),t(2),h(e.uiProxyHostIsSaving?122:-1)}}function fn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Cn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function xn(i,c){if(i&1&&(a(0,"li",18)(1,"span"),l(2),r(3,"translate"),d(4,"br"),a(5,"small",80),l(6),r(7,"translate"),o()(),a(8,"div",19),d(9,"input",117),r(10,"translate"),_(11,Cn,1,1,"i",21),o()()),i&2){let e=b(3);t(2),g(" ",s(3,6,"settings.terminal.log_truncate")),t(4),u(s(7,8,"settings.terminal.log_truncate_desc")),t(3),m("formControl",e.hbLogTruncateFormControl)("ngClass",N(12,J,e.hbLogTruncateIsInvalid)),v("aria-label",s(10,10,"settings.terminal.log_truncate")),t(2),h(e.hbLogTruncateIsSaving?11:-1)}}function Sn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function In(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function yn(i,c){if(i&1&&(a(0,"li",22)(1,"span"),l(2),r(3,"translate"),a(4,"span",109),l(5),r(6,"translate"),o(),d(7,"br"),a(8,"small",80),l(9),r(10,"translate"),o()(),a(11,"div",76)(12,"div",77),d(13,"input",120),r(14,"translate"),d(15,"label",121),o(),_(16,In,1,1,"i",21),o()()),i&2){let e=b(4);t(2),g(" ",s(3,6,"settings.terminal.warning")," "),t(3),u(s(6,8,"common.labels.beta")),t(4),u(s(10,10,"settings.terminal.warning_help")),t(4),m("formControl",e.uiTerminalHideWarningFormControl),v("aria-label",s(14,12,"settings.terminal.warning")),t(3),h(e.uiTerminalHideWarningIsSaving?16:-1)}}function kn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function wn(i,c){if(i&1&&(a(0,"li",18)(1,"div",122)(2,"span"),l(3),r(4,"translate"),a(5,"span",109),l(6),r(7,"translate"),o()(),a(8,"div",123),l(9),r(10,"translate"),o()(),a(11,"div",19),d(12,"input",124),r(13,"translate"),_(14,kn,1,1,"i",21),o()()),i&2){let e=b(4);t(3),g(" ",s(4,7,"settings.terminal.buffer_size")," "),t(3),u(s(7,9,"common.labels.beta")),t(3),u(s(10,11,"settings.terminal.buffer_size_help")),t(3),m("formControl",e.uiTerminalBufferSizeFormControl)("ngClass",N(15,J,e.uiTerminalBufferSizeIsInvalid)),v("aria-label",s(13,13,"settings.terminal.buffer_size")),t(2),h(e.uiTerminalBufferSizeIsSaving?14:-1)}}function En(i,c){if(i&1&&(a(0,"li",22)(1,"span"),l(2),r(3,"translate"),a(4,"span",109),l(5),r(6,"translate"),o(),d(7,"br"),a(8,"small",80),l(9),r(10,"translate"),o()(),a(11,"div",76)(12,"div",77),d(13,"input",118),r(14,"translate"),d(15,"label",119),o(),_(16,Sn,1,1,"i",21),o()(),_(17,yn,17,14,"li",22),_(18,wn,15,17,"li",18)),i&2){let e=b(3);t(2),g(" ",s(3,8,"settings.terminal.persistence")," "),t(3),u(s(6,10,"common.labels.beta")),t(4),u(s(10,12,"settings.terminal.persistence_help")),t(4),m("formControl",e.uiTerminalPersistenceFormControl),v("aria-label",s(14,14,"settings.terminal.persistence")),t(3),h(e.uiTerminalPersistenceIsSaving?16:-1),t(),h(e.uiTerminalPersistenceFormControl.value?-1:17),t(),h(e.uiTerminalPersistenceFormControl.value?18:-1)}}function Bn(i,c){if(i&1&&(a(0,"ul",12)(1,"li",18)(2,"span"),l(3),r(4,"translate"),d(5,"br"),a(6,"small",80),l(7),r(8,"translate"),o()(),a(9,"div",19),d(10,"input",116),r(11,"translate"),_(12,fn,1,1,"i",21),o()(),_(13,xn,12,14,"li",18),_(14,En,19,16),o()),i&2){let e=b(2);t(3),g(" ",s(4,8,"settings.terminal.log_max")),t(4),u(s(8,10,"settings.terminal.log_max_desc")),t(3),m("formControl",e.hbLogSizeFormControl)("ngClass",N(14,J,e.hbLogSizeIsInvalid)),v("aria-label",s(11,12,"settings.terminal.log_max")),t(2),h(e.hbLogSizeIsSaving?12:-1),t(),h(e.hbLogSizeFormControl.value>0?13:-1),t(),h(e.enableTerminalAccess?14:-1)}}function Tn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function $n(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Fn(i,c){if(i&1&&(a(0,"li",18)(1,"span"),l(2),r(3,"translate"),d(4,"br"),a(5,"small",80),l(6),r(7,"translate"),o()(),a(8,"div",19),d(9,"input",130),r(10,"translate"),_(11,$n,1,1,"i",21),o()()),i&2){let e=b(3);t(2),g(" ",s(3,6,"settings.startup.session")),t(4),u(s(7,8,"settings.startup.session_desc")),t(3),m("formControl",e.uiSessionTimeoutFormControl)("ngClass",N(12,J,e.uiSessionTimeoutIsInvalid)),v("aria-label",s(10,10,"settings.startup.session")),t(2),h(e.uiSessionTimeoutIsSaving?11:-1)}}function Pn(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114),l(3),r(4,"translate"),o()),i&2&&(t(3),g(" ",s(4,1,"settings.warning_pwa")," "))}function An(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114),l(3),r(4,"translate"),o()),i&2&&(t(3),g(" ",s(4,1,"settings.warning_pwa")," "))}function Rn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Vn(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114),l(3),r(4,"translate"),o()),i&2&&(t(3),g(" ",s(4,1,"settings.warning_pwa")," "))}function Mn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Dn(i,c){if(i&1&&(a(0,"li",18)(1,"span"),l(2),r(3,"translate"),o(),_(4,An,5,3),a(5,"div",19),d(6,"input",131),r(7,"translate"),_(8,Rn,1,1,"i",21),o()(),a(9,"li",18)(10,"span"),l(11),r(12,"translate"),o(),_(13,Vn,5,3),a(14,"div",19),d(15,"input",132),r(16,"translate"),_(17,Mn,1,1,"i",21),o()()),i&2){let e=b(3);t(2),u(s(3,10,"settings.security.key")),t(2),h(e.isPwa?4:-1),t(2),m("formControl",e.uiSslKeyFormControl),v("aria-label",s(7,12,"settings.security.key")),t(2),h(e.uiSslKeyIsSaving?8:-1),t(3),u(s(12,14,"settings.security.cert")),t(2),h(e.isPwa?13:-1),t(2),m("formControl",e.uiSslCertFormControl),v("aria-label",s(16,16,"settings.security.cert")),t(2),h(e.uiSslCertIsSaving?17:-1)}}function Nn(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114),l(3),r(4,"translate"),o()),i&2&&(t(3),g(" ",s(4,1,"settings.warning_pwa")," "))}function Ln(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function zn(i,c){i&1&&(d(0,"br"),a(1,"small",80),d(2,"i",114),l(3),r(4,"translate"),o()),i&2&&(t(3),g(" ",s(4,1,"settings.warning_pwa")," "))}function On(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Hn(i,c){if(i&1){let e=E();a(0,"li",18)(1,"span"),l(2),r(3,"translate"),o(),_(4,Nn,5,3),a(5,"div",19),d(6,"input",133),r(7,"translate"),_(8,Ln,1,1,"i",21),o()(),a(9,"li",18)(10,"span"),l(11),r(12,"translate"),o(),_(13,zn,5,3),a(14,"div",19)(15,"input",134),r(16,"translate"),x("focus",function(){S(e);let p=b(3);return I(p.showPfxPassphrase=!0)})("blur",function(){S(e);let p=b(3);return I(p.showPfxPassphrase=!1)}),o(),_(17,On,1,1,"i",21),o()()}if(i&2){let e=b(3);t(2),u(s(3,11,"settings.security.pfx")),t(2),h(e.isPwa?4:-1),t(2),m("formControl",e.uiSslPfxFormControl),v("aria-label",s(7,13,"settings.security.pfx")),t(2),h(e.uiSslPfxIsSaving?8:-1),t(3),u(s(12,15,"settings.security.pass")),t(2),h(e.isPwa?13:-1),t(2),m("type",e.showPfxPassphrase?"text":"password")("formControl",e.uiSslPassphraseFormControl),v("aria-label",s(16,17,"settings.security.pass")),t(2),h(e.uiSslPassphraseIsSaving?17:-1)}}function Un(i,c){if(i&1){let e=E();a(0,"ul",13)(1,"li",22)(2,"span"),l(3),r(4,"translate"),d(5,"br"),a(6,"small",80),l(7),r(8,"translate"),o()(),a(9,"div",76)(10,"div",77),d(11,"input",125),r(12,"translate"),d(13,"label",126),o(),_(14,Tn,1,1,"i",21),o()(),_(15,Fn,12,14,"li",18),a(16,"li",18)(17,"span"),l(18),r(19,"translate"),d(20,"br"),a(21,"small",80),l(22),r(23,"translate"),o(),_(24,Pn,5,3),o(),a(25,"div",19)(26,"select",27),r(27,"translate"),a(28,"option",127),l(29),r(30,"translate"),o(),a(31,"option",128),l(32),r(33,"translate"),o(),a(34,"option",129),l(35),r(36,"translate"),o()()()(),_(37,Dn,18,18),_(38,Hn,18,19),a(39,"li",22)(40,"span",23),l(41),r(42,"translate"),d(43,"br"),a(44,"small",80),l(45),r(46,"translate"),o()(),a(47,"button",24),r(48,"translate"),x("click",function(){S(e);let p=b(2);return I(p.accessoryUiControl())}),d(49,"i",25),o()()()}if(i&2){let e=b(2);t(3),g(" ",s(4,19,"settings.security.auth")),t(4),g(" ",s(8,21,"settings.security.auth_desc")," "),t(4),m("formControl",e.uiAuthFormControl),v("aria-label",s(12,23,"settings.security.auth")),t(3),h(e.uiAuthIsSaving?14:-1),t(),h(e.uiAuthFormControl.value?15:-1),t(3),g(" ",s(19,25,"settings.security.https")),t(4),u(s(23,27,"settings.security.https_desc")),t(2),h(e.isPwa?24:-1),t(2),m("formControl",e.uiSslTypeFormControl),v("aria-label",s(27,29,"settings.security.https")),t(3),u(s(30,31,"accessories.control.off")),t(3),u(s(33,33,"settings.security.https_keycert")),t(3),u(s(36,35,"settings.security.https_pfx")),t(2),h(e.uiSslTypeFormControl.value==="keycert"?37:-1),t(),h(e.uiSslTypeFormControl.value==="pfx"?38:-1),t(3),g(" ",s(42,37,"settings.security.ui_control")),t(4),u(s(46,39,"settings.security.ui_control_desc")),t(2),v("aria-label",s(48,41,"settings.security.ui_control"))}}function Wn(i,c){i&1&&(a(0,"p",14),l(1),r(2,"translate"),o()),i&2&&(t(),u(s(2,1,"settings.cache.desc")))}function Kn(i,c){i&1&&d(0,"i",21),i&2&&m("@fadeInOut",void 0)}function Gn(i,c){if(i&1){let e=E();a(0,"ul",15)(1,"li",22)(2,"span"),l(3),r(4,"translate"),d(5,"br"),a(6,"small",80),l(7),r(8,"translate"),o()(),a(9,"div",76)(10,"div",77),d(11,"input",135),r(12,"translate"),d(13,"label",136),o(),_(14,Kn,1,1,"i",21),o()(),a(15,"li",22)(16,"span",23),l(17),r(18,"translate"),d(19,"br"),a(20,"small",80),l(21),r(22,"translate"),o()(),a(23,"button",24),r(24,"translate"),x("click",function(){S(e);let p=b(2);return I(p.removeSingleCachedAccessories())}),d(25,"i",25),o()(),a(26,"li",22)(27,"span",23),l(28),r(29,"translate"),d(30,"br"),a(31,"small",80),l(32),r(33,"translate"),o()(),a(34,"button",24),r(35,"translate"),x("click",function(){S(e);let p=b(2);return I(p.removeBridgeAccessories())}),d(36,"i",25),o()(),a(37,"li",22)(38,"span",23),l(39),r(40,"translate"),d(41,"br"),a(42,"small",80),l(43),r(44,"translate"),o()(),a(45,"button",24),r(46,"translate"),x("click",function(){S(e);let p=b(2);return I(p.removeAllCachedAccessories())}),d(47,"i",25),o()()()}if(i&2){let e=b(2);t(3),g(" ",s(4,14,"settings.accessory.debug")),t(4),u(s(8,16,"settings.accessory.debug_desc")),t(4),m("formControl",e.uiAccDebugFormControl),v("aria-label",s(12,18,"settings.accessory.debug")),t(3),h(e.uiAccDebugIsSaving?14:-1),t(3),g(" ",s(18,20,"reset.accessory_ind.title")),t(4),u(s(22,22,"reset.accessory_ind.desc")),t(2),v("aria-label",s(24,24,"reset.accessory_ind.title")),t(5),g(" ",s(29,26,"reset.bridge_accessories.title")),t(4),u(s(33,28,"reset.bridge_accessories.desc")),t(2),v("aria-label",s(35,30,"reset.accessory_all.title")),t(5),g(" ",s(40,32,"reset.accessory_all.title")),t(4),u(s(44,34,"reset.accessory_all.desc")),t(2),v("aria-label",s(46,36,"reset.accessory_all.title"))}}function jn(i,c){i&1&&(a(0,"p",14),l(1),r(2,"translate"),o()),i&2&&(t(),u(s(2,1,"reset.bridges.desc")))}function qn(i,c){if(i&1){let e=E();a(0,"ul",16)(1,"li",22)(2,"span",23),l(3),r(4,"translate"),d(5,"br"),a(6,"small",80),l(7),r(8,"translate"),o()(),a(9,"button",24),r(10,"translate"),x("click",function(){S(e);let p=b(2);return I(p.unpairAccessory())}),d(11,"i",25),o()(),a(12,"li",22)(13,"span",23),l(14),r(15,"translate"),r(16,"titlecase"),d(17,"br"),a(18,"small",80),l(19),r(20,"translate"),o()(),a(21,"button",24),r(22,"translate"),x("click",function(){S(e);let p=b(2);return I(p.resetHomebridgeState())}),d(23,"i",25),o()()()}i&2&&(t(3),g(" ",s(4,6,"reset.bridge_ind.title")),t(4),u(s(8,8,"reset.bridge_ind.desc")),t(2),v("aria-label",s(10,10,"reset.bridge_ind.title")),t(5),g(" ",s(16,14,s(15,12,"reset.bridge_all.title"))),t(5),u(s(20,16,"reset.bridge_all.desc")),t(2),v("aria-label",s(22,18,"reset.bridge_all.title")))}function Qn(i,c){if(i&1){let e=E();a(0,"div",4)(1,"div",5),x("click",function(){S(e);let p=b();return I(p.toggleSection("general"))}),a(2,"h5",6),d(3,"i",7),l(4),r(5,"translate"),o()(),_(6,Pi,30,29,"ul",8),o(),a(7,"div",4)(8,"div",5),x("click",function(){S(e);let p=b();return I(p.toggleSection("display"))}),a(9,"h5",6),d(10,"i",7),l(11),r(12,"translate"),o()(),_(13,Li,167,102,"ul",9),o(),a(14,"div",4)(15,"div",5),x("click",function(){S(e);let p=b();return I(p.toggleSection("startup"))}),a(16,"h5",6),d(17,"i",7),l(18),r(19,"translate"),o()(),_(20,Zi,98,70,"ul",10),o(),a(21,"div",4)(22,"div",5),x("click",function(){S(e);let p=b();return I(p.toggleSection("network"))}),a(23,"h5",6),d(24,"i",7),l(25),r(26,"translate"),o()(),_(27,vn,123,122,"ul",11),o(),a(28,"div",4)(29,"div",5),x("click",function(){S(e);let p=b();return I(p.toggleSection("terminal"))}),a(30,"h5",6),d(31,"i",7),l(32),r(33,"translate"),o()(),_(34,Bn,15,16,"ul",12),o(),a(35,"div",4)(36,"div",5),x("click",function(){S(e);let p=b();return I(p.toggleSection("security"))}),a(37,"h5",6),d(38,"i",7),l(39),r(40,"translate"),o()(),_(41,Un,50,43,"ul",13),o(),a(42,"div",4)(43,"div",5),x("click",function(){S(e);let p=b();return I(p.toggleSection("cache"))}),a(44,"h5",6),d(45,"i",7),l(46),r(47,"translate"),o()(),_(48,Wn,3,3,"p",14),_(49,Gn,48,38,"ul",15),o(),a(50,"div",4)(51,"div",5),x("click",function(){S(e);let p=b();return I(p.toggleSection("reset"))}),a(52,"h5",6),d(53,"i",7),l(54),r(55,"translate"),o()(),_(56,jn,3,3,"p",14),_(57,qn,24,20,"ul",16),o(),d(58,"div",17)}if(i&2){let e=b();t(),v("aria-expanded",e.showFields.general?"true":"false")("aria-controls","fieldsGeneral"),t(2),m("ngClass",F(58,Z,e.showFields.general,!e.showFields.general)),t(),g(" ",s(5,42,"settings.general.title_general")," "),t(2),h(e.showFields.general?6:-1),t(2),v("aria-expanded",e.showFields.display?"true":"false")("aria-controls","fieldsDisplay"),t(2),m("ngClass",F(61,Z,e.showFields.display,!e.showFields.display)),t(),g(" ",s(12,44,"settings.general.title_display")," "),t(2),h(e.showFields.display?13:-1),t(2),v("aria-expanded",e.showFields.startup?"true":"false")("aria-controls","fieldsStartup"),t(2),m("ngClass",F(64,Z,e.showFields.startup,!e.showFields.startup)),t(),g(" ",s(19,46,"settings.title_startup_options")," "),t(2),h(e.showFields.startup?20:-1),t(2),v("aria-expanded",e.showFields.network?"true":"false")("aria-controls","fieldsNetwork"),t(2),m("ngClass",F(67,Z,e.showFields.network,!e.showFields.network)),t(),g(" ",s(26,48,"settings.network.title_network")," "),t(2),h(e.showFields.network?27:-1),t(2),v("aria-expanded",e.showFields.terminal?"true":"false")("aria-controls","fieldsTerminal"),t(2),m("ngClass",F(70,Z,e.showFields.terminal,!e.showFields.terminal)),t(),g(" ",s(33,50,"settings.network.title_terminal")," "),t(2),h(e.showFields.terminal?34:-1),t(2),v("aria-expanded",e.showFields.security?"true":"false")("aria-controls","fieldsSecurity"),t(2),m("ngClass",F(73,Z,e.showFields.security,!e.showFields.security)),t(),g(" ",s(40,52,"settings.network.title_security")," "),t(2),h(e.showFields.security?41:-1),t(2),v("aria-expanded",e.showFields.cache?"true":"false")("aria-controls","fieldsCache"),t(2),m("ngClass",F(76,Z,e.showFields.cache,!e.showFields.cache)),t(),g(" ",s(47,54,"menu.label_accessories")," "),t(2),h(e.showFields.cache?48:-1),t(),h(e.showFields.cache?49:-1),t(2),v("aria-expanded",e.showFields.reset?"true":"false")("aria-controls","fieldsReset"),t(2),m("ngClass",F(79,Z,e.showFields.reset,!e.showFields.reset)),t(),g(" ",s(55,56,"reset.bridges.title")," "),t(2),h(e.showFields.reset?56:-1),t(),h(e.showFields.reset?57:-1)}}var gr=(()=>{class i{$api=C(D);$modal=C(se);$notification=C(We);$router=C(U);$settings=C(Y);$terminal=C(Ge);$toastr=C(M);$translate=C(V);restartToastIsShown=!1;showFields={general:!0,display:!0,startup:!0,network:!0,security:!0,terminal:!0,reset:!0,cache:!0};loading=!0;isHbV2=!1;showAvahiMdnsOption=!1;showResolvedMdnsOption=!1;adaptersAvailable=[];adaptersSelected=[];showPfxPassphrase=!1;runningInDocker=this.$settings.env.runningInDocker;runningOnRaspberryPi=this.$settings.env.runningOnRaspberryPi;platform=this.$settings.env.platform;enableTerminalAccess=this.$settings.env.enableTerminalAccess;isPwa=!!Ue();webrootSettingDisabledAccess=!1;hbNameIsInvalid=!1;hbNameIsSaving=!1;hbNameFormControl=new w("");uiLangIsSaving=!1;uiLangFormControl=new w("");uiThemeIsSaving=!1;uiThemeFormControl=new w("");uiLightIsSaving=!1;uiLightFormControl=new w("");uiMenuIsSaving=!1;uiMenuFormControl=new w("");uiTempIsSaving=!1;uiTempFormControl=new w("");uiAlwaysShowBetasIsSaving=!1;uiAlwaysShowBetasFormControl=new w(!1);uiTerminalPersistenceIsSaving=!1;uiTerminalPersistenceFormControl=new w(!1);uiTerminalHideWarningIsSaving=!1;uiTerminalHideWarningFormControl=new w(!1);uiTerminalBufferSizeIsSaving=!1;uiTerminalBufferSizeIsInvalid=!1;uiTerminalBufferSizeFormControl=new w(globalThis.terminal.bufferSize);hbDebugIsSaving=!1;hbDebugFormControl=new w(!1);hbInsecureIsSaving=!1;hbInsecureFormControl=new w(!1);hbKeepIsSaving=!1;hbKeepFormControl=new w(!1);hbEnvDebugIsSaving=!1;hbEnvDebugFormControl=new w("");hbEnvNodeIsSaving=!1;hbEnvNodeFormControl=new w("");hbLogSizeIsInvalid=!1;hbLogSizeIsSaving=!1;hbLogSizeFormControl=new w(-1);hbLogTruncateIsInvalid=!1;hbLogTruncateIsSaving=!1;hbLogTruncateFormControl=new w(0);hbMDnsIsSaving=!1;hbMDnsFormControl=new w("");hbPortIsInvalid=!1;hbPortIsSaving=!1;hbPortFormControl=new w(0);uiPortIsInvalid=!1;uiPortIsSaving=!1;uiPortFormControl=new w(0);hbStartPortIsInvalid=!1;hbStartPortIsSaving=!1;hbStartPortFormControl=new w(0);hbEndPortIsInvalid=!1;hbEndPortIsSaving=!1;hbEndPortFormControl=new w(0);uiHostIsSaving=!1;uiHostFormControl=new w("");uiWebrootIsSaving=!1;uiWebrootFormControl=new w("");uiProxyHostIsSaving=!1;uiProxyHostFormControl=new w("");uiAuthIsSaving=!1;uiAuthFormControl=new $e(!0);uiSessionTimeoutIsInvalid=!1;uiSessionTimeoutIsSaving=!1;uiSessionTimeoutFormControl=new w(0);uiSslTypeFormControl=new w("off");uiSslKeyIsSaving=!1;uiSslKeyFormControl=new w("");uiSslCertIsSaving=!1;uiSslCertFormControl=new w("");uiSslPfxIsSaving=!1;uiSslPfxFormControl=new w("");uiSslPassphraseIsSaving=!1;uiSslPassphraseFormControl=new w("");hbPackageIsSaving=!1;hbPackageFormControl=new w("");uiMetricsIsSaving=!1;uiMetricsFormControl=new w(!0);uiAccDebugIsSaving=!1;uiAccDebugFormControl=new w(!1);uiTempFileIsSaving=!1;uiTempFileFormControl=new w("");hbLinuxShutdownIsSaving=!1;hbLinuxShutdownFormControl=new w("");hbLinuxRestartIsSaving=!1;hbLinuxRestartFormControl=new w("");linkDebug='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Debug-Common-Values" target="_blank" rel="noopener noreferrer"><i class="fa fa-external-link-alt primary-text"></i></a>';ngOnInit(){return f(this,null,function*(){this.isHbV2=this.$settings.env.homebridgeVersion.startsWith("2"),yield this.initNetworkingOptions(),yield this.initStartupSettings(),this.$settings.originalWebroot===globalThis.webroot.errorCode&&(this.webrootSettingDisabledAccess=!0,this.uiWebrootFormControl.disable()),this.isPwa&&(this.uiPortFormControl.disable(),this.uiHostFormControl.disable(),this.uiWebrootFormControl.disable(),this.uiProxyHostFormControl.disable(),this.uiSslTypeFormControl.disable(),this.uiSslKeyFormControl.disable(),this.uiSslCertFormControl.disable(),this.uiSslPfxFormControl.disable(),this.uiSslPassphraseFormControl.disable()),this.hbNameFormControl.patchValue(this.$settings.env.homebridgeInstanceName),this.hbNameFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.hbNameSave(e)),this.uiLangFormControl.patchValue(this.$settings.env.lang),this.uiLangFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiLangSave(e)),this.uiThemeFormControl.patchValue(this.$settings.theme),this.uiThemeFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiThemeSave(e)),this.uiLightFormControl.patchValue(this.$settings.lightingMode),this.uiLightFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiLightSave(e)),this.uiMenuFormControl.patchValue(this.$settings.menuMode),this.uiMenuFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiMenuSave(e)),this.uiTempFormControl.patchValue(this.$settings.env.temperatureUnits),this.uiTempFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiTempSave(e)),this.uiAlwaysShowBetasFormControl.patchValue(this.$settings.env.plugins?.alwaysShowBetas||!1),this.uiAlwaysShowBetasFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiAlwaysShowBetasSave(e)),this.uiTerminalPersistenceFormControl.patchValue(this.$settings.env.terminal?.persistence),this.uiTerminalPersistenceFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiTerminalPersistenceSave(e)),this.uiTerminalHideWarningFormControl.patchValue(this.$settings.env.terminal?.hideWarning),this.uiTerminalHideWarningFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiTerminalHideWarningSave(e)),this.uiTerminalBufferSizeFormControl.patchValue(this.$settings.env.terminal?.bufferSize),this.uiTerminalBufferSizeFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiTerminalBufferSizeSave(e)),this.hbLogSizeFormControl.patchValue(this.$settings.env.log?.maxSize),this.hbLogSizeFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.hbLogSizeSave(e)),this.hbLogTruncateFormControl.patchValue(this.$settings.env.log?.truncateSize),this.hbLogTruncateFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.hbLogTruncateSave(e)),this.uiPortFormControl.patchValue(this.$settings.env.port),this.uiPortFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiPortSave(e)),this.uiAuthFormControl.patchValue(this.$settings.formAuth),this.uiAuthFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiAuthSave(e)),this.uiSessionTimeoutFormControl.patchValue(this.$settings.sessionTimeout),this.uiSessionTimeoutFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiSessionTimeoutSave(e)),this.uiSslKeyFormControl.patchValue(this.$settings.env.ssl?.key||""),this.uiSslKeyFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiSslKeySave(e)),this.uiSslCertFormControl.patchValue(this.$settings.env.ssl?.cert||""),this.uiSslCertFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiSslCertSave(e)),this.uiSslPfxFormControl.patchValue(this.$settings.env.ssl?.pfx||""),this.uiSslPfxFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiSslPfxSave(e)),this.uiSslPassphraseFormControl.patchValue(this.$settings.env.ssl?.passphrase||""),this.uiSslPassphraseFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiSslPassphraseSave(e)),this.uiSslTypeFormControl.patchValue(this.uiSslKeyFormControl.value||this.uiSslCertFormControl.value?"keycert":this.uiSslPfxFormControl.value||this.uiSslPassphraseFormControl.value?"pfx":"off"),this.uiSslTypeFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiSslTypeSave(e)),this.uiHostFormControl.patchValue(this.$settings.host||""),this.uiHostFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiHostSave(e)),this.uiWebrootFormControl.patchValue(this.$settings.webroot||""),this.uiWebrootFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiWebrootSave(e)),this.uiProxyHostFormControl.patchValue(this.$settings.proxyHost||""),this.uiProxyHostFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiProxyHostSave(e)),this.hbPackageFormControl.patchValue(this.$settings.env.homebridgePackagePath||""),this.hbPackageFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.hbPackageSave(e)),this.uiMetricsFormControl.patchValue(!this.$settings.env.disableServerMetricsMonitoring),this.uiMetricsFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiMetricsSave(e)),this.uiAccDebugFormControl.patchValue(this.$settings.env.accessoryControl?.debug),this.uiAccDebugFormControl.valueChanges.pipe(k(750)).subscribe(e=>this.uiAccDebugSave(e)),this.uiTempFileFormControl.patchValue(this.$settings.env.temp),this.uiTempFileFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.uiTempFileSave(e)),this.hbLinuxShutdownFormControl.patchValue(this.$settings.env.linux?.shutdown),this.hbLinuxShutdownFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.hbLinuxShutdownSave(e)),this.hbLinuxRestartFormControl.patchValue(this.$settings.env.linux?.restart),this.hbLinuxRestartFormControl.valueChanges.pipe(k(1500)).subscribe(e=>this.hbLinuxRestartSave(e)),this.loading=!1})}openBackupModal(){this.$modal.open(ue,{size:"lg",backdrop:"static"})}openConfigBackup(){this.$router.navigate(["/config"],{queryParams:{action:"restore"}})}openWallpaperModal(){this.$modal.open(pt,{size:"lg",backdrop:"static"})}resetHomebridgeState(){this.$modal.open(ot,{size:"lg",backdrop:"static"})}unpairAccessory(){this.$modal.open(st,{size:"lg",backdrop:"static"})}removeAllCachedAccessories(){this.$modal.open(nt,{size:"lg",backdrop:"static"})}accessoryUiControl(){return f(this,null,function*(){try{let e=this.$modal.open(Je,{size:"lg",backdrop:"static"});e.componentInstance.existingBlacklist=this.$settings.env.accessoryControl?.instanceBlacklist||[],yield e.result,this.showRestartToast()}catch(e){e!=="Dismiss"&&(console.error(e),this.$toastr.error(e.message,this.$translate.instant("toast.title_error")))}})}removeSingleCachedAccessories(){this.$modal.open(je,{size:"lg",backdrop:"static"})}removeBridgeAccessories(){this.$modal.open(at,{size:"lg",backdrop:"static"})}selectNetworkInterfaces(){return f(this,null,function*(){let e=this.$modal.open(lt,{size:"lg",backdrop:"static"});e.componentInstance.adaptersAvailable=this.adaptersAvailable,e.componentInstance.adaptersSelected=this.adaptersSelected;try{let n=yield e.result;this.buildBridgeNetworkAdapterList(n),yield $(this.$api.put("/server/network-interfaces/bridge",{adapters:n})),this.showRestartToast()}catch(n){n!=="Dismiss"&&(console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")))}})}toggleSection(e){this.showFields[e]=!this.showFields[e]}initStartupSettings(){return f(this,null,function*(){try{let e=yield $(this.$api.get("/platform-tools/hb-service/homebridge-startup-settings"));this.hbDebugFormControl.patchValue(e.HOMEBRIDGE_DEBUG),this.hbDebugFormControl.valueChanges.pipe(k(750)).subscribe(n=>this.hbDebugSave(n)),this.hbInsecureFormControl.patchValue(e.HOMEBRIDGE_INSECURE),this.hbInsecureFormControl.valueChanges.pipe(k(750)).subscribe(n=>this.hbInsecureSave(n)),this.hbKeepFormControl.patchValue(e.HOMEBRIDGE_KEEP_ORPHANS),this.hbKeepFormControl.valueChanges.pipe(k(750)).subscribe(n=>this.hbKeepSave(n)),this.hbEnvDebugFormControl.patchValue(e.ENV_DEBUG),this.hbEnvDebugFormControl.valueChanges.pipe(k(1500)).subscribe(n=>this.hbEnvDebugSave(n)),this.hbEnvNodeFormControl.patchValue(e.ENV_NODE_OPTIONS),this.hbEnvNodeFormControl.valueChanges.pipe(k(1500)).subscribe(n=>this.hbEnvNodeSave(n))}catch(e){console.error(e),this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}})}initNetworkingOptions(){return f(this,null,function*(){try{yield this.getNetworkSettings(),(this.$settings.env.runningInLinux||this.$settings.env.runningInDocker||this.$settings.env.runningInSynologyPackage||this.$settings.env.runningInPackageMode)&&(this.showAvahiMdnsOption=!0,this.showResolvedMdnsOption=!0)}catch(e){console.error(e),this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}})}getNetworkSettings(){return f(this,null,function*(){return Promise.all([$(this.$api.get("/server/network-interfaces/system")),$(this.$api.get("/server/network-interfaces/bridge")),$(this.$api.get("/server/mdns-advertiser")),$(this.$api.get("/server/port")),$(this.$api.get("/server/ports"))]).then(([e,n,p,y,X])=>{this.adaptersAvailable=e,this.buildBridgeNetworkAdapterList(n),this.hbMDnsFormControl.patchValue(p.advertiser),this.hbMDnsFormControl.valueChanges.pipe(k(750)).subscribe(q=>this.hbMDnsSave(q)),this.hbPortFormControl.patchValue(y.port),this.hbPortFormControl.valueChanges.pipe(k(1500)).subscribe(q=>this.hbPortSave(q)),this.hbStartPortFormControl.patchValue(X.start),this.hbStartPortFormControl.valueChanges.pipe(k(1500)).subscribe(q=>this.hbStartPortSave(q)),this.hbEndPortFormControl.patchValue(X.end),this.hbEndPortFormControl.valueChanges.pipe(k(1500)).subscribe(q=>this.hbEndPortSave(q))})})}saveUiSettingChange(e,n){return f(this,null,function*(){try{yield $(this.$api.put("/config-editor/ui",{key:e,value:n}))}catch(p){console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}hbNameSave(e){return f(this,null,function*(){if(!e||!/^[\p{L}\p{N}][\p{L}\p{N} ']*[\p{L}\p{N}]$/u.test(e)){this.hbNameIsInvalid=!0;return}try{this.hbNameIsSaving=!0,yield $(this.$api.put("/server/name",{name:e})),this.$settings.setEnvItem("homebridgeInstanceName",e),this.hbNameIsInvalid=!1,setTimeout(()=>{this.hbNameIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbNameIsSaving=!1}})}uiLangSave(e){return f(this,null,function*(){try{this.uiLangIsSaving=!0,this.$settings.setLang(e),yield this.saveUiSettingChange("lang",e),setTimeout(()=>{this.uiLangIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiLangIsSaving=!1}})}uiThemeSave(e){return f(this,null,function*(){try{this.uiThemeIsSaving=!0,this.$settings.setTheme(e),yield this.saveUiSettingChange("theme",e),setTimeout(()=>{this.uiThemeIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiThemeIsSaving=!1}})}uiLightSave(e){return f(this,null,function*(){try{this.uiLightIsSaving=!0,this.$settings.setLightingMode(e,"user"),yield this.saveUiSettingChange("lightingMode",e),setTimeout(()=>{this.uiLightIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiLightIsSaving=!1}})}uiMenuSave(e){return f(this,null,function*(){try{this.uiMenuIsSaving=!0,this.$settings.setMenuMode(e),yield this.saveUiSettingChange("menuMode",e),window.location.reload()}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiMenuIsSaving=!1}})}uiTempSave(e){return f(this,null,function*(){try{this.uiTempIsSaving=!0,this.$settings.setEnvItem("temperatureUnits",e),yield this.saveUiSettingChange("tempUnits",e),setTimeout(()=>{this.uiTempIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTempIsSaving=!1}})}uiAlwaysShowBetasSave(e){return f(this,null,function*(){try{this.uiAlwaysShowBetasIsSaving=!0,this.$settings.setEnvItem("plugins.alwaysShowBetas",e),yield this.saveUiSettingChange("plugins.alwaysShowBetas",e),setTimeout(()=>{this.uiAlwaysShowBetasIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAlwaysShowBetasIsSaving=!1}})}uiTerminalPersistenceSave(e){return f(this,null,function*(){if(!e&&this.$terminal.hasActiveSession()){let n=this.$modal.open(He,{size:"lg",backdrop:"static"});n.componentInstance.title=this.$translate.instant("settings.terminal.persistence_confirm_title"),n.componentInstance.message=this.$translate.instant("settings.terminal.persistence_confirm_message"),n.componentInstance.message2=this.$translate.instant("common.phrases.are_you_sure"),n.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),n.componentInstance.confirmButtonClass="btn-primary",n.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning";try{yield n.result}catch{this.uiTerminalPersistenceFormControl.patchValue(!0,{emitEvent:!1});return}}try{this.uiTerminalPersistenceIsSaving=!0,e||this.$terminal.destroyPersistentSession(),this.$settings.setEnvItem("terminal.persistence",e),yield this.saveUiSettingChange("terminal.persistence",e),setTimeout(()=>{this.uiTerminalPersistenceIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalPersistenceIsSaving=!1}})}uiTerminalHideWarningSave(e){return f(this,null,function*(){try{this.uiTerminalHideWarningIsSaving=!0,this.$settings.setEnvItem("terminal.hideWarning",e),yield this.saveUiSettingChange("terminal.hideWarning",e),setTimeout(()=>{this.uiTerminalHideWarningIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalHideWarningIsSaving=!1}})}uiTerminalBufferSizeSave(e){return f(this,null,function*(){if(e&&(typeof e!="number"||e<0||Number.isInteger(e)===!1)){this.uiTerminalBufferSizeIsInvalid=!0;return}try{this.uiTerminalBufferSizeIsSaving=!0,this.$settings.setEnvItem("terminal.bufferSize",e),yield this.saveUiSettingChange("terminal.bufferSize",e),this.uiTerminalBufferSizeIsInvalid=!1,setTimeout(()=>{this.uiTerminalBufferSizeIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalBufferSizeIsSaving=!1}})}hbDebugSave(e){return f(this,null,function*(){try{this.hbDebugIsSaving=!0,yield $(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:e,HOMEBRIDGE_KEEP_ORPHANS:this.hbKeepFormControl.value,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value})),setTimeout(()=>{this.hbDebugIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbDebugIsSaving=!1}})}hbInsecureSave(e){return f(this,null,function*(){try{this.hbInsecureIsSaving=!0,yield $(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:this.hbKeepFormControl.value,HOMEBRIDGE_INSECURE:e,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value})),setTimeout(()=>{this.hbInsecureIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbInsecureIsSaving=!1}})}hbKeepSave(e){return f(this,null,function*(){try{this.hbKeepIsSaving=!0,yield $(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:e,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value})),this.$settings.setKeepOrphans(e),setTimeout(()=>{this.hbKeepIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbKeepIsSaving=!1}})}hbEnvDebugSave(e){return f(this,null,function*(){try{this.hbEnvDebugIsSaving=!0,yield $(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:this.hbKeepFormControl.value,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:e,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value})),setTimeout(()=>{this.hbEnvDebugIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbEnvDebugIsSaving=!1}})}hbEnvNodeSave(e){return f(this,null,function*(){try{this.hbEnvNodeIsSaving=!0,yield $(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:this.hbKeepFormControl.value,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:e})),setTimeout(()=>{this.hbEnvNodeIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbEnvNodeIsSaving=!1}})}hbLogSizeSave(e){return f(this,null,function*(){if(e&&(typeof e!="number"||e<-1||Number.isInteger(e)===!1)){this.hbLogSizeIsInvalid=!0;return}try{this.hbLogSizeIsSaving=!0,this.$settings.setEnvItem("log.maxSize",e),(!e||e===-1)&&(yield this.saveUiSettingChange("log.truncateSize",null),this.hbLogTruncateIsInvalid=!1),yield this.saveUiSettingChange("log.maxSize",e),this.hbLogSizeIsInvalid=!1,setTimeout(()=>{this.hbLogSizeIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLogSizeIsSaving=!1}})}hbLogTruncateSave(e){return f(this,null,function*(){if(e&&(typeof e!="number"||e<0||Number.isInteger(e)===!1)){this.hbLogTruncateIsInvalid=!0;return}try{this.hbLogTruncateIsSaving=!0,this.$settings.setEnvItem("log.truncateSize",e),yield this.saveUiSettingChange("log.truncateSize",e),this.hbLogTruncateIsInvalid=!1,setTimeout(()=>{this.hbLogTruncateIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLogTruncateIsSaving=!1}})}hbMDnsSave(e){return f(this,null,function*(){try{this.hbMDnsIsSaving=!0,yield $(this.$api.put("/server/mdns-advertiser",{advertiser:e})),setTimeout(()=>{this.hbMDnsIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbMDnsIsSaving=!1}})}hbPortSave(e){return f(this,null,function*(){if(e===this.uiPortFormControl.value){this.hbPortIsInvalid=!0;return}try{this.hbPortIsSaving=!0,yield $(this.$api.put("/server/port",{port:e})),this.hbPortIsInvalid=!1,setTimeout(()=>{this.hbPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbPortIsSaving=!1}})}hbStartPortSave(e){return f(this,null,function*(){try{this.hbStartPortIsSaving=!0,yield $(this.$api.put("/server/ports",{start:e,end:this.hbEndPortFormControl.value})),this.hbStartPortIsInvalid=!1,setTimeout(()=>{this.hbStartPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbStartPortIsSaving=!1}})}hbEndPortSave(e){return f(this,null,function*(){try{this.hbEndPortIsSaving=!0,yield $(this.$api.put("/server/ports",{start:this.hbStartPortFormControl.value,end:e})),this.hbEndPortIsInvalid=!1,setTimeout(()=>{this.hbEndPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbEndPortIsSaving=!1}})}uiPortSave(e){return f(this,null,function*(){if(!e||typeof e!="number"||e<1025||e>65533||Number.isInteger(e)===!1||e===this.hbPortFormControl.value){this.uiPortIsInvalid=!0;return}try{this.uiPortIsSaving=!0,this.$settings.setEnvItem("port",e),yield this.saveUiSettingChange("port",e),this.uiPortIsInvalid=!1,setTimeout(()=>{this.uiPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiPortIsSaving=!1}})}uiAuthSave(e){return f(this,null,function*(){try{this.uiAuthIsSaving=!0,this.$settings.setItem("formAuth",e),yield this.saveUiSettingChange("auth",e?"form":"none"),this.$notification.formAuthEnabled.next(e),setTimeout(()=>{this.uiAuthIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAuthIsSaving=!1}})}uiSessionTimeoutSave(e){return f(this,null,function*(){if(e&&(typeof e!="number"||e<600||e>864e5||Number.isInteger(e)===!1)){this.uiSessionTimeoutIsInvalid=!0;return}try{this.uiSessionTimeoutIsSaving=!0,this.$settings.setItem("sessionTimeout",e),yield this.saveUiSettingChange("sessionTimeout",e),this.uiSessionTimeoutIsInvalid=!1,setTimeout(()=>{this.uiSessionTimeoutIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSessionTimeoutIsSaving=!1}})}uiSslKeySave(e){return f(this,null,function*(){try{this.uiSslKeyIsSaving=!0,this.$settings.setEnvItem("ssl.key",e),yield this.saveUiSettingChange("ssl.key",e),setTimeout(()=>{this.uiSslKeyIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslKeyIsSaving=!1}})}uiSslCertSave(e){return f(this,null,function*(){try{this.uiSslCertIsSaving=!0,this.$settings.setEnvItem("ssl.cert",e),yield this.saveUiSettingChange("ssl.cert",e),setTimeout(()=>{this.uiSslCertIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslCertIsSaving=!1}})}uiSslPfxSave(e){return f(this,null,function*(){try{this.uiSslPfxIsSaving=!0,this.$settings.setEnvItem("ssl.pfx",e),yield this.saveUiSettingChange("ssl.pfx",e),setTimeout(()=>{this.uiSslPfxIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslPfxIsSaving=!1}})}uiSslPassphraseSave(e){return f(this,null,function*(){try{this.uiSslPassphraseIsSaving=!0,this.$settings.setEnvItem("ssl.passphrase",e),yield this.saveUiSettingChange("ssl.passphrase",e),setTimeout(()=>{this.uiSslPassphraseIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslPassphraseIsSaving=!1}})}uiSslTypeSave(e){return f(this,null,function*(){switch(e){case"keycert":this.uiSslPfxFormControl.patchValue("",{emitEvent:!1}),this.uiSslPassphraseFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.pfx",""),this.$settings.setEnvItem("ssl.passphrase","");break;case"pfx":this.uiSslKeyFormControl.patchValue("",{emitEvent:!1}),this.uiSslCertFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.key",""),this.$settings.setEnvItem("ssl.cert","");break;default:this.uiSslKeyFormControl.patchValue("",{emitEvent:!1}),this.uiSslCertFormControl.patchValue("",{emitEvent:!1}),this.uiSslPfxFormControl.patchValue("",{emitEvent:!1}),this.uiSslPassphraseFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.key",""),this.$settings.setEnvItem("ssl.cert",""),this.$settings.setEnvItem("ssl.pfx",""),this.$settings.setEnvItem("ssl.passphrase",""),yield this.saveUiSettingChange("ssl",""),this.showRestartToast()}})}uiHostSave(e){return f(this,null,function*(){try{this.uiHostIsSaving=!0,this.$settings.setItem("host",e),yield this.saveUiSettingChange("host",e),setTimeout(()=>{this.uiHostIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiHostIsSaving=!1}})}uiWebrootSave(e){return f(this,null,function*(){try{this.uiWebrootIsSaving=!0,e=e?`/${e}`.replace(/\/+/g,"/").replace(/\/$/,""):"",e==="/"&&(e=""),this.$settings.setItem("webroot",e),yield this.saveUiSettingChange("webroot",e),this.uiWebrootFormControl.patchValue(e,{emitEvent:!1}),setTimeout(()=>{this.uiWebrootIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiWebrootIsSaving=!1}})}uiProxyHostSave(e){return f(this,null,function*(){try{this.uiProxyHostIsSaving=!0,this.$settings.setItem("proxyHost",e),yield this.saveUiSettingChange("proxyHost",e),setTimeout(()=>{this.uiProxyHostIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiProxyHostIsSaving=!1}})}hbPackageSave(e){return f(this,null,function*(){try{this.hbPackageIsSaving=!0,this.$settings.setEnvItem("homebridgePackagePath",e),yield this.saveUiSettingChange("homebridgePackagePath",e),setTimeout(()=>{this.hbPackageIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbPackageIsSaving=!1}})}uiMetricsSave(e){return f(this,null,function*(){try{this.uiMetricsIsSaving=!0,this.$settings.setEnvItem("disableServerMetricsMonitoring",!e),yield this.saveUiSettingChange("disableServerMetricsMonitoring",!e),setTimeout(()=>{this.uiMetricsIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiMetricsIsSaving=!1}})}uiAccDebugSave(e){return f(this,null,function*(){try{this.uiAccDebugIsSaving=!0,this.$settings.setEnvItem("accessoryControl.debug",e),yield this.saveUiSettingChange("accessoryControl.debug",e),setTimeout(()=>{this.uiAccDebugIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAccDebugIsSaving=!1}})}uiTempFileSave(e){return f(this,null,function*(){try{this.uiTempFileIsSaving=!0,this.$settings.setEnvItem("temp",e),yield this.saveUiSettingChange("temp",e),setTimeout(()=>{this.uiTempFileIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTempFileIsSaving=!1}})}hbLinuxShutdownSave(e){return f(this,null,function*(){try{this.hbLinuxShutdownIsSaving=!0,this.$settings.setEnvItem("linux.shutdown",e),yield this.saveUiSettingChange("linux.shutdown",e),setTimeout(()=>{this.hbLinuxShutdownIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLinuxShutdownIsSaving=!1}})}hbLinuxRestartSave(e){return f(this,null,function*(){try{this.hbLinuxRestartIsSaving=!0,this.$settings.setEnvItem("linux.restart",e),yield this.saveUiSettingChange("linux.restart",e),setTimeout(()=>{this.hbLinuxRestartIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLinuxRestartIsSaving=!1}})}buildBridgeNetworkAdapterList(e){if(!e.length){this.adaptersSelected=[];return}this.adaptersSelected=e.map(n=>{let p=this.adaptersAvailable.find(y=>y.iface===n);return p?{iface:p.iface,selected:!0,missing:!1,ip4:p.ip4,ip6:p.ip6}:{iface:n,selected:!0,missing:!0}})}showRestartToast(){if(!this.restartToastIsShown){this.restartToastIsShown=!0;let e=this.$toastr.info(this.$translate.instant("settings.changes.saved"),this.$translate.instant("menu.hbrestart.title"),{timeOut:0,tapToDismiss:!0,disableTimeOut:!0,positionClass:"toast-bottom-right",enableHtml:!0});e&&e.onTap&&e.onTap.subscribe(()=>{this.$router.navigate(["/restart"])})}}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=P({type:i,selectors:[["ng-component"]],decls:8,vars:4,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"my-4"],["role","button","tabindex","0",1,"mt-3","hover-pointer",3,"click"],[1,"primary-text"],[1,"fa",3,"ngClass"],["id","fieldsGeneral",1,"list-group","list-group-box","mt-2","mx-0"],["id","fieldsDisplay",1,"list-group","list-group-box","mt-2","mx-0"],["id","fieldsStartup",1,"list-group","list-group-box","mb-4","mx-0"],["id","fieldsNetwork",1,"list-group","list-group-box","mt-2","mx-0"],["id","fieldsTerminal",1,"list-group","list-group-box","mt-2","mx-0"],["id","fieldsSecurity",1,"list-group","list-group-box","mt-2","mx-0"],[1,"small","grey-text","mb-2","mx-0"],["id","fieldsCache",1,"list-group","list-group-box","mb-4","mx-0"],["id","fieldsReset",1,"list-group","list-group-box","mt-2","mx-0"],[1,"pb-3"],[1,"list-group-item","d-block","d-md-flex","justify-content-between","align-items-center"],[1,"my-3","my-md-0","ps-0","ps-md-5","w-auto","d-flex","align-items-center"],["type","text",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl","ngClass"],[1,"fas","fa-floppy-disk","primary-text","fa-xl","me-0","me-md-2","ms-2","ms-md-0","order-2","order-md-1"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"pe-2"],[1,"btn","btn-primary","waves-effect","m-0","ms-3",2,"min-width","50px",3,"click"],[1,"fas","fa-arrow-right"],["routerLink","/users",1,"btn","btn-primary","waves-effect","m-0","ms-3",2,"min-width","50px"],[1,"custom-select","resp-select","order-1","order-md-2",3,"formControl"],["value","auto"],["value","bg"],["value","ca"],["value","zh-CN"],["value","zh-TW"],["value","cs"],["value","nl"],["value","en"],["value","fi"],["value","fr"],["value","de"],["value","he"],["value","hu"],["value","id"],["value","it"],["value","ja"],["value","ko"],["value","mk"],["value","no"],["value","pl"],["value","pt-BR"],["value","pt"],["value","ru"],["value","sl"],["value","es"],["value","sv"],["value","th"],["value","tr"],["value","uk"],["value","orange"],["value","red"],["value","pink"],["value","purple"],["value","deep-purple"],["value","indigo"],["value","blue"],["value","blue-grey"],["value","cyan"],["value","green"],["value","teal"],["value","grey"],["value","brown"],["value","light"],["value","dark"],["value","default"],["value","freeze"],["value","c"],["value","f"],[1,"d-flex","align-items-center"],[1,"order-1","order-md-2"],["type","checkbox","id","uiAlwaysShowBetas",1,"rendux-input",3,"formControl"],["for","uiAlwaysShowBetas",1,"rendux-label","ms-3",2,"min-width","50px"],[1,"grey-text","pe-2"],["type","checkbox","id","homebridgeDebugMode",1,"rendux-input",3,"formControl"],["for","homebridgeDebugMode",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","homebridgeInsecureMode",1,"rendux-input",3,"formControl"],["for","homebridgeInsecureMode",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","homebridgeKeepOrphans",1,"rendux-input",3,"formControl"],["for","homebridgeKeepOrphans",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","homebridgeMetrics",1,"rendux-input",3,"formControl"],["for","homebridgeMetrics",1,"rendux-label","ms-3",2,"min-width","50px"],["type","text","placeholder","/usr/local/lib/node_modules/homebridge",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],[1,"font-monospace"],[1,"grey-text","pe-2",3,"innerHTML"],["type","text","placeholder","HAP-NodeJS:Advertiser,HAP-NodeJS:Service",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["type","text","placeholder","--max-old-space-size=512 --max-http-header-size=8192",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["type","text","placeholder","shutdown",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["type","text","placeholder","reboot",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["type","text","placeholder","/sys/class/thermal/thermal_zone0/temp",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["routerLink","/platform-tools/docker/startup-script",1,"btn","btn-primary","waves-effect","m-0","ms-3",2,"min-width","50px"],[1,"small","grey-text","pe-2"],[1,"badge","badge-primary","me-1",3,"ngClass"],[1,"btn","btn-primary","waves-effect","m-0","ms-3",2,"min-width","50px",3,"click","disabled"],["value","avahi"],["value","ciao"],["value","bonjour-hap"],["value","resolved"],["type","number","min","1025","max","65533",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl","ngClass"],["type","number","min","1025","max","65533","placeholder","8581",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl","ngClass"],[1,"grey-text","pe-2",3,"innerHtml"],["type","text","pattern","^[^{}/:\\\\s]+(?::\\d+)?$","placeholder","0.0.0.0",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],[1,"badge","badge-primary","ms-1"],["type","text","placeholder","/",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["type","text","pattern","^[^{}/:\\\\s]+(?::\\d+)?$","placeholder","example.com:8443",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],[1,"fas","fa-exclamation-triangle"],[1,"fw-normal"],[1,"fas","fa-exclamation-triangle","red-text"],[3,"innerHtml"],["type","number","min","-1","placeholder","1000000",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl","ngClass"],["type","number","min","0","placeholder","200000",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl","ngClass"],["type","checkbox","id","terminalPersistence",1,"rendux-input",3,"formControl"],["for","terminalPersistence",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","terminalHideWarning",1,"rendux-input",3,"formControl"],["for","terminalHideWarning",1,"rendux-label","ms-3",2,"min-width","50px"],[1,"d-flex","flex-column"],[1,"small","grey-text"],["type","number","min","10000","max","100000","step","10000",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl","ngClass"],["type","checkbox","id","uiAuthForm",1,"rendux-input",3,"formControl"],["for","uiAuthForm",1,"rendux-label","ms-3",2,"min-width","50px"],["value","off"],["value","keycert"],["value","pfx"],["type","number","min","600","max","86400000","placeholder","28800",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl","ngClass"],["type","text","placeholder","/Users/.../certs/server.key",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["type","text","placeholder","/Users/.../certs/server.crt",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["type","text","placeholder","/Users/.../certs/server.pfx",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["placeholder","mypassphrase",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"focus","blur","type","formControl"],["type","checkbox","id","accessoryDebug",1,"rendux-input",3,"formControl"],["for","accessoryDebug",1,"rendux-label","ms-3",2,"min-width","50px"]],template:function(n,p){n&1&&(a(0,"div",0)(1,"div",1)(2,"h3",2),l(3),r(4,"translate"),o()(),d(5,"div",3),o(),_(6,$i,1,0,"app-spinner")(7,Qn,59,82)),n&2&&(t(3),u(s(4,2,"menu.settings.title")),t(3),h(p.loading?6:7))},dependencies:[j,Le,oe,Re,Ve,pe,Pe,ne,Ae,ae,Ne,De,Me,re,de,Ke,ie,A],encapsulation:2,data:{animation:[Te("fadeInOut",[ge(":enter",[le({opacity:0}),he("750ms",le({opacity:1}))]),ge(":leave",[he("750ms",le({opacity:0}))])])]}})}return i})();export{gr as SettingsComponent};
|
package/public/chunk-NS7FNJX4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunk-CGPMZGNR.js";import{k as c,n as p,q as m}from"./chunk-M5SPFGD5.js";import{ea as n,g as f,h as r,ja as a,w as s}from"./chunk-ZHRPBG7M.js";var l=f(u(),1);var $=(()=>{class e{$api=a(m);$toastr=a(p);$translate=a(c);downloadBackup(){return r(this,null,function*(){let t=yield s(this.$api.get("/backup/download",{observe:"response",responseType:"blob"})),i=t.headers.get("File-Name")||"homebridge-backup.tar.gz",o=t.body.size;if(o>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(o/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,l.saveAs)(t.body,i)})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$ as a};
|
package/public/chunk-OBKKI254.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-HPWK6TSC.js";import"./chunk-W5CPGK2R.js";import"./chunk-SIIVYDOU.js";import"./chunk-IHGRCBAQ.js";import"./chunk-QHDPBN4J.js";import"./chunk-D2RHA7X2.js";import"./chunk-BWVMSIO4.js";import"./chunk-C2BJ6TMI.js";import{g as i}from"./chunk-LV5TYHZ7.js";import"./chunk-SJODT5UV.js";import"./chunk-M5SPFGD5.js";import{Xa as t,fa as e}from"./chunk-ZHRPBG7M.js";var u=[{path:"",loadComponent:()=>import("./chunk-WFEKJT5W.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
|
package/public/chunk-P2O3U4B2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n}from"./chunk-UYPJZGAK.js";import"./chunk-C2BJ6TMI.js";import{g as r}from"./chunk-LV5TYHZ7.js";import"./chunk-SJODT5UV.js";import"./chunk-M5SPFGD5.js";import{Xa as e,fa as o}from"./chunk-ZHRPBG7M.js";var c=[{path:"",loadComponent:()=>import("./chunk-NLUWGNJN.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
|
package/public/chunk-QKIZT7YY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as le}from"./chunk-DZUAVWLP.js";import{a as se}from"./chunk-UERLDONE.js";import{g as Q,m as k,n as ae}from"./chunk-QHDPBN4J.js";import{B as A,C as G,b as q,c as F,d as g,e as V,f as z,g as N,j as S,m as R,p as O,q as L,r as J,z as re}from"./chunk-D2RHA7X2.js";import{b as H}from"./chunk-C2BJ6TMI.js";import{b as oe}from"./chunk-LV5TYHZ7.js";import{a as xe}from"./chunk-SJODT5UV.js";import{k as T,l as E,n as B,q as M}from"./chunk-M5SPFGD5.js";import{Ac as ne,Db as I,Gb as f,Ib as _,Kc as j,La as e,Vb as m,Wa as y,Wb as d,Xb as x,Yb as ee,g as ve,gc as D,h as W,hc as te,ja as c,kb as u,lb as w,mb as h,mc as a,nc as o,oa as $,ob as X,oc as ie,pa as U,pb as Y,qb as Z,rb as b,sb as i,tb as t,ub as p}from"./chunk-ZHRPBG7M.js";function Ce(r,C){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),a(3,"translate"),t()()),r&2&&(b("dismissible",!1),e(2),d(o(3,2,"login.invalid_password")))}var me=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);invalidCredentials=!1;formGroup=new N({password:new S("",[g.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","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,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),a(18,"translate"),t(),i(19,"div",11),p(20,"input",12),a(21,"translate"),t()()(),w(22,Ce,4,4,"ngb-alert",13),t(),i(23,"div",14)(24,"div",15)(25,"button",16),a(26,"translate"),f("click",function(){return l.dismissModal()}),m(27),a(28,"translate"),t()(),p(29,"div",17),i(30,"div",18)(31,"button",19),f("click",function(){return l.disable2fa()}),m(32),a(33,"translate"),t()()()()),s&2&&(e(3),d(o(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",o(6,13,"form.button_close")),e(7),d(o(13,15,"users.setup_2fa_disable_current_password")),e(5),d(o(18,17,"users.label_password")),e(3),b("formControl",l.formGroup.controls.password)("placeholder",o(21,19,"users.label_password")),e(2),h(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",o(26,21,"form.button_close")),e(2),x(" ",o(28,23,"form.button_close")," "),e(4),b("disabled",l.formGroup.invalid),e(),x(" ",o(33,25,"form.button_disable")," "))},dependencies:[A,F,V,G,O,Q,E],encapsulation:2})}return r})();var pe=ve(xe(),1);var we=r=>({timeDiffError:r});function he(r,C){r&1&&(i(0,"li"),m(1),a(2,"translate"),t()),r&2&&(e(),d(o(2,1,"users.setup_2fa_scan_qr_code")))}function ge(r,C){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),a(3,"translate"),t(),i(4,"p",17),m(5),a(6,"translate"),t()()),r&2){let n=_();b("dismissible",!1),e(2),d(o(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ie(6,5,"users.setup_2fa_server_time_out",D(8,we,n.timeDiffError)))}}function Se(r,C){r&1&&p(0,"i",27)}function ye(r,C){r&1&&p(0,"i",28)}function Ee(r,C){if(r&1){let n=I();i(0,"div",21),m(1),a(2,"translate"),p(3,"br"),m(4),i(5,"a",26),f("click",function(){$(n);let l=_(2);return U(l.copySecretToClipboard())}),w(6,Se,1,0,"i",27)(7,ye,1,0,"i",28),t()()}if(r&2){let n=_(2);e(),x(" ",o(2,3,"users.setup_2fa_scan_qr_manual")),e(3),x(" ",n.otpSecret," "),e(2),h(n.secretCopied?6:7)}}function $e(r,C){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),t(),w(4,Ee,8,5,"div",21),t(),i(5,"li",22)(6,"label",23),m(7),a(8,"translate"),t(),i(9,"div",24),p(10,"input",25),t()()()),r&2){let n=_();e(3),b("data",n.otpString),e(),h(n.otpSecret?4:-1),e(3),d(o(8,4,"users.setup_2fa_enter_code")),e(3),b("formControl",n.formGroup.controls.code)}}function Ue(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function ke(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Te(r,C){if(r&1){let n=I();i(0,"button",30),f("click",function(){$(n);let l=_();return U(l.enable2fa())}),m(1),a(2,"translate"),t()}if(r&2){let n=_();b("disabled",n.formGroup.invalid),e(),x(" ",o(2,2,"form.button_enable")," ")}}var de=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);copyTimeout=null;user;timeDiffError=null;otpString;otpSecret;secretCopied=!1;formGroup=new N({code:new S("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:n=>{this.checkTimeDiff(n.timestamp),this.timeDiffError||(this.otpString=n.otpauth,this.otpSecret=new URL(this.otpString).searchParams.get("secret")||"")},error:n=>{this.$activeModal.dismiss(),console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return W(this,null,function*(){yield navigator.clipboard.writeText(this.otpSecret),this.secretCopied=!0,this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied=!1},3e3)})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(n){let s=(0,pe.default)(n).diff(new Date,"millisecond");s<-5e3||s>5e3?this.timeDiffError=s:this.timeDiffError=null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-check","green-text"],[1,"fas","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t(),w(14,he,3,3,"li"),t(),w(15,ge,7,10,"ngb-alert",8),w(16,$e,11,6,"ul",9),t(),i(17,"div",10)(18,"div",11),w(19,Ue,4,6,"button",12),t(),i(20,"div",13),w(21,ke,4,6,"button",12),t(),i(22,"div",14),w(23,Te,3,4,"button",15),t()()()),s&2&&(e(3),d(o(4,9,"users.setup_2fa")),e(2),u("aria-label",o(6,11,"form.button_close")),e(7),d(o(13,13,"users.setup_2fa_warning")),e(2),h(l.timeDiffError?-1:14),e(),h(l.timeDiffError?15:-1),e(),h(l.timeDiffError?-1:16),e(3),h(l.timeDiffError?-1:19),e(2),h(l.timeDiffError?21:-1),e(2),h(l.timeDiffError?-1:23))},dependencies:[Q,se,A,F,V,re,G,O,E],encapsulation:2})}return r})();var ce=r=>({"is-invalid":r}),ue=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new S("",[g.required]),admin:new S(!0)},this.matchPassword);onSubmit({value:n}){this.$api.post("/users",n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:s=>{this.$toastr.error(s.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),i(33,"li",9)(34,"label",17),m(35),a(36,"translate"),t(),i(37,"div",11),p(38,"input",18),a(39,"translate"),t()(),i(40,"li",19)(41,"span",20),m(42),a(43,"translate"),t(),i(44,"div",21),p(45,"input",22),a(46,"translate"),p(47,"label",23),t()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),f("click",function(){return l.dismissModal()}),m(51),a(52,"translate"),t()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),a(57,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,18,"users.title_add_user")),e(2),u("aria-label",o(7,20,"form.button_close")),e(8),d(o(15,22,"users.label_username")),e(3),u("aria-label",o(18,24,"users.label_username")),e(4),d(o(22,26,"users.label_full_name")),e(3),u("aria-label",o(25,28,"users.label_full_name")),e(4),d(o(29,30,"users.label_password")),e(3),b("ngClass",D(46,ce,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,32,"users.label_password")),e(4),d(o(36,34,"users.label_confirm_password")),e(3),b("ngClass",D(48,ce,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",o(39,36,"users.label_confirm_password")),e(4),d(o(43,38,"users.label_admin_user")),e(3),u("aria-label",o(46,40,"users.label_admin_user")),e(6),x(" ",o(52,42,"form.button_close")," "),e(4),b("disabled",!l.form.valid),e(),x(" ",o(57,44,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var fe=r=>({"is-invalid":r});function Be(r,C){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),a(3,"translate"),t(),i(4,"div",11),p(5,"input",28),a(6,"translate"),t()()),r&2){let n=_();e(2),d(o(3,3,"users.label_confirm_password")),e(3),b("ngClass",D(7,fe,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),u("aria-label",o(6,5,"users.label_confirm_password"))}}var be=(()=>{class r{$activeModal=c(k);$api=c(M);$auth=c(H);$cdr=c(ne);$toastr=c(B);$translate=c(T);initialFormValue={};user;isCurrentUser=!1;form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S(""),passwordConfirm:new S(""),admin:new S(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user),this.initialFormValue=this.form.getRawValue(),this.form.valueChanges.subscribe(()=>this.$cdr.detectChanges())}onSubmit({value:n}){this.$api.patch(`/users/${this.user.id}`,n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&n.username!==this.$auth.user.username&&this.$auth.logout()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),w(33,Be,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),a(37,"translate"),t(),i(38,"div",19),p(39,"input",20),a(40,"translate"),p(41,"label",21),t()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),f("click",function(){return l.dismissModal()}),m(45),a(46,"translate"),t()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),a(51,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,16,"users.title_edit_user")),e(2),u("aria-label",o(7,18,"form.button_close")),e(8),d(o(15,20,"users.label_username")),e(3),u("aria-label",o(18,22,"users.label_username")),e(4),d(o(22,24,"users.label_full_name")),e(3),u("aria-label",o(25,26,"users.label_full_name")),e(4),d(o(29,28,"users.label_new_password")),e(3),b("ngClass",D(40,fe,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,30,"users.label_new_password")),e(2),h(l.form.controls.password.value?33:-1),e(3),d(o(37,32,"users.label_admin_user")),e(3),u("aria-label",o(40,34,"users.label_admin_user")),e(6),x(" ",o(46,36,"form.button_close")," "),e(4),b("disabled",!l.form.valid||l.isFormUnchanged()),e(),x(" ",o(51,38,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var _e=(()=>{class r{$activeModal=c(k);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:46,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),a(5,"translate"),t(),i(6,"button",3),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",4)(9,"div",5),p(10,"i",6),t(),i(11,"h5",7),m(12),a(13,"translate"),t(),i(14,"ul",8)(15,"li"),m(16),a(17,"translate"),t(),i(18,"ul",9)(19,"li"),m(20),a(21,"translate"),t(),i(22,"li"),m(23),a(24,"translate"),t(),i(25,"li"),m(26),a(27,"translate"),a(28,"translate"),t(),i(29,"li"),m(30),a(31,"translate"),t(),i(32,"li"),m(33),a(34,"translate"),t()(),i(35,"li"),m(36),a(37,"translate"),t()(),p(38,"app-support-banner"),t(),i(39,"div",10),p(40,"div",11),i(41,"div",12)(42,"button",13),f("click",function(){return l.dismissModal()}),m(43),a(44,"translate"),t()(),p(45,"div",14),t()()()),s&2&&(e(4),d(o(5,12,"support.title")),e(2),u("aria-label",o(7,14,"form.button_close")),e(6),d(o(13,16,"users.title_users")),e(4),d(o(17,18,"users.support.acc_1")),e(4),d(o(21,20,"menu.label_status")),e(3),d(o(24,22,"menu.label_plugins")),e(3),ee("",o(27,24,"menu.label_accessories")," (",o(28,26,"users.support.control"),")"),e(4),d(o(31,28,"menu.linux.label_logs")),e(3),d(o(34,30,"support.title")),e(3),d(o(37,32,"users.support.acc_2")),e(7),x(" ",o(44,34,"form.button_close")," "))},dependencies:[le,E],encapsulation:2})}return r})();var Me=(r,C)=>({"fa-user-secret":r,"fa-user":C});function Ie(r,C){if(r&1){let n=I();i(0,"button",23),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.disable2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa_disable")," ")}}function De(r,C){if(r&1){let n=I();i(0,"button",24),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.setup2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa")," ")}}function Fe(r,C){if(r&1&&w(0,Ie,3,4,"button",21)(1,De,3,4,"button",22),r&2){let n=_().$implicit;h(n.otpActive?0:1)}}function Ve(r,C){r&1&&p(0,"div")}function Ne(r,C){if(r&1){let n=I();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),t(),i(7,"h5",14),p(8,"i",15),m(9),t()()(),i(10,"div",16),w(11,Fe,2,1)(12,Ve,1,0,"div"),i(13,"div")(14,"button",17),a(15,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.openEditUser(l))}),p(16,"i",18),t(),i(17,"button",19),a(18,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.deleteUser(l.id))}),p(19,"i",20),t()()()()()()}if(r&2){let n=C.$implicit,s=_();e(6),d(n.name),e(2),b("ngClass",te(11,Me,n.admin,!n.admin)),e(),x(" ",n.username," "),e(2),h(n.admin?11:12),e(3),u("aria-label",o(15,7,"form.button_edit")),e(3),b("disabled",s.username===n.username),u("aria-label",o(18,9,"form.button_delete"))}}var zt=(()=>{class r{$api=c(M);$auth=c(H);$modal=c(ae);$route=c(oe);$toastr=c(B);$translate=c(T);homebridgeUsers=[];username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){this.$route.data.subscribe(n=>{this.homebridgeUsers=n.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(n=>{this.homebridgeUsers=n})}openAddNewUser(){this.$modal.open(ue,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(n){let s=this.$modal.open(be,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}deleteUser(n){this.$api.delete(`/users/${n}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(n){let s=this.$modal.open(de,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}disable2fa(n){let s=this.$modal.open(me,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}openSupport(){this.$modal.open(_e,{size:"lg",backdrop:"static"})}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas",3,"ngClass"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-trash"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),a(4,"translate"),t()(),i(5,"div",3)(6,"button",4),a(7,"translate"),f("click",function(){return l.openAddNewUser()}),p(8,"i",5),t(),i(9,"button",6),a(10,"translate"),f("click",function(){return l.openSupport()}),p(11,"i",7),t()()(),i(12,"div",8),Y(13,Ne,20,14,"div",9,X),t()),s&2&&(e(3),d(o(4,3,"users.title_users")),e(3),u("aria-label",o(7,5,"users.button_add_user")),e(3),u("aria-label",o(10,7,"support.title")),e(4),Z(l.homebridgeUsers))},dependencies:[j,E],encapsulation:2})}return r})();export{zt as UsersComponent};
|
package/public/chunk-QQMSIIDU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as H}from"./chunk-TUN7H57E.js";import{a as X}from"./chunk-Y4JYARXO.js";import{a as G}from"./chunk-LHQCUFCP.js";import{a as Z}from"./chunk-5N45B6R7.js";import"./chunk-IHGRCBAQ.js";import{a as R}from"./chunk-3IUIBZIG.js";import{n as E}from"./chunk-QHDPBN4J.js";import"./chunk-D2RHA7X2.js";import{a as j}from"./chunk-BWVMSIO4.js";import{b as A}from"./chunk-C2BJ6TMI.js";import{a as q,c as N,d as V,e as W,f as D}from"./chunk-LV5TYHZ7.js";import{b as T}from"./chunk-SJODT5UV.js";import{k as L,l as U,p as $}from"./chunk-M5SPFGD5.js";import{Db as S,Gb as _,Ib as x,Kc as O,La as i,Pa as F,Vb as g,Wa as P,Wb as v,Xc as K,fc as h,g as Y,gc as M,h as I,ja as u,kb as m,lb as w,mb as y,mc as s,nc as d,oa as b,pa as C,rb as c,sb as n,tb as a,ub as p,w as z}from"./chunk-ZHRPBG7M.js";var Q=Y(Z(),1);var B=()=>["/"],te=o=>({"hamburger-icon-cross":o}),ne=o=>({expanded:o}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],se=()=>["/support"],de=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),s(3,"translate"),_("click",function(){b(e);let t=x();return C(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),g(7),s(8,"translate"),a()()()}o&2&&(i(),m("aria-label",d(2,2,"rpi.throttled.undervoltage_title")+" - "+d(3,4,"rpi.throttled.undervoltage_description")),i(6),v(d(8,6,"rpi.throttled.undervoltage_title")))}function ue(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),g(6),s(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,de))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.linux.label_terminal")),i(5),v(d(7,6,"menu.linux.label_terminal")))}function _e(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),g(6),s(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.config_json_editor")),i(5),v(d(7,6,"menu.config_json_editor")))}function ge(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),g(6),s(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.label_settings")),i(5),v(d(7,6,"menu.label_settings")))}function fe(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),g(6),s(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.restart.title")),i(5),v(d(7,6,"menu.restart.title")))}function ve(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=x();return C(t.reloadPage())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),g(6),s(7,"translate"),a()()()}o&2&&(i(),m("aria-label",d(2,2,"menu.reload")),i(5),v(d(7,4,"menu.reload")))}function he(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=x();return C(t.logout())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),g(6),s(7,"translate"),a()()()}o&2&&(i(),m("aria-label",d(2,2,"menu.tooltip_logout")),i(5),v(d(7,4,"menu.tooltip_logout")))}var J=(()=>{class o{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(G);$renderer=u(F);$router=u(V);$translate=u(L);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=H();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof q&&(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)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=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)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(X,{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-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,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"))}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}))}static \u0275fac=function(l){return new(l||o)};static \u0275cmp=P({type:o,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,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-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),s(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),p(2,"span",1),n(3,"a",2),s(4,"translate"),p(5,"img",3),n(6,"div",4),g(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(f){return t.handleKeydown(f)}),n(15,"a",2),s(16,"translate"),p(17,"img",3),n(18,"div",8),g(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),s(23,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),g(27),s(28,"translate"),a()()(),w(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),s(32,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),g(36),s(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),s(40,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),g(44),s(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),s(48,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),g(52),s(53,"translate"),a()()(),w(54,ue,8,9,"div",10),w(55,_e,8,9,"div",10),w(56,ge,8,9,"div",10),n(57,"div",10)(58,"div",15),s(59,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),g(63),s(64,"translate"),a()()(),w(65,fe,8,9,"div",10),w(66,ve,8,6,"div",10),w(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",d(1,37,"menu.sidebar.aria_menu")),i(3),c("routerLink",h(63,B)),m("aria-label",d(4,39,"menu.label_status")),i(5),c("ngClass",M(64,te,t.isExpanded)),i(5),c("ngClass",M(66,ne,t.isExpanded)),i(2),c("routerLink",h(68,B)),m("aria-label",d(16,41,"menu.label_status")),i(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",d(23,43,"menu.label_status")),i(5),v(d(28,45,"menu.label_status")),i(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),i(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",d(32,47,"menu.label_plugins")),i(5),v(d(37,49,"menu.label_plugins")),i(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",d(40,51,"menu.label_accessories")),i(5),v(d(45,53,"menu.label_accessories")),i(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",d(48,55,"menu.linux.label_logs")),i(5),v(d(53,57,"menu.linux.label_logs")),i(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),i(),y(t.isAdmin?55:-1),i(),y(t.isAdmin?56:-1),i(2),c("routerLink",h(74,se))("routerLinkActive","active"),m("aria-label",d(59,59,"support.title")),i(5),v(d(64,61,"support.title")),i(2),y(t.isAdmin?65:-1),i(),y(t.isPwa?66:-1),i(),y(t.formAuth?67:-1))},dependencies:[W,K,O,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}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.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;transform:rotate(0);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;transform:rotate(0);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){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return o})();var be=o=>({sidebarExpanded:o}),Re=(()=>{class o{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.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:$.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(l){return new(l||o)};static \u0275cmp=P({type:o,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),i(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,N],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 o})();export{Re as LayoutComponent};
|