@duplicati/ngclient 0.0.219 → 0.0.221

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 (68) hide show
  1. package/assets/dest-icons/drime.png +0 -0
  2. package/{chunk-7C2YZVSQ.js → chunk-3L3SRTPU.js} +1 -1
  3. package/{chunk-DJXLNIMV.js → chunk-43WATFQS.js} +6 -6
  4. package/chunk-5JGSXUKD.js +1 -0
  5. package/chunk-5YE4H57F.js +1 -0
  6. package/{chunk-PG4G4RLP.js → chunk-5ZRRLJA4.js} +1 -1
  7. package/{chunk-XDBSTUYC.js → chunk-6NVCDJR6.js} +1 -1
  8. package/{chunk-WOKYULBU.js → chunk-736PM4LG.js} +1 -1
  9. package/{chunk-XXVDL5TR.js → chunk-77IXQ4GU.js} +1 -1
  10. package/chunk-APSPCDGV.js +1 -0
  11. package/chunk-AXQQEOTT.js +1 -0
  12. package/{chunk-EADZVBRA.js → chunk-BMACDVWX.js} +1 -1
  13. package/{chunk-3RCF6UT4.js → chunk-COI6UMB5.js} +1 -1
  14. package/{chunk-RLWICOKH.js → chunk-CZVTBPNE.js} +1 -1
  15. package/{chunk-GN7AO4B6.js → chunk-DE4JIJWO.js} +1 -1
  16. package/{chunk-ZHQI6LYB.js → chunk-DHFLXFWF.js} +1 -1
  17. package/chunk-E4NQOMJX.js +1 -0
  18. package/chunk-ESLC5LVP.js +1 -0
  19. package/{chunk-I6MIXWIT.js → chunk-F2ZC26DC.js} +1 -1
  20. package/{chunk-BACKG7KA.js → chunk-F3ETZKLK.js} +1 -1
  21. package/{chunk-RJ2JM7C7.js → chunk-F3JYPWPK.js} +1 -1
  22. package/{chunk-4OJPTRZJ.js → chunk-FDYBIC4O.js} +1 -1
  23. package/{chunk-PXI3UZ4R.js → chunk-FR5RTIOE.js} +1 -1
  24. package/{chunk-NKUA7I47.js → chunk-G2BDKU26.js} +1 -1
  25. package/{chunk-2J2554EV.js → chunk-GW34KK5A.js} +1 -1
  26. package/{chunk-22AR7ES3.js → chunk-I5DD3Q6J.js} +1 -1
  27. package/{chunk-NHS6CQO2.js → chunk-JP2Z2HMH.js} +1 -1
  28. package/{chunk-EDLHTWBA.js → chunk-JPMKWWZP.js} +1 -1
  29. package/{chunk-ZP3QZ43W.js → chunk-JSZIISFS.js} +1 -1
  30. package/chunk-LE24LKH7.js +1 -0
  31. package/{chunk-X276XFCH.js → chunk-MTL3FBSM.js} +1 -1
  32. package/{chunk-37ODVJFS.js → chunk-N2GI5QYJ.js} +1 -1
  33. package/chunk-O56QUSSI.js +2 -0
  34. package/{chunk-RRDLQLTM.js → chunk-OCUE5GMT.js} +1 -1
  35. package/{chunk-BZXBH4CN.js → chunk-OJVUCHRP.js} +1 -1
  36. package/chunk-OL7ADIFI.js +1 -0
  37. package/{chunk-P4R3ERID.js → chunk-OLWLWDXZ.js} +1 -1
  38. package/chunk-PPSQGUOL.js +3 -0
  39. package/{chunk-XEG3CP74.js → chunk-QQWV3FEH.js} +1 -1
  40. package/{chunk-ZYRB2TUK.js → chunk-RDLRXAJU.js} +1 -1
  41. package/{chunk-ZNYRWXQR.js → chunk-SACQFUJE.js} +1 -1
  42. package/{chunk-M3PW6DLD.js → chunk-TISQKN7N.js} +1 -1
  43. package/{chunk-IFSZJSGH.js → chunk-TVFRVP7K.js} +1 -1
  44. package/chunk-TWAHUXIN.js +1 -0
  45. package/{chunk-GRE6GKVP.js → chunk-TZ7MW3NZ.js} +1 -1
  46. package/{chunk-VC55KFAX.js → chunk-UZ4POLDC.js} +1 -1
  47. package/{chunk-KDV2OE64.js → chunk-WJBMMY2Y.js} +1 -1
  48. package/{chunk-NX35OQ3V.js → chunk-XBAZKJ47.js} +1 -1
  49. package/chunk-XPVATEBM.js +1 -0
  50. package/{chunk-5RNU5BNO.js → chunk-YMFI2Q2X.js} +1 -1
  51. package/chunk-YPNN5FBK.js +1 -0
  52. package/{chunk-C6PICAXB.js → chunk-YYD2JU6T.js} +1 -1
  53. package/index.html +1 -1
  54. package/{main-JR6IVB6K.js → main-IUT3IXX4.js} +1 -1
  55. package/package.json +1 -1
  56. package/chunk-4OA2FFS5.js +0 -1
  57. package/chunk-AIAUP7OE.js +0 -1
  58. package/chunk-C3PQFWVO.js +0 -1
  59. package/chunk-DSZ644JT.js +0 -1
  60. package/chunk-EPIYGHPM.js +0 -1
  61. package/chunk-EXMYBMGI.js +0 -1
  62. package/chunk-N3NJW75G.js +0 -1
  63. package/chunk-OHYENIPP.js +0 -1
  64. package/chunk-QOWXL7ZL.js +0 -1
  65. package/chunk-QZQS7M3D.js +0 -1
  66. package/chunk-X4BDJA6L.js +0 -3
  67. package/chunk-YWUUX3S6.js +0 -1
  68. package/chunk-ZEFSBETQ.js +0 -2
