@duplicati/ngclient 0.0.88 → 0.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/{chunk-UUNZQKSW.js → chunk-2FAACUDI.js} +1 -1
  2. package/{chunk-Z55AE6ZP.js → chunk-2UJP6WUU.js} +1 -1
  3. package/{chunk-IOCSGWZ3.js → chunk-6BPJFTZW.js} +1 -1
  4. package/{chunk-RZ4FUSBJ.js → chunk-6CW3SAXM.js} +1 -1
  5. package/{chunk-F4QKO25T.js → chunk-76MZP6D5.js} +1 -1
  6. package/{chunk-GWK5ZGTC.js → chunk-7AHZCQM7.js} +1 -1
  7. package/{chunk-KD4DXWHW.js → chunk-B6FHJOT5.js} +1 -1
  8. package/{chunk-KL4KTR4Z.js → chunk-C4CQLUE6.js} +1 -1
  9. package/{chunk-H3MGI3SF.js → chunk-DJWDNTTP.js} +1 -1
  10. package/chunk-DJZUZAH5.js +1 -0
  11. package/{chunk-25GEPULG.js → chunk-DKICGIGJ.js} +1 -1
  12. package/{chunk-SK5UJPNU.js → chunk-DPNFOEAN.js} +1 -1
  13. package/chunk-DPPV7DVK.js +1 -0
  14. package/{chunk-Z4U4LDKL.js → chunk-EAGORY3U.js} +1 -1
  15. package/{chunk-UK7OJJ5S.js → chunk-EMLPXGRD.js} +1 -1
  16. package/{chunk-7CDKTUA7.js → chunk-FCQHE46G.js} +2 -2
  17. package/{chunk-O4ZJY3TF.js → chunk-H5V5U4VH.js} +1 -1
  18. package/{chunk-UJMJKY2E.js → chunk-JCIUBQIN.js} +1 -1
  19. package/{chunk-3CXMAX4S.js → chunk-JFC5Z7YL.js} +1 -1
  20. package/{chunk-SXPBIWPS.js → chunk-L2LZKY4R.js} +1 -1
  21. package/chunk-LAGOXMVK.js +1 -0
  22. package/chunk-LBJYPZA5.js +1 -0
  23. package/{chunk-GLM4XFEI.js → chunk-LRB2TMMB.js} +1 -1
  24. package/{chunk-BIVRH4JH.js → chunk-MMNUKDWS.js} +1 -1
  25. package/{chunk-G3LEXMG4.js → chunk-MTCSELIF.js} +1 -1
  26. package/{chunk-OEVX57MC.js → chunk-PEA355CX.js} +1 -1
  27. package/{chunk-AM4I6XHR.js → chunk-RS7BKRUH.js} +1 -1
  28. package/{chunk-5KNWZI2J.js → chunk-S3L5VJJF.js} +3 -3
  29. package/{chunk-Q3SDBZEH.js → chunk-SJBPW65N.js} +1 -1
  30. package/{chunk-DJD73EPX.js → chunk-T7LDHEC3.js} +1 -1
  31. package/{chunk-M5PD5WBV.js → chunk-U7UIU734.js} +1 -1
  32. package/{chunk-3T23UBO4.js → chunk-UPW4CQ72.js} +1 -1
  33. package/{chunk-5XP5TOQE.js → chunk-VP3M4CWS.js} +1 -1
  34. package/chunk-XTSJURO6.js +6 -0
  35. package/{chunk-GUJTHKVP.js → chunk-ZEMCELQ7.js} +1 -1
  36. package/chunk-ZI4ZJIB3.js +1 -0
  37. package/{chunk-FDQ7IWYZ.js → chunk-ZIKYV2TR.js} +1 -1
  38. package/{chunk-MHTKXCYS.js → chunk-ZSKZUTTA.js} +1 -1
  39. package/index.html +2 -2
  40. package/{main-QHLXX2KA.js → main-NR6TAXFB.js} +1 -1
  41. package/package.json +1 -1
  42. package/styles-OABXKND4.css +1 -0
  43. package/chunk-CDH4KG7H.js +0 -1
  44. package/chunk-GMW5Y454.js +0 -1
  45. package/chunk-JJOXLPZI.js +0 -1
  46. package/chunk-KTUAPEOD.js +0 -1
  47. package/chunk-N7MNI34K.js +0 -1
  48. package/chunk-W7Y2VKMS.js +0 -6
  49. package/styles-EJ7NNNKB.css +0 -1
