@duplicati/ngclient 0.0.157 → 0.0.158

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 (44) hide show
  1. package/assets/dest-icons/s3compat.png +0 -0
  2. package/assets/sh.woff2 +0 -0
  3. package/{chunk-UXOJBG6Z.js → chunk-2IE65QDC.js} +1 -1
  4. package/{chunk-FPVRHFKW.js → chunk-363K6H7I.js} +1 -1
  5. package/{chunk-2GCNISUZ.js → chunk-3AGOCPNZ.js} +1 -1
  6. package/chunk-6XXAHUOH.js +1 -0
  7. package/{chunk-YZNZ5RQI.js → chunk-BGKZFATT.js} +1 -1
  8. package/{chunk-VOLZIA33.js → chunk-BTJVI7MG.js} +1 -1
  9. package/chunk-CFN5U5PK.js +1 -0
  10. package/{chunk-F7PHZYZX.js → chunk-CUL5FHDH.js} +1 -1
  11. package/chunk-FMEVVC6D.js +7 -0
  12. package/chunk-HWCUMKYF.js +1 -0
  13. package/{chunk-OX4HQVUD.js → chunk-J2Y5AVUU.js} +1 -1
  14. package/chunk-JH4DRDIH.js +1 -0
  15. package/{chunk-DILTD4XG.js → chunk-JRDR23NB.js} +1 -1
  16. package/chunk-KSEFQ2XA.js +1 -0
  17. package/chunk-L3RU4D2N.js +1 -0
  18. package/{chunk-IB6ESS57.js → chunk-LANFQDZE.js} +1 -1
  19. package/{chunk-DBQGZZI2.js → chunk-M6SIMFCD.js} +1 -1
  20. package/chunk-MSX2SJC7.js +1 -0
  21. package/{chunk-BSMAYTZR.js → chunk-NC73IOHK.js} +1 -1
  22. package/chunk-O4WI3VDE.js +1 -0
  23. package/{chunk-YC5FPDJH.js → chunk-RADP6NAN.js} +1 -1
  24. package/{chunk-GYDGMSUA.js → chunk-U4U2GCS5.js} +1 -1
  25. package/chunk-X3XJ26NZ.js +2 -0
  26. package/{chunk-UDF726AD.js → chunk-XH5CTH3O.js} +1 -1
  27. package/{chunk-ZGC3K2EK.js → chunk-XHITDSWR.js} +1 -1
  28. package/{chunk-USX4C3JC.js → chunk-Y75ZS4Q2.js} +1 -1
  29. package/{chunk-LTQOZB7Q.js → chunk-YHOYPGPD.js} +1 -1
  30. package/{chunk-Q3BXXS7G.js → chunk-ZKX6JJ6S.js} +1 -1
  31. package/{chunk-CAJEHCFP.js → chunk-ZWO4SECL.js} +1 -1
  32. package/index.html +1 -1
  33. package/{main-UHBWCAT4.js → main-ATSCYMRN.js} +1 -1
  34. package/package.json +1 -1
  35. package/chunk-2AVDJBM7.js +0 -1
  36. package/chunk-3N6V4QBS.js +0 -1
  37. package/chunk-4NLJRM5D.js +0 -1
  38. package/chunk-6NY5MUS6.js +0 -1
  39. package/chunk-E7Y6L3W6.js +0 -1
  40. package/chunk-NRUGLQRY.js +0 -1
  41. package/chunk-P4SN4J3W.js +0 -1
  42. package/chunk-SJ3V6DON.js +0 -2
  43. package/chunk-TWMGET5I.js +0 -7
  44. package/chunk-VVVEOA35.js +0 -1
