@duplicati/ngclient 0.0.115 → 0.0.116
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-36ZCEF76.js +1 -0
- package/chunk-3KPWJPKG.js +1 -0
- package/{chunk-Z75HLGYD.js → chunk-7LOECBLM.js} +1 -1
- package/{chunk-E6YEUK4V.js → chunk-B26K7HTR.js} +1 -1
- package/chunk-BYSLHWG6.js +1 -0
- package/{chunk-GXRQHMLN.js → chunk-CRR7DNOY.js} +1 -1
- package/chunk-CVYWOUO3.js +1 -0
- package/chunk-DJYSOUD7.js +3 -0
- package/{chunk-T5U3AMRL.js → chunk-DL56XS75.js} +1 -1
- package/chunk-DMI4A75F.js +1 -0
- package/{chunk-R43XF3RF.js → chunk-ETELPN3O.js} +1 -1
- package/{chunk-JC5OEIB3.js → chunk-FPFUN6JC.js} +2 -2
- package/chunk-G3SK7TBB.js +1 -0
- package/chunk-GM4QKN65.js +1 -0
- package/{chunk-XMYCIQBS.js → chunk-GVTMU7Q2.js} +1 -1
- package/{chunk-QPMF3OND.js → chunk-GWH2WEBY.js} +1 -1
- package/chunk-GZDT4MSC.js +1 -0
- package/{chunk-NDO7MKXC.js → chunk-HTJ5CVNN.js} +1 -1
- package/{chunk-4E7QE6GD.js → chunk-JDSUBKXI.js} +1 -1
- package/chunk-JOIFJV7F.js +1 -0
- package/chunk-JUVUG5N3.js +1 -0
- package/chunk-JYXXSXNP.js +8 -0
- package/{chunk-FTPARAAG.js → chunk-M5CGJUYP.js} +1 -1
- package/chunk-MZ677J6Y.js +1 -0
- package/chunk-PH5P3W5Z.js +1 -0
- package/{chunk-PHPGQ5OC.js → chunk-RG2UOHQD.js} +1 -1
- package/chunk-RI2SWQGS.js +1 -0
- package/chunk-RNSVPE4U.js +1 -0
- package/{chunk-XER6OR26.js → chunk-S24RG6QP.js} +2 -2
- package/chunk-SFSNPREM.js +1 -0
- package/chunk-SOXAVKMK.js +1 -0
- package/chunk-T6SML6VO.js +1 -0
- package/{chunk-KQCGQDTS.js → chunk-UWRVKCWT.js} +3 -3
- package/chunk-W2YH5ADR.js +1 -0
- package/{chunk-GKYC6XK5.js → chunk-WA5HD4WO.js} +1 -1
- package/{chunk-B2RFNJKM.js → chunk-XVGPU3ZE.js} +1 -1
- package/chunk-XWHL2DXG.js +1 -0
- package/{chunk-WFR2V6TK.js → chunk-Y6ZPPRT6.js} +1 -1
- package/{chunk-PVY4CFCN.js → chunk-Y7K42OXA.js} +1 -1
- package/chunk-Z2ISC3PW.js +1 -0
- package/chunk-ZIR6PET2.js +1 -0
- package/index.html +1 -1
- package/main-7GKFJWB5.js +1 -0
- package/package.json +1 -1
- package/chunk-36NW32TN.js +0 -1
- package/chunk-3MWN54TU.js +0 -1
- package/chunk-4WQHUN4Y.js +0 -1
- package/chunk-7T6RGHZV.js +0 -1
- package/chunk-BEA3HPFS.js +0 -1
- package/chunk-BMGMPYWQ.js +0 -1
- package/chunk-CKS3VATQ.js +0 -1
- package/chunk-CW3Y4RRU.js +0 -8
- package/chunk-EBDDRAQ5.js +0 -1
- package/chunk-FAB4IY5W.js +0 -1
- package/chunk-JXQXCHPY.js +0 -3
- package/chunk-K7WOLKTB.js +0 -1
- package/chunk-KRXMGGJO.js +0 -1
- package/chunk-LRF5G4S6.js +0 -1
- package/chunk-NMMRBG2U.js +0 -1
- package/chunk-RU2M6EPT.js +0 -1
- package/chunk-RUGSDKDK.js +0 -1
- package/chunk-RZ6B5C2M.js +0 -1
- package/chunk-UBBFB6RT.js +0 -1
- package/chunk-URYEQA3U.js +0 -1
- package/chunk-XYLMZK7X.js +0 -1
- package/chunk-Y7YR7HTF.js +0 -1
- package/main-U4R24N47.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as W}from"./chunk-CRR7DNOY.js";import{a as K}from"./chunk-BIZAKOYU.js";import{b as V,d as z}from"./chunk-C6XTRC7P.js";import{b as G,c as X,e as B,p as U}from"./chunk-P4ZFQZCA.js";import{h as H}from"./chunk-S5EF63OY.js";import{Bb as P,Cb as h,Db as l,Eb as _,Fb as O,Gb as b,Hb as R,Jb as T,Oc as D,Pb as v,Qb as y,Ra as g,Rb as d,Ua as r,Vb as C,Wb as a,Z as f,ea as u,fa as N,gb as k,ic as m,jc as A,kc as L,lb as S,sa as $,ub as I,yb as w,zb as s}from"./chunk-L72ALLHJ.js";var Y=(i,t)=>t.ID;function q(i,t){if(i&1&&m(0),i&2){let e=a().$implicit;L(" ",e.Message," ")}}function J(i,t){if(i&1&&(l(0,"div"),v(1,1),O(2,"a",16),y(),_()),i&2){let e=a().$implicit;r(2),I("href",e.DownloadLink,g)}}function Q(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a().$implicit,c=a();return N(c.doRepair(o.BackupID))}),d(1,2),_()}}function Z(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a().$implicit,c=a();return N(c.doDownloadBugreport(o))}),d(1,3),_()}}function ee(i,t){if(i&1&&O(0,"spk-progress-bar",18),i&2){let e,n=a(3);I("value",(e=n.serverState())==null?null:e.UpdateDownloadProgress)}}function te(i,t){if(i&1){let e=T();l(0,"div",14),b(1),d(2,4),R(),l(3,"a",17),m(4),_(),S(5,ee,1,1,"spk-progress-bar",18),l(6,"button",15),C("click",function(){u(e);let o=a(2);return N(o.doShowUpdate())}),d(7,5),_()()}if(i&2){let e,n,o=a().$implicit,c=a();r(3),I("href",(e=c.serverState())==null?null:e.UpdateDownloadLink,g),r(),A(o.Message),r(),s(((n=c.serverState())==null?null:n.UpdaterState)==="Downloading"?5:-1)}}function ie(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a().$implicit,c=a();return N(c.doShowLog(o.BackupID))}),d(1,6),_()}}function ne(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a(2);return N(o.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),d(1,7),_()}}function oe(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a(2);return N(o.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),d(1,8),_()}}function ae(i,t){if(i&1){let e=T();l(0,"spk-alert")(1,"div",10),m(2),_(),l(3,"div",11),S(4,q,1,1)(5,J,3,1,"div"),l(6,"div",12),S(7,Q,2,0,"button",13)(8,Z,2,0,"button",13)(9,te,8,3,"div",14)(10,ie,2,0,"button",13)(11,ne,2,0,"button",13)(12,oe,2,0,"button",13),l(13,"button",15),C("click",function(){let o=u(e).$index,c=a();return N(c.deleteNotificationByIndex(o))}),d(14,0),_()()()()}if(i&2){let e=t.$implicit,n=a();w(n.getAlertType(e.Type)),r(2),A(e.Title),r(2),s(e.Action!=="update:new"&&e.Action!=="update:manual"?4:-1),r(),s(e!=null&&e.DownloadLink?5:-1),r(2),s(e.Message!=null&&e.Message.includes("please run repair")?7:-1),r(),s(e.Action!=null&&e.Action.startsWith("bug-report:created:")&&!e.DownloadLink?8:-1),r(),s(e.Action==="update:new"?9:-1),r(),s(e.Action==="backup:show-log"?10:-1),r(),s(e.Action==="config:issue:unencrypted-database"?11:-1),r(),s(e.Action==="config:issue:windows-folder-used"?12:-1)}}var re={Error:"error",Warning:"warn",Information:"primary"},j=class i{#i=f(z);#o=f(V);#a=f(B);#e=f(X);#n=f(H);#t=f(W);notificationFilterPredicate=$();serverState=this.#t.serverState;notifications=D(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#t.notifications();return typeof t!="function"?e:e.filter(t)});deleteNotificationByIndex(t){this.#t.deleteNotification(t)}deleteAllNotifications(){this.#t.deleteAllNotifications()}getAlertType(t){return t&&re[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#i.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let n={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(n={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#a.open(K,{maxWidth:"550px",width:"100%",data:n})}else this.#e.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#e.success($localize`Backup repaired`),this.#i.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#o})},error:e=>{this.#e.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#i.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:`bugreport/${e}`}).subscribe({next:n=>{if(!n.Token){this.#e.error("Failed to get bug report URL: No token generated");return}t.DownloadLink=n.Token},error:n=>{this.#e.error(`Failed to get bug report URL: ${n.message}`)}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:2,vars:0,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let n;n=$localize`Repair`;let o;o=$localize`Download`;let c;c=$localize`New update found:`;let F;F=$localize`Show Update`;let x;x=$localize`Show Log`;let E;E=$localize` Show Help `;let M;return M=$localize` Show Help `,[t,e,n,o,c,F,x,E,M,[3,"class"],["sparkle-alert-title",""],["sparkle-alert-content","",1,"content"],[1,"actions"],["spk-button","",1,"small","outlined"],[1,"message"],["spk-button","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,n){e&1&&P(0,ae,15,11,"spk-alert",9,Y),e&2&&h(n.notifications())},dependencies:[G,U],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}"],changeDetection:0})};export{j as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as $}from"./chunk-GM4QKN65.js";import{a as R}from"./chunk-TQHNKGRL.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{b as A,e as N}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as k,g as B}from"./chunk-P4ZFQZCA.js";import{h as O}from"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{Ab as f,Bb as S,Cb as g,Db as F,Eb as a,Fb as r,Oc as M,Pb as _,Qb as c,Rb as u,Ua as i,Ub as T,Vb as I,Z as m,gb as C,ic as E,kc as L,lb as p,va as l,zb as s}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(O);#e=m(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as z}from"./chunk-GM4QKN65.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import{a as X}from"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{e as E}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as R,g as f,h as k,k as L,p as G}from"./chunk-P4ZFQZCA.js";import{h as w}from"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{Ab as N,Bb as x,Cb as $,Db as e,Eb as i,Fb as s,Gb as D,Hb as b,Pb as h,Qb as y,Rb as c,Sb as A,Tb as I,Ua as p,Wb as S,Z as d,gb as O,ic as l,lb as m,lc as B,rb as M,sb as P,ub as u,uc as g,vc as v,zb as F}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",v(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(X);#t=d(w);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,L,R,G,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as Bt,b as Kt}from"./chunk-PUEJXHBQ.js";import{a as pt}from"./chunk-HTJ5CVNN.js";import{a as Ve}from"./chunk-U467ZTQ4.js";import{a as lt,b as At,c as ct}from"./chunk-3KPWJPKG.js";import{a as Ut,b as Nt,c as Vt}from"./chunk-EQWH3TBL.js";import{a as fe}from"./chunk-TQHNKGRL.js";import{a as Me}from"./chunk-F2GEUOGZ.js";import{a as W}from"./chunk-BIZAKOYU.js";import{b as $e,c as ce,d as we,e as pe,f as xe,g as at,h as Re,i as Ie,j as ve,m as rt,n as Ge,o as st,p as bt,q as Le,r as ge,s as be,t as Ue}from"./chunk-ELMONRIG.js";import{b as Fe,d as ae}from"./chunk-C6XTRC7P.js";import{A as ke,B as it,a as re,b as tt,d as Gt,e as ye,g as Oe,l as se,o as Lt,p as nt,t as le}from"./chunk-P4ZFQZCA.js";import{h as ot}from"./chunk-S5EF63OY.js";import{ia as vt}from"./chunk-7L2WUS2V.js";import{$a as he,$b as It,Ab as Y,Bb as Q,Bc as qe,Cb as Z,Db as s,Eb as r,F as ze,Fb as u,Gb as B,Hb as K,Ib as He,Jb as R,Oc as $,Pb as S,Pc as et,Qb as E,Rb as O,Sb as Ze,T as De,Tb as Je,Ua as l,Ub as Te,Vb as h,Wb as c,Z as P,Zb as oe,ac as U,ea as F,f as Qe,fa as g,fc as Ae,gb as ie,gc as Ne,hc as ee,ic as d,jc as Pe,ka as xt,kc as H,lb as m,lc as St,nc as G,oc as L,pc as b,qc as Et,ra as Tt,rc as Dt,sa as ft,sc as ht,tb as Rt,ub as _,uc as Xe,va as D,vc as We,wb as Ce,xc as je,zb as T}from"./chunk-L72ALLHJ.js";import{a as X,b as me,c as wt}from"./chunk-7CGTOI24.js";var _t=class o{#n=P(ot);#t=P(ye);#e=P(Me);testDestination(n,e,t){return this.#e.hasV2TestOperations()?this.testDestinationv2(n,e,t):this.testDestinationv1(n,e,t)}testDestinationv2(n,e,t){return new Qe(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:n,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,n,e,a.Error??"Unknown error")},error:a=>{let p=a?.error?.body;if(p?.Data?.FolderExists===!1||p?.StatusCode==="missing-folder"){t?this.handleMissingFolder(i,n,e):this.handleGenericError(i,n,e,$localize`The remote destination folder does not exist.`);return}if(p?.Data?.HostCertificate){this.handleMissingCertificate(i,n,e,p.Data?.HostCertificate);return}if(p?.Data?.ReportedHostKey){this.handleIncorrectKey(i,n,e,p.Data.ReportedHostKey,p.Data.AcceptedHostKey??null);return}this.handleGenericError(i,n,e,a?.message??"Unknown error")}})})}testDestinationv1(n,e,t){return new Qe(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:n}}).subscribe({next:a=>{i.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,n,e,t).subscribe(p=>{i.next(p)})}})})}handleMissingFolder(n,e,t){this.#t.open(W,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(n,e,t):this.handleFolderCreateFailure(n,e,t,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(n,e,t,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(n,e,t)},error:a=>{this.handleFolderCreateFailure(n,e,t,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(n,e,t,i){this.#t.open(W,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}})}handleFolderCreated(n,e,t){this.#t.open(W,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:t}),n.complete()}})}reportNoAction(n,e,t){n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}handleMissingCertificate(n,e,t,i){this.#t.open(W,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(n,e,t);return}n.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:t}),n.complete()}})}handleIncorrectKey(n,e,t,i,a){a?this.#t.open(W,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
+
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:p=>{if(!p){this.reportNoAction(n,e,t);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:t}),n.complete()}}):this.#t.open(W,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:p=>{if(!p){this.reportNoAction(n,e,t);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:t}),n.complete()}})}handleGenericError(n,e,t,i){this.#t.open(W,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}})}handleDestinationErrorv1(n,e,t,i){return new Qe(a=>{if(n==="missing-folder"){i?this.handleMissingFolder(a,e,t):this.handleGenericError(a,e,t,$localize`The remote destination folder does not exist.`);return}if(n.startsWith("incorrect-cert:")){let p=n.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,t,p);return}if(n.startsWith("incorrect-host-key:")){let p=n.split('incorrect-host-key:"')[1].split('",')[0],A=n.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,t,p,A);return}this.handleGenericError(a,e,t,n)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var ut=class o{fromString(n){if(!n)return null;let e=n.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(n,e){return`${n}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var Yt=["formRef"];function Qt(o,n){o&1&&(s(0,"spk-alert",17),S(1,5),u(2,"spk-icon",26),E(),r())}function Zt(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;H(" ",e.DisplayName," ")}}function Jt(o,n){if(o&1&&u(0,"spk-progress-bar",40),o&2){let e=c(3);Ce("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),_("value",e.calculatePasswordStrength()*(100/5))}}function en(o,n){o&1&&(s(0,"span",35),O(1,10),r())}function tn(o,n){o&1&&(S(0,8,1),u(1,"spk-icon"),E())}function nn(o,n){o&1&&(S(0,8,2),u(1,"spk-icon"),E())}function on(o,n){o&1&&(S(0,11,1),u(1,"spk-icon",42),E())}function an(o,n){o&1&&(S(0,11,2),u(1,"spk-icon"),E())}function rn(o,n){if(o&1){let e=R();s(0,"button",41),h("click",function(){F(e);let i=c(3);return g(i.copyPassword())}),S(1,11),m(2,on,2,0)(3,an,2,0),E(),r()}if(o&2){let e=c(3);l(2),T(e.copiedPassword()?2:3)}}function sn(o,n){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function ln(o,n){if(o&1){let e=R();s(0,"div",30)(1,"spk-form-field")(2,"label",31),S(3,7),u(4,"sup"),E(),r(),u(5,"input",32),r(),m(6,Jt,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),u(8,"input",34),m(9,en,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),h("click",function(){F(e);let i=c(2);return g(i.showPassword.set(!i.showPassword()))}),S(12,8),m(13,tn,2,0)(14,nn,2,0),E(),r(),s(15,"button",37),h("click",function(){F(e);let i=c(2);return g(i.generatePassword())}),S(16,9),u(17,"spk-icon"),E(),r(),m(18,rn,4,1,"button",38),r(),m(19,sn,2,0,"spk-alert",39),r()}if(o&2){let e=c(2);l(5),_("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.password?6:-1),l(2),_("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),T(e.showPassword()?13:14),l(5),T(e.showCopyPassword()?18:-1),l(),T(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function cn(o,n){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),u(3,"input",29),m(4,Zt,1,1,"ng-template"),r(),m(5,ln,20,7,"div",30)),o&2){let e=c();_("options",e.encryptionOptions())("isClearable",!1),l(5),T(e.encryptionFieldSignal()!==""?5:-1)}}function pn(o,n){if(o&1&&(s(0,"button",24),S(1,13),u(2,"spk-icon"),E(),r()),o&2){let e=c();_("disabled",e.nameAndDescriptionValid()===!1)}}function _n(o,n){if(o&1&&(s(0,"spk-tooltip",25)(1,"button",24),S(2,14),u(3,"spk-icon"),E(),r()()),o&2){let e=c();_("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),_("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Be=new ge,zt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Be.group({name:Be.control(o.name,[we.required]),description:Be.control(o.description),encryption:Be.control(o.encryption,[Vt()]),password:Be.control(o.password,[Nt(n=>n?.value.encryption!=="",[we.required])]),repeatPassword:Be.control(o.repeatPassword,[Nt(n=>n?.value.encryption!=="",[we.required])])}),yt={Key:"",DisplayName:"None"},Pt=class o{#n=P(ae);#t=P(Fe);#e=P(Ut);#i=P(_e);#o=P(Me);formRef=he.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=D(!1);copiedPassword=D(!1);showCopyPassword=D(!1);encryptionEffect=et(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let n=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#a(n??""),this.copiedPassword.set(!0)}async#a(n){try{await navigator.clipboard.writeText(n)}catch{try{let t=document.createElement("textarea");t.value=n,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let n=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let t=[yt,...n].find(i=>i.Key===e);return t?`${t.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#e.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Yt,5),e&2&&Ne()},decls:21,vars:4,consts:()=>{let n;n=$localize`Your backup name`;let e;e=$localize`Your backup description`;let t;t=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let a;a=$localize`Backup description`;let p;p=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let k;k=$localize`Encryption`;let x;x=$localize`Encryption`;let V;V=$localize`Password`;let y;y=$localize`Repeat password`;let w;w=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Te(v);let J;J=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let j;j=$localize`Passwords do not match`;let C;C=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,C=Te(C);let f;f=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let I;I=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],t,i,a,p,A,x,w,v,J,j,C,f,I,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",V,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",y,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,t){if(e&1){let i=R();s(0,"form",15,0),h("submit",function(){return F(i),g(t.next())}),s(2,"h3",16),O(3,1),r(),m(4,Qt,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),S(7,2),u(8,"sup"),E(),r(),u(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),u(13,"textarea",21),r(),m(14,cn,6,3),s(15,"div",22)(16,"button",23),h("click",function(){return F(i),g(t.exit())}),S(17,4),u(18,"spk-icon"),E(),r(),m(19,pn,3,1,"button",24)(20,_n,4,2,"spk-tooltip",25),r()()}if(e&2){let i;_("formGroup",t.generalForm),l(4),T(!t.isNew()&&((i=t.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),T(t.isNew()?14:-1),l(5),T(t.encryptionFieldSignal()===""||!t.isNew()?19:20)}},dependencies:[Ue,Ie,ce,pe,xe,Ge,Le,se,le,Oe,re,nt,tt,it],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function un(o,n){if(o&1){let e=R();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),g(i)}),h("focus",function(){F(e);let i=ee(5);return g(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),u(9,"label",28),s(10,"input",29,1),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),g(i)}),h("focus",function(){F(e);let i=ee(11);return g(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),g(i)}),r()(),s(19,"spk-select",32)(20,"input",33),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),g(i)}),r()()(),s(21,"app-toggle-card",34),B(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),S(26,10),s(27,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),g(i)}),r(),E(),r(),s(28,"spk-toggle",19),S(29,11),s(30,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),g(i)}),r(),E(),r(),s(31,"spk-toggle",19),S(32,12),s(33,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),g(i)}),r(),E(),r(),s(34,"spk-toggle",19),S(35,13),s(36,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),g(i)}),r(),E(),r(),s(37,"spk-toggle",19),S(38,14),s(39,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),g(i)}),r(),E(),r(),s(40,"spk-toggle",19),S(41,15),s(42,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),g(i)}),r(),E(),r(),s(43,"spk-toggle",19),S(44,16),s(45,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),g(i)}),r(),E(),r()()()}if(o&2){let e=c();l(4),G("ngModel",e.scheduleFields.nextTime().time),l(6),G("ngModel",e.scheduleFields.nextTime().date),l(8),G("ngModel",e.scheduleFields.runAgain().repeatValue),l(),_("options",e.unitOptions)("isClearable",!1),l(),G("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),_("disallowToggle",!0),l(6),G("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var dn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ot=class o{#n=P(_e);#t=P(ae);#e=P(Fe);unitOptions=dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let n;n=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let t;t=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let x;x=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let j;return j=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],n,e,t,i,a,p,A,k,x,V,y,w,v,J,j,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,t){e&1&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),S(4,3),s(5,"input",20),b("ngModelChange",function(a){return L(t.scheduleFields.autoRun,a)||(t.scheduleFields.autoRun=a),a}),r(),E(),r(),s(6,"p"),O(7,4),r()(),m(8,un,46,14),s(9,"div",21)(10,"button",22),h("click",function(){return t.goBack()}),S(11,5),u(12,"spk-icon"),E(),r(),s(13,"button",23),h("click",function(){return t.next()}),S(14,6),u(15,"spk-icon"),E(),r()()),e&2&&(l(5),G("ngModel",t.scheduleFields.autoRun),l(3),T(t.scheduleFields.autoRun()?8:-1))},dependencies:[be,ce,ve,$e,pe,Re,se,ke,re,Oe,le,Ve],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function mn(o,n){if(o&1&&(B(0,4),d(1),K()),o&2){let e,t=c();l(),Pe((e=t.currentExpressionOption())==null?null:e.startsWith)}}function Fn(o,n){if(o&1&&(B(0,5),d(1),K()),o&2){let e,t=c();l(),Pe((e=t.currentExpressionOption())==null?null:e.endsWith)}}var gn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ft=class o{path=ft.required();osType=ft();pathChange=Tt();remove=Tt();internalPath=D("");pathType=D("-Expression");currentExpressionOption=$(()=>{let n=this.pathType();return this.expressionOptions().find(e=>e.value===n)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return gn.map(t=>t.value==="-Folder"||t.value==="+Folder"?me(X({},t),{startsWith:"",endsWith:""}):t.value==="-FolderName"||t.value==="+FolderName"?me(X({},t),{startsWith:"*",endsWith:`*${e}`}):t.value==="-FileName"||t.value==="+FileName"?me(X({},t),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):t.value==="-FileGroup"||t.value==="+FileGroup"?me(X({},t),{startsWith:"{",endsWith:"}"}):t.value==="-Regex"||t.value==="+Regex"?me(X({},t),{startsWith:"[",endsWith:"]"}):t.value==="-Extension"||t.value==="+Extension"?me(X({},t),{startsWith:"*.",endsWith:""}):me(X({},t),{startsWith:"",endsWith:""}))});pathEffect=et(()=>{let n=this.path(),e=n.slice(1),t=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${t}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${t}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${t}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${t}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${t}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${t}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${t}Expression`),this.internalPath.set(e))});updateFilter(){let n=this.internalPath(),e=this.currentExpressionOption();n!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${n}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,t){if(e&1&&(s(0,"spk-select",0)(1,"input",1),b("ngModelChange",function(a){return L(t.pathType,a)||(t.pathType=a),a}),h("ngModelChange",function(){return t.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),b("ngModelChange",function(a){return L(t.internalPath,a)||(t.internalPath=a),a}),h("ngModelChange",function(){return t.updateFilter()}),r(),m(4,mn,2,1,"ng-container",4)(5,Fn,2,1,"ng-container",5),r(),s(6,"div",6),h("click",function(){return t.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;_("options",t.expressionOptions())("isClearable",!1),l(),G("ngModel",t.pathType),l(2),G("ngModel",t.internalPath),l(),T(!((i=t.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),T(!((a=t.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[be,ce,pe,Re,le,se,re],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-level-20)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Cn=["formRef"],Ht=()=>({standalone:!0});function Tn(o,n){if(o&1){let e=R();s(0,"spk-form-field",42)(1,"input",43),b("ngModelChange",function(i){F(e);let a=c(2);return L(a.editingPath,i)||(a.editingPath=i),g(i)}),r()(),s(2,"button",44),h("click",function(){F(e);let i=c(2);return g(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c(2);return g(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=c(2);l(),G("ngModel",e.editingPath),_("ngModelOptions",Xe(2,Ht))}}function fn(o,n){if(o&1){let e=R();s(0,"spk-form-field",42),u(1,"input",45),r(),s(2,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=c().$implicit;Rt("readonly",!0),l(),_("ngModel",e)("ngModelOptions",Xe(3,Ht))}}function Sn(o,n){if(o&1&&(s(0,"div",30),m(1,Tn,8,3)(2,fn,8,4),r()),o&2){let e=n.$implicit,t=c();l(),T(t.oldPath()===e?1:2)}}function En(o,n){if(o&1){let e=R();s(0,"app-new-filter",47),h("pathChange",function(i){let a=F(e).$index,p=c(2);return g(p.patchPathAt(i,a))})("remove",function(){let i=F(e).$index,a=c(2);return g(a.removePathAt(i))}),r()}if(o&2){let e,t=n.$implicit,i=c(2);_("path",t)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function Dn(o,n){if(o&1&&Q(0,En,1,2,"app-new-filter",46,Y),o&2){let e=c();Z(e.pathArray())}}function hn(o,n){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),u(2,"input",48),r(),s(3,"spk-select",49),u(4,"input",50),r()()),o&2){let e=c();l(3),_("options",e.sizeOptions())("isClearable",!1)}}var ue=new ge,An=["Bytes","KB","MB","GB","TB","PB"],Xt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>ue.group({path:ue.control(o.path),excludes:ue.group({hidden:ue.control(o.excludes.hidden),system:ue.control(o.excludes.system),temporary:ue.control(o.excludes.temporary),filesLargerThan:ue.group({size:ue.control(null),unit:ue.control(null)})})}),kt=class o{#n=P(_e);#t=P(ae);#e=P(Fe);formRef=he.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new at("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=D(An);osType=this.#n.osType;pathSignal=fe(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(n=>!n.startsWith("-")&&!n.startsWith("+")&&n!==""));oldPath=D(null);editingPath=D(null);addingNewPath=D(!1);editPath(n){this.oldPath.set(n),this.editingPath.set(n)}updatePath(){let n=this.oldPath(),e=this.editingPath();if(!n||!e||e===n){this.oldPath.set(null),this.editingPath.set(null);return}let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(t?.replace(n,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(n){let e=this.sourceDataForm.controls.path.value??"",t=e.indexOf(n);if(t===-1)return;let i=t===0?n:"\0"+n,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(n="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${n}`)}patchPathAt(n,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),a=this.pathArray().map((p,A)=>A===e?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(n){let t=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${n}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Cn,5),e&2&&Ne()},decls:56,vars:12,consts:()=>{let n;n=$localize`Path`;let e;e=$localize`Add a direct path`;let t;t=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let p;p=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let x;x=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let V;V=$localize`Paths`;let y;y=$localize`Add a path directly from your machine.`;let w;w=$localize`Filters`;let v;v=$localize`Customize your filters.`;let J;J=$localize`Add filter`;let j;j=$localize`Exclude`;let C;C=$localize`Choose if there’s any files you want to exclude.`;let f;f=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let I;I=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Files larger than `;let te;te=$localize`Edit path`;let ne;return ne=$localize`Select an option...`,[["formRef",""],p,A,k,x,V,y,w,v,J,j,C,f,I,z,N,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",t,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",te,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",ne]]},template:function(e,t){if(e&1){let i=R();s(0,"form",16,0),h("submit",function(){return F(i),g(t.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),u(8,"input",21),r(),s(9,"div",22)(10,"button",23),h("click",function(){return F(i),g(t.goBack())}),S(11,3),u(12,"spk-icon"),E(),r(),s(13,"button",24),S(14,4),u(15,"spk-icon"),E(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),Q(23,Sn,3,1,"div",30,Y),s(25,"div",31)(26,"spk-form-field"),u(27,"input",32),r(),s(28,"button",33),h("click",function(){return F(i),g(t.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),B(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),h("click",function(){return F(i),g(t.addFilter())}),O(37,9),r(),m(38,Dn,2,0),r(),s(39,"app-toggle-card",35),B(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),S(45,12),u(46,"input",37),E(),r(),s(47,"spk-toggle",36),S(48,13),u(49,"input",38),E(),r(),s(50,"spk-toggle",36),S(51,14),u(52,"input",39),E(),r(),s(53,"spk-toggle",40),h("click",function(){return F(i),g(t.toggleFilesLargerThan())}),O(54,15),r(),m(55,hn,5,2,"div",41),r()()()}if(e&2){let i;_("formGroup",t.sourceDataForm),l(5),_("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),l(12),_("disallowToggle",!0),l(6),Z(t.nonFilterPaths()),l(4),_("formControl",t.newPathCtrl),l(4),_("disallowToggle",!0),l(7),T((i=t.pathSignal())!=null&&i.length?38:-1),l(),_("disallowToggle",!0),l(14),Ce("active",t.filesLargerThan()),l(2),T(t.filesLargerThan()?55:-1)}},dependencies:[be,Ie,ce,ve,$e,pe,xe,Re,Ue,rt,Ge,Le,st,se,re,Oe,ke,le,Ft,pt,Ve],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Wt="1W:1D,4W:1W,12M:1M",de=new ge,_e=class o{#n=P(ae);#t=P(Me);#e=P(ye);#i=P(ot);#o=P(ut);generalForm=zt();sourceDataForm=Xt();scheduleFields={autoRun:D(Ee.autoRun),nextTime:D(Ee.nextTime),runAgain:D(Ee.runAgain)};destinationForm=jt();settings=D([]);optionsFields={remoteVolumeSize:D("50MB"),backupRetention:D("all"),backupRetentionTime:D(""),backupRetentionVersions:D(0),backupRetentionCustom:D("")};isDraft=D(!1);backupId=D(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=D(!1);finishedLoading=D(!1);backupDefaults=D(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=D([]);selectedAdvancedFormPair=D([]);destinationFormPair=D({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let n=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return n.filter(t=>e.findIndex(i=>i.name===t.name)===-1)});selectedHttpOptions=D([]);notSelectedHttpOptions=$(()=>{let n=this.httpOptions(),e=this.selectedHttpOptions()??[];return n.filter(t=>e.findIndex(i=>i.name===t.name)===-1)});sourceDataFormSignal=fe(this.sourceDataForm.valueChanges);destinationFormSignal=fe(this.destinationForm.valueChanges);generalFormSignal=fe(this.generalForm.valueChanges);encryptionFieldSignal=fe(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=$(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[yt,...n]});nonSelectedOptions=$(()=>this.advancedOptions().sort((n,e)=>n?.name&&e?.name?n?.name.localeCompare(e?.name):0).filter(n=>this.selectedOptions()?.findIndex(e=>e.name===n.name)===-1));addOrUpdateAdvancedFormPairByName(n,e,t){let i=this.selectedAdvancedFormPair().find(a=>a.name===n);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(t);else{let a=this.notSelectedAdvancedFormPair().find(p=>p.name===n);if(!a)return;this.addAdvancedFormPair(a,e,t)}}addAdvancedFormPairByName(n,e,t){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===n);i&&this.addAdvancedFormPair(i,e,t)}addHttpOptionByName(n,e,t){let i=this.notSelectedHttpOptions().find(a=>a.name===n);i&&this.addHttpOption(i,e,t)}addAdvancedFormPair(n,e,t){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=t??n.defaultValue;this.createFormField(i,n,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,e,t){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=t??n.defaultValue;this.createFormField(i,n,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==n.name),i))}removeHttpOption(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(t=>(t=t.filter(i=>i.name!==n.name),t))}submit(){this.isSubmitting.set(!0);let n=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{this.exit(!1)},error:t=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:n}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{this.exit(!1)},error:t=>{}})}exit(n){if(!n){this.#p(),this.#n.navigate(["/"]);return}this.#e.open(W,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#p(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(n){this.#s(),setTimeout(()=>{this.#r(n)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let e=n.Sources??"",t=n.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=n.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=n.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,p={path:[...e,...t].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(p)}mapDestinationToForm(n){let e=n.TargetURL?At(n.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(n){let e=At(n);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(n){let e=n.Settings?.find(p=>p.Name==="encryption-module"),t=n.Settings?.find(p=>p.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:n.Name??"",description:n.Description??""};i&&i!==""&&(a.encryption=i),t&&t!==""&&(a.password=t,a.repeatPassword=t),this.generalForm.patchValue(a)}mapScheduleToForm(n){if(!n){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(n.Repeat)??null,t=this.#_(n.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>X(X({},i),t)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(n){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],t=n.Settings?.filter(p=>!e.includes(p.Name)),i=n.Settings?.filter(p=>e.includes(p.Name));this.settings.set(t??[]),t?.forEach(p=>{if(p.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(p.Value??"")});var a="all";i?.forEach(p=>{if(p.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(p.Value??"50MB"),p.Name==="keep-time"&&(p.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(p.Value??"");if(p.Name==="keep-versions"&&(p.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(p.Value?parseInt(p.Value):null);if(p.Name==="retention-policy"&&(p.Value??"")!=="")if(p.Value===Wt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(p.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let n=this.generalForm.value,e=this.getScheduleFormValue(),t=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],p=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(p=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([w,v])=>v).map(([w,v])=>w):[],k=t.path?.split("\0")??[],x=this.mapFormsToSettings(),V=Object.entries(t.excludes??{}).filter(([w,v])=>v&&w!=="filesLargerThan").map(([w])=>w),y=t.excludes?.filesLargerThan;return V.length&&x.push({Name:"--exclude-files-attributes",Value:V.join(",")}),y&&y.size!==null&&y.unit!==null&&x.push({Name:"--skip-files-larger-than",Value:`${y.size}${y.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:a[0]??null,Sources:k.filter(w=>!w.startsWith("-")),Settings:x,Filters:k.filter(w=>w.startsWith("-")).map((w,v)=>({Order:v,Include:!1,Expression:w.slice(1)}))},Schedule:e.autoRun?{Repeat:p,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}:null}}mapFormsToSettings(n=[]){let e=this.generalForm.value,t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Wt});break}let p=[...n,...t],A=this.settings().filter(k=>!p.includes(k.Name)).map(k=>{let x=k.Value;return typeof k.Value=="number"&&(x=k.Value.toString()),typeof k.Value=="boolean"&&(x=k.Value?"True":"False"),{Name:k.Name,Value:x}});return[...i,...a,...A]}#c(n){return n.controls.map(e=>lt(e.value))}#_(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let e=new Date(n);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(n,e,t){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){n.addControl(e.name,de.control(t));return}if(e.type==="Size"){n.addControl(e.name,de.control(t));return}if(e.type==="Integer"){n.addControl(e.name,de.control(t?parseInt(t):0));return}if(e.type==="Boolean"){n.addControl(e.name,de.control(t==="true"||t==="True"));return}if(e.type==="Flags"){n.addControl(e.name,de.control(t??""));return}if(e.type==="Timespan"||e.type==="DateTime"){n.addControl(e.name,de.control(t,[we.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,e,t=!1){let i=ct.find(C=>C.customKey===n||C.key===n),a=i?.key,p=this.destinationOptions().find(C=>C.Key===a),A=this.httpOptions();if(!p||!p.Options)return;let k=i&&i.oauthField?i.oauthField:null,x=i&&i.customFields?i.customFields:{},V=i&&i.dynamicFields?i.dynamicFields:[],y=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let v=de.group({}),J=de.group({}),j=de.group({});x&&Object.entries(x).forEach(([C,f],I)=>{let te=f,{formElement:z}=te,N=wt(te,["formElement"]);v.addControl(C,z(e?.custom[C])),this.destinationFormPair.update(ne=>(ne.custom.push(X({order:900+I},N)),ne))});for(let C=0;C<p.Options.length;C++){let f=p.Options[C];if(f.Deprecated)continue;let I=V.find(z=>z===f.Name||f.Aliases?.includes(z.name)||z.name===f.Name);if(I){let z=f.Aliases?.indexOf(I.name)??-1,N=f.Aliases&&z>-1?f.Aliases[z]:f.Name,te=I&&typeof I!="string",ne=te?I?.defaultValue??f.DefaultValue:f.DefaultValue,M={name:N,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,order:900+C},Ke=te?X(X({},M),I):M,q=e?.dynamic[N]??ne??f.DefaultValue;this.createFormField(J,Ke,q),this.destinationFormPair.update($t=>($t.dynamic.push(Ke),$t))}else{if(w.find(q=>q===f.Name))continue;let N=y.find(q=>q===f.Name||q.name===f.Name),te=N&&typeof N!="string",ne=e?.advanced[f.Name],M=ne??f.DefaultValue,Ke={name:f.Name,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,defaultValue:M,order:900+C},Ye=te?X(X({},Ke),N):Ke;t&&ne&&(this.createFormField(j,Ye,M),this.selectedAdvancedFormPair.update(q=>(q.push(Ye),q))),this.destinationFormPair.update(q=>(q.advanced.push(Ye),q))}}for(let C=0;C<A.length;C++){let f=A[C],I=e?.advanced[f.name],z=I??f.defaultValue;t&&I&&(this.createFormField(j,f,z),this.selectedHttpOptions.update(N=>(N.push(f),N)))}this.destinationFormPair.update(C=>({oauthField:C.oauthField,custom:C.custom.sort((f,I)=>f.order-I.order),dynamic:C.dynamic.sort((f,I)=>f.order-I.order),advanced:C.advanced.sort((f,I)=>f.order-I.order)})),this.destinationForm.controls.destinations.push(qt({key:i?.customKey??n,customGroup:v,dynamicGroup:J,advancedGroup:j}))}#p(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ee.autoRun),this.scheduleFields.nextTime.set(Ee.nextTime),this.scheduleFields.runAgain.set(Ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var Nn=["formRef"],Pn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"custom",destinationType:e,oauthField:t}),Ct=o=>({$implicit:o}),yn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"dynamic",destinationType:e,oauthField:t}),On=(o,n,e,t)=>({index:o,formView:n,formGroupName:"advanced",destinationType:e,oauthField:t}),kn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),Mn=()=>({maxWidth:"700px",width:"100%"});function $n(o,n){o&1&&(S(0,5,2),u(1,"spk-icon"),E())}function wn(o,n){o&1&&O(0,5,3)}function xn(o,n){if(o&1){let e=R();S(0,5,1),s(1,"button",21),h("click",function(){F(e);let i=c();return g(i.testDestination())}),m(2,$n,2,0)(3,wn,1,0),r(),E()}if(o&2){let e=c();l(),Ce("loader",e.testLoading())("success",e.successfulTest()),l(),T(e.successfulTest()?2:3)}}function Rn(o,n){if(o&1){let e=R();s(0,"p",27),h("click",function(){F(e);let i=c();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),S(1,8),u(2,"strong")(3,"br")(4,"span",28),E(),r()}if(o&2){let e,t=c();l(4),Ze((e=t.selectedDestinationType())==null?null:e.displayName),Je(1)}}function In(o,n){if(o&1){let e=R();s(0,"div",34),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=n.$implicit;l(2),Pe(e.displayName),l(2),Pe(e.description)}}function vn(o,n){if(o&1){let e=R();s(0,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=n.$implicit;l(2),H(" ",e.displayName," ")}}function Gn(o,n){if(o&1&&(s(0,"div",29),Q(1,In,5,2,"div",30,Y),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),B(6,20),Q(7,vn,3,1,"button",33,Y),K(),r()),o&2){let e=c();l(),Z(e.destinationTypeOptionsFocused()),l(2),_("searchable",!0),l(4),Z(e.destinationTypeOptionsNotFocused())}}function Ln(o,n){o&1&&He(0)}function bn(o,n){if(o&1&&m(0,Ln,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,Pn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Un(o,n){o&1&&He(0)}function Vn(o,n){if(o&1&&m(0,Un,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,yn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Bn(o,n){if(o&1){let e=R();S(0,10,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addAdvancedFormPair(i,0))}),r(),E()}if(o&2){let e=n.$implicit;l(),Ze(e.name),Je(0)}}function Kn(o,n){o&1&&He(0)}function zn(o,n){if(o&1&&m(0,Kn,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,On,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Hn(o,n){if(o&1){let e=R();S(0,11,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addHttpOption(i,0))}),r(),E()}if(o&2){let e=n.$implicit;l(),Ze(e.name),Je(0)}}function Xn(o,n){o&1&&He(0)}function Wn(o,n){if(o&1&&m(0,Xn,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,kn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function jn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function qn(o,n){if(o&1&&(s(0,"app-file-tree",43)(1,"label",47),d(2),m(3,jn,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),o&2){let e,t=c().$implicit,i=c(2);_("startingPath",i.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Yn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Qn(o,n){if(o&1&&(s(0,"app-file-tree",44)(1,"label",47),d(2),m(3,Yn,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),o&2){let e,t=c().$implicit,i=c(2);_("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Zn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Jn(o,n){o&1&&(s(0,"spk-icon",51),d(1,"link"),r())}function ei(o,n){o&1&&(s(0,"spk-icon",51),d(1,"envelope"),r())}function ti(o,n){o&1&&(s(0,"spk-icon",51),d(1,"textbox"),r())}function ni(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Zn,3,1,"spk-tooltip",48),r(),u(4,"input",50),m(5,Jn,2,0,"spk-icon",51)(6,ei,2,0,"spk-icon",51)(7,ti,2,0,"spk-icon",51),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name),_("type",t.formView.type==="Email"?"email":"text"),l(),T(t.formView.type==="Path"?5:t.formView.type==="Email"?6:7)}}function ii(o,n){if(o&1){let e=R();s(0,"span",55),h("click",function(){F(e);let i=c(2).$implicit,a=c(2);return g(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function oi(o,n){o&1&&(s(0,"spk-icon",51),d(1,"password"),r())}function ai(o,n){if(o&1){let e=R();s(0,"spk-icon",56),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function ri(o,n){if(o&1){let e=R();s(0,"spk-icon",56),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function si(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),r(),u(3,"input",52),m(4,ii,2,0,"span",53)(5,oi,2,0,"spk-icon",51)(6,ai,2,0,"spk-icon",54)(7,ri,2,0,"spk-icon",54),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),T(t.oauthField===t.formView.name?4:5),l(2),T(t.formView.showPassword?6:7)}}function li(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(3).$implicit;_("message",e.formView.longDescription)}}function ci(o,n){if(o&1&&d(0),o&2){let e=c().$implicit;St(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function pi(o,n){if(o&1&&d(0),o&2){let e=c().$implicit;H(" ",e," ")}}function _i(o,n){if(o&1&&m(0,ci,1,2)(1,pi,1,1),o&2){let e=c(3).$implicit;T(e.formView.loadOptions?0:1)}}function ui(o,n){if(o&1&&(s(0,"spk-select",57)(1,"label",47),d(2),m(3,li,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,_i,2,1,"ng-template",null,3,qe)),o&2){let e,t=ee(6);c();let i=ht(0),a=c().$implicit;_("options",i)("isClearable",!1)("optionTemplate",t),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),H(" ",(e=a.formView.shortDescription)!==null&&e!==void 0?e:a.formView.name," "),l(),T(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),oe("formControlName",a.formView.name)}}function di(o,n){if(o&1&&(Et(0),m(1,ui,7,14)),o&2){let e=c().$implicit,t=Dt(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(t?1:-1)}}function mi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(3).$implicit;_("message",e.formView.longDescription)}}function Fi(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;St(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function gi(o,n){if(o&1&&(s(0,"spk-select",59)(1,"label",47),d(2),m(3,mi,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,Fi,1,2,"ng-template",null,4,qe)),o&2){let e,t=ee(6);c();let i=ht(0),a=c().$implicit;_("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",t),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),H(" ",(e=a.formView.shortDescription)!==null&&e!==void 0?e:a.formView.name," "),l(),T(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),oe("formControlName",a.formView.name)}}function Ci(o,n){o&1&&u(0,"spk-progress-bar",58)}function Ti(o,n){if(o&1&&(Et(0),m(1,gi,7,15)(2,Ci,1,0,"spk-progress-bar",58)),o&2){let e=c().$implicit,t=Dt(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(t?1:2)}}function fi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Si(o,n){if(o&1&&(s(0,"app-size",45)(1,"label",47),d(2),m(3,fi,3,1,"spk-tooltip",48),r()()),o&2){let e,t=c().$implicit;_("inputType",t.Name)("formControlName",t.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
|
|
7
|
+
item.asHttpOptions ? 'http' : 'other'
|
|
8
|
+
}}`),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1)}}function Ei(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Di(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Ei,3,1,"spk-tooltip",48),r(),u(4,"input",60),s(5,"spk-icon",51),d(6,"numpad"),r()()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function hi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Ai(o,n){if(o&1&&(s(0,"spk-toggle",46)(1,"label",47),d(2),m(3,hi,3,1,"spk-tooltip",48),r(),u(4,"input",61),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Ni(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Pi(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;H(" ",e," ")}}function yi(o,n){if(o&1&&(s(0,"spk-select",62)(1,"label",47),d(2),m(3,Ni,3,1,"spk-tooltip",48),r(),u(4,"input",63),r(),m(5,Pi,1,1,"ng-template",null,4,qe)),o&2){let e,t=ee(6),i=c().$implicit;_("options",i.formView.options)("selectMultiple",!0)("optionTemplate",t),l(),It("for","destination-",i.formGroupName,"-",i.index,""),l(),H(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),oe("formControlName",i.formView.name)}}function Oi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function ki(o,n){if(o&1&&(s(0,"app-timespan",45)(1,"label",47),d(2),m(3,Oi,3,1,"spk-tooltip",48),r()()),o&2){let e,t=c().$implicit;_("inputType",t.formView.name)("formControlName",t.formView.name)("customId","destination-"+t.formGroupName+"-"+t.index+"-"+(t.asHttpOptions?"http":"other")),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1)}}function Mi(o,n){if(o&1){let e=R();s(0,"button",64),h("click",function(){F(e);let i=c().$implicit,a=c(2);return g(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function $i(o,n){if(o&1&&(s(0,"div",41),B(1,42),m(2,qn,5,17,"app-file-tree",43)(3,Qn,5,13,"app-file-tree",44)(4,ni,8,13,"spk-form-field")(5,si,8,13,"spk-form-field")(6,di,2,2)(7,Ti,3,2)(8,Si,4,9,"app-size",45)(9,Di,7,11,"spk-form-field")(10,Ai,5,11,"spk-toggle",46)(11,yi,7,9)(12,ki,4,9,"app-timespan",45),K(),m(13,Mi,3,0,"button",32),r()),o&2){let e=n.$implicit;Ce("single-field",e.formGroupName!=="advanced"),l(),_("formGroupName",e.formGroupName),l(),T(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"||e.formView.type==="DateTime"?12:-1),l(11),T(e.formGroupName==="advanced"?13:-1)}}function wi(o,n){if(o&1&&(B(0,22)(1,36),Q(2,bn,1,9,"ng-container",null,Y),Q(4,Vn,1,9,"ng-container",null,Y),s(6,"app-toggle-card",37),B(7,38),S(8,10),s(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),B(12,20),Q(13,Bn,3,1,"button",33,Y),K(),r(),E(),K(),Q(15,zn,1,9,"ng-container",null,Y),r(),s(17,"app-toggle-card",37),B(18,38),S(19,11),s(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),B(23,20),Q(24,Hn,3,1,"button",33,Y),K(),r(),E(),K(),Q(26,Wn,1,9,"ng-container",null,Y),r(),m(28,$i,14,5,"ng-template",null,2,qe),K()()),o&2){let e=c();l(2),Z(e.destinationFormPair().custom),l(2),Z(e.destinationFormPair().dynamic),l(2),_("disallowToggle",!0),l(3),_("searchable",!0),l(),_("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),Z(e.notSelectedAdvancedFormPair()),l(2),Z(e.selectedAdvancedFormPair()),l(2),_("disallowToggle",!0),l(3),_("searchable",!0),l(),_("disabled",e.notSelectedHttpOptions().length===0),l(3),Z(e.notSelectedHttpOptions()),l(2),Z(e.selectedHttpOptions())}}function xi(o,n){if(o&1){let e=R();s(0,"spk-dialog",65),b("isOpenChange",function(i){F(e);let a=c();return L(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),g(i)}),s(1,"header",66)(2,"h2"),O(3,12),r(),s(4,"spk-alert",67),O(5,13),r()(),s(6,"div",68)(7,"spk-form-field"),u(8,"textarea",69),r()(),s(9,"footer",70)(10,"button",24),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",71),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!0))}),S(13,14),u(14,"spk-icon"),E(),r()()()}if(o&2){let e=c();G("isOpen",e.targetUrlDialogOpen),_("options",Xe(3,Mn)),l(8),_("formControl",e.targetUrlCtrl)}}var gt=new ge,jt=(o={destinations:[]})=>gt.group({destinations:gt.array(o.destinations)}),qt=({key:o,customGroup:n,dynamicGroup:e,advancedGroup:t})=>gt.group({destinationType:gt.control(o),custom:n,dynamic:e,advanced:t}),Mt=class o{#n=P(ae);#t=P(Fe);#e=P(_e);#i=P(ye);#o=P(_t);injector=P(xt);formRef=he.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=D(!1);testLoading=D(!1);destinationTypeOptionsInFocus=D(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=D(ct.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=$(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(t=>e.find(i=>i.key===t))});selectedDestinationType=$(()=>{let n=this.destinationFormSignal();return this.destinationTypeOptions().find(t=>n?.destinations?.[0]?.destinationType===t.key)});destinationTypeOptionsNotFocused=$(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(t=>!n.includes(t.key))});getFormFieldValue(n,e,t){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[t].value}getFormControl(n,e,t){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[t]}addDestinationFormGroup(n){this.#e.addDestinationFormGroup(n)}addAdvancedFormPair(n,e){this.#e.addAdvancedFormPair(n,e)}removeFormView(n,e){this.#e.removeAdvancedFormPair(n,e)}addHttpOption(n,e){this.#e.addHttpOption(n,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new at;targetUrlInitial=D(null);targetUrlDialogOpen=D(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,t=this.targetUrlInitial();!n||e===t||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let t=this.#e.getCurrentTargetUrl()[n];t&&(this.testLoading.set(!0),this.#o.testDestination(t,n,!0).pipe(ze(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(W,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(W,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(n){return lt(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let e=this.destinationOptions().find(t=>t.Key===n);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=D("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=D(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=D(!1);#l=D(null);keyCreation(){}oauthStartTokenCreation(n,e){let t=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,p=600,A=this.#a()+"?type="+n+"&token="+i,k=screen.width/2-a/2,x=screen.height/2-p/2,V=window.open(A,"_blank","height="+p+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+x);return window.addEventListener("message",y=>{let w=y.data.startsWith("authid:"),v=w?y.data.replace("authid:",""):null;console.log("event",y),w&&(t.setValue(v),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-destination"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Nn,5),e&2&&Ne()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=Te(n);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let t;t=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let p;p=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,p=Te(p);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Te(A);let k;k=$localize`Edit target URL`;let x;x=$localize` Be careful, this will overwrite everything you have in your destination. `;let V;return V=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],n,e,t,i,a,p,A,k,x,V,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,t){if(e&1){let i=R();s(0,"form",15,0),h("submit",function(){return F(i),g(t.next())}),s(2,"header")(3,"h3",16),S(4,5),s(5,"div",17),m(6,xn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),B(10,20),s(11,"button",21),h("click",function(){return F(i),g(t.openTargetUrlDialog())}),u(12,"spk-icon"),r(),K(),r()(),E(),r(),m(13,Rn,5,1,"p"),r(),m(14,Gn,9,1)(15,wi,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),h("click",function(){return F(i),g(t.goBack())}),S(18,6),u(19,"spk-icon"),E(),r(),s(20,"button",25),S(21,7),u(22,"spk-icon"),E(),r()()(),m(23,xi,15,4,"spk-dialog",26)}if(e&2){let i;_("formGroup",t.destinationForm),l(6),T(t.destinationCount()>0?6:-1),l(7),T(t.destinationCount()>0?13:-1),l(),T(t.destinationCount()===0?14:-1),l(),T(!((i=t.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),T(t.targetUrlDialogOpen()?23:-1)}},dependencies:[Ue,Ie,ce,ve,$e,pe,xe,rt,Ge,Le,st,bt,vt,se,Lt,re,ke,it,Gt,tt,le,nt,Kt,Ve,pt,Bt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{_t as a,jt as b,qt as c,Mt as d,zt as e,yt as f,Pt as g,Ee as h,Ot as i,Xt as j,kt as k,_e as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-Y6ZPPRT6.js";import"./chunk-HTJ5CVNN.js";import"./chunk-U467ZTQ4.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-ELMONRIG.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import"./chunk-P4ZFQZCA.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as he}from"./chunk-GM4QKN65.js";import{a as Ke}from"./chunk-U467ZTQ4.js";import{a as be,b as pe}from"./chunk-TQHNKGRL.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import{a as Be}from"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import{a as re}from"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{b as Ie,e as ke}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as z,g as ae,j as ve,k as ye,p as le,y as xe}from"./chunk-P4ZFQZCA.js";import{h as _e}from"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import{pa as w,sa as oe}from"./chunk-7L2WUS2V.js";import{a as se}from"./chunk-45NW2WR4.js";import"./chunk-DOP6RFEG.js";import{Ab as I,Ac as T,Bb as k,Cb as v,Db as i,Eb as t,Fb as c,Gb as A,Hb as P,Jb as K,Oc as fe,Pb as N,Qb as M,Rb as _,Sb as s,Tb as d,Ua as o,Ub as U,Vb as y,Wb as m,Z as R,ea as D,fa as $,gb as b,ic as F,jc as x,kc as S,lb as C,mc as Re,qc as De,r as B,rc as $e,sa as ie,sc as X,ub as h,va as G,wb as f,yc as u,zb as E,zc as g}from"./chunk-L72ALLHJ.js";import{a as te}from"./chunk-7CGTOI24.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(_e);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=pe({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,le,ae,z,re,w,se,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(_e);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=pe({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,le,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=be(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,re,se,w,he,z,ae,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.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)}"],changeDetection:0})};export{ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as R}from"./chunk-IINSQSHJ.js";import{a as z}from"./chunk-FJVMA6GA.js";import{a as B}from"./chunk-BIZAKOYU.js";import{a as P}from"./chunk-HFIC4JNY.js";import{e as h}from"./chunk-P4ZFQZCA.js";import{h as S}from"./chunk-S5EF63OY.js";import{F as n,N as d,Oc as c,Pc as p,T as m,Z as o,n as f,r as k,va as s}from"./chunk-L72ALLHJ.js";import{a as l,b as a}from"./chunk-7CGTOI24.js";var F={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},$=class r{#i=o(P);#t=o(S);#o=o(z);#e=o(R);#r=o(h);#l=s(!1);#a=s(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>a(l({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null})),this.lastState=e,e):this.lastState});clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");serverStateEffect=p(()=>{this.#e.serverState()?.ActiveTask||this.#o.getBackups(!0)});isResuming=s(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#p=p(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.pollingInterval=setInterval(()=>{this.#s()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#s()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(n(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#r.open(B,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#s(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(d(e=>{let i=e.TaskID??null;return i===null?f(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(k(t=>a(l({},e),{task:t??null})))}),n(()=>this.#l.set(!1))).subscribe({next:e=>{let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(a(l({},e),{progress:this.#n(e),statusText:this.#c(e),actionText:e.backup?.Backup?.Name??$localize`Running task`})),e.task?.Status==="Completed"&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#n(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,u=e.TotalFileCount-e.ProcessedFileCount,g=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#c(e){let i="Running \u2026";if(e.task&&e&&(i=e.Phase?F[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,u=e.TotalFileCount-e.ProcessedFileCount,g=e.TotalFileSize-e.ProcessedFileSize-t,_=e.BackendSpeed<0?"":` at ${this.#i.transform(e.BackendSpeed)}/s`;i=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${u} files (${this.#i.transform(g)}) to go ${_}`}return i}static \u0275fac=function(i){return new(i||r)};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})};export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ke,c as Re,d as B}from"./chunk-EQWH3TBL.js";import{a as Oe}from"./chunk-TQHNKGRL.js";import{a as ue}from"./chunk-FJVMA6GA.js";import"./chunk-RHW5QVAY.js";import{b as de,c as Pe,d as S,e as Te,f as Ce,i as me,n as Ee,q as Se,r as ge,t as fe}from"./chunk-ELMONRIG.js";import"./chunk-XP7PWMT2.js";import{b as oe,d as te,e as ne}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{A as ce,B as Fe,a as re,b as se,f as ae,g as le,l as pe,p as _e}from"./chunk-P4ZFQZCA.js";import{c as ee,h as ie}from"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{Db as a,Eb as r,F as I,Fb as p,Jb as M,N as H,Oc as N,Pb as _,Pc as Z,Qb as c,Rb as m,Sb as y,Tb as h,Ua as s,Ub as X,Vb as E,Wb as u,Z as T,ea as x,fa as D,gb as Q,ic as A,jc as J,lb as d,lc as W,ub as P,uc as Y,va as C,wb as f,zb as F}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var we=()=>["/"];function $e(t,o){t&1&&(a(0,"spk-toggle",24),_(1,5),p(2,"input",27),c(),r())}function xe(t,o){t&1&&(a(0,"span",30),m(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",30),m(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),h(1)}}function Ae(t,o){if(t&1&&p(0,"spk-progress-bar",37),t&2){let e=u(2);f("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ne(t,o){t&1&&(a(0,"span",30),m(1,11),r())}function Ie(t,o){t&1&&(a(0,"span",30),m(1,12),r())}function Me(t,o){if(t&1&&(a(0,"span",30),m(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),h(1)}}function ye(t,o){t&1&&(_(0,7,1),p(1,"spk-icon"),c())}function he(t,o){t&1&&(_(0,7,2),p(1,"spk-icon"),c())}function Xe(t,o){t&1&&(_(0,14,1),p(1,"spk-icon",39),c())}function Be(t,o){t&1&&(_(0,14,2),p(1,"spk-icon"),c())}function Le(t,o){if(t&1){let e=M();a(0,"button",38),E("click",function(){x(e);let i=u(2);return D(i.copyPassword())}),_(1,14),d(2,Xe,2,0)(3,Be,2,0),c(),r()}if(t&2){let e=u(2);s(2),F(e.copiedPassword()?2:3)}}function be(t,o){t&1&&(a(0,"spk-alert",36),m(1,15),r())}function ve(t,o){if(t&1){let e=M();a(0,"div",25)(1,"spk-form-field")(2,"label",28),_(3,6),p(4,"sup"),c(),r(),p(5,"input",29),d(6,xe,2,0,"span",30)(7,De,2,1,"span",30),r(),d(8,Ae,1,9,"spk-progress-bar",31),a(9,"spk-form-field"),p(10,"input",32),d(11,Ne,2,0,"span",30)(12,Ie,2,0,"span",30)(13,Me,2,1,"span",30),r(),a(14,"div",33)(15,"button",34),E("click",function(){x(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),_(16,7),d(17,ye,2,0)(18,he,2,0),c(),r(),a(19,"button",34),E("click",function(){x(e);let i=u();return D(i.generatePassword())}),_(20,8),p(21,"spk-icon"),c(),r(),d(22,Le,4,1,"button",35),r(),d(23,be,2,0,"spk-alert",36),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),F(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),F(e.showPassword()?17:18),s(5),F(e.showCopyPassword()?22:-1),s(),F(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ge(t,o){if(t&1&&(a(0,"div",26)(1,"code"),A(2),r()()),t&2){let e=u();s(2),J(e.exportedCmd())}}var O=new ge,L=class t{#o=T(ke);#t=T(ie);#e=T(oe);#n=T(te);#i=T(ee);#r=T(ue);isExporting=C(!1);exportType=C("file");exportedCmd=C(null);exportForm=O.group({exportPasswords:O.control(!0),encryption:O.control(!1,[S.required,Re()]),password:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])]),repeatPassword:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])])});exportFormSignal=Oe(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>this.exportFormSignal()?.encryption??!1);activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Z(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(H(o=>{let e=i=>{let g=Object.entries(i);return g?"?"+g.map(([k,R])=>`${k}=${R}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),I(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(I(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Q({type:t,selectors:[["app-export"]],decls:27,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let i;i=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let g;g=$localize` Export passwords ${"\uFFFD#23\uFFFD\uFFFD/#23\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let R;R=$localize`Password`;let b;b=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=X(w);let G;G=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let K;K=$localize`Passwords are required`;let U;U=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let $;$=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,$=X($);let j;return j=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `,[o,e,n,i,g,k,v,w,G,K,U,z,V,q,$,j,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["message","Remember to copy the password",1,"primary",3,"disabled"],["spk-button","",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",R,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),A(2," Export backup configuration "),a(3,"div",16)(4,"button",17),_(5,0),p(6,"spk-icon"),c(),r(),a(7,"spk-tooltip",18)(8,"button",19),E("click",function(){return n.submit()}),_(9,1),p(10,"spk-icon"),c(),r()()()(),a(11,"p"),A(12),r()(),a(13,"form",20)(14,"spk-button-group")(15,"button",21),E("click",function(){return n.exportType.set("cmd")}),_(16,2),p(17,"spk-icon"),c(),r(),a(18,"button",21),E("click",function(){return n.exportType.set("file")}),_(19,3),p(20,"spk-icon"),c(),r()(),a(21,"spk-toggle",22),_(22,4),p(23,"input",23),c(),r(),d(24,$e,3,0,"spk-toggle",24)(25,ve,24,8,"div",25)(26,Ge,3,1,"div",26),r()),e&2){let i;s(4),P("routerLink",Y(15,we)),s(3),f("loading",n.isExporting()),P("disabled",!(n.showCopyPassword()&&!n.copiedPassword())),s(),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()),s(4),W("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name,""),s(),P("formGroup",n.exportForm),s(2),f("active",n.exportType()==="cmd"),s(3),f("active",n.exportType()==="file"),s(6),F(n.exportType()==="file"?24:-1),s(),F(n.encryptionFieldSignal()?25:-1),s(),F(n.exportedCmd()?26:-1)}},dependencies:[fe,me,Pe,de,Te,Ce,Ee,Se,ne,ae,ce,re,pe,le,se,_e,Fe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{L as default};
|
|
1
|
+
import{a as ke,c as Re,d as B}from"./chunk-EQWH3TBL.js";import{a as Oe}from"./chunk-TQHNKGRL.js";import{a as ue}from"./chunk-FJVMA6GA.js";import"./chunk-RHW5QVAY.js";import{b as de,c as Pe,d as S,e as Te,f as Ce,i as me,n as Ee,q as Se,r as ge,t as fe}from"./chunk-ELMONRIG.js";import"./chunk-XP7PWMT2.js";import{b as oe,d as te,e as ne}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{A as _e,B as ce,a as ie,b as re,f as se,g as ae,l as le,p as pe}from"./chunk-P4ZFQZCA.js";import{c as ee,h as Fe}from"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{Db as a,Eb as r,F as I,Fb as p,Jb as M,N as H,Oc as N,Pb as _,Pc as Z,Qb as c,Rb as m,Sb as y,Tb as h,Ua as s,Ub as X,Vb as E,Wb as u,Z as T,ea as x,fa as D,gb as Q,ic as A,jc as J,lb as d,lc as W,ub as P,uc as Y,va as C,wb as f,zb as F}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var we=()=>["/"];function $e(t,o){t&1&&(a(0,"spk-toggle",24),_(1,5),p(2,"input",27),c(),r())}function xe(t,o){t&1&&(a(0,"span",30),m(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",30),m(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),h(1)}}function Ae(t,o){if(t&1&&p(0,"spk-progress-bar",37),t&2){let e=u(2);f("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ne(t,o){t&1&&(a(0,"span",30),m(1,11),r())}function Ie(t,o){t&1&&(a(0,"span",30),m(1,12),r())}function Me(t,o){if(t&1&&(a(0,"span",30),m(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),h(1)}}function ye(t,o){t&1&&(_(0,7,1),p(1,"spk-icon"),c())}function he(t,o){t&1&&(_(0,7,2),p(1,"spk-icon"),c())}function Xe(t,o){t&1&&(_(0,14,1),p(1,"spk-icon",39),c())}function Be(t,o){t&1&&(_(0,14,2),p(1,"spk-icon"),c())}function Le(t,o){if(t&1){let e=M();a(0,"button",38),E("click",function(){x(e);let i=u(2);return D(i.copyPassword())}),_(1,14),d(2,Xe,2,0)(3,Be,2,0),c(),r()}if(t&2){let e=u(2);s(2),F(e.copiedPassword()?2:3)}}function be(t,o){t&1&&(a(0,"spk-alert",36),m(1,15),r())}function ve(t,o){if(t&1){let e=M();a(0,"div",25)(1,"spk-form-field")(2,"label",28),_(3,6),p(4,"sup"),c(),r(),p(5,"input",29),d(6,xe,2,0,"span",30)(7,De,2,1,"span",30),r(),d(8,Ae,1,9,"spk-progress-bar",31),a(9,"spk-form-field"),p(10,"input",32),d(11,Ne,2,0,"span",30)(12,Ie,2,0,"span",30)(13,Me,2,1,"span",30),r(),a(14,"div",33)(15,"button",34),E("click",function(){x(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),_(16,7),d(17,ye,2,0)(18,he,2,0),c(),r(),a(19,"button",34),E("click",function(){x(e);let i=u();return D(i.generatePassword())}),_(20,8),p(21,"spk-icon"),c(),r(),d(22,Le,4,1,"button",35),r(),d(23,be,2,0,"spk-alert",36),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),F(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),F(e.showPassword()?17:18),s(5),F(e.showCopyPassword()?22:-1),s(),F(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ge(t,o){if(t&1&&(a(0,"div",26)(1,"code"),A(2),r()()),t&2){let e=u();s(2),J(e.exportedCmd())}}var O=new ge,L=class t{#o=T(ke);#t=T(Fe);#e=T(oe);#n=T(te);#i=T(ee);#r=T(ue);isExporting=C(!1);exportType=C("file");exportedCmd=C(null);exportForm=O.group({exportPasswords:O.control(!0),encryption:O.control(!1,[S.required,Re()]),password:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])]),repeatPassword:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])])});exportFormSignal=Oe(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>this.exportFormSignal()?.encryption??!1);activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Z(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(H(o=>{let e=i=>{let g=Object.entries(i);return g?"?"+g.map(([k,R])=>`${k}=${R}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),I(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(I(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Q({type:t,selectors:[["app-export"]],decls:27,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let i;i=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let g;g=$localize` Export passwords ${"\uFFFD#23\uFFFD\uFFFD/#23\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let R;R=$localize`Password`;let b;b=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=X(w);let G;G=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let K;K=$localize`Passwords are required`;let U;U=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let $;$=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,$=X($);let j;return j=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `,[o,e,n,i,g,k,v,w,G,K,U,z,V,q,$,j,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["message","Remember to copy the password",1,"primary",3,"disabled"],["spk-button","",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",R,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),A(2," Export backup configuration "),a(3,"div",16)(4,"button",17),_(5,0),p(6,"spk-icon"),c(),r(),a(7,"spk-tooltip",18)(8,"button",19),E("click",function(){return n.submit()}),_(9,1),p(10,"spk-icon"),c(),r()()()(),a(11,"p"),A(12),r()(),a(13,"form",20)(14,"spk-button-group")(15,"button",21),E("click",function(){return n.exportType.set("cmd")}),_(16,2),p(17,"spk-icon"),c(),r(),a(18,"button",21),E("click",function(){return n.exportType.set("file")}),_(19,3),p(20,"spk-icon"),c(),r()(),a(21,"spk-toggle",22),_(22,4),p(23,"input",23),c(),r(),d(24,$e,3,0,"spk-toggle",24)(25,ve,24,8,"div",25)(26,Ge,3,1,"div",26),r()),e&2){let i;s(4),P("routerLink",Y(15,we)),s(3),f("loading",n.isExporting()),P("disabled",!(n.showCopyPassword()&&!n.copiedPassword())),s(),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()),s(4),W("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name,""),s(),P("formGroup",n.exportForm),s(2),f("active",n.exportType()==="cmd"),s(3),f("active",n.exportType()==="file"),s(6),F(n.exportType()==="file"?24:-1),s(),F(n.encryptionFieldSignal()?25:-1),s(),F(n.exportedCmd()?26:-1)}},dependencies:[fe,me,Pe,de,Te,Ce,Ee,Se,ne,se,_e,ie,le,ae,re,pe,ce],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k}from"./chunk-GM4QKN65.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{e as S}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as T,g as M,h as f}from"./chunk-P4ZFQZCA.js";import"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{Db as e,Eb as n,Fb as _,Pb as s,Qb as l,Rb as i,Ua as c,gb as D,ub as r,uc as d}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as te}from"./chunk-MQJUTAQD.js";import{a as gt}from"./chunk-GM4QKN65.js";import{l as se}from"./chunk-JYXXSXNP.js";import"./chunk-PUEJXHBQ.js";import"./chunk-HTJ5CVNN.js";import"./chunk-U467ZTQ4.js";import"./chunk-3KPWJPKG.js";import"./chunk-EQWH3TBL.js";import"./chunk-TQHNKGRL.js";import{a as Tt}from"./chunk-XYMSYNUD.js";import{a as K}from"./chunk-F2GEUOGZ.js";import{a as St}from"./chunk-R3PVYKQS.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import"./chunk-FJVMA6GA.js";import{a as ct}from"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import{c as Q,e as Z,h as J,l as pt,s as Y,t as ee}from"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import{a as nt}from"./chunk-XP7PWMT2.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{A as _t,B as dt,a as W,b as H,e as it,g as q,k as ot,l as j,p as st,q as at,r as lt,t as rt}from"./chunk-P4ZFQZCA.js";import{h as k}from"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{$a as je,B as b,Db as i,Eb as o,F as R,Fb as I,Jb as P,Oc as F,Pb as X,Pc as $,Qb as V,Ra as qe,Rb as l,Sb as ie,T as He,Tb as oe,Ua as r,Ub as Ze,Vb as S,Wb as p,Z as E,Zb as Je,a as Ue,b as Be,c as We,ea as u,fa as m,fc as Ye,gb as w,gc as et,ic as O,jc as z,kc as U,lb as f,n as v,nc as y,oc as G,pc as A,rb as Ke,sb as Qe,tc as tt,ub as h,uc as B,va as c,wb as N,zb as C}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var Ct=["formRef"],Et=()=>[import("./chunk-ETELPN3O.js").then(s=>s.OptionsListComponent)];function ft(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function Nt(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=p();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=p();y("options",t.settings),h("hasFreeTextSettings",!0)}}var Mt=["Bytes","KB","MB","GB","TB","PB"],x=class s{#e=E(se);#t=E(te);#i=E(k);formRef=je.required("formRef");settings=this.#e.settings;isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Mt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#t.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let T=n.replace("--","");this.settings.update(g=>(g.some(M=>M.Name===T)||g.push({Name:T,Value:a}),g))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(g=>g.Name),_=Object.keys(t).filter(g=>!n.includes(g.replace("--",""))),T=e.reduce((g,M)=>(g[`--${M.Name}`]=M.Value,g),{});_.forEach(g=>{T[g]=null}),this.#i.patchApiV1Serversettings({requestBody:T}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ye(n.formRef,Ct,5),t&2&&et()},features:[tt([se])],decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),f(1,ft,2,0,"spk-alert",3),i(2,"button",4),S("click",function(){return n.submit()}),X(3,0),I(4,"spk-icon"),V(),o()(),f(5,Nt,1,2),Ke(6,5,Et)),t&2&&(r(),C(n.saved()?1:-1),r(),N("loader",n.isSubmitting()),r(4),Qe(!n.isLoadingOptions()))},dependencies:[ee,q,W,H],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var L=class s{#e=E(it);#t=E(k);#i=E(K);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=F(()=>{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=$(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(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();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#o(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}deleteRemoteControl(){let e=this;this.#e.open(ct,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#o(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function Pt(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=p(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),S("click",function(){u(t);let a=p(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=p(2);r(),y("ngModel",t.registerUrl)}}function Ot(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=p(2);r(3),Je("href",t.claimUrl(),qe),r(),z(t.claimUrl())}}function Rt(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function It(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.cancel())}),l(1,3),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.disable())}),l(1,4),o()}}function Gt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),S("click",function(){u(t);let a=p(2);return m(a.delete())}),l(3,6),o()}}function At(s,e){if(s&1&&(i(0,"div",7),f(1,Pt,4,1)(2,Ot,5,2,"div",8)(3,Rt,3,0,"div",8)(4,It,2,0,"button",9)(5,yt,2,0,"button",9)(6,Gt,4,0),o()),s&2){let t=p();r(),C(t.state()==="inactive"?1:-1),r(),C(t.state()==="registered"?2:-1),r(),C(t.state()==="registering"?3:-1),r(),C(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),C(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),C(t.state()==="disabled"?6:-1)}}var ne=class s{#e=E(L);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||s)};static \u0275cmp=w({type:s,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 a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let T;T=$localize`Enable remote control`;let g;return g=$localize`Delete remote control setup`,[e,t,n,a,_,T,g,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(t,n){t&1&&f(0,At,7,6,"div",7),t&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,Q,Z,J,j],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})};function mt(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var le=()=>({standalone:!0});function $t(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function vt(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function bt(s,e){if(s&1){let t=P();i(0,"button",74),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=p(2);N("loader",t.isUpdating())}}function wt(s,e){if(s&1){let t=P();i(0,"spk-tooltip",73)(1,"button",75),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(2,35),o()()}if(s&2){let t=p(2);r(),N("loader",t.isUpdating()),h("disabled",!0)}}function kt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=p();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=p();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),f(8,$t,2,0,"spk-icon",69)(9,vt,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),S("click",function(){u(t);let a=p();return m(a.cancelPasswordChange())}),l(12,33),o(),f(13,bt,2,2,"button",72)(14,wt,3,3,"spk-tooltip",73),o()}if(s&2){let t=p();r(3),y("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),N("loader",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function Lt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Ft(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),S("click",function(){u(t);let a=p();return m(a.openPassphraseForm())}),l(2,36),o(),f(3,Lt,2,0,"spk-icon",76),o()}if(s&2){let t=p();r(3),C(t.passwordUpdated()?3:-1)}}function xt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=p();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),S("click",function(){u(t);let a=p();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=p();r(3),y("ngModel",t.allowedHostnames),r(3),N("loader",t.updatingAllowedHosts())}}function Dt(s,e){if(s&1&&O(0),s&2){let t,n=p();U(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Xt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function zt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function Ut(s,e,t){let n=mt(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=T=>{clearTimeout(_),_=setTimeout(()=>Be(a,T),e)},n.update=T=>{clearTimeout(_),_=setTimeout(()=>We(a,T),e)},n}var Bt=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Wt=[{value:"none",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`}],re=class s{#e=E(St);#t=E(K);#i=E(k);#n=E(te);#o=E(L);#s=E(nt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#o.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#i.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#i.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(Tt);usageStatisticsOptions=c(Wt);timeTypeOptions=c(Bt);timeType=c("none");timeValue=Ut(0,300);timeRange=F(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue();this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#i.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let g;g=$localize`Change server passphrase`;let M;M=$localize`Language`;let _e;_e=$localize`Select a language for the platform`;let de;de=$localize`Allow remote access (requires restart)`;let ce;ce=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let pe;pe=$localize`Allow remote access`;let Se;Se=$localize`Prevent tray icon automatic log-in`;let ge;ge=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Te;Te=$localize`Prevent tray icon automatic log-in`;let ue;ue=$localize`Update channel`;let me;me=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ce;Ce=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Stable`;let fe;fe=$localize`Official releases`;let Ne;Ne=$localize`Beta`;let Me;Me=$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 he;he=$localize` Experimental `;let Pe;Pe=$localize`Specific builds for developers only. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let Re;Re=$localize`Individual builds for developers only. Not for use with important data.`;let Ie;Ie=$localize`Pause after startup or hibernation`;let ye;ye=$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 Ge;Ge=$localize`Usage statistics`;let D;D=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\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. `,D=Ze(D);let Ae;Ae=$localize`Advanced options`;let $e;$e=$localize`Enter new password`;let ve;ve=$localize`Repeat password`;let be;be=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,T,g,M,_e,de,ce,pe,Se,ge,Te,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,D,Ae,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",$e,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",ve,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["message",be,1,"primary"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),S("click",function(){return n.setLightMode()}),o(),i(25,"img",46),S("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),f(33,kt,15,7)(34,Ft,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),S("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),S("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),f(54,xt,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),S("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),f(70,Dt,1,1),o(),f(71,Xt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),S("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),S("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),S("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),S("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),S("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),S("ngModelChange",function(_){return n.updateTimeType(_)}),o(),f(112,Vt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),X(118,29),I(119,"a",62)(120,"br")(121,"br"),V(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),S("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),f(125,zt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,T;r(13),z(n.remoteControlStatus()),r(11),N("active",!n.isDarkMode()),r(),N("active",n.isDarkMode()),r(8),C(n.showPassphraseForm()?33:34),r(9),h("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),h("ngModel",n.langCtrl())("ngModelOptions",B(43,le)),r(8),N("active",n.allowRemoteAccess()),r(3),C(n.allowRemoteAccess()?54:-1),r(8),N("active",n.disableTrayIconLogin()),r(8),C(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),C(n.updatingChannel()?71:-1),r(3),N("active",n.updateChannel()===""),r(),ie((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),oe(75),r(2),ie((T=n.sysinfo())==null?null:T.ServerVersionType),oe(77),r(2),N("active",n.updateChannel()==="stable"),r(5),N("active",n.updateChannel()==="beta"),r(5),N("active",n.updateChannel()==="experimental"),r(5),N("active",n.updateChannel()==="canary"),r(14),h("unit",n.timeType()==="none"?"s":n.timeType()),r(),h("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),h("ngModelOptions",B(44,le)),r(),h("options",n.timeTypeOptions())("isClearable",!1),r(),h("ngModel",n.timeType()),r(12),h("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),h("ngModel",n.usageStatistics())("ngModelOptions",B(45,le))}},dependencies:[Y,Q,pt,Z,J,ee,gt,ne,x,q,at,lt,st,_t,dt,j,W,ot,H,rt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-level-10);z-index:1000;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-level-40)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{Ut as debounceSignal,re as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
`):[]}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=M({type:a,selectors:[["app-logs-stored"]],decls:13,vars:2,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let _;return _=$localize`No data available`,[e,t,n,_,[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){t&1&&(o(0,"spk-table",4),k("dataChange",function(l){return N(n.logs,l)||(n.logs=l),l}),o(1,"tr",5)(2,"th"),p(3,0),i(),o(4,"th"),p(5,1),i(),o(6,"th"),p(7,2),i(),I(8,"th"),i(),m(9,F,13,9,null,null,S),o(11,"div",6),p(12,3),i()()),t&2&&(D("data",n.logs),P("loading",n.logsLoading()),r(9),O(n.logs()))},dependencies:[
|
|
1
|
+
import{a as y,x as w}from"./chunk-P4ZFQZCA.js";import{h as B}from"./chunk-S5EF63OY.js";import{pa as $}from"./chunk-7L2WUS2V.js";import{Ab as S,Ac as A,Bb as m,Cb as O,Db as o,Eb as i,F as C,Fb as I,Jb as b,Rb as p,Ua as r,Vb as h,Wb as c,Z as T,ea as E,fa as L,gb as M,ic as s,jc as g,lb as f,nc as D,oc as N,pc as k,ub as P,va as d,vb as R,wb as G,yc as v,zb as x}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";function U(a,e){if(a&1&&(o(0,"li"),s(1),i()),a&2){let t=e.$implicit;r(),g(t)}}function X(a,e){if(a&1&&(o(0,"tr")(1,"td",10)(2,"code")(3,"ol",11),m(4,U,2,1,"li",null,S),i()()()()),a&2){let t=c().$implicit,n=c();r(),R("grid-column","1 / -1")("height","auto"),r(3),O(n.breakIntoLines(t.Exception))}}function F(a,e){if(a&1){let t=b();o(0,"tr",7),h("click",function(){let _=E(t).$index,l=c();return L(l.toggleRow(_))}),o(1,"td"),s(2),v(3,"date"),i(),o(4,"td",8),s(5),i(),o(6,"td"),s(7),i(),o(8,"td")(9,"button",9)(10,"spk-icon"),s(11,"caret-down"),i()()()(),f(12,X,6,4,"tr")}if(a&2){let t=e.$implicit,n=e.$index,_=c();r(2),g(A(3,6,t.Timestamp,"MMM dd. hh:mm")),r(3),g(t.BackupID>=0?t.BackupID:"-"),r(2),g(t.Message),r(2),G("rotated-icon",n===_.openRowIndex()),r(3),x(n===_.openRowIndex()?12:-1)}}var z=["BackupID","Timestamp","Message","actions"],u=class a{#e=T(B);displayedColumns=d(z);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(C(()=>this.logsLoading.set(!1))).subscribe({next:e=>{this.logs.set(e)}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
|
|
2
|
+
`):[]}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=M({type:a,selectors:[["app-logs-stored"]],decls:13,vars:2,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let _;return _=$localize`No data available`,[e,t,n,_,[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){t&1&&(o(0,"spk-table",4),k("dataChange",function(l){return N(n.logs,l)||(n.logs=l),l}),o(1,"tr",5)(2,"th"),p(3,0),i(),o(4,"th"),p(5,1),i(),o(6,"th"),p(7,2),i(),I(8,"th"),i(),m(9,F,13,9,null,null,S),o(11,"div",6),p(12,3),i()()),t&2&&(D("data",n.logs),P("loading",n.logsLoading()),r(9),O(n.logs()))},dependencies:[w,$,y],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{u as default};
|