@duplicati/ngclient 0.0.133 → 0.0.134
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-3EVYTAP3.js → chunk-3UUTPGTW.js} +1 -1
- package/{chunk-HPZ6HLJE.js → chunk-4VPA3END.js} +1 -1
- package/chunk-4WUC2NLU.js +1 -0
- package/{chunk-KAKRPBPP.js → chunk-5XSYLFRW.js} +1 -1
- package/{chunk-WCMRN2KQ.js → chunk-62DY5NTG.js} +1 -1
- package/chunk-6HFJTYBK.js +1 -0
- package/{chunk-4MAZCWVO.js → chunk-7J7GUBLS.js} +1 -1
- package/{chunk-F66HJES7.js → chunk-B6DE3TTE.js} +1 -1
- package/{chunk-Q2YREFUE.js → chunk-BC3MLJH3.js} +1 -1
- package/chunk-BHSG643V.js +1 -0
- package/{chunk-LSNBRSNG.js → chunk-CFESUDFC.js} +1 -1
- package/{chunk-B3N2KM6G.js → chunk-CRALFIWB.js} +1 -1
- package/chunk-DE64A2ZS.js +1 -0
- package/{chunk-Y4VREVFM.js → chunk-EQS67O4J.js} +1 -1
- package/{chunk-X7GQQCVS.js → chunk-EVINCUTE.js} +1 -1
- package/{chunk-YPAIKA7K.js → chunk-EWZGGCZ7.js} +1 -1
- package/{chunk-2VN6VG4I.js → chunk-FATQ7BT6.js} +1 -1
- package/chunk-FZTQVXG4.js +1 -0
- package/chunk-HD37ILAE.js +6 -0
- package/{chunk-TVOVJS5N.js → chunk-HE5L47WR.js} +1 -1
- package/{chunk-PETCW5PK.js → chunk-HLBBIEIQ.js} +1 -1
- package/chunk-HMK6M2N7.js +1 -0
- package/{chunk-EBYGIC45.js → chunk-HWUEL5ZO.js} +1 -1
- package/{chunk-VNTD2QIZ.js → chunk-IDAED3OA.js} +1 -1
- package/{chunk-32H7KC5E.js → chunk-IPC6G72N.js} +1 -1
- package/{chunk-DLVU5GHR.js → chunk-JDCGGJ7O.js} +1 -1
- package/chunk-JHVU3HSL.js +1 -0
- package/{chunk-A7BFGBWF.js → chunk-NZD6UMYZ.js} +1 -1
- package/{chunk-EGCW3WY7.js → chunk-O3JEFNCL.js} +1 -1
- package/chunk-OHEFY2D6.js +1 -0
- package/{chunk-XHUQCM6F.js → chunk-OTM4ZTG4.js} +1 -1
- package/{chunk-WZIEF5KL.js → chunk-PSPK4OPB.js} +1 -1
- package/{chunk-XKDJSEMU.js → chunk-SAISKISU.js} +1 -1
- package/chunk-SMNWIGMY.js +1 -0
- package/chunk-SSMDFXE3.js +1 -0
- package/chunk-TTFJPAWM.js +1 -0
- package/{chunk-SUMEJCXQ.js → chunk-UWF5JLY2.js} +1 -1
- package/{chunk-VWH7EODO.js → chunk-UZTRBMWL.js} +1 -1
- package/{chunk-NUL6XFC4.js → chunk-V6WRFB7W.js} +1 -1
- package/{chunk-XBP565VF.js → chunk-VFVXE2DC.js} +1 -1
- package/{chunk-LXZXQU7D.js → chunk-VG6LA5R3.js} +1 -1
- package/{chunk-UD32EXWK.js → chunk-VVJBMGZR.js} +1 -1
- package/chunk-WESN3ZUC.js +1 -0
- package/chunk-XZWXLEK2.js +3 -0
- package/{chunk-X4NRDSTJ.js → chunk-Y4IRFRVB.js} +1 -1
- package/{chunk-BD5AB4OK.js → chunk-Y7OD7PZG.js} +1 -1
- package/{chunk-MVJXYZIV.js → chunk-YW7YXFSC.js} +1 -1
- package/{chunk-TKOD3RB3.js → chunk-ZQYPQTU3.js} +2 -2
- package/{chunk-CHCHAUQD.js → chunk-ZUXVEXBA.js} +1 -1
- package/index.html +1 -1
- package/locale/messages.cs.json +15 -2
- package/locale/messages.da.json +36 -25
- package/locale/messages.de.json +169 -77
- package/locale/messages.en_GB.json +13 -2
- package/locale/messages.es.json +13 -2
- package/locale/messages.fr.json +14 -2
- package/locale/messages.it.json +184 -157
- package/locale/messages.ja_JP.json +16 -2
- package/locale/messages.nl_NL.json +184 -157
- package/locale/messages.pl.json +13 -2
- package/locale/messages.pt.json +12 -2
- package/locale/messages.pt_BR.json +13 -2
- package/locale/messages.zh-Hans.json +459 -0
- package/locale/messages.zh_CN.json +157 -157
- package/{main-BQ3NFYOR.js → main-RQTAFLAT.js} +1 -1
- package/package.json +1 -1
- package/chunk-2YHX57UE.js +0 -1
- package/chunk-7RNTRIB4.js +0 -3
- package/chunk-7V6ZELYA.js +0 -1
- package/chunk-ACVXVBJ2.js +0 -1
- package/chunk-AUWIW323.js +0 -1
- package/chunk-BWJZ3AMO.js +0 -1
- package/chunk-EK2B2CO4.js +0 -1
- package/chunk-FX2XKS5C.js +0 -1
- package/chunk-GQTJISMN.js +0 -1
- package/chunk-MOOM536C.js +0 -1
- package/chunk-PTFQBTH3.js +0 -1
- package/chunk-T27DQWUZ.js +0 -1
- package/chunk-UUOPMSDB.js +0 -1
- package/chunk-VFFFKPK4.js +0 -6
package/chunk-7RNTRIB4.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as Ee}from"./chunk-BD5AB4OK.js";import"./chunk-5MMV45NA.js";import{a as fe}from"./chunk-LSNBRSNG.js";import{h as P}from"./chunk-PTFQBTH3.js";import"./chunk-EBYGIC45.js";import{a as Se}from"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import{a as O}from"./chunk-67XQIEG5.js";import{a as le}from"./chunk-A7BFGBWF.js";import"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import{c as se,e as me,f as de,j as _e,n as pe,o as ce,p as ue,q as Ce,r as ge,s as Ne,t as Me}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{b as q,d as Z,e as J}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as oe,t as ie}from"./chunk-DNBOZ26J.js";import{g as ae,h as re}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Bb as v,Gc as H,Hb as N,Ib as M,Jb as c,Kb as G,Lb as x,Nb as U,Oa as m,Ob as f,X as p,_a as $,_b as K,ba as S,ca as E,gc as w,hc as X,ic as z,la as F,nc as V,pb as h,pc as W,qb as b,qc as j,rb as B,sb as R,tb as y,ub as C,vb as a,wb as n,xb as r,yb as A,zb as T}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var Fe=()=>[];function Ae(l,t){l&1&&r(0,"spk-progress-bar",12)}function Te(l,t){if(l&1&&(a(0,"spk-form-field"),r(1,"input",32),n()),l&2){let e=t.$implicit,s=t.$index;m(),C("id",V("filter-",s))("formControl",e)}}function Oe(l,t){if(l&1){let e=v();a(0,"form",13)(1,"spk-select",14)(2,"label",15),c(3,1),n(),r(4,"input",16),n(),a(5,"spk-form-field")(6,"label",17),c(7,2),n(),r(8,"textarea",18),n(),a(9,"spk-form-field")(10,"label",19),c(11,3),n(),r(12,"textarea",20),n()(),a(13,"spk-divider"),c(14,4),n(),a(15,"form",13)(16,"spk-form-field")(17,"label",21),c(18,5),n(),r(19,"input",22),n(),a(20,"spk-form-field")(21,"label",23),c(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),A(25,26),c(26,7),T(),A(27,27),R(28,Te,2,3,"spk-form-field",null,B),T(),n()(),a(30,"p"),N(31,8),r(32,"a",28),M(),n(),a(33,"app-options-list",29),z("optionsChange",function(i){S(e);let u=f();return X(u.settings,i)||(u.settings=i),E(i)}),n(),a(34,"div",30)(35,"button",31),U("click",function(){S(e);let i=f();return E(i.submit())}),N(36,9),r(37,"spk-icon"),M(),n()()}if(l&2){let e=f();C("formGroup",e.baseCmdForm),m(),C("options",e.commandOptions()??j(10,Fe))("inlineSearch",!0),m(14),C("formGroup",e.standardFields),m(9),C("disallowToggle",!0),m(4),y(e.standardFields.controls.filters.controls),m(5),w("options",e.settings),C("hasFreeTextSettings",!0),m(2),K("loader",e.isSubmitting()),m(2),G(e.baseCmdForm.value.command),x(36)}}var d=new ge,Pe=["Bytes","KB","MB","GB","TB","PB"],I=class l{#e=p(P);#t=p(re);#n=p(Z);#o=p(q);#i=p(ae);#a=p(le);#s=p(Y);#r=O(this.#o.params);commandOptions=O(this.#i.getApiV1Commandline());sizeOptions=F(Pe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=H(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",s=t.arguments?.split(`
|
|
2
|
-
`).filter(o=>o.length>0)??[],i=this.standardFields.value,u=i.filters??[],g=[t.command,e,...s,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...u.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>o.Name),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
|
-
`)??""})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=$({type:l,selectors:[["app-commandline"]],features:[W([P])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Command`;let s;s=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let u;u=$localize`Advanced options`;let g;g=$localize`Backup ID`;let o;o=$localize`Backup Name`;let k;k=$localize`Filters`;let D;D=$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#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,s,i,u,g,o,k,D,L,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,s){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",10)(3,"button",11),N(4,0),r(5,"spk-icon"),M(),n()(),h(6,Ae,1,0,"spk-progress-bar",12)(7,Oe,38,11),n()),e&2&&(m(6),b(s.finishedLoading()?7:6))},dependencies:[Ne,_e,se,me,de,fe,Ee,Se,Me,pe,ce,Ce,ue,J,ne,ee,te,ie,oe,Q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{I as default};
|
package/chunk-7V6ZELYA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-BWJZ3AMO.js")},{path:"encryption",loadComponent:()=>import("./chunk-XKDJSEMU.js")},{path:"select-files",loadComponent:()=>import("./chunk-KAKRPBPP.js")},{path:"options",loadComponent:()=>import("./chunk-SUMEJCXQ.js")},{path:"progress",loadComponent:()=>import("./chunk-PETCW5PK.js")}],t=o;export{t as default};
|
package/chunk-ACVXVBJ2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Z,d as rn}from"./chunk-FX2XKS5C.js";import{a as cn}from"./chunk-LSNBRSNG.js";import"./chunk-67XQIEG5.js";import{a as ln}from"./chunk-A7BFGBWF.js";import{a as _n}from"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{e as je}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as Y,f as qe,g as Je,h as Qe,j as Ye,k as Ze,o as en,p as nn,w as tn,x as on}from"./chunk-DNBOZ26J.js";import{h as an}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Ab as D,Bb as B,F as w,Gc as We,Hb as s,Ib as u,Jb as p,Kb as y,Lb as L,Mb as q,Nb as f,Oa as l,Ob as F,X as z,Yb as W,_a as he,_b as x,a as ve,b as j,ba as N,bc as d,ca as k,cc as ze,db as P,dc as O,gc as Ve,hc as Ke,ic as Ue,la as H,mb as Xe,nb as we,pb as S,qb as E,qc as J,rb as V,rc as $,sb as K,tb as U,ub as T,uc as I,vb as o,vc as G,wb as i,wc as b,xb as g,yb as M,yc as Q,zb as m}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function sn(...n){let t=H(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}function un(n,t,e){let a=localStorage.getItem(t);a!=null&&(n=JSON.parse(a));let r=sn(n),c=r[ve];e?.equal&&(c.equal=e.equal);function R(C){C==null?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify(C))}return r.set=C=>{R(C),j(c,C)},r.update=C=>{let A=C(r());R(A),j(c,A)},r}var gn=()=>[import("./chunk-EW3XN62R.js").then(n=>n.NgTemplateOutlet),Y,Ye,on,tn,import("./chunk-X7GQQCVS.js").then(n=>n.DurationFormatPipe),import("./chunk-HJQBTK5I.js").then(n=>n.BytesPipe),import("./chunk-AUWIW323.js").then(n=>n.RelativeTimePipe)],dn=()=>["/add-backup"],Tn=()=>["/restore"],Fn=n=>({$implicit:n}),Cn=n=>["/backup",n],Sn=n=>["/restore",n],En=n=>["/backup",n,"export"],Mn=n=>["/backup",n,"delete"],mn=n=>["/backup",n,"database"],On=n=>["/backup",n,"commandline"],Nn=n=>["/backup",n,"log"];function kn(n,t){if(n&1){let e=B();o(0,"button",57),f("click",function(){let r=N(e).$implicit,c=F(2);return k(c.sortByColumn.set(r.value))}),p(1,15),i()}if(n&2){let e=t.$implicit,a=F(2);x("active",a.orderBy()===e.value),l(),y(e.label),L(1)}}function Pn(n,t){if(n&1&&(o(0,"spk-menu",58)(1,"button",59),s(2,14),g(3,"strong")(4,"spk-icon"),u(),i(),M(5,60),K(6,kn,2,3,"button",61,V),m(),i()),n&2){let e=F();l(4),y(e.orderBy()),L(2),l(2),U(e.sortOrderOptions())}}function fn(n,t){if(n&1&&(d(0),I(1,"durationFormat")),n&2){let e=F().$implicit,a=F(4);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function $n(n,t){n&1&&(M(0),p(1,21),m())}function Dn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function In(n,t){n&1&&(M(0),p(1,22),m())}function An(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Rn(n,t){n&1&&(M(0),p(1,23),m())}function Hn(n,t){n&1&&D(0)}function yn(n,t){if(n&1&&(o(0,"div",64)(1,"div",51)(2,"h3"),d(3),o(4,"spk-chip")(5,"spk-icon"),d(6),i(),d(7),i()(),o(8,"p")(9,"span"),p(10,16),i(),d(11),I(12,"relativeTime"),i(),o(13,"p")(14,"span"),p(15,17),i(),S(16,fn,2,4)(17,$n,2,0,"ng-container"),i(),o(18,"p")(19,"span"),p(20,18),i(),S(21,Dn,2,3)(22,In,2,0,"ng-container"),i(),o(23,"p")(24,"span"),p(25,19),i(),S(26,An,2,3)(27,Rn,2,0,"ng-container"),i()(),o(28,"spk-chip",65),p(29,20),i(),o(30,"div",55),P(31,Hn,1,0,"ng-container",66),i()()),n&2){let e=t.$implicit,a=F(4),r=W(51);l(3),O(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),l(3),ze(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),l(),O(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),l(4),O(" ",b(12,11,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," "),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?16:17),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?21:22),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?26:27);let c=a.getBackupVersionCount(e);l(3),y(c)(c),L(29),l(2),T("ngTemplateOutlet",r)("ngTemplateOutletContext",$(14,Fn,e))}}function Ln(n,t){if(n&1&&K(0,yn,32,16,"div",64,V),n&2){let e=F(3);U(e.backups())}}function xn(n,t){n&1&&(M(0),p(1,24),m())}function Bn(n,t){if(n&1&&(o(0,"div",62),S(1,Ln,2,0)(2,xn,2,0,"ng-container"),i()),n&2){let e=F(2);l(),E(e.backups().length?1:2)}}function Gn(n,t){n&1&&(s(0,25,1),D(1),u())}function bn(n,t){n&1&&(s(0,26,1),D(1),u())}function vn(n,t){n&1&&(s(0,27,1),D(1),u())}function hn(n,t){n&1&&(s(0,28,1),D(1),u())}function Xn(n,t){n&1&&(s(0,29,1),D(1),u())}function wn(n,t){n&1&&(s(0,30,1),D(1),u())}function zn(n,t){if(n&1&&(d(0),I(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Vn(n,t){n&1&&(M(0),p(1,34),m())}function Kn(n,t){if(n&1&&(d(0),I(1,"durationFormat")),n&2){let e=F().$implicit,a=F(3);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function Un(n,t){n&1&&(M(0),p(1,35),m())}function Wn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function jn(n,t){n&1&&(M(0),p(1,36),m())}function qn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Jn(n,t){n&1&&(M(0),p(1,37),m())}function Qn(n,t){n&1&&D(0)}function Yn(n,t){if(n&1&&(o(0,"tr")(1,"td"),d(2),i(),o(3,"td"),d(4),i(),o(5,"td"),S(6,zn,2,4)(7,Vn,2,0,"ng-container"),i(),o(8,"td"),S(9,Kn,2,4)(10,Un,2,0,"ng-container"),i(),o(11,"td"),S(12,Wn,2,3)(13,jn,2,0,"ng-container"),i(),o(14,"td"),S(15,qn,2,3)(16,Jn,2,0,"ng-container"),i(),o(17,"td")(18,"span"),p(19,33),i()(),o(20,"td"),P(21,Qn,1,0,"ng-container",66),i()()),n&2){let e=t.$implicit,a=F(3),r=W(51);l(2),O(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),l(2),O(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),l(2),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?9:10),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?12:13),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?15:16);let c=a.getBackupVersionCount(e);l(4),y(c)(c),L(19),l(2),T("ngTemplateOutlet",r)("ngTemplateOutletContext",$(10,Fn,e))}}function Zn(n,t){if(n&1){let e=B();o(0,"spk-table",67),Ue("sortByColumnChange",function(r){N(e);let c=F(2);return Ke(c.sortByColumn,r)||(c.sortByColumn=r),k(r)}),o(1,"tr",68)(2,"th",69),s(3,25),P(4,Gn,2,0,"ng-container",70),u(),i(),o(5,"th",71),s(6,26),P(7,bn,2,0,"ng-container",70),u(),i(),o(8,"th",72),s(9,27),P(10,vn,2,0,"ng-container",70),u(),i(),o(11,"th",73),s(12,28),P(13,hn,2,0,"ng-container",70),u(),i(),o(14,"th",74),s(15,29),P(16,Xn,2,0,"ng-container",70),u(),i(),o(17,"th",75),s(18,30),P(19,wn,2,0,"ng-container",70),u(),i(),o(20,"th"),p(21,31),i(),o(22,"th"),p(23,32),i()(),K(24,Yn,22,12,"tr",null,V),i()}if(n&2){let e=F(2),a=W(53);T("data",e.backups())("loading",e.backupsLoading()),Ve("sortByColumn",e.sortByColumn),l(4),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(5),U(e.backups())}}function et(n,t){if(n&1&&S(0,Bn,3,1,"div",62)(1,Zn,26,9,"spk-table",63),n&2){let e=F();E(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function nt(n,t){n&1&&(o(0,"div",76),g(1,"spk-progress-bar",77),o(2,"div",51)(3,"h3"),p(4,38),i()()())}function tt(n,t){n&1&&p(0,39,1)}function it(n,t){n&1&&(o(0,"spk-icon"),d(1,"check"),i())}function ot(n,t){n&1&&(o(0,"spk-icon"),d(1,"dots-three-vertical"),i())}function at(n,t){if(n&1){let e=B();o(0,"button",78),f("click",function(){let r=N(e).$implicit,c=F();return k(c.startBackup(r.Backup==null?null:r.Backup.ID))}),s(1,39),g(2,"spk-icon"),S(3,tt,1,0),u(),i(),o(4,"button",79)(5,"spk-icon"),d(6,"pencil-simple"),i()(),o(7,"spk-menu",80)(8,"button",52),S(9,it,2,0,"spk-icon")(10,ot,2,0,"spk-icon"),i(),M(11,60),o(12,"h3",81),d(13,"Operations"),i(),o(14,"button",82),s(15,40),g(16,"spk-icon"),u(),i(),o(17,"button",82),s(18,41),g(19,"spk-icon"),u(),i(),o(20,"button",82),s(21,42),g(22,"spk-icon"),u(),i(),g(23,"spk-divider"),o(24,"h3",81),d(25,"Advanced"),i(),o(26,"button",82),s(27,43),g(28,"spk-icon"),u(),i(),o(29,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.verifyFiles(r.Backup==null?null:r.Backup.ID))}),s(30,44),g(31,"spk-icon"),u(),i(),o(32,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.compressBackup(r.Backup==null?null:r.Backup.ID))}),s(33,45),g(34,"spk-icon"),u(),i(),o(35,"button",82),s(36,46),g(37,"spk-icon"),u(),i(),g(38,"spk-divider"),o(39,"h3",81),d(40,"Reporting"),i(),o(41,"button",82),s(42,47),g(43,"spk-icon"),u(),i(),o(44,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.createErrorReport(r.Backup==null?null:r.Backup.ID))}),s(45,48),g(46,"spk-icon"),u(),i(),m(),i()}if(n&2){let e=t.$implicit,a=F();x("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),l(3),E(a.viewMode()==="list"?3:-1),l(),T("routerLink",$(16,Cn,e.Backup==null?null:e.Backup.ID)),l(3),T("right",!0),l(),x("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),l(),E(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),l(5),T("routerLink",$(18,Sn,e.Backup==null?null:e.Backup.ID)),l(3),T("routerLink",$(20,En,e.Backup==null?null:e.Backup.ID)),l(3),T("routerLink",$(22,Mn,e.Backup==null?null:e.Backup.ID)),l(6),T("routerLink",$(24,mn,e.Backup==null?null:e.Backup.ID)),l(9),T("routerLink",$(26,On,e.Backup==null?null:e.Backup.ID)),l(6),T("routerLink",$(28,Nn,e.Backup==null?null:e.Backup.ID))}}function _t(n,t){n&1&&(o(0,"spk-icon",83),d(1,"funnel-simple"),i(),o(2,"spk-icon",84),d(3,"sort-ascending"),i(),o(4,"spk-icon",85),d(5,"sort-descending"),i())}var pn={file:{Display:$localize`Local`,Icon:null}},ee=class n{#n=z(an);#t=z(ln);#e=z(_n);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=un("list","viewMode");sortByColumn=H(this.#e.orderBy());loadingId=H(null);successId=H(null);sortEffect=We(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#t.resumeDialogCheck(()=>this.#e.startBackup(t))}getBackendIcon(t){if(!t)return"";let e=t.split("://")[0],a=Z.find(c=>c.key===e);if(!a)return"database";let r=pn[a.key];return r?.Icon?r.Icon:"database"}getBackendType(t){if(!t)return"";let e=t.split("://")[0],a=Z.find(c=>c.key===e);if(!a)return"";let r=pn[a.key];if(r?.Display)return r.Display;if(a.key==="s3"){let c="http://null?"+t.split("?")[1],C=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[A,v]of Object.entries(rn))if(C.endsWith(A))return v}return a.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdVerify({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCompact({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}createErrorReport(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCreatereport({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=he({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let t;t=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let r;r=$localize`Restores`;let c;c=$localize`Restores allow you to restore your data from the cloud.`;let R;R=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let C;C=$localize`My backups`;let A;A=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let v;v=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ne;ne=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let te;te=$localize`Relative time`;let ie;ie=$localize`Actual time`;let oe;oe=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ae;ae=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let le;le=$localize`Duration:`;let re;re=$localize`Source:`;let ce;ce=$localize`Destination:`;let h;h=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,h=q(h,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let se;se=$localize` ${h}:ICU@@6502601490918455200: `;let ue;ue=$localize`N/A`;let pe;pe=$localize`N/A`;let Fe;Fe=$localize`N/A`;let ge;ge=$localize`No backups founds`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Last successful backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Duration ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Source ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Destination ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize`Version`;let Oe;Oe=$localize`Actions`;let X;X=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,X=q(X,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${X}:ICU@@6502601490918455200: `;let ke;ke=$localize`N/A`;let Pe;Pe=$localize`N/A`;let fe;fe=$localize`N/A`;let $e;$e=$localize`N/A`;let De;De=$localize`Loading backups...`;let Ie;Ie=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ae;Ae=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let He;He=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let ye;ye=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let Le;Le=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let xe;xe=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Be;Be=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Ge;Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let be;return be=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `,[["actions",""],["sortIcons",""],t,e,a,r,c,R,C,A,v,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,ge,de,Te,Ce,Se,Ee,Me,me,Oe,Ne,ke,Pe,fe,$e,De,Ie,Ae,Re,He,ye,Le,xe,Be,Ge,be,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let r=B();g(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",49),g(4,"img",50),o(5,"div",51)(6,"h3"),p(7,2),i(),o(8,"p"),p(9,3),i()(),o(10,"button",52),s(11,4),g(12,"spk-icon"),u(),i()(),o(13,"spk-card",49),g(14,"img",53),o(15,"div",51)(16,"h3"),p(17,5),i(),o(18,"p"),p(19,6),i()(),o(20,"button",52),s(21,7),g(22,"spk-icon"),u(),i()()(),o(23,"div",54)(24,"h2"),M(25),p(26,8),m(),o(27,"div",55)(28,"spk-button-group",56)(29,"button",57),f("click",function(){return N(r),k(a.viewMode.set("list"))}),s(30,9),g(31,"spk-icon"),u(),i(),o(32,"button",57),f("click",function(){return N(r),k(a.viewMode.set("details"))}),s(33,10),g(34,"spk-icon"),u(),i()(),o(35,"spk-menu",58)(36,"button",59),s(37,11),g(38,"strong")(39,"spk-icon"),u(),i(),M(40,60),o(41,"button",57),f("click",function(){return N(r),k(a.setTimeType("relative"))}),p(42,12),i(),o(43,"button",57),f("click",function(){return N(r),k(a.setTimeType("actual"))}),p(44,13),i(),m(),i(),S(45,Pn,8,1,"spk-menu",58),i()(),P(46,et,2,1)(47,nt,5,0),Xe(48,46,gn,null,47),i()(),P(50,at,47,30,"ng-template",null,0,Q)(52,_t,6,0,"ng-template",null,1,Q)}e&2&&(l(3),T("routerLink",J(9,dn)),l(10),T("routerLink",J(10,Tn)),l(16),x("active",a.viewMode()==="list"),l(3),x("active",a.viewMode()==="details"),l(7),y(a.timeType()),L(37),l(6),E(a.viewMode()==="list"?45:-1),l(3),we(!a.backupsLoading()))},dependencies:[je,cn,Qe,Je,Y,Ze,en,nn,qe],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.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-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{ee as default};
|
package/chunk-AUWIW323.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as RelativeTimePipe};
|
package/chunk-BWJZ3AMO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as mt}from"./chunk-4MAZCWVO.js";import{a as Dt,b as St}from"./chunk-VFFFKPK4.js";import"./chunk-5MMV45NA.js";import{c as dt}from"./chunk-FX2XKS5C.js";import{h as L}from"./chunk-PTFQBTH3.js";import"./chunk-EBYGIC45.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import{a as b}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{c as lt,e as ct,f as _t,g as ut,i as Tt,j as pt,s as gt}from"./chunk-ZCT7SRIM.js";import{b as et,d as nt}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as it,b as ot,d as at,e as rt,l as st,o as Ft}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as d,F as G,Fc as k,Gc as Z,Hb as D,Ib as S,Jb as O,Kb as W,Lb as z,Mb as X,Mc as tt,Nb as u,Oa as F,Ob as l,Wb as j,X as p,Xb as H,_a as K,_b as Q,ba as c,bc as f,ca as _,cc as x,dc as q,fa as V,gc as R,hc as N,ic as I,la as T,pb as E,pc as Y,qb as C,qc as J,rb as A,sb as $,tb as y,ub as M,vb as a,wb as r,xb as g,yb as h,zb as P}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var Et=["formRef"],Ct=()=>({maxWidth:"700px",width:"100%"});function Ot(o,e){o&1&&(D(0,2,2),g(1,"spk-icon"),S())}function ft(o,e){o&1&&O(0,2,3)}function Rt(o,e){if(o&1){let t=d();D(0,2,1),a(1,"button",16),u("click",function(){c(t);let n=l();return _(n.testDestination())}),E(2,Ot,2,0)(3,ft,1,0),r(),S()}if(o&2){let t=l();F(),Q("loader",t.testLoading())("success",t.successfulTest()),F(),C(t.successfulTest()?2:3)}}function Nt(o,e){if(o&1){let t=d();a(0,"p",22),u("click",function(){c(t);let n=l();return _(n.removeDestination())}),D(1,5),g(2,"strong")(3,"br")(4,"span",23),S(),r()}if(o&2){let t,i=l();F(4),W((t=i.selectedDestinationType())==null?null:t.displayName),z(1)}}function It(o,e){if(o&1){let t=d();a(0,"div",29),u("click",function(){let n=c(t).$implicit,s=l(2);return _(s.setDestination(n.key))}),a(1,"h3"),f(2),r(),a(3,"p"),f(4),r()()}if(o&2){let t=e.$implicit;F(2),x(t.displayName),F(2),x(t.description)}}function kt(o,e){if(o&1){let t=d();a(0,"button",30,1),u("click",function(){let n=c(t).$implicit,s=l(2);return _(s.setDestination(n.key))}),f(2),r()}if(o&2){let t=e.$implicit;F(2),q(" ",t.displayName," ")}}function At(o,e){if(o&1&&(a(0,"div",24),$(1,It,5,2,"div",25,A),r(),a(3,"spk-menu",26)(4,"button",27),O(5,6),r(),h(6,15),$(7,kt,3,1,"button",28,A),P(),r()),o&2){let t=l();F(),y(t.destinationTypeOptionsFocused()),F(2),M("searchable",!0),F(4),y(t.destinationTypeOptionsNotFocused())}}function $t(o,e){if(o&1){let t=d();a(0,"app-single-destination",31),I("targetUrlChange",function(n){c(t);let s=l();return N(s.targetUrlModel,n)||(s.targetUrlModel=n),_(n)}),r()}if(o&2){let t=l();R("targetUrl",t.targetUrlModel)}}function yt(o,e){if(o&1){let t=d();a(0,"spk-dialog",32),I("isOpenChange",function(n){c(t);let s=l();return N(s.targetUrlDialogOpen,n)||(s.targetUrlDialogOpen=n),_(n)}),a(1,"header",33)(2,"h2"),O(3,7),r(),a(4,"spk-alert",34),O(5,8),r()(),a(6,"div",35)(7,"spk-form-field")(8,"textarea",36),I("ngModelChange",function(n){c(t);let s=l();return N(s.targetUrlCtrl,n)||(s.targetUrlCtrl=n),_(n)}),r()()(),a(9,"footer",37)(10,"button",19),u("click",function(){c(t);let n=l();return _(n.closeTargetUrlDialog(!1))}),f(11,"Cancel"),r(),a(12,"button",38),u("click",function(){c(t);let n=l();return _(n.closeTargetUrlDialog(!0))}),D(13,9),g(14,"spk-icon"),S(),r()()()}if(o&2){let t=l();R("isOpen",t.targetUrlDialogOpen),M("options",J(3,Ct)),F(8),R("ngModel",t.targetUrlCtrl)}}var w=class o{#e=p(nt);#n=p(et);#t=p(L);#i=p(rt);#o=p(Dt);injector=p(V);#a=p(mt);formRef=tt.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=T(null);targetUrlInitial=T(null);targetUrlDialogOpen=T(!1);toggleNewDestination=T(!0);targetUrlEffect=Z(()=>{let e=this.#t.targetUrlModel();this.#a.updateTargetUrl(e??null)});successfulTest=T(!1);testLoading=T(!1);destinationTypeOptionsInFocus=T(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=T(dt.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description})));destinationTypeOptionsFocused=k(()=>{let e=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return e.map(i=>t.find(n=>n.key===i))});selectedDestinationType=k(()=>{let e=this.#t.targetUrlModel();if(!e)return null;let t=e.split("://")[0];return this.destinationTypeOptions().find(n=>t===n.key)});destinationTypeOptionsNotFocused=k(()=>{let e=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(i=>!e.includes(i.key))});openTargetUrlDialog(){let e=this.#t.targetUrlModel();this.targetUrlCtrl.set(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(e=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),i=this.targetUrlInitial();!e||t===i||!t||this.#t.setTargetUrl(t)}testDestination(e=0){let t=this.#t.targetUrlModel();t&&(this.testLoading.set(!0),this.#o.testDestination(t,e,!0).pipe(G(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#t.isNew()&&(i.containsBackup===!0?this.#i.open(b,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(b,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}let n=t.includes("?");i.action==="trust-cert"&&this.#t.setTargetUrl(t+`${n?"&":"?"}accept-specified-ssl-hash=${i.certData}`),i.action==="approve-host-key"&&this.#t.setTargetUrl(t+`${n?"&":"?"}ssh-fingerprint=${i.reportedHostKey}`),i.testAgain&&this.testDestination(i.destinationIndex)}}))}setDestination(e){this.#t.setTargetUrl(`${e}://`)}removeDestination(){this.#t.setTargetUrl(null)}goBack(){this.#e.navigate(["general"],{relativeTo:this.#n.parent})}next(){this.#t.isNew()||this.#t.submit(!0),this.#e.navigate(["encryption"],{relativeTo:this.#n.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=K({type:o,selectors:[["app-restore-destination"]],viewQuery:function(t,i){t&1&&j(i.formRef,Et,5),t&2&&H()},features:[Y([L])],decls:24,vars:5,consts:()=>{let e;e=$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:`,e=X(e);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let i;i=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let n;n=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let s;s=$localize`Other destinations`;let U;U=$localize`Edit target URL`;let v;v=$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",""],["option",""],e,t,i,n,s,U,v,B,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[3,"targetUrl"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,i){if(t&1){let n=d();a(0,"form",10,0),u("submit",function(){return c(n),_(i.next())}),a(2,"header")(3,"h3",11),D(4,2),a(5,"div",12),E(6,Rt,4,5,"button",13),a(7,"spk-menu")(8,"button",14),g(9,"spk-icon"),r(),h(10,15),a(11,"button",16),u("click",function(){return c(n),_(i.openTargetUrlDialog())}),g(12,"spk-icon"),r(),P(),r()(),S(),r(),E(13,Nt,5,1,"p"),r(),E(14,At,9,1),E(15,$t,1,1,"app-single-destination",17),a(16,"div",18)(17,"button",19),u("click",function(){return c(n),_(i.goBack())}),D(18,3),g(19,"spk-icon"),S(),r(),a(20,"button",20),D(21,4),g(22,"spk-icon"),S(),r()()(),E(23,yt,15,4,"spk-dialog",21)}if(t&2){let n=!!i.targetUrlModel();F(6),C(n?-1:6),F(7),C(n?13:-1),F(),C(n?-1:14),F(),C(n?15:-1),F(8),C(i.targetUrlDialogOpen()?23:-1)}},dependencies:[St,gt,pt,lt,ct,_t,Tt,ut,st,Ft,it,at,ot],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}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{w as default};
|
package/chunk-EK2B2CO4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as k}from"./chunk-LSNBRSNG.js";import"./chunk-A7BFGBWF.js";import"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{e as S}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as T,g as M,h as f}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Hb as s,Ib as l,Jb as i,Oa as r,_a as D,qc as d,ub as c,vb as e,wb as n,xb as _}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let m;m=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let P;return P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,m,P,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(r(11),c("routerLink",d(2,E)),r(9),c("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
|
package/chunk-FX2XKS5C.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-67XQIEG5.js";import{d as P,r as $}from"./chunk-ZCT7SRIM.js";import{h as O}from"./chunk-XD6MBGQY.js";import{S as F,X as b,la as C,r as f}from"./chunk-67YRCRMI.js";import{a}from"./chunk-EUDKD2JW.js";var g=class t{#t=b(O);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(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":e}}).pipe(f(r=>this.#e(r)))}createS3IamUser(e,r){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":e,"s3-password":r}})}createS3PolicyIAM(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:e}})}getStorjConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":e}}).pipe(f(r=>this.#e(r)))}getOpenstackConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":e}}).pipe(f(r=>this.#e(r)))}getGcsConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":e}}).pipe(f(r=>this.#e(r)))}#e(e){return(e.Result&&typeof e.Result=="object"&&Object.entries(e.Result).map(([r,n])=>({key:r,value:n})))??[]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=F({token:t,factory:t.\u0275fac,providedIn:"root"})};function S(t){return t==null||t===""?"":":"+t.toString()}function l(t){return t==null?"":t.startsWith("/")?t:"/"+t}function i(t,e){let r={},n={},s=k.find(p=>p.key===t);return e.searchParams.forEach((p,u)=>{s?.dynamicFields?.some(y=>y===u||y?.name===u)?n[u]=decodeURIComponent(p):r[u]=decodeURIComponent(p)}),{advanced:r,dynamic:n}}function c(t,e=!1){let r=t.map(([s,p])=>`${s}=${p?encodeURIComponent(p.toString()):""}`).join("&");return r?(e?"":"?")+r:""}function I(t){let e=t.destinationType,r=k.find(n=>n.customKey===e||n.key===e);if(!r)throw new Error("Invalid destination type");return r?.mapper.to(t)??""}function N(t){let e=URL.canParse(t),r=t.split("://")[0],n=t.split("://")[1],s="http://"+n;if(!n)return null;if(n.startsWith("%")&&r==="file")return k.find(p=>p.customKey===r||p.key===r)?.mapper.from(r,new URL("http://localhost"),t);try{let p=new URL(s);if(p.host==="undefined")return null;let u=n.split("?")[0].split("/")[0],d=!isNaN(Number(p.host.replaceAll(".",""))),y=u.split("."),v=y.length===4&&y.every(D=>D.length&&D.length<=3&&!isNaN(Number(D))&&parseInt(D)<=255);return d&&!v?null:k.find(D=>D.customKey===r||D.key===r)?.mapper.from(r,p,t)}catch{return null}if(!e)throw new Error("Invalid target path");return null}var o=new $,m={type:"error",message:$localize`Using double leading slashes is most likely wrong, and will result in objects being created with a leading slash in the name.`},k=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",doubleSlash:m,shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>o.control(t??"")}},mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${e}`},from:(t,e,r)=>{let s=r.startsWith("file:///")?r.split("file:///")[1]:r.split("file://")[1],p=s.startsWith("%"),d=s.slice(1).startsWith(":\\")||p?s:"/"+s;return a({destinationType:t,custom:{path:d.split("?")[0]}},i(t,e))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>o.control(t??"",[P.required,P.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",doubleSlash:{type:"warning",message:$localize`Using double leading slashes makes the path absolute, pointing to the root of the filesystem.`},formElement:t=>o.control(t??"")}},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:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+S(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"s3",displayName:"S3 Compatible",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get(g).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(g).s3StorageClasses}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname,bucket:e.hostname}},i(t,e))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get(g).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(g).gcsStorageClasses},"authid"],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${e}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"authid",type:"Password"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>C([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{server:r,path:n}=t.custom;return`${t.destinationType}://${r+l(n)+e}`},from:(t,e,r)=>{let n=e.pathname.replace(/^\//,"");return a({destinationType:t,custom:{server:e.hostname,path:n}},i(t,e))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Container name",longDescription:"Container name",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+S(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+S(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{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:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{bucket:e.hostname,path:decodeURIComponent(e.pathname)}},i(t,e))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{bucket:e.hostname,path:e.pathname}},i(t,e))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{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:t=>o.control(t??"",[P.email])},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+S(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{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:t=>{let e=t.dynamic["rclone-remote-repository"],r=t.dynamic["rclone-remote-path"],n=Object.entries(t.dynamic).filter(([p])=>!["rclone-remote-repository","rclone-remote-path"].includes(p)),s=c([...Object.entries(t.advanced),...n]);return`${t.destinationType}://${e}/${r+s}`},from:(t,e,r)=>{let{advanced:n,dynamic:s}=i(t,e);return a({destinationType:t,dynamic:a({"rclone-remote-repository":e.hostname,"rclone-remote-path":e.pathname},s)},n)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:t=>t.get(g).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:t=>t.get(g).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{bucket:r}=t.custom;return`${t.destinationType}://${r+e}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname,bucket:e.hostname}},i(t,e))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:e,server:r,path:n}=t.custom,s=t.dynamic["use-ssl"],p=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([u])=>u!=="use-ssl")]);return`${t.destinationType}${s?"s":""}://${r+S(e)+l(n)+p}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",doubleSlash:{type:"warning",message:$localize`Using double leading slashes makes the path absolute, pointing to the root of the filesystem.`},formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:e,server:r,path:n}=t.custom,s=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([p])=>p!=="use-ssl")]);return`${t.destinationType}://${r+S(e)+l(n)+s}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:t=>{let e=t.custom.server,r=t.dynamic["sia-targetpath"],n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([s])=>s!=="sia-targetpath")]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname}},i(t,e))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},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:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([n])=>n!=="cos-targetpath")]);return`${t.destinationType}://${e+r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname}},i(t,e))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:t=>{let{port:e,server:r,path:n,username:s,password:p}=t.custom,u={"auth-username":s,"auth-password":p},d=t.dynamic["use-ssl"],y=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([v])=>v!=="use-ssl"),...Object.entries(u)]);return`${t.destinationType}${d?"s":""}://${r+S(e)+l(n)+y}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:t=>{let{share:e,server:r,path:n,username:s,password:p}=t.custom,u={"auth-username":s,"auth-password":p},d=new Map([...Object.entries(u),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),y=c(Array.from(d));return`${t.destinationType}://${r+l(e)+l(n)+y}`},from:(t,e,r)=>{let n=e.pathname.split("/")[1],s=e.pathname.split("/").slice(2).join("/");return a({destinationType:t,custom:{server:e.hostname,share:n,path:s}},i(t,e))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:t=>o.control(t??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:t=>{let{path:e,username:r,password:n}=t.custom,s={"auth-username":r,"auth-password":n},p=new Map([...Object.entries(s),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),u=c(Array.from(p));return`${t.destinationType}://${e+u}`},from:(t,e,r)=>{let n=e.hostname??"";return e.pathname&&n!==""&&e.pathname[0]!="/"&&(n+="/"),n+=e.pathname,a({destinationType:t,custom:{path:n}},i(t,e))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:t=>o.control(t??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:t=>o.control(t??"")}],mapper:{to:t=>{let{path:e,username:r,password:n,apitoken:s}=t.custom,p=(s||"").trim()===""?{"auth-username":r,"auth-password":n}:{"api-token":s},u=new Map([...Object.entries(p),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),d=c(Array.from(u));return`${t.destinationType}://${e+d}`},from:(t,e,r)=>{let n=e.hostname??"";return e.pathname&&n!==""&&e.pathname[0]!="/"&&(n+="/"),n+=e.pathname,a({destinationType:t,custom:{path:n}},i(t,e))}}},{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",doubleSlash:m}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${c([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,e,r)=>a({destinationType:t},i(t,e))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:t=>t.get(g).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",doubleSlash:m}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=API%20key&${c([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,e,r)=>a({destinationType:t},i(t,e))}}],H={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};export{I as a,N as b,k as c,H as d};
|
package/chunk-GQTJISMN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-67XQIEG5.js";import{a as R}from"./chunk-XBP565VF.js";import"./chunk-2YHX57UE.js";import"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as F,g as U,p as w}from"./chunk-DNBOZ26J.js";import{h as L}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as S,F as d,Fc as O,Jb as E,Kb as x,La as T,Lb as M,Nb as k,Oa as l,Ob as _,X as m,_a as G,_b as P,ba as u,bc as s,ca as g,cc as b,la as C,pb as p,qb as c,r as A,ub as N,vb as a,wb as o,xb as f}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function y(n,i){n&1&&f(0,"spk-progress-bar",2)}function V(n,i){if(n&1&&(a(0,"a",6)(1,"spk-icon"),s(2,"download"),o(),s(3," Download update "),o()),n&2){let e,t=_(2);N("href",(e=t.serverState())==null?null:e.UpdateDownloadLink,T)}}function $(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=_();return g(r.checkForUpdates())}),s(1,"Check for updates"),o(),p(2,V,4,1,"a",6)}if(n&2){let e,t=_();P("loader",t.checkingForUpdates()),l(2),c((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function I(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=_();return g(r.checkForUpdates())}),s(1,"Checking for updates \u2026"),o()}}function B(n,i){n&1&&f(0,"spk-progress-bar",2)}var h=class n{#e=m(L);#t=m(R);isLoading=C(!0);checkingForUpdates=C(!1);serverState=this.#t.serverState;duplicatiVersion=O(()=>this.#t.serverState()?.UpdatedVersion);generalInfo=D(this.#e.getApiV1Acknowledgements().pipe(A(i=>i.Acknowledgements),d(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(d(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=G({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let i;i=$localize`General`;let e;return e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[i,e,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(p(0,y,1,0,"spk-progress-bar",2),a(1,"section")(2,"h3"),E(3,0),o(),a(4,"p"),E(5,1),o(),a(6,"div",3),p(7,$,3,3)(8,I,2,0,"button",4),p(9,B,1,0,"spk-progress-bar",2),o(),a(10,"div"),s(11),o()()),e&2){let r,v;c(t.isLoading()?0:-1),l(5),x(t.duplicatiVersion()),M(5),l(2),c(((r=t.serverState())==null?null:r.UpdaterState)==="Waiting"?7:((r=t.serverState())==null?null:r.UpdaterState)==="Checking"?8:-1),l(2),c(((v=t.serverState())==null?null:v.UpdaterState)==="Downloading"?9:-1),l(2),b(t.generalInfo())}},dependencies:[w,U,F],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
|
package/chunk-MOOM536C.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ke,c as $e,d as B}from"./chunk-5RPDEEQ3.js";import{a as Re}from"./chunk-67XQIEG5.js";import{a as ue}from"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{b as Pe,c as Te,d as m,e as Ce,f as Ee,j as Se,o as me,q as ge,r as Oe,t as fe}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{b as te,d as ne,e as ie}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{A as ce,C as Fe,a as re,b as se,f as ae,g as le,l as _e,p as pe}from"./chunk-DNBOZ26J.js";import{c as oe,h as de}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as I,F as M,Fc as N,Gc as ee,Hb as p,Ib as c,Jb as E,Kb as y,Lb as h,Mb as X,N as Q,Nb as S,Oa as s,Ob as u,X as P,_a as J,_b as O,ba as w,bc as D,ca as x,cc as W,ec as Y,la as T,pb as F,qb as d,qc as Z,ub as C,vb as a,wb as r,xb as _}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var Ae=()=>["/"];function we(t,o){t&1&&(a(0,"spk-toggle",23),p(1,5),_(2,"input",26),c(),r())}function xe(t,o){t&1&&(a(0,"span",29),E(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",29),E(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),h(1)}}function Ne(t,o){if(t&1&&_(0,"spk-progress-bar",36),t&2){let e=u(2);O("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),C("value",e.calculatePasswordStrength()*(100/5))}}function Me(t,o){t&1&&(a(0,"span",29),E(1,11),r())}function Ie(t,o){t&1&&(a(0,"span",29),E(1,12),r())}function ye(t,o){if(t&1&&(a(0,"span",29),E(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),h(1)}}function he(t,o){t&1&&(p(0,7,1),_(1,"spk-icon"),c())}function Xe(t,o){t&1&&(p(0,7,2),_(1,"spk-icon"),c())}function Be(t,o){t&1&&(p(0,14,1),_(1,"spk-icon",38),c())}function Le(t,o){t&1&&(p(0,14,2),_(1,"spk-icon"),c())}function be(t,o){if(t&1){let e=I();a(0,"button",37),S("click",function(){w(e);let i=u(2);return x(i.copyPassword())}),p(1,14),F(2,Be,2,0)(3,Le,2,0),c(),r()}if(t&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function ve(t,o){t&1&&(a(0,"spk-alert",35),E(1,15),r())}function Ge(t,o){if(t&1){let e=I();a(0,"div",24)(1,"spk-form-field")(2,"label",27),p(3,6),_(4,"sup"),c(),r(),_(5,"input",28),F(6,xe,2,0,"span",29)(7,De,2,1,"span",29),r(),F(8,Ne,1,9,"spk-progress-bar",30),a(9,"spk-form-field"),_(10,"input",31),F(11,Me,2,0,"span",29)(12,Ie,2,0,"span",29)(13,ye,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),S("click",function(){w(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),p(16,7),F(17,he,2,0)(18,Xe,2,0),c(),r(),a(19,"button",33),S("click",function(){w(e);let i=u();return x(i.generatePassword())}),p(20,8),_(21,"spk-icon"),c(),r(),F(22,be,4,1,"button",34),r(),F(23,ve,2,0,"spk-alert",35),r()}if(t&2){let e=u();s(5),C("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),C("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ke(t,o){if(t&1&&(a(0,"div",25)(1,"code"),D(2),r()()),t&2){let e=u();s(2),W(e.exportedCmd())}}var f=new Oe,L=class t{#o=P(ke);#t=P(de);#e=P(te);#n=P(ne);#i=P(oe);#r=P(ue);isExporting=T(!1);exportType=T("file");exportedCmd=T(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[m.required,$e()]),password:f.control("",[B("encryption",!0,[m.required,m.minLength(3)])]),repeatPassword:f.control("",[B("encryption",!0,[m.required,m.minLength(3)])])});exportFormSignal=Re(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>this.exportFormSignal()?.encryption??!1);activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=T(!1);copiedPassword=T(!1);showCopyPassword=T(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=ee(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Q(o=>{let e=i=>{let g=Object.entries(i);return g?"?"+g.map(([R,k])=>`${R}=${k}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-export"]],decls:26,vars:15,consts:()=>{let o;o=$localize`Remember to copy the password`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let i;i=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let g;g=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let R;R=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let b;b=$localize`Password`;let v;v=$localize`Repeat password`;let G;G=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let $;$=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,$=X($);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let U;U=$localize`Passwords are required`;let z;z=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let V;V=$localize`Passwords do not match`;let q;q=$localize`Passwords are required`;let j;j=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let A;A=$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:`,A=X(A);let H;return H=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `,[e,n,i,g,R,k,G,$,K,U,z,V,q,j,A,H,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","","spkTooltip",o,1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",b,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",v,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),D(2," Export backup configuration "),a(3,"div",16)(4,"button",17),p(5,0),_(6,"spk-icon"),c(),r(),a(7,"button",18),S("click",function(){return n.submit()}),p(8,1),_(9,"spk-icon"),c(),r()()(),a(10,"p"),D(11),r()(),a(12,"form",19)(13,"spk-button-group")(14,"button",20),S("click",function(){return n.exportType.set("cmd")}),p(15,2),_(16,"spk-icon"),c(),r(),a(17,"button",20),S("click",function(){return n.exportType.set("file")}),p(18,3),_(19,"spk-icon"),c(),r()(),a(20,"spk-toggle",21),p(21,4),_(22,"input",22),c(),r(),F(23,we,3,0,"spk-toggle",23),F(24,Ge,24,8,"div",24),F(25,Ke,3,1,"div",25),r()),e&2){let i;s(4),C("routerLink",Z(14,Ae)),s(3),O("loading",n.isExporting()),C("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()),s(4),Y("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),C("formGroup",n.exportForm),s(2),O("active",n.exportType()==="cmd"),s(3),O("active",n.exportType()==="file"),s(6),d(n.exportType()==="file"?23:-1),s(),d(n.encryptionFieldSignal()?24:-1),s(),d(n.exportedCmd()?25:-1)}},dependencies:[fe,Se,Te,Pe,Ce,Ee,me,ge,ie,ae,ce,re,_e,le,se,pe,Fe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{L as default};
|
package/chunk-PTFQBTH3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ut}from"./chunk-EBYGIC45.js";import{a as Re}from"./chunk-ZIJ7ZEHR.js";import{a as rt,b as Ve,c as _t}from"./chunk-5RPDEEQ3.js";import{a as ae}from"./chunk-67XQIEG5.js";import{a as ot}from"./chunk-FC45TEB6.js";import{a as Ee}from"./chunk-2YHX57UE.js";import{b as Te,c as Q,d as fe,e as Z,f as Ae,h as lt,i as oe,j as he,k as Pe,n as at,o as Ne,p as st,q as De,r as Me,s as le,t as ye}from"./chunk-ZCT7SRIM.js";import{b as ne,d as H}from"./chunk-DQM3ATT4.js";import{A as Se,C as nt,a as j,b as Je,e as et,g as ie,l as q,p as tt,t as Y}from"./chunk-DNBOZ26J.js";import{h as it}from"./chunk-XD6MBGQY.js";import{Bb as x,F as we,Fc as R,Gc as me,Hb as g,Ib as C,Jb as T,Kc as ve,Lc as Be,Mb as Ue,Mc as Fe,Nb as F,Oa as r,Ob as u,S as pe,Wb as de,X as D,Xb as ge,Yb as Ge,_a as z,_b as Ce,ba as c,bc as I,ca as p,cc as xe,db as Ye,dc as Ze,gc as O,hc as $,ic as w,la as m,ob as Qe,pb as M,qb as y,qc as be,rb as ke,sb as Le,tb as Ie,ub as E,vb as a,wb as s,xb as d,yb as v,zb as B}from"./chunk-67YRCRMI.js";import{a as G,b as W}from"./chunk-EUDKD2JW.js";var Oe=class l{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||l)};static \u0275prov=pe({token:l,factory:l.\u0275fac,providedIn:"root"})};function Ct(l,t){if(l&1){let e=x();a(0,"div",24)(1,"spk-form-field")(2,"label",25),T(3,7),s(),a(4,"input",26,0),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),F("focus",function(){c(e);let i=Ge(5);return p(i.showPicker())}),s(),a(6,"spk-icon",27),I(7,"clock"),s()(),a(8,"spk-form-field"),d(9,"label",28),a(10,"input",29,1),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),F("focus",function(){c(e);let i=Ge(11);return p(i.showPicker())}),s(),a(12,"spk-icon",27),I(13,"calendar"),s()()(),a(14,"div",24)(15,"spk-form-field")(16,"label",30),T(17,8),s(),a(18,"input",31),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),s()(),a(19,"spk-select",32)(20,"input",33),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),s()()(),a(21,"app-toggle-card",34),v(22,35),T(23,9),B(),a(24,"div",36)(25,"spk-toggle",19),g(26,10),a(27,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),s(),C(),s(),a(28,"spk-toggle",19),g(29,11),a(30,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),s(),C(),s(),a(31,"spk-toggle",19),g(32,12),a(33,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),s(),C(),s(),a(34,"spk-toggle",19),g(35,13),a(36,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),s(),C(),s(),a(37,"spk-toggle",19),g(38,14),a(39,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),s(),C(),s(),a(40,"spk-toggle",19),g(41,15),a(42,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),s(),C(),s(),a(43,"spk-toggle",19),g(44,16),a(45,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),s(),C(),s()()()}if(l&2){let e=u();r(4),O("ngModel",e.scheduleFields.nextTime().time),r(6),O("ngModel",e.scheduleFields.nextTime().date),r(8),O("ngModel",e.scheduleFields.runAgain().repeatValue),r(),E("options",e.unitOptions)("isClearable",!1),r(),O("ngModel",e.scheduleFields.runAgain().repeatUnit),r(),E("disallowToggle",!0),r(6),O("ngModel",e.scheduleFields.runAgain().allowedDays.mon),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.tue),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.wed),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.thu),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.fri),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.sat),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{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`}],te={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}}},Ke=class l{#e=D(J);#t=D(H);#i=D(ne);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let _;_=$localize`Next time`;let S;S=$localize`Run again every`;let A;A=$localize`Allowed days`;let k;k=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,_,S,A,k,U,h,L,K,b,X,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(a(0,"h3",17),T(1,2),s(),a(2,"div",18)(3,"spk-toggle",19),g(4,3),a(5,"input",20),w("ngModelChange",function(o){return $(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),s(),C(),s(),a(6,"p"),T(7,4),s()(),M(8,Ct,46,14),a(9,"div",21)(10,"button",22),F("click",function(){return n.goBack()}),g(11,5),d(12,"spk-icon"),C(),s(),a(13,"button",23),F("click",function(){return n.next()}),g(14,6),d(15,"spk-icon"),C(),s()()),e&2&&(r(5),O("ngModel",n.scheduleFields.autoRun),r(3),y(n.scheduleFields.autoRun()?8:-1))},dependencies:[le,Q,Pe,Te,Z,oe,q,Se,j,ie,Y,Re],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ft(l,t){if(l&1&&(v(0,4),I(1),B()),l&2){let e,n=u();r(),xe((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(l,t){if(l&1&&(v(0,5),I(1),B()),l&2){let e,n=u();r(),xe((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],$e=class l{path=Be.required();osType=Be();pathChange=ve();remove=ve();internalPath=m("");pathType=m("-Expression");currentExpressionOption=R(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=R(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(G({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(G({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(G({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(G({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(G({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(G({},n),{startsWith:"*.",endsWith:""}):W(G({},n),{startsWith:"",endsWith:""}))});pathEffect=me(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(a(0,"spk-select",0)(1,"input",1),w("ngModelChange",function(o){return $(n.pathType,o)||(n.pathType=o),o}),F("ngModelChange",function(){return n.updateFilter()}),s()(),a(2,"spk-form-field",2)(3,"input",3),w("ngModelChange",function(o){return $(n.internalPath,o)||(n.internalPath=o),o}),F("ngModelChange",function(){return n.updateFilter()}),s(),M(4,Ft,2,1,"ng-container",4),M(5,St,2,1,"ng-container",5),s(),a(6,"div",6),F("click",function(){return n.removeFilter()}),a(7,"spk-icon",7),I(8,"x-circle"),s()()),e&2){let i,o;E("options",n.expressionOptions())("isClearable",!1),r(),O("ngModel",n.pathType),r(2),O("ngModel",n.internalPath),r(),y(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),r(),y(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[le,Q,Z,oe,Y,q,j],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Tt=["formRef"],ct=()=>({standalone:!0});function ft(l,t){if(l&1){let e=x();a(0,"spk-form-field",42)(1,"input",43),w("ngModelChange",function(i){c(e);let o=u(2);return $(o.editingPath,i)||(o.editingPath=i),p(i)}),s()(),a(2,"button",44),F("click",function(){c(e);let i=u(2);return p(i.updatePath())}),a(3,"spk-icon"),I(4,"floppy-disk"),s()(),a(5,"button",44),F("click",function(){c(e);let i=u(2);return p(i.cancelEditPath())}),a(6,"spk-icon"),I(7,"x-bold"),s()()}if(l&2){let e=u(2);r(),O("ngModel",e.editingPath),E("ngModelOptions",be(2,ct))}}function At(l,t){if(l&1){let e=x();a(0,"spk-form-field",42),d(1,"input",45),s(),a(2,"button",44),F("click",function(){c(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),a(3,"spk-icon"),I(4,"pen"),s()(),a(5,"button",44),F("click",function(){c(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),a(6,"spk-icon"),I(7,"trash-simple"),s()()}if(l&2){let e=u().$implicit;Qe("readonly",!0),r(),E("ngModel",e)("ngModelOptions",be(3,ct))}}function ht(l,t){if(l&1&&(a(0,"div",30),M(1,ft,8,3)(2,At,8,4),s()),l&2){let e=t.$implicit,n=u();r(),y(n.oldPath()===e?1:2)}}function Pt(l,t){if(l&1){let e=x();a(0,"app-new-filter",47),F("pathChange",function(i){let o=c(e).$index,_=u(2);return p(_.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return p(o.removePathAt(i))}),s()}if(l&2){let e=t.$implicit,n=u(2);E("path",e)("osType",n.osType()??"")}}function Nt(l,t){if(l&1&&Le(0,Pt,1,2,"app-new-filter",46,ke),l&2){let e=u();Ie(e.pathArray())}}function Dt(l,t){if(l&1&&(a(0,"div",41)(1,"spk-form-field"),d(2,"input",48),s(),a(3,"spk-select",49),d(4,"input",50),s()()),l&2){let e=u();r(3),E("options",e.sizeOptions())("isClearable",!1)}}var V=new Me,Mt=["Bytes","KB","MB","GB","TB","PB"],pt=(l={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(l.path),excludes:V.group({hidden:V.control(l.excludes.hidden),system:V.control(l.excludes.system),temporary:V.control(l.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),ze=class l{#e=D(J);#t=D(H);#i=D(ne);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new lt("");filesLargerThan=R(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=m(Mt);osType=this.#e.osType;pathSignal=ae(this.sourceDataForm.controls.path.valueChanges);pathArray=R(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=R(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=m(null);editingPath=m(null);addingNewPath=m(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,o=e.replace(i,"");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(_=>!_.startsWith("-")&&!_.startsWith("+")).join("\0"),o=this.pathArray().map((_,S)=>S===e?`${t}`:`${_}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(o=>!o.startsWith("-")&&!o.startsWith("+")).join("\0"),i=this.pathArray().filter((o,_)=>_!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\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 t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&de(n.formRef,Tt,5),e&2&&ge()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let _;_=$localize`Source Data`;let S;S=$localize`Folder path`;let A;A=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let k;k=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let U;U=$localize`Paths`;let h;h=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let K;K=$localize`Customize your filters.`;let b;b=$localize`Add filter`;let X;X=$localize`Exclude`;let N;N=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let re;re=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files larger than `;let f;f=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],_,S,A,k,U,h,L,K,b,X,N,ee,re,_e,ue,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",f,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=x();a(0,"form",16,0),F("submit",function(){return c(i),p(n.next())}),a(2,"div",17)(3,"h3",18),T(4,1),s(),a(5,"app-file-tree",19)(6,"label",20),T(7,2),s(),d(8,"input",21),s(),a(9,"div",22)(10,"button",23),F("click",function(){return c(i),p(n.goBack())}),g(11,3),d(12,"spk-icon"),C(),s(),a(13,"button",24),g(14,4),d(15,"spk-icon"),C(),s()()(),a(16,"div",25)(17,"app-toggle-card",26),v(18,27),T(19,5),B(),a(20,"p",28),T(21,6),s(),a(22,"div",29),Le(23,ht,3,1,"div",30,ke),a(25,"div",31)(26,"spk-form-field"),d(27,"input",32),s(),a(28,"button",33),F("click",function(){return c(i),p(n.addNewPath())}),a(29,"spk-icon"),I(30,"plus"),s()()()()(),a(31,"app-toggle-card",26),v(32,27),T(33,7),B(),a(34,"p",28),T(35,8),s(),a(36,"button",34),F("click",function(){return c(i),p(n.addFilter())}),T(37,9),s(),M(38,Nt,2,0),s(),a(39,"app-toggle-card",35),v(40,27),T(41,10),B(),a(42,"p",28),T(43,11),s(),a(44,"spk-toggle",36),g(45,12),d(46,"input",37),C(),s(),a(47,"spk-toggle",36),g(48,13),d(49,"input",38),C(),s(),a(50,"spk-toggle",36),g(51,14),d(52,"input",39),C(),s(),a(53,"spk-toggle",40),F("click",function(){return c(i),p(n.toggleFilesLargerThan())}),T(54,15),s(),M(55,Dt,5,2,"div",41),s()()()}if(e&2){let i;E("formGroup",n.sourceDataForm),r(5),E("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),E("disallowToggle",!0),r(6),Ie(n.nonFilterPaths()),r(4),E("formControl",n.newPathCtrl),r(4),E("disallowToggle",!0),r(7),y((i=n.pathSignal())!=null&&i.length?38:-1),r(),E("disallowToggle",!0),r(14),Ce("active",n.filesLargerThan()),r(2),y(n.filesLargerThan()?55:-1)}},dependencies:[le,he,Q,Pe,Te,Z,Ae,oe,ye,at,Ne,De,st,q,j,ie,Se,Y,$e,ut,Re],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-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var dt="1W:1D,4W:1W,12M:1M",J=class l{#e=D(H);#t=D(Ee);#i=D(et);#n=D(it);#o=D(Oe);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:m(te.autoRun),nextTime:m(te.nextTime),runAgain:m(te.runAgain)};settings=m([]);optionsFields={remoteVolumeSize:m("50MB"),backupRetention:m("all"),backupRetentionTime:m(""),backupRetentionVersions:m(0),backupRetentionCustom:m("")};targetUrlModel=m(null);oauthServiceLink=R(()=>this.#t.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/");oauthServiceLinkNew=R(()=>this.#t.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/");isDraft=m(!1);backupId=m(null);backupName=R(()=>this.generalFormSignal()?.name??"");isSubmitting=m(!1);finishedLoading=m(!1);backupDefaults=m(null);applicationOptions=m(null);isNew=R(()=>this.backupId()==="new");osType=R(()=>this.#t.systemInfo()?.OSType);selectedOptions=m([]);sourceDataFormSignal=ae(this.sourceDataForm.valueChanges);generalFormSignal=ae(this.generalForm.valueChanges);encryptionFieldSignal=ae(this.generalForm.controls.encryption.valueChanges);destinationOptions=R(()=>this.#t.backendModules()??[]);advancedOptions=R(()=>this.#t.systemInfo()?.Options?.map(this.#l)??[]);#l(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=R(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[He,...t]});nonSelectedOptions=R(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#s(),n=this.backupId();n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#a(),this.#e.navigate(["/"]);return}this.#i.open(ot,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#a(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(S=>`${S.Include?"":"-"}${S.Expression}`)??[],i=t.Settings?.find(S=>S.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(S=>S.Name==="--skip-files-larger-than")??null,_={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(_)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Settings?.find(_=>_.Name==="encryption-module"),n=t.Settings?.find(_=>_.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",o={name:t.Name??"",description:t.Description??""};i&&i!==""&&(o.encryption=i),n&&n!==""&&(o.password=n,o.repeatPassword=n),this.generalForm.patchValue(o)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#r(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>G(G({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(_=>!e.includes(_.Name)),i=t.Settings?.filter(_=>e.includes(_.Name));this.settings.set(n??[]),n?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var o="all";i?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===dt)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(o)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#s(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let _=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([h,L])=>L).map(([h,L])=>h):[],S=n.path?.split("\0")??[],A=this.mapFormsToSettings(),k=Object.entries(n.excludes??{}).filter(([h,L])=>L&&h!=="filesLargerThan").map(([h])=>h),U=n.excludes?.filesLargerThan;return k.length&&A.push({Name:"--exclude-files-attributes",Value:k.join(",")}),U&&U.size!==null&&U.unit!==null&&A.push({Name:"--skip-files-larger-than",Value:`${U.size}${U.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:S.filter(h=>!h.startsWith("-")),Settings:A,Filters:S.filter(h=>h.startsWith("-")).map((h,L)=>({Order:L,Include:!1,Expression:h.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:_}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":o.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":o.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":o.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":o.push({Name:"retention-policy",Value:dt});break}let _=[...t,...n],S=this.settings().filter(A=>!_.includes(A.Name)).map(A=>{let k=A.Value;return typeof A.Value=="number"&&(k=A.Value.toString()),typeof A.Value=="boolean"&&(k=A.Value?"True":"False"),{Name:A.Name,Value:k}});return[...i,...o,...S]}#r(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t){this.targetUrlModel.set(t)}#a(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||l)};static \u0275prov=pe({token:l,factory:l.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(l,t){l&1&&(a(0,"spk-alert",17),g(1,5),d(2,"spk-icon",26),C(),s())}function Ot(l,t){if(l&1&&I(0),l&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function $t(l,t){if(l&1&&d(0,"spk-progress-bar",40),l&2){let e=u(3);Ce("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),E("value",e.calculatePasswordStrength()*(100/5))}}function wt(l,t){l&1&&(a(0,"span",35),T(1,10),s())}function kt(l,t){l&1&&(g(0,8,1),d(1,"spk-icon"),C())}function Lt(l,t){l&1&&(g(0,8,2),d(1,"spk-icon"),C())}function It(l,t){l&1&&(g(0,11,1),d(1,"spk-icon",42),C())}function Ut(l,t){l&1&&(g(0,11,2),d(1,"spk-icon"),C())}function Gt(l,t){if(l&1){let e=x();a(0,"button",41),F("click",function(){c(e);let i=u(3);return p(i.copyPassword())}),g(1,11),M(2,It,2,0)(3,Ut,2,0),C(),s()}if(l&2){let e=u(3);r(2),y(e.copiedPassword()?2:3)}}function xt(l,t){l&1&&(a(0,"spk-alert",39),T(1,12),s())}function bt(l,t){if(l&1){let e=x();a(0,"div",30)(1,"spk-form-field")(2,"label",31),g(3,7),d(4,"sup"),C(),s(),d(5,"input",32),s(),M(6,$t,1,9,"spk-progress-bar",33),a(7,"spk-form-field"),d(8,"input",34),M(9,wt,2,0,"span",35),s(),a(10,"div",36)(11,"button",37),F("click",function(){c(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),g(12,8),M(13,kt,2,0)(14,Lt,2,0),C(),s(),a(15,"button",37),F("click",function(){c(e);let i=u(2);return p(i.generatePassword())}),g(16,9),d(17,"spk-icon"),C(),s(),M(18,Gt,4,1,"button",38),s(),M(19,xt,2,0,"spk-alert",39),s()}if(l&2){let e=u(2);r(5),E("type",e.showPassword()?"text":"password"),r(),y(e.generalForm.value.password?6:-1),r(2),E("type",e.showPassword()?"text":"password"),r(),y(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),y(e.showPassword()?13:14),r(5),y(e.showCopyPassword()?18:-1),r(),y(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function vt(l,t){if(l&1&&(a(0,"spk-select",27)(1,"label",28),T(2,6),s(),d(3,"input",29),Ye(4,Ot,1,1,"ng-template"),s(),M(5,bt,20,7,"div",30)),l&2){let e=u();E("options",e.encryptionOptions())("isClearable",!1),r(5),y(e.encryptionFieldSignal()!==""?5:-1)}}function Bt(l,t){if(l&1&&(a(0,"button",24),g(1,13),d(2,"spk-icon"),C(),s()),l&2){let e=u();E("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(l,t){if(l&1&&(a(0,"button",25),g(1,14),d(2,"spk-icon"),C(),s()),l&2){let e=u();E("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var se=new Me,gt=(l={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>se.group({name:se.control(l.name,[fe.required]),description:se.control(l.description),encryption:se.control(l.encryption,[_t()]),password:se.control(l.password,[Ve(t=>t?.value.encryption!=="",[fe.required])]),repeatPassword:se.control(l.repeatPassword,[Ve(t=>t?.value.encryption!=="",[fe.required])])}),He={Key:"",DisplayName:"None"},je=class l{#e=D(H);#t=D(ne);#i=D(rt);#n=D(J);#o=D(Ee);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=m(!1);copiedPassword=m(!1);showCopyPassword=m(!1);encryptionEffect=me(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=R(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=R(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#l(t??""),this.copiedPassword.set(!0)}async#l(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[He,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&de(n.formRef,yt,5),e&2&&ge()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let S;S=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let k;k=$localize`Encryption`;let U;U=$localize`Encryption`;let h;h=$localize`Password`;let L;L=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let b;b=$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:`,b=Ue(b);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let N;N=$localize`Passwords do not match`;let ee;ee=$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:`,ee=Ue(ee);let re;re=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let _e;_e=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ue;return ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,_,S,A,U,K,b,X,N,ee,re,_e,ue,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",15,0),F("submit",function(){return c(i),p(n.next())}),a(2,"h3",16),T(3,1),s(),M(4,Rt,3,0,"spk-alert",17),a(5,"spk-form-field")(6,"label",18),g(7,2),d(8,"sup"),C(),s(),d(9,"input",19),s(),a(10,"spk-form-field")(11,"label",20),T(12,3),s(),d(13,"textarea",21),s(),M(14,vt,6,3),a(15,"div",22)(16,"button",23),F("click",function(){return c(i),p(n.exit())}),g(17,4),d(18,"spk-icon"),C(),s(),M(19,Bt,3,1,"button",24)(20,Vt,3,1,"button",25),s()()}if(e&2){let i;E("formGroup",n.generalForm),r(4),y(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),y(n.isNew()?14:-1),r(5),y(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[ye,he,Q,Z,Ae,Ne,De,q,Y,ie,j,tt,Je,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.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-8)}"],changeDetection:0})};export{gt as a,He as b,je as c,te as d,Ke as e,pt as f,ze as g,J as h};
|
package/chunk-T27DQWUZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Dt,b as mt}from"./chunk-VFFFKPK4.js";import"./chunk-5MMV45NA.js";import{c as gt}from"./chunk-FX2XKS5C.js";import{h as dt}from"./chunk-PTFQBTH3.js";import"./chunk-EBYGIC45.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import{a as b}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{c as st,e as Ft,f as lt,g as ct,i as ut,j as _t,r as pt,s as Tt}from"./chunk-ZCT7SRIM.js";import{b as Z,d as tt}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as et,b as nt,d as it,e as ot,l as at,o as rt}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as g,F as L,Fc as A,Hb as d,Ib as D,Jb as N,Kb as z,Lb as X,Mb as W,Mc as J,Nb as _,Oa as F,Ob as l,Wb as j,X as C,Xb as H,_a as V,_b as Q,ba as c,bc as O,ca as u,cc as B,dc as q,fa as K,gc as I,hc as E,ic as k,la as p,pb as S,qb as f,qc as Y,rb as $,sb as P,tb as M,ub as h,vb as a,wb as r,xb as T,yb as x,zb as U}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var Ct=["formRef"],St=()=>({maxWidth:"700px",width:"100%"});function ft(o,e){o&1&&(d(0,2,2),T(1,"spk-icon"),D())}function Nt(o,e){o&1&&N(0,2,3)}function Ot(o,e){if(o&1){let t=g();d(0,2,1),a(1,"button",16),_("click",function(){c(t);let n=l();return u(n.testDestination())}),S(2,ft,2,0)(3,Nt,1,0),r(),D()}if(o&2){let t=l();F(),Q("loader",t.testLoading())("success",t.successfulTest()),F(),f(t.successfulTest()?2:3)}}function It(o,e){if(o&1){let t=g();a(0,"p",22),_("click",function(){c(t);let n=l();return u(n.removeDestination())}),d(1,5),T(2,"strong")(3,"br")(4,"span",23),D(),r()}if(o&2){let t,i=l();F(4),z((t=i.selectedDestinationType())==null?null:t.displayName),X(1)}}function Et(o,e){if(o&1){let t=g();a(0,"div",29),_("click",function(){let n=c(t).$implicit,s=l(2);return u(s.setDestination(n.key))}),a(1,"h3"),O(2),r(),a(3,"p"),O(4),r()()}if(o&2){let t=e.$implicit;F(2),B(t.displayName),F(2),B(t.description)}}function kt(o,e){if(o&1){let t=g();a(0,"button",30,1),_("click",function(){let n=c(t).$implicit,s=l(2);return u(s.setDestination(n.key))}),O(2),r()}if(o&2){let t=e.$implicit;F(2),q(" ",t.displayName," ")}}function At(o,e){if(o&1&&(a(0,"div",24),P(1,Et,5,2,"div",25,$),r(),a(3,"spk-menu",26)(4,"button",27),N(5,6),r(),x(6,15),P(7,kt,3,1,"button",28,$),U(),r()),o&2){let t=l();F(),M(t.destinationTypeOptionsFocused()),F(2),h("searchable",!0),F(4),M(t.destinationTypeOptionsNotFocused())}}function yt(o,e){if(o&1){let t=g();a(0,"app-single-destination",31),k("targetUrlChange",function(n){c(t);let s=l();return E(s.targetUrlModel,n)||(s.targetUrlModel=n),u(n)}),r()}if(o&2){let t=l();I("targetUrl",t.targetUrlModel)}}function $t(o,e){if(o&1){let t=g();a(0,"spk-dialog",32),k("isOpenChange",function(n){c(t);let s=l();return E(s.targetUrlDialogOpen,n)||(s.targetUrlDialogOpen=n),u(n)}),a(1,"header",33)(2,"h2"),N(3,7),r(),a(4,"spk-alert",34),N(5,8),r()(),a(6,"div",35)(7,"spk-form-field")(8,"textarea",36),k("ngModelChange",function(n){c(t);let s=l();return E(s.targetUrlCtrl,n)||(s.targetUrlCtrl=n),u(n)}),r()()(),a(9,"footer",37)(10,"button",19),_("click",function(){c(t);let n=l();return u(n.closeTargetUrlDialog(!1))}),O(11,"Cancel"),r(),a(12,"button",38),_("click",function(){c(t);let n=l();return u(n.closeTargetUrlDialog(!0))}),d(13,9),T(14,"spk-icon"),D(),r()()()}if(o&2){let t=l();I("isOpen",t.targetUrlDialogOpen),h("options",Y(3,St)),F(8),I("ngModel",t.targetUrlCtrl)}}var y=new pt,jt=(o={destinations:[]})=>y.group({destinations:y.array(o.destinations)}),Ht=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:i})=>y.group({destinationType:y.control(o),custom:e,dynamic:t,advanced:i}),R=class o{#e=C(tt);#n=C(Z);#t=C(dt);#i=C(ot);#o=C(Dt);injector=C(K);formRef=J.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);successfulTest=p(!1);testLoading=p(!1);destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=p(gt.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description})));destinationTypeOptionsFocused=A(()=>{let e=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return e.map(i=>t.find(n=>n.key===i))});selectedDestinationType=A(()=>{let e=this.#t.targetUrlModel();if(!e)return null;let t=e.split("://")[0];return this.destinationTypeOptions().find(n=>t===n.key)});destinationTypeOptionsNotFocused=A(()=>{let e=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(i=>!e.includes(i.key))});openTargetUrlDialog(){let e=this.#t.targetUrlModel();this.targetUrlCtrl.set(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(e=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),i=this.targetUrlInitial();!e||t===i||!t||this.#t.setTargetUrl(t)}testDestination(e=0){let t=this.#t.targetUrlModel();t&&(this.testLoading.set(!0),this.#o.testDestination(t,e,!0).pipe(L(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#t.isNew()&&(i.containsBackup===!0?this.#i.open(b,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(b,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}let n=t.includes("?");i.action==="trust-cert"&&this.#t.setTargetUrl(t+`${n?"&":"?"}accept-specified-ssl-hash=${i.certData}`),i.action==="approve-host-key"&&this.#t.setTargetUrl(t+`${n?"&":"?"}ssh-fingerprint=${i.reportedHostKey}`),i.testAgain&&this.testDestination(i.destinationIndex)}}))}setDestination(e){this.#t.setTargetUrl(`${e}://`)}removeDestination(){this.#t.setTargetUrl(null)}goBack(){this.#e.navigate(["general"],{relativeTo:this.#n.parent})}next(){this.#t.isNew()||this.#t.submit(!0),this.#e.navigate(["source-data"],{relativeTo:this.#n.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=V({type:o,selectors:[["app-destination"]],viewQuery:function(t,i){t&1&&j(i.formRef,Ct,5),t&2&&H()},decls:24,vars:5,consts:()=>{let e;e=$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:`,e=W(e);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let i;i=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let n;n=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let s;s=$localize`Other destinations`;let w;w=$localize`Edit target URL`;let G;G=$localize` Be careful, this will overwrite everything you have in your destination. `;let v;return v=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],e,t,i,n,s,w,G,v,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[3,"targetUrl"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,i){if(t&1){let n=g();a(0,"form",10,0),_("submit",function(){return c(n),u(i.next())}),a(2,"header")(3,"h3",11),d(4,2),a(5,"div",12),S(6,Ot,4,5,"button",13),a(7,"spk-menu")(8,"button",14),T(9,"spk-icon"),r(),x(10,15),a(11,"button",16),_("click",function(){return c(n),u(i.openTargetUrlDialog())}),T(12,"spk-icon"),r(),U(),r()(),D(),r(),S(13,It,5,1,"p"),r(),S(14,At,9,1),S(15,yt,1,1,"app-single-destination",17),a(16,"div",18)(17,"button",19),_("click",function(){return c(n),u(i.goBack())}),d(18,3),T(19,"spk-icon"),D(),r(),a(20,"button",20),d(21,4),T(22,"spk-icon"),D(),r()()(),S(23,$t,15,4,"spk-dialog",21)}if(t&2){let n=!!i.targetUrlModel();F(6),f(n?6:-1),F(7),f(n?13:-1),F(),f(n?-1:14),F(),f(n?15:-1),F(8),f(i.targetUrlDialogOpen()?23:-1)}},dependencies:[mt,Tt,_t,st,Ft,lt,ut,ct,at,rt,et,it,nt],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}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}"],changeDetection:0})};export{jt as createDestinationForm,Ht as createDestinationFormGroup,R as default};
|
package/chunk-UUOPMSDB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-TVOVJS5N.js")},{path:"destination",loadComponent:()=>import("./chunk-T27DQWUZ.js")},{path:"source-data",loadComponent:()=>import("./chunk-VNTD2QIZ.js")},{path:"schedule",loadComponent:()=>import("./chunk-NUL6XFC4.js")},{path:"options",loadComponent:()=>import("./chunk-X4NRDSTJ.js")}];export{o as default};
|
package/chunk-VFFFKPK4.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as Je,b as Ye}from"./chunk-5MMV45NA.js";import{a as je,b as We,c as Xe}from"./chunk-FX2XKS5C.js";import{h as Qe}from"./chunk-PTFQBTH3.js";import{a as Ue}from"./chunk-EBYGIC45.js";import{a as $}from"./chunk-FC45TEB6.js";import{a as ze}from"./chunk-2YHX57UE.js";import{a as Ke,c as ne,e as ie,i as oe,k as qe,s as ae,t as He}from"./chunk-ZCT7SRIM.js";import{A as Re,C as Ge,a as ee,e as Oe,g as te,l as Ae,o as Ie,p as Le,t as Ne,z as Pe}from"./chunk-DNBOZ26J.js";import{h as Be}from"./chunk-XD6MBGQY.js";import{ea as Me}from"./chunk-GP2W7XZF.js";import{Ab as U,Bb as h,Fc as Z,Gc as N,Hb as K,Ib as q,Kb as xe,Lb as Fe,Lc as _e,Mb as Te,Nb as F,Oa as s,Ob as l,Oc as $e,Pb as he,Qb as De,S as ge,Sb as Se,Tb as we,Ub as ye,X as O,Yb as A,_a as X,_b as Q,ba as C,bc as m,ca as g,db as b,dc as w,ec as de,f as W,fa as fe,gc as Ve,hc as ke,ic as ve,jc as I,kc as V,la as E,lc as d,oc as Ee,pb as f,pc as be,qb as x,rb as R,rc as J,sb as G,tb as B,tc as Y,ub as _,vb as c,wb as p,xb as z,yb as ce,yc as H,zb as pe}from"./chunk-67YRCRMI.js";import{a as S}from"./chunk-EUDKD2JW.js";var Ze=class n{#t=O(Be);#e=O(Oe);#n=O(ze);testDestination(t,e,o){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o):this.testDestinationv1(t,e,o)}testDestinationv2(t,e,o){return new W(i=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(i,t,e,a);return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let r=a?.error?.body;if(r?.Data?.FolderExists===!1||r?.StatusCode==="missing-folder"){o?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(r?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,r.Data?.HostCertificate);return}if(r?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,r.Data.ReportedHostKey,r.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,o){return new W(i=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,o).subscribe(r=>{i.next(r)})}})})}handleMissingFolder(t,e,o){this.#e.open($,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,o,i){this.#e.open($,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#e.open($,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#e.open($,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
-
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#e.open($,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
-
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
-
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#e.open($,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i){this.#e.open($,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}handleDestinationErrorv1(t,e,o,i){return new W(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,o):this.handleGenericError(a,e,o,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let r=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,o,r);return}if(t.startsWith("incorrect-host-key:")){let r=t.split('incorrect-host-key:"')[1].split('",')[0],D=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,o,r,D);return}this.handleGenericError(a,e,o,t)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})};var ot=["fileInput"],at=[[["label"]]],rt=["label"],re=class n{customId=_e();content=E("");readonly=E(!1);placeholder=_e("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=N(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&Se(ot,5),e&2){let i;we(i=ye())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[be([{provide:Ke,useExisting:n,multi:!0}])],ngContentSelectors:rt,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,o){if(e&1){let i=h();he(at),De(0,0,["ngProjectAs","label",5,["label"]]),c(1,"div",2)(2,"button",3),F("click",function(){return C(i),g(o.triggerBrowse())}),K(3,1),z(4,"spk-icon"),q(),p()(),c(5,"div",4),F("drop",function(r){return C(i),g(o.onFileDrop(r))})("dragover",function(r){return C(i),g(o.onDragOver(r))}),c(6,"textarea",5),ve("ngModelChange",function(r){return C(i),ke(o.content,r)||(o.content=r),g(r)}),p()(),c(7,"input",6,0),F("change",function(r){return C(i),g(o.onFileSelected(r))}),p()}e&2&&(s(6),_("placeholder",o.placeholder()),Ve("ngModel",o.content),_("disabled",o.readonly()))},dependencies:[ae,ne,ie,oe,ee,te],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var lt=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),me=n=>({$implicit:n}),st=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),ct=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function pt(n,t){n&1&&U(0)}function dt(n,t){if(n&1&&b(0,pt,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=A(17);l();let a=d(0),r=d(1);_("ngTemplateOutlet",i)("ngTemplateOutletContext",J(7,me,Y(2,lt,o,e,a,r.oauthField)))}}function _t(n,t){n&1&&U(0)}function mt(n,t){if(n&1&&b(0,_t,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=A(17);l();let a=d(0),r=d(1);_("ngTemplateOutlet",i)("ngTemplateOutletContext",J(7,me,Y(2,st,o,e,a,r.oauthField)))}}function ut(n,t){if(n&1){let e=h();K(0,4,1),c(1,"button",12,1),F("click",function(){let i=C(e).$implicit,a=l(2);return g(a.addAdvancedOption(i))}),p(),q()}if(n&2){let e=t.$implicit;s(),xe(e.name),Fe(0)}}function Ct(n,t){n&1&&U(0)}function gt(n,t){if(n&1&&b(0,Ct,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=A(17),a=l(),r=d(0),D=d(1),M=a.getFormView("advanced",e)??a.getDefaultFormView(e);_("ngTemplateOutlet",i)("ngTemplateOutletContext",J(7,me,Y(2,ct,o,M,r,D.oauthField)))}}function ft(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function xt(n,t){if(n&1){let e=h();c(0,"app-file-tree",14)(1,"label",20),m(2),f(3,ft,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);_("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),_("for",r),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("id",r)("ngModel",i)}}function Ft(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Tt(n,t){if(n&1){let e=h();c(0,"app-file-tree",15)(1,"label",20),m(2),f(3,Ft,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);_("hideShortcuts",!0)("startingPath",a),s(),_("for",r),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("id",r)("ngModel",i)}}function ht(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Dt(n,t){if(n&1&&(c(0,"spk-icon",26),m(1," link "),p()),n&2){l();let e=d(5),o=d(6);Q("error",e&&o==="error")("warn",e&&o==="warning"),_("spkTooltip",e)}}function St(n,t){n&1&&(c(0,"spk-icon",25),m(1,"envelope"),p())}function wt(n,t){n&1&&(c(0,"spk-icon",25),m(1,"textbox"),p())}function yt(n,t){if(n&1){let e=h();c(0,"spk-form-field")(1,"label",20),m(2),f(3,ht,2,1,"spk-icon",21),p(),c(4,"input",23),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),I(5)(6),f(7,Dt,2,5,"spk-icon",24)(8,St,2,0,"spk-icon",25)(9,wt,2,0,"spk-icon",25),p()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);s(),_("for",r),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("type",e.formView.type==="Email"?"email":"text")("id",r)("ngModel",i);let D=a,M=l(2).hasDoubleLeadingSlashes(D??"");s(),V(M&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),s(),V(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),s(),x(e.formView.type==="Path"?7:e.formView.type==="Email"?8:9)}}function Vt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function kt(n,t){if(n&1){let e=h();c(0,"span",30),F("click",function(){C(e);let i=l(2).$implicit,a=l(2);return g(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name))}),m(1," AuthID "),p()}}function vt(n,t){n&1&&(c(0,"spk-icon",25),m(1,"password"),p())}function Et(n,t){if(n&1){let e=h();c(0,"spk-icon",31),F("click",function(){C(e);let i=l(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),p()}}function bt(n,t){if(n&1){let e=h();c(0,"spk-icon",31),F("click",function(){C(e);let i=l(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),p()}}function $t(n,t){if(n&1){let e=h();c(0,"spk-form-field")(1,"label",20),m(2),f(3,Vt,2,1,"spk-icon",21),p(),c(4,"input",27),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),f(5,kt,2,0,"span",28)(6,vt,2,0,"spk-icon",25),f(7,Et,2,0,"spk-icon",29)(8,bt,2,0,"spk-icon",29),p()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("type",e.formView.showPassword?"text":"password")("id",a)("ngModel",i),s(),x(e.oauthField===e.formView.name?5:6),s(2),x(e.formView.showPassword?7:8)}}function Mt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(3).$implicit;_("spkTooltip",e.formView.longDescription)}}function Ot(n,t){if(n&1&&m(0),n&2){let e=l().$implicit;de(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function At(n,t){if(n&1&&m(0),n&2){let e=l().$implicit;w(" ",e," ")}}function It(n,t){if(n&1&&f(0,Ot,1,2)(1,At,1,1),n&2){let e=l(3).$implicit;x(e.formView.loadOptions?0:1)}}function Lt(n,t){if(n&1){let e=h();c(0,"spk-select",32)(1,"label",20),m(2),f(3,Mt,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){C(e);let a=l(2).$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),b(5,It,2,1,"ng-template",null,2,H)}if(n&2){let e=A(6);l();let o=d(0),i=l().$implicit,a=d(1),r=d(2),D=d(4);_("options",o)("isClearable",!1)("optionTemplate",e),s(),_("for",D),s(),w(" ",a," "),s(),x(i.formView.longDescription?3:-1),s(),_("id",D)("ngModel",r)}}function Nt(n,t){if(n&1&&(I(0),f(1,Lt,7,8)),n&2){let e=l().$implicit,o=V(e.formView.loadOptions?e.formView.loadOptions(l(2).injector)():e.formView.options);s(),x(o?1:-1)}}function Pt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(3).$implicit;_("spkTooltip",e.formView.longDescription)}}function Rt(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;de(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Gt(n,t){if(n&1){let e=h();c(0,"spk-select",34)(1,"label",20),m(2),f(3,Pt,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){C(e);let a=l(2).$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),b(5,Rt,1,2,"ng-template",null,3,H)}if(n&2){let e=A(6);l();let o=d(0),i=l().$implicit,a=d(1),r=d(2),D=d(4);_("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),s(),_("for",D),s(),w(" ",a," "),s(),x(i.formView.longDescription?3:-1),s(),_("id",D)("ngModel",r)}}function Bt(n,t){n&1&&z(0,"spk-progress-bar",33)}function zt(n,t){if(n&1&&(I(0),f(1,Gt,7,9)(2,Bt,1,0,"spk-progress-bar",33)),n&2){let e=l().$implicit,o=V(e.formView.loadOptions?e.formView.loadOptions(l(2).injector)():e.formView.options);s(),x(o?1:2)}}function Kt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function qt(n,t){if(n&1){let e=h();c(0,"app-size",35),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label",20),m(2),f(3,Kt,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);_("inputType",e.Name)("ngModel",i)("customId",a),s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function Ht(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function jt(n,t){if(n&1){let e=h();c(0,"spk-form-field")(1,"label",20),m(2),f(3,Ht,2,1,"spk-icon",21),p(),c(4,"input",36),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),c(5,"spk-icon",25),m(6,"numpad"),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("id",a)("ngModel",i)}}function Wt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Xt(n,t){if(n&1){let e=h();c(0,"spk-toggle",37),F("click",function(){C(e);let i=l().$implicit,a=d(2),r=l(2);return g(r.updateFieldValue(i.fieldGroup,i.formView.name,a==="true"?"false":"true"))}),c(1,"label",20),m(2),f(3,Wt,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);Q("active",i==="true"),s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function Ut(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Qt(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;w(" ",e," ")}}function Jt(n,t){if(n&1){let e=h();c(0,"spk-select",38)(1,"label",20),m(2),f(3,Ut,2,1,"spk-icon",21),p(),c(4,"input",39),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),b(5,Qt,1,1,"ng-template",null,3,H)}if(n&2){let e=A(6),o=l().$implicit,i=d(1),a=d(2);_("options",o.formView.options)("selectMultiple",!0)("optionTemplate",e),s(),_("for",Ee("destination-",o.fieldGroup,"-",o.index)),s(),w(" ",i," "),s(),x(o.formView.longDescription?3:-1),s(),_("ngModel",a)}}function Yt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Zt(n,t){if(n&1){let e=h();c(0,"app-timespan",35),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label",20),m(2),f(3,Yt,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);_("inputType",e.formView.name)("ngModel",i)("customId",a),s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function en(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function tn(n,t){if(n&1){let e=h();c(0,"app-file-drop-textarea",40),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label"),m(2),f(3,en,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(2),i=d(4);_("ngModel",o)("customId",i)("placeholder",e.formView.longDescription),s(2),w(" ",e.formView.shortDescription??e.formView.name," "),s(),x(e.formView.longDescription?3:-1)}}function nn(n,t){if(n&1){let e=h();c(0,"button",41),F("click",function(){C(e);let i=l().$implicit,a=l(2);return g(a.removeAdvancedOption(i.formView.name))}),c(1,"spk-icon"),m(2,"x-circle"),p()()}}function on(n,t){if(n&1&&(c(0,"div",13),I(1)(2)(3)(4),f(5,xt,5,11,"app-file-tree",14)(6,Tt,5,7,"app-file-tree",15)(7,yt,10,9,"spk-form-field")(8,$t,9,8,"spk-form-field")(9,Nt,2,2)(10,zt,3,2)(11,qt,4,6,"app-size",16)(12,jt,7,5,"spk-form-field")(13,Xt,4,5,"spk-toggle",17)(14,Jt,7,9)(15,Zt,4,6,"app-timespan",16)(16,tn,4,5,"app-file-drop-textarea",18),f(17,nn,3,0,"button",19),p()),n&2){let e=t.$implicit;l();let o=d(0),i=l();Q("single-field",e.fieldGroup!=="advanced"),s(),V(e.formView.shortDescription??e.formView.name),s(),V(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),s(),V(i.getFieldValue(e.fieldGroup,e.formView.name)),s(),V("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),s(),x(e.formView.type==="FileTree"?5:e.formView.type==="FolderTree"?6:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?7:e.formView.type==="Password"?8:e.formView.type==="Enumeration"?9:e.formView.type==="NonValidatedSelectableString"?10:e.formView.type==="Size"?11:e.formView.type==="Integer"?12:e.formView.type==="Boolean"?13:e.formView.type==="Flags"?14:e.formView.type==="Timespan"||e.formView.type==="DateTime"?15:e.formView.type==="FreeText"?16:-1),s(12),x(e.fieldGroup==="advanced"?17:-1)}}function an(n,t){if(n&1&&(I(0),G(1,dt,1,9,"ng-container",null,R),G(3,mt,1,9,"ng-container",null,R),c(5,"spk-toggle-card",5),ce(6,6),K(7,4),c(8,"spk-menu",7)(9,"button",8),z(10,"spk-icon"),p(),ce(11,9),G(12,ut,3,1,"button",10,R),pe(),p(),q(),pe(),G(14,gt,1,9,"ng-container",null,R),p(),b(16,on,18,8,"ng-template",null,0,H)),n&2){let e=l(),o=d(1);V(e.destinationForm()),s(),B(o.custom),s(2),B(o.dynamic),s(2),_("disallowToggle",!0);let i=e.nonSelectedAdvancedFormViews();s(3),_("searchable",!0),s(),_("disabled",i.length===0),s(3),B(i),s(2),B(e.advancedFormFieldNames())}}var tt=class n{#t=O(Qe);injector=O(fe);targetUrl=$e.required();#e=null;destinationType=Z(()=>{let t=this.targetUrl();if(!t)return null;let e=t.split("://")[0];return this.#e=e,e});destinationForm=E({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=Z(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=E(null);nonSelectedAdvancedFormViews=Z(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=N(()=>{let t=this.destinationType(),e=Xe.find(T=>T.customKey===t||T.key===t),o=e?.key,i=this.#t.destinationOptions().find(T=>T.Key===o);if(!i||!i.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},D=e&&e.dynamicFields?e.dynamicFields:[],M=e&&e.advancedFields?e.advancedFields:[],le=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],v={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([T,u],k)=>{v.custom.push(S({order:900+k},u))});for(let T=0;T<i.Options.length;T++){let u=i.Options[T];if(u.Deprecated)continue;let k=D.find(y=>y===u.Name||u.Aliases?.includes(y.name)||y.name===u.Name);if(k){let y=u.Aliases?.indexOf(k.name)??-1,ue=u.Aliases&&y>-1?u.Aliases[y]:u.Name,L=k&&typeof k!="string",Ce=L?k?.defaultValue??u.DefaultValue:u.DefaultValue,P={name:ue,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,order:900+T},se=L?S(S({},P),k):P;v.dynamic.push(se)}else{let y=u.Name;if(le.find(j=>j===y))continue;let L=M.find(j=>j===y||j.name===y),Ce=L&&typeof L!="string",P={name:y,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,defaultValue:u.DefaultValue,order:900+T},se=Ce?S(S({},P),L):P;v.advanced.push(se)}}v.custom.sort((T,u)=>T.order-u.order),v.dynamic.sort((T,u)=>T.order-u.order),v.advanced.sort((T,u)=>T.order-u.order),this.destinationFormConfig.set(v)});targetUrlEffect=N(()=>{if(!this.destinationFormConfig())return;let e=this.targetUrl();if(!e)return;let o=We(e);if(!o)return;let i={custom:o.custom,dynamic:o.dynamic,advanced:o.advanced};this.destinationForm.update(a=>(a.custom=S(S({},a.custom),i.custom),a.dynamic=S(S({},a.dynamic),i.dynamic),a.advanced=S(S({},a.advanced),i.advanced),a))});destinationFormEffect=N(()=>{let t=this.#e,e=this.destinationForm();if(!e||!t)return;let o=je({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasDoubleLeadingSlashes(t){return t.startsWith("//")}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(S({},e))}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(S({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(S({},e))}#n=E("https://duplicati-oauth-handler.appspot.com/").asReadonly();#o=E(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#i=E(!1);oauthStartTokenCreation(t,e,o){this.#i.set(!0);let i=this.#o(),a=450,r=600,D=this.#n()+"?type="+t+"&token="+i,M=screen.width/2-a/2,le=screen.height/2-r/2,v=window.open(D,"_blank","height="+r+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+M+",top="+le);return window.addEventListener("message",T=>{let u=T.data.startsWith("authid:"),k=u?T.data.replace("authid:",""):null;u&&(this.destinationForm.update(y=>(y[e][o]=k,y)),this.#i.set(!1),v?.close())}),!1}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;return t=$localize` Advanced options ${"\uFFFD#8\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#9\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#11\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*13:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_MENU:`,t=Te(t),[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["optionTemplate",""],t,[1,"advanced-options",3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"click"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"ngModelChange","id","ngModel"],[3,"ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&(I(0)(1),f(2,an,18,4)),e&2){let i=V(o.destinationType());s();let a=V(o.destinationFormConfig());s(),x(i&&a?2:-1)}},dependencies:[He,ne,qe,ie,ae,oe,Me,Ue,Je,Ye,re,Ae,te,ee,Pe,Ie,Ne,Ge,Re,Le],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_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}.field-row.single-field[_ngcontent-%COMP%]{display:block}"],changeDetection:0})};export{Ze as a,tt as b};
|