@@ -1 +1 @@
1
- import{a as pn}from"./chunk-IFSZJSGH.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-I6MIXWIT.js";import{a as ee}from"./chunk-EKVZKEQJ.js";import"./chunk-RJ2JM7C7.js";import{a as me}from"./chunk-WOKYULBU.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-BACKG7KA.js";import{b as Cn,c as Ge}from"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as Oe,E as cn,G as un,L as Le,U as dn,V as En,v as q}from"./chunk-VKQQDCUN.js";import{d as Ne}from"./chunk-DSYNIXJF.js";import{b as rn,e as sn}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import{ha as j,ka as Se}from"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as E,Ab as x,Bb as b,Cb as w,Db as a,Eb as o,F as en,Fb as F,Fc as T,Gc as f,Hc as I,Ic as X,Jb as $,Kb as M,L as nn,Mb as R,Qc as ge,Sa as _,Sc as Fn,Tb as p,Ub as g,Vb as c,Wb as u,Wc as Te,Xb as d,Yb as m,Zb as y,_ as z,da as A,ea as P,gb as W,kc as Y,nc as C,oc as K,p as Ze,pa as h,pc as V,q as H,qc as tn,rc as on,sc as an,tc as _n,uc as ln,vc as Ce,wb as S,wc as pe,xb as O,xc as J,yb as v}from"./chunk-TQTOIWBK.js";import{a as Ee}from"./chunk-7CGTOI24.js";function Sn(n,t){n&1&&F(0,"sh-progress-bar",51)}function On(n,t){n&1&&F(0,"div",54)}function Ln(n,t){n&1&&F(0,"div",54)}function Nn(n,t){n&1&&F(0,"div",55)}function mn(n,t){n&1&&F(0,"div",56)}function Gn(n,t){if(n&1&&(a(0,"details",65)(1,"summary"),p(2,15),F(3,"sh-icon"),a(4,"div",67),F(5,"sh-icon",59),o(),g(),o(),a(6,"div",68)(7,"p"),c(8,16),T(9,"date"),o(),a(10,"p"),c(11,17),T(12,"date"),o(),a(13,"p"),c(14,18),T(15,"durationFormat"),o(),a(16,"p"),c(17,19),o(),F(18,"sh-divider"),a(19,"p"),c(20,20),o(),a(21,"p"),c(22,21),o()()(),a(23,"details",65)(24,"summary"),p(25,22),F(26,"sh-icon"),a(27,"div",67),F(28,"sh-icon",59),o(),g(),o(),a(29,"div",68)(30,"p"),c(31,23),T(32,"date"),o(),a(33,"p"),c(34,24),T(35,"date"),o(),a(36,"p"),c(37,25),T(38,"durationFormat"),o(),F(39,"sh-divider"),a(40,"p"),c(41,26),T(42,"bytes"),o(),a(43,"p"),c(44,27),T(45,"bytes"),o(),a(46,"p"),c(47,28),T(48,"bytes"),o(),F(49,"sh-divider"),a(50,"p"),c(51,29),o(),a(52,"p"),c(53,30),o()()()),n&2){let e=E(2).$implicit;_(9),u(I(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),_(3),u(I(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),_(3),u(f(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),_(2),u(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),_(3),u(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),_(2),u(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),_(10),u(I(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(31),_(3),u(I(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(34),_(3),u(f(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(37),_(4),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(X(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),d(41),_(3),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(X(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),d(44),_(3),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(X(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),d(47),_(3),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(51),_(2),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(53)}}function Dn(n,t){n&1&&(a(0,"p"),C(1,"No messages"),o())}function An(n,t){n&1&&(p(0,43,1),F(1,"sh-icon"),g())}function Pn(n,t){n&1&&(p(0,43,2),F(1,"sh-icon"),g())}function Rn(n,t){if(n&1){let e=R();a(0,"div",69)(1,"code"),C(2),o(),a(3,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(5);return P(L.copyToClipboard(l,r,r))}),p(4,43),S(5,An,2,0,"sh-icon")(6,Pn,2,0,"sh-icon"),g(),o()()}if(n&2){let e=t.$implicit,i=E(5);_(2),K(e),_(3),O(i.copied()==e?5:6)}}function In(n,t){n&1&&(a(0,"p"),C(1,"No warnings"),o())}function $n(n,t){n&1&&(p(0,44,1),F(1,"sh-icon"),g())}function Mn(n,t){n&1&&(p(0,44,2),F(1,"sh-icon"),g())}function fn(n,t){if(n&1){let e=R();a(0,"div",69)(1,"code"),C(2),o(),a(3,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(5);return P(L.copyToClipboard(l,r,r))}),p(4,44),S(5,$n,2,0,"sh-icon")(6,Mn,2,0,"sh-icon"),g(),o()()}if(n&2){let e=t.$implicit,i=E(5);_(2),K(e),_(3),O(i.copied()==e?5:6)}}function hn(n,t){n&1&&(a(0,"p"),C(1,"No errors"),o())}function yn(n,t){n&1&&(p(0,45,1),F(1,"sh-icon"),g())}function Bn(n,t){n&1&&(p(0,45,2),F(1,"sh-icon"),g())}function vn(n,t){if(n&1){let e=R();a(0,"div",69)(1,"code"),C(2),o(),a(3,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(5);return P(L.copyToClipboard(l,r,r))}),p(4,45),S(5,yn,2,0,"sh-icon")(6,Bn,2,0,"sh-icon"),g(),o()()}if(n&2){let e=t.$implicit,i=E(5);_(2),K(e),_(3),O(i.copied()==e?5:6)}}function xn(n,t){if(n&1&&(a(0,"details",65)(1,"summary"),p(2,31),F(3,"sh-icon"),a(4,"div",67),F(5,"sh-icon",59),o(),g(),o(),a(6,"div",68)(7,"p"),c(8,32),T(9,"date"),o(),a(10,"p"),c(11,33),T(12,"date"),o(),a(13,"p"),c(14,34),T(15,"durationFormat"),o(),F(16,"sh-divider"),a(17,"p"),c(18,35),T(19,"bytes"),o(),a(20,"p"),c(21,36),o(),a(22,"p"),c(23,37),o(),a(24,"p"),c(25,38),o(),a(26,"p"),c(27,39),o(),F(28,"sh-divider"),a(29,"details",71)(30,"summary"),p(31,40),F(32,"sh-icon"),a(33,"div",67),F(34,"sh-icon",59),o(),g(),o(),a(35,"div",68),S(36,Dn,2,0,"p"),x(37,Rn,7,2,"div",69,v),o()(),a(39,"details",72)(40,"summary"),p(41,41),F(42,"sh-icon"),a(43,"div",67),F(44,"sh-icon",59),o(),g(),o(),a(45,"div",68),S(46,In,2,0,"p"),x(47,fn,7,2,"div",69,v),o()(),a(49,"details",73)(50,"summary"),p(51,42),F(52,"sh-icon"),a(53,"div",67),F(54,"sh-icon",59),o(),g(),o(),a(55,"div",68),S(56,hn,2,0,"p"),x(57,vn,7,2,"div",69,v),o()(),F(59,"sh-divider"),o()()),n&2){let e=t.$implicit;_(5),u(e.Destination),d(2),_(4),u(I(9,16,e.BeginTime,"medium")),d(8),_(3),u(I(12,19,e.EndTime,"medium")),d(11),_(3),u(f(15,22,e.Duration)),d(14),_(4),u(e.CopiedFileCount)(X(19,24,e.CopiedFileSize,!0,!0)),d(18),_(2),u(e.DeletedFileCount),d(21),_(2),u(e.RenamedFileCount),d(23),_(2),u(e.VerifiedFileCount),d(25),_(2),u(e.FailedVerificationCount),d(27),_(7),u(e.MessagesActualLength),d(31),_(2),O((e.Messages==null?null:e.Messages.length)===0?36:-1),_(),b(e.Messages),_(7),u(e.WarningsActualLength),d(41),_(2),O((e.Warnings==null?null:e.Warnings.length)===0?46:-1),_(),b(e.Warnings),_(7),u(e.ErrorsActualLength),d(51),_(2),O((e.Errors==null?null:e.Errors.length)===0?56:-1),_(),b(e.Errors)}}function bn(n,t){if(n&1&&x(0,xn,60,28,"details",65,v),n&2){let e=E(2).$implicit;b(e.data==null?null:e.data.RemoteSynchronizationResults)}}function kn(n,t){if(n&1&&(a(0,"code"),C(1),T(2,"json"),o()),n&2){let e=t.$implicit;_(),K(f(2,1,e))}}function Kn(n,t){if(n&1&&(a(0,"details",65)(1,"summary"),p(2,46),F(3,"sh-icon"),a(4,"div",67),F(5,"sh-icon",59),o(),g(),o(),a(6,"div",68),x(7,kn,3,3,"code",null,v),o()()),n&2){let e=E(2).$implicit;_(5),u(e.data.VerificationsActualLength),d(2),_(2),b(e.data.Verifications)}}function Un(n,t){n&1&&(a(0,"sh-icon"),C(1,"check"),o())}function wn(n,t){n&1&&(a(0,"sh-icon"),C(1,"copy"),o())}function Jn(n,t){n&1&&($(0),p(1,47),F(2,"sh-icon"),g(),M())}function Xn(n,t){n&1&&($(0),p(1,48),F(2,"sh-icon"),g(),M())}function zn(n,t){n&1&&($(0),p(1,49),F(2,"sh-icon"),g(),M())}function Vn(n,t){if(n&1){let e=R();a(0,"button",75),y("click",function(){A(e),E();let l=J(0),r=E(3);return P(r.toggleWarningSuppression(l.MessageId))}),S(1,Jn,3,0,"ng-container")(2,Xn,3,0,"ng-container")(3,zn,3,0,"ng-container"),o()}if(n&2){E();let e=J(0),i=E(3),l=i.isWarningSuppressed(e.MessageId);w("disabled",i.isSuppressingWarning()),_(),O(i.isSuppressingWarning()?1:l?2:3)}}function Hn(n,t){if(n&1){let e=R();Ce(0),a(1,"div",69)(2,"code"),C(3),o(),a(4,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(3);return P(L.copyToClipboard(l,r,r))}),C(5," Copy "),S(6,Un,2,0,"sh-icon")(7,wn,2,0,"sh-icon"),o(),S(8,Vn,4,2,"button",74),o()}if(n&2){let e=t.$implicit,i=E(3),l=pe(i.parseWarning(e));_(3),K(e),_(3),O(i.copied()==e?6:7),_(2),O(l!=null&&l.MessageId?8:-1)}}function Wn(n,t){n&1&&(a(0,"p"),C(1,"No errors"),o())}function jn(n,t){n&1&&(p(0,50,1),F(1,"sh-icon"),g())}function qn(n,t){n&1&&(p(0,50,2),F(1,"sh-icon"),g())}function Qn(n,t){if(n&1){let e=R();a(0,"div",69)(1,"code"),C(2),o(),a(3,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(3);return P(L.copyToClipboard(l,r,r))}),p(4,50),S(5,jn,2,0,"sh-icon")(6,qn,2,0,"sh-icon"),g(),o()()}if(n&2){let e=t.$implicit,i=E(3);_(2),K(e),_(3),O(i.copied()==e?5:6)}}function Yn(n,t){n&1&&(a(0,"sh-icon"),C(1,"check"),o())}function Zn(n,t){n&1&&(a(0,"sh-icon"),C(1,"copy"),o())}function et(n,t){if(n&1){let e=R();a(0,"section",60)(1,"sh-toggle-card",61),$(2,62),a(3,"h3"),c(4,0),o(),M(),$(5,63),a(6,"p"),c(7,1),T(8,"date"),o(),a(9,"p"),c(10,2),T(11,"date"),o(),a(12,"p"),c(13,3),T(14,"durationFormat"),o(),M(),o(),a(15,"sh-toggle-card",61),$(16,62),a(17,"h3"),c(18,4),o(),M(),$(19,63),a(20,"p"),c(21,5),T(22,"bytes"),o(),a(23,"p"),c(24,6),T(25,"bytes"),o(),a(26,"p"),c(27,7),T(28,"bytes"),o(),a(29,"p"),c(30,8),T(31,"bytes"),o(),a(32,"p"),c(33,9),o(),a(34,"p"),c(35,10),o(),a(36,"p"),c(37,11),o(),M(),o(),a(38,"div",64),F(39,"sh-divider"),S(40,Gn,54,45),S(41,bn,2,0),S(42,Kn,9,1,"details",65),a(43,"details",66)(44,"summary"),p(45,12),F(46,"sh-icon"),a(47,"div",67),F(48,"sh-icon",59),o(),g(),o(),a(49,"div",68),x(50,Hn,9,4,"div",69,v),o()(),a(52,"details",66)(53,"summary"),p(54,13),F(55,"sh-icon"),a(56,"div",67),F(57,"sh-icon",59),o(),g(),o(),a(58,"div",68),S(59,Wn,2,0,"p"),x(60,Qn,7,2,"div",69,v),o()(),F(62,"sh-divider"),a(63,"details")(64,"summary"),p(65,14),F(66,"sh-icon"),a(67,"div",67),F(68,"sh-icon",59),o(),g(),o(),a(69,"code")(70,"button",70),y("click",function(l){A(e);let r=E().$implicit,L=E();return P(L.copyToClipboard(l,L.stringify(r.data),"all"))}),C(71," Copy "),S(72,Yn,2,0,"sh-icon")(73,Zn,2,0,"sh-icon"),o(),C(74),T(75,"json"),o()()()()}if(n&2){let e=E().$implicit,i=E();_(),w("disableToggle",!0),_(7),u(I(8,26,e.data==null?null:e.data.BeginTime,"medium")),d(7),_(3),u(I(11,29,e.data==null?null:e.data.EndTime,"medium")),d(10),_(3),u(f(14,32,e.data==null?null:e.data.Duration)),d(13),_(),w("disableToggle",!0),_(7),u(e.data==null?null:e.data.ExaminedFiles)(X(22,34,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),d(21),_(3),u(e.data==null?null:e.data.OpenedFiles)(X(25,38,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),d(24),_(3),u(e.data==null?null:e.data.AddedFiles)(X(28,42,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),d(27),_(3),u(e.data==null?null:e.data.ModifiedFiles)(X(31,46,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),d(30),_(2),u(e.data==null?null:e.data.DeletedFiles),d(33),_(2),u(e.data==null?null:e.data.TooLargeFiles),d(35),_(2),u(e.data==null?null:e.data.FilesWithError),d(37),_(3),O(e.data!=null&&e.data.TestResults?40:-1),_(),O(e.data!=null&&e.data.RemoteSynchronizationResults?41:-1),_(),O((e.data==null?null:e.data.MainOperation)==="Test"?42:-1),_(),w("open",e.id===i.openEntry()&&i.openSection()==="warnings"),_(5),u(e.data==null?null:e.data.WarningsActualLength),d(45),_(2),b(e.data==null?null:e.data.Warnings),_(2),w("open",e.id===i.openEntry()&&i.openSection()==="errors"),_(5),u(e.data==null?null:e.data.ErrorsActualLength),d(54),_(2),O((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?59:-1),_(),b(e.data==null?null:e.data.Errors),_(12),O(i.copied()=="all"?72:73),_(2),V(" ",f(75,50,e.data)," ")}}function nt(n,t){if(n&1){let e=R();a(0,"article",52)(1,"header",53),y("click",function(){let l=A(e).$implicit,r=E();return P(r.toggleOpenEntry(l))}),S(2,On,1,0,"div",54)(3,Ln,1,0,"div",54)(4,Nn,1,0,"div",55)(5,mn,1,0,"div",56),a(6,"h3"),C(7),T(8,"date"),o(),a(9,"p"),C(10),o(),F(11,"div",57),a(12,"div",58)(13,"sh-icon",59),C(14,"caret-down"),o()()(),S(15,et,76,52,"section",60),o()}if(n&2){let e=t.$implicit,i=E(),l=(e.data==null?null:e.data.ParsedResult)||"Unknown";_(2),O(l=="Fatal"?2:l=="Error"?3:l=="Warning"?4:5),_(5),K(I(8,7,e.timestamp,"medium")),_(3),tn(" ",e.data==null?null:e.data.MainOperation," ",i.getLocalizedSummary(e)," "),_(3),Y("open",e.id===i.openEntry()),_(2),O(e.id===i.openEntry()?15:-1)}}var De=class n{#e=z(Ne);#n=z(me);#t=new Z;#i=new ee;backupId=Te.required();isSuppressingWarning=h(!1);copied=h(null);backupResource=Fn({params:()=>({id:this.backupId()}),loader:({params:t})=>Ze(this.#e.getApiV1BackupById({id:t.id}))});suppressedWarningIds=ge(()=>{let t=this.backupResource.value();if(!t?.Backup?.Settings)return new Set;let e=t.Backup.Settings.find(i=>i.Name==="--suppress-warnings");return e?.Value?new Set(e.Value.split(",").map(i=>i.trim()).filter(Boolean)):new Set});openEntry=h(null);openSection=h(null);pagination=h({offset:0,pagesize:100});resource=Ge({params:()=>Ee({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(H(e=>e.map(i=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,type:i.Type,data:JSON.parse(i.Message),exception:JSON.stringify(i.Exception)==="{}"?null:i.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,i=t.data?.WarningsActualLength??0,l=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let r=this.#i.transform(t.data?.Duration,!0);r.startsWith("0h ")&&(r=r.slice(3)),r.startsWith("0m ")&&(r=r.slice(3)),l.push($localize`took ${r}`)}t.data?.BackendStatistics?.BytesUploaded&&l.push($localize`uploaded ${this.#t.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&l.push($localize`backup size ${this.#t.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&l.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),i!==0&&l.push($localize`:@@warningCount:${i} warning${i===1?"":"s"}`),l.length===0?"":`(${l.join(", ")})`}toggleOpenEntry(t){let e=t.id;if(this.openEntry()===e){this.openEntry.set(null),this.openSection.set(null);return}let i=t.data?.ErrorsActualLength??0,l=t.data?.WarningsActualLength??0;i>0?this.openSection.set("errors"):l>0?this.openSection.set("warnings"):this.openSection.set(null),this.openEntry.set(e)}parseWarning(t){let e=t.match(/^(.*?) - \[(.*?)-(.*?)-(.*?)\]: (.*)$/);if(!e)return null;let[,i,l,r,L,G]=e;return{Timestamp:i,LogLevel:l,Source:r,MessageId:L,Message:G}}isWarningSuppressed(t){return this.suppressedWarningIds().has(t)}toggleWarningSuppression(t){let e=this.backupId();!e||!t||(this.isSuppressingWarning.set(!0),this.#e.getApiV1BackupById({id:e}).pipe(nn(i=>{let l=i.Backup?.Settings??[],r=l.findIndex(N=>N.Name==="--suppress-warnings"),L=this.isWarningSuppressed(t),G="";if(r>=0){let B=(l[r].Value??"").split(",").map(U=>U.trim()).filter(Boolean);L?B=B.filter(U=>U!==t):B.includes(t)||B.push(t),G=B.join(",")}else L||(G=t);let k=l.map(N=>({Name:N.Name,Value:N.Value,Filter:N.Filter}));return r>=0?G===""?k.splice(r,1):k[r]={Name:"--suppress-warnings",Value:G,Filter:null}:G!==""&&k.push({Name:"--suppress-warnings",Value:G,Filter:null}),this.#e.putApiV1BackupById({id:e,requestBody:{Backup:{Name:i.Backup?.Name,Description:i.Backup?.Description,DBPath:i.Backup?.DBPath,Tags:i.Backup?.Tags??[],TargetURL:i.Backup?.TargetURL,ConnectionStringID:i.Backup?.ConnectionStringID,Sources:i.Backup?.Sources??[],Settings:k,Filters:i.Backup?.Filters?.map(N=>({Expression:N.Expression,Include:N.Include,Order:N.Order})),Metadata:i.Backup?.Metadata??{},AdditionalTargetURLs:i.Backup?.AdditionalTargetURLs?.map(N=>({TargetUrl:N.TargetUrl,UrlKey:N.UrlKey,Mode:N.Mode,Interval:N.Interval,ConnectionStringID:N.ConnectionStringID,Options:N.Options}))},Schedule:i.Schedule?{Repeat:i.Schedule.Repeat,Time:i.Schedule.Time,AllowedDays:i.Schedule.AllowedDays}:void 0}})}),en(()=>this.isSuppressingWarning.set(!1))).subscribe({next:()=>{this.#n.getBackups(!0),this.backupResource.reload()},error:i=>{console.error("Failed to toggle warning suppression:",i)}}))}copyToClipboard(t,e,i){t.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(i),setTimeout(()=>{this.copied.set(null)},2e3)}stringify(t){return JSON.stringify(t,null,2)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({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 i;i=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Source files`;let L;L=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let G;G=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let k;k=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let N;N=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let B;B=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let U;U=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let D;D=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#46\uFFFD|\uFFFD/#48\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#47\uFFFD"}:START_TAG_DIV:${"\uFFFD#48\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#46\uFFFD|\uFFFD/#48\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#47\uFFFD"}:CLOSE_TAG_DIV:`,D=m(D);let ne;ne=$localize`${"\uFFFD#55\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#55\uFFFD|\uFFFD/#57\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#56\uFFFD"}:START_TAG_DIV:${"\uFFFD#57\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#55\uFFFD|\uFFFD/#57\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#56\uFFFD"}:CLOSE_TAG_DIV:`,ne=m(ne);let te;te=$localize`${"\uFFFD#66\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#66\uFFFD|\uFFFD/#68\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#67\uFFFD"}:START_TAG_DIV:${"\uFFFD#68\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#66\uFFFD|\uFFFD/#68\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#67\uFFFD"}:CLOSE_TAG_DIV:`,te=m(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=m(ie);let Re;Re=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ie;Ie=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $e;$e=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let he;he=$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=m(oe);let ye;ye=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Be;Be=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ve;ve=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let xe;xe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let be;be=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let ke;ke=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ke;Ke=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ue;Ue=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrows-clockwise${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Secondary destination: ${"\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=m(ae);let we;we=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Je;Je=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Xe;Xe=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ze;ze=$localize` Files copied: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ve;Ve=$localize`Files deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let He;He=$localize`Files renamed: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let We;We=$localize`Files verified: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let je;je=$localize`Failed verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _e;_e=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Messages ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#33\uFFFD"}:START_TAG_DIV:${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#33\uFFFD"}:CLOSE_TAG_DIV:`,_e=m(_e);let le;le=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#43\uFFFD"}:START_TAG_DIV:${"\uFFFD#44\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_DIV:`,le=m(le);let Fe;Fe=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#53\uFFFD"}:START_TAG_DIV:${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#53\uFFFD"}:CLOSE_TAG_DIV:`,Fe=m(Fe);let re;re=$localize` Copy ${"\uFFFD*5: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:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6: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:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,re=m(re);let se;se=$localize` Copy ${"\uFFFD*5: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:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6: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:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,se=m(se);let ce;ce=$localize` Copy ${"\uFFFD*5: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:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6: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:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ce=m(ce);let ue;ue=$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:`,ue=m(ue);let qe;qe=$localize` Updating ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Qe;Qe=$localize` Un-suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ye;Ye=$localize` Suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell-slash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let de;return de=$localize` Copy ${"\uFFFD*5: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:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6: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:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,de=m(de),[t,e,i,l,r,L,G,k,N,B,U,Q,D,ne,te,ie,Re,Ie,$e,Me,fe,he,oe,ye,Be,ve,xe,be,ke,Ke,Ue,ae,we,Je,Xe,ze,Ve,He,We,je,_e,le,Fe,re,se,ce,ue,qe,Qe,Ye,de,[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,"disableToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],["name","details",3,"open"],[1,"actions"],[1,"content"],[1,"warning-item"],["shButton","",1,"small",3,"click"],["name","details-messages"],["name","details-warnings"],["name","details-errors"],["shButton","",1,"small",3,"disabled"],["shButton","",1,"small",3,"click","disabled"]]},template:function(e,i){e&1&&(S(0,Sn,1,0,"sh-progress-bar",51),x(1,nt,16,10,"article",52,v)),e&2&&(O(i.resource.isLoading()?0:-1),_(),b(i.resource.value()))},dependencies:[En,un,Le,Oe,q,Z,j,ee,Se],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[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(0)}details[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_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)}.warning-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}.warning-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-word}.warning-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:flex-start;white-space:nowrap}"],changeDetection:0})};function tt(n,t){n&1&&F(0,"sh-progress-bar",1)}function it(n,t){n&1&&(p(0,0,1),F(1,"sh-icon"),g())}function ot(n,t){n&1&&(p(0,0,2),F(1,"sh-icon"),g())}function at(n,t){if(n&1){let e=R();a(0,"section",6)(1,"button",7),y("click",function(){A(e);let l=E(),r=l.$implicit,L=l.$index,G=E();return P(G.copyToClipboard(r.data,L))}),p(2,0),S(3,it,2,0)(4,ot,2,0),g(),o(),a(5,"code"),C(6),T(7,"json"),o()()}if(n&2){let e=E(),i=e.$implicit,l=e.$index,r=E();_(),Y("success",r.copiedFromIndex()===l),_(2),O(r.copiedFromIndex()===l?3:4),_(3),K(f(7,4,i.data))}}function _t(n,t){if(n&1){let e=R();a(0,"article",2)(1,"header",3),y("click",function(){let l=A(e).$implicit,r=E();return P(r.toggleOpenEntry(l.id))}),a(2,"h3"),C(3),T(4,"date"),o(),a(5,"div",4)(6,"sh-icon",5),C(7,"caret-down"),o()()(),S(8,at,8,6,"section",6),o()}if(n&2){let e=t.$implicit,i=E();_(3),on("",I(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),_(3),Y("open",e.id===i.openEntry()),_(2),O(e.id===i.openEntry()?8:-1)}}var Ae=class n{#e=z(Ne);backupId=Te.required();openEntry=h(null);pagination=h({offset:0,pagesize:100});copiedFromIndex=h(null);resource=Ge({params:()=>Ee({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(H(e=>e.map((i,l)=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,operation:i.Operation,path:i.Path,data:typeof i.Data=="string"?JSON.parse(i.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let i=JSON.stringify(t,null,2);navigator.clipboard.writeText(i),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({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=m(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,i){e&1&&(S(0,tt,1,0,"sh-progress-bar",1),x(1,_t,9,9,"article",2,v)),e&2&&(O(i.resource.isLoading()?0:-1),_(),b(i.resource.value()))},dependencies:[Le,q,Se,j],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 lt(n,t){if(n&1&&(C(0," - "),$(1),c(2,6),M(),C(3),T(4,"durationFormat")),n&2){E(2);let e=J(6);_(3),V(" ",f(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function Ft(n,t){n&1&&($(0),c(1,7),M())}function rt(n,t){if(n&1&&(C(0),T(1,"bytes")),n&2){E(2);let e=J(6);V(" ",f(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function st(n,t){n&1&&($(0),c(1,8),M())}function ct(n,t){if(n&1&&(C(0),T(1,"bytes")),n&2){E(2);let e=J(6);V(" ",f(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function ut(n,t){n&1&&($(0),c(1,9),M())}function dt(n,t){if(n&1&&(a(0,"sh-chip",20),c(1,10),o()),n&2){E(2);let e=J(6);_(),u(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function Et(n,t){n&1&&(a(0,"sh-chip",21),c(1,11),o())}function Ct(n,t){if(n&1&&(a(0,"div",14)(1,"div",19)(2,"h3"),C(3),a(4,"sh-icon"),C(5,"database"),o()(),a(6,"p")(7,"span"),c(8,3),o(),C(9),T(10,"date"),S(11,lt,5,3)(12,Ft,2,0,"ng-container"),o(),a(13,"p")(14,"span"),c(15,4),o(),S(16,rt,2,3)(17,st,2,0,"ng-container"),o(),a(18,"p")(19,"span"),c(20,5),o(),S(21,ct,2,3)(22,ut,2,0,"ng-container"),o()(),S(23,dt,2,1,"sh-chip",20)(24,Et,2,0,"sh-chip",21),o()),n&2){let e=E(),i=J(6);_(3),V(" ",i.Backup.Name??e.MISSING_BACKUP_NAME," "),_(6),V(" ",I(10,6,i.Backup.Metadata==null?null:i.Backup.Metadata.LastBackupDate,"short")," "),_(2),O(i.Backup.Metadata!=null&&i.Backup.Metadata.LastBackupDuration?11:12),_(5),O(i.Backup.Metadata!=null&&i.Backup.Metadata.SourceFilesSize?16:17),_(5),O(i.Backup.Metadata!=null&&i.Backup.Metadata.TargetFilesSize?21:22),_(2),O(i.Backup.Metadata!=null&&i.Backup.Metadata.BackupListCount?23:24)}}function pt(n,t){if(n&1&&F(0,"app-general-log",18),n&2){let e=E();w("backupId",e.backupId())}}function gt(n,t){if(n&1&&F(0,"app-remote-log",18),n&2){let e=E();w("backupId",e.backupId())}}var Pe=class n{#e=z(rn);#n=z(me);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=h("general");backupId=Cn(this.#e.params.pipe(H(t=>t.id)));backup=ge(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-log"]],decls:15,vars:5,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 i;i=$localize`Destination`;let l;l=$localize`Last successful backup:`;let r;r=$localize`Source:`;let L;L=$localize`Destination:`;let G;G=$localize`took`;let k;k=$localize`N/A`;let N;N=$localize`N/A`;let B;B=$localize`N/A`;let U;U=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[t,e,i,l,r,L,G,k,N,B,U,Q,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary",3,"valueChange","value"],["value","general"],["value","destination"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,i){if(e&1){let l=R();F(0,"app-status-bar"),a(1,"section")(2,"div",12)(3,"button",13),p(4,0),F(5,"sh-icon"),g(),o()(),Ce(6),S(7,Ct,25,9,"div",14),a(8,"sh-tabs",15),ln("valueChange",function(L){return A(l),_n(i.activeTab,L)||(i.activeTab=L),P(L)}),a(9,"button",16),c(10,1),o(),a(11,"button",17),c(12,2),o()(),S(13,pt,1,1,"app-general-log",18),S(14,gt,1,1,"app-remote-log",18),o()}if(e&2){_(6);let l=pe(i.backup());_(),O(l?7:-1),_(),an("value",i.activeTab),_(5),O(i.activeTab()==="general"?13:-1),_(),O(i.activeTab()==="destination"?14:-1)}},dependencies:[dn,De,Ae,sn,pn,q,Oe,cn,Z,ee,j],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{Pe as default};
1
+ import{a as pn}from"./chunk-TVFRVP7K.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-F2ZC26DC.js";import{a as ee}from"./chunk-EKVZKEQJ.js";import"./chunk-F3JYPWPK.js";import{a as me}from"./chunk-736PM4LG.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-F3ETZKLK.js";import{b as Cn,c as Ge}from"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as Oe,E as cn,G as un,L as Le,U as dn,V as En,v as q}from"./chunk-VKQQDCUN.js";import{d as Ne}from"./chunk-DSYNIXJF.js";import{b as rn,e as sn}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import{ha as j,ka as Se}from"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as E,Ab as x,Bb as b,Cb as w,Db as a,Eb as o,F as en,Fb as F,Fc as T,Gc as f,Hc as I,Ic as X,Jb as $,Kb as M,L as nn,Mb as R,Qc as ge,Sa as _,Sc as Fn,Tb as p,Ub as g,Vb as c,Wb as u,Wc as Te,Xb as d,Yb as m,Zb as y,_ as z,da as A,ea as P,gb as W,kc as Y,nc as C,oc as K,p as Ze,pa as h,pc as V,q as H,qc as tn,rc as on,sc as an,tc as _n,uc as ln,vc as Ce,wb as S,wc as pe,xb as O,xc as J,yb as v}from"./chunk-TQTOIWBK.js";import{a as Ee}from"./chunk-7CGTOI24.js";function Sn(n,t){n&1&&F(0,"sh-progress-bar",51)}function On(n,t){n&1&&F(0,"div",54)}function Ln(n,t){n&1&&F(0,"div",54)}function Nn(n,t){n&1&&F(0,"div",55)}function mn(n,t){n&1&&F(0,"div",56)}function Gn(n,t){if(n&1&&(a(0,"details",65)(1,"summary"),p(2,15),F(3,"sh-icon"),a(4,"div",67),F(5,"sh-icon",59),o(),g(),o(),a(6,"div",68)(7,"p"),c(8,16),T(9,"date"),o(),a(10,"p"),c(11,17),T(12,"date"),o(),a(13,"p"),c(14,18),T(15,"durationFormat"),o(),a(16,"p"),c(17,19),o(),F(18,"sh-divider"),a(19,"p"),c(20,20),o(),a(21,"p"),c(22,21),o()()(),a(23,"details",65)(24,"summary"),p(25,22),F(26,"sh-icon"),a(27,"div",67),F(28,"sh-icon",59),o(),g(),o(),a(29,"div",68)(30,"p"),c(31,23),T(32,"date"),o(),a(33,"p"),c(34,24),T(35,"date"),o(),a(36,"p"),c(37,25),T(38,"durationFormat"),o(),F(39,"sh-divider"),a(40,"p"),c(41,26),T(42,"bytes"),o(),a(43,"p"),c(44,27),T(45,"bytes"),o(),a(46,"p"),c(47,28),T(48,"bytes"),o(),F(49,"sh-divider"),a(50,"p"),c(51,29),o(),a(52,"p"),c(53,30),o()()()),n&2){let e=E(2).$implicit;_(9),u(I(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),_(3),u(I(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),_(3),u(f(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),_(2),u(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),_(3),u(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),_(2),u(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),_(10),u(I(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(31),_(3),u(I(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(34),_(3),u(f(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(37),_(4),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(X(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),d(41),_(3),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(X(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),d(44),_(3),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(X(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),d(47),_(3),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(51),_(2),u(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(53)}}function Dn(n,t){n&1&&(a(0,"p"),C(1,"No messages"),o())}function An(n,t){n&1&&(p(0,43,1),F(1,"sh-icon"),g())}function Pn(n,t){n&1&&(p(0,43,2),F(1,"sh-icon"),g())}function Rn(n,t){if(n&1){let e=R();a(0,"div",69)(1,"code"),C(2),o(),a(3,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(5);return P(L.copyToClipboard(l,r,r))}),p(4,43),S(5,An,2,0,"sh-icon")(6,Pn,2,0,"sh-icon"),g(),o()()}if(n&2){let e=t.$implicit,i=E(5);_(2),K(e),_(3),O(i.copied()==e?5:6)}}function In(n,t){n&1&&(a(0,"p"),C(1,"No warnings"),o())}function $n(n,t){n&1&&(p(0,44,1),F(1,"sh-icon"),g())}function Mn(n,t){n&1&&(p(0,44,2),F(1,"sh-icon"),g())}function fn(n,t){if(n&1){let e=R();a(0,"div",69)(1,"code"),C(2),o(),a(3,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(5);return P(L.copyToClipboard(l,r,r))}),p(4,44),S(5,$n,2,0,"sh-icon")(6,Mn,2,0,"sh-icon"),g(),o()()}if(n&2){let e=t.$implicit,i=E(5);_(2),K(e),_(3),O(i.copied()==e?5:6)}}function hn(n,t){n&1&&(a(0,"p"),C(1,"No errors"),o())}function yn(n,t){n&1&&(p(0,45,1),F(1,"sh-icon"),g())}function Bn(n,t){n&1&&(p(0,45,2),F(1,"sh-icon"),g())}function vn(n,t){if(n&1){let e=R();a(0,"div",69)(1,"code"),C(2),o(),a(3,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(5);return P(L.copyToClipboard(l,r,r))}),p(4,45),S(5,yn,2,0,"sh-icon")(6,Bn,2,0,"sh-icon"),g(),o()()}if(n&2){let e=t.$implicit,i=E(5);_(2),K(e),_(3),O(i.copied()==e?5:6)}}function xn(n,t){if(n&1&&(a(0,"details",65)(1,"summary"),p(2,31),F(3,"sh-icon"),a(4,"div",67),F(5,"sh-icon",59),o(),g(),o(),a(6,"div",68)(7,"p"),c(8,32),T(9,"date"),o(),a(10,"p"),c(11,33),T(12,"date"),o(),a(13,"p"),c(14,34),T(15,"durationFormat"),o(),F(16,"sh-divider"),a(17,"p"),c(18,35),T(19,"bytes"),o(),a(20,"p"),c(21,36),o(),a(22,"p"),c(23,37),o(),a(24,"p"),c(25,38),o(),a(26,"p"),c(27,39),o(),F(28,"sh-divider"),a(29,"details",71)(30,"summary"),p(31,40),F(32,"sh-icon"),a(33,"div",67),F(34,"sh-icon",59),o(),g(),o(),a(35,"div",68),S(36,Dn,2,0,"p"),x(37,Rn,7,2,"div",69,v),o()(),a(39,"details",72)(40,"summary"),p(41,41),F(42,"sh-icon"),a(43,"div",67),F(44,"sh-icon",59),o(),g(),o(),a(45,"div",68),S(46,In,2,0,"p"),x(47,fn,7,2,"div",69,v),o()(),a(49,"details",73)(50,"summary"),p(51,42),F(52,"sh-icon"),a(53,"div",67),F(54,"sh-icon",59),o(),g(),o(),a(55,"div",68),S(56,hn,2,0,"p"),x(57,vn,7,2,"div",69,v),o()(),F(59,"sh-divider"),o()()),n&2){let e=t.$implicit;_(5),u(e.Destination),d(2),_(4),u(I(9,16,e.BeginTime,"medium")),d(8),_(3),u(I(12,19,e.EndTime,"medium")),d(11),_(3),u(f(15,22,e.Duration)),d(14),_(4),u(e.CopiedFileCount)(X(19,24,e.CopiedFileSize,!0,!0)),d(18),_(2),u(e.DeletedFileCount),d(21),_(2),u(e.RenamedFileCount),d(23),_(2),u(e.VerifiedFileCount),d(25),_(2),u(e.FailedVerificationCount),d(27),_(7),u(e.MessagesActualLength),d(31),_(2),O((e.Messages==null?null:e.Messages.length)===0?36:-1),_(),b(e.Messages),_(7),u(e.WarningsActualLength),d(41),_(2),O((e.Warnings==null?null:e.Warnings.length)===0?46:-1),_(),b(e.Warnings),_(7),u(e.ErrorsActualLength),d(51),_(2),O((e.Errors==null?null:e.Errors.length)===0?56:-1),_(),b(e.Errors)}}function bn(n,t){if(n&1&&x(0,xn,60,28,"details",65,v),n&2){let e=E(2).$implicit;b(e.data==null?null:e.data.RemoteSynchronizationResults)}}function kn(n,t){if(n&1&&(a(0,"code"),C(1),T(2,"json"),o()),n&2){let e=t.$implicit;_(),K(f(2,1,e))}}function Kn(n,t){if(n&1&&(a(0,"details",65)(1,"summary"),p(2,46),F(3,"sh-icon"),a(4,"div",67),F(5,"sh-icon",59),o(),g(),o(),a(6,"div",68),x(7,kn,3,3,"code",null,v),o()()),n&2){let e=E(2).$implicit;_(5),u(e.data.VerificationsActualLength),d(2),_(2),b(e.data.Verifications)}}function Un(n,t){n&1&&(a(0,"sh-icon"),C(1,"check"),o())}function wn(n,t){n&1&&(a(0,"sh-icon"),C(1,"copy"),o())}function Jn(n,t){n&1&&($(0),p(1,47),F(2,"sh-icon"),g(),M())}function Xn(n,t){n&1&&($(0),p(1,48),F(2,"sh-icon"),g(),M())}function zn(n,t){n&1&&($(0),p(1,49),F(2,"sh-icon"),g(),M())}function Vn(n,t){if(n&1){let e=R();a(0,"button",75),y("click",function(){A(e),E();let l=J(0),r=E(3);return P(r.toggleWarningSuppression(l.MessageId))}),S(1,Jn,3,0,"ng-container")(2,Xn,3,0,"ng-container")(3,zn,3,0,"ng-container"),o()}if(n&2){E();let e=J(0),i=E(3),l=i.isWarningSuppressed(e.MessageId);w("disabled",i.isSuppressingWarning()),_(),O(i.isSuppressingWarning()?1:l?2:3)}}function Hn(n,t){if(n&1){let e=R();Ce(0),a(1,"div",69)(2,"code"),C(3),o(),a(4,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(3);return P(L.copyToClipboard(l,r,r))}),C(5," Copy "),S(6,Un,2,0,"sh-icon")(7,wn,2,0,"sh-icon"),o(),S(8,Vn,4,2,"button",74),o()}if(n&2){let e=t.$implicit,i=E(3),l=pe(i.parseWarning(e));_(3),K(e),_(3),O(i.copied()==e?6:7),_(2),O(l!=null&&l.MessageId?8:-1)}}function Wn(n,t){n&1&&(a(0,"p"),C(1,"No errors"),o())}function jn(n,t){n&1&&(p(0,50,1),F(1,"sh-icon"),g())}function qn(n,t){n&1&&(p(0,50,2),F(1,"sh-icon"),g())}function Qn(n,t){if(n&1){let e=R();a(0,"div",69)(1,"code"),C(2),o(),a(3,"button",70),y("click",function(l){let r=A(e).$implicit,L=E(3);return P(L.copyToClipboard(l,r,r))}),p(4,50),S(5,jn,2,0,"sh-icon")(6,qn,2,0,"sh-icon"),g(),o()()}if(n&2){let e=t.$implicit,i=E(3);_(2),K(e),_(3),O(i.copied()==e?5:6)}}function Yn(n,t){n&1&&(a(0,"sh-icon"),C(1,"check"),o())}function Zn(n,t){n&1&&(a(0,"sh-icon"),C(1,"copy"),o())}function et(n,t){if(n&1){let e=R();a(0,"section",60)(1,"sh-toggle-card",61),$(2,62),a(3,"h3"),c(4,0),o(),M(),$(5,63),a(6,"p"),c(7,1),T(8,"date"),o(),a(9,"p"),c(10,2),T(11,"date"),o(),a(12,"p"),c(13,3),T(14,"durationFormat"),o(),M(),o(),a(15,"sh-toggle-card",61),$(16,62),a(17,"h3"),c(18,4),o(),M(),$(19,63),a(20,"p"),c(21,5),T(22,"bytes"),o(),a(23,"p"),c(24,6),T(25,"bytes"),o(),a(26,"p"),c(27,7),T(28,"bytes"),o(),a(29,"p"),c(30,8),T(31,"bytes"),o(),a(32,"p"),c(33,9),o(),a(34,"p"),c(35,10),o(),a(36,"p"),c(37,11),o(),M(),o(),a(38,"div",64),F(39,"sh-divider"),S(40,Gn,54,45),S(41,bn,2,0),S(42,Kn,9,1,"details",65),a(43,"details",66)(44,"summary"),p(45,12),F(46,"sh-icon"),a(47,"div",67),F(48,"sh-icon",59),o(),g(),o(),a(49,"div",68),x(50,Hn,9,4,"div",69,v),o()(),a(52,"details",66)(53,"summary"),p(54,13),F(55,"sh-icon"),a(56,"div",67),F(57,"sh-icon",59),o(),g(),o(),a(58,"div",68),S(59,Wn,2,0,"p"),x(60,Qn,7,2,"div",69,v),o()(),F(62,"sh-divider"),a(63,"details")(64,"summary"),p(65,14),F(66,"sh-icon"),a(67,"div",67),F(68,"sh-icon",59),o(),g(),o(),a(69,"code")(70,"button",70),y("click",function(l){A(e);let r=E().$implicit,L=E();return P(L.copyToClipboard(l,L.stringify(r.data),"all"))}),C(71," Copy "),S(72,Yn,2,0,"sh-icon")(73,Zn,2,0,"sh-icon"),o(),C(74),T(75,"json"),o()()()()}if(n&2){let e=E().$implicit,i=E();_(),w("disableToggle",!0),_(7),u(I(8,26,e.data==null?null:e.data.BeginTime,"medium")),d(7),_(3),u(I(11,29,e.data==null?null:e.data.EndTime,"medium")),d(10),_(3),u(f(14,32,e.data==null?null:e.data.Duration)),d(13),_(),w("disableToggle",!0),_(7),u(e.data==null?null:e.data.ExaminedFiles)(X(22,34,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),d(21),_(3),u(e.data==null?null:e.data.OpenedFiles)(X(25,38,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),d(24),_(3),u(e.data==null?null:e.data.AddedFiles)(X(28,42,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),d(27),_(3),u(e.data==null?null:e.data.ModifiedFiles)(X(31,46,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),d(30),_(2),u(e.data==null?null:e.data.DeletedFiles),d(33),_(2),u(e.data==null?null:e.data.TooLargeFiles),d(35),_(2),u(e.data==null?null:e.data.FilesWithError),d(37),_(3),O(e.data!=null&&e.data.TestResults?40:-1),_(),O(e.data!=null&&e.data.RemoteSynchronizationResults?41:-1),_(),O((e.data==null?null:e.data.MainOperation)==="Test"?42:-1),_(),w("open",e.id===i.openEntry()&&i.openSection()==="warnings"),_(5),u(e.data==null?null:e.data.WarningsActualLength),d(45),_(2),b(e.data==null?null:e.data.Warnings),_(2),w("open",e.id===i.openEntry()&&i.openSection()==="errors"),_(5),u(e.data==null?null:e.data.ErrorsActualLength),d(54),_(2),O((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?59:-1),_(),b(e.data==null?null:e.data.Errors),_(12),O(i.copied()=="all"?72:73),_(2),V(" ",f(75,50,e.data)," ")}}function nt(n,t){if(n&1){let e=R();a(0,"article",52)(1,"header",53),y("click",function(){let l=A(e).$implicit,r=E();return P(r.toggleOpenEntry(l))}),S(2,On,1,0,"div",54)(3,Ln,1,0,"div",54)(4,Nn,1,0,"div",55)(5,mn,1,0,"div",56),a(6,"h3"),C(7),T(8,"date"),o(),a(9,"p"),C(10),o(),F(11,"div",57),a(12,"div",58)(13,"sh-icon",59),C(14,"caret-down"),o()()(),S(15,et,76,52,"section",60),o()}if(n&2){let e=t.$implicit,i=E(),l=(e.data==null?null:e.data.ParsedResult)||"Unknown";_(2),O(l=="Fatal"?2:l=="Error"?3:l=="Warning"?4:5),_(5),K(I(8,7,e.timestamp,"medium")),_(3),tn(" ",e.data==null?null:e.data.MainOperation," ",i.getLocalizedSummary(e)," "),_(3),Y("open",e.id===i.openEntry()),_(2),O(e.id===i.openEntry()?15:-1)}}var De=class n{#e=z(Ne);#n=z(me);#t=new Z;#i=new ee;backupId=Te.required();isSuppressingWarning=h(!1);copied=h(null);backupResource=Fn({params:()=>({id:this.backupId()}),loader:({params:t})=>Ze(this.#e.getApiV1BackupById({id:t.id}))});suppressedWarningIds=ge(()=>{let t=this.backupResource.value();if(!t?.Backup?.Settings)return new Set;let e=t.Backup.Settings.find(i=>i.Name==="--suppress-warnings");return e?.Value?new Set(e.Value.split(",").map(i=>i.trim()).filter(Boolean)):new Set});openEntry=h(null);openSection=h(null);pagination=h({offset:0,pagesize:100});resource=Ge({params:()=>Ee({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(H(e=>e.map(i=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,type:i.Type,data:JSON.parse(i.Message),exception:JSON.stringify(i.Exception)==="{}"?null:i.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,i=t.data?.WarningsActualLength??0,l=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let r=this.#i.transform(t.data?.Duration,!0);r.startsWith("0h ")&&(r=r.slice(3)),r.startsWith("0m ")&&(r=r.slice(3)),l.push($localize`took ${r}`)}t.data?.BackendStatistics?.BytesUploaded&&l.push($localize`uploaded ${this.#t.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&l.push($localize`backup size ${this.#t.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&l.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),i!==0&&l.push($localize`:@@warningCount:${i} warning${i===1?"":"s"}`),l.length===0?"":`(${l.join(", ")})`}toggleOpenEntry(t){let e=t.id;if(this.openEntry()===e){this.openEntry.set(null),this.openSection.set(null);return}let i=t.data?.ErrorsActualLength??0,l=t.data?.WarningsActualLength??0;i>0?this.openSection.set("errors"):l>0?this.openSection.set("warnings"):this.openSection.set(null),this.openEntry.set(e)}parseWarning(t){let e=t.match(/^(.*?) - \[(.*?)-(.*?)-(.*?)\]: (.*)$/);if(!e)return null;let[,i,l,r,L,G]=e;return{Timestamp:i,LogLevel:l,Source:r,MessageId:L,Message:G}}isWarningSuppressed(t){return this.suppressedWarningIds().has(t)}toggleWarningSuppression(t){let e=this.backupId();!e||!t||(this.isSuppressingWarning.set(!0),this.#e.getApiV1BackupById({id:e}).pipe(nn(i=>{let l=i.Backup?.Settings??[],r=l.findIndex(N=>N.Name==="--suppress-warnings"),L=this.isWarningSuppressed(t),G="";if(r>=0){let B=(l[r].Value??"").split(",").map(U=>U.trim()).filter(Boolean);L?B=B.filter(U=>U!==t):B.includes(t)||B.push(t),G=B.join(",")}else L||(G=t);let k=l.map(N=>({Name:N.Name,Value:N.Value,Filter:N.Filter}));return r>=0?G===""?k.splice(r,1):k[r]={Name:"--suppress-warnings",Value:G,Filter:null}:G!==""&&k.push({Name:"--suppress-warnings",Value:G,Filter:null}),this.#e.putApiV1BackupById({id:e,requestBody:{Backup:{Name:i.Backup?.Name,Description:i.Backup?.Description,DBPath:i.Backup?.DBPath,Tags:i.Backup?.Tags??[],TargetURL:i.Backup?.TargetURL,ConnectionStringID:i.Backup?.ConnectionStringID,Sources:i.Backup?.Sources??[],Settings:k,Filters:i.Backup?.Filters?.map(N=>({Expression:N.Expression,Include:N.Include,Order:N.Order})),Metadata:i.Backup?.Metadata??{},AdditionalTargetURLs:i.Backup?.AdditionalTargetURLs?.map(N=>({TargetUrl:N.TargetUrl,UrlKey:N.UrlKey,Mode:N.Mode,Interval:N.Interval,ConnectionStringID:N.ConnectionStringID,Options:N.Options}))},Schedule:i.Schedule?{Repeat:i.Schedule.Repeat,Time:i.Schedule.Time,AllowedDays:i.Schedule.AllowedDays}:void 0}})}),en(()=>this.isSuppressingWarning.set(!1))).subscribe({next:()=>{this.#n.getBackups(!0),this.backupResource.reload()},error:i=>{console.error("Failed to toggle warning suppression:",i)}}))}copyToClipboard(t,e,i){t.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(i),setTimeout(()=>{this.copied.set(null)},2e3)}stringify(t){return JSON.stringify(t,null,2)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({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 i;i=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Source files`;let L;L=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let G;G=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let k;k=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let N;N=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let B;B=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let U;U=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let D;D=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#46\uFFFD|\uFFFD/#48\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#47\uFFFD"}:START_TAG_DIV:${"\uFFFD#48\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#46\uFFFD|\uFFFD/#48\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#47\uFFFD"}:CLOSE_TAG_DIV:`,D=m(D);let ne;ne=$localize`${"\uFFFD#55\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#55\uFFFD|\uFFFD/#57\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#56\uFFFD"}:START_TAG_DIV:${"\uFFFD#57\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#55\uFFFD|\uFFFD/#57\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#56\uFFFD"}:CLOSE_TAG_DIV:`,ne=m(ne);let te;te=$localize`${"\uFFFD#66\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#66\uFFFD|\uFFFD/#68\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#67\uFFFD"}:START_TAG_DIV:${"\uFFFD#68\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#66\uFFFD|\uFFFD/#68\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#67\uFFFD"}:CLOSE_TAG_DIV:`,te=m(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=m(ie);let Re;Re=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ie;Ie=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $e;$e=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let he;he=$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=m(oe);let ye;ye=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Be;Be=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ve;ve=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let xe;xe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let be;be=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let ke;ke=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ke;Ke=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ue;Ue=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrows-clockwise${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Secondary destination: ${"\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=m(ae);let we;we=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Je;Je=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Xe;Xe=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ze;ze=$localize` Files copied: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ve;Ve=$localize`Files deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let He;He=$localize`Files renamed: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let We;We=$localize`Files verified: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let je;je=$localize`Failed verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _e;_e=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Messages ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#33\uFFFD"}:START_TAG_DIV:${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#33\uFFFD"}:CLOSE_TAG_DIV:`,_e=m(_e);let le;le=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#43\uFFFD"}:START_TAG_DIV:${"\uFFFD#44\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_DIV:`,le=m(le);let Fe;Fe=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#53\uFFFD"}:START_TAG_DIV:${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#53\uFFFD"}:CLOSE_TAG_DIV:`,Fe=m(Fe);let re;re=$localize` Copy ${"\uFFFD*5: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:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6: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:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,re=m(re);let se;se=$localize` Copy ${"\uFFFD*5: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:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6: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:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,se=m(se);let ce;ce=$localize` Copy ${"\uFFFD*5: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:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6: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:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ce=m(ce);let ue;ue=$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:`,ue=m(ue);let qe;qe=$localize` Updating ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Qe;Qe=$localize` Un-suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ye;Ye=$localize` Suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell-slash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let de;return de=$localize` Copy ${"\uFFFD*5: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:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6: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:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,de=m(de),[t,e,i,l,r,L,G,k,N,B,U,Q,D,ne,te,ie,Re,Ie,$e,Me,fe,he,oe,ye,Be,ve,xe,be,ke,Ke,Ue,ae,we,Je,Xe,ze,Ve,He,We,je,_e,le,Fe,re,se,ce,ue,qe,Qe,Ye,de,[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,"disableToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],["name","details",3,"open"],[1,"actions"],[1,"content"],[1,"warning-item"],["shButton","",1,"small",3,"click"],["name","details-messages"],["name","details-warnings"],["name","details-errors"],["shButton","",1,"small",3,"disabled"],["shButton","",1,"small",3,"click","disabled"]]},template:function(e,i){e&1&&(S(0,Sn,1,0,"sh-progress-bar",51),x(1,nt,16,10,"article",52,v)),e&2&&(O(i.resource.isLoading()?0:-1),_(),b(i.resource.value()))},dependencies:[En,un,Le,Oe,q,Z,j,ee,Se],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[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(0)}details[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_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)}.warning-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}.warning-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-word}.warning-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:flex-start;white-space:nowrap}"],changeDetection:0})};function tt(n,t){n&1&&F(0,"sh-progress-bar",1)}function it(n,t){n&1&&(p(0,0,1),F(1,"sh-icon"),g())}function ot(n,t){n&1&&(p(0,0,2),F(1,"sh-icon"),g())}function at(n,t){if(n&1){let e=R();a(0,"section",6)(1,"button",7),y("click",function(){A(e);let l=E(),r=l.$implicit,L=l.$index,G=E();return P(G.copyToClipboard(r.data,L))}),p(2,0),S(3,it,2,0)(4,ot,2,0),g(),o(),a(5,"code"),C(6),T(7,"json"),o()()}if(n&2){let e=E(),i=e.$implicit,l=e.$index,r=E();_(),Y("success",r.copiedFromIndex()===l),_(2),O(r.copiedFromIndex()===l?3:4),_(3),K(f(7,4,i.data))}}function _t(n,t){if(n&1){let e=R();a(0,"article",2)(1,"header",3),y("click",function(){let l=A(e).$implicit,r=E();return P(r.toggleOpenEntry(l.id))}),a(2,"h3"),C(3),T(4,"date"),o(),a(5,"div",4)(6,"sh-icon",5),C(7,"caret-down"),o()()(),S(8,at,8,6,"section",6),o()}if(n&2){let e=t.$implicit,i=E();_(3),on("",I(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),_(3),Y("open",e.id===i.openEntry()),_(2),O(e.id===i.openEntry()?8:-1)}}var Ae=class n{#e=z(Ne);backupId=Te.required();openEntry=h(null);pagination=h({offset:0,pagesize:100});copiedFromIndex=h(null);resource=Ge({params:()=>Ee({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(H(e=>e.map((i,l)=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,operation:i.Operation,path:i.Path,data:typeof i.Data=="string"?JSON.parse(i.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let i=JSON.stringify(t,null,2);navigator.clipboard.writeText(i),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({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=m(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,i){e&1&&(S(0,tt,1,0,"sh-progress-bar",1),x(1,_t,9,9,"article",2,v)),e&2&&(O(i.resource.isLoading()?0:-1),_(),b(i.resource.value()))},dependencies:[Le,q,Se,j],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 lt(n,t){if(n&1&&(C(0," - "),$(1),c(2,6),M(),C(3),T(4,"durationFormat")),n&2){E(2);let e=J(6);_(3),V(" ",f(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function Ft(n,t){n&1&&($(0),c(1,7),M())}function rt(n,t){if(n&1&&(C(0),T(1,"bytes")),n&2){E(2);let e=J(6);V(" ",f(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function st(n,t){n&1&&($(0),c(1,8),M())}function ct(n,t){if(n&1&&(C(0),T(1,"bytes")),n&2){E(2);let e=J(6);V(" ",f(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function ut(n,t){n&1&&($(0),c(1,9),M())}function dt(n,t){if(n&1&&(a(0,"sh-chip",20),c(1,10),o()),n&2){E(2);let e=J(6);_(),u(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function Et(n,t){n&1&&(a(0,"sh-chip",21),c(1,11),o())}function Ct(n,t){if(n&1&&(a(0,"div",14)(1,"div",19)(2,"h3"),C(3),a(4,"sh-icon"),C(5,"database"),o()(),a(6,"p")(7,"span"),c(8,3),o(),C(9),T(10,"date"),S(11,lt,5,3)(12,Ft,2,0,"ng-container"),o(),a(13,"p")(14,"span"),c(15,4),o(),S(16,rt,2,3)(17,st,2,0,"ng-container"),o(),a(18,"p")(19,"span"),c(20,5),o(),S(21,ct,2,3)(22,ut,2,0,"ng-container"),o()(),S(23,dt,2,1,"sh-chip",20)(24,Et,2,0,"sh-chip",21),o()),n&2){let e=E(),i=J(6);_(3),V(" ",i.Backup.Name??e.MISSING_BACKUP_NAME," "),_(6),V(" ",I(10,6,i.Backup.Metadata==null?null:i.Backup.Metadata.LastBackupFinished,"short")," "),_(2),O(i.Backup.Metadata!=null&&i.Backup.Metadata.LastBackupDuration?11:12),_(5),O(i.Backup.Metadata!=null&&i.Backup.Metadata.SourceFilesSize?16:17),_(5),O(i.Backup.Metadata!=null&&i.Backup.Metadata.TargetFilesSize?21:22),_(2),O(i.Backup.Metadata!=null&&i.Backup.Metadata.BackupListCount?23:24)}}function pt(n,t){if(n&1&&F(0,"app-general-log",18),n&2){let e=E();w("backupId",e.backupId())}}function gt(n,t){if(n&1&&F(0,"app-remote-log",18),n&2){let e=E();w("backupId",e.backupId())}}var Pe=class n{#e=z(rn);#n=z(me);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=h("general");backupId=Cn(this.#e.params.pipe(H(t=>t.id)));backup=ge(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-log"]],decls:15,vars:5,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 i;i=$localize`Destination`;let l;l=$localize`Last successful backup:`;let r;r=$localize`Source:`;let L;L=$localize`Destination:`;let G;G=$localize`took`;let k;k=$localize`N/A`;let N;N=$localize`N/A`;let B;B=$localize`N/A`;let U;U=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[t,e,i,l,r,L,G,k,N,B,U,Q,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary",3,"valueChange","value"],["value","general"],["value","destination"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,i){if(e&1){let l=R();F(0,"app-status-bar"),a(1,"section")(2,"div",12)(3,"button",13),p(4,0),F(5,"sh-icon"),g(),o()(),Ce(6),S(7,Ct,25,9,"div",14),a(8,"sh-tabs",15),ln("valueChange",function(L){return A(l),_n(i.activeTab,L)||(i.activeTab=L),P(L)}),a(9,"button",16),c(10,1),o(),a(11,"button",17),c(12,2),o()(),S(13,pt,1,1,"app-general-log",18),S(14,gt,1,1,"app-remote-log",18),o()}if(e&2){_(6);let l=pe(i.backup());_(),O(l?7:-1),_(),an("value",i.activeTab),_(5),O(i.activeTab()==="general"?13:-1),_(),O(i.activeTab()==="destination"?14:-1)}},dependencies:[dn,De,Ae,sn,pn,q,Oe,cn,Z,ee,j],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{Pe as default};
@@ -0,0 +1 @@
1
+ import{b as v}from"./chunk-F3JYPWPK.js";import{a as N,b}from"./chunk-E4NQOMJX.js";import{a as S}from"./chunk-YYD2JU6T.js";import{d as g}from"./chunk-DSYNIXJF.js";import{A as d,D as o,N as p,Qc as m,V as u,_ as s,l as f,pa as c,ra as n,w as h}from"./chunk-TQTOIWBK.js";var l=class r{#e=s(g);#o=s(v);#s=s(b);#a=s(S);#n=s(N);serverState=this.#o.serverState;serverStateEffect=n(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#r=-1;#t=c([]);#i=c([]);notifications=this.#t.asReadonly();pendingRefresh=!1;constructor(){this.#n.subscribe("notifications")}init(){this.notifications().length===0&&this.getNotifications()}notificationsEffect=n(()=>{let t=this.#n.notificationState();t&&this.#t.set(t)});pendingRefreshEffect=n(()=>{this.#s.isConnectionMethodSet()&&this.pendingRefresh&&(this.pendingRefresh=!1,this.getNotifications())});#c=m(()=>{let t=this.#s.getConnectionMethod()==="websocket",i=this.#a.hasWsRemoteControl();return t&&i});updateLastNotificationEventId(t){this.#r!==t&&(this.#r=t,this.getNotifications())}getNotifications(){if(!this.#c()){if(!this.#s.isConnectionMethodSet()){this.pendingRefresh=!0;return}this.#e.getApiV1Notifications().pipe(o(1),p(t=>this.#t.set(t))).subscribe()}}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>f(e))));h(i).pipe(o(1)).subscribe({next:e=>{let D=e.filter(a=>a!=null&&"ID"in a);this.#t.set(D),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{l as a};
@@ -1 +1 @@
1
- import{a as T}from"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as f,G as M}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{d as p,e as h}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{Db as e,Eb as t,Fb as _,Sa as E,Vb as r,Zb as c,_ as a,gb as u,kc as S,nc as g,pa as d}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var m=class C{#e=a(T);#n=a(p);hoveringConnect=d(!1);setWelcomeShown(){this.#e.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})}static \u0275fac=function(o){return new(o||C)};static \u0275cmp=u({type:C,selectors:[["app-select"]],decls:21,vars:2,consts:()=>{let l;l=$localize`Connect to console`;let o;o=$localize`Consolidate all your backup reports in one place.`;let n;n=$localize`Connection link`;let i;return i=$localize`For enterprises that are onboarding many machines.`,[l,o,n,i,[1,"left"],[1,"actionables"],["shButton","","routerLink","/welcome/connect/logon",1,"connect","outlined","primary",3,"mouseenter","mouseleave"],[1,"action"],["shButton","","routerLink","/welcome/connect/link",1,"connect","outlined",3,"mouseenter","mouseleave"],[1,"space"],[1,"without-connecting",3,"click"],[1,"right"],["src","/assets/images/console.avif","alt",""]]},template:function(o,n){o&1&&(e(0,"section",4)(1,"div",5)(2,"button",6),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(3,"div",7)(4,"h2"),r(5,0),t(),e(6,"p"),r(7,1),t()()(),e(8,"sh-divider"),g(9,"or"),t(),e(10,"button",8),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(11,"div",7)(12,"h2"),r(13,2),t(),e(14,"p"),r(15,3),t()()(),_(16,"div",9),e(17,"p",10),c("click",function(){return n.setWelcomeShown()}),g(18,"Proceed without connecting to console"),t()()(),e(19,"section",11),_(20,"img",12),t()),o&2&&(E(19),S("hovering",n.hoveringConnect()))},dependencies:[h,M,f],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{width:100%;height:2.5rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}"],changeDetection:0})};export{m as default};
1
+ import{a as T}from"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as f,G as M}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{d as p,e as h}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{Db as e,Eb as t,Fb as _,Sa as E,Vb as r,Zb as c,_ as a,gb as u,kc as S,nc as g,pa as d}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var m=class C{#e=a(T);#n=a(p);hoveringConnect=d(!1);setWelcomeShown(){this.#e.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})}static \u0275fac=function(o){return new(o||C)};static \u0275cmp=u({type:C,selectors:[["app-select"]],decls:21,vars:2,consts:()=>{let l;l=$localize`Connect to console`;let o;o=$localize`Consolidate all your backup reports in one place.`;let n;n=$localize`Connection link`;let i;return i=$localize`For enterprises that are onboarding many machines.`,[l,o,n,i,[1,"left"],[1,"actionables"],["shButton","","routerLink","/welcome/connect/logon",1,"connect","outlined","primary",3,"mouseenter","mouseleave"],[1,"action"],["shButton","","routerLink","/welcome/connect/link",1,"connect","outlined",3,"mouseenter","mouseleave"],[1,"space"],[1,"without-connecting",3,"click"],[1,"right"],["src","/assets/images/console.avif","alt",""]]},template:function(o,n){o&1&&(e(0,"section",4)(1,"div",5)(2,"button",6),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(3,"div",7)(4,"h2"),r(5,0),t(),e(6,"p"),r(7,1),t()()(),e(8,"sh-divider"),g(9,"or"),t(),e(10,"button",8),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(11,"div",7)(12,"h2"),r(13,2),t(),e(14,"p"),r(15,3),t()()(),_(16,"div",9),e(17,"p",10),c("click",function(){return n.setWelcomeShown()}),g(18,"Proceed without connecting to console"),t()()(),e(19,"section",11),_(20,"img",12),t()),o&2&&(E(19),S("hovering",n.hoveringConnect()))},dependencies:[h,M,f],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{width:100%;height:2.5rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}"],changeDetection:0})};export{m as default};
@@ -1 +1 @@
1
- import{a as w}from"./chunk-C6PICAXB.js";import{J as k,v as D}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-N2AU7VKX.js";import{aa as A}from"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as a,Ab as I,Bb as v,Bc as m,Cb as f,Cc as F,Db as r,Eb as l,Jc as $,Lb as g,Mb as M,Qc as R,Sa as c,Vb as N,Zb as E,_ as O,da as T,ea as h,gb as x,ic as C,jc as P,kc as y,lb as p,nc as s,oc as b,pa as _,wb as d,xb as u}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var Y=e=>({children:e,level:0}),L=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),V=(e,t)=>t.id;function z(e,t){if(e&1&&(r(0,"sh-icon"),s(1,"caret-down"),l()),e&2){let n=a().$implicit;y("open",n.isOpen())}}function B(e,t){e&1&&(r(0,"sh-icon"),s(1,"dot"),l())}function J(e,t){e&1&&g(0)}function U(e,t){if(e&1&&p(0,J,1,0,"ng-container",3),e&2){let n=a().$implicit,o=a().$implicit;a();let i=C(3);f("ngTemplateOutlet",i)("ngTemplateOutletContext",m(5,L,F(2,j,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=M();r(0,"div",4,1),E("click",function(){let i=T(n).$implicit,G=a(2);return h(i.children.length>0&&G.toggleNode(i))}),d(2,z,2,2,"sh-icon",5)(3,B,2,0,"sh-icon"),r(4,"div",6),s(5),l()(),d(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;y("cannot-toggle",n.children.length===0)("open",n.isOpen()),c(2),u(n.children.length>0?2:3),c(3),b(n.text),c(),u(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(r(0,"sh-list"),I(1,X,7,7,null,null,V),l()),e&2){let n=t.$implicit;P("padding-left",n.level*.25,"rem"),c(),v(n.children)}}function H(e,t){e&1&&g(0)}var S=class e{#e=O(w);treeStructure=R(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:_(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:_(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=x({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(r(0,"h3"),N(1,2),l(),p(2,q,3,2,"ng-template",null,0,$)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);c(4),f("ngTemplateOutlet",i)("ngTemplateOutletContext",m(4,L,m(2,Y,o.treeStructure())))}},dependencies:[k,D,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
1
+ import{a as w}from"./chunk-YYD2JU6T.js";import{J as k,v as D}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-N2AU7VKX.js";import{aa as A}from"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as a,Ab as I,Bb as v,Bc as m,Cb as f,Cc as F,Db as r,Eb as l,Jc as $,Lb as g,Mb as M,Qc as R,Sa as c,Vb as N,Zb as E,_ as O,da as T,ea as h,gb as x,ic as C,jc as P,kc as y,lb as p,nc as s,oc as b,pa as _,wb as d,xb as u}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var Y=e=>({children:e,level:0}),L=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),V=(e,t)=>t.id;function z(e,t){if(e&1&&(r(0,"sh-icon"),s(1,"caret-down"),l()),e&2){let n=a().$implicit;y("open",n.isOpen())}}function B(e,t){e&1&&(r(0,"sh-icon"),s(1,"dot"),l())}function J(e,t){e&1&&g(0)}function U(e,t){if(e&1&&p(0,J,1,0,"ng-container",3),e&2){let n=a().$implicit,o=a().$implicit;a();let i=C(3);f("ngTemplateOutlet",i)("ngTemplateOutletContext",m(5,L,F(2,j,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=M();r(0,"div",4,1),E("click",function(){let i=T(n).$implicit,G=a(2);return h(i.children.length>0&&G.toggleNode(i))}),d(2,z,2,2,"sh-icon",5)(3,B,2,0,"sh-icon"),r(4,"div",6),s(5),l()(),d(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;y("cannot-toggle",n.children.length===0)("open",n.isOpen()),c(2),u(n.children.length>0?2:3),c(3),b(n.text),c(),u(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(r(0,"sh-list"),I(1,X,7,7,null,null,V),l()),e&2){let n=t.$implicit;P("padding-left",n.level*.25,"rem"),c(),v(n.children)}}function H(e,t){e&1&&g(0)}var S=class e{#e=O(w);treeStructure=R(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:_(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:_(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=x({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(r(0,"h3"),N(1,2),l(),p(2,q,3,2,"ng-template",null,0,$)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);c(4),f("ngTemplateOutlet",i)("ngTemplateOutletContext",m(4,L,m(2,Y,o.treeStructure())))}},dependencies:[k,D,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
@@ -0,0 +1,2 @@
1
+ import{d as O,r as M}from"./chunk-VKQQDCUN.js";import{d as B}from"./chunk-DSYNIXJF.js";import{F as N,Qc as w,V as L,_ as I,pa as z,q as f}from"./chunk-TQTOIWBK.js";import{a as i,b as D}from"./chunk-7CGTOI24.js";var y=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(N(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var d=class e{#e=I(B);#o=new y(()=>this.getS3Config("Providers"));#n=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#s=new y(()=>this.getS3Config("StorageClasses"));#i=w(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new y(()=>this.getStorjConfig("Satellites"));#l=new y(()=>this.getStorjConfig("AuthenticationMethods"));#c=new y(()=>this.getOpenstackConfig("Providers"));#p=new y(()=>this.getOpenstackConfig("Versions"));#u=new y(()=>this.getGcsConfig("Locations"));#m=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3ProvidersFiltered(t){return w(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(f(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(f(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(f(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(f(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(f(o=>this.#t(o)),f(o=>o.find(r=>r.key==="folders")?.value),f(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(f(r=>this.#t(r)),f(r=>r.find(n=>n.key==="api-key")?.value))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new M,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},U={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return i({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return i({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:-2,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:!0,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>i({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[O.required,O.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??!1}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0,validate:e=>{function t(o){if(!o)return!1;let r=o.length;return!(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return i({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[O.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return V(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:a,path:u}=m(t);return{destinationType:e,dynamic:i({"rclone-remote-repository":a,"rclone-remote-path":u},n),advanced:i({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return V(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(i({},e),{advanced:D(i({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],i({destinationType:e,custom:{path:g(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,E(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),a=n.split("/")[0],u=n.split("/").slice(1).join("/");return i({destinationType:e,custom:{server:r,share:a,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:U.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],i({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],i({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(i({},e),{advanced:D(i({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],i({destinationType:e,custom:{path:g(t),bucket:n}},r)}}},{key:"office365",displayName:$localize`Microsoft 365`,description:$localize`Create backups of Microsoft 365 data.`,searchTerms:"office o365 office365 m365 ms365",icon:"assets/dest-icons/office365.png",isNonFree:!0,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:!0},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:!0}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return{destinationType:e,advanced:i({},r),dynamic:i({},n)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:!0,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:!0},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:!0}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return{destinationType:e,advanced:i({},r),dynamic:i({},n)}}}},{key:"drimecloud",displayName:$localize`Drime Cloud`,description:$localize`Store backups in Drime Cloud.`,icon:"assets/dest-icons/drime.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in Drime Cloud`,longDescription:$localize`Path in Drime Cloud`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"api-token",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:g(t)}},l(e,t))}},h("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),h("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),h("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),h("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),h("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),h("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),h("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),h("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),h("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),h("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),h("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),h("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),h("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),h("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),h("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),h("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],ge={".amazonaws.com":"Amazon S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var x=new M,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?(\[[a-fA-F0-9:.]+\]|[^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return V(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function V(e,t,o,r,n){let a=b(n),u=encodeURIComponent(R(t)),k=u==""?"":u+H(o),S=r??"",A=S.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=E(k,W(S));return`${A}${$}${a}`}function T(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function E(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function W(e){return e.split("/").map(encodeURIComponent).join("/")}function g(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new v(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function R(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function H(e){return e==null||e===""?"":":"+e.toString()}function _(e){try{let o=new v(e),r=P.find(n=>n.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return C(t)}function C(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??i({key:e,displayName:e},U)}function ve(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.exactHostname||e.hostname),port:e.port,path:T(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=C(e);return t.searchParams.forEach((a,u)=>{n?.dynamicFields?.some(S=>S===u||S?.name===u)?r[u]=decodeURIComponent(a):o[u]=decodeURIComponent(a)}),{advanced:o,dynamic:r}}function b(e,t=!1){let o=e.map(([n,a])=>`${n}=${a?encodeURIComponent(a.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Fe(e){let t=e.destinationType??"";return C(t)?.mapper.to(e)??""}function Pe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let n=_(e),a="";if(`${n.key}s`===t&&(a+=r.indexOf("?")===-1?"?":"&",a+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(a+=a.indexOf("?")===-1?"?":"&",a+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return C(t).mapper.from(t,new v("http://localhost"+a),e);try{let u=new v(r+a);if(u.host==="undefined")return null;let k=o.split("?")[0].split("/")[0],S=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),G=k.split("."),A=G.length===4&&G.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return S&&!A?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+a,u),null}}function j(e){return typeof e!="string"||!e.trim()?[]:e.split(`
2
+ `).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function Oe(e){return j(e).map(([t,o])=>({Name:t,Value:o}))}function Me(e){return Object.fromEntries(j(e))}function Ve(e){if(!e)return!1;let t=e.length;return!(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function Ce(e){if(!e||e.length>253)return!1;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}function h(e,t,o,r,n){return D(i({},F),{customKey:`s3-${e}`,icon:r??F.icon,displayName:$localize`${t} (S3)`,description:o??$localize`Store backups in ${t} storage.`,dynamicFields:[...(F.dynamicFields??[]).filter(a=>a?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:a=>a.get(d).getS3ProvidersFiltered(u=>n.some(k=>u.value.endsWith(k))),isMandatory:!0,formElement:a=>x.control(a??"")}],mapper:D(i({},F.mapper),{to:a=>{let{bucket:u,path:k}=a.custom;return n.some(S=>a.dynamic["s3-server-name"]?.endsWith(S))&&(a.destinationType="s3"),c(a,u,null,k)},default:a=>`s3-${e}://?use-ssl=true`,intercept:a=>n.some(u=>a.searchParams.get("s3-server-name")?.endsWith(u))??!1})})}export{d as a,g as b,_ as c,C as d,ve as e,Fe as f,Pe as g,Oe as h,Me as i,Ve as j,Ce as k,ge as l};
@@ -1 +1 @@
1
- import{a as Se}from"./chunk-IFSZJSGH.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-I6MIXWIT.js";import{a as Ce,b as pe,c as me,m as k,r as Te}from"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import{b as de,c as ue,d as ge}from"./chunk-ZEFSBETQ.js";import"./chunk-RJ2JM7C7.js";import{a as ce}from"./chunk-WOKYULBU.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import{a as $}from"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as se,C as ae,G as le,H as re,L as _e,c as Z,e as ee,i as te,s as ne,v as ie,z as oe}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as r,Ab as J,Bb as X,Cb as E,Db as a,Eb as _,Fb as x,Mb as T,Qc as b,Sa as c,Tb as y,Ub as B,Vb as d,Wb as K,Xb as W,Xc as Y,Yb as j,Zb as m,_ as O,da as u,ea as g,gb as V,gc as Q,hc as q,kc as H,nc as D,oc as P,pa as f,ra as G,sc as A,tc as N,uc as M,wb as C,xb as p,yb as z}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";function De(i,t){i&1&&(a(0,"div",13),x(1,"sh-progress-bar",14),a(2,"div",15)(3,"h3"),d(4,2),_()()())}function fe(i,t){i&1&&(a(0,"sh-divider"),d(1,5),_())}function Ee(i,t){if(i&1&&(a(0,"p",20),D(1),_()),i&2){let e=r().$implicit;c(),P(e.Description)}}function Fe(i,t){if(i&1&&(a(0,"p",20),D(1),_()),i&2){let e=r().$implicit,o=r(3);c(),P(o.getSimplePath(e.BaseUrl))}}function Ie(i,t){if(i&1){let e=T();a(0,"button",25),m("click",function(n){u(e);let s=r().$implicit,l=r(3);return g(l.updateBackupsSync(s,n))}),D(1," Update backups "),_()}if(i&2){let e=r(4);E("disabled",e.isSaving())}}function Ne(i,t){if(i&1){let e=T();a(0,"app-destination-list-item",18),m("click",function(){let n=u(e).$implicit,s=r(3);return g(s.selectDestination(n))}),a(1,"h3",19),D(2),_(),C(3,Ee,2,1,"p",20)(4,Fe,2,1,"p",20),a(5,"div",21),C(6,Ie,2,1,"button",22),a(7,"button",23),m("click",function(n){let s=u(e).$implicit,l=r(3);return g(l.deleteDestination(s.ID,n))}),a(8,"sh-icon"),D(9,"trash"),_()(),a(10,"button",24),y(11,6),x(12,"sh-icon"),B(),_()()()}if(i&2){let e=t.$implicit,o=r(3);E("targetUrl",e.BaseUrl),c(2),P(e.Name||e.BaseUrl),c(),p(e.Description?3:4),c(3),p(o.isOutOfSync(e)?6:-1)}}function he(i,t){if(i&1){let e=T();a(0,"sh-card",16),m("click",function(){u(e);let n=r(2);return g(n.selectDestination("new"))})("keydown.enter",function(n){return n.target.click()})("keydown.space",function(n){return n.target.click()}),a(1,"sh-icon"),D(2,"plus-circle"),_(),a(3,"div",15)(4,"h3"),d(5,3),_(),a(6,"p"),d(7,4),_()()(),C(8,fe,2,0,"sh-divider"),J(9,Ne,13,4,"app-destination-list-item",17,z)}if(i&2){let e=r(2);c(8),p(e.destinations().length>0?8:-1),c(),X(e.destinations())}}function Oe(i,t){if(i&1&&(a(0,"h2"),d(1,1),_(),C(2,De,5,0,"div",13)(3,he,11,1)),i&2){let e=r();c(2),p(e.isLoading()?2:3)}}function xe(i,t){i&1&&d(0,10,1)}function ye(i,t){i&1&&d(0,10,2)}function Be(i,t){i&1&&d(0,10,3)}function Pe(i,t){if(i&1){let e=T();a(0,"button",37),m("click",function(){u(e);let n=r(2);return g(n.testDestination())}),y(1,10),C(2,xe,1,0)(3,ye,1,0)(4,Be,1,0),B(),_()}if(i&2){let e,o=r(2);E("disabled",o.testSignal()=="testing"),c(2),p(o.testSignal()=="testing"?2:((e=o.testResponse())==null?null:e.action)==="success"?3:4)}}function Ae(i,t){if(i&1){let e=T();a(0,"div",32)(1,"sh-form-field")(2,"label"),d(3,11),_(),a(4,"input",38),M("ngModelChange",function(n){u(e);let s=r(2);return N(s.editName,n)||(s.editName=n),g(n)}),_()()()}if(i&2){let e=r(2);c(4),A("ngModel",e.editName)}}function Me(i,t){if(i&1){let e=T();a(0,"app-test-url",39,0),M("targetUrlChange",function(n){u(e);let s=r(2);return N(s.editBaseUrl,n)||(s.editBaseUrl=n),g(n)})("testSignalChange",function(n){u(e);let s=r(2);return N(s.testSignal,n)||(s.testSignal=n),g(n)}),_()}if(i&2){let e=r(2);A("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),E("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!0)("askToCreate",!0)("testExpectation","any")("moduleType","Backend")}}function be(i,t){if(i&1){let e=T();a(0,"app-destination-list-item",40)(1,"button",41),m("click",function(){u(e);let n=r(2);return g(n.removeDestination())}),d(2,12),_()(),a(3,"app-single-destination",42),M("targetUrlChange",function(n){u(e);let s=r(2);return N(s.editBaseUrl,n)||(s.editBaseUrl=n),g(n)}),_()}if(i&2){let e=r(2);E("targetUrl",e.editBaseUrl()),c(3),A("targetUrl",e.editBaseUrl)}}function $e(i,t){if(i&1){let e=T();a(0,"app-destination-list",43),m("setDestination",function(n){u(e);let s=r(2);return g(s.setDestination(n))}),_()}}function ke(i,t){i&1&&d(0,9,1)}function Re(i,t){i&1&&d(0,9,2)}function Le(i,t){i&1&&d(0,9,3)}function we(i,t){i&1&&d(0,9,4)}function Ue(i,t){if(i&1){let e=T();a(0,"header",26)(1,"button",23),m("click",function(){u(e);let n=r();return g(n.cancelEdit())}),a(2,"sh-icon"),D(3,"arrow-left"),_()()(),a(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),d(8,7),_(),a(9,"div",30),C(10,Pe,5,2,"button",31),_()(),C(11,Ae,5,1,"div",32),C(12,Me,2,9,"app-test-url",33),C(13,be,4,2)(14,$e,1,0,"app-destination-list"),_(),a(15,"div",34)(16,"button",35),m("click",function(){u(e);let n=r();return g(n.cancelEdit())}),d(17,8),_(),a(18,"button",36),m("click",function(){let n;u(e);let s=r();return g(((n=s.testResponse())==null?null:n.action)==="success"||((n=s.testResponse())==null?null:n.action)==="missing-folder"||!s.isUrlChanged()?s.save():s.testDestination())}),y(19,9),C(20,ke,1,0)(21,Re,1,0)(22,Le,1,0)(23,we,1,0),B(),_()()()}if(i&2){let e,o,n,s,l=r();c(8),K(l.selectedDestination()==="new"?"New Destination":"Edit Destination"),W(8),c(2),p(l.editBaseUrl()?10:-1),c(),p(l.selectedDestination()!=="new"?11:-1),c(),p(l.editBaseUrl()?12:-1),c(),p(l.editBaseUrl()?13:14),c(5),H("primary",((e=l.testResponse())==null?null:e.action)==="success"||!l.isUrlChanged())("warn",l.isUrlChanged()&&l.testSignal()===null||l.testSignal()==="testing"||((o=l.testResponse())==null?null:o.action)==="missing-folder")("error",l.testResponse()&&((n=l.testResponse())==null?null:n.action)!=="success"&&((n=l.testResponse())==null?null:n.action)!=="missing-folder"),E("disabled",!l.editBaseUrl()||l.isSaving()||l.testSignal()==="testing"),c(2),p(l.isSaving()?20:l.testSignal()==="testing"?21:((s=l.testResponse())==null?null:s.action)==="success"||((s=l.testResponse())==null?null:s.action)==="missing-folder"||!l.isUrlChanged()?22:23)}}var R=class i{#e=O(Ce);#t=O(ce);#n=O(oe);getSimplePath=de;backups=this.#t.backups;constructor(){this.#t.getBackups()}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=Y(k);selectedDestination=f(null);selectedDestinationId=b(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=f(null);editDescription=f(null);editBaseUrl=f(null);initialBaseUrl=f(null);isUrlChanged=b(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?!0:t!==e});testSignal=f(null);testResponse=b(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return[];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let n=e.get(o.ID);return n&&n.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=G(()=>{this.editBaseUrl(),this.testSignal.set(null)});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null))}))}cancelEdit(){this.selectedDestination.set(null)}setDestination(t){let e=ge(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`)}}removeDestination(){this.editBaseUrl.set(null)}async testDestination(){(await this.testUrl()?.testDestination(!1))?.action==="missing-folder"&&this.promptCreateFolder()}promptCreateFolder(){this.#n.open($,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder()}})}save(){let t=this.selectedDestination();t&&this.performSave(t)}performSave(t){let e=this.editName(),o=this.editDescription(),n=this.editBaseUrl();if(t==="new"){let I=ue(n??"")?.displayName??"Destination",h=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${h+1}`,o=null}let s={Name:e,Description:o,BaseUrl:n};this.#e.save(t,s).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(!0)})}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open($,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(!0)})}})}deleteDestination(t,e){e.stopPropagation(),this.#n.open($,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload()})}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=V({type:i,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&Q(o.testUrl,k,5),e&2&&q()},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let n;n=$localize`Configure a new storage location.`;let s;s=$localize`Or manage your saved destinations`;let l;l=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let h;h=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=j(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,n,s,l,I,h,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(x(0,"app-status-bar"),a(1,"section"),C(2,Oe,4,1)(3,Ue,24,13),_()),e&2&&(c(2),p(o.selectedDestination()===null?2:3))},dependencies:[pe,me,Te,Se,_e,se,ie,ae,re,le,k,ne,Z,ee,te],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0})};export{R as default};
1
+ import{a as Se}from"./chunk-TVFRVP7K.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-F2ZC26DC.js";import{a as Ce,b as pe,c as me,m as k,r as Te}from"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import{b as de,c as ue,d as ge}from"./chunk-O56QUSSI.js";import"./chunk-F3JYPWPK.js";import{a as ce}from"./chunk-736PM4LG.js";import"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import{a as $}from"./chunk-IMQUTGIK.js";import"./chunk-ANSV4G2K.js";import"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as se,C as ae,G as le,H as re,L as _e,c as Z,e as ee,i as te,s as ne,v as ie,z as oe}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as r,Ab as J,Bb as X,Cb as E,Db as a,Eb as _,Fb as x,Mb as T,Qc as b,Sa as c,Tb as y,Ub as B,Vb as d,Wb as K,Xb as W,Xc as Y,Yb as j,Zb as m,_ as O,da as u,ea as g,gb as V,gc as Q,hc as q,kc as H,nc as D,oc as P,pa as f,ra as G,sc as A,tc as N,uc as M,wb as C,xb as p,yb as z}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";function De(i,t){i&1&&(a(0,"div",13),x(1,"sh-progress-bar",14),a(2,"div",15)(3,"h3"),d(4,2),_()()())}function fe(i,t){i&1&&(a(0,"sh-divider"),d(1,5),_())}function Ee(i,t){if(i&1&&(a(0,"p",20),D(1),_()),i&2){let e=r().$implicit;c(),P(e.Description)}}function Fe(i,t){if(i&1&&(a(0,"p",20),D(1),_()),i&2){let e=r().$implicit,o=r(3);c(),P(o.getSimplePath(e.BaseUrl))}}function Ie(i,t){if(i&1){let e=T();a(0,"button",25),m("click",function(n){u(e);let s=r().$implicit,l=r(3);return g(l.updateBackupsSync(s,n))}),D(1," Update backups "),_()}if(i&2){let e=r(4);E("disabled",e.isSaving())}}function Ne(i,t){if(i&1){let e=T();a(0,"app-destination-list-item",18),m("click",function(){let n=u(e).$implicit,s=r(3);return g(s.selectDestination(n))}),a(1,"h3",19),D(2),_(),C(3,Ee,2,1,"p",20)(4,Fe,2,1,"p",20),a(5,"div",21),C(6,Ie,2,1,"button",22),a(7,"button",23),m("click",function(n){let s=u(e).$implicit,l=r(3);return g(l.deleteDestination(s.ID,n))}),a(8,"sh-icon"),D(9,"trash"),_()(),a(10,"button",24),y(11,6),x(12,"sh-icon"),B(),_()()()}if(i&2){let e=t.$implicit,o=r(3);E("targetUrl",e.BaseUrl),c(2),P(e.Name||e.BaseUrl),c(),p(e.Description?3:4),c(3),p(o.isOutOfSync(e)?6:-1)}}function he(i,t){if(i&1){let e=T();a(0,"sh-card",16),m("click",function(){u(e);let n=r(2);return g(n.selectDestination("new"))})("keydown.enter",function(n){return n.target.click()})("keydown.space",function(n){return n.target.click()}),a(1,"sh-icon"),D(2,"plus-circle"),_(),a(3,"div",15)(4,"h3"),d(5,3),_(),a(6,"p"),d(7,4),_()()(),C(8,fe,2,0,"sh-divider"),J(9,Ne,13,4,"app-destination-list-item",17,z)}if(i&2){let e=r(2);c(8),p(e.destinations().length>0?8:-1),c(),X(e.destinations())}}function Oe(i,t){if(i&1&&(a(0,"h2"),d(1,1),_(),C(2,De,5,0,"div",13)(3,he,11,1)),i&2){let e=r();c(2),p(e.isLoading()?2:3)}}function xe(i,t){i&1&&d(0,10,1)}function ye(i,t){i&1&&d(0,10,2)}function Be(i,t){i&1&&d(0,10,3)}function Pe(i,t){if(i&1){let e=T();a(0,"button",37),m("click",function(){u(e);let n=r(2);return g(n.testDestination())}),y(1,10),C(2,xe,1,0)(3,ye,1,0)(4,Be,1,0),B(),_()}if(i&2){let e,o=r(2);E("disabled",o.testSignal()=="testing"),c(2),p(o.testSignal()=="testing"?2:((e=o.testResponse())==null?null:e.action)==="success"?3:4)}}function Ae(i,t){if(i&1){let e=T();a(0,"div",32)(1,"sh-form-field")(2,"label"),d(3,11),_(),a(4,"input",38),M("ngModelChange",function(n){u(e);let s=r(2);return N(s.editName,n)||(s.editName=n),g(n)}),_()()()}if(i&2){let e=r(2);c(4),A("ngModel",e.editName)}}function Me(i,t){if(i&1){let e=T();a(0,"app-test-url",39,0),M("targetUrlChange",function(n){u(e);let s=r(2);return N(s.editBaseUrl,n)||(s.editBaseUrl=n),g(n)})("testSignalChange",function(n){u(e);let s=r(2);return N(s.testSignal,n)||(s.testSignal=n),g(n)}),_()}if(i&2){let e=r(2);A("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),E("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!0)("askToCreate",!0)("testExpectation","any")("moduleType","Backend")}}function be(i,t){if(i&1){let e=T();a(0,"app-destination-list-item",40)(1,"button",41),m("click",function(){u(e);let n=r(2);return g(n.removeDestination())}),d(2,12),_()(),a(3,"app-single-destination",42),M("targetUrlChange",function(n){u(e);let s=r(2);return N(s.editBaseUrl,n)||(s.editBaseUrl=n),g(n)}),_()}if(i&2){let e=r(2);E("targetUrl",e.editBaseUrl()),c(3),A("targetUrl",e.editBaseUrl)}}function $e(i,t){if(i&1){let e=T();a(0,"app-destination-list",43),m("setDestination",function(n){u(e);let s=r(2);return g(s.setDestination(n))}),_()}}function ke(i,t){i&1&&d(0,9,1)}function Re(i,t){i&1&&d(0,9,2)}function Le(i,t){i&1&&d(0,9,3)}function we(i,t){i&1&&d(0,9,4)}function Ue(i,t){if(i&1){let e=T();a(0,"header",26)(1,"button",23),m("click",function(){u(e);let n=r();return g(n.cancelEdit())}),a(2,"sh-icon"),D(3,"arrow-left"),_()()(),a(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),d(8,7),_(),a(9,"div",30),C(10,Pe,5,2,"button",31),_()(),C(11,Ae,5,1,"div",32),C(12,Me,2,9,"app-test-url",33),C(13,be,4,2)(14,$e,1,0,"app-destination-list"),_(),a(15,"div",34)(16,"button",35),m("click",function(){u(e);let n=r();return g(n.cancelEdit())}),d(17,8),_(),a(18,"button",36),m("click",function(){let n;u(e);let s=r();return g(((n=s.testResponse())==null?null:n.action)==="success"||((n=s.testResponse())==null?null:n.action)==="missing-folder"||!s.isUrlChanged()?s.save():s.testDestination())}),y(19,9),C(20,ke,1,0)(21,Re,1,0)(22,Le,1,0)(23,we,1,0),B(),_()()()}if(i&2){let e,o,n,s,l=r();c(8),K(l.selectedDestination()==="new"?"New Destination":"Edit Destination"),W(8),c(2),p(l.editBaseUrl()?10:-1),c(),p(l.selectedDestination()!=="new"?11:-1),c(),p(l.editBaseUrl()?12:-1),c(),p(l.editBaseUrl()?13:14),c(5),H("primary",((e=l.testResponse())==null?null:e.action)==="success"||!l.isUrlChanged())("warn",l.isUrlChanged()&&l.testSignal()===null||l.testSignal()==="testing"||((o=l.testResponse())==null?null:o.action)==="missing-folder")("error",l.testResponse()&&((n=l.testResponse())==null?null:n.action)!=="success"&&((n=l.testResponse())==null?null:n.action)!=="missing-folder"),E("disabled",!l.editBaseUrl()||l.isSaving()||l.testSignal()==="testing"),c(2),p(l.isSaving()?20:l.testSignal()==="testing"?21:((s=l.testResponse())==null?null:s.action)==="success"||((s=l.testResponse())==null?null:s.action)==="missing-folder"||!l.isUrlChanged()?22:23)}}var R=class i{#e=O(Ce);#t=O(ce);#n=O(oe);getSimplePath=de;backups=this.#t.backups;constructor(){this.#t.getBackups()}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=Y(k);selectedDestination=f(null);selectedDestinationId=b(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=f(null);editDescription=f(null);editBaseUrl=f(null);initialBaseUrl=f(null);isUrlChanged=b(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?!0:t!==e});testSignal=f(null);testResponse=b(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return[];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let n=e.get(o.ID);return n&&n.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=G(()=>{this.editBaseUrl(),this.testSignal.set(null)});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null))}))}cancelEdit(){this.selectedDestination.set(null)}setDestination(t){let e=ge(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`)}}removeDestination(){this.editBaseUrl.set(null)}async testDestination(){(await this.testUrl()?.testDestination(!1))?.action==="missing-folder"&&this.promptCreateFolder()}promptCreateFolder(){this.#n.open($,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder()}})}save(){let t=this.selectedDestination();t&&this.performSave(t)}performSave(t){let e=this.editName(),o=this.editDescription(),n=this.editBaseUrl();if(t==="new"){let I=ue(n??"")?.displayName??"Destination",h=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${h+1}`,o=null}let s={Name:e,Description:o,BaseUrl:n};this.#e.save(t,s).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(!0)})}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open($,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(!0)})}})}deleteDestination(t,e){e.stopPropagation(),this.#n.open($,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload()})}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=V({type:i,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&Q(o.testUrl,k,5),e&2&&q()},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let n;n=$localize`Configure a new storage location.`;let s;s=$localize`Or manage your saved destinations`;let l;l=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let h;h=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=j(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,n,s,l,I,h,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(x(0,"app-status-bar"),a(1,"section"),C(2,Oe,4,1)(3,Ue,24,13),_()),e&2&&(c(2),p(o.selectedDestination()===null?2:3))},dependencies:[pe,me,Te,Se,_e,se,ie,ae,re,le,k,ne,Z,ee,te],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0})};export{R as default};
@@ -1 +1 @@
1
- import{a as Z}from"./chunk-OHYENIPP.js";import{a as Q}from"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import{a as Y}from"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as K,C as j,H,L as q,c as G,e as W,i as V,s as J,v as X,w as z}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{d as B,e as U}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as s,Cb as x,Db as r,Eb as l,Ec as A,Fb as T,Mb as h,Pc as N,Qc as R,Sa as a,Tb as S,Ub as y,Vb as p,Wc as I,Yb as k,Zb as E,_ as f,da as m,ea as F,gb as D,ja as b,mc as w,nc as d,pa as P,ra as M,sc as L,tc as $,uc as v,wb as c,xb as _}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var ee=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function te(n,t){n&1&&p(0,0,1)}function ne(n,t){n&1&&p(0,0,2)}function ie(n,t){if(n&1){let e=h();r(0,"button",10),E("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function oe(n,t){if(n&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,te,1,0)(4,ne,1,0),y(),l(),T(5,"sh-progress-bar",8),c(6,ie,2,0,"button",9),l()),n&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function re(n,t){if(n&1){let e=h();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),v("ngModelChange",function(o){m(e);let u=s();return $(u.customRegisterUrl,o)||(u.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),E("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(n&2){let e=s();a(3),L("ngModel",e.customRegisterUrl),a(4),x("disabled",!e.customRegisterUrlValid())}}function le(n,t){if(n&1){let e=h();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),E("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function ae(n,t){if(n&1){let e=h();r(0,"p"),p(1,4),l(),r(2,"button",10),E("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function se(n,t){if(n&1&&c(0,le,5,0)(1,ae,4,0),n&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ce(n,t){n&1&&(S(0,5,1),T(1,"p"),y())}function _e(n,t){n&1&&(S(0,5,2),T(1,"p"),y())}function de(n,t){if(n&1){let e=h();r(0,"sh-alert",16),S(1,5),c(2,ce,2,0,"p")(3,_e,2,0,"p"),y(),l(),r(4,"button",10),E("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(n&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function ue(n,t){n&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var O=class n{#n=f(B);#l=f(Q);#e=f(Z);#i=f(Y);isOldOpen=P(!1);typeParam=I.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=R(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=P(!1);customRegisterUrlValid=R(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(t.length===0||!e.test(t))});registeringCounter=P(null);didTry=!1;triedFinishConnection=!1;#t=null;#a=f(b);constructor(){this.#a.onDestroy(()=>{this.#r()})}stateEffect=M(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=!0,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||N(()=>this.claimUrl())!==null&&(this.triedFinishConnection=!0,this.#s())),e==="registering"?N(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o()}):(this.#r(),N(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})})});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o()},1e3)}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null)}ngOnInit(){this.#e.refreshRemoteControlStatus()}#s(){let t=this.#e.claimUrl();this.#l.open(`${t}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let u;u=$localize`Something failed during registration we're missing claimUrl, please try again`;let g;return g=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,g=k(g),[t,e,i,o,u,g,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,oe,7,2,"div",7),c(2,re,9,2),c(3,se,2,1),c(4,de,8,1),c(5,ue,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",u=i.typeParam()==="link"&&i.state()==="inactive",g=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",C=i.state()==="registeringfaulted";w(A(7,ee,o,u,g,C,i.state()==="registered")),a(),_(o?1:-1),a(),_(u?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(C?4:-1),a(),_(g?5:-1)}},dependencies:[U,J,G,W,V,H,K,q,j,z,X],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{O as default};
1
+ import{a as Z}from"./chunk-AXQQEOTT.js";import{a as Q}from"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import{a as Y}from"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as K,C as j,H,L as q,c as G,e as W,i as V,s as J,v as X,w as z}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{d as B,e as U}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as s,Cb as x,Db as r,Eb as l,Ec as A,Fb as T,Mb as h,Pc as N,Qc as R,Sa as a,Tb as S,Ub as y,Vb as p,Wc as I,Yb as k,Zb as E,_ as f,da as m,ea as F,gb as D,ja as b,mc as w,nc as d,pa as P,ra as M,sc as L,tc as $,uc as v,wb as c,xb as _}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var ee=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function te(n,t){n&1&&p(0,0,1)}function ne(n,t){n&1&&p(0,0,2)}function ie(n,t){if(n&1){let e=h();r(0,"button",10),E("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function oe(n,t){if(n&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,te,1,0)(4,ne,1,0),y(),l(),T(5,"sh-progress-bar",8),c(6,ie,2,0,"button",9),l()),n&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function re(n,t){if(n&1){let e=h();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),v("ngModelChange",function(o){m(e);let u=s();return $(u.customRegisterUrl,o)||(u.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),E("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(n&2){let e=s();a(3),L("ngModel",e.customRegisterUrl),a(4),x("disabled",!e.customRegisterUrlValid())}}function le(n,t){if(n&1){let e=h();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),E("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function ae(n,t){if(n&1){let e=h();r(0,"p"),p(1,4),l(),r(2,"button",10),E("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function se(n,t){if(n&1&&c(0,le,5,0)(1,ae,4,0),n&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ce(n,t){n&1&&(S(0,5,1),T(1,"p"),y())}function _e(n,t){n&1&&(S(0,5,2),T(1,"p"),y())}function de(n,t){if(n&1){let e=h();r(0,"sh-alert",16),S(1,5),c(2,ce,2,0,"p")(3,_e,2,0,"p"),y(),l(),r(4,"button",10),E("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(n&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function ue(n,t){n&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var O=class n{#n=f(B);#l=f(Q);#e=f(Z);#i=f(Y);isOldOpen=P(!1);typeParam=I.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=R(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=P(!1);customRegisterUrlValid=R(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(t.length===0||!e.test(t))});registeringCounter=P(null);didTry=!1;triedFinishConnection=!1;#t=null;#a=f(b);constructor(){this.#a.onDestroy(()=>{this.#r()})}stateEffect=M(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=!0,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||N(()=>this.claimUrl())!==null&&(this.triedFinishConnection=!0,this.#s())),e==="registering"?N(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o()}):(this.#r(),N(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})})});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o()},1e3)}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null)}ngOnInit(){this.#e.refreshRemoteControlStatus()}#s(){let t=this.#e.claimUrl();this.#l.open(`${t}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let u;u=$localize`Something failed during registration we're missing claimUrl, please try again`;let g;return g=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,g=k(g),[t,e,i,o,u,g,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,oe,7,2,"div",7),c(2,re,9,2),c(3,se,2,1),c(4,de,8,1),c(5,ue,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",u=i.typeParam()==="link"&&i.state()==="inactive",g=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",C=i.state()==="registeringfaulted";w(A(7,ee,o,u,g,C,i.state()==="registered")),a(),_(o?1:-1),a(),_(u?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(C?4:-1),a(),_(g?5:-1)}},dependencies:[U,J,G,W,V,H,K,q,j,z,X],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{O as default};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-77IXQ4GU.js";import"./chunk-TZ7MW3NZ.js";import"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import"./chunk-O56QUSSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-AXQQEOTT.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-F3ETZKLK.js";import"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
@@ -1 +1 @@
1
- import{b as w}from"./chunk-IQL3REGJ.js";import{b as x}from"./chunk-AIAUP7OE.js";import{a as $}from"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as y,L as k,v as b}from"./chunk-VKQQDCUN.js";import{d as U}from"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as c,Cb as L,Db as a,Eb as r,F as m,Fb as d,Mb as E,Pa as O,Qc as I,Sa as l,Tb as M,Ub as R,Vb as T,Wb as f,Xb as F,Zb as N,_ as p,da as g,ea as C,gb as P,kc as v,nc as u,oc as D,pa as S,q as G,wb as s,xb as _}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";function V(t,o){t&1&&d(0,"sh-progress-bar",3)}function B(t,o){if(t&1&&(a(0,"a",7),M(1,2),d(2,"sh-icon"),R(),r()),t&2){let e,n,i=c(2);L("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),f((n=i.serverState())==null?null:n.UpdatedVersion),F(1)}}function J(t,o){if(t&1){let e=E();a(0,"button",6),N("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(t&2){let e,n=c();v("loading",n.checkingForUpdates()),l(2),_((e=n.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function X(t,o){if(t&1){let e=E();a(0,"button",6),N("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function z(t,o){t&1&&d(0,"sh-progress-bar",3)}var h=class t{#e=p(U);#n=p(x);#t=p($);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#n.serverState;duplicatiVersion=I(()=>this.#t.systemInfo()?.ServerVersionName??"Unknown");generalInfo=w(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),m(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(m(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let n;return n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,n,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,n){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),T(3,0),r(),a(4,"p"),T(5,1),r(),a(6,"div",4),s(7,J,3,3)(8,X,2,0,"button",5),s(9,z,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;_(n.isLoading()?0:-1),l(5),f(n.duplicatiVersion()),F(5),l(2),_(((i=n.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=n.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),_(((A=n.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),D(n.generalInfo())}},dependencies:[k,y,b],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
1
+ import{b as w}from"./chunk-IQL3REGJ.js";import{b as x}from"./chunk-E4NQOMJX.js";import{a as $}from"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as y,L as k,v as b}from"./chunk-VKQQDCUN.js";import{d as U}from"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as c,Cb as L,Db as a,Eb as r,F as m,Fb as d,Mb as E,Pa as O,Qc as I,Sa as l,Tb as M,Ub as R,Vb as T,Wb as f,Xb as F,Zb as N,_ as p,da as g,ea as C,gb as P,kc as v,nc as u,oc as D,pa as S,q as G,wb as s,xb as _}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";function V(t,o){t&1&&d(0,"sh-progress-bar",3)}function B(t,o){if(t&1&&(a(0,"a",7),M(1,2),d(2,"sh-icon"),R(),r()),t&2){let e,n,i=c(2);L("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),f((n=i.serverState())==null?null:n.UpdatedVersion),F(1)}}function J(t,o){if(t&1){let e=E();a(0,"button",6),N("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(t&2){let e,n=c();v("loading",n.checkingForUpdates()),l(2),_((e=n.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function X(t,o){if(t&1){let e=E();a(0,"button",6),N("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function z(t,o){t&1&&d(0,"sh-progress-bar",3)}var h=class t{#e=p(U);#n=p(x);#t=p($);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#n.serverState;duplicatiVersion=I(()=>this.#t.systemInfo()?.ServerVersionName??"Unknown");generalInfo=w(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),m(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(m(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let n;return n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,n,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,n){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),T(3,0),r(),a(4,"p"),T(5,1),r(),a(6,"div",4),s(7,J,3,3)(8,X,2,0,"button",5),s(9,z,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;_(n.isLoading()?0:-1),l(5),f(n.duplicatiVersion()),F(5),l(2),_(((i=n.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=n.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),_(((A=n.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),D(n.generalInfo())}},dependencies:[k,y,b],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};