@duplicati/ngclient 0.0.230 → 0.0.231

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 (137) hide show
  1. package/assets/dest-icons/googleworkspace.png +0 -0
  2. package/assets/sh.woff2 +0 -0
  3. package/chunk--kVw-BwM.js +1 -0
  4. package/chunk-5Ay2I6OJ.js +2 -0
  5. package/chunk-6bHATzM2.js +1 -0
  6. package/{chunk-DtA6Mvdt.js → chunk-7qu0Yols.js} +1 -1
  7. package/{chunk-DmKJmG9z.js → chunk-B1FMMTzB.js} +1 -1
  8. package/{chunk-BjAIXsAS.js → chunk-B6VmpM-T.js} +1 -1
  9. package/chunk-B7vxwDBG.js +1 -0
  10. package/chunk-BAVJD-p4.js +1 -0
  11. package/chunk-BC2-YuwH.js +14 -0
  12. package/{chunk-C4kBXz3C.js → chunk-BFfFD-XE.js} +1 -1
  13. package/chunk-BHERv_y8.js +1 -0
  14. package/chunk-BIAFFPb6.js +1 -0
  15. package/{chunk-C6QX7znk.js → chunk-BRJ93eei.js} +1 -1
  16. package/{chunk-C-NgIZiF.js → chunk-BYJ0fSUP.js} +1 -1
  17. package/chunk-B_iekvt6.js +1 -0
  18. package/chunk-Baizh2Dx.js +1 -0
  19. package/{chunk-Ca1C9pJ0.js → chunk-Bcxzhjj8.js} +1 -1
  20. package/{chunk-D2g5mSLr.js → chunk-Bfak-Gjv.js} +1 -1
  21. package/{chunk-DD_QfWih.js → chunk-Bgx4dtaL.js} +1 -1
  22. package/chunk-BhGD1_v8.js +2 -0
  23. package/{chunk-Dj3xknEh.js → chunk-BhPCHFyT.js} +1 -1
  24. package/{chunk-B728v9oc.js → chunk-Bj1ToKwz.js} +2 -2
  25. package/{chunk-BIOMsSHI.js → chunk-BjSSXg5V.js} +1 -1
  26. package/chunk-BlfsmSZO.js +4 -0
  27. package/chunk-Bnu5Zyue.js +1 -0
  28. package/{chunk-OFYkgZA1.js → chunk-C1BwGQgo.js} +2 -2
  29. package/{chunk-D2g44FyO.js → chunk-C2H72Zk8.js} +2 -2
  30. package/{chunk-DPNAj9Vc.js → chunk-C3KPTLNN.js} +1 -1
  31. package/{chunk-B2TXzbpy.js → chunk-C5p3bQwH.js} +1 -1
  32. package/{chunk-C1kucB1O.js → chunk-C6beMvkJ.js} +2 -2
  33. package/chunk-CAgfvBGI.js +2 -0
  34. package/{chunk-BD9-OWSe.js → chunk-CDEvMQA2.js} +1 -1
  35. package/{chunk-OLi7f6y7.js → chunk-CI8lsvKT.js} +1 -1
  36. package/chunk-CP3edE1P.js +1 -0
  37. package/{chunk-wyNyzSXi.js → chunk-CQv4eyEK.js} +1 -1
  38. package/chunk-CTwvkMrj.js +2 -0
  39. package/chunk-CmexLvf7.js +2 -0
  40. package/chunk-Cng2PWKw.js +2 -0
  41. package/chunk-CqwyTVd3.js +1 -0
  42. package/{chunk-Fw6nFDZK.js → chunk-Crs56mDy.js} +2 -2
  43. package/{chunk-BYJA6sbi.js → chunk-CwKxis_6.js} +1 -1
  44. package/{chunk-DWkdK0Ib.js → chunk-CxjTj8X0.js} +1 -1
  45. package/chunk-CzJ3-6Pu.js +1 -0
  46. package/chunk-D2MSuPzM.js +2 -0
  47. package/{chunk-PVmXLw9b.js → chunk-D2aWqPl_.js} +1 -1
  48. package/{chunk-DuIUmwWN.js → chunk-D3SUPUQT.js} +3 -3
  49. package/{chunk-C7pjkqKB.js → chunk-D3d-eReU.js} +1 -1
  50. package/chunk-D5031IDL.js +3 -0
  51. package/{chunk-khm9J_G0.js → chunk-D7AP6g7S.js} +1 -1
  52. package/chunk-D9O-afXN.js +1 -0
  53. package/chunk-DA5X-TzJ.js +1 -0
  54. package/chunk-DAM-4k69.js +2 -0
  55. package/{chunk-Cgbi9MZq.js → chunk-DH6L3nQP.js} +1 -1
  56. package/chunk-DH6iiZWc.js +3 -0
  57. package/{chunk-D5lj-fQk.js → chunk-DKacf9Tj.js} +1 -1
  58. package/{chunk-BzIY4AaX.js → chunk-DKwqdnLJ.js} +1 -1
  59. package/{chunk-CJ0GoaW1.js → chunk-DNUCXG8E.js} +1 -1
  60. package/chunk-DPpQ_8VM.js +1 -0
  61. package/chunk-Da2vs6ff.js +1 -0
  62. package/chunk-DfcHtA-G.js +1 -0
  63. package/chunk-DlTsXgG2.js +2 -0
  64. package/{chunk-DaGzYsVs.js → chunk-DlqfMbsZ.js} +1 -1
  65. package/chunk-DoYGADYB.js +1 -0
  66. package/{chunk-RQ_MoiOh.js → chunk-DuHXCtrV.js} +1 -1
  67. package/{chunk-CT9ziigM.js → chunk-DuTbfCdT.js} +2 -2
  68. package/{chunk-dmyIQdVx.js → chunk-EwTTC1EW.js} +1 -1
  69. package/{chunk-I0R6Ty-p.js → chunk-JMkz2RrF.js} +1 -1
  70. package/chunk-PGDvGDW-.js +1 -0
  71. package/{chunk-CRAg6SRo.js → chunk-PONAC1Ya.js} +1 -1
  72. package/chunk-RqvNv7T_.js +2 -0
  73. package/{chunk-DFEb6rgg.js → chunk-SycSMD-r.js} +2 -2
  74. package/chunk-U0VOUPLl.js +1 -0
  75. package/chunk-Z5fN6CGR.js +1 -0
  76. package/chunk-d4cdVCUg.js +2 -0
  77. package/{chunk-DN6f5jXR.js → chunk-dCFVYHva.js} +1 -1
  78. package/{chunk-D6aNT_wo.js → chunk-gaP3Sx_C.js} +1 -1
  79. package/chunk-mnaJWx8D.js +1 -0
  80. package/chunk-oTpkLrqH.js +1 -0
  81. package/chunk-tpJJunhQ.js +1 -0
  82. package/index.html +1 -1
  83. package/locale/messages.de.json +1 -1
  84. package/locale/messages.de_CH.json +1 -1
  85. package/locale/messages.de_DE.json +1 -1
  86. package/locale/messages.en.json +65 -1
  87. package/locale/messages.fr.json +1 -1
  88. package/locale/messages.fr_CA.json +1 -1
  89. package/locale/messages.fr_FR.json +1 -1
  90. package/locale/messages.it.json +95 -2
  91. package/locale/messages.it_IT.json +94 -1
  92. package/locale/messages.json +65 -1
  93. package/locale/messages.nl_BE.json +1 -1
  94. package/locale/messages.nl_NL.json +1 -1
  95. package/locale/messages.zh_HK.json +152 -8
  96. package/main-QLXVXD6E.js +16 -0
  97. package/package.json +1 -1
  98. package/chunk-3RXp81pP.js +0 -1
  99. package/chunk-B0RBkC1E.js +0 -1
  100. package/chunk-BB1pOOUx.js +0 -1
  101. package/chunk-BIL3nR4_.js +0 -2
  102. package/chunk-BOOAIFTC.js +0 -1
  103. package/chunk-BaGYaLxZ.js +0 -2
  104. package/chunk-Bceym75m.js +0 -1
  105. package/chunk-BfZh4DNq.js +0 -2
  106. package/chunk-BlSN71kd.js +0 -1
  107. package/chunk-Bq7wRTmy.js +0 -2
  108. package/chunk-ByhuT4BS.js +0 -14
  109. package/chunk-CBgNjPex.js +0 -1
  110. package/chunk-CEyp0Xmg.js +0 -1
  111. package/chunk-CFne6FXR.js +0 -1
  112. package/chunk-CGn_EA_5.js +0 -2
  113. package/chunk-CJ1mxauG.js +0 -2
  114. package/chunk-CMJCX33P.js +0 -1
  115. package/chunk-CWAvlP_u.js +0 -1
  116. package/chunk-CYQJGwsB.js +0 -1
  117. package/chunk-Ca-HIRNP.js +0 -1
  118. package/chunk-CegwkGVu.js +0 -3
  119. package/chunk-CgcnOoRq.js +0 -2
  120. package/chunk-Ck9c9Juw.js +0 -1
  121. package/chunk-CnRCpl-v.js +0 -2
  122. package/chunk-CrgyDps4.js +0 -1
  123. package/chunk-DDBflo2l.js +0 -4
  124. package/chunk-Df7q8ewK.js +0 -1
  125. package/chunk-Dgns65Zu.js +0 -2
  126. package/chunk-Dh6x3lXP.js +0 -2
  127. package/chunk-DipTNkHN.js +0 -1
  128. package/chunk-DkdGEw1e.js +0 -1
  129. package/chunk-DtdFhFa9.js +0 -1
  130. package/chunk-DwKPz2Gn.js +0 -3
  131. package/chunk-DwMhABnQ.js +0 -2
  132. package/chunk-HWQc1Hoa.js +0 -1
  133. package/chunk-LL0IHZns.js +0 -1
  134. package/chunk-Zo-grJt3.js +0 -1
  135. package/chunk-glhLCQrb.js +0 -1
  136. package/chunk-yF6CJHRg.js +0 -1
  137. package/main-KFKZO6SJ.js +0 -16
@@ -0,0 +1 @@
1
+ import {a as at}from'./chunk-Crs56mDy.js';import {C}from'./chunk-Bcxzhjj8.js';import {O}from'./chunk-BYJ0fSUP.js';import {T as T$1,e as ee,G as Ge,z as za,h as hw,v,a0 as de,d as N,Q as Qi,V as Vg,n as nC,$ as $l,a1 as dT,p as cm,w as jC,j as vg,C as CE,a2 as fT,x as am,A as yg,Y as Yg,a3 as KC,a4 as uT,U as UC,J as om}from'./main-QLXVXD6E.js';import {U}from'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var D=()=>({maxWidth:"520px",width:"100%"});function z(r,i){if(r&1&&(Qi(0,"div",11)(1,"sh-icon",26),jC(2,"check-circle"),$l(),Qi(3,"span"),jC(4),$l()()),r&2){let o=i.$implicit;CE(4),om(o);}}function J(r,i){if(r&1&&(Qi(0,"div",11)(1,"sh-icon",26),jC(2,"check-circle"),$l(),Qi(3,"span"),jC(4),$l()()),r&2){let o=i.$implicit;CE(4),om(o);}}var T=class r{#n=T$1(O);#e=T$1(ee);#t=T$1(C);hoveringConnect=Ge(false);skipDialogOpen=Ge(false);hasConnectionLink=Ge(false);primaryBenefits=[$localize`Zero-configuration cloud storage`,$localize`Centralized backup reporting and monitoring`,$localize`Remote management from the dashboard`,$localize`Notifications if backups stop running`];secondaryBenefits=[$localize`Get notified if your backups stop working`,$localize`Access AI powered troubleshooting`,$localize`View all backups from one place`];#i=za(()=>{let i=this.#t.state();i=="unknown"||i=="inactive"||this.setWelcomeShown();});setWelcomeShown(){this.#n.setShownWelcomePage().subscribe(()=>{this.#e.navigate([""]);});}openSkipDialog(){this.skipDialogOpen.set(true);}connect(){let i=this.hasConnectionLink()?"/welcome/connect/link":"/welcome/connect/logon";this.#e.navigate([i]);}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=hw({type:r,selectors:[["app-select"]],decls:36,vars:7,consts:()=>{let i;i=$localize`Proceed without connecting to console`;let o;o=$localize`Connect to console`;let n;n=$localize`Consolidate all your backup reports in one place.`;let l;l=$localize`I have a connection link`;let c;c=$localize`Are you sure?`;let O;O=$localize`Cancel`;let b;return b=$localize`Proceed without connecting`,[i,o,n,l,c,O,b,[1,"left"],[1,"actionables"],[1,"without-connecting",3,"click"],[1,"benefits"],[1,"benefit"],["shButton","",1,"connect","outlined","primary",3,"mouseenter","mouseleave","click"],[1,"action"],[1,"connection-link-label"],[1,"primary","raised","connection-link-check",3,"checkedChange","checked"],[3,"shTooltip"],[1,"right"],["src","assets/images/console.avif","alt",""],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"dialog-benefits-header"],[1,"dialog-benefits"],["footer",""],["type","button","shButton","",1,"outlined",3,"click"],[1,"primary"]]},template:function(o,n){o&1&&(Qi(0,"section",7)(1,"div",8)(2,"div",9),Vg("click",function(){return n.openSkipDialog()}),nC(3,0),$l(),Qi(4,"div",10),dT(5,z,5,1,"div",11,uT),$l(),Qi(7,"button",12),Vg("mouseenter",function(){return n.hoveringConnect.set(true)})("mouseleave",function(){return n.hoveringConnect.set(false)})("click",function(){return n.connect()}),Qi(8,"div",13)(9,"h2"),nC(10,1),$l(),Qi(11,"p"),nC(12,2),$l()()(),Qi(13,"div",14)(14,"sh-checkbox",15),cm("checkedChange",function(c){return UC(n.hasConnectionLink,c)||(n.hasConnectionLink=c),c}),$l(),Qi(15,"span"),nC(16,3),$l(),Qi(17,"sh-icon",16),jC(18," information "),$l()()()(),Qi(19,"section",17),vg(20,"img",18),$l(),Qi(21,"sh-dialog",19),cm("isOpenChange",function(c){return UC(n.skipDialogOpen,c)||(n.skipDialogOpen=c),c}),Qi(22,"header",20)(23,"h3"),nC(24,4),$l()(),Qi(25,"div",21)(26,"h4",22),jC(27," You can use Duplicati without a Console connection, but connecting to the Console will expand the capabilities of Duplicati. "),$l(),Qi(28,"div",23),dT(29,J,5,1,"div",11,uT),$l()(),Qi(31,"footer",24)(32,"button",25),Vg("click",function(){return n.skipDialogOpen.set(false)}),nC(33,5),$l(),Qi(34,"button",25),Vg("click",function(){return n.setWelcomeShown()}),nC(35,6),$l()()()),o&2&&(CE(5),fT(n.primaryBenefits),CE(9),am("checked",n.hasConnectionLink),CE(3),yg("shTooltip","Connection links are used for Enterprise and large-scale installations"),CE(2),Yg("hovering",n.hoveringConnect()),CE(2),am("isOpen",n.skipDialogOpen),yg("options",KC(6,D)),CE(8),fT(n.secondaryBenefits));},dependencies:[v,U,de,N,at],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;color:var(--base-11)}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer;margin:0}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.dialog-benefits-header[_ngcontent-%COMP%]{margin-bottom:1rem}.dialog-benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-bottom:2rem}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;color:var(--base-11)}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.connection-link-label[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem}"]})};export{T as default};
@@ -1,2 +1,2 @@
1
- import {O}from'./chunk-C-NgIZiF.js';import {br as x,T,a6 as be,ab as C$1,m,a as T$1,bg as Q,U as Ue,N as Nt,G as Ga,at as h,aZ as ee}from'./main-KFKZO6SJ.js';var S=new x("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});var C=class l{#c=T(S);#g=T(be);#t=T(C$1);#o=T(m);#l=T(T$1);#n=T(Q);#u=T(O);constructor(){this.#l.subscribe("remotecontrol");}repeatRegisterTimer=null;#s=null;#r=0;#h=5;#m=2e3;pendingRefresh=false;state=Ue("unknown");claimUrl=Ue(null);registerUrl=Ue("");customRegisterUrl=Ue("");statusMessage=Nt(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=Ga(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"");});remoteEffect=Ga(()=>{let e=this.#l.remoteControlState();e&&this.#e(e);});pendingRefreshEffect=Ga(()=>{this.#n.isConnectionMethodSet()&&this.pendingRefresh&&(this.pendingRefresh=false,this.refreshRemoteControlStatus());});#a=Nt(()=>{let e=this.#n.getConnectionMethod()==="websocket",i=this.#o.hasWsRemoteControl();return e&&i});#f(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");}#e(e){if(this.#r=0,this.#f(e),this.#a())return;let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegisterWait().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#e(t)});}#i(e){if(this.#s!==null&&(clearTimeout(this.#s),this.#s=null),this.#r>=this.#h){this.state.set("registeringfaulted"),this.#r=0;return}let i=this.#m*Math.pow(2,this.#r);this.#r++,this.#s=setTimeout(()=>{this.#s=null,this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},i);}refreshRemoteControlStatus(){if(!this.#a()){if(!this.#n.isConnectionMethodSet()){this.pendingRefresh=true;return}this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}}beginRemoteRegistration(e=false){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#e(i),error:i=>this.#i(i)});}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}deleteRemoteControl(){let e=this;this.#g.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#e(t),error:t=>e.#i(t)});}});}openConsole(e="/app/machines",i){let t=this.#u.serverSettings(),y=this.#o.systemInfo(),r="https://app.duplicati.com",c=y?.RemoteControlDashboardUrl??"";if(c.length>0&&(r=c),t&&t["remote-control-dashboard-url"]&&(r=t["remote-control-dashboard-url"]),r=new URL(r).origin+e,i){let v=new URLSearchParams(i);r+=`?${v.toString()}`;}this.#c.open(r,"_blank");}static \u0275fac=function(i){return new(i||l)};static \u0275prov=ee({token:l,factory:l.\u0275fac,providedIn:"root"})};
1
+ import {O}from'./chunk-BYJ0fSUP.js';import {bs as x,T,a6 as be,ab as C$1,m,a as T$1,bh as Q,G as Ge,N as Nt,z as za,at as h,aZ as ee}from'./main-QLXVXD6E.js';var S=new x("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});var C=class l{#c=T(S);#g=T(be);#t=T(C$1);#o=T(m);#l=T(T$1);#n=T(Q);#u=T(O);constructor(){this.#l.subscribe("remotecontrol");}repeatRegisterTimer=null;#s=null;#r=0;#h=5;#m=2e3;pendingRefresh=false;state=Ge("unknown");claimUrl=Ge(null);registerUrl=Ge("");customRegisterUrl=Ge("");statusMessage=Nt(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=za(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"");});remoteEffect=za(()=>{let e=this.#l.remoteControlState();e&&this.#e(e);});pendingRefreshEffect=za(()=>{this.#n.isConnectionMethodSet()&&this.pendingRefresh&&(this.pendingRefresh=false,this.refreshRemoteControlStatus());});#a=Nt(()=>{let e=this.#n.getConnectionMethod()==="websocket",i=this.#o.hasWsRemoteControl();return e&&i});#f(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");}#e(e){if(this.#r=0,this.#f(e),this.#a())return;let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegisterWait().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#e(t)});}#i(e){if(this.#s!==null&&(clearTimeout(this.#s),this.#s=null),this.#r>=this.#h){this.state.set("registeringfaulted"),this.#r=0;return}let i=this.#m*Math.pow(2,this.#r);this.#r++,this.#s=setTimeout(()=>{this.#s=null,this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},i);}refreshRemoteControlStatus(){if(!this.#a()){if(!this.#n.isConnectionMethodSet()){this.pendingRefresh=true;return}this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}}beginRemoteRegistration(e=false){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#e(i),error:i=>this.#i(i)});}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}deleteRemoteControl(){let e=this;this.#g.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#e(t),error:t=>e.#i(t)});}});}openConsole(e="/app/machines",i){let t=this.#u.serverSettings(),y=this.#o.systemInfo(),r="https://app.duplicati.com",c=y?.RemoteControlDashboardUrl??"";if(c.length>0&&(r=c),t&&t["remote-control-dashboard-url"]&&(r=t["remote-control-dashboard-url"]),r=new URL(r).origin+e,i){let v=new URLSearchParams(i);r+=`?${v.toString()}`;}this.#c.open(r,"_blank");}static \u0275fac=function(i){return new(i||l)};static \u0275prov=ee({token:l,factory:l.\u0275fac,providedIn:"root"})};
2
2
  export{C,S};
