@duplicati/ngclient 0.0.221 → 0.0.223

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 (120) hide show
  1. package/{chunk-I5DD3Q6J.js → chunk-22JSUCD3.js} +1 -1
  2. package/{chunk-BMACDVWX.js → chunk-2CKH2RVA.js} +1 -1
  3. package/{chunk-IQL3REGJ.js → chunk-2KD757N6.js} +1 -1
  4. package/{chunk-MTL3FBSM.js → chunk-2VLJLCTO.js} +1 -1
  5. package/{chunk-OPHQNXYO.js → chunk-2YUSBRXY.js} +1 -1
  6. package/{chunk-OCUE5GMT.js → chunk-35ZRBDWM.js} +1 -1
  7. package/{chunk-JP2Z2HMH.js → chunk-3BIHFX4H.js} +1 -1
  8. package/chunk-3D6EL52D.js +1 -0
  9. package/chunk-4IRGFIAU.js +1 -0
  10. package/chunk-4J64RICN.js +1 -0
  11. package/{chunk-DSYNIXJF.js → chunk-5E3B4AEF.js} +1 -1
  12. package/{chunk-ANSV4G2K.js → chunk-5W4BSVZJ.js} +1 -1
  13. package/chunk-6JGOGUIX.js +1 -0
  14. package/chunk-6RIKNAXD.js +1 -0
  15. package/{chunk-WJBMMY2Y.js → chunk-6V4CDRLK.js} +1 -1
  16. package/{chunk-OLWLWDXZ.js → chunk-7AXKIK5Z.js} +1 -1
  17. package/{chunk-CZVTBPNE.js → chunk-7SP45FHP.js} +1 -1
  18. package/{chunk-E4NQOMJX.js → chunk-AFHEXZUZ.js} +1 -1
  19. package/{chunk-F3JYPWPK.js → chunk-AXG7WHBS.js} +1 -1
  20. package/{chunk-736PM4LG.js → chunk-AXLO5KWF.js} +1 -1
  21. package/{chunk-EKVZKEQJ.js → chunk-B4QFOJXL.js} +1 -1
  22. package/{chunk-TCXCC5BM.js → chunk-BPHX6VXP.js} +1 -1
  23. package/{chunk-DE4JIJWO.js → chunk-CEDH3C4K.js} +1 -1
  24. package/{chunk-VKQQDCUN.js → chunk-CJKZ27FM.js} +1 -1
  25. package/{chunk-YCJYEQF7.js → chunk-COEGVUM3.js} +1 -1
  26. package/chunk-CQJRBQ6I.js +1 -0
  27. package/{chunk-YMFI2Q2X.js → chunk-CUYURNCQ.js} +1 -1
  28. package/{chunk-ELCA5MKF.js → chunk-CWBB6FON.js} +1 -1
  29. package/{chunk-FR5RTIOE.js → chunk-DT3A5ZZG.js} +1 -1
  30. package/{chunk-ACTJSKQZ.js → chunk-EAVDZEBJ.js} +1 -1
  31. package/{chunk-FD5CKX3J.js → chunk-F5RBSCC2.js} +1 -1
  32. package/{chunk-JSZIISFS.js → chunk-FNWC6U3F.js} +1 -1
  33. package/{chunk-QDDVZ4CR.js → chunk-FQINMZH2.js} +1 -1
  34. package/chunk-FXBX5QMR.js +1 -0
  35. package/{chunk-23SRH7FI.js → chunk-GA3CAVSK.js} +1 -1
  36. package/chunk-GBSP3YAH.js +2 -0
  37. package/{chunk-GW34KK5A.js → chunk-GBUTPGY5.js} +1 -1
  38. package/{chunk-JPCUISZG.js → chunk-GNKCBZMS.js} +1 -1
  39. package/{chunk-N2AU7VKX.js → chunk-HDDAGHHE.js} +1 -1
  40. package/{chunk-RDLRXAJU.js → chunk-HDGXP6C6.js} +1 -1
  41. package/chunk-HLHUPBCV.js +1 -0
  42. package/chunk-HPXIWKIK.js +1 -0
  43. package/chunk-HWOUAWOE.js +1 -0
  44. package/{chunk-TVFRVP7K.js → chunk-JB26UVQP.js} +1 -1
  45. package/chunk-JLANSXSK.js +1 -0
  46. package/chunk-JYRKUYG6.js +1 -0
  47. package/chunk-K5XGRFWJ.js +4 -0
  48. package/{chunk-77IXQ4GU.js → chunk-KI2HT2TI.js} +1 -1
  49. package/{chunk-N2GI5QYJ.js → chunk-LNKXSLIG.js} +1 -1
  50. package/chunk-MJPEKJ3T.js +2 -0
  51. package/{chunk-RGFJ5UMA.js → chunk-N3TVNDVH.js} +1 -1
  52. package/chunk-NDOIWI7D.js +1 -0
  53. package/chunk-NFATJ2CP.js +1 -0
  54. package/{chunk-PPSQGUOL.js → chunk-O5RZGVMD.js} +1 -1
  55. package/chunk-OETM3ZQK.js +1 -0
  56. package/chunk-OQGMZ5Z4.js +1 -0
  57. package/{chunk-TISQKN7N.js → chunk-PDGW22XJ.js} +1 -1
  58. package/{chunk-IMQUTGIK.js → chunk-PEOYNJJM.js} +1 -1
  59. package/{chunk-CAQ3XMFP.js → chunk-PNQ5BDQN.js} +1 -1
  60. package/chunk-PVSB5UU6.js +1 -0
  61. package/{chunk-AXQQEOTT.js → chunk-QGAOYLQU.js} +1 -1
  62. package/{chunk-APSPCDGV.js → chunk-QLW7KAXY.js} +1 -1
  63. package/chunk-QZEIAQ3M.js +1 -0
  64. package/chunk-R6FKSUPU.js +1 -0
  65. package/{chunk-FBU3EBFO.js → chunk-RDT3GMNM.js} +1 -1
  66. package/{chunk-UTXZPAY6.js → chunk-RM2KGG7J.js} +1 -1
  67. package/chunk-RTGUYIWH.js +11 -0
  68. package/{chunk-PIGMTUUT.js → chunk-SKLSR5GH.js} +1 -1
  69. package/{chunk-JPMKWWZP.js → chunk-SL34UKL5.js} +1 -1
  70. package/{chunk-FDYBIC4O.js → chunk-SZLRIYOM.js} +1 -1
  71. package/chunk-TI76HSL2.js +1 -0
  72. package/{chunk-5KJPC3V5.js → chunk-TOV6NJCD.js} +1 -1
  73. package/chunk-TPKKLIFK.js +1 -0
  74. package/{chunk-IG7XUEED.js → chunk-UOMUNAOT.js} +1 -1
  75. package/{chunk-LE24LKH7.js → chunk-UXIWNORE.js} +1 -1
  76. package/{chunk-KZTFESBJ.js → chunk-V2M5YF4E.js} +1 -1
  77. package/{chunk-O2SMJYPC.js → chunk-V2UO7ES2.js} +1 -1
  78. package/{chunk-6JS7B4FW.js → chunk-VNXFTYQQ.js} +1 -1
  79. package/{chunk-4E7D5F6K.js → chunk-WJVFREPL.js} +1 -1
  80. package/{chunk-XBAZKJ47.js → chunk-WKQ3ICDB.js} +1 -1
  81. package/{chunk-OJVUCHRP.js → chunk-WULWYGYR.js} +1 -1
  82. package/chunk-X5W2K6AN.js +2 -0
  83. package/{chunk-GKGMP6VF.js → chunk-XWML36YQ.js} +1 -1
  84. package/{chunk-BKEJZADV.js → chunk-XXXS73XL.js} +1 -1
  85. package/{chunk-ZC23RK4J.js → chunk-YF6JHIN5.js} +1 -1
  86. package/{chunk-3L3SRTPU.js → chunk-YFA6MJ2B.js} +1 -1
  87. package/{chunk-IRT2UBDI.js → chunk-YKF5ZW55.js} +1 -1
  88. package/{chunk-F2ZC26DC.js → chunk-ZKIZ7IIA.js} +1 -1
  89. package/{chunk-BLSV7CNZ.js → chunk-ZTENLO77.js} +1 -1
  90. package/{chunk-6NVCDJR6.js → chunk-ZYYLNYSK.js} +1 -1
  91. package/index.html +1 -1
  92. package/main-NENDDABN.js +1 -0
  93. package/package.json +1 -1
  94. package/chunk-43WATFQS.js +0 -11
  95. package/chunk-4J6L5OV3.js +0 -1
  96. package/chunk-5JGSXUKD.js +0 -1
  97. package/chunk-5YE4H57F.js +0 -1
  98. package/chunk-5ZRRLJA4.js +0 -1
  99. package/chunk-ACTATISC.js +0 -1
  100. package/chunk-COI6UMB5.js +0 -1
  101. package/chunk-DHFLXFWF.js +0 -1
  102. package/chunk-ESLC5LVP.js +0 -1
  103. package/chunk-F3ETZKLK.js +0 -1
  104. package/chunk-G2BDKU26.js +0 -2
  105. package/chunk-NPFPMA4P.js +0 -1
  106. package/chunk-O56QUSSI.js +0 -2
  107. package/chunk-OL7ADIFI.js +0 -1
  108. package/chunk-QQWV3FEH.js +0 -1
  109. package/chunk-SACQFUJE.js +0 -1
  110. package/chunk-TQTOIWBK.js +0 -4
  111. package/chunk-TWAHUXIN.js +0 -1
  112. package/chunk-TZ7MW3NZ.js +0 -2
  113. package/chunk-UZ4POLDC.js +0 -1
  114. package/chunk-XPVATEBM.js +0 -1
  115. package/chunk-XWTB7XRI.js +0 -1
  116. package/chunk-YPNN5FBK.js +0 -1
  117. package/chunk-YWBZLU6M.js +0 -1
  118. package/chunk-YYD2JU6T.js +0 -1
  119. package/chunk-ZNYN6ES6.js +0 -1
  120. package/main-IUT3IXX4.js +0 -1