@@ -1,2 +1,2 @@
1
- import{a as K}from"./chunk-ODIN2IGP.js";import{b as X}from"./chunk-UIOTKB6J.js";import{a as z,d as J,g as q}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as a,Bb as g,Fb as u,Lb as A,Lc as W,Mb as D,Na as E,Nb as y,Pa as l,Rb as S,Sb as f,Vb as w,W as v,ba as d,ca as _,cb as h,ec as c,fc as C,gc as I,hb as k,hc as N,jc as $,kc as B,lc as V,mc as U,o as T,qb as F,qc as G,sa as m,vb as x,wb as M,xb as P,yb as R,zb as i}from"./chunk-ZSSQBIRK.js";import{a as b,b as O}from"./chunk-C6Q5SG76.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=f().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),S("click",function(){let o=d(e).$implicit,r=f();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),x(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
1
+ import{a as K}from"./chunk-ODIN2IGP.js";import{b as X}from"./chunk-UIOTKB6J.js";import{a as z,d as J,g as q}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as a,Bb as g,Fb as u,Lb as A,Lc as W,Mb as D,Na as E,Nb as y,Pa as l,Rb as S,Sb as f,Vb as w,W as v,ba as d,ca as _,cb as h,ec as c,fc as C,gc as I,hb as k,hc as N,jc as $,kc as B,lc as V,mc as U,o as T,qb as F,qc as G,sa as m,vb as x,wb as M,xb as P,yb as R,zb as i}from"./chunk-ZSSQBIRK.js";import{a as b,b as O}from"./chunk-C6Q5SG76.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=f().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),S("click",function(){let o=d(e).$implicit,r=f();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),x(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
2
  `),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-libraries"]],decls:15,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let o=u();i(0,"h3"),y(1,0),a(),P(2,Q,13,5,"div",2,M),i(4,"spk-dialog",3),V("isOpenChange",function(p){return d(o),B(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),i(5,"header",4)(6,"h3"),c(7),a()(),i(8,"div",5),U(9),i(10,"div",6),c(11),a()(),i(12,"footer",7)(13,"button",8),S("click",function(){return d(o),_(n.dialogLicense.set(null))}),c(14,"Close"),a()()()}if(e&2){let o,r;l(2),R(n.licenses()),l(2),$("isOpen",n.dialogIsOpen),F("options",G(4,j)),l(3),C((o=n.dialogLicense())==null?null:o.Title);let p=(r=(r=n.dialogLicense())==null?null:r.License)!==null&&r!==void 0?r:"";l(4),I(" ",p," ")}},dependencies:[z,q,J],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-level-40);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-level-40)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-level-10);color:var(--base-level-70);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-level-40)}"],changeDetection:0})};export{L as default};
@@ -1 +1 @@
1
- import{b,c as L,d as N,e as M,h as k,m as v,p as P,q as O,s as x}from"./chunk-5OX72VKG.js";import{c as S}from"./chunk-ZZPLRWQP.js";import"./chunk-UIOTKB6J.js";import{c as y}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as E,b as F,g as G,l as T}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as i,Bb as p,C as c,Pa as m,Rb as w,W as s,cb as g,ec as n,hb as f,qb as h,sa as l,sb as _,vb as C,zb as t}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";function A(r,e){r&1&&(t(0,"spk-alert",1),n(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new O,d=class r{#e=s(y);#t=s(S);failedLogin=l(!1);isLoading=l(!1);loginForm=u.group({user:u.control(""),pass:u.control("",L.required)});submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=g({type:r,selectors:[["app-login"]],decls:15,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],["type","warning"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(o,a){o&1&&(t(0,"form",0),w("submit",function(){return a.submit()}),f(1,A,2,0,"spk-alert",1),t(2,"div",2),p(3,"input",3),t(4,"spk-form-field")(5,"label",4),n(6," Password "),t(7,"a",5)(8,"spk-icon"),n(9,"question"),i()()(),p(10,"input",6),i(),t(11,"button",7),n(12," Login "),t(13,"spk-icon"),n(14,"arrow-right"),i()()()()),o&2&&(h("formGroup",a.loginForm),m(),C(a.failedLogin()?1:-1),m(10),_("loader",a.isLoading()))},dependencies:[x,k,b,N,M,v,P,T,E,G,F],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{d as default};
1
+ import{b,c as L,d as N,e as M,h as k,m as v,p as P,q as O,s as x}from"./chunk-5OX72VKG.js";import{c as S}from"./chunk-ZZPLRWQP.js";import"./chunk-UIOTKB6J.js";import{c as y}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as E,b as F,g as G,l as T}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as i,Bb as p,C as c,Pa as m,Rb as w,W as s,cb as g,ec as n,hb as f,qb as h,sa as l,sb as _,vb as C,zb as t}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";function A(r,e){r&1&&(t(0,"spk-alert",1),n(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new O,d=class r{#e=s(y);#t=s(S);failedLogin=l(!1);isLoading=l(!1);loginForm=u.group({user:u.control(""),pass:u.control("",L.required)});submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=g({type:r,selectors:[["app-login"]],decls:15,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],["type","warning"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(o,a){o&1&&(t(0,"form",0),w("submit",function(){return a.submit()}),f(1,A,2,0,"spk-alert",1),t(2,"div",2),p(3,"input",3),t(4,"spk-form-field")(5,"label",4),n(6," Password "),t(7,"a",5)(8,"spk-icon"),n(9,"question"),i()()(),p(10,"input",6),i(),t(11,"button",7),n(12," Login "),t(13,"spk-icon"),n(14,"arrow-right"),i()()()()),o&2&&(h("formGroup",a.loginForm),m(),C(a.failedLogin()?1:-1),m(10),_("loader",a.isLoading()))},dependencies:[x,k,b,N,M,v,P,T,E,G,F],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{d as default};
@@ -1 +1 @@
1
- import{c as a,d as b,e as c}from"./chunk-W7Y2VKMS.js";import"./chunk-3T23UBO4.js";import"./chunk-BIVRH4JH.js";import"./chunk-DNHLTHLR.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
1
+ import{c as a,d as b,e as c}from"./chunk-XTSJURO6.js";import"./chunk-UPW4CQ72.js";import"./chunk-MMNUKDWS.js";import"./chunk-DNHLTHLR.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
@@ -1,2 +1,2 @@
1
- import{b as B}from"./chunk-UIOTKB6J.js";import{a as D,u as U}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import{pa as R}from"./chunk-WYTHNCNI.js";import{Ab as a,Bb as u,C as S,Fb as v,Ma as T,Nb as p,Pa as l,Rb as A,Sb as c,W as O,ba as M,ca as L,cb as f,ec as _,fc as g,hb as E,jc as $,kc as k,lc as y,qb as m,rb as P,sa as d,sb as h,uc as G,vb as b,wb as N,wc as w,xb as x,yb as I,zb as o}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";function X(s,n){if(s&1&&(o(0,"tr")(1,"td",10)(2,"code"),u(3,"ol",11),a()()()),s&2){let e=c().$implicit,t=c();l(),P("grid-column","1 / -1")("height","auto"),l(2),m("innerHTML",t.breakIntoLines(e.Exception),T)}}function z(s,n){if(s&1){let e=v();o(0,"tr",7),A("click",function(){let i=M(e).$index,r=c();return L(r.toggleRow(i))}),o(1,"td"),_(2),G(3,"date"),a(),o(4,"td",8),_(5),a(),o(6,"td"),_(7),a(),o(8,"td")(9,"button",9)(10,"spk-icon"),_(11,"caret-down"),a()()()(),E(12,X,4,5,"tr")}if(s&2){let e=n.$implicit,t=n.$index,i=c();l(2),g(w(3,6,e.Timestamp,"MMM dd. hh:mm")),l(3),g(e.BackupID>=0?e.BackupID:"-"),l(2),g(e.Message),l(2),h("rotated-icon",t===i.openRowIndex()),l(3),b(t===i.openRowIndex()?12:-1)}}var F=["BackupID","Timestamp","Message","actions"],C=class s{#e=O(B);displayedColumns=d(F);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(S(()=>this.logsLoading.set(!1))).subscribe({next:n=>{this.logs.set(n)}})}toggleRow(n){this.openRowIndex.set(n===this.openRowIndex()?null:n)}breakIntoLines(n){let e=n.split(`
1
+ import{b as B}from"./chunk-UIOTKB6J.js";import{a as D,u as U}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import{pa as R}from"./chunk-WYTHNCNI.js";import{Ab as a,Bb as u,C as S,Fb as v,Ma as T,Nb as p,Pa as l,Rb as A,Sb as c,W as O,ba as M,ca as L,cb as f,ec as _,fc as g,hb as E,jc as $,kc as k,lc as y,qb as m,rb as P,sa as d,sb as h,uc as G,vb as b,wb as N,wc as w,xb as x,yb as I,zb as o}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";function X(s,n){if(s&1&&(o(0,"tr")(1,"td",10)(2,"code"),u(3,"ol",11),a()()()),s&2){let e=c().$implicit,t=c();l(),P("grid-column","1 / -1")("height","auto"),l(2),m("innerHTML",t.breakIntoLines(e.Exception),T)}}function z(s,n){if(s&1){let e=v();o(0,"tr",7),A("click",function(){let i=M(e).$index,r=c();return L(r.toggleRow(i))}),o(1,"td"),_(2),G(3,"date"),a(),o(4,"td",8),_(5),a(),o(6,"td"),_(7),a(),o(8,"td")(9,"button",9)(10,"spk-icon"),_(11,"caret-down"),a()()()(),E(12,X,4,5,"tr")}if(s&2){let e=n.$implicit,t=n.$index,i=c();l(2),g(w(3,6,e.Timestamp,"MMM dd. hh:mm")),l(3),g(e.BackupID>=0?e.BackupID:"-"),l(2),g(e.Message),l(2),h("rotated-icon",t===i.openRowIndex()),l(3),b(t===i.openRowIndex()?12:-1)}}var F=["BackupID","Timestamp","Message","actions"],C=class s{#e=O(B);displayedColumns=d(F);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(S(()=>this.logsLoading.set(!1))).subscribe({next:n=>{this.logs.set(n)}})}toggleRow(n){this.openRowIndex.set(n===this.openRowIndex()?null:n)}breakIntoLines(n){let e=n.split(`
2
2
  `),t="";for(let i=0;i<e.length;i++)t+=`<li>${e[i]}</li>`;return t}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["app-logs"]],decls:15,vars:2,consts:()=>{let n;n=$localize`Timestamp`;let e;e=$localize`Backup ID`;let t;t=$localize`Message`;let i;return i=$localize`No data available`,[n,e,t,i,[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol",3,"innerHTML"]]},template:function(e,t){e&1&&(o(0,"h3"),_(1,"Logs"),a(),o(2,"spk-table",4),y("dataChange",function(r){return k(t.logs,r)||(t.logs=r),r}),o(3,"tr",5)(4,"th"),p(5,0),a(),o(6,"th"),p(7,1),a(),o(8,"th"),p(9,2),a(),u(10,"th"),a(),x(11,z,13,9,null,null,N),o(13,"div",6),p(14,3),a()()),e&2&&(l(2),$("data",t.logs),m("loading",t.logsLoading()),l(9),I(t.logs()))},dependencies:[U,R,D],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{C as default};
@@ -1 +1 @@
1
- import{o as g}from"./chunk-W7Y2VKMS.js";import"./chunk-3T23UBO4.js";import"./chunk-BIVRH4JH.js";import"./chunk-DNHLTHLR.js";import{a as k}from"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import{a as I}from"./chunk-25GEPULG.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import{a as $}from"./chunk-W3VTD2H4.js";import"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as O}from"./chunk-UIOTKB6J.js";import{a as P,b as h,d as E,e as B}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{o as M,p as b,t as N}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as p,B as m,Bb as n,Lb as d,Lc as A,Mb as c,Pa as r,W as l,cb as f,hb as C,pc as R,qb as u,sc as _,vb as D,zb as s}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=l(P);#e=l(g);#a=l($);#i=l(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,b,N,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{T as default};
1
+ import{o as g}from"./chunk-XTSJURO6.js";import"./chunk-UPW4CQ72.js";import"./chunk-MMNUKDWS.js";import"./chunk-DNHLTHLR.js";import{a as k}from"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import{a as I}from"./chunk-DKICGIGJ.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import{a as $}from"./chunk-W3VTD2H4.js";import"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as O}from"./chunk-UIOTKB6J.js";import{a as P,b as h,d as E,e as B}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{o as M,p as b,t as N}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as p,B as m,Bb as n,Lb as d,Lc as A,Mb as c,Pa as r,W as l,cb as f,hb as C,pc as R,qb as u,sc as _,vb as D,zb as s}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=l(P);#e=l(g);#a=l($);#i=l(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,b,N,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{T as default};
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-ODIN2IGP.js";import{a as te}from"./chunk-25GEPULG.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import{a as j}from"./chunk-W3VTD2H4.js";import{b as H,d as J,g as Q,r as Y}from"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as W}from"./chunk-UIOTKB6J.js";import{a as z,d as q}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as Z,g as x,l as ee}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as a,B as g,Bb as l,C as u,Jc as C,K as k,Lb as r,Lc as h,Mb as p,Nb as T,Ob as L,Pa as s,Pb as U,Rb as A,W as D,cb as y,ec as E,hb as v,jc as w,kc as X,lc as V,o as O,qb as F,sa as c,sb as P,ub as G,vb as K,zb as i}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),E(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),E(1,"warning"),a())}var m=class S{#a=D(z);#i=D(j);#e=D(W);#t="";backupId=ae(this.#a.params.pipe(O(t=>t.id)));activeBackup=C(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=C(()=>this.lastValidatedPath()===this.backupFilePath());backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),u(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),u(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:15,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$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 n;n=$localize`Maintainance`;let d;d=$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. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let b;b=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,d,f,b,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintainance"],["spk-button","",3,"click"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"],["spk-button","",3,"click","disabled"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),T(8,1),a(),i(9,"p"),T(10,2),a()(),i(11,"article")(12,"h2"),T(13,3),a(),i(14,"p"),T(15,4),a(),i(16,"div",15)(17,"button",16),A("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),A("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),A("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),T(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(d){return X(e.backupFilePath,d)||(e.backupFilePath=d),d}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",20),A("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",20),A("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",20),A("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",20),A("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),s(3),P("loader",e.isDeleting()),s(3),P("loader",e.isRestoring()),s(6),G(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath())}},dependencies:[Y,H,J,Q,te,x,ee,Z,q],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}"],changeDetection:0})};export{m as default};
1
+ import{a as ae}from"./chunk-ODIN2IGP.js";import{a as te}from"./chunk-DKICGIGJ.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import{a as j}from"./chunk-W3VTD2H4.js";import{b as H,d as J,g as Q,r as Y}from"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as W}from"./chunk-UIOTKB6J.js";import{a as z,d as q}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as Z,g as x,l as ee}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as a,B as g,Bb as l,C as u,Jc as C,K as k,Lb as r,Lc as h,Mb as p,Nb as T,Ob as L,Pa as s,Pb as U,Rb as A,W as D,cb as y,ec as E,hb as v,jc as w,kc as X,lc as V,o as O,qb as F,sa as c,sb as P,ub as G,vb as K,zb as i}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),E(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),E(1,"warning"),a())}var m=class S{#a=D(z);#i=D(j);#e=D(W);#t="";backupId=ae(this.#a.params.pipe(O(t=>t.id)));activeBackup=C(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=C(()=>this.lastValidatedPath()===this.backupFilePath());backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),u(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),u(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:15,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$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 n;n=$localize`Maintainance`;let d;d=$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. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let b;b=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,d,f,b,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintainance"],["spk-button","",3,"click"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"],["spk-button","",3,"click","disabled"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),T(8,1),a(),i(9,"p"),T(10,2),a()(),i(11,"article")(12,"h2"),T(13,3),a(),i(14,"p"),T(15,4),a(),i(16,"div",15)(17,"button",16),A("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),A("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),A("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),T(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(d){return X(e.backupFilePath,d)||(e.backupFilePath=d),d}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",20),A("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",20),A("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",20),A("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",20),A("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),s(3),P("loader",e.isDeleting()),s(3),P("loader",e.isRestoring()),s(6),G(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath())}},dependencies:[Y,H,J,Q,te,x,ee,Z,q],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}"],changeDetection:0})};export{m as default};
@@ -1 +1 @@
1
- import{m as a,n as b}from"./chunk-W7Y2VKMS.js";import"./chunk-3T23UBO4.js";import"./chunk-BIVRH4JH.js";import"./chunk-DNHLTHLR.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createSourceDataForm,b as default};
1
+ import{m as a,n as b}from"./chunk-XTSJURO6.js";import"./chunk-UPW4CQ72.js";import"./chunk-MMNUKDWS.js";import"./chunk-DNHLTHLR.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{k as a,l as b}from"./chunk-W7Y2VKMS.js";import"./chunk-3T23UBO4.js";import"./chunk-BIVRH4JH.js";import"./chunk-DNHLTHLR.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
1
+ import{k as a,l as b}from"./chunk-XTSJURO6.js";import"./chunk-UPW4CQ72.js";import"./chunk-MMNUKDWS.js";import"./chunk-DNHLTHLR.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
@@ -1 +1 @@
1
- import{i as a,j as b}from"./chunk-W7Y2VKMS.js";import"./chunk-3T23UBO4.js";import"./chunk-BIVRH4JH.js";import"./chunk-DNHLTHLR.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createOptionsForm,b as default};
1
+ import{i as a,j as b}from"./chunk-XTSJURO6.js";import"./chunk-UPW4CQ72.js";import"./chunk-MMNUKDWS.js";import"./chunk-DNHLTHLR.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-BRWHKZV2.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createOptionsForm,b as default};
@@ -0,0 +1 @@
1
+ import{o as ye}from"./chunk-XTSJURO6.js";import{a as xt}from"./chunk-UPW4CQ72.js";import{a as bt}from"./chunk-MMNUKDWS.js";import"./chunk-DNHLTHLR.js";import{a as Ne}from"./chunk-ODIN2IGP.js";import{a as Fe}from"./chunk-G76GVTZW.js";import{a as ae}from"./chunk-KDCTRSPO.js";import{a as wt}from"./chunk-453FQ4EQ.js";import"./chunk-BRWHKZV2.js";import{a as Mt}from"./chunk-CKQFBLHP.js";import{a as $t}from"./chunk-DKICGIGJ.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import"./chunk-W3VTD2H4.js";import{a as ht,b as V,d as X,e as re,g as le,h as _e,i as Pt,k as It,m as pe,n as ce,p as me,q as de,r as ue,s as Se}from"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as A}from"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as ge,b as Rt,g as Te,k as yt,l as z,n as Ft,o as vt,p as At,q as Gt,r as fe,w as Ce,x as Ee}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as o,Bb as f,C as v,Cb as ee,Db as te,Eb as gt,Fb as O,Jc as D,Lb as w,Lc as L,Mb as $,Na as mt,Nb as _,Ob as W,Pa as r,Pb as K,Q as Y,Qb as ne,Rb as S,Sb as l,Vb as y,W as N,Wa as dt,Xb as M,Yb as Re,b as ct,ba as C,bc as Tt,ca as E,cb as G,cc as ft,dc as ie,ec as c,fc as oe,gc as h,hb as u,jc as x,k as q,kc as b,lc as k,nb as ut,ob as St,pc as Ct,qb as d,qc as Et,rc as Nt,sa as g,sb as P,sc as Ot,vb as T,wb as he,x as H,xb as Pe,xc as se,yb as Ie,zb as s}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var U=class i{#e=N(A);#i=Ne(this.#e.getApiV1Serversettings());#t=g(void 0);serverSettings=D(()=>this.#t()||this.#i());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:n=>{this.#t.set(n)}})}withRefresh(){return ct(v(()=>this.refreshServerSettings()))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac,providedIn:"root"})};var Xt=["formRef"],zt=()=>[import("./chunk-K3LOA2DX.js").then(i=>i.NgTemplateOutlet)],Ut=(i,n)=>({index:i,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),Bt=i=>({$implicit:i});function qt(i,n){if(i&1){let e=O();w(0,5,1),s(1,"button",16,2),S("click",function(){let a=C(e).$implicit,m=l();return E(m.addNewOption(a))}),o(),$()}if(i&2){let e=n.$implicit;r(),W(e.name),K(0)}}function Ht(i,n){i&1&&gt(0)}function Wt(i,n){if(i&1&&u(0,Ht,1,0,"ng-container",17),i&2){let e=n.$implicit,t=n.$index;l(2);let a=ie(15);d("ngTemplateOutlet",a)("ngTemplateOutletContext",Nt(5,Bt,Ot(2,Ut,t,e)))}}function Kt(i,n){if(i&1&&Pe(0,Wt,1,7,"ng-container",null,he),i&2){let e=l();Ie(e.selectedOptions())}}function jt(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function Qt(i,n){if(i&1&&(s(0,"app-file-tree",20)(1,"label",25),c(2),u(3,jt,3,1,"spk-tooltip",26),o(),f(4,"input",27),o()),i&2){let e,t=l().$implicit,a=l();d("startingPath",a.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),r(),M("for","destination-",t.formGroupName,"-",t.index,""),r(),h(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),M("id","destination-",t.formGroupName,"-",t.index,""),y("formControlName",t.formView.name)}}function Zt(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function Jt(i,n){if(i&1&&(s(0,"app-file-tree",21)(1,"label",25),c(2),u(3,Zt,3,1,"spk-tooltip",26),o(),f(4,"input",27),o()),i&2){let e,t=l().$implicit,a=l();d("startingPath",a.getFormFieldValue(0,t.formGroupName,t.formView.name)),r(),M("for","destination-",t.formGroupName,"-",t.index,""),r(),h(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),M("id","destination-",t.formGroupName,"-",t.index,""),y("formControlName",t.formView.name)}}function Yt(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function en(i,n){i&1&&(s(0,"spk-icon",28),c(1,"link"),o())}function tn(i,n){i&1&&(s(0,"spk-icon",28),c(1,"textbox"),o())}function nn(i,n){if(i&1&&(s(0,"spk-form-field")(1,"label",25),c(2),u(3,Yt,3,1,"spk-tooltip",26),o(),f(4,"input",27),u(5,en,2,0,"spk-icon",28)(6,tn,2,0,"spk-icon",28),o()),i&2){let e,t=l().$implicit;r(),M("for","destination-",t.formGroupName,"-",t.index,""),r(),h(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),M("id","destination-",t.formGroupName,"-",t.index,""),y("formControlName",t.formView.name),r(),T(t.formView.type==="Path"?5:6)}}function on(i,n){if(i&1){let e=O();s(0,"span",32),S("click",function(){C(e);let a=l(2).$implicit,m=l();return E(m.oauthStartTokenCreation(a.formViewType))}),c(1,"AuthID"),o()}}function sn(i,n){i&1&&(s(0,"spk-icon",28),c(1,"password"),o())}function an(i,n){if(i&1){let e=O();s(0,"spk-icon",33),S("click",function(){C(e);let a=l(2).$implicit;return E(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye "),o()}}function rn(i,n){if(i&1){let e=O();s(0,"spk-icon",33),S("click",function(){C(e);let a=l(2).$implicit;return E(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye-slash "),o()}}function ln(i,n){if(i&1&&(s(0,"spk-form-field")(1,"label",25),c(2),o(),f(3,"input",29),u(4,on,2,0,"span",30)(5,sn,2,0,"spk-icon",28)(6,an,2,0,"spk-icon",31)(7,rn,2,0,"spk-icon",31),o()),i&2){let e,t=l().$implicit;r(),M("for","destination-",t.formGroupName,"-",t.index,""),r(),h(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),M("id","destination-",t.formGroupName,"-",t.index,""),y("formControlName",t.formView.name),d("type",t.formView.showPassword?"text":"password"),r(),T(t.oauthField===t.formView.name?4:5),r(2),T(t.formView.showPassword?6:7)}}function _n(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function pn(i,n){if(i&1&&c(0),i&2){let e=n.$implicit;h(" ",e," ")}}function cn(i,n){if(i&1&&(s(0,"spk-select",34)(1,"label",25),c(2),u(3,_n,3,1,"spk-tooltip",26),o(),f(4,"input",27),o(),u(5,pn,1,1,"ng-template",null,3,se)),i&2){let e,t=ie(6),a=l().$implicit;d("options",a.formView.options)("isClearable",!1)("optionTemplate",t),r(),Re("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),r(),h(" ",(e=a.formView.shortDescription)!==null&&e!==void 0?e:a.formView.name," "),r(),T(a.formView.longDescription?3:-1),r(),Re("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),y("formControlName",a.formView.name)}}function mn(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function dn(i,n){if(i&1&&(s(0,"div",22)(1,"label",25),c(2),u(3,mn,3,1,"spk-tooltip",26),o(),s(4,"div",35)(5,"spk-form-field"),f(6,"input",36),s(7,"spk-icon",28),c(8,"resize"),o()(),s(9,"spk-select",37),f(10,"input",38),o()()()),i&2){let e,t=l().$implicit,a=l();d("formGroupName",t.formView.name),r(),M("for","destination-",t.formGroupName,"-",t.index,""),r(),h(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(3),M("id","destination-",t.formGroupName,"-",t.index,""),r(3),d("options",a.sizeOptions())("inlineSearch",!0)}}function un(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function Sn(i,n){if(i&1&&(s(0,"spk-form-field")(1,"label",25),c(2),u(3,un,3,1,"spk-tooltip",26),o(),f(4,"input",39),s(5,"spk-icon",28),c(6,"numpad"),o()()),i&2){let e,t=l().$implicit;r(),M("for","destination-",t.formGroupName,"-",t.index,""),r(),h(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),M("id","destination-",t.formGroupName,"-",t.index,""),y("formControlName",t.formView.name)}}function gn(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function Tn(i,n){if(i&1&&(s(0,"spk-toggle",23)(1,"label",25),c(2),u(3,gn,3,1,"spk-tooltip",26),o(),f(4,"input",40),o()),i&2){let e,t=l().$implicit;r(),M("for","destination-",t.formGroupName,"-",t.index,""),r(),h(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),M("id","destination-",t.formGroupName,"-",t.index,""),y("formControlName",t.formView.name)}}function fn(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function Cn(i,n){if(i&1&&c(0),i&2){let e=n.$implicit;h(" ",e," ")}}function En(i,n){if(i&1&&(s(0,"spk-select",41)(1,"label",25),c(2),u(3,fn,3,1,"spk-tooltip",26),o(),f(4,"input",42),o(),u(5,Cn,1,1,"ng-template",null,4,se)),i&2){let e,t=ie(6),a=l().$implicit;d("options",a.formView.options)("selectMultiple",!0)("optionTemplate",t),r(),M("for","destination-",a.formGroupName,"-",a.index,""),r(),h(" ",(e=a.formView.shortDescription)!==null&&e!==void 0?e:a.formView.name," "),r(),T(a.formView.longDescription?3:-1),r(),y("formControlName",a.formView.name)}}function Nn(i,n){if(i&1&&(s(0,"spk-tooltip",26)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;d("message",e.formView.longDescription)}}function On(i,n){if(i&1&&(s(0,"spk-form-field")(1,"label",25),c(2),u(3,Nn,3,1,"spk-tooltip",26),o(),f(4,"input",27),o()),i&2){let e,t=l().$implicit;r(),M("for","destination-",t.formGroupName,"-",t.index,""),r(),h(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),M("id","destination-",t.formGroupName,"-",t.index,""),y("formControlName",t.formView.name)}}function Mn(i,n){if(i&1){let e=O();s(0,"div",18),ee(1,19),u(2,Qt,5,14,"app-file-tree",20)(3,Jt,5,10,"app-file-tree",21)(4,nn,7,10,"spk-form-field")(5,ln,8,11,"spk-form-field")(6,cn,7,14)(7,dn,11,11,"div",22)(8,Sn,7,9,"spk-form-field")(9,Tn,5,9,"spk-toggle",23)(10,En,7,9)(11,On,5,9,"spk-form-field"),te(),s(12,"button",24),S("click",function(){let a=C(e).$implicit,m=l();return E(m.removeFormView(a.formView))}),s(13,"spk-icon"),c(14,"x-circle"),o()()()}if(i&2){let e=n.$implicit;r(),d("formGroupName",e.formGroupName),r(),T(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var pi=new de,hn=["Bytes","KB","MB","GB","TB","PB"],ci=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],mi=1024*1024*1024*2,di=1024*1024*5;var j=class i{#e=N(ye);#i=N(U);#t=N(A);formRef=dt.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=g(!1);isLoadingOptions=g(!0);sizeOptions=g(hn);serverSettingsEffect=L(()=>{let n=this.#i.serverSettings();if(n===void 0)return;this.isLoadingOptions.set(!0);let e=this.#e.nonSelectedOptions(),t=Object.entries(n);t.forEach(([a,m],F)=>{if(a.startsWith("--")){let I=a.replace("--",""),R=e.find(Z=>Z.name===I);R!==void 0?this.addNewOption(R,m):this.addFreeTextOption(I,m)}F===t.length-1&&this.isLoadingOptions.set(!1)})});oauthStartTokenCreation(n){}getFormFieldValue(n,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(n){let e="--"+n.name;this.#t.patchApiV1Serversettings({requestBody:{[e]:null}}).subscribe({next:t=>{window.location.reload()}})}addNewOption(n,e){this.#e.addOptionToFormGroup(n,e)}addFreeTextOption(n,e){this.#e.addFreeTextOption(n,e,{})}submit(){this.isSubmitting.set(!0);let n=this.optionsForm.value.advancedOptions;if(!n)return;let e=this.#n(n);this.#t.patchApiV1Serversettings({requestBody:e}).pipe(v(()=>this.isSubmitting.set(!1))).subscribe()}#n(n){let e={};for(let t in n)e[`--${t}`]=n[t];return e}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=G({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,t){e&1&&Tt(t.formRef,Xt,5),e&2&&ft()},features:[Ct([ye])],decls:20,vars:6,consts:()=>{let n;n=$localize` Advanced options ${"\uFFFD#5\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#6\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#8\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*10:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#6\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*10:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_MENU:`,n=ne(n);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let t;return t=$localize`Select an option...`,[["formRef",""],["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["optionTemplate",""],n,e,[3,"submit","formGroup"],[3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",t,3,"options","inlineSearch"],["type","text","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"]]},template:function(e,t){if(e&1){let a=O();s(0,"form",7,0),S("submit",function(){return C(a),E(t.submit())}),s(2,"app-toggle-card",8),ee(3,9),w(4,5),s(5,"spk-menu",10)(6,"button",11),f(7,"spk-icon"),o(),ee(8,12),Pe(9,qt,3,1,"button",13,he),te(),o(),$(),te(),u(11,Kt,2,0),ut(12,11,zt),o(),u(14,Mn,15,2,"ng-template",null,1,se),s(16,"div",14)(17,"button",15),w(18,6),f(19,"spk-icon"),$(),o()()()}e&2&&(d("formGroup",t.optionsForm),r(2),d("disallowToggle",!0),r(3),d("searchable",!0),r(4),Ie(t.nonSelectedOptions()),r(3),St(!t.isLoadingOptions()),r(5),P("loader",t.isSubmitting()))},dependencies:[Se,_e,V,Pt,ht,X,re,pe,me,ce,Ft,Te,ge,z,Ce,Ee,fe,xt,bt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.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 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var B=class i{#e=N(A);#i=N(ae);repeatRegisterTimer=null;state=g("unknown");claimUrl=g(null);registerUrl=g("");status=D(()=>{let n=this.state();return n==="enabled"?"Remote control is enabled but not connected":n==="connected"?"Remote control is connected":n==="registering"?"Registering machine...":n==="registeringfaulted"?"Registration failed":n==="registered"?"Registered, waiting for accept":n==="disabled"?"Remote control is configured but not enabled":n==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=L(()=>{let n=this.#i.systemInfo();n&&this.registerUrl.set(n.RemoteControlRegistrationUrl??"")});#t(n){n.RegistrationUrl&&this.claimUrl.set(n.RegistrationUrl),n.IsConnected?this.state.set("connected"):n.IsEnabled?this.state.set("enabled"):n.CanEnable?this.state.set("disabled"):n.IsRegisteringFaulted?this.state.set("registeringfaulted"):n.IsRegistering?n.RegistrationUrl!=null&&n.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let e=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),e==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})},5e3)),(e==="enabled"||e==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})},5e3)),n.IsRegistering&&n.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#n(n){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}deleteRemoteControl(){let n=this;confirm("Are you sure you want to delete the remote control registration?")&&n.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:e=>n.#t(e),error:e=>n.#n(e)})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Y({token:i,factory:i.\u0275fac,providedIn:"root"})};function Pn(i,n){if(i&1){let e=O();s(0,"spk-form-field",10)(1,"input",11),k("ngModelChange",function(a){C(e);let m=l(2);return b(m.registerUrl,a)||(m.registerUrl=a),E(a)}),o()(),s(2,"button",12),S("click",function(){C(e);let a=l(2);return E(a.register())}),_(3,0),o()}if(i&2){let e=l(2);r(),x("ngModel",e.registerUrl)}}function In(i,n){if(i&1&&(s(0,"div",8)(1,"label"),_(2,1),o(),s(3,"a",13),c(4),o()()),i&2){let e=l(2);r(3),y("href",e.claimUrl(),mt),r(),oe(e.claimUrl())}}function Rn(i,n){i&1&&(s(0,"div",8)(1,"label"),_(2,2),o()())}function yn(i,n){if(i&1){let e=O();s(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.cancel())}),_(1,3),o()}}function Fn(i,n){if(i&1){let e=O();s(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.disable())}),_(1,4),o()}}function vn(i,n){if(i&1){let e=O();s(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.enable())}),_(1,5),o(),s(2,"button",14),S("click",function(){C(e);let a=l(2);return E(a.delete())}),_(3,6),o()}}function An(i,n){if(i&1&&(s(0,"div",7),u(1,Pn,4,1)(2,In,5,2,"div",8)(3,Rn,3,0,"div",8)(4,yn,2,0,"button",9)(5,Fn,2,0,"button",9)(6,vn,4,0),o()),i&2){let e=l();r(),T(e.state()==="inactive"?1:-1),r(),T(e.state()==="registered"?2:-1),r(),T(e.state()==="registering"?3:-1),r(),T(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),r(),T(e.state()==="connected"||e.state()==="enabled"?5:-1),r(),T(e.state()==="disabled"?6:-1)}}var Me=class i{#e=N(B);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=G({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let n;n=$localize`Register for remote control`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let t;t=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let m;m=$localize`Disable remote control`;let F;F=$localize`Enable remote control`;let I;return I=$localize`Delete remote control setup`,[n,e,t,a,m,F,I,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(e,t){e&1&&u(0,An,7,6,"div",7),e&2&&T(t.state()!=="unknown"?0:-1)},dependencies:[ue,V,X,le,z],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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var Gn=()=>({standalone:!0});function wn(i,n){i&1&&(s(0,"spk-icon",73),c(1,"check"),o())}function $n(i,n){i&1&&(s(0,"spk-icon",74),c(1,"prohibit"),o())}function xn(i,n){if(i&1){let e=O();s(0,"button",78),S("click",function(){C(e);let a=l(2);return E(a.updatePassphrase())}),_(1,35),o()}if(i&2){let e=l(2);P("loader",e.isUpdating())}}function bn(i,n){if(i&1){let e=O();s(0,"spk-tooltip",77)(1,"button",79),S("click",function(){C(e);let a=l(2);return E(a.updatePassphrase())}),_(2,36),o()()}if(i&2){let e=l(2);r(),P("loader",e.isUpdating()),d("disabled",!0)}}function kn(i,n){if(i&1){let e=O();s(0,"spk-form-field")(1,"label",69),_(2,32),o(),s(3,"input",70),k("ngModelChange",function(a){C(e);let m=l();return b(m.passphrase,a)||(m.passphrase=a),E(a)}),o()(),s(4,"spk-form-field")(5,"label",71),_(6,33),o(),s(7,"input",72),k("ngModelChange",function(a){C(e);let m=l();return b(m.repeatPassphrase,a)||(m.repeatPassphrase=a),E(a)}),o(),u(8,wn,2,0,"spk-icon",73)(9,$n,2,0,"spk-icon",74),o(),s(10,"div",50)(11,"button",75),S("click",function(){C(e);let a=l();return E(a.cancelPasswordChange())}),_(12,34),o(),u(13,xn,2,2,"button",76)(14,bn,3,3,"spk-tooltip",77),o()}if(i&2){let e=l();r(3),x("ngModel",e.passphrase),r(4),d("disabled",e.passphrase().length===0),x("ngModel",e.repeatPassphrase),r(),T(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),r(3),P("loader",e.isUpdating()),r(2),T(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function Dn(i,n){i&1&&(s(0,"spk-icon",80),c(1,"check"),o())}function Ln(i,n){if(i&1){let e=O();s(0,"div",50)(1,"button",75),S("click",function(){C(e);let a=l();return E(a.openPassphraseForm())}),_(2,37),o(),u(3,Dn,2,0,"spk-icon",80),o()}if(i&2){let e=l();r(3),T(e.passwordUpdated()?3:-1)}}function Vn(i,n){if(i&1){let e=O();s(0,"spk-form-field")(1,"label",81),_(2,38),o(),s(3,"textarea",82),k("ngModelChange",function(a){C(e);let m=l();return b(m.allowedHostnames,a)||(m.allowedHostnames=a),E(a)}),o()(),s(4,"spk-alert",83),_(5,39),o(),s(6,"button",78),S("click",function(){C(e);let a=l();return E(a.updateAllowedHostnames())}),_(7,40),o()}if(i&2){let e=l();r(3),x("ngModel",e.allowedHostnames),r(3),P("loader",e.updatingAllowedHosts())}}function Xn(i,n){if(i&1&&c(0),i&2){let e,t=l();h(" ",(e=t.sysinfo())==null?null:e.ServerVersion," ")}}function zn(i,n){i&1&&f(0,"spk-progress-bar",55)}function Un(i,n){if(i&1&&c(0),i&2){let e=n.$implicit;h(" ",e.label," ")}}function Bn(i,n){if(i&1&&c(0),i&2){let e=n.$implicit;h(" ",e.label," ")}}var Q=new de,Lt=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Vt=[{value:"",label:$localize`System default (information)`},{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:"none",label:$localize`None / disabled`}],ve=class i{#e=N(wt);#i=N(ae);#t=N(A);#n=N(U);#a=N(B);#o=N(Mt);#s=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=g("list");previousLang=this.#s;langCtrl=g(this.#s);remoteControlStatus=this.#a.status;settingsForm=Q.group({pauseSettings:Q.group({time:Q.control(0),timeType:Q.control("s")}),usageStatistics:Q.control("")});updatingChannel=g(!1);updateChannel=g("");setNewChannel(n){let e=this.updateChannel();this.updateChannel.set(n),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":n}}).pipe(this.#n.withRefresh(),v(()=>this.updatingChannel.set(!1)),H(()=>(this.updateChannel.set(e),q(null)))).subscribe()}allowRemoteAccess=g(!1);allowedHostnames=g("");loadedAllowedHostnames=g("");updatingRemoteAccess=g(!1);updatingAllowedHosts=g(!1);updateRemoteAccess(){let n=this.allowRemoteAccess(),e=!n;this.allowRemoteAccess.set(e),e||this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(this.#n.withRefresh(),v(()=>this.updatingRemoteAccess.set(!1)),H(()=>(this.allowRemoteAccess.set(n),q(null)))).subscribe()}updateAllowedHostnames(){let n=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(this.#n.withRefresh(),v(()=>this.updatingAllowedHosts.set(!1)),H(()=>(this.allowedHostnames.set(n),q(null)))).subscribe()}updatingDisableTrayIconLogin=g(!1);disableTrayIconLogin=g(!1);saveDisableTrayIconLogin(){let n=this.disableTrayIconLogin(),e=!n;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(this.#n.withRefresh(),v(()=>this.updatingDisableTrayIconLogin.set(!1)),H(()=>(this.disableTrayIconLogin.set(n),q(null)))).subscribe()}showPassphraseForm=g(!1);isUpdating=g(!1);passphrase=g("");repeatPassphrase=g("");passwordUpdated=g(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(this.#n.withRefresh(),v(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=g(Fe);usageStatisticsOptions=g(Vt);timeTypeOptions=g(Lt);timeTypeSignal=Ne(this.pauseSettings.controls.timeType.valueChanges);timeRange=D(()=>this.timeTypeSignal()==="h"?[0,24]:[0,60]);#r(n){let e=n==="h"?25:61;return new Array(e).fill(0).map((t,a)=>a)}updateLocale(n){let t=n[0]?.value??"";!t||t===""||t===this.previousLang||(this.#o.setItem("locale",t),window.location.reload())}submit(){let n=this.pauseSettings.value,e=`${n.time}${n.timeType}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e}}).pipe(this.#n.withRefresh()).subscribe()}serverSettingsEffect=L(()=>{let n=this.#n.serverSettings();if(n===void 0)return;let e=n["startup-delay"],t=e.slice(-1),a=e.slice(0,-1),m=["s","m","h"];this.disableTrayIconLogin.set(n["disable-tray-icon-login"]!=="False"),this.updateChannel.set(n["update-channel"]),this.allowRemoteAccess.set(n["server-listen-interface"]==="any"),this.allowedHostnames.set(n["allowed-hostnames"]),this.loadedAllowedHostnames.set(n["allowed-hostnames"]),console.log(n["usage-reporter-level"]),queueMicrotask(()=>{this.settingsForm.patchValue({pauseSettings:{time:parseInt(a==""?"0":a),timeType:m.includes(t)?t:"s"},usageStatistics:n["usage-reporter-level"]??""})})});languageDisplay(){let n=this;return()=>{let e=n.langCtrl();return e?Fe.find(t=>t.value===e)?.label??null:null}}typeDisplay(){let n=this;return()=>{let e=n.settingsForm.value.pauseSettings?.timeType;return e==null?null:Lt.find(t=>t.value===e)?.label??null}}usageDisplay(){let n=this;return()=>{let e=n.settingsForm.value.usageStatistics;return e==null?null:Vt.find(t=>t.value===e)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=G({type:i,selectors:[["app-settings"]],decls:133,vars:39,consts:()=>{let n;n=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let t;t=$localize` Save changes `;let a;a=$localize`Remote access control`;let m;m=$localize`Color theme`;let F;F=$localize`Customize your application theme`;let I;I=$localize`Passwords`;let R;R=$localize`Change server passphrase`;let Z;Z=$localize`Language`;let Ae;Ae=$localize`Select a language for the platform`;let Ge;Ge=$localize`Allow remote access (requires restart)`;let we;we=$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 $e;$e=$localize`Allow remote access`;let xe;xe=$localize`Prevent tray icon automatic log-in`;let be;be=$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 ke;ke=$localize`Prevent tray icon automatic log-in`;let De;De=$localize`Update channel`;let Le;Le=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ve;Ve=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Xe;Xe=$localize`Stable`;let ze;ze=$localize`Official releases`;let Ue;Ue=$localize`Beta`;let Be;Be=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let qe;qe=$localize` Experimental `;let He;He=$localize`Specific builds for developers only. Not for use with important data.`;let We;We=$localize`Canary`;let Ke;Ke=$localize`Individual builds for developers only. Not for use with important data.`;let je;je=$localize`Pause after startup or hibernation`;let Qe;Qe=$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 Ze;Ze=$localize`Usage statistics`;let J;J=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#121\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#121\uFFFD"}:CLOSE_LINK:${"[\uFFFD#122\uFFFD\uFFFD/#122\uFFFD|\uFFFD#123\uFFFD\uFFFD/#123\uFFFD]"}:LINE_BREAK:${"[\uFFFD#122\uFFFD\uFFFD/#122\uFFFD|\uFFFD#123\uFFFD\uFFFD/#123\uFFFD]"}:LINE_BREAK: 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. `,J=ne(J);let Je;Je=$localize`Advanced options`;let Ye;Ye=$localize`Enter new password`;let et;et=$localize`Repeat password`;let tt;tt=$localize`Password have to be filled and have to match`;let nt;nt=$localize`Passphrase`;let it;it=$localize`Repeat passphrase`;let ot;ot=$localize`Cancel`;let st;st=$localize` Update passphrase `;let at;at=$localize` Update passphrase `;let rt;rt=$localize`Change password`;let lt;lt=$localize`Allowed hostnames`;let _t;_t=$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 pt;return pt=$localize` Update allowed hostnames `,[n,e,t,a,m,F,I,R,Z,Ae,Ge,we,$e,xe,be,ke,De,Le,Ve,Xe,ze,Ue,Be,qe,He,We,Ke,je,Qe,Ze,J,Je,nt,it,ot,st,at,rt,lt,_t,pt,[1,"content"],[1,"title"],["type","submit","spk-button","",1,"raised","primary",3,"click","disabled"],[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,"selectedOptionsChange","options","isClearable","inlineSearch"],["type","text",3,"ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"content",3,"submit","formGroup"],["formGroupName","pauseSettings",1,"field-row"],[1,"raised","primary",3,"unit"],["type","range","formControlName","time",3,"min","max"],["label","label","value","value",3,"options","isClearable"],["type","text","formControlName","timeType"],["href","#"],["label","label","value","value",3,"options"],["type","text","formControlName","usageStatistics"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Ye,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",et,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["message",tt,1,"primary"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(e,t){if(e&1&&(f(0,"app-status-bar"),s(1,"div",41)(2,"header")(3,"div",42)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()(),s(8,"button",43),S("click",function(){return t.submit()}),_(9,2),o()(),s(10,"section")(11,"div",44)(12,"h3"),_(13,3),o(),s(14,"p"),c(15),o()(),s(16,"div",45),f(17,"app-remote-control"),o()(),s(18,"section")(19,"div",44)(20,"h3"),_(21,4),o(),s(22,"p"),_(23,5),o()(),s(24,"div",45)(25,"div",46)(26,"img",47),S("click",function(){return t.setLightMode()}),o(),s(27,"img",48),S("click",function(){return t.setDarkMode()}),o()()()(),s(28,"section")(29,"div",44)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",49),u(35,kn,15,7)(36,Ln,4,1,"div",50),o()(),s(37,"section")(38,"div",44)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",45)(44,"spk-select",51),S("selectedOptionsChange",function(m){return t.updateLocale(m)}),f(45,"input",52),o()()(),s(46,"section")(47,"div",44)(48,"h3"),_(49,10),o(),s(50,"p"),_(51,11),o()(),s(52,"div",53)(53,"spk-toggle",54),S("click",function(){return t.updateRemoteAccess()}),s(54,"label"),_(55,12),o()(),u(56,Vn,8,3),o()(),s(57,"section")(58,"div",44)(59,"h3"),_(60,13),o(),s(61,"p"),_(62,14),o()(),s(63,"div",45)(64,"spk-toggle",54),S("click",function(){return t.saveDisableTrayIconLogin()}),s(65,"label"),_(66,15),o()()()(),s(67,"section")(68,"div",44)(69,"h3"),_(70,16),o(),s(71,"p"),u(72,Xn,1,1),o(),u(73,zn,1,0,"spk-progress-bar",55),o(),s(74,"div",56)(75,"div",57),S("click",function(){return t.setNewChannel("")}),s(76,"spk-radio",58),_(77,17),o(),s(78,"p"),_(79,18),o()(),s(80,"div",57),S("click",function(){return t.setNewChannel("stable")}),s(81,"spk-radio",58),_(82,19),o(),s(83,"p"),_(84,20),o()(),s(85,"div",57),S("click",function(){return t.setNewChannel("beta")}),s(86,"spk-radio",58),_(87,21),o(),s(88,"p"),_(89,22),o()(),s(90,"div",57),S("click",function(){return t.setNewChannel("experimental")}),s(91,"spk-radio",58),_(92,23),o(),s(93,"p"),_(94,24),o()(),s(95,"div",57),S("click",function(){return t.setNewChannel("canary")}),s(96,"spk-radio",58),_(97,25),o(),s(98,"p"),_(99,26),o()()()()(),f(100,"spk-divider"),s(101,"form",59),S("submit",function(){return t.submit()}),s(102,"section")(103,"div",44)(104,"h3"),_(105,27),o(),s(106,"p"),_(107,28),o()(),s(108,"div",45)(109,"div",60)(110,"spk-range-slider",61),f(111,"input",62),o(),s(112,"spk-select",63),f(113,"input",64),u(114,Un,1,1,"ng-template"),o()()()(),s(115,"section")(116,"div",44)(117,"h3"),_(118,29),o(),s(119,"p"),w(120,30),f(121,"a",65)(122,"br")(123,"br"),$(),o()(),s(124,"div",45)(125,"spk-select",66),f(126,"input",67),u(127,Bn,1,1,"ng-template"),o()()(),s(128,"section")(129,"div",68)(130,"h3"),_(131,31),o(),f(132,"app-advanced-options-settings"),o()()()),e&2){let a,m,F,I;r(8),d("disabled",t.settingsForm.untouched),r(7),oe(t.remoteControlStatus()),r(11),P("active",!t.isDarkMode()),r(),P("active",t.isDarkMode()),r(8),T(t.showPassphraseForm()?35:36),r(9),d("options",t.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),d("ngModel",t.langCtrl())("ngModelOptions",Et(38,Gn)),r(8),P("active",t.allowRemoteAccess()),r(3),T(t.allowRemoteAccess()?56:-1),r(8),P("active",t.disableTrayIconLogin()),r(8),T(t.updateChannel()!==""&&((a=t.sysinfo())!=null&&a.ServerVersion)?72:-1),r(),T(t.updatingChannel()?73:-1),r(3),P("active",t.updateChannel()===""),r(),W((m=t.sysinfo())==null?null:m.DefaultUpdateChannel),K(77),r(2),W((F=t.sysinfo())==null?null:F.ServerVersionType),K(79),r(2),P("active",t.updateChannel()==="stable"),r(5),P("active",t.updateChannel()==="beta"),r(5),P("active",t.updateChannel()==="experimental"),r(5),P("active",t.updateChannel()==="canary"),r(5),d("formGroup",t.settingsForm),r(9),d("unit",(I=t.timeTypeSignal())!==null&&I!==void 0?I:""),r(),d("min",t.timeRange()[0])("max",t.timeRange()[1]),r(),d("options",t.timeTypeOptions())("isClearable",!1),r(13),d("options",t.usageStatisticsOptions())}},dependencies:[ue,_e,V,It,X,re,le,Se,pe,me,ce,$t,Me,j,Te,At,Gt,vt,Ce,Ee,z,ge,yt,Rt,fe],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;position:sticky;top:0;background:var(--base-level-10);z-index:1000;border-bottom:1px solid var(--base-level-40)}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-level-40)}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%] spk-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:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{ve as default};
@@ -1 +1 @@
1
- import{a as ne}from"./chunk-WJQN3BOF.js";import{b as ie,d as oe,g as ae,i as se,r as h}from"./chunk-5OX72VKG.js";import{a as te}from"./chunk-ZZPLRWQP.js";import{b as A}from"./chunk-UIOTKB6J.js";import{a as le,b as _e,e as re,g as pe,i as F,l as ue,o as ce,p as Se,r as de}from"./chunk-CDH4KG7H.js";import{pa as ee}from"./chunk-WYTHNCNI.js";import{a as Te}from"./chunk-2D7EACVA.js";import{Ab as l,Bb as R,C as g,Fb as V,Jc as G,Lb as I,Mb as k,Nb as p,Pa as _,Qb as j,Rb as u,Sb as C,W as c,ba as x,ca as z,cb as E,ec as O,fb as X,gc as q,hb as L,hc as Z,ic as J,jc as f,kc as P,lc as N,na as D,qb as m,sa as r,sb as S,uc as B,vb as v,vc as Y,wb as H,wc as Q,xb as K,yb as W,zb as s}from"./chunk-ZSSQBIRK.js";var y=class a{#e=c(Te);transform(n,...t){return this.#e.locale(),this.#e(n).fromNow()}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=X({name:"appRelativeTime",type:a,pure:!0})};function Ae(a,n){if(a&1){let t=V();s(0,"spk-radio",10),u("click",function(){let i=x(t).$implicit,o=C();return z(o.pauseOption.set(i.value))}),O(1),l()}if(a&2){let t=n.$implicit,e=C();S("active",e.pauseOption()===t.value),_(),q(" ",t.label," ")}}var fe=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],b=class a{#e=c(A);pauseOptions=r(fe);closed=D();isSubmitting=r(!1);pauseTransfers=r(!1);pauseOption=r(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(g(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=E({type:a,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,t,e,i,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(s(0,"header",5)(1,"h3"),p(2,0),l()(),s(3,"div",6)(4,"div",7),K(5,Ae,2,3,"spk-radio",8,H),l(),s(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),p(9,1),l(),s(10,"spk-alert",11),p(11,2),l()()(),s(12,"footer",12)(13,"button",13),u("click",function(){return e.closed.emit()}),p(14,3),l(),s(15,"button",14),u("click",function(){return e.submit()}),p(16,4),l()()),t&2&&(_(5),W(e.pauseOptions()),_(3),S("active",e.pauseTransfers()),_(7),S("loader",e.isSubmitting()))},dependencies:[h,Se,F,_e],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Pe=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],$={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},ge=Object.entries($).reduce((a,[n,t])=>(a[t]=n,a),{}),M=class a{#e=c(A);closed=D();isSubmitting=r(!1);sizeOptions=r(Pe);maxUploadActive=r(!1);maxDownloadActive=r(!1);maxUpload=r(0);maxDownload=r(0);maxUploadUnit=r("MByte/s");maxDownloadUnit=r("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",o=e[1]??"",d=t[2]??"MB",T=e[2]??"MB",Ce=i===""?10:parseInt(i),Oe=o===""?10:parseInt(o);this.maxUploadUnit.set(ge[d]+"/s"),this.maxDownloadUnit.set(ge[T]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(o!==""),this.maxUpload.set(Ce),this.maxDownload.set(Oe)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${$[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${$[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(g(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=E({type:a,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:16,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let e;e=$localize` Max download speed `;let i;i=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let o;o=$localize`Cancel`;let d;return d=$localize` Update settings `,[n,t,e,i,o,d,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(s(0,"header",6)(1,"h3"),p(2,0),l()(),s(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),p(7,1),l(),s(8,"spk-form-field")(9,"input",11),u("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),N("ngModelChange",function(o){return P(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),s(10,"spk-select-new",12)(11,"input",13),N("ngModelChange",function(o){return P(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),s(12,"div",9)(13,"spk-checkbox",10),u("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),p(14,2),l(),s(15,"spk-form-field")(16,"input",11),u("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),N("ngModelChange",function(o){return P(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),s(17,"spk-select-new",12)(18,"input",13),N("ngModelChange",function(o){return P(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()(),s(19,"p"),p(20,3),l()()(),s(21,"footer",14)(22,"button",15),u("click",function(){return e.closed.emit(!1)}),p(23,4),l(),s(24,"button",16),u("click",function(){return e.submit()}),p(25,5),l()()),t&2&&(_(6),S("active",e.maxUploadActive()),_(3),f("ngModel",e.maxUpload),m("disabled",!e.maxUploadActive()),_(),m("isClearable",!1)("options",e.sizeOptions()),_(),f("ngModel",e.maxUploadUnit),_(2),S("active",e.maxDownloadActive()),_(3),f("ngModel",e.maxDownload),m("disabled",!e.maxDownloadActive()),_(),m("isClearable",!1)("options",e.sizeOptions()),_(),f("ngModel",e.maxDownloadUnit),_(6),S("loader",e.isSubmitting()))},dependencies:[h,ie,se,oe,ae,ue,F,de],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Ne(a,n){if(a&1&&(s(0,"div"),O(1),l(),R(2,"spk-progress-bar",8)),a&2){let t=C();_(),Z("",t.statusData().actionText," - ",t.statusData().statusText,""),_(),m("value",t.statusData().progress*100)}}function Me(a,n){if(a&1&&(s(0,"div",5),O(1),B(2,"appRelativeTime"),B(3,"date"),l()),a&2){let t,e=C();_(),J(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",Y(2,3,e.nextBackup().time)," at ",Q(3,5,e.nextBackup().time,"shortTime")," ")}}function De(a,n){a&1&&(s(0,"div",5),p(1,1),l())}function Re(a,n){a&1&&(s(0,"div",5),p(1,2),l())}function Ie(a,n){a&1&&(I(0,0,1),R(1,"spk-icon"),k())}function ke(a,n){a&1&&(I(0,0,2),R(1,"spk-icon"),k())}var Ee=new Date,w=class a{#e=c(A);#t=c(ne);#n=c(re);#i=c(te);minsAgo=Ee.setMinutes(Ee.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=G(()=>this.serverState()?.ProgramState==="Running");isResuming=r(!1);nextBackup=G(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(M,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(b,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(g(()=>this.isResuming.set(!1))).subscribe()}ngAfterViewInit(){let n=this.#i.relayIsEnabled()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=E({type:a,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=j(n);let t;t=$localize`No scheduled tasks`;let e;return e=$localize`Loading...`,[n,t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(s(0,"div",3)(1,"div",4),L(2,Ne,3,3)(3,Me,4,8,"div",5)(4,De,2,0,"div",5)(5,Re,2,0,"div",5),l(),s(6,"div",6)(7,"button",7),u("click",function(){return e.pauseResume()}),I(8,0),L(9,Ie,2,0)(10,ke,2,0),k(),l(),s(11,"button",7),u("click",function(){return e.openThrottleSettingsDialog()}),s(12,"spk-icon"),O(13,"speedometer"),l()()()()),t&2){let i;_(2),v((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),_(5),S("loader",e.isResuming()),_(2),v(e.isRunning()?9:10)}},dependencies:[ce,y,ee,le,pe],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{w as a};
1
+ import{a as ne}from"./chunk-WJQN3BOF.js";import{b as ie,d as oe,g as ae,i as se,r as h}from"./chunk-5OX72VKG.js";import{a as te}from"./chunk-ZZPLRWQP.js";import{b as A}from"./chunk-UIOTKB6J.js";import{a as le,b as _e,e as re,g as pe,i as F,l as ue,o as ce,p as Se,r as de}from"./chunk-ZI4ZJIB3.js";import{pa as ee}from"./chunk-WYTHNCNI.js";import{a as Te}from"./chunk-2D7EACVA.js";import{Ab as l,Bb as R,C as g,Fb as V,Jc as G,Lb as I,Mb as k,Nb as p,Pa as _,Qb as j,Rb as u,Sb as C,W as c,ba as x,ca as z,cb as E,ec as O,fb as X,gc as q,hb as L,hc as Z,ic as J,jc as f,kc as P,lc as N,na as D,qb as m,sa as r,sb as S,uc as B,vb as v,vc as Y,wb as H,wc as Q,xb as K,yb as W,zb as s}from"./chunk-ZSSQBIRK.js";var y=class a{#e=c(Te);transform(n,...t){return this.#e.locale(),this.#e(n).fromNow()}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=X({name:"appRelativeTime",type:a,pure:!0})};function Ae(a,n){if(a&1){let t=V();s(0,"spk-radio",10),u("click",function(){let i=x(t).$implicit,o=C();return z(o.pauseOption.set(i.value))}),O(1),l()}if(a&2){let t=n.$implicit,e=C();S("active",e.pauseOption()===t.value),_(),q(" ",t.label," ")}}var fe=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],b=class a{#e=c(A);pauseOptions=r(fe);closed=D();isSubmitting=r(!1);pauseTransfers=r(!1);pauseOption=r(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(g(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=E({type:a,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,t,e,i,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(s(0,"header",5)(1,"h3"),p(2,0),l()(),s(3,"div",6)(4,"div",7),K(5,Ae,2,3,"spk-radio",8,H),l(),s(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),p(9,1),l(),s(10,"spk-alert",11),p(11,2),l()()(),s(12,"footer",12)(13,"button",13),u("click",function(){return e.closed.emit()}),p(14,3),l(),s(15,"button",14),u("click",function(){return e.submit()}),p(16,4),l()()),t&2&&(_(5),W(e.pauseOptions()),_(3),S("active",e.pauseTransfers()),_(7),S("loader",e.isSubmitting()))},dependencies:[h,Se,F,_e],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Pe=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],$={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},ge=Object.entries($).reduce((a,[n,t])=>(a[t]=n,a),{}),M=class a{#e=c(A);closed=D();isSubmitting=r(!1);sizeOptions=r(Pe);maxUploadActive=r(!1);maxDownloadActive=r(!1);maxUpload=r(0);maxDownload=r(0);maxUploadUnit=r("MByte/s");maxDownloadUnit=r("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",o=e[1]??"",d=t[2]??"MB",T=e[2]??"MB",Ce=i===""?10:parseInt(i),Oe=o===""?10:parseInt(o);this.maxUploadUnit.set(ge[d]+"/s"),this.maxDownloadUnit.set(ge[T]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(o!==""),this.maxUpload.set(Ce),this.maxDownload.set(Oe)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${$[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${$[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(g(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=E({type:a,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:16,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let e;e=$localize` Max download speed `;let i;i=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let o;o=$localize`Cancel`;let d;return d=$localize` Update settings `,[n,t,e,i,o,d,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(s(0,"header",6)(1,"h3"),p(2,0),l()(),s(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),p(7,1),l(),s(8,"spk-form-field")(9,"input",11),u("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),N("ngModelChange",function(o){return P(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),s(10,"spk-select",12)(11,"input",13),N("ngModelChange",function(o){return P(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),s(12,"div",9)(13,"spk-checkbox",10),u("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),p(14,2),l(),s(15,"spk-form-field")(16,"input",11),u("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),N("ngModelChange",function(o){return P(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),s(17,"spk-select",12)(18,"input",13),N("ngModelChange",function(o){return P(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()(),s(19,"p"),p(20,3),l()()(),s(21,"footer",14)(22,"button",15),u("click",function(){return e.closed.emit(!1)}),p(23,4),l(),s(24,"button",16),u("click",function(){return e.submit()}),p(25,5),l()()),t&2&&(_(6),S("active",e.maxUploadActive()),_(3),f("ngModel",e.maxUpload),m("disabled",!e.maxUploadActive()),_(),m("isClearable",!1)("options",e.sizeOptions()),_(),f("ngModel",e.maxUploadUnit),_(2),S("active",e.maxDownloadActive()),_(3),f("ngModel",e.maxDownload),m("disabled",!e.maxDownloadActive()),_(),m("isClearable",!1)("options",e.sizeOptions()),_(),f("ngModel",e.maxDownloadUnit),_(6),S("loader",e.isSubmitting()))},dependencies:[h,ie,se,oe,ae,ue,F,de],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Ne(a,n){if(a&1&&(s(0,"div"),O(1),l(),R(2,"spk-progress-bar",8)),a&2){let t=C();_(),Z("",t.statusData().actionText," - ",t.statusData().statusText,""),_(),m("value",t.statusData().progress*100)}}function Me(a,n){if(a&1&&(s(0,"div",5),O(1),B(2,"appRelativeTime"),B(3,"date"),l()),a&2){let t,e=C();_(),J(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",Y(2,3,e.nextBackup().time)," at ",Q(3,5,e.nextBackup().time,"shortTime")," ")}}function De(a,n){a&1&&(s(0,"div",5),p(1,1),l())}function Re(a,n){a&1&&(s(0,"div",5),p(1,2),l())}function Ie(a,n){a&1&&(I(0,0,1),R(1,"spk-icon"),k())}function ke(a,n){a&1&&(I(0,0,2),R(1,"spk-icon"),k())}var Ee=new Date,w=class a{#e=c(A);#t=c(ne);#n=c(re);#i=c(te);minsAgo=Ee.setMinutes(Ee.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=G(()=>this.serverState()?.ProgramState==="Running");isResuming=r(!1);nextBackup=G(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(M,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(b,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(g(()=>this.isResuming.set(!1))).subscribe()}ngAfterViewInit(){let n=this.#i.relayIsEnabled()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=E({type:a,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=j(n);let t;t=$localize`No scheduled tasks`;let e;return e=$localize`Loading...`,[n,t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(s(0,"div",3)(1,"div",4),L(2,Ne,3,3)(3,Me,4,8,"div",5)(4,De,2,0,"div",5)(5,Re,2,0,"div",5),l(),s(6,"div",6)(7,"button",7),u("click",function(){return e.pauseResume()}),I(8,0),L(9,Ie,2,0)(10,ke,2,0),k(),l(),s(11,"button",7),u("click",function(){return e.openThrottleSettingsDialog()}),s(12,"spk-icon"),O(13,"speedometer"),l()()()()),t&2){let i;_(2),v((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),_(5),S("loader",e.isResuming()),_(2),v(e.isRunning()?9:10)}},dependencies:[ce,y,ee,le,pe],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{w as a};
@@ -1 +1 @@
1
- import{g as W}from"./chunk-GMW5Y454.js";import"./chunk-3T23UBO4.js";import"./chunk-BIVRH4JH.js";import{a as E}from"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import{a as G}from"./chunk-25GEPULG.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import"./chunk-W3VTD2H4.js";import"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import"./chunk-UIOTKB6J.js";import{a as $,b as P,d as L,e as M}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{p as N,t as I}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as i,Bb as n,Lb as F,Lc as A,Mb as r,Pa as R,Sb as u,W as T,cb as m,hb as f,qb as _,qc as p,rc as l,vb as C,zb as o}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var y=()=>["/restore-from-files/destination"],v=()=>["/restore-from-files/encryption"],h=()=>["/restore-from-files/select-files"],K=()=>["/restore-from-files/options"],X=e=>["/restore-draft",e],w=e=>["/restore-draft",e,"options"],b=e=>["/restore",e],x=e=>["/restore",e,"options"];function z(e,a){e&1&&(o(0,"div",8),F(1,0),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,1),n(5,"spk-radio"),r(),i(),o(6,"div",8),F(7,2),n(8,"spk-radio"),r(),i(),o(9,"div",8),F(10,3),n(11,"spk-radio"),r(),i()),e&2&&(_("routerLink",p(4,y)),R(3),_("routerLink",p(5,v)),R(3),_("routerLink",p(6,h)),R(3),_("routerLink",p(7,K)))}function j(e,a){if(e&1&&(o(0,"div",8),F(1,4),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,5),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,X,t.backupId())),R(3),_("routerLink",l(4,w,t.backupId()))}}function B(e,a){if(e&1&&(o(0,"div",8),F(1,6),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,7),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,b,t.backupId())),R(3),_("routerLink",l(4,x,t.backupId()))}}var c=class e{#t=T($);#e=T(W);#i=E(this.#t.params);#o=E(this.#t.url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;paramsChanged=A(()=>{let a=this.#i()?.id,t=!!this.#o()?.find(d=>d.path==="restore-draft"),s=!!this.#o()?.find(d=>d.path==="restore-from-files");this.#e.init(a,s,s||t)});static \u0275fac=function(t){return new(t||e)};static \u0275cmp=m({type:e,selectors:[["app-restore-flow"]],decls:7,vars:1,consts:()=>{let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let d;d=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let O;O=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let g;g=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let D;return D=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[a,t,s,d,O,g,k,D,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(n(0,"app-status-bar"),o(1,"spk-stepper"),f(2,z,12,8)(3,j,6,6)(4,B,6,6),i(),o(5,"section"),n(6,"router-outlet"),i()),t&2&&(R(2),C(s.isFileRestore()?2:s.isDraft()?3:4))},dependencies:[I,N,G,P,L,M],styles:["[_nghost-%COMP%]{display:block}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{c as default};
1
+ import{g as W}from"./chunk-DPPV7DVK.js";import"./chunk-UPW4CQ72.js";import"./chunk-MMNUKDWS.js";import{a as E}from"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import{a as G}from"./chunk-DKICGIGJ.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import"./chunk-W3VTD2H4.js";import"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import"./chunk-UIOTKB6J.js";import{a as $,b as P,d as L,e as M}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{p as N,t as I}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as i,Bb as n,Lb as F,Lc as A,Mb as r,Pa as R,Sb as u,W as T,cb as m,hb as f,qb as _,qc as p,rc as l,vb as C,zb as o}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var y=()=>["/restore-from-files/destination"],v=()=>["/restore-from-files/encryption"],h=()=>["/restore-from-files/select-files"],K=()=>["/restore-from-files/options"],X=e=>["/restore-draft",e],w=e=>["/restore-draft",e,"options"],b=e=>["/restore",e],x=e=>["/restore",e,"options"];function z(e,a){e&1&&(o(0,"div",8),F(1,0),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,1),n(5,"spk-radio"),r(),i(),o(6,"div",8),F(7,2),n(8,"spk-radio"),r(),i(),o(9,"div",8),F(10,3),n(11,"spk-radio"),r(),i()),e&2&&(_("routerLink",p(4,y)),R(3),_("routerLink",p(5,v)),R(3),_("routerLink",p(6,h)),R(3),_("routerLink",p(7,K)))}function j(e,a){if(e&1&&(o(0,"div",8),F(1,4),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,5),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,X,t.backupId())),R(3),_("routerLink",l(4,w,t.backupId()))}}function B(e,a){if(e&1&&(o(0,"div",8),F(1,6),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,7),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,b,t.backupId())),R(3),_("routerLink",l(4,x,t.backupId()))}}var c=class e{#t=T($);#e=T(W);#i=E(this.#t.params);#o=E(this.#t.url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;paramsChanged=A(()=>{let a=this.#i()?.id,t=!!this.#o()?.find(d=>d.path==="restore-draft"),s=!!this.#o()?.find(d=>d.path==="restore-from-files");this.#e.init(a,s,s||t)});static \u0275fac=function(t){return new(t||e)};static \u0275cmp=m({type:e,selectors:[["app-restore-flow"]],decls:7,vars:1,consts:()=>{let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let d;d=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let O;O=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let g;g=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let D;return D=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[a,t,s,d,O,g,k,D,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(n(0,"app-status-bar"),o(1,"spk-stepper"),f(2,z,12,8)(3,j,6,6)(4,B,6,6),i(),o(5,"section"),n(6,"router-outlet"),i()),t&2&&(R(2),C(s.isFileRestore()?2:s.isDraft()?3:4))},dependencies:[I,N,G,P,L,M],styles:["[_nghost-%COMP%]{display:block}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{c as default};
@@ -0,0 +1 @@
1
+ import{a as K}from"./chunk-UPW4CQ72.js";import{a as Ie}from"./chunk-MMNUKDWS.js";import{a as U}from"./chunk-ODIN2IGP.js";import{a as Ee,b as h,d as k,e as M,h as L,j as de,m as $,p as D,q as y,r as Oe,s as A}from"./chunk-5OX72VKG.js";import{b as I}from"./chunk-UIOTKB6J.js";import{a as P,c as d}from"./chunk-N7DO2BHU.js";import{a as b,g as v,l as fe,o as Ce,p as Re,r as Ne,w as Pe}from"./chunk-ZI4ZJIB3.js";import{pa as Y}from"./chunk-WYTHNCNI.js";import{Ab as a,B as ae,Bb as l,C as E,Cb as V,Db as X,Fb as x,G as le,L as _e,Lb as c,Lc as q,Mb as u,Nb as g,Ob as ue,Pa as F,Pb as Fe,Q as pe,Rb as T,Sb as B,W as _,ba as C,ca as R,cb as N,ec as z,f as re,hb as w,hc as Se,pc as me,qb as S,sa as p,sb as ce,u as se,uc as ge,vb as G,wc as Te,zb as s}from"./chunk-ZSSQBIRK.js";var he=new y,Le=()=>he.group({passphrase:he.control("")}),H=class n{#t=_(I);#e=_(O);#o=_(d);#i=_(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);next(){let t=this.#e.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[{Name:"--no-encryption",Value:"true"}];e&&(o=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(E(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let r=i.ID;this.#e.getBackup(r),this.#o.navigate([`/restore-draft/${r}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let t;t=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let o;o=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,o,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",t,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){e&1&&(s(0,"form",3),T("submit",function(){return o.next()}),s(1,"spk-form-field")(2,"label",4),g(3,0),a(),l(4,"input",5),a(),s(5,"div",6)(6,"button",7),T("click",function(){return o.back()}),c(7,1),l(8,"spk-icon"),u(),a(),s(9,"button",8),c(10,2),l(11,"spk-icon"),u(),a()()()),e&2&&S("formGroup",o.encryptionForm)},dependencies:[A,L,h,k,M,$,D,fe,b,v],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}"],changeDetection:0})};function ye(n,t){n&1&&l(0,"spk-progress-bar",7)}function Ae(n,t){if(n&1&&(s(0,"div",13),z(1),ge(2,"date"),a()),n&2){let e=t.$implicit;F(),Se("",e.Version,": ",Te(2,2,e.Time,"medium"),"")}}function be(n,t){n&1&&l(0,"spk-progress-bar",7)}function ve(n,t){if(n&1&&(s(0,"app-file-tree",14)(1,"label",15),g(2,4),a(),l(3,"input",16),a()),n&2){let e=B(3);S("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function we(n,t){if(n&1&&w(0,ve,4,4,"app-file-tree",14),n&2){let e=B(2);G((e.isDraft()&&!e.isRepairing()||!e.isDraft())&&e.backupSettings()?0:-1)}}function Ge(n,t){if(n&1){let e=x();s(0,"spk-select",11),T("cleared",function(){C(e);let i=B();return R(i.abortLoading())}),l(1,"input",12),w(2,Ae,3,5,"ng-template"),a(),w(3,be,1,0,"spk-progress-bar",7)(4,we,1,1)}if(n&2){let e=B();S("options",e.versionOptions())("isClearable",!0),F(3),G(e.isDraft()&&e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),F(),G(e.showFileTree()?4:-1)}}var j=new y,$e=()=>j.group({filesToRestore:j.control(""),selectedOption:j.control(null),passphrase:j.control(null)}),Q=class n{#t=_(I);#e=_(O);#o=_(d);#i=_(P);#n=_(Y);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOptionSignal=this.#e.selectOptionSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=p(!1);backupSettings=p(null);rootPath=p(void 0);loadingRootPath=p(!1);isRepairing=p(!1);backupSettingsEffect=q(()=>{let t=this.backupId(),e=typeof this.selectOptionSignal()=="string"?parseInt(this.selectOptionSignal()):this.selectOptionSignal();if(typeof e!="number"||!t)return;let i=this.versionOptions()?.find(r=>r.Version===e)?.Time??null;i&&(this.showFileTree.set(!1),setTimeout(()=>{let r={id:t+"",time:i};this.backupSettings.set(r),this.getRootPath(r)}))});repairEffect=q(()=>{let t=this.#e.isDraft(),e=this.selectOptionSignal();if(t&&e){let o=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:new Date().toISOString()}}).pipe(E(()=>this.isRepairing.set(!1))).subscribe()}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1};this.loadingRootPath.set(!0),this.#t.getApiV1BackupByIdFiles(e).pipe(_e(this.abortLoading$),E(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let i=o.Files[0].Path;this.rootPath.set(i)}})}abortLoading$=new re;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return o?`${o.Version}: ${this.#n.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-select-files"]],features:[me([Y])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let r;return r=$localize`Path`,[["formRef",""],t,e,o,r,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",i,"formControlName","selectedOption"],[1,"custom-option"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,o){if(e&1){let i=x();s(0,"form",5,0),T("submit",function(){return C(i),R(o.next())}),s(2,"h3",6),g(3,1),a(),w(4,ye,1,0,"spk-progress-bar",7)(5,Ge,5,4),s(6,"div",8)(7,"button",9),T("click",function(){return C(i),R(o.back())}),c(8,2),l(9,"spk-icon"),u(),a(),s(10,"button",10),c(11,3),l(12,"spk-icon"),u(),a()()()}e&2&&(S("formGroup",o.selectFilesForm),F(4),G(o.versionOptionsLoading()?4:5),F(5),ue(o.isFileRestore()?"Back":"Exit"),Fe(8))},dependencies:[Oe,L,h,k,M,A,$,D,Y,K,v,b,Ne,Ce],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}"],changeDetection:0})};var O=class n{#t=_(d);#e=_(I);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=$e();optionsForm=De();encryptionForm=Le();optionsFormSignal=U(this.optionsForm.valueChanges);selectFilesFormSignal=U(this.selectFilesForm.valueChanges);selectOptionSignal=U(this.selectFilesForm.controls.selectedOption.valueChanges);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isDraft=p(!1);isFileRestore=p(!1);init(t,e=!1,o=!1){this.backupId.set(t),this.isFileRestore.set(e),this.isDraft.set(o),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(t,!0)}updateTargetUrl(t){this.destinationTargetUrl.set(t)}submit(){this.isSubmitting.set(!0);let t=this.backupId(),e=this.optionsForm.value,o=this.selectFilesForm.value,i=this.versionOptions()?.find(r=>r.Version===o.selectedOption);this.#e.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(r=>`${r}*`)??[],passphrase:o.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:r=>{console.error("restore error",r)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(t,e=!1){this.versionOptionsLoading.set(!0),se([this.#e.getApiV1BackupById({id:t}),this.#e.getApiV1BackupByIdFilesets({id:t}).pipe(le(3))]).pipe(ae(1),E(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([o,i])=>{this.versionOptions.set(i),this.backup.set(o)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=pe({token:n,factory:n.\u0275fac,providedIn:"root"})};var W=new y,De=()=>W.group({restoreFrom:W.control("orignal"),restoreFromPath:W.control(""),handleExisting:W.control("overwrite"),permissions:W.control(!1)}),Z=class n{#t=_(O);#e=_(d);#o=_(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files from?`;let o;o=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let r;r=$localize`How do you want to handle existing files?`;let f;f=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let ee;ee=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let te;te=$localize`Permissions`;let oe;oe=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ne;return ne=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],t,e,o,i,r,f,ee,te,oe,ie,ne,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){if(e&1){let i=x();s(0,"form",12,0),T("submit",function(){return C(i),R(o.submit())}),s(2,"h3",13),g(3,1),a(),s(4,"app-toggle-card",14),V(5,15),g(6,2),X(),s(7,"spk-radio",16),c(8,3),l(9,"input",17),u(),a(),s(10,"spk-radio",16),c(11,4),l(12,"input",18),u(),a(),s(13,"app-file-tree",19)(14,"label",20),z(15,"Path"),a(),l(16,"input",21),a()(),s(17,"app-toggle-card",14),V(18,15),g(19,5),X(),s(20,"spk-radio",16),c(21,6),l(22,"input",22),u(),a(),s(23,"spk-radio",16),c(24,7),l(25,"input",23),u(),a()(),s(26,"app-toggle-card"),V(27,15),g(28,8),X(),s(29,"spk-toggle",24),c(30,9),l(31,"input",25),u(),a()(),s(32,"div",26)(33,"button",27),T("click",function(){return C(i),R(o.goBack())}),c(34,10),l(35,"spk-icon"),u(),a(),s(36,"button",28),c(37,11),l(38,"spk-icon"),u(),a()()()}if(e&2){let i;S("formGroup",o.optionsForm),F(4),S("disallowToggle",!0),F(9),S("disabled",((i=o.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),F(4),S("disallowToggle",!0),F(19),ce("loader",o.isSubmitting())}},dependencies:[A,L,h,Ee,de,k,M,$,D,Ie,K,Pe,Re,v,b],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}"],changeDetection:0})};export{De as a,Z as b,Le as c,H as d,$e as e,Q as f,O as g};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-W3VTD2H4.js";import{a as $,b as y,d as B,e as h,h as v,m as G,p as L,q as U,s as K}from"./chunk-5OX72VKG.js";import{b as N}from"./chunk-UIOTKB6J.js";import{c as E,d as R}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as w,c as X,g as x,l as V,w as z,y as j}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as n,Bb as l,C as g,Lb as I,Mb as M,Nb as u,Pa as F,Qb as O,Rb as f,W as p,cb as S,ec as A,hb as D,qb as d,qc as k,sa as m,sb as C,vb as P,zb as r}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var q=()=>["/"];function H(c,e){c&1&&(r(0,"spk-form-field")(1,"label",18),u(2,4),n(),l(3,"input",19),n())}var s=new U,T=class c{#e=p(X);#t=p(N);#o=p(b);#n=p(E);isImporting=m(!1);isSecureFile=m(!1);importForm=s.group({config:s.control(""),cmdline:s.control(!1),importMetadata:s.control(!1),direct:s.control(!1),passphrase:s.control("")});selectedFile=m(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let i=new FileReader;this.isSecureFile.set(t.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(t)}}#i(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,i="";for(let a=0;a<t;a++)i+=String.fromCharCode(o[a]);return btoa(i)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{let o=this.#o.addDraftBackup(e.data);this.#n.navigate(["/backup-draft",o])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],decls:24,vars:7,consts:()=>{let e;e=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;t=$localize`Import Metadata`;let i;i=$localize`Save now`;let a;return a=$localize`Passphrase`,[e,o,t,i,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),I(2,0),r(3,"div",5)(4,"button",6),l(5,"spk-icon"),n(),r(6,"button",7),f("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),M(),n()(),r(8,"form",8)(9,"spk-form-field",9),f("fileDropped",function(a){return t.onFileDropped(a)}),r(10,"label",10),u(11,1),n(),r(12,"input",11),f("change",function(a){return t.onFileDropped(a)}),n(),r(13,"spk-icon",12),A(14,"upload"),n()(),D(15,H,4,0,"spk-form-field"),r(16,"spk-toggle",13)(17,"label",14),u(18,2),n(),l(19,"input",15),n(),r(20,"spk-toggle",13)(21,"label",16),u(22,3),n(),l(23,"input",17),n()()),o&2&&(F(4),d("routerLink",k(6,q)),F(2),C("loader",t.isImporting()),d("disabled",t.isImporting()),F(2),d("formGroup",t.importForm),F(7),P(t.isSecureFile()?15:-1))},dependencies:[K,v,y,$,B,h,G,L,R,j,V,w,x,z],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}"],changeDetection:0})};export{T as default};
1
+ import{a as b}from"./chunk-W3VTD2H4.js";import{a as $,b as y,d as B,e as h,h as v,m as G,p as L,q as U,s as K}from"./chunk-5OX72VKG.js";import{b as N}from"./chunk-UIOTKB6J.js";import{c as E,d as R}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as w,c as X,g as x,l as V,w as z,y as j}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as n,Bb as l,C as g,Lb as I,Mb as M,Nb as u,Pa as F,Qb as O,Rb as f,W as p,cb as S,ec as A,hb as D,qb as d,qc as k,sa as m,sb as C,vb as P,zb as r}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var q=()=>["/"];function H(c,e){c&1&&(r(0,"spk-form-field")(1,"label",18),u(2,4),n(),l(3,"input",19),n())}var s=new U,T=class c{#e=p(X);#t=p(N);#o=p(b);#n=p(E);isImporting=m(!1);isSecureFile=m(!1);importForm=s.group({config:s.control(""),cmdline:s.control(!1),importMetadata:s.control(!1),direct:s.control(!1),passphrase:s.control("")});selectedFile=m(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let i=new FileReader;this.isSecureFile.set(t.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(t)}}#i(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,i="";for(let a=0;a<t;a++)i+=String.fromCharCode(o[a]);return btoa(i)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{let o=this.#o.addDraftBackup(e.data);this.#n.navigate(["/backup-draft",o])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],decls:24,vars:7,consts:()=>{let e;e=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;t=$localize`Import Metadata`;let i;i=$localize`Save now`;let a;return a=$localize`Passphrase`,[e,o,t,i,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),I(2,0),r(3,"div",5)(4,"button",6),l(5,"spk-icon"),n(),r(6,"button",7),f("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),M(),n()(),r(8,"form",8)(9,"spk-form-field",9),f("fileDropped",function(a){return t.onFileDropped(a)}),r(10,"label",10),u(11,1),n(),r(12,"input",11),f("change",function(a){return t.onFileDropped(a)}),n(),r(13,"spk-icon",12),A(14,"upload"),n()(),D(15,H,4,0,"spk-form-field"),r(16,"spk-toggle",13)(17,"label",14),u(18,2),n(),l(19,"input",15),n(),r(20,"spk-toggle",13)(21,"label",16),u(22,3),n(),l(23,"input",17),n()()),o&2&&(F(4),d("routerLink",k(6,q)),F(2),C("loader",t.isImporting()),d("disabled",t.isImporting()),F(2),d("formGroup",t.importForm),F(7),P(t.isSecureFile()?15:-1))},dependencies:[K,v,y,$,B,h,G,L,R,j,V,w,x,z],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}"],changeDetection:0})};export{T as default};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-25GEPULG.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import{a as G}from"./chunk-W3VTD2H4.js";import"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as L}from"./chunk-UIOTKB6J.js";import{d as E}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as R,g as f,h as k,k as w,o as X}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as i,Bb as s,Cb as D,Db as b,Lb as h,Mb as y,Nb as c,Ob as A,Pa as p,Pb as I,Sb as S,W as d,cb as O,ec as l,hb as m,hc as B,nb as M,ob as P,qb as u,qc as g,rc as v,vb as F,wb as N,xb as x,yb as $,zb as e}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",v(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(G);#t=d(L);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups()}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,w,R,X,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 0;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
1
+ import{a as z}from"./chunk-DKICGIGJ.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import{a as G}from"./chunk-W3VTD2H4.js";import"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as L}from"./chunk-UIOTKB6J.js";import{d as E}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as R,g as f,h as k,k as w,o as X}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as i,Bb as s,Cb as D,Db as b,Lb as h,Mb as y,Nb as c,Ob as A,Pa as p,Pb as I,Sb as S,W as d,cb as O,ec as l,hb as m,hc as B,nb as M,ob as P,qb as u,qc as g,rc as v,vb as F,wb as N,xb as x,yb as $,zb as e}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",v(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(G);#t=d(L);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups()}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,w,R,X,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 0;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};