@duplicati/ngclient 0.0.73 → 0.0.75
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-27WZKWHA.js +1 -0
- package/{chunk-NPTPCXGL.js → chunk-44756Q4J.js} +1 -1
- package/{chunk-TLE3RBQZ.js → chunk-47W7PRQ6.js} +1 -1
- package/chunk-4U7FEVBB.js +6 -0
- package/{chunk-GGE2QVTB.js → chunk-6UCUDY7Y.js} +1 -1
- package/chunk-6UENVGZZ.js +1 -0
- package/{chunk-7DFG7XLB.js → chunk-75LRDDG3.js} +1 -1
- package/{chunk-3IX6IFMC.js → chunk-AVE4TFNY.js} +1 -1
- package/{chunk-F2G22QDO.js → chunk-B2WGFVBU.js} +1 -1
- package/chunk-BATRQ3TX.js +1 -0
- package/{chunk-ZDKGDOMK.js → chunk-BH76PDAQ.js} +1 -1
- package/{chunk-5RREYMYL.js → chunk-BRC25F45.js} +1 -1
- package/{chunk-UWXUWL6K.js → chunk-EIXQH7S4.js} +1 -1
- package/chunk-GDAK2UGG.js +1 -0
- package/chunk-GJ6GRAEW.js +1 -0
- package/{chunk-RSKHLT37.js → chunk-GUYLCNVM.js} +1 -1
- package/{chunk-I24WOYYC.js → chunk-H7TJZPPJ.js} +1 -1
- package/{chunk-DDV6526X.js → chunk-HSJOAC3M.js} +1 -1
- package/{chunk-ME6FB7HY.js → chunk-JRIOZ5MP.js} +1 -1
- package/{chunk-LINJJMSY.js → chunk-JZQC7RPU.js} +1 -1
- package/{chunk-53QX2PXI.js → chunk-MLTG5TKC.js} +1 -1
- package/{chunk-W3KOTZHW.js → chunk-MO2Z6B4L.js} +1 -1
- package/{chunk-52DF5DLH.js → chunk-O6RVMQZJ.js} +1 -1
- package/{chunk-NONIM5EZ.js → chunk-OW3MZ4H6.js} +1 -1
- package/{chunk-GQLC6TYK.js → chunk-R7TYMWSG.js} +1 -1
- package/{chunk-NESEFSQ3.js → chunk-RHYWPAMY.js} +1 -1
- package/{chunk-NGOETFI3.js → chunk-VYEOCR5P.js} +1 -1
- package/{chunk-7DXV4HCW.js → chunk-WC5LGG33.js} +1 -1
- package/chunk-YBPSOGY5.js +1 -0
- package/index.html +1 -1
- package/main-LMBIECYV.js +1 -0
- package/package.json +1 -1
- package/chunk-2P3GS5BJ.js +0 -1
- package/chunk-3BW5OEST.js +0 -1
- package/chunk-ASPLJ6GL.js +0 -1
- package/chunk-CP2S6DC4.js +0 -1
- package/chunk-IGKAD6UF.js +0 -6
- package/chunk-QHSLOG7W.js +0 -1
- package/chunk-UOIY2QTL.js +0 -1
- package/main-PHZR6ITE.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-C6Q5SG76.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-R7TYMWSG.js")},{path:"destination",loadComponent:()=>import("./chunk-44756Q4J.js")},{path:"source-data",loadComponent:()=>import("./chunk-JRIOZ5MP.js")},{path:"schedule",loadComponent:()=>import("./chunk-AVE4TFNY.js")},{path:"options",loadComponent:()=>import("./chunk-BRC25F45.js")}];export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,d as b,e as c}from"./chunk-
|
|
1
|
+
import{c as a,d as b,e as c}from"./chunk-4U7FEVBB.js";import"./chunk-KYQC46J2.js";import"./chunk-CAGBL2MP.js";import"./chunk-DNHLTHLR.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-Z5NZYMJN.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ie}from"./chunk-I24WOYYC.js";import{a as ne}from"./chunk-CP2S6DC4.js";import{b as oe,d as ae,g as se,i as le,q as b}from"./chunk-UJWW7PS7.js";import{b as f}from"./chunk-KJ4O6F3R.js";import{a as re,b as _e,e as pe,g as ue,i as L,l as ce,o as de,p as Se,q as Te,r as me}from"./chunk-NQVULKI2.js";import{pa as te}from"./chunk-3WKDD2IN.js";import{a as ge}from"./chunk-GK7T43YY.js";import{Ab as P,Bb as N,Cb as l,Db as s,Eb as h,F as E,Ib as j,Mc as w,Ob as F,Pb as y,Qb as p,Sa as r,Tb as q,Ub as u,Vb as O,Z as c,ea as K,eb as C,fa as W,hb as V,hc as m,ic as $,jc as Z,kb as G,kc as J,lc as Y,mc as M,nc as D,oc as R,qa as k,tb as T,va as _,vb as d,xc as x,yb as U,yc as Q,zb as A,zc as ee}from"./chunk-Q3JJWGXW.js";var v=class o{#e=c(ge);transform(n,...t){return this.#e.locale(),this.#e(n).fromNow()}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=V({name:"appRelativeTime",type:o,pure:!0})};function Pe(o,n){if(o&1){let t=j();l(0,"spk-radio",10),u("click",function(){let i=K(t).$implicit,a=O();return W(a.pauseOption.set(i.value))}),m(1),s()}if(o&2){let t=n.$implicit,e=O();d("active",e.pauseOption()===t.value),r(),Z(" ",t.label," ")}}var Ne=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],B=class o{#e=c(f);pauseOptions=_(Ne);closed=k();isSubmitting=_(!1);pauseTransfers=_(!1);pauseOption=_(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let a;return a=$localize` Update settings `,[n,t,e,i,a,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(l(0,"header",5)(1,"h3"),p(2,0),s()(),l(3,"div",6)(4,"div",7),P(5,Pe,2,3,"spk-radio",8,A),s(),l(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),p(9,1),s(),l(10,"spk-alert",11),p(11,2),s()()(),l(12,"footer",12)(13,"button",13),u("click",function(){return e.closed.emit()}),p(14,3),s(),l(15,"button",14),u("click",function(){return e.submit()}),p(16,4),s()()),t&2&&(r(5),N(e.pauseOptions()),r(3),d("active",e.pauseTransfers()),r(7),d("loader",e.isSubmitting()))},dependencies:[b,Se,L,_e],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};function Me(o,n){if(o&1&&(l(0,"spk-option",14),m(1),s()),o&2){let t=n.$implicit;T("value",t),r(),$(t)}}function De(o,n){if(o&1&&(l(0,"spk-option",14),m(1),s()),o&2){let t=n.$implicit;T("value",t),r(),$(t)}}var Re=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],X={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ce=Object.entries(X).reduce((o,[n,t])=>(o[t]=n,o),{}),I=class o{#e=c(f);closed=k();isSubmitting=_(!1);sizeOptions=_(Re);maxUploadActive=_(!1);maxDownloadActive=_(!1);maxUpload=_(0);maxDownload=_(0);maxUploadUnit=_("MByte/s");maxDownloadUnit=_("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",a=e[1]??"",S=t[2]??"MB",g=e[2]??"MB",fe=i===""?10:parseInt(i),Ae=a===""?10:parseInt(a);console.log(i),this.maxUploadUnit.set(Ce[S]+"/s"),this.maxDownloadUnit.set(Ce[g]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(a!==""),this.maxUpload.set(fe),this.maxDownload.set(Ae)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${X[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${X[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:30,vars:14,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let e;e=$localize` Max download speed `;let i;i=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let a;a=$localize`Cancel`;let S;return S=$localize` Update settings `,[n,t,e,i,a,S,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"hideClearButton"],["type","text",3,"ngModelChange","ngModel"],[3,"value"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(l(0,"header",6)(1,"h3"),p(2,0),s()(),l(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),p(7,1),s(),l(8,"spk-form-field")(9,"input",11),u("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(e.maxUpload,a)||(e.maxUpload=a),a}),s()(),l(10,"spk-select",12)(11,"input",13),R("ngModelChange",function(a){return D(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),s(),P(12,Me,2,2,"spk-option",14,A),s()(),l(14,"div",9)(15,"spk-checkbox",10),u("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),p(16,2),s(),l(17,"spk-form-field")(18,"input",11),u("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(e.maxDownload,a)||(e.maxDownload=a),a}),s()(),l(19,"spk-select",12)(20,"input",13),R("ngModelChange",function(a){return D(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),s(),P(21,De,2,2,"spk-option",14,A),s()(),l(23,"p"),p(24,3),s()()(),l(25,"footer",15)(26,"button",16),u("click",function(){return e.closed.emit(!1)}),p(27,4),s(),l(28,"button",17),u("click",function(){return e.submit()}),p(29,5),s()()),t&2&&(r(6),d("active",e.maxUploadActive()),r(3),M("ngModel",e.maxUpload),T("disabled",!e.maxUploadActive()),r(),T("hideClearButton",!0),r(),M("ngModel",e.maxUploadUnit),r(),N(e.sizeOptions()),r(3),d("active",e.maxDownloadActive()),r(3),M("ngModel",e.maxDownload),T("disabled",!e.maxDownloadActive()),r(),T("hideClearButton",!0),r(),M("ngModel",e.maxDownloadUnit),r(),N(e.sizeOptions()),r(7),d("loader",e.isSubmitting()))},dependencies:[b,oe,le,ae,se,me,Te,ce,L],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Ie(o,n){if(o&1&&(l(0,"div"),m(1),s(),h(2,"spk-progress-bar",7)),o&2){let t=O();r(),J("",t.statusData().actionText," - ",t.statusData().statusText,""),r(),T("value",t.statusData().progress*100)}}function ke(o,n){if(o&1&&(l(0,"div",4),m(1),x(2,"appRelativeTime"),x(3,"date"),s()),o&2){let t,e=O();r(),Y(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",Q(2,3,e.nextBackup().time)," at ",ee(3,5,e.nextBackup().time,"shortTime")," ")}}function he(o,n){o&1&&(l(0,"div",4),p(1,1),s())}function Fe(o,n){o&1&&(F(0,0,1),h(1,"spk-icon"),y())}function ye(o,n){o&1&&(F(0,0,2),h(1,"spk-icon"),y())}var Oe=new Date,H=class o{#e=c(f);#t=c(ie);#n=c(pe);#i=c(ne);minsAgo=Oe.setMinutes(Oe.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=w(()=>this.serverState()?.ProgramState==="Running");isResuming=_(!1);nextBackup=w(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(I,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(B,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(E(()=>this.isResuming.set(!1))).subscribe()}ngAfterViewInit(){let n=this.#i.relayIsEnabled()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-status-bar"]],decls:13,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*8:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*8:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*9:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*9:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=q(n);let t;return t=$localize`Loading...`,[n,t,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(l(0,"div",2)(1,"div",3),G(2,Ie,3,3)(3,ke,4,8,"div",4)(4,he,2,0,"div",4),s(),l(5,"div",5)(6,"button",6),u("click",function(){return e.pauseResume()}),F(7,0),G(8,Fe,2,0)(9,ye,2,0),y(),s(),l(10,"button",6),u("click",function(){return e.openThrottleSettingsDialog()}),l(11,"spk-icon"),m(12,"speedometer"),s()()()()),t&2){let i;r(2),U((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:4),r(4),d("loader",e.isResuming()),r(2),U(e.isRunning()?8:9)}},dependencies:[de,v,te,re,ue],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{H as a};
|
|
1
|
+
import{a as ie}from"./chunk-H7TJZPPJ.js";import{b as oe,d as ae,g as se,i as le,q as b}from"./chunk-UJWW7PS7.js";import{a as ne}from"./chunk-BATRQ3TX.js";import{b as A}from"./chunk-KJ4O6F3R.js";import{a as _e,b as re,e as pe,g as ue,i as v,l as ce,o as de,p as Se,q as Te,r as me}from"./chunk-NQVULKI2.js";import{pa as te}from"./chunk-3WKDD2IN.js";import{a as ge}from"./chunk-GK7T43YY.js";import{Ab as P,Bb as N,Cb as l,Db as s,Eb as h,F as E,Ib as j,Mc as w,Ob as F,Pb as y,Qb as p,Sa as _,Tb as q,Ub as u,Vb as O,Z as c,ea as K,eb as C,fa as W,hb as V,hc as m,ic as $,jc as Z,kb as G,kc as J,lc as Y,mc as M,nc as D,oc as R,qa as k,tb as T,va as r,vb as d,xc as x,yb as U,yc as Q,zb as f,zc as ee}from"./chunk-Q3JJWGXW.js";var L=class o{#e=c(ge);transform(n,...t){return this.#e.locale(),this.#e(n).fromNow()}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=V({name:"appRelativeTime",type:o,pure:!0})};function Pe(o,n){if(o&1){let t=j();l(0,"spk-radio",10),u("click",function(){let i=K(t).$implicit,a=O();return W(a.pauseOption.set(i.value))}),m(1),s()}if(o&2){let t=n.$implicit,e=O();d("active",e.pauseOption()===t.value),_(),Z(" ",t.label," ")}}var Ne=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],B=class o{#e=c(A);pauseOptions=r(Ne);closed=k();isSubmitting=r(!1);pauseTransfers=r(!1);pauseOption=r(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let a;return a=$localize` Update settings `,[n,t,e,i,a,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(l(0,"header",5)(1,"h3"),p(2,0),s()(),l(3,"div",6)(4,"div",7),P(5,Pe,2,3,"spk-radio",8,f),s(),l(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),p(9,1),s(),l(10,"spk-alert",11),p(11,2),s()()(),l(12,"footer",12)(13,"button",13),u("click",function(){return e.closed.emit()}),p(14,3),s(),l(15,"button",14),u("click",function(){return e.submit()}),p(16,4),s()()),t&2&&(_(5),N(e.pauseOptions()),_(3),d("active",e.pauseTransfers()),_(7),d("loader",e.isSubmitting()))},dependencies:[b,Se,v,re],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};function Me(o,n){if(o&1&&(l(0,"spk-option",14),m(1),s()),o&2){let t=n.$implicit;T("value",t),_(),$(t)}}function De(o,n){if(o&1&&(l(0,"spk-option",14),m(1),s()),o&2){let t=n.$implicit;T("value",t),_(),$(t)}}var Re=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],X={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ce=Object.entries(X).reduce((o,[n,t])=>(o[t]=n,o),{}),I=class o{#e=c(A);closed=k();isSubmitting=r(!1);sizeOptions=r(Re);maxUploadActive=r(!1);maxDownloadActive=r(!1);maxUpload=r(0);maxDownload=r(0);maxUploadUnit=r("MByte/s");maxDownloadUnit=r("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",a=e[1]??"",S=t[2]??"MB",g=e[2]??"MB",Ae=i===""?10:parseInt(i),fe=a===""?10:parseInt(a);console.log(i),this.maxUploadUnit.set(Ce[S]+"/s"),this.maxDownloadUnit.set(Ce[g]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(a!==""),this.maxUpload.set(Ae),this.maxDownload.set(fe)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${X[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${X[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:30,vars:14,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let e;e=$localize` Max download speed `;let i;i=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let a;a=$localize`Cancel`;let S;return S=$localize` Update settings `,[n,t,e,i,a,S,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"hideClearButton"],["type","text",3,"ngModelChange","ngModel"],[3,"value"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(l(0,"header",6)(1,"h3"),p(2,0),s()(),l(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),p(7,1),s(),l(8,"spk-form-field")(9,"input",11),u("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(e.maxUpload,a)||(e.maxUpload=a),a}),s()(),l(10,"spk-select",12)(11,"input",13),R("ngModelChange",function(a){return D(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),s(),P(12,Me,2,2,"spk-option",14,f),s()(),l(14,"div",9)(15,"spk-checkbox",10),u("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),p(16,2),s(),l(17,"spk-form-field")(18,"input",11),u("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(e.maxDownload,a)||(e.maxDownload=a),a}),s()(),l(19,"spk-select",12)(20,"input",13),R("ngModelChange",function(a){return D(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),s(),P(21,De,2,2,"spk-option",14,f),s()(),l(23,"p"),p(24,3),s()()(),l(25,"footer",15)(26,"button",16),u("click",function(){return e.closed.emit(!1)}),p(27,4),s(),l(28,"button",17),u("click",function(){return e.submit()}),p(29,5),s()()),t&2&&(_(6),d("active",e.maxUploadActive()),_(3),M("ngModel",e.maxUpload),T("disabled",!e.maxUploadActive()),_(),T("hideClearButton",!0),_(),M("ngModel",e.maxUploadUnit),_(),N(e.sizeOptions()),_(3),d("active",e.maxDownloadActive()),_(3),M("ngModel",e.maxDownload),T("disabled",!e.maxDownloadActive()),_(),T("hideClearButton",!0),_(),M("ngModel",e.maxDownloadUnit),_(),N(e.sizeOptions()),_(7),d("loader",e.isSubmitting()))},dependencies:[b,oe,le,ae,se,me,Te,ce,v],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Ie(o,n){if(o&1&&(l(0,"div"),m(1),s(),h(2,"spk-progress-bar",8)),o&2){let t=O();_(),J("",t.statusData().actionText," - ",t.statusData().statusText,""),_(),T("value",t.statusData().progress*100)}}function ke(o,n){if(o&1&&(l(0,"div",5),m(1),x(2,"appRelativeTime"),x(3,"date"),s()),o&2){let t,e=O();_(),Y(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",Q(2,3,e.nextBackup().time)," at ",ee(3,5,e.nextBackup().time,"shortTime")," ")}}function he(o,n){o&1&&(l(0,"div",5),p(1,1),s())}function Fe(o,n){o&1&&(l(0,"div",5),p(1,2),s())}function ye(o,n){o&1&&(F(0,0,1),h(1,"spk-icon"),y())}function be(o,n){o&1&&(F(0,0,2),h(1,"spk-icon"),y())}var Oe=new Date,H=class o{#e=c(A);#t=c(ie);#n=c(pe);#i=c(ne);minsAgo=Oe.setMinutes(Oe.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=w(()=>this.serverState()?.ProgramState==="Running");isResuming=r(!1);nextBackup=w(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(I,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(B,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(E(()=>this.isResuming.set(!1))).subscribe()}ngAfterViewInit(){let n=this.#i.relayIsEnabled()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=q(n);let t;t=$localize`No scheduled tasks`;let e;return e=$localize`Loading...`,[n,t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(l(0,"div",3)(1,"div",4),G(2,Ie,3,3)(3,ke,4,8,"div",5)(4,he,2,0,"div",5)(5,Fe,2,0,"div",5),s(),l(6,"div",6)(7,"button",7),u("click",function(){return e.pauseResume()}),F(8,0),G(9,ye,2,0)(10,be,2,0),y(),s(),l(11,"button",7),u("click",function(){return e.openThrottleSettingsDialog()}),l(12,"spk-icon"),m(13,"speedometer"),s()()()()),t&2){let i;_(2),U((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),_(5),d("loader",e.isResuming()),_(2),U(e.isRunning()?9:10)}},dependencies:[de,L,te,_e,ue],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{H as a};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as We}from"./chunk-KYQC46J2.js";import{a as Ue}from"./chunk-CAGBL2MP.js";import{a as Nt,b as Wt}from"./chunk-DNHLTHLR.js";import{b as H}from"./chunk-6CRYB4HA.js";import{a as pt}from"./chunk-22GS6UCG.js";import{a as nt}from"./chunk-Z5NZYMJN.js";import{a as Re,b as se,c as Ee,d as le,e as ye,f as ct,g as Kt,h as Pe,i as Ge,k as mt,l as Ne,m as be,n as zt,o as Ae,p as ne,q as ut,r as Oe}from"./chunk-UJWW7PS7.js";import{b as He}from"./chunk-KJ4O6F3R.js";import{a as De,c as ae}from"./chunk-ETEYALHD.js";import{a as pe,b as _t,d as Xt,e as Ht,g as Ve,i as dt,l as ce,n as Ft,o as jt,q as me,r as ue,w as Le,x as je}from"./chunk-NQVULKI2.js";import{c as Bt}from"./chunk-6LUM2XU4.js";import{ia as lt}from"./chunk-3WKDD2IN.js";import{$b as X,Ab as I,Ac as at,B as Et,Bb as v,Cb as a,Db as r,Eb as _,F as Ze,Fb as W,Gb as q,Hb as Ke,Ib as k,Mc as K,Ob as g,Oc as st,Pb as C,Qb as M,Rb as Je,Sa as s,Sb as et,T as we,Tb as xe,Ub as D,Vb as p,Yb as j,Z as $,Za as fe,_b as Q,ea as f,eb as re,ec as Se,fa as S,fc as Te,gc as he,hc as m,ic as Y,ja as wt,jc as V,kb as d,kc as Pt,l as Dt,mc as Gt,nc as bt,oc as Vt,q as Ye,qa as yt,ra as Rt,tb as c,tc as Lt,uc as ze,va as O,vb as $e,vc as Ut,wc as tt,yb as F,zb as x}from"./chunk-Q3JJWGXW.js";import{a as N,c as Mt}from"./chunk-C6Q5SG76.js";var gt=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var ke=class e{#e=$(He);s3Providers=H(this.getS3Config("Providers"));s3Regions=H(this.getS3Config("Regions"));s3RegionHosts=H(this.getS3Config("RegionHosts"));s3StorageClasses=H(this.getS3Config("StorageClasses"));storjSatellites=H(this.getStorjConfig("Satellites"));storjAuthenticationMethods=H(this.getStorjConfig("AuthenticationMethods"));openstackProviders=H(this.getOpenstackConfig("Providers"));openstackVersions=H(this.getOpenstackConfig("Versions"));gcsLocations=H(this.getGcsConfig("Locations"));gcsStorageClasses=H(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Ye(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Ye(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Ye(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Ye(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){return e==null?"":":"+e.toString()}function oe(e){return e==null?"":e.startsWith("/")?e:"/"+e}function R(e,n){let t={},o={};return n.searchParams.forEach((i,l)=>{ve.find(u=>u.key===e)?.dynamicFields?.includes(l)?o[l]=decodeURIComponent(i):t[l]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function G(e,n=!1){let t=e.map(([i,l])=>`${i}=${l?encodeURIComponent(l.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function Ct(e){let n=e.destinationType,t=ve.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function At(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return ve.find(u=>u.customKey===t||u.key===t)?.mapper.from(t,new URL("http://localhost"),e);let l=new URL(i);if(!n)throw new Error("Invalid target path");return ve.find(u=>u.customKey===t||u.key===t)?.mapper.from(t,l,e)}var T=new ne,ve=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>T.control(e??"")}},mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],u=i.startsWith("%")?i:"/"+i;return N({destinationType:e,custom:{path:u}},R(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>T.control(e??"",[Ee.required,Ee.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>O([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return console.log("pathWithoutPrefixSlash",o),N({destinationType:e,custom:{server:n.hostname,path:o}},R(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>T.control(e??"",[Ee.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([l])=>!["rclone-remote-repository","rclone-remote-path"].includes(l)),i=G([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=R(e,n);return N({destinationType:e,dynamic:N({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(ke).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(ke).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],l=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([u])=>u!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Be(n)+oe(o)+l}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([l])=>l!=="use-ssl")]);return`${e.destinationType}://${t+Be(n)+oe(o)+i}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>T.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:l}=e.custom,u={"auth-username":i,"auth-password":l},h=e.dynamic["use-ssl"],P=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([A])=>A!=="use-ssl"),...Object.entries(u)]);return`${e.destinationType}${h?"s":""}://${t+Be(n)+oe(o)+P}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:l}=e.custom,u={"auth-username":i,"auth-password":l},h=G([...Object.entries(e.advanced),...Object.entries(u)]);return`${e.destinationType}://${t+oe(n)+oe(o)+h}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return N({destinationType:e,custom:{server:n.hostname,share:o,path:i}},R(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},R(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(ke).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},R(e,n))}}];var qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,ft=class e{generate(n,t=qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var an=["formRef"];function sn(e,n){if(e&1&&(a(0,"spk-option",27),m(1),r()),e&2){let t=n.$implicit;c("value",t.Key),s(),Y(t.DisplayName)}}function ln(e,n){if(e&1&&_(0,"spk-progress-bar",38),e&2){let t=p(3);$e("warn",t.calculatePasswordStrength()===1)("tertiary",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function pn(e,n){e&1&&(a(0,"span",33),M(1,9),r())}function cn(e,n){e&1&&(g(0,7,1),_(1,"spk-icon"),C())}function mn(e,n){e&1&&(g(0,7,2),_(1,"spk-icon"),C())}function un(e,n){e&1&&(g(0,10,1),_(1,"spk-icon",40),C())}function _n(e,n){e&1&&(g(0,10,2),_(1,"spk-icon"),C())}function dn(e,n){if(e&1){let t=k();a(0,"button",39),D("click",function(){f(t);let i=p(3);return S(i.copyPassword())}),g(1,10),d(2,un,2,0)(3,_n,2,0),C(),r()}if(e&2){let t=p(3);s(2),F(t.copiedPassword()?2:3)}}function Fn(e,n){e&1&&(a(0,"spk-alert",37),M(1,11),r())}function gn(e,n){if(e&1){let t=k();a(0,"div",28)(1,"spk-form-field")(2,"label",29),g(3,6),_(4,"sup"),C(),r(),_(5,"input",30),r(),d(6,ln,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),_(8,"input",32),d(9,pn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),D("click",function(){f(t);let i=p(2);return S(i.showPassword.set(!i.showPassword()))}),g(12,7),d(13,cn,2,0)(14,mn,2,0),C(),r(),a(15,"button",35),D("click",function(){f(t);let i=p(2);return S(i.generatePassword())}),g(16,8),_(17,"spk-icon"),C(),r(),d(18,dn,4,1,"button",36),r(),d(19,Fn,2,0,"spk-alert",37),r()}if(e&2){let t=p(2);s(5),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.password?6:-1),s(2),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),s(4),F(t.showPassword()?13:14),s(5),F(t.showCopyPassword()?18:-1),s(),F(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function Cn(e,n){if(e&1&&(a(0,"spk-select",24)(1,"label",25),M(2,5),r(),_(3,"input",26),I(4,sn,2,2,"spk-option",27,x),r(),d(6,gn,20,7,"div",28)),e&2){let t=p();c("displayFn",t.displayFn()),s(4),v(t.encryptionOptions()),s(2),F(t.encryptionFieldSignal()!==""?6:-1)}}function fn(e,n){if(e&1&&(a(0,"button",22),g(1,12),_(2,"spk-icon"),C(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function Sn(e,n){if(e&1&&(a(0,"spk-tooltip",23)(1,"button",22),g(2,13),_(3,"spk-icon"),C(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),s(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var qe=new ne,Qt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>qe.group({name:qe.control(e.name,[Ee.required]),description:qe.control(e.description),encryption:qe.control(e.encryption,[Wt()]),password:qe.control(e.password,[Nt(n=>n?.value.encryption!=="",[Ee.required])]),repeatPassword:qe.control(e.repeatPassword,[Nt(n=>n?.value.encryption!=="",[Ee.required])])}),kt={Key:"",DisplayName:"None"},Ot=class e{#e=$(ae);#t=$(De);#o=$(ft);#i=$(_e);#n=$(pt);formRef=fe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=O(!1);copiedPassword=O(!1);showCopyPassword=O(!1);encryptionEffect=st(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=K(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[kt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Se(o.formRef,an,5),t&2&&Te()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let l;l=$localize`Backup description`;let u;u=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let h;h=$localize`Encryption`;let P;P=$localize`Encryption`;let A;A=$localize`Password`;let b;b=$localize`Repeat password`;let B;B=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let Z;Z=$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:`,Z=xe(Z);let U;U=$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 te;te=$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:`,te=xe(te);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let y;y=$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",""],o,i,l,u,P,B,Z,U,J,te,E,y,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"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"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",h,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",A,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"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(t,o){if(t&1){let i=k();a(0,"form",14,0),D("submit",function(){return f(i),S(o.next())}),a(2,"h3",15),M(3,1),r(),a(4,"spk-form-field")(5,"label",16),g(6,2),_(7,"sup"),C(),r(),_(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),M(11,3),r(),_(12,"textarea",19),r(),d(13,Cn,7,2),a(14,"div",20)(15,"button",21),D("click",function(){return f(i),S(o.exit())}),g(16,4),_(17,"spk-icon"),C(),r(),d(18,fn,3,1,"button",22)(19,Sn,4,2,"spk-tooltip",23),r()()}t&2&&(c("formGroup",o.generalForm),s(13),F(o.isNew()?13:-1),s(5),F(o.encryptionFieldSignal()===""?18:19))},dependencies:[Oe,Pe,se,le,ye,Ne,Ae,ce,ue,Ve,pe,me,jt,_t,je],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(--warn-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})};var Tn=["formRef"],hn=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),Dn=e=>({$implicit:e});function En(e,n){e&1&&(g(0,4,1),_(1,"spk-icon",16),C())}function yn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Pn(e,n){e&1&&(a(0,"p",16),M(1,10),r())}function Nn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.name)}}function An(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",32,2),D("click",function(){let i=f(t).$implicit,l=p();return S(l.addNewOption(i))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function On(e,n){e&1&&Ke(0)}function kn(e,n){if(e&1&&d(0,On,1,0,"ng-container",33),e&2){let t=n.$implicit,o=n.$index;p();let i=he(38);c("ngTemplateOutlet",i)("ngTemplateOutletContext",ze(5,Dn,Ut(2,hn,o,t)))}}function $n(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xn(e,n){if(e&1&&(a(0,"app-file-tree",36)(1,"label",42),m(2),d(3,$n,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function In(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function vn(e,n){if(e&1&&(a(0,"app-file-tree",37)(1,"label",42),m(2),d(3,In,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Mn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function wn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"link"),r())}function Rn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"textbox"),r())}function Gn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,Mn,3,1,"spk-tooltip",43),r(),_(4,"input",44),d(5,wn,2,0,"spk-icon",45)(6,Rn,2,0,"spk-icon",45),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),s(),F(o.formView.type==="Path"?5:6)}}function bn(e,n){if(e&1){let t=k();a(0,"span",49),D("click",function(){f(t);let i=p(2).$implicit,l=p();return S(l.oauthStartTokenCreation(i.formViewType))}),m(1,"AuthID"),r()}}function Vn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"password"),r())}function Ln(e,n){if(e&1){let t=k();a(0,"spk-icon",50),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function Un(e,n){if(e&1){let t=k();a(0,"spk-icon",50),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function Bn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),r(),_(3,"input",46),d(4,bn,2,0,"span",47)(5,Vn,2,0,"spk-icon",45)(6,Ln,2,0,"spk-icon",48)(7,Un,2,0,"spk-icon",48),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function Kn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function zn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Xn(e,n){if(e&1&&(a(0,"spk-select")(1,"label",42),m(2),d(3,Kn,3,1,"spk-tooltip",43),r(),_(4,"input",51),I(5,zn,2,2,"spk-option",19,x),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function Hn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function jn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Wn(e,n){if(e&1&&(a(0,"div",38)(1,"label",42),m(2),d(3,Hn,3,1,"spk-tooltip",43),r(),a(4,"div",52)(5,"spk-form-field"),_(6,"input",53),a(7,"spk-icon",45),m(8,"resize"),r()(),a(9,"spk-select"),_(10,"label")(11,"input",54),I(12,jn,2,2,"spk-option",19,x),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),Q("id","destination-",o.formGroupName,"-",o.index,""),s(6),v(i.sizeOptions())}}function qn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,qn,3,1,"spk-tooltip",43),r(),_(4,"input",55),a(5,"spk-icon",45),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Yn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&(a(0,"spk-toggle",39)(1,"label",42),m(2),d(3,Yn,3,1,"spk-tooltip",43),r(),_(4,"input",56),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Jn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function eo(e,n){e&1&&(a(0,"spk-option",58),m(1,"None"),r()),e&2&&c("value","None")}function to(e,n){if(e&1&&(a(0,"spk-option",19),m(1),_(2,"spk-checkbox",59),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function no(e,n){if(e&1&&d(0,eo,2,1,"spk-option",58)(1,to,3,2,"spk-option",19),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function oo(e,n){if(e&1&&(a(0,"spk-select",40)(1,"label",42),m(2),d(3,Jn,3,1,"spk-tooltip",43),r(),_(4,"input",57),I(5,no,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function io(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ro(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,io,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function ao(e,n){if(e&1){let t=k();a(0,"div",34),W(1,35),d(2,xn,5,14,"app-file-tree",36)(3,vn,5,10,"app-file-tree",37)(4,Gn,7,10,"spk-form-field")(5,Bn,8,11,"spk-form-field")(6,Xn,7,9,"spk-select")(7,Wn,14,9,"div",38)(8,Qn,7,9,"spk-form-field")(9,Zn,5,9,"spk-toggle",39)(10,oo,7,7,"spk-select",40)(11,ro,5,9,"spk-form-field"),q(),a(12,"button",41),D("click",function(){let i=f(t).$implicit,l=p();return S(l.removeFormView(i.formView,0))}),a(13,"spk-icon"),m(14,"x-circle"),r()()()}if(e&2){let t=n.$implicit;s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="Size"?7:t.formView.type==="Integer"?8:t.formView.type==="Boolean"?9:t.formView.type==="Flags"?10:t.formView.type==="Timespan"?11:-1)}}var Qe=new ne,Yt=["Bytes","KB","MB","GB","TB","PB"],so=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],lo=1024*1024*1024*2,po=1024*1024*5,Zt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Qe.group({remoteVolumeSize:Qe.group({size:Qe.control(e.remoteVolumeSize),unit:Qe.control(e.size)}),backupRetention:Qe.control(e.backupRetention),advancedOptions:Qe.group({})}),$t=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=O(Yt);retentionOptions=O(so);volumeSizeSignal=H(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Et(300))??Dt(null));volumeUnitSignal=H(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Et(300))??Dt(null));exceededVolumeSize=K(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,Yt.indexOf(t));return o>lo||o<po});oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.retentionOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Tn,5),t&2&&Te()},decls:46,vars:7,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#18\uFFFD"}:START_LINK: Read more ${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#18\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let u;u=$localize` Advanced options ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#30\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#32\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*34:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*34:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_MENU:`,u=xe(u);let h;h=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let P;P=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let A;return A=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],["fieldTemplate",""],["option",""],t,o,i,l,u,h,P,A,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["type","text","placeholder",n,"formControlName","unit"],[3,"value"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",11,0),D("submit",function(){return f(i),S(o.submit())}),a(2,"h3",12),M(3,3),r(),a(4,"div",13)(5,"div",14)(6,"spk-form-field")(7,"label",15),g(8,4),d(9,En,2,0,"spk-icon",16),C(),r(),_(10,"input",17),r(),a(11,"spk-select"),_(12,"input",18),I(13,yn,2,2,"spk-option",19,x),r()(),d(15,Pn,2,0,"p",16),a(16,"p"),g(17,5),a(18,"a",20),_(19,"spk-icon",21),r(),C(),r()(),a(20,"spk-select",22)(21,"label",15),M(22,6),r(),_(23,"input",23),I(24,Nn,2,2,"spk-option",19,x),r(),a(26,"app-toggle-card",24),W(27,25),g(28,7),a(29,"spk-menu")(30,"button",26),_(31,"spk-icon"),r(),W(32,27),I(33,An,3,1,"button",28,x),q(),r(),C(),q(),I(35,kn,1,7,"ng-container",null,x),r(),d(37,ao,15,2,"ng-template",null,1,at),a(39,"div",29)(40,"button",30),D("click",function(){return f(i),S(o.goBack())}),g(41,8),_(42,"spk-icon"),C(),r(),a(43,"button",31),g(44,9),_(45,"spk-icon"),C(),r()()()}t&2&&(c("formGroup",o.optionsForm),s(9),F(o.exceededVolumeSize()?9:-1),s(4),v(o.sizeOptions()),s(2),F(o.exceededVolumeSize()?15:-1),s(5),c("displayFn",o.retentionOptionDisplayFn()),s(4),v(o.retentionOptions()),s(2),c("disallowToggle",!0),s(7),v(o.nonSelectedOptions()),s(2),v(o.selectedOptions()),s(8),$e("loader",o.isSubmitting()))},dependencies:[Oe,Pe,se,Ge,Re,le,ye,Ne,Ae,be,lt,Ft,ue,Ve,pe,ce,Le,dt,me,je,We,Ue],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}.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 co=["formRef"];function mo(e,n){if(e&1&&(a(0,"spk-option",38),m(1),r()),e&2){let t=n.$implicit;c("value",t.key),s(),Y(t.label)}}function uo(e,n){if(e&1){let t=k();a(0,"div",26)(1,"spk-form-field")(2,"label",27),M(3,8),r(),a(4,"input",28,1),D("focus",function(){f(t);let i=he(5);return S(i.showPicker())}),r(),a(6,"spk-icon",29),m(7,"clock"),r()(),a(8,"spk-form-field"),_(9,"label",30),a(10,"input",31,2),D("focus",function(){f(t);let i=he(11);return S(i.showPicker())}),r(),a(12,"spk-icon",29),m(13,"calendar"),r()()(),W(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),M(18,9),r(),_(19,"input",35),r(),a(20,"spk-select",36),_(21,"input",37),I(22,mo,2,2,"spk-option",38,x),r()(),a(24,"app-toggle-card",39),W(25,40),M(26,10),q(),a(27,"div",41)(28,"spk-toggle",21),g(29,11),_(30,"input",42),C(),r(),a(31,"spk-toggle",21),g(32,12),_(33,"input",43),C(),r(),a(34,"spk-toggle",21),g(35,13),_(36,"input",44),C(),r(),a(37,"spk-toggle",21),g(38,14),_(39,"input",45),C(),r(),a(40,"spk-toggle",21),g(41,15),_(42,"input",46),C(),r(),a(43,"spk-toggle",21),g(44,16),_(45,"input",47),C(),r(),a(46,"spk-toggle",21),g(47,17),_(48,"input",48),C(),r()()(),q()}if(e&2){let t=p();s(20),c("displayFn",t.displayFn),s(2),v(t.unitOptions),s(2),c("disallowToggle",!0)}}var ee=new ne,Jt=[{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`}],en=(e={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}}})=>ee.group({autoRun:ee.control(e.autoRun),nextTime:ee.group({time:ee.control(e.nextTime.time),date:ee.control(e.nextTime.date)}),runAgain:ee.group({repeatValue:ee.control(e.runAgain.repeatValue),repeatUnit:ee.control(e.runAgain.repeatUnit),allowedDays:ee.group({mon:ee.control(e.runAgain.allowedDays.mon),tue:ee.control(e.runAgain.allowedDays.tue),wed:ee.control(e.runAgain.allowedDays.wed),thu:ee.control(e.runAgain.allowedDays.thu),fri:ee.control(e.runAgain.allowedDays.fri),sat:ee.control(e.runAgain.allowedDays.sat),sun:ee.control(e.runAgain.allowedDays.sun)})})}),xt=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Jt;displayFn(n){let t=Jt.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Se(o.formRef,co,5),t&2&&Te()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let l;l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let u;u=$localize`Next time`;let h;h=$localize`Run again every`;let P;P=$localize`Allowed days`;let A;A=$localize` Monday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Tuesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Wednesday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Thursday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let te;return te=$localize` Sunday ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,l,u,h,P,A,b,B,Z,U,J,te,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",18,0),D("submit",function(){return f(i),S(o.next())}),a(2,"h3",19),M(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),g(6,4),_(7,"input",22),C(),r(),a(8,"p"),M(9,5),r()(),d(10,uo,49,2),a(11,"div",23)(12,"button",24),D("click",function(){return f(i),S(o.goBack())}),g(13,6),_(14,"spk-icon"),C(),r(),a(15,"button",25),g(16,7),_(17,"spk-icon"),C(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),s(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Oe,Pe,se,Ge,Re,le,ye,Ne,Ae,be,ce,ue,me,Le,pe,Ve,Ue],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}.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 _o(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.key)}}function Fo(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.key)}}function go(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",5),D("ngModelChange",function(i){f(t);let l=p(2);return S(l.updateStateExpression(i))}),r(),I(2,Fo,2,2,"spk-option",2,x),r()}if(e&2){let t,o=p(2);c("hideClearButton",!0)("displayFn",o.displayFn),s(),c("ngModel",(t=o.pathState())==null?null:t.expression),s(),v(o.fileGroupOptions())}}function Co(e,n){if(e&1){let t=k();a(0,"spk-form-field")(1,"input",5),D("ngModelChange",function(i){f(t);let l=p(2);return S(l.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);s(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function fo(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",1),D("ngModelChange",function(i){f(t);let l=p();return S(l.updateStateType(i))}),r(),I(2,_o,2,2,"spk-option",2,x),r(),d(4,go,4,3,"spk-select",0)(5,Co,2,1,"spk-form-field"),a(6,"div",3),D("click",function(){f(t);let i=p();return S(i.removeFilter())}),a(7,"spk-icon",4),m(8,"x-circle"),r()()}if(e&2){let t,o,i=p();c("hideClearButton",!0)("displayFn",i.displayFn),s(),c("ngModel",(t=i.pathState())==null?null:t.type),s(),v(i.expressionOptions()),s(2),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?4:5)}}var tn=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{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"}],So=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],St=class e{path=Rt.required();pathChange=yt();remove=yt();expressionOptions=O(tn);fileGroupOptions=O(So);pathState=O(null);typeState=K(()=>{let n=this.pathState();return n?n.type:null});pathEffect=st(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+";return t.startsWith("/")&&t.endsWith("/")?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith("*/")?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith("[^\\/]*]")?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1);if(o==="Folder"){let i=n.expression.endsWith("/"),l=n.expression.startsWith("/");return i&&l?`${t}${n.expression}`:i?`${t}${n.expression}/`:l?`${t}/${n.expression}`:`${t}/${n.expression}/`}return o==="FolderNameIncludes"?`${t}*${n.expression}*/`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\/]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=tn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&d(0,fo,9,4),t&2&&F(o.pathState()?0:-1)},dependencies:[ut,se,le,Kt,ue,me,pe,ce],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var To=["formRef"];function ho(e,n){if(e&1){let t=k();a(0,"app-filter",42),D("pathChange",function(i){let l=f(t).$index,u=p(2);return S(u.patchPathAt(i,l))})("remove",function(){let i=f(t).$index,l=p(2);return S(l.removePathAt(i))}),r()}if(e&2){let t=n.$implicit;c("path",t)}}function Do(e,n){if(e&1&&I(0,ho,1,1,"app-filter",41,x),e&2){let t=p();v(t.pathArray())}}function Eo(e,n){if(e&1&&(a(0,"spk-option",45),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function yo(e,n){if(e&1&&(a(0,"div",40)(1,"spk-form-field"),_(2,"input",43),r(),a(3,"spk-select"),_(4,"input",44),I(5,Eo,2,2,"spk-option",45,x),r()()),e&2){let t=p();s(5),v(t.sizeOptions())}}var Me=new ne,Po=["Bytes","KB","MB","GB","TB","PB"],nn=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Me.group({path:Me.control(e.path),excludes:Me.group({hidden:Me.control(e.excludes.hidden),system:Me.control(e.excludes.system),temporary:Me.control(e.excludes.temporary),filesLargerThan:Me.group({size:Me.control(null),unit:Me.control(null)})})}),It=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=K(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=O(Po);pathSignal=H(this.sourceDataForm.controls.path.valueChanges);pathArray=K(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+"))??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(u=>!u.startsWith("-")&&!u.startsWith("+")).join("\0"),l=this.pathArray().map((u,h)=>h===t?`${n}`:`${u}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${l}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")).join("\0"),i=this.pathArray().filter((l,u)=>u!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\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;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Se(o.formRef,To,5),t&2&&Te()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let l;l=$localize`Temporary files`;let u;u=$localize`Source Data`;let h;h=$localize`Folder path`;let P;P=$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 b;b=$localize`Source Data`;let B;B=$localize`Add Path`;let Z;Z=$localize`Add a path directly from your machine.`;let U;U=$localize`Filters`;let J;J=$localize`Customize your filters.`;let te;te=$localize`Add filter`;let E;E=$localize`Exclude`;let y;y=$localize`Choose if there’s any files you want to exclude.`;let z;z=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let w;w=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize` Files larger than `;let de;return de=$localize`Select an option...`,[["formRef",""],u,h,P,A,b,B,Z,U,J,te,E,y,z,w,ie,ge,[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,"row-inputs"],["type","text","placeholder",t,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",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",l,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",de],[3,"value"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",17,0),D("submit",function(){return f(i),S(o.next())}),a(2,"div",18)(3,"h3",19),M(4,1),r(),a(5,"app-file-tree",20)(6,"label",21),M(7,2),r(),_(8,"input",22),r(),a(9,"div",23)(10,"button",24),D("click",function(){return f(i),S(o.goBack())}),g(11,3),_(12,"spk-icon"),C(),r(),a(13,"button",25),g(14,4),_(15,"spk-icon"),C(),r()()(),a(16,"div",26)(17,"h3",19),M(18,5),r(),a(19,"app-toggle-card",27),W(20,28),M(21,6),q(),a(22,"p",29),M(23,7),r(),a(24,"div",30)(25,"spk-form-field"),_(26,"input",31),r(),a(27,"button",32),D("click",function(){return f(i),S(o.addNewPath())}),a(28,"spk-icon"),m(29,"plus"),r()()()(),a(30,"app-toggle-card",27),W(31,28),M(32,8),q(),a(33,"p",29),M(34,9),r(),a(35,"button",33),D("click",function(){return f(i),S(o.addFilter())}),M(36,10),r(),d(37,Do,2,0),r(),a(38,"app-toggle-card",34),W(39,28),M(40,11),q(),a(41,"p",29),M(42,12),r(),a(43,"spk-toggle",35),g(44,13),_(45,"input",36),C(),r(),a(46,"spk-toggle",35),g(47,14),_(48,"input",37),C(),r(),a(49,"spk-toggle",35),g(50,15),_(51,"input",38),C(),r(),a(52,"spk-toggle",39),D("click",function(){return f(i),S(o.toggleFilesLargerThan())}),M(53,16),r(),d(54,yo,7,0,"div",40),r()()()}if(t&2){let i;c("formGroup",o.sourceDataForm),s(5),c("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),s(14),c("disallowToggle",!0),s(7),c("formControl",o.newPathCtrl),s(4),c("disallowToggle",!0),s(7),F((i=o.pathSignal())!=null&&i.length?37:-1),s(),c("disallowToggle",!0),s(14),$e("active",o.filesLargerThan()),s(2),F(o.filesLargerThan()?54:-1)}},dependencies:[ut,Pe,se,Ge,Re,le,ye,Oe,mt,Ne,Ae,be,ce,me,pe,Ve,ue,Le,We,Ue,St],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}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var Fe=new ne,_e=class e{#e=$(ae);#t=$(pt);#o=$(He);#i=$(gt);generalForm=Qt();sourceDataForm=nn();scheduleForm=en();destinationForm=on();optionsForm=Zt();isDraft=O(!1);backupId=O(null);isSubmitting=O(!1);finishedLoading=O(!1);backupDefaults=O(null);isNew=K(()=>this.backupId()==="new");selectedOptions=O([]);selectedAdvancedFormPair=O([]);destinationFormPair=O({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=K(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=O([]);notSelectedHttpOptions=K(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=H(this.sourceDataForm.valueChanges);destinationFormSignal=H(this.destinationForm.valueChanges);generalFormSignal=H(this.generalForm.valueChanges);encryptionFieldSignal=H(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=H(this.scheduleForm.valueChanges);destinationOptions=K(()=>this.#t.backendModules()??[]);httpOptions=K(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=K(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=K(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[kt,...n]});nonSelectedOptions=K(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(l=>l.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(l=>l.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(l=>l.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(l=>l.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){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 t=n.Sources??"",o=n.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=n.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",l=n.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,u=l?.Value.replace(/[0-9]/g,"")??null,h=l?.Value.replace(/[^0-9]/g,"")??null,P={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:u&&h?{size:parseInt(h),unit:u.toUpperCase()}:null}};this.sourceDataForm.patchValue(P)}mapDestinationToForm(n){let t=n.TargetURL?At(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=At(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(l=>l.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!0});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.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}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=this.advancedOptions();n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(!(i.Name&&t.includes(i.Name))){if(i.Name==="dblock-size"){let l=i.Value?.replace(/[^0-9]/g,""),u=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:l?parseInt(l):null,unit:u?u.toUpperCase():null})}if(i.Name&&i.Value){let l=o.find(u=>u.name===i.Name);if(!l)return;this.addOptionToFormGroup(l,i.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.optionsForm.value,o=this.scheduleForm.value,i=this.sourceDataForm.value,u=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],h=null;o.runAgain?.repeatUnit&&o.runAgain?.repeatValue&&(h=this.#i.toString(o.runAgain.repeatValue,o.runAgain.repeatUnit));let P=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([U,J])=>J).map(([U,J])=>U):[],A=i.path?.split("\0")??[],b=this.mapFormsToSettings(),B=Object.entries(i.excludes??{}).filter(([U,J])=>J&&U!=="filesLargerThan").map(([U])=>U),Z=i.excludes?.filesLargerThan;return B.length&&b.push({Name:"--exclude-files-attributes",Value:B.join(",")}),Z&&Z.size!==null&&Z.unit!==null&&b.push({Name:"--skip-files-larger-than",Value:`${Z.size}${Z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:u[0]??null,Sources:A.filter(U=>!U.startsWith("-")),Settings:b,Filters:A.filter(U=>U.startsWith("-")).map((U,J)=>({Order:J,Include:!1,Expression:U.slice(1)}))},Schedule:o.autoRun?{Repeat:h,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:P}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let l=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},u=Object.entries(t.advancedOptions??{}).filter(([h,P])=>h&&P).map(([h,P])=>{let A=n.find(b=>b.name===h);return A?.type==="Size"?{Name:h,Value:`${P.size}${P.unit.toLowerCase()}`}:A?.type==="Integer"?{Name:h,Value:P.toString()}:A?.type==="Boolean"?{Name:h,Value:P.toString()}:{Name:h,Value:P}});return[...i,l,...u]}#a(n){return n.controls.map(t=>Ct(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,t,o){let i=this.optionsForm.controls.advancedOptions,l=N({name:n,type:"String",defaultValue:t},o);this.createFormField(i,l,t),this.selectedOptions.update(u=>(u.push(l),u))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,Fe.control(o));return}if(t.type==="Size"){let i=o.replace(/[0-9]/g,""),l=o.replace(/[^0-9]/g,"");n.addControl(t.name,Fe.group({size:Fe.control(l?parseInt(l):50),unit:Fe.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,Fe.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Fe.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,Fe.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,Fe.control(o,[Ee.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=ve.find(E=>E.customKey===n||E.key===n),l=i?.key,u=this.destinationOptions().find(E=>E.Key===l),h=this.httpOptions();if(!u||!u.Options)return;let P=i&&i.oauthField?i.oauthField:null,A=i&&i.customFields?i.customFields:{},b=i&&i.dynamicFields?i.dynamicFields:[],B=i&&i.advancedFields?i.advancedFields:[],Z=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:P,custom:[],dynamic:[],advanced:[]});let U=Fe.group({}),J=Fe.group({}),te=Fe.group({});A&&Object.entries(A).forEach(([E,y],z)=>{let ge=y,{formElement:w}=ge,ie=Mt(ge,["formElement"]);U.addControl(E,w(t?.custom[E])),this.destinationFormPair.update(de=>(de.custom.push(N({order:900+z},ie)),de))});for(let E=0;E<u.Options.length;E++){let y=u.Options[E];if(y.Deprecated)continue;let z=b.find(w=>w===y.Name||w.name===y.Name);if(z){let w=z&&typeof z!="string",ie=w?z?.defaultValue??y.DefaultValue:y.DefaultValue,ge={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+E},de=w?N(N({},ge),z):ge,rt=t?.dynamic[y.Name]??ie??y.DefaultValue;this.createFormField(J,de,rt),this.destinationFormPair.update(Xe=>(Xe.dynamic.push(de),Xe))}else{if(Z.find(Ce=>Ce===y.Name))continue;let ie=B.find(Ce=>Ce===y.Name||Ce.name===y.Name),ge=ie&&typeof ie!="string",de=t?.advanced[y.Name],L=de??y.DefaultValue,rt={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:L,order:900+E},Xe=ge?N(N({},rt),ie):rt;o&&de&&(this.createFormField(te,Xe,L),this.selectedAdvancedFormPair.update(Ce=>(Ce.push(Xe),Ce))),this.destinationFormPair.update(Ce=>(Ce.advanced.push(Xe),Ce))}}for(let E=0;E<h.length;E++){let y=h[E],z=t?.advanced[y.name],w=z??y.defaultValue;o&&z&&(this.createFormField(te,y,w),this.selectedHttpOptions.update(ie=>(ie.push(y),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((y,z)=>y.order-z.order),dynamic:E.dynamic.sort((y,z)=>y.order-z.order),advanced:E.advanced.sort((y,z)=>y.order-z.order)})),this.destinationForm.controls.destinations.push(rn({key:i?.customKey??n,customGroup:U,dynamicGroup:J,advancedGroup:te}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var No=["formRef"],Ao=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),ht=e=>({$implicit:e}),Oo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),ko=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),$o=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),xo=()=>({maxWidth:"700px",width:"100%"});function Io(e,n){e&1&&(g(0,2,2),_(1,"spk-icon"),C())}function vo(e,n){e&1&&M(0,2,3)}function Mo(e,n){if(e&1){let t=k();g(0,2,1),a(1,"button",18),D("click",function(){f(t);let i=p();return S(i.testDestination())}),d(2,Io,2,0)(3,vo,1,0),r(),C()}if(e&2){let t=p();s(),$e("success",t.successfulTest()),s(),F(t.successfulTest()?2:3)}}function wo(e,n){if(e&1){let t=k();a(0,"p",24),D("click",function(){f(t);let i=p();return S(i.removeDestinationFormGroup(i.destinationCount()-1))}),g(1,5),_(2,"span",25),C(),r()}}function Ro(e,n){if(e&1){let t=k();a(0,"div",30),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addDestinationFormGroup(i.key))}),a(1,"h3"),m(2),r(),a(3,"p"),m(4),r()()}if(e&2){let t=n.$implicit;s(2),Y(t.displayName),s(2),Y(t.description)}}function Go(e,n){if(e&1){let t=k();a(0,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addDestinationFormGroup(i.key))}),m(1),r()}if(e&2){let t=n.$implicit;s(),V(" ",t.displayName," ")}}function bo(e,n){if(e&1&&(a(0,"div",26),I(1,Ro,5,2,"div",27,x),r(),a(3,"spk-menu")(4,"button",28),M(5,6),r(),W(6,17),I(7,Go,2,1,"button",29,x),q(),r()),e&2){let t=p();s(),v(t.destinationTypeOptionsFocused()),s(6),v(t.destinationTypeOptionsNotFocused())}}function Vo(e,n){e&1&&Ke(0)}function Lo(e,n){if(e&1&&d(0,Vo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,Ao,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Uo(e,n){e&1&&Ke(0)}function Bo(e,n){if(e&1&&d(0,Uo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,Oo,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ko(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addAdvancedFormPair(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function zo(e,n){e&1&&Ke(0)}function Xo(e,n){if(e&1&&d(0,zo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,ko,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ho(e,n){if(e&1){let t=k();g(0,8,1),a(1,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addHttpOption(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function jo(e,n){e&1&&Ke(0)}function Wo(e,n){if(e&1&&d(0,jo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,$o,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function qo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qo(e,n){if(e&1&&(a(0,"app-file-tree",39)(1,"label",46),m(2),d(3,qo,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Yo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zo(e,n){if(e&1&&(a(0,"app-file-tree",40)(1,"label",46),m(2),d(3,Yo,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Jo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ei(e,n){e&1&&(a(0,"spk-icon",50),m(1,"link"),r())}function ti(e,n){e&1&&(a(0,"spk-icon",50),m(1,"envelope"),r())}function ni(e,n){e&1&&(a(0,"spk-icon",50),m(1,"textbox"),r())}function oi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,Jo,3,1,"spk-tooltip",47),r(),_(4,"input",49),d(5,ei,2,0,"spk-icon",50)(6,ti,2,0,"spk-icon",50)(7,ni,2,0,"spk-icon",50),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),c("type",o.formView.type==="Email"?"email":"text"),s(),F(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ii(e,n){if(e&1){let t=k();a(0,"span",54),D("click",function(){f(t);let i=p(2).$implicit,l=p(2);return S(l.oauthStartTokenCreation(i.destinationType))}),m(1,"AuthID"),r()}}function ri(e,n){e&1&&(a(0,"spk-icon",50),m(1,"password"),r())}function ai(e,n){if(e&1){let t=k();a(0,"spk-icon",55),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function si(e,n){if(e&1){let t=k();a(0,"spk-icon",55),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function li(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),r(),_(3,"input",51),d(4,ii,2,0,"span",52)(5,ri,2,0,"spk-icon",50)(6,ai,2,0,"spk-icon",53)(7,si,2,0,"spk-icon",53),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function pi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ci(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function mi(e,n){if(e&1&&I(0,ci,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function ui(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function _i(e,n){if(e&1&&I(0,ui,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function di(e,n){if(e&1&&(a(0,"spk-select",41)(1,"label",46),m(2),d(3,pi,3,1,"spk-tooltip",47),r(),_(4,"input",48),d(5,mi,2,0)(6,_i,2,0),r()),e&2){let t,o=p().$implicit;c("hideClearButton",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function Fi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function gi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ci(e,n){if(e&1&&I(0,gi,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function fi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Si(e,n){if(e&1&&I(0,fi,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function Ti(e,n){if(e&1&&(a(0,"spk-select",42)(1,"label",46),m(2),d(3,Fi,3,1,"spk-tooltip",47),r(),_(4,"input",57),d(5,Ci,2,0)(6,Si,2,0),r()),e&2){let t,o=p().$implicit;c("isFreeText",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function hi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Di(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Ei(e,n){if(e&1&&(a(0,"div",43)(1,"label",46),m(2),d(3,hi,3,1,"spk-tooltip",47),r(),a(4,"div",58)(5,"spk-form-field"),_(6,"input",59),a(7,"spk-icon",50),m(8,"resize"),r()(),a(9,"spk-select"),_(10,"label")(11,"input",60),I(12,Di,2,2,"spk-option",56,x),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(6),v(i.sizeOptions())}}function yi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Pi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,yi,3,1,"spk-tooltip",47),r(),_(4,"input",61),a(5,"spk-icon",50),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Ni(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ai(e,n){if(e&1&&(a(0,"spk-toggle",44)(1,"label",46),m(2),d(3,Ni,3,1,"spk-tooltip",47),r(),_(4,"input",62),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Oi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ki(e,n){e&1&&(a(0,"spk-option",64),m(1,"None"),r()),e&2&&c("value","None")}function $i(e,n){if(e&1&&(a(0,"spk-option",56),m(1),_(2,"spk-checkbox",65),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function xi(e,n){if(e&1&&d(0,ki,2,1,"spk-option",64)(1,$i,3,2,"spk-option",56),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function Ii(e,n){if(e&1&&(a(0,"spk-select",45)(1,"label",46),m(2),d(3,Oi,3,1,"spk-tooltip",47),r(),_(4,"input",63),I(5,xi,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function vi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Mi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,vi,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function wi(e,n){if(e&1){let t=k();a(0,"button",66),D("click",function(){f(t);let i=p().$implicit,l=p(2);return S(l.removeFormView(i.formView,0))}),a(1,"spk-icon"),m(2,"x-circle"),r()()}}function Ri(e,n){if(e&1&&(a(0,"div",37),W(1,38),d(2,Qo,5,16,"app-file-tree",39)(3,Zo,5,12,"app-file-tree",40)(4,oi,8,13,"spk-form-field")(5,li,8,13,"spk-form-field")(6,di,7,14,"spk-select",41)(7,Ti,7,14,"spk-select",42)(8,Ei,14,11,"div",43)(9,Pi,7,11,"spk-form-field")(10,Ai,5,11,"spk-toggle",44)(11,Ii,7,8,"spk-select",45)(12,Mi,5,11,"spk-form-field"),q(),d(13,wi,3,0,"button",28),r()),e&2){let t=n.$implicit;$e("single-field",t.formGroupName!=="advanced"),s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),s(11),F(t.formGroupName==="advanced"?13:-1)}}function Gi(e,n){if(e&1&&(W(0,19)(1,32),I(2,Lo,1,9,"ng-container",null,x),I(4,Bo,1,9,"ng-container",null,x),a(6,"app-toggle-card",33),W(7,34),g(8,7),a(9,"spk-menu")(10,"button",35),_(11,"spk-icon"),r(),W(12,17),I(13,Ko,2,1,"button",29,x),q(),r(),C(),q(),I(15,Xo,1,9,"ng-container",null,x),r(),a(17,"app-toggle-card",33),W(18,34),g(19,8),a(20,"spk-menu")(21,"button",35),_(22,"spk-icon"),r(),W(23,17),I(24,Ho,2,1,"button",29,x),q(),r(),C(),q(),I(26,Wo,1,9,"ng-container",null,x),r(),d(28,Ri,14,5,"ng-template",null,1,at),q()()),e&2){let t=p();s(2),v(t.destinationFormPair().custom),s(2),v(t.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedAdvancedFormPair().length===0),s(3),v(t.notSelectedAdvancedFormPair()),s(2),v(t.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedHttpOptions().length===0),s(3),v(t.notSelectedHttpOptions()),s(2),v(t.selectedHttpOptions())}}function bi(e,n){if(e&1){let t=k();a(0,"spk-dialog",67),Vt("isOpenChange",function(i){f(t);let l=p();return bt(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),S(i)}),a(1,"header",68)(2,"h2"),M(3,9),r(),a(4,"spk-alert",69),M(5,10),r()(),a(6,"div",70)(7,"spk-form-field"),_(8,"textarea",71),r()(),a(9,"footer",72)(10,"button",21),D("click",function(){f(t);let i=p();return S(i.closeTargetUrlDialog(!1))}),m(11,"Cancel"),r(),a(12,"button",73),D("click",function(){f(t);let i=p();return S(i.closeTargetUrlDialog(!0))}),g(13,11),_(14,"spk-icon"),C(),r()()()}if(e&2){let t=p();Gt("isOpen",t.targetUrlDialogOpen),c("options",Lt(3,xo)),s(8),c("formControl",t.targetUrlCtrl)}}var Vi=["Bytes","KB","MB","GB","TB","PB"],Tt=new ne,on=(e={destinations:[]})=>Tt.group({destinations:Tt.array(e.destinations)}),rn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Tt.group({destinationType:Tt.control(e),custom:n,dynamic:t,advanced:o}),vt=class e{#e=$(ae);#t=$(De);#o=$(Bt);#i=$(He);#n=$(_e);#r=$(Ht);injector=$(wt);formRef=fe.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=O(Vi);successfulTest=O(!1);destinationTypeOptionsInFocus=O(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=O(ve.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=K(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=K(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=K(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let l=i.error.error.Error;if(l==="missing-folder"&&this.#r.open(nt,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:u=>{u&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),l.startsWith("incorrect-cert:")){let u=l.split("incorrect-cert:")[1];this.#r.open(nt,{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: ${u}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:h=>{h&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",u)}})}if(l.startsWith("incorrect-host-key:")){let u=l.split('incorrect-host-key:"')[1].split('",')[0],h=l.split('accepted-host-key:"')[1].split('",')[0];h?this.#r.open(nt,{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 ${h}
|
|
6
|
+
with the REPORTED host key: ${u}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,u)}}):this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${u}`,confirmText:"Approve",cancelText:"Cancel"},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,u)}})}}})}mapToTargetUrl(n){return Ct(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=O("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=O(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=O(!1);#p=O(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),l=screen.width/2-t/2,u=screen.height/2-o/2,h=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+l+",top="+u);h?.addEventListener("blur",P=>{console.log("event blur",P)}),h?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Ze(()=>this.#a.set(!1))).subscribe({next:A=>{console.log("res",A),A?.authid&&this.#p.set(A.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Se(o.formRef,No,5),t&2&&Te()},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=xe(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let l;l=$localize`Other destinations`;let u;u=$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:`,u=xe(u);let h;h=$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:`,h=xe(h);let P;P=$localize`Edit target URL`;let A;A=$localize` Be careful, this will overwrite everything you have in your destination. `;let b;return b=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["fieldTemplate",""],n,t,o,i,l,u,h,P,A,b,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"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"],["spk-button","","type","button",1,"outlined"],["item","","type","button"],[1,"tile",3,"click"],["item","","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","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"hideClearButton"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],[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,"value"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["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(t,o){if(t&1){let i=k();a(0,"form",12,0),D("submit",function(){return f(i),S(o.next())}),a(2,"header")(3,"h3",13),g(4,2),a(5,"div",14),d(6,Mo,4,3,"button",15),a(7,"spk-menu")(8,"button",16),_(9,"spk-icon"),r(),W(10,17),a(11,"button",18),D("click",function(){return f(i),S(o.openTargetUrlDialog())}),_(12,"spk-icon"),r(),q(),r()(),C(),r(),d(13,wo,3,0,"p"),r(),d(14,bo,9,0)(15,Gi,30,4,"ng-container",19),a(16,"div",20)(17,"button",21),D("click",function(){return f(i),S(o.goBack())}),g(18,3),_(19,"spk-icon"),C(),r(),a(20,"button",22),g(21,4),_(22,"spk-icon"),C(),r()()(),d(23,bi,15,4,"spk-dialog",23)}if(t&2){let i;c("formGroup",o.destinationForm),s(6),F(o.destinationCount()>0?6:-1),s(7),F(o.destinationCount()>0?13:-1),s(),F(o.destinationCount()===0?14:-1),s(),F(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),s(8),F(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Oe,Pe,se,Ge,Re,le,ye,mt,Ne,Ae,be,zt,lt,ce,ue,Ft,dt,me,pe,Le,je,Xt,_t,Ue,We],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}"],changeDetection:0})};export{Ct as a,ve as b,on as c,rn as d,vt as e,Qt as f,kt as g,Ot as h,Zt as i,$t as j,en as k,xt as l,nn as m,It as n,_e as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ke}from"./chunk-CAGBL2MP.js";import{b as he,c as se}from"./chunk-6CRYB4HA.js";import{a as pe}from"./chunk-RBVR4WTJ.js";import{a as be}from"./chunk-TLE3RBQZ.js";import"./chunk-I24WOYYC.js";import{a as le}from"./chunk-ASPLJ6GL.js";import"./chunk-CP2S6DC4.js";import{a as ve}from"./chunk-6TZWRTRA.js";import"./chunk-UJWW7PS7.js";import"./chunk-2P3GS5BJ.js";import{b as ae}from"./chunk-KJ4O6F3R.js";import{a as Ie,d as ke}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as z,g as _e,j as ye,k as xe,o as re,v as Be}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import{pa as w,sa as oe}from"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Ab as k,Bb as v,Cb as i,Db as t,Eb as c,Fb as A,Gb as P,Ib as K,Mc as fe,Ob as N,Pb as M,Qb as _,Rb as s,Sa as o,Sb as d,Tb as U,Ub as y,Vb as m,Z as R,ea as D,eb as b,fa as $,hc as F,ic as x,jc as S,kb as C,lc as Re,pc as De,q as B,qc as $e,ra as ie,rc as X,tb as h,va as G,vb as f,xc as u,yb as E,yc as g,zb as I,zc as T}from"./chunk-Q3JJWGXW.js";import{a as te}from"./chunk-C6Q5SG76.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(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({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,xe,re,_e,z,le,w,pe,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(--warn-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--tertiary-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(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>(console.log(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,re,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(ve);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(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:[Be,de,ue,ke,le,pe,w,be,z,_e,ye],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};
|
|
1
|
+
import{a as Ke}from"./chunk-CAGBL2MP.js";import{b as he,c as se}from"./chunk-6CRYB4HA.js";import{a as pe}from"./chunk-RBVR4WTJ.js";import{a as be}from"./chunk-47W7PRQ6.js";import"./chunk-H7TJZPPJ.js";import{a as le}from"./chunk-GJ6GRAEW.js";import"./chunk-YBPSOGY5.js";import{a as ve}from"./chunk-6TZWRTRA.js";import"./chunk-UJWW7PS7.js";import"./chunk-BATRQ3TX.js";import{b as ae}from"./chunk-KJ4O6F3R.js";import{a as Ie,d as ke}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as z,g as _e,j as ye,k as xe,o as re,v as Be}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import{pa as w,sa as oe}from"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Ab as k,Bb as v,Cb as i,Db as t,Eb as c,Fb as A,Gb as P,Ib as K,Mc as fe,Ob as N,Pb as M,Qb as _,Rb as s,Sa as o,Sb as d,Tb as U,Ub as y,Vb as m,Z as R,ea as D,eb as b,fa as $,hc as F,ic as x,jc as S,kb as C,lc as Re,pc as De,q as B,qc as $e,ra as ie,rc as X,tb as h,va as G,vb as f,xc as u,yb as E,yc as g,zb as I,zc as T}from"./chunk-Q3JJWGXW.js";import{a as te}from"./chunk-C6Q5SG76.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(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({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,xe,re,_e,z,le,w,pe,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(--warn-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--tertiary-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(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>(console.log(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,re,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(ve);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(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:[Be,de,ue,ke,le,pe,w,be,z,_e,ye],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};
|