@duplicati/ngclient 0.0.120 → 0.0.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/{chunk-WZRSQ7XL.js → chunk-2CXHZS6X.js} +1 -1
  2. package/{chunk-3KUVV3SB.js → chunk-2XYBW2LY.js} +1 -1
  3. package/{chunk-JBA24HSR.js → chunk-3UPH6V5C.js} +1 -1
  4. package/{chunk-KHGD372Q.js → chunk-43BIRTPL.js} +1 -1
  5. package/{chunk-NPZU4SBS.js → chunk-45N5IP3N.js} +1 -1
  6. package/{chunk-2GE6FFGI.js → chunk-4DR45FFH.js} +1 -1
  7. package/{chunk-NUC2S6S3.js → chunk-4HPQY7IN.js} +1 -1
  8. package/chunk-4KE2I7OA.js +7 -0
  9. package/{chunk-NF3MS2YP.js → chunk-4V45XF67.js} +1 -1
  10. package/{chunk-CH7FSO4Y.js → chunk-5C7A7QU6.js} +1 -1
  11. package/{chunk-XWF632WO.js → chunk-65U4B3NQ.js} +1 -1
  12. package/{chunk-Q2WRB27A.js → chunk-6B67AJC3.js} +1 -1
  13. package/{chunk-KKIWOA46.js → chunk-6DNRCK5D.js} +1 -1
  14. package/{chunk-HTX2RSBS.js → chunk-6EWRKJSC.js} +1 -1
  15. package/chunk-6LCXRM3A.js +1 -0
  16. package/chunk-7BATQNXR.js +1 -0
  17. package/chunk-7DNC2MPD.js +1 -0
  18. package/chunk-7GXTLCJB.js +1 -0
  19. package/{chunk-65UN5LE6.js → chunk-7V4TPS4B.js} +1 -1
  20. package/{chunk-5ENRUF35.js → chunk-ABANCAM5.js} +1 -1
  21. package/{chunk-WU3ALGNP.js → chunk-BLKMQJR5.js} +1 -1
  22. package/{chunk-FAY3FX6V.js → chunk-C5X6HJ3T.js} +1 -1
  23. package/chunk-CZDE5P4F.js +1 -0
  24. package/chunk-DLJSVAM2.js +1 -0
  25. package/{chunk-HFNFJ7G2.js → chunk-DYTQQHMA.js} +1 -1
  26. package/{chunk-M3WT5B3C.js → chunk-EBXJGPRA.js} +1 -1
  27. package/{chunk-UXUVYBYP.js → chunk-ED7PHXLX.js} +1 -1
  28. package/{chunk-CZUGA62N.js → chunk-ERHGJIOQ.js} +1 -1
  29. package/{chunk-AL5KGNEF.js → chunk-ESAGJOZZ.js} +1 -1
  30. package/{chunk-LDJVMU7P.js → chunk-FP6LM56A.js} +1 -1
  31. package/{chunk-3XVU2YA6.js → chunk-FQ55IACT.js} +1 -1
  32. package/{chunk-ZQSBINUM.js → chunk-FSKPPAVO.js} +1 -1
  33. package/chunk-FWQNZX5S.js +1 -0
  34. package/chunk-FY7G24UA.js +1 -0
  35. package/{chunk-RHII5WE3.js → chunk-GQGMGFDX.js} +1 -1
  36. package/chunk-GUKBMCIX.js +1 -0
  37. package/{chunk-YKOEKIFQ.js → chunk-HIW2CN45.js} +1 -1
  38. package/{chunk-2SQBD7LN.js → chunk-IVGY6D4N.js} +1 -1
  39. package/{chunk-K5C3JCVH.js → chunk-KAFLAM3J.js} +1 -1
  40. package/{chunk-T6KX6ACI.js → chunk-KPH4ZAFT.js} +1 -1
  41. package/{chunk-3AIKVVWP.js → chunk-LUKUBN2Z.js} +1 -1
  42. package/{chunk-LJDOQTEF.js → chunk-M5RL4LRX.js} +1 -1
  43. package/{chunk-CPTR6AJI.js → chunk-MO2LFPIR.js} +1 -1
  44. package/{chunk-DX6BDDDV.js → chunk-MOSJ6KI7.js} +1 -1
  45. package/{chunk-FRSQ5NDX.js → chunk-N5FH4YAX.js} +1 -1
  46. package/{chunk-4YUBZYBH.js → chunk-O7TLFEOP.js} +1 -1
  47. package/chunk-OAWADV5X.js +1 -0
  48. package/{chunk-2P3DXYGR.js → chunk-OQPUBCLB.js} +1 -1
  49. package/chunk-PDODLSPH.js +1 -0
  50. package/{chunk-AACJQG7X.js → chunk-PSVKQSIF.js} +1 -1
  51. package/{chunk-RLUT4FSI.js → chunk-QMFHJSCY.js} +1 -1
  52. package/{chunk-TCDECRYI.js → chunk-QUOBR5MG.js} +1 -1
  53. package/chunk-QXUYK52Y.js +1 -0
  54. package/{chunk-X6PSFVBL.js → chunk-S75WBVE3.js} +1 -1
  55. package/{chunk-BAX2AJJJ.js → chunk-SFV445TF.js} +1 -1
  56. package/{chunk-6KSS7VQS.js → chunk-SIHNMW2E.js} +1 -1
  57. package/chunk-SPAJFGWZ.js +1 -0
  58. package/{chunk-4LLC3Q7O.js → chunk-SX2OA5DO.js} +1 -1
  59. package/chunk-T5WAKBP3.js +1 -0
  60. package/{chunk-OEIF7NQ5.js → chunk-T7QZL5YJ.js} +1 -1
  61. package/{chunk-SSJ4VQB4.js → chunk-TCEYGZ6D.js} +1 -1
  62. package/chunk-U4XTHU5I.js +1 -0
  63. package/chunk-U7YVVKGQ.js +1 -0
  64. package/{chunk-XR4SRVOQ.js → chunk-UEYPJIJG.js} +1 -1
  65. package/chunk-UI4M5G5W.js +1 -0
  66. package/{chunk-ELZWH543.js → chunk-URJQR7VG.js} +1 -1
  67. package/{chunk-YY3JAYQZ.js → chunk-UTNP2VHH.js} +1 -1
  68. package/{chunk-Q6M5VRZV.js → chunk-V7XW25LT.js} +1 -1
  69. package/chunk-VPTXHYYV.js +6 -0
  70. package/chunk-VTTBYFSH.js +1 -0
  71. package/chunk-VYAA7G37.js +1 -0
  72. package/{chunk-TJJORMQV.js → chunk-VZBWK3XF.js} +1 -1
  73. package/chunk-W66AXGSW.js +1 -0
  74. package/{chunk-HYHEAOIF.js → chunk-WOTGLW6Y.js} +1 -1
  75. package/{chunk-5LKXKKAK.js → chunk-WRKRV6RQ.js} +1 -1
  76. package/chunk-XATCN7MB.js +1 -0
  77. package/{chunk-OHZGASM5.js → chunk-XHPURHO2.js} +1 -1
  78. package/{chunk-VGAQB3OD.js → chunk-XUPWJEL7.js} +1 -1
  79. package/{chunk-B3WLZK7W.js → chunk-XWYNCG3P.js} +1 -1
  80. package/chunk-YUZKJZ22.js +1 -0
  81. package/chunk-YZDNOP4R.js +1 -0
  82. package/index.html +1 -1
  83. package/main-DG325IZ3.js +1 -0
  84. package/package.json +1 -1
  85. package/chunk-3GGSYR5J.js +0 -1
  86. package/chunk-AHUC7M75.js +0 -7
  87. package/chunk-AZ2DJOXS.js +0 -1
  88. package/chunk-CRJHIWSF.js +0 -1
  89. package/chunk-EXY7CUIT.js +0 -1
  90. package/chunk-G5CT45UH.js +0 -1
  91. package/chunk-IQFSWP4W.js +0 -6
  92. package/chunk-IX2G55AS.js +0 -1
  93. package/chunk-KBJGYXKV.js +0 -1
  94. package/chunk-KYQWUXYN.js +0 -1
  95. package/chunk-LRRCO7FY.js +0 -1
  96. package/chunk-LWC5O2JV.js +0 -1
  97. package/chunk-QVNFX6ZC.js +0 -1
  98. package/chunk-RKAIZDDW.js +0 -1
  99. package/chunk-RSZISHXB.js +0 -1
  100. package/chunk-ST67LUCY.js +0 -1
  101. package/chunk-UABJ67OY.js +0 -1
  102. package/chunk-UDYPOSWB.js +0 -1
  103. package/chunk-VYJFDVMS.js +0 -1
  104. package/chunk-WFM6YWRN.js +0 -1
  105. package/chunk-Y3DJVXL2.js +0 -1
  106. package/chunk-YYC22I2K.js +0 -1
  107. package/chunk-Z45ZPMZS.js +0 -1
  108. package/chunk-ZHMYBX5F.js +0 -1
  109. package/main-AYZBQHF7.js +0 -1