@@ -1 +1 @@
1
- import{a as A}from"./chunk-TVFRVP7K.js";import"./chunk-QDDVZ4CR.js";import"./chunk-BLSV7CNZ.js";import"./chunk-F2ZC26DC.js";import"./chunk-F3JYPWPK.js";import"./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"./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{U as S}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{c as u,e as N,f as c}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 T,Vb as n,gb as g}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let a;a=$localize`System info`;let C;C=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,a,C,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
1
+ import{a as A}from"./chunk-JB26UVQP.js";import"./chunk-FQINMZH2.js";import"./chunk-ZTENLO77.js";import"./chunk-ZKIZ7IIA.js";import"./chunk-AXG7WHBS.js";import"./chunk-AXLO5KWF.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import"./chunk-PEOYNJJM.js";import"./chunk-5W4BSVZJ.js";import"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import{U as S}from"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import{c as u,e as N,f as c}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{Eb as e,Fb as t,Gb as T,Wb as n,hb as g}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let a;a=$localize`System info`;let C;C=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,a,C,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
@@ -1 +1 @@
1
- import{a as wt,b as Ut,c as $t,m as bt,q as Lt,r as Rt}from"./chunk-43WATFQS.js";import"./chunk-CAQ3XMFP.js";import"./chunk-UZ4POLDC.js";import{b as Mt,c as yt,d as Ft}from"./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{B as ht,C as It,G as ft,H as Ot,K as Dt,L as Pt,V as xt,W as At,c as ct,e as dt,f as Ct,g as gt,i as ut,j as Tt,r as pt,s as mt,v as St,w as Nt,y as Et}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{b as _t,d as lt}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as s,Ab as M,Ac as rt,Bb as y,Cb as E,Db as a,Eb as r,Fb as h,Jb as v,Kb as G,Mb as N,Qc as $,Sa as l,Tb as f,Ub as O,Vb as S,Yc as st,Zb as C,_ as P,da as c,ea as d,gb as et,gc as nt,ha as tt,hc as it,kc as ot,nc as g,oc as D,pa as I,ra as R,sc as F,tc as w,uc as U,vc as at,wb as T,wc as k,xb as p,xc as x,yb as A}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var vt=["testUrl"],Gt=()=>({maxWidth:"700px",width:"100%"});function kt(o,n){if(o&1){let t=N();a(0,"sh-card",30)(1,"div",32)(2,"h3"),S(3,4),r(),a(4,"button",33),C("click",function(){c(t);let i=s(3);return d(i.closeCustomList())}),g(5," Cancel "),a(6,"sh-icon"),g(7,"x-bold"),r()()(),a(8,"app-destination-list",34),C("setDestination",function(i){c(t);let _=s(3);return d(_.setDestination(i))}),r()()}}function Bt(o,n){if(o&1){let t=N();a(0,"div",40)(1,"sh-toggle",43),U("checkedChange",function(i){c(t);let _=s(2).$implicit;return w(_.save,i)||(_.save=i),d(i)}),a(2,"span",44),S(3,8),r()()()}if(o&2){let t=s(2).$implicit;l(),E("color","primary")("variant","raised"),F("checked",t.save)}}function Vt(o,n){if(o&1){let t=N();a(0,"sh-toggle-card",31),v(1,35),a(2,"app-destination-list-item",36)(3,"button",33),C("click",function(){c(t);let i=s().$index,_=s(2);return d(_.changeDestination(i))}),g(4,"Change"),r(),a(5,"sh-menu",37),C("click",function(i){return i.stopPropagation()}),a(6,"button",38)(7,"sh-icon"),g(8,"dots-three-vertical"),r()(),v(9,39),a(10,"button",33),C("click",function(){c(t);let i=s().$index,_=s(2);return d(_.openTargetUrlDialog(i))}),f(11,5),h(12,"sh-icon"),O(),r(),a(13,"button",33),C("click",function(){c(t);let i=s().$index,_=s(2);return d(_.copyTargetUrl(i))}),f(14,6),h(15,"sh-icon"),O(),r(),a(16,"button",33),C("click",function(){c(t);let i=s().$index,_=s(2);return d(_.removeDestination(i))}),f(17,7),h(18,"sh-icon"),O(),r(),G(),r()(),G(),T(19,Bt,4,3,"div",40),a(20,"app-test-url",41,1),C("targetUrlChange",function(i){c(t);let _=s().$index,m=s(2);return d(m.updateTargetUrl(_,i))})("testSignalChange",function(i){c(t);let _=s().$index,m=s(2);return d(m.updateTestState(_,i))}),r(),a(22,"app-single-destination",42),C("targetUrlChange",function(i){c(t);let _=s().$index,m=s(2);return d(m.updateTargetUrl(_,i))}),r()()}if(o&2){let t=s(),e=t.$implicit,i=t.$index,_=s(2);E("disableToggle",!0)("isActive",!0),l(2),E("targetUrl",e.url)("connectionStringId",e.connectionStringId),l(17),p(e.connectionStringId?-1:19),l(),E("targetUrl",e.url)("testSignal",_.testStates()[i]||null)("backupId",_.backupId())("connectionStringId",e.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!0)("testExpectation",_.isNew()?"destinationEmpty":"any")("moduleType","Backend"),l(2),E("targetUrl",e.url)("useBackupState",!0)}}function Kt(o,n){if(o&1&&T(0,kt,9,0,"sh-card",30)(1,Vt,23,16,"sh-toggle-card",31),o&2){let t=n.$index,e=s(2);p(e.showCustomList()&&e.currentEditingIndex()===t?0:1)}}function Jt(o,n){if(o&1&&M(0,Kt,2,1,null,null,A),o&2){s();let t=x(0);y(t)}}function Xt(o,n){o&1&&(a(0,"div",45),h(1,"sh-progress-bar",46),a(2,"div",47)(3,"h3"),S(4,9),r()()())}function zt(o,n){o&1&&(a(0,"sh-divider"),S(1,12),r())}function Ht(o,n){if(o&1&&(a(0,"p",52),g(1),r()),o&2){let t=s().$implicit;l(),D(t.Description)}}function Wt(o,n){if(o&1&&(a(0,"p",52),g(1),r()),o&2){let t=s().$implicit,e=s(4);l(),D(e.getSimplePath(t.BaseUrl))}}function jt(o,n){if(o&1){let t=N();a(0,"app-destination-list-item",50),C("click",function(){let i=c(t).$implicit,_=s(4);return d(_.selectSavedDestination(i))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),a(1,"h3",51),g(2),r(),T(3,Ht,2,1,"p",52)(4,Wt,2,1,"p",52),r()}if(o&2){let t=n.$implicit;E("targetUrl",t.BaseUrl),l(2),D(t.Name||t.BaseUrl),l(),p(t.Description?3:4)}}function Qt(o,n){if(o&1){let t=N();a(0,"sh-card",48),C("click",function(){c(t);let i=s(3);return d(i.toggleCustomList())})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),a(1,"sh-icon"),g(2,"plus-circle"),r(),a(3,"div",47)(4,"h3"),S(5,10),r(),a(6,"p"),S(7,11),r()()(),T(8,zt,2,0,"sh-divider"),M(9,jt,5,3,"app-destination-list-item",49,A)}if(o&2){let t=s(3);l(8),p(t.destinations().length>0?8:-1),l(),y(t.destinations())}}function qt(o,n){if(o&1&&T(0,Xt,5,0,"div",45)(1,Qt,11,1),o&2){let t=s(2);p(t.isLoadingDestinations()?0:1)}}function Yt(o,n){o&1&&(a(0,"sh-divider"),S(1,15),r())}function Zt(o,n){if(o&1&&(a(0,"p",52),g(1),r()),o&2){let t=s().$implicit;l(),D(t.Description)}}function te(o,n){if(o&1&&(a(0,"p",52),g(1),r()),o&2){let t=s().$implicit,e=s(3);l(),D(e.getSimplePath(t.BaseUrl))}}function ee(o,n){if(o&1){let t=N();a(0,"app-destination-list-item",57),C("click",function(){let i=c(t).$implicit,_=s(3);return d(_.selectSavedDestination(i))}),a(1,"h3",51),g(2),r(),T(3,Zt,2,1,"p",52)(4,te,2,1,"p",52),r()}if(o&2){let t=n.$implicit;E("targetUrl",t.BaseUrl),l(2),D(t.Name||t.BaseUrl),l(),p(t.Description?3:4)}}function ne(o,n){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){c(t);let i=s(2);return d(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),r(),g(4," Back "),r()(),a(5,"sh-card",55),C("click",function(){c(t);let i=s(2);return d(i.toggleCustomList())}),a(6,"sh-icon"),g(7,"plus-circle"),r(),a(8,"div",47)(9,"h3"),S(10,13),r(),a(11,"p"),S(12,14),r()()(),T(13,Yt,2,0,"sh-divider"),M(14,ee,5,3,"app-destination-list-item",56,A)}if(o&2){let t=s(2);l(13),p(t.destinations().length>0?13:-1),l(),y(t.destinations())}}function ie(o,n){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){c(t);let i=s(3);return d(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),r()(),a(4,"h3"),S(5,16),r()()}}function oe(o,n){if(o&1){let t=N();T(0,ie,6,0,"div",53),a(1,"app-destination-list",34),C("setDestination",function(i){c(t);let _=s(2);return d(_.setDestination(i))}),r()}if(o&2){let t=s(2),e=x(0);p(t.destinations().length>0||e.length>0?0:-1)}}function ae(o,n){if(o&1&&T(0,qt,2,1)(1,ne,16,1)(2,oe,2,1),o&2){let t=s(),e=x(1);p(!t.showCustomList()&&!e&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2)}}function re(o,n){if(o&1){let t=N();a(0,"div",25)(1,"button",58),C("click",function(){c(t);let i=s();return d(i.startAddingNew())}),a(2,"sh-icon"),g(3,"plus"),r(),g(4," Add another destination "),r()()}}function se(o,n){o&1&&(a(0,"h2"),S(1,19),r())}function _e(o,n){o&1&&(a(0,"h2"),S(1,20),r())}function le(o,n){if(o&1){let t=N();a(0,"sh-dialog",59),U("isOpenChange",function(i){c(t);let _=s();return w(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),d(i)}),a(1,"header",60)(2,"div",61),T(3,se,2,0,"h2")(4,_e,2,0,"h2"),a(5,"sh-alert",62),S(6,17),r()()(),a(7,"div",63)(8,"sh-form-field")(9,"textarea",64),U("ngModelChange",function(i){c(t);let _=s();return w(_.targetUrlCtrl,i)||(_.targetUrlCtrl=i),d(i)}),r()()(),a(10,"footer",65)(11,"button",27),C("click",function(){c(t);let i=s();return d(i.closeTargetUrlDialog(!1))}),g(12,"Cancel"),r(),a(13,"button",66),C("click",function(){c(t);let i=s();return d(i.closeTargetUrlDialog(!0))}),f(14,18),h(15,"sh-icon"),O(),r()()()}if(o&2){let t=s(),e=x(1);F("isOpen",t.targetUrlDialogOpen),E("options",rt(4,Gt)),l(3),p(e?4:3),l(6),F("ngModel",t.targetUrlCtrl)}}var b=new pt,Ae=(o={destinations:[]})=>b.group({destinations:b.array(o.destinations)}),Me=({key:o,customGroup:n,dynamicGroup:t,advancedGroup:e})=>b.group({destinationType:b.control(o),custom:n,dynamic:t,advanced:e}),B=class o{#n=P(lt);#i=P(_t);#t=P(Lt);#e=P(wt);injector=P(tt);testUrlComponents=st("testUrl");testStates=I([]);targetUrls=this.#t.targetUrls;targetUrlModel=$(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=I(null);targetUrlInitial=I(null);currentEditingIndex=I(null);targetUrlDialogOpen=I(!1);showCustomList=I(!1);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=$(()=>{let n=this.targetUrlModel();return n?yt(n)??null:null});isLoadingDestinationEffect=R(()=>{let n=this.isLoadingDestinations(),t=this.destinations(),e=this.targetUrls();!n&&t.length==0&&e.length==0&&this.toggleCustomList()});selectedDestinationTypeOption=$(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});getConnectionString(n){let t=this.#e.destinations().find(e=>e.ID===n);return console.log("connection",t),t}getSimplePath(n){return n?Mt(n):""}copyTargetUrl(n=0){let t=this.targetUrls()[n]?.url;t&&navigator.clipboard.writeText(t)}openTargetUrlDialog(n=0){let t=this.targetUrls()[n]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),e=this.targetUrlInitial();if(!n||t===e||!t)return;let i=this.currentEditingIndex();if(i!==null){let _=this.targetUrls()[i]?.connectionStringId??null,m=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,_,m)}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null)}setDestination(n){let t=Ft(n??"");if(!t)return;let e=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${n}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),e,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(!1);return}this.showCustomList()?(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)):(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1))}targetUrlsEffect=R(()=>{let n=this.targetUrls();this.testStates.update(t=>{if(t.length===n.length)return t;let e=[...t];if(e.length<n.length)for(let i=e.length;i<n.length;i++)e.push(null);else e.length=n.length;return e})});selectSavedDestination(n){n.BaseUrl&&n.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(n.BaseUrl,!0,n.ID,null):(this.#t.addTargetUrl(n.BaseUrl,n.ID,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)))}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(!0)}isAddingNew=I(!1);startAddingNew(){this.isAddingNew.set(!0),this.destinations().length===0&&this.showCustomList.set(!0)}changeDestination(n){this.currentEditingIndex.set(n),this.showCustomList.set(!0)}closeCustomList(){this.showCustomList.set(!1),this.currentEditingIndex.set(null),this.isAddingNew.set(!1)}removeDestination(n){this.#t.removeTargetUrl(n)}updateTargetUrl(n,t){if(!t)return;let e=this.targetUrls()[n]?.connectionStringId??null,i=this.targetUrls()[n]?.urlKey??null;this.#t.updateTargetUrl(n,t,e,i),this.updateTestState(n,null)}updateTestState(n,t){this.testStates.update(e=>{let i=[...e];return i[n]=t,i})}toggleSave(n){this.#t.toggleSaveConnectionString(n)}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent})}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents(),e=this.testStates();for(let i=0;i<t.length;i++){let _=t[i],m=this.testStates()[i];if(m&&typeof m!="string"&&m.action==="success")continue;if((await _.testDestination(!1))?.action!=="success")return}this.#o()}#o(){this.#t.shouldAutoSave()&&this.#t.submit(!0),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=et({type:o,selectors:[["app-destination"]],viewQuery:function(t,e){t&1&&nt(e.testUrlComponents,vt,5),t&2&&it()},decls:19,vars:9,consts:()=>{let n;n=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let e;e=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let _;_=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let m;m=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let L;L=$localize`Save as connection string`;let V;V=$localize`Loading destinations...`;let K;K=$localize`Configure a new destination`;let J;J=$localize`Configure a one-off or new storage location.`;let X;X=$localize`Or select a saved destination`;let z;z=$localize`Configure a new destination`;let H;H=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let j;j=$localize`Select storage type`;let Q;Q=$localize`Be careful, this will overwrite everything you have in your destination.`;let q;q=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`Set target URL`;let Z;return Z=$localize`Edit target URL`,[["formRef",""],["testUrl",""],n,t,e,i,_,m,L,V,K,J,X,z,H,W,j,Q,q,Y,Z,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"checkedChange","color","variant","checked"],["label",""],[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","tabindex","0",1,"actionable",3,"targetUrl"],["variant","type-a","tabindex","0",1,"actionable",3,"click","keydown.enter","keydown.space","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,e){if(t&1&&(at(0)(1),a(2,"form",21,0),C("submit",function(){return e.next()}),a(4,"div",22),h(5,"input",23)(6,"input",24),r(),a(7,"header"),T(8,Jt,2,0),r(),T(9,ae,3,1),T(10,re,5,0,"div",25),a(11,"div",26)(12,"button",27),C("click",function(){return e.goBack()}),f(13,2),h(14,"sh-icon"),O(),r(),a(15,"button",28),f(16,3),h(17,"sh-icon"),O(),r()()(),T(18,le,16,5,"sh-dialog",29)),t&2){let i=k(e.targetUrls());l();let _=k(i.length>0);l(7),p(e.currentEditingIndex()!==null||!e.showCustomList()&&!e.isAddingNew()?8:-1),l(),p((!_||e.showCustomList()||e.isAddingNew())&&e.currentEditingIndex()===null?9:-1),l(),p(_&&!e.showCustomList()&&!e.isAddingNew()?10:-1),l(5),ot("loading",e.isNew()&&e.testStates().length>0&&e.testStates()[0]==="testing"),E("disabled",!_),l(3),p(e.targetUrlDialogOpen()?18:-1)}},dependencies:[Rt,$t,Ut,bt,mt,Tt,ct,dt,Ct,ut,gt,ht,Ot,Dt,St,Et,Nt,It,ft,Pt,xt,At],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.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}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{Ae as createDestinationForm,Me as createDestinationFormGroup,B as default};
1
+ import{a as wt,b as Ut,c as $t,m as bt,q as Lt,r as Rt}from"./chunk-RTGUYIWH.js";import"./chunk-PNQ5BDQN.js";import"./chunk-TPKKLIFK.js";import{b as Mt,c as yt,d as Ft}from"./chunk-X5W2K6AN.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import"./chunk-PEOYNJJM.js";import"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import{B as ht,C as It,G as ft,H as Ot,K as Dt,L as Pt,V as xt,W as At,c as ct,e as dt,f as Ct,g as gt,i as ut,j as Tt,r as mt,s as pt,v as St,w as Nt,y as Et}from"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import{b as _t,d as lt}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as P,Bb as M,Bc as rt,Cb as y,Db as E,Eb as a,Fb as r,Gb as h,Kb as v,Lb as G,Nb as N,Rc as $,Ta as l,Ub as f,Vb as O,Wb as S,Zc as st,_b as C,ac as s,ea as c,fa as d,hb as et,hc as nt,ia as tt,ic as it,lc as ot,oc as g,pc as D,qa as I,sa as R,tc as F,uc as w,vc as U,wc as at,xb as T,xc as k,yb as m,yc as x,zb as A}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var vt=["testUrl"],Gt=()=>({maxWidth:"700px",width:"100%"});function kt(o,n){if(o&1){let t=N();a(0,"sh-card",30)(1,"div",32)(2,"h3"),S(3,4),r(),a(4,"button",33),C("click",function(){c(t);let i=s(3);return d(i.closeCustomList())}),g(5," Cancel "),a(6,"sh-icon"),g(7,"x-bold"),r()()(),a(8,"app-destination-list",34),C("setDestination",function(i){c(t);let _=s(3);return d(_.setDestination(i))}),r()()}}function Bt(o,n){if(o&1){let t=N();a(0,"div",40)(1,"sh-toggle",43),U("checkedChange",function(i){c(t);let _=s(2).$implicit;return w(_.save,i)||(_.save=i),d(i)}),a(2,"span",44),S(3,8),r()()()}if(o&2){let t=s(2).$implicit;l(),E("color","primary")("variant","raised"),F("checked",t.save)}}function Vt(o,n){if(o&1){let t=N();a(0,"sh-toggle-card",31),v(1,35),a(2,"app-destination-list-item",36)(3,"button",33),C("click",function(){c(t);let i=s().$index,_=s(2);return d(_.changeDestination(i))}),g(4,"Change"),r(),a(5,"sh-menu",37),C("click",function(i){return i.stopPropagation()}),a(6,"button",38)(7,"sh-icon"),g(8,"dots-three-vertical"),r()(),v(9,39),a(10,"button",33),C("click",function(){c(t);let i=s().$index,_=s(2);return d(_.openTargetUrlDialog(i))}),f(11,5),h(12,"sh-icon"),O(),r(),a(13,"button",33),C("click",function(){c(t);let i=s().$index,_=s(2);return d(_.copyTargetUrl(i))}),f(14,6),h(15,"sh-icon"),O(),r(),a(16,"button",33),C("click",function(){c(t);let i=s().$index,_=s(2);return d(_.removeDestination(i))}),f(17,7),h(18,"sh-icon"),O(),r(),G(),r()(),G(),T(19,Bt,4,3,"div",40),a(20,"app-test-url",41,1),C("targetUrlChange",function(i){c(t);let _=s().$index,p=s(2);return d(p.updateTargetUrl(_,i))})("testSignalChange",function(i){c(t);let _=s().$index,p=s(2);return d(p.updateTestState(_,i))}),r(),a(22,"app-single-destination",42),C("targetUrlChange",function(i){c(t);let _=s().$index,p=s(2);return d(p.updateTargetUrl(_,i))}),r()()}if(o&2){let t=s(),e=t.$implicit,i=t.$index,_=s(2);E("disableToggle",!0)("isActive",!0),l(2),E("targetUrl",e.url)("connectionStringId",e.connectionStringId),l(17),m(e.connectionStringId?-1:19),l(),E("targetUrl",e.url)("testSignal",_.testStates()[i]||null)("backupId",_.backupId())("connectionStringId",e.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!0)("testExpectation",_.isNew()?"destinationEmpty":"any")("moduleType","Backend"),l(2),E("targetUrl",e.url)("useBackupState",!0)}}function Kt(o,n){if(o&1&&T(0,kt,9,0,"sh-card",30)(1,Vt,23,16,"sh-toggle-card",31),o&2){let t=n.$index,e=s(2);m(e.showCustomList()&&e.currentEditingIndex()===t?0:1)}}function Jt(o,n){if(o&1&&M(0,Kt,2,1,null,null,A),o&2){s();let t=x(0);y(t)}}function Xt(o,n){o&1&&(a(0,"div",45),h(1,"sh-progress-bar",46),a(2,"div",47)(3,"h3"),S(4,9),r()()())}function zt(o,n){o&1&&(a(0,"sh-divider"),S(1,12),r())}function Ht(o,n){if(o&1&&(a(0,"p",52),g(1),r()),o&2){let t=s().$implicit;l(),D(t.Description)}}function Wt(o,n){if(o&1&&(a(0,"p",52),g(1),r()),o&2){let t=s().$implicit,e=s(4);l(),D(e.getSimplePath(t.BaseUrl))}}function jt(o,n){if(o&1){let t=N();a(0,"app-destination-list-item",50),C("click",function(){let i=c(t).$implicit,_=s(4);return d(_.selectSavedDestination(i))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),a(1,"h3",51),g(2),r(),T(3,Ht,2,1,"p",52)(4,Wt,2,1,"p",52),r()}if(o&2){let t=n.$implicit;E("targetUrl",t.BaseUrl),l(2),D(t.Name||t.BaseUrl),l(),m(t.Description?3:4)}}function Qt(o,n){if(o&1){let t=N();a(0,"sh-card",48),C("click",function(){c(t);let i=s(3);return d(i.toggleCustomList())})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),a(1,"sh-icon"),g(2,"plus-circle"),r(),a(3,"div",47)(4,"h3"),S(5,10),r(),a(6,"p"),S(7,11),r()()(),T(8,zt,2,0,"sh-divider"),M(9,jt,5,3,"app-destination-list-item",49,A)}if(o&2){let t=s(3);l(8),m(t.destinations().length>0?8:-1),l(),y(t.destinations())}}function qt(o,n){if(o&1&&T(0,Xt,5,0,"div",45)(1,Qt,11,1),o&2){let t=s(2);m(t.isLoadingDestinations()?0:1)}}function Yt(o,n){o&1&&(a(0,"sh-divider"),S(1,15),r())}function Zt(o,n){if(o&1&&(a(0,"p",52),g(1),r()),o&2){let t=s().$implicit;l(),D(t.Description)}}function te(o,n){if(o&1&&(a(0,"p",52),g(1),r()),o&2){let t=s().$implicit,e=s(3);l(),D(e.getSimplePath(t.BaseUrl))}}function ee(o,n){if(o&1){let t=N();a(0,"app-destination-list-item",57),C("click",function(){let i=c(t).$implicit,_=s(3);return d(_.selectSavedDestination(i))}),a(1,"h3",51),g(2),r(),T(3,Zt,2,1,"p",52)(4,te,2,1,"p",52),r()}if(o&2){let t=n.$implicit;E("targetUrl",t.BaseUrl),l(2),D(t.Name||t.BaseUrl),l(),m(t.Description?3:4)}}function ne(o,n){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){c(t);let i=s(2);return d(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),r(),g(4," Back "),r()(),a(5,"sh-card",55),C("click",function(){c(t);let i=s(2);return d(i.toggleCustomList())}),a(6,"sh-icon"),g(7,"plus-circle"),r(),a(8,"div",47)(9,"h3"),S(10,13),r(),a(11,"p"),S(12,14),r()()(),T(13,Yt,2,0,"sh-divider"),M(14,ee,5,3,"app-destination-list-item",56,A)}if(o&2){let t=s(2);l(13),m(t.destinations().length>0?13:-1),l(),y(t.destinations())}}function ie(o,n){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){c(t);let i=s(3);return d(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),r()(),a(4,"h3"),S(5,16),r()()}}function oe(o,n){if(o&1){let t=N();T(0,ie,6,0,"div",53),a(1,"app-destination-list",34),C("setDestination",function(i){c(t);let _=s(2);return d(_.setDestination(i))}),r()}if(o&2){let t=s(2),e=x(0);m(t.destinations().length>0||e.length>0?0:-1)}}function ae(o,n){if(o&1&&T(0,qt,2,1)(1,ne,16,1)(2,oe,2,1),o&2){let t=s(),e=x(1);m(!t.showCustomList()&&!e&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2)}}function re(o,n){if(o&1){let t=N();a(0,"div",25)(1,"button",58),C("click",function(){c(t);let i=s();return d(i.startAddingNew())}),a(2,"sh-icon"),g(3,"plus"),r(),g(4," Add another destination "),r()()}}function se(o,n){o&1&&(a(0,"h2"),S(1,19),r())}function _e(o,n){o&1&&(a(0,"h2"),S(1,20),r())}function le(o,n){if(o&1){let t=N();a(0,"sh-dialog",59),U("isOpenChange",function(i){c(t);let _=s();return w(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),d(i)}),a(1,"header",60)(2,"div",61),T(3,se,2,0,"h2")(4,_e,2,0,"h2"),a(5,"sh-alert",62),S(6,17),r()()(),a(7,"div",63)(8,"sh-form-field")(9,"textarea",64),U("ngModelChange",function(i){c(t);let _=s();return w(_.targetUrlCtrl,i)||(_.targetUrlCtrl=i),d(i)}),r()()(),a(10,"footer",65)(11,"button",27),C("click",function(){c(t);let i=s();return d(i.closeTargetUrlDialog(!1))}),g(12,"Cancel"),r(),a(13,"button",66),C("click",function(){c(t);let i=s();return d(i.closeTargetUrlDialog(!0))}),f(14,18),h(15,"sh-icon"),O(),r()()()}if(o&2){let t=s(),e=x(1);F("isOpen",t.targetUrlDialogOpen),E("options",rt(4,Gt)),l(3),m(e?4:3),l(6),F("ngModel",t.targetUrlCtrl)}}var b=new mt,Ae=(o={destinations:[]})=>b.group({destinations:b.array(o.destinations)}),Me=({key:o,customGroup:n,dynamicGroup:t,advancedGroup:e})=>b.group({destinationType:b.control(o),custom:n,dynamic:t,advanced:e}),B=class o{#n=P(lt);#i=P(_t);#t=P(Lt);#e=P(wt);injector=P(tt);testUrlComponents=st("testUrl");testStates=I([]);targetUrls=this.#t.targetUrls;targetUrlModel=$(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=I(null);targetUrlInitial=I(null);currentEditingIndex=I(null);targetUrlDialogOpen=I(!1);showCustomList=I(!1);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=$(()=>{let n=this.targetUrlModel();return n?yt(n)??null:null});isLoadingDestinationEffect=R(()=>{let n=this.isLoadingDestinations(),t=this.destinations(),e=this.targetUrls();!n&&t.length==0&&e.length==0&&this.toggleCustomList()});selectedDestinationTypeOption=$(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});getConnectionString(n){let t=this.#e.destinations().find(e=>e.ID===n);return console.log("connection",t),t}getSimplePath(n){return n?Mt(n):""}copyTargetUrl(n=0){let t=this.targetUrls()[n]?.url;t&&navigator.clipboard.writeText(t)}openTargetUrlDialog(n=0){let t=this.targetUrls()[n]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),e=this.targetUrlInitial();if(!n||t===e||!t)return;let i=this.currentEditingIndex();if(i!==null){let _=this.targetUrls()[i]?.connectionStringId??null,p=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,_,p)}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null)}setDestination(n){let t=Ft(n??"");if(!t)return;let e=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${n}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),e,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(!1);return}this.showCustomList()?(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)):(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1))}targetUrlsEffect=R(()=>{let n=this.targetUrls();this.testStates.update(t=>{if(t.length===n.length)return t;let e=[...t];if(e.length<n.length)for(let i=e.length;i<n.length;i++)e.push(null);else e.length=n.length;return e})});selectSavedDestination(n){n.BaseUrl&&n.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(n.BaseUrl,!0,n.ID,null):(this.#t.addTargetUrl(n.BaseUrl,n.ID,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)))}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(!0)}isAddingNew=I(!1);startAddingNew(){this.isAddingNew.set(!0),this.destinations().length===0&&this.showCustomList.set(!0)}changeDestination(n){this.currentEditingIndex.set(n),this.showCustomList.set(!0)}closeCustomList(){this.showCustomList.set(!1),this.currentEditingIndex.set(null),this.isAddingNew.set(!1)}removeDestination(n){this.#t.removeTargetUrl(n)}updateTargetUrl(n,t){if(!t)return;let e=this.targetUrls()[n]?.connectionStringId??null,i=this.targetUrls()[n]?.urlKey??null;this.#t.updateTargetUrl(n,t,e,i),this.updateTestState(n,null)}updateTestState(n,t){this.testStates.update(e=>{let i=[...e];return i[n]=t,i})}toggleSave(n){this.#t.toggleSaveConnectionString(n)}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent})}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents(),e=this.testStates();for(let i=0;i<t.length;i++){let _=t[i],p=this.testStates()[i];if(p&&typeof p!="string"&&p.action==="success")continue;if((await _.testDestination(!1))?.action!=="success")return}this.#o()}#o(){this.#t.shouldAutoSave()&&this.#t.submit(!0),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=et({type:o,selectors:[["app-destination"]],viewQuery:function(t,e){t&1&&nt(e.testUrlComponents,vt,5),t&2&&it()},decls:19,vars:9,consts:()=>{let n;n=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let e;e=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let _;_=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let p;p=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let L;L=$localize`Save as connection string`;let V;V=$localize`Loading destinations...`;let K;K=$localize`Configure a new destination`;let J;J=$localize`Configure a one-off or new storage location.`;let X;X=$localize`Or select a saved destination`;let z;z=$localize`Configure a new destination`;let H;H=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let j;j=$localize`Select storage type`;let Q;Q=$localize`Be careful, this will overwrite everything you have in your destination.`;let q;q=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`Set target URL`;let Z;return Z=$localize`Edit target URL`,[["formRef",""],["testUrl",""],n,t,e,i,_,p,L,V,K,J,X,z,H,W,j,Q,q,Y,Z,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"checkedChange","color","variant","checked"],["label",""],[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","tabindex","0",1,"actionable",3,"targetUrl"],["variant","type-a","tabindex","0",1,"actionable",3,"click","keydown.enter","keydown.space","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,e){if(t&1&&(at(0)(1),a(2,"form",21,0),C("submit",function(){return e.next()}),a(4,"div",22),h(5,"input",23)(6,"input",24),r(),a(7,"header"),T(8,Jt,2,0),r(),T(9,ae,3,1),T(10,re,5,0,"div",25),a(11,"div",26)(12,"button",27),C("click",function(){return e.goBack()}),f(13,2),h(14,"sh-icon"),O(),r(),a(15,"button",28),f(16,3),h(17,"sh-icon"),O(),r()()(),T(18,le,16,5,"sh-dialog",29)),t&2){let i=k(e.targetUrls());l();let _=k(i.length>0);l(7),m(e.currentEditingIndex()!==null||!e.showCustomList()&&!e.isAddingNew()?8:-1),l(),m((!_||e.showCustomList()||e.isAddingNew())&&e.currentEditingIndex()===null?9:-1),l(),m(_&&!e.showCustomList()&&!e.isAddingNew()?10:-1),l(5),ot("loading",e.isNew()&&e.testStates().length>0&&e.testStates()[0]==="testing"),E("disabled",!_),l(3),m(e.targetUrlDialogOpen()?18:-1)}},dependencies:[Rt,$t,Ut,bt,pt,Tt,ct,dt,Ct,ut,gt,ht,Ot,Dt,St,Et,Nt,It,ft,Pt,xt,At],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.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}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:3rem 1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{Ae as createDestinationForm,Me as createDestinationFormGroup,B as default};
@@ -1 +1 @@
1
- import{Pc as f,Qc as w,S as d,Sc as x,Tc as h,_ as v,ha as y,i as m,ja as l,pa as b,ra as D}from"./chunk-TQTOIWBK.js";import{a as g,b as p}from"./chunk-7CGTOI24.js";function N(s,e){let o=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=s()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:o,manualCleanup:!0});return o.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function E(s,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=j(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),w(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function j(s=Object.is){return(e,o)=>e.kind===1&&o.kind===1&&s(e.value,o.value)}function U(s){return x(p(g({},s),{loader:void 0,stream:e=>{let o,n=()=>o?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=s.stream;if(r===void 0)throw new d(990,!1);return o=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{N as a,E as b,U as c};
1
+ import{$ as v,Qc as f,Rc as w,T as d,Tc as x,Uc as h,i as m,ia as y,ka as l,qa as b,sa as D}from"./chunk-K5XGRFWJ.js";import{a as g,b as p}from"./chunk-7CGTOI24.js";function N(s,e){let o=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=s()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:o,manualCleanup:!0});return o.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function E(s,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=j(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),w(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function j(s=Object.is){return(e,o)=>e.kind===1&&o.kind===1&&s(e.value,o.value)}function U(s){return x(p(g({},s),{loader:void 0,stream:e=>{let o,n=()=>o?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=s.stream;if(r===void 0)throw new d(990,!1);return o=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{N as a,E as b,U as c};
@@ -1 +1 @@
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
+ import{a as T}from"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import{B as f,G as M}from"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import{d as p,e as h}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as a,Eb as e,Fb as t,Gb as _,Ta as E,Wb as r,_b as c,hb as u,lc as S,oc as g,qa as d}from"./chunk-K5XGRFWJ.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{V as i,Y as c,_ as a,ia as h}from"./chunk-TQTOIWBK.js";var d=null;function s(){return d}function w(o){d??=o}var l=class{},f=(()=>{class o{historyGo(t){throw new Error("")}static \u0275fac=function(e){return new(e||o)};static \u0275prov=i({token:o,factory:()=>a(g),providedIn:"platform"})}return o})(),y=new c(""),g=(()=>{class o extends f{_location;_history;_doc=a(h);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return s().getBaseHref(this._doc)}onPopState(t){let e=s().getGlobalEventTarget(this._doc,"window");return e.addEventListener("popstate",t,!1),()=>e.removeEventListener("popstate",t)}onHashChange(t){let e=s().getGlobalEventTarget(this._doc,"window");return e.addEventListener("hashchange",t,!1),()=>e.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,e,n){this._history.pushState(t,e,n)}replaceState(t,e,n){this._history.replaceState(t,e,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(e){return new(e||o)};static \u0275prov=i({token:o,factory:()=>new o,providedIn:"platform"})}return o})();function D(o,r){r=encodeURIComponent(r);for(let t of o.split(";")){let e=t.indexOf("="),[n,u]=e==-1?[t,""]:[t.slice(0,e),t.slice(e+1)];if(n.trim()===r)return decodeURIComponent(u)}return null}var p=class{};export{s as a,w as b,l as c,f as d,y as e,g as f,D as g,p as h};
1
+ import{$ as a,W as i,Z as c,ja as h}from"./chunk-K5XGRFWJ.js";var d=null;function s(){return d}function w(o){d??=o}var l=class{},f=(()=>{class o{historyGo(t){throw new Error("")}static \u0275fac=function(e){return new(e||o)};static \u0275prov=i({token:o,factory:()=>a(g),providedIn:"platform"})}return o})(),y=new c(""),g=(()=>{class o extends f{_location;_history;_doc=a(h);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return s().getBaseHref(this._doc)}onPopState(t){let e=s().getGlobalEventTarget(this._doc,"window");return e.addEventListener("popstate",t,!1),()=>e.removeEventListener("popstate",t)}onHashChange(t){let e=s().getGlobalEventTarget(this._doc,"window");return e.addEventListener("hashchange",t,!1),()=>e.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,e,n){this._history.pushState(t,e,n)}replaceState(t,e,n){this._history.replaceState(t,e,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(e){return new(e||o)};static \u0275prov=i({token:o,factory:()=>new o,providedIn:"platform"})}return o})();function D(o,r){r=encodeURIComponent(r);for(let t of o.split(";")){let e=t.indexOf("="),[n,u]=e==-1?[t,""]:[t.slice(0,e),t.slice(e+1)];if(n.trim()===r)return decodeURIComponent(u)}return null}var p=class{};export{s as a,w as b,l as c,f as d,y as e,g as f,D as g,p as h};
@@ -1 +1 @@
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
+ import{a as Se}from"./chunk-JB26UVQP.js";import"./chunk-FQINMZH2.js";import"./chunk-ZTENLO77.js";import"./chunk-ZKIZ7IIA.js";import{a as Ce,b as pe,c as me,m as k,r as Te}from"./chunk-RTGUYIWH.js";import"./chunk-PNQ5BDQN.js";import"./chunk-TPKKLIFK.js";import{b as de,c as ue,d as ge}from"./chunk-X5W2K6AN.js";import"./chunk-AXG7WHBS.js";import{a as ce}from"./chunk-AXLO5KWF.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import{a as $}from"./chunk-PEOYNJJM.js";import"./chunk-5W4BSVZJ.js";import"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.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-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as O,Bb as J,Cb as X,Db as E,Eb as a,Fb as _,Gb as x,Nb as T,Rc as b,Ta as c,Ub as y,Vb as B,Wb as d,Xb as K,Yb as W,Yc as Y,Zb as j,_b as m,ac as r,ea as u,fa as g,hb as V,hc as Q,ic as q,lc as H,oc as D,pc as P,qa as f,sa as G,tc as A,uc as N,vc as M,xb as C,yb as p,zb as z}from"./chunk-K5XGRFWJ.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 _}from"./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{ka as l}from"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{Fc as g,Gb as n,Gc as d,Hb as i,Sa as a,Vb as p,_ as s,gb as S,nc as c,oc as m}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var o=class r{#e=s(_);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||r)};static \u0275cmp=S({type:r,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,E){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),g(5,"json"),i()()),e&2&&(a(4),m(d(5,1,E.serverSettings())))},dependencies:[l],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{o as default};
1
+ import{a as _}from"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import{ka as l}from"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as s,Gc as g,Hb as n,Hc as d,Ib as i,Ta as a,Wb as p,hb as S,oc as c,pc as m}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var o=class r{#e=s(_);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||r)};static \u0275cmp=S({type:r,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,E){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),g(5,"json"),i()()),e&2&&(a(4),m(d(5,1,E.serverSettings())))},dependencies:[l],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{o as default};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-KI2HT2TI.js";import"./chunk-MJPEKJ3T.js";import"./chunk-RTGUYIWH.js";import"./chunk-PNQ5BDQN.js";import"./chunk-TPKKLIFK.js";import"./chunk-X5W2K6AN.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import"./chunk-PEOYNJJM.js";import"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
@@ -0,0 +1 @@
1
+ import{g as a,h as b,i as c,j as d}from"./chunk-RTGUYIWH.js";import"./chunk-PNQ5BDQN.js";import"./chunk-TPKKLIFK.js";import"./chunk-X5W2K6AN.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import"./chunk-PEOYNJJM.js";import"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-YKF5ZW55.js";import"./chunk-N3TVNDVH.js";import"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{a as default};
@@ -1 +1 @@
1
- import{a as O,d as y}from"./chunk-N2AU7VKX.js";import{A as k,L as g,V as c,Z as A,l as f,m,q as R,w as D}from"./chunk-TQTOIWBK.js";import{a as l,b as I}from"./chunk-7CGTOI24.js";var P=class{_fns;constructor(){this._fns=[]}eject(e){let p=this._fns.indexOf(e);p!==-1&&(this._fns=[...this._fns.slice(0,p),...this._fns.slice(p+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new P}};var d=class extends Error{url;status;statusText;body;request;constructor(e,p,r){super(r),this.name="ApiError",this.url=p.url,this.status=p.status,this.statusText=p.statusText,this.body=p.body,this.request=e}};var h=i=>typeof i=="string",v=i=>h(i)&&i!=="",T=i=>i instanceof Blob,S=i=>i instanceof FormData,L=i=>{try{return btoa(i)}catch{return Buffer.from(i).toString("base64")}},w=i=>{let e=[],p=(a,n)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`)},r=(a,n)=>{n!=null&&(n instanceof Date?p(a,n.toISOString()):Array.isArray(n)?n.forEach(o=>r(a,o)):typeof n=="object"?Object.entries(n).forEach(([o,u])=>r(`${a}[${o}]`,u)):p(a,n))};return Object.entries(i).forEach(([a,n])=>r(a,n)),e.length?`?${e.join("&")}`:""},F=(i,e)=>{let p=i.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",i.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?p(String(e.path[o])):n),a=i.BASE+r;return e.query?a+w(e.query):a},j=i=>{if(i.formData){let e=new FormData,p=(r,a)=>{h(a)||T(a)?e.append(r,a):e.append(r,JSON.stringify(a))};return Object.entries(i.formData).filter(([,r])=>r!=null).forEach(([r,a])=>{Array.isArray(a)?a.forEach(n=>p(r,n)):p(r,a)}),e}},V=async(i,e)=>typeof e=="function"?e(i):e,U=(i,e)=>D({token:V(e,i.TOKEN),username:V(e,i.USERNAME),password:V(e,i.PASSWORD),additionalHeaders:V(e,i.HEADERS)}).pipe(R(({token:p,username:r,password:a,additionalHeaders:n})=>{let o=Object.entries(l(l({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[B,b])=>I(l({},u),{[B]:String(b)}),{});if(v(p)&&(o.Authorization=`Bearer ${p}`),v(r)&&v(a)){let u=L(`${r}:${a}`);o.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:T(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":h(e.body)?o["Content-Type"]="text/plain":S(e.body)||(o["Content-Type"]="application/json")),new O(o)})),H=i=>{if(i.body)return i.mediaType?.includes("application/json")||i.mediaType?.includes("+json")?JSON.stringify(i.body):h(i.body)||T(i.body)||S(i.body)?i.body:JSON.stringify(i.body)},N=(i,e,p,r,a,n,o)=>p.request(e.method,r,{headers:o,body:a??n,withCredentials:i.WITH_CREDENTIALS,observe:"response"}),M=(i,e)=>{if(e){let p=i.headers.get(e);if(h(p))return p}},z=i=>{if(i.status!==204&&i.body!==null)return i.body},W=(i,e)=>{let r=l({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},i.errors)[e.status];if(r)throw new d(i,e,r);if(!e.ok){let a=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new d(i,e,`Generic Error: status: ${a}; status text: ${n}; body: ${o}`)}},s=(i,e,p)=>{let r=F(i,p),a=j(p),n=H(p);return U(i,p).pipe(g(o=>N(i,p,e,r,n,a,o)),g(async o=>{for(let x of i.interceptors.response._fns)o=await x(o);let u=z(o),B=M(o,p.responseHeader),b=u;return p.responseTransformer&&o.ok&&(b=await p.responseTransformer(u)),{url:r,ok:o.ok,status:o.status,statusText:o.statusText,body:B??b}}),k(o=>o.status?f({url:r,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):m(()=>o)),R(o=>(W(p,o),o.body)),k(o=>m(()=>o)))};var G=class i{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},E=class i{constructor(e){this.http=e}getApiV2ConnectionStrings(){return s(t,this.http,{method:"GET",url:"/api/v2/connection-strings"})}postApiV2ConnectionStrings(e){return s(t,this.http,{method:"POST",url:"/api/v2/connection-strings",body:e.requestBody,mediaType:"application/json"})}getApiV2ConnectionStringById(e){return s(t,this.http,{method:"GET",url:"/api/v2/connection-string/{id}",path:{id:e.id}})}putApiV2ConnectionStringById(e){return s(t,this.http,{method:"PUT",url:"/api/v2/connection-string/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV2ConnectionStringById(e){return s(t,this.http,{method:"DELETE",url:"/api/v2/connection-string/{id}",path:{id:e.id}})}postApiV2ConnectionStringByIdUpdateBackups(e){return s(t,this.http,{method:"POST",url:"/api/v2/connection-string/{id}/update-backups",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},C=class i{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}postApiV1AuthStatus(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/status"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate,type:e.type},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemotecontrolRegisterWait(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register/wait"})}postApiV2SystemTempDiskSpace(e){return s(t,this.http,{method:"POST",url:"/api/v2/system/temp-disk-space",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFilesets(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return s(t,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},q=class i{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})};export{t as a,G as b,E as c,C as d,q as e};
1
+ import{a as O,d as y}from"./chunk-HDDAGHHE.js";import{B as k,M as g,W as c,_ as A,l as f,m,q as R,w as D}from"./chunk-K5XGRFWJ.js";import{a as l,b as I}from"./chunk-7CGTOI24.js";var P=class{_fns;constructor(){this._fns=[]}eject(e){let p=this._fns.indexOf(e);p!==-1&&(this._fns=[...this._fns.slice(0,p),...this._fns.slice(p+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new P}};var d=class extends Error{url;status;statusText;body;request;constructor(e,p,r){super(r),this.name="ApiError",this.url=p.url,this.status=p.status,this.statusText=p.statusText,this.body=p.body,this.request=e}};var h=i=>typeof i=="string",v=i=>h(i)&&i!=="",T=i=>i instanceof Blob,S=i=>i instanceof FormData,L=i=>{try{return btoa(i)}catch{return Buffer.from(i).toString("base64")}},w=i=>{let e=[],p=(a,n)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`)},r=(a,n)=>{n!=null&&(n instanceof Date?p(a,n.toISOString()):Array.isArray(n)?n.forEach(o=>r(a,o)):typeof n=="object"?Object.entries(n).forEach(([o,u])=>r(`${a}[${o}]`,u)):p(a,n))};return Object.entries(i).forEach(([a,n])=>r(a,n)),e.length?`?${e.join("&")}`:""},F=(i,e)=>{let p=i.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",i.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?p(String(e.path[o])):n),a=i.BASE+r;return e.query?a+w(e.query):a},j=i=>{if(i.formData){let e=new FormData,p=(r,a)=>{h(a)||T(a)?e.append(r,a):e.append(r,JSON.stringify(a))};return Object.entries(i.formData).filter(([,r])=>r!=null).forEach(([r,a])=>{Array.isArray(a)?a.forEach(n=>p(r,n)):p(r,a)}),e}},V=async(i,e)=>typeof e=="function"?e(i):e,U=(i,e)=>D({token:V(e,i.TOKEN),username:V(e,i.USERNAME),password:V(e,i.PASSWORD),additionalHeaders:V(e,i.HEADERS)}).pipe(R(({token:p,username:r,password:a,additionalHeaders:n})=>{let o=Object.entries(l(l({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[B,b])=>I(l({},u),{[B]:String(b)}),{});if(v(p)&&(o.Authorization=`Bearer ${p}`),v(r)&&v(a)){let u=L(`${r}:${a}`);o.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:T(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":h(e.body)?o["Content-Type"]="text/plain":S(e.body)||(o["Content-Type"]="application/json")),new O(o)})),H=i=>{if(i.body)return i.mediaType?.includes("application/json")||i.mediaType?.includes("+json")?JSON.stringify(i.body):h(i.body)||T(i.body)||S(i.body)?i.body:JSON.stringify(i.body)},N=(i,e,p,r,a,n,o)=>p.request(e.method,r,{headers:o,body:a??n,withCredentials:i.WITH_CREDENTIALS,observe:"response"}),M=(i,e)=>{if(e){let p=i.headers.get(e);if(h(p))return p}},z=i=>{if(i.status!==204&&i.body!==null)return i.body},W=(i,e)=>{let r=l({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},i.errors)[e.status];if(r)throw new d(i,e,r);if(!e.ok){let a=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new d(i,e,`Generic Error: status: ${a}; status text: ${n}; body: ${o}`)}},s=(i,e,p)=>{let r=F(i,p),a=j(p),n=H(p);return U(i,p).pipe(g(o=>N(i,p,e,r,n,a,o)),g(async o=>{for(let x of i.interceptors.response._fns)o=await x(o);let u=z(o),B=M(o,p.responseHeader),b=u;return p.responseTransformer&&o.ok&&(b=await p.responseTransformer(u)),{url:r,ok:o.ok,status:o.status,statusText:o.statusText,body:B??b}}),k(o=>o.status?f({url:r,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):m(()=>o)),R(o=>(W(p,o),o.body)),k(o=>m(()=>o)))};var G=class i{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},E=class i{constructor(e){this.http=e}getApiV2ConnectionStrings(){return s(t,this.http,{method:"GET",url:"/api/v2/connection-strings"})}postApiV2ConnectionStrings(e){return s(t,this.http,{method:"POST",url:"/api/v2/connection-strings",body:e.requestBody,mediaType:"application/json"})}getApiV2ConnectionStringById(e){return s(t,this.http,{method:"GET",url:"/api/v2/connection-string/{id}",path:{id:e.id}})}putApiV2ConnectionStringById(e){return s(t,this.http,{method:"PUT",url:"/api/v2/connection-string/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV2ConnectionStringById(e){return s(t,this.http,{method:"DELETE",url:"/api/v2/connection-string/{id}",path:{id:e.id}})}postApiV2ConnectionStringByIdUpdateBackups(e){return s(t,this.http,{method:"POST",url:"/api/v2/connection-string/{id}/update-backups",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},C=class i{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}postApiV1AuthStatus(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/status"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate,type:e.type},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemotecontrolRegisterWait(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register/wait"})}postApiV2SystemTempDiskSpace(e){return s(t,this.http,{method:"POST",url:"/api/v2/system/temp-disk-space",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFilesets(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return s(t,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},q=class i{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})};export{t as a,G as b,E as c,C as d,q as e};
@@ -1 +1 @@
1
- import{a as f}from"./chunk-6JS7B4FW.js";import{_ as m,a as S,b as i,pa as c}from"./chunk-TQTOIWBK.js";function u(...a){let e=c(...a);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}function A(a,e,o=!1,s){let l=m(f);e=l.getItemParsed(a,o)??e;let n=u(e),r=n[S];s?.equal&&(r.equal=s.equal);function g(t){t==null?l.removeItem(a):l.setItemParsed(a,t,o)}return n.set=t=>{g(t),i(r,t)},n.update=t=>{let T=t(n());g(T),i(r,T)},n}export{A as a};
1
+ import{a as f}from"./chunk-VNXFTYQQ.js";import{$ as m,a as S,b as i,qa as c}from"./chunk-K5XGRFWJ.js";function u(...a){let e=c(...a);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}function A(a,e,o=!1,s){let l=m(f);e=l.getItemParsed(a,o)??e;let n=u(e),r=n[S];s?.equal&&(r.equal=s.equal);function g(t){t==null?l.removeItem(a):l.setItemParsed(a,t,o)}return n.set=t=>{g(t),i(r,t)},n.update=t=>{let T=t(n());g(T),i(r,T)},n}export{A as a};
@@ -0,0 +1 @@
1
+ import{c as a,d as b}from"./chunk-KI2HT2TI.js";import"./chunk-MJPEKJ3T.js";import"./chunk-RTGUYIWH.js";import"./chunk-PNQ5BDQN.js";import"./chunk-TPKKLIFK.js";import"./chunk-X5W2K6AN.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import"./chunk-PEOYNJJM.js";import"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
@@ -0,0 +1 @@
1
+ import{d as a,e as b,f as c}from"./chunk-RTGUYIWH.js";import"./chunk-PNQ5BDQN.js";import"./chunk-TPKKLIFK.js";import"./chunk-X5W2K6AN.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-QGAOYLQU.js";import"./chunk-RM2KGG7J.js";import"./chunk-PEOYNJJM.js";import"./chunk-QZEIAQ3M.js";import"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import"./chunk-CJKZ27FM.js";import"./chunk-5E3B4AEF.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
@@ -1 +1 @@
1
- import{a as xe,c as Ae,d as v}from"./chunk-CAQ3XMFP.js";import{a as we}from"./chunk-736PM4LG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-ANSV4G2K.js";import{b as De}from"./chunk-IQL3REGJ.js";import"./chunk-E4NQOMJX.js";import"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{A as ge,B as Oe,H as Ne,L as he,W as fe,Y as Re,b as ce,c as pe,d as g,e as Fe,f as de,j as ue,p as Te,q as Ce,r as Ee,t as Pe,v as Se,w as me}from"./chunk-VKQQDCUN.js";import{a as b,d as Ie}from"./chunk-DSYNIXJF.js";import{b as ae,d as le,e as _e}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import{a as re,d as se}from"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as u,Ac as ie,Cb as S,Db as s,Eb as r,F as $,Fb as _,L as Q,Mb as y,Qc as A,Sa as a,Tb as c,Ub as p,Vb as m,Wb as L,Xb as X,Yb as G,Zb as h,_ as E,da as w,ea as D,gb as Y,kc as B,nc as x,oc as Z,pa as P,qc as ee,ra as M,sc as oe,tc as te,uc as ne,wb as F,xb as d}from"./chunk-TQTOIWBK.js";import{a as W}from"./chunk-7CGTOI24.js";var $e=()=>["/"];function Me(t,o){t&1&&(s(0,"sh-toggle",25),c(1,5),_(2,"input",28),p(),r())}function ye(t,o){t&1&&(s(0,"span",31),m(1,9),r())}function Le(t,o){if(t&1&&(s(0,"span",31),m(1,10),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),X(1)}}function Xe(t,o){if(t&1&&_(0,"sh-progress-bar",38),t&2){let e=u(2);B("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),S("value",e.calculatePasswordStrength()*(100/5))}}function Ge(t,o){t&1&&(s(0,"span",31),m(1,11),r())}function Be(t,o){t&1&&(s(0,"span",31),m(1,12),r())}function be(t,o){if(t&1&&(s(0,"span",31),m(1,13),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),X(1)}}function ve(t,o){t&1&&(c(0,7,1),_(1,"sh-icon"),p())}function ke(t,o){t&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Ue(t,o){t&1&&(c(0,14,1),_(1,"sh-icon",40),p())}function Ke(t,o){t&1&&(c(0,14,2),_(1,"sh-icon"),p())}function Je(t,o){if(t&1){let e=y();s(0,"button",39),h("click",function(){w(e);let i=u(2);return D(i.copyPassword())}),c(1,14),F(2,Ue,2,0)(3,Ke,2,0),p(),r()}if(t&2){let e=u(2);a(2),d(e.copiedPassword()?2:3)}}function He(t,o){t&1&&(s(0,"sh-alert",37),m(1,15),r())}function ze(t,o){if(t&1){let e=y();s(0,"div",26)(1,"sh-form-field")(2,"label",29),c(3,6),_(4,"sup"),p(),r(),_(5,"input",30),F(6,ye,2,0,"span",31)(7,Le,2,1,"span",31),r(),F(8,Xe,1,9,"sh-progress-bar",32),s(9,"sh-form-field"),_(10,"input",33),F(11,Ge,2,0,"span",31)(12,Be,2,0,"span",31)(13,be,2,1,"span",31),r(),s(14,"div",34)(15,"button",35),h("click",function(){w(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,ve,2,0)(18,ke,2,0),p(),r(),s(19,"button",35),h("click",function(){w(e);let i=u();return D(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,Je,4,1,"button",36),r(),F(23,He,2,0,"sh-alert",37),r()}if(t&2){let e=u();a(5),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),a(2),d(e.exportForm.value.password?8:-1),a(2),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),a(6),d(e.showPassword()?17:18),a(5),d(e.showCopyPassword()?22:-1),a(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ve(t,o){if(t&1&&(s(0,"div",27)(1,"code"),x(2),r()()),t&2){let e=u();a(2),Z(e.exportedCmd())}}var f=new Ee,k=class t{#o=E(xe);#t=E(Ie);#e=E(ae);#n=E(le);#i=E(se);#r=E(we);isExporting=P(!1);exportType=P("file");exportedCmd=P(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,Ae()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=De(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=P(!1);copiedPassword=P(!1);showCopyPassword=P(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=M(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=M(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Q(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([N,C])=>C!=null).map(([N,C])=>`${encodeURIComponent(N)}=${encodeURIComponent(C)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=b.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new re(W({},b.HEADERS??{}))})}),$(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe($(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Y({type:t,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let C;C=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let R;R=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,R=G(R);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let I;I=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=G(I);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,i,T,O,U,R,K,J,H,z,V,q,I,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",C,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(s(0,"header")(1,"h3"),x(2," Export backup configuration "),s(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),s(7,"button",18),h("click",function(){return n.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),s(10,"p"),x(11),r()(),s(12,"form",19)(13,"sh-button-group",20),ne("valueChange",function(T){return te(n.exportType,T)||(n.exportType=T),T}),s(14,"button",21),c(15,2),_(16,"sh-icon"),p(),r(),s(17,"button",22),c(18,3),_(19,"sh-icon"),p(),r()(),s(20,"sh-toggle",23),c(21,4),_(22,"input",24),p(),r(),F(23,Me,3,0,"sh-toggle",25),F(24,ze,24,8,"div",26),F(25,Ve,3,1,"div",27),r()),e&2){let i;a(4),S("routerLink",ie(12,$e)),a(3),B("loading",n.isExporting()),S("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),a(4),ee("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),a(),S("formGroup",n.exportForm),a(),oe("value",n.exportType),a(10),d(n.exportType()==="file"?23:-1),a(),d(n.encryptionFieldSignal()?24:-1),a(),d(n.exportedCmd()?25:-1)}},dependencies:[Pe,ue,pe,ce,Fe,de,Ce,Te,_e,ge,fe,Se,Ne,Oe,me,he,Re],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
1
+ import{a as xe,c as Ae,d as v}from"./chunk-PNQ5BDQN.js";import{a as we}from"./chunk-AXLO5KWF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5W4BSVZJ.js";import{b as De}from"./chunk-2KD757N6.js";import"./chunk-AFHEXZUZ.js";import"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import{A as ge,B as Oe,H as Ne,L as he,W as fe,Y as Re,b as ce,c as pe,d as g,e as Fe,f as de,j as ue,p as Te,q as Ce,r as Ee,t as Pe,v as Se,w as me}from"./chunk-CJKZ27FM.js";import{a as b,d as Ie}from"./chunk-5E3B4AEF.js";import{b as ae,d as le,e as _e}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import{a as re,d as se}from"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as E,Bc as ie,Db as S,Eb as s,Fb as r,G as $,Gb as _,M as Q,Nb as y,Rc as A,Ta as a,Ub as c,Vb as p,Wb as m,Xb as L,Yb as X,Zb as G,_b as h,ac as u,ea as w,fa as D,hb as Y,lc as B,oc as x,pc as Z,qa as P,rc as ee,sa as M,tc as oe,uc as te,vc as ne,xb as F,yb as d}from"./chunk-K5XGRFWJ.js";import{a as W}from"./chunk-7CGTOI24.js";var $e=()=>["/"];function Me(t,o){t&1&&(s(0,"sh-toggle",25),c(1,5),_(2,"input",28),p(),r())}function ye(t,o){t&1&&(s(0,"span",31),m(1,9),r())}function Le(t,o){if(t&1&&(s(0,"span",31),m(1,10),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),X(1)}}function Xe(t,o){if(t&1&&_(0,"sh-progress-bar",38),t&2){let e=u(2);B("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),S("value",e.calculatePasswordStrength()*(100/5))}}function Ge(t,o){t&1&&(s(0,"span",31),m(1,11),r())}function Be(t,o){t&1&&(s(0,"span",31),m(1,12),r())}function be(t,o){if(t&1&&(s(0,"span",31),m(1,13),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),X(1)}}function ve(t,o){t&1&&(c(0,7,1),_(1,"sh-icon"),p())}function ke(t,o){t&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Ue(t,o){t&1&&(c(0,14,1),_(1,"sh-icon",40),p())}function Ke(t,o){t&1&&(c(0,14,2),_(1,"sh-icon"),p())}function Je(t,o){if(t&1){let e=y();s(0,"button",39),h("click",function(){w(e);let i=u(2);return D(i.copyPassword())}),c(1,14),F(2,Ue,2,0)(3,Ke,2,0),p(),r()}if(t&2){let e=u(2);a(2),d(e.copiedPassword()?2:3)}}function He(t,o){t&1&&(s(0,"sh-alert",37),m(1,15),r())}function ze(t,o){if(t&1){let e=y();s(0,"div",26)(1,"sh-form-field")(2,"label",29),c(3,6),_(4,"sup"),p(),r(),_(5,"input",30),F(6,ye,2,0,"span",31)(7,Le,2,1,"span",31),r(),F(8,Xe,1,9,"sh-progress-bar",32),s(9,"sh-form-field"),_(10,"input",33),F(11,Ge,2,0,"span",31)(12,Be,2,0,"span",31)(13,be,2,1,"span",31),r(),s(14,"div",34)(15,"button",35),h("click",function(){w(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,ve,2,0)(18,ke,2,0),p(),r(),s(19,"button",35),h("click",function(){w(e);let i=u();return D(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,Je,4,1,"button",36),r(),F(23,He,2,0,"sh-alert",37),r()}if(t&2){let e=u();a(5),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),a(2),d(e.exportForm.value.password?8:-1),a(2),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),a(6),d(e.showPassword()?17:18),a(5),d(e.showCopyPassword()?22:-1),a(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ve(t,o){if(t&1&&(s(0,"div",27)(1,"code"),x(2),r()()),t&2){let e=u();a(2),Z(e.exportedCmd())}}var f=new Ee,k=class t{#o=E(xe);#t=E(Ie);#e=E(ae);#n=E(le);#i=E(se);#r=E(we);isExporting=P(!1);exportType=P("file");exportedCmd=P(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,Ae()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=De(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=P(!1);copiedPassword=P(!1);showCopyPassword=P(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=M(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=M(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Q(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([N,C])=>C!=null).map(([N,C])=>`${encodeURIComponent(N)}=${encodeURIComponent(C)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=b.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new re(W({},b.HEADERS??{}))})}),$(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe($(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Y({type:t,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let C;C=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let R;R=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,R=G(R);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let I;I=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=G(I);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,i,T,O,U,R,K,J,H,z,V,q,I,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",C,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(s(0,"header")(1,"h3"),x(2," Export backup configuration "),s(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),s(7,"button",18),h("click",function(){return n.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),s(10,"p"),x(11),r()(),s(12,"form",19)(13,"sh-button-group",20),ne("valueChange",function(T){return te(n.exportType,T)||(n.exportType=T),T}),s(14,"button",21),c(15,2),_(16,"sh-icon"),p(),r(),s(17,"button",22),c(18,3),_(19,"sh-icon"),p(),r()(),s(20,"sh-toggle",23),c(21,4),_(22,"input",24),p(),r(),F(23,Me,3,0,"sh-toggle",25),F(24,ze,24,8,"div",26),F(25,Ve,3,1,"div",27),r()),e&2){let i;a(4),S("routerLink",ie(12,$e)),a(3),B("loading",n.isExporting()),S("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),a(4),ee("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),a(),S("formGroup",n.exportForm),a(),oe("value",n.exportType),a(10),d(n.exportType()==="file"?23:-1),a(),d(n.encryptionFieldSignal()?24:-1),a(),d(n.exportedCmd()?25:-1)}},dependencies:[Pe,ue,pe,ce,Fe,de,Ce,Te,_e,ge,fe,Se,Ne,Oe,me,he,Re],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
@@ -1 +1 @@
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};
1
+ import{b as w}from"./chunk-2KD757N6.js";import{b as x}from"./chunk-AFHEXZUZ.js";import{a as $}from"./chunk-JYRKUYG6.js";import"./chunk-VNXFTYQQ.js";import{B as y,L as k,v as b}from"./chunk-CJKZ27FM.js";import{d as U}from"./chunk-5E3B4AEF.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as p,Db as L,Eb as a,Fb as r,G as m,Gb as d,Nb as E,Qa as O,Rc as I,Ta as l,Ub as M,Vb as R,Wb as T,Xb as f,Yb as F,_b as N,ac as c,ea as g,fa as C,hb as P,lc as v,oc as u,pc as D,q as G,qa as S,xb as s,yb as _}from"./chunk-K5XGRFWJ.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};