@@ -1 +1 @@
1
- import {OptionsListComponent as Oe}from'./chunk-Dgns65Zu.js';import {I}from'./chunk-DD_QfWih.js';import {F as Fe}from'./chunk-DuIUmwWN.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-DipTNkHN.js';import {L}from'./chunk-C7pjkqKB.js';import {T,ab as C,e as ee$1,aw as W,U as Ue,N as Nt,C as Bu,d as dw,f as N,v,Q as Qi,F as Fg,o as oT,aP as Ul,X as XT,aQ as Wl,s as sm,H as Hl,O as Og,j as mg,P as Pg,z as gg,D as DE,i as iT,w as im,a6 as be,at as h,aZ as ee$2,l as HC,p as DD,y as TD}from'./main-KFKZO6SJ.js';import'./chunk-Dh6x3lXP.js';import'./chunk-khm9J_G0.js';import'./chunk-wyNyzSXi.js';import'./chunk-CegwkGVu.js';import'./chunk-CT9ziigM.js';import'./chunk-D5lj-fQk.js';import'./chunk-D6aNT_wo.js';import'./chunk-OLi7f6y7.js';import'./chunk-B2TXzbpy.js';import'./chunk-CRAg6SRo.js';import'./chunk-Fw6nFDZK.js';import'./chunk-PVmXLw9b.js';var d=class r{#t=T(be);destinationTargetUrl=Ue(null);destinationTestSignal=Ue(null);encryptionForm=Z();temporaryBackupId=Ue(null);updateTargetUrl(e){this.destinationTargetUrl.set(e);}showErrorDialog(e){this.#t.open(h,{data:{title:$localize`Error occured`,message:e,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{}});}static \u0275fac=function(n){return new(n||r)};static \u0275prov=ee$2({token:r,factory:r.\u0275fac,providedIn:"root"})};function ne(r,e){r&1&&(Qi(0,"p"),XT(1,3),Hl());}function oe(r,e){r&1&&(Qi(0,"sh-form-field")(1,"label",11),XT(2,4),Hl(),mg(3,"input",12),DD(),Hl()),r&2&&(DE(3),TD());}var ee=new jn,Z=()=>ee.group({passphrase:ee.control("")}),f=class r{#t=T(C);#e=T(d);#n=T(ee$1);#o=T(W);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=Ue(false);settings=Ue([]);hasEncryptedBackup=Nt(()=>{let e=this.#e.destinationTestSignal();return e==="testing"||typeof e=="string"?true:e?.containsEncryptedBackupFiles??true});passphraseSignal=L(this.encryptionForm.controls.passphrase.valueChanges);showEncryptionField=Ue(false);isValidConfig=Nt(()=>{if(!this.#e.destinationTargetUrl())return false;let n=this.#e.destinationTestSignal();return !(typeof n!="string"&&(n?.containsEncryptedBackupFiles??false)&&!this.passphraseSignal())});next(){let e=this.#e.destinationTargetUrl();if(!e)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let n=this.encryptionForm.value?.passphrase??null,t=[];n?t.push({Name:"--passphrase",Value:n}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(i=>{let o=i.Name?.trim();o&&o!=="--"&&(o.startsWith("--")||(o=`--${o}`),t.push({Name:o,Value:i.Value??""}));}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:e,Settings:t}},temporary:true}).pipe(Bu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:i=>{let o=i.ID;this.#e.temporaryBackupId.set(o),this.#n.navigate(["../select-config"],{relativeTo:this.#o});},error:i=>{console.error(i);}});}back(){this.#n.navigate(["../destination"],{relativeTo:this.#o});}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=dw({type:r,selectors:[["app-import-destination-encryption"]],decls:14,vars:6,consts:()=>{let e;e=$localize`Advanced options`;let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let t;t=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`The backup does not contain encrypted files.`;let o;o=$localize`Enter backup passphrase if defined.`;let P;return P=$localize`Password`,[e,n,t,i,P,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",o,"formControlName","passphrase"]]},template:function(n,t){n&1&&(Qi(0,"form",5),Fg("submit",function(){return t.next()}),oT(1,ne,2,0,"p"),oT(2,oe,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),Ul(4,6),XT(5,0),Wl(),Qi(6,"app-options-list",7),sm("optionsChange",function(o){return HC(t.settings,o)||(t.settings=o),o}),Hl()(),Qi(7,"div",8)(8,"button",9),Fg("click",function(){return t.back()}),Og(9,1),mg(10,"sh-icon"),Pg(),Hl(),Qi(11,"button",10),Og(12,2),mg(13,"sh-icon"),Pg(),Hl()()()),n&2&&(gg("formGroup",t.encryptionForm),DE(),iT(t.hasEncryptedBackup()?-1:1),DE(),iT(t.hasEncryptedBackup()||t.showEncryptionField()?2:-1),DE(4),im("options",t.settings),gg("hasFreeTextSettings",true),DE(5),gg("disabled",!t.isValidConfig()));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var chunkSON5C7BG=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:Z,default:f});export{chunkSON5C7BG as c,d};
1
+ import {OptionsListComponent as Oe}from'./chunk-DAM-4k69.js';import {I}from'./chunk-Bgx4dtaL.js';import {F as Fe}from'./chunk-D3SUPUQT.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-DoYGADYB.js';import {L}from'./chunk-D3d-eReU.js';import {T,ab as C,e as ee$1,aw as W,G as Ge,N as Nt,H as qu,h as hw,d as N,v,Q as Qi,V as Vg,f as aT,aP as ql,n as nC,aQ as Gl,p as cm,$ as $l,L as Lg,j as vg,F as Fg,A as yg,C as CE,i as cT,x as am,a6 as be,at as h,aZ as ee$2,U as UC,s as CD,y as _D}from'./main-QLXVXD6E.js';import'./chunk-CmexLvf7.js';import'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import'./chunk-PONAC1Ya.js';import'./chunk-Crs56mDy.js';import'./chunk-D2aWqPl_.js';var d=class r{#t=T(be);destinationTargetUrl=Ge(null);destinationTestSignal=Ge(null);encryptionForm=Z();temporaryBackupId=Ge(null);updateTargetUrl(e){this.destinationTargetUrl.set(e);}showErrorDialog(e){this.#t.open(h,{data:{title:$localize`Error occured`,message:e,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{}});}static \u0275fac=function(n){return new(n||r)};static \u0275prov=ee$2({token:r,factory:r.\u0275fac,providedIn:"root"})};function ne(r,e){r&1&&(Qi(0,"p"),nC(1,3),$l());}function oe(r,e){r&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,4),$l(),vg(3,"input",12),CD(),$l()),r&2&&(CE(3),_D());}var ee=new jn,Z=()=>ee.group({passphrase:ee.control("")}),f=class r{#t=T(C);#e=T(d);#n=T(ee$1);#o=T(W);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=Ge(false);settings=Ge([]);hasEncryptedBackup=Nt(()=>{let e=this.#e.destinationTestSignal();return e==="testing"||typeof e=="string"?true:e?.containsEncryptedBackupFiles??true});passphraseSignal=L(this.encryptionForm.controls.passphrase.valueChanges);showEncryptionField=Ge(false);isValidConfig=Nt(()=>{if(!this.#e.destinationTargetUrl())return false;let n=this.#e.destinationTestSignal();return !(typeof n!="string"&&(n?.containsEncryptedBackupFiles??false)&&!this.passphraseSignal())});next(){let e=this.#e.destinationTargetUrl();if(!e)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let n=this.encryptionForm.value?.passphrase??null,t=[];n?t.push({Name:"--passphrase",Value:n}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(i=>{let o=i.Name?.trim();o&&o!=="--"&&(o.startsWith("--")||(o=`--${o}`),t.push({Name:o,Value:i.Value??""}));}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:e,Settings:t}},temporary:true}).pipe(qu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:i=>{let o=i.ID;this.#e.temporaryBackupId.set(o),this.#n.navigate(["../select-config"],{relativeTo:this.#o});},error:i=>{console.error(i);}});}back(){this.#n.navigate(["../destination"],{relativeTo:this.#o});}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=hw({type:r,selectors:[["app-import-destination-encryption"]],decls:14,vars:6,consts:()=>{let e;e=$localize`Advanced options`;let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let t;t=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`The backup does not contain encrypted files.`;let o;o=$localize`Enter backup passphrase if defined.`;let P;return P=$localize`Password`,[e,n,t,i,P,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",o,"formControlName","passphrase"]]},template:function(n,t){n&1&&(Qi(0,"form",5),Vg("submit",function(){return t.next()}),aT(1,ne,2,0,"p"),aT(2,oe,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),ql(4,6),nC(5,0),Gl(),Qi(6,"app-options-list",7),cm("optionsChange",function(o){return UC(t.settings,o)||(t.settings=o),o}),$l()(),Qi(7,"div",8)(8,"button",9),Vg("click",function(){return t.back()}),Lg(9,1),vg(10,"sh-icon"),Fg(),$l(),Qi(11,"button",10),Lg(12,2),vg(13,"sh-icon"),Fg(),$l()()()),n&2&&(yg("formGroup",t.encryptionForm),CE(),cT(t.hasEncryptedBackup()?-1:1),CE(),cT(t.hasEncryptedBackup()||t.showEncryptionField()?2:-1),CE(4),am("options",t.settings),yg("hasFreeTextSettings",true),CE(5),yg("disabled",!t.isValidConfig()));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var chunk4VLM5C6N=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:Z,default:f});export{chunk4VLM5C6N as c,d};
@@ -1,2 +1,2 @@
1
- import {T,bu as N,b as g1,af as m1,G as Ga,b8 as ce,d as dw,f as N$1,L as oC,Q as Qi,F as Fg,Y as iC,o as oT,H as Hl,aC as hg,D as DE,i as iT,h as bC,I as Qg,q as PC}from'./main-KFKZO6SJ.js';var k=[[["","title",""]],"*"],M=["[title]","*"];function j(t,S){t&1&&PC(0,"Title");}function E(t,S){t&1&&(Qi(0,"sh-icon",1),PC(1,"caret-down"),Hl());}var I=(()=>{class t{constructor(){this.#e=T(N),this.disableToggle=g1(false),this.isActive=m1(false),this.#t=Ga(()=>{this.disableToggle()&&this.isActive.set(true);}),this.color=g1(null),this.variant=g1(null),this.hostClasses=ce("card",{color:this.color,variant:this.variant});}#e;#t;toggle(){this.isActive.set(!this.isActive());}handleKeyDown(o){this.#e.matches(o,"toggle-card.toggle")&&(o.preventDefault(),this.toggle());}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=dw({type:t,selectors:[["sh-toggle-card"]],hostVars:4,hostBindings:function(i,e){i&2&&(bC(e.hostClasses()),Qg("active",e.isActive()));},inputs:{disableToggle:[1,"disableToggle"],isActive:[1,"isActive"],color:[1,"color"],variant:[1,"variant"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,decls:7,vars:4,consts:[["role","button",3,"click","keydown"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(i,e){i&1&&(oC(k),Qi(0,"h3",0),Fg("click",function(){return e.disableToggle()?null:e.toggle()})("keydown",function(D){return e.disableToggle()?null:e.handleKeyDown(D)}),iC(1,0,null,j,1,0),oT(3,E,2,0,"sh-icon",1),Hl(),Qi(4,"div",2)(5,"div",3),iC(6,1),Hl()()),i&2&&(hg("tabindex",e.disableToggle()?null:"0")("aria-expanded",e.disableToggle()?null:e.isActive()?"true":"false")("aria-disabled",e.disableToggle()?"true":null),DE(3),iT(e.disableToggle()?-1:3));},dependencies:[N$1],styles:[`sh-toggle-card{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}sh-toggle-card.type-a{background-color:transparent;border:var(--border-10)}sh-toggle-card.active .collapsable{grid-template-rows:1fr}sh-toggle-card.active .content{padding:0 1rem 1rem}sh-toggle-card.active .content:empty{padding:0 1rem}sh-toggle-card.active sh-icon.toggle-icon{transform:rotate(180deg)}sh-toggle-card h3{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);padding:1rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-toggle-card sh-icon.toggle-icon{cursor:pointer;transform:rotate(0);transform-origin:center;transition:transform .2s ease}sh-toggle-card .collapsable{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s linear;overflow:hidden}sh-toggle-card .content{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;min-height:0;overflow:hidden}
1
+ import {T,bv as N,b as I1,af as E1,z as za,b9 as ce,h as hw,d as N$1,M as aC,Q as Qi,V as Vg,X as cC,f as aT,$ as $l,aC as mg,C as CE,i as cT,g as NC,Y as Yg,w as jC}from'./main-QLXVXD6E.js';var k=[[["","title",""]],"*"],M=["[title]","*"];function j(t,S){t&1&&jC(0,"Title");}function E(t,S){t&1&&(Qi(0,"sh-icon",1),jC(1,"caret-down"),$l());}var I=(()=>{class t{constructor(){this.#e=T(N),this.disableToggle=I1(false),this.isActive=E1(false),this.#t=za(()=>{this.disableToggle()&&this.isActive.set(true);}),this.color=I1(null),this.variant=I1(null),this.hostClasses=ce("card",{color:this.color,variant:this.variant});}#e;#t;toggle(){this.isActive.set(!this.isActive());}handleKeyDown(o){this.#e.matches(o,"toggle-card.toggle")&&(o.preventDefault(),this.toggle());}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=hw({type:t,selectors:[["sh-toggle-card"]],hostVars:4,hostBindings:function(i,e){i&2&&(NC(e.hostClasses()),Yg("active",e.isActive()));},inputs:{disableToggle:[1,"disableToggle"],isActive:[1,"isActive"],color:[1,"color"],variant:[1,"variant"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,decls:7,vars:4,consts:[["role","button",3,"click","keydown"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(i,e){i&1&&(aC(k),Qi(0,"h3",0),Vg("click",function(){return e.disableToggle()?null:e.toggle()})("keydown",function(D){return e.disableToggle()?null:e.handleKeyDown(D)}),cC(1,0,null,j,1,0),aT(3,E,2,0,"sh-icon",1),$l(),Qi(4,"div",2)(5,"div",3),cC(6,1),$l()()),i&2&&(mg("tabindex",e.disableToggle()?null:"0")("aria-expanded",e.disableToggle()?null:e.isActive()?"true":"false")("aria-disabled",e.disableToggle()?"true":null),CE(3),cT(e.disableToggle()?-1:3));},dependencies:[N$1],styles:[`sh-toggle-card{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}sh-toggle-card.type-a{background-color:transparent;border:var(--border-10)}sh-toggle-card.active .collapsable{grid-template-rows:1fr}sh-toggle-card.active .content{padding:0 1rem 1rem}sh-toggle-card.active .content:empty{padding:0 1rem}sh-toggle-card.active sh-icon.toggle-icon{transform:rotate(180deg)}sh-toggle-card h3{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);padding:1rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-toggle-card sh-icon.toggle-icon{cursor:pointer;transform:rotate(0);transform-origin:center;transition:transform .2s ease}sh-toggle-card .collapsable{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s linear;overflow:hidden}sh-toggle-card .content{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;min-height:0;overflow:hidden}
2
2
  `],encapsulation:2});}}return t})();export{I};
@@ -0,0 +1,2 @@
1
+ import {d}from'./chunk-Bfak-Gjv.js';import'./chunk-DAM-4k69.js';import {t as tn,Q as Qt,l as lt,o as on,k as ke}from'./chunk-BC2-YuwH.js';import'./chunk-BFfFD-XE.js';import'./chunk-CmexLvf7.js';import'./chunk-Bgx4dtaL.js';import'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import {V,G}from'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import {v as ve$1}from'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,e as ee,aw as W,a6 as be,bF as ve,E as D1,G as Ge,N as Nt,at as h,h as hw,v,d as N,a0 as de,u as ue,l as vT,ak as um,Q as Qi,V as Vg,n as nC,$ as $l,f as aT,p as cm,r as kd,U as UC,O as Od,L as Lg,j as vg,F as Fg,al as WC,C as CE,i as cT,x as am,A as yg,o as oC,aD as YC,W as Wg,K as fC,k as iC,w as jC,aP as ql,aQ as Gl,ao as qC,s as CD,a3 as KC,y as _D}from'./main-QLXVXD6E.js';import'./chunk-C3KPTLNN.js';import'./chunk-PONAC1Ya.js';import {F as Fe$1}from'./chunk-D3SUPUQT.js';import {B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt,a as Zt}from'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var Fe=["formRef"],De=["testUrl"],Ee=()=>({maxWidth:"700px",width:"100%"});function Oe(o,i){if(o&1){let e=vT();Qi(0,"button",24),Vg("click",function(){kd(e);let t=iC();return Od(t.openTargetUrlDialog())}),Lg(1,5),vg(2,"sh-icon"),Fg(),$l();}}function fe(o,i){if(o&1){let e=vT();Qi(0,"button",24),Vg("click",function(){kd(e);let t=iC(2);return Od(t.copyTargetUrl())}),Lg(1,7),vg(2,"sh-icon"),Fg(),$l();}}function he(o,i){if(o&1){let e=vT();Qi(0,"sh-menu")(1,"button",15)(2,"sh-icon"),jC(3,"dots-three-vertical"),$l()(),ql(4,25),Qi(5,"button",24),Vg("click",function(){kd(e);let t=iC();return Od(t.openTargetUrlDialog())}),Lg(6,6),vg(7,"sh-icon"),Fg(),$l(),aT(8,fe,3,0,"button",15),Gl(),$l();}if(o&2){iC();let e=qC(0);CE(8),cT(e?8:-1);}}function Pe(o,i){if(o&1){let e=vT();Qi(0,"app-destination-list-item",17)(1,"button",20),Vg("click",function(){kd(e);let t=iC();return Od(t.removeDestination())}),nC(2,8),$l()();}if(o&2){iC();let e=qC(12);yg("destination",e);}}function ye(o,i){if(o&1){let e=vT();Qi(0,"app-destination-list",26),Vg("setDestination",function(t){kd(e);let l=iC();return Od(l.setDestination(t))}),$l();}}function Ae(o,i){if(o&1){let e=vT();Qi(0,"app-single-destination",27),cm("targetUrlChange",function(t){kd(e);let l=iC();return UC(l.targetUrlModel,t)||(l.targetUrlModel=t),Od(t)}),$l();}if(o&2){let e=iC();am("targetUrl",e.targetUrlModel);}}function Me(o,i){o&1&&(Lg(0,4,1),vg(1,"sh-icon",22),Fg());}function Re(o,i){o&1&&(Lg(0,4,2),vg(1,"sh-icon"),Fg());}function Ue(o,i){if(o&1){let e=vT();Qi(0,"sh-dialog",28),cm("isOpenChange",function(t){kd(e);let l=iC();return UC(l.targetUrlDialogOpen,t)||(l.targetUrlDialogOpen=t),Od(t)}),Qi(1,"header",29)(2,"div",30)(3,"h2"),nC(4,9),$l(),Qi(5,"sh-alert",31),nC(6,10),$l()()(),Qi(7,"div",32)(8,"sh-form-field")(9,"textarea",33),cm("ngModelChange",function(t){kd(e);let l=iC();return UC(l.targetUrlCtrl,t)||(l.targetUrlCtrl=t),Od(t)}),$l(),CD(),$l()(),Qi(10,"footer",34)(11,"button",20),Vg("click",function(){kd(e);let t=iC();return Od(t.closeTargetUrlDialog(false))}),jC(12,"Cancel"),$l(),Qi(13,"button",35),Vg("click",function(){kd(e);let t=iC();return Od(t.closeTargetUrlDialog(true))}),Lg(14,11),vg(15,"sh-icon"),Fg(),$l()()();}if(o&2){let e=iC();am("isOpen",e.targetUrlDialogOpen),yg("options",KC(3,Ee)),CE(9),am("ngModel",e.targetUrlCtrl),_D();}}var w=class o{#i=T(ee);#o=T(W);#n=T(be);injector=T(ve);#e=T(d);formRef=D1.required("formRef");testUrlComponent=D1.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=Ge(null);targetUrlInitial=Ge(null);targetUrlDialogOpen=Ge(false);toggleNewDestination=Ge(true);selectedDestinationType=Nt(()=>{let i=this.#e.destinationTargetUrl();return i?V(i):null});selectedDestinationTypeOption=Nt(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,sourceDescription:i.sourceDescription??null,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"");}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(i=false){this.targetUrlDialogOpen.set(false);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e);}setDestination(i){let e=G(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`);}}removeDestination(){this.#e.updateTargetUrl(null);}goBack(){this.#i.navigate(["/"]);}next(){let i=this.testSignal();if(i===null){this.#n.open(h,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(false)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(h,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}});}):this.#t();}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(h,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t();}});return}this.#t();}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-import-destination-destination"]],viewQuery:function(e,n){e&1&&Wg(n.formRef,Fe,5)(n.testUrlComponent,De,5),e&2&&fC(2);},features:[YC([ke])],decls:25,vars:18,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=oC(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let l;l=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let L;L=$localize`Change`;let b;b=$localize`Edit target URL`;let B;B=$localize`Be careful, this will overwrite everything you have in your destination.`;let G;return G=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,l,g,L,b,B,G,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=vT();um(0),Qi(1,"form",12,0),Vg("submit",function(){return n.next()}),Qi(3,"header")(4,"h3",13)(5,"span"),nC(6,2),$l(),Qi(7,"div",14),aT(8,Oe,3,0,"button",15)(9,he,9,1,"sh-menu"),$l()(),Qi(10,"app-test-url",16,1),cm("targetUrlChange",function(g){return kd(t),UC(n.targetUrlModel,g)||(n.targetUrlModel=g),Od(g)})("testSignalChange",function(g){return kd(t),UC(n.testSignal,g)||(n.testSignal=g),Od(g)}),$l(),um(12),aT(13,Pe,3,1,"app-destination-list-item",17),$l(),aT(14,ye,1,0,"app-destination-list"),aT(15,Ae,1,1,"app-single-destination",18),Qi(16,"div",19)(17,"button",20),Vg("click",function(){return n.goBack()}),Lg(18,3),vg(19,"sh-icon"),Fg(),$l(),Qi(20,"button",21),Lg(21,4),aT(22,Me,2,0,"sh-icon",22)(23,Re,2,0,"sh-icon"),Fg(),$l()()(),aT(24,Ue,16,4,"sh-dialog",23);}if(e&2){let t=WC(!!n.targetUrlModel());CE(8),cT(t?9:8),CE(2),am("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),yg("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",false)("testExpectation","containsBackup")("readOnlyTest",true)("moduleType","Backend"),CE(2);let l=WC(n.selectedDestinationTypeOption());CE(),cT(l?13:-1),CE(),cT(t?-1:14),CE(),cT(t?15:-1),CE(5),yg("disabled",n.testSignal()=="testing"||!t),CE(2),cT(n.testSignal()=="testing"?22:23),CE(2),cT(n.targetUrlDialogOpen()?24:-1);}},dependencies:[tn,Qt,lt,Bn,Tn,Ze,Rn,Pn,Jt,Zt,v,Fe$1,ve$1,N,de,ue,on],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"]})};
2
+ export{w as default};
@@ -1 +1 @@
1
- import {e as ee}from'./chunk-B0RBkC1E.js';import'./chunk-BB1pOOUx.js';import'./chunk-DN6f5jXR.js';import'./chunk-3RXp81pP.js';import'./chunk-CT9ziigM.js';import'./chunk-D5lj-fQk.js';import'./chunk-OLi7f6y7.js';import'./chunk-B2TXzbpy.js';import {T,aw as W,a5 as g,ab as C,a6 as be,U as Ue,aG as pt,N as Nt,G as Ga,aE as Fo,C as Bu,at as h,d as dw,v,f as N$1,_ as _t,j as mg,Q as Qi,O as Og,P as Pg,H as Hl,X as XT,F as Fg,s as sm,p as DD,o as oT,D as DE,au as Lg,av as eC,I as Qg,z as gg,h as bC,w as im,y as TD,i as iT,l as HC,aU as ny,aV as ry,q as PC}from'./main-KFKZO6SJ.js';import'./chunk-CRAg6SRo.js';import {F as Fe}from'./chunk-DuIUmwWN.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-DipTNkHN.js';import {a as at}from'./chunk-Fw6nFDZK.js';import'./chunk-Ca1C9pJ0.js';import'./chunk-C-NgIZiF.js';import {L,F}from'./chunk-C7pjkqKB.js';import'./chunk-PVmXLw9b.js';function ue(_,t){_&1&&(Qi(0,"sh-icon",20),PC(1,"spinner"),Hl());}function pe(_,t){_&1&&(Qi(0,"sh-icon",21),PC(1,"check"),Hl());}function he(_,t){_&1&&(Qi(0,"sh-icon",22),PC(1,"warning"),Hl()),_&2&&gg("shTooltip","File not found");}function Te(_,t){let a=F(_).pipe(ny(t),ry());return L(a,{initialValue:_()})}var N=class _{#o=T(W);#s=T(g);#e=T(C);#a=T(be);#t=Ue("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ue("");lastValidatedPath=Ue("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ue(false);#i=Te(this.backupFilePath,500);#n=Ue(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=Ga(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(Fo(1),Bu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ue(false);isRepairing=Ue(false);isDeleting=Ue(false);isSavingDbPath=Ue(false);isSavingAndRepairing=Ue(false);isMovingDb=Ue(false);isCreatingBugReport=Ue(false);createdReport=Ue(false);isCompacting=Ue(false);activeBackupEffect=Ga(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{}}).pipe(Fo(1),Bu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(Bu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(Bu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(Bu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),this.#e.postApiV1BackupByIdCompact({id:this.backupId()}).pipe(Bu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=dw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let r;r=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let O;O=$localize`Placement`;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let y;return y=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,S,f,I,M,R,B,O,$,v,k,y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(mg(0,"app-status-bar"),Qi(1,"section")(2,"div",15)(3,"button",16),Og(4,0),mg(5,"sh-icon"),Pg(),Hl()(),Qi(6,"article")(7,"h1"),XT(8,1),Hl(),Qi(9,"p"),XT(10,2),Hl()(),Qi(11,"article")(12,"h2"),XT(13,3),Hl(),Qi(14,"p"),XT(15,4),Hl(),Qi(16,"div",17)(17,"button",18),Fg("click",function(){return e.repairDatabase()}),Og(18,5),mg(19,"sh-icon"),Pg(),Hl(),Qi(20,"button",18),Fg("click",function(){return e.deleteDatabase()}),Og(21,6),mg(22,"sh-icon"),Pg(),Hl(),Qi(23,"button",18),Fg("click",function(){return e.restoreDatabase()}),Og(24,7),mg(25,"sh-icon"),Pg(),Hl(),Qi(26,"button",18),Fg("click",function(){return e.createErrorReport()}),Og(27,8),mg(28,"sh-icon"),Pg(),Hl(),Qi(29,"button",18),Fg("click",function(){return e.compactDatabase()}),Og(30,9),mg(31,"sh-icon"),Pg(),Hl()()(),Qi(32,"article")(33,"h2"),XT(34,10),Hl(),Qi(35,"sh-form-field")(36,"input",19),sm("ngModelChange",function(S){return HC(e.backupFilePath,S)||(e.backupFilePath=S),S}),Hl(),DD(),oT(37,ue,2,0,"sh-icon",20)(38,pe,2,0,"sh-icon",21)(39,he,2,1,"sh-icon",22),Hl(),Qi(40,"div",23)(41,"button",18),Fg("click",function(){return e.resetDatabasePath()}),Og(42,11),mg(43,"sh-icon"),Pg(),Hl(),Qi(44,"button",18),Fg("click",function(){return e.saveDatabasePath()}),Og(45,12),mg(46,"sh-icon"),Pg(),Hl(),Qi(47,"button",18),Fg("click",function(){return e.saveAndRepairDatabasePath()}),Og(48,13),mg(49,"sh-icon"),Pg(),Hl(),Qi(50,"button",18),Fg("click",function(){return e.moveDatabasePath()}),Og(51,14),mg(52,"sh-icon"),Pg(),Hl()()()()),a&2&&(DE(8),Lg(e.activeBackup()?.Backup?.Name),eC(8),DE(9),Qg("loading",e.isRepairing()),gg("disabled",!e.isValidatedPath()||e.pathHasChanged()),DE(3),Qg("loading",e.isDeleting()),gg("disabled",!e.isValidatedPath()||e.pathHasChanged()),DE(3),Qg("loading",e.isRestoring()),gg("disabled",e.pathHasChanged()),DE(3),Qg("loading",e.isCreatingBugReport()),gg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),DE(3),Qg("loading",e.isCompacting()),gg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),DE(6),bC(e.isValidatedPath()?"success":"error"),DE(),im("ngModel",e.backupFilePath),TD(),DE(),iT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),DE(4),gg("disabled",!e.pathHasChanged()),DE(3),gg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),DE(3),gg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),DE(3),gg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,ee,v,Fe,N$1,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{N as default};
1
+ import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,aw as W,a5 as g,ab as C,a6 as be,G as Ge,aG as pt,N as Nt,z as za,aE as jo,H as qu,at as h,h as hw,v,d as N$1,_ as _t,j as vg,Q as Qi,L as Lg,F as Fg,$ as $l,n as nC,V as Vg,p as cm,s as CD,f as aT,C as CE,au as jg,av as rC,Y as Yg,A as yg,g as NC,x as am,y as _D,i as cT,U as UC,aU as iy,aV as sy,w as jC}from'./main-QLXVXD6E.js';import'./chunk-PONAC1Ya.js';import {F as Fe}from'./chunk-D3SUPUQT.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-DoYGADYB.js';import {a as at}from'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import {L,F}from'./chunk-D3d-eReU.js';import'./chunk-D2aWqPl_.js';function ue(_,t){_&1&&(Qi(0,"sh-icon",20),jC(1,"spinner"),$l());}function pe(_,t){_&1&&(Qi(0,"sh-icon",21),jC(1,"check"),$l());}function he(_,t){_&1&&(Qi(0,"sh-icon",22),jC(1,"warning"),$l()),_&2&&yg("shTooltip","File not found");}function Te(_,t){let a=F(_).pipe(iy(t),sy());return L(a,{initialValue:_()})}var N=class _{#o=T(W);#s=T(g);#e=T(C);#a=T(be);#t=Ge("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ge("");lastValidatedPath=Ge("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ge(false);#i=Te(this.backupFilePath,500);#n=Ge(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=za(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(jo(1),qu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ge(false);isRepairing=Ge(false);isDeleting=Ge(false);isSavingDbPath=Ge(false);isSavingAndRepairing=Ge(false);isMovingDb=Ge(false);isCreatingBugReport=Ge(false);createdReport=Ge(false);isCompacting=Ge(false);activeBackupEffect=za(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),qu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(jo(1),qu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{}}).pipe(jo(1),qu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(qu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),qu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(qu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(qu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),this.#e.postApiV1BackupByIdCompact({id:this.backupId()}).pipe(qu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=hw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let r;r=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let O;O=$localize`Placement`;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let y;return y=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,S,f,I,M,R,B,O,$,v,k,y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"div",15)(3,"button",16),Lg(4,0),vg(5,"sh-icon"),Fg(),$l()(),Qi(6,"article")(7,"h1"),nC(8,1),$l(),Qi(9,"p"),nC(10,2),$l()(),Qi(11,"article")(12,"h2"),nC(13,3),$l(),Qi(14,"p"),nC(15,4),$l(),Qi(16,"div",17)(17,"button",18),Vg("click",function(){return e.repairDatabase()}),Lg(18,5),vg(19,"sh-icon"),Fg(),$l(),Qi(20,"button",18),Vg("click",function(){return e.deleteDatabase()}),Lg(21,6),vg(22,"sh-icon"),Fg(),$l(),Qi(23,"button",18),Vg("click",function(){return e.restoreDatabase()}),Lg(24,7),vg(25,"sh-icon"),Fg(),$l(),Qi(26,"button",18),Vg("click",function(){return e.createErrorReport()}),Lg(27,8),vg(28,"sh-icon"),Fg(),$l(),Qi(29,"button",18),Vg("click",function(){return e.compactDatabase()}),Lg(30,9),vg(31,"sh-icon"),Fg(),$l()()(),Qi(32,"article")(33,"h2"),nC(34,10),$l(),Qi(35,"sh-form-field")(36,"input",19),cm("ngModelChange",function(S){return UC(e.backupFilePath,S)||(e.backupFilePath=S),S}),$l(),CD(),aT(37,ue,2,0,"sh-icon",20)(38,pe,2,0,"sh-icon",21)(39,he,2,1,"sh-icon",22),$l(),Qi(40,"div",23)(41,"button",18),Vg("click",function(){return e.resetDatabasePath()}),Lg(42,11),vg(43,"sh-icon"),Fg(),$l(),Qi(44,"button",18),Vg("click",function(){return e.saveDatabasePath()}),Lg(45,12),vg(46,"sh-icon"),Fg(),$l(),Qi(47,"button",18),Vg("click",function(){return e.saveAndRepairDatabasePath()}),Lg(48,13),vg(49,"sh-icon"),Fg(),$l(),Qi(50,"button",18),Vg("click",function(){return e.moveDatabasePath()}),Lg(51,14),vg(52,"sh-icon"),Fg(),$l()()()()),a&2&&(CE(8),jg(e.activeBackup()?.Backup?.Name),rC(8),CE(9),Yg("loading",e.isRepairing()),yg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isDeleting()),yg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isRestoring()),yg("disabled",e.pathHasChanged()),CE(3),Yg("loading",e.isCreatingBugReport()),yg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isCompacting()),yg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),CE(6),NC(e.isValidatedPath()?"success":"error"),CE(),am("ngModel",e.backupFilePath),_D(),CE(),cT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),CE(4),yg("disabled",!e.pathHasChanged()),CE(3),yg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),yg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),yg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,ee,v,Fe,N$1,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{N as default};
@@ -1,2 +1,2 @@
1
- import {J}from'./chunk-khm9J_G0.js';import {T,ah as fe$1,a6 as be,ab as C,a5 as g,e as ee,U as Ue,C as Bu,at as h,d as dw,_ as _t,f as N,v,Q as Qi,O as Og,j as mg,H as Hl,F as Fg,P as Pg,o as oT,X as XT,p as DD,D as DE,z as gg,a3 as QC,I as Qg,i as iT,y as TD,t as tC,ae as Jr,B as y1,b as g1,af as m1,N as Nt,G as Ga,L as oC,Y as iC,q as PC,h as bC,aC as hg,$ as $g,K as lC,n as nC,E as nm,aa as Gl}from'./main-KFKZO6SJ.js';import {F as Fe$1}from'./chunk-DuIUmwWN.js';import {j as jn,G as Gn,T as Tn,Z as Ze,y as yt,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-DipTNkHN.js';var de=["input"],me=[[["label"]]],fe=["label"],Fe=["ngProjectAs","label",5,["label"]];function _e(n,o){if(n&1&&(Qi(0,"div",3),PC(1),Hl()),n&2){let e=nC();DE(),nm(e.files()[0].name);}}function ge(n,o){if(n&1&&(Qi(0,"div",3),PC(1),Hl()),n&2){let e=nC();DE(),Gl("",e.files().length," files selected");}}function he(n,o){if(n&1&&(Qi(0,"div",4),PC(1),Hl()),n&2){let e=nC();DE(),nm(e.filesOver()?e.overlayText():e.placeholder());}}var ce=(()=>{class n{constructor(){this._el=T(Jr),this.inputRef=y1.required("input"),this.filesOver=Ue(false),this.multiple=g1(),this.accept=g1(null),this.placeholder=m1("Click or drag files here"),this.overlayText=g1("Drop files here"),this.files=m1([]),this.fileUploadClasses=Nt(()=>this._el.nativeElement.classList.toString()),this.inputEffect=Ga(()=>{let e=this.inputRef().nativeElement;e&&(e.placeholder&&this.placeholder.set(e.placeholder),e.addEventListener("dragover",t=>{t.preventDefault(),this.filesOver.set(true);}),e.addEventListener("dragleave",t=>{t.preventDefault(),this.filesOver.set(false);}),e.addEventListener("drop",t=>{t.preventDefault(),this.filesOver.set(false);let i=t.dataTransfer?.files;i&&i.length>0&&(this.handleFileUpload(Array.from(i)),e.files=i);}),e.addEventListener("change",t=>{t.preventDefault(),this.handleFileUpload(Array.from(t.target.files));}));});}handleFileUpload(e){this.multiple()?this.files.update(t=>[...t,...e]):this.files.set(e);}static{this.\u0275fac=function(t){return new(t||n)};}static{this.\u0275cmp=dw({type:n,selectors:[["sh-file-upload"]],viewQuery:function(t,i){t&1&&$g(i.inputRef,de,5),t&2&&lC();},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:fe,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(t,i){t&1&&(oC(me),Qi(0,"sh-form-field"),iC(1,0,Fe),Qi(2,"div",2,0),oT(4,_e,2,1,"div",3)(5,ge,2,1,"div",3)(6,he,2,1,"div",4),mg(7,"input",5,1)(9,"div",6),Hl(),Qi(10,"sh-icon",7),PC(11,"upload-simple"),Hl()()),t&2&&(bC(i.fileUploadClasses()),DE(4),iT(i.files().length===1?4:i.files().length>1?5:6),DE(3),hg("multiple",i.multiple())("accept",i.accept()),DE(2),Qg("files-over",i.filesOver()));},dependencies:[Fe$1,N],styles:[`sh-file-upload{--fu-bg-active: rgba(0, 0, 0, .1);display:flex;flex-direction:column;gap:.75rem;position:relative;width:100%}sh-file-upload sh-list{border-radius:var(--shape-3);background-color:var(--base-2)}sh-file-upload .files-text,sh-file-upload .placeholder{color:var(--base-8);font:var(--paragraph-30B)}sh-file-upload input{position:absolute;opacity:0;inset:0;cursor:pointer;z-index:100}sh-file-upload .bg-overlay{opacity:0;position:absolute;inset:.0625rem;background-color:var(--fu-bg-active);transition:opacity 125ms linear;z-index:0;border-radius:var(--ff-s)}sh-file-upload .bg-overlay.files-over{opacity:1}
2
- `],encapsulation:2});}}return n})();var Te=()=>["/"];function Ce(n,o){n&1&&(Qi(0,"sh-form-field")(1,"label",14),XT(2,3),Hl(),mg(3,"input",15),DD(),Hl()),n&2&&(DE(3),TD());}var d=new jn,M=class n{#t=T(fe$1);#i=T(be);#o=T(C);#n=T(g);#e=T(ee);isImporting=Ue(false);isSecureFile=Ue(false);isValid=Ue(false);importForm=d.group({config:d.control(""),cmdline:d.control(false),import_metadata:d.control(false),direct:d.control(false),passphrase:d.control("")});selectedFile=Ue([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#a.bind(this),t.readAsArrayBuffer(e);}}#a(o){let e=o.target?.result;this.isSecureFile.set(this.#r(e)!=="json"),this.importForm.patchValue({config:this.#l(e)}),this.isValid.set(this.importForm.value.config!=="");}#r(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return "aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return "json"}catch{}return "unknown"}#l(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let s=0;s<t;s++)i+=String.fromCharCode(e[s]);return btoa(i)}submit(){this.isImporting.set(true);let o=this.importForm.value.direct??false;this.#o.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(Bu(()=>this.isImporting.set(false))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t]);},error:e=>{let t=e.message||$localize`Unknown error`;this.#i.open(h,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}});}});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=dw({type:n,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=tC(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(e,t){e&1&&(Qi(0,"header")(1,"h3"),Og(2,0),Qi(3,"div",4)(4,"button",5),mg(5,"sh-icon"),Hl(),Qi(6,"button",6),Fg("click",function(){return t.submit()}),mg(7,"sh-icon"),Hl()(),Pg(),Hl()(),Qi(8,"form",7)(9,"sh-file-upload",8),Fg("filesChange",function(s){return t.onFileDropped(s)}),Hl(),oT(10,Ce,4,0,"sh-form-field"),Qi(11,"sh-toggle",9)(12,"label",10),XT(13,1),Hl(),mg(14,"input",11),DD(),Hl(),Qi(15,"sh-toggle",9)(16,"label",12),XT(17,2),Hl(),mg(18,"input",13),DD(),Hl()()),e&2&&(DE(4),gg("routerLink",QC(7,Te)),DE(2),Qg("loading",t.isImporting()),gg("disabled",t.isImporting()||!t.isValid()),DE(2),gg("formGroup",t.importForm),DE(),gg("files",t.selectedFile()),DE(),iT(t.isSecureFile()?10:-1),DE(4),TD(),DE(4),TD());},dependencies:[Gn,Tn,Ze,yt,Rn,Pn,gn,hn,_t,Fe$1,N,v,J,ce],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"]})};export{M as default};
1
+ import {J}from'./chunk-D7AP6g7S.js';import {T,ah as fe$1,a6 as be,ab as C,a5 as g,e as ee,G as Ge,H as qu,at as h,h as hw,_ as _t,d as N,v,Q as Qi,L as Lg,j as vg,$ as $l,V as Vg,F as Fg,f as aT,n as nC,s as CD,C as CE,A as yg,a3 as KC,Y as Yg,i as cT,y as _D,o as oC,ae as eo,E as D1,b as I1,af as E1,N as Nt,z as za,M as aC,X as cC,w as jC,g as NC,aC as mg,W as Wg,K as fC,k as iC,J as om,aa as Ql}from'./main-QLXVXD6E.js';import {F as Fe$1}from'./chunk-D3SUPUQT.js';import {j as jn,G as Gn,T as Tn,Z as Ze,y as yt,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-DoYGADYB.js';var de=["input"],me=[[["label"]]],fe=["label"],Fe=["ngProjectAs","label",5,["label"]];function _e(n,o){if(n&1&&(Qi(0,"div",3),jC(1),$l()),n&2){let e=iC();CE(),om(e.files()[0].name);}}function ge(n,o){if(n&1&&(Qi(0,"div",3),jC(1),$l()),n&2){let e=iC();CE(),Ql("",e.files().length," files selected");}}function he(n,o){if(n&1&&(Qi(0,"div",4),jC(1),$l()),n&2){let e=iC();CE(),om(e.filesOver()?e.overlayText():e.placeholder());}}var ce=(()=>{class n{constructor(){this._el=T(eo),this.inputRef=D1.required("input"),this.filesOver=Ge(false),this.multiple=I1(),this.accept=I1(null),this.placeholder=E1("Click or drag files here"),this.overlayText=I1("Drop files here"),this.files=E1([]),this.fileUploadClasses=Nt(()=>this._el.nativeElement.classList.toString()),this.inputEffect=za(()=>{let e=this.inputRef().nativeElement;e&&(e.placeholder&&this.placeholder.set(e.placeholder),e.addEventListener("dragover",t=>{t.preventDefault(),this.filesOver.set(true);}),e.addEventListener("dragleave",t=>{t.preventDefault(),this.filesOver.set(false);}),e.addEventListener("drop",t=>{t.preventDefault(),this.filesOver.set(false);let i=t.dataTransfer?.files;i&&i.length>0&&(this.handleFileUpload(Array.from(i)),e.files=i);}),e.addEventListener("change",t=>{t.preventDefault(),this.handleFileUpload(Array.from(t.target.files));}));});}handleFileUpload(e){this.multiple()?this.files.update(t=>[...t,...e]):this.files.set(e);}static{this.\u0275fac=function(t){return new(t||n)};}static{this.\u0275cmp=hw({type:n,selectors:[["sh-file-upload"]],viewQuery:function(t,i){t&1&&Wg(i.inputRef,de,5),t&2&&fC();},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:fe,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(t,i){t&1&&(aC(me),Qi(0,"sh-form-field"),cC(1,0,Fe),Qi(2,"div",2,0),aT(4,_e,2,1,"div",3)(5,ge,2,1,"div",3)(6,he,2,1,"div",4),vg(7,"input",5,1)(9,"div",6),$l(),Qi(10,"sh-icon",7),jC(11,"upload-simple"),$l()()),t&2&&(NC(i.fileUploadClasses()),CE(4),cT(i.files().length===1?4:i.files().length>1?5:6),CE(3),mg("multiple",i.multiple())("accept",i.accept()),CE(2),Yg("files-over",i.filesOver()));},dependencies:[Fe$1,N],styles:[`sh-file-upload{--fu-bg-active: rgba(0, 0, 0, .1);display:flex;flex-direction:column;gap:.75rem;position:relative;width:100%}sh-file-upload sh-list{border-radius:var(--shape-3);background-color:var(--base-2)}sh-file-upload .files-text,sh-file-upload .placeholder{color:var(--base-8);font:var(--paragraph-30B)}sh-file-upload input{position:absolute;opacity:0;inset:0;cursor:pointer;z-index:100}sh-file-upload .bg-overlay{opacity:0;position:absolute;inset:.0625rem;background-color:var(--fu-bg-active);transition:opacity 125ms linear;z-index:0;border-radius:var(--ff-s)}sh-file-upload .bg-overlay.files-over{opacity:1}
2
+ `],encapsulation:2});}}return n})();var Te=()=>["/"];function Ce(n,o){n&1&&(Qi(0,"sh-form-field")(1,"label",14),nC(2,3),$l(),vg(3,"input",15),CD(),$l()),n&2&&(CE(3),_D());}var d=new jn,M=class n{#t=T(fe$1);#i=T(be);#o=T(C);#n=T(g);#e=T(ee);isImporting=Ge(false);isSecureFile=Ge(false);isValid=Ge(false);importForm=d.group({config:d.control(""),cmdline:d.control(false),import_metadata:d.control(false),direct:d.control(false),passphrase:d.control("")});selectedFile=Ge([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#a.bind(this),t.readAsArrayBuffer(e);}}#a(o){let e=o.target?.result;this.isSecureFile.set(this.#r(e)!=="json"),this.importForm.patchValue({config:this.#l(e)}),this.isValid.set(this.importForm.value.config!=="");}#r(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return "aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return "json"}catch{}return "unknown"}#l(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let s=0;s<t;s++)i+=String.fromCharCode(e[s]);return btoa(i)}submit(){this.isImporting.set(true);let o=this.importForm.value.direct??false;this.#o.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(qu(()=>this.isImporting.set(false))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t]);},error:e=>{let t=e.message||$localize`Unknown error`;this.#i.open(h,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}});}});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=oC(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(e,t){e&1&&(Qi(0,"header")(1,"h3"),Lg(2,0),Qi(3,"div",4)(4,"button",5),vg(5,"sh-icon"),$l(),Qi(6,"button",6),Vg("click",function(){return t.submit()}),vg(7,"sh-icon"),$l()(),Fg(),$l()(),Qi(8,"form",7)(9,"sh-file-upload",8),Vg("filesChange",function(s){return t.onFileDropped(s)}),$l(),aT(10,Ce,4,0,"sh-form-field"),Qi(11,"sh-toggle",9)(12,"label",10),nC(13,1),$l(),vg(14,"input",11),CD(),$l(),Qi(15,"sh-toggle",9)(16,"label",12),nC(17,2),$l(),vg(18,"input",13),CD(),$l()()),e&2&&(CE(4),yg("routerLink",KC(7,Te)),CE(2),Yg("loading",t.isImporting()),yg("disabled",t.isImporting()||!t.isValid()),CE(2),yg("formGroup",t.importForm),CE(),yg("files",t.selectedFile()),CE(),cT(t.isSecureFile()?10:-1),CE(4),_D(),CE(4),_D());},dependencies:[Gn,Tn,Ze,yt,Rn,Pn,gn,hn,_t,Fe$1,N,v,J,ce],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"]})};export{M as default};
@@ -1 +1 @@
1
- import {f}from'./chunk-DPNAj9Vc.js';import {d}from'./chunk-CRAg6SRo.js';import {F as Fe$1}from'./chunk-DuIUmwWN.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-DipTNkHN.js';import {T,e as ee,g,m,a as T$1,U as Ue,b as g1,N as Nt,r as rt,G as Ga,c as me$1,d as dw,_ as _t,v,u as ue$1,f as N,Q as Qi,o as oT,H as Hl,h as bC,J as JC,D as DE,i as iT,t as tC,O as Og,P as Pg,j as mg,n as nC,k as gT,X as XT,s as sm,S as Sd,l as HC,x as xd,p as DD,q as PC,F as Fg,w as im,y as TD,z as gg}from'./main-KFKZO6SJ.js';import {S,C}from'./chunk-Ca1C9pJ0.js';import {O}from'./chunk-C-NgIZiF.js';import'./chunk-C7pjkqKB.js';var re=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function ae(n,t){n&1&&XT(0,0,1);}function le(n,t){n&1&&XT(0,0,2);}function se(n,t){if(n&1){let e=gT();Qi(0,"button",10),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.cancel())}),PC(1,"Cancel registration"),Hl();}}function ce(n,t){if(n&1&&(Qi(0,"div",7)(1,"p"),Og(2,0),oT(3,ae,1,0)(4,le,1,0),Pg(),Hl(),mg(5,"sh-progress-bar",8),oT(6,se,2,0,"button",9),Hl()),n&2){let e=nC();DE(3),iT(e.state()==="unknown"?3:4),DE(3),iT((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1);}}function de(n,t){if(n&1){let e=gT();Qi(0,"sh-form-field")(1,"label",11),XT(2,1),Hl(),Qi(3,"input",12),sm("ngModelChange",function(o){Sd(e);let C=nC();return HC(C.customRegisterUrl,o)||(C.customRegisterUrl=o),xd(o)}),Hl(),DD(),Hl(),Qi(4,"div",13)(5,"button",14),PC(6,"Go back"),Hl(),Qi(7,"button",15),Fg("click",function(){Sd(e);let o=nC();return xd(o.registerViaCustomUrl())}),XT(8,2),Hl()();}if(n&2){let e=nC();DE(3),im("ngModel",e.customRegisterUrl),TD(),DE(4),gg("disabled",!e.customRegisterUrlValid());}}function _e(n,t){if(n&1){let e=gT();Qi(0,"p"),XT(1,3),Hl(),mg(2,"sh-progress-bar",8),Qi(3,"button",10),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.retryWhenFaulted())}),PC(4,"Cancel"),Hl();}}function ue(n,t){if(n&1){let e=gT();Qi(0,"p"),XT(1,4),Hl(),Qi(2,"button",10),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.retryWhenFaulted())}),PC(3,"Retry"),Hl();}}function Ce(n,t){if(n&1&&oT(0,_e,5,0)(1,ue,4,0),n&2){let e=nC();iT(e.claimUrl()!==null?0:1);}}function ge(n,t){n&1&&(Og(0,5,1),mg(1,"p"),Pg());}function me(n,t){n&1&&(Og(0,5,2),mg(1,"p"),Pg());}function Fe(n,t){if(n&1){let e=gT();Qi(0,"sh-alert",16),Og(1,5),oT(2,ge,2,0,"p")(3,me,2,0,"p"),Pg(),Hl(),Qi(4,"button",10),Fg("click",function(){Sd(e);let o=nC();return xd(o.retryWhenFaulted())}),PC(5," Retry "),Qi(6,"sh-icon"),PC(7,"arrow-arc-left"),Hl()();}if(n&2){let e=nC();DE(2),iT(e.typeParam()==="link"?2:3);}}function fe(n,t){n&1&&(Qi(0,"h3"),PC(1,"Successfully connected"),Hl(),Qi(2,"p"),PC(3,"We're going to redirect you to the home page"),Hl());}var R=class n{#n=T(ee);#a=T(S);#e=T(C);#i=T(O);#l=T(g);#s=T(m);#c=T(T$1);isOldOpen=Ue(false);typeParam=g1.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=Nt(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=Ue(false);customRegisterUrlValid=Nt(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return !(t.length===0||!e.test(t))});registeringCounter=Ue(null);didTry=false;triedFinishConnection=false;#t=null;#d=T(rt);constructor(){this.#d.onDestroy(()=>{this.#r();});}ngAfterViewInit(){(this.#l.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket")==="websocket"&&this.#c.reconnectIfNeeded();}stateEffect=Ga(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=true,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||me$1(()=>this.claimUrl())!==null&&(this.triedFinishConnection=true,this.#_())),e==="registering"?me$1(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o();}):(this.#r(),me$1(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""]);});});});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o();},1e3);}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null);}ngOnInit(){this.#e.refreshRemoteControlStatus();}#_(){let t=this.#e.claimUrl();this.#a.open(`${t}?closeAfterConnection=true`,"_blank");}registerViaCustomUrl(){this.#e.beginRemoteRegistration(true);}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=false,this.triedFinishConnection=false,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"]);}cancel(){this.#e.cancelRemoteRegistration();}register(){this.#e.beginRemoteRegistration();}disable(){this.#e.disableRemoteControl();}enable(){this.#e.enableRemoteControl();}delete(){this.#e.deleteRemoteControl();}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(true),setTimeout(()=>this.copiedReportingUrl.set(false),2e3),navigator.clipboard.writeText(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=dw({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let m;return m=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=tC(m),[t,e,i,o,C,m,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(Qi(0,"sh-card",6),oT(1,ce,7,2,"div",7),oT(2,de,9,2),oT(3,Ce,2,1),oT(4,Fe,8,1),oT(5,fe,4,0),Hl()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",m=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";bC(JC(7,re,o,C,m,g,i.state()==="registered")),DE(),iT(o?1:-1),DE(),iT(C?2:-1),DE(),iT(i.state()==="registered"?3:-1),DE(),iT(g?4:-1),DE(),iT(m?5:-1);}},dependencies:[_t,Bn,Ze,Rn,Jt,Fe$1,v,d,f,ue$1,N],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"]})};export{R as default};
1
+ import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import {F as Fe$1}from'./chunk-D3SUPUQT.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-DoYGADYB.js';import {T,e as ee,I,m,a as T$1,G as Ge,b as I1,N as Nt,q as qe,z as za,c as me$1,h as hw,_ as _t,v,u as ue$1,d as N,Q as Qi,f as aT,$ as $l,g as NC,t as tb,C as CE,i as cT,o as oC,L as Lg,F as Fg,j as vg,k as iC,l as vT,n as nC,p as cm,r as kd,U as UC,O as Od,s as CD,w as jC,V as Vg,x as am,y as _D,A as yg}from'./main-QLXVXD6E.js';import {S,C}from'./chunk-Bcxzhjj8.js';import {O}from'./chunk-BYJ0fSUP.js';import'./chunk-D3d-eReU.js';var re=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function ae(n,t){n&1&&nC(0,0,1);}function le(n,t){n&1&&nC(0,0,2);}function se(n,t){if(n&1){let e=vT();Qi(0,"button",10),Vg("click",function(){kd(e);let o=iC(2);return Od(o.cancel())}),jC(1,"Cancel registration"),$l();}}function ce(n,t){if(n&1&&(Qi(0,"div",7)(1,"p"),Lg(2,0),aT(3,ae,1,0)(4,le,1,0),Fg(),$l(),vg(5,"sh-progress-bar",8),aT(6,se,2,0,"button",9),$l()),n&2){let e=iC();CE(3),cT(e.state()==="unknown"?3:4),CE(3),cT((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1);}}function de(n,t){if(n&1){let e=vT();Qi(0,"sh-form-field")(1,"label",11),nC(2,1),$l(),Qi(3,"input",12),cm("ngModelChange",function(o){kd(e);let C=iC();return UC(C.customRegisterUrl,o)||(C.customRegisterUrl=o),Od(o)}),$l(),CD(),$l(),Qi(4,"div",13)(5,"button",14),jC(6,"Go back"),$l(),Qi(7,"button",15),Vg("click",function(){kd(e);let o=iC();return Od(o.registerViaCustomUrl())}),nC(8,2),$l()();}if(n&2){let e=iC();CE(3),am("ngModel",e.customRegisterUrl),_D(),CE(4),yg("disabled",!e.customRegisterUrlValid());}}function _e(n,t){if(n&1){let e=vT();Qi(0,"p"),nC(1,3),$l(),vg(2,"sh-progress-bar",8),Qi(3,"button",10),Vg("click",function(){kd(e);let o=iC(2);return Od(o.retryWhenFaulted())}),jC(4,"Cancel"),$l();}}function ue(n,t){if(n&1){let e=vT();Qi(0,"p"),nC(1,4),$l(),Qi(2,"button",10),Vg("click",function(){kd(e);let o=iC(2);return Od(o.retryWhenFaulted())}),jC(3,"Retry"),$l();}}function Ce(n,t){if(n&1&&aT(0,_e,5,0)(1,ue,4,0),n&2){let e=iC();cT(e.claimUrl()!==null?0:1);}}function ge(n,t){n&1&&(Lg(0,5,1),vg(1,"p"),Fg());}function me(n,t){n&1&&(Lg(0,5,2),vg(1,"p"),Fg());}function Fe(n,t){if(n&1){let e=vT();Qi(0,"sh-alert",16),Lg(1,5),aT(2,ge,2,0,"p")(3,me,2,0,"p"),Fg(),$l(),Qi(4,"button",10),Vg("click",function(){kd(e);let o=iC();return Od(o.retryWhenFaulted())}),jC(5," Retry "),Qi(6,"sh-icon"),jC(7,"arrow-arc-left"),$l()();}if(n&2){let e=iC();CE(2),cT(e.typeParam()==="link"?2:3);}}function fe(n,t){n&1&&(Qi(0,"h3"),jC(1,"Successfully connected"),$l(),Qi(2,"p"),jC(3,"We're going to redirect you to the home page"),$l());}var R=class n{#n=T(ee);#a=T(S);#e=T(C);#i=T(O);#l=T(I);#s=T(m);#c=T(T$1);isOldOpen=Ge(false);typeParam=I1.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=Nt(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=Ge(false);customRegisterUrlValid=Nt(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return !(t.length===0||!e.test(t))});registeringCounter=Ge(null);didTry=false;triedFinishConnection=false;#t=null;#d=T(qe);constructor(){this.#d.onDestroy(()=>{this.#r();});}ngAfterViewInit(){(this.#l.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket")==="websocket"&&this.#c.reconnectIfNeeded();}stateEffect=za(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=true,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||me$1(()=>this.claimUrl())!==null&&(this.triedFinishConnection=true,this.#_())),e==="registering"?me$1(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o();}):(this.#r(),me$1(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""]);});});});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o();},1e3);}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null);}ngOnInit(){this.#e.refreshRemoteControlStatus();}#_(){let t=this.#e.claimUrl();this.#a.open(`${t}?closeAfterConnection=true`,"_blank");}registerViaCustomUrl(){this.#e.beginRemoteRegistration(true);}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=false,this.triedFinishConnection=false,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"]);}cancel(){this.#e.cancelRemoteRegistration();}register(){this.#e.beginRemoteRegistration();}disable(){this.#e.disableRemoteControl();}enable(){this.#e.enableRemoteControl();}delete(){this.#e.deleteRemoteControl();}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(true),setTimeout(()=>this.copiedReportingUrl.set(false),2e3),navigator.clipboard.writeText(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let m;return m=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=oC(m),[t,e,i,o,C,m,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(Qi(0,"sh-card",6),aT(1,ce,7,2,"div",7),aT(2,de,9,2),aT(3,Ce,2,1),aT(4,Fe,8,1),aT(5,fe,4,0),$l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",m=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";NC(tb(7,re,o,C,m,g,i.state()==="registered")),CE(),cT(o?1:-1),CE(),cT(C?2:-1),CE(),cT(i.state()==="registered"?3:-1),CE(),cT(g?4:-1),CE(),cT(m?5:-1);}},dependencies:[_t,Bn,Ze,Rn,Jt,Fe$1,v,d,f,ue$1,N],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"]})};export{R as default};
@@ -0,0 +1,4 @@
1
+ import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import {O as O$1}from'./chunk-dCFVYHva.js';import {m}from'./chunk--kVw-BwM.js';import {J}from'./chunk-D7AP6g7S.js';import {N as Nt$1}from'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import {c}from'./chunk-CI8lsvKT.js';import {D}from'./chunk-C5p3bQwH.js';import {bj as _s,bk as j,bl as ft,bm as go,T,a6 as be,m as m$1,I,bn as f,G as Ge,N as Nt,z as za,H as qu,bo as xt,at as h,h as hw,v,d as N,u as ue,j as vg,Q as Qi,n as nC,$ as $l,f as aT,V as Vg,s as CD,L as Lg,F as Fg,p as cm,bg as ag,C as CE,i as cT,Y as Yg,A as yg,a3 as KC,y as _D,au as jg,av as rC,x as am,o as oC,U as UC,ab as C$1,E as D1,b3 as cg,b4 as oT,b5 as iT,W as Wg,K as fC,ae as eo,b as I1,af as E1,b9 as ce,M as aC,P as Ul,X as cC,S as Wl,w as jC,an as Hg,R as Ig,aB as im,ag as Zg,g as NC,k as iC,J as om,l as vT,r as kd,O as Od,ar as Qp,a9 as GC,aa as Ql}from'./main-QLXVXD6E.js';import {d}from'./chunk-PONAC1Ya.js';import {F as Fe}from'./chunk-D3SUPUQT.js';import {B as Bn$1,Z as Ze,o as on$1,R as Rn$1,J as Jt,G as Gn$1}from'./chunk-DoYGADYB.js';import {a as at}from'./chunk-Crs56mDy.js';import {C}from'./chunk-Bcxzhjj8.js';import {O}from'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var sn=[[["label"]],[["input","type","range"]]],an=["label","input[type=range]"],tn=(()=>{class i{constructor(){this.hasInput=Ge(false),this.#n=T(eo),this.#i=null,this.#e=null,this.#t=0,this.unit=I1(""),this.value=E1(this.#t),this.inputState=Ge({min:0,max:100,step:1}),this.color=I1(null),this.variant=I1(null),this.size=I1(null),this.sharp=I1(void 0),this.alwaysShow=I1(void 0),this.hostClasses=ce("rangeSlider",{color:this.color,variant:this.variant,size:this.size,sharp:this.sharp,alwaysShow:this.alwaysShow}),this.valuePercentage=Nt(()=>{let{min:e,max:n}=this.inputState(),s=this.value()??e;if(isNaN(s))return 0;let l=n-e;if(l===0)return 0;let E=(s-e)/l*100;return Math.max(0,Math.min(100,E))}),this.trackFilledPercentage=Nt(()=>this.valuePercentage()),this.thumbPositionPercentage=Nt(()=>this.valuePercentage()),this.syncModelToInputEffect=za(()=>{let e=this.value();if(this.#e){let n=parseFloat(this.#e.value);(isNaN(n)||String(n)!==String(e))&&(this.#e.value=String(e));}});}#n;#i;#e;#t;ngAfterViewInit(){this.#e=this.#n.nativeElement.querySelector('input[type="range"]'),this.#e?(this.hasInput.set(true),this.#a(this.#e),this.#e.oninput=()=>{this.setNewInputValue(this.#e.value);},this.#e.addEventListener("inputValueChanged",e=>{this.setNewInputValue(e.detail.value);}),queueMicrotask(()=>this.#o(true)),this.#r()):console.error('ShipRangeSlider: No <input type="range"> element found projected inside.');}setNewInputValue(e){let n=parseFloat(e??"0");if(!isNaN(n)){let{min:s,max:l}=this.inputState();this.value.set(Math.max(s,Math.min(l,n)));}}trackEvent(e){if(!this.#e||this.#e.readOnly||this.#e.disabled){e.preventDefault(),e.stopPropagation();return}if(e.target===this.#e||e.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let s=e.currentTarget.getBoundingClientRect(),l=e.clientX-s.left,E=s.width,{min:S,max:m,step:f}=this.inputState(),W=m-S;if(E>0&&W!==0&&f>0){let J=(l/E*W+S-S)/f,z=S+Math.round(J)*f,Q=this.#s(f);z=parseFloat(z.toFixed(Q));let Y=Math.max(S,Math.min(m,z));this.value.set(Y);}}#o(e=false){if(!this.#e)return;let n=parseFloat(this.#e.min??"0")??0,s=parseFloat(this.#e.max??"100")??100,l=this.#e.step,E=1;if(l&&l.toLowerCase()!=="any"){let m=parseFloat(l);!isNaN(m)&&m>0&&(E=m);}this.inputState.set({min:n,max:s,step:E});let S=parseFloat(this.#e.value??String(n))??n;if(e&&this.value()!==this.#t){let m=this.value(),f=Math.max(n,Math.min(s,m));S!==f&&(this.#e.value=String(f)),m!==f&&this.value.set(f);}else {let m=Math.max(n,Math.min(s,S));this.value()!==m&&this.value.set(m);}}#r(){if(!this.#e||typeof MutationObserver>"u")return;let e=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(n=>{let s=false;for(let l of n)if(l.type==="attributes"&&e.includes(l.attributeName??"")){s=true;break}s&&this.#o(false);}),this.#i.observe(this.#e,{attributes:true,attributeFilter:e});}#s(e){if(isNaN(e)||Math.floor(e)===e)return 0;let s=e.toString().split(".")[1];return s?s.length:0}#a(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(n){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,n);let l=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:n}});return this.dispatchEvent(l),n}});}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#e&&(this.#e.oninput=null);}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-range-slider"]],hostVars:6,hostBindings:function(n,s){n&2&&(NC(s.hostClasses()),Yg("sh-range-slider",true)("has-input",s.hasInput()));},inputs:{unit:[1,"unit"],value:[1,"value"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],sharp:[1,"sharp"],alwaysShow:[1,"alwaysShow"]},outputs:{value:"valueChange"},ngContentSelectors:an,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(n,s){n&1&&(aC(sn),Ul(0,"div",0),cC(1),Wl(),Ul(2,"div",1)(3,"div",2),jC(4),Wl(),Ul(5,"div",3),Hg("click",function(E){return s.trackEvent(E)}),cC(6,1),Ul(7,"div",4),Ig(8,"div",5),Wl(),Ul(9,"div",6)(10,"div",7)(11,"div",8),jC(12),Wl()()()(),Ul(13,"div",9),jC(14),Wl()()),n&2&&(CE(4),im("",s.inputState().min,"",s.unit()),CE(4),Zg("width",s.trackFilledPercentage(),"%"),CE(),Zg("left",s.thumbPositionPercentage(),"%"),CE(3),im("",s.value(),"",s.unit()),CE(2),im("",s.inputState().max,"",s.unit()));},styles:[`sh-range-slider{--rs-h: 2.5rem;--rs-f: var(--paragraph-30);--rs-unit-g: .75rem;--rs-unit-c: var(--base-8);--rst: var(--base-3);--rst-bc: var(--base-1);--rst-bg: var(--base-4);--rst-h: .5rem;--rst-s: calc(var(--shape-2) / 2);--rs-thumb-c: var(--base-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--base-4);--rs-thumb-arrow: var(--rs-thumb-value-bg);--rs-thumb-value-c: var(--base-8);--rs-thumb-si: 1rem;--rs-thumb-w: var(--rs-thumb-si);--rs-thumb-s: calc(var(--rs-thumb-w) / 2);display:flex;flex-direction:column;width:100%;font:var(--rs-f)}sh-range-slider.sharp{--rst-s: .125rem;--rs-thumb-s: .125rem;--rs-thumb-bc: transparent !important}sh-range-slider .label{display:flex;align-items:center;gap:.5rem;padding-bottom:.25rem}sh-range-slider .label>label{display:flex;align-items:center;gap:.25rem}sh-range-slider .label sh-icon{color:var(--grey-500);font-size:1rem}sh-range-slider .label:empty{display:none}sh-range-slider[readonly]:not([readonly=false]),sh-range-slider:has(input[type=range][readonly]:not([readonly=false])),sh-range-slider[disabled]:not([disabled=false]),sh-range-slider:has(input[type=range][disabled]:not([disabled=false])){opacity:.4;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-range-slider:has(input[type=range][readonly]) .thumb .value-indicator,sh-range-slider.always-show .thumb .value-indicator{opacity:1}sh-range-slider input[type=range]{appearance:none;width:100%;height:100%;position:absolute;inset:0;opacity:0;margin:0;z-index:1000}sh-range-slider .input-wrap{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--rs-h);position:relative;gap:var(--rs-unit-g)}sh-range-slider .thumb-wrap{position:absolute;top:0}sh-range-slider .thumb{position:relative;margin-top:calc(-1 * var(--rs-thumb-si) / 4);width:var(--rs-thumb-w);height:var(--rs-thumb-si);border-radius:var(--rs-thumb-s);background-color:var(--rs-thumb-c);border:1px solid var(--rs-thumb-bc);box-shadow:var(--box-shadow-20);transform:translate(-50%)}sh-range-slider .track-wrap{position:relative;width:100%;height:var(--rst-h)}sh-range-slider .track{position:relative;width:100%;height:var(--rst-h);border-radius:var(--rst-s);background-color:var(--rst);border:1px solid var(--rst-bc);overflow:hidden}sh-range-slider .track-filled{position:absolute;top:0;left:0;bottom:0;background:var(--rst-bg);width:0}sh-range-slider .min-indicator,sh-range-slider .max-indicator{white-space:nowrap;color:var(--rs-unit-c)}sh-range-slider input[type=range]:hover~.thumb-wrap .value-indicator,sh-range-slider input[type=range]:focus~.thumb-wrap .value-indicator{opacity:1}sh-range-slider .value-indicator{position:absolute;top:-1.875rem;height:1.5rem;min-width:1.5rem;border-radius:var(--shape-2);left:50%;margin:auto;transform:translate(-50%);padding:.25rem .5rem;background:var(--rs-thumb-value-bg);color:var(--rs-thumb-value-c);white-space:nowrap;opacity:0;transition:opacity 125ms linear;-webkit-user-select:none;user-select:none;pointer-events:none}sh-range-slider .value-indicator:after{content:"";border-top:.3125rem solid var(--rs-thumb-arrow);border-left:.3125rem solid transparent;border-right:.3125rem solid transparent;position:absolute;top:calc(100% - 1px);left:50%;margin-left:-.3125rem}sh-range-slider.primary{--rst-bg: var(--primary-8);--rs-thumb-arrow: var(--primary-8);--rs-thumb-value-bg: var(--primary-8);--rs-thumb-value-c: #fff}sh-range-slider.accent{--rst-bg: var(--accent-8);--rs-thumb-arrow: var(--accent-8);--rs-thumb-value-bg: var(--accent-8);--rs-thumb-value-c: #fff}sh-range-slider.warn{--rst-bg: var(--warn-8);--rs-thumb-arrow: var(--warn-8);--rs-thumb-value-bg: var(--warn-8);--rs-thumb-value-c: #fff}sh-range-slider.error{--rst-bg: var(--error-8);--rs-thumb-arrow: var(--error-8);--rs-thumb-value-bg: var(--error-8);--rs-thumb-value-c: #fff}sh-range-slider.success{--rst-bg: var(--success-8);--rs-thumb-arrow: var(--success-8);--rs-thumb-value-bg: var(--success-8);--rs-thumb-value-c: #fff}sh-range-slider.simple{--rst-h: 1rem;--rst-s: var(--shape-2)}sh-range-slider.simple .thumb{width:1px;height:var(--rst-h);margin-top:0;border-radius:0;border:none;box-shadow:none}sh-range-slider.simple.primary{--rst-bg: var(--primary-8);--rst: var(--primary-2);--rs-thumb-c: var(--primary-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--primary-8);--rs-thumb-value-c: var(--primary-2)}sh-range-slider.simple.accent{--rst-bg: var(--accent-8);--rst: var(--accent-2);--rs-thumb-c: var(--accent-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--accent-8);--rs-thumb-value-c: var(--accent-2)}sh-range-slider.simple.warn{--rst-bg: var(--warn-8);--rst: var(--warn-2);--rs-thumb-c: var(--warn-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--warn-8);--rs-thumb-value-c: var(--warn-2)}sh-range-slider.simple.error{--rst-bg: var(--error-8);--rst: var(--error-2);--rs-thumb-c: var(--error-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--error-8);--rs-thumb-value-c: var(--error-2)}sh-range-slider.simple.success{--rst-bg: var(--success-8);--rst: var(--success-2);--rs-thumb-c: var(--success-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--success-8);--rs-thumb-value-c: var(--success-2)}sh-range-slider.outlined{--rst: var(--base-1);--rst-bc: var(--base-4);--rs-thumb-c: var(--base-6);--rs-thumb-bc: var(--base-1);--rs-thumb-arrow: var(--base-4)}sh-range-slider.outlined.primary,sh-range-slider.outlined.accent,sh-range-slider.outlined.warn,sh-range-slider.outlined.error,sh-range-slider.outlined.success{--rst: var(--base-2)}sh-range-slider.outlined.primary{--rst-bg: var(--primary-4);--rst-bc: var(--primary-8);--rs-thumb-c: var(--primary-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--primary-4);--rs-thumb-value-c: var(--primary-8);--rs-thumb-arrow: var(--primary-4)}sh-range-slider.outlined.accent{--rs-thumb-c: var(--accent-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--accent-4);--rs-thumb-value-c: var(--accent-8);--rs-thumb-arrow: var(--accent-4)}sh-range-slider.outlined.warn{--rs-thumb-c: var(--warn-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--warn-4);--rs-thumb-value-c: var(--warn-8);--rs-thumb-arrow: var(--warn-4)}sh-range-slider.outlined.error{--rs-thumb-c: var(--error-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--error-4);--rs-thumb-value-c: var(--error-8);--rs-thumb-arrow: var(--error-4)}sh-range-slider.outlined.success{--rs-thumb-c: var(--success-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--success-4);--rs-thumb-value-c: var(--success-8);--rs-thumb-arrow: var(--success-4)}sh-range-slider.flat{--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4)}sh-range-slider.flat.primary,sh-range-slider.flat.accent,sh-range-slider.flat.warn,sh-range-slider.flat.error,sh-range-slider.flat.success{--rst: var(--base-3);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4);--rs-thumb-value-bg: var(--base-8);--rs-thumb-value-c: #fff}sh-range-slider.flat.primary{--rst-bg: var(--primary-8);--rs-thumb-value-bg: var(--primary-8)}sh-range-slider.flat.accent{--rst-bg: var(--accent-8);--rs-thumb-value-bg: var(--accent-8)}sh-range-slider.flat.warn{--rst-bg: var(--warn-8);--rs-thumb-value-bg: var(--warn-8)}sh-range-slider.flat.error{--rst-bg: var(--error-8);--rs-thumb-value-bg: var(--error-8)}sh-range-slider.flat.success{--rst-bg: var(--success-8);--rs-thumb-value-bg: var(--success-8)}sh-range-slider.raised{--rst-bg: var(--base-g2);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4)}sh-range-slider.raised.primary,sh-range-slider.raised.accent,sh-range-slider.raised.warn,sh-range-slider.raised.error,sh-range-slider.raised.success{--rst: var(--base-3);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4);--rs-thumb-value-bg: var(--base-g6);--rs-thumb-value-c: #fff}sh-range-slider.raised.primary{--rst-bg: var(--primary-g2);--rs-thumb-arrow: var(--primary-8);--rs-thumb-value-bg: var(--primary-g3)}sh-range-slider.raised.accent{--rst-bg: var(--accent-g2);--rs-thumb-arrow: var(--accent-8);--rs-thumb-value-bg: var(--accent-8)}sh-range-slider.raised.warn{--rst-bg: var(--warn-g2);--rs-thumb-arrow: var(--warn-8);--rs-thumb-value-bg: var(--warn-8)}sh-range-slider.raised.error{--rst-bg: var(--error-g2);--rs-thumb-arrow: var(--error-8);--rs-thumb-value-bg: var(--error-8)}sh-range-slider.raised.success{--rst-bg: var(--success-g2);--rs-thumb-arrow: var(--success-8);--rs-thumb-value-bg: var(--success-8)}
2
+ `],encapsulation:2});}}return i})();var rn=["formRef"],ln=()=>[import('./chunk-DAM-4k69.js').then(i=>i.OptionsListComponent)];function _n(i,t){i&1&&(Qi(0,"sh-alert",3),nC(1,1),$l());}function cn(i,t){if(i&1){let e=vT();Qi(0,"app-options-list",5),cm("optionsChange",function(s){kd(e);let l=iC();return UC(l.settings,s)||(l.settings=s),Od(s)}),$l();}if(i&2){let e=iC();am("options",e.settings),yg("hasFreeTextSettings",true);}}var K=class i{#n=T(O);#i=T(C$1);formRef=D1.required("formRef");settings=Ge([]);isSubmitting=Ge(false);isLoadingOptions=Ge(true);saved=Ge(false);lastRecievedServerSettings=Ge({});serverSettingsEffect=za(()=>{let t=this.#n.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(true);let e=Object.entries(t);e.forEach(([n,s],l)=>{if(n.startsWith("--")){let E=n.substring(2);this.settings.update(S=>(S.some(m=>m.Name===E||m.Name===n)||S.push({Name:n,Value:s}),S));}l===e.length-1&&this.isLoadingOptions.set(false);});});submit(){this.isSubmitting.set(true);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(S=>S.Name?.startsWith("--")?S.Name:`--${S.Name}`),l=Object.keys(e).filter(S=>S.startsWith("--")).filter(S=>!n.includes(S)),E=t.reduce((S,m)=>{let f=m.Name?.startsWith("--")?m.Name:`--${m.Name}`;return S[f]=m.Value,S},{});l.forEach(S=>{E[S]=null;}),this.#i.patchApiV1Serversettings({requestBody:E}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.#n.refreshServerSettings(),this.saved.set(true),setTimeout(()=>{this.saved.set(false);},3e3);}});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&Wg(n.formRef,rn,5),e&2&&fC();},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(Qi(0,"div",2),aT(1,_n,2,0,"sh-alert",3),Qi(2,"button",4),Vg("click",function(){return n.submit()}),Lg(3,0),vg(4,"sh-icon"),Fg(),$l()(),cg(5,cn,1,2),oT(6,5,ln)),e&2&&(CE(),cT(n.saved()?1:-1),CE(),Yg("loading",n.isSubmitting()),CE(4),iT(!n.isLoadingOptions()));},dependencies:[Gn$1,v,N,ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"]})};function Tn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field",12)(1,"input",13),cm("ngModelChange",function(s){kd(e);let l=iC(2);return UC(l.registerUrl,s)||(l.registerUrl=s),Od(s)}),$l(),CD(),$l(),Qi(2,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.register())}),nC(3,0),$l();}if(i&2){let e=iC(2);CE(),am("ngModel",e.registerUrl),_D();}}function Sn(i,t){if(i&1&&(Qi(0,"div",9)(1,"label"),nC(2,1),$l(),Qi(3,"a",15),jC(4),$l()()),i&2){let e=iC(2);CE(3),yg("href",GC(e.claimUrl()),Qp),CE(),om(e.claimUrl());}}function un(i,t){i&1&&(Qi(0,"div",9)(1,"label"),nC(2,2),$l()());}function gn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.cancel())}),nC(1,3),$l();}}function pn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.disable())}),nC(1,4),$l();}}function Cn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.enable())}),nC(1,5),$l(),Qi(2,"button",16),Vg("click",function(){kd(e);let s=iC(2);return Od(s.delete())}),nC(3,6),$l();}}function mn(i,t){i&1&&(Lg(0,7,1),vg(1,"sh-icon"),Fg());}function En(i,t){i&1&&(Lg(0,7,2),vg(1,"sh-icon"),Fg());}function Nn(i,t){if(i&1){let e=vT();Qi(0,"sh-chip",17),Vg("click",function(){kd(e);let s=iC(2);return Od(s.copyReportingUrl())}),Lg(1,7),aT(2,mn,2,0,"sh-icon")(3,En,2,0,"sh-icon"),Fg(),$l();}if(i&2){let e=iC(2);CE(2),cT(e.copiedReportingUrl()===true?2:3);}}function hn(i,t){if(i&1&&(Qi(0,"div",8),aT(1,Tn,4,1),aT(2,Sn,5,3,"div",9),aT(3,un,3,0,"div",9),aT(4,gn,2,0,"button",10),aT(5,pn,2,0,"button",10),aT(6,Cn,4,0),aT(7,Nn,4,1,"sh-chip",11),$l()),i&2){let e=iC();CE(),cT(e.state()==="inactive"?1:-1),CE(),cT(e.state()==="registered"?2:-1),CE(),cT(e.state()==="registering"?3:-1),CE(),cT(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),CE(),cT(e.state()==="connected"||e.state()==="connecting"?5:-1),CE(),cT(e.state()==="disabled"?6:-1),CE(),cT(e.additionalReportingUrl()!==""&&e.state()!=="registered"?7:-1);}}var Te=class i{#n=T(C);#i=T(O);state=this.#n.state;claimUrl=this.#n.claimUrl;registerUrl=this.#n.registerUrl;additionalReportingUrl=Nt(()=>{let t=this.#i.serverSettings();return t&&t["additional-report-url"]||""});copiedReportingUrl=Ge(false);ngOnInit(){this.#n.refreshRemoteControlStatus();}cancel(){this.#n.cancelRemoteRegistration();}register(){this.#n.beginRemoteRegistration();}disable(){this.#n.disableRemoteControl();}enable(){this.#n.enableRemoteControl();}delete(){this.#n.deleteRemoteControl();}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(true),setTimeout(()=>this.copiedReportingUrl.set(false),2e3),navigator.clipboard.writeText(t));}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let s;s=$localize`Cancel registration`;let l;l=$localize`Disable console connection`;let E;E=$localize`Enable console connection`;let S;S=$localize` Delete console connection setup `;let m;return m=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=oC(m),[t,e,n,s,l,E,S,m,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&aT(0,hn,8,7,"div",8),e&2&&cT(n.state()!=="unknown"?0:-1);},dependencies:[Bn$1,Ze,Rn$1,Jt,Fe,v,D,N],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"]})};var Se=()=>({standalone:true});function fn(i,t){i&1&&(Qi(0,"sh-chip",90),nC(1,33),$l());}function In(i,t){if(i&1&&(Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,32),$l(),Qi(4,"p"),jC(5),$l()(),Qi(6,"div",68),aT(7,fn,2,0,"sh-chip",90),$l()()),i&2){let e=iC();CE(5),om(e.remoteControlStatus()),CE(2),cT(e.additionalReportingUrl()!==""&&e.remoteControlState()!=="registered"?7:-1);}}function Mn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,37),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.remoteControlTooltip());}}function Pn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,38),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.remoteControlTooltip());}}function On(i,t){if(i&1&&(Qi(0,"label"),Lg(1,39),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.connectionStatusIndicatorTooltip());}}function bn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,40),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.connectionStatusIndicatorTooltip());}}function vn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,35),$l(),Qi(4,"p"),nC(5,36),$l()(),Qi(6,"div",91)(7,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.toggleConsoleControl(s))}),aT(8,Mn,3,1,"label")(9,Pn,3,1,"label"),$l(),Qi(10,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.saveHideConsoleConnectionStatus(s))}),aT(11,On,3,1,"label")(12,bn,3,1,"label"),$l()()();}if(i&2){let e=iC(2);CE(7),yg("checked",!e.consoleControlDisabled()),CE(),cT(e.consoleControlDisabled()?8:9),CE(2),yg("checked",!e.hideConsoleConnectionStatus()),CE(),cT(e.hideConsoleConnectionStatus()?11:12);}}function Rn(i,t){i&1&&(Qi(0,"label"),nC(1,43),$l());}function Gn(i,t){i&1&&(Qi(0,"label"),nC(1,44),$l());}function yn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,41),$l(),Qi(4,"p"),nC(5,42),$l()(),Qi(6,"div",68)(7,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.saveHideConsoleConnectionStatus(s))}),aT(8,Rn,2,0,"label")(9,Gn,2,0,"label"),$l()()();}if(i&2){let e=iC(2);CE(7),yg("checked",!e.hideConsoleConnectionStatus()),CE(),cT(e.hideConsoleConnectionStatus()?8:9);}}function Fn(i,t){if(i&1&&(Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,34),$l(),Qi(4,"p"),jC(5),$l()(),Qi(6,"div",68),vg(7,"app-remote-control"),$l()(),aT(8,vn,13,4,"section")(9,yn,10,2,"section")),i&2){let e=iC();CE(5),om(e.remoteControlStatus()),CE(3),cT(e.remoteControlState()!="inactive"?8:9);}}function $n(i,t){i&1&&(Qi(0,"sh-icon",97),jC(1,"check"),$l());}function An(i,t){i&1&&(Qi(0,"sh-icon",98),jC(1,"prohibit"),$l());}function Ln(i,t){if(i&1){let e=vT();Qi(0,"button",102),Vg("click",function(){kd(e);let s=iC(2);return Od(s.updatePassphrase())}),nC(1,48),$l();}if(i&2){let e=iC(2);Yg("loading",e.isUpdating());}}function wn(i,t){if(i&1){let e=vT();Qi(0,"button",103),Vg("click",function(){kd(e);let s=iC(2);return Od(s.updatePassphrase())}),nC(1,49),$l();}if(i&2){let e=iC(2);Yg("loading",e.isUpdating()),yg("disabled",true);}}function Dn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field")(1,"label",93),nC(2,45),$l(),Qi(3,"input",94),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.passphrase,s)||(l.passphrase=s),Od(s)}),$l(),CD(),$l(),Qi(4,"sh-form-field")(5,"label",95),nC(6,46),$l(),Qi(7,"input",96),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.repeatPassphrase,s)||(l.repeatPassphrase=s),Od(s)}),$l(),CD(),aT(8,$n,2,0,"sh-icon",97)(9,An,2,0,"sh-icon",98),$l(),Qi(10,"div",73)(11,"button",99),Vg("click",function(){kd(e);let s=iC();return Od(s.cancelPasswordChange())}),nC(12,47),$l(),aT(13,Ln,2,2,"button",100)(14,wn,2,3,"button",101),$l();}if(i&2){let e=iC();CE(3),am("ngModel",e.passphrase),_D(),CE(4),yg("disabled",e.passphrase().length===0),am("ngModel",e.repeatPassphrase),_D(),CE(),cT(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),CE(3),Yg("loading",e.isUpdating()),CE(2),cT(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14);}}function xn(i,t){i&1&&(Qi(0,"sh-icon",104),jC(1,"check"),$l());}function kn(i,t){if(i&1){let e=vT();Qi(0,"div",73)(1,"button",99),Vg("click",function(){kd(e);let s=iC();return Od(s.openPassphraseForm())}),nC(2,50),$l(),aT(3,xn,2,0,"sh-icon",104),$l();}if(i&2){let e=iC();CE(3),cT(e.passwordUpdated()?3:-1);}}function Xn(i,t){i&1&&(Lg(0,11,1),vg(1,"span"),Fg());}function Jn(i,t){i&1&&(Lg(0,11,2),vg(1,"span"),Fg());}function zn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field")(1,"label",105),nC(2,51),$l(),Qi(3,"textarea",106),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.allowedHostnames,s)||(l.allowedHostnames=s),Od(s)}),$l(),CD(),$l(),Qi(4,"sh-alert",107),nC(5,52),$l(),Qi(6,"button",102),Vg("click",function(){kd(e);let s=iC();return Od(s.updateAllowedHostnames())}),nC(7,53),$l();}if(i&2){let e=iC();CE(3),am("ngModel",e.allowedHostnames),_D(),CE(3),Yg("loading",e.updatingAllowedHosts());}}function Vn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,54),$l(),Qi(4,"p"),nC(5,55),$l()(),Qi(6,"div",68)(7,"sh-select",108)(8,"input",75),Vg("ngModelChange",function(s){kd(e);let l=iC();return Od(l.updatePowerMode(s))}),$l(),CD(),$l()()();}if(i&2){let e=iC();CE(7),yg("options",e.powerModeOptions())("isClearable",false),CE(),yg("ngModel",e.powerModeCtrl())("ngModelOptions",KC(4,Se)),_D();}}function Un(i,t){if(i&1&&(Qi(0,"p"),nC(1,56),$l()),i&2){let e=iC();CE(),jg(e.sysinfo()?.ServerVersionName),rC(1);}}function Bn(i,t){i&1&&vg(0,"sh-progress-bar",80);}function Hn(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;Ql(" ",e.label," ");}}function Wn(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;Ql(" ",e.label," ");}}function jn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,57),$l(),Qi(4,"p")(5,"span"),nC(6,58),$l(),Qi(7,"a",109),nC(8,59),$l(),vg(9,"br")(10,"br"),Qi(11,"span"),nC(12,60),$l()()(),Qi(13,"div",68)(14,"sh-select",110)(15,"input",75),Vg("ngModelChange",function(s){kd(e);let l=iC();return Od(l.updateUsageStatistics(s))}),$l(),CD(),ag(16,Wn,1,1,"ng-template"),$l()()();}if(i&2){let e=iC();CE(14),yg("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),CE(),yg("ngModel",e.usageStatistics())("ngModelOptions",KC(4,Se)),_D();}}function qn(i,t){i&1&&(Qi(0,"label"),nC(1,63),$l());}function Kn(i,t){i&1&&(Qi(0,"label"),nC(1,64),$l());}function Qn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,61),$l(),Qi(4,"p"),nC(5,62),$l()(),Qi(6,"div",91)(7,"p"),jC(8,"Backup process isolation"),$l(),Qi(9,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC();return Od(l.saveControllerIpcState(s))}),aT(10,qn,2,0,"label")(11,Kn,2,0,"label"),$l()()();}if(i&2){let e=iC();CE(9),yg("checked",e.isControllerIpcEnabled()),CE(),cT(e.isControllerIpcEnabled()?10:11);}}function Yn(i,t,e){let[n]=_s(i,e?.equal),s=n,l=n[j],E;return s.set=S=>{clearTimeout(E),E=setTimeout(()=>{ft(l,S);},t);},s.update=S=>{clearTimeout(E),E=setTimeout(()=>{go(l,S);},t);},s}var Zn=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],on=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],fe=class i{#n=T(be);#i=T(m);#e=T(m$1);#t=T(O);#o=T(C);#r=T(I);#s=T(f);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#e.systemInfo;isDarkMode=this.#i.isDarkMode;editAs=Ge("list");previousLang=this.#a;langCtrl=Ge(this.#a);powerModeCtrl=Ge("");usageStatistics=Ge("");updatingUsageStatistics=Ge(false);remoteControlStatus=this.#o.statusMessage;remoteControlState=this.#o.state;updatingChannel=Ge(false);updateChannel=Ge("");isUsingRelay=this.#r.relayIsEnabled;defaultClient=Ge(this.#d());hasIpcController=this.#e.hasIpcController;usageStatisticsDisabled=Nt(()=>(this.#e.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");additionalReportingUrl=Nt(()=>{let t=this.#t.serverSettings();return t&&t["additional-report-url"]||""});#T=za(()=>{let t=this.#e.systemInfo()?.DefaultUsageReportLevel??"",e=on;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e);});remoteControlTooltip=Ge($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
3
+ registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=Ge($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(qu(()=>this.updatingChannel.set(false))).subscribe();}allowRemoteAccess=Ge(false);allowedHostnames=Ge("");loadedAllowedHostnames=Ge("");updatingRemoteAccess=Ge(false);updatingAllowedHosts=Ge(false);updatingConsoleControl=Ge(false);consoleControlDisabled=Ge(false);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;isControllerIpcEnabled=this.#t.isControllerIpcEnabled;updateRemoteAccess(t){this.allowRemoteAccess.set(t),this.#t.setRemoteAccessInterface(t?"any":"loopback").pipe(qu(()=>this.updatingRemoteAccess.set(false))).subscribe();}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(true),this.#t.setRemoteAccessAllowedHostnames(t).pipe(qu(()=>this.updatingAllowedHosts.set(false))).subscribe();}toggleConsoleControl(t){this.consoleControlDisabled.set(!t),this.#t.setDisableConsoleControl(!t).pipe(qu(()=>this.updatingConsoleControl.set(false))).subscribe();}updatingDisableTrayIconLogin=Ge(false);disableTrayIconLogin=Ge(false);saveDisableTrayIconLogin(t){let e=t;this.updatingDisableTrayIconLogin.set(true),this.#t.setDisableTrayIconLogin(e).pipe(qu(()=>this.updatingDisableTrayIconLogin.set(false))).subscribe();}updatingHideConsoleConnectionStatus=Ge(false);saveHideConsoleConnectionStatus(t){this.updatingHideConsoleConnectionStatus.set(true),this.#t.setHideConsoleConnectionStatus(!t).pipe(qu(()=>this.updatingHideConsoleConnectionStatus.set(false))).subscribe();}updatingControllerIpcState=Ge(false);saveControllerIpcState(t){this.updatingControllerIpcState.set(true),this.#t.setControllerIpcState(!!t).pipe(qu(()=>this.updatingControllerIpcState.set(false))).subscribe();}showPassphraseForm=Ge(false);isUpdating=Ge(false);passphrase=Ge("");repeatPassphrase=Ge("");passwordUpdated=Ge(false);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(true),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(qu(()=>this.isUpdating.set(false))).subscribe({next:()=>{this.showPassphraseForm.set(false),this.passwordUpdated.set(true),setTimeout(()=>{this.passwordUpdated.set(false);},3e3);}}));}openPassphraseForm(){this.showPassphraseForm.set(true);}cancelPasswordChange(){this.showPassphraseForm.set(false);}languageOptions=Ge([...xt].sort((t,e)=>t.label.localeCompare(e.label)));powerModeOptions=Nt(()=>{let t=this.#e.systemInfo();return !t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=Ge(on);timeTypeOptions=Ge(Zn);timeType=Ge("none");timeValue=Yn(0,300);timeRange=Nt(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#s.setItem("locale",t),window.location.reload());}updateTimeValue(t){this.timeValue.set(t),this.#_();}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_();}#l;#_(){this.#l&&clearTimeout(this.#l),this.#l=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),n=e==="none"||t===0?"":`${t}${e}`;n!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(n).subscribe();},1e3);}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(true),this.#t.setUsageReporterLevel(t).subscribe());}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe());}serverSettingsEffect=za(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),s=e.slice(0,-1),l=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":l.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(s));let E=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(E);});setDarkMode(){this.#i.setDarkMode();}setLightMode(){this.#i.setLightMode();}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#n.open(h,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#c(t));}}):this.#c(t));}openLegacyUI(){this.#n.open(h,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank");}});}#c(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t);}#d(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let n=t[e].trim();if(n.startsWith("default-client="))return n.substring(15)}return "ngclient"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-settings"]],decls:130,vars:38,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let s;s=$localize`Customize your application theme`;let l;l=$localize`Passwords`;let E;E=$localize`Change server passphrase`;let S;S=$localize`Language`;let m;m=$localize`Select a language for the platform`;let f;f=$localize`Use legacy interface`;let W;W=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let ue;ue=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#47\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let J;J=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*51:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set current UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*52:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set legacy UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*52:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,J=oC(J);let z;z=$localize`Allow remote access (requires restart)`;let Q;Q=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Y;Y=$localize`Allow remote access`;let Ie;Ie=$localize`Prevent tray icon automatic log-in`;let Me;Me=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Pe;Pe=$localize`Prevent tray icon automatic log-in`;let Oe;Oe=$localize`Update channel`;let be;be=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let ve;ve=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Re;Re=$localize`Stable`;let Ge;Ge=$localize`Official stable release.`;let ye;ye=$localize`Beta`;let Fe;Fe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let $e;$e=$localize`Experimental`;let Ae;Ae=$localize`Early previews of new features. Not for use with important data.`;let Le;Le=$localize`Canary`;let we;we=$localize`Builds for developers and testers only. Not for use with important data.`;let De;De=$localize`Pause after startup or hibernation`;let xe;xe=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let ke;ke=$localize`Advanced options`;let Xe;Xe=$localize`Console connection status`;let Je;Je=$localize`Reporting configured by server`;let ze;ze=$localize`Connect to console`;let Ve;Ve=$localize`Configure console control`;let Ue;Ue=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let Be;Be=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let He;He=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let We;We=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let je;je=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let qe;qe=$localize`Toggle console connection status`;let Ke;Ke=$localize`Toggle the visibility of the console connection status indicator.`;let Qe;Qe=$localize`Console connection status is hidden`;let Ye;Ye=$localize`Console connection status is visible`;let Ze;Ze=$localize`Enter new password`;let et;et=$localize`Repeat password`;let ge;ge=$localize`Password have to be filled and have to match`;let tt;tt=$localize`Passphrase`;let nt;nt=$localize`Repeat passphrase`;let it;it=$localize`Cancel`;let ot;ot=$localize` Update passphrase `;let st;st=$localize` Update passphrase `;let at;at=$localize`Change password`;let rt;rt=$localize`Allowed hostnames`;let lt;lt=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let _t;_t=$localize` Update allowed hostnames `;let ct;ct=$localize`Power mode provider`;let dt;dt=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let Tt;Tt=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let St;St=$localize`Usage statistics`;let ut;ut=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate `;let gt;gt=$localize`public usage statistics.`;let pt;pt=$localize` All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `;let Ct;Ct=$localize`Experimental options`;let mt;mt=$localize`Toggle experimental options.`;let Et;Et=$localize`Operations run in an isolated process`;let Nt;return Nt=$localize`Operations run inside the server process`,[t,e,n,s,l,E,S,m,f,W,ue,J,z,Q,Y,Ie,Me,Pe,Oe,be,ve,Re,Ge,ye,Fe,$e,Ae,Le,we,De,xe,ke,Xe,Je,ze,Ve,Ue,Be,He,We,je,qe,Ke,Qe,Ye,tt,nt,it,ot,st,at,rt,lt,_t,ct,dt,Tt,St,ut,gt,pt,Ct,mt,Et,Nt,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"checkedChange","checked"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised",3,"checked"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],[1,"reporting-url","primary","simple"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","new-password","placeholder",Ze,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","new-password","placeholder",et,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",ge,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ge,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","https://usage-reporter.duplicati.com/","target","_blank"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){e&1&&(vg(0,"app-status-bar"),Qi(1,"div",65)(2,"header")(3,"div",66)(4,"h2"),nC(5,0),$l(),Qi(6,"p"),nC(7,1),$l()()(),aT(8,In,8,2,"section")(9,Fn,10,2),Qi(10,"section")(11,"div",67)(12,"h3"),nC(13,2),$l(),Qi(14,"p"),nC(15,3),$l()(),Qi(16,"div",68)(17,"div",69)(18,"img",70),Vg("click",function(){return n.setLightMode()}),$l(),Qi(19,"img",71),Vg("click",function(){return n.setDarkMode()}),$l()()()(),Qi(20,"section")(21,"div",67)(22,"h3"),nC(23,4),$l(),Qi(24,"p"),nC(25,5),$l()(),Qi(26,"div",72),aT(27,Dn,15,7)(28,kn,4,1,"div",73),$l()(),Qi(29,"section")(30,"div",67)(31,"h3"),nC(32,6),$l(),Qi(33,"p"),nC(34,7),$l()(),Qi(35,"div",68)(36,"sh-select",74)(37,"input",75),Vg("ngModelChange",function(l){return n.updateLocale(l)}),$l(),CD(),$l()()(),Qi(38,"section")(39,"div",67)(40,"h3"),nC(41,8),$l(),Qi(42,"p"),nC(43,9),$l()(),Qi(44,"div",76)(45,"button",77),Vg("click",function(){return n.openLegacyUI()}),Lg(46,10),vg(47,"sh-icon"),Fg(),$l(),Qi(48,"button",77),Vg("click",function(){return n.changeDefaultClientTo(n.defaultClient()==="ngclient"?"ngax":"ngclient")}),Lg(49,11),vg(50,"sh-icon"),aT(51,Xn,2,0,"span")(52,Jn,2,0,"span"),Fg(),$l()()(),Qi(53,"section")(54,"div",67)(55,"h3"),nC(56,12),$l(),Qi(57,"p"),nC(58,13),$l()(),Qi(59,"div",78)(60,"sh-toggle",79),Vg("checkedChange",function(l){return n.updateRemoteAccess(l)}),Qi(61,"label"),nC(62,14),$l()(),aT(63,zn,8,3),$l()(),Qi(64,"section")(65,"div",67)(66,"h3"),nC(67,15),$l(),Qi(68,"p"),nC(69,16),$l()(),Qi(70,"div",68)(71,"sh-toggle",79),Vg("checkedChange",function(l){return n.saveDisableTrayIconLogin(l)}),Qi(72,"label"),nC(73,17),$l()()()(),aT(74,Vn,9,5,"section"),Qi(75,"section")(76,"div",67)(77,"h3"),nC(78,18),$l(),aT(79,Un,2,1,"p"),aT(80,Bn,1,0,"sh-progress-bar",80),$l(),Qi(81,"div",81)(82,"div",82),Vg("click",function(){return n.setNewChannel("")}),Qi(83,"sh-radio",83),nC(84,19),$l(),Qi(85,"p"),nC(86,20),$l()(),Qi(87,"div",82),Vg("click",function(){return n.setNewChannel("stable")}),Qi(88,"sh-radio",83),nC(89,21),$l(),Qi(90,"p"),nC(91,22),$l()(),Qi(92,"div",82),Vg("click",function(){return n.setNewChannel("beta")}),Qi(93,"sh-radio",83),nC(94,23),$l(),Qi(95,"p"),nC(96,24),$l()(),Qi(97,"div",82),Vg("click",function(){return n.setNewChannel("experimental")}),Qi(98,"sh-radio",83),nC(99,25),$l(),Qi(100,"p"),nC(101,26),$l()(),Qi(102,"div",82),Vg("click",function(){return n.setNewChannel("canary")}),Qi(103,"sh-radio",83),nC(104,27),$l(),Qi(105,"p"),nC(106,28),$l()()()(),Qi(107,"section")(108,"div",67)(109,"h3"),nC(110,29),$l(),Qi(111,"p"),nC(112,30),$l()(),Qi(113,"div",68)(114,"div",84)(115,"sh-range-slider",85)(116,"input",86),cm("ngModelChange",function(l){return UC(n.timeValue,l)||(n.timeValue=l),l}),Vg("ngModelChange",function(l){return n.updateTimeValue(l)}),$l(),CD(),$l(),Qi(117,"sh-select",87)(118,"input",88),Vg("ngModelChange",function(l){return n.updateTimeType(l)}),$l(),CD(),ag(119,Hn,1,1,"ng-template"),$l()()()(),aT(120,jn,17,5,"section"),aT(121,Qn,12,2,"section"),$l(),vg(122,"sh-divider"),Qi(123,"div",65)(124,"section")(125,"div",89)(126,"h3"),nC(127,31),$l(),vg(128,"app-advanced-options-settings"),$l()()(),vg(129,"sh-divider")),e&2&&(CE(8),cT(n.isUsingRelay()?8:9),CE(10),Yg("active",!n.isDarkMode()),CE(),Yg("active",n.isDarkMode()),CE(8),cT(n.showPassphraseForm()?27:28),CE(9),yg("options",n.languageOptions())("isClearable",false)("inlineSearch",true),CE(),yg("ngModel",n.langCtrl())("ngModelOptions",KC(36,Se)),_D(),CE(14),cT(n.defaultClient()==="ngax"?51:52),CE(9),yg("checked",n.allowRemoteAccess()),CE(3),cT(n.allowRemoteAccess()?63:-1),CE(8),yg("checked",n.disableTrayIconLogin()),CE(3),cT(n.powerModeOptions().length>0?74:-1),CE(5),cT(n.sysinfo()?.ServerVersion?79:-1),CE(),cT(n.updatingChannel()?80:-1),CE(3),yg("checked",n.updateChannel()===""),CE(),jg(n.sysinfo()?.DefaultUpdateChannel),rC(84),CE(2),jg(n.sysinfo()?.ServerVersionType),rC(86),CE(2),yg("checked",n.updateChannel()==="stable"),CE(5),yg("checked",n.updateChannel()==="beta"),CE(5),yg("checked",n.updateChannel()==="experimental"),CE(5),yg("checked",n.updateChannel()==="canary"),CE(12),yg("unit",n.timeType()==="none"?"s":n.timeType()),CE(),yg("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),am("ngModel",n.timeValue),yg("ngModelOptions",KC(37,Se)),_D(),CE(),yg("options",n.timeTypeOptions())("isClearable",false),CE(),yg("ngModel",n.timeType()),_D(),CE(2),cT(n.usageStatisticsDisabled()?-1:120),CE(),cT(n.hasIpcController()?121:-1));},dependencies:[Bn$1,Ze,on$1,Rn$1,Jt,Gn$1,ee,Te,K,v,O$1,tn,d,J,at,Fe,N,c,ue,Nt$1,D],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{grid-template-columns:1fr}}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"]})};
4
+ export{Yn as debounceSignal,fe as default};
@@ -0,0 +1 @@
1
+ import {e as ee,W}from'./chunk-CzJ3-6Pu.js';import {k}from'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import {N as Ne,E as Ee}from'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import {v as ve}from'./chunk-DKacf9Tj.js';import {x}from'./chunk-gaP3Sx_C.js';import {c}from'./chunk-CI8lsvKT.js';import {D}from'./chunk-C5p3bQwH.js';import {T,ab as C,aX as y,a5 as g,bh as Q,a6 as be,m,N as Nt$1,G as Ge,D as A,z as za,H as qu,h as hw,_ as _t$1,v,d as N,j as vg,Q as Qi,V as Vg,n as nC,$ as $l,L as Lg,F as Fg,aP as ql,aQ as Gl,f as aT,b3 as cg,b4 as oT,bg as ag,c6 as lb,C as CE,A as yg,a3 as KC,i as cT,b5 as iT,o as oC,l as vT,p as cm,r as kd,k as iC,U as UC,O as Od,x as am,w as jC,au as jg,av as rC,a1 as dT,ap as lT,a2 as fT,Y as Yg,c4 as pC,a$ as JC,b$ as Dg,ak as um,aa as Ql,ar as Qp,al as WC,aM as ob,aN as ab,ao as qC,aR as sb,b_ as ei$1,co as ce,cp as y$1,bc as Fi,cq as tn,cr as en,ad as Mr,aJ as ci,bf as pi,cs as A$1,ct as I,cu as fv,cv as Je,aL as hi,cw as Ne$1,cx as U,bd as Jt$1,cy as Ce,be as Kn$1,cz as ye,cA as qt$1,cB as Ee$1,cC as Qt$1,cD as Ze,cE as ne,cF as m$1,cG as de,cH as g$1,cI as nn,cJ as j,cK as d$1,cL as Rt$1,cM as Zt$1,cN as Gt$1,cO as Kt$1,cP as Yt$1,cQ as zt$1,cR as q,cS as Q$1,cT as Bt$1,cU as Pt$1,cV as kt$1,cW as Ut$1,cX as jt$1,cY as Ot$1,cZ as Nt$2,c_ as Fe,c$ as M,d0 as xt$1,d1 as J,d2 as Vt$1,bq as Rr,d3 as Or,d4 as Tr,d5 as f$1,d6 as wi,d7 as Ai,bL as s,d8 as L,d9 as k$1,da as _,aI as c$1,aH as m$2,b2 as m$3}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import'./chunk-D3SUPUQT.js';import'./chunk-DoYGADYB.js';import {a as at$1}from'./chunk-Crs56mDy.js';import {C as C$1}from'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var Dn=()=>[_t$1,Promise.resolve().then(function(){return chunkXA5RWQQ5}).then(e=>e.NgTemplateOutlet),v,N,Promise.resolve().then(function(){return chunkBEVA4HT2}).then(e=>e.ShipChip),import('./chunk-SycSMD-r.js').then(e=>e.ShipTable),import('./chunk-SycSMD-r.js').then(e=>e.ShipSort),at$1,Promise.resolve().then(function(){return chunkQICO34G3}).then(e=>e.BackupProgressComponent),Promise.resolve().then(function(){return chunkCORTKH64}).then(e=>e.DurationFormatPipe),Promise.resolve().then(function(){return chunkCHQM3PCJ}).then(e=>e.BytesPipe),Promise.resolve().then(function(){return chunkKDVMMWQR}).then(e=>e.RelativeTimePipe)],fn=()=>["/add-backup"],hn=()=>["/restore"],Pn=e=>({$implicit:e}),$n=()=>["/backup/new"],Rn=e=>["/restore",e],yn=e=>["/backup",e,"export"],An=e=>["/backup",e,"delete"],xn=e=>["/backup",e,"database"],Hn=e=>["/backup",e,"commandline"],Ln=e=>["/backup",e,"log"],kn=e=>["/backup",e],Gn=e=>["/backup",e,"delete-versions"],bn=e=>["/backup",e,"broken-files"];function Bn(e,t){e&1&&nC(0,11,1);}function vn(e,t){e&1&&nC(0,11,2);}function Jn(e,t){if(e&1&&nC(0,11,3),e&2){let n=iC(2);jg(n.timeType()),rC(0);}}function Xn(e,t){if(e&1){let n=vT();Qi(0,"button",70),Vg("click",function(){let c=kd(n).$implicit,C=iC(3);return Od(C.sortByColumn.set(c.value))}),nC(1,15),$l();}if(e&2){let n=t.$implicit,_=iC(3);Yg("active",_.orderBy()===n.value),CE(),jg(n.label),rC(1);}}function wn(e,t){if(e&1&&(Qi(0,"sh-menu",67)(1,"button",68),Lg(2,14),vg(3,"strong")(4,"sh-icon"),Fg(),$l(),ql(5,69),dT(6,Xn,2,3,"button",71,lT),Gl(),$l()),e&2){let n=iC(2);CE(4),jg(n.orderBy()),rC(2),CE(2),fT(n.sortOrderOptions());}}function zn(e,t){if(e&1){let n=vT();Qi(0,"div",63)(1,"sh-button-group",64),cm("valueChange",function(c){kd(n);let C=iC();return UC(C.viewMode,c)||(C.viewMode=c),Od(c)}),Qi(2,"button",65),Lg(3,9),vg(4,"sh-icon"),Fg(),$l(),Qi(5,"button",66),Lg(6,10),vg(7,"sh-icon"),Fg(),$l()(),Qi(8,"sh-menu",67)(9,"button",68),Lg(10,11),Qi(11,"strong"),aT(12,Bn,1,0)(13,vn,1,0)(14,Jn,1,1),$l(),vg(15,"sh-icon"),Fg(),$l(),ql(16,69),Qi(17,"button",70),Vg("click",function(){kd(n);let c=iC();return Od(c.setTimeType("relative"))}),nC(18,12),$l(),Qi(19,"button",70),Vg("click",function(){kd(n);let c=iC();return Od(c.setTimeType("actual"))}),nC(20,13),$l(),Gl(),$l(),aT(21,wn,8,1,"sh-menu",67),$l();}if(e&2){let n=iC();CE(),am("value",n.viewMode),CE(11),cT(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),CE(9),cT(n.viewMode()==="list"?21:-1);}}function Vn(e,t){e&1&&(Qi(0,"sh-chip",78),Lg(1,19),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function Un(e,t){if(e&1){let n=vT();Qi(0,"div",76)(1,"div",59)(2,"h3"),jC(3),aT(4,Vn,3,1,"sh-chip",78),Qi(5,"sh-chip"),vg(6,"img",79),jC(7),$l()()(),Qi(8,"div",80)(9,"sh-chip",81),nC(10,16),$l()(),Qi(11,"div",63)(12,"button",82),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC(4);return Od(C.startBackup(c.Backup.ID))}),Lg(13,17),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",83),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC(4);return Od(C.openInConsole(c))}),Lg(16,18),vg(17,"sh-icon"),Fg(),$l()(),vg(18,"app-backup-progress",84),$l();}if(e&2){let n=iC().$implicit,_=iC(4);CE(3),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?4:-1),CE(2),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(5),Yg("loading",_.startingBackup()===n.Backup.ID),CE(6),yg("backupId",n.Backup.ID);}}function Kn(e,t){e&1&&(Qi(0,"sh-chip",78),Lg(1,21),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function jn(e,t){if(e&1&&(Qi(0,"sh-chip"),vg(1,"img",79),jC(2),$l()),e&2){let n=t.$implicit,_=iC(7);CE(),yg("src",_.getBackendIcon(n.TargetUrl),Qp),CE(),Ql(" ",_.getBackendType(n.TargetUrl)," ");}}function Wn(e,t){if(e&1&&dT(0,jn,3,2,"sh-chip",null,lT),e&2){let n=iC(2).$implicit;fT(n.Backup.AdditionalTargetURLs);}}function qn(e,t){if(e&1&&(Qi(0,"p")(1,"span"),nC(2,26),$l(),jC(3),ob(4,"relativeTime"),$l()),e&2){iC();let n=qC(5),_=iC(6);CE(3),Ql(" ",ab(4,1,n,_.timeType()==="actual")," ");}}function Qn(e,t){if(e&1&&(jC(0),ob(1,"durationFormat")),e&2){let n=iC(3).$implicit,_=iC(4);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupDuration,_.timeType()==="actual")," ");}}function Yn(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Zn(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC(3).$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.SourceFilesSize)," ");}}function et(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function nt(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC(3).$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.TargetFilesSize)," ");}}function tt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function it(e,t){if(e&1&&(Qi(0,"p")(1,"span"),nC(2,22),$l(),jC(3),ob(4,"relativeTime"),$l(),um(5),aT(6,qn,5,4,"p"),Qi(7,"p")(8,"span"),nC(9,23),$l(),aT(10,Qn,2,4)(11,Yn,2,0,"ng-container"),$l(),Qi(12,"p")(13,"span"),nC(14,24),$l(),aT(15,Zn,2,3)(16,et,2,0,"ng-container"),$l(),Qi(17,"p")(18,"span"),nC(19,25),$l(),aT(20,nt,2,3)(21,tt,2,0,"ng-container"),$l()),e&2){let n=iC(2).$implicit,_=iC(4);CE(3),Ql(" ",ab(4,5,n.Backup.Metadata?.LastBackupFinished,_.timeType()==="actual")," "),CE(2);let c=WC(_.scheduledTimes()[n.Backup.ID??""]);CE(),cT(c?6:-1),CE(4),cT(n.Backup.Metadata?.LastBackupDuration?10:11),CE(5),cT(n.Backup.Metadata?.SourceFilesSize?15:16),CE(5),cT(n.Backup.Metadata?.TargetFilesSize?20:21);}}function ot(e,t){if(e&1&&vg(0,"app-backup-progress",84),e&2){let n=iC(2).$implicit;yg("backupId",n.Backup.ID);}}function _t(e,t){e&1&&(Qi(0,"sh-chip",81),nC(1,27),$l());}function at(e,t){e&1&&Dg(0);}function lt(e,t){if(e&1&&(Qi(0,"div",77)(1,"div",59)(2,"h3"),jC(3),aT(4,Kn,3,1,"sh-chip",78),Qi(5,"sh-chip"),vg(6,"img",79),jC(7),$l(),aT(8,Wn,2,0),$l(),aT(9,it,22,9)(10,ot,1,1,"app-backup-progress",84),$l(),Qi(11,"div",80)(12,"sh-chip",85),nC(13,20),$l(),aT(14,_t,2,0,"sh-chip",81),$l(),Qi(15,"div",63),ag(16,at,1,0,"ng-container",86),$l()()),e&2){let n=iC().$implicit,_=iC(4),c=pC(33);CE(3),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?4:-1),CE(2),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(),cT(n.Backup.AdditionalTargetURLs?.length?8:-1),CE(),cT(_.runningBackupId()!==n.Backup.ID?9:10);let C=_.getBackupVersionCount(n);CE(4),jg(C)(C),rC(13),CE(),cT(n.Backup.ExternalID?14:-1),CE(2),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,Pn,n));}}function rt(e,t){if(e&1&&aT(0,Un,19,7,"div",76)(1,lt,17,13,"div",77),e&2){let n=t.$implicit;cT(n.Backup.ExternalID?0:1);}}function ct(e,t){if(e&1&&dT(0,rt,2,1,null,null,lT),e&2){let n=iC(3);fT(n.backups());}}function st(e,t){e&1&&(Qi(0,"div",75),Lg(1,28),Qi(2,"button",87),vg(3,"sh-icon"),$l(),Fg(),$l()),e&2&&(CE(2),yg("routerLink",KC(1,$n)));}function ut(e,t){if(e&1&&(Qi(0,"div",74),aT(1,ct,2,0)(2,st,4,2,"div",75),$l()),e&2){let n=iC(2);Yg("fallback",n.backups().length===0),CE(),cT(n.backups().length?1:2);}}function Ft(e,t){e&1&&(Lg(0,29,1),Dg(1),Fg());}function Ct(e,t){e&1&&(Lg(0,30,1),Dg(1),Fg());}function Tt(e,t){e&1&&(Lg(0,31,1),Dg(1),Fg());}function dt(e,t){e&1&&(Lg(0,32,1),Dg(1),Fg());}function Et(e,t){e&1&&(Lg(0,33,1),Dg(1),Fg());}function pt(e,t){e&1&&(Lg(0,34,1),Dg(1),Fg());}function gt(e,t){e&1&&(Lg(0,35,1),Dg(1),Fg());}function St(e,t){e&1&&(Qi(0,"sh-chip",98),Lg(1,39),vg(2,"sh-icon"),Fg(),$l()),e&2&&yg("shTooltip","Synchronization job");}function mt(e,t){if(e&1&&(Qi(0,"sh-chip"),vg(1,"img",79),jC(2),$l()),e&2){let n=t.$implicit,_=iC(5);CE(),yg("src",_.getBackendIcon(n.TargetUrl),Qp),CE(),Ql(" ",_.getBackendType(n.TargetUrl)," ");}}function Ot(e,t){if(e&1&&dT(0,mt,3,2,"sh-chip",null,lT),e&2){let n=iC().$implicit;fT(n.Backup.AdditionalTargetURLs);}}function Nt(e,t){if(e&1&&(jC(0),ob(1,"relativeTime")),e&2){let n=iC().$implicit,_=iC(3);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupFinished,_.timeType()==="actual")," ");}}function Mt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function It(e,t){if(e&1&&(jC(0),ob(1,"relativeTime")),e&2){iC();let n=qC(13),_=iC(3);Ql(" ",ab(1,1,n,_.timeType()==="actual")," ");}}function Pt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Dt(e,t){if(e&1&&(jC(0),ob(1,"durationFormat")),e&2){let n=iC().$implicit,_=iC(3);Ql(" ",ab(1,1,n.Backup.Metadata?.LastBackupDuration,_.timeType()==="actual")," ");}}function ft(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function ht(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC().$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.SourceFilesSize)," ");}}function $t(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function Rt(e,t){if(e&1&&(jC(0),ob(1,"bytes")),e&2){let n=iC().$implicit;Ql(" ",sb(1,1,n.Backup.Metadata?.TargetFilesSize)," ");}}function yt(e,t){e&1&&(ql(0),jC(1,"-"),Gl());}function At(e,t){e&1&&Dg(0);}function xt(e,t){if(e&1&&(Qi(0,"tr")(1,"td"),jC(2),aT(3,St,3,1,"sh-chip",98),$l(),Qi(4,"td")(5,"sh-chip",99),vg(6,"img",79),jC(7),$l(),aT(8,Ot,2,0),$l(),Qi(9,"td"),aT(10,Nt,2,4)(11,Mt,2,0,"ng-container"),$l(),Qi(12,"td"),um(13),aT(14,It,2,4)(15,Pt,2,0,"ng-container"),$l(),Qi(16,"td"),aT(17,Dt,2,4)(18,ft,2,0,"ng-container"),$l(),Qi(19,"td"),aT(20,ht,2,3)(21,$t,2,0,"ng-container"),$l(),Qi(22,"td"),aT(23,Rt,2,3)(24,yt,2,0,"ng-container"),$l(),Qi(25,"td")(26,"span"),nC(27,38),$l()(),Qi(28,"td"),ag(29,At,1,0,"ng-container",86),$l()()),e&2){let n=t.$implicit,_=iC(3),c=pC(33);CE(2),Ql(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),CE(),cT(n.Backup.OperationType==="Sync"?3:-1),CE(3),yg("src",_.getBackendIcon(n.Backup.TargetURL),Qp),CE(),Ql(" ",_.getBackendType(n.Backup.TargetURL)," "),CE(),cT(n.Backup.AdditionalTargetURLs?.length?8:-1),CE(2),cT(n.Backup.Metadata?.LastBackupFinished?10:11),CE(3);let C=WC(_.scheduledTimes()[n.Backup.ID??""]);CE(),cT(C?14:15),CE(3),cT(n.Backup.Metadata?.LastBackupDuration?17:18),CE(3),cT(n.Backup.Metadata?.SourceFilesSize?20:21),CE(3),cT(n.Backup.Metadata?.TargetFilesSize?23:24);let y=_.getBackupVersionCount(n);CE(4),jg(y)(y),rC(27),CE(2),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(15,Pn,n));}}function Ht(e,t){if(e&1){let n=vT();Qi(0,"sh-table",88),cm("sortByColumnChange",function(c){kd(n);let C=iC(2);return UC(C.sortByColumn,c)||(C.sortByColumn=c),Od(c)}),Qi(1,"tr",89)(2,"th",90),Lg(3,29),ag(4,Ft,2,0,"ng-container",91),Fg(),$l(),Qi(5,"th",92),Lg(6,30),ag(7,Ct,2,0,"ng-container",91),Fg(),$l(),Qi(8,"th",93),Lg(9,31),ag(10,Tt,2,0,"ng-container",91),Fg(),$l(),Qi(11,"th",94),Lg(12,32),ag(13,dt,2,0,"ng-container",91),Fg(),$l(),Qi(14,"th",95),Lg(15,33),ag(16,Et,2,0,"ng-container",91),Fg(),$l(),Qi(17,"th",96),Lg(18,34),ag(19,pt,2,0,"ng-container",91),Fg(),$l(),Qi(20,"th",97),Lg(21,35),ag(22,gt,2,0,"ng-container",91),Fg(),$l(),Qi(23,"th"),nC(24,36),$l(),Qi(25,"th"),nC(26,37),$l()(),dT(27,xt,30,17,"tr",null,lT),$l();}if(e&2){let n=iC(2),_=pC(35);yg("data",n.backups())("loading",n.backupsLoading()),am("sortByColumn",n.sortByColumn),CE(4),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(3),yg("ngTemplateOutlet",_),CE(5),fT(n.backups());}}function Lt(e,t){if(e&1&&aT(0,ut,3,3,"div",72)(1,Ht,29,10,"sh-table",73),e&2){let n=iC();cT(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1);}}function kt(e,t){e&1&&(Qi(0,"div",100),vg(1,"sh-progress-bar",101),Qi(2,"div",59)(3,"h3"),nC(4,40),$l()()());}function Gt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC(3);return Od(c.abort())}),Lg(1,42),vg(2,"sh-icon"),Fg(),$l();}if(e&2){let n=iC(3);Yg("small",n.viewMode()==="details");}}function bt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC(3);return Od(c.stop())}),Lg(1,43),vg(2,"sh-icon"),Fg(),$l();}if(e&2){let n=iC(3);Yg("small",n.viewMode()==="details");}}function Bt(e,t){e&1&&(Lg(0,41,1),vg(1,"sh-icon"),Fg());}function vt(e,t){e&1&&(Lg(0,41,2),vg(1,"sh-icon"),Fg());}function Jt(e,t){if(e&1){let n=vT();aT(0,Gt,3,2,"button",102)(1,bt,3,2,"button",102),Qi(2,"button",82),Vg("click",function(){kd(n);let c=iC(2);return Od(c.pauseResume())}),Lg(3,41),aT(4,Bt,2,0)(5,vt,2,0),Fg(),$l();}if(e&2){let n=iC(2);cT(n.isStopping()?0:1),CE(2),Yg("small",n.viewMode()==="details")("loading",n.isResuming()),CE(2),cT(n.clientIsRunning()?4:5);}}function Xt(e,t){e&1&&nC(0,44,1);}function wt(e,t){e&1&&(Qi(0,"button",103)(1,"sh-icon"),jC(2,"pencil-simple"),$l()()),e&2&&yg("shTooltip","Externally managed")("disabled",true);}function zt(e,t){if(e&1&&(Qi(0,"button",104)(1,"sh-icon"),jC(2,"pencil-simple"),$l()()),e&2){let n=iC(2).$implicit;yg("routerLink",JC(1,kn,n.Backup.ID));}}function Vt(e,t){e&1&&(Qi(0,"button",103)(1,"sh-icon"),jC(2,"dots-three-vertical"),$l()()),e&2&&yg("shTooltip","Externally managed")("disabled",true);}function Ut(e,t){e&1&&(Qi(0,"sh-icon"),jC(1,"check"),$l());}function Kt(e,t){e&1&&(Qi(0,"sh-icon"),jC(1,"dots-three-vertical"),$l());}function jt(e,t){if(e&1&&(Qi(0,"button",108),aT(1,Ut,2,0,"sh-icon")(2,Kt,2,0,"sh-icon"),$l()),e&2){let n=iC(2).$implicit,_=iC();Yg("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),CE(),cT(_.successId()===n.Backup.ID?1:2);}}function Wt(e,t){if(e&1&&(Qi(0,"button",107),Lg(1,55),vg(2,"sh-icon"),Fg(),$l()),e&2){let n=iC(3).$implicit;yg("routerLink",JC(1,Gn,n.Backup.ID));}}function qt(e,t){if(e&1&&(Qi(0,"button",107),Lg(1,56),vg(2,"sh-icon"),Fg(),$l()),e&2){let n=iC(3).$implicit;yg("routerLink",JC(1,bn,n.Backup.ID));}}function Qt(e,t){if(e&1&&(vg(0,"sh-divider"),Qi(1,"h3",106),nC(2,54),$l(),aT(3,Wt,3,3,"button",107),aT(4,qt,3,3,"button",107)),e&2){let n=iC(3);CE(3),cT(n.hasDeleteVersions()?3:-1),CE(),cT(n.hasBrokenFiles()?4:-1);}}function Yt(e,t){if(e&1){let n=vT();Qi(0,"button",82),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC();return Od(C.startBackup(c.Backup.ID))}),Lg(1,44),vg(2,"sh-icon"),aT(3,Xt,1,0),Fg(),$l(),aT(4,wt,3,2,"button",103)(5,zt,3,3,"button",104),Qi(6,"sh-menu"),aT(7,Vt,3,2,"button",103)(8,jt,3,5,"button",105),ql(9,69),Qi(10,"h3",106),jC(11,"Operations"),$l(),Qi(12,"button",107),Lg(13,45),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",107),Lg(16,46),vg(17,"sh-icon"),Fg(),$l(),Qi(18,"button",107),Lg(19,47),vg(20,"sh-icon"),Fg(),$l(),vg(21,"sh-divider"),Qi(22,"h3",106),nC(23,48),$l(),Qi(24,"button",107),Lg(25,49),vg(26,"sh-icon"),Fg(),$l(),Qi(27,"button",70),Vg("click",function(){kd(n);let c=iC().$implicit,C=iC();return Od(C.verifyFiles(c.Backup.ID))}),Lg(28,50),vg(29,"sh-icon"),Fg(),$l(),Qi(30,"button",107),Lg(31,51),vg(32,"sh-icon"),Fg(),$l(),aT(33,Qt,5,2),vg(34,"sh-divider"),Qi(35,"h3",106),nC(36,52),$l(),Qi(37,"button",107),Lg(38,53),vg(39,"sh-icon"),Fg(),$l(),Gl(),$l();}if(e&2){let n=iC().$implicit,_=iC();Yg("loading",_.startingBackup()===n.Backup.ID),CE(3),cT(_.viewMode()==="list"?3:-1),CE(),cT(n.Backup.ExternalID?4:5),CE(3),cT(n.Backup.ExternalID?7:8),CE(5),yg("routerLink",JC(12,Rn,n.Backup.ID)),CE(3),yg("routerLink",JC(14,yn,n.Backup.ID)),CE(3),yg("routerLink",JC(16,An,n.Backup.ID)),CE(6),yg("routerLink",JC(18,xn,n.Backup.ID)),CE(6),yg("routerLink",JC(20,Hn,n.Backup.ID)),CE(3),cT(_.hasDeleteVersions()||_.hasBrokenFiles()?33:-1),CE(4),yg("routerLink",JC(22,Ln,n.Backup.ID));}}function Zt(e,t){if(e&1&&aT(0,Jt,6,6)(1,Yt,40,24),e&2){let n=t.$implicit,_=iC();cT(_.runningBackupId()===n.Backup.ID?0:1);}}function ei(e,t){e&1&&(Qi(0,"sh-icon",109),jC(1,"funnel-simple"),$l(),Qi(2,"sh-icon",110),jC(3,"sort-ascending"),$l(),Qi(4,"sh-icon",111),jC(5,"sort-descending"),$l());}var le=class e{#t=T(C);#n=T(y);#e=T(g);#_=T(C$1);#a=T(Q);#l=T(be);#i=T(m);hasDeleteVersions=this.#i.hasV2DeleteVersions;hasBrokenFiles=this.#i.hasV2BrokenFiles;MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;runningBackupId=this.#n.runningBackupId;getBackendType=Ne;getBackendIcon=Ee;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=Nt$1(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=Nt$1(()=>this.runningTask()==this.#o());scheduledTimes=Nt$1(()=>{let t=this.#a.serverState()?.ProposedSchedule??[],n=this.#e.backups(),_={};return n.forEach(c=>{let C=c.Backup?.ID;if(C){var y=t.find(X=>X.Item1==C);y?.Item2?_[C]=y.Item2:c.Schedule?.Time&&(_[C]=c.Schedule.Time);}}),_});#o=Ge(-1);viewMode=A("viewMode","list");sortByColumn=Ge(this.#e.orderBy());loadingId=Ge(null);successId=Ge(null);sortEffect=za(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(true);}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#_.openConsole("/app/machines/configurations/"+n);}setOrderBy(t){this.#e.setOrderBy(t);}setTimeType(t){this.#e.setTimeType(t);}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t));}openPauseDialog(){this.#l.open(k,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe());}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe();}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(qu(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3);}});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=hw({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let C;C=$localize`Recover your files from any backup set.`;let y;y=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let X;X=$localize`My backups`;let re;re=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let ce;ce=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let se;se=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ue;ue=$localize`Relative time`;let Fe;Fe=$localize`Actual time`;let Ce;Ce=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Te;Te=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let de;de=$localize`Externally managed`;let Ee;Ee=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Start `;let pe;pe=$localize` Edit in console ${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ge;ge=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let w;w=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,w=oC(w,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Se;Se=$localize` ${w}:ICU@@6502601490918455200: `;let me;me=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Oe;Oe=$localize`Last successful backup:`;let Ne;Ne=$localize`Duration:`;let Me;Me=$localize`Source:`;let Ie;Ie=$localize`Destination:`;let Pe;Pe=$localize`Next scheduled run:`;let De;De=$localize`Externally managed`;let fe;fe=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let he;he=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let $e;$e=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Re;Re=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ye;ye=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ae;Ae=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let xe;xe=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let He;He=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Le;Le=$localize`Version`;let ke;ke=$localize`Actions`;let z;z=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,z=oC(z,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ge;Ge=$localize` ${z}:ICU@@3521773141017690117: `;let be;be=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Be;Be=$localize`Loading backups...`;let V;V=$localize`${"\uFFFD*4:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,V=oC(V);let ve;ve=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let Je;Je=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Xe;Xe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let we;we=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let ze;ze=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ve;Ve=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Ue;Ue=$localize`Advanced`;let Ke;Ke=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let je;je=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let We;We=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let qe;qe=$localize`Reporting`;let Qe;Qe=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON: Log `;let Ye;Ye=$localize`Cleanup`;let Ze;Ze=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Delete versions `;let en;return en=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:file-x${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Purge broken files `,[["actions",""],["sortIcons",""],t,n,_,c,C,y,X,re,ce,se,ue,Fe,Ce,Te,de,Ee,pe,ge,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,he,$e,Re,ye,Ae,xe,He,Le,ke,Ge,be,Be,V,ve,Je,Xe,we,ze,Ve,Ue,Ke,je,We,qe,Qe,Ye,Ze,en,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],[1,"simple","accent",3,"shTooltip"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small","accent",3,"shTooltip"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["type","button","shButton","",3,"shTooltip","disabled"],["type","button","shButton","",3,"routerLink"],["type","button","shButton","",3,"loading","success"],["title",""],["type","button",3,"routerLink"],["type","button","shButton",""],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"header")(3,"sh-card",57),Vg("keydown.enter",function(C){return C.target.click()})("keydown.space",function(C){return C.target.click()}),vg(4,"img",58),Qi(5,"div",59)(6,"h3"),nC(7,2),$l(),Qi(8,"p"),nC(9,3),$l()(),Qi(10,"button",60),Lg(11,4),vg(12,"sh-icon"),Fg(),$l()(),Qi(13,"sh-card",57),Vg("keydown.enter",function(C){return C.target.click()})("keydown.space",function(C){return C.target.click()}),vg(14,"img",61),Qi(15,"div",59)(16,"h3"),nC(17,5),$l(),Qi(18,"p"),nC(19,6),$l()(),Qi(20,"button",60),Lg(21,7),vg(22,"sh-icon"),Fg(),$l()()(),Qi(23,"div",62)(24,"h2"),ql(25),nC(26,8),Gl(),aT(27,zn,22,3,"div",63),$l(),cg(28,Lt,2,1)(29,kt,5,0),oT(30,28,Dn,null,29),$l()(),ag(32,Zt,2,1,"ng-template",null,0,lb)(34,ei,6,0,"ng-template",null,1,lb)),n&2&&(CE(3),yg("routerLink",KC(4,fn)),CE(10),yg("routerLink",KC(5,hn)),CE(14),cT(_.backups().length>0?27:-1),CE(3),iT(!_.backupsLoading()));},dependencies:[_t$1,ee,f,v,N,c,ve,d,x,at$1],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"]})};var chunkXA5RWQQ5=/*#__PURE__*/Object.freeze({__proto__:null,APP_BASE_HREF:ce,BrowserPlatformLocation:y$1,CommonModule:Fi,DATE_PIPE_DEFAULT_OPTIONS:tn,DATE_PIPE_DEFAULT_TIMEZONE:en,DOCUMENT:Mr,DatePipe:ci,DecimalPipe:pi,FormStyle:A$1,FormatWidth:I,IMAGE_CONFIG:fv,IMAGE_LOADER:Je,JsonPipe:hi,Location:Ne$1,LocationStrategy:U,NgFor:Jt$1,NgForOf:Jt$1,NgForOfContext:Ce,NgIf:Kn$1,NgIfContext:ye,NgLocaleLocalization:qt$1,NgLocalization:Ee$1,NgPlural:Qt$1,NgSwitch:Ze,NgTemplateOutlet:ei$1,NumberFormatStyle:ne,NumberSymbol:m$1,PathLocationStrategy:de,PlatformLocation:g$1,PlatformNavigation:nn,Plural:j,TranslationWidth:d$1,WeekDay:Rt$1,formatCurrency:Zt$1,formatDate:Gt$1,formatNumber:Kt$1,formatPercent:Yt$1,getCurrencySymbol:zt$1,getLocaleDateFormat:q,getLocaleDateTimeFormat:Q$1,getLocaleDayNames:Bt$1,getLocaleDayPeriods:Pt$1,getLocaleEraNames:kt$1,getLocaleExtraDayPeriodRules:Ut$1,getLocaleExtraDayPeriods:jt$1,getLocaleId:Ot$1,getLocaleMonthNames:Nt$2,getLocaleNumberFormat:Fe,getLocaleNumberSymbol:M,getLocalePluralCase:xt$1,getLocaleTimeFormat:J,getNumberOfCurrencyDigits:Vt$1,isPlatformBrowser:Rr,isPlatformServer:Or,registerLocaleData:Tr,ɵDomAdapter:f$1,ɵPLATFORM_BROWSER_ID:wi,ɵPLATFORM_SERVER_ID:Ai,ɵgetDOM:s,ɵnormalizeQueryParams:L,ɵparseCookieValue:k$1,ɵsetRootDomAdapter:_});var chunkBEVA4HT2=/*#__PURE__*/Object.freeze({__proto__:null,ShipChip:D});var chunkQICO34G3=/*#__PURE__*/Object.freeze({__proto__:null,BackupProgressComponent:W});var chunkCORTKH64=/*#__PURE__*/Object.freeze({__proto__:null,DurationFormatPipe:c$1});var chunkCHQM3PCJ=/*#__PURE__*/Object.freeze({__proto__:null,BytesPipe:m$2});var chunkKDVMMWQR=/*#__PURE__*/Object.freeze({__proto__:null,RelativeTimePipe:m$3});export{le as default};