homebridge-config-ui-x 5.11.2-beta.5 → 5.11.2-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/package.json +2 -2
  2. package/public/{chunk-P2U63MCR.js → chunk-2HDDFLX5.js} +1 -1
  3. package/public/{chunk-N74OZDD6.js → chunk-2KUGAT6L.js} +1 -1
  4. package/public/chunk-2QHT7UTY.js +1 -0
  5. package/public/{chunk-BHYS7LPU.js → chunk-3B6IFS6E.js} +1 -1
  6. package/public/chunk-4HJPJ6JO.js +1 -0
  7. package/public/chunk-4ZCBTPFQ.js +1 -0
  8. package/public/{chunk-D3NFARXL.js → chunk-5DKBUEKC.js} +1 -1
  9. package/public/{chunk-LKRXJ4NQ.js → chunk-6SPNUKCU.js} +1 -1
  10. package/public/{chunk-D3MUNCMG.js → chunk-6UOFHEOA.js} +1 -1
  11. package/public/chunk-73LLH6JC.js +1 -0
  12. package/public/chunk-7KQJO6II.js +1 -0
  13. package/public/{chunk-LQNKSANI.js → chunk-AK7DHUFI.js} +1 -1
  14. package/public/chunk-BQLUKGX4.js +1 -0
  15. package/public/chunk-CAKM6QQD.js +19 -0
  16. package/public/{chunk-QCD43BXL.js → chunk-CJ6ENU5Q.js} +1 -1
  17. package/public/chunk-EHWZNITX.js +16 -0
  18. package/public/chunk-FSIP765D.js +1 -0
  19. package/public/chunk-G5KKSLRH.js +1 -0
  20. package/public/{chunk-RMWS37MG.js → chunk-IPCY24VP.js} +1 -1
  21. package/public/chunk-K7P4YW6C.js +1 -0
  22. package/public/chunk-KXDUZHXM.js +1 -0
  23. package/public/{chunk-ZDIBPB2V.js → chunk-LPHPZZDD.js} +1 -1
  24. package/public/chunk-LSBNAQT7.js +1 -0
  25. package/public/{chunk-B6EPFA4V.js → chunk-M6KB66ZD.js} +1 -1
  26. package/public/{chunk-CYKWMDCC.js → chunk-MJD4YCIZ.js} +1 -1
  27. package/public/{chunk-72SK6LN3.js → chunk-MXLTCL2C.js} +1 -1
  28. package/public/chunk-Q5BDQ6UK.js +4 -0
  29. package/public/chunk-QD7ZQ5KN.js +1 -0
  30. package/public/{chunk-K3VXCKFJ.js → chunk-QZUDFUPG.js} +1 -1
  31. package/public/{chunk-5F6SGJZO.js → chunk-R7CS5PVV.js} +1 -1
  32. package/public/chunk-RP6CIVXA.js +1 -0
  33. package/public/chunk-SWHMQNYH.js +68 -0
  34. package/public/chunk-TO4NLBFG.js +3 -0
  35. package/public/{chunk-J6JCLCR6.js → chunk-TSNTAL5D.js} +1 -1
  36. package/public/{chunk-746K2W65.js → chunk-UCQTJGBG.js} +1 -1
  37. package/public/chunk-UIRBXR5P.js +19 -0
  38. package/public/chunk-VUOEARGI.js +1 -0
  39. package/public/{chunk-WPJDSHYO.js → chunk-YTCQIUDM.js} +1 -1
  40. package/public/{chunk-YAUW3QQV.js → chunk-Z62MEN4O.js} +1 -1
  41. package/public/{chunk-BQMRSELR.js → chunk-ZCXLNQRQ.js} +1 -1
  42. package/public/{chunk-IMR3XZ37.js → chunk-ZMZV3OZR.js} +1 -1
  43. package/public/{chunk-W3WJ3GLW.js → chunk-ZT2XJVT5.js} +1 -1
  44. package/public/index.html +1 -1
  45. package/public/{main-VBBHOBST.js → main-ORJXWFOK.js} +1 -1
  46. package/public/chunk-2YQMYSXT.js +0 -1
  47. package/public/chunk-3JBXVUFP.js +0 -19
  48. package/public/chunk-47LZZIPJ.js +0 -68
  49. package/public/chunk-5UTHYAO4.js +0 -16
  50. package/public/chunk-5V5T5YDK.js +0 -1
  51. package/public/chunk-CDVVVWKM.js +0 -1
  52. package/public/chunk-G7V2J2JO.js +0 -1
  53. package/public/chunk-GFM46DC6.js +0 -1
  54. package/public/chunk-H53NQXNF.js +0 -1
  55. package/public/chunk-HBNZXYWD.js +0 -4
  56. package/public/chunk-HQLIDFFL.js +0 -1
  57. package/public/chunk-IF2VXUU3.js +0 -3
  58. package/public/chunk-J24WFLH3.js +0 -1
  59. package/public/chunk-PK2CVZPI.js +0 -1
  60. package/public/chunk-S6MSUZ3J.js +0 -1
  61. package/public/chunk-TRA6X3HB.js +0 -1
  62. package/public/chunk-VQI4BA3M.js +0 -19
  63. package/public/chunk-XF7D4C2H.js +0 -1
  64. package/public/chunk-YDOFHXZH.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as me}from"./chunk-TUN7H57E.js";import{a as ge}from"./chunk-LPHPZZDD.js";import{a as ue}from"./chunk-TPGJVI7J.js";import{a as Ce}from"./chunk-YTCQIUDM.js";import{a as he}from"./chunk-4ZCBTPFQ.js";import{a as _e}from"./chunk-JN6IF7KG.js";import{a as Pe,c as Re}from"./chunk-BMOLDRJ3.js";import{a as Dt}from"./chunk-2QHT7UTY.js";import{a as De}from"./chunk-H7F7H5MW.js";import{a as Rt,o as Et,p as wt,q as kt,r as ce}from"./chunk-73LLH6JC.js";import{a as pe}from"./chunk-IPCY24VP.js";import{g as yt,m as W,n as _t,t as It}from"./chunk-QZUDFUPG.js";import{e as J,f as Jt}from"./chunk-2HDDFLX5.js";import{a as $}from"./chunk-BGCYR25X.js";import"./chunk-5DKBUEKC.js";import{A as le,B as de,C as mt,D as ut,b as pt,c as bt,e as ct,f as Xt,i as Zt,j as M,k as te,l as xt,m as ee,n as ie,q as St,t as ne,u as ae,w as oe,x as se,y as re}from"./chunk-Z62MEN4O.js";import{b as Y}from"./chunk-MXLTCL2C.js";import{E as O,F as L,H as z,J as Yt,K as U,h as dt,j as Gt,u as Qt,v as qt}from"./chunk-M6KB66ZD.js";import{$c as Pt,Ab as u,Ac as rt,Cb as K,Db as j,Eb as G,Ec as s,F,Fb as _,Fc as r,Gb as o,Gc as q,Hb as l,Ib as c,Jb as x,Kb as S,Lb as P,Pc as lt,Rb as B,Sb as N,Ua as et,Va as Ht,Xb as T,Yb as V,Za as i,Zb as g,aa as E,ad as gt,cd as ot,db as Lt,ea as Ct,ec as st,ed as ht,fa as Nt,fc as vt,ga as w,gc as Mt,ha as k,hc as nt,ic as Q,jc as D,kc as d,lc as h,ma as ft,mb as it,mc as C,nb as H,nc as Ot,rc as zt,sa as v,sc as Ut,tc as Wt,uc as at,vc as Kt,xc as jt,yb as f,yc as X,zb as m,zc as A}from"./chunk-MKV5RAJQ.js";import{a as Bt,b as $t,g as Ft,h as b}from"./chunk-B4AJQJMI.js";var fe=(e,p)=>({"green-text":e,"grey-text":p});function Ve(e,p){if(e&1){let t=B();o(0,"li",9)(1,"div",10),d(2),c(3,"br"),o(4,"small",11),c(5,"i",12),s(6,"translate"),d(7," \xB7 "),o(8,"span",13),d(9),l(),d(10),s(11,"titlecase"),l()(),o(12,"div",14)(13,"input",23),s(14,"translate"),T("click",function(){let a=w(t).$implicit,y=g();return k(y.toggleList(a._username))}),l(),c(15,"label",24),l()()}if(e&2){let t=p.$implicit,n=g();i(2),C(" ",t.name," "),i(3),D(A(18,fe,t._isPaired,!t._isPaired)),_("ngbTooltip",r(6,12,t._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired"))("openDelay",150),i(4),h(t._username),i(),C(" \xB7 ",r(11,14,t._category)," "),i(3),_("id","hidePluginUpdates_"+t._username)("checked",!n.isInList(t._username))("disabled",n.clicked()),f("aria-label",r(14,16,"form.button_allow")+" "+t.name),i(2),_("for","hidePluginUpdates_"+t._username)}}function Ae(e,p){e&1&&(d(0),s(1,"translate")),e&2&&C(" ",r(1,1,"form.button_save")," ")}function Ne(e,p){e&1&&c(0,"i",22)}var ve=(()=>{class e{$activeModal=E(W);$api=E(U);$settings=E(Y);$toastr=E(z);$translate=E(O);modalData=E(wt);clicked=v(!1,{});mainPairing=v({},{});pairings=v([],{});originalBlacklist=[];updatedBlacklist=[];get blacklistHasUpdated(){return this.updatedBlacklist.join(",")!==this.originalBlacklist.join(",")}ngOnInit(){this.initialize()}initialize(){return b(this,null,function*(){this.updatedBlacklist=this.modalData.existingBlacklist.map(t=>t.trim().toUpperCase()).sort((t,n)=>t.localeCompare(n)),this.originalBlacklist=[...this.updatedBlacklist];try{let t=yield this.$api.get("/server/pairings");this.mainPairing.set(t.find(n=>n._main)),this.pairings.set(t.filter(n=>!n._main).sort((n,a)=>n.name.localeCompare(a.name)))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}toggleList(t){this.updatedBlacklist.includes(t)?this.updatedBlacklist=this.updatedBlacklist.filter(n=>n!==t):(this.updatedBlacklist.push(t),this.updatedBlacklist.sort((n,a)=>n.localeCompare(a)))}isInList(t){return this.updatedBlacklist.includes(t)}updateBlacklist(){return b(this,null,function*(){this.clicked.set(!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(t){this.clicked.set(!1),console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=H({type:e,selectors:[["ng-component"]],decls:45,vars:36,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"],[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,a){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),d(3),s(4,"translate"),l(),o(5,"button",3),s(6,"translate"),T("click",function(){return a.dismissModal()}),l()(),o(7,"div",4)(8,"div",5),c(9,"i",6),l(),o(10,"ul",7)(11,"li"),d(12),s(13,"translate"),l(),o(14,"li"),d(15),s(16,"translate"),l()(),o(17,"ul",8)(18,"li",9)(19,"div",10),d(20),c(21,"br"),o(22,"small",11),c(23,"i",12),s(24,"translate"),d(25," \xB7 "),o(26,"span",13),d(27),l(),d(28," \xB7 Homebridge "),l()(),o(29,"div",14)(30,"input",15),s(31,"translate"),T("click",function(){return a.toggleList(a.mainPairing()._username)}),l(),c(32,"label",16),l()(),j(33,Ve,16,21,"li",9,K),l()(),o(35,"div",17)(36,"div",10)(37,"button",18),T("click",function(){return a.dismissModal()}),d(38),s(39,"translate"),l()(),c(40,"div",19),o(41,"div",20)(42,"button",21),T("click",function(){return a.updateBlacklist()}),m(43,Ae,2,3),m(44,Ne,1,0,"i",22),l()()()()),n&2&&(i(3),h(r(4,19,"settings.security.ui_control")),i(2),_("disabled",a.clicked()),f("aria-label",r(6,21,"form.button_close")),i(7),h(r(13,23,"settings.security.ui_control_desc")),i(3),h(r(16,25,"settings.security.ui_control_desc_2")),i(5),C(" ",a.mainPairing().name),i(3),D(A(33,fe,a.mainPairing()._isPaired,!a.mainPairing()._isPaired)),_("ngbTooltip",r(24,27,a.mainPairing()._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired"))("openDelay",150),i(4),h(a.mainPairing()._username),i(3),_("checked",!a.isInList(a.mainPairing()._username))("disabled",a.clicked()),f("aria-label",r(31,29,"plugins.manage.hide_updates")),i(3),G(a.pairings()),i(4),_("disabled",a.clicked()),i(),C(" ",r(39,31,"form.button_close")," "),i(4),_("disabled",!a.blacklistHasUpdated||a.clicked()),i(),u(a.clicked()?-1:43),i(),u(a.clicked()?44:-1))},dependencies:[mt,It,L,dt],encapsulation:2})}return e})();var Ee=Ft(De(),1);var be=Ft(Pe(),1),xe=Ft(Re(),1);var He=e=>({maxBackupSizeText:e});function Le(e,p){if(e&1&&P(0,"input",10),e&2){let t=g(2);N("value",t.selectedBackup.fileName)}}function Oe(e,p){if(e&1){let t=B();x(0,"input",12),V("change",function(a){w(t);let y=g(2);return k(y.handleRestoreFileInput(a.target.files))}),S()}}function ze(e,p){if(e&1&&(x(0,"div",4)(1,"div",7),P(2,"i",8),S(),x(3,"ul",9)(4,"li"),d(5),s(6,"translate"),S(),x(7,"li"),d(8),s(9,"translate"),S(),x(10,"li"),d(11),s(12,"translate"),S(),x(13,"li"),d(14),s(15,"translate"),S()(),m(16,Le,1,1,"input",10),m(17,Oe,1,0,"input",11),S()),e&2){let t=g();i(5),h(r(6,6,"backup.restore_help_one")),i(3),h(r(9,8,"backup.restore_help_two")),i(3),h(q(12,10,"backup.restore_max_size",X(15,He,t.maxFileSizeText))),i(3),h(r(15,13,"backup.restore_warning")),i(2),u(t.selectedBackup?16:-1),i(),u(t.selectedBackup?-1:17)}}function Ue(e,p){if(e&1){let t=B();x(0,"button",18),s(1,"translate"),V("click",function(){w(t);let a=g(2);return k(a.dismissModal())}),d(2),s(3,"translate"),S()}if(e&2){let t=g(2);N("disabled",t.clicked()),f("aria-label",r(1,3,"form.button_close")),i(2),C(" ",r(3,5,"form.button_close")," ")}}function We(e,p){if(e&1){let t=B();x(0,"button",18),s(1,"translate"),V("click",function(){w(t);let a=g(2);return k(a.reopenBackupModal())}),d(2),s(3,"translate"),S()}if(e&2){let t=g(2);N("disabled",t.clicked()),f("aria-label",r(1,3,"form.button_back")),i(2),C(" ",r(3,5,"form.button_back")," ")}}function Ke(e,p){e&1&&P(0,"i",19)}function je(e,p){if(e&1&&(x(0,"span"),d(1),S()),e&2){let t=g(3);i(),C("",t.uploadPercent(),"% - ")}}function Ge(e,p){e&1&&(x(0,"span"),d(1),s(2,"translate"),S()),e&2&&(i(),h(r(2,1,"backup.label_extracting")))}function Qe(e,p){e&1&&(x(0,"span"),d(1),s(2,"translate"),S()),e&2&&(i(),h(r(2,1,"backup.label_uploading")))}function qe(e,p){if(e&1&&(x(0,"span"),m(1,Ke,1,0,"i",19),m(2,je,2,1,"span"),m(3,Ge,3,3,"span"),m(4,Qe,3,3,"span"),S()),e&2){let t=g(2);i(),u(!t.uploadPercent()||t.uploadPercent()===100?1:-1),i(),u(t.uploadPercent()&&t.uploadPercent()!==100?2:-1),i(),u(t.uploadPercent()===100?3:-1),i(),u(t.uploadPercent()!==100?4:-1)}}function Je(e,p){e&1&&(d(0),s(1,"translate")),e&2&&C(" ",r(1,1,"form.button_restore")," ")}function Ye(e,p){if(e&1){let t=B();x(0,"div",6)(1,"div",13),m(2,Ue,4,7,"button",14),m(3,We,4,7,"button",14),S(),P(4,"div",15),x(5,"div",16)(6,"button",17),V("click",function(){w(t);let a=g();return k(a.onRestoreBackupClick())}),m(7,qe,5,4,"span"),m(8,Je,2,3),S()()()}if(e&2){let t=g();i(2),u(t.setupWizardRestore?2:-1),i(),u(t.setupWizardRestore?-1:3),i(3),N("disabled",!t.selectedBackup&&!t.selectedFile()||t.clicked()),i(),u(t.clicked()?7:-1),i(),u(t.clicked()?-1:8)}}function Xe(e,p){if(e&1){let t=B();x(0,"div",6),P(1,"div",13),x(2,"div",15)(3,"button",20),V("click",function(){w(t);let a=g();return k(a.postBackupRestart())}),d(4),s(5,"translate"),S()(),P(6,"div",16),S()}e&2&&(i(4),C(" ",r(5,1,"menu.hbrestart.title")," "))}var Se=(()=>{class e{$activeModal=E(W);$api=E(U);$modal=E(_t);$router=E(J);$toastr=E(z);$translate=E(O);$ws=E(pe);modalData=E(kt);setupWizardRestore=this.modalData.setupWizardRestore??!1;selectedBackup=this.modalData.selectedBackup??null;clicked=v(!1,{});selectedFile=v(null,{});restoreInProgress=v(!1,{});restoreStarted=v(!1,{});restoreFailed=v(!1,{});restoreArchiveType=v("homebridge",{});uploadPercent=v(0,{});io;term=new xe.Terminal;termTarget;fitAddon=new be.FitAddon;maxFileSizeText=globalThis.backup.maxBackupSizeText;ngOnInit(){this.initialize()}initialize(){return b(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",t=>{this.term.write(t)}),this.setupWizardRestore&&(this.restoreStarted.set(!0),this.restoreInProgress.set(!0),this.startRestore())})}onRestoreBackupClick(){this.selectedBackup?this.restoreScheduledBackup():this.restoreArchiveType()==="homebridge"?this.uploadHomebridgeArchive():this.restoreArchiveType()==="hbfx"&&this.uploadHbfxArchive()}handleRestoreFileInput(t){t.length?(this.selectedFile.set(t[0]),this.selectedFile()?.name.endsWith(".hbfx")?this.restoreArchiveType.set("hbfx"):this.restoreArchiveType.set("homebridge")):this.selectedFile.set(null)}postBackupRestart(){return b(this,null,function*(){try{yield this.$api.put("/backup/restart",{}),this.$activeModal.close(!0),this.$router.navigate(["/"])}catch{}})}reopenBackupModal(){this.$activeModal.dismiss(),this.$modal.open(Tt,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.io.end()}dismissModal(){this.$activeModal.dismiss("Dismiss")}uploadHomebridgeArchive(){return b(this,null,function*(){this.term.reset(),this.clicked.set(!0);let t=new FormData;t.append("restoreArchive",this.selectedFile(),this.selectedFile()?.name);try{yield this.$api.post("/backup/restore",t),this.restoreStarted.set(!0),this.restoreInProgress.set(!0),setTimeout(()=>{this.startRestore()},500)}catch(n){console.error(n),this.$toastr.error(n.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}finally{this.clicked.set(!1)}})}restoreScheduledBackup(){return b(this,null,function*(){this.term.reset(),this.clicked.set(!0);try{yield this.$api.post(`/backup/scheduled-backups/${this.selectedBackup.id}/restore`,{}),this.restoreStarted.set(!0),this.restoreInProgress.set(!0),setTimeout(()=>{this.startRestore()},500)}catch(t){console.error(t),this.$toastr.error(t.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}finally{this.clicked.set(!1)}})}startRestore(){return b(this,null,function*(){this.io.request("do-restore").subscribe({next:()=>{this.restoreInProgress.set(!1),this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success")),this.setupWizardRestore&&this.postBackupRestart()},error:t=>{this.restoreFailed.set(!0),console.error(t),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}uploadHbfxArchive(){return b(this,null,function*(){this.term.reset(),this.clicked.set(!0);let t=new FormData;t.append("restoreArchive",this.selectedFile(),this.selectedFile()?.name);try{let n=yield this.$api.post("/backup/restore/hbfx",t,{reportProgress:!0,observe:"events"});n.type===Qt.UploadProgress?this.uploadPercent.set(Math.round(100*n.loaded/n.total)):n instanceof qt&&(this.restoreStarted.set(!0),this.restoreInProgress.set(!0),setTimeout(()=>{this.startHbfxRestore()},500))}catch(n){console.error(n),this.$toastr.error(n.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}finally{this.clicked.set(!1)}})}startHbfxRestore(){return b(this,null,function*(){this.io.request("do-restore-hbfx").subscribe({next:()=>{this.restoreInProgress.set(!1),this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success"))},error:t=>{this.restoreFailed.set(!0),console.error(t),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=H({type:e,selectors:[["ng-component"]],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,a){n&1&&(x(0,"div",0)(1,"div",1)(2,"h5",2),d(3),s(4,"translate"),S(),x(5,"button",3),s(6,"translate"),V("click",function(){return a.dismissModal()}),S()(),m(7,ze,18,17,"div",4),P(8,"div",5),m(9,Ye,9,5,"div",6),m(10,Xe,7,3,"div",6),S()),n&2&&(i(3),h(r(4,7,"backup.title_backup")),i(2),N("disabled",a.restoreInProgress()),f("aria-label",r(6,9,"form.button_close")),i(2),u(!a.restoreStarted()&&!a.setupWizardRestore?7:-1),i(),N("hidden",!a.restoreStarted()),i(),u(!a.restoreStarted()||a.restoreFailed()===!0?9:-1),i(),u(!a.restoreInProgress()&&a.restoreStarted?10:-1))},dependencies:[L],encapsulation:2})}return e})();var ye=(e,p)=>({"fa-arrow-right":e,"fa-cog fa-spin":p}),Ze=e=>({backupTime:e,dayCount:7}),ti=(e,p)=>({"fa-trash":e,"fa-cog fa-spin":p}),ei=(e,p)=>({backupSize:e,maxBackupSizeText:p});function ii(e,p){if(e&1&&(d(0),s(1,"date"),s(2,"translate")),e&2){let t=g(2);C(" ",q(2,4,"backup.scheduled_backup_time",X(7,Ze,q(1,1,t.backupTime(),"shortTime")))," ")}}function ni(e,p){e&1&&(d(0),s(1,"translate")),e&2&&C(" ",r(1,1,"plugins.settings.restart_required")," ")}function ai(e,p){if(e&1&&m(0,ii,3,9)(1,ni,2,3),e&2){let t=g();u(t.backupTime()?0:1)}}function oi(e,p){if(e&1&&(d(0),s(1,"translate")),e&2){let t=g();C(" ",r(1,1,t.backupTime()?"plugins.settings.restart_required":"backup.scheduled_backup_disabled")," ")}}function si(e,p){if(e&1&&(o(0,"span",33),s(1,"translate"),c(2,"i",40),d(3),l()),e&2){let t=g().$implicit;_("ngbTooltip",q(1,3,"backup.backup_exceeds_max_size",A(6,ei,t.size+"MB",t.maxBackupSizeText)))("openDelay",150),i(3),C(" ",t.size,"MB ")}}function ri(e,p){if(e&1&&(o(0,"span"),d(1),l()),e&2){let t=g().$implicit;i(),C("",t.size,"MB")}}function li(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span")(2,"span",32),d(3),s(4,"date"),l(),c(5,"br"),o(6,"small",23),d(7),s(8,"date"),m(9,si,4,9,"span",33),m(10,ri,2,1,"span"),l()(),o(11,"span",34)(12,"button",35),s(13,"translate"),s(14,"translate"),T("click",function(){let a=w(t).$implicit,y=g(2);return k(y.restore(a))}),c(15,"i",36),l(),o(16,"button",37),s(17,"translate"),s(18,"translate"),T("click",function(){let a=w(t).$implicit,y=g(2);return k(y.download(a))}),c(19,"i",38),l(),o(20,"button",39),s(21,"translate"),s(22,"translate"),T("click",function(){let a=w(t).$implicit,y=g(2);return k(y.delete(a))}),c(23,"i",25),l()()()}if(e&2){let t=p.$implicit,n=g(2);i(2),_("ngbTooltip",t.fileName)("openDelay",150),i(),C(" ",q(4,20,t.timestamp,"mediumDate")," "),i(4),C(" ",q(8,23,t.timestamp,"shortTime")," \xB7 "),i(2),u(t.size>t.maxBackupSize?9:-1),i(),u(t.size<=t.maxBackupSize?10:-1),i(2),_("disabled",n.clicked()||n.deleting()||t.size>t.maxBackupSize)("ngbTooltip",r(13,26,"form.button_restore"))("openDelay",150),f("aria-label",r(14,28,"form.button_restore")),i(4),_("disabled",n.clicked()||n.deleting())("ngbTooltip",r(17,30,"form.button_download"))("openDelay",150),f("aria-label",r(18,32,"form.button_download")),i(4),_("disabled",n.clicked()||n.deleting())("ngbTooltip",r(21,34,"form.button_delete"))("openDelay",150),f("aria-label",r(22,36,"form.button_delete")),i(3),D(A(38,ti,t.id!==n.deleting(),t.id===n.deleting()))}}function di(e,p){if(e&1&&(o(0,"ul",27)(1,"li",9)(2,"h6",10),d(3),s(4,"translate"),l()(),j(5,li,24,41,"li",22,K),l()),e&2){let t=g();i(3),h(r(4,1,"backup.files_auto")),i(2),G(t.scheduledBackups())}}var Tt=(()=>{class e{destroyRef=E(ft);$activeModal=E(W);$api=E(U);$backup=E(Ce);$modal=E(_t);$router=E(J);$settings=E(Y);$toastr=E(z);$translate=E(O);injector=E(Ct);clicked=v(!1,{});scheduledBackups=v([],{});backupTime=v("",{});deleting=v(null,{});currentSettingEnabled=v(!1,{});currentSettingPath=v("",{});enabledFormControl=new M(!1);pathFormControl=new M("");restartToastIsShown=!1;ngOnInit(){this.getScheduledBackups(),this.getNextBackup(),this.currentSettingEnabled.set(!this.$settings.env.scheduledBackupDisable),this.currentSettingPath.set(this.$settings.env.scheduledBackupPath),this.enabledFormControl.patchValue(this.currentSettingEnabled()),this.pathFormControl.patchValue(this.currentSettingPath()),this.enabledFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(t=>b(this,null,function*(){this.currentSettingEnabled.set(t),yield this.saveUiSettingChange("scheduledBackupDisable",!this.currentSettingEnabled())})),this.pathFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(t=>b(this,null,function*(){this.currentSettingPath.set(t),yield this.saveUiSettingChange("scheduledBackupPath",this.currentSettingPath())}))}download(t){return b(this,null,function*(){try{let n=yield this.$api.get(`/backup/scheduled-backups/${t.id}`,{observe:"response",responseType:"blob"}),a=t.fileName||"homebridge-backup.tar.gz",y=n.body.size;if(y>globalThis.backup.maxBackupSize){let R=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(y/1048576).toFixed(1)}MB`});this.$toastr.warning(R,this.$translate.instant("toast.title_warning"))}(0,Ee.saveAs)(n.body,a)}catch(n){console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_download_failed"),this.$translate.instant("toast.title_error"))}})}restore(t){this.$activeModal.close();let n=it([{provide:kt,useValue:{selectedBackup:t}}],this.injector);this.$modal.open(Se,{size:"lg",backdrop:"static",injector:n})}delete(t){return b(this,null,function*(){this.deleting.set(t.id);try{yield this.$api.delete(`/backup/scheduled-backups/${t.id}`),this.getScheduledBackups()}catch(n){console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_delete_failed"),this.$translate.instant("toast.title_error"))}finally{this.deleting.set(null)}})}onDownloadBackupClick(){return b(this,null,function*(){this.clicked.set(!0);try{yield this.$backup.downloadBackup(),this.clicked.set(!1)}catch(t){this.clicked.set(!1),console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}onCreateBackupClick(){return b(this,null,function*(){this.clicked.set(!0);try{yield this.$api.post("/backup",{}),this.getScheduledBackups()}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}finally{this.clicked.set(!1)}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}saveUiSettingChange(t,n){return b(this,null,function*(){try{yield this.$api.put("/config-editor/ui",{key:t,value:n}),this.$settings.setEnvItem(t,n),this.showRestartToast()}catch(a){console.error(a),this.$toastr.error(a.message,this.$translate.instant("toast.title_error"))}})}getScheduledBackups(){return b(this,null,function*(){try{let t=yield this.$api.get("/backup/scheduled-backups");this.scheduledBackups.set(t)}catch(t){console.error(t)}})}getNextBackup(){return b(this,null,function*(){try{let t=yield this.$api.get("/backup/scheduled-backups/next");this.backupTime.set(t.next)}catch(t){console.error(t)}})}showRestartToast(){if(!this.restartToastIsShown){this.restartToastIsShown=!0;let t=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});t&&t.onTap&&t.onTap.pipe($(this.destroyRef)).subscribe(()=>{this.$router.navigate(["/restart"])})}}Date=Date;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=H({type:e,selectors:[["ng-component"]],decls:92,vars:82,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","font-monospace",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","py-1",3,"click","disabled"],[1,"fas"],[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","py-1",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,a){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),d(3),s(4,"translate"),l(),o(5,"button",3),s(6,"translate"),T("click",function(){return a.dismissModal()}),l()(),o(7,"div",4)(8,"div",5),c(9,"i",6),l(),o(10,"ul",7)(11,"li"),d(12),s(13,"translate"),l(),o(14,"li"),d(15),s(16,"translate"),l(),o(17,"li"),d(18),s(19,"translate"),l()(),o(20,"ul",8)(21,"li",9)(22,"h6",10),d(23),s(24,"translate"),l()(),o(25,"li",11)(26,"div",12),d(27),s(28,"translate"),c(29,"br"),o(30,"span",13),d(31),s(32,"translate"),l()(),o(33,"div",14),c(34,"input",15),s(35,"translate"),l()(),o(36,"li",16)(37,"div",17),d(38),s(39,"translate"),c(40,"br"),o(41,"span",18),m(42,ai,2,1)(43,oi,2,3),l()(),o(44,"div",19),c(45,"input",20),s(46,"translate"),c(47,"label",21),l()(),o(48,"li",22)(49,"div")(50,"span"),d(51),s(52,"translate"),l(),c(53,"br"),o(54,"small",23),d(55),s(56,"translate"),l()(),o(57,"button",24),s(58,"translate"),T("click",function(){return a.onDownloadBackupClick()}),c(59,"i",25),l()(),o(60,"li",22)(61,"div")(62,"span"),d(63),s(64,"translate"),l(),c(65,"br"),o(66,"small",23),d(67),s(68,"translate"),l()(),o(69,"button",24),s(70,"translate"),T("click",function(){return a.onCreateBackupClick()}),c(71,"i",25),l()(),o(72,"li",22)(73,"div")(74,"span"),d(75),s(76,"translate"),l(),c(77,"br"),o(78,"small",23),d(79),s(80,"translate"),l()(),o(81,"button",24),s(82,"translate"),T("click",function(){return a.restore(null)}),c(83,"i",26),l()()(),m(84,di,7,3,"ul",27),l(),o(85,"div",28),c(86,"div",17),o(87,"div",29)(88,"button",30),T("click",function(){return a.dismissModal()}),d(89),s(90,"translate"),l()(),c(91,"div",31),l()()),n&2&&(i(3),h(r(4,34,"backup.title_backup")),i(2),_("disabled",a.clicked()||a.deleting()),f("aria-label",r(6,36,"form.button_close")),i(7),h(r(13,38,"backup.backup_help_one")),i(3),h(r(16,40,"backup.backup_help_two")),i(3),h(r(19,42,"backup.backup_warning")),i(5),h(r(24,44,"backup.settings_title")),i(4),C(" ",r(28,46,"backup.settings_path")),i(4),h(r(32,48,"backup.settings_path_desc")),i(3),_("formControl",a.pathFormControl),f("aria-label",r(35,50,"backup.settings_path")),i(4),C(" ",r(39,52,"backup.settings_enable")),i(4),u(a.enabledFormControl.value?42:43),i(3),_("formControl",a.enabledFormControl),f("aria-label",r(46,54,"backup.settings_enable")),i(6),h(r(52,56,"backup.backup_now")),i(4),h(r(56,58,"backup.backup_now_desc")),i(2),_("disabled",a.clicked()),f("aria-label",r(58,60,"backup.backup_now")),i(2),D(A(76,ye,!a.clicked(),a.clicked())),i(4),h(r(64,62,"backup.backup_now")),i(4),h(r(68,64,"backup.backup_now_save_desc")),i(2),_("disabled",a.clicked()),f("aria-label",r(70,66,"backup.backup_now")),i(2),D(A(79,ye,!a.clicked(),a.clicked())),i(4),h(r(76,68,"backup.restore_now")),i(4),h(r(80,70,"backup.restore_now_desc")),i(2),_("disabled",a.clicked()),f("aria-label",r(82,72,"backup.restore_now")),i(3),u(a.scheduledBackups().length?84:-1),i(4),_("disabled",a.clicked()||a.deleting()),i(),C(" ",r(90,74,"form.button_close")," "))},dependencies:[It,ut,bt,pt,ct,St,Gt,L],encapsulation:2})}return e})();function pi(e,p){e&1&&(o(0,"div",12),c(1,"i",13),l(),o(2,"p",14),d(3),s(4,"translate"),l()),e&2&&(i(3),h(r(4,1,"reset.no_accessories")))}function ci(e,p){e&1&&(o(0,"div",12),c(1,"i",15),l(),o(2,"ul",16)(3,"li"),d(4),s(5,"translate"),l(),o(6,"li"),d(7),s(8,"translate"),l(),o(9,"li"),d(10),s(11,"translate"),l()(),o(12,"ngb-alert",17)(13,"p",18),d(14),s(15,"translate"),l()()),e&2&&(i(4),h(r(5,5,"reset.accessory_all.list_1")),i(3),h(r(8,7,"reset.accessory_all.list_2")),i(3),h(r(11,9,"reset.accessory_all.list_3")),i(2),_("dismissible",!1),i(2),h(r(15,11,"reset.action_is_irreversible")))}function mi(e,p){if(e&1){let t=B();o(0,"button",19),s(1,"translate"),T("click",function(){w(t);let a=g();return k(a.dismissModal())}),d(2),s(3,"translate"),l()}if(e&2){let t=g();_("disabled",t.clicked()),f("aria-label",r(1,3,"form.button_close")),i(2),C(" ",r(3,5,"form.button_close")," ")}}function ui(e,p){if(e&1){let t=B();o(0,"button",20),s(1,"translate"),T("click",function(){w(t);let a=g();return k(a.dismissModal())}),d(2),s(3,"translate"),l()}e&2&&(f("aria-label",r(1,2,"form.button_close")),i(2),C(" ",r(3,4,"form.button_close")," "))}function _i(e,p){e&1&&(d(0),s(1,"translate")),e&2&&C(" ",r(1,1,"form.button_remove")," ")}function gi(e,p){e&1&&c(0,"i",22)}function hi(e,p){if(e&1){let t=B();o(0,"button",21),T("click",function(){w(t);let a=g();return k(a.onResetCachedAccessoriesClick())}),m(1,_i,2,3),m(2,gi,1,0,"i",22),l()}if(e&2){let t=g();_("disabled",t.clicked()),i(),u(t.clicked()?-1:1),i(),u(t.clicked()?2:-1)}}var we=(()=>{class e{$activeModal=E(W);$api=E(U);$router=E(J);$toastr=E(z);$translate=E(O);clicked=v(!1,{});cachedAccessories=v([],{});ngOnInit(){this.loadCachedAccessories()}onResetCachedAccessoriesClick(){return b(this,null,function*(){this.clicked.set(!0);try{yield this.$api.put("/server/reset-cached-accessories",{}),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}})}catch(t){this.clicked.set(!1),console.error(t),this.$toastr.error(this.$translate.instant("reset.failed_to_reset"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return b(this,null,function*(){try{this.cachedAccessories.set(yield this.$api.get("/server/cached-accessories"))}catch(t){console.error(t),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||e)};static \u0275cmp=H({type:e,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,a){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),d(3),s(4,"translate"),l(),o(5,"button",3),s(6,"translate"),T("click",function(){return a.dismissModal()}),l()(),o(7,"div",4),m(8,pi,5,3),m(9,ci,16,13),l(),o(10,"div",5)(11,"div",6),m(12,mi,4,7,"button",7),l(),o(13,"div",8),m(14,ui,4,6,"button",9),l(),o(15,"div",10),m(16,hi,3,3,"button",11),l()()()),n&2&&(i(3),h(r(4,8,"reset.accessory_all.title")),i(2),_("disabled",a.clicked()),f("aria-label",r(6,10,"form.button_close")),i(3),u(a.cachedAccessories.length===0?8:-1),i(),u(a.cachedAccessories.length>0?9:-1),i(3),u(a.cachedAccessories.length>0?12:-1),i(2),u(a.cachedAccessories.length===0?14:-1),i(2),u(a.cachedAccessories.length>0?16:-1))},dependencies:[yt,L],encapsulation:2})}return e})();var Ci=(e,p)=>({"fa-matter":e,"fa-hap":p}),fi=(e,p)=>({"btn-danger":e,"btn-elegant":p}),vi=(e,p,t)=>({"fa-broom":e,"fa-undo":p,"fa-spinner fa-pulse":t});function bi(e,p){e&1&&(x(0,"div",12),P(1,"i",13),S(),x(2,"p",14),d(3),s(4,"translate"),S()),e&2&&(i(3),h(r(4,1,"reset.bridge_accessories.empty")))}function xi(e,p){if(e&1){let t=B();x(0,"li",18)(1,"span",19),P(2,"i",20),S(),x(3,"span",21),d(4),P(5,"br"),x(6,"small",22)(7,"span",23),d(8),S()()(),x(9,"button",24),s(10,"translate"),V("click",function(){let a=w(t).$implicit,y=g(2);return k(y.toggleList(a._id,a._protocol))}),P(11,"i",25),S()()}if(e&2){let t=p.$implicit,n=g(2);i(2),D(A(12,Ci,t._protocol==="matter",t._protocol!=="matter")),i(2),C(" ",t.name," "),i(4),h(t._username),i(),D(A(15,fi,!n.isInList(t._id,t._protocol),n.isInList(t._id,t._protocol))),N("disabled",n.clicked()),f("aria-label",r(10,10,"form.button_delete")),i(2),D(rt(18,vi,!n.isInList(t._id,t._protocol),n.isInList(t._id,t._protocol)&&!n.clicked(),n.isInList(t._id,t._protocol)&&n.clicked()))}}function Si(e,p){if(e&1&&(x(0,"div",12),P(1,"i",15),S(),x(2,"ul",16)(3,"li"),d(4),s(5,"translate"),S(),x(6,"li"),d(7),s(8,"translate"),S(),x(9,"li"),d(10),s(11,"translate"),S()(),x(12,"ul",17),j(13,xi,12,22,"li",18,K),S()),e&2){let t=g();i(4),h(r(5,3,"reset.bridge_accessories.list_1")),i(3),h(r(8,5,"reset.clear_cache_single.list_3")),i(3),h(r(11,7,"reset.bridge_accessories.list_2")),i(3),G(t.pairings())}}function yi(e,p){if(e&1){let t=B();x(0,"button",26),V("click",function(){w(t);let a=g();return k(a.dismissModal())}),d(1),s(2,"translate"),S()}if(e&2){let t=g();N("disabled",t.clicked()),i(),C(" ",r(2,2,"form.button_close")," ")}}function Ii(e,p){if(e&1){let t=B();x(0,"button",27),V("click",function(){w(t);let a=g();return k(a.dismissModal())}),d(1),s(2,"translate"),S()}e&2&&(i(),C(" ",r(2,1,"form.button_close")," "))}function Ei(e,p){e&1&&P(0,"i",29)}function wi(e,p){if(e&1&&d(0),e&2){let t=g(3);C(" (",t.toDelete().length,") ")}}function ki(e,p){if(e&1&&(d(0),s(1,"translate"),m(2,wi,1,1)),e&2){let t=g(2);C(" ",r(1,2,"form.button_remove")," "),i(2),u(t.toDelete().length>0?2:-1)}}function Ti(e,p){if(e&1){let t=B();x(0,"button",28),V("click",function(){w(t);let a=g();return k(a.cleanBridges())}),m(1,Ei,1,0,"i",29)(2,ki,3,4),S()}if(e&2){let t=g();N("disabled",!t.toDelete().length||t.clicked()),i(),u(t.clicked()?1:2)}}var ke=(()=>{class e{$activeModal=E(W);$api=E(U);$router=E(J);$settings=E(Y);$toastr=E(z);$translate=E(O);clicked=v(!1,{});pairings=v([],{});toDelete=v([],{});isMatterSupported=this.$settings.isFeatureEnabled("matterSupport");ngOnInit(){this.loadPairings()}cleanBridges(){return b(this,null,function*(){this.clicked.set(!0);try{yield this.$api.delete("/server/pairings/accessories",{body:this.toDelete()}),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}})}catch(t){this.clicked.set(!1),console.error(t),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}toggleList(t,n){this.toDelete().some(a=>a.id===t&&a.protocol===n)?this.toDelete.set(this.toDelete().filter(a=>a.id!==t||a.protocol!==n)):this.toDelete.update(a=>[...a,{id:t,protocol:n}])}isInList(t,n){return this.toDelete().some(a=>a.id===t&&a.protocol===n)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadPairings(){return b(this,null,function*(){try{let t=(yield this.$api.get("/server/pairings")).filter(a=>a._category==="bridge"&&!a._main).sort((a,y)=>a.name.localeCompare(y.name)),n=[];for(let a of t)n.push($t(Bt({},a),{_protocol:"hap",_displayName:a.name})),this.isMatterSupported&&a._matter&&n.push($t(Bt({},a),{_protocol:"matter",_displayName:a.name}));this.pairings.set(n)}catch(t){console.error(t),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||e)};static \u0275cmp=H({type:e,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,"me-3"],[1,"fas","fa-lg"],[1,"flex-grow-1"],[1,"grey-text"],[1,"font-monospace"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled"],[1,"fas"],["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,a){n&1&&(x(0,"div",0)(1,"div",1)(2,"h5",2),d(3),s(4,"translate"),S(),x(5,"button",3),s(6,"translate"),V("click",function(){return a.dismissModal()}),S()(),x(7,"div",4),m(8,bi,5,3),m(9,Si,15,9),S(),x(10,"div",5)(11,"div",6),m(12,yi,3,4,"button",7),S(),x(13,"div",8),m(14,Ii,3,3,"button",9),S(),x(15,"div",10),m(16,Ti,3,2,"button",11),S()()()),n&2&&(i(3),h(r(4,8,"reset.bridge_accessories.title")),i(2),N("disabled",a.clicked()),f("aria-label",r(6,10,"form.button_close")),i(3),u(a.pairings().length===0?8:-1),i(),u(a.pairings().length>0?9:-1),i(3),u(a.pairings().length>0?12:-1),i(2),u(a.pairings().length===0?14:-1),i(2),u(a.pairings().length>0?16:-1))},dependencies:[L],encapsulation:2})}return e})();function Bi(e,p){e&1&&(d(0),s(1,"translate")),e&2&&C(" ",r(1,1,"form.button_reset")," ")}function $i(e,p){e&1&&c(0,"i",16)}var Te=(()=>{class e{$activeModal=E(W);$api=E(U);$router=E(J);$toastr=E(z);$translate=E(O);clicked=v(!1,{});onResetHomebridgeAccessoryClick(){return b(this,null,function*(){this.clicked.set(!0);try{yield this.$api.put("/server/reset-homebridge-accessory",{}),this.$toastr.success(this.$translate.instant("reset.accessory_reset"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"])}catch(t){console.error(t),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||e)};static \u0275cmp=H({type:e,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,a){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),d(3),s(4,"translate"),l(),o(5,"button",3),s(6,"translate"),T("click",function(){return a.dismissModal()}),l()(),o(7,"div",4)(8,"div",5),c(9,"i",6),l(),o(10,"ul",7)(11,"li"),d(12),s(13,"translate"),l(),o(14,"li"),d(15),s(16,"translate"),l(),o(17,"li"),d(18),s(19,"translate"),l(),o(20,"li"),d(21),s(22,"translate"),l()(),o(23,"ngb-alert",8)(24,"p",9),d(25),s(26,"translate"),l()()(),o(27,"div",10)(28,"div",11)(29,"button",12),s(30,"translate"),T("click",function(){return a.dismissModal()}),d(31),s(32,"translate"),l()(),c(33,"div",13),o(34,"div",14)(35,"button",15),T("click",function(){return a.onResetHomebridgeAccessoryClick()}),m(36,Bi,2,3),m(37,$i,1,0,"i",16),l()()()()),n&2&&(i(3),h(r(4,15,"reset.bridge_all.title")),i(2),_("disabled",a.clicked()),f("aria-label",r(6,17,"form.button_close")),i(7),h(r(13,19,"reset.bridge_all.list_1")),i(3),h(r(16,21,"reset.bridge_all.list_2")),i(3),h(r(19,23,"reset.bridge_all.list_3")),i(3),h(r(22,25,"reset.bridge_all.list_4")),i(2),_("dismissible",!1),i(2),h(r(26,27,"reset.action_is_irreversible")),i(4),_("disabled",a.clicked()),f("aria-label",r(30,29,"form.button_close")),i(2),C(" ",r(32,31,"form.button_close")," "),i(4),_("disabled",a.clicked()),i(),u(a.clicked()?-1:36),i(),u(a.clicked()?37:-1))},dependencies:[yt,L],encapsulation:2})}return e})();var Vt=(e,p)=>({"btn-danger":e,"btn-elegant":p}),Be=(e,p,t)=>({"fa-refresh":e,"fa-undo":p,"fa-spinner fa-pulse":t}),Fi=(e,p,t)=>({"fa-trash":e,"fa-undo":p,"fa-spinner fa-pulse":t});function Mi(e,p){e&1&&(x(0,"div",12),P(1,"i",13),S(),x(2,"p",14),d(3),s(4,"translate"),S()),e&2&&(i(3),h(r(4,1,"reset.bridges.empty")))}function Pi(e,p){if(e&1&&P(0,"i",27)(1,"i",28),e&2){let t=g().$implicit;nt("opacity",t._matterOnly?"0.25":"1"),i(),nt("opacity",t._matter?"1":"0.25")}}function Ri(e,p){e&1&&P(0,"i",22)}function Di(e,p){if(e&1){let t=B();x(0,"li",20)(1,"span",21),m(2,Pi,2,4)(3,Ri,1,0,"i",22),S(),x(4,"span",23),d(5),P(6,"br"),x(7,"small",24),d(8),s(9,"titlecase"),S()(),x(10,"button",25),s(11,"translate"),V("click",function(){let a=w(t).$implicit,y=g(3);return k(y.toggleList(a._id,!1))}),P(12,"i",26),S()()}if(e&2){let t=p.$implicit,n=g(3);i(2),u(n.isMatterSupported?2:3),i(3),C(" ",t.name," "),i(3),Ot(" ",t._username," \xB7 ",t._main?"Homebridge":r(9,10,t._category)," "),i(2),D(A(14,Vt,!n.isInList(t._id),n.isInList(t._id))),N("disabled",n.clicked()),f("aria-label",r(11,12,"form.button_unpair")),i(2),D(rt(17,Be,!n.isInList(t._id),n.isInList(t._id)&&!n.clicked(),n.isInList(t._id)&&n.clicked()))}}function Vi(e,p){if(e&1&&(x(0,"ul",16)(1,"li",17)(2,"h6",18),d(3),s(4,"translate"),S(),x(5,"p",19),d(6),s(7,"translate"),S()(),j(8,Di,13,21,"li",20,K),S()),e&2){let t=g(2);i(3),h(r(4,2,"reset.bridge_ind.head_non_child")),i(3),h(r(7,4,"reset.bridge_ind.desc_non_child")),i(2),G(t.pairingsNonChild())}}function Ai(e,p){if(e&1&&P(0,"i",27)(1,"i",28),e&2){let t=g().$implicit;i(),nt("opacity",t._matter?"1":"0.25")}}function Ni(e,p){e&1&&P(0,"i",22)}function Hi(e,p){if(e&1){let t=B();x(0,"li",20)(1,"span",21),m(2,Ai,2,2)(3,Ni,1,0,"i",22),S(),x(4,"span",23),d(5),P(6,"br"),x(7,"small",24),d(8),S()(),x(9,"button",25),s(10,"translate"),V("click",function(){let a=w(t).$implicit,y=g(3);return k(y.toggleList(a._id,!0))}),P(11,"i",26),S()()}if(e&2){let t=p.$implicit,n=g(3);i(2),u(n.isMatterSupported?2:3),i(3),C(" ",t.name," "),i(3),h(t._username),i(),D(A(11,Vt,!n.isInList(t._id),n.isInList(t._id))),N("disabled",n.clicked()),f("aria-label",r(10,9,"form.button_unpair")),i(2),D(rt(14,Be,!n.isInList(t._id),n.isInList(t._id)&&!n.clicked(),n.isInList(t._id)&&n.clicked()))}}function Li(e,p){if(e&1&&(x(0,"ul",16)(1,"li",17)(2,"h6",18),d(3),s(4,"translate"),S(),x(5,"p",19),d(6),s(7,"translate"),S()(),j(8,Hi,12,18,"li",20,K),S()),e&2){let t=g(2);i(3),h(r(4,2,"reset.bridge_ind.head_child_active")),i(3),h(r(7,4,"reset.bridge_ind.desc_child_active")),i(2),G(t.pairingsChildActive())}}function Oi(e,p){if(e&1&&P(0,"i",27)(1,"i",28),e&2){let t=g().$implicit;i(),nt("opacity",t._matter?"1":"0.25")}}function zi(e,p){e&1&&P(0,"i",22)}function Ui(e,p){if(e&1){let t=B();x(0,"li",20)(1,"span",21),m(2,Oi,2,2)(3,zi,1,0,"i",22),S(),x(4,"span",23),d(5),P(6,"br"),x(7,"small",24),d(8),S()(),x(9,"button",25),s(10,"translate"),V("click",function(){let a=w(t).$implicit,y=g(3);return k(y.toggleList(a._id,!1))}),P(11,"i",26),S()()}if(e&2){let t=p.$implicit,n=g(3);i(2),u(n.isMatterSupported?2:3),i(3),C(" ",t.name," "),i(3),h(t._username),i(),D(A(11,Vt,!n.isInList(t._id),n.isInList(t._id))),N("disabled",n.clicked()),f("aria-label",r(10,9,"form.button_unpair")),i(2),D(rt(14,Fi,!n.isInList(t._id),n.isInList(t._id)&&!n.clicked(),n.isInList(t._id)&&n.clicked()))}}function Wi(e,p){if(e&1&&(x(0,"ul",16)(1,"li",17)(2,"h6",18),d(3),s(4,"translate"),S(),x(5,"p",19),d(6),s(7,"translate"),S()(),j(8,Ui,12,18,"li",20,K),S()),e&2){let t=g(2);i(3),h(r(4,2,"reset.bridge_ind.head_child_stale")),i(3),h(r(7,4,"reset.bridge_ind.desc_child_stale")),i(2),G(t.pairingsChildStale())}}function Ki(e,p){if(e&1&&(x(0,"div",12),P(1,"i",15),S(),m(2,Vi,10,6,"ul",16),m(3,Li,10,6,"ul",16),m(4,Wi,10,6,"ul",16)),e&2){let t=g();i(2),u(t.pairingsNonChild().length>0?2:-1),i(),u(t.pairingsChildActive().length>0?3:-1),i(),u(t.pairingsChildStale().length>0?4:-1)}}function ji(e,p){if(e&1){let t=B();x(0,"button",29),V("click",function(){w(t);let a=g();return k(a.dismissModal())}),d(1),s(2,"translate"),S()}if(e&2){let t=g();N("disabled",t.clicked()),i(),C(" ",r(2,2,"form.button_close")," ")}}function Gi(e,p){if(e&1){let t=B();x(0,"button",30),V("click",function(){w(t);let a=g();return k(a.dismissModal())}),d(1),s(2,"translate"),S()}e&2&&(i(),C(" ",r(2,1,"form.button_close")," "))}function Qi(e,p){if(e&1&&d(0),e&2){let t=g(3);C(" (",t.toDelete().length,") ")}}function qi(e,p){if(e&1&&(d(0),s(1,"translate"),m(2,Qi,1,1)),e&2){let t=g(2);C(" ",r(1,2,"form.button_reset")," "),i(2),u(t.toDelete().length>0?2:-1)}}function Ji(e,p){e&1&&P(0,"i",32)}function Yi(e,p){if(e&1){let t=B();x(0,"button",31),V("click",function(){w(t);let a=g();return k(a.removeBridges())}),m(1,qi,3,4),m(2,Ji,1,0,"i",32),S()}if(e&2){let t=g();N("disabled",!t.toDelete().length||t.clicked()),i(),u(t.clicked()?-1:1),i(),u(t.clicked()?2:-1)}}var $e=(()=>{class e{$activeModal=E(W);$api=E(U);$router=E(J);$settings=E(Y);$toastr=E(z);$translate=E(O);clicked=v(!1,{});pairingsNonChild=v([],{});pairingsChildActive=v([],{});pairingsChildStale=v([],{});toDelete=v([],{});isMatterSupported=this.$settings.isFeatureEnabled("matterSupport");ngOnInit(){this.loadPairings()}toggleList(t,n=!1){this.toDelete().some(a=>a.id===t)?this.toDelete.set(this.toDelete().filter(a=>a.id!==t)):this.toDelete.update(a=>[...a,{id:t,resetPairingInfo:n}])}isInList(t){return this.toDelete().some(n=>n.id===t)}removeBridges(){return b(this,null,function*(){this.clicked.set(!0);try{yield this.$api.delete("/server/pairings",{body:this.toDelete()}),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}}),this.$toastr.success(this.$translate.instant("reset.bridge_ind.done"),this.$translate.instant("toast.title_success"))}catch(t){this.clicked.set(!1),console.error(t),this.$toastr.error(this.$translate.instant("reset.bridge_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadPairings(){return b(this,null,function*(){try{let t=(yield this.$api.get("/server/pairings")).filter(n=>!n._main).sort((n,a)=>n.name.localeCompare(a.name));this.pairingsChildActive.set(t.filter(n=>n._category==="bridge"&&!n._couldBeStale)),this.pairingsNonChild.set(t.filter(n=>n._category!=="bridge")),this.pairingsChildStale.set(t.filter(n=>n._category==="bridge"&&n._couldBeStale))}catch(t){console.error(t),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||e)};static \u0275cmp=H({type:e,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,"me-3"],[1,"fas","fa-lg","fa-hap"],[1,"flex-grow-1"],[1,"grey-text","font-monospace"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled"],[1,"fas"],[1,"fas","fa-lg","fa-hap","me-2"],[1,"fas","fa-lg","fa-matter"],["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,a){n&1&&(x(0,"div",0)(1,"div",1)(2,"h5",2),d(3),s(4,"translate"),S(),x(5,"button",3),s(6,"translate"),V("click",function(){return a.dismissModal()}),S()(),x(7,"div",4),m(8,Mi,5,3),m(9,Ki,5,3),S(),x(10,"div",5)(11,"div",6),m(12,ji,3,4,"button",7),S(),x(13,"div",8),m(14,Gi,3,3,"button",9),S(),x(15,"div",10),m(16,Yi,3,3,"button",11),S()()()),n&2&&(i(3),h(r(4,8,"reset.bridge_ind.title")),i(2),N("disabled",a.clicked()),f("aria-label",r(6,10,"form.button_close")),i(3),u(a.pairingsChildActive().length===0&&a.pairingsChildStale().length===0&&a.pairingsNonChild().length===0?8:-1),i(),u(a.pairingsChildActive().length>0||a.pairingsChildStale().length>0||a.pairingsNonChild().length>0?9:-1),i(3),u(a.pairingsChildActive().length>0||a.pairingsChildStale().length>0||a.pairingsNonChild().length>0?12:-1),i(2),u(a.pairingsChildActive().length===0&&a.pairingsChildStale().length===0&&a.pairingsNonChild().length===0?14:-1),i(2),u(a.pairingsChildActive().length>0||a.pairingsChildStale().length>0||a.pairingsNonChild().length>0?16:-1))},dependencies:[dt,L],encapsulation:2})}return e})();function Xi(e,p){if(e&1){let t=B();o(0,"li",9)(1,"div")(2,"span",16),d(3),l(),c(4,"br"),o(5,"span",17),d(6),l()(),o(7,"span")(8,"input",18),Wt("ngModelChange",function(a){let y=w(t).$implicit;return Ut(y.selected,a)||(y.selected=a),k(a)}),T("ngModelChange",function(){w(t);let a=g();return k(a.onAdapterSelectionChange())}),l(),c(9,"label",19),l()()}if(e&2){let t=p.$implicit;i(3),h(t.ip4||t.ip6),i(3),h(t.iface),i(2),_("id","adapter"+t.iface),zt("ngModel",t.selected),i(),_("for","adapter"+t.iface)}}var Fe=(()=>{class e{$activeModal=E(W);modalData=E(Et);adaptersAvailable=this.modalData.adaptersAvailable;adaptersSelected=this.modalData.adaptersSelected;isUnchanged=v(!0,{});adaptersOriginal=[];ngOnInit(){this.adaptersAvailable.forEach(t=>{t.selected=this.adaptersSelected.some(n=>n.iface===t.iface)}),this.adaptersOriginal=this.adaptersSelected.map(t=>t.iface)}onAdapterSelectionChange(){this.isUnchanged.set(this.adaptersOriginal.length===this.adaptersAvailable.filter(t=>t.selected).length&&this.adaptersOriginal.every(t=>this.adaptersAvailable.some(n=>n.iface===t&&n.selected)))}submit(){this.$activeModal.close(this.adaptersAvailable.filter(t=>t.selected).map(t=>t.iface))}closeAndReset(){this.adaptersAvailable.forEach(t=>{t.selected=this.adaptersOriginal.includes(t.iface)}),this.isUnchanged.set(!0),this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=H({type:e,selectors:[["ng-component"]],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,a){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),d(3),s(4,"translate"),l(),o(5,"button",3),s(6,"translate"),T("click",function(){return a.closeAndReset()}),l()(),o(7,"div",4)(8,"div",5),c(9,"i",6),l(),o(10,"ul",7)(11,"li"),d(12),s(13,"translate"),l()(),o(14,"ul",8),j(15,Xi,10,5,"li",9,K),l()(),o(17,"div",10)(18,"div",11)(19,"button",12),s(20,"translate"),T("click",function(){return a.closeAndReset()}),d(21),s(22,"translate"),l()(),c(23,"div",13),o(24,"div",14)(25,"button",15),T("click",function(){return a.submit()}),d(26),s(27,"translate"),l()()()()),n&2&&(i(3),h(r(4,7,"settings.network.title_network_interfaces")),i(2),f("aria-label",r(6,9,"form.button_close")),i(7),h(r(13,11,"settings.network.message_network_interface")),i(3),G(a.adaptersAvailable),i(4),f("aria-label",r(20,13,"form.button_close")),i(2),C(" ",r(22,15,"form.button_close")," "),i(4),_("disabled",a.isUnchanged()),i(),C(" ",r(27,17,"form.button_save")," "))},dependencies:[mt,pt,ct,xt,L],encapsulation:2})}return e})();var Zi=["wallpaperInput"],tn=e=>({maxFileSizeText:e});function en(e,p){if(e&1){let t=B();x(0,"div",10),P(1,"img",20),x(2,"button",21),s(3,"translate"),V("click",function(){w(t);let a=g();return k(a.clearWallpaper())}),P(4,"i",22),S()()}if(e&2){let t=g();i(),N("src",t.wallpaperUrl(),Ht),i(),f("aria-label",r(3,2,"form.button_delete"))}}function nn(e,p){e&1&&P(0,"div",11)}var Me=(()=>{class e{$activeModal=E(W);$api=E(U);$settings=E(Y);$toastr=E(z);$translate=E(O);wallpaperInput=lt("wallpaperInput",{});clicked=v(!1,{});selectedFile=v(null,{});wallpaperUrl=v(null,{});originalWallpaperUrl=v(null,{});maxFileSizeText=globalThis.backup.maxBackupSizeText;ngOnInit(){this.$settings.env.customWallpaperHash&&(this.wallpaperUrl.set(`${Yt.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`),this.originalWallpaperUrl.set(this.wallpaperUrl()))}onFileChange(t){if(t.length){this.selectedFile.set(t[0]);let n=new FileReader;n.onload=a=>{this.wallpaperUrl.set(a.target.result)},n.readAsDataURL(this.selectedFile())}else this.selectedFile.set(null),this.wallpaperUrl.set(this.originalWallpaperUrl())}saveWallpaper(){return b(this,null,function*(){this.clicked.set(!0);try{if(this.selectedFile()){let t=new FormData;t.append("wallpaper",this.selectedFile(),this.selectedFile()?.name),yield this.$api.post("/server/wallpaper",t),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"))}else yield this.$api.delete("/server/wallpaper"),this.$activeModal.close()}catch(t){console.error(t),this.$toastr.error(t.error?.message,this.$translate.instant("toast.title_error")),this.clicked.set(!1)}})}clearWallpaper(){this.selectedFile.set(null),this.wallpaperUrl.set(this.wallpaperUrl()===this.originalWallpaperUrl()?null:this.originalWallpaperUrl());let t=this.wallpaperInput();t&&(t.nativeElement.value="")}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=H({type:e,selectors:[["ng-component"]],viewQuery:function(n,a){n&1&&st(a.wallpaperInput,Zi,5),n&2&&vt()},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,a){if(n&1){let y=B();x(0,"div",1)(1,"div",2)(2,"h5",3),d(3),s(4,"translate"),S(),x(5,"button",4),s(6,"translate"),V("click",function(){return w(y),k(a.dismissModal())}),S()(),x(7,"div",5)(8,"div",6),P(9,"i",7),S(),x(10,"ul",8)(11,"li"),d(12),s(13,"translate"),S(),x(14,"li"),d(15),s(16,"translate"),S(),x(17,"li"),d(18),s(19,"translate"),S()(),x(20,"div",9),m(21,en,5,4,"div",10)(22,nn,1,0,"div",11),S(),x(23,"div",12)(24,"input",13,0),V("change",function(I){return w(y),k(a.onFileChange(I.target.files))}),S()()(),x(26,"div",14)(27,"div",15)(28,"button",16),V("click",function(){return w(y),k(a.dismissModal())}),d(29),s(30,"translate"),S()(),P(31,"div",17),x(32,"div",18)(33,"button",19),V("click",function(){return w(y),k(a.saveWallpaper())}),d(34),s(35,"translate"),S()()()()}n&2&&(i(3),h(r(4,11,"settings.display.wallpaper")),i(2),N("disabled",a.clicked()),f("aria-label",r(6,13,"form.button_close")),i(7),h(r(13,15,"settings.display.wallpaper_intro")),i(3),h(q(16,17,"settings.display.wallpaper_rule",X(26,tn,a.maxFileSizeText))),i(3),h(r(19,20,"settings.display.wallpaper_rule2")),i(3),u(a.wallpaperUrl()?21:22),i(7),N("disabled",a.clicked()),i(),C(" ",r(30,22,"form.button_close")," "),i(4),N("disabled",a.wallpaperUrl()===a.originalWallpaperUrl()||a.clicked()),i(),C(" ",r(35,24,"form.button_save")," "))},dependencies:[ut,L],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 e})();var an=["searchInput"],on=["sslKeyCertInput"],sn=["sslPfxInput"],rn=()=>({standalone:!0}),tt=(e,p)=>({"fa-chevron-down":e,"fa-chevron-right":p}),At=e=>({link:e}),ln=(e,p)=>({"badge-danger":e,"badge-info":p});function dn(e,p){if(e&1){let t=B();o(0,"button",13),s(1,"translate"),T("click",function(){w(t);let a=g(2);return k(a.clearSearch())}),c(2,"i",14),l()}e&2&&f("aria-label",r(1,1,"form.button_clear"))}function pn(e,p){if(e&1){let t=B();o(0,"div",8)(1,"div",9)(2,"form",10)(3,"input",11,0),s(5,"translate"),T("ngModelChange",function(a){w(t);let y=g();return k(y.searchQuery.set(a))})("ngModelChange",function(){w(t);let a=g();return k(a.filterSettings())}),l(),m(6,dn,3,3,"button",12),l()()()}if(e&2){let t=g();i(3),_("placeholder",r(5,4,"form.search"))("ngModel",t.searchQuery())("ngModelOptions",jt(6,rn)),i(3),u(t.searchQuery()?6:-1)}}function cn(e,p){e&1&&c(0,"app-spinner")}function mn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function un(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),l(),o(4,"div",23),c(5,"input",24),s(6,"translate"),m(7,mn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),h(r(3,7,"settings.name")),i(3),Q("is-invalid",t.hbNameIsInvalid()),_("formControl",t.hbNameFormControl),f("aria-label",r(6,9,"settings.name")),i(2),u(t.hbNameIsSaving()?7:-1)}}function _n(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),l(),o(4,"button",27),s(5,"translate"),T("click",function(){w(t);let a=g(4);return k(a.openBackupModal())}),c(6,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),h(r(3,3,"backup.title_backup")),i(2),f("aria-label",r(5,5,"backup.title_backup")))}function gn(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),l(),o(4,"button",27),s(5,"translate"),T("click",function(){w(t);let a=g(4);return k(a.openConfigBackup())}),c(6,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),h(r(3,3,"config.restore.title")),i(2),f("aria-label",r(5,5,"config.restore.title")))}function hn(e,p){e&1&&(o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),l(),o(4,"a",29),s(5,"translate"),c(6,"i",28),l()()),e&2&&(_("@smoothHide",void 0),i(2),h(r(3,3,"menu.tooltip_user_accounts")),i(2),f("aria-label",r(5,5,"menu.tooltip_user_accounts")))}function Cn(e,p){if(e&1&&(o(0,"ul",20),m(1,un,8,11,"li",21),m(2,_n,7,7,"li",22),m(3,gn,7,7,"li",22),m(4,hn,7,7,"li",22),l()),e&2){let t=g(3);i(),u(t.isItemHidden("setting-name")?-1:1),i(),u(t.isItemHidden("setting-backup")?-1:2),i(),u(t.isItemHidden("setting-restore")?-1:3),i(),u(t.isItemHidden("setting-users")?-1:4)}}function fn(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("general"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,Cn,5,4,"ul",20),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().general?"true":"false")("aria-controls","fieldsGeneral"),i(2),D(A(8,tt,t.showFields().general,!t.showFields().general)),i(),C(" ",r(5,6,"settings.general.title_general")," "),i(2),u(t.showFields().general?6:-1)}}function vn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function bn(e,p){if(e&1&&(o(0,"li",21),d(1),s(2,"translate"),o(3,"div",23)(4,"select",31)(5,"option",32),d(6),s(7,"translate"),l(),o(8,"option",33),d(9,"Bulgarian (bg)"),l(),o(10,"option",34),d(11,"Catalan (ca)"),l(),o(12,"option",35),d(13,"Chinese - Simplified (zh-CN)"),l(),o(14,"option",36),d(15,"Chinese - Traditional (zh-TW)"),l(),o(16,"option",37),d(17,"Czech (cs)"),l(),o(18,"option",38),d(19,"Dutch (nl)"),l(),o(20,"option",39),d(21,"English (en)"),l(),o(22,"option",40),d(23,"Finnish (fi)"),l(),o(24,"option",41),d(25,"French (fr)"),l(),o(26,"option",42),d(27,"German (de)"),l(),o(28,"option",43),d(29,"Hebrew (he)"),l(),o(30,"option",44),d(31,"Hungarian (hu)"),l(),o(32,"option",45),d(33,"Indonesian (id)"),l(),o(34,"option",46),d(35,"Italian (it)"),l(),o(36,"option",47),d(37,"Japanese (ja)"),l(),o(38,"option",48),d(39,"Korean (ko)"),l(),o(40,"option",49),d(41,"Macedonian (mk)"),l(),o(42,"option",50),d(43,"Norwegian (no)"),l(),o(44,"option",51),d(45,"Polish (pl)"),l(),o(46,"option",52),d(47,"Portuguese (Brazil)"),l(),o(48,"option",53),d(49,"Portuguese (Portugal)"),l(),o(50,"option",54),d(51,"Russian (ru)"),l(),o(52,"option",55),d(53,"Slovenian (sl)"),l(),o(54,"option",56),d(55,"Spanish (es)"),l(),o(56,"option",57),d(57,"Swedish (sv)"),l(),o(58,"option",58),d(59,"Thai (th)"),l(),o(60,"option",59),d(61,"Turkish (tr)"),l(),o(62,"option",60),d(63,"Ukrainian (uk)"),l()(),m(64,vn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(),C(" ",r(2,5,"settings.display.lang")," "),i(3),_("formControl",t.uiLangFormControl),i(2),h(r(7,7,"form.select.auto")),i(58),u(t.uiLangIsSaving()?64:-1)}}function xn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Sn(e,p){if(e&1&&(o(0,"li",21),d(1),s(2,"translate"),o(3,"div",23)(4,"select",31)(5,"option",61),d(6),s(7,"translate"),l(),o(8,"option",62),d(9),s(10,"translate"),l(),o(11,"option",63),d(12),s(13,"translate"),l(),o(14,"option",64),d(15),s(16,"translate"),l(),o(17,"option",65),d(18),s(19,"translate"),l(),o(20,"option",66),d(21),s(22,"translate"),l(),o(23,"option",67),d(24),s(25,"translate"),l(),o(26,"option",68),d(27),s(28,"translate"),l(),o(29,"option",69),d(30),s(31,"translate"),l(),o(32,"option",70),d(33),s(34,"translate"),l(),o(35,"option",71),d(36),s(37,"translate"),l(),o(38,"option",72),d(39),s(40,"translate"),l(),o(41,"option",73),d(42),s(43,"translate"),l()(),m(44,xn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(),C(" ",r(2,17,"settings.display.theme")," "),i(3),_("formControl",t.uiThemeFormControl),i(2),h(r(7,19,"settings.display.orange")),i(3),h(r(10,21,"settings.display.red")),i(3),h(r(13,23,"settings.display.pink")),i(3),h(r(16,25,"settings.display.purple")),i(3),h(r(19,27,"settings.display.deep_purple")),i(3),h(r(22,29,"settings.display.indigo")),i(3),h(r(25,31,"settings.display.blue")),i(3),h(r(28,33,"settings.display.bluegrey")),i(3),h(r(31,35,"settings.display.cyan")),i(3),h(r(34,37,"settings.display.green")),i(3),h(r(37,39,"settings.display.teal")),i(3),h(r(40,41,"settings.display.grey")),i(3),h(r(43,43,"settings.display.brown")),i(2),u(t.uiThemeIsSaving()?44:-1)}}function yn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function In(e,p){if(e&1&&(o(0,"li",21),d(1),s(2,"translate"),o(3,"div",23)(4,"select",31)(5,"option",32),d(6),s(7,"translate"),l(),o(8,"option",74),d(9),s(10,"translate"),l(),o(11,"option",75),d(12),s(13,"translate"),l()(),m(14,yn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(),C(" ",r(2,7,"settings.display.lighting_mode")," "),i(3),_("formControl",t.uiLightFormControl),i(2),h(r(7,9,"form.select.auto")),i(3),h(r(10,11,"settings.display.light")),i(3),h(r(13,13,"settings.display.dark")),i(2),u(t.uiLightIsSaving()?14:-1)}}function En(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function wn(e,p){if(e&1&&(o(0,"li",21),d(1),s(2,"translate"),o(3,"div",23)(4,"select",31)(5,"option",76),d(6),s(7,"translate"),l(),o(8,"option",77),d(9),s(10,"translate"),l()(),m(11,En,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(),C(" ",r(2,6,"settings.display.menu_mode")," "),i(3),_("formControl",t.uiMenuFormControl),i(2),h(r(7,8,"settings.display.menu_default")),i(3),h(r(10,10,"settings.display.menu_freeze")),i(2),u(t.uiMenuIsSaving()?11:-1)}}function kn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Tn(e,p){if(e&1&&(o(0,"li",21),d(1),s(2,"translate"),o(3,"div",23)(4,"select",31)(5,"option",78),d(6),s(7,"translate"),l(),o(8,"option",79),d(9),s(10,"translate"),l()(),m(11,kn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(),C(" ",r(2,6,"settings.display.temp_units")," "),i(3),_("formControl",t.uiTempFormControl),i(2),h(r(7,8,"settings.display.temp_units.c")),i(3),h(r(10,10,"settings.display.temp_units.f")),i(2),u(t.uiTempIsSaving()?11:-1)}}function Bn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function $n(e,p){if(e&1&&(o(0,"li",22),d(1),s(2,"translate"),o(3,"div",80)(4,"div",81),c(5,"input",82),s(6,"translate"),c(7,"label",83),l(),m(8,Bn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(),C(" ",r(2,5,"settings.display.show_betas")," "),i(4),_("formControl",t.uiAlwaysShowBetasFormControl),f("aria-label",r(6,7,"settings.display.show_betas")),i(3),u(t.uiAlwaysShowBetasIsSaving()?8:-1)}}function Fn(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),l(),o(4,"button",27),s(5,"translate"),T("click",function(){w(t);let a=g(4);return k(a.openWallpaperModal())}),c(6,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),h(r(3,3,"settings.display.wallpaper")),i(2),f("aria-label",r(5,5,"settings.display.wallpaper")))}function Mn(e,p){if(e&1&&(o(0,"ul",30),m(1,bn,65,9,"li",21),m(2,Sn,45,45,"li",21),m(3,In,15,15,"li",21),m(4,wn,12,12,"li",21),m(5,Tn,12,12,"li",21),m(6,$n,9,9,"li",22),m(7,Fn,7,7,"li",22),l()),e&2){let t=g(3);i(),u(t.isItemHidden("setting-lang")?-1:1),i(),u(t.isItemHidden("setting-theme")?-1:2),i(),u(t.isItemHidden("setting-lighting")?-1:3),i(),u(t.isItemHidden("setting-menu")?-1:4),i(),u(t.isItemHidden("setting-temp")?-1:5),i(),u(t.isItemHidden("setting-betas")?-1:6),i(),u(t.isItemHidden("setting-wallpaper")?-1:7)}}function Pn(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("display"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,Mn,8,7,"ul",30),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().display?"true":"false")("aria-controls","fieldsDisplay"),i(2),D(A(8,tt,t.showFields().display,!t.showFields().display)),i(),C(" ",r(5,6,"settings.general.title_display")," "),i(2),u(t.showFields().display?6:-1)}}function Rn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Dn(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),o(4,"code"),d(5,"-D"),l(),c(6,"br"),o(7,"small",85),d(8),s(9,"translate"),l()(),o(10,"div",80)(11,"div",81),c(12,"input",86),s(13,"translate"),c(14,"label",87),l(),m(15,Rn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.startup.debug")," "),i(6),h(r(9,8,t.debugFieldDesc)),i(4),_("formControl",t.hbDebugFormControl),f("aria-label",r(13,10,"settings.startup.debug")),i(3),u(t.hbDebugIsSaving()?15:-1)}}function Vn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function An(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),o(4,"code"),d(5,"-I"),l(),c(6,"br"),o(7,"small",85),d(8),s(9,"translate"),l()(),o(10,"div",80)(11,"div",81),c(12,"input",88),s(13,"translate"),c(14,"label",89),l(),m(15,Vn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.startup.insecure")," "),i(6),h(r(9,8,"settings.startup.insecure_desc")),i(4),_("formControl",t.hbInsecureFormControl),f("aria-label",r(13,10,"settings.startup.insecure")),i(3),u(t.hbInsecureIsSaving()?15:-1)}}function Nn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Hn(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),o(4,"code"),d(5,"-K"),l(),c(6,"br"),o(7,"small",85),d(8),s(9,"translate"),l()(),o(10,"div",80)(11,"div",81),c(12,"input",90),s(13,"translate"),c(14,"label",91),l(),m(15,Nn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.startup.keep_accessories")," "),i(6),h(r(9,8,"settings.startup.keep_accessories_desc")),i(4),_("formControl",t.hbKeepFormControl),f("aria-label",r(13,10,"settings.startup.keep_accessories")),i(3),u(t.hbKeepIsSaving()?15:-1)}}function Ln(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function On(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),o(4,"span",92),d(5),s(6,"translate"),l(),c(7,"br"),o(8,"small",85),c(9,"span",93),s(10,"translate"),d(11),s(12,"translate"),l()(),o(13,"div",94)(14,"div",95),c(15,"input",96),s(16,"translate"),m(17,Ln,1,1,"i",25),l()()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,14,"settings.startup.scheduled_restart")," "),i(3),h(r(6,16,"common.labels.beta")),i(4),_("innerHtml",q(10,18,"settings.startup.scheduled_restart_desc",X(25,At,t.linkCron)),et),i(2),C(" ",r(12,21,"settings.startup.scheduled_restart_desc_2")," "),i(4),nt("letter-spacing","0.15em")("text-align","center"),Q("is-invalid",t.scheduledRestartCronIsInvalid()),_("formControl",t.scheduledRestartCronFormControl),f("aria-label",r(16,23,"settings.startup.scheduled_restart")),i(2),u(t.scheduledRestartCronIsSaving()?17:-1)}}function zn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Un(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",80)(9,"div",81),c(10,"input",97),s(11,"translate"),c(12,"label",98),l(),m(13,zn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.startup.metrics")),i(4),h(r(7,8,"settings.startup.metrics_desc")),i(4),_("formControl",t.uiMetricsFormControl),f("aria-label",r(11,10,"settings.startup.metrics")),i(3),u(t.uiMetricsIsSaving()?13:-1)}}function Wn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Kn(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",99),s(10,"translate"),m(11,Wn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.network.hb_package")),i(4),h(r(7,8,"settings.network.hb_package_desc")),i(3),_("formControl",t.hbPackageFormControl),f("aria-label",r(10,10,"settings.network.hb_package")),i(2),u(t.hbPackageIsSaving()?11:-1)}}function jn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Gn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Qn(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",101),c(9,"input",102),s(10,"translate"),m(11,Gn,1,1,"i",25),l()()),e&2){let t=g(5);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.linux.restart")),i(4),h(r(7,8,"settings.linux.restart_desc")),i(3),_("formControl",t.hbLinuxRestartFormControl),f("aria-label",r(10,10,"settings.linux.restart")),i(2),u(t.hbLinuxRestartIsSaving()?11:-1)}}function qn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Jn(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",103),s(10,"translate"),m(11,qn,1,1,"i",25),l()()),e&2){let t=g(5);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.linux.temp")),i(4),h(r(7,8,"settings.linux.temp_desc")),i(3),_("formControl",t.uiTempFileFormControl),f("aria-label",r(10,10,"settings.linux.temp")),i(2),u(t.uiTempFileIsSaving()?11:-1)}}function Yn(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",100),s(10,"translate"),m(11,jn,1,1,"i",25),l()(),m(12,Qn,12,12,"li",21),m(13,Jn,12,12,"li",21)),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,8,"settings.linux.shutdown")),i(4),h(r(7,10,"settings.linux.shutdown_desc")),i(3),_("formControl",t.hbLinuxShutdownFormControl),f("aria-label",r(10,12,"settings.linux.shutdown")),i(2),u(t.hbLinuxShutdownIsSaving()?11:-1),i(),u(t.isItemHidden("setting-linux-restart")?-1:12),i(),u(t.runningOnRaspberryPi?13:-1)}}function Xn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Zn(e,p){if(e&1&&(o(0,"li",21)(1,"span")(2,"span",104),d(3,"DEBUG"),l(),c(4,"br")(5,"small",105),s(6,"translate"),l(),o(7,"div",23),c(8,"input",106),m(9,Xn,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(5),_("innerHTML",q(6,4,"settings.service.debug_tooltip",X(7,At,t.linkDebug)),et),i(3),_("formControl",t.hbEnvDebugFormControl),i(),u(t.hbEnvDebugIsSaving()?9:-1)}}function ta(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ea(e,p){if(e&1&&(o(0,"li",21)(1,"span")(2,"span",104),d(3,"NODE_OPTIONS"),l(),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",107),m(10,ta,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(6),h(r(7,4,"settings.service.node_tooltip")),i(3),_("formControl",t.hbEnvNodeFormControl),i(),u(t.hbEnvNodeIsSaving()?10:-1)}}function ia(e,p){e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"a",108),s(9,"translate"),c(10,"i",28),l()()),e&2&&(_("@smoothHide",void 0),i(2),C(" ",r(3,4,"menu.docker.startup_script")),i(4),h(r(7,6,"platform.docker.script_help")),i(2),f("aria-label",r(9,8,"menu.docker.startup_script")))}function na(e,p){if(e&1&&(o(0,"ul",84),m(1,Dn,16,12,"li",22),m(2,An,16,12,"li",22),m(3,Hn,16,12,"li",22),m(4,On,18,27,"li",21),m(5,Un,14,12,"li",22),m(6,Kn,12,12,"li",21),m(7,Yn,14,14),m(8,Zn,10,9,"li",21),m(9,ea,11,6,"li",21),m(10,ia,11,10,"li",22),l()),e&2){let t=g(3);i(),u(t.isItemHidden("setting-debug")?-1:1),i(),u(t.isItemHidden("setting-insecure")?-1:2),i(),u(t.isItemHidden("setting-keep")?-1:3),i(),u(t.isItemHidden("setting-scheduled-restart")?-1:4),i(),u(t.isItemHidden("setting-metrics-startup")?-1:5),i(),u(t.isItemHidden("setting-package-path")?-1:6),i(),u(t.platform==="linux"?7:-1),i(),u(t.isItemHidden("setting-env-debug-manual")?-1:8),i(),u(t.isItemHidden("setting-env-node")?-1:9),i(),u(t.runningInDocker?10:-1)}}function aa(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("startup"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,na,11,10,"ul",84),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().startup?"true":"false")("aria-controls","fieldsStartup"),i(2),D(A(8,tt,t.showFields().startup,!t.showFields().startup)),i(),C(" ",r(5,6,"settings.title_startup_options")," "),i(2),u(t.showFields().startup?6:-1)}}function oa(e,p){e&1&&c(0,"i",114)}function sa(e,p){if(e&1&&(o(0,"span",113),m(1,oa,1,0,"i",114),d(2),o(3,"span",115),d(4),s(5,"translate"),l()()),e&2){let t=p.$implicit;D(A(7,ln,t.missing,!t.missing)),i(),u(t.missing?1:-1),i(),C(" ",t.iface,": "),i(2),h(t.missing?r(5,5,"settings.mdns_advertiser_not_connected"):t.ip4||t.ip6)}}function ra(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),c(4,"br"),o(5,"div",110),d(6),s(7,"translate"),l(),j(8,sa,6,10,"span",111,K),l(),o(10,"button",112),s(11,"translate"),T("click",function(){w(t);let a=g(4);return k(a.selectNetworkInterfaces())}),c(12,"i",28),l()()}if(e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,5,"settings.network.title_network_interfaces")),i(4),h(r(7,7,"settings.network.message_network_interface")),i(2),G(t.adaptersSelected()),i(2),_("disabled",!t.adaptersAvailable().length),f("aria-label",r(11,9,"settings.network.title_network_interfaces"))}}function la(e,p){e&1&&(o(0,"option",116),d(1),s(2,"translate"),l()),e&2&&(i(),C("Avahi (",r(2,1,"settings.mdns_advertiser_rec"),")"))}function da(e,p){e&1&&(o(0,"option",119),d(1),s(2,"translate"),l()),e&2&&(i(),C("systemd-resolved (",r(2,1,"settings.mdns_advertiser_exp"),")"))}function pa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ca(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23)(9,"select",31),s(10,"translate"),m(11,la,3,3,"option",116),o(12,"option",117),d(13),s(14,"translate"),l(),o(15,"option",118),d(16,"Bonjour HAP"),l(),m(17,da,3,3,"option",119),l(),m(18,pa,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,9,"settings.mdns_advertiser")),i(4),h(r(7,11,"settings.mdns_advertiser_help")),i(3),_("formControl",t.hbMDnsFormControl),f("aria-label",r(10,13,"settings.mdns_advertiser")),i(2),u(t.showAvahiMdnsOption()?11:-1),i(2),C(" Ciao ",t.showAvahiMdnsOption?"":"("+r(14,15,"settings.mdns_advertiser_rec")+")"," "),i(4),u(t.showResolvedMdnsOption()?17:-1),i(),u(t.hbMDnsIsSaving()?18:-1)}}function ma(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ua(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",120),s(10,"translate"),m(11,ma,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,8,"settings.network.port_hb")),i(4),h(r(7,10,"settings.network.port_hb_desc")),i(3),Q("is-invalid",t.hbPortIsInvalid()),_("formControl",t.hbPortFormControl),f("aria-label",r(10,12,"settings.network.port_hb")),i(2),u(t.hbPortIsSaving()?11:-1)}}function _a(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ga(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",120),s(10,"translate"),m(11,_a,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,8,"settings.network.port_start")),i(4),h(r(7,10,"settings.network.port_start_desc")),i(3),Q("is-invalid",t.hbStartPortIsInvalid()),_("formControl",t.hbStartPortFormControl),f("aria-label",r(10,12,"settings.network.port_start")),i(2),u(t.hbStartPortIsSaving()?11:-1)}}function ha(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ca(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",120),s(10,"translate"),m(11,ha,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,8,"settings.network.port_end")),i(4),h(r(7,10,"settings.network.port_end_desc")),i(3),Q("is-invalid",t.hbEndPortIsInvalid()),_("formControl",t.hbEndPortFormControl),f("aria-label",r(10,12,"settings.network.port_end")),i(2),u(t.hbEndPortIsSaving()?11:-1)}}function fa(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function va(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ba(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br")(5,"small",121),s(6,"translate"),m(7,fa,5,3),l(),o(8,"div",23),c(9,"input",122),s(10,"translate"),m(11,va,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,7,"settings.network.host")),i(3),_("innerHtml",r(6,9,"settings.network.host_desc"),et),i(2),u(t.isPwa?7:-1),i(2),_("formControl",t.uiHostFormControl),f("aria-label",r(10,11,"settings.network.host")),i(2),u(t.uiHostIsSaving()?11:-1)}}function xa(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function Sa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ya(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l(),m(8,xa,5,3),l(),o(9,"div",23),c(10,"input",124),s(11,"translate"),m(12,Sa,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,7,"settings.network.proxy")),i(4),h(r(7,9,"settings.network.proxy_desc")),i(2),u(t.isPwa?8:-1),i(2),_("formControl",t.uiProxyHostFormControl),f("aria-label",r(11,11,"settings.network.proxy")),i(2),u(t.uiProxyHostIsSaving()?12:-1)}}function Ia(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function Ea(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function wa(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l(),m(8,Ia,5,3),l(),o(9,"div",23),c(10,"input",125),s(11,"translate"),m(12,Ea,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,9,"settings.network.port_ui")),i(4),h(r(7,11,"settings.network.port_ui_desc")),i(2),u(t.isPwa?8:-1),i(2),Q("is-invalid",t.uiPortIsInvalid()),_("formControl",t.uiPortFormControl),f("aria-label",r(11,13,"settings.network.port_ui")),i(2),u(t.uiPortIsSaving()?12:-1)}}function ka(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123)(3,"span",93),s(4,"translate"),l()),e&2&&(i(3),_("innerHtml",r(4,1,"settings.warning_webroot"),et))}function Ta(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123)(3,"span",93),s(4,"translate"),l()),e&2&&(i(3),_("innerHtml",r(4,1,"settings.warning_pwa"),et))}function Ba(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function $a(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),o(4,"span",92),d(5),s(6,"translate"),l(),c(7,"br")(8,"small",121),s(9,"translate"),m(10,ka,5,3)(11,Ta,5,3),l(),o(12,"div",23),c(13,"input",126),s(14,"translate"),m(15,Ba,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,8,"settings.network.webroot")," "),i(3),h(r(6,10,"common.labels.beta")),i(3),_("innerHtml",r(9,12,"settings.network.webroot_desc"),et),i(2),u(t.webrootSettingDisabledAccess?10:t.isPwa?11:-1),i(3),_("formControl",t.uiWebrootFormControl),f("aria-label",r(14,14,"settings.network.webroot")),i(2),u(t.uiWebrootIsSaving()?15:-1)}}function Fa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ma(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),o(4,"span",92),d(5),s(6,"translate"),l(),c(7,"br"),o(8,"small",85),d(9),s(10,"translate"),l()(),o(11,"div",80)(12,"div",81),c(13,"input",127),s(14,"translate"),c(15,"label",128),l(),m(16,Fa,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,7,"settings.network.mdns_advertise")," "),i(3),h(r(6,9,"common.labels.beta")),i(4),h(r(10,11,"settings.network.mdns_advertise_help")),i(4),_("formControl",t.enableMdnsAdvertiseFormControl),f("aria-label",r(14,13,"settings.network.mdns_advertise")),i(3),u(t.enableMdnsAdvertiseIsSaving()?16:-1)}}function Pa(e,p){if(e&1&&(o(0,"ul",109),m(1,ra,13,11,"li",22),m(2,ca,19,17,"li",21),m(3,ua,12,14,"li",21),m(4,ga,12,14,"li",21),m(5,Ca,12,14,"li",21),m(6,ba,12,13,"li",21),m(7,ya,13,13,"li",21),m(8,wa,13,15,"li",21),m(9,$a,16,16,"li",21),m(10,Ma,17,15,"li",22),l()),e&2){let t=g(3);i(),u(t.isItemHidden("setting-interfaces")?-1:1),i(),u(t.isItemHidden("setting-mdns")?-1:2),i(),u(t.isItemHidden("setting-port-hb")?-1:3),i(),u(t.isItemHidden("setting-port-range")?-1:4),i(),u(t.isItemHidden("setting-port-end")?-1:5),i(),u(t.isItemHidden("setting-network-host")?-1:6),i(),u(t.isItemHidden("setting-network-proxy")?-1:7),i(),u(t.isItemHidden("setting-ui-port-network")?-1:8),i(),u(t.isItemHidden("setting-webroot-network")?-1:9),i(),u(t.isItemHidden("setting-mdns-advertise")?-1:10)}}function Ra(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("network"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,Pa,11,10,"ul",109),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().network?"true":"false")("aria-controls","fieldsNetwork"),i(2),D(A(8,tt,t.showFields().network,!t.showFields().network)),i(),C(" ",r(5,6,"settings.network.title_network")," "),i(2),u(t.showFields().network?6:-1)}}function Da(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Va(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),o(4,"span",92),d(5),s(6,"translate"),l(),c(7,"br"),o(8,"small",85),d(9),s(10,"translate"),l()(),o(11,"div",80)(12,"div",81),c(13,"input",131),s(14,"translate"),c(15,"label",132),l(),m(16,Da,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,7,"settings.matter.enabled")," "),i(3),h(r(6,9,"common.labels.beta")),i(4),h(r(10,11,"settings.matter.enabled_desc")),i(4),_("formControl",t.matterEnabledFormControl),f("aria-label",r(14,13,"settings.matter.enabled")),i(3),u(t.matterEnabledIsSaving()?16:-1)}}function Aa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Na(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",133),s(10,"translate"),m(11,Aa,1,1,"i",25),l()()),e&2){let t=g(5);_("@smoothHide",void 0),i(2),C(" ",r(3,8,"settings.matter.port")),i(4),h(r(7,10,"settings.matter.port_desc")),i(3),Q("is-invalid",t.matterPortIsInvalid()),_("formControl",t.matterPortFormControl),f("aria-label",r(10,12,"settings.matter.port")),i(2),u(t.matterPortIsSaving()?11:-1)}}function Ha(e,p){if(e&1&&m(0,Na,12,14,"li",21),e&2){let t=g(4);u(t.isItemHidden("setting-matter-port")?-1:0)}}function La(e,p){if(e&1&&(o(0,"p",129),d(1),s(2,"translate"),l(),o(3,"ul",130),m(4,Va,17,15,"li",22),m(5,Ha,1,1),l()),e&2){let t=g(3);i(),h(r(2,3,"settings.matter.desc")),i(3),u(t.isItemHidden("setting-matter-enabled")?-1:4),i(),u(t.matterEnabledFormControl.value?5:-1)}}function Oa(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("matter"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,La,6,5),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().matter?"true":"false")("aria-controls","fieldsMatter"),i(2),D(A(8,tt,t.showFields().matter,!t.showFields().matter)),i(),C(" ",r(5,6,"settings.matter.title")," "),i(2),u(t.showFields().matter?6:-1)}}function za(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ua(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",135),s(10,"translate"),m(11,za,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,8,"settings.terminal.log_max")),i(4),h(r(7,10,"settings.terminal.log_max_desc")),i(3),Q("is-invalid",t.hbLogSizeIsInvalid()),_("formControl",t.hbLogSizeFormControl),f("aria-label",r(10,12,"settings.terminal.log_max")),i(2),u(t.hbLogSizeIsSaving()?11:-1)}}function Wa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ka(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",136),s(10,"translate"),m(11,Wa,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,8,"settings.terminal.log_truncate")),i(4),h(r(7,10,"settings.terminal.log_truncate_desc")),i(3),Q("is-invalid",t.hbLogTruncateIsInvalid()),_("formControl",t.hbLogTruncateFormControl),f("aria-label",r(10,12,"settings.terminal.log_truncate")),i(2),u(t.hbLogTruncateIsSaving()?11:-1)}}function ja(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ga(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",80)(9,"div",81),c(10,"input",137),s(11,"translate"),c(12,"label",138),l(),m(13,ja,1,1,"i",25),l()()),e&2){let t=g(5);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.terminal.persistence")),i(4),h(r(7,8,"settings.terminal.persistence_help")),i(4),_("formControl",t.uiTerminalPersistenceFormControl),f("aria-label",r(11,10,"settings.terminal.persistence")),i(3),u(t.uiTerminalPersistenceIsSaving()?13:-1)}}function Qa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function qa(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",80)(9,"div",81),c(10,"input",139),s(11,"translate"),c(12,"label",140),l(),m(13,Qa,1,1,"i",25),l()()),e&2){let t=g(5);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.terminal.warning")),i(4),h(r(7,8,"settings.terminal.warning_help")),i(4),_("formControl",t.uiTerminalHideWarningFormControl),f("aria-label",r(11,10,"settings.terminal.warning")),i(3),u(t.uiTerminalHideWarningIsSaving()?13:-1)}}function Ja(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ya(e,p){if(e&1&&(o(0,"li",21)(1,"div",141)(2,"span"),d(3),s(4,"translate"),l(),o(5,"div",142),d(6),s(7,"translate"),l()(),o(8,"div",23),c(9,"input",143),s(10,"translate"),m(11,Ja,1,1,"i",25),l()()),e&2){let t=g(6);_("@smoothHide",void 0),i(3),h(r(4,8,"settings.terminal.buffer_size")),i(3),h(r(7,10,"settings.terminal.buffer_size_help")),i(3),Q("is-invalid",t.uiTerminalBufferSizeIsInvalid()),_("formControl",t.uiTerminalBufferSizeFormControl),f("aria-label",r(10,12,"settings.terminal.buffer_size")),i(2),u(t.uiTerminalBufferSizeIsSaving()?11:-1)}}function Xa(e,p){if(e&1&&m(0,Ya,12,14,"li",21),e&2){let t=g(5);u(t.isItemHidden("setting-terminal-buffer")?-1:0)}}function Za(e,p){if(e&1&&(m(0,Ga,14,12,"li",22),m(1,qa,14,12,"li",22),m(2,Xa,1,1)),e&2){let t=g(4);u(t.isItemHidden("setting-terminal-persistence")?-1:0),i(),u(t.uiTerminalPersistenceFormControl.value?-1:1),i(),u(t.uiTerminalPersistenceFormControl.value?2:-1)}}function to(e,p){if(e&1&&(o(0,"ul",134),m(1,Ua,12,14,"li",21),m(2,Ka,12,14,"li",21),m(3,Za,3,3),l()),e&2){let t=g(3);i(),u(t.isItemHidden("setting-terminal-log-max")?-1:1),i(),u(t.hbLogSizeFormControl.value>0?2:-1),i(),u(t.enableTerminalAccess?3:-1)}}function eo(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("terminal"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,to,4,3,"ul",134),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().terminal?"true":"false")("aria-controls","fieldsTerminal"),i(2),D(A(8,tt,t.showFields().terminal,!t.showFields().terminal)),i(),C(" ",r(5,6,"settings.network.title_terminal")," "),i(2),u(t.showFields().terminal?6:-1)}}function io(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function no(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",80)(9,"div",81),c(10,"input",145),s(11,"translate"),c(12,"label",146),l(),m(13,io,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.security.auth")),i(4),h(r(7,8,"settings.security.auth_desc")),i(4),_("formControl",t.uiAuthFormControl),f("aria-label",r(11,10,"settings.security.auth")),i(3),u(t.uiAuthIsSaving()?13:-1)}}function ao(e,p){e&1&&c(0,"i",149),e&2&&_("@fadeInOut",void 0)}function oo(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),o(4,"span",92),d(5),s(6,"translate"),l(),c(7,"br"),o(8,"small",85),d(9),s(10,"translate"),l()(),o(11,"div",80)(12,"div",81),c(13,"input",147),s(14,"translate"),c(15,"label",148),l(),m(16,ao,1,1,"i",149),l()()),e&2){let t=g(5);_("@smoothHide",void 0),i(2),C(" ",r(3,7,"settings.startup.session_inactivity_based")," "),i(3),h(r(6,9,"common.labels.beta")),i(4),h(r(10,11,"settings.startup.session_inactivity_based_desc")),i(4),_("formControl",t.uiSessionTimeoutInactivityBasedFormControl),f("aria-label",r(14,13,"settings.startup.session_inactivity_based")),i(3),u(t.uiSessionTimeoutInactivityBasedIsSaving()?16:-1)}}function so(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ro(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",23)(9,"div",150)(10,"div",80),c(11,"input",151),s(12,"translate"),o(13,"label",152),d(14),s(15,"translate"),l()(),o(16,"div",80),c(17,"input",153),s(18,"translate"),o(19,"label",152),d(20),s(21,"translate"),l()(),o(22,"div",80),c(23,"input",154),s(24,"translate"),o(25,"label",152),d(26),s(27,"translate"),l()()(),m(28,so,1,1,"i",25),l()()),e&2){let t=g(5);_("@smoothHide",void 0),i(2),C(" ",r(3,19,"settings.startup.session")),i(4),h(r(7,21,"settings.startup.session_desc")),i(5),Q("is-invalid",t.uiSessionTimeoutIsInvalid()),_("formControl",t.uiSessionTimeoutDaysFormControl),f("aria-label",r(12,23,"settings.startup.session_days")),i(3),h(r(15,25,"settings.startup.session_days")),i(3),Q("is-invalid",t.uiSessionTimeoutIsInvalid()),_("formControl",t.uiSessionTimeoutHoursFormControl),f("aria-label",r(18,27,"settings.startup.session_hours")),i(3),h(r(21,29,"settings.startup.session_hours")),i(3),Q("is-invalid",t.uiSessionTimeoutIsInvalid()),_("formControl",t.uiSessionTimeoutMinutesFormControl),f("aria-label",r(24,31,"settings.startup.session_minutes")),i(3),h(r(27,33,"settings.startup.session_minutes")),i(2),u(t.uiSessionTimeoutIsSaving()?28:-1)}}function lo(e,p){if(e&1&&(m(0,oo,17,15,"li",22),m(1,ro,29,35,"li",21)),e&2){let t=g(4);u(t.isItemHidden("setting-session-inactivity")?-1:0),i(),u(t.isItemHidden("setting-security-session")?-1:1)}}function po(e,p){if(e&1&&(o(0,"small",85),c(1,"span",93),s(2,"translate"),l()),e&2){let t=g(5);i(),_("innerHtml",q(2,1,"settings.security.https_raspbian",X(4,At,t.linkRaspbianSsl)),et)}}function co(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function mo(e,p){if(e&1&&(o(0,"small",85),d(1),s(2,"translate"),l(),m(3,co,5,3)),e&2){let t=g(5);i(),h(r(2,2,"settings.security.https_desc")),i(2),u(t.isPwa?3:-1)}}function uo(e,p){e&1&&(o(0,"option",157),d(1),s(2,"translate"),l()),e&2&&(i(),h(r(2,1,"settings.security.https_selfsigned")))}function _o(e,p){if(e&1){let t=B();o(0,"button",161),s(1,"translate"),s(2,"translate"),T("click",function(){w(t);let a=g(5);return k(a.validateSsl())}),c(3,"i",162),l()}e&2&&(_("title",at(r(1,3,"settings.security.ssl_validate"))),f("aria-label",r(2,5,"settings.security.ssl_validate")))}function go(e,p){if(e&1&&(o(0,"li",21)(1,"span"),d(2),s(3,"translate"),c(4,"br"),m(5,po,3,6,"small",85)(6,mo,4,4),l(),o(7,"div",23)(8,"select",155),s(9,"translate"),o(10,"option",156),d(11),s(12,"translate"),l(),m(13,uo,3,3,"option",157),o(14,"option",158),d(15),s(16,"translate"),l(),o(17,"option",159),d(18),s(19,"translate"),l()(),m(20,_o,4,7,"button",160),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,11,"settings.security.https")),i(3),u(t.runningOnRaspbianImage?5:6),i(3),_("formControl",t.uiSslTypeFormControl)("hidden",t.runningOnRaspbianImage),f("aria-label",r(9,13,"settings.security.https")),i(3),h(r(12,15,"accessories.control.off")),i(2),u(t.runningOnRaspbianImage?-1:13),i(2),h(r(16,17,"settings.security.https_keycert")),i(3),h(r(19,19,"settings.security.https_pfx")),i(2),u(t.uiSslTypeFormControl.value!=="off"?20:-1)}}function ho(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function Co(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function fo(e,p){if(e&1){let t=B();o(0,"li",21)(1,"span"),d(2),s(3,"translate"),o(4,"span",92),d(5),s(6,"translate"),l(),c(7,"br"),o(8,"small",85),d(9),s(10,"translate"),l()(),m(11,ho,5,3),o(12,"div",23),c(13,"input",163),s(14,"translate"),o(15,"button",164),s(16,"translate"),s(17,"translate"),T("click",function(){w(t);let a=g(4);return k(a.generateSelfSigned("keycert"))}),c(18,"i",165),l(),o(19,"button",166),s(20,"translate"),s(21,"translate"),T("click",function(){w(t);let a=g(4);return k(a.generateSelfSigned("selfsigned"))}),c(22,"i",167),l(),m(23,Co,1,1,"i",25),l()()}if(e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,14,"settings.security.selfsigned_hostnames")," "),i(3),h(r(6,16,"common.labels.beta")),i(4),h(r(10,18,"settings.security.selfsigned_hostnames_desc")),i(2),u(t.isPwa?11:-1),i(2),_("formControl",t.uiSslSelfSignedHostnamesFormControl),f("aria-label",r(14,20,"settings.security.selfsigned_hostnames")),i(2),_("title",at(r(16,22,"settings.security.selfsigned_generate_keycert"))),f("aria-label",r(17,24,"settings.security.selfsigned_generate_keycert")),i(4),_("title",at(r(20,26,"settings.security.selfsigned_generate_selfsigned"))),f("aria-label",r(21,28,"settings.security.selfsigned_generate_selfsigned")),i(4),u(t.uiSslSelfSignedHostnamesIsSaving()?23:-1)}}function vo(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function bo(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function xo(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function So(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function yo(e,p){if(e&1){let t=B();o(0,"li",21)(1,"span"),d(2),s(3,"translate"),l(),m(4,xo,5,3),o(5,"div",168)(6,"button",173),s(7,"translate"),s(8,"translate"),T("click",function(){w(t);let a=g(6);return k(a.triggerKeyCertSelect())}),c(9,"i",170),l(),c(10,"input",174),s(11,"translate"),m(12,So,1,1,"i",25),l()()}if(e&2){let t=g(6);_("@smoothHide",void 0),i(2),h(r(3,9,"settings.security.cert")),i(2),u(t.isPwa?4:-1),i(2),_("title",at(r(7,11,"settings.security.ssl_upload_keycert_aria"))),f("aria-label",r(8,13,"settings.security.ssl_upload_keycert_aria")),i(4),_("formControl",t.uiSslCertFormControl),f("aria-label",r(11,15,"settings.security.cert")),i(2),u(t.uiSslCertIsSaving()?12:-1)}}function Io(e,p){if(e&1){let t=B();o(0,"li",21)(1,"span"),d(2),s(3,"translate"),l(),m(4,vo,5,3),o(5,"div",168)(6,"button",169),s(7,"translate"),s(8,"translate"),T("click",function(){w(t);let a=g(5);return k(a.triggerKeyCertSelect())}),c(9,"i",170),l(),o(10,"input",171,1),T("change",function(){w(t);let a=Mt(11),y=g(5);return k(y.onSslKeyCertChange(a.files))}),l(),c(12,"input",172),s(13,"translate"),m(14,bo,1,1,"i",25),l()(),m(15,yo,13,17,"li",21)}if(e&2){let t=g(5);_("@smoothHide",void 0),i(2),h(r(3,10,"settings.security.key")),i(2),u(t.isPwa?4:-1),i(2),_("title",at(r(7,12,"settings.security.ssl_upload_keycert_aria"))),f("aria-label",r(8,14,"settings.security.ssl_upload_keycert_aria")),i(6),_("formControl",t.uiSslKeyFormControl),f("aria-label",r(13,16,"settings.security.key")),i(2),u(t.uiSslKeyIsSaving()?14:-1),i(),u(t.isItemHidden("setting-security-cert")?-1:15)}}function Eo(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function wo(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ko(e,p){e&1&&(c(0,"br"),o(1,"small",85),c(2,"i",123),d(3),s(4,"translate"),l()),e&2&&(i(3),C(" ",r(4,1,"settings.warning_pwa")," "))}function To(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Bo(e,p){if(e&1){let t=B();o(0,"li",21)(1,"span"),d(2),s(3,"translate"),l(),m(4,ko,5,3),o(5,"div",23)(6,"input",178),s(7,"translate"),T("focus",function(){w(t);let a=g(6);return k(a.showPfxPassphrase=!0)})("blur",function(){w(t);let a=g(6);return k(a.showPfxPassphrase=!1)}),l(),m(8,To,1,1,"i",25),l()()}if(e&2){let t=g(6);_("@smoothHide",void 0),i(2),h(r(3,7,"settings.security.pass")),i(2),u(t.isPwa?4:-1),i(2),_("type",t.showPfxPassphrase?"text":"password")("formControl",t.uiSslPassphraseFormControl),f("aria-label",r(7,9,"settings.security.pass")),i(2),u(t.uiSslPassphraseIsSaving()?8:-1)}}function $o(e,p){if(e&1){let t=B();o(0,"li",21)(1,"span"),d(2),s(3,"translate"),l(),m(4,Eo,5,3),o(5,"div",168)(6,"button",175),s(7,"translate"),s(8,"translate"),T("click",function(){w(t);let a=g(5);return k(a.triggerPfxSelect())}),c(9,"i",170),l(),o(10,"input",176,2),T("change",function(){w(t);let a=Mt(11),y=g(5);return k(y.onSslPfxChange(a.files))}),l(),c(12,"input",177),s(13,"translate"),m(14,wo,1,1,"i",25),l()(),m(15,Bo,9,11,"li",21)}if(e&2){let t=g(5);_("@smoothHide",void 0),i(2),h(r(3,10,"settings.security.pfx")),i(2),u(t.isPwa?4:-1),i(2),_("title",at(r(7,12,"settings.security.ssl_upload_pfx_aria"))),f("aria-label",r(8,14,"settings.security.ssl_upload_pfx_aria")),i(6),_("formControl",t.uiSslPfxFormControl),f("aria-label",r(13,16,"settings.security.pfx")),i(2),u(t.uiSslPfxIsSaving()?14:-1),i(),u(t.isItemHidden("setting-security-pass")?-1:15)}}function Fo(e,p){if(e&1&&(m(0,Io,16,18),m(1,$o,16,18)),e&2){let t=g(4);u(t.uiSslTypeFormControl.value==="keycert"?0:-1),i(),u(t.uiSslTypeFormControl.value==="pfx"?1:-1)}}function Mo(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"button",27),s(9,"translate"),T("click",function(){w(t);let a=g(4);return k(a.accessoryUiControl())}),c(10,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",r(3,4,"settings.security.ui_control")),i(4),h(r(7,6,"settings.security.ui_control_desc")),i(2),f("aria-label",r(9,8,"settings.security.ui_control")))}function Po(e,p){if(e&1&&(o(0,"ul",144),m(1,no,14,12,"li",22),m(2,lo,2,2),m(3,go,21,21,"li",21),m(4,fo,24,30,"li",21),m(5,Fo,2,2),m(6,Mo,11,10,"li",22),l()),e&2){let t=g(3);i(),u(t.isItemHidden("setting-security-auth")?-1:1),i(),u(t.uiAuthFormControl.value?2:-1),i(),u(t.isItemHidden("setting-security-https")?-1:3),i(),u(t.uiSslTypeFormControl.value==="selfsigned"?4:-1),i(),u(t.runningOnRaspbianImage?-1:5),i(),u(t.isItemHidden("setting-security-control")?-1:6)}}function Ro(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("security"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,Po,7,6,"ul",144),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().security?"true":"false")("aria-controls","fieldsSecurity"),i(2),D(A(8,tt,t.showFields().security,!t.showFields().security)),i(),C(" ",r(5,6,"settings.network.title_security")," "),i(2),u(t.showFields().security?6:-1)}}function Do(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Vo(e,p){if(e&1&&(o(0,"li",22)(1,"span"),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"div",80)(9,"div",81),c(10,"input",180),s(11,"translate"),c(12,"label",181),l(),m(13,Do,1,1,"i",25),l()()),e&2){let t=g(4);_("@smoothHide",void 0),i(2),C(" ",r(3,6,"settings.accessory.debug")),i(4),h(r(7,8,"settings.accessory.debug_desc")),i(4),_("formControl",t.uiAccDebugFormControl),f("aria-label",r(11,10,"settings.accessory.debug")),i(3),u(t.uiAccDebugIsSaving()?13:-1)}}function Ao(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"button",27),s(9,"translate"),T("click",function(){w(t);let a=g(4);return k(a.removeSingleCachedAccessories())}),c(10,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",r(3,4,"reset.accessory_ind.title")),i(4),h(r(7,6,"reset.accessory_ind.desc")),i(2),f("aria-label",r(9,8,"reset.accessory_ind.title")))}function No(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"button",27),s(9,"translate"),T("click",function(){w(t);let a=g(4);return k(a.removeBridgeAccessories())}),c(10,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",r(3,4,"reset.bridge_accessories.title")),i(4),h(r(7,6,"reset.bridge_accessories.desc")),i(2),f("aria-label",r(9,8,"reset.accessory_all.title")))}function Ho(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"button",27),s(9,"translate"),T("click",function(){w(t);let a=g(4);return k(a.removeAllCachedAccessories())}),c(10,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",r(3,4,"reset.accessory_all.title")),i(4),h(r(7,6,"reset.accessory_all.desc")),i(2),f("aria-label",r(9,8,"reset.accessory_all.title")))}function Lo(e,p){if(e&1&&(o(0,"p",129),d(1),s(2,"translate"),l(),o(3,"ul",179),m(4,Vo,14,12,"li",22),m(5,Ao,11,10,"li",22),m(6,No,11,10,"li",22),m(7,Ho,11,10,"li",22),l()),e&2){let t=g(3);i(),h(r(2,5,"settings.cache.desc")),i(3),u(t.isItemHidden("setting-accessory-debug")?-1:4),i(),u(t.isItemHidden("setting-reset-accessory-ind")?-1:5),i(),u(t.isItemHidden("setting-reset-bridge-accessories")?-1:6),i(),u(t.isItemHidden("setting-reset-accessory-all")?-1:7)}}function Oo(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("cache"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,Lo,8,7),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().cache?"true":"false")("aria-controls","fieldsCache"),i(2),D(A(8,tt,t.showFields().cache,!t.showFields().cache)),i(),C(" ",r(5,6,"menu.label_accessories")," "),i(2),u(t.showFields().cache?6:-1)}}function zo(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),c(4,"br"),o(5,"small",85),d(6),s(7,"translate"),l()(),o(8,"button",27),s(9,"translate"),T("click",function(){w(t);let a=g(4);return k(a.unpairAccessory())}),c(10,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",r(3,4,"reset.bridge_ind.title")),i(4),h(r(7,6,"reset.bridge_ind.desc")),i(2),f("aria-label",r(9,8,"reset.bridge_ind.title")))}function Uo(e,p){if(e&1){let t=B();o(0,"li",22)(1,"span",26),d(2),s(3,"translate"),s(4,"titlecase"),c(5,"br"),o(6,"small",85),d(7),s(8,"translate"),l()(),o(9,"button",27),s(10,"translate"),T("click",function(){w(t);let a=g(4);return k(a.resetHomebridgeState())}),c(11,"i",28),l()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",r(4,6,r(3,4,"reset.bridge_all.title"))),i(5),h(r(8,8,"reset.bridge_all.desc")),i(2),f("aria-label",r(10,10,"reset.bridge_all.title")))}function Wo(e,p){if(e&1&&(o(0,"p",129),d(1),s(2,"translate"),l(),o(3,"ul",182),m(4,zo,11,10,"li",22),m(5,Uo,12,12,"li",22),l()),e&2){let t=g(3);i(),h(r(2,3,"reset.bridges.desc")),i(3),u(t.isItemHidden("setting-reset-bridge-ind")?-1:4),i(),u(t.isItemHidden("setting-reset-bridge-all")?-1:5)}}function Ko(e,p){if(e&1){let t=B();o(0,"div",15)(1,"div",17),T("click",function(){w(t);let a=g(2);return k(a.toggleSection("reset"))}),o(2,"h5",18),c(3,"i",19),d(4),s(5,"translate"),l()(),m(6,Wo,6,5),l()}if(e&2){let t=g(2);i(),f("aria-expanded",t.showFields().reset?"true":"false")("aria-controls","fieldsReset"),i(2),D(A(8,tt,t.showFields().reset,!t.showFields().reset)),i(),C(" ",r(5,6,"reset.bridges.title")," "),i(2),u(t.showFields().reset?6:-1)}}function jo(e,p){if(e&1&&(m(0,fn,7,11,"div",15),m(1,Pn,7,11,"div",15),m(2,aa,7,11,"div",15),m(3,Ra,7,11,"div",15),m(4,Oa,7,11,"div",15),m(5,eo,7,11,"div",15),m(6,Ro,7,11,"div",15),m(7,Oo,7,11,"div",15),m(8,Ko,7,11,"div",15),c(9,"div",16)),e&2){let t=g();u(t.isSectionVisible("general")?0:-1),i(),u(t.isSectionVisible("display")?1:-1),i(),u(t.isSectionVisible("startup")?2:-1),i(),u(t.isSectionVisible("network")?3:-1),i(),u(t.isMatterSupported&&t.isSectionVisible("matter")?4:-1),i(),u(t.isSectionVisible("terminal")?5:-1),i(),u(t.isSectionVisible("security")?6:-1),i(),u(t.isSectionVisible("cache")?7:-1),i(),u(t.isSectionVisible("reset")?8:-1)}}var ml=(()=>{class e{destroyRef=E(ft);injector=E(Ct);$api=E(U);$modal=E(_t);$notification=E(ue);$router=E(J);$settings=E(Y);$terminal=E(ge);$toastr=E(z);$translate=E(O);searchInput=lt("searchInput",{});sslKeyCertInput=lt("sslKeyCertInput",{});sslPfxInput=lt("sslPfxInput",{});showSearchBar=v(!1,{});searchQuery=v("",{});showFields=v({general:!0,display:!0,startup:!0,network:!0,matter:!0,security:!0,terminal:!0,reset:!0,cache:!0},{});hiddenItems=v({},{});loading=v(!0,{});debugFieldDesc="settings.startup.debug_desc_v1";showAvahiMdnsOption=v(!1,{});showResolvedMdnsOption=v(!1,{});adaptersAvailable=v([],{});adaptersSelected=v([],{});showPfxPassphrase=v(!1,{});hbNameIsInvalid=v(!1,{});hbNameIsSaving=v(!1,{});hbNameFormControl=new M("");uiLangIsSaving=v(!1,{});uiLangFormControl=new M("");uiThemeIsSaving=v(!1,{});uiThemeFormControl=new M("");uiLightIsSaving=v(!1,{});uiLightFormControl=new M("");uiMenuIsSaving=v(!1,{});uiMenuFormControl=new M("");uiTempIsSaving=v(!1,{});uiTempFormControl=new M("");uiAlwaysShowBetasIsSaving=v(!1,{});uiAlwaysShowBetasFormControl=new M(!1);uiTerminalPersistenceIsSaving=v(!1,{});uiTerminalPersistenceFormControl=new M(!1);uiTerminalHideWarningIsSaving=v(!1,{});uiTerminalHideWarningFormControl=new M(!1);uiTerminalBufferSizeIsSaving=v(!1,{});uiTerminalBufferSizeIsInvalid=v(!1,{});uiTerminalBufferSizeFormControl=new M(globalThis.terminal.bufferSize);hbDebugIsSaving=v(!1,{});hbDebugFormControl=new M(!1);hbInsecureIsSaving=v(!1,{});hbInsecureFormControl=new M(!1);hbKeepIsSaving=v(!1,{});hbKeepFormControl=new M(!1);hbEnvDebugIsSaving=v(!1,{});hbEnvDebugFormControl=new M("");hbEnvNodeIsSaving=v(!1,{});hbEnvNodeFormControl=new M("");hbLogSizeIsInvalid=v(!1,{});hbLogSizeIsSaving=v(!1,{});hbLogSizeFormControl=new M(-1);hbLogTruncateIsInvalid=v(!1,{});hbLogTruncateIsSaving=v(!1,{});hbLogTruncateFormControl=new M(0);hbMDnsIsSaving=v(!1,{});hbMDnsFormControl=new M("");enableMdnsAdvertiseFormControl=new M(!1);enableMdnsAdvertiseIsSaving=v(!1,{});hbPortIsInvalid=v(!1,{});hbPortIsSaving=v(!1,{});hbPortFormControl=new M(0);uiPortIsInvalid=v(!1,{});uiPortIsSaving=v(!1,{});uiPortFormControl=new M(0);hbStartPortIsInvalid=v(!1,{});hbStartPortIsSaving=v(!1,{});hbStartPortFormControl=new M(0);hbEndPortIsInvalid=v(!1,{});hbEndPortIsSaving=v(!1,{});hbEndPortFormControl=new M(0);uiHostIsSaving=v(!1,{});uiHostFormControl=new M("");uiWebrootIsSaving=v(!1,{});uiWebrootFormControl=new M("");uiProxyHostIsSaving=v(!1,{});uiProxyHostFormControl=new M("");uiAuthIsSaving=v(!1,{});uiAuthFormControl=new te(!0);uiSessionTimeoutIsInvalid=v(!1,{});uiSessionTimeoutIsSaving=v(!1,{});uiSessionTimeoutDaysFormControl=new M(0);uiSessionTimeoutHoursFormControl=new M(8);uiSessionTimeoutMinutesFormControl=new M(0);uiSessionTimeoutInactivityBasedIsSaving=v(!1,{});uiSessionTimeoutInactivityBasedFormControl=new M(!1);uiSslTypeFormControl=new M("off");uiSslKeyIsSaving=v(!1,{});uiSslKeyFormControl=new M("");uiSslCertIsSaving=v(!1,{});uiSslCertFormControl=new M("");uiSslPfxIsSaving=v(!1,{});uiSslPfxFormControl=new M("");uiSslPassphraseIsSaving=v(!1,{});uiSslPassphraseFormControl=new M("");uiSslSelfSignedHostnamesIsSaving=v(!1,{});uiSslSelfSignedHostnamesFormControl=new M("");hbPackageIsSaving=v(!1,{});hbPackageFormControl=new M("");uiMetricsIsSaving=v(!1,{});uiMetricsFormControl=new M(!0);uiAccDebugIsSaving=v(!1,{});uiAccDebugFormControl=new M(!1);uiTempFileIsSaving=v(!1,{});uiTempFileFormControl=new M("");hbLinuxShutdownIsSaving=v(!1,{});hbLinuxShutdownFormControl=new M("");hbLinuxRestartIsSaving=v(!1,{});hbLinuxRestartFormControl=new M("");scheduledRestartCronIsInvalid=v(!1,{});scheduledRestartCronIsSaving=v(!1,{});scheduledRestartCronFormControl=new M("");matterEnabledIsSaving=v(!1,{});matterEnabledFormControl=new M(!1);matterPortIsInvalid=v(!1,{});matterPortIsSaving=v(!1,{});matterPortFormControl=new M(0);matterConfigCache={};isMatterSupported=this.$settings.isFeatureEnabled("matterSupport");webrootSettingDisabledAccess=!1;isPwa=me();runningOnRaspbianImage=this.$settings.env.runningOnRaspbianImage;restartToastIsShown=!1;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>';linkRaspbianSsl='<a href="https://github.com/homebridge/homebridge-raspbian-image/wiki/SSL-HTTPS-Access" target="_blank" rel="noopener noreferrer"><i class="fa fa-external-link-alt primary-text"></i></a>';linkCron='<a href="https://crontab.guru/" target="_blank" rel="noopener noreferrer"><i class="fa fa-external-link-alt primary-text"></i></a>';toggleSearch(){this.showSearchBar.update(t=>!t),this.showSearchBar()?Nt(this.injector,()=>{Lt(()=>{let t=this.searchInput();t&&t.nativeElement.focus()})}):this.clearSearch()}clearSearch(){this.searchQuery.set(""),this.filterSettings()}filterSettings(){if(this.hiddenItems.set({}),!this.searchQuery())return;let t=this.searchQuery().toLowerCase(),n=this.getItemsContent(),a={};Object.entries(n).forEach(([y,R])=>{R&&R.toLowerCase().includes(t)||(a[y]=!0)}),this.hiddenItems.set(a)}isItemHidden(t){let n=!!this.hiddenItems()[t];return this.searchQuery(),n}isSectionVisible(t){if(!this.searchQuery())return!0;let a={general:["setting-name","setting-backup","setting-restore","setting-users"],display:["setting-lang","setting-theme","setting-lighting","setting-menu","setting-temp","setting-betas","setting-wallpaper"],startup:["setting-debug","setting-insecure","setting-keep","setting-scheduled-restart","setting-metrics-startup","setting-package-path","setting-linux-restart","setting-env-debug-manual","setting-env-node"],network:["setting-interfaces","setting-mdns","setting-port-hb","setting-port-range","setting-port-end","setting-network-host","setting-network-proxy","setting-ui-port-network","setting-webroot-network","setting-mdns-advertise"],matter:["setting-matter-enabled","setting-matter-port"],terminal:["setting-terminal-log-max","setting-terminal-persistence","setting-terminal-buffer"],security:["setting-security-auth","setting-session-inactivity","setting-security-session","setting-security-https","setting-security-cert","setting-security-pass","setting-security-selfsigned-hostnames","setting-security-control"],cache:["setting-accessory-debug","setting-reset-accessory-ind","setting-reset-bridge-accessories","setting-reset-accessory-all"],reset:["setting-reset-bridge-ind","setting-reset-bridge-all"]}[t];return a?a.some(y=>!this.isItemHidden(y)):!0}getItemsContent(){return{"setting-name":this.$translate.instant("settings.name"),"setting-backup":this.$translate.instant("backup.title_backup"),"setting-restore":this.$translate.instant("config.restore.title"),"setting-users":this.$translate.instant("menu.tooltip_user_accounts"),"setting-lang":this.$translate.instant("settings.display.lang"),"setting-theme":this.$translate.instant("settings.display.theme"),"setting-lighting":this.$translate.instant("settings.display.lighting_mode"),"setting-menu":this.$translate.instant("settings.display.menu_mode"),"setting-temp":this.$translate.instant("settings.display.temp_units"),"setting-betas":this.$translate.instant("settings.display.show_betas"),"setting-wallpaper":this.$translate.instant("settings.display.wallpaper"),"setting-debug":this.$translate.instant("settings.startup.debug"),"setting-insecure":this.$translate.instant("settings.startup.insecure"),"setting-keep":this.$translate.instant("settings.startup.keep_accessories"),"setting-scheduled-restart":this.$translate.instant("settings.startup.scheduled_restart"),"setting-metrics-startup":this.$translate.instant("settings.startup.metrics"),"setting-env-debug":this.$translate.instant("settings.startup.env_debug"),"setting-env-debug-manual":"DEBUG","setting-env-node":this.$translate.instant("settings.startup.env_node_options"),"setting-log-size":this.$translate.instant("settings.startup.log_length"),"setting-log-truncate":this.$translate.instant("settings.startup.truncate_log"),"setting-package-path":this.$translate.instant("settings.startup.homebridge_package_path"),"setting-mdns":this.$translate.instant("settings.mdns_advertiser"),"setting-interfaces":this.$translate.instant("settings.network.title_network_interfaces"),"setting-port-hb":this.$translate.instant("settings.network.port_hb"),"setting-port-bridge":this.$translate.instant("settings.network.port.bridge"),"setting-port-range":this.$translate.instant("settings.network.port.start"),"setting-port-end":this.$translate.instant("settings.network.port.end"),"setting-network-host":this.$translate.instant("settings.network.host"),"setting-network-proxy":this.$translate.instant("settings.network.proxy"),"setting-ui-port-network":this.$translate.instant("settings.network.port_ui"),"setting-webroot-network":this.$translate.instant("settings.network.webroot"),"setting-mdns-advertise":this.$translate.instant("settings.network.mdns_advertise"),"setting-matter-enabled":`${this.$translate.instant("settings.matter.title")} ${this.$translate.instant("settings.matter.enabled")} ${this.$translate.instant("settings.matter.enabled_desc")}`,"setting-matter-port":`${this.$translate.instant("settings.matter.title")} ${this.$translate.instant("settings.matter.port")} ${this.$translate.instant("settings.matter.port_desc")}`,"setting-security-auth":this.$translate.instant("settings.security.auth"),"setting-security-session":this.$translate.instant("settings.startup.session"),"setting-security-https":this.$translate.instant("settings.security.https"),"setting-security-cert":this.$translate.instant("settings.security.cert"),"setting-security-pass":this.$translate.instant("settings.security.pass"),"setting-security-selfsigned-hostnames":this.$translate.instant("settings.security.selfsigned_hostnames"),"setting-security-control":this.$translate.instant("settings.security.ui_control"),"setting-ui-port":this.$translate.instant("settings.security.webui_port"),"setting-ui-host":this.$translate.instant("settings.security.webui_host"),"setting-ui-auth":this.$translate.instant("settings.security.webui_auth"),"setting-session-timeout":this.$translate.instant("settings.security.session_timeout"),"setting-session-inactivity":this.$translate.instant("settings.startup.session_inactivity_based"),"setting-proxy":this.$translate.instant("settings.security.webui_proxy_host"),"setting-ssl":this.$translate.instant("settings.security.ssl_key"),"setting-terminal-log-max":this.$translate.instant("settings.terminal.log_max"),"setting-terminal-persistence":this.$translate.instant("settings.terminal.persistence"),"setting-terminal-warning":this.$translate.instant("settings.terminal.hide_warning"),"setting-terminal-buffer":this.$translate.instant("settings.terminal.buffer_size"),"setting-reset-accessory-ind":this.$translate.instant("reset.accessory_ind.title"),"setting-reset-bridge-accessories":this.$translate.instant("reset.bridge_accessories.title"),"setting-reset-accessory-all":this.$translate.instant("reset.accessory_all.title"),"setting-reset-bridge-ind":this.$translate.instant("reset.bridge_ind.title"),"setting-reset-bridge-all":this.$translate.instant("reset.bridge_all.title"),"setting-reset-state":this.$translate.instant("settings.reset.reset_homebridge_state"),"setting-unpair":this.$translate.instant("settings.reset.unpair_bridges"),"setting-metrics":this.$translate.instant("settings.reset.enable_metrics"),"setting-accessory-control":this.$translate.instant("settings.reset.control_panel"),"setting-accessory-debug":this.$translate.instant("settings.accessory.debug"),"setting-temp-files":this.$translate.instant("settings.reset.temp_files"),"setting-linux-shutdown":this.$translate.instant("settings.reset.linux_shutdown"),"setting-linux-restart":this.$translate.instant("settings.reset.linux_restart"),"setting-cache-all":this.$translate.instant("settings.cache.title_clear_cache"),"setting-cache-bridge":this.$translate.instant("settings.cache.title_clear_bridge_cache"),"setting-cache-accessories":this.$translate.instant("settings.cache.title_clear_cached_accessories")}}ngOnInit(){this.initialize()}initialize(){return b(this,null,function*(){let t=this.$translate.instant("menu.label_settings");this.$settings.setPageTitle(t),this.$settings.isFeatureEnabled("childBridgeDebugMode")&&(this.debugFieldDesc="settings.startup.debug_desc_v2"),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.uiSslSelfSignedHostnamesFormControl.disable()),this.runningOnRaspbianImage&&this.uiSslTypeFormControl.disable(),this.hbNameFormControl.patchValue(this.$settings.env.homebridgeInstanceName,{emitEvent:!1}),this.hbNameFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbNameSave(I)),this.uiLangFormControl.patchValue(this.$settings.env.lang,{emitEvent:!1}),this.uiLangFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiLangSave(I)),this.uiThemeFormControl.patchValue(this.$settings.theme,{emitEvent:!1}),this.uiThemeFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiThemeSave(I)),this.uiLightFormControl.patchValue(this.$settings.lightingMode,{emitEvent:!1}),this.uiLightFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiLightSave(I)),this.uiMenuFormControl.patchValue(this.$settings.menuMode,{emitEvent:!1}),this.uiMenuFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiMenuSave(I)),this.uiTempFormControl.patchValue(this.$settings.env.temperatureUnits,{emitEvent:!1}),this.uiTempFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiTempSave(I)),this.uiAlwaysShowBetasFormControl.patchValue(this.$settings.env.plugins?.alwaysShowBetas||!1,{emitEvent:!1}),this.uiAlwaysShowBetasFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiAlwaysShowBetasSave(I)),this.uiTerminalPersistenceFormControl.patchValue(this.$settings.env.terminal?.persistence,{emitEvent:!1}),this.uiTerminalPersistenceFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiTerminalPersistenceSave(I)),this.uiTerminalHideWarningFormControl.patchValue(this.$settings.env.terminal?.hideWarning,{emitEvent:!1}),this.uiTerminalHideWarningFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiTerminalHideWarningSave(I)),this.uiTerminalBufferSizeFormControl.patchValue(this.$settings.env.terminal?.bufferSize,{emitEvent:!1}),this.uiTerminalBufferSizeFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiTerminalBufferSizeSave(I)),this.hbLogSizeFormControl.patchValue(this.$settings.env.log?.maxSize,{emitEvent:!1}),this.hbLogSizeFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbLogSizeSave(I)),this.hbLogTruncateFormControl.patchValue(this.$settings.env.log?.truncateSize,{emitEvent:!1}),this.hbLogTruncateFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbLogTruncateSave(I)),this.uiPortFormControl.patchValue(this.$settings.env.port,{emitEvent:!1}),this.uiPortFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiPortSave(I)),this.uiAuthFormControl.patchValue(this.$settings.formAuth,{emitEvent:!1}),this.uiAuthFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiAuthSave(I));let n=this.$settings.sessionTimeout,a=Math.floor(n/86400),y=Math.floor(n%86400/3600),R=Math.floor(n%3600/60);this.uiSessionTimeoutDaysFormControl.patchValue(a,{emitEvent:!1}),this.uiSessionTimeoutHoursFormControl.patchValue(y,{emitEvent:!1}),this.uiSessionTimeoutMinutesFormControl.patchValue(R,{emitEvent:!1}),this.uiSessionTimeoutDaysFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(()=>this.uiSessionTimeoutSaveFromFields()),this.uiSessionTimeoutHoursFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(()=>this.uiSessionTimeoutSaveFromFields()),this.uiSessionTimeoutMinutesFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(()=>this.uiSessionTimeoutSaveFromFields()),this.uiSessionTimeoutInactivityBasedFormControl.patchValue(this.$settings.sessionTimeoutInactivityBased||!1,{emitEvent:!1}),this.uiSessionTimeoutInactivityBasedFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiSessionTimeoutInactivityBasedSave(I)),this.uiSslKeyFormControl.patchValue(this.$settings.env.ssl?.key||"",{emitEvent:!1}),this.uiSslKeyFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiSslKeySave(I)),this.uiSslCertFormControl.patchValue(this.$settings.env.ssl?.cert||"",{emitEvent:!1}),this.uiSslCertFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiSslCertSave(I)),this.uiSslPfxFormControl.patchValue(this.$settings.env.ssl?.pfx||"",{emitEvent:!1}),this.uiSslPfxFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiSslPfxSave(I)),this.uiSslPassphraseFormControl.patchValue(this.$settings.env.ssl?.passphrase||"",{emitEvent:!1}),this.uiSslPassphraseFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiSslPassphraseSave(I)),this.uiSslSelfSignedHostnamesFormControl.patchValue(this.$settings.env.ssl?.selfSignedHostnames?.join(", ")||"localhost, 127.0.0.1",{emitEvent:!1}),this.uiSslSelfSignedHostnamesFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiSslSelfSignedHostnamesSave(I)),this.uiSslTypeFormControl.patchValue(this.$settings.env.ssl?.selfSigned?"selfsigned":this.uiSslKeyFormControl.value||this.uiSslCertFormControl.value?"keycert":this.uiSslPfxFormControl.value||this.uiSslPassphraseFormControl.value?"pfx":"off",{emitEvent:!1}),this.uiSslTypeFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiSslTypeSave(I)),this.uiHostFormControl.patchValue(this.$settings.host||"",{emitEvent:!1}),this.uiHostFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiHostSave(I)),this.uiWebrootFormControl.patchValue(this.$settings.webroot||"",{emitEvent:!1}),this.uiWebrootFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiWebrootSave(I)),this.uiProxyHostFormControl.patchValue(this.$settings.proxyHost||"",{emitEvent:!1}),this.uiProxyHostFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiProxyHostSave(I)),this.hbPackageFormControl.patchValue(this.$settings.env.homebridgePackagePath||"",{emitEvent:!1}),this.hbPackageFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbPackageSave(I)),this.uiMetricsFormControl.patchValue(!this.$settings.env.disableServerMetricsMonitoring,{emitEvent:!1}),this.uiMetricsFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiMetricsSave(I)),this.enableMdnsAdvertiseFormControl.patchValue(this.$settings.env.enableMdnsAdvertise||!1,{emitEvent:!1}),this.enableMdnsAdvertiseFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.enableMdnsAdvertiseSave(I)),this.uiAccDebugFormControl.patchValue(this.$settings.env.accessoryControl?.debug,{emitEvent:!1}),this.uiAccDebugFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.uiAccDebugSave(I)),this.uiTempFileFormControl.patchValue(this.$settings.env.temp,{emitEvent:!1}),this.uiTempFileFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.uiTempFileSave(I)),this.hbLinuxShutdownFormControl.patchValue(this.$settings.env.linux?.shutdown,{emitEvent:!1}),this.hbLinuxShutdownFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbLinuxShutdownSave(I)),this.hbLinuxRestartFormControl.patchValue(this.$settings.env.linux?.restart,{emitEvent:!1}),this.hbLinuxRestartFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbLinuxRestartSave(I)),this.scheduledRestartCronFormControl.patchValue(this.$settings.env.scheduledRestartCron||"",{emitEvent:!1}),this.scheduledRestartCronFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.scheduledRestartCronSave(I)),yield this.initMatterSettings(),this.loading.set(!1)})}openBackupModal(){this.$modal.open(Tt,{size:"lg",backdrop:"static"})}openConfigBackup(){this.$router.navigate(["/config"],{queryParams:{action:"restore"}})}openWallpaperModal(){this.$modal.open(Me,{size:"lg",backdrop:"static"})}resetHomebridgeState(){this.$modal.open(Te,{size:"lg",backdrop:"static"})}unpairAccessory(){this.$modal.open($e,{size:"lg",backdrop:"static"})}removeAllCachedAccessories(){this.$modal.open(we,{size:"lg",backdrop:"static"})}accessoryUiControl(){return b(this,null,function*(){try{let t=it([{provide:wt,useValue:{existingBlacklist:this.$settings.env.accessoryControl?.instanceBlacklist||[]}}],this.injector);yield this.$modal.open(ve,{size:"lg",backdrop:"static",injector:t}).result,this.showRestartToast()}catch(t){t!=="Dismiss"&&(console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")))}})}removeSingleCachedAccessories(){let t=it([{provide:ce,useValue:{selectedBridge:""}}],this.injector);this.$modal.open(he,{size:"lg",backdrop:"static",injector:t})}removeBridgeAccessories(){this.$modal.open(ke,{size:"lg",backdrop:"static"})}selectNetworkInterfaces(){return b(this,null,function*(){let t=it([{provide:Et,useValue:{adaptersAvailable:this.adaptersAvailable(),adaptersSelected:this.adaptersSelected()}}],this.injector),n=this.$modal.open(Fe,{size:"lg",backdrop:"static",injector:t});try{let a=yield n.result;this.buildBridgeNetworkAdapterList(a),yield this.$api.put("/server/network-interfaces/bridge",{adapters:a}),this.showRestartToast()}catch(a){a!=="Dismiss"&&(console.error(a),this.$toastr.error(a.message,this.$translate.instant("toast.title_error")))}})}toggleSection(t){this.showFields[t]=!this.showFields[t]}initStartupSettings(){return b(this,null,function*(){try{let t=yield this.$api.get("/platform-tools/hb-service/homebridge-startup-settings");this.hbDebugFormControl.patchValue(t.HOMEBRIDGE_DEBUG,{emitEvent:!1}),this.hbDebugFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(n=>this.hbDebugSave(n)),this.hbInsecureFormControl.patchValue(t.HOMEBRIDGE_INSECURE,{emitEvent:!1}),this.hbInsecureFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(n=>this.hbInsecureSave(n)),this.hbKeepFormControl.patchValue(t.HOMEBRIDGE_KEEP_ORPHANS,{emitEvent:!1}),this.hbKeepFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(n=>this.hbKeepSave(n)),this.hbEnvDebugFormControl.patchValue(t.ENV_DEBUG,{emitEvent:!1}),this.hbEnvDebugFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(n=>this.hbEnvDebugSave(n)),this.hbEnvNodeFormControl.patchValue(t.ENV_NODE_OPTIONS,{emitEvent:!1}),this.hbEnvNodeFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(n=>this.hbEnvNodeSave(n))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}initNetworkingOptions(){return b(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.set(!0),this.showResolvedMdnsOption.set(!0))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}getNetworkSettings(){return b(this,null,function*(){let[t,n,a,y,R]=yield 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")]);this.adaptersAvailable.set(t),this.buildBridgeNetworkAdapterList(n),this.hbMDnsFormControl.patchValue(a.advertiser,{emitEvent:!1}),this.hbMDnsFormControl.valueChanges.pipe(F(750),$(this.destroyRef)).subscribe(I=>this.hbMDnsSave(I)),this.hbPortFormControl.patchValue(y.port,{emitEvent:!1}),this.hbPortFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbPortSave(I)),this.hbStartPortFormControl.patchValue(R.start,{emitEvent:!1}),this.hbStartPortFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbStartPortSave(I)),this.hbEndPortFormControl.patchValue(R.end,{emitEvent:!1}),this.hbEndPortFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(I=>this.hbEndPortSave(I))})}saveUiSettingChange(t,n){return b(this,null,function*(){try{yield this.$api.put("/config-editor/ui",{key:t,value:n})}catch(a){console.error(a),this.$toastr.error(a.message,this.$translate.instant("toast.title_error"))}})}hbNameSave(t){return b(this,null,function*(){if(!t||!/^[\p{L}\p{N}][\p{L}\p{N} ']*[\p{L}\p{N}]$/u.test(t)){this.hbNameIsInvalid.set(!0);return}try{this.hbNameIsSaving.set(!0),yield this.$api.put("/server/name",{name:t}),this.$settings.setEnvItem("homebridgeInstanceName",t),this.hbNameIsInvalid.set(!1),setTimeout(()=>{this.hbNameIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbNameIsSaving.set(!1)}})}uiLangSave(t){return b(this,null,function*(){try{this.uiLangIsSaving.set(!0),this.$settings.setLang(t),yield this.saveUiSettingChange("lang",t),setTimeout(()=>{this.uiLangIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiLangIsSaving.set(!1)}})}uiThemeSave(t){return b(this,null,function*(){try{this.uiThemeIsSaving.set(!0),this.$settings.setTheme(t),yield this.saveUiSettingChange("theme",t),setTimeout(()=>{this.uiThemeIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiThemeIsSaving.set(!1)}})}uiLightSave(t){return b(this,null,function*(){try{this.uiLightIsSaving.set(!0),this.$settings.setLightingMode(t,"user"),yield this.saveUiSettingChange("lightingMode",t),setTimeout(()=>{this.uiLightIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiLightIsSaving.set(!1)}})}uiMenuSave(t){return b(this,null,function*(){try{this.uiMenuIsSaving.set(!0),this.$settings.setMenuMode(t),yield this.saveUiSettingChange("menuMode",t),window.location.reload()}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiMenuIsSaving.set(!1)}})}uiTempSave(t){return b(this,null,function*(){try{this.uiTempIsSaving.set(!0),this.$settings.setEnvItem("temperatureUnits",t),yield this.saveUiSettingChange("tempUnits",t),setTimeout(()=>{this.uiTempIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTempIsSaving.set(!1)}})}uiAlwaysShowBetasSave(t){return b(this,null,function*(){try{this.uiAlwaysShowBetasIsSaving.set(!0),this.$settings.setEnvItem("plugins.alwaysShowBetas",t),yield this.saveUiSettingChange("plugins.alwaysShowBetas",t),setTimeout(()=>{this.uiAlwaysShowBetasIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAlwaysShowBetasIsSaving.set(!1)}})}uiTerminalPersistenceSave(t){return b(this,null,function*(){if(!t&&this.$terminal.hasActiveSession()){let n=it([{provide:Rt,useValue:{title:this.$translate.instant("settings.terminal.persistence_confirm_title"),message:this.$translate.instant("settings.terminal.persistence_confirm_message"),message2:this.$translate.instant("common.phrases.are_you_sure"),confirmButtonLabel:this.$translate.instant("form.button_continue"),confirmButtonClass:"btn-primary",faIconClass:"fas fa-exclamation-triangle text-warning"}}],this.injector),a=this.$modal.open(Dt,{size:"lg",backdrop:"static",injector:n});try{yield a.result}catch{this.uiTerminalPersistenceFormControl.patchValue(!0,{emitEvent:!1});return}}try{this.uiTerminalPersistenceIsSaving.set(!0),t||this.$terminal.destroyPersistentSession(),this.$settings.setEnvItem("terminal.persistence",t),yield this.saveUiSettingChange("terminal.persistence",t),setTimeout(()=>{this.uiTerminalPersistenceIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalPersistenceIsSaving.set(!1)}})}uiTerminalHideWarningSave(t){return b(this,null,function*(){try{this.uiTerminalHideWarningIsSaving.set(!0),this.$settings.setEnvItem("terminal.hideWarning",t),yield this.saveUiSettingChange("terminal.hideWarning",t),setTimeout(()=>{this.uiTerminalHideWarningIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalHideWarningIsSaving.set(!1)}})}uiTerminalBufferSizeSave(t){return b(this,null,function*(){if(t&&(typeof t!="number"||t<0||Number.isInteger(t)===!1)){this.uiTerminalBufferSizeIsInvalid.set(!0);return}try{this.uiTerminalBufferSizeIsSaving.set(!0),this.$settings.setEnvItem("terminal.bufferSize",t),yield this.saveUiSettingChange("terminal.bufferSize",t),this.uiTerminalBufferSizeIsInvalid.set(!1),setTimeout(()=>{this.uiTerminalBufferSizeIsSaving.set(!1)},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalBufferSizeIsSaving.set(!1)}})}hbDebugSave(t){return b(this,null,function*(){try{this.hbDebugIsSaving.set(!0),yield this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:t,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.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}hbInsecureSave(t){return b(this,null,function*(){try{this.hbInsecureIsSaving.set(!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:t,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value}),setTimeout(()=>{this.hbInsecureIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}hbKeepSave(t){return b(this,null,function*(){try{this.hbKeepIsSaving.set(!0),yield this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:t,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value}),this.$settings.setKeepOrphans(t),setTimeout(()=>{this.hbKeepIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}hbEnvDebugSave(t){return b(this,null,function*(){try{this.hbEnvDebugIsSaving.set(!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:t,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value}),setTimeout(()=>{this.hbEnvDebugIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}hbEnvNodeSave(t){return b(this,null,function*(){try{this.hbEnvNodeIsSaving.set(!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:t}),setTimeout(()=>{this.hbEnvNodeIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}hbLogSizeSave(t){return b(this,null,function*(){if(t&&(typeof t!="number"||t<-1||Number.isInteger(t)===!1)){this.hbLogSizeIsInvalid.set(!0);return}try{this.hbLogSizeIsSaving.set(!0),this.$settings.setEnvItem("log.maxSize",t),(!t||t===-1)&&(yield this.saveUiSettingChange("log.truncateSize",null),this.hbLogTruncateIsInvalid.set(!1)),yield this.saveUiSettingChange("log.maxSize",t),this.hbLogSizeIsInvalid.set(!1),setTimeout(()=>{this.hbLogSizeIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLogSizeIsSaving.set(!1)}})}hbLogTruncateSave(t){return b(this,null,function*(){if(t&&(typeof t!="number"||t<0||Number.isInteger(t)===!1)){this.hbLogTruncateIsInvalid.set(!0);return}try{this.hbLogTruncateIsSaving.set(!0),this.$settings.setEnvItem("log.truncateSize",t),yield this.saveUiSettingChange("log.truncateSize",t),this.hbLogTruncateIsInvalid.set(!1),setTimeout(()=>{this.hbLogTruncateIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLogTruncateIsSaving.set(!1)}})}hbMDnsSave(t){return b(this,null,function*(){try{this.hbMDnsIsSaving.set(!0),yield this.$api.put("/server/mdns-advertiser",{advertiser:t}),setTimeout(()=>{this.hbMDnsIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbMDnsIsSaving.set(!1)}})}hbPortSave(t){return b(this,null,function*(){if(t===this.uiPortFormControl.value){this.hbPortIsInvalid.set(!0);return}try{this.hbPortIsSaving.set(!0),yield this.$api.put("/server/port",{port:t}),this.hbPortIsInvalid.set(!1),setTimeout(()=>{this.hbPortIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbPortIsSaving.set(!1)}})}hbStartPortSave(t){return b(this,null,function*(){try{this.hbStartPortIsSaving.set(!0),yield this.$api.put("/server/ports",{start:t,end:this.hbEndPortFormControl.value}),this.hbStartPortIsInvalid.set(!1),setTimeout(()=>{this.hbStartPortIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbStartPortIsSaving.set(!1)}})}hbEndPortSave(t){return b(this,null,function*(){try{this.hbEndPortIsSaving.set(!0),yield this.$api.put("/server/ports",{start:this.hbStartPortFormControl.value,end:t}),this.hbEndPortIsInvalid.set(!1),setTimeout(()=>{this.hbEndPortIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbEndPortIsSaving.set(!1)}})}uiPortSave(t){return b(this,null,function*(){if(!t||typeof t!="number"||t<1025||t>65533||Number.isInteger(t)===!1||t===this.hbPortFormControl.value){this.uiPortIsInvalid.set(!0);return}try{this.uiPortIsSaving.set(!0),this.$settings.setEnvItem("port",t),yield this.saveUiSettingChange("port",t),this.uiPortIsInvalid.set(!1),setTimeout(()=>{this.uiPortIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiPortIsSaving.set(!1)}})}uiAuthSave(t){return b(this,null,function*(){try{this.uiAuthIsSaving.set(!0),this.$settings.setItem("formAuth",t),yield this.saveUiSettingChange("auth",t?"form":"none"),this.$notification.formAuthEnabled.next(t),setTimeout(()=>{this.uiAuthIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAuthIsSaving.set(!1)}})}uiSessionTimeoutSaveFromFields(){return b(this,null,function*(){let t=this.uiSessionTimeoutDaysFormControl.value||0,n=this.uiSessionTimeoutHoursFormControl.value||0,a=this.uiSessionTimeoutMinutesFormControl.value||0;if(typeof t!="number"||t<0||t>365||!Number.isInteger(t)||typeof n!="number"||n<0||n>23||!Number.isInteger(n)||typeof a!="number"||a<0||a>59||!Number.isInteger(a)){this.uiSessionTimeoutIsInvalid.set(!0);return}let y=t*86400+n*3600+a*60;if(y<600||y>864e5){this.uiSessionTimeoutIsInvalid.set(!0);return}try{this.uiSessionTimeoutIsSaving.set(!0),this.$settings.setItem("sessionTimeout",y),yield this.saveUiSettingChange("sessionTimeout",y),this.uiSessionTimeoutIsInvalid.set(!1),setTimeout(()=>{this.uiSessionTimeoutIsSaving.set(!1),this.showRestartToast()},1e3)}catch(R){console.error(R),this.$toastr.error(R.message,this.$translate.instant("toast.title_error")),this.uiSessionTimeoutIsSaving.set(!1)}})}uiSessionTimeoutInactivityBasedSave(t){return b(this,null,function*(){try{this.uiSessionTimeoutInactivityBasedIsSaving.set(!0),this.$settings.setItem("sessionTimeoutInactivityBased",t),yield this.saveUiSettingChange("sessionTimeoutInactivityBased",t),setTimeout(()=>{this.uiSessionTimeoutInactivityBasedIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSessionTimeoutInactivityBasedIsSaving.set(!1)}})}uiSslKeySave(t){return b(this,null,function*(){try{this.uiSslKeyIsSaving.set(!0),this.$settings.setEnvItem("ssl.key",t),yield this.saveUiSettingChange("ssl.key",t),setTimeout(()=>{this.uiSslKeyIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslKeyIsSaving.set(!1)}})}uiSslCertSave(t){return b(this,null,function*(){try{this.uiSslCertIsSaving.set(!0),this.$settings.setEnvItem("ssl.cert",t),yield this.saveUiSettingChange("ssl.cert",t),setTimeout(()=>{this.uiSslCertIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslCertIsSaving.set(!1)}})}uiSslPfxSave(t){return b(this,null,function*(){try{this.uiSslPfxIsSaving.set(!0),this.$settings.setEnvItem("ssl.pfx",t),yield this.saveUiSettingChange("ssl.pfx",t),setTimeout(()=>{this.uiSslPfxIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslPfxIsSaving.set(!1)}})}uiSslPassphraseSave(t){return b(this,null,function*(){try{this.uiSslPassphraseIsSaving.set(!0),this.$settings.setEnvItem("ssl.passphrase",t),yield this.saveUiSettingChange("ssl.passphrase",t),setTimeout(()=>{this.uiSslPassphraseIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslPassphraseIsSaving.set(!1)}})}uiSslSelfSignedHostnamesSave(t){return b(this,null,function*(){try{this.uiSslSelfSignedHostnamesIsSaving.set(!0);let n=t.split(",").map(a=>a.trim()).filter(a=>a.length>0);this.$settings.setEnvItem("ssl.selfSignedHostnames",n),yield this.saveUiSettingChange("ssl.selfSignedHostnames",n),setTimeout(()=>{this.uiSslSelfSignedHostnamesIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslSelfSignedHostnamesIsSaving.set(!1)}})}generateSelfSigned(t="keycert"){return b(this,null,function*(){let n=this.uiSslSelfSignedHostnamesFormControl.value||"",a=String(n).split(",").map(R=>R.trim()).filter(R=>!!R),y={hostnames:a,mode:t};try{let R=yield this.$api.post("/server/ssl/selfsigned/generate",y);t==="keycert"?(R?.keyPath&&(this.$settings.setEnvItem("ssl.key",R.keyPath),this.uiSslKeyFormControl.patchValue(R.keyPath,{emitEvent:!1})),R?.certPath&&(this.$settings.setEnvItem("ssl.cert",R.certPath),this.uiSslCertFormControl.patchValue(R.certPath,{emitEvent:!1})),this.$settings.setEnvItem("ssl.selfSigned",!1),this.uiSslTypeFormControl.patchValue("keycert",{emitEvent:!0}),this.$toastr.success(this.$translate.instant("settings.security.selfsigned_generate_success_keycert"),this.$translate.instant("toast.title_success"))):(this.$settings.setEnvItem("ssl.selfSigned",!0),this.$settings.setEnvItem("ssl.selfSignedHostnames",a),this.uiSslTypeFormControl.patchValue("selfsigned",{emitEvent:!0}),this.$toastr.success(this.$translate.instant("settings.security.selfsigned_generate_success_selfsigned"),this.$translate.instant("toast.title_success"))),this.showRestartToast()}catch(R){console.error(R),this.$toastr.error(R.error?.message||R.message,this.$translate.instant("toast.title_error"))}})}uiSslTypeSave(t){return b(this,null,function*(){switch(t){case"keycert":this.uiSslPfxFormControl.patchValue("",{emitEvent:!1}),this.uiSslPassphraseFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.pfx",""),this.$settings.setEnvItem("ssl.passphrase",""),this.$settings.setEnvItem("ssl.selfSigned",!1),yield this.saveUiSettingChange("ssl.selfSigned",!1);break;case"pfx":this.uiSslKeyFormControl.patchValue("",{emitEvent:!1}),this.uiSslCertFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.key",""),this.$settings.setEnvItem("ssl.cert",""),this.$settings.setEnvItem("ssl.selfSigned",!1),yield this.saveUiSettingChange("ssl.selfSigned",!1);break;case"selfsigned":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",""),this.$settings.setEnvItem("ssl.selfSigned",!0),yield this.saveUiSettingChange("ssl.selfSigned",!0),this.uiSslSelfSignedHostnamesFormControl.value||this.uiSslSelfSignedHostnamesFormControl.patchValue("localhost, 127.0.0.1",{emitEvent:!0}),this.showRestartToast();break;default:this.uiSslKeyFormControl.patchValue("",{emitEvent:!1}),this.uiSslCertFormControl.patchValue("",{emitEvent:!1}),this.uiSslPfxFormControl.patchValue("",{emitEvent:!1}),this.uiSslPassphraseFormControl.patchValue("",{emitEvent:!1}),this.uiSslSelfSignedHostnamesFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.key",""),this.$settings.setEnvItem("ssl.cert",""),this.$settings.setEnvItem("ssl.pfx",""),this.$settings.setEnvItem("ssl.passphrase",""),this.$settings.setEnvItem("ssl.selfSigned",!1),this.$settings.setEnvItem("ssl.selfSignedHostnames",[]),yield this.saveUiSettingChange("ssl",""),this.showRestartToast()}})}uiHostSave(t){return b(this,null,function*(){try{this.uiHostIsSaving.set(!0),this.$settings.setItem("host",t),yield this.saveUiSettingChange("host",t),setTimeout(()=>{this.uiHostIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiHostIsSaving.set(!1)}})}uiWebrootSave(t){return b(this,null,function*(){try{this.uiWebrootIsSaving.set(!0),t=t?`/${t}`.replace(/\/+/g,"/").replace(/\/$/,""):"",t==="/"&&(t=""),this.$settings.setItem("webroot",t),yield this.saveUiSettingChange("webroot",t),this.uiWebrootFormControl.patchValue(t,{emitEvent:!1}),setTimeout(()=>{this.uiWebrootIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiWebrootIsSaving.set(!1)}})}uiProxyHostSave(t){return b(this,null,function*(){try{this.uiProxyHostIsSaving.set(!0),this.$settings.setItem("proxyHost",t),yield this.saveUiSettingChange("proxyHost",t),setTimeout(()=>{this.uiProxyHostIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiProxyHostIsSaving.set(!1)}})}hbPackageSave(t){return b(this,null,function*(){try{this.hbPackageIsSaving.set(!0),this.$settings.setEnvItem("homebridgePackagePath",t),yield this.saveUiSettingChange("homebridgePackagePath",t),setTimeout(()=>{this.hbPackageIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbPackageIsSaving.set(!1)}})}uiMetricsSave(t){return b(this,null,function*(){try{this.uiMetricsIsSaving.set(!0),this.$settings.setEnvItem("disableServerMetricsMonitoring",!t),yield this.saveUiSettingChange("disableServerMetricsMonitoring",!t),setTimeout(()=>{this.uiMetricsIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}enableMdnsAdvertiseSave(t){return b(this,null,function*(){try{this.enableMdnsAdvertiseIsSaving.set(!0),this.$settings.setEnvItem("enableMdnsAdvertise",t),yield this.saveUiSettingChange("enableMdnsAdvertise",t),setTimeout(()=>{this.enableMdnsAdvertiseIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(n=>{console.error(n),this.showRestartToast()})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error"))}})}uiAccDebugSave(t){return b(this,null,function*(){try{this.uiAccDebugIsSaving.set(!0),this.$settings.setEnvItem("accessoryControl.debug",t),yield this.saveUiSettingChange("accessoryControl.debug",t),setTimeout(()=>{this.uiAccDebugIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAccDebugIsSaving.set(!1)}})}uiTempFileSave(t){return b(this,null,function*(){try{this.uiTempFileIsSaving.set(!0),this.$settings.setEnvItem("temp",t),yield this.saveUiSettingChange("temp",t),setTimeout(()=>{this.uiTempFileIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}hbLinuxShutdownSave(t){return b(this,null,function*(){try{this.hbLinuxShutdownIsSaving.set(!0),this.$settings.setEnvItem("linux.shutdown",t),yield this.saveUiSettingChange("linux.shutdown",t),setTimeout(()=>{this.hbLinuxShutdownIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}hbLinuxRestartSave(t){return b(this,null,function*(){try{this.hbLinuxRestartIsSaving.set(!0),this.$settings.setEnvItem("linux.restart",t),yield this.saveUiSettingChange("linux.restart",t),setTimeout(()=>{this.hbLinuxRestartIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(n=>console.error(n)).finally(()=>this.showRestartToast()).catch(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.set(!1)}})}validateCronExpression(t){if(!t||!t.trim())return!0;let n=t.trim().split(/\s+/);if(n.length!==5)return!1;let a=/^[\d*,\-/]+$/;return n.every(y=>a.test(y))}scheduledRestartCronSave(t){return b(this,null,function*(){if(!this.validateCronExpression(t)){this.scheduledRestartCronIsInvalid.set(!0);return}this.scheduledRestartCronIsInvalid.set(!1);try{this.scheduledRestartCronIsSaving.set(!0);let n=t?.trim()?t:null;this.$settings.setEnvItem("scheduledRestartCron",n),yield this.$api.put("/config-editor/ui",{key:"scheduledRestartCron",value:n}),setTimeout(()=>{this.scheduledRestartCronIsSaving.set(!1),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).catch(a=>console.error(a)).finally(()=>this.showRestartToast()).catch(a=>{console.error(a),this.showRestartToast()})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.scheduledRestartCronIsSaving.set(!1)}})}initMatterSettings(){return b(this,null,function*(){try{let t=yield this.$api.get("/config-editor/matter"),n=t!==null;n?this.matterPortFormControl.patchValue(t.port||"",{emitEvent:!1}):this.matterPortFormControl.patchValue(0,{emitEvent:!1}),this.matterPortFormControl.valueChanges.pipe(F(1500),$(this.destroyRef)).subscribe(a=>this.matterPortSave(a)),this.matterEnabledFormControl.patchValue(n,{emitEvent:!1}),this.matterEnabledFormControl.valueChanges.subscribe(a=>this.matterEnabledSave(a))}catch(t){console.error(t),this.matterEnabledFormControl.valueChanges.subscribe(n=>this.matterEnabledSave(n))}})}matterPortSave(t){return b(this,null,function*(){if(!t&&t!==0){try{this.matterPortIsSaving.set(!0),this.matterPortIsInvalid.set(!1),yield this.$api.put("/config-editor/matter",{port:void 0}),setTimeout(()=>{this.matterPortIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.matterPortIsSaving.set(!1)}return}if(typeof t!="number"||t<1024||t>65535||Number.isInteger(t)===!1){this.matterPortIsInvalid.set(!0);return}if([5353,8080,8443].includes(t)){this.matterPortIsInvalid.set(!0),this.$toastr.error("Port 5353, 8080, and 8443 are reserved and cannot be used",this.$translate.instant("toast.title_error"));return}try{this.matterPortIsSaving.set(!0),this.matterPortIsInvalid.set(!1),yield this.$api.put("/config-editor/matter",{port:t}),setTimeout(()=>{this.matterPortIsSaving.set(!1),this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.matterPortIsSaving.set(!1),this.matterPortIsInvalid.set(!0)}})}matterEnabledSave(t){return b(this,null,function*(){try{if(this.matterEnabledIsSaving.set(!0),t){let n;if(this.matterConfigCache.port)n=this.matterConfigCache.port;else try{n=(yield this.$api.get("/server/port/new/matter")).port}catch(a){console.error("Failed to get Matter port, using fallback",a),n=Math.floor(Math.random()*12+5530)}yield this.$api.put("/config-editor/matter",{port:n}),n!==void 0&&this.matterPortFormControl.patchValue(n,{emitEvent:!1}),this.matterConfigCache={port:n},setTimeout(()=>{this.matterEnabledIsSaving.set(!1),this.showRestartToast()},1e3)}else{let n=it([{provide:Rt,useValue:{title:"Disable Matter",message:"Disabling Matter will delete all Matter bridge files. This action cannot be undone.",message2:"Are you sure you want to continue?",confirmButtonLabel:"Continue",confirmButtonClass:"btn-danger",faIconClass:"fas fa-exclamation-triangle text-warning"}}],this.injector),a=this.$modal.open(Dt,{size:"lg",backdrop:"static",injector:n});try{yield a.result,this.matterConfigCache={port:this.matterPortFormControl.value||void 0},this.$settings.restartToastRef&&(this.$toastr.clear(this.$settings.restartToastRef.toastId),this.$settings.restartToastRef=null,this.restartToastIsShown=!1),this.$router.navigate(["/restart"],{queryParams:{alreadyRestarting:"true"}}),yield this.$api.delete("/config-editor/matter")}catch(y){y==="Dismiss"?(this.matterEnabledFormControl.patchValue(!0,{emitEvent:!1}),this.matterEnabledIsSaving.set(!1)):(console.error(y),this.$toastr.error(y.message,this.$translate.instant("toast.title_error")),this.matterEnabledFormControl.patchValue(!0,{emitEvent:!1}),this.matterEnabledIsSaving.set(!1))}}}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.matterEnabledFormControl.patchValue(t,{emitEvent:!1}),this.matterEnabledIsSaving.set(!1)}})}buildBridgeNetworkAdapterList(t){if(!t.length){this.adaptersSelected.set([]);return}this.adaptersSelected.set(t.map(n=>{let a=this.adaptersAvailable().find(y=>y.iface===n);return a?{iface:a.iface,selected:!0,missing:!1,ip4:a.ip4,ip6:a.ip6}:{iface:n,selected:!0,missing:!0}}))}showRestartToast(){this.restartToastIsShown||(this.restartToastIsShown=!0,this.$settings.restartToastRef=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}),this.$settings.restartToastRef&&this.$settings.restartToastRef.onTap&&this.$settings.restartToastRef.onTap.pipe($(this.destroyRef)).subscribe(()=>{this.$router.navigate(["/restart"])}))}triggerKeyCertSelect(){let t=this.sslKeyCertInput();t&&(t.nativeElement.value="",t.nativeElement.click())}onSslKeyCertChange(t){return b(this,null,function*(){if(!t||t.length===0)return;let n=new FormData;Array.from(t).forEach(a=>{n.append("files",a,a.name)});try{let a=yield this.$api.post("/server/ssl/keycert",n);a?.keyPath&&(this.$settings.setEnvItem("ssl.key",a.keyPath),this.uiSslKeyFormControl.patchValue(a.keyPath,{emitEvent:!1})),a?.certPath&&(this.$settings.setEnvItem("ssl.cert",a.certPath),this.uiSslCertFormControl.patchValue(a.certPath,{emitEvent:!1})),this.$settings.setEnvItem("ssl.selfSigned",!1),this.uiSslTypeFormControl.patchValue("keycert",{emitEvent:!0}),this.$toastr.success(this.$translate.instant("settings.security.ssl_upload_success_keycert"),this.$translate.instant("toast.title_success")),this.showRestartToast()}catch(a){console.error(a),this.$toastr.error(a.error?.message||a.message,this.$translate.instant("toast.title_error"))}})}triggerPfxSelect(){let t=this.sslPfxInput();t&&(t.nativeElement.value="",t.nativeElement.click())}onSslPfxChange(t){return b(this,null,function*(){if(!t||t.length===0)return;let n=new FormData;n.append("pfx",t[0],t[0].name),this.uiSslPassphraseFormControl.value&&n.append("passphrase",this.uiSslPassphraseFormControl.value);try{let a=yield this.$api.post("/server/ssl/pfx",n);a?.pfxPath&&(this.$settings.setEnvItem("ssl.pfx",a.pfxPath),this.uiSslPfxFormControl.patchValue(a.pfxPath,{emitEvent:!1})),this.$settings.setEnvItem("ssl.selfSigned",!1),this.uiSslTypeFormControl.patchValue("pfx",{emitEvent:!0}),this.$toastr.success(this.$translate.instant("settings.security.ssl_upload_success_pfx"),this.$translate.instant("toast.title_success")),this.showRestartToast()}catch(a){console.error(a),this.$toastr.error(a.error?.message||a.message,this.$translate.instant("toast.title_error"))}})}validateSsl(){return b(this,null,function*(){try{let t=yield this.$api.post("/server/ssl/validate",{});if(t?.valid)this.$toastr.success(t?.details||this.$translate.instant("settings.security.ssl_validate_success"),this.$translate.instant("toast.title_success"));else{let n=t?.details||this.$translate.instant("settings.security.ssl_validate_error");this.$toastr.error(n,this.$translate.instant("toast.title_error"))}}catch(t){console.error(t),this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=H({type:e,selectors:[["ng-component"]],viewQuery:function(n,a){n&1&&(st(a.searchInput,an,5),st(a.sslKeyCertInput,on,5),st(a.sslPfxInput,sn,5)),n&2&&vt(3)},decls:12,vars:11,consts:[["searchInput",""],["sslKeyCertInput",""],["sslPfxInput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"row"],[1,"col-md-12"],["novalidate",""],["type","text",1,"search-bar",3,"ngModelChange","placeholder","ngModel","ngModelOptions"],["type","button",1,"search-bar-clear"],["type","button",1,"search-bar-clear",3,"click"],["aria-hidden","true",1,"fas","fa-square-xmark"],[1,"my-4"],[1,"pb-3"],["role","button","tabindex","0",1,"mt-3","hover-pointer",3,"click"],[1,"primary-text"],[1,"fa"],["id","fieldsGeneral",1,"list-group","list-group-box","mt-2","mx-0"],[1,"list-group-item","d-block","d-md-flex","justify-content-between","align-items-center"],[1,"list-group-item","d-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"],[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,"pe-2"],[1,"btn","btn-primary","waves-effect","m-0","ms-3","py-1",2,"min-width","50px",3,"click"],[1,"fas","fa-arrow-right"],["routerLink","/users",1,"btn","btn-primary","waves-effect","m-0","ms-3","py-1",2,"min-width","50px"],["id","fieldsDisplay",1,"list-group","list-group-box","mt-2","mx-0"],[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"],["id","fieldsStartup",1,"list-group","list-group-box","mb-4","mx-0"],[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"],[1,"badge","badge-primary","ms-1"],[3,"innerHtml"],[1,"my-3","my-md-0","ps-0","ps-md-5","w-auto","d-flex","flex-column","align-items-end"],[1,"d-flex","align-items-center","w-100"],["type","text","placeholder","mm hh dd MM ww","maxlength","30",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["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","font-monospace",3,"formControl"],["type","text","placeholder","shutdown",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],[1,"my-3","my-md-0","ps-0","ps-md-5","w-auto","d-flex","align-items-center","font-monospace"],["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","font-monospace",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","font-monospace",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","font-monospace",3,"formControl"],["routerLink","/platform-tools/docker/startup-script",1,"btn","btn-primary","waves-effect","m-0","ms-3","py-1",2,"min-width","50px"],["id","fieldsNetwork",1,"list-group","list-group-box","mt-2","mx-0"],[1,"small","grey-text","pe-2"],[1,"badge","badge-primary","me-1",3,"class"],[1,"btn","btn-primary","waves-effect","m-0","ms-3","py-1",2,"min-width","50px",3,"click","disabled"],[1,"badge","badge-primary","me-1"],[1,"fas","fa-exclamation-triangle"],[1,"fw-normal"],["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","font-monospace",3,"formControl"],[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","font-monospace",3,"formControl"],[1,"fas","fa-exclamation-triangle","red-text"],["type","text","pattern","^[^{}/:\\\\s]+(?::\\d+)?$","placeholder","example.com:8443",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","number","min","1025","max","65533","placeholder","8581",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","text","placeholder","/",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","checkbox","id","enableMdnsAdvertise",1,"rendux-input",3,"formControl"],["for","enableMdnsAdvertise",1,"rendux-label","ms-3",2,"min-width","50px"],[1,"small","grey-text","mb-2","mx-0"],["id","fieldsMatter",1,"list-group","list-group-box","mt-2","mx-0"],["type","checkbox","id","matterEnabled",1,"rendux-input",3,"formControl"],["for","matterEnabled",1,"rendux-label","ms-3",2,"min-width","50px"],["type","number","min","1024","max","65535","placeholder","5540",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["id","fieldsTerminal",1,"list-group","list-group-box","mt-2","mx-0"],["type","number","min","-1","placeholder","1000000",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","number","min","0","placeholder","200000",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["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","font-monospace",3,"formControl"],["id","fieldsSecurity",1,"list-group","list-group-box","mt-2","mx-0"],["type","checkbox","id","uiAuthForm",1,"rendux-input",3,"formControl"],["for","uiAuthForm",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","session-inactivity-based",1,"rendux-input",3,"formControl"],["for","session-inactivity-based",1,"rendux-label","ms-3",2,"min-width","50px"],[1,"fas","fa-floppy-disk","primary-text","fa-xl","me-0","me-md-2","ms-2","ms-md-0"],[1,"d-flex","align-items-center","gap-2"],["type","number","min","0","max","365","placeholder","0",1,"form-control","custom-input","font-monospace",2,"width","44px","text-align","right",3,"formControl"],[1,"ms-1","me-2","mb-0","text-nowrap","grey-text","small"],["type","number","min","0","max","23","placeholder","8",1,"form-control","custom-input","font-monospace",2,"width","44px","text-align","right",3,"formControl"],["type","number","min","0","max","59","placeholder","0",1,"form-control","custom-input","font-monospace",2,"width","44px","text-align","right",3,"formControl"],[1,"custom-select","resp-select","order-1","order-md-2",3,"formControl","hidden"],["value","off"],["value","selfsigned"],["value","keycert"],["value","pfx"],["type","button",1,"btn","btn-elegant","mx-2","py-1",2,"min-width","50px",3,"title"],["type","button",1,"btn","btn-elegant","mx-2","py-1",2,"min-width","50px",3,"click","title"],[1,"fas","fa-check"],["type","text","placeholder","localhost, 127.0.0.1, homebridge.local",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","button",1,"btn","btn-elegant","m-0","waves-effect","ms-2","py-1",2,"min-width","50px",3,"click","title"],[1,"fas","fa-magic"],["type","button",1,"btn","btn-elegant","m-0","py-1","mx-2",2,"min-width","50px",3,"click","title"],[1,"fas","fa-shield-alt"],[1,"my-3","my-md-0","ps-0","ps-md-5","w-auto","d-flex","align-items-center","gap-2"],["type","button",1,"btn","btn-elegant","m-0","py-1",2,"min-width","50px",3,"click","title"],[1,"fas","fa-upload"],["type","file","multiple","",1,"d-none",3,"change"],["type","text","placeholder","/Users/.../certs/server.key",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","button",1,"btn","btn-elegant","m-0",2,"min-width","50px",3,"click","title"],["type","text","placeholder","/Users/.../certs/server.crt",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","button",1,"btn","btn-elegant","waves-effect","m-0","py-1",2,"min-width","50px",3,"click","title"],["type","file",1,"d-none",3,"change"],["type","text","placeholder","/Users/.../certs/server.pfx",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["placeholder","mypassphrase",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"focus","blur","type","formControl"],["id","fieldsCache",1,"list-group","list-group-box","mb-4","mx-0"],["type","checkbox","id","accessoryDebug",1,"rendux-input",3,"formControl"],["for","accessoryDebug",1,"rendux-label","ms-3",2,"min-width","50px"],["id","fieldsReset",1,"list-group","list-group-box","mt-2","mx-0"]],template:function(n,a){n&1&&(o(0,"div",3)(1,"div",4)(2,"h3",5),d(3),s(4,"translate"),l()(),o(5,"div",6)(6,"button",7),s(7,"translate"),T("click",function(){return a.toggleSearch()}),c(8,"i"),l()()(),m(9,pn,7,7,"div",8),m(10,cn,1,0,"app-spinner")(11,jo,10,9)),n&2&&(i(3),h(r(4,7,"menu.settings.title")),i(3),f("aria-label",r(7,9,"form.search")),i(2),D(Kt("fas",a.showSearchBar()?" primary-text":""," fa-search")),i(),u(a.showSearchBar()?9:-1),i(),u(a.loading()?10:11))},dependencies:[Jt,mt,ee,ae,oe,bt,ie,pt,ne,ct,Xt,le,de,re,se,xt,Zt,ut,St,_e,dt,L],styles:["form[_ngcontent-%COMP%]{position:relative}.search-bar[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px 45px 10px 10px;margin-bottom:15px}@media(hover:hover){.search-bar[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.search-bar[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.search-bar-clear[_ngcontent-%COMP%]{position:absolute;right:8px;top:25px;height:50px;background:transparent;border:none;font-size:20px;color:#d0d0d0;cursor:pointer;padding:0 8px;display:flex;align-items:center}.search-bar-clear[_ngcontent-%COMP%]:hover{color:#a0a0a0}"],data:{animation:[Pt("fadeInOut",[ht(":enter",[ot({opacity:0}),gt("750ms",ot({opacity:1}))]),ht(":leave",[gt("750ms",ot({opacity:0}))])]),Pt("smoothHide",[ht(":enter",[ot({opacity:.01,height:"0px",overflow:"hidden",marginBottom:0,transform:"scale(0.97)"}),gt("450ms cubic-bezier(0.0, 0.0, 0.2, 1)",ot({opacity:1,height:"*",marginBottom:"*",transform:"scale(1)"}))]),ht(":leave",[gt("150ms cubic-bezier(0.4, 0.0, 1, 1)",ot({opacity:0,height:0,marginBottom:0,paddingTop:0,paddingBottom:0,overflow:"hidden",transform:"scale(0.98)"}))])])]}})}return e})();export{ml as SettingsComponent};
@@ -0,0 +1 @@
1
+ import{r as oe}from"./chunk-73LLH6JC.js";import{m as se}from"./chunk-QZUDFUPG.js";import{e as G}from"./chunk-2HDDFLX5.js";import{C as ne,e as Y,l as Z,t as ee,u as te,w as ie}from"./chunk-Z62MEN4O.js";import{b as X}from"./chunk-MXLTCL2C.js";import{E as H,F as J,H as K,K as Q}from"./chunk-M6KB66ZD.js";import{Ab as h,Ac as z,Cb as R,Db as F,Eb as V,Ec as u,Fb as w,Fc as _,Gb as a,Hb as r,Ib as $,Rb as E,Xb as y,Za as s,Zb as p,aa as x,ga as b,ha as I,jc as k,kc as m,lc as f,mc as B,nb as O,nc as P,rc as j,sa as S,sc as q,tc as W,yb as T,zb as v,zc as N}from"./chunk-MKV5RAJQ.js";import{a as U,b as L,h as D}from"./chunk-B4AJQJMI.js";var ce=(t,l)=>({"fa-matter":t,"fa-hap":l}),le=(t,l)=>({"btn-danger":t,"btn-elegant":l}),de=(t,l,e)=>({"fa-trash":t,"fa-undo":l,"fa-spinner fa-pulse":e});function me(t,l){t&1&&(a(0,"div",12),$(1,"i",13),r(),a(2,"p",14),m(3),u(4,"translate"),r()),t&2&&(s(3),f(_(4,1,"reset.no_accessories")))}function pe(t,l){if(t&1&&(a(0,"option",24),m(1),r()),t&2){let e=l.$implicit;w("value",e._id),s(),P("",e.name," (",e._username,")")}}function ue(t,l){if(t&1){let e=E();a(0,"li",20),m(1),u(2,"translate"),r(),a(3,"li",18)(4,"label",21),m(5),u(6,"translate"),r(),a(7,"div",22)(8,"select",23),W("ngModelChange",function(i){b(e);let o=p(2);return q(o.selectedBridge,i)||(o.selectedBridge=i),I(i)}),y("change",function(i){b(e);let o=p(2);return I(o.onBridgeChange(i.target.value))}),F(9,pe,2,3,"option",24,R),r()()()}if(t&2){let e=p(2);s(),f(_(2,3,"form.label.changes_kept")),s(4),f(_(6,5,"reset.accessory_ind.bridge")),s(3),j("ngModel",e.selectedBridge),s(),V(e.pairings())}}function _e(t,l){if(t&1&&(a(0,"li",18)(1,"label",25),m(2),u(3,"translate"),r(),a(4,"div",26),m(5),r()()),t&2){let e=p(2);s(2),f(_(3,2,"reset.accessory_ind.bridge")),s(3),B(" ",e.getCurrentlySelectedBridge()," ")}}function ge(t,l){if(t&1){let e=E();a(0,"li",19)(1,"span",27),$(2,"i",28),r(),a(3,"span",29),m(4),$(5,"br"),a(6,"small")(7,"span",30),m(8),r()()(),a(9,"button",31),u(10,"translate"),y("click",function(){let i=b(e).$implicit,o=p(2);return I(o.toggleList(i.UUID||i.uuid,i.$cacheFile,i.$protocol,i.$deviceId))}),$(11,"i",32),r()()}if(t&2){let e=l.$implicit,n=p(2);s(2),k(N(12,ce,e.$protocol==="matter",e.$protocol!=="matter")),s(2),B(" ",e.displayName," "),s(4),f(e.UUID||e.uuid),s(),k(N(15,le,!n.isInList(e.UUID||e.uuid,e.$cacheFile,e.$protocol),n.isInList(e.UUID||e.uuid,e.$cacheFile,e.$protocol))),w("disabled",n.clicked()),T("aria-label",_(10,10,"form.button_delete")),s(2),k(z(18,de,!n.isInList(e.UUID||e.uuid,e.$cacheFile,e.$protocol),n.isInList(e.UUID||e.uuid,e.$cacheFile,e.$protocol)&&!n.clicked(),n.isInList(e.UUID||e.uuid,e.$cacheFile,e.$protocol)&&n.clicked()))}}function ve(t,l){if(t&1&&(a(0,"div",12),$(1,"i",15),r(),a(2,"ul",16)(3,"li"),m(4),u(5,"translate"),r(),a(6,"li"),m(7),u(8,"translate"),r(),a(9,"li"),m(10),u(11,"translate"),r()(),a(12,"ul",17),v(13,ue,11,7),v(14,_e,6,4,"li",18),F(15,ge,12,22,"li",19,R),r()),t&2){let e=p();s(4),f(_(5,5,"reset.accessory_ind.list_1")),s(3),f(_(8,7,"reset.accessory_ind.list_2")),s(3),f(_(11,9,"reset.accessory_ind.list_3")),s(3),h(e.pairings().length>1?13:-1),s(),h(e.pairings().length===1?14:-1),s(),V(e.selectedBridgeAccessories())}}function he(t,l){if(t&1){let e=E();a(0,"button",33),y("click",function(){b(e);let i=p();return I(i.dismissModal())}),m(1),u(2,"translate"),r()}if(t&2){let e=p();w("disabled",e.clicked()),s(),B(" ",_(2,2,"form.button_close")," ")}}function fe(t,l){if(t&1){let e=E();a(0,"button",34),y("click",function(){b(e);let i=p();return I(i.dismissModal())}),m(1),u(2,"translate"),r()}t&2&&(s(),B(" ",_(2,1,"form.button_close")," "))}function xe(t,l){if(t&1&&m(0),t&2){let e=p(3);B(" (",e.toDelete().length,") ")}}function Ce(t,l){if(t&1&&(m(0),u(1,"translate"),v(2,xe,1,1)),t&2){let e=p(2);B(" ",_(1,2,"form.button_remove")," "),s(2),h(e.toDelete().length>0?2:-1)}}function be(t,l){t&1&&$(0,"i",36)}function Ie(t,l){if(t&1){let e=E();a(0,"button",35),y("click",function(){b(e);let i=p();return I(i.removeAccessories())}),v(1,Ce,3,4),v(2,be,1,0,"i",36),r()}if(t&2){let e=p();w("disabled",!e.toDelete().length||e.clicked()),s(),h(e.clicked()?-1:1),s(),h(e.clicked()?2:-1)}}var Fe=(()=>{class t{$activeModal=x(se);$api=x(Q);$router=x(G);$settings=x(X);$toastr=x(K);$translate=x(H);modalData=x(oe);selectedBridge=this.modalData.selectedBridge;pairings=S([],{});clicked=S(!1,{});currentSelectedBridge=S("",{});selectedBridgeAccessories=S([],{});accessoriesExist=S(!1,{});toDelete=S([],{});isMatterSupported=this.$settings.isFeatureEnabled("matterSupport");ngOnInit(){this.currentSelectedBridge.set(this.selectedBridge),this.loadCachedAccessories()}onBridgeChange(e){this.currentSelectedBridge.set(e),this.selectedBridgeAccessories.set(this.pairings().find(n=>n._id===this.currentSelectedBridge())?.accessories||[])}getCurrentlySelectedBridge(){let e=this.pairings().find(n=>n._id===this.currentSelectedBridge());return e?`${e.name} - ${e._username}`:""}toggleList(e,n,i,o){this.toDelete().some(g=>g.uuid===e&&g.cacheFile===n&&g.protocol===i)?this.toDelete.set(this.toDelete().filter(g=>g.uuid!==e||g.cacheFile!==n||g.protocol!==i)):this.toDelete.update(g=>[...g,{cacheFile:n,uuid:e,protocol:i,deviceId:o}])}isInList(e,n,i){return this.toDelete().some(o=>o.uuid===e&&o.cacheFile===n&&o.protocol===i)}removeAccessories(){return D(this,null,function*(){this.clicked.set(!0);let e=this.toDelete().filter(o=>o.protocol==="hap").map(o=>({uuid:o.uuid,cacheFile:o.cacheFile})),n=this.toDelete().filter(o=>o.protocol==="matter").map(o=>({uuid:o.uuid,deviceId:o.deviceId})),i=[];if(e.length>0&&i.push(this.$api.delete("/server/cached-accessories",{body:e})),this.isMatterSupported&&n.length>0&&i.push(this.$api.delete("/server/matter-accessories",{body:n})),i.length===0){this.clicked.set(!1);return}try{yield Promise.all(i),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}})}catch(o){this.clicked.set(!1),console.error(o),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return D(this,null,function*(){try{let e=this.isMatterSupported?[this.$api.get("/server/cached-accessories"),this.$api.get("/server/matter-accessories"),this.$api.get("/server/pairings")]:[this.$api.get("/server/cached-accessories"),this.$api.get("/server/pairings")],n=yield Promise.all(e),i=n[0],o=this.isMatterSupported?n[1]:[],g=this.isMatterSupported?n[2]:n[1],C=new Map(g.map(c=>[c._id,L(U({},c),{accessories:[]})]));i.sort((c,d)=>c.displayName.localeCompare(d.displayName)).forEach(c=>{let d=g.find(re=>re._main),A=c.$cacheFile?.split(".")?.[1]||d._id;(!this.selectedBridge||this.selectedBridge===A)&&(C.has(A)||C.set(A,{_id:A,_username:A.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),c.$protocol="hap",C.get(A).accessories.push(c))}),this.isMatterSupported&&o.sort((c,d)=>c.displayName.localeCompare(d.displayName)).forEach(c=>{let d=c.$deviceId;(!this.selectedBridge||this.selectedBridge===d)&&(C.has(d)||C.set(d,{_id:d,_username:d.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),c.$protocol="matter",c.$cacheFile=d,C.get(d).accessories.push(c))});let ae=Array.from(C.values()).filter(c=>c.accessories.length>0).sort((c,d)=>c._main&&!d._main?-1:!c._main&&d._main?1:c.name.localeCompare(d.name));this.pairings.set(ae);let M=this.selectedBridge||this.pairings()[0]?._id;M&&(this.selectedBridge=M,this.currentSelectedBridge.set(M),this.accessoriesExist.set(!0),this.selectedBridgeAccessories.set(this.pairings().find(c=>c._id===M)?.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||t)};static \u0275cmp=O({type:t,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"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"me-3"],[1,"fas","fa-lg"],[1,"flex-grow-1"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled"],[1,"fas"],["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,i){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),m(3),u(4,"translate"),r(),a(5,"button",3),u(6,"translate"),y("click",function(){return i.dismissModal()}),r()(),a(7,"div",4),v(8,me,5,3),v(9,ve,17,11),r(),a(10,"div",5)(11,"div",6),v(12,he,3,4,"button",7),r(),a(13,"div",8),v(14,fe,3,3,"button",9),r(),a(15,"div",10),v(16,Ie,3,3,"button",11),r()()()),n&2&&(s(3),f(_(4,8,"reset.accessory_ind.title")),s(2),w("disabled",i.clicked()),T("aria-label",_(6,10,"form.button_close")),s(3),h(i.accessoriesExist()?-1:8),s(),h(i.accessoriesExist()?9:-1),s(3),h(i.accessoriesExist()?12:-1),s(2),h(i.accessoriesExist()?-1:14),s(2),h(i.accessoriesExist()?16:-1))},dependencies:[ne,te,ie,ee,Y,Z,J],encapsulation:2})}return t})();export{Fe as a};