@@ -1,2 +1,2 @@
1
- import{a as Ce}from"./chunk-ZBVBVQO7.js";import{d as ce}from"./chunk-SJ3V6DON.js";import{a as de,d as me}from"./chunk-VUKS2SJL.js";import{a as pe}from"./chunk-MTQKK2WN.js";import{B as ie,G as oe,J as re,O as ae,U as le,V as _e,X as se,b as Q,c as W,e as Y,i as Z,k as ee,s as te,u as ne}from"./chunk-QF4DQYEP.js";import{ea as q}from"./chunk-5ZSBXGHQ.js";import{$b as l,Ab as E,Bb as P,Bc as H,Cb as c,Db as a,Eb as _,Fb as w,Jb as v,Jc as D,Kb as I,Lb as S,Mb as g,Qc as R,Sa as s,Tb as b,Ub as $,Vb as U,Wc as k,Zb as u,Zc as j,_ as K,cb as J,ea as m,fa as C,hb as f,ic as T,kc as G,nc as d,oc as B,pa as N,pc as A,vc as X,wc as z,xb as h,xc as x,yb as O,zb as M}from"./chunk-QONLYWYC.js";import{a as y,b as V}from"./chunk-EUDKD2JW.js";var fe=()=>({updateOn:"blur"});function Te(t,i){if(t&1){let e=g();a(0,"button",13),u("click",function(){m(e);let n=l();return C(n.showTextArea.set(!1))}),b(1,5),w(2,"sh-icon"),$(),_()}}function xe(t,i){if(t&1){let e=g();a(0,"button",17,0),u("click",function(){let n=m(e).$implicit,r=l(3);return C(r.addSetting(n))}),d(2),_()}if(t&2){let e=i.$implicit;G("deprecated",e.deprecatedDescription),s(2),A(" ",e.name," ")}}function Se(t,i){if(t&1&&(a(0,"h3",9),d(1),_(),E(2,xe,3,3,"button",16,M)),t&2){let e=i.$implicit;s(),B(e.displayName),s(),P(e.options)}}function he(t,i){if(t&1){let e=g();a(0,"sh-menu")(1,"button",18)(2,"sh-icon"),d(3,"dots-three-vertical"),_()(),v(4,15),a(5,"button",13),u("click",function(){m(e);let n=l(2);return C(n.addFreeTextSetting())}),b(6,7),w(7,"sh-icon"),$(),_(),a(8,"button",19),u("click",function(){m(e);let n=l(2);return C(n.showTextArea.set(!0))}),a(9,"sh-icon"),d(10,"link"),_(),d(11," Edit contents as text "),_(),I(),_()}}function Oe(t,i){if(t&1&&(a(0,"sh-menu",14)(1,"button",11),b(2,6),w(3,"sh-icon"),$(),_(),v(4,15),E(5,Se,4,1,null,null,M),I(),_(),h(7,he,12,0,"sh-menu")),t&2){let e=l();c("searchable",!0),s(5),P(e.nonSelectedOptionsGrouped()),s(2),O(e.hasFreeTextSettings()?7:-1)}}function Fe(t,i){if(t&1){let e=g();a(0,"textarea",20),u("ngModelChange",function(n){m(e);let r=l();return C(r.updateSettingsFromText(n))}),_()}if(t&2){let e=l();c("ngModel",e.settingsAsText())("ngModelOptions",H(2,fe))}}function we(t,i){t&1&&(a(0,"div",21),d(1,"Add a setting above to get started."),_())}function Ie(t,i){t&1&&(a(0,"sh-icon",29),d(1," warning-octagon "),_())}function Le(t,i){if(t&1&&(a(0,"sh-icon",30),d(1,"archive"),_()),t&2){let e=l(2).$implicit;c("shTooltip",e.FormView.deprecatedDescription)}}function ye(t,i){if(t&1&&(a(0,"sh-icon",31),d(1,"question"),_()),t&2){let e=l(2).$implicit;c("shTooltip",e.FormView.longDescription)}}function Ve(t,i){if(t&1&&(h(0,Ie,2,0,"sh-icon",29),a(1,"span"),d(2),_(),h(3,Le,2,1,"sh-icon",30)(4,ye,2,1,"sh-icon",31)),t&2){let e=l().$implicit,o=x(1);O(o?0:-1),s(),G("deprecated",e.FormView.deprecatedDescription),s(),B(e.FormView.shortDescription),s(),O(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Ne(t,i){t&1&&S(0)}function Me(t,i){if(t&1){let e=g();a(0,"div",23)(1,"label"),f(2,Ne,1,0,"ng-container",32),_(),a(3,"div")(4,"sh-form-field")(5,"input",33),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateFreeTextSettingName(r,n))}),_(),a(6,"sh-icon",34),d(7,"rectangle-dashed"),_()()(),a(8,"div")(9,"sh-form-field")(10,"input",33),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_(),a(11,"sh-icon",34),d(12,"textbox"),_()()()()}if(t&2){let e=l().$implicit,o=T(3);s(2),c("ngTemplateOutlet",o),s(3),c("ngModel",e.Name),s(5),c("ngModel",e.Value())}}function Ee(t,i){t&1&&S(0)}function Pe(t,i){if(t&1){let e=g();a(0,"app-file-tree",24)(1,"label",35),f(2,Ee,1,0,"ng-container",32),_(),a(3,"input",36),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);c("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function ve(t,i){if(t&1){let e=g();a(0,"app-file-tree",25),w(1,"label",35),a(2,"input",36),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()()}if(t&2){let e=l().$implicit,o=x(0);c("startingPath",e.Value()),s(),c("for",o),s(),c("id",o)("ngModel",e.Value())}}function be(t,i){t&1&&S(0)}function $e(t,i){t&1&&(a(0,"sh-icon",34),d(1,"link"),_())}function Ae(t,i){t&1&&(a(0,"sh-icon",34),d(1,"textbox"),_())}function De(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",35),f(2,be,1,0,"ng-container",32),_(),a(3,"input",36),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_(),h(4,$e,2,0,"sh-icon",34)(5,Ae,2,0,"sh-icon",34),_()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value()),s(),O(e.FormView.type==="Path"?4:5)}}function Re(t,i){t&1&&S(0)}function ke(t,i){if(t&1){let e=g();a(0,"sh-icon",39),u("click",function(){m(e);let n=l(2).$implicit;return C(n.showPassword=!n.showPassword)}),d(1," eye "),_()}}function Ge(t,i){if(t&1){let e=g();a(0,"sh-icon",39),u("click",function(){m(e);let n=l(2).$implicit;return C(n.showPassword=!n.showPassword)}),d(1," eye-slash "),_()}}function Be(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",35),f(2,Re,1,0,"ng-container",32),_(),a(3,"input",37),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_(),a(4,"sh-icon",34),d(5,"password"),_(),h(6,ke,2,0,"sh-icon",38)(7,Ge,2,0,"sh-icon",38),_()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),s(3),O(e.showPassword?6:7)}}function ze(t,i){t&1&&S(0)}function Ke(t,i){if(t&1&&d(0),t&2){let e=i.$implicit;A(" ",e," ")}}function Je(t,i){if(t&1){let e=g();a(0,"sh-select",40)(1,"label",35),f(2,ze,1,0,"ng-container",32),_(),a(3,"input",36),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()(),f(4,Ke,1,1,"ng-template",null,2,D)}if(t&2){let e=T(5),o=l().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("id",r)("ngModel",o.Value())}}function Ue(t,i){t&1&&S(0)}function Xe(t,i){if(t&1){let e=g();a(0,"app-size",41),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),a(1,"label",35),f(2,Ue,1,0,"ng-container",32),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function He(t,i){t&1&&S(0)}function je(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",35),f(2,He,1,0,"ng-container",32),_(),a(3,"input",42),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_(),a(4,"sh-icon",34),d(5,"numpad"),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function qe(t,i){t&1&&S(0)}function Qe(t,i){if(t&1){let e=g();a(0,"sh-toggle",27)(1,"label",35),f(2,qe,1,0,"ng-container",32),_(),a(3,"input",43),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function We(t,i){t&1&&S(0)}function Ye(t,i){if(t&1&&d(0),t&2){let e=i.$implicit;A(" ",e," ")}}function Ze(t,i){if(t&1){let e=g();a(0,"sh-select",44)(1,"label",35),f(2,We,1,0,"ng-container",32),_(),a(3,"input",45),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()(),f(4,Ye,1,1,"ng-template",null,3,D)}if(t&2){let e=T(5),o=l().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("ngModel",o.Value())}}function et(t,i){t&1&&S(0)}function tt(t,i){if(t&1){let e=g();a(0,"app-timespan",41),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),a(1,"label",35),f(2,et,1,0,"ng-container",32),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function nt(t,i){if(t&1){let e=g();X(0)(1),f(2,Ve,5,5,"ng-template",null,1,D),a(4,"div",22),h(5,Me,13,3,"div",23)(6,Pe,4,9,"app-file-tree",24)(7,ve,3,4,"app-file-tree",25)(8,De,6,5,"sh-form-field")(9,Be,8,6,"sh-form-field")(10,Je,6,7)(11,Xe,3,5,"app-size",26)(12,je,6,4,"sh-form-field")(13,Qe,4,4,"sh-toggle",27)(14,Ze,6,6)(15,tt,3,5,"app-timespan",26),a(16,"button",28),u("click",function(){let n=m(e).$implicit,r=l(2);return C(r.removeSetting(n))}),a(17,"sh-icon"),d(18,"x-bold"),_()()()}if(t&2){let e=i.$implicit,o=i.$index,n=l(2);z("destination-"+e.Name+o),s(),z(n.inAppOptions(e.Name)),s(4),O(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function it(t,i){if(t&1&&(h(0,we,2,0,"div",21),E(1,nt,19,3,null,null,M)),t&2){let e=l();O(e.selectedSettings().length===0?0:-1),s(),P(e.selectedSettings())}}var ue=class t{#e=K(pe);options=j.required();hiddenOptions=k([]);hasFreeTextSettings=k(!1);applicationOptions=k();showTextArea=N(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=R(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(F=>F.name===n.Name?.replace("--","")),p=n.Value??"";if(r&&i.includes(r.name))return null;if(r){if(r.type==="Boolean"&&(p=this.isTrue(p)),r.type==="Integer"&&(p=parseInt(p)||0),r.type==="Enumeration"&&r.options){let F=p?.trim().toLowerCase(),L=r.options.find(ge=>(ge??"").trim().toLocaleLowerCase()===F);L&&(p=L)}return V(y({},n),{Value:N(p),FormView:r})}else if(this.hasFreeTextSettings())return V(y({},n),{Value:N(p),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=R(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>V(y({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=R(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
1
+ import{a as Ce}from"./chunk-ZBVBVQO7.js";import{d as ce}from"./chunk-X3XJ26NZ.js";import{a as de,d as me}from"./chunk-VUKS2SJL.js";import{a as pe}from"./chunk-MTQKK2WN.js";import{B as ie,G as oe,J as re,O as ae,U as le,V as _e,X as se,b as Q,c as W,e as Y,i as Z,k as ee,s as te,u as ne}from"./chunk-QF4DQYEP.js";import{ea as q}from"./chunk-5ZSBXGHQ.js";import{$b as l,Ab as E,Bb as P,Bc as H,Cb as c,Db as a,Eb as _,Fb as w,Jb as v,Jc as D,Kb as I,Lb as S,Mb as g,Qc as R,Sa as s,Tb as b,Ub as $,Vb as U,Wc as k,Zb as u,Zc as j,_ as K,cb as J,ea as m,fa as C,hb as f,ic as T,kc as G,nc as d,oc as B,pa as N,pc as A,vc as X,wc as z,xb as h,xc as x,yb as O,zb as M}from"./chunk-QONLYWYC.js";import{a as y,b as V}from"./chunk-EUDKD2JW.js";var fe=()=>({updateOn:"blur"});function Te(t,i){if(t&1){let e=g();a(0,"button",13),u("click",function(){m(e);let n=l();return C(n.showTextArea.set(!1))}),b(1,5),w(2,"sh-icon"),$(),_()}}function xe(t,i){if(t&1){let e=g();a(0,"button",17,0),u("click",function(){let n=m(e).$implicit,r=l(3);return C(r.addSetting(n))}),d(2),_()}if(t&2){let e=i.$implicit;G("deprecated",e.deprecatedDescription),s(2),A(" ",e.name," ")}}function Se(t,i){if(t&1&&(a(0,"h3",9),d(1),_(),E(2,xe,3,3,"button",16,M)),t&2){let e=i.$implicit;s(),B(e.displayName),s(),P(e.options)}}function he(t,i){if(t&1){let e=g();a(0,"sh-menu")(1,"button",18)(2,"sh-icon"),d(3,"dots-three-vertical"),_()(),v(4,15),a(5,"button",13),u("click",function(){m(e);let n=l(2);return C(n.addFreeTextSetting())}),b(6,7),w(7,"sh-icon"),$(),_(),a(8,"button",19),u("click",function(){m(e);let n=l(2);return C(n.showTextArea.set(!0))}),a(9,"sh-icon"),d(10,"link"),_(),d(11," Edit contents as text "),_(),I(),_()}}function Oe(t,i){if(t&1&&(a(0,"sh-menu",14)(1,"button",11),b(2,6),w(3,"sh-icon"),$(),_(),v(4,15),E(5,Se,4,1,null,null,M),I(),_(),h(7,he,12,0,"sh-menu")),t&2){let e=l();c("searchable",!0),s(5),P(e.nonSelectedOptionsGrouped()),s(2),O(e.hasFreeTextSettings()?7:-1)}}function Fe(t,i){if(t&1){let e=g();a(0,"textarea",20),u("ngModelChange",function(n){m(e);let r=l();return C(r.updateSettingsFromText(n))}),_()}if(t&2){let e=l();c("ngModel",e.settingsAsText())("ngModelOptions",H(2,fe))}}function we(t,i){t&1&&(a(0,"div",21),d(1,"Add a setting above to get started."),_())}function Ie(t,i){t&1&&(a(0,"sh-icon",29),d(1," warning-octagon "),_())}function Le(t,i){if(t&1&&(a(0,"sh-icon",30),d(1,"archive"),_()),t&2){let e=l(2).$implicit;c("shTooltip",e.FormView.deprecatedDescription)}}function ye(t,i){if(t&1&&(a(0,"sh-icon",31),d(1,"question"),_()),t&2){let e=l(2).$implicit;c("shTooltip",e.FormView.longDescription)}}function Ve(t,i){if(t&1&&(h(0,Ie,2,0,"sh-icon",29),a(1,"span"),d(2),_(),h(3,Le,2,1,"sh-icon",30)(4,ye,2,1,"sh-icon",31)),t&2){let e=l().$implicit,o=x(1);O(o?0:-1),s(),G("deprecated",e.FormView.deprecatedDescription),s(),B(e.FormView.shortDescription),s(),O(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Ne(t,i){t&1&&S(0)}function Me(t,i){if(t&1){let e=g();a(0,"div",23)(1,"label"),f(2,Ne,1,0,"ng-container",32),_(),a(3,"div")(4,"sh-form-field")(5,"input",33),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateFreeTextSettingName(r,n))}),_(),a(6,"sh-icon",34),d(7,"rectangle-dashed"),_()()(),a(8,"div")(9,"sh-form-field")(10,"input",33),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_(),a(11,"sh-icon",34),d(12,"textbox"),_()()()()}if(t&2){let e=l().$implicit,o=T(3);s(2),c("ngTemplateOutlet",o),s(3),c("ngModel",e.Name),s(5),c("ngModel",e.Value())}}function Ee(t,i){t&1&&S(0)}function Pe(t,i){if(t&1){let e=g();a(0,"app-file-tree",24)(1,"label",35),f(2,Ee,1,0,"ng-container",32),_(),a(3,"input",36),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);c("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function ve(t,i){if(t&1){let e=g();a(0,"app-file-tree",25),w(1,"label",35),a(2,"input",36),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()()}if(t&2){let e=l().$implicit,o=x(0);c("startingPath",e.Value()),s(),c("for",o),s(),c("id",o)("ngModel",e.Value())}}function be(t,i){t&1&&S(0)}function $e(t,i){t&1&&(a(0,"sh-icon",34),d(1,"link"),_())}function Ae(t,i){t&1&&(a(0,"sh-icon",34),d(1,"textbox"),_())}function De(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",35),f(2,be,1,0,"ng-container",32),_(),a(3,"input",36),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_(),h(4,$e,2,0,"sh-icon",34)(5,Ae,2,0,"sh-icon",34),_()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value()),s(),O(e.FormView.type==="Path"?4:5)}}function Re(t,i){t&1&&S(0)}function ke(t,i){if(t&1){let e=g();a(0,"sh-icon",39),u("click",function(){m(e);let n=l(2).$implicit;return C(n.showPassword=!n.showPassword)}),d(1," eye "),_()}}function Ge(t,i){if(t&1){let e=g();a(0,"sh-icon",39),u("click",function(){m(e);let n=l(2).$implicit;return C(n.showPassword=!n.showPassword)}),d(1," eye-slash "),_()}}function Be(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",35),f(2,Re,1,0,"ng-container",32),_(),a(3,"input",37),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_(),a(4,"sh-icon",34),d(5,"password"),_(),h(6,ke,2,0,"sh-icon",38)(7,Ge,2,0,"sh-icon",38),_()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),s(3),O(e.showPassword?6:7)}}function ze(t,i){t&1&&S(0)}function Ke(t,i){if(t&1&&d(0),t&2){let e=i.$implicit;A(" ",e," ")}}function Je(t,i){if(t&1){let e=g();a(0,"sh-select",40)(1,"label",35),f(2,ze,1,0,"ng-container",32),_(),a(3,"input",36),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()(),f(4,Ke,1,1,"ng-template",null,2,D)}if(t&2){let e=T(5),o=l().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("id",r)("ngModel",o.Value())}}function Ue(t,i){t&1&&S(0)}function Xe(t,i){if(t&1){let e=g();a(0,"app-size",41),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),a(1,"label",35),f(2,Ue,1,0,"ng-container",32),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function He(t,i){t&1&&S(0)}function je(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",35),f(2,He,1,0,"ng-container",32),_(),a(3,"input",42),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_(),a(4,"sh-icon",34),d(5,"numpad"),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function qe(t,i){t&1&&S(0)}function Qe(t,i){if(t&1){let e=g();a(0,"sh-toggle",27)(1,"label",35),f(2,qe,1,0,"ng-container",32),_(),a(3,"input",43),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function We(t,i){t&1&&S(0)}function Ye(t,i){if(t&1&&d(0),t&2){let e=i.$implicit;A(" ",e," ")}}function Ze(t,i){if(t&1){let e=g();a(0,"sh-select",44)(1,"label",35),f(2,We,1,0,"ng-container",32),_(),a(3,"input",45),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),_()(),f(4,Ye,1,1,"ng-template",null,3,D)}if(t&2){let e=T(5),o=l().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("ngModel",o.Value())}}function et(t,i){t&1&&S(0)}function tt(t,i){if(t&1){let e=g();a(0,"app-timespan",41),u("ngModelChange",function(n){m(e);let r=l().$implicit,p=l(2);return C(p.updateSettingValue(r,n))}),a(1,"label",35),f(2,et,1,0,"ng-container",32),_()()}if(t&2){let e=l().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function nt(t,i){if(t&1){let e=g();X(0)(1),f(2,Ve,5,5,"ng-template",null,1,D),a(4,"div",22),h(5,Me,13,3,"div",23)(6,Pe,4,9,"app-file-tree",24)(7,ve,3,4,"app-file-tree",25)(8,De,6,5,"sh-form-field")(9,Be,8,6,"sh-form-field")(10,Je,6,7)(11,Xe,3,5,"app-size",26)(12,je,6,4,"sh-form-field")(13,Qe,4,4,"sh-toggle",27)(14,Ze,6,6)(15,tt,3,5,"app-timespan",26),a(16,"button",28),u("click",function(){let n=m(e).$implicit,r=l(2);return C(r.removeSetting(n))}),a(17,"sh-icon"),d(18,"x-bold"),_()()()}if(t&2){let e=i.$implicit,o=i.$index,n=l(2);z("destination-"+e.Name+o),s(),z(n.inAppOptions(e.Name)),s(4),O(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function it(t,i){if(t&1&&(h(0,we,2,0,"div",21),E(1,nt,19,3,null,null,M)),t&2){let e=l();O(e.selectedSettings().length===0?0:-1),s(),P(e.selectedSettings())}}var ue=class t{#e=K(pe);options=j.required();hiddenOptions=k([]);hasFreeTextSettings=k(!1);applicationOptions=k();showTextArea=N(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=R(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(F=>F.name===n.Name?.replace("--","")),p=n.Value??"";if(r&&i.includes(r.name))return null;if(r){if(r.type==="Boolean"&&(p=this.isTrue(p)),r.type==="Integer"&&(p=parseInt(p)||0),r.type==="Enumeration"&&r.options){let F=p?.trim().toLowerCase(),L=r.options.find(ge=>(ge??"").trim().toLocaleLowerCase()===F);L&&(p=L)}return V(y({},n),{Value:N(p),FormView:r})}else if(this.hasFreeTextSettings())return V(y({},n),{Value:N(p),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=R(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>V(y({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=R(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
2
  `));updateSettingsFromText(i){if(typeof i!="string")return;let e=ce(i);this.options.update(()=>e)}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}])}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]})}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],r=n.findIndex(p=>p.Name===i.Name);if(i.FormView.type==="Boolean")return n[r].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[r].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let p=e?.trim().toLowerCase()??"",F=i.FormView.options.find(L=>(L??"").trim().toLocaleLowerCase()===p);if(F)return n[r].Value=F,n}return n[r].Value=e,n})}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],r=n.findIndex(p=>p.Name===i.Name);return n[r].Name=e,n})}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:9,vars:3,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let r;return r=$localize`By adding this option it will override the matching global option`,[["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,[3,"disallowToggle"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","remove-btn",3,"click"],["shTooltip",r,1,"error"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,o){e&1&&(a(0,"sh-toggle-card",8),v(1,9)(2),U(3,4),I(),a(4,"div",10),h(5,Te,3,0,"button",11)(6,Oe,8,2),_(),I(),h(7,Fe,1,3,"textarea",12)(8,it,3,1),_()),e&2&&(c("disallowToggle",!0),s(5),O(o.showTextArea()?5:6),s(2),O(o.showTextArea()?7:8))},dependencies:[te,W,ee,Q,Y,Z,de,me,Ce,q,le,oe,ie,re,se,ne,ae,_e],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem;position:relative;z-index:1}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{ue as a};
@@ -0,0 +1 @@
1
+ import{a as ut,c as ct,d as dt}from"./chunk-VUKS2SJL.js";import{a as ye}from"./chunk-3NFAL4U4.js";import{a as rt,b as Ve,c as _t}from"./chunk-4VY6SMSL.js";import{b as re}from"./chunk-Z27IQRKV.js";import{a as lt}from"./chunk-72HORZFV.js";import{a as Oe}from"./chunk-MTQKK2WN.js";import{b as ie,d as H}from"./chunk-ABYM5HWA.js";import{B as se,G as Y,K as ot,O as le,V as Me,X as at,b as Te,c as z,d as he,e as j,f as Ne,h as Qe,i as oe,j as fe,k as Ze,n as et,o as Pe,p as tt,q as Ae,r as De,s as ae,t as Re,u as q,w as nt,z as it}from"./chunk-QF4DQYEP.js";import{h as st}from"./chunk-PD73DDOS.js";import{$b as u,Ab as $e,Bb as xe,Bc as Se,Cb as T,Db as s,Eb as l,Fb as g,H as we,Jb as B,Kb as k,Mb as x,Qc as G,Rc as ne,Sa as _,Tb as E,Ub as m,V as Ce,Vb as N,Vc as Be,Wc as ke,Xc as Fe,Yb as Ue,Zb as F,_ as O,cb as J,ea as c,fa as d,gc as ge,hb as je,hc as Ee,ic as be,kc as me,nc as U,oc as ve,pa as C,pc as Ye,sc as y,tc as L,ub as qe,uc as I,xb as A,yb as D,zb as Ge}from"./chunk-QONLYWYC.js";import{a as b,b as X}from"./chunk-EUDKD2JW.js";var Le=class a{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||a)};static \u0275prov=Ce({token:a,factory:a.\u0275fac,providedIn:"root"})};function Et(a,t){if(a&1){let e=x();s(0,"div",24)(1,"sh-form-field")(2,"label",25),N(3,7),l(),s(4,"input",26,0),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),d(i)}),F("focus",function(){c(e);let i=be(5);return d(i.showPicker())}),l(),s(6,"sh-icon",27),U(7,"clock"),l()(),s(8,"sh-form-field"),g(9,"label",28),s(10,"input",29,1),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),d(i)}),F("focus",function(){c(e);let i=be(11);return d(i.showPicker())}),l(),s(12,"sh-icon",27),U(13,"calendar"),l()()(),s(14,"div",24)(15,"sh-form-field")(16,"label",30),N(17,8),l(),s(18,"input",31),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),d(i)}),l()(),s(19,"sh-select",32)(20,"input",33),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),d(i)}),l()()(),s(21,"app-toggle-card",34),B(22,35),N(23,9),k(),s(24,"div",36)(25,"sh-toggle",19),E(26,10),s(27,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),d(i)}),l(),m(),l(),s(28,"sh-toggle",19),E(29,11),s(30,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),d(i)}),l(),m(),l(),s(31,"sh-toggle",19),E(32,12),s(33,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),d(i)}),l(),m(),l(),s(34,"sh-toggle",19),E(35,13),s(36,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),d(i)}),l(),m(),l(),s(37,"sh-toggle",19),E(38,14),s(39,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),d(i)}),l(),m(),l(),s(40,"sh-toggle",19),E(41,15),s(42,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),d(i)}),l(),m(),l(),s(43,"sh-toggle",19),E(44,16),s(45,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),d(i)}),l(),m(),l()()()}if(a&2){let e=u();_(4),y("ngModel",e.scheduleFields.nextTime().time),_(6),y("ngModel",e.scheduleFields.nextTime().date),_(8),y("ngModel",e.scheduleFields.runAgain().repeatValue),_(),T("options",e.unitOptions)("isClearable",!1),_(),y("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),T("disallowToggle",!0),_(6),y("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class a{#e=O(Q);#t=O(H);#i=O(ie);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let r;r=$localize`Next time`;let p;p=$localize`Run again every`;let h;h=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,p,h,S,w,P,$,K,v,W,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),N(1,2),l(),s(2,"div",18)(3,"sh-toggle",19),E(4,3),s(5,"input",20),I("ngModelChange",function(o){return L(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),m(),l(),s(6,"p"),N(7,4),l()(),A(8,Et,46,14),s(9,"div",21)(10,"button",22),F("click",function(){return n.goBack()}),E(11,5),g(12,"sh-icon"),m(),l(),s(13,"button",23),F("click",function(){return n.next()}),E(14,6),g(15,"sh-icon"),m(),l()()),e&2&&(_(5),y("ngModel",n.scheduleFields.autoRun),_(3),D(n.scheduleFields.autoRun()?8:-1))},dependencies:[ae,z,Ze,Te,j,oe,Y,Me,q,se,le,ye],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function St(a,t){if(a&1){let e=x();s(0,"sh-select",2)(1,"input",6),I("ngModelChange",function(i){c(e);let o=u();return L(o.internalPath,i)||(o.internalPath=i),d(i)}),F("ngModelChange",function(){c(e);let i=u();return d(i.updateFilter())}),l()()}if(a&2){let e=u();T("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),y("ngModel",e.internalPath)}}function Ft(a,t){if(a&1&&(B(0,7),U(1),k()),a&2){let e,n=u(2);_(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Tt(a,t){if(a&1&&(B(0,8),U(1),k()),a&2){let e,n=u(2);_(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function ht(a,t){if(a&1){let e=x();s(0,"sh-form-field",3)(1,"input",6),I("ngModelChange",function(i){c(e);let o=u();return L(o.internalPath,i)||(o.internalPath=i),d(i)}),F("ngModelChange",function(){c(e);let i=u();return d(i.updateFilter())}),l(),A(2,Ft,2,1,"ng-container",7),A(3,Tt,2,1,"ng-container",8),l()}if(a&2){let e,n,i=u();_(),y("ngModel",i.internalPath),_(),D(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),_(),D(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Nt=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],ft=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ie=class a{path=ke.required();osType=ke();pathChange=Be();remove=Be();internalPath=C("");pathType=C("-Expression");currentExpressionOption=G(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=C(Nt);expressionOptions=G(()=>{let e=this.osType()==="Windows"?"\\":"/";return ft.map(n=>n.value==="-Folder"||n.value==="+Folder"?X(b({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?X(b({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?X(b({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?X(b({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?X(b({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?X(b({},n),{startsWith:"*.",endsWith:""}):X(b({},n),{startsWith:"",endsWith:""}))});pathEffect=ne(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(s(0,"sh-select",0)(1,"input",1),I("ngModelChange",function(o){return L(n.pathType,o)||(n.pathType=o),o}),F("ngModelChange",function(){return n.updateFilter()}),l()(),A(2,St,2,4,"sh-select",2)(3,ht,4,3,"sh-form-field",3),s(4,"div",4),F("click",function(){return n.removeFilter()}),s(5,"sh-icon",5),U(6,"x-circle"),l()()),e&2){let i;T("options",n.expressionOptions())("isClearable",!1),_(),y("ngModel",n.pathType),_(),D(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[ae,z,j,oe,le,Y,q],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Pt=["formRef"],He=()=>({standalone:!0});function At(a,t){if(a&1){let e=x();s(0,"sh-form-field",41)(1,"input",42),I("ngModelChange",function(i){c(e);let o=u(2);return L(o.editingPath,i)||(o.editingPath=i),d(i)}),l()(),s(2,"button",43),F("click",function(){c(e);let i=u(2);return d(i.updatePath())}),s(3,"sh-icon"),U(4,"floppy-disk"),l()(),s(5,"button",43),F("click",function(){c(e);let i=u(2);return d(i.cancelEditPath())}),s(6,"sh-icon"),U(7,"x-bold"),l()()}if(a&2){let e=u(2);_(),y("ngModel",e.editingPath),T("ngModelOptions",Se(2,He))}}function Dt(a,t){if(a&1){let e=x();s(0,"sh-form-field",41),g(1,"input",44),l(),s(2,"button",43),F("click",function(){c(e);let i=u().$implicit,o=u();return d(o.editPath(i))}),s(3,"sh-icon"),U(4,"pen"),l()(),s(5,"button",43),F("click",function(){c(e);let i=u().$implicit,o=u();return d(o.removePath(i))}),s(6,"sh-icon"),U(7,"trash-simple"),l()()}if(a&2){let e=u().$implicit;qe("readonly",!0),_(),T("ngModel",e)("ngModelOptions",Se(3,He))}}function Rt(a,t){if(a&1&&(s(0,"div",30),A(1,At,8,3)(2,Dt,8,4),l()),a&2){let e=t.$implicit,n=u();_(),D(n.oldPath()===e?1:2)}}function Mt(a,t){if(a&1){let e=x();s(0,"app-new-filter",46),F("pathChange",function(i){let o=c(e).$index,r=u(2);return d(r.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return d(o.removePathAt(i))}),l()}if(a&2){let e=t.$implicit,n=u(2);T("path",e)("osType",n.osType()??"")}}function Ot(a,t){if(a&1&&$e(0,Mt,1,2,"app-new-filter",45,Ge),a&2){let e=u();xe(e.pathArray())}}function yt(a,t){if(a&1){let e=x();s(0,"div",31)(1,"app-size",47),F("ngModelChange",function(i){c(e);let o=u();return d(o.updateFilesLargerThan(i))}),l()()}if(a&2){let e=u();_(),T("ngModel",e.filesLargerThan())("ngModelOptions",Se(2,He))}}var V=new De,pt=(a={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(a.path),excludes:V.group({hidden:V.control(a.excludes.hidden),system:V.control(a.excludes.system),temporary:V.control(a.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),Je=class a{#e=O(Q);#t=O(H);#i=O(ie);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Qe("");filesLargerThan=G(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=G(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=C(null);editingPath=C(null);addingNewPath=C(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=ct(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let o=n.filter(r=>r&&r!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let n=[this.sourceDataForm.controls.path.value,t].filter(i=>i&&i!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),o=this.pathArray().map((p,h)=>h===e?`${t}`:`${p}`).join("\0"),r=[i,o].filter(p=>p&&p!=="").join("\0");this.sourceDataForm.controls.path.setValue(r)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==t).join("\0"),o=[n,i].filter(r=>r&&r!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let i=n.filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Pt,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let r;r=$localize`Source Data`;let p;p=$localize`Folder path`;let h;h=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let S;S=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let w;w=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let $;$=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let W;W=$localize`Exclude`;let R;R=$localize`Choose if there’s any files you want to exclude.`;let Z;Z=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let f;return f=$localize`Edit path`,[["formRef",""],r,p,h,S,w,P,$,K,v,W,R,Z,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",f,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=x();s(0,"form",16,0),F("submit",function(){return c(i),d(n.next())}),s(2,"div",17)(3,"h3",18),N(4,1),l(),s(5,"app-file-tree",19)(6,"label",20),N(7,2),l(),g(8,"input",21),l(),s(9,"div",22)(10,"button",23),F("click",function(){return c(i),d(n.goBack())}),E(11,3),g(12,"sh-icon"),m(),l(),s(13,"button",24),E(14,4),g(15,"sh-icon"),m(),l()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),N(19,5),k(),s(20,"p",28),N(21,6),l(),s(22,"div",29),$e(23,Rt,3,1,"div",30,Ge),s(25,"div",31)(26,"sh-form-field"),g(27,"input",32),l(),s(28,"button",33),F("click",function(){return c(i),d(n.addNewPath())}),s(29,"sh-icon"),U(30,"plus"),l()()()()(),s(31,"app-toggle-card",26),B(32,27),N(33,7),k(),s(34,"p",28),N(35,8),l(),s(36,"button",34),F("click",function(){return c(i),d(n.addFilter())}),N(37,9),l(),A(38,Ot,2,0),l(),s(39,"app-toggle-card",35),B(40,27),N(41,10),k(),s(42,"p",28),N(43,11),l(),s(44,"sh-toggle",36),E(45,12),g(46,"input",37),m(),l(),s(47,"sh-toggle",36),E(48,13),g(49,"input",38),m(),l(),s(50,"sh-toggle",36),E(51,14),g(52,"input",39),m(),l(),s(53,"sh-toggle",40),F("click",function(){return c(i),d(n.toggleFilesLargerThan())}),N(54,15),l(),A(55,yt,2,3,"div",31),l()()()}if(e&2){let i;T("formGroup",n.sourceDataForm),_(5),T("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),T("disallowToggle",!0),_(6),xe(n.nonFilterPaths()),_(4),T("formControl",n.newPathCtrl),_(4),T("disallowToggle",!0),_(7),D((i=n.pathSignal())!=null&&i.length?38:-1),_(),T("disallowToggle",!0),_(14),me("active",n.filesLargerThan()),_(2),D(n.filesLargerThan()?55:-1)}},dependencies:[ae,fe,z,Te,j,Ne,oe,Re,et,Pe,Ae,tt,Y,q,se,Me,Ie,ut,ye,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Ct="1W:1D,4W:1W,12M:1M",Q=class a{#e=O(H);#t=O(Oe);#i=O(it);#n=O(st);#a=O(Le);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:C(ee.autoRun),nextTime:C(ee.nextTime),runAgain:C(ee.runAgain)};settings=C([]);optionsFields={remoteVolumeSize:C("50MB"),backupRetention:C("all"),backupRetentionTime:C(""),backupRetentionVersions:C(0),backupRetentionCustom:C("")};targetUrlModel=C(null);backupMetadata=C(null);isDraft=C(!1);backupId=C(null);backupName=G(()=>this.generalFormSignal()?.name??"");isSubmitting=C(!1);finishedLoading=C(!1);backupDefaults=C(null);applicationOptions=C(null);isNew=G(()=>this.backupId()==="new");osType=G(()=>this.#t.systemInfo()?.OSType);selectedOptions=C([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=G(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=C("");#s=C(null);#l=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#s.asReadonly();#d=ne(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#s.set(null))});setTestState(t,e){this.#o.set(t),this.#s.set(e??null)}#_(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=G(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=G(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#u(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(lt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(p=>`${p.Include?"":"-"}${p.Expression}`)??[],i=t.Settings?.find(p=>p.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(p=>p.Name==="--skip-files-larger-than")??null,r={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(r)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(S=>S.Name==="encryption-module"),o=t.Settings?.find(S=>S.Name==="passphrase")?.Value??"",r=i?.Value&&i.Value.length?i.Value:"",p=t.Settings?.find(S=>S.Name==="compression-module")?.Value??"",h={name:t.Name??"",description:t.Description??""};e&&e!==""&&(h.name=e),n&&n!==""&&(h.description=n),r&&r!==""&&(h.encryption=r),o&&o!==""&&(h.password=o,h.repeatPassword=o),p&&p!==""&&(h.compression=p),this.generalForm.patchValue(h)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#a.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>b(b({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(r=>!e.includes(r.Name)),i=t.Settings?.filter(r=>e.includes(r.Name));this.settings.set(n??[]),n?.forEach(r=>{if(r.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(r.Value??"")});var o="all";i?.forEach(r=>{if(r.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(r.Value??"50MB"),r.Name==="keep-time"&&(r.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(r.Value??"");if(r.Name==="keep-versions"&&(r.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(r.Value?parseInt(r.Value):null);if(r.Name==="retention-policy"&&(r.Value??"")!=="")if(r.Value===Ct)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(r.Value??"")}),this.optionsFields.backupRetention.set(o)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#u(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#a.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,$])=>$).map(([P,$])=>P):[],p=n.path?.split("\0")??[],h=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,$])=>$&&P!=="filesLargerThan").map(([P])=>P),w=n.excludes?.filesLargerThan;return S.length&&h.push({Name:"--exclude-files-attributes",Value:S.join(",")}),w&&w.size!==null&&w.unit!==null&&h.push({Name:"--skip-files-larger-than",Value:`${w.size}${w.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:p.filter(P=>!P.startsWith("-")),Settings:h,Filters:p.filter(P=>P.startsWith("-")).map((P,$)=>({Order:$,Include:!1,Expression:P.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:r}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==pe.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:Ct});break}let p=[...t,...n],h=this.settings().filter(S=>!p.includes(S.Name)).map(S=>{let w=S.Value;return typeof S.Value=="number"&&(w=S.Value.toString()),typeof S.Value=="boolean"&&(w=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:w}});return[...i,...o,...r,...h]}#c(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t,e=!1){e&&(this.#l=null),this.targetUrlModel.set(t)}#r(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(ee.autoRun),this.scheduleFields.nextTime.set(ee.nextTime),this.scheduleFields.runAgain.set(ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||a)};static \u0275prov=Ce({token:a,factory:a.\u0275fac,providedIn:"root"})};var Lt=["formRef"];function It(a,t){a&1&&(s(0,"sh-alert",17),E(1,5),g(2,"sh-icon",26),m(),l())}function wt(a,t){if(a&1&&U(0),a&2){let e=t.$implicit;Ye(" ",e.DisplayName," ")}}function Gt(a,t){if(a&1&&g(0,"sh-progress-bar",40),a&2){let e=u(3);me("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),T("value",e.calculatePasswordStrength()*(100/5))}}function $t(a,t){a&1&&(s(0,"span",35),N(1,10),l())}function xt(a,t){a&1&&(E(0,8,1),g(1,"sh-icon"),m())}function Ut(a,t){a&1&&(E(0,8,2),g(1,"sh-icon"),m())}function bt(a,t){a&1&&(E(0,11,1),g(1,"sh-icon",42),m())}function vt(a,t){a&1&&(E(0,11,2),g(1,"sh-icon"),m())}function Bt(a,t){if(a&1){let e=x();s(0,"button",41),F("click",function(){c(e);let i=u(3);return d(i.copyPassword())}),E(1,11),A(2,bt,2,0)(3,vt,2,0),m(),l()}if(a&2){let e=u(3);_(2),D(e.copiedPassword()?2:3)}}function kt(a,t){a&1&&(s(0,"sh-alert",39),N(1,12),l())}function Vt(a,t){if(a&1){let e=x();s(0,"div",30)(1,"sh-form-field")(2,"label",31),E(3,7),g(4,"sup"),m(),l(),g(5,"input",32),l(),A(6,Gt,1,9,"sh-progress-bar",33),s(7,"sh-form-field"),g(8,"input",34),A(9,$t,2,0,"span",35),l(),s(10,"div",36)(11,"button",37),F("click",function(){c(e);let i=u(2);return d(i.showPassword.set(!i.showPassword()))}),E(12,8),A(13,xt,2,0)(14,Ut,2,0),m(),l(),s(15,"button",37),F("click",function(){c(e);let i=u(2);return d(i.generatePassword())}),E(16,9),g(17,"sh-icon"),m(),l(),A(18,Bt,4,1,"button",38),l(),A(19,kt,2,0,"sh-alert",39),l()}if(a&2){let e=u(2);_(5),T("type",e.showPassword()?"text":"password"),_(),D(e.generalForm.value.password?6:-1),_(2),T("type",e.showPassword()?"text":"password"),_(),D(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),D(e.showPassword()?13:14),_(5),D(e.showCopyPassword()?18:-1),_(),D(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Kt(a,t){if(a&1&&(s(0,"sh-select",27)(1,"label",28),N(2,6),l(),g(3,"input",29),je(4,wt,1,1,"ng-template"),l(),A(5,Vt,20,7,"div",30)),a&2){let e=u();T("options",e.encryptionOptions())("isClearable",!1),_(5),D(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Wt(a,t){if(a&1&&(s(0,"button",24),E(1,13),g(2,"sh-icon"),m(),l()),a&2){let e=u();T("disabled",e.nameAndDescriptionValid()===!1)}}function Xt(a,t){if(a&1&&(s(0,"button",25),E(1,14),g(2,"sh-icon"),m(),l()),a&2){let e=u();T("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var te=new De,gt=(a={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>te.group({name:te.control(a.name,[he.required]),description:te.control(a.description),encryption:te.control(a.encryption,[_t()]),password:te.control(a.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:te.control(a.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:te.control(a.compression)}),pe={Key:"-",DisplayName:"None"},ze=class a{#e=O(H);#t=O(ie);#i=O(rt);#n=O(Q);#a=O(Oe);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);noneOptionKey=pe.Key;encryptionEffect=ne(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=G(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Lt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let h;h=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let S;S=$localize`Encryption`;let w;w=$localize`Encryption`;let P;P=$localize`Password`;let $;$=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13: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/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14: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/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Ue(v);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let R;R=$localize`Passwords do not match`;let Z;Z=$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:`,Z=Ue(Z);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,o,r,p,h,w,K,v,W,R,Z,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",S,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=x();s(0,"form",15,0),F("submit",function(){return c(i),d(n.next())}),s(2,"h3",16),N(3,1),l(),A(4,It,3,0,"sh-alert",17),s(5,"sh-form-field")(6,"label",18),E(7,2),g(8,"sup"),m(),l(),g(9,"input",19),l(),s(10,"sh-form-field")(11,"label",20),N(12,3),l(),g(13,"textarea",21),l(),A(14,Kt,6,3),s(15,"div",22)(16,"button",23),F("click",function(){return c(i),d(n.exit())}),E(17,4),g(18,"sh-icon"),m(),l(),A(19,Wt,3,1,"button",24)(20,Xt,3,1,"button",25),l()()}if(e&2){let i;T("formGroup",n.generalForm),_(4),D(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),D(n.isNew()?14:-1),_(5),D(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,fe,z,j,Ne,Pe,Ae,Y,le,se,q,ot,nt,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,pe as b,ze as c,ee as d,Ke as e,pt as f,Je as g,Q as h};
@@ -0,0 +1 @@
1
+ import{a as b}from"./chunk-TPBZNCDW.js";import{b as h}from"./chunk-Z27IQRKV.js";import"./chunk-RDCD2W2C.js";import"./chunk-TJIZJNCK.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import"./chunk-XVWOVBC4.js";import"./chunk-WXF4HUYT.js";import{b as M,e as O}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B,u as R}from"./chunk-QF4DQYEP.js";import{h as A}from"./chunk-PD73DDOS.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{Ab as T,Bb as g,Db as F,Eb as a,Fb as _,Qc as L,Sa as i,Tb as c,Ub as d,Vb as l,Yb as p,Zb as I,_ as C,cb as f,nc as E,pa as r,pc as N,xb as s,yb as u,zb as S}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";function $(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function k(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;N(" ",n," ")}}var D=class e{#t=C(A);#e=C(M);#n=h(this.#e.params);runId=L(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=f({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=p(o),[t,n,o,[1,"back"],["type","button","shButton","","routerLink","../",1,"small"],["type","button","shButton","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"sh-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,$,1,0),s(12,P,1,0),s(13,k,1,0),s(14,v,1,0),d(),a(),F(15,"code"),T(16,U,2,1,null,null,S),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[b,R,B,O],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import{g as mt}from"./chunk-DBQGZZI2.js";import{a as Ot,b as pt,c as Rt}from"./chunk-TWMGET5I.js";import"./chunk-VRV52R6I.js";import"./chunk-DILTD4XG.js";import"./chunk-ZBVBVQO7.js";import{a as Et}from"./chunk-SJ3V6DON.js";import{h as Ct}from"./chunk-4NLJRM5D.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-Z27IQRKV.js";import"./chunk-ZSZLXWN6.js";import{a as R}from"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import"./chunk-WXF4HUYT.js";import{b as nt,d as it}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as St,G as dt,J as Dt,c as ot,e as at,f as st,g as Ft,i as rt,j as lt,s as _t,u as ct,w as Tt,y as ut,z as gt}from"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as L,Ac as Z,Bb as x,Bc as tt,Cb as N,Db as s,Eb as F,Fb as g,Jb as G,Kb as w,Mb as C,Qc as k,Sa as r,Tb as T,Ub as u,Vb as h,Wb as f,Xb as $,Xc as et,Yb as B,Zb as d,_ as O,cb as K,ea as _,fa as c,gc as j,hc as Q,ja as X,kc as q,nc as I,oc as b,pa as p,pc as Y,sc as A,tc as M,uc as P,xb as D,yb as E,zb as y}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Nt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function ht(i,n){if(i&1){let t=C();T(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),u()}if(i&2){let t=l();r(),q("loader",t.testSignal()=="testing"),N("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=C();T(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),u()}}function $t(i,n){i&1&&(s(0,"sh-alert"),T(1,5),g(2,"sh-icon",31),u(),F())}function At(i,n){i&1&&(s(0,"sh-alert",21),T(1,6),g(2,"sh-icon",31),u(),F())}function Mt(i,n){if(i&1&&(s(0,"sh-alert",22),T(1,7),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1&&(s(0,"sh-alert",23),T(1,8),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=C();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),T(1,9),g(2,"strong")(3,"br")(4,"span",33),u(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Lt(i,n){if(i&1){let t=C();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),b(t.displayName),r(2),b(t.description)}}function xt(i,n){if(i&1){let t=C();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),Y(" ",t.displayName," ")}}function Gt(i,n){if(i&1&&(s(0,"div",34),L(1,Lt,5,2,"div",35,y),F(),s(3,"sh-menu",36)(4,"button",37),h(5,10),F(),G(6,19),L(7,xt,3,1,"button",38,y),w(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),N("searchable",!0),r(4),x(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=C();s(0,"app-single-destination",41),P("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function Bt(i,n){i&1&&(T(0,4,1),g(1,"sh-icon",28),u())}function bt(i,n){i&1&&(T(0,4,2),g(1,"sh-icon"),u())}function kt(i,n){if(i&1){let t=C();s(0,"sh-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),h(3,11),F(),s(4,"sh-alert",22),h(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),P("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),T(13,13),g(14,"sh-icon"),u(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),N("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(gt);#a=O(Ot);injector=O(X);#t=O(mt);#s=O(pt);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=k(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Et(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let m=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(R,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=K({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&j(o.formRef,Nt,5),t&2&&Q()},features:[Z([Ct])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=B(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=B(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;return J=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,m,U,V,W,z,H,J,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=C();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),T(4,2),s(5,"div",16),D(6,ht,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),G(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,ft,3,0,"button",18),w(),F()(),u(),F(),D(14,$t,3,0,"sh-alert")(15,At,3,0,"sh-alert",21)(16,Mt,3,1,"sh-alert",22)(17,Pt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Gt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),T(23,3),g(24,"sh-icon"),u(),F(),s(25,"button",27),T(26,4),D(27,Bt,2,0,"sh-icon",28)(28,bt,2,0,"sh-icon"),u(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),N("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Rt,_t,lt,ot,at,st,rt,Ft,St,dt,Dt,ct,ut,Tt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{v as default};
1
+ import{g as mt}from"./chunk-M6SIMFCD.js";import{a as Ot,b as pt,c as Rt}from"./chunk-FMEVVC6D.js";import"./chunk-JRDR23NB.js";import"./chunk-ZBVBVQO7.js";import{a as Et}from"./chunk-X3XJ26NZ.js";import{h as Ct}from"./chunk-KSEFQ2XA.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-VRV52R6I.js";import"./chunk-Z27IQRKV.js";import"./chunk-ZSZLXWN6.js";import{a as R}from"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import"./chunk-WXF4HUYT.js";import{b as nt,d as it}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as St,G as dt,J as Dt,c as ot,e as at,f as st,g as Ft,i as rt,j as lt,s as _t,u as ct,w as Tt,y as ut,z as gt}from"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as L,Ac as Z,Bb as x,Bc as tt,Cb as N,Db as s,Eb as F,Fb as g,Jb as G,Kb as w,Mb as C,Qc as k,Sa as r,Tb as T,Ub as u,Vb as h,Wb as f,Xb as $,Xc as et,Yb as B,Zb as d,_ as O,cb as K,ea as _,fa as c,gc as j,hc as Q,ja as X,kc as q,nc as I,oc as b,pa as p,pc as Y,sc as A,tc as M,uc as P,xb as D,yb as E,zb as y}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Nt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function ht(i,n){if(i&1){let t=C();T(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),u()}if(i&2){let t=l();r(),q("loader",t.testSignal()=="testing"),N("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=C();T(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),u()}}function $t(i,n){i&1&&(s(0,"sh-alert"),T(1,5),g(2,"sh-icon",31),u(),F())}function At(i,n){i&1&&(s(0,"sh-alert",21),T(1,6),g(2,"sh-icon",31),u(),F())}function Mt(i,n){if(i&1&&(s(0,"sh-alert",22),T(1,7),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1&&(s(0,"sh-alert",23),T(1,8),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=C();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),T(1,9),g(2,"strong")(3,"br")(4,"span",33),u(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Lt(i,n){if(i&1){let t=C();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),b(t.displayName),r(2),b(t.description)}}function xt(i,n){if(i&1){let t=C();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),Y(" ",t.displayName," ")}}function Gt(i,n){if(i&1&&(s(0,"div",34),L(1,Lt,5,2,"div",35,y),F(),s(3,"sh-menu",36)(4,"button",37),h(5,10),F(),G(6,19),L(7,xt,3,1,"button",38,y),w(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),N("searchable",!0),r(4),x(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=C();s(0,"app-single-destination",41),P("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function Bt(i,n){i&1&&(T(0,4,1),g(1,"sh-icon",28),u())}function bt(i,n){i&1&&(T(0,4,2),g(1,"sh-icon"),u())}function kt(i,n){if(i&1){let t=C();s(0,"sh-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),h(3,11),F(),s(4,"sh-alert",22),h(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),P("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),T(13,13),g(14,"sh-icon"),u(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),N("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(gt);#a=O(Ot);injector=O(X);#t=O(mt);#s=O(pt);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=k(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Et(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let m=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(R,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=K({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&j(o.formRef,Nt,5),t&2&&Q()},features:[Z([Ct])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=B(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=B(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;return J=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,m,U,V,W,z,H,J,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=C();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),T(4,2),s(5,"div",16),D(6,ht,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),G(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,ft,3,0,"button",18),w(),F()(),u(),F(),D(14,$t,3,0,"sh-alert")(15,At,3,0,"sh-alert",21)(16,Mt,3,1,"sh-alert",22)(17,Pt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Gt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),T(23,3),g(24,"sh-icon"),u(),F(),s(25,"button",27),T(26,4),D(27,Bt,2,0,"sh-icon",28)(28,bt,2,0,"sh-icon"),u(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),N("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Rt,_t,lt,ot,at,st,rt,Ft,St,dt,Dt,ct,ut,Tt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{v as default};
@@ -1 +1 @@
1
- import{a as Ye}from"./chunk-DILTD4XG.js";import{a as se}from"./chunk-VUKS2SJL.js";import{a as ne}from"./chunk-3NFAL4U4.js";import{b as _e}from"./chunk-Z27IQRKV.js";import{a as Xe}from"./chunk-ZSZLXWN6.js";import{a as q}from"./chunk-72HORZFV.js";import{a as oe}from"./chunk-MTQKK2WN.js";import{a as Je}from"./chunk-LN26XMBJ.js";import{b as R,d as h}from"./chunk-ABYM5HWA.js";import{B as J,G as Be,K as xe,L as Ve,O as We,V as ze,b as ve,c as A,e as G,f as k,i as Ae,j as w,l as Ge,o as B,q as x,r as V,s as ke,t as W,u as z,z as we}from"./chunk-QF4DQYEP.js";import{h as X}from"./chunk-PD73DDOS.js";import{la as ie}from"./chunk-5ZSBXGHQ.js";import{$b as D,Ac as ye,B as Oe,Bc as be,Cb as g,Db as r,Eb as l,F as U,Fb as c,Fc as ae,Gc as $e,H as O,Hc as De,Jb as b,Kb as $,L as Ce,Mb as H,P as Ne,Q,Qc as le,Rc as v,Sa as d,Tb as S,Ub as T,V as fe,Vb as m,Wb as he,Xb as Pe,Zb as C,_,cb as L,ea as N,fa as f,hb as Re,i as me,kc as Ie,nc as j,o as Ee,pa as p,pc as Le,qc as Me,sc as Z,tc as ee,uc as te,x as re,xb as M,y as Fe,yb as y}from"./chunk-QONLYWYC.js";var Ue=new V,qe=()=>Ue.group({passphrase:Ue.control("")}),pe=class a{#t=_(X);#e=_(P);#o=_(h);#n=_(R);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);settings=p([]);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[];e?t.push({Name:"--passphrase",Value:e}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),t.push({Name:n,Value:o.Value??""}))}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["destination"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-restore-encryption"]],decls:16,vars:3,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`Advanced options`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;return n=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `,[e,t,o,n,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",4),C("submit",function(){return t.next()}),r(1,"sh-form-field")(2,"label",5),m(3,0),l(),c(4,"input",6),l(),r(5,"app-toggle-card"),b(6,7),m(7,1),$(),r(8,"app-options-list",8),te("optionsChange",function(n){return ee(t.settings,n)||(t.settings=n),n}),l()(),r(9,"div",9)(10,"button",10),C("click",function(){return t.back()}),S(11,2),c(12,"sh-icon"),T(),l(),r(13,"button",11),S(14,3),c(15,"sh-icon"),T(),l()()()),e&2&&(g("formGroup",t.encryptionForm),d(8),Z("options",t.settings),g("hasFreeTextSettings",!0))},dependencies:[W,w,A,G,k,B,x,Be,z,J,ne,Ye],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Ze=()=>({standalone:!0});function et(a,i){a&1&&c(0,"sh-progress-bar",8)}function tt(a,i){if(a&1&&(j(0),ae(1,"bytes")),a&2){let e=D().$implicit;Le(" (",$e(1,1,e.FileSizes),") ")}}function it(a,i){a&1&&(r(0,"span",16),m(1,4),l())}function ot(a,i){if(a&1&&(r(0,"div",15),j(1),ae(2,"date"),M(3,tt,2,3),M(4,it,2,0,"span",16),l()),a&2){let e=i.$implicit;d(),Me(" ",e.Version,": ",De(2,4,e.Time,"medium")," "),d(2),y(e.FileSizes?3:-1),d(),y(e.IsFullBackup===!1?4:-1)}}function nt(a,i){a&1&&c(0,"sh-progress-bar",8)}function st(a,i){if(a&1&&(r(0,"app-file-tree",14)(1,"label",17),m(2,5),l(),c(3,"input",18),l()),a&2){let e=D(2);g("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function rt(a,i){if(a&1){let e=H();r(0,"sh-select",12),C("cleared",function(){N(e);let o=D();return f(o.abortLoading())}),r(1,"input",13),te("ngModelChange",function(o){N(e);let n=D();return ee(n.selectOption,o)||(n.selectOption=o),f(o)}),l(),Re(2,ot,5,7,"ng-template"),l(),M(3,nt,1,0,"sh-progress-bar",8),M(4,st,4,5,"app-file-tree",14)}if(a&2){let e=D();g("options",e.versionOptions())("isClearable",!1),d(),Z("ngModel",e.selectOption),g("ngModelOptions",be(6,Ze)),d(2),y(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),y(e.showFileTree()?4:-1)}}var ue=new V,Ke=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class a{#t=_(X);#e=_(P);#o=_(Xe);#n=_(oe);#i=_(h);#s=_(R);#l=_(ie);#a=null;#_=null;#r=p([]);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isFileRestore=this.#e.isFileRestore;needsDatabaseRepair=le(()=>this.#e.backup()?.Backup?.IsTemporary??!0);showFileTree=p(!1);backupSettings=p(null);rootPaths=p([]);initialNodes=p([]);loadingRootPath=p(!1);isRepairing=le(()=>this.#r().length>0);loadedVersions=p({});loadingEffect=v(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=v(()=>{let i=this.backupId(),e=this.selectOption(),t=this.isRepairing(),o=this.loadedVersions();if(!e||!i)return;let s=this.versionOptions()?.find(K=>K.Version===parseInt(e))?.Time??null;if(!s)return;let u=`${i}+${s}`,F=o[u];if(this.needsDatabaseRepair()&&(!F||t))return;let I={id:i+"",time:s};this.backupSettings.set(I),this.getRootPath(I)});repairEffect=v(()=>{if(!this.needsDatabaseRepair())return;let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(s=>[...s,n]),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(Q(this.abortLoading$),O(()=>{this.#_=null})).subscribe(s=>{let u=s.ID;this.#o.waitForTaskToComplete(u).pipe(U(1)).subscribe(()=>{this.#r.update(F=>F.filter(I=>I!==n)),this.loadedVersions.update(F=>(F[n]=!0,F))})})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#a===t||(this.#a=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#n.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(Q(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#a=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#t.getApiV1BackupByIdFiles(e).pipe(Q(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new me;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#l.transform(t.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-select-files"]],features:[ye([ie])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let n;n=$localize`(partial)`;let s;return s=$localize`Path`,[["formRef",""],i,e,t,n,s,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles"],[1,"custom-option"],[1,"partial"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=H();r(0,"form",6,0),C("submit",function(){return N(o),f(t.next())}),r(2,"h3",7),m(3,1),l(),M(4,et,1,0,"sh-progress-bar",8)(5,rt,5,7),r(6,"div",9)(7,"button",10),C("click",function(){return N(o),f(t.back())}),S(8,2),c(9,"sh-icon"),T(),l(),r(10,"button",11),S(11,3),c(12,"sh-icon"),T(),l()()()}e&2&&(g("formGroup",t.selectFilesForm),d(4),y(t.versionOptionsLoading()?4:5),d(5),he(t.isFileRestore()?"Back":"Exit"),Pe(8))},dependencies:[ke,w,A,G,k,Ae,W,B,x,se,J,z,We,xe,ie,Je],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var P=class a{#t=_(h);#e=_(R);#o=_(oe);#n=_(we);#i=_(X);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=Ke();optionsForm=Qe();encryptionForm=qe();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=p(null);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isFileRestore=p(!1);isFullWidthPage=p(!1);#s=p("");#l=p(null);#a=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#l.asReadonly();#_=v(()=>{let i=this.destinationTargetUrl(),e=this.#s(),t=this.#a;this.#a=i,!(e==="testing"||t===null||t===i)&&(this.#s.set(""),this.#l.set(null))});init(i,e=!1){this.backupId.set(i),this.isFileRestore.set(e),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}setTestState(i,e){this.#s.set(i),this.#l.set(e??null)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:t=>{this.#r(t.ID??"")},error:t=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${t.message}`)}):this.#r(i??"")}showErrorDialog(i){this.#n.open(q,{data:{title:$localize`Error occured`,message:i,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#r(i){let e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>s.endsWith("/")||s.endsWith("\\")?`${s}*`:s)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:s=>{this.#t.navigate([`./${s.ID}`,"progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#p(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Oe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?Ee(()=>t):Fe(1e3).pipe(Ne(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?re([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(U(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);if(!(t.Backup?.IsTemporary??!0)&&t?.Backup?.DBPathExists===!1){this.#n.open(q,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:s=>{this.#t.navigate(["/backup",e,"database"])}});return}this.versionOptions.set((o.Data??[]).map(s=>({Version:s.Version??-1,IsFullBackup:s.IsFullBackup??void 0,Time:s.Time??"<missing>",FileCount:s.FileCount??void 0,FileSizes:s.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(u=$localize`The backup storage folder was not found.`),s&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(q,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:F=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):re([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(Ce(3))]).pipe(U(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#p(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=fe({token:a,factory:a.\u0275fac,providedIn:"root"})};var Y=new V,Qe=()=>Y.group({restoreFrom:Y.control("orignal"),restoreFromPath:Y.control(""),handleExisting:Y.control("overwrite"),permissions:Y.control(!1),includeMetadata:Y.control(!0)}),Se=class a{#t=_(P);#e=_(h);#o=_(R);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-advanced-options-settings"]],decls:42,vars:7,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let F;F=$localize`Metadata settings`;let I;I=$localize` Restore file metadata ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Restore read/write permissions ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let Te;Te=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let ge;return ge=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,u,F,I,K,Te,ge,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=H();r(0,"form",13,0),C("submit",function(){return N(o),f(t.submit())}),r(2,"h3",14),m(3,1),l(),r(4,"app-toggle-card",15),b(5,16),m(6,2),$(),r(7,"sh-radio",17),S(8,3),c(9,"input",18),T(),l(),r(10,"sh-radio",17),S(11,4),c(12,"input",19),T(),l(),r(13,"app-file-tree",20)(14,"label",21),j(15,"Path"),l(),c(16,"input",22),l()(),r(17,"app-toggle-card",15),b(18,16),m(19,5),$(),r(20,"sh-radio",17),S(21,6),c(22,"input",23),T(),l(),r(23,"sh-radio",17),S(24,7),c(25,"input",24),T(),l()(),r(26,"app-toggle-card"),b(27,16),m(28,8),$(),r(29,"sh-toggle",25),S(30,9),c(31,"input",26),T(),l(),r(32,"sh-toggle",25),S(33,10),c(34,"input",27),T(),l()(),r(35,"div",28)(36,"button",29),C("click",function(){return N(o),f(t.goBack())}),S(37,11),c(38,"sh-icon"),T(),l(),r(39,"button",30),S(40,12),c(41,"sh-icon"),T(),l()()()}if(e&2){let o;g("formGroup",t.optionsForm),d(4),g("disallowToggle",!0),d(9),g("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation")("enableCreateFolder",!0),d(4),g("disallowToggle",!0),d(22),Ie("loader",t.isSubmitting())}},dependencies:[W,w,A,ve,Ge,G,k,B,x,ne,se,ze,Ve,J,z],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Qe as a,Se as b,qe as c,pe as d,Ke as e,de as f,P as g};
1
+ import{a as Ye}from"./chunk-JRDR23NB.js";import{a as se}from"./chunk-VUKS2SJL.js";import{a as ne}from"./chunk-3NFAL4U4.js";import{b as _e}from"./chunk-Z27IQRKV.js";import{a as Xe}from"./chunk-ZSZLXWN6.js";import{a as q}from"./chunk-72HORZFV.js";import{a as oe}from"./chunk-MTQKK2WN.js";import{a as Je}from"./chunk-LN26XMBJ.js";import{b as R,d as h}from"./chunk-ABYM5HWA.js";import{B as J,G as Be,K as xe,L as Ve,O as We,V as ze,b as ve,c as A,e as G,f as k,i as Ae,j as w,l as Ge,o as B,q as x,r as V,s as ke,t as W,u as z,z as we}from"./chunk-QF4DQYEP.js";import{h as X}from"./chunk-PD73DDOS.js";import{la as ie}from"./chunk-5ZSBXGHQ.js";import{$b as D,Ac as ye,B as Oe,Bc as be,Cb as g,Db as r,Eb as l,F as U,Fb as c,Fc as ae,Gc as $e,H as O,Hc as De,Jb as b,Kb as $,L as Ce,Mb as H,P as Ne,Q,Qc as le,Rc as v,Sa as d,Tb as S,Ub as T,V as fe,Vb as m,Wb as he,Xb as Pe,Zb as C,_,cb as L,ea as N,fa as f,hb as Re,i as me,kc as Ie,nc as j,o as Ee,pa as p,pc as Le,qc as Me,sc as Z,tc as ee,uc as te,x as re,xb as M,y as Fe,yb as y}from"./chunk-QONLYWYC.js";var Ue=new V,qe=()=>Ue.group({passphrase:Ue.control("")}),pe=class a{#t=_(X);#e=_(P);#o=_(h);#n=_(R);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);settings=p([]);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[];e?t.push({Name:"--passphrase",Value:e}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),t.push({Name:n,Value:o.Value??""}))}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["destination"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-restore-encryption"]],decls:16,vars:3,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`Advanced options`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;return n=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `,[e,t,o,n,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",4),C("submit",function(){return t.next()}),r(1,"sh-form-field")(2,"label",5),m(3,0),l(),c(4,"input",6),l(),r(5,"app-toggle-card"),b(6,7),m(7,1),$(),r(8,"app-options-list",8),te("optionsChange",function(n){return ee(t.settings,n)||(t.settings=n),n}),l()(),r(9,"div",9)(10,"button",10),C("click",function(){return t.back()}),S(11,2),c(12,"sh-icon"),T(),l(),r(13,"button",11),S(14,3),c(15,"sh-icon"),T(),l()()()),e&2&&(g("formGroup",t.encryptionForm),d(8),Z("options",t.settings),g("hasFreeTextSettings",!0))},dependencies:[W,w,A,G,k,B,x,Be,z,J,ne,Ye],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Ze=()=>({standalone:!0});function et(a,i){a&1&&c(0,"sh-progress-bar",8)}function tt(a,i){if(a&1&&(j(0),ae(1,"bytes")),a&2){let e=D().$implicit;Le(" (",$e(1,1,e.FileSizes),") ")}}function it(a,i){a&1&&(r(0,"span",16),m(1,4),l())}function ot(a,i){if(a&1&&(r(0,"div",15),j(1),ae(2,"date"),M(3,tt,2,3),M(4,it,2,0,"span",16),l()),a&2){let e=i.$implicit;d(),Me(" ",e.Version,": ",De(2,4,e.Time,"medium")," "),d(2),y(e.FileSizes?3:-1),d(),y(e.IsFullBackup===!1?4:-1)}}function nt(a,i){a&1&&c(0,"sh-progress-bar",8)}function st(a,i){if(a&1&&(r(0,"app-file-tree",14)(1,"label",17),m(2,5),l(),c(3,"input",18),l()),a&2){let e=D(2);g("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function rt(a,i){if(a&1){let e=H();r(0,"sh-select",12),C("cleared",function(){N(e);let o=D();return f(o.abortLoading())}),r(1,"input",13),te("ngModelChange",function(o){N(e);let n=D();return ee(n.selectOption,o)||(n.selectOption=o),f(o)}),l(),Re(2,ot,5,7,"ng-template"),l(),M(3,nt,1,0,"sh-progress-bar",8),M(4,st,4,5,"app-file-tree",14)}if(a&2){let e=D();g("options",e.versionOptions())("isClearable",!1),d(),Z("ngModel",e.selectOption),g("ngModelOptions",be(6,Ze)),d(2),y(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),y(e.showFileTree()?4:-1)}}var ue=new V,Ke=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class a{#t=_(X);#e=_(P);#o=_(Xe);#n=_(oe);#i=_(h);#s=_(R);#l=_(ie);#a=null;#_=null;#r=p([]);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isFileRestore=this.#e.isFileRestore;needsDatabaseRepair=le(()=>this.#e.backup()?.Backup?.IsTemporary??!0);showFileTree=p(!1);backupSettings=p(null);rootPaths=p([]);initialNodes=p([]);loadingRootPath=p(!1);isRepairing=le(()=>this.#r().length>0);loadedVersions=p({});loadingEffect=v(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=v(()=>{let i=this.backupId(),e=this.selectOption(),t=this.isRepairing(),o=this.loadedVersions();if(!e||!i)return;let s=this.versionOptions()?.find(K=>K.Version===parseInt(e))?.Time??null;if(!s)return;let u=`${i}+${s}`,F=o[u];if(this.needsDatabaseRepair()&&(!F||t))return;let I={id:i+"",time:s};this.backupSettings.set(I),this.getRootPath(I)});repairEffect=v(()=>{if(!this.needsDatabaseRepair())return;let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(s=>[...s,n]),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(Q(this.abortLoading$),O(()=>{this.#_=null})).subscribe(s=>{let u=s.ID;this.#o.waitForTaskToComplete(u).pipe(U(1)).subscribe(()=>{this.#r.update(F=>F.filter(I=>I!==n)),this.loadedVersions.update(F=>(F[n]=!0,F))})})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#a===t||(this.#a=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#n.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(Q(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#a=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#t.getApiV1BackupByIdFiles(e).pipe(Q(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new me;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#l.transform(t.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-select-files"]],features:[ye([ie])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let n;n=$localize`(partial)`;let s;return s=$localize`Path`,[["formRef",""],i,e,t,n,s,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles"],[1,"custom-option"],[1,"partial"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=H();r(0,"form",6,0),C("submit",function(){return N(o),f(t.next())}),r(2,"h3",7),m(3,1),l(),M(4,et,1,0,"sh-progress-bar",8)(5,rt,5,7),r(6,"div",9)(7,"button",10),C("click",function(){return N(o),f(t.back())}),S(8,2),c(9,"sh-icon"),T(),l(),r(10,"button",11),S(11,3),c(12,"sh-icon"),T(),l()()()}e&2&&(g("formGroup",t.selectFilesForm),d(4),y(t.versionOptionsLoading()?4:5),d(5),he(t.isFileRestore()?"Back":"Exit"),Pe(8))},dependencies:[ke,w,A,G,k,Ae,W,B,x,se,J,z,We,xe,ie,Je],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var P=class a{#t=_(h);#e=_(R);#o=_(oe);#n=_(we);#i=_(X);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=Ke();optionsForm=Qe();encryptionForm=qe();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=p(null);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isFileRestore=p(!1);isFullWidthPage=p(!1);#s=p("");#l=p(null);#a=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#l.asReadonly();#_=v(()=>{let i=this.destinationTargetUrl(),e=this.#s(),t=this.#a;this.#a=i,!(e==="testing"||t===null||t===i)&&(this.#s.set(""),this.#l.set(null))});init(i,e=!1){this.backupId.set(i),this.isFileRestore.set(e),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}setTestState(i,e){this.#s.set(i),this.#l.set(e??null)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:t=>{this.#r(t.ID??"")},error:t=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${t.message}`)}):this.#r(i??"")}showErrorDialog(i){this.#n.open(q,{data:{title:$localize`Error occured`,message:i,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#r(i){let e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>s.endsWith("/")||s.endsWith("\\")?`${s}*`:s)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:s=>{this.#t.navigate([`./${s.ID}`,"progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#p(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Oe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?Ee(()=>t):Fe(1e3).pipe(Ne(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?re([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(U(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);if(!(t.Backup?.IsTemporary??!0)&&t?.Backup?.DBPathExists===!1){this.#n.open(q,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:s=>{this.#t.navigate(["/backup",e,"database"])}});return}this.versionOptions.set((o.Data??[]).map(s=>({Version:s.Version??-1,IsFullBackup:s.IsFullBackup??void 0,Time:s.Time??"<missing>",FileCount:s.FileCount??void 0,FileSizes:s.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(u=$localize`The backup storage folder was not found.`),s&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(q,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:F=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):re([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(Ce(3))]).pipe(U(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#p(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=fe({token:a,factory:a.\u0275fac,providedIn:"root"})};var Y=new V,Qe=()=>Y.group({restoreFrom:Y.control("orignal"),restoreFromPath:Y.control(""),handleExisting:Y.control("overwrite"),permissions:Y.control(!1),includeMetadata:Y.control(!0)}),Se=class a{#t=_(P);#e=_(h);#o=_(R);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-advanced-options-settings"]],decls:42,vars:7,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let F;F=$localize`Metadata settings`;let I;I=$localize` Restore file metadata ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Restore read/write permissions ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let Te;Te=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let ge;return ge=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,u,F,I,K,Te,ge,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=H();r(0,"form",13,0),C("submit",function(){return N(o),f(t.submit())}),r(2,"h3",14),m(3,1),l(),r(4,"app-toggle-card",15),b(5,16),m(6,2),$(),r(7,"sh-radio",17),S(8,3),c(9,"input",18),T(),l(),r(10,"sh-radio",17),S(11,4),c(12,"input",19),T(),l(),r(13,"app-file-tree",20)(14,"label",21),j(15,"Path"),l(),c(16,"input",22),l()(),r(17,"app-toggle-card",15),b(18,16),m(19,5),$(),r(20,"sh-radio",17),S(21,6),c(22,"input",23),T(),l(),r(23,"sh-radio",17),S(24,7),c(25,"input",24),T(),l()(),r(26,"app-toggle-card"),b(27,16),m(28,8),$(),r(29,"sh-toggle",25),S(30,9),c(31,"input",26),T(),l(),r(32,"sh-toggle",25),S(33,10),c(34,"input",27),T(),l()(),r(35,"div",28)(36,"button",29),C("click",function(){return N(o),f(t.goBack())}),S(37,11),c(38,"sh-icon"),T(),l(),r(39,"button",30),S(40,12),c(41,"sh-icon"),T(),l()()()}if(e&2){let o;g("formGroup",t.optionsForm),d(4),g("disallowToggle",!0),d(9),g("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation")("enableCreateFolder",!0),d(4),g("disallowToggle",!0),d(22),Ie("loader",t.isSubmitting())}},dependencies:[W,w,A,ve,Ge,G,k,B,x,ne,se,ze,Ve,J,z],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Qe as a,Se as b,qe as c,pe as d,Ke as e,de as f,P as g};
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-LANFQDZE.js")},{path:"encryption",loadComponent:()=>import("./chunk-U4U2GCS5.js")},{path:"select-files",loadComponent:()=>import("./chunk-ZKX6JJ6S.js")},{path:"options",loadComponent:()=>import("./chunk-BGKZFATT.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-ZWO4SECL.js")}],t=o;export{t as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-DILTD4XG.js";import"./chunk-ZBVBVQO7.js";import"./chunk-SJ3V6DON.js";import"./chunk-VUKS2SJL.js";import"./chunk-72HORZFV.js";import"./chunk-MTQKK2WN.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as OptionsListComponent};
1
+ import{a}from"./chunk-JRDR23NB.js";import"./chunk-ZBVBVQO7.js";import"./chunk-X3XJ26NZ.js";import"./chunk-VUKS2SJL.js";import"./chunk-72HORZFV.js";import"./chunk-MTQKK2WN.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as OptionsListComponent};
@@ -0,0 +1 @@
1
+ import{a as Lt,b as Rt,c as Bt}from"./chunk-FMEVVC6D.js";import"./chunk-ZBVBVQO7.js";import{a as Pt}from"./chunk-X3XJ26NZ.js";import{h as yt}from"./chunk-KSEFQ2XA.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-VRV52R6I.js";import"./chunk-Z27IQRKV.js";import{a as $}from"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import{b as St,d as mt}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as k,C as $t,G as v,J as Mt,c as x,e as G,f as Nt,g as It,i as U,j as ht,r as Et,s as w,u as b,w as Ot,y as ft,z as At}from"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as st,Bb as Ft,Bc as Dt,Cb as m,Db as s,Eb as F,Fb as c,Jb as rt,Kb as lt,Mb as g,Pa as ot,Qc as R,Sa as r,Tb as _,Ub as u,Vb as y,Vc as gt,Wb as z,Wc as pt,Xb as H,Xc as Ct,Yb as J,Zb as D,_ as N,ac as ct,bc as _t,cb as E,ea as T,fa as d,gc as ut,hc as Tt,ja as it,kc as dt,nc as L,oc as X,pa as h,sc as O,tc as f,uc as A,vc as j,wc as W,xb as C,xc as B,yb as S,yc as q,zb as at}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Ut=["*"],M=class o{destination=pt.required();static \u0275fac=function(t){return new(t||o)};static \u0275cmp=E({type:o,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"]},ngContentSelectors:Ut,decls:9,vars:6,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"description"],[1,"actions"]],template:function(t,i){if(t&1&&(ct(),s(0,"sh-card",0)(1,"div",1),c(2,"img",2),F(),s(3,"div",3),L(4),F(),s(5,"div",4),L(6),F(),s(7,"div",5),_t(8),F()()),t&2){let e=i.destination();r(2),m("src",q(e.icon),ot)("alt",q(e.displayName)),r(2),X(e.displayName),r(2),X(e.description)}},dependencies:[$t],styles:['[_nghost-%COMP%]{display:block}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};function bt(o,n){if(o&1){let t=g();s(0,"app-destination-list-item",3)(1,"button",4),D("click",function(){let e=T(t).$implicit,a=l();return d(a.setDestination.emit(e.key))}),_(2,0),c(3,"sh-icon"),u(),F()()}if(o&2){let t=n.$implicit;m("destination",t)}}var K=class o{#i=N(Rt);setDestination=gt();destinationSearchTerm=h("");destinationTypeOptions=this.#i.destinationTypeOptions;destinationTypeOptionsFocused=R(()=>{let n=this.destinationTypeOptions(),t=this.destinationSearchTerm().toLowerCase(),i=[...n].sort((e,a)=>{let I=e.sortOrder??0,P=a.sortOrder??0;return I!==P?P-I:e.displayName.localeCompare(a.displayName)}).filter(e=>(e.sortOrder??0)>=0);return t?i.filter(e=>e.searchTerms.toLowerCase().includes(t)):i});static \u0275fac=function(t){return new(t||o)};static \u0275cmp=E({type:o,selectors:[["app-destination-list"]],outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let n;n=$localize`Search for destination...`;let t;return t=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(t,i){t&1&&(s(0,"sh-form-field")(1,"input",1),A("ngModelChange",function(a){return f(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),F()(),s(2,"div",2),st(3,bt,4,1,"app-destination-list-item",3,at),F()),t&2&&(r(),O("ngModel",i.destinationSearchTerm),r(2),Ft(i.destinationTypeOptionsFocused()))},dependencies:[M,w,x,G,U,v,k,b],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding-bottom:1rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var kt=["formRef"],vt=()=>({maxWidth:"700px",width:"100%"});function Kt(o,n){if(o&1){let t=g();_(0,1,1),s(1,"button",28),D("click",function(){T(t);let e=l();return d(e.testDestination(0,!0))}),F(),u()}if(o&2){let t=l();r(),dt("loader",t.testSignal()=="testing"),m("disabled",t.testSignal()=="testing")}}function Vt(o,n){if(o&1){let t=g();_(0,1,2),s(1,"button",29),D("click",function(){T(t);let e=l();return d(e.openTargetUrlDialog())}),c(2,"sh-icon"),F(),u()}}function zt(o,n){if(o&1){let t=g();_(0,1,4),s(1,"button",29),D("click",function(){T(t);let e=l(2);return d(e.copyTargetUrl())}),c(2,"sh-icon"),F(),u()}}function Ht(o,n){if(o&1){let t=g();_(0,1,3),s(1,"sh-menu")(2,"button",17),c(3,"sh-icon"),F(),rt(4,30),s(5,"button",29),D("click",function(){T(t);let e=l();return d(e.openTargetUrlDialog())}),c(6,"sh-icon"),F(),C(7,zt,3,0,"button",17),lt(),F(),u()}if(o&2){l();let t=B(0);r(7),S(t?7:-1)}}function Jt(o,n){o&1&&(s(0,"sh-alert"),_(1,4),c(2,"sh-icon",31),u(),F())}function Xt(o,n){o&1&&(s(0,"sh-alert",18),_(1,5),c(2,"sh-icon",31),u(),F())}function jt(o,n){if(o&1&&(s(0,"sh-alert",19),_(1,6),c(2,"sh-icon",31),u(),F()),o&2){let t=l();r(2),z(t.testErrorMessage()),H(1)}}function Wt(o,n){if(o&1&&(s(0,"sh-alert",20),_(1,7),c(2,"sh-icon",31),u(),F()),o&2){let t=l();r(2),z(t.testErrorMessage()),H(1)}}function qt(o,n){if(o&1){let t=g();s(0,"app-destination-list-item",21)(1,"button",24),D("click",function(){T(t);let e=l();return d(e.removeDestination())}),y(2,8),F()()}if(o&2){l();let t=B(14);m("destination",t)}}function Qt(o,n){if(o&1){let t=g();s(0,"app-destination-list",32),D("setDestination",function(e){T(t);let a=l();return d(a.setDestination(e))}),F()}}function Yt(o,n){if(o&1){let t=g();s(0,"app-single-destination",33),A("targetUrlChange",function(e){T(t);let a=l();return f(a.targetUrlModel,e)||(a.targetUrlModel=e),d(e)}),F()}if(o&2){let t=l();O("targetUrl",t.targetUrlModel),m("useBackupState",!0)}}function Zt(o,n){o&1&&(_(0,3,1),c(1,"sh-icon",26),u())}function te(o,n){o&1&&(_(0,3,2),c(1,"sh-icon"),u())}function ee(o,n){o&1&&(s(0,"h2"),y(1,11),F())}function ne(o,n){o&1&&(s(0,"h2"),y(1,12),F())}function ie(o,n){if(o&1){let t=g();s(0,"sh-dialog",34),A("isOpenChange",function(e){T(t);let a=l();return f(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),d(e)}),s(1,"header",35),C(2,ee,2,0,"h2")(3,ne,2,0,"h2"),s(4,"sh-alert",19),y(5,9),F()(),s(6,"div",36)(7,"sh-form-field")(8,"textarea",37),A("ngModelChange",function(e){T(t);let a=l();return f(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),d(e)}),F()()(),s(9,"footer",38)(10,"button",24),D("click",function(){T(t);let e=l();return d(e.closeTargetUrlDialog(!1))}),L(11,"Cancel"),F(),s(12,"button",39),D("click",function(){T(t);let e=l();return d(e.closeTargetUrlDialog(!0))}),_(13,10),c(14,"sh-icon"),u(),F()()()}if(o&2){let t=l(),i=B(0);O("isOpen",t.targetUrlDialogOpen),m("options",Dt(4,vt)),r(2),S(i?3:2),r(6),O("ngModel",t.targetUrlCtrl)}}var V=new Et,Le=(o={destinations:[]})=>V.group({destinations:V.array(o.destinations)}),Re=({key:o,customGroup:n,dynamicGroup:t,advancedGroup:i})=>V.group({destinationType:V.control(o),custom:n,dynamic:t,advanced:i}),Q=class o{#i=N(mt);#o=N(St);#t=N(yt);#e=N(At);#a=N(Lt);injector=N(it);formRef=Ct.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=h(null);targetUrlInitial=h(null);targetUrlDialogOpen=h(!1);toggleNewDestination=h(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;selectedDestinationType=R(()=>{let n=this.targetUrlModel();if(!n)return null;let t=n.split("://")[0];return Pt(t)??null});selectedDestinationTypeOption=R(()=>{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});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let n=this.targetUrlModel();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),i=this.targetUrlInitial();!n||t===i||!t||this.#t.setTargetUrl(t)}testDestination(n,t,i){let e=this.targetUrlModel();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),this.#t.isNew()&&(a.containsBackup===!0?(this.#t.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),t||this.#e.open($,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#t.setTestState("warning",$localize`The remote destination contains unknown files.`),t||this.#e.open($,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),i?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){i?.();return}let I=e.includes("?");a.action==="trust-cert"&&this.#t.setTargetUrl(e+`${I?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.setTargetUrl(e+`${I?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):i?.()}}))}setDestination(n){this.#t.setTargetUrl(`${n}://`,!0)}removeDestination(){this.#t.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.#t.isNew(),t=this.testSignal();if(!n){this.#n();return}if(t===""){this.#e.open($,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:i=>{i?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open($,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(t!=="success"){this.#e.open($,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#n()}});return}this.#n()}#n(){this.#t.isNew()||this.#t.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=E({type:o,selectors:[["app-destination"]],viewQuery:function(t,i){t&1&&ut(i.formRef,kt,5),t&2&&Tt()},decls:27,vars:11,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#6\uFFFD"}:START_TAG_DIV:${"[\uFFFD*7:1\uFFFD|\uFFFD*7:4\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*8:2\uFFFD"}:START_BLOCK_IF_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#5:3\uFFFD]"}:START_TAG_BUTTON_1:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Set target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*9:3\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:3\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#2:3\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#4:3\uFFFD"}:START_TAG_NG_CONTAINER:${"[\uFFFD#1:2\uFFFD|\uFFFD#5:3\uFFFD]"}:START_TAG_BUTTON_1:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*7:1\uFFFD|\uFFFD*7:4\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:4\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#4:3\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#1:3\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/*9:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_DIV:`,n=J(n);let t;t=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD*24:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*24:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*25:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*25:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,i=J(i);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let I;I=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let P;P=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let Y;Y=$localize`Change`;let Z;Z=$localize`Be careful, this will overwrite everything you have in your destination.`;let tt;tt=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let et;et=$localize`Set target URL`;let nt;return nt=$localize`Edit target URL`,[["formRef",""],n,t,i,e,a,I,P,Y,Z,tt,et,nt,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"loader","disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[1,"current-destination",3,"destination"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,i){if(t&1){let e=g();j(0),s(1,"form",13,0),D("submit",function(){return T(e),d(i.next())}),s(3,"header")(4,"h3",14),_(5,1),s(6,"div",15),C(7,Kt,2,3,"button",16),C(8,Vt,3,0,"button",17)(9,Ht,8,1,"sh-menu"),F(),u(),F(),C(10,Jt,3,0,"sh-alert")(11,Xt,3,0,"sh-alert",18)(12,jt,3,1,"sh-alert",19)(13,Wt,3,1,"sh-alert",20),j(14),C(15,qt,3,1,"app-destination-list-item",21),F(),C(16,Qt,1,0,"app-destination-list"),C(17,Yt,1,2,"app-single-destination",22),s(18,"div",23)(19,"button",24),D("click",function(){return T(e),d(i.goBack())}),_(20,2),c(21,"sh-icon"),u(),F(),s(22,"button",25),_(23,3),C(24,Zt,2,0,"sh-icon",26)(25,te,2,0,"sh-icon"),u(),F()()(),C(26,ie,15,5,"sh-dialog",27)}if(t&2){let e=W(!!i.targetUrlModel());r(7),S(e?7:-1),r(),S(e?9:8),r(2),S(i.testSignal()=="testing"?10:i.testSignal()=="success"?11:i.testSignal()=="warning"?12:i.testSignal()=="error"?13:-1),r(4);let a=W(i.selectedDestinationTypeOption());r(),S(a?15:-1),r(),S(e?-1:16),r(),S(e?17:-1),r(5),m("disabled",i.testSignal()=="testing"||!e),r(2),S(i.testSignal()=="testing"?24:25),r(2),S(i.targetUrlDialogOpen()?26:-1)}},dependencies:[Bt,K,M,w,ht,x,G,Nt,U,It,k,v,Mt,b,ft,Ot],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:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}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}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}"],changeDetection:0})};export{Le as createDestinationForm,Re as createDestinationFormGroup,Q as default};
@@ -1 +1 @@
1
- import{a,b,c}from"./chunk-4NLJRM5D.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-Z27IQRKV.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
1
+ import{a,b,c}from"./chunk-KSEFQ2XA.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-Z27IQRKV.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
@@ -1 +1 @@
1
- import{c as a,d as b}from"./chunk-DBQGZZI2.js";import"./chunk-DILTD4XG.js";import"./chunk-ZBVBVQO7.js";import"./chunk-SJ3V6DON.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-Z27IQRKV.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import"./chunk-WXF4HUYT.js";import"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as createEncryptionForm,b as default};
1
+ import{c as a,d as b}from"./chunk-M6SIMFCD.js";import"./chunk-JRDR23NB.js";import"./chunk-ZBVBVQO7.js";import"./chunk-X3XJ26NZ.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-Z27IQRKV.js";import"./chunk-ZSZLXWN6.js";import"./chunk-72HORZFV.js";import"./chunk-MTQKK2WN.js";import"./chunk-LN26XMBJ.js";import"./chunk-WXF4HUYT.js";import"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as createEncryptionForm,b as default};