package/chunk-IQFSWP4W.js DELETED
@@ -1,6 +0,0 @@
1
- import{a as jt,b as qt}from"./chunk-KHGD372Q.js";import{a as mt}from"./chunk-LDJVMU7P.js";import{a as Ke}from"./chunk-LJDOQTEF.js";import{a as dt,b as ht,c as ut}from"./chunk-YKOEKIFQ.js";import{a as Wt,b as At,c as Ht}from"./chunk-NF3MS2YP.js";import{a as he}from"./chunk-XR4SRVOQ.js";import{a as Re}from"./chunk-WZRSQ7XL.js";import{a as q}from"./chunk-3AIKVVWP.js";import{a as zt,b as Ie,c as ie,d as ve,e as oe,f as Le,g as ct,h as ge,i as be,j as Ge,m as _t,n as Ue,o as pt,p as Xt,q as Ve,r as Ce,s as Te,t as Be}from"./chunk-5ENRUF35.js";import{b as me,d as se}from"./chunk-5LKXKKAK.js";import{A as we,C as st,a as ne,b as at,d as Bt,e as $e,g as Fe,l as le,o as Kt,p as rt,t as ce}from"./chunk-AL5KGNEF.js";import{h as lt}from"./chunk-FRSQ5NDX.js";import{ia as Vt}from"./chunk-M3WT5B3C.js";import{$a as ye,$b as vt,Ab as J,Bb as ee,Cb as te,Cc as Ze,Db as s,Eb as r,F as We,Fb as F,Gb as B,Hb as K,Ib as He,Jb as R,Pb as E,Pc as $,Qb as D,Qc as xe,Rb as O,Sb as it,T as Pe,Tb as ot,Ua as l,Ub as Ee,Vb as S,Wb as _,Xb as Rt,Yb as It,Z as P,cc as Lt,dc as bt,ea as u,ec as Gt,f as nt,fa as m,gb as Z,gc as Oe,hc as ke,ic as ae,jc as d,ka as $t,kc as Me,lb as g,lc as z,mc as Dt,oc as L,pc as b,qc as G,ra as Et,rc as je,sa as Ne,sc as De,tb as wt,tc as x,ub as p,uc as Ut,va as f,vc as qe,wb as ue,wc as Qe,yc as Ye,zb as C}from"./chunk-AHUC7M75.js";import{a as H,b as de,c as xt}from"./chunk-7CGTOI24.js";var nn=["fileInput"],on=[[["label"]]],an=["label"],Ft=class o{customId=Ne();content=f("");readonly=f(!1);placeholder=Ne("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=xe(()=>{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||o)};static \u0275cmp=Z({type:o,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){if(e&1&&Lt(nn,5),e&2){let i;bt(i=Gt())&&(n.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Ut([{provide:zt,useExisting:o,multi:!0}])],ngContentSelectors:an,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,n){if(e&1){let i=R();Rt(on),It(0,0,["ngProjectAs","label",5,["label"]]),s(1,"div",2)(2,"button",3),S("click",function(){return u(i),m(n.triggerBrowse())}),E(3,1),F(4,"spk-icon"),D(),r()(),s(5,"div",4),S("drop",function(c){return u(i),m(n.onFileDrop(c))})("dragover",function(c){return u(i),m(n.onDragOver(c))}),s(6,"textarea",5),G("ngModelChange",function(c){return u(i),b(n.content,c)||(n.content=c),m(c)}),r()(),s(7,"input",6,0),S("change",function(c){return u(i),m(n.onFileSelected(c))}),r()}e&2&&(l(6),p("placeholder",n.placeholder()),L("ngModel",n.content),p("disabled",n.readonly()))},dependencies:[Te,ie,oe,ge,ne,Fe],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 gt=class o{#n=P(lt);#t=P($e);#e=P(Re);testDestination(t,e,n){return this.#e.hasV2TestOperations()?this.testDestinationv2(t,e,n):this.testDestinationv1(t,e,n)}testDestinationv2(t,e,n){return new nt(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let c=a?.error?.body;if(c?.Data?.FolderExists===!1||c?.StatusCode==="missing-folder"){n?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(c?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,c.Data?.HostCertificate);return}if(c?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,c.Data.ReportedHostKey,c.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,n){return new nt(i=>{this.#n.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,n).subscribe(c=>{i.next(c)})}})})}handleMissingFolder(t,e,n){this.#t.open(q,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(t,e,n):this.handleFolderCreateFailure(t,e,n,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,n)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,n,i){this.#t.open(q,{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:n}),t.complete()}})}handleFolderCreated(t,e,n){this.#t.open(q,{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:n}),t.complete()}})}reportNoAction(t,e,n){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,i){this.#t.open(q,{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,n);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:n}),t.complete()}})}handleIncorrectKey(t,e,n,i,a){a?this.#t.open(q,{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:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(q,{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:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(q,{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:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new nt(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let c=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,c);return}if(t.startsWith("incorrect-host-key:")){let c=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,c,A);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ct=class o{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||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var rn=["formRef"];function sn(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),F(2,"spk-icon",26),D(),r())}function ln(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;z(" ",e.DisplayName," ")}}function cn(o,t){if(o&1&&F(0,"spk-progress-bar",40),o&2){let e=_(3);ue("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function _n(o,t){o&1&&(s(0,"span",35),O(1,10),r())}function pn(o,t){o&1&&(E(0,8,1),F(1,"spk-icon"),D())}function dn(o,t){o&1&&(E(0,8,2),F(1,"spk-icon"),D())}function un(o,t){o&1&&(E(0,11,1),F(1,"spk-icon",42),D())}function mn(o,t){o&1&&(E(0,11,2),F(1,"spk-icon"),D())}function Fn(o,t){if(o&1){let e=R();s(0,"button",41),S("click",function(){u(e);let i=_(3);return m(i.copyPassword())}),E(1,11),g(2,un,2,0)(3,mn,2,0),D(),r()}if(o&2){let e=_(3);l(2),C(e.copiedPassword()?2:3)}}function gn(o,t){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function Cn(o,t){if(o&1){let e=R();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),F(4,"sup"),D(),r(),F(5,"input",32),r(),g(6,cn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),F(8,"input",34),g(9,_n,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),S("click",function(){u(e);let i=_(2);return m(i.showPassword.set(!i.showPassword()))}),E(12,8),g(13,pn,2,0)(14,dn,2,0),D(),r(),s(15,"button",37),S("click",function(){u(e);let i=_(2);return m(i.generatePassword())}),E(16,9),F(17,"spk-icon"),D(),r(),g(18,Fn,4,1,"button",38),r(),g(19,gn,2,0,"spk-alert",39),r()}if(o&2){let e=_(2);l(5),p("type",e.showPassword()?"text":"password"),l(),C(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),C(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),C(e.showPassword()?13:14),l(5),C(e.showCopyPassword()?18:-1),l(),C(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Tn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),F(3,"input",29),g(4,ln,1,1,"ng-template"),r(),g(5,Cn,20,7,"div",30)),o&2){let e=_();p("options",e.encryptionOptions())("isClearable",!1),l(5),C(e.encryptionFieldSignal()!==""?5:-1)}}function fn(o,t){if(o&1&&(s(0,"button",24),E(1,13),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.nameAndDescriptionValid()===!1)}}function Sn(o,t){if(o&1&&(s(0,"button",25),E(1,14),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ze=new Ce,Qt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>ze.group({name:ze.control(o.name,[ve.required]),description:ze.control(o.description),encryption:ze.control(o.encryption,[Ht()]),password:ze.control(o.password,[At(t=>t?.value.encryption!=="",[ve.required])]),repeatPassword:ze.control(o.repeatPassword,[At(t=>t?.value.encryption!=="",[ve.required])])}),Nt={Key:"",DisplayName:"None"},Pt=class o{#n=P(se);#t=P(me);#e=P(Wt);#i=P(_e);#o=P(Re);formRef=ye.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=f(!1);copiedPassword=f(!1);showCopyPassword=f(!1);encryptionEffect=xe(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(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=[Nt,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,rn,5),e&2&&ke()},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 a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let A;A=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let I;I=$localize`Encryption`;let V;V=$localize`Encryption`;let N;N=$localize`Password`;let w;w=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let j;j=$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:`,j=Ee(j);let Q;Q=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let h;h=$localize`Passwords do not match`;let T;T=$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:`,T=Ee(T);let v;v=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let X;X=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let W;return W=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,c,A,k,V,U,j,Q,h,T,v,X,W,["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",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"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=R();s(0,"form",15,0),S("submit",function(){return u(i),m(n.next())}),s(2,"h3",16),O(3,1),r(),g(4,sn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),F(8,"sup"),D(),r(),F(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),F(13,"textarea",21),r(),g(14,Tn,6,3),s(15,"div",22)(16,"button",23),S("click",function(){return u(i),m(n.exit())}),E(17,4),F(18,"spk-icon"),D(),r(),g(19,fn,3,1,"button",24)(20,Sn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),C(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),C(n.isNew()?14:-1),l(5),C(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Be,be,ie,oe,Le,Ue,Ve,le,ce,Fe,ne,rt,at,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function En(o,t){if(o&1){let e=R();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),m(i)}),S("focus",function(){u(e);let i=ae(5);return m(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),F(9,"label",28),s(10,"input",29,1),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),m(i)}),S("focus",function(){u(e);let i=ae(11);return m(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),m(i)}),r()(),s(19,"spk-select",32)(20,"input",33),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),m(i)}),r()()(),s(21,"app-toggle-card",34),B(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),m(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),m(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),m(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),m(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),m(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),m(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),m(i)}),r(),D(),r()()()}if(o&2){let e=_();l(4),L("ngModel",e.scheduleFields.nextTime().time),l(6),L("ngModel",e.scheduleFields.nextTime().date),l(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Dn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ae={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}}},yt=class o{#n=P(_e);#t=P(se);#e=P(me);unitOptions=Dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,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 a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Q;return Q=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,c,A,k,I,V,N,w,U,j,Q,[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&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),G("ngModelChange",function(a){return b(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),O(7,4),r()(),g(8,En,46,14),s(9,"div",21)(10,"button",22),S("click",function(){return n.goBack()}),E(11,5),F(12,"spk-icon"),D(),r(),s(13,"button",23),S("click",function(){return n.next()}),E(14,6),F(15,"spk-icon"),D(),r()()),e&2&&(l(5),L("ngModel",n.scheduleFields.autoRun),l(3),C(n.scheduleFields.autoRun()?8:-1))},dependencies:[Te,ie,Ge,Ie,oe,ge,le,we,ne,Fe,ce,Ke],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 hn(o,t){if(o&1&&(B(0,4),d(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.startsWith)}}function An(o,t){if(o&1&&(B(0,5),d(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Pn=[{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"}],Tt=class o{path=Ne.required();osType=Ne();pathChange=Et();remove=Et();internalPath=f("");pathType=f("-Expression");currentExpressionOption=$(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return Pn.map(n=>n.value==="-Folder"||n.value==="+Folder"?de(H({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?de(H({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?de(H({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?de(H({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?de(H({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?de(H({},n),{startsWith:"*.",endsWith:""}):de(H({},n),{startsWith:"",endsWith:""}))});pathEffect=xe(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(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||o)};static \u0275cmp=Z({type:o,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&&(s(0,"spk-select",0)(1,"input",1),G("ngModelChange",function(a){return b(n.pathType,a)||(n.pathType=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),G("ngModelChange",function(a){return b(n.internalPath,a)||(n.internalPath=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r(),g(4,hn,2,1,"ng-container",4)(5,An,2,1,"ng-container",5),r(),s(6,"div",6),S("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),L("ngModel",n.pathType),l(2),L("ngModel",n.internalPath),l(),C(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),C(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[Te,ie,oe,ge,ce,le,ne],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 Nn=["formRef"],Yt=()=>({standalone:!0});function yn(o,t){if(o&1){let e=R();s(0,"spk-form-field",42)(1,"input",43),G("ngModelChange",function(i){u(e);let a=_(2);return b(a.editingPath,i)||(a.editingPath=i),m(i)}),r()(),s(2,"button",44),S("click",function(){u(e);let i=_(2);return m(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),S("click",function(){u(e);let i=_(2);return m(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=_(2);l(),L("ngModel",e.editingPath),p("ngModelOptions",qe(2,Yt))}}function On(o,t){if(o&1){let e=R();s(0,"spk-form-field",42),F(1,"input",45),r(),s(2,"button",44),S("click",function(){u(e);let i=_().$implicit,a=_();return m(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),S("click",function(){u(e);let i=_().$implicit,a=_();return m(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=_().$implicit;wt("readonly",!0),l(),p("ngModel",e)("ngModelOptions",qe(3,Yt))}}function kn(o,t){if(o&1&&(s(0,"div",30),g(1,yn,8,3)(2,On,8,4),r()),o&2){let e=t.$implicit,n=_();l(),C(n.oldPath()===e?1:2)}}function Mn(o,t){if(o&1){let e=R();s(0,"app-new-filter",47),S("pathChange",function(i){let a=u(e).$index,c=_(2);return m(c.patchPathAt(i,a))})("remove",function(){let i=u(e).$index,a=_(2);return m(a.removePathAt(i))}),r()}if(o&2){let e,n=t.$implicit,i=_(2);p("path",n)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function xn(o,t){if(o&1&&ee(0,Mn,1,2,"app-new-filter",46,J),o&2){let e=_();te(e.pathArray())}}function $n(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),F(2,"input",48),r(),s(3,"spk-select",49),F(4,"input",50),r()()),o&2){let e=_();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var pe=new Ce,wn=["Bytes","KB","MB","GB","TB","PB"],Zt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(o.path),excludes:pe.group({hidden:pe.control(o.excludes.hidden),system:pe.control(o.excludes.system),temporary:pe.control(o.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),Ot=class o{#n=P(_e);#t=P(se);#e=P(me);formRef=ye.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=f(wn);osType=this.#n.osType;pathSignal=he(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=f(null);editingPath=f(null);addingNewPath=f(!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,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}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(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),a=this.pathArray().map((c,A)=>A===e?`${t}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,c)=>c!==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.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Nn,5),e&2&&ke()},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 a;a=$localize`Temporary files`;let c;c=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let V;V=$localize`Paths`;let N;N=$localize`Add a path directly from your machine.`;let w;w=$localize`Filters`;let U;U=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let Q;Q=$localize`Exclude`;let h;h=$localize`Choose if there’s any files you want to exclude.`;let T;T=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let v;v=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let X;X=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Files larger than `;let y;y=$localize`Edit path`;let re;return re=$localize`Select an option...`,[["formRef",""],c,A,k,I,V,N,w,U,j,Q,h,T,v,X,W,[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",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",y,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",re]]},template:function(e,n){if(e&1){let i=R();s(0,"form",16,0),S("submit",function(){return u(i),m(n.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),F(8,"input",21),r(),s(9,"div",22)(10,"button",23),S("click",function(){return u(i),m(n.goBack())}),E(11,3),F(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),F(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),ee(23,kn,3,1,"div",30,J),s(25,"div",31)(26,"spk-form-field"),F(27,"input",32),r(),s(28,"button",33),S("click",function(){return u(i),m(n.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),B(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),S("click",function(){return u(i),m(n.addFilter())}),O(37,9),r(),g(38,xn,2,0),r(),s(39,"app-toggle-card",35),B(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),E(45,12),F(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),F(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),F(52,"input",39),D(),r(),s(53,"spk-toggle",40),S("click",function(){return u(i),m(n.toggleFilesLargerThan())}),O(54,15),r(),g(55,$n,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),te(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),C((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),ue("active",n.filesLargerThan()),l(2),C(n.filesLargerThan()?55:-1)}},dependencies:[Te,be,ie,Ge,Ie,oe,Le,ge,Be,_t,Ue,Ve,pt,le,ne,Fe,we,ce,Tt,mt,Ke],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 Jt="1W:1D,4W:1W,12M:1M",Se=new Ce,_e=class o{#n=P(se);#t=P(Re);#e=P($e);#i=P(lt);#o=P(Ct);generalForm=Qt();sourceDataForm=Zt();scheduleFields={autoRun:f(Ae.autoRun),nextTime:f(Ae.nextTime),runAgain:f(Ae.runAgain)};destinationForm=en();settings=f([]);optionsFields={remoteVolumeSize:f("50MB"),backupRetention:f("all"),backupRetentionTime:f(""),backupRetentionVersions:f(0),backupRetentionCustom:f("")};isDraft=f(!1);backupId=f(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=f(!1);finishedLoading=f(!1);backupDefaults=f(null);applicationOptions=f(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=f([]);selectedAdvancedFormPair=f([]);destinationFormPair=f({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});selectedHttpOptions=f([]);notSelectedHttpOptions=$(()=>{let t=this.httpOptions(),e=this.selectedHttpOptions()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=he(this.sourceDataForm.valueChanges);destinationFormSignal=he(this.destinationForm.valueChanges);generalFormSignal=he(this.generalForm.valueChanges);encryptionFieldSignal=he(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(t=>t.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=$(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[Nt,...t]});nonSelectedOptions=$(()=>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));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(c=>c.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addHttpOptionByName(t,e,n){let i=this.notSelectedHttpOptions().find(a=>a.name===t);i&&this.addHttpOption(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}addHttpOption(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==t.name),i))}removeHttpOption(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedHttpOptions.update(n=>(n=n.filter(i=>i.name!==t.name),n))}submit(){this.isSubmitting.set(!0);let t=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:t}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:t}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}})}exit(t){if(!t){this.#_(),this.#n.navigate(["/"]);return}this.#e.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#s(),setTimeout(()=>{this.#r(t)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=t.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,c={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t.TargetURL?ht(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(t){let e=ht(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(c=>c.Name==="encryption-module"),n=t.Settings?.find(c=>c.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>H(H({},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(c=>!e.includes(c.Name)),i=t.Settings?.filter(c=>e.includes(c.Name));this.settings.set(n??[]),n?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var a="all";i?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===Jt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([w,U])=>U).map(([w,U])=>w):[],k=n.path?.split("\0")??[],I=this.mapFormsToSettings(),V=Object.entries(n.excludes??{}).filter(([w,U])=>U&&w!=="filesLargerThan").map(([w])=>w),N=n.excludes?.filesLargerThan;return V.length&&I.push({Name:"--exclude-files-attributes",Value:V.join(",")}),N&&N.size!==null&&N.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:k.filter(w=>!w.startsWith("-")),Settings:I,Filters:k.filter(w=>w.startsWith("-")).map((w,U)=>({Order:U,Include:!1,Expression:w.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}: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 a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Jt});break}let c=[...t,...n],A=this.settings().filter(k=>!c.includes(k.Name)).map(k=>{let I=k.Value;return typeof k.Value=="number"&&(I=k.Value.toString()),typeof k.Value=="boolean"&&(I=k.Value?"True":"False"),{Name:k.Name,Value:I}});return[...i,...a,...A]}#c(t){return t.controls.map(e=>dt(e.value))}#p(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]}}createFormField(t,e,n){if(e.type==="Integer"){t.addControl(e.name,Se.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,Se.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,Se.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,Se.control(n,[ve.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}t.addControl(e.name,Se.control(n))}addDestinationFormGroup(t,e,n=!1){let i=ut.find(h=>h.customKey===t||h.key===t),a=i?.key,c=this.destinationOptions().find(h=>h.Key===a),A=this.httpOptions();if(!c||!c.Options)return;let k=i&&i.oauthField?i.oauthField:null,I=i&&i.customFields?i.customFields:{},V=i&&i.dynamicFields?i.dynamicFields:[],N=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let U=Se.group({}),j=Se.group({}),Q=Se.group({});I&&Object.entries(I).forEach(([h,T],v)=>{let y=T,{formElement:X}=y,W=xt(y,["formElement"]);U.addControl(h,X(e?.custom[h])),this.destinationFormPair.update(re=>(re.custom.push(H({order:900+v},W)),re))});for(let h=0;h<c.Options.length;h++){let T=c.Options[h];if(T.Deprecated)continue;let v=V.find(X=>X===T.Name||T.Aliases?.includes(X.name)||X.name===T.Name);if(v){let X=T.Aliases?.indexOf(v.name)??-1,W=T.Aliases&&X>-1?T.Aliases[X]:T.Name,y=v&&typeof v!="string",re=y?v?.defaultValue??T.DefaultValue:T.DefaultValue,M={name:W,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,order:900+h},Xe=y?H(H({},M),v):M,Y=e?.dynamic[W]??re??T.DefaultValue;this.createFormField(j,Xe,Y),this.destinationFormPair.update(Mt=>(Mt.dynamic.push(Xe),Mt))}else{if(w.find(Y=>Y===T.Name))continue;let W=N.find(Y=>Y===T.Name||Y.name===T.Name),y=W&&typeof W!="string",re=e?.advanced[T.Name],M=re??T.DefaultValue,Xe={name:T.Name,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,defaultValue:M,order:900+h},tt=y?H(H({},Xe),W):Xe;n&&re&&(this.createFormField(Q,tt,M),this.selectedAdvancedFormPair.update(Y=>(Y.push(tt),Y))),this.destinationFormPair.update(Y=>(Y.advanced.push(tt),Y))}}for(let h=0;h<A.length;h++){let T=A[h],v=e?.advanced[T.name],X=v??T.defaultValue;n&&v&&(this.createFormField(Q,T,X),this.selectedHttpOptions.update(W=>(W.push(T),W)))}this.destinationFormPair.update(h=>({oauthField:h.oauthField,custom:h.custom.sort((T,v)=>T.order-v.order),dynamic:h.dynamic.sort((T,v)=>T.order-v.order),advanced:h.advanced.sort((T,v)=>T.order-v.order)})),this.destinationForm.controls.destinations.push(tn({key:i?.customKey??t,customGroup:U,dynamicGroup:j,advancedGroup:Q}))}#_(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ae.autoRun),this.scheduleFields.nextTime.set(Ae.nextTime),this.scheduleFields.runAgain.set(Ae.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Rn=["formRef"],In=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),St=o=>({$implicit:o}),vn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),Ln=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),bn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),Gn=()=>({maxWidth:"700px",width:"100%"});function Un(o,t){o&1&&(E(0,5,2),F(1,"spk-icon"),D())}function Vn(o,t){o&1&&O(0,5,3)}function Bn(o,t){if(o&1){let e=R();E(0,5,1),s(1,"button",21),S("click",function(){u(e);let i=_();return m(i.testDestination())}),g(2,Un,2,0)(3,Vn,1,0),r(),D()}if(o&2){let e=_();l(),ue("loader",e.testLoading())("success",e.successfulTest()),l(),C(e.successfulTest()?2:3)}}function Kn(o,t){if(o&1){let e=R();s(0,"p",27),S("click",function(){u(e);let i=_();return m(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),F(2,"strong")(3,"br")(4,"span",28),D(),r()}if(o&2){let e,n=_();l(4),it((e=n.selectedDestinationType())==null?null:e.displayName),ot(1)}}function zn(o,t){if(o&1){let e=R();s(0,"div",34),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=t.$implicit;l(2),Me(e.displayName),l(2),Me(e.description)}}function Xn(o,t){if(o&1){let e=R();s(0,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=t.$implicit;l(2),z(" ",e.displayName," ")}}function Wn(o,t){if(o&1&&(s(0,"div",29),ee(1,zn,5,2,"div",30,J),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),B(6,20),ee(7,Xn,3,1,"button",33,J),K(),r()),o&2){let e=_();l(),te(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),te(e.destinationTypeOptionsNotFocused())}}function Hn(o,t){o&1&&He(0)}function jn(o,t){if(o&1&&g(0,Hn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,In,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function qn(o,t){o&1&&He(0)}function Qn(o,t){if(o&1&&g(0,qn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,vn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Yn(o,t){if(o&1){let e=R();E(0,10,1),s(1,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function Zn(o,t){o&1&&He(0)}function Jn(o,t){if(o&1&&g(0,Zn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,Ln,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ei(o,t){if(o&1){let e=R();E(0,11,1),s(1,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addHttpOption(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function ti(o,t){o&1&&He(0)}function ni(o,t){if(o&1&&g(0,ti,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,bn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ii(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function oi(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",48),d(2),g(3,ii,2,1,"spk-icon",49),r(),F(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ai(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ri(o,t){if(o&1&&(s(0,"app-file-tree",44)(1,"label",48),d(2),g(3,ai,2,1,"spk-icon",49),r(),F(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function si(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function li(o,t){if(o&1&&(s(0,"spk-icon",54),d(1," link "),r()),o&2){_();let e=x(7),n=x(8);ue("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function ci(o,t){o&1&&(s(0,"spk-icon",53),d(1,"envelope"),r())}function _i(o,t){o&1&&(s(0,"spk-icon",53),d(1,"textbox"),r())}function pi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,si,2,1,"spk-icon",49),r(),F(4,"input",51),je(5)(6)(7)(8),g(9,li,2,5,"spk-icon",52)(10,ci,2,0,"spk-icon",53)(11,_i,2,0,"spk-icon",53),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let c=a.getFormFieldValue(0,e.formGroupName,e.formView.name),A=a.hasDoubleLeadingSlashes(c);l(3),De(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),De(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),C(e.formView.type==="Path"?9:e.formView.type==="Email"?10:11)}}function di(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ui(o,t){if(o&1){let e=R();s(0,"span",58),S("click",function(){u(e);let i=_(2).$implicit,a=_(2);return m(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function mi(o,t){o&1&&(s(0,"spk-icon",53),d(1,"password"),r())}function Fi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function gi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function Ci(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,di,2,1,"spk-icon",49),r(),F(4,"input",55),g(5,ui,2,0,"span",56)(6,mi,2,0,"spk-icon",53)(7,Fi,2,0,"spk-icon",57)(8,gi,2,0,"spk-icon",57),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),C(e.oauthField===e.formView.name?5:6),l(2),C(e.formView.showPassword?7:8)}}function Ti(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function fi(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;Dt(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function Si(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;z(" ",e," ")}}function Ei(o,t){if(o&1&&g(0,fi,1,2)(1,Si,1,1),o&2){let e=_(3).$implicit;C(e.formView.loadOptions?0:1)}}function Di(o,t){if(o&1&&(s(0,"spk-select",60)(1,"label",48),d(2),g(3,Ti,2,1,"spk-icon",49),r(),F(4,"input",50),r(),g(5,Ei,2,1,"ng-template",null,3,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),C(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function hi(o,t){if(o&1&&(je(0),g(1,Di,7,8)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),C(n?1:-1)}}function Ai(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Pi(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;Dt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Ni(o,t){if(o&1&&(s(0,"spk-select",62)(1,"label",48),d(2),g(3,Ai,2,1,"spk-icon",49),r(),F(4,"input",50),r(),g(5,Pi,1,2,"ng-template",null,4,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),C(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function yi(o,t){o&1&&F(0,"spk-progress-bar",61)}function Oi(o,t){if(o&1&&(je(0),g(1,Ni,7,9)(2,yi,1,0,"spk-progress-bar",61)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),C(n?1:2)}}function ki(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Mi(o,t){if(o&1&&(s(0,"app-size",45)(1,"label",48),d(2),g(3,ki,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1)}}function xi(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function $i(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,xi,2,1,"spk-icon",49),r(),F(4,"input",63),s(5,"spk-icon",53),d(6,"numpad"),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function wi(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ri(o,t){if(o&1&&(s(0,"spk-toggle",46)(1,"label",48),d(2),g(3,wi,2,1,"spk-icon",49),r(),F(4,"input",64),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Ii(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function vi(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;z(" ",e," ")}}function Li(o,t){if(o&1&&(s(0,"spk-select",65)(1,"label",48),d(2),g(3,Ii,2,1,"spk-icon",49),r(),F(4,"input",66),r(),g(5,vi,1,1,"ng-template",null,4,Ze)),o&2){let e=ae(6),n=_().$implicit,i=x(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),vt("for","destination-",n.formGroupName,"-",n.index,""),l(),z(" ",i," "),l(),C(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function bi(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Gi(o,t){if(o&1&&(s(0,"app-timespan",45)(1,"label",48),d(2),g(3,bi,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1)}}function Ui(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Vi(o,t){if(o&1&&(s(0,"app-file-drop-textarea",47)(1,"label"),d(2),g(3,Ui,2,1,"spk-icon",49),r()()),o&2){let e,n=_().$implicit,i=x(3);p("formControlName",n.formView.name)("customId",i)("placeholder",n.formView.longDescription),l(2),z(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),l(),C(n.formView.longDescription?3:-1)}}function Bi(o,t){if(o&1){let e=R();s(0,"button",67),S("click",function(){u(e);let i=_().$implicit,a=_(2);return m(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function Ki(o,t){if(o&1&&(s(0,"div",41),B(1,42),je(2)(3),g(4,oi,5,11,"app-file-tree",43)(5,ri,5,7,"app-file-tree",44)(6,pi,12,9,"spk-form-field")(7,Ci,9,8,"spk-form-field")(8,hi,2,2)(9,Oi,3,2)(10,Mi,4,6,"app-size",45)(11,$i,7,5,"spk-form-field")(12,Ri,5,5,"spk-toggle",46)(13,Li,7,9)(14,Gi,4,6,"app-timespan",45)(15,Vi,4,5,"app-file-drop-textarea",47),K(),g(16,Bi,3,0,"button",32),r()),o&2){let e,n=t.$implicit;ue("single-field",n.formGroupName!=="advanced"),l(),p("formGroupName",n.formGroupName),l(),De((e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name),l(),De("destination-"+n.formGroupName+"-"+n.index+"-"+(n.asHttpOptions?"http":"other")),l(),C(n.formView.type==="FileTree"?4:n.formView.type==="FolderTree"?5:n.formView.type==="String"||n.formView.type==="Path"||n.formView.type==="Email"?6:n.formView.type==="Password"?7:n.formView.type==="Enumeration"?8:n.formView.type==="NonValidatedSelectableString"?9:n.formView.type==="Size"?10:n.formView.type==="Integer"?11:n.formView.type==="Boolean"?12:n.formView.type==="Flags"?13:n.formView.type==="Timespan"||n.formView.type==="DateTime"?14:n.formView.type==="FreeText"?15:-1),l(12),C(n.formGroupName==="advanced"?16:-1)}}function zi(o,t){if(o&1&&(B(0,22)(1,36),ee(2,jn,1,9,"ng-container",null,J),ee(4,Qn,1,9,"ng-container",null,J),s(6,"app-toggle-card",37),B(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),F(11,"spk-icon"),r(),B(12,20),ee(13,Yn,3,1,"button",33,J),K(),r(),D(),K(),ee(15,Jn,1,9,"ng-container",null,J),r(),s(17,"app-toggle-card",37),B(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),F(22,"spk-icon"),r(),B(23,20),ee(24,ei,3,1,"button",33,J),K(),r(),D(),K(),ee(26,ni,1,9,"ng-container",null,J),r(),g(28,Ki,17,7,"ng-template",null,2,Ze),K()()),o&2){let e=_();l(2),te(e.destinationFormPair().custom),l(2),te(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),te(e.notSelectedAdvancedFormPair()),l(2),te(e.selectedAdvancedFormPair()),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedHttpOptions().length===0),l(3),te(e.notSelectedHttpOptions()),l(2),te(e.selectedHttpOptions())}}function Xi(o,t){if(o&1){let e=R();s(0,"spk-dialog",68),G("isOpenChange",function(i){u(e);let a=_();return b(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),m(i)}),s(1,"header",69)(2,"h2"),O(3,12),r(),s(4,"spk-alert",70),O(5,13),r()(),s(6,"div",71)(7,"spk-form-field"),F(8,"textarea",72),r()(),s(9,"footer",73)(10,"button",24),S("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",74),S("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!0))}),E(13,14),F(14,"spk-icon"),D(),r()()()}if(o&2){let e=_();L("isOpen",e.targetUrlDialogOpen),p("options",qe(3,Gn)),l(8),p("formControl",e.targetUrlCtrl)}}var ft=new Ce,en=(o={destinations:[]})=>ft.group({destinations:ft.array(o.destinations)}),tn=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>ft.group({destinationType:ft.control(o),custom:t,dynamic:e,advanced:n}),kt=class o{#n=P(se);#t=P(me);#e=P(_e);#i=P($e);#o=P(gt);injector=P($t);formRef=ye.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=f(!1);testLoading=f(!1);destinationTypeOptionsInFocus=f(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=f(ut.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=$(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=$(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}addHttpOption(t,e){this.#e.addHttpOption(t,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=f(null);targetUrlDialogOpen=f(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(We(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(q,{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(q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return dt(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=f("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=f(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=f(!1);#l=f(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,c=600,A=this.#a()+"?type="+t+"&token="+i,k=screen.width/2-a/2,I=screen.height/2-c/2,V=window.open(A,"_blank","height="+c+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+I);return window.addEventListener("message",N=>{let w=N.data.startsWith("authid:"),U=w?N.data.replace("authid:",""):null;console.log("event",N),w&&(n.setValue(U),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Rn,5),e&2&&ke()},decls:24,vars:6,consts:()=>{let t;t=$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:`,t=Ee(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=Ee(c);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Ee(A);let k;k=$localize`Edit target URL`;let I;I=$localize` Be careful, this will overwrite everything you have in your destination. `;let V;return V=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],t,e,n,i,a,c,A,k,I,V,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"formControlName","customId","placeholder"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let i=R();s(0,"form",15,0),S("submit",function(){return u(i),m(n.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),g(6,Bn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),F(9,"spk-icon"),r(),B(10,20),s(11,"button",21),S("click",function(){return u(i),m(n.openTargetUrlDialog())}),F(12,"spk-icon"),r(),K(),r()(),D(),r(),g(13,Kn,5,1,"p"),r(),g(14,Wn,9,1)(15,zi,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),S("click",function(){return u(i),m(n.goBack())}),E(18,6),F(19,"spk-icon"),D(),r(),s(20,"button",25),E(21,7),F(22,"spk-icon"),D(),r()()(),g(23,Xi,15,4,"spk-dialog",26)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),C(n.destinationCount()>0?6:-1),l(7),C(n.destinationCount()>0?13:-1),l(),C(n.destinationCount()===0?14:-1),l(),C(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),C(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Be,be,ie,Ge,Ie,oe,Le,_t,Ue,Ve,pt,Xt,Vt,le,Kt,ne,we,Bt,at,ce,st,rt,qt,Ke,mt,Ft,jt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-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}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{gt as a,en as b,tn as c,kt as d,Qt as e,Nt as f,Pt as g,Ae as h,yt as i,Zt as j,Ot as k,_e as l};
package/chunk-IX2G55AS.js DELETED
@@ -1 +0,0 @@
1
- import{e as a,f as b,g as c}from"./chunk-IQFSWP4W.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-YKOEKIFQ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
package/chunk-KBJGYXKV.js DELETED
@@ -1 +0,0 @@
1
- import{e as a,f as b}from"./chunk-Q6M5VRZV.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
package/chunk-KYQWUXYN.js DELETED
@@ -1 +0,0 @@
1
- import{a}from"./chunk-4LLC3Q7O.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-WZRSQ7XL.js";import"./chunk-5ENRUF35.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
package/chunk-LRRCO7FY.js DELETED
@@ -1 +0,0 @@
1
- import{j as a,k as b}from"./chunk-IQFSWP4W.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-YKOEKIFQ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
package/chunk-LWC5O2JV.js DELETED
@@ -1 +0,0 @@
1
- import{a as Le,b as Re}from"./chunk-YYC22I2K.js";import{a as $e}from"./chunk-TJJORMQV.js";import{a as x}from"./chunk-HTX2RSBS.js";import"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import{a as fe}from"./chunk-WFM6YWRN.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-RSZISHXB.js";import{a as Ie}from"./chunk-X6PSFVBL.js";import{c as Pe,d as Oe,e as he,h as De,r as ke,s as Ne,t as Me}from"./chunk-5ENRUF35.js";import{a as de,c as Ee}from"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import{c as ce,e as pe,f as ue}from"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{C as Te,a as M,b as G,c as Se,e as ge,g as w,k as Fe,l as Ae,n as me,u as Ce}from"./chunk-AL5KGNEF.js";import{h as H}from"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import{$a as ee,Ab as te,Bb as ne,Cb as oe,Db as s,Eb as i,F as X,Fb as l,Jb as f,Pb as p,Pc as _e,Qb as u,Qc as Q,Rb as O,Ua as r,Ub as $,Vb as S,Wb as c,Z as F,bb as V,ea as A,fa as m,gb as N,gc as ie,hc as se,jc as g,kc as K,lb as C,lc as z,oc as W,pc as q,qc as j,ra as Z,rc as ae,sc as re,tc as b,ub as h,va as E,vc as le,wb as v,yb as R,zb as d}from"./chunk-AHUC7M75.js";import{a as Y,b as B}from"./chunk-7CGTOI24.js";var Ge=["scroller"];function we(n,o){n&1&&(s(0,"spk-icon"),g(1,"bell-ringing"),i())}function He(n,o){n&1&&(s(0,"spk-icon"),g(1,"bell"),i())}function xe(n,o){if(n&1&&l(0,"app-notification",8),n&2){c(2);let e=b(6);h("index",0)("notification",e.content)}}function Ue(n,o){if(n&1&&(s(0,"div",11),g(1),i()),n&2){c(3);let e=b(6);r(),z(" ",e.content.content," ")}}function Ye(n,o){if(n&1&&(s(0,"spk-alert")(1,"div",10),g(2),i(),C(3,Ue,2,1,"div",11),i()),n&2){c(2);let e=b(6);R(e.content.type||"error"),r(2),K(e.content.title),r(),d(e.content.content?3:-1)}}function Be(n,o){if(n&1&&(s(0,"div",6),C(1,xe,1,2,"app-notification",8)(2,Ye,4,4,"spk-alert",9),i()),n&2){c();let e=b(6);r(),d(e.type==="notification"?1:2)}}function Xe(n,o){if(n&1){let e=f();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,2),s(4,"button",5),S("click",function(){A(e);let a=c();return m(a.toggleNotifications())}),l(5,"spk-icon"),i(),u(),i(),s(6,"div",14,0)(8,"div",15),l(9,"app-notifications"),i()()()()}}function Ve(n,o){if(n&1&&(s(0,"div",19),g(1),i()),n&2){let e=c().$implicit;r(),z(" ",e.content," ")}}function Ke(n,o){if(n&1){let e=f();s(0,"spk-alert",17,1),S("click",function(){let a=A(e).$implicit,_=c(2);return m(_.deleteAlertByIndex(a.id))}),s(2,"div",18),g(3),i(),C(4,Ve,2,1,"div",19),i()}if(n&2){let e=o.$implicit;R(e.type),h("id",e.id),r(3),K(e.title),r(),d(e.content?4:-1)}}function ze(n,o){n&1&&(s(0,"p"),O(1,4),i())}function We(n,o){if(n&1){let e=f();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,3),s(4,"button",5),S("click",function(){A(e);let a=c();return m(a.toggleAlerts())}),l(5,"spk-icon"),i(),u(),i(),s(6,"div",14,0)(8,"div",15),ne(9,Ke,5,5,"spk-alert",16,te,!1,ze,2,0,"p"),i()()()()}if(n&2){let e=c();r(9),oe(e.alertHistory())}}var be=new ke,y=class n{#e=F(Se);#t=F(x);isSubmitting=E(!1);messageSent=E(!1);form=be.group({message:be.control("",[Oe.required])});notifications=this.#t.notifications;shownMessage=E(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=_e(()=>this.alertHistory().filter(o=>o.isOpen).length);scroller=ee("scroller");isAlertsOpen=V(!1);isNotificationsOpen=V(!1);previousHistoryCount=E(null);previousNotificationsCount=E(null);constructor(){Q(()=>{let o=this.alertHistory(),e=this.notifications();e.length&&this.previousHistoryCount()!==o.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>B(Y({},a),{countDown:a.countDown-1}))},1e3)):o.length&&this.previousHistoryCount()!==o.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:o[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>B(Y({},a),{countDown:a.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(o){this.#e.removeAlert(o)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ie(t.scroller,Ge,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let o;o=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],o,e,t,["spk-button","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["sparkle-alert-title",""],["sparkle-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=f();s(0,"button",5),S("click",function(){return A(a),m(t.toggleAlerts())}),s(1,"spk-icon"),g(2,"info"),i()(),s(3,"button",5),S("click",function(){return A(a),m(t.toggleNotifications())}),C(4,we,2,0,"spk-icon")(5,He,2,0,"spk-icon"),i(),ae(6),C(7,Be,3,1,"div",6)(8,Xe,10,0,"div",7)(9,We,12,1,"div",7)}if(e&2){R(t.alertHistory().length?"error":""),r(3),R(t.notifications().length?"error":""),r(),d(t.notifications().length?4:5),r(2);let a=re(t.shownMessage());r(),d(a?7:-1),r(),d(t.isNotificationsOpen()?8:-1),r(),d(t.isAlertsOpen()?9:-1)}},dependencies:[Me,G,M,w,Re,Le],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:250px}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}"],changeDetection:0})};function qe(n,o){n&1&&(s(0,"spk-icon",14),g(1,"check"),i())}function je(n,o){n&1&&(s(0,"spk-icon",15),g(1,"prohibit"),i())}function Qe(n,o){if(n&1){let e=f();s(0,"button",20),S("click",function(){A(e);let a=c();return m(a.updatePassphrase())}),O(1,5),i()}if(n&2){let e=c();v("loader",e.isUpdating())}}function Je(n,o){if(n&1){let e=f();s(0,"button",21),S("click",function(){A(e);let a=c();return m(a.updatePassphrase())}),O(1,6),i()}if(n&2){let e=c();v("loader",e.isUpdating()),h("disabled",!0)}}var U=class n{#e=F(H);closed=Z();isUpdating=E(!1);passphrase=E("");repeatPassphrase=E("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(X(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(X(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let o;o=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let _;_=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,_=$(_);let D;D=$localize`Passphrase`;let k;k=$localize`Repeat passphrase`;let I;I=$localize`Not now thanks`;let L;L=$localize` Yes, update passphrase now `;let T;return T=$localize` Yes, update passphrase now `,[a,_,D,k,I,L,T,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",o,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",t,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),O(2,0),i()(),s(3,"div",8)(4,"spk-alert",9),p(5,1),l(6,"br")(7,"br"),u(),i(),s(8,"spk-form-field")(9,"label",10),O(10,2),i(),s(11,"input",11),j("ngModelChange",function(_){return q(t.passphrase,_)||(t.passphrase=_),_}),i()(),s(12,"spk-form-field")(13,"label",12),O(14,3),i(),s(15,"input",13),j("ngModelChange",function(_){return q(t.repeatPassphrase,_)||(t.repeatPassphrase=_),_}),i(),C(16,qe,2,0,"spk-icon",14)(17,je,2,0,"spk-icon",15),i()(),s(18,"footer",16)(19,"button",17),S("click",function(){return t.cancel()}),O(20,4),i(),C(21,Qe,2,2,"button",18)(22,Je,2,3,"button",19),i()),e&2&&(r(11),W("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),W("ngModel",t.repeatPassphrase),r(),d(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),v("loader",t.isUpdating()),r(2),d(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Ne,Pe,he,De,G,Ae,M,Te],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var Ze=()=>({exact:!0});function et(n,o){n&1&&(s(0,"spk-icon"),g(1,"sun"),i())}function tt(n,o){n&1&&(s(0,"spk-icon"),g(1,"moon"),i())}function nt(n,o){if(n&1){let e=f();s(0,"button",22),S("click",function(){A(e);let a=c();return m(a.changeDefaultClientTo("ngax"))}),p(1,7),l(2,"spk-icon"),u(),i(),s(3,"button",22),S("click",function(){A(e);let a=c();return m(a.logout())}),p(4,8),l(5,"spk-icon"),u(),i()}}var J=class n{#e=F($e);#t=F(H);#n=F(fe);#o=F(de);#i=F(ge);#s=F(x);#a=F(Ee);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;ngOnInit(){return this.#s.init(),this.#n.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:o=>{let e=o["autogenerated-passphrase"]==="True",t=o["has-asked-for-password-change"]==="True";e&&!t&&this.#i.open(U,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(o){this.#r(o),window.location.replace(`/${o}`)}logout(){this.#a.logout()}#r(o){var e=new Date;e.setTime(e.getTime()+90*24*60*60*1e3),document.cookie="default-client="+o+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-layout"]],decls:37,vars:4,consts:()=>{let o;o=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:gear${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Settings `;let _;_=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: About Duplicati `;let D;D=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:files${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SPK_ICON: Documentation ${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON_1:arrow-square-out${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SPK_ICON:`,D=$(D);let k;k=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SPK_ICON:chats-circle${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SPK_ICON: Visit forum ${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SPK_ICON:`,k=$(k);let I;I=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Revert to NGAX client `;let L;return L=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Log out `,[o,e,t,a,_,D,k,I,L,["sidenav",""],["spk-button","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"spk-sidenav")(1,"div",9)(2,"header"),l(3,"app-logo"),s(4,"button",10),S("click",function(){return t.toggleBodyClass()}),C(5,et,2,0,"spk-icon")(6,tt,2,0,"spk-icon"),i()(),s(7,"spk-list",11)(8,"button",12),p(9,0),l(10,"spk-icon"),u(),i(),s(11,"button",13),p(12,1),l(13,"spk-icon"),u(),i(),s(14,"button",14),p(15,2),l(16,"spk-icon"),u(),i(),s(17,"button",15),p(18,3),l(19,"spk-icon"),u(),i()(),l(20,"div",16),s(21,"spk-list",17),C(22,nt,6,0),l(23,"spk-divider"),s(24,"button",18),p(25,4),l(26,"spk-icon"),u(),i(),s(27,"a",19),p(28,5),l(29,"spk-icon")(30,"spk-icon",20),u(),i(),s(31,"a",21),p(32,6),l(33,"spk-icon")(34,"spk-icon",20),u(),i()()(),l(35,"router-outlet")(36,"app-service-hub"),i()),e&2&&(r(5),d(t.isDarkMode()?5:6),r(3),h("routerLinkActiveOptions",le(3,Ze)),r(14),d(t.relayIsEnabled()?-1:22))},dependencies:[ce,pe,ue,Ce,M,me,w,Fe,y,Ie],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:20px;gap:12px}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}"],changeDetection:0})};export{J as default};
package/chunk-QVNFX6ZC.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",loadComponent:()=>import("./chunk-CH7FSO4Y.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-XWF632WO.js")},{path:"live",loadComponent:()=>import("./chunk-3GGSYR5J.js")}]}],t=o;export{t as default};
package/chunk-RKAIZDDW.js DELETED
@@ -1 +0,0 @@
1
- import{a}from"./chunk-2P3DXYGR.js";import"./chunk-TCDECRYI.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as DurationFormatPipe};
package/chunk-RSZISHXB.js DELETED
@@ -1 +0,0 @@
1
- import{ua as m}from"./chunk-M3WT5B3C.js";import{Z as s,jb as p}from"./chunk-AHUC7M75.js";var f=class a{decimalPipe=s(m);transform(t,e=!1){if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let r=this.#t(),n=r?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(r?1e3:1024));i=Math.min(i,n.length-1);let l=t/Math.pow(r?1e3:1024,i),o=this.decimalPipe.transform(l,"1.0-2");return o?`${o} ${e?n[i]:n[i].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(r=>e.includes(r)):!1}static \u0275fac=function(e){return new(e||a)};static \u0275pipe=p({name:"bytes",type:a,pure:!0})};export{f as a};
package/chunk-ST67LUCY.js DELETED
@@ -1 +0,0 @@
1
- import{h as a,i as b}from"./chunk-IQFSWP4W.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-YKOEKIFQ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_FIELD_DEFAULTS,b as default};
package/chunk-UABJ67OY.js DELETED
@@ -1 +0,0 @@
1
- import{c as M}from"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{g as h}from"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import{Db as t,Eb as i,Fb as g,Rb as c,Ua as u,Xb as C,Yb as l,Z as m,gb as s,jc as O,lb as _,zb as f}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),l(7),t(8,"footer"),l(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),c(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),c(1,1),i(),t(2,"button",3),c(3,2),i())}var d=class n{#e=m(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,h],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
package/chunk-UDYPOSWB.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-HYHEAOIF.js")},{path:"encryption",loadComponent:()=>import("./chunk-ZHMYBX5F.js")},{path:"select-files",loadComponent:()=>import("./chunk-KBJGYXKV.js")},{path:"options",loadComponent:()=>import("./chunk-Z45ZPMZS.js")},{path:"progress",loadComponent:()=>import("./chunk-KKIWOA46.js")}],t=o;export{t as default};
package/chunk-VYJFDVMS.js DELETED
@@ -1 +0,0 @@
1
- import{a as un}from"./chunk-B3WLZK7W.js";import{c as Z,d as sn}from"./chunk-YKOEKIFQ.js";import"./chunk-XR4SRVOQ.js";import{a as cn}from"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import{a as ln}from"./chunk-WFM6YWRN.js";import{a as rn}from"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-RSZISHXB.js";import"./chunk-5ENRUF35.js";import"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import{e as je}from"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{a as Y,e as qe,f as Je,g as Qe,h as Ye,j as Ze,k as en,o as nn,p as tn,w as on,x as an}from"./chunk-AL5KGNEF.js";import{h as _n}from"./chunk-FRSQ5NDX.js";import"./chunk-RHII5WE3.js";import"./chunk-M3WT5B3C.js";import"./chunk-TCDECRYI.js";import{Ab as z,Ac as b,Bb as V,Bc as G,Cb as K,Cc as Q,Db as a,Eb as o,F as w,Fb as d,Gb as M,Hb as m,Ib as $,Jb as B,Pb as s,Qb as u,Qc as We,Rb as p,Sb as y,Tb as x,Ua as r,Ub as j,Vb as f,Wb as F,Z as L,a as ve,b as W,ea as k,fa as P,gb as he,ic as U,jc as T,kc as ze,lb as g,lc as O,oc as Ve,pc as Ke,qc as Ue,rb as Xe,rc as q,sb as we,ub as S,va as H,vc as J,wb as R,wc as D,zb as E,zc as I}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";function pn(...e){let i=H(...e);return Object.defineProperty(i,"value",{get:i.asReadonly(),set:i.set.bind(i)})}function Fn(e,i,n){let t=localStorage.getItem(i);t!=null&&(e=JSON.parse(t));let _=pn(e),c=_[ve];n?.equal&&(c.equal=n.equal);function N(C){C==null?localStorage.removeItem(i):localStorage.setItem(i,JSON.stringify(C))}return _.set=C=>{N(C),W(c,C)},_.update=C=>{let A=C(_());N(A),W(c,A)},_}var Tn=()=>[import("./chunk-RLUT4FSI.js").then(e=>e.NgTemplateOutlet),Y,Ze,an,on,import("./chunk-RKAIZDDW.js").then(e=>e.DurationFormatPipe),import("./chunk-CRJHIWSF.js").then(e=>e.BytesPipe),import("./chunk-G5CT45UH.js").then(e=>e.RelativeTimePipe)],Sn=()=>["/add-backup"],Cn=()=>["/restore"],dn=e=>({$implicit:e}),En=e=>["/backup",e],Mn=e=>["/restore",e],mn=e=>["/backup",e,"export"],On=e=>["/backup",e,"database"],Nn=e=>["/backup",e,"commandline"],kn=e=>["/backup",e,"log"];function Pn(e,i){if(e&1){let n=B();a(0,"button",57),f("click",function(){let _=k(n).$implicit,c=F(2);return P(c.sortByColumn.set(_.value))}),p(1,15),o()}if(e&2){let n=i.$implicit,t=F(2);R("active",t.orderBy()===n.value),r(),y(n.label),x(1)}}function fn(e,i){if(e&1&&(a(0,"spk-menu",58)(1,"button",59),s(2,14),d(3,"strong")(4,"spk-icon"),u(),o(),M(5,60),V(6,Pn,2,3,"button",61,z),m(),o()),e&2){let n=F();r(4),y(n.orderBy()),x(2),r(2),K(n.sortOrderOptions())}}function $n(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(4);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function Dn(e,i){e&1&&(M(0),p(1,21),m())}function In(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",b(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function An(e,i){e&1&&(M(0),p(1,22),m())}function Rn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",b(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Hn(e,i){e&1&&(M(0),p(1,23),m())}function yn(e,i){e&1&&$(0)}function xn(e,i){if(e&1&&(a(0,"div",64)(1,"div",51)(2,"h3"),T(3),a(4,"spk-chip")(5,"spk-icon"),T(6),o(),T(7),o()(),a(8,"p")(9,"span"),p(10,16),o(),T(11),I(12,"relativeTime"),o(),a(13,"p")(14,"span"),p(15,17),o(),g(16,$n,2,4)(17,Dn,2,0,"ng-container"),o(),a(18,"p")(19,"span"),p(20,18),o(),g(21,In,2,3)(22,An,2,0,"ng-container"),o(),a(23,"p")(24,"span"),p(25,19),o(),g(26,Rn,2,3)(27,Hn,2,0,"ng-container"),o()(),q(28),a(29,"spk-chip",65),p(30,20),o(),a(31,"div",55),g(32,yn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,_=F(4),c=U(51);r(3),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:_.MISSING_BACKUP_NAME," "),r(3),ze(_.getBackendIcon(t.Backup==null?null:t.Backup.TargetURL)),r(),O(" ",_.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(4),O(" ",G(12,11,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," "),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?16:17),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?21:22),r(5),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?26:27);let N=_.getBackupVersionCount(t);r(4),y(N)(N),x(30),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",D(14,dn,t))}}function Ln(e,i){if(e&1&&V(0,xn,33,16,"div",64,z),e&2){let n=F(3);K(n.backups())}}function Bn(e,i){e&1&&(M(0),p(1,24),m())}function bn(e,i){if(e&1&&(a(0,"div",62),g(1,Ln,2,0)(2,Bn,2,0,"ng-container"),o()),e&2){let n=F(2);r(),E(n.backups().length?1:2)}}function Gn(e,i){e&1&&(s(0,25,1),$(1),u())}function vn(e,i){e&1&&(s(0,26,1),$(1),u())}function hn(e,i){e&1&&(s(0,27,1),$(1),u())}function Xn(e,i){e&1&&(s(0,28,1),$(1),u())}function wn(e,i){e&1&&(s(0,29,1),$(1),u())}function zn(e,i){e&1&&(s(0,30,1),$(1),u())}function Vn(e,i){if(e&1&&(T(0),I(1,"relativeTime")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,t.timeType()==="actual")," ")}}function Kn(e,i){e&1&&(M(0),p(1,34),m())}function Un(e,i){if(e&1&&(T(0),I(1,"durationFormat")),e&2){let n=F().$implicit,t=F(3);O(" ",G(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,t.timeType()==="actual")," ")}}function Wn(e,i){e&1&&(M(0),p(1,35),m())}function jn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",b(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function qn(e,i){e&1&&(M(0),p(1,36),m())}function Jn(e,i){if(e&1&&(T(0),I(1,"bytes")),e&2){let n=F().$implicit;O(" ",b(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Qn(e,i){e&1&&(M(0),p(1,37),m())}function Yn(e,i){e&1&&$(0)}function Zn(e,i){if(e&1&&(a(0,"tr")(1,"td"),T(2),o(),a(3,"td"),T(4),o(),a(5,"td"),g(6,Vn,2,4)(7,Kn,2,0,"ng-container"),o(),a(8,"td"),g(9,Un,2,4)(10,Wn,2,0,"ng-container"),o(),a(11,"td"),g(12,jn,2,3)(13,qn,2,0,"ng-container"),o(),a(14,"td"),g(15,Jn,2,3)(16,Qn,2,0,"ng-container"),o(),a(17,"td"),q(18),a(19,"span"),p(20,33),o()(),a(21,"td"),g(22,Yn,1,0,"ng-container",66),o()()),e&2){let n,t=i.$implicit,_=F(3),c=U(51);r(2),O(" ",(n=t.Backup==null?null:t.Backup.Name)!==null&&n!==void 0?n:_.MISSING_BACKUP_NAME," "),r(2),O(" ",_.getBackendType(t.Backup==null?null:t.Backup.TargetURL)," "),r(2),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDate?6:7),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.LastBackupDuration?9:10),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.SourceFilesSize?12:13),r(3),E(!(t.Backup==null||t.Backup.Metadata==null)&&t.Backup.Metadata.TargetFilesSize?15:16);let N=_.getBackupVersionCount(t);r(5),y(N)(N),x(20),r(2),S("ngTemplateOutlet",c)("ngTemplateOutletContext",D(10,dn,t))}}function et(e,i){if(e&1){let n=B();a(0,"spk-table",67),Ue("sortByColumnChange",function(_){k(n);let c=F(2);return Ke(c.sortByColumn,_)||(c.sortByColumn=_),P(_)}),a(1,"tr",68)(2,"th",69),s(3,25),g(4,Gn,2,0,"ng-container",70),u(),o(),a(5,"th",71),s(6,26),g(7,vn,2,0,"ng-container",70),u(),o(),a(8,"th",72),s(9,27),g(10,hn,2,0,"ng-container",70),u(),o(),a(11,"th",73),s(12,28),g(13,Xn,2,0,"ng-container",70),u(),o(),a(14,"th",74),s(15,29),g(16,wn,2,0,"ng-container",70),u(),o(),a(17,"th",75),s(18,30),g(19,zn,2,0,"ng-container",70),u(),o(),a(20,"th"),p(21,31),o(),a(22,"th"),p(23,32),o()(),V(24,Zn,23,12,"tr",null,z),o()}if(e&2){let n=F(2),t=U(53);S("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),r(4),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(3),S("ngTemplateOutlet",t),r(5),K(n.backups())}}function nt(e,i){if(e&1&&g(0,bn,3,1,"div",62)(1,et,26,9,"spk-table",63),e&2){let n=F();E(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function tt(e,i){e&1&&(a(0,"div",76),d(1,"spk-progress-bar",77),a(2,"div",51)(3,"h3"),p(4,38),o()()())}function it(e,i){e&1&&p(0,39,1)}function ot(e,i){e&1&&(a(0,"spk-icon"),T(1,"check"),o())}function at(e,i){e&1&&(a(0,"spk-icon"),T(1,"dots-three-vertical"),o())}function _t(e,i){if(e&1){let n=B();a(0,"button",78),f("click",function(){let _=k(n).$implicit,c=F();return P(c.startBackup(_.Backup==null?null:_.Backup.ID))}),s(1,39),d(2,"spk-icon"),g(3,it,1,0),u(),o(),a(4,"button",79)(5,"spk-icon"),T(6,"pencil-simple"),o()(),a(7,"spk-menu",80)(8,"button",52),g(9,ot,2,0,"spk-icon")(10,at,2,0,"spk-icon"),o(),M(11,60),a(12,"h3",81),T(13,"Operations"),o(),a(14,"button",82),s(15,40),d(16,"spk-icon"),u(),o(),a(17,"button",82),s(18,41),d(19,"spk-icon"),u(),o(),a(20,"button",83),f("click",function(){let _=k(n).$implicit,c=F();return P(c.deleteBackup(_.Backup==null?null:_.Backup.ID))}),s(21,42),d(22,"spk-icon"),u(),o(),d(23,"spk-divider"),a(24,"h3",81),T(25,"Advanced"),o(),a(26,"button",82),s(27,43),d(28,"spk-icon"),u(),o(),a(29,"button",57),f("click",function(){let _=k(n).$implicit,c=F();return P(c.verifyFiles(_.Backup==null?null:_.Backup.ID))}),s(30,44),d(31,"spk-icon"),u(),o(),a(32,"button",57),f("click",function(){let _=k(n).$implicit,c=F();return P(c.compressBackup(_.Backup==null?null:_.Backup.ID))}),s(33,45),d(34,"spk-icon"),u(),o(),a(35,"button",82),s(36,46),d(37,"spk-icon"),u(),o(),d(38,"spk-divider"),a(39,"h3",81),T(40,"Reporting"),o(),a(41,"button",82),s(42,47),d(43,"spk-icon"),u(),o(),a(44,"button",57),f("click",function(){let _=k(n).$implicit,c=F();return P(c.createErrorReport(_.Backup==null?null:_.Backup.ID))}),s(45,48),d(46,"spk-icon"),u(),o(),m(),o()}if(e&2){let n=i.$implicit,t=F();R("loader",t.startingBackup()===(n.Backup==null?null:n.Backup.ID)),r(3),E(t.viewMode()==="list"?3:-1),r(),S("routerLink",D(17,En,n.Backup==null?null:n.Backup.ID)),r(3),S("right",!0),r(),R("loader",t.loadingId()===(n.Backup==null?null:n.Backup.ID))("success",t.successId()===(n.Backup==null?null:n.Backup.ID)),r(),E(t.successId()===(n.Backup==null?null:n.Backup.ID)?9:10),r(5),S("routerLink",D(19,Mn,n.Backup==null?null:n.Backup.ID)),r(3),S("routerLink",D(21,mn,n.Backup==null?null:n.Backup.ID)),r(3),R("loader",t.deletingBackup()===(n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",D(23,On,n.Backup==null?null:n.Backup.ID)),r(9),S("routerLink",D(25,Nn,n.Backup==null?null:n.Backup.ID)),r(6),S("routerLink",D(27,kn,n.Backup==null?null:n.Backup.ID))}}function lt(e,i){e&1&&(a(0,"spk-icon",84),T(1,"funnel-simple"),o(),a(2,"spk-icon",85),T(3,"sort-ascending"),o(),a(4,"spk-icon",86),T(5,"sort-descending"),o())}var gn={file:{Display:$localize`Local`,Icon:null}},ee=class e{#e=L(ln);#t=L(qe);#n=L(_n);#i=L(cn);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=Fn("list","viewMode");sortByColumn=H("name");loadingId=H(null);successId=H(null);sortEffect=We(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#i.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"database";let _=gn[t.key];return _?.Icon?_.Icon:"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],t=Z.find(c=>c.key===n);if(!t)return"";let _=gn[t.key];if(_?.Display)return _.Display;if(t.key==="s3"){let c="http://null?"+i.split("?")[1],C=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[A,v]of Object.entries(sn))if(C.endsWith(A))return v}return t.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}deleteBackup(i){this.loadingId.set(i),this.#t.open(rn,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.deleteBackup(i)}})}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}createErrorReport(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCreatereport({id:i}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=he({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let t;t=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let _;_=$localize`Restores`;let c;c=$localize`Restores allow you to restore your data from the cloud.`;let N;N=$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=j(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 Se;Se=$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 Ce;Ce=$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=j(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 xe;xe=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let Le;Le=$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 be;be=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let Ge;return Ge=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `,[["actions",""],["sortIcons",""],i,n,t,_,c,N,C,A,v,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,ge,de,Te,Se,Ce,Ee,Me,me,Oe,Ne,ke,Pe,fe,$e,De,Ie,Ae,Re,He,ye,xe,Le,Be,be,Ge,[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","table-buttons"],["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"],[3,"click"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,t){if(n&1){let _=B();d(0,"app-status-bar"),a(1,"section")(2,"header")(3,"spk-card",49),d(4,"img",50),a(5,"div",51)(6,"h3"),p(7,2),o(),a(8,"p"),p(9,3),o()(),a(10,"button",52),s(11,4),d(12,"spk-icon"),u(),o()(),a(13,"spk-card",49),d(14,"img",53),a(15,"div",51)(16,"h3"),p(17,5),o(),a(18,"p"),p(19,6),o()(),a(20,"button",52),s(21,7),d(22,"spk-icon"),u(),o()()(),a(23,"div",54)(24,"h2"),M(25),p(26,8),m(),a(27,"div",55)(28,"spk-button-group",56)(29,"button",57),f("click",function(){return k(_),P(t.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),o(),a(32,"button",57),f("click",function(){return k(_),P(t.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),o()(),a(35,"spk-menu",58)(36,"button",59),s(37,11),d(38,"strong")(39,"spk-icon"),u(),o(),M(40,60),a(41,"button",57),f("click",function(){return k(_),P(t.setTimeType("relative"))}),p(42,12),o(),a(43,"button",57),f("click",function(){return k(_),P(t.setTimeType("actual"))}),p(44,13),o(),m(),o(),g(45,fn,8,1,"spk-menu",58),o()(),g(46,nt,2,1)(47,tt,5,0),Xe(48,46,Tn,null,47),o()(),g(50,_t,47,29,"ng-template",null,0,Q)(52,lt,6,0,"ng-template",null,1,Q)}n&2&&(r(3),S("routerLink",J(9,Sn)),r(10),S("routerLink",J(10,Cn)),r(16),R("active",t.viewMode()==="list"),r(3),R("active",t.viewMode()==="details"),r(7),y(t.timeType()),x(37),r(6),E(t.viewMode()==="list"?45:-1),r(3),we(!t.backupsLoading()))},dependencies:[je,un,Ye,Qe,Y,en,nn,tn,Je],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}.content[_ngcontent-%COMP%] .table-buttons[_ngcontent-%COMP%]{min-height:40px}.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;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-WFM6YWRN.js DELETED
@@ -1 +0,0 @@
1
- import{a as d}from"./chunk-RHW5QVAY.js";import{a as p}from"./chunk-3XVU2YA6.js";import{h as o}from"./chunk-FRSQ5NDX.js";import{E as i,F as s,P as n,T as c,Z as u,va as a}from"./chunk-AHUC7M75.js";var B="backupListOrderBy",k="backupListShowActualTimes",y=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],m=class l{#t=u(p);#i=u(o);#u=null;#e=a([]);#a=a([]);#s=a(!1);#l=a(null);#r=a(null);#c=a(this.#t.getItemParsed(k,!0)??"relative");#n=a(this.#t.getItemParsed(B,!0)??"id");orderByOptions=a(y);orderBy=this.#n.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#s.asReadonly();startingBackup=this.#l.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#e.asReadonly();addDraftBackup(e){let t=d();return this.#e.set([...this.#e(),{id:t,data:e}]),t}setOrderBy(e){this.#t.setItemParsed(B,e,!0),this.#n.set(e),this.getBackups(!0)}setTimeType(e){this.#t.setItemParsed(k,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#e.set(this.#e().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){let t=this.#u,r=Date.now(),h=t&&r-t<15*60*1e3;t&&r-t<100||!e&&h&&this.#a().length||(this.#u=r,this.#s.set(!0),this.#i.getApiV1Backups({orderBy:this.#n()}).pipe(i(1),n(b=>this.#a.set(b)),s(()=>this.#s.set(!1))).subscribe())}startBackup(e){this.#l.set(e),this.#i.postApiV1BackupByIdStart({id:e}).pipe(i(1),n(()=>this.getBackups(!0)),s(()=>this.#l.set(null))).subscribe()}deleteBackup(e){this.#r.set(e),this.#i.deleteApiV1BackupById({id:e}).pipe(i(1),s(()=>this.#r.set(null))).subscribe({next:()=>this.getBackups(!0)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{m as a};
package/chunk-Y3DJVXL2.js DELETED
@@ -1 +0,0 @@
1
- import{b as a,c as b,d as c}from"./chunk-IQFSWP4W.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-YKOEKIFQ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
package/chunk-YYC22I2K.js DELETED
@@ -1 +0,0 @@
1
- import{a as x}from"./chunk-HTX2RSBS.js";import{a as Q}from"./chunk-3AIKVVWP.js";import{b as U,d as H}from"./chunk-5LKXKKAK.js";import{b as K,c as j,e as W,g as q,p as Y}from"./chunk-AL5KGNEF.js";import{h as J}from"./chunk-FRSQ5NDX.js";import{Bb as v,Cb as L,Db as r,Eb as c,Fb as g,Gb as y,Hb as R,Jb as f,Pb as D,Pc as B,Qb as V,Ra as M,Rb as p,Ua as a,Vb as C,Wb as s,Z as d,ea as T,fa as I,gb as S,jc as F,kc as h,lb as A,lc as z,rc as G,sa as O,sc as X,tc as u,ub as m,yb as b,zb as _}from"./chunk-AHUC7M75.js";function it(n,e){if(n&1&&F(0),n&2){s();let t=u(0);z(" ",t.Message," ")}}function nt(n,e){if(n&1&&(r(0,"div"),D(1,1),g(2,"a",15),V(),c()),n&2){s();let t=u(0);a(2),m("href",t.DownloadLink,M)}}function ot(n,e){if(n&1){let t=f();r(0,"button",14),C("click",function(){T(t);let i=s(),l=u(0);return I(i.doRepair(l.BackupID))}),p(1,2),c()}}function at(n,e){if(n&1){let t=f();r(0,"button",14),C("click",function(){T(t);let i=s(),l=u(0);return I(i.doDownloadBugreport(l))}),p(1,3),c()}}function rt(n,e){if(n&1&&g(0,"spk-progress-bar",17),n&2){let t,o=s(2);m("value",(t=o.serverState())==null?null:t.UpdateDownloadProgress)}}function lt(n,e){if(n&1){let t=f();r(0,"div",13),y(1),p(2,4),R(),r(3,"a",16),F(4),c(),A(5,rt,1,1,"spk-progress-bar",17),r(6,"button",14),C("click",function(){T(t);let i=s();return I(i.doShowUpdate())}),p(7,5),c()()}if(n&2){let t,o,i=s(),l=u(0);a(3),m("href",(t=i.serverState())==null?null:t.UpdateDownloadLink,M),a(),h(l.Message),a(),_(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function ct(n,e){if(n&1){let t=f();r(0,"button",14),C("click",function(){T(t);let i=s(),l=u(0);return I(i.doShowLog(l.BackupID))}),p(1,6),c()}}function st(n,e){if(n&1){let t=f();r(0,"button",14),C("click",function(){T(t);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),p(1,7),c()}}function _t(n,e){if(n&1){let t=f();r(0,"button",14),C("click",function(){T(t);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),p(1,8),c()}}var dt={Error:"error",Warning:"warn",Information:"primary"},E=class n{#t=d(H);#o=d(U);#a=d(W);#e=d(j);#i=d(x);#n=d(J);serverState=this.#i.serverState;index=O.required();notification=O.required();deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(e){return e&&dt[e]||"primary"}doShowLog(e){this.#n.getApiV1BackupByIdIsactive({id:e}).subscribe({next:t=>{this.#t.navigate(["/backup/"+e+"/log"])},error:t=>{if(t.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(e)+""!=e&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#a.open(Q,{maxWidth:"550px",width:"100%",data:o})}else this.#e.error($localize`Failed to find backup: `+t.message)}})}doRepair(e){this.#n.postApiV1BackupByIdRepair({id:e}).subscribe({next:()=>{this.#e.success($localize`Backup repaired`),this.#t.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#o})},error:t=>{this.#e.error($localize`Failed to repair backup: `+t.message)}})}doShowUpdate(){this.#t.navigate(["/about/changelog"])}doShowLink(e){window.open(e,"_blank")}doDownloadBugreport(e){let t=e.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:`bugreport/${t}`}).subscribe({next:o=>{if(!o.Token){this.#e.error("Failed to get bug report URL: No token generated");return}e.DownloadLink=o.Token},error:o=>{this.#e.error(`Failed to get bug report URL: ${o.message}`)}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=S({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let e;e=$localize`Dismiss`;let t;t=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let l;l=$localize`New update found:`;let k;k=$localize`Show Update`;let P;P=$localize`Show Log`;let w;w=$localize` Show Help `;let $;return $=$localize` Show Help `,[e,t,o,i,l,k,P,w,$,["sparkle-alert-title",""],["sparkle-alert-content","",1,"content"],[1,"actions"],["spk-button","",1,"small","outlined"],[1,"message"],["spk-button","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(t,o){if(t&1){let i=f();G(0),r(1,"spk-alert")(2,"div",9),F(3),c(),r(4,"div",10),A(5,it,1,1)(6,nt,3,1,"div"),r(7,"div",11),A(8,ot,2,0,"button",12)(9,at,2,0,"button",12)(10,lt,8,3,"div",13)(11,ct,2,0,"button",12)(12,st,2,0,"button",12)(13,_t,2,0,"button",12),r(14,"button",14),C("click",function(){return T(i),I(o.deleteNotificationByIndex())}),p(15,0),c()()()()}if(t&2){let i=X(o.notification());a(),b(o.getAlertType(i.Type)),a(2),h(i.Title),a(2),_(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),a(),_(i!=null&&i.DownloadLink?6:-1),a(2),_(i.Message!=null&&i.Message.includes("please run repair")?8:-1),a(),_(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!i.DownloadLink?9:-1),a(),_(i.Action==="update:new"?10:-1),a(),_(i.Action==="backup:show-log"?11:-1),a(),_(i.Action==="config:issue:unencrypted-database"?12:-1),a(),_(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,q,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pt=(n,e)=>e.ID;function Nt(n,e){if(n&1&&g(0,"app-notification",0),n&2){let t=e.$implicit,o=e.$index;m("index",o)("notification",t)}}var Z=class n{#t=d(x);notificationFilterPredicate=O();notifications=B(()=>{let e=this.notificationFilterPredicate()?.predicate,t=this.#t.notifications();return typeof e!="function"?t:t.filter(e)});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=S({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:2,vars:0,consts:[[3,"index","notification"]],template:function(t,o){t&1&&v(0,Nt,1,2,"app-notification",0,pt),t&2&&L(o.notifications())},dependencies:[E],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}"],changeDetection:0})};export{E as a,Z as b};
package/chunk-Z45ZPMZS.js DELETED
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-Q6M5VRZV.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
package/chunk-ZHMYBX5F.js DELETED
@@ -1 +0,0 @@
1
- import{c as a,d as b}from"./chunk-Q6M5VRZV.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
package/main-AYZBQHF7.js DELETED
@@ -1 +0,0 @@
1
- import{b as ye,c as be}from"./chunk-OEIF7NQ5.js";import{a as L}from"./chunk-WZRSQ7XL.js";import{a as ue}from"./chunk-HTX2RSBS.js";import{a as I}from"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import"./chunk-WFM6YWRN.js";import"./chunk-3AIKVVWP.js";import{a as x}from"./chunk-RHW5QVAY.js";import{a as me}from"./chunk-RSZISHXB.js";import{a as v,b as de,c as E}from"./chunk-ZQSBINUM.js";import{a as C}from"./chunk-3XVU2YA6.js";import{c as se,d as ie,g as ae,h as pe}from"./chunk-5LKXKKAK.js";import{a as re}from"./chunk-HFNFJ7G2.js";import{c as ce}from"./chunk-AL5KGNEF.js";import{a as Z,b as ee,d as te,e as oe,f as ne,i as le}from"./chunk-FRSQ5NDX.js";import{a as fe}from"./chunk-RHII5WE3.js";import{pa as Q,ua as Y}from"./chunk-M3WT5B3C.js";import{a as ge}from"./chunk-2P3DXYGR.js";import{b as he}from"./chunk-TCDECRYI.js";import{A as N,B as F,F as w,Fb as _,Fc as z,Gc as q,L as G,N as T,P as J,Qc as X,T as k,W as B,Z as s,f as W,gb as K,i as j,ka as $,n as D,o as U,r as R,va as d}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";var M=class t{#o=s(C);#s=s(v);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=K({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&_(0,"router-outlet")},dependencies:[se],encapsulation:2})};var ve={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new B("ENVIRONMENT");var A=class t{#o=s(le);isLoaded=d(!1);webmodules=d(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ie=()=>{let t=s(E);return t.token()?!0:t.checkProxyAuthed().pipe(T(e=>e?D(!0):t.refreshToken().pipe(R(()=>!0))))},Me=()=>{let t=s(v),e=s(I),o=s($),n=t.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return t.configLoaded===null?N(i).pipe(R(()=>n)):t.configLoaded?.pipe(T(()=>N(i)))},Se=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-UXUVYBYP.js")},{path:"logout",loadComponent:()=>import("./chunk-UABJ67OY.js")},{path:"",canActivate:[Ie],children:[{path:"",canActivate:[Me],loadComponent:()=>import("./chunk-LWC5O2JV.js"),children:[{path:"",loadComponent:()=>import("./chunk-VYJFDVMS.js")},{path:"add-backup",loadComponent:()=>import("./chunk-BAX2AJJJ.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-K5C3JCVH.js")},{path:"backup/import",loadComponent:()=>import("./chunk-4YUBZYBH.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-Q2WRB27A.js"),loadChildren:()=>import("./chunk-AZ2DJOXS.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-Q2WRB27A.js"),loadChildren:()=>import("./chunk-AZ2DJOXS.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-DX6BDDDV.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-YY3JAYQZ.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-NUC2S6S3.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-CPTR6AJI.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-3KUVV3SB.js")},{path:"from-config",loadComponent:()=>import("./chunk-AACJQG7X.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-FAY3FX6V.js"),loadChildren:()=>import("./chunk-UDYPOSWB.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-FAY3FX6V.js"),loadChildren:()=>import("./chunk-UDYPOSWB.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-FAY3FX6V.js"),loadChildren:()=>import("./chunk-UDYPOSWB.js")},{path:"settings",loadComponent:()=>import("./chunk-EXY7CUIT.js")},{path:"about",loadComponent:()=>import("./chunk-NPZU4SBS.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-6KSS7VQS.js")},{path:"changelog",loadComponent:()=>import("./chunk-2SQBD7LN.js")},{path:"libraries",loadComponent:()=>import("./chunk-2GE6FFGI.js")},{path:"system-info",loadComponent:()=>import("./chunk-ELZWH543.js")},{path:"server-settings",loadComponent:()=>import("./chunk-WU3ALGNP.js")},{path:"logs",loadChildren:()=>import("./chunk-QVNFX6ZC.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-SSJ4VQB4.js")}]}]}]}]}];var P=null,Re=(t,e)=>{let o=s(E),n=s(ie),i=s(C),l=s(h),r=i.getItem("locale"),u=s(ce),a=ye(r),p=t.url==="/api/v1/auth/login",m=t.url==="/api/v1/auth/refresh",S=t.url==="/api/v1/progressstate",g=t.url==="/api/v1/remoteoperation/test",y=t.url.startsWith("/api/v2/"),b=o.token(),H=t,V=t.headers.has("custom-proxy-check")||b===de;if(b&&t.url.startsWith(l.baseUrl)&&!V){let c=t.headers.set("Authorization",`Bearer ${b}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),H=t.clone({headers:c})}return e(H).pipe(R(c=>{if(c.type===4&&c.status===200&&y){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},body:f}}return c}),F(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!V&&(S&&c.status===404||g||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(P??=o.refreshToken().pipe(G()),P.pipe(T(()=>e(t.clone({headers:t.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>P=null))):U(()=>({error:c,message:f}))}))};var Ae="1.0.0",Te=`portal-proxy-client-${x()}`,Oe=1,O=class t{#o=1e3;#s=s(h);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=X(()=>{let e=this.#i(),o=this.#l(),n=this.#a();if(!n||!e||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(e){let o=Uint8Array.from(atob(e),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(e,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(e),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:e,publicKey:"",clientVersion:Ae,protocolVersion:Oe},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(e,o,n){let i={from:Te,to:e.from,type:o,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(e,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((a,p)=>{let m=x(),g={from:Te,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let b=this.#r[m];b&&(delete this.#r[m],b.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(e){this.#e?.send(JSON.stringify(e))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ne(t){if(typeof t!="string")return null;let o=new TextEncoder().encode(t);return window.btoa(String.fromCharCode(...o))}function we(t,e,o){let n=t.relayconfigState.config();if(n===null)return o(e);let i=Ne(e.body),l={};e.headers.keys().forEach(p=>{l[p]=e.headers.get(p)??""});let r=e.headers.get("timeout"),u=r!==null?parseInt(r):t.defaultTimeout;e.url.startsWith("/api/v1/serverstate")&&e.url.includes("longpoll=true")&&(u=1e3*99);let a=t.relayWebsocket.sendCommand(n.accessToken,n.clientId,e.method,e.url,i,l,u);return new W(p=>{a.then(m=>{let S=new Z;l!=null&&Object.keys(l).forEach(y=>{S.set(y,l[y])});let g=new ee({body:m.body,status:m.code,statusText:"OK",headers:S});p.next(g),p.complete()})})}var ke=(t,e)=>{let o={relayconfigState:s(v),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new j;return o.relayconfigState.configLoaded.subscribe(l=>{l&&we(o,t,e).subscribe(i)}),i}return we(o,t,e)};var Ee={providers:[z(),ae(Se,pe()),te(ne(),oe([ke,Re])),C,{provide:h,useValue:ve},{provide:q,useValue:be()},ue,I,he,Y,me,Q,fe,ge]};re(M,Ee);