@duplicati/ngclient 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunk-27GCJTV5.js +1 -0
- package/{chunk-X53QKTFJ.js → chunk-2HOCLZ5J.js} +1 -1
- package/{chunk-J32PX2MH.js → chunk-6HO4XDHH.js} +1 -1
- package/{chunk-O6D3UT7U.js → chunk-OQEYKIKK.js} +1 -1
- package/{chunk-NWUO2EUU.js → chunk-P7FSPM3M.js} +1 -1
- package/{chunk-AYQ7K4DG.js → chunk-YWKLDO7P.js} +1 -1
- package/index.html +1 -1
- package/{main-6DRXXXV2.js → main-CTK3HJBN.js} +1 -1
- package/package.json +1 -1
- package/chunk-XVJY4Y25.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as L}from"./chunk-EUZXGGH4.js";import{n as w}from"./chunk-ED3PEZLO.js";import{a as M,b as x}from"./chunk-AKLJ23OZ.js";import{a as G}from"./chunk-OVIL3KMN.js";import{Ab as E,E as g,Eb as r,Fb as o,Gb as R,Kc as p,L as b,Mc as v,R as B,Ra as u,Sb as f,X as l,Xb as _,Za as i,fb as A,ib as I,ic as h,l as T,lb as D,lc as k,p as C,vb as y,vc as N,wc as O}from"./chunk-MR4RE3IB.js";import{a as d,b as S}from"./chunk-C6Q5SG76.js";var c=class a{#t=l(G);transform(e,...t){return this.#t.locale(),this.#t(e).fromNow()}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=I({name:"appRelativeTime",type:a,pure:!0})};var m=class a{#t=1e3;#d=l(x);#o=l(M);#n=l(L);#e=i(!1);#i=i(!1);#u=i(this.#t);#p=i(null);#l=i(!1);#s=i(!1);#a=i(null);#S=i(!1);statusData=this.#p.asReadonly();serverState=p(()=>{let e=this.#a();return e?(e.ProposedSchedule=e?.ProposedSchedule?.map(t=>{let s=t.Item1?this.#n.getBackupById(t.Item1):null;return S(d({},t),{backup:s})}),e):null});isFetching=this.#i.asReadonly();#r=null;#g=v(()=>{let e=this.#e(),t=this.#u();if(!e||!t||t<this.#t){this.#r&&window.clearInterval(this.#r);return}this.#r=window.setInterval(()=>{this.#m()},t)});start(){this.#l.set(!0),this.#c()}stop(){this.#l.set(!1)}startPollingProgress(){this.#m(),this.#e.set(!0)}stopPollingProgress(){this.#e.set(!1)}setProgressStatePollingInterval(e){if(e<this.#t){console.error(`Polling interval must be at least ${this.#t}ms`);return}this.#u.set(e)}serverStateEffect=v(()=>{if(this.#S()){this.stopPollingProgress();return}!this.#s()&&this.#l()?setTimeout(()=>{this.startPollingProgress(),this.#c()},1e3):this.stopPollingProgress()});#c(){if(this.#s())return;this.#s.set(!0);let e=this.#a()?.LastEventID,t=e==null?{}:{lastEventId:e,longpoll:!0,duration:"299s"};this.#o.getApiV1Serverstate(t).pipe(g(()=>this.#s.set(!1))).subscribe({next:s=>{this.#a()?.LastDataUpdateID!==s.LastDataUpdateID&&this.#n.getBackups(),this.#a.set(s)}})}#m(){this.#i.set(!0),this.#d.getApiV1Progressstate().pipe(b(e=>{let t=e.TaskID??null;return t===null?T(e):this.#o.getApiV1TaskByTaskid({taskid:t}).pipe(C(s=>S(d({},e),{task:s??null})))}),g(()=>this.#i.set(!1))).subscribe({next:e=>{let t=e.TaskID??null,s=e.BackupID??null;if(t!==null&&s!==null){let n=this.#n.getBackupById(s);e.backup=n}e.task?.Status==="Completed"?this.#e.set(!1):this.#e.set(!0),this.#p.set(e)},error:e=>{e.status===404&&this.#e.set(!1)}})}static \u0275fac=function(t){return new(t||a)};static \u0275prov=B({token:a,factory:a.\u0275fac,providedIn:"root"})};function V(a,e){if(a&1&&(r(0,"div",4),h(1),o(),R(2,"spk-progress-bar",5)),a&2){let t,s,n=_();u(),k("",(t=n.statusData())==null||t.task==null?null:t.task.Status," - ",(t=n.statusData())==null||t.backup==null||t.backup.Backup==null?null:t.backup.Backup.Name,""),u(),y("value",(s=n.statusData())!=null&&s.OverallProgress?((s=n.statusData())==null?null:s.OverallProgress)*100:3)}}function j(a,e){if(a&1&&(r(0,"div",4),h(1),N(2,"appRelativeTime"),o()),a&2){let t,s=_();u(),k("",(t=s.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",O(2,2,s.nextBackup().time),"")}}function F(a,e){a&1&&(r(0,"div",4),f(1,0),o())}function X(a,e){a&1&&(r(0,"div",4),f(1,1),o())}var U=new Date,P=class a{#t=l(m);minsAgo=U.setMinutes(U.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;nextBackup=p(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#t.start()}ngOnDestroy(){this.#t.stop()}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=A({type:a,selectors:[["app-status-bar"]],decls:6,vars:1,consts:()=>{let e;e=$localize`No scheduled tasks`;let t;return t=$localize`Loading...`,[e,t,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"raised","primary",3,"value"]]},template:function(t,s){if(t&1&&(r(0,"div",2)(1,"div",3),D(2,V,3,3)(3,j,3,4,"div",4)(4,F,2,0,"div",4)(5,X,2,0,"div",4),o()()),t&2){let n;u(2),E(!((n=s.statusData())==null||n.task==null)&&n.task.Status&&((n=s.statusData())==null||n.task==null?null:n.task.Status)!=="Completed"?2:s.nextBackup().backup||s.nextBackup().time?3:!s.statusData()||((n=s.statusData())==null||n.task==null?null:n.task.Status)==="Completed"?4:5)}},dependencies:[w,c],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;align-items:center;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{P as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-27GCJTV5.js";import{a as v}from"./chunk-EUZXGGH4.js";import{a as h,g as y,h as b,n as L}from"./chunk-ED3PEZLO.js";import{a as B}from"./chunk-AKLJ23OZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as C,Bb as f,Cb as k,Db as O,Eb as a,Fb as r,Gb as p,Hb as M,Ib as P,Qb as N,Ra as l,Rb as F,Sb as _,Tb as $,Ub as D,X as c,Xb as d,fb as E,ic as A,lb as u,lc as I,sb as g,sc as x,tb as R,vb as T}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var X=()=>[b,y,h,import("./chunk-HEBDWN5N.js").then(e=>e.RouterLink)],w=e=>["/restore-flow",e];function z(e,o){if(e&1&&(a(0,"spk-card",5),p(1,"img",6),a(2,"div",7)(3,"h3"),_(4,1),r(),a(5,"p"),A(6),r()(),a(7,"button",8),N(8,2),p(9,"spk-icon"),F(),r()()),e&2){let t,i,n=o.$implicit;l(4),$((t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:"Backup name missing"),D(4),l(2),I(" ",(i=n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceSizeString)!==null&&i!==void 0?i:"-"," / ",(i=n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.BackupListCount)!==null&&i!==void 0?i:"-"," "),l(),T("routerLink",x(4,w,n.Backup==null?null:n.Backup.ID))}}function W(e,o){if(e&1&&k(0,z,10,6,"spk-card",5,f),e&2){let t=d(2);O(t.backups())}}function K(e,o){e&1&&(M(0),_(1,3),P())}function j(e,o){if(e&1&&u(0,W,2,0)(1,K,2,0,"ng-container"),e&2){let t=d();C(t.backups().length?0:1)}}function q(e,o){e&1&&(a(0,"div",9),p(1,"spk-progress-bar",10),a(2,"div",7)(3,"h3"),_(4,4),r()()())}var m=class e{#e=c(v);#t=c(B);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups()}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=E({type:e,selectors:[["app-restore"]],decls:8,vars:1,consts:()=>{let o;o=$localize`Where do you want to restore from?`;let t;t=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let n;n=$localize`No backups founds`;let S;return S=$localize`Loading backups...`,[o,t,i,n,S,[1,"type-a"],["src","assets/images/folder.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(p(0,"app-status-bar"),a(1,"section")(2,"h2"),_(3,0),r(),u(4,j,2,1)(5,q,5,0),g(6,4,X,null,5),r()),t&2&&(l(6),R(!i.backupsLoading()))},dependencies:[G,L],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{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue}from"./chunk-
|
|
1
|
+
import{a as ue}from"./chunk-27GCJTV5.js";import{a as se}from"./chunk-EUZXGGH4.js";import{a as R,g as x,h as le,j as ce,m as pe,n as re}from"./chunk-ED3PEZLO.js";import"./chunk-AKLJ23OZ.js";import{Y as I}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as S,Bb as ee,Cb as ne,Db as te,Eb as i,Fb as o,Gb as r,Hb as M,Ib as E,Kb as ie,Qb as m,Ra as l,Rb as O,Sb as c,Tb as oe,Ub as _e,Wb as $,X as J,Xb as s,ea as F,fa as N,fb as Q,ic as u,kc as T,lb as d,rc as A,sb as Y,sc as H,tb as Z,vb as C,vc as k,wc as P,xb as f,xc as ae}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var de=()=>[I,x,R,ce,pe,import("./chunk-4TN5W4QO.js").then(e=>e.DatePipe),import("./chunk-BEZGDXHL.js").then(e=>e.DurationFormatPipe),import("./chunk-KMNTAMUY.js").then(e=>e.BytesPipe)],Me=()=>["/add-backup"],Ee=()=>["/restore"],ge=e=>["/backup",e],Ce=e=>["/backup",e,"export"];function Se(e,_){if(e&1&&(u(0," - "),M(1),c(2,14),E(),u(3),k(4,"durationFormat")),e&2){let n=s().$implicit;l(3),T(" ",P(4,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration)," ")}}function me(e,_){e&1&&(M(0),c(1,15),E())}function Oe(e,_){if(e&1&&(u(0),k(1,"bytes")),e&2){let n=s().$implicit;T(" ",P(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Te(e,_){e&1&&(M(0),c(1,16),E())}function ke(e,_){if(e&1&&(u(0),k(1,"bytes")),e&2){let n=s().$implicit;T(" ",P(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Pe(e,_){e&1&&(M(0),c(1,17),E())}function Fe(e,_){if(e&1&&(i(0,"spk-chip",30),c(1,18),o()),e&2){let n=s().$implicit;l(),oe(n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.BackupListCount),_e(1)}}function Ne(e,_){e&1&&(i(0,"spk-chip",31),c(1,19),o())}function fe(e,_){if(e&1){let n=ie();i(0,"div",29)(1,"div",24)(2,"h3"),u(3),i(4,"spk-icon"),u(5,"database"),o()(),i(6,"p")(7,"span"),c(8,8),o(),u(9),k(10,"date"),d(11,Se,5,3)(12,me,2,0,"ng-container"),o(),i(13,"p")(14,"span"),c(15,9),o(),d(16,Oe,2,3)(17,Te,2,0,"ng-container"),o(),i(18,"p")(19,"span"),c(20,10),o(),d(21,ke,2,3)(22,Pe,2,0,"ng-container"),o()(),d(23,Fe,2,1,"spk-chip",30)(24,Ne,2,0,"spk-chip",31),i(25,"div",32)(26,"button",33),$("click",function(){let p=F(n).$implicit,g=s(3);return N(g.startBackup(p.Backup==null?null:p.Backup.ID))}),m(27,11),r(28,"spk-icon"),O(),o(),i(29,"button",34)(30,"spk-icon"),u(31,"pencil-simple"),o()(),i(32,"spk-menu",35)(33,"button",25)(34,"spk-icon"),u(35,"dots-three-vertical"),o()(),M(36,36),i(37,"button",37,0),m(39,12),r(40,"spk-icon"),O(),o(),i(41,"button",38,0),$("click",function(){let p=F(n).$implicit,g=s(3);return N(g.deleteBackup(p.Backup==null?null:p.Backup.ID))}),m(43,13),r(44,"spk-icon"),O(),o(),E(),o()()()}if(e&2){let n,t=_.$implicit,p=s(3);l(3),T(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:p.MISSING_BACKUP_NAME," "),l(6),T(" ",ae(10,13,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDate,"short")," "),l(2),S(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?11:12),l(5),S(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?16:17),l(5),S(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?21:22),l(2),S(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.BackupListCount?23:24),l(3),f("loader",p.startingBackup()),l(3),C("routerLink",H(16,ge,t.Backup==null?null:t.Backup.ID)),l(3),C("right",!0),l(5),C("routerLink",H(18,Ce,t.Backup==null?null:t.Backup.ID)),l(4),f("loader",p.deletingBackup()===(t.Backup==null?null:t.Backup.ID))}}function $e(e,_){if(e&1&&ne(0,fe,45,20,"div",29,ee),e&2){let n=s(2);te(n.backups())}}function Ae(e,_){e&1&&(M(0),c(1,20),E())}function He(e,_){if(e&1&&d(0,$e,2,0)(1,Ae,2,0,"ng-container"),e&2){let n=s();S(n.backups().length?0:1)}}function Ie(e,_){e&1&&(i(0,"div",39),r(1,"spk-progress-bar",40),i(2,"div",24)(3,"h3"),c(4,21),o()()())}var D=class e{#e=J(se);MISSING_BACKUP_NAME=$localize`Backup name missing`;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;ngOnInit(){this.#e.getBackups(!0)}startBackup(_){this.#e.startBackup(_)}deleteBackup(_){_&&window.confirm("Are you sure you want to delete this backup?")&&this.#e.deleteBackup(_)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Q({type:e,selectors:[["app-home"]],decls:31,vars:5,consts:()=>{let _;_=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let t;t=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let p;p=$localize`Restores`;let g;g=$localize`Restores are stored in the cloud and can be restored at any time.`;let B;B=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let b;b=$localize`My backups`;let L;L=$localize`Last successful backup:`;let y;y=$localize`Source:`;let G;G=$localize`Destination:`;let h;h=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Start `;let v;v=$localize` Export ${"\uFFFD#40\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let X;X=$localize` Delete ${"\uFFFD#44\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#44\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;z=$localize`took`;let w;w=$localize`N/A`;let K;K=$localize`N/A`;let V;V=$localize`N/A`;let j;j=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: Version `;let U;U=$localize`No version yet`;let W;W=$localize`No backups founds`;let q;return q=$localize`Loading backups...`,[["option",""],_,n,t,p,g,B,b,L,y,G,h,v,X,z,w,K,V,j,U,W,q,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],[1,"actions"],["spk-button","",3,"click"],["spk-button","",3,"routerLink"],[3,"right"],["menu",""],[3,"routerLink"],[3,"click"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,t){n&1&&(r(0,"app-status-bar"),i(1,"section")(2,"header")(3,"spk-card",22),r(4,"img",23),i(5,"div",24)(6,"h3"),c(7,1),o(),i(8,"p"),c(9,2),o()(),i(10,"button",25),m(11,3),r(12,"spk-icon"),O(),o()(),i(13,"spk-card",22),r(14,"img",26),i(15,"div",24)(16,"h3"),c(17,4),o(),i(18,"p"),c(19,5),o()(),i(20,"button",25),m(21,6),r(22,"spk-icon"),O(),o()()(),i(23,"div",27)(24,"h2"),c(25,7),o(),i(26,"div",28),d(27,He,2,1)(28,Ie,5,0),Y(29,27,de,null,28),o()()()),n&2&&(l(3),C("routerLink",A(3,Me)),l(10),C("routerLink",A(4,Ee)),l(16),Z(!t.backupsLoading()))},dependencies:[I,ue,le,x,R,re],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-27GCJTV5.js";import"./chunk-EUZXGGH4.js";import{a as T,g as M,h as f}from"./chunk-ED3PEZLO.js";import"./chunk-AKLJ23OZ.js";import{Y as S}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Eb as e,Fb as n,Gb as _,Qb as s,Ra as c,Rb as l,Sb as i,fb as D,rc as d,vb as r}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as xe}from"./chunk-K7H3KYW7.js";import{a as we}from"./chunk-XVJY4Y25.js";import{a as K}from"./chunk-N35HGIXN.js";import{a as z}from"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import{a as ke}from"./chunk-DGBBEZNN.js";import"./chunk-EUZXGGH4.js";import{b as V,d as B,e as Re,g as W,h as Fe,j as he,l as Pe,m as Ie,o as ye,p as $e,q as j,r as Ge}from"./chunk-7TWD5GBS.js";import{a as Oe}from"./chunk-6M3MNJ52.js";import{g as be,k as Ae,o as ve,p as De,q as Le}from"./chunk-ED3PEZLO.js";import{a as U}from"./chunk-AKLJ23OZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as N,Bb as y,Cb as $,Db as G,Eb as i,Fb as o,Gb as c,K as v,Kb as M,Kc as X,Mc as Me,Oa as Ce,Qb as O,R as ge,Ra as a,Rb as R,Sb as s,Tb as Q,Ub as Y,Vb as Ee,Wb as p,X as S,Xb as d,Za as E,_b as Ne,c as me,ea as g,fa as C,fb as D,ic as f,jc as b,kc as L,lb as H,mc as k,nc as w,oc as x,p as Te,rc as fe,vb as m,xb as J}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var F=class l{#e=S(U);#i=S(z);repeatRegisterTimer=null;state=E("unknown");claimUrl=E(null);registerUrl=E("");status=X(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=Me(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();console.log("currentState: ",t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n)})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#n(t)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=ge({token:l,factory:l.\u0275fac,providedIn:"root"})};function We(l,e){if(l&1){let t=M();i(0,"spk-form-field",10)(1,"input",11),x("ngModelChange",function(r){g(t);let u=d(2);return w(u.registerUrl,r)||(u.registerUrl=r),C(r)}),o()(),i(2,"button",12),p("click",function(){g(t);let r=d(2);return C(r.register())}),s(3,0),o()}if(l&2){let t=d(2);a(),k("ngModel",t.registerUrl)}}function je(l,e){if(l&1&&(i(0,"div",8)(1,"label"),s(2,1),o(),i(3,"a",13),f(4),o()()),l&2){let t=d(2);a(3),Ne("href",t.claimUrl(),Ce),a(),b(t.claimUrl())}}function Ke(l,e){l&1&&(i(0,"div",8)(1,"label"),s(2,2),o()())}function qe(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.cancel())}),s(1,3),o()}}function He(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.disable())}),s(1,4),o()}}function Je(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.enable())}),s(1,5),o(),i(2,"button",14),p("click",function(){g(t);let r=d(2);return C(r.delete())}),s(3,6),o()}}function Qe(l,e){if(l&1&&(i(0,"div",7),H(1,We,4,1)(2,je,5,2,"div",8)(3,Ke,3,0,"div",8)(4,qe,2,0,"button",9)(5,He,2,0,"button",9)(6,Je,4,0),o()),l&2){let t=d();a(),N(t.state()==="inactive"?1:-1),a(),N(t.state()==="registered"?2:-1),a(),N(t.state()==="registering"?3:-1),a(),N(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),a(),N(t.state()==="connected"||t.state()==="enabled"?5:-1),a(),N(t.state()==="disabled"?6:-1)}}var q=class l{#e=S(F);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(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let r;r=$localize`Cancel registration`;let u;u=$localize`Disable remote control`;let P;P=$localize`Enable remote control`;let I;return I=$localize`Delete remote control setup`,[e,t,n,r,u,P,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","warn",3,"click"]]},template:function(t,n){t&1&&H(0,Qe,7,6,"div",7),t&2&&N(n.state()!=="unknown"?0:-1)},dependencies:[j,V,B,W,Ae],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 Ye=()=>({standalone:!0});function Ze(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t),a(),b(t)}}function et(l,e){if(l&1){let t=M();i(0,"spk-option",51),p("click",function(){let r=g(t).$implicit,u=d();return C(u.pauseSettings.controls.timeType.setValue(r.value))}),f(1),o()}if(l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function tt(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function nt(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}var h=new $e,Ue=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],ze=[{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`}],Z=class l{#e=S(ke);#i=S(z);#t=S(U);#n=S(F);#o=S(Oe);#r=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=E("list");langCtrl=E(this.#r);remoteControlStatus=this.#n.status;settingsForm=h.group({pauseSettings:h.group({time:h.control(0),timeType:h.control("s")}),usageStatistics:h.control(""),updateChannel:h.control("")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=X(()=>{let e=this.langCtrl();return e?K.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):K});usageStatisticsOptions=E(ze);timeTypeOptions=E(Ue);timeOptions=xe([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],me(Te(([e,t])=>{let n=this.#l(e);return t!==null?n.filter(r=>r.toString().includes(t.toString())):n}),v([])));#l(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((n,r)=>r)}ngOnInit(){this.getServerSettings()}saveLocale(e){this.#o.setItem("locale",e),window.location.reload()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#t.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],n=t.slice(-1),r=t.slice(0,-1),u=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(r==""?"0":r),timeType:u.includes(n)?n:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(){let e=this;return()=>{let t=e.langCtrl();return t?K.find(n=>n.value===t)?.label??null:null}}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:Ue.find(n=>n.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:ze.find(n=>n.value===t)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-settings"]],decls:106,vars:17,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Save changes`;let r;r=$localize`Remote access control`;let u;u=$localize`Pause after startup or hibernation`;let P;P=$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 I;I=$localize`Color theme`;let T;T=$localize`Customize your application theme`;let ee;ee=$localize`Language`;let te;te=$localize`Select a language for the platform`;let ne;ne=$localize`Update channel`;let ie;ie=$localize`Update channel selection is not implemented yet.`;let oe;oe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) ${"\uFFFD#65\uFFFD\uFFFD/#65\uFFFD"}:TAG_INPUT:`;let re;re=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let le;le=$localize` Stable ${"\uFFFD#71\uFFFD\uFFFD/#71\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize`Official releases`;let se;se=$localize` Beta ${"\uFFFD#77\uFFFD\uFFFD/#77\uFFFD"}:TAG_INPUT:`;let _e;_e=$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 ue;ue=$localize` Experimental ${"\uFFFD#83\uFFFD\uFFFD/#83\uFFFD"}:TAG_INPUT:`;let pe;pe=$localize`Specific builds for developers only. Not for use with important data.`;let ce;ce=$localize` Canary ${"\uFFFD#89\uFFFD\uFFFD/#89\uFFFD"}:TAG_INPUT:`;let de;de=$localize`Individual builds for developers only. Not for use with important data.`;let Se;Se=$localize`Usage statistics`;let A;return A=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#98\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#98\uFFFD"}:CLOSE_LINK:${"[\uFFFD#99\uFFFD\uFFFD/#99\uFFFD|\uFFFD#100\uFFFD\uFFFD/#100\uFFFD]"}:LINE_BREAK:${"[\uFFFD#99\uFFFD\uFFFD/#99\uFFFD|\uFFFD#100\uFFFD\uFFFD/#100\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. `,A=Ee(A),[e,t,n,r,u,P,I,T,ee,te,ne,ie,oe,re,le,ae,se,_e,ue,pe,ce,de,Se,A,[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[3,"click","value"]]},template:function(t,n){if(t&1&&(c(0,"app-status-bar"),i(1,"form",24),p("submit",function(){return n.submit()}),i(2,"header")(3,"div",25)(4,"h2"),s(5,0),o(),i(6,"p"),s(7,1),o()(),i(8,"button",26),s(9,2),o()(),i(10,"section")(11,"div",27)(12,"h3"),s(13,3),o(),i(14,"p"),f(15),o()(),i(16,"div",28),c(17,"app-remote-control"),o()(),i(18,"section")(19,"div",27)(20,"h3"),s(21,4),o(),i(22,"p"),s(23,5),o()(),i(24,"div",28)(25,"div",29)(26,"spk-select",30),c(27,"input",31),$(28,Ze,2,2,"spk-option",32,y),o(),i(30,"spk-select",33),c(31,"input",34),$(32,et,2,2,"spk-option",32,y),o()()()(),i(34,"section")(35,"div",27)(36,"h3"),s(37,6),o(),i(38,"p"),s(39,7),o()(),i(40,"div",28)(41,"div",35)(42,"img",36),p("click",function(){return n.setLightMode()}),o(),i(43,"img",37),p("click",function(){return n.setDarkMode()}),o()()()(),i(44,"section")(45,"div",27)(46,"h3"),s(47,8),o(),i(48,"p"),s(49,9),o()(),i(50,"div",28)(51,"spk-select",38),p("change",function(u){return n.saveLocale(u)}),i(52,"input",39),x("ngModelChange",function(u){return w(n.langCtrl,u)||(n.langCtrl=u),u}),o(),$(53,tt,2,2,"spk-option",32,y),o()()(),i(55,"section")(56,"div",27)(57,"h3"),s(58,10),o(),i(59,"p"),s(60,11),o()(),i(61,"div",40)(62,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("")}),i(63,"spk-radio",42),O(64,12),c(65,"input",43),R(),o(),i(66,"p"),s(67,13),o()(),i(68,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("stable")}),i(69,"spk-radio",42),O(70,14),c(71,"input",44),R(),o(),i(72,"p"),s(73,15),o()(),i(74,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("beta")}),i(75,"spk-radio",42),O(76,16),c(77,"input",45),R(),o(),i(78,"p"),s(79,17),o()(),i(80,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("experimental")}),i(81,"spk-radio",42),O(82,18),c(83,"input",46),R(),o(),i(84,"p"),s(85,19),o()(),i(86,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("canary")}),i(87,"spk-radio",42),O(88,20),c(89,"input",47),R(),o(),i(90,"p"),s(91,21),o()()()(),i(92,"section")(93,"div",27)(94,"h3"),s(95,22),o(),i(96,"p"),O(97,23),c(98,"a",48)(99,"br")(100,"br"),R(),o()(),i(101,"div",28)(102,"spk-select",49),c(103,"input",50),$(104,nt,2,2,"spk-option",32,y),o()()()()),t&2){let r,u;a(),m("formGroup",n.settingsForm),a(14),b(n.remoteControlStatus()),a(11),m("hideClearButton",!0),a(2),G(n.timeOptions()),a(2),m("displayFn",n.typeDisplay())("hideClearButton",!0),a(2),G(n.timeTypeOptions()),a(10),J("active",!n.isDarkMode()),a(),J("active",n.isDarkMode()),a(8),m("displayFn",n.languageDisplay())("hideClearButton",!0),a(),k("ngModel",n.langCtrl),m("ngModelOptions",fe(16,Ye)),a(),G(n.languageOptions()),a(12),Q((r=n.sysinfo())==null?null:r.DefaultUpdateChannel),Y(64),a(2),Q((u=n.sysinfo())==null?null:u.ServerVersionType),Y(67),a(35),m("displayFn",n.usageDisplay()),a(2),G(n.usageStatisticsOptions())}},dependencies:[j,Fe,V,he,B,Re,W,Ge,Pe,ye,Ie,we,q,De,be,ve,Le],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}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%] .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%}.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}"],changeDetection:0})};export{Z as default};
|
|
1
|
+
import{a as xe}from"./chunk-K7H3KYW7.js";import{a as we}from"./chunk-27GCJTV5.js";import{a as K}from"./chunk-N35HGIXN.js";import{a as z}from"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import{a as ke}from"./chunk-DGBBEZNN.js";import"./chunk-EUZXGGH4.js";import{b as V,d as B,e as Re,g as W,h as Fe,j as he,l as Pe,m as Ie,o as ye,p as $e,q as j,r as Ge}from"./chunk-7TWD5GBS.js";import{a as Oe}from"./chunk-6M3MNJ52.js";import{g as be,k as Ae,o as ve,p as De,q as Le}from"./chunk-ED3PEZLO.js";import{a as U}from"./chunk-AKLJ23OZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as N,Bb as y,Cb as $,Db as G,Eb as i,Fb as o,Gb as c,K as v,Kb as M,Kc as X,Mc as Me,Oa as Ce,Qb as O,R as ge,Ra as a,Rb as R,Sb as s,Tb as Q,Ub as Y,Vb as Ee,Wb as p,X as S,Xb as d,Za as E,_b as Ne,c as me,ea as g,fa as C,fb as D,ic as f,jc as b,kc as L,lb as H,mc as k,nc as w,oc as x,p as Te,rc as fe,vb as m,xb as J}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var F=class l{#e=S(U);#i=S(z);repeatRegisterTimer=null;state=E("unknown");claimUrl=E(null);registerUrl=E("");status=X(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=Me(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();console.log("currentState: ",t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n)})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#n(t)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=ge({token:l,factory:l.\u0275fac,providedIn:"root"})};function We(l,e){if(l&1){let t=M();i(0,"spk-form-field",10)(1,"input",11),x("ngModelChange",function(r){g(t);let u=d(2);return w(u.registerUrl,r)||(u.registerUrl=r),C(r)}),o()(),i(2,"button",12),p("click",function(){g(t);let r=d(2);return C(r.register())}),s(3,0),o()}if(l&2){let t=d(2);a(),k("ngModel",t.registerUrl)}}function je(l,e){if(l&1&&(i(0,"div",8)(1,"label"),s(2,1),o(),i(3,"a",13),f(4),o()()),l&2){let t=d(2);a(3),Ne("href",t.claimUrl(),Ce),a(),b(t.claimUrl())}}function Ke(l,e){l&1&&(i(0,"div",8)(1,"label"),s(2,2),o()())}function qe(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.cancel())}),s(1,3),o()}}function He(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.disable())}),s(1,4),o()}}function Je(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.enable())}),s(1,5),o(),i(2,"button",14),p("click",function(){g(t);let r=d(2);return C(r.delete())}),s(3,6),o()}}function Qe(l,e){if(l&1&&(i(0,"div",7),H(1,We,4,1)(2,je,5,2,"div",8)(3,Ke,3,0,"div",8)(4,qe,2,0,"button",9)(5,He,2,0,"button",9)(6,Je,4,0),o()),l&2){let t=d();a(),N(t.state()==="inactive"?1:-1),a(),N(t.state()==="registered"?2:-1),a(),N(t.state()==="registering"?3:-1),a(),N(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),a(),N(t.state()==="connected"||t.state()==="enabled"?5:-1),a(),N(t.state()==="disabled"?6:-1)}}var q=class l{#e=S(F);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(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let r;r=$localize`Cancel registration`;let u;u=$localize`Disable remote control`;let P;P=$localize`Enable remote control`;let I;return I=$localize`Delete remote control setup`,[e,t,n,r,u,P,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","warn",3,"click"]]},template:function(t,n){t&1&&H(0,Qe,7,6,"div",7),t&2&&N(n.state()!=="unknown"?0:-1)},dependencies:[j,V,B,W,Ae],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 Ye=()=>({standalone:!0});function Ze(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t),a(),b(t)}}function et(l,e){if(l&1){let t=M();i(0,"spk-option",51),p("click",function(){let r=g(t).$implicit,u=d();return C(u.pauseSettings.controls.timeType.setValue(r.value))}),f(1),o()}if(l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function tt(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function nt(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}var h=new $e,Ue=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],ze=[{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`}],Z=class l{#e=S(ke);#i=S(z);#t=S(U);#n=S(F);#o=S(Oe);#r=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=E("list");langCtrl=E(this.#r);remoteControlStatus=this.#n.status;settingsForm=h.group({pauseSettings:h.group({time:h.control(0),timeType:h.control("s")}),usageStatistics:h.control(""),updateChannel:h.control("")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=X(()=>{let e=this.langCtrl();return e?K.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):K});usageStatisticsOptions=E(ze);timeTypeOptions=E(Ue);timeOptions=xe([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],me(Te(([e,t])=>{let n=this.#l(e);return t!==null?n.filter(r=>r.toString().includes(t.toString())):n}),v([])));#l(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((n,r)=>r)}ngOnInit(){this.getServerSettings()}saveLocale(e){this.#o.setItem("locale",e),window.location.reload()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#t.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],n=t.slice(-1),r=t.slice(0,-1),u=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(r==""?"0":r),timeType:u.includes(n)?n:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(){let e=this;return()=>{let t=e.langCtrl();return t?K.find(n=>n.value===t)?.label??null:null}}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:Ue.find(n=>n.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:ze.find(n=>n.value===t)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-settings"]],decls:106,vars:17,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Save changes`;let r;r=$localize`Remote access control`;let u;u=$localize`Pause after startup or hibernation`;let P;P=$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 I;I=$localize`Color theme`;let T;T=$localize`Customize your application theme`;let ee;ee=$localize`Language`;let te;te=$localize`Select a language for the platform`;let ne;ne=$localize`Update channel`;let ie;ie=$localize`Update channel selection is not implemented yet.`;let oe;oe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) ${"\uFFFD#65\uFFFD\uFFFD/#65\uFFFD"}:TAG_INPUT:`;let re;re=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let le;le=$localize` Stable ${"\uFFFD#71\uFFFD\uFFFD/#71\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize`Official releases`;let se;se=$localize` Beta ${"\uFFFD#77\uFFFD\uFFFD/#77\uFFFD"}:TAG_INPUT:`;let _e;_e=$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 ue;ue=$localize` Experimental ${"\uFFFD#83\uFFFD\uFFFD/#83\uFFFD"}:TAG_INPUT:`;let pe;pe=$localize`Specific builds for developers only. Not for use with important data.`;let ce;ce=$localize` Canary ${"\uFFFD#89\uFFFD\uFFFD/#89\uFFFD"}:TAG_INPUT:`;let de;de=$localize`Individual builds for developers only. Not for use with important data.`;let Se;Se=$localize`Usage statistics`;let A;return A=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#98\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#98\uFFFD"}:CLOSE_LINK:${"[\uFFFD#99\uFFFD\uFFFD/#99\uFFFD|\uFFFD#100\uFFFD\uFFFD/#100\uFFFD]"}:LINE_BREAK:${"[\uFFFD#99\uFFFD\uFFFD/#99\uFFFD|\uFFFD#100\uFFFD\uFFFD/#100\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. `,A=Ee(A),[e,t,n,r,u,P,I,T,ee,te,ne,ie,oe,re,le,ae,se,_e,ue,pe,ce,de,Se,A,[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[3,"click","value"]]},template:function(t,n){if(t&1&&(c(0,"app-status-bar"),i(1,"form",24),p("submit",function(){return n.submit()}),i(2,"header")(3,"div",25)(4,"h2"),s(5,0),o(),i(6,"p"),s(7,1),o()(),i(8,"button",26),s(9,2),o()(),i(10,"section")(11,"div",27)(12,"h3"),s(13,3),o(),i(14,"p"),f(15),o()(),i(16,"div",28),c(17,"app-remote-control"),o()(),i(18,"section")(19,"div",27)(20,"h3"),s(21,4),o(),i(22,"p"),s(23,5),o()(),i(24,"div",28)(25,"div",29)(26,"spk-select",30),c(27,"input",31),$(28,Ze,2,2,"spk-option",32,y),o(),i(30,"spk-select",33),c(31,"input",34),$(32,et,2,2,"spk-option",32,y),o()()()(),i(34,"section")(35,"div",27)(36,"h3"),s(37,6),o(),i(38,"p"),s(39,7),o()(),i(40,"div",28)(41,"div",35)(42,"img",36),p("click",function(){return n.setLightMode()}),o(),i(43,"img",37),p("click",function(){return n.setDarkMode()}),o()()()(),i(44,"section")(45,"div",27)(46,"h3"),s(47,8),o(),i(48,"p"),s(49,9),o()(),i(50,"div",28)(51,"spk-select",38),p("change",function(u){return n.saveLocale(u)}),i(52,"input",39),x("ngModelChange",function(u){return w(n.langCtrl,u)||(n.langCtrl=u),u}),o(),$(53,tt,2,2,"spk-option",32,y),o()()(),i(55,"section")(56,"div",27)(57,"h3"),s(58,10),o(),i(59,"p"),s(60,11),o()(),i(61,"div",40)(62,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("")}),i(63,"spk-radio",42),O(64,12),c(65,"input",43),R(),o(),i(66,"p"),s(67,13),o()(),i(68,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("stable")}),i(69,"spk-radio",42),O(70,14),c(71,"input",44),R(),o(),i(72,"p"),s(73,15),o()(),i(74,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("beta")}),i(75,"spk-radio",42),O(76,16),c(77,"input",45),R(),o(),i(78,"p"),s(79,17),o()(),i(80,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("experimental")}),i(81,"spk-radio",42),O(82,18),c(83,"input",46),R(),o(),i(84,"p"),s(85,19),o()(),i(86,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("canary")}),i(87,"spk-radio",42),O(88,20),c(89,"input",47),R(),o(),i(90,"p"),s(91,21),o()()()(),i(92,"section")(93,"div",27)(94,"h3"),s(95,22),o(),i(96,"p"),O(97,23),c(98,"a",48)(99,"br")(100,"br"),R(),o()(),i(101,"div",28)(102,"spk-select",49),c(103,"input",50),$(104,nt,2,2,"spk-option",32,y),o()()()()),t&2){let r,u;a(),m("formGroup",n.settingsForm),a(14),b(n.remoteControlStatus()),a(11),m("hideClearButton",!0),a(2),G(n.timeOptions()),a(2),m("displayFn",n.typeDisplay())("hideClearButton",!0),a(2),G(n.timeTypeOptions()),a(10),J("active",!n.isDarkMode()),a(),J("active",n.isDarkMode()),a(8),m("displayFn",n.languageDisplay())("hideClearButton",!0),a(),k("ngModel",n.langCtrl),m("ngModelOptions",fe(16,Ye)),a(),G(n.languageOptions()),a(12),Q((r=n.sysinfo())==null?null:r.DefaultUpdateChannel),Y(64),a(2),Q((u=n.sysinfo())==null?null:u.ServerVersionType),Y(67),a(35),m("displayFn",n.usageDisplay()),a(2),G(n.usageStatisticsOptions())}},dependencies:[j,Fe,V,he,B,Re,W,Ge,Pe,ye,Ie,we,q,De,be,ve,Le],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}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%] .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%}.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}"],changeDetection:0})};export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I}from"./chunk-
|
|
1
|
+
import{a as I}from"./chunk-27GCJTV5.js";import{n as g}from"./chunk-5PPKS4ML.js";import"./chunk-G6GQ2MDC.js";import"./chunk-DNHLTHLR.js";import"./chunk-3NZI2UZ4.js";import{b as k}from"./chunk-KFGIVU27.js";import{a as N}from"./chunk-EUZXGGH4.js";import"./chunk-7TWD5GBS.js";import{n as $,o as M,s as b}from"./chunk-ED3PEZLO.js";import{a as O}from"./chunk-AKLJ23OZ.js";import{H as P,L as h,Y as E,Z as B}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as D,B as m,Eb as s,Fb as p,Gb as n,Mc as A,Qb as d,Ra as r,Rb as c,X as F,fb as f,lb as C,qc as R,tc as _,vb as u}from"./chunk-MR4RE3IB.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=F(P);#e=F(g);#a=F(N);#i=F(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(l=>l.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 l;return l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,l,["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,M,b,$],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:hidden}"],changeDetection:0})};export{T as default};
|
package/index.html
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
<style>:root{--font-size:16px;font-size:var(--font-size)}html body{--sparkle-light:initial;--sparkle-dark: ;color-scheme:light dark;--primary-50:#eff6ff;--primary-rgb-50:239,246,255;--primary-contrast-50:var(--dark-primary-text);--primary-100:#dbeafe;--primary-rgb-100:219,234,254;--primary-contrast-100:var(--dark-primary-text);--primary-200:#bfdbfe;--primary-rgb-200:191,219,254;--primary-contrast-200:var(--dark-primary-text);--primary-300:#93c5fd;--primary-rgb-300:147,197,253;--primary-contrast-300:var(--dark-primary-text);--primary-400:#60a5fa;--primary-rgb-400:96,165,250;--primary-contrast-400:var(--dark-primary-text);--primary-500:#3b82f6;--primary-rgb-500:59,130,246;--primary-contrast-500:var(--light-primary-text);--primary-600:#2563eb;--primary-rgb-600:37,99,235;--primary-contrast-600:var(--light-primary-text);--primary-700:#1d4ed8;--primary-rgb-700:29,78,216;--primary-contrast-700:var(--light-primary-text);--primary-800:#1e40af;--primary-rgb-800:30,64,175;--primary-contrast-800:var(--light-primary-text);--primary-900:#1e3a8a;--primary-rgb-900:30,58,138;--primary-contrast-900:var(--light-primary-text);--primary-950:#172554;--primary-rgb-950:23,37,84;--primary-contrast-950:var(--light-primary-text);--accent-50:#f5f3ff;--accent-rgb-50:245,243,255;--accent-contrast-50:var(--dark-primary-text);--accent-100:#ede9fe;--accent-rgb-100:237,233,254;--accent-contrast-100:var(--dark-primary-text);--accent-200:#ddd6fe;--accent-rgb-200:221,214,254;--accent-contrast-200:var(--dark-primary-text);--accent-300:#c4b5fd;--accent-rgb-300:196,181,253;--accent-contrast-300:var(--dark-primary-text);--accent-400:#a78bfa;--accent-rgb-400:167,139,250;--accent-contrast-400:var(--dark-primary-text);--accent-500:#8b5cf6;--accent-rgb-500:139,92,246;--accent-contrast-500:var(--light-primary-text);--accent-600:#7c3aed;--accent-rgb-600:124,58,237;--accent-contrast-600:var(--light-primary-text);--accent-700:#6d28d9;--accent-rgb-700:109,40,217;--accent-contrast-700:var(--light-primary-text);--accent-800:#5b21b6;--accent-rgb-800:91,33,182;--accent-contrast-800:var(--light-primary-text);--accent-900:#4c1d95;--accent-rgb-900:76,29,149;--accent-contrast-900:var(--light-primary-text);--accent-950:#2e1065;--accent-rgb-950:46,16,101;--accent-contrast-950:var(--light-primary-text);--tertiary-50:#fffbeb;--tertiary-rgb-50:255,251,235;--tertiary-contrast-50:var(--dark-primary-text);--tertiary-100:#fef3c7;--tertiary-rgb-100:254,243,199;--tertiary-contrast-100:var(--dark-primary-text);--tertiary-200:#fde68a;--tertiary-rgb-200:253,230,138;--tertiary-contrast-200:var(--dark-primary-text);--tertiary-300:#fcd34d;--tertiary-rgb-300:252,211,77;--tertiary-contrast-300:var(--dark-primary-text);--tertiary-400:#fbbf24;--tertiary-rgb-400:251,191,36;--tertiary-contrast-400:var(--light-primary-text);--tertiary-500:#f59e0b;--tertiary-rgb-500:245,158,11;--tertiary-contrast-500:var(--light-primary-text);--tertiary-600:#d97706;--tertiary-rgb-600:217,119,6;--tertiary-contrast-600:var(--light-primary-text);--tertiary-700:#b45309;--tertiary-rgb-700:180,83,9;--tertiary-contrast-700:var(--light-primary-text);--tertiary-800:#92400e;--tertiary-rgb-800:146,64,14;--tertiary-contrast-800:var(--light-primary-text);--tertiary-900:#78350f;--tertiary-rgb-900:120,53,15;--tertiary-contrast-900:var(--light-primary-text);--tertiary-950:#451a03;--tertiary-rgb-950:69,26,3;--tertiary-contrast-950:var(--light-primary-text);--grey-50:#fafafa;--grey-rgb-50:250,250,250;--grey-contrast-50:var(--dark-primary-text);--grey-100:#f4f4f5;--grey-rgb-100:244,244,245;--grey-contrast-100:var(--dark-primary-text);--grey-200:#e4e4e7;--grey-rgb-200:228,228,231;--grey-contrast-200:var(--dark-primary-text);--grey-300:#d4d4d8;--grey-rgb-300:212,212,216;--grey-contrast-300:var(--dark-primary-text);--grey-400:#a1a1aa;--grey-rgb-400:161,161,170;--grey-contrast-400:var(--dark-primary-text);--grey-500:#71717a;--grey-rgb-500:113,113,122;--grey-contrast-500:var(--light-primary-text);--grey-600:#52525b;--grey-rgb-600:82,82,91;--grey-contrast-600:var(--light-primary-text);--grey-700:#3f3f46;--grey-rgb-700:63,63,70;--grey-contrast-700:var(--light-primary-text);--grey-750:#2f2f31;--grey-rgb-750:47,47,49;--grey-contrast-750:var(--light-primary-text);--grey-800:#27272a;--grey-rgb-800:39,39,42;--grey-contrast-800:var(--light-primary-text);--grey-900:#18181b;--grey-rgb-900:24,24,27;--grey-contrast-900:var(--light-primary-text);--grey-950:#09090b;--grey-rgb-950:9,9,11;--grey-contrast-950:var(--light-primary-text);--warn-50:#fef2f2;--warn-rgb-50:254,242,242;--warn-contrast-50:var(--dark-primary-text);--warn-100:#fee2e2;--warn-rgb-100:254,226,226;--warn-contrast-100:var(--dark-primary-text);--warn-200:#fecaca;--warn-rgb-200:254,202,202;--warn-contrast-200:var(--dark-primary-text);--warn-300:#fca5a5;--warn-rgb-300:252,165,165;--warn-contrast-300:var(--dark-primary-text);--warn-400:#f87171;--warn-rgb-400:248,113,113;--warn-contrast-400:var(--light-primary-text);--warn-500:#ef4444;--warn-rgb-500:239,68,68;--warn-contrast-500:var(--light-primary-text);--warn-600:#dc2626;--warn-rgb-600:220,38,38;--warn-contrast-600:var(--light-primary-text);--warn-700:#b91c1c;--warn-rgb-700:185,28,28;--warn-contrast-700:var(--light-primary-text);--warn-800:#991b1b;--warn-rgb-800:153,27,27;--warn-contrast-800:var(--light-primary-text);--warn-900:#7f1d1d;--warn-rgb-900:127,29,29;--warn-contrast-900:var(--light-primary-text);--warn-950:#450a0a;--warn-rgb-950:69,10,10;--warn-contrast-950:var(--light-primary-text);--success-50:#ecfdf5;--success-rgb-50:236,253,245;--success-contrast-50:var(--dark-primary-text);--success-100:#d1fae5;--success-rgb-100:209,250,229;--success-contrast-100:var(--dark-primary-text);--success-200:#a7f3d0;--success-rgb-200:167,243,208;--success-contrast-200:var(--dark-primary-text);--success-300:#6ee7b7;--success-rgb-300:110,231,183;--success-contrast-300:var(--dark-primary-text);--success-400:#34d399;--success-rgb-400:52,211,153;--success-contrast-400:var(--light-primary-text);--success-500:#10b981;--success-rgb-500:16,185,129;--success-contrast-500:var(--light-primary-text);--success-600:#059669;--success-rgb-600:5,150,105;--success-contrast-600:var(--light-primary-text);--success-700:#047857;--success-rgb-700:4,120,87;--success-contrast-700:var(--light-primary-text);--success-800:#065f46;--success-rgb-800:6,95,70;--success-contrast-800:var(--light-primary-text);--success-900:#064e3b;--success-rgb-900:6,78,59;--success-contrast-900:var(--light-primary-text);--success-950:#022c22;--success-rgb-950:2,44,34;--success-contrast-950:var(--light-primary-text);--display-10:600 5rem / normal Inter Tight, sans-serif;--display-20:600 4.5rem / normal Inter Tight, sans-serif;--display-30:600 4rem / normal Inter Tight, sans-serif;--display-40:600 3.5rem / normal Inter Tight, sans-serif;--display-50:600 3rem / normal Inter Tight, sans-serif;--title-10:500 2.5rem / normal Inter Tight, sans-serif;--title-20:500 2rem / normal Inter Tight, sans-serif;--title-30:500 1.5rem / normal Inter Tight, sans-serif;--title-10B:600 2.5rem / normal Inter Tight, sans-serif;--title-20B:600 2rem / normal Inter Tight, sans-serif;--title-30B:600 1.5rem / normal Inter Tight, sans-serif;--paragraph-10:500 1.125rem / normal Inter Tight, sans-serif;--paragraph-20:500 1rem / normal Inter Tight, sans-serif;--paragraph-30:500 .875rem / normal Inter Tight, sans-serif;--paragraph-40:500 .75rem / normal Inter Tight, sans-serif;--paragraph-10B:600 1.125rem / normal Inter Tight, sans-serif;--paragraph-20B:600 1rem / normal Inter Tight, sans-serif;--paragraph-30B:600 .875rem / normal Inter Tight, sans-serif;--paragraph-40B:600 .75rem / normal Inter Tight, sans-serif;--shape-1:.25rem;--shape-2:.5rem;--shape-3:.75rem;--shape-4:1rem;--shape-5:1.25rem;--box-shadow-10:0 1px 2px 0 rgba(18, 18, 23, .07);--box-shadow-20:0 1px 3px 0 rgba(18, 18, 23, .1);--box-shadow-30:0 1px 4px -1px rgba(18, 18, 23, .08);--box-shadow-35:0 4px 6px -1px rgba(18, 18, 23, .08);--box-shadow-40:0 10px 15px -3px rgba(18, 18, 23, .08);--box-shadow-50:0 20px 25px -5px rgba(18, 18, 23, .1);--box-shadow-60:0 25px 50px -12px rgba(18, 18, 23, .25);--base-level-10:var(--sparkle-light, #fff) var(--sparkle-dark, var(--grey-950));--base-level-20:var(--sparkle-light, var(--grey-50)) var(--sparkle-dark, var(--grey-900));--base-level-30:var(--sparkle-light, var(--grey-100)) var(--sparkle-dark, var(--grey-900));--base-level-30R:var(--sparkle-light, var(--grey-900)) var(--sparkle-dark, var(--grey-100));--base-level-40:var(--sparkle-light, var(--grey-200)) var(--sparkle-dark, var(--grey-700));--base-level-50:var(--sparkle-light, var(--grey-300)) var(--sparkle-dark, var(--grey-800));--base-level-60:var(--sparkle-light, var(--grey-500)) var(--sparkle-dark, var(--grey-400));--base-level-60R:var(--sparkle-light, var(--grey-400)) var(--sparkle-dark, var(--grey-500));--base-level-70:var(--sparkle-light, var(--grey-900)) var(--sparkle-dark, #fff);--base-level-70R:var(--sparkle-light, #fff) var(--sparkle-dark, var(--grey-900));--base-gradient-20:linear-gradient(180deg, var(--grey-400) 0%, var(--grey-500) 50%);--base-gradient-30:linear-gradient(180deg, var(--grey-300) 0%, var(--grey-500) 50%);--base-gradient-60:linear-gradient(180deg, var(--grey-700) 0%, var(--grey-900) 50%);--base-gradient-70:linear-gradient(180deg, var(--grey-600) 0%, var(--grey-900) 50%);--primary-level-20:var(--sparkle-light, var(--primary-50)) var(--sparkle-dark, var(--primary-950));--primary-level-30:var(--sparkle-light, var(--primary-100)) var(--sparkle-dark, var(--primary-900));--primary-level-40:var(--sparkle-light, var(--primary-200)) var(--sparkle-dark, var(--primary-800));--primary-level-50:var(--sparkle-light, var(--primary-300)) var(--sparkle-dark, var(--primary-800));--primary-level-50R:var(--sparkle-light, var(--primary-800)) var(--sparkle-dark, var(--primary-300));--primary-level-80:var(--sparkle-light, var(--primary-900)) var(--sparkle-dark, var(--primary-300));--primary-gradient-20:linear-gradient(180deg, var(--primary-400) 0%, var(--primary-500) 50%);--primary-gradient-30:linear-gradient(180deg, var(--primary-300) 0%, var(--primary-500) 50%);--accent-level-20:var(--sparkle-light, var(--accent-50)) var(--sparkle-dark, var(--accent-950));--accent-level-30:var(--sparkle-light, var(--accent-100)) var(--sparkle-dark, var(--accent-900));--accent-level-40:var(--sparkle-light, var(--accent-200)) var(--sparkle-dark, var(--accent-800));--accent-level-50:var(--sparkle-light, var(--accent-300)) var(--sparkle-dark, var(--accent-800));--accent-level-50R:var(--sparkle-light, var(--accent-800)) var(--sparkle-dark, var(--accent-300));--accent-level-80:var(--sparkle-light, var(--accent-900)) var(--sparkle-dark, var(--accent-300));--accent-gradient-20:linear-gradient(180deg, var(--accent-400) 0%, var(--accent-500) 50%);--accent-gradient-30:linear-gradient(180deg, var(--accent-300) 0%, var(--accent-500) 50%);--tertiary-level-20:var(--sparkle-light, var(--tertiary-50)) var(--sparkle-dark, var(--tertiary-950));--tertiary-level-30:var(--sparkle-light, var(--tertiary-100)) var(--sparkle-dark, var(--tertiary-900));--tertiary-level-40:var(--sparkle-light, var(--tertiary-200)) var(--sparkle-dark, var(--tertiary-800));--tertiary-level-50:var(--sparkle-light, var(--tertiary-300)) var(--sparkle-dark, var(--tertiary-800));--tertiary-level-50R:var(--sparkle-light, var(--tertiary-800)) var(--sparkle-dark, var(--tertiary-300));--tertiary-level-80:var(--sparkle-light, var(--tertiary-900)) var(--sparkle-dark, var(--tertiary-300));--tertiary-gradient-20:linear-gradient(180deg, var(--tertiary-400) 0%, var(--tertiary-500) 50%);--tertiary-gradient-30:linear-gradient(180deg, var(--tertiary-300) 0%, var(--tertiary-500) 50%);--warn-level-20:var(--sparkle-light, var(--warn-50)) var(--sparkle-dark, var(--warn-950));--warn-level-30:var(--sparkle-light, var(--warn-100)) var(--sparkle-dark, var(--warn-900));--warn-level-40:var(--sparkle-light, var(--warn-200)) var(--sparkle-dark, var(--warn-800));--warn-level-50:var(--sparkle-light, var(--warn-300)) var(--sparkle-dark, var(--warn-800));--warn-level-50R:var(--sparkle-light, var(--warn-800)) var(--sparkle-dark, var(--warn-300));--warn-level-80:var(--sparkle-light, var(--warn-900)) var(--sparkle-dark, var(--warn-300));--warn-gradient-20:linear-gradient(180deg, var(--warn-400) 0%, var(--warn-500) 50%);--warn-gradient-30:linear-gradient(180deg, var(--warn-300) 0%, var(--warn-500) 50%);--success-level-20:var(--sparkle-light, var(--success-50)) var(--sparkle-dark, var(--success-950));--success-level-30:var(--sparkle-light, var(--success-100)) var(--sparkle-dark, var(--success-900));--success-level-40:var(--sparkle-light, var(--success-200)) var(--sparkle-dark, var(--success-800));--success-level-50:var(--sparkle-light, var(--success-300)) var(--sparkle-dark, var(--success-800));--success-level-50R:var(--sparkle-light, var(--success-800)) var(--sparkle-dark, var(--success-300));--success-level-80:var(--sparkle-light, var(--success-900)) var(--sparkle-dark, var(--success-300));--success-gradient-20:linear-gradient(180deg, var(--success-400) 0%, var(--success-500) 50%);--success-gradient-30:linear-gradient(180deg, var(--success-300) 0%, var(--success-500) 50%);--dark-primary-text:var(--grey-900);--light-primary-text:#fff}*{box-sizing:border-box}html,body,app-root{width:100vw;min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--base-level-20)}body{margin:0;font:var(--paragraph-30);color:var(--base-level-70)}</style><link rel="stylesheet" href="styles-DO5TEHSB.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-DO5TEHSB.css"></noscript></head>
|
|
21
21
|
<body>
|
|
22
22
|
<app-root></app-root>
|
|
23
|
-
<link rel="modulepreload" href="chunk-N35HGIXN.js"><link rel="modulepreload" href="chunk-3NZI2UZ4.js"><link rel="modulepreload" href="chunk-KFGIVU27.js"><link rel="modulepreload" href="chunk-KL64745B.js"><link rel="modulepreload" href="chunk-6M3MNJ52.js"><link rel="modulepreload" href="chunk-ED3PEZLO.js"><link rel="modulepreload" href="chunk-AKLJ23OZ.js"><link rel="modulepreload" href="chunk-J3H4BCHI.js"><link rel="modulepreload" href="chunk-P6LV5I2K.js"><link rel="modulepreload" href="chunk-5XX7BU4I.js"><script src="polyfills-DUGKNACR.js" type="module"></script><script src="main-
|
|
23
|
+
<link rel="modulepreload" href="chunk-N35HGIXN.js"><link rel="modulepreload" href="chunk-3NZI2UZ4.js"><link rel="modulepreload" href="chunk-KFGIVU27.js"><link rel="modulepreload" href="chunk-KL64745B.js"><link rel="modulepreload" href="chunk-6M3MNJ52.js"><link rel="modulepreload" href="chunk-ED3PEZLO.js"><link rel="modulepreload" href="chunk-AKLJ23OZ.js"><link rel="modulepreload" href="chunk-J3H4BCHI.js"><link rel="modulepreload" href="chunk-P6LV5I2K.js"><link rel="modulepreload" href="chunk-5XX7BU4I.js"><script src="polyfills-DUGKNACR.js" type="module"></script><script src="main-CTK3HJBN.js" type="module"></script></body>
|
|
24
24
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as se,c as ie}from"./chunk-N35HGIXN.js";import{a as L}from"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import{a as T}from"./chunk-KL64745B.js";import{a as v}from"./chunk-6M3MNJ52.js";import{c as ne}from"./chunk-ED3PEZLO.js";import{c as oe}from"./chunk-AKLJ23OZ.js";import{L as Y,X as I,ca as ee,ma as te}from"./chunk-J3H4BCHI.js";import{a as Q}from"./chunk-P6LV5I2K.js";import{a as B,b as q,d as _,e as X,f as Z}from"./chunk-5XX7BU4I.js";import{b as re}from"./chunk-OVIL3KMN.js";import{ua as z}from"./chunk-5ZK3D2RS.js";import{Bc as G,Cc as K,E as R,Gb as J,J as W,L as S,Mc as $,N as H,R as y,U,X as s,Za as c,d as j,fb as D,g as P,ja as F,m as E,x as O,y as N}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var d=class t{#o=c(null);#n=window.self!==window.top;config=this.#o.asReadonly();configLoaded=this.#n?new P:null;isLoading=c(this.#n);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let o=e.data.replace("access:",""),n=JSON.parse(o);if(!n?.accessToken||!n?.clientId){this.#e("error:invalid-config");return}if(typeof n.clientId!="string"){this.#e("error:invalid-config");return}if(typeof n.accessToken!="string"){this.#e("error:invalid-config");return}console.info("postMessage config set"),this.#o.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#i(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};var M=class t{#o=s(v);#n=s(d);ngOnInit(){this.#n.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=D({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&J(0,"router-outlet")},dependencies:[Y],encapsulation:2})};var ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var u=new U("ENVIRONMENT");var b=class t{#o=s(oe);isLoaded=c(!1);webmodules=c(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(H(n=>this.webmodules.set(n)),R(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};var ue=()=>{let t=s(d),e=s(F);return t.configLoaded===null?O([e.get(L).preload(!0),e.get(b).preload(!0)]):t.configLoaded?.pipe(S(()=>O([e.get(L).preload(!0),e.get(b).preload(!0)])))},pe=[{path:"",children:[{path:"login",canActivate:[()=>s(T).token()!==null?s(I).navigate(["/"]):!0],loadComponent:()=>import("./chunk-FCHQLLN2.js")},{path:"logout",loadComponent:()=>import("./chunk-XGN4FDKH.js")},{path:"",canActivate:[ue],loadComponent:()=>import("./chunk-MXEBWT5C.js"),children:[{path:"",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{b as se,c as ie}from"./chunk-N35HGIXN.js";import{a as L}from"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import{a as T}from"./chunk-KL64745B.js";import{a as v}from"./chunk-6M3MNJ52.js";import{c as ne}from"./chunk-ED3PEZLO.js";import{c as oe}from"./chunk-AKLJ23OZ.js";import{L as Y,X as I,ca as ee,ma as te}from"./chunk-J3H4BCHI.js";import{a as Q}from"./chunk-P6LV5I2K.js";import{a as B,b as q,d as _,e as X,f as Z}from"./chunk-5XX7BU4I.js";import{b as re}from"./chunk-OVIL3KMN.js";import{ua as z}from"./chunk-5ZK3D2RS.js";import{Bc as G,Cc as K,E as R,Gb as J,J as W,L as S,Mc as $,N as H,R as y,U,X as s,Za as c,d as j,fb as D,g as P,ja as F,m as E,x as O,y as N}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var d=class t{#o=c(null);#n=window.self!==window.top;config=this.#o.asReadonly();configLoaded=this.#n?new P:null;isLoading=c(this.#n);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let o=e.data.replace("access:",""),n=JSON.parse(o);if(!n?.accessToken||!n?.clientId){this.#e("error:invalid-config");return}if(typeof n.clientId!="string"){this.#e("error:invalid-config");return}if(typeof n.accessToken!="string"){this.#e("error:invalid-config");return}console.info("postMessage config set"),this.#o.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#i(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};var M=class t{#o=s(v);#n=s(d);ngOnInit(){this.#n.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=D({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&J(0,"router-outlet")},dependencies:[Y],encapsulation:2})};var ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var u=new U("ENVIRONMENT");var b=class t{#o=s(oe);isLoaded=c(!1);webmodules=c(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(H(n=>this.webmodules.set(n)),R(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};var ue=()=>{let t=s(d),e=s(F);return t.configLoaded===null?O([e.get(L).preload(!0),e.get(b).preload(!0)]):t.configLoaded?.pipe(S(()=>O([e.get(L).preload(!0),e.get(b).preload(!0)])))},pe=[{path:"",children:[{path:"login",canActivate:[()=>s(T).token()!==null?s(I).navigate(["/"]):!0],loadComponent:()=>import("./chunk-FCHQLLN2.js")},{path:"logout",loadComponent:()=>import("./chunk-XGN4FDKH.js")},{path:"",canActivate:[ue],loadComponent:()=>import("./chunk-MXEBWT5C.js"),children:[{path:"",loadComponent:()=>import("./chunk-6HO4XDHH.js")},{path:"add-backup",loadComponent:()=>import("./chunk-OQEYKIKK.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-4237W7DB.js")},{path:"backup/import",loadComponent:()=>import("./chunk-MTJ4JC4K.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-YWKLDO7P.js"),loadChildren:()=>import("./chunk-ZF4CSRRV.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-YWKLDO7P.js"),loadChildren:()=>import("./chunk-ZF4CSRRV.js")},{path:"restore",loadComponent:()=>import("./chunk-2HOCLZ5J.js")},{path:"restore-flow/:id",loadComponent:()=>import("./chunk-TCGNOPWE.js"),children:[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"select-files",loadComponent:()=>import("./chunk-57XJ32TF.js")},{path:"options",loadComponent:()=>import("./chunk-QLN75PFG.js")}]},{path:"settings",loadComponent:()=>import("./chunk-P7FSPM3M.js")},{path:"about",loadComponent:()=>import("./chunk-ZVU4LS6E.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-6CG2PO47.js")},{path:"changelog",loadComponent:()=>import("./chunk-66TOS62R.js")},{path:"libraries",loadComponent:()=>import("./chunk-UYK4G7KS.js")},{path:"system-info",loadComponent:()=>import("./chunk-ARZ3SWC2.js")},{path:"logs",loadComponent:()=>import("./chunk-LTYC3AYW.js")}]}]}]}];var k=null,ce=(t,e)=>{let o=s(T),n=s(I),l=s(v),i=s(u),f=s(ne),r=l.getItem("locale"),p=se(r),h=t;if(o.token()&&t.url.startsWith(i.baseUrl)){let a=t.headers.set("Authorization",`Bearer ${o.token()}`);r&&r!=="en-US"&&(a=a.set("X-Ui-Language",p)),h=t.clone({headers:a})}return e(h).pipe(N(a=>{if(f.error(a.message),a.status===401&&!k&&(k=o.refreshToken().pipe(W())),a.status===401)return k.pipe(S(()=>e(t.clone({headers:t.headers.set("Authorization",`Bearer ${o.token()}`)}))),N(g=>(n.navigate(["/logout"]),E(()=>g))),R(()=>k=null));let m=`Error Code: ${a.status}, Message: ${a.message}`;return E(()=>({error:a,message:m}))}))};var fe="1.0.0",le="portal-proxy-client",he=1,A=class t{#o=1e3;#n=s(u);#e=c("disconnected");#i=c(this.#o);#a=c(!1);#r=c(!1);#p=c(null);isConnectedToMachineServer=this.#r.asReadonly();wsState=this.#e.asReadonly();#c=[];#s={};#t=null;#m=new TextDecoder("utf-8");#l=null;#d=$(()=>{let e=this.#a(),o=this.#i(),n=this.#p();if(!n||!e||!o||o<this.#o){this.#l&&window.clearInterval(this.#l);return}this.#l=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(e){let o=Uint8Array.from(atob(e),l=>l.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(e,o){let n=o?.reconnect??!1;this.#t&&this.wsState()==="authenticated"&&!n||(this.#t&&this.wsState()!=="authenticated"&&this.#t.close(),this.#t=new WebSocket(this.#n.machineServerUrl),this.#t.onopen=()=>{this.#e.set("connect"),this.#r.set(!0),this.#a.set(!1),this.#p.set(null)},this.#t.onclose=()=>{this.#e.set("disconnected"),this.#r.set(!1),this.#p.set(e),this.#a.set(!0)},this.#t.onerror=()=>{this.#e.set("error")},this.#t.onmessage=l=>{let i=JSON.parse(l.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let r={token:e,publicKey:"",clientVersion:fe,protocolVersion:he},p=this.createResponse(i,"authportal",r);this.#e.set("welcome"),this.#t?.send(p)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var f=JSON.parse(i.payload??"");if(f.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#e.set("authenticated"),this.#r.set(!0);this.#c.length>0;){let r=this.#c.pop();r&&this.#s[r.messageId]&&this.activateCommand(r)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let r=this.#s[i.messageId];if(r){if(i.errorMessage){r.reject(i.errorMessage);return}else{let p=JSON.parse(i.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),r.resolve(p)}delete this.#s[i.messageId],window.clearTimeout(r.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#t?.close(),this.#t=null,this.#e.set("disconnected"),this.#r.set(!1)}createResponse(e,o,n){let l={from:le,to:e.from,type:o,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(l)}sendCommand(e,o,n,l,i,f,r=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((p,h)=>{let a=crypto.randomUUID(),g={from:le,to:o,type:"command",messageId:a,payload:JSON.stringify({method:n,path:l,body:i,headers:f})},C={resolve:p,reject:h,timer:window.setTimeout(()=>{let w=this.#s[a];w&&(delete this.#s[a],w.reject("Timeout"))},r)};this.#s[a]=C,this.#r()?this.activateCommand(g):this.#c.push(g)})}activateCommand(e){this.#t?.send(JSON.stringify(e))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};function ge(t){if(typeof t!="string")return null;let o=new TextEncoder().encode(t);return window.btoa(String.fromCharCode(...o))}var me=(t,e)=>{let n=s(d).config(),l=s(u);if(n===null)return e(t);let i=s(A),f=ge(t.body),r={};t.headers.keys().forEach(m=>{r[m]=t.headers.get(m)??""});let p=t.headers.get("timeout"),h=p!==null?parseInt(p):l.defaultTimeout,a=i.sendCommand(n.accessToken,n.clientId,t.method,t.url,f,r,h);return new j(m=>{a.then(g=>{let C=new B;r!=null&&Object.keys(r).forEach(V=>{C.set(V,r[V])});let w=new q({body:g.body,status:g.code,statusText:"OK",headers:C});m.next(w),m.complete()})})};var de={providers:[G(),ee(pe,te()),_(Z(),X([me,ce])),v,{provide:u,useValue:ae},{provide:K,useValue:ie()},re,z]};Q(M,de);
|
package/package.json
CHANGED
package/chunk-XVJY4Y25.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as L}from"./chunk-EUZXGGH4.js";import{n as w}from"./chunk-ED3PEZLO.js";import{a as M,b as x}from"./chunk-AKLJ23OZ.js";import{a as G}from"./chunk-OVIL3KMN.js";import{Ab as E,E as g,Eb as r,Fb as o,Gb as R,Kc as p,L as b,Mc as P,R as B,Ra as u,Sb as f,X as l,Xb as _,Za as i,fb as A,ib as I,ic as h,l as T,lb as D,lc as k,p as C,vb as y,vc as N,wc as O}from"./chunk-MR4RE3IB.js";import{a as d,b as S}from"./chunk-C6Q5SG76.js";var c=class a{#t=l(G);transform(t,...e){return console.log(t),console.log(this.#t.hello),this.#t.locale(),this.#t(t).fromNow()}static \u0275fac=function(e){return new(e||a)};static \u0275pipe=I({name:"appRelativeTime",type:a,pure:!0})};var m=class a{#t=1e3;#d=l(x);#o=l(M);#n=l(L);#e=i(!1);#i=i(!1);#u=i(this.#t);#p=i(null);#l=i(!1);#s=i(!1);#a=i(null);#S=i(!1);statusData=this.#p.asReadonly();serverState=p(()=>{let t=this.#a();return t?(t.ProposedSchedule=t?.ProposedSchedule?.map(e=>{let s=e.Item1?this.#n.getBackupById(e.Item1):null;return S(d({},e),{backup:s})}),t):null});isFetching=this.#i.asReadonly();#r=null;#g=P(()=>{let t=this.#e(),e=this.#u();if(!t||!e||e<this.#t){this.#r&&window.clearInterval(this.#r);return}this.#r=window.setInterval(()=>{this.#m()},e)});start(){this.#l.set(!0),this.#c()}stop(){this.#l.set(!1)}startPollingProgress(){this.#m(),this.#e.set(!0)}stopPollingProgress(){this.#e.set(!1)}setProgressStatePollingInterval(t){if(t<this.#t){console.error(`Polling interval must be at least ${this.#t}ms`);return}this.#u.set(t)}serverStateEffect=P(()=>{if(this.#S()){this.stopPollingProgress();return}!this.#s()&&this.#l()?setTimeout(()=>{this.startPollingProgress(),this.#c()},1e3):this.stopPollingProgress()});#c(){if(this.#s())return;this.#s.set(!0);let t=this.#a()?.LastEventID,e=t==null?{}:{lastEventId:t,longpoll:!0,duration:"299s"};this.#o.getApiV1Serverstate(e).pipe(g(()=>this.#s.set(!1))).subscribe({next:s=>{this.#a()?.LastDataUpdateID!==s.LastDataUpdateID&&this.#n.getBackups(),this.#a.set(s)}})}#m(){this.#i.set(!0),this.#d.getApiV1Progressstate().pipe(b(t=>{let e=t.TaskID??null;return e===null?T(t):this.#o.getApiV1TaskByTaskid({taskid:e}).pipe(C(s=>S(d({},t),{task:s??null})))}),g(()=>this.#i.set(!1))).subscribe({next:t=>{let e=t.TaskID??null,s=t.BackupID??null;if(e!==null&&s!==null){let n=this.#n.getBackupById(s);t.backup=n}t.task?.Status==="Completed"?this.#e.set(!1):this.#e.set(!0),this.#p.set(t)},error:t=>{t.status===404&&this.#e.set(!1)}})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=B({token:a,factory:a.\u0275fac,providedIn:"root"})};function V(a,t){if(a&1&&(r(0,"div",4),h(1),o(),R(2,"spk-progress-bar",5)),a&2){let e,s,n=_();u(),k("",(e=n.statusData())==null||e.task==null?null:e.task.Status," - ",(e=n.statusData())==null||e.backup==null||e.backup.Backup==null?null:e.backup.Backup.Name,""),u(),y("value",(s=n.statusData())!=null&&s.OverallProgress?((s=n.statusData())==null?null:s.OverallProgress)*100:3)}}function j(a,t){if(a&1&&(r(0,"div",4),h(1),N(2,"appRelativeTime"),o()),a&2){let e,s=_();u(),k("",(e=s.nextBackup().backup)==null||e.Backup==null?null:e.Backup.Name," - ",O(2,2,s.nextBackup().time),"")}}function F(a,t){a&1&&(r(0,"div",4),f(1,0),o())}function X(a,t){a&1&&(r(0,"div",4),f(1,1),o())}var U=new Date,v=class a{#t=l(m);minsAgo=U.setMinutes(U.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;nextBackup=p(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#t.start()}ngOnDestroy(){this.#t.stop()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=A({type:a,selectors:[["app-status-bar"]],decls:6,vars:1,consts:()=>{let t;t=$localize`No scheduled tasks`;let e;return e=$localize`Loading...`,[t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"raised","primary",3,"value"]]},template:function(e,s){if(e&1&&(r(0,"div",2)(1,"div",3),D(2,V,3,3)(3,j,3,4,"div",4)(4,F,2,0,"div",4)(5,X,2,0,"div",4),o()()),e&2){let n;u(2),E(!((n=s.statusData())==null||n.task==null)&&n.task.Status&&((n=s.statusData())==null||n.task==null?null:n.task.Status)!=="Completed"?2:s.nextBackup().backup||s.nextBackup().time?3:!s.statusData()||((n=s.statusData())==null||n.task==null?null:n.task.Status)==="Completed"?4:5)}},dependencies:[w,c],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;align-items:center;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{v as a};
|