@duplicati/ngclient 0.0.176 → 0.0.178

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 (54) hide show
  1. package/chunk-27UON6YV.js +2 -0
  2. package/{chunk-YDYZVJL7.js → chunk-5HQJVUNE.js} +1 -1
  3. package/{chunk-HIGBOVIL.js → chunk-5MXXIFJM.js} +1 -1
  4. package/chunk-5UXRNNTT.js +1 -0
  5. package/{chunk-AARZFLQF.js → chunk-6O5DBV6Y.js} +1 -1
  6. package/{chunk-IEJFUREF.js → chunk-7IQ5FSGI.js} +1 -1
  7. package/chunk-AJMSZFGR.js +1 -0
  8. package/{chunk-572ZKCWP.js → chunk-EBKB4YCL.js} +1 -1
  9. package/chunk-F3RWB4I6.js +1 -0
  10. package/chunk-G4FG3YUE.js +1 -0
  11. package/{chunk-QZHZ63E4.js → chunk-H6UYYWCU.js} +1 -1
  12. package/chunk-J5LEAYPL.js +1 -0
  13. package/{chunk-OYAOXZG6.js → chunk-JTQDY6AH.js} +1 -1
  14. package/chunk-JTZ2JEV4.js +1 -0
  15. package/{chunk-PD4KFJ3B.js → chunk-KR56GPXG.js} +1 -1
  16. package/{chunk-CQHV3YBT.js → chunk-M7SLT3MF.js} +1 -1
  17. package/{chunk-QUNTZXIA.js → chunk-N4ADMNNU.js} +1 -1
  18. package/{chunk-UAHCA2OX.js → chunk-NEQW3H7F.js} +1 -1
  19. package/chunk-OC3JR7EH.js +2 -0
  20. package/{chunk-ZY7F7R4C.js → chunk-PCLJOXMF.js} +1 -1
  21. package/{chunk-72QKZIRA.js → chunk-PJLZ7V22.js} +1 -1
  22. package/{chunk-MDPEVWF6.js → chunk-PNECF7JS.js} +1 -1
  23. package/{chunk-OZYS4BIC.js → chunk-PUOOECEB.js} +1 -1
  24. package/chunk-PW55LN2T.js +1 -0
  25. package/{chunk-MMOME6E7.js → chunk-QZJ7QZZ4.js} +1 -1
  26. package/{chunk-UVLPXF5A.js → chunk-R6XDJFPE.js} +1 -1
  27. package/chunk-TXPM764C.js +1 -0
  28. package/{chunk-SNHYMIA2.js → chunk-U4T4BSPF.js} +1 -1
  29. package/chunk-WHLIHNEE.js +1 -0
  30. package/{chunk-AVM5IYXU.js → chunk-WNOXOC4X.js} +1 -1
  31. package/{chunk-W3MVYBQK.js → chunk-WS7QWRRY.js} +1 -1
  32. package/chunk-WWIKIIGV.js +7 -0
  33. package/chunk-WWIXPGSZ.js +1 -0
  34. package/chunk-XRXXVFJ4.js +1 -0
  35. package/{chunk-QBRRL3NE.js → chunk-XZZDJCRM.js} +1 -1
  36. package/chunk-YQSTMC2K.js +1 -0
  37. package/index.html +1 -1
  38. package/{main-D327D2YQ.js → main-OOXK65IC.js} +1 -1
  39. package/package.json +1 -1
  40. package/chunk-2AXRVJXN.js +0 -1
  41. package/chunk-4LHT2BIC.js +0 -1
  42. package/chunk-7Z3BXDXF.js +0 -1
  43. package/chunk-A5BWJRDE.js +0 -1
  44. package/chunk-JQI6VBST.js +0 -1
  45. package/chunk-KK7TLGME.js +0 -2
  46. package/chunk-MFGT2RTI.js +0 -1
  47. package/chunk-NNEWZCWG.js +0 -1
  48. package/chunk-NXRFZLMT.js +0 -2
  49. package/chunk-NZE46NN5.js +0 -1
  50. package/chunk-P7PYTH77.js +0 -7
  51. package/chunk-RHSRAHP5.js +0 -1
  52. package/chunk-TZ6RGGOS.js +0 -1
  53. package/chunk-WLZPN7LT.js +0 -1
  54. package/chunk-ZHZO6RKF.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as Xe}from"./chunk-XRXXVFJ4.js";import{a as ee}from"./chunk-D7TCA6E7.js";import"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as Ke}from"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import{b as Je,c as ce}from"./chunk-FBWFZMGL.js";import{B as se,E as Be,G as be,L as Fe,U as ke,V as Ue,u as H}from"./chunk-RYXU2QDS.js";import{b as de}from"./chunk-BKANUILG.js";import{b as ye,e as xe}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import{la as V,oa as re}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as D,Ab as i,Bb as s,Cc as u,Dc as L,Ec as S,Fb as G,Fc as h,Gb as P,Ib as U,Mc as ve,Pa as a,Pb as N,Qb as m,Rb as l,Rc as le,Sb as d,Tb as c,Ub as R,Vb as I,W as x,Xb as C,aa as M,cb as X,gc as $,jc as E,kc as K,la as A,lc as f,mc as Ie,nc as $e,p as J,rc as fe,sb as g,sc as he,tb as T,tc as w,ub as B,wb as b,xb as k,yb as z,zb as o}from"./chunk-XYHHESIX.js";import{a as _e}from"./chunk-7CGTOI24.js";function Ve(n,t){n&1&&s(0,"sh-progress-bar",32)}function He(n,t){n&1&&s(0,"div",35)}function je(n,t){n&1&&s(0,"div",35)}function We(n,t){n&1&&s(0,"div",36)}function qe(n,t){n&1&&s(0,"div",37)}function Qe(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,15),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48)(7,"p"),l(8,16),u(9,"date"),i(),o(10,"p"),l(11,17),u(12,"date"),i(),o(13,"p"),l(14,18),u(15,"durationFormat"),i(),o(16,"p"),l(17,19),i(),s(18,"sh-divider"),o(19,"p"),l(20,20),i(),o(21,"p"),l(22,21),i()()(),o(23,"details",46)(24,"summary"),N(25,22),s(26,"sh-icon"),o(27,"div",47),s(28,"sh-icon",40),i(),m(),i(),o(29,"div",48)(30,"p"),l(31,23),u(32,"date"),i(),o(33,"p"),l(34,24),u(35,"date"),i(),o(36,"p"),l(37,25),u(38,"durationFormat"),i(),s(39,"sh-divider"),o(40,"p"),l(41,26),u(42,"bytes"),i(),o(43,"p"),l(44,27),u(45,"bytes"),i(),o(46,"p"),l(47,28),u(48,"bytes"),i(),s(49,"sh-divider"),o(50,"p"),l(51,29),i(),o(52,"p"),l(53,30),i()()()),n&2){let e=C(2).$implicit;a(9),d(S(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),c(8),a(3),d(S(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),c(11),a(3),d(L(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),c(14),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),c(17),a(3),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),c(20),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),c(22),a(10),d(S(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),c(31),a(3),d(S(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),c(34),a(3),d(L(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),c(37),a(4),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(h(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),c(41),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(h(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),c(44),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(h(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),c(47),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),c(51),a(2),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),c(53)}}function Ye(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function Ze(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,31),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48),b(7,Ye,3,3,"code",null,B),i()()),n&2){let e=C(2).$implicit;a(5),d(e.data.VerificationsActualLength),c(2),a(2),k(e.data.Verifications)}}function en(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function nn(n,t){n&1&&(o(0,"p"),E(1,"No errors"),i())}function tn(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function on(n,t){if(n&1&&(o(0,"section",41)(1,"sh-toggle-card",42),G(2,43),o(3,"h3"),l(4,0),i(),P(),G(5,44),o(6,"p"),l(7,1),u(8,"date"),i(),o(9,"p"),l(10,2),u(11,"date"),i(),o(12,"p"),l(13,3),u(14,"durationFormat"),i(),P(),i(),o(15,"sh-toggle-card",42),G(16,43),o(17,"h3"),l(18,4),i(),P(),G(19,44),o(20,"p"),l(21,5),u(22,"bytes"),i(),o(23,"p"),l(24,6),u(25,"bytes"),i(),o(26,"p"),l(27,7),u(28,"bytes"),i(),o(29,"p"),l(30,8),u(31,"bytes"),i(),o(32,"p"),l(33,9),i(),o(34,"p"),l(35,10),i(),o(36,"p"),l(37,11),i(),P(),i(),o(38,"div",45),s(39,"sh-divider"),g(40,Qe,54,45),g(41,Ze,9,1,"details",46),o(42,"details",46)(43,"summary"),N(44,12),s(45,"sh-icon"),o(46,"div",47),s(47,"sh-icon",40),i(),m(),i(),o(48,"div",48),b(49,en,3,3,"code",null,B),i()(),o(51,"details",46)(52,"summary"),N(53,13),s(54,"sh-icon"),o(55,"div",47),s(56,"sh-icon",40),i(),m(),i(),o(57,"div",48),g(58,nn,2,0,"p"),b(59,tn,3,3,"code",null,B),i()(),s(61,"sh-divider"),o(62,"details")(63,"summary"),N(64,14),s(65,"sh-icon"),o(66,"div",47),s(67,"sh-icon",40),i(),m(),i(),o(68,"code")(69,"button",49),E(70,"Copy"),i(),E(71),u(72,"json"),i()()()()),n&2){let e=C().$implicit;a(),z("disallowToggle",!0),a(7),d(S(8,22,e.data==null?null:e.data.BeginTime,"medium")),c(7),a(3),d(S(11,25,e.data==null?null:e.data.EndTime,"medium")),c(10),a(3),d(L(14,28,e.data==null?null:e.data.Duration)),c(13),a(),z("disallowToggle",!0),a(7),d(e.data==null?null:e.data.ExaminedFiles)(h(22,30,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),c(21),a(3),d(e.data==null?null:e.data.OpenedFiles)(h(25,34,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),c(24),a(3),d(e.data==null?null:e.data.AddedFiles)(h(28,38,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),c(27),a(3),d(e.data==null?null:e.data.ModifiedFiles)(h(31,42,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),c(30),a(2),d(e.data==null?null:e.data.DeletedFiles),c(33),a(2),d(e.data==null?null:e.data.TooLargeFiles),c(35),a(2),d(e.data==null?null:e.data.FilesWithError),c(37),a(3),T(e.data!=null&&e.data.TestResults?40:-1),a(),T((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),a(6),d(e.data==null?null:e.data.WarningsActualLength),c(44),a(2),k(e.data==null?null:e.data.Warnings),a(7),d(e.data==null?null:e.data.ErrorsActualLength),c(53),a(2),T((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),a(),k(e.data==null?null:e.data.Errors),a(12),f(" ",L(72,46,e.data)," ")}}function an(n,t){if(n&1){let e=U();o(0,"article",33)(1,"header",34),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),g(2,He,1,0,"div",35)(3,je,1,0,"div",35)(4,We,1,0,"div",36)(5,qe,1,0,"div",37),o(6,"h3"),E(7),u(8,"date"),i(),o(9,"p"),E(10),i(),s(11,"div",38),o(12,"div",39)(13,"sh-icon",40),E(14,"caret-down"),i()()(),g(15,on,73,48,"section",41),i()}if(n&2){let e=t.$implicit,_=C(),r=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),T(r=="Fatal"?2:r=="Error"?3:r=="Warning"?4:5),a(5),K(S(8,7,e.timestamp,"medium")),a(3),Ie(" ",e.data==null?null:e.data.MainOperation," ",_.getLocalizedSummary(e)," "),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?15:-1)}}var ue=class n{#e=x(de);#n=new Z;#t=new ee;backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(J(e=>e.map(_=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,type:_.Type,data:JSON.parse(_.Message),exception:JSON.stringify(_.Exception)==="{}"?null:_.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,_=t.data?.WarningsActualLength??0,r=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let p=this.#t.transform(t.data?.Duration,!0);p.startsWith("0h ")&&(p=p.slice(3)),p.startsWith("0m ")&&(p=p.slice(3)),r.push($localize`took ${p}`)}t.data?.BackendStatistics?.BytesUploaded&&r.push($localize`uploaded ${this.#n.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&r.push($localize`backup size ${this.#n.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&r.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),_!==0&&r.push($localize`:@@warningCount:${_} warning${_===1?"":"s"}`),r.length===0?"":`(${r.join(", ")})`}toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _;_=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize`Source files`;let v;v=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let y;y=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let q;q=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Y;Y=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=R(O);let ne;ne=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,ne=R(ne);let te;te=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,te=R(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=R(ie);let Ce;Ce=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=R(oe);let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ge;Ge=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Re;Re=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let De;De=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;return ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=R(ae),[t,e,_,r,p,v,y,j,W,q,Q,Y,O,ne,te,ie,Ce,ge,Te,Oe,Le,Ne,oe,me,Se,Ge,Pe,Ae,Re,De,Me,ae,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["shButton","",1,"small"]]},template:function(e,_){e&1&&(g(0,Ve,1,0,"sh-progress-bar",32),b(1,an,16,10,"article",33,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Ue,be,Fe,se,H,Z,V,ee,re],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}"],changeDetection:0})};function _n(n,t){n&1&&s(0,"sh-progress-bar",1)}function ln(n,t){n&1&&(N(0,0,1),s(1,"sh-icon"),m())}function rn(n,t){n&1&&(N(0,0,2),s(1,"sh-icon"),m())}function sn(n,t){if(n&1){let e=U();o(0,"section",6)(1,"button",7),I("click",function(){D(e);let r=C(),p=r.$implicit,v=r.$index,y=C();return M(y.copyToClipboard(p.data,v))}),N(2,0),g(3,ln,2,0)(4,rn,2,0),m(),i(),o(5,"code"),E(6),u(7,"json"),i()()}if(n&2){let e=C(),_=e.$implicit,r=e.$index,p=C();a(),$("success",p.copiedFromIndex()===r),a(2),T(p.copiedFromIndex()===r?3:4),a(3),K(L(7,4,_.data))}}function Fn(n,t){if(n&1){let e=U();o(0,"article",2)(1,"header",3),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),o(2,"h3"),E(3),u(4,"date"),i(),o(5,"div",4)(6,"sh-icon",5),E(7,"caret-down"),i()()(),g(8,sn,8,6,"section",6),i()}if(n&2){let e=t.$implicit,_=C();a(3),$e("",S(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?8:-1)}}var pe=class n{#e=x(de);backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});copiedFromIndex=A(null);resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(J(e=>e.map((_,r)=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,operation:_.Operation,path:_.Path,data:typeof _.Data=="string"?JSON.parse(_.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let _=JSON.stringify(t,null,2);navigator.clipboard.writeText(_),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=R(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,_){e&1&&(g(0,_n,1,0,"sh-progress-bar",1),b(1,Fn,9,9,"article",2,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Fe,H,re,V],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function dn(n,t){if(n&1&&(E(0," - "),G(1),l(2,6),P(),E(3),u(4,"durationFormat")),n&2){C(2);let e=w(6);a(3),f(" ",L(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function cn(n,t){n&1&&(G(0),l(1,7),P())}function un(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,t){n&1&&(G(0),l(1,8),P())}function En(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Cn(n,t){n&1&&(G(0),l(1,9),P())}function gn(n,t){if(n&1&&(o(0,"sh-chip",19),l(1,10),i()),n&2){C(2);let e=w(6);a(),d(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),c(1)}}function Tn(n,t){n&1&&(o(0,"sh-chip",20),l(1,11),i())}function On(n,t){if(n&1&&(o(0,"div",14)(1,"div",18)(2,"h3"),E(3),o(4,"sh-icon"),E(5,"database"),i()(),o(6,"p")(7,"span"),l(8,3),i(),E(9),u(10,"date"),g(11,dn,5,3)(12,cn,2,0,"ng-container"),i(),o(13,"p")(14,"span"),l(15,4),i(),g(16,un,2,3)(17,pn,2,0,"ng-container"),i(),o(18,"p")(19,"span"),l(20,5),i(),g(21,En,2,3)(22,Cn,2,0,"ng-container"),i()(),g(23,gn,2,1,"sh-chip",19)(24,Tn,2,0,"sh-chip",20),i()),n&2){let e=C(),_=w(6);a(3),f(" ",_.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),f(" ",S(10,6,_.Backup.Metadata==null?null:_.Backup.Metadata.LastBackupDate,"short")," "),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.LastBackupDuration?11:12),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.SourceFilesSize?16:17),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.TargetFilesSize?21:22),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.BackupListCount?23:24)}}function Ln(n,t){if(n&1&&s(0,"app-general-log",17),n&2){let e=C();z("backupId",e.backupId())}}function Nn(n,t){if(n&1&&s(0,"app-remote-log",17),n&2){let e=C();z("backupId",e.backupId())}}var Ee=class n{#e=x(ye);#n=x(Ke);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=A("general");backupId=Je(this.#e.params.pipe(J(t=>t.id)));backup=ve(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`General`;let _;_=$localize` Destination `;let r;r=$localize`Last successful backup:`;let p;p=$localize`Source:`;let v;v=$localize`Destination:`;let y;y=$localize`took`;let j;j=$localize`N/A`;let W;W=$localize`N/A`;let q;q=$localize`N/A`;let Q;Q=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Y;return Y=$localize`No version yet`,[t,e,_,r,p,v,y,j,W,q,Q,Y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,_){if(e&1){let r=U();s(0,"app-status-bar"),o(1,"section")(2,"div",12)(3,"button",13),N(4,0),s(5,"sh-icon"),m(),i()(),fe(6),g(7,On,25,9,"div",14),o(8,"sh-tabs",15)(9,"button",16),I("click",function(){return D(r),M(_.activeTab.set("general"))}),l(10,1),i(),o(11,"button",16),I("click",function(){return D(r),M(_.activeTab.set("destination"))}),l(12,2),i()(),g(13,Ln,1,1,"app-general-log",17),g(14,Nn,1,1,"app-remote-log",17),i()}if(e&2){a(6);let r=he(_.backup());a(),T(r?7:-1),a(2),$("active",_.activeTab()==="general"),a(2),$("active",_.activeTab()==="destination"),a(2),T(_.activeTab()==="general"?13:-1),a(),T(_.activeTab()==="destination"?14:-1)}},dependencies:[ke,ue,pe,xe,Xe,H,se,Be,Z,ee,V],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-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%] sh-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)}"],changeDetection:0})};export{Ee as default};
@@ -1 +1 @@
1
- import{h as a,i as b}from"./chunk-IEJFUREF.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-6Q6SSTBK.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-7Z3BXDXF.js";import"./chunk-FBWFZMGL.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
1
+ import{h as a,i as b}from"./chunk-7IQ5FSGI.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-6Q6SSTBK.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
@@ -0,0 +1 @@
1
+ import{a as ne,f as _n}from"./chunk-27UON6YV.js";import{a as an}from"./chunk-XRXXVFJ4.js";import{a as on}from"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as tn}from"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import{a as nn}from"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{A as Ue,B as ee,C as Ke,E as je,G as We,K as qe,L as Qe,S as Ye,T as Ze,u as Z}from"./chunk-RYXU2QDS.js";import{b as en}from"./chunk-BKANUILG.js";import{e as Y}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as I,Ab as t,Bb as T,Cc as M,Dc as G,E as j,Ec as A,Fb as O,Gb as m,Gc as Q,Hb as f,Ib as H,Ma as W,Pa as a,Pb as c,Qb as s,Rb as C,Sb as h,Tb as L,Ub as q,Vb as $,W as v,Xb as r,aa as P,cb as be,ec as V,gc as R,hb as N,ib as ve,jc as u,la as X,lc as S,na as Be,oc as we,pb as Xe,pc as ze,qb as Je,qc as Ve,sb as g,tb as p,ub as J,wb as w,xb as z,xc as U,yb as E,yc as D,zb as o}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var rn=()=>[Y,import("./chunk-3CJTIOP4.js").then(e=>e.NgTemplateOutlet),ee,Z,je,Ze,Ye,import("./chunk-PF2QQ2YW.js").then(e=>e.DurationFormatPipe),import("./chunk-AYN5EDSZ.js").then(e=>e.BytesPipe),import("./chunk-BUO6CCKF.js").then(e=>e.RelativeTimePipe)],cn=()=>["/add-backup"],sn=()=>["/restore"],ln=e=>({$implicit:e}),un=()=>["/backup/new"],Fn=e=>["/backup",e],Cn=e=>["/restore",e],Tn=e=>["/backup",e,"export"],En=e=>["/backup",e,"delete"],dn=e=>["/backup",e,"database"],gn=e=>["/backup",e,"commandline"],pn=e=>["/backup",e,"log"];function Sn(e,i){e&1&&C(0,11,1)}function On(e,i){e&1&&C(0,11,2)}function mn(e,i){if(e&1&&C(0,11,3),e&2){let n=r(2);h(n.timeType()),L(0)}}function Nn(e,i){if(e&1){let n=H();o(0,"button",54),$("click",function(){let F=I(n).$implicit,d=r(3);return P(d.sortByColumn.set(F.value))}),C(1,15),t()}if(e&2){let n=i.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),h(n.label),L(1)}}function Mn(e,i){if(e&1&&(o(0,"sh-menu",55)(1,"button",56),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,57),w(6,Nn,2,3,"button",58,J),m(),t()),e&2){let n=r(2);a(4),h(n.orderBy()),L(2),a(2),z(n.sortOrderOptions())}}function In(e,i){if(e&1){let n=H();o(0,"div",52)(1,"sh-button-group",53)(2,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("list"))}),c(3,9),T(4,"sh-icon"),s(),t(),o(5,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("details"))}),c(6,10),T(7,"sh-icon"),s(),t()(),o(8,"sh-menu",55)(9,"button",56),c(10,11),o(11,"strong"),g(12,Sn,1,0)(13,On,1,0)(14,mn,1,1),t(),T(15,"sh-icon"),s(),t(),O(16,57),o(17,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("relative"))}),C(18,12),t(),o(19,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("actual"))}),C(20,13),t(),m(),t(),g(21,Mn,8,1,"sh-menu",55),t()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function Pn(e,i){if(e&1&&(o(0,"p")(1,"span"),C(2,21),t(),u(3),M(4,"relativeTime"),t()),e&2){let n=r().$implicit,_=r(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function fn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Dn(e,i){e&1&&(O(0),u(1,"-"),m())}function $n(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Rn(e,i){e&1&&(O(0),u(1,"-"),m())}function An(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function hn(e,i){e&1&&(O(0),u(1,"-"),m())}function Ln(e,i){e&1&&(o(0,"sh-chip",67),C(1,22),t())}function Hn(e,i){e&1&&f(0)}function Gn(e,i){if(e&1&&(o(0,"div",63)(1,"div",48)(2,"h3"),u(3),o(4,"sh-chip"),T(5,"img",64),u(6),t()(),o(7,"p")(8,"span"),C(9,16),t(),u(10),M(11,"relativeTime"),t(),g(12,Pn,5,4,"p"),o(13,"p")(14,"span"),C(15,17),t(),g(16,fn,2,4)(17,Dn,2,0,"ng-container"),t(),o(18,"p")(19,"span"),C(20,18),t(),g(21,$n,2,3)(22,Rn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),C(25,19),t(),g(26,An,2,3)(27,hn,2,0,"ng-container"),t()(),o(28,"div",65)(29,"sh-chip",66),C(30,20),t(),g(31,Ln,2,0,"sh-chip",67),t(),o(32,"div",52),N(33,Hn,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(4),F=V(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),W),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",A(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,ln,n))}}function xn(e,i){if(e&1&&w(0,Gn,34,18,"div",63,J),e&2){let n=r(3);z(n.backups())}}function kn(e,i){e&1&&(o(0,"div",62),c(1,23),o(2,"button",69),T(3,"sh-icon"),t(),s(),t()),e&2&&(a(2),E("routerLink",U(1,un)))}function yn(e,i){if(e&1&&(o(0,"div",61),g(1,xn,2,0)(2,kn,4,2,"div",62),t()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function Bn(e,i){e&1&&(c(0,24,1),f(1),s())}function bn(e,i){e&1&&(c(0,25,1),f(1),s())}function vn(e,i){e&1&&(c(0,26,1),f(1),s())}function Xn(e,i){e&1&&(c(0,27,1),f(1),s())}function Jn(e,i){e&1&&(c(0,28,1),f(1),s())}function wn(e,i){e&1&&(c(0,29,1),f(1),s())}function zn(e,i){e&1&&(c(0,30,1),f(1),s())}function Vn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Un(e,i){e&1&&(O(0),u(1,"-"),m())}function Kn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function jn(e,i){e&1&&(O(0),u(1,"-"),m())}function Wn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function qn(e,i){e&1&&(O(0),u(1,"-"),m())}function Qn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Yn(e,i){e&1&&(O(0),u(1,"-"),m())}function Zn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function et(e,i){e&1&&(O(0),u(1,"-"),m())}function nt(e,i){e&1&&f(0)}function tt(e,i){if(e&1&&(o(0,"tr")(1,"td"),u(2),t(),o(3,"td")(4,"sh-chip",80),T(5,"img",64),u(6),t()(),o(7,"td"),g(8,Vn,2,4)(9,Un,2,0,"ng-container"),t(),o(10,"td"),g(11,Kn,2,4)(12,jn,2,0,"ng-container"),t(),o(13,"td"),g(14,Wn,2,4)(15,qn,2,0,"ng-container"),t(),o(16,"td"),g(17,Qn,2,3)(18,Yn,2,0,"ng-container"),t(),o(19,"td"),g(20,Zn,2,3)(21,et,2,0,"ng-container"),t(),o(22,"td")(23,"span"),C(24,33),t()(),o(25,"td"),N(26,nt,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(3),F=V(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),W),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,ln,n))}}function it(e,i){if(e&1){let n=H();o(0,"sh-table",70),Ve("sortByColumnChange",function(F){I(n);let d=r(2);return ze(d.sortByColumn,F)||(d.sortByColumn=F),P(F)}),o(1,"tr",71)(2,"th",72),c(3,24),N(4,Bn,2,0,"ng-container",73),s(),t(),o(5,"th",74),c(6,25),N(7,bn,2,0,"ng-container",73),s(),t(),o(8,"th",75),c(9,26),N(10,vn,2,0,"ng-container",73),s(),t(),o(11,"th",76),c(12,27),N(13,Xn,2,0,"ng-container",73),s(),t(),o(14,"th",77),c(15,28),N(16,Jn,2,0,"ng-container",73),s(),t(),o(17,"th",78),c(18,29),N(19,wn,2,0,"ng-container",73),s(),t(),o(20,"th",79),c(21,30),N(22,zn,2,0,"ng-container",73),s(),t(),o(23,"th"),C(24,31),t(),o(25,"th"),C(26,32),t()(),w(27,tt,27,14,"tr",null,J),t()}if(e&2){let n=r(2),_=V(35);E("data",n.backups())("loading",n.backupsLoading()),we("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),z(n.backups())}}function ot(e,i){if(e&1&&g(0,yn,3,3,"div",59)(1,it,29,10,"sh-table",60),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function _t(e,i){e&1&&(o(0,"div",81),T(1,"sh-progress-bar",82),o(2,"div",48)(3,"h3"),C(4,34),t()()())}function at(e,i){e&1&&C(0,35,1)}function lt(e,i){e&1&&(o(0,"sh-icon"),u(1,"check"),t())}function rt(e,i){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),t())}function ct(e,i){if(e&1){let n=H();o(0,"button",83),$("click",function(){let F=I(n).$implicit,d=r();return P(d.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,at,1,0),s(),t(),o(4,"button",84)(5,"sh-icon"),u(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",49),g(9,lt,2,0,"sh-icon")(10,rt,2,0,"sh-icon"),t(),O(11,57),o(12,"h3",85),u(13,"Operations"),t(),o(14,"button",86),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",86),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",86),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",85),C(25,39),t(),o(26,"button",86),c(27,40),T(28,"sh-icon"),s(),t(),o(29,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.verifyFiles(F.Backup.ID))}),c(30,41),T(31,"sh-icon"),s(),t(),o(32,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.compressBackup(F.Backup.ID))}),c(33,42),T(34,"sh-icon"),s(),t(),o(35,"button",86),c(36,43),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",85),C(40,44),t(),o(41,"button",86),c(42,45),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,Fn,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,Cn,n.Backup.ID)),a(3),E("routerLink",D(19,Tn,n.Backup.ID)),a(3),E("routerLink",D(21,En,n.Backup.ID)),a(6),E("routerLink",D(23,dn,n.Backup.ID)),a(9),E("routerLink",D(25,gn,n.Backup.ID)),a(6),E("routerLink",D(27,pn,n.Backup.ID))}}function st(e,i){e&1&&(o(0,"sh-icon",87),u(1,"funnel-simple"),t(),o(2,"sh-icon",88),u(3,"sort-ascending"),t(),o(4,"sh-icon",89),u(5,"sort-descending"),t())}var ut={file:{Display:$localize`Local`,Icon:null}},te=class e{#n=v(en);#t=v(on);#e=v(tn);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=nn("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=Be(()=>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.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return ne(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=ne(n);if(!_)return"";let F=ut[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let d="http://null?"+i.split("?")[1],x=new URL(d).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(_n))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>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(j(()=>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=be({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let K;K=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Last successful backup:`;let ce;ce=$localize`Duration:`;let se;se=$localize`Source:`;let ue;ue=$localize`Destination:`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=q(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Fe;Fe=$localize` ${B}:ICU@@6502601490918455200: `;let Ce;Ce=$localize`Next scheduled run:`;let Te;Te=$localize`Externally managed`;let Ee;Ee=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;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 ge;ge=$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 pe;pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Next run ${"\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 Oe;Oe=$localize` Duration ${"\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` Source ${"\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 Ne;Ne=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize`Version`;let Ie;Ie=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=q(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Pe;Pe=$localize` ${b}:ICU@@3521773141017690117: `;let fe;fe=$localize`Loading backups...`;let De;De=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let $e;$e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ae;Ae=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let he;he=$localize`Advanced`;let Le;Le=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let He;He=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ge;Ge=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let xe;xe=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let ke;ke=$localize`Reporting`;let ye;return ye=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,d,K,x,k,y,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,Ae,he,Le,He,Ge,xe,ke,ye,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",46),T(4,"img",47),o(5,"div",48)(6,"h3"),C(7,2),t(),o(8,"p"),C(9,3),t()(),o(10,"button",49),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",46),T(14,"img",50),o(15,"div",48)(16,"h3"),C(17,5),t(),o(18,"p"),C(19,6),t()(),o(20,"button",49),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",51)(24,"h2"),O(25),C(26,8),m(),g(27,In,22,6,"div",52),t(),ve(28,ot,2,1)(29,_t,5,0),Xe(30,28,rn,null,29),t()(),N(32,ct,44,29,"ng-template",null,0,Q)(34,st,6,0,"ng-template",null,1,Q)),n&2&&(a(3),E("routerLink",U(4,cn)),a(10),E("routerLink",U(5,sn)),a(14),p(_.backups().length>0?27:-1),a(3),Je(!_.backupsLoading()))},dependencies:[Y,an,Ke,ee,Z,We,qe,Qe,Ue],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}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-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}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.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%] sh-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)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{te as default};
@@ -0,0 +1 @@
1
+ import{a as b}from"./chunk-XRXXVFJ4.js";import"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import{b as h}from"./chunk-FBWFZMGL.js";import{B,u as R}from"./chunk-RYXU2QDS.js";import{b as A}from"./chunk-BKANUILG.js";import{b as M,e as O}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as a,Bb as _,Mc as L,Pa as i,Pb as c,Qb as d,Rb as l,Ub as p,Vb as I,W as C,cb as f,jc as E,la as r,lc as N,sb as s,tb as u,ub as S,wb as T,xb as g,zb as F}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";function $(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function k(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;N(" ",n," ")}}var D=class e{#t=C(A);#e=C(M);#n=h(this.#e.params);runId=L(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=f({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=p(o),[t,n,o,[1,"back"],["type","button","shButton","","routerLink","../",1,"small"],["type","button","shButton","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"sh-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,$,1,0),s(12,P,1,0),s(13,k,1,0),s(14,v,1,0),d(),a(),F(15,"code"),T(16,U,2,1,null,null,S),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[b,R,B,O],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import{g as he}from"./chunk-YDYZVJL7.js";import{a as Ie,b as me,c as De}from"./chunk-P7PYTH77.js";import"./chunk-PD4KFJ3B.js";import"./chunk-T5LLH46J.js";import{a as pe}from"./chunk-KK7TLGME.js";import{j as Ne}from"./chunk-IEJFUREF.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import{a as m}from"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-7Z3BXDXF.js";import"./chunk-FBWFZMGL.js";import{B as Oe,H as Ce,K as Re,c as se,e as _e,f as le,g as ce,i as Te,j as Se,s as Ee,u as Fe,w as ge,y as de,z as ue}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{b as ae,d as re}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as T,Ab as s,Bb as g,Fb as w,Gb as G,Ib as C,Mc as k,Pa as _,Pb as E,Qb as F,Rb as N,Sb as f,Sc as oe,Tb as A,Ub as q,Vb as d,W as R,Xb as l,aa as S,cb as Q,cc as Y,da as j,dc as Z,gc as ee,jc as I,kc as b,la as p,lc as te,oc as M,pc as P,qc as $,sb as u,tb as O,ub as y,wb as L,wc as ne,xb as x,xc as ie,yb as h,zb as r}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var fe=["formRef"],Ae=()=>({maxWidth:"700px",width:"100%"});function Me(n,i){if(n&1){let e=C();r(0,"button",33),d("click",function(){T(e);let t=l();return S(t.testDestination(0,!0))}),N(1,6),s()}if(n&2){let e=l();ee("loader",e.testSignal()=="testing"),h("disabled",e.testSignal()=="testing")}}function Pe(n,i){if(n&1){let e=C();r(0,"button",23),d("click",function(){T(e);let t=l();return S(t.copyTargetUrl())}),E(1,7),g(2,"sh-icon"),F(),s()}}function $e(n,i){n&1&&(r(0,"sh-alert"),E(1,8),g(2,"sh-icon",34),F(),s())}function ye(n,i){n&1&&(r(0,"sh-alert",24),E(1,9),g(2,"sh-icon",34),F(),s())}function Le(n,i){if(n&1&&(r(0,"sh-alert",25),E(1,10),g(2,"sh-icon",34),F(),s()),n&2){let e=l();_(2),f(e.testErrorMessage()),A(1)}}function xe(n,i){if(n&1&&(r(0,"sh-alert",26),E(1,11),g(2,"sh-icon",34),F(),s()),n&2){let e=l();_(2),f(e.testErrorMessage()),A(1)}}function we(n,i){if(n&1){let e=C();r(0,"p",35),d("click",function(){T(e);let t=l();return S(t.removeDestination())}),E(1,12),g(2,"strong")(3,"br")(4,"span",36),F(),s()}if(n&2){let e,o=l();_(4),f((e=o.selectedDestinationType())==null?null:e.displayName),A(1)}}function Ge(n,i){if(n&1){let e=C();r(0,"div",42),d("click",function(){let t=T(e).$implicit,a=l(2);return S(a.setDestination(t.key))}),r(1,"h3"),I(2),s(),r(3,"p"),I(4),s()()}if(n&2){let e=i.$implicit;_(2),b(e.displayName),_(2),b(e.description)}}function be(n,i){if(n&1){let e=C();r(0,"button",43,1),d("click",function(){let t=T(e).$implicit,a=l(2);return S(a.setDestination(t.key))}),I(2),s()}if(n&2){let e=i.$implicit;_(2),te(" ",e.displayName," ")}}function ke(n,i){if(n&1&&(r(0,"div",37),L(1,Ge,5,2,"div",38,y),s(),r(3,"sh-menu",39)(4,"button",40),N(5,13),s(),w(6,22),L(7,be,3,1,"button",41,y),G(),s()),n&2){let e=l();_(),x(e.destinationTypeOptionsFocused()),_(2),h("searchable",!0),_(4),x(e.destinationTypeOptions())}}function ve(n,i){if(n&1){let e=C();r(0,"app-single-destination",44),$("targetUrlChange",function(t){T(e);let a=l();return P(a.targetUrlModel,t)||(a.targetUrlModel=t),S(t)}),s()}if(n&2){let e=l();M("targetUrl",e.targetUrlModel)}}function Ue(n,i){n&1&&(E(0,5,1),g(1,"sh-icon",31),F())}function Be(n,i){n&1&&(E(0,5,2),g(1,"sh-icon"),F())}function We(n,i){if(n&1){let e=C();r(0,"sh-dialog",45),$("isOpenChange",function(t){T(e);let a=l();return P(a.targetUrlDialogOpen,t)||(a.targetUrlDialogOpen=t),S(t)}),r(1,"header",46)(2,"div",47)(3,"h2"),N(4,14),s(),r(5,"sh-alert",25),N(6,15),s()()(),r(7,"div",48)(8,"sh-form-field")(9,"textarea",49),$("ngModelChange",function(t){T(e);let a=l();return P(a.targetUrlCtrl,t)||(a.targetUrlCtrl=t),S(t)}),s()()(),r(10,"footer",50)(11,"button",29),d("click",function(){T(e);let t=l();return S(t.closeTargetUrlDialog(!1))}),I(12,"Cancel"),s(),r(13,"button",51),d("click",function(){T(e);let t=l();return S(t.closeTargetUrlDialog(!0))}),E(14,16),g(15,"sh-icon"),F(),s()()()}if(n&2){let e=l();M("isOpen",e.targetUrlDialogOpen),h("options",ie(3,Ae)),_(9),M("ngModel",e.targetUrlCtrl)}}var v=class n{#i=R(re);#o=R(ae);#t=R(ue);#a=R(Ie);injector=R(j);#e=R(he);#r=R(me);formRef=oe.required("formRef");targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#r.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let i=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return i.map(o=>e.find(t=>t.key===o))});selectedDestinationType=k(()=>{let i=this.#e.destinationTargetUrl();if(!i)return null;let e=i.split("://")[0];return pe(e)});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),o=this.targetUrlInitial();!i||e===o||!e||this.#e.updateTargetUrl(e)}testDestination(i,e,o){let t=this.#e.destinationTargetUrl();t&&(this.#e.setTestState("testing"),this.#a.testDestination(t,this.#e.backupId(),i,!0,e).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),a.containsBackup===!1?(this.#e.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),e||this.#t.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#e.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),e||this.#t.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let D=t.includes("?");a.action==="trust-cert"&&this.#e.updateTargetUrl(t+`${D?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.updateTargetUrl(t+`${D?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):o?.()}}))}setDestination(i){this.#e.updateTargetUrl(`${i}://`)}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===""){this.#t.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:e=>{e?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(i!=="success"){this.#t.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Q({type:n,selectors:[["app-restore-destination"]],viewQuery:function(e,o){e&1&&Y(o.formRef,fe,5),e&2&&Z()},features:[ne([Ne])],decls:33,vars:9,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let o;o=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD*30:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*30:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*31:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*31:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,t=q(t);let a;a=$localize` Test destination `;let D;D=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let B;B=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let W;W=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let z;z=$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 J;J=$localize`All destinations`;let X;X=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let K;return K=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],i,e,o,t,a,D,U,B,W,V,z,J,X,H,K,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,o){if(e&1){let t=C();r(0,"form",17,0),d("submit",function(){return T(t),S(o.next())}),r(2,"header")(3,"h3",18)(4,"span"),N(5,2),s(),r(6,"div",19),u(7,Me,2,3,"button",20),r(8,"sh-menu")(9,"button",21)(10,"sh-icon"),I(11,"dots-three-vertical"),s()(),w(12,22),r(13,"button",23),d("click",function(){return T(t),S(o.openTargetUrlDialog())}),E(14,3),g(15,"sh-icon"),F(),s(),u(16,Pe,3,0,"button",21),G(),s()()(),u(17,$e,3,0,"sh-alert")(18,ye,3,0,"sh-alert",24)(19,Le,3,1,"sh-alert",25)(20,xe,3,1,"sh-alert",26),u(21,we,5,1,"p"),s(),u(22,ke,9,1),u(23,ve,1,1,"app-single-destination",27),r(24,"div",28)(25,"button",29),d("click",function(){return T(t),S(o.goBack())}),E(26,4),g(27,"sh-icon"),F(),s(),r(28,"button",30),E(29,5),u(30,Ue,2,0,"sh-icon",31)(31,Be,2,0,"sh-icon"),F(),s()()(),u(32,We,16,4,"sh-dialog",32)}if(e&2){let t=!!o.targetUrlModel();_(7),O(t?7:-1),_(9),O(t?16:-1),_(),O(o.testSignal()=="testing"?17:o.testSignal()=="success"?18:o.testSignal()=="warning"?19:o.testSignal()=="error"?20:-1),_(4),O(t?21:-1),_(),O(t?-1:22),_(),O(t?23:-1),_(5),h("disabled",o.testSignal()=="testing"||!t),_(2),O(o.testSignal()=="testing"?30:31),_(2),O(o.targetUrlDialogOpen()?32:-1)}},dependencies:[De,Ee,Se,se,_e,le,Te,ce,Oe,Ce,Re,Fe,de,ge],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%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.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-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{v as default};
1
+ import{g as he}from"./chunk-5HQJVUNE.js";import{a as Ie,b as me,c as De}from"./chunk-WWIKIIGV.js";import"./chunk-KR56GPXG.js";import"./chunk-T5LLH46J.js";import{a as pe}from"./chunk-27UON6YV.js";import{j as Ne}from"./chunk-7IQ5FSGI.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import{a as m}from"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{B as Oe,H as Ce,K as Re,c as se,e as _e,f as le,g as ce,i as Te,j as Se,s as Ee,u as Fe,w as ge,y as de,z as ue}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{b as ae,d as re}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as T,Ab as s,Bb as g,Fb as w,Gb as G,Ib as C,Mc as k,Pa as _,Pb as E,Qb as F,Rb as N,Sb as f,Sc as oe,Tb as A,Ub as q,Vb as d,W as R,Xb as l,aa as S,cb as Q,cc as Y,da as j,dc as Z,gc as ee,jc as I,kc as b,la as p,lc as te,oc as M,pc as P,qc as $,sb as u,tb as O,ub as y,wb as L,wc as ne,xb as x,xc as ie,yb as h,zb as r}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var fe=["formRef"],Ae=()=>({maxWidth:"700px",width:"100%"});function Me(n,i){if(n&1){let e=C();r(0,"button",33),d("click",function(){T(e);let t=l();return S(t.testDestination(0,!0))}),N(1,6),s()}if(n&2){let e=l();ee("loader",e.testSignal()=="testing"),h("disabled",e.testSignal()=="testing")}}function Pe(n,i){if(n&1){let e=C();r(0,"button",23),d("click",function(){T(e);let t=l();return S(t.copyTargetUrl())}),E(1,7),g(2,"sh-icon"),F(),s()}}function $e(n,i){n&1&&(r(0,"sh-alert"),E(1,8),g(2,"sh-icon",34),F(),s())}function ye(n,i){n&1&&(r(0,"sh-alert",24),E(1,9),g(2,"sh-icon",34),F(),s())}function Le(n,i){if(n&1&&(r(0,"sh-alert",25),E(1,10),g(2,"sh-icon",34),F(),s()),n&2){let e=l();_(2),f(e.testErrorMessage()),A(1)}}function xe(n,i){if(n&1&&(r(0,"sh-alert",26),E(1,11),g(2,"sh-icon",34),F(),s()),n&2){let e=l();_(2),f(e.testErrorMessage()),A(1)}}function we(n,i){if(n&1){let e=C();r(0,"p",35),d("click",function(){T(e);let t=l();return S(t.removeDestination())}),E(1,12),g(2,"strong")(3,"br")(4,"span",36),F(),s()}if(n&2){let e,o=l();_(4),f((e=o.selectedDestinationType())==null?null:e.displayName),A(1)}}function Ge(n,i){if(n&1){let e=C();r(0,"div",42),d("click",function(){let t=T(e).$implicit,a=l(2);return S(a.setDestination(t.key))}),r(1,"h3"),I(2),s(),r(3,"p"),I(4),s()()}if(n&2){let e=i.$implicit;_(2),b(e.displayName),_(2),b(e.description)}}function be(n,i){if(n&1){let e=C();r(0,"button",43,1),d("click",function(){let t=T(e).$implicit,a=l(2);return S(a.setDestination(t.key))}),I(2),s()}if(n&2){let e=i.$implicit;_(2),te(" ",e.displayName," ")}}function ke(n,i){if(n&1&&(r(0,"div",37),L(1,Ge,5,2,"div",38,y),s(),r(3,"sh-menu",39)(4,"button",40),N(5,13),s(),w(6,22),L(7,be,3,1,"button",41,y),G(),s()),n&2){let e=l();_(),x(e.destinationTypeOptionsFocused()),_(2),h("searchable",!0),_(4),x(e.destinationTypeOptions())}}function ve(n,i){if(n&1){let e=C();r(0,"app-single-destination",44),$("targetUrlChange",function(t){T(e);let a=l();return P(a.targetUrlModel,t)||(a.targetUrlModel=t),S(t)}),s()}if(n&2){let e=l();M("targetUrl",e.targetUrlModel)}}function Ue(n,i){n&1&&(E(0,5,1),g(1,"sh-icon",31),F())}function Be(n,i){n&1&&(E(0,5,2),g(1,"sh-icon"),F())}function We(n,i){if(n&1){let e=C();r(0,"sh-dialog",45),$("isOpenChange",function(t){T(e);let a=l();return P(a.targetUrlDialogOpen,t)||(a.targetUrlDialogOpen=t),S(t)}),r(1,"header",46)(2,"div",47)(3,"h2"),N(4,14),s(),r(5,"sh-alert",25),N(6,15),s()()(),r(7,"div",48)(8,"sh-form-field")(9,"textarea",49),$("ngModelChange",function(t){T(e);let a=l();return P(a.targetUrlCtrl,t)||(a.targetUrlCtrl=t),S(t)}),s()()(),r(10,"footer",50)(11,"button",29),d("click",function(){T(e);let t=l();return S(t.closeTargetUrlDialog(!1))}),I(12,"Cancel"),s(),r(13,"button",51),d("click",function(){T(e);let t=l();return S(t.closeTargetUrlDialog(!0))}),E(14,16),g(15,"sh-icon"),F(),s()()()}if(n&2){let e=l();M("isOpen",e.targetUrlDialogOpen),h("options",ie(3,Ae)),_(9),M("ngModel",e.targetUrlCtrl)}}var v=class n{#i=R(re);#o=R(ae);#t=R(ue);#a=R(Ie);injector=R(j);#e=R(he);#r=R(me);formRef=oe.required("formRef");targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#r.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let i=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return i.map(o=>e.find(t=>t.key===o))});selectedDestinationType=k(()=>{let i=this.#e.destinationTargetUrl();if(!i)return null;let e=i.split("://")[0];return pe(e)});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),o=this.targetUrlInitial();!i||e===o||!e||this.#e.updateTargetUrl(e)}testDestination(i,e,o){let t=this.#e.destinationTargetUrl();t&&(this.#e.setTestState("testing"),this.#a.testDestination(t,this.#e.backupId(),i,!0,e).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),a.containsBackup===!1?(this.#e.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),e||this.#t.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#e.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),e||this.#t.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let D=t.includes("?");a.action==="trust-cert"&&this.#e.updateTargetUrl(t+`${D?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.updateTargetUrl(t+`${D?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):o?.()}}))}setDestination(i){this.#e.updateTargetUrl(`${i}://`)}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===""){this.#t.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:e=>{e?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(i!=="success"){this.#t.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Q({type:n,selectors:[["app-restore-destination"]],viewQuery:function(e,o){e&1&&Y(o.formRef,fe,5),e&2&&Z()},features:[ne([Ne])],decls:33,vars:9,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let o;o=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD*30:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*30:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*31:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*31:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,t=q(t);let a;a=$localize` Test destination `;let D;D=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let B;B=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let W;W=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let z;z=$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 J;J=$localize`All destinations`;let X;X=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let K;return K=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],i,e,o,t,a,D,U,B,W,V,z,J,X,H,K,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,o){if(e&1){let t=C();r(0,"form",17,0),d("submit",function(){return T(t),S(o.next())}),r(2,"header")(3,"h3",18)(4,"span"),N(5,2),s(),r(6,"div",19),u(7,Me,2,3,"button",20),r(8,"sh-menu")(9,"button",21)(10,"sh-icon"),I(11,"dots-three-vertical"),s()(),w(12,22),r(13,"button",23),d("click",function(){return T(t),S(o.openTargetUrlDialog())}),E(14,3),g(15,"sh-icon"),F(),s(),u(16,Pe,3,0,"button",21),G(),s()()(),u(17,$e,3,0,"sh-alert")(18,ye,3,0,"sh-alert",24)(19,Le,3,1,"sh-alert",25)(20,xe,3,1,"sh-alert",26),u(21,we,5,1,"p"),s(),u(22,ke,9,1),u(23,ve,1,1,"app-single-destination",27),r(24,"div",28)(25,"button",29),d("click",function(){return T(t),S(o.goBack())}),E(26,4),g(27,"sh-icon"),F(),s(),r(28,"button",30),E(29,5),u(30,Ue,2,0,"sh-icon",31)(31,Be,2,0,"sh-icon"),F(),s()()(),u(32,We,16,4,"sh-dialog",32)}if(e&2){let t=!!o.targetUrlModel();_(7),O(t?7:-1),_(9),O(t?16:-1),_(),O(o.testSignal()=="testing"?17:o.testSignal()=="success"?18:o.testSignal()=="warning"?19:o.testSignal()=="error"?20:-1),_(4),O(t?21:-1),_(),O(t?-1:22),_(),O(t?23:-1),_(5),h("disabled",o.testSignal()=="testing"||!t),_(2),O(o.testSignal()=="testing"?30:31),_(2),O(o.targetUrlDialogOpen()?32:-1)}},dependencies:[De,Ee,Se,se,_e,le,Te,ce,Oe,Ce,Re,Fe,de,ge],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%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.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-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{v as default};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-H6UYYWCU.js")},{path:"encryption",loadComponent:()=>import("./chunk-PNECF7JS.js")},{path:"select-files",loadComponent:()=>import("./chunk-U4T4BSPF.js")},{path:"options",loadComponent:()=>import("./chunk-N4ADMNNU.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-NEQW3H7F.js")}],t=o;export{t as default};
@@ -1,3 +1,3 @@
1
- import{a as Me}from"./chunk-PD4KFJ3B.js";import"./chunk-T5LLH46J.js";import"./chunk-KK7TLGME.js";import{a as ge}from"./chunk-TZ6RGGOS.js";import{j as F}from"./chunk-IEJFUREF.js";import{a as Ee}from"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import{a as Ne}from"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-7Z3BXDXF.js";import{b as A}from"./chunk-FBWFZMGL.js";import{B as me,G as _e,H as de,L as ce,P as Ce,c as Q,e as Y,f as Z,j as ee,n as te,o as ne,p as oe,q as ie,r as ae,s as re,t as se,u as le}from"./chunk-RYXU2QDS.js";import{a as pe,b as ue}from"./chunk-BKANUILG.js";import{b as j,d as H,e as q}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as E,Ab as n,Bb as r,Fb as S,Gb as T,Ib as y,Pa as m,Pb as f,Qb as O,Rb as c,Sb as v,Tb as U,Vb as x,W as p,Xb as g,aa as M,cb as R,gc as w,la as L,na as D,oc as K,pc as J,qc as X,sb as $,tb as b,ub as B,vc as V,wb as G,wc as z,xb as k,xc as W,yb as u,zb as a}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var Se=()=>["backup"];function Te(s,t){s&1&&r(0,"sh-progress-bar",11)}function fe(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",30),n()),s&2){let e=t.$implicit,l=t.$index;m(),u("id",V("filter-",l))("formControl",e)}}function Oe(s,t){if(s&1){let e=y();a(0,"form",12)(1,"sh-select",13)(2,"label",14),c(3,1),n(),r(4,"input",15),n(),a(5,"sh-form-field")(6,"label",16),c(7,2),n(),r(8,"textarea",17),n(),a(9,"sh-form-field")(10,"label",18),c(11,3),n(),r(12,"textarea",19),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",12)(16,"sh-form-field")(17,"label",20),c(18,5),n(),r(19,"input",21),n(),a(20,"sh-form-field")(21,"label",22),c(22,6),n(),r(23,"input",23),n(),a(24,"app-toggle-card",24),S(25,25),c(26,7),T(),S(27,26),G(28,fe,2,3,"sh-form-field",null,B),T(),n()(),a(30,"app-options-list",27),X("optionsChange",function(i){E(e);let C=g();return J(C.settings,i)||(C.settings=i),M(i)}),n(),a(31,"div",28)(32,"button",29),x("click",function(){E(e);let i=g();return M(i.submit())}),f(33,8),r(34,"sh-icon"),O(),n()()}if(s&2){let e=g();u("formGroup",e.baseCmdForm),m(),u("options",e.commandOptions()??W(10,Se))("inlineSearch",!0),m(14),u("formGroup",e.standardFields),m(9),u("disallowToggle",!0),m(4),k(e.standardFields.controls.filters.controls),m(2),K("options",e.settings),u("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),v(e.baseCmdForm.value.command),U(33)}}var _=new ae,P=class s{#e=p(F);#t=p(ue);#n=p(H);#o=p(j);#i=p(pe);#a=p(Ne);#r=A(this.#o.params);commandOptions=A(this.#i.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#l=D(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
1
+ import{a as Me}from"./chunk-KR56GPXG.js";import"./chunk-T5LLH46J.js";import"./chunk-27UON6YV.js";import{a as ge}from"./chunk-XRXXVFJ4.js";import{j as F}from"./chunk-7IQ5FSGI.js";import{a as Ee}from"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import{a as Ne}from"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import{b as A}from"./chunk-FBWFZMGL.js";import{B as me,G as _e,H as de,L as ce,P as Ce,c as Q,e as Y,f as Z,j as ee,n as te,o as ne,p as oe,q as ie,r as ae,s as re,t as se,u as le}from"./chunk-RYXU2QDS.js";import{a as pe,b as ue}from"./chunk-BKANUILG.js";import{b as j,d as H,e as q}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as E,Ab as n,Bb as r,Fb as S,Gb as T,Ib as y,Pa as m,Pb as f,Qb as O,Rb as c,Sb as v,Tb as U,Vb as x,W as p,Xb as g,aa as M,cb as R,gc as w,la as L,na as D,oc as K,pc as J,qc as X,sb as $,tb as b,ub as B,vc as V,wb as G,wc as z,xb as k,xc as W,yb as u,zb as a}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var Se=()=>["backup"];function Te(s,t){s&1&&r(0,"sh-progress-bar",11)}function fe(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",30),n()),s&2){let e=t.$implicit,l=t.$index;m(),u("id",V("filter-",l))("formControl",e)}}function Oe(s,t){if(s&1){let e=y();a(0,"form",12)(1,"sh-select",13)(2,"label",14),c(3,1),n(),r(4,"input",15),n(),a(5,"sh-form-field")(6,"label",16),c(7,2),n(),r(8,"textarea",17),n(),a(9,"sh-form-field")(10,"label",18),c(11,3),n(),r(12,"textarea",19),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",12)(16,"sh-form-field")(17,"label",20),c(18,5),n(),r(19,"input",21),n(),a(20,"sh-form-field")(21,"label",22),c(22,6),n(),r(23,"input",23),n(),a(24,"app-toggle-card",24),S(25,25),c(26,7),T(),S(27,26),G(28,fe,2,3,"sh-form-field",null,B),T(),n()(),a(30,"app-options-list",27),X("optionsChange",function(i){E(e);let C=g();return J(C.settings,i)||(C.settings=i),M(i)}),n(),a(31,"div",28)(32,"button",29),x("click",function(){E(e);let i=g();return M(i.submit())}),f(33,8),r(34,"sh-icon"),O(),n()()}if(s&2){let e=g();u("formGroup",e.baseCmdForm),m(),u("options",e.commandOptions()??W(10,Se))("inlineSearch",!0),m(14),u("formGroup",e.standardFields),m(9),u("disallowToggle",!0),m(4),k(e.standardFields.controls.filters.controls),m(2),K("options",e.settings),u("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),v(e.baseCmdForm.value.command),U(33)}}var _=new ae,P=class s{#e=p(F);#t=p(ue);#n=p(H);#o=p(j);#i=p(pe);#a=p(Ne);#r=A(this.#o.params);commandOptions=A(this.#i.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#l=D(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
2
2
  `).filter(o=>o.length>0)??[],i=this.standardFields.value,C=i.filters??[],N=[t.command,e,...l,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...C.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:N}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
3
  `)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=R({type:s,selectors:[["app-commandline"]],features:[z([F])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let l;l=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let C;C=$localize`Advanced options`;let N;N=$localize`Backup ID`;let o;o=$localize`Backup Name`;let I;I=$localize`Filters`;let h;return h=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,l,i,C,N,o,I,h,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,l){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",9)(3,"button",10),f(4,0),r(5,"sh-icon"),O(),n()(),$(6,Te,1,0,"sh-progress-bar",11)(7,Oe,35,11),n()),e&2&&(m(6),b(l.finishedLoading()?7:6))},dependencies:[re,ee,Q,Y,Z,ge,Me,Ee,se,te,ie,oe,ne,q,de,me,_e,Ce,ce,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};
@@ -0,0 +1 @@
1
+ import{a as M}from"./chunk-XRXXVFJ4.js";import"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{B as D,C as N,u as E}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{e as m}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as n,Bb as o,Pa as c,Pb as r,Qb as l,Rb as i,cb as T,xc as d,yb as s,zb as e}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,C,A,g,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,C){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),r(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),r(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(c(11),s("routerLink",d(2,f)),c(9),s("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -1,2 +1,2 @@
1
- import{a as ue}from"./chunk-T5LLH46J.js";import{d as me}from"./chunk-KK7TLGME.js";import{c as de,d as Ce}from"./chunk-B5LH4P4E.js";import{a as ce}from"./chunk-NEV6JB5M.js";import{B as oe,H as re,K as ae,P as le,V as _e,W as se,Y as pe,b as W,c as Y,e as Z,i as ee,k as te,s as ne,u as ie}from"./chunk-RYXU2QDS.js";import{ea as Q}from"./chunk-RMOTUTEQ.js";import{$ as d,Ab as l,Bb as V,Fb as v,Gb as I,Gc as k,Hb as S,Ib as g,Mc as G,Pa as s,Pb as b,Qb as $,Rb as J,Rc as B,Uc as q,Vb as u,W as K,Xb as _,aa as C,cb as H,ec as T,gc as A,hb as f,jc as m,kc as D,la as N,lc as R,rc as X,sb as h,sc as z,tb as O,tc as x,ub as M,wb as E,xb as P,xc as j,yb as c,zb as a}from"./chunk-XYHHESIX.js";import{a as w,b as L}from"./chunk-7CGTOI24.js";var ge=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var xe=()=>({updateOn:"blur"});function Se(t,i){if(t&1){let e=g();a(0,"button",13),u("click",function(){d(e);let n=_();return C(n.showTextArea.set(!1))}),b(1,5),V(2,"sh-icon"),$(),l()}}function he(t,i){if(t&1){let e=g();a(0,"button",17,0),u("click",function(){let n=d(e).$implicit,r=_(3);return C(r.addSetting(n))}),a(2,"div",18)(3,"p"),m(4),l(),m(5),l()()}if(t&2){let e=i.$implicit;A("deprecated",e.deprecatedDescription),s(4),D(e.shortDescription),s(),R(" ",e.name," ")}}function Oe(t,i){if(t&1&&(a(0,"h3",9),m(1),l(),E(2,he,6,4,"button",16,M)),t&2){let e=i.$implicit;s(),D(e.displayName),s(),P(e.options)}}function Fe(t,i){if(t&1){let e=g();a(0,"sh-menu")(1,"button",19)(2,"sh-icon"),m(3,"dots-three-vertical"),l()(),v(4,15),a(5,"button",13),u("click",function(){d(e);let n=_(2);return C(n.addFreeTextSetting())}),b(6,7),V(7,"sh-icon"),$(),l(),a(8,"button",20),u("click",function(){d(e);let n=_(2);return C(n.showTextArea.set(!0))}),a(9,"sh-icon"),m(10,"link"),l(),m(11," Edit contents as text "),l(),I(),l()}}function we(t,i){if(t&1&&(a(0,"sh-menu",14)(1,"button",11),b(2,6),V(3,"sh-icon"),$(),l(),v(4,15),E(5,Oe,4,1,null,null,M),I(),l(),h(7,Fe,12,0,"sh-menu")),t&2){let e=_();c("searchable",!0),s(5),P(e.nonSelectedOptionsGrouped()),s(2),O(e.hasFreeTextSettings()?7:-1)}}function ye(t,i){if(t&1){let e=g();a(0,"textarea",21),u("ngModelChange",function(n){d(e);let r=_();return C(r.updateSettingsFromText(n))}),l()}if(t&2){let e=_();c("ngModel",e.settingsAsText())("ngModelOptions",j(2,xe))}}function Ve(t,i){t&1&&(a(0,"div",22),m(1,"Add a setting above to get started."),l())}function Ie(t,i){t&1&&(a(0,"sh-icon",30),m(1," warning-octagon "),l())}function Le(t,i){if(t&1&&(a(0,"sh-icon",31),m(1,"archive"),l()),t&2){let e=_(2).$implicit;c("shTooltip",e.FormView.deprecatedDescription)}}function Ne(t,i){if(t&1&&(a(0,"sh-icon",32),m(1,"question"),l()),t&2){let e=_(2).$implicit;c("shTooltip",e.FormView.longDescription)}}function Me(t,i){if(t&1&&(h(0,Ie,2,0,"sh-icon",30),a(1,"span"),m(2),l(),h(3,Le,2,1,"sh-icon",31)(4,Ne,2,1,"sh-icon",32)),t&2){let e=_().$implicit,o=x(1);O(o?0:-1),s(),A("deprecated",e.FormView.deprecatedDescription),s(),D(e.FormView.shortDescription),s(),O(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Ee(t,i){t&1&&S(0)}function Pe(t,i){if(t&1){let e=g();a(0,"div",24)(1,"label"),f(2,Ee,1,0,"ng-container",33),l(),a(3,"div")(4,"sh-form-field")(5,"input",34),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateFreeTextSettingName(r,n))}),l(),a(6,"sh-icon",35),m(7,"rectangle-dashed"),l()()(),a(8,"div")(9,"sh-form-field")(10,"input",34),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(11,"sh-icon",35),m(12,"textbox"),l()()()()}if(t&2){let e=_().$implicit,o=T(3);s(2),c("ngTemplateOutlet",o),s(3),c("ngModel",e.Name),s(5),c("ngModel",e.Value())}}function ve(t,i){t&1&&S(0)}function be(t,i){if(t&1){let e=g();a(0,"app-file-tree",25)(1,"label",36),f(2,ve,1,0,"ng-container",33),l(),a(3,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function $e(t,i){if(t&1){let e=g();a(0,"app-file-tree",26),V(1,"label",36),a(2,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=x(0);c("startingPath",e.Value()),s(),c("for",o),s(),c("id",o)("ngModel",e.Value())}}function Ae(t,i){t&1&&S(0)}function De(t,i){t&1&&(a(0,"sh-icon",35),m(1,"link"),l())}function Re(t,i){t&1&&(a(0,"sh-icon",35),m(1,"hard-drives"),l())}function ke(t,i){t&1&&(a(0,"sh-icon",35),m(1,"jar"),l())}function Ge(t,i){t&1&&(a(0,"sh-icon",35),m(1,"envelope"),l())}function Be(t,i){t&1&&(a(0,"sh-icon",35),m(1,"textbox"),l())}function ze(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ae,1,0,"ng-container",33),l(),a(3,"input",38),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),h(4,De,2,0,"sh-icon",35)(5,Re,2,0,"sh-icon",35)(6,ke,2,0,"sh-icon",35)(7,Ge,2,0,"sh-icon",35)(8,Be,2,0,"sh-icon",35),l()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),s(),O(e.FormView.type==="Path"?4:e.FormView.type==="Hostname"?5:e.FormView.type==="Bucketname"?6:e.FormView.type==="Email"?7:8)}}function Ue(t,i){t&1&&S(0)}function Ke(t,i){if(t&1){let e=g();a(0,"sh-icon",41),u("click",function(){d(e);let n=_(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye "),l()}}function He(t,i){if(t&1){let e=g();a(0,"sh-icon",41),u("click",function(){d(e);let n=_(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye-slash "),l()}}function Je(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ue,1,0,"ng-container",33),l(),a(3,"input",39),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(4,"sh-icon",35),m(5,"password"),l(),h(6,Ke,2,0,"sh-icon",40)(7,He,2,0,"sh-icon",40),l()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),s(3),O(e.showPassword?6:7)}}function Xe(t,i){t&1&&S(0)}function je(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;R(" ",e," ")}}function qe(t,i){if(t&1){let e=g();a(0,"sh-select",42)(1,"label",36),f(2,Xe,1,0,"ng-container",33),l(),a(3,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()(),f(4,je,1,1,"ng-template",null,2,k)}if(t&2){let e=T(5),o=_().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("id",r)("ngModel",o.Value())}}function Qe(t,i){t&1&&S(0)}function We(t,i){if(t&1){let e=g();a(0,"app-size",43),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),a(1,"label",36),f(2,Qe,1,0,"ng-container",33),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function Ye(t,i){t&1&&S(0)}function Ze(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ye,1,0,"ng-container",33),l(),a(3,"input",44),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(4,"sh-icon",35),m(5,"numpad"),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function et(t,i){t&1&&S(0)}function tt(t,i){if(t&1){let e=g();a(0,"sh-toggle",28)(1,"label",36),f(2,et,1,0,"ng-container",33),l(),a(3,"input",45),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function nt(t,i){t&1&&S(0)}function it(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;R(" ",e," ")}}function ot(t,i){if(t&1){let e=g();a(0,"sh-select",46)(1,"label",36),f(2,nt,1,0,"ng-container",33),l(),a(3,"input",47),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()(),f(4,it,1,1,"ng-template",null,3,k)}if(t&2){let e=T(5),o=_().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("ngModel",o.Value())}}function rt(t,i){t&1&&S(0)}function at(t,i){if(t&1){let e=g();a(0,"app-timespan",43),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),a(1,"label",36),f(2,rt,1,0,"ng-container",33),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function lt(t,i){if(t&1){let e=g();X(0)(1),f(2,Me,5,5,"ng-template",null,1,k),a(4,"div",23),h(5,Pe,13,3,"div",24)(6,be,4,9,"app-file-tree",25)(7,$e,3,4,"app-file-tree",26)(8,ze,9,6,"sh-form-field")(9,Je,8,6,"sh-form-field")(10,qe,6,7)(11,We,3,5,"app-size",27)(12,Ze,6,4,"sh-form-field")(13,tt,4,4,"sh-toggle",28)(14,ot,6,6)(15,at,3,5,"app-timespan",27),a(16,"button",29),u("click",function(){let n=d(e).$implicit,r=_(2);return C(r.removeSetting(n))}),a(17,"sh-icon"),m(18,"x-bold"),l()()()}if(t&2){let e=i.$implicit,o=i.$index,n=_(2);z("destination-"+e.Name+o),s(),z(n.inAppOptions(e.Name)),s(3),A("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),s(),O(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function _t(t,i){if(t&1&&(h(0,Ve,2,0,"div",22),E(1,lt,19,5,null,null,M)),t&2){let e=_();O(e.selectedSettings().length===0?0:-1),s(),P(e.selectedSettings())}}var fe=class t{#e=K(ce);options=q.required();hiddenOptions=B([]);hasFreeTextSettings=B(!1);applicationOptions=B();showTextArea=N(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=G(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(F=>F.name===n.Name?.replace("--","")),p=n.Value??"";if(r&&i.includes(r.name))return null;if(r){if(r.type==="Boolean"&&(p=this.isTrue(p)),r.type==="Integer"&&(p=parseInt(p)||0),r.type==="Enumeration"&&r.options){let y=p?.trim().toLowerCase(),U=r.options.find(Te=>(Te??"").trim().toLocaleLowerCase()===y);U&&(p=U)}let F=ge.find(y=>y.name===r?.name);return F&&(r=w(w({},r),F)),L(w({},n),{Value:N(p),FormView:r})}else if(this.hasFreeTextSettings())return L(w({},n),{Value:N(p),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=G(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>L(w({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=G(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
1
+ import{a as ue}from"./chunk-T5LLH46J.js";import{d as me}from"./chunk-27UON6YV.js";import{c as de,d as Ce}from"./chunk-B5LH4P4E.js";import{a as ce}from"./chunk-NEV6JB5M.js";import{B as oe,H as re,K as ae,P as le,V as _e,W as se,Y as pe,b as W,c as Y,e as Z,i as ee,k as te,s as ne,u as ie}from"./chunk-RYXU2QDS.js";import{ea as Q}from"./chunk-RMOTUTEQ.js";import{$ as d,Ab as l,Bb as V,Fb as v,Gb as I,Gc as k,Hb as S,Ib as g,Mc as G,Pa as s,Pb as b,Qb as $,Rb as J,Rc as B,Uc as q,Vb as u,W as K,Xb as _,aa as C,cb as H,ec as T,gc as A,hb as f,jc as m,kc as D,la as N,lc as R,rc as X,sb as h,sc as z,tb as O,tc as x,ub as M,wb as E,xb as P,xc as j,yb as c,zb as a}from"./chunk-XYHHESIX.js";import{a as w,b as L}from"./chunk-7CGTOI24.js";var ge=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var xe=()=>({updateOn:"blur"});function Se(t,i){if(t&1){let e=g();a(0,"button",13),u("click",function(){d(e);let n=_();return C(n.showTextArea.set(!1))}),b(1,5),V(2,"sh-icon"),$(),l()}}function he(t,i){if(t&1){let e=g();a(0,"button",17,0),u("click",function(){let n=d(e).$implicit,r=_(3);return C(r.addSetting(n))}),a(2,"div",18)(3,"p"),m(4),l(),m(5),l()()}if(t&2){let e=i.$implicit;A("deprecated",e.deprecatedDescription),s(4),D(e.shortDescription),s(),R(" ",e.name," ")}}function Oe(t,i){if(t&1&&(a(0,"h3",9),m(1),l(),E(2,he,6,4,"button",16,M)),t&2){let e=i.$implicit;s(),D(e.displayName),s(),P(e.options)}}function Fe(t,i){if(t&1){let e=g();a(0,"sh-menu")(1,"button",19)(2,"sh-icon"),m(3,"dots-three-vertical"),l()(),v(4,15),a(5,"button",13),u("click",function(){d(e);let n=_(2);return C(n.addFreeTextSetting())}),b(6,7),V(7,"sh-icon"),$(),l(),a(8,"button",20),u("click",function(){d(e);let n=_(2);return C(n.showTextArea.set(!0))}),a(9,"sh-icon"),m(10,"link"),l(),m(11," Edit contents as text "),l(),I(),l()}}function we(t,i){if(t&1&&(a(0,"sh-menu",14)(1,"button",11),b(2,6),V(3,"sh-icon"),$(),l(),v(4,15),E(5,Oe,4,1,null,null,M),I(),l(),h(7,Fe,12,0,"sh-menu")),t&2){let e=_();c("searchable",!0),s(5),P(e.nonSelectedOptionsGrouped()),s(2),O(e.hasFreeTextSettings()?7:-1)}}function ye(t,i){if(t&1){let e=g();a(0,"textarea",21),u("ngModelChange",function(n){d(e);let r=_();return C(r.updateSettingsFromText(n))}),l()}if(t&2){let e=_();c("ngModel",e.settingsAsText())("ngModelOptions",j(2,xe))}}function Ve(t,i){t&1&&(a(0,"div",22),m(1,"Add a setting above to get started."),l())}function Ie(t,i){t&1&&(a(0,"sh-icon",30),m(1," warning-octagon "),l())}function Le(t,i){if(t&1&&(a(0,"sh-icon",31),m(1,"archive"),l()),t&2){let e=_(2).$implicit;c("shTooltip",e.FormView.deprecatedDescription)}}function Ne(t,i){if(t&1&&(a(0,"sh-icon",32),m(1,"question"),l()),t&2){let e=_(2).$implicit;c("shTooltip",e.FormView.longDescription)}}function Me(t,i){if(t&1&&(h(0,Ie,2,0,"sh-icon",30),a(1,"span"),m(2),l(),h(3,Le,2,1,"sh-icon",31)(4,Ne,2,1,"sh-icon",32)),t&2){let e=_().$implicit,o=x(1);O(o?0:-1),s(),A("deprecated",e.FormView.deprecatedDescription),s(),D(e.FormView.shortDescription),s(),O(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Ee(t,i){t&1&&S(0)}function Pe(t,i){if(t&1){let e=g();a(0,"div",24)(1,"label"),f(2,Ee,1,0,"ng-container",33),l(),a(3,"div")(4,"sh-form-field")(5,"input",34),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateFreeTextSettingName(r,n))}),l(),a(6,"sh-icon",35),m(7,"rectangle-dashed"),l()()(),a(8,"div")(9,"sh-form-field")(10,"input",34),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(11,"sh-icon",35),m(12,"textbox"),l()()()()}if(t&2){let e=_().$implicit,o=T(3);s(2),c("ngTemplateOutlet",o),s(3),c("ngModel",e.Name),s(5),c("ngModel",e.Value())}}function ve(t,i){t&1&&S(0)}function be(t,i){if(t&1){let e=g();a(0,"app-file-tree",25)(1,"label",36),f(2,ve,1,0,"ng-container",33),l(),a(3,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function $e(t,i){if(t&1){let e=g();a(0,"app-file-tree",26),V(1,"label",36),a(2,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=x(0);c("startingPath",e.Value()),s(),c("for",o),s(),c("id",o)("ngModel",e.Value())}}function Ae(t,i){t&1&&S(0)}function De(t,i){t&1&&(a(0,"sh-icon",35),m(1,"link"),l())}function Re(t,i){t&1&&(a(0,"sh-icon",35),m(1,"hard-drives"),l())}function ke(t,i){t&1&&(a(0,"sh-icon",35),m(1,"jar"),l())}function Ge(t,i){t&1&&(a(0,"sh-icon",35),m(1,"envelope"),l())}function Be(t,i){t&1&&(a(0,"sh-icon",35),m(1,"textbox"),l())}function ze(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ae,1,0,"ng-container",33),l(),a(3,"input",38),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),h(4,De,2,0,"sh-icon",35)(5,Re,2,0,"sh-icon",35)(6,ke,2,0,"sh-icon",35)(7,Ge,2,0,"sh-icon",35)(8,Be,2,0,"sh-icon",35),l()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),s(),O(e.FormView.type==="Path"?4:e.FormView.type==="Hostname"?5:e.FormView.type==="Bucketname"||e.FormView.type==="BucketnameB2"?6:e.FormView.type==="Email"?7:8)}}function Ue(t,i){t&1&&S(0)}function Ke(t,i){if(t&1){let e=g();a(0,"sh-icon",41),u("click",function(){d(e);let n=_(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye "),l()}}function He(t,i){if(t&1){let e=g();a(0,"sh-icon",41),u("click",function(){d(e);let n=_(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye-slash "),l()}}function Je(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ue,1,0,"ng-container",33),l(),a(3,"input",39),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(4,"sh-icon",35),m(5,"password"),l(),h(6,Ke,2,0,"sh-icon",40)(7,He,2,0,"sh-icon",40),l()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),s(3),O(e.showPassword?6:7)}}function Xe(t,i){t&1&&S(0)}function je(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;R(" ",e," ")}}function qe(t,i){if(t&1){let e=g();a(0,"sh-select",42)(1,"label",36),f(2,Xe,1,0,"ng-container",33),l(),a(3,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()(),f(4,je,1,1,"ng-template",null,2,k)}if(t&2){let e=T(5),o=_().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("id",r)("ngModel",o.Value())}}function Qe(t,i){t&1&&S(0)}function We(t,i){if(t&1){let e=g();a(0,"app-size",43),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),a(1,"label",36),f(2,Qe,1,0,"ng-container",33),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function Ye(t,i){t&1&&S(0)}function Ze(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ye,1,0,"ng-container",33),l(),a(3,"input",44),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(4,"sh-icon",35),m(5,"numpad"),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function et(t,i){t&1&&S(0)}function tt(t,i){if(t&1){let e=g();a(0,"sh-toggle",28)(1,"label",36),f(2,et,1,0,"ng-container",33),l(),a(3,"input",45),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function nt(t,i){t&1&&S(0)}function it(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;R(" ",e," ")}}function ot(t,i){if(t&1){let e=g();a(0,"sh-select",46)(1,"label",36),f(2,nt,1,0,"ng-container",33),l(),a(3,"input",47),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()(),f(4,it,1,1,"ng-template",null,3,k)}if(t&2){let e=T(5),o=_().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("ngModel",o.Value())}}function rt(t,i){t&1&&S(0)}function at(t,i){if(t&1){let e=g();a(0,"app-timespan",43),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),a(1,"label",36),f(2,rt,1,0,"ng-container",33),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function lt(t,i){if(t&1){let e=g();X(0)(1),f(2,Me,5,5,"ng-template",null,1,k),a(4,"div",23),h(5,Pe,13,3,"div",24)(6,be,4,9,"app-file-tree",25)(7,$e,3,4,"app-file-tree",26)(8,ze,9,6,"sh-form-field")(9,Je,8,6,"sh-form-field")(10,qe,6,7)(11,We,3,5,"app-size",27)(12,Ze,6,4,"sh-form-field")(13,tt,4,4,"sh-toggle",28)(14,ot,6,6)(15,at,3,5,"app-timespan",27),a(16,"button",29),u("click",function(){let n=d(e).$implicit,r=_(2);return C(r.removeSetting(n))}),a(17,"sh-icon"),m(18,"x-bold"),l()()()}if(t&2){let e=i.$implicit,o=i.$index,n=_(2);z("destination-"+e.Name+o),s(),z(n.inAppOptions(e.Name)),s(3),A("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),s(),O(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"||e.FormView.type==="BucketnameB2"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function _t(t,i){if(t&1&&(h(0,Ve,2,0,"div",22),E(1,lt,19,5,null,null,M)),t&2){let e=_();O(e.selectedSettings().length===0?0:-1),s(),P(e.selectedSettings())}}var fe=class t{#e=K(ce);options=q.required();hiddenOptions=B([]);hasFreeTextSettings=B(!1);applicationOptions=B();showTextArea=N(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=G(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(F=>F.name===n.Name?.replace("--","")),p=n.Value??"";if(r&&i.includes(r.name))return null;if(r){if(r.type==="Boolean"&&(p=this.isTrue(p)),r.type==="Integer"&&(p=parseInt(p)||0),r.type==="Enumeration"&&r.options){let y=p?.trim().toLowerCase(),U=r.options.find(Te=>(Te??"").trim().toLocaleLowerCase()===y);U&&(p=U)}let F=ge.find(y=>y.name===r?.name);return F&&(r=w(w({},r),F)),L(w({},n),{Value:N(p),FormView:r})}else if(this.hasFreeTextSettings())return L(w({},n),{Value:N(p),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=G(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>L(w({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=G(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
2
  `));updateSettingsFromText(i){if(typeof i!="string")return;let e=me(i);this.options.update(()=>e)}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}])}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]})}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],r=n.findIndex(p=>p.Name===i.Name);if(i.FormView.type==="Boolean")return n[r].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[r].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let p=e?.trim().toLowerCase()??"",F=i.FormView.options.find(y=>(y??"").trim().toLocaleLowerCase()===p);if(F)return n[r].Value=F,n}return n[r].Value=e,n})}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],r=n.findIndex(p=>p.Name===i.Name);return n[r].Name=e,n})}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=H({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:9,vars:3,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let r;return r=$localize`By adding this option it will override the matching global option`,[["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,[3,"disallowToggle"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",r,1,"error"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,o){e&1&&(a(0,"sh-toggle-card",8),v(1,9)(2),J(3,4),I(),a(4,"div",10),h(5,Se,3,0,"button",11)(6,we,8,2),l(),I(),h(7,ye,1,3,"textarea",12)(8,_t,3,1),l()),e&2&&(c("disallowToggle",!0),s(5),O(o.showTextArea()?5:6),s(2),O(o.showTextArea()?7:8))},dependencies:[ne,Y,te,W,Z,ee,Ce,de,ue,Q,_e,re,oe,ae,pe,ie,le,se],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{fe as a};
@@ -1 +1 @@
1
- import{a as $e,b as He}from"./chunk-VSLN6R7K.js";import{a as we}from"./chunk-OWEK4OHZ.js";import{a as V}from"./chunk-Y4IW22ZU.js";import"./chunk-6CYY2QG6.js";import{a as Ge}from"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import{a as Re}from"./chunk-NEV6JB5M.js";import{a as ye}from"./chunk-6KSFCVWH.js";import"./chunk-CGKL2MHM.js";import{b as Ce,d as ve}from"./chunk-QWNOPLJC.js";import{a as be}from"./chunk-7Z3BXDXF.js";import"./chunk-FBWFZMGL.js";import{B as R,G as Pe,H as Ie,J as Le,Q as Me,Y as De,c as Te,d as me,e as he,i as Ee,r as Ae,s as Fe,t as Oe,u as D,w as B,x as Ne,z as fe}from"./chunk-RYXU2QDS.js";import{b as Y}from"./chunk-BKANUILG.js";import{c as pe,e as Se,f as ge}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as m,Ab as o,Bb as _,E as W,Fb as ie,Gb as oe,Ib as E,Mc as U,Pa as r,Pb as g,Qb as C,Qc as ue,Rb as f,Sc as de,Ub as G,Uc as Q,Vb as T,W as S,Xb as c,aa as h,cb as M,cc as ae,dc as se,gc as k,ic as L,jc as u,kc as q,la as F,lc as b,na as j,oc as y,pc as $,qc as H,rc as re,sb as d,sc as le,tb as p,tc as w,ub as ee,uc as _e,wb as te,xb as ne,xc as ce,yb as O,zb as a}from"./chunk-XYHHESIX.js";import{a as X,b as z}from"./chunk-7CGTOI24.js";var Be=["scroller"];function Ye(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell-ringing"),o())}function Ve(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell"),o())}function Je(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=w(6);O("index",0)("notification",e.content)}}function Xe(i,n){if(i&1&&(a(0,"div",11),u(1),o()),i&2){c(3);let e=w(6);r(),b(" ",e.content.content," ")}}function ze(i,n){if(i&1&&(a(0,"sh-alert")(1,"div",10),u(2),o(),d(3,Xe,2,1,"div",11),o()),i&2){c(2);let e=w(6);L(e.content.type||"error"),r(2),q(e.content.title),r(),p(e.content.content?3:-1)}}function We(i,n){if(i&1&&(a(0,"div",6),d(1,Je,1,2,"app-notification",8)(2,ze,4,4,"sh-alert",9),o()),i&2){c();let e=w(6);r(),p(e.type==="notification"?1:2)}}function je(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,2),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleNotifications())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function qe(i,n){if(i&1&&(a(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),b(" ",e.content," ")}}function Qe(i,n){if(i&1){let e=E();a(0,"sh-alert",18,1),T("click",function(){let s=m(e).$implicit,l=c(2);return h(l.deleteAlertByIndex(s.id))}),a(2,"div",19),u(3),o(),d(4,qe,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),O("id",e.id),r(3),q(e.title),r(),p(e.content?4:-1)}}function Ke(i,n){i&1&&(a(0,"p",17),f(1,4),o())}function Ze(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,3),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleAlerts())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),te(9,Qe,5,5,"sh-alert",16,ee,!1,Ke,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var xe=new Ae,x=class i{#e=S(Ne);#t=S(V);isSubmitting=F(!1);messageSent=F(!1);form=xe.group({message:xe.control("",[me.required])});notifications=this.#t.notifications;shownMessage=F(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=U(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=de("scroller");isAlertsOpen=Q(!1);isNotificationsOpen=Q(!1);previousHistoryCount=F(null);previousNotificationsCount=F(null);constructor(){j(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.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(s=>z(X({},s),{countDown:s.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.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(s=>z(X({},s),{countDown:s.countDown-1}))},1e3))}),j(()=>{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(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=M({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ae(t.scroller,Be,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let s=E();a(0,"button",5),T("click",function(){return m(s),h(t.toggleAlerts())}),a(1,"sh-icon"),u(2,"info"),o()(),a(3,"button",5),T("click",function(){return m(s),h(t.toggleNotifications())}),d(4,Ye,2,0,"sh-icon")(5,Ve,2,0,"sh-icon"),o(),re(6),d(7,We,3,1,"div",6),d(8,je,10,0,"div",7),d(9,Ze,12,1,"div",7)}if(e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),p(t.notifications().length?4:5),r(2);let s=le(t.shownMessage());r(),p(s?7:-1),r(),p(t.isNotificationsOpen()?8:-1),r(),p(t.isAlertsOpen()?9:-1)}},dependencies:[Oe,B,D,R,He,$e],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:15.625rem}.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}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function et(i,n){i&1&&(a(0,"sh-icon",14),u(1,"check"),o())}function tt(i,n){i&1&&(a(0,"sh-icon",15),u(1,"prohibit"),o())}function nt(i,n){if(i&1){let e=E();a(0,"button",20),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();k("loader",e.isUpdating())}}function it(i,n){if(i&1){let e=E();a(0,"button",21),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();k("loader",e.isUpdating()),O("disabled",!0)}}var J=class i{#e=S(Y);closed=ue();isUpdating=F(!1);passphrase=F("");repeatPassphrase=F("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(W(()=>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(W(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=M({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$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? `,l=G(l);let P;P=$localize`Passphrase`;let I;I=$localize`Repeat passphrase`;let v;v=$localize`Not now thanks`;let A;A=$localize` Yes, update passphrase now `;let Z;return Z=$localize` Yes, update passphrase now `,[s,l,P,I,v,A,Z,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),g(5,1),_(6,"br")(7,"br"),C(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),H("ngModelChange",function(l){return $(t.passphrase,l)||(t.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),H("ngModelChange",function(l){return $(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),d(16,et,2,0,"sh-icon",14)(17,tt,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),d(21,nt,2,2,"button",18)(22,it,2,3,"button",19),o()),e&2&&(r(11),y("ngModel",t.passphrase),r(4),O("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),k("loader",t.isUpdating()),r(2),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Fe,Te,he,Ee,B,Ie,D,De,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var ot=()=>({exact:!0});function at(i,n){i&1&&(a(0,"sh-icon",26),u(1,"x-bold"),o())}function st(i,n){i&1&&(a(0,"sh-icon",27),u(1,"list-bold"),o())}function rt(i,n){if(i&1){let e=E();ie(0,9),a(1,"button",25),T("click",function(){m(e);let s=c();return h(s.toggleNav())}),d(2,at,2,0,"sh-icon",26)(3,st,2,0,"sh-icon",27),o(),oe()}if(i&2){let e=c();r(2),p(e.isNavOpen()?2:3)}}function lt(i,n){i&1&&(a(0,"sh-icon"),u(1,"sun"),o())}function _t(i,n){i&1&&(a(0,"sh-icon"),u(1,"moon"),o())}function ct(i,n){if(i&1){let e=E();a(0,"button",28),T("click",function(){m(e);let s=c();return h(s.logout())}),g(1,7),_(2,"sh-icon"),C(),o()}}var K=class i{#e=S(we);#t=S(Y);#i=S(Ge);#o=S(Ce);#a=S(fe);#s=S(V);#r=S(ve);#l=S(be);#n=S(Re);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;sidenavType=this.#e.sidenavType;machineName=U(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#s.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#a.open(J,{maxWidth:"500px"})}})}toggleNav(){this.#e.toggleNav()}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=M({type:i,selectors:[["app-layout"]],decls:42,vars:12,consts:()=>{let n;n=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let l;l=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=G(P);let I;I=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#37\uFFFD|\uFFFD/#38\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#37\uFFFD|\uFFFD/#38\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=G(I);let v;return v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,s,l,P,I,v,[3,"isOpenChange","isOpen","disableDrag"],["sidenav-closed-topbar",""],["sidenav",""],["shButton","",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","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["shButton","",1,"small","toggle-sidebar",3,"click"],[1,"cross"],[1,"burger"],["action","",3,"click"]]},template:function(e,t){e&1&&(a(0,"sh-sidenav",8),H("isOpenChange",function(l){return $(t.isNavOpen,l)||(t.isNavOpen=l),l}),d(1,rt,4,1,"ng-container",9),a(2,"div",10)(3,"header"),_(4,"app-logo"),a(5,"button",11),T("click",function(){return t.toggleBodyClass()}),d(6,lt,2,0,"sh-icon")(7,_t,2,0,"sh-icon"),o()(),a(8,"sh-list",12)(9,"button",13),g(10,0),_(11,"sh-icon"),C(),o(),a(12,"button",14),g(13,1),_(14,"sh-icon"),C(),o(),a(15,"button",15),g(16,2),_(17,"sh-icon"),C(),o(),a(18,"button",16),g(19,3),_(20,"sh-icon"),C(),o()(),_(21,"div",17),a(22,"sh-list",18)(23,"div",19)(24,"sh-icon"),u(25,"desktop"),o(),u(26),o(),_(27,"sh-divider"),a(28,"button",20),g(29,4),_(30,"sh-icon"),C(),o(),a(31,"a",21),g(32,5),_(33,"sh-icon")(34,"sh-icon",22),C(),o(),a(35,"a",23),g(36,6),_(37,"sh-icon")(38,"sh-icon",22),C(),o(),d(39,ct,3,0,"button",24),o()(),_(40,"router-outlet")(41,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),y("isOpen",t.isNavOpen),O("disableDrag",!0),r(),p(t.isMobile()?1:-1),r(5),p(t.isDarkMode()?6:7),r(3),O("routerLinkActiveOptions",ce(11,ot)),r(14),O("title",_e(t.machineName())),r(3),b(" ",t.machineName()," "),r(13),p(t.relayIsEnabled()?-1:39))},dependencies:[pe,Se,ge,Me,D,Le,R,Pe,x,ye],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}.toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{position:absolute;inset:auto}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{K as default};
1
+ import{a as $e,b as He}from"./chunk-VSLN6R7K.js";import{a as we}from"./chunk-OWEK4OHZ.js";import{a as V}from"./chunk-Y4IW22ZU.js";import"./chunk-6CYY2QG6.js";import{a as Ge}from"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import{a as Re}from"./chunk-NEV6JB5M.js";import{a as ye}from"./chunk-6KSFCVWH.js";import"./chunk-CGKL2MHM.js";import{b as Ce,d as ve}from"./chunk-QWNOPLJC.js";import{a as be}from"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{B as R,G as Pe,H as Ie,J as Le,Q as Me,Y as De,c as Te,d as me,e as he,i as Ee,r as Ae,s as Fe,t as Oe,u as D,w as B,x as Ne,z as fe}from"./chunk-RYXU2QDS.js";import{b as Y}from"./chunk-BKANUILG.js";import{c as pe,e as Se,f as ge}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as m,Ab as o,Bb as _,E as W,Fb as ie,Gb as oe,Ib as E,Mc as U,Pa as r,Pb as g,Qb as C,Qc as ue,Rb as f,Sc as de,Ub as G,Uc as Q,Vb as T,W as S,Xb as c,aa as h,cb as M,cc as ae,dc as se,gc as k,ic as L,jc as u,kc as q,la as F,lc as b,na as j,oc as y,pc as $,qc as H,rc as re,sb as d,sc as le,tb as p,tc as w,ub as ee,uc as _e,wb as te,xb as ne,xc as ce,yb as O,zb as a}from"./chunk-XYHHESIX.js";import{a as X,b as z}from"./chunk-7CGTOI24.js";var Be=["scroller"];function Ye(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell-ringing"),o())}function Ve(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell"),o())}function Je(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=w(6);O("index",0)("notification",e.content)}}function Xe(i,n){if(i&1&&(a(0,"div",11),u(1),o()),i&2){c(3);let e=w(6);r(),b(" ",e.content.content," ")}}function ze(i,n){if(i&1&&(a(0,"sh-alert")(1,"div",10),u(2),o(),d(3,Xe,2,1,"div",11),o()),i&2){c(2);let e=w(6);L(e.content.type||"error"),r(2),q(e.content.title),r(),p(e.content.content?3:-1)}}function We(i,n){if(i&1&&(a(0,"div",6),d(1,Je,1,2,"app-notification",8)(2,ze,4,4,"sh-alert",9),o()),i&2){c();let e=w(6);r(),p(e.type==="notification"?1:2)}}function je(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,2),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleNotifications())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function qe(i,n){if(i&1&&(a(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),b(" ",e.content," ")}}function Qe(i,n){if(i&1){let e=E();a(0,"sh-alert",18,1),T("click",function(){let s=m(e).$implicit,l=c(2);return h(l.deleteAlertByIndex(s.id))}),a(2,"div",19),u(3),o(),d(4,qe,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),O("id",e.id),r(3),q(e.title),r(),p(e.content?4:-1)}}function Ke(i,n){i&1&&(a(0,"p",17),f(1,4),o())}function Ze(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,3),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleAlerts())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),te(9,Qe,5,5,"sh-alert",16,ee,!1,Ke,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var xe=new Ae,x=class i{#e=S(Ne);#t=S(V);isSubmitting=F(!1);messageSent=F(!1);form=xe.group({message:xe.control("",[me.required])});notifications=this.#t.notifications;shownMessage=F(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=U(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=de("scroller");isAlertsOpen=Q(!1);isNotificationsOpen=Q(!1);previousHistoryCount=F(null);previousNotificationsCount=F(null);constructor(){j(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.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(s=>z(X({},s),{countDown:s.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.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(s=>z(X({},s),{countDown:s.countDown-1}))},1e3))}),j(()=>{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(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=M({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ae(t.scroller,Be,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let s=E();a(0,"button",5),T("click",function(){return m(s),h(t.toggleAlerts())}),a(1,"sh-icon"),u(2,"info"),o()(),a(3,"button",5),T("click",function(){return m(s),h(t.toggleNotifications())}),d(4,Ye,2,0,"sh-icon")(5,Ve,2,0,"sh-icon"),o(),re(6),d(7,We,3,1,"div",6),d(8,je,10,0,"div",7),d(9,Ze,12,1,"div",7)}if(e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),p(t.notifications().length?4:5),r(2);let s=le(t.shownMessage());r(),p(s?7:-1),r(),p(t.isNotificationsOpen()?8:-1),r(),p(t.isAlertsOpen()?9:-1)}},dependencies:[Oe,B,D,R,He,$e],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:15.625rem}.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}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function et(i,n){i&1&&(a(0,"sh-icon",14),u(1,"check"),o())}function tt(i,n){i&1&&(a(0,"sh-icon",15),u(1,"prohibit"),o())}function nt(i,n){if(i&1){let e=E();a(0,"button",20),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();k("loader",e.isUpdating())}}function it(i,n){if(i&1){let e=E();a(0,"button",21),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();k("loader",e.isUpdating()),O("disabled",!0)}}var J=class i{#e=S(Y);closed=ue();isUpdating=F(!1);passphrase=F("");repeatPassphrase=F("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(W(()=>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(W(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=M({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$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? `,l=G(l);let P;P=$localize`Passphrase`;let I;I=$localize`Repeat passphrase`;let v;v=$localize`Not now thanks`;let A;A=$localize` Yes, update passphrase now `;let Z;return Z=$localize` Yes, update passphrase now `,[s,l,P,I,v,A,Z,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),g(5,1),_(6,"br")(7,"br"),C(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),H("ngModelChange",function(l){return $(t.passphrase,l)||(t.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),H("ngModelChange",function(l){return $(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),d(16,et,2,0,"sh-icon",14)(17,tt,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),d(21,nt,2,2,"button",18)(22,it,2,3,"button",19),o()),e&2&&(r(11),y("ngModel",t.passphrase),r(4),O("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),k("loader",t.isUpdating()),r(2),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Fe,Te,he,Ee,B,Ie,D,De,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var ot=()=>({exact:!0});function at(i,n){i&1&&(a(0,"sh-icon",26),u(1,"x-bold"),o())}function st(i,n){i&1&&(a(0,"sh-icon",27),u(1,"list-bold"),o())}function rt(i,n){if(i&1){let e=E();ie(0,9),a(1,"button",25),T("click",function(){m(e);let s=c();return h(s.toggleNav())}),d(2,at,2,0,"sh-icon",26)(3,st,2,0,"sh-icon",27),o(),oe()}if(i&2){let e=c();r(2),p(e.isNavOpen()?2:3)}}function lt(i,n){i&1&&(a(0,"sh-icon"),u(1,"sun"),o())}function _t(i,n){i&1&&(a(0,"sh-icon"),u(1,"moon"),o())}function ct(i,n){if(i&1){let e=E();a(0,"button",28),T("click",function(){m(e);let s=c();return h(s.logout())}),g(1,7),_(2,"sh-icon"),C(),o()}}var K=class i{#e=S(we);#t=S(Y);#i=S(Ge);#o=S(Ce);#a=S(fe);#s=S(V);#r=S(ve);#l=S(be);#n=S(Re);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;sidenavType=this.#e.sidenavType;machineName=U(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#s.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#a.open(J,{maxWidth:"500px"})}})}toggleNav(){this.#e.toggleNav()}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=M({type:i,selectors:[["app-layout"]],decls:42,vars:12,consts:()=>{let n;n=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let l;l=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=G(P);let I;I=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#37\uFFFD|\uFFFD/#38\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#37\uFFFD|\uFFFD/#38\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=G(I);let v;return v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,s,l,P,I,v,[3,"isOpenChange","isOpen","disableDrag"],["sidenav-closed-topbar",""],["sidenav",""],["shButton","",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","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["shButton","",1,"small","toggle-sidebar",3,"click"],[1,"cross"],[1,"burger"],["action","",3,"click"]]},template:function(e,t){e&1&&(a(0,"sh-sidenav",8),H("isOpenChange",function(l){return $(t.isNavOpen,l)||(t.isNavOpen=l),l}),d(1,rt,4,1,"ng-container",9),a(2,"div",10)(3,"header"),_(4,"app-logo"),a(5,"button",11),T("click",function(){return t.toggleBodyClass()}),d(6,lt,2,0,"sh-icon")(7,_t,2,0,"sh-icon"),o()(),a(8,"sh-list",12)(9,"button",13),g(10,0),_(11,"sh-icon"),C(),o(),a(12,"button",14),g(13,1),_(14,"sh-icon"),C(),o(),a(15,"button",15),g(16,2),_(17,"sh-icon"),C(),o(),a(18,"button",16),g(19,3),_(20,"sh-icon"),C(),o()(),_(21,"div",17),a(22,"sh-list",18)(23,"div",19)(24,"sh-icon"),u(25,"desktop"),o(),u(26),o(),_(27,"sh-divider"),a(28,"button",20),g(29,4),_(30,"sh-icon"),C(),o(),a(31,"a",21),g(32,5),_(33,"sh-icon")(34,"sh-icon",22),C(),o(),a(35,"a",23),g(36,6),_(37,"sh-icon")(38,"sh-icon",22),C(),o(),d(39,ct,3,0,"button",24),o()(),_(40,"router-outlet")(41,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),y("isOpen",t.isNavOpen),O("disableDrag",!0),r(),p(t.isMobile()?1:-1),r(5),p(t.isDarkMode()?6:7),r(3),O("routerLinkActiveOptions",ce(11,ot)),r(14),O("title",_e(t.machineName())),r(3),b(" ",t.machineName()," "),r(13),p(t.relayIsEnabled()?-1:39))},dependencies:[pe,Se,ge,Me,D,Le,R,Pe,x,ye],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}.toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{position:absolute;inset:auto}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{K as default};
@@ -1 +1 @@
1
- import{a,b}from"./chunk-YDYZVJL7.js";import"./chunk-PD4KFJ3B.js";import"./chunk-T5LLH46J.js";import"./chunk-KK7TLGME.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-SS7TCWY5.js";import"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-FBWFZMGL.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
1
+ import{a,b}from"./chunk-5HQJVUNE.js";import"./chunk-KR56GPXG.js";import"./chunk-T5LLH46J.js";import"./chunk-27UON6YV.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-SS7TCWY5.js";import"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-FBWFZMGL.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
@@ -1 +1 @@
1
- import{a as K}from"./chunk-FXF5TO2Q.js";import"./chunk-SD4AWG7T.js";import{g as q}from"./chunk-YDYZVJL7.js";import"./chunk-PD4KFJ3B.js";import"./chunk-T5LLH46J.js";import{b as Z}from"./chunk-VSLN6R7K.js";import"./chunk-KK7TLGME.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-Y4IW22ZU.js";import{a as V}from"./chunk-6CYY2QG6.js";import"./chunk-AO4ZIHUL.js";import{a as H}from"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import{a as j}from"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-FBWFZMGL.js";import{C as W,L as X,O as z,u as J}from"./chunk-RYXU2QDS.js";import{b as B}from"./chunk-BKANUILG.js";import{b as w}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import{qa as k}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as s,Bb as R,Cc as T,Dc as d,Fb as P,Gb as m,Mc as b,Pa as a,Pb as y,Qb as D,Rb as r,Sb as v,Tb as x,W as c,Xb as g,ba as u,ca as f,cb as A,jc as M,la as I,mc as N,sb as O,tb as p,yb as C,zb as o}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";function Q(n,t){n&1&&(o(0,"div",17),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(o(0,"div",18),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(o(0,"sh-card",10),P(1,16),r(2,2),m(),O(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();a(3),p(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),T(1,"number"),T(2,"number")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileCount)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(P(0),r(1,8),m())}function ne(n,t){if(n&1&&(M(0),T(1,"bytes"),T(2,"bytes")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileSize)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileSize)," ")}}function ie(n,t){n&1&&(P(0),r(1,9),m())}function oe(n,t){if(n&1&&(o(0,"sh-card",10)(1,"h3"),y(2,5),R(3,"sh-spinner",23),D(),s(),o(4,"div",24),R(5,"sh-progress-bar",25),o(6,"p")(7,"span"),r(8,6),s(),O(9,ee,3,6)(10,te,2,0,"ng-container"),s(),o(11,"p")(12,"span"),r(13,7),s(),O(14,ne,3,6)(15,ie,2,0,"ng-container"),s()()()),n&2){let e,i,l,E,S=g();a(3),v((e=S.statusData())==null?null:e.statusText),x(2),a(2),C("value",(i=S.statusData())==null?null:i.OverallProgress),a(4),p((l=S.statusData())!=null&&l.ProcessedFileCount?9:10),a(5),p((E=S.statusData())!=null&&E.ProcessedFileSize?14:15)}}var G=class n{#o=c(B);#s=c(H);#t=c(V);#n=c(q);#r=c(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=I("");#e=null;lastRestoreStarted=b(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#o.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#i(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#_(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#i(e)})}#i(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let i;i=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let S;S=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let $;return $=$localize`N/A`,[t,e,i,l,E,S,h,F,L,$,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,i){if(e&1&&(o(0,"section"),O(1,Y,5,1,"sh-card",10)(2,oe,16,4,"sh-card",10),o(3,"sh-card",11)(4,"h3"),r(5,0),s(),o(6,"div",12),R(7,"app-notifications",13),s()(),o(8,"sh-card",14)(9,"h3"),r(10,1),s(),R(11,"app-logs-live",15),s()()),e&2){let l;a(),p(i.restoreResult()!=""?1:2),a(6),C("notificationFilterPredicate",i.notificationFilterPredicate()),a(4),C("asSimpleList",!0)("polling",i.restoreResult()=="")("whenFilter",(l=i.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",i.backupId())}},dependencies:[K,X,z,J,W,Z,j,k],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{G as default};
1
+ import{a as K}from"./chunk-FXF5TO2Q.js";import"./chunk-SD4AWG7T.js";import{g as q}from"./chunk-5HQJVUNE.js";import"./chunk-KR56GPXG.js";import"./chunk-T5LLH46J.js";import{b as Z}from"./chunk-VSLN6R7K.js";import"./chunk-27UON6YV.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-Y4IW22ZU.js";import{a as V}from"./chunk-6CYY2QG6.js";import"./chunk-AO4ZIHUL.js";import{a as H}from"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import{a as j}from"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-FBWFZMGL.js";import{C as W,L as X,O as z,u as J}from"./chunk-RYXU2QDS.js";import{b as B}from"./chunk-BKANUILG.js";import{b as w}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import{qa as k}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as s,Bb as R,Cc as T,Dc as d,Fb as P,Gb as m,Mc as b,Pa as a,Pb as y,Qb as D,Rb as r,Sb as v,Tb as x,W as c,Xb as g,ba as u,ca as f,cb as A,jc as M,la as I,mc as N,sb as O,tb as p,yb as C,zb as o}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";function Q(n,t){n&1&&(o(0,"div",17),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(o(0,"div",18),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(o(0,"sh-card",10),P(1,16),r(2,2),m(),O(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();a(3),p(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),T(1,"number"),T(2,"number")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileCount)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(P(0),r(1,8),m())}function ne(n,t){if(n&1&&(M(0),T(1,"bytes"),T(2,"bytes")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileSize)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileSize)," ")}}function ie(n,t){n&1&&(P(0),r(1,9),m())}function oe(n,t){if(n&1&&(o(0,"sh-card",10)(1,"h3"),y(2,5),R(3,"sh-spinner",23),D(),s(),o(4,"div",24),R(5,"sh-progress-bar",25),o(6,"p")(7,"span"),r(8,6),s(),O(9,ee,3,6)(10,te,2,0,"ng-container"),s(),o(11,"p")(12,"span"),r(13,7),s(),O(14,ne,3,6)(15,ie,2,0,"ng-container"),s()()()),n&2){let e,i,l,E,S=g();a(3),v((e=S.statusData())==null?null:e.statusText),x(2),a(2),C("value",(i=S.statusData())==null?null:i.OverallProgress),a(4),p((l=S.statusData())!=null&&l.ProcessedFileCount?9:10),a(5),p((E=S.statusData())!=null&&E.ProcessedFileSize?14:15)}}var G=class n{#o=c(B);#s=c(H);#t=c(V);#n=c(q);#r=c(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=I("");#e=null;lastRestoreStarted=b(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#o.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#i(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#_(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#i(e)})}#i(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let i;i=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let S;S=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let $;return $=$localize`N/A`,[t,e,i,l,E,S,h,F,L,$,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,i){if(e&1&&(o(0,"section"),O(1,Y,5,1,"sh-card",10)(2,oe,16,4,"sh-card",10),o(3,"sh-card",11)(4,"h3"),r(5,0),s(),o(6,"div",12),R(7,"app-notifications",13),s()(),o(8,"sh-card",14)(9,"h3"),r(10,1),s(),R(11,"app-logs-live",15),s()()),e&2){let l;a(),p(i.restoreResult()!=""?1:2),a(6),C("notificationFilterPredicate",i.notificationFilterPredicate()),a(4),C("asSimpleList",!0)("polling",i.restoreResult()=="")("whenFilter",(l=i.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",i.backupId())}},dependencies:[K,X,z,J,W,Z,j,k],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{G as default};